@ukic/web-components 3.11.0 → 3.12.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/{constants-8354f6e6.js → constants-3a9ba64a.js} +3 -1
- package/dist/cjs/constants-3a9ba64a.js.map +1 -0
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-ffe1c2d9.js → helpers-478d1107.js} +2 -2
- package/dist/cjs/helpers-478d1107.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-accordion.cjs.entry.js +2 -2
- package/dist/cjs/ic-action-chip.cjs.entry.js +2 -2
- package/dist/cjs/ic-alert.cjs.entry.js +2 -2
- package/dist/cjs/ic-back-to-top.cjs.entry.js +2 -2
- package/dist/cjs/ic-badge.cjs.entry.js +2 -2
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/ic-button_3.cjs.entry.js +2 -2
- package/dist/cjs/ic-card-vertical.cjs.entry.js +2 -2
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +8 -5
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ic-chip.cjs.entry.js +7 -6
- package/dist/cjs/ic-chip.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 +2 -2
- package/dist/cjs/ic-divider.cjs.entry.js +2 -2
- package/dist/cjs/ic-empty-state.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer.cjs.entry.js +2 -2
- package/dist/cjs/ic-hero.cjs.entry.js +2 -2
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +2 -2
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +1381 -6
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +8 -7
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-navigation-button.cjs.entry.js +2 -2
- package/dist/cjs/ic-navigation-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-navigation-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +2 -2
- package/dist/cjs/ic-page-header.cjs.entry.js +2 -2
- package/dist/cjs/ic-pagination-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-pagination.cjs.entry.js +2 -2
- package/dist/cjs/ic-popover-menu.cjs.entry.js +2 -2
- package/dist/cjs/ic-radio-group.cjs.entry.js +15 -8
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +3 -3
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +2 -2
- package/dist/cjs/ic-select.cjs.entry.js +17 -10
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +2 -2
- package/dist/cjs/ic-status-tag.cjs.entry.js +2 -2
- package/dist/cjs/ic-step.cjs.entry.js +67 -55
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +21 -4
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab.cjs.entry.js +2 -2
- package/dist/cjs/ic-text-field.cjs.entry.js +9 -9
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +2 -2
- package/dist/cjs/ic-toast.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/ic-typography.cjs.entry.js +2 -2
- package/dist/cjs/index.cjs.js +2 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.css +3 -3
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +5 -2
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
- package/dist/collection/components/ic-chip/ic-chip.css +4 -0
- package/dist/collection/components/ic-chip/ic-chip.js +4 -3
- package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
- package/dist/collection/components/ic-input-validation/ic-input-validation.css +4 -1
- package/dist/collection/components/ic-input-validation/ic-input-validation.js +9 -8
- package/dist/collection/components/ic-input-validation/ic-input-validation.js.map +1 -1
- package/dist/collection/components/ic-menu/ic-menu.js +5 -4
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.css +2 -2
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +40 -7
- package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.stories.js +164 -0
- package/dist/collection/components/ic-radio-option/ic-radio-option.css +37 -1
- package/dist/collection/components/ic-select/ic-select.js +41 -8
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select_(multi).stories.js +14 -2
- package/dist/collection/components/ic-select/ic-select_(searchable).stories.js +10 -0
- package/dist/collection/components/ic-select/ic-select_(single).stories.js +111 -4
- package/dist/collection/components/ic-step/ic-step.js +89 -53
- package/dist/collection/components/ic-step/ic-step.js.map +1 -1
- package/dist/collection/components/ic-step/ic-step.types.js.map +1 -1
- package/dist/collection/components/ic-stepper/ic-stepper.js +43 -2
- package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
- package/dist/collection/components/ic-stepper/ic-stepper.stories.js +75 -0
- package/dist/collection/components/ic-text-field/ic-text-field.css +2 -2
- package/dist/collection/components/ic-text-field/ic-text-field.js +32 -32
- package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
- package/dist/collection/utils/common-helpers.js +17 -0
- package/dist/collection/utils/common-helpers.js.map +1 -0
- package/dist/collection/utils/constants.js +1 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/constants.js +2 -1
- package/dist/components/constants.js.map +1 -1
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +6 -3
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-chip.js +5 -4
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-input-validation2.js +7 -6
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-menu2.js +1380 -4
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-radio-group.js +14 -6
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +1 -1
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-select.js +17 -9
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-step.js +66 -53
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +20 -2
- package/dist/components/ic-stepper.js.map +1 -1
- package/dist/components/ic-text-field.js +8 -8
- package/dist/components/ic-text-field.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/index.esm.js +1 -1
- package/dist/core/{p-52a2f800.entry.js → p-0123dde7.entry.js} +2 -2
- package/dist/core/{p-23b223bf.entry.js → p-01e018cb.entry.js} +2 -2
- package/dist/core/{p-1ab63899.entry.js → p-02af2b59.entry.js} +2 -2
- package/dist/core/p-05036675.entry.js +2 -0
- package/dist/core/p-05036675.entry.js.map +1 -0
- package/dist/core/{p-1d4dfef1.entry.js → p-0c36ce84.entry.js} +2 -2
- package/dist/core/{p-f78f34ce.entry.js → p-0ec76cff.entry.js} +2 -2
- package/dist/core/{p-35ee7c53.entry.js → p-13e093d0.entry.js} +2 -2
- package/dist/core/{p-a48b581a.entry.js → p-1423bd4a.entry.js} +2 -2
- package/dist/core/{p-3f55bb5b.entry.js → p-2126d37b.entry.js} +2 -2
- package/dist/core/{p-515ded3f.entry.js → p-228bc12d.entry.js} +2 -2
- package/dist/core/{p-d27e46ac.entry.js → p-25bef09d.entry.js} +2 -2
- package/dist/core/{p-eddc5517.entry.js → p-27e67d45.entry.js} +2 -2
- package/dist/core/{p-4dd8add9.entry.js → p-2800fc30.entry.js} +2 -2
- package/dist/core/{p-f045f59d.entry.js → p-33582352.entry.js} +2 -2
- package/dist/core/p-33789b23.entry.js +3 -0
- package/dist/core/p-33789b23.entry.js.map +1 -0
- package/dist/core/{p-4a2c02b2.entry.js → p-3e36f281.entry.js} +2 -2
- package/dist/core/{p-58b8d154.entry.js → p-45097448.entry.js} +2 -2
- package/dist/core/p-514daffe.entry.js +2 -0
- package/dist/core/p-514daffe.entry.js.map +1 -0
- package/dist/core/{p-3a78bf6e.entry.js → p-54803e3b.entry.js} +2 -2
- package/dist/core/{p-0201abbf.entry.js → p-6058d4c9.entry.js} +2 -2
- package/dist/core/{p-8d29c0fa.entry.js → p-675bb3e4.entry.js} +2 -2
- package/dist/core/{p-75e0278a.entry.js → p-6dbe70f1.entry.js} +2 -2
- package/dist/core/{p-b9018261.entry.js → p-6e139e6e.entry.js} +2 -2
- package/dist/core/{p-aab838e5.entry.js → p-80317cd1.entry.js} +2 -2
- package/dist/core/{p-d35f8bd4.entry.js → p-80e0f66e.entry.js} +2 -2
- package/dist/core/{p-02c2c31f.entry.js → p-813ad03c.entry.js} +2 -2
- package/dist/core/{p-69412f61.entry.js → p-8558b9b7.entry.js} +2 -2
- package/dist/core/{p-a468df37.entry.js → p-8684efeb.entry.js} +2 -2
- package/dist/core/{p-ffc608a1.entry.js → p-8b99a806.entry.js} +2 -2
- package/dist/core/{p-19366be6.entry.js → p-93479c36.entry.js} +2 -2
- package/dist/core/{p-69cc0f7d.entry.js → p-95d3d1a7.entry.js} +2 -2
- package/dist/core/p-99793b64.entry.js +2 -0
- package/dist/core/p-99793b64.entry.js.map +1 -0
- package/dist/core/{p-57803949.entry.js → p-a06c1e4e.entry.js} +2 -2
- package/dist/core/p-a1857d24.entry.js +2 -0
- package/dist/core/p-a1857d24.entry.js.map +1 -0
- package/dist/core/{p-f17e1525.entry.js → p-a1e2e029.entry.js} +2 -2
- package/dist/core/{p-abb9dccb.entry.js → p-abd88929.entry.js} +2 -2
- package/dist/core/{p-cdd04ec2.entry.js → p-b0376079.entry.js} +2 -2
- package/dist/core/{p-fd488ed7.entry.js → p-b1838ad8.entry.js} +2 -2
- package/dist/core/p-b1838ad8.entry.js.map +1 -0
- package/dist/core/{p-6ceedfa8.js → p-b57e59b7.js} +2 -2
- package/dist/core/p-b57e59b7.js.map +1 -0
- package/dist/core/p-b9bdd9a9.entry.js +2 -0
- package/dist/core/p-b9bdd9a9.entry.js.map +1 -0
- package/dist/core/{p-641c26c4.js → p-bddf799a.js} +2 -2
- package/dist/core/p-bddf799a.js.map +1 -0
- package/dist/core/{p-0809aff4.entry.js → p-c04e1fab.entry.js} +2 -2
- package/dist/core/p-c2d5e301.entry.js +2 -0
- package/dist/core/p-c2d5e301.entry.js.map +1 -0
- package/dist/core/{p-65a3c216.entry.js → p-c975cced.entry.js} +2 -2
- package/dist/core/p-cc00cbce.entry.js +2 -0
- package/dist/core/p-cc00cbce.entry.js.map +1 -0
- package/dist/core/{p-a4e67ab8.entry.js → p-cf868a24.entry.js} +2 -2
- package/dist/core/p-cf868a24.entry.js.map +1 -0
- package/dist/core/{p-01aeffca.entry.js → p-d58ad080.entry.js} +2 -2
- package/dist/core/{p-f086d6df.entry.js → p-de32a223.entry.js} +2 -2
- package/dist/core/{p-46423f42.entry.js → p-e6dacbe2.entry.js} +2 -2
- package/dist/core/{p-8af9413c.entry.js → p-e9d28e02.entry.js} +2 -2
- package/dist/core/{p-1dab47b1.entry.js → p-ea06792a.entry.js} +2 -2
- package/dist/core/{p-5c6efed3.entry.js → p-eb0e7153.entry.js} +2 -2
- package/dist/core/{p-402813c9.entry.js → p-f609ca37.entry.js} +2 -2
- package/dist/core/{p-8d1fbbeb.entry.js → p-fb69fbc0.entry.js} +2 -2
- package/dist/core/{p-cd63bcf2.entry.js → p-fb734a59.entry.js} +2 -2
- package/dist/esm/{constants-48759bda.js → constants-7960cba4.js} +3 -2
- package/dist/esm/constants-7960cba4.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-d8189e9d.js → helpers-4ddac6ed.js} +2 -2
- package/dist/esm/helpers-4ddac6ed.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +2 -2
- package/dist/esm/ic-accordion.entry.js +2 -2
- package/dist/esm/ic-action-chip.entry.js +2 -2
- package/dist/esm/ic-alert.entry.js +2 -2
- package/dist/esm/ic-back-to-top.entry.js +2 -2
- package/dist/esm/ic-badge.entry.js +2 -2
- package/dist/esm/ic-breadcrumb-group.entry.js +2 -2
- package/dist/esm/ic-breadcrumb.entry.js +2 -2
- package/dist/esm/ic-button_3.entry.js +2 -2
- package/dist/esm/ic-card-vertical.entry.js +2 -2
- package/dist/esm/ic-checkbox-group.entry.js +8 -5
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +2 -2
- package/dist/esm/ic-chip.entry.js +7 -6
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +2 -2
- package/dist/esm/ic-dialog.entry.js +2 -2
- package/dist/esm/ic-divider.entry.js +2 -2
- package/dist/esm/ic-empty-state.entry.js +2 -2
- package/dist/esm/ic-footer-link-group.entry.js +2 -2
- package/dist/esm/ic-footer-link.entry.js +2 -2
- package/dist/esm/ic-footer.entry.js +2 -2
- package/dist/esm/ic-hero.entry.js +2 -2
- package/dist/esm/ic-horizontal-scroll.entry.js +2 -2
- package/dist/esm/ic-input-component-container_3.entry.js +1381 -6
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +8 -7
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +2 -2
- package/dist/esm/ic-menu-group.entry.js +2 -2
- package/dist/esm/ic-menu-item.entry.js +2 -2
- package/dist/esm/ic-navigation-button.entry.js +2 -2
- package/dist/esm/ic-navigation-group.entry.js +2 -2
- package/dist/esm/ic-navigation-item.entry.js +2 -2
- package/dist/esm/ic-navigation-menu.entry.js +2 -2
- package/dist/esm/ic-page-header.entry.js +2 -2
- package/dist/esm/ic-pagination-item.entry.js +2 -2
- package/dist/esm/ic-pagination.entry.js +2 -2
- package/dist/esm/ic-popover-menu.entry.js +2 -2
- package/dist/esm/ic-radio-group.entry.js +15 -8
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +3 -3
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +2 -2
- package/dist/esm/ic-select.entry.js +17 -10
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +2 -2
- package/dist/esm/ic-status-tag.entry.js +2 -2
- package/dist/esm/ic-step.entry.js +67 -55
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +21 -4
- package/dist/esm/ic-stepper.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +2 -2
- package/dist/esm/ic-tab-group.entry.js +2 -2
- package/dist/esm/ic-tab.entry.js +2 -2
- package/dist/esm/ic-text-field.entry.js +9 -9
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +2 -2
- package/dist/esm/ic-toast.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/ic-typography.entry.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-input-validation/ic-input-validation.d.ts +2 -3
- package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +6 -2
- package/dist/types/components/ic-select/ic-select.d.ts +5 -1
- package/dist/types/components/ic-step/ic-step.d.ts +5 -1
- package/dist/types/components/ic-step/ic-step.types.d.ts +10 -0
- package/dist/types/components/ic-stepper/ic-stepper.d.ts +5 -1
- package/dist/types/components/ic-text-field/ic-text-field.d.ts +4 -4
- package/dist/types/components.d.ts +39 -9
- package/dist/types/interface.d.ts +0 -1
- package/dist/types/utils/common-helpers.d.ts +2 -0
- package/dist/types/utils/constants.d.ts +1 -0
- package/dist/types/utils/types.d.ts +1 -0
- package/hydrate/index.js +1522 -94
- package/hydrate/index.mjs +1522 -94
- package/package.json +4 -3
- package/vscode-data.json +30 -0
- package/dist/cjs/constants-8354f6e6.js.map +0 -1
- package/dist/cjs/helpers-ffe1c2d9.js.map +0 -1
- package/dist/collection/components/ic-input-validation/ic-input-validation.types.js +0 -2
- package/dist/collection/components/ic-input-validation/ic-input-validation.types.js.map +0 -1
- package/dist/core/p-402c2455.entry.js +0 -2
- package/dist/core/p-402c2455.entry.js.map +0 -1
- package/dist/core/p-641c26c4.js.map +0 -1
- package/dist/core/p-6ceedfa8.js.map +0 -1
- package/dist/core/p-75a9b2e4.entry.js +0 -2
- package/dist/core/p-75a9b2e4.entry.js.map +0 -1
- package/dist/core/p-8326db29.entry.js +0 -2
- package/dist/core/p-8326db29.entry.js.map +0 -1
- package/dist/core/p-a4e67ab8.entry.js.map +0 -1
- package/dist/core/p-b80d408f.entry.js +0 -2
- package/dist/core/p-b80d408f.entry.js.map +0 -1
- package/dist/core/p-c81ffadd.entry.js +0 -2
- package/dist/core/p-c81ffadd.entry.js.map +0 -1
- package/dist/core/p-d6b3e02f.entry.js +0 -2
- package/dist/core/p-d6b3e02f.entry.js.map +0 -1
- package/dist/core/p-d7bd5aa0.entry.js +0 -2
- package/dist/core/p-d7bd5aa0.entry.js.map +0 -1
- package/dist/core/p-ed69f110.entry.js +0 -2
- package/dist/core/p-ed69f110.entry.js.map +0 -1
- package/dist/core/p-fd488ed7.entry.js.map +0 -1
- package/dist/esm/constants-48759bda.js.map +0 -1
- package/dist/esm/helpers-d8189e9d.js.map +0 -1
- package/dist/types/components/ic-input-validation/ic-input-validation.types.d.ts +0 -1
- /package/dist/core/{p-52a2f800.entry.js.map → p-0123dde7.entry.js.map} +0 -0
- /package/dist/core/{p-23b223bf.entry.js.map → p-01e018cb.entry.js.map} +0 -0
- /package/dist/core/{p-1ab63899.entry.js.map → p-02af2b59.entry.js.map} +0 -0
- /package/dist/core/{p-1d4dfef1.entry.js.map → p-0c36ce84.entry.js.map} +0 -0
- /package/dist/core/{p-f78f34ce.entry.js.map → p-0ec76cff.entry.js.map} +0 -0
- /package/dist/core/{p-35ee7c53.entry.js.map → p-13e093d0.entry.js.map} +0 -0
- /package/dist/core/{p-a48b581a.entry.js.map → p-1423bd4a.entry.js.map} +0 -0
- /package/dist/core/{p-3f55bb5b.entry.js.map → p-2126d37b.entry.js.map} +0 -0
- /package/dist/core/{p-515ded3f.entry.js.map → p-228bc12d.entry.js.map} +0 -0
- /package/dist/core/{p-d27e46ac.entry.js.map → p-25bef09d.entry.js.map} +0 -0
- /package/dist/core/{p-eddc5517.entry.js.map → p-27e67d45.entry.js.map} +0 -0
- /package/dist/core/{p-4dd8add9.entry.js.map → p-2800fc30.entry.js.map} +0 -0
- /package/dist/core/{p-f045f59d.entry.js.map → p-33582352.entry.js.map} +0 -0
- /package/dist/core/{p-4a2c02b2.entry.js.map → p-3e36f281.entry.js.map} +0 -0
- /package/dist/core/{p-58b8d154.entry.js.map → p-45097448.entry.js.map} +0 -0
- /package/dist/core/{p-3a78bf6e.entry.js.map → p-54803e3b.entry.js.map} +0 -0
- /package/dist/core/{p-0201abbf.entry.js.map → p-6058d4c9.entry.js.map} +0 -0
- /package/dist/core/{p-8d29c0fa.entry.js.map → p-675bb3e4.entry.js.map} +0 -0
- /package/dist/core/{p-75e0278a.entry.js.map → p-6dbe70f1.entry.js.map} +0 -0
- /package/dist/core/{p-b9018261.entry.js.map → p-6e139e6e.entry.js.map} +0 -0
- /package/dist/core/{p-aab838e5.entry.js.map → p-80317cd1.entry.js.map} +0 -0
- /package/dist/core/{p-d35f8bd4.entry.js.map → p-80e0f66e.entry.js.map} +0 -0
- /package/dist/core/{p-02c2c31f.entry.js.map → p-813ad03c.entry.js.map} +0 -0
- /package/dist/core/{p-69412f61.entry.js.map → p-8558b9b7.entry.js.map} +0 -0
- /package/dist/core/{p-a468df37.entry.js.map → p-8684efeb.entry.js.map} +0 -0
- /package/dist/core/{p-ffc608a1.entry.js.map → p-8b99a806.entry.js.map} +0 -0
- /package/dist/core/{p-19366be6.entry.js.map → p-93479c36.entry.js.map} +0 -0
- /package/dist/core/{p-69cc0f7d.entry.js.map → p-95d3d1a7.entry.js.map} +0 -0
- /package/dist/core/{p-57803949.entry.js.map → p-a06c1e4e.entry.js.map} +0 -0
- /package/dist/core/{p-f17e1525.entry.js.map → p-a1e2e029.entry.js.map} +0 -0
- /package/dist/core/{p-abb9dccb.entry.js.map → p-abd88929.entry.js.map} +0 -0
- /package/dist/core/{p-cdd04ec2.entry.js.map → p-b0376079.entry.js.map} +0 -0
- /package/dist/core/{p-0809aff4.entry.js.map → p-c04e1fab.entry.js.map} +0 -0
- /package/dist/core/{p-65a3c216.entry.js.map → p-c975cced.entry.js.map} +0 -0
- /package/dist/core/{p-01aeffca.entry.js.map → p-d58ad080.entry.js.map} +0 -0
- /package/dist/core/{p-f086d6df.entry.js.map → p-de32a223.entry.js.map} +0 -0
- /package/dist/core/{p-46423f42.entry.js.map → p-e6dacbe2.entry.js.map} +0 -0
- /package/dist/core/{p-8af9413c.entry.js.map → p-e9d28e02.entry.js.map} +0 -0
- /package/dist/core/{p-1dab47b1.entry.js.map → p-ea06792a.entry.js.map} +0 -0
- /package/dist/core/{p-5c6efed3.entry.js.map → p-eb0e7153.entry.js.map} +0 -0
- /package/dist/core/{p-402813c9.entry.js.map → p-f609ca37.entry.js.map} +0 -0
- /package/dist/core/{p-8d1fbbeb.entry.js.map → p-fb69fbc0.entry.js.map} +0 -0
- /package/dist/core/{p-cd63bcf2.entry.js.map → p-fb734a59.entry.js.map} +0 -0
package/hydrate/index.js
CHANGED
@@ -3281,6 +3281,7 @@ const IGNORED_KEYBOARD_CHARACTERS = [
|
|
3281
3281
|
"Shift",
|
3282
3282
|
"Tab",
|
3283
3283
|
];
|
3284
|
+
const IC_CUSTOM_ALLOWED_COMPONENTS = [];
|
3284
3285
|
|
3285
3286
|
const DARK_MODE_THRESHOLD = 133.3505;
|
3286
3287
|
const ANYWHERE_SEARCH_POSITION = "anywhere";
|
@@ -5881,7 +5882,7 @@ class Checkbox {
|
|
5881
5882
|
}; }
|
5882
5883
|
}
|
5883
5884
|
|
5884
|
-
const icCheckboxGroupCss = "/*! 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-text-color:var(--ic-checkbox-group-label);--ic-input-label-helper-text-color:var(--ic-checkbox-group-subtitle);--ic-input-validation-error:var(--ic-checkbox-state-icon-error);--ic-input-validation-status-text-color:var(--ic-checkbox-state-text)}:host(.ic-checkbox-group-disabled){--ic-input-label-text-color:var(--ic-checkbox-group-label-disabled);--ic-input-label-helper-text-color:var(\n --ic-checkbox-group-subtitle-disabled\n )}ic-input-label.error{color:var(--ic-checkbox-group-label-error);--ic-typography-color:var(--ic-checkbox-group-label-error);--ic-input-label-helper-text-color:var(--ic-checkbox-group-subtitle-error)}ic-input-label:not(.with-helper) .ic-typography-label,ic-input-label .helpertext{margin-bottom:var(--ic-space-sm)}:host(.ic-checkbox-group-small) ic-input-label:not(.with-helper) .ic-typography-label,:host(.ic-checkbox-group-small) ic-input-label .helpertext{margin-bottom:calc(var(--ic-space-sm) / 2)}:host(.ic-checkbox-group-large) ic-input-label:not(.with-helper) .ic-typography-label,:host(.ic-checkbox-group-large) ic-input-label .helpertext{margin-bottom:calc(var(--ic-space-sm) * 1.5)}ic-input-label .helpertext{display:block}ic-input-validation{margin-top:var(--ic-space-sm)}:host(.ic-checkbox-group-small) ic-input-validation{margin-top:calc(var(--ic-space-sm) / 2)}:host(.ic-checkbox-group-large) ic-input-validation{margin-top:calc(var(--ic-space-sm) * 1.5)}.checkboxes-container{margin-bottom:calc(-1 * var(--ic-space-xxs))}:host(.ic-checkbox-group-small) .checkboxes-container{margin-bottom:calc(-1 * var(--ic-space-xxxs))}.screen-reader-only-text{position:absolute;left:-9999px;background-color:#fff;color:#000;text-transform:none}.screen-reader-only-text:dir(rtl){right:-9999px}";
|
5885
|
+
const icCheckboxGroupCss = "/*! 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-text-color:var(--ic-checkbox-group-label);--ic-input-label-helper-text-color:var(--ic-checkbox-group-subtitle);--ic-input-validation-error:var(--ic-checkbox-state-icon-error);--ic-input-validation-status-text-color:var(--ic-checkbox-state-text)}:host(.ic-checkbox-group-disabled){--ic-input-label-text-color:var(--ic-checkbox-group-label-disabled);--ic-input-label-helper-text-color:var(\n --ic-checkbox-group-subtitle-disabled\n )}ic-input-label.error{color:var(--ic-checkbox-group-label-error);--ic-typography-color:var(--ic-checkbox-group-label-error);--ic-input-label-helper-text-color:var(--ic-checkbox-group-subtitle-error)}ic-input-label:not(.with-helper) .ic-typography-label,ic-input-label .helpertext{margin-bottom:var(--ic-space-sm)}:host(.ic-checkbox-group-small) ic-input-label:not(.with-helper) .ic-typography-label,:host(.ic-checkbox-group-small) ic-input-label .helpertext{margin-bottom:calc(var(--ic-space-sm) / 2)}:host(.ic-checkbox-group-large) ic-input-label:not(.with-helper) .ic-typography-label,:host(.ic-checkbox-group-large) ic-input-label .helpertext{margin-bottom:calc(var(--ic-space-sm) * 1.5)}ic-input-label .helpertext{display:block}ic-input-validation.show-validation{margin-top:var(--ic-space-sm)}:host(.ic-checkbox-group-small) ic-input-validation.show-validation{margin-top:calc(var(--ic-space-sm) / 2)}:host(.ic-checkbox-group-large) ic-input-validation.show-validation{margin-top:calc(var(--ic-space-sm) * 1.5)}.checkboxes-container{margin-bottom:calc(-1 * var(--ic-space-xxs))}:host(.ic-checkbox-group-small) .checkboxes-container{margin-bottom:calc(-1 * var(--ic-space-xxxs))}.screen-reader-only-text{position:absolute;left:-9999px;background-color:#fff;color:#000;text-transform:none}.screen-reader-only-text:dir(rtl){right:-9999px}";
|
5885
5886
|
var IcCheckboxGroupStyle0 = icCheckboxGroupCss;
|
5886
5887
|
|
5887
5888
|
const CHECKBOX_SELECTOR = "ic-checkbox";
|
@@ -5979,11 +5980,14 @@ class CheckboxGroup {
|
|
5979
5980
|
const { disabled, helperText, hideLabel, label, name, required, size, theme, validationStatus, validationText, } = this;
|
5980
5981
|
const describedBy = getInputDescribedByText(this.el, name, helperText !== "", validationStatus !== "");
|
5981
5982
|
const renderSRText = validationStatus === "error" || required || hideLabel;
|
5982
|
-
|
5983
|
+
const showValidation = hasValidationStatus(validationStatus, disabled);
|
5984
|
+
return (hAsync(Host, { key: '6d5ed4db589400cd64aeed3bccd46087858d2902', class: {
|
5983
5985
|
"ic-checkbox-group-disabled": !!disabled,
|
5984
5986
|
[`ic-checkbox-group-${size}`]: true,
|
5985
5987
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
5986
|
-
} }, renderSRText && (hAsync("span", { key: '
|
5988
|
+
} }, renderSRText && (hAsync("span", { key: '2fc368a571755ad3125067498b17b52ce8933e8f', id: "screenReaderOnlyText", class: "screen-reader-only-text", "aria-hidden": "true" }, label, " ", validationStatus === "error" ? "invalid data " : null, " ", required ? "required" : null)), hAsync("fieldset", { key: '6b7d3155fa0479fbd51c5e5100945ee4995dfadf', id: name, "aria-labelledby": `${renderSRText ? "screenReaderOnlyText" : ""} ${describedBy}`.trim(), disabled: disabled }, !hideLabel && (hAsync("legend", { key: '469a466275aa307d6ca876ec18a79bb5d29167b8' }, hAsync("ic-input-label", { key: '4cd2e89ab463ea9c7438fb1759faddf6df8750d1', class: { [`${validationStatus}`]: true }, label: label, helperText: helperText, required: required, disabled: disabled, useLabelTag: false }, hAsync("slot", { key: '0b0b0a5028039ef6d487d441ebd28f47f32200b7', name: "helper-text", slot: "helper-text" })))), hAsync("div", { key: '747fea859cd5a3bbd474454b408f648169b5fe45', class: "checkboxes-container" }, hAsync("slot", { key: '200a6c033ff1243e8778aec3c91a22213f5082f5' }))), showValidation && (hAsync("ic-input-validation", { key: 'df907eeb4348050b37357f27405b3ef548990163', class: {
|
5989
|
+
"show-validation": showValidation,
|
5990
|
+
}, for: name, ariaLiveMode: "polite", status: validationStatus, message: validationText }))));
|
5987
5991
|
}
|
5988
5992
|
get el() { return getElement(this); }
|
5989
5993
|
static get watchers() { return {
|
@@ -6019,7 +6023,7 @@ var dismissIcon = `<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org
|
|
6019
6023
|
</svg>
|
6020
6024
|
`;
|
6021
6025
|
|
6022
|
-
const icChipCss = "/*! 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}.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}@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}}";
|
6026
|
+
const icChipCss = "/*! 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}@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}}";
|
6023
6027
|
var IcChipStyle0 = icChipCss;
|
6024
6028
|
|
6025
6029
|
/**
|
@@ -6113,10 +6117,11 @@ class Chip {
|
|
6113
6117
|
render() {
|
6114
6118
|
const { label, variant, size, dismissible, visible, disabled, hovered, theme, foregroundColor, dismissLabel, transparentBackground, } = this;
|
6115
6119
|
const ariaLabel = `${label} chip`;
|
6116
|
-
return (hAsync(Host, { key: '
|
6120
|
+
return (hAsync(Host, { key: 'c7b88d4999b6de5004edc4bd27e185b9232fdaf9', class: {
|
6121
|
+
"ic-chip-dismissed": !visible,
|
6117
6122
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
6118
6123
|
[`ic-chip-${foregroundColor}-text`]: variant === "filled" && !!foregroundColor,
|
6119
|
-
} }, visible && (hAsync("div", { key: '
|
6124
|
+
} }, visible && (hAsync("div", { key: 'dbbb2bd77adea5e65d61e11b6c4b2b06fadbb9b1', class: {
|
6120
6125
|
chip: true,
|
6121
6126
|
[`${variant}`]: true,
|
6122
6127
|
[`${size}`]: true,
|
@@ -6124,7 +6129,7 @@ class Chip {
|
|
6124
6129
|
dismissible,
|
6125
6130
|
hovered,
|
6126
6131
|
"non-transparent": variant === "outlined" && !transparentBackground,
|
6127
|
-
} }, isSlotUsed(this.el, "icon") && (hAsync("div", { key: '
|
6132
|
+
} }, isSlotUsed(this.el, "icon") && (hAsync("div", { key: '443ef9dc619483da883171e367ac9541aaf61a38', class: "icon" }, hAsync("slot", { key: '3d5f5e0db37a1d2c0b8d2f25e0af2801cc52598e', name: "icon" }))), hAsync("ic-typography", { key: '23603177321e0a67c86da4720574592e3db8db80', variant: "label", "apply-vertical-margins": false, class: { label: true, "in-ag-grid": isElInAGGrid(this.el) } }, hAsync("span", { key: '2d55524b494e17a0ee3c8a7441ffbc1a5d47f6a4' }, label)), dismissible && (hAsync("ic-tooltip", { key: '2def11f340b2b51518caebdf0e87b61e87d9baeb', label: dismissLabel, target: "dismiss-icon", class: { "tooltip-disabled": disabled } }, hAsync("button", { key: 'c437a1dc096b14ba3bb2fa5723fa0044e83a9b3a', id: "dismiss-icon", class: "dismiss-icon", ref: (el) => (this.buttonEl = el), "aria-label": `${dismissLabel} ${ariaLabel}`, disabled: disabled, tabindex: disabled ? -1 : 0, onClick: this.dismissAction, onMouseEnter: this.mouseEnterHandler, onMouseLeave: this.mouseLeaveHandler, innerHTML: dismissIcon }))), isSlotUsed(this.el, "badge") && hAsync("slot", { key: '9b3fec37d1d44def4248cf53ae2916d9f62e1a08', name: "badge" }))), dismissible && (hAsync("div", { key: 'bc8d8601488092dde7dae7db5f0f36b802f6df9f', class: "sr-only", "aria-live": "polite" }, !visible ? `Dismissed ${ariaLabel}` : ""))));
|
6128
6133
|
}
|
6129
6134
|
static get delegatesFocus() { return true; }
|
6130
6135
|
get el() { return getElement(this); }
|
@@ -7750,7 +7755,7 @@ class InputLabel {
|
|
7750
7755
|
}; }
|
7751
7756
|
}
|
7752
7757
|
|
7753
|
-
const icInputValidationCss = "ic-input-validation{width:var(--input-width, 20rem);margin-top:var(--ic-space-xs)
|
7758
|
+
const icInputValidationCss = "ic-input-validation{width:var(--input-width, 20rem);display:flex}ic-input-validation.ic-input-validation-with-status{margin-top:var(--ic-space-xs)}ic-input-validation.ic-input-validation-full-width{width:100%}ic-input-validation span.status-icon{padding-right:var(--ic-space-xxs)}ic-input-validation span.status-icon>svg{height:1.25rem;width:1.25rem}ic-input-validation span.icon-success>svg{fill:var(--ic-input-validation-success-icon-color)}ic-input-validation span.icon-error>svg{fill:var(--ic-input-validation-error, var(--ic-atoms-status-icon-error))}ic-input-validation span.icon-warning>svg{fill:var(--ic-input-validation-warning-icon-color)}ic-input-validation .statustext{flex-grow:1;color:var(\n --ic-input-validation-status-text-color,\n var(--ic-color-text-primary)\n );--ic-typography-color:var(\n --ic-input-validation-status-text-color,\n var(--ic-color-text-primary)\n )}ic-input-validation .sr-only{position:absolute;left:-9999px}";
|
7754
7759
|
var IcInputValidationStyle0 = icInputValidationCss;
|
7755
7760
|
|
7756
7761
|
const ICON = {
|
@@ -7784,7 +7789,7 @@ class InputValidation {
|
|
7784
7789
|
this.messageEl.textContent = INVISIBLE_CHAR;
|
7785
7790
|
setTimeout(() => {
|
7786
7791
|
this.messageEl.textContent = newValue;
|
7787
|
-
},
|
7792
|
+
}, 200); // Delay to help ensure screen readers detect change
|
7788
7793
|
}
|
7789
7794
|
componentDidLoad() {
|
7790
7795
|
onComponentRequiredPropUndefined([{ prop: this.message, propName: "message" }], "Input Validation");
|
@@ -7793,13 +7798,14 @@ class InputValidation {
|
|
7793
7798
|
render() {
|
7794
7799
|
const { ariaLiveMode, fullWidth, status, message } = this;
|
7795
7800
|
const displayIcon = status !== "" ? ICON[status] : "";
|
7796
|
-
return (hAsync(Host, { key: '
|
7801
|
+
return (hAsync(Host, { key: 'f1ba7e992a65cbd63d86411844668a0db4944cf2', class: {
|
7797
7802
|
[`ic-input-validation-${status}`]: status !== "",
|
7798
7803
|
"ic-input-validation-full-width": !!fullWidth,
|
7799
|
-
|
7804
|
+
"ic-input-validation-with-status": status !== "",
|
7805
|
+
} }, displayIcon !== "" && (hAsync("span", { key: '43bf05c319e9f4cdb7f6e5affd403d745b7dac00', class: {
|
7800
7806
|
"status-icon": true,
|
7801
7807
|
[`icon-${status}`]: true,
|
7802
|
-
}, innerHTML: displayIcon })), hAsync("ic-typography", { key: '
|
7808
|
+
}, innerHTML: displayIcon })), hAsync("ic-typography", { key: '8d0f570e79158d1add1410653c8bbdb5e052aaa3', variant: "caption", class: "statustext" }, hAsync("span", { key: 'c363e60a30ef571a63779ed77a7e4e8358444d5f', id: this.for && getInputValidationTextID(this.for) }, message), hAsync("span", { key: '53959e2fb2d6b51aaa5eca1f9526f0a6e55b5bea', ref: (el) => (this.messageEl = el), class: "sr-only", "aria-live": ariaLiveMode })), hAsync("slot", { key: '861c3d827e89d6e4c917cb6d584e7d3ec6a5c27a', name: "validation-message-adornment" })));
|
7803
7809
|
}
|
7804
7810
|
get el() { return getElement(this); }
|
7805
7811
|
static get watchers() { return {
|
@@ -10215,6 +10221,1381 @@ var checkIcon = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2
|
|
10215
10221
|
</svg>
|
10216
10222
|
`;
|
10217
10223
|
|
10224
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
10225
|
+
|
10226
|
+
var purify = {exports: {}};
|
10227
|
+
|
10228
|
+
/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
|
10229
|
+
|
10230
|
+
(function (module, exports) {
|
10231
|
+
(function (global, factory) {
|
10232
|
+
module.exports = factory() ;
|
10233
|
+
})(commonjsGlobal, (function () {
|
10234
|
+
const {
|
10235
|
+
entries,
|
10236
|
+
setPrototypeOf,
|
10237
|
+
isFrozen,
|
10238
|
+
getPrototypeOf,
|
10239
|
+
getOwnPropertyDescriptor
|
10240
|
+
} = Object;
|
10241
|
+
let {
|
10242
|
+
freeze,
|
10243
|
+
seal,
|
10244
|
+
create
|
10245
|
+
} = Object; // eslint-disable-line import/no-mutable-exports
|
10246
|
+
let {
|
10247
|
+
apply,
|
10248
|
+
construct
|
10249
|
+
} = typeof Reflect !== 'undefined' && Reflect;
|
10250
|
+
if (!freeze) {
|
10251
|
+
freeze = function freeze(x) {
|
10252
|
+
return x;
|
10253
|
+
};
|
10254
|
+
}
|
10255
|
+
if (!seal) {
|
10256
|
+
seal = function seal(x) {
|
10257
|
+
return x;
|
10258
|
+
};
|
10259
|
+
}
|
10260
|
+
if (!apply) {
|
10261
|
+
apply = function apply(fun, thisValue, args) {
|
10262
|
+
return fun.apply(thisValue, args);
|
10263
|
+
};
|
10264
|
+
}
|
10265
|
+
if (!construct) {
|
10266
|
+
construct = function construct(Func, args) {
|
10267
|
+
return new Func(...args);
|
10268
|
+
};
|
10269
|
+
}
|
10270
|
+
const arrayForEach = unapply(Array.prototype.forEach);
|
10271
|
+
const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
|
10272
|
+
const arrayPop = unapply(Array.prototype.pop);
|
10273
|
+
const arrayPush = unapply(Array.prototype.push);
|
10274
|
+
const arraySplice = unapply(Array.prototype.splice);
|
10275
|
+
const stringToLowerCase = unapply(String.prototype.toLowerCase);
|
10276
|
+
const stringToString = unapply(String.prototype.toString);
|
10277
|
+
const stringMatch = unapply(String.prototype.match);
|
10278
|
+
const stringReplace = unapply(String.prototype.replace);
|
10279
|
+
const stringIndexOf = unapply(String.prototype.indexOf);
|
10280
|
+
const stringTrim = unapply(String.prototype.trim);
|
10281
|
+
const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
|
10282
|
+
const regExpTest = unapply(RegExp.prototype.test);
|
10283
|
+
const typeErrorCreate = unconstruct(TypeError);
|
10284
|
+
/**
|
10285
|
+
* Creates a new function that calls the given function with a specified thisArg and arguments.
|
10286
|
+
*
|
10287
|
+
* @param func - The function to be wrapped and called.
|
10288
|
+
* @returns A new function that calls the given function with a specified thisArg and arguments.
|
10289
|
+
*/
|
10290
|
+
function unapply(func) {
|
10291
|
+
return function (thisArg) {
|
10292
|
+
if (thisArg instanceof RegExp) {
|
10293
|
+
thisArg.lastIndex = 0;
|
10294
|
+
}
|
10295
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
10296
|
+
args[_key - 1] = arguments[_key];
|
10297
|
+
}
|
10298
|
+
return apply(func, thisArg, args);
|
10299
|
+
};
|
10300
|
+
}
|
10301
|
+
/**
|
10302
|
+
* Creates a new function that constructs an instance of the given constructor function with the provided arguments.
|
10303
|
+
*
|
10304
|
+
* @param func - The constructor function to be wrapped and called.
|
10305
|
+
* @returns A new function that constructs an instance of the given constructor function with the provided arguments.
|
10306
|
+
*/
|
10307
|
+
function unconstruct(func) {
|
10308
|
+
return function () {
|
10309
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
10310
|
+
args[_key2] = arguments[_key2];
|
10311
|
+
}
|
10312
|
+
return construct(func, args);
|
10313
|
+
};
|
10314
|
+
}
|
10315
|
+
/**
|
10316
|
+
* Add properties to a lookup table
|
10317
|
+
*
|
10318
|
+
* @param set - The set to which elements will be added.
|
10319
|
+
* @param array - The array containing elements to be added to the set.
|
10320
|
+
* @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
|
10321
|
+
* @returns The modified set with added elements.
|
10322
|
+
*/
|
10323
|
+
function addToSet(set, array) {
|
10324
|
+
let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;
|
10325
|
+
if (setPrototypeOf) {
|
10326
|
+
// Make 'in' and truthy checks like Boolean(set.constructor)
|
10327
|
+
// independent of any properties defined on Object.prototype.
|
10328
|
+
// Prevent prototype setters from intercepting set as a this value.
|
10329
|
+
setPrototypeOf(set, null);
|
10330
|
+
}
|
10331
|
+
let l = array.length;
|
10332
|
+
while (l--) {
|
10333
|
+
let element = array[l];
|
10334
|
+
if (typeof element === 'string') {
|
10335
|
+
const lcElement = transformCaseFunc(element);
|
10336
|
+
if (lcElement !== element) {
|
10337
|
+
// Config presets (e.g. tags.js, attrs.js) are immutable.
|
10338
|
+
if (!isFrozen(array)) {
|
10339
|
+
array[l] = lcElement;
|
10340
|
+
}
|
10341
|
+
element = lcElement;
|
10342
|
+
}
|
10343
|
+
}
|
10344
|
+
set[element] = true;
|
10345
|
+
}
|
10346
|
+
return set;
|
10347
|
+
}
|
10348
|
+
/**
|
10349
|
+
* Clean up an array to harden against CSPP
|
10350
|
+
*
|
10351
|
+
* @param array - The array to be cleaned.
|
10352
|
+
* @returns The cleaned version of the array
|
10353
|
+
*/
|
10354
|
+
function cleanArray(array) {
|
10355
|
+
for (let index = 0; index < array.length; index++) {
|
10356
|
+
const isPropertyExist = objectHasOwnProperty(array, index);
|
10357
|
+
if (!isPropertyExist) {
|
10358
|
+
array[index] = null;
|
10359
|
+
}
|
10360
|
+
}
|
10361
|
+
return array;
|
10362
|
+
}
|
10363
|
+
/**
|
10364
|
+
* Shallow clone an object
|
10365
|
+
*
|
10366
|
+
* @param object - The object to be cloned.
|
10367
|
+
* @returns A new object that copies the original.
|
10368
|
+
*/
|
10369
|
+
function clone(object) {
|
10370
|
+
const newObject = create(null);
|
10371
|
+
for (const [property, value] of entries(object)) {
|
10372
|
+
const isPropertyExist = objectHasOwnProperty(object, property);
|
10373
|
+
if (isPropertyExist) {
|
10374
|
+
if (Array.isArray(value)) {
|
10375
|
+
newObject[property] = cleanArray(value);
|
10376
|
+
} else if (value && typeof value === 'object' && value.constructor === Object) {
|
10377
|
+
newObject[property] = clone(value);
|
10378
|
+
} else {
|
10379
|
+
newObject[property] = value;
|
10380
|
+
}
|
10381
|
+
}
|
10382
|
+
}
|
10383
|
+
return newObject;
|
10384
|
+
}
|
10385
|
+
/**
|
10386
|
+
* This method automatically checks if the prop is function or getter and behaves accordingly.
|
10387
|
+
*
|
10388
|
+
* @param object - The object to look up the getter function in its prototype chain.
|
10389
|
+
* @param prop - The property name for which to find the getter function.
|
10390
|
+
* @returns The getter function found in the prototype chain or a fallback function.
|
10391
|
+
*/
|
10392
|
+
function lookupGetter(object, prop) {
|
10393
|
+
while (object !== null) {
|
10394
|
+
const desc = getOwnPropertyDescriptor(object, prop);
|
10395
|
+
if (desc) {
|
10396
|
+
if (desc.get) {
|
10397
|
+
return unapply(desc.get);
|
10398
|
+
}
|
10399
|
+
if (typeof desc.value === 'function') {
|
10400
|
+
return unapply(desc.value);
|
10401
|
+
}
|
10402
|
+
}
|
10403
|
+
object = getPrototypeOf(object);
|
10404
|
+
}
|
10405
|
+
function fallbackValue() {
|
10406
|
+
return null;
|
10407
|
+
}
|
10408
|
+
return fallbackValue;
|
10409
|
+
}
|
10410
|
+
|
10411
|
+
const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
|
10412
|
+
const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
|
10413
|
+
const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
|
10414
|
+
// List of SVG elements that are disallowed by default.
|
10415
|
+
// We still need to know them so that we can do namespace
|
10416
|
+
// checks properly in case one wants to add them to
|
10417
|
+
// allow-list.
|
10418
|
+
const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
|
10419
|
+
const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);
|
10420
|
+
// Similarly to SVG, we want to know all MathML elements,
|
10421
|
+
// even those that we disallow by default.
|
10422
|
+
const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
|
10423
|
+
const text = freeze(['#text']);
|
10424
|
+
|
10425
|
+
const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
|
10426
|
+
const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
|
10427
|
+
const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
|
10428
|
+
const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
|
10429
|
+
|
10430
|
+
// eslint-disable-next-line unicorn/better-regex
|
10431
|
+
const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
|
10432
|
+
const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
|
10433
|
+
const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
|
10434
|
+
const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
|
10435
|
+
const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
|
10436
|
+
const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
|
10437
|
+
);
|
10438
|
+
const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
|
10439
|
+
const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
|
10440
|
+
);
|
10441
|
+
const DOCTYPE_NAME = seal(/^html$/i);
|
10442
|
+
const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
10443
|
+
|
10444
|
+
var EXPRESSIONS = /*#__PURE__*/Object.freeze({
|
10445
|
+
__proto__: null,
|
10446
|
+
ARIA_ATTR: ARIA_ATTR,
|
10447
|
+
ATTR_WHITESPACE: ATTR_WHITESPACE,
|
10448
|
+
CUSTOM_ELEMENT: CUSTOM_ELEMENT,
|
10449
|
+
DATA_ATTR: DATA_ATTR,
|
10450
|
+
DOCTYPE_NAME: DOCTYPE_NAME,
|
10451
|
+
ERB_EXPR: ERB_EXPR,
|
10452
|
+
IS_ALLOWED_URI: IS_ALLOWED_URI,
|
10453
|
+
IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,
|
10454
|
+
MUSTACHE_EXPR: MUSTACHE_EXPR,
|
10455
|
+
TMPLIT_EXPR: TMPLIT_EXPR
|
10456
|
+
});
|
10457
|
+
|
10458
|
+
/* eslint-disable @typescript-eslint/indent */
|
10459
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
|
10460
|
+
const NODE_TYPE = {
|
10461
|
+
element: 1,
|
10462
|
+
attribute: 2,
|
10463
|
+
text: 3,
|
10464
|
+
cdataSection: 4,
|
10465
|
+
entityReference: 5,
|
10466
|
+
// Deprecated
|
10467
|
+
entityNode: 6,
|
10468
|
+
// Deprecated
|
10469
|
+
progressingInstruction: 7,
|
10470
|
+
comment: 8,
|
10471
|
+
document: 9,
|
10472
|
+
documentType: 10,
|
10473
|
+
documentFragment: 11,
|
10474
|
+
notation: 12 // Deprecated
|
10475
|
+
};
|
10476
|
+
const getGlobal = function getGlobal() {
|
10477
|
+
return typeof window === 'undefined' ? null : window;
|
10478
|
+
};
|
10479
|
+
/**
|
10480
|
+
* Creates a no-op policy for internal use only.
|
10481
|
+
* Don't export this function outside this module!
|
10482
|
+
* @param trustedTypes The policy factory.
|
10483
|
+
* @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
|
10484
|
+
* @return The policy created (or null, if Trusted Types
|
10485
|
+
* are not supported or creating the policy failed).
|
10486
|
+
*/
|
10487
|
+
const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
|
10488
|
+
if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
|
10489
|
+
return null;
|
10490
|
+
}
|
10491
|
+
// Allow the callers to control the unique policy name
|
10492
|
+
// by adding a data-tt-policy-suffix to the script element with the DOMPurify.
|
10493
|
+
// Policy creation with duplicate names throws in Trusted Types.
|
10494
|
+
let suffix = null;
|
10495
|
+
const ATTR_NAME = 'data-tt-policy-suffix';
|
10496
|
+
if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
|
10497
|
+
suffix = purifyHostElement.getAttribute(ATTR_NAME);
|
10498
|
+
}
|
10499
|
+
const policyName = 'dompurify' + (suffix ? '#' + suffix : '');
|
10500
|
+
try {
|
10501
|
+
return trustedTypes.createPolicy(policyName, {
|
10502
|
+
createHTML(html) {
|
10503
|
+
return html;
|
10504
|
+
},
|
10505
|
+
createScriptURL(scriptUrl) {
|
10506
|
+
return scriptUrl;
|
10507
|
+
}
|
10508
|
+
});
|
10509
|
+
} catch (_) {
|
10510
|
+
// Policy creation failed (most likely another DOMPurify script has
|
10511
|
+
// already run). Skip creating the policy, as this will only cause errors
|
10512
|
+
// if TT are enforced.
|
10513
|
+
console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
|
10514
|
+
return null;
|
10515
|
+
}
|
10516
|
+
};
|
10517
|
+
const _createHooksMap = function _createHooksMap() {
|
10518
|
+
return {
|
10519
|
+
afterSanitizeAttributes: [],
|
10520
|
+
afterSanitizeElements: [],
|
10521
|
+
afterSanitizeShadowDOM: [],
|
10522
|
+
beforeSanitizeAttributes: [],
|
10523
|
+
beforeSanitizeElements: [],
|
10524
|
+
beforeSanitizeShadowDOM: [],
|
10525
|
+
uponSanitizeAttribute: [],
|
10526
|
+
uponSanitizeElement: [],
|
10527
|
+
uponSanitizeShadowNode: []
|
10528
|
+
};
|
10529
|
+
};
|
10530
|
+
function createDOMPurify() {
|
10531
|
+
let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
|
10532
|
+
const DOMPurify = root => createDOMPurify(root);
|
10533
|
+
DOMPurify.version = '3.2.6';
|
10534
|
+
DOMPurify.removed = [];
|
10535
|
+
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
10536
|
+
// Not running in a browser, provide a factory function
|
10537
|
+
// so that you can pass your own Window
|
10538
|
+
DOMPurify.isSupported = false;
|
10539
|
+
return DOMPurify;
|
10540
|
+
}
|
10541
|
+
let {
|
10542
|
+
document
|
10543
|
+
} = window;
|
10544
|
+
const originalDocument = document;
|
10545
|
+
const currentScript = originalDocument.currentScript;
|
10546
|
+
const {
|
10547
|
+
DocumentFragment,
|
10548
|
+
HTMLTemplateElement,
|
10549
|
+
Node,
|
10550
|
+
Element,
|
10551
|
+
NodeFilter,
|
10552
|
+
NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,
|
10553
|
+
HTMLFormElement,
|
10554
|
+
DOMParser,
|
10555
|
+
trustedTypes
|
10556
|
+
} = window;
|
10557
|
+
const ElementPrototype = Element.prototype;
|
10558
|
+
const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
|
10559
|
+
const remove = lookupGetter(ElementPrototype, 'remove');
|
10560
|
+
const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
|
10561
|
+
const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
|
10562
|
+
const getParentNode = lookupGetter(ElementPrototype, 'parentNode');
|
10563
|
+
// As per issue #47, the web-components registry is inherited by a
|
10564
|
+
// new document created via createHTMLDocument. As per the spec
|
10565
|
+
// (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
|
10566
|
+
// a new empty registry is used when creating a template contents owner
|
10567
|
+
// document, so we use that as our parent document to ensure nothing
|
10568
|
+
// is inherited.
|
10569
|
+
if (typeof HTMLTemplateElement === 'function') {
|
10570
|
+
const template = document.createElement('template');
|
10571
|
+
if (template.content && template.content.ownerDocument) {
|
10572
|
+
document = template.content.ownerDocument;
|
10573
|
+
}
|
10574
|
+
}
|
10575
|
+
let trustedTypesPolicy;
|
10576
|
+
let emptyHTML = '';
|
10577
|
+
const {
|
10578
|
+
implementation,
|
10579
|
+
createNodeIterator,
|
10580
|
+
createDocumentFragment,
|
10581
|
+
getElementsByTagName
|
10582
|
+
} = document;
|
10583
|
+
const {
|
10584
|
+
importNode
|
10585
|
+
} = originalDocument;
|
10586
|
+
let hooks = _createHooksMap();
|
10587
|
+
/**
|
10588
|
+
* Expose whether this browser supports running the full DOMPurify.
|
10589
|
+
*/
|
10590
|
+
DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;
|
10591
|
+
const {
|
10592
|
+
MUSTACHE_EXPR,
|
10593
|
+
ERB_EXPR,
|
10594
|
+
TMPLIT_EXPR,
|
10595
|
+
DATA_ATTR,
|
10596
|
+
ARIA_ATTR,
|
10597
|
+
IS_SCRIPT_OR_DATA,
|
10598
|
+
ATTR_WHITESPACE,
|
10599
|
+
CUSTOM_ELEMENT
|
10600
|
+
} = EXPRESSIONS;
|
10601
|
+
let {
|
10602
|
+
IS_ALLOWED_URI: IS_ALLOWED_URI$1
|
10603
|
+
} = EXPRESSIONS;
|
10604
|
+
/**
|
10605
|
+
* We consider the elements and attributes below to be safe. Ideally
|
10606
|
+
* don't add any new ones but feel free to remove unwanted ones.
|
10607
|
+
*/
|
10608
|
+
/* allowed element names */
|
10609
|
+
let ALLOWED_TAGS = null;
|
10610
|
+
const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
|
10611
|
+
/* Allowed attribute names */
|
10612
|
+
let ALLOWED_ATTR = null;
|
10613
|
+
const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
|
10614
|
+
/*
|
10615
|
+
* Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.
|
10616
|
+
* @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
|
10617
|
+
* @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
|
10618
|
+
* @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
|
10619
|
+
*/
|
10620
|
+
let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
|
10621
|
+
tagNameCheck: {
|
10622
|
+
writable: true,
|
10623
|
+
configurable: false,
|
10624
|
+
enumerable: true,
|
10625
|
+
value: null
|
10626
|
+
},
|
10627
|
+
attributeNameCheck: {
|
10628
|
+
writable: true,
|
10629
|
+
configurable: false,
|
10630
|
+
enumerable: true,
|
10631
|
+
value: null
|
10632
|
+
},
|
10633
|
+
allowCustomizedBuiltInElements: {
|
10634
|
+
writable: true,
|
10635
|
+
configurable: false,
|
10636
|
+
enumerable: true,
|
10637
|
+
value: false
|
10638
|
+
}
|
10639
|
+
}));
|
10640
|
+
/* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
|
10641
|
+
let FORBID_TAGS = null;
|
10642
|
+
/* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
|
10643
|
+
let FORBID_ATTR = null;
|
10644
|
+
/* Decide if ARIA attributes are okay */
|
10645
|
+
let ALLOW_ARIA_ATTR = true;
|
10646
|
+
/* Decide if custom data attributes are okay */
|
10647
|
+
let ALLOW_DATA_ATTR = true;
|
10648
|
+
/* Decide if unknown protocols are okay */
|
10649
|
+
let ALLOW_UNKNOWN_PROTOCOLS = false;
|
10650
|
+
/* Decide if self-closing tags in attributes are allowed.
|
10651
|
+
* Usually removed due to a mXSS issue in jQuery 3.0 */
|
10652
|
+
let ALLOW_SELF_CLOSE_IN_ATTR = true;
|
10653
|
+
/* Output should be safe for common template engines.
|
10654
|
+
* This means, DOMPurify removes data attributes, mustaches and ERB
|
10655
|
+
*/
|
10656
|
+
let SAFE_FOR_TEMPLATES = false;
|
10657
|
+
/* Output should be safe even for XML used within HTML and alike.
|
10658
|
+
* This means, DOMPurify removes comments when containing risky content.
|
10659
|
+
*/
|
10660
|
+
let SAFE_FOR_XML = true;
|
10661
|
+
/* Decide if document with <html>... should be returned */
|
10662
|
+
let WHOLE_DOCUMENT = false;
|
10663
|
+
/* Track whether config is already set on this instance of DOMPurify. */
|
10664
|
+
let SET_CONFIG = false;
|
10665
|
+
/* Decide if all elements (e.g. style, script) must be children of
|
10666
|
+
* document.body. By default, browsers might move them to document.head */
|
10667
|
+
let FORCE_BODY = false;
|
10668
|
+
/* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
|
10669
|
+
* string (or a TrustedHTML object if Trusted Types are supported).
|
10670
|
+
* If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
|
10671
|
+
*/
|
10672
|
+
let RETURN_DOM = false;
|
10673
|
+
/* Decide if a DOM `DocumentFragment` should be returned, instead of a html
|
10674
|
+
* string (or a TrustedHTML object if Trusted Types are supported) */
|
10675
|
+
let RETURN_DOM_FRAGMENT = false;
|
10676
|
+
/* Try to return a Trusted Type object instead of a string, return a string in
|
10677
|
+
* case Trusted Types are not supported */
|
10678
|
+
let RETURN_TRUSTED_TYPE = false;
|
10679
|
+
/* Output should be free from DOM clobbering attacks?
|
10680
|
+
* This sanitizes markups named with colliding, clobberable built-in DOM APIs.
|
10681
|
+
*/
|
10682
|
+
let SANITIZE_DOM = true;
|
10683
|
+
/* Achieve full DOM Clobbering protection by isolating the namespace of named
|
10684
|
+
* properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
|
10685
|
+
*
|
10686
|
+
* HTML/DOM spec rules that enable DOM Clobbering:
|
10687
|
+
* - Named Access on Window (§7.3.3)
|
10688
|
+
* - DOM Tree Accessors (§3.1.5)
|
10689
|
+
* - Form Element Parent-Child Relations (§4.10.3)
|
10690
|
+
* - Iframe srcdoc / Nested WindowProxies (§4.8.5)
|
10691
|
+
* - HTMLCollection (§4.2.10.2)
|
10692
|
+
*
|
10693
|
+
* Namespace isolation is implemented by prefixing `id` and `name` attributes
|
10694
|
+
* with a constant string, i.e., `user-content-`
|
10695
|
+
*/
|
10696
|
+
let SANITIZE_NAMED_PROPS = false;
|
10697
|
+
const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
|
10698
|
+
/* Keep element content when removing element? */
|
10699
|
+
let KEEP_CONTENT = true;
|
10700
|
+
/* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
|
10701
|
+
* of importing it into a new Document and returning a sanitized copy */
|
10702
|
+
let IN_PLACE = false;
|
10703
|
+
/* Allow usage of profiles like html, svg and mathMl */
|
10704
|
+
let USE_PROFILES = {};
|
10705
|
+
/* Tags to ignore content of when KEEP_CONTENT is true */
|
10706
|
+
let FORBID_CONTENTS = null;
|
10707
|
+
const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
|
10708
|
+
/* Tags that are safe for data: URIs */
|
10709
|
+
let DATA_URI_TAGS = null;
|
10710
|
+
const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
|
10711
|
+
/* Attributes safe for values like "javascript:" */
|
10712
|
+
let URI_SAFE_ATTRIBUTES = null;
|
10713
|
+
const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
|
10714
|
+
const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
|
10715
|
+
const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
10716
|
+
const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
|
10717
|
+
/* Document namespace */
|
10718
|
+
let NAMESPACE = HTML_NAMESPACE;
|
10719
|
+
let IS_EMPTY_INPUT = false;
|
10720
|
+
/* Allowed XHTML+XML namespaces */
|
10721
|
+
let ALLOWED_NAMESPACES = null;
|
10722
|
+
const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
|
10723
|
+
let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
|
10724
|
+
let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);
|
10725
|
+
// Certain elements are allowed in both SVG and HTML
|
10726
|
+
// namespace. We need to specify them explicitly
|
10727
|
+
// so that they don't get erroneously deleted from
|
10728
|
+
// HTML namespace.
|
10729
|
+
const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
|
10730
|
+
/* Parsing of strict XHTML documents */
|
10731
|
+
let PARSER_MEDIA_TYPE = null;
|
10732
|
+
const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
|
10733
|
+
const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
|
10734
|
+
let transformCaseFunc = null;
|
10735
|
+
/* Keep a reference to config to pass to hooks */
|
10736
|
+
let CONFIG = null;
|
10737
|
+
/* Ideally, do not touch anything below this line */
|
10738
|
+
/* ______________________________________________ */
|
10739
|
+
const formElement = document.createElement('form');
|
10740
|
+
const isRegexOrFunction = function isRegexOrFunction(testValue) {
|
10741
|
+
return testValue instanceof RegExp || testValue instanceof Function;
|
10742
|
+
};
|
10743
|
+
/**
|
10744
|
+
* _parseConfig
|
10745
|
+
*
|
10746
|
+
* @param cfg optional config literal
|
10747
|
+
*/
|
10748
|
+
// eslint-disable-next-line complexity
|
10749
|
+
const _parseConfig = function _parseConfig() {
|
10750
|
+
let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
10751
|
+
if (CONFIG && CONFIG === cfg) {
|
10752
|
+
return;
|
10753
|
+
}
|
10754
|
+
/* Shield configuration object from tampering */
|
10755
|
+
if (!cfg || typeof cfg !== 'object') {
|
10756
|
+
cfg = {};
|
10757
|
+
}
|
10758
|
+
/* Shield configuration object from prototype pollution */
|
10759
|
+
cfg = clone(cfg);
|
10760
|
+
PARSER_MEDIA_TYPE =
|
10761
|
+
// eslint-disable-next-line unicorn/prefer-includes
|
10762
|
+
SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
|
10763
|
+
// HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
|
10764
|
+
transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
|
10765
|
+
/* Set configuration parameters */
|
10766
|
+
ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
|
10767
|
+
ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
|
10768
|
+
ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
|
10769
|
+
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
|
10770
|
+
DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
|
10771
|
+
FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
10772
|
+
FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
|
10773
|
+
FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
|
10774
|
+
USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
|
10775
|
+
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
|
10776
|
+
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
|
10777
|
+
ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
|
10778
|
+
ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true
|
10779
|
+
SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
|
10780
|
+
SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true
|
10781
|
+
WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
|
10782
|
+
RETURN_DOM = cfg.RETURN_DOM || false; // Default false
|
10783
|
+
RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
|
10784
|
+
RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
|
10785
|
+
FORCE_BODY = cfg.FORCE_BODY || false; // Default false
|
10786
|
+
SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
|
10787
|
+
SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
|
10788
|
+
KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
|
10789
|
+
IN_PLACE = cfg.IN_PLACE || false; // Default false
|
10790
|
+
IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
|
10791
|
+
NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
|
10792
|
+
MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
|
10793
|
+
HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
|
10794
|
+
CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
|
10795
|
+
if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
|
10796
|
+
CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
|
10797
|
+
}
|
10798
|
+
if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
|
10799
|
+
CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
|
10800
|
+
}
|
10801
|
+
if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
|
10802
|
+
CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
|
10803
|
+
}
|
10804
|
+
if (SAFE_FOR_TEMPLATES) {
|
10805
|
+
ALLOW_DATA_ATTR = false;
|
10806
|
+
}
|
10807
|
+
if (RETURN_DOM_FRAGMENT) {
|
10808
|
+
RETURN_DOM = true;
|
10809
|
+
}
|
10810
|
+
/* Parse profile info */
|
10811
|
+
if (USE_PROFILES) {
|
10812
|
+
ALLOWED_TAGS = addToSet({}, text);
|
10813
|
+
ALLOWED_ATTR = [];
|
10814
|
+
if (USE_PROFILES.html === true) {
|
10815
|
+
addToSet(ALLOWED_TAGS, html$1);
|
10816
|
+
addToSet(ALLOWED_ATTR, html);
|
10817
|
+
}
|
10818
|
+
if (USE_PROFILES.svg === true) {
|
10819
|
+
addToSet(ALLOWED_TAGS, svg$1);
|
10820
|
+
addToSet(ALLOWED_ATTR, svg);
|
10821
|
+
addToSet(ALLOWED_ATTR, xml);
|
10822
|
+
}
|
10823
|
+
if (USE_PROFILES.svgFilters === true) {
|
10824
|
+
addToSet(ALLOWED_TAGS, svgFilters);
|
10825
|
+
addToSet(ALLOWED_ATTR, svg);
|
10826
|
+
addToSet(ALLOWED_ATTR, xml);
|
10827
|
+
}
|
10828
|
+
if (USE_PROFILES.mathMl === true) {
|
10829
|
+
addToSet(ALLOWED_TAGS, mathMl$1);
|
10830
|
+
addToSet(ALLOWED_ATTR, mathMl);
|
10831
|
+
addToSet(ALLOWED_ATTR, xml);
|
10832
|
+
}
|
10833
|
+
}
|
10834
|
+
/* Merge configuration parameters */
|
10835
|
+
if (cfg.ADD_TAGS) {
|
10836
|
+
if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
10837
|
+
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
10838
|
+
}
|
10839
|
+
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
10840
|
+
}
|
10841
|
+
if (cfg.ADD_ATTR) {
|
10842
|
+
if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
|
10843
|
+
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
10844
|
+
}
|
10845
|
+
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
10846
|
+
}
|
10847
|
+
if (cfg.ADD_URI_SAFE_ATTR) {
|
10848
|
+
addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
|
10849
|
+
}
|
10850
|
+
if (cfg.FORBID_CONTENTS) {
|
10851
|
+
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
10852
|
+
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
10853
|
+
}
|
10854
|
+
addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
|
10855
|
+
}
|
10856
|
+
/* Add #text in case KEEP_CONTENT is set to true */
|
10857
|
+
if (KEEP_CONTENT) {
|
10858
|
+
ALLOWED_TAGS['#text'] = true;
|
10859
|
+
}
|
10860
|
+
/* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
|
10861
|
+
if (WHOLE_DOCUMENT) {
|
10862
|
+
addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
|
10863
|
+
}
|
10864
|
+
/* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
|
10865
|
+
if (ALLOWED_TAGS.table) {
|
10866
|
+
addToSet(ALLOWED_TAGS, ['tbody']);
|
10867
|
+
delete FORBID_TAGS.tbody;
|
10868
|
+
}
|
10869
|
+
if (cfg.TRUSTED_TYPES_POLICY) {
|
10870
|
+
if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
|
10871
|
+
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
10872
|
+
}
|
10873
|
+
if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
|
10874
|
+
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
10875
|
+
}
|
10876
|
+
// Overwrite existing TrustedTypes policy.
|
10877
|
+
trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
|
10878
|
+
// Sign local variables required by `sanitize`.
|
10879
|
+
emptyHTML = trustedTypesPolicy.createHTML('');
|
10880
|
+
} else {
|
10881
|
+
// Uninitialized policy, attempt to initialize the internal dompurify policy.
|
10882
|
+
if (trustedTypesPolicy === undefined) {
|
10883
|
+
trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
|
10884
|
+
}
|
10885
|
+
// If creating the internal policy succeeded sign internal variables.
|
10886
|
+
if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {
|
10887
|
+
emptyHTML = trustedTypesPolicy.createHTML('');
|
10888
|
+
}
|
10889
|
+
}
|
10890
|
+
// Prevent further manipulation of configuration.
|
10891
|
+
// Not available in IE8, Safari 5, etc.
|
10892
|
+
if (freeze) {
|
10893
|
+
freeze(cfg);
|
10894
|
+
}
|
10895
|
+
CONFIG = cfg;
|
10896
|
+
};
|
10897
|
+
/* Keep track of all possible SVG and MathML tags
|
10898
|
+
* so that we can perform the namespace checks
|
10899
|
+
* correctly. */
|
10900
|
+
const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
|
10901
|
+
const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
|
10902
|
+
/**
|
10903
|
+
* @param element a DOM element whose namespace is being checked
|
10904
|
+
* @returns Return false if the element has a
|
10905
|
+
* namespace that a spec-compliant parser would never
|
10906
|
+
* return. Return true otherwise.
|
10907
|
+
*/
|
10908
|
+
const _checkValidNamespace = function _checkValidNamespace(element) {
|
10909
|
+
let parent = getParentNode(element);
|
10910
|
+
// In JSDOM, if we're inside shadow DOM, then parentNode
|
10911
|
+
// can be null. We just simulate parent in this case.
|
10912
|
+
if (!parent || !parent.tagName) {
|
10913
|
+
parent = {
|
10914
|
+
namespaceURI: NAMESPACE,
|
10915
|
+
tagName: 'template'
|
10916
|
+
};
|
10917
|
+
}
|
10918
|
+
const tagName = stringToLowerCase(element.tagName);
|
10919
|
+
const parentTagName = stringToLowerCase(parent.tagName);
|
10920
|
+
if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
|
10921
|
+
return false;
|
10922
|
+
}
|
10923
|
+
if (element.namespaceURI === SVG_NAMESPACE) {
|
10924
|
+
// The only way to switch from HTML namespace to SVG
|
10925
|
+
// is via <svg>. If it happens via any other tag, then
|
10926
|
+
// it should be killed.
|
10927
|
+
if (parent.namespaceURI === HTML_NAMESPACE) {
|
10928
|
+
return tagName === 'svg';
|
10929
|
+
}
|
10930
|
+
// The only way to switch from MathML to SVG is via`
|
10931
|
+
// svg if parent is either <annotation-xml> or MathML
|
10932
|
+
// text integration points.
|
10933
|
+
if (parent.namespaceURI === MATHML_NAMESPACE) {
|
10934
|
+
return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
|
10935
|
+
}
|
10936
|
+
// We only allow elements that are defined in SVG
|
10937
|
+
// spec. All others are disallowed in SVG namespace.
|
10938
|
+
return Boolean(ALL_SVG_TAGS[tagName]);
|
10939
|
+
}
|
10940
|
+
if (element.namespaceURI === MATHML_NAMESPACE) {
|
10941
|
+
// The only way to switch from HTML namespace to MathML
|
10942
|
+
// is via <math>. If it happens via any other tag, then
|
10943
|
+
// it should be killed.
|
10944
|
+
if (parent.namespaceURI === HTML_NAMESPACE) {
|
10945
|
+
return tagName === 'math';
|
10946
|
+
}
|
10947
|
+
// The only way to switch from SVG to MathML is via
|
10948
|
+
// <math> and HTML integration points
|
10949
|
+
if (parent.namespaceURI === SVG_NAMESPACE) {
|
10950
|
+
return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
|
10951
|
+
}
|
10952
|
+
// We only allow elements that are defined in MathML
|
10953
|
+
// spec. All others are disallowed in MathML namespace.
|
10954
|
+
return Boolean(ALL_MATHML_TAGS[tagName]);
|
10955
|
+
}
|
10956
|
+
if (element.namespaceURI === HTML_NAMESPACE) {
|
10957
|
+
// The only way to switch from SVG to HTML is via
|
10958
|
+
// HTML integration points, and from MathML to HTML
|
10959
|
+
// is via MathML text integration points
|
10960
|
+
if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
|
10961
|
+
return false;
|
10962
|
+
}
|
10963
|
+
if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
|
10964
|
+
return false;
|
10965
|
+
}
|
10966
|
+
// We disallow tags that are specific for MathML
|
10967
|
+
// or SVG and should never appear in HTML namespace
|
10968
|
+
return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
|
10969
|
+
}
|
10970
|
+
// For XHTML and XML documents that support custom namespaces
|
10971
|
+
if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
|
10972
|
+
return true;
|
10973
|
+
}
|
10974
|
+
// The code should never reach this place (this means
|
10975
|
+
// that the element somehow got namespace that is not
|
10976
|
+
// HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
|
10977
|
+
// Return false just in case.
|
10978
|
+
return false;
|
10979
|
+
};
|
10980
|
+
/**
|
10981
|
+
* _forceRemove
|
10982
|
+
*
|
10983
|
+
* @param node a DOM node
|
10984
|
+
*/
|
10985
|
+
const _forceRemove = function _forceRemove(node) {
|
10986
|
+
arrayPush(DOMPurify.removed, {
|
10987
|
+
element: node
|
10988
|
+
});
|
10989
|
+
try {
|
10990
|
+
// eslint-disable-next-line unicorn/prefer-dom-node-remove
|
10991
|
+
getParentNode(node).removeChild(node);
|
10992
|
+
} catch (_) {
|
10993
|
+
remove(node);
|
10994
|
+
}
|
10995
|
+
};
|
10996
|
+
/**
|
10997
|
+
* _removeAttribute
|
10998
|
+
*
|
10999
|
+
* @param name an Attribute name
|
11000
|
+
* @param element a DOM node
|
11001
|
+
*/
|
11002
|
+
const _removeAttribute = function _removeAttribute(name, element) {
|
11003
|
+
try {
|
11004
|
+
arrayPush(DOMPurify.removed, {
|
11005
|
+
attribute: element.getAttributeNode(name),
|
11006
|
+
from: element
|
11007
|
+
});
|
11008
|
+
} catch (_) {
|
11009
|
+
arrayPush(DOMPurify.removed, {
|
11010
|
+
attribute: null,
|
11011
|
+
from: element
|
11012
|
+
});
|
11013
|
+
}
|
11014
|
+
element.removeAttribute(name);
|
11015
|
+
// We void attribute values for unremovable "is" attributes
|
11016
|
+
if (name === 'is') {
|
11017
|
+
if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
|
11018
|
+
try {
|
11019
|
+
_forceRemove(element);
|
11020
|
+
} catch (_) {}
|
11021
|
+
} else {
|
11022
|
+
try {
|
11023
|
+
element.setAttribute(name, '');
|
11024
|
+
} catch (_) {}
|
11025
|
+
}
|
11026
|
+
}
|
11027
|
+
};
|
11028
|
+
/**
|
11029
|
+
* _initDocument
|
11030
|
+
*
|
11031
|
+
* @param dirty - a string of dirty markup
|
11032
|
+
* @return a DOM, filled with the dirty markup
|
11033
|
+
*/
|
11034
|
+
const _initDocument = function _initDocument(dirty) {
|
11035
|
+
/* Create a HTML document */
|
11036
|
+
let doc = null;
|
11037
|
+
let leadingWhitespace = null;
|
11038
|
+
if (FORCE_BODY) {
|
11039
|
+
dirty = '<remove></remove>' + dirty;
|
11040
|
+
} else {
|
11041
|
+
/* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
|
11042
|
+
const matches = stringMatch(dirty, /^[\r\n\t ]+/);
|
11043
|
+
leadingWhitespace = matches && matches[0];
|
11044
|
+
}
|
11045
|
+
if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {
|
11046
|
+
// Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
|
11047
|
+
dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
|
11048
|
+
}
|
11049
|
+
const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
|
11050
|
+
/*
|
11051
|
+
* Use the DOMParser API by default, fallback later if needs be
|
11052
|
+
* DOMParser not work for svg when has multiple root element.
|
11053
|
+
*/
|
11054
|
+
if (NAMESPACE === HTML_NAMESPACE) {
|
11055
|
+
try {
|
11056
|
+
doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
|
11057
|
+
} catch (_) {}
|
11058
|
+
}
|
11059
|
+
/* Use createHTMLDocument in case DOMParser is not available */
|
11060
|
+
if (!doc || !doc.documentElement) {
|
11061
|
+
doc = implementation.createDocument(NAMESPACE, 'template', null);
|
11062
|
+
try {
|
11063
|
+
doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
|
11064
|
+
} catch (_) {
|
11065
|
+
// Syntax error if dirtyPayload is invalid xml
|
11066
|
+
}
|
11067
|
+
}
|
11068
|
+
const body = doc.body || doc.documentElement;
|
11069
|
+
if (dirty && leadingWhitespace) {
|
11070
|
+
body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
|
11071
|
+
}
|
11072
|
+
/* Work on whole document or just its body */
|
11073
|
+
if (NAMESPACE === HTML_NAMESPACE) {
|
11074
|
+
return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
|
11075
|
+
}
|
11076
|
+
return WHOLE_DOCUMENT ? doc.documentElement : body;
|
11077
|
+
};
|
11078
|
+
/**
|
11079
|
+
* Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
|
11080
|
+
*
|
11081
|
+
* @param root The root element or node to start traversing on.
|
11082
|
+
* @return The created NodeIterator
|
11083
|
+
*/
|
11084
|
+
const _createNodeIterator = function _createNodeIterator(root) {
|
11085
|
+
return createNodeIterator.call(root.ownerDocument || root, root,
|
11086
|
+
// eslint-disable-next-line no-bitwise
|
11087
|
+
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
|
11088
|
+
};
|
11089
|
+
/**
|
11090
|
+
* _isClobbered
|
11091
|
+
*
|
11092
|
+
* @param element element to check for clobbering attacks
|
11093
|
+
* @return true if clobbered, false if safe
|
11094
|
+
*/
|
11095
|
+
const _isClobbered = function _isClobbered(element) {
|
11096
|
+
return element instanceof HTMLFormElement && (typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function');
|
11097
|
+
};
|
11098
|
+
/**
|
11099
|
+
* Checks whether the given object is a DOM node.
|
11100
|
+
*
|
11101
|
+
* @param value object to check whether it's a DOM node
|
11102
|
+
* @return true is object is a DOM node
|
11103
|
+
*/
|
11104
|
+
const _isNode = function _isNode(value) {
|
11105
|
+
return typeof Node === 'function' && value instanceof Node;
|
11106
|
+
};
|
11107
|
+
function _executeHooks(hooks, currentNode, data) {
|
11108
|
+
arrayForEach(hooks, hook => {
|
11109
|
+
hook.call(DOMPurify, currentNode, data, CONFIG);
|
11110
|
+
});
|
11111
|
+
}
|
11112
|
+
/**
|
11113
|
+
* _sanitizeElements
|
11114
|
+
*
|
11115
|
+
* @protect nodeName
|
11116
|
+
* @protect textContent
|
11117
|
+
* @protect removeChild
|
11118
|
+
* @param currentNode to check for permission to exist
|
11119
|
+
* @return true if node was killed, false if left alive
|
11120
|
+
*/
|
11121
|
+
const _sanitizeElements = function _sanitizeElements(currentNode) {
|
11122
|
+
let content = null;
|
11123
|
+
/* Execute a hook if present */
|
11124
|
+
_executeHooks(hooks.beforeSanitizeElements, currentNode, null);
|
11125
|
+
/* Check if element is clobbered or can clobber */
|
11126
|
+
if (_isClobbered(currentNode)) {
|
11127
|
+
_forceRemove(currentNode);
|
11128
|
+
return true;
|
11129
|
+
}
|
11130
|
+
/* Now let's check the element's type and name */
|
11131
|
+
const tagName = transformCaseFunc(currentNode.nodeName);
|
11132
|
+
/* Execute a hook if present */
|
11133
|
+
_executeHooks(hooks.uponSanitizeElement, currentNode, {
|
11134
|
+
tagName,
|
11135
|
+
allowedTags: ALLOWED_TAGS
|
11136
|
+
});
|
11137
|
+
/* Detect mXSS attempts abusing namespace confusion */
|
11138
|
+
if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
|
11139
|
+
_forceRemove(currentNode);
|
11140
|
+
return true;
|
11141
|
+
}
|
11142
|
+
/* Remove any occurrence of processing instructions */
|
11143
|
+
if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
|
11144
|
+
_forceRemove(currentNode);
|
11145
|
+
return true;
|
11146
|
+
}
|
11147
|
+
/* Remove any kind of possibly harmful comments */
|
11148
|
+
if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
|
11149
|
+
_forceRemove(currentNode);
|
11150
|
+
return true;
|
11151
|
+
}
|
11152
|
+
/* Remove element if anything forbids its presence */
|
11153
|
+
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
11154
|
+
/* Check if we have a custom element to handle */
|
11155
|
+
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
11156
|
+
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
11157
|
+
return false;
|
11158
|
+
}
|
11159
|
+
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
|
11160
|
+
return false;
|
11161
|
+
}
|
11162
|
+
}
|
11163
|
+
/* Keep content except for bad-listed elements */
|
11164
|
+
if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
|
11165
|
+
const parentNode = getParentNode(currentNode) || currentNode.parentNode;
|
11166
|
+
const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
|
11167
|
+
if (childNodes && parentNode) {
|
11168
|
+
const childCount = childNodes.length;
|
11169
|
+
for (let i = childCount - 1; i >= 0; --i) {
|
11170
|
+
const childClone = cloneNode(childNodes[i], true);
|
11171
|
+
childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
|
11172
|
+
parentNode.insertBefore(childClone, getNextSibling(currentNode));
|
11173
|
+
}
|
11174
|
+
}
|
11175
|
+
}
|
11176
|
+
_forceRemove(currentNode);
|
11177
|
+
return true;
|
11178
|
+
}
|
11179
|
+
/* Check whether element has a valid namespace */
|
11180
|
+
if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
|
11181
|
+
_forceRemove(currentNode);
|
11182
|
+
return true;
|
11183
|
+
}
|
11184
|
+
/* Make sure that older browsers don't get fallback-tag mXSS */
|
11185
|
+
if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
|
11186
|
+
_forceRemove(currentNode);
|
11187
|
+
return true;
|
11188
|
+
}
|
11189
|
+
/* Sanitize element content to be template-safe */
|
11190
|
+
if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
|
11191
|
+
/* Get the element's text content */
|
11192
|
+
content = currentNode.textContent;
|
11193
|
+
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
|
11194
|
+
content = stringReplace(content, expr, ' ');
|
11195
|
+
});
|
11196
|
+
if (currentNode.textContent !== content) {
|
11197
|
+
arrayPush(DOMPurify.removed, {
|
11198
|
+
element: currentNode.cloneNode()
|
11199
|
+
});
|
11200
|
+
currentNode.textContent = content;
|
11201
|
+
}
|
11202
|
+
}
|
11203
|
+
/* Execute a hook if present */
|
11204
|
+
_executeHooks(hooks.afterSanitizeElements, currentNode, null);
|
11205
|
+
return false;
|
11206
|
+
};
|
11207
|
+
/**
|
11208
|
+
* _isValidAttribute
|
11209
|
+
*
|
11210
|
+
* @param lcTag Lowercase tag name of containing element.
|
11211
|
+
* @param lcName Lowercase attribute name.
|
11212
|
+
* @param value Attribute value.
|
11213
|
+
* @return Returns true if `value` is valid, otherwise false.
|
11214
|
+
*/
|
11215
|
+
// eslint-disable-next-line complexity
|
11216
|
+
const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
|
11217
|
+
/* Make sure attribute cannot clobber */
|
11218
|
+
if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
|
11219
|
+
return false;
|
11220
|
+
}
|
11221
|
+
/* Allow valid data-* attributes: At least one character after "-"
|
11222
|
+
(https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
|
11223
|
+
XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
|
11224
|
+
We don't need to check the value; it's always URI safe. */
|
11225
|
+
if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
|
11226
|
+
if (
|
11227
|
+
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
11228
|
+
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
11229
|
+
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
11230
|
+
_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||
|
11231
|
+
// Alternative, second condition checks if it's an `is`-attribute, AND
|
11232
|
+
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
11233
|
+
lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
|
11234
|
+
return false;
|
11235
|
+
}
|
11236
|
+
/* Check value is safe. First, is attr inert? If so, is safe */
|
11237
|
+
} else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {
|
11238
|
+
return false;
|
11239
|
+
} else ;
|
11240
|
+
return true;
|
11241
|
+
};
|
11242
|
+
/**
|
11243
|
+
* _isBasicCustomElement
|
11244
|
+
* checks if at least one dash is included in tagName, and it's not the first char
|
11245
|
+
* for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
|
11246
|
+
*
|
11247
|
+
* @param tagName name of the tag of the node to sanitize
|
11248
|
+
* @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
|
11249
|
+
*/
|
11250
|
+
const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
|
11251
|
+
return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);
|
11252
|
+
};
|
11253
|
+
/**
|
11254
|
+
* _sanitizeAttributes
|
11255
|
+
*
|
11256
|
+
* @protect attributes
|
11257
|
+
* @protect nodeName
|
11258
|
+
* @protect removeAttribute
|
11259
|
+
* @protect setAttribute
|
11260
|
+
*
|
11261
|
+
* @param currentNode to sanitize
|
11262
|
+
*/
|
11263
|
+
const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
|
11264
|
+
/* Execute a hook if present */
|
11265
|
+
_executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
|
11266
|
+
const {
|
11267
|
+
attributes
|
11268
|
+
} = currentNode;
|
11269
|
+
/* Check if we have attributes; if not we might have a text node */
|
11270
|
+
if (!attributes || _isClobbered(currentNode)) {
|
11271
|
+
return;
|
11272
|
+
}
|
11273
|
+
const hookEvent = {
|
11274
|
+
attrName: '',
|
11275
|
+
attrValue: '',
|
11276
|
+
keepAttr: true,
|
11277
|
+
allowedAttributes: ALLOWED_ATTR,
|
11278
|
+
forceKeepAttr: undefined
|
11279
|
+
};
|
11280
|
+
let l = attributes.length;
|
11281
|
+
/* Go backwards over all attributes; safely remove bad ones */
|
11282
|
+
while (l--) {
|
11283
|
+
const attr = attributes[l];
|
11284
|
+
const {
|
11285
|
+
name,
|
11286
|
+
namespaceURI,
|
11287
|
+
value: attrValue
|
11288
|
+
} = attr;
|
11289
|
+
const lcName = transformCaseFunc(name);
|
11290
|
+
const initValue = attrValue;
|
11291
|
+
let value = name === 'value' ? initValue : stringTrim(initValue);
|
11292
|
+
/* Execute a hook if present */
|
11293
|
+
hookEvent.attrName = lcName;
|
11294
|
+
hookEvent.attrValue = value;
|
11295
|
+
hookEvent.keepAttr = true;
|
11296
|
+
hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
|
11297
|
+
_executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
|
11298
|
+
value = hookEvent.attrValue;
|
11299
|
+
/* Full DOM Clobbering protection via namespace isolation,
|
11300
|
+
* Prefix id and name attributes with `user-content-`
|
11301
|
+
*/
|
11302
|
+
if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
|
11303
|
+
// Remove the attribute with this value
|
11304
|
+
_removeAttribute(name, currentNode);
|
11305
|
+
// Prefix the value and later re-create the attribute with the sanitized value
|
11306
|
+
value = SANITIZE_NAMED_PROPS_PREFIX + value;
|
11307
|
+
}
|
11308
|
+
/* Work around a security issue with comments inside attributes */
|
11309
|
+
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
|
11310
|
+
_removeAttribute(name, currentNode);
|
11311
|
+
continue;
|
11312
|
+
}
|
11313
|
+
/* Did the hooks approve of the attribute? */
|
11314
|
+
if (hookEvent.forceKeepAttr) {
|
11315
|
+
continue;
|
11316
|
+
}
|
11317
|
+
/* Did the hooks approve of the attribute? */
|
11318
|
+
if (!hookEvent.keepAttr) {
|
11319
|
+
_removeAttribute(name, currentNode);
|
11320
|
+
continue;
|
11321
|
+
}
|
11322
|
+
/* Work around a security issue in jQuery 3.0 */
|
11323
|
+
if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
|
11324
|
+
_removeAttribute(name, currentNode);
|
11325
|
+
continue;
|
11326
|
+
}
|
11327
|
+
/* Sanitize attribute content to be template-safe */
|
11328
|
+
if (SAFE_FOR_TEMPLATES) {
|
11329
|
+
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
|
11330
|
+
value = stringReplace(value, expr, ' ');
|
11331
|
+
});
|
11332
|
+
}
|
11333
|
+
/* Is `value` valid for this attribute? */
|
11334
|
+
const lcTag = transformCaseFunc(currentNode.nodeName);
|
11335
|
+
if (!_isValidAttribute(lcTag, lcName, value)) {
|
11336
|
+
_removeAttribute(name, currentNode);
|
11337
|
+
continue;
|
11338
|
+
}
|
11339
|
+
/* Handle attributes that require Trusted Types */
|
11340
|
+
if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {
|
11341
|
+
if (namespaceURI) ; else {
|
11342
|
+
switch (trustedTypes.getAttributeType(lcTag, lcName)) {
|
11343
|
+
case 'TrustedHTML':
|
11344
|
+
{
|
11345
|
+
value = trustedTypesPolicy.createHTML(value);
|
11346
|
+
break;
|
11347
|
+
}
|
11348
|
+
case 'TrustedScriptURL':
|
11349
|
+
{
|
11350
|
+
value = trustedTypesPolicy.createScriptURL(value);
|
11351
|
+
break;
|
11352
|
+
}
|
11353
|
+
}
|
11354
|
+
}
|
11355
|
+
}
|
11356
|
+
/* Handle invalid data-* attribute set by try-catching it */
|
11357
|
+
if (value !== initValue) {
|
11358
|
+
try {
|
11359
|
+
if (namespaceURI) {
|
11360
|
+
currentNode.setAttributeNS(namespaceURI, name, value);
|
11361
|
+
} else {
|
11362
|
+
/* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
|
11363
|
+
currentNode.setAttribute(name, value);
|
11364
|
+
}
|
11365
|
+
if (_isClobbered(currentNode)) {
|
11366
|
+
_forceRemove(currentNode);
|
11367
|
+
} else {
|
11368
|
+
arrayPop(DOMPurify.removed);
|
11369
|
+
}
|
11370
|
+
} catch (_) {
|
11371
|
+
_removeAttribute(name, currentNode);
|
11372
|
+
}
|
11373
|
+
}
|
11374
|
+
}
|
11375
|
+
/* Execute a hook if present */
|
11376
|
+
_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
|
11377
|
+
};
|
11378
|
+
/**
|
11379
|
+
* _sanitizeShadowDOM
|
11380
|
+
*
|
11381
|
+
* @param fragment to iterate over recursively
|
11382
|
+
*/
|
11383
|
+
const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
|
11384
|
+
let shadowNode = null;
|
11385
|
+
const shadowIterator = _createNodeIterator(fragment);
|
11386
|
+
/* Execute a hook if present */
|
11387
|
+
_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
|
11388
|
+
while (shadowNode = shadowIterator.nextNode()) {
|
11389
|
+
/* Execute a hook if present */
|
11390
|
+
_executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
|
11391
|
+
/* Sanitize tags and elements */
|
11392
|
+
_sanitizeElements(shadowNode);
|
11393
|
+
/* Check attributes next */
|
11394
|
+
_sanitizeAttributes(shadowNode);
|
11395
|
+
/* Deep shadow DOM detected */
|
11396
|
+
if (shadowNode.content instanceof DocumentFragment) {
|
11397
|
+
_sanitizeShadowDOM(shadowNode.content);
|
11398
|
+
}
|
11399
|
+
}
|
11400
|
+
/* Execute a hook if present */
|
11401
|
+
_executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
|
11402
|
+
};
|
11403
|
+
// eslint-disable-next-line complexity
|
11404
|
+
DOMPurify.sanitize = function (dirty) {
|
11405
|
+
let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
11406
|
+
let body = null;
|
11407
|
+
let importedNode = null;
|
11408
|
+
let currentNode = null;
|
11409
|
+
let returnNode = null;
|
11410
|
+
/* Make sure we have a string to sanitize.
|
11411
|
+
DO NOT return early, as this will return the wrong type if
|
11412
|
+
the user has requested a DOM object rather than a string */
|
11413
|
+
IS_EMPTY_INPUT = !dirty;
|
11414
|
+
if (IS_EMPTY_INPUT) {
|
11415
|
+
dirty = '<!-->';
|
11416
|
+
}
|
11417
|
+
/* Stringify, in case dirty is an object */
|
11418
|
+
if (typeof dirty !== 'string' && !_isNode(dirty)) {
|
11419
|
+
if (typeof dirty.toString === 'function') {
|
11420
|
+
dirty = dirty.toString();
|
11421
|
+
if (typeof dirty !== 'string') {
|
11422
|
+
throw typeErrorCreate('dirty is not a string, aborting');
|
11423
|
+
}
|
11424
|
+
} else {
|
11425
|
+
throw typeErrorCreate('toString is not a function');
|
11426
|
+
}
|
11427
|
+
}
|
11428
|
+
/* Return dirty HTML if DOMPurify cannot run */
|
11429
|
+
if (!DOMPurify.isSupported) {
|
11430
|
+
return dirty;
|
11431
|
+
}
|
11432
|
+
/* Assign config vars */
|
11433
|
+
if (!SET_CONFIG) {
|
11434
|
+
_parseConfig(cfg);
|
11435
|
+
}
|
11436
|
+
/* Clean up removed elements */
|
11437
|
+
DOMPurify.removed = [];
|
11438
|
+
/* Check if dirty is correctly typed for IN_PLACE */
|
11439
|
+
if (typeof dirty === 'string') {
|
11440
|
+
IN_PLACE = false;
|
11441
|
+
}
|
11442
|
+
if (IN_PLACE) {
|
11443
|
+
/* Do some early pre-sanitization to avoid unsafe root nodes */
|
11444
|
+
if (dirty.nodeName) {
|
11445
|
+
const tagName = transformCaseFunc(dirty.nodeName);
|
11446
|
+
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
11447
|
+
throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
|
11448
|
+
}
|
11449
|
+
}
|
11450
|
+
} else if (dirty instanceof Node) {
|
11451
|
+
/* If dirty is a DOM element, append to an empty document to avoid
|
11452
|
+
elements being stripped by the parser */
|
11453
|
+
body = _initDocument('<!---->');
|
11454
|
+
importedNode = body.ownerDocument.importNode(dirty, true);
|
11455
|
+
if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {
|
11456
|
+
/* Node is already a body, use as is */
|
11457
|
+
body = importedNode;
|
11458
|
+
} else if (importedNode.nodeName === 'HTML') {
|
11459
|
+
body = importedNode;
|
11460
|
+
} else {
|
11461
|
+
// eslint-disable-next-line unicorn/prefer-dom-node-append
|
11462
|
+
body.appendChild(importedNode);
|
11463
|
+
}
|
11464
|
+
} else {
|
11465
|
+
/* Exit directly if we have nothing to do */
|
11466
|
+
if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
|
11467
|
+
// eslint-disable-next-line unicorn/prefer-includes
|
11468
|
+
dirty.indexOf('<') === -1) {
|
11469
|
+
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
|
11470
|
+
}
|
11471
|
+
/* Initialize the document to work on */
|
11472
|
+
body = _initDocument(dirty);
|
11473
|
+
/* Check we have a DOM node from the data */
|
11474
|
+
if (!body) {
|
11475
|
+
return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
|
11476
|
+
}
|
11477
|
+
}
|
11478
|
+
/* Remove first element node (ours) if FORCE_BODY is set */
|
11479
|
+
if (body && FORCE_BODY) {
|
11480
|
+
_forceRemove(body.firstChild);
|
11481
|
+
}
|
11482
|
+
/* Get node iterator */
|
11483
|
+
const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
|
11484
|
+
/* Now start iterating over the created document */
|
11485
|
+
while (currentNode = nodeIterator.nextNode()) {
|
11486
|
+
/* Sanitize tags and elements */
|
11487
|
+
_sanitizeElements(currentNode);
|
11488
|
+
/* Check attributes next */
|
11489
|
+
_sanitizeAttributes(currentNode);
|
11490
|
+
/* Shadow DOM detected, sanitize it */
|
11491
|
+
if (currentNode.content instanceof DocumentFragment) {
|
11492
|
+
_sanitizeShadowDOM(currentNode.content);
|
11493
|
+
}
|
11494
|
+
}
|
11495
|
+
/* If we sanitized `dirty` in-place, return it. */
|
11496
|
+
if (IN_PLACE) {
|
11497
|
+
return dirty;
|
11498
|
+
}
|
11499
|
+
/* Return sanitized string or DOM */
|
11500
|
+
if (RETURN_DOM) {
|
11501
|
+
if (RETURN_DOM_FRAGMENT) {
|
11502
|
+
returnNode = createDocumentFragment.call(body.ownerDocument);
|
11503
|
+
while (body.firstChild) {
|
11504
|
+
// eslint-disable-next-line unicorn/prefer-dom-node-append
|
11505
|
+
returnNode.appendChild(body.firstChild);
|
11506
|
+
}
|
11507
|
+
} else {
|
11508
|
+
returnNode = body;
|
11509
|
+
}
|
11510
|
+
if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
|
11511
|
+
/*
|
11512
|
+
AdoptNode() is not used because internal state is not reset
|
11513
|
+
(e.g. the past names map of a HTMLFormElement), this is safe
|
11514
|
+
in theory but we would rather not risk another attack vector.
|
11515
|
+
The state that is cloned by importNode() is explicitly defined
|
11516
|
+
by the specs.
|
11517
|
+
*/
|
11518
|
+
returnNode = importNode.call(originalDocument, returnNode, true);
|
11519
|
+
}
|
11520
|
+
return returnNode;
|
11521
|
+
}
|
11522
|
+
let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
|
11523
|
+
/* Serialize doctype if allowed */
|
11524
|
+
if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
|
11525
|
+
serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
|
11526
|
+
}
|
11527
|
+
/* Sanitize final string template-safe */
|
11528
|
+
if (SAFE_FOR_TEMPLATES) {
|
11529
|
+
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
|
11530
|
+
serializedHTML = stringReplace(serializedHTML, expr, ' ');
|
11531
|
+
});
|
11532
|
+
}
|
11533
|
+
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
|
11534
|
+
};
|
11535
|
+
DOMPurify.setConfig = function () {
|
11536
|
+
let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
11537
|
+
_parseConfig(cfg);
|
11538
|
+
SET_CONFIG = true;
|
11539
|
+
};
|
11540
|
+
DOMPurify.clearConfig = function () {
|
11541
|
+
CONFIG = null;
|
11542
|
+
SET_CONFIG = false;
|
11543
|
+
};
|
11544
|
+
DOMPurify.isValidAttribute = function (tag, attr, value) {
|
11545
|
+
/* Initialize shared config vars if necessary. */
|
11546
|
+
if (!CONFIG) {
|
11547
|
+
_parseConfig({});
|
11548
|
+
}
|
11549
|
+
const lcTag = transformCaseFunc(tag);
|
11550
|
+
const lcName = transformCaseFunc(attr);
|
11551
|
+
return _isValidAttribute(lcTag, lcName, value);
|
11552
|
+
};
|
11553
|
+
DOMPurify.addHook = function (entryPoint, hookFunction) {
|
11554
|
+
if (typeof hookFunction !== 'function') {
|
11555
|
+
return;
|
11556
|
+
}
|
11557
|
+
arrayPush(hooks[entryPoint], hookFunction);
|
11558
|
+
};
|
11559
|
+
DOMPurify.removeHook = function (entryPoint, hookFunction) {
|
11560
|
+
if (hookFunction !== undefined) {
|
11561
|
+
const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
|
11562
|
+
return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];
|
11563
|
+
}
|
11564
|
+
return arrayPop(hooks[entryPoint]);
|
11565
|
+
};
|
11566
|
+
DOMPurify.removeHooks = function (entryPoint) {
|
11567
|
+
hooks[entryPoint] = [];
|
11568
|
+
};
|
11569
|
+
DOMPurify.removeAllHooks = function () {
|
11570
|
+
hooks = _createHooksMap();
|
11571
|
+
};
|
11572
|
+
return DOMPurify;
|
11573
|
+
}
|
11574
|
+
var purify = createDOMPurify();
|
11575
|
+
|
11576
|
+
return purify;
|
11577
|
+
|
11578
|
+
}));
|
11579
|
+
|
11580
|
+
}(purify));
|
11581
|
+
|
11582
|
+
var purifier = purify.exports;
|
11583
|
+
|
11584
|
+
/* istanbul ignore next */
|
11585
|
+
const getCustomElementHandling = (allowICPrefix) => ({
|
11586
|
+
CUSTOM_ELEMENT_HANDLING: {
|
11587
|
+
tagNameCheck: (tagName) => (allowICPrefix && tagName.startsWith("ic-")) ||
|
11588
|
+
IC_CUSTOM_ALLOWED_COMPONENTS.includes(tagName),
|
11589
|
+
attributeNameCheck: /.*/,
|
11590
|
+
},
|
11591
|
+
});
|
11592
|
+
const sanitizeHTMLString = (html) => {
|
11593
|
+
return purifier.sanitize(html, getCustomElementHandling(true));
|
11594
|
+
};
|
11595
|
+
const sanitizeHTMLIconString = (html) => {
|
11596
|
+
return purifier.sanitize(html, getCustomElementHandling(false));
|
11597
|
+
};
|
11598
|
+
|
10218
11599
|
const icMenuCss = "html.sc-ic-menu{line-height:1.15;-webkit-text-size-adjust:100%}body.sc-ic-menu{margin:0}main.sc-ic-menu{display:block}h1.sc-ic-menu{font-size:2em;margin:0.67em 0}hr.sc-ic-menu{box-sizing:content-box;height:0;overflow:visible}pre.sc-ic-menu{font-family:monospace, monospace;font-size:1em}a.sc-ic-menu{background-color:transparent}abbr[title].sc-ic-menu{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b.sc-ic-menu,strong.sc-ic-menu{font-weight:bolder}code.sc-ic-menu,kbd.sc-ic-menu,samp.sc-ic-menu{font-family:monospace, monospace;font-size:1em}small.sc-ic-menu{font-size:80%}sub.sc-ic-menu,sup.sc-ic-menu{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub.sc-ic-menu{bottom:-0.25em}sup.sc-ic-menu{top:-0.5em}img.sc-ic-menu{border-style:none}button.sc-ic-menu,input.sc-ic-menu,optgroup.sc-ic-menu,select.sc-ic-menu,textarea.sc-ic-menu{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button.sc-ic-menu,input.sc-ic-menu{overflow:visible}button.sc-ic-menu,select.sc-ic-menu{text-transform:none}button.sc-ic-menu,[type=\"button\"].sc-ic-menu,[type=\"reset\"].sc-ic-menu,[type=\"submit\"].sc-ic-menu{-webkit-appearance:button}button.sc-ic-menu::-moz-focus-inner,[type=\"button\"].sc-ic-menu::-moz-focus-inner,[type=\"reset\"].sc-ic-menu::-moz-focus-inner,[type=\"submit\"].sc-ic-menu::-moz-focus-inner{border-style:none;padding:0}button.sc-ic-menu:-moz-focusring,[type=\"button\"].sc-ic-menu:-moz-focusring,[type=\"reset\"].sc-ic-menu:-moz-focusring,[type=\"submit\"].sc-ic-menu:-moz-focusring{outline:1px dotted ButtonText}fieldset.sc-ic-menu{padding:0.35em 0.75em 0.625em}legend.sc-ic-menu{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress.sc-ic-menu{vertical-align:baseline}textarea.sc-ic-menu{overflow:auto}[type=\"checkbox\"].sc-ic-menu,[type=\"radio\"].sc-ic-menu{box-sizing:border-box;padding:0}[type=\"number\"].sc-ic-menu::-webkit-inner-spin-button,[type=\"number\"].sc-ic-menu::-webkit-outer-spin-button{height:auto}[type=\"search\"].sc-ic-menu{-webkit-appearance:textfield;outline-offset:-2px}[type=\"search\"].sc-ic-menu::-webkit-search-decoration{-webkit-appearance:none}.sc-ic-menu::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details.sc-ic-menu{display:block}summary.sc-ic-menu{display:list-item}template.sc-ic-menu{display:none}[hidden].sc-ic-menu{display:none}html.sc-ic-menu,body.sc-ic-menu,div.sc-ic-menu,span.sc-ic-menu,applet.sc-ic-menu,object.sc-ic-menu,iframe.sc-ic-menu,h1.sc-ic-menu,h2.sc-ic-menu,h3.sc-ic-menu,h4.sc-ic-menu,h5.sc-ic-menu,h6.sc-ic-menu,p.sc-ic-menu,blockquote.sc-ic-menu,pre.sc-ic-menu,a.sc-ic-menu,abbr.sc-ic-menu,acronym.sc-ic-menu,address.sc-ic-menu,big.sc-ic-menu,cite.sc-ic-menu,code.sc-ic-menu,del.sc-ic-menu,dfn.sc-ic-menu,em.sc-ic-menu,img.sc-ic-menu,ins.sc-ic-menu,kbd.sc-ic-menu,q.sc-ic-menu,s.sc-ic-menu,samp.sc-ic-menu,small.sc-ic-menu,strike.sc-ic-menu,strong.sc-ic-menu,sub.sc-ic-menu,sup.sc-ic-menu,tt.sc-ic-menu,var.sc-ic-menu,b.sc-ic-menu,u.sc-ic-menu,i.sc-ic-menu,center.sc-ic-menu,dl.sc-ic-menu,dt.sc-ic-menu,dd.sc-ic-menu,ol.sc-ic-menu,ul.sc-ic-menu,li.sc-ic-menu,fieldset.sc-ic-menu,form.sc-ic-menu,label.sc-ic-menu,legend.sc-ic-menu,table.sc-ic-menu,caption.sc-ic-menu,tbody.sc-ic-menu,tfoot.sc-ic-menu,thead.sc-ic-menu,tr.sc-ic-menu,th.sc-ic-menu,td.sc-ic-menu,article.sc-ic-menu,aside.sc-ic-menu,canvas.sc-ic-menu,details.sc-ic-menu,embed.sc-ic-menu,figure.sc-ic-menu,figcaption.sc-ic-menu,footer.sc-ic-menu,header.sc-ic-menu,hgroup.sc-ic-menu,menu.sc-ic-menu,nav.sc-ic-menu,output.sc-ic-menu,ruby.sc-ic-menu,section.sc-ic-menu,summary.sc-ic-menu,time.sc-ic-menu,mark.sc-ic-menu,audio.sc-ic-menu,video.sc-ic-menu{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){.ic-menu-open.sc-ic-menu-h .menu.sc-ic-menu{transition:max-height var(--ic-transition-duration-slow)}}.sc-ic-menu-h{max-height:0;width:var(--menu-width, var(--input-width, 20rem));color:var(--menu-item-text-color, var(--ic-menu-list-option-text-color));--ic-typography-color:var(\n --menu-item-text-color,\n var(--ic-menu-list-option-text-color)\n );background-color:var(\n --menu-bg-color,\n var(--ic-menu-list-option-background-color)\n );position:relative;z-index:var(--ic-z-index-menu);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);border-radius:var(--ic-border-radius)}.ic-menu-open.sc-ic-menu-h:not(.ic-menu-no-focus):focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline)}.ic-select-select-all-focused.sc-ic-menu-h{box-shadow:var(--ic-elevation-overlay) !important}#retry-button.sc-ic-menu::part(button){height:var(--ic-space-lg)}.small.sc-ic-menu #retry-button.sc-ic-menu::part(button){height:var(--ic-space-md)}.on-dialog.sc-ic-menu-h{inset:auto !important}.menu.sc-ic-menu{text-decoration:none;list-style-type:none;border-radius:1px;background-color:var(\n --menu-bg-color,\n var(--ic-menu-list-option-background-color)\n );visibility:hidden;max-height:0;overflow-y:hidden}.menu.sc-ic-menu:has(+.option-bar).sc-ic-menu{border-radius:0 0 1px 1px}.menu-scroll.sc-ic-menu{overflow-y:auto}.menu.sc-ic-menu:focus-visible{outline:none}.ic-menu-open.sc-ic-menu-h{max-height:none;display:flex;flex-direction:column-reverse;border:var(--ic-border-width) solid\n var(--menu-border-color, var(--ic-menu-border-color));transition:box-shadow var(--ic-easing-transition-fast)}.ic-menu-open.sc-ic-menu-h .menu.sc-ic-menu{visibility:visible;max-height:calc(var(--ic-space-xl) * 10 + var(--ic-space-xxxs))}.ic-menu-open.sc-ic-menu-h .option-bar.sc-ic-menu{visibility:visible}.ic-menu-open.sc-ic-menu-h .select-all-button.sc-ic-menu{display:block}.ic-menu-full-width.sc-ic-menu-h{width:100%}.option.sc-ic-menu{padding:var(--ic-space-xs) calc(var(--ic-space-xs) - var(--ic-space-1px));cursor:pointer;display:flex;align-items:center;gap:var(--ic-space-xs)}.loading-option.sc-ic-menu p.sc-ic-menu{margin-bottom:0 !important}.option.sc-ic-menu:not(.loading-option){justify-content:space-between}.ic-menu-small.sc-ic-menu-h .option.sc-ic-menu{padding:var(--ic-space-xxs) calc(var(--ic-space-xs) - var(--ic-space-1px))}.ic-menu-large.sc-ic-menu-h .option.sc-ic-menu{padding:var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px))}.option.sc-ic-menu:last-child{border-radius:0 0 1px 1px}.sc-ic-menu:not(.menu:has(+.option-bar)).sc-ic-menu .option.sc-ic-menu:first-child{border-radius:1px 1px 0 0}.option.sc-ic-menu:not(.disabled-option):hover{background-color:var(--ic-menu-list-option-hover-background-color)}.option.sc-ic-menu:not(.disabled-option):active{background-color:var(--ic-menu-list-option-pressed-background-color)}.option.sc-ic-menu:focus-visible{outline:var(--ic-hc-focus-outline)}.option.sc-ic-menu:not(.disabled-option) .option-description.sc-ic-menu{--ic-typography-color:var(\n --menu-item-desc-text-color,\n var(--ic-menu-list-option-description-text-color)\n )}.option.sc-ic-menu .option-label.sc-ic-menu{display:flex;flex-direction:row;align-items:top}.option.sc-ic-menu .option-label.sc-ic-menu ic-typography.sc-ic-menu{max-width:100%;word-wrap:break-word}.option.sc-ic-menu .option-element.sc-ic-menu{margin-top:var(--ic-space-xxs)}.option.sc-ic-menu .option-icon.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);margin-top:var(--ic-space-xxs);margin-right:var(--ic-space-xxxs)}.option-text-container.sc-ic-menu{pointer-events:none;width:100%}.option-text-container.show-check-icon.sc-ic-menu{flex-grow:1}.option.loading-option.sc-ic-menu .option-text-container.sc-ic-menu{margin-left:calc(var(--ic-space-xs) + var(--ic-space-xxxs));color:var(--ic-menu-loading-list-option-text-color);--ic-typography-color:var(--ic-menu-loading-list-option-text-color)}.error-icon-svg.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);fill:var(--ic-atoms-status-icon-error);align-self:center;display:flex;margin-right:calc(var(--ic-space-xxs) * 1.2)}.loading-error-info.sc-ic-menu{display:flex}.check-icon.sc-ic-menu{height:var(--ic-space-lg);min-width:var(--ic-space-lg);width:var(--ic-space-lg);pointer-events:none}.focused-option.sc-ic-menu .check-icon.sc-ic-menu *.sc-ic-menu{fill:currentcolor}.option-group-title.sc-ic-menu{padding:var(--ic-space-lg) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xs);--ic-typography-color:var(--ic-menu-option-group-label-text-color)}.ic-menu-small.sc-ic-menu-h .option-group-title.sc-ic-menu{padding:var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xxs)}.last-recommended-option.sc-ic-menu{border-bottom:var(--ic-menu-last-recommended-option-border)}.disabled-option.sc-ic-menu{color:var(--ic-atoms-list-option-text-disabled-light);--ic-typography-color:var(--ic-atoms-list-option-text-disabled-light);cursor:default;pointer-events:none}.focused-option.sc-ic-menu,.focused-option.sc-ic-menu .option-description.sc-ic-menu{background-color:var(--ic-color-focus-inner) !important;color:var(--ic-atoms-list-option-text-focused-light) !important;--ic-typography-color:var(\n --ic-atoms-list-option-text-focused-light\n ) !important}.no-results.sc-ic-menu-h li.sc-ic-menu{cursor:no-drop}.no-results.sc-ic-menu-h li.sc-ic-menu:hover{background-color:transparent}.option-bar.sc-ic-menu{padding:var(--ic-space-xxs) var(--ic-space-xs);display:flex;align-items:center;justify-content:space-between;background-color:var(--ic-menu-option-bar-background-color);visibility:hidden;border-bottom:var(--ic-border-width) solid\n var(--ic-menu-option-bar-divider-color);border-radius:1px 1px 0 0}.option-bar.sc-ic-menu p.sc-ic-menu{margin-bottom:0 !important}.ic-menu-large.sc-ic-menu-h .option-bar.sc-ic-menu{padding:var(--ic-space-xs)}.select-all-button.sc-ic-menu{display:none}.select-all-button.sc-ic-menu:focus{z-index:calc(var(--ic-z-index-menu) + 1)}@media (forced-colors: active){.focused-option.sc-ic-menu:focus{outline:none;border:0.125rem solid transparent}.disabled-option.sc-ic-menu{color:GrayText;--ic-typography-color:GrayText}}";
|
10219
11600
|
var IcMenuStyle0 = icMenuCss;
|
10220
11601
|
|
@@ -10949,7 +12330,7 @@ class Menu {
|
|
10949
12330
|
return (hAsync(Fragment, null, option.loading && hAsync("ic-loading-indicator", { size: "icon" }), hAsync("div", { class: {
|
10950
12331
|
"option-text-container": true,
|
10951
12332
|
"show-check-icon": showCheckIcon,
|
10952
|
-
} }, hAsync("div", { class: "option-label" }, option.icon && (hAsync("div", { class: "option-icon", innerHTML: option.icon, "aria-hidden": "true" })), hAsync("ic-typography", { variant: "body", "aria-hidden": "true" }, option[this.labelField])), option.description && (hAsync("ic-typography", { id: `${this.getOptionId(option[this.valueField])}-description`, class: "option-description", variant: "caption", "aria-hidden": "true" }, hAsync("p", null, option.description))), option.element && (hAsync("div", { class: "option-element", innerHTML: option.element.component, "aria-hidden": "true" }))), showCheckIcon && hAsync("span", { class: "check-icon", innerHTML: checkIcon })));
|
12333
|
+
} }, hAsync("div", { class: "option-label" }, option.icon && (hAsync("div", { class: "option-icon", innerHTML: sanitizeHTMLIconString(option.icon), "aria-hidden": "true" })), hAsync("ic-typography", { variant: "body", "aria-hidden": "true" }, option[this.labelField])), option.description && (hAsync("ic-typography", { id: `${this.getOptionId(option[this.valueField])}-description`, class: "option-description", variant: "caption", "aria-hidden": "true" }, hAsync("p", null, option.description))), option.element && (hAsync("div", { class: "option-element", innerHTML: sanitizeHTMLString(option.element.component), "aria-hidden": "true" }))), showCheckIcon && hAsync("span", { class: "check-icon", innerHTML: checkIcon })));
|
10953
12334
|
};
|
10954
12335
|
this.displayOption = (option, selected, index, parentOption) => {
|
10955
12336
|
const { open, keyboardNav, isManualMode, initialOptionsListRender, optionHighlighted, options, } = this;
|
@@ -11138,7 +12519,7 @@ class Menu {
|
|
11138
12519
|
const { inputLabel, options, menuId, value, fullWidth, hasTimedOut, isLoading, size, open, inputEl, keyboardNav, parentEl, SEARCH_BAR_TAG, multiSelect, } = this;
|
11139
12520
|
const selectAllButtonText = `${(value === null || value === void 0 ? void 0 : value.length) === this.ungroupedOptions.length ? "Clear" : "Select"} all`;
|
11140
12521
|
const hasNoResults = this.host.classList.contains("no-results");
|
11141
|
-
return (hAsync(Host, { key: '
|
12522
|
+
return (hAsync(Host, { key: 'e17a70bcf59709dd5b9d0cc7b404520ff06bcf35', class: {
|
11142
12523
|
"ic-menu-full-width": !!fullWidth,
|
11143
12524
|
"ic-menu-no-focus": ((inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) === "INPUT" &&
|
11144
12525
|
(parentEl === null || parentEl === void 0 ? void 0 : parentEl.tagName) !== SEARCH_BAR_TAG) ||
|
@@ -11147,7 +12528,7 @@ class Menu {
|
|
11147
12528
|
[`ic-menu-${size}`]: true,
|
11148
12529
|
"ic-menu-open": open && options.length !== 0,
|
11149
12530
|
"ic-menu-multiple": multiSelect,
|
11150
|
-
} }, options.length !== 0 && (hAsync("ul", { key: '
|
12531
|
+
} }, options.length !== 0 && (hAsync("ul", { key: '438cd6126c1296a14e216edc0a5d790a4705b143', id: menuId, class: "menu", role: "listbox", "aria-label": `${inputLabel} pop-up`, "aria-multiselectable": multiSelect ? "true" : "false", tabindex: open &&
|
11151
12532
|
!keyboardNav &&
|
11152
12533
|
((inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) !== "INPUT" ||
|
11153
12534
|
(parentEl === null || parentEl === void 0 ? void 0 : parentEl.tagName) === SEARCH_BAR_TAG)
|
@@ -11175,7 +12556,7 @@ class Menu {
|
|
11175
12556
|
multiSelect &&
|
11176
12557
|
!isLoading &&
|
11177
12558
|
!hasTimedOut &&
|
11178
|
-
!hasNoResults && (hAsync("div", { key: '
|
12559
|
+
!hasNoResults && (hAsync("div", { key: '5732c5ac4fa70ff249a7851d61aee8ccf46082d1', class: "option-bar" }, hAsync("ic-typography", { key: '48ce8543a189cad706804715a077575b3774e490' }, hAsync("p", { key: '63537752e580815f650c3d9bbf38b23267c5229c' }, `${value ? value.length : 0}/${getOptionsWithoutGroupTitlesCount(this.options)} selected`)), hAsync("ic-button", { key: '60c446e5303a3939494284b9ce7772feb1fe547c', class: "select-all-button", "aria-label": `${selectAllButtonText} options for ${inputLabel}`, ref: (el) => (this.selectAllButton = el), variant: "tertiary", onClick: this.handleSelectAllClick, onMouseDown: this.handleSelectAllMouseDown, onBlur: this.handleSelectAllBlur, onFocus: this.handleSelectAllFocus, size: size === "small" ? "small" : "medium" }, selectAllButtonText)))));
|
11179
12560
|
}
|
11180
12561
|
get host() { return getElement(this); }
|
11181
12562
|
static get watchers() { return {
|
@@ -13093,7 +14474,7 @@ class PopoverMenu {
|
|
13093
14474
|
}; }
|
13094
14475
|
}
|
13095
14476
|
|
13096
|
-
const icRadioGroupCss = "/*! 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-text-color:var(--ic-radio-button-input-field-label);--ic-input-label-helper-text-color:var(\n --ic-radio-button-input-field-subtitle\n );--ic-input-validation-status-text-color:var(--ic-radio-button-state-text);--ic-input-validation-error:var(--ic-radio-button-state-icon-error)}ic-input-label.error{--ic-input-label-text-color:var(--ic-radio-button-input-field-label-error)}ic-input-label.disabled{--ic-input-label-text-color:var(\n --ic-radio-button-input-field-label-disabled\n );--ic-input-label-helper-text-color:var(\n --ic-radio-button-input-field-subtitle-disabled\n )}ic-input-validation{margin-top:var(--ic-space-sm)}:host(.ic-radio-group-small) ic-input-validation{margin-top:calc(var(--ic-space-sm) / 2)}ic-input-label:not(.with-helper) .ic-typography-label,ic-input-label .helpertext{margin-bottom:var(--ic-space-sm)}:host(.ic-radio-group-small) ic-input-label:not(.with-helper) .ic-typography-label,:host(.ic-radio-group-small) ic-input-label .helpertext{margin-bottom:calc(var(--ic-space-sm) / 2)}ic-input-label .helpertext{display:block}:host .radio-buttons-container{display:flex;flex-direction:column;gap:var(--ic-space-xxs)}:host(.ic-radio-group-small) .radio-buttons-container{gap:var(--ic-space-xxxs)}:host .radio-buttons-container.horizontal{display:flex;flex-direction:row;gap:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host(.ic-radio-group-small) .radio-buttons-container.horizontal{gap:var(--ic-space-xl)}";
|
14477
|
+
const icRadioGroupCss = "/*! 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-text-color:var(--ic-radio-button-input-field-label);--ic-input-label-helper-text-color:var(\n --ic-radio-button-input-field-subtitle\n );--ic-input-validation-status-text-color:var(--ic-radio-button-state-text);--ic-input-validation-error:var(--ic-radio-button-state-icon-error)}ic-input-label.error{--ic-input-label-text-color:var(--ic-radio-button-input-field-label-error)}ic-input-label.disabled{--ic-input-label-text-color:var(\n --ic-radio-button-input-field-label-disabled\n );--ic-input-label-helper-text-color:var(\n --ic-radio-button-input-field-subtitle-disabled\n )}ic-input-validation.show-validation{margin-top:var(--ic-space-sm)}:host(.ic-radio-group-small) ic-input-validation.show-validation{margin-top:calc(var(--ic-space-sm) / 2)}ic-input-label:not(.with-helper) .ic-typography-label,ic-input-label .helpertext{margin-bottom:var(--ic-space-sm)}:host(.ic-radio-group-small) ic-input-label:not(.with-helper) .ic-typography-label,:host(.ic-radio-group-small) ic-input-label .helpertext{margin-bottom:calc(var(--ic-space-sm) / 2)}ic-input-label .helpertext{display:block}:host .radio-buttons-container{display:flex;flex-direction:column;gap:var(--ic-space-xxs)}:host(.ic-radio-group-small) .radio-buttons-container{gap:var(--ic-space-xxxs)}:host .radio-buttons-container.horizontal{display:flex;flex-direction:row;gap:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host(.ic-radio-group-small) .radio-buttons-container.horizontal{gap:var(--ic-space-xl)}";
|
13097
14478
|
var IcRadioGroupStyle0 = icRadioGroupCss;
|
13098
14479
|
|
13099
14480
|
/**
|
@@ -13129,6 +14510,10 @@ class RadioGroup {
|
|
13129
14510
|
* The size of the radio group component.
|
13130
14511
|
*/
|
13131
14512
|
this.size = "medium";
|
14513
|
+
/**
|
14514
|
+
* The value of the `aria-live` attribute on the validation message.
|
14515
|
+
*/
|
14516
|
+
this.validationAriaLive = "polite";
|
13132
14517
|
/**
|
13133
14518
|
* The validation status - e.g. 'error' | 'warning' | 'success'.
|
13134
14519
|
*/
|
@@ -13322,17 +14707,20 @@ class RadioGroup {
|
|
13322
14707
|
}
|
13323
14708
|
}
|
13324
14709
|
render() {
|
13325
|
-
const { currentOrientation, disabled, handleKeyDown, helperText, hideLabel, label, required, size, validationStatus, validationText, theme, } = this;
|
13326
|
-
|
14710
|
+
const { currentOrientation, disabled, handleKeyDown, helperText, hideLabel, label, required, size, validationAriaLive, validationStatus, validationText, theme, } = this;
|
14711
|
+
const showValidation = hasValidationStatus(validationStatus, disabled);
|
14712
|
+
return (hAsync(Host, { key: '4ea2e0ca7614fb4ce6563ea146f86d72707a399a', onKeyDown: handleKeyDown, class: {
|
13327
14713
|
"ic-radio-group-small": size === "small",
|
13328
14714
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
13329
|
-
} }, hAsync("fieldset", { key: '
|
14715
|
+
} }, hAsync("fieldset", { key: 'ebad7a878454455a15892bf53c43bdcb914b77c4', role: "radiogroup", id: this.name, "aria-required": `${required}` }, !hideLabel && (hAsync("legend", { key: 'aac1f37c7b1d4d5bc621bd3030dc9eef60417659' }, hAsync("ic-input-label", { key: 'fd04e3f74c89b633996eb22e60902e988a8ac8ef', class: {
|
13330
14716
|
[`${validationStatus}`]: true,
|
13331
14717
|
["disabled"]: !!disabled,
|
13332
|
-
}, label: label, helperText: helperText, required: required, disabled: disabled }, hAsync("slot", { key: '
|
14718
|
+
}, label: label, helperText: helperText, required: required, disabled: disabled }, hAsync("slot", { key: '66325d58018dff189c975e3e4fc01249b51b6b9f', name: "helper-text", slot: "helper-text" })))), hAsync("div", { key: '6d2d332396c87b798d5d160bdb5977c0a8ad6751', class: {
|
13333
14719
|
"radio-buttons-container": true,
|
13334
14720
|
horizontal: currentOrientation === this.RADIO_HORIZONTAL,
|
13335
|
-
}, ref: (el) => (this.radioContainer = el) }, hAsync("slot", { key: '
|
14721
|
+
}, ref: (el) => (this.radioContainer = el) }, hAsync("slot", { key: 'fb0a1b41503ba88ce9bda3c0bc8236ae0a7e3795' }))), hAsync("ic-input-validation", { key: 'f9f7c2bdffd83d705149f74fe2caad93e57dd85b', class: {
|
14722
|
+
"show-validation": showValidation,
|
14723
|
+
}, ariaLiveMode: validationAriaLive, status: showValidation ? validationStatus : "", message: showValidation ? validationText : "" })));
|
13336
14724
|
}
|
13337
14725
|
get el() { return getElement(this); }
|
13338
14726
|
static get watchers() { return {
|
@@ -13353,6 +14741,7 @@ class RadioGroup {
|
|
13353
14741
|
"orientation": [1],
|
13354
14742
|
"required": [4],
|
13355
14743
|
"size": [1],
|
14744
|
+
"validationAriaLive": [1, "validation-aria-live"],
|
13356
14745
|
"validationStatus": [1, "validation-status"],
|
13357
14746
|
"validationText": [1, "validation-text"],
|
13358
14747
|
"theme": [1],
|
@@ -13367,7 +14756,7 @@ class RadioGroup {
|
|
13367
14756
|
}; }
|
13368
14757
|
}
|
13369
14758
|
|
13370
|
-
const icRadioOptionCss = "/*! 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}ic-radio-option{display:flex;flex-direction:column;width:-moz-fit-content;width:fit-content}.additional-field-wrapper [slot=\"additional-field\"]{margin-top:calc(var(--ic-space-sm) / 2);margin-left:var(--ic-space-xl)}ic-radio-option.ic-radio-option-disabled,ic-radio-option.ic-radio-option-disabled .radio-label{--ic-typography-color:var(--ic-radio-button-text-option-disabled)}.container input:focus+span.checkmark,.container:hover input:focus+span.checkmark,.container:active input:focus+span.checkmark,:host(:focus) .container input:checked+span.checkmark{box-shadow:var(--ic-border-focus)}.container{display:grid;grid-template-columns:min-content auto;position:relative;cursor:pointer;align-items:center;margin:var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-xxs)}.container.disabled,.container.disabled input:disabled{cursor:default}.container input{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-block;position:absolute;cursor:pointer;height:var(--ic-space-lg);width:var(--ic-space-lg);border-radius:50%;border:none}.checkmark{display:block;position:relative;top:0;left:0;height:var(--ic-space-lg);width:var(--ic-space-lg);background-color:var(--ic-radio-button-background-default);border:var(--ic-space-1px) solid var(--ic-radio-button-border-default);border-radius:50%;transition:var(--ic-easing-transition-fast);box-sizing:border-box}.container input:checked~.checkmark::after{display:inline-block}.container:hover input~.checkmark{box-shadow:0 0 0 0.25rem var(--ic-radio-button-active-hover);border:var(--ic-border-width) solid var(--ic-radio-button-default-hover)}.container:hover input:checked~.checkmark{box-shadow:0 0 0 0.25rem var(--ic-radio-button-active-hover);border:0.125rem solid var(--ic-radio-button-default-hover)}.container:hover:not(.disabled) input:checked~.checkmark::after{background-color:var(--ic-radio-button-default-hover)}.container:active input~.checkmark{box-shadow:0 0 0 0.25rem var(--ic-radio-button-active-pressed);border:var(--ic-border-width) solid var(--ic-radio-button-default-pressed)}.container:active input:checked~.checkmark{border:0.125rem solid var(--ic-radio-button-default-pressed);box-shadow:0 0 0 0.25rem var(--ic-radio-button-active-pressed)}.container:active input:checked~.checkmark::after{background-color:var(--ic-radio-button-default-pressed)}.container input:checked~.checkmark{border:0.125rem solid var(--ic-radio-button-default-active)}.container input:checked:disabled~.checkmark{border:0.125rem solid var(--ic-radio-button-border-disabled)}.container input:disabled~.checkmark{border:var(--ic-border-width) dashed var(--ic-radio-button-border-disabled)}.container input:disabled~.checkmark::after{background:var(--ic-radio-button-disabled)}.container:hover input:disabled~.checkmark{box-shadow:none;border:0.125rem solid none}.container:active input:disabled~.checkmark::after{background-color:var(--ic-radio-button-disabled)}.container .checkmark::after{content:\"\";position:absolute;display:none;top:calc(50% - var(--ic-space-xs));left:calc(50% - var(--ic-space-xs));width:var(--ic-space-md);height:var(--ic-space-md);border-radius:50%;background:var(--ic-radio-button-default-active)}.radio-label{margin-left:var(--ic-space-md);--ic-typography-color:var(--ic-radio-button-text-option)}.additional-field-wrapper{margin-left:var(--ic-space-xs)}.branch-corner{color:var(--ic-radio-button-required-bar);height:var(--ic-space-md);width:var(--ic-space-xl);border-radius:0 0 0 0.188rem;border-bottom:0.125rem solid var(--ic-radio-button-required-bar);border-left:0.125rem solid var(--ic-radio-button-required-bar);margin-left:calc(-1 * var(--ic-space-1px))}.dynamic-container{display:flex;position:relative;margin:var(--ic-space-
|
14759
|
+
const icRadioOptionCss = "/*! 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}ic-radio-option{display:flex;flex-direction:column;width:-moz-fit-content;width:fit-content}.additional-field-wrapper [slot=\"additional-field\"]{margin-top:calc(var(--ic-space-sm) / 2);margin-left:var(--ic-space-xl)}ic-radio-option.ic-radio-option-disabled,ic-radio-option.ic-radio-option-disabled .radio-label{--ic-typography-color:var(--ic-radio-button-text-option-disabled)}.container input:focus+span.checkmark,.container:hover input:focus+span.checkmark,.container:active input:focus+span.checkmark,:host(:focus) .container input:checked+span.checkmark{box-shadow:var(--ic-border-focus)}.container{display:grid;grid-template-columns:min-content auto;position:relative;cursor:pointer;align-items:center;margin:var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-xxs)}.ic-radio-group-small .container{margin:0 0 0 var(--ic-space-xxs)}.container.disabled,.container.disabled input:disabled{cursor:default}.container input{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-block;position:absolute;cursor:pointer;height:var(--ic-space-lg);width:var(--ic-space-lg);border-radius:50%;border:none}.ic-radio-group-small .container input{height:var(--ic-space-md);width:var(--ic-space-md)}.checkmark{display:block;position:relative;top:0;left:0;height:var(--ic-space-lg);width:var(--ic-space-lg);background-color:var(--ic-radio-button-background-default);border:var(--ic-space-1px) solid var(--ic-radio-button-border-default);border-radius:50%;transition:var(--ic-easing-transition-fast);box-sizing:border-box}.ic-radio-group-small .checkmark{height:var(--ic-space-md);width:var(--ic-space-md)}.container input:checked~.checkmark::after{display:inline-block}.container:hover input~.checkmark{box-shadow:0 0 0 0.25rem var(--ic-radio-button-active-hover);border:var(--ic-border-width) solid var(--ic-radio-button-default-hover)}.container:hover input:checked~.checkmark{box-shadow:0 0 0 0.25rem var(--ic-radio-button-active-hover);border:0.125rem solid var(--ic-radio-button-default-hover)}.container:hover:not(.disabled) input:checked~.checkmark::after{background-color:var(--ic-radio-button-default-hover)}.container:active input~.checkmark{box-shadow:0 0 0 0.25rem var(--ic-radio-button-active-pressed);border:var(--ic-border-width) solid var(--ic-radio-button-default-pressed)}.container:active input:checked~.checkmark{border:0.125rem solid var(--ic-radio-button-default-pressed);box-shadow:0 0 0 0.25rem var(--ic-radio-button-active-pressed)}.ic-radio-group-small .container input:checked~.checkmark{border-width:var(--ic-space-1px)}.container:active input:checked~.checkmark::after{background-color:var(--ic-radio-button-default-pressed)}.container input:checked~.checkmark{border:0.125rem solid var(--ic-radio-button-default-active)}.container input:checked:disabled~.checkmark{border:0.125rem solid var(--ic-radio-button-border-disabled)}.container input:disabled~.checkmark{border:var(--ic-border-width) dashed var(--ic-radio-button-border-disabled)}.container input:disabled~.checkmark::after{background:var(--ic-radio-button-disabled)}.container:hover input:disabled~.checkmark{box-shadow:none;border:0.125rem solid none}.container:active input:disabled~.checkmark::after{background-color:var(--ic-radio-button-disabled)}.container .checkmark::after{content:\"\";position:absolute;display:none;top:calc(50% - var(--ic-space-xs));left:calc(50% - var(--ic-space-xs));width:var(--ic-space-md);height:var(--ic-space-md);border-radius:50%;background:var(--ic-radio-button-default-active)}.ic-radio-group-small .container .checkmark::after{top:50%;left:50%;width:0.625rem;height:0.625rem;border-radius:50%;background:var(--ic-radio-button-default-active);transform:translate(-50%, -50%)}.radio-label{margin-left:var(--ic-space-md);--ic-typography-color:var(--ic-radio-button-text-option)}.ic-radio-group-small .radio-label{margin-left:var(--ic-space-xs)}.additional-field-wrapper{margin-left:var(--ic-space-xs)}.branch-corner{color:var(--ic-radio-button-required-bar);height:var(--ic-space-md);width:var(--ic-space-xl);border-radius:0 0 0 0.188rem;border-bottom:0.125rem solid var(--ic-radio-button-required-bar);border-left:0.125rem solid var(--ic-radio-button-required-bar);margin-left:calc(-1 * var(--ic-space-1px))}.dynamic-container{display:flex;position:relative;margin:var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-md);gap:var(--ic-space-xs)}.ic-radio-group-small .dynamic-container{margin-left:12px}.dynamic-container.hidden{display:none}.dynamic-text{color:var(--ic-radio-button-required-text);--ic-typography-color:var(--ic-radio-button-required-text);margin-top:calc(var(--ic-space-sm) / 2);margin-bottom:var(--ic-space-xs);border-radius:2%}@media (max-width: 576px){ic-text-field{--input-width:100%}}@media (forced-colors: active){.container input:checked~.checkmark,.container:active input:checked~.checkmark{border-color:Highlight}.container input:checked~.checkmark::after,.container:active input:checked~.checkmark::after{background-color:Highlight}.container input:disabled~.checkmark,.container input:checked:disabled~.checkmark{border-color:GrayText}.container input:disabled~.checkmark::after,.container:active input:disabled~.checkmark::after{background-color:GrayText}}input[type=\"radio\"]:dir(rtl){right:0}.radio-label:dir(rtl){padding-right:var(--ic-space-sm);padding-left:0}.branch-corner:dir(rtl){border-radius:0 0 0.188rem;border-right:0.125rem solid var(--ic-action-default);border-left:none}.dynamic-container:dir(rtl){margin:var(--ic-space-xxxs) var(--ic-space-sm) var(--ic-space-xxs) 0}";
|
13371
14760
|
var IcRadioOptionStyle0 = icRadioOptionCss;
|
13372
14761
|
|
13373
14762
|
const ADDITIONAL_FIELD = "additional-field";
|
@@ -14372,6 +15761,10 @@ class Select {
|
|
14372
15761
|
* 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.
|
14373
15762
|
*/
|
14374
15763
|
this.theme = "inherit";
|
15764
|
+
/**
|
15765
|
+
* The value of the `aria-live` attribute on the validation message.
|
15766
|
+
*/
|
15767
|
+
this.validationAriaLive = "polite";
|
14375
15768
|
/**
|
14376
15769
|
* The validation status - e.g. 'error' | 'warning' | 'success'.
|
14377
15770
|
*/
|
@@ -15026,12 +16419,13 @@ class Select {
|
|
15026
16419
|
}
|
15027
16420
|
render() {
|
15028
16421
|
var _a;
|
15029
|
-
const { size, disabled, fullWidth, helperText, hideLabel, label, menuId, multiple, name, options, placeholder, readonly, required, searchable, showClearButton, validationStatus, validationText, currValue, theme, hiddenInputValue, open, inputId, searchableSelectInputValue, loading, value, emptyOptionListText, uniqueOptions, selectOnEnter, form, inheritedAttributes, ariaActiveDescendant, hasTimedOut, noOptions, filteredOptions, clearButtonFocused, } = this;
|
16422
|
+
const { size, disabled, fullWidth, helperText, hideLabel, label, menuId, multiple, name, options, placeholder, readonly, required, searchable, showClearButton, validationAriaLive, validationStatus, validationText, currValue, theme, hiddenInputValue, open, inputId, searchableSelectInputValue, loading, value, emptyOptionListText, uniqueOptions, selectOnEnter, form, inheritedAttributes, ariaActiveDescendant, hasTimedOut, noOptions, filteredOptions, clearButtonFocused, } = this;
|
15030
16423
|
// HTML inputs only accept 'string' for their value
|
15031
16424
|
// Does not cause errors when it is a multi-select - sets value correctly, to a comma-separated string
|
15032
16425
|
renderHiddenInput(this.el, searchable ? hiddenInputValue : currValue, name || inputId, disabled);
|
15033
16426
|
const invalid = `${validationStatus === IcInformationStatus.Error}`;
|
15034
|
-
const
|
16427
|
+
const showValidation = hasValidationStatus(validationStatus, !!disabled);
|
16428
|
+
const describedBy = getInputDescribedByText(this.el, inputId, helperText !== "", showValidation).trim();
|
15035
16429
|
const valueLabelString = multiple
|
15036
16430
|
? this.getMultipleOptionsString(currValue)
|
15037
16431
|
: this.getLabelFromValue(currValue);
|
@@ -15039,18 +16433,18 @@ class Select {
|
|
15039
16433
|
(searchable
|
15040
16434
|
? !!searchableSelectInputValue
|
15041
16435
|
: !!currValue && !loading && showClearButton);
|
15042
|
-
return (hAsync(Host, { key: '
|
16436
|
+
return (hAsync(Host, { key: 'd4771b458b86fdf5e8fd7242b0faa34c641dc1fd', class: {
|
15043
16437
|
"ic-select-disabled": disabled,
|
15044
16438
|
"ic-select-searchable": searchable,
|
15045
16439
|
[`ic-select-${size}`]: size !== "medium",
|
15046
16440
|
"ic-select-full-width": fullWidth,
|
15047
16441
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
15048
|
-
}, onBlur: this.onBlur }, hAsync("ic-input-container", { key: '
|
16442
|
+
}, onBlur: this.onBlur }, hAsync("ic-input-container", { key: '085e9b190479932161c56015ed340dda3e94bd20', readonly: readonly }, !hideLabel && (hAsync("ic-input-label", { key: '7ed1f56a30c8ba83b5c5f21291221d8910310fbd', for: inputId, label: label, helperText: helperText, required: required, disabled: disabled, readonly: readonly }, hAsync("slot", { key: '1d3aac656b887c2a553f425e310d3be2fcc0a570', name: "helper-text", slot: "helper-text" }))), hAsync("ic-input-component-container", { key: '7f6973e971e7b892717e72d8420346d8951751ca', ref: (el) => (this.anchorEl = el), class: { "menu-open": open }, size: size, fullWidth: fullWidth, disabled: disabled, readonly: readonly, validationStatus: validationStatus }, isSlotUsed(this.el, "icon") &&
|
15049
16443
|
!disabled &&
|
15050
|
-
(!readonly || !!value) && (hAsync("span", { key: '
|
16444
|
+
(!readonly || !!value) && (hAsync("span", { key: '208359e9a4b4c92823fa924ce0e7b0e5419c0cef', slot: "left-icon", class: {
|
15051
16445
|
readonly,
|
15052
16446
|
"has-value": !!value,
|
15053
|
-
} }, hAsync("slot", { key: '
|
16447
|
+
} }, hAsync("slot", { key: '462c17f5f746f3d54eaff493c990e6527ed7c381', name: "icon" }))), readonly ? (hAsync("ic-typography", null, hAsync("p", null, valueLabelString))) : isMobileOrTablet() && !multiple ? (hAsync("select", Object.assign({ ref: (el) => (this.nativeSelectElement = el), disabled: disabled, onChange: this.handleNativeSelectChange, required: required, id: inputId, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.handleNativeSelectKeyDown, form: form }, inheritedAttributes), hAsync("option", { value: "", selected: true, disabled: !showClearButton }, placeholder), options.map((option) => option.children ? (hAsync("optgroup", { label: option.label }, option.children.map((child) => this.renderNativeOption(child)))) : (this.renderNativeOption(option))))) : searchable ? (hAsync("div", { class: "searchable-select-container" }, hAsync("input", { class: {
|
15054
16448
|
"value-text": true,
|
15055
16449
|
"select-input": true,
|
15056
16450
|
"with-clear-button": !!searchableSelectInputValue,
|
@@ -15071,13 +16465,15 @@ class Select {
|
|
15071
16465
|
} }, valueLabelString || placeholder), hAsync("div", { class: "select-input-end" }, isClearable && hAsync("div", { class: "divider" }), hAsync("span", { class: {
|
15072
16466
|
"expand-icon": true,
|
15073
16467
|
"expand-icon-open": open,
|
15074
|
-
}, innerHTML: Expand, "aria-hidden": "true" }))), isClearable && (hAsync("ic-button", { id: "clear-button", "aria-label": "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon-tertiary", theme: clearButtonFocused ? "light" : "dark" }))))), (!isMobileOrTablet() || multiple) && (hAsync("ic-menu", { key: '
|
16468
|
+
}, innerHTML: Expand, "aria-hidden": "true" }))), isClearable && (hAsync("ic-button", { id: "clear-button", "aria-label": "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon-tertiary", theme: clearButtonFocused ? "light" : "dark" }))))), (!isMobileOrTablet() || multiple) && (hAsync("ic-menu", { key: '4daeee28961203c0b190687229c0f9f2b4a1d66e', class: {
|
15075
16469
|
"no-results": loading ||
|
15076
16470
|
hasTimedOut ||
|
15077
16471
|
((_a = noOptions === null || noOptions === void 0 ? void 0 : noOptions[0]) === null || _a === void 0 ? void 0 : _a.label) === emptyOptionListText,
|
15078
16472
|
}, ref: (el) => (this.menu = el), inputEl: searchable
|
15079
16473
|
? this.searchableSelectElement
|
15080
|
-
: this.customSelectElement, inputLabel: label, anchorEl: this.anchorEl, size: size, menuId: menuId, open: open, options: searchable ? filteredOptions : uniqueOptions, value: multiple ? currValue : currValue, fullWidth: fullWidth, selectOnEnter: selectOnEnter, onMenuStateChange: this.handleMenuChange, onMenuOptionSelect: this.handleCustomSelectChange, onMenuOptionSelectAll: this.handleSelectAllChange, onMenuKeyPress: this.handleMenuKeyPress, onUngroupedOptionsSet: this.setUngroupedOptions, onRetryButtonClicked: this.handleRetry, parentEl: this.el, onTimeoutBlur: this.onTimeoutBlur, activationType: searchable || multiple || selectOnEnter ? "manual" : "automatic", closeOnSelect: !multiple, multiSelect: multiple ? true : false, searchableSelect: searchable ? true : false })), multiple && (hAsync("div", { key: '
|
16474
|
+
: this.customSelectElement, inputLabel: label, anchorEl: this.anchorEl, size: size, menuId: menuId, open: open, options: searchable ? filteredOptions : uniqueOptions, value: multiple ? currValue : currValue, fullWidth: fullWidth, selectOnEnter: selectOnEnter, onMenuStateChange: this.handleMenuChange, onMenuOptionSelect: this.handleCustomSelectChange, onMenuOptionSelectAll: this.handleSelectAllChange, onMenuKeyPress: this.handleMenuKeyPress, onUngroupedOptionsSet: this.setUngroupedOptions, onRetryButtonClicked: this.handleRetry, parentEl: this.el, onTimeoutBlur: this.onTimeoutBlur, activationType: searchable || multiple || selectOnEnter ? "manual" : "automatic", closeOnSelect: !multiple, multiSelect: multiple ? true : false, searchableSelect: searchable ? true : false })), multiple && (hAsync("div", { key: '87993e273df521157bb8101f5f96639b0cb3503b', "aria-live": "polite", role: "status", class: "multi-select-selected-count" })), hAsync("ic-input-validation", { key: 'c0248fb27e0d97f885c8227ffda4534ab65561ec', class: {
|
16475
|
+
"menu-open": open,
|
16476
|
+
}, ariaLiveMode: validationAriaLive, status: showValidation ? validationStatus : "", message: showValidation ? validationText : "", for: inputId }))));
|
15081
16477
|
}
|
15082
16478
|
static get delegatesFocus() { return true; }
|
15083
16479
|
get el() { return getElement(this); }
|
@@ -15118,6 +16514,7 @@ class Select {
|
|
15118
16514
|
"size": [1],
|
15119
16515
|
"timeout": [2],
|
15120
16516
|
"theme": [1],
|
16517
|
+
"validationAriaLive": [1, "validation-aria-live"],
|
15121
16518
|
"validationStatus": [1, "validation-status"],
|
15122
16519
|
"validationText": [1, "validation-text"],
|
15123
16520
|
"loading": [1028],
|
@@ -15851,6 +17248,19 @@ class Step {
|
|
15851
17248
|
* @internal If `true`, and a compact stepper is being used, the current step will be the only step in view.
|
15852
17249
|
*/
|
15853
17250
|
this.current = false;
|
17251
|
+
/**
|
17252
|
+
* Words within the component that can be replaced to translate the component into a different language
|
17253
|
+
*/
|
17254
|
+
this.icI18n = {
|
17255
|
+
next: "Next",
|
17256
|
+
step: "Step",
|
17257
|
+
of: "of",
|
17258
|
+
lastStep: "Last step",
|
17259
|
+
completed: "Completed",
|
17260
|
+
notRequired: "Not required",
|
17261
|
+
required: "Required",
|
17262
|
+
optional: "Optional",
|
17263
|
+
};
|
15854
17264
|
/**
|
15855
17265
|
* @internal Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component.
|
15856
17266
|
*/
|
@@ -15870,96 +17280,95 @@ class Step {
|
|
15870
17280
|
}
|
15871
17281
|
render() {
|
15872
17282
|
var _a, _b;
|
17283
|
+
const { compactStepStyling, current, heading, icI18n, lastStep, lastStepNum, nextStepHeading, progress, status, stepNum, subheading, theme, type, variant, } = this;
|
15873
17284
|
// ARIA LABEL
|
15874
17285
|
let ariaLabel = "";
|
15875
|
-
if (
|
15876
|
-
ariaLabel =
|
17286
|
+
if (type === "completed") {
|
17287
|
+
ariaLabel = `. ${icI18n.completed}`;
|
15877
17288
|
}
|
15878
|
-
else if (
|
15879
|
-
ariaLabel =
|
17289
|
+
else if (type === "disabled") {
|
17290
|
+
ariaLabel = `. ${icI18n.notRequired}`;
|
15880
17291
|
}
|
15881
|
-
else if (
|
15882
|
-
ariaLabel =
|
17292
|
+
else if (status === "required") {
|
17293
|
+
ariaLabel = `. ${icI18n.required}`;
|
15883
17294
|
}
|
15884
|
-
else if (
|
15885
|
-
ariaLabel =
|
17295
|
+
else if (status === "optional") {
|
17296
|
+
ariaLabel = `. ${icI18n.optional}`;
|
15886
17297
|
}
|
15887
17298
|
// STEP STATUS
|
15888
17299
|
let stepStatus;
|
15889
|
-
if (
|
15890
|
-
stepStatus =
|
17300
|
+
if (status && isPropDefined(status)) {
|
17301
|
+
stepStatus = status[0].toUpperCase() + status.slice(1);
|
15891
17302
|
}
|
15892
17303
|
// STEP TYPE
|
15893
17304
|
let stepType;
|
15894
|
-
if (
|
15895
|
-
stepType =
|
17305
|
+
if (type === "disabled" || compactStepStyling === "disabled") {
|
17306
|
+
stepType = icI18n.notRequired;
|
15896
17307
|
}
|
15897
|
-
else if (
|
15898
|
-
stepType =
|
17308
|
+
else if (compactStepStyling === "completed") {
|
17309
|
+
stepType = icI18n.completed;
|
15899
17310
|
}
|
15900
17311
|
// STATUS ICON FOR COMPACT STEP
|
15901
17312
|
let statusIcon;
|
15902
|
-
if (
|
15903
|
-
statusIcon = (hAsync("span", { key: '
|
17313
|
+
if (type === "completed" || compactStepStyling === "completed") {
|
17314
|
+
statusIcon = (hAsync("span", { key: '8c76808f7d75f2d9ae6293209ef86bae0e79716d', class: "check-icon step-icon", "aria-hidden": "true", innerHTML: checkIcon }));
|
15904
17315
|
}
|
15905
|
-
else if (
|
15906
|
-
|
15907
|
-
statusIcon = (hAsync("span", { key: '6f4911859d103732d5f2133a26dc4e05cd6a3d22', class: "warning-icon step-icon", "aria-hidden": "true", innerHTML: warningIcon }));
|
17316
|
+
else if (type === "disabled" || compactStepStyling === "disabled") {
|
17317
|
+
statusIcon = (hAsync("span", { key: '16ba6a8045db3f5694f7546a5458b6f91261d814', class: "warning-icon step-icon", "aria-hidden": "true", innerHTML: warningIcon }));
|
15908
17318
|
}
|
15909
17319
|
// COMPACT STEP COMPONENT
|
15910
|
-
const compactStep = (hAsync("div", { key: '
|
17320
|
+
const compactStep = (hAsync("div", { key: '914fd4dade3b6900052b9ac08f665610f10ee467', class: {
|
15911
17321
|
["step"]: true,
|
15912
|
-
["current"]: !!
|
15913
|
-
[`compact-step-${
|
15914
|
-
["disabled"]:
|
15915
|
-
} }, hAsync("ic-loading-indicator", { key: '
|
17322
|
+
["current"]: !!current,
|
17323
|
+
[`compact-step-${compactStepStyling}`]: !!compactStepStyling,
|
17324
|
+
["disabled"]: type === "disabled" || compactStepStyling === "disabled",
|
17325
|
+
} }, hAsync("ic-loading-indicator", { key: '4679914758455a299e8bab80e4640fa3fcdb6a18', class: {
|
15916
17326
|
"compact-step-progress-indicator": true,
|
15917
|
-
"not-required":
|
15918
|
-
|
15919
|
-
|
15920
|
-
|
15921
|
-
this.type === "disabled" ||
|
17327
|
+
"not-required": type === "disabled" || compactStepStyling === "disabled",
|
17328
|
+
}, "aria-hidden": "true", size: "small", "inner-label": stepNum, progress: progress }), hAsync("div", { key: '7666cfe7acb4966bcb1baa07f457dba6b21120b5', class: "heading-area" }, hAsync("ic-typography", { key: '247088bc17d4ed998e5d04150e4a2e0c0a0185b2', variant: "h4", class: "heading" }, heading), hAsync("div", { key: 'bf63017723f6db8ccbb27583a2f04a548c596ea9', class: "info-line" }, hAsync("ic-typography", { key: '621c958bc31df3631b808a8055d964d71ba97388', variant: "caption", class: "step-num" }, `${stepNum} ${icI18n.of} ${lastStepNum}`, hAsync("span", { key: 'e08ea47dd3a11327ca6ee4b8e0d75f292c8c812f', class: "visually-hidden" }, " steps")), (this.subheading ||
|
17329
|
+
type === "completed" ||
|
17330
|
+
type === "disabled" ||
|
15922
17331
|
(this.variant === "compact" &&
|
15923
|
-
!!
|
15924
|
-
|
15925
|
-
!!
|
15926
|
-
?
|
15927
|
-
:
|
15928
|
-
(
|
15929
|
-
|
15930
|
-
|
15931
|
-
(
|
15932
|
-
|
17332
|
+
!!compactStepStyling &&
|
17333
|
+
compactStepStyling !== "active") ||
|
17334
|
+
!!status) && (hAsync("div", { key: '7614152c3bfad5b936e206e3ab9c295763f2569c', class: "step-status" }, statusIcon !== undefined && statusIcon, (subheading || stepType) && (hAsync("ic-typography", { key: '8c1e5c2b326a40237d5e3ef5ed1bcdec7c8f8132', variant: "caption" }, subheading !== null && isPropDefined(subheading)
|
17335
|
+
? subheading
|
17336
|
+
: type === "disabled" ||
|
17337
|
+
(variant === "compact" &&
|
17338
|
+
compactStepStyling === "disabled") ||
|
17339
|
+
type === "completed" ||
|
17340
|
+
(variant === "compact" &&
|
17341
|
+
compactStepStyling === "completed")
|
15933
17342
|
? stepType
|
15934
|
-
:
|
17343
|
+
: status && stepStatus))))), lastStep ? (hAsync("ic-typography", { variant: "subtitle-small", class: "next-step" }, icI18n.lastStep)) : (isPropDefined(nextStepHeading) && (hAsync("ic-typography", { variant: "subtitle-small", class: "next-step" }, icI18n.next, hAsync("span", { class: "visually-hidden" }, " ", icI18n.step), ":", " ", this.nextStepHeading))))));
|
15935
17344
|
// ICON FOR DEFAULT STEP
|
15936
17345
|
let icon;
|
15937
|
-
if (
|
15938
|
-
icon = (hAsync("ic-typography", { key: '
|
17346
|
+
if (type !== "completed") {
|
17347
|
+
icon = (hAsync("ic-typography", { key: 'ffa20478aed6b35a92c1cc1f16ebcebb97492553', variant: "subtitle-small" }, hAsync("span", { key: 'ed4a75d2aab01948cd6417c697a0c150d9f1d262', class: "step-icon-inner", "aria-hidden": "true" }, this.stepNum)));
|
15939
17348
|
}
|
15940
17349
|
else {
|
15941
|
-
icon = (hAsync("div", { key: '
|
17350
|
+
icon = (hAsync("div", { key: 'b50a1c3094e7f1328d0f86ab10892afcd8a3c41a', class: "step-icon-inner", "aria-hidden": "true" }, hAsync("span", { key: '8c277146b4a653097a7e8ec5ceff6112e667ac38', class: "check-icon", innerHTML: checkIcon })));
|
15942
17351
|
}
|
15943
17352
|
// STEP CONNECT FOR DEFAULT STEP
|
15944
|
-
const partialBar =
|
15945
|
-
const finalStep = !
|
17353
|
+
const partialBar = type === "current" && (hAsync("div", { key: '5bc99a6129f3dfffc9b57175a2a18fd589a07557', class: "step-connect-inner" }));
|
17354
|
+
const finalStep = !lastStep && (hAsync("div", { key: 'e16d56443005483e87a58164452d57fe93ccbaca', class: {
|
15946
17355
|
["step-connect"]: true,
|
15947
17356
|
["aligned-full-width"]: !!(((_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.classList.contains("ic-stepper-default")) &&
|
15948
17357
|
!this.el.parentElement.classList.contains("ic-stepper-aligned-left")),
|
15949
17358
|
} }, partialBar));
|
15950
17359
|
// DEFAULT STEP COMPONENT
|
15951
|
-
const defaultStep = (hAsync("div", { key: '
|
17360
|
+
const defaultStep = (hAsync("div", { key: 'd50917250a7ce0866f877bf7b957a45789059240', class: {
|
15952
17361
|
["step"]: true,
|
15953
|
-
[`${
|
15954
|
-
} }, hAsync("div", { key: '
|
15955
|
-
?
|
17362
|
+
[`${type}`]: true,
|
17363
|
+
} }, hAsync("div", { key: 'c90e98efccf917d2327958e5bd0a722561e3e661', class: "step-top" }, hAsync("div", { key: '2ae403e7604d97633da0f5df80665626312e6d98', class: "step-icon" }, icon), finalStep), (heading || subheading || status) && (hAsync("div", { key: '0b028ca96dd4ba62da9a77327575af1178b95e87', class: "heading-area" }, heading && (hAsync("ic-typography", { key: '19127034e751855cf6b817d4afe4e4b6e1542321', variant: "subtitle-large", class: "heading" }, heading)), heading && (subheading || status) && (hAsync("ic-typography", { key: '1faa4f2dfc841105d9989e442360c44d0b162f4d', variant: "caption", class: "subheading" }, subheading !== null && isPropDefined(subheading)
|
17364
|
+
? subheading
|
15956
17365
|
: stepStatus))))));
|
15957
|
-
return (hAsync(Host, { key: '
|
17366
|
+
return (hAsync(Host, { key: '05bb1106d2259fca749c197e79caa408dc237326', role: "listitem", "aria-label": `${icI18n.step} ${stepNum}${ariaLabel}`, "aria-current": (current || type === "current") && "step", class: {
|
15958
17367
|
["aligned-full-width"]: !!(((_b = this.el.parentElement) === null || _b === void 0 ? void 0 : _b.classList.contains("ic-stepper-default")) &&
|
15959
17368
|
!this.el.parentElement.classList.contains("ic-stepper-aligned-left")),
|
15960
|
-
[`ic-step-${
|
15961
|
-
[`ic-theme-${
|
15962
|
-
} },
|
17369
|
+
[`ic-step-${variant}`]: true,
|
17370
|
+
[`ic-theme-${theme}`]: this.theme !== "inherit",
|
17371
|
+
} }, variant === "compact" ? compactStep : defaultStep));
|
15963
17372
|
}
|
15964
17373
|
get el() { return getElement(this); }
|
15965
17374
|
static get watchers() { return {
|
@@ -15972,6 +17381,7 @@ class Step {
|
|
15972
17381
|
"$members$": {
|
15973
17382
|
"compactStepStyling": [1, "compact-step-styling"],
|
15974
17383
|
"current": [1028],
|
17384
|
+
"icI18n": [16],
|
15975
17385
|
"lastStep": [4, "last-step"],
|
15976
17386
|
"lastStepNum": [2, "last-step-num"],
|
15977
17387
|
"nextStepHeading": [1, "next-step-heading"],
|
@@ -16019,6 +17429,19 @@ class Stepper {
|
|
16019
17429
|
* If `true`, the information about each step, i.e. step title, step subtitle and step status, will be hidden on all default steps. The information about each step will still be visible in the compact variant of the stepper.
|
16020
17430
|
*/
|
16021
17431
|
this.hideStepInfo = false;
|
17432
|
+
/**
|
17433
|
+
* Provide alternative values for text in all child steps. For the purpose of translating the application into other languages.
|
17434
|
+
*/
|
17435
|
+
this.icI18n = {
|
17436
|
+
next: "Next",
|
17437
|
+
step: "Step",
|
17438
|
+
of: "of",
|
17439
|
+
lastStep: "Last step",
|
17440
|
+
completed: "Completed",
|
17441
|
+
notRequired: "Not required",
|
17442
|
+
required: "Required",
|
17443
|
+
optional: "Optional",
|
17444
|
+
};
|
16022
17445
|
/**
|
16023
17446
|
* 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.
|
16024
17447
|
*/
|
@@ -16064,6 +17487,10 @@ class Stepper {
|
|
16064
17487
|
this.initialiseStepStates = () => {
|
16065
17488
|
this.steps.forEach((step, index) => {
|
16066
17489
|
var _a, _b, _c;
|
17490
|
+
// Set language
|
17491
|
+
if (this.icI18n !== undefined) {
|
17492
|
+
step.icI18n = this.icI18n;
|
17493
|
+
}
|
16067
17494
|
// Set variant
|
16068
17495
|
step.variant = this.variant;
|
16069
17496
|
// Assign stepNum to each step
|
@@ -16235,11 +17662,11 @@ class Stepper {
|
|
16235
17662
|
checkResizeObserver(this.runResizeObserver);
|
16236
17663
|
}
|
16237
17664
|
render() {
|
16238
|
-
return (hAsync(Host, { key: '
|
17665
|
+
return (hAsync(Host, { key: 'a5ec9b8d778ba54adf1b3034455e64df0a51fd7c', class: {
|
16239
17666
|
[`ic-stepper-${this.variant}`]: true,
|
16240
17667
|
["ic-stepper-aligned-left"]: this.variant === "default" && this.aligned === "left",
|
16241
17668
|
[`ic-theme-${this.theme}`]: this.theme !== "inherit",
|
16242
|
-
} }, hAsync("ul", { key: '
|
17669
|
+
} }, hAsync("ul", { key: '4140f5cb20325ee4c5c98c855c4b822a448294e8', class: "step-item-list" }, hAsync("slot", { key: 'cda080de502e7760bb3f9a1519f0261b554b0b77' }))));
|
16243
17670
|
}
|
16244
17671
|
get el() { return getElement(this); }
|
16245
17672
|
static get watchers() { return {
|
@@ -16255,6 +17682,7 @@ class Stepper {
|
|
16255
17682
|
"aligned": [1],
|
16256
17683
|
"connectorWidth": [2, "connector-width"],
|
16257
17684
|
"hideStepInfo": [4, "hide-step-info"],
|
17685
|
+
"icI18n": [16],
|
16258
17686
|
"theme": [1],
|
16259
17687
|
"variant": [1025],
|
16260
17688
|
"alignedFullWidth": [32],
|
@@ -16882,7 +18310,7 @@ class TabPanel {
|
|
16882
18310
|
}; }
|
16883
18311
|
}
|
16884
18312
|
|
16885
|
-
const icTextFieldCss = "/*! 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}.
|
18313
|
+
const icTextFieldCss = "/*! 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}}";
|
16886
18314
|
var IcTextFieldStyle0 = icTextFieldCss;
|
16887
18315
|
|
16888
18316
|
let inputIds = 0;
|
@@ -16910,10 +18338,6 @@ class TextField {
|
|
16910
18338
|
this.maxValueExceeded = false;
|
16911
18339
|
this.minValueUnattained = false;
|
16912
18340
|
this.isFocussed = false;
|
16913
|
-
/**
|
16914
|
-
* 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"`.
|
16915
|
-
*/
|
16916
|
-
this.validationAriaLive = "default";
|
16917
18341
|
/**
|
16918
18342
|
* The automatic capitalisation of the text value as it is entered/edited by the user.
|
16919
18343
|
* Available options: "off", "none", "on", "sentences", "words", "characters".
|
@@ -17036,6 +18460,10 @@ class TextField {
|
|
17036
18460
|
* The type of control to display. The default type is text.
|
17037
18461
|
*/
|
17038
18462
|
this.type = "text";
|
18463
|
+
/**
|
18464
|
+
* 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"`.
|
18465
|
+
*/
|
18466
|
+
this.validationAriaLive = "default";
|
17039
18467
|
/**
|
17040
18468
|
* If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.
|
17041
18469
|
*/
|
@@ -17282,12 +18710,12 @@ class TextField {
|
|
17282
18710
|
"no-resize": resize === false || !!readonly,
|
17283
18711
|
"no-left-pad": !showLeftIcon && !!readonly,
|
17284
18712
|
readonly: !!readonly,
|
17285
|
-
}, name: name, ref: (el) => (this.inputEl = el), value: value, rows: rows, required: required, disabled: disabledMode, placeholder: placeholder, readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onScroll: this.onTextAreaScroll, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, autocomplete: autocomplete, autocapitalize: autocapitalize, spellcheck: spellcheck, inputmode: inputmode, maxlength: maxCharactersReached ? maxCharacters : undefined, minlength: minCharactersUnattained ? minCharacters : undefined }, inheritedAttributes))), isSlotUsed(el, "clear-button") && (hAsync("slot", { key: 'e02f69a6fd4c654b7f3b5f1593f7a29c7412d10f', name: "clear-button" })), isSlotUsed(el, "search-submit-button") && (hAsync("slot", { key: '2e32b1afd58a382a804a356537489efa523009ce', name: "search-submit-button" }))), isSlotUsed(el, "menu") && hAsync("slot", { key: '1cbac8ded359309907e51f16033b03d266eb8828', name: "menu" }), hAsync("ic-input-validation", { key: '
|
18713
|
+
}, name: name, ref: (el) => (this.inputEl = el), value: value, rows: rows, required: required, disabled: disabledMode, placeholder: placeholder, readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onScroll: this.onTextAreaScroll, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, autocomplete: autocomplete, autocapitalize: autocapitalize, spellcheck: spellcheck, inputmode: inputmode, maxlength: maxCharactersReached ? maxCharacters : undefined, minlength: minCharactersUnattained ? minCharacters : undefined }, inheritedAttributes))), isSlotUsed(el, "clear-button") && (hAsync("slot", { key: 'e02f69a6fd4c654b7f3b5f1593f7a29c7412d10f', name: "clear-button" })), isSlotUsed(el, "search-submit-button") && (hAsync("slot", { key: '2e32b1afd58a382a804a356537489efa523009ce', name: "search-submit-button" }))), isSlotUsed(el, "menu") && hAsync("slot", { key: '1cbac8ded359309907e51f16033b03d266eb8828', name: "menu" }), hAsync("ic-input-validation", { key: '55a5e1762111cb2715679f6263719924b098acd4', class: { "show-validation": this.showValidationMargin() }, status: this.hasStatus(currentStatus) === false ||
|
17286
18714
|
(currentStatus === IcInformationStatus.Success &&
|
17287
18715
|
validationInline) ||
|
17288
18716
|
validationInlineInternal
|
17289
18717
|
? ""
|
17290
|
-
: currentStatus, message: showStatusText ? currentValidationText : "", ariaLiveMode: messageAriaLive, for: inputId, fullWidth: fullWidth }, !readonly && maxNumChars > 0 && (hAsync("div", { key: '
|
18718
|
+
: currentStatus, message: showStatusText ? currentValidationText : "", ariaLiveMode: messageAriaLive, for: inputId, fullWidth: fullWidth }, !readonly && maxNumChars > 0 && (hAsync("div", { key: 'ce76d39f556c5cf5ab0e97abb93e243cb0153f54', slot: "validation-message-adornment" }, !hideCharCount && (hAsync("ic-typography", { key: '49a4898f4b336ca7e1ced4550a9494c5505a78a6', variant: "caption", class: "char-count-text" }, hAsync("span", { key: '2b714b46208c477500494f1f43d919f972501f9b', class: "char-count" }, numChars, "/", maxNumChars))), hAsync("span", { key: '3559afb42041b8bb3080ae5bd015bc76a9af3b2d', class: "remaining-char-count-desc", "aria-live": "polite", hidden: !isFocussed, id: remainingCharCountDescId }, remainingCharCountDesc), hAsync("span", { key: '9f98def180554d1dc13e05d6cefac85fd91638bb', hidden: true, id: hiddenCharCountDescId }, "Field can contain a maximum of ", maxNumChars, " characters.")))))));
|
17291
18719
|
}
|
17292
18720
|
get el() { return getElement(this); }
|
17293
18721
|
static get watchers() { return {
|
@@ -17304,7 +18732,6 @@ class TextField {
|
|
17304
18732
|
"ariaAutocomplete": [1, "aria-autocomplete"],
|
17305
18733
|
"ariaExpanded": [1, "aria-expanded"],
|
17306
18734
|
"ariaOwns": [1, "aria-owns"],
|
17307
|
-
"validationAriaLive": [1, "validation-aria-live"],
|
17308
18735
|
"autocapitalize": [1],
|
17309
18736
|
"autocomplete": [1],
|
17310
18737
|
"autocorrect": [1],
|
@@ -17338,6 +18765,7 @@ class TextField {
|
|
17338
18765
|
"theme": [1],
|
17339
18766
|
"truncateValue": [4, "truncate-value"],
|
17340
18767
|
"type": [1],
|
18768
|
+
"validationAriaLive": [1, "validation-aria-live"],
|
17341
18769
|
"validationInline": [4, "validation-inline"],
|
17342
18770
|
"validationInlineInternal": [4, "validation-inline-internal"],
|
17343
18771
|
"validationStatus": [1, "validation-status"],
|