@ukic/web-components 3.12.0 → 3.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-478d1107.js → helpers-15fae358.js} +5 -1
- package/dist/cjs/helpers-15fae358.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-action-chip.cjs.entry.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +6 -4
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +6 -5
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +3 -3
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +5 -4
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +43 -19
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +5 -5
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +9 -5
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/ic-chip.cjs.entry.js +4 -4
- package/dist/cjs/ic-data-list.cjs.entry.js +2 -2
- package/dist/cjs/ic-data-row.cjs.entry.js +3 -3
- package/dist/cjs/ic-dialog.cjs.entry.js +39 -13
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +3 -2
- package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +3 -3
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +3 -3
- package/dist/cjs/ic-footer.cjs.entry.js +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +8 -7
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +6 -6
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +18 -15
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +6 -6
- package/dist/cjs/ic-layout-grid-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-layout-grid.cjs.entry.js +2 -2
- package/dist/cjs/ic-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu-item.cjs.entry.js +3 -2
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +3 -3
- package/dist/cjs/ic-navigation-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-navigation-item.cjs.entry.js +4 -4
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -5
- package/dist/cjs/ic-page-header.cjs.entry.js +8 -8
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-pagination.cjs.entry.js +5 -5
- package/dist/cjs/ic-popover-menu.cjs.entry.js +5 -5
- package/dist/cjs/ic-radio-group.cjs.entry.js +5 -5
- package/dist/cjs/ic-radio-option.cjs.entry.js +5 -5
- package/dist/cjs/ic-search-bar.cjs.entry.js +10 -10
- package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
- package/dist/cjs/ic-select.cjs.entry.js +20 -12
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +6 -6
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-status-tag.cjs.entry.js +4 -4
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +15 -14
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +4 -3
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +5 -5
- package/dist/cjs/ic-tab-context.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab.cjs.entry.js +3 -3
- package/dist/cjs/ic-text-field.cjs.entry.js +12 -7
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +2 -2
- package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +8 -5
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +8 -4
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +58 -45
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +6 -6
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/ic-alert/ic-alert.css +19 -29
- package/dist/collection/components/ic-alert/ic-alert.js +4 -2
- package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.css +1 -1
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.js +4 -3
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.js.map +1 -1
- package/dist/collection/components/ic-badge/ic-badge.js +2 -2
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css +5 -4
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js +3 -2
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +2 -2
- package/dist/collection/components/ic-button/ic-button.js +36 -11
- package/dist/collection/components/ic-button/ic-button.js.map +1 -1
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.js +4 -4
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +4 -4
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +34 -4
- 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 +163 -0
- package/dist/collection/components/ic-chip/ic-chip.js +3 -3
- package/dist/collection/components/ic-data-list/ic-data-list.js +2 -2
- package/dist/collection/components/ic-data-row/ic-data-row.js +2 -2
- package/dist/collection/components/ic-dialog/ic-dialog.css +1 -1
- package/dist/collection/components/ic-dialog/ic-dialog.js +38 -12
- package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
- package/dist/collection/components/ic-divider/ic-divider.css +89 -89
- package/dist/collection/components/ic-divider/ic-divider.js +2 -1
- package/dist/collection/components/ic-divider/ic-divider.js.map +1 -1
- package/dist/collection/components/ic-empty-state/ic-empty-state.js +2 -2
- package/dist/collection/components/ic-footer-link/ic-footer-link.js +2 -2
- package/dist/collection/components/ic-hero/ic-hero.css +4 -4
- package/dist/collection/components/ic-hero/ic-hero.js +6 -5
- package/dist/collection/components/ic-hero/ic-hero.js.map +1 -1
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +5 -5
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +3 -3
- package/dist/collection/components/ic-input-container/ic-input-container.js +2 -2
- package/dist/collection/components/ic-input-label/ic-input-label.js +2 -2
- package/dist/collection/components/ic-input-validation/ic-input-validation.js +3 -3
- package/dist/collection/components/ic-layout-grid/ic-layout-grid.js +2 -2
- package/dist/collection/components/ic-layout-grid-item/ic-layout-grid-item.js +2 -2
- package/dist/collection/components/ic-link/ic-link.js +1 -1
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +4 -4
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +6 -5
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js.map +1 -1
- package/dist/collection/components/ic-menu/ic-menu.js +12 -9
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-menu-group/ic-menu-group.js +1 -1
- package/dist/collection/components/ic-menu-item/ic-menu-item.css +6 -6
- package/dist/collection/components/ic-menu-item/ic-menu-item.js +1 -0
- package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +2 -2
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +1 -1
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +9 -0
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +2 -2
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +4 -4
- package/dist/collection/components/ic-page-header/ic-page-header.css +4 -0
- package/dist/collection/components/ic-page-header/ic-page-header.js +6 -6
- package/dist/collection/components/ic-pagination/ic-pagination.js +4 -4
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +4 -4
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +4 -4
- package/dist/collection/components/ic-radio-option/ic-radio-option.js +4 -4
- package/dist/collection/components/ic-search-bar/ic-search-bar.js +9 -9
- package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
- package/dist/collection/components/ic-select/ic-select.js +20 -12
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select_(single).stories.js +74 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +2 -0
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +4 -4
- package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
- package/dist/collection/components/ic-skip-link/ic-skip-link.js +2 -2
- package/dist/collection/components/ic-status-tag/ic-status-tag.css +1 -4
- package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
- package/dist/collection/components/ic-step/ic-step.js +16 -15
- package/dist/collection/components/ic-step/ic-step.js.map +1 -1
- package/dist/collection/components/ic-step/ic-step.types.js.map +1 -1
- package/dist/collection/components/ic-stepper/ic-stepper.js +5 -4
- package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
- package/dist/collection/components/ic-stepper/ic-stepper.stories.js +2 -1
- package/dist/collection/components/ic-switch/ic-switch.js +4 -4
- package/dist/collection/components/ic-tab/ic-tab.js +2 -2
- package/dist/collection/components/ic-tab-context/ic-tab-context.js +1 -1
- package/dist/collection/components/ic-tab-group/ic-tab-group.js +2 -2
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +2 -2
- package/dist/collection/components/ic-text-field/ic-text-field.js +17 -11
- 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 +22 -0
- package/dist/collection/components/ic-text-field/ic-text-field.types.js.map +1 -1
- package/dist/collection/components/ic-theme/ic-theme.js +1 -1
- package/dist/collection/components/ic-toast/ic-toast.css +6 -6
- package/dist/collection/components/ic-toast/ic-toast.js +6 -3
- package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
- package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +57 -44
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +7 -3
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.js +3 -3
- package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.stories.js +37 -109
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +13 -10
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +4 -4
- package/dist/collection/components/ic-typography/ic-typography.js +2 -2
- package/dist/collection/icds-table-style.css +66 -0
- package/dist/collection/utils/helpers.js +3 -0
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +4 -1
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-action-chip.js +1 -1
- package/dist/components/ic-alert.js +6 -4
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-back-to-top.js +6 -5
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-badge.js +3 -3
- package/dist/components/ic-breadcrumb-group.js +3 -3
- package/dist/components/ic-breadcrumb2.js +5 -4
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +35 -11
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-vertical.js +5 -5
- package/dist/components/ic-checkbox-group.js +10 -5
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +5 -5
- package/dist/components/ic-chip.js +4 -4
- package/dist/components/ic-data-list.js +2 -2
- package/dist/components/ic-data-row.js +3 -3
- package/dist/components/ic-dialog.js +39 -13
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.js +3 -2
- package/dist/components/ic-divider2.js.map +1 -1
- package/dist/components/ic-empty-state.js +3 -3
- package/dist/components/ic-footer-link-group.js +1 -1
- package/dist/components/ic-footer-link.js +3 -3
- package/dist/components/ic-footer.js +1 -1
- package/dist/components/ic-hero.js +8 -7
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +6 -6
- package/dist/components/ic-input-component-container2.js +4 -4
- package/dist/components/ic-input-container2.js +2 -2
- package/dist/components/ic-input-label2.js +3 -3
- package/dist/components/ic-input-validation2.js +4 -4
- package/dist/components/ic-layout-grid-item.js +2 -2
- package/dist/components/ic-layout-grid.js +2 -2
- package/dist/components/ic-link2.js +1 -1
- package/dist/components/ic-loading-indicator2.js +7 -6
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu-group.js +2 -2
- package/dist/components/ic-menu-item2.js +3 -2
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +13 -10
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +3 -3
- package/dist/components/ic-navigation-group.js +2 -2
- package/dist/components/ic-navigation-item.js +4 -4
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +5 -5
- package/dist/components/ic-page-header.js +8 -8
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +2 -2
- package/dist/components/ic-pagination.js +4 -4
- package/dist/components/ic-popover-menu.js +5 -5
- package/dist/components/ic-radio-group.js +5 -5
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +5 -5
- package/dist/components/ic-search-bar.js +10 -10
- package/dist/components/ic-section-container2.js +2 -2
- package/dist/components/ic-select.js +20 -12
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js +6 -6
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +2 -2
- package/dist/components/ic-skip-link.js +2 -2
- package/dist/components/ic-status-tag.js +3 -3
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +15 -14
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +3 -2
- package/dist/components/ic-stepper.js.map +1 -1
- package/dist/components/ic-switch.js +5 -5
- package/dist/components/ic-tab-context.js +1 -1
- package/dist/components/ic-tab-group.js +2 -2
- package/dist/components/ic-tab-panel.js +2 -2
- package/dist/components/ic-tab.js +2 -2
- package/dist/components/ic-text-field.js +12 -7
- package/dist/components/ic-text-field.js.map +1 -1
- package/dist/components/ic-theme.js +2 -2
- package/dist/components/ic-toast-region.js +1 -1
- package/dist/components/ic-toast.js +8 -5
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +7 -3
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +58 -45
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-tooltip2.js +3 -3
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +6 -6
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-typography2.js +2 -2
- package/dist/core/core.css +11 -8
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/icds-table-style.css +66 -0
- package/dist/core/p-0257d59e.entry.js +2 -0
- package/dist/core/p-0257d59e.entry.js.map +1 -0
- package/dist/core/p-042cfc35.entry.js +2 -0
- package/dist/core/p-042cfc35.entry.js.map +1 -0
- package/dist/core/{p-514daffe.entry.js → p-053ed367.entry.js} +2 -2
- package/dist/core/{p-54803e3b.entry.js → p-06b3ae40.entry.js} +2 -2
- package/dist/core/{p-95d3d1a7.entry.js → p-091a7fbf.entry.js} +2 -2
- package/dist/core/{p-4747c39f.entry.js → p-09c31ac6.entry.js} +2 -2
- package/dist/core/{p-01e018cb.entry.js → p-0b1ea961.entry.js} +2 -2
- package/dist/core/{p-cf868a24.entry.js → p-0cbd0967.entry.js} +2 -2
- package/dist/core/p-0cbd0967.entry.js.map +1 -0
- package/dist/core/{p-33582352.entry.js → p-109e7fce.entry.js} +2 -2
- package/dist/core/{p-99793b64.entry.js → p-199c5ff6.entry.js} +2 -2
- package/dist/core/p-2026f4fa.entry.js +2 -0
- package/dist/core/p-2026f4fa.entry.js.map +1 -0
- package/dist/core/p-24d46cab.entry.js +2 -0
- package/dist/core/p-24d46cab.entry.js.map +1 -0
- package/dist/core/{p-228bc12d.entry.js → p-2969b5c9.entry.js} +2 -2
- package/dist/core/{p-c975cced.entry.js → p-296a41ce.entry.js} +2 -2
- package/dist/core/p-30312243.entry.js +2 -0
- package/dist/core/p-30312243.entry.js.map +1 -0
- package/dist/core/p-355d0914.entry.js +2 -0
- package/dist/core/p-355d0914.entry.js.map +1 -0
- package/dist/core/{p-1423bd4a.entry.js → p-3785c740.entry.js} +2 -2
- package/dist/core/{p-8684efeb.entry.js → p-3a94849e.entry.js} +2 -2
- package/dist/core/{p-a06c1e4e.entry.js → p-3b13d191.entry.js} +2 -2
- package/dist/core/{p-13e093d0.entry.js → p-411527a1.entry.js} +2 -2
- package/dist/core/{p-de32a223.entry.js → p-44fbe8c2.entry.js} +2 -2
- package/dist/core/{p-93479c36.entry.js → p-4637c326.entry.js} +2 -2
- package/dist/core/{p-fb734a59.entry.js → p-48eb7299.entry.js} +2 -2
- package/dist/core/{p-b0376079.entry.js → p-4a358f09.entry.js} +2 -2
- package/dist/core/{p-e6dacbe2.entry.js → p-4bdeb62d.entry.js} +2 -2
- package/dist/core/{p-9cf6ccfd.entry.js → p-5cf704e3.entry.js} +2 -2
- package/dist/core/p-614953c5.entry.js +2 -0
- package/dist/core/p-614953c5.entry.js.map +1 -0
- package/dist/core/p-62b9e7bf.entry.js +2 -0
- package/dist/core/p-62b9e7bf.entry.js.map +1 -0
- package/dist/core/{p-05036675.entry.js → p-6996e94f.entry.js} +2 -2
- package/dist/core/p-6996e94f.entry.js.map +1 -0
- package/dist/core/{p-cc00cbce.entry.js → p-6e61c48a.entry.js} +2 -2
- package/dist/core/{p-33789b23.entry.js → p-6f60262e.entry.js} +3 -3
- package/dist/core/p-6f60262e.entry.js.map +1 -0
- package/dist/core/{p-d58ad080.entry.js → p-6fb29846.entry.js} +2 -2
- package/dist/core/p-6fb29846.entry.js.map +1 -0
- package/dist/core/p-77a6c3f7.entry.js +2 -0
- package/dist/core/p-77a6c3f7.entry.js.map +1 -0
- package/dist/core/p-7970cbed.entry.js +2 -0
- package/dist/core/p-7970cbed.entry.js.map +1 -0
- package/dist/core/{p-37d217b5.entry.js → p-889bb8db.entry.js} +2 -2
- package/dist/core/{p-c04e1fab.entry.js → p-8c7d6a85.entry.js} +2 -2
- package/dist/core/{p-6dbe70f1.entry.js → p-911b4aa4.entry.js} +2 -2
- package/dist/core/{p-57721431.entry.js → p-93e1ba0a.entry.js} +2 -2
- package/dist/core/{p-37daa8fe.entry.js → p-9c2e9189.entry.js} +2 -2
- package/dist/core/{p-8558b9b7.entry.js → p-a45de09d.entry.js} +2 -2
- package/dist/core/{p-b57e59b7.js → p-a5658054.js} +2 -2
- package/dist/core/p-a5658054.js.map +1 -0
- package/dist/core/{p-ea06792a.entry.js → p-a7f21494.entry.js} +2 -2
- package/dist/core/p-a8dc3162.entry.js +2 -0
- package/dist/core/p-a8dc3162.entry.js.map +1 -0
- package/dist/core/p-ab26beed.entry.js +2 -0
- package/dist/core/p-ab26beed.entry.js.map +1 -0
- package/dist/core/{p-2126d37b.entry.js → p-ad6632a9.entry.js} +2 -2
- package/dist/core/p-ae7dcbd5.entry.js +2 -0
- package/dist/core/p-ae7dcbd5.entry.js.map +1 -0
- package/dist/core/{p-9a8bcb78.entry.js → p-b00efb15.entry.js} +2 -2
- package/dist/core/p-b29e325f.entry.js +2 -0
- package/dist/core/{p-b9bdd9a9.entry.js → p-bba25812.entry.js} +2 -2
- package/dist/core/{p-27e67d45.entry.js → p-c397b33f.entry.js} +2 -2
- package/dist/core/{p-45097448.entry.js → p-c4ffcc64.entry.js} +2 -2
- package/dist/core/{p-675bb3e4.entry.js → p-d1cce122.entry.js} +2 -2
- package/dist/core/p-d20a61a7.entry.js +2 -0
- package/dist/core/p-d20a61a7.entry.js.map +1 -0
- package/dist/core/{p-492fcb51.entry.js → p-d8200098.entry.js} +2 -2
- package/dist/core/{p-80317cd1.entry.js → p-e0423c7e.entry.js} +2 -2
- package/dist/core/p-eb1823b3.entry.js +2 -0
- package/dist/core/p-eb1823b3.entry.js.map +1 -0
- package/dist/core/{p-b1838ad8.entry.js → p-ef397b6f.entry.js} +2 -2
- package/dist/core/p-ef397b6f.entry.js.map +1 -0
- package/dist/core/p-efc97f21.entry.js +2 -0
- package/dist/core/p-efc97f21.entry.js.map +1 -0
- package/dist/core/{p-b4a2f6fa.entry.js → p-f098e531.entry.js} +2 -2
- package/dist/core/{p-0ec76cff.entry.js → p-f247db14.entry.js} +2 -2
- package/dist/core/{p-813ad03c.entry.js → p-f4e2e41f.entry.js} +2 -2
- package/dist/core/{p-abd88929.entry.js → p-f7706ff7.entry.js} +2 -2
- package/dist/core/p-f7706ff7.entry.js.map +1 -0
- package/dist/core/{p-5fcfcfb6.entry.js → p-fb43abd6.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-4ddac6ed.js → helpers-dcedb279.js} +5 -2
- package/dist/esm/helpers-dcedb279.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-action-chip.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js +6 -4
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +6 -5
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js +3 -3
- package/dist/esm/ic-breadcrumb-group.entry.js +3 -3
- package/dist/esm/ic-breadcrumb.entry.js +5 -4
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +43 -19
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +5 -5
- package/dist/esm/ic-checkbox-group.entry.js +9 -5
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +5 -5
- package/dist/esm/ic-chip.entry.js +4 -4
- package/dist/esm/ic-data-list.entry.js +2 -2
- package/dist/esm/ic-data-row.entry.js +3 -3
- package/dist/esm/ic-dialog.entry.js +39 -13
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +3 -2
- package/dist/esm/ic-divider.entry.js.map +1 -1
- package/dist/esm/ic-empty-state.entry.js +3 -3
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +3 -3
- package/dist/esm/ic-footer.entry.js +1 -1
- package/dist/esm/ic-hero.entry.js +8 -7
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +6 -6
- package/dist/esm/ic-input-component-container_3.entry.js +18 -15
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +6 -6
- package/dist/esm/ic-layout-grid-item.entry.js +2 -2
- package/dist/esm/ic-layout-grid.entry.js +2 -2
- package/dist/esm/ic-link.entry.js +2 -2
- package/dist/esm/ic-menu-group.entry.js +2 -2
- package/dist/esm/ic-menu-item.entry.js +3 -2
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +3 -3
- package/dist/esm/ic-navigation-group.entry.js +2 -2
- package/dist/esm/ic-navigation-item.entry.js +4 -4
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +5 -5
- package/dist/esm/ic-page-header.entry.js +8 -8
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination-item.entry.js +2 -2
- package/dist/esm/ic-pagination.entry.js +5 -5
- package/dist/esm/ic-popover-menu.entry.js +5 -5
- package/dist/esm/ic-radio-group.entry.js +5 -5
- package/dist/esm/ic-radio-option.entry.js +5 -5
- package/dist/esm/ic-search-bar.entry.js +10 -10
- package/dist/esm/ic-section-container.entry.js +2 -2
- package/dist/esm/ic-select.entry.js +20 -12
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +6 -6
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js +2 -2
- package/dist/esm/ic-skip-link.entry.js +2 -2
- package/dist/esm/ic-status-tag.entry.js +4 -4
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +15 -14
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +4 -3
- package/dist/esm/ic-stepper.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +5 -5
- package/dist/esm/ic-tab-context.entry.js +1 -1
- package/dist/esm/ic-tab-group.entry.js +3 -3
- package/dist/esm/ic-tab-panel.entry.js +2 -2
- package/dist/esm/ic-tab.entry.js +3 -3
- package/dist/esm/ic-text-field.entry.js +12 -7
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +2 -2
- package/dist/esm/ic-toast-region.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +8 -5
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +8 -4
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +58 -45
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +6 -6
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-button/ic-button.d.ts +8 -2
- package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +5 -1
- package/dist/types/components/ic-dialog/ic-dialog.d.ts +2 -1
- package/dist/types/components/ic-step/ic-step.types.d.ts +1 -0
- package/dist/types/components/ic-text-field/ic-text-field.d.ts +2 -4
- package/dist/types/components/ic-text-field/ic-text-field.types.d.ts +5 -0
- package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +1 -0
- package/dist/types/components.d.ts +13 -5
- package/dist/types/utils/helpers.d.ts +1 -0
- package/dist/types/utils/types.d.ts +6 -2
- package/hydrate/index.js +369 -266
- package/hydrate/index.mjs +369 -266
- package/package.json +2 -2
- package/vscode-data.json +15 -0
- package/dist/cjs/helpers-478d1107.js.map +0 -1
- package/dist/core/p-0123dde7.entry.js +0 -2
- package/dist/core/p-0123dde7.entry.js.map +0 -1
- package/dist/core/p-02af2b59.entry.js +0 -2
- package/dist/core/p-02af2b59.entry.js.map +0 -1
- package/dist/core/p-05036675.entry.js.map +0 -1
- package/dist/core/p-0c36ce84.entry.js +0 -2
- package/dist/core/p-0c36ce84.entry.js.map +0 -1
- package/dist/core/p-25bef09d.entry.js +0 -2
- package/dist/core/p-2800fc30.entry.js +0 -2
- package/dist/core/p-2800fc30.entry.js.map +0 -1
- package/dist/core/p-33789b23.entry.js.map +0 -1
- package/dist/core/p-3e36f281.entry.js +0 -2
- package/dist/core/p-3e36f281.entry.js.map +0 -1
- package/dist/core/p-6058d4c9.entry.js +0 -2
- package/dist/core/p-6058d4c9.entry.js.map +0 -1
- package/dist/core/p-6e139e6e.entry.js +0 -2
- package/dist/core/p-6e139e6e.entry.js.map +0 -1
- package/dist/core/p-80e0f66e.entry.js +0 -2
- package/dist/core/p-80e0f66e.entry.js.map +0 -1
- package/dist/core/p-8b99a806.entry.js +0 -2
- package/dist/core/p-8b99a806.entry.js.map +0 -1
- package/dist/core/p-a1857d24.entry.js +0 -2
- package/dist/core/p-a1857d24.entry.js.map +0 -1
- package/dist/core/p-a1e2e029.entry.js +0 -2
- package/dist/core/p-a1e2e029.entry.js.map +0 -1
- package/dist/core/p-abd88929.entry.js.map +0 -1
- package/dist/core/p-b1838ad8.entry.js.map +0 -1
- package/dist/core/p-b57e59b7.js.map +0 -1
- package/dist/core/p-c2d5e301.entry.js +0 -2
- package/dist/core/p-c2d5e301.entry.js.map +0 -1
- package/dist/core/p-cf868a24.entry.js.map +0 -1
- package/dist/core/p-d58ad080.entry.js.map +0 -1
- package/dist/core/p-e9d28e02.entry.js +0 -2
- package/dist/core/p-e9d28e02.entry.js.map +0 -1
- package/dist/core/p-eb0e7153.entry.js +0 -2
- package/dist/core/p-eb0e7153.entry.js.map +0 -1
- package/dist/core/p-f609ca37.entry.js +0 -2
- package/dist/core/p-f609ca37.entry.js.map +0 -1
- package/dist/core/p-fb69fbc0.entry.js +0 -2
- package/dist/core/p-fb69fbc0.entry.js.map +0 -1
- package/dist/esm/helpers-4ddac6ed.js.map +0 -1
- /package/dist/core/{p-514daffe.entry.js.map → p-053ed367.entry.js.map} +0 -0
- /package/dist/core/{p-54803e3b.entry.js.map → p-06b3ae40.entry.js.map} +0 -0
- /package/dist/core/{p-95d3d1a7.entry.js.map → p-091a7fbf.entry.js.map} +0 -0
- /package/dist/core/{p-4747c39f.entry.js.map → p-09c31ac6.entry.js.map} +0 -0
- /package/dist/core/{p-01e018cb.entry.js.map → p-0b1ea961.entry.js.map} +0 -0
- /package/dist/core/{p-33582352.entry.js.map → p-109e7fce.entry.js.map} +0 -0
- /package/dist/core/{p-99793b64.entry.js.map → p-199c5ff6.entry.js.map} +0 -0
- /package/dist/core/{p-228bc12d.entry.js.map → p-2969b5c9.entry.js.map} +0 -0
- /package/dist/core/{p-c975cced.entry.js.map → p-296a41ce.entry.js.map} +0 -0
- /package/dist/core/{p-1423bd4a.entry.js.map → p-3785c740.entry.js.map} +0 -0
- /package/dist/core/{p-8684efeb.entry.js.map → p-3a94849e.entry.js.map} +0 -0
- /package/dist/core/{p-a06c1e4e.entry.js.map → p-3b13d191.entry.js.map} +0 -0
- /package/dist/core/{p-13e093d0.entry.js.map → p-411527a1.entry.js.map} +0 -0
- /package/dist/core/{p-de32a223.entry.js.map → p-44fbe8c2.entry.js.map} +0 -0
- /package/dist/core/{p-93479c36.entry.js.map → p-4637c326.entry.js.map} +0 -0
- /package/dist/core/{p-fb734a59.entry.js.map → p-48eb7299.entry.js.map} +0 -0
- /package/dist/core/{p-b0376079.entry.js.map → p-4a358f09.entry.js.map} +0 -0
- /package/dist/core/{p-e6dacbe2.entry.js.map → p-4bdeb62d.entry.js.map} +0 -0
- /package/dist/core/{p-9cf6ccfd.entry.js.map → p-5cf704e3.entry.js.map} +0 -0
- /package/dist/core/{p-cc00cbce.entry.js.map → p-6e61c48a.entry.js.map} +0 -0
- /package/dist/core/{p-37d217b5.entry.js.map → p-889bb8db.entry.js.map} +0 -0
- /package/dist/core/{p-c04e1fab.entry.js.map → p-8c7d6a85.entry.js.map} +0 -0
- /package/dist/core/{p-6dbe70f1.entry.js.map → p-911b4aa4.entry.js.map} +0 -0
- /package/dist/core/{p-57721431.entry.js.map → p-93e1ba0a.entry.js.map} +0 -0
- /package/dist/core/{p-37daa8fe.entry.js.map → p-9c2e9189.entry.js.map} +0 -0
- /package/dist/core/{p-8558b9b7.entry.js.map → p-a45de09d.entry.js.map} +0 -0
- /package/dist/core/{p-ea06792a.entry.js.map → p-a7f21494.entry.js.map} +0 -0
- /package/dist/core/{p-2126d37b.entry.js.map → p-ad6632a9.entry.js.map} +0 -0
- /package/dist/core/{p-9a8bcb78.entry.js.map → p-b00efb15.entry.js.map} +0 -0
- /package/dist/core/{p-25bef09d.entry.js.map → p-b29e325f.entry.js.map} +0 -0
- /package/dist/core/{p-b9bdd9a9.entry.js.map → p-bba25812.entry.js.map} +0 -0
- /package/dist/core/{p-27e67d45.entry.js.map → p-c397b33f.entry.js.map} +0 -0
- /package/dist/core/{p-45097448.entry.js.map → p-c4ffcc64.entry.js.map} +0 -0
- /package/dist/core/{p-675bb3e4.entry.js.map → p-d1cce122.entry.js.map} +0 -0
- /package/dist/core/{p-492fcb51.entry.js.map → p-d8200098.entry.js.map} +0 -0
- /package/dist/core/{p-80317cd1.entry.js.map → p-e0423c7e.entry.js.map} +0 -0
- /package/dist/core/{p-b4a2f6fa.entry.js.map → p-f098e531.entry.js.map} +0 -0
- /package/dist/core/{p-0ec76cff.entry.js.map → p-f247db14.entry.js.map} +0 -0
- /package/dist/core/{p-813ad03c.entry.js.map → p-f4e2e41f.entry.js.map} +0 -0
- /package/dist/core/{p-5fcfcfb6.entry.js.map → p-fb43abd6.entry.js.map} +0 -0
|
@@ -48,22 +48,23 @@ ic-link {
|
|
|
48
48
|
--breadcrumb-link-gap: var(--ic-space-xs);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
:host(
|
|
51
|
+
:host(.ic-breadcrumb-aria-current-page) {
|
|
52
52
|
cursor: text;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
:host(
|
|
55
|
+
:host(.ic-breadcrumb-aria-current-page) .current-page-container {
|
|
56
56
|
display: flex;
|
|
57
57
|
align-items: center;
|
|
58
58
|
gap: var(--ic-space-xs);
|
|
59
59
|
color: var(--ic-breadcrumb-text);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
:host(
|
|
62
|
+
:host(.ic-breadcrumb-aria-current-page).ic-breadcrumb-monochrome
|
|
63
|
+
.current-page-container {
|
|
63
64
|
color: var(--ic-breadcrumb-text-monochrome);
|
|
64
65
|
}
|
|
65
66
|
|
|
66
|
-
:host(
|
|
67
|
+
:host(.ic-breadcrumb-aria-current-page) slot {
|
|
67
68
|
pointer-events: none;
|
|
68
69
|
}
|
|
69
70
|
|
|
@@ -88,11 +88,12 @@ export class Breadcrumb {
|
|
|
88
88
|
render() {
|
|
89
89
|
const { current, href, monochrome, pageTitle, showBackIcon, theme } = this;
|
|
90
90
|
const describedById = `${pageTitle === null || pageTitle === void 0 ? void 0 : pageTitle.toLowerCase().replace(" ", "-")}-describedby`;
|
|
91
|
-
return (h(Host, { key: '
|
|
91
|
+
return (h(Host, { key: '35d95efd65cb713a1b9b614aa7162a328f1fd5bd', class: {
|
|
92
92
|
"ic-breadcrumb-back": showBackIcon,
|
|
93
93
|
"ic-breadcrumb-monochrome": monochrome,
|
|
94
94
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
95
|
-
|
|
95
|
+
[`ic-breadcrumb-aria-current-page`]: current,
|
|
96
|
+
}, "aria-current": current && "page", role: "listitem" }, h("div", { key: '126bfcb069004244fc0beb4b3f5e3dab652a4057', class: "breadcrumb" }, h("span", { key: '24c4bd1741b5a65b8d348280bd3c680db15edcfc', innerHTML: chevronIcon, class: "chevron", "aria-hidden": "true" }), showBackIcon && (h("span", { key: '501ae0ebd6ce1b77026ab8c447f59abf00db7c73', id: describedById, class: "hide" }, `Back to ${pageTitle}`)), !href ? (h("div", { class: "slotted-link-container" }, showBackIcon && this.renderBackIcon(), h("span", { class: "link-wrapper" }, h("slot", null)))) : current ? (h("span", { class: "current-page-container" }, isSlotUsed(this.el, "icon") && h("slot", { name: "icon" }), pageTitle)) : (h("ic-link", { theme: theme, monochrome: monochrome, href: href, class: "breadcrumb-link", "aria-describedby": showBackIcon && describedById }, showBackIcon && this.renderBackIcon(), isSlotUsed(this.el, "icon") && h("slot", { name: "icon" }), pageTitle)))));
|
|
96
97
|
}
|
|
97
98
|
static get is() { return "ic-breadcrumb"; }
|
|
98
99
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ic-breadcrumb.js","sourceRoot":"","sources":["../../../src/components/ic-breadcrumb/ic-breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,CAAC,EACD,OAAO,EACP,MAAM,EACN,KAAK,GACN,MAAM,eAAe,CAAC;AAEvB,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGlE;;GAEG;AAQH,MAAM,OAAO,UAAU;IAPvB;QAQU,cAAS,GAAG,MAAM,CAAC;Q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AAa,MAAM,GAAG;gBAClE,YAAY,IAAI,CACf,6DACE,EAAE,EAAE,aAAa,EACjB,KAAK,EAAC,MAAM,IACZ,WAAW,SAAS,EAAE,CAAQ,CACjC;gBACA,CAAC,IAAI,CAAC,CAAC,CAAC,CACP,WAAK,KAAK,EAAC,wBAAwB;oBAChC,YAAY,IAAI,IAAI,CAAC,cAAc,EAAE;oBACtC,YAAM,KAAK,EAAC,cAAc;wBACxB,eAAQ,CACH,CACH,CACP,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CACZ,YAAM,KAAK,EAAC,wBAAwB;oBACjC,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,YAAM,IAAI,EAAC,MAAM,GAAQ;oBACxD,SAAS,CACL,CACR,CAAC,CAAC,CAAC,CACF,eACE,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,iBAAiB,sBACL,YAAY,IAAI,aAAa;oBAE9C,YAAY,IAAI,IAAI,CAAC,cAAc,EAAE;oBACrC,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,YAAM,IAAI,EAAC,MAAM,GAAQ;oBACxD,SAAS,CACF,CACX,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n Prop,\n h,\n Element,\n Method,\n Watch,\n} from \"@stencil/core\";\n\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\nimport backIcon from \"../../assets/back-icon.svg\";\nimport { getSlotElements, isSlotUsed } from \"../../utils/helpers\";\nimport { IcThemeMode } from \"../../utils/types\";\n\n/**\n * @slot icon - Content will be rendered to the left of the breadcrumb page title.\n */\n@Component({\n tag: \"ic-breadcrumb\",\n styleUrl: \"ic-breadcrumb.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Breadcrumb {\n private HREF_ATTR = \"href\";\n private linkSlotContent: HTMLElement | null = null;\n private slottedLinkEl: HTMLElement | null = null;\n private slottedLinkHref: string | null = null;\n\n @Element() el: HTMLIcBreadcrumbElement;\n\n /**\n * If `true`, aria-current will be set on the breadcrumb.\n */\n @Prop() current = false;\n @Watch(\"current\")\n watchCurrentHandler(): void {\n this.updatedSlottedLinkFocus();\n this.el.ariaCurrent = this.current ? \"page\" : null;\n }\n\n /**\n * The URL that the breadcrumb link points to.\n */\n @Prop() href?: string;\n\n /**\n * @internal If `true`, the breadcrumb will display as black in the light theme, and white in the dark theme.\n */\n @Prop() monochrome = false;\n\n /**\n * The title of the breadcrumb.\n */\n @Prop() pageTitle!: string;\n\n /**\n * @internal If `true`, back icon will be displayed.\n */\n @Prop({ reflect: true }) showBackIcon = false;\n\n /**\n * @internal 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 // Prevent focus on breadcrumb if current page and contains slotted link\n private updatedSlottedLinkFocus = () => {\n // Sets tabindex on wrong element in unit test snapshots\n // - related to known Jest issue: https://github.com/ionic-team/stencil/issues/2830\n if (this.linkSlotContent) {\n this.linkSlotContent.tabIndex = this.current ? -1 : 0; // Prevent focus\n }\n\n if (this.current) {\n this.slottedLinkEl?.removeAttribute(this.HREF_ATTR); // Prevent screen reader announcing breadcrumb as a link\n } else if (this.slottedLinkHref) {\n this.slottedLinkEl?.setAttribute(this.HREF_ATTR, this.slottedLinkHref);\n }\n };\n\n private getSlottedLinkEl = () => {\n if (!this.linkSlotContent) return null;\n\n return this.linkSlotContent.hasAttribute(this.HREF_ATTR)\n ? this.linkSlotContent\n : this.linkSlotContent.querySelector<HTMLElement>(\"[href]\");\n };\n\n componentDidLoad(): void {\n const slottedLinkWrapper =\n this.el.shadowRoot?.querySelector(\".link-wrapper\");\n\n if (slottedLinkWrapper) {\n const slotEls = getSlotElements(slottedLinkWrapper);\n if (slotEls) {\n this.linkSlotContent = slotEls[0] as HTMLElement;\n this.slottedLinkEl = this.getSlottedLinkEl();\n this.slottedLinkHref = this.slottedLinkEl?.getAttribute(\"href\") || null;\n }\n this.updatedSlottedLinkFocus();\n }\n }\n\n componentWillRender(): void {\n const icLink = this.el.querySelector(\"ic-link\");\n if (icLink) {\n const CURRENT_PAGE = \"current-page\";\n icLink.classList.remove(CURRENT_PAGE);\n\n if (this.current && !icLink.classList.contains(CURRENT_PAGE)) {\n icLink.classList.add(\"breadcrumb-link\", CURRENT_PAGE);\n }\n }\n }\n\n /**\n * Sets focus on the breadcrumb.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.el.shadowRoot?.querySelector(\"ic-link\")?.focus();\n }\n\n private renderBackIcon = () => (\n <div class=\"back-icon\" innerHTML={backIcon}></div>\n );\n\n render() {\n const { current, href, monochrome, pageTitle, showBackIcon, theme } = this;\n const describedById = `${pageTitle\n ?.toLowerCase()\n .replace(\" \", \"-\")}-describedby`;\n\n return (\n <Host\n class={{\n \"ic-breadcrumb-back\": showBackIcon,\n \"ic-breadcrumb-monochrome\": monochrome,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [`ic-breadcrumb-aria-current-page`]: current,\n }}\n aria-current={current && \"page\"}\n role=\"listitem\"\n >\n <div class=\"breadcrumb\">\n <span innerHTML={chevronIcon} class=\"chevron\" aria-hidden=\"true\" />\n {showBackIcon && (\n <span\n id={describedById}\n class=\"hide\"\n >{`Back to ${pageTitle}`}</span>\n )}\n {!href ? (\n <div class=\"slotted-link-container\">\n {showBackIcon && this.renderBackIcon()}\n <span class=\"link-wrapper\">\n <slot />\n </span>\n </div>\n ) : current ? (\n <span class=\"current-page-container\">\n {isSlotUsed(this.el, \"icon\") && <slot name=\"icon\"></slot>}\n {pageTitle}\n </span>\n ) : (\n <ic-link\n theme={theme}\n monochrome={monochrome}\n href={href}\n class=\"breadcrumb-link\"\n aria-describedby={showBackIcon && describedById}\n >\n {showBackIcon && this.renderBackIcon()}\n {isSlotUsed(this.el, \"icon\") && <slot name=\"icon\"></slot>}\n {pageTitle}\n </ic-link>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -212,11 +212,11 @@ export class BreadcrumbGroup {
|
|
|
212
212
|
}
|
|
213
213
|
render() {
|
|
214
214
|
const { backBreadcrumbOnly, collapsed, theme } = this;
|
|
215
|
-
return (h(Host, { key: '
|
|
215
|
+
return (h(Host, { key: 'c2828a2c275ac4341d26054b2de81bd93591a783', class: {
|
|
216
216
|
"ic-breadcrumb-group-back": backBreadcrumbOnly,
|
|
217
217
|
"ic-breadcrumb-group-collapsed": collapsed,
|
|
218
218
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
219
|
-
} }, h("nav", { key: '
|
|
219
|
+
} }, h("nav", { key: '44c0b96801da788bbfa96b138348d05214270b60', "aria-label": "breadcrumbs" }, h("ol", { key: '1f0549af4262e1f3181168dce91b7af6c6820dc3' }, h("slot", { key: '8603a718735d00643bedf8b3b3fed554234d710e' })))));
|
|
220
220
|
}
|
|
221
221
|
static get is() { return "ic-breadcrumb-group"; }
|
|
222
222
|
static get encapsulation() { return "shadow"; }
|
|
@@ -32,7 +32,6 @@ export class Button {
|
|
|
32
32
|
this.mutationObserver = null;
|
|
33
33
|
this.hostMutationObserver = null;
|
|
34
34
|
this.ariaLabel = "";
|
|
35
|
-
this.describedByContent = "";
|
|
36
35
|
this.title = "";
|
|
37
36
|
/**
|
|
38
37
|
* If `fileUpload` is set to `true`, this is the accepted list of file types.
|
|
@@ -133,11 +132,31 @@ export class Button {
|
|
|
133
132
|
this.icBlur.emit();
|
|
134
133
|
};
|
|
135
134
|
/**
|
|
136
|
-
*
|
|
135
|
+
* Creates/updates clone of aria-describedby element node tree in shadow dom
|
|
136
|
+
* Required due to ids being scoped to the shadow dom
|
|
137
|
+
*/
|
|
138
|
+
this.updateAriaDescribedbyClone = () => {
|
|
139
|
+
var _a, _b;
|
|
140
|
+
if (this.describedbyNode) {
|
|
141
|
+
const wrapper = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("#describedby-wrapper");
|
|
142
|
+
if (!wrapper) {
|
|
143
|
+
(_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.appendChild(Object.assign(document.createElement("div"), {
|
|
144
|
+
id: "describedby-wrapper",
|
|
145
|
+
className: "ic-button-describedby",
|
|
146
|
+
}));
|
|
147
|
+
}
|
|
148
|
+
while (wrapper === null || wrapper === void 0 ? void 0 : wrapper.firstChild)
|
|
149
|
+
wrapper.firstChild.remove();
|
|
150
|
+
wrapper === null || wrapper === void 0 ? void 0 : wrapper.appendChild(this.describedbyNode);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Triggered when light dom aria-describedby element updates
|
|
137
155
|
*/
|
|
138
156
|
this.mutationCallback = () => {
|
|
139
157
|
var _a;
|
|
140
|
-
|
|
158
|
+
if (this.describedbyEl)
|
|
159
|
+
this.describedbyNode = (_a = this.describedbyEl) === null || _a === void 0 ? void 0 : _a.cloneNode(true);
|
|
141
160
|
};
|
|
142
161
|
/**
|
|
143
162
|
* Triggered when attributes of host element change
|
|
@@ -226,6 +245,9 @@ export class Button {
|
|
|
226
245
|
}
|
|
227
246
|
};
|
|
228
247
|
}
|
|
248
|
+
watchDescribedbyNodeHandler() {
|
|
249
|
+
this.updateAriaDescribedbyClone();
|
|
250
|
+
}
|
|
229
251
|
watchDisabledHandler() {
|
|
230
252
|
removeDisabledFalse(this.disabled, this.el);
|
|
231
253
|
}
|
|
@@ -245,8 +267,7 @@ export class Button {
|
|
|
245
267
|
this.setHasTooltip();
|
|
246
268
|
}
|
|
247
269
|
componentWillLoad() {
|
|
248
|
-
|
|
249
|
-
const _b = inheritAttributes(this.el, [...IC_INHERITED_ARIA, "title"]), { title, "aria-label": ariaLabel } = _b, restInheritedAttributes = __rest(_b, ["title", "aria-label"]);
|
|
270
|
+
const _a = inheritAttributes(this.el, [...IC_INHERITED_ARIA, "title"]), { title, "aria-label": ariaLabel } = _a, restInheritedAttributes = __rest(_a, ["title", "aria-label"]);
|
|
250
271
|
this.title = title;
|
|
251
272
|
this.ariaLabel = ariaLabel;
|
|
252
273
|
this.inheritedAttributes = restInheritedAttributes;
|
|
@@ -258,10 +279,10 @@ export class Button {
|
|
|
258
279
|
const describedById = this.inheritedAttributes["aria-describedby"];
|
|
259
280
|
if (describedById) {
|
|
260
281
|
this.describedById = describedById;
|
|
261
|
-
const el =
|
|
282
|
+
const el = document.querySelector(`#${describedById}`);
|
|
262
283
|
if (el) {
|
|
263
|
-
this.describedByContent = el.innerText;
|
|
264
284
|
this.describedbyEl = el;
|
|
285
|
+
this.describedbyNode = el.cloneNode(true);
|
|
265
286
|
}
|
|
266
287
|
}
|
|
267
288
|
}
|
|
@@ -287,6 +308,7 @@ export class Button {
|
|
|
287
308
|
if (this.hasRouterSlot())
|
|
288
309
|
this.arrangeRouterItem();
|
|
289
310
|
}
|
|
311
|
+
this.updateAriaDescribedbyClone();
|
|
290
312
|
}
|
|
291
313
|
componentWillRender() {
|
|
292
314
|
const iconEl = this.getSlottedIcon("left") || this.getSlottedIcon("right");
|
|
@@ -342,7 +364,7 @@ export class Button {
|
|
|
342
364
|
}
|
|
343
365
|
}
|
|
344
366
|
render() {
|
|
345
|
-
const { ariaControlsId, ariaLabel, ariaOwnsId, buttonIdNum,
|
|
367
|
+
const { ariaControlsId, ariaLabel, ariaOwnsId, buttonIdNum, describedById, disabled, download, dropdown, dropdownExpanded, form, formaction, formenctype, formmethod, formnovalidate, formtarget, fullWidth, handleClick, handleKeyDown, hasTooltip, href, hreflang, id, inheritedAttributes, isIconVariant, loading, monochrome, onBlur, onFocus, referrerpolicy, rel, size, target, theme, title, tooltipFixedPositioning, tooltipPlacement, transparentBackground, type, variant, } = this;
|
|
346
368
|
const TagType = href ? "a" : "button";
|
|
347
369
|
const buttonAttrs = TagType === "button"
|
|
348
370
|
? {
|
|
@@ -376,7 +398,7 @@ export class Button {
|
|
|
376
398
|
variant !== "destructive" && (h("span", { class: dropdownExpanded
|
|
377
399
|
? "dropdown-expanded"
|
|
378
400
|
: "arrow-dropdown", innerHTML: arrowDropdown }))))));
|
|
379
|
-
return (h(Host, { key: '
|
|
401
|
+
return (h(Host, { key: '4e15c7ddb5f7d220f52848c36fc9b26932daeb8e', class: {
|
|
380
402
|
"ic-button-disabled": disabled && !loading,
|
|
381
403
|
"ic-button-full-width": fullWidth,
|
|
382
404
|
"ic-button-loading": loading,
|
|
@@ -392,7 +414,7 @@ export class Button {
|
|
|
392
414
|
monochrome,
|
|
393
415
|
"top-icon": isSlotUsed(this.el, "top-icon"),
|
|
394
416
|
"with-badge": isSlotUsed(this.el, "badge"),
|
|
395
|
-
}, onClick: handleClick, onKeyDown: handleKeyDown, "aria-owns": ariaOwnsId, "aria-controls": ariaControlsId, "aria-expanded": dropdown && `${dropdownExpanded}` }, hasTooltip && (h("ic-tooltip", { key: '
|
|
417
|
+
}, onClick: handleClick, onKeyDown: handleKeyDown, "aria-owns": ariaOwnsId, "aria-controls": ariaControlsId, "aria-expanded": dropdown && `${dropdownExpanded}` }, hasTooltip && (h("ic-tooltip", { key: 'a6b3305c993a950f41b2cc44812a35239b4ef717', id: describedby, label: title || ariaLabel, target: buttonId, placement: tooltipPlacement, fixedPositioning: tooltipFixedPositioning, silent: isIconVariant() && !!ariaLabel }, h(ButtonContent, { key: '146f8c894991641b88313d8947c5ac4e1d204049' }))), isSlotUsed(this.el, "badge") && h("slot", { key: '4aede0d2f30748690130dfba00612b3adc859c10', name: "badge" }), !hasTooltip && h(ButtonContent, { key: 'bf1fd18f9c47ea1199babace3584855499a2776c' })));
|
|
396
418
|
}
|
|
397
419
|
static get is() { return "ic-button"; }
|
|
398
420
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1104,7 +1126,7 @@ export class Button {
|
|
|
1104
1126
|
static get states() {
|
|
1105
1127
|
return {
|
|
1106
1128
|
"ariaLabel": {},
|
|
1107
|
-
"
|
|
1129
|
+
"describedbyNode": {},
|
|
1108
1130
|
"title": {}
|
|
1109
1131
|
};
|
|
1110
1132
|
}
|
|
@@ -1185,6 +1207,9 @@ export class Button {
|
|
|
1185
1207
|
static get elementRef() { return "el"; }
|
|
1186
1208
|
static get watchers() {
|
|
1187
1209
|
return [{
|
|
1210
|
+
"propName": "describedbyNode",
|
|
1211
|
+
"methodName": "watchDescribedbyNodeHandler"
|
|
1212
|
+
}, {
|
|
1188
1213
|
"propName": "disabled",
|
|
1189
1214
|
"methodName": "watchDisabledHandler"
|
|
1190
1215
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ic-button.js","sourceRoot":"","sources":["../../../src/components/ic-button/ic-button.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,EACL,WAAW,EACX,CAAC,EACD,KAAK,EACL,QAAQ,GACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAIL,qBAAqB,GAItB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,aAAa,MAAM,iCAAiC,CAAC;AAE5D,IAAI,SAAS,GAAG,CAAC,CAAC;AAElB;;;;;;GAMG;AAQH,MAAM,OAAO,MAAM;IAPnB;QASU,gBAAW,GAAG,SAAS,EAAE,CAAC;QAC1B,eAAU,GAAG,KAAK,CAAC;QAEnB,wBAAmB,GAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Method,\n Prop,\n State,\n forceUpdate,\n h,\n Watch,\n Fragment,\n} from \"@stencil/core\";\n\nimport {\n getBrandFromContext,\n handleHiddenFormButtonClick,\n inheritAttributes,\n isSlotUsed,\n removeDisabledFalse,\n renderFileHiddenInput,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport { IcButtonTypes, IcButtonVariants } from \"./ic-button.types\";\nimport {\n IcSizes,\n IcBrand,\n IcBrandForeground,\n IcBrandForegroundEnum,\n IcThemeMode,\n IcButtonTooltipPlacement,\n IcIconPlacementOptions,\n} from \"../../utils/types\";\nimport arrowDropdown from \"../../assets/arrow-dropdown.svg\";\n\nlet buttonIds = 0;\n\n/**\n * @slot left-icon - Content will be placed to the left of the button label.\n * @slot right-icon - Content will be placed to the right of the button label.\n * @slot top-icon - Content will be placed above the button label.\n * @slot badge - Badge component overlaying the top right of the button.\n * @slot router-item - Handle routing by nesting your routes in this slot. Setting loading to true will have no impact on this slot.\n */\n@Component({\n tag: \"ic-button\",\n styleUrl: \"ic-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Button {\n private buttonEl?: HTMLElement;\n private buttonIdNum = buttonIds++;\n private hasTooltip = false;\n private id: string | null;\n private inheritedAttributes: { [k: string]: string } = {};\n private describedbyEl: HTMLElement | null = null;\n private describedById?: string;\n private mutationObserver: MutationObserver | null = null;\n private hostMutationObserver: MutationObserver | null = null;\n private routerSlot: HTMLElement | null;\n\n @Element() el: HTMLIcButtonElement;\n\n @State() ariaLabel = \"\";\n @State() describedByContent? = \"\";\n @State() title = \"\";\n\n /**\n * If `fileUpload` is set to `true`, this is the accepted list of file types.\n */\n @Prop() accept = \"*\";\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaControlsId?: string | boolean;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwnsId?: string | boolean;\n\n /**\n * If `true`, the button will be in disabled state.\n */\n @Prop() disabled = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the ic-tooltip which is shown for icon variant will be disabled. Title or aria-label must be set if this prop is not applied.\n */\n @Prop() disableTooltip = false;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download: string | boolean = false;\n\n /**\n * If `true`, the button will show a dropdown icon.\n */\n @Prop() dropdown = false;\n\n /**\n * If `true`, the aria-expanded value will be set to true. This is only applied if the dropdown prop is also true.\n */\n @Prop({ mutable: true, reflect: true }) dropdownExpanded = false;\n\n /**\n * If `true`, when the button is clicked the native file explorer will be launched.\n */\n @Prop() fileUpload = false;\n\n /**\n * The name of the control for the file input, which is submitted with the form data.\n */\n @Prop() fileInputName = `ic-button-file-upload-input-${buttonIds++}`;\n\n /**\n * The <form> element to associate the button with.\n */\n @Prop() form?: string;\n\n /**\n * The URL that processes the information submitted by the button. It overrides the action attribute of the button's form owner. Does nothing if there is no form owner.\n */\n @Prop() formaction?: string;\n\n /**\n * The way the submitted form data is encoded.\n */\n @Prop() formenctype?: string;\n\n /**\n * The HTTP method used to submit the form.\n */\n @Prop() formmethod?: string;\n\n /**\n * If `true`, the form will not be validated when submitted.\n */\n @Prop() formnovalidate?: boolean;\n\n /**\n * The place to display the response from submitting the form. It overrides the target attribute of the button's form owner.\n */\n @Prop() formtarget?: string;\n\n /**\n * If `true`, the button will fill the width of the container.\n */\n @Prop() fullWidth = false;\n\n /**\n * The URL that the link points to. This will render the button as an \"a\" tag.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * If `true`, the button will be in loading state.\n */\n @Prop() loading = false;\n\n /**\n * If `true`, the button will display as monochromatic in either `light` or `dark` theme.\n */\n @Prop({ mutable: true }) monochrome = false;\n\n /**\n * If `fileUpload` is set to `true`, this boolean determines whether multiple files are accepted.\n */\n @Prop() multiple = false;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The list of the files that have been selected by a user.\n */\n @Prop() selectedFiles?: FileList;\n\n /**\n * The size of the button to be displayed.\n */\n @Prop() size: IcSizes = \"medium\";\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\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({ mutable: true }) theme: IcThemeMode = \"inherit\";\n\n /**\n * Setting to `true` can help in situations where tooltip content is clipped by a parent element.\n */\n @Prop() tooltipFixedPositioning: boolean = false;\n\n /**\n * The position of the tooltip in relation to the button.\n */\n @Prop() tooltipPlacement: IcButtonTooltipPlacement = \"bottom\";\n\n /**\n * If `true`, the secondary & tertiary variants of button will have a transparent background when not hovered, pressed or loading.\n */\n @Prop() transparentBackground = true;\n\n /**\n * The type of the button.\n */\n @Prop() type: IcButtonTypes = \"button\";\n\n /**\n * The variant of the button to be displayed.\n */\n @Prop({ mutable: true }) variant: IcButtonVariants = \"primary\";\n @Watch(\"variant\")\n watchVariantHandler(newVariant: IcButtonVariants): void {\n if (newVariant === \"icon\") this.variant = \"icon-tertiary\";\n }\n\n /**\n * Emitted when button has blur\n */\n @Event() icBlur!: EventEmitter<void>;\n\n /**\n * If `fileUpload` is set to `true`, this will be emitted when a file is selected in the native explorer.\n */\n @Event() icFileSelection!: EventEmitter<FileList>;\n\n /**\n * Emitted when button has focus\n */\n @Event() icFocus!: EventEmitter<void>;\n\n disconnectedCallback(): void {\n this.mutationObserver?.disconnect();\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillUpdate(): void {\n if (this.loading) {\n this.el.style.setProperty(\n \"--min-width\",\n `${this.el.getBoundingClientRect().width}px`\n );\n }\n this.setHasTooltip();\n }\n\n componentWillLoad(): void {\n const {\n title,\n \"aria-label\": ariaLabel,\n ...restInheritedAttributes\n } = inheritAttributes(this.el, [...IC_INHERITED_ARIA, \"title\"]);\n\n this.title = title;\n this.ariaLabel = ariaLabel;\n this.inheritedAttributes = restInheritedAttributes;\n\n removeDisabledFalse(this.disabled, this.el);\n\n this.el.setAttribute(\"exportparts\", \"button\");\n\n this.id = this.el.id || null;\n this.setHasTooltip();\n\n if (!this.hasTooltip) {\n const describedById = this.inheritedAttributes[\"aria-describedby\"];\n if (describedById) {\n this.describedById = describedById;\n const el = this.el.parentElement?.querySelector<HTMLElement>(\n `#${describedById}`\n );\n if (el) {\n this.describedByContent = el.innerText;\n this.describedbyEl = el;\n }\n }\n }\n\n if (this.variant === \"icon\") {\n this.variant = \"icon-tertiary\";\n }\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n\n if (typeof MutationObserver !== \"undefined\") {\n if (this.describedbyEl && this.describedById) {\n this.mutationObserver = new MutationObserver(this.mutationCallback);\n this.mutationObserver.observe(this.describedbyEl, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n\n this.hostMutationObserver = new MutationObserver(\n this.hostMutationCallback\n );\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n });\n\n if (this.hasRouterSlot()) this.arrangeRouterItem();\n }\n }\n\n componentWillRender(): void {\n const iconEl = this.getSlottedIcon(\"left\") || this.getSlottedIcon(\"right\");\n iconEl?.setAttribute(\"viewBox\", \"0 0 24 24\");\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (!this.hasRouterSlot()) {\n if (this.fileUpload) {\n renderFileHiddenInput(\n this.icFileSelection,\n this.el,\n !!this.multiple,\n !!this.disabled,\n this.accept,\n this.fileInputName,\n this.selectedFiles\n );\n }\n if (this.disabled || this.loading) {\n event.stopImmediatePropagation();\n }\n if (this.dropdown) {\n this.dropdownExpanded = !this.dropdownExpanded;\n }\n }\n }\n\n @Listen(\"brandChange\", { target: \"document\" })\n brandChangeHandler({ detail }: CustomEvent<IcBrand>): void {\n this.updateTheme(detail.mode);\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.buttonEl?.focus();\n }\n\n private async closeButtonTooltip(ev: KeyboardEvent) {\n const tooltip = this.el.shadowRoot?.querySelector(\"ic-tooltip\");\n if (tooltip && (await tooltip.isTooltipVisible())) {\n tooltip.displayTooltip(false);\n ev.preventDefault();\n ev.stopImmediatePropagation();\n }\n }\n\n private getSlottedIcon = (position: IcIconPlacementOptions) =>\n this.el.querySelector(`[slot=\"${position}-icon\"]`);\n\n private hasRouterSlot() {\n this.routerSlot = this.el.querySelector('[slot=\"router-item\"]');\n if (this.routerSlot) {\n this.routerSlot.ariaLabel = this.routerSlot.textContent;\n }\n return !!this.routerSlot;\n }\n\n private handleClick = () => {\n if (\n (this.el.type === \"submit\" || this.el.type === \"reset\") &&\n !this.hasRouterSlot() &&\n (this.form || !!this.el.closest(\"FORM\"))\n ) {\n const form = this.form\n ? document.querySelector<HTMLFormElement>(`form[id=${this.form}]`)\n : this.el.closest<HTMLFormElement>(\"FORM\");\n\n handleHiddenFormButtonClick(form, this.el);\n }\n };\n\n private handleKeyDown = (ev: KeyboardEvent) => {\n if (ev.key === \"Escape\" && this.hasTooltip) {\n this.closeButtonTooltip(ev);\n }\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private updateTheme(mode: IcBrandForeground | null = null) {\n const foregroundColor = getBrandFromContext(this.el, mode);\n if (foregroundColor !== IcBrandForegroundEnum.Default) {\n this.theme =\n foregroundColor === IcBrandForegroundEnum.Light\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n this.monochrome = true;\n }\n }\n\n /**\n * Triggered when text content of sibling element in light DOM changes\n */\n private mutationCallback = () => {\n this.describedByContent = this.describedbyEl?.innerText;\n };\n\n /**\n * Triggered when attributes of host element change\n * @param mutationList the list of changes made to the host element\n */\n private hostMutationCallback = (mutationList: MutationRecord[]) => {\n let forceComponentUpdate = false;\n mutationList.forEach(({ attributeName }) => {\n if (attributeName) {\n const attribute = this.el.getAttribute(attributeName);\n if (attribute) {\n if (attributeName === \"title\") this.title = attribute;\n else if (attributeName === \"aria-label\") this.ariaLabel = attribute;\n\n if (IC_INHERITED_ARIA.includes(attributeName)) {\n this.inheritedAttributes[attributeName] = attribute;\n forceComponentUpdate = true;\n }\n }\n }\n });\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n private setHasTooltip = () => {\n this.hasTooltip =\n !this.disableTooltip && (!!this.title || !!this.isIconVariant());\n };\n\n private isIconVariant = () => this.variant.startsWith(\"icon\");\n\n private arrangeRouterItem = () => {\n const setStyles = (\n element: HTMLElement | SVGElement,\n styles: { [key: string]: string }\n ) => {\n Object.entries(styles).forEach(([key, value]) => {\n element.style.setProperty(key, value);\n });\n };\n\n if (this.routerSlot) {\n const icTypography = document.createElement(\"ic-typography\");\n\n setStyles(icTypography, {\n \"font-family\": \"var(--ic-font-body-family)\",\n \"font-size\": \"0.875rem\",\n \"font-weight\": \"600\",\n });\n setStyles(this.routerSlot, {\n gap: \"0\",\n });\n\n const icon = this.routerSlot.querySelector(\"svg\");\n const iconSlot = icon?.getAttribute(\"slot\");\n const iconWrapper = document.createElement(\"div\");\n\n if (icon) {\n setStyles(icon, {\n fill: \"currentcolor\",\n });\n\n if (iconSlot === \"top-icon\") {\n setStyles(this.routerSlot, {\n display: \"flex\",\n \"flex-direction\": \"column\",\n \"--height\": \"fit-content\",\n });\n } else if (iconSlot) {\n const marginPlacement = iconSlot === \"left-icon\" ? \"right\" : \"left\";\n setStyles(iconWrapper, {\n [`margin-${marginPlacement}`]: \"var(--ic-space-xs)\",\n });\n }\n\n iconWrapper.append(icon);\n }\n\n const badge = this.routerSlot.querySelector(\"ic-badge\");\n const label = this.routerSlot.textContent?.trim();\n\n if (badge) iconWrapper.append(badge);\n if (label) icTypography.textContent = label;\n\n this.routerSlot.textContent = \"\";\n\n if (iconSlot === \"right-icon\") {\n this.routerSlot.append(icTypography);\n this.routerSlot.append(iconWrapper);\n } else {\n this.routerSlot.append(iconWrapper);\n this.routerSlot.append(icTypography);\n }\n }\n };\n\n render() {\n const {\n ariaControlsId,\n ariaLabel,\n ariaOwnsId,\n buttonIdNum,\n describedByContent,\n describedById,\n disabled,\n download,\n dropdown,\n dropdownExpanded,\n form,\n formaction,\n formenctype,\n formmethod,\n formnovalidate,\n formtarget,\n fullWidth,\n handleClick,\n handleKeyDown,\n hasTooltip,\n href,\n hreflang,\n id,\n inheritedAttributes,\n isIconVariant,\n loading,\n monochrome,\n onBlur,\n onFocus,\n referrerpolicy,\n rel,\n size,\n target,\n theme,\n title,\n tooltipFixedPositioning,\n tooltipPlacement,\n transparentBackground,\n type,\n variant,\n } = this;\n\n const TagType = href ? \"a\" : \"button\";\n const buttonAttrs =\n TagType === \"button\"\n ? {\n type,\n disabled,\n form,\n formaction,\n formenctype,\n formmethod,\n formnovalidate,\n formtarget,\n }\n : {\n download: download !== false ? download : null,\n href,\n rel,\n target,\n referrerpolicy,\n hreflang,\n };\n\n const buttonId = hasTooltip\n ? `ic-button-with-tooltip-${id || buttonIdNum}`\n : undefined;\n\n const describedby = !hasTooltip ? describedById : `ic-tooltip-${buttonId}`;\n\n const hasLeftIcon = !!this.getSlottedIcon(\"left\");\n const hasRightIcon = !!this.getSlottedIcon(\"right\");\n\n const ButtonContent = () =>\n this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <TagType\n class=\"button\"\n tabindex={0}\n aria-disabled={loading || disabled ? \"true\" : null}\n aria-label={loading ? \"Loading\" : ariaLabel}\n aria-expanded={dropdown && `${dropdownExpanded}`}\n {...buttonAttrs}\n {...inheritedAttributes}\n onFocus={onFocus}\n onBlur={onBlur}\n ref={(el) => (this.buttonEl = el)}\n aria-describedby={describedby}\n part=\"button\"\n >\n {loading ? (\n <div class=\"loading-container\">\n <ic-loading-indicator\n type=\"linear\"\n monochrome={monochrome}\n theme={theme}\n ></ic-loading-indicator>\n </div>\n ) : (\n <Fragment>\n {(hasLeftIcon ||\n (!!this.getSlottedIcon(\"top\") && !hasRightIcon)) && (\n <div class=\"icon-container\">\n <slot name={`${hasLeftIcon ? \"left\" : \"top\"}-icon`} />\n </div>\n )}\n <slot />\n {!dropdown\n ? hasRightIcon && (\n <div class={{ \"icon-container\": true, \"right-icon\": true }}>\n <slot name=\"right-icon\" />\n </div>\n )\n : variant !== \"icon\" &&\n variant !== \"destructive\" && (\n <span\n class={\n dropdownExpanded\n ? \"dropdown-expanded\"\n : \"arrow-dropdown\"\n }\n innerHTML={arrowDropdown}\n />\n )}\n </Fragment>\n )}\n </TagType>\n );\n\n return (\n <Host\n class={{\n \"ic-button-disabled\": disabled && !loading,\n \"ic-button-full-width\": fullWidth,\n \"ic-button-loading\": loading,\n [`ic-button-size-${size}`]: true,\n [`ic-button-variant-${variant}`]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n background:\n (variant === \"secondary\" || variant === \"tertiary\") &&\n !transparentBackground &&\n !disabled,\n \"dropdown-no-icon\":\n dropdown &&\n !isSlotUsed(this.el, \"icon\") &&\n !isSlotUsed(this.el, \"left-icon\"),\n monochrome,\n \"top-icon\": isSlotUsed(this.el, \"top-icon\"),\n \"with-badge\": isSlotUsed(this.el, \"badge\"),\n }}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n aria-owns={ariaOwnsId}\n aria-controls={ariaControlsId}\n aria-expanded={dropdown && `${dropdownExpanded}`}\n >\n {hasTooltip && (\n <ic-tooltip\n id={describedby}\n label={title || ariaLabel}\n target={buttonId}\n placement={tooltipPlacement}\n fixedPositioning={tooltipFixedPositioning}\n silent={isIconVariant() && !!ariaLabel}\n >\n <ButtonContent />\n </ic-tooltip>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n {!hasTooltip && <ButtonContent />}\n {describedByContent && (\n <span id={describedby} class=\"ic-button-describedby\">\n {describedByContent}\n </span>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ic-button.js","sourceRoot":"","sources":["../../../src/components/ic-button/ic-button.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,EACL,WAAW,EACX,CAAC,EACD,KAAK,EACL,QAAQ,GACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAIL,qBAAqB,GAItB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,aAAa,MAAM,iCAAiC,CAAC;AAE5D,IAAI,SAAS,GAAG,CAAC,CAAC;AAElB;;;;;;GAMG;AAQH,MAAM,OAAO,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Method,\n Prop,\n State,\n forceUpdate,\n h,\n Watch,\n Fragment,\n} from \"@stencil/core\";\n\nimport {\n getBrandFromContext,\n handleHiddenFormButtonClick,\n inheritAttributes,\n isSlotUsed,\n removeDisabledFalse,\n renderFileHiddenInput,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport { IcButtonTypes, IcButtonVariants } from \"./ic-button.types\";\nimport {\n IcSizes,\n IcBrand,\n IcBrandForeground,\n IcBrandForegroundEnum,\n IcThemeMode,\n IcButtonTooltipPlacement,\n IcIconPlacementOptions,\n} from \"../../utils/types\";\nimport arrowDropdown from \"../../assets/arrow-dropdown.svg\";\n\nlet buttonIds = 0;\n\n/**\n * @slot left-icon - Content will be placed to the left of the button label.\n * @slot right-icon - Content will be placed to the right of the button label.\n * @slot top-icon - Content will be placed above the button label.\n * @slot badge - Badge component overlaying the top right of the button.\n * @slot router-item - Handle routing by nesting your routes in this slot. Setting loading to true will have no impact on this slot.\n */\n@Component({\n tag: \"ic-button\",\n styleUrl: \"ic-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Button {\n private buttonEl?: HTMLElement;\n private buttonIdNum = buttonIds++;\n private hasTooltip = false;\n private id: string | null;\n private inheritedAttributes: { [k: string]: string } = {};\n private describedbyEl: HTMLElement | null = null;\n private describedById?: string;\n private mutationObserver: MutationObserver | null = null;\n private hostMutationObserver: MutationObserver | null = null;\n private routerSlot: HTMLElement | null;\n\n @Element() el: HTMLIcButtonElement;\n\n @State() ariaLabel = \"\";\n @State() describedbyNode: Node | null;\n @Watch(\"describedbyNode\")\n watchDescribedbyNodeHandler(): void {\n this.updateAriaDescribedbyClone();\n }\n @State() title = \"\";\n\n /**\n * If `fileUpload` is set to `true`, this is the accepted list of file types.\n */\n @Prop() accept = \"*\";\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaControlsId?: string | boolean;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwnsId?: string | boolean;\n\n /**\n * If `true`, the button will be in disabled state.\n */\n @Prop() disabled = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the ic-tooltip which is shown for icon variant will be disabled. Title or aria-label must be set if this prop is not applied.\n */\n @Prop() disableTooltip = false;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download: string | boolean = false;\n\n /**\n * If `true`, the button will show a dropdown icon.\n */\n @Prop() dropdown = false;\n\n /**\n * If `true`, the aria-expanded value will be set to true. This is only applied if the dropdown prop is also true.\n */\n @Prop({ mutable: true, reflect: true }) dropdownExpanded = false;\n\n /**\n * If `true`, when the button is clicked the native file explorer will be launched.\n */\n @Prop() fileUpload = false;\n\n /**\n * The name of the control for the file input, which is submitted with the form data.\n */\n @Prop() fileInputName = `ic-button-file-upload-input-${buttonIds++}`;\n\n /**\n * The <form> element to associate the button with.\n */\n @Prop() form?: string;\n\n /**\n * The URL that processes the information submitted by the button. It overrides the action attribute of the button's form owner. Does nothing if there is no form owner.\n */\n @Prop() formaction?: string;\n\n /**\n * The way the submitted form data is encoded.\n */\n @Prop() formenctype?: string;\n\n /**\n * The HTTP method used to submit the form.\n */\n @Prop() formmethod?: string;\n\n /**\n * If `true`, the form will not be validated when submitted.\n */\n @Prop() formnovalidate?: boolean;\n\n /**\n * The place to display the response from submitting the form. It overrides the target attribute of the button's form owner.\n */\n @Prop() formtarget?: string;\n\n /**\n * If `true`, the button will fill the width of the container.\n */\n @Prop() fullWidth = false;\n\n /**\n * The URL that the link points to. This will render the button as an \"a\" tag.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * If `true`, the button will be in loading state.\n */\n @Prop() loading = false;\n\n /**\n * If `true`, the button will display as monochromatic in either `light` or `dark` theme.\n */\n @Prop({ mutable: true }) monochrome = false;\n\n /**\n * If `fileUpload` is set to `true`, this boolean determines whether multiple files are accepted.\n */\n @Prop() multiple = false;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The list of the files that have been selected by a user.\n */\n @Prop() selectedFiles?: FileList;\n\n /**\n * The size of the button to be displayed.\n */\n @Prop() size: IcSizes = \"medium\";\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\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({ mutable: true }) theme: IcThemeMode = \"inherit\";\n\n /**\n * Setting to `true` can help in situations where tooltip content is clipped by a parent element.\n */\n @Prop() tooltipFixedPositioning: boolean = false;\n\n /**\n * The position of the tooltip in relation to the button.\n */\n @Prop() tooltipPlacement: IcButtonTooltipPlacement = \"bottom\";\n\n /**\n * If `true`, the secondary & tertiary variants of button will have a transparent background when not hovered, pressed or loading.\n */\n @Prop() transparentBackground = true;\n\n /**\n * The type of the button.\n */\n @Prop() type: IcButtonTypes = \"button\";\n\n /**\n * The variant of the button to be displayed.\n */\n @Prop({ mutable: true }) variant: IcButtonVariants = \"primary\";\n @Watch(\"variant\")\n watchVariantHandler(newVariant: IcButtonVariants): void {\n if (newVariant === \"icon\") this.variant = \"icon-tertiary\";\n }\n\n /**\n * Emitted when button has blur\n */\n @Event() icBlur!: EventEmitter<void>;\n\n /**\n * If `fileUpload` is set to `true`, this will be emitted when a file is selected in the native explorer.\n */\n @Event() icFileSelection!: EventEmitter<FileList>;\n\n /**\n * Emitted when button has focus\n */\n @Event() icFocus!: EventEmitter<void>;\n\n disconnectedCallback(): void {\n this.mutationObserver?.disconnect();\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillUpdate(): void {\n if (this.loading) {\n this.el.style.setProperty(\n \"--min-width\",\n `${this.el.getBoundingClientRect().width}px`\n );\n }\n this.setHasTooltip();\n }\n\n componentWillLoad(): void {\n const {\n title,\n \"aria-label\": ariaLabel,\n ...restInheritedAttributes\n } = inheritAttributes(this.el, [...IC_INHERITED_ARIA, \"title\"]);\n\n this.title = title;\n this.ariaLabel = ariaLabel;\n this.inheritedAttributes = restInheritedAttributes;\n\n removeDisabledFalse(this.disabled, this.el);\n\n this.el.setAttribute(\"exportparts\", \"button\");\n\n this.id = this.el.id || null;\n this.setHasTooltip();\n\n if (!this.hasTooltip) {\n const describedById = this.inheritedAttributes[\"aria-describedby\"];\n if (describedById) {\n this.describedById = describedById;\n const el = document.querySelector<HTMLElement>(`#${describedById}`);\n if (el) {\n this.describedbyEl = el;\n this.describedbyNode = el.cloneNode(true);\n }\n }\n }\n\n if (this.variant === \"icon\") {\n this.variant = \"icon-tertiary\";\n }\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n\n if (typeof MutationObserver !== \"undefined\") {\n if (this.describedbyEl && this.describedById) {\n this.mutationObserver = new MutationObserver(this.mutationCallback);\n this.mutationObserver.observe(this.describedbyEl, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n\n this.hostMutationObserver = new MutationObserver(\n this.hostMutationCallback\n );\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n });\n\n if (this.hasRouterSlot()) this.arrangeRouterItem();\n }\n\n this.updateAriaDescribedbyClone();\n }\n\n componentWillRender(): void {\n const iconEl = this.getSlottedIcon(\"left\") || this.getSlottedIcon(\"right\");\n iconEl?.setAttribute(\"viewBox\", \"0 0 24 24\");\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (!this.hasRouterSlot()) {\n if (this.fileUpload) {\n renderFileHiddenInput(\n this.icFileSelection,\n this.el,\n !!this.multiple,\n !!this.disabled,\n this.accept,\n this.fileInputName,\n this.selectedFiles\n );\n }\n if (this.disabled || this.loading) {\n event.stopImmediatePropagation();\n }\n if (this.dropdown) {\n this.dropdownExpanded = !this.dropdownExpanded;\n }\n }\n }\n\n @Listen(\"brandChange\", { target: \"document\" })\n brandChangeHandler({ detail }: CustomEvent<IcBrand>): void {\n this.updateTheme(detail.mode);\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.buttonEl?.focus();\n }\n\n private async closeButtonTooltip(ev: KeyboardEvent) {\n const tooltip = this.el.shadowRoot?.querySelector(\"ic-tooltip\");\n if (tooltip && (await tooltip.isTooltipVisible())) {\n tooltip.displayTooltip(false);\n ev.preventDefault();\n ev.stopImmediatePropagation();\n }\n }\n\n private getSlottedIcon = (position: IcIconPlacementOptions) =>\n this.el.querySelector(`[slot=\"${position}-icon\"]`);\n\n private hasRouterSlot() {\n this.routerSlot = this.el.querySelector('[slot=\"router-item\"]');\n if (this.routerSlot) {\n this.routerSlot.ariaLabel = this.routerSlot.textContent;\n }\n return !!this.routerSlot;\n }\n\n private handleClick = () => {\n if (\n (this.el.type === \"submit\" || this.el.type === \"reset\") &&\n !this.hasRouterSlot() &&\n (this.form || !!this.el.closest(\"FORM\"))\n ) {\n const form = this.form\n ? document.querySelector<HTMLFormElement>(`form[id=${this.form}]`)\n : this.el.closest<HTMLFormElement>(\"FORM\");\n\n handleHiddenFormButtonClick(form, this.el);\n }\n };\n\n private handleKeyDown = (ev: KeyboardEvent) => {\n if (ev.key === \"Escape\" && this.hasTooltip) {\n this.closeButtonTooltip(ev);\n }\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private updateTheme(mode: IcBrandForeground | null = null) {\n const foregroundColor = getBrandFromContext(this.el, mode);\n if (foregroundColor !== IcBrandForegroundEnum.Default) {\n this.theme =\n foregroundColor === IcBrandForegroundEnum.Light\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n this.monochrome = true;\n }\n }\n\n /**\n * Creates/updates clone of aria-describedby element node tree in shadow dom\n * Required due to ids being scoped to the shadow dom\n */\n private updateAriaDescribedbyClone = () => {\n if (this.describedbyNode) {\n const wrapper = this.el.shadowRoot?.querySelector(\"#describedby-wrapper\");\n if (!wrapper) {\n this.el.shadowRoot?.appendChild(\n Object.assign(document.createElement(\"div\"), {\n id: \"describedby-wrapper\",\n className: \"ic-button-describedby\",\n })\n );\n }\n\n while (wrapper?.firstChild) wrapper.firstChild.remove();\n wrapper?.appendChild(this.describedbyNode);\n }\n };\n\n /**\n * Triggered when light dom aria-describedby element updates\n */\n private mutationCallback = () => {\n if (this.describedbyEl)\n this.describedbyNode = this.describedbyEl?.cloneNode(true);\n };\n\n /**\n * Triggered when attributes of host element change\n * @param mutationList the list of changes made to the host element\n */\n private hostMutationCallback = (mutationList: MutationRecord[]) => {\n let forceComponentUpdate = false;\n mutationList.forEach(({ attributeName }) => {\n if (attributeName) {\n const attribute = this.el.getAttribute(attributeName);\n if (attribute) {\n if (attributeName === \"title\") this.title = attribute;\n else if (attributeName === \"aria-label\") this.ariaLabel = attribute;\n\n if (IC_INHERITED_ARIA.includes(attributeName)) {\n this.inheritedAttributes[attributeName] = attribute;\n forceComponentUpdate = true;\n }\n }\n }\n });\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n private setHasTooltip = () => {\n this.hasTooltip =\n !this.disableTooltip && (!!this.title || !!this.isIconVariant());\n };\n\n private isIconVariant = () => this.variant.startsWith(\"icon\");\n\n private arrangeRouterItem = () => {\n const setStyles = (\n element: HTMLElement | SVGElement,\n styles: { [key: string]: string }\n ) => {\n Object.entries(styles).forEach(([key, value]) => {\n element.style.setProperty(key, value);\n });\n };\n\n if (this.routerSlot) {\n const icTypography = document.createElement(\"ic-typography\");\n\n setStyles(icTypography, {\n \"font-family\": \"var(--ic-font-body-family)\",\n \"font-size\": \"0.875rem\",\n \"font-weight\": \"600\",\n });\n setStyles(this.routerSlot, {\n gap: \"0\",\n });\n\n const icon = this.routerSlot.querySelector(\"svg\");\n const iconSlot = icon?.getAttribute(\"slot\");\n const iconWrapper = document.createElement(\"div\");\n\n if (icon) {\n setStyles(icon, {\n fill: \"currentcolor\",\n });\n\n if (iconSlot === \"top-icon\") {\n setStyles(this.routerSlot, {\n display: \"flex\",\n \"flex-direction\": \"column\",\n \"--height\": \"fit-content\",\n });\n } else if (iconSlot) {\n const marginPlacement = iconSlot === \"left-icon\" ? \"right\" : \"left\";\n setStyles(iconWrapper, {\n [`margin-${marginPlacement}`]: \"var(--ic-space-xs)\",\n });\n }\n\n iconWrapper.append(icon);\n }\n\n const badge = this.routerSlot.querySelector(\"ic-badge\");\n const label = this.routerSlot.textContent?.trim();\n\n if (badge) iconWrapper.append(badge);\n if (label) icTypography.textContent = label;\n\n this.routerSlot.textContent = \"\";\n\n if (iconSlot === \"right-icon\") {\n this.routerSlot.append(icTypography);\n this.routerSlot.append(iconWrapper);\n } else {\n this.routerSlot.append(iconWrapper);\n this.routerSlot.append(icTypography);\n }\n }\n };\n\n render() {\n const {\n ariaControlsId,\n ariaLabel,\n ariaOwnsId,\n buttonIdNum,\n describedById,\n disabled,\n download,\n dropdown,\n dropdownExpanded,\n form,\n formaction,\n formenctype,\n formmethod,\n formnovalidate,\n formtarget,\n fullWidth,\n handleClick,\n handleKeyDown,\n hasTooltip,\n href,\n hreflang,\n id,\n inheritedAttributes,\n isIconVariant,\n loading,\n monochrome,\n onBlur,\n onFocus,\n referrerpolicy,\n rel,\n size,\n target,\n theme,\n title,\n tooltipFixedPositioning,\n tooltipPlacement,\n transparentBackground,\n type,\n variant,\n } = this;\n\n const TagType = href ? \"a\" : \"button\";\n const buttonAttrs =\n TagType === \"button\"\n ? {\n type,\n disabled,\n form,\n formaction,\n formenctype,\n formmethod,\n formnovalidate,\n formtarget,\n }\n : {\n download: download !== false ? download : null,\n href,\n rel,\n target,\n referrerpolicy,\n hreflang,\n };\n\n const buttonId = hasTooltip\n ? `ic-button-with-tooltip-${id || buttonIdNum}`\n : undefined;\n\n const describedby = !hasTooltip ? describedById : `ic-tooltip-${buttonId}`;\n\n const hasLeftIcon = !!this.getSlottedIcon(\"left\");\n const hasRightIcon = !!this.getSlottedIcon(\"right\");\n\n const ButtonContent = () =>\n this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <TagType\n class=\"button\"\n tabindex={0}\n aria-disabled={loading || disabled ? \"true\" : null}\n aria-label={loading ? \"Loading\" : ariaLabel}\n aria-expanded={dropdown && `${dropdownExpanded}`}\n {...buttonAttrs}\n {...inheritedAttributes}\n onFocus={onFocus}\n onBlur={onBlur}\n ref={(el) => (this.buttonEl = el)}\n aria-describedby={describedby}\n part=\"button\"\n >\n {loading ? (\n <div class=\"loading-container\">\n <ic-loading-indicator\n type=\"linear\"\n monochrome={monochrome}\n theme={theme}\n ></ic-loading-indicator>\n </div>\n ) : (\n <Fragment>\n {(hasLeftIcon ||\n (!!this.getSlottedIcon(\"top\") && !hasRightIcon)) && (\n <div class=\"icon-container\">\n <slot name={`${hasLeftIcon ? \"left\" : \"top\"}-icon`} />\n </div>\n )}\n <slot />\n {!dropdown\n ? hasRightIcon && (\n <div class={{ \"icon-container\": true, \"right-icon\": true }}>\n <slot name=\"right-icon\" />\n </div>\n )\n : variant !== \"icon\" &&\n variant !== \"destructive\" && (\n <span\n class={\n dropdownExpanded\n ? \"dropdown-expanded\"\n : \"arrow-dropdown\"\n }\n innerHTML={arrowDropdown}\n />\n )}\n </Fragment>\n )}\n </TagType>\n );\n\n return (\n <Host\n class={{\n \"ic-button-disabled\": disabled && !loading,\n \"ic-button-full-width\": fullWidth,\n \"ic-button-loading\": loading,\n [`ic-button-size-${size}`]: true,\n [`ic-button-variant-${variant}`]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n background:\n (variant === \"secondary\" || variant === \"tertiary\") &&\n !transparentBackground &&\n !disabled,\n \"dropdown-no-icon\":\n dropdown &&\n !isSlotUsed(this.el, \"icon\") &&\n !isSlotUsed(this.el, \"left-icon\"),\n monochrome,\n \"top-icon\": isSlotUsed(this.el, \"top-icon\"),\n \"with-badge\": isSlotUsed(this.el, \"badge\"),\n }}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n aria-owns={ariaOwnsId}\n aria-controls={ariaControlsId}\n aria-expanded={dropdown && `${dropdownExpanded}`}\n >\n {hasTooltip && (\n <ic-tooltip\n id={describedby}\n label={title || ariaLabel}\n target={buttonId}\n placement={tooltipPlacement}\n fixedPositioning={tooltipFixedPositioning}\n silent={isIconVariant() && !!ariaLabel}\n >\n <ButtonContent />\n </ic-tooltip>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n {!hasTooltip && <ButtonContent />}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -150,19 +150,19 @@ export class CardVertical {
|
|
|
150
150
|
rel: rel,
|
|
151
151
|
target: target,
|
|
152
152
|
};
|
|
153
|
-
return (h(Host, { key: '
|
|
153
|
+
return (h(Host, { key: 'aeff3ef22b085acbf30dacb5d3ae0167451044b9', class: {
|
|
154
154
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
155
|
-
} }, h(Component, Object.assign({ key: '
|
|
155
|
+
} }, h(Component, Object.assign({ key: 'a451e5f53149283ee77878ccc3e699beae669f24', class: {
|
|
156
156
|
card: true,
|
|
157
157
|
clickable: !!clickable && !disabled,
|
|
158
158
|
disabled: !!disabled,
|
|
159
159
|
fullwidth: !!fullWidth,
|
|
160
160
|
focussed: isFocussed,
|
|
161
161
|
monochrome: monochrome,
|
|
162
|
-
}, tabindex: clickable && !parentIsAnchorTag ? 0 : undefined, "aria-disabled": disabled ? "true" : null, disabled: disabled }, attrs), isSlotUsed(this.el, "image-top") && (h("div", { key: '
|
|
162
|
+
}, tabindex: clickable && !parentIsAnchorTag ? 0 : undefined, "aria-disabled": disabled ? "true" : null, disabled: disabled }, attrs), isSlotUsed(this.el, "image-top") && (h("div", { key: '2ec35ab8d6e1224c0a393c92a72e403e4c5fc8fc', class: "image-top" }, h("slot", { key: 'c859ae1e242284b586df2ce7627c316021b8ef54', name: "image-top" }))), h("div", { key: '55f21501b3d95e1f5bf3a69542dab57d00379e63', class: "card-header" }, isSlotUsed(this.el, "icon") && (h("div", { key: 'f95e7224d6e8548f33a8861025a1651a3bc953a4', class: "icon" }, h("slot", { key: '1102f6f88e830613365cb0bfe3e5c4481b3a207e', name: "icon" }))), h("div", { key: '3122872ef284640debbf7182d36f9cd4c6032ae4', class: "card-title" }, h("slot", { key: 'f51213257b0ff6e195852ca006e9cba35103f210', name: "heading" }, h("ic-typography", { key: '7d82fce416b7579ac23e2154ef512bd8f3181bc3', variant: "h4" }, h("p", { key: 'ad083279b8f012f16d67c182c37bcc6383710ba5' }, heading)))), isSlotUsed(this.el, "interaction-button") && (h("div", { key: 'bb47af0b373f295cb1bcd1b72df6c325e257c2ed', class: "interaction-button" }, h("slot", { key: 'fd0fc056e51febf6d9abe76d7ffb0773836e52d3', name: "interaction-button" })))), (subheading || isSlotUsed(this.el, "subheading")) && (h("div", { key: '32851c6c59b9ee76aa490210f5888fe410067ca3', class: "subheading" }, h("slot", { key: '5757fd2fd2618f03fee208b855384c29861cadc6', name: "subheading" }, h("ic-typography", { key: '1f206ca1eaf0bcd5693abf3fc3f97303582a5deb', variant: "subtitle-small" }, subheading)))), isSlotUsed(this.el, "adornment") && (h("div", { key: 'ceef939617ce12be984f15673e9ef4e71110234c', class: "adornment" }, h("slot", { key: '127e2dfa77b74a19070e90361d26fe1358539ca2', name: "adornment" }))), isSlotUsed(this.el, "image-mid") && (h("div", { key: '0cbc0b6a9638969db6fabcde40ad46044afc4b88', class: "image-mid" }, h("slot", { key: '3e8ae6e25570ed03e7fea0ae4fdd7a779d3022b1', name: "image-mid" }))), (message || isSlotUsed(this.el, "message")) && (h("div", { key: '9da59f1aeaa1fcf4bc2a0aa1bd50d3f86faa2af7', class: "card-message" }, message && (h("ic-typography", { key: '4620229c479b782ad5ee0c8e3a7acdf6a8a70d7b', variant: "body" }, message)), isSlotUsed(this.el, "message") && h("slot", { key: '959e101cc933319cf297d0f0ebbd46299a24cbd5', name: "message" }))), (isSlotUsed(this.el, "interaction-controls") || expandable) && (h("div", { key: 'c4263a3d5f8e22f31cf0e55a868dbf0f52b00692', class: "interaction-area" }, h("div", { key: 'bd5e1d3ff137004ff5c696f611dae1bfefd26e1a', class: "interaction-controls" }, h("slot", { key: '5985495f8f12c825aafcab517d3add5f9741d460', name: "interaction-controls" })), expandable && (h("ic-tooltip", { key: 'e3b12f780303019b7f95ce5a98d7b7194c242c9a', id: "ic-tooltip-expand-button", label: "Toggle expandable area", silent: true }, h("button", { key: '9857a37a37571bd21f500527149ed8bc3806c4f4', class: {
|
|
163
163
|
"toggle-button": true,
|
|
164
164
|
[`toggle-button-${this.areaExpanded ? "expanded" : "closed"}`]: true,
|
|
165
|
-
}, "aria-label": "Toggle expandable area", "aria-expanded": `${this.areaExpanded}`, "aria-controls": this.areaExpanded ? "expanded-content-area" : null, onClick: this.toggleExpanded, innerHTML: chevronIcon }))))), isSlotUsed(this.el, "expanded-content") && this.areaExpanded && (h("div", { key: '
|
|
165
|
+
}, "aria-label": "Toggle expandable area", "aria-expanded": `${this.areaExpanded}`, "aria-controls": this.areaExpanded ? "expanded-content-area" : null, onClick: this.toggleExpanded, innerHTML: chevronIcon }))))), isSlotUsed(this.el, "expanded-content") && this.areaExpanded && (h("div", { key: '080d0198d37d939cfc506abc5933caac7eaa383d', class: "expanded-content", id: "expanded-content-area" }, h("slot", { key: '6c9b5dd6bfa46d466034255231047b2682e19f96', name: "expanded-content" }))), isSlotUsed(this.el, "badge") && h("slot", { key: '1f68304dd15e605320258bf8d14d2df3b0caf344', name: "badge" }))));
|
|
166
166
|
}
|
|
167
167
|
static get is() { return "ic-card-vertical"; }
|
|
168
168
|
static get encapsulation() { return "shadow"; }
|
|
@@ -106,17 +106,17 @@ export class Checkbox {
|
|
|
106
106
|
checked
|
|
107
107
|
? renderHiddenInput(el, value, name, disabled)
|
|
108
108
|
: removeHiddenInput(el);
|
|
109
|
-
return (h(Host, { key: '
|
|
109
|
+
return (h(Host, { key: '085faed0fb3d46c8903cc09959a1a04f36ac2eeb', class: {
|
|
110
110
|
"ic-checkbox-disabled": disabled,
|
|
111
111
|
[`ic-checkbox-${size}`]: !!size,
|
|
112
112
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
113
|
-
} }, h("div", { key: '
|
|
113
|
+
} }, h("div", { key: '20c07a9059a4fd3b1b59587771190dfd7ebf70fe', class: "container" }, displayIndeterminate ? (h("div", { class: "indeterminate-symbol" })) : (checked && (h("svg", { class: "checkmark", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "fill-rule": "evenodd", "clip-rule": "evenodd" }, h("title", null, "checkmark icon"), h("path", { d: "M21 6.285l-11.16 12.733-6.84-6.018 1.319-1.49 5.341 4.686 9.865-11.196 1.475 1.285z" })))), h("input", { key: '94f8a343a8d80a8ceb68f2cddc300c7c500deae7', role: "checkbox", class: {
|
|
114
114
|
checkbox: true,
|
|
115
115
|
checked,
|
|
116
116
|
indeterminate: displayIndeterminate,
|
|
117
|
-
}, ref: (el) => (this.checkboxEl = el), type: "checkbox", name: name, id: id, value: value, disabled: disabled, checked: checked, indeterminate: displayIndeterminate, onClick: handleClick, form: form, "aria-label": hideLabel ? label : undefined }), !hideLabel && (h("ic-typography", { key: '
|
|
117
|
+
}, ref: (el) => (this.checkboxEl = el), type: "checkbox", name: name, id: id, value: value, disabled: disabled, checked: checked, indeterminate: displayIndeterminate, onClick: handleClick, form: form, "aria-label": hideLabel ? label : undefined }), !hideLabel && (h("ic-typography", { key: 'b8b137c6cd0b1ee18ca44f8aa55c976b735b7af8', class: "checkbox-label", variant: "body" }, h("label", { key: '44976b751599275d613ff52a816133a896791912', htmlFor: id }, label)))), h("span", { key: 'e1e39b78d26a6d057c722794784b69b422197ff3', id: `${id}-additional-field-description`, role: "alert", class: "sr-only" }, isDynamicAdditionalField && checked ? dynamicText : ""), isSlotUsed(el, "additional-field") && (h("div", { key: '62457da0c99d40b8bbfb97d3b41f400ef1a22dd0', class: "dynamic-container", ref: (el) => (this.additionalFieldContainer = el) }, isDynamicAdditionalField && h("div", { key: '65a6a9deddeb2c2b11fe56273c2d3bc5391f696e', class: "branch-corner" }), h("div", { key: '3e920fd15f6cf506e793bc6386db140332ed390a', class: "dynamic-field-container" }, isDynamicAdditionalField && (h("ic-typography", { key: '0257c5f48fe33b49742d0a5bd50dac4c000a1f04', variant: "caption" }, h("p", { key: '24d8ebe43598283a5e5af287379f3b0f54e17d85', class: "dynamic-text" }, isDynamicAdditionalField && checked ? dynamicText : ""))), h("div", { key: '38bcc265ce747daad6577a244d2db6c7fbd6d22b', class: {
|
|
118
118
|
"additional-field-wrapper": !isDynamicAdditionalField,
|
|
119
|
-
} }, h("slot", { key: '
|
|
119
|
+
} }, h("slot", { key: '117707c0f26bb70c0c7d13e3d1a01c2120f0f948', name: "additional-field" })))))));
|
|
120
120
|
}
|
|
121
121
|
static get is() { return "ic-checkbox"; }
|
|
122
122
|
static get encapsulation() { return "shadow"; }
|
|
@@ -31,6 +31,10 @@ export class CheckboxGroup {
|
|
|
31
31
|
* 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.
|
|
32
32
|
*/
|
|
33
33
|
this.theme = "inherit";
|
|
34
|
+
/**
|
|
35
|
+
* The value of the `aria-live` attribute on the validation message.
|
|
36
|
+
*/
|
|
37
|
+
this.validationAriaLive = "polite";
|
|
34
38
|
/**
|
|
35
39
|
* The validation status - e.g. 'error' | 'warning' | 'success'.
|
|
36
40
|
*/
|
|
@@ -90,17 +94,17 @@ export class CheckboxGroup {
|
|
|
90
94
|
});
|
|
91
95
|
}
|
|
92
96
|
render() {
|
|
93
|
-
const { disabled, helperText, hideLabel, label, name, required, size, theme, validationStatus, validationText, } = this;
|
|
97
|
+
const { disabled, helperText, hideLabel, label, name, required, size, theme, validationAriaLive, validationStatus, validationText, } = this;
|
|
94
98
|
const describedBy = getInputDescribedByText(this.el, name, helperText !== "", validationStatus !== "");
|
|
95
99
|
const renderSRText = validationStatus === "error" || required || hideLabel;
|
|
96
100
|
const showValidation = hasValidationStatus(validationStatus, disabled);
|
|
97
|
-
return (h(Host, { key: '
|
|
101
|
+
return (h(Host, { key: '70cd72bffb83cca193e88bc0998023b71af960ca', class: {
|
|
98
102
|
"ic-checkbox-group-disabled": !!disabled,
|
|
99
103
|
[`ic-checkbox-group-${size}`]: true,
|
|
100
104
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
101
|
-
} }, renderSRText && (h("span", { key: '
|
|
105
|
+
} }, renderSRText && (h("span", { key: 'ac8a04312dcaa0dbcbd9b648710cc135625adb02', id: "screenReaderOnlyText", class: "screen-reader-only-text", "aria-hidden": "true" }, label, " ", validationStatus === "error" ? "invalid data " : null, " ", required ? "required" : null)), h("fieldset", { key: '93117da2e287c333ffce1aefb6ab32bf073166fd', id: name, "aria-labelledby": `${renderSRText ? "screenReaderOnlyText" : ""} ${describedBy}`.trim(), disabled: disabled }, !hideLabel && (h("legend", { key: '813906a6e7d3f1c2552a70a6c5c5748a07a6a2e2' }, h("ic-input-label", { key: 'f8cdf69d1eb1976395411cf0ed77727b4bd0718f', class: { [`${validationStatus}`]: true }, label: label, helperText: helperText, required: required, disabled: disabled, useLabelTag: false }, h("slot", { key: 'b525218ca3d7833b0aa877a97d70f82b36fa4aa7', name: "helper-text", slot: "helper-text" })))), h("div", { key: '6737cf436e1d061265864ff8c53e4b9f82913985', class: "checkboxes-container" }, h("slot", { key: 'fd176ba39c8dc894695467906e1971c01b770ad9' }))), h("ic-input-validation", { key: '5f7128afd7e50821dfa77973e08ab29d1edbb2fc', class: {
|
|
102
106
|
"show-validation": showValidation,
|
|
103
|
-
}, for: name, ariaLiveMode:
|
|
107
|
+
}, for: name, ariaLiveMode: validationAriaLive, status: showValidation ? validationStatus : "", message: showValidation ? validationText : "" })));
|
|
104
108
|
}
|
|
105
109
|
static get is() { return "ic-checkbox-group"; }
|
|
106
110
|
static get encapsulation() { return "shadow"; }
|
|
@@ -286,6 +290,32 @@ export class CheckboxGroup {
|
|
|
286
290
|
"reflect": false,
|
|
287
291
|
"defaultValue": "\"inherit\""
|
|
288
292
|
},
|
|
293
|
+
"validationAriaLive": {
|
|
294
|
+
"type": "string",
|
|
295
|
+
"mutable": false,
|
|
296
|
+
"complexType": {
|
|
297
|
+
"original": "IcAriaLive",
|
|
298
|
+
"resolved": "\"assertive\" | \"off\" | \"polite\"",
|
|
299
|
+
"references": {
|
|
300
|
+
"IcAriaLive": {
|
|
301
|
+
"location": "import",
|
|
302
|
+
"path": "../../utils/types",
|
|
303
|
+
"id": "src/utils/types.ts::IcAriaLive"
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"required": false,
|
|
308
|
+
"optional": false,
|
|
309
|
+
"docs": {
|
|
310
|
+
"tags": [],
|
|
311
|
+
"text": "The value of the `aria-live` attribute on the validation message."
|
|
312
|
+
},
|
|
313
|
+
"getter": false,
|
|
314
|
+
"setter": false,
|
|
315
|
+
"attribute": "validation-aria-live",
|
|
316
|
+
"reflect": false,
|
|
317
|
+
"defaultValue": "\"polite\""
|
|
318
|
+
},
|
|
289
319
|
"validationStatus": {
|
|
290
320
|
"type": "string",
|
|
291
321
|
"mutable": false,
|