@ukic/canary-web-components 3.0.0-canary.21 → 3.0.0-canary.23
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/README.md +2 -1
- package/dist/cjs/clear-icon-547aa9b9.js +10 -0
- package/dist/cjs/clear-icon-547aa9b9.js.map +1 -0
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/helpers-da852478.js.map +1 -1
- package/dist/cjs/ic-action-chip.cjs.entry.js +116 -0
- package/dist/cjs/ic-action-chip.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-back-to-top.cjs.entry.js +3 -3
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +2 -2
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +41 -86
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +4 -4
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox_3.cjs.entry.js +6 -6
- package/dist/cjs/ic-checkbox_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +11 -3
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-classification-banner.cjs.entry.js +2 -2
- package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-list.cjs.entry.js +2 -2
- package/dist/cjs/ic-data-list.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +2 -2
- package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +63 -68
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +25 -17
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +17 -10
- package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +3 -3
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +4 -4
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +5 -5
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js +224 -0
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
- package/dist/cjs/{ic-input-component-container_3.cjs.entry.js → ic-menu.cjs.entry.js} +41 -140
- package/dist/cjs/ic-menu.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-navigation-button.cjs.entry.js +2 -2
- package/dist/cjs/ic-navigation-button.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 +3 -10
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +4 -4
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +6 -6
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +17 -17
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +4 -4
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +4 -4
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +9 -9
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
- package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +4 -4
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-skip-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +2 -2
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +13 -13
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +2 -2
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +4 -4
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-time-input.cjs.entry.js +943 -0
- package/dist/cjs/ic-time-input.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +3 -3
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +15 -4
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +13 -4
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +4 -4
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +14 -8
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-view.cjs.entry.js +23 -15
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +2 -2
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/index-d337cd8a.js +12 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/clock.svg +1 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/ic-data-table/ic-data-table.css +3 -2
- package/dist/collection/components/ic-data-table/ic-data-table.js +62 -68
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.stories.js +5 -4
- package/dist/collection/components/ic-data-table/ic-data-table.stories.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +39 -130
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.js +24 -12
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +37 -10
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-time-input/ic-time-input.css +648 -0
- package/dist/collection/components/ic-time-input/ic-time-input.js +1600 -0
- package/dist/collection/components/ic-time-input/ic-time-input.js.map +1 -0
- package/dist/collection/components/ic-time-input/ic-time-input.stories.js +320 -0
- package/dist/collection/components/ic-time-input/ic-time-input.stories.js.map +1 -0
- package/dist/collection/components/ic-time-input/test/helpers/ic-time-input.js +45 -0
- package/dist/collection/components/ic-time-input/test/helpers/ic-time-input.js.map +1 -0
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +14 -8
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +23 -15
- package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/clear-icon.js +8 -0
- package/dist/components/clear-icon.js.map +1 -0
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-action-chip.js +160 -0
- package/dist/components/ic-action-chip.js.map +1 -0
- package/dist/components/ic-back-to-top.js +3 -3
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-badge.js +2 -2
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +2 -2
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-breadcrumb2.js +2 -2
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +3 -3
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-vertical.js +4 -4
- package/dist/components/ic-card-vertical.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +2 -2
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox2.js +4 -4
- package/dist/components/ic-checkbox2.js.map +1 -1
- package/dist/components/ic-chip.js +12 -4
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-classification-banner.js +2 -2
- package/dist/components/ic-classification-banner.js.map +1 -1
- package/dist/components/ic-data-list.js +2 -2
- package/dist/components/ic-data-list.js.map +1 -1
- package/dist/components/ic-data-row.js +2 -2
- package/dist/components/ic-data-row.js.map +1 -1
- package/dist/components/ic-data-table.js +63 -68
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +25 -17
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-date-picker.js +18 -10
- package/dist/components/ic-date-picker.js.map +1 -1
- package/dist/components/ic-dialog.js +1 -1
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-empty-state2.js +2 -2
- package/dist/components/ic-empty-state2.js.map +1 -1
- package/dist/components/ic-footer-link.js +2 -2
- package/dist/components/ic-footer-link.js.map +1 -1
- package/dist/components/ic-footer.js +3 -3
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +4 -4
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +5 -5
- package/dist/components/ic-horizontal-scroll2.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +3 -3
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-container2.js +2 -2
- package/dist/components/ic-input-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js +2 -2
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-input-validation2.js +3 -3
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-link2.js +1 -1
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +6 -6
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu-group.js +1 -1
- package/dist/components/ic-menu-group.js.map +1 -1
- package/dist/components/ic-menu2.js +42 -47
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +2 -2
- package/dist/components/ic-navigation-button.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 +3 -10
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +4 -4
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js +6 -6
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +1 -1
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination2.js +4 -4
- package/dist/components/ic-pagination2.js.map +1 -1
- package/dist/components/ic-popover-menu.js +4 -4
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +4 -4
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +4 -4
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +9 -9
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-section-container2.js +2 -2
- package/dist/components/ic-section-container2.js.map +1 -1
- package/dist/components/ic-select2.js +6 -6
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +4 -4
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +2 -2
- package/dist/components/ic-skeleton.js.map +1 -1
- package/dist/components/ic-skip-link.js +2 -2
- package/dist/components/ic-skip-link.js.map +1 -1
- package/dist/components/ic-status-tag.js +2 -2
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +13 -13
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +2 -2
- package/dist/components/ic-stepper.js.map +1 -1
- package/dist/components/ic-switch.js +4 -4
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +1 -1
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-tab-group.js +2 -2
- package/dist/components/ic-tab-group.js.map +1 -1
- package/dist/components/ic-tab-panel.js +2 -2
- package/dist/components/ic-tab-panel.js.map +1 -1
- package/dist/components/ic-tab.js +2 -2
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +6 -6
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-theme.js.map +1 -1
- package/dist/components/ic-time-input.d.ts +11 -0
- package/dist/components/ic-time-input.js +1045 -0
- package/dist/components/ic-time-input.js.map +1 -0
- package/dist/components/ic-toast-region.js +1 -1
- package/dist/components/ic-toast-region.js.map +1 -1
- package/dist/components/ic-toast.js +3 -3
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +17 -4
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +14 -4
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-tooltip2.js +33 -78
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +4 -4
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-tree-item.js +15 -9
- package/dist/components/ic-tree-item.js.map +1 -1
- package/dist/components/ic-tree-view.js +24 -16
- package/dist/components/ic-tree-view.js.map +1 -1
- package/dist/components/ic-typography2.js +2 -2
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/core/core.css +227 -7
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-137dd76e.entry.js → p-00a89919.entry.js} +2 -2
- package/dist/core/{p-137dd76e.entry.js.map → p-00a89919.entry.js.map} +1 -1
- package/dist/core/{p-e253a857.js → p-0f22f41e.js} +2 -2
- package/dist/core/p-0f22f41e.js.map +1 -0
- package/dist/core/{p-97abdbf7.entry.js → p-1521e96b.entry.js} +2 -2
- package/dist/core/{p-97abdbf7.entry.js.map → p-1521e96b.entry.js.map} +1 -1
- package/dist/core/{p-5d987f8f.entry.js → p-153d3597.entry.js} +2 -2
- package/dist/core/{p-5d987f8f.entry.js.map → p-153d3597.entry.js.map} +1 -1
- package/dist/core/{p-4b6818d9.entry.js → p-1cc402b8.entry.js} +2 -2
- package/dist/core/{p-4b6818d9.entry.js.map → p-1cc402b8.entry.js.map} +1 -1
- package/dist/core/{p-8d908a57.entry.js → p-22863d31.entry.js} +2 -2
- package/dist/core/{p-8d908a57.entry.js.map → p-22863d31.entry.js.map} +1 -1
- package/dist/core/{p-c94e7b0b.entry.js → p-27207aa3.entry.js} +2 -2
- package/dist/core/{p-c94e7b0b.entry.js.map → p-27207aa3.entry.js.map} +1 -1
- package/dist/core/{p-2c4bf16f.entry.js → p-2d6a1b50.entry.js} +2 -2
- package/dist/core/{p-2c4bf16f.entry.js.map → p-2d6a1b50.entry.js.map} +1 -1
- package/dist/core/{p-b6b7c15c.entry.js → p-307c13a1.entry.js} +2 -2
- package/dist/core/p-307c13a1.entry.js.map +1 -0
- package/dist/core/{p-2d8900bf.entry.js → p-30b3afb1.entry.js} +2 -2
- package/dist/core/{p-2d8900bf.entry.js.map → p-30b3afb1.entry.js.map} +1 -1
- package/dist/core/{p-bf93baea.entry.js → p-324862f7.entry.js} +2 -2
- package/dist/core/{p-bf93baea.entry.js.map → p-324862f7.entry.js.map} +1 -1
- package/dist/core/{p-0fe08a58.js → p-33927ee1.js} +2 -2
- package/dist/core/{p-1bcf49fa.entry.js → p-369f4536.entry.js} +2 -2
- package/dist/core/p-369f4536.entry.js.map +1 -0
- package/dist/core/{p-b6d1988d.entry.js → p-3a5da30c.entry.js} +2 -2
- package/dist/core/{p-b6d1988d.entry.js.map → p-3a5da30c.entry.js.map} +1 -1
- package/dist/core/{p-826a6c25.entry.js → p-3d10fa12.entry.js} +2 -2
- package/dist/core/{p-826a6c25.entry.js.map → p-3d10fa12.entry.js.map} +1 -1
- package/dist/core/{p-f569a91f.entry.js → p-48127d40.entry.js} +2 -2
- package/dist/core/{p-f569a91f.entry.js.map → p-48127d40.entry.js.map} +1 -1
- package/dist/core/{p-3448c713.entry.js → p-48db785a.entry.js} +2 -2
- package/dist/core/{p-3448c713.entry.js.map → p-48db785a.entry.js.map} +1 -1
- package/dist/core/{p-b27bc1a1.entry.js → p-4b212968.entry.js} +2 -2
- package/dist/core/{p-b27bc1a1.entry.js.map → p-4b212968.entry.js.map} +1 -1
- package/dist/core/p-53d50d9e.entry.js +2 -0
- package/dist/core/p-53d50d9e.entry.js.map +1 -0
- package/dist/core/p-558936fb.entry.js +2 -0
- package/dist/core/p-558936fb.entry.js.map +1 -0
- package/dist/core/{p-64372a57.entry.js → p-593cc594.entry.js} +2 -2
- package/dist/core/{p-64372a57.entry.js.map → p-593cc594.entry.js.map} +1 -1
- package/dist/core/{p-bbf39a76.entry.js → p-666a671b.entry.js} +2 -2
- package/dist/core/{p-bbf39a76.entry.js.map → p-666a671b.entry.js.map} +1 -1
- package/dist/core/{p-8397766e.entry.js → p-726144b4.entry.js} +2 -2
- package/dist/core/{p-8397766e.entry.js.map → p-726144b4.entry.js.map} +1 -1
- package/dist/core/p-74e0f41f.entry.js +2 -0
- package/dist/core/p-74e0f41f.entry.js.map +1 -0
- package/dist/core/{p-0dc0d839.entry.js → p-75f3038c.entry.js} +2 -2
- package/dist/core/{p-0dc0d839.entry.js.map → p-75f3038c.entry.js.map} +1 -1
- package/dist/core/p-7892130d.entry.js +2 -0
- package/dist/core/p-7892130d.entry.js.map +1 -0
- package/dist/core/{p-b6c3cc1c.entry.js → p-7e5e94a9.entry.js} +2 -2
- package/dist/core/p-7e5e94a9.entry.js.map +1 -0
- package/dist/core/p-8048c7da.entry.js +2 -0
- package/dist/core/{p-1e256460.entry.js.map → p-8048c7da.entry.js.map} +1 -1
- package/dist/core/p-80e43591.entry.js +2 -0
- package/dist/core/{p-8cb5deba.entry.js.map → p-80e43591.entry.js.map} +1 -1
- package/dist/core/{p-75901d06.entry.js → p-86ff903d.entry.js} +2 -2
- package/dist/core/{p-ead0acc3.entry.js → p-8908b8e6.entry.js} +2 -2
- package/dist/core/{p-832c7042.entry.js → p-8bf1022e.entry.js} +2 -2
- package/dist/core/{p-90364cef.entry.js → p-8fa7085e.entry.js} +2 -2
- package/dist/core/{p-90364cef.entry.js.map → p-8fa7085e.entry.js.map} +1 -1
- package/dist/core/{p-5237f3ac.entry.js → p-97c437bb.entry.js} +2 -2
- package/dist/core/p-9c8a98e8.entry.js +2 -0
- package/dist/core/p-9c8a98e8.entry.js.map +1 -0
- package/dist/core/{p-0f86ea09.entry.js → p-9f792a31.entry.js} +2 -2
- package/dist/core/{p-0f86ea09.entry.js.map → p-9f792a31.entry.js.map} +1 -1
- package/dist/core/{p-cd8178a9.entry.js → p-abcc90f0.entry.js} +2 -2
- package/dist/core/{p-cd8178a9.entry.js.map → p-abcc90f0.entry.js.map} +1 -1
- package/dist/core/p-ad48c77c.entry.js +2 -0
- package/dist/core/p-ad48c77c.entry.js.map +1 -0
- package/dist/core/p-b0462734.entry.js +2 -0
- package/dist/core/p-b0462734.entry.js.map +1 -0
- package/dist/core/{p-88c5ec78.entry.js → p-b2680959.entry.js} +2 -2
- package/dist/core/{p-88c5ec78.entry.js.map → p-b2680959.entry.js.map} +1 -1
- package/dist/core/{p-b1b27b7e.entry.js → p-b3ac38c5.entry.js} +2 -2
- package/dist/core/{p-b1b27b7e.entry.js.map → p-b3ac38c5.entry.js.map} +1 -1
- package/dist/core/p-b5ef2799.entry.js +2 -0
- package/dist/core/{p-497918fd.entry.js.map → p-b5ef2799.entry.js.map} +1 -1
- package/dist/core/{p-33404c14.entry.js → p-b7a0dc04.entry.js} +2 -2
- package/dist/core/{p-33404c14.entry.js.map → p-b7a0dc04.entry.js.map} +1 -1
- package/dist/core/p-b8938f93.entry.js +2 -0
- package/dist/core/p-b8938f93.entry.js.map +1 -0
- package/dist/core/{p-9097a16a.entry.js → p-b9d4c0db.entry.js} +2 -2
- package/dist/core/{p-9097a16a.entry.js.map → p-b9d4c0db.entry.js.map} +1 -1
- package/dist/core/{p-b3509380.entry.js → p-c4bf8742.entry.js} +2 -2
- package/dist/core/{p-3cf99186.entry.js → p-c6eabd53.entry.js} +2 -2
- package/dist/core/{p-6f72e6ac.entry.js → p-c7ccc52a.entry.js} +2 -2
- package/dist/core/{p-6f72e6ac.entry.js.map → p-c7ccc52a.entry.js.map} +1 -1
- package/dist/core/p-c82a2e84.entry.js +2 -0
- package/dist/core/p-c82a2e84.entry.js.map +1 -0
- package/dist/core/{p-94065f7a.entry.js → p-ca3c6653.entry.js} +2 -2
- package/dist/core/{p-94065f7a.entry.js.map → p-ca3c6653.entry.js.map} +1 -1
- package/dist/core/{p-d281c3cf.entry.js → p-d47acbd4.entry.js} +2 -2
- package/dist/core/{p-d281c3cf.entry.js.map → p-d47acbd4.entry.js.map} +1 -1
- package/dist/core/{p-a54eb1d1.entry.js → p-d5f8ef77.entry.js} +2 -2
- package/dist/core/{p-c77d6efc.entry.js → p-db3b0c0a.entry.js} +2 -2
- package/dist/core/{p-c77d6efc.entry.js.map → p-db3b0c0a.entry.js.map} +1 -1
- package/dist/core/{p-cc36abaa.entry.js → p-db6d0463.entry.js} +2 -2
- package/dist/core/p-dbde45ff.entry.js +2 -0
- package/dist/core/p-dbde45ff.entry.js.map +1 -0
- package/dist/core/p-dc8eede2.entry.js +2 -0
- package/dist/core/p-dc8eede2.entry.js.map +1 -0
- package/dist/core/p-dd7450fb.js +2 -0
- package/dist/core/p-dd7450fb.js.map +1 -0
- package/dist/core/{p-fc5661ac.entry.js → p-de43d375.entry.js} +2 -2
- package/dist/core/{p-fc5661ac.entry.js.map → p-de43d375.entry.js.map} +1 -1
- package/dist/core/p-de8081c6.entry.js +2 -0
- package/dist/core/{p-a26a60ff.entry.js.map → p-de8081c6.entry.js.map} +1 -1
- package/dist/core/p-e4906394.entry.js +2 -0
- package/dist/core/{p-032113b9.entry.js.map → p-e4906394.entry.js.map} +1 -1
- package/dist/core/p-e595bb87.entry.js +2 -0
- package/dist/core/p-e595bb87.entry.js.map +1 -0
- package/dist/core/{p-42913c5b.entry.js → p-e75514f1.entry.js} +2 -2
- package/dist/core/{p-42913c5b.entry.js.map → p-e75514f1.entry.js.map} +1 -1
- package/dist/core/{p-6dd73165.entry.js → p-ee6caf27.entry.js} +2 -2
- package/dist/core/{p-6dd73165.entry.js.map → p-ee6caf27.entry.js.map} +1 -1
- package/dist/core/{p-2de3287c.entry.js → p-f33eae3c.entry.js} +2 -2
- package/dist/core/{p-2de3287c.entry.js.map → p-f33eae3c.entry.js.map} +1 -1
- package/dist/core/{p-9e051db4.entry.js → p-f34eee68.entry.js} +2 -2
- package/dist/core/{p-9e051db4.entry.js.map → p-f34eee68.entry.js.map} +1 -1
- package/dist/core/{p-fb7f4e2e.entry.js → p-fbb0a74d.entry.js} +2 -2
- package/dist/core/{p-fb7f4e2e.entry.js.map → p-fbb0a74d.entry.js.map} +1 -1
- package/dist/core/{p-9fafa5fa.entry.js → p-fbd80981.entry.js} +2 -2
- package/dist/core/p-fbd80981.entry.js.map +1 -0
- package/dist/core/{p-e18ba5d6.entry.js → p-fffb98c9.entry.js} +2 -2
- package/dist/core/{p-e18ba5d6.entry.js.map → p-fffb98c9.entry.js.map} +1 -1
- package/dist/esm/clear-icon-1c79bda2.js +8 -0
- package/dist/esm/clear-icon-1c79bda2.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-d9387cd3.js → helpers-89cb996d.js} +2 -2
- package/dist/esm/helpers-89cb996d.js.map +1 -0
- package/dist/esm/{helpers-574534c9.js → helpers-dea3fd9b.js} +2 -2
- package/dist/esm/{helpers-574534c9.js.map → helpers-dea3fd9b.js.map} +1 -1
- 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 +112 -0
- package/dist/esm/ic-action-chip.entry.js.map +1 -0
- package/dist/esm/ic-alert.entry.js +1 -1
- package/dist/esm/ic-back-to-top.entry.js +4 -4
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js +3 -3
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +3 -3
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +3 -3
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +42 -87
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +1 -1
- package/dist/esm/ic-card-vertical.entry.js +5 -5
- package/dist/esm/ic-card-vertical.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +3 -3
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox_3.entry.js +8 -8
- package/dist/esm/ic-checkbox_3.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +12 -4
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-classification-banner.entry.js +2 -2
- package/dist/esm/ic-classification-banner.entry.js.map +1 -1
- package/dist/esm/ic-data-list.entry.js +2 -2
- package/dist/esm/ic-data-list.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +3 -3
- 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 +64 -69
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +26 -18
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +18 -11
- package/dist/esm/ic-date-picker.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +2 -2
- package/dist/esm/ic-dialog.entry.js.map +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 +3 -3
- package/dist/esm/ic-footer-link.entry.js.map +1 -1
- package/dist/esm/ic-footer.entry.js +4 -4
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +5 -5
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +6 -6
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_4.entry.js +217 -0
- package/dist/esm/ic-input-component-container_4.entry.js.map +1 -0
- package/dist/esm/ic-link.entry.js +2 -2
- package/dist/esm/ic-link.entry.js.map +1 -1
- package/dist/esm/ic-menu-group.entry.js +2 -2
- package/dist/esm/ic-menu-group.entry.js.map +1 -1
- package/dist/esm/ic-menu-item.entry.js +1 -1
- package/dist/esm/{ic-input-component-container_3.entry.js → ic-menu.entry.js} +43 -140
- package/dist/esm/ic-menu.entry.js.map +1 -0
- package/dist/esm/ic-navigation-button.entry.js +3 -3
- package/dist/esm/ic-navigation-button.entry.js.map +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 +4 -11
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +5 -5
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +7 -7
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination_4.entry.js +18 -18
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +5 -5
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +5 -5
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +5 -5
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +10 -10
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-section-container.entry.js +2 -2
- package/dist/esm/ic-section-container.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +5 -5
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js +2 -2
- package/dist/esm/ic-skeleton.entry.js.map +1 -1
- package/dist/esm/ic-skip-link.entry.js +2 -2
- package/dist/esm/ic-skip-link.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +3 -3
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +14 -14
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +3 -3
- package/dist/esm/ic-stepper.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +5 -5
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +1 -1
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +3 -3
- package/dist/esm/ic-tab-group.entry.js.map +1 -1
- package/dist/esm/ic-tab-panel.entry.js +2 -2
- package/dist/esm/ic-tab-panel.entry.js.map +1 -1
- package/dist/esm/ic-tab.entry.js +3 -3
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +2 -2
- package/dist/esm/ic-theme.entry.js.map +1 -1
- package/dist/esm/ic-time-input.entry.js +939 -0
- package/dist/esm/ic-time-input.entry.js.map +1 -0
- package/dist/esm/ic-toast-region.entry.js +1 -1
- package/dist/esm/ic-toast-region.entry.js.map +1 -1
- package/dist/esm/ic-toast.entry.js +4 -4
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +16 -5
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +14 -5
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +5 -5
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-tree-item.entry.js +15 -9
- package/dist/esm/ic-tree-item.entry.js.map +1 -1
- package/dist/esm/ic-tree-view.entry.js +24 -16
- package/dist/esm/ic-tree-view.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +3 -3
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/index-a7a720e7.js +12 -4
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +1 -1
- package/dist/types/components/ic-data-table/ic-data-table.stories.d.ts +1 -1
- package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +12 -7
- package/dist/types/components/ic-data-table/story-data.d.ts +11 -84
- package/dist/types/components/ic-date-input/ic-date-input.d.ts +2 -1
- package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +4 -0
- package/dist/types/components/ic-time-input/ic-time-input.d.ts +229 -0
- package/dist/types/components/ic-time-input/ic-time-input.stories.d.ts +121 -0
- package/dist/types/components/ic-time-input/test/helpers/ic-time-input.d.ts +23 -0
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +2 -0
- package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +2 -1
- package/dist/types/components.d.ts +242 -2
- package/dist/types/utils/types.d.ts +5 -0
- package/hydrate/index.js +1611 -493
- package/hydrate/index.mjs +1611 -493
- package/package.json +3 -3
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +0 -133
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +0 -1
- package/dist/core/p-032113b9.entry.js +0 -2
- package/dist/core/p-145238fe.entry.js +0 -2
- package/dist/core/p-145238fe.entry.js.map +0 -1
- package/dist/core/p-1b20ab19.entry.js +0 -2
- package/dist/core/p-1b20ab19.entry.js.map +0 -1
- package/dist/core/p-1bcf49fa.entry.js.map +0 -1
- package/dist/core/p-1e256460.entry.js +0 -2
- package/dist/core/p-224b2e14.entry.js +0 -2
- package/dist/core/p-224b2e14.entry.js.map +0 -1
- package/dist/core/p-497918fd.entry.js +0 -2
- package/dist/core/p-5f8b09e4.entry.js +0 -2
- package/dist/core/p-5f8b09e4.entry.js.map +0 -1
- package/dist/core/p-7001f1c1.entry.js +0 -2
- package/dist/core/p-7001f1c1.entry.js.map +0 -1
- package/dist/core/p-8cb5deba.entry.js +0 -2
- package/dist/core/p-95881758.entry.js +0 -2
- package/dist/core/p-95881758.entry.js.map +0 -1
- package/dist/core/p-9fafa5fa.entry.js.map +0 -1
- package/dist/core/p-a26a60ff.entry.js +0 -2
- package/dist/core/p-b6b7c15c.entry.js.map +0 -1
- package/dist/core/p-b6c3cc1c.entry.js.map +0 -1
- package/dist/core/p-b9369ce5.entry.js +0 -2
- package/dist/core/p-b9369ce5.entry.js.map +0 -1
- package/dist/core/p-cbbba154.entry.js +0 -2
- package/dist/core/p-cbbba154.entry.js.map +0 -1
- package/dist/core/p-cdd6d5e8.entry.js +0 -2
- package/dist/core/p-cdd6d5e8.entry.js.map +0 -1
- package/dist/core/p-dc3aba7c.entry.js +0 -2
- package/dist/core/p-dc3aba7c.entry.js.map +0 -1
- package/dist/core/p-e253a857.js.map +0 -1
- package/dist/esm/helpers-d9387cd3.js.map +0 -1
- package/dist/esm/ic-input-component-container_3.entry.js.map +0 -1
- package/dist/esm/ic-input-label_2.entry.js +0 -128
- package/dist/esm/ic-input-label_2.entry.js.map +0 -1
- /package/dist/core/{p-0fe08a58.js.map → p-33927ee1.js.map} +0 -0
- /package/dist/core/{p-75901d06.entry.js.map → p-86ff903d.entry.js.map} +0 -0
- /package/dist/core/{p-ead0acc3.entry.js.map → p-8908b8e6.entry.js.map} +0 -0
- /package/dist/core/{p-832c7042.entry.js.map → p-8bf1022e.entry.js.map} +0 -0
- /package/dist/core/{p-5237f3ac.entry.js.map → p-97c437bb.entry.js.map} +0 -0
- /package/dist/core/{p-b3509380.entry.js.map → p-c4bf8742.entry.js.map} +0 -0
- /package/dist/core/{p-3cf99186.entry.js.map → p-c6eabd53.entry.js.map} +0 -0
- /package/dist/core/{p-a54eb1d1.entry.js.map → p-d5f8ef77.entry.js.map} +0 -0
- /package/dist/core/{p-cc36abaa.entry.js.map → p-db6d0463.entry.js.map} +0 -0
@@ -0,0 +1,1045 @@
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
|
+
import { b as isEmptyString, l as getInputDescribedByText, q as isNumeric, t as IcInformationStatus, r as removeDisabledFalse, m as removeFormResetListener, n as addFormResetListener, o as onComponentRequiredPropUndefined, u as renderHiddenInput } from './helpers2.js';
|
3
|
+
import { C as Clear } from './clear-icon.js';
|
4
|
+
import { d as defineCustomElement$9 } from './ic-button2.js';
|
5
|
+
import { d as defineCustomElement$8 } from './ic-input-component-container2.js';
|
6
|
+
import { d as defineCustomElement$7 } from './ic-input-container2.js';
|
7
|
+
import { d as defineCustomElement$6 } from './ic-input-label2.js';
|
8
|
+
import { d as defineCustomElement$5 } from './ic-input-validation2.js';
|
9
|
+
import { d as defineCustomElement$4 } from './ic-loading-indicator2.js';
|
10
|
+
import { d as defineCustomElement$3 } from './ic-tooltip2.js';
|
11
|
+
import { d as defineCustomElement$2 } from './ic-typography2.js';
|
12
|
+
|
13
|
+
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
|
+
|
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,.second-input.fit-to-value{width:2.313rem}.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
|
+
const IcTimeInputStyle0 = icTimeInputCss;
|
17
|
+
|
18
|
+
let inputIds = 0;
|
19
|
+
const TimeInput = /*@__PURE__*/ proxyCustomElement(class TimeInput extends HTMLElement {
|
20
|
+
constructor() {
|
21
|
+
super();
|
22
|
+
this.__registerHost();
|
23
|
+
this.__attachShadow();
|
24
|
+
this.clockButtonClicked = createEvent(this, "clockButtonClicked", 7);
|
25
|
+
this.icBlur = createEvent(this, "icBlur", 7);
|
26
|
+
this.icChange = createEvent(this, "icChange", 7);
|
27
|
+
this.icFocus = createEvent(this, "icFocus", 7);
|
28
|
+
this.DEFAULT_TIME_FORMAT = "HH:MM:SS";
|
29
|
+
this.ARIA_INVALID = "aria-invalid";
|
30
|
+
this.ARIA_LABEL = "aria-label";
|
31
|
+
this.ARIA_LABELLED_BY = "aria-labelledby";
|
32
|
+
this.EVENT_OBJECT_STRING = "[object Event]";
|
33
|
+
this.FIT_TO_VALUE = "fit-to-value";
|
34
|
+
this.initialValue = this.value;
|
35
|
+
this.inputsInOrder = [];
|
36
|
+
this.isValidHour = true;
|
37
|
+
this.isValidMinute = true;
|
38
|
+
this.isValidSecond = true;
|
39
|
+
this.isValidTime = true;
|
40
|
+
this.isTimeSetFromKeyboardEvent = false;
|
41
|
+
this.previousSelectedTime = null;
|
42
|
+
this.selectedTime = null;
|
43
|
+
this.externalSetTime = false;
|
44
|
+
this.clearInput = false;
|
45
|
+
this.maxTime = null;
|
46
|
+
this.minTime = null;
|
47
|
+
this.clockFocused = false;
|
48
|
+
this.clearButtonFocused = false;
|
49
|
+
this.removeLabelledBy = false;
|
50
|
+
this.hour = "";
|
51
|
+
this.minute = "";
|
52
|
+
this.second = "";
|
53
|
+
/**
|
54
|
+
* If `true`, the disabled state will be set.
|
55
|
+
*/
|
56
|
+
this.disabled = false;
|
57
|
+
/**
|
58
|
+
* An array of times that will be disabled in the time input. 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.
|
59
|
+
*/
|
60
|
+
this.disableTimes = [];
|
61
|
+
/**
|
62
|
+
* If `true`, every individual input field completed will emit an icChange event.
|
63
|
+
*/
|
64
|
+
this.emitTimePartChange = false;
|
65
|
+
/**
|
66
|
+
* If `true`, the helper text will be visually hidden, but still read out by screenreaders.
|
67
|
+
*/
|
68
|
+
this.hideHelperText = false;
|
69
|
+
/**
|
70
|
+
* If `true`, the label will be visually hidden, but will still be read out by screen readers.
|
71
|
+
*/
|
72
|
+
this.hideLabel = false;
|
73
|
+
/**
|
74
|
+
* The ID for the input.
|
75
|
+
*/
|
76
|
+
this.inputId = `ic-time-input-${inputIds++}`;
|
77
|
+
/**
|
78
|
+
* The text to display as the validation message when an invalid time is entered.
|
79
|
+
*/
|
80
|
+
this.invalidTimeMessage = "Please enter a valid time.";
|
81
|
+
/**
|
82
|
+
* 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.
|
83
|
+
*/
|
84
|
+
this.max = "";
|
85
|
+
/**
|
86
|
+
* 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.
|
87
|
+
*/
|
88
|
+
this.min = "";
|
89
|
+
/**
|
90
|
+
* The name of the control, which is submitted with the form data.
|
91
|
+
*/
|
92
|
+
this.name = this.inputId;
|
93
|
+
/**
|
94
|
+
* If `true`, the input will require a value.
|
95
|
+
*/
|
96
|
+
this.required = false;
|
97
|
+
/**
|
98
|
+
* If `true`, a button which clears the time input when clicked will be displayed.
|
99
|
+
*/
|
100
|
+
this.showClearButton = true;
|
101
|
+
/**
|
102
|
+
* @internal If `true`, a button which displays the clock view when clicked will be displayed.
|
103
|
+
*/
|
104
|
+
this.showClockButton = false;
|
105
|
+
/**
|
106
|
+
* The size of the time input to be displayed.
|
107
|
+
*/
|
108
|
+
this.size = "medium";
|
109
|
+
/**
|
110
|
+
* Sets the time picker to the dark or light theme colors. "inherit" will set the color based on the system settings or ic-theme component.
|
111
|
+
*/
|
112
|
+
this.theme = "inherit";
|
113
|
+
/**
|
114
|
+
* The format in which the time will be displayed.
|
115
|
+
*/
|
116
|
+
this.timeFormat = this.DEFAULT_TIME_FORMAT;
|
117
|
+
/**
|
118
|
+
* The time period format: "12" for 12-hour, "24" for 24-hour. Defaults to "24".
|
119
|
+
*/
|
120
|
+
this.timePeriod = "24";
|
121
|
+
/**
|
122
|
+
* The value of the time input. 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.
|
123
|
+
*/
|
124
|
+
this.value = "";
|
125
|
+
/**
|
126
|
+
* The validation status - e.g. 'error' | 'warning' | 'success'. This will override the built-in time validation.
|
127
|
+
*/
|
128
|
+
this.validationStatus = "";
|
129
|
+
/**
|
130
|
+
* The text to display as the validation message. This will override the built-in time validation.
|
131
|
+
*/
|
132
|
+
this.validationText = "";
|
133
|
+
this.setInputPasteValue = (input, pastedValue) => {
|
134
|
+
if (input) {
|
135
|
+
const inputEl = input;
|
136
|
+
inputEl.value = pastedValue;
|
137
|
+
inputEl.classList.add(this.FIT_TO_VALUE);
|
138
|
+
}
|
139
|
+
};
|
140
|
+
this.parseTime = (value) => {
|
141
|
+
if (!value)
|
142
|
+
return null;
|
143
|
+
if (value instanceof Date)
|
144
|
+
return value;
|
145
|
+
const parts = value.split(":");
|
146
|
+
if (parts.length >= 2) {
|
147
|
+
const d = new Date();
|
148
|
+
d.setHours(+parts[0], +parts[1], parts[2] ? +parts[2] : 0, 0);
|
149
|
+
return d;
|
150
|
+
}
|
151
|
+
return null;
|
152
|
+
};
|
153
|
+
this.isHHMMFormat = () => this.timeFormat === "HH:MM";
|
154
|
+
this.isKeyboardOrEvent = (event) => {
|
155
|
+
return (Object.prototype.toString.call(event) === this.EVENT_OBJECT_STRING ||
|
156
|
+
Object.prototype.toString.call(event) === "[object KeyboardEvent]");
|
157
|
+
};
|
158
|
+
this.setTimeValidity = () => {
|
159
|
+
const minHour = 0;
|
160
|
+
const maxHour = this.timePeriod === "12" ? 11 : 23;
|
161
|
+
if (!isEmptyString(this.hour)) {
|
162
|
+
this.isValidHour = +this.hour >= minHour && +this.hour <= maxHour;
|
163
|
+
}
|
164
|
+
else {
|
165
|
+
this.isValidHour = true;
|
166
|
+
}
|
167
|
+
if (!isEmptyString(this.minute)) {
|
168
|
+
this.isValidMinute = +this.minute >= 0 && +this.minute <= 59;
|
169
|
+
}
|
170
|
+
else {
|
171
|
+
this.isValidMinute = true;
|
172
|
+
}
|
173
|
+
if (!this.isHHMMFormat()) {
|
174
|
+
if (!isEmptyString(this.second)) {
|
175
|
+
this.isValidSecond = +this.second >= 0 && +this.second <= 59;
|
176
|
+
}
|
177
|
+
else {
|
178
|
+
this.isValidSecond = true;
|
179
|
+
}
|
180
|
+
}
|
181
|
+
else {
|
182
|
+
this.isValidSecond = true;
|
183
|
+
}
|
184
|
+
};
|
185
|
+
this.setInputValue = (input, clear = false) => {
|
186
|
+
const newValue = clear ? "" : input.value;
|
187
|
+
if (input === this.hourInputEl) {
|
188
|
+
this.hour = newValue;
|
189
|
+
}
|
190
|
+
else if (input === this.minuteInputEl) {
|
191
|
+
this.minute = newValue;
|
192
|
+
}
|
193
|
+
else if (input === this.secondInputEl && !this.isHHMMFormat()) {
|
194
|
+
this.second = newValue;
|
195
|
+
}
|
196
|
+
this.setValidationMessage();
|
197
|
+
};
|
198
|
+
this.setPreventInput = (input, isPrevented) => {
|
199
|
+
if (input === this.hourInputEl) {
|
200
|
+
this.preventHourInput = isPrevented;
|
201
|
+
}
|
202
|
+
else if (input === this.minuteInputEl) {
|
203
|
+
this.preventMinuteInput = isPrevented;
|
204
|
+
}
|
205
|
+
else if (input === this.secondInputEl) {
|
206
|
+
this.preventSecondInput = isPrevented;
|
207
|
+
}
|
208
|
+
};
|
209
|
+
this.setValidationMessage = () => {
|
210
|
+
this.maxTime = this.parseTime(this.max);
|
211
|
+
this.minTime = this.parseTime(this.min);
|
212
|
+
this.setTimeValidity();
|
213
|
+
let outOfBoundsMsg = "";
|
214
|
+
let isDisabledTime = false;
|
215
|
+
if (!isEmptyString(this.hour) &&
|
216
|
+
!isEmptyString(this.minute) &&
|
217
|
+
(this.isHHMMFormat() || !isEmptyString(this.second))) {
|
218
|
+
this.selectedTime = this.convertToTime(this.hour, this.minute, this.isHHMMFormat() ? "00" : this.second);
|
219
|
+
this.isValidTime =
|
220
|
+
!!this.selectedTime &&
|
221
|
+
this.selectedTime.getHours() == +this.hour &&
|
222
|
+
this.selectedTime.getMinutes() == +this.minute &&
|
223
|
+
(this.isHHMMFormat() || this.selectedTime.getSeconds() == +this.second);
|
224
|
+
if (this.selectedTime &&
|
225
|
+
Array.isArray(this.disableTimes) &&
|
226
|
+
this.disableTimes.length > 0) {
|
227
|
+
isDisabledTime = this.disableTimes.some((t) => {
|
228
|
+
if (typeof t === "object" &&
|
229
|
+
t !== null &&
|
230
|
+
"start" in t &&
|
231
|
+
"end" in t) {
|
232
|
+
const start = this.parseTime(t.start);
|
233
|
+
const end = this.parseTime(t.end);
|
234
|
+
if (start && end) {
|
235
|
+
return this.selectedTime >= start && this.selectedTime <= end;
|
236
|
+
}
|
237
|
+
return false;
|
238
|
+
}
|
239
|
+
const parsed = this.parseTime(t);
|
240
|
+
return (parsed &&
|
241
|
+
parsed.getHours() === this.selectedTime.getHours() &&
|
242
|
+
parsed.getMinutes() === this.selectedTime.getMinutes() &&
|
243
|
+
parsed.getSeconds() === this.selectedTime.getSeconds());
|
244
|
+
});
|
245
|
+
if (isDisabledTime) {
|
246
|
+
this.isValidTime = false;
|
247
|
+
outOfBoundsMsg = this.invalidTimeMessage;
|
248
|
+
}
|
249
|
+
}
|
250
|
+
if (this.selectedTime && !isDisabledTime) {
|
251
|
+
if (this.minTime && this.selectedTime < this.minTime) {
|
252
|
+
this.isValidTime = false;
|
253
|
+
outOfBoundsMsg = `Please enter a time after ${this.formatTime(this.minTime)}.`;
|
254
|
+
}
|
255
|
+
else if (this.maxTime && this.selectedTime > this.maxTime) {
|
256
|
+
this.isValidTime = false;
|
257
|
+
outOfBoundsMsg = `Please enter a time before ${this.formatTime(this.maxTime)}.`;
|
258
|
+
}
|
259
|
+
}
|
260
|
+
if (!this.isValidTime) {
|
261
|
+
this.inputsInOrder.forEach((input) => input.setAttribute(this.ARIA_INVALID, "true"));
|
262
|
+
}
|
263
|
+
else {
|
264
|
+
this.inputsInOrder.forEach((input) => input.removeAttribute(this.ARIA_INVALID));
|
265
|
+
}
|
266
|
+
}
|
267
|
+
else {
|
268
|
+
this.selectedTime = null;
|
269
|
+
}
|
270
|
+
if (!(this.isValidHour &&
|
271
|
+
this.isValidMinute &&
|
272
|
+
this.isValidSecond &&
|
273
|
+
this.isValidTime)) {
|
274
|
+
this.invalidTimeText = outOfBoundsMsg || this.invalidTimeMessage;
|
275
|
+
}
|
276
|
+
else {
|
277
|
+
this.invalidTimeText = "";
|
278
|
+
}
|
279
|
+
};
|
280
|
+
this.formatTime = (time) => {
|
281
|
+
const hh = time.getHours().toString().padStart(2, "0");
|
282
|
+
const mm = time.getMinutes().toString().padStart(2, "0");
|
283
|
+
const ss = time.getSeconds().toString().padStart(2, "0");
|
284
|
+
return this.isHHMMFormat() ? `${hh}:${mm}` : `${hh}:${mm}:${ss}`;
|
285
|
+
};
|
286
|
+
this.handleInput = (event) => {
|
287
|
+
const inputEvent = event;
|
288
|
+
const input = event.target;
|
289
|
+
if (input !== this.hourInputEl) {
|
290
|
+
if (inputEvent.inputType !== "deleteContentBackward" &&
|
291
|
+
!this.preventAutoFormatting) {
|
292
|
+
if (input.value.length === 1 &&
|
293
|
+
+input.value >= 6 &&
|
294
|
+
+input.value <= 9) {
|
295
|
+
this.setInputValue(input);
|
296
|
+
this.notifyScreenReader(input);
|
297
|
+
this.moveToNextInput(input);
|
298
|
+
}
|
299
|
+
if (input.value.length === 2) {
|
300
|
+
this.setInputValue(input);
|
301
|
+
this.setPreventInput(input, true);
|
302
|
+
this.notifyScreenReader(input);
|
303
|
+
this.moveToNextInput(input);
|
304
|
+
}
|
305
|
+
else {
|
306
|
+
this.setPreventInput(input, false);
|
307
|
+
}
|
308
|
+
}
|
309
|
+
else if (this.preventAutoFormatting) {
|
310
|
+
if (input.value.length === 2 && !this.isKeyboardOrEvent(event)) {
|
311
|
+
this.setInputValue(input);
|
312
|
+
this.setPreventInput(input, true);
|
313
|
+
this.moveToNextInput(input);
|
314
|
+
}
|
315
|
+
else {
|
316
|
+
this.setInputValue(input);
|
317
|
+
}
|
318
|
+
}
|
319
|
+
if (input.value.length !== 2) {
|
320
|
+
this.setPreventInput(input, false);
|
321
|
+
}
|
322
|
+
}
|
323
|
+
else {
|
324
|
+
if (input.value.length === 2) {
|
325
|
+
this.setInputValue(input);
|
326
|
+
if (Object.prototype.toString.call(event) !== this.EVENT_OBJECT_STRING) {
|
327
|
+
this.moveToNextInput(input);
|
328
|
+
}
|
329
|
+
this.setPreventInput(input, true);
|
330
|
+
}
|
331
|
+
else {
|
332
|
+
this.setInputValue(input, true);
|
333
|
+
this.setPreventInput(input, false);
|
334
|
+
}
|
335
|
+
}
|
336
|
+
this.setFitToValueStyling(input);
|
337
|
+
if (input.value.length === 0) {
|
338
|
+
this.setInputValue(input, true);
|
339
|
+
this.setValidationMessage();
|
340
|
+
}
|
341
|
+
this.notifyScreenReader(input);
|
342
|
+
};
|
343
|
+
this.handleKeyDown = (event, isInputPrevented) => {
|
344
|
+
var _a;
|
345
|
+
const input = event.target;
|
346
|
+
const eventKey = (_a = event.key) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
347
|
+
const regex = /-?\d*\.?\d+(e[-+]?\d+)?|[:]|arrowup|arrowdown|arrowleft|arrowright|shift|tab|backspace|delete/;
|
348
|
+
if (!regex.test(eventKey) &&
|
349
|
+
!((event.ctrlKey || event.metaKey) &&
|
350
|
+
(eventKey === "v" || eventKey === "c"))) {
|
351
|
+
event.preventDefault();
|
352
|
+
}
|
353
|
+
switch (eventKey) {
|
354
|
+
case ":":
|
355
|
+
case "arrowright":
|
356
|
+
event.preventDefault();
|
357
|
+
this.moveToNextInput(input);
|
358
|
+
break;
|
359
|
+
case "arrowleft":
|
360
|
+
event.preventDefault();
|
361
|
+
this.moveToPreviousInput(input);
|
362
|
+
break;
|
363
|
+
case "arrowup":
|
364
|
+
case "arrowdown":
|
365
|
+
this.preventAutoFormatting = true;
|
366
|
+
this.handleUpDownArrowKeyPress(input, event);
|
367
|
+
break;
|
368
|
+
case "backspace":
|
369
|
+
if (input.value.length === 0) {
|
370
|
+
event.preventDefault();
|
371
|
+
this.moveToPreviousInput(input);
|
372
|
+
}
|
373
|
+
break;
|
374
|
+
}
|
375
|
+
this.preventInput(event, isInputPrevented);
|
376
|
+
this.isTimeSetFromKeyboardEvent = true;
|
377
|
+
};
|
378
|
+
this.handleFocus = (event) => {
|
379
|
+
const input = event.target;
|
380
|
+
input.select();
|
381
|
+
};
|
382
|
+
this.handleBlur = (event) => {
|
383
|
+
const input = event.target;
|
384
|
+
if (input) {
|
385
|
+
this.autocompleteInput(input);
|
386
|
+
}
|
387
|
+
};
|
388
|
+
this.handleUpDownArrowKeyPress = (input, event) => {
|
389
|
+
let minValue = 0;
|
390
|
+
let maxValue = 59;
|
391
|
+
if (input === this.hourInputEl) {
|
392
|
+
minValue = 0;
|
393
|
+
maxValue = this.timePeriod === "12" ? 11 : 23;
|
394
|
+
}
|
395
|
+
let val = +input.value;
|
396
|
+
if (event.key === "ArrowUp") {
|
397
|
+
val = val + 1;
|
398
|
+
if (val > maxValue)
|
399
|
+
val = minValue;
|
400
|
+
input.value = val.toString().padStart(2, "0");
|
401
|
+
this.notifyScreenReader(input);
|
402
|
+
}
|
403
|
+
if (event.key === "ArrowDown") {
|
404
|
+
val = val - 1;
|
405
|
+
if (val < minValue)
|
406
|
+
val = maxValue;
|
407
|
+
input.value = val.toString().padStart(2, "0");
|
408
|
+
this.notifyScreenReader(input);
|
409
|
+
}
|
410
|
+
this.setInputValue(input);
|
411
|
+
this.setFitToValueStyling(input);
|
412
|
+
};
|
413
|
+
this.handleTimeChange = (force) => {
|
414
|
+
if (force || this.selectedTime !== this.previousSelectedTime) {
|
415
|
+
if (this.value) {
|
416
|
+
this.inputsInOrder.forEach((input) => {
|
417
|
+
input.classList.add(this.FIT_TO_VALUE);
|
418
|
+
});
|
419
|
+
}
|
420
|
+
if (this.hour &&
|
421
|
+
this.minute &&
|
422
|
+
(this.isHHMMFormat() || this.second) &&
|
423
|
+
this.invalidTimeText === "") {
|
424
|
+
this.setValueAndEmitChange(this.selectedTime);
|
425
|
+
this.notifyScreenReaderSelectedTime();
|
426
|
+
}
|
427
|
+
else if (!(this.selectedTime === null && this.previousSelectedTime === null) &&
|
428
|
+
this.selectedTimeInfoEl) {
|
429
|
+
this.setValueAndEmitChange(null);
|
430
|
+
this.selectedTimeInfoEl.textContent = "";
|
431
|
+
}
|
432
|
+
this.previousSelectedTime = this.selectedTime;
|
433
|
+
if (!this.isTimeSetFromKeyboardEvent) {
|
434
|
+
this.updateInputValues(this.hour, this.minute, this.second);
|
435
|
+
}
|
436
|
+
}
|
437
|
+
};
|
438
|
+
this.setValueAndEmitChange = (value) => {
|
439
|
+
if (this.value !== value) {
|
440
|
+
this.emitIcChange(value);
|
441
|
+
this.value = value;
|
442
|
+
}
|
443
|
+
};
|
444
|
+
this.emitIcChange = (t) => {
|
445
|
+
this.selectedTime = t;
|
446
|
+
this.icChange.emit({
|
447
|
+
value: t,
|
448
|
+
timeObject: {
|
449
|
+
hour: this.hour === "" ? null : this.hour,
|
450
|
+
minute: this.minute === "" ? null : this.minute,
|
451
|
+
second: this.second === "" ? null : this.second,
|
452
|
+
},
|
453
|
+
});
|
454
|
+
};
|
455
|
+
this.setTime = (time) => {
|
456
|
+
if (time === null || time === "" || time === undefined) {
|
457
|
+
if (this.hour)
|
458
|
+
this.hour = "";
|
459
|
+
if (this.minute)
|
460
|
+
this.minute = "";
|
461
|
+
if (this.second)
|
462
|
+
this.second = "";
|
463
|
+
this.inputsInOrder.forEach((input) => {
|
464
|
+
input.classList.remove(this.FIT_TO_VALUE);
|
465
|
+
this.setPreventInput(input, false);
|
466
|
+
});
|
467
|
+
this.handleTimeChange(true);
|
468
|
+
}
|
469
|
+
else {
|
470
|
+
if (typeof time === "string") {
|
471
|
+
const zuluMatch = time.match(/^(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,3}))?Z?$/);
|
472
|
+
if (zuluMatch) {
|
473
|
+
this.hour = zuluMatch[1];
|
474
|
+
this.minute = zuluMatch[2];
|
475
|
+
this.second = zuluMatch[3];
|
476
|
+
}
|
477
|
+
else {
|
478
|
+
const parts = time.split(":");
|
479
|
+
this.hour = parts[0] || "";
|
480
|
+
this.minute = parts[1] || "";
|
481
|
+
this.second = parts[2] || "";
|
482
|
+
}
|
483
|
+
}
|
484
|
+
else if (time instanceof Date) {
|
485
|
+
this.hour = time.getHours().toString().padStart(2, "0");
|
486
|
+
this.minute = time.getMinutes().toString().padStart(2, "0");
|
487
|
+
this.second = time.getSeconds().toString().padStart(2, "0");
|
488
|
+
}
|
489
|
+
}
|
490
|
+
this.setValidationMessage();
|
491
|
+
};
|
492
|
+
this.setAriaInvalid = (validHour, validMinute, validSecond) => {
|
493
|
+
var _a, _b, _c;
|
494
|
+
if (this.inputsInOrder.length) {
|
495
|
+
this.inputsInOrder.forEach((input) => {
|
496
|
+
input.removeAttribute(this.ARIA_INVALID);
|
497
|
+
});
|
498
|
+
if (!validHour) {
|
499
|
+
(_a = this.hourInputEl) === null || _a === void 0 ? void 0 : _a.setAttribute(this.ARIA_INVALID, "true");
|
500
|
+
}
|
501
|
+
if (!validMinute) {
|
502
|
+
(_b = this.minuteInputEl) === null || _b === void 0 ? void 0 : _b.setAttribute(this.ARIA_INVALID, "true");
|
503
|
+
}
|
504
|
+
if (!validSecond) {
|
505
|
+
(_c = this.secondInputEl) === null || _c === void 0 ? void 0 : _c.setAttribute(this.ARIA_INVALID, "true");
|
506
|
+
}
|
507
|
+
if (!(validHour && validMinute && validSecond)) {
|
508
|
+
this.inputsInOrder.forEach((input) => {
|
509
|
+
input.setAttribute(this.ARIA_INVALID, "true");
|
510
|
+
});
|
511
|
+
}
|
512
|
+
}
|
513
|
+
};
|
514
|
+
this.handleClear = () => {
|
515
|
+
this.clearInput = true;
|
516
|
+
if (this.hourInputEl) {
|
517
|
+
this.hourInputEl.value = "";
|
518
|
+
}
|
519
|
+
if (this.minuteInputEl) {
|
520
|
+
this.minuteInputEl.value = "";
|
521
|
+
}
|
522
|
+
if (!this.isHHMMFormat() && this.secondInputEl) {
|
523
|
+
this.secondInputEl.value = "";
|
524
|
+
}
|
525
|
+
this.hour = "";
|
526
|
+
this.minute = "";
|
527
|
+
this.second = "";
|
528
|
+
this.handleTimeChange(true);
|
529
|
+
this.inputsInOrder.forEach((input) => {
|
530
|
+
input.classList.remove(this.FIT_TO_VALUE);
|
531
|
+
this.setPreventInput(input, false);
|
532
|
+
});
|
533
|
+
this.clearInput = false;
|
534
|
+
this.isTimeSetFromKeyboardEvent = false;
|
535
|
+
this.setValidationMessage();
|
536
|
+
this.invalidTimeText = "";
|
537
|
+
if (this.hourInputEl) {
|
538
|
+
this.hourInputEl.focus();
|
539
|
+
}
|
540
|
+
};
|
541
|
+
this.notifyScreenReaderSelectedTime = () => {
|
542
|
+
if (this.selectedTime && this.selectedTimeInfoEl) {
|
543
|
+
if (this.isHHMMFormat()) {
|
544
|
+
this.selectedTimeInfoEl.textContent = `Selected time: ${this.selectedTime
|
545
|
+
.getHours()
|
546
|
+
.toString()
|
547
|
+
.padStart(2, "0")}:${this.selectedTime
|
548
|
+
.getMinutes()
|
549
|
+
.toString()
|
550
|
+
.padStart(2, "0")}`;
|
551
|
+
}
|
552
|
+
else {
|
553
|
+
this.selectedTimeInfoEl.textContent = `Selected time: ${this.selectedTime
|
554
|
+
.getHours()
|
555
|
+
.toString()
|
556
|
+
.padStart(2, "0")}:${this.selectedTime
|
557
|
+
.getMinutes()
|
558
|
+
.toString()
|
559
|
+
.padStart(2, "0")}:${this.selectedTime
|
560
|
+
.getSeconds()
|
561
|
+
.toString()
|
562
|
+
.padStart(2, "0")}`;
|
563
|
+
}
|
564
|
+
}
|
565
|
+
};
|
566
|
+
this.setFitToValueStyling = (input) => {
|
567
|
+
if (input.value) {
|
568
|
+
input.classList.add(this.FIT_TO_VALUE);
|
569
|
+
}
|
570
|
+
else {
|
571
|
+
input.classList.remove(this.FIT_TO_VALUE);
|
572
|
+
}
|
573
|
+
};
|
574
|
+
this.handleHostBlur = () => {
|
575
|
+
this.removeLabelledBy = false;
|
576
|
+
this.icBlur.emit({ value: this.selectedTime });
|
577
|
+
};
|
578
|
+
this.handleHostFocus = () => {
|
579
|
+
var _a, _b;
|
580
|
+
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$/)) {
|
581
|
+
this.removeLabelledBy = false;
|
582
|
+
}
|
583
|
+
else {
|
584
|
+
this.removeLabelledBy = true;
|
585
|
+
}
|
586
|
+
this.icFocus.emit({ value: this.selectedTime });
|
587
|
+
};
|
588
|
+
this.handleFormReset = () => {
|
589
|
+
this.setTime(this.initialValue);
|
590
|
+
this.setValidationMessage();
|
591
|
+
this.handleTimeChange(false);
|
592
|
+
};
|
593
|
+
this.preventInput = (event, isInputPrevented) => {
|
594
|
+
const key = event.key;
|
595
|
+
const input = event.target;
|
596
|
+
let selectedString;
|
597
|
+
if (input) {
|
598
|
+
selectedString = input.value.substring(input.selectionStart || 0, input.selectionEnd || undefined);
|
599
|
+
}
|
600
|
+
if (key === "e" ||
|
601
|
+
key === "." ||
|
602
|
+
key === "-" ||
|
603
|
+
(event.key >= "0" &&
|
604
|
+
event.key <= "9" &&
|
605
|
+
isInputPrevented &&
|
606
|
+
!selectedString)) {
|
607
|
+
event.preventDefault();
|
608
|
+
}
|
609
|
+
};
|
610
|
+
this.moveToNextInput = (currentInput) => {
|
611
|
+
var _a;
|
612
|
+
this.preventAutoFormatting = false;
|
613
|
+
(_a = this.inputsInOrder[this.inputsInOrder.findIndex((input) => input === currentInput) + 1]) === null || _a === void 0 ? void 0 : _a.focus();
|
614
|
+
};
|
615
|
+
this.moveToPreviousInput = (currentInput) => {
|
616
|
+
var _a;
|
617
|
+
this.preventAutoFormatting = false;
|
618
|
+
(_a = this.inputsInOrder[this.inputsInOrder.findIndex((input) => input === currentInput) - 1]) === null || _a === void 0 ? void 0 : _a.focus();
|
619
|
+
};
|
620
|
+
this.autocompleteInput = (input) => {
|
621
|
+
const inputValue = input.value;
|
622
|
+
if (inputValue.length === 1) {
|
623
|
+
input.value = `0${inputValue}`;
|
624
|
+
}
|
625
|
+
if (input.value) {
|
626
|
+
this.setInputValue(input);
|
627
|
+
}
|
628
|
+
};
|
629
|
+
this.convertToTime = (hour, minute, second) => {
|
630
|
+
if (!isEmptyString(hour) &&
|
631
|
+
!isEmptyString(minute) &&
|
632
|
+
(this.isHHMMFormat() || !isEmptyString(second))) {
|
633
|
+
const d = new Date();
|
634
|
+
d.setHours(+hour, +minute, this.isHHMMFormat() ? 0 : +second, 0);
|
635
|
+
return d;
|
636
|
+
}
|
637
|
+
else {
|
638
|
+
return null;
|
639
|
+
}
|
640
|
+
};
|
641
|
+
this.setInputsInOrder = () => {
|
642
|
+
var _a;
|
643
|
+
this.inputsInOrder = [];
|
644
|
+
const shadowInputs = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll("input");
|
645
|
+
if (shadowInputs) {
|
646
|
+
shadowInputs.forEach((input) => this.inputsInOrder.push(input));
|
647
|
+
}
|
648
|
+
};
|
649
|
+
this.updateInputValues = (hour, minute, second) => {
|
650
|
+
if (this.hourInputEl && this.minuteInputEl && this.secondInputEl) {
|
651
|
+
this.hourInputEl.value = hour;
|
652
|
+
this.minuteInputEl.value = minute;
|
653
|
+
this.secondInputEl.value = second;
|
654
|
+
}
|
655
|
+
};
|
656
|
+
this.removeAriaLabelledBy = () => {
|
657
|
+
var _a;
|
658
|
+
(_a = this.inputCompContainerEl) === null || _a === void 0 ? void 0 : _a.removeAttribute(this.ARIA_LABELLED_BY);
|
659
|
+
};
|
660
|
+
this.setAriaLabelledBy = () => {
|
661
|
+
var _a, _b, _c, _d;
|
662
|
+
if (this.disabled &&
|
663
|
+
((_a = this.inputCompContainerEl) === null || _a === void 0 ? void 0 : _a.getAttribute(this.ARIA_LABELLED_BY))) {
|
664
|
+
this.removeAriaLabelledBy();
|
665
|
+
return;
|
666
|
+
}
|
667
|
+
if (this.disabled) {
|
668
|
+
return;
|
669
|
+
}
|
670
|
+
const labelEl = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("label");
|
671
|
+
const labelId = `${this.inputId}-label`;
|
672
|
+
if (labelEl !== null && labelEl !== undefined) {
|
673
|
+
labelEl.id = labelId;
|
674
|
+
}
|
675
|
+
const hasValidation = !isEmptyString(this.validationStatus) ||
|
676
|
+
!isEmptyString(this.invalidTimeText);
|
677
|
+
const labelledBy = `${(_c = labelEl === null || labelEl === void 0 ? void 0 : labelEl.id) !== null && _c !== void 0 ? _c : ""} ${this.screenReaderInfoId} ${getInputDescribedByText(this.el, this.inputId, this.helperText !== "" && this.helperText !== this.defaultHelperText, hasValidation)} ${this.selectedTime ? this.selectedTimeInfoId : ""} ${this.assistiveHintId}`;
|
678
|
+
(_d = this.inputCompContainerEl) === null || _d === void 0 ? void 0 : _d.setAttribute(this.ARIA_LABELLED_BY, labelledBy);
|
679
|
+
};
|
680
|
+
this.getInputsInOrder = () => {
|
681
|
+
const timeParts = this.timeFormat.split(":");
|
682
|
+
return timeParts.map((part) => {
|
683
|
+
switch (part.substring(0, 1)) {
|
684
|
+
case "H":
|
685
|
+
return (h("input", { class: "hour-input", id: "hour-input", ref: (el) => (this.hourInputEl = el), "aria-label": "hour", placeholder: "HH", disabled: this.disabled, inputmode: "number", pattern: "[0-9]*", onPaste: this.handlePaste, onKeyDown: (event) => this.handleKeyDown(event, this.preventHourInput) }));
|
686
|
+
case "M":
|
687
|
+
return (h("input", { id: "minute-input", class: "minute-input", ref: (el) => (this.minuteInputEl = el), "aria-label": "minute", placeholder: "MM", disabled: this.disabled, inputmode: "number", pattern: "[0-9]*", onPaste: this.handlePaste, onKeyDown: (event) => this.handleKeyDown(event, this.preventMinuteInput) }));
|
688
|
+
case "S":
|
689
|
+
if (!this.isHHMMFormat()) {
|
690
|
+
return (h("input", { id: "second-input", class: "second-input", ref: (el) => (this.secondInputEl = el), "aria-label": "second", placeholder: "SS", disabled: this.disabled, inputmode: "number", pattern: "[0-9]*", onPaste: this.handlePaste, onKeyDown: (event) => this.handleKeyDown(event, this.preventSecondInput) }));
|
691
|
+
}
|
692
|
+
return null;
|
693
|
+
default:
|
694
|
+
return null;
|
695
|
+
}
|
696
|
+
});
|
697
|
+
};
|
698
|
+
this.getDescOfInputsOrder = () => {
|
699
|
+
return "hour, minute, and second";
|
700
|
+
};
|
701
|
+
this.getScreenReaderInfo = (validationStatus) => {
|
702
|
+
let inputDescriptors = "";
|
703
|
+
if (this.required) {
|
704
|
+
inputDescriptors += "required";
|
705
|
+
}
|
706
|
+
if (validationStatus === IcInformationStatus.Error) {
|
707
|
+
inputDescriptors += " invalid data";
|
708
|
+
}
|
709
|
+
return inputDescriptors === "" ? "" : inputDescriptors + ", ";
|
710
|
+
};
|
711
|
+
this.notifyScreenReader = (input) => {
|
712
|
+
var _a;
|
713
|
+
const liveRegion = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("#live-region");
|
714
|
+
if (liveRegion) {
|
715
|
+
liveRegion.textContent = `${input.value}, ${input.getAttribute(this.ARIA_LABEL)}`;
|
716
|
+
}
|
717
|
+
};
|
718
|
+
this.handlePaste = (event) => {
|
719
|
+
var _a;
|
720
|
+
event.preventDefault();
|
721
|
+
const pastedValue = ((_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData("Text")) || "";
|
722
|
+
const isValidTime = this.isPastedStringTimeValid(pastedValue);
|
723
|
+
this.setPastedValueAndValidation(isValidTime, pastedValue, event);
|
724
|
+
};
|
725
|
+
this.handleClearFocus = () => {
|
726
|
+
this.removeLabelledBy = true;
|
727
|
+
this.clearButtonFocused = true;
|
728
|
+
this.isTimeSetFromKeyboardEvent = true;
|
729
|
+
};
|
730
|
+
this.handleClearBlur = (ev) => {
|
731
|
+
this.clearButtonFocused = false;
|
732
|
+
this.isTimeSetFromKeyboardEvent = true;
|
733
|
+
const relatedTarget = ev.relatedTarget;
|
734
|
+
if ((relatedTarget === null || relatedTarget === void 0 ? void 0 : relatedTarget.id) === "clock-button") {
|
735
|
+
this.removeLabelledBy = false;
|
736
|
+
return;
|
737
|
+
}
|
738
|
+
if (relatedTarget === null || relatedTarget === void 0 ? void 0 : relatedTarget.id.match(/(minute|second)-input$/)) {
|
739
|
+
this.removeLabelledBy = false;
|
740
|
+
return;
|
741
|
+
}
|
742
|
+
this.removeLabelledBy = true;
|
743
|
+
};
|
744
|
+
this.handleClockFocus = () => {
|
745
|
+
this.clockFocused = true;
|
746
|
+
};
|
747
|
+
this.handleClockBlur = () => {
|
748
|
+
this.clockFocused = false;
|
749
|
+
};
|
750
|
+
this.isPastedStringTimeValid = (value) => {
|
751
|
+
if (this.isHHMMFormat()) {
|
752
|
+
if (/^\d{2}:\d{2}$/.test(value)) {
|
753
|
+
return value;
|
754
|
+
}
|
755
|
+
}
|
756
|
+
else {
|
757
|
+
if (/^\d{2}:\d{2}:\d{2}$/.test(value)) {
|
758
|
+
return value;
|
759
|
+
}
|
760
|
+
if (/^\d{2}:\d{2}:\d{2}Z$/.test(value)) {
|
761
|
+
return value.replace("Z", "");
|
762
|
+
}
|
763
|
+
const isoMatch = value.match(/T(\d{2}:\d{2}:\d{2})/);
|
764
|
+
if (isoMatch) {
|
765
|
+
return isoMatch[1];
|
766
|
+
}
|
767
|
+
}
|
768
|
+
return false;
|
769
|
+
};
|
770
|
+
this.setPastedValueAndValidation = (isValidTime, pastedValue, event) => {
|
771
|
+
if (isValidTime) {
|
772
|
+
const timeParts = isValidTime.split(":");
|
773
|
+
this.inputsInOrder.forEach((input, index) => {
|
774
|
+
input.classList.add(this.FIT_TO_VALUE);
|
775
|
+
const timeValue = timeParts[index] || "";
|
776
|
+
input.value = timeValue.slice(0, 2);
|
777
|
+
this.setInputValue(input);
|
778
|
+
this.autocompleteInput(input);
|
779
|
+
});
|
780
|
+
if (this.isHHMMFormat() && this.second !== "") {
|
781
|
+
this.second = "";
|
782
|
+
}
|
783
|
+
}
|
784
|
+
else {
|
785
|
+
const pasted = pastedValue.trim();
|
786
|
+
if ((pasted.length === 1 || pasted.length === 2) && isNumeric(pasted)) {
|
787
|
+
this.setInputPasteValue(event.target, pasted);
|
788
|
+
this.setInputValue(event.target);
|
789
|
+
}
|
790
|
+
else {
|
791
|
+
this.invalidTimeText = `Please paste a valid ${event.target.getAttribute(this.ARIA_LABEL)}`;
|
792
|
+
this.validationStatus = IcInformationStatus.Error;
|
793
|
+
}
|
794
|
+
}
|
795
|
+
};
|
796
|
+
}
|
797
|
+
watchInputHandler() {
|
798
|
+
if (this.emitTimePartChange &&
|
799
|
+
!this.externalSetTime &&
|
800
|
+
!this.clearInput &&
|
801
|
+
!(this.hour && this.minute && this.second) &&
|
802
|
+
this.selectedTime === null) {
|
803
|
+
this.emitIcChange(this.selectedTime);
|
804
|
+
}
|
805
|
+
}
|
806
|
+
watchDisabledHandler() {
|
807
|
+
removeDisabledFalse(this.disabled, this.el);
|
808
|
+
}
|
809
|
+
watchMaxHandler() {
|
810
|
+
this.maxTime = this.parseTime(this.max);
|
811
|
+
}
|
812
|
+
watchMinHandler() {
|
813
|
+
this.minTime = this.parseTime(this.min);
|
814
|
+
}
|
815
|
+
watchRequiredHandler() {
|
816
|
+
var _a, _b;
|
817
|
+
const labelEl = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("label");
|
818
|
+
if (this.required) {
|
819
|
+
const asteriskSpan = document.createElement("span");
|
820
|
+
asteriskSpan.setAttribute("id", "asterisk-span");
|
821
|
+
asteriskSpan.setAttribute("aria-hidden", "true");
|
822
|
+
asteriskSpan.textContent = " *";
|
823
|
+
labelEl === null || labelEl === void 0 ? void 0 : labelEl.appendChild(asteriskSpan);
|
824
|
+
}
|
825
|
+
else {
|
826
|
+
const asteriskSpan = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("#asterisk-span");
|
827
|
+
if (asteriskSpan) {
|
828
|
+
asteriskSpan.remove();
|
829
|
+
}
|
830
|
+
}
|
831
|
+
}
|
832
|
+
disconnectedCallback() {
|
833
|
+
removeFormResetListener(this.el, this.handleFormReset);
|
834
|
+
}
|
835
|
+
componentWillLoad() {
|
836
|
+
this.defaultHelperText = `Use format ${this.timeFormat}`;
|
837
|
+
if (isEmptyString(this.helperText))
|
838
|
+
this.helperText = this.defaultHelperText;
|
839
|
+
if (this.value) {
|
840
|
+
this.externalSetTime = true;
|
841
|
+
this.setTime(this.value);
|
842
|
+
}
|
843
|
+
this.screenReaderInfoId = `${this.inputId}-screen-reader-info`;
|
844
|
+
this.assistiveHintId = `${this.inputId}-assistive-hint`;
|
845
|
+
this.selectedTimeInfoId = `${this.inputId}-selected-time-info`;
|
846
|
+
addFormResetListener(this.el, this.handleFormReset);
|
847
|
+
removeDisabledFalse(this.disabled, this.el);
|
848
|
+
}
|
849
|
+
componentDidLoad() {
|
850
|
+
this.setInputsInOrder();
|
851
|
+
onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Time Input");
|
852
|
+
if (this.value) {
|
853
|
+
this.updateInputValues(this.hour, this.minute, this.second);
|
854
|
+
this.inputsInOrder.forEach((input) => {
|
855
|
+
input.classList.add(this.FIT_TO_VALUE);
|
856
|
+
});
|
857
|
+
}
|
858
|
+
this.setAriaInvalid(this.isValidHour, this.isValidMinute, this.isValidSecond);
|
859
|
+
if (this.value) {
|
860
|
+
this.notifyScreenReaderSelectedTime();
|
861
|
+
}
|
862
|
+
this.inputsInOrder.forEach((input) => {
|
863
|
+
input.addEventListener("input", this.handleInput);
|
864
|
+
input.addEventListener("focus", this.handleFocus);
|
865
|
+
input.addEventListener("blur", this.handleBlur);
|
866
|
+
});
|
867
|
+
this.watchRequiredHandler();
|
868
|
+
}
|
869
|
+
componentWillUpdate() {
|
870
|
+
if (isEmptyString(this.helperText))
|
871
|
+
this.helperText = this.defaultHelperText;
|
872
|
+
if (!this.isTimeSetFromKeyboardEvent)
|
873
|
+
this.setTime(this.value);
|
874
|
+
this.setAriaInvalid(this.isValidHour, this.isValidMinute, this.isValidSecond);
|
875
|
+
this.handleTimeChange(false);
|
876
|
+
this.isTimeSetFromKeyboardEvent = false;
|
877
|
+
}
|
878
|
+
componentDidRender() {
|
879
|
+
if (this.removeLabelledBy) {
|
880
|
+
this.removeAriaLabelledBy();
|
881
|
+
return;
|
882
|
+
}
|
883
|
+
this.setAriaLabelledBy();
|
884
|
+
}
|
885
|
+
/**
|
886
|
+
* Returns the value as a Date object
|
887
|
+
* @returns Date
|
888
|
+
*/
|
889
|
+
async getTime() {
|
890
|
+
return this.selectedTime;
|
891
|
+
}
|
892
|
+
/**
|
893
|
+
* @internal Used to enable other components to invoke an IcChange event from the input.
|
894
|
+
*/
|
895
|
+
async triggerIcChange(t) {
|
896
|
+
this.externalSetTime = true;
|
897
|
+
this.setTime(t);
|
898
|
+
this.emitIcChange(t);
|
899
|
+
this.externalSetTime = false;
|
900
|
+
}
|
901
|
+
render() {
|
902
|
+
const { inputId, label, disabled, helperText, hideHelperText, hideLabel, showClearButton, showClockButton, size, theme, } = this;
|
903
|
+
const hasCustomValidation = !isEmptyString(this.validationStatus);
|
904
|
+
const validationStatus = hasCustomValidation
|
905
|
+
? this.validationStatus
|
906
|
+
: !isEmptyString(this.invalidTimeText)
|
907
|
+
? IcInformationStatus.Error
|
908
|
+
: "";
|
909
|
+
const assistiveHint = `Type or use the up and down arrow keys to change the values for the ${this.getDescOfInputsOrder()}.`;
|
910
|
+
renderHiddenInput(true, this.el, this.name, this.convertToTime(this.hour, this.minute, this.second), this.disabled);
|
911
|
+
const showDivider = !!(showClearButton &&
|
912
|
+
!(isEmptyString(this.hour) &&
|
913
|
+
isEmptyString(this.minute) &&
|
914
|
+
isEmptyString(this.second)));
|
915
|
+
return (h(Host, { key: 'cf8b05ab0ccc0a0a779296e4dd3ba52375547b13', class: {
|
916
|
+
[`ic-theme-${theme}`]: theme !== "inherit",
|
917
|
+
[`ic-time-input-disabled`]: disabled,
|
918
|
+
[`ic-time-input-${size}`]: true,
|
919
|
+
}, onBlur: this.handleHostBlur, onFocus: this.handleHostFocus }, h("ic-input-container", { key: 'b104968d5b191f040358a7e800f11cb6dd036407', disabled: disabled }, !(hideLabel && hideHelperText) && (h("ic-input-label", { key: 'fa0eaeef4aab6aef24b830e466ba87d68eb84b84', for: inputId, label: label, hideLabel: hideLabel, helperText: !hideHelperText ? helperText : "", disabled: disabled }, h("slot", { key: 'e4548928534459ff788ff576483b560cf90fed53', name: "helper-text", slot: "helper-text" }))), h("span", { key: '6f119c460880a9adb8661309c3a59cfee061ae7c', id: this.screenReaderInfoId, class: "sr-only", "aria-hidden": "true" }, this.getScreenReaderInfo(validationStatus), hideLabel && `${label}\n`, hideHelperText && `${helperText}\n`, `${this.defaultHelperText}.`), h("span", { key: 'bd5ce20dab45d2514cd4219eee0d1645596e5e6e', id: this.assistiveHintId, class: "sr-only", "aria-hidden": "true" }, assistiveHint), h("span", { key: 'e3d4a1e518f7bcb1b35ee065b5f038f9f6f3ffe7', id: "live-region", "aria-live": "assertive", class: "sr-only" }), h("ic-input-component-container", { key: '396b05aa89aa0e24a1853cc5de20abb5341c49e5', id: inputId, ref: (el) => (this.inputCompContainerEl = el), disabled: disabled, validationStatus: validationStatus, size: size, role: "group", class: { [`ic-theme-${theme}`]: theme !== "inherit" } }, h("div", { key: '2ac49a3454ce8dbabb546e54af197f0a66840499', class: "input-container" }, h("div", { key: '6917d370b61c997d888c133bb27d5fa8f94a79c0', class: "time-inputs" }, [
|
920
|
+
this.getInputsInOrder()[0],
|
921
|
+
":",
|
922
|
+
this.getInputsInOrder()[1],
|
923
|
+
!this.isHHMMFormat()
|
924
|
+
? [":", this.getInputsInOrder()[2]]
|
925
|
+
: null,
|
926
|
+
]), h("div", { key: 'f09f3442355e75170fb1916727fdcac001df885d', class: "action-buttons" }, showClearButton && (h("ic-button", { key: '27173fcbdcd13798c4adc66eda9469bc471693ea', id: "clear-button", "aria-label": "Clear input", class: {
|
927
|
+
["clear-button"]: true,
|
928
|
+
["hidden"]: isEmptyString(this.hour) &&
|
929
|
+
isEmptyString(this.minute) &&
|
930
|
+
isEmptyString(this.second),
|
931
|
+
}, 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: '606a05c923fc4b95c21d0418be14168982117938', class: "show-clock-button-wrapper" }, h("div", { key: '4b9b2d37ed3a9661615685f3b077ac244295fbd1', class: { divider: showDivider, [size]: true } }), h("ic-button", { key: 'ab6ec2ca4b1442a23834e1a514800cd0f77c92d5', 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" })))))), h("span", { key: '1695846e5d626056f5a0e372c8513fcf0001f0b9', id: this.selectedTimeInfoId, class: "sr-only", "aria-live": "polite" }, h("span", { key: '34f41adff4bc3642d21014b85e525b6f80814bb6', ref: (el) => (this.selectedTimeInfoEl = el), role: "status" })), (hasCustomValidation || !isEmptyString(this.invalidTimeText)) && (h("ic-input-validation", { key: '4b9326e9e9df98698c2c6643262122658a1434de', status: validationStatus, message: hasCustomValidation ? this.validationText : this.invalidTimeText, for: inputId })))));
|
932
|
+
}
|
933
|
+
static get delegatesFocus() { return true; }
|
934
|
+
get el() { return this; }
|
935
|
+
static get watchers() { return {
|
936
|
+
"hour": ["watchInputHandler"],
|
937
|
+
"minute": ["watchInputHandler"],
|
938
|
+
"second": ["watchInputHandler"],
|
939
|
+
"disabled": ["watchDisabledHandler"],
|
940
|
+
"max": ["watchMaxHandler"],
|
941
|
+
"min": ["watchMinHandler"],
|
942
|
+
"required": ["watchRequiredHandler"]
|
943
|
+
}; }
|
944
|
+
static get style() { return IcTimeInputStyle0; }
|
945
|
+
}, [17, "ic-time-input", {
|
946
|
+
"disabled": [4],
|
947
|
+
"disableTimes": [16],
|
948
|
+
"emitTimePartChange": [4, "emit-time-part-change"],
|
949
|
+
"helperText": [1025, "helper-text"],
|
950
|
+
"hideHelperText": [4, "hide-helper-text"],
|
951
|
+
"hideLabel": [4, "hide-label"],
|
952
|
+
"inputId": [1, "input-id"],
|
953
|
+
"invalidTimeMessage": [1, "invalid-time-message"],
|
954
|
+
"label": [1],
|
955
|
+
"max": [1],
|
956
|
+
"min": [1],
|
957
|
+
"name": [1],
|
958
|
+
"required": [4],
|
959
|
+
"showClearButton": [4, "show-clear-button"],
|
960
|
+
"showClockButton": [4, "show-clock-button"],
|
961
|
+
"size": [1],
|
962
|
+
"theme": [1],
|
963
|
+
"timeFormat": [1, "time-format"],
|
964
|
+
"timePeriod": [1, "time-period"],
|
965
|
+
"value": [1025],
|
966
|
+
"validationStatus": [1025, "validation-status"],
|
967
|
+
"validationText": [1, "validation-text"],
|
968
|
+
"invalidTimeText": [32],
|
969
|
+
"clockFocused": [32],
|
970
|
+
"clearButtonFocused": [32],
|
971
|
+
"removeLabelledBy": [32],
|
972
|
+
"hour": [32],
|
973
|
+
"minute": [32],
|
974
|
+
"second": [32],
|
975
|
+
"getTime": [64],
|
976
|
+
"triggerIcChange": [64]
|
977
|
+
}, undefined, {
|
978
|
+
"hour": ["watchInputHandler"],
|
979
|
+
"minute": ["watchInputHandler"],
|
980
|
+
"second": ["watchInputHandler"],
|
981
|
+
"disabled": ["watchDisabledHandler"],
|
982
|
+
"max": ["watchMaxHandler"],
|
983
|
+
"min": ["watchMinHandler"],
|
984
|
+
"required": ["watchRequiredHandler"]
|
985
|
+
}]);
|
986
|
+
function defineCustomElement$1() {
|
987
|
+
if (typeof customElements === "undefined") {
|
988
|
+
return;
|
989
|
+
}
|
990
|
+
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"];
|
991
|
+
components.forEach(tagName => { switch (tagName) {
|
992
|
+
case "ic-time-input":
|
993
|
+
if (!customElements.get(tagName)) {
|
994
|
+
customElements.define(tagName, TimeInput);
|
995
|
+
}
|
996
|
+
break;
|
997
|
+
case "ic-button":
|
998
|
+
if (!customElements.get(tagName)) {
|
999
|
+
defineCustomElement$9();
|
1000
|
+
}
|
1001
|
+
break;
|
1002
|
+
case "ic-input-component-container":
|
1003
|
+
if (!customElements.get(tagName)) {
|
1004
|
+
defineCustomElement$8();
|
1005
|
+
}
|
1006
|
+
break;
|
1007
|
+
case "ic-input-container":
|
1008
|
+
if (!customElements.get(tagName)) {
|
1009
|
+
defineCustomElement$7();
|
1010
|
+
}
|
1011
|
+
break;
|
1012
|
+
case "ic-input-label":
|
1013
|
+
if (!customElements.get(tagName)) {
|
1014
|
+
defineCustomElement$6();
|
1015
|
+
}
|
1016
|
+
break;
|
1017
|
+
case "ic-input-validation":
|
1018
|
+
if (!customElements.get(tagName)) {
|
1019
|
+
defineCustomElement$5();
|
1020
|
+
}
|
1021
|
+
break;
|
1022
|
+
case "ic-loading-indicator":
|
1023
|
+
if (!customElements.get(tagName)) {
|
1024
|
+
defineCustomElement$4();
|
1025
|
+
}
|
1026
|
+
break;
|
1027
|
+
case "ic-tooltip":
|
1028
|
+
if (!customElements.get(tagName)) {
|
1029
|
+
defineCustomElement$3();
|
1030
|
+
}
|
1031
|
+
break;
|
1032
|
+
case "ic-typography":
|
1033
|
+
if (!customElements.get(tagName)) {
|
1034
|
+
defineCustomElement$2();
|
1035
|
+
}
|
1036
|
+
break;
|
1037
|
+
} });
|
1038
|
+
}
|
1039
|
+
|
1040
|
+
const IcTimeInput = TimeInput;
|
1041
|
+
const defineCustomElement = defineCustomElement$1;
|
1042
|
+
|
1043
|
+
export { IcTimeInput, defineCustomElement };
|
1044
|
+
|
1045
|
+
//# sourceMappingURL=ic-time-input.js.map
|