@ukic/web-components 3.0.0-alpha.1 → 3.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-f1cf5156.js → helpers-eca4c27e.js} +80 -29
- package/dist/cjs/helpers-eca4c27e.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +10 -10
- package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +12 -5
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +9 -14
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +8 -5
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +26 -3
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +43 -20
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +49 -4
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +28 -26
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +48 -47
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +21 -6
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +10 -4
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +27 -15
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-classification-banner.cjs.entry.js +1 -1
- package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +32 -9
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +73 -9
- package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +7 -15
- package/dist/cjs/ic-empty-state.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +6 -7
- package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +8 -7
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +24 -14
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +7 -15
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +17 -9
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +486 -200
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +24 -26
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +10 -12
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +25 -18
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +11 -8
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +10 -8
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +60 -8
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -4
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +8 -6
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination-item.cjs.entry.js +12 -11
- package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination.cjs.entry.js +23 -15
- package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +47 -25
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +60 -29
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +42 -22
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +54 -56
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select.cjs.entry.js +192 -66
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +16 -11
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js +4 -4
- package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +5 -4
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +4 -5
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +12 -2
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +21 -16
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +60 -123
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +3 -19
- package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +10 -8
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +43 -23
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +20 -20
- package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +4 -4
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +62 -12
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +64 -9
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +13 -7
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +5 -3
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/index-f982899d.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/ag-theme-icds.css +218 -0
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/ic-accordion/ic-accordion.css +22 -20
- package/dist/collection/components/ic-accordion/ic-accordion.js +37 -31
- package/dist/collection/components/ic-accordion/ic-accordion.js.map +1 -1
- package/dist/collection/components/ic-accordion/ic-accordion.stories.js +611 -0
- package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js +6 -3
- package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js.map +1 -1
- package/dist/collection/components/ic-accordion-group/ic-accordion-group.css +2 -12
- package/dist/collection/components/ic-accordion-group/ic-accordion-group.js +18 -18
- package/dist/collection/components/ic-accordion-group/ic-accordion-group.js.map +1 -1
- package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.spec.js +3 -3
- package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.spec.js.map +1 -1
- package/dist/collection/components/ic-alert/ic-alert.css +38 -20
- package/dist/collection/components/ic-alert/ic-alert.js +52 -33
- package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
- package/dist/collection/components/ic-alert/ic-alert.stories.js +271 -0
- package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js +22 -4
- package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js.map +1 -1
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.css +5 -2
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.js +31 -4
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.js.map +1 -1
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.stories.js +162 -0
- package/dist/collection/components/ic-back-to-top/test/basic/ic-back-to-top.spec.js +14 -0
- package/dist/collection/components/ic-back-to-top/test/basic/ic-back-to-top.spec.js.map +1 -1
- package/dist/collection/components/ic-badge/ic-badge.css +5 -5
- package/dist/collection/components/ic-badge/ic-badge.js +42 -4
- package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
- package/dist/collection/components/ic-badge/ic-badge.stories.js +1092 -0
- package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js +194 -0
- package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css +27 -8
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js +52 -4
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb/test/basic/ic-breadcrumb.spec.js +49 -5
- package/dist/collection/components/ic-breadcrumb/test/basic/ic-breadcrumb.spec.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +44 -19
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.stories.js +362 -0
- package/dist/collection/components/ic-button/ic-button.css +690 -420
- package/dist/collection/components/ic-button/ic-button.js +64 -46
- package/dist/collection/components/ic-button/ic-button.js.map +1 -1
- package/dist/collection/components/ic-button/ic-button.stories.js +2208 -0
- package/dist/collection/components/ic-button/ic-button.types.js.map +1 -1
- package/dist/collection/components/ic-button/test/basic/ic-button.spec.js +9 -9
- package/dist/collection/components/ic-button/test/basic/ic-button.spec.js.map +1 -1
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.css +102 -113
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.js +80 -52
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.js.map +1 -1
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.stories.js +1050 -0
- package/dist/collection/components/ic-card-vertical/test/basic/ic-card-vertical.spec.js +44 -3
- package/dist/collection/components/ic-card-vertical/test/basic/ic-card-vertical.spec.js.map +1 -1
- package/dist/collection/components/ic-checkbox/ic-checkbox.css +71 -39
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +35 -3
- package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.css +15 -2
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +46 -3
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.stories.js +726 -0
- package/dist/collection/components/ic-checkbox-group/test/basic/ic-checkbox-group.spec.js +3 -0
- package/dist/collection/components/ic-checkbox-group/test/basic/ic-checkbox-group.spec.js.map +1 -1
- package/dist/collection/components/ic-chip/ic-chip.css +64 -49
- package/dist/collection/components/ic-chip/ic-chip.js +66 -15
- package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
- package/dist/collection/components/ic-chip/ic-chip.stories.js +980 -0
- package/dist/collection/components/ic-chip/test/basic/ic-chip.spec.js +19 -0
- package/dist/collection/components/ic-chip/test/basic/ic-chip.spec.js.map +1 -1
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.css +14 -10
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.stories.js +131 -0
- package/dist/collection/components/ic-data-list/ic-data-list.stories.js +493 -0
- package/dist/collection/components/ic-dialog/ic-dialog.css +16 -9
- package/dist/collection/components/ic-dialog/ic-dialog.js +57 -10
- package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
- package/dist/collection/components/ic-dialog/ic-dialog.stories.js +1066 -0
- package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js +27 -7
- package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js.map +1 -1
- package/dist/collection/components/ic-divider/ic-divider.css +295 -4
- package/dist/collection/components/ic-divider/ic-divider.js +239 -12
- package/dist/collection/components/ic-divider/ic-divider.js.map +1 -1
- package/dist/collection/components/ic-divider/ic-divider.stories.js +394 -0
- package/dist/collection/components/ic-divider/ic-divider.types.js +2 -0
- package/dist/collection/components/ic-divider/ic-divider.types.js.map +1 -0
- package/dist/collection/components/ic-divider/test/basic/ic-divider.spec.js +90 -5
- package/dist/collection/components/ic-divider/test/basic/ic-divider.spec.js.map +1 -1
- package/dist/collection/components/ic-empty-state/ic-empty-state.css +15 -0
- package/dist/collection/components/ic-empty-state/ic-empty-state.js +31 -15
- package/dist/collection/components/ic-empty-state/ic-empty-state.js.map +1 -1
- package/dist/collection/components/ic-empty-state/ic-empty-state.stories.js +404 -0
- package/dist/collection/components/ic-empty-state/test/basic/ic-empty-state.spec.js +101 -0
- package/dist/collection/components/ic-empty-state/test/basic/ic-empty-state.spec.js.map +1 -0
- package/dist/collection/components/ic-footer/ic-footer.css +21 -20
- package/dist/collection/components/ic-footer/ic-footer.js +26 -16
- package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
- package/dist/collection/components/ic-footer/ic-footer.stories.js +384 -0
- package/dist/collection/components/ic-footer/test/basic/ic-footer.spec.js +43 -2
- package/dist/collection/components/ic-footer/test/basic/ic-footer.spec.js.map +1 -1
- package/dist/collection/components/ic-footer-link/ic-footer-link.css +24 -6
- package/dist/collection/components/ic-footer-link/ic-footer-link.js +9 -8
- package/dist/collection/components/ic-footer-link/ic-footer-link.js.map +1 -1
- package/dist/collection/components/ic-footer-link/test/basic/ic-footer-link.spec.js +1 -1
- package/dist/collection/components/ic-footer-link/test/basic/ic-footer-link.spec.js.map +1 -1
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.css +11 -19
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js +7 -8
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js.map +1 -1
- package/dist/collection/components/ic-footer-link-group/test/basic/ic-footer-link-group.spec.js +1 -1
- package/dist/collection/components/ic-footer-link-group/test/basic/ic-footer-link-group.spec.js.map +1 -1
- package/dist/collection/components/ic-hero/ic-hero.css +25 -10
- package/dist/collection/components/ic-hero/ic-hero.js +10 -18
- package/dist/collection/components/ic-hero/ic-hero.js.map +1 -1
- package/dist/collection/components/ic-hero/ic-hero.stories.js +448 -0
- package/dist/collection/components/ic-hero/test/basic/ic-hero.spec.js +23 -5
- package/dist/collection/components/ic-hero/test/basic/ic-hero.spec.js.map +1 -1
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.css +2 -6
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +67 -11
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js.map +1 -1
- package/dist/collection/components/ic-horizontal-scroll/test/basic/ic-horizontal-scroll.spec.js +43 -0
- package/dist/collection/components/ic-horizontal-scroll/test/basic/ic-horizontal-scroll.spec.js.map +1 -1
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +40 -17
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +23 -48
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
- package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js +30 -3
- package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js.map +1 -1
- package/dist/collection/components/ic-input-label/ic-input-label.css +19 -20
- package/dist/collection/components/ic-input-label/ic-input-label.js +53 -34
- package/dist/collection/components/ic-input-label/ic-input-label.js.map +1 -1
- package/dist/collection/components/ic-input-label/test/basic/ic-input-label.spec.js +35 -49
- package/dist/collection/components/ic-input-label/test/basic/ic-input-label.spec.js.map +1 -1
- package/dist/collection/components/ic-input-validation/ic-input-validation.css +12 -3
- package/dist/collection/components/ic-input-validation/ic-input-validation.js +7 -7
- package/dist/collection/components/ic-input-validation/ic-input-validation.js.map +1 -1
- package/dist/collection/components/ic-link/ic-link.css +18 -33
- package/dist/collection/components/ic-link/ic-link.js +14 -16
- package/dist/collection/components/ic-link/ic-link.js.map +1 -1
- package/dist/collection/components/ic-link/ic-link.stories.js +85 -0
- package/dist/collection/components/ic-link/test/basic/ic-link.spec.js +3 -3
- package/dist/collection/components/ic-link/test/basic/ic-link.spec.js.map +1 -1
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +15 -10
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +50 -31
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js.map +1 -1
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.stories.js +464 -0
- package/dist/collection/components/ic-menu/ic-menu.css +111 -29
- package/dist/collection/components/ic-menu/ic-menu.js +522 -201
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js +381 -33
- package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js.map +1 -1
- package/dist/collection/components/ic-menu-group/ic-menu-group.css +2 -2
- package/dist/collection/components/ic-menu-group/ic-menu-group.js +1 -1
- package/dist/collection/components/ic-menu-group/ic-menu-group.js.map +1 -1
- package/dist/collection/components/ic-menu-item/ic-menu-item.css +32 -28
- package/dist/collection/components/ic-menu-item/ic-menu-item.js +67 -25
- package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
- package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js +15 -2
- package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js.map +1 -1
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.css +18 -0
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +37 -10
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
- package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js +3 -3
- package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js.map +1 -1
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +17 -12
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +35 -9
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
- package/dist/collection/components/ic-navigation-group/test/basic/ic-navigation-group.spec.js +3 -3
- package/dist/collection/components/ic-navigation-group/test/basic/ic-navigation-group.spec.js.map +1 -1
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +38 -65
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +88 -11
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
- package/dist/collection/components/ic-navigation-item/test/basic/ic-navigation-item.spec.js +15 -3
- package/dist/collection/components/ic-navigation-item/test/basic/ic-navigation-item.spec.js.map +1 -1
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.css +9 -6
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +27 -2
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
- package/dist/collection/components/ic-page-header/ic-page-header.css +7 -3
- package/dist/collection/components/ic-page-header/ic-page-header.js +30 -4
- package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
- package/dist/collection/components/ic-page-header/ic-page-header.stories.js +823 -0
- package/dist/collection/components/ic-pagination/ic-pagination.css +15 -0
- package/dist/collection/components/ic-pagination/ic-pagination.js +65 -37
- package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
- package/dist/collection/components/ic-pagination/ic-pagination.stories.js +164 -0
- package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js +11 -1
- package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js.map +1 -1
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.css +29 -9
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +54 -33
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.js.map +1 -1
- package/dist/collection/components/ic-pagination-item/test/basic/ic-pagination-item.spec.js +3 -0
- package/dist/collection/components/ic-pagination-item/test/basic/ic-pagination-item.spec.js.map +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +5 -5
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +112 -26
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.stories.js +504 -0
- package/dist/collection/components/ic-radio-group/ic-radio-group.css +17 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +83 -26
- package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.stories.js +443 -0
- package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js +12 -3
- package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js.map +1 -1
- package/dist/collection/components/ic-radio-option/ic-radio-option.css +36 -28
- package/dist/collection/components/ic-radio-option/ic-radio-option.js +73 -21
- package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.css +110 -10
- package/dist/collection/components/ic-search-bar/ic-search-bar.js +101 -57
- package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.stories.js +593 -0
- package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js +63 -94
- package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js.map +1 -1
- package/dist/collection/components/ic-section-container/ic-section-container.stories.js +62 -0
- package/dist/collection/components/ic-select/ic-select.css +93 -53
- package/dist/collection/components/ic-select/ic-select.js +267 -77
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select_(multi).stories.js +892 -0
- package/dist/collection/components/ic-select/ic-select_(searchable).stories.js +965 -0
- package/dist/collection/components/ic-select/ic-select_(single).stories.js +790 -0
- package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +234 -1
- package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +50 -34
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +18 -13
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.stories.js +2526 -0
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.types.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js +6 -6
- package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js.map +1 -1
- package/dist/collection/components/ic-skeleton/ic-skeleton.css +4 -27
- package/dist/collection/components/ic-skeleton/ic-skeleton.js +16 -10
- package/dist/collection/components/ic-skeleton/ic-skeleton.js.map +1 -1
- package/dist/collection/components/ic-skeleton/ic-skeleton.stories.js +143 -0
- package/dist/collection/components/ic-status-tag/ic-status-tag.css +6 -6
- package/dist/collection/components/ic-status-tag/ic-status-tag.js +21 -2
- package/dist/collection/components/ic-status-tag/ic-status-tag.js.map +1 -1
- package/dist/collection/components/ic-status-tag/ic-status-tag.stories.js +196 -0
- package/dist/collection/components/ic-status-tag/test/basic/ic-status-tag.spec.js +15 -32
- package/dist/collection/components/ic-status-tag/test/basic/ic-status-tag.spec.js.map +1 -1
- package/dist/collection/components/ic-step/ic-step.css +65 -98
- package/dist/collection/components/ic-step/ic-step.js +29 -3
- package/dist/collection/components/ic-step/ic-step.js.map +1 -1
- package/dist/collection/components/ic-stepper/ic-stepper.js +37 -19
- package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
- package/dist/collection/components/ic-stepper/ic-stepper.stories.js +277 -0
- package/dist/collection/components/ic-stepper/test/basic/ic-stepper.spec.js +4 -4
- package/dist/collection/components/ic-stepper/test/basic/ic-stepper.spec.js.map +1 -1
- package/dist/collection/components/ic-switch/ic-switch.css +30 -48
- package/dist/collection/components/ic-switch/ic-switch.js +43 -30
- package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
- package/dist/collection/components/ic-switch/ic-switch.stories.js +149 -0
- package/dist/collection/components/ic-switch/test/basic/ic-switch.spec.js +3 -14
- package/dist/collection/components/ic-switch/test/basic/ic-switch.spec.js.map +1 -1
- package/dist/collection/components/ic-tab/ic-tab.js +11 -6
- package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
- package/dist/collection/components/ic-tab/test/basic/ic-tab.spec.js +16 -0
- package/dist/collection/components/ic-tab/test/basic/ic-tab.spec.js.map +1 -1
- package/dist/collection/components/ic-tab-context/ic-tab-context.js +60 -123
- package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
- package/dist/collection/components/ic-tab-context/ic-tabs.stories.js +316 -0
- package/dist/collection/components/ic-tab-context/test/basic/ic-tab-context.spec.js +2 -2
- package/dist/collection/components/ic-tab-context/test/basic/ic-tab-context.spec.js.map +1 -1
- package/dist/collection/components/ic-tab-group/ic-tab-group.css +8 -0
- package/dist/collection/components/ic-tab-group/ic-tab-group.js +1 -17
- package/dist/collection/components/ic-tab-group/ic-tab-group.js.map +1 -1
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.css +1 -1
- package/dist/collection/components/ic-text-field/ic-text-field.css +62 -8
- package/dist/collection/components/ic-text-field/ic-text-field.js +70 -24
- package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
- package/dist/collection/components/ic-text-field/ic-text-field.stories.js +862 -0
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js +26 -12
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js.map +1 -1
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js +2 -2
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js.map +1 -1
- package/dist/collection/components/ic-theme/ic-theme.js +31 -31
- package/dist/collection/components/ic-theme/ic-theme.js.map +1 -1
- package/dist/collection/components/ic-theme/ic-theme.stories.js +434 -0
- package/dist/collection/components/ic-theme/test/basic/ic-theme.e2e.js +7 -7
- package/dist/collection/components/ic-theme/test/basic/ic-theme.e2e.js.map +1 -1
- package/dist/collection/components/ic-theme/test/basic/ic-theme.spec.js +11 -11
- package/dist/collection/components/ic-theme/test/basic/ic-theme.spec.js.map +1 -1
- package/dist/collection/components/ic-toast/ic-toast.css +31 -17
- package/dist/collection/components/ic-toast/ic-toast.js +2 -3
- package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
- package/dist/collection/components/ic-toast/ic-toast.stories.js +396 -0
- package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js +16 -16
- package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js.map +1 -1
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.css +189 -57
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +149 -42
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.stories.js +427 -0
- package/dist/collection/components/ic-toggle-button/test/basic/ic-toggle-button.spec.js +10 -0
- package/dist/collection/components/ic-toggle-button/test/basic/ic-toggle-button.spec.js.map +1 -1
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.css +23 -16
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +144 -35
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -1
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.stories.js +585 -0
- package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js +187 -0
- package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js.map +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.css +7 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.js +2 -5
- package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.stories.js +366 -0
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +49 -21
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +39 -9
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.stories.js +1098 -0
- package/dist/collection/components/ic-top-navigation/test/basic/ic-top-navigation.spec.js +3 -3
- package/dist/collection/components/ic-top-navigation/test/basic/ic-top-navigation.spec.js.map +1 -1
- package/dist/collection/components/ic-typography/ic-typography.css +7 -9
- package/dist/collection/components/ic-typography/ic-typography.js +3 -1
- package/dist/collection/components/ic-typography/ic-typography.js.map +1 -1
- package/dist/collection/components/ic-typography/ic-typography.stories.js +447 -0
- package/dist/collection/patterns/top-nav-content-footer.stories.js +109 -0
- package/dist/collection/patterns/z-index.stories.js +474 -0
- package/dist/collection/testspec.setup.js +14 -0
- package/dist/collection/testspec.setup.js.map +1 -1
- package/dist/collection/utils/constants.js +1 -1
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/collection/utils/helpers.js +64 -19
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js +6 -6
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +73 -26
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-accordion-group.js +11 -11
- package/dist/components/ic-accordion-group.js.map +1 -1
- package/dist/components/ic-accordion.js +14 -6
- package/dist/components/ic-accordion.js.map +1 -1
- package/dist/components/ic-alert.js +12 -16
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-back-to-top.js +9 -5
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-badge.js +28 -5
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +44 -20
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-breadcrumb2.js +51 -4
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +21 -20
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-vertical.js +54 -50
- package/dist/components/ic-card-vertical.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +25 -7
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +12 -4
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +32 -16
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-classification-banner.js +1 -1
- package/dist/components/ic-classification-banner.js.map +1 -1
- package/dist/components/ic-data-row.js +1 -1
- package/dist/components/ic-dialog.js +33 -9
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.js +89 -12
- package/dist/components/ic-divider2.js.map +1 -1
- package/dist/components/ic-empty-state.js +10 -17
- package/dist/components/ic-empty-state.js.map +1 -1
- package/dist/components/ic-footer-link-group.js +7 -8
- package/dist/components/ic-footer-link-group.js.map +1 -1
- package/dist/components/ic-footer-link.js +9 -8
- package/dist/components/ic-footer-link.js.map +1 -1
- package/dist/components/ic-footer.js +25 -15
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +9 -17
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +19 -9
- package/dist/components/ic-horizontal-scroll2.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +23 -32
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js +19 -20
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-input-validation2.js +9 -9
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-link2.js +13 -15
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +11 -9
- 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 +30 -21
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +472 -175
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +13 -9
- package/dist/components/ic-navigation-button.js.map +1 -1
- package/dist/components/ic-navigation-group.js +12 -9
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +64 -10
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +6 -4
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js +9 -6
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +15 -12
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination.js +25 -15
- package/dist/components/ic-pagination.js.map +1 -1
- package/dist/components/ic-popover-menu.js +50 -26
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +63 -30
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +45 -23
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +70 -81
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select.js +196 -67
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js +17 -12
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +5 -5
- package/dist/components/ic-skeleton.js.map +1 -1
- package/dist/components/ic-status-tag.js +5 -3
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +4 -4
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +14 -3
- package/dist/components/ic-stepper.js.map +1 -1
- package/dist/components/ic-switch.js +24 -18
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +60 -123
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-tab-group.js +2 -18
- package/dist/components/ic-tab-group.js.map +1 -1
- package/dist/components/ic-tab-panel.js +1 -1
- package/dist/components/ic-tab-panel.js.map +1 -1
- package/dist/components/ic-tab.js +10 -8
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field.js +371 -1
- package/dist/components/ic-text-field.js.map +1 -1
- package/dist/components/ic-theme.js +22 -22
- package/dist/components/ic-theme.js.map +1 -1
- package/dist/components/ic-toast.js +4 -4
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +75 -14
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +76 -17
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-tooltip2.js +1 -1
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +15 -8
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-typography2.js +4 -2
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/core/ag-theme-icds.css +218 -0
- package/dist/core/core.css +1607 -77
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-00587c99.entry.js +2 -0
- package/dist/core/p-00587c99.entry.js.map +1 -0
- package/dist/core/p-07aaf9c4.entry.js +2 -0
- package/dist/core/p-07aaf9c4.entry.js.map +1 -0
- package/dist/core/p-094f51b6.entry.js +2 -0
- package/dist/core/p-094f51b6.entry.js.map +1 -0
- package/dist/core/p-146b2788.entry.js +2 -0
- package/dist/core/p-146b2788.entry.js.map +1 -0
- package/dist/core/p-15082ea5.entry.js +2 -0
- package/dist/core/p-15082ea5.entry.js.map +1 -0
- package/dist/core/p-174de9d7.entry.js +2 -0
- package/dist/core/p-174de9d7.entry.js.map +1 -0
- package/dist/core/p-17f9921d.entry.js +2 -0
- package/dist/core/p-17f9921d.entry.js.map +1 -0
- package/dist/core/p-246ea059.entry.js +2 -0
- package/dist/core/p-246ea059.entry.js.map +1 -0
- package/dist/core/p-25d3c3a6.entry.js +2 -0
- package/dist/core/p-25d3c3a6.entry.js.map +1 -0
- package/dist/core/{p-54238d16.entry.js → p-27274ca8.entry.js} +2 -2
- package/dist/core/p-27274ca8.entry.js.map +1 -0
- package/dist/core/p-39ab6387.entry.js +2 -0
- package/dist/core/p-39ab6387.entry.js.map +1 -0
- package/dist/core/p-3d565739.entry.js +2 -0
- package/dist/core/p-3d565739.entry.js.map +1 -0
- package/dist/core/p-41b7c67c.entry.js +2 -0
- package/dist/core/p-41b7c67c.entry.js.map +1 -0
- package/dist/core/p-4572b2ba.entry.js +2 -0
- package/dist/core/p-4572b2ba.entry.js.map +1 -0
- package/dist/core/p-4cfe1dd8.entry.js +2 -0
- package/dist/core/p-4cfe1dd8.entry.js.map +1 -0
- package/dist/core/p-5b836707.entry.js +2 -0
- package/dist/core/p-5b836707.entry.js.map +1 -0
- package/dist/core/{p-46ee459b.entry.js → p-67b3cd55.entry.js} +2 -2
- package/dist/core/p-67b3cd55.entry.js.map +1 -0
- package/dist/core/p-67b8a829.entry.js +2 -0
- package/dist/core/p-67b8a829.entry.js.map +1 -0
- package/dist/core/p-6dfa5a4b.entry.js +2 -0
- package/dist/core/p-6dfa5a4b.entry.js.map +1 -0
- package/dist/core/p-6e94c79c.entry.js +2 -0
- package/dist/core/p-6e94c79c.entry.js.map +1 -0
- package/dist/core/p-73d6092d.entry.js +2 -0
- package/dist/core/p-73d6092d.entry.js.map +1 -0
- package/dist/core/{p-c81109da.entry.js → p-770c52a7.entry.js} +2 -2
- package/dist/core/p-770c52a7.entry.js.map +1 -0
- package/dist/core/{p-e861a2b3.entry.js → p-7b26ef60.entry.js} +2 -2
- package/dist/core/p-7b26ef60.entry.js.map +1 -0
- package/dist/core/{p-1e802eeb.entry.js → p-7f984e25.entry.js} +2 -2
- package/dist/core/p-7f984e25.entry.js.map +1 -0
- package/dist/core/p-86caada0.entry.js +2 -0
- package/dist/core/p-86caada0.entry.js.map +1 -0
- package/dist/core/p-8c03b8b5.entry.js +2 -0
- package/dist/core/p-8c03b8b5.entry.js.map +1 -0
- package/dist/core/p-8fdb9b16.entry.js +2 -0
- package/dist/core/p-8fdb9b16.entry.js.map +1 -0
- package/dist/core/p-91a221b5.entry.js +2 -0
- package/dist/core/p-91a221b5.entry.js.map +1 -0
- package/dist/core/{p-e597da0e.entry.js → p-96b4ca6e.entry.js} +2 -2
- package/dist/core/p-96b4ca6e.entry.js.map +1 -0
- package/dist/core/p-9e0c2c19.entry.js +2 -0
- package/dist/core/p-9e0c2c19.entry.js.map +1 -0
- package/dist/core/p-9f569f90.entry.js +2 -0
- package/dist/core/p-9f569f90.entry.js.map +1 -0
- package/dist/core/p-a178d53c.entry.js +2 -0
- package/dist/core/p-a178d53c.entry.js.map +1 -0
- package/dist/core/p-a3b7a147.entry.js +2 -0
- package/dist/core/p-a3b7a147.entry.js.map +1 -0
- package/dist/core/p-a72685f6.entry.js +2 -0
- package/dist/core/p-a72685f6.entry.js.map +1 -0
- package/dist/core/p-abdc2912.entry.js +2 -0
- package/dist/core/p-abdc2912.entry.js.map +1 -0
- package/dist/core/p-b260b967.entry.js +2 -0
- package/dist/core/p-b260b967.entry.js.map +1 -0
- package/dist/core/p-b404b307.entry.js +2 -0
- package/dist/core/p-b404b307.entry.js.map +1 -0
- package/dist/core/p-b6ce9ca3.entry.js +2 -0
- package/dist/core/p-b6ce9ca3.entry.js.map +1 -0
- package/dist/core/p-b6e010f3.entry.js +2 -0
- package/dist/core/p-b6e010f3.entry.js.map +1 -0
- package/dist/core/p-bbd4f487.entry.js +2 -0
- package/dist/core/p-bbd4f487.entry.js.map +1 -0
- package/dist/core/p-bd9f3961.entry.js +2 -0
- package/dist/core/p-bd9f3961.entry.js.map +1 -0
- package/dist/core/{p-a3b6a02d.entry.js → p-c1db155d.entry.js} +2 -2
- package/dist/core/p-c1db155d.entry.js.map +1 -0
- package/dist/core/p-c7bcdb8e.entry.js +2 -0
- package/dist/core/p-c7bcdb8e.entry.js.map +1 -0
- package/dist/core/p-ca11666f.entry.js +2 -0
- package/dist/core/p-ca11666f.entry.js.map +1 -0
- package/dist/core/p-cda4aca9.js +2 -0
- package/dist/core/p-cda4aca9.js.map +1 -0
- package/dist/core/{p-bf4c61cb.entry.js → p-d0afa458.entry.js} +2 -2
- package/dist/core/{p-bf4c61cb.entry.js.map → p-d0afa458.entry.js.map} +1 -1
- package/dist/core/p-d8690838.entry.js +2 -0
- package/dist/core/p-d8690838.entry.js.map +1 -0
- package/dist/core/p-dededae6.entry.js +2 -0
- package/dist/core/p-dededae6.entry.js.map +1 -0
- package/dist/core/p-df957570.entry.js +2 -0
- package/dist/core/p-df957570.entry.js.map +1 -0
- package/dist/core/{p-d8870804.entry.js → p-e2cf6e7e.entry.js} +2 -2
- package/dist/core/p-e6189634.entry.js +2 -0
- package/dist/core/p-e6189634.entry.js.map +1 -0
- package/dist/core/p-e6dc3cd1.entry.js +2 -0
- package/dist/core/p-e6dc3cd1.entry.js.map +1 -0
- package/dist/core/p-e831277e.entry.js +2 -0
- package/dist/core/p-e831277e.entry.js.map +1 -0
- package/dist/core/p-eb7c589b.entry.js +2 -0
- package/dist/core/p-eb7c589b.entry.js.map +1 -0
- package/dist/core/p-f65179fe.entry.js +2 -0
- package/dist/core/p-f65179fe.entry.js.map +1 -0
- package/dist/core/p-fd60eef7.entry.js +2 -0
- package/dist/core/p-fd60eef7.entry.js.map +1 -0
- package/dist/core/p-fd9f3fd0.entry.js +2 -0
- package/dist/core/p-fd9f3fd0.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-1c9151ef.js → helpers-a72a277b.js} +74 -27
- package/dist/esm/helpers-a72a277b.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +10 -10
- package/dist/esm/ic-accordion-group.entry.js.map +1 -1
- package/dist/esm/ic-accordion.entry.js +12 -5
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +10 -15
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +9 -6
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js +26 -3
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +43 -20
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +49 -4
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +28 -26
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +49 -48
- package/dist/esm/ic-card-vertical.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +21 -6
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +10 -4
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +28 -16
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-classification-banner.entry.js +1 -1
- package/dist/esm/ic-classification-banner.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js +32 -9
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +74 -10
- package/dist/esm/ic-divider.entry.js.map +1 -1
- package/dist/esm/ic-empty-state.entry.js +8 -16
- package/dist/esm/ic-empty-state.entry.js.map +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +6 -7
- package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
- package/dist/esm/ic-footer-link.entry.js +8 -7
- package/dist/esm/ic-footer-link.entry.js.map +1 -1
- package/dist/esm/ic-footer.entry.js +24 -14
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +8 -16
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +17 -9
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +487 -201
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +24 -26
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +10 -12
- package/dist/esm/ic-link.entry.js.map +1 -1
- package/dist/esm/ic-menu-group.entry.js +3 -3
- package/dist/esm/ic-menu-group.entry.js.map +1 -1
- package/dist/esm/ic-menu-item.entry.js +25 -18
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +11 -8
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +10 -8
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +61 -9
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +5 -4
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +8 -6
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination-item.entry.js +12 -11
- package/dist/esm/ic-pagination-item.entry.js.map +1 -1
- package/dist/esm/ic-pagination.entry.js +23 -15
- package/dist/esm/ic-pagination.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +47 -25
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +60 -29
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +42 -22
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +54 -56
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-select.entry.js +192 -66
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +16 -11
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js +4 -4
- package/dist/esm/ic-skeleton.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +5 -4
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +4 -5
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +12 -2
- package/dist/esm/ic-stepper.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +21 -16
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +60 -123
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +3 -19
- package/dist/esm/ic-tab-group.entry.js.map +1 -1
- package/dist/esm/ic-tab-panel.entry.js +2 -2
- package/dist/esm/ic-tab-panel.entry.js.map +1 -1
- package/dist/esm/ic-tab.entry.js +10 -8
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-text-field.entry.js +43 -23
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +20 -20
- package/dist/esm/ic-theme.entry.js.map +1 -1
- package/dist/esm/ic-toast.entry.js +4 -4
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +62 -12
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +64 -9
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +13 -7
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +5 -3
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/index-d1d2c456.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-accordion/ic-accordion.d.ts +7 -5
- package/dist/types/components/ic-accordion-group/ic-accordion-group.d.ts +4 -4
- package/dist/types/components/ic-alert/ic-alert.d.ts +9 -6
- package/dist/types/components/ic-back-to-top/ic-back-to-top.d.ts +5 -0
- package/dist/types/components/ic-badge/ic-badge.d.ts +5 -0
- package/dist/types/components/ic-breadcrumb/ic-breadcrumb.d.ts +9 -0
- package/dist/types/components/ic-breadcrumb-group/ic-breadcrumb-group.d.ts +1 -0
- package/dist/types/components/ic-button/ic-button.d.ts +11 -7
- package/dist/types/components/ic-button/ic-button.types.d.ts +0 -1
- package/dist/types/components/ic-card-vertical/ic-card-vertical.d.ts +9 -5
- package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +7 -2
- package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +8 -1
- package/dist/types/components/ic-chip/ic-chip.d.ts +13 -2
- package/dist/types/components/ic-dialog/ic-dialog.d.ts +8 -2
- package/dist/types/components/ic-divider/ic-divider.d.ts +33 -3
- package/dist/types/components/ic-divider/ic-divider.types.d.ts +3 -0
- package/dist/types/components/ic-empty-state/ic-empty-state.d.ts +5 -2
- package/dist/types/components/ic-footer/ic-footer.d.ts +4 -3
- package/dist/types/components/ic-footer-link/ic-footer-link.d.ts +3 -3
- package/dist/types/components/ic-footer-link-group/ic-footer-link-group.d.ts +3 -2
- package/dist/types/components/ic-hero/ic-hero.d.ts +3 -4
- package/dist/types/components/ic-horizontal-scroll/ic-horizontal-scroll.d.ts +8 -2
- package/dist/types/components/ic-input-component-container/ic-input-component-container.d.ts +2 -5
- package/dist/types/components/ic-input-label/ic-input-label.d.ts +8 -4
- package/dist/types/components/ic-link/ic-link.d.ts +2 -2
- package/dist/types/components/ic-loading-indicator/ic-loading-indicator.d.ts +9 -5
- package/dist/types/components/ic-menu/ic-menu.d.ts +49 -16
- package/dist/types/components/ic-menu-item/ic-menu-item.d.ts +12 -5
- package/dist/types/components/ic-navigation-button/ic-navigation-button.d.ts +7 -3
- package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +7 -3
- package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +14 -3
- package/dist/types/components/ic-navigation-menu/ic-navigation-menu.d.ts +5 -0
- package/dist/types/components/ic-page-header/ic-page-header.d.ts +5 -1
- package/dist/types/components/ic-pagination/ic-pagination.d.ts +10 -5
- package/dist/types/components/ic-pagination-item/ic-pagination-item.d.ts +10 -5
- package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +9 -7
- package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +6 -1
- package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +10 -3
- package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +15 -3
- package/dist/types/components/ic-select/ic-select.d.ts +36 -16
- package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +3 -3
- package/dist/types/components/ic-side-navigation/ic-side-navigation.types.d.ts +2 -2
- package/dist/types/components/ic-skeleton/ic-skeleton.d.ts +3 -2
- package/dist/types/components/ic-status-tag/ic-status-tag.d.ts +4 -0
- package/dist/types/components/ic-step/ic-step.d.ts +5 -0
- package/dist/types/components/ic-stepper/ic-stepper.d.ts +6 -4
- package/dist/types/components/ic-switch/ic-switch.d.ts +7 -6
- package/dist/types/components/ic-tab/ic-tab.d.ts +1 -0
- package/dist/types/components/ic-tab-context/ic-tab-context.d.ts +8 -6
- package/dist/types/components/ic-tab-group/ic-tab-group.d.ts +0 -4
- package/dist/types/components/ic-text-field/ic-text-field.d.ts +10 -2
- package/dist/types/components/ic-theme/ic-theme.d.ts +8 -8
- package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +16 -7
- package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.d.ts +21 -5
- package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +1 -1
- package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +7 -3
- package/dist/types/components.d.ts +516 -159
- package/dist/types/testspec.setup.d.ts +9 -0
- package/dist/types/utils/helpers.d.ts +22 -8
- package/dist/types/utils/types.d.ts +8 -6
- package/hydrate/index.js +1998 -1053
- package/package.json +20 -19
- package/vscode-data.json +655 -166
- package/dist/cjs/helpers-f1cf5156.js.map +0 -1
- package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.e2e.js +0 -339
- package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.e2e.js.map +0 -1
- package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.e2e.js +0 -1106
- package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.e2e.js.map +0 -1
- package/dist/collection/components/ic-stepper/test/basic/ic-stepper.e2e.js +0 -49
- package/dist/collection/components/ic-stepper/test/basic/ic-stepper.e2e.js.map +0 -1
- package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.e2e.js +0 -109
- package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.e2e.js.map +0 -1
- package/dist/collection/components/ic-typography/test/basic/ic-typography.e2e.js +0 -39
- package/dist/collection/components/ic-typography/test/basic/ic-typography.e2e.js.map +0 -1
- package/dist/components/ic-text-field2.js +0 -353
- package/dist/components/ic-text-field2.js.map +0 -1
- package/dist/core/p-09104e40.entry.js +0 -2
- package/dist/core/p-09104e40.entry.js.map +0 -1
- package/dist/core/p-0c0b1c74.entry.js +0 -2
- package/dist/core/p-0c0b1c74.entry.js.map +0 -1
- package/dist/core/p-0c3a0d85.entry.js +0 -2
- package/dist/core/p-0c3a0d85.entry.js.map +0 -1
- package/dist/core/p-1083a708.entry.js +0 -2
- package/dist/core/p-1083a708.entry.js.map +0 -1
- package/dist/core/p-130dd440.entry.js +0 -2
- package/dist/core/p-130dd440.entry.js.map +0 -1
- package/dist/core/p-1e802eeb.entry.js.map +0 -1
- package/dist/core/p-21312898.entry.js +0 -2
- package/dist/core/p-21312898.entry.js.map +0 -1
- package/dist/core/p-21e5dd29.entry.js +0 -2
- package/dist/core/p-21e5dd29.entry.js.map +0 -1
- package/dist/core/p-2ab86057.entry.js +0 -2
- package/dist/core/p-2ab86057.entry.js.map +0 -1
- package/dist/core/p-312cacae.js +0 -2
- package/dist/core/p-312cacae.js.map +0 -1
- package/dist/core/p-31fc8756.entry.js +0 -2
- package/dist/core/p-31fc8756.entry.js.map +0 -1
- package/dist/core/p-355acffa.entry.js +0 -2
- package/dist/core/p-355acffa.entry.js.map +0 -1
- package/dist/core/p-35b8b480.entry.js +0 -2
- package/dist/core/p-35b8b480.entry.js.map +0 -1
- package/dist/core/p-363d6e88.entry.js +0 -2
- package/dist/core/p-363d6e88.entry.js.map +0 -1
- package/dist/core/p-40e9e76a.entry.js +0 -2
- package/dist/core/p-40e9e76a.entry.js.map +0 -1
- package/dist/core/p-43f9a711.entry.js +0 -2
- package/dist/core/p-43f9a711.entry.js.map +0 -1
- package/dist/core/p-46ee459b.entry.js.map +0 -1
- package/dist/core/p-54238d16.entry.js.map +0 -1
- package/dist/core/p-550d7356.entry.js +0 -2
- package/dist/core/p-550d7356.entry.js.map +0 -1
- package/dist/core/p-56d1828c.entry.js +0 -2
- package/dist/core/p-56d1828c.entry.js.map +0 -1
- package/dist/core/p-5a2630fb.entry.js +0 -2
- package/dist/core/p-5a2630fb.entry.js.map +0 -1
- package/dist/core/p-5a52614c.entry.js +0 -2
- package/dist/core/p-5a52614c.entry.js.map +0 -1
- package/dist/core/p-60efd7fa.entry.js +0 -2
- package/dist/core/p-60efd7fa.entry.js.map +0 -1
- package/dist/core/p-69f3ce5a.entry.js +0 -2
- package/dist/core/p-69f3ce5a.entry.js.map +0 -1
- package/dist/core/p-78ce4920.entry.js +0 -2
- package/dist/core/p-78ce4920.entry.js.map +0 -1
- package/dist/core/p-79d2a33b.entry.js +0 -2
- package/dist/core/p-79d2a33b.entry.js.map +0 -1
- package/dist/core/p-80237a20.entry.js +0 -2
- package/dist/core/p-80237a20.entry.js.map +0 -1
- package/dist/core/p-804513ad.entry.js +0 -2
- package/dist/core/p-804513ad.entry.js.map +0 -1
- package/dist/core/p-82375dca.entry.js +0 -2
- package/dist/core/p-82375dca.entry.js.map +0 -1
- package/dist/core/p-8e1e25a7.entry.js +0 -2
- package/dist/core/p-8e1e25a7.entry.js.map +0 -1
- package/dist/core/p-a1a1000d.entry.js +0 -2
- package/dist/core/p-a1a1000d.entry.js.map +0 -1
- package/dist/core/p-a1b1a0ab.entry.js +0 -2
- package/dist/core/p-a1b1a0ab.entry.js.map +0 -1
- package/dist/core/p-a37bcdbe.entry.js +0 -2
- package/dist/core/p-a37bcdbe.entry.js.map +0 -1
- package/dist/core/p-a3b6a02d.entry.js.map +0 -1
- package/dist/core/p-a765ad17.entry.js +0 -2
- package/dist/core/p-a765ad17.entry.js.map +0 -1
- package/dist/core/p-aa2be24c.entry.js +0 -2
- package/dist/core/p-aa2be24c.entry.js.map +0 -1
- package/dist/core/p-b12a5283.entry.js +0 -2
- package/dist/core/p-b12a5283.entry.js.map +0 -1
- package/dist/core/p-b1b05979.entry.js +0 -2
- package/dist/core/p-b1b05979.entry.js.map +0 -1
- package/dist/core/p-c6795377.entry.js +0 -2
- package/dist/core/p-c6795377.entry.js.map +0 -1
- package/dist/core/p-c81109da.entry.js.map +0 -1
- package/dist/core/p-cb4d104e.entry.js +0 -2
- package/dist/core/p-cb4d104e.entry.js.map +0 -1
- package/dist/core/p-d2f89cb5.entry.js +0 -2
- package/dist/core/p-d2f89cb5.entry.js.map +0 -1
- package/dist/core/p-d43d1ec0.entry.js +0 -2
- package/dist/core/p-d43d1ec0.entry.js.map +0 -1
- package/dist/core/p-d5829a35.entry.js +0 -2
- package/dist/core/p-d5829a35.entry.js.map +0 -1
- package/dist/core/p-ddb8d280.entry.js +0 -2
- package/dist/core/p-ddb8d280.entry.js.map +0 -1
- package/dist/core/p-e0e34fa7.entry.js +0 -2
- package/dist/core/p-e0e34fa7.entry.js.map +0 -1
- package/dist/core/p-e4b276b5.entry.js +0 -2
- package/dist/core/p-e4b276b5.entry.js.map +0 -1
- package/dist/core/p-e597da0e.entry.js.map +0 -1
- package/dist/core/p-e861a2b3.entry.js.map +0 -1
- package/dist/core/p-ea277b05.entry.js +0 -2
- package/dist/core/p-ea277b05.entry.js.map +0 -1
- package/dist/core/p-ef871b8f.entry.js +0 -2
- package/dist/core/p-ef871b8f.entry.js.map +0 -1
- package/dist/core/p-f229d19e.entry.js +0 -2
- package/dist/core/p-f229d19e.entry.js.map +0 -1
- package/dist/core/p-f30f3a3e.entry.js +0 -2
- package/dist/core/p-f30f3a3e.entry.js.map +0 -1
- package/dist/core/p-fa587e6d.entry.js +0 -2
- package/dist/core/p-fa587e6d.entry.js.map +0 -1
- package/dist/core/p-fb6ac08d.entry.js +0 -2
- package/dist/core/p-fb6ac08d.entry.js.map +0 -1
- package/dist/esm/helpers-1c9151ef.js.map +0 -1
- /package/dist/core/{p-d8870804.entry.js.map → p-e2cf6e7e.entry.js.map} +0 -0
@@ -1,7 +1,7 @@
|
|
1
|
-
import { Host, h,
|
1
|
+
import { Host, h, } from "@stencil/core";
|
2
2
|
import closeIcon from "../../assets/close-icon.svg";
|
3
|
-
import { isSlotUsed,
|
4
|
-
import {
|
3
|
+
import { isSlotUsed, renderDynamicChildSlots } from "../../utils/helpers";
|
4
|
+
import { IcBrandForegroundEnum, } from "../../utils/types";
|
5
5
|
import { VARIANT_ICONS } from "../../utils/constants";
|
6
6
|
/**
|
7
7
|
* @slot message - Content is placed to the right of the title.
|
@@ -14,22 +14,16 @@ export class Alert {
|
|
14
14
|
this.dismissAction = () => {
|
15
15
|
this.icDismiss.emit();
|
16
16
|
};
|
17
|
-
this.hostMutationCallback = (mutationList) => {
|
18
|
-
if (mutationList.some(({ type, addedNodes, removedNodes }) => type === "childList"
|
19
|
-
? checkSlotInChildMutations(addedNodes, removedNodes, "action")
|
20
|
-
: false)) {
|
21
|
-
forceUpdate(this);
|
22
|
-
}
|
23
|
-
};
|
24
17
|
this.alertTitleWrap = false;
|
25
18
|
this.visible = true;
|
26
19
|
this.announced = true;
|
27
20
|
this.dismissible = false;
|
28
21
|
this.heading = "";
|
29
22
|
this.message = undefined;
|
23
|
+
this.showDefaultIcon = true;
|
24
|
+
this.theme = "inherit";
|
30
25
|
this.titleAbove = false;
|
31
26
|
this.variant = "neutral";
|
32
|
-
this.showDefaultIcon = true;
|
33
27
|
}
|
34
28
|
disconnectedCallback() {
|
35
29
|
var _a;
|
@@ -37,7 +31,7 @@ export class Alert {
|
|
37
31
|
}
|
38
32
|
componentDidLoad() {
|
39
33
|
this.alertTitleShouldWrap();
|
40
|
-
this.hostMutationObserver = new MutationObserver(this
|
34
|
+
this.hostMutationObserver = new MutationObserver((mutationList) => renderDynamicChildSlots(mutationList, "action", this));
|
41
35
|
this.hostMutationObserver.observe(this.el, {
|
42
36
|
childList: true,
|
43
37
|
});
|
@@ -52,9 +46,10 @@ export class Alert {
|
|
52
46
|
this.alertTitleWrap = true;
|
53
47
|
}
|
54
48
|
render() {
|
55
|
-
const { variant, heading, message, titleAbove, dismissible, announced, visible, showDefaultIcon, } = this;
|
49
|
+
const { variant, heading, message, titleAbove, dismissible, announced, visible, showDefaultIcon, theme, } = this;
|
56
50
|
return (visible && (h(Host, { role: announced ? "alert" : null, class: {
|
57
|
-
[
|
51
|
+
[IcBrandForegroundEnum.Dark]: true,
|
52
|
+
[`ic-theme-${theme}`]: theme !== "inherit",
|
58
53
|
} }, h("div", { class: {
|
59
54
|
["container"]: true,
|
60
55
|
[`container-${variant}`]: true,
|
@@ -78,7 +73,7 @@ export class Alert {
|
|
78
73
|
}, variant: "subtitle-large" }, h("p", null, heading))), h("slot", { name: "message" }, h("ic-typography", { variant: "body" }, message))), isSlotUsed(this.el, "action") && (h("div", { class: "alert-action-container" }, h("slot", { name: "action" })))), h("div", { class: "dismiss-icon-container" }, dismissible && (h("ic-button", { class: {
|
79
74
|
["svg-container"]: true,
|
80
75
|
["dismiss-icon"]: true,
|
81
|
-
}, innerHTML: closeIcon, onClick: this.dismissAction, variant: "icon",
|
76
|
+
}, innerHTML: closeIcon, onClick: this.dismissAction, variant: "icon", theme: "dark", title: "Dismiss" })))))));
|
82
77
|
}
|
83
78
|
static get is() { return "ic-alert"; }
|
84
79
|
static get encapsulation() { return "shadow"; }
|
@@ -165,7 +160,7 @@ export class Alert {
|
|
165
160
|
"attribute": "message",
|
166
161
|
"reflect": false
|
167
162
|
},
|
168
|
-
"
|
163
|
+
"showDefaultIcon": {
|
169
164
|
"type": "boolean",
|
170
165
|
"mutable": false,
|
171
166
|
"complexType": {
|
@@ -174,26 +169,26 @@ export class Alert {
|
|
174
169
|
"references": {}
|
175
170
|
},
|
176
171
|
"required": false,
|
177
|
-
"optional":
|
172
|
+
"optional": false,
|
178
173
|
"docs": {
|
179
174
|
"tags": [],
|
180
|
-
"text": "If `true`, the
|
175
|
+
"text": "If `true`, the default icon for the neutral variant will appear on the left of the alert."
|
181
176
|
},
|
182
|
-
"attribute": "
|
177
|
+
"attribute": "show-default-icon",
|
183
178
|
"reflect": false,
|
184
|
-
"defaultValue": "
|
179
|
+
"defaultValue": "true"
|
185
180
|
},
|
186
|
-
"
|
181
|
+
"theme": {
|
187
182
|
"type": "string",
|
188
183
|
"mutable": false,
|
189
184
|
"complexType": {
|
190
|
-
"original": "
|
191
|
-
"resolved": "\"
|
185
|
+
"original": "IcThemeMode",
|
186
|
+
"resolved": "\"dark\" | \"inherit\" | \"light\"",
|
192
187
|
"references": {
|
193
|
-
"
|
188
|
+
"IcThemeMode": {
|
194
189
|
"location": "import",
|
195
190
|
"path": "../../utils/types",
|
196
|
-
"id": "src/utils/types.ts::
|
191
|
+
"id": "src/utils/types.ts::IcThemeMode"
|
197
192
|
}
|
198
193
|
}
|
199
194
|
},
|
@@ -201,13 +196,13 @@ export class Alert {
|
|
201
196
|
"optional": true,
|
202
197
|
"docs": {
|
203
198
|
"tags": [],
|
204
|
-
"text": "
|
199
|
+
"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."
|
205
200
|
},
|
206
|
-
"attribute": "
|
201
|
+
"attribute": "theme",
|
207
202
|
"reflect": false,
|
208
|
-
"defaultValue": "\"
|
203
|
+
"defaultValue": "\"inherit\""
|
209
204
|
},
|
210
|
-
"
|
205
|
+
"titleAbove": {
|
211
206
|
"type": "boolean",
|
212
207
|
"mutable": false,
|
213
208
|
"complexType": {
|
@@ -216,14 +211,38 @@ export class Alert {
|
|
216
211
|
"references": {}
|
217
212
|
},
|
218
213
|
"required": false,
|
219
|
-
"optional":
|
214
|
+
"optional": true,
|
220
215
|
"docs": {
|
221
216
|
"tags": [],
|
222
|
-
"text": "If `true`, the
|
217
|
+
"text": "If `true`, the title and message will appear above and below instead of inline."
|
223
218
|
},
|
224
|
-
"attribute": "
|
219
|
+
"attribute": "title-above",
|
225
220
|
"reflect": false,
|
226
|
-
"defaultValue": "
|
221
|
+
"defaultValue": "false"
|
222
|
+
},
|
223
|
+
"variant": {
|
224
|
+
"type": "string",
|
225
|
+
"mutable": false,
|
226
|
+
"complexType": {
|
227
|
+
"original": "IcStatusVariants",
|
228
|
+
"resolved": "\"error\" | \"info\" | \"neutral\" | \"success\" | \"warning\"",
|
229
|
+
"references": {
|
230
|
+
"IcStatusVariants": {
|
231
|
+
"location": "import",
|
232
|
+
"path": "../../utils/types",
|
233
|
+
"id": "src/utils/types.ts::IcStatusVariants"
|
234
|
+
}
|
235
|
+
}
|
236
|
+
},
|
237
|
+
"required": false,
|
238
|
+
"optional": true,
|
239
|
+
"docs": {
|
240
|
+
"tags": [],
|
241
|
+
"text": "The variant of the alert which will be rendered."
|
242
|
+
},
|
243
|
+
"attribute": "variant",
|
244
|
+
"reflect": false,
|
245
|
+
"defaultValue": "\"neutral\""
|
227
246
|
}
|
228
247
|
};
|
229
248
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ic-alert.js","sourceRoot":"","sources":["../../../src/components/ic-alert/ic-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,KAAK,EACL,MAAM,EACN,IAAI,EACJ,CAAC,EACD,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAoB,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD;;;;GAIG;AAMH,MAAM,OAAO,KAAK;;QACR,yBAAoB,GAAqB,IAAI,CAAC;QAiE9C,kBAAa,GAAG,GAAS,EAAE;YACjC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC,CAAC;QAQM,yBAAoB,GAAG,CAAC,YAA8B,EAAQ,EAAE;YACtE,IACE,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE,EAAE,CACvD,IAAI,KAAK,WAAW;gBAClB,CAAC,CAAC,yBAAyB,CAAC,UAAU,EAAE,YAAY,EAAE,QAAQ,CAAC;gBAC/D,CAAC,CAAC,KAAK,CACV,EACD,CAAC;gBACD,WAAW,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;QACH,CAAC,CAAC;8BAjFiC,KAAK;uBACZ,IAAI;yBAKF,IAAI;2BAKF,KAAK;uBAKV,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BAAe,OAAO,EAAC,MAAM,IAAE,OAAO,CAAiB,CAClD,CACH;oBACL,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI,CAChC,WAAK,KAAK,EAAC,wBAAwB;wBACjC,YAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACP,CACG;gBACN,WAAK,KAAK,EAAC,wBAAwB,IAChC,WAAW,IAAI,CACd,iBACE,KAAK,EAAE;wBACL,CAAC,eAAe,CAAC,EAAE,IAAI;wBACvB,CAAC,cAAc,CAAC,EAAE,IAAI;qBACvB,EACD,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,OAAO,EAAC,MAAM,EACd,UAAU,EAAE,qBAAqB,CAAC,IAAI,EACtC,KAAK,EAAC,SAAS,GACJ,CACd,CACG,CACF,CACD,CACR,CACF,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n State,\n Listen,\n Prop,\n h,\n forceUpdate,\n} from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { isSlotUsed, checkSlotInChildMutations } from \"../../utils/helpers\";\nimport { IcThemeForegroundEnum, IcStatusVariants } from \"../../utils/types\";\nimport { VARIANT_ICONS } from \"../../utils/constants\";\n\n/**\n * @slot message - Content is placed to the right of the title.\n * @slot action - Content is placed to the right of the message.\n * @slot neutral-icon - A custom neutral icon is placed to the left of the title. This will override the default icon if used.\n */\n@Component({\n tag: \"ic-alert\",\n styleUrl: \"ic-alert.css\",\n shadow: true,\n})\nexport class Alert {\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcAlertElement;\n\n @State() alertTitleWrap: boolean = false;\n @State() visible: boolean = true;\n\n /**\n * If `true`, the alert will have the 'alert' ARIA role and will be announced to screen readers.\n */\n @Prop() announced?: boolean = true;\n\n /**\n * If `true`, the alert will have a close icon at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n\n /**\n * The optional title to display at the start of the alert.\n */\n @Prop() heading?: string = \"\";\n\n /**\n * The main body message of the alert.\n */\n @Prop() message?: string;\n\n /**\n * If `true`, the title and message will appear above and below instead of inline.\n */\n @Prop() titleAbove?: boolean = false;\n\n /**\n * The variant of the alert which will be rendered.\n */\n @Prop() variant?: IcStatusVariants = \"neutral\";\n\n /**\n * If `true`, the default icon for the neutral variant will be appear on the left of the alert.\n */\n @Prop() showDefaultIcon: boolean = true;\n\n /**\n * Is emitted when the user dismisses the alert.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n }\n\n componentDidLoad(): void {\n this.alertTitleShouldWrap();\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n\n private dismissAction = (): void => {\n this.icDismiss.emit();\n };\n\n private alertTitleShouldWrap() {\n const titleHeight =\n this.el.shadowRoot.querySelector(\".alert-title\")?.clientHeight;\n if (titleHeight > 24) this.alertTitleWrap = true;\n }\n\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n if (\n mutationList.some(({ type, addedNodes, removedNodes }) =>\n type === \"childList\"\n ? checkSlotInChildMutations(addedNodes, removedNodes, \"action\")\n : false\n )\n ) {\n forceUpdate(this);\n }\n };\n\n render() {\n const {\n variant,\n heading,\n message,\n titleAbove,\n dismissible,\n announced,\n visible,\n showDefaultIcon,\n } = this;\n\n return (\n visible && (\n <Host\n role={announced ? \"alert\" : null}\n class={{\n [IcThemeForegroundEnum.Dark]: true,\n }}\n >\n <div\n class={{\n [\"container\"]: true,\n [`container-${variant}`]: true,\n }}\n >\n <div class=\"alert-icon-container\">\n <div\n class={{\n [\"divider\"]: true,\n [`divider-${variant}`]: true,\n }}\n ></div>\n {variant === \"neutral\" ? (\n isSlotUsed(this.el, \"neutral-icon\") ? (\n <div class=\"alert-icon svg-container icon-neutral\">\n <slot name=\"neutral-icon\"></slot>\n </div>\n ) : showDefaultIcon ? (\n <span\n class={{\n [\"alert-icon\"]: true,\n [\"svg-container\"]: true,\n [`icon-${variant}`]: true,\n }}\n innerHTML={VARIANT_ICONS[variant].icon}\n ></span>\n ) : (\n <div class=\"icon-placeholder\"></div>\n )\n ) : (\n <span\n class={{\n [\"alert-icon\"]: true,\n [\"svg-container\"]: true,\n [`icon-${variant}`]: true,\n }}\n innerHTML={VARIANT_ICONS[variant].icon}\n ></span>\n )}\n </div>\n <div class=\"alert-content\">\n <div\n class={{\n [\"alert-message\"]: true,\n [\"alert-message-title-above\"]:\n titleAbove || this.alertTitleWrap,\n }}\n >\n {heading && (\n <ic-typography\n class={{\n [\"alert-title\"]: true,\n [\"alert-title-above\"]: titleAbove || this.alertTitleWrap,\n }}\n variant=\"subtitle-large\"\n >\n <p>{heading}</p>\n </ic-typography>\n )}\n <slot name=\"message\">\n <ic-typography variant=\"body\">{message}</ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"action\") && (\n <div class=\"alert-action-container\">\n <slot name=\"action\" />\n </div>\n )}\n </div>\n <div class=\"dismiss-icon-container\">\n {dismissible && (\n <ic-button\n class={{\n [\"svg-container\"]: true,\n [\"dismiss-icon\"]: true,\n }}\n innerHTML={closeIcon}\n onClick={this.dismissAction}\n variant=\"icon\"\n appearance={IcThemeForegroundEnum.Dark}\n title=\"dismiss\"\n ></ic-button>\n )}\n </div>\n </div>\n </Host>\n )\n );\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"ic-alert.js","sourceRoot":"","sources":["../../../src/components/ic-alert/ic-al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d,CACG,CACF,CACD,CACR,CACF,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n State,\n Listen,\n Prop,\n h,\n} from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { isSlotUsed, renderDynamicChildSlots } from \"../../utils/helpers\";\nimport {\n IcBrandForegroundEnum,\n IcStatusVariants,\n IcThemeMode,\n} from \"../../utils/types\";\nimport { VARIANT_ICONS } from \"../../utils/constants\";\n\n/**\n * @slot message - Content is placed to the right of the title.\n * @slot action - Content is placed to the right of the message.\n * @slot neutral-icon - A custom neutral icon is placed to the left of the title. This will override the default icon if used.\n */\n@Component({\n tag: \"ic-alert\",\n styleUrl: \"ic-alert.css\",\n shadow: true,\n})\nexport class Alert {\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcAlertElement;\n\n @State() alertTitleWrap: boolean = false;\n @State() visible: boolean = true;\n\n /**\n * If `true`, the alert will have the 'alert' ARIA role and will be announced to screen readers.\n */\n @Prop() announced?: boolean = true;\n\n /**\n * If `true`, the alert will have a close icon at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n\n /**\n * The optional title to display at the start of the alert.\n */\n @Prop() heading?: string = \"\";\n\n /**\n * The main body message of the alert.\n */\n @Prop() message?: string;\n\n /**\n * If `true`, the default icon for the neutral variant will appear on the left of the alert.\n */\n @Prop() showDefaultIcon: boolean = true;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * If `true`, the title and message will appear above and below instead of inline.\n */\n @Prop() titleAbove?: boolean = false;\n\n /**\n * The variant of the alert which will be rendered.\n */\n @Prop() variant?: IcStatusVariants = \"neutral\";\n\n /**\n * Is emitted when the user dismisses the alert.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n }\n\n componentDidLoad(): void {\n this.alertTitleShouldWrap();\n\n this.hostMutationObserver = new MutationObserver((mutationList) =>\n renderDynamicChildSlots(mutationList, \"action\", this)\n );\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n\n private dismissAction = (): void => {\n this.icDismiss.emit();\n };\n\n private alertTitleShouldWrap() {\n const titleHeight =\n this.el.shadowRoot.querySelector(\".alert-title\")?.clientHeight;\n if (titleHeight > 24) this.alertTitleWrap = true;\n }\n\n render() {\n const {\n variant,\n heading,\n message,\n titleAbove,\n dismissible,\n announced,\n visible,\n showDefaultIcon,\n theme,\n } = this;\n\n return (\n visible && (\n <Host\n role={announced ? \"alert\" : null}\n class={{\n [IcBrandForegroundEnum.Dark]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <div\n class={{\n [\"container\"]: true,\n [`container-${variant}`]: true,\n }}\n >\n <div class=\"alert-icon-container\">\n <div\n class={{\n [\"divider\"]: true,\n [`divider-${variant}`]: true,\n }}\n ></div>\n {variant === \"neutral\" ? (\n isSlotUsed(this.el, \"neutral-icon\") ? (\n <div class=\"alert-icon svg-container icon-neutral\">\n <slot name=\"neutral-icon\"></slot>\n </div>\n ) : showDefaultIcon ? (\n <span\n class={{\n [\"alert-icon\"]: true,\n [\"svg-container\"]: true,\n [`icon-${variant}`]: true,\n }}\n innerHTML={VARIANT_ICONS[variant].icon}\n ></span>\n ) : (\n <div class=\"icon-placeholder\"></div>\n )\n ) : (\n <span\n class={{\n [\"alert-icon\"]: true,\n [\"svg-container\"]: true,\n [`icon-${variant}`]: true,\n }}\n innerHTML={VARIANT_ICONS[variant].icon}\n ></span>\n )}\n </div>\n <div class=\"alert-content\">\n <div\n class={{\n [\"alert-message\"]: true,\n [\"alert-message-title-above\"]:\n titleAbove || this.alertTitleWrap,\n }}\n >\n {heading && (\n <ic-typography\n class={{\n [\"alert-title\"]: true,\n [\"alert-title-above\"]: titleAbove || this.alertTitleWrap,\n }}\n variant=\"subtitle-large\"\n >\n <p>{heading}</p>\n </ic-typography>\n )}\n <slot name=\"message\">\n <ic-typography variant=\"body\">{message}</ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"action\") && (\n <div class=\"alert-action-container\">\n <slot name=\"action\" />\n </div>\n )}\n </div>\n <div class=\"dismiss-icon-container\">\n {dismissible && (\n <ic-button\n class={{\n [\"svg-container\"]: true,\n [\"dismiss-icon\"]: true,\n }}\n innerHTML={closeIcon}\n onClick={this.dismissAction}\n variant=\"icon\"\n theme=\"dark\"\n title=\"Dismiss\"\n ></ic-button>\n )}\n </div>\n </div>\n </Host>\n )\n );\n }\n}\n"]}
|
@@ -0,0 +1,271 @@
|
|
1
|
+
import { html } from "lit-html";
|
2
|
+
|
3
|
+
const defaultArgs = {
|
4
|
+
dismissible: false,
|
5
|
+
heading: "Heading",
|
6
|
+
message: "Message",
|
7
|
+
titleAbove: false,
|
8
|
+
variant: "neutral",
|
9
|
+
showAction: false,
|
10
|
+
showDefaultIcon: true,
|
11
|
+
showSlottedIcon: false,
|
12
|
+
theme: "inherit",
|
13
|
+
};
|
14
|
+
|
15
|
+
export default {
|
16
|
+
title: "Web Components/Alert",
|
17
|
+
component: "ic-alert",
|
18
|
+
};
|
19
|
+
|
20
|
+
export const Variants = {
|
21
|
+
render: () =>
|
22
|
+
html`<ic-alert
|
23
|
+
heading="Neutral"
|
24
|
+
message="This alert is for displaying miscellaneous messages"
|
25
|
+
></ic-alert>
|
26
|
+
<ic-alert
|
27
|
+
variant="info"
|
28
|
+
heading="Info"
|
29
|
+
message="This alert is for displaying information"
|
30
|
+
></ic-alert>
|
31
|
+
<ic-alert
|
32
|
+
variant="error"
|
33
|
+
heading="Error"
|
34
|
+
message="This alert is for displaying errors"
|
35
|
+
></ic-alert>
|
36
|
+
<ic-alert
|
37
|
+
variant="warning"
|
38
|
+
heading="Warning"
|
39
|
+
message="This alert is for displaying warnings"
|
40
|
+
></ic-alert>
|
41
|
+
<ic-alert
|
42
|
+
variant="success"
|
43
|
+
heading="Success"
|
44
|
+
message="This alert is for displaying success messages. It has a very long message with lots of text which goes over multiple
|
45
|
+
lines so the alert should expand as well to make sure it doesn't overflow"
|
46
|
+
></ic-alert>`,
|
47
|
+
|
48
|
+
name: "Variants",
|
49
|
+
};
|
50
|
+
|
51
|
+
export const MessageOnly = {
|
52
|
+
render: () =>
|
53
|
+
html`<ic-alert
|
54
|
+
message="This alert is for displaying miscellaneous messages"
|
55
|
+
></ic-alert>`,
|
56
|
+
|
57
|
+
name: "Message only",
|
58
|
+
};
|
59
|
+
|
60
|
+
export const Dismissible = {
|
61
|
+
render: () =>
|
62
|
+
html`<ic-alert
|
63
|
+
heading="Neutral"
|
64
|
+
message="This alert is for displaying miscellaneous messages"
|
65
|
+
dismissible="true"
|
66
|
+
></ic-alert>`,
|
67
|
+
|
68
|
+
name: "Dismissible",
|
69
|
+
};
|
70
|
+
|
71
|
+
export const WithAction = {
|
72
|
+
render: () =>
|
73
|
+
html`<ic-alert
|
74
|
+
heading="Neutral"
|
75
|
+
message="This alert is for displaying miscellaneous messages"
|
76
|
+
><ic-button slot="action" variant="secondary" monochrome="true"
|
77
|
+
>Button</ic-button
|
78
|
+
></ic-alert
|
79
|
+
>`,
|
80
|
+
|
81
|
+
name: "With action",
|
82
|
+
};
|
83
|
+
|
84
|
+
export const DismissibleWithAction = {
|
85
|
+
render: () =>
|
86
|
+
html`<ic-alert
|
87
|
+
heading="Neutral"
|
88
|
+
message="This alert is for displaying miscellaneous messages"
|
89
|
+
dismissible="true"
|
90
|
+
><ic-button slot="action" variant="secondary" monochrome="true"
|
91
|
+
>Button</ic-button
|
92
|
+
></ic-alert
|
93
|
+
>`,
|
94
|
+
|
95
|
+
name: "Dismissible with action",
|
96
|
+
};
|
97
|
+
|
98
|
+
export const TitleAbove = {
|
99
|
+
render: () =>
|
100
|
+
html`<ic-alert
|
101
|
+
heading="Neutral"
|
102
|
+
message="This alert is for displaying miscellaneous messages"
|
103
|
+
title-above="true"
|
104
|
+
></ic-alert>`,
|
105
|
+
|
106
|
+
name: "Title above",
|
107
|
+
};
|
108
|
+
|
109
|
+
export const ResponsiveTitle = {
|
110
|
+
render: () =>
|
111
|
+
html`<ic-alert
|
112
|
+
heading="This title is very long so should force the alert to add 'title-above'"
|
113
|
+
message="This alert does not have 'title-above' added as a prop but it is forced to add it due to the length of the title"
|
114
|
+
></ic-alert>
|
115
|
+
<ic-alert
|
116
|
+
variant="success"
|
117
|
+
heading="Shorter title"
|
118
|
+
message="Neither of these has 'title-above' set to true"
|
119
|
+
></ic-alert>`,
|
120
|
+
|
121
|
+
name: "Responsive title",
|
122
|
+
};
|
123
|
+
|
124
|
+
export const CustomMessage = {
|
125
|
+
render: () =>
|
126
|
+
html`<ic-alert heading="This alert uses a custom message slot">
|
127
|
+
<ic-typography slot="message">
|
128
|
+
This is some text and
|
129
|
+
<ic-link href="/" inline>this is an inline link</ic-link> within the
|
130
|
+
text.
|
131
|
+
</ic-typography>
|
132
|
+
</ic-alert>`,
|
133
|
+
|
134
|
+
name: "Custom message",
|
135
|
+
};
|
136
|
+
|
137
|
+
export const CustomMessageAndTitleAbove = {
|
138
|
+
render: () => html`<ic-alert
|
139
|
+
heading="Want to know more about our coffee?"
|
140
|
+
title-above="true"
|
141
|
+
>
|
142
|
+
<ic-typography slot="message">
|
143
|
+
Go to our <ic-link href="/">coffee page</ic-link> to learn more.
|
144
|
+
</ic-typography>
|
145
|
+
</ic-alert>`,
|
146
|
+
|
147
|
+
name: "Custom message and title above",
|
148
|
+
};
|
149
|
+
|
150
|
+
export const Announced = {
|
151
|
+
render: () => html`
|
152
|
+
<ic-alert
|
153
|
+
id="alert"
|
154
|
+
heading="Neutral"
|
155
|
+
message="This alert is for displaying miscellaneous messages"
|
156
|
+
announced="false"
|
157
|
+
></ic-alert>
|
158
|
+
<br />
|
159
|
+
<br />
|
160
|
+
<ic-button variant="primary" size="small" onClick="onClick()" id="btn"
|
161
|
+
>Toggle announced prop</ic-button
|
162
|
+
>
|
163
|
+
<script>
|
164
|
+
const alert = document.getElementById("alert");
|
165
|
+
const btn = document.getElementById("btn");
|
166
|
+
btn.addEventListener("click", onClick);
|
167
|
+
function onClick(e) {
|
168
|
+
e.preventDefault();
|
169
|
+
alert.announced
|
170
|
+
? (alert.announced = "false")
|
171
|
+
: (alert.announced = "true");
|
172
|
+
}
|
173
|
+
</script>
|
174
|
+
`,
|
175
|
+
|
176
|
+
name: "Announced",
|
177
|
+
};
|
178
|
+
|
179
|
+
export const SlottedIcon = {
|
180
|
+
render: () => html`
|
181
|
+
<ic-alert
|
182
|
+
id="alert"
|
183
|
+
heading="Neutral"
|
184
|
+
message="This alert contains a slotted icon"
|
185
|
+
show-default-icon="false"
|
186
|
+
>
|
187
|
+
<svg
|
188
|
+
slot="neutral-icon"
|
189
|
+
xmlns="http://www.w3.org/2000/svg"
|
190
|
+
height="24px"
|
191
|
+
viewBox="0 0 24 24"
|
192
|
+
width="24px"
|
193
|
+
fill="#000000"
|
194
|
+
>
|
195
|
+
<path d="M0 0h24v24H0V0z" fill="none" />
|
196
|
+
<path
|
197
|
+
d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
|
198
|
+
/>
|
199
|
+
</svg>
|
200
|
+
</ic-alert>
|
201
|
+
`,
|
202
|
+
|
203
|
+
name: "Slotted icon",
|
204
|
+
};
|
205
|
+
|
206
|
+
export const NoIcon = {
|
207
|
+
render: () => html`
|
208
|
+
<ic-alert
|
209
|
+
id="alert"
|
210
|
+
heading="Neutral"
|
211
|
+
message="This alert has no icon"
|
212
|
+
show-default-icon="false"
|
213
|
+
></ic-alert>
|
214
|
+
`,
|
215
|
+
|
216
|
+
name: "No icon",
|
217
|
+
};
|
218
|
+
|
219
|
+
export const Playground = {
|
220
|
+
render: (args) =>
|
221
|
+
html`<ic-alert
|
222
|
+
dismissible=${args.dismissible}
|
223
|
+
variant=${args.variant}
|
224
|
+
heading=${args.heading}
|
225
|
+
message=${args.message}
|
226
|
+
title-above=${args.titleAbove}
|
227
|
+
show-default-icon=${args.showDefaultIcon}
|
228
|
+
theme=${args.theme}
|
229
|
+
>
|
230
|
+
${args.showAction &&
|
231
|
+
html`<ic-button slot="action" variant="secondary" monochrome="true"
|
232
|
+
>Button</ic-button
|
233
|
+
>`}
|
234
|
+
${args.showSlottedIcon &&
|
235
|
+
html`<svg
|
236
|
+
slot="neutral-icon"
|
237
|
+
xmlns="http://www.w3.org/2000/svg"
|
238
|
+
height="24px"
|
239
|
+
viewBox="0 0 24 24"
|
240
|
+
width="24px"
|
241
|
+
fill="#000000"
|
242
|
+
>
|
243
|
+
<path d="M0 0h24v24H0V0z" fill="none" />
|
244
|
+
<path
|
245
|
+
d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
|
246
|
+
/>
|
247
|
+
</svg>`}
|
248
|
+
</ic-alert>`,
|
249
|
+
|
250
|
+
args: defaultArgs,
|
251
|
+
|
252
|
+
argTypes: {
|
253
|
+
variant: {
|
254
|
+
options: ["neutral", "info", "warning", "error", "success"],
|
255
|
+
|
256
|
+
control: {
|
257
|
+
type: "select",
|
258
|
+
},
|
259
|
+
},
|
260
|
+
|
261
|
+
theme: {
|
262
|
+
options: ["inherit", "light", "dark"],
|
263
|
+
|
264
|
+
control: {
|
265
|
+
type: "inline-radio",
|
266
|
+
},
|
267
|
+
},
|
268
|
+
},
|
269
|
+
|
270
|
+
name: "Playground",
|
271
|
+
};
|
@@ -1,6 +1,13 @@
|
|
1
1
|
import { newSpecPage } from "@stencil/core/testing";
|
2
2
|
import { Alert } from "../../ic-alert";
|
3
|
+
import { mockHasDynamicChildSlots, mockMutationObserverImplementation, mockRenderDynamicChildSlots, } from "../../../../testspec.setup";
|
3
4
|
describe("ic-alert component", () => {
|
5
|
+
afterAll(() => {
|
6
|
+
jest.restoreAllMocks();
|
7
|
+
});
|
8
|
+
afterEach(() => {
|
9
|
+
jest.clearAllMocks();
|
10
|
+
});
|
4
11
|
it("should render with a heading when supplied", async () => {
|
5
12
|
const page = await newSpecPage({
|
6
13
|
components: [Alert],
|
@@ -123,7 +130,7 @@ describe("ic-alert component", () => {
|
|
123
130
|
</div>
|
124
131
|
</div>
|
125
132
|
<div class="dismiss-icon-container">
|
126
|
-
<ic-button
|
133
|
+
<ic-button class="dismiss-icon svg-container" theme="dark" title="Dismiss" variant="icon">
|
127
134
|
svg
|
128
135
|
</ic-button>
|
129
136
|
</div>
|
@@ -297,15 +304,26 @@ describe("ic-alert component", () => {
|
|
297
304
|
components: [Alert],
|
298
305
|
html: `<ic-alert heading="Test heading"></ic-alert>`,
|
299
306
|
});
|
307
|
+
const component = page.rootInstance;
|
308
|
+
const host = page.root;
|
309
|
+
const observerInstance = mockMutationObserverImplementation.mock.results[0].value;
|
300
310
|
const action = document.createElement("button");
|
301
311
|
action.setAttribute("slot", "action");
|
302
|
-
|
312
|
+
observerInstance.observe(host, { childList: true });
|
313
|
+
host.appendChild(action);
|
314
|
+
const mockMutationRecord = [
|
303
315
|
{
|
304
|
-
type: "childList",
|
305
316
|
addedNodes: [action],
|
306
317
|
removedNodes: [],
|
318
|
+
target: host,
|
307
319
|
},
|
308
|
-
]
|
320
|
+
];
|
321
|
+
observerInstance.trigger(mockMutationRecord);
|
322
|
+
await page.waitForChanges();
|
323
|
+
expect(mockRenderDynamicChildSlots).toHaveBeenCalledTimes(1);
|
324
|
+
expect(mockRenderDynamicChildSlots).toHaveBeenCalledWith(mockMutationRecord, "action", component);
|
325
|
+
expect(mockHasDynamicChildSlots).toHaveBeenCalledTimes(1);
|
326
|
+
expect(page.root).toMatchSnapshot();
|
309
327
|
});
|
310
328
|
});
|
311
329
|
//# sourceMappingURL=ic-alert.spec.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ic-alert.spec.js","sourceRoot":"","sources":["../../../../../src/components/ic-alert/test/basic/ic-alert.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,4CAA4C,EAAE,KAAK,IAAI,EAAE;QAC1D,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,KAAK,CAAC;YACnB,IAAI,EAAE,8CAA8C;SACrD,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;oBA0Bd,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,KAAK,IAAI,EAAE;QAC1D,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,KAAK,CAAC;YACnB,IAAI,EAAE,8CAA8C;SACrD,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;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AAa,CAAC,KAAK,EAAE,CAAC;QAE5B,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,KAAK,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;QAE1E,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sDAAsD,EAAE,KAAK,IAAI,EAAE;QACpE,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,KAAK,CAAC;YACnB,IAAI,EAAE,8CAA8C;SACrD,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAChD,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAEtC,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC;YACrC;gBACE,IAAI,EAAE,WAAW;gBACjB,UAAU,EAAE,CAAC,MAAM,CAAC;gBACpB,YAAY,EAAE,EAAE;aACjB;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from \"@stencil/core/testing\";\nimport { Alert } from \"../../ic-alert\";\n\ndescribe(\"ic-alert component\", () => {\n it(\"should render with a heading when supplied\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert heading=\"Test heading\"></ic-alert>`,\n });\n\n expect(page.root).toEqualHtml(`\n <ic-alert class=\"dark\" heading=\"Test heading\" role=\"alert\">\n <mock:shadow-root>\n <div class=\"container container-neutral\">\n <div class=\"alert-icon-container\">\n <div class=\"divider divider-neutral\"></div>\n <span class=\"alert-icon icon-neutral svg-container\">\n svg\n </span>\n </div>\n <div class=\"alert-content\">\n <div class=\"alert-message\">\n <ic-typography class=\"alert-title\" variant=\"subtitle-large\">\n <p>\n Test heading\n </p>\n </ic-typography>\n <slot name=\"message\">\n <ic-typography variant=\"body\"></ic-typography>\n </slot>\n </div>\n </div>\n <div class=\"dismiss-icon-container\">\n </div>\n </div>\n </mock:shadow-root>\n </ic-alert>`);\n });\n\n it(\"should render with a message when supplied\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert message=\"Test message\"></ic-alert>`,\n });\n\n expect(page.root).toEqualHtml(`\n <ic-alert class=\"dark\" message=\"Test message\" role=\"alert\">\n <mock:shadow-root>\n <div class=\"container container-neutral\">\n <div class=\"alert-icon-container\">\n <div class=\"divider divider-neutral\"></div>\n <span class=\"alert-icon icon-neutral svg-container\">\n svg\n </span>\n </div>\n <div class=\"alert-content\">\n <div class=\"alert-message\">\n <slot name=\"message\">\n <ic-typography variant=\"body\">\n Test message\n </ic-typography>\n </slot>\n </div>\n </div>\n <div class=\"dismiss-icon-container\">\n </div>\n </div>\n </mock:shadow-root>\n </ic-alert>`);\n });\n\n it(\"should render an action in the correct position when supplied\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert message=\"This has an action\"><button slot=\"action\"></button></ic-alert>`,\n });\n\n expect(page.root).toEqualHtml(`\n <ic-alert class=\"dark\" message=\"This has an action\" role=\"alert\">\n <mock:shadow-root>\n <div class=\"container container-neutral\">\n <div class=\"alert-icon-container\">\n <div class=\"divider divider-neutral\"></div>\n <span class=\"alert-icon icon-neutral svg-container\">\n svg\n </span>\n </div>\n <div class=\"alert-content\">\n <div class=\"alert-message\">\n <slot name=\"message\">\n <ic-typography variant=\"body\">\n This has an action\n </ic-typography>\n </slot>\n </div>\n <div class=\"alert-action-container\">\n <slot name=\"action\"></slot>\n </div>\n </div>\n <div class=\"dismiss-icon-container\">\n </div>\n </div>\n </mock:shadow-root>\n <button slot=\"action\"></button>\n </ic-alert>`);\n });\n\n it(\"should render with a dismiss icon when the prop is applied\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert message=\"This is dismissible\" dismissible=true></ic-alert>`,\n });\n\n expect(page.root).toEqualHtml(`\n <ic-alert class=\"dark\" message=\"This is dismissible\" dismissible=true role=\"alert\">\n <mock:shadow-root>\n <div class=\"container container-neutral\">\n <div class=\"alert-icon-container\">\n <div class=\"divider divider-neutral\"></div>\n <span class=\"alert-icon icon-neutral svg-container\">\n svg\n </span>\n </div>\n <div class=\"alert-content\">\n <div class=\"alert-message\">\n <slot name=\"message\">\n <ic-typography variant=\"body\">\n This is dismissible\n </ic-typography>\n </slot>\n </div>\n </div>\n <div class=\"dismiss-icon-container\">\n <ic-button appearance=\"dark\" class=\"dismiss-icon svg-container\" title=\"dismiss\" variant=\"icon\">\n svg\n </ic-button>\n </div>\n </div>\n </mock:shadow-root>\n </ic-alert>`);\n });\n\n it(\"should render an element in the message slot\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert heading=\"Using custom message\"><ic-typography variant=\"h1\" slot=\"message\">Custom h1 message</ic-typography></ic-alert>`,\n });\n\n expect(page.root).toEqualHtml(`\n <ic-alert class=\"dark\" heading=\"Using custom message\" role=\"alert\">\n <mock:shadow-root>\n <div class=\"container container-neutral\">\n <div class=\"alert-icon-container\">\n <div class=\"divider divider-neutral\"></div>\n <span class=\"alert-icon icon-neutral svg-container\">\n svg\n </span>\n </div>\n <div class=\"alert-content\">\n <div class=\"alert-message\">\n <ic-typography class=\"alert-title\" variant=\"subtitle-large\">\n <p>\n Using custom message\n </p>\n </ic-typography>\n <slot name=\"message\">\n <ic-typography variant=\"body\"></ic-typography>\n </slot>\n </div>\n </div>\n <div class=\"dismiss-icon-container\"></div>\n </div>\n </mock:shadow-root>\n <ic-typography variant=\"h1\" slot=\"message\">Custom h1 message</ic-typography>\n </ic-alert>`);\n });\n\n it(\"should render an icon in the neutral-icon slot\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `\n <ic-alert heading=\"Using custom icon\" message=\"This has a slotted icon\">\n <svg slot=\"neutral-icon\" xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\">\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <path d=\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"/>\n </svg>\n </ic-alert>\n `,\n });\n\n expect(page.root).toEqualHtml(`\n <ic-alert class=\"dark\" heading=\"Using custom icon\" message=\"This has a slotted icon\" role=\"alert\">\n <mock:shadow-root>\n <div class=\"container container-neutral\">\n <div class=\"alert-icon-container\">\n <div class=\"divider divider-neutral\"></div>\n <div class=\"alert-icon icon-neutral svg-container\">\n <slot name=\"neutral-icon\"></slot>\n </div>\n </div>\n <div class=\"alert-content\">\n <div class=\"alert-message\">\n <ic-typography class=\"alert-title\" variant=\"subtitle-large\">\n <p>\n Using custom icon\n </p>\n </ic-typography>\n <slot name=\"message\">\n <ic-typography variant=\"body\">\n This has a slotted icon\n </ic-typography>\n </slot>\n </div>\n </div>\n <div class=\"dismiss-icon-container\"></div>\n </div>\n </mock:shadow-root>\n <svg fill=\"#000000\" height=\"24px\" slot=\"neutral-icon\" viewBox=\"0 0 24 24\" width=\"24px\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\"></path>\n <path d=\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"></path>\n </svg>\n </ic-alert>`);\n });\n\n it(\"should render with no icon when the show-default-icon prop is set to false\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert heading=\"No icon\" message=\"This alert has no icon\" show-defaul-icon=false></ic-alert>`,\n });\n\n expect(page.root).toEqualHtml(`\n <ic-alert class=\"dark\" heading=\"No icon\" message=\"This alert has no icon\" role=\"alert\" show-defaul-icon=\"false\">\n <mock:shadow-root>\n <div class=\"container container-neutral\">\n <div class=\"alert-icon-container\">\n <div class=\"divider divider-neutral\"></div>\n <span class=\"alert-icon icon-neutral svg-container\">\n svg\n </span>\n </div>\n <div class=\"alert-content\">\n <div class=\"alert-message\">\n <ic-typography class=\"alert-title\" variant=\"subtitle-large\">\n <p>\n No icon\n </p>\n </ic-typography>\n <slot name=\"message\">\n <ic-typography variant=\"body\">\n This alert has no icon\n </ic-typography>\n </slot>\n </div>\n </div>\n <div class=\"dismiss-icon-container\"></div>\n </div>\n </mock:shadow-root>\n </ic-alert>`);\n });\n\n it(\"should render default icon of success variant when the show-default-icon prop is set to false\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert heading=\"Success\" message=\"This alert has the default success icon\" variant=\"success\" show-default-icon=\"false\"></ic-alert>`,\n });\n\n expect(page.root).toEqualHtml(`\n <ic-alert class=\"dark\" heading=\"Success\" message=\"This alert has the default success icon\" role=\"alert\" show-default-icon=\"false\" variant=\"success\">\n <mock:shadow-root>\n <div class=\"container container-success\">\n <div class=\"alert-icon-container\">\n <div class=\"divider divider-success\"></div>\n <span class=\"alert-icon icon-success svg-container\">\n svg\n </span>\n </div>\n <div class=\"alert-content\">\n <div class=\"alert-message\">\n <ic-typography class=\"alert-title\" variant=\"subtitle-large\">\n <p>\n Success\n </p>\n </ic-typography>\n <slot name=\"message\">\n <ic-typography variant=\"body\">\n This alert has the default success icon\n </ic-typography>\n </slot>\n </div>\n </div>\n <div class=\"dismiss-icon-container\"></div>\n </div>\n </mock:shadow-root>\n </ic-alert>\n `);\n });\n\n it(\"should close on dismiss icon click\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert message=\"This is dismissible\" dismissible=true></ic-alert>`,\n });\n\n let alert = await page.root.shadowRoot.querySelector(\n \"div.container-neutral\"\n );\n const dismissButton = await page.root.shadowRoot.querySelector(\"ic-button\");\n\n expect(alert).not.toBeNull();\n expect(dismissButton).not.toBeNull();\n\n await dismissButton.click();\n\n await page.waitForChanges();\n alert = await page.root.shadowRoot.querySelector(\"div.container-neutral\");\n\n expect(alert).toBeNull();\n });\n\n it(\"should test rendering an action after initial render\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert heading=\"Test heading\"></ic-alert>`,\n });\n\n const action = document.createElement(\"button\");\n action.setAttribute(\"slot\", \"action\");\n\n page.rootInstance.hostMutationCallback([\n {\n type: \"childList\",\n addedNodes: [action],\n removedNodes: [],\n },\n ]);\n });\n});\n"]}
|
1
|
+
{"version":3,"file":"ic-alert.spec.js","sourceRoot":"","sources":["../../../../../src/components/ic-alert/test/basic/ic-alert.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EACL,wBAAwB,EACxB,kCAAkC,EAElC,2BAA2B,GAC5B,MAAM,4BAA4B,CAAC;AAEpC,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,QAAQ,CAAC,GAAG,EAAE;QACZ,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,KAAK,IAAI,EAAE;QAC1D,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,KAAK,CAAC;YACnB,IAAI,EAAE,8CAA8C;SACrD,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;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yB;YAC/C;gBACE,UAAU,EAAE,CAAC,MAAM,CAAC;gBACpB,YAAY,EAAE,EAAE;gBAChB,MAAM,EAAE,IAAI;aACb;SACF,CAAC;QAEF,gBAAgB,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAE7C,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5B,MAAM,CAAC,2BAA2B,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QAC7D,MAAM,CAAC,2BAA2B,CAAC,CAAC,oBAAoB,CACtD,kBAAkB,EAClB,QAAQ,EACR,SAAS,CACV,CAAC;QAEF,MAAM,CAAC,wBAAwB,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QAE1D,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from \"@stencil/core/testing\";\nimport { Alert } from \"../../ic-alert\";\nimport {\n mockHasDynamicChildSlots,\n mockMutationObserverImplementation,\n MockMutationRecord,\n mockRenderDynamicChildSlots,\n} from \"../../../../testspec.setup\";\n\ndescribe(\"ic-alert component\", () => {\n afterAll(() => {\n jest.restoreAllMocks();\n });\n\n afterEach(() => {\n jest.clearAllMocks();\n });\n\n it(\"should render with a heading when supplied\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert heading=\"Test heading\"></ic-alert>`,\n });\n\n expect(page.root).toEqualHtml(`\n <ic-alert class=\"dark\" heading=\"Test heading\" role=\"alert\">\n <mock:shadow-root>\n <div class=\"container container-neutral\">\n <div class=\"alert-icon-container\">\n <div class=\"divider divider-neutral\"></div>\n <span class=\"alert-icon icon-neutral svg-container\">\n svg\n </span>\n </div>\n <div class=\"alert-content\">\n <div class=\"alert-message\">\n <ic-typography class=\"alert-title\" variant=\"subtitle-large\">\n <p>\n Test heading\n </p>\n </ic-typography>\n <slot name=\"message\">\n <ic-typography variant=\"body\"></ic-typography>\n </slot>\n </div>\n </div>\n <div class=\"dismiss-icon-container\">\n </div>\n </div>\n </mock:shadow-root>\n </ic-alert>`);\n });\n\n it(\"should render with a message when supplied\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert message=\"Test message\"></ic-alert>`,\n });\n\n expect(page.root).toEqualHtml(`\n <ic-alert class=\"dark\" message=\"Test message\" role=\"alert\">\n <mock:shadow-root>\n <div class=\"container container-neutral\">\n <div class=\"alert-icon-container\">\n <div class=\"divider divider-neutral\"></div>\n <span class=\"alert-icon icon-neutral svg-container\">\n svg\n </span>\n </div>\n <div class=\"alert-content\">\n <div class=\"alert-message\">\n <slot name=\"message\">\n <ic-typography variant=\"body\">\n Test message\n </ic-typography>\n </slot>\n </div>\n </div>\n <div class=\"dismiss-icon-container\">\n </div>\n </div>\n </mock:shadow-root>\n </ic-alert>`);\n });\n\n it(\"should render an action in the correct position when supplied\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert message=\"This has an action\"><button slot=\"action\"></button></ic-alert>`,\n });\n\n expect(page.root).toEqualHtml(`\n <ic-alert class=\"dark\" message=\"This has an action\" role=\"alert\">\n <mock:shadow-root>\n <div class=\"container container-neutral\">\n <div class=\"alert-icon-container\">\n <div class=\"divider divider-neutral\"></div>\n <span class=\"alert-icon icon-neutral svg-container\">\n svg\n </span>\n </div>\n <div class=\"alert-content\">\n <div class=\"alert-message\">\n <slot name=\"message\">\n <ic-typography variant=\"body\">\n This has an action\n </ic-typography>\n </slot>\n </div>\n <div class=\"alert-action-container\">\n <slot name=\"action\"></slot>\n </div>\n </div>\n <div class=\"dismiss-icon-container\">\n </div>\n </div>\n </mock:shadow-root>\n <button slot=\"action\"></button>\n </ic-alert>`);\n });\n\n it(\"should render with a dismiss icon when the prop is applied\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert message=\"This is dismissible\" dismissible=true></ic-alert>`,\n });\n\n expect(page.root).toEqualHtml(`\n <ic-alert class=\"dark\" message=\"This is dismissible\" dismissible=true role=\"alert\">\n <mock:shadow-root>\n <div class=\"container container-neutral\">\n <div class=\"alert-icon-container\">\n <div class=\"divider divider-neutral\"></div>\n <span class=\"alert-icon icon-neutral svg-container\">\n svg\n </span>\n </div>\n <div class=\"alert-content\">\n <div class=\"alert-message\">\n <slot name=\"message\">\n <ic-typography variant=\"body\">\n This is dismissible\n </ic-typography>\n </slot>\n </div>\n </div>\n <div class=\"dismiss-icon-container\">\n <ic-button class=\"dismiss-icon svg-container\" theme=\"dark\" title=\"Dismiss\" variant=\"icon\">\n svg\n </ic-button>\n </div>\n </div>\n </mock:shadow-root>\n </ic-alert>`);\n });\n\n it(\"should render an element in the message slot\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert heading=\"Using custom message\"><ic-typography variant=\"h1\" slot=\"message\">Custom h1 message</ic-typography></ic-alert>`,\n });\n\n expect(page.root).toEqualHtml(`\n <ic-alert class=\"dark\" heading=\"Using custom message\" role=\"alert\">\n <mock:shadow-root>\n <div class=\"container container-neutral\">\n <div class=\"alert-icon-container\">\n <div class=\"divider divider-neutral\"></div>\n <span class=\"alert-icon icon-neutral svg-container\">\n svg\n </span>\n </div>\n <div class=\"alert-content\">\n <div class=\"alert-message\">\n <ic-typography class=\"alert-title\" variant=\"subtitle-large\">\n <p>\n Using custom message\n </p>\n </ic-typography>\n <slot name=\"message\">\n <ic-typography variant=\"body\"></ic-typography>\n </slot>\n </div>\n </div>\n <div class=\"dismiss-icon-container\"></div>\n </div>\n </mock:shadow-root>\n <ic-typography variant=\"h1\" slot=\"message\">Custom h1 message</ic-typography>\n </ic-alert>`);\n });\n\n it(\"should render an icon in the neutral-icon slot\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `\n <ic-alert heading=\"Using custom icon\" message=\"This has a slotted icon\">\n <svg slot=\"neutral-icon\" xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\">\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <path d=\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"/>\n </svg>\n </ic-alert>\n `,\n });\n\n expect(page.root).toEqualHtml(`\n <ic-alert class=\"dark\" heading=\"Using custom icon\" message=\"This has a slotted icon\" role=\"alert\">\n <mock:shadow-root>\n <div class=\"container container-neutral\">\n <div class=\"alert-icon-container\">\n <div class=\"divider divider-neutral\"></div>\n <div class=\"alert-icon icon-neutral svg-container\">\n <slot name=\"neutral-icon\"></slot>\n </div>\n </div>\n <div class=\"alert-content\">\n <div class=\"alert-message\">\n <ic-typography class=\"alert-title\" variant=\"subtitle-large\">\n <p>\n Using custom icon\n </p>\n </ic-typography>\n <slot name=\"message\">\n <ic-typography variant=\"body\">\n This has a slotted icon\n </ic-typography>\n </slot>\n </div>\n </div>\n <div class=\"dismiss-icon-container\"></div>\n </div>\n </mock:shadow-root>\n <svg fill=\"#000000\" height=\"24px\" slot=\"neutral-icon\" viewBox=\"0 0 24 24\" width=\"24px\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\"></path>\n <path d=\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"></path>\n </svg>\n </ic-alert>`);\n });\n\n it(\"should render with no icon when the show-default-icon prop is set to false\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert heading=\"No icon\" message=\"This alert has no icon\" show-defaul-icon=false></ic-alert>`,\n });\n\n expect(page.root).toEqualHtml(`\n <ic-alert class=\"dark\" heading=\"No icon\" message=\"This alert has no icon\" role=\"alert\" show-defaul-icon=\"false\">\n <mock:shadow-root>\n <div class=\"container container-neutral\">\n <div class=\"alert-icon-container\">\n <div class=\"divider divider-neutral\"></div>\n <span class=\"alert-icon icon-neutral svg-container\">\n svg\n </span>\n </div>\n <div class=\"alert-content\">\n <div class=\"alert-message\">\n <ic-typography class=\"alert-title\" variant=\"subtitle-large\">\n <p>\n No icon\n </p>\n </ic-typography>\n <slot name=\"message\">\n <ic-typography variant=\"body\">\n This alert has no icon\n </ic-typography>\n </slot>\n </div>\n </div>\n <div class=\"dismiss-icon-container\"></div>\n </div>\n </mock:shadow-root>\n </ic-alert>`);\n });\n\n it(\"should render default icon of success variant when the show-default-icon prop is set to false\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert heading=\"Success\" message=\"This alert has the default success icon\" variant=\"success\" show-default-icon=\"false\"></ic-alert>`,\n });\n\n expect(page.root).toEqualHtml(`\n <ic-alert class=\"dark\" heading=\"Success\" message=\"This alert has the default success icon\" role=\"alert\" show-default-icon=\"false\" variant=\"success\">\n <mock:shadow-root>\n <div class=\"container container-success\">\n <div class=\"alert-icon-container\">\n <div class=\"divider divider-success\"></div>\n <span class=\"alert-icon icon-success svg-container\">\n svg\n </span>\n </div>\n <div class=\"alert-content\">\n <div class=\"alert-message\">\n <ic-typography class=\"alert-title\" variant=\"subtitle-large\">\n <p>\n Success\n </p>\n </ic-typography>\n <slot name=\"message\">\n <ic-typography variant=\"body\">\n This alert has the default success icon\n </ic-typography>\n </slot>\n </div>\n </div>\n <div class=\"dismiss-icon-container\"></div>\n </div>\n </mock:shadow-root>\n </ic-alert>\n `);\n });\n\n it(\"should close on dismiss icon click\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert message=\"This is dismissible\" dismissible=true></ic-alert>`,\n });\n\n let alert = await page.root.shadowRoot.querySelector(\n \"div.container-neutral\"\n );\n const dismissButton = await page.root.shadowRoot.querySelector(\"ic-button\");\n\n expect(alert).not.toBeNull();\n expect(dismissButton).not.toBeNull();\n\n await dismissButton.click();\n\n await page.waitForChanges();\n alert = await page.root.shadowRoot.querySelector(\"div.container-neutral\");\n\n expect(alert).toBeNull();\n });\n\n it(\"should test rendering an action after initial render\", async () => {\n const page = await newSpecPage({\n components: [Alert],\n html: `<ic-alert heading=\"Test heading\"></ic-alert>`,\n });\n\n const component = page.rootInstance;\n const host = page.root;\n\n const observerInstance =\n mockMutationObserverImplementation.mock.results[0].value;\n\n const action = document.createElement(\"button\");\n action.setAttribute(\"slot\", \"action\");\n\n observerInstance.observe(host, { childList: true });\n\n host.appendChild(action);\n\n const mockMutationRecord: MockMutationRecord[] = [\n {\n addedNodes: [action],\n removedNodes: [],\n target: host,\n },\n ];\n\n observerInstance.trigger(mockMutationRecord);\n\n await page.waitForChanges();\n\n expect(mockRenderDynamicChildSlots).toHaveBeenCalledTimes(1);\n expect(mockRenderDynamicChildSlots).toHaveBeenCalledWith(\n mockMutationRecord,\n \"action\",\n component\n );\n\n expect(mockHasDynamicChildSlots).toHaveBeenCalledTimes(1);\n\n expect(page.root).toMatchSnapshot();\n });\n});\n"]}
|