@ukic/canary-web-components 2.0.0-canary.4 → 2.0.0-canary.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -2
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/date-helpers-c9551119.js +150 -0
- package/dist/cjs/date-helpers-c9551119.js.map +1 -0
- package/dist/cjs/helpers-951fb33a.js +433 -0
- package/dist/cjs/helpers-951fb33a.js.map +1 -0
- package/dist/cjs/{helpers-bbe55215.js → helpers-eabe59b6.js} +147 -100
- package/dist/cjs/helpers-eabe59b6.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +31 -4
- package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +11 -4
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +20 -6
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +26 -17
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +86 -83
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +62 -25
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +145 -103
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +130 -0
- package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-card.cjs.entry.js +30 -7
- package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +28 -17
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +50 -31
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +45 -21
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-classification-banner.cjs.entry.js +14 -5
- package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-entity.cjs.entry.js +3 -6
- package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +21 -35
- package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +57 -0
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-data-table.cjs.entry.js +1079 -84
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +1123 -0
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-date-picker.cjs.entry.js +1129 -0
- package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-dialog.cjs.entry.js +54 -12
- 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-empty-state_2.cjs.entry.js +388 -0
- package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +4 -4
- package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +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 +18 -7
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +12 -2
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +5 -5
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js +164 -0
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-link.cjs.entry.js +34 -16
- 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 +21 -20
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js +2740 -0
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -0
- package/dist/cjs/{ic-input-component-container_3.cjs.entry.js → ic-menu.cjs.entry.js} +17 -80
- package/dist/cjs/ic-menu.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-navigation-button.cjs.entry.js +28 -7
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +32 -22
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +82 -36
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +10 -10
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +231 -116
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +40 -36
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +100 -59
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +59 -42
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +22 -30
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select-with-multi.cjs.entry.js +796 -0
- package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-side-navigation.cjs.entry.js +53 -73
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js +16 -35
- package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +4 -2
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +5 -2
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +31 -9
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +7 -3
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +78 -130
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +5 -13
- package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +16 -14
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +13 -22
- package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast-region.cjs.entry.js +6 -0
- package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +21 -18
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +201 -0
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-toggle-button.cjs.entry.js +97 -0
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-top-navigation.cjs.entry.js +60 -82
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +253 -0
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-tree-view.cjs.entry.js +215 -0
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-typography.cjs.entry.js +51 -14
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/index-4cf27b16.js +48 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/arrow-dropdown.svg +3 -0
- package/dist/collection/assets/calendar.svg +3 -0
- package/dist/collection/collection-manifest.json +11 -1
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +658 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +375 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.stories.js +605 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.stories.js.map +1 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js +2 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js.map +1 -0
- package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js +140 -0
- package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js.map +1 -0
- package/dist/collection/components/ic-data-table/ic-data-table.css +286 -10
- package/dist/collection/components/ic-data-table/ic-data-table.js +1533 -123
- 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 +414 -0
- package/dist/collection/components/ic-data-table/ic-data-table.stories.js.map +1 -0
- 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 +1326 -43
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +460 -3
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.css +91 -0
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js +160 -0
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +1 -0
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.stories.js +98 -0
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.stories.js.map +1 -0
- package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js +11 -0
- package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js +70 -0
- package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js.map +1 -0
- package/dist/collection/components/ic-date-input/ic-date-input.css +564 -0
- package/dist/collection/components/ic-date-input/ic-date-input.js +1808 -0
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -0
- package/dist/collection/components/ic-date-input/ic-date-input.stories.js +341 -0
- package/dist/collection/components/ic-date-input/ic-date-input.stories.js.map +1 -0
- package/dist/collection/components/ic-date-input/story-data.js +28 -0
- package/dist/collection/components/ic-date-input/story-data.js.map +1 -0
- package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +1158 -0
- package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +1 -0
- package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js +42 -0
- package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js.map +1 -0
- package/dist/collection/components/ic-date-picker/ic-date-picker.css +885 -0
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +1688 -0
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -0
- package/dist/collection/components/ic-date-picker/ic-date-picker.stories.js +167 -0
- package/dist/collection/components/ic-date-picker/ic-date-picker.stories.js.map +1 -0
- package/dist/collection/components/ic-date-picker/ic-day-button.js +36 -0
- package/dist/collection/components/ic-date-picker/ic-day-button.js.map +1 -0
- package/dist/collection/components/ic-date-picker/ic-month-picker.js +29 -0
- package/dist/collection/components/ic-date-picker/ic-month-picker.js.map +1 -0
- package/dist/collection/components/ic-date-picker/ic-year-picker.js +39 -0
- package/dist/collection/components/ic-date-picker/ic-year-picker.js.map +1 -0
- package/dist/collection/components/ic-date-picker/story-data.js +179 -0
- package/dist/collection/components/ic-date-picker/story-data.js.map +1 -0
- package/dist/collection/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.js +13 -0
- package/dist/collection/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker-utils.spec.js +207 -0
- package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker-utils.spec.js.map +1 -0
- package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js +1030 -0
- package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js.map +1 -0
- package/dist/collection/components/ic-menu-with-multi/ic-menu.css +701 -0
- package/dist/collection/components/ic-menu-with-multi/ic-menu.js +1599 -0
- package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -0
- package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +1057 -0
- package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +1 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +346 -166
- 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 +260 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js.map +1 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js +2 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js.map +1 -0
- package/dist/collection/components/ic-pagination-bar/test/a11y/ic-pagination-bar.test.a11y.js +8 -1
- package/dist/collection/components/ic-pagination-bar/test/a11y/ic-pagination-bar.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js +75 -12
- package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js.map +1 -1
- package/dist/collection/components/ic-select-with-multi/assets/Check.svg +3 -0
- package/dist/collection/components/ic-select-with-multi/assets/Clear.svg +3 -0
- package/dist/collection/components/ic-select-with-multi/assets/Expand.svg +3 -0
- package/dist/collection/components/ic-select-with-multi/ic-select-multi.stories.js +144 -0
- package/dist/collection/components/ic-select-with-multi/ic-select-multi.stories.js.map +1 -0
- package/dist/collection/components/ic-select-with-multi/ic-select.css +693 -0
- package/dist/collection/components/ic-select-with-multi/ic-select.js +1649 -0
- package/dist/collection/components/ic-select-with-multi/ic-select.js.map +1 -0
- package/dist/collection/components/ic-select-with-multi/story-data.js +216 -0
- package/dist/collection/components/ic-select-with-multi/story-data.js.map +1 -0
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +1518 -0
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +1 -0
- package/dist/collection/components/ic-tree-item/ic-tree-item.css +186 -0
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +620 -0
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -0
- package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js +117 -0
- package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js.map +1 -0
- package/dist/collection/components/ic-tree-view/ic-tree-view.css +74 -0
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +346 -0
- package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -0
- package/dist/collection/components/ic-tree-view/ic-tree-view.stories.js +456 -0
- package/dist/collection/components/ic-tree-view/ic-tree-view.stories.js.map +1 -0
- package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js +85 -0
- package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js.map +1 -0
- package/dist/collection/utils/constants.js +83 -0
- package/dist/collection/utils/constants.js.map +1 -0
- package/dist/collection/utils/date-helpers.js +133 -0
- package/dist/collection/utils/date-helpers.js.map +1 -0
- package/dist/collection/utils/helpers.js +473 -5
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js +58 -0
- package/dist/collection/utils/types.js.map +1 -0
- package/dist/components/helpers.js +141 -98
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +403 -0
- package/dist/components/helpers2.js.map +1 -0
- package/dist/components/ic-accordion-group.js +38 -7
- package/dist/components/ic-accordion-group.js.map +1 -1
- package/dist/components/ic-accordion.js +12 -4
- package/dist/components/ic-accordion.js.map +1 -1
- package/dist/components/ic-alert2.js +21 -6
- package/dist/components/ic-alert2.js.map +1 -1
- package/dist/components/ic-back-to-top.js +34 -18
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-badge.js +91 -84
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +66 -25
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-breadcrumb2.js +2 -2
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +104 -74
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-horizontal.d.ts +11 -0
- package/dist/components/ic-card-horizontal.js +168 -0
- package/dist/components/ic-card-horizontal.js.map +1 -0
- package/dist/components/ic-card.js +34 -21
- package/dist/components/ic-card.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +33 -18
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +58 -33
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +52 -23
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-classification-banner.js +14 -5
- package/dist/components/ic-classification-banner.js.map +1 -1
- package/dist/components/ic-data-entity.js +3 -6
- package/dist/components/ic-data-entity.js.map +1 -1
- package/dist/components/ic-data-row.js +21 -35
- package/dist/components/ic-data-row.js.map +1 -1
- package/dist/components/ic-data-table-title-bar.d.ts +11 -0
- package/dist/components/ic-data-table-title-bar.js +136 -0
- package/dist/components/ic-data-table-title-bar.js.map +1 -0
- package/dist/components/ic-data-table.js +1119 -91
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input.d.ts +11 -0
- package/dist/components/ic-date-input.js +8 -0
- package/dist/components/ic-date-input.js.map +1 -0
- package/dist/components/ic-date-input2.js +1359 -0
- package/dist/components/ic-date-input2.js.map +1 -0
- package/dist/components/ic-date-picker.d.ts +11 -0
- package/dist/components/ic-date-picker.js +1258 -0
- package/dist/components/ic-date-picker.js.map +1 -0
- package/dist/components/ic-dialog.js +55 -12
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.js +1 -1
- package/dist/components/ic-empty-state.js +1 -57
- package/dist/components/ic-empty-state.js.map +1 -1
- package/dist/{esm/ic-empty-state.entry.js → components/ic-empty-state2.js} +47 -11
- package/dist/components/ic-empty-state2.js.map +1 -0
- package/dist/components/ic-footer-link-group.js +4 -4
- package/dist/components/ic-footer-link-group.js.map +1 -1
- package/dist/components/ic-footer-link.js +3 -3
- package/dist/components/ic-footer-link.js.map +1 -1
- package/dist/components/ic-footer.js +18 -7
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +12 -2
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +5 -5
- package/dist/components/ic-horizontal-scroll2.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +24 -8
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js +7 -5
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-input-validation2.js +1 -1
- package/dist/components/ic-link2.js +35 -17
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +2 -2
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu-group.js +2 -2
- package/dist/components/ic-menu-group.js.map +1 -1
- package/dist/components/ic-menu-item2.js +26 -23
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu-with-multi.d.ts +11 -0
- package/dist/components/ic-menu-with-multi.js +8 -0
- package/dist/components/ic-menu-with-multi.js.map +1 -0
- package/dist/components/ic-menu2.js +14 -14
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-menu3.js +2806 -0
- package/dist/components/ic-menu3.js.map +1 -0
- package/dist/components/ic-navigation-button.js +29 -8
- package/dist/components/ic-navigation-button.js.map +1 -1
- package/dist/components/ic-navigation-group.js +34 -24
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +84 -37
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +1 -1
- package/dist/components/ic-page-header.js +10 -10
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-bar2.js +244 -161
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +27 -12
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination2.js +30 -10
- package/dist/components/ic-pagination2.js.map +1 -1
- package/dist/components/ic-popover-menu.js +43 -38
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +101 -59
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +63 -44
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +23 -30
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-section-container2.js +1 -1
- package/dist/components/ic-section-container2.js.map +1 -1
- package/dist/components/ic-select-with-multi.d.ts +11 -0
- package/dist/components/ic-select-with-multi.js +921 -0
- package/dist/components/ic-select-with-multi.js.map +1 -0
- package/dist/components/ic-select2.js +77 -30
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +56 -74
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +17 -40
- package/dist/components/ic-skeleton.js.map +1 -1
- package/dist/components/ic-status-tag.js +3 -1
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +5 -2
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +35 -9
- package/dist/components/ic-stepper.js.map +1 -1
- package/dist/components/ic-switch.js +9 -4
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +79 -130
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-tab-panel.js +6 -17
- package/dist/components/ic-tab-panel.js.map +1 -1
- package/dist/components/ic-tab.js +16 -14
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +120 -72
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +13 -22
- package/dist/components/ic-theme.js.map +1 -1
- package/dist/components/ic-toast-region.js +6 -0
- package/dist/components/ic-toast-region.js.map +1 -1
- package/dist/components/ic-toast.js +24 -19
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +230 -0
- package/dist/components/ic-toggle-button-group.js.map +1 -0
- package/dist/components/ic-toggle-button.js +148 -0
- package/dist/components/ic-toggle-button.js.map +1 -0
- package/dist/components/ic-tooltip2.js +52 -30
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +61 -83
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-tree-item.d.ts +11 -0
- package/dist/components/ic-tree-item.js +300 -0
- package/dist/components/ic-tree-item.js.map +1 -0
- package/dist/components/ic-tree-view.d.ts +11 -0
- package/dist/components/ic-tree-view.js +252 -0
- package/dist/components/ic-tree-view.js.map +1 -0
- package/dist/components/ic-typography2.js +57 -17
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/core/core.css +8 -5
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-0229eb46.entry.js +2 -0
- package/dist/core/p-0229eb46.entry.js.map +1 -0
- package/dist/core/p-04fe848d.entry.js +2 -0
- package/dist/core/p-04fe848d.entry.js.map +1 -0
- package/dist/core/p-05ae9a59.entry.js +2 -0
- package/dist/core/p-05ae9a59.entry.js.map +1 -0
- package/dist/core/p-074e64d0.entry.js +2 -0
- package/dist/core/p-074e64d0.entry.js.map +1 -0
- package/dist/core/p-0f1706e8.entry.js +2 -0
- package/dist/core/p-0f1706e8.entry.js.map +1 -0
- package/dist/core/p-11877d23.entry.js +2 -0
- package/dist/core/p-11877d23.entry.js.map +1 -0
- package/dist/core/p-1e450833.entry.js +2 -0
- package/dist/core/p-1e450833.entry.js.map +1 -0
- package/dist/core/{p-4409f656.entry.js → p-23408776.entry.js} +2 -2
- package/dist/core/p-23408776.entry.js.map +1 -0
- package/dist/core/p-26fa17fb.entry.js +2 -0
- package/dist/core/p-26fa17fb.entry.js.map +1 -0
- package/dist/core/p-2b15ea77.entry.js +2 -0
- package/dist/core/p-2b15ea77.entry.js.map +1 -0
- package/dist/core/p-2d44b81a.entry.js +2 -0
- package/dist/core/p-2d44b81a.entry.js.map +1 -0
- package/dist/core/p-2ea7af8b.entry.js +2 -0
- package/dist/core/p-2ea7af8b.entry.js.map +1 -0
- package/dist/core/p-33dd24eb.js +2 -0
- package/dist/core/p-33dd24eb.js.map +1 -0
- package/dist/core/p-38f329ab.entry.js +2 -0
- package/dist/core/p-38f329ab.entry.js.map +1 -0
- package/dist/core/p-3cd2056f.entry.js +2 -0
- package/dist/core/p-3cd2056f.entry.js.map +1 -0
- package/dist/core/p-3d00ad9e.entry.js +2 -0
- package/dist/core/p-3d00ad9e.entry.js.map +1 -0
- package/dist/core/p-3ebd4703.entry.js +2 -0
- package/dist/core/p-3ebd4703.entry.js.map +1 -0
- package/dist/core/p-44036532.entry.js +2 -0
- package/dist/core/p-44036532.entry.js.map +1 -0
- package/dist/core/p-44680720.entry.js +2 -0
- package/dist/core/p-44680720.entry.js.map +1 -0
- package/dist/core/{p-24945ee5.entry.js → p-452985d9.entry.js} +2 -2
- package/dist/core/p-452985d9.entry.js.map +1 -0
- package/dist/core/{p-b97dc365.entry.js → p-487fd924.entry.js} +2 -2
- package/dist/core/p-56db5123.entry.js +2 -0
- package/dist/core/p-56db5123.entry.js.map +1 -0
- package/dist/core/p-5a90eaa8.entry.js +2 -0
- package/dist/core/p-5a90eaa8.entry.js.map +1 -0
- package/dist/core/p-5dd6381a.entry.js +2 -0
- package/dist/core/p-5dd6381a.entry.js.map +1 -0
- package/dist/core/p-5f149106.entry.js +2 -0
- package/dist/core/p-5f149106.entry.js.map +1 -0
- package/dist/core/p-61848e6b.entry.js +2 -0
- package/dist/core/p-61848e6b.entry.js.map +1 -0
- package/dist/core/{p-d77960f6.entry.js → p-656378ba.entry.js} +2 -2
- package/dist/core/p-6a920114.entry.js +2 -0
- package/dist/core/p-6a920114.entry.js.map +1 -0
- package/dist/core/p-6cdf5de2.entry.js +2 -0
- package/dist/core/p-6cdf5de2.entry.js.map +1 -0
- package/dist/core/p-70ad364c.entry.js +2 -0
- package/dist/core/p-70ad364c.entry.js.map +1 -0
- package/dist/core/p-70c659ec.entry.js +2 -0
- package/dist/core/p-70c659ec.entry.js.map +1 -0
- package/dist/core/p-74b42302.entry.js +2 -0
- package/dist/core/p-74b42302.entry.js.map +1 -0
- package/dist/core/p-75bd12f8.entry.js +2 -0
- package/dist/core/p-75bd12f8.entry.js.map +1 -0
- package/dist/core/p-780294b8.entry.js +2 -0
- package/dist/core/p-780294b8.entry.js.map +1 -0
- package/dist/core/{p-baf81f30.entry.js → p-787ffd96.entry.js} +2 -2
- package/dist/core/p-787ffd96.entry.js.map +1 -0
- package/dist/core/p-7edc19be.entry.js +2 -0
- package/dist/core/p-7edc19be.entry.js.map +1 -0
- package/dist/core/p-8ab58daa.js +2 -0
- package/dist/core/p-8ab58daa.js.map +1 -0
- package/dist/core/p-8ced1495.entry.js +2 -0
- package/dist/core/p-8ced1495.entry.js.map +1 -0
- package/dist/core/{p-939baa93.entry.js → p-95545b4c.entry.js} +2 -2
- package/dist/core/p-95545b4c.entry.js.map +1 -0
- package/dist/core/p-95d057b8.entry.js +2 -0
- package/dist/core/p-95d057b8.entry.js.map +1 -0
- package/dist/core/p-987cd821.entry.js +2 -0
- package/dist/core/p-987cd821.entry.js.map +1 -0
- package/dist/core/{p-41aa0ed3.entry.js → p-9b386822.entry.js} +2 -2
- package/dist/core/p-9b386822.entry.js.map +1 -0
- package/dist/core/{p-39e20b87.entry.js → p-9bbe221f.entry.js} +2 -2
- package/dist/core/{p-39e20b87.entry.js.map → p-9bbe221f.entry.js.map} +1 -1
- package/dist/core/p-9f157649.entry.js +2 -0
- package/dist/core/p-9f157649.entry.js.map +1 -0
- package/dist/core/{p-356b8a4c.entry.js → p-9f3cf053.entry.js} +2 -2
- package/dist/core/{p-356b8a4c.entry.js.map → p-9f3cf053.entry.js.map} +1 -1
- package/dist/core/p-9f58998d.entry.js +2 -0
- package/dist/core/p-9f58998d.entry.js.map +1 -0
- package/dist/core/p-a4f28ef1.entry.js +2 -0
- package/dist/core/p-a4f28ef1.entry.js.map +1 -0
- package/dist/core/p-ac8090a5.entry.js +2 -0
- package/dist/core/p-ac8090a5.entry.js.map +1 -0
- package/dist/core/p-b1f89f44.entry.js +2 -0
- package/dist/core/p-b1f89f44.entry.js.map +1 -0
- package/dist/core/p-bc350ec5.entry.js +2 -0
- package/dist/core/p-bc350ec5.entry.js.map +1 -0
- package/dist/core/p-bd0328f3.entry.js +2 -0
- package/dist/core/p-bd0328f3.entry.js.map +1 -0
- package/dist/core/p-bf06977d.js +2 -0
- package/dist/core/p-bf06977d.js.map +1 -0
- package/dist/core/p-c0a2a040.entry.js +2 -0
- package/dist/core/p-c0a2a040.entry.js.map +1 -0
- package/dist/core/p-cc0e0b46.entry.js +2 -0
- package/dist/core/p-cc0e0b46.entry.js.map +1 -0
- package/dist/core/p-d0020f6f.entry.js +2 -0
- package/dist/core/p-d0020f6f.entry.js.map +1 -0
- package/dist/core/{p-3d618bc2.entry.js → p-d1045cd5.entry.js} +2 -2
- package/dist/core/p-d56248df.entry.js +2 -0
- package/dist/core/p-d56248df.entry.js.map +1 -0
- package/dist/core/p-d921dc2c.entry.js +2 -0
- package/dist/core/p-d921dc2c.entry.js.map +1 -0
- package/dist/core/p-da398a5d.entry.js +2 -0
- package/dist/core/p-da398a5d.entry.js.map +1 -0
- package/dist/core/{p-2e9e8e7c.entry.js → p-db5af9f7.entry.js} +2 -2
- package/dist/core/p-db5af9f7.entry.js.map +1 -0
- package/dist/core/p-dd4c83ad.entry.js +2 -0
- package/dist/core/p-dd4c83ad.entry.js.map +1 -0
- package/dist/core/p-e362b5f3.entry.js +2 -0
- package/dist/core/p-e362b5f3.entry.js.map +1 -0
- package/dist/core/p-e89c2feb.entry.js +2 -0
- package/dist/core/p-e89c2feb.entry.js.map +1 -0
- package/dist/core/p-eaeaa096.entry.js +2 -0
- package/dist/core/p-eaeaa096.entry.js.map +1 -0
- package/dist/core/{p-c2b5e7b1.entry.js → p-eb87b43b.entry.js} +2 -2
- package/dist/core/{p-c2b5e7b1.entry.js.map → p-eb87b43b.entry.js.map} +1 -1
- package/dist/core/p-f5dfcf4f.entry.js +2 -0
- package/dist/core/p-f5dfcf4f.entry.js.map +1 -0
- package/dist/core/p-f5fbfbc9.entry.js +2 -0
- package/dist/core/p-f5fbfbc9.entry.js.map +1 -0
- package/dist/core/p-fac387e8.entry.js +2 -0
- package/dist/core/p-fac387e8.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/date-helpers-0e5e32a7.js +136 -0
- package/dist/esm/date-helpers-0e5e32a7.js.map +1 -0
- package/dist/esm/helpers-948df101.js +403 -0
- package/dist/esm/helpers-948df101.js.map +1 -0
- package/dist/esm/{helpers-268c2b7f.js → helpers-cd64688a.js} +142 -99
- package/dist/esm/helpers-cd64688a.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +31 -4
- package/dist/esm/ic-accordion-group.entry.js.map +1 -1
- package/dist/esm/ic-accordion.entry.js +11 -4
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +20 -6
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +26 -17
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js +86 -83
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +62 -25
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +2 -2
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +145 -103
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +126 -0
- package/dist/esm/ic-card-horizontal.entry.js.map +1 -0
- package/dist/esm/ic-card.entry.js +30 -7
- package/dist/esm/ic-card.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +28 -17
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +50 -31
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +45 -21
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-classification-banner.entry.js +14 -5
- package/dist/esm/ic-classification-banner.entry.js.map +1 -1
- package/dist/esm/ic-data-entity.entry.js +3 -6
- package/dist/esm/ic-data-entity.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +21 -35
- package/dist/esm/ic-data-row.entry.js.map +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +53 -0
- package/dist/esm/ic-data-table-title-bar.entry.js.map +1 -0
- package/dist/esm/ic-data-table.entry.js +1080 -85
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +1119 -0
- package/dist/esm/ic-date-input.entry.js.map +1 -0
- package/dist/esm/ic-date-picker.entry.js +1125 -0
- package/dist/esm/ic-date-picker.entry.js.map +1 -0
- package/dist/esm/ic-dialog.entry.js +54 -12
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +383 -0
- package/dist/esm/ic-empty-state_2.entry.js.map +1 -0
- package/dist/esm/ic-footer-link-group.entry.js +4 -4
- package/dist/esm/ic-footer-link-group.entry.js.map +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 +18 -7
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +12 -2
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +5 -5
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_4.entry.js +157 -0
- package/dist/esm/ic-input-component-container_4.entry.js.map +1 -0
- package/dist/esm/ic-link.entry.js +35 -17
- 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 +21 -20
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-menu-with-multi.entry.js +2736 -0
- package/dist/esm/ic-menu-with-multi.entry.js.map +1 -0
- package/dist/esm/{ic-input-component-container_3.entry.js → ic-menu.entry.js} +19 -80
- package/dist/esm/ic-menu.entry.js.map +1 -0
- package/dist/esm/ic-navigation-button.entry.js +29 -8
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +33 -23
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +83 -37
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +10 -10
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination_4.entry.js +232 -117
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +40 -36
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +100 -59
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +59 -42
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +22 -30
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-section-container.entry.js +1 -1
- package/dist/esm/ic-section-container.entry.js.map +1 -1
- package/dist/esm/ic-select-with-multi.entry.js +792 -0
- package/dist/esm/ic-select-with-multi.entry.js.map +1 -0
- package/dist/esm/ic-side-navigation.entry.js +53 -73
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js +16 -35
- package/dist/esm/ic-skeleton.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +4 -2
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +5 -2
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +31 -9
- package/dist/esm/ic-stepper.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +7 -3
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +78 -130
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab-panel.entry.js +5 -13
- package/dist/esm/ic-tab-panel.entry.js.map +1 -1
- package/dist/esm/ic-tab.entry.js +16 -14
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +13 -22
- package/dist/esm/ic-theme.entry.js.map +1 -1
- package/dist/esm/ic-toast-region.entry.js +6 -0
- package/dist/esm/ic-toast-region.entry.js.map +1 -1
- package/dist/esm/ic-toast.entry.js +21 -18
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +197 -0
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -0
- package/dist/esm/ic-toggle-button.entry.js +93 -0
- package/dist/esm/ic-toggle-button.entry.js.map +1 -0
- package/dist/esm/ic-top-navigation.entry.js +60 -82
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-tree-item.entry.js +249 -0
- package/dist/esm/ic-tree-item.entry.js.map +1 -0
- package/dist/esm/ic-tree-view.entry.js +211 -0
- package/dist/esm/ic-tree-view.entry.js.map +1 -0
- package/dist/esm/ic-typography.entry.js +52 -15
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/index-93509377.js +48 -12
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +71 -0
- package/dist/types/components/ic-card-horizontal/ic-card-horizontal.stories.d.ts +82 -0
- package/dist/types/components/ic-card-horizontal/ic-card-horizontal.types.d.ts +1 -0
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +218 -19
- package/dist/types/components/ic-data-table/ic-data-table.stories.d.ts +239 -0
- package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +43 -0
- package/dist/types/components/ic-data-table/story-data.d.ts +492 -2
- package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.d.ts +36 -0
- package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.stories.d.ts +47 -0
- package/dist/types/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.d.ts +1 -0
- package/dist/types/components/ic-date-input/ic-date-input.d.ts +264 -0
- package/dist/types/components/ic-date-input/ic-date-input.stories.d.ts +124 -0
- package/dist/types/components/ic-date-input/story-data.d.ts +1 -0
- package/dist/types/components/ic-date-input/test/helpers/ic-date-input.d.ts +23 -0
- package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +262 -0
- package/dist/types/components/ic-date-picker/ic-date-picker.stories.d.ts +153 -0
- package/dist/types/components/ic-date-picker/ic-day-button.d.ts +16 -0
- package/dist/types/components/ic-date-picker/ic-month-picker.d.ts +14 -0
- package/dist/types/components/ic-date-picker/ic-year-picker.d.ts +16 -0
- package/dist/types/components/ic-date-picker/story-data.d.ts +24 -0
- package/dist/types/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.d.ts +1 -0
- package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +218 -0
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +65 -23
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.stories.d.ts +106 -0
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.types.d.ts +4 -0
- package/dist/types/components/ic-select-with-multi/ic-select-multi.stories.d.ts +106 -0
- package/dist/types/components/ic-select-with-multi/ic-select.d.ts +289 -0
- package/dist/types/components/ic-select-with-multi/story-data.d.ts +32 -0
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +101 -0
- package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +51 -0
- package/dist/types/components/ic-tree-view/ic-tree-view.stories.d.ts +99 -0
- package/dist/types/components.d.ts +1711 -127
- package/dist/types/interface.d.ts +1 -0
- package/dist/types/utils/constants.d.ts +38 -0
- package/dist/types/utils/date-helpers.d.ts +22 -0
- package/dist/types/utils/helpers.d.ts +144 -2
- package/dist/types/utils/types.d.ts +126 -0
- package/hydrate/index.js +18298 -9132
- package/package.json +27 -17
- package/dist/cjs/helpers-bbe55215.js.map +0 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +0 -38
- package/dist/cjs/ic-empty-state.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +0 -86
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-pagination-bar.cjs.entry.js +0 -285
- package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +0 -1
- package/dist/collection/components/ic-pagination/ic-pagination.types.js +0 -2
- package/dist/collection/components/ic-pagination/ic-pagination.types.js.map +0 -1
- package/dist/core/p-0083465b.entry.js +0 -2
- package/dist/core/p-0083465b.entry.js.map +0 -1
- package/dist/core/p-03487f12.entry.js +0 -2
- package/dist/core/p-03487f12.entry.js.map +0 -1
- package/dist/core/p-03f8fa1a.entry.js +0 -2
- package/dist/core/p-03f8fa1a.entry.js.map +0 -1
- package/dist/core/p-0c18b6a0.entry.js +0 -2
- package/dist/core/p-0c18b6a0.entry.js.map +0 -1
- package/dist/core/p-1bc034aa.entry.js +0 -2
- package/dist/core/p-1bc034aa.entry.js.map +0 -1
- package/dist/core/p-20a76d1d.entry.js +0 -2
- package/dist/core/p-20a76d1d.entry.js.map +0 -1
- package/dist/core/p-24945ee5.entry.js.map +0 -1
- package/dist/core/p-2dc35696.entry.js +0 -2
- package/dist/core/p-2dc35696.entry.js.map +0 -1
- package/dist/core/p-2e9e8e7c.entry.js.map +0 -1
- package/dist/core/p-3ee25a6d.entry.js +0 -2
- package/dist/core/p-3ee25a6d.entry.js.map +0 -1
- package/dist/core/p-41aa0ed3.entry.js.map +0 -1
- package/dist/core/p-4314aa0e.entry.js +0 -2
- package/dist/core/p-4314aa0e.entry.js.map +0 -1
- package/dist/core/p-4409f656.entry.js.map +0 -1
- package/dist/core/p-47abbd06.entry.js +0 -2
- package/dist/core/p-47abbd06.entry.js.map +0 -1
- package/dist/core/p-485823b6.entry.js +0 -2
- package/dist/core/p-485823b6.entry.js.map +0 -1
- package/dist/core/p-4ee59448.entry.js +0 -2
- package/dist/core/p-4ee59448.entry.js.map +0 -1
- package/dist/core/p-5157cfab.entry.js +0 -2
- package/dist/core/p-5157cfab.entry.js.map +0 -1
- package/dist/core/p-53083575.entry.js +0 -2
- package/dist/core/p-53083575.entry.js.map +0 -1
- package/dist/core/p-55d5541f.entry.js +0 -2
- package/dist/core/p-55d5541f.entry.js.map +0 -1
- package/dist/core/p-5bb32ee6.entry.js +0 -2
- package/dist/core/p-5bb32ee6.entry.js.map +0 -1
- package/dist/core/p-67eea079.entry.js +0 -2
- package/dist/core/p-67eea079.entry.js.map +0 -1
- package/dist/core/p-6bd0e984.entry.js +0 -2
- package/dist/core/p-6bd0e984.entry.js.map +0 -1
- package/dist/core/p-75bf6162.entry.js +0 -2
- package/dist/core/p-75bf6162.entry.js.map +0 -1
- package/dist/core/p-76959313.entry.js +0 -2
- package/dist/core/p-76959313.entry.js.map +0 -1
- package/dist/core/p-7de813a3.entry.js +0 -2
- package/dist/core/p-7de813a3.entry.js.map +0 -1
- package/dist/core/p-7eae5f70.entry.js +0 -2
- package/dist/core/p-7eae5f70.entry.js.map +0 -1
- package/dist/core/p-85508347.entry.js +0 -2
- package/dist/core/p-85508347.entry.js.map +0 -1
- package/dist/core/p-8da152c4.entry.js +0 -2
- package/dist/core/p-8da152c4.entry.js.map +0 -1
- package/dist/core/p-8fd4ca0a.js +0 -2
- package/dist/core/p-8fd4ca0a.js.map +0 -1
- package/dist/core/p-939baa93.entry.js.map +0 -1
- package/dist/core/p-9777ebb1.entry.js +0 -2
- package/dist/core/p-9777ebb1.entry.js.map +0 -1
- package/dist/core/p-9c27b73e.entry.js +0 -2
- package/dist/core/p-9c27b73e.entry.js.map +0 -1
- package/dist/core/p-9fa6844f.entry.js +0 -2
- package/dist/core/p-9fa6844f.entry.js.map +0 -1
- package/dist/core/p-9fdd7d73.entry.js +0 -2
- package/dist/core/p-9fdd7d73.entry.js.map +0 -1
- package/dist/core/p-a3ab9f4c.entry.js +0 -2
- package/dist/core/p-a3ab9f4c.entry.js.map +0 -1
- package/dist/core/p-a51e5c7c.entry.js +0 -2
- package/dist/core/p-a51e5c7c.entry.js.map +0 -1
- package/dist/core/p-a7481232.entry.js +0 -2
- package/dist/core/p-a7481232.entry.js.map +0 -1
- package/dist/core/p-ab9f8a3f.entry.js +0 -2
- package/dist/core/p-ab9f8a3f.entry.js.map +0 -1
- package/dist/core/p-b2aa3d7c.entry.js +0 -2
- package/dist/core/p-b2aa3d7c.entry.js.map +0 -1
- package/dist/core/p-b5cf6d65.entry.js +0 -2
- package/dist/core/p-b5cf6d65.entry.js.map +0 -1
- package/dist/core/p-baf81f30.entry.js.map +0 -1
- package/dist/core/p-bc187bb5.entry.js +0 -2
- package/dist/core/p-bc187bb5.entry.js.map +0 -1
- package/dist/core/p-bd9cecce.entry.js +0 -2
- package/dist/core/p-bd9cecce.entry.js.map +0 -1
- package/dist/core/p-be980606.entry.js +0 -2
- package/dist/core/p-be980606.entry.js.map +0 -1
- package/dist/core/p-c1256810.entry.js +0 -2
- package/dist/core/p-c1256810.entry.js.map +0 -1
- package/dist/core/p-d76cfa5a.entry.js +0 -2
- package/dist/core/p-d76cfa5a.entry.js.map +0 -1
- package/dist/core/p-e189f1d0.entry.js +0 -2
- package/dist/core/p-e189f1d0.entry.js.map +0 -1
- package/dist/core/p-e9e145aa.entry.js +0 -2
- package/dist/core/p-e9e145aa.entry.js.map +0 -1
- package/dist/core/p-f0e9a83f.entry.js +0 -2
- package/dist/core/p-f0e9a83f.entry.js.map +0 -1
- package/dist/core/p-f23d2102.entry.js +0 -2
- package/dist/core/p-f23d2102.entry.js.map +0 -1
- package/dist/core/p-f87e8411.entry.js +0 -2
- package/dist/core/p-f87e8411.entry.js.map +0 -1
- package/dist/esm/helpers-268c2b7f.js.map +0 -1
- package/dist/esm/ic-empty-state.entry.js.map +0 -1
- package/dist/esm/ic-input-component-container_3.entry.js.map +0 -1
- package/dist/esm/ic-input-label_2.entry.js +0 -81
- package/dist/esm/ic-input-label_2.entry.js.map +0 -1
- package/dist/esm/ic-pagination-bar.entry.js +0 -281
- package/dist/esm/ic-pagination-bar.entry.js.map +0 -1
- package/dist/types/components/ic-pagination/ic-pagination.types.d.ts +0 -6
- /package/dist/core/{p-b97dc365.entry.js.map → p-487fd924.entry.js.map} +0 -0
- /package/dist/core/{p-d77960f6.entry.js.map → p-656378ba.entry.js.map} +0 -0
- /package/dist/core/{p-3d618bc2.entry.js.map → p-d1045cd5.entry.js.map} +0 -0
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-4cf27b16.js');
|
6
|
-
const helpers = require('./helpers-
|
6
|
+
const helpers = require('./helpers-eabe59b6.js');
|
7
7
|
require('./types-17dba796.js');
|
8
8
|
|
9
9
|
const ArrowUpward = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" aria-hidden="true">
|
@@ -11,24 +11,23 @@ const ArrowUpward = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"
|
|
11
11
|
</svg>
|
12
12
|
`;
|
13
13
|
|
14
|
-
const icBackToTopCss = "/*! 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{display:block;position:absolute;right:0}
|
14
|
+
const icBackToTopCss = "/*! 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{display:block;position:absolute;right:0}.positioning{position:fixed;right:var(--ic-space-md);bottom:var(--ic-space-md);transition:visibility 0s linear var(--ic-transition-duration-slow),\n opacity var(--ic-transition-duration-slow);z-index:var(--ic-z-index-back-to-top)}.icon-only{width:2.5rem;padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs)\n var(--ic-space-xs)}.icon-only .ic-back-to-top-icon{padding-left:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}button{height:2.5rem;align-items:center;padding:var(--ic-space-xs) var(--ic-space-md) var(--ic-space-xs)\n var(--ic-space-sm);margin:0;gap:var(--ic-space-xs);display:flex;background-color:var(--ic-architectural-white);border:var(--ic-border-width) solid var(--ic-action-default);outline-width:inherit;box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);border-radius:5rem;text-decoration:none;visibility:hidden;opacity:0;cursor:pointer}button:hover{text-decoration:none;background-color:var(--ic-action-default-bg-hover-no-alpha);border:var(--ic-border-width) solid var(--ic-action-default-hover)}button:active{text-decoration:none;background-color:var(--ic-action-default-bg-active-no-alpha);border:var(--ic-border-width) solid var(--ic-action-default-active)}button:focus{box-shadow:var(--ic-border-focus)}.ic-back-to-top-link.show{visibility:visible;opacity:1;transition:visibility 0s linear 0s,\n opacity var(--ic-transition-duration-slow),\n box-shadow var(--ic-easing-transition-fast)}.ic-back-to-top-link.by-footer{position:relative;right:var(--ic-space-md);bottom:3.5rem}.ic-back-to-top-link.offset-banner{margin-bottom:var(--ic-space-lg)}.ic-back-to-top-icon{fill:var(--ic-action-default);padding-left:var(--ic-space-xxs);padding-top:var(--ic-space-xxxs)}.ic-back-to-top-icon>svg{height:var(--ic-space-md);width:var(--ic-space-md);display:inline-block}.ic-back-to-top-link span{color:var(--ic-action-default)}.ic-back-to-top-link:hover .ic-back-to-top-icon{fill:var(--ic-action-default-hover)}.ic-back-to-top-link:hover span{color:var(--ic-action-default-hover)}@media (forced-colors: active){.ic-back-to-top-icon{fill:currentcolor}}";
|
15
15
|
|
16
16
|
const backToTopLabel = "Back to top";
|
17
17
|
const BackToTop = class {
|
18
18
|
constructor(hostRef) {
|
19
19
|
index.registerInstance(this, hostRef);
|
20
20
|
this.topObserver = null;
|
21
|
+
this.getObservedEl = () => {
|
22
|
+
return document.querySelector("#ic-back-to-top-target");
|
23
|
+
};
|
21
24
|
this.setTargetElVisible = (visible) => {
|
22
25
|
this.targetElVisible = visible;
|
23
26
|
};
|
24
27
|
this.setFooterVisible = (visible) => {
|
25
28
|
this.checkForClassificationBanner();
|
26
|
-
|
27
|
-
|
28
|
-
}
|
29
|
-
else {
|
30
|
-
this.footerVisible = visible;
|
31
|
-
}
|
29
|
+
this.footerVisible =
|
30
|
+
typeof window !== "undefined" && window.scrollY === 0 ? false : visible;
|
32
31
|
};
|
33
32
|
this.targetElObserverCallback = (entries) => {
|
34
33
|
this.setTargetElVisible(entries[0].isIntersecting);
|
@@ -42,7 +41,7 @@ const BackToTop = class {
|
|
42
41
|
console.log("Error: No target ID specified for back to top component - defaulting to top of page");
|
43
42
|
}
|
44
43
|
else {
|
45
|
-
targetElement = document.querySelector(target.
|
44
|
+
targetElement = document.querySelector(`${target.startsWith("#") ? "" : "#"}${target}`);
|
46
45
|
if (targetElement === null) {
|
47
46
|
console.log(`Error: Back to top target element '${target}' not found - defaulting to top of page`);
|
48
47
|
}
|
@@ -54,7 +53,7 @@ const BackToTop = class {
|
|
54
53
|
let objParent;
|
55
54
|
//remove old element & observer
|
56
55
|
if (this.topObserver !== null) {
|
57
|
-
const observedEl =
|
56
|
+
const observedEl = this.getObservedEl();
|
58
57
|
if (observedEl !== null) {
|
59
58
|
this.topObserver.unobserve(observedEl);
|
60
59
|
observedEl.remove();
|
@@ -72,6 +71,7 @@ const BackToTop = class {
|
|
72
71
|
//insert a new 0px height element before specified target that can be used to determine when page is scrolled
|
73
72
|
const objBackToTopTargetEl = document.createElement("div");
|
74
73
|
objBackToTopTargetEl.setAttribute("id", "ic-back-to-top-target");
|
74
|
+
objBackToTopTargetEl.setAttribute("tabindex", "-1"); // Needed for virtual cursor behaviour to work
|
75
75
|
objParent.insertBefore(objBackToTopTargetEl, this.targetEl);
|
76
76
|
// resize observer needs to factor in any top margin on the target el
|
77
77
|
const marginTop = getComputedStyle(this.targetEl).marginTop;
|
@@ -88,16 +88,30 @@ const BackToTop = class {
|
|
88
88
|
else {
|
89
89
|
this.targetEl.scrollIntoView();
|
90
90
|
}
|
91
|
+
// Get virtual cursor to move
|
92
|
+
this.getObservedEl().focus();
|
91
93
|
};
|
92
94
|
this.checkForClassificationBanner = () => {
|
93
95
|
//adjust position for classification banner at bottom
|
94
96
|
const banners = document.querySelectorAll("ic-classification-banner:not([inline='true'])");
|
95
97
|
this.bannerOffset = banners.length > 0;
|
96
98
|
};
|
99
|
+
this.buildButton = () => {
|
100
|
+
const { bannerOffset, targetElVisible, footerVisible, variant } = this;
|
101
|
+
return (index.h("button", { class: {
|
102
|
+
["ic-back-to-top-link"]: true,
|
103
|
+
["offset-banner"]: bannerOffset,
|
104
|
+
["show"]: !targetElVisible,
|
105
|
+
["by-footer"]: footerVisible,
|
106
|
+
["positioning"]: variant !== "icon",
|
107
|
+
["icon-only"]: variant === "icon",
|
108
|
+
}, "aria-label": backToTopLabel, onClick: this.handleClick }, index.h("span", { class: "ic-back-to-top-icon", innerHTML: ArrowUpward }), this.variant !== "icon" && (index.h("ic-typography", { variant: "subtitle-small" }, index.h("span", null, backToTopLabel)))));
|
109
|
+
};
|
97
110
|
this.bannerOffset = false;
|
98
111
|
this.footerVisible = false;
|
99
112
|
this.targetElVisible = true;
|
100
113
|
this.target = undefined;
|
114
|
+
this.variant = "default";
|
101
115
|
}
|
102
116
|
watchPropHandler(newValue, oldValue) {
|
103
117
|
//added for gatsby rehydration issue where prop is initially undefined but then changes to actual value
|
@@ -124,13 +138,8 @@ const BackToTop = class {
|
|
124
138
|
helpers.onComponentRequiredPropUndefined([{ prop: this.target, propName: "target" }], "Back to Top");
|
125
139
|
}
|
126
140
|
render() {
|
127
|
-
const {
|
128
|
-
return (index.h("
|
129
|
-
["ic-back-to-top-link"]: true,
|
130
|
-
["offset-banner"]: bannerOffset,
|
131
|
-
["show"]: !targetElVisible,
|
132
|
-
["by-footer"]: footerVisible,
|
133
|
-
}, "aria-label": backToTopLabel, onClick: this.handleClick }, index.h("span", { class: "ic-back-to-top-icon", innerHTML: ArrowUpward }), index.h("ic-typography", { variant: "subtitle-small" }, index.h("span", null, backToTopLabel))));
|
141
|
+
const { variant, buildButton } = this;
|
142
|
+
return variant === "icon" ? (index.h("ic-tooltip", { label: backToTopLabel, placement: "top", class: "positioning" }, buildButton())) : (buildButton());
|
134
143
|
}
|
135
144
|
static get delegatesFocus() { return true; }
|
136
145
|
get el() { return index.getElement(this); }
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-back-to-top.entry.cjs.js","mappings":"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","names":["onComponentPropUndefinedChange","onComponentRequiredPropUndefined","h"],"sources":["../web-components/dist/collection/components/ic-back-to-top/ic-back-to-top.css?tag=ic-back-to-top&encapsulation=shadow","../web-components/dist/collection/components/ic-back-to-top/ic-back-to-top.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n/**\n * @prop --ic-z-index-back-to-top: z-index of back to top\n */\n\n:host {\n display: block;\n position: absolute;\n right: 0;\n}\n\nbutton {\n position: fixed;\n right: var(--ic-space-md);\n bottom: var(--ic-space-md);\n height: 2.5rem;\n align-items: center;\n padding: var(--ic-space-xs) var(--ic-space-md) var(--ic-space-xs)\n var(--ic-space-sm);\n margin: 0;\n gap: var(--ic-space-xs);\n display: flex;\n background-color: var(--ic-architectural-white);\n border: var(--ic-border-width) solid var(--ic-action-default);\n outline-width: inherit;\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n border-radius: 5rem;\n text-decoration: none;\n visibility: hidden;\n opacity: 0;\n transition: visibility 0s linear var(--ic-transition-duration-slow),\n opacity var(--ic-transition-duration-slow);\n cursor: pointer;\n z-index: var(--ic-z-index-back-to-top);\n}\n\nbutton:hover {\n text-decoration: none;\n background-color: var(--ic-action-default-bg-hover-no-alpha);\n border: var(--ic-border-width) solid var(--ic-action-default-hover);\n}\n\nbutton:active {\n text-decoration: none;\n background-color: var(--ic-action-default-bg-active-no-alpha);\n border: var(--ic-border-width) solid var(--ic-action-default-active);\n}\n\nbutton:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n.ic-back-to-top-link.show {\n visibility: visible;\n opacity: 1;\n transition: visibility 0s linear 0s,\n opacity var(--ic-transition-duration-slow),\n box-shadow var(--ic-easing-transition-fast);\n}\n\n.ic-back-to-top-link.by-footer {\n position: relative;\n right: var(--ic-space-md);\n bottom: 3.5rem;\n}\n\n.ic-back-to-top-link.offset-banner {\n margin-bottom: var(--ic-space-lg);\n}\n\n.ic-back-to-top-icon {\n fill: var(--ic-action-default);\n padding-left: var(--ic-space-xxs);\n padding-top: var(--ic-space-xxxs);\n}\n\n.ic-back-to-top-icon > svg {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n display: inline-block;\n}\n\n.ic-back-to-top-link span {\n color: var(--ic-action-default);\n}\n\n.ic-back-to-top-link:hover .ic-back-to-top-icon {\n fill: var(--ic-action-default-hover);\n}\n\n.ic-back-to-top-link:hover span {\n color: var(--ic-action-default-hover);\n}\n\n@media (forced-colors: active) {\n .ic-back-to-top-icon {\n fill: currentcolor;\n }\n}\n","import { h } from \"@stencil/core\";\nimport ArrowUpward from \"./assets/ArrowUpward.svg\";\nimport { onComponentPropUndefinedChange, onComponentRequiredPropUndefined, } from \"../../utils/helpers\";\nconst backToTopLabel = \"Back to top\";\nexport class BackToTop {\n constructor() {\n this.topObserver = null;\n this.setTargetElVisible = (visible) => {\n this.targetElVisible = visible;\n };\n this.setFooterVisible = (visible) => {\n this.checkForClassificationBanner();\n if (typeof window !== \"undefined\" && window.scrollY === 0) {\n this.footerVisible = false;\n }\n else {\n this.footerVisible = visible;\n }\n };\n this.targetElObserverCallback = (entries) => {\n this.setTargetElVisible(entries[0].isIntersecting);\n };\n this.footerObserverCallback = (entries) => {\n this.setFooterVisible(entries[0].isIntersecting);\n };\n this.findTargetEl = (target) => {\n let targetElement = null;\n if (target === null || target === undefined) {\n console.log(\"Error: No target ID specified for back to top component - defaulting to top of page\");\n }\n else {\n targetElement = document.querySelector(target.indexOf(\"#\") === 0 ? target : \"#\" + target);\n if (targetElement === null) {\n console.log(`Error: Back to top target element '${target}' not found - defaulting to top of page`);\n }\n }\n return targetElement;\n };\n this.createTopObserver = (target) => {\n this.targetEl = this.findTargetEl(target);\n let objParent;\n //remove old element & observer\n if (this.topObserver !== null) {\n const observedEl = document.querySelector(\"#ic-back-to-top-target\");\n if (observedEl !== null) {\n this.topObserver.unobserve(observedEl);\n observedEl.remove();\n }\n }\n if (this.targetEl === null) {\n objParent = document.body;\n this.targetEl = objParent.firstElementChild;\n this.isTargetElNull = true;\n }\n else {\n objParent = this.targetEl.parentNode;\n this.isTargetElNull = false;\n }\n //insert a new 0px height element before specified target that can be used to determine when page is scrolled\n const objBackToTopTargetEl = document.createElement(\"div\");\n objBackToTopTargetEl.setAttribute(\"id\", \"ic-back-to-top-target\");\n objParent.insertBefore(objBackToTopTargetEl, this.targetEl);\n // resize observer needs to factor in any top margin on the target el\n const marginTop = getComputedStyle(this.targetEl).marginTop;\n this.topObserver = new IntersectionObserver(this.targetElObserverCallback, {\n threshold: [0],\n rootMargin: `${marginTop} 0px 0px 0px`,\n });\n this.topObserver.observe(objBackToTopTargetEl);\n };\n this.handleClick = () => {\n if (this.isTargetElNull) {\n window.scrollTo(0, 0);\n }\n else {\n this.targetEl.scrollIntoView();\n }\n };\n this.checkForClassificationBanner = () => {\n //adjust position for classification banner at bottom\n const banners = document.querySelectorAll(\"ic-classification-banner:not([inline='true'])\");\n this.bannerOffset = banners.length > 0;\n };\n this.bannerOffset = false;\n this.footerVisible = false;\n this.targetElVisible = true;\n this.target = undefined;\n }\n watchPropHandler(newValue, oldValue) {\n //added for gatsby rehydration issue where prop is initially undefined but then changes to actual value\n onComponentPropUndefinedChange(oldValue, newValue, () => {\n this.createTopObserver(newValue);\n });\n }\n componentWillLoad() {\n this.createTopObserver(this.target);\n this.checkForClassificationBanner();\n //observer for when footer scrolls into view\n let footers = document.querySelectorAll(\"ic-footer\");\n if (footers.length === 0) {\n footers = document.querySelectorAll(\"footer\");\n }\n if (footers.length) {\n const footerEl = footers[footers.length - 1];\n const threshold = this.bannerOffset ? 0.15 : 0;\n const footerObserver = new IntersectionObserver(this.footerObserverCallback, { threshold: [threshold] });\n footerObserver.observe(footerEl);\n }\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([{ prop: this.target, propName: \"target\" }], \"Back to Top\");\n }\n render() {\n const { bannerOffset, targetElVisible, footerVisible } = this;\n return (h(\"button\", { class: {\n [\"ic-back-to-top-link\"]: true,\n [\"offset-banner\"]: bannerOffset,\n [\"show\"]: !targetElVisible,\n [\"by-footer\"]: footerVisible,\n }, \"aria-label\": backToTopLabel, onClick: this.handleClick }, h(\"span\", { class: \"ic-back-to-top-icon\", innerHTML: ArrowUpward }), h(\"ic-typography\", { variant: \"subtitle-small\" }, h(\"span\", null, backToTopLabel))));\n }\n static get is() { return \"ic-back-to-top\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-back-to-top.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-back-to-top.css\"]\n };\n }\n static get properties() {\n return {\n \"target\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ID of the element to jump back to when the link is clicked.\"\n },\n \"attribute\": \"target\",\n \"reflect\": false\n }\n };\n }\n static get states() {\n return {\n \"bannerOffset\": {},\n \"footerVisible\": {},\n \"targetElVisible\": {}\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"target\",\n \"methodName\": \"watchPropHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-back-to-top.js.map\n"],"version":3}
|
1
|
+
{"file":"ic-back-to-top.entry.cjs.js","mappings":"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","names":["h","onComponentPropUndefinedChange","onComponentRequiredPropUndefined"],"sources":["../web-components/dist/collection/components/ic-back-to-top/ic-back-to-top.css?tag=ic-back-to-top&encapsulation=shadow","../web-components/dist/collection/components/ic-back-to-top/ic-back-to-top.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n/**\n * @prop --ic-z-index-back-to-top: z-index of back to top\n */\n\n:host {\n display: block;\n position: absolute;\n right: 0;\n}\n\n.positioning {\n position: fixed;\n right: var(--ic-space-md);\n bottom: var(--ic-space-md);\n transition: visibility 0s linear var(--ic-transition-duration-slow),\n opacity var(--ic-transition-duration-slow);\n z-index: var(--ic-z-index-back-to-top);\n}\n\n.icon-only {\n width: 2.5rem;\n padding: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs)\n var(--ic-space-xs);\n}\n\n.icon-only .ic-back-to-top-icon {\n padding-left: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n}\n\nbutton {\n height: 2.5rem;\n align-items: center;\n padding: var(--ic-space-xs) var(--ic-space-md) var(--ic-space-xs)\n var(--ic-space-sm);\n margin: 0;\n gap: var(--ic-space-xs);\n display: flex;\n background-color: var(--ic-architectural-white);\n border: var(--ic-border-width) solid var(--ic-action-default);\n outline-width: inherit;\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n border-radius: 5rem;\n text-decoration: none;\n visibility: hidden;\n opacity: 0;\n cursor: pointer;\n}\n\nbutton:hover {\n text-decoration: none;\n background-color: var(--ic-action-default-bg-hover-no-alpha);\n border: var(--ic-border-width) solid var(--ic-action-default-hover);\n}\n\nbutton:active {\n text-decoration: none;\n background-color: var(--ic-action-default-bg-active-no-alpha);\n border: var(--ic-border-width) solid var(--ic-action-default-active);\n}\n\nbutton:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n.ic-back-to-top-link.show {\n visibility: visible;\n opacity: 1;\n transition: visibility 0s linear 0s,\n opacity var(--ic-transition-duration-slow),\n box-shadow var(--ic-easing-transition-fast);\n}\n\n.ic-back-to-top-link.by-footer {\n position: relative;\n right: var(--ic-space-md);\n bottom: 3.5rem;\n}\n\n.ic-back-to-top-link.offset-banner {\n margin-bottom: var(--ic-space-lg);\n}\n\n.ic-back-to-top-icon {\n fill: var(--ic-action-default);\n padding-left: var(--ic-space-xxs);\n padding-top: var(--ic-space-xxxs);\n}\n\n.ic-back-to-top-icon > svg {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n display: inline-block;\n}\n\n.ic-back-to-top-link span {\n color: var(--ic-action-default);\n}\n\n.ic-back-to-top-link:hover .ic-back-to-top-icon {\n fill: var(--ic-action-default-hover);\n}\n\n.ic-back-to-top-link:hover span {\n color: var(--ic-action-default-hover);\n}\n\n@media (forced-colors: active) {\n .ic-back-to-top-icon {\n fill: currentcolor;\n }\n}\n","import { h } from \"@stencil/core\";\nimport ArrowUpward from \"./assets/ArrowUpward.svg\";\nimport { onComponentPropUndefinedChange, onComponentRequiredPropUndefined, } from \"../../utils/helpers\";\nconst backToTopLabel = \"Back to top\";\nexport class BackToTop {\n constructor() {\n this.topObserver = null;\n this.getObservedEl = () => {\n return document.querySelector(\"#ic-back-to-top-target\");\n };\n this.setTargetElVisible = (visible) => {\n this.targetElVisible = visible;\n };\n this.setFooterVisible = (visible) => {\n this.checkForClassificationBanner();\n this.footerVisible =\n typeof window !== \"undefined\" && window.scrollY === 0 ? false : visible;\n };\n this.targetElObserverCallback = (entries) => {\n this.setTargetElVisible(entries[0].isIntersecting);\n };\n this.footerObserverCallback = (entries) => {\n this.setFooterVisible(entries[0].isIntersecting);\n };\n this.findTargetEl = (target) => {\n let targetElement = null;\n if (target === null || target === undefined) {\n console.log(\"Error: No target ID specified for back to top component - defaulting to top of page\");\n }\n else {\n targetElement = document.querySelector(`${target.startsWith(\"#\") ? \"\" : \"#\"}${target}`);\n if (targetElement === null) {\n console.log(`Error: Back to top target element '${target}' not found - defaulting to top of page`);\n }\n }\n return targetElement;\n };\n this.createTopObserver = (target) => {\n this.targetEl = this.findTargetEl(target);\n let objParent;\n //remove old element & observer\n if (this.topObserver !== null) {\n const observedEl = this.getObservedEl();\n if (observedEl !== null) {\n this.topObserver.unobserve(observedEl);\n observedEl.remove();\n }\n }\n if (this.targetEl === null) {\n objParent = document.body;\n this.targetEl = objParent.firstElementChild;\n this.isTargetElNull = true;\n }\n else {\n objParent = this.targetEl.parentNode;\n this.isTargetElNull = false;\n }\n //insert a new 0px height element before specified target that can be used to determine when page is scrolled\n const objBackToTopTargetEl = document.createElement(\"div\");\n objBackToTopTargetEl.setAttribute(\"id\", \"ic-back-to-top-target\");\n objBackToTopTargetEl.setAttribute(\"tabindex\", \"-1\"); // Needed for virtual cursor behaviour to work\n objParent.insertBefore(objBackToTopTargetEl, this.targetEl);\n // resize observer needs to factor in any top margin on the target el\n const marginTop = getComputedStyle(this.targetEl).marginTop;\n this.topObserver = new IntersectionObserver(this.targetElObserverCallback, {\n threshold: [0],\n rootMargin: `${marginTop} 0px 0px 0px`,\n });\n this.topObserver.observe(objBackToTopTargetEl);\n };\n this.handleClick = () => {\n if (this.isTargetElNull) {\n window.scrollTo(0, 0);\n }\n else {\n this.targetEl.scrollIntoView();\n }\n // Get virtual cursor to move\n this.getObservedEl().focus();\n };\n this.checkForClassificationBanner = () => {\n //adjust position for classification banner at bottom\n const banners = document.querySelectorAll(\"ic-classification-banner:not([inline='true'])\");\n this.bannerOffset = banners.length > 0;\n };\n this.buildButton = () => {\n const { bannerOffset, targetElVisible, footerVisible, variant } = this;\n return (h(\"button\", { class: {\n [\"ic-back-to-top-link\"]: true,\n [\"offset-banner\"]: bannerOffset,\n [\"show\"]: !targetElVisible,\n [\"by-footer\"]: footerVisible,\n [\"positioning\"]: variant !== \"icon\",\n [\"icon-only\"]: variant === \"icon\",\n }, \"aria-label\": backToTopLabel, onClick: this.handleClick }, h(\"span\", { class: \"ic-back-to-top-icon\", innerHTML: ArrowUpward }), this.variant !== \"icon\" && (h(\"ic-typography\", { variant: \"subtitle-small\" }, h(\"span\", null, backToTopLabel)))));\n };\n this.bannerOffset = false;\n this.footerVisible = false;\n this.targetElVisible = true;\n this.target = undefined;\n this.variant = \"default\";\n }\n watchPropHandler(newValue, oldValue) {\n //added for gatsby rehydration issue where prop is initially undefined but then changes to actual value\n onComponentPropUndefinedChange(oldValue, newValue, () => {\n this.createTopObserver(newValue);\n });\n }\n componentWillLoad() {\n this.createTopObserver(this.target);\n this.checkForClassificationBanner();\n //observer for when footer scrolls into view\n let footers = document.querySelectorAll(\"ic-footer\");\n if (footers.length === 0) {\n footers = document.querySelectorAll(\"footer\");\n }\n if (footers.length) {\n const footerEl = footers[footers.length - 1];\n const threshold = this.bannerOffset ? 0.15 : 0;\n const footerObserver = new IntersectionObserver(this.footerObserverCallback, { threshold: [threshold] });\n footerObserver.observe(footerEl);\n }\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([{ prop: this.target, propName: \"target\" }], \"Back to Top\");\n }\n render() {\n const { variant, buildButton } = this;\n return variant === \"icon\" ? (h(\"ic-tooltip\", { label: backToTopLabel, placement: \"top\", class: \"positioning\" }, buildButton())) : (buildButton());\n }\n static get is() { return \"ic-back-to-top\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-back-to-top.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-back-to-top.css\"]\n };\n }\n static get properties() {\n return {\n \"target\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ID of the element to jump back to when the link is clicked.\"\n },\n \"attribute\": \"target\",\n \"reflect\": false\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBackToTopVariants\",\n \"resolved\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"references\": {\n \"IcBackToTopVariants\": {\n \"location\": \"import\",\n \"path\": \"./ic-back-to-top.types\",\n \"id\": \"src/components/ic-back-to-top/ic-back-to-top.types.ts::IcBackToTopVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the button to render\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"bannerOffset\": {},\n \"footerVisible\": {},\n \"targetElVisible\": {}\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"target\",\n \"methodName\": \"watchPropHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-back-to-top.js.map\n"],"version":3}
|
@@ -3,109 +3,83 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-4cf27b16.js');
|
6
|
-
const
|
7
|
-
|
6
|
+
const helpers = require('./helpers-eabe59b6.js');
|
7
|
+
require('./types-17dba796.js');
|
8
8
|
|
9
|
-
const icBadgeCss = "@media (prefers-reduced-motion: no-preference){:host(.show){animation:expand var(--ic-transition-duration-slow)}:host(.hide){animation:shrink var(--ic-transition-duration-slow)}}:host{display:flex;height:var(--ic-space-md);min-width:var(--ic-space-md);width:-moz-fit-content;width:fit-content;border-radius:calc(2 * var(--ic-space-xxl));position:absolute}:host(.neutral){background-color:var(--ic-architectural-500)}:host(.light){background-color:var(--ic-architectural-40)}:host(.info){background-color:var(--ic-status-info)}:host(.warning){background-color:var(--ic-status-warning-mid)}:host(.error){background-color:var(--ic-status-error)}:host(.success){background-color:var(--ic-status-success)}:host(.small){height:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host(.large){height:calc(var(--ic-space-md) + var(--ic-space-xxs));min-width:calc(var(--ic-space-md) + var(--ic-space-xxs))}:host(.dot.default){height:var(--ic-space-xs);width:var(--ic-space-xs);min-width:var(--ic-space-xs)}:host(.dot.small){height:calc(var(--ic-space-xxs) + var(--ic-space-xxxs));width:calc(var(--ic-space-xxs) + var(--ic-space-xxxs));min-width:calc(var(--ic-space-xxs) + var(--ic-space-xxxs))}:host(.dot.large){height:var(--ic-space-sm);width:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host(.foreground-dark) ::slotted(*){fill:var(--ic-color-primary-text)}:host(.foreground-light) ::slotted(*){fill:white}:host(.foreground-dark) ic-typography{color:var(--ic-color-primary-text)}:host(.foreground-light) ic-typography{color:white}:host(.text) ic-typography{align-self:center;padding:0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.text.small) ic-typography{padding:0 0.2132rem}:host(.text.large) ic-typography{padding:0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.icon) ::slotted(svg){width:var(--ic-space-sm);height:var(--ic-space-sm);padding:var(--ic-space-xxxs)}:host(.icon.small) ::slotted(svg){width:var(--ic-space-xs);height:var(--ic-space-xs)}:host(.icon.large) ::slotted(svg){width:calc(var(--ic-space-sm) + var(--ic-space-xxxs));height:calc(var(--ic-space-sm) + var(--ic-space-xxxs));padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}:host(.far){top:calc(-1 * var(--ic-space-xs));right:calc(-1 * var(--ic-space-xs))}:host(.far.small),:host(.dot.far.large){top:calc(-1 * var(--ic-space-xxs));right:calc(-1 * var(--ic-space-xxs))}:host(.dot.far),:host(.dot.far.small){top:calc(-1 * var(--ic-space-xxxs));right:calc(-1 * var(--ic-space-xxxs))}:host(.near){top:calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));right:calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)))}:host(.dot.near){top:calc(-1 * var(--ic-space-1px));right:calc(-1 * var(--ic-space-1px))}:host(.inline){position:static}:host(.hide){visibility:hidden !important;transition:visibility var(--ic-transition-duration-slow)}@keyframes expand{from{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes shrink{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0)}}";
|
9
|
+
const icBadgeCss = "@media (prefers-reduced-motion: no-preference){:host(.show){animation:expand var(--ic-transition-duration-slow)}:host(.hide){animation:shrink var(--ic-transition-duration-slow)}}:host{display:flex;height:var(--ic-space-md);min-width:var(--ic-space-md);width:-moz-fit-content;width:fit-content;border-radius:calc(2 * var(--ic-space-xxl));position:absolute}:host(.neutral){background-color:var(--ic-architectural-500)}:host(.light){background-color:var(--ic-architectural-40)}:host(.info){background-color:var(--ic-status-info)}:host(.warning){background-color:var(--ic-status-warning-mid)}:host(.error){background-color:var(--ic-status-error)}:host(.success){background-color:var(--ic-status-success)}:host(.small){height:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host(.large){height:calc(var(--ic-space-md) + var(--ic-space-xxs));min-width:calc(var(--ic-space-md) + var(--ic-space-xxs))}:host(.dot.default){height:var(--ic-space-xs);width:var(--ic-space-xs);min-width:var(--ic-space-xs)}:host(.dot.small){height:calc(var(--ic-space-xxs) + var(--ic-space-xxxs));width:calc(var(--ic-space-xxs) + var(--ic-space-xxxs));min-width:calc(var(--ic-space-xxs) + var(--ic-space-xxxs))}:host(.dot.large){height:var(--ic-space-sm);width:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host(.foreground-dark) ::slotted(*){fill:var(--ic-color-primary-text)}:host(.foreground-light) ::slotted(*){fill:white}:host(.foreground-dark) ic-typography{color:var(--ic-color-primary-text)}:host(.foreground-light) ic-typography{color:white}:host(.text) ic-typography{align-self:center;padding:0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.text.small) ic-typography{padding:0 0.2132rem}:host(.text.large) ic-typography{padding:0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.icon) ::slotted(svg){width:var(--ic-space-sm);height:var(--ic-space-sm);padding:var(--ic-space-xxxs)}:host(.icon.small) ::slotted(svg){width:var(--ic-space-xs);height:var(--ic-space-xs)}:host(.icon.large) ::slotted(svg){width:calc(var(--ic-space-sm) + var(--ic-space-xxxs));height:calc(var(--ic-space-sm) + var(--ic-space-xxxs));padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}:host(.far){top:calc(-1 * var(--ic-space-xs));right:calc(-1 * var(--ic-space-xs))}:host(.far.small),:host(.dot.far.large){top:calc(-1 * var(--ic-space-xxs));right:calc(-1 * var(--ic-space-xxs))}:host(.dot.far),:host(.dot.far.small){top:calc(-1 * var(--ic-space-xxxs));right:calc(-1 * var(--ic-space-xxxs))}:host(.near){top:calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));right:calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)))}:host(.dot.near){top:calc(-1 * var(--ic-space-1px));right:calc(-1 * var(--ic-space-1px))}:host(.inline){position:static}:host(.hide){visibility:hidden !important;transition:visibility var(--ic-transition-duration-slow)}.sr-only{position:absolute;left:-9999px}.sr-only:dir(rtl){right:-9999px}@keyframes expand{from{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes shrink{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0)}}";
|
10
10
|
|
11
|
+
const NAVIGATION_BUTTON = "IC-NAVIGATION-BUTTON";
|
12
|
+
const TOP_NAVIGATION = "IC-TOP-NAVIGATION";
|
11
13
|
const Badge = class {
|
12
14
|
constructor(hostRef) {
|
13
15
|
index.registerInstance(this, hostRef);
|
16
|
+
this.ariaLabel = null;
|
14
17
|
this.setBadgeColour = () => {
|
15
|
-
|
16
|
-
if (
|
17
|
-
const firstChar = this.customColor.slice(0, 1);
|
18
|
-
if (firstChar === "#") {
|
19
|
-
colorRGBA = helpers.hexToRgba(this.customColor);
|
20
|
-
}
|
21
|
-
else if (firstChar.toLowerCase() === "r") {
|
22
|
-
colorRGBA = helpers.rgbaStrToObj(this.customColor);
|
23
|
-
}
|
18
|
+
const colorRGBA = helpers.convertToRGBA(this.customColor);
|
19
|
+
if (colorRGBA) {
|
24
20
|
this.customColorRGBA = colorRGBA;
|
25
|
-
|
21
|
+
const { r, g, b, a } = colorRGBA;
|
22
|
+
this.el.style.backgroundColor = `rgba(${r}, ${g}, ${b}, ${a})`;
|
26
23
|
}
|
27
24
|
};
|
28
|
-
this.
|
29
|
-
let red;
|
30
|
-
let green;
|
31
|
-
let blue;
|
25
|
+
this.getBadgeRGB = () => {
|
32
26
|
switch (this.variant) {
|
33
27
|
case "custom":
|
34
|
-
|
35
|
-
green = this.customColorRGBA.g;
|
36
|
-
blue = this.customColorRGBA.b;
|
37
|
-
break;
|
28
|
+
return this.customColorRGBA;
|
38
29
|
case "error":
|
39
|
-
red = parseInt(helpers.getCssProperty("--ic-status-error-r"));
|
40
|
-
green = parseInt(helpers.getCssProperty("--ic-status-error-g"));
|
41
|
-
blue = parseInt(helpers.getCssProperty("--ic-status-error-b"));
|
42
|
-
break;
|
43
30
|
case "success":
|
44
|
-
red = parseInt(helpers.getCssProperty("--ic-status-success-r"));
|
45
|
-
green = parseInt(helpers.getCssProperty("--ic-status-success-g"));
|
46
|
-
blue = parseInt(helpers.getCssProperty("--ic-status-success-b"));
|
47
|
-
break;
|
48
31
|
case "warning":
|
49
|
-
red = parseInt(helpers.getCssProperty("--ic-status-warning-r"));
|
50
|
-
green = parseInt(helpers.getCssProperty("--ic-status-warning-g"));
|
51
|
-
blue = parseInt(helpers.getCssProperty("--ic-status-warning-b"));
|
52
|
-
break;
|
53
32
|
case "info": {
|
54
|
-
|
55
|
-
red = info.r;
|
56
|
-
green = info.g;
|
57
|
-
blue = info.b;
|
58
|
-
break;
|
59
|
-
}
|
60
|
-
case "neutral": {
|
61
|
-
const neutral = helpers.hexToRgba(helpers.getCssProperty("--ic-architectural-500"));
|
62
|
-
red = neutral.r;
|
63
|
-
green = neutral.g;
|
64
|
-
blue = neutral.b;
|
65
|
-
break;
|
66
|
-
}
|
67
|
-
case "light": {
|
68
|
-
const light = helpers.hexToRgba(helpers.getCssProperty("--ic-architectural-40"));
|
69
|
-
red = light.r;
|
70
|
-
green = light.g;
|
71
|
-
blue = light.b;
|
72
|
-
break;
|
33
|
+
return helpers.rgbaStrToObj(helpers.getCssProperty(`--ic-status-${this.variant}`));
|
73
34
|
}
|
35
|
+
case "neutral":
|
36
|
+
case "light":
|
37
|
+
return helpers.hexToRgba(helpers.getCssProperty(`--ic-architectural-${this.variant === "neutral" ? 500 : 40}`));
|
74
38
|
}
|
75
|
-
const brightness = (red * 299 + green * 587 + blue * 114) / 1000;
|
76
|
-
this.foregroundColour =
|
77
|
-
brightness > 133.3505
|
78
|
-
? types.IcThemeForegroundEnum.Dark
|
79
|
-
: types.IcThemeForegroundEnum.Light;
|
80
39
|
};
|
81
|
-
this.
|
82
|
-
|
83
|
-
|
84
|
-
if (this.maxNumber !== null) {
|
85
|
-
label =
|
86
|
-
Number(this.textLabel) > this.maxNumber
|
87
|
-
? `${this.maxNumber}+`
|
88
|
-
: this.textLabel;
|
89
|
-
}
|
90
|
-
else {
|
91
|
-
label = this.textLabel;
|
92
|
-
}
|
93
|
-
}
|
94
|
-
return label;
|
40
|
+
this.getBadgeForeground = () => {
|
41
|
+
const { r, g, b } = this.getBadgeRGB();
|
42
|
+
this.foregroundColour = helpers.getThemeForegroundColor((r * 299 + g * 587 + b * 114) / 1000);
|
95
43
|
};
|
44
|
+
this.getTextLabel = () => this.maxNumber && Number(this.textLabel) > this.maxNumber
|
45
|
+
? `${this.maxNumber}+`
|
46
|
+
: this.textLabel;
|
47
|
+
// Set aria-label on badge and / or parent element
|
48
|
+
// Aria-describedby seems to not work, probably due to shadow DOM
|
96
49
|
this.setAccessibleLabel = () => {
|
97
|
-
|
98
|
-
|
99
|
-
|
50
|
+
const parentEl = this.el.parentElement;
|
51
|
+
const defaultAriaLabel = this.isAccessibleLabelDefined()
|
52
|
+
? this.accessibleLabel
|
53
|
+
: this.textLabel || "with badge being displayed";
|
54
|
+
if (parentEl) {
|
55
|
+
const { tagName } = parentEl;
|
56
|
+
if (tagName !== "IC-CARD" &&
|
57
|
+
(tagName !== "IC-TAB" || (tagName === "IC-TAB" && this.parentAriaLabel))) {
|
58
|
+
const ariaLabelPrefix = this.parentAriaLabel
|
59
|
+
? `${this.parentAriaLabel} ,`
|
60
|
+
: "";
|
61
|
+
parentEl.ariaLabel = this.visible
|
62
|
+
? `${ariaLabelPrefix} ${defaultAriaLabel}`
|
63
|
+
: undefined;
|
100
64
|
}
|
101
65
|
else {
|
102
|
-
|
66
|
+
this.ariaLabel = `, ${defaultAriaLabel}`;
|
103
67
|
}
|
104
68
|
}
|
105
69
|
};
|
106
|
-
this.
|
107
|
-
|
70
|
+
this.setPositionInTopNavigation = () => {
|
71
|
+
const parentTopNavEl = this.el.parentElement.parentElement;
|
72
|
+
parentTopNavEl.classList.contains("mobile-mode")
|
73
|
+
? (this.position = "inline")
|
74
|
+
: (this.position = "near");
|
108
75
|
};
|
76
|
+
this.isInTopNav = () => {
|
77
|
+
const parentEl = this.el.parentElement;
|
78
|
+
const grandparentEl = parentEl.parentElement;
|
79
|
+
return (parentEl.tagName === NAVIGATION_BUTTON &&
|
80
|
+
grandparentEl.tagName === TOP_NAVIGATION);
|
81
|
+
};
|
82
|
+
this.isAccessibleLabelDefined = () => helpers.isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;
|
109
83
|
this.accessibleLabel = undefined;
|
110
84
|
this.customColor = null;
|
111
85
|
this.maxNumber = undefined;
|
@@ -116,15 +90,40 @@ const Badge = class {
|
|
116
90
|
this.variant = "neutral";
|
117
91
|
this.visible = true;
|
118
92
|
}
|
93
|
+
accessibleLabelHandler() {
|
94
|
+
this.setAccessibleLabel();
|
95
|
+
}
|
96
|
+
customColorHandler() {
|
97
|
+
this.variant === "custom" && this.setBadgeColour();
|
98
|
+
}
|
99
|
+
variantHandler() {
|
100
|
+
this.getBadgeForeground();
|
101
|
+
}
|
102
|
+
visibleHandler() {
|
103
|
+
this.setAccessibleLabel();
|
104
|
+
}
|
119
105
|
componentWillLoad() {
|
106
|
+
var _a;
|
120
107
|
this.variant === "custom" && this.setBadgeColour();
|
121
108
|
this.getBadgeForeground();
|
122
|
-
this.
|
109
|
+
const ariaLabel = (_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.ariaLabel;
|
110
|
+
if (ariaLabel)
|
111
|
+
this.parentAriaLabel = ariaLabel;
|
112
|
+
this.setAccessibleLabel();
|
123
113
|
}
|
124
114
|
componentDidLoad() {
|
125
115
|
this.type === "text" &&
|
126
116
|
helpers.onComponentRequiredPropUndefined([{ prop: this.textLabel, propName: "text-label" }], "Badge");
|
127
117
|
}
|
118
|
+
componentWillRender() {
|
119
|
+
this.isInTopNav() && this.setPositionInTopNavigation();
|
120
|
+
}
|
121
|
+
navBarMenuOpenHandler() {
|
122
|
+
this.isInTopNav() && (this.position = "inline");
|
123
|
+
}
|
124
|
+
navBarMenuCloseHandler() {
|
125
|
+
this.isInTopNav() && (this.position = "near");
|
126
|
+
}
|
128
127
|
/**
|
129
128
|
* @deprecated This method should not be used anymore. Use visible prop to set badge visibility.
|
130
129
|
*/
|
@@ -138,20 +137,24 @@ const Badge = class {
|
|
138
137
|
this.visible = false;
|
139
138
|
}
|
140
139
|
render() {
|
141
|
-
const { position, size, type, variant,
|
140
|
+
const { ariaLabel, el, foregroundColour, getTextLabel, position, size, textLabel, type, variant, visible, } = this;
|
142
141
|
return (index.h(index.Host, { class: {
|
143
142
|
[`${position}`]: true,
|
144
143
|
[`${size}`]: true,
|
145
144
|
[`${variant}`]: true,
|
146
145
|
[`${type}`]: true,
|
147
146
|
[`foreground-${foregroundColour}`]: foregroundColour !== null,
|
148
|
-
["show"]:
|
149
|
-
|
150
|
-
}, id: "badge", "aria-label": this.isAccessibleLabelDefined() &&
|
151
|
-
`badge displaying ${this.accessibleLabel}` }, type === "icon" && index.h("slot", { name: "badge-icon" }), type === "text" && (index.h("ic-typography", { variant: size === "small" ? "badge-small" : "badge" }, this.getTextLabel()))));
|
147
|
+
[`${visible ? "show" : "hide"}`]: true,
|
148
|
+
}, id: el.id || null, "aria-label": ariaLabel, role: "status" }, type === "icon" && index.h("slot", { name: "badge-icon" }), type === "text" && textLabel && (index.h("ic-typography", { variant: size === "small" ? "badge-small" : "badge" }, getTextLabel())), type === "dot" && index.h("span", { class: "sr-only" }, "badge")));
|
152
149
|
}
|
153
150
|
static get delegatesFocus() { return true; }
|
154
151
|
get el() { return index.getElement(this); }
|
152
|
+
static get watchers() { return {
|
153
|
+
"accessibleLabel": ["accessibleLabelHandler"],
|
154
|
+
"customColor": ["customColorHandler"],
|
155
|
+
"variant": ["variantHandler"],
|
156
|
+
"visible": ["visibleHandler"]
|
157
|
+
}; }
|
155
158
|
};
|
156
159
|
Badge.style = icBadgeCss;
|
157
160
|
|