@ukic/canary-web-components 3.0.0-canary.31 → 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 +19 -7
- package/dist/cjs/ic-checkbox_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-list.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.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 +13 -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-footer.cjs.entry.js +9 -5
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js +2 -2
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +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-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +9 -6
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-search-bar.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-toast.cjs.entry.js +14 -6
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- 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 +13 -7
- 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 +13 -8
- 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 +78 -6
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js +28 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.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-checkbox2.js.map +1 -1
- package/dist/components/ic-data-list.js.map +1 -1
- package/dist/components/ic-data-row.js.map +1 -1
- package/dist/components/ic-data-table.js +12 -7
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-footer.js +10 -5
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +1 -1
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-validation2.js +1 -1
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-menu2.js +1 -1
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-group.js +1 -1
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-pagination-bar2.js +21 -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-radio-group.js +1 -1
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +10 -7
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +1 -1
- package/dist/components/ic-search-bar.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-toast.js +15 -6
- package/dist/components/ic-toast.js.map +1 -1
- 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-169ad948.entry.js.map +1 -0
- 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-ffbf493f.entry.js → p-496b314f.entry.js} +2 -2
- package/dist/core/p-496b314f.entry.js.map +1 -0
- 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-770e92cd.entry.js +2 -0
- package/dist/core/p-770e92cd.entry.js.map +1 -0
- package/dist/core/{p-7cf6b428.entry.js → p-79ead0e7.entry.js} +2 -2
- package/dist/core/p-7b4b45cf.entry.js +2 -0
- package/dist/core/p-7b4b45cf.entry.js.map +1 -0
- package/dist/core/{p-afedcfdb.entry.js → p-7efdbab8.entry.js} +2 -2
- package/dist/core/p-802a4bd3.entry.js +2 -0
- package/dist/core/p-802a4bd3.entry.js.map +1 -0
- 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-939b168a.entry.js +2 -0
- package/dist/core/p-939b168a.entry.js.map +1 -0
- 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-b4a2f6fa.entry.js.map +1 -1
- package/dist/core/{p-2188b483.entry.js → p-c0a7eed7.entry.js} +2 -2
- package/dist/core/p-c0b227d2.entry.js +2 -0
- package/dist/core/p-c0b227d2.entry.js.map +1 -0
- 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-c9525aac.entry.js +2 -0
- package/dist/core/p-c9525aac.entry.js.map +1 -0
- 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-eaeb473e.entry.js.map +1 -0
- package/dist/core/{p-8e592393.entry.js → p-ecc7fd71.entry.js} +2 -2
- package/dist/core/p-efe260f0.entry.js +2 -0
- package/dist/core/p-efe260f0.entry.js.map +1 -0
- package/dist/core/{p-b6d6b26e.entry.js → p-f1b57f91.entry.js} +2 -2
- package/dist/core/p-f5dc04f7.entry.js +2 -0
- package/dist/core/p-f5dc04f7.entry.js.map +1 -0
- package/dist/core/p-fb07921b.entry.js +2 -0
- 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 +20 -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-list.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-data-row.entry.js.map +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
- package/dist/esm/ic-data-table.entry.js +13 -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 +10 -6
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +1 -1
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
- package/dist/esm/ic-input-component-container_4.entry.js +3 -3
- package/dist/esm/ic-input-component-container_4.entry.js.map +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 +2 -2
- package/dist/esm/ic-menu.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +2 -2
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +2 -2
- package/dist/esm/ic-navigation-item.entry.js.map +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 +2 -2
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +10 -7
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +2 -2
- package/dist/esm/ic-search-bar.entry.js.map +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 +15 -7
- package/dist/esm/ic-toast.entry.js.map +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 +12 -0
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.stories.d.ts +12 -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 +163 -11
- package/dist/types/utils/helpers.d.ts +14 -0
- package/dist/types/utils/types.d.ts +4 -1
- package/hydrate/index.js +1410 -156
- package/hydrate/index.mjs +1410 -156
- 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-1a976789.entry.js +0 -2
- package/dist/core/p-1a976789.entry.js.map +0 -1
- package/dist/core/p-3ba2b455.entry.js +0 -2
- package/dist/core/p-3ba2b455.entry.js.map +0 -1
- package/dist/core/p-41def410.entry.js +0 -2
- package/dist/core/p-41def410.entry.js.map +0 -1
- package/dist/core/p-4b188516.entry.js +0 -2
- package/dist/core/p-4b188516.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-7332320d.entry.js +0 -2
- package/dist/core/p-7332320d.entry.js.map +0 -1
- package/dist/core/p-81f12581.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-9a95f428.entry.js.map +0 -1
- package/dist/core/p-9f76eed6.entry.js +0 -2
- package/dist/core/p-9f76eed6.entry.js.map +0 -1
- package/dist/core/p-a1448064.entry.js +0 -2
- package/dist/core/p-a1448064.entry.js.map +0 -1
- package/dist/core/p-a237af88.entry.js +0 -2
- package/dist/core/p-a237af88.entry.js.map +0 -1
- package/dist/core/p-af821831.entry.js.map +0 -1
- package/dist/core/p-ba21f477.entry.js +0 -2
- package/dist/core/p-ba21f477.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-c5d65718.entry.js +0 -2
- package/dist/core/p-c5d65718.entry.js.map +0 -1
- package/dist/core/p-d144ca59.entry.js +0 -2
- package/dist/core/p-d144ca59.entry.js.map +0 -1
- package/dist/core/p-f48ce5f6.js +0 -2
- package/dist/core/p-f48ce5f6.js.map +0 -1
- package/dist/core/p-ffbf493f.entry.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-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-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-7cf6b428.entry.js.map → p-79ead0e7.entry.js.map} +0 -0
- /package/dist/core/{p-afedcfdb.entry.js.map → p-7efdbab8.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-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-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-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-8e592393.entry.js.map → p-ecc7fd71.entry.js.map} +0 -0
- /package/dist/core/{p-b6d6b26e.entry.js.map → p-f1b57f91.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
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { f as isEmptyString, t as getInputDescribedByText, w as isNumeric, x as IcInformationStatus, r as removeDisabledFalse, u as removeFormResetListener, v as addFormResetListener, o as onComponentRequiredPropUndefined, y as renderHiddenInput } from './helpers2.js';
|
|
2
|
+
import { f as isEmptyString, z as parseTimeHelper, t as getInputDescribedByText, w as isNumeric, x as IcInformationStatus, r as removeDisabledFalse, u as removeFormResetListener, v as addFormResetListener, o as onComponentRequiredPropUndefined, y as renderHiddenInput } from './helpers2.js';
|
|
3
3
|
import { C as Clear } from './clear-icon.js';
|
|
4
|
-
import { d as defineCustomElement$
|
|
5
|
-
import { d as defineCustomElement$
|
|
6
|
-
import { d as defineCustomElement$
|
|
7
|
-
import { d as defineCustomElement$
|
|
8
|
-
import { d as defineCustomElement$
|
|
9
|
-
import { d as defineCustomElement$
|
|
4
|
+
import { d as defineCustomElement$b } from './ic-button2.js';
|
|
5
|
+
import { d as defineCustomElement$a } from './ic-input-component-container2.js';
|
|
6
|
+
import { d as defineCustomElement$9 } from './ic-input-container2.js';
|
|
7
|
+
import { d as defineCustomElement$8 } from './ic-input-label2.js';
|
|
8
|
+
import { d as defineCustomElement$7 } from './ic-input-validation2.js';
|
|
9
|
+
import { d as defineCustomElement$6 } from './ic-loading-indicator2.js';
|
|
10
|
+
import { d as defineCustomElement$5 } from './ic-toggle-button2.js';
|
|
11
|
+
import { d as defineCustomElement$4 } from './ic-toggle-button-group2.js';
|
|
10
12
|
import { d as defineCustomElement$3 } from './ic-tooltip2.js';
|
|
11
13
|
import { d as defineCustomElement$2 } from './ic-typography2.js';
|
|
12
14
|
|
|
13
15
|
const Clock = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>clock-outline</title><path d="M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z" /></svg>`;
|
|
14
16
|
|
|
15
|
-
const icTimeInputCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{--ic-input-label-helpertext-padding:var(--ic-space-xs);--input-bg-color:var(--ic-time-picker-field-background);--ic-input-label-text-color:var(--ic-time-picker-label);--ic-input-label-helper-text-color:var(--ic-time-picker-subtitle);--border-color:var(--ic-time-picker-time-field-border-default);--border-color-disabled:var(--ic-time-picker-border-disabled);--border-color-hover:var(--ic-time-picker-time-field-border-hover);--border-color-pressed:var(--ic-time-picker-time-field-border-pressed);--border-error-color:var(--ic-time-picker-border-error);--border-error-color-hover:var(--ic-time-picker-border-error-hover);--border-error-color-pressed:var(--ic-time-picker-border-error-pressed);--border-success-color:var(--ic-time-picker-border-success);--border-success-color-hover:var(--ic-time-picker-border-success-hover);--border-success-color-pressed:var(--ic-time-picker-border-success-pressed);--border-warning-color:var(--ic-time-picker-border-warning);--border-warning-color-hover:var(--ic-time-picker-border-warning-hover);--border-warning-color-pressed:var(--ic-time-picker-border-warning-pressed);--input-width:calc((4 * var(--ic-space-xxl)) + var(--ic-space-xxs))}:host(.ic-time-input-disabled){--ic-input-label-text-color:var(--ic-time-picker-label-disabled);--ic-input-label-helper-text-color:var(--ic-time-picker-subtitle-disabled)}:host(.ic-time-input-disabled) input{color:var(--ic-time-picker-time-text-disabled)}:host(.ic-time-input-large){--input-width:calc(\n (4 * var(--ic-space-xxl)) + var(--ic-space-xxs) + var(--ic-space-lg)\n )}:host(.ic-time-input-small){--input-width:calc(\n (3 * var(--ic-space-xxl)) + var(--ic-space-xxs) + var(--ic-space-xl)\n )}input{border:0;height:100%;padding:0;outline:none;background:none;-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield;color:var(--ic-time-picker-time-text-default);caret-color:var(--ic-time-picker-typing-cursor)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none}input:-webkit-autofill{box-shadow:0 0 0 var(--ic-space-sm) var(--ic-color-background-primary) inset;-webkit-text-fill-color:var(--ic-time-picker-time-text-default) !important}input::-moz-placeholder{color:var(--ic-time-picker-field-placeholder-text)}input::placeholder{color:var(--ic-time-picker-field-placeholder-text)}ic-input-component-container{cursor:text}ic-input-component-container .focus-indicator{padding:var(--ic-space-xxxs) var(--ic-space-xs);align-items:center}.time-inputs{color:var(--ic-time-picker-field-placeholder-text)}.hour-input{width:1.438rem}.minute-input{width:1.813rem}.second-input,.
|
|
17
|
+
const icTimeInputCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{--ic-input-label-helpertext-padding:var(--ic-space-xs);--input-bg-color:var(--ic-time-picker-field-background);--ic-input-label-text-color:var(--ic-time-picker-label);--ic-input-label-helper-text-color:var(--ic-time-picker-subtitle);--border-color:var(--ic-time-picker-time-field-border-default);--border-color-disabled:var(--ic-time-picker-border-disabled);--border-color-hover:var(--ic-time-picker-time-field-border-hover);--border-color-pressed:var(--ic-time-picker-time-field-border-pressed);--border-error-color:var(--ic-time-picker-border-error);--border-error-color-hover:var(--ic-time-picker-border-error-hover);--border-error-color-pressed:var(--ic-time-picker-border-error-pressed);--border-success-color:var(--ic-time-picker-border-success);--border-success-color-hover:var(--ic-time-picker-border-success-hover);--border-success-color-pressed:var(--ic-time-picker-border-success-pressed);--border-warning-color:var(--ic-time-picker-border-warning);--border-warning-color-hover:var(--ic-time-picker-border-warning-hover);--border-warning-color-pressed:var(--ic-time-picker-border-warning-pressed);--input-width:calc((4 * var(--ic-space-xxl)) + var(--ic-space-xxs))}:host(.ic-time-input-disabled){--ic-input-label-text-color:var(--ic-time-picker-label-disabled);--ic-input-label-helper-text-color:var(--ic-time-picker-subtitle-disabled)}:host(.ic-time-input-disabled) input{color:var(--ic-time-picker-time-text-disabled)}:host(.ic-time-input-large){--input-width:calc(\n (4 * var(--ic-space-xxl)) + var(--ic-space-xxs) + var(--ic-space-lg)\n )}:host(.ic-time-input-small){--input-width:calc(\n (3 * var(--ic-space-xxl)) + var(--ic-space-xxs) + var(--ic-space-xl)\n )}.with-am-pm-toggle{display:flex;flex-direction:row}.am-pm-toggle ::part(button){min-width:-moz-fit-content;min-width:fit-content}.am-pm-toggle{margin-left:var(--ic-space-xs)}input{border:0;height:100%;padding:0;outline:none;background:none;-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield;color:var(--ic-time-picker-time-text-default);caret-color:var(--ic-time-picker-typing-cursor)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none}input:-webkit-autofill{box-shadow:0 0 0 var(--ic-space-sm) var(--ic-color-background-primary) inset;-webkit-text-fill-color:var(--ic-time-picker-time-text-default) !important}input::-moz-placeholder{color:var(--ic-time-picker-field-placeholder-text)}input::placeholder{color:var(--ic-time-picker-field-placeholder-text)}ic-input-component-container{cursor:text}ic-input-component-container .focus-indicator{padding:var(--ic-space-xxxs) var(--ic-space-xs);align-items:center}.time-inputs{color:var(--ic-time-picker-field-placeholder-text)}.hour-input{width:1.438rem}.minute-input{width:1.813rem}.second-input{width:1.18rem}.millisecond-input,.millisecond-input.fit-to-value{width:1.75rem}.fit-to-value{width:1.25rem}.sr-only{position:absolute;left:-9999px}.input-container{width:100%;display:flex;justify-content:space-between;align-items:center;position:relative}.action-buttons{display:flex;align-items:center}.show-clock-button-wrapper{display:flex;justify-content:center;align-items:center}.clear-button,.clock-button{border-radius:var(--ic-border-radius);transition:box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition);margin:0}.clear-button.hidden{display:none}.clear-button:focus,.clock-button:focus,.clear-button:active,.clock-button:active{background-color:var(--ic-color-focus-inner) !important;box-shadow:inset 0 0 0 0.125rem var(--ic-color-focus-outer) !important;border-radius:0.25rem}.clock-button:focus,.clock-button:active{--ic-button-tertiary-text-active:var(--ic-atoms-input-clear-button-focus);--ic-button-tertiary-text-hover-active:var(\n --ic-atoms-input-clear-button-focus\n );--ic-button-tertiary-text-pressed-active:var(\n --ic-atoms-input-clear-button-focus\n )}.clear-button:focus,.clock-button:focus,.clear-button:active *,.clock-button:active *{fill:var(--ic-atoms-input-clear-button-focus)}.clear-button svg{color:var(--ic-time-picker-clear-icon)}.clear-button:focus svg{color:var(--ic-atoms-input-clear-button-focus)}.divider{margin:0 var(--ic-space-xxs);width:var(--ic-space-1px);background-color:var(--ic-atoms-input-divider);border-radius:var(--ic-space-1px)}.divider.small{height:var(--ic-space-md)}.divider.medium{height:calc(var(--ic-space-sm) + var(--ic-space-xs))}.divider.large{height:var(--ic-space-lg)}ic-input-validation{--ic-input-validation-status-text-color:var(--ic-time-picker-status-text);--ic-input-validation-error:var(--ic-time-picker-icon-error);--ic-input-validation-warning-icon-color:var(--ic-time-picker-icon-warning);--ic-input-validation-success-icon-color:var(--ic-time-picker-icon-success)}@media (forced-colors: active){.clear-button svg{color:currentcolor}}";
|
|
16
18
|
const IcTimeInputStyle0 = icTimeInputCss;
|
|
17
19
|
|
|
18
20
|
let inputIds = 0;
|
|
@@ -23,9 +25,10 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
23
25
|
this.__attachShadow();
|
|
24
26
|
this.clockButtonClicked = createEvent(this, "clockButtonClicked", 7);
|
|
25
27
|
this.icBlur = createEvent(this, "icBlur", 7);
|
|
26
|
-
this.
|
|
28
|
+
this.icTimeChange = createEvent(this, "icTimeChange", 7);
|
|
27
29
|
this.icFocus = createEvent(this, "icFocus", 7);
|
|
28
30
|
this.DEFAULT_TIME_FORMAT = "HH:MM:SS";
|
|
31
|
+
this.TOGGLE_BUTTON_SELECTOR = "ic-toggle-button";
|
|
29
32
|
this.ARIA_INVALID = "aria-invalid";
|
|
30
33
|
this.ARIA_LABEL = "aria-label";
|
|
31
34
|
this.ARIA_LABELLED_BY = "aria-labelledby";
|
|
@@ -36,6 +39,7 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
36
39
|
this.isValidHour = true;
|
|
37
40
|
this.isValidMinute = true;
|
|
38
41
|
this.isValidSecond = true;
|
|
42
|
+
this.isValidMillisecond = true;
|
|
39
43
|
this.isValidTime = true;
|
|
40
44
|
this.isTimeSetFromKeyboardEvent = false;
|
|
41
45
|
this.previousSelectedTime = null;
|
|
@@ -44,12 +48,20 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
44
48
|
this.clearInput = false;
|
|
45
49
|
this.maxTime = null;
|
|
46
50
|
this.minTime = null;
|
|
51
|
+
this.previousHour = "";
|
|
52
|
+
this.previousMinute = "";
|
|
53
|
+
this.previousSecond = "";
|
|
54
|
+
this.previousMillisecond = "";
|
|
55
|
+
this.previousPeriod = "AM";
|
|
47
56
|
this.clockFocused = false;
|
|
48
57
|
this.clearButtonFocused = false;
|
|
49
58
|
this.removeLabelledBy = false;
|
|
50
59
|
this.hour = "";
|
|
51
60
|
this.minute = "";
|
|
52
61
|
this.second = "";
|
|
62
|
+
this.millisecond = "";
|
|
63
|
+
this.period = "AM";
|
|
64
|
+
this.isSSSFormat = () => this.timeFormat === "HH:MM:SS.SSS";
|
|
53
65
|
/**
|
|
54
66
|
* If `true`, the disabled state will be set.
|
|
55
67
|
*/
|
|
@@ -59,7 +71,7 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
59
71
|
*/
|
|
60
72
|
this.disableTimes = [];
|
|
61
73
|
/**
|
|
62
|
-
* If `true`, every individual input field completed will emit an
|
|
74
|
+
* If `true`, every individual input field completed will emit an icTimeChange event.
|
|
63
75
|
*/
|
|
64
76
|
this.emitTimePartChange = false;
|
|
65
77
|
/**
|
|
@@ -94,6 +106,10 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
94
106
|
* If `true`, the input will require a value.
|
|
95
107
|
*/
|
|
96
108
|
this.required = false;
|
|
109
|
+
/**
|
|
110
|
+
* If `true`, the time input will show an AM/PM toggle when in 12-hour time period.
|
|
111
|
+
*/
|
|
112
|
+
this.showAmPmToggle = false;
|
|
97
113
|
/**
|
|
98
114
|
* If `true`, a button which clears the time input when clicked will be displayed.
|
|
99
115
|
*/
|
|
@@ -141,19 +157,6 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
141
157
|
inputEl.classList.add(this.FIT_TO_VALUE);
|
|
142
158
|
}
|
|
143
159
|
};
|
|
144
|
-
this.parseTime = (value) => {
|
|
145
|
-
if (!value)
|
|
146
|
-
return null;
|
|
147
|
-
if (value instanceof Date)
|
|
148
|
-
return value;
|
|
149
|
-
const parts = value.split(":");
|
|
150
|
-
if (parts.length >= 2) {
|
|
151
|
-
const d = new Date();
|
|
152
|
-
d.setHours(+parts[0], +parts[1], parts[2] ? +parts[2] : 0, 0);
|
|
153
|
-
return d;
|
|
154
|
-
}
|
|
155
|
-
return null;
|
|
156
|
-
};
|
|
157
160
|
this.isHHMMFormat = () => this.timeFormat === "HH:MM";
|
|
158
161
|
this.isKeyboardOrEvent = (event) => {
|
|
159
162
|
return (Object.prototype.toString.call(event) === this.EVENT_OBJECT_STRING ||
|
|
@@ -181,9 +184,22 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
181
184
|
else {
|
|
182
185
|
this.isValidSecond = true;
|
|
183
186
|
}
|
|
187
|
+
if (this.isSSSFormat()) {
|
|
188
|
+
if (!isEmptyString(this.millisecond)) {
|
|
189
|
+
this.isValidMillisecond =
|
|
190
|
+
+this.millisecond >= 0 && +this.millisecond <= 999;
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
this.isValidMillisecond = true;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
this.isValidMillisecond = true;
|
|
198
|
+
}
|
|
184
199
|
}
|
|
185
200
|
else {
|
|
186
201
|
this.isValidSecond = true;
|
|
202
|
+
this.isValidMillisecond = true;
|
|
187
203
|
}
|
|
188
204
|
};
|
|
189
205
|
this.setInputValue = (input, clear = false) => {
|
|
@@ -197,6 +213,9 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
197
213
|
else if (input === this.secondInputEl && !this.isHHMMFormat()) {
|
|
198
214
|
this.second = newValue;
|
|
199
215
|
}
|
|
216
|
+
else if (this.isSSSFormat() && input === this.millisecondInputEl) {
|
|
217
|
+
this.millisecond = newValue;
|
|
218
|
+
}
|
|
200
219
|
this.setValidationMessage();
|
|
201
220
|
};
|
|
202
221
|
this.setPreventInput = (input, isPrevented) => {
|
|
@@ -209,22 +228,50 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
209
228
|
else if (input === this.secondInputEl) {
|
|
210
229
|
this.preventSecondInput = isPrevented;
|
|
211
230
|
}
|
|
231
|
+
else if (this.isSSSFormat() && input === this.millisecondInputEl) {
|
|
232
|
+
this.preventMillisecondInput = isPrevented;
|
|
233
|
+
}
|
|
212
234
|
};
|
|
213
235
|
this.setValidationMessage = () => {
|
|
214
|
-
this.maxTime =
|
|
215
|
-
this.minTime =
|
|
236
|
+
this.maxTime = parseTimeHelper(this.max).date;
|
|
237
|
+
this.minTime = parseTimeHelper(this.min).date;
|
|
216
238
|
this.setTimeValidity();
|
|
217
239
|
let outOfBoundsMsg = "";
|
|
218
240
|
let isDisabledTime = false;
|
|
219
241
|
if (!isEmptyString(this.hour) &&
|
|
220
242
|
!isEmptyString(this.minute) &&
|
|
221
|
-
(this.isHHMMFormat() || !isEmptyString(this.second))
|
|
222
|
-
|
|
223
|
-
this.
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
243
|
+
(this.isHHMMFormat() || !isEmptyString(this.second)) &&
|
|
244
|
+
(!this.isSSSFormat() || !isEmptyString(this.millisecond))) {
|
|
245
|
+
this.selectedTime = this.convertToTime(this.hour, this.minute, this.isHHMMFormat() ? "00" : this.second, this.isSSSFormat() ? this.millisecond : "000");
|
|
246
|
+
const inputHour = +this.hour;
|
|
247
|
+
const selectedHour = this.selectedTime
|
|
248
|
+
? this.selectedTime.getHours()
|
|
249
|
+
: null;
|
|
250
|
+
if (this.timePeriod === "12" &&
|
|
251
|
+
this.showAmPmToggle &&
|
|
252
|
+
selectedHour !== null) {
|
|
253
|
+
let selectedHour12 = selectedHour % 12;
|
|
254
|
+
if (selectedHour12 === 0)
|
|
255
|
+
selectedHour12 = 12;
|
|
256
|
+
this.isValidTime =
|
|
257
|
+
!!this.selectedTime &&
|
|
258
|
+
selectedHour12 == inputHour &&
|
|
259
|
+
this.selectedTime.getMinutes() == +this.minute &&
|
|
260
|
+
(this.isHHMMFormat() ||
|
|
261
|
+
this.selectedTime.getSeconds() == +this.second) &&
|
|
262
|
+
(!this.isSSSFormat() ||
|
|
263
|
+
this.selectedTime.getMilliseconds() == +this.millisecond);
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
this.isValidTime =
|
|
267
|
+
!!this.selectedTime &&
|
|
268
|
+
this.selectedTime.getHours() == inputHour &&
|
|
269
|
+
this.selectedTime.getMinutes() == +this.minute &&
|
|
270
|
+
(this.isHHMMFormat() ||
|
|
271
|
+
this.selectedTime.getSeconds() == +this.second) &&
|
|
272
|
+
(!this.isSSSFormat() ||
|
|
273
|
+
this.selectedTime.getMilliseconds() == +this.millisecond);
|
|
274
|
+
}
|
|
228
275
|
if (this.selectedTime &&
|
|
229
276
|
Array.isArray(this.disableTimes) &&
|
|
230
277
|
this.disableTimes.length > 0) {
|
|
@@ -233,18 +280,25 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
233
280
|
t !== null &&
|
|
234
281
|
"start" in t &&
|
|
235
282
|
"end" in t) {
|
|
236
|
-
const start =
|
|
237
|
-
const end =
|
|
283
|
+
const start = parseTimeHelper(t.start).date;
|
|
284
|
+
const end = parseTimeHelper(t.end).date;
|
|
238
285
|
if (start && end) {
|
|
239
286
|
return this.selectedTime >= start && this.selectedTime <= end;
|
|
240
287
|
}
|
|
241
288
|
return false;
|
|
242
289
|
}
|
|
243
|
-
const parsed =
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
290
|
+
const parsed = parseTimeHelper(t).parts;
|
|
291
|
+
if (!parsed)
|
|
292
|
+
return false;
|
|
293
|
+
let selectedHour = this.selectedTime.getHours();
|
|
294
|
+
let parsedHour = parsed.hour;
|
|
295
|
+
if (this.timePeriod === "12" && this.showAmPmToggle) {
|
|
296
|
+
selectedHour = this.convertTo24Hour(selectedHour);
|
|
297
|
+
parsedHour = this.convertTo24Hour(parsedHour);
|
|
298
|
+
}
|
|
299
|
+
return (parsedHour === selectedHour &&
|
|
300
|
+
parsed.minute === this.selectedTime.getMinutes() &&
|
|
301
|
+
parsed.second === this.selectedTime.getSeconds());
|
|
248
302
|
});
|
|
249
303
|
if (isDisabledTime) {
|
|
250
304
|
this.isValidTime = false;
|
|
@@ -274,6 +328,7 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
274
328
|
if (!(this.isValidHour &&
|
|
275
329
|
this.isValidMinute &&
|
|
276
330
|
this.isValidSecond &&
|
|
331
|
+
this.isValidMillisecond &&
|
|
277
332
|
this.isValidTime)) {
|
|
278
333
|
this.invalidTimeText = outOfBoundsMsg || this.invalidTimeMessage;
|
|
279
334
|
}
|
|
@@ -285,12 +340,33 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
285
340
|
const hh = time.getHours().toString().padStart(2, "0");
|
|
286
341
|
const mm = time.getMinutes().toString().padStart(2, "0");
|
|
287
342
|
const ss = time.getSeconds().toString().padStart(2, "0");
|
|
343
|
+
const sss = time.getMilliseconds().toString().padStart(3, "0");
|
|
344
|
+
if (this.isSSSFormat()) {
|
|
345
|
+
return `${hh}:${mm}:${ss}.${sss}`;
|
|
346
|
+
}
|
|
288
347
|
return this.isHHMMFormat() ? `${hh}:${mm}` : `${hh}:${mm}:${ss}`;
|
|
289
348
|
};
|
|
290
349
|
this.handleInput = (event) => {
|
|
291
350
|
const inputEvent = event;
|
|
292
351
|
const input = event.target;
|
|
293
|
-
if (input
|
|
352
|
+
if (input === this.millisecondInputEl && this.isSSSFormat()) {
|
|
353
|
+
this.setInputValue(input);
|
|
354
|
+
this.setPreventInput(input, false);
|
|
355
|
+
this.setFitToValueStyling(input);
|
|
356
|
+
if (input.value.length === 3) {
|
|
357
|
+
this.moveToNextInput(input);
|
|
358
|
+
this.setPreventInput(input, true);
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
this.setPreventInput(input, false);
|
|
362
|
+
}
|
|
363
|
+
if (input.value.length === 0) {
|
|
364
|
+
this.setInputValue(input, true);
|
|
365
|
+
this.setValidationMessage();
|
|
366
|
+
}
|
|
367
|
+
this.notifyScreenReader(input);
|
|
368
|
+
}
|
|
369
|
+
else if (input !== this.hourInputEl) {
|
|
294
370
|
if (inputEvent.inputType !== "deleteContentBackward" &&
|
|
295
371
|
!this.preventAutoFormatting) {
|
|
296
372
|
if (input.value.length === 1 &&
|
|
@@ -323,6 +399,12 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
323
399
|
if (input.value.length !== 2) {
|
|
324
400
|
this.setPreventInput(input, false);
|
|
325
401
|
}
|
|
402
|
+
this.setFitToValueStyling(input);
|
|
403
|
+
if (input.value.length === 0) {
|
|
404
|
+
this.setInputValue(input, true);
|
|
405
|
+
this.setValidationMessage();
|
|
406
|
+
}
|
|
407
|
+
this.notifyScreenReader(input);
|
|
326
408
|
}
|
|
327
409
|
else {
|
|
328
410
|
if (input.value.length === 2) {
|
|
@@ -336,18 +418,25 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
336
418
|
this.setInputValue(input, true);
|
|
337
419
|
this.setPreventInput(input, false);
|
|
338
420
|
}
|
|
421
|
+
this.setFitToValueStyling(input);
|
|
422
|
+
if (input.value.length === 0) {
|
|
423
|
+
this.setInputValue(input, true);
|
|
424
|
+
this.setValidationMessage();
|
|
425
|
+
}
|
|
426
|
+
this.notifyScreenReader(input);
|
|
339
427
|
}
|
|
340
|
-
this.setFitToValueStyling(input);
|
|
341
|
-
if (input.value.length === 0) {
|
|
342
|
-
this.setInputValue(input, true);
|
|
343
|
-
this.setValidationMessage();
|
|
344
|
-
}
|
|
345
|
-
this.notifyScreenReader(input);
|
|
346
428
|
};
|
|
347
429
|
this.handleKeyDown = (event, isInputPrevented) => {
|
|
348
430
|
var _a;
|
|
431
|
+
const navKeys = /arrowup|arrowdown|arrowleft|arrowright|shift|tab|backspace|delete/i;
|
|
349
432
|
const input = event.target;
|
|
350
433
|
const eventKey = (_a = event.key) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
434
|
+
if (!/-?\d*\.?\d+(e[-+]?\d+)?|[:]|[.]/i.test(eventKey) &&
|
|
435
|
+
!navKeys.test(eventKey) &&
|
|
436
|
+
!((event.ctrlKey || event.metaKey) &&
|
|
437
|
+
(eventKey === "v" || eventKey === "c"))) {
|
|
438
|
+
event.preventDefault();
|
|
439
|
+
}
|
|
351
440
|
const regex = /-?\d*\.?\d+(e[-+]?\d+)?|[:]|arrowup|arrowdown|arrowleft|arrowright|shift|tab|backspace|delete/;
|
|
352
441
|
if (!regex.test(eventKey) &&
|
|
353
442
|
!((event.ctrlKey || event.metaKey) &&
|
|
@@ -385,7 +474,18 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
385
474
|
};
|
|
386
475
|
this.handleBlur = (event) => {
|
|
387
476
|
const input = event.target;
|
|
388
|
-
if (input) {
|
|
477
|
+
if (input === this.millisecondInputEl && this.isSSSFormat()) {
|
|
478
|
+
if (input.value.length === 1) {
|
|
479
|
+
input.value = `00${input.value}`;
|
|
480
|
+
this.setInputValue(input);
|
|
481
|
+
}
|
|
482
|
+
else if (input.value.length === 2) {
|
|
483
|
+
input.value = `0${input.value}`;
|
|
484
|
+
this.setInputValue(input);
|
|
485
|
+
}
|
|
486
|
+
this.setFitToValueStyling(input);
|
|
487
|
+
}
|
|
488
|
+
else if (input) {
|
|
389
489
|
this.autocompleteInput(input);
|
|
390
490
|
}
|
|
391
491
|
};
|
|
@@ -441,20 +541,80 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
441
541
|
};
|
|
442
542
|
this.setValueAndEmitChange = (value, force = false) => {
|
|
443
543
|
if (this.value !== value || force) {
|
|
444
|
-
this.
|
|
544
|
+
this.emitIcTimeChange(value);
|
|
445
545
|
this.value = value;
|
|
446
546
|
}
|
|
447
547
|
};
|
|
448
|
-
this.
|
|
449
|
-
|
|
450
|
-
this.
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
548
|
+
this.convertTo24Hour = (hour) => {
|
|
549
|
+
let date24hours = hour;
|
|
550
|
+
if (this.period === "PM" && hour < 12)
|
|
551
|
+
date24hours = hour + 12;
|
|
552
|
+
if (this.period === "AM" && hour === 12)
|
|
553
|
+
date24hours = 0;
|
|
554
|
+
return date24hours;
|
|
555
|
+
};
|
|
556
|
+
this.emitIcTimeChange = (t) => {
|
|
557
|
+
const hour = parseInt(this.hour);
|
|
558
|
+
const minute = parseInt(this.minute);
|
|
559
|
+
const second = parseInt(this.second);
|
|
560
|
+
const millisecond = parseInt(this.millisecond);
|
|
561
|
+
const period = this.period;
|
|
562
|
+
let allSelected = false;
|
|
563
|
+
if (this.isSSSFormat()) {
|
|
564
|
+
allSelected =
|
|
565
|
+
this.hour !== "" &&
|
|
566
|
+
this.minute !== "" &&
|
|
567
|
+
this.second !== "" &&
|
|
568
|
+
this.millisecond !== "";
|
|
569
|
+
}
|
|
570
|
+
else if (this.timeFormat === this.DEFAULT_TIME_FORMAT) {
|
|
571
|
+
allSelected =
|
|
572
|
+
this.hour !== "" && this.minute !== "" && this.second !== "";
|
|
573
|
+
}
|
|
574
|
+
else if (this.timeFormat === "HH:MM") {
|
|
575
|
+
allSelected = this.hour !== "" && this.minute !== "";
|
|
576
|
+
}
|
|
577
|
+
let time = t;
|
|
578
|
+
let date24hours = hour;
|
|
579
|
+
if (hour != null &&
|
|
580
|
+
period &&
|
|
581
|
+
this.timePeriod === "12" &&
|
|
582
|
+
this.showAmPmToggle) {
|
|
583
|
+
date24hours = this.convertTo24Hour(hour);
|
|
584
|
+
time = new Date();
|
|
585
|
+
time.setHours(date24hours !== null && date24hours !== void 0 ? date24hours : 0);
|
|
586
|
+
time.setMinutes(minute !== null && minute !== void 0 ? minute : 0);
|
|
587
|
+
time.setSeconds(second !== null && second !== void 0 ? second : 0);
|
|
588
|
+
this.isSSSFormat() && time.setMilliseconds(millisecond !== null && millisecond !== void 0 ? millisecond : 0);
|
|
589
|
+
}
|
|
590
|
+
this.selectedTime = time;
|
|
591
|
+
const allTimePartsEmpty = this.hour === "" &&
|
|
592
|
+
this.minute === "" &&
|
|
593
|
+
this.second === "" &&
|
|
594
|
+
this.millisecond === "";
|
|
595
|
+
const onlyPeriodChanged = allTimePartsEmpty &&
|
|
596
|
+
this.period !== this.previousPeriod &&
|
|
597
|
+
this.previousHour === "" &&
|
|
598
|
+
this.previousMinute === "" &&
|
|
599
|
+
this.previousSecond === "" &&
|
|
600
|
+
this.previousMillisecond === "";
|
|
601
|
+
if (!onlyPeriodChanged) {
|
|
602
|
+
this.icTimeChange.emit({
|
|
603
|
+
value: allSelected ? time : null,
|
|
604
|
+
timeObject: {
|
|
605
|
+
hour: this.hour === "" ? null : this.hour,
|
|
606
|
+
minute: this.minute === "" ? null : this.minute,
|
|
607
|
+
second: this.second === "" ? null : this.second,
|
|
608
|
+
millisecond: this.millisecond === "" ? null : this.millisecond,
|
|
609
|
+
period: this.period === "" ? null : this.period,
|
|
610
|
+
},
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
this.previousHour = this.hour;
|
|
614
|
+
this.previousMinute = this.minute;
|
|
615
|
+
this.previousSecond = this.second;
|
|
616
|
+
this.previousMillisecond = this.millisecond;
|
|
617
|
+
this.previousPeriod = this.period;
|
|
458
618
|
};
|
|
459
619
|
this.setTime = (time) => {
|
|
460
620
|
if (time === null || time === "" || time === undefined) {
|
|
@@ -464,6 +624,8 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
464
624
|
this.minute = "";
|
|
465
625
|
if (this.second)
|
|
466
626
|
this.second = "";
|
|
627
|
+
if (this.millisecond)
|
|
628
|
+
this.millisecond = "";
|
|
467
629
|
this.inputsInOrder.forEach((input) => {
|
|
468
630
|
input.classList.remove(this.FIT_TO_VALUE);
|
|
469
631
|
this.setPreventInput(input, false);
|
|
@@ -479,22 +641,26 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
479
641
|
this.second = zuluMatch[3];
|
|
480
642
|
}
|
|
481
643
|
else {
|
|
482
|
-
const parts = time.split(
|
|
644
|
+
const parts = time.split(/[:.]/);
|
|
483
645
|
this.hour = parts[0] || "";
|
|
484
646
|
this.minute = parts[1] || "";
|
|
485
647
|
this.second = parts[2] || "";
|
|
648
|
+
this.millisecond = parts[3] || "";
|
|
486
649
|
}
|
|
487
650
|
}
|
|
488
651
|
else if (time instanceof Date) {
|
|
489
652
|
this.hour = time.getHours().toString().padStart(2, "0");
|
|
490
653
|
this.minute = time.getMinutes().toString().padStart(2, "0");
|
|
491
654
|
this.second = time.getSeconds().toString().padStart(2, "0");
|
|
655
|
+
if (this.isSSSFormat()) {
|
|
656
|
+
this.millisecond = time.getMilliseconds().toString().padStart(3, "0");
|
|
657
|
+
}
|
|
492
658
|
}
|
|
493
659
|
}
|
|
494
660
|
this.setValidationMessage();
|
|
495
661
|
};
|
|
496
|
-
this.setAriaInvalid = (validHour, validMinute, validSecond) => {
|
|
497
|
-
var _a, _b, _c;
|
|
662
|
+
this.setAriaInvalid = (validHour, validMinute, validSecond, validMillisecond) => {
|
|
663
|
+
var _a, _b, _c, _d;
|
|
498
664
|
if (this.inputsInOrder.length) {
|
|
499
665
|
this.inputsInOrder.forEach((input) => {
|
|
500
666
|
input.removeAttribute(this.ARIA_INVALID);
|
|
@@ -508,7 +674,10 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
508
674
|
if (!validSecond) {
|
|
509
675
|
(_c = this.secondInputEl) === null || _c === void 0 ? void 0 : _c.setAttribute(this.ARIA_INVALID, "true");
|
|
510
676
|
}
|
|
511
|
-
if (!
|
|
677
|
+
if (!validMillisecond) {
|
|
678
|
+
(_d = this.millisecondInputEl) === null || _d === void 0 ? void 0 : _d.setAttribute(this.ARIA_INVALID, "true");
|
|
679
|
+
}
|
|
680
|
+
if (!(validHour && validMinute && validSecond && validMillisecond)) {
|
|
512
681
|
this.inputsInOrder.forEach((input) => {
|
|
513
682
|
input.setAttribute(this.ARIA_INVALID, "true");
|
|
514
683
|
});
|
|
@@ -516,6 +685,7 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
516
685
|
}
|
|
517
686
|
};
|
|
518
687
|
this.handleClear = () => {
|
|
688
|
+
var _a;
|
|
519
689
|
this.clearInput = true;
|
|
520
690
|
if (this.hourInputEl) {
|
|
521
691
|
this.hourInputEl.value = "";
|
|
@@ -526,9 +696,25 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
526
696
|
if (!this.isHHMMFormat() && this.secondInputEl) {
|
|
527
697
|
this.secondInputEl.value = "";
|
|
528
698
|
}
|
|
699
|
+
if (this.isSSSFormat() && this.millisecondInputEl) {
|
|
700
|
+
this.millisecondInputEl.value = "";
|
|
701
|
+
}
|
|
529
702
|
this.hour = "";
|
|
530
703
|
this.minute = "";
|
|
531
704
|
this.second = "";
|
|
705
|
+
this.millisecond = "";
|
|
706
|
+
this.period = "AM";
|
|
707
|
+
if (this.showAmPmToggle) {
|
|
708
|
+
(_a = this.periodToggleEl) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.TOGGLE_BUTTON_SELECTOR).forEach((btn) => {
|
|
709
|
+
const toggleBtn = btn;
|
|
710
|
+
if (toggleBtn.label === "AM") {
|
|
711
|
+
toggleBtn.checked = true;
|
|
712
|
+
}
|
|
713
|
+
else {
|
|
714
|
+
toggleBtn.checked = false;
|
|
715
|
+
}
|
|
716
|
+
});
|
|
717
|
+
}
|
|
532
718
|
this.handleTimeChange(true);
|
|
533
719
|
this.inputsInOrder.forEach((input) => {
|
|
534
720
|
input.classList.remove(this.FIT_TO_VALUE);
|
|
@@ -544,26 +730,31 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
544
730
|
};
|
|
545
731
|
this.notifyScreenReaderSelectedTime = () => {
|
|
546
732
|
if (this.selectedTime && this.selectedTimeInfoEl) {
|
|
733
|
+
let hours = this.selectedTime.getHours();
|
|
734
|
+
if (this.timePeriod === "12" && this.showAmPmToggle) {
|
|
735
|
+
hours = this.convertTo24Hour(hours);
|
|
736
|
+
}
|
|
737
|
+
const hoursStr = hours.toString().padStart(2, "0");
|
|
738
|
+
const minutesStr = this.selectedTime
|
|
739
|
+
.getMinutes()
|
|
740
|
+
.toString()
|
|
741
|
+
.padStart(2, "0");
|
|
742
|
+
const secondsStr = this.selectedTime
|
|
743
|
+
.getSeconds()
|
|
744
|
+
.toString()
|
|
745
|
+
.padStart(2, "0");
|
|
746
|
+
const msStr = this.selectedTime
|
|
747
|
+
.getMilliseconds()
|
|
748
|
+
.toString()
|
|
749
|
+
.padStart(3, "0");
|
|
547
750
|
if (this.isHHMMFormat()) {
|
|
548
|
-
this.selectedTimeInfoEl.textContent = `Selected time: ${
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
.getMinutes()
|
|
553
|
-
.toString()
|
|
554
|
-
.padStart(2, "0")}`;
|
|
751
|
+
this.selectedTimeInfoEl.textContent = `Selected time: ${hoursStr}:${minutesStr}`;
|
|
752
|
+
}
|
|
753
|
+
else if (!this.isSSSFormat()) {
|
|
754
|
+
this.selectedTimeInfoEl.textContent = `Selected time: ${hoursStr}:${minutesStr}:${secondsStr}`;
|
|
555
755
|
}
|
|
556
756
|
else {
|
|
557
|
-
this.selectedTimeInfoEl.textContent = `Selected time: ${
|
|
558
|
-
.getHours()
|
|
559
|
-
.toString()
|
|
560
|
-
.padStart(2, "0")}:${this.selectedTime
|
|
561
|
-
.getMinutes()
|
|
562
|
-
.toString()
|
|
563
|
-
.padStart(2, "0")}:${this.selectedTime
|
|
564
|
-
.getSeconds()
|
|
565
|
-
.toString()
|
|
566
|
-
.padStart(2, "0")}`;
|
|
757
|
+
this.selectedTimeInfoEl.textContent = `Selected time: ${hoursStr}:${minutesStr}:${secondsStr}.${msStr}`;
|
|
567
758
|
}
|
|
568
759
|
}
|
|
569
760
|
};
|
|
@@ -581,7 +772,7 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
581
772
|
};
|
|
582
773
|
this.handleHostFocus = () => {
|
|
583
774
|
var _a, _b;
|
|
584
|
-
if ((_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) === null || _b === void 0 ? void 0 : _b.id.match(/(hour|minute|second)-input$/)) {
|
|
775
|
+
if ((_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) === null || _b === void 0 ? void 0 : _b.id.match(/(hour|minute|second|millisecond)-input$/)) {
|
|
585
776
|
this.removeLabelledBy = false;
|
|
586
777
|
}
|
|
587
778
|
else {
|
|
@@ -630,12 +821,17 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
630
821
|
this.setInputValue(input);
|
|
631
822
|
}
|
|
632
823
|
};
|
|
633
|
-
this.convertToTime = (hour, minute, second) => {
|
|
824
|
+
this.convertToTime = (hour, minute, second, millisecond = null) => {
|
|
634
825
|
if (!isEmptyString(hour) &&
|
|
635
826
|
!isEmptyString(minute) &&
|
|
636
|
-
(this.isHHMMFormat() || !isEmptyString(second))
|
|
827
|
+
(this.isHHMMFormat() || !isEmptyString(second)) &&
|
|
828
|
+
(!this.isSSSFormat() ||
|
|
829
|
+
(millisecond !== null && !isEmptyString(millisecond)))) {
|
|
637
830
|
const d = new Date();
|
|
638
831
|
d.setHours(+hour, +minute, this.isHHMMFormat() ? 0 : +second, 0);
|
|
832
|
+
if (this.isSSSFormat() && millisecond !== null) {
|
|
833
|
+
d.setMilliseconds(+millisecond);
|
|
834
|
+
}
|
|
639
835
|
return d;
|
|
640
836
|
}
|
|
641
837
|
else {
|
|
@@ -680,17 +876,22 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
680
876
|
(_d = this.inputCompContainerEl) === null || _d === void 0 ? void 0 : _d.setAttribute(this.ARIA_LABELLED_BY, labelledBy);
|
|
681
877
|
};
|
|
682
878
|
this.getInputsInOrder = () => {
|
|
683
|
-
const timeParts = this.timeFormat.split(
|
|
879
|
+
const timeParts = this.timeFormat.split(/[:.]/);
|
|
684
880
|
return timeParts.map((part) => {
|
|
685
|
-
switch (part
|
|
686
|
-
case "
|
|
881
|
+
switch (part) {
|
|
882
|
+
case "HH":
|
|
687
883
|
return (h("input", { class: "hour-input", id: "hour-input", ref: (el) => (this.hourInputEl = el), "aria-label": "hour", placeholder: "HH", disabled: this.disabled, "aria-required": `${this.required}`, inputmode: "number", pattern: "[0-9]*", onPaste: this.handlePaste, onKeyDown: (event) => this.handleKeyDown(event, this.preventHourInput) }));
|
|
688
|
-
case "
|
|
884
|
+
case "MM":
|
|
689
885
|
return (h("input", { id: "minute-input", class: "minute-input", ref: (el) => (this.minuteInputEl = el), "aria-label": "minute", placeholder: "MM", disabled: this.disabled, "aria-required": `${this.required}`, inputmode: "number", pattern: "[0-9]*", onPaste: this.handlePaste, onKeyDown: (event) => this.handleKeyDown(event, this.preventMinuteInput) }));
|
|
690
|
-
case "
|
|
886
|
+
case "SS":
|
|
691
887
|
if (!this.isHHMMFormat()) {
|
|
692
888
|
return (h("input", { id: "second-input", class: "second-input", ref: (el) => (this.secondInputEl = el), "aria-label": "second", placeholder: "SS", disabled: this.disabled, "aria-required": `${this.required}`, inputmode: "number", pattern: "[0-9]*", onPaste: this.handlePaste, onKeyDown: (event) => this.handleKeyDown(event, this.preventSecondInput) }));
|
|
693
889
|
}
|
|
890
|
+
break;
|
|
891
|
+
case "SSS":
|
|
892
|
+
if (this.isSSSFormat()) {
|
|
893
|
+
return (h("input", { id: "millisecond-input", class: "millisecond-input", ref: (el) => (this.millisecondInputEl = el), "aria-label": "millisecond", placeholder: "SSS", disabled: this.disabled, "aria-required": `${this.required}`, inputmode: "number", pattern: "[0-9]*", onPaste: this.handlePaste, onKeyDown: (event) => this.handleKeyDown(event, this.preventMillisecondInput) }));
|
|
894
|
+
}
|
|
694
895
|
return null;
|
|
695
896
|
default:
|
|
696
897
|
return null;
|
|
@@ -698,6 +899,9 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
698
899
|
});
|
|
699
900
|
};
|
|
700
901
|
this.getDescOfInputsOrder = () => {
|
|
902
|
+
if (this.isSSSFormat()) {
|
|
903
|
+
return "hour, minute, second, and millisecond";
|
|
904
|
+
}
|
|
701
905
|
return "hour, minute, and second";
|
|
702
906
|
};
|
|
703
907
|
this.getScreenReaderInfo = (validationStatus) => {
|
|
@@ -737,7 +941,7 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
737
941
|
this.removeLabelledBy = false;
|
|
738
942
|
return;
|
|
739
943
|
}
|
|
740
|
-
if (relatedTarget === null || relatedTarget === void 0 ? void 0 : relatedTarget.id.match(/(minute|second)-input$/)) {
|
|
944
|
+
if (relatedTarget === null || relatedTarget === void 0 ? void 0 : relatedTarget.id.match(/(minute|second|millisecond)-input$/)) {
|
|
741
945
|
this.removeLabelledBy = false;
|
|
742
946
|
return;
|
|
743
947
|
}
|
|
@@ -755,6 +959,18 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
755
959
|
return value;
|
|
756
960
|
}
|
|
757
961
|
}
|
|
962
|
+
else if (this.isSSSFormat()) {
|
|
963
|
+
if (/^\d{2}:\d{2}:\d{2}\.\d{1,3}$/.test(value)) {
|
|
964
|
+
return value;
|
|
965
|
+
}
|
|
966
|
+
if (/^\d{2}:\d{2}:\d{2}\.\d{1,3}Z$/.test(value)) {
|
|
967
|
+
return value.replace("Z", "");
|
|
968
|
+
}
|
|
969
|
+
const isoMatch = value.match(/T(\d{2}:\d{2}:\d{2}\.\d{1,3})/);
|
|
970
|
+
if (isoMatch) {
|
|
971
|
+
return isoMatch[1];
|
|
972
|
+
}
|
|
973
|
+
}
|
|
758
974
|
else {
|
|
759
975
|
if (/^\d{2}:\d{2}:\d{2}$/.test(value)) {
|
|
760
976
|
return value;
|
|
@@ -771,16 +987,78 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
771
987
|
};
|
|
772
988
|
this.setPastedValueAndValidation = (isValidTime, pastedValue, event) => {
|
|
773
989
|
if (isValidTime) {
|
|
774
|
-
const timeParts = isValidTime.split(
|
|
990
|
+
const timeParts = isValidTime.split(/[:.]/);
|
|
775
991
|
this.inputsInOrder.forEach((input, index) => {
|
|
992
|
+
var _a, _b, _c, _d;
|
|
776
993
|
input.classList.add(this.FIT_TO_VALUE);
|
|
777
|
-
|
|
778
|
-
input.
|
|
994
|
+
let timeValue = timeParts[index] || "";
|
|
995
|
+
if (input === this.millisecondInputEl && this.isSSSFormat()) {
|
|
996
|
+
timeValue = timeValue.slice(0, 3);
|
|
997
|
+
}
|
|
998
|
+
else {
|
|
999
|
+
timeValue = timeValue.slice(0, 2);
|
|
1000
|
+
}
|
|
1001
|
+
if (input === this.hourInputEl) {
|
|
1002
|
+
let activeToggle;
|
|
1003
|
+
if (this.timePeriod === "12" && this.showAmPmToggle) {
|
|
1004
|
+
if (parseInt(timeValue) > 12) {
|
|
1005
|
+
timeValue = (parseInt(timeValue) - 12)
|
|
1006
|
+
.toString()
|
|
1007
|
+
.padStart(2, "0");
|
|
1008
|
+
if (parseInt(timeValue) > 12) {
|
|
1009
|
+
return;
|
|
1010
|
+
}
|
|
1011
|
+
else {
|
|
1012
|
+
this.period = "PM";
|
|
1013
|
+
(_a = this.periodToggleEl) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.TOGGLE_BUTTON_SELECTOR).forEach((btn) => {
|
|
1014
|
+
const toggleBtn = btn;
|
|
1015
|
+
if (toggleBtn.label === "PM") {
|
|
1016
|
+
activeToggle = toggleBtn;
|
|
1017
|
+
}
|
|
1018
|
+
else {
|
|
1019
|
+
toggleBtn.checked = false;
|
|
1020
|
+
}
|
|
1021
|
+
});
|
|
1022
|
+
if (activeToggle) {
|
|
1023
|
+
(_b = this.periodToggleEl) === null || _b === void 0 ? void 0 : _b.setActiveToggle(activeToggle);
|
|
1024
|
+
activeToggle.checked = true;
|
|
1025
|
+
}
|
|
1026
|
+
this.invalidTimeText = "";
|
|
1027
|
+
this.validationStatus = "";
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
else {
|
|
1031
|
+
if (parseInt(timeValue) === 0) {
|
|
1032
|
+
timeValue = "12";
|
|
1033
|
+
}
|
|
1034
|
+
this.period = "AM";
|
|
1035
|
+
(_c = this.periodToggleEl) === null || _c === void 0 ? void 0 : _c.querySelectorAll(this.TOGGLE_BUTTON_SELECTOR).forEach((btn) => {
|
|
1036
|
+
const toggleBtn = btn;
|
|
1037
|
+
if (toggleBtn.label === "AM") {
|
|
1038
|
+
activeToggle = toggleBtn;
|
|
1039
|
+
}
|
|
1040
|
+
else {
|
|
1041
|
+
toggleBtn.checked = false;
|
|
1042
|
+
}
|
|
1043
|
+
});
|
|
1044
|
+
if (activeToggle) {
|
|
1045
|
+
(_d = this.periodToggleEl) === null || _d === void 0 ? void 0 : _d.setActiveToggle(activeToggle);
|
|
1046
|
+
activeToggle.checked = true;
|
|
1047
|
+
}
|
|
1048
|
+
this.invalidTimeText = "";
|
|
1049
|
+
this.validationStatus = "";
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
input.value = timeValue;
|
|
779
1054
|
this.setInputValue(input);
|
|
780
1055
|
this.autocompleteInput(input);
|
|
781
1056
|
});
|
|
782
|
-
if (this.isHHMMFormat() &&
|
|
1057
|
+
if (this.isHHMMFormat() &&
|
|
1058
|
+
this.second !== "" &&
|
|
1059
|
+
this.millisecond !== "") {
|
|
783
1060
|
this.second = "";
|
|
1061
|
+
this.millisecond = "";
|
|
784
1062
|
}
|
|
785
1063
|
}
|
|
786
1064
|
else {
|
|
@@ -795,14 +1073,22 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
795
1073
|
}
|
|
796
1074
|
}
|
|
797
1075
|
};
|
|
1076
|
+
this.handleAMPM = (selectedOption) => {
|
|
1077
|
+
var _a;
|
|
1078
|
+
this.period = selectedOption.label;
|
|
1079
|
+
(_a = this.periodToggleEl) === null || _a === void 0 ? void 0 : _a.setActiveToggle(selectedOption);
|
|
1080
|
+
};
|
|
798
1081
|
}
|
|
799
1082
|
watchInputHandler() {
|
|
800
1083
|
if (this.emitTimePartChange &&
|
|
801
1084
|
!this.externalSetTime &&
|
|
802
1085
|
!this.clearInput &&
|
|
803
|
-
!(this.hour &&
|
|
1086
|
+
!(this.hour &&
|
|
1087
|
+
this.minute &&
|
|
1088
|
+
this.second &&
|
|
1089
|
+
(this.isSSSFormat() ? this.millisecond : true)) &&
|
|
804
1090
|
this.selectedTime === null) {
|
|
805
|
-
this.
|
|
1091
|
+
this.emitIcTimeChange(this.selectedTime);
|
|
806
1092
|
}
|
|
807
1093
|
}
|
|
808
1094
|
watchDisabledHandler() {
|
|
@@ -813,10 +1099,10 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
813
1099
|
this.helperText = this.defaultHelperText;
|
|
814
1100
|
}
|
|
815
1101
|
watchMaxHandler() {
|
|
816
|
-
this.maxTime =
|
|
1102
|
+
this.maxTime = parseTimeHelper(this.max).date;
|
|
817
1103
|
}
|
|
818
1104
|
watchMinHandler() {
|
|
819
|
-
this.minTime =
|
|
1105
|
+
this.minTime = parseTimeHelper(this.min).date;
|
|
820
1106
|
}
|
|
821
1107
|
watchRequiredHandler() {
|
|
822
1108
|
var _a, _b;
|
|
@@ -865,7 +1151,7 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
865
1151
|
input.classList.add(this.FIT_TO_VALUE);
|
|
866
1152
|
});
|
|
867
1153
|
}
|
|
868
|
-
this.setAriaInvalid(this.isValidHour, this.isValidMinute, this.isValidSecond);
|
|
1154
|
+
this.setAriaInvalid(this.isValidHour, this.isValidMinute, this.isValidSecond, this.isValidMillisecond);
|
|
869
1155
|
if (this.value) {
|
|
870
1156
|
this.notifyScreenReaderSelectedTime();
|
|
871
1157
|
}
|
|
@@ -879,7 +1165,7 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
879
1165
|
componentWillUpdate() {
|
|
880
1166
|
if (!this.isTimeSetFromKeyboardEvent)
|
|
881
1167
|
this.setTime(this.value);
|
|
882
|
-
this.setAriaInvalid(this.isValidHour, this.isValidMinute, this.isValidSecond);
|
|
1168
|
+
this.setAriaInvalid(this.isValidHour, this.isValidMinute, this.isValidSecond, this.isValidMillisecond);
|
|
883
1169
|
this.handleTimeChange(false);
|
|
884
1170
|
this.isTimeSetFromKeyboardEvent = false;
|
|
885
1171
|
}
|
|
@@ -898,12 +1184,12 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
898
1184
|
return this.selectedTime;
|
|
899
1185
|
}
|
|
900
1186
|
/**
|
|
901
|
-
* @internal Used to enable other components to invoke an
|
|
1187
|
+
* @internal Used to enable other components to invoke an icTimeChange event from the input.
|
|
902
1188
|
*/
|
|
903
|
-
async
|
|
1189
|
+
async triggerIcTimeChange(t) {
|
|
904
1190
|
this.externalSetTime = true;
|
|
905
1191
|
this.setTime(t);
|
|
906
|
-
this.
|
|
1192
|
+
this.emitIcTimeChange(t);
|
|
907
1193
|
this.externalSetTime = false;
|
|
908
1194
|
}
|
|
909
1195
|
render() {
|
|
@@ -920,23 +1206,39 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
920
1206
|
!(isEmptyString(this.hour) &&
|
|
921
1207
|
isEmptyString(this.minute) &&
|
|
922
1208
|
isEmptyString(this.second)));
|
|
923
|
-
|
|
1209
|
+
if (this.showAmPmToggle && this.timePeriod !== "12") {
|
|
1210
|
+
this.showAmPmToggle = false;
|
|
1211
|
+
}
|
|
1212
|
+
return (h(Host, { key: 'd005982324084fad9fdfe6392cf879e15709d2ef', class: {
|
|
924
1213
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
925
1214
|
[`ic-time-input-disabled`]: disabled,
|
|
926
1215
|
[`ic-time-input-${size}`]: true,
|
|
927
|
-
}, onBlur: this.handleHostBlur, onFocus: this.handleHostFocus }, h("ic-input-container", { key: '
|
|
1216
|
+
}, onBlur: this.handleHostBlur, onFocus: this.handleHostFocus }, h("ic-input-container", { key: '6fcc48d72a92ef2a0acf3f6b109e29b24c6608db', disabled: disabled }, !(hideLabel && hideHelperText) && (h("ic-input-label", { key: '84364f527bbfeffed22d95df1ce879bb9cb55fde', for: inputId, label: label, hideLabel: hideLabel, helperText: !hideHelperText ? helperText : "", disabled: disabled }, h("slot", { key: '4a993ddc9a3923e4fbe58f4abfd1d6f51ef63494', name: "helper-text", slot: "helper-text" }))), h("span", { key: 'de2889971bef74376661a3fb0963c9bc88673e12', id: this.screenReaderInfoId, class: "sr-only", "aria-hidden": "true" }, this.getScreenReaderInfo(validationStatus), hideLabel && `${label}\n`, hideHelperText && `${helperText}\n`, `${this.defaultHelperText}.`), h("span", { key: 'b68b686d6794d6ad1247f18c867b1652066b48da', id: this.assistiveHintId, class: "sr-only", "aria-hidden": "true" }, assistiveHint), h("span", { key: '56557e76da321f937be614926cd3f41b4c9a09a8', id: "live-region", "aria-live": "assertive", class: "sr-only" }), h("div", { key: '89cbb13ffe21d66fd82a28ad6b5b295cf68c5787', class: {
|
|
1217
|
+
"with-am-pm-toggle": this.showAmPmToggle === true,
|
|
1218
|
+
} }, h("ic-input-component-container", { key: '03a61c8d72f43d68f81069327aa31b632bfee74d', id: inputId, ref: (el) => (this.inputCompContainerEl = el), disabled: disabled, validationStatus: validationStatus, size: size, role: "group", class: { [`ic-theme-${theme}`]: theme !== "inherit" } }, h("div", { key: '0fdf9d4191272a8b53e73d6230e10750032d5279', class: "input-container" }, h("div", { key: 'c7b13f330ec67b48e817f4b87fff96ad6ad6102e', class: "time-inputs" }, [
|
|
928
1219
|
this.getInputsInOrder()[0],
|
|
929
1220
|
":",
|
|
930
1221
|
this.getInputsInOrder()[1],
|
|
931
1222
|
!this.isHHMMFormat()
|
|
932
1223
|
? [":", this.getInputsInOrder()[2]]
|
|
933
1224
|
: null,
|
|
934
|
-
|
|
1225
|
+
this.isSSSFormat()
|
|
1226
|
+
? [".", this.getInputsInOrder()[3]]
|
|
1227
|
+
: null,
|
|
1228
|
+
]), h("div", { key: 'caf4926b8008875a111f6bb3aa0815cfb2e10768', class: "action-buttons" }, showClearButton && (h("ic-button", { key: '9883c16dc3d60c6ea4d9d3cc3e4a770479339879', id: "clear-button", "aria-label": "Clear input", class: {
|
|
935
1229
|
["clear-button"]: true,
|
|
936
1230
|
["hidden"]: isEmptyString(this.hour) &&
|
|
937
1231
|
isEmptyString(this.minute) &&
|
|
938
1232
|
isEmptyString(this.second),
|
|
939
|
-
}, disabled: this.disabled, innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearFocus, onBlur: this.handleClearBlur, variant: "icon-tertiary", theme: this.clearButtonFocused ? "light" : "dark", size: size })), showClockButton && (h("div", { key: '
|
|
1233
|
+
}, disabled: this.disabled, innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearFocus, onBlur: this.handleClearBlur, variant: "icon-tertiary", theme: this.clearButtonFocused ? "light" : "dark", size: size })), showClockButton && (h("div", { key: '9ace5895419381c300bbdc5c8ef2eeacad05b63b', class: "show-clock-button-wrapper" }, h("div", { key: 'dfa2a5bbf9e7bd74353d7caf3514861d545d6026', class: { divider: showDivider, [size]: true } }), h("ic-button", { key: '1c36dcf4f02a323aafeb265126e2d1334df077b2', id: "clock-button", "aria-label": "Display clock", "aria-haspopup": "dialog", class: "clock-button", disabled: this.disabled, innerHTML: Clock, variant: "icon-tertiary", size: size, onFocus: this.handleClockFocus, onBlur: this.handleClockBlur, theme: this.clockFocused ? "light" : "dark" })))))), this.showAmPmToggle && (h("ic-toggle-button-group", { key: 'c63749fddcc1b7ed3c394a17a5d1a65aa322f024', "select-type": "single", "accessible-label": "AM PM Toggle", ref: (el) => (this.periodToggleEl = el), disabled: disabled, class: "am-pm-toggle", "select-method": "auto", onIcChange: (e) => this.handleAMPM(e.detail.selectedOption), onKeyDown: (e) => {
|
|
1234
|
+
if (e.key === "Tab" && e.shiftKey) {
|
|
1235
|
+
e.preventDefault();
|
|
1236
|
+
if (this.inputsInOrder && this.inputsInOrder.length > 0) {
|
|
1237
|
+
const lastInput = this.inputsInOrder[this.inputsInOrder.length - 1];
|
|
1238
|
+
lastInput === null || lastInput === void 0 ? void 0 : lastInput.focus();
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
} }, h("ic-toggle-button", { key: 'fc731674e7c26846a969768ddc77b94b14c6cca6', label: "AM", disabled: disabled, checked: true }), h("ic-toggle-button", { key: '89e0bd48a39a8e786fcac5e034358edd560f4136', label: "PM", disabled: disabled })))), h("span", { key: '52854ea1dc4a1c4e7783914ff90bf204848a2e6e', id: this.selectedTimeInfoId, class: "sr-only", "aria-live": "polite" }, h("span", { key: '065c89020778df53ae78d037ef62feb189b7fdba', ref: (el) => (this.selectedTimeInfoEl = el), role: "status" })), h("ic-input-validation", { key: 'fc2500bef0e8e077272424a46663a85509a160c3', status: validationStatus, message: hasCustomValidation ? this.validationText : this.invalidTimeText, for: inputId, ariaLiveMode: validationAriaLive }))));
|
|
940
1242
|
}
|
|
941
1243
|
static get delegatesFocus() { return true; }
|
|
942
1244
|
get el() { return this; }
|
|
@@ -944,6 +1246,8 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
944
1246
|
"hour": ["watchInputHandler"],
|
|
945
1247
|
"minute": ["watchInputHandler"],
|
|
946
1248
|
"second": ["watchInputHandler"],
|
|
1249
|
+
"millisecond": ["watchInputHandler"],
|
|
1250
|
+
"period": ["watchInputHandler"],
|
|
947
1251
|
"disabled": ["watchDisabledHandler"],
|
|
948
1252
|
"helperText": ["watchHelperTextHandler"],
|
|
949
1253
|
"max": ["watchMaxHandler"],
|
|
@@ -966,6 +1270,7 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
966
1270
|
"min": [1],
|
|
967
1271
|
"name": [1],
|
|
968
1272
|
"required": [4],
|
|
1273
|
+
"showAmPmToggle": [1028, "show-am-pm-toggle"],
|
|
969
1274
|
"showClearButton": [4, "show-clear-button"],
|
|
970
1275
|
"showClockButton": [4, "show-clock-button"],
|
|
971
1276
|
"size": [1],
|
|
@@ -983,12 +1288,16 @@ const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLE
|
|
|
983
1288
|
"hour": [32],
|
|
984
1289
|
"minute": [32],
|
|
985
1290
|
"second": [32],
|
|
1291
|
+
"millisecond": [32],
|
|
1292
|
+
"period": [32],
|
|
986
1293
|
"getTime": [64],
|
|
987
|
-
"
|
|
1294
|
+
"triggerIcTimeChange": [64]
|
|
988
1295
|
}, undefined, {
|
|
989
1296
|
"hour": ["watchInputHandler"],
|
|
990
1297
|
"minute": ["watchInputHandler"],
|
|
991
1298
|
"second": ["watchInputHandler"],
|
|
1299
|
+
"millisecond": ["watchInputHandler"],
|
|
1300
|
+
"period": ["watchInputHandler"],
|
|
992
1301
|
"disabled": ["watchDisabledHandler"],
|
|
993
1302
|
"helperText": ["watchHelperTextHandler"],
|
|
994
1303
|
"max": ["watchMaxHandler"],
|
|
@@ -1000,7 +1309,7 @@ function defineCustomElement$1() {
|
|
|
1000
1309
|
if (typeof customElements === "undefined") {
|
|
1001
1310
|
return;
|
|
1002
1311
|
}
|
|
1003
|
-
const components = ["ic-time-input", "ic-button", "ic-input-component-container", "ic-input-container", "ic-input-label", "ic-input-validation", "ic-loading-indicator", "ic-tooltip", "ic-typography"];
|
|
1312
|
+
const components = ["ic-time-input", "ic-button", "ic-input-component-container", "ic-input-container", "ic-input-label", "ic-input-validation", "ic-loading-indicator", "ic-toggle-button", "ic-toggle-button-group", "ic-tooltip", "ic-typography"];
|
|
1004
1313
|
components.forEach(tagName => { switch (tagName) {
|
|
1005
1314
|
case "ic-time-input":
|
|
1006
1315
|
if (!customElements.get(tagName)) {
|
|
@@ -1009,30 +1318,40 @@ function defineCustomElement$1() {
|
|
|
1009
1318
|
break;
|
|
1010
1319
|
case "ic-button":
|
|
1011
1320
|
if (!customElements.get(tagName)) {
|
|
1012
|
-
defineCustomElement$
|
|
1321
|
+
defineCustomElement$b();
|
|
1013
1322
|
}
|
|
1014
1323
|
break;
|
|
1015
1324
|
case "ic-input-component-container":
|
|
1016
1325
|
if (!customElements.get(tagName)) {
|
|
1017
|
-
defineCustomElement$
|
|
1326
|
+
defineCustomElement$a();
|
|
1018
1327
|
}
|
|
1019
1328
|
break;
|
|
1020
1329
|
case "ic-input-container":
|
|
1021
1330
|
if (!customElements.get(tagName)) {
|
|
1022
|
-
defineCustomElement$
|
|
1331
|
+
defineCustomElement$9();
|
|
1023
1332
|
}
|
|
1024
1333
|
break;
|
|
1025
1334
|
case "ic-input-label":
|
|
1026
1335
|
if (!customElements.get(tagName)) {
|
|
1027
|
-
defineCustomElement$
|
|
1336
|
+
defineCustomElement$8();
|
|
1028
1337
|
}
|
|
1029
1338
|
break;
|
|
1030
1339
|
case "ic-input-validation":
|
|
1031
1340
|
if (!customElements.get(tagName)) {
|
|
1032
|
-
defineCustomElement$
|
|
1341
|
+
defineCustomElement$7();
|
|
1033
1342
|
}
|
|
1034
1343
|
break;
|
|
1035
1344
|
case "ic-loading-indicator":
|
|
1345
|
+
if (!customElements.get(tagName)) {
|
|
1346
|
+
defineCustomElement$6();
|
|
1347
|
+
}
|
|
1348
|
+
break;
|
|
1349
|
+
case "ic-toggle-button":
|
|
1350
|
+
if (!customElements.get(tagName)) {
|
|
1351
|
+
defineCustomElement$5();
|
|
1352
|
+
}
|
|
1353
|
+
break;
|
|
1354
|
+
case "ic-toggle-button-group":
|
|
1036
1355
|
if (!customElements.get(tagName)) {
|
|
1037
1356
|
defineCustomElement$4();
|
|
1038
1357
|
}
|