@ukic/canary-web-components 2.0.0-canary.9 → 3.0.0-canary.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-7a069459.js → helpers-33b42cd6.js} +95 -101
- package/dist/cjs/helpers-33b42cd6.js.map +1 -0
- package/dist/cjs/{helpers-f75cf7cf.js → helpers-6817cfbb.js} +116 -1
- package/dist/cjs/helpers-6817cfbb.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +31 -9
- package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +7 -8
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +28 -10
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +17 -8
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +67 -117
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +37 -11
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +8 -7
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +115 -128
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +131 -0
- package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-card-vertical.cjs.entry.js +149 -0
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +27 -20
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +45 -40
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +40 -29
- 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-list.cjs.entry.js +32 -0
- package/dist/cjs/ic-data-list.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-data-row.cjs.entry.js +12 -12
- 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 +805 -65
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +70 -33
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +81 -55
- package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +27 -101
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +2 -3
- package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +317 -0
- package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +9 -10
- package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +6 -8
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +9 -10
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +27 -12
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +6 -8
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js +38 -32
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +51 -24
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +2 -3
- package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +6 -13
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js +186 -47
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu.cjs.entry.js +16 -21
- package/dist/cjs/ic-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +28 -8
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +23 -21
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +33 -38
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +3 -4
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +10 -12
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +226 -185
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +15 -21
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +75 -51
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +44 -53
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +23 -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 +15 -51
- package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +8 -9
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js +17 -37
- package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +7 -15
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +42 -43
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +45 -24
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +7 -9
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +35 -18
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +25 -11
- package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +6 -13
- package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +10 -9
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +39 -25
- package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast-region.cjs.entry.js +6 -7
- package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +88 -35
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +17 -17
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +15 -14
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +62 -86
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +241 -0
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-tree-view.cjs.entry.js +203 -0
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-typography.cjs.entry.js +55 -19
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/index-4cf27b16.js +26 -14
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/arrow-dropdown.svg +3 -0
- package/dist/collection/collection-manifest.json +7 -3
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +661 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +373 -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.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 +130 -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 +155 -10
- package/dist/collection/components/ic-data-table/ic-data-table.js +1174 -90
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +758 -40
- 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 +339 -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 +93 -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/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 +2 -2
- package/dist/collection/components/ic-date-input/ic-date-input.js +140 -33
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +23 -21
- package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.css +31 -29
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +123 -56
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-date-picker/story-data.js +6 -1
- package/dist/collection/components/ic-date-picker/story-data.js.map +1 -1
- package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js +73 -5
- package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js.map +1 -1
- package/dist/collection/components/ic-menu-with-multi/ic-menu.css +25 -14
- package/dist/collection/components/ic-menu-with-multi/ic-menu.js +187 -69
- package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +229 -52
- package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.css +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +173 -158
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js +56 -11
- 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/ic-select.css +14 -12
- package/dist/collection/components/ic-select-with-multi/ic-select.js +16 -145
- package/dist/collection/components/ic-select-with-multi/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +7 -7
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.css +172 -0
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +592 -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 +114 -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 +59 -0
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +296 -0
- package/dist/collection/components/ic-tree-view/ic-tree-view.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/helpers.js +44 -1
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +84 -90
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +107 -1
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-accordion-group.js +39 -13
- package/dist/components/ic-accordion-group.js.map +1 -1
- package/dist/components/ic-accordion.js +6 -6
- package/dist/components/ic-accordion.js.map +1 -1
- package/dist/components/ic-alert.js +132 -1
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-back-to-top.js +37 -8
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-badge.js +75 -121
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +42 -10
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-breadcrumb2.js +10 -7
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +65 -101
- 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 +167 -0
- package/dist/components/ic-card-horizontal.js.map +1 -0
- package/dist/components/ic-card-vertical.js +194 -0
- package/dist/components/ic-card-vertical.js.map +1 -0
- package/dist/components/ic-checkbox-group.js +31 -21
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +52 -47
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +45 -31
- 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-list.js +56 -0
- package/dist/components/ic-data-list.js.map +1 -0
- package/dist/components/ic-data-row.js +14 -13
- 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 +841 -72
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +79 -36
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-date-picker.js +87 -57
- package/dist/components/ic-date-picker.js.map +1 -1
- package/dist/components/ic-dialog.js +29 -115
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.js +1 -2
- package/dist/components/ic-divider2.js.map +1 -1
- package/dist/components/ic-empty-state.js +1 -57
- package/dist/components/ic-empty-state.js.map +1 -1
- package/dist/components/ic-empty-state2.js +80 -0
- package/dist/components/ic-empty-state2.js.map +1 -0
- package/dist/components/ic-footer-link-group.js +10 -10
- package/dist/components/ic-footer-link-group.js.map +1 -1
- package/dist/components/ic-footer-link.js +13 -8
- package/dist/components/ic-footer-link.js.map +1 -1
- package/dist/components/ic-footer.js +9 -10
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +28 -14
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +6 -8
- package/dist/components/ic-horizontal-scroll2.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +25 -20
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js +9 -11
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-input-validation2.js +4 -5
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-link2.js +54 -27
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +23 -19
- 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 +6 -12
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +15 -20
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-menu3.js +187 -49
- package/dist/components/ic-menu3.js.map +1 -1
- package/dist/components/ic-navigation-button.js +28 -8
- package/dist/components/ic-navigation-button.js.map +1 -1
- package/dist/components/ic-navigation-group.js +23 -20
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +33 -37
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +3 -3
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js +9 -11
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-bar2.js +154 -143
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +22 -12
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination2.js +50 -33
- package/dist/components/ic-pagination2.js.map +1 -1
- package/dist/components/ic-popover-menu.js +15 -20
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +76 -51
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +47 -60
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +21 -29
- 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.js +15 -58
- package/dist/components/ic-select-with-multi.js.map +1 -1
- package/dist/components/ic-select2.js +59 -42
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +8 -9
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +18 -43
- package/dist/components/ic-skeleton.js.map +1 -1
- package/dist/components/ic-status-tag.js +7 -15
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +48 -48
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +49 -23
- package/dist/components/ic-stepper.js.map +1 -1
- package/dist/components/ic-switch.js +7 -9
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +40 -20
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-tab-group.js +27 -13
- package/dist/components/ic-tab-group.js.map +1 -1
- package/dist/components/ic-tab-panel.js +9 -16
- package/dist/components/ic-tab-panel.js.map +1 -1
- package/dist/components/ic-tab.js +12 -10
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +104 -113
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +45 -28
- package/dist/components/ic-theme.js.map +1 -1
- package/dist/components/ic-toast-region.js +7 -9
- package/dist/components/ic-toast-region.js.map +1 -1
- package/dist/components/ic-toast.js +93 -36
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +17 -17
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +16 -14
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-tooltip2.js +31 -9
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +63 -87
- 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 +286 -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 +237 -0
- package/dist/components/ic-tree-view.js.map +1 -0
- package/dist/components/ic-typography2.js +62 -21
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/core/core.css +38 -20
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-06eeb7f2.entry.js +2 -0
- package/dist/core/p-06eeb7f2.entry.js.map +1 -0
- package/dist/core/p-0922c552.entry.js +2 -0
- package/dist/core/p-0922c552.entry.js.map +1 -0
- package/dist/core/p-0bc0e852.entry.js +2 -0
- package/dist/core/p-0bc0e852.entry.js.map +1 -0
- package/dist/core/p-108a9029.entry.js +2 -0
- package/dist/core/p-108a9029.entry.js.map +1 -0
- package/dist/core/p-13100d3c.entry.js +2 -0
- package/dist/core/p-13100d3c.entry.js.map +1 -0
- package/dist/core/p-1769df1d.entry.js +2 -0
- package/dist/core/p-1769df1d.entry.js.map +1 -0
- package/dist/core/p-202bc922.entry.js +2 -0
- package/dist/core/p-202bc922.entry.js.map +1 -0
- package/dist/core/p-266341f5.entry.js +2 -0
- package/dist/core/p-266341f5.entry.js.map +1 -0
- package/dist/core/p-297e99cf.js +2 -0
- package/dist/core/p-297e99cf.js.map +1 -0
- package/dist/core/p-306def43.entry.js +2 -0
- package/dist/core/p-306def43.entry.js.map +1 -0
- package/dist/core/p-30b046b2.entry.js +2 -0
- package/dist/core/p-30b046b2.entry.js.map +1 -0
- package/dist/core/{p-f8cf2978.js → p-33dd24eb.js} +2 -2
- package/dist/core/p-3778cc5e.entry.js +2 -0
- package/dist/core/p-3778cc5e.entry.js.map +1 -0
- package/dist/core/p-383a5a76.entry.js +2 -0
- package/dist/core/p-383a5a76.entry.js.map +1 -0
- package/dist/core/p-3a0510e2.entry.js +2 -0
- package/dist/core/p-3a0510e2.entry.js.map +1 -0
- package/dist/core/p-3ace51f5.entry.js +2 -0
- package/dist/core/p-3ace51f5.entry.js.map +1 -0
- package/dist/core/p-3ef28704.entry.js +2 -0
- package/dist/core/p-3ef28704.entry.js.map +1 -0
- package/dist/core/p-3f0391c1.entry.js +2 -0
- package/dist/core/p-3f0391c1.entry.js.map +1 -0
- package/dist/core/p-41fecc61.entry.js +2 -0
- package/dist/core/p-41fecc61.entry.js.map +1 -0
- package/dist/core/p-46cb94a2.entry.js +2 -0
- package/dist/core/p-46cb94a2.entry.js.map +1 -0
- package/dist/core/p-4e67f127.entry.js +2 -0
- package/dist/core/p-4e67f127.entry.js.map +1 -0
- package/dist/core/p-505250cf.entry.js +2 -0
- package/dist/core/p-505250cf.entry.js.map +1 -0
- package/dist/core/p-50e48f4d.entry.js +2 -0
- package/dist/core/p-50e48f4d.entry.js.map +1 -0
- package/dist/core/p-56e7459a.entry.js +2 -0
- package/dist/core/p-56e7459a.entry.js.map +1 -0
- package/dist/core/p-59028160.entry.js +2 -0
- package/dist/core/p-59028160.entry.js.map +1 -0
- package/dist/core/p-5cfb5821.entry.js +2 -0
- package/dist/core/p-5cfb5821.entry.js.map +1 -0
- package/dist/core/p-5e6fd734.entry.js +2 -0
- package/dist/core/p-5e6fd734.entry.js.map +1 -0
- package/dist/core/p-5f313e1a.entry.js +2 -0
- package/dist/core/p-5f313e1a.entry.js.map +1 -0
- package/dist/core/{p-c2b5e7b1.entry.js → p-5f5403e2.entry.js} +2 -2
- package/dist/core/{p-c2b5e7b1.entry.js.map → p-5f5403e2.entry.js.map} +1 -1
- package/dist/core/p-710c6a42.entry.js +2 -0
- package/dist/core/p-710c6a42.entry.js.map +1 -0
- package/dist/core/p-73b40c79.entry.js +2 -0
- package/dist/core/p-73b40c79.entry.js.map +1 -0
- package/dist/core/p-77a32de5.entry.js +2 -0
- package/dist/core/p-77a32de5.entry.js.map +1 -0
- package/dist/core/p-7a9de008.entry.js +2 -0
- package/dist/core/p-7a9de008.entry.js.map +1 -0
- package/dist/core/p-801414e2.entry.js +2 -0
- package/dist/core/p-801414e2.entry.js.map +1 -0
- package/dist/core/p-82ba744d.entry.js +2 -0
- package/dist/core/p-82ba744d.entry.js.map +1 -0
- package/dist/core/p-897b8d16.entry.js +2 -0
- package/dist/core/p-897b8d16.entry.js.map +1 -0
- package/dist/core/p-9397b15b.js +2 -0
- package/dist/core/p-9397b15b.js.map +1 -0
- package/dist/core/p-9af6adb1.entry.js +2 -0
- package/dist/core/p-9af6adb1.entry.js.map +1 -0
- package/dist/core/p-9b54feca.entry.js +2 -0
- package/dist/core/p-9b54feca.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-a57cd616.entry.js +2 -0
- package/dist/core/p-a57cd616.entry.js.map +1 -0
- package/dist/core/p-a5eaed1a.entry.js +2 -0
- package/dist/core/p-a5eaed1a.entry.js.map +1 -0
- package/dist/core/p-a78cf2cb.entry.js +2 -0
- package/dist/core/p-a78cf2cb.entry.js.map +1 -0
- package/dist/core/p-a91340b4.entry.js +2 -0
- package/dist/core/p-a91340b4.entry.js.map +1 -0
- package/dist/core/p-aee8d45b.entry.js +2 -0
- package/dist/core/p-aee8d45b.entry.js.map +1 -0
- package/dist/core/{p-452985d9.entry.js → p-b40ecaef.entry.js} +2 -2
- package/dist/core/p-b40ecaef.entry.js.map +1 -0
- package/dist/core/p-badd4c8d.entry.js +2 -0
- package/dist/core/p-badd4c8d.entry.js.map +1 -0
- package/dist/core/p-bf670360.entry.js +2 -0
- package/dist/core/{p-b306cbc8.entry.js.map → p-bf670360.entry.js.map} +1 -1
- package/dist/core/p-c033e7d6.entry.js +2 -0
- package/dist/core/p-c033e7d6.entry.js.map +1 -0
- package/dist/core/p-c07af2d8.entry.js +2 -0
- package/dist/core/p-c07af2d8.entry.js.map +1 -0
- package/dist/core/p-c21d0db8.entry.js +2 -0
- package/dist/core/p-c21d0db8.entry.js.map +1 -0
- package/dist/core/p-c678f73d.entry.js +2 -0
- package/dist/core/p-c678f73d.entry.js.map +1 -0
- package/dist/core/p-c6ae9bad.entry.js +2 -0
- package/dist/core/p-c6ae9bad.entry.js.map +1 -0
- package/dist/core/p-c6c1e08e.entry.js +2 -0
- package/dist/core/p-c6c1e08e.entry.js.map +1 -0
- package/dist/core/p-cb6cebdd.entry.js +2 -0
- package/dist/core/p-cb6cebdd.entry.js.map +1 -0
- package/dist/core/p-d03374fc.entry.js +2 -0
- package/dist/core/p-d03374fc.entry.js.map +1 -0
- package/dist/core/p-d16f364a.entry.js +2 -0
- package/dist/core/p-d16f364a.entry.js.map +1 -0
- package/dist/core/p-d239c33b.entry.js +2 -0
- package/dist/core/p-d239c33b.entry.js.map +1 -0
- package/dist/core/p-d8563643.entry.js +2 -0
- package/dist/core/p-d8563643.entry.js.map +1 -0
- package/dist/core/p-da40757f.entry.js +2 -0
- package/dist/core/p-da40757f.entry.js.map +1 -0
- package/dist/core/p-de052137.entry.js +2 -0
- package/dist/core/p-de052137.entry.js.map +1 -0
- package/dist/core/p-e5d99316.entry.js +2 -0
- package/dist/core/p-e5d99316.entry.js.map +1 -0
- package/dist/core/p-e89bb650.entry.js +2 -0
- package/dist/core/p-e89bb650.entry.js.map +1 -0
- package/dist/core/{p-baf81f30.entry.js → p-f1072c28.entry.js} +2 -2
- package/dist/core/{p-452985d9.entry.js.map → p-f1072c28.entry.js.map} +1 -1
- package/dist/core/p-f37df214.entry.js +2 -0
- package/dist/core/{p-d3856ed3.entry.js.map → p-f37df214.entry.js.map} +1 -1
- package/dist/core/p-f743b0eb.entry.js +2 -0
- package/dist/core/p-f743b0eb.entry.js.map +1 -0
- package/dist/core/p-f98b1afc.entry.js +2 -0
- package/dist/core/p-f98b1afc.entry.js.map +1 -0
- package/dist/core/p-fe13f1ba.entry.js +2 -0
- package/dist/core/p-fe13f1ba.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{date-helpers-4f432e92.js → date-helpers-0e5e32a7.js} +2 -2
- package/dist/esm/{date-helpers-4f432e92.js.map → date-helpers-0e5e32a7.js.map} +1 -1
- package/dist/esm/{helpers-f328a7b6.js → helpers-5bd2012a.js} +108 -2
- package/dist/esm/helpers-5bd2012a.js.map +1 -0
- package/dist/esm/{helpers-7aa21b0a.js → helpers-dab8ddfe.js} +85 -91
- package/dist/esm/helpers-dab8ddfe.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +31 -9
- package/dist/esm/ic-accordion-group.entry.js.map +1 -1
- package/dist/esm/ic-accordion.entry.js +7 -8
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +27 -9
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +17 -8
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js +67 -117
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +37 -11
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +8 -7
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +112 -125
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +127 -0
- package/dist/esm/ic-card-horizontal.entry.js.map +1 -0
- package/dist/esm/ic-card-vertical.entry.js +145 -0
- package/dist/esm/ic-card-vertical.entry.js.map +1 -0
- package/dist/esm/ic-checkbox-group.entry.js +27 -20
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +45 -40
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +40 -29
- 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-list.entry.js +28 -0
- package/dist/esm/ic-data-list.entry.js.map +1 -0
- package/dist/esm/ic-data-row.entry.js +12 -12
- 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 +806 -66
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +71 -34
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +82 -56
- package/dist/esm/ic-date-picker.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +27 -101
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +1 -2
- package/dist/esm/ic-divider.entry.js.map +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +312 -0
- package/dist/esm/ic-empty-state_2.entry.js.map +1 -0
- package/dist/esm/ic-footer-link-group.entry.js +9 -10
- package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
- package/dist/esm/ic-footer-link.entry.js +6 -8
- package/dist/esm/ic-footer-link.entry.js.map +1 -1
- package/dist/esm/ic-footer.entry.js +9 -10
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +28 -13
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +6 -8
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_4.entry.js +35 -29
- package/dist/esm/ic-input-component-container_4.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +52 -25
- package/dist/esm/ic-link.entry.js.map +1 -1
- package/dist/esm/ic-menu-group.entry.js +2 -3
- package/dist/esm/ic-menu-group.entry.js.map +1 -1
- package/dist/esm/ic-menu-item.entry.js +6 -13
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-menu-with-multi.entry.js +186 -47
- package/dist/esm/ic-menu-with-multi.entry.js.map +1 -1
- package/dist/esm/ic-menu.entry.js +16 -21
- package/dist/esm/ic-menu.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +28 -8
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +23 -21
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +33 -38
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +3 -4
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +10 -12
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination_4.entry.js +219 -178
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +15 -21
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +75 -51
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +44 -53
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +19 -26
- 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 +14 -50
- package/dist/esm/ic-select-with-multi.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +8 -9
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js +17 -37
- package/dist/esm/ic-skeleton.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +7 -15
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +42 -43
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +45 -24
- package/dist/esm/ic-stepper.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +7 -9
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +35 -18
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +25 -11
- package/dist/esm/ic-tab-group.entry.js.map +1 -1
- package/dist/esm/ic-tab-panel.entry.js +6 -13
- package/dist/esm/ic-tab-panel.entry.js.map +1 -1
- package/dist/esm/ic-tab.entry.js +10 -9
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +39 -25
- package/dist/esm/ic-theme.entry.js.map +1 -1
- package/dist/esm/ic-toast-region.entry.js +6 -7
- package/dist/esm/ic-toast-region.entry.js.map +1 -1
- package/dist/esm/ic-toast.entry.js +88 -35
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +17 -17
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +15 -14
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +62 -86
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-tree-item.entry.js +237 -0
- package/dist/esm/ic-tree-item.entry.js.map +1 -0
- package/dist/esm/ic-tree-view.entry.js +199 -0
- package/dist/esm/ic-tree-view.entry.js.map +1 -0
- package/dist/esm/ic-typography.entry.js +56 -20
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/index-93509377.js +26 -14
- 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.types.d.ts +1 -0
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +176 -19
- package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +30 -0
- package/dist/types/components/ic-data-table/story-data.d.ts +236 -3
- package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.d.ts +36 -0
- package/dist/types/components/ic-date-input/ic-date-input.d.ts +17 -0
- package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +14 -25
- package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +10 -4
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +37 -18
- package/dist/types/components/ic-select-with-multi/ic-select.d.ts +1 -31
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +95 -0
- package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +40 -0
- package/dist/types/components.d.ts +543 -114
- package/dist/types/interface.d.ts +1 -0
- package/dist/types/utils/helpers.d.ts +9 -0
- package/dist/types/utils/types.d.ts +24 -8
- package/hydrate/index.js +4264 -2362
- package/package.json +6 -6
- package/dist/cjs/helpers-7a069459.js.map +0 -1
- package/dist/cjs/helpers-f75cf7cf.js.map +0 -1
- package/dist/cjs/ic-card.cjs.entry.js +0 -126
- package/dist/cjs/ic-card.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-data-entity.cjs.entry.js +0 -29
- package/dist/cjs/ic-data-entity.cjs.entry.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-pagination-bar.cjs.entry.js +0 -269
- package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +0 -1
- package/dist/cjs/types-17dba796.js +0 -16
- package/dist/cjs/types-17dba796.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/collection/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.js +0 -146
- package/dist/collection/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js +0 -2040
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js.map +0 -1
- package/dist/components/ic-alert2.js +0 -117
- package/dist/components/ic-alert2.js.map +0 -1
- package/dist/components/ic-card.js +0 -171
- package/dist/components/ic-card.js.map +0 -1
- package/dist/components/ic-data-entity.js +0 -53
- package/dist/components/ic-data-entity.js.map +0 -1
- package/dist/components/types.js +0 -16
- package/dist/components/types.js.map +0 -1
- package/dist/core/p-06ae5bec.entry.js +0 -2
- package/dist/core/p-06ae5bec.entry.js.map +0 -1
- package/dist/core/p-0939ce92.entry.js +0 -2
- package/dist/core/p-0939ce92.entry.js.map +0 -1
- package/dist/core/p-16f67397.entry.js +0 -2
- package/dist/core/p-16f67397.entry.js.map +0 -1
- package/dist/core/p-1832f4b5.entry.js +0 -2
- package/dist/core/p-1832f4b5.entry.js.map +0 -1
- package/dist/core/p-1b7d426b.entry.js +0 -2
- package/dist/core/p-1b7d426b.entry.js.map +0 -1
- package/dist/core/p-1ce75941.entry.js +0 -2
- package/dist/core/p-1ce75941.entry.js.map +0 -1
- package/dist/core/p-2e2e0099.entry.js +0 -2
- package/dist/core/p-2e2e0099.entry.js.map +0 -1
- package/dist/core/p-33679c06.entry.js +0 -2
- package/dist/core/p-33679c06.entry.js.map +0 -1
- package/dist/core/p-36508aad.entry.js +0 -2
- package/dist/core/p-36508aad.entry.js.map +0 -1
- package/dist/core/p-3745da83.entry.js +0 -2
- package/dist/core/p-3745da83.entry.js.map +0 -1
- package/dist/core/p-3f2e77c3.entry.js +0 -2
- package/dist/core/p-3f2e77c3.entry.js.map +0 -1
- package/dist/core/p-47ac6838.entry.js +0 -2
- package/dist/core/p-47ac6838.entry.js.map +0 -1
- package/dist/core/p-4f1ffa39.entry.js +0 -2
- package/dist/core/p-4f1ffa39.entry.js.map +0 -1
- package/dist/core/p-5759d771.entry.js +0 -2
- package/dist/core/p-5759d771.entry.js.map +0 -1
- package/dist/core/p-5e2e6c3b.entry.js +0 -2
- package/dist/core/p-5e2e6c3b.entry.js.map +0 -1
- package/dist/core/p-5fe96107.entry.js +0 -2
- package/dist/core/p-5fe96107.entry.js.map +0 -1
- package/dist/core/p-62e22508.entry.js +0 -2
- package/dist/core/p-62e22508.entry.js.map +0 -1
- package/dist/core/p-6690bc04.entry.js +0 -2
- package/dist/core/p-6690bc04.entry.js.map +0 -1
- package/dist/core/p-6c0e2ceb.entry.js +0 -2
- package/dist/core/p-6c0e2ceb.entry.js.map +0 -1
- package/dist/core/p-76915584.entry.js +0 -2
- package/dist/core/p-76915584.entry.js.map +0 -1
- package/dist/core/p-76d26018.entry.js +0 -2
- package/dist/core/p-76d26018.entry.js.map +0 -1
- package/dist/core/p-776671cf.entry.js +0 -2
- package/dist/core/p-776671cf.entry.js.map +0 -1
- package/dist/core/p-7cecf5d5.entry.js +0 -2
- package/dist/core/p-7cecf5d5.entry.js.map +0 -1
- package/dist/core/p-85609bdd.entry.js +0 -2
- package/dist/core/p-85609bdd.entry.js.map +0 -1
- package/dist/core/p-86012178.entry.js +0 -2
- package/dist/core/p-86012178.entry.js.map +0 -1
- package/dist/core/p-8a7e7d23.entry.js +0 -2
- package/dist/core/p-8a7e7d23.entry.js.map +0 -1
- package/dist/core/p-8c90110a.entry.js +0 -2
- package/dist/core/p-8c90110a.entry.js.map +0 -1
- package/dist/core/p-8ea47d42.entry.js +0 -2
- package/dist/core/p-8ea47d42.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-982a6e88.entry.js +0 -2
- package/dist/core/p-982a6e88.entry.js.map +0 -1
- package/dist/core/p-98448bdb.entry.js +0 -2
- package/dist/core/p-98448bdb.entry.js.map +0 -1
- package/dist/core/p-9d01a7ad.entry.js +0 -2
- package/dist/core/p-9d01a7ad.entry.js.map +0 -1
- package/dist/core/p-9d540656.entry.js +0 -2
- package/dist/core/p-9d540656.entry.js.map +0 -1
- package/dist/core/p-9e3178e8.entry.js +0 -2
- package/dist/core/p-9e3178e8.entry.js.map +0 -1
- package/dist/core/p-a0f9b259.entry.js +0 -2
- package/dist/core/p-a0f9b259.entry.js.map +0 -1
- package/dist/core/p-a42c2f37.entry.js +0 -2
- package/dist/core/p-a42c2f37.entry.js.map +0 -1
- package/dist/core/p-a6447b13.entry.js +0 -2
- package/dist/core/p-a6447b13.entry.js.map +0 -1
- package/dist/core/p-aabab75f.entry.js +0 -2
- package/dist/core/p-aabab75f.entry.js.map +0 -1
- package/dist/core/p-ae422058.entry.js +0 -2
- package/dist/core/p-ae422058.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-b306cbc8.entry.js +0 -2
- package/dist/core/p-baf81f30.entry.js.map +0 -1
- package/dist/core/p-c7590421.entry.js +0 -2
- package/dist/core/p-c7590421.entry.js.map +0 -1
- package/dist/core/p-c7820c23.entry.js +0 -2
- package/dist/core/p-c7820c23.entry.js.map +0 -1
- package/dist/core/p-ca8cbd6a.entry.js +0 -2
- package/dist/core/p-ca8cbd6a.entry.js.map +0 -1
- package/dist/core/p-caf857de.entry.js +0 -2
- package/dist/core/p-caf857de.entry.js.map +0 -1
- package/dist/core/p-cc7bc438.entry.js +0 -2
- package/dist/core/p-cc7bc438.entry.js.map +0 -1
- package/dist/core/p-cd799087.js +0 -2
- package/dist/core/p-cd799087.js.map +0 -1
- package/dist/core/p-d32692e2.entry.js +0 -2
- package/dist/core/p-d32692e2.entry.js.map +0 -1
- package/dist/core/p-d35c7c18.js +0 -2
- package/dist/core/p-d35c7c18.js.map +0 -1
- package/dist/core/p-d3856ed3.entry.js +0 -2
- package/dist/core/p-d4fdd8c1.entry.js +0 -2
- package/dist/core/p-d4fdd8c1.entry.js.map +0 -1
- package/dist/core/p-d5c99ec3.entry.js +0 -2
- package/dist/core/p-d5c99ec3.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-e473bbf8.entry.js +0 -2
- package/dist/core/p-e473bbf8.entry.js.map +0 -1
- package/dist/core/p-e74f1d09.entry.js +0 -2
- package/dist/core/p-e74f1d09.entry.js.map +0 -1
- package/dist/core/p-e79e0292.entry.js +0 -2
- package/dist/core/p-e79e0292.entry.js.map +0 -1
- package/dist/core/p-e84b0310.entry.js +0 -2
- package/dist/core/p-e84b0310.entry.js.map +0 -1
- package/dist/core/p-f55ad6ae.entry.js +0 -2
- package/dist/core/p-f55ad6ae.entry.js.map +0 -1
- package/dist/core/p-f91527a0.entry.js +0 -2
- package/dist/core/p-f91527a0.entry.js.map +0 -1
- package/dist/core/p-fbf4e9b7.entry.js +0 -2
- package/dist/core/p-fbf4e9b7.entry.js.map +0 -1
- package/dist/core/p-fd186591.js +0 -2
- package/dist/core/p-fd186591.js.map +0 -1
- package/dist/esm/helpers-7aa21b0a.js.map +0 -1
- package/dist/esm/helpers-f328a7b6.js.map +0 -1
- package/dist/esm/ic-card.entry.js +0 -122
- package/dist/esm/ic-card.entry.js.map +0 -1
- package/dist/esm/ic-data-entity.entry.js +0 -25
- package/dist/esm/ic-data-entity.entry.js.map +0 -1
- package/dist/esm/ic-empty-state.entry.js +0 -34
- package/dist/esm/ic-empty-state.entry.js.map +0 -1
- package/dist/esm/ic-pagination-bar.entry.js +0 -265
- package/dist/esm/ic-pagination-bar.entry.js.map +0 -1
- package/dist/esm/types-f605c21c.js +0 -16
- package/dist/esm/types-f605c21c.js.map +0 -1
- package/dist/types/components/ic-pagination/ic-pagination.types.d.ts +0 -6
- /package/dist/core/{p-f8cf2978.js.map → p-33dd24eb.js.map} +0 -0
- /package/dist/types/components/{ic-select-with-multi/test/a11y/ic-select.test.a11y.d.ts → ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.d.ts} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-back-to-top.entry.cjs.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,cAAc,GAAG,uwIAAuwI;;ACG9xI,MAAM,cAAc,GAAG,aAAa,CAAC;MACxB,SAAS;IAClB;;QACI,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,kBAAkB,GAAG,CAAC,OAAO;YAC9B,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC;SAClC,CAAC;QACF,IAAI,CAAC,gBAAgB,GAAG,CAAC,OAAO;YAC5B,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACpC,IAAI,CAAC,aAAa;gBACd,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,OAAO,KAAK,CAAC,GAAG,KAAK,GAAG,OAAO,CAAC;SAC/E,CAAC;QACF,IAAI,CAAC,wBAAwB,GAAG,CAAC,OAAO;YACpC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;SACtD,CAAC;QACF,IAAI,CAAC,sBAAsB,GAAG,CAAC,OAAO;YAClC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;SACpD,CAAC;QACF,IAAI,CAAC,YAAY,GAAG,CAAC,MAAM;YACvB,IAAI,aAAa,GAAG,IAAI,CAAC;YACzB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,CAAC,eAAe,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAEA,OAAC,CAAC,MAAM,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE;KAC/N;IAGD,WAAW,cAAc,KAAK,OAAO,IAAI,CAAC,EAAE;;;;;;;;;;","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 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 = 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":";;;;;;;;;;;;AAAA,MAAM,cAAc,GAAG,snHAAsnH;;ACG7oH,MAAM,cAAc,GAAG,aAAa,CAAC;MACxB,SAAS;IAClB;;QACI,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,aAAa,GAAG;YACjB,OAAO,QAAQ,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAC;SAC3D,CAAC;QACF,IAAI,CAAC,kBAAkB,GAAG,CAAC,OAAO;YAC9B,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC;SAClC,CAAC;QACF,IAAI,CAAC,gBAAgB,GAAG,CAAC,OAAO;YAC5B,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACpC,IAAI,CAAC,aAAa;gBACd,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,OAAO,KAAK,CAAC,GAAG,KAAK,GAAG,OAAO,CAAC;SAC/E,CAAC;QACF,IAAI,CAAC,wBAAwB,GAAG,CAAC,OAAO;YACpC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;SACtD,CAAC;QACF,IAAI,CAAC,sBAAsB,GAAG,CAAC,OAAO;YAClC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;SACpD,CAAC;QACF,IAAI,CAAC,YAAY,GAAG,CAAC,MAAM;YACvB,IAAI,aAAa,GAAG,IAAI,CAAC;YACzB,IAAI,MAAM,KAAK,IAAI,IAAI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,EAAE,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE;gBAClH,CAAC,eAAe,GAAG,YAAY;gBAC/B,CAAC,MAAM,GAAG,CAAC,eAAe;gBAC1B,CAAC,WAAW,GAAG,aAAa;gBAC5B,CAAC,WAAW,GAAG,OAAO,KAAK,MAAM;aACpC,EAAE,EAAEA,OAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE;KACzF;IAGD,WAAW,cAAc,KAAK,OAAO,IAAI,CAAC,EAAE;;;;;;;;;;","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\nic-button {\n height: 2.5rem;\n align-items: center;\n background-color: var(--ic-architectural-white);\n border-radius: 5rem;\n box-shadow: var(--ic-elevation-overlay);\n visibility: hidden;\n opacity: 0;\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\nic-button::part(button) {\n border-radius: 5rem;\n border: var(--ic-border-width) solid var(--ic-action-default);\n}\n\nic-button.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\nic-button.by-footer {\n position: relative;\n right: var(--ic-space-md);\n bottom: 3.5rem;\n}\n\nic-button.offset-banner {\n margin-bottom: var(--ic-space-lg);\n}\n\n.ic-back-to-top-icon {\n padding-top: var(--ic-space-xxs);\n padding-right: var(--ic-space-xs);\n}\n\n.ic-back-to-top-icon > svg {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n}\n\n.icon-only {\n width: 2.5rem;\n}\n\n.icon-only .ic-back-to-top-icon > svg {\n padding-left: calc(var(--ic-space-xs) - var(--ic-space-1px));\n}\n\n@media (forced-colors: active) {\n .icon-only .ic-back-to-top-icon > svg {\n padding-left: calc(var(--ic-space-xs) - var(--ic-space-xxxs));\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.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, bannerOffset, targetElVisible, footerVisible } = this;\n const btnVariant = variant === \"icon\" ? \"icon\" : \"tertiary\";\n const size = variant === \"icon\" ? \"large\" : \"medium\";\n const label = variant === \"icon\" ? \"\" : backToTopLabel;\n return (h(\"ic-button\", { \"aria-label\": backToTopLabel, variant: btnVariant, size: size, onClick: this.handleClick, class: {\n [\"offset-banner\"]: bannerOffset,\n [\"show\"]: !targetElVisible,\n [\"by-footer\"]: footerVisible,\n [\"icon-only\"]: variant === \"icon\",\n } }, h(\"span\", { class: \"ic-back-to-top-icon\", innerHTML: ArrowUpward }), label));\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,156 +3,106 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-4cf27b16.js');
|
6
|
-
const
|
7
|
-
const helpers = require('./helpers-7a069459.js');
|
6
|
+
const helpers = require('./helpers-33b42cd6.js');
|
8
7
|
|
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-
|
8
|
+
const icBadgeCss = "@media (prefers-reduced-motion: no-preference){:host(.ic-badge-show){animation:expand var(--ic-transition-duration-slow)}:host(.ic-badge-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 ic-typography{--ic-typography-color:var(--ic-badge-text)}:host(.ic-badge-neutral){background-color:var(--ic-badge-neutral) !important}:host(.ic-badge-light) ic-typography{--ic-typography-color:var(--ic-badge-light-text)}:host(.ic-badge-light) ::slotted(*){fill:var(--ic-badge-light-icon)}:host(.ic-badge-info){background-color:var(--ic-badge-info) !important}:host(.ic-badge-light){background-color:var(--ic-badge-light) !important}:host(.ic-badge-warning){background-color:var(--ic-badge-warning) !important}:host(.ic-badge-warning) ic-typography{--ic-typography-color:var(--ic-badge-warning-text)}:host(.ic-badge-warning) ::slotted(*){fill:var(--ic-badge-warning-icon)}:host(.ic-badge-error){background-color:var(--ic-badge-error) !important}:host(.ic-badge-success){background-color:var(--ic-badge-success) !important}:host(.ic-badge-small){height:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host(.ic-badge-large){height:calc(var(--ic-space-md) + var(--ic-space-xxs));min-width:calc(var(--ic-space-md) + var(--ic-space-xxs))}:host(.ic-badge-dot.ic-badge-medium){height:var(--ic-space-xs);width:var(--ic-space-xs);min-width:var(--ic-space-xs)}:host(.ic-badge-dot.ic-badge-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(.ic-badge-dot.ic-badge-large){height:var(--ic-space-sm);width:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host ::slotted(*){fill:var(--ic-badge-icon)}:host(.ic-badge-foreground-dark) ::slotted(*){fill:var(--ic-color-primary-text-light)}:host(.ic-badge-foreground-light) ::slotted(*){fill:white}:host(.ic-badge-foreground-dark) ic-typography{--ic-typography-color:var(--ic-color-primary-text-light)}:host(.ic-badge-foreground-light) ic-typography{--ic-typography-color:var(--ic-color-primary-text-dark)}:host(.ic-badge-text) ic-typography{align-self:center;padding:0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.ic-badge-text.ic-badge-small) ic-typography{padding:0 0.2132rem}:host(.ic-badge-text.ic-badge-large) ic-typography{padding:0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.ic-badge-icon) ::slotted(svg){width:var(--ic-space-sm);height:var(--ic-space-sm);padding:var(--ic-space-xxxs)}:host(.ic-badge-icon.ic-badge-small) ::slotted(svg){width:var(--ic-space-xs);height:var(--ic-space-xs)}:host(.ic-badge-icon.ic-badge-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(.ic-badge-far){top:calc(-1 * var(--ic-space-xs));right:calc(-1 * var(--ic-space-xs))}:host(.ic-badge-far.ic-badge-small),:host(.ic-badge-dot.ic-badge-far.ic-badge-large){top:calc(-1 * var(--ic-space-xxs));right:calc(-1 * var(--ic-space-xxs))}:host(.ic-badge-dot.ic-badge-far),:host(.ic-badge-dot.ic-badge-far.ic-badge-small){top:calc(-1 * var(--ic-space-xxxs));right:calc(-1 * var(--ic-space-xxxs))}:host(.ic-badge-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(.ic-badge-dot.ic-badge-near){top:calc(-1 * var(--ic-space-1px));right:calc(-1 * var(--ic-space-1px))}:host(.ic-badge-inline){position:static}:host(.ic-badge-hide){visibility:hidden !important;transition:visibility var(--ic-transition-duration-slow)}.sr-only{position:absolute;left:-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
9
|
|
11
10
|
const Badge = class {
|
12
11
|
constructor(hostRef) {
|
13
12
|
index.registerInstance(this, hostRef);
|
13
|
+
this.ariaLabel = null;
|
14
14
|
this.setBadgeColour = () => {
|
15
|
-
|
16
|
-
if (
|
17
|
-
const
|
18
|
-
|
19
|
-
|
20
|
-
}
|
21
|
-
else if (firstChar.toLowerCase() === "r") {
|
22
|
-
colorRGBA = helpers.rgbaStrToObj(this.customColor);
|
23
|
-
}
|
24
|
-
this.customColorRGBA = colorRGBA;
|
25
|
-
this.el.style.backgroundColor = `rgba(${colorRGBA.r.toString()}, ${colorRGBA.g.toString()}, ${colorRGBA.b.toString()}, ${colorRGBA.a.toString()})`;
|
15
|
+
const colorRGBA = helpers.convertToRGBA(this.customColor);
|
16
|
+
if (colorRGBA) {
|
17
|
+
const { r, g, b, a } = colorRGBA;
|
18
|
+
this.el.style.backgroundColor = `rgba(${r}, ${g}, ${b}, ${a})`;
|
19
|
+
this.foregroundColour = helpers.getThemeForegroundColor((r * 299 + g * 587 + b * 114) / 1000);
|
26
20
|
}
|
27
21
|
};
|
28
|
-
this.
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
case "custom":
|
34
|
-
red = this.customColorRGBA.r;
|
35
|
-
green = this.customColorRGBA.g;
|
36
|
-
blue = this.customColorRGBA.b;
|
37
|
-
break;
|
38
|
-
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
|
-
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
|
-
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
|
-
case "info": {
|
54
|
-
const info = helpers.hexToRgba(helpers.getCssProperty("--ic-status-info"));
|
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;
|
73
|
-
}
|
74
|
-
}
|
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
|
-
};
|
81
|
-
this.getTextLabel = () => {
|
82
|
-
let label;
|
83
|
-
if (this.textLabel !== null) {
|
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;
|
95
|
-
};
|
22
|
+
this.getLabel = () => this.maxNumber && Number(this.label) > this.maxNumber
|
23
|
+
? `${this.maxNumber}+`
|
24
|
+
: this.label;
|
25
|
+
// Set aria-label on badge and / or parent element
|
26
|
+
// Aria-describedby seems to not work, probably due to shadow DOM
|
96
27
|
this.setAccessibleLabel = () => {
|
97
|
-
|
98
|
-
|
99
|
-
|
28
|
+
const parentEl = this.el.parentElement;
|
29
|
+
const defaultAriaLabel = this.isAccessibleLabelDefined()
|
30
|
+
? this.accessibleLabel
|
31
|
+
: this.label || "with badge being displayed";
|
32
|
+
if (parentEl) {
|
33
|
+
const { tagName } = parentEl;
|
34
|
+
if (tagName !== "IC-CARD" &&
|
35
|
+
(tagName !== "IC-TAB" || (tagName === "IC-TAB" && this.parentAriaLabel))) {
|
36
|
+
const ariaLabelPrefix = this.parentAriaLabel
|
37
|
+
? `${this.parentAriaLabel} ,`
|
38
|
+
: "";
|
39
|
+
parentEl.ariaLabel = this.visible
|
40
|
+
? `${ariaLabelPrefix} ${defaultAriaLabel}`
|
41
|
+
: undefined;
|
100
42
|
}
|
101
43
|
else {
|
102
|
-
|
44
|
+
this.ariaLabel = `, ${defaultAriaLabel}`;
|
103
45
|
}
|
104
46
|
}
|
105
47
|
};
|
106
|
-
this.isAccessibleLabelDefined = () =>
|
107
|
-
return helpers.isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;
|
108
|
-
};
|
48
|
+
this.isAccessibleLabelDefined = () => helpers.isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;
|
109
49
|
this.accessibleLabel = undefined;
|
110
50
|
this.customColor = null;
|
111
51
|
this.maxNumber = undefined;
|
112
52
|
this.position = "far";
|
113
|
-
this.size = "
|
114
|
-
this.
|
53
|
+
this.size = "medium";
|
54
|
+
this.label = undefined;
|
55
|
+
this.theme = "inherit";
|
115
56
|
this.type = "text";
|
116
57
|
this.variant = "neutral";
|
117
58
|
this.visible = true;
|
118
59
|
}
|
60
|
+
accessibleLabelHandler() {
|
61
|
+
this.setAccessibleLabel();
|
62
|
+
}
|
63
|
+
customColorHandler() {
|
64
|
+
this.variant === "custom" && this.setBadgeColour();
|
65
|
+
}
|
66
|
+
variantHandler() {
|
67
|
+
if (this.variant === "custom") {
|
68
|
+
this.setBadgeColour();
|
69
|
+
}
|
70
|
+
}
|
71
|
+
visibleHandler() {
|
72
|
+
this.setAccessibleLabel();
|
73
|
+
}
|
119
74
|
componentWillLoad() {
|
75
|
+
var _a;
|
120
76
|
this.variant === "custom" && this.setBadgeColour();
|
121
|
-
this.
|
122
|
-
|
77
|
+
const ariaLabel = (_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.ariaLabel;
|
78
|
+
if (ariaLabel)
|
79
|
+
this.parentAriaLabel = ariaLabel;
|
80
|
+
this.setAccessibleLabel();
|
123
81
|
}
|
124
82
|
componentDidLoad() {
|
125
83
|
this.type === "text" &&
|
126
|
-
helpers.onComponentRequiredPropUndefined([{ prop: this.
|
127
|
-
}
|
128
|
-
/**
|
129
|
-
* @deprecated This method should not be used anymore. Use visible prop to set badge visibility.
|
130
|
-
*/
|
131
|
-
async showBadge() {
|
132
|
-
this.visible = true;
|
133
|
-
}
|
134
|
-
/**
|
135
|
-
* @deprecated This method should not be used anymore. Use visible prop to set badge visibility.
|
136
|
-
*/
|
137
|
-
async hideBadge() {
|
138
|
-
this.visible = false;
|
84
|
+
helpers.onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Badge");
|
139
85
|
}
|
140
86
|
render() {
|
141
|
-
const { position, size, type, variant,
|
87
|
+
const { ariaLabel, el, foregroundColour, getLabel, position, size, label, type, variant, visible, theme, } = this;
|
142
88
|
return (index.h(index.Host, { class: {
|
143
|
-
[
|
144
|
-
[
|
145
|
-
[
|
146
|
-
[
|
147
|
-
[`foreground-${foregroundColour}`]: foregroundColour !== null,
|
148
|
-
["show"]:
|
149
|
-
[
|
150
|
-
}, id:
|
151
|
-
? `badge displaying ${this.accessibleLabel}`
|
152
|
-
: "badge being displayed", role: "status" }, type === "icon" && index.h("slot", { name: "badge-icon" }), type === "text" && (index.h("ic-typography", { variant: size === "small" ? "badge-small" : "badge" }, this.getTextLabel()))));
|
89
|
+
[`ic-badge-${position}`]: true,
|
90
|
+
[`ic-badge-${size}`]: true,
|
91
|
+
[`ic-badge-${variant}`]: true,
|
92
|
+
[`ic-badge-${type}`]: true,
|
93
|
+
[`ic-badge-foreground-${foregroundColour}`]: foregroundColour !== null && variant === "custom",
|
94
|
+
[`${visible ? "ic-badge-show" : "ic-badge-hide"}`]: true,
|
95
|
+
[`ic-theme-${theme}`]: theme !== "inherit",
|
96
|
+
}, id: el.id || null, "aria-label": ariaLabel, role: "status" }, type === "icon" && index.h("slot", { name: "badge-icon" }), type === "text" && label && (index.h("ic-typography", { variant: size === "small" ? "badge-small" : "badge" }, getLabel())), type === "dot" && index.h("span", { class: "sr-only" }, "badge")));
|
153
97
|
}
|
154
98
|
static get delegatesFocus() { return true; }
|
155
99
|
get el() { return index.getElement(this); }
|
100
|
+
static get watchers() { return {
|
101
|
+
"accessibleLabel": ["accessibleLabelHandler"],
|
102
|
+
"customColor": ["customColorHandler"],
|
103
|
+
"variant": ["variantHandler"],
|
104
|
+
"visible": ["visibleHandler"]
|
105
|
+
}; }
|
156
106
|
};
|
157
107
|
Badge.style = icBadgeCss;
|
158
108
|
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-badge.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,UAAU,GAAG,s/FAAs/F;;MCM5/F,KAAK;IACd;;QACI,IAAI,CAAC,cAAc,GAAG;YAClB,IAAI,SAAS,GAAG,IAAI,CAAC;YACrB,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI,EAAE;gBAC3B,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC/C,IAAI,SAAS,KAAK,GAAG,EAAE;oBACnB,SAAS,GAAGA,iBAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;iBAC3C;qBACI,IAAI,SAAS,CAAC,WAAW,EAAE,KAAK,GAAG,EAAE;oBACtC,SAAS,GAAGC,oBAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;iBAC9C;gBACD,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;gB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AAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,KAAK,MAAM,KAAKA,OAAC,CAAC,eAAe,EAAE,EAAE,OAAO,EAAE,IAAI,KAAK,OAAO,GAAG,aAAa,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE;KACtO;IAGD,WAAW,cAAc,KAAK,OAAO,IAAI,CAAC,EAAE;;;;;;;","names":["hexToRgba","rgbaStrToObj","getCssProperty","IcThemeForegroundEnum","getParentElement","getParentElementType","isPropDefined","onComponentRequiredPropUndefined","h","Host"],"sources":["../web-components/dist/collection/components/ic-badge/ic-badge.css?tag=ic-badge&encapsulation=shadow","../web-components/dist/collection/components/ic-badge/ic-badge.js"],"sourcesContent":["@media (prefers-reduced-motion: no-preference) {\n :host(.show) {\n animation: expand var(--ic-transition-duration-slow);\n }\n\n :host(.hide) {\n animation: shrink var(--ic-transition-duration-slow);\n }\n}\n\n:host {\n display: flex;\n height: var(--ic-space-md);\n min-width: var(--ic-space-md);\n width: -moz-fit-content;\n width: fit-content;\n border-radius: calc(2 * var(--ic-space-xxl));\n position: absolute;\n}\n\n:host(.neutral) {\n background-color: var(--ic-architectural-500);\n}\n\n:host(.light) {\n background-color: var(--ic-architectural-40);\n}\n\n:host(.info) {\n background-color: var(--ic-status-info);\n}\n\n:host(.warning) {\n background-color: var(--ic-status-warning-mid);\n}\n\n:host(.error) {\n background-color: var(--ic-status-error);\n}\n\n:host(.success) {\n background-color: var(--ic-status-success);\n}\n\n:host(.small) {\n height: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host(.large) {\n height: calc(var(--ic-space-md) + var(--ic-space-xxs));\n min-width: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n:host(.dot.default) {\n height: var(--ic-space-xs);\n width: var(--ic-space-xs);\n min-width: var(--ic-space-xs);\n}\n\n:host(.dot.small) {\n height: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n min-width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n}\n\n:host(.dot.large) {\n height: var(--ic-space-sm);\n width: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host(.foreground-dark) ::slotted(*) {\n fill: var(--ic-color-primary-text);\n}\n\n:host(.foreground-light) ::slotted(*) {\n fill: white;\n}\n\n:host(.foreground-dark) ic-typography {\n color: var(--ic-color-primary-text);\n}\n\n:host(.foreground-light) ic-typography {\n color: white;\n}\n\n:host(.text) ic-typography {\n align-self: center;\n padding: 0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.text.small) ic-typography {\n padding: 0 0.2132rem;\n}\n\n:host(.text.large) ic-typography {\n padding: 0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.icon) ::slotted(svg) {\n width: var(--ic-space-sm);\n height: var(--ic-space-sm);\n padding: var(--ic-space-xxxs);\n}\n\n:host(.icon.small) ::slotted(svg) {\n width: var(--ic-space-xs);\n height: var(--ic-space-xs);\n}\n\n:host(.icon.large) ::slotted(svg) {\n width: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n height: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n}\n\n:host(.far) {\n top: calc(-1 * var(--ic-space-xs));\n right: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.far.small),\n:host(.dot.far.large) {\n top: calc(-1 * var(--ic-space-xxs));\n right: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.dot.far),\n:host(.dot.far.small) {\n top: calc(-1 * var(--ic-space-xxxs));\n right: calc(-1 * var(--ic-space-xxxs));\n}\n\n:host(.near) {\n top: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n right: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n}\n\n:host(.dot.near) {\n top: calc(-1 * var(--ic-space-1px));\n right: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.inline) {\n position: static;\n}\n\n:host(.hide) {\n visibility: hidden !important;\n transition: visibility var(--ic-transition-duration-slow);\n}\n\n@keyframes expand {\n from {\n opacity: 0;\n transform: scale(0);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes shrink {\n from {\n opacity: 1;\n transform: scale(1);\n }\n\n to {\n opacity: 0;\n transform: scale(0);\n }\n}\n","import { Host, h } from \"@stencil/core\";\nimport { IcThemeForegroundEnum, } from \"../../utils/types\";\nimport { getCssProperty, getParentElement, getParentElementType, hexToRgba, isPropDefined, onComponentRequiredPropUndefined, rgbaStrToObj, } from \"../../utils/helpers\";\n/**\n * @slot badge-icon - Icon will be rendered inside the badge if type is set to icon.\n */\nexport class Badge {\n constructor() {\n this.setBadgeColour = () => {\n let colorRGBA = null;\n if (this.customColor !== null) {\n const firstChar = this.customColor.slice(0, 1);\n if (firstChar === \"#\") {\n colorRGBA = hexToRgba(this.customColor);\n }\n else if (firstChar.toLowerCase() === \"r\") {\n colorRGBA = rgbaStrToObj(this.customColor);\n }\n this.customColorRGBA = colorRGBA;\n this.el.style.backgroundColor = `rgba(${colorRGBA.r.toString()}, ${colorRGBA.g.toString()}, ${colorRGBA.b.toString()}, ${colorRGBA.a.toString()})`;\n }\n };\n this.getBadgeForeground = () => {\n let red;\n let green;\n let blue;\n switch (this.variant) {\n case \"custom\":\n red = this.customColorRGBA.r;\n green = this.customColorRGBA.g;\n blue = this.customColorRGBA.b;\n break;\n case \"error\":\n red = parseInt(getCssProperty(\"--ic-status-error-r\"));\n green = parseInt(getCssProperty(\"--ic-status-error-g\"));\n blue = parseInt(getCssProperty(\"--ic-status-error-b\"));\n break;\n case \"success\":\n red = parseInt(getCssProperty(\"--ic-status-success-r\"));\n green = parseInt(getCssProperty(\"--ic-status-success-g\"));\n blue = parseInt(getCssProperty(\"--ic-status-success-b\"));\n break;\n case \"warning\":\n red = parseInt(getCssProperty(\"--ic-status-warning-r\"));\n green = parseInt(getCssProperty(\"--ic-status-warning-g\"));\n blue = parseInt(getCssProperty(\"--ic-status-warning-b\"));\n break;\n case \"info\": {\n const info = hexToRgba(getCssProperty(\"--ic-status-info\"));\n red = info.r;\n green = info.g;\n blue = info.b;\n break;\n }\n case \"neutral\": {\n const neutral = hexToRgba(getCssProperty(\"--ic-architectural-500\"));\n red = neutral.r;\n green = neutral.g;\n blue = neutral.b;\n break;\n }\n case \"light\": {\n const light = hexToRgba(getCssProperty(\"--ic-architectural-40\"));\n red = light.r;\n green = light.g;\n blue = light.b;\n break;\n }\n }\n const brightness = (red * 299 + green * 587 + blue * 114) / 1000;\n this.foregroundColour =\n brightness > 133.3505\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n };\n this.getTextLabel = () => {\n let label;\n if (this.textLabel !== null) {\n if (this.maxNumber !== null) {\n label =\n Number(this.textLabel) > this.maxNumber\n ? `${this.maxNumber}+`\n : this.textLabel;\n }\n else {\n label = this.textLabel;\n }\n }\n return label;\n };\n this.setAccessibleLabel = () => {\n if (getParentElement(this.el) !== null) {\n if (getParentElementType(this.el) === \"IC-TAB\") {\n getParentElement(this.el).setAttribute(\"aria-describedby\", \"badge\");\n }\n else {\n getParentElement(this.el).ariaLabel = `badge displaying ${this.accessibleLabel}`;\n }\n }\n };\n this.isAccessibleLabelDefined = () => {\n return isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;\n };\n this.accessibleLabel = undefined;\n this.customColor = null;\n this.maxNumber = undefined;\n this.position = \"far\";\n this.size = \"default\";\n this.textLabel = undefined;\n this.type = \"text\";\n this.variant = \"neutral\";\n this.visible = true;\n }\n componentWillLoad() {\n this.variant === \"custom\" && this.setBadgeColour();\n this.getBadgeForeground();\n this.isAccessibleLabelDefined() && this.setAccessibleLabel();\n }\n componentDidLoad() {\n this.type === \"text\" &&\n onComponentRequiredPropUndefined([{ prop: this.textLabel, propName: \"text-label\" }], \"Badge\");\n }\n /**\n * @deprecated This method should not be used anymore. Use visible prop to set badge visibility.\n */\n async showBadge() {\n this.visible = true;\n }\n /**\n * @deprecated This method should not be used anymore. Use visible prop to set badge visibility.\n */\n async hideBadge() {\n this.visible = false;\n }\n render() {\n const { position, size, type, variant, foregroundColour, visible } = this;\n return (h(Host, { class: {\n [`${position}`]: true,\n [`${size}`]: true,\n [`${variant}`]: true,\n [`${type}`]: true,\n [`foreground-${foregroundColour}`]: foregroundColour !== null,\n [\"show\"]: visible,\n [\"hide\"]: !visible,\n }, id: this.el.id || null, \"aria-label\": this.isAccessibleLabelDefined()\n ? `badge displaying ${this.accessibleLabel}`\n : \"badge being displayed\", role: \"status\" }, type === \"icon\" && h(\"slot\", { name: \"badge-icon\" }), type === \"text\" && (h(\"ic-typography\", { variant: size === \"small\" ? \"badge-small\" : \"badge\" }, this.getTextLabel()))));\n }\n static get is() { return \"ic-badge\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-badge.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-badge.css\"]\n };\n }\n static get properties() {\n return {\n \"accessibleLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The accessible label of the badge component to provide context for screen reader users.\"\n },\n \"attribute\": \"accessible-label\",\n \"reflect\": false\n },\n \"customColor\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcColor\",\n \"resolved\": \"`#${string}` | `rgb(${string})` | `rgba(${string})`\",\n \"references\": {\n \"IcColor\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcColor\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The custom badge colour. This will only style the badge component if variant=\\\"custom\\\".\\nCan be a hex value e.g. \\\"#ff0000\\\", RGB e.g. \\\"rgb(255, 0, 0)\\\", or RGBA e.g. \\\"rgba(255, 0, 0, 1)\\\".\"\n },\n \"attribute\": \"custom-color\",\n \"reflect\": false,\n \"defaultValue\": \"null\"\n },\n \"maxNumber\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The maximum number shown on the badge appended with a +.\\nThis will only be displayed if type=\\\"text\\\" and textLabel is not empty.\"\n },\n \"attribute\": \"max-number\",\n \"reflect\": false\n },\n \"position\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgePositions\",\n \"resolved\": \"\\\"far\\\" | \\\"inline\\\" | \\\"near\\\"\",\n \"references\": {\n \"IcBadgePositions\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgePositions\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The positioning of the badge in reference to the parent element.\"\n },\n \"attribute\": \"position\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"far\\\"\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"default\\\" | \\\"large\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the badge to be displayed.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"textLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The text displayed in the badge. This will only be displayed if type=\\\"text\\\".\"\n },\n \"attribute\": \"text-label\",\n \"reflect\": false\n },\n \"type\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgeTypes\",\n \"resolved\": \"\\\"dot\\\" | \\\"icon\\\" | \\\"text\\\"\",\n \"references\": {\n \"IcBadgeTypes\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgeTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The type of badge to be displayed.\"\n },\n \"attribute\": \"type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"text\\\"\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgeVariants\",\n \"resolved\": \"\\\"custom\\\" | \\\"error\\\" | \\\"info\\\" | \\\"light\\\" | \\\"neutral\\\" | \\\"success\\\" | \\\"warning\\\"\",\n \"references\": {\n \"IcBadgeVariants\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgeVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the badge to be displayed.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"neutral\\\"\"\n },\n \"visible\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the badge will be displayed.\"\n },\n \"attribute\": \"visible\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n }\n };\n }\n static get methods() {\n return {\n \"showBadge\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This method should not be used anymore. Use visible prop to set badge visibility.\"\n }]\n }\n },\n \"hideBadge\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This method should not be used anymore. Use visible prop to set badge visibility.\"\n }]\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n}\n//# sourceMappingURL=ic-badge.js.map\n"],"version":3}
|
1
|
+
{"file":"ic-badge.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,UAAU,GAAG,49HAA49H;;MCKl+H,KAAK;IACd;;QACI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,cAAc,GAAG;YAClB,MAAM,SAAS,GAAGA,qBAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAClD,IAAI,SAAS,EAAE;gBACX,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC;gBACjC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;gBAC/D,IAAI,CAAC,gBAAgB,GAAGC,+BAAuB,CAAC,CAAC,CAAC,GAAG,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AS,EAAE,EAAE,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,GAAG,GAAG,IAAI,CAAC;QAClH,QAAQC,OAAC,CAACC,UAAI,EAAE,EAAE,KAAK,EAAE;gBACjB,CAAC,YAAY,QAAQ,EAAE,GAAG,IAAI;gBAC9B,CAAC,YAAY,IAAI,EAAE,GAAG,IAAI;gBAC1B,CAAC,YAAY,OAAO,EAAE,GAAG,IAAI;gBAC7B,CAAC,YAAY,IAAI,EAAE,GAAG,IAAI;gBAC1B,CAAC,uBAAuB,gBAAgB,EAAE,GAAG,gBAAgB,KAAK,IAAI,IAAI,OAAO,KAAK,QAAQ;gBAC9F,CAAC,GAAG,OAAO,GAAG,eAAe,GAAG,eAAe,EAAE,GAAG,IAAI;gBACxD,CAAC,YAAY,KAAK,EAAE,GAAG,KAAK,KAAK,SAAS;aAC7C,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,IAAI,KAAK,MAAM,IAAID,OAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,KAAK,MAAM,IAAI,KAAK,KAAKA,OAAC,CAAC,eAAe,EAAE,EAAE,OAAO,EAAE,IAAI,KAAK,OAAO,GAAG,aAAa,GAAG,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,KAAK,IAAIA,OAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC,EAAE;KAClT;IAGD,WAAW,cAAc,KAAK,OAAO,IAAI,CAAC,EAAE;;;;;;;;;;;;;","names":["convertToRGBA","getThemeForegroundColor","isPropDefined","onComponentRequiredPropUndefined","h","Host"],"sources":["../web-components/dist/collection/components/ic-badge/ic-badge.css?tag=ic-badge&encapsulation=shadow","../web-components/dist/collection/components/ic-badge/ic-badge.js"],"sourcesContent":["@media (prefers-reduced-motion: no-preference) {\n :host(.ic-badge-show) {\n animation: expand var(--ic-transition-duration-slow);\n }\n\n :host(.ic-badge-hide) {\n animation: shrink var(--ic-transition-duration-slow);\n }\n}\n\n:host {\n display: flex;\n height: var(--ic-space-md);\n min-width: var(--ic-space-md);\n width: -moz-fit-content;\n width: fit-content;\n border-radius: calc(2 * var(--ic-space-xxl));\n position: absolute;\n}\n\n:host ic-typography {\n --ic-typography-color: var(--ic-badge-text);\n}\n\n:host(.ic-badge-neutral) {\n background-color: var(--ic-badge-neutral) !important;\n}\n\n:host(.ic-badge-light) ic-typography {\n --ic-typography-color: var(--ic-badge-light-text);\n}\n\n:host(.ic-badge-light) ::slotted(*) {\n fill: var(--ic-badge-light-icon);\n}\n\n:host(.ic-badge-info) {\n background-color: var(--ic-badge-info) !important;\n}\n\n:host(.ic-badge-light) {\n background-color: var(--ic-badge-light) !important;\n}\n\n:host(.ic-badge-warning) {\n background-color: var(--ic-badge-warning) !important;\n}\n\n:host(.ic-badge-warning) ic-typography {\n --ic-typography-color: var(--ic-badge-warning-text);\n}\n\n:host(.ic-badge-warning) ::slotted(*) {\n fill: var(--ic-badge-warning-icon);\n}\n\n:host(.ic-badge-error) {\n background-color: var(--ic-badge-error) !important;\n}\n\n:host(.ic-badge-success) {\n background-color: var(--ic-badge-success) !important;\n}\n\n:host(.ic-badge-small) {\n height: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host(.ic-badge-large) {\n height: calc(var(--ic-space-md) + var(--ic-space-xxs));\n min-width: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n:host(.ic-badge-dot.ic-badge-medium) {\n height: var(--ic-space-xs);\n width: var(--ic-space-xs);\n min-width: var(--ic-space-xs);\n}\n\n:host(.ic-badge-dot.ic-badge-small) {\n height: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n min-width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n}\n\n:host(.ic-badge-dot.ic-badge-large) {\n height: var(--ic-space-sm);\n width: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host ::slotted(*) {\n fill: var(--ic-badge-icon);\n}\n\n:host(.ic-badge-foreground-dark) ::slotted(*) {\n fill: var(--ic-color-primary-text-light);\n}\n\n:host(.ic-badge-foreground-light) ::slotted(*) {\n fill: white;\n}\n\n:host(.ic-badge-foreground-dark) ic-typography {\n --ic-typography-color: var(--ic-color-primary-text-light);\n}\n\n:host(.ic-badge-foreground-light) ic-typography {\n --ic-typography-color: var(--ic-color-primary-text-dark);\n}\n\n:host(.ic-badge-text) ic-typography {\n align-self: center;\n padding: 0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.ic-badge-text.ic-badge-small) ic-typography {\n padding: 0 0.2132rem;\n}\n\n:host(.ic-badge-text.ic-badge-large) ic-typography {\n padding: 0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.ic-badge-icon) ::slotted(svg) {\n width: var(--ic-space-sm);\n height: var(--ic-space-sm);\n padding: var(--ic-space-xxxs);\n}\n\n:host(.ic-badge-icon.ic-badge-small) ::slotted(svg) {\n width: var(--ic-space-xs);\n height: var(--ic-space-xs);\n}\n\n:host(.ic-badge-icon.ic-badge-large) ::slotted(svg) {\n width: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n height: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n}\n\n:host(.ic-badge-far) {\n top: calc(-1 * var(--ic-space-xs));\n right: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.ic-badge-far.ic-badge-small),\n:host(.ic-badge-dot.ic-badge-far.ic-badge-large) {\n top: calc(-1 * var(--ic-space-xxs));\n right: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.ic-badge-dot.ic-badge-far),\n:host(.ic-badge-dot.ic-badge-far.ic-badge-small) {\n top: calc(-1 * var(--ic-space-xxxs));\n right: calc(-1 * var(--ic-space-xxxs));\n}\n\n:host(.ic-badge-near) {\n top: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n right: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n}\n\n:host(.ic-badge-dot.ic-badge-near) {\n top: calc(-1 * var(--ic-space-1px));\n right: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.ic-badge-inline) {\n position: static;\n}\n\n:host(.ic-badge-hide) {\n visibility: hidden !important;\n transition: visibility var(--ic-transition-duration-slow);\n}\n\n.sr-only {\n position: absolute;\n left: -9999px;\n}\n\n@keyframes expand {\n from {\n opacity: 0;\n transform: scale(0);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes shrink {\n from {\n opacity: 1;\n transform: scale(1);\n }\n\n to {\n opacity: 0;\n transform: scale(0);\n }\n}\n","import { Host, h } from \"@stencil/core\";\nimport { convertToRGBA, getThemeForegroundColor, isPropDefined, onComponentRequiredPropUndefined, } from \"../../utils/helpers\";\n/**\n * @slot badge-icon - Icon will be rendered inside the badge if type is set to icon.\n */\nexport class Badge {\n constructor() {\n this.ariaLabel = null;\n this.setBadgeColour = () => {\n const colorRGBA = convertToRGBA(this.customColor);\n if (colorRGBA) {\n const { r, g, b, a } = colorRGBA;\n this.el.style.backgroundColor = `rgba(${r}, ${g}, ${b}, ${a})`;\n this.foregroundColour = getThemeForegroundColor((r * 299 + g * 587 + b * 114) / 1000);\n }\n };\n this.getLabel = () => this.maxNumber && Number(this.label) > this.maxNumber\n ? `${this.maxNumber}+`\n : this.label;\n // Set aria-label on badge and / or parent element\n // Aria-describedby seems to not work, probably due to shadow DOM\n this.setAccessibleLabel = () => {\n const parentEl = this.el.parentElement;\n const defaultAriaLabel = this.isAccessibleLabelDefined()\n ? this.accessibleLabel\n : this.label || \"with badge being displayed\";\n if (parentEl) {\n const { tagName } = parentEl;\n if (tagName !== \"IC-CARD\" &&\n (tagName !== \"IC-TAB\" || (tagName === \"IC-TAB\" && this.parentAriaLabel))) {\n const ariaLabelPrefix = this.parentAriaLabel\n ? `${this.parentAriaLabel} ,`\n : \"\";\n parentEl.ariaLabel = this.visible\n ? `${ariaLabelPrefix} ${defaultAriaLabel}`\n : undefined;\n }\n else {\n this.ariaLabel = `, ${defaultAriaLabel}`;\n }\n }\n };\n this.isAccessibleLabelDefined = () => isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;\n this.accessibleLabel = undefined;\n this.customColor = null;\n this.maxNumber = undefined;\n this.position = \"far\";\n this.size = \"medium\";\n this.label = undefined;\n this.theme = \"inherit\";\n this.type = \"text\";\n this.variant = \"neutral\";\n this.visible = true;\n }\n accessibleLabelHandler() {\n this.setAccessibleLabel();\n }\n customColorHandler() {\n this.variant === \"custom\" && this.setBadgeColour();\n }\n variantHandler() {\n if (this.variant === \"custom\") {\n this.setBadgeColour();\n }\n }\n visibleHandler() {\n this.setAccessibleLabel();\n }\n componentWillLoad() {\n var _a;\n this.variant === \"custom\" && this.setBadgeColour();\n const ariaLabel = (_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.ariaLabel;\n if (ariaLabel)\n this.parentAriaLabel = ariaLabel;\n this.setAccessibleLabel();\n }\n componentDidLoad() {\n this.type === \"text\" &&\n onComponentRequiredPropUndefined([{ prop: this.label, propName: \"label\" }], \"Badge\");\n }\n render() {\n const { ariaLabel, el, foregroundColour, getLabel, position, size, label, type, variant, visible, theme, } = this;\n return (h(Host, { class: {\n [`ic-badge-${position}`]: true,\n [`ic-badge-${size}`]: true,\n [`ic-badge-${variant}`]: true,\n [`ic-badge-${type}`]: true,\n [`ic-badge-foreground-${foregroundColour}`]: foregroundColour !== null && variant === \"custom\",\n [`${visible ? \"ic-badge-show\" : \"ic-badge-hide\"}`]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }, id: el.id || null, \"aria-label\": ariaLabel, role: \"status\" }, type === \"icon\" && h(\"slot\", { name: \"badge-icon\" }), type === \"text\" && label && (h(\"ic-typography\", { variant: size === \"small\" ? \"badge-small\" : \"badge\" }, getLabel())), type === \"dot\" && h(\"span\", { class: \"sr-only\" }, \"badge\")));\n }\n static get is() { return \"ic-badge\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-badge.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-badge.css\"]\n };\n }\n static get properties() {\n return {\n \"accessibleLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The accessible label of the badge component to provide context for screen reader users.\"\n },\n \"attribute\": \"accessible-label\",\n \"reflect\": false\n },\n \"customColor\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcColor\",\n \"resolved\": \"`#${string}` | `rgb(${string})` | `rgba(${string})`\",\n \"references\": {\n \"IcColor\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcColor\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The custom badge colour. This will only style the badge component if variant=\\\"custom\\\".\\nCan be a hex value e.g. \\\"#ff0000\\\", RGB e.g. \\\"rgb(255, 0, 0)\\\", or RGBA e.g. \\\"rgba(255, 0, 0, 1)\\\".\"\n },\n \"attribute\": \"custom-color\",\n \"reflect\": false,\n \"defaultValue\": \"null\"\n },\n \"maxNumber\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The maximum number shown on the badge appended with a +.\\nThis will only be displayed if type=\\\"text\\\" and label is not empty.\"\n },\n \"attribute\": \"max-number\",\n \"reflect\": false\n },\n \"position\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgePositions\",\n \"resolved\": \"\\\"far\\\" | \\\"inline\\\" | \\\"near\\\"\",\n \"references\": {\n \"IcBadgePositions\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgePositions\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The positioning of the badge in reference to the parent element.\"\n },\n \"attribute\": \"position\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"far\\\"\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"large\\\" | \\\"medium\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the badge to be displayed.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"medium\\\"\"\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The text displayed in the badge. This will only be displayed if type=\\\"text\\\".\"\n },\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the theme color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n },\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"type\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgeTypes\",\n \"resolved\": \"\\\"dot\\\" | \\\"icon\\\" | \\\"text\\\"\",\n \"references\": {\n \"IcBadgeTypes\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgeTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The type of badge to be displayed.\"\n },\n \"attribute\": \"type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"text\\\"\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgeVariants\",\n \"resolved\": \"\\\"custom\\\" | \\\"error\\\" | \\\"info\\\" | \\\"light\\\" | \\\"neutral\\\" | \\\"success\\\" | \\\"warning\\\"\",\n \"references\": {\n \"IcBadgeVariants\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgeVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the badge to be displayed.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"neutral\\\"\"\n },\n \"visible\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the badge will be displayed.\"\n },\n \"attribute\": \"visible\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"accessibleLabel\",\n \"methodName\": \"accessibleLabelHandler\"\n }, {\n \"propName\": \"customColor\",\n \"methodName\": \"customColorHandler\"\n }, {\n \"propName\": \"variant\",\n \"methodName\": \"variantHandler\"\n }, {\n \"propName\": \"visible\",\n \"methodName\": \"visibleHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-badge.js.map\n"],"version":3}
|
@@ -3,10 +3,9 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-4cf27b16.js');
|
6
|
-
const helpers = require('./helpers-
|
7
|
-
require('./types-17dba796.js');
|
6
|
+
const helpers = require('./helpers-33b42cd6.js');
|
8
7
|
|
9
|
-
const icBreadcrumbGroupCss = ":host{display:block}:host ol{display:flex;list-style-type:none;align-items:center;flex-wrap:wrap;padding:0;margin:0}:host(.back) ol ::slotted(ic-breadcrumb){display:none}:host(.back) ol ::slotted(ic-breadcrumb.show){display:flex}:host(.collapsed) ol ::slotted(ic-breadcrumb.hide){display:none;opacity:0;visibility:hidden}:host(.collapsed) ol ::slotted(ic-breadcrumb.visuallyhidden){display:block;opacity:0;transition:all var(--ic-easing-transition-slow)}:host(.collapsed) ol ::slotted(ic-breadcrumb.fade){opacity:1}";
|
8
|
+
const icBreadcrumbGroupCss = ":host{display:block}:host ol{display:flex;list-style-type:none;align-items:center;flex-wrap:wrap;padding:0;margin:0}:host(.ic-breadcrumb-group-back) ol ::slotted(ic-breadcrumb){display:none}:host(.ic-breadcrumb-group-back) ol ::slotted(ic-breadcrumb.show){display:flex}:host(.ic-breadcrumb-group-collapsed) ol ::slotted(ic-breadcrumb.hide){display:none;opacity:0;visibility:hidden}:host(.ic-breadcrumb-group-collapsed) ol ::slotted(ic-breadcrumb.visuallyhidden){display:block;opacity:0;transition:all var(--ic-easing-transition-slow)}:host(.ic-breadcrumb-group-collapsed) ol ::slotted(ic-breadcrumb.fade){opacity:1}";
|
10
9
|
|
11
10
|
const BreadcrumbGroup = class {
|
12
11
|
constructor(hostRef) {
|
@@ -15,6 +14,18 @@ const BreadcrumbGroup = class {
|
|
15
14
|
this.IC_BREADCRUMB = "ic-breadcrumb";
|
16
15
|
this.resizeObserver = null;
|
17
16
|
this.SHOW_BACK_ICON = "show-back-icon";
|
17
|
+
this.setBreadcrumbTheme = () => {
|
18
|
+
const allBreadcrumbs = Array.from(this.el.querySelectorAll(this.IC_BREADCRUMB));
|
19
|
+
allBreadcrumbs.forEach((breadcrumb) => {
|
20
|
+
breadcrumb.theme = this.theme;
|
21
|
+
});
|
22
|
+
};
|
23
|
+
this.setBreadcrumbMonochrome = () => {
|
24
|
+
const allBreadcrumbs = Array.from(this.el.querySelectorAll(this.IC_BREADCRUMB));
|
25
|
+
allBreadcrumbs.forEach((breadcrumb) => {
|
26
|
+
breadcrumb.monochrome = this.monochrome;
|
27
|
+
});
|
28
|
+
};
|
18
29
|
this.setBackBreadcrumb = () => {
|
19
30
|
if (this.backBreadcrumbOnly) {
|
20
31
|
this.setBackBreadcrumbAttr();
|
@@ -92,6 +103,8 @@ const BreadcrumbGroup = class {
|
|
92
103
|
this.removeVisuallyHiddenClass(breadcrumb);
|
93
104
|
});
|
94
105
|
this.expandedBreadcrumbs = true;
|
106
|
+
// Set focus to first unhidden breadcrumb
|
107
|
+
this.collapsedBreadcrumbs[0].setFocus();
|
95
108
|
};
|
96
109
|
this.transitionendHandler = (event) => {
|
97
110
|
if (event.propertyName === "opacity") {
|
@@ -146,17 +159,24 @@ const BreadcrumbGroup = class {
|
|
146
159
|
};
|
147
160
|
this.deviceSize = helpers.DEVICE_SIZES.XL;
|
148
161
|
this.expandedBreadcrumbs = false;
|
149
|
-
this.appearance = "default";
|
150
162
|
this.backBreadcrumbOnly = false;
|
151
163
|
this.collapsed = false;
|
164
|
+
this.monochrome = false;
|
165
|
+
this.theme = "inherit";
|
166
|
+
}
|
167
|
+
watchBackBreadcrumbHandler() {
|
168
|
+
this.setBackBreadcrumb();
|
169
|
+
}
|
170
|
+
watchMonochromeHandler() {
|
171
|
+
this.setBreadcrumbMonochrome();
|
172
|
+
}
|
173
|
+
watchThemeHandler() {
|
174
|
+
this.setBreadcrumbTheme();
|
152
175
|
}
|
153
176
|
componentWillLoad() {
|
154
177
|
const allBreadcrumbs = Array.from(this.el.querySelectorAll(this.IC_BREADCRUMB));
|
155
|
-
|
156
|
-
|
157
|
-
breadcrumb.setAttribute("appearance", this.appearance);
|
158
|
-
});
|
159
|
-
}
|
178
|
+
this.setBreadcrumbTheme();
|
179
|
+
this.setBreadcrumbMonochrome();
|
160
180
|
if (this.backBreadcrumbOnly) {
|
161
181
|
this.setBackBreadcrumb();
|
162
182
|
}
|
@@ -183,11 +203,17 @@ const BreadcrumbGroup = class {
|
|
183
203
|
}
|
184
204
|
render() {
|
185
205
|
return (index.h(index.Host, { class: {
|
186
|
-
back: this.backBreadcrumbOnly,
|
187
|
-
collapsed: this.collapsed,
|
206
|
+
"ic-breadcrumb-group-back": this.backBreadcrumbOnly,
|
207
|
+
"ic-breadcrumb-group-collapsed": this.collapsed,
|
208
|
+
[`ic-theme-${this.theme}`]: this.theme !== "inherit",
|
188
209
|
} }, index.h("nav", { "aria-label": "breadcrumbs" }, index.h("ol", null, index.h("slot", null)))));
|
189
210
|
}
|
190
211
|
get el() { return index.getElement(this); }
|
212
|
+
static get watchers() { return {
|
213
|
+
"backBreadcrumbOnly": ["watchBackBreadcrumbHandler"],
|
214
|
+
"monochrome": ["watchMonochromeHandler"],
|
215
|
+
"theme": ["watchThemeHandler"]
|
216
|
+
}; }
|
191
217
|
};
|
192
218
|
BreadcrumbGroup.style = icBreadcrumbGroupCss;
|
193
219
|
|