fix(core): update
This commit is contained in:
parent
5613ad7fa6
commit
49f3fc8feb
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@design.estate/dees-catalog',
|
name: '@design.estate/dees-catalog',
|
||||||
version: '1.0.236',
|
version: '1.0.237',
|
||||||
description: 'website for lossless.com'
|
description: 'website for lossless.com'
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,6 @@ export class DeesButton extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.button:hover {
|
.button:hover {
|
||||||
cursor: pointer;
|
|
||||||
background: #039be5;
|
background: #039be5;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
border: 1px solid #039be5;
|
border: 1px solid #039be5;
|
||||||
|
@ -81,7 +81,6 @@ export class DeesChips extends DeesElement {
|
|||||||
|
|
||||||
.chip:hover {
|
.chip:hover {
|
||||||
background: #666666;
|
background: #666666;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.chip.selected {
|
.chip.selected {
|
||||||
|
@ -130,12 +130,10 @@ export class DeesContextmenu extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mainbox .menuitem:hover {
|
.mainbox .menuitem:hover {
|
||||||
cursor: pointer;
|
|
||||||
background: ${cssManager.bdTheme('#00000010', '#ffffff10')};
|
background: ${cssManager.bdTheme('#00000010', '#ffffff10')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainbox .menuitem:active {
|
.mainbox .menuitem:active {
|
||||||
cursor: pointer;
|
|
||||||
background: #ffffff05;
|
background: #ffffff05;
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
|
@ -61,17 +61,22 @@ export class DeesDataviewCodebox extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.appbar {
|
.appbar {
|
||||||
|
position: relative;
|
||||||
color: ${cssManager.bdTheme('#333', '#ccc')};
|
color: ${cssManager.bdTheme('#333', '#ccc')};
|
||||||
background: ${cssManager.bdTheme('#ffffff', '#161616')};
|
background: ${cssManager.bdTheme('#ffffff', '#161616')};
|
||||||
border-bottom: 1px solid ${cssManager.bdTheme('#eeeeeb', '#222222')};
|
border-bottom: 1px solid ${cssManager.bdTheme('#eeeeeb', '#222222')};
|
||||||
height: 24px;
|
height: 24px;
|
||||||
|
display: flex;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.appbar .fileName {
|
.appbar .fileName {
|
||||||
|
line-height: inherit;
|
||||||
|
position: relative;
|
||||||
|
flex: 1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,8 +180,9 @@ export class DeesDataviewCodebox extends DeesElement {
|
|||||||
}}"
|
}}"
|
||||||
>
|
>
|
||||||
<div class="appbar">
|
<div class="appbar">
|
||||||
<dees-windowcontrols></dees-windowcontrols>
|
<dees-windowcontrols type="mac" position="left"></dees-windowcontrols>
|
||||||
<div class="fileName">index.ts</div>
|
<div class="fileName">index.ts</div>
|
||||||
|
<dees-windowcontrols type="mac" position="right"></dees-windowcontrols>
|
||||||
</div>
|
</div>
|
||||||
<div class="codegrid">
|
<div class="codegrid">
|
||||||
<div class="lineNumbers">
|
<div class="lineNumbers">
|
||||||
|
@ -61,7 +61,6 @@ export class DeesDataviewStatusobject extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.copyMain {
|
.copyMain {
|
||||||
cursor: pointer;
|
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
@ -62,7 +62,6 @@ export class DeesInputCheckbox extends DeesElement {
|
|||||||
display: block;
|
display: block;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 20px 0px;
|
margin: 20px 0px;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.maincontainer {
|
.maincontainer {
|
||||||
|
@ -59,6 +59,15 @@ export class DeesInputDropdown extends DeesElement {
|
|||||||
@state()
|
@state()
|
||||||
public opensToTop: boolean = false;
|
public opensToTop: boolean = false;
|
||||||
|
|
||||||
|
@state()
|
||||||
|
private filteredOptions: { option: string; key: string; payload?: any }[] = [];
|
||||||
|
|
||||||
|
@state()
|
||||||
|
private highlightedIndex: number = 0;
|
||||||
|
|
||||||
|
@state()
|
||||||
|
public isOpened = false;
|
||||||
|
|
||||||
public static styles = [
|
public static styles = [
|
||||||
cssManager.defaultStyles,
|
cssManager.defaultStyles,
|
||||||
css`
|
css`
|
||||||
@ -85,7 +94,6 @@ export class DeesInputDropdown extends DeesElement {
|
|||||||
|
|
||||||
.selectedBox {
|
.selectedBox {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
cursor: pointer;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
max-width: 420px;
|
max-width: 420px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@ -99,18 +107,17 @@ export class DeesInputDropdown extends DeesElement {
|
|||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.accentTop {
|
.accentBottom {
|
||||||
border-top: 1px solid #e4002b;
|
background: #ffffff10;
|
||||||
}
|
}
|
||||||
|
|
||||||
.accentBottom {
|
.accentTop {
|
||||||
border-bottom: 1px solid #e4002b;
|
background: #ffffff10;
|
||||||
}
|
}
|
||||||
|
|
||||||
.selectionBox {
|
.selectionBox {
|
||||||
will-change: transform;
|
will-change: transform;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
background: ${cssManager.bdTheme('#ffffff', '#222222')};
|
background: ${cssManager.bdTheme('#ffffff', '#222222')};
|
||||||
@ -118,22 +125,31 @@ export class DeesInputDropdown extends DeesElement {
|
|||||||
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
|
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
|
||||||
min-height: 40px;
|
min-height: 40px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
padding: 4px;
|
padding: 4px 8px;
|
||||||
transform: scale(0.99, 0.99);
|
transform: scale(0.98, 0.98);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.selectionBox.show {
|
.selectionBox.show {
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: scale(1, 1);
|
transform: scale(1, 1);
|
||||||
|
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
.option {
|
.option {
|
||||||
transition: all 0.1s;
|
transition: all 0.1s;
|
||||||
line-height: 40px;
|
line-height: 32px;
|
||||||
padding: 0px 4px;
|
padding: 0px 4px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
margin: 4px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option.highlighted {
|
||||||
|
border-left: 2px solid #0277bd;
|
||||||
|
padding-left: 6px;
|
||||||
|
background: #ffffff20;
|
||||||
}
|
}
|
||||||
|
|
||||||
.option:hover {
|
.option:hover {
|
||||||
@ -169,20 +185,21 @@ export class DeesInputDropdown extends DeesElement {
|
|||||||
|
|
||||||
public render(): TemplateResult {
|
public render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<div class="maincontainer">
|
<div class="maincontainer" @keydown="${this.isOpened ? this.handleKeyDown : undefined}">
|
||||||
${this.label ? html`<div class="label">${this.label}</div>` : html``}
|
${this.label ? html`<div class="label">${this.label}</div>` : html``}
|
||||||
<div class="selectionBox">
|
<div class="selectionBox">
|
||||||
${this.enableSearch && !this.opensToTop
|
${this.enableSearch && !this.opensToTop
|
||||||
? html`
|
? html`
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<input type="text" placeholder="Search" />
|
<input type="text" placeholder="Search" @input="${this.handleSearch}" />
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
: null}
|
: null}
|
||||||
${this.options.map((option) => {
|
${this.filteredOptions.map((option, index) => {
|
||||||
|
const isHighlighted = this.highlightedIndex === index;
|
||||||
return html`
|
return html`
|
||||||
<div
|
<div
|
||||||
class="option"
|
class="option ${isHighlighted ? 'highlighted' : ''}"
|
||||||
@click=${() => {
|
@click=${() => {
|
||||||
this.updateSelection(option);
|
this.updateSelection(option);
|
||||||
}}
|
}}
|
||||||
@ -194,7 +211,7 @@ export class DeesInputDropdown extends DeesElement {
|
|||||||
${this.enableSearch && this.opensToTop
|
${this.enableSearch && this.opensToTop
|
||||||
? html`
|
? html`
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<input type="text" placeholder="Search" />
|
<input type="text" placeholder="Search" @input="${this.handleSearch}" />
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
: null}
|
: null}
|
||||||
@ -217,6 +234,7 @@ export class DeesInputDropdown extends DeesElement {
|
|||||||
|
|
||||||
firstUpdated() {
|
firstUpdated() {
|
||||||
this.selectedOption = this.selectedOption || this.options[0] || null;
|
this.selectedOption = this.selectedOption || this.options[0] || null;
|
||||||
|
this.filteredOptions = this.options; // Initialize filteredOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
public async updateSelection(selectedOption) {
|
public async updateSelection(selectedOption) {
|
||||||
@ -237,6 +255,7 @@ export class DeesInputDropdown extends DeesElement {
|
|||||||
private isElevated: boolean = false;
|
private isElevated: boolean = false;
|
||||||
private windowOverlay: DeesWindowLayer;
|
private windowOverlay: DeesWindowLayer;
|
||||||
public async toggleSelectionBox() {
|
public async toggleSelectionBox() {
|
||||||
|
this.isOpened = !this.isOpened;
|
||||||
const domtoolsInstance = await this.domtoolsPromise;
|
const domtoolsInstance = await this.domtoolsPromise;
|
||||||
const selectedBox: HTMLElement = this.shadowRoot.querySelector('.selectedBox');
|
const selectedBox: HTMLElement = this.shadowRoot.querySelector('.selectedBox');
|
||||||
const selectionBox: HTMLElement = this.shadowRoot.querySelector('.selectionBox');
|
const selectionBox: HTMLElement = this.shadowRoot.querySelector('.selectionBox');
|
||||||
@ -298,4 +317,32 @@ export class DeesInputDropdown extends DeesElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private handleSearch(event: Event): void {
|
||||||
|
const searchTerm = (event.target as HTMLInputElement).value.toLowerCase();
|
||||||
|
this.filteredOptions = this.options.filter((option) =>
|
||||||
|
option.option.toLowerCase().includes(searchTerm)
|
||||||
|
);
|
||||||
|
this.highlightedIndex = 0; // Reset highlighted index
|
||||||
|
}
|
||||||
|
|
||||||
|
private handleKeyDown(event: KeyboardEvent): void {
|
||||||
|
if (!this.isOpened) {
|
||||||
|
console.log('discarded key event. Check why this function is called.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const key = event.key;
|
||||||
|
const maxIndex = this.filteredOptions.length - 1;
|
||||||
|
|
||||||
|
if (key === 'ArrowDown') {
|
||||||
|
this.highlightedIndex = this.highlightedIndex + 1 > maxIndex ? 0 : this.highlightedIndex + 1;
|
||||||
|
event.preventDefault();
|
||||||
|
} else if (key === 'ArrowUp') {
|
||||||
|
this.highlightedIndex = this.highlightedIndex - 1 < 0 ? maxIndex : this.highlightedIndex - 1;
|
||||||
|
event.preventDefault();
|
||||||
|
} else if (key === 'Enter') {
|
||||||
|
this.updateSelection(this.filteredOptions[this.highlightedIndex]);
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,6 @@ export class DeesInputFileupload extends DeesElement {
|
|||||||
|
|
||||||
.uploadButton {
|
.uploadButton {
|
||||||
position: relative;
|
position: relative;
|
||||||
cursor: pointer;
|
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
max-width: 600px;
|
max-width: 600px;
|
||||||
background: ${cssManager.bdTheme('#fafafa', '#333333')};
|
background: ${cssManager.bdTheme('#fafafa', '#333333')};
|
||||||
|
@ -85,7 +85,6 @@ export class DeesInputQuantitySelector extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.selector:hover {
|
.selector:hover {
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.quantity {
|
.quantity {
|
||||||
|
@ -51,7 +51,6 @@ export class DeesInputRadio extends DeesElement {
|
|||||||
display: block;
|
display: block;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 20px 0px;
|
margin: 20px 0px;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.maincontainer {
|
.maincontainer {
|
||||||
|
@ -147,7 +147,6 @@ export class DeesInputText extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.showPassword:hover {
|
.showPassword:hover {
|
||||||
cursor: pointer;
|
|
||||||
background: ${cssManager.bdTheme('#00000010', '#ffffff10')};
|
background: ${cssManager.bdTheme('#00000010', '#ffffff10')};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,6 @@ export class DeesMobilenavigation extends DeesElement {
|
|||||||
padding: 8px;
|
padding: 8px;
|
||||||
margin-left: -8px;
|
margin-left: -8px;
|
||||||
margin-right: -8px;
|
margin-right: -8px;
|
||||||
cursor: pointer;
|
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
.menuItem:hover {
|
.menuItem:hover {
|
||||||
|
@ -133,7 +133,6 @@ export class DeesModal extends DeesElement {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
border-right: 1px solid #222;
|
border-right: 1px solid #222;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
.modal .bottomButtons .bottomButton:hover {
|
.modal .bottomButtons .bottomButton:hover {
|
||||||
background: #222;
|
background: #222;
|
||||||
|
@ -52,7 +52,6 @@ export class DeesSpeechbubble extends DeesElement {
|
|||||||
display: block;
|
display: block;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
color: ${cssManager.bdTheme('#333', '#fff')};
|
color: ${cssManager.bdTheme('#333', '#fff')};
|
||||||
cursor: pointer;
|
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
:host([hidden]) {
|
:host([hidden]) {
|
||||||
|
@ -144,7 +144,6 @@ export class DeesStepper extends DeesElement {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
border-bottom-right-radius: 3px;
|
border-bottom-right-radius: 3px;
|
||||||
background: ${cssManager.bdTheme('#00000008', '#ffffff08')};
|
background: ${cssManager.bdTheme('#00000008', '#ffffff08')};
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.step .goBack:hover {
|
.step .goBack:hover {
|
||||||
|
@ -202,7 +202,6 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
|
|
||||||
.headerActions {
|
.headerActions {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
.headerAction {
|
.headerAction {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -236,7 +235,7 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
tr:hover {
|
tr:hover {
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
tr:hover td {
|
tr:hover td {
|
||||||
background: ${cssManager.bdTheme('#22222210', '#ffffff10')};
|
background: ${cssManager.bdTheme('#22222210', '#ffffff10')};
|
||||||
@ -343,7 +342,6 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.footerActions .footerAction {
|
.footerActions .footerAction {
|
||||||
cursor: pointer;
|
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
@ -19,18 +19,37 @@ declare global {
|
|||||||
|
|
||||||
@customElement('dees-windowcontrols')
|
@customElement('dees-windowcontrols')
|
||||||
export class DeesWindowControls extends DeesElement {
|
export class DeesWindowControls extends DeesElement {
|
||||||
|
// STATIC
|
||||||
public static demo = () => html`<dees-windowcontrols></dees-windowcontrols>`;
|
public static demo = () => html`<dees-windowcontrols></dees-windowcontrols>`;
|
||||||
|
|
||||||
|
// Instance
|
||||||
|
@property({
|
||||||
|
reflect: true,
|
||||||
|
})
|
||||||
|
public type: 'mac' | 'linux' | 'windows' = 'mac';
|
||||||
|
|
||||||
|
@property({
|
||||||
|
reflect: true,
|
||||||
|
})
|
||||||
|
public position: 'left' | 'right' = 'left';
|
||||||
|
|
||||||
public static styles = [
|
public static styles = [
|
||||||
cssManager.defaultStyles,
|
cssManager.defaultStyles,
|
||||||
css`
|
css`
|
||||||
|
:host {
|
||||||
|
position: relative;
|
||||||
|
display: block;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-left: 16px;
|
||||||
|
padding-right: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.windowControls {
|
.windowControls {
|
||||||
position: absolute;
|
height: 100%;
|
||||||
top: 6px;
|
position: relative;
|
||||||
left: 20px;
|
display: flex;
|
||||||
width: 200px;
|
justify-content: center;
|
||||||
display: grid;
|
align-items: center;
|
||||||
grid-template-columns: 24px 24px 24px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.windowControls div {
|
.windowControls div {
|
||||||
@ -40,16 +59,17 @@ export class DeesWindowControls extends DeesElement {
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
cursor: pointer;
|
|
||||||
background: #222222;
|
background: #222222;
|
||||||
}
|
}
|
||||||
|
|
||||||
.windowControls div.close {
|
.windowControls div.close {
|
||||||
background: #ff5f57;
|
background: #ff5f57;
|
||||||
|
margin-right: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.windowControls div.toDock {
|
.windowControls div.toDock {
|
||||||
background: #ffbd2e;
|
background: #ffbd2e;
|
||||||
|
margin-right: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.windowControls div.minMax {
|
.windowControls div.minMax {
|
||||||
@ -64,11 +84,16 @@ export class DeesWindowControls extends DeesElement {
|
|||||||
|
|
||||||
public render(): TemplateResult {
|
public render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<div class="windowControls">
|
${(this.type === 'mac' && this.position === 'left') ||
|
||||||
<div class="close"></div>
|
((this.type === 'linux' || this.type === 'windows') && this.position === 'right')
|
||||||
<div class="toDock"></div>
|
? html`
|
||||||
<div class="minMax"></div>
|
<div class="windowControls">
|
||||||
</div>
|
<div class="close"></div>
|
||||||
|
<div class="toDock"></div>
|
||||||
|
<div class="minMax"></div>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
: html``}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user