@ukic/web-components 3.18.0 → 3.19.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/ic-button_3.cjs.entry.js +5 -5
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +12 -5
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-list.cjs.entry.js +4 -3
- package/dist/cjs/ic-data-list.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +2 -2
- package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-hero.cjs.entry.js +4 -4
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +5 -5
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +8 -8
- package/dist/cjs/ic-input-label_2.cjs.entry.js +5 -5
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- 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 +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +4 -4
- package/dist/cjs/ic-page-header.cjs.entry.js +6 -6
- package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination.cjs.entry.js +29 -4
- package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +4 -4
- package/dist/cjs/ic-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/ic-radio-option.cjs.entry.js +4 -4
- package/dist/cjs/ic-search-bar.cjs.entry.js +9 -9
- package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
- package/dist/cjs/ic-select.cjs.entry.js +6 -6
- package/dist/cjs/ic-side-navigation.cjs.entry.js +4 -4
- 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 +2 -2
- package/dist/cjs/ic-step.cjs.entry.js +13 -13
- package/dist/cjs/ic-stepper.cjs.entry.js +2 -2
- package/dist/cjs/ic-switch.cjs.entry.js +4 -4
- package/dist/cjs/ic-tab-context.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/ic-text-field.cjs.entry.js +5 -5
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +5 -5
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-toggle-button.cjs.entry.js +2 -2
- package/dist/cjs/ic-top-navigation.cjs.entry.js +5 -2
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.stories.js +1 -1
- package/dist/collection/components/ic-chip/ic-chip.css +12 -0
- package/dist/collection/components/ic-chip/ic-chip.js +31 -4
- package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
- package/dist/collection/components/ic-chip/ic-chip.stories.js +15 -0
- package/dist/collection/components/ic-data-list/ic-data-list.css +4 -0
- package/dist/collection/components/ic-data-list/ic-data-list.js +3 -2
- package/dist/collection/components/ic-data-list/ic-data-list.js.map +1 -1
- package/dist/collection/components/ic-data-row/ic-data-row.js +2 -2
- package/dist/collection/components/ic-dialog/ic-dialog.js +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.js +4 -4
- 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 +5 -4
- package/dist/collection/components/ic-input-validation/ic-input-validation.js.map +1 -1
- 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.js +5 -5
- package/dist/collection/components/ic-menu/ic-menu.js +3 -3
- package/dist/collection/components/ic-menu-group/ic-menu-group.js +1 -1
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +1 -1
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +4 -4
- package/dist/collection/components/ic-page-header/ic-page-header.js +6 -6
- package/dist/collection/components/ic-pagination/ic-pagination.js +35 -4
- package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
- 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 +6 -6
- 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.js +2 -2
- package/dist/collection/components/ic-step/ic-step.js +13 -13
- package/dist/collection/components/ic-stepper/ic-stepper.js +2 -2
- package/dist/collection/components/ic-switch/ic-switch.js +4 -4
- 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 +6 -5
- 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 +12 -1
- package/dist/collection/components/ic-theme/ic-theme.js +1 -1
- package/dist/collection/components/ic-toast/ic-toast.js +5 -5
- package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +2 -2
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +2 -2
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +5 -2
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-chip.js +13 -5
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-data-list.js +4 -3
- package/dist/components/ic-data-list.js.map +1 -1
- package/dist/components/ic-data-row.js +2 -2
- package/dist/components/ic-dialog.js +1 -1
- package/dist/components/ic-empty-state.js +2 -2
- package/dist/components/ic-footer-link.js +2 -2
- package/dist/components/ic-hero.js +4 -4
- package/dist/components/ic-horizontal-scroll2.js +5 -5
- package/dist/components/ic-input-component-container2.js +3 -3
- package/dist/components/ic-input-container2.js +2 -2
- package/dist/components/ic-input-label2.js +2 -2
- package/dist/components/ic-input-validation2.js +4 -4
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-layout-grid-item.js +2 -2
- package/dist/components/ic-layout-grid.js +2 -2
- package/dist/components/ic-link2.js +1 -1
- package/dist/components/ic-loading-indicator2.js +5 -5
- package/dist/components/ic-menu-group.js +1 -1
- package/dist/components/ic-menu2.js +3 -3
- package/dist/components/ic-navigation-group.js +1 -1
- package/dist/components/ic-navigation-menu2.js +4 -4
- package/dist/components/ic-page-header.js +6 -6
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +1 -1
- package/dist/components/ic-pagination.js +30 -5
- package/dist/components/ic-pagination.js.map +1 -1
- package/dist/components/ic-popover-menu.js +4 -4
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +4 -4
- package/dist/components/ic-radio-option.js +4 -4
- package/dist/components/ic-search-bar.js +9 -9
- package/dist/components/ic-section-container2.js +2 -2
- package/dist/components/ic-select.js +6 -6
- package/dist/components/ic-side-navigation.js +4 -4
- package/dist/components/ic-skeleton.js +2 -2
- package/dist/components/ic-skip-link.js +2 -2
- package/dist/components/ic-status-tag.js +2 -2
- package/dist/components/ic-step.js +13 -13
- package/dist/components/ic-stepper.js +2 -2
- package/dist/components/ic-switch.js +4 -4
- 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-text-field.js +5 -5
- package/dist/components/ic-text-field.js.map +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast-region.js +1 -1
- package/dist/components/ic-toast.js +5 -5
- package/dist/components/ic-toggle-button-group.js +2 -2
- package/dist/components/ic-toggle-button.js +2 -2
- package/dist/components/ic-top-navigation.js +5 -2
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/core/core.css +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-ed3aaa3a.entry.js → p-012e058a.entry.js} +3 -3
- package/dist/core/{p-6329ddcb.entry.js → p-0257d59e.entry.js} +2 -2
- package/dist/core/{p-d3223b89.entry.js → p-06b3ae40.entry.js} +2 -2
- package/dist/core/{p-f6bb691a.entry.js → p-091a7fbf.entry.js} +2 -2
- package/dist/core/{p-b4a2f6fa.entry.js → p-0eafbaa1.entry.js} +2 -2
- package/dist/core/p-0eafbaa1.entry.js.map +1 -0
- package/dist/core/{p-1ca4a5ed.entry.js → p-128e2cbb.entry.js} +2 -2
- package/dist/core/{p-af728534.entry.js → p-21efc36e.entry.js} +2 -2
- package/dist/core/{p-b9459ba2.entry.js → p-287e5c17.entry.js} +2 -2
- package/dist/core/{p-de630a9a.entry.js → p-28c9a6e4.entry.js} +2 -2
- package/dist/core/{p-f57729b8.entry.js → p-296a41ce.entry.js} +2 -2
- package/dist/core/p-34cc376c.entry.js +2 -0
- package/dist/core/p-34cc376c.entry.js.map +1 -0
- package/dist/core/{p-eca43f7d.entry.js → p-3b13d191.entry.js} +2 -2
- package/dist/core/{p-d376858f.entry.js → p-43356493.entry.js} +2 -2
- package/dist/core/{p-7dff646d.entry.js → p-44aaf454.entry.js} +2 -2
- package/dist/core/{p-f4e3bb5b.entry.js → p-44fbe8c2.entry.js} +2 -2
- package/dist/core/{p-a7583faf.entry.js → p-4637c326.entry.js} +2 -2
- package/dist/core/{p-049839cd.entry.js → p-4fa7fbc4.entry.js} +2 -2
- package/dist/core/{p-049839cd.entry.js.map → p-4fa7fbc4.entry.js.map} +1 -1
- package/dist/core/{p-2026f4fa.entry.js → p-52fa3eec.entry.js} +2 -2
- package/dist/core/{p-2026f4fa.entry.js.map → p-52fa3eec.entry.js.map} +1 -1
- package/dist/core/{p-9c52ee48.entry.js → p-539b975f.entry.js} +2 -2
- package/dist/core/{p-319e3d5b.entry.js → p-5cf704e3.entry.js} +2 -2
- package/dist/core/{p-5d2efd2d.entry.js → p-5e1a77aa.entry.js} +2 -2
- package/dist/core/{p-601d4e3f.entry.js → p-614953c5.entry.js} +2 -2
- package/dist/core/{p-a61fa6ad.entry.js → p-6b6c1491.entry.js} +2 -2
- package/dist/core/{p-1be17f22.entry.js → p-6e8ef73c.entry.js} +2 -2
- package/dist/core/{p-ae11583f.entry.js → p-6fb29846.entry.js} +2 -2
- package/dist/core/{p-e82d9a6f.entry.js → p-70e1dd4d.entry.js} +2 -2
- package/dist/core/{p-52c66bfe.entry.js → p-72ac8bb9.entry.js} +2 -2
- package/dist/core/{p-ffd0d9d1.entry.js → p-7552c8a1.entry.js} +2 -2
- package/dist/core/{p-a8e4258f.entry.js → p-8798cc6b.entry.js} +2 -2
- package/dist/core/p-8798cc6b.entry.js.map +1 -0
- package/dist/core/{p-ca82850f.entry.js → p-9452b9ac.entry.js} +2 -2
- package/dist/core/p-9452b9ac.entry.js.map +1 -0
- package/dist/core/p-a7645717.entry.js +2 -0
- package/dist/core/p-a7645717.entry.js.map +1 -0
- package/dist/core/{p-0648dd8e.entry.js → p-a86785dd.entry.js} +2 -2
- package/dist/core/{p-703f3de1.entry.js → p-a8dc3162.entry.js} +2 -2
- package/dist/core/{p-f7105cf9.entry.js → p-ad6632a9.entry.js} +2 -2
- package/dist/core/p-ae861bb8.entry.js +2 -0
- package/dist/core/{p-4631ac1b.entry.js → p-af02add9.entry.js} +2 -2
- package/dist/core/{p-9674b63f.entry.js → p-b00efb15.entry.js} +2 -2
- package/dist/core/{p-3238389a.entry.js → p-bb3a5130.entry.js} +2 -2
- package/dist/core/{p-a8310dfd.entry.js → p-bfd03fb4.entry.js} +2 -2
- package/dist/core/{p-67c3985d.entry.js → p-d8200098.entry.js} +2 -2
- package/dist/core/{p-6ed48c46.entry.js → p-dfc2a0b1.entry.js} +2 -2
- package/dist/core/{p-12c30491.entry.js → p-f4e2e41f.entry.js} +2 -2
- package/dist/core/{p-9ca147f3.entry.js → p-fb43abd6.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/ic-button_3.entry.js +5 -5
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +12 -5
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-data-list.entry.js +4 -3
- package/dist/esm/ic-data-list.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +2 -2
- package/dist/esm/ic-dialog.entry.js +1 -1
- package/dist/esm/ic-empty-state.entry.js +2 -2
- package/dist/esm/ic-footer-link.entry.js +2 -2
- package/dist/esm/ic-hero.entry.js +4 -4
- package/dist/esm/ic-horizontal-scroll.entry.js +5 -5
- package/dist/esm/ic-input-component-container_3.entry.js +8 -8
- package/dist/esm/ic-input-label_2.entry.js +6 -6
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- 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 +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +4 -4
- package/dist/esm/ic-page-header.entry.js +6 -6
- package/dist/esm/ic-pagination-item.entry.js +1 -1
- package/dist/esm/ic-pagination.entry.js +29 -4
- package/dist/esm/ic-pagination.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +4 -4
- package/dist/esm/ic-radio-group.entry.js +4 -4
- package/dist/esm/ic-radio-option.entry.js +4 -4
- package/dist/esm/ic-search-bar.entry.js +9 -9
- package/dist/esm/ic-section-container.entry.js +2 -2
- package/dist/esm/ic-select.entry.js +6 -6
- package/dist/esm/ic-side-navigation.entry.js +4 -4
- 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 +2 -2
- package/dist/esm/ic-step.entry.js +13 -13
- package/dist/esm/ic-stepper.entry.js +2 -2
- package/dist/esm/ic-switch.entry.js +4 -4
- package/dist/esm/ic-tab-context.entry.js +1 -1
- package/dist/esm/ic-tab-group.entry.js +2 -2
- package/dist/esm/ic-tab-panel.entry.js +2 -2
- package/dist/esm/ic-text-field.entry.js +5 -5
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast-region.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +5 -5
- package/dist/esm/ic-toggle-button-group.entry.js +2 -2
- package/dist/esm/ic-toggle-button.entry.js +2 -2
- package/dist/esm/ic-top-navigation.entry.js +5 -2
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-chip/ic-chip.d.ts +5 -0
- package/dist/types/components/ic-input-validation/ic-input-validation.d.ts +1 -0
- package/dist/types/components/ic-pagination/ic-pagination.d.ts +7 -0
- package/dist/types/components/ic-text-field/ic-text-field.d.ts +1 -0
- package/dist/types/components.d.ts +8 -0
- package/hydrate/index.js +185 -146
- package/hydrate/index.mjs +185 -146
- package/package.json +17 -23
- package/vscode-data.json +4 -0
- package/dist/core/p-177d3c2f.entry.js +0 -2
- package/dist/core/p-199c5ff6.entry.js +0 -2
- package/dist/core/p-199c5ff6.entry.js.map +0 -1
- package/dist/core/p-72e5eb70.entry.js +0 -2
- package/dist/core/p-72e5eb70.entry.js.map +0 -1
- package/dist/core/p-a8e4258f.entry.js.map +0 -1
- package/dist/core/p-b4a2f6fa.entry.js.map +0 -1
- package/dist/core/p-ca82850f.entry.js.map +0 -1
- /package/dist/core/{p-ed3aaa3a.entry.js.map → p-012e058a.entry.js.map} +0 -0
- /package/dist/core/{p-6329ddcb.entry.js.map → p-0257d59e.entry.js.map} +0 -0
- /package/dist/core/{p-d3223b89.entry.js.map → p-06b3ae40.entry.js.map} +0 -0
- /package/dist/core/{p-f6bb691a.entry.js.map → p-091a7fbf.entry.js.map} +0 -0
- /package/dist/core/{p-1ca4a5ed.entry.js.map → p-128e2cbb.entry.js.map} +0 -0
- /package/dist/core/{p-af728534.entry.js.map → p-21efc36e.entry.js.map} +0 -0
- /package/dist/core/{p-b9459ba2.entry.js.map → p-287e5c17.entry.js.map} +0 -0
- /package/dist/core/{p-de630a9a.entry.js.map → p-28c9a6e4.entry.js.map} +0 -0
- /package/dist/core/{p-f57729b8.entry.js.map → p-296a41ce.entry.js.map} +0 -0
- /package/dist/core/{p-eca43f7d.entry.js.map → p-3b13d191.entry.js.map} +0 -0
- /package/dist/core/{p-d376858f.entry.js.map → p-43356493.entry.js.map} +0 -0
- /package/dist/core/{p-7dff646d.entry.js.map → p-44aaf454.entry.js.map} +0 -0
- /package/dist/core/{p-f4e3bb5b.entry.js.map → p-44fbe8c2.entry.js.map} +0 -0
- /package/dist/core/{p-a7583faf.entry.js.map → p-4637c326.entry.js.map} +0 -0
- /package/dist/core/{p-9c52ee48.entry.js.map → p-539b975f.entry.js.map} +0 -0
- /package/dist/core/{p-319e3d5b.entry.js.map → p-5cf704e3.entry.js.map} +0 -0
- /package/dist/core/{p-5d2efd2d.entry.js.map → p-5e1a77aa.entry.js.map} +0 -0
- /package/dist/core/{p-601d4e3f.entry.js.map → p-614953c5.entry.js.map} +0 -0
- /package/dist/core/{p-a61fa6ad.entry.js.map → p-6b6c1491.entry.js.map} +0 -0
- /package/dist/core/{p-1be17f22.entry.js.map → p-6e8ef73c.entry.js.map} +0 -0
- /package/dist/core/{p-ae11583f.entry.js.map → p-6fb29846.entry.js.map} +0 -0
- /package/dist/core/{p-e82d9a6f.entry.js.map → p-70e1dd4d.entry.js.map} +0 -0
- /package/dist/core/{p-52c66bfe.entry.js.map → p-72ac8bb9.entry.js.map} +0 -0
- /package/dist/core/{p-ffd0d9d1.entry.js.map → p-7552c8a1.entry.js.map} +0 -0
- /package/dist/core/{p-0648dd8e.entry.js.map → p-a86785dd.entry.js.map} +0 -0
- /package/dist/core/{p-703f3de1.entry.js.map → p-a8dc3162.entry.js.map} +0 -0
- /package/dist/core/{p-f7105cf9.entry.js.map → p-ad6632a9.entry.js.map} +0 -0
- /package/dist/core/{p-177d3c2f.entry.js.map → p-ae861bb8.entry.js.map} +0 -0
- /package/dist/core/{p-4631ac1b.entry.js.map → p-af02add9.entry.js.map} +0 -0
- /package/dist/core/{p-9674b63f.entry.js.map → p-b00efb15.entry.js.map} +0 -0
- /package/dist/core/{p-3238389a.entry.js.map → p-bb3a5130.entry.js.map} +0 -0
- /package/dist/core/{p-a8310dfd.entry.js.map → p-bfd03fb4.entry.js.map} +0 -0
- /package/dist/core/{p-67c3985d.entry.js.map → p-d8200098.entry.js.map} +0 -0
- /package/dist/core/{p-6ed48c46.entry.js.map → p-dfc2a0b1.entry.js.map} +0 -0
- /package/dist/core/{p-12c30491.entry.js.map → p-f4e2e41f.entry.js.map} +0 -0
- /package/dist/core/{p-9ca147f3.entry.js.map → p-fb43abd6.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as t,f as i,h as a,H as s,g as r}from"./p-8e4e97b4.js";import{L as o,F as n,r as l,E as c,l as d,w as h,k as u,o as b,K as p,q as f,m,n as v,i as x}from"./p-a5658054.js";import{e as g,I as y}from"./p-bddf799a.js";const w='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--ic-input-label-helpertext-padding:var(--ic-space-xs);--border-color:var(--ic-text-field-border-neutral);--border-color-hover:var(--ic-text-field-border-neutral-hover);--border-color-pressed:var(--ic-text-field-border-neutral-pressed);--border-color-disabled:var(--ic-text-field-border-disabled);--border-color-error:var(--ic-text-field-border-error);--border-color-error-hover:var(--ic-text-field-border-error-hover);--border-color-error-pressed:var(--ic-text-field-border-error-pressed);--border-color-success:var(--ic-text-field-border-success);--border-color-success-hover:var(--ic-text-field-border-success-hover);--border-color-success-pressed:var(--ic-text-field-border-success-pressed);--border-color-warning:var(--ic-text-field-border-warning);--border-color-warning-hover:var(--ic-text-field-border-warning-hover);--border-color-warning-pressed:var(--ic-text-field-border-warning-pressed);--ic-input-label-text-color:var(--ic-text-field-label);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle);--ic-input-validation-status-text-color:var(--ic-text-field-state-text);--ic-input-validation-error:var(--ic-text-field-state-icon-error);--ic-input-validation-warning-icon-color:var(\n --ic-text-field-state-icon-warning\n );--ic-input-validation-success-icon-color:var(\n --ic-text-field-state-icon-success\n );--ic-input-component-container-success-icon-inline-color:var(\n --ic-text-field-state-icon-success\n )}:host(.ic-text-field-disabled){--ic-input-label-text-color:var(--ic-text-field-label-disabled);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle-disabled);--text-field-placeholder-color:var(\n --ic-text-field-text-area-placeholder-text-disabled\n )}:host(.ic-text-field-full-width){width:100%}::-moz-placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}::placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}input,textarea{border:0;border-radius:var(--ic-border-radius);color:var(--text-field-text-color, var(--ic-text-field-text));background-color:var(--input-bg-color, var(--ic-text-field-background));line-height:1.5rem;letter-spacing:0.005rem;width:100%;padding-right:var(--ic-space-xs);padding-left:var(--ic-space-xs);caret-color:var(\n --text-field-typing-cursor,\n var(--ic-text-field-typing-cursor)\n )}textarea{min-height:var(--ic-space-lg);resize:vertical;padding-top:0.375rem}input:focus,textarea:focus{border:0;outline:0}input:disabled,textarea:disabled{color:var(\n --text-field-disabled-text-color,\n var(--ic-text-field-text-disabled)\n )}input.readonly,textarea.readonly{color:var(--ic-text-field-read-only-input-text-internal);background:transparent}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type="number"]{-moz-appearance:textfield}textarea.no-resize{resize:none}.char-count-text{--ic-typography-color:var(--ic-text-field-character-limit);padding-right:var(--ic-space-xxxs)}:host(.ic-text-field-disabled) .char-count-text{--ic-typography-color:var(--ic-text-field-character-limit-disabled)}.no-left-pad{padding-left:0}::slotted([slot="icon"]){fill:var(--ic-text-field-text-disabled)}.has-value ::slotted([slot="icon"]){fill:var(--ic-text-field-input-internal-icon)}.char-count{margin-right:calc(-1 * var(--ic-space-xxxs))}.remaining-char-count-desc{position:absolute;left:-9999px}.show-validation{margin-top:var(--ic-space-xs)}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-results-button,input[type="search"]::-webkit-search-results-decoration{display:none}input[type="search"].truncate-value{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (forced-colors: active){input.readonly,textarea.readonly{color:canvastext}.has-value ::slotted([slot="icon"]){fill:currentcolor}}';const k=w;let z=0;const C=[...y,"title"];const $=class{constructor(a){e(this,a);this.getValidationText=t(this,"getValidationText",7);this.icBlur=t(this,"icBlur",7);this.icChange=t(this,"icChange",7);this.icFocus=t(this,"icFocus",7);this.icInput=t(this,"icInput",7);this.icKeydown=t(this,"icKeydown",7);this.icScroll=t(this,"icScroll",7);this.inheritedAttributes={};this.hostMutationObserver=null;this.numChars=0;this.maxCharactersReached=false;this.maxCharactersWarning=false;this.minCharactersUnattained=false;this.maxValueExceeded=false;this.minValueUnattained=false;this.isFocussed=false;this.autocapitalize="off";this.autocomplete="off";this.autocorrect="off";this.autofocus=false;this.disabled=false;this.fullWidth=false;this.helperText="";this.hideCharCount=false;this.hideLabel=false;this.hiddenInput=true;this.inputId=`ic-text-field-input-${z++}`;this.inputmode="text";this.maxCharacters=0;this.maxCharactersMessage=`Maximum input is ${this.maxCharacters} characters`;this.maxMessage=`Maximum value of ${this.max} exceeded`;this.minCharacters=0;this.minCharactersMessage=`Minimum input is ${this.minCharacters} characters`;this.minMessage=`Minimum value of ${this.min} not met`;this.name=this.inputId;this.placeholder="";this.readonly=false;this.required=false;this.resize=false;this.rows=1;this.size="medium";this.spellcheck=false;this.theme="inherit";this.truncateValue=false;this.type="text";this.validationAriaLive="default";this.validationInline=false;this.validationInlineInternal=false;this.validationStatus="";this.validationText="";this.debounce=0;this.value="";this.initialValue=this.value;this.checkChildHydration=()=>{var e,t;if(this.hideLabel||((t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector("ic-typography"))===null||t===void 0?void 0:t.classList.contains("hydrated"))){this.setFocus();clearInterval(this.interval)}};this.getNumberOfCharacters=e=>e!==null&&e!==undefined?e.length:0;this.getMaxValueExceeded=e=>{this.numChars=this.getNumberOfCharacters(e);if(this.type==="number"){this.minValueUnattained=!!e&&Number(e)<Number(this.min);this.maxValueExceeded=Number(e)>Number(this.max)}};this.getMaxCharactersReached=e=>{this.numChars=this.getNumberOfCharacters(e);this.maxCharactersReached=this.maxCharacters>0&&this.numChars>=this.maxCharacters;if(this.maxCharactersWarning&&!this.maxCharactersReached){this.maxCharactersWarning=false}};this.onInput=e=>{this.value=e.target.value;this.icInput.emit({value:this.value})};this.onBlur=e=>{const t=e.target;t.removeEventListener("wheel",this.onWheel);const{value:i}=t;this.numChars=i.length;this.minCharactersUnattained=this.minCharacters>0&&this.numChars<this.minCharacters;this.icBlur.emit({value:i});this.isFocussed=false};this.onFocus=e=>{const t=e.target;t.addEventListener("wheel",this.onWheel);this.icFocus.emit({value:t.value});this.isFocussed=true};this.onTextAreaScroll=()=>{this.icScroll.emit()};this.onWheel=e=>{const t=e.target;if(t.type==="number"){t.blur();setTimeout((()=>{t.focus()}),0)}};this.hasStatus=e=>e!==""&&!this.disabled;this.handleFormReset=()=>{this.value=this.initialValue};this.showValidationMargin=()=>{const e=this.readonly?0:this.maxCharacters;const t=o(this.validationStatus)||o(this.validationText);const i=this.minValueUnattained||this.maxValueExceeded;const a=e>0||this.minCharactersUnattained;return(!t||i||a)&&!this.validationInlineInternal};this.hostMutationCallback=e=>{let t=false;e.forEach((({attributeName:e,type:i,addedNodes:a,removedNodes:s})=>{if(e&&C.includes(e)){const i=this.el.getAttribute(e);if(i){this.inheritedAttributes[e]=i}t=true}else if(i==="childList"){t=n(a,s,"icon")}}));if(t){i(this)}}}watchDisabledHandler(){l(this.disabled,this.el)}debounceChanged(){this.icChange=c(this.icChange,this.debounce)}watchValueHandler(e){let t;if(this.maxCharacters>0){t=e.substring(0,this.maxCharacters);if(t.length<e.length){this.maxCharactersWarning=true}this.value=t}else{t=e}if(this.inputEl&&this.inputEl.value!==t){this.inputEl.value=t}this.getMaxValueExceeded(t);this.getMaxCharactersReached(t);this.icChange.emit({value:t})}connectedCallback(){this.debounceChanged()}disconnectedCallback(){var e;d(this.el,this.handleFormReset);(e=this.hostMutationObserver)===null||e===void 0?void 0:e.disconnect()}componentWillLoad(){if(this.value!==this.initialValue){this.watchValueHandler(this.value)}else if(this.maxCharacters>0){this.value=this.value.substring(0,this.maxCharacters)}this.getMaxValueExceeded(this.value);this.getMaxCharactersReached(this.value);this.inheritedAttributes=h(this.el,C);if(this.readonly){this.maxValueExceeded=false;this.minValueUnattained=false}u(this.el,this.handleFormReset);l(this.disabled,this.el)}componentDidLoad(){b([{prop:this.label,propName:"label"}],"Text Field");if(this.validationInlineInternal){this.getValidationText.emit({value:this.validationText})}this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{attributes:true,childList:true});if(this.autofocus&&!this.disabled&&!this.readonly){this.interval=setInterval(this.checkChildHydration,50)}}handleKeyDown(e){var t,i;this.icKeydown.emit({event:e,cursorPosition:(t=this.inputEl.selectionStart)!==null&&t!==void 0?t:0,selectionEnd:(i=this.inputEl.selectionEnd)!==null&&i!==void 0?i:0});if(!e.ctrlKey&&!g.includes(e.key)){this.maxCharactersWarning=this.maxCharactersReached}}async setFocus(){var e;(e=this.inputEl)===null||e===void 0?void 0:e.focus()}render(){const{inputId:e,name:t,label:i,required:r,size:o,placeholder:n,helperText:l,hideCharCount:c,rows:d,resize:h,disabled:u,value:b,min:g,max:y,numChars:w,readonly:k,maxCharacters:z,maxCharactersMessage:C,maxCharactersWarning:$,maxCharactersReached:I,maxMessage:M,minCharacters:L,minCharactersMessage:F,minCharactersUnattained:N,minMessage:T,minValueUnattained:j,maxValueExceeded:q,validationAriaLive:V,validationStatus:D,validationText:H,validationInline:W,validationInlineInternal:B,spellcheck:E,inputmode:O,fullWidth:S,truncateValue:A,hiddenInput:K,theme:U,hideLabel:_,type:P,autocapitalize:R,ariaActiveDescendant:G,inheritedAttributes:J,ariaExpanded:Q,ariaOwns:X,autocomplete:Y,role:Z,isFocussed:ee}=this;const te=this.el;const ie=k||u;const ae=q||j||N||$?$?p.Warning:p.Error:D;const se=$?C:q?M:j?T:N?F:H;const re=k?0:z;const oe=V==="default"?$||q||j||ae===p.Error?"assertive":"polite":V;const ne=this.hasStatus(ae)&&!(ae==p.Success&&W)&&!B;const le=d>1;const ce=z>0?`${e}-char-count-desc`:"";const de=re-w;const he=z>0?`${e}-remaining-char-count-desc`:"";const ue=`${de} character${de===1?"":"s"} remaining.`;const be=`${f(this.el,e,l!=="",ne)} ${ce} ${w>0?he:""}`.trim();const pe=ie&&!k;const fe=!!this.el.querySelector(`[slot="icon"]`)&&!pe;const me=`${ae===p.Error}`;K?m(this.el,b,t,ie):v(this.el);return a(s,{key:"4a38a5d8bd42f37b2ab1e9f3af485695b6185a8a",class:{"ic-text-field-full-width":S,"ic-text-field-disabled":ie,[`ic-theme-${U}`]:U!=="inherit"}},a("ic-input-container",{key:"a7da6f94bac334322b00b223cfb3462d026fbba1",readonly:k,disabled:ie},!_&&a("ic-input-label",{key:"97a5cc41a79cfc56c3e8e309154cbcc015bbadad",for:e,label:i,helperText:l,required:r,disabled:pe,readonly:k},a("slot",{key:"d9994cb1bb7218712bbed976057a3ca8d9ad3c2b",name:"helper-text",slot:"helper-text"})),a("ic-input-component-container",{key:"0d3a988b563b2f9f2033b52a75f4fd5e27056ba8",size:o,validationStatus:ae,multiLine:le,disabled:ie,readonly:k,validationInline:W,fullWidth:S},fe&&a("span",{key:"319fa22903ab0b2c2315377abb9f9e7bad15f221",class:{readonly:k,"has-value":this.getNumberOfCharacters(b)>0},slot:"left-icon"},a("slot",{key:"1224a807133d300df0a6070c998260ece29e8c80",name:"icon"})),!le?a("input",Object.assign({id:e,name:t,ref:e=>this.inputEl=e,type:P,min:g,max:y,value:b,class:{"no-left-pad":!fe&&k,readonly:k,"truncate-value":A},placeholder:n?n:"",required:r,disabled:ie,readonly:k,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":i,"aria-describedby":be,"aria-invalid":me,"aria-activedescendant":G,"aria-expanded":Q,"aria-owns":X,autocomplete:Y,autocapitalize:R,spellcheck:E,inputmode:O,role:Z||undefined,maxlength:I?z:undefined,minlength:N?L:undefined},J)):a("textarea",Object.assign({id:e,class:{"no-resize":h===false||!!k,"no-left-pad":!fe&&!!k,readonly:!!k},name:t,ref:e=>this.inputEl=e,value:b,rows:d,required:r,disabled:ie,placeholder:n,readonly:k,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,onScroll:this.onTextAreaScroll,"aria-label":i,"aria-describedby":be,"aria-invalid":me,autocomplete:Y,autocapitalize:R,spellcheck:E,inputmode:O,maxlength:I?z:undefined,minlength:N?L:undefined},J)),x(te,"clear-button")&&a("slot",{key:"e50c8194546e08898e7ef0ed4dd940a881ffd5c4",name:"clear-button"}),x(te,"search-submit-button")&&a("slot",{key:"e2ba7a0f555593f767ff1c93c4c58b71967da1a7",name:"search-submit-button"})),x(te,"menu")&&a("slot",{key:"7b22fe423951f0f38c5419ff3c35e9f32a72735d",name:"menu"}),a("ic-input-validation",{key:"85aec8ebd4633fa36585e3253e1cc8107c374495",class:{"show-validation":this.showValidationMargin()},status:this.hasStatus(ae)===false||ae===p.Success&&W||B?"":ae,message:ne?se:"",ariaLiveMode:oe,for:e,fullWidth:S},!k&&re>0&&a("div",{key:"f857927758c96f735592e7af679dba91c333fbf1",slot:"validation-message-adornment"},!c&&a("ic-typography",{key:"eed01e87433155c8311c5ef958145d484c65264a",variant:"caption",class:"char-count-text"},a("span",{key:"1752a0a453ed7dd28b909029f847330ffbff406c",class:"char-count"},w,"/",re)),a("span",{key:"cd708a611a6133a7cf3b892d8f83cbf592791907",class:"remaining-char-count-desc","aria-live":"polite",hidden:!ee,id:he},ue),a("span",{key:"ebe5600dece8662d9966667308e79872793b098c",hidden:true,id:ce},"Field can contain a maximum of ",re," characters.")))))}get el(){return r(this)}static get watchers(){return{disabled:["watchDisabledHandler"],debounce:["debounceChanged"],value:["watchValueHandler"]}}};$.style=k;export{$ as ic_text_field};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as t,f as i,h as a,H as s,g as r}from"./p-8e4e97b4.js";import{L as o,F as n,r as l,E as c,l as d,w as h,k as u,o as b,K as f,q as p,m,n as v,i as x}from"./p-a5658054.js";import{e as g,I as y}from"./p-bddf799a.js";const w='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--ic-input-label-helpertext-padding:var(--ic-space-xs);--border-color:var(--ic-text-field-border-neutral);--border-color-hover:var(--ic-text-field-border-neutral-hover);--border-color-pressed:var(--ic-text-field-border-neutral-pressed);--border-color-disabled:var(--ic-text-field-border-disabled);--border-color-error:var(--ic-text-field-border-error);--border-color-error-hover:var(--ic-text-field-border-error-hover);--border-color-error-pressed:var(--ic-text-field-border-error-pressed);--border-color-success:var(--ic-text-field-border-success);--border-color-success-hover:var(--ic-text-field-border-success-hover);--border-color-success-pressed:var(--ic-text-field-border-success-pressed);--border-color-warning:var(--ic-text-field-border-warning);--border-color-warning-hover:var(--ic-text-field-border-warning-hover);--border-color-warning-pressed:var(--ic-text-field-border-warning-pressed);--ic-input-label-text-color:var(--ic-text-field-label);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle);--ic-input-validation-status-text-color:var(--ic-text-field-state-text);--ic-input-validation-error:var(--ic-text-field-state-icon-error);--ic-input-validation-warning-icon-color:var(\n --ic-text-field-state-icon-warning\n );--ic-input-validation-success-icon-color:var(\n --ic-text-field-state-icon-success\n );--ic-input-component-container-success-icon-inline-color:var(\n --ic-text-field-state-icon-success\n )}:host(.ic-text-field-disabled){--ic-input-label-text-color:var(--ic-text-field-label-disabled);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle-disabled);--text-field-placeholder-color:var(\n --ic-text-field-text-area-placeholder-text-disabled\n )}:host(.ic-text-field-full-width){width:100%}::-moz-placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}::placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}input,textarea{border:0;border-radius:var(--ic-border-radius);color:var(--text-field-text-color, var(--ic-text-field-text));background-color:var(--input-bg-color, var(--ic-text-field-background));line-height:1.5rem;letter-spacing:0.005rem;width:100%;padding-right:var(--ic-space-xs);padding-left:var(--ic-space-xs);caret-color:var(\n --text-field-typing-cursor,\n var(--ic-text-field-typing-cursor)\n )}textarea{min-height:var(--ic-space-lg);resize:vertical;padding-top:0.375rem}input:focus,textarea:focus{border:0;outline:0}input:disabled,textarea:disabled{color:var(\n --text-field-disabled-text-color,\n var(--ic-text-field-text-disabled)\n )}input.readonly,textarea.readonly{color:var(--ic-text-field-read-only-input-text-internal);background:transparent}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type="number"]{-moz-appearance:textfield}textarea.no-resize{resize:none}.char-count-text{--ic-typography-color:var(--ic-text-field-character-limit);padding-right:var(--ic-space-xxxs)}:host(.ic-text-field-disabled) .char-count-text{--ic-typography-color:var(--ic-text-field-character-limit-disabled)}.no-left-pad{padding-left:0}::slotted([slot="icon"]){fill:var(--ic-text-field-text-disabled)}.has-value ::slotted([slot="icon"]){fill:var(--ic-text-field-input-internal-icon)}.char-count{margin-right:calc(-1 * var(--ic-space-xxxs))}.remaining-char-count-desc{position:absolute;left:-9999px}.show-validation{margin-top:var(--ic-space-xs)}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-results-button,input[type="search"]::-webkit-search-results-decoration{display:none}input[type="search"].truncate-value{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (forced-colors: active){input.readonly,textarea.readonly{color:canvastext}.has-value ::slotted([slot="icon"]){fill:currentcolor}}';const k=w;let z=0;const C=[...y,"title"];const $=class{constructor(a){e(this,a);this.getValidationText=t(this,"getValidationText",7);this.icBlur=t(this,"icBlur",7);this.icChange=t(this,"icChange",7);this.icFocus=t(this,"icFocus",7);this.icInput=t(this,"icInput",7);this.icKeydown=t(this,"icKeydown",7);this.icScroll=t(this,"icScroll",7);this.inheritedAttributes={};this.hostMutationObserver=null;this.numChars=0;this.maxCharactersReached=false;this.maxCharactersWarning=false;this.minCharactersUnattained=false;this.maxValueExceeded=false;this.minValueUnattained=false;this.isFocussed=false;this.autocapitalize="off";this.autocomplete="off";this.autocorrect="off";this.autofocus=false;this.disabled=false;this.fullWidth=false;this.helperText="";this.hideCharCount=false;this.hideLabel=false;this.hiddenInput=true;this.inputId=`ic-text-field-input-${z++}`;this.inputmode="text";this.maxCharacters=0;this.maxCharactersMessage=`Maximum input is ${this.maxCharacters} characters`;this.maxMessage=`Maximum value of ${this.max} exceeded`;this.minCharacters=0;this.minCharactersMessage=`Minimum input is ${this.minCharacters} characters`;this.minMessage=`Minimum value of ${this.min} not met`;this.name=this.inputId;this.placeholder="";this.readonly=false;this.required=false;this.resize=false;this.rows=1;this.size="medium";this.spellcheck=false;this.theme="inherit";this.truncateValue=false;this.type="text";this.validationAriaLive="default";this.validationInline=false;this.validationInlineInternal=false;this.validationStatus="";this.validationText="";this.debounce=0;this.value="";this.initialValue=this.value;this.checkChildHydration=()=>{var e,t;if(this.hideLabel||((t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector("ic-typography"))===null||t===void 0?void 0:t.classList.contains("hydrated"))){this.setFocus();clearInterval(this.interval)}};this.getNumberOfCharacters=e=>e!==null&&e!==undefined?e.length:0;this.getMaxValueExceeded=e=>{this.numChars=this.getNumberOfCharacters(e);if(this.type==="number"){this.minValueUnattained=!!e&&Number(e)<Number(this.min);this.maxValueExceeded=Number(e)>Number(this.max)}};this.getMaxCharactersReached=e=>{this.numChars=this.getNumberOfCharacters(e);this.maxCharactersReached=this.maxCharacters>0&&this.numChars>=this.maxCharacters;if(this.maxCharactersWarning&&!this.maxCharactersReached){this.maxCharactersWarning=false}};this.onInput=e=>{this.value=e.target.value;this.icInput.emit({value:this.value})};this.onBlur=e=>{const t=e.target;t.removeEventListener("wheel",this.onWheel);const{value:i}=t;this.numChars=i.length;this.minCharactersUnattained=this.minCharacters>0&&this.numChars<this.minCharacters;this.icBlur.emit({value:i});this.isFocussed=false};this.onFocus=e=>{const t=e.target;t.addEventListener("wheel",this.onWheel);this.icFocus.emit({value:t.value});this.isFocussed=true};this.onTextAreaScroll=()=>{this.icScroll.emit()};this.onWheel=e=>{const t=e.target;if(t.type==="number"){t.blur();setTimeout((()=>{t.focus()}),0)}};this.hasStatus=e=>e!==""&&!this.disabled;this.handleFormReset=()=>{this.value=this.initialValue};this.showValidationMargin=()=>{const e=this.readonly?0:this.maxCharacters;const t=o(this.validationStatus)||o(this.validationText);const i=this.minValueUnattained||this.maxValueExceeded;const a=e>0||this.minCharactersUnattained;return(!t||i||a)&&!this.validationInlineInternal};this.hostMutationCallback=e=>{let t=false;e.forEach((({attributeName:e,type:i,addedNodes:a,removedNodes:s})=>{if(e&&C.includes(e)){const i=this.el.getAttribute(e);if(i){this.inheritedAttributes[e]=i}t=true}else if(i==="childList"){t=n(a,s,"icon")}}));if(t){i(this)}}}watchDisabledHandler(){l(this.disabled,this.el)}debounceChanged(){this.icChange=c(this.icChange,this.debounce)}watchValueHandler(e){let t;if(this.maxCharacters>0){t=e.substring(0,this.maxCharacters);if(t.length<e.length){this.maxCharactersWarning=true}this.value=t}else{t=e}if(this.inputEl&&this.inputEl.value!==t){this.inputEl.value=t}this.getMaxValueExceeded(t);this.getMaxCharactersReached(t);this.icChange.emit({value:t})}connectedCallback(){this.debounceChanged()}disconnectedCallback(){var e;d(this.el,this.handleFormReset);(e=this.hostMutationObserver)===null||e===void 0?void 0:e.disconnect()}componentWillLoad(){if(this.value!==this.initialValue){this.watchValueHandler(this.value)}else if(this.maxCharacters>0){this.value=this.value.substring(0,this.maxCharacters)}this.getMaxValueExceeded(this.value);this.getMaxCharactersReached(this.value);this.inheritedAttributes=h(this.el,C);if(this.readonly){this.maxValueExceeded=false;this.minValueUnattained=false}u(this.el,this.handleFormReset);l(this.disabled,this.el)}componentDidLoad(){b([{prop:this.label,propName:"label"}],"Text Field");if(this.validationInlineInternal){this.getValidationText.emit({value:this.validationText})}this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{attributes:true,childList:true});if(this.autofocus&&!this.disabled&&!this.readonly){this.interval=setInterval(this.checkChildHydration,50)}}handleKeyDown(e){var t,i;this.icKeydown.emit({event:e,cursorPosition:(t=this.inputEl.selectionStart)!==null&&t!==void 0?t:0,selectionEnd:(i=this.inputEl.selectionEnd)!==null&&i!==void 0?i:0});if(!e.ctrlKey&&!g.includes(e.key)){this.maxCharactersWarning=this.maxCharactersReached}}async setFocus(){var e;(e=this.inputEl)===null||e===void 0?void 0:e.focus()}render(){const{inputId:e,name:t,label:i,required:r,size:o,placeholder:n,helperText:l,hideCharCount:c,rows:d,resize:h,disabled:u,value:b,min:g,max:y,numChars:w,readonly:k,maxCharacters:z,maxCharactersMessage:C,maxCharactersWarning:$,maxCharactersReached:I,maxMessage:M,minCharacters:L,minCharactersMessage:F,minCharactersUnattained:N,minMessage:T,minValueUnattained:j,maxValueExceeded:q,validationAriaLive:V,validationStatus:D,validationText:H,validationInline:W,validationInlineInternal:B,spellcheck:E,inputmode:O,fullWidth:S,truncateValue:A,hiddenInput:K,theme:U,hideLabel:_,type:P,autocapitalize:R,ariaActiveDescendant:G,inheritedAttributes:J,ariaExpanded:Q,ariaOwns:X,autocomplete:Y,role:Z,isFocussed:ee}=this;const te=this.el;const ie=k||u;const ae=q||j||N||$?$?f.Warning:f.Error:D;const se=$?C:q?M:j?T:N?F:H;const re=k?0:z;const oe=V==="default"?$||q||j||ae===f.Error?"assertive":"polite":V;const ne=this.hasStatus(ae)&&!(ae==f.Success&&W)&&!B;const le=d>1;const ce=z>0?`${e}-char-count-desc`:"";const de=re-w;const he=z>0?`${e}-remaining-char-count-desc`:"";const ue=`${de} character${de===1?"":"s"} remaining.`;const be=`${p(this.el,e,l!=="",ne)} ${ce} ${w>0?he:""}`.trim();const fe=ie&&!k;const pe=!!this.el.querySelector(`[slot="icon"]`)&&!fe;const me=`${ae===f.Error}`;K?m(this.el,b,t,ie):v(this.el);return a(s,{key:"a098007f75d3bf05058679006000a305447a3f97",class:{"ic-text-field-full-width":S,"ic-text-field-disabled":ie,[`ic-theme-${U}`]:U!=="inherit"}},a("ic-input-container",{key:"a75383406081d9f9dd9bf83b794713c8a8c33eff",readonly:k,disabled:ie},!_&&a("ic-input-label",{key:"5e145b4a2b71e47d8a9600571666e8b18a1973bd",for:e,label:i,helperText:l,required:r,disabled:fe,readonly:k},a("slot",{key:"fbde0ccff51839c9e8604b49ef2e5a0e42513f09",name:"helper-text",slot:"helper-text"})),a("ic-input-component-container",{key:"217ca703c97abad8551a4598ed33dee4af0a1ee3",size:o,validationStatus:ae,multiLine:le,disabled:ie,readonly:k,validationInline:W,fullWidth:S},pe&&a("span",{key:"c76c20299561c6112ec484b8197bcf681584115d",class:{readonly:k,"has-value":this.getNumberOfCharacters(b)>0},slot:"left-icon"},a("slot",{key:"171169b5eb33513fda471e8de18a20c0ae040936",name:"icon"})),!le?a("input",Object.assign({id:e,name:t,ref:e=>this.inputEl=e,type:P,min:g,max:y,value:b,class:{"no-left-pad":!pe&&k,readonly:k,"truncate-value":A},placeholder:n?n:"",required:r,disabled:ie,readonly:k,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":i,"aria-describedby":be,"aria-invalid":me,"aria-activedescendant":G,"aria-expanded":Q,"aria-owns":X,autocomplete:Y,autocapitalize:R,spellcheck:E,inputmode:O,role:Z||undefined,maxlength:I?z:undefined,minlength:N?L:undefined},J)):a("textarea",Object.assign({id:e,class:{"no-resize":h===false||!!k,"no-left-pad":!pe&&!!k,readonly:!!k},name:t,ref:e=>this.inputEl=e,value:b,rows:d,required:r,disabled:ie,placeholder:n,readonly:k,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,onScroll:this.onTextAreaScroll,"aria-label":i,"aria-describedby":be,"aria-invalid":me,autocomplete:Y,autocapitalize:R,spellcheck:E,inputmode:O,maxlength:I?z:undefined,minlength:N?L:undefined},J)),x(te,"clear-button")&&a("slot",{key:"79c4833270e9e5d2ba5b235267f1f0e50195163d",name:"clear-button"}),x(te,"search-submit-button")&&a("slot",{key:"a3db17f9b067f54fcc4ddc4a47a7d794a7b627cb",name:"search-submit-button"})),x(te,"menu")&&a("slot",{key:"f9750f4141ff93b1a58401afc7bef74ded33b11f",name:"menu"}),a("ic-input-validation",{key:"d582922b6f50b5bf776f1a7b31fa743fbf2e97ca",class:{"show-validation":this.showValidationMargin()},status:this.hasStatus(ae)===false||ae===f.Success&&W||B?"":ae,message:ne?se:"",ariaLiveMode:oe,for:e,fullWidth:S},x(te,"validation-text")&&a("slot",{key:"80fa88be4c45ce4355da0d1d62adae0dd56b021d",name:"validation-text",slot:"validation-message"}),!k&&re>0&&a("div",{key:"575559f310a0cf1b953f9423efdaaa4a00ea1b94",slot:"validation-message-adornment"},!c&&a("ic-typography",{key:"b98ae8945e4528c5df4f100cd10359781b19f4b4",variant:"caption",class:"char-count-text"},a("span",{key:"9e70d0c79c6a69fcb08182487a612b55c493b37e",class:"char-count"},w,"/",re)),a("span",{key:"a598443cda020214b8d60285c1843ff47f40fda8",class:"remaining-char-count-desc","aria-live":"polite",hidden:!ee,id:he},ue),a("span",{key:"a1d6085adef0f94c8fbb8f85f0e5cff4d1f0eae9",hidden:true,id:ce},"Field can contain a maximum of ",re," characters.")))))}get el(){return r(this)}static get watchers(){return{disabled:["watchDisabledHandler"],debounce:["debounceChanged"],value:["watchValueHandler"]}}};$.style=k;export{$ as ic_text_field};
|
|
2
|
+
//# sourceMappingURL=p-8798cc6b.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["icTextFieldCss","IcTextFieldStyle0","inputIds","MUTABLE_ATTRIBUTES","IC_INHERITED_ARIA","TextField","constructor","hostRef","this","inheritedAttributes","hostMutationObserver","numChars","maxCharactersReached","maxCharactersWarning","minCharactersUnattained","maxValueExceeded","minValueUnattained","isFocussed","autocapitalize","autocomplete","autocorrect","autofocus","disabled","fullWidth","helperText","hideCharCount","hideLabel","hiddenInput","inputId","inputmode","maxCharacters","maxCharactersMessage","maxMessage","max","minCharacters","minCharactersMessage","minMessage","min","name","placeholder","readonly","required","resize","rows","size","spellcheck","theme","truncateValue","type","validationAriaLive","validationInline","validationInlineInternal","validationStatus","validationText","debounce","value","initialValue","checkChildHydration","_b","_a","el","shadowRoot","querySelector","classList","contains","setFocus","clearInterval","interval","getNumberOfCharacters","undefined","length","getMaxValueExceeded","Number","getMaxCharactersReached","onInput","ev","target","icInput","emit","onBlur","removeEventListener","onWheel","icBlur","onFocus","addEventListener","icFocus","onTextAreaScroll","icScroll","blur","setTimeout","focus","hasStatus","status","handleFormReset","showValidationMargin","maxNumChars","emptyString","isEmptyString","valueOutsideRange","charsOutsideRange","hostMutationCallback","mutationList","forceComponentUpdate","forEach","attributeName","addedNodes","removedNodes","includes","attribute","getAttribute","checkSlotInChildMutations","forceUpdate","watchDisabledHandler","removeDisabledFalse","debounceChanged","icChange","debounceEvent","watchValueHandler","newValue","substring","inputEl","connectedCallback","disconnectedCallback","removeFormResetListener","disconnect","componentWillLoad","inheritAttributes","addFormResetListener","componentDidLoad","onComponentRequiredPropUndefined","prop","label","propName","getValidationText","MutationObserver","observe","attributes","childList","setInterval","handleKeyDown","icKeydown","event","cursorPosition","selectionStart","selectionEnd","ctrlKey","IGNORED_KEYBOARD_CHARACTERS","key","render","ariaActiveDescendant","ariaExpanded","ariaOwns","role","disabledMode","currentStatus","IcInformationStatus","Warning","Error","currentValidationText","messageAriaLive","showStatusText","Success","multiline","hiddenCharCountDescId","charsRemaining","remainingCharCountDescId","remainingCharCountDesc","describedBy","getInputDescribedByText","trim","disabledText","showLeftIcon","invalid","renderHiddenInput","removeHiddenInput","h","Host","class","for","slot","multiLine","Object","assign","id","ref","maxlength","minlength","onScroll","isSlotUsed","message","ariaLiveMode","variant","hidden"],"sources":["src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","src/components/ic-text-field/ic-text-field.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field\n */\n display: block;\n\n --ic-input-label-helpertext-padding: var(--ic-space-xs);\n --border-color: var(--ic-text-field-border-neutral);\n --border-color-hover: var(--ic-text-field-border-neutral-hover);\n --border-color-pressed: var(--ic-text-field-border-neutral-pressed);\n --border-color-disabled: var(--ic-text-field-border-disabled);\n --border-color-error: var(--ic-text-field-border-error);\n --border-color-error-hover: var(--ic-text-field-border-error-hover);\n --border-color-error-pressed: var(--ic-text-field-border-error-pressed);\n --border-color-success: var(--ic-text-field-border-success);\n --border-color-success-hover: var(--ic-text-field-border-success-hover);\n --border-color-success-pressed: var(--ic-text-field-border-success-pressed);\n --border-color-warning: var(--ic-text-field-border-warning);\n --border-color-warning-hover: var(--ic-text-field-border-warning-hover);\n --border-color-warning-pressed: var(--ic-text-field-border-warning-pressed);\n --ic-input-label-text-color: var(--ic-text-field-label);\n --ic-input-label-helper-text-color: var(--ic-text-field-subtitle);\n --ic-input-validation-status-text-color: var(--ic-text-field-state-text);\n --ic-input-validation-error: var(--ic-text-field-state-icon-error);\n --ic-input-validation-warning-icon-color: var(\n --ic-text-field-state-icon-warning\n );\n --ic-input-validation-success-icon-color: var(\n --ic-text-field-state-icon-success\n );\n --ic-input-component-container-success-icon-inline-color: var(\n --ic-text-field-state-icon-success\n );\n}\n\n:host(.ic-text-field-disabled) {\n --ic-input-label-text-color: var(--ic-text-field-label-disabled);\n --ic-input-label-helper-text-color: var(--ic-text-field-subtitle-disabled);\n --text-field-placeholder-color: var(\n --ic-text-field-text-area-placeholder-text-disabled\n );\n}\n\n:host(.ic-text-field-full-width) {\n width: 100%;\n}\n\n::placeholder {\n color: var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n color: var(--text-field-text-color, var(--ic-text-field-text));\n background-color: var(--input-bg-color, var(--ic-text-field-background));\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n caret-color: var(\n --text-field-typing-cursor,\n var(--ic-text-field-typing-cursor)\n );\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 0.375rem;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(\n --text-field-disabled-text-color,\n var(--ic-text-field-text-disabled)\n );\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-text-field-read-only-input-text-internal);\n background: transparent;\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.char-count-text {\n --ic-typography-color: var(--ic-text-field-character-limit);\n\n padding-right: var(--ic-space-xxxs);\n}\n\n:host(.ic-text-field-disabled) .char-count-text {\n --ic-typography-color: var(--ic-text-field-character-limit-disabled);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-text-field-text-disabled);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-text-field-input-internal-icon);\n}\n\n.char-count {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\n.remaining-char-count-desc {\n position: absolute;\n left: -9999px;\n}\n\n.show-validation {\n margin-top: var(--ic-space-xs);\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n forceUpdate,\n} from \"@stencil/core\";\nimport {\n IcInformationStatus,\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n IcSizesNoLarge,\n IcThemeMode,\n IcValidationAriaLive,\n} from \"../../utils/types\";\nimport {\n inheritAttributes,\n debounceEvent,\n getInputDescribedByText,\n renderHiddenInput,\n isEmptyString,\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n isSlotUsed,\n removeDisabledFalse,\n checkSlotInChildMutations,\n removeHiddenInput,\n} from \"../../utils/helpers\";\nimport {\n IC_INHERITED_ARIA,\n IGNORED_KEYBOARD_CHARACTERS,\n} from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldKeydownEventDetail,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"title\"];\n\n/**\n * @slot helper-text - Content is set as the helper text for the text field.\n * @slot validation-text - Content is set as validation text for the text field.\n * @slot icon - Content will be placed to the left of the text input.\n */\n@Component({\n tag: \"ic-text-field\",\n styleUrl: \"ic-text-field.css\",\n shadow: true,\n})\nexport class TextField {\n private inheritedAttributes: { [k: string]: string } = {};\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\n private hostMutationObserver: MutationObserver | null = null;\n private interval: ReturnType<typeof setInterval>;\n\n @Element() el: HTMLIcTextFieldElement;\n\n @State() numChars: number = 0;\n @State() maxCharactersReached: boolean = false;\n @State() maxCharactersWarning: boolean = false;\n @State() minCharactersUnattained: boolean = false;\n @State() maxValueExceeded: boolean = false;\n @State() minValueUnattained: boolean = false;\n @State() isFocussed: boolean = false;\n\n /**\n * @slot clear-button - an ic-button clear component will render as an end adornment to the input.\n * @slot search-submit-button - an ic-button search submit component will render as an end adornment to the input.\n * @slot menu - an ic-menu component will appear below the input.\n */\n\n /**\n * @internal The active element when focus is on the ic-menu items.\n */\n @Prop() ariaActiveDescendant?: string;\n\n /**\n * @internal Used to identify whether inputting any text triggers more predictions\n */\n @Prop() ariaAutocomplete?: IcAriaAutocompleteTypes;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string | null;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwns?: string;\n\n /**\n * The automatic capitalisation of the text value as it is entered/edited by the user.\n * Available options: \"off\", \"none\", \"on\", \"sentences\", \"words\", \"characters\".\n */\n @Prop() autocapitalize = \"off\";\n\n /**\n * The state of autocompletion the browser can apply on the text value.\n */\n @Prop() autocomplete?: IcAutocompleteTypes = \"off\";\n\n /**\n * The state of autocorrection the browser can apply when the user is entering/editing the text value.\n */\n @Prop() autocorrect?: IcAutocorrectStates = \"off\";\n\n /**\n * If `true`, the form control will have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el as HTMLElement);\n }\n\n /**\n * Specify whether the text field fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n @Prop() fullWidth = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText = \"\";\n\n /**\n * If `true`, the character count which is displayed when `maxCharacters` is set will be visually hidden.\n */\n @Prop() hideCharCount = false;\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel = false;\n\n /**\n * @internal If `true`, the hidden form input will stop rendering for form submission.\n */\n @Prop() hiddenInput = true;\n\n /**\n * The ID for the input.\n */\n @Prop() inputId = `ic-text-field-input-${inputIds++}`;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode: IcTextFieldInputModes = \"text\";\n\n /**\n * The label for the input.\n */\n @Prop() label!: string;\n\n /**\n * The maximum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of max value in `helperText` or `label`)\n */\n @Prop() max?: string | number;\n\n /**\n * The count of characters in the field. Will display a warning if the bound is reached. (NOTE: If the value of the text field has been set using the `value` prop, it will be truncated to this number of characters)\n */\n @Prop() maxCharacters = 0;\n\n /**\n * The text to display as the warning message when the maximum number of characters (the `maxCharacters` prop value) is reached.\n */\n // prettier-ignore\n @Prop() maxCharactersMessage = `Maximum input is ${this.maxCharacters} characters`;\n\n /**\n * The text to display as the error message when the maximum value (the `max` prop value) has been exceeded.\n */\n @Prop() maxMessage = `Maximum value of ${this.max} exceeded`;\n\n /**\n * The minimum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of min value in `helperText` or `label`)\n */\n @Prop() min?: string | number;\n\n /**\n * The minimum number of characters that can be entered in the field.\n */\n @Prop() minCharacters = 0;\n\n /**\n * The text to display as the error message when the minimum number of characters (the `minCharacters` prop value) has not been met.\n */\n // prettier-ignore\n @Prop() minCharactersMessage = `Minimum input is ${this.minCharacters} characters`;\n\n /**\n * The text to display as the error message when the minimum value (the `min` prop value) has not been met.\n */\n @Prop() minMessage = `Minimum value of ${this.min} not met`;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name = this.inputId;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder = \"\";\n\n /**\n * If `true`, the read only state will be set.\n */\n @Prop({ reflect: true }) readonly = false;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the multiline text area will be resizeable.\n */\n @Prop() resize = false;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string | null;\n\n /**\n * The number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows = 1;\n\n /**\n * The size of the text field component.\n */\n @Prop() size: IcSizesNoLarge = \"medium\";\n\n /**\n * If `true`, the value of the text field will have its spelling and grammar checked.\n */\n @Prop() spellcheck = false;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme: IcThemeMode = \"inherit\";\n\n /**\n * @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.\n */\n @Prop() truncateValue = false;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * The value of the `aria-live` attribute on the validation message. When set to \"default\", the `aria-live` value will be handled automatically, e.g. \"assertive\" for `validation-status=\"error\"`.\n */\n @Prop() validationAriaLive: IcValidationAriaLive = \"default\";\n\n /**\n * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.\n */\n @Prop() validationInline = false;\n\n /**\n * @internal If `true`, the validation will display inline.\n */\n @Prop() validationInlineInternal = false;\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The text to display as the validation message.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n @Watch(\"debounce\")\n private debounceChanged() {\n this.icChange = debounceEvent(this.icChange, this.debounce);\n }\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value = \"\";\n @State() initialValue = this.value;\n @Watch(\"value\")\n private watchValueHandler(newValue: string): void {\n let value;\n\n if (this.maxCharacters > 0) {\n value = newValue.substring(0, this.maxCharacters);\n if (value.length < newValue.length) {\n this.maxCharactersWarning = true;\n }\n this.value = value;\n } else {\n value = newValue;\n }\n\n if (this.inputEl && this.inputEl.value !== value) {\n this.inputEl.value = value;\n }\n\n this.getMaxValueExceeded(value);\n\n this.getMaxCharactersReached(value);\n\n this.icChange.emit({ value });\n }\n\n /**\n * @internal Emitted when the validationInlineInternal is `true`\n */\n @Event() getValidationText: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input loses focus.\n */\n @Event() icBlur: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input gains focus.\n */\n @Event() icFocus: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keydown event occurred.\n */\n @Event() icKeydown: EventEmitter<IcTextFieldKeydownEventDetail>;\n\n /**\n * Emitted when the textarea variant is scrolled.\n */\n @Event() icScroll: EventEmitter;\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el as HTMLElement, this.handleFormReset);\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n if (this.value !== this.initialValue) {\n this.watchValueHandler(this.value);\n } else if (this.maxCharacters > 0) {\n this.value = this.value.substring(0, this.maxCharacters);\n }\n\n this.getMaxValueExceeded(this.value);\n this.getMaxCharactersReached(this.value);\n\n this.inheritedAttributes = inheritAttributes(\n this.el as HTMLElement,\n MUTABLE_ATTRIBUTES\n );\n\n if (this.readonly) {\n this.maxValueExceeded = false;\n this.minValueUnattained = false;\n }\n\n addFormResetListener(this.el as HTMLElement, this.handleFormReset);\n\n removeDisabledFalse(this.disabled, this.el as HTMLElement);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Text Field\"\n );\n if (this.validationInlineInternal) {\n this.getValidationText.emit({ value: this.validationText });\n }\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n childList: true,\n });\n\n if (this.autofocus && !this.disabled && !this.readonly) {\n this.interval = setInterval(this.checkChildHydration, 50);\n }\n }\n\n private checkChildHydration = () => {\n if (\n this.hideLabel ||\n this.el.shadowRoot\n ?.querySelector(\"ic-typography\")\n ?.classList.contains(\"hydrated\")\n ) {\n this.setFocus();\n clearInterval(this.interval);\n }\n };\n\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({\n event: ev,\n cursorPosition: this.inputEl.selectionStart ?? 0,\n selectionEnd: this.inputEl.selectionEnd ?? 0,\n });\n\n if (!ev.ctrlKey && !IGNORED_KEYBOARD_CHARACTERS.includes(ev.key)) {\n this.maxCharactersWarning = this.maxCharactersReached;\n }\n }\n\n /**\n * Sets focus on the native `input`.\n */\n\n @Method()\n async setFocus(): Promise<void> {\n this.inputEl?.focus();\n }\n\n private getNumberOfCharacters = (value: string) =>\n value !== null && value !== undefined ? value.length : 0;\n\n private getMaxValueExceeded = (value: string) => {\n this.numChars = this.getNumberOfCharacters(value);\n\n if (this.type === \"number\") {\n this.minValueUnattained = !!value && Number(value) < Number(this.min);\n this.maxValueExceeded = Number(value) > Number(this.max);\n }\n };\n\n private getMaxCharactersReached = (value: string) => {\n this.numChars = this.getNumberOfCharacters(value);\n\n this.maxCharactersReached =\n this.maxCharacters > 0 && this.numChars >= this.maxCharacters;\n\n if (this.maxCharactersWarning && !this.maxCharactersReached) {\n this.maxCharactersWarning = false;\n }\n };\n\n private onInput = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.value });\n };\n\n private onBlur = (ev: Event) => {\n const target = ev.target as HTMLInputElement;\n target.removeEventListener(\"wheel\", this.onWheel);\n const { value } = target;\n this.numChars = value.length;\n this.minCharactersUnattained =\n this.minCharacters > 0 && this.numChars < this.minCharacters;\n this.icBlur.emit({ value });\n this.isFocussed = false;\n };\n\n private onFocus = (ev: Event) => {\n const target = ev.target as HTMLInputElement;\n target.addEventListener(\"wheel\", this.onWheel);\n this.icFocus.emit({ value: target.value });\n this.isFocussed = true;\n };\n\n private onTextAreaScroll = () => {\n this.icScroll.emit();\n };\n\n private onWheel = (ev: WheelEvent) => {\n const target = ev.target as HTMLInputElement;\n if (target.type === \"number\") {\n target.blur();\n setTimeout(() => {\n target.focus();\n }, 0);\n }\n };\n\n private hasStatus = (status: IcInformationStatusOrEmpty) =>\n status !== \"\" && !this.disabled;\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n };\n\n private showValidationMargin = (): boolean => {\n const maxNumChars = this.readonly ? 0 : this.maxCharacters;\n const emptyString =\n isEmptyString(this.validationStatus) ||\n isEmptyString(this.validationText);\n const valueOutsideRange = this.minValueUnattained || this.maxValueExceeded;\n const charsOutsideRange = maxNumChars > 0 || this.minCharactersUnattained;\n return (\n (!emptyString || valueOutsideRange || charsOutsideRange) &&\n !this.validationInlineInternal\n );\n };\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(\n ({ attributeName, type, addedNodes, removedNodes }) => {\n if (attributeName && MUTABLE_ATTRIBUTES.includes(attributeName)) {\n const attribute = this.el.getAttribute(attributeName);\n if (attribute) {\n this.inheritedAttributes[attributeName] = attribute;\n }\n forceComponentUpdate = true;\n } else if (type === \"childList\") {\n forceComponentUpdate = checkSlotInChildMutations(\n addedNodes,\n removedNodes,\n \"icon\"\n );\n }\n }\n );\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n render() {\n const {\n inputId,\n name,\n label,\n required,\n size,\n placeholder,\n helperText,\n hideCharCount,\n rows,\n resize,\n disabled,\n value,\n min,\n max,\n numChars,\n readonly,\n maxCharacters,\n maxCharactersMessage,\n maxCharactersWarning,\n maxCharactersReached,\n maxMessage,\n minCharacters,\n minCharactersMessage,\n minCharactersUnattained,\n minMessage,\n minValueUnattained,\n maxValueExceeded,\n validationAriaLive,\n validationStatus,\n validationText,\n validationInline,\n validationInlineInternal,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n theme,\n hideLabel,\n type,\n autocapitalize,\n ariaActiveDescendant,\n inheritedAttributes,\n ariaExpanded,\n ariaOwns,\n autocomplete,\n role,\n isFocussed,\n } = this;\n\n const el = this.el as HTMLElement;\n\n const disabledMode = readonly || disabled;\n\n const currentStatus =\n maxValueExceeded ||\n minValueUnattained ||\n minCharactersUnattained ||\n maxCharactersWarning\n ? maxCharactersWarning\n ? IcInformationStatus.Warning\n : IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxCharactersWarning\n ? maxCharactersMessage\n : maxValueExceeded\n ? maxMessage\n : minValueUnattained\n ? minMessage\n : minCharactersUnattained\n ? minCharactersMessage\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxCharacters;\n const messageAriaLive =\n validationAriaLive === \"default\"\n ? maxCharactersWarning ||\n maxValueExceeded ||\n minValueUnattained ||\n currentStatus === IcInformationStatus.Error\n ? \"assertive\"\n : \"polite\"\n : validationAriaLive;\n\n const showStatusText =\n this.hasStatus(currentStatus) &&\n !(currentStatus == IcInformationStatus.Success && validationInline) &&\n !validationInlineInternal;\n\n const multiline = rows > 1;\n\n const hiddenCharCountDescId =\n maxCharacters > 0 ? `${inputId}-char-count-desc` : \"\";\n\n const charsRemaining = maxNumChars - numChars;\n const remainingCharCountDescId =\n maxCharacters > 0 ? `${inputId}-remaining-char-count-desc` : \"\";\n const remainingCharCountDesc = `${charsRemaining} character${\n charsRemaining === 1 ? \"\" : \"s\"\n } remaining.`;\n\n const describedBy = `${getInputDescribedByText(\n this.el,\n inputId,\n helperText !== \"\",\n showStatusText\n )} ${hiddenCharCountDescId} ${\n numChars > 0 ? remainingCharCountDescId : \"\"\n }`.trim();\n\n const disabledText = disabledMode && !readonly;\n const showLeftIcon =\n !!this.el.querySelector(`[slot=\"icon\"]`) && !disabledText;\n\n const invalid = `${currentStatus === IcInformationStatus.Error}`;\n\n hiddenInput\n ? renderHiddenInput(this.el as HTMLElement, value, name, disabledMode)\n : removeHiddenInput(this.el as HTMLElement);\n\n return (\n <Host\n class={{\n \"ic-text-field-full-width\": fullWidth,\n \"ic-text-field-disabled\": disabledMode,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\n >\n <slot name=\"helper-text\" slot=\"helper-text\"></slot>\n </ic-input-label>\n )}\n\n <ic-input-component-container\n size={size}\n validationStatus={currentStatus}\n multiLine={multiline}\n disabled={disabledMode}\n readonly={readonly}\n validationInline={validationInline}\n fullWidth={fullWidth}\n >\n {showLeftIcon && (\n <span\n class={{\n readonly,\n \"has-value\": this.getNumberOfCharacters(value) > 0,\n }}\n slot=\"left-icon\"\n >\n <slot name=\"icon\" />\n </span>\n )}\n\n {!multiline ? (\n <input\n id={inputId}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLInputElement)}\n type={type}\n min={min}\n max={max}\n value={value}\n class={{\n \"no-left-pad\": !showLeftIcon && readonly,\n readonly,\n \"truncate-value\": truncateValue,\n }}\n placeholder={placeholder ? placeholder : \"\"}\n required={required}\n disabled={disabledMode}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-activedescendant={ariaActiveDescendant}\n aria-expanded={ariaExpanded}\n aria-owns={ariaOwns}\n autocomplete={autocomplete}\n autocapitalize={autocapitalize}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={role || undefined}\n maxlength={maxCharactersReached ? maxCharacters : undefined}\n minlength={minCharactersUnattained ? minCharacters : undefined}\n {...inheritedAttributes}\n ></input>\n ) : (\n <textarea\n id={inputId}\n class={{\n \"no-resize\": resize === false || !!readonly,\n \"no-left-pad\": !showLeftIcon && !!readonly,\n readonly: !!readonly,\n }}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLTextAreaElement)}\n value={value}\n rows={rows}\n required={required}\n disabled={disabledMode}\n placeholder={placeholder}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onScroll={this.onTextAreaScroll}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n autocomplete={autocomplete}\n autocapitalize={autocapitalize}\n spellcheck={spellcheck}\n inputmode={inputmode}\n maxlength={maxCharactersReached ? maxCharacters : undefined}\n minlength={minCharactersUnattained ? minCharacters : undefined}\n {...inheritedAttributes}\n ></textarea>\n )}\n {isSlotUsed(el, \"clear-button\") && (\n <slot name=\"clear-button\"></slot>\n )}\n {isSlotUsed(el, \"search-submit-button\") && (\n <slot name=\"search-submit-button\"></slot>\n )}\n </ic-input-component-container>\n {isSlotUsed(el, \"menu\") && <slot name=\"menu\"></slot>}\n <ic-input-validation\n class={{ \"show-validation\": this.showValidationMargin() }}\n status={\n this.hasStatus(currentStatus) === false ||\n (currentStatus === IcInformationStatus.Success &&\n validationInline) ||\n validationInlineInternal\n ? \"\"\n : currentStatus\n }\n message={showStatusText ? currentValidationText : \"\"}\n ariaLiveMode={messageAriaLive}\n for={inputId}\n fullWidth={fullWidth}\n >\n {isSlotUsed(el, \"validation-text\") && (\n <slot name=\"validation-text\" slot=\"validation-message\"></slot>\n )}\n {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n {!hideCharCount && (\n <ic-typography variant=\"caption\" class=\"char-count-text\">\n <span class=\"char-count\">\n {numChars}/{maxNumChars}\n </span>\n </ic-typography>\n )}\n <span\n class=\"remaining-char-count-desc\"\n aria-live=\"polite\"\n hidden={!isFocussed}\n id={remainingCharCountDescId}\n >\n {remainingCharCountDesc}\n </span>\n <span hidden={true} id={hiddenCharCountDescId}>\n Field can contain a maximum of {maxNumChars} characters.\n </span>\n </div>\n )}\n </ic-input-validation>\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"mappings":"qOAAA,MAAMA,EAAiB,kwMACvB,MAAAC,EAAeD,ECgDf,IAAIE,EAAW,EACf,MAAMC,EAAqB,IAAIC,EAAmB,S,MAYrCC,EAAS,MALtB,WAAAC,CAAAC,G,2QAMUC,KAAAC,oBAA+C,GAE/CD,KAAAE,qBAAgD,KAK/CF,KAAAG,SAAmB,EACnBH,KAAAI,qBAAgC,MAChCJ,KAAAK,qBAAgC,MAChCL,KAAAM,wBAAmC,MACnCN,KAAAO,iBAA4B,MAC5BP,KAAAQ,mBAA8B,MAC9BR,KAAAS,WAAsB,MAgCvBT,KAAAU,eAAiB,MAKjBV,KAAAW,aAAqC,MAKrCX,KAAAY,YAAoC,MAKpCZ,KAAAa,UAAY,MAKZb,KAAAc,SAAW,MAUXd,KAAAe,UAAY,MAKZf,KAAAgB,WAAa,GAKbhB,KAAAiB,cAAgB,MAKhBjB,KAAAkB,UAAY,MAKZlB,KAAAmB,YAAc,KAKdnB,KAAAoB,QAAU,uBAAuB1B,MAOjCM,KAAAqB,UAAmC,OAenCrB,KAAAsB,cAAgB,EAMhBtB,KAAAuB,qBAAuB,oBAAoBvB,KAAKsB,2BAKhDtB,KAAAwB,WAAa,oBAAoBxB,KAAKyB,eAUtCzB,KAAA0B,cAAgB,EAMhB1B,KAAA2B,qBAAuB,oBAAoB3B,KAAK0B,2BAKhD1B,KAAA4B,WAAa,oBAAoB5B,KAAK6B,cAKtC7B,KAAA8B,KAAO9B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,SACtCyI,EAAA,uBAAA5B,IAAA,2CACE8B,MAAO,CAAE,kBAAmBzK,KAAKsF,wBACjCF,OACEpF,KAAKmF,UAAU+D,MAAmB,OACjCA,KAAkBC,EAAoBM,SACrC/G,GACFC,EACI,GACAuG,GAENmC,QAAS7B,GAAiBF,GAAwB,GAClDgC,aAAc/B,GACdmB,IAAKtJ,EACLL,UAAWA,GAEVqK,EAAWhI,GAAI,oBACdmH,EAAA,QAAA5B,IAAA,2CAAM7G,KAAK,kBAAkB6I,KAAK,wBAElC3I,GAAYuD,GAAc,GAC1BgF,EAAA,OAAA5B,IAAA,2CAAKgC,KAAK,iCACN1J,GACAsJ,EAAA,iBAAA5B,IAAA,2CAAe4C,QAAQ,UAAUd,MAAM,mBACrCF,EAAA,QAAA5B,IAAA,2CAAM8B,MAAM,cACTtK,EAAQ,IAAGoF,KAIlBgF,EAAA,QAAA5B,IAAA,2CACE8B,MAAM,4BAA2B,YACvB,SACVe,QAAS/K,GACTsK,GAAIlB,IAEHC,IAEHS,EAAA,QAAA5B,IAAA,2CAAM6C,OAAQ,KAAMT,GAAIpB,IAAqB,kCACXpE,GAAW,mB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as a}from"./p-8e4e97b4.js";import{r as o,o as n}from"./p-a5658054.js";import"./p-bddf799a.js";const h=`<svg width="8" height="10" viewBox="0 0 8 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M2.08748 0L0.912476 1.175L4.72914 5L0.912476 8.825L2.08748 10L7.08748 5L2.08748 0Z" fill="currentColor"/>\n</svg>\n`;const r=`<svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M11.1709 8.825L7.34589 5L11.1709 1.175L9.99589 0L4.99589 5L9.99589 10L11.1709 8.825ZM0.829224 0H2.49589V10H0.829224V0Z" fill="currentColour"/>\n</svg>`;const l='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{box-sizing:border-box;width:100%;display:flex;justify-content:center}nav{width:100%;display:flex;flex-flow:row wrap;justify-content:flex-start;align-items:center}ic-button{cursor:pointer}ic-button.next-previous{--icon-width:var(--ic-space-xs);--icon-height:calc(var(--ic-space-xs) + var(--ic-space-xxxs));padding:0 var(--ic-space-xxs) 0 var(--ic-space-xxxs)}ic-button.first-last{--icon-width:calc(var(--ic-space-sm) + var(--ic-space-xxxs));--icon-height:calc(var(--ic-space-xs) + var(--ic-space-xxxs))}ic-button.first-last::part(button),ic-button.next-previous::part(button){color:var(--ic-pagination-chevron)}:host(.ic-pagination-monochrome) ic-button.first-last::part(button),:host(.ic-pagination-monochrome) ic-button.next-previous::part(button){color:var(--ic-pagination-chevron-monochrome)}ic-button.ic-button-disabled.first-last::part(button),ic-button.ic-button-disabled.next-previous::part(button),:host(.ic-pagination-monochrome) ic-button.ic-button-disabled.first-last::part(button),:host(.ic-pagination-monochrome) ic-button.ic-button-disabled.next-previous::part(button){color:var(--ic-pagination-chevron-disabled)}.disabled{color:var(--ic-color-text-disabled-mid);pointer-events:none;cursor:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.hide-current-page{display:none}.sr-only{position:absolute;left:-9999px}.sr-only:dir(rtl){right:-9999px}';const c=l;const d=class{constructor(s){t(this,s);this.icPageChange=i(this,"icPageChange",7);this.endEllipsis=false;this.endItems=[];this.midItems=[];this.startEllipsis=false;this.startItems=[];this.accessibleLabel="Pagination Navigation";this.adjacentPageCount=1;this.boundaryPageCount=1;this.defaultPage=1;this.disabled=false;this.hideCurrentPage=false;this.hideFirstAndLastPageButton=false;this.label="Page";this.monochrome=false;this.theme="inherit";this.type="simple";this.currentPage=this.defaultPage;this.handleClickFirst=()=>{this.currentPage=1;this.icPageChange.emit({value:this.currentPage})};this.handleClickPrevious=()=>{this.currentPage--;this.icPageChange.emit({value:this.currentPage})};this.handleClickNext=()=>{this.currentPage++;this.icPageChange.emit({value:this.currentPage})};this.handleClickLast=()=>{this.currentPage=this.pages;this.icPageChange.emit({value:this.currentPage})};this.firstButton=()=>e("ic-button",{id:"first-page-button","aria-label":"Go to first page",theme:this.theme,onClick:this.handleClickFirst,class:"page-button first-last",disabled:this.currentPage===1||this.disabled,variant:"icon-tertiary",monochrome:this.theme=="light"||this.theme=="dark",innerHTML:r});this.previousButton=()=>e("ic-button",{id:"previous-page-button","aria-label":"Go to previous page",theme:this.theme,onClick:this.handleClickPrevious,class:"page-button next-previous flip",disabled:this.currentPage===1||this.disabled,variant:"icon-tertiary",monochrome:this.theme=="light"||this.theme=="dark",innerHTML:h});this.nextButton=()=>e("ic-button",{id:"next-page-button","aria-label":"Go to next page",theme:this.theme,onClick:this.handleClickNext,class:"page-button next-previous",disabled:this.currentPage===this.pages||this.disabled,variant:"icon-tertiary",monochrome:this.theme=="light"||this.theme=="dark",innerHTML:h});this.lastButton=()=>e("ic-button",{id:"last-page-button","aria-label":"Go to last page",theme:this.theme,onClick:this.handleClickLast,class:"page-button first-last flip",disabled:this.currentPage===this.pages||this.disabled,variant:"icon-tertiary",monochrome:this.theme=="light"||this.theme=="dark",innerHTML:r});this.renderStartEllipsis=()=>e("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,type:"ellipsis",id:"start-ellipsis",disabled:this.disabled});this.renderEndEllipsis=()=>e("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,type:"ellipsis",id:"end-ellipsis",disabled:this.disabled});this.renderStartItems=()=>this.startItems.map((t=>e("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,selected:t===this.currentPage,id:`pagination-item-${t}`,type:"page",page:t,disabled:this.disabled})));this.renderEndItems=()=>this.endItems.map((t=>e("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,selected:t===this.currentPage,id:`pagination-item-${t}`,type:"page",page:t,disabled:this.disabled})));this.renderMiddleItems=()=>this.midItems.map((t=>e("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,selected:t===this.currentPage,id:`pagination-item-${t}`,type:"page",page:t,disabled:this.disabled})))}watchAdjacentPageCountHandler(){if(this.adjacentPageCount>2){this.adjacentPageCount=2}}watchBoundaryPageCountHandler(){if(this.boundaryPageCount>2){this.boundaryPageCount=2}}watchDisabledHandler(){o(this.disabled,this.el)}watchNumberPagesHandler(){this.watchPageChangeHandler()}watchTypeHandler(){this.watchPageChangeHandler()}watchPageChangeHandler(){if(this.type==="simple"){return}this.startEllipsis=false;this.endEllipsis=false;this.startItems=[];this.endItems=[];this.midItems=[];const t=[];let i=0;const e=[];let s=this.pages;const a=[];let o;let n;let h=false;let r=false;if(this.pages<=this.boundaryPageCount*2+this.adjacentPageCount*2+3){this.startEllipsis=false;this.endEllipsis=false;for(let i=1;i<=this.pages;i++){t.push(i)}this.startItems=t;return}i=this.boundaryPageCount===0?1:this.boundaryPageCount;s=this.boundaryPageCount===0?this.pages:this.pages-this.boundaryPageCount+1;if(this.currentPage<=this.adjacentPageCount+this.boundaryPageCount+2){h=false;r=true;let t=2*this.adjacentPageCount+1;if(this.boundaryPageCount===0){t--}o=i+1;n=o+t}else{h=true;if(this.currentPage>this.pages-(this.adjacentPageCount+this.boundaryPageCount+2)){let t=2*this.adjacentPageCount+1;if(this.boundaryPageCount===0){t--}n=this.boundaryPageCount===0?this.pages-1:this.pages-this.boundaryPageCount;o=n-t}else{r=true;o=this.currentPage-this.adjacentPageCount;n=this.currentPage+this.adjacentPageCount}}if(this.boundaryPageCount>0||this.boundaryPageCount===0&&h===false){for(let e=1;e<=i;e++){t.push(e)}}if(this.boundaryPageCount>0||this.boundaryPageCount===0&&r===false){for(let t=s;t<=this.pages;t++){e.push(t)}}for(let t=o;t<=n;t++){a.push(t)}this.startEllipsis=h;this.endEllipsis=r;this.startItems=t;this.endItems=e;this.midItems=a}componentWillLoad(){this.watchPageChangeHandler();this.watchBoundaryPageCountHandler();this.watchAdjacentPageCountHandler();o(this.disabled,this.el)}componentDidLoad(){n([{prop:this.pages,propName:"pages"}],"Pagination")}paginationItemClickHandler(t){const i=t.detail.page;this.currentPage=i;this.icPageChange.emit({value:this.currentPage})}async setCurrentPage(t){if(typeof t==="number"&&t>0&&t<=this.pages){this.currentPage=t}else{console.error("Current page must be a number greater than zero but less than or equal to the total number of pages")}}render(){const{type:t,currentPage:i,hideCurrentPage:a,disabled:o,hideFirstAndLastPageButton:n,label:h,theme:r,monochrome:l}=this;return e(s,{key:"206014fa2aa2c61bb9535e4de4fa5bf756bd318c",class:{[`ic-theme-${r}`]:r!=="inherit",["ic-pagination-monochrome"]:!!l}},t==="simple"&&e("nav",{key:"8544b88d593c806867e0bd49cb0624a684dec271",class:{["disabled"]:!!o},role:"navigation","aria-label":this.accessibleLabel},n?null:this.firstButton(),this.previousButton(),e("ic-pagination-item",{key:"5331aca30709281171cf19f17c2f05a0d0cdf168",theme:this.theme,monochrome:this.monochrome,type:"simple-current",page:i,label:h,class:{["hide-current-page"]:!!a},disabled:o}),this.nextButton(),n?null:this.lastButton()),t==="complex"&&e("nav",{key:"6b7acef9da08b590b941a7ce142ce448dbf79ff2",class:{["disabled"]:!!o},role:"navigation","aria-label":this.accessibleLabel},n?null:this.firstButton(),this.previousButton(),this.renderStartItems(),this.startEllipsis&&this.renderStartEllipsis(),this.renderMiddleItems(),this.endEllipsis&&this.renderEndEllipsis(),this.renderEndItems(),this.nextButton(),n?null:this.lastButton()),t==="complex"&&e("span",{key:"e60f3fb36b78e7970f14836295efbd3a1f481885",class:"sr-only","aria-live":"polite"},"Page ",this.currentPage))}get el(){return a(this)}static get watchers(){return{adjacentPageCount:["watchAdjacentPageCountHandler"],boundaryPageCount:["watchBoundaryPageCountHandler"],disabled:["watchDisabledHandler"],pages:["watchNumberPagesHandler"],type:["watchTypeHandler"],currentPage:["watchPageChangeHandler"]}}};d.style=c;export{d as ic_pagination};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as i,h as e,H as s,g as a}from"./p-8e4e97b4.js";import{r as o,o as n}from"./p-a5658054.js";import"./p-bddf799a.js";const h=`<svg width="8" height="10" viewBox="0 0 8 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M2.08748 0L0.912476 1.175L4.72914 5L0.912476 8.825L2.08748 10L7.08748 5L2.08748 0Z" fill="currentColor"/>\n</svg>\n`;const r=`<svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M11.1709 8.825L7.34589 5L11.1709 1.175L9.99589 0L4.99589 5L9.99589 10L11.1709 8.825ZM0.829224 0H2.49589V10H0.829224V0Z" fill="currentColour"/>\n</svg>`;const l='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{box-sizing:border-box;width:100%;display:flex;justify-content:center}nav{width:100%;display:flex;flex-flow:row wrap;justify-content:flex-start;align-items:center}ic-button{cursor:pointer}ic-button.next-previous{--icon-width:var(--ic-space-xs);--icon-height:calc(var(--ic-space-xs) + var(--ic-space-xxxs));padding:0 var(--ic-space-xxs) 0 var(--ic-space-xxxs)}ic-button.first-last{--icon-width:calc(var(--ic-space-sm) + var(--ic-space-xxxs));--icon-height:calc(var(--ic-space-xs) + var(--ic-space-xxxs))}ic-button.first-last::part(button),ic-button.next-previous::part(button){color:var(--ic-pagination-chevron)}:host(.ic-pagination-monochrome) ic-button.first-last::part(button),:host(.ic-pagination-monochrome) ic-button.next-previous::part(button){color:var(--ic-pagination-chevron-monochrome)}ic-button.ic-button-disabled.first-last::part(button),ic-button.ic-button-disabled.next-previous::part(button),:host(.ic-pagination-monochrome) ic-button.ic-button-disabled.first-last::part(button),:host(.ic-pagination-monochrome) ic-button.ic-button-disabled.next-previous::part(button){color:var(--ic-pagination-chevron-disabled)}.disabled{color:var(--ic-color-text-disabled-mid);pointer-events:none;cursor:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.hide-current-page{display:none}.sr-only{position:absolute;left:-9999px}.sr-only:dir(rtl){right:-9999px}';const c=l;const d=class{constructor(s){t(this,s);this.icPageChange=i(this,"icPageChange",7);this.endEllipsis=false;this.endItems=[];this.midItems=[];this.startEllipsis=false;this.startItems=[];this.accessibleLabel="Pagination Navigation";this.adjacentPageCount=1;this.boundaryPageCount=1;this.defaultPage=1;this.disabled=false;this.hideCurrentPage=false;this.hideFirstAndLastPageButton=false;this.label="Page";this.monochrome=false;this.theme="inherit";this.type="simple";this.currentPage=this.defaultPage;this.handleClickFirst=()=>{this.currentPage=1;this.icPageChange.emit({value:this.currentPage})};this.handleClickPrevious=()=>{this.currentPage--;this.icPageChange.emit({value:this.currentPage})};this.handleClickNext=()=>{this.currentPage++;this.icPageChange.emit({value:this.currentPage})};this.handleClickLast=()=>{this.currentPage=this.pages;this.icPageChange.emit({value:this.currentPage})};this.firstButton=()=>e("ic-button",{id:"first-page-button","aria-label":"Go to first page",theme:this.theme,onClick:this.handleClickFirst,class:"page-button first-last",disabled:this.currentPage===1||this.disabled,variant:"icon-tertiary",monochrome:this.theme=="light"||this.theme=="dark",innerHTML:r});this.previousButton=()=>e("ic-button",{id:"previous-page-button","aria-label":"Go to previous page",theme:this.theme,onClick:this.handleClickPrevious,class:"page-button next-previous flip",disabled:this.currentPage===1||this.disabled,variant:"icon-tertiary",monochrome:this.theme=="light"||this.theme=="dark",innerHTML:h});this.nextButton=()=>e("ic-button",{id:"next-page-button","aria-label":"Go to next page",theme:this.theme,onClick:this.handleClickNext,class:"page-button next-previous",disabled:this.currentPage===this.pages||this.disabled,variant:"icon-tertiary",monochrome:this.theme=="light"||this.theme=="dark",innerHTML:h});this.lastButton=()=>e("ic-button",{id:"last-page-button","aria-label":"Go to last page",theme:this.theme,onClick:this.handleClickLast,class:"page-button first-last flip",disabled:this.currentPage===this.pages||this.disabled,variant:"icon-tertiary",monochrome:this.theme=="light"||this.theme=="dark",innerHTML:r});this.renderStartEllipsis=()=>e("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,type:"ellipsis",id:"start-ellipsis",disabled:this.disabled});this.renderEndEllipsis=()=>e("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,type:"ellipsis",id:"end-ellipsis",disabled:this.disabled});this.renderStartItems=()=>this.startItems.map((t=>e("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,selected:t===this.currentPage,id:`pagination-item-${t}`,type:"page",page:t,disabled:this.disabled})));this.renderEndItems=()=>this.endItems.map((t=>e("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,selected:t===this.currentPage,id:`pagination-item-${t}`,type:"page",page:t,disabled:this.disabled})));this.renderMiddleItems=()=>this.midItems.map((t=>e("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,selected:t===this.currentPage,id:`pagination-item-${t}`,type:"page",page:t,disabled:this.disabled})))}watchAdjacentPageCountHandler(){if(this.adjacentPageCount>2){this.adjacentPageCount=2}}watchBoundaryPageCountHandler(){if(this.boundaryPageCount>2){this.boundaryPageCount=2}}watchDisabledHandler(){o(this.disabled,this.el)}watchNumberPagesHandler(){this.watchPageChangeHandler()}watchTypeHandler(){this.watchPageChangeHandler()}watchPageChangeHandler(){if(this.type==="simple"){return}this.startEllipsis=false;this.endEllipsis=false;this.startItems=[];this.endItems=[];this.midItems=[];const t=[];let i=0;const e=[];let s=this.pages;const a=[];let o;let n;let h=false;let r=false;if(this.pages<=this.boundaryPageCount*2+this.adjacentPageCount*2+3){this.startEllipsis=false;this.endEllipsis=false;for(let i=1;i<=this.pages;i++){t.push(i)}this.startItems=t;return}i=this.boundaryPageCount===0?1:this.boundaryPageCount;s=this.boundaryPageCount===0?this.pages:this.pages-this.boundaryPageCount+1;if(this.currentPage<=this.adjacentPageCount+this.boundaryPageCount+2){h=false;r=true;let t=2*this.adjacentPageCount+1;if(this.boundaryPageCount===0){t--}o=i+1;n=o+t}else{h=true;if(this.currentPage>this.pages-(this.adjacentPageCount+this.boundaryPageCount+2)){let t=2*this.adjacentPageCount+1;if(this.boundaryPageCount===0){t--}n=this.boundaryPageCount===0?this.pages-1:this.pages-this.boundaryPageCount;o=n-t}else{r=true;o=this.currentPage-this.adjacentPageCount;n=this.currentPage+this.adjacentPageCount}}if(this.boundaryPageCount>0||this.boundaryPageCount===0&&h===false){for(let e=1;e<=i;e++){t.push(e)}}if(this.boundaryPageCount>0||this.boundaryPageCount===0&&r===false){for(let t=s;t<=this.pages;t++){e.push(t)}}for(let t=o;t<=n;t++){a.push(t)}this.startEllipsis=h;this.endEllipsis=r;this.startItems=t;this.endItems=e;this.midItems=a}componentWillLoad(){this.watchPageChangeHandler();this.watchBoundaryPageCountHandler();this.watchAdjacentPageCountHandler();o(this.disabled,this.el)}componentDidLoad(){n([{prop:this.pages,propName:"pages"}],"Pagination")}icPageChangeHandler(t){var i,e,s;const a=(i=document.activeElement)===null||i===void 0?void 0:i.shadowRoot;const o=a?a.activeElement:document.activeElement;if(!a||!o){return}if(t.detail.value===1&&["first-page-button","previous-page-button"].some((t=>t===(o===null||o===void 0?void 0:o.id)))){const t=(e=a.querySelector("#next-page-button").shadowRoot)===null||e===void 0?void 0:e.querySelector("button");setTimeout((()=>t===null||t===void 0?void 0:t.focus()),10)}else if(t.detail.value===this.pages&&["last-page-button","next-page-button"].some((t=>t===(o===null||o===void 0?void 0:o.id)))){const t=(s=a.querySelector("#previous-page-button").shadowRoot)===null||s===void 0?void 0:s.querySelector("button");setTimeout((()=>t===null||t===void 0?void 0:t.focus()),10)}}paginationItemClickHandler(t){const i=t.detail.page;this.currentPage=i;this.icPageChange.emit({value:this.currentPage})}async setCurrentPage(t){if(typeof t==="number"&&t>0&&t<=this.pages){this.currentPage=t}else{console.error("Current page must be a number greater than zero but less than or equal to the total number of pages")}}render(){const{type:t,currentPage:i,hideCurrentPage:a,disabled:o,hideFirstAndLastPageButton:n,label:h,theme:r,monochrome:l}=this;return e(s,{key:"841c501b441241eae4281c4c2aea7f51d4e5b1e8",class:{[`ic-theme-${r}`]:r!=="inherit",["ic-pagination-monochrome"]:!!l}},t==="simple"&&e("nav",{key:"888a15822151817834e8f92a8a50f4d5fd37c715",class:{["disabled"]:!!o},role:"navigation","aria-label":this.accessibleLabel},n?null:this.firstButton(),this.previousButton(),e("ic-pagination-item",{key:"f89f2dc683fa0c48dda8a9b8b0ae9fb041a93624",theme:this.theme,monochrome:this.monochrome,type:"simple-current",page:i,label:h,class:{["hide-current-page"]:!!a},disabled:o}),this.nextButton(),n?null:this.lastButton()),t==="complex"&&e("nav",{key:"edddd73145108a1ebd09ed068dee9c301a168365",class:{["disabled"]:!!o},role:"navigation","aria-label":this.accessibleLabel},n?null:this.firstButton(),this.previousButton(),this.renderStartItems(),this.startEllipsis&&this.renderStartEllipsis(),this.renderMiddleItems(),this.endEllipsis&&this.renderEndEllipsis(),this.renderEndItems(),this.nextButton(),n?null:this.lastButton()),t==="complex"&&e("span",{key:"a0dca70d2eb4840d1316ae4a4600fe03aeb0f710",class:"sr-only","aria-live":"polite"},"Page ",this.currentPage))}get el(){return a(this)}static get watchers(){return{adjacentPageCount:["watchAdjacentPageCountHandler"],boundaryPageCount:["watchBoundaryPageCountHandler"],disabled:["watchDisabledHandler"],pages:["watchNumberPagesHandler"],type:["watchTypeHandler"],currentPage:["watchPageChangeHandler"]}}};d.style=c;export{d as ic_pagination};
|
|
2
|
+
//# sourceMappingURL=p-9452b9ac.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["icPaginationCss","IcPaginationStyle0","Pagination","constructor","hostRef","this","endEllipsis","endItems","midItems","startEllipsis","startItems","accessibleLabel","adjacentPageCount","boundaryPageCount","defaultPage","disabled","hideCurrentPage","hideFirstAndLastPageButton","label","monochrome","theme","type","currentPage","handleClickFirst","icPageChange","emit","value","handleClickPrevious","handleClickNext","handleClickLast","pages","firstButton","h","id","onClick","class","variant","innerHTML","paginationFirstLast","previousButton","paginationNextPrevious","nextButton","lastButton","renderStartEllipsis","renderEndEllipsis","renderStartItems","map","page","selected","renderEndItems","renderMiddleItems","watchAdjacentPageCountHandler","watchBoundaryPageCountHandler","watchDisabledHandler","removeDisabledFalse","el","watchNumberPagesHandler","watchPageChangeHandler","watchTypeHandler","startItemCount","endStart","midStart","midEnd","i","push","numItems","componentWillLoad","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","icPageChangeHandler","ev","shadow","_a","document","activeElement","shadowRoot","activeEl","detail","some","btn","_b","querySelector","setTimeout","focus","_c","paginationItemClickHandler","setCurrentPage","console","error","render","Host","key","role"],"sources":["src/components/ic-pagination/ic-pagination.css?tag=ic-pagination&encapsulation=shadow","src/components/ic-pagination/ic-pagination.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n justify-content: center;\n}\n\nnav {\n width: 100%;\n display: flex;\n flex-flow: row wrap;\n justify-content: flex-start;\n align-items: center;\n}\n\nic-button {\n cursor: pointer;\n}\n\nic-button.next-previous {\n --icon-width: var(--ic-space-xs);\n --icon-height: calc(var(--ic-space-xs) + var(--ic-space-xxxs));\n\n padding: 0 var(--ic-space-xxs) 0 var(--ic-space-xxxs);\n}\n\nic-button.first-last {\n --icon-width: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n --icon-height: calc(var(--ic-space-xs) + var(--ic-space-xxxs));\n}\n\nic-button.first-last::part(button),\nic-button.next-previous::part(button) {\n color: var(--ic-pagination-chevron);\n}\n\n:host(.ic-pagination-monochrome) ic-button.first-last::part(button),\n:host(.ic-pagination-monochrome) ic-button.next-previous::part(button) {\n color: var(--ic-pagination-chevron-monochrome);\n}\n\nic-button.ic-button-disabled.first-last::part(button),\nic-button.ic-button-disabled.next-previous::part(button),\n:host(.ic-pagination-monochrome)\n ic-button.ic-button-disabled.first-last::part(button),\n:host(.ic-pagination-monochrome)\n ic-button.ic-button-disabled.next-previous::part(button) {\n color: var(--ic-pagination-chevron-disabled);\n}\n\n.disabled {\n color: var(--ic-color-text-disabled-mid);\n pointer-events: none;\n cursor: none;\n user-select: none;\n}\n\n.hide-current-page {\n display: none;\n}\n\n.sr-only {\n position: absolute;\n left: -9999px;\n}\n\n.sr-only:dir(rtl) {\n right: -9999px;\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n h,\n Listen,\n State,\n Watch,\n Event,\n EventEmitter,\n Method,\n} from \"@stencil/core\";\nimport paginationNextPrevious from \"../../assets/pagination-next-previous.svg\";\nimport paginationFirstLast from \"../../assets/pagination-first-last.svg\";\nimport { IcThemeMode } from \"../../utils/types\";\nimport { IcPaginationTypes, IcChangeEventDetail } from \"./ic-pagination.types\";\nimport {\n onComponentRequiredPropUndefined,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\n\n@Component({\n tag: \"ic-pagination\",\n styleUrl: \"ic-pagination.css\",\n shadow: true,\n})\nexport class Pagination {\n @Element() el: HTMLIcPaginationElement;\n\n @State() endEllipsis: boolean = false;\n @State() endItems: number[] = [];\n @State() midItems: number[] = [];\n @State() startEllipsis: boolean = false;\n @State() startItems: number[] = [];\n\n /**\n * The accessible label of the pagination component to provide context for screen reader users.\n */\n @Prop() accessibleLabel?: string = \"Pagination Navigation\";\n\n /**\n * The number of pages displayed adjacent to the current page when using 'complex' type pagination. Accepted values are 0, 1 & 2.\n */\n @Prop({ mutable: true }) adjacentPageCount?: number = 1;\n\n @Watch(\"adjacentPageCount\")\n watchAdjacentPageCountHandler(): void {\n if (this.adjacentPageCount! > 2) {\n this.adjacentPageCount = 2;\n }\n }\n\n /**\n * The number of pages displayed as boundary items to the current page when using 'complex' type pagination. Accepted values are 0, 1 & 2.\n */\n @Prop({ mutable: true }) boundaryPageCount?: number = 1;\n\n @Watch(\"boundaryPageCount\")\n watchBoundaryPageCountHandler(): void {\n if (this.boundaryPageCount! > 2) {\n this.boundaryPageCount = 2;\n }\n }\n\n /**\n * The default page to display.\n */\n @Prop() defaultPage?: number = 1;\n\n /**\n * If `true`, the pagination will not allow interaction.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the current page of the simple pagination will not be displayed.\n */\n @Prop() hideCurrentPage?: boolean = false;\n\n /**\n * If `true`, the first and last page buttons will not be displayed.\n */\n @Prop() hideFirstAndLastPageButton?: boolean = false;\n\n /**\n * The label for the pagination item (applicable when simple pagination is being used).\n */\n @Prop() label?: string = \"Page\";\n\n /**\n * If `true`, the pagination will display as black in the light theme, and white in dark theme.\n */\n @Prop() monochrome?: boolean = false;\n\n /**\n * The total number of pages.\n */\n @Prop() pages!: number;\n\n @Watch(\"pages\")\n watchNumberPagesHandler(): void {\n this.watchPageChangeHandler();\n }\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The type of pagination to be used.\n */\n @Prop() type?: IcPaginationTypes = \"simple\";\n\n @Watch(\"type\")\n watchTypeHandler(): void {\n this.watchPageChangeHandler();\n }\n\n /**\n * The current page displayed by the pagination.\n */\n @Prop({ mutable: true }) currentPage?: number = this.defaultPage;\n\n @Watch(\"currentPage\")\n watchPageChangeHandler(): void {\n if (this.type === \"simple\") {\n return;\n }\n\n this.startEllipsis = false;\n this.endEllipsis = false;\n this.startItems = [];\n this.endItems = [];\n this.midItems = [];\n\n const startItems = [];\n let startItemCount = 0;\n const endItems = [];\n let endStart = this.pages;\n const midItems = [];\n let midStart;\n let midEnd;\n let startEllipsis = false;\n let endEllipsis = false;\n\n if (\n this.pages <=\n this.boundaryPageCount! * 2 + this.adjacentPageCount! * 2 + 3\n ) {\n this.startEllipsis = false;\n this.endEllipsis = false;\n for (let i = 1; i <= this.pages; i++) {\n startItems.push(i);\n }\n this.startItems = startItems;\n return;\n }\n\n startItemCount = this.boundaryPageCount === 0 ? 1 : this.boundaryPageCount!;\n endStart =\n this.boundaryPageCount === 0\n ? this.pages\n : this.pages - this.boundaryPageCount! + 1;\n\n if (\n this.currentPage! <=\n this.adjacentPageCount! + this.boundaryPageCount! + 2\n ) {\n startEllipsis = false;\n endEllipsis = true;\n\n let numItems = 2 * this.adjacentPageCount! + 1;\n if (this.boundaryPageCount === 0) {\n numItems--;\n }\n midStart = startItemCount + 1;\n midEnd = midStart + numItems;\n } else {\n startEllipsis = true;\n if (\n this.currentPage! >\n this.pages - (this.adjacentPageCount! + this.boundaryPageCount! + 2)\n ) {\n let numItems = 2 * this.adjacentPageCount! + 1;\n if (this.boundaryPageCount === 0) {\n numItems--;\n }\n midEnd =\n this.boundaryPageCount === 0\n ? this.pages - 1\n : this.pages - this.boundaryPageCount!;\n midStart = midEnd - numItems;\n } else {\n endEllipsis = true;\n midStart = this.currentPage! - this.adjacentPageCount!;\n midEnd = this.currentPage! + this.adjacentPageCount!;\n }\n }\n\n //create array of start items\n if (\n this.boundaryPageCount! > 0 ||\n (this.boundaryPageCount === 0 && startEllipsis === false)\n ) {\n for (let i = 1; i <= startItemCount; i++) {\n startItems.push(i);\n }\n }\n\n //create array of end items\n if (\n this.boundaryPageCount! > 0 ||\n (this.boundaryPageCount === 0 && endEllipsis === false)\n ) {\n for (let i = endStart; i <= this.pages; i++) {\n endItems.push(i);\n }\n }\n\n //create array of mid items\n for (let i = midStart; i <= midEnd; i++) {\n midItems.push(i);\n }\n\n this.startEllipsis = startEllipsis;\n this.endEllipsis = endEllipsis;\n this.startItems = startItems;\n this.endItems = endItems;\n this.midItems = midItems;\n }\n\n /**\n * Emitted when a page is selected.\n */\n @Event() icPageChange: EventEmitter<IcChangeEventDetail>;\n\n componentWillLoad(): void {\n this.watchPageChangeHandler();\n this.watchBoundaryPageCountHandler();\n this.watchAdjacentPageCountHandler();\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.pages, propName: \"pages\" }],\n \"Pagination\"\n );\n }\n\n /**\n * Prevents focus lingering on a disabled element. If the currently\n * focused element is one of the back buttons (and we reach the first page),\n * move focus to \"next\" button, and vice versa.\n * @param ev\n */\n @Listen(\"icPageChange\")\n icPageChangeHandler(ev: CustomEvent<IcChangeEventDetail>) {\n const shadow = document.activeElement?.shadowRoot;\n\n const activeEl = shadow ? shadow.activeElement : document.activeElement;\n if (!shadow || !activeEl) {\n return;\n }\n\n if (\n ev.detail.value === 1 &&\n [\"first-page-button\", \"previous-page-button\"].some(\n (id) => id === activeEl?.id\n )\n ) {\n const btn = (\n shadow.querySelector(\"#next-page-button\") as HTMLElement\n ).shadowRoot?.querySelector(\"button\");\n // When navigating from firstPage->lastPage or vice versa, the to-be-selected element will be disabled. wait a tick so that it can receive focus.\n setTimeout(() => btn?.focus(), 10);\n } else if (\n ev.detail.value === this.pages &&\n [\"last-page-button\", \"next-page-button\"].some((id) => id === activeEl?.id)\n ) {\n const btn = (\n shadow!.querySelector(\"#previous-page-button\") as HTMLElement\n ).shadowRoot?.querySelector(\"button\");\n setTimeout(() => btn?.focus(), 10);\n }\n }\n\n @Listen(\"paginationItemClick\")\n paginationItemClickHandler(ev: CustomEvent): void {\n const page = ev.detail.page;\n this.currentPage = page;\n this.icPageChange.emit({ value: this.currentPage! });\n }\n\n /**\n * Sets the currently displayed page.\n * @param {number} page The page number to set as the current page\n */\n @Method()\n async setCurrentPage(page: number): Promise<void> {\n if (typeof page === \"number\" && page > 0 && page <= this.pages) {\n this.currentPage = page;\n } else {\n console.error(\n \"Current page must be a number greater than zero but less than or equal to the total number of pages\"\n );\n }\n }\n\n private handleClickFirst = () => {\n this.currentPage = 1;\n this.icPageChange.emit({ value: this.currentPage });\n };\n\n private handleClickPrevious = (): void => {\n this.currentPage!--;\n this.icPageChange.emit({ value: this.currentPage! });\n };\n\n private handleClickNext = (): void => {\n this.currentPage!++;\n this.icPageChange.emit({ value: this.currentPage! });\n };\n\n private handleClickLast = (): void => {\n this.currentPage = this.pages;\n this.icPageChange.emit({ value: this.currentPage });\n };\n\n // button rendering abstracted from component render methods for clarity\n private firstButton = () => {\n return (\n <ic-button\n id=\"first-page-button\"\n aria-label=\"Go to first page\"\n theme={this.theme}\n onClick={this.handleClickFirst}\n class=\"page-button first-last\"\n disabled={this.currentPage === 1 || this.disabled}\n variant=\"icon-tertiary\"\n monochrome={this.theme == \"light\" || this.theme == \"dark\"}\n innerHTML={paginationFirstLast}\n />\n );\n };\n\n private previousButton = () => {\n return (\n <ic-button\n id=\"previous-page-button\"\n aria-label=\"Go to previous page\"\n theme={this.theme}\n onClick={this.handleClickPrevious}\n class=\"page-button next-previous flip\"\n disabled={this.currentPage === 1 || this.disabled}\n variant=\"icon-tertiary\"\n monochrome={this.theme == \"light\" || this.theme == \"dark\"}\n innerHTML={paginationNextPrevious}\n />\n );\n };\n\n private nextButton = () => {\n return (\n <ic-button\n id=\"next-page-button\"\n aria-label=\"Go to next page\"\n theme={this.theme}\n onClick={this.handleClickNext}\n class=\"page-button next-previous\"\n disabled={this.currentPage === this.pages || this.disabled}\n variant=\"icon-tertiary\"\n monochrome={this.theme == \"light\" || this.theme == \"dark\"}\n innerHTML={paginationNextPrevious}\n />\n );\n };\n\n private lastButton = () => {\n return (\n <ic-button\n id=\"last-page-button\"\n aria-label=\"Go to last page\"\n theme={this.theme}\n onClick={this.handleClickLast}\n class=\"page-button first-last flip\"\n disabled={this.currentPage === this.pages || this.disabled}\n variant=\"icon-tertiary\"\n monochrome={this.theme == \"light\" || this.theme == \"dark\"}\n innerHTML={paginationFirstLast}\n />\n );\n };\n\n private renderStartEllipsis = () => {\n return (\n <ic-pagination-item\n theme={this.theme}\n monochrome={this.monochrome}\n type=\"ellipsis\"\n id=\"start-ellipsis\"\n disabled={this.disabled}\n />\n );\n };\n\n private renderEndEllipsis = () => {\n return (\n <ic-pagination-item\n theme={this.theme}\n monochrome={this.monochrome}\n type=\"ellipsis\"\n id=\"end-ellipsis\"\n disabled={this.disabled}\n />\n );\n };\n\n private renderStartItems = () => {\n return this.startItems.map((page: number) => {\n return (\n <ic-pagination-item\n theme={this.theme}\n monochrome={this.monochrome}\n selected={page === this.currentPage}\n id={`pagination-item-${page}`}\n type=\"page\"\n page={page}\n disabled={this.disabled}\n />\n );\n });\n };\n\n private renderEndItems = () => {\n return this.endItems.map((page: number) => {\n return (\n <ic-pagination-item\n theme={this.theme}\n monochrome={this.monochrome}\n selected={page === this.currentPage}\n id={`pagination-item-${page}`}\n type=\"page\"\n page={page}\n disabled={this.disabled}\n />\n );\n });\n };\n\n private renderMiddleItems = () => {\n return this.midItems.map((page: number) => {\n return (\n <ic-pagination-item\n theme={this.theme}\n monochrome={this.monochrome}\n selected={page === this.currentPage}\n id={`pagination-item-${page}`}\n type=\"page\"\n page={page}\n disabled={this.disabled}\n />\n );\n });\n };\n\n render() {\n const {\n type,\n currentPage,\n hideCurrentPage,\n disabled,\n hideFirstAndLastPageButton,\n label,\n theme,\n monochrome,\n } = this;\n\n return (\n <Host\n class={{\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [\"ic-pagination-monochrome\"]: !!monochrome,\n }}\n >\n {type === \"simple\" && (\n <nav\n class={{\n [\"disabled\"]: !!disabled,\n }}\n role=\"navigation\"\n aria-label={this.accessibleLabel}\n >\n {hideFirstAndLastPageButton ? null : this.firstButton()}\n {this.previousButton()}\n <ic-pagination-item\n theme={this.theme}\n monochrome={this.monochrome}\n type=\"simple-current\"\n page={currentPage}\n label={label}\n class={{ [\"hide-current-page\"]: !!hideCurrentPage }}\n disabled={disabled}\n />\n {this.nextButton()}\n {hideFirstAndLastPageButton ? null : this.lastButton()}\n </nav>\n )}\n {type === \"complex\" && (\n <nav\n class={{\n [\"disabled\"]: !!disabled,\n }}\n role=\"navigation\"\n aria-label={this.accessibleLabel}\n >\n {hideFirstAndLastPageButton ? null : this.firstButton()}\n {this.previousButton()}\n {this.renderStartItems()}\n {this.startEllipsis && this.renderStartEllipsis()}\n {this.renderMiddleItems()}\n {this.endEllipsis && this.renderEndEllipsis()}\n {this.renderEndItems()}\n {this.nextButton()}\n {hideFirstAndLastPageButton ? null : this.lastButton()}\n </nav>\n )}\n {type === \"complex\" && (\n <span class=\"sr-only\" aria-live=\"polite\">\n Page {this.currentPage}\n </span>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"onBAAA,MAAMA,EAAkB,2sHACxB,MAAAC,EAAeD,E,MC0BFE,EAAU,MALvB,WAAAC,CAAAC,G,qDAQWC,KAAAC,YAAuB,MACvBD,KAAAE,SAAqB,GACrBF,KAAAG,SAAqB,GACrBH,KAAAI,cAAyB,MACzBJ,KAAAK,WAAuB,GAKxBL,KAAAM,gBAA2B,wBAKVN,KAAAO,kBAA6B,EAY7BP,KAAAQ,kBAA6B,EAY9CR,KAAAS,YAAuB,EAKvBT,KAAAU,SAAqB,MASrBV,KAAAW,gBAA4B,MAK5BX,KAAAY,2BAAuC,MAKvCZ,KAAAa,MAAiB,OAKjBb,KAAAc,WAAuB,MAevBd,KAAAe,MAAsB,UAKtBf,KAAAgB,KAA2B,SAUVhB,KAAAiB,YAAuBjB,KAAKS,YA4L7CT,KAAAkB,iBAAmB,KACzBlB,KAAKiB,YAAc,EACnBjB,KAAKmB,aAAaC,KAAK,CAAEC,MAAOrB,KAAKiB,aAAc,EAG7CjB,KAAAsB,oBAAsB,KAC5BtB,KAAKiB,cACLjB,KAAKmB,aAAaC,KAAK,CAAEC,MAAOrB,KAAKiB,aAAe,EAG9CjB,KAAAuB,gBAAkB,KACxBvB,KAAKiB,cACLjB,KAAKmB,aAAaC,KAAK,CAAEC,MAAOrB,KAAKiB,aAAe,EAG9CjB,KAAAwB,gBAAkB,KACxBxB,KAAKiB,YAAcjB,KAAKyB,MACxBzB,KAAKmB,aAAaC,KAAK,CAAEC,MAAOrB,KAAKiB,aAAc,EAI7CjB,KAAA0B,YAAc,IAElBC,EAAA,aACEC,GAAG,oBAAmB,aACX,mBACXb,MAAOf,KAAKe,MACZc,QAAS7B,KAAKkB,iBACdY,MAAM,yBACNpB,SAAUV,KAAKiB,cAAgB,GAAKjB,KAAKU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D,IAAA,2CAAM1D,MAAM,UAAS,YAAW,UAAQ,QAChC9B,KAAKiB,a","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as i,c as e,h as t,H as o,g as a}from"./p-8e4e97b4.js";import{d as c,g as s,r,o as n,a as d,i as l,b as h}from"./p-a5658054.js";import"./p-bddf799a.js";const p=`<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M10 0C4.47 0 0 4.47 0 10C0 15.53 4.47 20 10 20C15.53 20 20 15.53 20 10C20 4.47 15.53 0 10 0ZM15 13.59L13.59 15L10 11.41L6.41 15L5 13.59L8.59 10L5 6.41L6.41 5L10 8.59L13.59 5L15 6.41L11.41 10L15 13.59Z" fill="currentColor"/>\n</svg>\n`;const b='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block;max-width:100%;vertical-align:middle}:host(.ic-chip-dismissed){display:none}.chip{--chip-bg-color:transparent;--chip-hover-bg:var(--ic-chip-action-hover);--chip-pressed-bg:var(--ic-chip-action-pressed);display:flex;padding:calc(var(--ic-space-xxs) - var(--ic-space-1px)) var(--ic-space-xxs);font-size:0.875rem;border-radius:var(--ic-space-md);text-align:left;text-decoration:none;position:relative;background-color:var(--chip-bg-color);border:var(--ic-border-width) solid transparent;justify-content:space-between;width:-moz-fit-content;width:fit-content;box-sizing:border-box;max-width:100%}.chip.full-width{width:100%}:host(.ic-chip-full-width){width:100%}@media (prefers-reduced-motion: no-preference){.chip{transition:var(--ic-easing-transition-fast)}}.chip.small{padding:var(--ic-space-1px) var(--ic-space-xxxs);border-radius:calc(var(--ic-space-md) - var(--ic-space-xxxs))}.chip.large{padding:calc(var(--ic-space-xs) - var(--ic-space-1px)) var(--ic-space-xs);border-radius:calc(var(--ic-space-md) + var(--ic-space-xxs))}.label{padding:0 var(--ic-space-xs)}.chip:focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);z-index:1}ic-tooltip:focus-within{z-index:1}.filled{--chip-bg-color:var(\n --chip-custom-color,\n var(--ic-chip-background-filled-default)\n );--ic-typography-color:var(\n --chip-custom-foreground-color,\n var(--ic-chip-label)\n );color:var(--chip-custom-foreground-color, var(--ic-chip-label))}.filled.disabled{--chip-bg-color:var(--ic-chip-background-filled-inactive)}:host(.ic-chip-dark-text){--chip-custom-foreground-color:var(--ic-architectural-black)}:host(.ic-chip-light-text){--chip-custom-foreground-color:var(--ic-architectural-white)}:host(.ic-chip-dark-text) .chip.filled.hovered:not(:focus-within){--chip-hover-bg:var(--ic-action-dark-bg-hover)}:host(.ic-chip-dark-text) .chip.filled:focus-within{--chip-pressed-bg:var(--ic-action-dark-bg-pressed)}:host(.ic-chip-light-text) .chip.filled.hovered:not(:focus-within){--chip-hover-bg:var(--ic-action-light-bg-hover)}:host(.ic-chip-light-text) .chip.filled:focus-within{--chip-pressed-bg:var(--ic-action-light-bg-pressed)}.outlined{color:var(--ic-chip-outline-label);border-color:var(--chip-custom-color, var(--ic-chip-outline));padding:calc(var(--ic-space-xxs));--ic-typography-color:var(--ic-chip-outline-label)}.outlined.disabled{border:var(--ic-border-disabled);border-color:var(--ic-chip-outline-inactive)}.chip.disabled ic-typography{--ic-typography-color:var(--ic-chip-label-inactive)}.dismiss-icon{border:none;border-radius:50%;padding:0;color:currentcolor;background:none;cursor:pointer;margin:var(--ic-space-xxxs);height:calc(var(--ic-space-lg) - var(--ic-space-xxs));width:calc(var(--ic-space-lg) - var(--ic-space-xxs))}.dismiss-icon:focus{outline:var(--ic-hc-focus-outline)}.dismiss-icon[disabled]{pointer-events:none;color:var(--ic-chip-icon-inactive)}.icon{padding:var(--ic-space-xxxs);box-sizing:border-box}.icon,ic-tooltip{width:var(--ic-space-lg);height:var(--ic-space-lg)}.chip.disabled path,.chip.disabled ::slotted(svg){fill:var(--ic-chip-icon-inactive)}.outlined.non-transparent{background-color:var(--ic-chip-outline-background)}:host .chip.hovered:not(:focus-within){background-image:linear-gradient(var(--chip-hover-bg) 0 0)}:host .chip:focus-within{background-image:linear-gradient(var(--chip-pressed-bg) 0 0)}.sr-only{position:absolute;left:-9999px}.sr-only:dir(rtl){right:-9999px}@media (forced-colors: active){.chip{border:var(--ic-border-hc)}.chip.disabled{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}.chip.disabled ic-typography{--ic-typography-color:GrayText}.chip.disabled path,.chip.disabled ::slotted(svg){fill:GrayText}.chip:focus-within{outline:none;border-color:Highlight}}';const u=b;const g=class{constructor(t){i(this,t);this.icDismiss=e(this,"icDismiss",7);this.foregroundColor=null;this.hovered=false;this.visible=true;this.disabled=false;this.dismissible=false;this.dismissLabel="Dismiss";this.fullWidth=false;this.size="medium";this.theme="inherit";this.transparentBackground=true;this.variant="filled";this.dismissAction=()=>{this.icDismiss.emit()};this.mouseEnterHandler=()=>{this.hovered=true};this.mouseLeaveHandler=()=>{this.hovered=false}}customColorHandler(){const i=this.customColor&&c(this.customColor);if(!i){this.foregroundColor=null;return}const{r:e,g:t,b:o,a}=i;this.foregroundColor=s((e*299+t*587+o*114)/1e3);this.el.setAttribute("style",`--chip-custom-color: rgba(${e}, ${t}, ${o}, ${a});`)}watchDisabledHandler(){r(this.disabled,this.el)}disconnectedCallback(){var i;(i=this.hostMutationObserver)===null||i===void 0?void 0:i.disconnect()}componentWillLoad(){r(this.disabled,this.el);this.customColorHandler()}componentDidLoad(){n([{prop:this.label,propName:"label"}],"Chip");this.hostMutationObserver=new MutationObserver((i=>d(i,["icon","badge"],this)));this.hostMutationObserver.observe(this.el,{childList:true})}handleClick(){this.visible=!this.visible}async setFocus(){var i;(i=this.buttonEl)===null||i===void 0?void 0:i.focus()}render(){const{label:i,variant:e,size:a,dismissible:c,visible:s,disabled:r,hovered:n,theme:d,foregroundColor:b,dismissLabel:u,transparentBackground:g,fullWidth:f}=this;const m=`${i} chip`;return t(o,{key:"5eddf76a82ea1c0589a664c6553dadbf4dbda7c1",class:{"ic-chip-dismissed":!s,[`ic-theme-${d}`]:d!=="inherit",[`ic-chip-${b}-text`]:e==="filled"&&!!b,"ic-chip-full-width":f}},s&&t("div",{key:"c58c911f4373c48d04fe4f4f4295210bf32f6260",class:{chip:true,[`${e}`]:true,[`${a}`]:true,disabled:r,dismissible:c,hovered:n,"non-transparent":e==="outlined"&&!g,"full-width":f}},l(this.el,"icon")&&t("div",{key:"7eeadeb6eee49ac890dc1c52e39cd0cea4df7c01",class:"icon"},t("slot",{key:"ea4df10a163a8c878a7f700696b4ddcc423a213a",name:"icon"})),t("ic-typography",{key:"2bbdbd7e1c5360a15616c52649dd7388fcaa417f",variant:"label","apply-vertical-margins":false,class:{label:true,"in-ag-grid":h(this.el)}},t("span",{key:"3085a661aaa96d6b955cc95240a3f5322e5fdf8a"},i)),c&&t("ic-tooltip",{key:"e876238e430c974fa1c3513f7dea201d44a36c8e",label:u,target:"dismiss-icon",class:{"tooltip-disabled":r}},t("button",{key:"125f60aca78da345de3b1e03751af2b8b3e196d2",id:"dismiss-icon",class:"dismiss-icon",ref:i=>this.buttonEl=i,"aria-label":`${u} ${m}`,disabled:r,tabindex:r?-1:0,onClick:this.dismissAction,onMouseEnter:this.mouseEnterHandler,onMouseLeave:this.mouseLeaveHandler,innerHTML:p})),l(this.el,"badge")&&t("slot",{key:"688e1ad7f6b8bfab9cfa4649d7f515c2d5ae37c1",name:"badge"})),c&&t("div",{key:"45cb6d6e91a9e0d0c0715044ad40fa6da5cf100b",class:"sr-only","aria-live":"polite"},!s?`Dismissed ${m}`:""))}static get delegatesFocus(){return true}get el(){return a(this)}static get watchers(){return{customColor:["customColorHandler"],disabled:["watchDisabledHandler"]}}};g.style=u;export{g as ic_chip};
|
|
2
|
+
//# sourceMappingURL=p-a7645717.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["icChipCss","IcChipStyle0","Chip","constructor","hostRef","this","foregroundColor","hovered","visible","disabled","dismissible","dismissLabel","fullWidth","size","theme","transparentBackground","variant","dismissAction","icDismiss","emit","mouseEnterHandler","mouseLeaveHandler","customColorHandler","colorRGBA","customColor","convertToRGBA","r","g","b","a","getBrandForegroundAppearance","el","setAttribute","watchDisabledHandler","removeDisabledFalse","disconnectedCallback","_a","hostMutationObserver","disconnect","componentWillLoad","componentDidLoad","onComponentRequiredPropUndefined","prop","label","propName","MutationObserver","mutationList","renderDynamicChildSlots","observe","childList","handleClick","setFocus","buttonEl","focus","render","ariaLabel","h","Host","key","class","chip","isSlotUsed","name","isElInAGGrid","target","id","ref","tabindex","onClick","onMouseEnter","onMouseLeave","innerHTML","dismissIcon"],"sources":["src/components/ic-chip/ic-chip.css?tag=ic-chip&encapsulation=shadow","src/components/ic-chip/ic-chip.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: inline-block;\n max-width: 100%;\n vertical-align: middle;\n}\n\n:host(.ic-chip-dismissed) {\n display: none;\n}\n\n.chip {\n --chip-bg-color: transparent;\n --chip-hover-bg: var(--ic-chip-action-hover);\n --chip-pressed-bg: var(--ic-chip-action-pressed);\n\n display: flex;\n padding: calc(var(--ic-space-xxs) - var(--ic-space-1px)) var(--ic-space-xxs);\n font-size: 0.875rem;\n border-radius: var(--ic-space-md);\n text-align: left;\n text-decoration: none;\n position: relative;\n background-color: var(--chip-bg-color);\n border: var(--ic-border-width) solid transparent;\n justify-content: space-between;\n width: fit-content;\n box-sizing: border-box;\n max-width: 100%;\n}\n\n.chip.full-width {\n width: 100%;\n}\n\n:host(.ic-chip-full-width) {\n width: 100%;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .chip {\n transition: var(--ic-easing-transition-fast);\n }\n}\n\n.chip.small {\n padding: var(--ic-space-1px) var(--ic-space-xxxs);\n border-radius: calc(var(--ic-space-md) - var(--ic-space-xxxs));\n}\n\n.chip.large {\n padding: calc(var(--ic-space-xs) - var(--ic-space-1px)) var(--ic-space-xs);\n border-radius: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n.label {\n padding: 0 var(--ic-space-xs);\n}\n\n.chip:focus-within {\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n}\n\nic-tooltip:focus-within {\n z-index: 1;\n}\n\n.filled {\n --chip-bg-color: var(\n --chip-custom-color,\n var(--ic-chip-background-filled-default)\n );\n --ic-typography-color: var(\n --chip-custom-foreground-color,\n var(--ic-chip-label)\n );\n\n color: var(--chip-custom-foreground-color, var(--ic-chip-label));\n}\n\n.filled.disabled {\n --chip-bg-color: var(--ic-chip-background-filled-inactive);\n}\n\n:host(.ic-chip-dark-text) {\n --chip-custom-foreground-color: var(--ic-architectural-black);\n}\n\n:host(.ic-chip-light-text) {\n --chip-custom-foreground-color: var(--ic-architectural-white);\n}\n\n:host(.ic-chip-dark-text) .chip.filled.hovered:not(:focus-within) {\n --chip-hover-bg: var(--ic-action-dark-bg-hover);\n}\n\n:host(.ic-chip-dark-text) .chip.filled:focus-within {\n --chip-pressed-bg: var(--ic-action-dark-bg-pressed);\n}\n\n:host(.ic-chip-light-text) .chip.filled.hovered:not(:focus-within) {\n --chip-hover-bg: var(--ic-action-light-bg-hover);\n}\n\n:host(.ic-chip-light-text) .chip.filled:focus-within {\n --chip-pressed-bg: var(--ic-action-light-bg-pressed);\n}\n\n.outlined {\n color: var(--ic-chip-outline-label);\n border-color: var(--chip-custom-color, var(--ic-chip-outline));\n padding: calc(var(--ic-space-xxs));\n\n --ic-typography-color: var(--ic-chip-outline-label);\n}\n\n.outlined.disabled {\n border: var(--ic-border-disabled);\n border-color: var(--ic-chip-outline-inactive);\n}\n\n.chip.disabled ic-typography {\n --ic-typography-color: var(--ic-chip-label-inactive);\n}\n\n.dismiss-icon {\n border: none;\n border-radius: 50%;\n padding: 0;\n color: currentcolor;\n background: none;\n cursor: pointer;\n margin: var(--ic-space-xxxs);\n height: calc(var(--ic-space-lg) - var(--ic-space-xxs));\n width: calc(var(--ic-space-lg) - var(--ic-space-xxs));\n}\n\n.dismiss-icon:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n.dismiss-icon[disabled] {\n pointer-events: none;\n color: var(--ic-chip-icon-inactive);\n}\n\n.icon {\n padding: var(--ic-space-xxxs);\n box-sizing: border-box;\n}\n\n.icon,\nic-tooltip {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n.chip.disabled path,\n.chip.disabled ::slotted(svg) {\n fill: var(--ic-chip-icon-inactive);\n}\n\n.outlined.non-transparent {\n background-color: var(--ic-chip-outline-background);\n}\n\n:host .chip.hovered:not(:focus-within) {\n background-image: linear-gradient(var(--chip-hover-bg) 0 0);\n}\n\n:host .chip:focus-within {\n background-image: linear-gradient(var(--chip-pressed-bg) 0 0);\n}\n\n.sr-only {\n position: absolute;\n left: -9999px;\n}\n\n.sr-only:dir(rtl) {\n right: -9999px;\n}\n\n@media (forced-colors: active) {\n .chip {\n border: var(--ic-border-hc);\n }\n\n .chip.disabled {\n appearance: none;\n border-color: GrayText;\n }\n\n .chip.disabled ic-typography {\n --ic-typography-color: GrayText;\n }\n\n .chip.disabled path,\n .chip.disabled ::slotted(svg) {\n fill: GrayText;\n }\n\n .chip:focus-within {\n outline: none;\n border-color: Highlight;\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Element,\n Method,\n Watch,\n Host,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n removeDisabledFalse,\n convertToRGBA,\n isElInAGGrid,\n getBrandForegroundAppearance,\n renderDynamicChildSlots,\n} from \"../../utils/helpers\";\nimport {\n IcBrandForegroundNoDefault,\n IcColor,\n IcEmphasisType,\n IcSizes,\n IcThemeMode,\n} from \"../../utils/types\";\nimport dismissIcon from \"../../assets/dismiss-icon.svg\";\n\n/**\n * @slot icon - Content will be rendered at the start of the chip.\n * @slot badge - Badge component overlaying the top right of the chip.\n */\n@Component({\n tag: \"ic-chip\",\n styleUrl: \"ic-chip.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Chip {\n private buttonEl?: HTMLButtonElement;\n private hostMutationObserver?: MutationObserver;\n\n @Element() el: HTMLIcChipElement;\n\n @State() foregroundColor: IcBrandForegroundNoDefault | null = null;\n @State() hovered = false;\n @State() visible = true;\n\n /**\n * The custom chip colour. This will override the theme colour.\n * Can be a hex value e.g. \"#ff0000\", RGB e.g. \"rgb(255, 0, 0)\", or RGBA e.g. \"rgba(255, 0, 0, 1)\".\n */\n @Prop() customColor?: IcColor;\n @Watch(\"customColor\")\n customColorHandler(): void {\n const colorRGBA = this.customColor && convertToRGBA(this.customColor);\n if (!colorRGBA) {\n this.foregroundColor = null;\n return;\n }\n\n const { r, g, b, a } = colorRGBA;\n this.foregroundColor = getBrandForegroundAppearance(\n (r * 299 + g * 587 + b * 114) / 1000\n );\n this.el.setAttribute(\n \"style\",\n `--chip-custom-color: rgba(${r}, ${g}, ${b}, ${a});`\n );\n }\n\n /**\n * If `true`, the chip will appear disabled.\n */\n @Prop() disabled = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the chip will have a close button at the end to dismiss it.\n */\n @Prop() dismissible = false;\n\n /**\n * The text in the dismiss button tooltip and aria label. Makes the user aware of the action resulting from clicking the 'Dismiss chip' button.\n */\n @Prop() dismissLabel = \"Dismiss\";\n\n /**\n * Specify whether the chip fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n @Prop() fullWidth = false;\n\n /**\n * The text rendered within the chip.\n */\n @Prop() label!: string;\n\n /**\n * The size of the chip.\n */\n @Prop() size: IcSizes = \"medium\";\n /**\n * Sets the chip to the dark or light theme colors. \"inherit\" will set the color based on the system settings or ic-theme component.\n * Setting the \"customColor\" prop will override this.\n */\n @Prop() theme: IcThemeMode = \"inherit\";\n\n /**\n * If `true`, the outlined variant of chip will have a transparent background rather than the theme defined color.\n */\n @Prop() transparentBackground = true;\n\n /**\n * The emphasis of the chip.\n */\n @Prop() variant: IcEmphasisType = \"filled\";\n\n /**\n * Is emitted when the user dismisses the chip.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n this.customColorHandler();\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Chip\"\n );\n\n this.hostMutationObserver = new MutationObserver((mutationList) =>\n renderDynamicChildSlots(mutationList, [\"icon\", \"badge\"], this)\n );\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n\n /**\n * Sets focus on the chip.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.buttonEl?.focus();\n }\n\n private dismissAction = () => {\n this.icDismiss.emit();\n };\n\n private mouseEnterHandler = () => {\n this.hovered = true;\n };\n\n private mouseLeaveHandler = () => {\n this.hovered = false;\n };\n\n render() {\n const {\n label,\n variant,\n size,\n dismissible,\n visible,\n disabled,\n hovered,\n theme,\n foregroundColor,\n dismissLabel,\n transparentBackground,\n fullWidth,\n } = this;\n\n const ariaLabel = `${label} chip`;\n\n return (\n <Host\n class={{\n \"ic-chip-dismissed\": !visible,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [`ic-chip-${foregroundColor}-text`]:\n variant === \"filled\" && !!foregroundColor,\n \"ic-chip-full-width\": fullWidth,\n }}\n >\n {visible && (\n <div\n class={{\n chip: true,\n [`${variant}`]: true,\n [`${size}`]: true,\n disabled,\n dismissible,\n hovered,\n \"non-transparent\":\n variant === \"outlined\" && !transparentBackground,\n \"full-width\": fullWidth,\n }}\n >\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography\n variant=\"label\"\n apply-vertical-margins={false}\n class={{ label: true, \"in-ag-grid\": isElInAGGrid(this.el) }}\n >\n <span>{label}</span>\n </ic-typography>\n {dismissible && (\n <ic-tooltip\n label={dismissLabel}\n target=\"dismiss-icon\"\n class={{ \"tooltip-disabled\": disabled }}\n >\n <button\n id=\"dismiss-icon\"\n class=\"dismiss-icon\"\n ref={(el) => (this.buttonEl = el)}\n aria-label={`${dismissLabel} ${ariaLabel}`}\n disabled={disabled}\n tabindex={disabled ? -1 : 0}\n onClick={this.dismissAction}\n onMouseEnter={this.mouseEnterHandler}\n onMouseLeave={this.mouseLeaveHandler}\n innerHTML={dismissIcon}\n ></button>\n </ic-tooltip>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n </div>\n )}\n {dismissible && (\n <div class=\"sr-only\" aria-live=\"polite\">\n {!visible ? `Dismissed ${ariaLabel}` : \"\"}\n </div>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"weAAA,MAAMA,EAAY,2jMAClB,MAAAC,EAAeD,E,MCyCFE,EAAI,MAPjB,WAAAC,CAAAC,G,+CAaWC,KAAAC,gBAAqD,KACrDD,KAAAE,QAAU,MACVF,KAAAG,QAAU,KA4BXH,KAAAI,SAAW,MASXJ,KAAAK,YAAc,MAKdL,KAAAM,aAAe,UAMfN,KAAAO,UAAY,MAUZP,KAAAQ,KAAgB,SAKhBR,KAAAS,MAAqB,UAKrBT,KAAAU,sBAAwB,KAKxBV,KAAAW,QAA0B,SA2C1BX,KAAAY,cAAgB,KACtBZ,KAAKa,UAAUC,MAAM,EAGfd,KAAAe,kBAAoB,KAC1Bf,KAAKE,QAAU,IAAI,EAGbF,KAAAgB,kBAAoB,KAC1BhB,KAAKE,QAAU,KAAK,C,CArHtB,kBAAAe,GACE,MAAMC,EAAYlB,KAAKmB,aAAeC,EAAcpB,KAAKmB,aACzD,IAAKD,EAAW,CACdlB,KAAKC,gBAAkB,KACvB,M,CAGF,MAAMoB,EAAEA,EAACC,EAAE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WACAC,cACAH,UACA,kBACES,IAAY,aAAeD,EAC7B,aAAcH,IAGfiD,EAAWxD,KAAK0B,GAAI,SACnByB,EAAA,OAAAE,IAAA,2CAAKC,MAAM,QACTH,EAAA,QAAAE,IAAA,2CAAMI,KAAK,UAGfN,EAAA,iBAAAE,IAAA,2CACE1C,QAAQ,QAAO,yBACS,MACxB2C,MAAO,CAAEhB,MAAO,KAAM,aAAcoB,EAAa1D,KAAK0B,MAEtDyB,EAAA,QAAAE,IAAA,4CAAOf,IAERjC,GACC8C,EAAA,cAAAE,IAAA,2CACEf,MAAOhC,EACPqD,OAAO,eACPL,MAAO,CAAE,mBAAoBlD,IAE7B+C,EAAA,UAAAE,IAAA,2CACEO,GAAG,eACHN,MAAM,eACNO,IAAMnC,GAAQ1B,KAAK+C,SAAWrB,EAAG,aACrB,GAAGpB,KAAgB4C,IAC/B9C,SAAUA,EACV0D,SAAU1D,GAAY,EAAI,EAC1B2D,QAAS/D,KAAKY,cACdoD,aAAchE,KAAKe,kBACnBkD,aAAcjE,KAAKgB,kBACnBkD,UAAWC,KAIhBX,EAAWxD,KAAK0B,GAAI,UAAYyB,EAAA,QAAAE,IAAA,2CAAMI,KAAK,WAG/CpD,GACC8C,EAAA,OAAAE,IAAA,2CAAKC,MAAM,UAAS,YAAW,WAC3BnD,EAAU,aAAa+C,IAAc,I","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,h as i,H as s,g as e}from"./p-8e4e97b4.js";import{p as h,h as l}from"./p-a5658054.js";import"./p-bddf799a.js";const o=":host{display:flex;width:100%}.step-item-list{display:flex;margin:0;padding:0}:host(.ic-stepper-default:not(.ic-stepper-aligned-left)) .step-item-list{flex:auto}:host(.ic-stepper-compact) ul ::slotted(ic-step){display:none}:host(.ic-stepper-compact) ul ::slotted(ic-step.show){display:flex}:host(.ic-stepper-compact) ul ::slotted(ic-step.hide){display:none;opacity:0;visibility:hidden}";const d=o;const n=class{constructor(i){t(this,i);var s;this.resizeObserver=null;this.visuallyHidden="visually-hidden";this.alignedFullWidth=true;this.autoSetStepTitles=true;this.lastStepWidth=0;this.noOfResizes=0;this.stepperWidth=(s=document.querySelector("ic-stepper"))===null||s===void 0?void 0:s.getBoundingClientRect().width;this.stepTypes=[];this.variantOverride=this.variant!=="compact";this.aligned="full-width";this.connectorWidth=100;this.hideStepInfo=false;this.icI18n={next:"Next",step:"Step",steps:"Steps",of:"of",lastStep:"Last step",completed:"Completed",notRequired:"Not required",required:"Required",optional:"Optional"};this.theme="inherit";this.variant="default";this.stepHeading=(t,i=false)=>{var s,e,h,l;if(t.hasAttribute("heading")&&t.getAttribute("heading")!==""){return t.getAttribute("heading")||undefined}const o=(s=t.shadowRoot)===null||s===void 0?void 0:s.querySelector('slot[name="heading"]');const d=((e=o===null||o===void 0?void 0:o.assignedNodes)===null||e===void 0?void 0:e.call(o))||[];for(const t of d){const i=t.nodeType===Node.TEXT_NODE?(h=t.textContent)===null||h===void 0?void 0:h.trim():(l=t.innerText)===null||l===void 0?void 0:l.trim();if(i)return i}if(i&&t.heading){return t.heading}return undefined};this.getChildren=()=>{this.steps=Array.from(this.el.querySelectorAll("ic-step"));this.stepsWithStepTitles=this.steps.filter((t=>!!this.stepHeading(t,false)))};this.checkStepTitles=()=>{if(this.stepsWithStepTitles.length<this.steps.length&&this.variantOverride&&this.variant==="compact"){this.noOfResizes=this.noOfResizes+1;if(this.noOfResizes===1){console.error(`The prop 'heading' is required for all steps of the Stepper component (compact variant)`)}}};this.setStepTypes=()=>{this.getChildren();this.stepTypes=[];for(let t=0;t<this.steps.length;t++){this.stepTypes.push("active")}};this.setStepperWidth=()=>{this.alignedFullWidth=this.variant==="default"&&this.aligned==="full-width";const t=this.steps[this.steps.length-1];t.style.maxWidth="none";if(this.alignedFullWidth){this.stepperWidth=this.el.offsetWidth;t.style.maxWidth=h(`${this.stepperWidth/this.steps.length}px`);this.lastStepWidth=t.offsetWidth}};this.initialiseStepStates=()=>{this.steps.forEach(((t,i)=>{var s,e,l;if(this.icI18n!==undefined){t.icI18n=this.icI18n}t.variant=this.variant;t.stepNum=i+1;t.lastStep=i===this.steps.length-1;t.lastStepNum=this.steps.length;if(t.type!=="current"){t.current=false;this.stepTypes[i]=t.type}else{t.current=true}const o=t.shadowRoot&&t.shadowRoot.querySelector(".step > .heading-area");if(this.stepsWithStepTitles.length==0&&this.variantOverride){if(this.variant==="compact"){this.autoSetStepTitles=true;if(this.autoSetStepTitles){t.heading="Step "+t.stepNum;o&&((s=o===null||o===void 0?void 0:o.querySelector(".heading"))===null||s===void 0?void 0:s.setAttribute("aria-hidden","true"))}}if(this.variant==="default"){this.autoSetStepTitles=false;if(!this.autoSetStepTitles){t.heading=undefined;o&&((e=o===null||o===void 0?void 0:o.querySelector(".heading"))===null||e===void 0?void 0:e.removeAttribute("aria-hidden"))}}}if(this.variant==="compact"){if(t.current===true||t.type==="current"){t.classList.remove("hide");t.classList.add("show")}else if(t.classList.contains("show")){t.classList.remove("show");t.classList.add("hide")}if(!t.lastStep){const s=this.steps[i+1];t.nextStepHeading=this.stepHeading(s,true);t.progress=t.stepNum/this.steps.length*100}else if(t.lastStep&&this.stepTypes[i]!=="completed"){t.progress=95}else{t.progress=100}if(this.hideStepInfo&&o!==null){o.classList.remove(this.visuallyHidden)}t.compactStepStyling=this.stepTypes[i]}if(this.variant==="default"){if(!t.lastStep){if(this.alignedFullWidth&&this.stepperWidth!==undefined){t.style.width=h(`${(this.stepperWidth-this.lastStepWidth)/(this.steps.length-1)}px`);t.style.minWidth=h("148px")}}else if(t.lastStep){t.classList.add("last-step");if(this.alignedFullWidth){t.style.maxWidth=`${this.lastStepWidth}px`}else if(this.connectorWidth){t.style.maxWidth=this.connectorWidth>100?h(`${this.connectorWidth+48}px`):h("148px")}}if(this.aligned==="left"&&this.connectorWidth){t.style.width=this.connectorWidth>100?h(`${this.connectorWidth+48}px`):h("148px");const i=(l=t.shadowRoot)===null||l===void 0?void 0:l.querySelector(".step > .step-top > .step-connect");if(i){i.style.width=this.connectorWidth>100?h(`${this.connectorWidth}px`):h("100px")}}if(this.hideStepInfo&&o!==null){o.classList.add(this.visuallyHidden)}}}))};this.setHideStepInfo=()=>{this.steps.forEach((t=>{var i,s,e;const h=(i=t.shadowRoot)===null||i===void 0?void 0:i.querySelector(".step > .heading-area");if(h){if(this.hideStepInfo){(s=h.classList)===null||s===void 0?void 0:s.add(this.visuallyHidden)}else{(e=h.classList)===null||e===void 0?void 0:e.remove(this.visuallyHidden)}}}))};this.overrideVariant=()=>{if(this.variantOverride){let t=148*this.steps.length;if(this.aligned==="left"&&this.connectorWidth&&this.connectorWidth>100){t=(this.connectorWidth+48)*this.steps.length}if(this.el.clientWidth<t){this.variant="compact"}else{this.variant="default"}}};this.resizeObserverCallback=()=>{this.getChildren();this.checkStepTitles();this.overrideVariant();this.setStepperWidth();this.initialiseStepStates();this.handleThemeChange()};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.el)}}handleThemeChange(){this.getChildren();this.steps.forEach((t=>{t.theme=this.theme}))}handlePropChange(){this.setHideStepInfo();this.getChildren()}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}componentWillLoad(){this.setStepTypes();this.handleThemeChange();if(this.variant==="compact"){this.variantOverride=false}}componentWillRender(){this.initialiseStepStates()}componentDidLoad(){l(this.runResizeObserver)}render(){return i(s,{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,h as i,H as s,g as e}from"./p-8e4e97b4.js";import{p as h,h as l}from"./p-a5658054.js";import"./p-bddf799a.js";const o=":host{display:flex;width:100%}.step-item-list{display:flex;margin:0;padding:0}:host(.ic-stepper-default:not(.ic-stepper-aligned-left)) .step-item-list{flex:auto}:host(.ic-stepper-compact) ul ::slotted(ic-step){display:none}:host(.ic-stepper-compact) ul ::slotted(ic-step.show){display:flex}:host(.ic-stepper-compact) ul ::slotted(ic-step.hide){display:none;opacity:0;visibility:hidden}";const d=o;const n=class{constructor(i){t(this,i);var s;this.resizeObserver=null;this.visuallyHidden="visually-hidden";this.alignedFullWidth=true;this.autoSetStepTitles=true;this.lastStepWidth=0;this.noOfResizes=0;this.stepperWidth=(s=document.querySelector("ic-stepper"))===null||s===void 0?void 0:s.getBoundingClientRect().width;this.stepTypes=[];this.variantOverride=this.variant!=="compact";this.aligned="full-width";this.connectorWidth=100;this.hideStepInfo=false;this.icI18n={next:"Next",step:"Step",steps:"Steps",of:"of",lastStep:"Last step",completed:"Completed",notRequired:"Not required",required:"Required",optional:"Optional"};this.theme="inherit";this.variant="default";this.stepHeading=(t,i=false)=>{var s,e,h,l;if(t.hasAttribute("heading")&&t.getAttribute("heading")!==""){return t.getAttribute("heading")||undefined}const o=(s=t.shadowRoot)===null||s===void 0?void 0:s.querySelector('slot[name="heading"]');const d=((e=o===null||o===void 0?void 0:o.assignedNodes)===null||e===void 0?void 0:e.call(o))||[];for(const t of d){const i=t.nodeType===Node.TEXT_NODE?(h=t.textContent)===null||h===void 0?void 0:h.trim():(l=t.innerText)===null||l===void 0?void 0:l.trim();if(i)return i}if(i&&t.heading){return t.heading}return undefined};this.getChildren=()=>{this.steps=Array.from(this.el.querySelectorAll("ic-step"));this.stepsWithStepTitles=this.steps.filter((t=>!!this.stepHeading(t,false)))};this.checkStepTitles=()=>{if(this.stepsWithStepTitles.length<this.steps.length&&this.variantOverride&&this.variant==="compact"){this.noOfResizes=this.noOfResizes+1;if(this.noOfResizes===1){console.error(`The prop 'heading' is required for all steps of the Stepper component (compact variant)`)}}};this.setStepTypes=()=>{this.getChildren();this.stepTypes=[];for(let t=0;t<this.steps.length;t++){this.stepTypes.push("active")}};this.setStepperWidth=()=>{this.alignedFullWidth=this.variant==="default"&&this.aligned==="full-width";const t=this.steps[this.steps.length-1];t.style.maxWidth="none";if(this.alignedFullWidth){this.stepperWidth=this.el.offsetWidth;t.style.maxWidth=h(`${this.stepperWidth/this.steps.length}px`);this.lastStepWidth=t.offsetWidth}};this.initialiseStepStates=()=>{this.steps.forEach(((t,i)=>{var s,e,l;if(this.icI18n!==undefined){t.icI18n=this.icI18n}t.variant=this.variant;t.stepNum=i+1;t.lastStep=i===this.steps.length-1;t.lastStepNum=this.steps.length;if(t.type!=="current"){t.current=false;this.stepTypes[i]=t.type}else{t.current=true}const o=t.shadowRoot&&t.shadowRoot.querySelector(".step > .heading-area");if(this.stepsWithStepTitles.length==0&&this.variantOverride){if(this.variant==="compact"){this.autoSetStepTitles=true;if(this.autoSetStepTitles){t.heading="Step "+t.stepNum;o&&((s=o===null||o===void 0?void 0:o.querySelector(".heading"))===null||s===void 0?void 0:s.setAttribute("aria-hidden","true"))}}if(this.variant==="default"){this.autoSetStepTitles=false;if(!this.autoSetStepTitles){t.heading=undefined;o&&((e=o===null||o===void 0?void 0:o.querySelector(".heading"))===null||e===void 0?void 0:e.removeAttribute("aria-hidden"))}}}if(this.variant==="compact"){if(t.current===true||t.type==="current"){t.classList.remove("hide");t.classList.add("show")}else if(t.classList.contains("show")){t.classList.remove("show");t.classList.add("hide")}if(!t.lastStep){const s=this.steps[i+1];t.nextStepHeading=this.stepHeading(s,true);t.progress=t.stepNum/this.steps.length*100}else if(t.lastStep&&this.stepTypes[i]!=="completed"){t.progress=95}else{t.progress=100}if(this.hideStepInfo&&o!==null){o.classList.remove(this.visuallyHidden)}t.compactStepStyling=this.stepTypes[i]}if(this.variant==="default"){if(!t.lastStep){if(this.alignedFullWidth&&this.stepperWidth!==undefined){t.style.width=h(`${(this.stepperWidth-this.lastStepWidth)/(this.steps.length-1)}px`);t.style.minWidth=h("148px")}}else if(t.lastStep){t.classList.add("last-step");if(this.alignedFullWidth){t.style.maxWidth=`${this.lastStepWidth}px`}else if(this.connectorWidth){t.style.maxWidth=this.connectorWidth>100?h(`${this.connectorWidth+48}px`):h("148px")}}if(this.aligned==="left"&&this.connectorWidth){t.style.width=this.connectorWidth>100?h(`${this.connectorWidth+48}px`):h("148px");const i=(l=t.shadowRoot)===null||l===void 0?void 0:l.querySelector(".step > .step-top > .step-connect");if(i){i.style.width=this.connectorWidth>100?h(`${this.connectorWidth}px`):h("100px")}}if(this.hideStepInfo&&o!==null){o.classList.add(this.visuallyHidden)}}}))};this.setHideStepInfo=()=>{this.steps.forEach((t=>{var i,s,e;const h=(i=t.shadowRoot)===null||i===void 0?void 0:i.querySelector(".step > .heading-area");if(h){if(this.hideStepInfo){(s=h.classList)===null||s===void 0?void 0:s.add(this.visuallyHidden)}else{(e=h.classList)===null||e===void 0?void 0:e.remove(this.visuallyHidden)}}}))};this.overrideVariant=()=>{if(this.variantOverride){let t=148*this.steps.length;if(this.aligned==="left"&&this.connectorWidth&&this.connectorWidth>100){t=(this.connectorWidth+48)*this.steps.length}if(this.el.clientWidth<t){this.variant="compact"}else{this.variant="default"}}};this.resizeObserverCallback=()=>{this.getChildren();this.checkStepTitles();this.overrideVariant();this.setStepperWidth();this.initialiseStepStates();this.handleThemeChange()};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.el)}}handleThemeChange(){this.getChildren();this.steps.forEach((t=>{t.theme=this.theme}))}handlePropChange(){this.setHideStepInfo();this.getChildren()}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}componentWillLoad(){this.setStepTypes();this.handleThemeChange();if(this.variant==="compact"){this.variantOverride=false}}componentWillRender(){this.initialiseStepStates()}componentDidLoad(){l(this.runResizeObserver)}render(){return i(s,{key:"e2ac3f9e87779cfd5582ab705cf7a4d1424f20b7",class:{[`ic-stepper-${this.variant}`]:true,["ic-stepper-aligned-left"]:this.variant==="default"&&this.aligned==="left",[`ic-theme-${this.theme}`]:this.theme!=="inherit"}},i("ul",{key:"86ee53977017f83030114eaf2e78621d7f4c7f80",class:"step-item-list"},i("slot",{key:"a296d57cb512552f97d35cd7a65ab3db644a6c62"})))}get el(){return e(this)}static get watchers(){return{theme:["handleThemeChange"],hideStepInfo:["handlePropChange"],variant:["handlePropChange"]}}};n.style=d;export{n as ic_stepper};
|
|
2
|
+
//# sourceMappingURL=p-a86785dd.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,h as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,h as a,H as t,g as i}from"./p-8e4e97b4.js";import{D as s,i as n,f as o,h as d}from"./p-a5658054.js";import"./p-bddf799a.js";const r='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;z-index:var(--ic-z-index-page-header)}:host(.ic-page-header-sticky){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay);z-index:var(--ic-z-index-sticky-page-header)}header{background-color:var(--ic-page-header-background)}header.border-bottom{border-bottom:var(--ic-border-default);border-bottom:var(--ic-space-1px) solid var(--ic-page-header-border)}header.tabs{padding-top:var(--ic-space-md)}.breadcrumb-area{margin-bottom:var(--ic-space-md)}::slotted(ic-navigation-item){--navigation-link-colour:var(--ic-color-text-primary)}.main-content{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"title-area action-area"\n "input-area action-area";-moz-column-gap:var(--ic-space-md);column-gap:var(--ic-space-md);justify-content:space-between;width:100%}.title-area{display:flex;flex-direction:column;flex:1;min-width:19rem;grid-area:title-area}.header-content{display:flex;align-items:center;width:100%;flex-wrap:wrap;-moz-column-gap:var(--ic-space-md);column-gap:var(--ic-space-md)}.heading{display:inline-block;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto}.subheading-content{margin-top:var(--ic-space-xs)}.subheading-content.small{margin-top:var(--ic-space-md)}.action-area{display:flex;gap:var(--ic-space-md);flex-flow:row wrap;justify-self:end;justify-content:flex-end;height:-moz-fit-content;height:fit-content;grid-area:action-area}.input-area,.navigation-area{margin-top:var(--ic-space-md);width:100%}.tabs-slot{display:flex;overflow-x:auto;padding:0.5rem;margin:-0.5rem}.tabs-slot::-webkit-scrollbar{display:none}.input-area{grid-area:input-area}@media screen and (max-width: 576px){::slotted(ic-text-field){--input-width:100%;max-width:20rem}.main-content{grid-template-areas:"title-area"\n "action-area"\n "input-area";justify-content:flex-start}.title-area{min-width:0}.action-area{min-width:100%;margin-top:var(--ic-space-md);justify-content:start}}@media screen and (min-width: 992px){:host(.ic-page-header-sticky-desktop){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay);z-index:var(--ic-z-index-sticky-page-header)}}';const c=r;const l=class{constructor(a){e(this,a);this.resizeObserver=null;this.areButtonsReversed=false;this.deviceSize=s.XL;this.aligned="left";this.border=true;this.reverseOrder=false;this.size="medium";this.sticky=false;this.stickyDesktopOnly=false;this.theme="inherit";this.resizeObserverCallback=()=>{if(this.reverseOrder&&n(this.el,"actions")){this.applyReverseOrder()}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.el)};this.applyReverseOrder=()=>{var e;const a=o();if(a!==this.deviceSize){this.deviceSize=a}const t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector("div.action-area");const i=[];for(let e=0;e<this.actionContent.length;e++){const a=this.actionContent[e];let t=a.offsetHeight;if(t===undefined){t=0}i.push(t)}const n=Math.max(...i);let d=t.offsetHeight;if(d===undefined){d=0}const r=()=>{this.actionContent=this.actionContent.reverse();this.actionContent.forEach((e=>{this.el.append(e)}));this.areButtonsReversed=!this.areButtonsReversed};if(this.deviceSize>s.S&&d<=n&&!this.areButtonsReversed||(this.deviceSize>s.S&&d>n||this.deviceSize<=s.S)&&this.areButtonsReversed){r()}}}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}componentWillLoad(){this.actionContent=Array.from(this.el.querySelectorAll(`[slot="actions"]`))}componentDidLoad(){d(this.runResizeObserver)}render(){var e,i;const{size:s,border:o,heading:d,subheading:r,aligned:c,sticky:l,stickyDesktopOnly:b,theme:p}=this;const h=`${n(this.el,"heading")?(i=(e=this.el.querySelector('[slot="heading"]'))===null||e===void 0?void 0:e.textContent)!==null&&i!==void 0?i:"":d!==null&&d!==void 0?d:""} page sections`;return a(t,{key:"6839f2d164672f2aa33e05134c3426e5374d1f06",class:{["ic-page-header-sticky"]:!!l,["ic-page-header-sticky-desktop"]:!l&&!!b,[`ic-theme-${p}`]:p!=="inherit"},"aria-label":this.el.ariaLabel||"page header"},a("header",{key:"7d5137cb542941699de9cc5721ae28a17861dbf0",class:{["border-bottom"]:!!o,["tabs"]:n(this.el,"tabs")},role:"presentation"},a("ic-section-container",{key:"454a9621964544cff3503b6553e7a17c60da3832",aligned:c,fullHeight:n(this.el,"tabs")},n(this.el,"breadcrumbs")&&a("div",{key:"58cd2a99c294c0e74d7236dfadaed9df5a2e468a",class:"breadcrumb-area"},a("slot",{key:"02a27ba25893819a676272f7b5c99ba111cec39a",name:"breadcrumbs"})),a("div",{key:"252904de3b7c608bca4e42325880560ee7bdc431",class:"main-content"},a("div",{key:"f9256d53398c537fe19e6b27ed777542650de68b",class:"title-area"},a("div",{key:"a1d40860aa4a7191974e44f400b3b8d486e09bf4",class:"header-content"},a("slot",{key:"81f3ac92b61b9943166ae930c7ada3662e494a60",name:"heading"},a("ic-typography",{key:"78f00c7412b22c74b25db7ce1136edaa173c557b",variant:s==="small"?"h4":"h2",class:"heading"},a("h2",{key:"6e9608ec80c3f05482ac3a8e60ee27d2e6f683ad"},d))),a("slot",{key:"59600cab7fe6df1e7fbb9786060c1338c1d24109",name:"heading-adornment"})),a("div",{key:"8008f53d6ee65c3ac3bb849e136e417a85fb185a",class:{["subheading-content"]:!!r||n(this.el,"subheading"),["small"]:s==="small"}},a("slot",{key:"2f7f52d845ac9ae2d4a7122c17dda2cd9439301d",name:"subheading"},a("ic-typography",{key:"c0aea12079ad430c8fc80de47dbc36998c7dafde",variant:"body"},r)))),n(this.el,"actions")&&a("div",{key:"522be093d57e17bd669e6a00de00b5d762371464",class:"action-area"},a("slot",{key:"5044800dd45ad23bded19fb947103fc33fb224f9",name:"actions"})),n(this.el,"input")&&a("div",{key:"c2ed3ac5f6683e17dff5e30bb4b0836c6882a62a",class:"input-area"},a("slot",{key:"7fa5429dde9cafd6cf7a91e6c018c137c4596cb8",name:"input"}))),(n(this.el,"stepper")||n(this.el,"tabs"))&&a("div",{key:"7adb7f57bb469ddb2f88303784c5bb4f47af3e7a",class:"navigation-area"},n(this.el,"stepper")&&!n(this.el,"tabs")&&a("slot",{key:"523c906aff9a5dcf0911b99e58a49bae70f6dc1a",name:"stepper"}),n(this.el,"tabs")&&a("nav",{key:"3d387ad3a2ca763d7837ad7604d7efbe46b3b2c9","aria-label":h},a("ic-horizontal-scroll",{key:"dee59ffc315702860977ca50ca8bdf90459a6a63"},a("ul",{key:"ce68af19740fd60be9a08fa955643854eb5ac0c7",class:"tabs-slot"},a("slot",{key:"d2297a18b03a95711ae20beaef363b39462c3866",name:"tabs"}))))))))}get el(){return i(this)}};l.style=c;export{l as ic_page_header};
|
|
2
|
+
//# sourceMappingURL=p-a8dc3162.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,h as i,H as e,g as s}from"./p-8e4e97b4.js";import{R as o,u as r,h as a,I as l}from"./p-a5658054.js";import"./p-bddf799a.js";const n=`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n <path d="M13.0875 6.175L11.9125 5L6.91251 10L11.9125 15L13.0875 13.825L9.27084 10L13.0875 6.175Z"/>\n</svg>`;const c=`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n <path d="M8.08748 5L6.91248 6.175L10.7291 10L6.91248 13.825L8.08748 15L13.0875 10L8.08748 5Z"/>\n</svg>`;const h='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{--border-bottom-color:var(--ic-architectural-300);--splitter-color:var(--ic-architectural-100);display:flex;max-width:100%}:host(.ic-horizontal-scroll-light){--splitter-color:var(--ic-color-keyline-lighten)}:host(.ic-horizontal-scroll-light) ic-button>svg{color:var(--ic-color-text-action-monochrome-dark)}:host(.ic-horizontal-scroll-dark){--splitter-color:var(--ic-color-keyline-darken)}:host(.ic-horizontal-scroll-dark) ic-button>svg{color:var(--ic-color-text-action-monochrome-light)}::slotted(*){overflow-x:scroll;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;-ms-overflow-style:none;margin:calc(var(--ic-space-xs) * -1) !important;padding:var(--ic-space-xs) !important}:host(.ic-horizontal-scroll-visible) ::slotted(*){margin:calc(var(--ic-space-xs) * -1) 0 !important;padding:var(--ic-space-xs) !important}.tabs-container::-webkit-scrollbar{display:none}.scroll-container-left,.scroll-container-right{display:flex}.scroll-container-left{margin-left:var(--ic-space-xxs)}.scroll-container-right{margin-right:var(--ic-space-xxs)}.hidden{display:none}.scroll-arrow{margin:var(--ic-space-xxs) 0}.disabled .ic-tooltip-container{display:none !important}.scroll-splitter-left,.scroll-splitter-right{display:flex;height:var(--ic-space-lg);width:var(--ic-space-1px);margin-top:var(--ic-space-xs);border-radius:var(--ic-space-1px);background-color:var(--splitter-color)}.scroll-splitter-left{margin-left:calc(var(--ic-space-xxs) - var(--ic-space-1px))}.scroll-splitter-right{margin-right:calc(var(--ic-space-xxs) - var(--ic-space-1px))}.disabled .scroll-splitter-left,.disabled .scroll-splitter-right{background-color:transparent}:host(.ic-horizontal-scroll-dark) .disabled ic-button>svg,:host(.ic-horizontal-scroll-light) .disabled ic-button>svg{color:var(--splitter-color) !important}';const d=h;const p=200;const b=class{constructor(i){t(this,i);this.buttonStateSet=false;this.firstItemVisible=true;this.itemOverflow=false;this.lastItemVisible=false;this.appearance="default";this.monochrome=false;this.theme="inherit";this.focusTrigger="focus";this.focusHandler=t=>{this.itemFocusHandler(Array.from(this.items).indexOf(t.target))};this.resizeObserverCallback=()=>{if(this.el.clientWidth>=this.itemsContainerEl.scrollWidth){this.itemOverflow=false}else{this.itemOverflow=o(this.itemsContainerEl)}if(this.itemOverflow){this.lastItemVisible=this.itemsContainerEl.offsetWidth+this.itemsContainerEl.scrollLeft>=this.itemsContainerEl.scrollWidth}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.itemsContainerEl)};this.scrollLeft=()=>{this.scrollItemIntoView(this.getCurrentLeftItem()-1)};this.scrollRight=()=>{this.scrollItemIntoView(this.getCurrentLeftItem()+1)};this.longScrollRight=()=>{this.scrollRight();this.scrollDelay=window.setTimeout(this.longScrollRight,p)};this.longScrollLeft=()=>{this.scrollLeft();this.scrollDelay=window.setTimeout(this.longScrollLeft,p)};this.leftArrowMouseDownHandler=t=>{t.preventDefault();this.scrollDelay=window.setTimeout(this.longScrollLeft,p)};this.rightArrowMouseDownHandler=t=>{t.preventDefault();this.scrollDelay=window.setTimeout(this.longScrollRight,p)};this.arrowMouseUpHandler=()=>{window.clearTimeout(this.scrollDelay)};this.getCurrentLeftItem=()=>{const t=this.itemOffsets.findIndex((t=>t>Math.round(this.itemsContainerEl.scrollLeft)));return t<0?0:t};this.scrollHandler=()=>{window.clearTimeout(this.isScrolling);this.isScrolling=window.setTimeout(this.scrollStopped,50)};this.scrollStopped=()=>{const t=Math.round(this.itemsContainerEl.scrollLeft);if(this.buttonStateSet===false){this.firstItemVisible=t===0;this.lastItemVisible=this.itemsContainerEl.offsetWidth+t>=this.itemsContainerEl.scrollWidth}this.buttonStateSet=false}}componentWillLoad(){this.itemsContainerEl=this.el.children[0];this.itemsContainerEl.addEventListener("scroll",this.scrollHandler);this.items=r(this.itemsContainerEl);this.items.forEach((t=>{if(t.addEventListener){t.addEventListener(this.focusTrigger,this.focusHandler)}}))}componentDidLoad(){var t;let i=0;this.itemOffsets=this.items.map((t=>{i+=t.offsetWidth;return i}));a(this.runResizeObserver);const e=Array.from(((t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll("div"))||[]);["mouseup","mouseleave"].forEach((t=>{e.forEach((i=>i.addEventListener(t,this.arrowMouseUpHandler)))}))}disconnectedCallback(){var t,i,e;if(this.resizeObserver!==undefined){this.resizeObserver.disconnect()}const s=Array.from(((t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll("div"))||[]);["mouseup","mouseleave"].forEach((t=>{s.forEach((i=>i.removeEventListener(t,this.arrowMouseUpHandler)))}));(i=this.items)===null||i===void 0?void 0:i.forEach((t=>{if(t.removeEventListener){t.removeEventListener(this.focusTrigger,this.focusHandler)}}));(e=this.itemsContainerEl)===null||e===void 0?void 0:e.removeEventListener("scroll",this.scrollHandler)}async scrollItemIntoView(t){this.firstItemVisible=t<=0;const i=t<=0?0:this.itemOffsets[t-1];this.lastItemVisible=this.itemsContainerEl.offsetWidth+i>=this.itemsContainerEl.scrollWidth;this.buttonStateSet=true;this.itemsContainerEl.scrollLeft=i}itemFocusHandler(t){if(this.itemOverflow){this.scrollItemIntoView(t)}}render(){const{firstItemVisible:t,lastItemVisible:s,itemOverflow:o}=this;return i(e,{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,h as i,H as e,g as s}from"./p-8e4e97b4.js";import{R as o,u as r,h as a,I as l}from"./p-a5658054.js";import"./p-bddf799a.js";const n=`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n <path d="M13.0875 6.175L11.9125 5L6.91251 10L11.9125 15L13.0875 13.825L9.27084 10L13.0875 6.175Z"/>\n</svg>`;const c=`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n <path d="M8.08748 5L6.91248 6.175L10.7291 10L6.91248 13.825L8.08748 15L13.0875 10L8.08748 5Z"/>\n</svg>`;const h='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{--border-bottom-color:var(--ic-architectural-300);--splitter-color:var(--ic-architectural-100);display:flex;max-width:100%}:host(.ic-horizontal-scroll-light){--splitter-color:var(--ic-color-keyline-lighten)}:host(.ic-horizontal-scroll-light) ic-button>svg{color:var(--ic-color-text-action-monochrome-dark)}:host(.ic-horizontal-scroll-dark){--splitter-color:var(--ic-color-keyline-darken)}:host(.ic-horizontal-scroll-dark) ic-button>svg{color:var(--ic-color-text-action-monochrome-light)}::slotted(*){overflow-x:scroll;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;-ms-overflow-style:none;margin:calc(var(--ic-space-xs) * -1) !important;padding:var(--ic-space-xs) !important}:host(.ic-horizontal-scroll-visible) ::slotted(*){margin:calc(var(--ic-space-xs) * -1) 0 !important;padding:var(--ic-space-xs) !important}.tabs-container::-webkit-scrollbar{display:none}.scroll-container-left,.scroll-container-right{display:flex}.scroll-container-left{margin-left:var(--ic-space-xxs)}.scroll-container-right{margin-right:var(--ic-space-xxs)}.hidden{display:none}.scroll-arrow{margin:var(--ic-space-xxs) 0}.disabled .ic-tooltip-container{display:none !important}.scroll-splitter-left,.scroll-splitter-right{display:flex;height:var(--ic-space-lg);width:var(--ic-space-1px);margin-top:var(--ic-space-xs);border-radius:var(--ic-space-1px);background-color:var(--splitter-color)}.scroll-splitter-left{margin-left:calc(var(--ic-space-xxs) - var(--ic-space-1px))}.scroll-splitter-right{margin-right:calc(var(--ic-space-xxs) - var(--ic-space-1px))}.disabled .scroll-splitter-left,.disabled .scroll-splitter-right{background-color:transparent}:host(.ic-horizontal-scroll-dark) .disabled ic-button>svg,:host(.ic-horizontal-scroll-light) .disabled ic-button>svg{color:var(--splitter-color) !important}';const d=h;const p=200;const b=class{constructor(i){t(this,i);this.buttonStateSet=false;this.firstItemVisible=true;this.itemOverflow=false;this.lastItemVisible=false;this.appearance="default";this.monochrome=false;this.theme="inherit";this.focusTrigger="focus";this.focusHandler=t=>{this.itemFocusHandler(Array.from(this.items).indexOf(t.target))};this.resizeObserverCallback=()=>{if(this.el.clientWidth>=this.itemsContainerEl.scrollWidth){this.itemOverflow=false}else{this.itemOverflow=o(this.itemsContainerEl)}if(this.itemOverflow){this.lastItemVisible=this.itemsContainerEl.offsetWidth+this.itemsContainerEl.scrollLeft>=this.itemsContainerEl.scrollWidth}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.itemsContainerEl)};this.scrollLeft=()=>{this.scrollItemIntoView(this.getCurrentLeftItem()-1)};this.scrollRight=()=>{this.scrollItemIntoView(this.getCurrentLeftItem()+1)};this.longScrollRight=()=>{this.scrollRight();this.scrollDelay=window.setTimeout(this.longScrollRight,p)};this.longScrollLeft=()=>{this.scrollLeft();this.scrollDelay=window.setTimeout(this.longScrollLeft,p)};this.leftArrowMouseDownHandler=t=>{t.preventDefault();this.scrollDelay=window.setTimeout(this.longScrollLeft,p)};this.rightArrowMouseDownHandler=t=>{t.preventDefault();this.scrollDelay=window.setTimeout(this.longScrollRight,p)};this.arrowMouseUpHandler=()=>{window.clearTimeout(this.scrollDelay)};this.getCurrentLeftItem=()=>{const t=this.itemOffsets.findIndex((t=>t>Math.round(this.itemsContainerEl.scrollLeft)));return t<0?0:t};this.scrollHandler=()=>{window.clearTimeout(this.isScrolling);this.isScrolling=window.setTimeout(this.scrollStopped,50)};this.scrollStopped=()=>{const t=Math.round(this.itemsContainerEl.scrollLeft);if(this.buttonStateSet===false){this.firstItemVisible=t===0;this.lastItemVisible=this.itemsContainerEl.offsetWidth+t>=this.itemsContainerEl.scrollWidth}this.buttonStateSet=false}}componentWillLoad(){this.itemsContainerEl=this.el.children[0];this.itemsContainerEl.addEventListener("scroll",this.scrollHandler);this.items=r(this.itemsContainerEl);this.items.forEach((t=>{if(t.addEventListener){t.addEventListener(this.focusTrigger,this.focusHandler)}}))}componentDidLoad(){var t;let i=0;this.itemOffsets=this.items.map((t=>{i+=t.offsetWidth;return i}));a(this.runResizeObserver);const e=Array.from(((t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll("div"))||[]);["mouseup","mouseleave"].forEach((t=>{e.forEach((i=>i.addEventListener(t,this.arrowMouseUpHandler)))}))}disconnectedCallback(){var t,i,e;if(this.resizeObserver!==undefined){this.resizeObserver.disconnect()}const s=Array.from(((t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll("div"))||[]);["mouseup","mouseleave"].forEach((t=>{s.forEach((i=>i.removeEventListener(t,this.arrowMouseUpHandler)))}));(i=this.items)===null||i===void 0?void 0:i.forEach((t=>{if(t.removeEventListener){t.removeEventListener(this.focusTrigger,this.focusHandler)}}));(e=this.itemsContainerEl)===null||e===void 0?void 0:e.removeEventListener("scroll",this.scrollHandler)}async scrollItemIntoView(t){this.firstItemVisible=t<=0;const i=t<=0?0:this.itemOffsets[t-1];this.lastItemVisible=this.itemsContainerEl.offsetWidth+i>=this.itemsContainerEl.scrollWidth;this.buttonStateSet=true;this.itemsContainerEl.scrollLeft=i}itemFocusHandler(t){if(this.itemOverflow){this.scrollItemIntoView(t)}}render(){const{firstItemVisible:t,lastItemVisible:s,itemOverflow:o}=this;return i(e,{key:"5f340f9d11d2ca42a17eacea2b9ce38b35614151",class:{["ic-horizontal-scroll-visible"]:o,["ic-horizontal-scroll-dark"]:this.appearance===l.Dark,["ic-horizontal-scroll-light"]:this.appearance===l.Light,[`ic-theme-${this.theme}`]:this.theme!=="inherit"}},i("div",{key:"555d223168b83a595030b18c4d21874c1cf679bd","aria-hidden":"true",class:{["scroll-container-left"]:true,["hidden"]:!o,["disabled"]:t},role:"tab"},i("ic-button",{key:"9196738f3d7d2c48b9173af7b152828a00c56edd",class:"scroll-arrow",variant:"icon-tertiary","aria-label":"Scroll left",theme:this.theme==="light"||this.theme==="inherit"?"dark":"light",monochrome:this.monochrome,innerHTML:n,disabled:t,tabindex:"-1",onClick:this.scrollLeft,onMouseDown:this.leftArrowMouseDownHandler}),i("span",{key:"89c1dc4017ec5a5ccd691c16c47957d35067d0b5",class:"scroll-splitter-left"})),i("slot",{key:"bc45bafea5bad600701b74f097aae39c2e6b1e4d"}),i("div",{key:"b961e7d153dccb0187f0aa8c02f73494f4233649","aria-hidden":"true",class:{["scroll-container-right"]:true,["hidden"]:!o,["disabled"]:s},role:"tab"},i("span",{key:"d0960807543d4513129f192ce975c7a0139a91a0",class:"scroll-splitter-right"}),i("ic-button",{key:"4844fbcec6360b939a67c3878e36f4b812685c22",class:"scroll-arrow",variant:"icon-tertiary","aria-label":"Scroll right",theme:this.theme==="light"||this.theme==="inherit"?"dark":"light",monochrome:this.monochrome,innerHTML:c,disabled:s,tabindex:"-1",onClick:this.scrollRight,onMouseDown:this.rightArrowMouseDownHandler})))}get el(){return s(this)}};b.style=d;export{b as ic_horizontal_scroll};
|
|
2
|
+
//# sourceMappingURL=p-ad6632a9.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as o,h as t,H as r}from"./p-8e4e97b4.js";import{o as a}from"./p-a5658054.js";import"./p-bddf799a.js";const e=":host{display:block;margin-bottom:var(--ic-space-md);border-bottom:var(--ic-space-1px) solid var(--ic-tab-bottom-border)}:host(.ic-tab-group-monochrome){border-bottom:var(--ic-space-1px) solid\n var(--ic-tab-bottom-border-monochrome)}:host(.ic-tab-group-inline){margin-bottom:0;border-bottom:none}.tabs-container{display:flex;flex-direction:row}.tabs-container::-webkit-scrollbar{display:none}:host ic-horizontal-scroll{--splitter-color:var(--ic-tab-divider)}:host(.ic-tab-group-monochrome) ic-horizontal-scroll{--splitter-color:var(--ic-tab-divider-monochrome)}";const i=e;const c=class{constructor(t){o(this,t);this.inline=false;this.monochrome=false;this.theme="inherit"}componentDidLoad(){a([{prop:this.label,propName:"label"}],"Tab Group")}render(){const{inline:o,theme:a,label:e,monochrome:i}=this;return t(r,{key:"907693650fa274e54826ca116016e8bea75aa29c",role:"tablist","aria-label":e,class:{["ic-tab-group-inline"]:!!o,[`ic-theme-${a}`]:a!=="inherit",["ic-tab-group-monochrome"]:!!i}},t("ic-horizontal-scroll",{key:"94a5fd18b222a07d6119c6bc291522b12aaf91f3",theme:a,"focus-trigger":"tabFocus",monochrome:i},t("div",{key:"a81bf05bd2e9d2d079a9b05899da06c6a27cb231",class:"tabs-container"},t("slot",{key:"434bc2798a1f471d7365a9854254f82bafa3c2d5"}))))}static get delegatesFocus(){return true}};c.style=i;export{c as ic_tab_group};
|
|
2
|
+
//# sourceMappingURL=p-ae861bb8.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as o,c as r,h as t,H as e}from"./p-8e4e97b4.js";import{M as s,d as i,g as a}from"./p-a5658054.js";import{B as h,W as c}from"./p-bddf799a.js";const n=class{constructor(t){o(this,t);this.brandChange=r(this,"brandChange",7);this.icThemeChange=r(this,"icThemeChange",7);this.themeClass="";this.brandColor=null;this.theme="light";this.darkModeChangeHandler=()=>{if(this.theme==="system"){this.themeClass=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"ic-theme-dark":"ic-theme-light"}else{this.themeClass=`ic-theme-${this.theme}`}this.icThemeChange.emit(this.theme)};this.checkBrandColorContrast=()=>{if(s()<h&&s()>c){console.warn(`The brand colour does not provide enough contrast with either of the ICDS black or white foreground colours. Consider choosing a colour with a different brightness to achieve sufficient colour contrast for good visibility. See https://www.w3.org/TR/AERT/#color-contrast for more information about colour contrast.`)}};this.setBrandColor=()=>{const o=this.brandColor?i(this.brandColor):null;if(o){const{r,g:t,b:e,a:s}=o;const{style:i}=document.documentElement;i.setProperty("--ic-brand-color-primary-r",`${r}`);i.setProperty("--ic-brand-color-primary-g",`${t}`);i.setProperty("--ic-brand-color-primary-b",`${e}`);i.setProperty("--ic-brand-color-primary-a",`${s}`);this.checkBrandColorContrast();this.brandChange.emit({mode:a(),color:o})}}}watchBrandColorPropHandler(){this.setBrandColor()}watchThemePropHandler(){this.darkModeChangeHandler()}componentWillLoad(){this.darkModeChangeHandler();this.setBrandColor();window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this.darkModeChangeHandler)}render(){const{themeClass:o}=this;return t(e,{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as o,c as r,h as t,H as e}from"./p-8e4e97b4.js";import{M as s,d as i,g as a}from"./p-a5658054.js";import{B as h,W as c}from"./p-bddf799a.js";const n=class{constructor(t){o(this,t);this.brandChange=r(this,"brandChange",7);this.icThemeChange=r(this,"icThemeChange",7);this.themeClass="";this.brandColor=null;this.theme="light";this.darkModeChangeHandler=()=>{if(this.theme==="system"){this.themeClass=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"ic-theme-dark":"ic-theme-light"}else{this.themeClass=`ic-theme-${this.theme}`}this.icThemeChange.emit(this.theme)};this.checkBrandColorContrast=()=>{if(s()<h&&s()>c){console.warn(`The brand colour does not provide enough contrast with either of the ICDS black or white foreground colours. Consider choosing a colour with a different brightness to achieve sufficient colour contrast for good visibility. See https://www.w3.org/TR/AERT/#color-contrast for more information about colour contrast.`)}};this.setBrandColor=()=>{const o=this.brandColor?i(this.brandColor):null;if(o){const{r,g:t,b:e,a:s}=o;const{style:i}=document.documentElement;i.setProperty("--ic-brand-color-primary-r",`${r}`);i.setProperty("--ic-brand-color-primary-g",`${t}`);i.setProperty("--ic-brand-color-primary-b",`${e}`);i.setProperty("--ic-brand-color-primary-a",`${s}`);this.checkBrandColorContrast();this.brandChange.emit({mode:a(),color:o})}}}watchBrandColorPropHandler(){this.setBrandColor()}watchThemePropHandler(){this.darkModeChangeHandler()}componentWillLoad(){this.darkModeChangeHandler();this.setBrandColor();window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this.darkModeChangeHandler)}render(){const{themeClass:o}=this;return t(e,{key:"ee89cdd36cb4cb7e0589dfea2dd5a60b5de40041",class:o},t("slot",{key:"e7803bf5fc0974bfcf9a2a52cb5870254453a1bd"}))}static get watchers(){return{brandColor:["watchBrandColorPropHandler"],theme:["watchThemePropHandler"]}}};export{n as ic_theme};
|
|
2
|
+
//# sourceMappingURL=p-af02add9.entry.js.map
|