@ukic/canary-web-components 3.0.0-canary.32 → 3.0.0-canary.33
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/core.cjs.js +1 -1
- package/dist/cjs/{helpers-6f4b406b.js → helpers-f81fed28.js} +37 -1
- package/dist/cjs/helpers-f81fed28.js.map +1 -0
- package/dist/cjs/ic-calendar_2.cjs.entry.js +2 -2
- package/dist/cjs/ic-calendar_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox_3.cjs.entry.js +11 -7
- package/dist/cjs/ic-checkbox_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +11 -8
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +8 -4
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-table-of-contents.cjs.entry.js +1 -1
- package/dist/cjs/ic-time-input.cjs.entry.js +401 -99
- package/dist/cjs/ic-time-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-time-selector.cjs.entry.js +842 -0
- package/dist/cjs/ic-time-selector.cjs.entry.js.map +1 -0
- package/dist/cjs/{ic-toggle-button.cjs.entry.js → ic-toggle-button_2.cjs.entry.js} +274 -1
- package/dist/cjs/ic-toggle-button_2.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-tree-item.cjs.entry.js +3 -3
- package/dist/cjs/ic-tree-view.cjs.entry.js +4 -4
- package/dist/cjs/index-d337cd8a.js +8 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ic-calendar/ic-calendar.css +8 -6
- package/dist/collection/components/ic-calendar/ic-calendar.stories.js +13 -0
- package/dist/collection/components/ic-calendar/ic-calendar.stories.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.js +10 -7
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +30 -6
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/components/ic-time-input/ic-time-input.css +21 -3
- package/dist/collection/components/ic-time-input/ic-time-input.js +434 -106
- package/dist/collection/components/ic-time-input/ic-time-input.js.map +1 -1
- package/dist/collection/components/ic-time-input/ic-time-input.stories.js +58 -9
- package/dist/collection/components/ic-time-input/ic-time-input.stories.js.map +1 -1
- package/dist/collection/components/ic-time-input/test/helpers/ic-time-input.js +2 -0
- package/dist/collection/components/ic-time-input/test/helpers/ic-time-input.js.map +1 -1
- package/dist/collection/components/ic-time-selector/ic-time-selector.css +293 -0
- package/dist/collection/components/ic-time-selector/ic-time-selector.js +1075 -0
- package/dist/collection/components/ic-time-selector/ic-time-selector.js.map +1 -0
- package/dist/collection/components/ic-time-selector/ic-time-selector.stories.js +166 -0
- package/dist/collection/components/ic-time-selector/ic-time-selector.stories.js.map +1 -0
- package/dist/collection/components/ic-time-selector/ic-time-selector.types.js +2 -0
- package/dist/collection/components/ic-time-selector/ic-time-selector.types.js.map +1 -0
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +2 -2
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +3 -3
- package/dist/collection/utils/helpers.js +35 -0
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers2.js +36 -1
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-calendar2.js +1 -1
- package/dist/components/ic-calendar2.js.map +1 -1
- package/dist/components/ic-data-table.js +10 -7
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-pagination-bar2.js +11 -6
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-pagination2.js +9 -4
- package/dist/components/ic-pagination2.js.map +1 -1
- package/dist/components/ic-time-input.js +431 -112
- package/dist/components/ic-time-input.js.map +1 -1
- package/dist/components/ic-time-selector.d.ts +11 -0
- package/dist/components/ic-time-selector.js +898 -0
- package/dist/components/ic-time-selector.js.map +1 -0
- package/dist/components/ic-toggle-button-group.js +1 -299
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/{esm/ic-toggle-button-group.entry.js → components/ic-toggle-button-group2.js} +70 -13
- package/dist/components/ic-toggle-button-group2.js.map +1 -0
- package/dist/components/ic-toggle-button.js +1 -228
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/{esm/ic-toggle-button.entry.js → components/ic-toggle-button2.js} +65 -10
- package/dist/components/ic-toggle-button2.js.map +1 -0
- package/dist/components/ic-tree-item.js +2 -2
- package/dist/components/ic-tree-view.js +4 -4
- package/dist/core/core.css +28 -6
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-b80b08ae.entry.js → p-08f24329.entry.js} +2 -2
- package/dist/core/{p-615d474e.entry.js → p-14b8bf37.entry.js} +2 -2
- package/dist/core/{p-81f12581.entry.js → p-169ad948.entry.js} +2 -2
- package/dist/core/{p-847cbb16.entry.js → p-1d166343.entry.js} +2 -2
- package/dist/core/{p-b4bfaf8f.entry.js → p-201b41c7.entry.js} +2 -2
- package/dist/core/{p-24bac55f.entry.js → p-33509a89.entry.js} +2 -2
- package/dist/core/{p-e1920777.entry.js → p-3389625c.entry.js} +2 -2
- package/dist/core/{p-5a1cfb3c.entry.js → p-344752cb.entry.js} +2 -2
- package/dist/core/{p-6c238418.entry.js → p-348d7080.entry.js} +2 -2
- package/dist/core/{p-3ef2e98d.entry.js → p-39cdf5db.entry.js} +2 -2
- package/dist/core/{p-fd20470e.entry.js → p-496b314f.entry.js} +2 -2
- package/dist/core/{p-bd9a76d8.entry.js → p-508b6da3.entry.js} +2 -2
- package/dist/core/p-551a0fc1.entry.js +2 -0
- package/dist/core/p-551a0fc1.entry.js.map +1 -0
- package/dist/core/{p-f5cea10d.entry.js → p-5e6687a8.entry.js} +2 -2
- package/dist/core/{p-72171192.entry.js → p-60f4fe3a.entry.js} +2 -2
- package/dist/core/p-61c92598.entry.js +2 -0
- package/dist/core/p-61c92598.entry.js.map +1 -0
- package/dist/core/{p-e00e67ff.entry.js → p-6323da7a.entry.js} +2 -2
- package/dist/core/p-691dd972.entry.js +2 -0
- package/dist/core/p-691dd972.entry.js.map +1 -0
- package/dist/core/{p-c6c87e58.entry.js → p-6dfe0922.entry.js} +2 -2
- package/dist/core/p-71cc5909.entry.js +2 -0
- package/dist/core/p-71cc5909.entry.js.map +1 -0
- package/dist/core/{p-fd7f3b58.entry.js → p-770e92cd.entry.js} +2 -2
- package/dist/core/{p-7cf6b428.entry.js → p-79ead0e7.entry.js} +2 -2
- package/dist/core/{p-285892ef.entry.js → p-7b4b45cf.entry.js} +2 -2
- package/dist/core/{p-afedcfdb.entry.js → p-7efdbab8.entry.js} +2 -2
- package/dist/core/{p-96177a74.entry.js → p-802a4bd3.entry.js} +2 -2
- package/dist/core/p-829b34f9.js +2 -0
- package/dist/core/p-829b34f9.js.map +1 -0
- package/dist/core/{p-9a9605c3.entry.js → p-879c180d.entry.js} +2 -2
- package/dist/core/{p-3891ce53.entry.js → p-8830011c.entry.js} +2 -2
- package/dist/core/{p-444cd8d3.entry.js → p-8ab37b4d.entry.js} +2 -2
- package/dist/core/{p-c87cc0d1.entry.js → p-939025af.entry.js} +2 -2
- package/dist/core/{p-4992e9ac.entry.js → p-939b168a.entry.js} +2 -2
- package/dist/core/{p-5a4344cb.entry.js → p-9dea5764.entry.js} +2 -2
- package/dist/core/{p-af821831.entry.js → p-a88e61b2.entry.js} +2 -2
- package/dist/core/p-a88e61b2.entry.js.map +1 -0
- package/dist/core/{p-90611726.entry.js → p-a8a92e54.entry.js} +2 -2
- package/dist/core/{p-31f3fb15.entry.js → p-a94a7b71.entry.js} +2 -2
- package/dist/core/p-ad551a0c.entry.js +2 -0
- package/dist/core/p-ad551a0c.entry.js.map +1 -0
- package/dist/core/{p-ba75ed34.entry.js → p-b434bd7c.entry.js} +2 -2
- package/dist/core/{p-2188b483.entry.js → p-c0a7eed7.entry.js} +2 -2
- package/dist/core/{p-2bd2f38b.entry.js → p-c0b227d2.entry.js} +2 -2
- package/dist/core/{p-2646a629.entry.js → p-c32f043e.entry.js} +2 -2
- package/dist/core/{p-7a0f62c2.entry.js → p-c4b2774d.entry.js} +2 -2
- package/dist/core/{p-775b8dba.entry.js → p-c9525aac.entry.js} +2 -2
- package/dist/core/{p-7026afad.entry.js → p-ca05573a.entry.js} +2 -2
- package/dist/core/{p-8c580d88.entry.js → p-d0607a70.entry.js} +2 -2
- package/dist/core/{p-15c05eb8.entry.js → p-d528d856.entry.js} +2 -2
- package/dist/core/{p-0043b019.entry.js → p-da1c2883.entry.js} +2 -2
- package/dist/core/{p-ffc1cea6.entry.js → p-e2e556ec.entry.js} +2 -2
- package/dist/core/{p-e4ef4263.js → p-e519f607.js} +2 -2
- package/dist/core/{p-3f0bce15.entry.js → p-e5c6d01a.entry.js} +2 -2
- package/dist/core/{p-04a9f82f.entry.js → p-e8db8772.entry.js} +2 -2
- package/dist/core/{p-e4b82731.entry.js → p-ea04103e.entry.js} +2 -2
- package/dist/core/{p-9a95f428.entry.js → p-eaeb473e.entry.js} +2 -2
- package/dist/core/{p-8e592393.entry.js → p-ecc7fd71.entry.js} +2 -2
- package/dist/core/{p-6cfba272.entry.js → p-efe260f0.entry.js} +2 -2
- package/dist/core/{p-b6d6b26e.entry.js → p-f1b57f91.entry.js} +2 -2
- package/dist/core/{p-e4551a38.entry.js → p-f5dc04f7.entry.js} +2 -2
- package/dist/core/{p-25280383.entry.js → p-fb07921b.entry.js} +2 -2
- package/dist/core/p-fb07921b.entry.js.map +1 -0
- package/dist/core/{p-1900c7c7.entry.js → p-fd08156a.entry.js} +2 -2
- package/dist/core/{p-3594922d.entry.js → p-fe5b51bb.entry.js} +2 -2
- package/dist/core/{p-ef5b6622.entry.js → p-ff618439.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-5419eb6c.js → helpers-063369f4.js} +2 -2
- package/dist/esm/{helpers-5419eb6c.js.map → helpers-063369f4.js.map} +1 -1
- package/dist/esm/{helpers-9f228880.js → helpers-a08b3f32.js} +37 -2
- package/dist/esm/helpers-a08b3f32.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-action-chip.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-badge.entry.js +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +1 -1
- package/dist/esm/ic-calendar_2.entry.js +2 -2
- package/dist/esm/ic-calendar_2.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +1 -1
- package/dist/esm/ic-card-vertical.entry.js +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +1 -1
- package/dist/esm/ic-checkbox_3.entry.js +12 -8
- package/dist/esm/ic-checkbox_3.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
- package/dist/esm/ic-data-table.entry.js +11 -8
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +1 -1
- package/dist/esm/ic-footer.entry.js +1 -1
- package/dist/esm/ic-hero.entry.js +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
- package/dist/esm/ic-input-component-container_4.entry.js +1 -1
- package/dist/esm/ic-link.entry.js +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +1 -1
- package/dist/esm/ic-menu.entry.js +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +1 -1
- package/dist/esm/ic-pagination_4.entry.js +9 -5
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +1 -1
- package/dist/esm/ic-radio-group.entry.js +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js +1 -1
- package/dist/esm/ic-side-navigation.entry.js +1 -1
- package/dist/esm/ic-status-tag.entry.js +1 -1
- package/dist/esm/ic-step.entry.js +1 -1
- package/dist/esm/ic-stepper.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-table-of-contents.entry.js +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-time-input.entry.js +401 -99
- package/dist/esm/ic-time-input.entry.js.map +1 -1
- package/dist/esm/ic-time-selector.entry.js +838 -0
- package/dist/esm/ic-time-selector.entry.js.map +1 -0
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toggle-button_2.entry.js +449 -0
- package/dist/esm/ic-toggle-button_2.entry.js.map +1 -0
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-tree-item.entry.js +3 -3
- package/dist/esm/ic-tree-view.entry.js +4 -4
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/esm/index-a7a720e7.js +8 -8
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-calendar/ic-calendar.stories.d.ts +20 -14
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +4 -0
- package/dist/types/components/ic-time-input/ic-time-input.d.ts +26 -6
- package/dist/types/components/ic-time-input/ic-time-input.stories.d.ts +31 -7
- package/dist/types/components/ic-time-input/test/helpers/ic-time-input.d.ts +1 -0
- package/dist/types/components/ic-time-selector/ic-time-selector.d.ts +88 -0
- package/dist/types/components/ic-time-selector/ic-time-selector.stories.d.ts +99 -0
- package/dist/types/components/ic-time-selector/ic-time-selector.types.d.ts +1 -0
- package/dist/types/components.d.ts +147 -11
- package/dist/types/utils/helpers.d.ts +14 -0
- package/dist/types/utils/types.d.ts +2 -1
- package/hydrate/index.js +1356 -131
- package/hydrate/index.mjs +1356 -131
- package/package.json +30 -30
- package/dist/cjs/helpers-6f4b406b.js.map +0 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +0 -267
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +0 -1
- package/dist/core/p-25280383.entry.js.map +0 -1
- package/dist/core/p-2c86ce4b.entry.js +0 -2
- package/dist/core/p-2c86ce4b.entry.js.map +0 -1
- package/dist/core/p-5b32aaf3.entry.js +0 -2
- package/dist/core/p-5b32aaf3.entry.js.map +0 -1
- package/dist/core/p-80111272.entry.js +0 -2
- package/dist/core/p-80111272.entry.js.map +0 -1
- package/dist/core/p-9044539c.entry.js +0 -2
- package/dist/core/p-9044539c.entry.js.map +0 -1
- package/dist/core/p-af821831.entry.js.map +0 -1
- package/dist/core/p-c3eddb99.entry.js +0 -2
- package/dist/core/p-c3eddb99.entry.js.map +0 -1
- package/dist/core/p-f48ce5f6.js +0 -2
- package/dist/core/p-f48ce5f6.js.map +0 -1
- package/dist/esm/helpers-9f228880.js.map +0 -1
- package/dist/esm/ic-toggle-button-group.entry.js.map +0 -1
- package/dist/esm/ic-toggle-button.entry.js.map +0 -1
- /package/dist/core/{p-b80b08ae.entry.js.map → p-08f24329.entry.js.map} +0 -0
- /package/dist/core/{p-615d474e.entry.js.map → p-14b8bf37.entry.js.map} +0 -0
- /package/dist/core/{p-81f12581.entry.js.map → p-169ad948.entry.js.map} +0 -0
- /package/dist/core/{p-847cbb16.entry.js.map → p-1d166343.entry.js.map} +0 -0
- /package/dist/core/{p-b4bfaf8f.entry.js.map → p-201b41c7.entry.js.map} +0 -0
- /package/dist/core/{p-24bac55f.entry.js.map → p-33509a89.entry.js.map} +0 -0
- /package/dist/core/{p-e1920777.entry.js.map → p-3389625c.entry.js.map} +0 -0
- /package/dist/core/{p-5a1cfb3c.entry.js.map → p-344752cb.entry.js.map} +0 -0
- /package/dist/core/{p-6c238418.entry.js.map → p-348d7080.entry.js.map} +0 -0
- /package/dist/core/{p-3ef2e98d.entry.js.map → p-39cdf5db.entry.js.map} +0 -0
- /package/dist/core/{p-fd20470e.entry.js.map → p-496b314f.entry.js.map} +0 -0
- /package/dist/core/{p-bd9a76d8.entry.js.map → p-508b6da3.entry.js.map} +0 -0
- /package/dist/core/{p-f5cea10d.entry.js.map → p-5e6687a8.entry.js.map} +0 -0
- /package/dist/core/{p-72171192.entry.js.map → p-60f4fe3a.entry.js.map} +0 -0
- /package/dist/core/{p-e00e67ff.entry.js.map → p-6323da7a.entry.js.map} +0 -0
- /package/dist/core/{p-c6c87e58.entry.js.map → p-6dfe0922.entry.js.map} +0 -0
- /package/dist/core/{p-fd7f3b58.entry.js.map → p-770e92cd.entry.js.map} +0 -0
- /package/dist/core/{p-7cf6b428.entry.js.map → p-79ead0e7.entry.js.map} +0 -0
- /package/dist/core/{p-285892ef.entry.js.map → p-7b4b45cf.entry.js.map} +0 -0
- /package/dist/core/{p-afedcfdb.entry.js.map → p-7efdbab8.entry.js.map} +0 -0
- /package/dist/core/{p-96177a74.entry.js.map → p-802a4bd3.entry.js.map} +0 -0
- /package/dist/core/{p-9a9605c3.entry.js.map → p-879c180d.entry.js.map} +0 -0
- /package/dist/core/{p-3891ce53.entry.js.map → p-8830011c.entry.js.map} +0 -0
- /package/dist/core/{p-444cd8d3.entry.js.map → p-8ab37b4d.entry.js.map} +0 -0
- /package/dist/core/{p-c87cc0d1.entry.js.map → p-939025af.entry.js.map} +0 -0
- /package/dist/core/{p-4992e9ac.entry.js.map → p-939b168a.entry.js.map} +0 -0
- /package/dist/core/{p-5a4344cb.entry.js.map → p-9dea5764.entry.js.map} +0 -0
- /package/dist/core/{p-90611726.entry.js.map → p-a8a92e54.entry.js.map} +0 -0
- /package/dist/core/{p-31f3fb15.entry.js.map → p-a94a7b71.entry.js.map} +0 -0
- /package/dist/core/{p-ba75ed34.entry.js.map → p-b434bd7c.entry.js.map} +0 -0
- /package/dist/core/{p-2188b483.entry.js.map → p-c0a7eed7.entry.js.map} +0 -0
- /package/dist/core/{p-2bd2f38b.entry.js.map → p-c0b227d2.entry.js.map} +0 -0
- /package/dist/core/{p-2646a629.entry.js.map → p-c32f043e.entry.js.map} +0 -0
- /package/dist/core/{p-7a0f62c2.entry.js.map → p-c4b2774d.entry.js.map} +0 -0
- /package/dist/core/{p-775b8dba.entry.js.map → p-c9525aac.entry.js.map} +0 -0
- /package/dist/core/{p-7026afad.entry.js.map → p-ca05573a.entry.js.map} +0 -0
- /package/dist/core/{p-8c580d88.entry.js.map → p-d0607a70.entry.js.map} +0 -0
- /package/dist/core/{p-15c05eb8.entry.js.map → p-d528d856.entry.js.map} +0 -0
- /package/dist/core/{p-0043b019.entry.js.map → p-da1c2883.entry.js.map} +0 -0
- /package/dist/core/{p-ffc1cea6.entry.js.map → p-e2e556ec.entry.js.map} +0 -0
- /package/dist/core/{p-e4ef4263.js.map → p-e519f607.js.map} +0 -0
- /package/dist/core/{p-3f0bce15.entry.js.map → p-e5c6d01a.entry.js.map} +0 -0
- /package/dist/core/{p-04a9f82f.entry.js.map → p-e8db8772.entry.js.map} +0 -0
- /package/dist/core/{p-e4b82731.entry.js.map → p-ea04103e.entry.js.map} +0 -0
- /package/dist/core/{p-9a95f428.entry.js.map → p-eaeb473e.entry.js.map} +0 -0
- /package/dist/core/{p-8e592393.entry.js.map → p-ecc7fd71.entry.js.map} +0 -0
- /package/dist/core/{p-6cfba272.entry.js.map → p-efe260f0.entry.js.map} +0 -0
- /package/dist/core/{p-b6d6b26e.entry.js.map → p-f1b57f91.entry.js.map} +0 -0
- /package/dist/core/{p-e4551a38.entry.js.map → p-f5dc04f7.entry.js.map} +0 -0
- /package/dist/core/{p-1900c7c7.entry.js.map → p-fd08156a.entry.js.map} +0 -0
- /package/dist/core/{p-3594922d.entry.js.map → p-fe5b51bb.entry.js.map} +0 -0
- /package/dist/core/{p-ef5b6622.entry.js.map → p-ff618439.entry.js.map} +0 -0
|
@@ -0,0 +1,1075 @@
|
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
|
+
import { parseTimeHelper } from "../../utils/helpers";
|
|
3
|
+
import Check from "../../assets/check-icon.svg";
|
|
4
|
+
import Clear from "../../assets/close-icon.svg";
|
|
5
|
+
const COLUMN_TYPES = ["hour", "minute", "second", "period"];
|
|
6
|
+
const COLUMN_CLASS = ".ic-time-selector-column";
|
|
7
|
+
const ITEM_CLASS = ".ic-time-selector-item";
|
|
8
|
+
export class TimeSelector {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.DEFAULT_TIME_FORMAT = "HH:MM:SS";
|
|
11
|
+
this.minutes = Array.from({ length: 60 }, (_, i) => i);
|
|
12
|
+
this.seconds = Array.from({ length: 60 }, (_, i) => i);
|
|
13
|
+
this.periods = ["AM", "PM"];
|
|
14
|
+
this.minTime = null;
|
|
15
|
+
this.maxTime = null;
|
|
16
|
+
this.ariaLiveMessage = "";
|
|
17
|
+
/**
|
|
18
|
+
* An array of times that will be disabled in the time selector. The times can be in any format supported as `timeFormat`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object.
|
|
19
|
+
*/
|
|
20
|
+
this.disableTimes = [];
|
|
21
|
+
/**
|
|
22
|
+
* The earliest time that will be allowed. The value can be in any format supported as `timeFormat`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object.
|
|
23
|
+
*/
|
|
24
|
+
this.min = "";
|
|
25
|
+
/**
|
|
26
|
+
* The latest time that will be allowed. The value can be in any format supported as `timeFormat`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object.
|
|
27
|
+
*/
|
|
28
|
+
this.max = "";
|
|
29
|
+
/**
|
|
30
|
+
* The size of the time selector to be displayed.
|
|
31
|
+
*/
|
|
32
|
+
this.size = "medium";
|
|
33
|
+
/**
|
|
34
|
+
* Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component.
|
|
35
|
+
*/
|
|
36
|
+
this.theme = "inherit";
|
|
37
|
+
/**
|
|
38
|
+
* The format in which the time will be displayed.
|
|
39
|
+
*/
|
|
40
|
+
this.timeFormat = this.DEFAULT_TIME_FORMAT;
|
|
41
|
+
/**
|
|
42
|
+
* The time period format: "12" for 12-hour, "24" for 24-hour. Defaults to "24".
|
|
43
|
+
*/
|
|
44
|
+
this.timePeriod = "24";
|
|
45
|
+
/**
|
|
46
|
+
* The value of the time selector. The value can be in any format supported as `timeFormat`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object.
|
|
47
|
+
*/
|
|
48
|
+
this.value = "";
|
|
49
|
+
this.setTimeParts = (hour, minute, second) => {
|
|
50
|
+
let period = "AM";
|
|
51
|
+
if (this.timePeriod === "12") {
|
|
52
|
+
if (hour === 0) {
|
|
53
|
+
hour = 12;
|
|
54
|
+
period = "AM";
|
|
55
|
+
}
|
|
56
|
+
else if (hour === 12) {
|
|
57
|
+
period = "PM";
|
|
58
|
+
}
|
|
59
|
+
else if (hour > 12) {
|
|
60
|
+
hour = hour - 12;
|
|
61
|
+
period = "PM";
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
period = "AM";
|
|
65
|
+
}
|
|
66
|
+
this.selectedHour = hour;
|
|
67
|
+
this.selectedPeriod = period;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
this.selectedHour = hour;
|
|
71
|
+
}
|
|
72
|
+
this.selectedMinute = minute;
|
|
73
|
+
this.selectedSecond = second;
|
|
74
|
+
};
|
|
75
|
+
this.checkIfScrollIsFinished = (column, scrollTop) => {
|
|
76
|
+
const isScrollFinished = setInterval(() => {
|
|
77
|
+
if (column.scrollTop === scrollTop + 56) {
|
|
78
|
+
column === null || column === void 0 ? void 0 : column.focus();
|
|
79
|
+
clearInterval(isScrollFinished);
|
|
80
|
+
}
|
|
81
|
+
}, 25);
|
|
82
|
+
};
|
|
83
|
+
this.handleSelect = (type, value) => {
|
|
84
|
+
var _a;
|
|
85
|
+
const prevValue = this.getSelectedValue(type);
|
|
86
|
+
switch (type) {
|
|
87
|
+
case "hour":
|
|
88
|
+
this.selectedHour = Number(value);
|
|
89
|
+
break;
|
|
90
|
+
case "minute":
|
|
91
|
+
this.selectedMinute = Number(value);
|
|
92
|
+
break;
|
|
93
|
+
case "second":
|
|
94
|
+
this.selectedSecond = Number(value);
|
|
95
|
+
break;
|
|
96
|
+
case "period":
|
|
97
|
+
this.selectedPeriod = value;
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
const columns = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(COLUMN_CLASS);
|
|
101
|
+
const idx = COLUMN_TYPES.indexOf(type);
|
|
102
|
+
if (columns && columns[idx]) {
|
|
103
|
+
columns[idx].focus();
|
|
104
|
+
window.requestAnimationFrame(() => {
|
|
105
|
+
this.scrollSelectedItem(type);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
if (prevValue === undefined || prevValue === null) {
|
|
109
|
+
this.announceSelectedColumn(type);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
this.lastAnnouncedType = type;
|
|
113
|
+
this.lastAnnouncedValue = this.getSelectedValue(type);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
this.isTimeDisabled = (hour, minute, second, type) => {
|
|
117
|
+
var _a, _b, _c, _d;
|
|
118
|
+
for (const t of this.disableTimes) {
|
|
119
|
+
if (typeof t === "string" || t instanceof Date) {
|
|
120
|
+
const parts = parseTimeHelper(t).parts;
|
|
121
|
+
if (parts &&
|
|
122
|
+
parts.hour === hour &&
|
|
123
|
+
parts.minute === minute &&
|
|
124
|
+
parts.second === second) {
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
else if (t && typeof t === "object" && "start" in t && "end" in t) {
|
|
129
|
+
const startParts = parseTimeHelper(t.start).parts;
|
|
130
|
+
const endParts = parseTimeHelper(t.end).parts;
|
|
131
|
+
if (startParts && endParts) {
|
|
132
|
+
const timeVal = hour * 3600 + minute * 60 + second;
|
|
133
|
+
const startVal = startParts.hour * 3600 + startParts.minute * 60 + startParts.second;
|
|
134
|
+
const endVal = endParts.hour * 3600 + endParts.minute * 60 + endParts.second;
|
|
135
|
+
if (timeVal >= startVal && timeVal <= endVal) {
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if (this.min) {
|
|
142
|
+
this.minTime = parseTimeHelper(this.min).date;
|
|
143
|
+
if (this.minTime) {
|
|
144
|
+
const minHour = this.minTime.getHours();
|
|
145
|
+
const minMinute = this.minTime.getMinutes();
|
|
146
|
+
const minSecond = this.minTime.getSeconds();
|
|
147
|
+
if (type === "hour") {
|
|
148
|
+
const highlightedMinute = (_a = this.selectedMinute) !== null && _a !== void 0 ? _a : minMinute;
|
|
149
|
+
const highlightedSecond = (_b = this.selectedSecond) !== null && _b !== void 0 ? _b : minSecond;
|
|
150
|
+
if (hour < minHour ||
|
|
151
|
+
(hour === minHour && highlightedMinute < minMinute) ||
|
|
152
|
+
(hour === minHour &&
|
|
153
|
+
highlightedMinute === minMinute &&
|
|
154
|
+
highlightedSecond < minSecond)) {
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
else if (type === "minute") {
|
|
159
|
+
if (hour === minHour && minute < minMinute) {
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
else if (type === "second") {
|
|
164
|
+
if (hour === minHour && minute === minMinute && second < minSecond) {
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
if (hour < minHour ||
|
|
170
|
+
(hour === minHour && minute < minMinute) ||
|
|
171
|
+
(hour === minHour && minute === minMinute && second < minSecond)) {
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (this.max) {
|
|
178
|
+
this.maxTime = parseTimeHelper(this.max).date;
|
|
179
|
+
if (this.maxTime) {
|
|
180
|
+
const maxHour = this.maxTime.getHours();
|
|
181
|
+
const maxMinute = this.maxTime.getMinutes();
|
|
182
|
+
const maxSecond = this.maxTime.getSeconds();
|
|
183
|
+
if (type === "hour") {
|
|
184
|
+
const selectedMinute = (_c = this.selectedMinute) !== null && _c !== void 0 ? _c : 59;
|
|
185
|
+
const selectedSecond = (_d = this.selectedSecond) !== null && _d !== void 0 ? _d : 59;
|
|
186
|
+
if (hour > maxHour ||
|
|
187
|
+
(hour === maxHour && selectedMinute > maxMinute) ||
|
|
188
|
+
(hour === maxHour &&
|
|
189
|
+
selectedMinute === maxMinute &&
|
|
190
|
+
selectedSecond > maxSecond)) {
|
|
191
|
+
return true;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
else if (type === "minute") {
|
|
195
|
+
if (hour === maxHour && minute > maxMinute) {
|
|
196
|
+
return true;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
else if (type === "second") {
|
|
200
|
+
if (hour === maxHour && minute === maxMinute && second > maxSecond) {
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
if (hour > maxHour ||
|
|
206
|
+
(hour === maxHour && minute > maxMinute) ||
|
|
207
|
+
(hour === maxHour && minute === maxMinute && second > maxSecond)) {
|
|
208
|
+
return true;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return false;
|
|
214
|
+
};
|
|
215
|
+
this.handleColumnKeyDown = (type, event) => {
|
|
216
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
217
|
+
const columns = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(COLUMN_CLASS);
|
|
218
|
+
const idx = COLUMN_TYPES.indexOf(type);
|
|
219
|
+
if (!columns)
|
|
220
|
+
return;
|
|
221
|
+
const values = this.getColumnValues(type);
|
|
222
|
+
const selected = this.getSelectedValue(type);
|
|
223
|
+
const col = columns[idx];
|
|
224
|
+
if (!col)
|
|
225
|
+
return;
|
|
226
|
+
const selectHighlighted = () => {
|
|
227
|
+
const highlighted = this.getHighlightedValue(type, col);
|
|
228
|
+
if (highlighted !== null) {
|
|
229
|
+
this.handleSelect(type, highlighted);
|
|
230
|
+
}
|
|
231
|
+
else if (values.length > 0) {
|
|
232
|
+
this.handleSelect(type, values[0]);
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
switch (event.key) {
|
|
236
|
+
case "Enter":
|
|
237
|
+
case " ":
|
|
238
|
+
event.preventDefault();
|
|
239
|
+
selectHighlighted();
|
|
240
|
+
return;
|
|
241
|
+
case "ArrowRight":
|
|
242
|
+
event.preventDefault();
|
|
243
|
+
selectHighlighted();
|
|
244
|
+
if (idx < columns.length - 1) {
|
|
245
|
+
(_b = columns[idx + 1]) === null || _b === void 0 ? void 0 : _b.focus();
|
|
246
|
+
}
|
|
247
|
+
return;
|
|
248
|
+
case "ArrowLeft":
|
|
249
|
+
event.preventDefault();
|
|
250
|
+
if (idx > 0)
|
|
251
|
+
(_c = columns[idx - 1]) === null || _c === void 0 ? void 0 : _c.focus();
|
|
252
|
+
return;
|
|
253
|
+
case "Tab":
|
|
254
|
+
if (event.shiftKey) {
|
|
255
|
+
if (idx === 0) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
event.preventDefault();
|
|
260
|
+
(_d = columns[idx - 1]) === null || _d === void 0 ? void 0 : _d.focus();
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
event.preventDefault();
|
|
265
|
+
selectHighlighted();
|
|
266
|
+
this.announceSelectedColumn(type);
|
|
267
|
+
if (idx < columns.length - 1) {
|
|
268
|
+
(_e = columns[idx + 1]) === null || _e === void 0 ? void 0 : _e.focus();
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
(_g = (_f = this.el.shadowRoot) === null || _f === void 0 ? void 0 : _f.querySelector(".ic-time-selector-clear-btn")) === null || _g === void 0 ? void 0 : _g.focus();
|
|
272
|
+
this.updateAriaLiveMessage();
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return;
|
|
276
|
+
case "ArrowUp":
|
|
277
|
+
case "ArrowDown": {
|
|
278
|
+
let idxInValues = values.findIndex((v) => v === selected);
|
|
279
|
+
if (idxInValues === -1)
|
|
280
|
+
idxInValues = 0;
|
|
281
|
+
let newIdx = idxInValues;
|
|
282
|
+
const direction = event.key === "ArrowUp" ? -1 : 1;
|
|
283
|
+
const maxIdx = values.length - 1;
|
|
284
|
+
do {
|
|
285
|
+
newIdx += direction;
|
|
286
|
+
} while (newIdx >= 0 &&
|
|
287
|
+
newIdx <= maxIdx &&
|
|
288
|
+
(() => {
|
|
289
|
+
var _a, _b, _c;
|
|
290
|
+
if (type === "hour" || type === "minute" || type === "second") {
|
|
291
|
+
const hour = type === "hour"
|
|
292
|
+
? values[newIdx]
|
|
293
|
+
: (_a = this.selectedHour) !== null && _a !== void 0 ? _a : 0;
|
|
294
|
+
const minute = type === "minute"
|
|
295
|
+
? values[newIdx]
|
|
296
|
+
: (_b = this.selectedMinute) !== null && _b !== void 0 ? _b : 0;
|
|
297
|
+
const second = type === "second"
|
|
298
|
+
? values[newIdx]
|
|
299
|
+
: (_c = this.selectedSecond) !== null && _c !== void 0 ? _c : 0;
|
|
300
|
+
return this.isTimeDisabled(hour, minute, second);
|
|
301
|
+
}
|
|
302
|
+
return false;
|
|
303
|
+
})());
|
|
304
|
+
this.ariaLiveMessage = `Selected ${type}: ${values[newIdx]}`;
|
|
305
|
+
if (newIdx >= 0 && newIdx <= maxIdx && newIdx !== idxInValues) {
|
|
306
|
+
this.handleSelect(type, values[newIdx]);
|
|
307
|
+
}
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
default:
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
this.renderColumn = (type, values, selected) => {
|
|
315
|
+
const isTimeColumn = type === "hour" || type === "minute" || type === "second";
|
|
316
|
+
const isPeriodColumn = type === "period";
|
|
317
|
+
const headerLabel = this.getHeaderLabel(type);
|
|
318
|
+
const topSpacerCount = 2;
|
|
319
|
+
let bottomSpacerCount = 6;
|
|
320
|
+
if (this.size === "large") {
|
|
321
|
+
bottomSpacerCount = 5;
|
|
322
|
+
}
|
|
323
|
+
else if (this.size === "small") {
|
|
324
|
+
bottomSpacerCount = 8;
|
|
325
|
+
}
|
|
326
|
+
return (h("div", { class: "ic-time-selector-column-wrapper" }, isPeriodColumn ? (h("div", { class: "ic-time-selector-header-row" })) : (headerLabel && (h("div", { class: "ic-time-selector-header-row" }, h("ic-typography", { variant: "subtitle-small" }, headerLabel)))), h("div", { class: {
|
|
327
|
+
"ic-time-selector-column": true,
|
|
328
|
+
"ic-time-selector-column-period": isPeriodColumn,
|
|
329
|
+
}, tabIndex: 0, onKeyDown: (e) => this.handleColumnKeyDown(type, e) }, h("ul", { class: "ic-time-selector-list", role: "listbox", "aria-label": type }, this.renderScrollRows(topSpacerCount, `${type}-top-spacer`), values.map((val) => {
|
|
330
|
+
var _a, _b, _c;
|
|
331
|
+
let disabled = false;
|
|
332
|
+
if (isTimeColumn) {
|
|
333
|
+
const hour = type === "hour" ? val : (_a = this.selectedHour) !== null && _a !== void 0 ? _a : 0;
|
|
334
|
+
const minute = type === "minute"
|
|
335
|
+
? val
|
|
336
|
+
: (_b = this.selectedMinute) !== null && _b !== void 0 ? _b : 0;
|
|
337
|
+
const second = type === "second"
|
|
338
|
+
? val
|
|
339
|
+
: (_c = this.selectedSecond) !== null && _c !== void 0 ? _c : 0;
|
|
340
|
+
disabled = this.isTimeDisabled(hour, minute, second, type);
|
|
341
|
+
}
|
|
342
|
+
return (h("li", { class: {
|
|
343
|
+
"ic-time-selector-item": true,
|
|
344
|
+
selected: val === selected,
|
|
345
|
+
disabled,
|
|
346
|
+
}, role: "option", "aria-selected": val === selected ? "true" : "false", "aria-disabled": disabled ? "true" : "false", onClick: () => !disabled && this.handleSelect(type, val), tabIndex: -1, key: `${type}-val-${val}` }, h("ic-typography", { variant: "subtitle-small" }, typeof val === "number"
|
|
347
|
+
? val.toString().padStart(2, "0")
|
|
348
|
+
: val)));
|
|
349
|
+
}), (isTimeColumn || isPeriodColumn) &&
|
|
350
|
+
this.renderScrollRows(bottomSpacerCount, `${type}-bottom-spacer`)))));
|
|
351
|
+
};
|
|
352
|
+
this.handleClear = () => {
|
|
353
|
+
this.selectedHour = undefined;
|
|
354
|
+
this.scrollSelectedItem("hour", true);
|
|
355
|
+
this.selectedMinute = undefined;
|
|
356
|
+
this.scrollSelectedItem("minute", true);
|
|
357
|
+
this.selectedSecond = undefined;
|
|
358
|
+
this.scrollSelectedItem("second", true);
|
|
359
|
+
this.selectedPeriod = undefined;
|
|
360
|
+
this.scrollSelectedItem("period", true);
|
|
361
|
+
this.lastAnnouncedType = undefined;
|
|
362
|
+
this.lastAnnouncedValue = undefined;
|
|
363
|
+
this.icChange.emit({
|
|
364
|
+
value: null,
|
|
365
|
+
timeString: null,
|
|
366
|
+
timeObject: {
|
|
367
|
+
hour: null,
|
|
368
|
+
minute: null,
|
|
369
|
+
second: null,
|
|
370
|
+
period: undefined,
|
|
371
|
+
},
|
|
372
|
+
});
|
|
373
|
+
};
|
|
374
|
+
this.handleConfirmClick = () => {
|
|
375
|
+
const hour = this.selectedHour != null ? this.selectedHour : null;
|
|
376
|
+
const minute = this.selectedMinute != null ? this.selectedMinute : null;
|
|
377
|
+
const second = this.selectedSecond != null ? this.selectedSecond : null;
|
|
378
|
+
const period = this.selectedPeriod;
|
|
379
|
+
const hourStr = hour != null ? hour.toString().padStart(2, "0") : null;
|
|
380
|
+
const minuteStr = minute != null ? minute.toString().padStart(2, "0") : null;
|
|
381
|
+
const secondStr = second != null ? second.toString().padStart(2, "0") : null;
|
|
382
|
+
let allSelected = false;
|
|
383
|
+
if (this.timeFormat === this.DEFAULT_TIME_FORMAT) {
|
|
384
|
+
allSelected = hour !== null && minute !== null && second !== null;
|
|
385
|
+
}
|
|
386
|
+
else {
|
|
387
|
+
allSelected = hour !== null && minute !== null;
|
|
388
|
+
}
|
|
389
|
+
let value = null;
|
|
390
|
+
let timeString = null;
|
|
391
|
+
if (allSelected) {
|
|
392
|
+
let date24hours = hour;
|
|
393
|
+
if (hour != null && period && this.timePeriod === "12") {
|
|
394
|
+
if (period === "PM" && hour < 12)
|
|
395
|
+
date24hours = hour + 12;
|
|
396
|
+
if (period === "AM" && hour === 12)
|
|
397
|
+
date24hours = 0;
|
|
398
|
+
}
|
|
399
|
+
value = new Date();
|
|
400
|
+
value.setHours(date24hours !== null && date24hours !== void 0 ? date24hours : 0);
|
|
401
|
+
value.setMinutes(minute !== null && minute !== void 0 ? minute : 0);
|
|
402
|
+
value.setSeconds(second !== null && second !== void 0 ? second : 0);
|
|
403
|
+
value.setMilliseconds(0);
|
|
404
|
+
if (this.timeFormat === "HH:MM") {
|
|
405
|
+
timeString = hourStr + ":" + minuteStr + (period ? " " + period : "");
|
|
406
|
+
}
|
|
407
|
+
else if (this.timeFormat === this.DEFAULT_TIME_FORMAT) {
|
|
408
|
+
timeString =
|
|
409
|
+
hourStr +
|
|
410
|
+
":" +
|
|
411
|
+
minuteStr +
|
|
412
|
+
":" +
|
|
413
|
+
secondStr +
|
|
414
|
+
(period ? " " + period : "");
|
|
415
|
+
}
|
|
416
|
+
this.value = value;
|
|
417
|
+
}
|
|
418
|
+
this.icChange.emit({
|
|
419
|
+
value: allSelected ? value : null,
|
|
420
|
+
timeString: allSelected ? timeString : null,
|
|
421
|
+
timeObject: Object.assign({ hour: hourStr, minute: minuteStr, second: secondStr }, (period ? { period } : {})),
|
|
422
|
+
});
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
watchMinHandler() {
|
|
426
|
+
this.minTime = parseTimeHelper(this.min).date;
|
|
427
|
+
}
|
|
428
|
+
watchMaxHandler() {
|
|
429
|
+
this.maxTime = parseTimeHelper(this.max).date;
|
|
430
|
+
}
|
|
431
|
+
watchValueHandler() {
|
|
432
|
+
this.setTime(this.value);
|
|
433
|
+
setTimeout(() => {
|
|
434
|
+
this.scrollSelectedItem("hour");
|
|
435
|
+
this.scrollSelectedItem("minute");
|
|
436
|
+
if (this.timeFormat === this.DEFAULT_TIME_FORMAT) {
|
|
437
|
+
this.scrollSelectedItem("second");
|
|
438
|
+
}
|
|
439
|
+
if (this.timePeriod === "12") {
|
|
440
|
+
this.scrollSelectedItem("period");
|
|
441
|
+
}
|
|
442
|
+
}, 0);
|
|
443
|
+
}
|
|
444
|
+
componentWillLoad() {
|
|
445
|
+
this.setTime(this.value);
|
|
446
|
+
}
|
|
447
|
+
componentDidLoad() {
|
|
448
|
+
setTimeout(() => {
|
|
449
|
+
if (this.selectedHour !== undefined && this.selectedHour !== null) {
|
|
450
|
+
this.scrollSelectedItem("hour");
|
|
451
|
+
}
|
|
452
|
+
else if (this.min) {
|
|
453
|
+
this.scrollMinTime("hour");
|
|
454
|
+
}
|
|
455
|
+
if (this.selectedMinute !== undefined && this.selectedMinute !== null) {
|
|
456
|
+
this.scrollSelectedItem("minute");
|
|
457
|
+
}
|
|
458
|
+
else if (this.min) {
|
|
459
|
+
this.scrollMinTime("minute");
|
|
460
|
+
}
|
|
461
|
+
if (this.timeFormat === this.DEFAULT_TIME_FORMAT) {
|
|
462
|
+
if (this.selectedSecond !== undefined && this.selectedSecond !== null) {
|
|
463
|
+
this.scrollSelectedItem("second");
|
|
464
|
+
}
|
|
465
|
+
else if (this.min) {
|
|
466
|
+
this.scrollMinTime("second");
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
if (this.timePeriod === "12") {
|
|
470
|
+
if (this.selectedPeriod !== undefined && this.selectedPeriod !== null) {
|
|
471
|
+
this.scrollSelectedItem("period");
|
|
472
|
+
}
|
|
473
|
+
else if (this.min) {
|
|
474
|
+
this.scrollMinTime("period");
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
this.updateAriaLiveMessage();
|
|
478
|
+
}, 0);
|
|
479
|
+
}
|
|
480
|
+
getHeaderLabel(type) {
|
|
481
|
+
switch (type) {
|
|
482
|
+
case "hour":
|
|
483
|
+
return "HH";
|
|
484
|
+
case "minute":
|
|
485
|
+
return "MM";
|
|
486
|
+
case "second":
|
|
487
|
+
return "SS";
|
|
488
|
+
default:
|
|
489
|
+
return "";
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
setTime(time) {
|
|
493
|
+
if (time === null || time === undefined || time === "") {
|
|
494
|
+
this.handleClear();
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
if (typeof time === "string") {
|
|
498
|
+
const zuluMatch = time.match(/^([0-9]{2}):([0-9]{2}):([0-9]{2})(?:\.[0-9]{1,3})?Z?$/);
|
|
499
|
+
if (zuluMatch) {
|
|
500
|
+
this.setTimeParts(Number(zuluMatch[1]), Number(zuluMatch[2]), Number(zuluMatch[3]));
|
|
501
|
+
}
|
|
502
|
+
else {
|
|
503
|
+
const parts = time.split(":");
|
|
504
|
+
this.setTimeParts(Number(parts[0]) || 0, Number(parts[1]) || 0, Number(parts[2]) || 0);
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
else {
|
|
508
|
+
const { parts } = parseTimeHelper(time);
|
|
509
|
+
if (parts) {
|
|
510
|
+
this.setTimeParts(parts.hour, parts.minute, parts.second);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
renderScrollRows(count, keyPrefix = "scroll-row") {
|
|
515
|
+
return Array.from({ length: count }).map((_, i) => {
|
|
516
|
+
const isLast = keyPrefix.endsWith("bottom-spacer")
|
|
517
|
+
? i === count - 1
|
|
518
|
+
: false;
|
|
519
|
+
return (h("li", { class: Object.assign({ "ic-time-selector-item": true, "ic-time-selector-scroll-row": true }, (isLast ? { "ic-time-selector-scroll-row-last": true } : {})), "aria-hidden": "true", tabIndex: -1, key: `${keyPrefix}-${i}` }));
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
scrollSelectedItem(colClass, clear) {
|
|
523
|
+
var _a;
|
|
524
|
+
const columns = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(COLUMN_CLASS);
|
|
525
|
+
let colIdx = COLUMN_TYPES.indexOf(colClass);
|
|
526
|
+
if (colClass === "period" && (columns === null || columns === void 0 ? void 0 : columns.length)) {
|
|
527
|
+
colIdx = columns.length - 1;
|
|
528
|
+
}
|
|
529
|
+
const col = columns === null || columns === void 0 ? void 0 : columns[colIdx];
|
|
530
|
+
if (col) {
|
|
531
|
+
const items = col.querySelectorAll(ITEM_CLASS);
|
|
532
|
+
let selectedIdx = -1;
|
|
533
|
+
items.forEach((item, idx) => {
|
|
534
|
+
if (item.classList.contains("selected"))
|
|
535
|
+
selectedIdx = idx;
|
|
536
|
+
});
|
|
537
|
+
if (clear) {
|
|
538
|
+
selectedIdx = 0;
|
|
539
|
+
}
|
|
540
|
+
if (selectedIdx > -1) {
|
|
541
|
+
const scrollRow = col.querySelector(".ic-time-selector-scroll-row");
|
|
542
|
+
let resolvedHeight = 0;
|
|
543
|
+
if (scrollRow) {
|
|
544
|
+
resolvedHeight = parseFloat(getComputedStyle(scrollRow).height);
|
|
545
|
+
}
|
|
546
|
+
const offset = resolvedHeight * 2;
|
|
547
|
+
const scrollTop = items[selectedIdx].offsetTop - offset;
|
|
548
|
+
const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
549
|
+
col.scrollTo({
|
|
550
|
+
top: scrollTop,
|
|
551
|
+
behavior: prefersReducedMotion ? "instant" : "smooth",
|
|
552
|
+
});
|
|
553
|
+
if (clear) {
|
|
554
|
+
setTimeout(() => {
|
|
555
|
+
var _a;
|
|
556
|
+
const columns = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(COLUMN_CLASS);
|
|
557
|
+
if (columns && columns.length > 0) {
|
|
558
|
+
this.checkIfScrollIsFinished(columns[0], scrollTop);
|
|
559
|
+
}
|
|
560
|
+
}, 300);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
scrollMinTime(colClass) {
|
|
566
|
+
var _a;
|
|
567
|
+
const columns = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(COLUMN_CLASS);
|
|
568
|
+
const colIdx = COLUMN_TYPES.indexOf(colClass);
|
|
569
|
+
const col = columns === null || columns === void 0 ? void 0 : columns[colIdx];
|
|
570
|
+
if (!col)
|
|
571
|
+
return;
|
|
572
|
+
const items = col.querySelectorAll(ITEM_CLASS);
|
|
573
|
+
let minHour = 0, minMinute = 0, minSecond = 0;
|
|
574
|
+
if (this.minTime) {
|
|
575
|
+
minHour = this.minTime.getHours() + 2;
|
|
576
|
+
minMinute = this.minTime.getMinutes() + 2;
|
|
577
|
+
minSecond = this.minTime.getSeconds();
|
|
578
|
+
}
|
|
579
|
+
else if (this.min) {
|
|
580
|
+
const minDate = parseTimeHelper(this.min).date;
|
|
581
|
+
if (minDate) {
|
|
582
|
+
minHour = minDate.getHours();
|
|
583
|
+
minMinute = minDate.getMinutes();
|
|
584
|
+
minSecond = minDate.getSeconds();
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
let targetIdx = -1;
|
|
588
|
+
const values = this.getColumnValues(colClass);
|
|
589
|
+
if (colClass === "hour") {
|
|
590
|
+
targetIdx = values.findIndex((v) => v === minHour);
|
|
591
|
+
}
|
|
592
|
+
else if (colClass === "minute") {
|
|
593
|
+
targetIdx = values.findIndex((v) => v === minMinute);
|
|
594
|
+
}
|
|
595
|
+
else if (colClass === "second") {
|
|
596
|
+
targetIdx = values.findIndex((v) => v === minSecond);
|
|
597
|
+
}
|
|
598
|
+
else if (colClass === "period") {
|
|
599
|
+
let period = "AM";
|
|
600
|
+
if (this.timePeriod === "12") {
|
|
601
|
+
if (minHour === 0) {
|
|
602
|
+
period = "AM";
|
|
603
|
+
}
|
|
604
|
+
else if (minHour === 12) {
|
|
605
|
+
period = "PM";
|
|
606
|
+
}
|
|
607
|
+
else if (minHour > 12) {
|
|
608
|
+
period = "PM";
|
|
609
|
+
}
|
|
610
|
+
else {
|
|
611
|
+
period = "AM";
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
targetIdx = values.findIndex((v) => v === period);
|
|
615
|
+
}
|
|
616
|
+
if (targetIdx > -1) {
|
|
617
|
+
const scrollRow = col.querySelector(".ic-time-selector-scroll-row");
|
|
618
|
+
let resolvedHeight = 0;
|
|
619
|
+
if (scrollRow) {
|
|
620
|
+
resolvedHeight = parseFloat(getComputedStyle(scrollRow).height);
|
|
621
|
+
}
|
|
622
|
+
const offset = resolvedHeight * 2;
|
|
623
|
+
const scrollTop = items[targetIdx].offsetTop - offset;
|
|
624
|
+
const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
625
|
+
col.scrollTo({
|
|
626
|
+
top: scrollTop,
|
|
627
|
+
behavior: prefersReducedMotion ? "instant" : "smooth",
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
announceSelectedColumn(type) {
|
|
632
|
+
const value = this.getSelectedValue(type);
|
|
633
|
+
if (value !== null &&
|
|
634
|
+
value !== undefined &&
|
|
635
|
+
(type !== this.lastAnnouncedType || value !== this.lastAnnouncedValue)) {
|
|
636
|
+
this.ariaLiveMessage = `Selected ${type}: ${value}`;
|
|
637
|
+
}
|
|
638
|
+
else {
|
|
639
|
+
this.ariaLiveMessage = "";
|
|
640
|
+
}
|
|
641
|
+
this.lastAnnouncedType = type;
|
|
642
|
+
this.lastAnnouncedValue = value;
|
|
643
|
+
}
|
|
644
|
+
getColumnValues(type) {
|
|
645
|
+
if (type === "hour")
|
|
646
|
+
return this.timePeriod === "12"
|
|
647
|
+
? Array.from({ length: 12 }, (_, i) => i + 1)
|
|
648
|
+
: Array.from({ length: 24 }, (_, i) => i);
|
|
649
|
+
if (type === "minute")
|
|
650
|
+
return this.minutes;
|
|
651
|
+
if (type === "second")
|
|
652
|
+
return this.seconds;
|
|
653
|
+
if (type === "period")
|
|
654
|
+
return this.periods;
|
|
655
|
+
return [];
|
|
656
|
+
}
|
|
657
|
+
getSelectedValue(type) {
|
|
658
|
+
var _a, _b, _c, _d;
|
|
659
|
+
if (type === "hour")
|
|
660
|
+
return (_a = this.selectedHour) !== null && _a !== void 0 ? _a : null;
|
|
661
|
+
if (type === "minute")
|
|
662
|
+
return (_b = this.selectedMinute) !== null && _b !== void 0 ? _b : null;
|
|
663
|
+
if (type === "second")
|
|
664
|
+
return (_c = this.selectedSecond) !== null && _c !== void 0 ? _c : null;
|
|
665
|
+
if (type === "period")
|
|
666
|
+
return (_d = this.selectedPeriod) !== null && _d !== void 0 ? _d : null;
|
|
667
|
+
return null;
|
|
668
|
+
}
|
|
669
|
+
getHighlightedValue(type, col) {
|
|
670
|
+
var _a, _b, _c;
|
|
671
|
+
const items = Array.from(col.querySelectorAll(ITEM_CLASS));
|
|
672
|
+
const realItems = items.filter((item) => !item.classList.contains("ic-time-selector-scroll-row"));
|
|
673
|
+
if (realItems.length === 0)
|
|
674
|
+
return null;
|
|
675
|
+
const highlightTop = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".ic-time-selector-highlight-top");
|
|
676
|
+
const highlightBottom = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(".ic-time-selector-highlight-bottom");
|
|
677
|
+
if (!highlightTop || !highlightBottom)
|
|
678
|
+
return null;
|
|
679
|
+
const topRect = highlightTop.getBoundingClientRect();
|
|
680
|
+
const bottomRect = highlightBottom.getBoundingClientRect();
|
|
681
|
+
const highlightStart = topRect.bottom;
|
|
682
|
+
const highlightEnd = bottomRect.top;
|
|
683
|
+
for (const item of realItems) {
|
|
684
|
+
const itemRect = item.getBoundingClientRect();
|
|
685
|
+
const itemCenter = itemRect.top + itemRect.height / 2;
|
|
686
|
+
if (itemCenter >= highlightStart && itemCenter <= highlightEnd) {
|
|
687
|
+
const key = item.getAttribute("key");
|
|
688
|
+
if (key) {
|
|
689
|
+
const valStr = key.replace(`${type}-val-`, "");
|
|
690
|
+
if (type === "hour" || type === "minute" || type === "second") {
|
|
691
|
+
return Number(valStr);
|
|
692
|
+
}
|
|
693
|
+
else {
|
|
694
|
+
return valStr;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
const text = (_c = item.textContent) === null || _c === void 0 ? void 0 : _c.trim();
|
|
698
|
+
if (type === "hour" || type === "minute" || type === "second") {
|
|
699
|
+
return text ? Number(text) : null;
|
|
700
|
+
}
|
|
701
|
+
else {
|
|
702
|
+
return text;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
return null;
|
|
707
|
+
}
|
|
708
|
+
updateAriaLiveMessage() {
|
|
709
|
+
const hourStr = this.selectedHour != null
|
|
710
|
+
? this.selectedHour.toString().padStart(2, "0")
|
|
711
|
+
: null;
|
|
712
|
+
const minuteStr = this.selectedMinute != null
|
|
713
|
+
? this.selectedMinute.toString().padStart(2, "0")
|
|
714
|
+
: null;
|
|
715
|
+
const secondStr = this.selectedSecond != null
|
|
716
|
+
? this.selectedSecond.toString().padStart(2, "0")
|
|
717
|
+
: null;
|
|
718
|
+
let timeString = "";
|
|
719
|
+
let allSelected = false;
|
|
720
|
+
if (this.timeFormat === "HH:MM") {
|
|
721
|
+
allSelected = hourStr !== null && minuteStr !== null;
|
|
722
|
+
if (allSelected) {
|
|
723
|
+
timeString =
|
|
724
|
+
hourStr +
|
|
725
|
+
":" +
|
|
726
|
+
minuteStr +
|
|
727
|
+
(this.selectedPeriod ? " " + this.selectedPeriod : "");
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
else if (this.timeFormat === this.DEFAULT_TIME_FORMAT) {
|
|
731
|
+
allSelected =
|
|
732
|
+
hourStr !== null && minuteStr !== null && secondStr !== null;
|
|
733
|
+
if (allSelected) {
|
|
734
|
+
timeString =
|
|
735
|
+
hourStr +
|
|
736
|
+
":" +
|
|
737
|
+
minuteStr +
|
|
738
|
+
":" +
|
|
739
|
+
secondStr +
|
|
740
|
+
(this.selectedPeriod ? " " + this.selectedPeriod : "");
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
this.ariaLiveMessage =
|
|
744
|
+
allSelected && timeString ? `Selected time: ${timeString}` : "";
|
|
745
|
+
}
|
|
746
|
+
render() {
|
|
747
|
+
var _a, _b, _c, _d;
|
|
748
|
+
const hours = this.timePeriod === "12"
|
|
749
|
+
? Array.from({ length: 12 }, (_, i) => i + 1)
|
|
750
|
+
: Array.from({ length: 24 }, (_, i) => i);
|
|
751
|
+
const timeFormat = this.timeFormat || this.DEFAULT_TIME_FORMAT;
|
|
752
|
+
const columns = [
|
|
753
|
+
this.renderColumn("hour", hours, (_a = this.selectedHour) !== null && _a !== void 0 ? _a : null),
|
|
754
|
+
this.renderColumn("minute", this.minutes, (_b = this.selectedMinute) !== null && _b !== void 0 ? _b : null),
|
|
755
|
+
];
|
|
756
|
+
if (timeFormat === this.DEFAULT_TIME_FORMAT) {
|
|
757
|
+
columns.push(this.renderColumn("second", this.seconds, (_c = this.selectedSecond) !== null && _c !== void 0 ? _c : null));
|
|
758
|
+
}
|
|
759
|
+
let colonSelectedStates = [];
|
|
760
|
+
if (timeFormat === this.DEFAULT_TIME_FORMAT) {
|
|
761
|
+
colonSelectedStates = [
|
|
762
|
+
this.selectedHour !== undefined && this.selectedMinute !== undefined,
|
|
763
|
+
this.selectedMinute !== undefined && this.selectedSecond !== undefined,
|
|
764
|
+
];
|
|
765
|
+
}
|
|
766
|
+
else {
|
|
767
|
+
colonSelectedStates = [
|
|
768
|
+
this.selectedHour !== undefined && this.selectedMinute !== undefined,
|
|
769
|
+
];
|
|
770
|
+
}
|
|
771
|
+
const isInPicker = this.el.closest("ic-time-picker") !== null;
|
|
772
|
+
const { size, theme, timePeriod } = this;
|
|
773
|
+
return (h(Host, { key: '0a25adbaeba34a4dcd3ef15edd5076d8ed4ad0a5', class: {
|
|
774
|
+
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
775
|
+
[`ic-time-selector-${size}`]: true,
|
|
776
|
+
} }, h("div", { key: 'e65b452fb22c989b634fd1d8839ecf3bcb5c8a96', role: isInPicker ? "dialog" : undefined, "aria-modal": isInPicker ? true : undefined, "aria-label": "Select time. Use arrow keys to navigate and select the options and then tab to move onto the next selection.", class: {
|
|
777
|
+
"ic-time-selector-dialog-container": true,
|
|
778
|
+
} }, h("div", { key: '178213ede67d838f70b8bd164aac6481a97b03eb', class: "ic-time-selector-highlight-lines" }, h("div", { key: 'c10de931f6cba5496de152f1fdfc87a118413e08', class: "ic-time-selector-header-border" }), h("div", { key: '440b09028d77256e9b0bb18cc2f24550eac5f30d', class: {
|
|
779
|
+
"ic-time-selector-highlight": true,
|
|
780
|
+
"ic-time-selector-highlight-top": true,
|
|
781
|
+
} }), h("div", { key: 'eed615b5bbd35c5b0d0a5b3625710b00675856ab', class: "ic-time-selector-columns" }, columns.map((col, idx) => [
|
|
782
|
+
col,
|
|
783
|
+
idx < columns.length - 1 ? (h("ic-typography", { class: {
|
|
784
|
+
"ic-time-selector-colon": true,
|
|
785
|
+
"ic-time-selector-colon-selected": colonSelectedStates[idx],
|
|
786
|
+
}, variant: "subtitle-small", "aria-hidden": "true", key: `colon-${idx}` }, ":")) : null,
|
|
787
|
+
]), timePeriod !== "24" &&
|
|
788
|
+
this.renderColumn("period", this.periods, (_d = this.selectedPeriod) !== null && _d !== void 0 ? _d : null)), h("div", { key: '8b2b12a4e907c615b7e79d9801d5840d522e775d', class: {
|
|
789
|
+
"ic-time-selector-highlight": true,
|
|
790
|
+
"ic-time-selector-highlight-bottom": true,
|
|
791
|
+
} })), h("div", { key: '0d3a320315b1cf0557b8d281b6e468ef517b7ff4', class: "ic-time-selector-actions" }, h("ic-button", { key: '70d842672493c3a63ced6571d7e1ab6afba2abdf', variant: "icon-tertiary", "aria-label": "Clear time", class: {
|
|
792
|
+
"ic-time-selector-clear-btn": true,
|
|
793
|
+
}, onClick: this.handleClear, disabled: this.selectedHour === undefined &&
|
|
794
|
+
this.selectedMinute === undefined &&
|
|
795
|
+
this.selectedSecond === undefined &&
|
|
796
|
+
this.selectedPeriod === undefined, size: size, tabIndex: 0, onKeyDown: (e) => {
|
|
797
|
+
var _a;
|
|
798
|
+
if (e.key === "Tab" && e.shiftKey) {
|
|
799
|
+
e.preventDefault();
|
|
800
|
+
const columns = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(COLUMN_CLASS);
|
|
801
|
+
if (columns && columns.length > 0) {
|
|
802
|
+
const lastCol = columns[columns.length - 1];
|
|
803
|
+
lastCol === null || lastCol === void 0 ? void 0 : lastCol.focus();
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
} }, h("span", { key: '45c66f9552c10be9e3b466342c6e7d22fd7df90b', "aria-hidden": "true", innerHTML: Clear })), h("ic-button", { key: 'eae553c514bc635a71220b969044df8d32e457bb', variant: "icon-tertiary", "aria-label": "Select time", class: "ic-time-selector-check-btn", onClick: this.handleConfirmClick, disabled: this.selectedHour === undefined &&
|
|
807
|
+
this.selectedMinute === undefined &&
|
|
808
|
+
this.selectedSecond === undefined &&
|
|
809
|
+
this.selectedPeriod === undefined, size: size, tabIndex: 0 }, h("span", { key: 'f586f8d1b2659d3cf2f0f8e7365ebcd9828ebf23', "aria-hidden": "true", innerHTML: Check })))), h("div", { key: '27dd2db88615040635a0b61b9e785d50a488d90a', class: "sr-only", "aria-live": "polite" }, this.ariaLiveMessage)));
|
|
810
|
+
}
|
|
811
|
+
static get is() { return "ic-time-selector"; }
|
|
812
|
+
static get encapsulation() { return "shadow"; }
|
|
813
|
+
static get originalStyleUrls() {
|
|
814
|
+
return {
|
|
815
|
+
"$": ["ic-time-selector.css"]
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
static get styleUrls() {
|
|
819
|
+
return {
|
|
820
|
+
"$": ["ic-time-selector.css"]
|
|
821
|
+
};
|
|
822
|
+
}
|
|
823
|
+
static get properties() {
|
|
824
|
+
return {
|
|
825
|
+
"disableTimes": {
|
|
826
|
+
"type": "unknown",
|
|
827
|
+
"mutable": false,
|
|
828
|
+
"complexType": {
|
|
829
|
+
"original": "IcDisableTimeSelection[]",
|
|
830
|
+
"resolved": "IcDisableTimeSelection[]",
|
|
831
|
+
"references": {
|
|
832
|
+
"IcDisableTimeSelection": {
|
|
833
|
+
"location": "import",
|
|
834
|
+
"path": "../../utils/types",
|
|
835
|
+
"id": "src/utils/types.ts::IcDisableTimeSelection"
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
},
|
|
839
|
+
"required": false,
|
|
840
|
+
"optional": false,
|
|
841
|
+
"docs": {
|
|
842
|
+
"tags": [],
|
|
843
|
+
"text": "An array of times that will be disabled in the time selector. The times can be in any format supported as `timeFormat`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object."
|
|
844
|
+
},
|
|
845
|
+
"getter": false,
|
|
846
|
+
"setter": false,
|
|
847
|
+
"defaultValue": "[]"
|
|
848
|
+
},
|
|
849
|
+
"min": {
|
|
850
|
+
"type": "string",
|
|
851
|
+
"mutable": false,
|
|
852
|
+
"complexType": {
|
|
853
|
+
"original": "string | Date",
|
|
854
|
+
"resolved": "Date | string",
|
|
855
|
+
"references": {
|
|
856
|
+
"Date": {
|
|
857
|
+
"location": "global",
|
|
858
|
+
"id": "global::Date"
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
},
|
|
862
|
+
"required": false,
|
|
863
|
+
"optional": false,
|
|
864
|
+
"docs": {
|
|
865
|
+
"tags": [],
|
|
866
|
+
"text": "The earliest time that will be allowed. The value can be in any format supported as `timeFormat`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object."
|
|
867
|
+
},
|
|
868
|
+
"getter": false,
|
|
869
|
+
"setter": false,
|
|
870
|
+
"attribute": "min",
|
|
871
|
+
"reflect": false,
|
|
872
|
+
"defaultValue": "\"\""
|
|
873
|
+
},
|
|
874
|
+
"max": {
|
|
875
|
+
"type": "string",
|
|
876
|
+
"mutable": false,
|
|
877
|
+
"complexType": {
|
|
878
|
+
"original": "string | Date",
|
|
879
|
+
"resolved": "Date | string",
|
|
880
|
+
"references": {
|
|
881
|
+
"Date": {
|
|
882
|
+
"location": "global",
|
|
883
|
+
"id": "global::Date"
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
},
|
|
887
|
+
"required": false,
|
|
888
|
+
"optional": false,
|
|
889
|
+
"docs": {
|
|
890
|
+
"tags": [],
|
|
891
|
+
"text": "The latest time that will be allowed. The value can be in any format supported as `timeFormat`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object."
|
|
892
|
+
},
|
|
893
|
+
"getter": false,
|
|
894
|
+
"setter": false,
|
|
895
|
+
"attribute": "max",
|
|
896
|
+
"reflect": false,
|
|
897
|
+
"defaultValue": "\"\""
|
|
898
|
+
},
|
|
899
|
+
"size": {
|
|
900
|
+
"type": "string",
|
|
901
|
+
"mutable": false,
|
|
902
|
+
"complexType": {
|
|
903
|
+
"original": "IcSizes",
|
|
904
|
+
"resolved": "\"large\" | \"medium\" | \"small\"",
|
|
905
|
+
"references": {
|
|
906
|
+
"IcSizes": {
|
|
907
|
+
"location": "import",
|
|
908
|
+
"path": "../../utils/types",
|
|
909
|
+
"id": "src/utils/types.ts::IcSizes"
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
},
|
|
913
|
+
"required": false,
|
|
914
|
+
"optional": false,
|
|
915
|
+
"docs": {
|
|
916
|
+
"tags": [],
|
|
917
|
+
"text": "The size of the time selector to be displayed."
|
|
918
|
+
},
|
|
919
|
+
"getter": false,
|
|
920
|
+
"setter": false,
|
|
921
|
+
"attribute": "size",
|
|
922
|
+
"reflect": false,
|
|
923
|
+
"defaultValue": "\"medium\""
|
|
924
|
+
},
|
|
925
|
+
"theme": {
|
|
926
|
+
"type": "string",
|
|
927
|
+
"mutable": false,
|
|
928
|
+
"complexType": {
|
|
929
|
+
"original": "IcThemeMode",
|
|
930
|
+
"resolved": "\"dark\" | \"inherit\" | \"light\" | undefined",
|
|
931
|
+
"references": {
|
|
932
|
+
"IcThemeMode": {
|
|
933
|
+
"location": "import",
|
|
934
|
+
"path": "../../utils/types",
|
|
935
|
+
"id": "src/utils/types.ts::IcThemeMode"
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
},
|
|
939
|
+
"required": false,
|
|
940
|
+
"optional": true,
|
|
941
|
+
"docs": {
|
|
942
|
+
"tags": [],
|
|
943
|
+
"text": "Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component."
|
|
944
|
+
},
|
|
945
|
+
"getter": false,
|
|
946
|
+
"setter": false,
|
|
947
|
+
"attribute": "theme",
|
|
948
|
+
"reflect": false,
|
|
949
|
+
"defaultValue": "\"inherit\""
|
|
950
|
+
},
|
|
951
|
+
"timeFormat": {
|
|
952
|
+
"type": "string",
|
|
953
|
+
"mutable": false,
|
|
954
|
+
"complexType": {
|
|
955
|
+
"original": "IcTimeFormatSelector",
|
|
956
|
+
"resolved": "\"HH:MM\" | \"HH:MM:SS\"",
|
|
957
|
+
"references": {
|
|
958
|
+
"IcTimeFormatSelector": {
|
|
959
|
+
"location": "import",
|
|
960
|
+
"path": "../../utils/types",
|
|
961
|
+
"id": "src/utils/types.ts::IcTimeFormatSelector"
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
"required": false,
|
|
966
|
+
"optional": false,
|
|
967
|
+
"docs": {
|
|
968
|
+
"tags": [],
|
|
969
|
+
"text": "The format in which the time will be displayed."
|
|
970
|
+
},
|
|
971
|
+
"getter": false,
|
|
972
|
+
"setter": false,
|
|
973
|
+
"attribute": "time-format",
|
|
974
|
+
"reflect": false,
|
|
975
|
+
"defaultValue": "this.DEFAULT_TIME_FORMAT"
|
|
976
|
+
},
|
|
977
|
+
"timePeriod": {
|
|
978
|
+
"type": "string",
|
|
979
|
+
"mutable": false,
|
|
980
|
+
"complexType": {
|
|
981
|
+
"original": "\"12\" | \"24\"",
|
|
982
|
+
"resolved": "\"12\" | \"24\"",
|
|
983
|
+
"references": {}
|
|
984
|
+
},
|
|
985
|
+
"required": false,
|
|
986
|
+
"optional": false,
|
|
987
|
+
"docs": {
|
|
988
|
+
"tags": [],
|
|
989
|
+
"text": "The time period format: \"12\" for 12-hour, \"24\" for 24-hour. Defaults to \"24\"."
|
|
990
|
+
},
|
|
991
|
+
"getter": false,
|
|
992
|
+
"setter": false,
|
|
993
|
+
"attribute": "time-period",
|
|
994
|
+
"reflect": false,
|
|
995
|
+
"defaultValue": "\"24\""
|
|
996
|
+
},
|
|
997
|
+
"value": {
|
|
998
|
+
"type": "string",
|
|
999
|
+
"mutable": true,
|
|
1000
|
+
"complexType": {
|
|
1001
|
+
"original": "string | Date | null | undefined",
|
|
1002
|
+
"resolved": "Date | null | string | undefined",
|
|
1003
|
+
"references": {
|
|
1004
|
+
"Date": {
|
|
1005
|
+
"location": "global",
|
|
1006
|
+
"id": "global::Date"
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
},
|
|
1010
|
+
"required": false,
|
|
1011
|
+
"optional": true,
|
|
1012
|
+
"docs": {
|
|
1013
|
+
"tags": [],
|
|
1014
|
+
"text": "The value of the time selector. The value can be in any format supported as `timeFormat`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object."
|
|
1015
|
+
},
|
|
1016
|
+
"getter": false,
|
|
1017
|
+
"setter": false,
|
|
1018
|
+
"attribute": "value",
|
|
1019
|
+
"reflect": false,
|
|
1020
|
+
"defaultValue": "\"\""
|
|
1021
|
+
}
|
|
1022
|
+
};
|
|
1023
|
+
}
|
|
1024
|
+
static get states() {
|
|
1025
|
+
return {
|
|
1026
|
+
"selectedHour": {},
|
|
1027
|
+
"selectedMinute": {},
|
|
1028
|
+
"selectedSecond": {},
|
|
1029
|
+
"selectedPeriod": {},
|
|
1030
|
+
"ariaLiveMessage": {}
|
|
1031
|
+
};
|
|
1032
|
+
}
|
|
1033
|
+
static get events() {
|
|
1034
|
+
return [{
|
|
1035
|
+
"method": "icChange",
|
|
1036
|
+
"name": "icChange",
|
|
1037
|
+
"bubbles": true,
|
|
1038
|
+
"cancelable": true,
|
|
1039
|
+
"composed": true,
|
|
1040
|
+
"docs": {
|
|
1041
|
+
"tags": [],
|
|
1042
|
+
"text": "Emitted when the value has changed."
|
|
1043
|
+
},
|
|
1044
|
+
"complexType": {
|
|
1045
|
+
"original": "{\n value: Date | null;\n timeString: string | null;\n timeObject: {\n hour: string | null;\n minute: string | null;\n second: string | null;\n period?: IcTimePeriods;\n };\n }",
|
|
1046
|
+
"resolved": "{ value: Date | null; timeString: string | null; timeObject: { hour: string | null; minute: string | null; second: string | null; period?: IcTimePeriods | undefined; }; }",
|
|
1047
|
+
"references": {
|
|
1048
|
+
"Date": {
|
|
1049
|
+
"location": "global",
|
|
1050
|
+
"id": "global::Date"
|
|
1051
|
+
},
|
|
1052
|
+
"IcTimePeriods": {
|
|
1053
|
+
"location": "import",
|
|
1054
|
+
"path": "./ic-time-selector.types",
|
|
1055
|
+
"id": "src/components/ic-time-selector/ic-time-selector.types.ts::IcTimePeriods"
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
}];
|
|
1060
|
+
}
|
|
1061
|
+
static get elementRef() { return "el"; }
|
|
1062
|
+
static get watchers() {
|
|
1063
|
+
return [{
|
|
1064
|
+
"propName": "min",
|
|
1065
|
+
"methodName": "watchMinHandler"
|
|
1066
|
+
}, {
|
|
1067
|
+
"propName": "max",
|
|
1068
|
+
"methodName": "watchMaxHandler"
|
|
1069
|
+
}, {
|
|
1070
|
+
"propName": "value",
|
|
1071
|
+
"methodName": "watchValueHandler"
|
|
1072
|
+
}];
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
//# sourceMappingURL=ic-time-selector.js.map
|