@gov-design-system-ce/components 4.1.0-rc1 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{colors-976f6dff.js → colors-f7c8eadd.js} +7 -9
- package/dist/cjs/colors-f7c8eadd.js.map +1 -0
- package/dist/cjs/{constants-e2807da6.js → constants-49f0efa6.js} +2 -2
- package/dist/cjs/{constants-e2807da6.js.map → constants-49f0efa6.js.map} +1 -1
- package/dist/cjs/{constants-43c0c51b.js → constants-4dfa23e3.js} +2 -2
- package/dist/cjs/{constants-43c0c51b.js.map → constants-4dfa23e3.js.map} +1 -1
- package/dist/cjs/{constants-441d1af4.js → constants-82929d01.js} +2 -2
- package/dist/cjs/{constants-441d1af4.js.map → constants-82929d01.js.map} +1 -1
- package/dist/cjs/{constants-bd0d66ac.js → constants-b9fece07.js} +2 -2
- package/dist/cjs/{constants-bd0d66ac.js.map → constants-b9fece07.js.map} +1 -1
- package/dist/cjs/{constants-5037cdc9.js → constants-c0886404.js} +2 -2
- package/dist/cjs/{constants-5037cdc9.js.map → constants-c0886404.js.map} +1 -1
- package/dist/cjs/{constants-861428a4.js → constants-f464dc4c.js} +2 -2
- package/dist/cjs/{constants-861428a4.js.map → constants-f464dc4c.js.map} +1 -1
- package/dist/cjs/core.cjs.js +2 -2
- package/dist/cjs/{form-c1aec07a.js → form-4e66039a.js} +4 -3
- package/dist/cjs/form-4e66039a.js.map +1 -0
- package/dist/cjs/gov-accordion-item.cjs.entry.js +11 -9
- package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-accordion.cjs.entry.js +4 -5
- package/dist/cjs/gov-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-attachments_3.cjs.entry.js +14 -15
- package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-backdrop.cjs.entry.js +7 -8
- package/dist/cjs/gov-backdrop.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js +7 -8
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-button.cjs.entry.js +12 -13
- package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-card.cjs.entry.js +7 -8
- package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-chip.cjs.entry.js +13 -14
- package/dist/cjs/gov-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-container.cjs.entry.js +3 -11
- package/dist/cjs/gov-container.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-control-group.cjs.entry.js +6 -7
- package/dist/cjs/gov-control-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-cookiebar.cjs.entry.js +3 -3
- package/dist/cjs/gov-dialog.cjs.entry.js +7 -8
- package/dist/cjs/gov-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-dropdown.cjs.entry.js +6 -6
- package/dist/cjs/gov-empty.cjs.entry.js +5 -6
- package/dist/cjs/gov-empty.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-error-code.cjs.entry.js +3 -3
- package/dist/cjs/gov-flex_4.cjs.entry.js +339 -0
- package/dist/cjs/gov-flex_4.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js +6 -8
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +6 -7
- package/dist/cjs/gov-form-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-checkbox.cjs.entry.js +9 -10
- package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-control.cjs.entry.js +7 -7
- package/dist/cjs/gov-form-file.cjs.entry.js +13 -10
- package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-group.cjs.entry.js +5 -6
- package/dist/cjs/gov-form-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-input_2.cjs.entry.js +14 -13
- package/dist/cjs/gov-form-input_2.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-multi-select.cjs.entry.js +13 -29
- package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-password-power.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-radio-group.cjs.entry.js +6 -7
- package/dist/cjs/gov-form-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-radio.cjs.entry.js +8 -9
- package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js +3 -3
- package/dist/cjs/gov-form-select.cjs.entry.js +10 -11
- package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-switch.cjs.entry.js +9 -10
- package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-grid-item.cjs.entry.js +3 -3
- package/dist/cjs/gov-grid.cjs.entry.js +3 -3
- package/dist/cjs/gov-infobar.cjs.entry.js +7 -8
- package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-layout-column.cjs.entry.js +3 -3
- package/dist/cjs/gov-layout.cjs.entry.js +3 -3
- package/dist/cjs/gov-lifecycle.cjs.entry.js +47 -0
- package/dist/cjs/gov-lifecycle.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-link.cjs.entry.js +51 -0
- package/dist/cjs/gov-link.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-loading.cjs.entry.js +5 -6
- package/dist/cjs/gov-loading.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-message.cjs.entry.js +6 -7
- package/dist/cjs/gov-message.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-pagination.cjs.entry.js +8 -9
- package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-spacer.cjs.entry.js +5 -6
- package/dist/cjs/gov-spacer.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-stepper-item.cjs.entry.js +8 -9
- package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-stepper.cjs.entry.js +7 -8
- package/dist/cjs/gov-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tabs-item.cjs.entry.js +6 -6
- package/dist/cjs/gov-tabs.cjs.entry.js +7 -8
- package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tag.cjs.entry.js +11 -12
- package/dist/cjs/gov-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tile.cjs.entry.js +3 -3
- package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tiles.cjs.entry.js +3 -3
- package/dist/cjs/gov-toast.cjs.entry.js +10 -11
- package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tooltip-content.cjs.entry.js +5 -5
- package/dist/cjs/gov-tooltip-content.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tooltip.cjs.entry.js +12 -13
- package/dist/cjs/gov-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard-item.cjs.entry.js +10 -11
- package/dist/cjs/gov-wizard-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard.cjs.entry.js +10 -11
- package/dist/cjs/gov-wizard.cjs.entry.js.map +1 -1
- package/dist/cjs/{win-587f4614.js → gov.log-bfea3151.js} +16 -4
- package/dist/cjs/gov.log-bfea3151.js.map +1 -0
- package/dist/cjs/{index-1af4880c.js → index-7ff4447c.js} +20 -12
- package/dist/cjs/index-7ff4447c.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{props-b8a955b2.js → props-d189860c.js} +2 -2
- package/dist/cjs/{props-b8a955b2.js.map → props-d189860c.js.map} +1 -1
- package/dist/cjs/{string.utils-2335838f.js → string.utils-b84c81cf.js} +2 -1
- package/dist/cjs/string.utils-b84c81cf.js.map +1 -0
- package/dist/cjs/{template-b070338f.js → template-39939fd6.js} +1 -20
- package/dist/cjs/template-39939fd6.js.map +1 -0
- package/dist/cjs/{wcag-31089f70.js → wcag-2927ff73.js} +5 -6
- package/dist/cjs/wcag-2927ff73.js.map +1 -0
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/gov-accordion/gov-accordion-item.js +8 -5
- package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments-item.css +6 -35
- package/dist/collection/components/gov-attachments/gov-attachments-item.js +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments-item.js.map +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments.js +1 -1
- package/dist/collection/components/gov-backdrop/gov-backdrop.js +1 -1
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +1 -1
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js.map +1 -1
- package/dist/collection/components/gov-button/button/gov-button.js +9 -9
- package/dist/collection/components/gov-button/button/gov-button.js.map +1 -1
- package/dist/collection/components/gov-button/dropdown/gov-dropdown.js +1 -1
- package/dist/collection/components/gov-card/gov-card.js +1 -1
- package/dist/collection/components/gov-card/gov-card.js.map +1 -1
- package/dist/collection/components/gov-chip/gov-chip.js +16 -16
- package/dist/collection/components/gov-chip/gov-chip.js.map +1 -1
- package/dist/collection/components/gov-container/gov-container.js +2 -38
- package/dist/collection/components/gov-container/gov-container.js.map +1 -1
- package/dist/collection/components/gov-control-group/gov-control-group.js +1 -1
- package/dist/collection/components/gov-cookiebar/gov-cookiebar.js +1 -1
- package/dist/collection/components/gov-dialog/gov-dialog.js +1 -1
- package/dist/collection/components/gov-dialog/gov-dialog.js.map +1 -1
- package/dist/collection/components/gov-empty/gov-empty.js +1 -1
- package/dist/collection/components/gov-error-code/gov-error-code.js +1 -1
- package/dist/collection/components/gov-flex/constants.js +4 -0
- package/dist/collection/components/gov-flex/constants.js.map +1 -0
- package/dist/collection/components/gov-flex/gov-flex.js +127 -0
- package/dist/collection/components/gov-flex/gov-flex.js.map +1 -0
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +2 -21
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +3 -3
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
- package/dist/collection/components/gov-form/control/gov-form-control.js +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.js +8 -23
- package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
- package/dist/collection/components/gov-form/group/gov-form-checkbox-group.js +1 -1
- package/dist/collection/components/gov-form/group/gov-form-group.css +7 -36
- package/dist/collection/components/gov-form/group/gov-form-group.js +1 -1
- package/dist/collection/components/gov-form/group/gov-form-radio-group.js +1 -1
- package/dist/collection/components/gov-form/input/constants.js +1 -0
- package/dist/collection/components/gov-form/input/constants.js.map +1 -1
- package/dist/collection/components/gov-form/input/gov-form-input.js +5 -3
- package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
- package/dist/collection/components/gov-form/label/gov-form-label.js +1 -1
- package/dist/collection/components/gov-form/message/gov-form-message.js +1 -1
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +6 -30
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
- package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +1 -1
- package/dist/collection/components/gov-form/radio/gov-form-radio.js +1 -1
- package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
- package/dist/collection/components/gov-form/search/gov-form-search.js +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.js +4 -4
- package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
- package/dist/collection/components/gov-form/switch/constants.js +1 -1
- package/dist/collection/components/gov-form/switch/constants.js.map +1 -1
- package/dist/collection/components/gov-form/switch/gov-form-switch.js +4 -4
- package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
- package/dist/collection/components/gov-grid/gov-grid-item.js +1 -1
- package/dist/collection/components/gov-grid/gov-grid.js +1 -1
- package/dist/collection/components/gov-icon/constants.js +8 -7
- package/dist/collection/components/gov-icon/constants.js.map +1 -1
- package/dist/collection/components/gov-icon/gov-icon.js +41 -10
- package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
- package/dist/collection/components/gov-icon/list.js +43 -151
- package/dist/collection/components/gov-icon/list.js.map +1 -1
- package/dist/collection/components/gov-infobar/gov-infobar.js +2 -2
- package/dist/collection/components/gov-infobar/gov-infobar.js.map +1 -1
- package/dist/collection/components/gov-layout/gov-layout-column.js +1 -1
- package/dist/collection/components/gov-layout/gov-layout.js +1 -1
- package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js +39 -0
- package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js.map +1 -0
- package/dist/collection/components/gov-link/constants.js +7 -0
- package/dist/collection/components/gov-link/constants.js.map +1 -0
- package/dist/collection/components/gov-link/gov-link.js +129 -0
- package/dist/collection/components/gov-link/gov-link.js.map +1 -0
- package/dist/collection/components/gov-loading/loading/gov-loading.js +1 -1
- package/dist/collection/components/gov-loading/loading/gov-loading.js.map +1 -1
- package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +1 -1
- package/dist/collection/components/gov-message/gov-message.js +1 -1
- package/dist/collection/components/gov-pagination/gov-pagination.js +2 -2
- package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
- package/dist/collection/components/gov-spacer/gov-spacer.js +1 -1
- package/dist/collection/components/gov-stepper/gov-stepper-item.js +1 -1
- package/dist/collection/components/gov-stepper/gov-stepper.js +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs.js +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
- package/dist/collection/components/gov-tag/gov-tag.js +9 -9
- package/dist/collection/components/gov-tag/gov-tag.js.map +1 -1
- package/dist/collection/components/gov-theme-switch/constants.js +9 -1
- package/dist/collection/components/gov-theme-switch/constants.js.map +1 -1
- package/dist/collection/components/gov-theme-switch/gov-theme-switch.js +134 -10
- package/dist/collection/components/gov-theme-switch/gov-theme-switch.js.map +1 -1
- package/dist/collection/components/gov-tile/container/gov-tiles.js +1 -1
- package/dist/collection/components/gov-tile/gov-tile.js +7 -7
- package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
- package/dist/collection/components/gov-toast/constants.js +1 -0
- package/dist/collection/components/gov-toast/constants.js.map +1 -1
- package/dist/collection/components/gov-toast/gov-toast.js +3 -4
- package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.js.map +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip.js +2 -2
- package/dist/collection/components/gov-wizard/gov-wizard-item.js +3 -3
- package/dist/collection/components/gov-wizard/gov-wizard-item.js.map +1 -1
- package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
- package/dist/collection/core/constants/colors.js +6 -8
- package/dist/collection/core/constants/colors.js.map +1 -1
- package/dist/collection/data/color-definitions.js +359 -172
- package/dist/collection/helpers/Dom/document.js +46 -0
- package/dist/collection/helpers/Dom/document.js.map +1 -0
- package/dist/collection/helpers/Dom/template.js +0 -18
- package/dist/collection/helpers/Dom/template.js.map +1 -1
- package/dist/collection/helpers/Dom/template.types.js.map +1 -1
- package/dist/collection/pages/Accordion.js +30 -30
- package/dist/collection/pages/Accordion.js.map +1 -1
- package/dist/collection/pages/Button.js +383 -383
- package/dist/collection/pages/Button.js.map +1 -1
- package/dist/collection/pages/Chip.js +53 -53
- package/dist/collection/pages/Chip.js.map +1 -1
- package/dist/collection/pages/ControlGroup.js +18 -18
- package/dist/collection/pages/ControlGroup.js.map +1 -1
- package/dist/collection/pages/Dialog.js +1 -1
- package/dist/collection/pages/Dialog.js.map +1 -1
- package/dist/collection/pages/Forms.js +206 -196
- package/dist/collection/pages/Forms.js.map +1 -1
- package/dist/collection/pages/Grid.js +1 -1
- package/dist/collection/pages/Grid.js.map +1 -1
- package/dist/collection/pages/Icon.js +10 -0
- package/dist/collection/pages/Icon.js.map +1 -1
- package/dist/collection/pages/Infobar.js +16 -16
- package/dist/collection/pages/Infobar.js.map +1 -1
- package/dist/collection/pages/Message.js +20 -20
- package/dist/collection/pages/Message.js.map +1 -1
- package/dist/collection/pages/Spacer.js +1 -1
- package/dist/collection/pages/Spacer.js.map +1 -1
- package/dist/collection/pages/Stepper.js +15 -15
- package/dist/collection/pages/Stepper.js.map +1 -1
- package/dist/collection/pages/Tag.js +135 -160
- package/dist/collection/pages/Tag.js.map +1 -1
- package/dist/collection/pages/ToastMessage.js +4 -4
- package/dist/collection/pages/ToastMessage.js.map +1 -1
- package/dist/collection/pages/ToastMessageCountdown.js +4 -4
- package/dist/collection/pages/ToastMessageCountdown.js.map +1 -1
- package/dist/collection/pages/Tooltip.js +2 -2
- package/dist/collection/pages/Tooltip.js.map +1 -1
- package/dist/collection/pages/Typography.js +20 -0
- package/dist/collection/pages/Typography.js.map +1 -1
- package/dist/collection/pages/Wizard.js +2 -2
- package/dist/collection/pages/Wizard.js.map +1 -1
- package/dist/collection/utils/string.utils.js +1 -1
- package/dist/collection/utils/string.utils.js.map +1 -1
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-accordion-item.js.map +1 -1
- package/dist/components/gov-accordion.js +1 -1
- package/dist/components/gov-attachments-item.js +1 -1
- package/dist/components/gov-attachments.js +1 -1
- package/dist/components/gov-backdrop.js +1 -1
- package/dist/components/gov-breadcrumbs.js +1 -1
- package/dist/components/gov-breadcrumbs.js.map +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-card.js.map +1 -1
- package/dist/components/gov-chip.js +1 -1
- package/dist/components/gov-container.js +1 -1
- package/dist/components/gov-container.js.map +1 -1
- package/dist/components/gov-control-group.js +1 -1
- package/dist/components/gov-cookiebar.js +1 -1
- package/dist/components/gov-dialog.js +1 -1
- package/dist/components/gov-dialog.js.map +1 -1
- package/dist/components/gov-dropdown.js +1 -1
- package/dist/components/gov-dropdown.js.map +1 -1
- package/dist/components/gov-empty.js +1 -1
- package/dist/components/gov-error-code.js +1 -1
- package/dist/components/{gov-app.d.ts → gov-flex.d.ts} +4 -4
- package/dist/components/gov-flex.js +2 -0
- package/dist/components/gov-flex.js.map +1 -0
- package/dist/components/gov-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox-group.js +1 -1
- package/dist/components/gov-form-checkbox-group.js.map +1 -1
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-checkbox.js.map +1 -1
- package/dist/components/gov-form-control.js +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-file.js.map +1 -1
- package/dist/components/gov-form-group.js +1 -1
- package/dist/components/gov-form-input.js +1 -1
- package/dist/components/gov-form-label.js +1 -1
- package/dist/components/gov-form-label.js.map +1 -1
- package/dist/components/gov-form-message.js +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-multi-select.js.map +1 -1
- package/dist/components/gov-form-password-power.js +1 -1
- package/dist/components/gov-form-radio-group.js +1 -1
- package/dist/components/gov-form-radio-group.js.map +1 -1
- package/dist/components/gov-form-radio.js +1 -1
- package/dist/components/gov-form-radio.js.map +1 -1
- package/dist/components/gov-form-search.js +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-form-switch.js +1 -1
- package/dist/components/gov-form-switch.js.map +1 -1
- package/dist/components/gov-grid-item.js +1 -1
- package/dist/components/gov-grid.js +1 -1
- package/dist/components/gov-icon.js +1 -1
- package/dist/components/gov-infobar.js +1 -1
- package/dist/components/gov-infobar.js.map +1 -1
- package/dist/components/gov-layout-column.js +1 -1
- package/dist/components/gov-layout.js +1 -1
- package/dist/components/gov-lifecycle.d.ts +11 -0
- package/dist/components/gov-lifecycle.js +2 -0
- package/dist/components/gov-lifecycle.js.map +1 -0
- package/dist/components/gov-link.d.ts +11 -0
- package/dist/components/gov-link.js +2 -0
- package/dist/components/gov-link.js.map +1 -0
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-loading.js.map +1 -1
- package/dist/components/gov-message.js +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-pagination.js.map +1 -1
- package/dist/components/gov-skeleton.js +1 -1
- package/dist/components/gov-spacer.js +1 -1
- package/dist/components/gov-stepper-item.js +1 -1
- package/dist/components/gov-stepper.js +1 -1
- package/dist/components/gov-tabs-item.js +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tabs.js.map +1 -1
- package/dist/components/gov-tag.js +1 -1
- package/dist/components/gov-tag.js.map +1 -1
- package/dist/components/gov-theme-switch.js +1 -1
- package/dist/components/gov-theme-switch.js.map +1 -1
- package/dist/components/gov-tile.js +1 -1
- package/dist/components/gov-tile.js.map +1 -1
- package/dist/components/gov-tiles.js +1 -1
- package/dist/components/gov-toast.js +1 -1
- package/dist/components/gov-toast.js.map +1 -1
- package/dist/components/gov-tooltip-content.js +1 -1
- package/dist/components/gov-tooltip-content.js.map +1 -1
- package/dist/components/gov-tooltip.js +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/gov-wizard-item.js.map +1 -1
- package/dist/components/gov-wizard.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-0b3574c2.js +2 -0
- package/dist/components/p-1eb9c053.js +2 -0
- package/dist/components/p-1eb9c053.js.map +1 -0
- package/dist/components/p-283b66c3.js +2 -0
- package/dist/components/p-283b66c3.js.map +1 -0
- package/dist/components/p-318d89bd.js +2 -0
- package/dist/components/{p-1366ed8d.js.map → p-318d89bd.js.map} +1 -1
- package/dist/components/p-3d7a21b5.js +2 -0
- package/dist/components/p-3d7a21b5.js.map +1 -0
- package/dist/components/{p-ae3dada7.js → p-42200001.js} +3 -3
- package/dist/components/p-42200001.js.map +1 -0
- package/dist/components/p-44a8a668.js +2 -0
- package/dist/components/p-46c567fd.js +2 -0
- package/dist/components/p-46c567fd.js.map +1 -0
- package/dist/components/p-5aad3497.js +2 -0
- package/dist/components/p-5aad3497.js.map +1 -0
- package/dist/components/p-68a1aaec.js +2 -0
- package/dist/components/p-68a1aaec.js.map +1 -0
- package/dist/components/p-73938936.js +2 -0
- package/dist/components/p-76d604c6.js +2 -0
- package/dist/components/p-7be2301a.js +2 -0
- package/dist/components/p-7f3becc5.js +2 -0
- package/dist/components/p-80dad64b.js +2 -0
- package/dist/components/{p-9a93146e.js.map → p-80dad64b.js.map} +1 -1
- package/dist/components/{p-7f8a24a7.js → p-860520b0.js} +2 -2
- package/dist/components/p-880743a5.js.map +1 -1
- package/dist/components/p-9908b9f0.js +2 -0
- package/dist/components/p-9908b9f0.js.map +1 -0
- package/dist/components/{p-59737af9.js → p-a521c59a.js} +2 -2
- package/dist/components/p-a6b7a6c2.js +2 -0
- package/dist/components/p-a6be4769.js +2 -0
- package/dist/components/p-a6be4769.js.map +1 -0
- package/dist/components/{p-6e19816b.js → p-ac359044.js} +2 -2
- package/dist/components/p-b95ebe8c.js +2 -0
- package/dist/components/{p-dbae2385.js.map → p-b95ebe8c.js.map} +1 -1
- package/dist/components/{p-0c93dd39.js → p-c61a5830.js} +2 -2
- package/dist/components/{p-95d41a3b.js → p-cd6c2938.js} +2 -2
- package/dist/components/p-cd6c2938.js.map +1 -0
- package/dist/components/p-e8ec030e.js +2 -0
- package/dist/components/p-e8ec030e.js.map +1 -0
- package/dist/components/p-ea7fdd2e.js +2 -0
- package/dist/components/p-ea7fdd2e.js.map +1 -0
- package/dist/core/core.css +8256 -7340
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-00d153bf.entry.js +2 -0
- package/dist/core/p-019e967c.entry.js +2 -0
- package/dist/core/{p-eeb9cb73.entry.js.map → p-019e967c.entry.js.map} +1 -1
- package/dist/core/p-04fa0ab5.entry.js +2 -0
- package/dist/core/{p-db940455.entry.js.map → p-04fa0ab5.entry.js.map} +1 -1
- package/dist/core/p-0b3574c2.js +2 -0
- package/dist/core/p-0be19b89.entry.js +2 -0
- package/dist/core/p-0fdd8929.entry.js +2 -0
- package/dist/core/{p-7cf554e6.entry.js.map → p-0fdd8929.entry.js.map} +1 -1
- package/dist/core/p-1200a32d.entry.js +2 -0
- package/dist/core/p-1200a32d.entry.js.map +1 -0
- package/dist/core/p-22fa411d.entry.js +2 -0
- package/dist/core/p-2739fa61.entry.js +2 -0
- package/dist/core/p-2739fa61.entry.js.map +1 -0
- package/dist/core/p-29ac15d2.js +2 -0
- package/dist/core/{p-28a7d3f7.js.map → p-29ac15d2.js.map} +1 -1
- package/dist/core/p-30eaeeec.entry.js +2 -0
- package/dist/core/p-3bbb77a0.js +2 -0
- package/dist/core/p-3cb36bae.entry.js +2 -0
- package/dist/core/p-3cb36bae.entry.js.map +1 -0
- package/dist/core/p-3d6edb09.entry.js +2 -0
- package/dist/core/p-3d6edb09.entry.js.map +1 -0
- package/dist/core/p-3f6a2d20.entry.js +2 -0
- package/dist/core/p-3f6a2d20.entry.js.map +1 -0
- package/dist/core/p-41c6b262.entry.js +2 -0
- package/dist/core/{p-e4978aab.entry.js.map → p-41c6b262.entry.js.map} +1 -1
- package/dist/core/p-432c3875.entry.js +2 -0
- package/dist/core/p-432c3875.entry.js.map +1 -0
- package/dist/core/p-439b66a5.entry.js +2 -0
- package/dist/core/{p-a53a277a.entry.js.map → p-439b66a5.entry.js.map} +1 -1
- package/dist/core/p-4b90fbc4.entry.js +2 -0
- package/dist/core/{p-17015e36.entry.js.map → p-4b90fbc4.entry.js.map} +1 -1
- package/dist/core/p-4c5f6299.entry.js +2 -0
- package/dist/core/p-4c5f6299.entry.js.map +1 -0
- package/dist/core/p-535316b4.entry.js +2 -0
- package/dist/core/p-5396935e.entry.js +2 -0
- package/dist/core/p-561718cd.entry.js +2 -0
- package/dist/core/{p-dc3fab19.entry.js.map → p-561718cd.entry.js.map} +1 -1
- package/dist/core/p-56dc370d.entry.js +2 -0
- package/dist/core/{p-6d772ff9.entry.js.map → p-56dc370d.entry.js.map} +1 -1
- package/dist/core/{p-42d9924c.js → p-56efd4a2.js} +2 -2
- package/dist/core/p-5aad3497.js +2 -0
- package/dist/core/p-5aad3497.js.map +1 -0
- package/dist/core/p-5b2131c1.entry.js +2 -0
- package/dist/core/p-5c9e6275.entry.js +2 -0
- package/dist/core/{p-f456bd71.entry.js.map → p-5c9e6275.entry.js.map} +1 -1
- package/dist/core/{p-60658ae9.js → p-5f1000da.js} +2 -2
- package/dist/core/p-65e67731.entry.js +2 -0
- package/dist/core/p-65e67731.entry.js.map +1 -0
- package/dist/core/p-6bb37fe2.entry.js +2 -0
- package/dist/core/{p-f1be099b.entry.js.map → p-6bb37fe2.entry.js.map} +1 -1
- package/dist/core/p-6e457b3d.entry.js +2 -0
- package/dist/core/{p-5dcbfca3.entry.js.map → p-6e457b3d.entry.js.map} +1 -1
- package/dist/core/p-72130a8f.entry.js +2 -0
- package/dist/core/p-72130a8f.entry.js.map +1 -0
- package/dist/core/p-76d604c6.js +2 -0
- package/dist/core/{p-a21dc94f.js.map → p-76d604c6.js.map} +1 -1
- package/dist/core/p-7b7e502b.entry.js +2 -0
- package/dist/core/p-7ba4daf4.js +2 -0
- package/dist/core/p-7e04730a.entry.js +2 -0
- package/dist/core/{p-182189d2.entry.js.map → p-7e04730a.entry.js.map} +1 -1
- package/dist/core/p-7f3becc5.js +2 -0
- package/dist/core/{p-a1e95a5f.js → p-8506b611.js} +3 -3
- package/dist/core/p-8506b611.js.map +1 -0
- package/dist/core/{p-e9a6cd71.js → p-860520b0.js} +2 -2
- package/dist/core/p-880743a5.js.map +1 -1
- package/dist/core/p-97a9725d.entry.js +2 -0
- package/dist/core/{p-9b41ac88.entry.js.map → p-97a9725d.entry.js.map} +1 -1
- package/dist/core/p-9c2c5447.entry.js +2 -0
- package/dist/core/p-9c2c5447.entry.js.map +1 -0
- package/dist/core/p-9fe35463.entry.js +2 -0
- package/dist/core/p-9fe35463.entry.js.map +1 -0
- package/dist/core/p-a521c59a.js +2 -0
- package/dist/core/p-b7cfe254.entry.js +2 -0
- package/dist/core/{p-963f9fcd.entry.js.map → p-b7cfe254.entry.js.map} +1 -1
- package/dist/core/p-b923a8d9.entry.js +2 -0
- package/dist/core/p-b923a8d9.entry.js.map +1 -0
- package/dist/core/p-bc966c46.entry.js +2 -0
- package/dist/core/{p-83039b10.entry.js.map → p-bc966c46.entry.js.map} +1 -1
- package/dist/core/p-bcb45a18.entry.js +2 -0
- package/dist/core/{p-2ed3afef.entry.js.map → p-bcb45a18.entry.js.map} +1 -1
- package/dist/core/p-bdc51179.entry.js +2 -0
- package/dist/core/p-bdc51179.entry.js.map +1 -0
- package/dist/core/p-c054f955.entry.js +2 -0
- package/dist/core/{p-663d3db2.entry.js.map → p-c054f955.entry.js.map} +1 -1
- package/dist/core/{p-c990d746.js → p-c61a5830.js} +2 -2
- package/dist/core/p-c916d0d2.entry.js +2 -0
- package/dist/core/p-c916d0d2.entry.js.map +1 -0
- package/dist/core/p-ccec8019.entry.js +2 -0
- package/dist/core/p-ccec8019.entry.js.map +1 -0
- package/dist/core/p-cd2d335d.entry.js +2 -0
- package/dist/core/{p-b3acb156.entry.js.map → p-cd2d335d.entry.js.map} +1 -1
- package/dist/core/{p-95d41a3b.js → p-cd6c2938.js} +2 -2
- package/dist/core/p-cd6c2938.js.map +1 -0
- package/dist/core/p-d65cef62.entry.js +2 -0
- package/dist/core/{p-aa8adc45.entry.js.map → p-d65cef62.entry.js.map} +1 -1
- package/dist/core/p-d836fcde.entry.js +2 -0
- package/dist/core/{p-b55fc943.entry.js.map → p-d836fcde.entry.js.map} +1 -1
- package/dist/core/p-da1db6fd.js +2 -0
- package/dist/core/p-da1db6fd.js.map +1 -0
- package/dist/core/p-da7f1e11.entry.js +2 -0
- package/dist/core/p-da7f1e11.entry.js.map +1 -0
- package/dist/core/p-dea64896.entry.js +2 -0
- package/dist/core/{p-ab9ae7ba.entry.js.map → p-dea64896.entry.js.map} +1 -1
- package/dist/core/{p-45a30859.js → p-e0e2e9c1.js} +2 -2
- package/dist/core/p-e44a0fee.js +2 -0
- package/dist/core/p-e61aa53b.entry.js +2 -0
- package/dist/core/{p-d2351924.entry.js.map → p-e61aa53b.entry.js.map} +1 -1
- package/dist/core/p-e834ee73.entry.js +2 -0
- package/dist/core/p-e834ee73.entry.js.map +1 -0
- package/dist/core/p-e8ec030e.js +2 -0
- package/dist/core/p-e8ec030e.js.map +1 -0
- package/dist/core/p-ea44d447.entry.js +2 -0
- package/dist/core/p-ea44d447.entry.js.map +1 -0
- package/dist/core/p-ea7fdd2e.js +2 -0
- package/dist/core/p-ea7fdd2e.js.map +1 -0
- package/dist/core/p-ed833334.entry.js +2 -0
- package/dist/core/p-ed833334.entry.js.map +1 -0
- package/dist/core/p-ed8fc183.entry.js +2 -0
- package/dist/core/p-ed8fc183.entry.js.map +1 -0
- package/dist/core/p-f4bcf817.entry.js +2 -0
- package/dist/core/p-f4bcf817.entry.js.map +1 -0
- package/dist/core/p-f4dac942.entry.js +2 -0
- package/dist/core/{p-9ff8f059.entry.js.map → p-f4dac942.entry.js.map} +1 -1
- package/dist/core/p-f7a4da9d.entry.js +2 -0
- package/dist/core/{p-a5489b0e.entry.js.map → p-f7a4da9d.entry.js.map} +1 -1
- package/dist/esm/{colors-02c1ea96.js → colors-4cf64720.js} +7 -9
- package/dist/esm/colors-4cf64720.js.map +1 -0
- package/dist/esm/{constants-6d727976.js → constants-085f9943.js} +2 -2
- package/dist/esm/{constants-6d727976.js.map → constants-085f9943.js.map} +1 -1
- package/dist/esm/{constants-990365f1.js → constants-372455eb.js} +3 -3
- package/dist/esm/{constants-990365f1.js.map → constants-372455eb.js.map} +1 -1
- package/dist/esm/{constants-d6418889.js → constants-3ab65c42.js} +2 -2
- package/dist/esm/{constants-d6418889.js.map → constants-3ab65c42.js.map} +1 -1
- package/dist/esm/{constants-48177684.js → constants-3b914c35.js} +3 -3
- package/dist/esm/{constants-48177684.js.map → constants-3b914c35.js.map} +1 -1
- package/dist/esm/{constants-d42abf99.js → constants-43f10674.js} +2 -2
- package/dist/esm/{constants-d42abf99.js.map → constants-43f10674.js.map} +1 -1
- package/dist/esm/{constants-501eb756.js → constants-4da2b3c0.js} +2 -2
- package/dist/esm/{constants-501eb756.js.map → constants-4da2b3c0.js.map} +1 -1
- package/dist/esm/{constants-c716fa44.js → constants-51f51588.js} +3 -3
- package/dist/esm/{constants-c716fa44.js.map → constants-51f51588.js.map} +1 -1
- package/dist/esm/{constants-f4e4ede6.js → constants-8429b68f.js} +3 -3
- package/dist/esm/{constants-f4e4ede6.js.map → constants-8429b68f.js.map} +1 -1
- package/dist/esm/{constants-47e20524.js → constants-9177ea52.js} +3 -3
- package/dist/esm/{constants-47e20524.js.map → constants-9177ea52.js.map} +1 -1
- package/dist/esm/{constants-7307438d.js → constants-bc210662.js} +3 -3
- package/dist/esm/{constants-7307438d.js.map → constants-bc210662.js.map} +1 -1
- package/dist/esm/core.js +3 -3
- package/dist/esm/{form-472e078d.js → form-713f26fd.js} +7 -6
- package/dist/esm/form-713f26fd.js.map +1 -0
- package/dist/esm/gov-accordion-item.entry.js +13 -11
- package/dist/esm/gov-accordion-item.entry.js.map +1 -1
- package/dist/esm/gov-accordion.entry.js +6 -7
- package/dist/esm/gov-accordion.entry.js.map +1 -1
- package/dist/esm/gov-attachments_3.entry.js +13 -14
- package/dist/esm/gov-attachments_3.entry.js.map +1 -1
- package/dist/esm/gov-backdrop.entry.js +7 -8
- package/dist/esm/gov-backdrop.entry.js.map +1 -1
- package/dist/esm/gov-breadcrumbs.entry.js +7 -8
- package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
- package/dist/esm/gov-button.entry.js +12 -13
- package/dist/esm/gov-button.entry.js.map +1 -1
- package/dist/esm/gov-card.entry.js +7 -8
- package/dist/esm/gov-card.entry.js.map +1 -1
- package/dist/esm/gov-chip.entry.js +14 -15
- package/dist/esm/gov-chip.entry.js.map +1 -1
- package/dist/esm/gov-container.entry.js +3 -11
- package/dist/esm/gov-container.entry.js.map +1 -1
- package/dist/esm/gov-control-group.entry.js +7 -8
- package/dist/esm/gov-control-group.entry.js.map +1 -1
- package/dist/esm/gov-cookiebar.entry.js +3 -3
- package/dist/esm/gov-dialog.entry.js +7 -8
- package/dist/esm/gov-dialog.entry.js.map +1 -1
- package/dist/esm/gov-dropdown.entry.js +7 -7
- package/dist/esm/gov-empty.entry.js +7 -8
- package/dist/esm/gov-empty.entry.js.map +1 -1
- package/dist/esm/gov-error-code.entry.js +3 -3
- package/dist/esm/gov-flex_4.entry.js +332 -0
- package/dist/esm/gov-flex_4.entry.js.map +1 -0
- package/dist/esm/gov-form-autocomplete.entry.js +8 -10
- package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
- package/dist/esm/gov-form-checkbox-group.entry.js +8 -9
- package/dist/esm/gov-form-checkbox-group.entry.js.map +1 -1
- package/dist/esm/gov-form-checkbox.entry.js +12 -13
- package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
- package/dist/esm/gov-form-control.entry.js +10 -10
- package/dist/esm/gov-form-file.entry.js +16 -13
- package/dist/esm/gov-form-file.entry.js.map +1 -1
- package/dist/esm/gov-form-group.entry.js +7 -8
- package/dist/esm/gov-form-group.entry.js.map +1 -1
- package/dist/esm/gov-form-input_2.entry.js +17 -16
- package/dist/esm/gov-form-input_2.entry.js.map +1 -1
- package/dist/esm/gov-form-multi-select.entry.js +16 -32
- package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
- package/dist/esm/gov-form-password-power.entry.js +2 -2
- package/dist/esm/gov-form-radio-group.entry.js +8 -9
- package/dist/esm/gov-form-radio-group.entry.js.map +1 -1
- package/dist/esm/gov-form-radio.entry.js +11 -12
- package/dist/esm/gov-form-radio.entry.js.map +1 -1
- package/dist/esm/gov-form-search.entry.js +4 -4
- package/dist/esm/gov-form-select.entry.js +13 -14
- package/dist/esm/gov-form-select.entry.js.map +1 -1
- package/dist/esm/gov-form-switch.entry.js +12 -13
- package/dist/esm/gov-form-switch.entry.js.map +1 -1
- package/dist/esm/gov-grid-item.entry.js +3 -3
- package/dist/esm/gov-grid.entry.js +3 -3
- package/dist/esm/gov-infobar.entry.js +8 -9
- package/dist/esm/gov-infobar.entry.js.map +1 -1
- package/dist/esm/gov-layout-column.entry.js +3 -3
- package/dist/esm/gov-layout.entry.js +3 -3
- package/dist/esm/gov-lifecycle.entry.js +43 -0
- package/dist/esm/gov-lifecycle.entry.js.map +1 -0
- package/dist/esm/gov-link.entry.js +47 -0
- package/dist/esm/gov-link.entry.js.map +1 -0
- package/dist/esm/gov-loading.entry.js +6 -7
- package/dist/esm/gov-loading.entry.js.map +1 -1
- package/dist/esm/gov-message.entry.js +7 -8
- package/dist/esm/gov-message.entry.js.map +1 -1
- package/dist/esm/gov-pagination.entry.js +9 -10
- package/dist/esm/gov-pagination.entry.js.map +1 -1
- package/dist/esm/gov-spacer.entry.js +6 -7
- package/dist/esm/gov-spacer.entry.js.map +1 -1
- package/dist/esm/gov-stepper-item.entry.js +9 -10
- package/dist/esm/gov-stepper-item.entry.js.map +1 -1
- package/dist/esm/gov-stepper.entry.js +8 -9
- package/dist/esm/gov-stepper.entry.js.map +1 -1
- package/dist/esm/gov-tabs-item.entry.js +7 -7
- package/dist/esm/gov-tabs.entry.js +8 -9
- package/dist/esm/gov-tabs.entry.js.map +1 -1
- package/dist/esm/gov-tag.entry.js +12 -13
- package/dist/esm/gov-tag.entry.js.map +1 -1
- package/dist/esm/gov-tile.entry.js +4 -4
- package/dist/esm/gov-tile.entry.js.map +1 -1
- package/dist/esm/gov-tiles.entry.js +3 -3
- package/dist/esm/gov-toast.entry.js +11 -12
- package/dist/esm/gov-toast.entry.js.map +1 -1
- package/dist/esm/gov-tooltip-content.entry.js +6 -6
- package/dist/esm/gov-tooltip-content.entry.js.map +1 -1
- package/dist/esm/gov-tooltip.entry.js +10 -11
- package/dist/esm/gov-tooltip.entry.js.map +1 -1
- package/dist/esm/gov-wizard-item.entry.js +11 -12
- package/dist/esm/gov-wizard-item.entry.js.map +1 -1
- package/dist/esm/gov-wizard.entry.js +10 -11
- package/dist/esm/gov-wizard.entry.js.map +1 -1
- package/dist/esm/{win-cec370ad.js → gov.log-6b64cda6.js} +17 -3
- package/dist/esm/gov.log-6b64cda6.js.map +1 -0
- package/dist/esm/{index-d8b4eb6c.js → index-c263e031.js} +20 -12
- package/dist/esm/index-c263e031.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{props-c82e1abf.js → props-9d3c7ac1.js} +2 -2
- package/dist/esm/{props-c82e1abf.js.map → props-9d3c7ac1.js.map} +1 -1
- package/dist/esm/{string.utils-5ce3f551.js → string.utils-1da8f8fb.js} +2 -2
- package/dist/esm/string.utils-1da8f8fb.js.map +1 -0
- package/dist/esm/{template-3d84d705.js → template-7ecee4d1.js} +2 -20
- package/dist/esm/template-7ecee4d1.js.map +1 -0
- package/dist/esm/{utils-2b4ef320.js → utils-e10e994d.js} +2 -2
- package/dist/esm/{utils-2b4ef320.js.map → utils-e10e994d.js.map} +1 -1
- package/dist/esm/{wcag-fa5ce56c.js → wcag-253a4421.js} +3 -4
- package/dist/esm/wcag-253a4421.js.map +1 -0
- package/dist/hydrate/index.js +431 -10072
- package/dist/hydrate/index.mjs +431 -10072
- package/dist/stencil.config.js +9 -6
- package/dist/stencil.config.js.map +1 -1
- package/dist/types/components/gov-accordion/gov-accordion-item.d.ts +1 -0
- package/dist/types/components/gov-button/button/gov-button.d.ts +1 -1
- package/dist/types/components/gov-chip/gov-chip.d.ts +3 -3
- package/dist/types/components/gov-container/gov-container.d.ts +0 -6
- package/dist/types/components/gov-flex/constants.d.ts +3 -0
- package/dist/types/components/gov-flex/gov-flex.d.ts +33 -0
- package/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +0 -4
- package/dist/types/components/gov-form/file/gov-form-file.d.ts +1 -4
- package/dist/types/components/gov-form/input/constants.d.ts +1 -0
- package/dist/types/components/gov-form/multiselect/gov-form-multi-select.d.ts +0 -2
- package/dist/types/components/gov-form/switch/constants.d.ts +1 -1
- package/dist/types/components/gov-icon/constants.d.ts +4 -1
- package/dist/types/components/gov-icon/gov-icon.d.ts +8 -3
- package/dist/types/components/gov-icon/list.d.ts +1 -1
- package/dist/types/components/gov-lifecycle-tester/gov-lifecycle-tester.d.ts +14 -0
- package/dist/types/components/gov-link/constants.d.ts +7 -0
- package/dist/types/components/gov-link/gov-link.d.ts +30 -0
- package/dist/types/components/gov-tag/gov-tag.d.ts +2 -2
- package/dist/types/components/gov-theme-switch/constants.d.ts +9 -0
- package/dist/types/components/gov-theme-switch/gov-theme-switch.d.ts +26 -2
- package/dist/types/components/gov-tile/gov-tile.d.ts +1 -1
- package/dist/types/components/gov-toast/constants.d.ts +1 -0
- package/dist/types/components.d.ts +191 -50
- package/dist/types/core/constants/colors.d.ts +6 -8
- package/dist/types/helpers/Dom/document.d.ts +4 -0
- package/dist/types/helpers/Dom/template.d.ts +0 -1
- package/dist/types/helpers/Dom/template.types.d.ts +0 -1
- package/dist/types/utils/string.utils.d.ts +1 -0
- package/package.json +4 -4
- package/dist/cjs/colors-976f6dff.js.map +0 -1
- package/dist/cjs/form-c1aec07a.js.map +0 -1
- package/dist/cjs/gov-app_2.cjs.entry.js +0 -9891
- package/dist/cjs/gov-app_2.cjs.entry.js.map +0 -1
- package/dist/cjs/gov-form-label.cjs.entry.js +0 -27
- package/dist/cjs/gov-form-label.cjs.entry.js.map +0 -1
- package/dist/cjs/gov-icon.cjs.entry.js +0 -161
- package/dist/cjs/gov-icon.cjs.entry.js.map +0 -1
- package/dist/cjs/gov.log-1e8bab6e.js +0 -21
- package/dist/cjs/gov.log-1e8bab6e.js.map +0 -1
- package/dist/cjs/index-1af4880c.js.map +0 -1
- package/dist/cjs/string.utils-2335838f.js.map +0 -1
- package/dist/cjs/template-b070338f.js.map +0 -1
- package/dist/cjs/wcag-31089f70.js.map +0 -1
- package/dist/cjs/win-587f4614.js.map +0 -1
- package/dist/collection/components/gov-app/gov-app.css +0 -68
- package/dist/collection/components/gov-app/gov-app.js +0 -93
- package/dist/collection/components/gov-app/gov-app.js.map +0 -1
- package/dist/components/gov-app.js +0 -2
- package/dist/components/gov-app.js.map +0 -1
- package/dist/components/p-0075138f.js +0 -2
- package/dist/components/p-0075138f.js.map +0 -1
- package/dist/components/p-08621bdf.js +0 -2
- package/dist/components/p-1366ed8d.js +0 -2
- package/dist/components/p-19c681a3.js +0 -2
- package/dist/components/p-1a0b3b4f.js +0 -2
- package/dist/components/p-1a0b3b4f.js.map +0 -1
- package/dist/components/p-255d0471.js +0 -2
- package/dist/components/p-255d0471.js.map +0 -1
- package/dist/components/p-565120d5.js +0 -2
- package/dist/components/p-736e4917.js +0 -2
- package/dist/components/p-7501abe8.js +0 -2
- package/dist/components/p-7501abe8.js.map +0 -1
- package/dist/components/p-778e3fff.js +0 -2
- package/dist/components/p-778e3fff.js.map +0 -1
- package/dist/components/p-7fd16831.js +0 -2
- package/dist/components/p-7fd16831.js.map +0 -1
- package/dist/components/p-95d41a3b.js.map +0 -1
- package/dist/components/p-9a93146e.js +0 -2
- package/dist/components/p-ae3dada7.js.map +0 -1
- package/dist/components/p-ae7e6127.js +0 -2
- package/dist/components/p-cc90a508.js +0 -2
- package/dist/components/p-cc90a508.js.map +0 -1
- package/dist/components/p-d5f25595.js +0 -2
- package/dist/components/p-d5f25595.js.map +0 -1
- package/dist/components/p-dbae2385.js +0 -2
- package/dist/components/p-dcaf0383.js +0 -2
- package/dist/components/p-dcaf0383.js.map +0 -1
- package/dist/components/p-e183a7c7.js +0 -2
- package/dist/components/p-e3aeaca0.js +0 -2
- package/dist/components/p-e3aeaca0.js.map +0 -1
- package/dist/components/p-edd1417b.js +0 -2
- package/dist/core/p-006e52f1.entry.js +0 -2
- package/dist/core/p-006e52f1.entry.js.map +0 -1
- package/dist/core/p-0075138f.js +0 -2
- package/dist/core/p-0075138f.js.map +0 -1
- package/dist/core/p-023787b3.entry.js +0 -2
- package/dist/core/p-023787b3.entry.js.map +0 -1
- package/dist/core/p-052cc573.js +0 -2
- package/dist/core/p-0a952b3c.entry.js +0 -2
- package/dist/core/p-0a952b3c.entry.js.map +0 -1
- package/dist/core/p-0ebc8365.entry.js +0 -2
- package/dist/core/p-0ebc8365.entry.js.map +0 -1
- package/dist/core/p-169b67af.js +0 -2
- package/dist/core/p-17015e36.entry.js +0 -2
- package/dist/core/p-182189d2.entry.js +0 -2
- package/dist/core/p-2614044c.js +0 -2
- package/dist/core/p-28a7d3f7.js +0 -2
- package/dist/core/p-2ed3afef.entry.js +0 -2
- package/dist/core/p-2effdd60.entry.js +0 -2
- package/dist/core/p-2effdd60.entry.js.map +0 -1
- package/dist/core/p-35e66bef.entry.js +0 -2
- package/dist/core/p-35e66bef.entry.js.map +0 -1
- package/dist/core/p-3f2b803c.entry.js +0 -2
- package/dist/core/p-477a5027.entry.js +0 -2
- package/dist/core/p-477a5027.entry.js.map +0 -1
- package/dist/core/p-47e364bb.entry.js +0 -2
- package/dist/core/p-47e364bb.entry.js.map +0 -1
- package/dist/core/p-4bce896c.js +0 -2
- package/dist/core/p-5c88f415.entry.js +0 -2
- package/dist/core/p-5c88f415.entry.js.map +0 -1
- package/dist/core/p-5dc0af54.entry.js +0 -2
- package/dist/core/p-5dc0af54.entry.js.map +0 -1
- package/dist/core/p-5dcbfca3.entry.js +0 -2
- package/dist/core/p-663d3db2.entry.js +0 -2
- package/dist/core/p-69d56f17.js +0 -2
- package/dist/core/p-6aa40794.js +0 -2
- package/dist/core/p-6b42a387.entry.js +0 -2
- package/dist/core/p-6d772ff9.entry.js +0 -2
- package/dist/core/p-6ed147a6.entry.js +0 -2
- package/dist/core/p-6ed147a6.entry.js.map +0 -1
- package/dist/core/p-7cf554e6.entry.js +0 -2
- package/dist/core/p-81b0848c.entry.js +0 -2
- package/dist/core/p-81b0848c.entry.js.map +0 -1
- package/dist/core/p-83039b10.entry.js +0 -2
- package/dist/core/p-904de5e6.entry.js +0 -2
- package/dist/core/p-904de5e6.entry.js.map +0 -1
- package/dist/core/p-91a9cd24.entry.js +0 -2
- package/dist/core/p-95d41a3b.js.map +0 -1
- package/dist/core/p-963f9fcd.entry.js +0 -2
- package/dist/core/p-9b41ac88.entry.js +0 -2
- package/dist/core/p-9d0f20ec.entry.js +0 -2
- package/dist/core/p-9d0f20ec.entry.js.map +0 -1
- package/dist/core/p-9dde00d8.entry.js +0 -2
- package/dist/core/p-9dde00d8.entry.js.map +0 -1
- package/dist/core/p-9ff8f059.entry.js +0 -2
- package/dist/core/p-a16229c6.entry.js +0 -2
- package/dist/core/p-a16229c6.entry.js.map +0 -1
- package/dist/core/p-a1e95a5f.js.map +0 -1
- package/dist/core/p-a1ebb4da.entry.js +0 -2
- package/dist/core/p-a1ebb4da.entry.js.map +0 -1
- package/dist/core/p-a21dc94f.js +0 -2
- package/dist/core/p-a53a277a.entry.js +0 -2
- package/dist/core/p-a5489b0e.entry.js +0 -2
- package/dist/core/p-a54f1db9.entry.js +0 -2
- package/dist/core/p-a693ffbf.js +0 -2
- package/dist/core/p-a693ffbf.js.map +0 -1
- package/dist/core/p-aa8adc45.entry.js +0 -2
- package/dist/core/p-ab9ae7ba.entry.js +0 -2
- package/dist/core/p-b3acb156.entry.js +0 -2
- package/dist/core/p-b48a4aa0.js +0 -2
- package/dist/core/p-b48a4aa0.js.map +0 -1
- package/dist/core/p-b55fc943.entry.js +0 -2
- package/dist/core/p-b838bb27.entry.js +0 -2
- package/dist/core/p-c214c202.entry.js +0 -2
- package/dist/core/p-c214c202.entry.js.map +0 -1
- package/dist/core/p-c4c7cb24.entry.js +0 -2
- package/dist/core/p-d2351924.entry.js +0 -2
- package/dist/core/p-db940455.entry.js +0 -2
- package/dist/core/p-dc3fab19.entry.js +0 -2
- package/dist/core/p-e0d428c9.js +0 -2
- package/dist/core/p-e0d428c9.js.map +0 -1
- package/dist/core/p-e134b123.entry.js +0 -2
- package/dist/core/p-e3aeaca0.js +0 -2
- package/dist/core/p-e3aeaca0.js.map +0 -1
- package/dist/core/p-e4978aab.entry.js +0 -2
- package/dist/core/p-edc05eff.entry.js +0 -2
- package/dist/core/p-edc05eff.entry.js.map +0 -1
- package/dist/core/p-eeb9cb73.entry.js +0 -2
- package/dist/core/p-f141ad5e.entry.js +0 -2
- package/dist/core/p-f1be099b.entry.js +0 -2
- package/dist/core/p-f456bd71.entry.js +0 -2
- package/dist/core/p-fa7caad6.entry.js +0 -2
- package/dist/core/p-fa7caad6.entry.js.map +0 -1
- package/dist/core/p-fc90bf06.entry.js +0 -2
- package/dist/core/p-fc90bf06.entry.js.map +0 -1
- package/dist/esm/colors-02c1ea96.js.map +0 -1
- package/dist/esm/form-472e078d.js.map +0 -1
- package/dist/esm/gov-app_2.entry.js +0 -9886
- package/dist/esm/gov-app_2.entry.js.map +0 -1
- package/dist/esm/gov-form-label.entry.js +0 -23
- package/dist/esm/gov-form-label.entry.js.map +0 -1
- package/dist/esm/gov-icon.entry.js +0 -157
- package/dist/esm/gov-icon.entry.js.map +0 -1
- package/dist/esm/gov.log-6e9faad2.js +0 -19
- package/dist/esm/gov.log-6e9faad2.js.map +0 -1
- package/dist/esm/index-d8b4eb6c.js.map +0 -1
- package/dist/esm/string.utils-5ce3f551.js.map +0 -1
- package/dist/esm/template-3d84d705.js.map +0 -1
- package/dist/esm/wcag-fa5ce56c.js.map +0 -1
- package/dist/esm/win-cec370ad.js.map +0 -1
- package/dist/types/components/gov-app/gov-app.d.ts +0 -37
- /package/dist/components/{p-19c681a3.js.map → p-0b3574c2.js.map} +0 -0
- /package/dist/components/{p-08621bdf.js.map → p-44a8a668.js.map} +0 -0
- /package/dist/components/{p-736e4917.js.map → p-73938936.js.map} +0 -0
- /package/dist/components/{p-565120d5.js.map → p-76d604c6.js.map} +0 -0
- /package/dist/components/{p-e183a7c7.js.map → p-7be2301a.js.map} +0 -0
- /package/dist/components/{p-edd1417b.js.map → p-7f3becc5.js.map} +0 -0
- /package/dist/components/{p-7f8a24a7.js.map → p-860520b0.js.map} +0 -0
- /package/dist/components/{p-59737af9.js.map → p-a521c59a.js.map} +0 -0
- /package/dist/components/{p-ae7e6127.js.map → p-a6b7a6c2.js.map} +0 -0
- /package/dist/components/{p-6e19816b.js.map → p-ac359044.js.map} +0 -0
- /package/dist/components/{p-0c93dd39.js.map → p-c61a5830.js.map} +0 -0
- /package/dist/core/{p-a54f1db9.entry.js.map → p-00d153bf.entry.js.map} +0 -0
- /package/dist/core/{p-169b67af.js.map → p-0b3574c2.js.map} +0 -0
- /package/dist/core/{p-3f2b803c.entry.js.map → p-0be19b89.entry.js.map} +0 -0
- /package/dist/core/{p-f141ad5e.entry.js.map → p-22fa411d.entry.js.map} +0 -0
- /package/dist/core/{p-b838bb27.entry.js.map → p-30eaeeec.entry.js.map} +0 -0
- /package/dist/core/{p-69d56f17.js.map → p-3bbb77a0.js.map} +0 -0
- /package/dist/core/{p-6b42a387.entry.js.map → p-535316b4.entry.js.map} +0 -0
- /package/dist/core/{p-91a9cd24.entry.js.map → p-5396935e.entry.js.map} +0 -0
- /package/dist/core/{p-42d9924c.js.map → p-56efd4a2.js.map} +0 -0
- /package/dist/core/{p-e134b123.entry.js.map → p-5b2131c1.entry.js.map} +0 -0
- /package/dist/core/{p-60658ae9.js.map → p-5f1000da.js.map} +0 -0
- /package/dist/core/{p-c4c7cb24.entry.js.map → p-7b7e502b.entry.js.map} +0 -0
- /package/dist/core/{p-2614044c.js.map → p-7ba4daf4.js.map} +0 -0
- /package/dist/core/{p-6aa40794.js.map → p-7f3becc5.js.map} +0 -0
- /package/dist/core/{p-e9a6cd71.js.map → p-860520b0.js.map} +0 -0
- /package/dist/core/{p-4bce896c.js.map → p-a521c59a.js.map} +0 -0
- /package/dist/core/{p-c990d746.js.map → p-c61a5830.js.map} +0 -0
- /package/dist/core/{p-45a30859.js.map → p-e0e2e9c1.js.map} +0 -0
- /package/dist/core/{p-052cc573.js.map → p-e44a0fee.js.map} +0 -0
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-
|
|
2
|
-
import { g as govForm, j as FormSelectClass, k as FormSelectSizes } from './form-
|
|
3
|
-
import { g as govHost, c as toBoolAttr, t as toBoolAttrIfDefined } from './template-
|
|
4
|
-
import { v as validateProp } from './props-
|
|
5
|
-
import { c as createID } from './string.utils-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
+
import { g as govForm, j as FormSelectClass, k as FormSelectSizes } from './form-713f26fd.js';
|
|
3
|
+
import { g as govHost, c as toBoolAttr, t as toBoolAttrIfDefined } from './template-7ecee4d1.js';
|
|
4
|
+
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
5
|
+
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
6
6
|
import { p as propsValueToArray } from './array.utils-85696abd.js';
|
|
7
7
|
import { t as tick } from './stencil.utils-f3c6c68d.js';
|
|
8
8
|
import { A as AttributeObserver, a as ariaAttributes } from './attribute-5561aca4.js';
|
|
9
9
|
import { i as inheritAriaAttributes } from './accessibility-f83c991a.js';
|
|
10
10
|
import './sizes-5b9e579f.js';
|
|
11
|
-
import './utils-
|
|
12
|
-
import './constants-
|
|
13
|
-
import './colors-
|
|
14
|
-
import './constants-
|
|
15
|
-
import './constants-
|
|
16
|
-
import './gov.log-
|
|
17
|
-
import './win-cec370ad.js';
|
|
11
|
+
import './utils-e10e994d.js';
|
|
12
|
+
import './constants-bc210662.js';
|
|
13
|
+
import './colors-4cf64720.js';
|
|
14
|
+
import './constants-085f9943.js';
|
|
15
|
+
import './constants-43f10674.js';
|
|
16
|
+
import './gov.log-6b64cda6.js';
|
|
18
17
|
import './helpers.types-43ddbdb8.js';
|
|
19
18
|
|
|
20
19
|
const GovFormSelect = class {
|
|
@@ -93,10 +92,10 @@ const GovFormSelect = class {
|
|
|
93
92
|
});
|
|
94
93
|
}
|
|
95
94
|
render() {
|
|
96
|
-
return (h(Host, { key: '
|
|
95
|
+
return (h(Host, { key: 'b403868aaf854a9dc40f68cf093a8867cd20c4c4', class: FormSelectClass.root, size: this.size }, this.h.hasSlot('prefix') && h("slot", { key: 'de3d0cb80bd3b33a9b23b60f91739f0e23fdab4a', name: "prefix" }), h("span", { key: 'c501806b949bc6e1314922fce0ce088180fdebba', class: "element" }, h("select", Object.assign({ key: '7c1a04a65e69edda672d70b101b430d3c6105543', id: this.identifier || this.selectId, onFocus: this.onFocusHandler.bind(this), onChange: this.onChangeHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el) }, this.inheritedAttributes, { "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid) }), h("slot", { key: '0bd46e42f5e5267366088b9902a5ef8c6aa99064' }), Array.isArray(this.optionsState) && this.optionsState.map((option) => {
|
|
97
96
|
var _a;
|
|
98
97
|
return (h("option", { value: option.value, selected: option.value === this.value, disabled: option === null || option === void 0 ? void 0 : option.disabled }, (_a = option.label) !== null && _a !== void 0 ? _a : option.value));
|
|
99
|
-
}))), this.h.hasSlot('sufix') && h("slot", { key: '
|
|
98
|
+
})), this.success && h("gov-icon", { key: '8e919bd8dd122618b2b0233c7b14c8def277540f', class: "validation-icon", name: "check-lg", type: "components" }), this.invalid && h("gov-icon", { key: '78610616be9cdf65e9bbc1359e27bc9003c8fc34', class: "validation-icon", name: "exclamation-lg", type: "components" }), h("gov-icon", { key: '56c1ca03e5b23154a93056bba8758553a5c93f30', class: "arrow-icon", name: "chevron-down", type: "components" })), this.h.hasSlot('sufix') && h("slot", { key: 'f3e3f1416d15a34402d446e6a72d0607cc8d90fc', name: "sufix" })));
|
|
100
99
|
}
|
|
101
100
|
onFocusHandler(e) {
|
|
102
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,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YACnB,SAAS,EAAE,eAAe,CAAC,IAAI;YAC/B,aAAa,EAAE,CAAC;YAChB,KAAK,EAAE,IAAI,CAAC,KAAK;SACjB,CAAC,CAAA;KACF;;;;IAMD,MAAM,QAAQ,CAAC,OAAsB;QACpC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;KACpC;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,SAAS,CAAA;KACrB;;;;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {govForm} from '../../../helpers/Dom/form'\nimport {GovForm} from '../../../helpers/Dom/form.types'\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from '../../../helpers/Dom/template'\nimport {GovHost} from '../../../helpers/Dom/template.types'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {createID} from '../../../utils/string.utils'\nimport {FormSelectClass, FormSelectSizes, FormSelectSizesType,} from './constants'\nimport {FormSelectEvent, FormSelectOption} from './gov-form-select.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {tick} from \"../../../utils/stencil.utils\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-form-select',\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID('GovSelect')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Options of select\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | FormSelectOption[]\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\t@State() optionsState: FormSelectOption[] = []\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | FormSelectOption[]): void {\n\t\tthis.optionsState = propsValueToArray(newValue)\n\t}\n\n\t@Watch('disabled')\n\t@Watch('invalid')\n\t@Watch('success')\n\t@Watch('size')\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch('value')\n\twatchValue(): void {\n\t\tthis.markSelectedValue()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl('size', this.size)\n\t\tthis.f.passAttrToControl('invalid', toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('success', toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl('disabled', toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl('type', 'select')\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\n\t\tthis.markSelectedValue()\n\n\t\tthis.optionsState = propsValueToArray(this.options)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t\ttick(() => this.markSelectedValue())\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate markSelectedValue() {\n\t\tthis.host.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.value === this.value) {\n\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t} else {\n\t\t\t\toption.removeAttribute('selected')\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size}>\n\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<gov-icon slot=\"right-icon\" name=\"chevron-down\" class=\"icon-arrow\"></gov-icon>\n\t\t\t\t\t{this.h.hasSlot('right-icon') && !(this.success || this.invalid) && <slot name=\"right-icon\"/>}\n\t\t\t\t\t{this.success && <gov-icon slot=\"validation-icon\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && <gov-icon slot=\"validation-icon\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t{Array.isArray(this.optionsState) && this.optionsState.map((option) => {\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={option.value === this.value}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={option?.disabled}>{option.label ?? option.value}</option>)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</select>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectElement> {\n\t\treturn this.selectRef\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"gov-form-select.entry.js","mappings":";;;;;;;;;;;;;;;;;;MAkBa,aAAa;IAQzB;;;;;;;;oBAsB8C,GAAG;;wBASZ,KAAK;;wBASU,KAAK;;;4BAkBb,EAAE;mCAyBH,EAAE;QAlF5C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAA;KACrC;IAyDD,YAAY,CAAC,QAAgB;QAC5B,YAAY,CAAC,eAAe,EAAE,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;KAC7D;IAGD,YAAY,CAAC,QAAqC;QACjD,IAAI,CAAC,YAAY,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAA;KAC/C;IAMD,iBAAiB;QAChB,IAAI,CAAC,gBAAgB,EAAE,CAAA;KACvB;IAGD,UAAU;QACT,IAAI,CAAC,iBAAiB,EAAE,CAAA;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AAK,EAAE,IAAI,CAAC,KAAK;SACjB,CAAC,CAAA;KACF;IAEO,aAAa,CAAC,CAAa;QAClC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;QACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;YACjB,SAAS,EAAE,eAAe,CAAC,IAAI;YAC/B,aAAa,EAAE,CAAC;YAChB,KAAK,EAAE,IAAI,CAAC,KAAK;SACjB,CAAC,CAAA;KACF;IAEO,eAAe,CAAC,CAAQ;QAC/B,IAAI,CAAC,KAAK,GAAI,CAAC,CAAC,MAA4B,CAAC,KAAK,CAAA;QAClD,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YACnB,SAAS,EAAE,eAAe,CAAC,IAAI;YAC/B,aAAa,EAAE,CAAC;YAChB,KAAK,EAAE,IAAI,CAAC,KAAK;SACjB,CAAC,CAAA;KACF;;;;IAMD,MAAM,QAAQ,CAAC,OAAsB;QACpC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;KACpC;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,SAAS,CAAA;KACrB;;;;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {govForm} from '../../../helpers/Dom/form'\nimport {GovForm} from '../../../helpers/Dom/form.types'\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from '../../../helpers/Dom/template'\nimport {GovHost} from '../../../helpers/Dom/template.types'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {createID} from '../../../utils/string.utils'\nimport {FormSelectClass, FormSelectSizes, FormSelectSizesType,} from './constants'\nimport {FormSelectEvent, FormSelectOption} from './gov-form-select.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {tick} from \"../../../utils/stencil.utils\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-form-select',\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID('GovSelect')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Options of select\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | FormSelectOption[]\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop({reflect: true}) readonly success: boolean\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\t@State() optionsState: FormSelectOption[] = []\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | FormSelectOption[]): void {\n\t\tthis.optionsState = propsValueToArray(newValue)\n\t}\n\n\t@Watch('disabled')\n\t@Watch('invalid')\n\t@Watch('success')\n\t@Watch('size')\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch('value')\n\twatchValue(): void {\n\t\tthis.markSelectedValue()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl('size', this.size)\n\t\tthis.f.passAttrToControl('invalid', toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('success', toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl('disabled', toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl('type', 'select')\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\n\t\tthis.markSelectedValue()\n\n\t\tthis.optionsState = propsValueToArray(this.options)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t\ttick(() => this.markSelectedValue())\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate markSelectedValue() {\n\t\tthis.host.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.value === this.value) {\n\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t} else {\n\t\t\t\toption.removeAttribute('selected')\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size}>\n\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t{Array.isArray(this.optionsState) && this.optionsState.map((option) => {\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={option.value === this.value}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={option?.disabled}>{option.label ?? option.value}</option>)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</select>\n\t\t\t\t\t{this.success && <gov-icon class=\"validation-icon\" name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t{this.invalid && <gov-icon class=\"validation-icon\" name=\"exclamation-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t<gov-icon class=\"arrow-icon\" name=\"chevron-down\" type=\"components\"></gov-icon>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectElement> {\n\t\treturn this.selectRef\n\t}\n}\n"],"version":3}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-
|
|
2
|
-
import { c as createID } from './string.utils-
|
|
3
|
-
import { v as validateProp } from './props-
|
|
4
|
-
import { g as govForm, h as FormSwitchClass, i as FormSwitchSizes } from './form-
|
|
5
|
-
import { g as govHost, c as toBoolAttr, t as toBoolAttrIfDefined } from './template-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
+
import { c as createID } from './string.utils-1da8f8fb.js';
|
|
3
|
+
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
4
|
+
import { g as govForm, h as FormSwitchClass, i as FormSwitchSizes } from './form-713f26fd.js';
|
|
5
|
+
import { g as govHost, c as toBoolAttr, t as toBoolAttrIfDefined } from './template-7ecee4d1.js';
|
|
6
6
|
import { F as Fragment } from './Fragment-8d8d54fb.js';
|
|
7
7
|
import { A as AttributeObserver, a as ariaAttributes } from './attribute-5561aca4.js';
|
|
8
8
|
import { i as inheritAriaAttributes } from './accessibility-f83c991a.js';
|
|
9
|
-
import './gov.log-
|
|
10
|
-
import './
|
|
11
|
-
import './utils-2b4ef320.js';
|
|
9
|
+
import './gov.log-6b64cda6.js';
|
|
10
|
+
import './utils-e10e994d.js';
|
|
12
11
|
import './sizes-5b9e579f.js';
|
|
13
|
-
import './constants-
|
|
14
|
-
import './colors-
|
|
15
|
-
import './constants-
|
|
16
|
-
import './constants-
|
|
12
|
+
import './constants-bc210662.js';
|
|
13
|
+
import './colors-4cf64720.js';
|
|
14
|
+
import './constants-085f9943.js';
|
|
15
|
+
import './constants-43f10674.js';
|
|
17
16
|
|
|
18
17
|
const GovFormSwitch = class {
|
|
19
18
|
constructor(hostRef) {
|
|
@@ -80,7 +79,7 @@ const GovFormSwitch = class {
|
|
|
80
79
|
}
|
|
81
80
|
return children;
|
|
82
81
|
};
|
|
83
|
-
return (h(Host, { class: this.h.classes(FormSwitchClass.root), hydrated: this.hydrated, checked: this.checked, size: this.size, invalid: toBoolAttrIfDefined(this.invalid) }, wrapCheckbox(h(Fragment, null, h("input", Object.assign({ class: FormSwitchClass.input, id: this.identifier || this.checkboxId, type: "checkbox", value: this.value, name: this.name, disabled: this.disabled, checked: this.checked, onClick: this.onClickHandler.bind(this), onChange: this.onChangeHandler.bind(this), onFocus: this.onFocusHandler.bind(this), onBlur: this.onBlurHandler.bind(this), ref: el => (this.inputRef = el), required: this.required }, this.inheritedAttributes, { "aria-checked": this.checked, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-disabled": toBoolAttrIfDefined(this.disabled) })), h("span", null, h("span", { class: FormSwitchClass.indicator }, this.checked && h("gov-icon", {
|
|
82
|
+
return (h(Host, { class: this.h.classes(FormSwitchClass.root), hydrated: this.hydrated, checked: this.checked, size: this.size, invalid: toBoolAttrIfDefined(this.invalid) }, wrapCheckbox(h(Fragment, null, h("input", Object.assign({ class: FormSwitchClass.input, id: this.identifier || this.checkboxId, type: "checkbox", value: this.value, name: this.name, disabled: this.disabled, checked: this.checked, onClick: this.onClickHandler.bind(this), onChange: this.onChangeHandler.bind(this), onFocus: this.onFocusHandler.bind(this), onBlur: this.onBlurHandler.bind(this), ref: el => (this.inputRef = el), required: this.required }, this.inheritedAttributes, { "aria-checked": this.checked, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-disabled": toBoolAttrIfDefined(this.disabled) })), h("span", null, h("span", { class: FormSwitchClass.indicator }, this.checked && h("gov-icon", { name: "check-lg", type: "components" })), h("slot", { name: "label" }))))));
|
|
84
83
|
}
|
|
85
84
|
onClickHandler(e) {
|
|
86
85
|
e.stopPropagation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-form-switch.entry.js","mappings":";;;;;;;;;;;;;;;;;MAiBa,aAAa;IASzB;;;;;QAFQ,aAAQ,GAAG,KAAK,CAAA;;uBAiBmC,KAAK;uBAIhB,KAAK;wBAIhB,KAAK;wBAIL,KAAK;;oBAQI,GAAG;;;mCAkCN,EAAE;QApE5C,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAA;QAEzC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KACxB;IAqDD,YAAY,CAAC,QAAgB;QAC5B,YAAY,CAAC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CAAC,OAAO,GAAI,CAAC,CAAC,MAA2B,CAAC,OAAO,CAAA;QACrD,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YACnB,SAAS,EAAE,eAAe,CAAC,IAAI;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,CAAA;KACpB;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-form/switch/gov-form-switch.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormSwitchClass, FormSwitchSizes, FormSwitchSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport {FormSwitchEvent} from \"./gov-form-switch.types\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-form-switch\",\n})\nexport class GovFormSwitch {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly checkboxId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.checkboxId = createID(\"GovCheckbox\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormSwitchElement\n\t/**\n\t * Value of switch\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Switch button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the switch component disabled.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Name of the switch.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Switch's size.\n\t */\n\t@Prop() readonly size?: FormSwitchSizesType = \"m\"\n\t/**\n\t * Custom switch identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the switch has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormSwitchEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSwitchSizes, newValue, FormSwitchClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"switch\")\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.passControlAttrs()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.checkboxId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\tconst wrapCheckbox = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn (\n\t\t\t\t\t<label class={FormSwitchClass.label}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</label>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FormSwitchClass.root)} hydrated={this.hydrated} checked={this.checked}\n\t\t\t\t size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapCheckbox(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={FormSwitchClass.input}\n\t\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<span class={FormSwitchClass.indicator}>\n\t\t\t\t\t\t\t\t{this.checked && <gov-icon type=\"basic\" name=\"check-lg\"/>}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: Event) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"gov-form-switch.entry.js","mappings":";;;;;;;;;;;;;;;;MAiBa,aAAa;IASzB;;;;;QAFQ,aAAQ,GAAG,KAAK,CAAA;;uBAiBmC,KAAK;uBAIhB,KAAK;wBAIhB,KAAK;wBAIU,KAAK;;oBAQI,GAAG;;;mCAkCrB,EAAE;QApE5C,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAA;QAEzC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KACxB;IAqDD,YAAY,CAAC,QAAgB;QAC5B,YAAY,CAAC,eAAe,EAAE,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;KAC7D;IAKD,aAAa;QACZ,IAAI,CAAC,gBAAgB,EAAE,CAAA;KACvB;IAIO,gBAAgB;QACvB,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3C,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAA;QAC7D,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAA;QAC/D,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;KAC1C;IAED,gBAAgB;Q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,CAClE,EACP,YAAM,IAAI,EAAC,OAAO,GAAQ,CACpB,CACG,CACX,CACK,EACP;KACD;IAEO,cAAc,CAAC,CAAQ;QAC9B,CAAC,CAAC,eAAe,EAAE,CAAA;KACnB;IAEO,cAAc,CAAC,CAAa;QACnC,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;YAClB,SAAS,EAAE,eAAe,CAAC,IAAI;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;IAEO,aAAa,CAAC,CAAa;QAClC,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;YACjB,SAAS,EAAE,eAAe,CAAC,IAAI;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;IAEO,eAAe,CAAC,CAAQ;QAC/B,IAAI,CAAC,OAAO,GAAI,CAAC,CAAC,MAA2B,CAAC,OAAO,CAAA;QACrD,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YACnB,SAAS,EAAE,eAAe,CAAC,IAAI;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,CAAA;KACpB;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-form/switch/gov-form-switch.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormSwitchClass, FormSwitchSizes, FormSwitchSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport {FormSwitchEvent} from \"./gov-form-switch.types\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-form-switch\",\n})\nexport class GovFormSwitch {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly checkboxId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.checkboxId = createID(\"GovCheckbox\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormSwitchElement\n\t/**\n\t * Value of switch\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Switch button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the switch component disabled.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Name of the switch.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Switch's size.\n\t */\n\t@Prop({reflect: true}) readonly size?: FormSwitchSizesType = \"m\"\n\t/**\n\t * Custom switch identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the switch has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormSwitchEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSwitchSizes, newValue, FormSwitchClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"switch\")\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.passControlAttrs()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.checkboxId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\tconst wrapCheckbox = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn (\n\t\t\t\t\t<label class={FormSwitchClass.label}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</label>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FormSwitchClass.root)} hydrated={this.hydrated} checked={this.checked}\n\t\t\t\t size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapCheckbox(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={FormSwitchClass.input}\n\t\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<span class={FormSwitchClass.indicator}>\n\t\t\t\t\t\t\t\t{this.checked && <gov-icon name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: Event) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
2
|
import { a as GridItemClass } from './constants-2d5a0e18.js';
|
|
3
|
-
import { g as govHost } from './template-
|
|
3
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
4
|
|
|
5
5
|
const GovGridItem = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -13,7 +13,7 @@ const GovGridItem = class {
|
|
|
13
13
|
this.h = govHost(this.host);
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: 'd830b7cb16e1ad4a07b5b5348c05434eb31a1f9e', class: this.h.classes(GridItemClass.root), role: "listitem", size: this.size, "size-sm": this.sizeSm, "size-md": this.sizeMd, "size-lg": this.sizeLg, "size-xl": this.sizeXl }, h("slot", { key: '235bd47e47d94457cdbbf1d4530cf2e0bcddc4a3' })));
|
|
17
17
|
}
|
|
18
18
|
get host() { return getElement(this); }
|
|
19
19
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
2
|
import { G as GridClass } from './constants-2d5a0e18.js';
|
|
3
|
-
import { g as govHost } from './template-
|
|
3
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
4
|
|
|
5
5
|
const GovGrid = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -11,7 +11,7 @@ const GovGrid = class {
|
|
|
11
11
|
}
|
|
12
12
|
// vertical / horizontal align
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: '81e96a065c6472ae76e4768cf2b8373b94f0d0a4', class: this.h.classes(GridClass.root), "align-x": this.alignX, "align-y": this.alignY, role: "list" }, h("slot", { key: 'c3965bafe6a5870352a7cded3fc96adfbeb41724' })));
|
|
15
15
|
}
|
|
16
16
|
get host() { return getElement(this); }
|
|
17
17
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-
|
|
2
|
-
import { g as govHost, c as toBoolAttr } from './template-
|
|
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-7ecee4d1.js';
|
|
3
3
|
import { F as Fragment } from './Fragment-8d8d54fb.js';
|
|
4
|
-
import { v as validateProp } from './props-
|
|
5
|
-
import { C as Colors } from './colors-
|
|
6
|
-
import {
|
|
4
|
+
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
5
|
+
import { C as Colors } from './colors-4cf64720.js';
|
|
6
|
+
import { p as pick } from './utils-e10e994d.js';
|
|
7
7
|
import { A as AttributeObserver, a as ariaAttributes } from './attribute-5561aca4.js';
|
|
8
8
|
import { i as inheritAriaAttributes } from './accessibility-f83c991a.js';
|
|
9
|
-
import './gov.log-
|
|
10
|
-
import './win-cec370ad.js';
|
|
9
|
+
import './gov.log-6b64cda6.js';
|
|
11
10
|
|
|
12
11
|
const InfobarColors = pick(Colors, ['PRIMARY', 'SECONDARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING']);
|
|
13
12
|
var InfobarType;
|
|
@@ -58,8 +57,8 @@ const GovInfobar = class {
|
|
|
58
57
|
this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { [attributeName]: newValue });
|
|
59
58
|
}
|
|
60
59
|
render() {
|
|
61
|
-
const closeButton = (h("gov-button", { key: '
|
|
62
|
-
return (h(Host, { key: '
|
|
60
|
+
const closeButton = (h("gov-button", { key: '4569d98296984f33ff83947f92a95a0a3bf0d3e3', size: "s", "aria-label": this.accessibleCloseLabel, type: "base", color: this.isBold ? this.color : "neutral", "on-gov-click": this.onCloseHandler.bind(this), class: InfobarClass.close }, h("gov-icon", { key: 'aafcdbde7ca0e13d9e733036da6cc6085143966d', name: "x-lg", type: "components" })));
|
|
61
|
+
return (h(Host, { key: '9b558a0c786862d032ed6fb5d274fc0c3cdae617', class: this.h.classes(InfobarClass.root), color: this.color, type: this.type }, h("section", Object.assign({ key: '9bded4750afdfef6ace0e5a39be2d6283b30d725', class: InfobarClass.section }, this.inheritedAttributes, { role: this.role }), h("slot", { key: '011f9d52f9f971a560fd0220be40b5a221a5f4b3', name: "icon" }), h("div", { key: 'd613d4ab22f89da935fe60b866ea262802c5d18f', class: InfobarClass.content }, this.h.hasSlot('headline') ? (h(Fragment, null, h("div", { class: InfobarClass.headline }, h("slot", { name: "headline" }), h("gov-button", { size: "s", type: "base", color: this.isBold ? this.color : "neutral", "aria-label": this.accessibleToggleLabel, "on-gov-click": () => (this.toggleContent = !this.toggleContent) }, h("gov-icon", { name: this.toggleContent ? 'chevron-up' : 'chevron-down', type: "components" }))), h("div", { hidden: !this.toggleContent, "aria-hidden": toBoolAttr(this.toggleContent) }, h("slot", null)))) : (h("slot", null))), this.closable && closeButton)));
|
|
63
62
|
}
|
|
64
63
|
onCloseHandler(e) {
|
|
65
64
|
this.govClose.emit({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-infobar.entry.js","mappings":"
|
|
1
|
+
{"file":"gov-infobar.entry.js","mappings":";;;;;;;;;;AAIO,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAA;AAG7G,IAAY,WAGX;AAHD,WAAY,WAAW;IACtB,4BAAa,CAAA;IACb,gCAAiB,CAAA;AAClB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB;AAGM,MAAM,YAAY,GAAG;IAC3B,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,sBAAsB;IAC/B,OAAO,EAAE,sBAAsB;IAC/B,QAAQ,EAAE,uBAAuB;IACjC,KAAK,EAAE,oBAAoB;CAC3B;;MCJY,UAAU;IAItB;;;qBASoC,SAAS;oBAIF,MAAM;oBAIJ,SAAS;oCAI+B,yBAAyB;qCAIvB,yBAAyB;wBAQ1E,KAAK;6BAElB,KAAK;mCACa,EAAE;QAnC5C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAA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3B;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-infobar/constants.ts","../../../packages/core/src/components/gov-infobar/gov-infobar.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const InfobarColors = pick(Colors, ['PRIMARY', 'SECONDARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING'])\nexport type ColorType = `${ValueOf<typeof InfobarColors>}`\n\nexport enum InfobarType {\n\tBOLD = 'bold',\n\tSUBTLE = 'subtle',\n}\nexport type InfobarTypesType = `${ValueOf<typeof InfobarType>}`\n\nexport const InfobarClass = {\n\troot: 'gov-infobar',\n\tsection: 'gov-infobar__section',\n\tcontent: 'gov-infobar__content',\n\theadline: 'gov-infobar__headline',\n\tclose: 'gov-infobar__close',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch} from '@stencil/core'\nimport {govHost, toBoolAttr} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport Fragment from '../../helpers/Fragment'\nimport {validateProp} from '../../helpers/Validate/props'\nimport {ButtonEvent} from '../gov-button/button/gov-button.types'\nimport {ColorType, InfobarClass, InfobarColors, InfobarTypesType} from './constants'\nimport {InfobarEvent} from './gov-infobar.types'\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-infobar',\n})\nexport class GovInfobar {\n\tprivate h: GovHost\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovInfobarElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly color: ColorType = 'primary'\n\t/**\n\t * Infobar appearance\n\t */\n\t@Prop() readonly type?: InfobarTypesType = \"bold\"\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly role: HTMLElement['role'] = undefined\n\t/**\n\t * Aria label for the closing button. It is mandatory if the infobar is closable\n\t */\n\t@Prop({attribute: 'accessible-close-label'}) readonly accessibleCloseLabel: string = 'Zavřít informační lištu'\n\t/**\n\t * Aria label for the toggle button. It is mandatory if the infobar has headline\n\t */\n\t@Prop({attribute: 'accessible-toggle-label'}) readonly accessibleToggleLabel: string = 'Zobrazit více informací'\n\t/**\n\t * Called when the close button is clicked\n\t */\n\t@Event({eventName: 'gov-close'}) govClose: EventEmitter<InfobarEvent>\n\t/**\n\t * Displays the option to close the infobar\n\t */\n\t@Prop() readonly closable?: boolean = false\n\n\t@State() toggleContent = false\n\t@State() inheritedAttributes: Attributes = {}\n\n\t@Watch('color')\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(InfobarColors, newValue, InfobarClass.root)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\tconst closeButton = (\n\t\t\t<gov-button size=\"s\"\n\t\t\t\t\t\taria-label={this.accessibleCloseLabel}\n\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\tcolor={this.isBold ? this.color : \"neutral\"}\n\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\tclass={InfobarClass.close}>\n\t\t\t\t<gov-icon name=\"x-lg\" type=\"components\"></gov-icon>\n\t\t\t</gov-button>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(InfobarClass.root)} color={this.color} type={this.type}>\n\t\t\t\t<section class={InfobarClass.section} {...this.inheritedAttributes} role={this.role}>\n\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t<div class={InfobarClass.content}>\n\t\t\t\t\t\t{this.h.hasSlot('headline') ? (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<div class={InfobarClass.headline}>\n\t\t\t\t\t\t\t\t\t<slot name={\"headline\"}/>\n\t\t\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\t\t\tcolor={this.isBold ? this.color : \"neutral\"}\n\t\t\t\t\t\t\t\t\t\taria-label={this.accessibleToggleLabel}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => (this.toggleContent = !this.toggleContent)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<gov-icon name={this.toggleContent ? 'chevron-up' : 'chevron-down'} type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div hidden={!this.toggleContent} aria-hidden={toBoolAttr(this.toggleContent)}>\n\t\t\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t{this.closable && closeButton}\n\t\t\t\t</section>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tonCloseHandler(e: CustomEvent<ButtonEvent>) {\n\t\tthis.govClose.emit({\n\t\t\tcomponent: InfobarClass.root,\n\t\t\tref: this.host,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tget isBold(): boolean {\n\t\treturn this.type === \"bold\"\n\t}\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
2
|
import { a as LayoutColumnClass } from './constants-f0f531b6.js';
|
|
3
|
-
import { g as govHost } from './template-
|
|
3
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
4
|
|
|
5
5
|
const GovLayoutColumn = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -8,7 +8,7 @@ const GovLayoutColumn = class {
|
|
|
8
8
|
this.h = govHost(this.host);
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: '8566cc892984b1ce728c679107e228d8320f3048', class: this.h.classes(LayoutColumnClass.root) }, h("slot", { key: 'e3a085ef568fa75ef813b775344adbd6f4ef2773' })));
|
|
12
12
|
}
|
|
13
13
|
get host() { return getElement(this); }
|
|
14
14
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
2
|
import { L as LayoutClass } from './constants-f0f531b6.js';
|
|
3
|
-
import { g as govHost } from './template-
|
|
3
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
4
4
|
|
|
5
5
|
const GovLayout = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -17,7 +17,7 @@ const GovLayout = class {
|
|
|
17
17
|
return originalClass + ' ' + originalClass + isType + isVariant + isInverse;
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: 'ba8fc53df2f13fcf8b87f25f073d0284b68b0a3a', type: this.type, class: this.h.classes(LayoutClass.root) }, h("section", { key: 'f645a9b32495c4fc1c0c86a0078c78c4bc00a1e8', class: this.typeClass(LayoutClass.section, this.type, this.variant, this.inverse) }, h("slot", { key: '5b0d1a3a137a8fe3bb90ae5dff2dbc179575af56' }))));
|
|
21
21
|
}
|
|
22
22
|
get host() { return getElement(this); }
|
|
23
23
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { r as registerInstance, h, a as Host } from './index-c263e031.js';
|
|
2
|
+
import { a as chr4 } from './string.utils-1da8f8fb.js';
|
|
3
|
+
|
|
4
|
+
const GovLifecycle = class {
|
|
5
|
+
constructor(hostRef) {
|
|
6
|
+
registerInstance(this, hostRef);
|
|
7
|
+
this.uniqueId = 'lifecycle-' + chr4();
|
|
8
|
+
}
|
|
9
|
+
connectedCallback() {
|
|
10
|
+
console.log('connectedCallback', this.uniqueId);
|
|
11
|
+
}
|
|
12
|
+
disconnectedCallback() {
|
|
13
|
+
console.log('disconnectedCallback', this.uniqueId);
|
|
14
|
+
}
|
|
15
|
+
componentWillLoad() {
|
|
16
|
+
console.log('componentWillLoad', this.uniqueId);
|
|
17
|
+
}
|
|
18
|
+
componentDidLoad() {
|
|
19
|
+
console.log('componentDidLoad', this.uniqueId);
|
|
20
|
+
}
|
|
21
|
+
componentShouldUpdate() {
|
|
22
|
+
console.log('componentShouldUpdate', this.uniqueId);
|
|
23
|
+
}
|
|
24
|
+
componentWillRender() {
|
|
25
|
+
console.log('componentWillRender', this.uniqueId);
|
|
26
|
+
}
|
|
27
|
+
componentDidRender() {
|
|
28
|
+
console.log('componentDidRender', this.uniqueId);
|
|
29
|
+
}
|
|
30
|
+
componentWillUpdate() {
|
|
31
|
+
console.log('componentWillUpdate', this.uniqueId);
|
|
32
|
+
}
|
|
33
|
+
componentDidUpdate() {
|
|
34
|
+
console.log('componentDidUpdate', this.uniqueId);
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
return (h(Host, { key: '7bd4b9b30b6fe4e1732232fa4e70d66756c2139d', identifier: this.uniqueId }, h("span", { key: '70d6b8d178133ee89b795c4018687c7afb2576f0' }, "lifecycle ", this.uniqueId)));
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { GovLifecycle as gov_lifecycle };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=gov-lifecycle.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"gov-lifecycle.entry.js","mappings":";;;MAMa,YAAY;IAGxB;;QACC,IAAI,CAAC,QAAQ,GAAG,YAAY,GAAG,IAAI,EAAE,CAAC;KACtC;IAED,iBAAiB;QAChB,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KAChD;IAED,oBAAoB;QACnB,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KACnD;IAED,iBAAiB;QAChB,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KAChD;IAED,gBAAgB;QACf,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KAC/C;IAED,qBAAqB;QACpB,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KACpD;IAED,mBAAmB;QAClB,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KAClD;IAED,kBAAkB;QACjB,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KACjD;IAED,mBAAmB;QAClB,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KAClD;IAED,kBAAkB;QACjB,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KACjD;IAED,MAAM;QACL,QACC,EAAC,IAAI,qDAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,IAC9B,6EAAiB,IAAI,CAAC,QAAQ,CAAQ,CAChC,EACN;KACF;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-lifecycle-tester/gov-lifecycle-tester.tsx"],"sourcesContent":["import {Component, h, Host} from '@stencil/core';\nimport {chr4} from \"../../utils/string.utils\";\n\n@Component({\n\ttag: 'gov-lifecycle',\n})\nexport class GovLifecycle {\n\tprivate readonly uniqueId: string;\n\n\tconstructor() {\n\t\tthis.uniqueId = 'lifecycle-' + chr4();\n\t}\n\n\tconnectedCallback() {\n\t\tconsole.log('connectedCallback', this.uniqueId);\n\t}\n\n\tdisconnectedCallback() {\n\t\tconsole.log('disconnectedCallback', this.uniqueId);\n\t}\n\n\tcomponentWillLoad() {\n\t\tconsole.log('componentWillLoad', this.uniqueId);\n\t}\n\n\tcomponentDidLoad() {\n\t\tconsole.log('componentDidLoad', this.uniqueId);\n\t}\n\n\tcomponentShouldUpdate() {\n\t\tconsole.log('componentShouldUpdate', this.uniqueId);\n\t}\n\n\tcomponentWillRender() {\n\t\tconsole.log('componentWillRender', this.uniqueId);\n\t}\n\n\tcomponentDidRender() {\n\t\tconsole.log('componentDidRender', this.uniqueId);\n\t}\n\n\tcomponentWillUpdate() {\n\t\tconsole.log('componentWillUpdate', this.uniqueId);\n\t}\n\n\tcomponentDidUpdate() {\n\t\tconsole.log('componentDidUpdate', this.uniqueId);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host identifier={this.uniqueId}>\n\t\t\t\t<span>lifecycle {this.uniqueId}</span>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
+
import { p as pick } from './utils-e10e994d.js';
|
|
3
|
+
import { S as Sizes } from './sizes-5b9e579f.js';
|
|
4
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
5
|
+
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
6
|
+
import { i as inheritAriaAttributes } from './accessibility-f83c991a.js';
|
|
7
|
+
import './gov.log-6b64cda6.js';
|
|
8
|
+
import './attribute-5561aca4.js';
|
|
9
|
+
|
|
10
|
+
const LinkSizes = pick(Sizes, ['_S', '_M', '_L']);
|
|
11
|
+
const LinkClass = {
|
|
12
|
+
root: 'gov-link',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const GovLink = class {
|
|
16
|
+
constructor(hostRef) {
|
|
17
|
+
registerInstance(this, hostRef);
|
|
18
|
+
this.size = 'm';
|
|
19
|
+
this.external = false;
|
|
20
|
+
this.href = undefined;
|
|
21
|
+
this.target = undefined;
|
|
22
|
+
this.inheritedAttributes = {};
|
|
23
|
+
this.h = govHost(this.host);
|
|
24
|
+
}
|
|
25
|
+
validateSize(newValue) {
|
|
26
|
+
validateProp(LinkSizes, newValue, LinkClass.root);
|
|
27
|
+
}
|
|
28
|
+
componentWillLoad() {
|
|
29
|
+
this.validateSize(this.size);
|
|
30
|
+
this.inheritedAttributes = inheritAriaAttributes(this.host);
|
|
31
|
+
}
|
|
32
|
+
onAriaAttributeChange(attributeName, newValue) {
|
|
33
|
+
this.host.removeAttribute(attributeName);
|
|
34
|
+
this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { [attributeName]: newValue });
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
return (h(Host, { key: '8723fc6fc0cf3faf4a0fb48b38ad2f0d0a21704b', class: this.h.classes(LinkClass.root), size: this.size, href: this.href, external: this.external }, h("a", Object.assign({ key: '1bfe7837dab38690789ec818f6134a50a93d1e4e', class: "element", href: this.href, target: this.target }, this.inheritedAttributes), h("slot", { key: '96d6ce9e164a8fa5b6d5c115d52988bdfff3eceb', name: "icon-start" }), h("slot", { key: 'bcc373fec9e7e159c6b31a2ad846dd929d189d1e' }), this.external ? h("gov-icon", { name: "box-arrow-up-right", type: "components" }) : h("slot", { name: "icon-end" }))));
|
|
38
|
+
}
|
|
39
|
+
get host() { return getElement(this); }
|
|
40
|
+
static get watchers() { return {
|
|
41
|
+
"size": ["validateSize"]
|
|
42
|
+
}; }
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { GovLink as gov_link };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=gov-link.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"gov-link.entry.js","mappings":";;;;;;;;;AAIO,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAGjD,MAAM,SAAS,GAAG;IACxB,IAAI,EAAE,UAAU;CAChB;;MCEY,OAAO;IAGnB;;oBAQwC,GAAG;wBAIL,KAAK;;;mCAkBA,EAAE;QA7B5C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAwBD,YAAY,CAAC,QAAgB;QAC5B,YAAY,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;KACjD;IAID,iBAAiB;QAChB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC5B,IAAI,CAAC,mBAAmB,GAAG,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3D;IAED,qBAAqB,CAAC,aAAqB,EAAE,QAAgB;QAC5D,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,CAAA;QACxC,IAAI,CAAC,mBAAmB,mCAAO,IAAI,CAAC,mBAAmB,KAAE,CAAC,aAAa,GAAG,QAAQ,GAAC,CAAC;KACpF;IAED,MAAM;QACL,QACC,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,EACxC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,IAAI,CAAC,QAAQ,IACzB,wEAAG,KAAK,EAAC,SAAS,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM,IACf,IAAI,CAAC,mBAAmB,GAC9B,6DAAM,IAAI,EAAC,YAAY,GAAE,EACzB,8DAAO,EACN,IAAI,CAAC,QAAQ,GAAG,gBAAU,IAAI,EAAC,oBAAoB,EAAC,IAAI,EAAC,YAAY,GAAY,GAAG,YAAM,IAAI,EAAC,UAAU,GAAE,CACzG,CACE,EACP;KACD;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-link/constants.ts","../../../packages/core/src/components/gov-link/gov-link.tsx"],"sourcesContent":["import {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const LinkSizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type LinkSizesType = `${ValueOf<typeof LinkSizes>}`\n\nexport const LinkClass = {\n\troot: 'gov-link',\n}\n","import {Component, Element, Host, h, Prop, Watch, State} from '@stencil/core'\nimport {LinkClass, LinkSizes, LinkSizesType} from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {Attributes} from \"../../helpers/Dom/attribute\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-link',\n})\nexport class GovLink {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovLinkElement\n\t/**\n\t * Element size.\n\t */\n\t@Prop() readonly size?: LinkSizesType = 'm'\n\t/**\n\t * Element size.\n\t */\n\t@Prop() readonly external?: 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\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(LinkSizes, newValue, LinkClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host)\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\treturn (\n\t\t\t<Host class={this.h.classes(LinkClass.root)}\n\t\t\t\t size={this.size}\n\t\t\t\t href={this.href}\n\t\t\t\t external={this.external}>\n\t\t\t\t<a class=\"element\"\n\t\t\t\t href={this.href}\n\t\t\t\t target={this.target}\n\t\t\t\t {...this.inheritedAttributes}>\n\t\t\t\t\t<slot name=\"icon-start\"/>\n\t\t\t\t\t<slot/>\n\t\t\t\t\t{this.external ? <gov-icon name=\"box-arrow-up-right\" type=\"components\"></gov-icon> : <slot name=\"icon-end\"/>}\n\t\t\t\t</a>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
2
|
-
import {
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
+
import { p as pick } from './utils-e10e994d.js';
|
|
3
3
|
import { S as Sizes } from './sizes-5b9e579f.js';
|
|
4
|
-
import { g as govHost, p as prepareClasses } from './template-
|
|
5
|
-
import { v as validateProp } from './props-
|
|
6
|
-
import './gov.log-
|
|
7
|
-
import './win-cec370ad.js';
|
|
4
|
+
import { g as govHost, p as prepareClasses } from './template-7ecee4d1.js';
|
|
5
|
+
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
6
|
+
import './gov.log-6b64cda6.js';
|
|
8
7
|
|
|
9
8
|
const LoadingSizes = pick(Sizes, ['_S', '_M', '_L']);
|
|
10
9
|
const LoadingClass = {
|
|
@@ -26,7 +25,7 @@ const GovLoading = class {
|
|
|
26
25
|
this.validateSize(this.size);
|
|
27
26
|
}
|
|
28
27
|
render() {
|
|
29
|
-
return (h(Host, { key: '
|
|
28
|
+
return (h(Host, { key: '3f7cec1f98aa0c68f42eb3049ae8d34270e17258', class: this.h.classes(LoadingClass.root), size: this.size }, h("div", { key: '9ad1ca86b0221f2668f47eb72c080e9ecd05ed68', class: LoadingClass.content }, h("gov-icon", { key: '5d75c634386c8226c553b787355b29b0581601c5', class: prepareClasses([LoadingClass.icon, "gov-spin-animation"]), name: "loader", type: "components" }), h("slot", { key: '99ff7f6f1c8bd8135959ea36bc484eab6c9a4b6b' })), h("gov-backdrop", { key: 'dcaa2ab6dbcca347d5934df52e0f4989701c0259', inverse: true })));
|
|
30
29
|
}
|
|
31
30
|
get host() { return getElement(this); }
|
|
32
31
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-loading.entry.js","mappings":"
|
|
1
|
+
{"file":"gov-loading.entry.js","mappings":";;;;;;;AAIO,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAGpD,MAAM,YAAY,GAAG;IAC3B,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,sBAAsB;IAC/B,IAAI,EAAE,mBAAmB;CACzB;;MCFY,UAAU;IAGtB;;oBAQ2C,GAAG;QAP7C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IASD,YAAY,CAAC,QAAgB;QAC5B,YAAY,CAAC,YAAY,EAAE,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;KACvD;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,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,IAC9D,4DAAK,KAAK,EAAE,YAAY,CAAC,OAAO,IAC/B,iEACC,KAAK,EAAE,cAAc,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC,EAChE,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,YAAY,GAChB,EACF,8DAAQ,CACH,EACN,qEAAc,OAAO,EAAE,IAAI,GAAI,CACzB,EACP;KACD;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-loading/loading/constants.ts","../../../packages/core/src/components/gov-loading/loading/gov-loading.tsx"],"sourcesContent":["import {pick} from \"../../../utils/utils\";\nimport {Sizes} from \"../../../core/constants/sizes\";\nimport {ValueOf} from \"../../../types/interfaces\";\n\nexport const LoadingSizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type LoadingSizesType = `${ValueOf<typeof LoadingSizes>}`\n\nexport const LoadingClass = {\n\troot: 'gov-loading',\n\tcontent: 'gov-loading__content',\n\ticon: 'gov-loading__icon',\n}\n","import {Component, Element, h, Host, Prop, Watch} from \"@stencil/core\"\nimport {LoadingClass, LoadingSizes, LoadingSizesType} from \"./constants\"\nimport { govHost, prepareClasses } from \"../../../helpers/Dom/template\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport {validateProp} from \"../../../helpers/Validate/props\";\n\n@Component({\n\ttag: \"gov-loading\",\n})\nexport class GovLoading {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovLoadingElement\n\t/**\n\t * Loading size\n\t */\n\t@Prop() readonly size?: LoadingSizesType = 'm'\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(LoadingSizes, newValue, LoadingClass.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(LoadingClass.root)} size={this.size}>\n\t\t\t\t<div class={LoadingClass.content}>\n\t\t\t\t\t<gov-icon\n\t\t\t\t\t\tclass={prepareClasses([LoadingClass.icon, \"gov-spin-animation\"])}\n\t\t\t\t\t\tname=\"loader\"\n\t\t\t\t\t\ttype=\"components\"\n\t\t\t\t\t/>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t\t<gov-backdrop inverse={true} />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host, g as getElement } from './index-
|
|
2
|
-
import { v as validateProp } from './props-
|
|
3
|
-
import { C as Colors } from './colors-
|
|
4
|
-
import {
|
|
5
|
-
import { g as govHost } from './template-
|
|
6
|
-
import './gov.log-
|
|
7
|
-
import './win-cec370ad.js';
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-c263e031.js';
|
|
2
|
+
import { v as validateProp } from './props-9d3c7ac1.js';
|
|
3
|
+
import { C as Colors } from './colors-4cf64720.js';
|
|
4
|
+
import { p as pick } from './utils-e10e994d.js';
|
|
5
|
+
import { g as govHost } from './template-7ecee4d1.js';
|
|
6
|
+
import './gov.log-6b64cda6.js';
|
|
8
7
|
|
|
9
8
|
pick(Colors, ['PRIMARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING']);
|
|
10
9
|
var MessageType;
|
|
@@ -28,7 +27,7 @@ const GovMessage = class {
|
|
|
28
27
|
validateProp(Colors, newValue, MessageClass.root);
|
|
29
28
|
}
|
|
30
29
|
render() {
|
|
31
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: 'e9250a61d94bf14a9d32eef5a69a9347df89a1e2', class: this.h.classes(MessageClass.root), color: this.color, type: this.type, role: "status" }, this.h.hasSlot("icon") && (h("slot", { key: '00a69ab91656245790d88c02cbaa14d365f48140', name: "icon" })), h("div", { key: 'c95cb839c2f24f744aff2a9580c44c18102d1fc9', class: MessageClass.content }, h("slot", { key: '71d8d21cff90b5498940d99947d62fec1f400f1e' }))));
|
|
32
31
|
}
|
|
33
32
|
get host() { return getElement(this); }
|
|
34
33
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-message.entry.js","mappings":"
|
|
1
|
+
{"file":"gov-message.entry.js","mappings":";;;;;;;AAI6B,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,EAAC;AAGhG,IAAY,WAGX;AAHD,WAAY,WAAW;IACtB,4BAAa,CAAA;IACb,gCAAiB,CAAA;AAClB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB;AAGM,MAAM,YAAY,GAAG;IAC3B,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,sBAAsB;CAC/B;;MCNY,UAAU;IAGtB;;qBAS2C,MAAM,CAAC,OAAO;oBAId,QAAQ;QAZlD,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAcD,aAAa,CAAC,QAAgB;QAC7B,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;KACjD;IAED,MAAM;QACL,QACC,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAC,QAAQ,IAC/F,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KACtB,6DAAM,IAAI,EAAC,MAAM,GAAG,CACpB,EAED,4DAAK,KAAK,EAAE,YAAY,CAAC,OAAO,IAC/B,8DAAQ,CACH,CACA,EACP;KACD;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-message/constants.ts","../../../packages/core/src/components/gov-message/gov-message.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const MessageColors = pick(Colors, ['PRIMARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING'])\nexport type MessageColorType = `${ValueOf<typeof MessageColors>}`\n\nexport enum MessageType {\n\tBOLD = 'bold',\n\tSUBTLE = 'subtle',\n}\nexport type MessageTypesType = `${ValueOf<typeof MessageType>}`\n\nexport const MessageClass = {\n\troot: 'gov-message',\n\tcontent: 'gov-message__content',\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { MessageTypesType, MessageClass, MessageColorType} from \"./constants\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { Colors } from \"../../core/constants/colors\"\n\n@Component({\n\ttag: \"gov-message\",\n})\nexport class GovMessage {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovMessageElement\n\n\t/**\n\t * Style variation of the content message.\n\t */\n\t@Prop() readonly color: MessageColorType = Colors.PRIMARY\n\t/**\n\t * Message type\n\t */\n\t@Prop() readonly type?: MessageTypesType = \"subtle\"\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(Colors, newValue, MessageClass.root)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(MessageClass.root)} color={this.color} type={this.type} role=\"status\">\n\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t)}\n\n\t\t\t\t<div class={MessageClass.content}>\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}
|