@cscfi/csc-ui 1.3.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/c-autocomplete_34.cjs.entry.js +33 -19
- package/dist/cjs/c-autocomplete_34.cjs.entry.js.map +1 -1
- package/dist/cjs/csc-ui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/c-autocomplete/c-autocomplete.js +60 -3
- package/dist/collection/components/c-autocomplete/c-autocomplete.js.map +1 -1
- package/dist/collection/components/c-dropdown/c-dropdown.css +1 -1
- package/dist/collection/components/c-dropdown/c-dropdown.js +19 -12
- package/dist/collection/components/c-dropdown/c-dropdown.js.map +1 -1
- package/dist/collection/components/c-select/c-select.js +8 -4
- package/dist/collection/components/c-select/c-select.js.map +1 -1
- package/dist/components/c-autocomplete.js +9 -3
- package/dist/components/c-autocomplete.js.map +1 -1
- package/dist/components/c-dropdown2.js +20 -13
- package/dist/components/c-dropdown2.js.map +1 -1
- package/dist/components/c-select.js +8 -4
- package/dist/components/c-select.js.map +1 -1
- package/dist/csc-ui/csc-ui.esm.js +1 -1
- package/dist/csc-ui/csc-ui.esm.js.map +1 -1
- package/dist/csc-ui/{p-d72364b9.js → p-1c767310.js} +2 -2
- package/dist/csc-ui/{p-6733b506.entry.js → p-49a7a96d.entry.js} +2 -2
- package/dist/csc-ui/p-6a6a89ef.entry.js +2 -0
- package/dist/csc-ui/{p-30edfff8.entry.js.map → p-6a6a89ef.entry.js.map} +1 -1
- package/dist/csc-ui/{p-e90ac550.entry.js → p-7f97a326.entry.js} +2 -2
- package/dist/csc-ui/{p-765ae162.entry.js → p-a7aa8fcf.entry.js} +2 -2
- package/dist/csc-ui/{p-6a54587f.entry.js → p-aae874cf.entry.js} +2 -2
- package/dist/csc-ui/{p-30bf678d.entry.js → p-c2767e00.entry.js} +2 -2
- package/dist/csc-ui/p-c40b6bd2.entry.js +2 -0
- package/dist/csc-ui/p-c40b6bd2.entry.js.map +1 -0
- package/dist/csc-ui/p-ddff8326.entry.js +2 -0
- package/dist/csc-ui/{p-9bf601bb.entry.js.map → p-ddff8326.entry.js.map} +1 -1
- package/dist/csc-ui/{p-dfe321ae.entry.js → p-e7b91787.entry.js} +2 -2
- package/dist/csc-ui/{p-7ca9b5ff.entry.js → p-fc47b970.entry.js} +2 -2
- package/dist/esm/c-accordion-item.entry.js +1 -1
- package/dist/esm/c-alert.entry.js +1 -1
- package/dist/esm/c-autocomplete_34.entry.js +34 -20
- package/dist/esm/c-autocomplete_34.entry.js.map +1 -1
- package/dist/esm/c-data-table.entry.js +1 -1
- package/dist/esm/c-menu_2.entry.js +1 -1
- package/dist/esm/c-pagination.entry.js +1 -1
- package/dist/esm/c-swiper.entry.js +1 -1
- package/dist/esm/c-tabs.entry.js +1 -1
- package/dist/esm/c-tag.entry.js +1 -1
- package/dist/esm/c-toast.entry.js +1 -1
- package/dist/esm/csc-ui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{mdi-d1289d08.js → mdi-e10c3ab4.js} +2 -2
- package/dist/esm/{mdi-d1289d08.js.map → mdi-e10c3ab4.js.map} +1 -1
- package/dist/types/components/c-autocomplete/c-autocomplete.d.ts +3 -0
- package/dist/types/components/c-dropdown/c-dropdown.d.ts +1 -0
- package/dist/types/components.d.ts +24 -0
- package/package.json +1 -1
- package/vscode-data.json +12 -0
- package/dist/csc-ui/p-30edfff8.entry.js +0 -2
- package/dist/csc-ui/p-4f54f704.entry.js +0 -2
- package/dist/csc-ui/p-4f54f704.entry.js.map +0 -1
- package/dist/csc-ui/p-9bf601bb.entry.js +0 -2
- /package/dist/csc-ui/{p-d72364b9.js.map → p-1c767310.js.map} +0 -0
- /package/dist/csc-ui/{p-6733b506.entry.js.map → p-49a7a96d.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-e90ac550.entry.js.map → p-7f97a326.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-765ae162.entry.js.map → p-a7aa8fcf.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-6a54587f.entry.js.map → p-aae874cf.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-30bf678d.entry.js.map → p-c2767e00.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-dfe321ae.entry.js.map → p-e7b91787.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-7ca9b5ff.entry.js.map → p-fc47b970.entry.js.map} +0 -0
|
@@ -97,6 +97,9 @@ const CAutocomplete = class {
|
|
|
97
97
|
this.shadow = false;
|
|
98
98
|
this.returnObject = false;
|
|
99
99
|
this.itemsPerPage = 6;
|
|
100
|
+
this.minimumQueryLength = 0;
|
|
101
|
+
this.minimumQueryLengthMessage = 'Type at least {n} characters';
|
|
102
|
+
this.noMatchingItemsMessage = 'No suggestions found';
|
|
100
103
|
this.optionElements = undefined;
|
|
101
104
|
this.currentIndex = null;
|
|
102
105
|
this.dropdownVisible = false;
|
|
@@ -224,14 +227,14 @@ const CAutocomplete = class {
|
|
|
224
227
|
'c-input-menu__chevron': true,
|
|
225
228
|
'c-input-menu__chevron--active': this.dropdownVisible,
|
|
226
229
|
};
|
|
227
|
-
return (index.h("c-icon-button", { size: "x-small", class: classes, text: true, onClick: (event) => this._toggleDropdown(event), onKeyDown: (event) => this._onButtonKeyDown('chevron', event) }, index.h("c-icon", { path: mdi.mdiChevronDown, size: 24 })));
|
|
230
|
+
return (index.h("c-icon-button", { size: "x-small", class: classes, disabled: this.disabled, text: true, onClick: (event) => this._toggleDropdown(event), onKeyDown: (event) => this._onButtonKeyDown('chevron', event) }, index.h("c-icon", { path: mdi.mdiChevronDown, size: 24 })));
|
|
228
231
|
}
|
|
229
232
|
_renderReset() {
|
|
230
|
-
return (index.h("c-icon-button", { "aria-label": "", size: "x-small", text: true, onClick: (event) => this._reset(event), onKeyDown: (event) => this._onButtonKeyDown('reset', event) }, index.h("c-icon", { path: mdi.mdiClose, size: 20 })));
|
|
233
|
+
return (index.h("c-icon-button", { "aria-label": "", size: "x-small", disabled: this.disabled, text: true, onClick: (event) => this._reset(event), onKeyDown: (event) => this._onButtonKeyDown('reset', event) }, index.h("c-icon", { path: mdi.mdiClose, size: 20 })));
|
|
231
234
|
}
|
|
232
235
|
_renderInputElement() {
|
|
233
236
|
var _a;
|
|
234
|
-
return (index.h("div", { class: "c-input-menu__input" }, index.h("input", { type: "text", ref: (el) => (this._inputElement = el), "aria-expanded": this.dropdownVisible.toString(), "aria-owns": this._inputId + '-items', "aria-autocomplete": "list", autocomplete: "off", class: "c-input__input", role: "combobox", value: this.query, name: (_a = this.name) !== null && _a !== void 0 ? _a : null, onInput: () => this._updateInput(), onFocus: () => this._onInputFocus() })));
|
|
237
|
+
return (index.h("div", { class: "c-input-menu__input" }, index.h("input", { type: "text", ref: (el) => (this._inputElement = el), "aria-expanded": this.dropdownVisible.toString(), "aria-owns": this._inputId + '-items', "aria-autocomplete": "list", autocomplete: "off", class: "c-input__input", role: "combobox", value: this.query, name: (_a = this.name) !== null && _a !== void 0 ? _a : null, disabled: this.disabled, onInput: () => this._updateInput(), onFocus: () => this._onInputFocus() })));
|
|
235
238
|
}
|
|
236
239
|
componentWillLoad() {
|
|
237
240
|
CAutocomplete._uniqueId += 1;
|
|
@@ -648,7 +651,7 @@ const CCscLogo = class {
|
|
|
648
651
|
};
|
|
649
652
|
CCscLogo.style = cCscLogoCss;
|
|
650
653
|
|
|
651
|
-
const cDropdownCss = "html{box-sizing:border-box}body{margin:0}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host(c-dropdown){--_c-dropdown-background-color:var(\n --c-dropdown-background-color,\n var(--c-white)\n );--_c-dropdown-background-color-hover:var(\n --c-dropdown-background-color-hover,\n var(--c-primary-200)\n );--_c-dropdown-text-color:var(--c-dropdown-text-color, var(--c-text-body));--_c-dropdown-text-color-active:var(\n --c-dropdown-text-color-active,\n var(--c-primary-600)\n );--_c-dropdown-font-size:14px;--_c-dropdown-height:42px;display:block;position:relative}:host(c-dropdown) mark{background-color:transparent;box-shadow:0 2px 0 0 var(--_c-dropdown-text-color-active);color:inherit}:host(c-dropdown) dialog{border-radius:4px;background-color:transparent;border:none;margin:-4px 0 0;overflow:visible;padding:4px 0 0;position:fixed}:host(c-dropdown) dialog::backdrop{
|
|
654
|
+
const cDropdownCss = "html{box-sizing:border-box}body{margin:0}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host(c-dropdown){--_c-dropdown-background-color:var(\n --c-dropdown-background-color,\n var(--c-white)\n );--_c-dropdown-background-color-hover:var(\n --c-dropdown-background-color-hover,\n var(--c-primary-200)\n );--_c-dropdown-text-color:var(--c-dropdown-text-color, var(--c-text-body));--_c-dropdown-text-color-active:var(\n --c-dropdown-text-color-active,\n var(--c-primary-600)\n );--_c-dropdown-font-size:14px;--_c-dropdown-height:42px;display:block;position:relative}:host(c-dropdown) mark{background-color:transparent;box-shadow:0 2px 0 0 var(--_c-dropdown-text-color-active);color:inherit}:host(c-dropdown) dialog{border-radius:4px;background-color:transparent;border:none;margin:-4px 0 0;overflow:visible;padding:4px 0 0;position:fixed}:host(c-dropdown) dialog::backdrop{opacity:0}:host(c-dropdown) dialog[open].mobile{background-color:var(--_c-dropdown-background-color);width:100vw;max-width:100vw;height:100vh;max-height:100svh;inset:0}:host(c-dropdown) dialog[open].mobile .input-top-wrapper{padding:8px}:host(c-dropdown) dialog .input-bottom-wrapper.active{padding-top:8px}:host(c-dropdown) .dummy{display:none}:host(c-dropdown) ul{background-color:var(--_c-dropdown-background-color);box-shadow:2px 4px 10px rgba(0, 0, 0, 0.1607843137);border-radius:4px;list-style:none;margin:0;outline:none;padding:0;pointer-events:auto;visibility:hidden;width:100%;height:max-content;overflow-y:scroll}:host(c-dropdown) ul.active{visibility:visible;animation:0.2s 1 fade-in cubic-bezier(0.25, 0.8, 0.5, 1)}:host(c-dropdown) ul.active.mobile{width:100vw;max-width:100vw;height:100vh;max-height:calc(100svh - 60px)}:host(c-dropdown) li{align-items:center;column-gap:12px;cursor:pointer;display:flex;flex-wrap:nowrap;font-size:var(--_c-dropdown-font-size);min-height:var(--_c-dropdown-height);outline:none;padding-left:10px;padding-right:10px;pointer-events:auto;white-space:nowrap;width:100%;border-radius:4px}:host(c-dropdown) li span,:host(c-dropdown) li c-option-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}:host(c-dropdown) li:hover,:host(c-dropdown) li:focus,:host(c-dropdown) li.active{background:var(--_c-dropdown-background-color-hover);color:var(--_c-dropdown-text-color-active);box-shadow:inset 0 0 0 1px var(--_c-dropdown-text-color-active)}:host(c-dropdown) li:not(.disabled,:hover,:focus)[aria-selected=true]{background:var(--_c-dropdown-background-color-hover);color:var(--_c-dropdown-text-color-active);border-radius:0}:host(c-dropdown) li.disabled{background-color:rgba(var(--c-tertiary-rgb), 0.05);cursor:default;filter:grayscale(1) opacity(0.75)}:host(c-dropdown) .visuallyhidden{border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}@keyframes fade-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}";
|
|
652
655
|
|
|
653
656
|
const CDropdown = class {
|
|
654
657
|
constructor(hostRef) {
|
|
@@ -686,7 +689,6 @@ const CDropdown = class {
|
|
|
686
689
|
this._handleOpen();
|
|
687
690
|
this.dropdownStateChange.emit(isOpen);
|
|
688
691
|
this._scrollParent = this._scrollParent || (await getScrollParent.getScrollParent(this.el));
|
|
689
|
-
this._scrollParent.style.overflow = isOpen ? 'hidden' : null;
|
|
690
692
|
}
|
|
691
693
|
handleIndexChange(index) {
|
|
692
694
|
requestAnimationFrame(() => {
|
|
@@ -710,7 +712,7 @@ const CDropdown = class {
|
|
|
710
712
|
if (this._dialog.open)
|
|
711
713
|
return;
|
|
712
714
|
this._outsideClickFn = this._handleOutsideClick.bind(this);
|
|
713
|
-
|
|
715
|
+
this._dialog.addEventListener('click', this._outsideClickFn);
|
|
714
716
|
requestAnimationFrame(() => {
|
|
715
717
|
this.isOpen = true;
|
|
716
718
|
this._positionMenu();
|
|
@@ -767,12 +769,10 @@ const CDropdown = class {
|
|
|
767
769
|
this.renderedList = this._renderList();
|
|
768
770
|
});
|
|
769
771
|
}
|
|
770
|
-
_handleOutsideClick(
|
|
772
|
+
_handleOutsideClick() {
|
|
771
773
|
if (!this.isOpen)
|
|
772
774
|
return;
|
|
773
|
-
|
|
774
|
-
this.close();
|
|
775
|
-
}
|
|
775
|
+
this.close();
|
|
776
776
|
}
|
|
777
777
|
_highlightMatchingText(value) {
|
|
778
778
|
const { query } = this.parent;
|
|
@@ -835,11 +835,18 @@ const CDropdown = class {
|
|
|
835
835
|
input.focus();
|
|
836
836
|
});
|
|
837
837
|
}
|
|
838
|
+
_minimumQueryItem() {
|
|
839
|
+
const { query, loading, minimumQueryLength, minimumQueryLengthMessage } = this.parent;
|
|
840
|
+
if (query.length > minimumQueryLength || loading)
|
|
841
|
+
return;
|
|
842
|
+
return (index.h("li", null, index.h("c-icon", { path: mdi.mdiInformation, size: 18, color: "var(--c-info-600)" }), minimumQueryLengthMessage.replace('{n}', minimumQueryLength.toString())));
|
|
843
|
+
}
|
|
838
844
|
_emptyItem() {
|
|
839
|
-
const { query, loading } = this
|
|
845
|
+
const { query, loading, noMatchingItemsMessage } = this
|
|
846
|
+
.parent;
|
|
840
847
|
if (!query || loading)
|
|
841
848
|
return;
|
|
842
|
-
return (index.h("li", null, index.h("c-icon", { path: mdi.mdiAlert, size: 18, color: "var(--c-warning-600)" }),
|
|
849
|
+
return (index.h("li", null, index.h("c-icon", { path: mdi.mdiAlert, size: 18, color: "var(--c-warning-600)" }), noMatchingItemsMessage));
|
|
843
850
|
}
|
|
844
851
|
_renderList() {
|
|
845
852
|
return this.itemType === 'option'
|
|
@@ -848,7 +855,7 @@ const CDropdown = class {
|
|
|
848
855
|
}
|
|
849
856
|
_renderOptionsList() {
|
|
850
857
|
if (!this.items.length)
|
|
851
|
-
return this._emptyItem();
|
|
858
|
+
return this._minimumQueryItem() || this._emptyItem();
|
|
852
859
|
const options = Array.from(this.items);
|
|
853
860
|
this._listItems.length = 0;
|
|
854
861
|
return options.map((option, index$1) => {
|
|
@@ -867,7 +874,7 @@ const CDropdown = class {
|
|
|
867
874
|
}
|
|
868
875
|
_renderItemsList() {
|
|
869
876
|
if (!this.items.length)
|
|
870
|
-
return this._emptyItem();
|
|
877
|
+
return this._minimumQueryItem() || this._emptyItem();
|
|
871
878
|
this._listItems.length = 0;
|
|
872
879
|
return this.items.map((item, index$1) => {
|
|
873
880
|
return (index.h("li", { ref: (el) => this._listItems.push(el), id: `${this.hostId}-option-${item.value}`, tabindex: "-1", role: "option", "aria-set-size": this.items.length.toString(), "aria-pos-in-set": (index$1 + 1).toString(), "aria-selected": (this.index === index$1).toString(), class: { disabled: !!item.disabled }, "data-name": item.name, onClick: (event) => {
|
|
@@ -915,7 +922,10 @@ const CDropdown = class {
|
|
|
915
922
|
this._dialog.style.maxHeight = 42 * (this.itemsPerPage + 0.5) + 60 + 'px';
|
|
916
923
|
this._list.style.maxHeight = 42 * (this.itemsPerPage + 0.5) + 'px';
|
|
917
924
|
}
|
|
918
|
-
return (index.h(index.Host, null, index.h("slot", { name: "default" }), index.h("div", { class: "dummy", ref: (el) => (this._dummyElement = el) }), index.h("dialog", { tabindex: "-1", ref: (el) => (this._dialog = el), class: { mobile: this._isMobile }, onCancel: () => this.close() }, index.h("div", { id: 'announce-' + this.hostId, class: "visuallyhidden", "aria-live": "polite", "aria-atomic": "true" }, this.statusText), index.h("div", { class: "input-top-wrapper" }, index.h("slot", { name: "input-top" })), index.h("ul", { ref: (el) => (this._list = el), id: `${this.hostId}--results`, role: "listbox", "aria-expanded": this.isOpen.toString(), class: { active: this.isOpen, mobile: this._isMobile }, tabindex: "-1" }, this.renderedList), index.h("div", { class: {
|
|
925
|
+
return (index.h(index.Host, null, index.h("slot", { name: "default" }), index.h("div", { class: "dummy", ref: (el) => (this._dummyElement = el) }), index.h("dialog", { tabindex: "-1", ref: (el) => (this._dialog = el), class: { mobile: this._isMobile }, onCancel: () => this.close() }, index.h("div", { onClick: (event) => event.stopPropagation() }, index.h("div", { id: 'announce-' + this.hostId, class: "visuallyhidden", "aria-live": "polite", "aria-atomic": "true" }, this.statusText), index.h("div", { class: "input-top-wrapper" }, index.h("slot", { name: "input-top" })), index.h("ul", { ref: (el) => (this._list = el), id: `${this.hostId}--results`, role: "listbox", "aria-expanded": this.isOpen.toString(), class: { active: this.isOpen, mobile: this._isMobile }, tabindex: "-1" }, this.renderedList), index.h("div", { class: {
|
|
926
|
+
active: this._openedOnTop,
|
|
927
|
+
'input-bottom-wrapper': true,
|
|
928
|
+
} }, index.h("slot", { name: "input-bottom" }))))));
|
|
919
929
|
}
|
|
920
930
|
get el() { return index.getElement(this); }
|
|
921
931
|
static get watchers() { return {
|
|
@@ -1796,6 +1806,8 @@ const CSelect = class {
|
|
|
1796
1806
|
this._dropdownElement.updateList();
|
|
1797
1807
|
};
|
|
1798
1808
|
this._onInputFocus = () => {
|
|
1809
|
+
if (this.disabled)
|
|
1810
|
+
return;
|
|
1799
1811
|
if (!this._preventDialogOpen) {
|
|
1800
1812
|
this._dropdownElement.open();
|
|
1801
1813
|
}
|
|
@@ -1856,6 +1868,8 @@ const CSelect = class {
|
|
|
1856
1868
|
}
|
|
1857
1869
|
handleKeyDown(event) {
|
|
1858
1870
|
const alphanumeric = /^[0-9a-zA-Z ]+$/;
|
|
1871
|
+
if (this.disabled)
|
|
1872
|
+
return;
|
|
1859
1873
|
if (event.key.match(alphanumeric) && event.key.length === 1) {
|
|
1860
1874
|
if (this.dropdownVisible)
|
|
1861
1875
|
return;
|
|
@@ -2012,18 +2026,18 @@ const CSelect = class {
|
|
|
2012
2026
|
'c-input-menu__chevron': true,
|
|
2013
2027
|
'c-input-menu__chevron--active': this.dropdownVisible,
|
|
2014
2028
|
};
|
|
2015
|
-
return (index.h("c-icon-button", { size: "x-small", class: classes, text: true, onClick: (event) => this._toggleDropdown(event), onKeyDown: (event) => this._onButtonKeyDown('chevron', event) }, index.h("c-icon", { path: mdi.mdiChevronDown, size: 24 })));
|
|
2029
|
+
return (index.h("c-icon-button", { size: "x-small", class: classes, disabled: this.disabled, text: true, onClick: (event) => this._toggleDropdown(event), onKeyDown: (event) => this._onButtonKeyDown('chevron', event) }, index.h("c-icon", { path: mdi.mdiChevronDown, size: 24 })));
|
|
2016
2030
|
}
|
|
2017
2031
|
_renderInputElement() {
|
|
2018
2032
|
var _a;
|
|
2019
|
-
return (index.h("div", { class: "c-input-menu__input" }, index.h("input", { type: "text", readonly: true, ref: (el) => (this._inputElement = el), "aria-expanded": this.dropdownVisible.toString(), "aria-owns": this._inputId + '-items', "aria-autocomplete": "list", autocomplete: "off", class: "c-input__input", role: "combobox", value: this._value, name: (_a = this.name) !== null && _a !== void 0 ? _a : null, onInput: () => this._updateInput(), onFocus: () => this._onInputFocus() }), index.h("div", { ref: (el) => (this._selectionElement = el), class: "c-input-menu__selection" })));
|
|
2033
|
+
return (index.h("div", { class: "c-input-menu__input" }, index.h("input", { type: "text", readonly: true, ref: (el) => (this._inputElement = el), "aria-expanded": this.dropdownVisible.toString(), "aria-owns": this._inputId + '-items', "aria-autocomplete": "list", autocomplete: "off", class: "c-input__input", role: "combobox", value: this._value, name: (_a = this.name) !== null && _a !== void 0 ? _a : null, disabled: this.disabled, onInput: () => this._updateInput(), onFocus: () => this._onInputFocus() }), index.h("div", { ref: (el) => (this._selectionElement = el), class: "c-input-menu__selection" })));
|
|
2020
2034
|
}
|
|
2021
2035
|
_renderReset() {
|
|
2022
|
-
return (index.h("c-icon-button", { "aria-label": "", size: "x-small", text: true, onClick: (event) => this._onReset(event), onKeyDown: (event) => this._onButtonKeyDown('reset', event) }, index.h("c-icon", { path: mdi.mdiClose, size: 20 })));
|
|
2036
|
+
return (index.h("c-icon-button", { "aria-label": "", size: "x-small", disabled: this.disabled, text: true, onClick: (event) => this._onReset(event), onKeyDown: (event) => this._onButtonKeyDown('reset', event) }, index.h("c-icon", { path: mdi.mdiClose, size: 20 })));
|
|
2023
2037
|
}
|
|
2024
2038
|
render() {
|
|
2025
2039
|
const itemType = this.optionElementsExist ? 'option' : 'item';
|
|
2026
|
-
return (index.h(index.Host, null, index.h("c-dropdown", { ref: (el) => (this._dropdownElement = el), id: `${this._id}-dropdown`, index: this.currentIndex, "items-per-page": this.itemsPerPage, "item-type": itemType, items: this._items, parent: this.el, type: "select" }, index.h("c-input", { slot: "default", ref: (el) => (this._cInputElement = el), active: this.dropdownVisible, disabled: this.disabled, "hide-details": this.hideDetails, hint: this.hint, id: this.hostId, "input-id": this._inputId, label: this.label, name: this.name, placeholder: this.placeholder, required: this.required, shadow: this.shadow, valid: this.valid, validate: this.validate, "validate-on-blur": this.validateOnBlur, validation: this.validation, value: this.value, variant: "select", onClick: () => this._dropdownElement.open() }, index.h("slot", { name: "pre", slot: "pre" }), index.h("div", { class: "c-input__content" }, this._renderInputElement(), this.loading && this._renderLoader(), !this.loading &&
|
|
2040
|
+
return (index.h(index.Host, null, index.h("c-dropdown", { ref: (el) => (this._dropdownElement = el), id: `${this._id}-dropdown`, index: this.currentIndex, "items-per-page": this.itemsPerPage, "item-type": itemType, items: this._items, parent: this.el, type: "select" }, index.h("c-input", { slot: "default", ref: (el) => (this._cInputElement = el), active: this.dropdownVisible, disabled: this.disabled, "hide-details": this.hideDetails, hint: this.hint, id: this.hostId, "input-id": this._inputId, label: this.label, name: this.name, placeholder: this.placeholder, required: this.required, shadow: this.shadow, valid: this.valid, validate: this.validate, "validate-on-blur": this.validateOnBlur, validation: this.validation, value: this.value, variant: "select", onClick: () => !this.disabled && this._dropdownElement.open() }, index.h("slot", { name: "pre", slot: "pre" }), index.h("div", { class: "c-input__content" }, this._renderInputElement(), this.loading && this._renderLoader(), !this.loading &&
|
|
2027
2041
|
this.value &&
|
|
2028
2042
|
this.clearable &&
|
|
2029
2043
|
this._renderReset(), !this.loading &&
|