@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
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { e as mdiChevronDown } from './mdi.js';
|
|
3
|
-
import { d as defineCustomElement$
|
|
4
|
-
import { d as defineCustomElement$
|
|
5
|
-
import { d as defineCustomElement$
|
|
6
|
-
import { d as defineCustomElement$
|
|
2
|
+
import { e as mdiChevronDown, f as mdiClose } from './mdi.js';
|
|
3
|
+
import { d as defineCustomElement$9 } from './c-badge2.js';
|
|
4
|
+
import { d as defineCustomElement$8 } from './c-dropdown2.js';
|
|
5
|
+
import { d as defineCustomElement$7 } from './c-icon2.js';
|
|
6
|
+
import { d as defineCustomElement$6 } from './c-icon-button2.js';
|
|
7
|
+
import { d as defineCustomElement$5 } from './c-input2.js';
|
|
8
|
+
import { d as defineCustomElement$4 } from './c-message2.js';
|
|
9
|
+
import { d as defineCustomElement$3 } from './c-ripple2.js';
|
|
10
|
+
import { d as defineCustomElement$2 } from './c-spinner2.js';
|
|
7
11
|
|
|
8
|
-
const cAutocompleteCss = "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-autocomplete-option-background-color:var(--c-autocomplete-option-background-color
|
|
12
|
+
const cAutocompleteCss = "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-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}";
|
|
9
13
|
|
|
10
14
|
const CAutocomplete$1 = proxyCustomElement(class CAutocomplete extends HTMLElement {
|
|
11
15
|
constructor() {
|
|
@@ -14,298 +18,314 @@ const CAutocomplete$1 = proxyCustomElement(class CAutocomplete extends HTMLEleme
|
|
|
14
18
|
this.__attachShadow();
|
|
15
19
|
this.changeQuery = createEvent(this, "changeQuery", 7);
|
|
16
20
|
this.changeValue = createEvent(this, "changeValue", 3);
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
19
|
-
this._optionItems = [];
|
|
20
|
-
this._direction = null;
|
|
21
|
-
this._observer = new IntersectionObserver((entries, observer) => {
|
|
22
|
-
entries.forEach((entry) => {
|
|
23
|
-
if (!entry.isIntersecting) {
|
|
24
|
-
entry.target.scrollIntoView({
|
|
25
|
-
block: this._direction,
|
|
26
|
-
inline: 'nearest',
|
|
27
|
-
});
|
|
28
|
-
observer.unobserve(entry.target);
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
observer.unobserve(entry.target);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}, { threshold: 1 });
|
|
21
|
+
this._preventDialogOpen = false;
|
|
22
|
+
this._debounce = null;
|
|
35
23
|
this._handleSlotChange = () => {
|
|
36
|
-
this.
|
|
24
|
+
this.optionElements = this.el.querySelectorAll('c-option');
|
|
25
|
+
if (this.optionElements.length && !this.optionElementsExist) {
|
|
26
|
+
this.optionElementsExist = true;
|
|
27
|
+
}
|
|
37
28
|
};
|
|
38
|
-
this.
|
|
29
|
+
this._toggleDropdown = (event) => {
|
|
30
|
+
event.stopPropagation();
|
|
31
|
+
if (this.dropdownVisible) {
|
|
32
|
+
this._dropdownElement.close();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
this._dropdownElement.open();
|
|
36
|
+
};
|
|
37
|
+
this._onButtonKeyDown = (src, event) => {
|
|
38
|
+
event.stopPropagation();
|
|
39
|
+
if (event.key !== 'Tab')
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
if (['Enter', ' '].includes(event.key)) {
|
|
42
|
+
if (src === 'chevron') {
|
|
43
|
+
this._toggleDropdown(event);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
this._reset(event);
|
|
47
|
+
this._preventDialogOpen = true;
|
|
48
|
+
this._inputElement.focus();
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
this._reset = (event) => {
|
|
52
|
+
event.stopPropagation();
|
|
53
|
+
this.query = '';
|
|
54
|
+
this.changeValue.emit(null);
|
|
55
|
+
this.changeQuery.emit('');
|
|
56
|
+
this._preventDialogOpen = true;
|
|
57
|
+
this._cInputElement.reset();
|
|
58
|
+
this._inputElement.focus();
|
|
59
|
+
this._dropdownElement.updateList();
|
|
60
|
+
};
|
|
61
|
+
this._onInputFocus = () => {
|
|
62
|
+
if (!this._preventDialogOpen) {
|
|
63
|
+
this._dropdownElement.open();
|
|
64
|
+
}
|
|
65
|
+
this._updateStatusText();
|
|
66
|
+
this._preventDialogOpen = false;
|
|
67
|
+
};
|
|
68
|
+
this.items = [];
|
|
69
|
+
this.value = null;
|
|
70
|
+
this.query = null;
|
|
71
|
+
this.hostId = undefined;
|
|
39
72
|
this.disabled = false;
|
|
73
|
+
this.label = undefined;
|
|
74
|
+
this.name = undefined;
|
|
75
|
+
this.placeholder = '';
|
|
40
76
|
this.hideDetails = false;
|
|
41
77
|
this.hint = '';
|
|
42
|
-
this.
|
|
43
|
-
this.shadow = false;
|
|
44
|
-
this.name = undefined;
|
|
45
|
-
this.label = undefined;
|
|
46
|
-
this.query = null;
|
|
47
|
-
this.value = null;
|
|
48
|
-
this.dense = undefined;
|
|
78
|
+
this.loading = false;
|
|
49
79
|
this.required = false;
|
|
50
80
|
this.valid = true;
|
|
51
81
|
this.validate = false;
|
|
52
82
|
this.validateOnBlur = false;
|
|
53
83
|
this.validation = 'Required field';
|
|
54
|
-
this.
|
|
55
|
-
this.
|
|
56
|
-
this.
|
|
57
|
-
this.
|
|
58
|
-
this.optionAsSelection = undefined;
|
|
59
|
-
this.menuVisible = false;
|
|
84
|
+
this.shadow = false;
|
|
85
|
+
this.returnObject = false;
|
|
86
|
+
this.itemsPerPage = 6;
|
|
87
|
+
this.optionElements = undefined;
|
|
60
88
|
this.currentIndex = null;
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
89
|
+
this.dropdownVisible = false;
|
|
90
|
+
this.statusText = '';
|
|
91
|
+
this.optionElementsExist = false;
|
|
63
92
|
}
|
|
64
|
-
|
|
65
|
-
this.
|
|
93
|
+
get _id() {
|
|
94
|
+
return this.hostId || `autocomplete_${CAutocomplete._uniqueId}`;
|
|
66
95
|
}
|
|
67
|
-
async
|
|
68
|
-
this.
|
|
96
|
+
async reset() {
|
|
97
|
+
this.query = '';
|
|
98
|
+
this.changeValue.emit(null);
|
|
99
|
+
this.changeQuery.emit('');
|
|
100
|
+
this._dropdownElement.updateList();
|
|
69
101
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
102
|
+
handleKeyDown(event) {
|
|
103
|
+
const alphanumeric = /^[0-9a-zA-Z ]+$/;
|
|
104
|
+
if (event.key.match(alphanumeric) && event.key.length === 1) {
|
|
105
|
+
if (!this.dropdownVisible) {
|
|
106
|
+
this._dropdownElement.open();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
this._inputElement.focus();
|
|
73
110
|
return;
|
|
74
111
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
async onItemSelection(index) {
|
|
83
|
-
this.currentIndex = index;
|
|
84
|
-
const selectedItem = this._items[this.currentIndex];
|
|
85
|
-
this.value = selectedItem;
|
|
86
|
-
this.query = selectedItem.name;
|
|
87
|
-
}
|
|
88
|
-
_setFormValue(item) {
|
|
89
|
-
if (!item)
|
|
112
|
+
if (event.key === 'Escape') {
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
this._preventDialogOpen = true;
|
|
115
|
+
this._dropdownElement.close();
|
|
116
|
+
requestAnimationFrame(() => {
|
|
117
|
+
this._inputElement.focus();
|
|
118
|
+
});
|
|
90
119
|
return;
|
|
91
|
-
const value = this.returnValue ? item : item.value;
|
|
92
|
-
this.internals.setFormValue(value);
|
|
93
|
-
}
|
|
94
|
-
_valueChangedHandler(item) {
|
|
95
|
-
function isItem(element) {
|
|
96
|
-
return element === item;
|
|
97
120
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
get _items() {
|
|
104
|
-
return this.hasOptionItems ? this._optionItems : this.items;
|
|
105
|
-
}
|
|
106
|
-
get _itemValues() {
|
|
107
|
-
return this.items.map((item) => item.value);
|
|
108
|
-
}
|
|
109
|
-
get _filteredOptions() {
|
|
110
|
-
if (!Object.keys(this._cOptionElements).length)
|
|
111
|
-
return {};
|
|
112
|
-
return this._itemValues.reduce((items, item) => {
|
|
113
|
-
if (!this._cOptionElements[item])
|
|
114
|
-
return items;
|
|
115
|
-
items[item] = this._cOptionElements[item].cloneNode(true);
|
|
116
|
-
return items;
|
|
117
|
-
}, {});
|
|
118
|
-
}
|
|
119
|
-
watchHandler(items) {
|
|
120
|
-
this.currentIndex = !!items.length ? 0 : null;
|
|
121
|
-
this._optionItems = this._optionItems.filter((item) => this._itemValues.includes(item.value));
|
|
122
|
-
requestAnimationFrame(async () => {
|
|
123
|
-
await this._dropdownElement.updateDropdown({
|
|
124
|
-
items: items,
|
|
125
|
-
options: this._filteredOptions,
|
|
121
|
+
if (event.key === 'Tab') {
|
|
122
|
+
this._inputElement.focus();
|
|
123
|
+
requestAnimationFrame(() => {
|
|
124
|
+
this._dropdownElement.close();
|
|
126
125
|
});
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
onValueChange() {
|
|
130
|
-
if (!this.value)
|
|
131
126
|
return;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
this.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
if (ev.key.match(alphanumeric) && ev.key.length === 1) {
|
|
143
|
-
this._showMenu(false);
|
|
144
|
-
if (!this.query) {
|
|
145
|
-
this.updateQuery(ev.key);
|
|
127
|
+
}
|
|
128
|
+
if (event.key === 'ArrowDown') {
|
|
129
|
+
event.preventDefault();
|
|
130
|
+
if (!this._items.length)
|
|
131
|
+
return;
|
|
132
|
+
if (!this.dropdownVisible || this.currentIndex === null) {
|
|
133
|
+
this.currentIndex = 0;
|
|
134
|
+
this._dropdownElement.open();
|
|
135
|
+
this._dropdownElement.focusItem(this.currentIndex);
|
|
136
|
+
return;
|
|
146
137
|
}
|
|
147
|
-
this.
|
|
138
|
+
this.currentIndex = Math.min(this.currentIndex + 1, this._items.length - 1);
|
|
139
|
+
this._dropdownElement.focusItem(this.currentIndex);
|
|
140
|
+
return;
|
|
148
141
|
}
|
|
149
|
-
if (
|
|
150
|
-
|
|
142
|
+
if (event.key === 'ArrowUp') {
|
|
143
|
+
event.preventDefault();
|
|
144
|
+
if (this.currentIndex === 0) {
|
|
145
|
+
this._dropdownElement.close();
|
|
146
|
+
this._inputElement.focus();
|
|
147
|
+
}
|
|
148
|
+
if (!this.dropdownVisible || this.currentIndex === null) {
|
|
149
|
+
this.currentIndex = this._items.length - 1;
|
|
150
|
+
this._dropdownElement.open();
|
|
151
|
+
this._dropdownElement.focusItem(this.currentIndex);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
this.currentIndex = Math.max(this.currentIndex - 1, 0);
|
|
155
|
+
this._dropdownElement.focusItem(this.currentIndex);
|
|
151
156
|
}
|
|
152
|
-
if (
|
|
153
|
-
|
|
154
|
-
this.
|
|
155
|
-
|
|
157
|
+
if (event.key === 'Enter') {
|
|
158
|
+
event.preventDefault();
|
|
159
|
+
if (this.currentIndex === null)
|
|
160
|
+
return;
|
|
161
|
+
this._dropdownElement.selectItem(this.currentIndex);
|
|
156
162
|
}
|
|
157
|
-
if (
|
|
158
|
-
|
|
159
|
-
this._dropdownElement.open();
|
|
160
|
-
this._dropdownElement.focusItem(this._items.length - 1);
|
|
163
|
+
if (event.key === 'Home' && this.dropdownVisible) {
|
|
164
|
+
this.currentIndex = 0;
|
|
161
165
|
}
|
|
162
|
-
if (
|
|
163
|
-
|
|
164
|
-
this._showMenu();
|
|
166
|
+
if (event.key === 'End' && this.dropdownVisible) {
|
|
167
|
+
this.currentIndex = this._items.length - 1;
|
|
165
168
|
}
|
|
166
169
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
onDropdownStateChange(event) {
|
|
171
|
+
const isOpen = event.detail;
|
|
172
|
+
this.dropdownVisible = isOpen;
|
|
173
|
+
if (!isOpen) {
|
|
174
|
+
requestAnimationFrame(() => {
|
|
175
|
+
this.currentIndex = null;
|
|
176
|
+
});
|
|
173
177
|
}
|
|
174
178
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
name: item.name || item.innerText,
|
|
183
|
-
disabled: !!item.disabled,
|
|
184
|
-
};
|
|
185
|
-
if (item.selected) {
|
|
186
|
-
selection = cAutocompleteItem;
|
|
187
|
-
}
|
|
188
|
-
item.slot = `option-${index}`;
|
|
189
|
-
this.options[item.value] = item.cloneNode(true);
|
|
190
|
-
this._cOptionElements[item.value.toString()] = item.cloneNode(true);
|
|
191
|
-
return cAutocompleteItem;
|
|
192
|
-
});
|
|
193
|
-
this.hasOptionItems = !!this._optionItems.length;
|
|
194
|
-
if (selection) {
|
|
195
|
-
this._valueChangedHandler(selection);
|
|
196
|
-
}
|
|
197
|
-
});
|
|
179
|
+
onSelectOption(event) {
|
|
180
|
+
this._dropdownElement.close();
|
|
181
|
+
this.changeValue.emit(this.returnObject ? event.detail : event.detail.value);
|
|
182
|
+
this.query = event.detail.name;
|
|
183
|
+
this.changeQuery.emit(event.detail.name);
|
|
184
|
+
this._preventDialogOpen = true;
|
|
185
|
+
this._inputElement.focus();
|
|
198
186
|
}
|
|
199
|
-
|
|
200
|
-
this.
|
|
187
|
+
handleQueryChange() {
|
|
188
|
+
this._updateStatusText();
|
|
189
|
+
}
|
|
190
|
+
_updateInput(event) {
|
|
191
|
+
this._dropdownElement.open();
|
|
201
192
|
this.query = event.target.value;
|
|
202
193
|
this.changeQuery.emit(this.query);
|
|
203
|
-
this.
|
|
194
|
+
this._dropdownElement.updateList();
|
|
204
195
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
event.stopPropagation();
|
|
208
|
-
this.query = item.name;
|
|
209
|
-
this.value = item;
|
|
210
|
-
this._valueChangedHandler(item);
|
|
211
|
-
this.menuVisible = false;
|
|
212
|
-
}
|
|
213
|
-
componentWillLoad() {
|
|
214
|
-
CAutocomplete._uniqueId += 1;
|
|
215
|
-
this._inputId =
|
|
216
|
-
'input_' +
|
|
217
|
-
(this.hostId || this.label || this.placeholder).replace(/[^a-zA-Z0-9-_]/g, '');
|
|
218
|
-
}
|
|
219
|
-
componentDidLoad() {
|
|
220
|
-
this._getOptionItems();
|
|
221
|
-
}
|
|
222
|
-
disconnectedCallback() {
|
|
223
|
-
this._observer.disconnect();
|
|
196
|
+
_renderLoader() {
|
|
197
|
+
return h("c-spinner", { color: "var(--_c-autocomplete-active-color)", size: 20 });
|
|
224
198
|
}
|
|
225
199
|
_renderChevron() {
|
|
226
200
|
const classes = {
|
|
227
201
|
'c-input-menu__chevron': true,
|
|
228
|
-
'c-input-menu__chevron--active': this.
|
|
202
|
+
'c-input-menu__chevron--active': this.dropdownVisible,
|
|
229
203
|
};
|
|
230
|
-
return (h("
|
|
204
|
+
return (h("c-icon-button", { size: "x-small", class: classes, text: true, onClick: (event) => this._toggleDropdown(event), onKeyDown: (event) => this._onButtonKeyDown('chevron', event) }, h("c-icon", { path: mdiChevronDown, size: 24 })));
|
|
205
|
+
}
|
|
206
|
+
_renderReset() {
|
|
207
|
+
return (h("c-icon-button", { "aria-label": "", size: "x-small", text: true, onClick: (event) => this._reset(event), onKeyDown: (event) => this._onButtonKeyDown('reset', event) }, h("c-icon", { path: mdiClose, size: 20 })));
|
|
231
208
|
}
|
|
232
209
|
_renderInputElement() {
|
|
233
210
|
var _a;
|
|
234
|
-
return (h("div", { class: "c-input-menu__input" }, h("input", { type: "text", ref: (el) => (this._inputElement = el), "aria-expanded": this.
|
|
211
|
+
return (h("div", { class: "c-input-menu__input" }, 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: (event) => this._updateInput(event), onFocus: () => this._onInputFocus() })));
|
|
212
|
+
}
|
|
213
|
+
componentWillLoad() {
|
|
214
|
+
CAutocomplete._uniqueId += 1;
|
|
215
|
+
this._inputId =
|
|
216
|
+
'input_' +
|
|
217
|
+
(this.hostId || this.label || this.placeholder).replace(/[^a-zA-Z0-9-_]/g, '');
|
|
218
|
+
}
|
|
219
|
+
get _items() {
|
|
220
|
+
return this.optionElementsExist ? this.optionElements : this.items;
|
|
221
|
+
}
|
|
222
|
+
_updateStatusText() {
|
|
223
|
+
if (this._debounce !== null) {
|
|
224
|
+
clearTimeout(this._debounce);
|
|
225
|
+
this._debounce = null;
|
|
226
|
+
}
|
|
227
|
+
this._debounce = window.setTimeout(() => {
|
|
228
|
+
const ending = !!this._items.length
|
|
229
|
+
? ' or navigate using the up and down arrows'
|
|
230
|
+
: '';
|
|
231
|
+
if (this.currentIndex === null) {
|
|
232
|
+
this.statusText = this._items.length
|
|
233
|
+
? `${this._items.length} result${this._items.length !== 1 ? 's' : ''} available`
|
|
234
|
+
: 'No search results available';
|
|
235
|
+
}
|
|
236
|
+
if (this.query !== null && this._items.length) {
|
|
237
|
+
this.statusText += ', input a search query to filter the results';
|
|
238
|
+
}
|
|
239
|
+
this._dropdownElement.setStatusText(this.statusText + ending);
|
|
240
|
+
this._debounce = null;
|
|
241
|
+
}, 1400);
|
|
235
242
|
}
|
|
236
243
|
render() {
|
|
237
|
-
|
|
244
|
+
const itemType = this.optionElementsExist ? 'option' : 'item';
|
|
245
|
+
return (h(Host, null, 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: "autocomplete" }, 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.query, variant: "select" }, h("slot", { name: "pre", slot: "pre" }), h("div", { class: "c-input__content" }, this._renderInputElement(), this.loading && this._renderLoader(), !this.loading && this.value && this._renderReset(), !this.loading && !this.value && this._renderChevron(), h("slot", { onSlotchange: () => this._handleSlotChange() })), h("slot", { name: "post", slot: "post" })))));
|
|
238
246
|
}
|
|
239
|
-
static get formAssociated() { return true; }
|
|
240
247
|
get el() { return this; }
|
|
241
248
|
static get watchers() { return {
|
|
242
|
-
"
|
|
243
|
-
"value": ["onValueChange"]
|
|
249
|
+
"query": ["handleQueryChange"]
|
|
244
250
|
}; }
|
|
245
251
|
static get style() { return cAutocompleteCss; }
|
|
246
|
-
}, [
|
|
247
|
-
"
|
|
252
|
+
}, [1, "c-autocomplete", {
|
|
253
|
+
"items": [16],
|
|
254
|
+
"value": [8],
|
|
255
|
+
"query": [1],
|
|
256
|
+
"hostId": [1, "id"],
|
|
248
257
|
"disabled": [4],
|
|
258
|
+
"label": [1],
|
|
259
|
+
"name": [1],
|
|
260
|
+
"placeholder": [1],
|
|
249
261
|
"hideDetails": [4, "hide-details"],
|
|
250
262
|
"hint": [1],
|
|
251
|
-
"
|
|
252
|
-
"shadow": [4],
|
|
253
|
-
"name": [1],
|
|
254
|
-
"label": [1],
|
|
255
|
-
"query": [1025],
|
|
256
|
-
"value": [1032],
|
|
257
|
-
"dense": [4],
|
|
263
|
+
"loading": [4],
|
|
258
264
|
"required": [4],
|
|
259
265
|
"valid": [4],
|
|
260
266
|
"validate": [4],
|
|
261
267
|
"validateOnBlur": [4, "validate-on-blur"],
|
|
262
268
|
"validation": [1],
|
|
263
|
-
"
|
|
264
|
-
"
|
|
265
|
-
"items": [16],
|
|
269
|
+
"shadow": [4],
|
|
270
|
+
"returnObject": [4, "return-object"],
|
|
266
271
|
"itemsPerPage": [2, "items-per-page"],
|
|
267
|
-
"
|
|
268
|
-
"menuVisible": [32],
|
|
272
|
+
"optionElements": [32],
|
|
269
273
|
"currentIndex": [32],
|
|
270
|
-
"
|
|
271
|
-
"
|
|
272
|
-
"
|
|
273
|
-
"
|
|
274
|
-
|
|
275
|
-
"
|
|
276
|
-
"onItemSelection": [64]
|
|
277
|
-
}, [[1, "keydown", "handleKeyDown"]], {
|
|
278
|
-
"items": ["watchHandler"],
|
|
279
|
-
"value": ["onValueChange"]
|
|
274
|
+
"dropdownVisible": [32],
|
|
275
|
+
"statusText": [32],
|
|
276
|
+
"optionElementsExist": [32],
|
|
277
|
+
"reset": [64]
|
|
278
|
+
}, [[1, "keydown", "handleKeyDown"], [0, "dropdownStateChange", "onDropdownStateChange"], [0, "selectOption", "onSelectOption"]], {
|
|
279
|
+
"query": ["handleQueryChange"]
|
|
280
280
|
}]);
|
|
281
281
|
CAutocomplete$1._uniqueId = 0;
|
|
282
282
|
function defineCustomElement$1() {
|
|
283
283
|
if (typeof customElements === "undefined") {
|
|
284
284
|
return;
|
|
285
285
|
}
|
|
286
|
-
const components = ["c-autocomplete", "c-dropdown", "c-icon", "c-input", "c-message"];
|
|
286
|
+
const components = ["c-autocomplete", "c-badge", "c-dropdown", "c-icon", "c-icon-button", "c-input", "c-message", "c-ripple", "c-spinner"];
|
|
287
287
|
components.forEach(tagName => { switch (tagName) {
|
|
288
288
|
case "c-autocomplete":
|
|
289
289
|
if (!customElements.get(tagName)) {
|
|
290
290
|
customElements.define(tagName, CAutocomplete$1);
|
|
291
291
|
}
|
|
292
292
|
break;
|
|
293
|
+
case "c-badge":
|
|
294
|
+
if (!customElements.get(tagName)) {
|
|
295
|
+
defineCustomElement$9();
|
|
296
|
+
}
|
|
297
|
+
break;
|
|
293
298
|
case "c-dropdown":
|
|
294
299
|
if (!customElements.get(tagName)) {
|
|
295
|
-
defineCustomElement$
|
|
300
|
+
defineCustomElement$8();
|
|
296
301
|
}
|
|
297
302
|
break;
|
|
298
303
|
case "c-icon":
|
|
299
304
|
if (!customElements.get(tagName)) {
|
|
300
|
-
defineCustomElement$
|
|
305
|
+
defineCustomElement$7();
|
|
306
|
+
}
|
|
307
|
+
break;
|
|
308
|
+
case "c-icon-button":
|
|
309
|
+
if (!customElements.get(tagName)) {
|
|
310
|
+
defineCustomElement$6();
|
|
301
311
|
}
|
|
302
312
|
break;
|
|
303
313
|
case "c-input":
|
|
304
314
|
if (!customElements.get(tagName)) {
|
|
305
|
-
defineCustomElement$
|
|
315
|
+
defineCustomElement$5();
|
|
306
316
|
}
|
|
307
317
|
break;
|
|
308
318
|
case "c-message":
|
|
319
|
+
if (!customElements.get(tagName)) {
|
|
320
|
+
defineCustomElement$4();
|
|
321
|
+
}
|
|
322
|
+
break;
|
|
323
|
+
case "c-ripple":
|
|
324
|
+
if (!customElements.get(tagName)) {
|
|
325
|
+
defineCustomElement$3();
|
|
326
|
+
}
|
|
327
|
+
break;
|
|
328
|
+
case "c-spinner":
|
|
309
329
|
if (!customElements.get(tagName)) {
|
|
310
330
|
defineCustomElement$2();
|
|
311
331
|
}
|