@gov-design-system-ce/components 4.1.0-rc04 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{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 +1 -1
- 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 +4 -5
- package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-accordion.cjs.entry.js +3 -4
- package/dist/cjs/gov-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-attachments_3.cjs.entry.js +11 -12
- package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-backdrop.cjs.entry.js +4 -5
- package/dist/cjs/gov-backdrop.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js +5 -6
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-button.cjs.entry.js +10 -11
- package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-card.cjs.entry.js +5 -6
- package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-chip.cjs.entry.js +11 -12
- package/dist/cjs/gov-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-container.cjs.entry.js +2 -10
- package/dist/cjs/gov-container.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-control-group.cjs.entry.js +4 -5
- package/dist/cjs/gov-control-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-cookiebar.cjs.entry.js +1 -1
- package/dist/cjs/gov-dialog.cjs.entry.js +5 -6
- package/dist/cjs/gov-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/gov-empty.cjs.entry.js +3 -4
- package/dist/cjs/gov-empty.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-error-code.cjs.entry.js +1 -1
- package/dist/cjs/gov-flex_4.cjs.entry.js +322 -0
- package/dist/cjs/gov-flex_4.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js +4 -6
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +5 -6
- package/dist/cjs/gov-form-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-checkbox.cjs.entry.js +7 -8
- package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-control.cjs.entry.js +5 -5
- package/dist/cjs/gov-form-file.cjs.entry.js +5 -6
- package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-group.cjs.entry.js +4 -5
- package/dist/cjs/gov-form-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-input_2.cjs.entry.js +12 -11
- package/dist/cjs/gov-form-input_2.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-multi-select.cjs.entry.js +9 -10
- package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-password-power.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-radio-group.cjs.entry.js +5 -6
- package/dist/cjs/gov-form-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-radio.cjs.entry.js +6 -7
- package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-select.cjs.entry.js +8 -9
- package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-switch.cjs.entry.js +7 -8
- package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-grid-item.cjs.entry.js +2 -2
- package/dist/cjs/gov-grid.cjs.entry.js +2 -2
- package/dist/cjs/gov-infobar.cjs.entry.js +6 -7
- package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-layout-column.cjs.entry.js +2 -2
- package/dist/cjs/gov-layout.cjs.entry.js +2 -2
- package/dist/cjs/gov-lifecycle.cjs.entry.js +1 -1
- 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 +4 -5
- package/dist/cjs/gov-loading.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-message.cjs.entry.js +5 -6
- package/dist/cjs/gov-message.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-pagination.cjs.entry.js +5 -6
- package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-spacer.cjs.entry.js +4 -5
- package/dist/cjs/gov-spacer.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-stepper-item.cjs.entry.js +6 -7
- package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-stepper.cjs.entry.js +6 -7
- package/dist/cjs/gov-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tabs-item.cjs.entry.js +4 -4
- package/dist/cjs/gov-tabs.cjs.entry.js +6 -7
- package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tag.cjs.entry.js +10 -11
- package/dist/cjs/gov-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tile.cjs.entry.js +2 -2
- package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tiles.cjs.entry.js +2 -2
- package/dist/cjs/gov-toast.cjs.entry.js +6 -6
- package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tooltip-content.cjs.entry.js +4 -4
- package/dist/cjs/gov-tooltip-content.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tooltip.cjs.entry.js +10 -11
- package/dist/cjs/gov-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard-item.cjs.entry.js +8 -9
- package/dist/cjs/gov-wizard-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard.cjs.entry.js +8 -9
- 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-7ff4447c.js +6 -14
- package/dist/cjs/loader.cjs.js +1 -1
- 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/{template-b070338f.js → template-39939fd6.js} +1 -20
- package/dist/cjs/template-39939fd6.js.map +1 -0
- package/dist/cjs/{wcag-b8d80c7d.js → wcag-2927ff73.js} +4 -5
- package/dist/cjs/wcag-2927ff73.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/gov-accordion/gov-accordion-item.js +1 -1
- 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-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-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-dialog/gov-dialog.js +1 -1
- package/dist/collection/components/gov-dialog/gov-dialog.js.map +1 -1
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +1 -20
- 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 +1 -1
- 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 +1 -20
- 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 +4 -4
- 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/search/gov-form-search.js +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.js +2 -2
- 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 +2 -2
- 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 +38 -6
- package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
- package/dist/collection/components/gov-icon/list.js +37 -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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +28 -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 +47 -37
- package/dist/collection/pages/Forms.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/Stepper.js +15 -15
- package/dist/collection/pages/Stepper.js.map +1 -1
- package/dist/collection/pages/Tag.js +23 -23
- 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 +1 -1
- package/dist/collection/pages/Wizard.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-empty.js +1 -1
- package/dist/components/gov-error-code.js +1 -1
- package/dist/components/gov-flex.js +1 -1
- 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-password-power.js.map +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.js +1 -1
- 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-tooltip.js.map +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/p-20c2203a.js +2 -0
- package/dist/components/p-20c2203a.js.map +1 -0
- package/dist/components/p-227eb30d.js +2 -0
- package/dist/components/{p-dcee21ca.js.map → p-227eb30d.js.map} +1 -1
- package/dist/components/p-2b87c27b.js +2 -0
- package/dist/components/{p-3b807239.js.map → p-2b87c27b.js.map} +1 -1
- package/dist/components/p-31a99bfc.js +2 -0
- package/dist/components/{p-bd22e21d.js → p-4149f195.js} +2 -2
- package/dist/components/p-44a8a668.js +2 -0
- package/dist/components/p-45097b4c.js +2 -0
- package/dist/components/p-45097b4c.js.map +1 -0
- package/dist/components/{p-1f3bb41d.js → p-5952a5d0.js} +2 -2
- 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-76d604c6.js +2 -0
- package/dist/components/p-7d4f2214.js +2 -0
- package/dist/components/{p-6ea84137.js.map → p-7d4f2214.js.map} +1 -1
- package/dist/components/p-7f3becc5.js +2 -0
- package/dist/components/p-859a4f0d.js +2 -0
- package/dist/components/{p-820b66c0.js.map → p-859a4f0d.js.map} +1 -1
- package/dist/components/{p-7f8a24a7.js → p-860520b0.js} +2 -2
- package/dist/components/p-929ebfb5.js +2 -0
- package/dist/components/p-929ebfb5.js.map +1 -0
- package/dist/components/p-9908b9f0.js +2 -0
- package/dist/components/p-9908b9f0.js.map +1 -0
- package/dist/components/{p-19c681a3.js → p-a2435993.js} +2 -2
- package/dist/components/{p-59737af9.js → p-a521c59a.js} +2 -2
- package/dist/components/{p-0c93dd39.js → p-c61a5830.js} +2 -2
- package/dist/components/p-dc952cc2.js +2 -0
- package/dist/components/p-dc952cc2.js.map +1 -0
- package/dist/components/{p-23b7e680.js → p-dfb5794a.js} +2 -2
- package/dist/components/p-ea7fdd2e.js +2 -0
- package/dist/components/p-ea7fdd2e.js.map +1 -0
- package/dist/components/p-f44899e1.js +2 -0
- package/dist/components/p-f44899e1.js.map +1 -0
- package/dist/core/core.css +7985 -7198
- 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-83aa4327.entry.js.map → p-019e967c.entry.js.map} +1 -1
- package/dist/core/p-0be19b89.entry.js +2 -0
- package/dist/core/p-1abdcb62.entry.js +2 -0
- package/dist/core/p-1abdcb62.entry.js.map +1 -0
- package/dist/core/p-1ac9544f.entry.js +2 -0
- package/dist/core/{p-f963bb2f.entry.js.map → p-1ac9544f.entry.js.map} +1 -1
- package/dist/core/p-1b3c808d.entry.js +2 -0
- package/dist/core/p-1b3c808d.entry.js.map +1 -0
- package/dist/core/p-20c2203a.js +2 -0
- package/dist/core/p-20c2203a.js.map +1 -0
- package/dist/core/p-22fa411d.entry.js +2 -0
- package/dist/core/p-2c290fe5.entry.js +2 -0
- package/dist/core/p-2c290fe5.entry.js.map +1 -0
- package/dist/core/p-2c59483f.entry.js +2 -0
- package/dist/core/p-2c59483f.entry.js.map +1 -0
- package/dist/core/p-30eaeeec.entry.js +2 -0
- package/dist/core/p-3bbb77a0.js +2 -0
- package/dist/core/p-3fc3c26b.entry.js +2 -0
- package/dist/core/{p-212759be.entry.js.map → p-3fc3c26b.entry.js.map} +1 -1
- package/dist/core/p-40d764ac.entry.js +2 -0
- package/dist/core/{p-0d2c4d31.entry.js.map → p-40d764ac.entry.js.map} +1 -1
- package/dist/core/p-410ec0dd.entry.js +2 -0
- package/dist/core/{p-10f9bf55.entry.js.map → p-410ec0dd.entry.js.map} +1 -1
- package/dist/core/p-439b66a5.entry.js +2 -0
- package/dist/core/{p-92e13f9d.entry.js.map → p-439b66a5.entry.js.map} +1 -1
- package/dist/core/p-443a813a.entry.js +2 -0
- package/dist/core/{p-eebf7ad8.entry.js.map → p-443a813a.entry.js.map} +1 -1
- package/dist/core/p-48c93ac0.entry.js +2 -0
- package/dist/core/p-48c93ac0.entry.js.map +1 -0
- package/dist/core/p-52ca31be.entry.js +2 -0
- package/dist/core/{p-378e0723.entry.js.map → p-52ca31be.entry.js.map} +1 -1
- package/dist/core/p-535316b4.entry.js +2 -0
- package/dist/core/{p-b822b9ff.entry.js → p-5396935e.entry.js} +2 -2
- 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-5ed63e9c.entry.js +2 -0
- package/dist/core/{p-1fdc2457.entry.js.map → p-5ed63e9c.entry.js.map} +1 -1
- package/dist/core/{p-60658ae9.js → p-5f1000da.js} +2 -2
- package/dist/core/p-6454af62.entry.js +2 -0
- package/dist/core/{p-56f9e026.entry.js.map → p-6454af62.entry.js.map} +1 -1
- package/dist/core/p-74458da3.entry.js +2 -0
- package/dist/core/p-74458da3.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-773f71f6.entry.js +2 -0
- package/dist/core/{p-67200095.entry.js.map → p-773f71f6.entry.js.map} +1 -1
- package/dist/core/p-783a6b5b.entry.js +2 -0
- package/dist/core/{p-0a24806a.entry.js.map → p-783a6b5b.entry.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-7bf52eb9.entry.js +2 -0
- package/dist/core/p-7bf52eb9.entry.js.map +1 -0
- package/dist/core/p-7d6073aa.entry.js +2 -0
- package/dist/core/{p-fb0df3a5.entry.js.map → p-7d6073aa.entry.js.map} +1 -1
- package/dist/core/p-7f3becc5.js +2 -0
- package/dist/core/{p-e9a6cd71.js → p-860520b0.js} +2 -2
- package/dist/core/p-8701c28e.entry.js +2 -0
- package/dist/core/p-8701c28e.entry.js.map +1 -0
- package/dist/core/p-951823cb.entry.js +2 -0
- package/dist/core/{p-75ea368b.entry.js.map → p-951823cb.entry.js.map} +1 -1
- package/dist/core/p-9da91318.entry.js +2 -0
- package/dist/core/{p-1f1895c0.entry.js.map → p-9da91318.entry.js.map} +1 -1
- package/dist/core/p-a218e2eb.entry.js +2 -0
- package/dist/core/{p-d3963396.entry.js.map → p-a218e2eb.entry.js.map} +1 -1
- package/dist/core/{p-169b67af.js → p-a2435993.js} +2 -2
- package/dist/core/p-a521c59a.js +2 -0
- package/dist/core/p-b1efeb41.entry.js +2 -0
- package/dist/core/p-b1efeb41.entry.js.map +1 -0
- package/dist/core/p-b4af0bec.entry.js +2 -0
- package/dist/core/p-b4af0bec.entry.js.map +1 -0
- package/dist/core/p-bc966c46.entry.js +2 -0
- package/dist/core/p-bdc51179.entry.js +2 -0
- package/dist/core/p-bdc51179.entry.js.map +1 -0
- package/dist/core/p-c20fe3da.entry.js +2 -0
- package/dist/core/{p-8f10919c.entry.js.map → p-c20fe3da.entry.js.map} +1 -1
- package/dist/core/p-c4ffcc37.entry.js +2 -0
- package/dist/core/p-c4ffcc37.entry.js.map +1 -0
- package/dist/core/p-c52afdfc.js +2 -0
- package/dist/core/{p-842cb87f.js.map → p-c52afdfc.js.map} +1 -1
- package/dist/core/{p-c990d746.js → p-c61a5830.js} +2 -2
- package/dist/core/p-cb557873.entry.js +2 -0
- package/dist/core/{p-3844a27d.entry.js.map → p-cb557873.entry.js.map} +1 -1
- package/dist/core/p-d24710ff.entry.js +2 -0
- package/dist/core/p-d24710ff.entry.js.map +1 -0
- package/dist/core/p-d65cef62.entry.js +2 -0
- package/dist/core/{p-4cb4de7b.entry.js.map → p-d65cef62.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-db22d51c.entry.js +2 -0
- package/dist/core/{p-f1c8a96b.entry.js.map → p-db22d51c.entry.js.map} +1 -1
- package/dist/core/p-dec3f948.entry.js +2 -0
- package/dist/core/{p-7b48b1b8.entry.js.map → p-dec3f948.entry.js.map} +1 -1
- package/dist/core/{p-45a30859.js → p-e0e2e9c1.js} +2 -2
- package/dist/core/p-e2517a72.entry.js +2 -0
- package/dist/core/{p-57b0e670.entry.js.map → p-e2517a72.entry.js.map} +1 -1
- package/dist/core/p-e44a0fee.js +2 -0
- package/dist/core/{p-58dc3ec3.entry.js → p-e834ee73.entry.js} +2 -2
- package/dist/core/p-ea7fdd2e.js +2 -0
- package/dist/core/p-ea7fdd2e.js.map +1 -0
- package/dist/core/p-ed1131cb.entry.js +2 -0
- package/dist/core/{p-c5b5fd69.entry.js.map → p-ed1131cb.entry.js.map} +1 -1
- package/dist/core/p-f1056a83.entry.js +2 -0
- package/dist/core/{p-32bba4e7.entry.js.map → p-f1056a83.entry.js.map} +1 -1
- package/dist/core/p-f1fa5e1e.entry.js +2 -0
- package/dist/core/{p-1600c1fb.entry.js.map → p-f1fa5e1e.entry.js.map} +1 -1
- package/dist/core/p-f4bcf817.entry.js +2 -0
- package/dist/core/p-f4bcf817.entry.js.map +1 -0
- package/dist/core/p-f6709826.entry.js +2 -0
- package/dist/core/p-f6709826.entry.js.map +1 -0
- package/dist/core/{p-5ad3097c.entry.js → p-f7a4da9d.entry.js} +2 -2
- package/dist/core/p-fca60e04.entry.js +2 -0
- package/dist/core/{p-8fe36a5b.entry.js.map → p-fca60e04.entry.js.map} +1 -1
- package/dist/core/p-fe6fed11.entry.js +2 -0
- package/dist/core/p-fe6fed11.entry.js.map +1 -0
- 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 +1 -1
- 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 +6 -7
- package/dist/esm/gov-accordion-item.entry.js.map +1 -1
- package/dist/esm/gov-accordion.entry.js +5 -6
- package/dist/esm/gov-accordion.entry.js.map +1 -1
- package/dist/esm/gov-attachments_3.entry.js +10 -11
- package/dist/esm/gov-attachments_3.entry.js.map +1 -1
- package/dist/esm/gov-backdrop.entry.js +4 -5
- package/dist/esm/gov-backdrop.entry.js.map +1 -1
- package/dist/esm/gov-breadcrumbs.entry.js +5 -6
- package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
- package/dist/esm/gov-button.entry.js +10 -11
- package/dist/esm/gov-button.entry.js.map +1 -1
- package/dist/esm/gov-card.entry.js +5 -6
- package/dist/esm/gov-card.entry.js.map +1 -1
- package/dist/esm/gov-chip.entry.js +12 -13
- package/dist/esm/gov-chip.entry.js.map +1 -1
- package/dist/esm/gov-container.entry.js +2 -10
- package/dist/esm/gov-container.entry.js.map +1 -1
- package/dist/esm/gov-control-group.entry.js +5 -6
- package/dist/esm/gov-control-group.entry.js.map +1 -1
- package/dist/esm/gov-cookiebar.entry.js +1 -1
- package/dist/esm/gov-dialog.entry.js +5 -6
- package/dist/esm/gov-dialog.entry.js.map +1 -1
- package/dist/esm/gov-dropdown.entry.js +4 -4
- package/dist/esm/gov-empty.entry.js +5 -6
- package/dist/esm/gov-empty.entry.js.map +1 -1
- package/dist/esm/gov-error-code.entry.js +1 -1
- package/dist/esm/gov-flex_4.entry.js +315 -0
- package/dist/esm/gov-flex_4.entry.js.map +1 -0
- package/dist/esm/gov-form-autocomplete.entry.js +6 -8
- package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
- package/dist/esm/gov-form-checkbox-group.entry.js +7 -8
- package/dist/esm/gov-form-checkbox-group.entry.js.map +1 -1
- package/dist/esm/gov-form-checkbox.entry.js +10 -11
- package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
- package/dist/esm/gov-form-control.entry.js +8 -8
- package/dist/esm/gov-form-file.entry.js +8 -9
- package/dist/esm/gov-form-file.entry.js.map +1 -1
- package/dist/esm/gov-form-group.entry.js +6 -7
- package/dist/esm/gov-form-group.entry.js.map +1 -1
- package/dist/esm/gov-form-input_2.entry.js +15 -14
- package/dist/esm/gov-form-input_2.entry.js.map +1 -1
- package/dist/esm/gov-form-multi-select.entry.js +12 -13
- package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
- package/dist/esm/gov-form-password-power.entry.js +1 -1
- package/dist/esm/gov-form-radio-group.entry.js +7 -8
- package/dist/esm/gov-form-radio-group.entry.js.map +1 -1
- package/dist/esm/gov-form-radio.entry.js +9 -10
- package/dist/esm/gov-form-radio.entry.js.map +1 -1
- package/dist/esm/gov-form-search.entry.js +3 -3
- package/dist/esm/gov-form-select.entry.js +11 -12
- package/dist/esm/gov-form-select.entry.js.map +1 -1
- package/dist/esm/gov-form-switch.entry.js +10 -11
- package/dist/esm/gov-form-switch.entry.js.map +1 -1
- package/dist/esm/gov-grid-item.entry.js +2 -2
- package/dist/esm/gov-grid.entry.js +2 -2
- package/dist/esm/gov-infobar.entry.js +7 -8
- package/dist/esm/gov-infobar.entry.js.map +1 -1
- package/dist/esm/gov-layout-column.entry.js +2 -2
- package/dist/esm/gov-layout.entry.js +2 -2
- package/dist/esm/gov-lifecycle.entry.js +1 -1
- 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 +5 -6
- package/dist/esm/gov-loading.entry.js.map +1 -1
- package/dist/esm/gov-message.entry.js +6 -7
- package/dist/esm/gov-message.entry.js.map +1 -1
- package/dist/esm/gov-pagination.entry.js +6 -7
- package/dist/esm/gov-pagination.entry.js.map +1 -1
- package/dist/esm/gov-spacer.entry.js +5 -6
- package/dist/esm/gov-spacer.entry.js.map +1 -1
- package/dist/esm/gov-stepper-item.entry.js +7 -8
- package/dist/esm/gov-stepper-item.entry.js.map +1 -1
- package/dist/esm/gov-stepper.entry.js +7 -8
- package/dist/esm/gov-stepper.entry.js.map +1 -1
- package/dist/esm/gov-tabs-item.entry.js +5 -5
- package/dist/esm/gov-tabs.entry.js +7 -8
- package/dist/esm/gov-tabs.entry.js.map +1 -1
- package/dist/esm/gov-tag.entry.js +11 -12
- package/dist/esm/gov-tag.entry.js.map +1 -1
- package/dist/esm/gov-tile.entry.js +3 -3
- package/dist/esm/gov-tile.entry.js.map +1 -1
- package/dist/esm/gov-tiles.entry.js +2 -2
- package/dist/esm/gov-toast.entry.js +7 -7
- package/dist/esm/gov-toast.entry.js.map +1 -1
- package/dist/esm/gov-tooltip-content.entry.js +5 -5
- package/dist/esm/gov-tooltip-content.entry.js.map +1 -1
- package/dist/esm/gov-tooltip.entry.js +8 -9
- package/dist/esm/gov-tooltip.entry.js.map +1 -1
- package/dist/esm/gov-wizard-item.entry.js +9 -10
- package/dist/esm/gov-wizard-item.entry.js.map +1 -1
- package/dist/esm/gov-wizard.entry.js +8 -9
- package/dist/esm/gov-wizard.entry.js.map +1 -1
- package/dist/esm/{win-cec370ad.js → gov.log-066c3139.js} +17 -3
- package/dist/esm/gov.log-066c3139.js.map +1 -0
- package/dist/esm/index-c263e031.js +6 -14
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{props-c82e1abf.js → props-fb6587c3.js} +2 -2
- package/dist/esm/{props-c82e1abf.js.map → props-fb6587c3.js.map} +1 -1
- 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-d7c6c252.js → wcag-de9a3dc6.js} +2 -3
- package/dist/esm/wcag-de9a3dc6.js.map +1 -0
- package/dist/hydrate/index.js +224 -138
- package/dist/hydrate/index.mjs +224 -138
- package/dist/stencil.config.js +6 -4
- package/dist/stencil.config.js.map +1 -1
- 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-form/autocomplete/gov-form-autocomplete.d.ts +0 -4
- package/dist/types/components/gov-form/file/gov-form-file.d.ts +0 -4
- package/dist/types/components/gov-form/input/constants.d.ts +1 -0
- 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 -2
- package/dist/types/components/gov-icon/list.d.ts +1 -1
- 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 +117 -37
- package/dist/types/core/constants/colors.d.ts +6 -8
- package/dist/types/helpers/Dom/document.d.ts +3 -0
- package/dist/types/helpers/Dom/template.d.ts +0 -1
- package/dist/types/helpers/Dom/template.types.d.ts +0 -1
- package/package.json +3 -3
- package/dist/cjs/colors-976f6dff.js.map +0 -1
- package/dist/cjs/form-c1aec07a.js.map +0 -1
- package/dist/cjs/gov-flex.cjs.entry.js +0 -31
- package/dist/cjs/gov-flex.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-theme-switch.cjs.entry.js +0 -73
- package/dist/cjs/gov-theme-switch.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/template-b070338f.js.map +0 -1
- package/dist/cjs/wcag-b8d80c7d.js.map +0 -1
- package/dist/cjs/win-587f4614.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-02da2aee.js +0 -2
- package/dist/components/p-02da2aee.js.map +0 -1
- package/dist/components/p-08621bdf.js +0 -2
- package/dist/components/p-1a0b3b4f.js +0 -2
- package/dist/components/p-1a0b3b4f.js.map +0 -1
- package/dist/components/p-1d3019f3.js +0 -2
- package/dist/components/p-255d0471.js +0 -2
- package/dist/components/p-255d0471.js.map +0 -1
- package/dist/components/p-387052e1.js +0 -2
- package/dist/components/p-387052e1.js.map +0 -1
- package/dist/components/p-3b807239.js +0 -2
- package/dist/components/p-565120d5.js +0 -2
- package/dist/components/p-5cc316bc.js +0 -2
- package/dist/components/p-5cc316bc.js.map +0 -1
- package/dist/components/p-6ea84137.js +0 -2
- package/dist/components/p-7501abe8.js +0 -2
- package/dist/components/p-7501abe8.js.map +0 -1
- package/dist/components/p-820b66c0.js +0 -2
- package/dist/components/p-c211c3e1.js +0 -2
- package/dist/components/p-c211c3e1.js.map +0 -1
- package/dist/components/p-dcee21ca.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-0075138f.js +0 -2
- package/dist/core/p-0075138f.js.map +0 -1
- package/dist/core/p-052cc573.js +0 -2
- package/dist/core/p-0a24806a.entry.js +0 -2
- package/dist/core/p-0d2c4d31.entry.js +0 -2
- package/dist/core/p-10f9bf55.entry.js +0 -2
- package/dist/core/p-12680890.entry.js +0 -2
- package/dist/core/p-12680890.entry.js.map +0 -1
- package/dist/core/p-1600c1fb.entry.js +0 -2
- package/dist/core/p-18025823.entry.js +0 -2
- package/dist/core/p-18025823.entry.js.map +0 -1
- package/dist/core/p-18dbe177.entry.js +0 -2
- package/dist/core/p-18dbe177.entry.js.map +0 -1
- package/dist/core/p-1a550eee.entry.js +0 -2
- package/dist/core/p-1a550eee.entry.js.map +0 -1
- package/dist/core/p-1f1895c0.entry.js +0 -2
- package/dist/core/p-1fdc2457.entry.js +0 -2
- package/dist/core/p-212759be.entry.js +0 -2
- package/dist/core/p-215504c1.entry.js +0 -2
- package/dist/core/p-2614044c.js +0 -2
- package/dist/core/p-2c3ddc57.entry.js +0 -2
- package/dist/core/p-31e7d262.entry.js +0 -2
- package/dist/core/p-31e7d262.entry.js.map +0 -1
- package/dist/core/p-32bba4e7.entry.js +0 -2
- package/dist/core/p-378e0723.entry.js +0 -2
- package/dist/core/p-3844a27d.entry.js +0 -2
- package/dist/core/p-4bce896c.js +0 -2
- package/dist/core/p-4cb4de7b.entry.js +0 -2
- package/dist/core/p-56f9e026.entry.js +0 -2
- package/dist/core/p-57b0e670.entry.js +0 -2
- package/dist/core/p-668ca722.entry.js +0 -2
- package/dist/core/p-67200095.entry.js +0 -2
- package/dist/core/p-69d56f17.js +0 -2
- package/dist/core/p-6aa40794.js +0 -2
- package/dist/core/p-731fe7d8.entry.js +0 -2
- package/dist/core/p-731fe7d8.entry.js.map +0 -1
- package/dist/core/p-7591976a.entry.js +0 -2
- package/dist/core/p-75ea368b.entry.js +0 -2
- package/dist/core/p-7b48b1b8.entry.js +0 -2
- package/dist/core/p-7de47344.entry.js +0 -2
- package/dist/core/p-7de47344.entry.js.map +0 -1
- package/dist/core/p-83aa4327.entry.js +0 -2
- package/dist/core/p-842cb87f.js +0 -2
- package/dist/core/p-89b69743.entry.js +0 -2
- package/dist/core/p-89b69743.entry.js.map +0 -1
- package/dist/core/p-8a796fbe.entry.js +0 -2
- package/dist/core/p-8f10919c.entry.js +0 -2
- package/dist/core/p-8fe36a5b.entry.js +0 -2
- package/dist/core/p-915e53ac.entry.js +0 -2
- package/dist/core/p-915e53ac.entry.js.map +0 -1
- package/dist/core/p-92e13f9d.entry.js +0 -2
- package/dist/core/p-a21dc94f.js +0 -2
- package/dist/core/p-a274cdaa.entry.js +0 -2
- package/dist/core/p-a274cdaa.entry.js.map +0 -1
- package/dist/core/p-a693ffbf.js +0 -2
- package/dist/core/p-a693ffbf.js.map +0 -1
- package/dist/core/p-a9a095c2.entry.js +0 -2
- package/dist/core/p-a9a095c2.entry.js.map +0 -1
- package/dist/core/p-ab68c0b7.entry.js +0 -2
- package/dist/core/p-ab68c0b7.entry.js.map +0 -1
- package/dist/core/p-b48a4aa0.js +0 -2
- package/dist/core/p-b48a4aa0.js.map +0 -1
- package/dist/core/p-b50ffab3.entry.js +0 -2
- package/dist/core/p-b70cc248.entry.js +0 -2
- package/dist/core/p-c0a5a3f7.entry.js +0 -2
- package/dist/core/p-c0a5a3f7.entry.js.map +0 -1
- package/dist/core/p-c5b5fd69.entry.js +0 -2
- package/dist/core/p-d1c4eb91.entry.js +0 -2
- package/dist/core/p-d3963396.entry.js +0 -2
- package/dist/core/p-d4fbc249.entry.js +0 -2
- package/dist/core/p-d4fbc249.entry.js.map +0 -1
- package/dist/core/p-d949aac7.entry.js +0 -2
- package/dist/core/p-d949aac7.entry.js.map +0 -1
- package/dist/core/p-e0d428c9.js +0 -2
- package/dist/core/p-e0d428c9.js.map +0 -1
- package/dist/core/p-e3aeaca0.js +0 -2
- package/dist/core/p-e3aeaca0.js.map +0 -1
- package/dist/core/p-e6af4c58.entry.js +0 -2
- package/dist/core/p-e6af4c58.entry.js.map +0 -1
- package/dist/core/p-ede7af0a.entry.js +0 -2
- package/dist/core/p-ede7af0a.entry.js.map +0 -1
- package/dist/core/p-eebc9e71.entry.js +0 -2
- package/dist/core/p-eebc9e71.entry.js.map +0 -1
- package/dist/core/p-eebf7ad8.entry.js +0 -2
- package/dist/core/p-f1c8a96b.entry.js +0 -2
- package/dist/core/p-f963bb2f.entry.js +0 -2
- package/dist/core/p-fb0df3a5.entry.js +0 -2
- package/dist/esm/colors-02c1ea96.js.map +0 -1
- package/dist/esm/form-472e078d.js.map +0 -1
- package/dist/esm/gov-flex.entry.js +0 -27
- package/dist/esm/gov-flex.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-theme-switch.entry.js +0 -69
- package/dist/esm/gov-theme-switch.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/template-3d84d705.js.map +0 -1
- package/dist/esm/wcag-d7c6c252.js.map +0 -1
- package/dist/esm/win-cec370ad.js.map +0 -1
- /package/dist/components/{p-1d3019f3.js.map → p-31a99bfc.js.map} +0 -0
- /package/dist/components/{p-bd22e21d.js.map → p-4149f195.js.map} +0 -0
- /package/dist/components/{p-08621bdf.js.map → p-44a8a668.js.map} +0 -0
- /package/dist/components/{p-1f3bb41d.js.map → p-5952a5d0.js.map} +0 -0
- /package/dist/components/{p-565120d5.js.map → p-76d604c6.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-19c681a3.js.map → p-a2435993.js.map} +0 -0
- /package/dist/components/{p-59737af9.js.map → p-a521c59a.js.map} +0 -0
- /package/dist/components/{p-0c93dd39.js.map → p-c61a5830.js.map} +0 -0
- /package/dist/components/{p-23b7e680.js.map → p-dfb5794a.js.map} +0 -0
- /package/dist/core/{p-b50ffab3.entry.js.map → p-00d153bf.entry.js.map} +0 -0
- /package/dist/core/{p-d1c4eb91.entry.js.map → p-0be19b89.entry.js.map} +0 -0
- /package/dist/core/{p-215504c1.entry.js.map → p-22fa411d.entry.js.map} +0 -0
- /package/dist/core/{p-668ca722.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-7591976a.entry.js.map → p-535316b4.entry.js.map} +0 -0
- /package/dist/core/{p-b822b9ff.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-8a796fbe.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-b70cc248.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-169b67af.js.map → p-a2435993.js.map} +0 -0
- /package/dist/core/{p-4bce896c.js.map → p-a521c59a.js.map} +0 -0
- /package/dist/core/{p-2c3ddc57.entry.js.map → p-bc966c46.entry.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/{p-58dc3ec3.entry.js.map → p-e834ee73.entry.js.map} +0 -0
- /package/dist/core/{p-5ad3097c.entry.js.map → p-f7a4da9d.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-button.entry.js","mappings":";;;;;;;;;;;;;;;SAAgB,MAAM,CAAC,KAAU;IAChC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC9B,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;KAC1D;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QACrC,OAAO,KAAK,GAAG,CAAC,CAAA;KAChB;SAAM,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE;QACtC,OAAO,KAAK,CAAA;KACZ;SAAM;QACN,OAAO,KAAK,GAAG,IAAI,GAAG,KAAK,CAAA;KAC3B;AACF;;ACeA,IAAK,IAGJ;AAHD,WAAK,IAAI;IACR,eAAO,CAAA;IACP,yBAAiB,CAAA;AAClB,CAAC,EAHI,IAAI,KAAJ,IAAI,QAGR;MAKY,SAAS;IAMrB;;;;;QAFQ,aAAQ,GAAG,KAAK,CAAA;;oBAeiC,GAAG;;wBAQR,KAAK;;wBASL,KAAK;0BAKT,QAAQ;;;;;;;;yBAuClB,IAAI;;mCAsCC,EAAE;QA/G5C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IA2FD,aAAa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YAC3B,aAAa,EAAE,CAAC;YAChB,GAAG,EAAE,IAAI,CAAC,IAAI;SACd,CAAC,CAAA;KACF;IAEO,aAAa,CAAC,CAAa;QAClC,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;YACjB,SAAS,EAAE,WAAW,CAAC,IAAI;YAC3B,aAAa,EAAE,CAAC;YAChB,GAAG,EAAE,IAAI,CAAC,IAAI;SACd,CAAC,CAAA;KACF;;;;IAMD,MAAM,QAAQ;QACb,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;KACvB;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,UAAU,CAAA;KACtB;;;;IAMD,MAAM,qBAAqB;QAC1B,IAAI,IAAI,CAAC,SAAS,EAAE;YACnB,uBAAuB,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;SACjJ;KACD;;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/utils/bool.utils.ts","../../../packages/core/src/components/gov-button/button/gov-button.tsx"],"sourcesContent":["export function toBool(value: any): boolean {\n\tif (typeof value === 'string') {\n\t\treturn ['true', 'True', 'TRUE', '1'].indexOf(value) !== -1\n\t} else if (typeof value === 'number') {\n\t\treturn value > 0\n\t} else if (typeof value === 'boolean') {\n\t\treturn value\n\t} else {\n\t\treturn value ? true : false\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {\n\tButtonClass,\n\tButtonColors,\n\tButtonColorType,\n\tButtonSizesType,\n\tButtonTargetType,\n\tButtonType,\n\tButtonTypesType,\n\tNativeType,\n\tNativeTypesType,\n} from \"./constants\"\nimport {govHost, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {toBool} from \"../../../utils/bool.utils\"\nimport {Sizes} from \"../../../core/constants/sizes\"\nimport {validateAccessibleLabel} from \"../../../helpers/Validate/wcag\"\nimport {canValidateWcagOnRender} from \"../../../helpers/Dom/win\"\nimport {delay} from \"../../../utils/utils\"\nimport {ButtonEvent} from \"./gov-button.types\"\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\n\nenum Tags {\n\tA = \"a\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-button\",\n})\nexport class GovButton {\n\tprivate h: GovHost\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement\n\tprivate attributeObserver: AttributeObserver\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovButtonElement\n\n\t/**\n\t * Style variation of the button\n\t */\n\t@Prop({reflect: true}) readonly color: ButtonColorType\n\t/**\n\t * Button’s size\n\t */\n\t@Prop({reflect: true}) readonly size?: ButtonSizesType = \"m\"\n\t/**\n\t * Button's type\n\t */\n\t@Prop({reflect: true}) readonly type: ButtonTypesType\n\t/**\n\t * Expands the button to fill 100% of the container width\n\t */\n\t@Prop({reflect: true}) readonly expanded: boolean = false\n\t/**\n\t * The name of the button, which gets paired with the button's value when submitted as part of a form. Corresponds with the native HTML name attribute\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n\t */\n\t@Prop() readonly nativeType?: NativeTypesType = \"button\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target?: ButtonTargetType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n\t */\n\t@Prop() readonly download: boolean\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-hreflang\n\t */\n\t@Prop() readonly hreflang: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-referrerpolicy\n\t */\n\t@Prop() readonly referrerpolicy: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-rel\n\t */\n\t@Prop() readonly rel: string\n\t/**\n\t * Indicates whether an asynchronous process is running\n\t */\n\t@Prop() readonly loading: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom button identifier\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Emitted when the button click\n\t */\n\t@Event({eventName: \"gov-click\"}) govClick: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button has focus\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button loses focus\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<ButtonEvent>\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ButtonColors, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(ButtonType, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"nativeType\")\n\tvalidateNativeType(newValue: string): void {\n\t\tvalidateProp(NativeType, newValue, ButtonClass.root)\n\t}\n\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\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateType(this.type)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateNativeType(this.nativeType)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? Tags.A : Tags.BUTTON\n\t\tconst nativeType = Tag === Tags.A ? undefined : this.nativeType\n\n\t\treturn (\n\t\t\t<Host size={this.size}\n\t\t\t\t hydrated={this.hydrated}\n\t\t\t\t color={this.color}\n\t\t\t\t class={this.h.classes(ButtonClass.root)}\n\t\t\t\t type={this.type}>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLButtonElement | HTMLLinkElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tid={this.identifier}\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tdownload={this.download}\n\t\t\t\t\threflang={this.hreflang}\n\t\t\t\t\trel={this.rel}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\ttabindex={this.disabled ? \"-1\" : \"0\"}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t>\n\t\t\t\t\t{toBool(this.loading) && !this.h.hasSlot(\"right-icon\") &&\n\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\"></gov-icon>}\n\t\t\t\t\t{this.h.hasSlot(\"left-icon\") && <slot name=\"left-icon\"></slot>}\n\t\t\t\t\t<slot/>\n\t\t\t\t\t{this.h.hasSlot(\"right-icon\") && <slot name=\"right-icon\"></slot>}\n\t\t\t\t\t{toBool(this.loading) && this.h.hasSlot(\"right-icon\") &&\n\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\"></gov-icon>}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false) {\n\t\t\tthis.govClick.emit({\n\t\t\t\tcomponent: ButtonClass.root,\n\t\t\t\toriginalEvent: e,\n\t\t\t\tref: this.host,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.triggerRef.focus()\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync getRef() {\n\t\treturn this.triggerRef\n\t}\n\n\t/**\n\t * Validate the Accessibility attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tif (this.focusable) {\n\t\t\tvalidateAccessibleLabel(this.triggerRef.getAttribute('aria-label'), this.triggerRef.getAttribute('aria-labelledby'), ButtonClass.root, this.host)\n\t\t}\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"gov-button.entry.js","mappings":";;;;;;;;;;;;;;SAAgB,MAAM,CAAC,KAAU;IAChC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC9B,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;KAC1D;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QACrC,OAAO,KAAK,GAAG,CAAC,CAAA;KAChB;SAAM,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE;QACtC,OAAO,KAAK,CAAA;KACZ;SAAM;QACN,OAAO,KAAK,GAAG,IAAI,GAAG,KAAK,CAAA;KAC3B;AACF;;ACeA,IAAK,IAGJ;AAHD,WAAK,IAAI;IACR,eAAO,CAAA;IACP,yBAAiB,CAAA;AAClB,CAAC,EAHI,IAAI,KAAJ,IAAI,QAGR;MAKY,SAAS;IAMrB;;;;;QAFQ,aAAQ,GAAG,KAAK,CAAA;;oBAeiC,GAAG;;wBAQR,KAAK;;wBASL,KAAK;0BAKT,QAAQ;;;;;;;;yBAuClB,IAAI;;mCAsCC,EAAE;QA/G5C,IAAI,CAAC,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Aa;QACnC,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;YAClB,SAAS,EAAE,WAAW,CAAC,IAAI;YAC3B,aAAa,EAAE,CAAC;YAChB,GAAG,EAAE,IAAI,CAAC,IAAI;SACd,CAAC,CAAA;KACF;IAEO,aAAa,CAAC,CAAa;QAClC,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;YACjB,SAAS,EAAE,WAAW,CAAC,IAAI;YAC3B,aAAa,EAAE,CAAC;YAChB,GAAG,EAAE,IAAI,CAAC,IAAI;SACd,CAAC,CAAA;KACF;;;;IAMD,MAAM,QAAQ;QACb,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;KACvB;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,UAAU,CAAA;KACtB;;;;IAMD,MAAM,qBAAqB;QAC1B,IAAI,IAAI,CAAC,SAAS,EAAE;YACnB,uBAAuB,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;SACjJ;KACD;;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/utils/bool.utils.ts","../../../packages/core/src/components/gov-button/button/gov-button.tsx"],"sourcesContent":["export function toBool(value: any): boolean {\n\tif (typeof value === 'string') {\n\t\treturn ['true', 'True', 'TRUE', '1'].indexOf(value) !== -1\n\t} else if (typeof value === 'number') {\n\t\treturn value > 0\n\t} else if (typeof value === 'boolean') {\n\t\treturn value\n\t} else {\n\t\treturn value ? true : false\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {\n\tButtonClass,\n\tButtonColors,\n\tButtonColorType,\n\tButtonSizesType,\n\tButtonTargetType,\n\tButtonType,\n\tButtonTypesType,\n\tNativeType,\n\tNativeTypesType,\n} from \"./constants\"\nimport {govHost, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {toBool} from \"../../../utils/bool.utils\"\nimport {Sizes} from \"../../../core/constants/sizes\"\nimport {validateAccessibleLabel} from \"../../../helpers/Validate/wcag\"\nimport {canValidateWcagOnRender} from \"../../../helpers/Dom/win\"\nimport {delay} from \"../../../utils/utils\"\nimport {ButtonEvent} from \"./gov-button.types\"\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\n\nenum Tags {\n\tA = \"a\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-button\",\n})\nexport class GovButton {\n\tprivate h: GovHost\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement\n\tprivate attributeObserver: AttributeObserver\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovButtonElement\n\n\t/**\n\t * Style variation of the button\n\t */\n\t@Prop({reflect: true}) readonly color: ButtonColorType\n\t/**\n\t * Button’s size\n\t */\n\t@Prop({reflect: true}) readonly size?: ButtonSizesType = \"m\"\n\t/**\n\t * Button's type\n\t */\n\t@Prop({reflect: true}) readonly type: ButtonTypesType\n\t/**\n\t * Expands the button to fill 100% of the container width\n\t */\n\t@Prop({reflect: true}) readonly expanded: boolean = false\n\t/**\n\t * The name of the button, which gets paired with the button's value when submitted as part of a form. Corresponds with the native HTML name attribute\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n\t */\n\t@Prop() readonly nativeType?: NativeTypesType = \"button\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target?: ButtonTargetType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n\t */\n\t@Prop() readonly download: boolean\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-hreflang\n\t */\n\t@Prop() readonly hreflang: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-referrerpolicy\n\t */\n\t@Prop() readonly referrerpolicy: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-rel\n\t */\n\t@Prop() readonly rel: string\n\t/**\n\t * Indicates whether an asynchronous process is running\n\t */\n\t@Prop() readonly loading: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom button identifier\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Emitted when the button click\n\t */\n\t@Event({eventName: \"gov-click\"}) govClick: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button has focus\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button loses focus\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<ButtonEvent>\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ButtonColors, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(ButtonType, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"nativeType\")\n\tvalidateNativeType(newValue: string): void {\n\t\tvalidateProp(NativeType, newValue, ButtonClass.root)\n\t}\n\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\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateType(this.type)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateNativeType(this.nativeType)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? Tags.A : Tags.BUTTON\n\t\tconst nativeType = Tag === Tags.A ? undefined : this.nativeType\n\n\t\treturn (\n\t\t\t<Host size={this.size}\n\t\t\t\t hydrated={this.hydrated}\n\t\t\t\t color={this.color}\n\t\t\t\t class={this.h.classes(ButtonClass.root)}\n\t\t\t\t type={this.type}>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLButtonElement | HTMLLinkElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tid={this.identifier}\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tdownload={this.download}\n\t\t\t\t\threflang={this.hreflang}\n\t\t\t\t\trel={this.rel}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\ttabindex={this.disabled ? \"-1\" : \"0\"}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t>\n\t\t\t\t\t{toBool(this.loading) && !this.h.hasSlot(\"icon-end\") &&\n\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\" type=\"components\"></gov-icon>}\n\t\t\t\t\t{this.h.hasSlot(\"icon-start\") && <slot name=\"icon-start\"></slot>}\n\t\t\t\t\t<slot/>\n\t\t\t\t\t{this.h.hasSlot(\"icon-end\") && <slot name=\"icon-end\"></slot>}\n\t\t\t\t\t{toBool(this.loading) && this.h.hasSlot(\"icon-end\") &&\n\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\" type=\"components\"></gov-icon>}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false) {\n\t\t\tthis.govClick.emit({\n\t\t\t\tcomponent: ButtonClass.root,\n\t\t\t\toriginalEvent: e,\n\t\t\t\tref: this.host,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.triggerRef.focus()\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync getRef() {\n\t\treturn this.triggerRef\n\t}\n\n\t/**\n\t * Validate the Accessibility attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tif (this.focusable) {\n\t\t\tvalidateAccessibleLabel(this.triggerRef.getAttribute('aria-label'), this.triggerRef.getAttribute('aria-labelledby'), ButtonClass.root, this.host)\n\t\t}\n\t}\n}\n"],"version":3}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
-
import { g as govHost, b as booleanString } from './template-
|
|
2
|
+
import { g as govHost, b as booleanString } from './template-7ecee4d1.js';
|
|
3
3
|
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
4
|
-
import { v as validateAccessibleLabel } from './wcag-
|
|
5
|
-
import { c as canValidateWcagOnRender } from './
|
|
6
|
-
import { d as delay } from './utils-
|
|
7
|
-
import './gov.log-6e9faad2.js';
|
|
4
|
+
import { v as validateAccessibleLabel } from './wcag-de9a3dc6.js';
|
|
5
|
+
import { c as canValidateWcagOnRender } from './gov.log-066c3139.js';
|
|
6
|
+
import { d as delay } from './utils-e10e994d.js';
|
|
8
7
|
import './helpers.types-43ddbdb8.js';
|
|
9
8
|
|
|
10
9
|
const CardClass = {
|
|
@@ -44,7 +43,7 @@ const GovCard = class {
|
|
|
44
43
|
this.hydrated = true;
|
|
45
44
|
}
|
|
46
45
|
render() {
|
|
47
|
-
return (h(Host, { key: 'c7dd00e1eee01b7005b98b39ddfccf784dc2808e', class: this.h.classes(CardClass.root), open: this.open, collapsible: booleanString(this.collapsible), promotion: this.promotion, hydrated: this.hydrated }, this.collapsible ? (h("button", { id: this.headlineId, class: CardClass.header, "aria-label": this.accessibleTriggerLabel, "aria-labelledby": this.accessibleTriggerLabelledBy, "aria-expanded": booleanString(this.open), "aria-controls": this.contentId, onClick: this.onClickHandler.bind(this) }, h("slot", { name: "headline" }), h("gov-icon", { class: CardClass.arrow, name: "chevron-down" }))) : this.h.hasSlot("headline") ? (h("div", { class: CardClass.header }, h("slot", { name: "headline" }))) : null, h("div", { key: '
|
|
46
|
+
return (h(Host, { key: 'c7dd00e1eee01b7005b98b39ddfccf784dc2808e', class: this.h.classes(CardClass.root), open: this.open, collapsible: booleanString(this.collapsible), promotion: this.promotion, hydrated: this.hydrated }, this.collapsible ? (h("button", { id: this.headlineId, class: CardClass.header, "aria-label": this.accessibleTriggerLabel, "aria-labelledby": this.accessibleTriggerLabelledBy, "aria-expanded": booleanString(this.open), "aria-controls": this.contentId, onClick: this.onClickHandler.bind(this) }, h("slot", { name: "headline" }), h("gov-icon", { class: CardClass.arrow, name: "chevron-down", type: "components" }))) : this.h.hasSlot("headline") ? (h("div", { class: CardClass.header }, h("slot", { name: "headline" }))) : null, h("div", { key: '369364ba24e3d93c1ac78a584dd1fd48c44b892b', class: CardClass.inner, id: this.contentId, "aria-hidden": this.collapsible ? booleanString(!this.open) : undefined, hidden: this.collapsible ? !this.open : undefined, "aria-labelledby": this.collapsible ? this.headlineId : undefined }, this.h.hasSlot('img') && (h("p", { key: '813afe326da050fc90039355853617f267505fab', class: CardClass.img }, h("slot", { key: '5817f673e65eeb32c5740c7524518d726a98364c', name: "img" }))), h("div", { key: 'd47df9920b2ce96f2c535bb0bfd3723c2a7b7a9e', class: CardClass.main }, this.h.hasSlot('icon') && this.promotion && (h("div", { key: 'c2649f05b9e7c25b7d77a02f692d45f0e30caa60', class: CardClass.icon }, h("slot", { key: '9c5c54d2bf6c4a83bd6490b2ad7ef7a1ca9d53d5', name: "icon" }))), h("slot", { key: '49608def955a9fa5f5c1ed957ca63bc698b9aeab' }), this.h.hasSlot('btn') && this.promotion && (h("div", { key: '2bfc4a6c551fe33c4da625f800a796eb619746d3', class: CardClass.btns }, h("slot", { key: '050552b970e6d16586f57ed3dab46e6fcff9d95b', name: "btn" })))), this.h.hasSlot('footer') && (h("div", { key: '364cdbd90941b2e93cecc9742ff08479f82d0c14', class: CardClass.footer }, h("slot", { key: '0352680a92293ddfe93c055b1d7e5555967f870b', name: "footer" }))))));
|
|
48
47
|
}
|
|
49
48
|
onClickHandler(e) {
|
|
50
49
|
e.stopPropagation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-card.entry.js","mappings":"
|
|
1
|
+
{"file":"gov-card.entry.js","mappings":";;;;;;;;AAAO,MAAM,SAAS,GAAG;IACxB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,kBAAkB;IAC1B,KAAK,EAAE,iBAAiB;IACxB,KAAK,EAAE,iBAAiB;IACxB,GAAG,EAAE,eAAe;IACpB,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,kBAAkB;IAC1B,KAAK,EAAE,iBAAiB;CACxB;;MCEY,OAAO;IAMnB;;;QAFQ,aAAQ,GAAG,KAAK,CAAA;yBAac,KAAK;2BAIH,KAAK;oBAIA,IAAI;;;QAlBhD,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAA;QAC7C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAA;KAC3C;IA6BD,MAAM,kBAAkB;QACvB,IAAI,uBAAuB,EAAE,EAAE;Y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AE,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;SACjH;KACD;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-card/constants.ts","../../../packages/core/src/components/gov-card/gov-card.tsx"],"sourcesContent":["export const CardClass = {\n\troot: 'gov-card',\n\theader: 'gov-card__header',\n\ttitle: 'gov-card__title',\n\tinner: 'gov-card__inner',\n\timg: 'gov-card__img',\n\tmain: 'gov-card__main',\n\ticon: 'gov-card__icon',\n\tbtns: 'gov-card__btns',\n\tfooter: 'gov-card__footer',\n\tarrow: 'gov-card__arrow',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop} from '@stencil/core'\nimport {CardClass} from './constants'\nimport {booleanString, govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {createID} from '../../utils/string.utils'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {delay} from '../../utils/utils'\nimport {GovCardChangeEvent} from './interfaces'\n\n@Component({\n\ttag: 'gov-card',\n})\nexport class GovCard {\n\tprivate h: GovHost\n\tprivate readonly headlineId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.headlineId = createID('GovCardHeadline')\n\t\tthis.contentId = createID('GovCardContent')\n\t}\n\n\t@Element() host: HTMLGovCardElement\n\n\t/**\n\t * Style variation of the card.\n\t */\n\t@Prop() readonly promotion: boolean = false\n\t/**\n\t * Defines weather the card can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Defines whether the card is open or closed\n\t */\n\t@Prop({reflect: true, mutable: true}) open = true\n\t/**\n\t * Adds accessible label for the collapsible button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-label'}) accessibleTriggerLabel: string\n\t/**\n\t * A string of identifiers that indicate alternative label elements for collapsible card\n\t */\n\t@Prop({attribute: 'accessible-labelledby'}) accessibleTriggerLabelledBy: string\n\t/**\n\t * Called when the card toggle state changes\n\t */\n\t@Event({eventName: 'gov-toggle'}) govToggle: EventEmitter<GovCardChangeEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(CardClass.root)} open={this.open}\n\t\t\t\t collapsible={booleanString(this.collapsible)} promotion={this.promotion} hydrated={this.hydrated}>\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<button\n\t\t\t\t\t\tid={this.headlineId}\n\t\t\t\t\t\tclass={CardClass.header}\n\t\t\t\t\t\taria-label={this.accessibleTriggerLabel}\n\t\t\t\t\t\taria-labelledby={this.accessibleTriggerLabelledBy}\n\t\t\t\t\t\taria-expanded={booleanString(this.open)}\n\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot name=\"headline\"/>\n\t\t\t\t\t\t<gov-icon class={CardClass.arrow} name=\"chevron-down\" type=\"components\"></gov-icon>\n\t\t\t\t\t</button>\n\t\t\t\t) : this.h.hasSlot(\"headline\") ? (\n\t\t\t\t\t<div class={CardClass.header}>\n\t\t\t\t\t\t<slot name=\"headline\"/>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\n\t\t\t\t<div\n\t\t\t\t\tclass={CardClass.inner}\n\t\t\t\t\tid={this.contentId}\n\t\t\t\t\taria-hidden={this.collapsible ? booleanString(!this.open) : undefined}\n\t\t\t\t\thidden={this.collapsible ? !this.open : undefined}\n\t\t\t\t\taria-labelledby={this.collapsible ? this.headlineId : undefined}\n\t\t\t\t>\n\t\t\t\t\t{this.h.hasSlot('img') && (\n\t\t\t\t\t\t<p class={CardClass.img}>\n\t\t\t\t\t\t\t<slot name=\"img\"/>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div class={CardClass.main}>\n\t\t\t\t\t\t{this.h.hasSlot('icon') && this.promotion && (\n\t\t\t\t\t\t\t<div class={CardClass.icon}>\n\t\t\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<slot/>\n\n\t\t\t\t\t\t{this.h.hasSlot('btn') && this.promotion && (\n\t\t\t\t\t\t\t<div class={CardClass.btns}>\n\t\t\t\t\t\t\t\t<slot name=\"btn\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{this.h.hasSlot('footer') && (\n\t\t\t\t\t\t<div class={CardClass.footer}>\n\t\t\t\t\t\t\t<slot name=\"footer\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e) {\n\t\te.stopPropagation()\n\t\tif (this.collapsible) {\n\t\t\tthis.open = !this.open\n\t\t\tthis.govToggle.emit({open: this.open, element: this.host})\n\t\t}\n\t}\n\n\t/**\n\t * Validate the accessible attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tif (this.collapsible) {\n\t\t\tvalidateAccessibleLabel(this.accessibleTriggerLabel, this.accessibleTriggerLabelledBy, CardClass.root, this.host)\n\t\t}\n\t}\n}\n"],"version":3}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
-
import { v as validateProp } from './props-
|
|
3
|
-
import { g as govHost } from './template-
|
|
4
|
-
import {
|
|
2
|
+
import { v as validateProp } from './props-fb6587c3.js';
|
|
3
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
|
+
import { p as pick } from './utils-e10e994d.js';
|
|
5
5
|
import { S as Sizes } from './sizes-5b9e579f.js';
|
|
6
|
-
import { a as ButtonColors, b as ButtonSizes } from './constants-
|
|
6
|
+
import { a as ButtonColors, b as ButtonSizes } from './constants-51f51588.js';
|
|
7
7
|
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
8
8
|
import { p as prepareIconFormat } from './helpers-5d179d4b.js';
|
|
9
9
|
import { i as inheritAriaAttributes } from './accessibility-f83c991a.js';
|
|
10
10
|
import { A as AttributeObserver, a as ariaAttributes } from './attribute-5561aca4.js';
|
|
11
|
-
import './gov.log-
|
|
12
|
-
import './
|
|
13
|
-
import './colors-02c1ea96.js';
|
|
11
|
+
import './gov.log-066c3139.js';
|
|
12
|
+
import './colors-4cf64720.js';
|
|
14
13
|
|
|
15
14
|
const ChipSizes = pick(Sizes, ['_XS', '_S', '_M']);
|
|
16
15
|
var ChipType;
|
|
@@ -39,8 +38,8 @@ const GovChip = class {
|
|
|
39
38
|
this.disabled = false;
|
|
40
39
|
this.href = undefined;
|
|
41
40
|
this.target = undefined;
|
|
42
|
-
this.
|
|
43
|
-
this.
|
|
41
|
+
this.iconStart = undefined;
|
|
42
|
+
this.iconEnd = undefined;
|
|
44
43
|
this.size = ChipSizes._M;
|
|
45
44
|
this.tag = "span";
|
|
46
45
|
this.color = ButtonColors.PRIMARY;
|
|
@@ -81,13 +80,13 @@ const GovChip = class {
|
|
|
81
80
|
render() {
|
|
82
81
|
const Tag = this.href ? NativeType.A : this.tag;
|
|
83
82
|
const nativeType = Tag == NativeType.BUTTON ? NativeType.BUTTON : undefined;
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
return (h(Host, { key: '
|
|
83
|
+
const iconStart = prepareIconFormat(this.iconStart);
|
|
84
|
+
const iconEnd = prepareIconFormat(this.iconEnd);
|
|
85
|
+
return (h(Host, { key: 'cb016dddaaadd7de70e72707d7ad44e87a597a34', class: this.h.classes([
|
|
87
86
|
ChipClass.root,
|
|
88
87
|
this.h.hasSlot("right") ? ChipClass.hasRight : undefined,
|
|
89
88
|
this.h.hasSlot("left") ? ChipClass.hasLeft : undefined,
|
|
90
|
-
]), disabled: this.disabled, href: this.href, color: this.color, type: this.type, size: this.size, hoverable: Tag == NativeType.A || Tag == NativeType.BUTTON, hydrated: this.hydrated }, h(Tag, Object.assign({ key: '
|
|
89
|
+
]), disabled: this.disabled, href: this.href, color: this.color, type: this.type, size: this.size, hoverable: Tag == NativeType.A || Tag == NativeType.BUTTON, hydrated: this.hydrated }, h(Tag, Object.assign({ key: 'd34d8a67eeb4b6d3f1b79118224a50f394e31003', class: "element", href: this.href, target: this.target, ref: el => (this.triggerRef = el), onClick: this.onClickHandler.bind(this), tabindex: (this.h.hasSlot("left") || this.h.hasSlot("right") || this.disabled) && !this.focusable ? "-1" : "0", id: this.identifier || this.chipId, type: nativeType }, this.inheritedAttributes, { "aria-disabled": this.disabled }), h("slot", { key: '1927da9845f36a47d30d7aef2e5292b0fd14a9e9', name: "left" }), h("slot", { key: 'c8334498b94e4d3caa6f7db5e7ec638bbce52cbc', name: "icon-start" }, iconStart && h("gov-icon", { key: '310fb65c135105ee26cc6d58f810768843700b0a', type: iconStart.type, name: iconStart.name })), h("slot", { key: '4a089b176703b5c600d2a519f90be655397d5f27' }), h("slot", { key: '0dfede9f85605499bdbd09f43b642a1cee68fcf2', name: "icon-end" }, iconEnd && h("gov-icon", { key: 'beb20c5691f2ed1a6cb556d440d72a86de280a73', type: iconEnd.type, name: iconEnd.name })), h("slot", { key: '92e05b922fe474e259e18301eba6c13586794a1e', name: "right" }))));
|
|
91
90
|
}
|
|
92
91
|
onClickHandler(e) {
|
|
93
92
|
e.stopPropagation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-chip.entry.js","mappings":";;;;;;;;;;;;;;AAIO,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAGzD,IAAY,Q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,EAAE,CAAA;QACnB,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,IAAI,IAAI,CAAC,GAAG,KAAK,UAAU,CAAC,MAAM,EAAE;YAC9D,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;SACrB;KACD;;;;IAMD,MAAM,KAAK;QACV,OAAO,IAAI,CAAC,UAAU,CAAA;KACtB;;;;IAMD,MAAM,QAAQ;QACb,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;KACvB;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-chip/constants.ts","../../../packages/core/src/components/gov-chip/gov-chip.tsx"],"sourcesContent":["import { ValueOf } from '../../types/interfaces'\nimport {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\n\nexport const ChipSizes = pick(Sizes, ['_XS', '_S', '_M'])\nexport type ChipSizesType = `${ValueOf<typeof ChipSizes>}`\n\nexport enum ChipType {\n\tSOLID = 'solid',\n\tOUTLINED = 'outlined',\n}\nexport type ChipTypesType = `${ValueOf<typeof ChipType>}`\n\nexport enum NativeType {\n\tA = 'a',\n\tSPAN = 'span',\n\tBUTTON = 'button',\n}\nexport type NativeTypesType = `${ValueOf<typeof NativeType>}`\n\nexport const ChipClass = {\n\troot: 'gov-chip',\n\tinner: 'gov-chip__inner',\n\thasRight: 'gov-chip--has-right',\n\thasLeft: 'gov-chip--has-left',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {ChipClass, ChipSizes, ChipSizesType, ChipTypesType, NativeType, NativeTypesType} from \"./constants\"\nimport {ButtonColors, ButtonColorType, ButtonSizes} from \"../gov-button/button/constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {prepareIconFormat} from \"../gov-icon/helpers\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\n\n@Component({\n\ttag: \"gov-chip\",\n})\nexport class GovChip {\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement | HTMLSpanElement\n\tprivate h: GovHost\n\tprivate readonly chipId: string\n\tprivate hydrated = false\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.chipId = createID('GovChip')\n\t}\n\n\t@Element() host: HTMLGovChipElement\n\n\t/**\n\t * Makes the chip component disabled.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target: string\n\t/**\n\t * Definition of the button icon on the left. The icon must be defined in the form \"type/name\".\n\t */\n\t@Prop({attribute: \"icon-left\"}) readonly iconLeft?: string\n\t/**\n\t * Definition of the button icon on the left. The icon must be defined in the form \"type/name\".\n\t */\n\t@Prop({attribute: \"icon-right\"}) readonly iconRight?: string\n\t/**\n\t * Chip’s size.\n\t */\n\t@Prop() readonly size: ChipSizesType = ChipSizes._M\n\t/**\n\t * Used to change the HTML tag in the chip\n\t */\n\t@Prop() readonly tag: NativeTypesType = \"span\"\n\t/**\n\t * Style variation of the chip.\n\t */\n\t@Prop() readonly color: ButtonColorType = ButtonColors.PRIMARY\n\t/**\n\t * Chip’s type\n\t */\n\t@Prop({reflect: true}) readonly type: ChipTypesType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom chip identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Emitted when the button click.\n\t */\n\t@Event({eventName: \"gov-click\"}) govClick: EventEmitter<PointerEvent>\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ButtonColors, newValue, ChipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ButtonSizes, newValue, ChipClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\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\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\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 Tag = this.href ? NativeType.A : this.tag\n\t\tconst nativeType = Tag == NativeType.BUTTON ? NativeType.BUTTON : undefined\n\n\t\tconst iconLeft = prepareIconFormat(this.iconLeft)\n\t\tconst iconRight = prepareIconFormat(this.iconRight)\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes([\n\t\t\t\t\tChipClass.root,\n\t\t\t\t\tthis.h.hasSlot(\"right\") ? ChipClass.hasRight : undefined,\n\t\t\t\t\tthis.h.hasSlot(\"left\") ? ChipClass.hasLeft : undefined,\n\t\t\t\t])}\n\t\t\t\tdisabled={this.disabled}\n\t\t\t\thref={this.href}\n\t\t\t\tcolor={this.color}\n\t\t\t\ttype={this.type}\n\t\t\t\tsize={this.size}\n\t\t\t\thoverable={Tag == NativeType.A || Tag == NativeType.BUTTON}\n\t\t\t\thydrated={this.hydrated}\n\t\t\t>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLLinkElement | HTMLButtonElement | HTMLSpanElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\ttabindex={(this.h.hasSlot(\"left\") || this.h.hasSlot(\"right\") || this.disabled) && !this.focusable ? \"-1\" : \"0\"}\n\t\t\t\t\tid={this.identifier || this.chipId}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-disabled={this.disabled}>\n\t\t\t\t\t<slot name=\"left\"></slot>\n\t\t\t\t\t<slot name=\"left-icon\">\n\t\t\t\t\t\t{iconLeft && <gov-icon type={iconLeft.type} name={iconLeft.name}></gov-icon>}\n\t\t\t\t\t</slot>\n\t\t\t\t\t<slot/>\n\t\t\t\t\t<slot name=\"right-icon\">\n\t\t\t\t\t\t{iconRight && <gov-icon type={iconRight.type} name={iconRight.name}></gov-icon>}\n\t\t\t\t\t</slot>\n\t\t\t\t\t<slot name=\"right\"></slot>\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false && this.tag === NativeType.BUTTON) {\n\t\t\tthis.govClick.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync geRef() {\n\t\treturn this.triggerRef\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.triggerRef.focus()\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"gov-chip.entry.js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AO,CAAC,IAAI,GAAa,CACnE,EACP,6DAAM,IAAI,EAAC,OAAO,GAAQ,CACrB,CACA,EACP;KACD;IAEO,cAAc,CAAC,CAAe;QACrC,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,IAAI,IAAI,CAAC,GAAG,KAAK,UAAU,CAAC,MAAM,EAAE;YAC9D,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;SACrB;KACD;;;;IAMD,MAAM,KAAK;QACV,OAAO,IAAI,CAAC,UAAU,CAAA;KACtB;;;;IAMD,MAAM,QAAQ;QACb,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;KACvB;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-chip/constants.ts","../../../packages/core/src/components/gov-chip/gov-chip.tsx"],"sourcesContent":["import { ValueOf } from '../../types/interfaces'\nimport {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\n\nexport const ChipSizes = pick(Sizes, ['_XS', '_S', '_M'])\nexport type ChipSizesType = `${ValueOf<typeof ChipSizes>}`\n\nexport enum ChipType {\n\tSOLID = 'solid',\n\tOUTLINED = 'outlined',\n}\nexport type ChipTypesType = `${ValueOf<typeof ChipType>}`\n\nexport enum NativeType {\n\tA = 'a',\n\tSPAN = 'span',\n\tBUTTON = 'button',\n}\nexport type NativeTypesType = `${ValueOf<typeof NativeType>}`\n\nexport const ChipClass = {\n\troot: 'gov-chip',\n\tinner: 'gov-chip__inner',\n\thasRight: 'gov-chip--has-right',\n\thasLeft: 'gov-chip--has-left',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {ChipClass, ChipSizes, ChipSizesType, ChipTypesType, NativeType, NativeTypesType} from \"./constants\"\nimport {ButtonColors, ButtonColorType, ButtonSizes} from \"../gov-button/button/constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {prepareIconFormat} from \"../gov-icon/helpers\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\n\n@Component({\n\ttag: \"gov-chip\",\n})\nexport class GovChip {\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement | HTMLSpanElement\n\tprivate h: GovHost\n\tprivate readonly chipId: string\n\tprivate hydrated = false\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.chipId = createID('GovChip')\n\t}\n\n\t@Element() host: HTMLGovChipElement\n\n\t/**\n\t * Makes the chip component disabled.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target: string\n\t/**\n\t * Definition of the button icon on the left. The icon must be defined in the form \"type/name\".\n\t */\n\t@Prop({attribute: \"icon-start\"}) readonly iconStart?: string\n\t/**\n\t * Definition of the button icon on the left. The icon must be defined in the form \"type/name\".\n\t */\n\t@Prop({attribute: \"icon-end\"}) readonly iconEnd?: string\n\t/**\n\t * Chip’s size.\n\t */\n\t@Prop() readonly size: ChipSizesType = ChipSizes._M\n\t/**\n\t * Used to change the HTML tag in the chip\n\t */\n\t@Prop() readonly tag: NativeTypesType = \"span\"\n\t/**\n\t * Style variation of the chip.\n\t */\n\t@Prop() readonly color: ButtonColorType = ButtonColors.PRIMARY\n\t/**\n\t * Chip’s type\n\t */\n\t@Prop({reflect: true}) readonly type: ChipTypesType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom chip identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Emitted when the button click.\n\t */\n\t@Event({eventName: \"gov-click\"}) govClick: EventEmitter<PointerEvent>\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ButtonColors, newValue, ChipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ButtonSizes, newValue, ChipClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\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\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\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 Tag = this.href ? NativeType.A : this.tag\n\t\tconst nativeType = Tag == NativeType.BUTTON ? NativeType.BUTTON : undefined\n\n\t\tconst iconStart = prepareIconFormat(this.iconStart)\n\t\tconst iconEnd = prepareIconFormat(this.iconEnd)\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes([\n\t\t\t\t\tChipClass.root,\n\t\t\t\t\tthis.h.hasSlot(\"right\") ? ChipClass.hasRight : undefined,\n\t\t\t\t\tthis.h.hasSlot(\"left\") ? ChipClass.hasLeft : undefined,\n\t\t\t\t])}\n\t\t\t\tdisabled={this.disabled}\n\t\t\t\thref={this.href}\n\t\t\t\tcolor={this.color}\n\t\t\t\ttype={this.type}\n\t\t\t\tsize={this.size}\n\t\t\t\thoverable={Tag == NativeType.A || Tag == NativeType.BUTTON}\n\t\t\t\thydrated={this.hydrated}\n\t\t\t>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLLinkElement | HTMLButtonElement | HTMLSpanElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\ttabindex={(this.h.hasSlot(\"left\") || this.h.hasSlot(\"right\") || this.disabled) && !this.focusable ? \"-1\" : \"0\"}\n\t\t\t\t\tid={this.identifier || this.chipId}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-disabled={this.disabled}>\n\t\t\t\t\t<slot name=\"left\"></slot>\n\t\t\t\t\t<slot name=\"icon-start\">\n\t\t\t\t\t\t{iconStart && <gov-icon type={iconStart.type} name={iconStart.name}></gov-icon>}\n\t\t\t\t\t</slot>\n\t\t\t\t\t<slot/>\n\t\t\t\t\t<slot name=\"icon-end\">\n\t\t\t\t\t\t{iconEnd && <gov-icon type={iconEnd.type} name={iconEnd.name}></gov-icon>}\n\t\t\t\t\t</slot>\n\t\t\t\t\t<slot name=\"right\"></slot>\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false && this.tag === NativeType.BUTTON) {\n\t\t\tthis.govClick.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync geRef() {\n\t\treturn this.triggerRef\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.triggerRef.focus()\n\t}\n}\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
-
import { g as govHost
|
|
2
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
3
3
|
|
|
4
4
|
const ContainerClass = {
|
|
5
5
|
root: 'gov-container',
|
|
@@ -11,15 +11,7 @@ const GovContainer = class {
|
|
|
11
11
|
this.h = govHost(this.host);
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Returns slotted children
|
|
18
|
-
*
|
|
19
|
-
* @return {Promise<Node[]>}
|
|
20
|
-
*/
|
|
21
|
-
async slottedChildren() {
|
|
22
|
-
return Promise.resolve(slottedChildren(this.host));
|
|
14
|
+
return (h(Host, { key: '72c32b930fe5a024a469c2d8170a7597e990e659', class: this.h.classes(ContainerClass.root) }, h("slot", { key: 'a4ad5247d403cd17ba46529cc204c936b82dd97d' })));
|
|
23
15
|
}
|
|
24
16
|
get host() { return getElement(this); }
|
|
25
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-container.entry.js","mappings":";;;AAAO,MAAM,cAAc,GAAG;IAC7B,IAAI,EAAE,eAAe;CACrB;;MCMY,YAAY;IAGxB;;QACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAID,MAAM;QACL,QACC,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,IAC/C,8DAAQ,CACF,EACP;KACD;;;;;;
|
|
1
|
+
{"file":"gov-container.entry.js","mappings":";;;AAAO,MAAM,cAAc,GAAG;IAC7B,IAAI,EAAE,eAAe;CACrB;;MCMY,YAAY;IAGxB;;QACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAID,MAAM;QACL,QACC,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,IAC/C,8DAAQ,CACF,EACP;KACD;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-container/constants.tsx","../../../packages/core/src/components/gov-container/gov-container.tsx"],"sourcesContent":["export const ContainerClass = {\n\troot: 'gov-container',\n}\n","import { Component, Element, h, Host } from '@stencil/core'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { ContainerClass } from './constants'\n\n@Component({\n\ttag: 'gov-container',\n})\nexport class GovContainer {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovContainerElement\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ContainerClass.root)}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
-
import { C as Colors } from './colors-
|
|
3
|
-
import { g as govHost } from './template-
|
|
4
|
-
import { v as validateProp } from './props-
|
|
5
|
-
import {
|
|
6
|
-
import './gov.log-
|
|
7
|
-
import './win-cec370ad.js';
|
|
2
|
+
import { C as Colors } from './colors-4cf64720.js';
|
|
3
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
|
+
import { v as validateProp } from './props-fb6587c3.js';
|
|
5
|
+
import { p as pick } from './utils-e10e994d.js';
|
|
6
|
+
import './gov.log-066c3139.js';
|
|
8
7
|
|
|
9
8
|
pick(Colors, ['PRIMARY', 'SECONDARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING']);
|
|
10
9
|
const ControlGroupClass = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-control-group.entry.js","mappings":"
|
|
1
|
+
{"file":"gov-control-group.entry.js","mappings":";;;;;;;AAIkC,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,EAAC;AAG3G,MAAM,iBAAiB,GAAG;IAChC,IAAI,EAAE,mBAAmB;CACzB;;MCCY,eAAe;IAG3B;;qBAQgD,MAAM,CAAC,OAAO;wBAIC,KAAK;0BAID,KAAK;QAfvE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAiBD,aAAa,CAAC,QAAgB;QAC7B,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAA;KACtD;IAED,MAAM;QACL,QACC,EAAC,IAAI,qDACJ,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAC7C,KAAK,EAAE,IAAI,CAAC,KAAK,IACjB,8DAAQ,CACF,EACP;KACD;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-control-group/constants.ts","../../../packages/core/src/components/gov-control-group/gov-control-group.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils'\n\nexport const ControlGroupColors = pick(Colors, ['PRIMARY', 'SECONDARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING'])\nexport type ControlGroupColorType = `${ValueOf<typeof ControlGroupColors>}`\n\nexport const ControlGroupClass = {\n\troot: 'gov-control-group',\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { Colors } from \"../../core/constants/colors\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { ControlGroupClass, ControlGroupColorType } from \"./constants\"\n\n@Component({\n\ttag: \"gov-control-group\",\n})\nexport class GovControlGroup {\n\tprivate readonly h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovControlGroupElement\n\t/**\n\t * Style variation of the content message.\n\t */\n\t@Prop() readonly color: ControlGroupColorType = Colors.PRIMARY\n\t/**\n\t * Specifies the display of the border between elements\n\t */\n\t@Prop({ attribute: \"no-border\" }) readonly noBorder: boolean = false\n\t/**\n\t * Specifies the display of elements to full width\n\t */\n\t@Prop({ attribute: \"fit-content\" }) readonly fitContent: boolean = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(Colors, newValue, ControlGroupClass.root)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(ControlGroupClass.root)}\n\t\t\t\tcolor={this.color}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
-
import { g as govHost, a as boolToFocusValue, c as toBoolAttr } from './template-
|
|
3
|
-
import { c as canValidateWcagOnRender } from './
|
|
4
|
-
import { a as validateWcagRef } from './wcag-
|
|
2
|
+
import { g as govHost, a as boolToFocusValue, c as toBoolAttr } from './template-7ecee4d1.js';
|
|
3
|
+
import { c as canValidateWcagOnRender } from './gov.log-066c3139.js';
|
|
4
|
+
import { a as validateWcagRef } from './wcag-de9a3dc6.js';
|
|
5
5
|
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
6
6
|
import { t as tick } from './stencil.utils-f3c6c68d.js';
|
|
7
|
-
import './utils-
|
|
8
|
-
import './gov.log-6e9faad2.js';
|
|
7
|
+
import './utils-e10e994d.js';
|
|
9
8
|
import './helpers.types-43ddbdb8.js';
|
|
10
9
|
|
|
11
10
|
const DialogClass = {
|
|
@@ -68,7 +67,7 @@ const GovDialog = class {
|
|
|
68
67
|
document.body.classList.remove(DialogClass.bodyFix);
|
|
69
68
|
}
|
|
70
69
|
render() {
|
|
71
|
-
return (h(Host, { key: 'fe34cd83c969ab539a47c4f851231085f34b21f6', class: this.h.classes(DialogClass.root), open: this.open, hydrated: this.hydrated }, h("dialog", { key: 'd013f87f499635ed0d0f1cc016cc1e84410154b4', class: DialogClass.dialog, hidden: !this.open, tabindex: boolToFocusValue(this.open), open: this.open, "aria-modal": "true", "aria-hidden": toBoolAttr(!this.open), "aria-labelledby": this.accessibleLabelledBy || this.labelId, "aria-describedby": this.accessibleDescribedBy || this.contentId, role: this.role }, h("div", { key: '6018f61d5a335583dc05a0f8cdef6c4562977558', class: DialogClass.inner }, h("div", { key: '9ab56eb94d92f67291b783ec8310fec2c3da9d33', class: DialogClass.header }, h("slot", { key: 'b2248113ca181acbd9e0c960c4e7b13c3e114ae3', name: "icon" }), this.h.hasSlot('title') && (h("span", { key: 'fce7d93f476553e3cc53c8dc987d65cb64538552', class: DialogClass.title, id: this.labelId }, h("slot", { key: 'b151367fda2f5f87d6de3cabbf46cacc9d427f0f', name: "title" }))), h("gov-button", { key: 'e3622dc8601452c2d52a5d17a611d27cd0d17e97', ref: el => (this.closeCtaRef = el), disabled: this.blockClose, class: DialogClass.close, color: "primary", "aria-label": this.accessibleCloseLabel, "aria-labelledby": this.accessibleCloseLabelledBy, type: "base", "on-gov-click": this.onCloseHandler.bind(this) }, h("gov-icon", { key: '
|
|
70
|
+
return (h(Host, { key: 'fe34cd83c969ab539a47c4f851231085f34b21f6', class: this.h.classes(DialogClass.root), open: this.open, hydrated: this.hydrated }, h("dialog", { key: 'd013f87f499635ed0d0f1cc016cc1e84410154b4', class: DialogClass.dialog, hidden: !this.open, tabindex: boolToFocusValue(this.open), open: this.open, "aria-modal": "true", "aria-hidden": toBoolAttr(!this.open), "aria-labelledby": this.accessibleLabelledBy || this.labelId, "aria-describedby": this.accessibleDescribedBy || this.contentId, role: this.role }, h("div", { key: '6018f61d5a335583dc05a0f8cdef6c4562977558', class: DialogClass.inner }, h("div", { key: '9ab56eb94d92f67291b783ec8310fec2c3da9d33', class: DialogClass.header }, h("slot", { key: 'b2248113ca181acbd9e0c960c4e7b13c3e114ae3', name: "icon" }), this.h.hasSlot('title') && (h("span", { key: 'fce7d93f476553e3cc53c8dc987d65cb64538552', class: DialogClass.title, id: this.labelId }, h("slot", { key: 'b151367fda2f5f87d6de3cabbf46cacc9d427f0f', name: "title" }))), h("gov-button", { key: 'e3622dc8601452c2d52a5d17a611d27cd0d17e97', ref: el => (this.closeCtaRef = el), disabled: this.blockClose, class: DialogClass.close, color: "primary", "aria-label": this.accessibleCloseLabel, "aria-labelledby": this.accessibleCloseLabelledBy, type: "base", "on-gov-click": this.onCloseHandler.bind(this) }, h("gov-icon", { key: 'aa75b37c5aa82566d2e9f6b49351dba0550052de', slot: "icon-start", name: "x-lg", type: "components" }))), h("div", { key: '608ac5fe732219559583cfb512d14b9221619a6b', class: DialogClass.content, id: this.contentId }, h("slot", { key: 'cd93b5061448c1d4c4d2dece9a349a8fa11f6c28' })), this.h.hasSlot('footer') && (h("div", { key: '759319b3fb204e9f8f869d3839fc3f91f42b494f', class: DialogClass.footer }, h("slot", { key: '5937ba641d297c61645f6216d63656cd883e5280', name: "footer" }))))), this.open ? (h("gov-backdrop", { disabled: this.blockBackdropClose, "aria-label": this.accessibleCloseLabel, "aria-labelled-by": this.accessibleCloseLabelledBy, "on-gov-click": this.onCloseHandler.bind(this) })) : null));
|
|
72
71
|
}
|
|
73
72
|
onCloseHandler(e) {
|
|
74
73
|
e.stopPropagation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-dialog.entry.js","mappings":"
|
|
1
|
+
{"file":"gov-dialog.entry.js","mappings":";;;;;;;;;AAAO,MAAM,WAAW,GAA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AAI,CAAC,CAAA;QACtF,eAAe,CAAC,IAAI,CAAC,qBAAqB,EAAE,yBAAyB,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;KACxF;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-dialog/constants.ts","../../../packages/core/src/components/gov-dialog/gov-dialog.tsx"],"sourcesContent":["export const DialogClass = {\n\troot: 'gov-dialog',\n\tdialog: 'gov-dialog__dialog',\n\tinner: 'gov-dialog__inner',\n\theader: 'gov-dialog__header',\n\ttitle: 'gov-dialog__title',\n\tcontent: 'gov-dialog__content',\n\tclose: 'gov-dialog__close',\n\tfooter: 'gov-dialog__footer',\n\tbodyFix: 'body-fixed',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch} from '@stencil/core'\nimport {boolToFocusValue, govHost, toBoolAttr} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {validateWcagRef} from '../../helpers/Validate/wcag'\nimport {Nullable} from '../../types/interfaces'\nimport {createID} from '../../utils/string.utils'\nimport {DialogClass} from './constants'\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-dialog',\n})\nexport class GovDialog {\n\tprivate h: GovHost\n\tprivate readonly labelId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false;\n\tprivate closeCtaRef?: HTMLGovButtonElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.labelId = createID('GovDialogLabel')\n\t\tthis.contentId = createID('GovDialogContent')\n\t}\n\n\t@Element() host: HTMLGovDialogElement\n\n\t/**\n\t * Attribute for dialog window display\n\t */\n\t@Prop({mutable: true, reflect: true}) open = false\n\t/**\n\t * Attribute allowing blocking the dialog closing\n\t */\n\t@Prop({attribute: 'block-close'}) blockClose = false\n\t/**\n\t * Attribute allowing blocking the backdrop dialog closing\n\t */\n\t@Prop({attribute: 'block-backdrop-close'}) blockBackdropClose = false\n\t/**\n\t * Role of dialog\n\t */\n\t@Prop({attribute: 'role'}) role: Nullable<string> = 'dialog'\n\t/**\n\t * Used to change the HTML tag in the dialog label for correct semantic structure\n\t */\n\t@Prop({attribute: 'label-tag'}) readonly labelTag: string = 'h2'\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({attribute: 'accessible-labelled-by'}) accessibleLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the dialog.\n\t */\n\t@Prop({attribute: 'accessible-described-by'}) accessibleDescribedBy: string\n\t/**\n\t * Adds accessible label for the dialog close button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-close-label'}) readonly accessibleCloseLabel: string = 'Zavřít okno'\n\t/**\n\t * A string of identifiers that indicate alternative label elements for closing the dialog window\n\t */\n\t@Prop({attribute: 'accessible-close-labelled-by'}) accessibleCloseLabelledBy: string\n\t/**\n\t * Emitted when dialog window closes.\n\t */\n\t@Event({eventName: 'gov-close'}) govClose: EventEmitter<PointerEvent>\n\n\t@Watch('open')\n\twatchOpen(newValue: boolean): void {\n\t\tthis.open = newValue\n\t\tthis.setFocus().finally()\n\t}\n\n\tprivate showDialog() {\n\t\tthis.open = true\n\t\tdocument.body.classList.add(DialogClass.bodyFix)\n\t}\n\n\tprivate hideDialog() {\n\t\tthis.open = false\n\t\tdocument.body.classList.remove(DialogClass.bodyFix)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\ttick(() => this.validateAccessibility())\n\t\t}\n\n\t\tif (this.open) {\n\t\t\tthis.showDialog()\n\t\t} else {\n\t\t\tthis.hideDialog()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tdocument.body.classList.remove(DialogClass.bodyFix)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(DialogClass.root)} open={this.open} hydrated={this.hydrated}>\n\t\t\t\t<dialog\n\t\t\t\t\tclass={DialogClass.dialog}\n\t\t\t\t\thidden={!this.open}\n\t\t\t\t\ttabindex={boolToFocusValue(this.open)}\n\t\t\t\t\topen={this.open}\n\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\taria-hidden={toBoolAttr(!this.open)}\n\t\t\t\t\taria-labelledby={this.accessibleLabelledBy || this.labelId}\n\t\t\t\t\taria-describedby={this.accessibleDescribedBy || this.contentId}\n\t\t\t\t\trole={this.role}\n\t\t\t\t>\n\t\t\t\t\t<div class={DialogClass.inner}>\n\t\t\t\t\t\t<div class={DialogClass.header}>\n\t\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t\t\t{this.h.hasSlot('title') && (\n\t\t\t\t\t\t\t\t<span class={DialogClass.title} id={this.labelId}>\n\t\t\t\t\t\t\t\t\t<slot name=\"title\"/>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\tref={el => (this.closeCtaRef = el)}\n\t\t\t\t\t\t\t\tdisabled={this.blockClose}\n\t\t\t\t\t\t\t\tclass={DialogClass.close}\n\t\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t\taria-label={this.accessibleCloseLabel}\n\t\t\t\t\t\t\t\taria-labelledby={this.accessibleCloseLabelledBy}\n\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<gov-icon slot=\"icon-start\" name=\"x-lg\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={DialogClass.content} id={this.contentId}>\n\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{this.h.hasSlot('footer') && (\n\t\t\t\t\t\t\t<div class={DialogClass.footer}>\n\t\t\t\t\t\t\t\t<slot name=\"footer\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</dialog>\n\n\t\t\t\t{this.open ? (\n\t\t\t\t\t<gov-backdrop\n\t\t\t\t\t\tdisabled={this.blockBackdropClose}\n\t\t\t\t\t\taria-label={this.accessibleCloseLabel}\n\t\t\t\t\t\taria-labelled-by={this.accessibleCloseLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t\te.preventDefault()\n\t\tif (this.blockClose === false) {\n\t\t\tthis.hideDialog()\n\t\t\tthis.govClose.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Sets the close button to focus\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tif (this.open && this.closeCtaRef) {\n\t\t\tthis.closeCtaRef.setFocus().catch()\n\t\t}\n\t}\n\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateWcagRef(this.accessibleLabelledBy, 'accessible-labelled-by', DialogClass.root)\n\t\tvalidateWcagRef(this.accessibleDescribedBy, 'accessible-described-by', DialogClass.root)\n\t}\n}\n"],"version":3}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
-
import { g as govHost, c as toBoolAttr } from './template-
|
|
2
|
+
import { g as govHost, c as toBoolAttr } from './template-7ecee4d1.js';
|
|
3
3
|
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
4
|
-
import { B as ButtonClass } from './constants-
|
|
4
|
+
import { B as ButtonClass } from './constants-51f51588.js';
|
|
5
5
|
import './sizes-5b9e579f.js';
|
|
6
|
-
import './colors-
|
|
7
|
-
import './utils-
|
|
6
|
+
import './colors-4cf64720.js';
|
|
7
|
+
import './utils-e10e994d.js';
|
|
8
8
|
|
|
9
9
|
const ClickOutsideOptionsDefaults = {
|
|
10
10
|
triggerEvents: "click",
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
-
import {
|
|
2
|
+
import { p as pick } from './utils-e10e994d.js';
|
|
3
3
|
import { S as Sizes } from './sizes-5b9e579f.js';
|
|
4
|
-
import { g as govHost } from './template-
|
|
5
|
-
import { v as validateProp } from './props-
|
|
6
|
-
import { a as AccordionClass, b as AccordionSizes } from './constants-
|
|
7
|
-
import './gov.log-
|
|
8
|
-
import './win-cec370ad.js';
|
|
4
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
5
|
+
import { v as validateProp } from './props-fb6587c3.js';
|
|
6
|
+
import { a as AccordionClass, b as AccordionSizes } from './constants-3ab65c42.js';
|
|
7
|
+
import './gov.log-066c3139.js';
|
|
9
8
|
|
|
10
9
|
pick(Sizes, ['_S', '_M', '_L']);
|
|
11
10
|
const EmptyClass = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-empty.entry.js","mappings":"
|
|
1
|
+
{"file":"gov-empty.entry.js","mappings":";;;;;;;;AAI0B,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAC;AAGlD,MAAM,UAAU,GAAG;IACzB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,oBAAoB;CAC7B;;MCAY,QAAQ;IAGpB;;oBAQyC,GAAG;QAP3C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IASD,YAAY,CAAC,QAAgB;QAC5B,YAAY,CAAC,cAAc,EAAE,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;KAC3D;IAED,iBAAiB;QAChB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC5B;IAED,MAAM;QACL,QACC,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,IAC3D,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KACtB,6DAAM,IAAI,EAAC,MAAM,GAAG,CACpB,EACD,4DAAK,KAAK,EAAE,UAAU,CAAC,OAAO,IAC7B,6DAAM,IAAI,EAAC,UAAU,GAAG,EACxB,8DAAQ,CACH,CACA,EACP;KACD;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-empty/constants.ts","../../../packages/core/src/components/gov-empty/gov-empty.tsx"],"sourcesContent":["import {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const EmptySizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type EmptySizesType = `${ValueOf<typeof EmptySizes>}`\n\nexport const EmptyClass = {\n\troot: 'gov-empty',\n\tcontent: 'gov-empty__content',\n}\n","import {Component, Element, Host, h, Prop, Watch} from '@stencil/core'\nimport {EmptyClass, EmptySizesType} from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {AccordionClass, AccordionSizes} from \"../gov-accordion/constants\";\n\n@Component({\n\ttag: 'gov-empty',\n})\nexport class GovEmpty {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovEmptyElement\n\t/**\n\t * Element size.\n\t */\n\t@Prop() readonly size?: EmptySizesType = 'm'\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(AccordionSizes, newValue, AccordionClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(EmptyClass.root)} size={this.size}>\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t)}\n\t\t\t\t<div class={EmptyClass.content}>\n\t\t\t\t\t<slot name=\"headline\" />\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|