@cscfi/csc-ui 1.0.16 → 1.0.17
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-accordion.cjs.entry.js +1 -1
- package/dist/cjs/c-alert.cjs.entry.js +1 -1
- package/dist/cjs/c-autocomplete.cjs.entry.js +186 -190
- package/dist/cjs/c-autocomplete.cjs.entry.js.map +1 -1
- package/dist/cjs/c-badge_12.cjs.entry.js +6 -6
- package/dist/cjs/c-badge_12.cjs.entry.js.map +1 -1
- package/dist/cjs/c-card-actions.cjs.entry.js +1 -1
- package/dist/cjs/c-card-content.cjs.entry.js +1 -1
- package/dist/cjs/c-card-title.cjs.entry.js +1 -1
- package/dist/cjs/c-checkbox_2.cjs.entry.js +1 -1
- package/dist/cjs/c-data-table.cjs.entry.js +1 -1
- package/dist/cjs/c-dropdown_2.cjs.entry.js +196 -377
- package/dist/cjs/c-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/c-link.cjs.entry.js +1 -1
- package/dist/cjs/c-list-item-title.cjs.entry.js +1 -1
- package/dist/cjs/c-list-item.cjs.entry.js +1 -1
- package/dist/cjs/c-list.cjs.entry.js +1 -1
- package/dist/cjs/c-loader.cjs.entry.js +1 -1
- package/dist/cjs/c-login-button.cjs.entry.js +1 -1
- package/dist/cjs/c-login-buttons.cjs.entry.js +1 -1
- package/dist/cjs/c-login-card-actions.cjs.entry.js +1 -1
- package/dist/cjs/c-login-card-content.cjs.entry.js +1 -1
- package/dist/cjs/c-login-card-title.cjs.entry.js +1 -1
- package/dist/cjs/c-login-card.cjs.entry.js +2 -2
- package/dist/cjs/c-login-card.cjs.entry.js.map +1 -1
- package/dist/cjs/c-menu_2.cjs.entry.js +1 -1
- package/dist/cjs/c-message.cjs.entry.js +1 -1
- package/dist/cjs/c-modal.cjs.entry.js +7 -3
- package/dist/cjs/c-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/c-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/c-option-value.cjs.entry.js +1 -1
- package/dist/cjs/c-option.cjs.entry.js +1 -1
- package/dist/cjs/c-otp-input.cjs.entry.js +2 -2
- package/dist/cjs/c-otp-input.cjs.entry.js.map +1 -1
- package/dist/cjs/c-page.cjs.entry.js +1 -1
- package/dist/cjs/c-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/c-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/c-radio.cjs.entry.js +1 -1
- package/dist/cjs/c-select.cjs.entry.js +195 -246
- package/dist/cjs/c-select.cjs.entry.js.map +1 -1
- package/dist/cjs/c-side-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/c-side-navigation-title.cjs.entry.js +1 -1
- package/dist/cjs/c-side-navigation.cjs.entry.js +1 -1
- package/dist/cjs/c-status.cjs.entry.js +1 -1
- package/dist/cjs/c-step.cjs.entry.js +1 -1
- package/dist/cjs/c-steps.cjs.entry.js +1 -1
- package/dist/cjs/c-sub-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/c-swiper-tab.cjs.entry.js +1 -1
- package/dist/cjs/c-swiper.cjs.entry.js +1 -1
- package/dist/cjs/c-switch.cjs.entry.js +1 -1
- package/dist/cjs/c-tab-buttons.cjs.entry.js +1 -1
- package/dist/cjs/c-tab-item.cjs.entry.js +1 -1
- package/dist/cjs/c-tab-items.cjs.entry.js +1 -1
- package/dist/cjs/c-tab.cjs.entry.js +1 -1
- package/dist/cjs/c-table.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-tags.cjs.entry.js +1 -1
- package/dist/cjs/c-text-field.cjs.entry.js +1 -1
- package/dist/cjs/c-toast.cjs.entry.js +1 -1
- package/dist/cjs/c-toasts.cjs.entry.js +1 -1
- package/dist/cjs/csc-ui.cjs.js +3 -3
- package/dist/cjs/csc-ui.cjs.js.map +1 -1
- package/dist/cjs/index-72dca436.js.map +1 -1
- package/dist/cjs/{index-3cad12b5.js → index-91ba22ab.js} +128 -58
- package/dist/cjs/index-91ba22ab.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/c-autocomplete/c-autocomplete.css +33 -12
- package/dist/collection/components/c-autocomplete/c-autocomplete.js +297 -408
- package/dist/collection/components/c-autocomplete/c-autocomplete.js.map +1 -1
- package/dist/collection/components/c-dropdown/c-dropdown-options-item.js +3 -0
- package/dist/collection/components/c-dropdown/c-dropdown-options-item.js.map +1 -0
- package/dist/collection/components/c-dropdown/c-dropdown.css +42 -9
- package/dist/collection/components/c-dropdown/c-dropdown.js +293 -507
- package/dist/collection/components/c-dropdown/c-dropdown.js.map +1 -1
- package/dist/collection/components/c-icon/c-icon.css +13 -3
- package/dist/collection/components/c-icon/c-icon.js +3 -3
- package/dist/collection/components/c-icon/c-icon.js.map +1 -1
- package/dist/collection/components/c-icon-button/c-icon-button.css +5 -7
- package/dist/collection/components/c-input/c-input.css +13 -6
- package/dist/collection/components/c-input/c-input.js +59 -4
- package/dist/collection/components/c-input/c-input.js.map +1 -1
- package/dist/collection/components/c-login-card/c-login-card.css +3 -0
- package/dist/collection/components/c-modal/c-modal.css +3 -1
- package/dist/collection/components/c-modal/c-modal.js +23 -1
- package/dist/collection/components/c-modal/c-modal.js.map +1 -1
- package/dist/collection/components/c-otp-input/c-otp-input.js +1 -1
- package/dist/collection/components/c-otp-input/c-otp-input.js.map +1 -1
- package/dist/collection/components/c-select/c-select.css +0 -3
- package/dist/collection/components/c-select/c-select.js +326 -394
- package/dist/collection/components/c-select/c-select.js.map +1 -1
- package/dist/collection/types/index.js.map +1 -1
- package/dist/components/c-autocomplete.js +235 -215
- package/dist/components/c-autocomplete.js.map +1 -1
- package/dist/components/c-card.js +1 -1
- package/dist/components/c-data-table.js +1 -1
- package/dist/components/c-dropdown2.js +191 -388
- package/dist/components/c-dropdown2.js.map +1 -1
- package/dist/components/c-icon-button2.js +1 -1
- package/dist/components/c-icon-button2.js.map +1 -1
- package/dist/components/c-icon2.js +4 -4
- package/dist/components/c-icon2.js.map +1 -1
- package/dist/components/c-input2.js +20 -5
- package/dist/components/c-input2.js.map +1 -1
- package/dist/components/c-login-card.js +1 -1
- package/dist/components/c-login-card.js.map +1 -1
- package/dist/components/c-modal.js +7 -2
- package/dist/components/c-modal.js.map +1 -1
- package/dist/components/c-navigation-button.js +1 -1
- package/dist/components/c-otp-input.js +1 -1
- package/dist/components/c-otp-input.js.map +1 -1
- package/dist/components/c-pagination2.js +1 -1
- package/dist/components/c-select.js +243 -270
- package/dist/components/c-select.js.map +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-toast2.js +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/mdi.js +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-02b57cbd.entry.js → p-019c6898.entry.js} +2 -2
- package/dist/csc-ui/{p-2c9aabef.entry.js → p-0666f12d.entry.js} +2 -2
- package/dist/csc-ui/{p-738a7d1d.entry.js → p-075a7c96.entry.js} +2 -2
- package/dist/csc-ui/{p-e0c3d13b.entry.js → p-0db503fb.entry.js} +2 -2
- package/dist/csc-ui/{p-a369bf94.entry.js → p-16098e94.entry.js} +2 -2
- package/dist/csc-ui/{p-4c23471f.entry.js → p-1a1e8b4b.entry.js} +2 -2
- package/dist/csc-ui/p-1bb973d5.entry.js +2 -0
- package/dist/csc-ui/p-1bb973d5.entry.js.map +1 -0
- package/dist/csc-ui/{p-bf307cb4.entry.js → p-2a622e79.entry.js} +2 -2
- package/dist/csc-ui/{p-cd047753.entry.js → p-2b5cd791.entry.js} +2 -2
- package/dist/csc-ui/p-30108adb.entry.js +2 -0
- package/dist/csc-ui/{p-b65fb982.entry.js.map → p-30108adb.entry.js.map} +1 -1
- package/dist/csc-ui/{p-37c19431.entry.js → p-45641e3d.entry.js} +2 -2
- package/dist/csc-ui/{p-8b7e9097.entry.js → p-47ca0a95.entry.js} +2 -2
- package/dist/csc-ui/p-494a4f19.entry.js +2 -0
- package/dist/csc-ui/{p-93280350.entry.js → p-4cf4ffff.entry.js} +2 -2
- package/dist/csc-ui/{p-dd6d422d.entry.js → p-4e1d8f5d.entry.js} +2 -2
- package/dist/csc-ui/{p-b09ba433.entry.js → p-4f9c92e4.entry.js} +2 -2
- package/dist/csc-ui/{p-dffa1f9f.js → p-5461ca29.js} +2 -2
- package/dist/csc-ui/p-55cbda54.entry.js +2 -0
- package/dist/csc-ui/{p-14ed80ac.entry.js.map → p-55cbda54.entry.js.map} +1 -1
- package/dist/csc-ui/p-565ec8e4.js +3 -0
- package/dist/csc-ui/p-565ec8e4.js.map +1 -0
- package/dist/csc-ui/{p-9f2311a7.entry.js → p-5d21c4c7.entry.js} +2 -2
- package/dist/csc-ui/{p-732bc932.entry.js → p-75798257.entry.js} +2 -2
- package/dist/csc-ui/{p-0bf28786.entry.js → p-7af82ab9.entry.js} +2 -2
- package/dist/csc-ui/{p-ef6162d9.entry.js → p-7ea05669.entry.js} +2 -2
- package/dist/csc-ui/{p-ef6162d9.entry.js.map → p-7ea05669.entry.js.map} +1 -1
- package/dist/csc-ui/{p-79308b3f.entry.js → p-82a711fb.entry.js} +2 -2
- package/dist/csc-ui/{p-c5deb643.entry.js → p-862486aa.entry.js} +2 -2
- package/dist/csc-ui/{p-6a1e5ae3.entry.js → p-873aa915.entry.js} +2 -2
- package/dist/csc-ui/p-88c60ba3.entry.js +2 -0
- package/dist/csc-ui/p-88c60ba3.entry.js.map +1 -0
- package/dist/csc-ui/{p-26021965.entry.js → p-8d34efbc.entry.js} +2 -2
- package/dist/csc-ui/{p-210da773.entry.js → p-8d5fe14f.entry.js} +2 -2
- package/dist/csc-ui/{p-f0329312.entry.js → p-958cf6ed.entry.js} +2 -2
- package/dist/csc-ui/{p-eb35a668.entry.js → p-98faa11d.entry.js} +2 -2
- package/dist/csc-ui/{p-05bb5c30.entry.js → p-a9ed6afb.entry.js} +2 -2
- package/dist/csc-ui/{p-d60032ce.entry.js → p-aa930d89.entry.js} +2 -2
- package/dist/csc-ui/{p-6ec9109d.entry.js → p-afd4cc03.entry.js} +2 -2
- package/dist/csc-ui/{p-a8073d7e.entry.js → p-baea3193.entry.js} +2 -2
- package/dist/csc-ui/{p-cea20d08.entry.js → p-bbe8423c.entry.js} +2 -2
- package/dist/csc-ui/{p-28282ef5.entry.js → p-bddd9153.entry.js} +2 -2
- package/dist/csc-ui/{p-f4a9cb4d.entry.js → p-bf01d3ef.entry.js} +2 -2
- package/dist/csc-ui/{p-0f76461d.entry.js → p-c291cbe2.entry.js} +2 -2
- package/dist/csc-ui/{p-f4d93d05.entry.js → p-caa58a64.entry.js} +2 -2
- package/dist/csc-ui/{p-a8da163c.entry.js → p-cc31d9b2.entry.js} +2 -2
- package/dist/csc-ui/p-d1089126.entry.js +2 -0
- package/dist/csc-ui/p-d1089126.entry.js.map +1 -0
- package/dist/csc-ui/{p-6f86810a.entry.js → p-d26167bc.entry.js} +2 -2
- package/dist/csc-ui/p-d2fc8cb4.entry.js +2 -0
- package/dist/csc-ui/p-d2fc8cb4.entry.js.map +1 -0
- package/dist/csc-ui/{p-c48a6e1d.entry.js → p-d76079eb.entry.js} +2 -2
- package/dist/csc-ui/{p-889d3d6d.entry.js → p-d7ca1f65.entry.js} +2 -2
- package/dist/csc-ui/{p-192145f2.entry.js → p-d8899493.entry.js} +2 -2
- package/dist/csc-ui/p-da6a2275.entry.js +2 -0
- package/dist/csc-ui/p-dda56b09.entry.js +2 -0
- package/dist/csc-ui/p-dda56b09.entry.js.map +1 -0
- package/dist/csc-ui/{p-cfc34289.entry.js → p-e3bd1f42.entry.js} +2 -2
- package/dist/csc-ui/{p-58aed6cc.entry.js → p-e6fb98a7.entry.js} +2 -2
- package/dist/csc-ui/{p-e970fa68.entry.js → p-e8bd7a76.entry.js} +2 -2
- package/dist/csc-ui/{p-55ca2b16.entry.js → p-ea99cd0e.entry.js} +2 -2
- package/dist/csc-ui/{p-32298609.entry.js → p-ec167606.entry.js} +2 -2
- package/dist/csc-ui/p-fafac729.js.map +1 -1
- package/dist/csc-ui/{p-dea9da0e.entry.js → p-fb098c2b.entry.js} +2 -2
- package/dist/csc-ui/p-fde2bd49.entry.js +2 -0
- package/dist/csc-ui/p-fde2bd49.entry.js.map +1 -0
- package/dist/csc-ui/{p-843b5cdb.entry.js → p-ff51bae3.entry.js} +2 -2
- package/dist/esm/c-accordion-item.entry.js +2 -2
- package/dist/esm/c-accordion.entry.js +1 -1
- package/dist/esm/c-alert.entry.js +2 -2
- package/dist/esm/c-autocomplete.entry.js +187 -191
- package/dist/esm/c-autocomplete.entry.js.map +1 -1
- package/dist/esm/c-badge_12.entry.js +7 -7
- package/dist/esm/c-badge_12.entry.js.map +1 -1
- package/dist/esm/c-card-actions.entry.js +1 -1
- package/dist/esm/c-card-content.entry.js +1 -1
- package/dist/esm/c-card-title.entry.js +1 -1
- package/dist/esm/c-checkbox_2.entry.js +2 -2
- package/dist/esm/c-data-table.entry.js +2 -2
- package/dist/esm/c-dropdown_2.entry.js +197 -378
- package/dist/esm/c-dropdown_2.entry.js.map +1 -1
- package/dist/esm/c-link.entry.js +1 -1
- package/dist/esm/c-list-item-title.entry.js +1 -1
- package/dist/esm/c-list-item.entry.js +1 -1
- package/dist/esm/c-list.entry.js +1 -1
- package/dist/esm/c-loader.entry.js +1 -1
- package/dist/esm/c-login-button.entry.js +1 -1
- package/dist/esm/c-login-buttons.entry.js +1 -1
- package/dist/esm/c-login-card-actions.entry.js +1 -1
- package/dist/esm/c-login-card-content.entry.js +1 -1
- package/dist/esm/c-login-card-title.entry.js +1 -1
- package/dist/esm/c-login-card.entry.js +2 -2
- package/dist/esm/c-login-card.entry.js.map +1 -1
- package/dist/esm/c-menu_2.entry.js +2 -2
- package/dist/esm/c-message.entry.js +2 -2
- package/dist/esm/c-modal.entry.js +7 -3
- package/dist/esm/c-modal.entry.js.map +1 -1
- package/dist/esm/c-navigation-button.entry.js +2 -2
- package/dist/esm/c-option-value.entry.js +1 -1
- package/dist/esm/c-option.entry.js +1 -1
- package/dist/esm/c-otp-input.entry.js +2 -2
- package/dist/esm/c-otp-input.entry.js.map +1 -1
- package/dist/esm/c-page.entry.js +1 -1
- package/dist/esm/c-progress-bar.entry.js +1 -1
- package/dist/esm/c-radio-group.entry.js +2 -2
- package/dist/esm/c-radio.entry.js +1 -1
- package/dist/esm/c-select.entry.js +196 -247
- package/dist/esm/c-select.entry.js.map +1 -1
- package/dist/esm/c-side-navigation-item.entry.js +2 -2
- package/dist/esm/c-side-navigation-title.entry.js +1 -1
- package/dist/esm/c-side-navigation.entry.js +2 -2
- package/dist/esm/c-status.entry.js +1 -1
- package/dist/esm/c-step.entry.js +1 -1
- package/dist/esm/c-steps.entry.js +1 -1
- package/dist/esm/c-sub-navigation-item.entry.js +1 -1
- package/dist/esm/c-swiper-tab.entry.js +1 -1
- package/dist/esm/c-swiper.entry.js +2 -2
- package/dist/esm/c-switch.entry.js +1 -1
- package/dist/esm/c-tab-buttons.entry.js +1 -1
- package/dist/esm/c-tab-item.entry.js +1 -1
- package/dist/esm/c-tab-items.entry.js +1 -1
- package/dist/esm/c-tab.entry.js +1 -1
- package/dist/esm/c-table.entry.js +1 -1
- package/dist/esm/c-tabs.entry.js +2 -2
- package/dist/esm/c-tag.entry.js +2 -2
- package/dist/esm/c-tags.entry.js +1 -1
- package/dist/esm/c-text-field.entry.js +2 -2
- package/dist/esm/c-toast.entry.js +2 -2
- package/dist/esm/c-toasts.entry.js +1 -1
- package/dist/esm/csc-ui.js +4 -4
- package/dist/esm/csc-ui.js.map +1 -1
- package/dist/esm/{index-cdf029b7.js → index-47956d53.js} +128 -58
- package/dist/esm/index-47956d53.js.map +1 -0
- package/dist/esm/index-dfaed2a4.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mdi-a4a63b40.js → mdi-e92c0e44.js} +2 -2
- package/dist/esm/{mdi-a4a63b40.js.map → mdi-e92c0e44.js.map} +1 -1
- package/dist/types/components/c-autocomplete/c-autocomplete.d.ts +41 -45
- package/dist/types/components/c-dropdown/c-dropdown-options-item.d.ts +3 -0
- package/dist/types/components/c-dropdown/c-dropdown.d.ts +35 -49
- package/dist/types/components/c-input/c-input.d.ts +2 -0
- package/dist/types/components/c-modal/c-modal.d.ts +1 -0
- package/dist/types/components/c-select/c-select.d.ts +39 -48
- package/dist/types/components.d.ts +118 -125
- package/dist/types/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/vscode-data.json +37 -33
- package/dist/cjs/index-3cad12b5.js.map +0 -1
- package/dist/csc-ui/p-01ed27ec.entry.js +0 -2
- package/dist/csc-ui/p-01ed27ec.entry.js.map +0 -1
- package/dist/csc-ui/p-14ed80ac.entry.js +0 -2
- package/dist/csc-ui/p-2ff8e8e2.entry.js +0 -2
- package/dist/csc-ui/p-2ff8e8e2.entry.js.map +0 -1
- package/dist/csc-ui/p-50db6941.entry.js +0 -2
- package/dist/csc-ui/p-50db6941.entry.js.map +0 -1
- package/dist/csc-ui/p-7575c2c3.entry.js +0 -2
- package/dist/csc-ui/p-7575c2c3.entry.js.map +0 -1
- package/dist/csc-ui/p-9d54e9a4.js +0 -3
- package/dist/csc-ui/p-9d54e9a4.js.map +0 -1
- package/dist/csc-ui/p-b65fb982.entry.js +0 -2
- package/dist/csc-ui/p-c343dd6e.entry.js +0 -2
- package/dist/csc-ui/p-c79e12d7.entry.js +0 -2
- package/dist/csc-ui/p-c79e12d7.entry.js.map +0 -1
- package/dist/csc-ui/p-c7a07889.entry.js +0 -2
- package/dist/csc-ui/p-ff51acad.entry.js +0 -2
- package/dist/csc-ui/p-ff51acad.entry.js.map +0 -1
- package/dist/esm/index-cdf029b7.js.map +0 -1
- /package/dist/csc-ui/{p-02b57cbd.entry.js.map → p-019c6898.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-2c9aabef.entry.js.map → p-0666f12d.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-738a7d1d.entry.js.map → p-075a7c96.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-e0c3d13b.entry.js.map → p-0db503fb.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-a369bf94.entry.js.map → p-16098e94.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-4c23471f.entry.js.map → p-1a1e8b4b.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-bf307cb4.entry.js.map → p-2a622e79.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-cd047753.entry.js.map → p-2b5cd791.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-37c19431.entry.js.map → p-45641e3d.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-8b7e9097.entry.js.map → p-47ca0a95.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-c7a07889.entry.js.map → p-494a4f19.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-93280350.entry.js.map → p-4cf4ffff.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-dd6d422d.entry.js.map → p-4e1d8f5d.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-b09ba433.entry.js.map → p-4f9c92e4.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-dffa1f9f.js.map → p-5461ca29.js.map} +0 -0
- /package/dist/csc-ui/{p-9f2311a7.entry.js.map → p-5d21c4c7.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-732bc932.entry.js.map → p-75798257.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-0bf28786.entry.js.map → p-7af82ab9.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-79308b3f.entry.js.map → p-82a711fb.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-c5deb643.entry.js.map → p-862486aa.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-6a1e5ae3.entry.js.map → p-873aa915.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-26021965.entry.js.map → p-8d34efbc.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-210da773.entry.js.map → p-8d5fe14f.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-f0329312.entry.js.map → p-958cf6ed.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-eb35a668.entry.js.map → p-98faa11d.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-05bb5c30.entry.js.map → p-a9ed6afb.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-d60032ce.entry.js.map → p-aa930d89.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-6ec9109d.entry.js.map → p-afd4cc03.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-a8073d7e.entry.js.map → p-baea3193.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-cea20d08.entry.js.map → p-bbe8423c.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-28282ef5.entry.js.map → p-bddd9153.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-f4a9cb4d.entry.js.map → p-bf01d3ef.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-0f76461d.entry.js.map → p-c291cbe2.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-f4d93d05.entry.js.map → p-caa58a64.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-a8da163c.entry.js.map → p-cc31d9b2.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-6f86810a.entry.js.map → p-d26167bc.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-c48a6e1d.entry.js.map → p-d76079eb.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-889d3d6d.entry.js.map → p-d7ca1f65.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-192145f2.entry.js.map → p-d8899493.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-c343dd6e.entry.js.map → p-da6a2275.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-cfc34289.entry.js.map → p-e3bd1f42.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-58aed6cc.entry.js.map → p-e6fb98a7.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-e970fa68.entry.js.map → p-e8bd7a76.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-55ca2b16.entry.js.map → p-ea99cd0e.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-32298609.entry.js.map → p-ec167606.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-dea9da0e.entry.js.map → p-fb098c2b.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-843b5cdb.entry.js.map → p-ff51bae3.entry.js.map} +0 -0
|
@@ -2,290 +2,218 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-91ba22ab.js');
|
|
6
6
|
const mdi = require('./mdi-16842afc.js');
|
|
7
7
|
|
|
8
|
-
const cSelectCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{--_c-select-active-color:var(--c-select-active-color, var(--c-primary-600));--_c-select-inactive-color:var(--c-select-inactive-color, var(--c-tertiary-600));--_c-select-background-color:var(--c-select-background-color, var(--c-transparent));--_c-select-text-color:var(--c-select-text-color, var(--c-text-body));--_c-select-placeholder-color:var(--c-select-placeholder-color, var(--c-tertiary-500));--_c-select-option-background-color:var(--c-select-option-background-color, var(--c-white));--_c-select-option-background-color-hover:var(--c-select-option-background-color-hover, var(--c-primary-100));--_c-select-option-text-color:var(--c-select-option-text-color, var(--c-text-body));--_c-input-active-color:var(--_c-select-active-color);--_c-input-inactive-color:var(--_c-select-inactive-color);--_c-input-background-color:var(--_c-select-background-color);--_c-input-text-color:var(--_c-select-text-color);--_c-input-placeholder-color:var(--_c-select-placeholder-color)}:host{display:block;cursor:text}.c-input-menu__chevron{fill:currentColor;
|
|
8
|
+
const cSelectCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{--_c-select-active-color:var(--c-select-active-color, var(--c-primary-600));--_c-select-inactive-color:var(--c-select-inactive-color, var(--c-tertiary-600));--_c-select-background-color:var(--c-select-background-color, var(--c-transparent));--_c-select-text-color:var(--c-select-text-color, var(--c-text-body));--_c-select-placeholder-color:var(--c-select-placeholder-color, var(--c-tertiary-500));--_c-select-option-background-color:var(--c-select-option-background-color, var(--c-white));--_c-select-option-background-color-hover:var(--c-select-option-background-color-hover, var(--c-primary-100));--_c-select-option-text-color:var(--c-select-option-text-color, var(--c-text-body));--_c-input-active-color:var(--_c-select-active-color);--_c-input-inactive-color:var(--_c-select-inactive-color);--_c-input-background-color:var(--_c-select-background-color);--_c-input-text-color:var(--_c-select-text-color);--_c-input-placeholder-color:var(--_c-select-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}";
|
|
9
9
|
|
|
10
10
|
const CSelect = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
this.changeValue = index.createEvent(this, "changeValue", 3);
|
|
14
|
-
|
|
15
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
19
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
20
|
-
}
|
|
21
|
-
this._itemRefs = [];
|
|
22
|
-
this._cOptionElements = {};
|
|
23
|
-
this._outerWrapperClasses = ['outer-wrapper'];
|
|
24
|
-
this._validationClasses = ['validation-message'];
|
|
14
|
+
this._preventDialogOpen = false;
|
|
25
15
|
this._debounce = null;
|
|
26
|
-
this._observer = new IntersectionObserver((entries, observer) => {
|
|
27
|
-
entries.forEach((entry) => {
|
|
28
|
-
if (!entry.isIntersecting) {
|
|
29
|
-
entry.target.scrollIntoView({
|
|
30
|
-
block: 'nearest',
|
|
31
|
-
inline: 'nearest',
|
|
32
|
-
});
|
|
33
|
-
observer.unobserve(entry.target);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
observer.unobserve(entry.target);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}, { threshold: 1 });
|
|
40
16
|
this._lastKeyPressTime = null;
|
|
41
17
|
this._searchString = '';
|
|
42
|
-
this.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
18
|
+
this._toggleDropdown = (event) => {
|
|
19
|
+
event.stopPropagation();
|
|
20
|
+
if (this.dropdownVisible) {
|
|
21
|
+
this._dropdownElement.close();
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
this._dropdownElement.open();
|
|
46
25
|
};
|
|
47
|
-
this.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
26
|
+
this._onButtonKeyDown = (src, event) => {
|
|
27
|
+
event.stopPropagation();
|
|
28
|
+
if (event.key !== 'Tab')
|
|
29
|
+
event.preventDefault();
|
|
30
|
+
if (['Enter', ' '].includes(event.key)) {
|
|
31
|
+
if (src === 'chevron') {
|
|
32
|
+
this._toggleDropdown(event);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
this._onReset(event);
|
|
36
|
+
this._preventDialogOpen = true;
|
|
37
|
+
requestAnimationFrame(() => {
|
|
38
|
+
this._inputElement.focus();
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
this._onSlotChange = () => {
|
|
43
|
+
this.optionElements = this.el.querySelectorAll('c-option');
|
|
44
|
+
if (this.optionElements.length && !this.optionElementsExist) {
|
|
45
|
+
this.optionElementsExist = true;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
this._onReset = (event) => {
|
|
49
|
+
event.stopPropagation();
|
|
50
|
+
this.changeValue.emit(null);
|
|
51
|
+
this._selectionElement.classList.remove('c-input-menu__selection--show');
|
|
52
|
+
this._selectionElement.replaceChildren(null);
|
|
53
|
+
this._preventDialogOpen = true;
|
|
54
|
+
this._cInputElement.reset();
|
|
55
|
+
this._inputElement.focus();
|
|
56
|
+
this._dropdownElement.updateList();
|
|
57
|
+
};
|
|
58
|
+
this._onInputFocus = () => {
|
|
59
|
+
if (!this._preventDialogOpen) {
|
|
60
|
+
this._dropdownElement.open();
|
|
61
|
+
}
|
|
62
|
+
this._updateStatusText();
|
|
63
|
+
this._preventDialogOpen = false;
|
|
64
|
+
};
|
|
65
|
+
this.items = [];
|
|
66
|
+
this.value = null;
|
|
51
67
|
this.hostId = undefined;
|
|
68
|
+
this.clearable = false;
|
|
69
|
+
this.disabled = false;
|
|
52
70
|
this.label = undefined;
|
|
53
|
-
this.shadow = false;
|
|
54
71
|
this.name = undefined;
|
|
72
|
+
this.placeholder = '';
|
|
73
|
+
this.hideDetails = false;
|
|
74
|
+
this.hint = '';
|
|
75
|
+
this.loading = false;
|
|
55
76
|
this.required = false;
|
|
56
|
-
this.returnValue = undefined;
|
|
57
77
|
this.valid = true;
|
|
58
78
|
this.validate = false;
|
|
59
79
|
this.validateOnBlur = false;
|
|
60
80
|
this.validation = 'Required field';
|
|
81
|
+
this.shadow = false;
|
|
82
|
+
this.returnObject = false;
|
|
61
83
|
this.itemsPerPage = 6;
|
|
62
|
-
this.placeholder = '';
|
|
63
|
-
this.value = null;
|
|
64
|
-
this.items = [];
|
|
65
84
|
this.optionAsSelection = undefined;
|
|
66
|
-
this.
|
|
85
|
+
this.optionElements = undefined;
|
|
67
86
|
this.currentIndex = null;
|
|
68
|
-
this.
|
|
87
|
+
this.dropdownVisible = false;
|
|
69
88
|
this.statusText = '';
|
|
70
|
-
this.
|
|
71
|
-
this.previousValue = { value: '', name: '' };
|
|
89
|
+
this.optionElementsExist = false;
|
|
72
90
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (!this.value)
|
|
76
|
-
return;
|
|
77
|
-
const realValue = !((_a = this.value) === null || _a === void 0 ? void 0 : _a.value)
|
|
78
|
-
? this._items.find((item) => item.value === this.value)
|
|
79
|
-
: this.value;
|
|
80
|
-
this._valueChangedHandler(realValue);
|
|
81
|
-
}
|
|
82
|
-
validateChange(newValue) {
|
|
83
|
-
if (newValue) {
|
|
84
|
-
this._runValidate();
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
onCurrentIndexChange(index) {
|
|
88
|
-
var _a, _b, _c;
|
|
89
|
-
this.activeListItemId = (_c = (_b = (_a = this._itemRefs[index]) === null || _a === void 0 ? void 0 : _a.ref) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : null;
|
|
90
|
-
this._scrollToElement();
|
|
91
|
-
this._updateStatusText();
|
|
91
|
+
get _id() {
|
|
92
|
+
return this.hostId || `select_${CSelect._uniqueId}`;
|
|
92
93
|
}
|
|
93
94
|
get _items() {
|
|
94
|
-
return this.
|
|
95
|
-
}
|
|
96
|
-
_setValue(item) {
|
|
97
|
-
return this.returnValue
|
|
98
|
-
? item === null || item === void 0 ? void 0 : item.value
|
|
99
|
-
: {
|
|
100
|
-
name: item === null || item === void 0 ? void 0 : item.name,
|
|
101
|
-
value: item === null || item === void 0 ? void 0 : item.value,
|
|
102
|
-
};
|
|
95
|
+
return this.optionElementsExist ? this.optionElements : this.items;
|
|
103
96
|
}
|
|
104
|
-
|
|
105
|
-
var _a;
|
|
106
|
-
if (!item)
|
|
107
|
-
return;
|
|
108
|
-
if (this.hasOptionItems && this.optionAsSelection) {
|
|
109
|
-
const selection = this._cOptionElements[item.value.toString()];
|
|
110
|
-
if (!selection)
|
|
111
|
-
return;
|
|
112
|
-
const clone = selection.cloneNode(true);
|
|
113
|
-
this._selectionElement.classList.add('c-input-menu__selection--show');
|
|
114
|
-
this._selectionElement.replaceChildren(clone);
|
|
115
|
-
}
|
|
116
|
-
this.currentIndex = this._items.findIndex((element) => element.value === (item === null || item === void 0 ? void 0 : item.value));
|
|
117
|
-
const value = this._setValue(item);
|
|
118
|
-
if (this.previousValue && ((_a = this.previousValue) === null || _a === void 0 ? void 0 : _a.value) === (item === null || item === void 0 ? void 0 : item.value))
|
|
119
|
-
return;
|
|
120
|
-
this.previousValue = item;
|
|
121
|
-
this.changeValue.emit(value);
|
|
122
|
-
this.internals.setFormValue(item.value);
|
|
123
|
-
}
|
|
124
|
-
_getLabel() {
|
|
97
|
+
get _value() {
|
|
125
98
|
var _a, _b, _c, _d;
|
|
126
99
|
if (!this.value)
|
|
127
100
|
return '';
|
|
128
|
-
if (this.
|
|
129
|
-
['number', 'string'
|
|
130
|
-
|
|
101
|
+
if (!this.returnObject &&
|
|
102
|
+
!['number', 'string'].includes(typeof this.value)) {
|
|
103
|
+
console.warn(`[C-SELECT] The value should be of type 'number' or 'string' when return-object is not used.`);
|
|
104
|
+
return '';
|
|
105
|
+
}
|
|
106
|
+
if (!this.returnObject &&
|
|
107
|
+
['number', 'string'].includes(typeof this.value)) {
|
|
108
|
+
return (_b = (_a = Array.from(this._items)) === null || _a === void 0 ? void 0 : _a.find((item) => item.value === this.value)) === null || _b === void 0 ? void 0 : _b.name;
|
|
131
109
|
}
|
|
132
110
|
return (_d = (_c = this._items) === null || _c === void 0 ? void 0 : _c.find((item) => item.value === this.value.value)) === null || _d === void 0 ? void 0 : _d.name;
|
|
133
111
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
const itemRef = (_a = this._itemRefs.find((item) => { var _a; return item.value === ((_a = this._items[this.currentIndex]) === null || _a === void 0 ? void 0 : _a.value); })) === null || _a === void 0 ? void 0 : _a.ref;
|
|
138
|
-
if (!!itemRef) {
|
|
139
|
-
this._observer.observe(itemRef);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
112
|
+
async reset() {
|
|
113
|
+
this.changeValue.emit(null);
|
|
114
|
+
this._dropdownElement.updateList();
|
|
142
115
|
}
|
|
143
|
-
handleKeyDown(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
if (Date.now() - this._lastKeyPressTime > 3000
|
|
149
|
-
this._searchString
|
|
150
|
-
this._searchString = ev.key;
|
|
116
|
+
handleKeyDown(event) {
|
|
117
|
+
const alphanumeric = /^[0-9a-zA-Z ]+$/;
|
|
118
|
+
if (event.key.match(alphanumeric) && event.key.length === 1) {
|
|
119
|
+
if (this.dropdownVisible)
|
|
120
|
+
return;
|
|
121
|
+
if (Date.now() - this._lastKeyPressTime > 3000) {
|
|
122
|
+
this._searchString = event.key;
|
|
151
123
|
}
|
|
152
124
|
else {
|
|
153
|
-
this._searchString
|
|
125
|
+
this._searchString += event.key;
|
|
154
126
|
}
|
|
155
127
|
this._lastKeyPressTime = Date.now();
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
if (selectedItem) {
|
|
161
|
-
if (this.menuVisible) {
|
|
162
|
-
this.currentIndex = this._items.findIndex(isItem);
|
|
163
|
-
this._scrollToElement();
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
this.value = selectedItem;
|
|
167
|
-
}
|
|
128
|
+
const selectionIndex = Array.from(this._items).findIndex((i) => i.name.toLowerCase().startsWith(this._searchString));
|
|
129
|
+
this.currentIndex = selectionIndex >= 0 ? selectionIndex : null;
|
|
130
|
+
if (this.currentIndex !== null) {
|
|
131
|
+
this._dropdownElement.selectItem(this.currentIndex);
|
|
168
132
|
}
|
|
133
|
+
return;
|
|
169
134
|
}
|
|
170
|
-
if (
|
|
135
|
+
if (event.key === 'Escape') {
|
|
136
|
+
this._preventDialogOpen = true;
|
|
171
137
|
this._dropdownElement.close();
|
|
138
|
+
this._inputElement.focus();
|
|
139
|
+
return;
|
|
172
140
|
}
|
|
173
|
-
if (
|
|
174
|
-
|
|
175
|
-
|
|
141
|
+
if (event.key === 'Tab') {
|
|
142
|
+
this._dropdownElement.close();
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
if (event.key === 'ArrowDown') {
|
|
146
|
+
event.preventDefault();
|
|
147
|
+
if (!this._items.length)
|
|
176
148
|
return;
|
|
177
|
-
this.
|
|
149
|
+
if (!this.dropdownVisible || this.currentIndex === null) {
|
|
150
|
+
this.currentIndex = 0;
|
|
151
|
+
this._dropdownElement.open();
|
|
152
|
+
this._dropdownElement.focusItem(this.currentIndex);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
this.currentIndex = Math.min(this.currentIndex + 1, this._items.length - 1);
|
|
178
156
|
this._dropdownElement.focusItem(this.currentIndex);
|
|
157
|
+
return;
|
|
179
158
|
}
|
|
180
|
-
if (
|
|
181
|
-
|
|
182
|
-
if (this.
|
|
159
|
+
if (event.key === 'ArrowUp') {
|
|
160
|
+
event.preventDefault();
|
|
161
|
+
if (this.currentIndex === 0) {
|
|
162
|
+
this._dropdownElement.close();
|
|
163
|
+
this._inputElement.focus();
|
|
164
|
+
}
|
|
165
|
+
if (!this.dropdownVisible || this.currentIndex === null) {
|
|
166
|
+
this.currentIndex = this._items.length - 1;
|
|
167
|
+
this._dropdownElement.open();
|
|
168
|
+
this._dropdownElement.focusItem(this.currentIndex);
|
|
183
169
|
return;
|
|
184
|
-
|
|
170
|
+
}
|
|
171
|
+
this.currentIndex = Math.max(this.currentIndex - 1, 0);
|
|
185
172
|
this._dropdownElement.focusItem(this.currentIndex);
|
|
186
173
|
}
|
|
187
|
-
if (
|
|
188
|
-
|
|
189
|
-
this._showMenu();
|
|
174
|
+
if (event.key === ' ') {
|
|
175
|
+
event.preventDefault();
|
|
190
176
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
this.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
this._id =
|
|
203
|
-
(_b = (_a = this.hostId) === null || _a === void 0 ? void 0 : _a.replace(/[^a-zA-Z0-9-_]/g, '')) !== null && _b !== void 0 ? _b : CSelect._uniqueId.toString();
|
|
204
|
-
this._inputId =
|
|
205
|
-
'input-' +
|
|
206
|
-
(this.hostId || this.label || this.placeholder)
|
|
207
|
-
.replace(/[^a-zA-Z0-9-_]/g, '')
|
|
208
|
-
.toLowerCase();
|
|
209
|
-
this._setInitialValue();
|
|
210
|
-
}
|
|
211
|
-
_setInitialValue() {
|
|
212
|
-
if (!this.value)
|
|
213
|
-
return;
|
|
214
|
-
const value = this.returnValue
|
|
215
|
-
? this.value
|
|
216
|
-
: this.value.value;
|
|
217
|
-
this.internals.setFormValue(value);
|
|
218
|
-
}
|
|
219
|
-
componentDidLoad() {
|
|
220
|
-
this._getOptionItems();
|
|
221
|
-
if ((this.value || typeof this.value === 'boolean') &&
|
|
222
|
-
!this.currentIndex &&
|
|
223
|
-
this.currentIndex !== 0) {
|
|
224
|
-
this.currentIndex = this._items.findIndex((item) => item.value === this.value);
|
|
177
|
+
if (event.key === 'Enter') {
|
|
178
|
+
event.preventDefault();
|
|
179
|
+
if (this.currentIndex === null)
|
|
180
|
+
return;
|
|
181
|
+
this._dropdownElement.selectItem(this.currentIndex);
|
|
182
|
+
}
|
|
183
|
+
if (event.key === 'Home' && this.dropdownVisible) {
|
|
184
|
+
this.currentIndex = 0;
|
|
185
|
+
}
|
|
186
|
+
if (event.key === 'End' && this.dropdownVisible) {
|
|
187
|
+
this.currentIndex = this._items.length - 1;
|
|
225
188
|
}
|
|
226
189
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
this._scrollToElement();
|
|
234
|
-
}
|
|
235
|
-
async setActiveDescendant(id) {
|
|
236
|
-
this._inputElement.setAttribute('aria-activedescendant', id);
|
|
237
|
-
}
|
|
238
|
-
_showMenu() {
|
|
239
|
-
if (this.disabled)
|
|
240
|
-
return;
|
|
241
|
-
this.menuVisible = true;
|
|
242
|
-
this._dropdownElement.open();
|
|
243
|
-
}
|
|
244
|
-
_getOptionItems() {
|
|
245
|
-
requestAnimationFrame(() => {
|
|
246
|
-
this._cOptionElements = {};
|
|
247
|
-
let selection = null;
|
|
248
|
-
this._optionItems = (this.el ? Array.from(this.el.querySelectorAll('c-option')) : []).map((item, index) => {
|
|
249
|
-
const cSelectItem = {
|
|
250
|
-
value: item.value,
|
|
251
|
-
name: item.name || item.innerText,
|
|
252
|
-
disabled: !!item.disabled,
|
|
253
|
-
};
|
|
254
|
-
if (item.selected) {
|
|
255
|
-
selection = cSelectItem;
|
|
256
|
-
}
|
|
257
|
-
item.slot = `option-${index}`;
|
|
258
|
-
this._cOptionElements[item.value.toString()] = item;
|
|
259
|
-
return cSelectItem;
|
|
190
|
+
onDropdownStateChange(event) {
|
|
191
|
+
const isOpen = event.detail;
|
|
192
|
+
this.dropdownVisible = isOpen;
|
|
193
|
+
if (!isOpen) {
|
|
194
|
+
requestAnimationFrame(() => {
|
|
195
|
+
this.currentIndex = null;
|
|
260
196
|
});
|
|
261
|
-
this.hasOptionItems = !!this._optionItems.length;
|
|
262
|
-
if (selection) {
|
|
263
|
-
this._valueChangedHandler(selection);
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
_runValidate() {
|
|
268
|
-
if (this.required &&
|
|
269
|
-
!this.value &&
|
|
270
|
-
(this._blurred || !this.validateOnBlur)) {
|
|
271
|
-
this._outerWrapperClasses.push('required');
|
|
272
|
-
this._validationClasses.push('show');
|
|
273
|
-
}
|
|
274
|
-
else {
|
|
275
|
-
this._outerWrapperClasses = this._outerWrapperClasses.filter((c) => c !== 'required');
|
|
276
|
-
this._validationClasses = this._validationClasses.filter((c) => c !== 'show');
|
|
277
197
|
}
|
|
278
198
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
199
|
+
onSelectOption(event) {
|
|
200
|
+
this._dropdownElement.close();
|
|
201
|
+
const { name, value } = event.detail;
|
|
202
|
+
if (this.optionElementsExist && this.optionAsSelection) {
|
|
203
|
+
const selection = Array.from(this.optionElements).find((item) => item.value === value && item.name === name);
|
|
204
|
+
if (!selection)
|
|
205
|
+
return;
|
|
206
|
+
const clone = selection.cloneNode(true);
|
|
207
|
+
this._selectionElement.classList.add('c-input-menu__selection--show');
|
|
208
|
+
this._selectionElement.replaceChildren(clone);
|
|
209
|
+
}
|
|
210
|
+
this.changeValue.emit(this.returnObject ? event.detail : value);
|
|
211
|
+
this._preventDialogOpen = true;
|
|
212
|
+
this._inputElement.focus();
|
|
285
213
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
214
|
+
_updateInput() {
|
|
215
|
+
this._dropdownElement.open();
|
|
216
|
+
this._dropdownElement.updateList();
|
|
289
217
|
}
|
|
290
218
|
_updateStatusText() {
|
|
291
219
|
if (this._debounce !== null) {
|
|
@@ -293,31 +221,52 @@ const CSelect = class {
|
|
|
293
221
|
this._debounce = null;
|
|
294
222
|
}
|
|
295
223
|
this._debounce = window.setTimeout(() => {
|
|
296
|
-
|
|
297
|
-
|
|
224
|
+
this.statusText = '';
|
|
225
|
+
if (this.currentIndex === null) {
|
|
226
|
+
this.statusText = this._items.length
|
|
227
|
+
? `${this._items.length} option${this._items.length !== 1 ? 's' : ''} available`
|
|
228
|
+
: 'No options available';
|
|
229
|
+
}
|
|
298
230
|
const ending = !!this._items.length
|
|
299
|
-
? ',
|
|
231
|
+
? ', navigate using the up and down arrows'
|
|
300
232
|
: '';
|
|
301
|
-
|
|
302
|
-
const beginning = isDisabled ? 'Disabled option - ' : '';
|
|
303
|
-
const selectionText = !!selection
|
|
304
|
-
? `${beginning}${selection.dataset.value} - ${selection.ariaPosInSet} of ${selection.ariaSetSize} is highlighted`
|
|
305
|
-
: null;
|
|
306
|
-
this.statusText = `${selectionText || ending}`;
|
|
233
|
+
this._dropdownElement.setStatusText(this.statusText + ending);
|
|
307
234
|
this._debounce = null;
|
|
308
235
|
}, 1400);
|
|
309
236
|
}
|
|
310
|
-
|
|
237
|
+
componentWillLoad() {
|
|
238
|
+
CSelect._uniqueId += 1;
|
|
239
|
+
this._inputId =
|
|
240
|
+
'input_' +
|
|
241
|
+
(this.hostId || this.label || this.placeholder).replace(/[^a-zA-Z0-9-_]/g, '');
|
|
242
|
+
}
|
|
243
|
+
_renderLoader() {
|
|
244
|
+
return index.h("c-spinner", { color: "var(--_c-autocomplete-active-color)", size: 20 });
|
|
245
|
+
}
|
|
246
|
+
_renderChevron() {
|
|
247
|
+
const classes = {
|
|
248
|
+
'c-input-menu__chevron': true,
|
|
249
|
+
'c-input-menu__chevron--active': this.dropdownVisible,
|
|
250
|
+
};
|
|
251
|
+
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 })));
|
|
252
|
+
}
|
|
253
|
+
_renderInputElement() {
|
|
311
254
|
var _a;
|
|
312
|
-
return (index.h(
|
|
255
|
+
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" })));
|
|
256
|
+
}
|
|
257
|
+
_renderReset() {
|
|
258
|
+
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 })));
|
|
259
|
+
}
|
|
260
|
+
render() {
|
|
261
|
+
const itemType = this.optionElementsExist ? 'option' : 'item';
|
|
262
|
+
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 &&
|
|
263
|
+
this.value &&
|
|
264
|
+
this.clearable &&
|
|
265
|
+
this._renderReset(), !this.loading &&
|
|
266
|
+
(!this.value || !this.clearable) &&
|
|
267
|
+
this._renderChevron(), index.h("slot", { onSlotchange: () => this._onSlotChange() })), index.h("slot", { name: "post", slot: "post" })))));
|
|
313
268
|
}
|
|
314
|
-
static get formAssociated() { return true; }
|
|
315
269
|
get el() { return index.getElement(this); }
|
|
316
|
-
static get watchers() { return {
|
|
317
|
-
"value": ["onValueChange"],
|
|
318
|
-
"validate": ["validateChange"],
|
|
319
|
-
"currentIndex": ["onCurrentIndexChange"]
|
|
320
|
-
}; }
|
|
321
270
|
};
|
|
322
271
|
CSelect._uniqueId = 0;
|
|
323
272
|
CSelect.style = cSelectCss;
|