@ukic/canary-web-components 3.0.0-canary.25 → 3.0.0-canary.27
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/common-helpers-944cb54d.js +21 -0
- package/dist/cjs/common-helpers-944cb54d.js.map +1 -0
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-56717660.js → helpers-046745ee.js} +24 -22
- package/dist/cjs/helpers-046745ee.js.map +1 -0
- package/dist/cjs/helpers-da852478.js.map +1 -1
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-action-chip.cjs.entry.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +2 -2
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +24 -18
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +7 -4
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox_3.cjs.entry.js +41 -28
- package/dist/cjs/ic-checkbox_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +6 -5
- package/dist/cjs/ic-chip.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 +3 -3
- package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +13 -13
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +7 -7
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +6 -4
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +3 -3
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +5 -5
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +6 -6
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js +28 -14
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-layout-grid-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-layout-grid-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-layout-grid.cjs.entry.js +2 -2
- package/dist/cjs/ic-layout-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu.cjs.entry.js +23 -7
- package/dist/cjs/ic-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +2 -2
- 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-menu.cjs.entry.js +5 -5
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +7 -7
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +52 -37
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +5 -5
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +14 -7
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +6 -6
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +10 -10
- 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 +5 -5
- 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 +3 -3
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +66 -54
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +20 -3
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +5 -5
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +10 -2
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
- 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 +1 -1
- package/dist/cjs/ic-table-of-contents.cjs.entry.js +363 -0
- package/dist/cjs/ic-table-of-contents.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-theme.cjs.entry.js +2 -2
- package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-time-input.cjs.entry.js +11 -11
- package/dist/cjs/ic-time-input.cjs.entry.js.map +1 -1
- 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 +4 -4
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +3 -3
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-tree-view.cjs.entry.js +6 -4
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +3 -3
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/index-d337cd8a.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/purify-039f565a.js +1365 -0
- package/dist/cjs/purify-039f565a.js.map +1 -0
- package/dist/collection/assets/error-icon.svg +4 -4
- package/dist/collection/assets/info-icon.svg +4 -4
- package/dist/collection/assets/neutral-icon.svg +4 -4
- package/dist/collection/assets/success-icon.svg +4 -4
- package/dist/collection/assets/warning-icon.svg +4 -4
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -1
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.stories.js.map +1 -1
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.js +12 -13
- 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 +1 -1
- 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 +128 -69
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-data-table/test/a11y/ic-data-table.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +1 -1
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.stories.js.map +1 -1
- package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.css +6 -0
- package/dist/collection/components/ic-date-input/ic-date-input.js +6 -6
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.stories.js.map +1 -1
- package/dist/collection/components/ic-date-input/story-data.js.map +1 -1
- package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.stories.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-day-button.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-month-picker.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-year-picker.js.map +1 -1
- package/dist/collection/components/ic-date-picker/story-data.js.map +1 -1
- package/dist/collection/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +44 -25
- 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 +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/test/a11y/ic-pagination-bar.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-table-of-contents/ic-table-of-contents-item.js +28 -0
- package/dist/collection/components/ic-table-of-contents/ic-table-of-contents-item.js.map +1 -0
- package/dist/collection/components/ic-table-of-contents/ic-table-of-contents.css +145 -0
- package/dist/collection/components/ic-table-of-contents/ic-table-of-contents.js +526 -0
- package/dist/collection/components/ic-table-of-contents/ic-table-of-contents.js.map +1 -0
- package/dist/collection/components/ic-table-of-contents/ic-table-of-contents.stories.js +291 -0
- package/dist/collection/components/ic-table-of-contents/ic-table-of-contents.stories.js.map +1 -0
- package/dist/collection/components/ic-table-of-contents/test/a11y/ic-table-of-contents.test.a11y.js +13 -0
- package/dist/collection/components/ic-table-of-contents/test/a11y/ic-table-of-contents.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-time-input/ic-time-input.css +1 -1
- package/dist/collection/components/ic-time-input/ic-time-input.js +10 -10
- 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.map +1 -1
- package/dist/collection/components/ic-time-input/test/helpers/ic-time-input.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +2 -2
- 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 +5 -4
- package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.stories.js.map +1 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.types.js.map +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/collection/utils/date-helpers.js.map +1 -1
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/testa11y.helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/common-helpers.js +19 -0
- package/dist/components/common-helpers.js.map +1 -0
- package/dist/components/helpers.js +23 -22
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-alert.js +1 -1
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-button2.js +15 -10
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +6 -3
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox2.js +3 -3
- package/dist/components/ic-checkbox2.js.map +1 -1
- package/dist/components/ic-chip.js +5 -4
- package/dist/components/ic-chip.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 +12 -13
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +7 -7
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-dialog.js +5 -3
- 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 +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 +6 -6
- 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 +22 -6
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-layout-grid-item.js +2 -2
- package/dist/components/ic-layout-grid-item.js.map +1 -1
- package/dist/components/ic-layout-grid.js +2 -2
- package/dist/components/ic-layout-grid.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 +5 -5
- 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 +23 -7
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +1 -1
- package/dist/components/ic-navigation-group.js +2 -2
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-menu2.js +5 -5
- 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-bar2.js +35 -22
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +2 -2
- 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 +14 -6
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +5 -5
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +10 -10
- 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 +20 -12
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +5 -5
- 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 +66 -53
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +20 -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 +11 -2
- 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-table-of-contents.d.ts +11 -0
- package/dist/components/ic-table-of-contents.js +408 -0
- package/dist/components/ic-table-of-contents.js.map +1 -0
- package/dist/components/ic-text-field2.js +30 -21
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +2 -2
- package/dist/components/ic-theme.js.map +1 -1
- package/dist/components/ic-time-input.js +11 -11
- package/dist/components/ic-time-input.js.map +1 -1
- 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 +4 -4
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +2 -2
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +3 -3
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-tooltip2.js +6 -4
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +1 -1
- package/dist/components/ic-tree-item.js +2 -2
- package/dist/components/ic-tree-view.js +5 -4
- 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/components/purify.js +1363 -0
- package/dist/components/purify.js.map +1 -0
- package/dist/core/core.css +32 -4
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-d47e200c.entry.js → p-05e0cadf.entry.js} +2 -2
- package/dist/core/{p-8051e61b.entry.js → p-07365d6f.entry.js} +2 -2
- package/dist/core/{p-51e2de77.entry.js → p-0b0cc10d.entry.js} +2 -2
- package/dist/core/{p-51e2de77.entry.js.map → p-0b0cc10d.entry.js.map} +1 -1
- package/dist/core/{p-c067e62c.entry.js → p-0e882f70.entry.js} +2 -2
- package/dist/core/{p-588a331f.entry.js → p-0ec0be8d.entry.js} +2 -2
- package/dist/core/{p-588a331f.entry.js.map → p-0ec0be8d.entry.js.map} +1 -1
- package/dist/core/p-0f22f41e.js.map +1 -1
- package/dist/core/{p-d41b0da0.entry.js → p-182883cb.entry.js} +2 -2
- package/dist/core/{p-d41b0da0.entry.js.map → p-182883cb.entry.js.map} +1 -1
- package/dist/core/{p-364cc350.entry.js → p-18b793e0.entry.js} +2 -2
- package/dist/core/p-1d89fcda.entry.js +2 -0
- package/dist/core/p-1d89fcda.entry.js.map +1 -0
- package/dist/core/{p-0fad83d8.entry.js → p-266d5e13.entry.js} +2 -2
- package/dist/core/{p-0fad83d8.entry.js.map → p-266d5e13.entry.js.map} +1 -1
- package/dist/core/p-2bba11f8.entry.js +2 -0
- package/dist/core/p-2bba11f8.entry.js.map +1 -0
- package/dist/core/{p-43285eeb.entry.js → p-2f0ab1d0.entry.js} +2 -2
- package/dist/core/{p-43285eeb.entry.js.map → p-2f0ab1d0.entry.js.map} +1 -1
- package/dist/core/p-349d91dc.js +3 -0
- package/dist/core/p-349d91dc.js.map +1 -0
- package/dist/core/p-35bff926.entry.js +2 -0
- package/dist/core/p-35bff926.entry.js.map +1 -0
- package/dist/core/{p-287e5c17.entry.js → p-37d217b5.entry.js} +2 -2
- package/dist/core/{p-287e5c17.entry.js.map → p-37d217b5.entry.js.map} +1 -1
- package/dist/core/{p-df88ff5b.entry.js → p-37daa8fe.entry.js} +2 -2
- package/dist/core/{p-df88ff5b.entry.js.map → p-37daa8fe.entry.js.map} +1 -1
- package/dist/core/{p-45dd12ee.entry.js → p-4747c39f.entry.js} +2 -2
- package/dist/core/p-4747c39f.entry.js.map +1 -0
- package/dist/core/p-479e5fa2.entry.js +2 -0
- package/dist/core/p-479e5fa2.entry.js.map +1 -0
- package/dist/core/{p-ffac41d6.entry.js → p-492fcb51.entry.js} +2 -2
- package/dist/core/{p-ffac41d6.entry.js.map → p-492fcb51.entry.js.map} +1 -1
- package/dist/core/p-542ac498.js +2 -0
- package/dist/core/p-542ac498.js.map +1 -0
- package/dist/core/{p-9863a070.entry.js → p-54da2d5f.entry.js} +2 -2
- package/dist/core/{p-4bddb866.entry.js → p-553531bf.entry.js} +2 -2
- package/dist/core/{p-4bddb866.entry.js.map → p-553531bf.entry.js.map} +1 -1
- package/dist/core/{p-6e8ef73c.entry.js → p-57721431.entry.js} +2 -2
- package/dist/core/{p-6e8ef73c.entry.js.map → p-57721431.entry.js.map} +1 -1
- package/dist/core/{p-f7d746d7.entry.js → p-5d6290bb.entry.js} +2 -2
- package/dist/core/p-5d6290bb.entry.js.map +1 -0
- package/dist/core/{p-5fbc8e62.entry.js → p-5fcfcfb6.entry.js} +2 -2
- package/dist/core/{p-5fbc8e62.entry.js.map → p-5fcfcfb6.entry.js.map} +1 -1
- package/dist/core/{p-608a8a4d.entry.js → p-656b92d7.entry.js} +2 -2
- package/dist/core/{p-59048c2a.entry.js → p-6addd986.entry.js} +2 -2
- package/dist/core/p-6addd986.entry.js.map +1 -0
- package/dist/core/p-6d2fa004.entry.js +2 -0
- package/dist/core/p-6d2fa004.entry.js.map +1 -0
- package/dist/core/{p-fecef807.entry.js → p-6d4418e4.entry.js} +2 -2
- package/dist/core/{p-b87e4485.entry.js → p-6e5fc63c.entry.js} +2 -2
- package/dist/core/{p-66ae9eb3.entry.js → p-70447473.entry.js} +2 -2
- package/dist/core/{p-66ae9eb3.entry.js.map → p-70447473.entry.js.map} +1 -1
- package/dist/core/{p-aa94c4b0.entry.js → p-77c4d1d2.entry.js} +2 -2
- package/dist/core/{p-aa94c4b0.entry.js.map → p-77c4d1d2.entry.js.map} +1 -1
- package/dist/core/{p-fb8c47ce.entry.js → p-796b9ac5.entry.js} +2 -2
- package/dist/core/{p-fb8c47ce.entry.js.map → p-796b9ac5.entry.js.map} +1 -1
- package/dist/core/{p-3f241d71.entry.js → p-7986db4a.entry.js} +2 -2
- package/dist/core/{p-3f241d71.entry.js.map → p-7986db4a.entry.js.map} +1 -1
- package/dist/core/p-7bb3531c.entry.js +2 -0
- package/dist/core/p-7bb3531c.entry.js.map +1 -0
- package/dist/core/p-8a5ae4ab.entry.js +2 -0
- package/dist/core/p-8a5ae4ab.entry.js.map +1 -0
- package/dist/core/{p-2fe31f66.entry.js → p-8b4a7a78.entry.js} +2 -2
- package/dist/core/{p-2fe31f66.entry.js.map → p-8b4a7a78.entry.js.map} +1 -1
- package/dist/core/{p-f517f412.entry.js → p-8c841dc8.entry.js} +2 -2
- package/dist/core/{p-d7217588.entry.js → p-94e5ed81.entry.js} +2 -2
- package/dist/core/{p-d7217588.entry.js.map → p-94e5ed81.entry.js.map} +1 -1
- package/dist/core/{p-ea061ccf.entry.js → p-9a8bcb78.entry.js} +2 -2
- package/dist/core/{p-ea061ccf.entry.js.map → p-9a8bcb78.entry.js.map} +1 -1
- package/dist/core/p-9af5008c.entry.js +2 -0
- package/dist/core/{p-20374e30.entry.js.map → p-9af5008c.entry.js.map} +1 -1
- package/dist/core/{p-9fffb01e.entry.js → p-9b68bee6.entry.js} +2 -2
- package/dist/core/{p-8b5022bc.entry.js → p-9cf6ccfd.entry.js} +2 -2
- package/dist/core/{p-8b5022bc.entry.js.map → p-9cf6ccfd.entry.js.map} +1 -1
- package/dist/core/p-9fa329f2.entry.js +2 -0
- package/dist/core/p-9fa329f2.entry.js.map +1 -0
- package/dist/core/p-a422b778.js +2 -0
- package/dist/core/p-a422b778.js.map +1 -0
- package/dist/core/{p-9fe5e2eb.entry.js → p-a7a572d9.entry.js} +2 -2
- package/dist/core/p-a86756fa.entry.js +2 -0
- package/dist/core/p-a86756fa.entry.js.map +1 -0
- package/dist/core/{p-145c0245.entry.js → p-ac2f8cc8.entry.js} +2 -2
- package/dist/core/{p-145c0245.entry.js.map → p-ac2f8cc8.entry.js.map} +1 -1
- package/dist/core/{p-1a5efa3e.entry.js → p-b10f5992.entry.js} +2 -2
- package/dist/core/p-b2b5d4fa.entry.js +2 -0
- package/dist/core/p-b2b5d4fa.entry.js.map +1 -0
- package/dist/core/{p-999f0a5d.entry.js → p-b4a2f6fa.entry.js} +2 -2
- package/dist/core/{p-999f0a5d.entry.js.map → p-b4a2f6fa.entry.js.map} +1 -1
- package/dist/core/p-b7a726fb.entry.js +2 -0
- package/dist/core/p-b7a726fb.entry.js.map +1 -0
- package/dist/core/{p-cb4522ed.entry.js → p-ba26a1f0.entry.js} +2 -2
- package/dist/core/{p-c3fe54ab.entry.js → p-bad17ba7.entry.js} +2 -2
- package/dist/core/{p-c3fe54ab.entry.js.map → p-bad17ba7.entry.js.map} +1 -1
- package/dist/core/{p-812a0246.entry.js → p-bf08d34c.entry.js} +2 -2
- package/dist/core/{p-31d6d587.entry.js → p-bf5558ac.entry.js} +2 -2
- package/dist/core/p-bf5558ac.entry.js.map +1 -0
- package/dist/core/{p-40743d97.entry.js → p-c1ae14ad.entry.js} +2 -2
- package/dist/core/{p-40743d97.entry.js.map → p-c1ae14ad.entry.js.map} +1 -1
- package/dist/core/p-c9953122.entry.js +2 -0
- package/dist/core/p-c9953122.entry.js.map +1 -0
- package/dist/core/p-d4a1e90d.entry.js +2 -0
- package/dist/core/p-d4a1e90d.entry.js.map +1 -0
- package/dist/core/{p-5c7c7205.entry.js → p-d77981a5.entry.js} +2 -2
- package/dist/core/{p-518a8e87.entry.js → p-e0abd214.entry.js} +2 -2
- package/dist/core/p-e0abd214.entry.js.map +1 -0
- package/dist/core/{p-b8938f93.entry.js → p-e4f1d72b.entry.js} +2 -2
- package/dist/core/{p-5976d13e.entry.js → p-e8cea1d5.entry.js} +2 -2
- package/dist/core/{p-5976d13e.entry.js.map → p-e8cea1d5.entry.js.map} +1 -1
- package/dist/core/{p-b93e8ecb.entry.js → p-f591abc2.entry.js} +2 -2
- package/dist/core/p-f6209622.entry.js +2 -0
- package/dist/core/p-f6209622.entry.js.map +1 -0
- package/dist/core/p-f7b1d6bf.entry.js +2 -0
- package/dist/core/p-f7b1d6bf.entry.js.map +1 -0
- package/dist/core/{p-e543f2e7.entry.js → p-fba9f5b6.entry.js} +2 -2
- package/dist/core/{p-e543f2e7.entry.js.map → p-fba9f5b6.entry.js.map} +1 -1
- package/dist/core/{p-d13a066e.entry.js → p-ff4a873e.entry.js} +2 -2
- package/dist/core/{p-d13a066e.entry.js.map → p-ff4a873e.entry.js.map} +1 -1
- package/dist/esm/common-helpers-86c07ff1.js +19 -0
- package/dist/esm/common-helpers-86c07ff1.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-f3928d01.js → helpers-1dbd527e.js} +24 -23
- package/dist/esm/helpers-1dbd527e.js.map +1 -0
- package/dist/esm/helpers-89cb996d.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 +1 -1
- package/dist/esm/ic-alert.entry.js +2 -2
- package/dist/esm/ic-alert.entry.js.map +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 +24 -18
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +7 -4
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox_3.entry.js +41 -28
- package/dist/esm/ic-checkbox_3.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +6 -5
- package/dist/esm/ic-chip.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.entry.js +13 -13
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +7 -7
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +6 -4
- 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 +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 +28 -14
- package/dist/esm/ic-input-component-container_4.entry.js.map +1 -1
- package/dist/esm/ic-layout-grid-item.entry.js +2 -2
- package/dist/esm/ic-layout-grid-item.entry.js.map +1 -1
- package/dist/esm/ic-layout-grid.entry.js +2 -2
- package/dist/esm/ic-layout-grid.entry.js.map +1 -1
- 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-menu.entry.js +23 -7
- 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 +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 +52 -37
- 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 +14 -7
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +6 -6
- 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 +66 -54
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +20 -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 +10 -2
- 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 +1 -1
- package/dist/esm/ic-table-of-contents.entry.js +359 -0
- package/dist/esm/ic-table-of-contents.entry.js.map +1 -0
- 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 +11 -11
- package/dist/esm/ic-time-input.entry.js.map +1 -1
- 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 +3 -3
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +3 -3
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-tree-item.entry.js +2 -2
- package/dist/esm/ic-tree-view.entry.js +6 -4
- 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 +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/purify-6eaa9893.js +1363 -0
- package/dist/esm/purify-6eaa9893.js.map +1 -0
- package/dist/types/components/ic-data-table/story-data.d.ts +2 -11
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +3 -4
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.types.d.ts +4 -0
- package/dist/types/components/ic-table-of-contents/ic-table-of-contents-item.d.ts +14 -0
- package/dist/types/components/ic-table-of-contents/ic-table-of-contents.d.ts +83 -0
- package/dist/types/components/ic-table-of-contents/ic-table-of-contents.stories.d.ts +90 -0
- package/dist/types/components/ic-table-of-contents/test/a11y/ic-table-of-contents.test.a11y.d.ts +1 -0
- package/dist/types/components.d.ts +83 -6
- package/dist/types/home/runner/work/ic-ui-kit/ic-ui-kit/packages/canary-web-components/.stencil/web-components/src/utils/common-helpers.d.ts +2 -0
- package/dist/types/home/runner/work/ic-ui-kit/ic-ui-kit/packages/canary-web-components/.stencil/web-components/src/utils/constants.d.ts +44 -0
- package/dist/types/utils/types.d.ts +1 -0
- package/hydrate/index.js +2178 -313
- package/hydrate/index.mjs +2178 -313
- package/package.json +4 -4
- package/dist/cjs/helpers-56717660.js.map +0 -1
- package/dist/core/p-20374e30.entry.js +0 -2
- package/dist/core/p-2f4f4aea.entry.js +0 -2
- package/dist/core/p-2f4f4aea.entry.js.map +0 -1
- package/dist/core/p-31d6d587.entry.js.map +0 -1
- package/dist/core/p-3a73a9b7.entry.js +0 -2
- package/dist/core/p-3a73a9b7.entry.js.map +0 -1
- package/dist/core/p-45dd12ee.entry.js.map +0 -1
- package/dist/core/p-518a8e87.entry.js.map +0 -1
- package/dist/core/p-558936fb.entry.js +0 -2
- package/dist/core/p-558936fb.entry.js.map +0 -1
- package/dist/core/p-59048c2a.entry.js.map +0 -1
- package/dist/core/p-5ac30e1f.entry.js +0 -2
- package/dist/core/p-5ac30e1f.entry.js.map +0 -1
- package/dist/core/p-6796acff.entry.js +0 -2
- package/dist/core/p-6796acff.entry.js.map +0 -1
- package/dist/core/p-7d2d067f.entry.js +0 -2
- package/dist/core/p-7d2d067f.entry.js.map +0 -1
- package/dist/core/p-91646e38.entry.js +0 -2
- package/dist/core/p-91646e38.entry.js.map +0 -1
- package/dist/core/p-ad48c77c.entry.js +0 -2
- package/dist/core/p-ad48c77c.entry.js.map +0 -1
- package/dist/core/p-afece95e.entry.js +0 -2
- package/dist/core/p-afece95e.entry.js.map +0 -1
- package/dist/core/p-b0462734.entry.js +0 -2
- package/dist/core/p-b0462734.entry.js.map +0 -1
- package/dist/core/p-bc7d730d.entry.js +0 -2
- package/dist/core/p-bc7d730d.entry.js.map +0 -1
- package/dist/core/p-be5df6a9.entry.js +0 -2
- package/dist/core/p-be5df6a9.entry.js.map +0 -1
- package/dist/core/p-efa95979.js +0 -2
- package/dist/core/p-efa95979.js.map +0 -1
- package/dist/core/p-efe2fbd7.entry.js +0 -2
- package/dist/core/p-efe2fbd7.entry.js.map +0 -1
- package/dist/core/p-f3201a0b.entry.js +0 -2
- package/dist/core/p-f3201a0b.entry.js.map +0 -1
- package/dist/core/p-f7d746d7.entry.js.map +0 -1
- package/dist/esm/helpers-f3928d01.js.map +0 -1
- /package/dist/core/{p-d47e200c.entry.js.map → p-05e0cadf.entry.js.map} +0 -0
- /package/dist/core/{p-8051e61b.entry.js.map → p-07365d6f.entry.js.map} +0 -0
- /package/dist/core/{p-c067e62c.entry.js.map → p-0e882f70.entry.js.map} +0 -0
- /package/dist/core/{p-364cc350.entry.js.map → p-18b793e0.entry.js.map} +0 -0
- /package/dist/core/{p-9863a070.entry.js.map → p-54da2d5f.entry.js.map} +0 -0
- /package/dist/core/{p-608a8a4d.entry.js.map → p-656b92d7.entry.js.map} +0 -0
- /package/dist/core/{p-fecef807.entry.js.map → p-6d4418e4.entry.js.map} +0 -0
- /package/dist/core/{p-b87e4485.entry.js.map → p-6e5fc63c.entry.js.map} +0 -0
- /package/dist/core/{p-f517f412.entry.js.map → p-8c841dc8.entry.js.map} +0 -0
- /package/dist/core/{p-9fffb01e.entry.js.map → p-9b68bee6.entry.js.map} +0 -0
- /package/dist/core/{p-9fe5e2eb.entry.js.map → p-a7a572d9.entry.js.map} +0 -0
- /package/dist/core/{p-1a5efa3e.entry.js.map → p-b10f5992.entry.js.map} +0 -0
- /package/dist/core/{p-cb4522ed.entry.js.map → p-ba26a1f0.entry.js.map} +0 -0
- /package/dist/core/{p-812a0246.entry.js.map → p-bf08d34c.entry.js.map} +0 -0
- /package/dist/core/{p-5c7c7205.entry.js.map → p-d77981a5.entry.js.map} +0 -0
- /package/dist/core/{p-b8938f93.entry.js.map → p-e4f1d72b.entry.js.map} +0 -0
- /package/dist/core/{p-b93e8ecb.entry.js.map → p-f591abc2.entry.js.map} +0 -0
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import { h, r as registerInstance, H as Host, g as getElement } from './index-a7a720e7.js';
|
|
2
|
+
import { D as DEVICE_SIZES } from './helpers-89cb996d.js';
|
|
3
|
+
|
|
4
|
+
const ItemHook = () => {
|
|
5
|
+
// adds offset to the item based on its variant
|
|
6
|
+
// e.g. h2 = 4 + (8*(2-2)) = 4px
|
|
7
|
+
// h3 = 4 + (8*(3-2)) = 12px
|
|
8
|
+
const setItemLevelOffset = (variant) => {
|
|
9
|
+
return `${4 + 8 * (parseInt(variant.split("")[1]) - 2)}px`;
|
|
10
|
+
};
|
|
11
|
+
return { setItemLevelOffset };
|
|
12
|
+
};
|
|
13
|
+
const ItemComponent = (itemProps) => {
|
|
14
|
+
const { id, className, label, target, selected, truncate, variant, position, size, updateSelected, setItemLevelOffset, } = itemProps;
|
|
15
|
+
return (h("a", { id: id, onClick: () => updateSelected(position), class: `${selected && "table-of-contents-item-content-selected"}
|
|
16
|
+
${size === "large"
|
|
17
|
+
? `table-of-contents-item-content-large`
|
|
18
|
+
: `table-of-contents-item-content-default`}
|
|
19
|
+
${className}
|
|
20
|
+
`, href: `#${target}` },
|
|
21
|
+
h("ic-typography", { id: `${id}-label`, bold: selected === position, class: `${truncate && "truncated-item-text"} ${size && `table-of-contents-item-content-${size}`}
|
|
22
|
+
table-of-contents-item-label
|
|
23
|
+
`, style: {
|
|
24
|
+
paddingLeft: setItemLevelOffset(variant),
|
|
25
|
+
} }, label)));
|
|
26
|
+
};
|
|
27
|
+
const TableOfContentsItem = (props) => {
|
|
28
|
+
const innerProps = ItemHook();
|
|
29
|
+
return h(ItemComponent, Object.assign({}, props, innerProps));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const icTableOfContentsCss = ":host{display:block;border:none;max-height:100vh}.table-of-contents-section-container{display:flex}.table-of-contents-content{top:0;left:0;padding:0 var(--ic-space-md);font:var(--ic-color-text-primary);max-height:100vh;z-index:1}:host .table-of-contents-position-top{min-width:10rem;max-width:50rem}:host .table-of-contents-position-side{min-width:8rem;max-width:20rem;width:20rem;position:sticky}.table-of-contents-list{display:flex;flex-direction:row;max-width:inherit}:host ol{list-style:none;margin-block-start:0;padding-inline-start:0}.table-of-contents-list-items{display:flex;flex-direction:column;width:100%}.table-of-contents-sidebar{background-color:var(--ic-table-of-contents-banner);height:1.75rem;min-width:0.25rem}.table-of-contents-sidebar-monochrome{background-color:var(--ic-table-of-contents-banner-monochrome)}.table-of-contents-item{min-height:1.5rem;line-height:1.5rem}.table-of-contents-item-content:hover{background-color:var(--ic-table-of-contents-hover)}.table-of-contents-item-monochrome-content:hover{background-color:var(--ic-table-of-contents-hover-monochrome)}.table-of-contents-item-content{border:none;max-width:inherit;display:flex;align-items:center;text-decoration:none;position:relative;color:var(--ic-table-of-contents-text);min-height:1.5rem;--ic-typography-color:var(--ic-table-of-contents-text)}.table-of-contents-item-content-default{padding-top:var(--ic-space-xxxs);padding-bottom:var(--ic-space-xxxs)}.table-of-contents-item-content:focus{box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-transition-duration-fast);outline:none;background-color:var(--ic-table-of-contents-hover)}.table-of-contents-item-content:active{box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-transition-duration-fast);outline:none;background-color:var(--ic-table-of-contents-pressed)}.truncated-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table-of-contents-item-content-large{padding-top:var(--ic-space-xxs);padding-bottom:var(--ic-space-xxs)}.table-of-contents-sidebar.large{height:2.5rem}.table-of-contents-heading.large{padding-bottom:var(--ic-space-xs)}@media (prefers-reduced-motion: no-preference){.table-of-contents-sidebar{transition:all 0.3s ease}}@media (prefers-reduced-motion: reduce){.table-of-contents-sidebar{transition:none}}@media (forced-colors: active){.table-of-contents-sidebar{background-color:Highlight}}";
|
|
33
|
+
const IcTableOfContentsStyle0 = icTableOfContentsCss;
|
|
34
|
+
|
|
35
|
+
const TOC_CONTENT_CLASS = "table-of-contents-content";
|
|
36
|
+
const TOC_LIST_ITEMS_CLASS = "table-of-contents-list-items";
|
|
37
|
+
const TOC_ITEM_CLASS = "table-of-contents-item-content";
|
|
38
|
+
const TOC_CONTAINER_CLASS = "table-of-contents-section-container";
|
|
39
|
+
const TableOfContents = class {
|
|
40
|
+
constructor(hostRef) {
|
|
41
|
+
registerInstance(this, hostRef);
|
|
42
|
+
/**
|
|
43
|
+
* Heading text of the table of contents.
|
|
44
|
+
*/
|
|
45
|
+
this.heading = "Contents";
|
|
46
|
+
/**
|
|
47
|
+
* Maximum heading level of child content that will generate an item in the table of contents. E.g. when set to '3', headings of <h4> and <h5> will not appear.
|
|
48
|
+
*/
|
|
49
|
+
this.maximumHeadingLevel = 3;
|
|
50
|
+
/**
|
|
51
|
+
* If `true`, the table of contents will display as black in the light theme, and white in dark theme.
|
|
52
|
+
*/
|
|
53
|
+
this.monochrome = false;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the table of contents will appear on the right of or above child content on large viewport widths.
|
|
56
|
+
*/
|
|
57
|
+
this.position = "right";
|
|
58
|
+
/**
|
|
59
|
+
* Vertical offset to page scroll (in percent) when table of contents item is selected, to account for other page components like headers.
|
|
60
|
+
*/
|
|
61
|
+
this.setScrollHeight = 50;
|
|
62
|
+
/**
|
|
63
|
+
* The size of the table of contents items.
|
|
64
|
+
*/
|
|
65
|
+
this.size = "medium";
|
|
66
|
+
/**
|
|
67
|
+
* Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component.
|
|
68
|
+
*/
|
|
69
|
+
this.theme = "inherit";
|
|
70
|
+
/**
|
|
71
|
+
* If `true`, the table of contents item label will be truncated.
|
|
72
|
+
*/
|
|
73
|
+
this.truncate = true;
|
|
74
|
+
this.focusedElement = 0;
|
|
75
|
+
// heading items
|
|
76
|
+
this.referenceElements = [];
|
|
77
|
+
// heights of heading items
|
|
78
|
+
this.currentTargetHeights = [];
|
|
79
|
+
// header height if present
|
|
80
|
+
this.headerHeight = 0;
|
|
81
|
+
// holds initial position to allow for responsive changes
|
|
82
|
+
this.initialPosition = this.position;
|
|
83
|
+
// suppress scroll listener to allow for click selection without scroll listener firing
|
|
84
|
+
this.suppressListener = false;
|
|
85
|
+
/**
|
|
86
|
+
* Generate a TOC Item.
|
|
87
|
+
* These items are wrapped in empty tooltips that will be populated by addTooltip()
|
|
88
|
+
* @param tocHeading heading element to refer item information from
|
|
89
|
+
* @param children
|
|
90
|
+
* @returns TocItem ready to be rendered, with nested children if applicable
|
|
91
|
+
*/
|
|
92
|
+
this.createTocItem = (tocHeading, children) => {
|
|
93
|
+
const tocId = `toc_${tocHeading.id}`;
|
|
94
|
+
const tocItem = (h(TableOfContentsItem, { id: tocId, className: TOC_ITEM_CLASS, variant: tocHeading.tagName.toLowerCase(), label: tocHeading.textLabel, target: tocHeading.id, truncate: this.truncate, selected: this.focusedElement, updateSelected: this.updateOnSelection, position: tocHeading.trueIndex, size: this.size }));
|
|
95
|
+
const wrappedToc = this.truncate ? (h("ic-tooltip", { target: tocId, label: tocHeading.innerHTML }, tocItem)) : (tocItem);
|
|
96
|
+
return (h("li", { class: `table-of-contents-item ${this.monochrome && "table-of-contents-item-monochrome"}` }, wrappedToc, children ? h("ol", null, children) : null));
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Render TocItems and recursively render children items if they exist
|
|
100
|
+
* @param listItem
|
|
101
|
+
* @returns HTML Element array to be rendered
|
|
102
|
+
*/
|
|
103
|
+
this.renderTocTree = (listItem) => {
|
|
104
|
+
let results;
|
|
105
|
+
if (listItem.treeChildren.length > 0) {
|
|
106
|
+
const children = listItem.treeChildren.map((i) => this.renderTocTree(i));
|
|
107
|
+
results = this.createTocItem(listItem, children);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
results = this.createTocItem(listItem);
|
|
111
|
+
}
|
|
112
|
+
return results;
|
|
113
|
+
};
|
|
114
|
+
// list item clicked logic
|
|
115
|
+
this.updateOnSelection = (position) => {
|
|
116
|
+
this.suppressListener = true;
|
|
117
|
+
this.focusedElement = position;
|
|
118
|
+
this.sidebarTranslation(this.focusedElement);
|
|
119
|
+
};
|
|
120
|
+
// truncate text if it goes out of bounds of the container
|
|
121
|
+
this.truncateText = () => {
|
|
122
|
+
var _a, _b;
|
|
123
|
+
const links = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(`.${TOC_ITEM_CLASS}`);
|
|
124
|
+
const contentList = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(`.${TOC_LIST_ITEMS_CLASS}`);
|
|
125
|
+
if (contentList)
|
|
126
|
+
links === null || links === void 0 ? void 0 : links.forEach((item) => {
|
|
127
|
+
this.addTooltip(item, DEVICE_SIZES.S);
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
suppressListenerHandler() {
|
|
132
|
+
window.scrollTo(0, window.scrollY - this.headerHeight - 50);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Scrape for heading elements on the page content within TOC, down to the maximumHeadingLevel.
|
|
136
|
+
* From this, generate an array of Elements with lower rank headings inserted as treeChildren on top level headings.
|
|
137
|
+
* @returns RankedElement[] array of HTML elements with additional props for rank, trueIndex and treeChildren array
|
|
138
|
+
*/
|
|
139
|
+
generateHeadingTree() {
|
|
140
|
+
var _a;
|
|
141
|
+
const resultArray = [];
|
|
142
|
+
const headingDepth = this.maximumHeadingLevel < 5
|
|
143
|
+
? ["h2", "h3", "h4", "h5"]
|
|
144
|
+
.slice(0, (this.maximumHeadingLevel < 2 ? 2 : this.maximumHeadingLevel) - 1)
|
|
145
|
+
.join(",")
|
|
146
|
+
: "h2, h3, h4, h5";
|
|
147
|
+
const headingList = this.el.querySelectorAll(headingDepth);
|
|
148
|
+
if (headingList) {
|
|
149
|
+
const headingArray = Array.from(headingList);
|
|
150
|
+
headingArray.forEach((item, index) => {
|
|
151
|
+
this.referenceElements.push(item);
|
|
152
|
+
item.trueIndex = index;
|
|
153
|
+
item.rank = item.tagName.toLowerCase().slice(1, 2);
|
|
154
|
+
item.textLabel = item.textContent
|
|
155
|
+
? item.textContent.trimStart().split("\n")[0]
|
|
156
|
+
: `${item.rank}-${index}`;
|
|
157
|
+
item.treeChildren = [];
|
|
158
|
+
});
|
|
159
|
+
let currentRank = ((_a = headingArray[0]) === null || _a === void 0 ? void 0 : _a.rank) || 2;
|
|
160
|
+
headingArray.reverse().forEach((h, i) => {
|
|
161
|
+
if (!h.id) {
|
|
162
|
+
h.setAttribute("id", h.textLabel.replace(/\s+/g, "-").toLowerCase());
|
|
163
|
+
}
|
|
164
|
+
if (h.rank > currentRank && h.trueIndex > 0) {
|
|
165
|
+
if (headingArray[i] && headingArray[i].rank < h.rank) {
|
|
166
|
+
headingArray[i].treeChildren.unshift(h);
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
resultArray.push(h);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
currentRank = h.rank;
|
|
174
|
+
resultArray.push(h);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
return resultArray.reverse();
|
|
179
|
+
}
|
|
180
|
+
//container orientation logic
|
|
181
|
+
containerPosition() {
|
|
182
|
+
var _a;
|
|
183
|
+
if (this.position) {
|
|
184
|
+
const container = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`.${TOC_CONTAINER_CLASS}`);
|
|
185
|
+
switch (this.position) {
|
|
186
|
+
case "right":
|
|
187
|
+
container.style.flexDirection = "row-reverse";
|
|
188
|
+
break;
|
|
189
|
+
case "top":
|
|
190
|
+
container.style.flexDirection = "column";
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Move the sidebar to the provided position on the page.
|
|
197
|
+
* Also, resize the sidebar to stretch the height of the selected heading.
|
|
198
|
+
* @param newPosition
|
|
199
|
+
*/
|
|
200
|
+
sidebarTranslation(newPosition) {
|
|
201
|
+
var _a, _b, _c;
|
|
202
|
+
const sidebar = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".table-of-contents-sidebar");
|
|
203
|
+
const itemHeights = [];
|
|
204
|
+
let previousItemsHeight = 0;
|
|
205
|
+
(_c = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelectorAll(`.${TOC_ITEM_CLASS}`)) === null || _c === void 0 ? void 0 : _c.forEach((item) => {
|
|
206
|
+
if (item !== null)
|
|
207
|
+
itemHeights.push(item.offsetHeight);
|
|
208
|
+
});
|
|
209
|
+
itemHeights
|
|
210
|
+
.slice(0, newPosition)
|
|
211
|
+
.forEach((i) => (previousItemsHeight += i));
|
|
212
|
+
sidebar.style.transform = `translateY(${previousItemsHeight}px)`;
|
|
213
|
+
sidebar.style.height = `${itemHeights[newPosition]}px`;
|
|
214
|
+
}
|
|
215
|
+
// find element heights to be used to determine focused item from scroll position
|
|
216
|
+
findElementsHeights() {
|
|
217
|
+
const contentBounds = [];
|
|
218
|
+
this.referenceElements.forEach((element) => {
|
|
219
|
+
contentBounds.push(element.getBoundingClientRect().top);
|
|
220
|
+
});
|
|
221
|
+
this.currentTargetHeights = contentBounds;
|
|
222
|
+
}
|
|
223
|
+
//resize window logic
|
|
224
|
+
handleResizeBounds() {
|
|
225
|
+
if (window.innerWidth < DEVICE_SIZES.XL && this.initialPosition !== "top") {
|
|
226
|
+
this.position = "top";
|
|
227
|
+
this.containerPosition();
|
|
228
|
+
}
|
|
229
|
+
else if (window.innerWidth > DEVICE_SIZES.XL &&
|
|
230
|
+
this.position === "top" &&
|
|
231
|
+
this.initialPosition === "right") {
|
|
232
|
+
this.position = "right";
|
|
233
|
+
this.containerPosition();
|
|
234
|
+
}
|
|
235
|
+
this.findElementsHeights();
|
|
236
|
+
this.truncateText();
|
|
237
|
+
}
|
|
238
|
+
// scroll logic
|
|
239
|
+
updateSelectedItemFromScroll() {
|
|
240
|
+
const targetHeight = window.scrollY + window.innerHeight * (this.setScrollHeight / 100);
|
|
241
|
+
if (window.scrollY === 0) {
|
|
242
|
+
this.focusedElement = 0;
|
|
243
|
+
this.sidebarTranslation(this.focusedElement);
|
|
244
|
+
}
|
|
245
|
+
else if (targetHeight < this.currentTargetHeights[this.focusedElement]) {
|
|
246
|
+
const previousItems = this.currentTargetHeights.slice(0, this.focusedElement);
|
|
247
|
+
const closestItem = previousItems.reduce((newValue, curr, index) => {
|
|
248
|
+
if (Math.abs(curr - targetHeight) <
|
|
249
|
+
Math.abs(previousItems[newValue] - targetHeight))
|
|
250
|
+
return index;
|
|
251
|
+
return newValue;
|
|
252
|
+
}, 0);
|
|
253
|
+
this.focusedElement = closestItem;
|
|
254
|
+
this.sidebarTranslation(this.focusedElement);
|
|
255
|
+
}
|
|
256
|
+
else if (targetHeight > this.currentTargetHeights[this.focusedElement] &&
|
|
257
|
+
this.focusedElement !== this.currentTargetHeights.length) {
|
|
258
|
+
const relevantItems = this.currentTargetHeights.slice(this.focusedElement);
|
|
259
|
+
const closestItem = relevantItems.reduce((newValue, curr, index) => {
|
|
260
|
+
if (Math.abs(curr - targetHeight) <
|
|
261
|
+
Math.abs(relevantItems[newValue] - targetHeight) &&
|
|
262
|
+
curr < targetHeight)
|
|
263
|
+
return index;
|
|
264
|
+
return newValue;
|
|
265
|
+
}, 0);
|
|
266
|
+
if (closestItem + this.focusedElement !== this.focusedElement) {
|
|
267
|
+
this.focusedElement += closestItem;
|
|
268
|
+
this.sidebarTranslation(this.focusedElement);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
// find header element height
|
|
273
|
+
findHeaderElement() {
|
|
274
|
+
const element = document.querySelector("ic-page-header");
|
|
275
|
+
if (element) {
|
|
276
|
+
return element.clientHeight;
|
|
277
|
+
}
|
|
278
|
+
const header = document.querySelector("header");
|
|
279
|
+
if (header) {
|
|
280
|
+
return header.clientHeight;
|
|
281
|
+
}
|
|
282
|
+
return 0;
|
|
283
|
+
}
|
|
284
|
+
// add margin to the list based off the header element height
|
|
285
|
+
addListMargin() {
|
|
286
|
+
var _a;
|
|
287
|
+
const content = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`.${TOC_CONTENT_CLASS}`);
|
|
288
|
+
content === null || content === void 0 ? void 0 : content.style.setProperty("top", `${this.headerHeight}px`);
|
|
289
|
+
}
|
|
290
|
+
// add tooltip to the item if it is too wide
|
|
291
|
+
addTooltip(item, widthBreakpoint) {
|
|
292
|
+
var _a;
|
|
293
|
+
const itemLabel = item.querySelector(".table-of-contents-item-label");
|
|
294
|
+
if (((_a = item.parentNode) === null || _a === void 0 ? void 0 : _a.tagName) == "IC-TOOLTIP") {
|
|
295
|
+
const tooltip = item.parentNode;
|
|
296
|
+
if ((itemLabel === null || itemLabel === void 0 ? void 0 : itemLabel.offsetWidth) < (itemLabel === null || itemLabel === void 0 ? void 0 : itemLabel.scrollWidth)) {
|
|
297
|
+
const tooltipPosition = window.innerWidth < widthBreakpoint
|
|
298
|
+
? "bottom"
|
|
299
|
+
: this.position === "right"
|
|
300
|
+
? "left"
|
|
301
|
+
: "right";
|
|
302
|
+
//Modify the ic-tooltip wrapped around the list item
|
|
303
|
+
tooltip.setAttribute("disable-click", false);
|
|
304
|
+
tooltip.setAttribute("disable-hover", false);
|
|
305
|
+
tooltip.setAttribute("placement", tooltipPosition);
|
|
306
|
+
tooltip.setAttribute("target", item.id);
|
|
307
|
+
tooltip.setAttribute("style", "overflow:hidden");
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
//disable the tooltip if the item does not need to truncate
|
|
311
|
+
tooltip.setAttribute("disable-click", true);
|
|
312
|
+
tooltip.setAttribute("disable-hover", true);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
// initialise resize observer
|
|
317
|
+
componentWillLoad() {
|
|
318
|
+
this.resizeObserver = new ResizeObserver(() => this.handleResizeBounds());
|
|
319
|
+
this.resizeObserver.observe(this.el);
|
|
320
|
+
}
|
|
321
|
+
// initialise scroll listener
|
|
322
|
+
componentDidRender() {
|
|
323
|
+
document.addEventListener("scroll", () => {
|
|
324
|
+
if (!this.suppressListener)
|
|
325
|
+
this.updateSelectedItemFromScroll();
|
|
326
|
+
else
|
|
327
|
+
this.suppressListener = false;
|
|
328
|
+
});
|
|
329
|
+
this.containerPosition();
|
|
330
|
+
this.findElementsHeights();
|
|
331
|
+
this.sidebarTranslation(this.focusedElement);
|
|
332
|
+
}
|
|
333
|
+
// after component has loaded modify the list based of position, size and surrounding elements
|
|
334
|
+
async componentDidLoad() {
|
|
335
|
+
this.focusedElement = 0;
|
|
336
|
+
this.headerHeight = this.findHeaderElement();
|
|
337
|
+
this.addListMargin();
|
|
338
|
+
this.truncateText();
|
|
339
|
+
this.findElementsHeights();
|
|
340
|
+
this.sidebarTranslation(this.focusedElement);
|
|
341
|
+
}
|
|
342
|
+
// Component is a wrapper for page contents, and will build list from heading items
|
|
343
|
+
render() {
|
|
344
|
+
const { heading, monochrome, position, size, theme } = this;
|
|
345
|
+
return (h(Host, { key: '251846b7b12255064f6f08dc5ed373e8ccf0326b', class: { [`ic-theme-${theme}`]: theme !== "inherit" } }, h("ic-section-container", { key: '3a178d62dfe2ce56c052e18114bb2d7c3fbd47ee', class: TOC_CONTAINER_CLASS, aligned: "full-width" }, h("div", { key: '34378cb8e4ac052d1f05cdc7b61880ab866e5c30', role: "navigation", class: `${TOC_CONTENT_CLASS} ${position === "top" && "table-of-contents-position-top"}
|
|
346
|
+
${position === "right" && "table-of-contents-position-side"}` }, h("ic-typography", { key: '9c2e6cd5dcf1bdcaada2fc63035c3fbe1aff0f44', class: `table-of-contents-heading ${size}`, variant: "subtitle-large" }, heading), h("div", { key: '848fbb7b4e2923e6abc7c2b7dbe267221b0158e6', class: "table-of-contents-list" }, h("div", { key: '31324398f103b292dfdf6edec92e738fa0c49c60', class: `table-of-contents-sidebar ${monochrome && `table-of-contents-sidebar-monochrome`}
|
|
347
|
+
${size}
|
|
348
|
+
` }), h("ol", { key: 'b4cf6c02151d3257155a4b8e055df992b06e64e0', class: TOC_LIST_ITEMS_CLASS }, this.generateHeadingTree().map((item) => this.renderTocTree(item))))), h("slot", { key: '0a5e55adfd3eeb0ba3c502c8936557f1b5f8bd76' }))));
|
|
349
|
+
}
|
|
350
|
+
get el() { return getElement(this); }
|
|
351
|
+
static get watchers() { return {
|
|
352
|
+
"suppressListener": ["suppressListenerHandler"]
|
|
353
|
+
}; }
|
|
354
|
+
};
|
|
355
|
+
TableOfContents.style = IcTableOfContentsStyle0;
|
|
356
|
+
|
|
357
|
+
export { TableOfContents as ic_table_of_contents };
|
|
358
|
+
|
|
359
|
+
//# sourceMappingURL=ic-table-of-contents.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ic-table-of-contents.entry.js","mappings":";;;AA6BA,MAAM,QAAQ,GAAG;;;;IAIf,MAAM,kBAAkB,GAAG,CAAC,OAAe;QACzC,OAAO,GAAG,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;KAC5D,CAAC;IAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAChC,CAAC,CAAC;AAEF,MAAM,aAAa,GAAsD,CACvE,SAAS;IAET,MAAM,EACJ,EAAE,EACF,SAAS,EACT,KAAK,EACL,MAAM,EACN,QAAQ,EACR,QAAQ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-contents/ic-table-of-contents.css?tag=ic-table-of-contents&encapsulation=shadow","src/components/ic-table-of-contents/ic-table-of-contents.tsx"],"sourcesContent":["import { FunctionalComponent, h } from \"@stencil/core\";\n\ninterface IcTableOfContentsItemElement {\n id: string;\n className: string;\n label: string;\n target: string;\n variant: string;\n selected: number;\n position: number;\n size?: string;\n truncate?: boolean;\n updateSelected: (position: number) => void;\n setItemLevelOffset: (variant: string) => string;\n}\n\ninterface TOCItemProps {\n id: string;\n className: string;\n variant: string;\n label: string;\n target: string;\n selected: number;\n position: number;\n size?: string;\n truncate?: boolean;\n updateSelected: (position: number) => void;\n}\n\nconst ItemHook = () => {\n // adds offset to the item based on its variant\n // e.g. h2 = 4 + (8*(2-2)) = 4px\n // h3 = 4 + (8*(3-2)) = 12px\n const setItemLevelOffset = (variant: string): string => {\n return `${4 + 8 * (parseInt(variant.split(\"\")[1]) - 2)}px`;\n };\n\n return { setItemLevelOffset };\n};\n\nconst ItemComponent: FunctionalComponent<IcTableOfContentsItemElement> = (\n itemProps\n) => {\n const {\n id,\n className,\n label,\n target,\n selected,\n truncate,\n variant,\n position,\n size,\n updateSelected,\n setItemLevelOffset,\n } = itemProps;\n\n return (\n <a\n id={id}\n onClick={() => updateSelected(position)}\n class={`${selected && \"table-of-contents-item-content-selected\"}\n ${\n size === \"large\"\n ? `table-of-contents-item-content-large`\n : `table-of-contents-item-content-default`\n }\n ${className}\n `}\n href={`#${target}`}\n >\n <ic-typography\n id={`${id}-label`}\n bold={selected === position}\n class={`${truncate && \"truncated-item-text\"} ${\n size && `table-of-contents-item-content-${size}`\n }\n table-of-contents-item-label\n `}\n style={{\n paddingLeft: setItemLevelOffset(variant),\n }}\n >\n {label}\n </ic-typography>\n </a>\n );\n};\n\nexport const TableOfContentsItem = (props: TOCItemProps) => {\n const innerProps = ItemHook();\n return <ItemComponent {...props} {...innerProps} />;\n};\n",":host {\n display: block;\n border: none;\n max-height: 100vh;\n}\n\n.table-of-contents-section-container {\n display: flex;\n}\n\n.table-of-contents-content {\n top: 0;\n left: 0;\n padding: 0 var(--ic-space-md);\n font: var(--ic-color-text-primary);\n max-height: 100vh;\n z-index: 1;\n}\n\n:host .table-of-contents-position-top {\n min-width: 10rem;\n max-width: 50rem;\n}\n\n:host .table-of-contents-position-side {\n min-width: 8rem;\n max-width: 20rem;\n width: 20rem;\n position: sticky;\n}\n\n.table-of-contents-list {\n display: flex;\n flex-direction: row;\n max-width: inherit;\n}\n\n:host ol {\n list-style: none;\n margin-block-start: 0;\n padding-inline-start: 0;\n}\n\n.table-of-contents-list-items {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.table-of-contents-sidebar {\n background-color: var(--ic-table-of-contents-banner);\n height: 1.75rem;\n min-width: 0.25rem;\n}\n\n.table-of-contents-sidebar-monochrome {\n background-color: var(--ic-table-of-contents-banner-monochrome);\n}\n\n.table-of-contents-item {\n min-height: 1.5rem;\n line-height: 1.5rem;\n}\n\n.table-of-contents-item-content:hover {\n background-color: var(--ic-table-of-contents-hover);\n}\n\n.table-of-contents-item-monochrome-content:hover {\n background-color: var(--ic-table-of-contents-hover-monochrome);\n}\n\n.table-of-contents-item-content {\n border: none;\n max-width: inherit;\n display: flex;\n align-items: center;\n text-decoration: none;\n position: relative;\n color: var(--ic-table-of-contents-text);\n min-height: 1.5rem;\n\n --ic-typography-color: var(--ic-table-of-contents-text);\n}\n\n.table-of-contents-item-content-default {\n padding-top: var(--ic-space-xxxs);\n padding-bottom: var(--ic-space-xxxs);\n}\n\n.table-of-contents-item-content:focus {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-transition-duration-fast);\n outline: none;\n background-color: var(--ic-table-of-contents-hover);\n}\n\n.table-of-contents-item-content:active {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-transition-duration-fast);\n outline: none;\n background-color: var(--ic-table-of-contents-pressed);\n}\n\n.truncated-item-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Large styles */\n\n.table-of-contents-item-content-large {\n padding-top: var(--ic-space-xxs);\n padding-bottom: var(--ic-space-xxs);\n}\n\n.table-of-contents-sidebar.large {\n height: 2.5rem;\n}\n\n.table-of-contents-heading.large {\n padding-bottom: var(--ic-space-xs);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .table-of-contents-sidebar {\n transition: all 0.3s ease;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n /* limit sidebar scroll animation */\n .table-of-contents-sidebar {\n transition: none;\n }\n}\n\n@media (forced-colors: active) {\n .table-of-contents-sidebar {\n background-color: Highlight;\n }\n}\n","import { Component, Element, h, Host, Prop, State, Watch } from \"@stencil/core\";\nimport { IcPositionTopOrRight, IcSizes, IcThemeMode } from \"../../utils/types\";\nimport { TableOfContentsItem } from \"./ic-table-of-contents-item\";\nimport { DEVICE_SIZES } from \"../../utils/helpers\";\n\nconst TOC_CONTENT_CLASS = \"table-of-contents-content\";\nconst TOC_LIST_ITEMS_CLASS = \"table-of-contents-list-items\";\nconst TOC_ITEM_CLASS = \"table-of-contents-item-content\";\nconst TOC_CONTAINER_CLASS = \"table-of-contents-section-container\";\n\ninterface RankedElement extends Element {\n rank: string;\n textLabel: string;\n treeChildren: RankedElement[];\n trueIndex: number;\n}\n\n@Component({\n tag: \"ic-table-of-contents\",\n styleUrl: \"ic-table-of-contents.css\",\n shadow: true,\n})\nexport class TableOfContents {\n @Element() el: HTMLIcTableOfContentsElement;\n\n /**\n * Heading text of the table of contents.\n */\n @Prop() heading: string = \"Contents\";\n\n /**\n * Maximum heading level of child content that will generate an item in the table of contents. E.g. when set to '3', headings of <h4> and <h5> will not appear.\n */\n @Prop() maximumHeadingLevel: number = 3;\n\n /**\n * If `true`, the table of contents will display as black in the light theme, and white in dark theme.\n */\n @Prop() monochrome?: boolean = false;\n\n /**\n * Whether the table of contents will appear on the right of or above child content on large viewport widths.\n */\n @Prop({ mutable: true }) position: IcPositionTopOrRight = \"right\";\n\n /**\n * Vertical offset to page scroll (in percent) when table of contents item is selected, to account for other page components like headers.\n */\n @Prop() setScrollHeight: number = 50;\n\n /**\n * The size of the table of contents items.\n */\n @Prop() size: IcSizes = \"medium\";\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * If `true`, the table of contents item label will be truncated.\n */\n @Prop() truncate: boolean = true;\n\n @State() focusedElement: number = 0;\n\n // heading items\n private referenceElements: HTMLElement[] = [];\n\n // heights of heading items\n private currentTargetHeights: number[] = [];\n\n private resizeObserver: ResizeObserver;\n // header height if present\n private headerHeight: number = 0;\n // holds initial position to allow for responsive changes\n private initialPosition: IcPositionTopOrRight = this.position;\n\n // suppress scroll listener to allow for click selection without scroll listener firing\n @State() suppressListener: boolean = false;\n\n @Watch(\"suppressListener\")\n suppressListenerHandler(): void {\n window.scrollTo(0, window.scrollY - this.headerHeight - 50);\n }\n\n /**\n * Generate a TOC Item.\n * These items are wrapped in empty tooltips that will be populated by addTooltip()\n * @param tocHeading heading element to refer item information from\n * @param children\n * @returns TocItem ready to be rendered, with nested children if applicable\n */\n private createTocItem = (\n tocHeading: RankedElement,\n children?: HTMLElement[]\n ): HTMLElement => {\n const tocId = `toc_${tocHeading.id}`;\n\n const tocItem = (\n <TableOfContentsItem\n id={tocId}\n className={TOC_ITEM_CLASS}\n variant={tocHeading.tagName.toLowerCase()}\n label={tocHeading.textLabel}\n target={tocHeading.id}\n truncate={this.truncate}\n selected={this.focusedElement}\n updateSelected={this.updateOnSelection}\n position={tocHeading.trueIndex}\n size={this.size}\n />\n );\n\n const wrappedToc = this.truncate ? (\n <ic-tooltip target={tocId} label={tocHeading.innerHTML}>\n {tocItem}\n </ic-tooltip>\n ) : (\n tocItem\n );\n return (\n <li\n class={`table-of-contents-item ${\n this.monochrome && \"table-of-contents-item-monochrome\"\n }`}\n >\n {wrappedToc}\n {children ? <ol>{children}</ol> : null}\n </li>\n );\n };\n\n /**\n * Render TocItems and recursively render children items if they exist\n * @param listItem\n * @returns HTML Element array to be rendered\n */\n private renderTocTree = (listItem: RankedElement): HTMLElement => {\n let results;\n if (listItem.treeChildren.length > 0) {\n const children = listItem.treeChildren.map((i) => this.renderTocTree(i));\n results = this.createTocItem(listItem, children);\n } else {\n results = this.createTocItem(listItem);\n }\n return results;\n };\n\n /**\n * Scrape for heading elements on the page content within TOC, down to the maximumHeadingLevel.\n * From this, generate an array of Elements with lower rank headings inserted as treeChildren on top level headings.\n * @returns RankedElement[] array of HTML elements with additional props for rank, trueIndex and treeChildren array\n */\n private generateHeadingTree(): RankedElement[] {\n const resultArray: RankedElement[] = [];\n\n const headingDepth =\n this.maximumHeadingLevel < 5\n ? [\"h2\", \"h3\", \"h4\", \"h5\"]\n .slice(\n 0,\n (this.maximumHeadingLevel < 2 ? 2 : this.maximumHeadingLevel) - 1\n )\n .join(\",\")\n : \"h2, h3, h4, h5\";\n const headingList = this.el.querySelectorAll(headingDepth);\n\n if (headingList) {\n const headingArray = Array.from(headingList) as RankedElement[];\n headingArray.forEach((item, index) => {\n this.referenceElements.push(item as unknown as HTMLElement);\n item.trueIndex = index;\n item.rank = item.tagName.toLowerCase().slice(1, 2);\n item.textLabel = item.textContent\n ? item.textContent.trimStart().split(\"\\n\")[0]\n : `${item.rank}-${index}`;\n item.treeChildren = [];\n });\n\n let currentRank = headingArray[0]?.rank || 2;\n\n headingArray.reverse().forEach((h, i) => {\n if (!h.id) {\n h.setAttribute(\"id\", h.textLabel.replace(/\\s+/g, \"-\").toLowerCase());\n }\n if (h.rank > currentRank && h.trueIndex > 0) {\n if (headingArray[i] && headingArray[i].rank < h.rank) {\n headingArray[i].treeChildren.unshift(h);\n } else {\n resultArray.push(h);\n }\n } else {\n currentRank = h.rank;\n resultArray.push(h);\n }\n });\n }\n return resultArray.reverse();\n }\n\n //container orientation logic\n private containerPosition(): void {\n if (this.position) {\n const container = this.el.shadowRoot?.querySelector(\n `.${TOC_CONTAINER_CLASS}`\n ) as HTMLIcSectionContainerElement;\n switch (this.position) {\n case \"right\":\n container.style.flexDirection = \"row-reverse\";\n break;\n case \"top\":\n container.style.flexDirection = \"column\";\n break;\n }\n }\n }\n\n /**\n * Move the sidebar to the provided position on the page.\n * Also, resize the sidebar to stretch the height of the selected heading.\n * @param newPosition\n */\n private sidebarTranslation(newPosition: number): void {\n const sidebar = this.el.shadowRoot?.querySelector(\n \".table-of-contents-sidebar\"\n ) as HTMLIcSectionContainerElement;\n\n const itemHeights: number[] = [];\n let previousItemsHeight = 0;\n this.el.shadowRoot\n ?.querySelectorAll(`.${TOC_ITEM_CLASS}`)\n ?.forEach((item: any) => {\n if (item !== null) itemHeights.push(item.offsetHeight);\n });\n itemHeights\n .slice(0, newPosition)\n .forEach((i) => (previousItemsHeight += i));\n\n sidebar.style.transform = `translateY(${previousItemsHeight}px)`;\n sidebar.style.height = `${itemHeights[newPosition]}px`;\n }\n\n // list item clicked logic\n private updateOnSelection = (position: number) => {\n this.suppressListener = true;\n this.focusedElement = position;\n this.sidebarTranslation(this.focusedElement);\n };\n\n // find element heights to be used to determine focused item from scroll position\n private findElementsHeights() {\n const contentBounds: number[] = [];\n this.referenceElements.forEach((element) => {\n contentBounds.push(element.getBoundingClientRect().top);\n });\n this.currentTargetHeights = contentBounds;\n }\n\n //resize window logic\n private handleResizeBounds() {\n if (window.innerWidth < DEVICE_SIZES.XL && this.initialPosition !== \"top\") {\n this.position = \"top\";\n this.containerPosition();\n } else if (\n window.innerWidth > DEVICE_SIZES.XL &&\n this.position === \"top\" &&\n this.initialPosition === \"right\"\n ) {\n this.position = \"right\";\n this.containerPosition();\n }\n this.findElementsHeights();\n this.truncateText();\n }\n\n // scroll logic\n private updateSelectedItemFromScroll() {\n const targetHeight =\n window.scrollY + window.innerHeight * (this.setScrollHeight / 100);\n if (window.scrollY === 0) {\n this.focusedElement = 0;\n this.sidebarTranslation(this.focusedElement);\n } else if (targetHeight < this.currentTargetHeights[this.focusedElement]) {\n const previousItems = this.currentTargetHeights.slice(\n 0,\n this.focusedElement\n );\n const closestItem = previousItems.reduce((newValue, curr, index) => {\n if (\n Math.abs(curr - targetHeight) <\n Math.abs(previousItems[newValue] - targetHeight)\n )\n return index;\n return newValue;\n }, 0);\n this.focusedElement = closestItem;\n this.sidebarTranslation(this.focusedElement);\n } else if (\n targetHeight > this.currentTargetHeights[this.focusedElement] &&\n this.focusedElement !== this.currentTargetHeights.length\n ) {\n const relevantItems = this.currentTargetHeights.slice(\n this.focusedElement\n );\n\n const closestItem = relevantItems.reduce((newValue, curr, index) => {\n if (\n Math.abs(curr - targetHeight) <\n Math.abs(relevantItems[newValue] - targetHeight) &&\n curr < targetHeight\n )\n return index;\n return newValue;\n }, 0);\n if (closestItem + this.focusedElement !== this.focusedElement) {\n this.focusedElement += closestItem;\n this.sidebarTranslation(this.focusedElement);\n }\n }\n }\n\n // find header element height\n private findHeaderElement(): number {\n const element = document.querySelector(\"ic-page-header\");\n if (element) {\n return element.clientHeight;\n }\n const header = document.querySelector(\"header\");\n if (header) {\n return header.clientHeight;\n }\n return 0;\n }\n\n // add margin to the list based off the header element height\n private addListMargin(): void {\n const content = this.el.shadowRoot?.querySelector(\n `.${TOC_CONTENT_CLASS}`\n ) as HTMLDivElement;\n content?.style.setProperty(\"top\", `${this.headerHeight}px`);\n }\n\n // add tooltip to the item if it is too wide\n private addTooltip(item: any, widthBreakpoint: number) {\n const itemLabel = item.querySelector(\".table-of-contents-item-label\");\n if (item.parentNode?.tagName == \"IC-TOOLTIP\") {\n const tooltip = item.parentNode;\n if (itemLabel?.offsetWidth < itemLabel?.scrollWidth) {\n const tooltipPosition =\n window.innerWidth < widthBreakpoint\n ? \"bottom\"\n : this.position === \"right\"\n ? \"left\"\n : \"right\";\n //Modify the ic-tooltip wrapped around the list item\n tooltip.setAttribute(\"disable-click\", false);\n tooltip.setAttribute(\"disable-hover\", false);\n tooltip.setAttribute(\"placement\", tooltipPosition);\n tooltip.setAttribute(\"target\", item.id);\n tooltip.setAttribute(\"style\", \"overflow:hidden\");\n } else {\n //disable the tooltip if the item does not need to truncate\n tooltip.setAttribute(\"disable-click\", true);\n tooltip.setAttribute(\"disable-hover\", true);\n }\n }\n }\n\n // truncate text if it goes out of bounds of the container\n private truncateText = () => {\n const links = this.el.shadowRoot?.querySelectorAll(`.${TOC_ITEM_CLASS}`);\n const contentList = this.el.shadowRoot?.querySelector(\n `.${TOC_LIST_ITEMS_CLASS}`\n );\n if (contentList)\n links?.forEach((item) => {\n this.addTooltip(item, DEVICE_SIZES.S);\n });\n };\n\n // initialise resize observer\n componentWillLoad(): void {\n this.resizeObserver = new ResizeObserver(() => this.handleResizeBounds());\n this.resizeObserver.observe(this.el);\n }\n\n // initialise scroll listener\n componentDidRender(): void {\n document.addEventListener(\"scroll\", () => {\n if (!this.suppressListener) this.updateSelectedItemFromScroll();\n else this.suppressListener = false;\n });\n this.containerPosition();\n this.findElementsHeights();\n this.sidebarTranslation(this.focusedElement);\n }\n\n // after component has loaded modify the list based of position, size and surrounding elements\n async componentDidLoad(): Promise<void> {\n this.focusedElement = 0;\n this.headerHeight = this.findHeaderElement();\n this.addListMargin();\n this.truncateText();\n this.findElementsHeights();\n this.sidebarTranslation(this.focusedElement);\n }\n\n // Component is a wrapper for page contents, and will build list from heading items\n render() {\n const { heading, monochrome, position, size, theme } = this;\n return (\n <Host class={{ [`ic-theme-${theme}`]: theme !== \"inherit\" }}>\n <ic-section-container class={TOC_CONTAINER_CLASS} aligned=\"full-width\">\n <div\n role=\"navigation\"\n class={`${TOC_CONTENT_CLASS} ${\n position === \"top\" && \"table-of-contents-position-top\"\n }\n ${position === \"right\" && \"table-of-contents-position-side\"}`}\n >\n <ic-typography\n class={`table-of-contents-heading ${size}`}\n variant=\"subtitle-large\"\n >\n {heading}\n </ic-typography>\n <div class=\"table-of-contents-list\">\n <div\n class={`table-of-contents-sidebar ${\n monochrome && `table-of-contents-sidebar-monochrome`\n }\n ${size}\n `}\n />\n <ol class={TOC_LIST_ITEMS_CLASS}>\n {this.generateHeadingTree().map((item) =>\n this.renderTocTree(item)\n )}\n </ol>\n </div>\n </div>\n <slot></slot>\n </ic-section-container>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-a7a720e7.js';
|
|
2
|
-
import { H as getBrandColorBrightness, J as BLACK_MIN_COLOR_BRIGHTNESS, W as WHITE_MAX_COLOR_BRIGHTNESS, d as convertToRGBA, g as getBrandForegroundAppearance } from './helpers-
|
|
2
|
+
import { H as getBrandColorBrightness, J as BLACK_MIN_COLOR_BRIGHTNESS, W as WHITE_MAX_COLOR_BRIGHTNESS, d as convertToRGBA, g as getBrandForegroundAppearance } from './helpers-1dbd527e.js';
|
|
3
3
|
|
|
4
4
|
const Theme = class {
|
|
5
5
|
constructor(hostRef) {
|
|
@@ -67,7 +67,7 @@ const Theme = class {
|
|
|
67
67
|
}
|
|
68
68
|
render() {
|
|
69
69
|
const { themeClass } = this;
|
|
70
|
-
return (h(Host, { key: '
|
|
70
|
+
return (h(Host, { key: '5acfd70fc7d5cec478027487b121829ad9258623', class: themeClass }, h("slot", { key: '962d9fdd42ceb26a48c49a06aa3df3cb13bb9157' })));
|
|
71
71
|
}
|
|
72
72
|
static get watchers() { return {
|
|
73
73
|
"brandColor": ["watchBrandColorPropHandler"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"ic-theme.entry.js","mappings":";;;MAIa,KAAK;IACd;;;;QACI,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;;;;QAIrB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;;;;QAIvB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;QACrB,IAAI,CAAC,qBAAqB,GAAG;YACzB,IAAI,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE;gBACzB,IAAI,CAAC,UAAU;oBACX,MAAM,CAAC,UAAU;wBACb,MAAM,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BAA0B;QACtB,IAAI,CAAC,aAAa,EAAE,CAAC;KACxB;IACD,qBAAqB;QACjB,IAAI,CAAC,qBAAqB,EAAE,CAAC;KAChC;IACD,iBAAiB;QACb,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC7B,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,MAAM,CAAC,UAAU;YACb,MAAM;iBACD,UAAU,CAAC,8BAA8B,CAAC;iBAC1C,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;KACnE;IACD,MAAM;QACF,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAC5B,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,0CAA0C,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,0CAA0C,EAAE,CAAC,CAAC,EAAE;KAC5J;;;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-theme/ic-theme.js"],"sourcesContent":["import { Host, h, } from \"@stencil/core\";\nimport { convertToRGBA, getBrandForegroundAppearance, } from \"../../utils/helpers\";\nimport { getBrandColorBrightness } from \"../../utils/helpers\";\nimport { BLACK_MIN_COLOR_BRIGHTNESS, WHITE_MAX_COLOR_BRIGHTNESS, } from \"../../utils/constants\";\nexport class Theme {\n constructor() {\n this.themeClass = \"\";\n /**\n * The brand colour. Can be a hex value e.g. \"#ff0000\", RGB e.g. \"rgb(255, 0, 0)\", or RGBA e.g. \"rgba(255, 0, 0, 1)\".\n */\n this.brandColor = null;\n /**\n * The theme mode. Can be \"dark\", \"light\", or \"system\". \"system\" will use the device or browser settings.\n */\n this.theme = \"light\";\n this.darkModeChangeHandler = () => {\n if (this.theme === \"system\") {\n this.themeClass =\n window.matchMedia &&\n window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n ? \"ic-theme-dark\"\n : \"ic-theme-light\";\n }\n else {\n this.themeClass = `ic-theme-${this.theme}`;\n }\n this.icThemeChange.emit(this.theme);\n };\n this.checkBrandColorContrast = () => {\n if (getBrandColorBrightness() < BLACK_MIN_COLOR_BRIGHTNESS &&\n getBrandColorBrightness() > WHITE_MAX_COLOR_BRIGHTNESS) {\n console.warn(`The brand colour does not provide enough contrast with either of the ICDS black or white foreground colours. Consider choosing a colour with a different brightness to achieve sufficient colour contrast for good visibility. See https://www.w3.org/TR/AERT/#color-contrast for more information about colour contrast.`);\n }\n };\n this.setBrandColor = () => {\n const colorRGBA = this.brandColor ? convertToRGBA(this.brandColor) : null;\n if (colorRGBA) {\n const { r, g, b, a } = colorRGBA;\n const { style } = document.documentElement;\n style.setProperty(\"--ic-brand-color-primary-r\", `${r}`);\n style.setProperty(\"--ic-brand-color-primary-g\", `${g}`);\n style.setProperty(\"--ic-brand-color-primary-b\", `${b}`);\n style.setProperty(\"--ic-brand-color-primary-a\", `${a}`);\n this.checkBrandColorContrast();\n this.brandChange.emit({\n mode: getBrandForegroundAppearance(),\n color: colorRGBA,\n });\n }\n };\n }\n watchBrandColorPropHandler() {\n this.setBrandColor();\n }\n watchThemePropHandler() {\n this.darkModeChangeHandler();\n }\n componentWillLoad() {\n this.darkModeChangeHandler();\n this.setBrandColor();\n window.matchMedia &&\n window\n .matchMedia(\"(prefers-color-scheme: dark)\")\n .addEventListener(\"change\", this.darkModeChangeHandler);\n }\n render() {\n const { themeClass } = this;\n return (h(Host, { key: 'ee89cdd36cb4cb7e0589dfea2dd5a60b5de40041', class: themeClass }, h(\"slot\", { key: 'e7803bf5fc0974bfcf9a2a52cb5870254453a1bd' })));\n }\n static get is() { return \"ic-theme\"; }\n static get properties() {\n return {\n \"brandColor\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcColor | null\",\n \"resolved\": \"`#${string}` | `rgb(${string})` | `rgba(${string})` | null | undefined\",\n \"references\": {\n \"IcColor\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcColor\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The brand colour. Can be a hex value e.g. \\\"#ff0000\\\", RGB e.g. \\\"rgb(255, 0, 0)\\\", or RGBA e.g. \\\"rgba(255, 0, 0, 1)\\\".\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"brand-color\",\n \"reflect\": false,\n \"defaultValue\": \"null\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeSettings\",\n \"resolved\": \"\\\"dark\\\" | \\\"light\\\" | \\\"system\\\" | undefined\",\n \"references\": {\n \"IcThemeSettings\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeSettings\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The theme mode. Can be \\\"dark\\\", \\\"light\\\", or \\\"system\\\". \\\"system\\\" will use the device or browser settings.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"light\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"themeClass\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"brandChange\",\n \"name\": \"brandChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when the brand color is changed.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcBrand\",\n \"resolved\": \"{ mode: IcBrandForeground; color: IcColorRGB; }\",\n \"references\": {\n \"IcBrand\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcBrand\"\n }\n }\n }\n }, {\n \"method\": \"icThemeChange\",\n \"name\": \"icThemeChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the theme is changed.\"\n },\n \"complexType\": {\n \"original\": \"IcThemeSettings\",\n \"resolved\": \"\\\"dark\\\" | \\\"light\\\" | \\\"system\\\"\",\n \"references\": {\n \"IcThemeSettings\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeSettings\"\n }\n }\n }\n }];\n }\n static get watchers() {\n return [{\n \"propName\": \"brandColor\",\n \"methodName\": \"watchBrandColorPropHandler\"\n }, {\n \"propName\": \"theme\",\n \"methodName\": \"watchThemePropHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-theme.js.map\n"],"version":3}
|
|
1
|
+
{"file":"ic-theme.entry.js","mappings":";;;MAIa,KAAK;IACd;;;;QACI,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;;;;QAIrB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;;;;QAIvB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;QACrB,IAAI,CAAC,qBAAqB,GAAG;YACzB,IAAI,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE;gBACzB,IAAI,CAAC,UAAU;oBACX,MAAM,CAAC,UAAU;wBACb,MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC,OAAO;0BACvD,eAAe;0BACf,gBAAgB,CAAC;aAC9B;iBACI;gBACD,IAAI,CAAC,UAAU,GAAG,YAAY,IAAI,CAAC,KAAK,EAAE,CAAC;aAC9C;YACD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACvC,CAAC;QACF,IAAI,CAAC,uBAAuB,GAAG;YAC3B,IAAI,uBAAuB,EAAE,GAAG,0BAA0B;gBACtD,uBAAuB,EAAE,GAAG,0BAA0B,EAAE;gBACxD,OAAO,CAAC,IAAI,CAAC,2TAA2T,CAAC,CAAC;aAC7U;SACJ,CAAC;QACF,IAAI,CAAC,aAAa,GAAG;YACjB,MAAM,SAAS,GAAG,IAAI,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E,CAAC,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,0CAA0C,EAAE,CAAC,CAAC,EAAE;KAC5J;;;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-theme/ic-theme.js"],"sourcesContent":["import { Host, h, } from \"@stencil/core\";\nimport { convertToRGBA, getBrandForegroundAppearance, } from \"../../utils/helpers\";\nimport { getBrandColorBrightness } from \"../../utils/helpers\";\nimport { BLACK_MIN_COLOR_BRIGHTNESS, WHITE_MAX_COLOR_BRIGHTNESS, } from \"../../utils/constants\";\nexport class Theme {\n constructor() {\n this.themeClass = \"\";\n /**\n * The brand colour. Can be a hex value e.g. \"#ff0000\", RGB e.g. \"rgb(255, 0, 0)\", or RGBA e.g. \"rgba(255, 0, 0, 1)\".\n */\n this.brandColor = null;\n /**\n * The theme mode. Can be \"dark\", \"light\", or \"system\". \"system\" will use the device or browser settings.\n */\n this.theme = \"light\";\n this.darkModeChangeHandler = () => {\n if (this.theme === \"system\") {\n this.themeClass =\n window.matchMedia &&\n window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n ? \"ic-theme-dark\"\n : \"ic-theme-light\";\n }\n else {\n this.themeClass = `ic-theme-${this.theme}`;\n }\n this.icThemeChange.emit(this.theme);\n };\n this.checkBrandColorContrast = () => {\n if (getBrandColorBrightness() < BLACK_MIN_COLOR_BRIGHTNESS &&\n getBrandColorBrightness() > WHITE_MAX_COLOR_BRIGHTNESS) {\n console.warn(`The brand colour does not provide enough contrast with either of the ICDS black or white foreground colours. Consider choosing a colour with a different brightness to achieve sufficient colour contrast for good visibility. See https://www.w3.org/TR/AERT/#color-contrast for more information about colour contrast.`);\n }\n };\n this.setBrandColor = () => {\n const colorRGBA = this.brandColor ? convertToRGBA(this.brandColor) : null;\n if (colorRGBA) {\n const { r, g, b, a } = colorRGBA;\n const { style } = document.documentElement;\n style.setProperty(\"--ic-brand-color-primary-r\", `${r}`);\n style.setProperty(\"--ic-brand-color-primary-g\", `${g}`);\n style.setProperty(\"--ic-brand-color-primary-b\", `${b}`);\n style.setProperty(\"--ic-brand-color-primary-a\", `${a}`);\n this.checkBrandColorContrast();\n this.brandChange.emit({\n mode: getBrandForegroundAppearance(),\n color: colorRGBA,\n });\n }\n };\n }\n watchBrandColorPropHandler() {\n this.setBrandColor();\n }\n watchThemePropHandler() {\n this.darkModeChangeHandler();\n }\n componentWillLoad() {\n this.darkModeChangeHandler();\n this.setBrandColor();\n window.matchMedia &&\n window\n .matchMedia(\"(prefers-color-scheme: dark)\")\n .addEventListener(\"change\", this.darkModeChangeHandler);\n }\n render() {\n const { themeClass } = this;\n return (h(Host, { key: '5acfd70fc7d5cec478027487b121829ad9258623', class: themeClass }, h(\"slot\", { key: '962d9fdd42ceb26a48c49a06aa3df3cb13bb9157' })));\n }\n static get is() { return \"ic-theme\"; }\n static get properties() {\n return {\n \"brandColor\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcColor | null\",\n \"resolved\": \"`#${string}` | `rgb(${string})` | `rgba(${string})` | null | undefined\",\n \"references\": {\n \"IcColor\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcColor\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The brand colour. Can be a hex value e.g. \\\"#ff0000\\\", RGB e.g. \\\"rgb(255, 0, 0)\\\", or RGBA e.g. \\\"rgba(255, 0, 0, 1)\\\".\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"brand-color\",\n \"reflect\": false,\n \"defaultValue\": \"null\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeSettings\",\n \"resolved\": \"\\\"dark\\\" | \\\"light\\\" | \\\"system\\\" | undefined\",\n \"references\": {\n \"IcThemeSettings\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeSettings\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The theme mode. Can be \\\"dark\\\", \\\"light\\\", or \\\"system\\\". \\\"system\\\" will use the device or browser settings.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"light\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"themeClass\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"brandChange\",\n \"name\": \"brandChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when the brand color is changed.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcBrand\",\n \"resolved\": \"{ mode: IcBrandForeground; color: IcColorRGB; }\",\n \"references\": {\n \"IcBrand\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcBrand\"\n }\n }\n }\n }, {\n \"method\": \"icThemeChange\",\n \"name\": \"icThemeChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the theme is changed.\"\n },\n \"complexType\": {\n \"original\": \"IcThemeSettings\",\n \"resolved\": \"\\\"dark\\\" | \\\"light\\\" | \\\"system\\\"\",\n \"references\": {\n \"IcThemeSettings\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeSettings\"\n }\n }\n }\n }];\n }\n static get watchers() {\n return [{\n \"propName\": \"brandColor\",\n \"methodName\": \"watchBrandColorPropHandler\"\n }, {\n \"propName\": \"theme\",\n \"methodName\": \"watchThemePropHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-theme.js.map\n"],"version":3}
|
|
@@ -4,7 +4,7 @@ import { C as Clear } from './clear-icon-1c79bda2.js';
|
|
|
4
4
|
|
|
5
5
|
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>`;
|
|
6
6
|
|
|
7
|
-
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:
|
|
7
|
+
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}}";
|
|
8
8
|
const IcTimeInputStyle0 = icTimeInputCss;
|
|
9
9
|
|
|
10
10
|
let inputIds = 0;
|
|
@@ -147,7 +147,7 @@ const TimeInput = class {
|
|
|
147
147
|
};
|
|
148
148
|
this.setTimeValidity = () => {
|
|
149
149
|
const minHour = 0;
|
|
150
|
-
const maxHour = this.timePeriod === "12" ?
|
|
150
|
+
const maxHour = this.timePeriod === "12" ? 12 : 23;
|
|
151
151
|
if (!isEmptyString(this.hour)) {
|
|
152
152
|
this.isValidHour = +this.hour >= minHour && +this.hour <= maxHour;
|
|
153
153
|
}
|
|
@@ -379,8 +379,8 @@ const TimeInput = class {
|
|
|
379
379
|
let minValue = 0;
|
|
380
380
|
let maxValue = 59;
|
|
381
381
|
if (input === this.hourInputEl) {
|
|
382
|
-
minValue = 0;
|
|
383
|
-
maxValue = this.timePeriod === "12" ?
|
|
382
|
+
minValue = this.timePeriod === "12" ? 1 : 0;
|
|
383
|
+
maxValue = this.timePeriod === "12" ? 12 : 23;
|
|
384
384
|
}
|
|
385
385
|
let val = +input.value;
|
|
386
386
|
if (event.key === "ArrowUp") {
|
|
@@ -672,12 +672,12 @@ const TimeInput = class {
|
|
|
672
672
|
return timeParts.map((part) => {
|
|
673
673
|
switch (part.substring(0, 1)) {
|
|
674
674
|
case "H":
|
|
675
|
-
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) }));
|
|
675
|
+
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) }));
|
|
676
676
|
case "M":
|
|
677
|
-
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) }));
|
|
677
|
+
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) }));
|
|
678
678
|
case "S":
|
|
679
679
|
if (!this.isHHMMFormat()) {
|
|
680
|
-
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) }));
|
|
680
|
+
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) }));
|
|
681
681
|
}
|
|
682
682
|
return null;
|
|
683
683
|
default:
|
|
@@ -902,23 +902,23 @@ const TimeInput = class {
|
|
|
902
902
|
!(isEmptyString(this.hour) &&
|
|
903
903
|
isEmptyString(this.minute) &&
|
|
904
904
|
isEmptyString(this.second)));
|
|
905
|
-
return (h(Host, { key: '
|
|
905
|
+
return (h(Host, { key: 'a7604eeee0b3fbc569bf9dd8dde0985ca1d959ac', class: {
|
|
906
906
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
907
907
|
[`ic-time-input-disabled`]: disabled,
|
|
908
908
|
[`ic-time-input-${size}`]: true,
|
|
909
|
-
}, onBlur: this.handleHostBlur, onFocus: this.handleHostFocus }, h("ic-input-container", { key: '
|
|
909
|
+
}, onBlur: this.handleHostBlur, onFocus: this.handleHostFocus }, h("ic-input-container", { key: '9caf38fa248baa68cb63412469c808a5b9930b91', disabled: disabled }, !(hideLabel && hideHelperText) && (h("ic-input-label", { key: '14befa869df3cbeaf837f955d8094e90e8e95e26', for: inputId, label: label, hideLabel: hideLabel, helperText: !hideHelperText ? helperText : "", disabled: disabled }, h("slot", { key: 'a61c2058d17a901815692eeb2990dcba1ae9928a', name: "helper-text", slot: "helper-text" }))), h("span", { key: 'e5bb9bd6404b69e81ce030df1b06628adde559a0', id: this.screenReaderInfoId, class: "sr-only", "aria-hidden": "true" }, this.getScreenReaderInfo(validationStatus), hideLabel && `${label}\n`, hideHelperText && `${helperText}\n`, `${this.defaultHelperText}.`), h("span", { key: '047a67f53e98a368730bec49b6575d85ad8333ce', id: this.assistiveHintId, class: "sr-only", "aria-hidden": "true" }, assistiveHint), h("span", { key: 'bb77df1421d9dd8a3bf8389adcd31d5b8e65784c', id: "live-region", "aria-live": "assertive", class: "sr-only" }), h("ic-input-component-container", { key: '12ae117fc0956a5896a65b96f7cfdb5b2b7cdb44', id: inputId, ref: (el) => (this.inputCompContainerEl = el), disabled: disabled, validationStatus: validationStatus, size: size, role: "group", class: { [`ic-theme-${theme}`]: theme !== "inherit" } }, h("div", { key: 'efb28f6dda4ad90179c7fde4f568ce7f52f6ec87', class: "input-container" }, h("div", { key: 'b59b030317e837115e7d9f10a2765f883c52eae7', class: "time-inputs" }, [
|
|
910
910
|
this.getInputsInOrder()[0],
|
|
911
911
|
":",
|
|
912
912
|
this.getInputsInOrder()[1],
|
|
913
913
|
!this.isHHMMFormat()
|
|
914
914
|
? [":", this.getInputsInOrder()[2]]
|
|
915
915
|
: null,
|
|
916
|
-
]), h("div", { key: '
|
|
916
|
+
]), h("div", { key: '80f2e178df91b5ae6bba0bfeda0600330d877222', class: "action-buttons" }, showClearButton && (h("ic-button", { key: '295fa279d38b8239e3640a719ae350cc493a40f0', id: "clear-button", "aria-label": "Clear input", class: {
|
|
917
917
|
["clear-button"]: true,
|
|
918
918
|
["hidden"]: isEmptyString(this.hour) &&
|
|
919
919
|
isEmptyString(this.minute) &&
|
|
920
920
|
isEmptyString(this.second),
|
|
921
|
-
}, 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: '
|
|
921
|
+
}, 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: 'ca4ef9f3d4246c6742e020db86dc91872b8ccc3f', class: "show-clock-button-wrapper" }, h("div", { key: 'd5506d97163e73e1f972e680d6a76c886f18c798', class: { divider: showDivider, [size]: true } }), h("ic-button", { key: 'eff1265aa61ef2ace0ce84e7525389f23f7cd57b', 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: 'd017a4408998c19d9a7d352344125fd09457849c', id: this.selectedTimeInfoId, class: "sr-only", "aria-live": "polite" }, h("span", { key: '3ac394520da65af634cd087b758441c79a46990a', ref: (el) => (this.selectedTimeInfoEl = el), role: "status" })), (hasCustomValidation || !isEmptyString(this.invalidTimeText)) && (h("ic-input-validation", { key: '4cf54814f4837f9480643691e19af77b0fe24aae', status: validationStatus, message: hasCustomValidation ? this.validationText : this.invalidTimeText, for: inputId })))));
|
|
922
922
|
}
|
|
923
923
|
static get delegatesFocus() { return true; }
|
|
924
924
|
get el() { return getElement(this); }
|