@cscfi/csc-ui 3.0.6 → 3.0.7
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-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/c-alert.cjs.entry.js +1 -1
- package/dist/cjs/c-autocomplete_35.cjs.entry.js +74 -59
- package/dist/cjs/c-autocomplete_35.cjs.entry.js.map +1 -1
- package/dist/cjs/c-data-table.cjs.entry.js +1 -1
- package/dist/cjs/c-menu_2.cjs.entry.js +1 -1
- package/dist/cjs/c-pagination.cjs.entry.js +1 -1
- package/dist/cjs/c-swiper.cjs.entry.js +1 -1
- package/dist/cjs/c-tabs.cjs.entry.js +1 -1
- package/dist/cjs/c-tag.cjs.entry.js +1 -1
- package/dist/cjs/c-toast.cjs.entry.js +1 -1
- package/dist/cjs/{mdi-B0wGnmrp.js → mdi-D4fs5l1W.js} +4 -2
- package/dist/cjs/{mdi-B0wGnmrp.js.map → mdi-D4fs5l1W.js.map} +1 -1
- package/dist/collection/components/c-dropdown/c-dropdown.css +1 -0
- package/dist/collection/components/c-dropdown/c-dropdown.js +15 -8
- package/dist/collection/components/c-dropdown/c-dropdown.js.map +1 -1
- package/dist/collection/components/c-input/c-input.js +16 -14
- package/dist/collection/components/c-input/c-input.js.map +1 -1
- package/dist/collection/components/c-select/c-select.js +48 -38
- package/dist/collection/components/c-select/c-select.js.map +1 -1
- package/dist/components/c-accordion-item.js +1 -1
- package/dist/components/c-alert.js +1 -1
- package/dist/components/c-autocomplete.js +4 -4
- package/dist/components/c-card.js +1 -1
- package/dist/components/c-checkbox.js +1 -1
- package/dist/components/c-data-table.js +5 -5
- package/dist/components/c-dropdown.js +1 -1
- package/dist/components/c-input.js +1 -1
- package/dist/components/c-menu.js +1 -1
- package/dist/components/c-message.js +1 -1
- package/dist/components/c-navigation-button.js +1 -1
- package/dist/components/c-otp-input.js +1 -1
- package/dist/components/c-pagination.js +1 -1
- package/dist/components/c-radio-group.js +1 -1
- package/dist/components/c-select.js +52 -42
- package/dist/components/c-select.js.map +1 -1
- package/dist/components/c-side-navigation-item.js +1 -1
- package/dist/components/c-side-navigation.js +1 -1
- package/dist/components/c-swiper.js +1 -1
- package/dist/components/c-tabs.js +1 -1
- package/dist/components/c-tag.js +1 -1
- package/dist/components/c-text-field.js +3 -3
- package/dist/components/c-toast.js +1 -1
- package/dist/components/c-toasts.js +1 -1
- package/dist/components/{p-B1qgNVwl.js → p-B35LU226.js} +19 -17
- package/dist/components/p-B35LU226.js.map +1 -0
- package/dist/components/{p-D8otgxt3.js → p-BDgw4nNJ.js} +3 -3
- package/dist/components/{p-D8otgxt3.js.map → p-BDgw4nNJ.js.map} +1 -1
- package/dist/components/{p-VXxIMujl.js → p-BOTLtsJq.js} +4 -4
- package/dist/components/{p-VXxIMujl.js.map → p-BOTLtsJq.js.map} +1 -1
- package/dist/components/{p-CxpHiGGi.js → p-BXdlsUoI.js} +3 -3
- package/dist/components/{p-CxpHiGGi.js.map → p-BXdlsUoI.js.map} +1 -1
- package/dist/components/{p-DIfvdGsO.js → p-Bd7jq7MS.js} +4 -3
- package/dist/components/p-Bd7jq7MS.js.map +1 -0
- package/dist/components/{p-BrYqG6_f.js → p-CBoo96IR.js} +3 -3
- package/dist/components/{p-BrYqG6_f.js.map → p-CBoo96IR.js.map} +1 -1
- package/dist/components/{p-CFPfmHLA.js → p-CoxL9G3v.js} +12 -9
- package/dist/components/p-CoxL9G3v.js.map +1 -0
- package/dist/components/{p-BoFU7Vlp.js → p-lKEVcO51.js} +3 -3
- package/dist/components/{p-BoFU7Vlp.js.map → p-lKEVcO51.js.map} +1 -1
- package/dist/csc-ui/csc-ui.esm.js +1 -1
- package/dist/csc-ui/{p-8ac910a3.entry.js → p-0b56450b.entry.js} +2 -2
- package/dist/csc-ui/{p-c1637cf7.entry.js → p-0e4d4890.entry.js} +2 -2
- package/dist/csc-ui/{p-cb8d7a64.entry.js → p-32a6793a.entry.js} +2 -2
- package/dist/csc-ui/{p-8ced935d.entry.js → p-3ab98b9a.entry.js} +2 -2
- package/dist/csc-ui/{p-7fabdc70.entry.js → p-516daf81.entry.js} +2 -2
- package/dist/csc-ui/p-570778d1.entry.js +2 -0
- package/dist/csc-ui/p-570778d1.entry.js.map +1 -0
- package/dist/csc-ui/{p-7a4dc6da.entry.js → p-74dfa0e1.entry.js} +2 -2
- package/dist/csc-ui/{p-caad0875.entry.js → p-781cde9c.entry.js} +2 -2
- package/dist/csc-ui/{p-3446156f.entry.js → p-82038174.entry.js} +2 -2
- package/dist/csc-ui/{p-ZMPD5OFO.js → p-Cb-CImk5.js} +2 -2
- package/dist/csc-ui/{p-ZMPD5OFO.js.map → p-Cb-CImk5.js.map} +1 -1
- package/dist/csc-ui/{p-c24eb0d4.entry.js → p-c39a0b0e.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_35.entry.js +74 -59
- package/dist/esm/c-autocomplete_35.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/{mdi-ZMPD5OFO.js → mdi-Cb-CImk5.js} +4 -3
- package/dist/esm/{mdi-ZMPD5OFO.js.map → mdi-Cb-CImk5.js.map} +1 -1
- package/dist/styles/css/c-data-table.css +10 -0
- package/dist/styles/css/typography.css +10 -0
- package/dist/styles/scss/_c-data-table.scss +7 -0
- package/dist/styles/scss/_typography.scss +7 -0
- package/dist/styles/variables.css +111 -0
- package/dist/styles/variables.scss +108 -0
- package/dist/types/components/c-dropdown/c-dropdown.d.ts +1 -1
- package/dist/types/components/c-select/c-select.d.ts +2 -2
- package/dist/types/components.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/p-B1qgNVwl.js.map +0 -1
- package/dist/components/p-CFPfmHLA.js.map +0 -1
- package/dist/components/p-DIfvdGsO.js.map +0 -1
- package/dist/csc-ui/p-357e261b.entry.js +0 -2
- package/dist/csc-ui/p-357e261b.entry.js.map +0 -1
- /package/dist/csc-ui/{p-8ac910a3.entry.js.map → p-0b56450b.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-c1637cf7.entry.js.map → p-0e4d4890.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-cb8d7a64.entry.js.map → p-32a6793a.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-8ced935d.entry.js.map → p-3ab98b9a.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-7fabdc70.entry.js.map → p-516daf81.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-7a4dc6da.entry.js.map → p-74dfa0e1.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-caad0875.entry.js.map → p-781cde9c.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-3446156f.entry.js.map → p-82038174.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-c24eb0d4.entry.js.map → p-c39a0b0e.entry.js.map} +0 -0
- /package/dist/types/{home/runner/work/ui → Users/veriksso/Documents/code}/ui/packages/csc-ui/.stencil/playwright.config.d.ts +0 -0
- /package/dist/types/{home/runner/work/ui → Users/veriksso/Documents/code}/ui/packages/csc-ui/.stencil/stencil.config.d.ts +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r,h as e,H as t}from"./p-gSzSMY-c.js";import{a,b as c,c as o,d as l}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r,h as e,H as t}from"./p-gSzSMY-c.js";import{a,b as c,c as o,d as l}from"./p-Cb-CImk5.js";const s="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}.c-alert{--c-alert-color:var(--c-primary-600);display:grid;gap:16px;grid-template-columns:1fr;color:var(--c-alert-color);border:2px solid currentColor;border-left-width:12px;border-radius:6px;padding:12px}.c-alert--info,.c-alert--error,.c-alert--success,.c-alert--warning{grid-template-columns:auto 1fr}.c-alert--info{--c-alert-color:var(--c-info-600)}.c-alert--error{--c-alert-color:var(--c-error-600)}.c-alert--success{--c-alert-color:var(--c-success-600)}.c-alert--warning{--c-alert-color:var(--c-warning-600)}.c-alert__content{color:rgba(0, 0, 0, 0.87);display:grid;align-items:center;grid-template-columns:1fr;gap:8px}svg{fill:currentColor}::slotted(*[slot=title]){margin:0 !important;font-size:18px;font-weight:600;line-height:24px}";const i=class{constructor(e){r(this,e);this._icons={warning:l,error:o,success:c,info:a}}render(){const r=Object.assign({"c-alert":true},!!this.type&&{[`c-alert--${this.type}`]:true});return e(t,{key:"0482a87b1be3c3f0f1bf4947d66156ea05804b1b"},e("div",{key:"f8c1fe4db0759447256e4179db6174476b18551f",class:r},!!this.type&&e("svg",{key:"1a2d83007ebc97ca6e3e49055065ce7af705b588",width:"22",height:"22",viewBox:"0 0 24 24"},e("path",{key:"a1ea5ec0302045d8d0833bc0dc1b740d0340d0f4",d:this._icons[this.type]})),e("div",{key:"d5722cc91b636efc9fe166fd41d29bcc6f1344cb",class:"c-alert__content"},e("slot",{key:"f9fda967fe8adb0941bb22da2b29a5bcde77d295",name:"title"}),e("slot",{key:"9126d2483523abb7fe665dedabedb66a1865aa8d"}))))}};i.style=s;export{i as c_alert};
|
|
2
|
+
//# sourceMappingURL=p-c39a0b0e.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-gSzSMY-c.js';
|
|
2
|
-
import { m as mdiChevronRight } from './mdi-
|
|
2
|
+
import { m as mdiChevronRight } from './mdi-Cb-CImk5.js';
|
|
3
3
|
|
|
4
4
|
const cAccordionItemCss = "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-accordion-item-header-background-color:var(--c-accordion-item-header-background-color, var(--c-primary-200));--_c-accordion-item-outline-color:var(--c-accordion-item-outline-color, var(--c-primary-600));--_c-accordion-item-text-color:var(--c-accordion-item-text-color, var(--c-primary-600));max-width:100%}:host summary::-webkit-details-marker{display:none}.c-accordion-item{--_c-accordion-item-indicator-rotation:rotate(-90deg);--_c-accordion-item-content-height:0;--_c-accordion-item-min-height:46px;--_c-accordion-item-border-radius:6px;--_c-accordion-item-padding:12px;--_c-accordion-item-overflow:visible;--_c-accordion-item-outline-color-offset:2px;display:block;overflow:var(--_c-accordion-item-overflow)}.c-accordion-item--expanding{--_c-accordion-item-overflow:hidden !important;--_c-accordion-item-outline-color:transparent}.c-accordion-item--expanded{--_c-accordion-item-content-height:auto;--_c-accordion-item-indicator-rotation:rotate(90deg);--_c-accordion-item-overflow:visible}.c-accordion-item--outlined{box-shadow:inset 0 0 0 2px var(--_c-accordion-item-header-background-color);border-radius:var(--_c-accordion-item-border-radius)}.c-accordion-item__header{min-height:var(--_c-accordion-item-min-height);user-select:none;background-color:var(--_c-accordion-item-header-background-color);display:grid;column-gap:8px;align-items:center;padding:0 var(--_c-accordion-item-padding);border-radius:var(--_c-accordion-item-border-radius);cursor:pointer;grid-template-columns:1fr auto;border:none;text-align:left;margin:0;font-family:var(--c-font-family);position:relative}.c-accordion-item__header--has-icon{grid-template-columns:auto 1fr auto}.c-accordion-item__header--expanded{cursor:default}.c-accordion-item__header--expanded.c-accordion-item__header--collapsable{cursor:pointer}.c-accordion-item__header:focus{outline:2px var(--_c-accordion-item-outline-color) solid;outline-offset:var(--_c-accordion-item-outline-color-offset)}@supports selector(:focus-visible){.c-accordion-item__header:focus{outline:none}}.c-accordion-item__header:focus-visible{outline:2px var(--_c-accordion-item-outline-color) solid;outline-offset:var(--_c-accordion-item-outline-color-offset)}.c-accordion-item__title{margin-top:0;margin-bottom:0;font-weight:500;font-size:16px;line-height:1;color:var(--_c-accordion-item-text-color)}.c-accordion-item__content{padding:16px}.c-accordion-item__content-wrapper{overflow:visible}.c-accordion-item__icon{height:24px;font-size:24px;color:var(--_c-accordion-item-text-color);display:flex;align-items:center}.c-accordion-item__icon>*{height:24px;display:flex;align-items:center}.c-accordion-item__indicator{display:flex;align-items:center;color:var(--_c-accordion-item-text-color);justify-self:end}.c-accordion-item__indicator c-icon{width:24px;height:24px !important;transform:var(--_c-accordion-item-indicator-rotation);transition:transform 0.3s ease}";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-gSzSMY-c.js';
|
|
2
|
-
import { a as mdiInformation, b as mdiCheckCircle, c as mdiCloseCircle, d as mdiAlert } from './mdi-
|
|
2
|
+
import { a as mdiInformation, b as mdiCheckCircle, c as mdiCloseCircle, d as mdiAlert } from './mdi-Cb-CImk5.js';
|
|
3
3
|
|
|
4
4
|
const cAlertCss = "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}.c-alert{--c-alert-color:var(--c-primary-600);display:grid;gap:16px;grid-template-columns:1fr;color:var(--c-alert-color);border:2px solid currentColor;border-left-width:12px;border-radius:6px;padding:12px}.c-alert--info,.c-alert--error,.c-alert--success,.c-alert--warning{grid-template-columns:auto 1fr}.c-alert--info{--c-alert-color:var(--c-info-600)}.c-alert--error{--c-alert-color:var(--c-error-600)}.c-alert--success{--c-alert-color:var(--c-success-600)}.c-alert--warning{--c-alert-color:var(--c-warning-600)}.c-alert__content{color:rgba(0, 0, 0, 0.87);display:grid;align-items:center;grid-template-columns:1fr;gap:8px}svg{fill:currentColor}::slotted(*[slot=title]){margin:0 !important;font-size:18px;font-weight:600;line-height:24px}";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-gSzSMY-c.js';
|
|
2
|
-
import { e as mdiChevronDown, l as mdiClose, o as mdiFullscreenExit, p as mdiFullscreen, a as mdiInformation, d as mdiAlert, c as mdiCloseCircle,
|
|
2
|
+
import { e as mdiChevronDown, l as mdiClose, o as mdiFullscreenExit, p as mdiFullscreen, a as mdiInformation, d as mdiAlert, q as mdiCheck, c as mdiCloseCircle, r as mdiMenu, k as mdiArrowRight, m as mdiChevronRight, s as mdiEye, t as mdiEyeOff, u as mdiCalendar } from './mdi-Cb-CImk5.js';
|
|
3
3
|
|
|
4
4
|
const cAutocompleteCss = "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-autocomplete){--_c-autocomplete-option-background-color:var(\n --c-autocomplete-option-background-color,\n var(--c-white)\n );--_c-autocomplete-option-background-hover-color:var(\n --c-autocomplete-option-background-hover-color,\n var(--c-primary-100)\n );--_c-autocomplete-active-color:var(\n --c-autocomplete-active-color,\n var(--c-primary-600)\n );--_c-autocomplete-inactive-color:var(\n --c-autocomplete-inactive-color,\n var(--c-tertiary-600)\n );--_c-autocomplete-background-color:var(\n --c-autocomplete-background-color,\n var(--c-transparent)\n );--_c-autocomplete-text-color:var(\n --c-autocomplete-text-color,\n var(--c-text-body)\n );--_c-autocomplete-option-text-color:var(\n --c-autocomplete-option-text-color,\n var(--c-text-body)\n );--_c-autocomplete-placeholder-color:var(\n --c-autocomplete-placeholder-color,\n var(--c-tertiary-500)\n );--c-select-option-background-color:var(\n --_c-autocomplete-option-background-color\n );--c-select-option-background-color-hover:var(\n --_c-autocomplete-option-background-hover-color\n );--c-select-option-text-color:var(--_c-autocomplete-option-text-color);--_c-input-active-color:var(--_c-autocomplete-active-color);--_c-input-inactive-color:var(--_c-autocomplete-inactive-color);--_c-input-background-color:var(--_c-autocomplete-background-color);--_c-input-text-color:var(--_c-autocomplete-text-color);--_c-input-placeholder-color:var(--_c-autocomplete-placeholder-color)}:host{display:block;cursor:text}.c-input-menu__chevron{fill:currentColor;transform:rotate(0deg);transition:transform 0.3s ease-in-out}.c-input-menu__chevron--active{transform:rotate(180deg)}.c-input-menu__input{width:100%;display:flex;justify-items:stretch}.c-input-menu__selection{display:none;pointer-events:none}.c-input-menu__selection--show{align-items:center;display:flex;width:100%;color:var(--_c-select-active-color)}.c-input-menu__item-wrapper{position:absolute;width:100%;top:44px;z-index:10;margin-left:calc(var(--_c-input-label-position) * -1)}.c-input-menu__item-wrapper--shadow{top:47px}.c-input-menu__items{position:absolute;background-color:var(--_c-select-option-background-color);min-width:calc(100% + 24px);box-shadow:0 8px 16px 0 rgba(0, 0, 0, 0.2);z-index:10;user-select:none;border-radius:4px;margin:0 -12px;overflow-y:scroll;list-style:none;padding:0}.c-input-menu__items--hidden{display:none}.c-input-menu__items li{cursor:pointer;display:flex;min-height:48px;padding:0 12px;transition:background-color 0.3s;font-size:14px;align-items:center;justify-content:flex-start;color:var(--_c-select-option-text-color)}.c-input-menu__items li.disabled{background-color:var(--c-tertiary-100);filter:grayscale(1) opacity(0.6);cursor:default}.c-input-menu__items li.disabled:hover{background-color:var(--c-tertiary-100)}.c-input-menu__items li.dense{padding:10px 14px}.c-input-menu__items li:hover{background-color:var(--_c-select-option-background-color-hover)}.c-input-menu__items li[aria-selected=true]{background-color:var(--_c-select-option-background-color-hover);box-shadow:inset 0 0 0 1px var(--_c-select-active-color);border-radius:4px;backface-visibility:hidden;transform:translate3d(0, 0, 0)}.c-input-menu__items li.none{color:rgba(0, 0, 0, 0.5)}.c-input-menu__items--empty li{color:var(--c-text-system);cursor:default;gap:8px;pointer-events:none}.c-input-menu__items--empty li svg{fill:var(--c-warning-600);height:18px;width:18px}input{max-height:32px;padding:8px 0;background-color:transparent;border:none;color:var(--c-text-body);flex:1 1 auto;font-family:var(--c-font-family);font-size:16px;line-height:20px;max-width:100%;min-width:0;width:100%;pointer-events:none}input:focus,input:active{outline:none}input::-ms-reveal{display:none}svg{fill:currentColor;height:22px;width:22px}.c-input--disabled{color:var(--c-tertiary-400)}.c-input:focus-within{color:var(--c-primary-600)}.c-input--error{color:var(--c-error-600)}.c-input--error:focus-within{color:var(--c-error-600)}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";
|
|
5
5
|
|
|
@@ -653,7 +653,7 @@ const CCscLogo = class {
|
|
|
653
653
|
};
|
|
654
654
|
CCscLogo.style = cCscLogoCss;
|
|
655
655
|
|
|
656
|
-
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)}}";
|
|
656
|
+
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;user-select:none}: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)}}";
|
|
657
657
|
|
|
658
658
|
const CDropdown = class {
|
|
659
659
|
constructor(hostRef) {
|
|
@@ -777,7 +777,10 @@ const CDropdown = class {
|
|
|
777
777
|
this._listItems[index].click();
|
|
778
778
|
return false;
|
|
779
779
|
}
|
|
780
|
-
async updateList() {
|
|
780
|
+
async updateList(reset = false) {
|
|
781
|
+
if (reset) {
|
|
782
|
+
this.index = 0;
|
|
783
|
+
}
|
|
781
784
|
requestAnimationFrame(() => {
|
|
782
785
|
this.renderedList = this._renderList();
|
|
783
786
|
});
|
|
@@ -891,13 +894,13 @@ const CDropdown = class {
|
|
|
891
894
|
return this._minimumQueryItem() || this._emptyItem();
|
|
892
895
|
this._listItems.length = 0;
|
|
893
896
|
return this.items.map((item, index) => {
|
|
894
|
-
return (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).toString(), "aria-selected": (this.index === index).toString(), class: { disabled: !!item.disabled }, "data-name": item.name, onClick: (event) => {
|
|
897
|
+
return (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).toString(), "aria-selected": (this.index === index).toString(), class: { disabled: !!item.disabled }, title: item.name, "data-name": item.name, onClick: (event) => {
|
|
895
898
|
if (item.disabled) {
|
|
896
899
|
event.preventDefault();
|
|
897
900
|
return;
|
|
898
901
|
}
|
|
899
902
|
this.selectOption.emit({ name: item.name, value: item.value });
|
|
900
|
-
} }, h("span", { innerHTML: this._highlightMatchingText(item.name) })));
|
|
903
|
+
} }, this.index === index && h("c-icon", { path: mdiCheck, size: 16 }), h("span", { innerHTML: this._highlightMatchingText(item.name) })));
|
|
901
904
|
});
|
|
902
905
|
}
|
|
903
906
|
_updateStatusText() {
|
|
@@ -936,10 +939,10 @@ const CDropdown = class {
|
|
|
936
939
|
this._dialog.style.maxHeight = 42 * (this.itemsPerPage + 0.5) + 60 + 'px';
|
|
937
940
|
this._list.style.maxHeight = 42 * (this.itemsPerPage + 0.5) + 'px';
|
|
938
941
|
}
|
|
939
|
-
return (h(Host, { key: '
|
|
942
|
+
return (h(Host, { key: '9626a417ef7375c09c479b8d7a8582699f55f99a' }, h("slot", { key: '763d1d7de568d08ad06c61bacf50343b6759b6dc', name: "default" }), h("div", { key: 'dc43133ef487b264168a8aec45b5c7a71af0e724', class: "dummy", ref: (el) => (this._dummyElement = el) }), h("dialog", { key: '2b747ce78f1f9f65c36c795d1b358f38d73d61ac', tabindex: "-1", ref: (el) => (this._dialog = el), class: { mobile: this._isMobile }, onCancel: () => this.close() }, h("div", { key: 'be33ff41592f12f2b0f8629e06a468c61517e507', onClick: (event) => event.stopPropagation() }, h("div", { key: 'e5c8b93bef47c86533a57d0ec3a11ed1c39b12fb', id: 'announce-' + this.hostId, class: "visuallyhidden", "aria-live": "polite", "aria-atomic": "true" }, this.statusText), h("div", { key: '208c6563bb5ad17be69e6c2c714ebbe8d96ac682', class: "input-top-wrapper" }, h("slot", { key: '375b09b9e3ad056e3c3dd7c827589cc8f65646aa', name: "input-top" })), h("ul", { key: 'bee7e9068835c19f3dfd473c33a067f8158ddd1b', 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), h("div", { key: '5f461bdc800b288ef9493620f68b3987015e6550', class: {
|
|
940
943
|
active: this._openedOnTop,
|
|
941
944
|
'input-bottom-wrapper': true,
|
|
942
|
-
} }, h("slot", { key: '
|
|
945
|
+
} }, h("slot", { key: 'af142cb1f976dcc6b80038f91df315b361ceaafb', name: "input-bottom" }))))));
|
|
943
946
|
}
|
|
944
947
|
get el() { return getElement(this); }
|
|
945
948
|
static get watchers() { return {
|
|
@@ -1062,7 +1065,7 @@ const CInput = class {
|
|
|
1062
1065
|
this.isFocused = false;
|
|
1063
1066
|
this._hasBlurred = true;
|
|
1064
1067
|
this._onReset();
|
|
1065
|
-
},
|
|
1068
|
+
}, 200);
|
|
1066
1069
|
};
|
|
1067
1070
|
this._onFocus = (click = true) => {
|
|
1068
1071
|
var _a, _b;
|
|
@@ -1158,18 +1161,20 @@ const CInput = class {
|
|
|
1158
1161
|
this.preSlotWidth = this.inputField.offsetLeft;
|
|
1159
1162
|
}
|
|
1160
1163
|
_onReset() {
|
|
1161
|
-
|
|
1162
|
-
if (
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1164
|
+
requestAnimationFrame(() => {
|
|
1165
|
+
if (this.inputField) {
|
|
1166
|
+
if (!!this.placeholder &&
|
|
1167
|
+
!this.value &&
|
|
1168
|
+
(this.active || this.isFocused)) {
|
|
1169
|
+
this.inputField.placeholder = this.placeholder;
|
|
1170
|
+
return;
|
|
1171
|
+
}
|
|
1172
|
+
this.inputField.placeholder =
|
|
1173
|
+
!this.label && !this.value && !!this.placeholder
|
|
1174
|
+
? this.placeholder
|
|
1175
|
+
: '';
|
|
1167
1176
|
}
|
|
1168
|
-
|
|
1169
|
-
!this.label && !this.value && !!this.placeholder
|
|
1170
|
-
? this.placeholder
|
|
1171
|
-
: '';
|
|
1172
|
-
}
|
|
1177
|
+
});
|
|
1173
1178
|
}
|
|
1174
1179
|
_preventNonNumericalInput(event) {
|
|
1175
1180
|
if (this.type !== 'number')
|
|
@@ -1221,9 +1226,9 @@ const CInput = class {
|
|
|
1221
1226
|
filled: !!this.value,
|
|
1222
1227
|
[`c-input--${this.variant}`]: true,
|
|
1223
1228
|
};
|
|
1224
|
-
return (h(Host, { key: '
|
|
1229
|
+
return (h(Host, { key: 'e4e694bc08b5d1e2dd9e9937af19066aeaefe621', disabled: this.disabled }, h("div", { key: '7c29907a19f6d73399c2eb73adb0000283d1df24', id: 'announce-' + this.inputId, class: "visuallyhidden", "aria-live": "polite", "aria-atomic": "true" }, this.statusText), h("div", { key: '3d9325fb36097ab45c4c30d60fc133fbebe29feb', class: containerClasses }, h("div", { key: '894938c7069065b62e56f237c4a447e33164cebb', class: "c-input__control" }, h("div", { key: '2e6c6fd245901d3b1dcae81a22d4d2dee36ceabb', class: "c-input__slot", onClick: () => this._onFocus() }, this._renderBorders(), h("div", { key: 'a7ed3fb6447a274081fe57d6fcd6640207890ded', class: "c-input__field", style: {
|
|
1225
1230
|
'--_c-input-label-position': this.preSlotWidth + 'px',
|
|
1226
|
-
} }, h("slot", { key: '
|
|
1231
|
+
} }, h("slot", { key: '225fa7302d4a602641a139e79f983c0b7868897d', name: "pre" }), this._renderLabel(), h("slot", { key: '82039928b3c00b0e7429c3cb1cf6d0d491a07665' }))), this.variant === 'select' && h("slot", { key: '07a411d9a0ecf07dc6053c0b37a55746ff9bd537', name: "dropdown" }), !this.hideDetails && (h("c-message", { key: '2693ada0ddea0eba69789ebf7956b5c78c19b0d4', hint: this.hint, inputId: this.inputId, valid: this.valid, validation: this.validation }))))));
|
|
1227
1232
|
}
|
|
1228
1233
|
get el() { return getElement(this); }
|
|
1229
1234
|
static get watchers() { return {
|
|
@@ -1754,7 +1759,6 @@ const CSelect = class {
|
|
|
1754
1759
|
this.dropdownVisible = false;
|
|
1755
1760
|
this.statusText = '';
|
|
1756
1761
|
this.optionElementsExist = false;
|
|
1757
|
-
this._preventDialogOpen = false;
|
|
1758
1762
|
this._debounce = null;
|
|
1759
1763
|
this._lastKeyPressTime = null;
|
|
1760
1764
|
this._searchString = '';
|
|
@@ -1777,7 +1781,6 @@ const CSelect = class {
|
|
|
1777
1781
|
return;
|
|
1778
1782
|
}
|
|
1779
1783
|
this._onReset(event);
|
|
1780
|
-
this._preventDialogOpen = true;
|
|
1781
1784
|
requestAnimationFrame(() => {
|
|
1782
1785
|
this._inputElement.focus();
|
|
1783
1786
|
});
|
|
@@ -1801,21 +1804,17 @@ const CSelect = class {
|
|
|
1801
1804
|
event.stopPropagation();
|
|
1802
1805
|
this.changeValue.emit(null);
|
|
1803
1806
|
this.internals.setFormValue(null);
|
|
1807
|
+
this.currentIndex = null;
|
|
1804
1808
|
this._selectionElement.classList.remove('c-input-menu__selection--show');
|
|
1805
1809
|
this._selectionElement.replaceChildren(null);
|
|
1806
|
-
this._preventDialogOpen = true;
|
|
1807
1810
|
this._cInputElement.reset();
|
|
1808
1811
|
this._inputElement.focus();
|
|
1809
|
-
this._dropdownElement.updateList();
|
|
1812
|
+
this._dropdownElement.updateList(true);
|
|
1810
1813
|
};
|
|
1811
1814
|
this._onInputFocus = () => {
|
|
1812
1815
|
if (this.disabled)
|
|
1813
1816
|
return;
|
|
1814
|
-
if (!this._preventDialogOpen) {
|
|
1815
|
-
this._dropdownElement.open();
|
|
1816
|
-
}
|
|
1817
1817
|
this._updateStatusText();
|
|
1818
|
-
this._preventDialogOpen = false;
|
|
1819
1818
|
};
|
|
1820
1819
|
}
|
|
1821
1820
|
get _id() {
|
|
@@ -1842,7 +1841,7 @@ const CSelect = class {
|
|
|
1842
1841
|
async reset() {
|
|
1843
1842
|
this.changeValue.emit(null);
|
|
1844
1843
|
this.internals.setFormValue(null);
|
|
1845
|
-
this._dropdownElement.updateList();
|
|
1844
|
+
this._dropdownElement.updateList(true);
|
|
1846
1845
|
}
|
|
1847
1846
|
handleKeyDown(event) {
|
|
1848
1847
|
var _a, _b, _c;
|
|
@@ -1850,26 +1849,28 @@ const CSelect = class {
|
|
|
1850
1849
|
if (this.disabled)
|
|
1851
1850
|
return;
|
|
1852
1851
|
if (event.key.match(alphanumeric) && event.key.length === 1) {
|
|
1853
|
-
if (this.dropdownVisible)
|
|
1854
|
-
|
|
1855
|
-
if (Date.now() - this._lastKeyPressTime > 3000) {
|
|
1856
|
-
this._searchString = event.key;
|
|
1857
|
-
}
|
|
1858
|
-
else {
|
|
1859
|
-
this._searchString += event.key;
|
|
1860
|
-
}
|
|
1861
|
-
this._lastKeyPressTime = Date.now();
|
|
1862
|
-
const selectionIndex = Array.from(this._items).findIndex((i) => i.name.toLowerCase().startsWith(this._searchString));
|
|
1863
|
-
this.currentIndex = selectionIndex >= 0 ? selectionIndex : null;
|
|
1864
|
-
if (this.currentIndex !== null) {
|
|
1865
|
-
this._dropdownElement.selectItem(this.currentIndex);
|
|
1852
|
+
if (!this.dropdownVisible) {
|
|
1853
|
+
this._dropdownElement.open();
|
|
1866
1854
|
}
|
|
1867
|
-
|
|
1855
|
+
requestAnimationFrame(() => {
|
|
1856
|
+
if (Date.now() - this._lastKeyPressTime > 3000) {
|
|
1857
|
+
this._searchString = event.key;
|
|
1858
|
+
}
|
|
1859
|
+
else {
|
|
1860
|
+
this._searchString += event.key;
|
|
1861
|
+
}
|
|
1862
|
+
this._lastKeyPressTime = Date.now();
|
|
1863
|
+
const selectionIndex = this._getSelectionIndex(this._searchString);
|
|
1864
|
+
this.currentIndex = selectionIndex >= 0 ? selectionIndex : null;
|
|
1865
|
+
return;
|
|
1866
|
+
});
|
|
1868
1867
|
}
|
|
1869
1868
|
if (event.key === 'Escape') {
|
|
1870
|
-
this._preventDialogOpen = true;
|
|
1871
1869
|
(_a = this._dropdownElement) === null || _a === void 0 ? void 0 : _a.close();
|
|
1872
1870
|
this._inputElement.focus();
|
|
1871
|
+
if (!this.value) {
|
|
1872
|
+
this.currentIndex = null;
|
|
1873
|
+
}
|
|
1873
1874
|
return;
|
|
1874
1875
|
}
|
|
1875
1876
|
if (event.key === 'Tab') {
|
|
@@ -1881,12 +1882,18 @@ const CSelect = class {
|
|
|
1881
1882
|
return;
|
|
1882
1883
|
if (!this.dropdownVisible) {
|
|
1883
1884
|
this._dropdownElement.open();
|
|
1885
|
+
if (this.value) {
|
|
1886
|
+
this.currentIndex = this._getSelectionIndex(this._value);
|
|
1887
|
+
}
|
|
1888
|
+
return;
|
|
1884
1889
|
}
|
|
1885
|
-
|
|
1886
|
-
this.currentIndex
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
+
requestAnimationFrame(() => {
|
|
1891
|
+
this.currentIndex =
|
|
1892
|
+
this.currentIndex === null
|
|
1893
|
+
? 0
|
|
1894
|
+
: Math.min(this.currentIndex + 1, this._items.length - 1);
|
|
1895
|
+
this._dropdownElement.focusItem(this.currentIndex);
|
|
1896
|
+
});
|
|
1890
1897
|
}
|
|
1891
1898
|
if (event.key === 'ArrowUp') {
|
|
1892
1899
|
event.preventDefault();
|
|
@@ -1896,6 +1903,10 @@ const CSelect = class {
|
|
|
1896
1903
|
}
|
|
1897
1904
|
if (!this.dropdownVisible) {
|
|
1898
1905
|
this._dropdownElement.open();
|
|
1906
|
+
if (this.value) {
|
|
1907
|
+
this.currentIndex = this._getSelectionIndex(this._value);
|
|
1908
|
+
}
|
|
1909
|
+
return;
|
|
1899
1910
|
}
|
|
1900
1911
|
this.currentIndex =
|
|
1901
1912
|
this.currentIndex === null
|
|
@@ -1923,12 +1934,14 @@ const CSelect = class {
|
|
|
1923
1934
|
const isOpen = event.detail;
|
|
1924
1935
|
this.dropdownVisible = isOpen;
|
|
1925
1936
|
}
|
|
1926
|
-
onValueChanged(
|
|
1937
|
+
onValueChanged(value) {
|
|
1927
1938
|
var _a;
|
|
1928
|
-
if (!
|
|
1929
|
-
(
|
|
1939
|
+
if (!value) {
|
|
1940
|
+
if (this.optionAsSelection)
|
|
1941
|
+
(_a = this._selectionElement) === null || _a === void 0 ? void 0 : _a.replaceChildren();
|
|
1942
|
+
return;
|
|
1930
1943
|
}
|
|
1931
|
-
this._selectOption(this.returnObject ?
|
|
1944
|
+
this._selectOption(this.returnObject ? value : { name: value, value: value });
|
|
1932
1945
|
}
|
|
1933
1946
|
onSelectOption(event) {
|
|
1934
1947
|
var _a, _b;
|
|
@@ -1941,6 +1954,9 @@ const CSelect = class {
|
|
|
1941
1954
|
}
|
|
1942
1955
|
this._setValue(event.detail);
|
|
1943
1956
|
}
|
|
1957
|
+
_getSelectionIndex(searchString) {
|
|
1958
|
+
return Array.from(this._items).findIndex((i) => i.name.toLowerCase().startsWith(searchString.toLowerCase()));
|
|
1959
|
+
}
|
|
1944
1960
|
_selectOption({ value, name }) {
|
|
1945
1961
|
var _a, _b, _c;
|
|
1946
1962
|
(_a = this._dropdownElement) === null || _a === void 0 ? void 0 : _a.close();
|
|
@@ -1951,7 +1967,6 @@ const CSelect = class {
|
|
|
1951
1967
|
this._selectionElement.replaceChildren(clone);
|
|
1952
1968
|
}
|
|
1953
1969
|
(_b = this._dropdownElement) === null || _b === void 0 ? void 0 : _b.updateList();
|
|
1954
|
-
this._preventDialogOpen = true;
|
|
1955
1970
|
(_c = this._inputElement) === null || _c === void 0 ? void 0 : _c.focus();
|
|
1956
1971
|
}
|
|
1957
1972
|
_setValue({ value, name }) {
|
|
@@ -2027,23 +2042,23 @@ const CSelect = class {
|
|
|
2027
2042
|
'c-input-menu__chevron': true,
|
|
2028
2043
|
'c-input-menu__chevron--active': this.dropdownVisible,
|
|
2029
2044
|
};
|
|
2030
|
-
return (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) }, h("c-icon", { path: mdiChevronDown, size: 24 })));
|
|
2045
|
+
return (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) }, h("c-icon", { path: mdiChevronDown, size: 24, key: "c-select--chevron-icon" })));
|
|
2031
2046
|
}
|
|
2032
2047
|
_renderInputElement() {
|
|
2033
2048
|
var _a;
|
|
2034
2049
|
return (h("div", { class: "c-input-menu__input" }, 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() }), h("div", { ref: (el) => (this._selectionElement = el), class: "c-input-menu__selection" })));
|
|
2035
2050
|
}
|
|
2036
2051
|
_renderReset() {
|
|
2037
|
-
return (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) }, h("c-icon", { path: mdiClose, size: 20 })));
|
|
2052
|
+
return (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) }, h("c-icon", { path: mdiClose, size: 20, key: "c-select--reset-icon" })));
|
|
2038
2053
|
}
|
|
2039
2054
|
render() {
|
|
2040
2055
|
const itemType = this.optionElementsExist ? 'option' : 'item';
|
|
2041
|
-
return (h(Host, { key: '
|
|
2056
|
+
return (h(Host, { key: 'a04ff1f39668e7649c180e66ddf745d047e4bd52' }, h("c-dropdown", { key: '96d015a3e22fda3040b682278318e83c94519f17', ref: (el) => (this._dropdownElement = el), id: `${this._id}-dropdown`, index: this.currentIndex, "items-per-page": this.itemsPerPage, "dropdown-item-type": itemType, items: this._items, parent: this.el, type: "select" }, h("c-input", { key: '9ae977dac58ef98867f8f1220c096346d0ce875d', 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() }, h("slot", { key: '77a60a49d2f345c73188f8cf943a68b38841b4fd', name: "pre", slot: "pre" }), h("div", { key: 'ce48c08d8136c72866a96839d8145e984c622887', class: "c-input__content" }, this._renderInputElement(), this.loading && this._renderLoader(), !this.loading &&
|
|
2042
2057
|
this.value &&
|
|
2043
2058
|
this.clearable &&
|
|
2044
2059
|
this._renderReset(), !this.loading &&
|
|
2045
2060
|
(!this.value || !this.clearable) &&
|
|
2046
|
-
this._renderChevron(), h("slot", { key: '
|
|
2061
|
+
this._renderChevron(), h("slot", { key: '6c374c9e409faf23e4b539f52ebee7bbed9c8bc0', onSlotchange: () => this._onSlotChange() })), h("slot", { key: '1df5e73fd8c10026186ccbfb49b9917fbe80964c', name: "post", slot: "post" })))));
|
|
2047
2062
|
}
|
|
2048
2063
|
static get formAssociated() { return true; }
|
|
2049
2064
|
get el() { return getElement(this); }
|