@gov-design-system-ce/components 4.1.0-rc1 → 4.1.1
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/{colors-976f6dff.js → colors-f7c8eadd.js} +7 -9
- package/dist/cjs/colors-f7c8eadd.js.map +1 -0
- package/dist/cjs/{constants-e2807da6.js → constants-49f0efa6.js} +2 -2
- package/dist/cjs/{constants-e2807da6.js.map → constants-49f0efa6.js.map} +1 -1
- package/dist/cjs/{constants-43c0c51b.js → constants-4dfa23e3.js} +2 -2
- package/dist/cjs/{constants-43c0c51b.js.map → constants-4dfa23e3.js.map} +1 -1
- package/dist/cjs/{constants-441d1af4.js → constants-82929d01.js} +2 -2
- package/dist/cjs/{constants-441d1af4.js.map → constants-82929d01.js.map} +1 -1
- package/dist/cjs/{constants-bd0d66ac.js → constants-b9fece07.js} +2 -2
- package/dist/cjs/{constants-bd0d66ac.js.map → constants-b9fece07.js.map} +1 -1
- package/dist/cjs/{constants-5037cdc9.js → constants-c0886404.js} +2 -2
- package/dist/cjs/{constants-5037cdc9.js.map → constants-c0886404.js.map} +1 -1
- package/dist/cjs/{constants-861428a4.js → constants-f464dc4c.js} +2 -2
- package/dist/cjs/{constants-861428a4.js.map → constants-f464dc4c.js.map} +1 -1
- package/dist/cjs/core.cjs.js +2 -2
- package/dist/cjs/{form-c1aec07a.js → form-4e66039a.js} +4 -3
- package/dist/cjs/form-4e66039a.js.map +1 -0
- package/dist/cjs/gov-accordion-item.cjs.entry.js +11 -9
- package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-accordion.cjs.entry.js +4 -5
- package/dist/cjs/gov-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-attachments_3.cjs.entry.js +14 -15
- package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-backdrop.cjs.entry.js +7 -8
- package/dist/cjs/gov-backdrop.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js +7 -8
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-button.cjs.entry.js +12 -13
- package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-card.cjs.entry.js +7 -8
- package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-chip.cjs.entry.js +13 -14
- package/dist/cjs/gov-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-container.cjs.entry.js +3 -11
- package/dist/cjs/gov-container.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-control-group.cjs.entry.js +6 -7
- package/dist/cjs/gov-control-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-cookiebar.cjs.entry.js +3 -3
- package/dist/cjs/gov-dialog.cjs.entry.js +7 -8
- package/dist/cjs/gov-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-dropdown.cjs.entry.js +6 -6
- package/dist/cjs/gov-empty.cjs.entry.js +5 -6
- package/dist/cjs/gov-empty.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-error-code.cjs.entry.js +3 -3
- package/dist/cjs/gov-flex_4.cjs.entry.js +339 -0
- package/dist/cjs/gov-flex_4.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js +6 -8
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +6 -7
- package/dist/cjs/gov-form-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-checkbox.cjs.entry.js +9 -10
- package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-control.cjs.entry.js +7 -7
- package/dist/cjs/gov-form-file.cjs.entry.js +13 -10
- package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-group.cjs.entry.js +5 -6
- package/dist/cjs/gov-form-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-input_2.cjs.entry.js +14 -13
- package/dist/cjs/gov-form-input_2.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-multi-select.cjs.entry.js +13 -29
- package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-password-power.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-radio-group.cjs.entry.js +6 -7
- package/dist/cjs/gov-form-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-radio.cjs.entry.js +8 -9
- package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js +3 -3
- package/dist/cjs/gov-form-select.cjs.entry.js +10 -11
- package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-switch.cjs.entry.js +9 -10
- package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-grid-item.cjs.entry.js +3 -3
- package/dist/cjs/gov-grid.cjs.entry.js +3 -3
- package/dist/cjs/gov-infobar.cjs.entry.js +7 -8
- package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-layout-column.cjs.entry.js +3 -3
- package/dist/cjs/gov-layout.cjs.entry.js +3 -3
- package/dist/cjs/gov-lifecycle.cjs.entry.js +47 -0
- package/dist/cjs/gov-lifecycle.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-link.cjs.entry.js +51 -0
- package/dist/cjs/gov-link.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-loading.cjs.entry.js +5 -6
- package/dist/cjs/gov-loading.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-message.cjs.entry.js +6 -7
- package/dist/cjs/gov-message.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-pagination.cjs.entry.js +8 -9
- package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-spacer.cjs.entry.js +5 -6
- package/dist/cjs/gov-spacer.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-stepper-item.cjs.entry.js +8 -9
- package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-stepper.cjs.entry.js +7 -8
- package/dist/cjs/gov-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tabs-item.cjs.entry.js +6 -6
- package/dist/cjs/gov-tabs.cjs.entry.js +7 -8
- package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tag.cjs.entry.js +11 -12
- package/dist/cjs/gov-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tile.cjs.entry.js +3 -3
- package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tiles.cjs.entry.js +3 -3
- package/dist/cjs/gov-toast.cjs.entry.js +10 -11
- package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tooltip-content.cjs.entry.js +5 -5
- package/dist/cjs/gov-tooltip-content.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tooltip.cjs.entry.js +12 -13
- package/dist/cjs/gov-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard-item.cjs.entry.js +10 -11
- package/dist/cjs/gov-wizard-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard.cjs.entry.js +10 -11
- package/dist/cjs/gov-wizard.cjs.entry.js.map +1 -1
- package/dist/cjs/{win-587f4614.js → gov.log-bfea3151.js} +16 -4
- package/dist/cjs/gov.log-bfea3151.js.map +1 -0
- package/dist/cjs/{index-1af4880c.js → index-7ff4447c.js} +20 -12
- package/dist/cjs/index-7ff4447c.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{props-b8a955b2.js → props-d189860c.js} +2 -2
- package/dist/cjs/{props-b8a955b2.js.map → props-d189860c.js.map} +1 -1
- package/dist/cjs/{string.utils-2335838f.js → string.utils-b84c81cf.js} +2 -1
- package/dist/cjs/string.utils-b84c81cf.js.map +1 -0
- package/dist/cjs/{template-b070338f.js → template-39939fd6.js} +1 -20
- package/dist/cjs/template-39939fd6.js.map +1 -0
- package/dist/cjs/{wcag-31089f70.js → wcag-2927ff73.js} +5 -6
- package/dist/cjs/wcag-2927ff73.js.map +1 -0
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/gov-accordion/gov-accordion-item.js +8 -5
- package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments-item.css +6 -35
- package/dist/collection/components/gov-attachments/gov-attachments-item.js +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments-item.js.map +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments.js +1 -1
- package/dist/collection/components/gov-backdrop/gov-backdrop.js +1 -1
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +1 -1
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js.map +1 -1
- package/dist/collection/components/gov-button/button/gov-button.js +9 -9
- package/dist/collection/components/gov-button/button/gov-button.js.map +1 -1
- package/dist/collection/components/gov-button/dropdown/gov-dropdown.js +1 -1
- package/dist/collection/components/gov-card/gov-card.js +1 -1
- package/dist/collection/components/gov-card/gov-card.js.map +1 -1
- package/dist/collection/components/gov-chip/gov-chip.js +16 -16
- package/dist/collection/components/gov-chip/gov-chip.js.map +1 -1
- package/dist/collection/components/gov-container/gov-container.js +2 -38
- package/dist/collection/components/gov-container/gov-container.js.map +1 -1
- package/dist/collection/components/gov-control-group/gov-control-group.js +1 -1
- package/dist/collection/components/gov-cookiebar/gov-cookiebar.js +1 -1
- package/dist/collection/components/gov-dialog/gov-dialog.js +1 -1
- package/dist/collection/components/gov-dialog/gov-dialog.js.map +1 -1
- package/dist/collection/components/gov-empty/gov-empty.js +1 -1
- package/dist/collection/components/gov-error-code/gov-error-code.js +1 -1
- package/dist/collection/components/gov-flex/constants.js +4 -0
- package/dist/collection/components/gov-flex/constants.js.map +1 -0
- package/dist/collection/components/gov-flex/gov-flex.js +127 -0
- package/dist/collection/components/gov-flex/gov-flex.js.map +1 -0
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +2 -21
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +3 -3
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
- package/dist/collection/components/gov-form/control/gov-form-control.js +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.js +8 -23
- package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
- package/dist/collection/components/gov-form/group/gov-form-checkbox-group.js +1 -1
- package/dist/collection/components/gov-form/group/gov-form-group.css +7 -36
- package/dist/collection/components/gov-form/group/gov-form-group.js +1 -1
- package/dist/collection/components/gov-form/group/gov-form-radio-group.js +1 -1
- package/dist/collection/components/gov-form/input/constants.js +1 -0
- package/dist/collection/components/gov-form/input/constants.js.map +1 -1
- package/dist/collection/components/gov-form/input/gov-form-input.js +5 -3
- package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
- package/dist/collection/components/gov-form/label/gov-form-label.js +1 -1
- package/dist/collection/components/gov-form/message/gov-form-message.js +1 -1
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +6 -30
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
- package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +1 -1
- package/dist/collection/components/gov-form/radio/gov-form-radio.js +1 -1
- package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
- package/dist/collection/components/gov-form/search/gov-form-search.js +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.js +4 -4
- package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
- package/dist/collection/components/gov-form/switch/constants.js +1 -1
- package/dist/collection/components/gov-form/switch/constants.js.map +1 -1
- package/dist/collection/components/gov-form/switch/gov-form-switch.js +4 -4
- package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
- package/dist/collection/components/gov-grid/gov-grid-item.js +1 -1
- package/dist/collection/components/gov-grid/gov-grid.js +1 -1
- package/dist/collection/components/gov-icon/constants.js +8 -7
- package/dist/collection/components/gov-icon/constants.js.map +1 -1
- package/dist/collection/components/gov-icon/gov-icon.js +41 -10
- package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
- package/dist/collection/components/gov-icon/list.js +43 -151
- package/dist/collection/components/gov-icon/list.js.map +1 -1
- package/dist/collection/components/gov-infobar/gov-infobar.js +2 -2
- package/dist/collection/components/gov-infobar/gov-infobar.js.map +1 -1
- package/dist/collection/components/gov-layout/gov-layout-column.js +1 -1
- package/dist/collection/components/gov-layout/gov-layout.js +1 -1
- package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js +39 -0
- package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js.map +1 -0
- package/dist/collection/components/gov-link/constants.js +7 -0
- package/dist/collection/components/gov-link/constants.js.map +1 -0
- package/dist/collection/components/gov-link/gov-link.js +129 -0
- package/dist/collection/components/gov-link/gov-link.js.map +1 -0
- package/dist/collection/components/gov-loading/loading/gov-loading.js +1 -1
- package/dist/collection/components/gov-loading/loading/gov-loading.js.map +1 -1
- package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +1 -1
- package/dist/collection/components/gov-message/gov-message.js +1 -1
- package/dist/collection/components/gov-pagination/gov-pagination.js +2 -2
- package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
- package/dist/collection/components/gov-spacer/gov-spacer.js +1 -1
- package/dist/collection/components/gov-stepper/gov-stepper-item.js +1 -1
- package/dist/collection/components/gov-stepper/gov-stepper.js +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs.js +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
- package/dist/collection/components/gov-tag/gov-tag.js +9 -9
- package/dist/collection/components/gov-tag/gov-tag.js.map +1 -1
- package/dist/collection/components/gov-theme-switch/constants.js +9 -1
- package/dist/collection/components/gov-theme-switch/constants.js.map +1 -1
- package/dist/collection/components/gov-theme-switch/gov-theme-switch.js +134 -10
- package/dist/collection/components/gov-theme-switch/gov-theme-switch.js.map +1 -1
- package/dist/collection/components/gov-tile/container/gov-tiles.js +1 -1
- package/dist/collection/components/gov-tile/gov-tile.js +7 -7
- package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
- package/dist/collection/components/gov-toast/constants.js +1 -0
- package/dist/collection/components/gov-toast/constants.js.map +1 -1
- package/dist/collection/components/gov-toast/gov-toast.js +3 -4
- package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.js.map +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip.js +2 -2
- package/dist/collection/components/gov-wizard/gov-wizard-item.js +3 -3
- package/dist/collection/components/gov-wizard/gov-wizard-item.js.map +1 -1
- package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
- package/dist/collection/core/constants/colors.js +6 -8
- package/dist/collection/core/constants/colors.js.map +1 -1
- package/dist/collection/data/color-definitions.js +359 -172
- package/dist/collection/helpers/Dom/document.js +46 -0
- package/dist/collection/helpers/Dom/document.js.map +1 -0
- package/dist/collection/helpers/Dom/template.js +0 -18
- package/dist/collection/helpers/Dom/template.js.map +1 -1
- package/dist/collection/helpers/Dom/template.types.js.map +1 -1
- package/dist/collection/pages/Accordion.js +30 -30
- package/dist/collection/pages/Accordion.js.map +1 -1
- package/dist/collection/pages/Button.js +383 -383
- package/dist/collection/pages/Button.js.map +1 -1
- package/dist/collection/pages/Chip.js +53 -53
- package/dist/collection/pages/Chip.js.map +1 -1
- package/dist/collection/pages/ControlGroup.js +18 -18
- package/dist/collection/pages/ControlGroup.js.map +1 -1
- package/dist/collection/pages/Dialog.js +1 -1
- package/dist/collection/pages/Dialog.js.map +1 -1
- package/dist/collection/pages/Forms.js +206 -196
- package/dist/collection/pages/Forms.js.map +1 -1
- package/dist/collection/pages/Grid.js +1 -1
- package/dist/collection/pages/Grid.js.map +1 -1
- package/dist/collection/pages/Icon.js +10 -0
- package/dist/collection/pages/Icon.js.map +1 -1
- package/dist/collection/pages/Infobar.js +16 -16
- package/dist/collection/pages/Infobar.js.map +1 -1
- package/dist/collection/pages/Message.js +20 -20
- package/dist/collection/pages/Message.js.map +1 -1
- package/dist/collection/pages/Spacer.js +1 -1
- package/dist/collection/pages/Spacer.js.map +1 -1
- package/dist/collection/pages/Stepper.js +15 -15
- package/dist/collection/pages/Stepper.js.map +1 -1
- package/dist/collection/pages/Tag.js +135 -160
- package/dist/collection/pages/Tag.js.map +1 -1
- package/dist/collection/pages/ToastMessage.js +4 -4
- package/dist/collection/pages/ToastMessage.js.map +1 -1
- package/dist/collection/pages/ToastMessageCountdown.js +4 -4
- package/dist/collection/pages/ToastMessageCountdown.js.map +1 -1
- package/dist/collection/pages/Tooltip.js +2 -2
- package/dist/collection/pages/Tooltip.js.map +1 -1
- package/dist/collection/pages/Typography.js +20 -0
- package/dist/collection/pages/Typography.js.map +1 -1
- package/dist/collection/pages/Wizard.js +2 -2
- package/dist/collection/pages/Wizard.js.map +1 -1
- package/dist/collection/utils/string.utils.js +1 -1
- package/dist/collection/utils/string.utils.js.map +1 -1
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-accordion-item.js.map +1 -1
- package/dist/components/gov-accordion.js +1 -1
- package/dist/components/gov-attachments-item.js +1 -1
- package/dist/components/gov-attachments.js +1 -1
- package/dist/components/gov-backdrop.js +1 -1
- package/dist/components/gov-breadcrumbs.js +1 -1
- package/dist/components/gov-breadcrumbs.js.map +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-card.js.map +1 -1
- package/dist/components/gov-chip.js +1 -1
- package/dist/components/gov-container.js +1 -1
- package/dist/components/gov-container.js.map +1 -1
- package/dist/components/gov-control-group.js +1 -1
- package/dist/components/gov-cookiebar.js +1 -1
- package/dist/components/gov-dialog.js +1 -1
- package/dist/components/gov-dialog.js.map +1 -1
- package/dist/components/gov-dropdown.js +1 -1
- package/dist/components/gov-dropdown.js.map +1 -1
- package/dist/components/gov-empty.js +1 -1
- package/dist/components/gov-error-code.js +1 -1
- package/dist/components/{gov-app.d.ts → gov-flex.d.ts} +4 -4
- package/dist/components/gov-flex.js +2 -0
- package/dist/components/gov-flex.js.map +1 -0
- package/dist/components/gov-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox-group.js +1 -1
- package/dist/components/gov-form-checkbox-group.js.map +1 -1
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-checkbox.js.map +1 -1
- package/dist/components/gov-form-control.js +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-file.js.map +1 -1
- package/dist/components/gov-form-group.js +1 -1
- package/dist/components/gov-form-input.js +1 -1
- package/dist/components/gov-form-label.js +1 -1
- package/dist/components/gov-form-label.js.map +1 -1
- package/dist/components/gov-form-message.js +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-multi-select.js.map +1 -1
- package/dist/components/gov-form-password-power.js +1 -1
- package/dist/components/gov-form-radio-group.js +1 -1
- package/dist/components/gov-form-radio-group.js.map +1 -1
- package/dist/components/gov-form-radio.js +1 -1
- package/dist/components/gov-form-radio.js.map +1 -1
- package/dist/components/gov-form-search.js +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-form-switch.js +1 -1
- package/dist/components/gov-form-switch.js.map +1 -1
- package/dist/components/gov-grid-item.js +1 -1
- package/dist/components/gov-grid.js +1 -1
- package/dist/components/gov-icon.js +1 -1
- package/dist/components/gov-infobar.js +1 -1
- package/dist/components/gov-infobar.js.map +1 -1
- package/dist/components/gov-layout-column.js +1 -1
- package/dist/components/gov-layout.js +1 -1
- package/dist/components/gov-lifecycle.d.ts +11 -0
- package/dist/components/gov-lifecycle.js +2 -0
- package/dist/components/gov-lifecycle.js.map +1 -0
- package/dist/components/gov-link.d.ts +11 -0
- package/dist/components/gov-link.js +2 -0
- package/dist/components/gov-link.js.map +1 -0
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-loading.js.map +1 -1
- package/dist/components/gov-message.js +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-pagination.js.map +1 -1
- package/dist/components/gov-skeleton.js +1 -1
- package/dist/components/gov-spacer.js +1 -1
- package/dist/components/gov-stepper-item.js +1 -1
- package/dist/components/gov-stepper.js +1 -1
- package/dist/components/gov-tabs-item.js +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tabs.js.map +1 -1
- package/dist/components/gov-tag.js +1 -1
- package/dist/components/gov-tag.js.map +1 -1
- package/dist/components/gov-theme-switch.js +1 -1
- package/dist/components/gov-theme-switch.js.map +1 -1
- package/dist/components/gov-tile.js +1 -1
- package/dist/components/gov-tile.js.map +1 -1
- package/dist/components/gov-tiles.js +1 -1
- package/dist/components/gov-toast.js +1 -1
- package/dist/components/gov-toast.js.map +1 -1
- package/dist/components/gov-tooltip-content.js +1 -1
- package/dist/components/gov-tooltip-content.js.map +1 -1
- package/dist/components/gov-tooltip.js +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/gov-wizard-item.js.map +1 -1
- package/dist/components/gov-wizard.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-0b3574c2.js +2 -0
- package/dist/components/p-1eb9c053.js +2 -0
- package/dist/components/p-1eb9c053.js.map +1 -0
- package/dist/components/p-283b66c3.js +2 -0
- package/dist/components/p-283b66c3.js.map +1 -0
- package/dist/components/p-318d89bd.js +2 -0
- package/dist/components/{p-1366ed8d.js.map → p-318d89bd.js.map} +1 -1
- package/dist/components/p-3d7a21b5.js +2 -0
- package/dist/components/p-3d7a21b5.js.map +1 -0
- package/dist/components/{p-ae3dada7.js → p-42200001.js} +3 -3
- package/dist/components/p-42200001.js.map +1 -0
- package/dist/components/p-44a8a668.js +2 -0
- package/dist/components/p-46c567fd.js +2 -0
- package/dist/components/p-46c567fd.js.map +1 -0
- package/dist/components/p-5aad3497.js +2 -0
- package/dist/components/p-5aad3497.js.map +1 -0
- package/dist/components/p-68a1aaec.js +2 -0
- package/dist/components/p-68a1aaec.js.map +1 -0
- package/dist/components/p-73938936.js +2 -0
- package/dist/components/p-76d604c6.js +2 -0
- package/dist/components/p-7be2301a.js +2 -0
- package/dist/components/p-7f3becc5.js +2 -0
- package/dist/components/p-80dad64b.js +2 -0
- package/dist/components/{p-9a93146e.js.map → p-80dad64b.js.map} +1 -1
- package/dist/components/{p-7f8a24a7.js → p-860520b0.js} +2 -2
- package/dist/components/p-880743a5.js.map +1 -1
- package/dist/components/p-9908b9f0.js +2 -0
- package/dist/components/p-9908b9f0.js.map +1 -0
- package/dist/components/{p-59737af9.js → p-a521c59a.js} +2 -2
- package/dist/components/p-a6b7a6c2.js +2 -0
- package/dist/components/p-a6be4769.js +2 -0
- package/dist/components/p-a6be4769.js.map +1 -0
- package/dist/components/{p-6e19816b.js → p-ac359044.js} +2 -2
- package/dist/components/p-b95ebe8c.js +2 -0
- package/dist/components/{p-dbae2385.js.map → p-b95ebe8c.js.map} +1 -1
- package/dist/components/{p-0c93dd39.js → p-c61a5830.js} +2 -2
- package/dist/components/{p-95d41a3b.js → p-cd6c2938.js} +2 -2
- package/dist/components/p-cd6c2938.js.map +1 -0
- package/dist/components/p-e8ec030e.js +2 -0
- package/dist/components/p-e8ec030e.js.map +1 -0
- package/dist/components/p-ea7fdd2e.js +2 -0
- package/dist/components/p-ea7fdd2e.js.map +1 -0
- package/dist/core/core.css +8256 -7340
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-00d153bf.entry.js +2 -0
- package/dist/core/p-019e967c.entry.js +2 -0
- package/dist/core/{p-eeb9cb73.entry.js.map → p-019e967c.entry.js.map} +1 -1
- package/dist/core/p-04fa0ab5.entry.js +2 -0
- package/dist/core/{p-db940455.entry.js.map → p-04fa0ab5.entry.js.map} +1 -1
- package/dist/core/p-0b3574c2.js +2 -0
- package/dist/core/p-0be19b89.entry.js +2 -0
- package/dist/core/p-0fdd8929.entry.js +2 -0
- package/dist/core/{p-7cf554e6.entry.js.map → p-0fdd8929.entry.js.map} +1 -1
- package/dist/core/p-1200a32d.entry.js +2 -0
- package/dist/core/p-1200a32d.entry.js.map +1 -0
- package/dist/core/p-22fa411d.entry.js +2 -0
- package/dist/core/p-2739fa61.entry.js +2 -0
- package/dist/core/p-2739fa61.entry.js.map +1 -0
- package/dist/core/p-29ac15d2.js +2 -0
- package/dist/core/{p-28a7d3f7.js.map → p-29ac15d2.js.map} +1 -1
- package/dist/core/p-30eaeeec.entry.js +2 -0
- package/dist/core/p-3bbb77a0.js +2 -0
- package/dist/core/p-3cb36bae.entry.js +2 -0
- package/dist/core/p-3cb36bae.entry.js.map +1 -0
- package/dist/core/p-3d6edb09.entry.js +2 -0
- package/dist/core/p-3d6edb09.entry.js.map +1 -0
- package/dist/core/p-3f6a2d20.entry.js +2 -0
- package/dist/core/p-3f6a2d20.entry.js.map +1 -0
- package/dist/core/p-41c6b262.entry.js +2 -0
- package/dist/core/{p-e4978aab.entry.js.map → p-41c6b262.entry.js.map} +1 -1
- package/dist/core/p-432c3875.entry.js +2 -0
- package/dist/core/p-432c3875.entry.js.map +1 -0
- package/dist/core/p-439b66a5.entry.js +2 -0
- package/dist/core/{p-a53a277a.entry.js.map → p-439b66a5.entry.js.map} +1 -1
- package/dist/core/p-4b90fbc4.entry.js +2 -0
- package/dist/core/{p-17015e36.entry.js.map → p-4b90fbc4.entry.js.map} +1 -1
- package/dist/core/p-4c5f6299.entry.js +2 -0
- package/dist/core/p-4c5f6299.entry.js.map +1 -0
- package/dist/core/p-535316b4.entry.js +2 -0
- package/dist/core/p-5396935e.entry.js +2 -0
- package/dist/core/p-561718cd.entry.js +2 -0
- package/dist/core/{p-dc3fab19.entry.js.map → p-561718cd.entry.js.map} +1 -1
- package/dist/core/p-56dc370d.entry.js +2 -0
- package/dist/core/{p-6d772ff9.entry.js.map → p-56dc370d.entry.js.map} +1 -1
- package/dist/core/{p-42d9924c.js → p-56efd4a2.js} +2 -2
- package/dist/core/p-5aad3497.js +2 -0
- package/dist/core/p-5aad3497.js.map +1 -0
- package/dist/core/p-5b2131c1.entry.js +2 -0
- package/dist/core/p-5c9e6275.entry.js +2 -0
- package/dist/core/{p-f456bd71.entry.js.map → p-5c9e6275.entry.js.map} +1 -1
- package/dist/core/{p-60658ae9.js → p-5f1000da.js} +2 -2
- package/dist/core/p-65e67731.entry.js +2 -0
- package/dist/core/p-65e67731.entry.js.map +1 -0
- package/dist/core/p-6bb37fe2.entry.js +2 -0
- package/dist/core/{p-f1be099b.entry.js.map → p-6bb37fe2.entry.js.map} +1 -1
- package/dist/core/p-6e457b3d.entry.js +2 -0
- package/dist/core/{p-5dcbfca3.entry.js.map → p-6e457b3d.entry.js.map} +1 -1
- package/dist/core/p-72130a8f.entry.js +2 -0
- package/dist/core/p-72130a8f.entry.js.map +1 -0
- package/dist/core/p-76d604c6.js +2 -0
- package/dist/core/{p-a21dc94f.js.map → p-76d604c6.js.map} +1 -1
- package/dist/core/p-7b7e502b.entry.js +2 -0
- package/dist/core/p-7ba4daf4.js +2 -0
- package/dist/core/p-7e04730a.entry.js +2 -0
- package/dist/core/{p-182189d2.entry.js.map → p-7e04730a.entry.js.map} +1 -1
- package/dist/core/p-7f3becc5.js +2 -0
- package/dist/core/{p-a1e95a5f.js → p-8506b611.js} +3 -3
- package/dist/core/p-8506b611.js.map +1 -0
- package/dist/core/{p-e9a6cd71.js → p-860520b0.js} +2 -2
- package/dist/core/p-880743a5.js.map +1 -1
- package/dist/core/p-97a9725d.entry.js +2 -0
- package/dist/core/{p-9b41ac88.entry.js.map → p-97a9725d.entry.js.map} +1 -1
- package/dist/core/p-9c2c5447.entry.js +2 -0
- package/dist/core/p-9c2c5447.entry.js.map +1 -0
- package/dist/core/p-9fe35463.entry.js +2 -0
- package/dist/core/p-9fe35463.entry.js.map +1 -0
- package/dist/core/p-a521c59a.js +2 -0
- package/dist/core/p-b7cfe254.entry.js +2 -0
- package/dist/core/{p-963f9fcd.entry.js.map → p-b7cfe254.entry.js.map} +1 -1
- package/dist/core/p-b923a8d9.entry.js +2 -0
- package/dist/core/p-b923a8d9.entry.js.map +1 -0
- package/dist/core/p-bc966c46.entry.js +2 -0
- package/dist/core/{p-83039b10.entry.js.map → p-bc966c46.entry.js.map} +1 -1
- package/dist/core/p-bcb45a18.entry.js +2 -0
- package/dist/core/{p-2ed3afef.entry.js.map → p-bcb45a18.entry.js.map} +1 -1
- package/dist/core/p-bdc51179.entry.js +2 -0
- package/dist/core/p-bdc51179.entry.js.map +1 -0
- package/dist/core/p-c054f955.entry.js +2 -0
- package/dist/core/{p-663d3db2.entry.js.map → p-c054f955.entry.js.map} +1 -1
- package/dist/core/{p-c990d746.js → p-c61a5830.js} +2 -2
- package/dist/core/p-c916d0d2.entry.js +2 -0
- package/dist/core/p-c916d0d2.entry.js.map +1 -0
- package/dist/core/p-ccec8019.entry.js +2 -0
- package/dist/core/p-ccec8019.entry.js.map +1 -0
- package/dist/core/p-cd2d335d.entry.js +2 -0
- package/dist/core/{p-b3acb156.entry.js.map → p-cd2d335d.entry.js.map} +1 -1
- package/dist/core/{p-95d41a3b.js → p-cd6c2938.js} +2 -2
- package/dist/core/p-cd6c2938.js.map +1 -0
- package/dist/core/p-d65cef62.entry.js +2 -0
- package/dist/core/{p-aa8adc45.entry.js.map → p-d65cef62.entry.js.map} +1 -1
- package/dist/core/p-d836fcde.entry.js +2 -0
- package/dist/core/{p-b55fc943.entry.js.map → p-d836fcde.entry.js.map} +1 -1
- package/dist/core/p-da1db6fd.js +2 -0
- package/dist/core/p-da1db6fd.js.map +1 -0
- package/dist/core/p-da7f1e11.entry.js +2 -0
- package/dist/core/p-da7f1e11.entry.js.map +1 -0
- package/dist/core/p-dea64896.entry.js +2 -0
- package/dist/core/{p-ab9ae7ba.entry.js.map → p-dea64896.entry.js.map} +1 -1
- package/dist/core/{p-45a30859.js → p-e0e2e9c1.js} +2 -2
- package/dist/core/p-e44a0fee.js +2 -0
- package/dist/core/p-e61aa53b.entry.js +2 -0
- package/dist/core/{p-d2351924.entry.js.map → p-e61aa53b.entry.js.map} +1 -1
- package/dist/core/p-e834ee73.entry.js +2 -0
- package/dist/core/p-e834ee73.entry.js.map +1 -0
- package/dist/core/p-e8ec030e.js +2 -0
- package/dist/core/p-e8ec030e.js.map +1 -0
- package/dist/core/p-ea44d447.entry.js +2 -0
- package/dist/core/p-ea44d447.entry.js.map +1 -0
- package/dist/core/p-ea7fdd2e.js +2 -0
- package/dist/core/p-ea7fdd2e.js.map +1 -0
- package/dist/core/p-ed833334.entry.js +2 -0
- package/dist/core/p-ed833334.entry.js.map +1 -0
- package/dist/core/p-ed8fc183.entry.js +2 -0
- package/dist/core/p-ed8fc183.entry.js.map +1 -0
- package/dist/core/p-f4bcf817.entry.js +2 -0
- package/dist/core/p-f4bcf817.entry.js.map +1 -0
- package/dist/core/p-f4dac942.entry.js +2 -0
- package/dist/core/{p-9ff8f059.entry.js.map → p-f4dac942.entry.js.map} +1 -1
- package/dist/core/p-f7a4da9d.entry.js +2 -0
- package/dist/core/{p-a5489b0e.entry.js.map → p-f7a4da9d.entry.js.map} +1 -1
- package/dist/esm/{colors-02c1ea96.js → colors-4cf64720.js} +7 -9
- package/dist/esm/colors-4cf64720.js.map +1 -0
- package/dist/esm/{constants-6d727976.js → constants-085f9943.js} +2 -2
- package/dist/esm/{constants-6d727976.js.map → constants-085f9943.js.map} +1 -1
- package/dist/esm/{constants-990365f1.js → constants-372455eb.js} +3 -3
- package/dist/esm/{constants-990365f1.js.map → constants-372455eb.js.map} +1 -1
- package/dist/esm/{constants-d6418889.js → constants-3ab65c42.js} +2 -2
- package/dist/esm/{constants-d6418889.js.map → constants-3ab65c42.js.map} +1 -1
- package/dist/esm/{constants-48177684.js → constants-3b914c35.js} +3 -3
- package/dist/esm/{constants-48177684.js.map → constants-3b914c35.js.map} +1 -1
- package/dist/esm/{constants-d42abf99.js → constants-43f10674.js} +2 -2
- package/dist/esm/{constants-d42abf99.js.map → constants-43f10674.js.map} +1 -1
- package/dist/esm/{constants-501eb756.js → constants-4da2b3c0.js} +2 -2
- package/dist/esm/{constants-501eb756.js.map → constants-4da2b3c0.js.map} +1 -1
- package/dist/esm/{constants-c716fa44.js → constants-51f51588.js} +3 -3
- package/dist/esm/{constants-c716fa44.js.map → constants-51f51588.js.map} +1 -1
- package/dist/esm/{constants-f4e4ede6.js → constants-8429b68f.js} +3 -3
- package/dist/esm/{constants-f4e4ede6.js.map → constants-8429b68f.js.map} +1 -1
- package/dist/esm/{constants-47e20524.js → constants-9177ea52.js} +3 -3
- package/dist/esm/{constants-47e20524.js.map → constants-9177ea52.js.map} +1 -1
- package/dist/esm/{constants-7307438d.js → constants-bc210662.js} +3 -3
- package/dist/esm/{constants-7307438d.js.map → constants-bc210662.js.map} +1 -1
- package/dist/esm/core.js +3 -3
- package/dist/esm/{form-472e078d.js → form-713f26fd.js} +7 -6
- package/dist/esm/form-713f26fd.js.map +1 -0
- package/dist/esm/gov-accordion-item.entry.js +13 -11
- package/dist/esm/gov-accordion-item.entry.js.map +1 -1
- package/dist/esm/gov-accordion.entry.js +6 -7
- package/dist/esm/gov-accordion.entry.js.map +1 -1
- package/dist/esm/gov-attachments_3.entry.js +13 -14
- package/dist/esm/gov-attachments_3.entry.js.map +1 -1
- package/dist/esm/gov-backdrop.entry.js +7 -8
- package/dist/esm/gov-backdrop.entry.js.map +1 -1
- package/dist/esm/gov-breadcrumbs.entry.js +7 -8
- package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
- package/dist/esm/gov-button.entry.js +12 -13
- package/dist/esm/gov-button.entry.js.map +1 -1
- package/dist/esm/gov-card.entry.js +7 -8
- package/dist/esm/gov-card.entry.js.map +1 -1
- package/dist/esm/gov-chip.entry.js +14 -15
- package/dist/esm/gov-chip.entry.js.map +1 -1
- package/dist/esm/gov-container.entry.js +3 -11
- package/dist/esm/gov-container.entry.js.map +1 -1
- package/dist/esm/gov-control-group.entry.js +7 -8
- package/dist/esm/gov-control-group.entry.js.map +1 -1
- package/dist/esm/gov-cookiebar.entry.js +3 -3
- package/dist/esm/gov-dialog.entry.js +7 -8
- package/dist/esm/gov-dialog.entry.js.map +1 -1
- package/dist/esm/gov-dropdown.entry.js +7 -7
- package/dist/esm/gov-empty.entry.js +7 -8
- package/dist/esm/gov-empty.entry.js.map +1 -1
- package/dist/esm/gov-error-code.entry.js +3 -3
- package/dist/esm/gov-flex_4.entry.js +332 -0
- package/dist/esm/gov-flex_4.entry.js.map +1 -0
- package/dist/esm/gov-form-autocomplete.entry.js +8 -10
- package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
- package/dist/esm/gov-form-checkbox-group.entry.js +8 -9
- package/dist/esm/gov-form-checkbox-group.entry.js.map +1 -1
- package/dist/esm/gov-form-checkbox.entry.js +12 -13
- package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
- package/dist/esm/gov-form-control.entry.js +10 -10
- package/dist/esm/gov-form-file.entry.js +16 -13
- package/dist/esm/gov-form-file.entry.js.map +1 -1
- package/dist/esm/gov-form-group.entry.js +7 -8
- package/dist/esm/gov-form-group.entry.js.map +1 -1
- package/dist/esm/gov-form-input_2.entry.js +17 -16
- package/dist/esm/gov-form-input_2.entry.js.map +1 -1
- package/dist/esm/gov-form-multi-select.entry.js +16 -32
- package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
- package/dist/esm/gov-form-password-power.entry.js +2 -2
- package/dist/esm/gov-form-radio-group.entry.js +8 -9
- package/dist/esm/gov-form-radio-group.entry.js.map +1 -1
- package/dist/esm/gov-form-radio.entry.js +11 -12
- package/dist/esm/gov-form-radio.entry.js.map +1 -1
- package/dist/esm/gov-form-search.entry.js +4 -4
- package/dist/esm/gov-form-select.entry.js +13 -14
- package/dist/esm/gov-form-select.entry.js.map +1 -1
- package/dist/esm/gov-form-switch.entry.js +12 -13
- package/dist/esm/gov-form-switch.entry.js.map +1 -1
- package/dist/esm/gov-grid-item.entry.js +3 -3
- package/dist/esm/gov-grid.entry.js +3 -3
- package/dist/esm/gov-infobar.entry.js +8 -9
- package/dist/esm/gov-infobar.entry.js.map +1 -1
- package/dist/esm/gov-layout-column.entry.js +3 -3
- package/dist/esm/gov-layout.entry.js +3 -3
- package/dist/esm/gov-lifecycle.entry.js +43 -0
- package/dist/esm/gov-lifecycle.entry.js.map +1 -0
- package/dist/esm/gov-link.entry.js +47 -0
- package/dist/esm/gov-link.entry.js.map +1 -0
- package/dist/esm/gov-loading.entry.js +6 -7
- package/dist/esm/gov-loading.entry.js.map +1 -1
- package/dist/esm/gov-message.entry.js +7 -8
- package/dist/esm/gov-message.entry.js.map +1 -1
- package/dist/esm/gov-pagination.entry.js +9 -10
- package/dist/esm/gov-pagination.entry.js.map +1 -1
- package/dist/esm/gov-spacer.entry.js +6 -7
- package/dist/esm/gov-spacer.entry.js.map +1 -1
- package/dist/esm/gov-stepper-item.entry.js +9 -10
- package/dist/esm/gov-stepper-item.entry.js.map +1 -1
- package/dist/esm/gov-stepper.entry.js +8 -9
- package/dist/esm/gov-stepper.entry.js.map +1 -1
- package/dist/esm/gov-tabs-item.entry.js +7 -7
- package/dist/esm/gov-tabs.entry.js +8 -9
- package/dist/esm/gov-tabs.entry.js.map +1 -1
- package/dist/esm/gov-tag.entry.js +12 -13
- package/dist/esm/gov-tag.entry.js.map +1 -1
- package/dist/esm/gov-tile.entry.js +4 -4
- package/dist/esm/gov-tile.entry.js.map +1 -1
- package/dist/esm/gov-tiles.entry.js +3 -3
- package/dist/esm/gov-toast.entry.js +11 -12
- package/dist/esm/gov-toast.entry.js.map +1 -1
- package/dist/esm/gov-tooltip-content.entry.js +6 -6
- package/dist/esm/gov-tooltip-content.entry.js.map +1 -1
- package/dist/esm/gov-tooltip.entry.js +10 -11
- package/dist/esm/gov-tooltip.entry.js.map +1 -1
- package/dist/esm/gov-wizard-item.entry.js +11 -12
- package/dist/esm/gov-wizard-item.entry.js.map +1 -1
- package/dist/esm/gov-wizard.entry.js +10 -11
- package/dist/esm/gov-wizard.entry.js.map +1 -1
- package/dist/esm/{win-cec370ad.js → gov.log-6b64cda6.js} +17 -3
- package/dist/esm/gov.log-6b64cda6.js.map +1 -0
- package/dist/esm/{index-d8b4eb6c.js → index-c263e031.js} +20 -12
- package/dist/esm/index-c263e031.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{props-c82e1abf.js → props-9d3c7ac1.js} +2 -2
- package/dist/esm/{props-c82e1abf.js.map → props-9d3c7ac1.js.map} +1 -1
- package/dist/esm/{string.utils-5ce3f551.js → string.utils-1da8f8fb.js} +2 -2
- package/dist/esm/string.utils-1da8f8fb.js.map +1 -0
- package/dist/esm/{template-3d84d705.js → template-7ecee4d1.js} +2 -20
- package/dist/esm/template-7ecee4d1.js.map +1 -0
- package/dist/esm/{utils-2b4ef320.js → utils-e10e994d.js} +2 -2
- package/dist/esm/{utils-2b4ef320.js.map → utils-e10e994d.js.map} +1 -1
- package/dist/esm/{wcag-fa5ce56c.js → wcag-253a4421.js} +3 -4
- package/dist/esm/wcag-253a4421.js.map +1 -0
- package/dist/hydrate/index.js +431 -10072
- package/dist/hydrate/index.mjs +431 -10072
- package/dist/stencil.config.js +9 -6
- package/dist/stencil.config.js.map +1 -1
- package/dist/types/components/gov-accordion/gov-accordion-item.d.ts +1 -0
- package/dist/types/components/gov-button/button/gov-button.d.ts +1 -1
- package/dist/types/components/gov-chip/gov-chip.d.ts +3 -3
- package/dist/types/components/gov-container/gov-container.d.ts +0 -6
- package/dist/types/components/gov-flex/constants.d.ts +3 -0
- package/dist/types/components/gov-flex/gov-flex.d.ts +33 -0
- package/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +0 -4
- package/dist/types/components/gov-form/file/gov-form-file.d.ts +1 -4
- package/dist/types/components/gov-form/input/constants.d.ts +1 -0
- package/dist/types/components/gov-form/multiselect/gov-form-multi-select.d.ts +0 -2
- package/dist/types/components/gov-form/switch/constants.d.ts +1 -1
- package/dist/types/components/gov-icon/constants.d.ts +4 -1
- package/dist/types/components/gov-icon/gov-icon.d.ts +8 -3
- package/dist/types/components/gov-icon/list.d.ts +1 -1
- package/dist/types/components/gov-lifecycle-tester/gov-lifecycle-tester.d.ts +14 -0
- package/dist/types/components/gov-link/constants.d.ts +7 -0
- package/dist/types/components/gov-link/gov-link.d.ts +30 -0
- package/dist/types/components/gov-tag/gov-tag.d.ts +2 -2
- package/dist/types/components/gov-theme-switch/constants.d.ts +9 -0
- package/dist/types/components/gov-theme-switch/gov-theme-switch.d.ts +26 -2
- package/dist/types/components/gov-tile/gov-tile.d.ts +1 -1
- package/dist/types/components/gov-toast/constants.d.ts +1 -0
- package/dist/types/components.d.ts +191 -50
- package/dist/types/core/constants/colors.d.ts +6 -8
- package/dist/types/helpers/Dom/document.d.ts +4 -0
- package/dist/types/helpers/Dom/template.d.ts +0 -1
- package/dist/types/helpers/Dom/template.types.d.ts +0 -1
- package/dist/types/utils/string.utils.d.ts +1 -0
- package/package.json +4 -4
- package/dist/cjs/colors-976f6dff.js.map +0 -1
- package/dist/cjs/form-c1aec07a.js.map +0 -1
- package/dist/cjs/gov-app_2.cjs.entry.js +0 -9891
- package/dist/cjs/gov-app_2.cjs.entry.js.map +0 -1
- package/dist/cjs/gov-form-label.cjs.entry.js +0 -27
- package/dist/cjs/gov-form-label.cjs.entry.js.map +0 -1
- package/dist/cjs/gov-icon.cjs.entry.js +0 -161
- package/dist/cjs/gov-icon.cjs.entry.js.map +0 -1
- package/dist/cjs/gov.log-1e8bab6e.js +0 -21
- package/dist/cjs/gov.log-1e8bab6e.js.map +0 -1
- package/dist/cjs/index-1af4880c.js.map +0 -1
- package/dist/cjs/string.utils-2335838f.js.map +0 -1
- package/dist/cjs/template-b070338f.js.map +0 -1
- package/dist/cjs/wcag-31089f70.js.map +0 -1
- package/dist/cjs/win-587f4614.js.map +0 -1
- package/dist/collection/components/gov-app/gov-app.css +0 -68
- package/dist/collection/components/gov-app/gov-app.js +0 -93
- package/dist/collection/components/gov-app/gov-app.js.map +0 -1
- package/dist/components/gov-app.js +0 -2
- package/dist/components/gov-app.js.map +0 -1
- package/dist/components/p-0075138f.js +0 -2
- package/dist/components/p-0075138f.js.map +0 -1
- package/dist/components/p-08621bdf.js +0 -2
- package/dist/components/p-1366ed8d.js +0 -2
- package/dist/components/p-19c681a3.js +0 -2
- package/dist/components/p-1a0b3b4f.js +0 -2
- package/dist/components/p-1a0b3b4f.js.map +0 -1
- package/dist/components/p-255d0471.js +0 -2
- package/dist/components/p-255d0471.js.map +0 -1
- package/dist/components/p-565120d5.js +0 -2
- package/dist/components/p-736e4917.js +0 -2
- package/dist/components/p-7501abe8.js +0 -2
- package/dist/components/p-7501abe8.js.map +0 -1
- package/dist/components/p-778e3fff.js +0 -2
- package/dist/components/p-778e3fff.js.map +0 -1
- package/dist/components/p-7fd16831.js +0 -2
- package/dist/components/p-7fd16831.js.map +0 -1
- package/dist/components/p-95d41a3b.js.map +0 -1
- package/dist/components/p-9a93146e.js +0 -2
- package/dist/components/p-ae3dada7.js.map +0 -1
- package/dist/components/p-ae7e6127.js +0 -2
- package/dist/components/p-cc90a508.js +0 -2
- package/dist/components/p-cc90a508.js.map +0 -1
- package/dist/components/p-d5f25595.js +0 -2
- package/dist/components/p-d5f25595.js.map +0 -1
- package/dist/components/p-dbae2385.js +0 -2
- package/dist/components/p-dcaf0383.js +0 -2
- package/dist/components/p-dcaf0383.js.map +0 -1
- package/dist/components/p-e183a7c7.js +0 -2
- package/dist/components/p-e3aeaca0.js +0 -2
- package/dist/components/p-e3aeaca0.js.map +0 -1
- package/dist/components/p-edd1417b.js +0 -2
- package/dist/core/p-006e52f1.entry.js +0 -2
- package/dist/core/p-006e52f1.entry.js.map +0 -1
- package/dist/core/p-0075138f.js +0 -2
- package/dist/core/p-0075138f.js.map +0 -1
- package/dist/core/p-023787b3.entry.js +0 -2
- package/dist/core/p-023787b3.entry.js.map +0 -1
- package/dist/core/p-052cc573.js +0 -2
- package/dist/core/p-0a952b3c.entry.js +0 -2
- package/dist/core/p-0a952b3c.entry.js.map +0 -1
- package/dist/core/p-0ebc8365.entry.js +0 -2
- package/dist/core/p-0ebc8365.entry.js.map +0 -1
- package/dist/core/p-169b67af.js +0 -2
- package/dist/core/p-17015e36.entry.js +0 -2
- package/dist/core/p-182189d2.entry.js +0 -2
- package/dist/core/p-2614044c.js +0 -2
- package/dist/core/p-28a7d3f7.js +0 -2
- package/dist/core/p-2ed3afef.entry.js +0 -2
- package/dist/core/p-2effdd60.entry.js +0 -2
- package/dist/core/p-2effdd60.entry.js.map +0 -1
- package/dist/core/p-35e66bef.entry.js +0 -2
- package/dist/core/p-35e66bef.entry.js.map +0 -1
- package/dist/core/p-3f2b803c.entry.js +0 -2
- package/dist/core/p-477a5027.entry.js +0 -2
- package/dist/core/p-477a5027.entry.js.map +0 -1
- package/dist/core/p-47e364bb.entry.js +0 -2
- package/dist/core/p-47e364bb.entry.js.map +0 -1
- package/dist/core/p-4bce896c.js +0 -2
- package/dist/core/p-5c88f415.entry.js +0 -2
- package/dist/core/p-5c88f415.entry.js.map +0 -1
- package/dist/core/p-5dc0af54.entry.js +0 -2
- package/dist/core/p-5dc0af54.entry.js.map +0 -1
- package/dist/core/p-5dcbfca3.entry.js +0 -2
- package/dist/core/p-663d3db2.entry.js +0 -2
- package/dist/core/p-69d56f17.js +0 -2
- package/dist/core/p-6aa40794.js +0 -2
- package/dist/core/p-6b42a387.entry.js +0 -2
- package/dist/core/p-6d772ff9.entry.js +0 -2
- package/dist/core/p-6ed147a6.entry.js +0 -2
- package/dist/core/p-6ed147a6.entry.js.map +0 -1
- package/dist/core/p-7cf554e6.entry.js +0 -2
- package/dist/core/p-81b0848c.entry.js +0 -2
- package/dist/core/p-81b0848c.entry.js.map +0 -1
- package/dist/core/p-83039b10.entry.js +0 -2
- package/dist/core/p-904de5e6.entry.js +0 -2
- package/dist/core/p-904de5e6.entry.js.map +0 -1
- package/dist/core/p-91a9cd24.entry.js +0 -2
- package/dist/core/p-95d41a3b.js.map +0 -1
- package/dist/core/p-963f9fcd.entry.js +0 -2
- package/dist/core/p-9b41ac88.entry.js +0 -2
- package/dist/core/p-9d0f20ec.entry.js +0 -2
- package/dist/core/p-9d0f20ec.entry.js.map +0 -1
- package/dist/core/p-9dde00d8.entry.js +0 -2
- package/dist/core/p-9dde00d8.entry.js.map +0 -1
- package/dist/core/p-9ff8f059.entry.js +0 -2
- package/dist/core/p-a16229c6.entry.js +0 -2
- package/dist/core/p-a16229c6.entry.js.map +0 -1
- package/dist/core/p-a1e95a5f.js.map +0 -1
- package/dist/core/p-a1ebb4da.entry.js +0 -2
- package/dist/core/p-a1ebb4da.entry.js.map +0 -1
- package/dist/core/p-a21dc94f.js +0 -2
- package/dist/core/p-a53a277a.entry.js +0 -2
- package/dist/core/p-a5489b0e.entry.js +0 -2
- package/dist/core/p-a54f1db9.entry.js +0 -2
- package/dist/core/p-a693ffbf.js +0 -2
- package/dist/core/p-a693ffbf.js.map +0 -1
- package/dist/core/p-aa8adc45.entry.js +0 -2
- package/dist/core/p-ab9ae7ba.entry.js +0 -2
- package/dist/core/p-b3acb156.entry.js +0 -2
- package/dist/core/p-b48a4aa0.js +0 -2
- package/dist/core/p-b48a4aa0.js.map +0 -1
- package/dist/core/p-b55fc943.entry.js +0 -2
- package/dist/core/p-b838bb27.entry.js +0 -2
- package/dist/core/p-c214c202.entry.js +0 -2
- package/dist/core/p-c214c202.entry.js.map +0 -1
- package/dist/core/p-c4c7cb24.entry.js +0 -2
- package/dist/core/p-d2351924.entry.js +0 -2
- package/dist/core/p-db940455.entry.js +0 -2
- package/dist/core/p-dc3fab19.entry.js +0 -2
- package/dist/core/p-e0d428c9.js +0 -2
- package/dist/core/p-e0d428c9.js.map +0 -1
- package/dist/core/p-e134b123.entry.js +0 -2
- package/dist/core/p-e3aeaca0.js +0 -2
- package/dist/core/p-e3aeaca0.js.map +0 -1
- package/dist/core/p-e4978aab.entry.js +0 -2
- package/dist/core/p-edc05eff.entry.js +0 -2
- package/dist/core/p-edc05eff.entry.js.map +0 -1
- package/dist/core/p-eeb9cb73.entry.js +0 -2
- package/dist/core/p-f141ad5e.entry.js +0 -2
- package/dist/core/p-f1be099b.entry.js +0 -2
- package/dist/core/p-f456bd71.entry.js +0 -2
- package/dist/core/p-fa7caad6.entry.js +0 -2
- package/dist/core/p-fa7caad6.entry.js.map +0 -1
- package/dist/core/p-fc90bf06.entry.js +0 -2
- package/dist/core/p-fc90bf06.entry.js.map +0 -1
- package/dist/esm/colors-02c1ea96.js.map +0 -1
- package/dist/esm/form-472e078d.js.map +0 -1
- package/dist/esm/gov-app_2.entry.js +0 -9886
- package/dist/esm/gov-app_2.entry.js.map +0 -1
- package/dist/esm/gov-form-label.entry.js +0 -23
- package/dist/esm/gov-form-label.entry.js.map +0 -1
- package/dist/esm/gov-icon.entry.js +0 -157
- package/dist/esm/gov-icon.entry.js.map +0 -1
- package/dist/esm/gov.log-6e9faad2.js +0 -19
- package/dist/esm/gov.log-6e9faad2.js.map +0 -1
- package/dist/esm/index-d8b4eb6c.js.map +0 -1
- package/dist/esm/string.utils-5ce3f551.js.map +0 -1
- package/dist/esm/template-3d84d705.js.map +0 -1
- package/dist/esm/wcag-fa5ce56c.js.map +0 -1
- package/dist/esm/win-cec370ad.js.map +0 -1
- package/dist/types/components/gov-app/gov-app.d.ts +0 -37
- /package/dist/components/{p-19c681a3.js.map → p-0b3574c2.js.map} +0 -0
- /package/dist/components/{p-08621bdf.js.map → p-44a8a668.js.map} +0 -0
- /package/dist/components/{p-736e4917.js.map → p-73938936.js.map} +0 -0
- /package/dist/components/{p-565120d5.js.map → p-76d604c6.js.map} +0 -0
- /package/dist/components/{p-e183a7c7.js.map → p-7be2301a.js.map} +0 -0
- /package/dist/components/{p-edd1417b.js.map → p-7f3becc5.js.map} +0 -0
- /package/dist/components/{p-7f8a24a7.js.map → p-860520b0.js.map} +0 -0
- /package/dist/components/{p-59737af9.js.map → p-a521c59a.js.map} +0 -0
- /package/dist/components/{p-ae7e6127.js.map → p-a6b7a6c2.js.map} +0 -0
- /package/dist/components/{p-6e19816b.js.map → p-ac359044.js.map} +0 -0
- /package/dist/components/{p-0c93dd39.js.map → p-c61a5830.js.map} +0 -0
- /package/dist/core/{p-a54f1db9.entry.js.map → p-00d153bf.entry.js.map} +0 -0
- /package/dist/core/{p-169b67af.js.map → p-0b3574c2.js.map} +0 -0
- /package/dist/core/{p-3f2b803c.entry.js.map → p-0be19b89.entry.js.map} +0 -0
- /package/dist/core/{p-f141ad5e.entry.js.map → p-22fa411d.entry.js.map} +0 -0
- /package/dist/core/{p-b838bb27.entry.js.map → p-30eaeeec.entry.js.map} +0 -0
- /package/dist/core/{p-69d56f17.js.map → p-3bbb77a0.js.map} +0 -0
- /package/dist/core/{p-6b42a387.entry.js.map → p-535316b4.entry.js.map} +0 -0
- /package/dist/core/{p-91a9cd24.entry.js.map → p-5396935e.entry.js.map} +0 -0
- /package/dist/core/{p-42d9924c.js.map → p-56efd4a2.js.map} +0 -0
- /package/dist/core/{p-e134b123.entry.js.map → p-5b2131c1.entry.js.map} +0 -0
- /package/dist/core/{p-60658ae9.js.map → p-5f1000da.js.map} +0 -0
- /package/dist/core/{p-c4c7cb24.entry.js.map → p-7b7e502b.entry.js.map} +0 -0
- /package/dist/core/{p-2614044c.js.map → p-7ba4daf4.js.map} +0 -0
- /package/dist/core/{p-6aa40794.js.map → p-7f3becc5.js.map} +0 -0
- /package/dist/core/{p-e9a6cd71.js.map → p-860520b0.js.map} +0 -0
- /package/dist/core/{p-4bce896c.js.map → p-a521c59a.js.map} +0 -0
- /package/dist/core/{p-c990d746.js.map → p-c61a5830.js.map} +0 -0
- /package/dist/core/{p-45a30859.js.map → p-e0e2e9c1.js.map} +0 -0
- /package/dist/core/{p-052cc573.js.map → p-e44a0fee.js.map} +0 -0
package/dist/core/core.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as i,b as a}from"./p-a1e95a5f.js";export{s as setNonce}from"./p-a1e95a5f.js";import{g as l}from"./p-e1255160.js";var t=()=>{{o(i.prototype)}const a=import.meta.url;const l={};if(a!==""){l.resourcesUrl=new URL(".",a).href}return e(l)};var o=e=>{const i=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return i.call(this,e)}const a=i.call(this,false);const l=this.childNodes;if(e){for(let e=0;e<l.length;e++){if(l[e].nodeType!==2){a.appendChild(l[e].cloneNode(true))}}}return a}};t().then((async e=>{await l();return a(JSON.parse('[["p-edc05eff",[[4,"gov-form-file",{"expanded":[4],"required":[4],"disabled":[4],"resetAfterPick":[4,"reset-after-pick"],"ignoreFileDuplicationCheck":[4,"ignore-file-duplication-check"],"displayAttachments":[4,"display-attachments"],"name":[1],"accept":[1],"multiple":[4],"maxFileSize":[2,"max-file-size"],"identifier":[1],"invalid":[4],"errorSize":[1,"error-size"],"errorAccept":[1,"error-accept"],"attachmentsLabel":[1,"attachments-label"],"accessibleRemoveLabel":[1,"accessible-remove-label"],"accessibleAttachmentsLabel":[1,"accessible-attachments-label"],"files":[32],"inheritedAttributes":[32],"getRef":[64],"getAreaRef":[64],"reset":[64]},null,{"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"]}]]],["p-6ed147a6",[[4,"gov-form-multi-select",{"value":[1537],"options":[1537],"identifier":[1],"placeholder":[1],"size":[1],"name":[1],"hideSelectedList":[4,"hide-selected-list"],"required":[4],"disabled":[4],"invalid":[4],"success":[4],"messageEmpty":[1,"message-empty"],"messageLoading":[1,"message-loading"],"focused":[32],"valueState":[32],"selectedOptionsState":[32],"optionsState":[32],"inheritedAttributes":[32],"setFocus":[64],"setValue":[64],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"options":["watchOptions"],"value":["watchValue"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"],"success":["watchControlAttrs"]}]]],["p-f456bd71",[[4,"gov-dialog",{"open":[1540],"blockClose":[4,"block-close"],"blockBackdropClose":[4,"block-backdrop-close"],"role":[1],"labelTag":[1,"label-tag"],"accessibleLabelledBy":[1,"accessible-labelled-by"],"accessibleDescribedBy":[1,"accessible-described-by"],"accessibleCloseLabel":[1,"accessible-close-label"],"accessibleCloseLabelledBy":[1,"accessible-close-labelled-by"],"setFocus":[64],"validateAccessibility":[64]},null,{"open":["watchOpen"]}]]],["p-dc3fab19",[[0,"gov-pagination",{"type":[1],"current":[2],"total":[2],"selectIdentifier":[1,"select-identifier"],"size":[1],"color":[1],"pageSize":[2,"page-size"],"maxPages":[2,"max-pages"],"link":[1],"accessibleSelectLabel":[1,"accessible-select-label"],"accessiblePageLabel":[1,"accessible-page-label"],"labelPrev":[1,"label-prev"],"labelStart":[1,"label-start"],"labelNext":[1,"label-next"],"labelEnd":[1,"label-end"],"pagination":[32],"inheritedAttributes":[32]},null,{"type":["validateType"],"size":["validateSize"],"color":["validateColor"],"current":["recalculate"],"total":["recalculate"],"pageSize":["recalculate"],"maxPages":["recalculate"]}]]],["p-b55fc943",[[4,"gov-breadcrumbs",{"collapsible":[4],"isExpanded":[4,"is-expanded"],"accessibleLabel":[1,"accessible-label"],"accessibleLabelledBy":[1,"accessible-labelledby"],"accessibleToggleLabel":[1,"accessible-toggle-label"],"expanded":[32],"toggleOption":[32],"validateAccessibility":[64]}]]],["p-7cf554e6",[[4,"gov-infobar",{"color":[1],"type":[1],"role":[1],"accessibleCloseLabel":[1,"accessible-close-label"],"accessibleToggleLabel":[1,"accessible-toggle-label"],"closable":[4],"toggleContent":[32],"inheritedAttributes":[32]},null,{"color":["validateColor"]}]]],["p-a1ebb4da",[[4,"gov-loading",{"size":[1]},null,{"size":["validateSize"]}]]],["p-0a952b3c",[[4,"gov-tabs",{"type":[1],"size":[1],"color":[1],"orientation":[1],"direction":[513],"controllers":[32],"focusIndex":[32],"inheritedAttributes":[32],"refresh":[64],"currentTab":[64],"setActiveTab":[64],"rerender":[64]},null,{"type":["validateType"],"color":["validateColor"],"size":["validateSize"]}]]],["p-c214c202",[[4,"gov-toast",{"color":[1],"gravity":[1],"position":[1],"type":[1],"time":[2],"closeLabel":[1,"close-label"],"accessibleCloseLabel":[1,"accessible-close-label"],"inheritedAttributes":[32],"destroy":[64]},null,{"color":["validateColor"]}]]],["p-aa8adc45",[[4,"gov-tooltip-content",{"color":[1],"size":[1],"persist":[4],"isVisible":[1028,"is-visible"],"parentId":[1,"parent-id"]},null,{"isVisible":["visibleContent"]}]]],["p-023787b3",[[4,"gov-accordion-item",{"identifier":[1],"size":[1],"disabled":[4],"open":[1028],"openState":[32],"toggle":[64],"currentState":[64]},null,{"size":["validateSize"]}]]],["p-904de5e6",[[4,"gov-card",{"promotion":[4],"collapsible":[4],"open":[1540],"accessibleTriggerLabel":[1,"accessible-label"],"accessibleTriggerLabelledBy":[1,"accessible-labelledby"],"validateAccessibility":[64]}]]],["p-0ebc8365",[[4,"gov-form-checkbox",{"value":[1],"checked":[1540],"required":[4],"disabled":[4],"indeterminate":[516],"name":[1],"size":[1],"identifier":[1],"noLabel":[4,"no-label"],"invalid":[4],"inheritedAttributes":[32],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"]}]]],["p-35e66bef",[[4,"gov-form-switch",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"inheritedAttributes":[32],"getRef":[64]},null,{"size":["validateSize","watchDisabled"],"disabled":["watchDisabled"],"invalid":["watchDisabled"]}]]],["p-2effdd60",[[4,"gov-tag",{"iconLeft":[1,"icon-left"],"iconRight":[1,"icon-right"],"size":[513],"color":[513],"type":[513]},null,{"color":["validateColor"],"size":["validateSize"]}]]],["p-9dde00d8",[[4,"gov-tile",{"size":[513],"orientation":[1],"noBorder":[4,"no-border"],"href":[513],"target":[1],"getTriggerRef":[64]}]]],["p-5dc0af54",[[4,"gov-wizard-item",{"color":[1],"size":[1],"identifier":[1],"collapsible":[4],"disabled":[4],"isExpanded":[1028,"is-expanded"],"open":[64],"close":[64],"toggle":[64],"currentState":[64]},null,{"color":["validateColor"]}]]],["p-477a5027",[[0,"gov-app"],[0,"gov-theme-switch",{"theme":[32]}]]],["p-9b41ac88",[[4,"gov-accordion",{"size":[1],"noBorder":[4,"no-border"]},null,{"size":["validateSize"]}]]],["p-006e52f1",[[4,"gov-container",{"slottedChildren":[64]}]]],["p-5dcbfca3",[[4,"gov-control-group",{"color":[1],"noBorder":[4,"no-border"],"fitContent":[4,"fit-content"]},null,{"color":["validateColor"]}]]],["p-e134b123",[[4,"gov-cookiebar"]]],["p-a5489b0e",[[4,"gov-dropdown",{"identifier":[1],"open":[1028],"position":[1],"getState":[64],"toggle":[64]},null,{"open":["watchOpen"]}]]],["p-17015e36",[[4,"gov-empty",{"size":[1]},null,{"size":["validateSize"]}]]],["p-91a9cd24",[[4,"gov-error-code"]]],["p-f1be099b",[[4,"gov-form-checkbox-group",{"gap":[1],"orientation":[1],"value":[1025]},null,{"gap":["validateGap"],"orientation":["validateOrientation"]}]]],["p-6b42a387",[[4,"gov-form-control",{"identifier":[1],"invalid":[516],"disabled":[516],"success":[516],"fieldset":[4],"size":[1]}]]],["p-9ff8f059",[[4,"gov-form-group",{"gap":[1],"orientation":[1]},null,{"gap":["validateGap"],"orientation":["validateOrientation"]}]]],["p-47e364bb",[[4,"gov-form-label",{"identifier":[1],"size":[1],"required":[4],"legend":[4]}]]],["p-f141ad5e",[[4,"gov-form-password-power",{"power":[514]}]]],["p-9d0f20ec",[[4,"gov-form-radio",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"inheritedAttributes":[32],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"]}]]],["p-d2351924",[[4,"gov-form-radio-group",{"gap":[1],"orientation":[1],"value":[1025]},null,{"gap":["validateGap"],"orientation":["validateOrientation"]}]]],["p-eeb9cb73",[[4,"gov-form-search",{"size":[1],"color":[513]}]]],["p-a54f1db9",[[4,"gov-grid",{"alignX":[1,"align-x"],"alignY":[1,"align-y"]}]]],["p-83039b10",[[4,"gov-grid-item",{"size":[1],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]}]]],["p-a53a277a",[[4,"gov-layout",{"type":[1],"variant":[1],"inverse":[4]}]]],["p-b838bb27",[[4,"gov-layout-column"]]],["p-b3acb156",[[4,"gov-message",{"color":[1],"type":[1]},null,{"color":["validateColor"]}]]],["p-182189d2",[[0,"gov-spacer",{"size":[1],"breakpoint":[1]},null,{"size":["validateSize"],"breakpoint":["validateBreakpoint"]}]]],["p-2ed3afef",[[4,"gov-stepper",{"size":[1]},null,{"size":["validateSize"]}]]],["p-e4978aab",[[4,"gov-stepper-item",{"color":[1],"size":[1],"identifier":[1]},null,{"color":["validateColor"]}]]],["p-3f2b803c",[[4,"gov-tabs-item",{"identifier":[1],"triggerIdentifier":[1,"trigger-identifier"],"label":[513],"disabled":[516],"iconStart":[513,"icon-start"],"iconEnd":[513,"icon-end"],"default":[4],"isActive":[32],"getIdentifier":[64],"getTriggerIdentifier":[64],"getDisableState":[64],"setActiveStatus":[64]},null,{"label":["rerenderParent"],"disabled":["rerenderParent"]}]]],["p-c4c7cb24",[[4,"gov-tiles",{"columns":[514]}]]],["p-db940455",[[4,"gov-tooltip",{"color":[1],"size":[1],"position":[1025],"message":[1],"identifier":[1],"icon":[516],"persist":[32],"show":[64],"hide":[64]},null,{"color":["validateColor"],"size":["validateSize"],"position":["validatePosition"],"message":["rerenderMessage"]}]]],["p-963f9fcd",[[4,"gov-wizard",{"size":[1],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]},null,{"size":["validateSize"]}]]],["p-a16229c6",[[0,"gov-icon",{"color":[513],"name":[513],"type":[513],"visible":[32],"error":[32]},null,{"color":["validateColor"],"name":["loadIconPathData"]}]]],["p-ab9ae7ba",[[4,"gov-button",{"color":[513],"size":[513],"type":[513],"expanded":[516],"name":[1],"disabled":[516],"nativeType":[1,"native-type"],"href":[1],"target":[1],"download":[4],"hreflang":[1],"referrerpolicy":[1],"rel":[1],"loading":[1],"focusable":[4],"identifier":[1],"inheritedAttributes":[32],"setFocus":[64],"getRef":[64],"validateAccessibility":[64]},null,{"color":["validateColor"],"type":["validateType"],"size":["validateSize"],"nativeType":["validateNativeType"]}]]],["p-fc90bf06",[[4,"gov-form-autocomplete",{"value":[1537],"options":[1537],"identifier":[1],"success":[4],"size":[1],"nameKey":[1,"name-key"],"name":[1],"required":[4],"disabled":[4],"placeholder":[1],"readonly":[4],"invalid":[4],"minlength":[2],"maxlength":[2],"throttleTime":[2,"throttle-time"],"messageEmpty":[1,"message-empty"],"messageLoading":[1,"message-loading"],"focused":[32],"processing":[32],"arrowCounter":[32],"list":[32],"inheritedAttributes":[32],"setFocus":[64],"setBlur":[64],"setOptions":[64],"clearValue":[64],"setProcessing":[64],"setSearchCallback":[64],"setTemplateResolver":[64]},null,{"size":["validateSize"],"options":["watchOptions"]}]]],["p-81b0848c",[[4,"gov-chip",{"disabled":[516],"href":[1],"target":[1],"iconLeft":[1,"icon-left"],"iconRight":[1,"icon-right"],"size":[1],"tag":[1],"color":[1],"type":[513],"focusable":[4],"identifier":[1],"inheritedAttributes":[32],"geRef":[64],"setFocus":[64]},null,{"color":["validateColor"],"size":["validateSize"]}]]],["p-fa7caad6",[[4,"gov-form-select",{"value":[1537],"options":[1537],"identifier":[1],"size":[1],"name":[1],"required":[4],"success":[4],"disabled":[4],"invalid":[4],"focused":[32],"optionsState":[32],"inheritedAttributes":[32],"setFocus":[64],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"options":["watchOptions"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"],"success":["watchControlAttrs"],"value":["watchValue"]}]]],["p-663d3db2",[[0,"gov-backdrop",{"inverse":[4],"disabled":[1540],"accessibleLabel":[1,"accessible-label"],"accessibleLabelledBy":[1,"accessible-labelledby"],"validateAccessibility":[64]}]]],["p-6d772ff9",[[4,"gov-attachments-item",{"accessibleRemoveLabel":[1,"accessible-remove-label"],"accessibleRemoveLabelledBy":[1,"accessible-remove-labelledby"],"validateAccessibility":[64]}],[4,"gov-attachments",{"label":[1],"wcagLabel":[1,"wcag-label"],"validateWcag":[64]}],[4,"gov-form-message",{"color":[1],"size":[1],"identifier":[64]},null,{"color":["validateColor"]}]]],["p-5c88f415",[[4,"gov-form-input",{"value":[1537],"identifier":[1],"success":[516],"size":[1],"name":[1],"multiline":[4],"rows":[2],"cols":[2],"required":[516],"disabled":[516],"placeholder":[1],"readonly":[4],"minlength":[2],"maxlength":[2],"min":[8],"max":[8],"autocomplete":[4],"autocorrect":[4],"spellcheck":[4],"inputLang":[1,"input-lang"],"type":[1],"inputType":[1,"input-type"],"role":[1],"invalid":[516],"accessibleShowPasswordLabel":[1,"accessible-show-password-label"],"accessibleHidePasswordLabel":[1,"accessible-hide-password-label"],"focused":[32],"showPassword":[32],"inheritedAttributes":[32],"setFocus":[64],"setValue":[64],"clearValue":[64],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"],"success":["watchControlAttrs"]}],[0,"gov-skeleton",{"size":[1],"color":[1],"shape":[1],"width":[1],"height":[1],"animation":[1],"inheritedAttributes":[32]},null,{"size":["validateSize"],"shape":["validateShape"],"animation":["validateAnimation"]}]]]]'),e)}));
|
|
1
|
+
import{p as e,H as i,b as l}from"./p-8506b611.js";export{s as setNonce}from"./p-8506b611.js";import{g as a}from"./p-e1255160.js";var t=()=>{{o(i.prototype)}const l=import.meta.url;const a={};if(l!==""){a.resourcesUrl=new URL(".",l).href}return e(a)};var o=e=>{const i=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return i.call(this,e)}const l=i.call(this,false);const a=this.childNodes;if(e){for(let e=0;e<a.length;e++){if(a[e].nodeType!==2){l.appendChild(a[e].cloneNode(true))}}}return l}};t().then((async e=>{await a();return l(JSON.parse('[["p-432c3875",[[4,"gov-form-file",{"expanded":[4],"required":[4],"disabled":[516],"resetAfterPick":[4,"reset-after-pick"],"ignoreFileDuplicationCheck":[4,"ignore-file-duplication-check"],"displayAttachments":[4,"display-attachments"],"name":[1],"accept":[1],"multiple":[4],"maxFileSize":[2,"max-file-size"],"identifier":[1],"invalid":[4],"errorSize":[1,"error-size"],"errorAccept":[1,"error-accept"],"accessibleRemoveLabel":[1,"accessible-remove-label"],"accessibleAttachmentsLabel":[1,"accessible-attachments-label"],"files":[32],"inheritedAttributes":[32],"getRef":[64],"getAreaRef":[64],"reset":[64]},null,{"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"]}]]],["p-c916d0d2",[[4,"gov-form-multi-select",{"value":[1537],"options":[1537],"identifier":[1],"placeholder":[1],"size":[1],"name":[1],"hideSelectedList":[4,"hide-selected-list"],"required":[4],"disabled":[516],"invalid":[516],"success":[4],"messageEmpty":[1,"message-empty"],"messageLoading":[1,"message-loading"],"focused":[32],"valueState":[32],"selectedOptionsState":[32],"optionsState":[32],"inheritedAttributes":[32],"setFocus":[64],"setValue":[64],"getRef":[64]},null,{"size":["validateSize"],"options":["watchOptions"],"value":["watchValue"]}]]],["p-5c9e6275",[[4,"gov-dialog",{"open":[1540],"blockClose":[4,"block-close"],"blockBackdropClose":[4,"block-backdrop-close"],"role":[1],"labelTag":[1,"label-tag"],"accessibleLabelledBy":[1,"accessible-labelled-by"],"accessibleDescribedBy":[1,"accessible-described-by"],"accessibleCloseLabel":[1,"accessible-close-label"],"accessibleCloseLabelledBy":[1,"accessible-close-labelled-by"],"setFocus":[64],"validateAccessibility":[64]},null,{"open":["watchOpen"]}]]],["p-561718cd",[[0,"gov-pagination",{"type":[1],"current":[2],"total":[2],"selectIdentifier":[1,"select-identifier"],"size":[1],"color":[1],"pageSize":[2,"page-size"],"maxPages":[2,"max-pages"],"link":[1],"accessibleSelectLabel":[1,"accessible-select-label"],"accessiblePageLabel":[1,"accessible-page-label"],"labelPrev":[1,"label-prev"],"labelStart":[1,"label-start"],"labelNext":[1,"label-next"],"labelEnd":[1,"label-end"],"pagination":[32],"inheritedAttributes":[32]},null,{"type":["validateType"],"size":["validateSize"],"color":["validateColor"],"current":["recalculate"],"total":["recalculate"],"pageSize":["recalculate"],"maxPages":["recalculate"]}]]],["p-d836fcde",[[4,"gov-breadcrumbs",{"collapsible":[4],"isExpanded":[4,"is-expanded"],"accessibleLabel":[1,"accessible-label"],"accessibleLabelledBy":[1,"accessible-labelledby"],"accessibleToggleLabel":[1,"accessible-toggle-label"],"expanded":[32],"toggleOption":[32],"validateAccessibility":[64]}]]],["p-0fdd8929",[[4,"gov-infobar",{"color":[1],"type":[1],"role":[1],"accessibleCloseLabel":[1,"accessible-close-label"],"accessibleToggleLabel":[1,"accessible-toggle-label"],"closable":[4],"toggleContent":[32],"inheritedAttributes":[32]},null,{"color":["validateColor"]}]]],["p-ea44d447",[[4,"gov-loading",{"size":[1]},null,{"size":["validateSize"]}]]],["p-2739fa61",[[4,"gov-tabs",{"type":[1],"size":[1],"color":[1],"orientation":[1],"direction":[513],"controllers":[32],"focusIndex":[32],"inheritedAttributes":[32],"refresh":[64],"currentTab":[64],"setActiveTab":[64],"rerender":[64]},null,{"type":["validateType"],"color":["validateColor"],"size":["validateSize"]}]]],["p-ccec8019",[[4,"gov-toast",{"color":[1],"gravity":[1],"position":[1],"type":[1],"time":[2],"closeLabel":[1,"close-label"],"accessibleCloseLabel":[1,"accessible-close-label"],"inheritedAttributes":[32],"destroy":[64]},null,{"color":["validateColor"]}]]],["p-d65cef62",[[4,"gov-tooltip-content",{"color":[1],"size":[1],"persist":[4],"isVisible":[1028,"is-visible"],"parentId":[1,"parent-id"]},null,{"isVisible":["visibleContent"]}]]],["p-9fe35463",[[4,"gov-accordion-item",{"identifier":[1],"size":[1025],"disabled":[4],"open":[1028],"openState":[32],"toggle":[64],"currentState":[64]},null,{"size":["validateSize"]}]]],["p-9c2c5447",[[4,"gov-card",{"promotion":[4],"collapsible":[4],"open":[1540],"accessibleTriggerLabel":[1,"accessible-label"],"accessibleTriggerLabelledBy":[1,"accessible-labelledby"],"validateAccessibility":[64]}]]],["p-ed833334",[[4,"gov-form-checkbox",{"value":[1],"checked":[1540],"required":[4],"disabled":[516],"indeterminate":[516],"name":[1],"size":[513],"identifier":[1],"noLabel":[4,"no-label"],"invalid":[4],"inheritedAttributes":[32],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"]}]]],["p-3cb36bae",[[4,"gov-form-switch",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[516],"name":[1],"size":[513],"identifier":[1],"invalid":[4],"inheritedAttributes":[32],"getRef":[64]},null,{"size":["validateSize","watchDisabled"],"disabled":["watchDisabled"],"invalid":["watchDisabled"]}]]],["p-65e67731",[[4,"gov-link",{"size":[1],"external":[4],"href":[1],"target":[1],"inheritedAttributes":[32]},null,{"size":["validateSize"]}]]],["p-da7f1e11",[[4,"gov-tag",{"iconStart":[1,"icon-start"],"iconEnd":[1,"icon-end"],"size":[513],"color":[513],"type":[513]},null,{"color":["validateColor"],"size":["validateSize"]}]]],["p-f4bcf817",[[4,"gov-tile",{"size":[513],"orientation":[1],"noBorder":[4,"no-border"],"href":[513],"target":[1],"getTriggerRef":[64]}]]],["p-b923a8d9",[[4,"gov-wizard-item",{"color":[1],"size":[1],"identifier":[1],"collapsible":[4],"disabled":[4],"isExpanded":[1028,"is-expanded"],"open":[64],"close":[64],"toggle":[64],"currentState":[64]},null,{"color":["validateColor"]}]]],["p-97a9725d",[[4,"gov-accordion",{"size":[1],"noBorder":[4,"no-border"]},null,{"size":["validateSize"]}]]],["p-bdc51179",[[4,"gov-container"]]],["p-6e457b3d",[[4,"gov-control-group",{"color":[1],"noBorder":[4,"no-border"],"fitContent":[4,"fit-content"]},null,{"color":["validateColor"]}]]],["p-5b2131c1",[[4,"gov-cookiebar"]]],["p-f7a4da9d",[[4,"gov-dropdown",{"identifier":[1],"open":[1028],"position":[1],"getState":[64],"toggle":[64]},null,{"open":["watchOpen"]}]]],["p-4b90fbc4",[[4,"gov-empty",{"size":[1]},null,{"size":["validateSize"]}]]],["p-5396935e",[[4,"gov-error-code"]]],["p-6bb37fe2",[[4,"gov-form-checkbox-group",{"gap":[1],"orientation":[1],"value":[1025]},null,{"gap":["validateGap"],"orientation":["validateOrientation"]}]]],["p-535316b4",[[4,"gov-form-control",{"identifier":[1],"invalid":[516],"disabled":[516],"success":[516],"fieldset":[4],"size":[1]}]]],["p-f4dac942",[[4,"gov-form-group",{"gap":[1],"orientation":[1]},null,{"gap":["validateGap"],"orientation":["validateOrientation"]}]]],["p-22fa411d",[[4,"gov-form-password-power",{"power":[514]}]]],["p-1200a32d",[[4,"gov-form-radio",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[516],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"inheritedAttributes":[32],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"]}]]],["p-e61aa53b",[[4,"gov-form-radio-group",{"gap":[1],"orientation":[1],"value":[1025]},null,{"gap":["validateGap"],"orientation":["validateOrientation"]}]]],["p-019e967c",[[4,"gov-form-search",{"size":[1],"color":[513]}]]],["p-00d153bf",[[4,"gov-grid",{"alignX":[1,"align-x"],"alignY":[1,"align-y"]}]]],["p-bc966c46",[[4,"gov-grid-item",{"size":[1],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]}]]],["p-439b66a5",[[4,"gov-layout",{"type":[1],"variant":[1],"inverse":[4]}]]],["p-30eaeeec",[[4,"gov-layout-column"]]],["p-e834ee73",[[0,"gov-lifecycle"]]],["p-cd2d335d",[[4,"gov-message",{"color":[1],"type":[1]},null,{"color":["validateColor"]}]]],["p-7e04730a",[[0,"gov-spacer",{"size":[1],"breakpoint":[1]},null,{"size":["validateSize"],"breakpoint":["validateBreakpoint"]}]]],["p-bcb45a18",[[4,"gov-stepper",{"size":[1]},null,{"size":["validateSize"]}]]],["p-41c6b262",[[4,"gov-stepper-item",{"color":[1],"size":[1],"identifier":[1]},null,{"color":["validateColor"]}]]],["p-0be19b89",[[4,"gov-tabs-item",{"identifier":[1],"triggerIdentifier":[1,"trigger-identifier"],"label":[513],"disabled":[516],"iconStart":[513,"icon-start"],"iconEnd":[513,"icon-end"],"default":[4],"isActive":[32],"getIdentifier":[64],"getTriggerIdentifier":[64],"getDisableState":[64],"setActiveStatus":[64]},null,{"label":["rerenderParent"],"disabled":["rerenderParent"]}]]],["p-7b7e502b",[[4,"gov-tiles",{"columns":[514]}]]],["p-04fa0ab5",[[4,"gov-tooltip",{"color":[1],"size":[1],"position":[1025],"message":[1],"identifier":[1],"icon":[516],"persist":[32],"show":[64],"hide":[64]},null,{"color":["validateColor"],"size":["validateSize"],"position":["validatePosition"],"message":["rerenderMessage"]}]]],["p-b7cfe254",[[4,"gov-wizard",{"size":[1],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]},null,{"size":["validateSize"]}]]],["p-3f6a2d20",[[0,"gov-theme-switch",{"size":[1],"ariaLabelLight":[1,"aria-label-light"],"ariaLabelDark":[1,"aria-label-dark"],"labelLight":[1,"label-light"],"labelDark":[1,"label-dark"],"theme":[32]},null,{"size":["validateSize"],"theme":["watchTheme"]}],[4,"gov-flex",{"direction":[1],"justifyContent":[513,"justify-content"],"alignItems":[513,"align-items"],"wrap":[513],"alignContent":[513,"align-content"],"alignSelf":[513,"align-self"]}],[4,"gov-form-label",{"identifier":[1],"size":[1],"required":[4],"legend":[4]}],[0,"gov-icon",{"size":[513],"color":[513],"name":[513],"type":[513],"visible":[32],"error":[32]},null,{"size":["validateSize"],"color":["validateColor"],"name":["loadIconPathData"]}]]],["p-dea64896",[[4,"gov-button",{"color":[513],"size":[513],"type":[513],"expanded":[516],"name":[1],"disabled":[516],"nativeType":[1,"native-type"],"href":[1],"target":[1],"download":[4],"hreflang":[1],"referrerpolicy":[1],"rel":[1],"loading":[1],"focusable":[4],"identifier":[1],"inheritedAttributes":[32],"setFocus":[64],"getRef":[64],"validateAccessibility":[64]},null,{"color":["validateColor"],"type":["validateType"],"size":["validateSize"],"nativeType":["validateNativeType"]}]]],["p-ed8fc183",[[4,"gov-form-autocomplete",{"value":[1537],"options":[1537],"identifier":[1],"success":[4],"size":[1],"nameKey":[1,"name-key"],"name":[1],"required":[4],"disabled":[516],"placeholder":[1],"readonly":[4],"invalid":[4],"minlength":[2],"maxlength":[2],"throttleTime":[2,"throttle-time"],"messageEmpty":[1,"message-empty"],"focused":[32],"processing":[32],"arrowCounter":[32],"list":[32],"inheritedAttributes":[32],"setFocus":[64],"setBlur":[64],"setOptions":[64],"clearValue":[64],"setProcessing":[64],"setSearchCallback":[64],"setTemplateResolver":[64]},null,{"size":["validateSize"],"options":["watchOptions"]}]]],["p-72130a8f",[[4,"gov-chip",{"disabled":[516],"href":[1],"target":[1],"iconStart":[1,"icon-start"],"iconEnd":[1,"icon-end"],"size":[1],"tag":[1],"color":[1],"type":[513],"focusable":[4],"identifier":[1],"inheritedAttributes":[32],"geRef":[64],"setFocus":[64]},null,{"color":["validateColor"],"size":["validateSize"]}]]],["p-3d6edb09",[[4,"gov-form-select",{"value":[1537],"options":[1537],"identifier":[1],"size":[1],"name":[1],"required":[4],"success":[516],"disabled":[516],"invalid":[4],"focused":[32],"optionsState":[32],"inheritedAttributes":[32],"setFocus":[64],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"options":["watchOptions"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"],"success":["watchControlAttrs"],"value":["watchValue"]}]]],["p-c054f955",[[0,"gov-backdrop",{"inverse":[4],"disabled":[1540],"accessibleLabel":[1,"accessible-label"],"accessibleLabelledBy":[1,"accessible-labelledby"],"validateAccessibility":[64]}]]],["p-56dc370d",[[4,"gov-attachments-item",{"accessibleRemoveLabel":[1,"accessible-remove-label"],"accessibleRemoveLabelledBy":[1,"accessible-remove-labelledby"],"validateAccessibility":[64]}],[4,"gov-attachments",{"label":[1],"wcagLabel":[1,"wcag-label"],"validateWcag":[64]}],[4,"gov-form-message",{"color":[1],"size":[1],"identifier":[64]},null,{"color":["validateColor"]}]]],["p-4c5f6299",[[4,"gov-form-input",{"value":[1537],"identifier":[1],"success":[516],"size":[1],"name":[1],"multiline":[4],"rows":[2],"cols":[2],"required":[516],"disabled":[516],"placeholder":[1],"readonly":[4],"minlength":[2],"maxlength":[2],"min":[8],"max":[8],"autocomplete":[4],"autocorrect":[4],"spellcheck":[4],"inputLang":[1,"input-lang"],"type":[1],"inputType":[1,"input-type"],"role":[1],"invalid":[516],"accessibleShowPasswordLabel":[1,"accessible-show-password-label"],"accessibleHidePasswordLabel":[1,"accessible-hide-password-label"],"focused":[32],"showPassword":[32],"inheritedAttributes":[32],"setFocus":[64],"setValue":[64],"clearValue":[64],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"],"success":["watchControlAttrs"]}],[0,"gov-skeleton",{"size":[1],"color":[1],"shape":[1],"width":[1],"height":[1],"animation":[1],"inheritedAttributes":[32]},null,{"size":["validateSize"],"shape":["validateShape"],"animation":["validateAnimation"]}]]]]'),e)}));
|
|
2
2
|
//# sourceMappingURL=core.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["patchBrowser","patchCloneNodeFix","H","prototype","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","HTMLElementPrototype","nativeCloneNodeFn","cloneNode","deep","this","nodeName","call","clonedNode","srcChildNodes","childNodes","i","length","nodeType","appendChild","then","async","options","globalScripts","bootstrapLazy","JSON","parse"],"sources":["../../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"iIAOA,IAAIA,EAAe,KAIO,CACtBC,EAAkBC,EAAEC,UACxB,CAIE,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACrBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACjD,CACE,OAAOC,EAAeJ,EAAK,EAE7B,IAAIL,EAAqBU,IACvB,MAAMC,EAAoBD,EAAqBE,UAC/CF,EAAqBE,UAAY,SAASC,GACxC,GAAIC,KAAKC,WAAa,WAAY,CAChC,OAAOJ,EAAkBK,KAAKF,KAAMD,EAC1C,CACI,MAAMI,EAAaN,EAAkBK,KAAKF,KAAM,OAChD,MAAMI,EAAgBJ,KAAKK,WAC3B,GAAIN,EAAM,CACR,IAAK,IAAIO,EAAI,EAAGA,EAAIF,EAAcG,OAAQD,IAAK,CAC7C,GAAIF,EAAcE,GAAGE,WAAa,EAAG,CACnCL,EAAWM,YAAYL,EAAcE,GAAGR,UAAU,MAC5D,CACA,CACA,CACI,OAAOK,CACX,CAAG,ECpCHlB,IAAeyB,MAAKC,MAAOC,UACnBC,IACN,OAAOC,EAAcC,KAAAC,MAAA,
|
|
1
|
+
{"version":3,"names":["patchBrowser","patchCloneNodeFix","H","prototype","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","HTMLElementPrototype","nativeCloneNodeFn","cloneNode","deep","this","nodeName","call","clonedNode","srcChildNodes","childNodes","i","length","nodeType","appendChild","then","async","options","globalScripts","bootstrapLazy","JSON","parse"],"sources":["../../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"iIAOA,IAAIA,EAAe,KAIO,CACtBC,EAAkBC,EAAEC,UACxB,CAIE,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACrBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACjD,CACE,OAAOC,EAAeJ,EAAK,EAE7B,IAAIL,EAAqBU,IACvB,MAAMC,EAAoBD,EAAqBE,UAC/CF,EAAqBE,UAAY,SAASC,GACxC,GAAIC,KAAKC,WAAa,WAAY,CAChC,OAAOJ,EAAkBK,KAAKF,KAAMD,EAC1C,CACI,MAAMI,EAAaN,EAAkBK,KAAKF,KAAM,OAChD,MAAMI,EAAgBJ,KAAKK,WAC3B,GAAIN,EAAM,CACR,IAAK,IAAIO,EAAI,EAAGA,EAAIF,EAAcG,OAAQD,IAAK,CAC7C,GAAIF,EAAcE,GAAGE,WAAa,EAAG,CACnCL,EAAWM,YAAYL,EAAcE,GAAGR,UAAU,MAC5D,CACA,CACA,CACI,OAAOK,CACX,CAAG,ECpCHlB,IAAeyB,MAAKC,MAAOC,UACnBC,IACN,OAAOC,EAAcC,KAAAC,MAAA,sxZAAuCJ,EAAA","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as s,h as t,a as e,g as a}from"./p-8506b611.js";import{G as i}from"./p-880743a5.js";import{g as r}from"./p-ea7fdd2e.js";const o=class{constructor(t){s(this,t);this.alignX=undefined;this.alignY=undefined;this.h=r(this.host)}render(){return t(e,{key:"81e96a065c6472ae76e4768cf2b8373b94f0d0a4",class:this.h.classes(i.root),"align-x":this.alignX,"align-y":this.alignY,role:"list"},t("slot",{key:"c3965bafe6a5870352a7cded3fc96adfbeb41724"}))}get host(){return a(this)}};export{o as gov_grid};
|
|
2
|
+
//# sourceMappingURL=p-00d153bf.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,h as s,a,g as t}from"./p-8506b611.js";import{C as o}from"./p-5aad3497.js";import{p as r}from"./p-e0e2e9c1.js";import{S as f}from"./p-92f420cb.js";r(f,["_S","_M","_L"]);r(o,["PRIMARY","NEUTRAL"]);const c={root:"gov-form-search"};const m=class{constructor(s){e(this,s);this.size="m";this.color="neutral"}render(){return s(a,{key:"9d628d34bd6f19132ea398437faf9023a322bdcf",class:c.root,color:this.color,size:this.size},s("slot",{key:"aa70625f5e6b754a18b36ad87634fe5be1a34fb7",name:"input"}),s("slot",{key:"d098e011406c85877131ee57c04bc9a3f05ded18",name:"button-erase"}),s("slot",{key:"6a5226ae29cf22f4ec33ecf5604db44d8154d2fa",name:"button"}))}get host(){return t(this)}};export{m as gov_form_search};
|
|
2
|
+
//# sourceMappingURL=p-019e967c.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["pick","Sizes","Colors","FormSearchClass","root","GovFormSearch","render","h","Host","key","class","color","this","size","name"],"sources":["../../../packages/core/src/components/gov-form/search/constants.ts","../../../packages/core/src/components/gov-form/search/gov-form-search.tsx"],"sourcesContent":["import { Colors } from '../../../core/constants/colors'\nimport { ValueOf } from '../../../types/interfaces'\nimport { pick } from '../../../utils/utils'\nimport {Sizes} from \"../../../core/constants/sizes\";\n\nexport const FormSearchSizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type FormSearchSizesType = `${ValueOf<typeof FormSearchSizes>}`\n\nexport const FormSearchColors = pick(Colors, ['PRIMARY', 'NEUTRAL'])\nexport type FormSearchColorType = `${ValueOf<typeof FormSearchColors>}`\n\nexport const FormSearchClass = {\n\troot: 'gov-form-search',\n}\n","import {Component, Element, h, Host, Prop} from '@stencil/core'\nimport {FormSearchClass, FormSearchSizesType, FormSearchColorType} from './constants'\n\n@Component({\n\ttag: 'gov-form-search',\n})\nexport class GovFormSearch {\n\t@Element() host: HTMLGovFormSearchElement\n\t/**\n\t * Search’s size.\n\t */\n\t@Prop() readonly size?: FormSearchSizesType = \"m\"\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop({reflect: true}) readonly color: FormSearchColorType = 'neutral'\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSearchClass.root} color={this.color} size={this.size}>\n\t\t\t\t<slot name=\"input\"/>\n\t\t\t\t<slot name=\"button-erase\"/>\n\t\t\t\t<slot name=\"button\"/>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["pick","Sizes","Colors","FormSearchClass","root","GovFormSearch","render","h","Host","key","class","color","this","size","name"],"sources":["../../../packages/core/src/components/gov-form/search/constants.ts","../../../packages/core/src/components/gov-form/search/gov-form-search.tsx"],"sourcesContent":["import { Colors } from '../../../core/constants/colors'\nimport { ValueOf } from '../../../types/interfaces'\nimport { pick } from '../../../utils/utils'\nimport {Sizes} from \"../../../core/constants/sizes\";\n\nexport const FormSearchSizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type FormSearchSizesType = `${ValueOf<typeof FormSearchSizes>}`\n\nexport const FormSearchColors = pick(Colors, ['PRIMARY', 'NEUTRAL'])\nexport type FormSearchColorType = `${ValueOf<typeof FormSearchColors>}`\n\nexport const FormSearchClass = {\n\troot: 'gov-form-search',\n}\n","import {Component, Element, h, Host, Prop} from '@stencil/core'\nimport {FormSearchClass, FormSearchSizesType, FormSearchColorType} from './constants'\n\n@Component({\n\ttag: 'gov-form-search',\n})\nexport class GovFormSearch {\n\t@Element() host: HTMLGovFormSearchElement\n\t/**\n\t * Search’s size.\n\t */\n\t@Prop() readonly size?: FormSearchSizesType = \"m\"\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop({reflect: true}) readonly color: FormSearchColorType = 'neutral'\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSearchClass.root} color={this.color} size={this.size}>\n\t\t\t\t<slot name=\"input\"/>\n\t\t\t\t<slot name=\"button-erase\"/>\n\t\t\t\t<slot name=\"button\"/>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"gKAK+BA,EAAKC,EAAO,CAAC,KAAM,KAAM,OAGxBD,EAAKE,EAAQ,CAAC,UAAW,YAGlD,MAAMC,EAAkB,CAC9BC,KAAM,mB,MCNMC,EAAa,M,mCAKqB,I,WAIe,S,CAE7D,MAAAC,GACC,OACCC,EAACC,EAAI,CAAAC,IAAA,2CAACC,MAAOP,EAAgBC,KAAMO,MAAOC,KAAKD,MAAOE,KAAMD,KAAKC,MAChEN,EAAA,QAAAE,IAAA,2CAAMK,KAAK,UACXP,EAAA,QAAAE,IAAA,2CAAMK,KAAK,iBACXP,EAAA,QAAAE,IAAA,2CAAMK,KAAK,W","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,h as i,a as s,g as e}from"./p-8506b611.js";import{v as h}from"./p-0b3574c2.js";import{T as o,a as n,b as a,c as r,d as c}from"./p-76d604c6.js";import{c as d}from"./p-cd6c2938.js";import{g as f}from"./p-ea7fdd2e.js";import{d as l}from"./p-e8ec030e.js";import{t as p}from"./p-26618322.js";import"./p-5aad3497.js";import"./p-92f420cb.js";import"./p-e0e2e9c1.js";const m=class{constructor(i){t(this,i);this.tooltipContentId=undefined;this.tooltipId=undefined;this.color=o.PRIMARY;this.size=n._M;this.position="right";this.message=undefined;this.identifier=undefined;this.icon=undefined;this.persist=false;this.h=f(this.host);this.tooltipId=d("GovTooltip");this.tooltipContentId=d("GovContentTooltip")}validateColor(t){h(o,t,c.root)}validateSize(t){h(n,t,c.root)}validatePosition(t){h(r,t,c.root)}rerenderMessage(){this.createContentWrapper()}connectedCallback(){this.createContentWrapper();this.registerListeners()}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size);this.validatePosition(this.position)}componentDidUpdate(){this.createContentWrapper()}disconnectedCallback(){this.removeContent()}createContentWrapper(){var t;if(this.tooltipContent){if(this.message){this.tooltipContent.innerHTML=this.message}else if(this.insideContent){this.tooltipContent.innerHTML=this.insideContent.innerHTML}return}let i;if(this.insideContent){i=this.insideContent}else{i=l().createElement(a.root);i.innerHTML=this.message}i.setAttribute("id",(t=this.identifier)!==null&&t!==void 0?t:this.tooltipContentId);i.setAttribute("parent-id",this.tooltipId);i.setAttribute("color",this.color);i.setAttribute("size",this.size);l().body.appendChild(i)}get tooltipContent(){var t;return l().body.querySelector(`#${(t=this.identifier)!==null&&t!==void 0?t:this.tooltipContentId}`)}get insideContent(){return this.host.querySelector(a.root)}registerListeners(){this.host.addEventListener("click",(t=>{t.preventDefault();this.persist=true;if(this.tooltipContent){this.tooltipContent.setAttribute("persist","true")}this.showTooltip()}));this.host.addEventListener("mouseenter",(t=>{t.preventDefault();this.showTooltip()}));this.host.addEventListener("mouseleave",(t=>{t.preventDefault();if(this.persist===false){this.hideTooltip()}}))}verifyPositionSpace(){const t=12;const i=window.innerWidth-(window.innerWidth-document.documentElement.clientWidth);const s=this.host.getBoundingClientRect();const e=this.host.offsetWidth;const h=this.host.offsetHeight;const o=this.tooltipContent.offsetWidth;const n=this.tooltipContent.offsetHeight;const a={left:s.left+document.documentElement.scrollLeft,top:s.top+document.documentElement.scrollTop};const c=a.left+t+s.width+o<=i;const d=a.left>o;if(this.position===r.LEFT||this.position===r.RIGHT){this.tooltipContent.style.top=a.top-(n-h)/2+"px";if(c===false&&d===false){this.position=r.TOP;this.tooltipContent.setAttribute("position",r.TOP)}if(d&&c===false&&this.position===r.RIGHT){this.position=r.LEFT}if(c&&d===false&&this.position===r.LEFT){this.position=r.RIGHT}}if(this.position===r.RIGHT){this.tooltipContent.setAttribute("position",r.RIGHT);this.tooltipContent.style.left=a.left+t+s.width+"px"}if(this.position===r.LEFT){this.tooltipContent.setAttribute("position",r.LEFT);this.tooltipContent.style.left=a.left-(o+t)+"px"}if(this.position===r.TOP||this.position===r.BOTTOM){if(o>e){let s=a.left-(o-e)/2;const h=s<0;const n=s+o>i;if(h&&n){this.tooltipContent.style.width="auto";this.tooltipContent.style.left=t+"px";this.tooltipContent.style.right=t+"px"}else{if(h){s=t}if(n){s=s-(i-(s+o+t))*-1}this.tooltipContent.style.left=s+"px"}}else{const t=a.left+(e-o)/2;this.tooltipContent.style.left=t+"px"}}if(this.position===r.TOP){this.tooltipContent.setAttribute("position",r.TOP);this.tooltipContent.style.top=a.top-(n+t)+"px"}if(this.position===r.BOTTOM){this.tooltipContent.setAttribute("position",r.BOTTOM);this.tooltipContent.style.top=a.top+(h+t)+"px"}this.tooltipContent.style.opacity="1"}showTooltip(){if(this.tooltipContent){this.tooltipContent.style.opacity="0";this.tooltipContent.hidden=false;this.tooltipContent.setAttribute("is-visible","true");p((()=>{this.verifyPositionSpace()}))}}hideTooltip(){if(this.tooltipContent){this.tooltipContent.setAttribute("is-visible","false");this.tooltipContent.setAttribute("persist","false");this.tooltipContent.removeAttribute("style")}}removeContent(){const t=document.getElementById(this.tooltipContentId);if(t){t.remove()}}render(){var t;return i(s,{key:"bc4cfa206b2e4060ca6070f0d4796df1a5df1bfc",id:this.tooltipId,class:this.h.classes(c.root),position:this.position},i("span",{key:"8ce3bf37e9ab13190c476db7cf47b7d0319719fe",role:"button",tabindex:0,onKeyPress:()=>this.showTooltip(),onBlur:()=>{if(this.persist===false){this.hideTooltip()}},"aria-describedby":(t=this.identifier)!==null&&t!==void 0?t:this.tooltipContentId},i("slot",{key:"c622fcd797a2c0dd303395d2d6391fbc747e4d18"})))}async show(){this.showTooltip()}async hide(){this.persist=false;this.hideTooltip()}get host(){return e(this)}static get watchers(){return{color:["validateColor"],size:["validateSize"],position:["validatePosition"],message:["rerenderMessage"]}}};export{m as gov_tooltip};
|
|
2
|
+
//# sourceMappingURL=p-04fa0ab5.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["GovTooltip","constructor","hostRef","this","tooltipContentId","undefined","tooltipId","TooltipColors","PRIMARY","TooltipSize","_M","h","govHost","host","createID","validateColor","newValue","validateProp","TooltipClass","root","validateSize","validatePosition","TooltipPosition","rerenderMessage","createContentWrapper","connectedCallback","registerListeners","componentWillLoad","color","size","position","componentDidUpdate","disconnectedCallback","removeContent","tooltipContent","message","innerHTML","insideContent","content","documentNode","createElement","TooltipContentClass","setAttribute","_a","identifier","body","appendChild","querySelector","addEventListener","e","preventDefault","persist","showTooltip","hideTooltip","verifyPositionSpace","offset","windowWidth","window","innerWidth","document","documentElement","clientWidth","trigger","getBoundingClientRect","trgWidth","offsetWidth","trgHeight","offsetHeight","contentWidth","contentHeight","triggerPos","left","scrollLeft","top","scrollTop","isRightSpace","width","isLeftSpace","LEFT","RIGHT","style","TOP","BOTTOM","leftPosition","isNotLeftSpace","isNotRightSpace","right","opacity","hidden","tick","removeAttribute","contentEl","getElementById","remove","render","Host","key","id","class","classes","role","tabindex","onKeyPress","onBlur","show","hide"],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip.tsx"],"sourcesContent":["import {Component, Element, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tTooltipClass,\n\tTooltipContentClass,\n\tTooltipPosition,\n\tTooltipPositionType,\n\tTooltipSize,\n\tTooltipSizeType,\n\tTooltipColors,\n\tTooltipColorType,\n} from \"./constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {documentNode} from \"../../helpers/Dom/win\";\nimport {Nullable} from \"../../utils/helpers.types\";\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: \"gov-tooltip\",\n})\nexport class GovTooltip {\n\tprivate h: GovHost\n\tprivate readonly tooltipContentId = undefined\n\tprivate readonly tooltipId = undefined\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.tooltipId = createID(\"GovTooltip\")\n\t\tthis.tooltipContentId = createID(\"GovContentTooltip\")\n\t}\n\n\t@Element() host: HTMLGovTooltipElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly color?: TooltipColorType = TooltipColors.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip display position\n\t */\n\t@Prop({mutable: true}) position: TooltipPositionType = \"right\"\n\t/**\n\t * Information contained in the tooltip\n\t */\n\t@Prop() readonly message: string = undefined\n\t/**\n\t * Custom tooltip identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Trigger is just an icon\n\t */\n\t@Prop({reflect: true}) readonly icon: boolean = undefined\n\n\t@State() persist = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TooltipColors, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TooltipSize, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"position\")\n\tvalidatePosition(newValue: string): void {\n\t\tvalidateProp(TooltipPosition, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"message\")\n\trerenderMessage(): void {\n\t\tthis.createContentWrapper();\n\t}\n\n\tconnectedCallback() {\n\t\tthis.createContentWrapper()\n\t\tthis.registerListeners()\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\n\t\tthis.validatePosition(this.position)\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.createContentWrapper()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.removeContent()\n\t}\n\n\tprivate createContentWrapper() {\n\t\tif (this.tooltipContent) {\n\t\t\tif (this.message) {\n\t\t\t\tthis.tooltipContent.innerHTML = this.message\n\t\t\t} else if (this.insideContent) {\n\t\t\t\tthis.tooltipContent.innerHTML = this.insideContent.innerHTML\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tlet content: HTMLGovTooltipContentElement;\n\t\tif (this.insideContent) {\n\t\t\tcontent = this.insideContent\n\t\t} else {\n\t\t\tcontent = documentNode().createElement(TooltipContentClass.root) as HTMLGovTooltipContentElement\n\t\t\tcontent.innerHTML = this.message\n\t\t}\n\n\t\tcontent.setAttribute(\"id\", this.identifier ?? this.tooltipContentId)\n\t\tcontent.setAttribute(\"parent-id\", this.tooltipId)\n\t\tcontent.setAttribute(\"color\", this.color)\n\t\tcontent.setAttribute(\"size\", this.size)\n\t\tdocumentNode().body.appendChild(content)\n\t}\n\n\tprivate get tooltipContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn documentNode().body.querySelector(`#${this.identifier ?? this.tooltipContentId}`);\n\t}\n\n\tprivate get insideContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn this.host.querySelector(TooltipContentClass.root)\n\t}\n\n\tprivate registerListeners() {\n\t\tthis.host.addEventListener(\"click\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.persist = true\n\t\t\tif (this.tooltipContent) {\n\t\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"true\")\n\t\t\t}\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseenter\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseleave\", e => {\n\t\t\te.preventDefault()\n\t\t\tif (this.persist === false) {\n\t\t\t\tthis.hideTooltip()\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate verifyPositionSpace() {\n\t\tconst offset = 12\n\t\tconst windowWidth = window.innerWidth - (window.innerWidth - document.documentElement.clientWidth);\n\t\tconst trigger = this.host.getBoundingClientRect()\n\t\tconst trgWidth = this.host.offsetWidth\n\t\tconst trgHeight = this.host.offsetHeight\n\t\tconst contentWidth = this.tooltipContent.offsetWidth\n\t\tconst contentHeight = this.tooltipContent.offsetHeight\n\t\tconst triggerPos = {\n\t\t\tleft: trigger.left + document.documentElement.scrollLeft,\n\t\t\ttop: trigger.top + document.documentElement.scrollTop,\n\t\t}\n\n\t\tconst isRightSpace = ((triggerPos.left + offset + trigger.width) + contentWidth) <= windowWidth;\n\t\tconst isLeftSpace = triggerPos.left > contentWidth;\n\n\t\t// LEFT/RIGHT\n\t\tif (this.position === TooltipPosition.LEFT || this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - ((contentHeight - trgHeight) / 2)) + \"px\";\n\t\t\tif (isRightSpace === false && isLeftSpace === false) {\n\t\t\t\tthis.position = TooltipPosition.TOP\n\t\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\t}\n\t\t\tif (isLeftSpace && isRightSpace === false && this.position === TooltipPosition.RIGHT) {\n\t\t\t\tthis.position = TooltipPosition.LEFT\n\t\t\t}\n\t\t\tif (isRightSpace && isLeftSpace === false && this.position === TooltipPosition.LEFT) {\n\t\t\t\tthis.position = TooltipPosition.RIGHT\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.RIGHT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left + offset + trigger.width) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.LEFT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.LEFT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left - (contentWidth + offset)) + \"px\"\n\t\t}\n\n\t\t// LEFT/RIGHT FOR TOP/BOTTOM\n\t\tif (this.position === TooltipPosition.TOP || this.position === TooltipPosition.BOTTOM) {\n\t\t\tif (contentWidth > trgWidth) {\n\t\t\t\tlet leftPosition = (triggerPos.left - ((contentWidth - trgWidth) / 2));\n\t\t\t\tconst isNotLeftSpace = leftPosition < 0;\n\t\t\t\tconst isNotRightSpace = (leftPosition + contentWidth) > windowWidth;\n\t\t\t\tif (isNotLeftSpace && isNotRightSpace) {\n\t\t\t\t\tthis.tooltipContent.style.width = \"auto\";\n\t\t\t\t\tthis.tooltipContent.style.left = offset + \"px\";\n\t\t\t\t\tthis.tooltipContent.style.right = offset + \"px\";\n\t\t\t\t} else {\n\t\t\t\t\tif (isNotLeftSpace) {\n\t\t\t\t\t\tleftPosition = offset\n\t\t\t\t\t}\n\t\t\t\t\tif (isNotRightSpace) {\n\t\t\t\t\t\tleftPosition = leftPosition - ((windowWidth - (leftPosition + contentWidth + offset)) * -1)\n\t\t\t\t\t}\n\t\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst leftPosition = (triggerPos.left + ((trgWidth - contentWidth) / 2))\n\n\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.TOP) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - (contentHeight + offset)) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.BOTTOM) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.BOTTOM)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top + (trgHeight + offset)) + \"px\"\n\t\t}\n\n\t\tthis.tooltipContent.style.opacity = '1'\n\n\t}\n\n\tprivate showTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.style.opacity = '0'\n\t\t\tthis.tooltipContent.hidden = false\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"true\")\n\t\t\ttick(() => {\n\t\t\t\tthis.verifyPositionSpace()\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate hideTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"false\")\n\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"false\")\n\t\t\tthis.tooltipContent.removeAttribute('style')\n\t\t}\n\t}\n\n\tprivate removeContent() {\n\t\tconst contentEl = document.getElementById(this.tooltipContentId)\n\t\tif (contentEl) {\n\t\t\tcontentEl.remove()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tid={this.tooltipId}\n\t\t\t\tclass={this.h.classes(TooltipClass.root)}\n\t\t\t\tposition={this.position}>\n\t\t\t\t<span role={'button'}\n\t\t\t\t\t\t\ttabindex={0}\n\t\t\t\t\t\t\tonKeyPress={() => this.showTooltip()}\n\t\t\t\t\t\t\tonBlur={() => {\n\t\t\t\t\t\t\t\tif (this.persist === false) {\n\t\t\t\t\t\t\t\t\tthis.hideTooltip()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\taria-describedby={this.identifier ?? this.tooltipContentId}><slot/></span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showTooltip()\n\t}\n\n\t/**\n\t * Hiding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.persist = false\n\t\tthis.hideTooltip()\n\t}\n}\n"],"mappings":"yYAsBaA,EAAU,MAKtB,WAAAC,CAAAC,G,UAHiBC,KAAAC,iBAAmBC,UACnBF,KAAAG,UAAYD,U,WAYeE,EAAcC,Q,UAIhBC,EAAYC,G,cAIC,Q,aAIpBL,U,oCAQaA,U,aAE7B,MA/BlBF,KAAKQ,EAAIC,EAAQT,KAAKU,MACtBV,KAAKG,UAAYQ,EAAS,cAC1BX,KAAKC,iBAAmBU,EAAS,oB,CAgClC,aAAAC,CAAcC,GACbC,EAAaV,EAAeS,EAAUE,EAAaC,K,CAIpD,YAAAC,CAAaJ,GACZC,EAAaR,EAAaO,EAAUE,EAAaC,K,CAIlD,gBAAAE,CAAiBL,GAChBC,EAAaK,EAAiBN,EAAUE,EAAaC,K,CAItD,eAAAI,GACCpB,KAAKqB,sB,CAGN,iBAAAC,GACCtB,KAAKqB,uBACLrB,KAAKuB,mB,CAGN,iBAAAC,GACCxB,KAAKY,cAAcZ,KAAKyB,OACxBzB,KAAKiB,aAAajB,KAAK0B,MACvB1B,KAAKkB,iBAAiBlB,KAAK2B,S,CAG5B,kBAAAC,GACC5B,KAAKqB,sB,CAGN,oBAAAQ,GACC7B,KAAK8B,e,CAGE,oBAAAT,G,MACP,GA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B,G,EAKrB,WAAAD,GACP,GAAIlD,KAAK+B,eAAgB,CACxB/B,KAAK+B,eAAeQ,aAAa,aAAc,SAC/CvC,KAAK+B,eAAeQ,aAAa,UAAW,SAC5CvC,KAAK+B,eAAewD,gBAAgB,Q,EAI9B,aAAAzD,GACP,MAAM0D,EAAYhC,SAASiC,eAAezF,KAAKC,kBAC/C,GAAIuF,EAAW,CACdA,EAAUE,Q,EAIZ,MAAAC,G,MACC,OACCnF,EAACoF,EAAI,CAAAC,IAAA,2CACJC,GAAI9F,KAAKG,UACT4F,MAAO/F,KAAKQ,EAAEwF,QAAQjF,EAAaC,MACnCW,SAAU3B,KAAK2B,UACfnB,EAAA,QAAAqF,IAAA,2CAAMI,KAAM,SACTC,SAAU,EACVC,WAAY,IAAMnG,KAAKiD,cACvBmD,OAAQ,KACP,GAAIpG,KAAKgD,UAAY,MAAO,CAC3BhD,KAAKkD,a,GAEN,oBACiBV,EAAAxC,KAAKyC,cAAU,MAAAD,SAAA,EAAAA,EAAIxC,KAAKC,kBAAkBO,EAAA,QAAAqF,IAAA,8C,CASlE,UAAMQ,GACLrG,KAAKiD,a,CAON,UAAMqD,GACLtG,KAAKgD,QAAU,MACfhD,KAAKkD,a","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["GovTooltip","constructor","hostRef","this","tooltipContentId","undefined","tooltipId","TooltipColors","PRIMARY","TooltipSize","_M","h","govHost","host","createID","validateColor","newValue","validateProp","TooltipClass","root","validateSize","validatePosition","TooltipPosition","rerenderMessage","createContentWrapper","connectedCallback","registerListeners","componentWillLoad","color","size","position","componentDidUpdate","disconnectedCallback","removeContent","tooltipContent","message","innerHTML","insideContent","content","documentNode","createElement","TooltipContentClass","setAttribute","_a","identifier","body","appendChild","querySelector","addEventListener","e","preventDefault","persist","showTooltip","hideTooltip","verifyPositionSpace","offset","windowWidth","window","innerWidth","document","documentElement","clientWidth","trigger","getBoundingClientRect","trgWidth","offsetWidth","trgHeight","offsetHeight","contentWidth","contentHeight","triggerPos","left","scrollLeft","top","scrollTop","isRightSpace","width","isLeftSpace","LEFT","RIGHT","style","TOP","BOTTOM","leftPosition","isNotLeftSpace","isNotRightSpace","right","opacity","hidden","tick","removeAttribute","contentEl","getElementById","remove","render","Host","key","id","class","classes","role","tabindex","onKeyPress","onBlur","show","hide"],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip.tsx"],"sourcesContent":["import {Component, Element, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tTooltipClass,\n\tTooltipContentClass,\n\tTooltipPosition,\n\tTooltipPositionType,\n\tTooltipSize,\n\tTooltipSizeType,\n\tTooltipColors,\n\tTooltipColorType,\n} from \"./constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {documentNode} from \"../../helpers/Dom/win\";\nimport {Nullable} from \"../../utils/helpers.types\";\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: \"gov-tooltip\",\n})\nexport class GovTooltip {\n\tprivate h: GovHost\n\tprivate readonly tooltipContentId = undefined\n\tprivate readonly tooltipId = undefined\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.tooltipId = createID(\"GovTooltip\")\n\t\tthis.tooltipContentId = createID(\"GovContentTooltip\")\n\t}\n\n\t@Element() host: HTMLGovTooltipElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly color?: TooltipColorType = TooltipColors.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip display position\n\t */\n\t@Prop({mutable: true}) position: TooltipPositionType = \"right\"\n\t/**\n\t * Information contained in the tooltip\n\t */\n\t@Prop() readonly message: string = undefined\n\t/**\n\t * Custom tooltip identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Trigger is just an icon\n\t */\n\t@Prop({reflect: true}) readonly icon: boolean = undefined\n\n\t@State() persist = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TooltipColors, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TooltipSize, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"position\")\n\tvalidatePosition(newValue: string): void {\n\t\tvalidateProp(TooltipPosition, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"message\")\n\trerenderMessage(): void {\n\t\tthis.createContentWrapper();\n\t}\n\n\tconnectedCallback() {\n\t\tthis.createContentWrapper()\n\t\tthis.registerListeners()\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\n\t\tthis.validatePosition(this.position)\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.createContentWrapper()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.removeContent()\n\t}\n\n\tprivate createContentWrapper() {\n\t\tif (this.tooltipContent) {\n\t\t\tif (this.message) {\n\t\t\t\tthis.tooltipContent.innerHTML = this.message\n\t\t\t} else if (this.insideContent) {\n\t\t\t\tthis.tooltipContent.innerHTML = this.insideContent.innerHTML\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tlet content: HTMLGovTooltipContentElement;\n\t\tif (this.insideContent) {\n\t\t\tcontent = this.insideContent\n\t\t} else {\n\t\t\tcontent = documentNode().createElement(TooltipContentClass.root) as HTMLGovTooltipContentElement\n\t\t\tcontent.innerHTML = this.message\n\t\t}\n\n\t\tcontent.setAttribute(\"id\", this.identifier ?? this.tooltipContentId)\n\t\tcontent.setAttribute(\"parent-id\", this.tooltipId)\n\t\tcontent.setAttribute(\"color\", this.color)\n\t\tcontent.setAttribute(\"size\", this.size)\n\t\tdocumentNode().body.appendChild(content)\n\t}\n\n\tprivate get tooltipContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn documentNode().body.querySelector(`#${this.identifier ?? this.tooltipContentId}`);\n\t}\n\n\tprivate get insideContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn this.host.querySelector(TooltipContentClass.root)\n\t}\n\n\tprivate registerListeners() {\n\t\tthis.host.addEventListener(\"click\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.persist = true\n\t\t\tif (this.tooltipContent) {\n\t\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"true\")\n\t\t\t}\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseenter\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseleave\", e => {\n\t\t\te.preventDefault()\n\t\t\tif (this.persist === false) {\n\t\t\t\tthis.hideTooltip()\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate verifyPositionSpace() {\n\t\tconst offset = 12\n\t\tconst windowWidth = window.innerWidth - (window.innerWidth - document.documentElement.clientWidth);\n\t\tconst trigger = this.host.getBoundingClientRect()\n\t\tconst trgWidth = this.host.offsetWidth\n\t\tconst trgHeight = this.host.offsetHeight\n\t\tconst contentWidth = this.tooltipContent.offsetWidth\n\t\tconst contentHeight = this.tooltipContent.offsetHeight\n\t\tconst triggerPos = {\n\t\t\tleft: trigger.left + document.documentElement.scrollLeft,\n\t\t\ttop: trigger.top + document.documentElement.scrollTop,\n\t\t}\n\n\t\tconst isRightSpace = ((triggerPos.left + offset + trigger.width) + contentWidth) <= windowWidth;\n\t\tconst isLeftSpace = triggerPos.left > contentWidth;\n\n\t\t// LEFT/RIGHT\n\t\tif (this.position === TooltipPosition.LEFT || this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - ((contentHeight - trgHeight) / 2)) + \"px\";\n\t\t\tif (isRightSpace === false && isLeftSpace === false) {\n\t\t\t\tthis.position = TooltipPosition.TOP\n\t\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\t}\n\t\t\tif (isLeftSpace && isRightSpace === false && this.position === TooltipPosition.RIGHT) {\n\t\t\t\tthis.position = TooltipPosition.LEFT\n\t\t\t}\n\t\t\tif (isRightSpace && isLeftSpace === false && this.position === TooltipPosition.LEFT) {\n\t\t\t\tthis.position = TooltipPosition.RIGHT\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.RIGHT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left + offset + trigger.width) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.LEFT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.LEFT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left - (contentWidth + offset)) + \"px\"\n\t\t}\n\n\t\t// LEFT/RIGHT FOR TOP/BOTTOM\n\t\tif (this.position === TooltipPosition.TOP || this.position === TooltipPosition.BOTTOM) {\n\t\t\tif (contentWidth > trgWidth) {\n\t\t\t\tlet leftPosition = (triggerPos.left - ((contentWidth - trgWidth) / 2));\n\t\t\t\tconst isNotLeftSpace = leftPosition < 0;\n\t\t\t\tconst isNotRightSpace = (leftPosition + contentWidth) > windowWidth;\n\t\t\t\tif (isNotLeftSpace && isNotRightSpace) {\n\t\t\t\t\tthis.tooltipContent.style.width = \"auto\";\n\t\t\t\t\tthis.tooltipContent.style.left = offset + \"px\";\n\t\t\t\t\tthis.tooltipContent.style.right = offset + \"px\";\n\t\t\t\t} else {\n\t\t\t\t\tif (isNotLeftSpace) {\n\t\t\t\t\t\tleftPosition = offset\n\t\t\t\t\t}\n\t\t\t\t\tif (isNotRightSpace) {\n\t\t\t\t\t\tleftPosition = leftPosition - ((windowWidth - (leftPosition + contentWidth + offset)) * -1)\n\t\t\t\t\t}\n\t\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst leftPosition = (triggerPos.left + ((trgWidth - contentWidth) / 2))\n\n\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.TOP) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - (contentHeight + offset)) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.BOTTOM) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.BOTTOM)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top + (trgHeight + offset)) + \"px\"\n\t\t}\n\n\t\tthis.tooltipContent.style.opacity = '1'\n\n\t}\n\n\tprivate showTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.style.opacity = '0'\n\t\t\tthis.tooltipContent.hidden = false\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"true\")\n\t\t\ttick(() => {\n\t\t\t\tthis.verifyPositionSpace()\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate hideTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"false\")\n\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"false\")\n\t\t\tthis.tooltipContent.removeAttribute('style')\n\t\t}\n\t}\n\n\tprivate removeContent() {\n\t\tconst contentEl = document.getElementById(this.tooltipContentId)\n\t\tif (contentEl) {\n\t\t\tcontentEl.remove()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tid={this.tooltipId}\n\t\t\t\tclass={this.h.classes(TooltipClass.root)}\n\t\t\t\tposition={this.position}>\n\t\t\t\t<span role={'button'}\n\t\t\t\t\t\t\ttabindex={0}\n\t\t\t\t\t\t\tonKeyPress={() => this.showTooltip()}\n\t\t\t\t\t\t\tonBlur={() => {\n\t\t\t\t\t\t\t\tif (this.persist === false) {\n\t\t\t\t\t\t\t\t\tthis.hideTooltip()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\taria-describedby={this.identifier ?? this.tooltipContentId}><slot/></span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showTooltip()\n\t}\n\n\t/**\n\t * Hiding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.persist = false\n\t\tthis.hideTooltip()\n\t}\n}\n"],"mappings":"2XAsBaA,EAAU,MAKtB,WAAAC,CAAAC,G,UAHiBC,KAAAC,iBAAmBC,UACnBF,KAAAG,UAAYD,U,WAYeE,EAAcC,Q,UAIhBC,EAAYC,G,cAIC,Q,aAIpBL,U,oCAQaA,U,aAE7B,MA/BlBF,KAAKQ,EAAIC,EAAQT,KAAKU,MACtBV,KAAKG,UAAYQ,EAAS,cAC1BX,KAAKC,iBAAmBU,EAAS,oB,CAgClC,aAAAC,CAAcC,GACbC,EAAaV,EAAeS,EAAUE,EAAaC,K,CAIpD,YAAAC,CAAaJ,GACZC,EAAaR,EAAaO,EAAUE,EAAaC,K,CAIlD,gBAAAE,CAAiBL,GAChBC,EAAaK,EAAiBN,EAAUE,EAAaC,K,CAItD,eAAAI,GACCpB,KAAKqB,sB,CAGN,iBAAAC,GACCtB,KAAKqB,uBACLrB,KAAKuB,mB,CAGN,iBAAAC,GACCxB,KAAKY,cAAcZ,KAAKyB,OACxBzB,KAAKiB,aAAajB,KAAK0B,MACvB1B,KAAKkB,iBAAiBlB,KAAK2B,S,CAG5B,kBAAAC,GACC5B,KAAKqB,sB,CAGN,oBAAAQ,GACC7B,KAAK8B,e,CAGE,oBAAAT,G,MACP,GAAIrB,KAAK+B,eAAgB,CACxB,GAAI/B,KAAKgC,QAAS,CACjBhC,KAAK+B,eAAeE,UAAYjC,KAAKgC,O,MAC/B,GAAIhC,KAAKkC,cA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AW,SAC5CvC,KAAK+B,eAAewD,gBAAgB,Q,EAI9B,aAAAzD,GACP,MAAM0D,EAAYhC,SAASiC,eAAezF,KAAKC,kBAC/C,GAAIuF,EAAW,CACdA,EAAUE,Q,EAIZ,MAAAC,G,MACC,OACCnF,EAACoF,EAAI,CAAAC,IAAA,2CACJC,GAAI9F,KAAKG,UACT4F,MAAO/F,KAAKQ,EAAEwF,QAAQjF,EAAaC,MACnCW,SAAU3B,KAAK2B,UACfnB,EAAA,QAAAqF,IAAA,2CAAMI,KAAM,SACTC,SAAU,EACVC,WAAY,IAAMnG,KAAKiD,cACvBmD,OAAQ,KACP,GAAIpG,KAAKgD,UAAY,MAAO,CAC3BhD,KAAKkD,a,GAEN,oBACiBV,EAAAxC,KAAKyC,cAAU,MAAAD,SAAA,EAAAA,EAAIxC,KAAKC,kBAAkBO,EAAA,QAAAqF,IAAA,8C,CASlE,UAAMQ,GACLrG,KAAKiD,a,CAON,UAAMqD,GACLtG,KAAKgD,QAAU,MACfhD,KAAKkD,a","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,h as t,a as s,g as i}from"./p-8506b611.js";import{c as a}from"./p-cd6c2938.js";import{g as r,t as d}from"./p-ea7fdd2e.js";import{a as n,T as h}from"./p-860520b0.js";import"./p-e0e2e9c1.js";import"./p-92f420cb.js";import"./p-5aad3497.js";const c=class{constructor(t){e(this,t);this.identifier=undefined;this.triggerIdentifier=undefined;this.label=undefined;this.disabled=false;this.iconStart=undefined;this.iconEnd=undefined;this.default=false;this.isActive=false;this.h=r(this.host);this.contentId=a("GovTabContent");this.triggerId=a("GovTabTrigger")}rerenderParent(){const e=this.h.getParent(n.root);if(e){e.rerender().catch()}}render(){return t(s,{key:"7cf18cf8a10a4c03dd51922e31e18dac86aa217d",class:this.h.classes(h.root),default:this.default},t("div",{key:"3a707d9494c5055c3763f4cdf840522fae5e7a2a",class:h.inner,role:"tabpanel",id:this.identifier||this.contentId,hidden:!this.isActive,"aria-labelledby":this.triggerIdentifier||this.triggerId,"aria-hidden":d(!this.isActive)},t("slot",{key:"289b661851fc6d68a5d6dd376a6e31b691e25aea"})))}async getIdentifier(){return this.identifier||this.contentId}async getTriggerIdentifier(){return this.triggerIdentifier||this.triggerId}async getDisableState(){return this.disabled}async setActiveStatus(e){this.isActive=e}get host(){return i(this)}static get watchers(){return{label:["rerenderParent"],disabled:["rerenderParent"]}}};export{c as gov_tabs_item};
|
|
2
|
+
//# sourceMappingURL=p-0be19b89.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as s,h as o,a as i,g as e}from"./p-8506b611.js";import{g as a,c as n}from"./p-ea7fdd2e.js";import{F as c}from"./p-1c1d0bbe.js";import{v as r}from"./p-0b3574c2.js";import{C as h}from"./p-5aad3497.js";import{p as l}from"./p-e0e2e9c1.js";import{A as d,a as f}from"./p-9ac55bd1.js";import{i as b}from"./p-d9a299a4.js";import"./p-e8ec030e.js";const p=l(h,["PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);var m;(function(t){t["BOLD"]="bold";t["SUBTLE"]="subtle"})(m||(m={}));const v={root:"gov-infobar",section:"gov-infobar__section",content:"gov-infobar__content",headline:"gov-infobar__headline",close:"gov-infobar__close"};const g=class{constructor(o){t(this,o);this.govClose=s(this,"gov-close",7);this.color="primary";this.type="bold";this.role=undefined;this.accessibleCloseLabel="Zavřít informační lištu";this.accessibleToggleLabel="Zobrazit více informací";this.closable=false;this.toggleContent=false;this.inheritedAttributes={};this.h=a(this.host)}validateColor(t){r(p,t,v.root)}componentDidLoad(){this.attributeObserver=new d(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(f)}componentWillLoad(){this.validateColor(this.color);this.inheritedAttributes=b(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){const t=o("gov-button",{key:"4569d98296984f33ff83947f92a95a0a3bf0d3e3",size:"s","aria-label":this.accessibleCloseLabel,type:"base",color:this.isBold?this.color:"neutral","on-gov-click":this.onCloseHandler.bind(this),class:v.close},o("gov-icon",{key:"aafcdbde7ca0e13d9e733036da6cc6085143966d",name:"x-lg",type:"components"}));return o(i,{key:"9b558a0c786862d032ed6fb5d274fc0c3cdae617",class:this.h.classes(v.root),color:this.color,type:this.type},o("section",Object.assign({key:"9bded4750afdfef6ace0e5a39be2d6283b30d725",class:v.section},this.inheritedAttributes,{role:this.role}),o("slot",{key:"011f9d52f9f971a560fd0220be40b5a221a5f4b3",name:"icon"}),o("div",{key:"d613d4ab22f89da935fe60b866ea262802c5d18f",class:v.content},this.h.hasSlot("headline")?o(c,null,o("div",{class:v.headline},o("slot",{name:"headline"}),o("gov-button",{size:"s",type:"base",color:this.isBold?this.color:"neutral","aria-label":this.accessibleToggleLabel,"on-gov-click":()=>this.toggleContent=!this.toggleContent},o("gov-icon",{name:this.toggleContent?"chevron-up":"chevron-down",type:"components"}))),o("div",{hidden:!this.toggleContent,"aria-hidden":n(this.toggleContent)},o("slot",null))):o("slot",null)),this.closable&&t))}onCloseHandler(t){this.govClose.emit({component:v.root,ref:this.host,originalEvent:t})}get isBold(){return this.type==="bold"}get host(){return e(this)}static get watchers(){return{color:["validateColor"]}}};export{g as gov_infobar};
|
|
2
|
+
//# sourceMappingURL=p-0fdd8929.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["InfobarColors","pick","Colors","InfobarType","InfobarClass","root","section","content","headline","close","GovInfobar","constructor","hostRef","undefined","this","h","govHost","host","validateColor","newValue","validateProp","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","color","inheritedAttributes","inheritAriaAttributes","disconnectedCallback","stopObserving","removeAttribute","Object","assign","render","closeButton","key","size","accessibleCloseLabel","type","isBold","onCloseHandler","bind","class","name","Host","classes","role","hasSlot","Fragment","accessibleToggleLabel","toggleContent","hidden","toBoolAttr","closable","e","govClose","emit","component","ref","originalEvent"],"sources":["../../../packages/core/src/components/gov-infobar/constants.ts","../../../packages/core/src/components/gov-infobar/gov-infobar.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const InfobarColors = pick(Colors, ['PRIMARY', 'SECONDARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING'])\nexport type ColorType = `${ValueOf<typeof InfobarColors>}`\n\nexport enum InfobarType {\n\tBOLD = 'bold',\n\tSUBTLE = 'subtle',\n}\nexport type InfobarTypesType = `${ValueOf<typeof InfobarType>}`\n\nexport const InfobarClass = {\n\troot: 'gov-infobar',\n\tsection: 'gov-infobar__section',\n\tcontent: 'gov-infobar__content',\n\theadline: 'gov-infobar__headline',\n\tclose: 'gov-infobar__close',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch} from '@stencil/core'\nimport {govHost, toBoolAttr} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport Fragment from '../../helpers/Fragment'\nimport {validateProp} from '../../helpers/Validate/props'\nimport {ButtonEvent} from '../gov-button/button/gov-button.types'\nimport {ColorType, InfobarClass, InfobarColors, InfobarTypesType} from './constants'\nimport {InfobarEvent} from './gov-infobar.types'\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-infobar',\n})\nexport class GovInfobar {\n\tprivate h: GovHost\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovInfobarElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly color: ColorType = 'primary'\n\t/**\n\t * Infobar appearance\n\t */\n\t@Prop() readonly type?: InfobarTypesType = \"bold\"\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly role: HTMLElement['role'] = undefined\n\t/**\n\t * Aria label for the closing button. It is mandatory if the infobar is closable\n\t */\n\t@Prop({attribute: 'accessible-close-label'}) readonly accessibleCloseLabel: string = 'Zavřít informační lištu'\n\t/**\n\t * Aria label for the toggle button. It is mandatory if the infobar has headline\n\t */\n\t@Prop({attribute: 'accessible-toggle-label'}) readonly accessibleToggleLabel: string = 'Zobrazit více informací'\n\t/**\n\t * Called when the close button is clicked\n\t */\n\t@Event({eventName: 'gov-close'}) govClose: EventEmitter<InfobarEvent>\n\t/**\n\t * Displays the option to close the infobar\n\t */\n\t@Prop() readonly closable?: boolean = false\n\n\t@State() toggleContent = false\n\t@State() inheritedAttributes: Attributes = {}\n\n\t@Watch('color')\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(InfobarColors, newValue, InfobarClass.root)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\tconst closeButton = (\n\t\t\t<gov-button size=\"s\"\n\t\t\t\t\t\
|
|
1
|
+
{"version":3,"names":["InfobarColors","pick","Colors","InfobarType","InfobarClass","root","section","content","headline","close","GovInfobar","constructor","hostRef","undefined","this","h","govHost","host","validateColor","newValue","validateProp","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","color","inheritedAttributes","inheritAriaAttributes","disconnectedCallback","stopObserving","removeAttribute","Object","assign","render","closeButton","key","size","accessibleCloseLabel","type","isBold","onCloseHandler","bind","class","name","Host","classes","role","hasSlot","Fragment","accessibleToggleLabel","toggleContent","hidden","toBoolAttr","closable","e","govClose","emit","component","ref","originalEvent"],"sources":["../../../packages/core/src/components/gov-infobar/constants.ts","../../../packages/core/src/components/gov-infobar/gov-infobar.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const InfobarColors = pick(Colors, ['PRIMARY', 'SECONDARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING'])\nexport type ColorType = `${ValueOf<typeof InfobarColors>}`\n\nexport enum InfobarType {\n\tBOLD = 'bold',\n\tSUBTLE = 'subtle',\n}\nexport type InfobarTypesType = `${ValueOf<typeof InfobarType>}`\n\nexport const InfobarClass = {\n\troot: 'gov-infobar',\n\tsection: 'gov-infobar__section',\n\tcontent: 'gov-infobar__content',\n\theadline: 'gov-infobar__headline',\n\tclose: 'gov-infobar__close',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch} from '@stencil/core'\nimport {govHost, toBoolAttr} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport Fragment from '../../helpers/Fragment'\nimport {validateProp} from '../../helpers/Validate/props'\nimport {ButtonEvent} from '../gov-button/button/gov-button.types'\nimport {ColorType, InfobarClass, InfobarColors, InfobarTypesType} from './constants'\nimport {InfobarEvent} from './gov-infobar.types'\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-infobar',\n})\nexport class GovInfobar {\n\tprivate h: GovHost\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovInfobarElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly color: ColorType = 'primary'\n\t/**\n\t * Infobar appearance\n\t */\n\t@Prop() readonly type?: InfobarTypesType = \"bold\"\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly role: HTMLElement['role'] = undefined\n\t/**\n\t * Aria label for the closing button. It is mandatory if the infobar is closable\n\t */\n\t@Prop({attribute: 'accessible-close-label'}) readonly accessibleCloseLabel: string = 'Zavřít informační lištu'\n\t/**\n\t * Aria label for the toggle button. It is mandatory if the infobar has headline\n\t */\n\t@Prop({attribute: 'accessible-toggle-label'}) readonly accessibleToggleLabel: string = 'Zobrazit více informací'\n\t/**\n\t * Called when the close button is clicked\n\t */\n\t@Event({eventName: 'gov-close'}) govClose: EventEmitter<InfobarEvent>\n\t/**\n\t * Displays the option to close the infobar\n\t */\n\t@Prop() readonly closable?: boolean = false\n\n\t@State() toggleContent = false\n\t@State() inheritedAttributes: Attributes = {}\n\n\t@Watch('color')\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(InfobarColors, newValue, InfobarClass.root)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\tconst closeButton = (\n\t\t\t<gov-button size=\"s\"\n\t\t\t\t\t\taria-label={this.accessibleCloseLabel}\n\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\tcolor={this.isBold ? this.color : \"neutral\"}\n\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\tclass={InfobarClass.close}>\n\t\t\t\t<gov-icon name=\"x-lg\" type=\"components\"></gov-icon>\n\t\t\t</gov-button>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(InfobarClass.root)} color={this.color} type={this.type}>\n\t\t\t\t<section class={InfobarClass.section} {...this.inheritedAttributes} role={this.role}>\n\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t<div class={InfobarClass.content}>\n\t\t\t\t\t\t{this.h.hasSlot('headline') ? (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<div class={InfobarClass.headline}>\n\t\t\t\t\t\t\t\t\t<slot name={\"headline\"}/>\n\t\t\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\t\t\tcolor={this.isBold ? this.color : \"neutral\"}\n\t\t\t\t\t\t\t\t\t\taria-label={this.accessibleToggleLabel}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => (this.toggleContent = !this.toggleContent)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<gov-icon name={this.toggleContent ? 'chevron-up' : 'chevron-down'} type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div hidden={!this.toggleContent} aria-hidden={toBoolAttr(this.toggleContent)}>\n\t\t\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t{this.closable && closeButton}\n\t\t\t\t</section>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tonCloseHandler(e: CustomEvent<ButtonEvent>) {\n\t\tthis.govClose.emit({\n\t\t\tcomponent: InfobarClass.root,\n\t\t\tref: this.host,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tget isBold(): boolean {\n\t\treturn this.type === \"bold\"\n\t}\n}\n"],"mappings":"kWAIO,MAAMA,EAAgBC,EAAKC,EAAQ,CAAC,UAAW,YAAa,UAAW,QAAS,UAAW,YAGlG,IAAYC,GAAZ,SAAYA,GACXA,EAAA,eACAA,EAAA,kBACA,EAHD,CAAYA,MAAW,KAMhB,MAAMC,EAAe,CAC3BC,KAAM,cACNC,QAAS,uBACTC,QAAS,uBACTC,SAAU,wBACVC,MAAO,sB,MCHKC,EAAU,MAItB,WAAAC,CAAAC,G,yDASoC,U,UAIO,O,UAIEC,U,0BAIwC,0B,2BAIE,0B,cAQjD,M,mBAEb,M,yBACkB,GAnC1CC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAsCvB,aAAAC,CAAcC,GACbC,EAAapB,EAAemB,EAAUf,EAAaC,K,CAGpD,gBAAAgB,GACCP,KAAKQ,kBAAoB,IAAIC,EAAkBT,KAAKG,MAAM,CAACO,EAAeL,KACzEL,KAAKW,sBAAsBD,EAAeL,EAAS,IAGpDL,KAAKQ,kBAAkBI,eAAeC,E,CAGvC,iBAAAC,GACCd,KAAKI,cAAcJ,KAAKe,OACxBf,KAAKgB,oBAAsBC,EAAsBjB,KAAKG,K,CAGvD,oBAAAe,GACClB,KAAKQ,kBAAkBW,e,CAGxB,qBAAAR,CAAsBD,EAAuBL,GAC5CL,KAAKG,KAAKiB,gBAAgBV,GAC1BV,KAAKgB,oBAAmBK,OAAAC,OAAAD,OAAAC,OAAA,GAAOtB,KAAKgB,qBAAmB,CAAEN,CAACA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AIf,GACH,OAAO7B,KAAK4B,OAAS,M","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as s,h as i,a as e,g as h}from"./p-8506b611.js";import{c as a}from"./p-cd6c2938.js";import{v as r}from"./p-0b3574c2.js";import{g as o,e as n,f as d}from"./p-da1db6fd.js";import{g as c,c as l,t as p}from"./p-ea7fdd2e.js";import{F as m}from"./p-1c1d0bbe.js";import{A as f,a as u}from"./p-9ac55bd1.js";import{i as b}from"./p-d9a299a4.js";import"./p-e8ec030e.js";import"./p-e0e2e9c1.js";import"./p-92f420cb.js";import"./p-7f3becc5.js";import"./p-5aad3497.js";import"./p-56efd4a2.js";import"./p-7ba4daf4.js";const v=class{constructor(i){t(this,i);this.govFocus=s(this,"gov-focus",7);this.govBlur=s(this,"gov-blur",7);this.govChange=s(this,"gov-change",7);this.hydrated=false;this.value=undefined;this.noLabel=false;this.checked=false;this.required=false;this.disabled=false;this.name=undefined;this.size="m";this.identifier=undefined;this.invalid=undefined;this.inheritedAttributes={};this.radioId=a("GovRadio");this.h=c(this.host);this.f=o(this.h)}validateSize(t){r(d,t,n.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",l(this.invalid));this.f.passAttrToControl("disabled",l(this.disabled));this.f.passAttrToControl("type","radio")}componentWillLoad(){this.inheritedAttributes=b(this.host)}componentDidLoad(){this.attributeObserver=new f(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(u)}async componentDidRender(){this.f.passAttrToLabel("identifier",this.identifier||this.radioId);this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs()}connectedCallback(){this.hydrated=true}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){const t=t=>{if(this.noLabel){return i("label",{class:n.label},t)}return t};return i(e,{class:n.root,hydrated:this.hydrated,checked:this.checked,size:this.size,invalid:p(this.invalid)},t(i(m,null,i("input",Object.assign({class:n.input,id:this.identifier||this.radioId,type:"radio",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled,onClick:this.onClickHandler.bind(this),onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),ref:t=>this.inputRef=t,required:this.required},this.inheritedAttributes,{"aria-checked":this.checked,"aria-required":p(this.required),"aria-invalid":p(this.invalid),"aria-disabled":p(this.disabled)})),i("span",null,i("slot",{name:"label"})))))}onClickHandler(t){t.stopPropagation()}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:n.root,value:this.value,checked:this.checked,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:n.root,value:this.value,checked:this.checked,originalEvent:t})}onChangeHandler(t){this.checked=t.target.checked;t.stopPropagation();this.govChange.emit({component:n.root,value:this.value,checked:this.checked,originalEvent:t})}async getRef(){return this.inputRef}get host(){return h(this)}static get watchers(){return{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}};export{v as gov_form_radio};
|
|
2
|
+
//# sourceMappingURL=p-1200a32d.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GovFormRadio","constructor","hostRef","this","hydrated","radioId","createID","h","govHost","host","f","govForm","validateSize","newValue","validateProp","FormRadioSizes","FormRadioClass","root","watchControlAttrs","passControlAttrs","passAttrToControl","size","toBoolAttr","invalid","disabled","componentWillLoad","inheritedAttributes","inheritAriaAttributes","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentDidRender","passAttrToLabel","identifier","String","required","connectedCallback","disconnectedCallback","stopObserving","removeAttribute","Object","assign","render","wrapRadio","children","noLabel","class","label","Host","checked","toBoolAttrIfDefined","Fragment","input","id","type","value","name","onClick","onClickHandler","bind","onChange","onChangeHandler","onFocus","onFocusHandler","onBlur","onBlurHandler","ref","el","inputRef","e","stopPropagation","govFocus","emit","component","originalEvent","govBlur","target","govChange","getRef"],"sources":["../../../packages/core/src/components/gov-form/radio/gov-form-radio.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormRadioClass, FormRadioSizes, FormRadioSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport {FormRadioEvent} from \"./gov-form-radio.types\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\n\n@Component({\n\ttag: \"gov-form-radio\",\n})\nexport class GovFormRadio {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly radioId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.radioId = createID(\"GovRadio\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormRadioElement\n\t/**\n\t * Value of radio\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Radio button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the radio component disabled.\n\t * This prevents users from being able to interact with the radio, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Name of the radio.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Radio's size.\n\t */\n\t@Prop() readonly size?: FormRadioSizesType = \"m\"\n\t/**\n\t * Custom radio identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the radio has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormRadioEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormRadioSizes, newValue, FormRadioClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"radio\")\n\t}\n\n\n\tcomponentWillLoad() {\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.radioId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\tconst wrapRadio = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn <label class={FormRadioClass.label}>{children}</label>\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormRadioClass.root} hydrated={this.hydrated} checked={this.checked} size={this.size}\n\t\t\t\t invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapRadio(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={FormRadioClass.input}\n\t\t\t\t\t\t\tid={this.identifier || this.radioId}\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\"/>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n"],"mappings":"6gBAiBaA,EAAY,MASxB,WAAAC,CAAAC,G,sHAFQC,KAAAC,SAAW,M,kCAiBwC,M,aAIX,M,cAKX,M,cAKe,M,8BAQP,I,0EAkCF,GAtE1CD,KAAKE,QAAUC,EAAS,YAExBH,KAAKI,EAAIC,EAAQL,KAAK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L,G,CAQjB,YAAMS,GACL,OAAO/E,KAAKqE,Q","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as a,h as b,a as s}from"./p-8506b611.js";const e={root:"gov-form-password-power",bar:"gov-form-password-power__bar",text:"gov-form-password-power__text"};const c=class{constructor(b){a(this,b);this.power=undefined}render(){return b(s,{key:"9125566cb99bfc49e2e61edb5af71b5b052d6790",class:e.root},b("span",{key:"b293292f3b8faca38bbbd6cb03fdd49d8601aab3",class:e.bar},b("span",{key:"20995fbc87342a8e0db8031b0ff23a9cb01b4068"}),b("span",{key:"4fec375a3f27cc35025c165badbff731c8fb26ab"}),b("span",{key:"426f641b8b8e179e25e8a1006a0afd0394615058"})),b("span",{key:"7aeaf7222b484ad59084bb20fcbff4660cdcb1db",class:e.text},b("slot",{key:"57c3415c9b2dfc688ec5762c33cdad473b8110bd"})))}};export{c as gov_form_password_power};
|
|
2
|
+
//# sourceMappingURL=p-22fa411d.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as s,h as i,a as e,g as a}from"./p-8506b611.js";import{v as h}from"./p-0b3574c2.js";import{T as o,a as r,b as n,c,d as l}from"./p-860520b0.js";import{g as d,c as f,b}from"./p-ea7fdd2e.js";import{h as p}from"./p-2aedc81e.js";import{p as m}from"./p-016bbea6.js";import{A as u,a as y}from"./p-9ac55bd1.js";import{i as g}from"./p-d9a299a4.js";import"./p-e8ec030e.js";import"./p-e0e2e9c1.js";import"./p-92f420cb.js";import"./p-5aad3497.js";const v=class{constructor(i){t(this,i);this.govChange=s(this,"gov-change",7);this.triggerRefs={};this.type="text";this.size="m";this.color="primary";this.orientation="horizontal";this.direction="row";this.controllers=[];this.focusIndex=0;this.inheritedAttributes={};this.h=d(this.host)}validateType(t){h(n,t,r.root)}validateColor(t){h(c,t,r.root)}validateSize(t){h(l,t,r.root)}componentDidLoad(){this.attributeObserver=new u(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(y)}componentWillLoad(){this.prepareControllers();this.validateSize(this.size);this.inheritedAttributes=g(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}prepareControllers(t=false){this.controllers=[];const s=[];this.host.querySelectorAll(o.root).forEach((t=>{const i=Promise.all([t.getIdentifier(),t.getTriggerIdentifier(),t.getDisableState()]).then((([s,i,e])=>{const a=typeof t.getAttribute("default")==="string";const h=m(t.getAttribute("icon-start"));const o=m(t.getAttribute("icon-end"));return{label:t.getAttribute("label"),direction:t.getAttribute("direction"),contentIdentifier:s,disabled:e,triggerIdentifier:i,element:t,active:false,default:a,iconStart:h,iconEnd:o}}));s.push(i)}));Promise.all(s).then((s=>{if(t===false){let t=s.findIndex((t=>t.default));if(t===-1)t=0;this.focusIndex=t;s[t].active=true}else if(this.focusIndex>-1&&p(s,this.focusIndex)){s[this.focusIndex].active=true}const i=s.findIndex((t=>t.active&&t.disabled));if(i>-1){s[i].active=false;const t=s.findIndex((t=>!t.disabled));if(t>-1){s[t].active=true;this.focusIndex=t}}this.controllers=[...s];this.reRender()}))}setActiveByIdentifier(t){const s=[];this.controllers.map((i=>{i.active=t===i.triggerIdentifier||t===i.contentIdentifier;s.push(i)}));this.controllers=[...s]}reRender(){this.controllers.map((t=>{t.element.setActiveStatus(t.active).catch()}))}render(){return i(e,{key:"75a6dc2d1bb8afb13e3d63b44bdd00e230a49fe6",class:this.h.classes(r.root),size:this.size,color:this.color,type:this.type,direction:this.direction,onKeyDown:this.onKeydownHandler.bind(this)},i("div",Object.assign({key:"1fc7ff9eafaaab713727787a1bb0c7364ad3cf4e",class:r.tabs,role:"tablist"},this.inheritedAttributes),i("ul",{key:"82a67f585c9a394175bb64be57e669d886b3d4f6",class:r.list},this.controllers.map((t=>i("li",{class:r.item},this.type=="text"?i("button",{class:r.btn,id:t.triggerIdentifier,role:"tab",onClick:()=>this.onSelectHandler(t),disabled:t.disabled,"aria-disabled":f(t.disabled),"aria-selected":f(t.active),"aria-controls":t.contentIdentifier,tabindex:t.active&&!t.disabled?0:-1,ref:s=>this.triggerRefs[t.triggerIdentifier]=s},t.iconStart?i("gov-icon",{name:t.iconStart.name,type:t.iconStart.type}):null,t.label,t.iconEnd?i("gov-icon",{name:t.iconEnd.name,type:t.iconEnd.type}):null):i("gov-chip",{role:"tab",tag:"button",identifier:t.triggerIdentifier,"aria-selected":b(t.active),"aria-controls":t.contentIdentifier,focusable:t.active,disabled:t.disabled,color:this.color,size:this.size==="xs"?"xs":this.size==="s"?"s":"m",type:t.active?"solid":"outlined",ref:s=>this.triggerRefs[t.triggerIdentifier]=s,"on-gov-click":()=>this.onSelectHandler(t)},t.iconStart?i("gov-icon",{name:t.iconStart.name,type:t.iconStart.type,slot:"icon-start"}):null,t.label,t.iconEnd?i("gov-icon",{name:t.iconEnd.name,type:t.iconEnd.type,slot:"icon-end"}):null)))))),i("slot",{key:"8af7e27c0410ba9a4c0f79a1c44275e5811e9463"}))}getCurrentTab(){return this.controllers.find((t=>t.active))||null}onSelectHandler(t){const s=this.controllers.findIndex((s=>s.triggerIdentifier===t.triggerIdentifier));this.focusIndex=s;this.setActiveByIdentifier(t.triggerIdentifier);this.reRender();this.govChange.emit(this.getCurrentTab().element)}onKeydownHandler(t){const s=t.keyCode;t.stopPropagation();this.goToPrevNext(s)}goToPrevNext(t){if([37,38,39,40].includes(t)){if(false===(this.focusIndex>=0&&this.focusIndex<=this.controllers.length-1)){return}this.controllers[this.focusIndex].active=false;if(t===39||t===40){this.focusIndex++;if(this.focusIndex>=this.controllers.length){this.focusIndex=0}if(this.controllers[this.focusIndex].disabled){this.goToPrevNext(40)}}else if(t===37||t===38){this.focusIndex--;if(this.focusIndex<0){this.focusIndex=this.controllers.length-1}if(this.controllers[this.focusIndex].disabled){this.goToPrevNext(38)}}if(this.focusIndex>=0&&this.focusIndex<=this.controllers.length-1){const t=this.controllers[this.focusIndex];t.active=true;const s=this.triggerRefs[t.triggerIdentifier];if(s.nodeName.toLowerCase()==="gov-chip"){this.triggerRefs[t.triggerIdentifier].setFocus()}else{this.triggerRefs[t.triggerIdentifier].focus()}this.controllers=[...this.controllers];this.reRender();this.govChange.emit(this.getCurrentTab().element)}}}async refresh(){this.prepareControllers()}async currentTab(){return this.getCurrentTab().element||null}async setActiveTab(t){this.setActiveByIdentifier(t);this.reRender()}async rerender(){this.prepareControllers(true)}get host(){return a(this)}static get watchers(){return{type:["validateType"],color:["validateColor"],size:["validateSize"]}}};export{v as gov_tabs};
|
|
2
|
+
//# sourceMappingURL=p-2739fa61.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GovTabs","constructor","hostRef","this","triggerRefs","h","govHost","host","validateType","newValue","validateProp","TabTypes","TabsClass","root","validateColor","TabColors","validateSize","TabSizes","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","prepareControllers","size","inheritedAttributes","inheritAriaAttributes","disconnectedCallback","stopObserving","removeAttribute","Object","assign","skipDefault","controllers","promises","querySelectorAll","TabsItemClass","forEach","tab","controlItem","Promise","all","getIdentifier","getTriggerIdentifier","getDisableState","then","identifier","triggerIdentifier","disabled","isDefault","getAttribute","iconStart","prepareIconFormat","iconEnd","label","direction","contentIdentifier","element","active","default","push","defaultTabIndex","findIndex","controller","focusIndex","hasOwnProperty","isWrongCombination","firstGoodTab","reRender","setActiveByIdentifier","temp","map","item","control","setActiveStatus","catch","render","Host","key","class","classes","color","type","onKeyDown","onKeydownHandler","bind","tabs","role","list","btn","id","onClick","onSelectHandler","toBoolAttr","tabindex","ref","el","name","tag","booleanString","focusable","slot","getCurrentTab","find","index","t","govChange","emit","e","keyCode","stopPropagation","goToPrevNext","includes","length","current","trigger","nodeName","toLowerCase","setFocus","focus","refresh","currentTab","setActiveTab","rerender"],"sources":["../../../packages/core/src/components/gov-tabs/gov-tabs.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tColorType,\n\tTabColors,\n\tTabOrientationType,\n\tTabsClass,\n\tTabsItemClass,\n\tTabSizes,\n\tTabSizeType,\n\tTabType,\n\tTabTypes\n} from \"./constants\"\nimport {GovTabControllerItem} from \"./gov-tabs.types\"\nimport {booleanString, govHost, toBoolAttr} from \"../../helpers/Dom/template\"\nimport {Nullable} from \"../../types/interfaces\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {hasOwnProperty} from \"../../utils/helpers.types\";\nimport {prepareIconFormat} from \"../gov-icon/helpers\";\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n\n@Component({\n\ttag: \"gov-tabs\",\n})\nexport class GovTabs {\n\tprivate h: GovHost\n\tprivate triggerRefs: Record<string, HTMLButtonElement | HTMLGovChipElement> = {}\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovTabsElement\n\t/**\n\t * Tabs type\n\t */\n\t@Prop() readonly type: TabType = \"text\"\n\t/**\n\t * Tabs size.\n\t */\n\t@Prop() readonly size?: TabSizeType = 'm'\n\t/**\n\t * Style variation of the tab chips.\n\t */\n\t@Prop() readonly color?: ColorType = \"primary\"\n\t/**\n\t * Tabs orientation\n\t */\n\t@Prop() readonly orientation: TabOrientationType = \"horizontal\"\n\t/**\n\t * Icon and description display direction\n\t */\n\t@Prop({reflect: true}) readonly direction: 'row' | 'column' = 'row'\n\t/**\n\t * Emitted when the tab is changed.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<HTMLGovTabsItemElement>\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(TabTypes, newValue, TabsClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TabColors, newValue, TabsClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TabSizes, newValue, TabsClass.root)\n\t}\n\n\t@State() controllers: GovTabControllerItem[] = []\n\t@State() focusIndex = 0\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.prepareControllers()\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate prepareControllers(skipDefault = false): void {\n\t\tthis.controllers = []\n\t\tconst promises: Promise<GovTabControllerItem>[] = []\n\t\tthis.host.querySelectorAll(TabsItemClass.root).forEach((tab: HTMLGovTabsItemElement) => {\n\t\t\tconst controlItem = Promise.all([\n\t\t\t\ttab.getIdentifier(),\n\t\t\t\ttab.getTriggerIdentifier(),\n\t\t\t\ttab.getDisableState()\n\t\t\t]).then(([identifier, triggerIdentifier, disabled]) => {\n\t\t\t\tconst isDefault = typeof tab.getAttribute(\"default\") === \"string\"\n\t\t\t\tconst iconStart = prepareIconFormat(tab.getAttribute('icon-start'))\n\t\t\t\tconst iconEnd = prepareIconFormat(tab.getAttribute('icon-end'))\n\t\t\t\treturn {\n\t\t\t\t\tlabel: tab.getAttribute(\"label\"),\n\t\t\t\t\tdirection: tab.getAttribute(\"direction\"),\n\t\t\t\t\tcontentIdentifier: identifier,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\ttriggerIdentifier: triggerIdentifier,\n\t\t\t\t\telement: tab,\n\t\t\t\t\tactive: false,\n\t\t\t\t\tdefault: isDefault,\n\t\t\t\t\ticonStart,\n\t\t\t\t\ticonEnd\n\t\t\t\t}\n\t\t\t})\n\t\t\tpromises.push(controlItem)\n\t\t});\n\t\tPromise.all(promises).then(controllers => {\n\t\t\tif (skipDefault === false) {\n\t\t\t\tlet defaultTabIndex = controllers.findIndex(controller => controller.default)\n\t\t\t\tif (defaultTabIndex === -1) defaultTabIndex = 0\n\t\t\t\tthis.focusIndex = defaultTabIndex\n\t\t\t\tcontrollers[defaultTabIndex].active = true\n\t\t\t} else if (this.focusIndex > -1 && hasOwnProperty(controllers, this.focusIndex)) {\n\t\t\t\tcontrollers[this.focusIndex].active = true\n\t\t\t}\n\t\t\tconst isWrongCombination = controllers.findIndex((controller) => controller.active && controller.disabled)\n\t\t\tif (isWrongCombination > -1) {\n\t\t\t\tcontrollers[isWrongCombination].active = false;\n\t\t\t\tconst firstGoodTab = controllers.findIndex((controller) => !controller.disabled)\n\t\t\t\tif (firstGoodTab > -1) {\n\t\t\t\t\tcontrollers[firstGoodTab].active = true\n\t\t\t\t\tthis.focusIndex = firstGoodTab;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.controllers = [...controllers]\n\t\t\tthis.reRender()\n\t\t})\n\t}\n\n\tprivate setActiveByIdentifier(identifier: string) {\n\t\tconst temp = []\n\t\tthis.controllers.map(item => {\n\t\t\titem.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier\n\t\t\ttemp.push(item)\n\t\t})\n\t\tthis.controllers = [...temp]\n\t}\n\n\tprivate reRender() {\n\t\tthis.controllers.map(control => {\n\t\t\tcontrol.element.setActiveStatus(control.active).catch()\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TabsClass.root)}\n\t\t\t\tsize={this.size}\n\t\t\t\tcolor={this.color}\n\t\t\t\ttype={this.type}\n\t\t\t\tdirection={this.direction}\n\t\t\t\tonKeyDown={this.onKeydownHandler.bind(this)}\n\t\t\t>\n\t\t\t\t<div class={TabsClass.tabs}\n\t\t\t\t\t role=\"tablist\"\n\t\t\t\t\t {...this.inheritedAttributes}>\n\t\t\t\t\t<ul class={TabsClass.list}>\n\t\t\t\t\t\t{this.controllers.map(control => (\n\t\t\t\t\t\t\t<li class={TabsClass.item}>\n\t\t\t\t\t\t\t\t{this.type == \"text\" ? (\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass={TabsClass.btn}\n\t\t\t\t\t\t\t\t\t\tid={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\taria-disabled={toBoolAttr(control.disabled)}\n\t\t\t\t\t\t\t\t\t\taria-selected={toBoolAttr(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\ttabindex={control.active && !control.disabled ? 0 : -1}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLButtonElement)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.iconStart ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconStart.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconStart.type}></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t\t{control.iconEnd ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconEnd.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconEnd.type}></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<gov-chip\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\ttag={'button'}\n\t\t\t\t\t\t\t\t\t\tidentifier={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\taria-selected={booleanString(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\tfocusable={control.active}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\t\t\t\t\tsize={this.size === \"xs\" ? \"xs\" : (this.size === \"s\" ? \"s\" : \"m\")}\n\t\t\t\t\t\t\t\t\t\ttype={control.active ? \"solid\" : \"outlined\"}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLGovChipElement)}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.iconStart ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconStart.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconStart.type}\n\t\t\t\t\t\t\t\t\t\t\tslot=\"icon-start\"></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t\t{control.iconEnd ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconEnd.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconEnd.type}\n\t\t\t\t\t\t\t\t\t\t\tslot=\"icon-end\"></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t</gov-chip>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate getCurrentTab(): GovTabControllerItem | null {\n\t\treturn this.controllers.find(control => control.active) || null\n\t}\n\n\tprivate onSelectHandler(control: GovTabControllerItem) {\n\t\tconst index = this.controllers.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);\n\t\tthis.focusIndex = index\n\t\tthis.setActiveByIdentifier(control.triggerIdentifier)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onKeydownHandler(e: KeyboardEvent) {\n\t\tconst keyCode = e.keyCode\n\n\t\te.stopPropagation()\n\t\tthis.goToPrevNext(keyCode)\n\t}\n\n\tprivate goToPrevNext(keyCode: number) {\n\t\tif ([37, 38, 39, 40].includes(keyCode)) {\n\t\t\tif (false === (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1)) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.controllers[this.focusIndex].active = false\n\n\t\t\tif (keyCode === 39 || keyCode === 40) {\n\t\t\t\tthis.focusIndex++\n\t\t\t\tif (this.focusIndex >= this.controllers.length) {\n\t\t\t\t\tthis.focusIndex = 0\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(40)\n\t\t\t\t}\n\t\t\t} else if (keyCode === 37 || keyCode === 38) {\n\t\t\t\tthis.focusIndex--\n\t\t\t\tif (this.focusIndex < 0) {\n\t\t\t\t\tthis.focusIndex = this.controllers.length - 1\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(38)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1) {\n\t\t\t\tconst current = this.controllers[this.focusIndex]\n\t\t\t\tcurrent.active = true\n\t\t\t\tconst trigger = this.triggerRefs[current.triggerIdentifier]\n\t\t\t\tif (trigger.nodeName.toLowerCase() === 'gov-chip') {\n\t\t\t\t\t(this.triggerRefs[current.triggerIdentifier] as HTMLGovChipElement).setFocus()\n\t\t\t\t} else {\n\t\t\t\t\tthis.triggerRefs[current.triggerIdentifier].focus()\n\t\t\t\t}\n\n\t\t\t\tthis.controllers = [...this.controllers]\n\t\t\t\tthis.reRender()\n\t\t\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync refresh(): Promise<void> {\n\t\tthis.prepareControllers()\n\t}\n\n\t/**\n\t * Returns the currently selected tabs-item\n\t */\n\t@Method()\n\tasync currentTab(): Promise<Nullable<HTMLGovTabsItemElement>> {\n\t\treturn this.getCurrentTab().element || null\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync setActiveTab(identifier: string): Promise<void> {\n\t\tthis.setActiveByIdentifier(identifier)\n\t\tthis.reRender()\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync rerender(): Promise<void> {\n\t\tthis.prepareControllers(true);\n\t}\n}\n"],"mappings":"ycA2BaA,EAAO,MAKnB,WAAAC,CAAAC,G,gDAHQC,KAAAC,YAAsE,G,UAW7C,O,UAIK,I,WAID,U,iBAIc,a,eAIW,M,iBAqBf,G,gBACzB,E,yBACqB,GA9C1CD,KAAKE,EAAIC,EAAQH,KAAKI,K,CA8BvB,YAAAC,CAAaC,GACZC,EAAaC,EAAUF,EAAUG,EAAUC,K,CAI5C,aAAAC,CAAcL,GACbC,EAAaK,EAAWN,EAAUG,EAAUC,K,CAI7C,YAAAG,CAAaP,GACZC,EAAaO,EAAUR,EAAUG,EAAUC,K,CAO5C,gBAAAK,GACCf,KAAKgB,kBAAoB,IAAIC,EAAkBjB,KAAKI,MAAM,CAACc,EAAeZ,KACzEN,KAAKmB,sBAAsBD,EAAeZ,EAAS,IAGpDN,KAAKgB,k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,gBAAkB,WAAY,CACjDrH,KAAKC,YAAYiH,EAAQnE,mBAA0CuE,U,KAC9D,CACNtH,KAAKC,YAAYiH,EAAQnE,mBAAmBwE,O,CAG7CvH,KAAKiC,YAAc,IAAIjC,KAAKiC,aAC5BjC,KAAKoE,WACLpE,KAAK0G,UAAUC,KAAK3G,KAAKsG,gBAAgB7C,Q,GAS5C,aAAM+D,GACLxH,KAAKuB,oB,CAON,gBAAMkG,GACL,OAAOzH,KAAKsG,gBAAgB7C,SAAW,I,CAOxC,kBAAMiE,CAAa5E,GAClB9C,KAAKqE,sBAAsBvB,GAC3B9C,KAAKoE,U,CAON,cAAMuD,GACL3H,KAAKuB,mBAAmB,K","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{g as e,d as t}from"./p-e8ec030e.js";import{s as r}from"./p-cd6c2938.js";import{i}from"./p-2aedc81e.js";const n=(t,r,i)=>{if(t===undefined||String(t).length===0){e(`[${i}]: The (${r}) attribute is important for correct accessibility.`)}};const a=(i,n,a)=>{if(typeof i==="undefined"||i===undefined){return true}if(String(i).length===0){e(`[${a}]: Attribute (${n}) is defined with an empty value.`);return false}let s=[];const f=r(i);if(Array.isArray(f)){s=f.filter((function(e){return e.trim().length>0}))}return!!s.filter((e=>{if(t().getElementById(e)===null){return false}else{return true}})).length};const s=(r,n,a,s=undefined)=>{if(i(r)&&r.length>0){return true}if(typeof n==="string"&&n.length>0){const e=t().getElementById(n);if(e){return true}}e(`[${a}]: The element has no defined aria-label or aria-labelledby attribute.`,s);return false};export{a,n as b,s as v};
|
|
2
|
+
//# sourceMappingURL=p-29ac15d2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["validateWcagProp","value","propName","component","undefined","String","length","govWarningLog","validateWcagRef","referenceId","name","strings","referenceIds","splitByWhitespace","Array","isArray","filter","e","trim","documentNode","getElementById","validateAccessibleLabel","label","labelledBy","el","isString","labelledByEl"],"sources":["../../../packages/core/src/helpers/Validate/wcag.ts"],"sourcesContent":["import {govWarningLog} from '../Log/gov.log'\nimport {splitByWhitespace} from '../../utils/string.utils'\nimport {documentNode} from '../Dom/win'\nimport {isString} from \"../../utils/helpers.types\";\n\nexport const validateWcagProp = (value: string | undefined, propName: string, component: string): void => {\n\tif (value === undefined || String(value).length === 0) {\n\t\tgovWarningLog(`[${component}]: The (${propName}) attribute is important for correct accessibility.`)\n\t}\n}\n\nexport const validateWcagRef = (referenceId: string, name: string, component: string): boolean => {\n\tif (typeof referenceId === 'undefined' || referenceId === undefined) {\n\t\treturn true\n\t}\n\tif (String(referenceId).length === 0) {\n\t\tgovWarningLog(`[${component}]: Attribute (${name}) is defined with an empty value.`)\n\t\treturn false\n\t}\n\tlet strings = []\n\tconst referenceIds = splitByWhitespace(referenceId)\n\tif (Array.isArray(referenceIds)) {\n\t\tstrings = referenceIds.filter(function (e) {\n\t\t\treturn e.trim().length > 0\n\t\t})\n\t}\n\n\treturn !!strings.filter(referenceId => {\n\t\tif (documentNode().getElementById(referenceId) === null) {\n\t\t\t//govWarningLog(`[${component}][${name}]: Reference to element with id (${referenceId}) does not exist.`)\n\t\t\treturn false\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}).length\n}\n\nexport const validateWcagLabelFor = (inputId: string, labelledBy: string | undefined, component: string): boolean => {\n\tconst labelEl = documentNode().querySelector(`[for=${inputId}]`)\n\tif (labelEl === null) {\n\t\tconst labelledByEl = documentNode().getElementById(labelledBy)\n\t\tif (labelledByEl === null) {\n\t\t\tgovWarningLog(`[${component}]: The form element has no defined wcag-label or wcag-labelled-by attribute.`)\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\nexport const validateAccessibleLabel = (label: string | undefined, labelledBy: string | undefined, component: string, el: HTMLElement = undefined): boolean => {\n\tif (isString(label) && label.length > 0) {\n\t\treturn true\n\t}\n\tif (typeof labelledBy === 'string' && labelledBy.length > 0) {\n\t\tconst labelledByEl = documentNode().getElementById(labelledBy)\n\t\tif (labelledByEl) {\n\t\t\treturn true\n\t\t}\n\t}\n\tgovWarningLog(`[${component}]: The element has no defined aria-label or aria-labelledby attribute.`, el)\n\treturn false\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["validateWcagProp","value","propName","component","undefined","String","length","govWarningLog","validateWcagRef","referenceId","name","strings","referenceIds","splitByWhitespace","Array","isArray","filter","e","trim","documentNode","getElementById","validateAccessibleLabel","label","labelledBy","el","isString","labelledByEl"],"sources":["../../../packages/core/src/helpers/Validate/wcag.ts"],"sourcesContent":["import {govWarningLog} from '../Log/gov.log'\nimport {splitByWhitespace} from '../../utils/string.utils'\nimport {documentNode} from '../Dom/win'\nimport {isString} from \"../../utils/helpers.types\";\n\nexport const validateWcagProp = (value: string | undefined, propName: string, component: string): void => {\n\tif (value === undefined || String(value).length === 0) {\n\t\tgovWarningLog(`[${component}]: The (${propName}) attribute is important for correct accessibility.`)\n\t}\n}\n\nexport const validateWcagRef = (referenceId: string, name: string, component: string): boolean => {\n\tif (typeof referenceId === 'undefined' || referenceId === undefined) {\n\t\treturn true\n\t}\n\tif (String(referenceId).length === 0) {\n\t\tgovWarningLog(`[${component}]: Attribute (${name}) is defined with an empty value.`)\n\t\treturn false\n\t}\n\tlet strings = []\n\tconst referenceIds = splitByWhitespace(referenceId)\n\tif (Array.isArray(referenceIds)) {\n\t\tstrings = referenceIds.filter(function (e) {\n\t\t\treturn e.trim().length > 0\n\t\t})\n\t}\n\n\treturn !!strings.filter(referenceId => {\n\t\tif (documentNode().getElementById(referenceId) === null) {\n\t\t\t//govWarningLog(`[${component}][${name}]: Reference to element with id (${referenceId}) does not exist.`)\n\t\t\treturn false\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}).length\n}\n\nexport const validateWcagLabelFor = (inputId: string, labelledBy: string | undefined, component: string): boolean => {\n\tconst labelEl = documentNode().querySelector(`[for=${inputId}]`)\n\tif (labelEl === null) {\n\t\tconst labelledByEl = documentNode().getElementById(labelledBy)\n\t\tif (labelledByEl === null) {\n\t\t\tgovWarningLog(`[${component}]: The form element has no defined wcag-label or wcag-labelled-by attribute.`)\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\nexport const validateAccessibleLabel = (label: string | undefined, labelledBy: string | undefined, component: string, el: HTMLElement = undefined): boolean => {\n\tif (isString(label) && label.length > 0) {\n\t\treturn true\n\t}\n\tif (typeof labelledBy === 'string' && labelledBy.length > 0) {\n\t\tconst labelledByEl = documentNode().getElementById(labelledBy)\n\t\tif (labelledByEl) {\n\t\t\treturn true\n\t\t}\n\t}\n\tgovWarningLog(`[${component}]: The element has no defined aria-label or aria-labelledby attribute.`, el)\n\treturn false\n}\n"],"mappings":"oHAKaA,EAAmB,CAACC,EAA2BC,EAAkBC,KAC7E,GAAIF,IAAUG,WAAaC,OAAOJ,GAAOK,SAAW,EAAG,CACtDC,EAAc,IAAIJ,YAAoBD,uD,SAI3BM,EAAkB,CAACC,EAAqBC,EAAcP,KAClE,UAAWM,IAAgB,aAAeA,IAAgBL,UAAW,CACpE,OAAO,I,CAER,GAAIC,OAAOI,GAAaH,SAAW,EAAG,CACrCC,EAAc,IAAIJ,kBAA0BO,sCAC5C,OAAO,K,CAER,IAAIC,EAAU,GACd,MAAMC,EAAeC,EAAkBJ,GACvC,GAAIK,MAAMC,QAAQH,GAAe,CAChCD,EAAUC,EAAaI,QAAO,SAAUC,GACvC,OAAOA,EAAEC,OAAOZ,OAAS,C,IAI3B,QAASK,EAAQK,QAAOP,IACvB,GAAIU,IAAeC,eAAeX,KAAiB,KAAM,CAExD,OAAO,K,KACD,CACN,OAAO,I,KAENH,MAAM,E,MAeGe,EAA0B,CAACC,EAA2BC,EAAgCpB,EAAmBqB,EAAkBpB,aACvI,GAAIqB,EAASH,IAAUA,EAAMhB,OAAS,EAAG,CACxC,OAAO,I,CAER,UAAWiB,IAAe,UAAYA,EAAWjB,OAAS,EAAG,CAC5D,MAAMoB,EAAeP,IAAeC,eAAeG,GACnD,GAAIG,EAAc,CACjB,OAAO,I,EAGTnB,EAAc,IAAIJ,0EAAmFqB,GACrG,OAAO,KAAK,S","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as s,h as t,a as e,g as r}from"./p-8506b611.js";import{a}from"./p-13ebd887.js";import{g as o}from"./p-ea7fdd2e.js";const c=class{constructor(t){s(this,t);this.h=o(this.host)}render(){return t(e,{key:"8566cc892984b1ce728c679107e228d8320f3048",class:this.h.classes(a.root)},t("slot",{key:"e3a085ef568fa75ef813b775344adbd6f4ef2773"}))}get host(){return r(this)}};export{c as gov_layout_column};
|
|
2
|
+
//# sourceMappingURL=p-30eaeeec.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{S as o}from"./p-92f420cb.js";import{C as s}from"./p-5aad3497.js";import{p as t}from"./p-e0e2e9c1.js";const a=t(o,["_XS","_S","_M","_L","_XL"]);const n=t(s,["PRIMARY","SECONDARY","NEUTRAL","SUCCESS","ERROR","WARNING"]);var r;(function(o){o["SOLID"]="solid";o["OUTLINED"]="outlined";o["BASE"]="base";o["LINK"]="link"})(r||(r={}));var e;(function(o){o["SUBMIT"]="submit";o["BUTTON"]="button";o["RESET"]="reset"})(e||(e={}));var i;(function(o){o["BLANK"]="_blank";o["SELF"]="_self";o["NEW"]="_new"})(i||(i={}));const c={root:"gov-button"};export{c as B,e as N,n as a,a as b,r as c};
|
|
2
|
+
//# sourceMappingURL=p-3bbb77a0.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as s,c as i,h as t,a as e,g as h}from"./p-8506b611.js";import{c as a}from"./p-cd6c2938.js";import{v as n}from"./p-0b3574c2.js";import{g as o,h as r,i as c}from"./p-da1db6fd.js";import{g as d,c as l,t as p}from"./p-ea7fdd2e.js";import{F as m}from"./p-1c1d0bbe.js";import{A as f,a as u}from"./p-9ac55bd1.js";import{i as b}from"./p-d9a299a4.js";import"./p-e8ec030e.js";import"./p-e0e2e9c1.js";import"./p-92f420cb.js";import"./p-7f3becc5.js";import"./p-5aad3497.js";import"./p-56efd4a2.js";import"./p-7ba4daf4.js";const g=class{constructor(t){s(this,t);this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govChange=i(this,"gov-change",7);this.hydrated=false;this.value=undefined;this.noLabel=false;this.checked=false;this.required=false;this.disabled=false;this.name=undefined;this.size="m";this.identifier=undefined;this.invalid=undefined;this.inheritedAttributes={};this.checkboxId=a("GovCheckbox");this.h=d(this.host);this.f=o(this.h)}validateSize(s){n(c,s,r.root)}watchDisabled(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",l(this.invalid));this.f.passAttrToControl("disabled",l(this.disabled));this.f.passAttrToControl("type","switch")}componentDidLoad(){this.attributeObserver=new f(this.host,((s,i)=>{this.onAriaAttributeChange(s,i)}));this.attributeObserver.startObserving(u)}componentWillLoad(){this.passControlAttrs();this.inheritedAttributes=b(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}async componentDidRender(){this.f.passAttrToLabel("identifier",this.identifier||this.checkboxId);this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs()}connectedCallback(){this.hydrated=true}onAriaAttributeChange(s,i){this.host.removeAttribute(s);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[s]:i})}render(){const s=s=>{if(this.noLabel){return t("label",{class:r.label},s)}return s};return t(e,{class:this.h.classes(r.root),hydrated:this.hydrated,checked:this.checked,size:this.size,invalid:p(this.invalid)},s(t(m,null,t("input",Object.assign({class:r.input,id:this.identifier||this.checkboxId,type:"checkbox",value:this.value,name:this.name,disabled:this.disabled,checked:this.checked,onClick:this.onClickHandler.bind(this),onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),ref:s=>this.inputRef=s,required:this.required},this.inheritedAttributes,{"aria-checked":this.checked,"aria-required":p(this.required),"aria-invalid":p(this.invalid),"aria-disabled":p(this.disabled)})),t("span",null,t("span",{class:r.indicator},this.checked&&t("gov-icon",{name:"check-lg",type:"components"})),t("slot",{name:"label"})))))}onClickHandler(s){s.stopPropagation()}onFocusHandler(s){s.stopPropagation();this.govFocus.emit({component:r.root,checked:this.checked,value:this.value,originalEvent:s})}onBlurHandler(s){s.stopPropagation();this.govBlur.emit({component:r.root,checked:this.checked,value:this.value,originalEvent:s})}onChangeHandler(s){this.checked=s.target.checked;s.stopPropagation();this.govChange.emit({component:r.root,checked:this.checked,value:this.value,originalEvent:s})}async getRef(){return this.inputRef}get host(){return h(this)}static get watchers(){return{size:["validateSize","watchDisabled"],disabled:["watchDisabled"],invalid:["watchDisabled"]}}};export{g as gov_form_switch};
|
|
2
|
+
//# sourceMappingURL=p-3cb36bae.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GovFormSwitch","constructor","hostRef","this","hydrated","checkboxId","createID","h","govHost","host","f","govForm","validateSize","newValue","validateProp","FormSwitchSizes","FormSwitchClass","root","watchDisabled","passControlAttrs","passAttrToControl","size","toBoolAttr","invalid","disabled","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","inheritedAttributes","inheritAriaAttributes","disconnectedCallback","stopObserving","componentDidRender","passAttrToLabel","identifier","String","required","connectedCallback","removeAttribute","Object","assign","render","wrapCheckbox","children","noLabel","class","label","Host","classes","checked","toBoolAttrIfDefined","Fragment","input","id","type","value","name","onClick","onClickHandler","bind","onChange","onChangeHandler","onFocus","onFocusHandler","onBlur","onBlurHandler","ref","el","inputRef","indicator","e","stopPropagation","govFocus","emit","component","originalEvent","govBlur","target","govChange","getRef"],"sources":["../../../packages/core/src/components/gov-form/switch/gov-form-switch.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormSwitchClass, FormSwitchSizes, FormSwitchSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport {FormSwitchEvent} from \"./gov-form-switch.types\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-form-switch\",\n})\nexport class GovFormSwitch {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly checkboxId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.checkboxId = createID(\"GovCheckbox\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormSwitchElement\n\t/**\n\t * Value of switch\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Switch button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the switch component disabled.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Name of the switch.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Switch's size.\n\t */\n\t@Prop({reflect: true}) readonly size?: FormSwitchSizesType = \"m\"\n\t/**\n\t * Custom switch identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the switch has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormSwitchEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSwitchSizes, newValue, FormSwitchClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"switch\")\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.passControlAttrs()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.checkboxId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\tconst wrapCheckbox = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn (\n\t\t\t\t\t<label class={FormSwitchClass.label}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</label>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FormSwitchClass.root)} hydrated={this.hydrated} checked={this.checked}\n\t\t\t\t size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapCheckbox(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={FormSwitchClass.input}\n\t\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<span class={FormSwitchClass.indicator}>\n\t\t\t\t\t\t\t\t{this.checked && <gov-icon name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: Event) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n"],"mappings":"6gBAiBaA,EAAa,MASzB,WAAAC,CAAAC,G,sHAFQC,KAAAC,SAAW,M,kCAiBwC,M,aAIX,M,cAIX,M,cAIe,M,8BAQS,I,0EAkClB,GApE1CD,KAAKE,WAAaC,EAAS,eAE3BH,KAAKI,EAAIC,EAAQL,KAAKM,MACtBN,KAAKO,EAAIC,EAAQR,KAAKI,E,CAsDvB,YAAAK,CAAaC,GACZC,EAAaC,EAAiBF,EAAUG,EAAgBC,K,CAMzD,aAAAC,GACCf,KAAKgB,k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ZoB,cAAeL,G,CAQjB,YAAMS,GACL,OAAOjF,KAAKsE,Q","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as s,h as i,a as e,g as a}from"./p-8506b611.js";import{g as o,j as h,k as c}from"./p-da1db6fd.js";import{g as n,c as r,t as d}from"./p-ea7fdd2e.js";import{v as l}from"./p-0b3574c2.js";import{c as p}from"./p-cd6c2938.js";import{p as f}from"./p-ded281e6.js";import{t as m}from"./p-26618322.js";import{A as b,a as u}from"./p-9ac55bd1.js";import{i as v}from"./p-d9a299a4.js";import"./p-92f420cb.js";import"./p-e0e2e9c1.js";import"./p-7f3becc5.js";import"./p-5aad3497.js";import"./p-56efd4a2.js";import"./p-7ba4daf4.js";import"./p-e8ec030e.js";import"./p-2aedc81e.js";const g=class{constructor(i){t(this,i);this.govFocus=s(this,"gov-focus",7);this.govBlur=s(this,"gov-blur",7);this.govChange=s(this,"gov-change",7);this.value=undefined;this.options=undefined;this.identifier=undefined;this.size="m";this.name=undefined;this.required=false;this.success=undefined;this.disabled=false;this.invalid=undefined;this.focused=undefined;this.optionsState=[];this.inheritedAttributes={};this.h=n(this.host);this.f=o(this.h);this.selectId=p("GovSelect")}validateSize(t){l(c,t,h.root)}watchOptions(t){this.optionsState=f(t)}watchControlAttrs(){this.passControlAttrs()}watchValue(){this.markSelectedValue()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",r(this.invalid));this.f.passAttrToControl("success",r(this.success));this.f.passAttrToControl("disabled",r(this.disabled));this.f.passAttrToControl("type","select")}componentDidLoad(){this.attributeObserver=new b(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(u)}disconnectedCallback(){this.attributeObserver.stopObserving()}componentWillLoad(){this.validateSize(this.size);this.markSelectedValue();this.optionsState=f(this.options);this.inheritedAttributes=v(this.host)}async componentDidRender(){this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required));m((()=>this.markSelectedValue()))}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}markSelectedValue(){this.host.querySelectorAll("option").forEach((t=>{if(t.value===this.value){t.setAttribute("selected","selected")}else{t.removeAttribute("selected")}}))}render(){return i(e,{key:"b403868aaf854a9dc40f68cf093a8867cd20c4c4",class:h.root,size:this.size},this.h.hasSlot("prefix")&&i("slot",{key:"de3d0cb80bd3b33a9b23b60f91739f0e23fdab4a",name:"prefix"}),i("span",{key:"c501806b949bc6e1314922fce0ce088180fdebba",class:"element"},i("select",Object.assign({key:"7c1a04a65e69edda672d70b101b430d3c6105543",id:this.identifier||this.selectId,onFocus:this.onFocusHandler.bind(this),onChange:this.onChangeHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,name:this.name,disabled:this.disabled,ref:t=>this.selectRef=t},this.inheritedAttributes,{"aria-disabled":d(this.disabled),"aria-required":d(this.required),"aria-invalid":d(this.invalid)}),i("slot",{key:"0bd46e42f5e5267366088b9902a5ef8c6aa99064"}),Array.isArray(this.optionsState)&&this.optionsState.map((t=>{var s;return i("option",{value:t.value,selected:t.value===this.value,disabled:t===null||t===void 0?void 0:t.disabled},(s=t.label)!==null&&s!==void 0?s:t.value)}))),this.success&&i("gov-icon",{key:"8e919bd8dd122618b2b0233c7b14c8def277540f",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&i("gov-icon",{key:"78610616be9cdf65e9bbc1359e27bc9003c8fc34",class:"validation-icon",name:"exclamation-lg",type:"components"}),i("gov-icon",{key:"56c1ca03e5b23154a93056bba8758553a5c93f30",class:"arrow-icon",name:"chevron-down",type:"components"})),this.h.hasSlot("sufix")&&i("slot",{key:"f3e3f1416d15a34402d446e6a72d0607cc8d90fc",name:"sufix"}))}onFocusHandler(t){this.focused=true;this.govFocus.emit({component:h.root,originalEvent:t,value:this.value})}onBlurHandler(t){this.focused=false;this.govBlur.emit({component:h.root,originalEvent:t,value:this.value})}onChangeHandler(t){this.value=t.target.value;t.stopPropagation();this.govChange.emit({component:h.root,originalEvent:t,value:this.value})}async setFocus(t){return this.selectRef.focus(t)}async getRef(){return this.selectRef}get host(){return a(this)}static get watchers(){return{size:["validateSize","watchControlAttrs"],options:["watchOptions"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"],value:["watchValue"]}}};export{g as gov_form_select};
|
|
2
|
+
//# sourceMappingURL=p-3d6edb09.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GovFormSelect","constructor","hostRef","this","h","govHost","host","f","govForm","selectId","createID","validateSize","newValue","validateProp","FormSelectSizes","FormSelectClass","root","watchOptions","optionsState","propsValueToArray","watchControlAttrs","passControlAttrs","watchValue","markSelectedValue","passAttrToControl","size","toBoolAttr","invalid","success","disabled","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","disconnectedCallback","stopObserving","componentWillLoad","options","inheritedAttributes","inheritAriaAttributes","componentDidRender","passAttrToLabel","String","required","tick","removeAttribute","Object","assign","querySelectorAll","forEach","option","value","setAttribute","render","Host","key","class","hasSlot","name","id","identifier","onFocus","onFocusHandler","bind","onChange","onChangeHandler","onBlur","onBlurHandler","ref","el","selectRef","toBoolAttrIfDefined","Array","isArray","map","selected","_a","label","type","e","focused","govFocus","emit","component","originalEvent","govBlur","target","stopPropagation","govChange","setFocus","focus","getRef"],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {govForm} from '../../../helpers/Dom/form'\nimport {GovForm} from '../../../helpers/Dom/form.types'\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from '../../../helpers/Dom/template'\nimport {GovHost} from '../../../helpers/Dom/template.types'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {createID} from '../../../utils/string.utils'\nimport {FormSelectClass, FormSelectSizes, FormSelectSizesType,} from './constants'\nimport {FormSelectEvent, FormSelectOption} from './gov-form-select.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {tick} from \"../../../utils/stencil.utils\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-form-select',\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID('GovSelect')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Options of select\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | FormSelectOption[]\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop({reflect: true}) readonly success: boolean\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\t@State() optionsState: FormSelectOption[] = []\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | FormSelectOption[]): void {\n\t\tthis.optionsState = propsValueToArray(newValue)\n\t}\n\n\t@Watch('disabled')\n\t@Watch('invalid')\n\t@Watch('success')\n\t@Watch('size')\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch('value')\n\twatchValue(): void {\n\t\tthis.markSelectedValue()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl('size', this.size)\n\t\tthis.f.passAttrToControl('invalid', toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('success', toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl('disabled', toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl('type', 'select')\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\n\t\tthis.markSelectedValue()\n\n\t\tthis.optionsState = propsValueToArray(this.options)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t\ttick(() => this.markSelectedValue())\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate markSelectedValue() {\n\t\tthis.host.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.value === this.value) {\n\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t} else {\n\t\t\t\toption.removeAttribute('selected')\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size}>\n\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t{Array.isArray(this.optionsState) && this.optionsState.map((option) => {\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={option.value === this.value}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={option?.disabled}>{option.label ?? option.value}</option>)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</select>\n\t\t\t\t\t{this.success && <gov-icon class=\"validation-icon\" name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t{this.invalid && <gov-icon class=\"validation-icon\" name=\"exclamation-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t<gov-icon class=\"arrow-icon\" name=\"chevron-down\" type=\"components\"></gov-icon>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectElement> {\n\t\treturn this.selectRef\n\t}\n}\n"],"mappings":"ykBAkBaA,EAAa,MAQzB,WAAAC,CAAAC,G,sMAsB8C,I,kCAST,M,qCASe,M,gEAkBR,G,yBAyBD,GAlF1CC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,EAAIC,EAAQL,KAAKC,GACtBD,KAAKM,SAAWC,EAAS,Y,CA0D1B,YAAAC,C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