@gov-design-system-ce/components 0.0.62 → 0.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{constants-0488d137.js → constants-25f7a6be.js} +2 -2
- package/dist/cjs/{constants-0488d137.js.map → constants-25f7a6be.js.map} +1 -1
- package/dist/cjs/{constants-23b7a283.js → constants-427a2843.js} +2 -2
- package/dist/cjs/constants-427a2843.js.map +1 -0
- package/dist/cjs/{constants-ff12205f.js → constants-a31344ad.js} +1 -1
- package/dist/{collection/components/gov-button/default/constants.js.map → cjs/constants-a31344ad.js.map} +1 -1
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{form-f68d13c6.js → form-74063d50.js} +3 -1
- package/dist/cjs/form-74063d50.js.map +1 -0
- package/dist/cjs/gov-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-accordion.cjs.entry.js +1 -1
- package/dist/cjs/gov-app.cjs.entry.js +791 -514
- package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-attachments_3.cjs.entry.js +1 -1
- package/dist/cjs/gov-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-button.cjs.entry.js +2 -2
- package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-card.cjs.entry.js +1 -1
- package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-chip.cjs.entry.js +102 -0
- package/dist/cjs/gov-chip.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-container.cjs.entry.js +1 -1
- package/dist/cjs/gov-control-group.cjs.entry.js +1 -1
- package/dist/cjs/gov-cookiebar.cjs.entry.js +1 -1
- package/dist/cjs/gov-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/gov-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-empty.cjs.entry.js +1 -1
- package/dist/cjs/gov-error-code.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-control.cjs.entry.js +3 -3
- package/dist/cjs/gov-form-control.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-file.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-group.cjs.entry.js +12 -3
- package/dist/cjs/gov-form-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-input.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-multi-select.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-password-power.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-password-power.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-radio.cjs.entry.js +6 -6
- package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-select.cjs.entry.js +14 -3
- package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-switch.cjs.entry.js +3 -3
- package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-grid.cjs.entry.js +1 -1
- package/dist/cjs/gov-icon.cjs.entry.js +2 -2
- package/dist/cjs/gov-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-infobar.cjs.entry.js +5 -4
- package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-layout-column.cjs.entry.js +1 -1
- package/dist/cjs/gov-layout.cjs.entry.js +1 -1
- package/dist/cjs/gov-loading.cjs.entry.js +1 -1
- package/dist/cjs/gov-message.cjs.entry.js +1 -1
- package/dist/cjs/gov-modal.cjs.entry.js +7 -4
- package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-pagination.cjs.entry.js +1 -1
- package/dist/cjs/gov-prompt.cjs.entry.js +1 -1
- package/dist/cjs/gov-side-nav-item.cjs.entry.js +4 -4
- package/dist/cjs/gov-side-nav-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-side-nav.cjs.entry.js +2 -2
- package/dist/cjs/gov-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/gov-spacer.cjs.entry.js +1 -1
- package/dist/cjs/gov-statsbar-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-statsbar.cjs.entry.js +1 -1
- package/dist/cjs/gov-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-stepper.cjs.entry.js +1 -1
- package/dist/cjs/gov-tabs-item.cjs.entry.js +5 -5
- package/dist/cjs/gov-tabs-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tabs.cjs.entry.js +25 -16
- package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tag.cjs.entry.js +51 -0
- package/dist/cjs/gov-tag.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-tile.cjs.entry.js +1 -1
- package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tiles.cjs.entry.js +1 -1
- package/dist/cjs/gov-toast.cjs.entry.js +1 -1
- package/dist/cjs/gov-tooltip-content.cjs.entry.js +2 -2
- package/dist/cjs/gov-tooltip-content.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tooltip.cjs.entry.js +40 -5
- package/dist/cjs/gov-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-wizard-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard.cjs.entry.js +1 -1
- package/dist/cjs/index-83edd4fe.js +6 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{template-e1c4ff78.js → template-4b951d1d.js} +8 -1
- package/dist/cjs/template-4b951d1d.js.map +1 -0
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/gov-accordion/gov-accordion-item.css +5 -2
- package/dist/collection/components/gov-accordion/gov-accordion-item.js +1 -1
- package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
- package/dist/collection/components/gov-accordion/gov-accordion.css +5 -2
- package/dist/collection/components/gov-app/gov-app.css +5 -2
- package/dist/collection/components/gov-app/gov-app.js +5 -3
- package/dist/collection/components/gov-app/gov-app.js.map +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments-item.css +5 -2
- package/dist/collection/components/gov-attachments/gov-attachments.css +5 -2
- package/dist/collection/components/gov-backdrop/gov-backdrop.css +5 -2
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.css +5 -2
- 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/constants.js.map +1 -0
- package/dist/collection/components/gov-button/{default → button}/gov-button.css +6 -3
- package/dist/collection/components/gov-button/{default → button}/gov-button.js +9 -9
- package/dist/collection/components/gov-button/button/gov-button.js.map +1 -0
- package/dist/collection/components/gov-button/button/gov-button.types.js.map +1 -0
- package/dist/collection/components/gov-button/dropdown/gov-dropdown.css +5 -2
- package/dist/collection/components/gov-button/dropdown/gov-dropdown.js +1 -1
- package/dist/collection/components/gov-button/dropdown/gov-dropdown.js.map +1 -1
- package/dist/collection/components/gov-card/gov-card.css +5 -2
- 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-badge → gov-chip}/constants.js +5 -5
- package/dist/collection/components/gov-chip/constants.js.map +1 -0
- package/dist/collection/components/gov-chip/gov-chip.css +1270 -0
- package/dist/collection/components/{gov-badge/gov-badge.js → gov-chip/gov-chip.js} +150 -23
- package/dist/collection/components/gov-chip/gov-chip.js.map +1 -0
- package/dist/collection/components/gov-container/gov-container.css +5 -2
- package/dist/collection/components/gov-control-group/gov-control-group.css +5 -2
- package/dist/collection/components/gov-cookiebar/gov-cookiebar.css +5 -2
- package/dist/collection/components/gov-empty/gov-empty.css +5 -2
- package/dist/collection/components/gov-error-code/gov-error-code.css +5 -2
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.css +5 -2
- package/dist/collection/components/gov-form/checkbox/constants.js +1 -0
- package/dist/collection/components/gov-form/checkbox/constants.js.map +1 -1
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.css +8 -2
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +2 -2
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
- package/dist/collection/components/gov-form/control/gov-form-control.css +5 -2
- package/dist/collection/components/gov-form/control/gov-form-control.js +1 -1
- package/dist/collection/components/gov-form/control/gov-form-control.js.map +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.css +5 -2
- package/dist/collection/components/gov-form/group/gov-form-group.css +5 -2
- package/dist/collection/components/gov-form/group/gov-form-group.js +13 -2
- package/dist/collection/components/gov-form/group/gov-form-group.js.map +1 -1
- package/dist/collection/components/gov-form/input/gov-form-input.css +5 -2
- package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
- package/dist/collection/components/gov-form/label/gov-form-label.css +5 -2
- package/dist/collection/components/gov-form/message/gov-form-message.css +5 -2
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +5 -2
- package/dist/collection/components/gov-form/password-power/gov-form-password-power.css +8 -4
- package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +1 -1
- package/dist/collection/components/gov-form/password-power/gov-form-password-power.js.map +1 -1
- package/dist/collection/components/gov-form/radio/constants.js +1 -0
- package/dist/collection/components/gov-form/radio/constants.js.map +1 -1
- package/dist/collection/components/gov-form/radio/gov-form-radio.css +8 -2
- package/dist/collection/components/gov-form/radio/gov-form-radio.js +4 -4
- package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
- package/dist/collection/components/gov-form/search/gov-form-search.css +5 -2
- package/dist/collection/components/gov-form/search/gov-form-search.js +1 -1
- package/dist/collection/components/gov-form/search/gov-form-search.js.map +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.css +5 -2
- package/dist/collection/components/gov-form/select/gov-form-select.js +39 -2
- package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.types.js.map +1 -1
- package/dist/collection/components/gov-form/switch/gov-form-switch.css +7 -2
- package/dist/collection/components/gov-form/switch/gov-form-switch.js +1 -1
- package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
- package/dist/collection/components/gov-grid/gov-grid-item.css +5 -2
- package/dist/collection/components/gov-grid/gov-grid.css +5 -2
- package/dist/collection/components/gov-icon/gov-icon.css +5 -2
- package/dist/collection/components/gov-icon/gov-icon.js +4 -10
- package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
- package/dist/collection/components/gov-icon/list.js +17 -11
- package/dist/collection/components/gov-icon/list.js.map +1 -1
- package/dist/collection/components/gov-infobar/{default/constants.js → constants.js} +3 -2
- package/dist/collection/components/gov-infobar/constants.js.map +1 -0
- package/dist/collection/components/gov-infobar/{default/gov-infobar.css → gov-infobar.css} +9 -3
- package/dist/collection/components/gov-infobar/{default/gov-infobar.js → gov-infobar.js} +12 -11
- package/dist/collection/components/gov-infobar/gov-infobar.js.map +1 -0
- package/dist/collection/components/gov-infobar/gov-infobar.types.js.map +1 -0
- package/dist/collection/components/gov-layout/gov-layout-column.css +5 -2
- package/dist/collection/components/gov-layout/gov-layout.css +5 -2
- package/dist/collection/components/gov-loading/loading/gov-loading.css +5 -2
- package/dist/collection/components/gov-loading/skeleton/gov-skeleton.css +5 -2
- package/dist/collection/components/gov-message/gov-message.css +5 -2
- package/dist/collection/components/gov-modal/gov-modal.css +5 -2
- package/dist/collection/components/gov-modal/gov-modal.js +24 -3
- package/dist/collection/components/gov-modal/gov-modal.js.map +1 -1
- package/dist/collection/components/gov-nav/gov-nav-item.css +5 -2
- package/dist/collection/components/gov-nav/gov-nav.css +5 -2
- package/dist/collection/components/gov-pagination/gov-pagination.css +5 -2
- package/dist/collection/components/gov-promp/gov-prompt.css +5 -2
- package/dist/collection/components/gov-side-nav/constants.js +1 -1
- package/dist/collection/components/gov-side-nav/constants.js.map +1 -1
- package/dist/collection/components/gov-side-nav/gov-side-nav-item.css +6 -3
- package/dist/collection/components/gov-side-nav/gov-side-nav-item.js +2 -2
- package/dist/collection/components/gov-side-nav/gov-side-nav-item.js.map +1 -1
- package/dist/collection/components/gov-side-nav/gov-side-nav.css +5 -2
- package/dist/collection/components/gov-spacer/gov-spacer.css +5 -2
- package/dist/collection/components/gov-statsbar/gov-statsbar-item.css +5 -2
- package/dist/collection/components/gov-statsbar/gov-statsbar.css +5 -2
- package/dist/collection/components/gov-stepper/gov-stepper-item.css +5 -2
- package/dist/collection/components/gov-stepper/gov-stepper.css +5 -2
- package/dist/collection/components/gov-tabs/constants.js +1 -1
- package/dist/collection/components/gov-tabs/constants.js.map +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs-item.css +5 -2
- package/dist/collection/components/gov-tabs/gov-tabs-item.js +4 -4
- package/dist/collection/components/gov-tabs/gov-tabs-item.js.map +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs.css +16 -14
- package/dist/collection/components/gov-tabs/gov-tabs.js +29 -21
- package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
- package/dist/collection/components/gov-tag/constants.js +4 -0
- package/dist/collection/components/gov-tag/constants.js.map +1 -0
- package/dist/collection/components/gov-tag/gov-tag.css +1274 -0
- package/dist/collection/components/gov-tag/gov-tag.js +118 -0
- package/dist/collection/components/gov-tag/gov-tag.js.map +1 -0
- package/dist/collection/components/gov-tile/container/gov-tiles.css +5 -2
- package/dist/collection/components/gov-tile/gov-tile.css +5 -2
- package/dist/collection/components/gov-tile/gov-tile.js +3 -3
- package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
- package/dist/collection/components/gov-toast/gov-toast.css +5 -2
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.css +14 -2
- package/dist/collection/components/gov-tooltip/gov-tooltip.css +6 -3
- package/dist/collection/components/gov-tooltip/gov-tooltip.js +40 -5
- package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
- package/dist/collection/components/gov-wizard/gov-wizard-item.css +5 -2
- package/dist/collection/components/gov-wizard/gov-wizard-item.js +1 -1
- package/dist/collection/components/gov-wizard/gov-wizard-item.js.map +1 -1
- package/dist/collection/components/gov-wizard/gov-wizard.css +5 -2
- package/dist/collection/data/font-definitions.js +6 -6
- package/dist/collection/helpers/Dom/template.js +7 -0
- 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 +15 -15
- package/dist/collection/pages/Accordion.js.map +1 -1
- package/dist/collection/pages/{Badge.js → Chip.js} +181 -181
- package/dist/collection/pages/Chip.js.map +1 -0
- package/dist/collection/pages/Forms.js +23 -0
- package/dist/collection/pages/Forms.js.map +1 -1
- package/dist/collection/pages/Infobar.js +5 -5
- package/dist/collection/pages/Infobar.js.map +1 -1
- package/dist/collection/pages/Tabs.js +7 -7
- package/dist/collection/pages/Tabs.js.map +1 -1
- package/dist/collection/pages/Tag.js +253 -0
- package/dist/collection/pages/Tag.js.map +1 -0
- package/dist/collection/pages/Tooltip.js +3 -3
- package/dist/collection/pages/Tooltip.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-app.js +1 -1
- package/dist/components/gov-app.js.map +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-badge.d.ts → gov-chip.d.ts} +4 -4
- package/dist/components/gov-chip.js +2 -0
- package/dist/components/gov-container.js +1 -1
- package/dist/components/gov-control-group.js +1 -1
- package/dist/components/gov-cookiebar.js +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-form-autocomplete.js +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-control.js.map +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-group.js +1 -1
- package/dist/components/gov-form-group.js.map +1 -1
- package/dist/components/gov-form-input.js +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-password-power.js +1 -1
- package/dist/components/gov-form-password-power.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-search.js.map +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-loading.js +1 -1
- package/dist/components/gov-message.js +1 -1
- package/dist/components/gov-modal.js +1 -1
- package/dist/components/gov-modal.js.map +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-prompt.js +1 -1
- package/dist/components/gov-side-nav-item.js +1 -1
- package/dist/components/gov-side-nav-item.js.map +1 -1
- package/dist/components/gov-side-nav.js +1 -1
- package/dist/components/gov-skeleton.js +1 -1
- package/dist/components/gov-spacer.js +1 -1
- package/dist/components/gov-statsbar-item.js +1 -1
- package/dist/components/gov-statsbar.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-item.js.map +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tabs.js.map +1 -1
- package/dist/components/gov-tag.d.ts +11 -0
- package/dist/components/gov-tag.js +2 -0
- package/dist/components/gov-tag.js.map +1 -0
- 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-tooltip-content.js +1 -1
- package/dist/components/gov-tooltip-content.js.map +1 -1
- package/dist/components/gov-tooltip.js +1 -1
- package/dist/components/gov-tooltip.js.map +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/gov-wizard-item.js.map +1 -1
- package/dist/components/gov-wizard.js +1 -1
- package/dist/components/{p-1b4f2520.js → p-25b64ce2.js} +2 -2
- package/dist/components/p-28e59384.js +2 -0
- package/dist/components/p-28e59384.js.map +1 -0
- package/dist/components/{p-3dbf7f49.js → p-3c71d697.js} +1 -1
- package/dist/{cjs/constants-ff12205f.js.map → components/p-3c71d697.js.map} +1 -1
- package/dist/components/p-53e02bee.js +2 -0
- package/dist/components/p-53e02bee.js.map +1 -0
- package/dist/components/{p-3e8a9e92.js → p-6b256c8e.js} +2 -2
- package/dist/components/{p-f72ecbef.js → p-7ad6b936.js} +2 -2
- package/dist/components/p-7ad6b936.js.map +1 -0
- package/dist/components/{p-9ba6e755.js → p-a29d84e4.js} +2 -2
- package/dist/components/p-a29d84e4.js.map +1 -0
- package/dist/components/p-b0d4961a.js +2 -0
- package/dist/components/p-b0d4961a.js.map +1 -0
- package/dist/components/{p-522dd298.js → p-b47d953a.js} +2 -2
- package/dist/components/{p-522dd298.js.map → p-b47d953a.js.map} +1 -1
- package/dist/components/{p-8da17139.js → p-b60b159d.js} +2 -2
- package/dist/components/p-db1f0452.js +2 -0
- package/dist/components/p-db1f0452.js.map +1 -0
- package/dist/components/{p-b3cb7945.js → p-dde10734.js} +2 -2
- package/dist/components/{p-94542a50.js → p-e2d7dc71.js} +2 -2
- package/dist/components/p-e2d7dc71.js.map +1 -0
- package/dist/components/{p-bc5d5903.js → p-ee3a01c0.js} +2 -2
- package/dist/components/p-fa1e4aea.js +2 -0
- package/dist/components/p-fa1e4aea.js.map +1 -0
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-002c922c.entry.js +2 -0
- package/dist/core/p-002c922c.entry.js.map +1 -0
- package/dist/core/{p-7702c8c2.entry.js → p-046613ca.entry.js} +2 -2
- package/dist/core/p-0a84ab6c.entry.js +2 -0
- package/dist/core/p-0a84ab6c.entry.js.map +1 -0
- package/dist/core/{p-0c57e410.entry.js → p-0db95d0a.entry.js} +2 -2
- package/dist/core/p-0db95d0a.entry.js.map +1 -0
- package/dist/core/p-0e5fa8bf.js +2 -0
- package/dist/core/p-0e5fa8bf.js.map +1 -0
- package/dist/core/{p-f62efc34.entry.js → p-1da19326.entry.js} +2 -2
- package/dist/core/p-1da19326.entry.js.map +1 -0
- package/dist/core/{p-1c62f175.entry.js → p-1e41751e.entry.js} +2 -2
- package/dist/core/{p-e5227e40.entry.js → p-21a02f11.entry.js} +2 -2
- package/dist/core/{p-acd6a9f4.entry.js → p-2370e823.entry.js} +2 -2
- package/dist/core/p-2370e823.entry.js.map +1 -0
- package/dist/core/{p-06699657.entry.js → p-25620fed.entry.js} +2 -2
- package/dist/core/p-25620fed.entry.js.map +1 -0
- package/dist/core/{p-6f43bd00.entry.js → p-28d98a7d.entry.js} +2 -2
- package/dist/core/p-28e59384.js +2 -0
- package/dist/core/p-28e59384.js.map +1 -0
- package/dist/core/{p-e2d6efaf.entry.js → p-2c5b8f32.entry.js} +2 -2
- package/dist/core/{p-1da9f871.entry.js → p-3191317e.entry.js} +2 -2
- package/dist/core/{p-32a4b7e3.entry.js → p-32a4bac2.entry.js} +2 -2
- package/dist/core/p-32a4bac2.entry.js.map +1 -0
- package/dist/core/{p-7372b066.entry.js → p-34613499.entry.js} +2 -2
- package/dist/core/{p-88010439.entry.js → p-3d11d9a0.entry.js} +2 -2
- package/dist/core/{p-7fa1290e.entry.js → p-409f054b.entry.js} +2 -2
- package/dist/core/{p-afa12399.entry.js → p-4281eecd.entry.js} +2 -2
- package/dist/core/p-4281eecd.entry.js.map +1 -0
- package/dist/core/p-475e46be.entry.js +2 -0
- package/dist/core/p-475e46be.entry.js.map +1 -0
- package/dist/core/{p-3bacd021.js → p-4c55142b.js} +1 -1
- package/dist/core/p-4c55142b.js.map +1 -0
- package/dist/core/p-4df6aec4.entry.js +2 -0
- package/dist/core/p-4df6aec4.entry.js.map +1 -0
- package/dist/core/{p-bc6f1479.entry.js → p-4f34cea7.entry.js} +2 -2
- package/dist/core/p-4f34cea7.entry.js.map +1 -0
- package/dist/core/{p-35c1c12c.entry.js → p-52d767a8.entry.js} +2 -2
- package/dist/core/p-52d767a8.entry.js.map +1 -0
- package/dist/core/p-5e23a6ba.entry.js.map +1 -1
- package/dist/core/{p-2bb9f781.entry.js → p-679625c1.entry.js} +2 -2
- package/dist/core/{p-19b897c0.entry.js → p-7632b949.entry.js} +2 -2
- package/dist/core/{p-80f5140b.entry.js → p-7b01e961.entry.js} +2 -2
- package/dist/core/{p-93897e60.entry.js → p-7c38556b.entry.js} +2 -2
- package/dist/core/p-7d756211.entry.js +2 -0
- package/dist/core/p-7d756211.entry.js.map +1 -0
- package/dist/core/{p-7e8d2066.entry.js → p-7e11320f.entry.js} +2 -2
- package/dist/core/{p-c81d62db.entry.js → p-80ebaaf5.entry.js} +2 -2
- package/dist/core/{p-93042b25.entry.js → p-83512243.entry.js} +2 -2
- package/dist/core/{p-739dd451.entry.js → p-84e61610.entry.js} +2 -2
- package/dist/core/p-87700ea3.entry.js +2 -0
- package/dist/core/p-87700ea3.entry.js.map +1 -0
- package/dist/core/{p-998c3336.entry.js → p-87a91e77.entry.js} +2 -2
- package/dist/core/{p-4452c278.entry.js → p-8a931ff2.entry.js} +2 -2
- package/dist/core/{p-041d30b1.entry.js → p-8e5599d1.entry.js} +2 -2
- package/dist/core/{p-84f6b11a.entry.js → p-8f3d9099.entry.js} +2 -2
- package/dist/core/{p-84f6b11a.entry.js.map → p-8f3d9099.entry.js.map} +1 -1
- package/dist/core/{p-19a54ee9.entry.js → p-92ce6f87.entry.js} +2 -2
- package/dist/core/p-92ce6f87.entry.js.map +1 -0
- package/dist/core/{p-e1780dba.entry.js → p-96354948.entry.js} +2 -2
- package/dist/core/{p-2fe9d3ea.entry.js → p-a8b5ac68.entry.js} +2 -2
- package/dist/core/{p-2bf0c1c5.entry.js → p-aec21036.entry.js} +2 -2
- package/dist/core/{p-2bf0c1c5.entry.js.map → p-aec21036.entry.js.map} +1 -1
- package/dist/core/{p-228da18e.entry.js → p-af42ea63.entry.js} +2 -2
- package/dist/core/p-b21a3c79.entry.js +2 -0
- package/dist/core/p-b21a3c79.entry.js.map +1 -0
- package/dist/core/{p-9633e7b5.entry.js → p-baae15b9.entry.js} +2 -2
- package/dist/core/p-baae15b9.entry.js.map +1 -0
- package/dist/core/{p-88a78167.entry.js → p-c13ad31c.entry.js} +2 -2
- package/dist/core/{p-c5d3efc2.entry.js → p-c91daf1e.entry.js} +2 -2
- package/dist/core/{p-c5d3efc2.entry.js.map → p-c91daf1e.entry.js.map} +1 -1
- package/dist/core/p-c9ac8361.entry.js +2 -0
- package/dist/core/p-c9ac8361.entry.js.map +1 -0
- package/dist/core/p-cb3ac3f5.entry.js +2 -0
- package/dist/core/{p-5316e768.entry.js.map → p-cb3ac3f5.entry.js.map} +1 -1
- package/dist/core/{p-de5c9181.entry.js → p-cc48e49d.entry.js} +2 -2
- package/dist/core/{p-de5c9181.entry.js.map → p-cc48e49d.entry.js.map} +1 -1
- package/dist/core/{p-28f39f69.entry.js → p-d6e6d683.entry.js} +2 -2
- package/dist/core/p-db1f0452.js +2 -0
- package/dist/core/p-db1f0452.js.map +1 -0
- package/dist/core/{p-a7719b55.entry.js → p-e4ae862e.entry.js} +2 -2
- package/dist/core/{p-74ce7780.entry.js → p-e4e4ae20.entry.js} +2 -2
- package/dist/core/p-e4e4ae20.entry.js.map +1 -0
- package/dist/core/{p-1c40fdd5.entry.js → p-e6af7eb5.entry.js} +2 -2
- package/dist/core/p-e6af7eb5.entry.js.map +1 -0
- package/dist/core/p-ef2895f8.entry.js +2 -0
- package/dist/core/p-ef2895f8.entry.js.map +1 -0
- package/dist/core/{p-89921159.entry.js → p-f069df4a.entry.js} +2 -2
- package/dist/core/p-f8407153.entry.js +2 -0
- package/dist/core/p-f8407153.entry.js.map +1 -0
- package/dist/core/p-fa1e4aea.js +2 -0
- package/dist/core/p-fa1e4aea.js.map +1 -0
- package/dist/core/{p-0eb11cfc.entry.js → p-ff061e6b.entry.js} +2 -2
- package/dist/esm/{constants-ba92640d.js → constants-34a29ae2.js} +1 -1
- package/dist/{components/p-3dbf7f49.js.map → esm/constants-34a29ae2.js.map} +1 -1
- package/dist/esm/{constants-24dad929.js → constants-6df4edc4.js} +2 -2
- package/dist/esm/constants-6df4edc4.js.map +1 -0
- package/dist/esm/{constants-f5c21493.js → constants-867ac6e2.js} +2 -2
- package/dist/esm/{constants-f5c21493.js.map → constants-867ac6e2.js.map} +1 -1
- package/dist/esm/core.js +1 -1
- package/dist/esm/{form-2d9f68d9.js → form-39dc6896.js} +3 -1
- package/dist/esm/form-39dc6896.js.map +1 -0
- package/dist/esm/gov-accordion-item.entry.js +1 -1
- package/dist/esm/gov-accordion-item.entry.js.map +1 -1
- package/dist/esm/gov-accordion.entry.js +1 -1
- package/dist/esm/gov-app.entry.js +791 -514
- package/dist/esm/gov-app.entry.js.map +1 -1
- package/dist/esm/gov-attachments_3.entry.js +1 -1
- package/dist/esm/gov-backdrop.entry.js +1 -1
- package/dist/esm/gov-breadcrumbs.entry.js +1 -1
- package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
- package/dist/esm/gov-button.entry.js +2 -2
- package/dist/esm/gov-button.entry.js.map +1 -1
- package/dist/esm/gov-card.entry.js +1 -1
- package/dist/esm/gov-card.entry.js.map +1 -1
- package/dist/esm/gov-chip.entry.js +98 -0
- package/dist/esm/gov-chip.entry.js.map +1 -0
- package/dist/esm/gov-container.entry.js +1 -1
- package/dist/esm/gov-control-group.entry.js +1 -1
- package/dist/esm/gov-cookiebar.entry.js +1 -1
- package/dist/esm/gov-dropdown.entry.js +2 -2
- package/dist/esm/gov-dropdown.entry.js.map +1 -1
- package/dist/esm/gov-empty.entry.js +1 -1
- package/dist/esm/gov-error-code.entry.js +1 -1
- package/dist/esm/gov-form-autocomplete.entry.js +1 -1
- package/dist/esm/gov-form-checkbox.entry.js +4 -4
- package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
- package/dist/esm/gov-form-control.entry.js +3 -3
- package/dist/esm/gov-form-control.entry.js.map +1 -1
- package/dist/esm/gov-form-file.entry.js +2 -2
- package/dist/esm/gov-form-group.entry.js +12 -3
- package/dist/esm/gov-form-group.entry.js.map +1 -1
- package/dist/esm/gov-form-input.entry.js +2 -2
- package/dist/esm/gov-form-input.entry.js.map +1 -1
- package/dist/esm/gov-form-multi-select.entry.js +2 -2
- package/dist/esm/gov-form-password-power.entry.js +1 -1
- package/dist/esm/gov-form-password-power.entry.js.map +1 -1
- package/dist/esm/gov-form-radio.entry.js +6 -6
- package/dist/esm/gov-form-radio.entry.js.map +1 -1
- package/dist/esm/gov-form-search.entry.js.map +1 -1
- package/dist/esm/gov-form-select.entry.js +14 -3
- package/dist/esm/gov-form-select.entry.js.map +1 -1
- package/dist/esm/gov-form-switch.entry.js +3 -3
- package/dist/esm/gov-form-switch.entry.js.map +1 -1
- package/dist/esm/gov-grid-item.entry.js +1 -1
- package/dist/esm/gov-grid.entry.js +1 -1
- package/dist/esm/gov-icon.entry.js +2 -2
- package/dist/esm/gov-icon.entry.js.map +1 -1
- package/dist/esm/gov-infobar.entry.js +5 -4
- package/dist/esm/gov-infobar.entry.js.map +1 -1
- package/dist/esm/gov-layout-column.entry.js +1 -1
- package/dist/esm/gov-layout.entry.js +1 -1
- package/dist/esm/gov-loading.entry.js +1 -1
- package/dist/esm/gov-message.entry.js +1 -1
- package/dist/esm/gov-modal.entry.js +7 -4
- package/dist/esm/gov-modal.entry.js.map +1 -1
- package/dist/esm/gov-pagination.entry.js +1 -1
- package/dist/esm/gov-prompt.entry.js +1 -1
- package/dist/esm/gov-side-nav-item.entry.js +4 -4
- package/dist/esm/gov-side-nav-item.entry.js.map +1 -1
- package/dist/esm/gov-side-nav.entry.js +2 -2
- package/dist/esm/gov-skeleton.entry.js +1 -1
- package/dist/esm/gov-spacer.entry.js +1 -1
- package/dist/esm/gov-statsbar-item.entry.js +1 -1
- package/dist/esm/gov-statsbar.entry.js +1 -1
- package/dist/esm/gov-stepper-item.entry.js +1 -1
- package/dist/esm/gov-stepper.entry.js +1 -1
- package/dist/esm/gov-tabs-item.entry.js +5 -5
- package/dist/esm/gov-tabs-item.entry.js.map +1 -1
- package/dist/esm/gov-tabs.entry.js +25 -16
- package/dist/esm/gov-tabs.entry.js.map +1 -1
- package/dist/esm/gov-tag.entry.js +47 -0
- package/dist/esm/gov-tag.entry.js.map +1 -0
- package/dist/esm/gov-tile.entry.js +1 -1
- package/dist/esm/gov-tile.entry.js.map +1 -1
- package/dist/esm/gov-tiles.entry.js +1 -1
- package/dist/esm/gov-toast.entry.js +1 -1
- package/dist/esm/gov-tooltip-content.entry.js +2 -2
- package/dist/esm/gov-tooltip-content.entry.js.map +1 -1
- package/dist/esm/gov-tooltip.entry.js +40 -5
- package/dist/esm/gov-tooltip.entry.js.map +1 -1
- package/dist/esm/gov-wizard-item.entry.js +1 -1
- package/dist/esm/gov-wizard-item.entry.js.map +1 -1
- package/dist/esm/gov-wizard.entry.js +1 -1
- package/dist/esm/index-ae3c50f1.js +6 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{template-10332292.js → template-df429738.js} +8 -1
- package/dist/esm/template-df429738.js.map +1 -0
- package/dist/hydrate/index.js +1400 -972
- package/dist/types/components/gov-accordion/gov-accordion-item.d.ts +1 -1
- package/dist/types/components/gov-app/gov-app.d.ts +3 -2
- package/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.ts +1 -1
- package/dist/types/components/gov-button/{default → button}/gov-button.d.ts +1 -1
- package/dist/types/components/gov-card/gov-card.d.ts +1 -1
- package/dist/types/components/{gov-badge → gov-chip}/constants.d.ts +1 -1
- package/dist/types/components/{gov-badge/gov-badge.d.ts → gov-chip/gov-chip.d.ts} +34 -7
- package/dist/types/components/gov-form/checkbox/constants.d.ts +1 -0
- package/dist/types/components/gov-form/checkbox/gov-form-checkbox.d.ts +1 -1
- package/dist/types/components/gov-form/group/gov-form-group.d.ts +2 -1
- package/dist/types/components/gov-form/password-power/gov-form-password-power.d.ts +2 -2
- package/dist/types/components/gov-form/radio/constants.d.ts +1 -0
- package/dist/types/components/gov-form/radio/gov-form-radio.d.ts +1 -1
- package/dist/types/components/gov-form/select/gov-form-select.d.ts +6 -1
- package/dist/types/components/gov-form/select/gov-form-select.types.d.ts +5 -0
- package/dist/types/components/gov-form/switch/gov-form-switch.d.ts +1 -1
- package/dist/types/components/gov-icon/gov-icon.d.ts +2 -3
- package/dist/types/components/gov-infobar/{default/constants.d.ts → constants.d.ts} +3 -2
- package/dist/types/components/gov-infobar/{default/gov-infobar.d.ts → gov-infobar.d.ts} +2 -2
- package/dist/types/components/gov-infobar/{default/gov-infobar.types.d.ts → gov-infobar.types.d.ts} +1 -1
- package/dist/types/components/gov-modal/gov-modal.d.ts +4 -0
- package/dist/types/components/gov-side-nav/constants.d.ts +1 -1
- package/dist/types/components/gov-side-nav/gov-side-nav-item.d.ts +1 -1
- package/dist/types/components/gov-tabs/constants.d.ts +1 -1
- package/dist/types/components/gov-tabs/gov-tabs-item.d.ts +1 -1
- package/dist/types/components/gov-tabs/gov-tabs.d.ts +5 -6
- package/dist/types/components/gov-tag/constants.d.ts +3 -0
- package/dist/types/components/gov-tag/gov-tag.d.ts +22 -0
- package/dist/types/components/gov-tile/gov-tile.d.ts +1 -1
- package/dist/types/components/gov-wizard/gov-wizard-item.d.ts +1 -1
- package/dist/types/components.d.ts +224 -133
- package/dist/types/helpers/Dom/template.types.d.ts +1 -0
- package/dist/types/pages/Chip.d.ts +3 -0
- package/dist/types/pages/Tag.d.ts +3 -0
- package/package.json +3 -3
- package/dist/cjs/constants-23b7a283.js.map +0 -1
- package/dist/cjs/form-f68d13c6.js.map +0 -1
- package/dist/cjs/gov-badge.cjs.entry.js +0 -84
- package/dist/cjs/gov-badge.cjs.entry.js.map +0 -1
- package/dist/cjs/template-e1c4ff78.js.map +0 -1
- package/dist/collection/components/gov-badge/constants.js.map +0 -1
- package/dist/collection/components/gov-badge/gov-badge.css +0 -1267
- package/dist/collection/components/gov-badge/gov-badge.js.map +0 -1
- package/dist/collection/components/gov-button/default/gov-button.js.map +0 -1
- package/dist/collection/components/gov-button/default/gov-button.types.js.map +0 -1
- package/dist/collection/components/gov-infobar/default/constants.js.map +0 -1
- package/dist/collection/components/gov-infobar/default/gov-infobar.js.map +0 -1
- package/dist/collection/components/gov-infobar/default/gov-infobar.types.js.map +0 -1
- package/dist/collection/pages/Badge.js.map +0 -1
- package/dist/components/gov-badge.js +0 -2
- package/dist/components/p-17c1ffc1.js +0 -2
- package/dist/components/p-17c1ffc1.js.map +0 -1
- package/dist/components/p-36be8f6e.js +0 -2
- package/dist/components/p-36be8f6e.js.map +0 -1
- package/dist/components/p-3f37ddb6.js +0 -2
- package/dist/components/p-3f37ddb6.js.map +0 -1
- package/dist/components/p-80e30702.js +0 -2
- package/dist/components/p-80e30702.js.map +0 -1
- package/dist/components/p-8d44ca3c.js +0 -2
- package/dist/components/p-8d44ca3c.js.map +0 -1
- package/dist/components/p-94542a50.js.map +0 -1
- package/dist/components/p-9ba6e755.js.map +0 -1
- package/dist/components/p-f72ecbef.js.map +0 -1
- package/dist/core/p-0553eb92.entry.js +0 -2
- package/dist/core/p-0553eb92.entry.js.map +0 -1
- package/dist/core/p-06699657.entry.js.map +0 -1
- package/dist/core/p-0c57e410.entry.js.map +0 -1
- package/dist/core/p-19a54ee9.entry.js.map +0 -1
- package/dist/core/p-1c40fdd5.entry.js.map +0 -1
- package/dist/core/p-32a4b7e3.entry.js.map +0 -1
- package/dist/core/p-34ed07f6.js +0 -2
- package/dist/core/p-34ed07f6.js.map +0 -1
- package/dist/core/p-35c1c12c.entry.js.map +0 -1
- package/dist/core/p-36be8f6e.js +0 -2
- package/dist/core/p-36be8f6e.js.map +0 -1
- package/dist/core/p-3bacd021.js.map +0 -1
- package/dist/core/p-3f37ddb6.js +0 -2
- package/dist/core/p-3f37ddb6.js.map +0 -1
- package/dist/core/p-49926f53.entry.js +0 -2
- package/dist/core/p-49926f53.entry.js.map +0 -1
- package/dist/core/p-5316e768.entry.js +0 -2
- package/dist/core/p-5cc3e768.entry.js +0 -2
- package/dist/core/p-5cc3e768.entry.js.map +0 -1
- package/dist/core/p-74ce7780.entry.js.map +0 -1
- package/dist/core/p-80e30702.js +0 -2
- package/dist/core/p-80e30702.js.map +0 -1
- package/dist/core/p-9633e7b5.entry.js.map +0 -1
- package/dist/core/p-acd6a9f4.entry.js.map +0 -1
- package/dist/core/p-afa12399.entry.js.map +0 -1
- package/dist/core/p-bc6f1479.entry.js.map +0 -1
- package/dist/core/p-bcf71ab5.entry.js +0 -2
- package/dist/core/p-bcf71ab5.entry.js.map +0 -1
- package/dist/core/p-c4c9ff83.entry.js +0 -2
- package/dist/core/p-c4c9ff83.entry.js.map +0 -1
- package/dist/core/p-c61444f7.entry.js +0 -2
- package/dist/core/p-c61444f7.entry.js.map +0 -1
- package/dist/core/p-d84b290e.entry.js +0 -2
- package/dist/core/p-d84b290e.entry.js.map +0 -1
- package/dist/core/p-da762184.entry.js +0 -2
- package/dist/core/p-da762184.entry.js.map +0 -1
- package/dist/core/p-f62efc34.entry.js.map +0 -1
- package/dist/core/p-fab698a7.entry.js +0 -2
- package/dist/core/p-fab698a7.entry.js.map +0 -1
- package/dist/esm/constants-24dad929.js.map +0 -1
- package/dist/esm/constants-ba92640d.js.map +0 -1
- package/dist/esm/form-2d9f68d9.js.map +0 -1
- package/dist/esm/gov-badge.entry.js +0 -80
- package/dist/esm/gov-badge.entry.js.map +0 -1
- package/dist/esm/template-10332292.js.map +0 -1
- package/dist/types/pages/Badge.d.ts +0 -3
- /package/dist/collection/components/gov-button/{default → button}/constants.js +0 -0
- /package/dist/collection/components/gov-button/{default → button}/gov-button.types.js +0 -0
- /package/dist/collection/components/gov-infobar/{default/gov-infobar.types.js → gov-infobar.types.js} +0 -0
- /package/dist/components/{gov-badge.js.map → gov-chip.js.map} +0 -0
- /package/dist/components/{p-1b4f2520.js.map → p-25b64ce2.js.map} +0 -0
- /package/dist/components/{p-3e8a9e92.js.map → p-6b256c8e.js.map} +0 -0
- /package/dist/components/{p-8da17139.js.map → p-b60b159d.js.map} +0 -0
- /package/dist/components/{p-b3cb7945.js.map → p-dde10734.js.map} +0 -0
- /package/dist/components/{p-bc5d5903.js.map → p-ee3a01c0.js.map} +0 -0
- /package/dist/core/{p-7702c8c2.entry.js.map → p-046613ca.entry.js.map} +0 -0
- /package/dist/core/{p-1c62f175.entry.js.map → p-1e41751e.entry.js.map} +0 -0
- /package/dist/core/{p-e5227e40.entry.js.map → p-21a02f11.entry.js.map} +0 -0
- /package/dist/core/{p-6f43bd00.entry.js.map → p-28d98a7d.entry.js.map} +0 -0
- /package/dist/core/{p-e2d6efaf.entry.js.map → p-2c5b8f32.entry.js.map} +0 -0
- /package/dist/core/{p-1da9f871.entry.js.map → p-3191317e.entry.js.map} +0 -0
- /package/dist/core/{p-7372b066.entry.js.map → p-34613499.entry.js.map} +0 -0
- /package/dist/core/{p-88010439.entry.js.map → p-3d11d9a0.entry.js.map} +0 -0
- /package/dist/core/{p-7fa1290e.entry.js.map → p-409f054b.entry.js.map} +0 -0
- /package/dist/core/{p-2bb9f781.entry.js.map → p-679625c1.entry.js.map} +0 -0
- /package/dist/core/{p-19b897c0.entry.js.map → p-7632b949.entry.js.map} +0 -0
- /package/dist/core/{p-80f5140b.entry.js.map → p-7b01e961.entry.js.map} +0 -0
- /package/dist/core/{p-93897e60.entry.js.map → p-7c38556b.entry.js.map} +0 -0
- /package/dist/core/{p-7e8d2066.entry.js.map → p-7e11320f.entry.js.map} +0 -0
- /package/dist/core/{p-c81d62db.entry.js.map → p-80ebaaf5.entry.js.map} +0 -0
- /package/dist/core/{p-93042b25.entry.js.map → p-83512243.entry.js.map} +0 -0
- /package/dist/core/{p-739dd451.entry.js.map → p-84e61610.entry.js.map} +0 -0
- /package/dist/core/{p-998c3336.entry.js.map → p-87a91e77.entry.js.map} +0 -0
- /package/dist/core/{p-4452c278.entry.js.map → p-8a931ff2.entry.js.map} +0 -0
- /package/dist/core/{p-041d30b1.entry.js.map → p-8e5599d1.entry.js.map} +0 -0
- /package/dist/core/{p-e1780dba.entry.js.map → p-96354948.entry.js.map} +0 -0
- /package/dist/core/{p-2fe9d3ea.entry.js.map → p-a8b5ac68.entry.js.map} +0 -0
- /package/dist/core/{p-228da18e.entry.js.map → p-af42ea63.entry.js.map} +0 -0
- /package/dist/core/{p-88a78167.entry.js.map → p-c13ad31c.entry.js.map} +0 -0
- /package/dist/core/{p-28f39f69.entry.js.map → p-d6e6d683.entry.js.map} +0 -0
- /package/dist/core/{p-a7719b55.entry.js.map → p-e4ae862e.entry.js.map} +0 -0
- /package/dist/core/{p-89921159.entry.js.map → p-f069df4a.entry.js.map} +0 -0
- /package/dist/core/{p-0eb11cfc.entry.js.map → p-ff061e6b.entry.js.map} +0 -0
- /package/dist/types/components/gov-button/{default → button}/constants.d.ts +0 -0
- /package/dist/types/components/gov-button/{default → button}/gov-button.types.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gov-form-control.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/control/gov-form-control.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAA;AAEvD,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,EAAE,gBAAgB,EAAwB,MAAM,aAAa,CAAA;AAMpE,MAAM,OAAO,cAAc;EAM1B;;;mBAkBoC,KAAK;oBAKJ,KAAK;mBAKN,KAAK;oBAKJ,KAAK;gBAIK,GAAG;IApCjD,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACxB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAA;GAC3C;EAmCD,kBAAkB;IACjB,IAAI,CAAC,cAAc,EAAE,CAAA;IACrB,IAAI,CAAC,iBAAiB,EAAE,CAAA;IACxB,IAAI,CAAC,mBAAmB,EAAE,CAAA;IAC1B,IAAI,CAAC,6BAA6B,EAAE,CAAA;EACrC,CAAC;EAED,oBAAoB;;IACnB,MAAA,IAAI,CAAC,QAAQ,0CAAE,UAAU,EAAE,CAAA;EAC5B,CAAC;EAEO,cAA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I,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC;MAClE,EAAC,GAAG,IAAC,KAAK,EAAE,gBAAgB,CAAC,MAAM;QACjC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,YAAM,IAAI,EAAC,KAAK,GAAQ;QAClD,eAAa;QACZ,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"gov-form-control.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/control/gov-form-control.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAA;AAEvD,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,EAAE,gBAAgB,EAAwB,MAAM,aAAa,CAAA;AAMpE,MAAM,OAAO,cAAc;EAM1B;;;mBAkBoC,KAAK;oBAKJ,KAAK;mBAKN,KAAK;oBAKJ,KAAK;gBAIK,GAAG;IApCjD,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACxB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAA;GAC3C;EAmCD,kBAAkB;IACjB,IAAI,CAAC,cAAc,EAAE,CAAA;IACrB,IAAI,CAAC,iBAAiB,EAAE,CAAA;IACxB,IAAI,CAAC,mBAAmB,EAAE,CAAA;IAC1B,IAAI,CAAC,6BAA6B,EAAE,CAAA;EACrC,CAAC;EAED,oBAAoB;;IACnB,MAAA,IA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,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC;MAClE,EAAC,GAAG,IAAC,KAAK,EAAE,gBAAgB,CAAC,MAAM;QACjC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,YAAM,IAAI,EAAC,KAAK,GAAQ;QAClD,eAAa;QACZ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,IAAI,CAC/D,WAAK,KAAK,EAAE,gBAAgB,CAAC,MAAM;UAClC,YAAM,IAAI,EAAC,QAAQ,GAAG,CACjB,CACN,CACI,CACA,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Host, Prop } from \"@stencil/core\"\nimport { govForm } from \"../../../helpers/Dom/form\"\nimport { GovForm } from \"../../../helpers/Dom/form.types\"\nimport { govHost } from \"../../../helpers/Dom/template\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { createID, splitByWhitespace } from \"../../../utils/string.utils\"\nimport { FormControlClass, FormControlSizesType } from \"./constants\"\n\n@Component({\n\ttag: \"gov-form-control\",\n\tstyleUrl: \"gov-form-control.scss\",\n})\nexport class GovFormControl {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate readonly controlId: string\n\tprivate observer: MutationObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.controlId = createID(\"GovFormControl\")\n\t}\n\n\t@Element() host: HTMLGovFormControlElement\n\t/**\n\t * Defines the space between nested components.\n\t */\n\t@Prop() readonly gap?: FormControlSizesType\n\t/**\n\t * Form element identifier\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Indicates the entered value of child form element does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean = false\n\t/**\n\t/**\n\t * Indicates the form element is disabled\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\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 = false\n\t/**\n\t * Use control as a fieldset for better accessibility.\n\t * Note: Don't forget to set the legend attribute of the gov-form-label component\n\t */\n\t@Prop() readonly fieldset: boolean = false\n\t/**\n\t * Form element size.\n\t */\n\t@Prop() readonly size?: FormControlSizesType = \"m\"\n\n\tcomponentDidRender() {\n\t\tthis.passChildAttrs()\n\t\tthis.invalidChildAttrs()\n\t\tthis.syncControlMessages()\n\t\tthis.formElementDescriptionControl()\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tthis.observer?.disconnect()\n\t}\n\n\tprivate passChildAttrs() {\n\t\tconst formElements = [\n\t\t\t\"gov-form-select\",\n\t\t\t\"gov-form-input\",\n\t\t\t\"gov-form-switch\",\n\t\t\t\"gov-form-checkbox\",\n\t\t\t\"gov-form-radio\",\n\t\t\t\"gov-form-multi-select\",\n\t\t\t\"gov-form-file\",\n\t\t\t\"gov-form-search\",\n\t\t]\n\t\tthis.h.passChildAttr(formElements, \"success\", this.success)\n\n\t\tif (this.f.hasGroupChildren === false) {\n\t\t\tthis.h.passChildAttr([...formElements, \"gov-form-label\"], \"identifier\", this.identifier || this.controlId)\n\t\t}\n\t}\n\n\tprivate invalidChildAttrs() {\n\t\tconst formElements = [\n\t\t\t\"gov-form-select\",\n\t\t\t\"gov-form-input\",\n\t\t\t\"gov-form-switch\",\n\t\t\t\"gov-form-checkbox\",\n\t\t\t\"gov-form-radio\",\n\t\t\t\"gov-form-multi-select\",\n\t\t\t\"gov-form-file\",\n\t\t\t\"gov-form-search\",\n\t\t]\n\t\tthis.h.passChildAttr(formElements, \"invalid\", this.invalid)\n\n\t\tif (this.f.hasGroupChildren === false) {\n\t\t\tthis.h.passChildAttr([...formElements, \"gov-form-label\"], \"identifier\", this.identifier || this.controlId)\n\t\t}\n\t}\n\n\tprivate formElementDescriptionControl() {\n\t\tconst bottomSlot = this.host.querySelector(\".\" + FormControlClass.bottom)\n\t\tif (!bottomSlot) return\n\t\tthis.observer = new MutationObserver(\n\t\t\tfunction() {\n\t\t\t\tthis.syncControlMessages()\n\t\t\t}.bind(this),\n\t\t)\n\n\t\tthis.observer.observe(bottomSlot, { childList: true })\n\t}\n\n\tprivate syncControlMessages() {\n\t\tPromise.all(this.f.messageElements.map((message: HTMLGovFormMessageElement) => message.identifier())).then((ids: string[]) => {\n\t\t\tthis.f.mainElementsInControl.forEach((element: Element) => {\n\t\t\t\tconst currentValue = splitByWhitespace(element.getAttribute(\"wcag-described-by\"))\n\t\t\t\telement.removeAttribute(\"wcag-described-by\")\n\t\t\t\tif (Array.isArray(currentValue)) {\n\t\t\t\t\tcurrentValue.forEach(id => (id.indexOf(\"GovFormMessage\") === -1 ? ids.push(id) : null))\n\t\t\t\t}\n\t\t\t\tif (ids.length) {\n\t\t\t\t\telement.setAttribute(\"wcag-described-by\", ids.join(\" \"))\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\t}\n\n\trender() {\n\t\tconst Tag = this.fieldset ? \"fieldset\" : \"div\"\n\t\treturn (\n\t\t\t<Host size={this.size} class={this.h.classes(FormControlClass.root)}>\n\t\t\t\t<Tag class={FormControlClass.holder}>\n\t\t\t\t\t{this.h.hasSlot(\"top\") && <slot name=\"top\"></slot>}\n\t\t\t\t\t<slot></slot>\n\t\t\t\t\t{(this.h.hasSlot(\"bottom\") && !this.h.isSlotEmpty(\"bottom\")) && (\n\t\t\t\t\t\t<div class={FormControlClass.bottom}>\n\t\t\t\t\t\t\t<slot name=\"bottom\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
/* stylelint-disable order/order */
|
|
40
40
|
/* stylelint-enable order/order */
|
|
41
41
|
/**
|
|
42
|
-
* Generates CSS3 var with
|
|
42
|
+
* Generates CSS3 var with button value
|
|
43
43
|
*/
|
|
44
44
|
/*
|
|
45
45
|
- Variables - General
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
- Variables - Backdrop
|
|
71
71
|
*/
|
|
72
72
|
/*
|
|
73
|
-
- Variables - Buttons (&&
|
|
73
|
+
- Variables - Buttons (&& Chips)
|
|
74
74
|
*/
|
|
75
75
|
/*
|
|
76
76
|
- Variables - Breadcrumbs
|
|
@@ -190,6 +190,9 @@
|
|
|
190
190
|
/*
|
|
191
191
|
- Variables - Layout
|
|
192
192
|
*/
|
|
193
|
+
/*
|
|
194
|
+
- Variables - Tag
|
|
195
|
+
*/
|
|
193
196
|
.gov-spin-animation,
|
|
194
197
|
.gov-pseudo-spin-animation::before {
|
|
195
198
|
animation: spin 4s linear infinite;
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
/* stylelint-disable order/order */
|
|
40
40
|
/* stylelint-enable order/order */
|
|
41
41
|
/**
|
|
42
|
-
* Generates CSS3 var with
|
|
42
|
+
* Generates CSS3 var with button value
|
|
43
43
|
*/
|
|
44
44
|
/*
|
|
45
45
|
- Variables - General
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
- Variables - Backdrop
|
|
71
71
|
*/
|
|
72
72
|
/*
|
|
73
|
-
- Variables - Buttons (&&
|
|
73
|
+
- Variables - Buttons (&& Chips)
|
|
74
74
|
*/
|
|
75
75
|
/*
|
|
76
76
|
- Variables - Breadcrumbs
|
|
@@ -190,6 +190,9 @@
|
|
|
190
190
|
/*
|
|
191
191
|
- Variables - Layout
|
|
192
192
|
*/
|
|
193
|
+
/*
|
|
194
|
+
- Variables - Tag
|
|
195
|
+
*/
|
|
193
196
|
.gov-spin-animation,
|
|
194
197
|
.gov-pseudo-spin-animation::before {
|
|
195
198
|
animation: spin 4s linear infinite;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { FormGroupClass, FormGroupSizes } from "./constants";
|
|
2
|
+
import { FormGroupClass, FormGroupOrientation, FormGroupSizes } from "./constants";
|
|
3
3
|
import { govHost } from "../../../helpers/Dom/template";
|
|
4
4
|
import { validateProp } from "../../../helpers/Validate/props";
|
|
5
5
|
export class GovFormGroup {
|
|
@@ -9,10 +9,18 @@ export class GovFormGroup {
|
|
|
9
9
|
this.h = govHost(this.host);
|
|
10
10
|
}
|
|
11
11
|
validateGap(newValue) {
|
|
12
|
-
|
|
12
|
+
if (newValue) {
|
|
13
|
+
validateProp(FormGroupSizes, newValue, FormGroupClass.root);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
validateOrientation(newValue) {
|
|
17
|
+
if (newValue) {
|
|
18
|
+
validateProp(FormGroupOrientation, newValue, FormGroupClass.root);
|
|
19
|
+
}
|
|
13
20
|
}
|
|
14
21
|
componentWillLoad() {
|
|
15
22
|
this.validateGap(this.gap);
|
|
23
|
+
this.validateOrientation(this.orientation);
|
|
16
24
|
}
|
|
17
25
|
render() {
|
|
18
26
|
return (h(Host, { gap: this.gap, class: this.h.classes(FormGroupClass.root) }, h("slot", null)));
|
|
@@ -85,6 +93,9 @@ export class GovFormGroup {
|
|
|
85
93
|
return [{
|
|
86
94
|
"propName": "gap",
|
|
87
95
|
"methodName": "validateGap"
|
|
96
|
+
}, {
|
|
97
|
+
"propName": "orientation",
|
|
98
|
+
"methodName": "validateOrientation"
|
|
88
99
|
}];
|
|
89
100
|
}
|
|
90
101
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gov-form-group.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/group/gov-form-group.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"gov-form-group.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/group/gov-form-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,MAAM,eAAe,CAAA;AACtE,OAAO,EACL,cAAc,EACd,oBAAoB,EAEpB,cAAc,EAEf,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAC,OAAO,EAAC,MAAM,+BAA+B,CAAA;AACrD,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAA;AAM5D,MAAM,OAAO,YAAY;EAGvB;eAQ4C,SAAS;uBAIK,UAAU;IAXlE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC5B;EAaD,WAAW,CAAC,QAAgB;IAC1B,IAAI,QAAQ,EAAE;MACZ,YAAY,CAAC,cAAc,EAAE,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;KAC5D;EACH,CAAC;EAGD,mBAAmB,CAAC,QAAgB;IAClC,IAAI,QAAQ,EAAE;MACZ,YAAY,CAAC,oBAAoB,EAAE,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;KAClE;EACH,CAAC;EAED,iBAAiB;IACf,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAC1B,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;EAC5C,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,IAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC;MAC7D,eAAa,CACR,CACR,CAAA;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, h, Host, Prop, Watch} from \"@stencil/core\"\nimport {\n FormGroupClass,\n FormGroupOrientation,\n FormGroupOrientationType,\n FormGroupSizes,\n FormGroupSizesType\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\n\n@Component({\n tag: \"gov-form-group\",\n styleUrl: \"gov-form-group.scss\",\n})\nexport class GovFormGroup {\n private readonly h: GovHost\n\n constructor() {\n this.h = govHost(this.host)\n }\n\n @Element() host: HTMLGovFormGroupElement\n /**\n * Gap's size.\n */\n @Prop() readonly gap?: FormGroupSizesType = undefined\n /**\n * Elements orientation\n */\n @Prop() readonly orientation?: FormGroupOrientationType = 'vertical'\n\n @Watch(\"gap\")\n validateGap(newValue: string): void {\n if (newValue) {\n validateProp(FormGroupSizes, newValue, FormGroupClass.root)\n }\n }\n\n @Watch(\"orientation\")\n validateOrientation(newValue: string): void {\n if (newValue) {\n validateProp(FormGroupOrientation, newValue, FormGroupClass.root)\n }\n }\n\n componentWillLoad(): void {\n this.validateGap(this.gap)\n this.validateOrientation(this.orientation)\n }\n\n render() {\n return (\n <Host gap={this.gap} class={this.h.classes(FormGroupClass.root)}>\n <slot></slot>\n </Host>\n )\n }\n}\n"]}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
/* stylelint-disable order/order */
|
|
40
40
|
/* stylelint-enable order/order */
|
|
41
41
|
/**
|
|
42
|
-
* Generates CSS3 var with
|
|
42
|
+
* Generates CSS3 var with button value
|
|
43
43
|
*/
|
|
44
44
|
/*
|
|
45
45
|
- Variables - General
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
- Variables - Backdrop
|
|
71
71
|
*/
|
|
72
72
|
/*
|
|
73
|
-
- Variables - Buttons (&&
|
|
73
|
+
- Variables - Buttons (&& Chips)
|
|
74
74
|
*/
|
|
75
75
|
/*
|
|
76
76
|
- Variables - Breadcrumbs
|
|
@@ -190,6 +190,9 @@
|
|
|
190
190
|
/*
|
|
191
191
|
- Variables - Layout
|
|
192
192
|
*/
|
|
193
|
+
/*
|
|
194
|
+
- Variables - Tag
|
|
195
|
+
*/
|
|
193
196
|
.gov-spin-animation,
|
|
194
197
|
.gov-pseudo-spin-animation::before {
|
|
195
198
|
animation: spin 4s linear infinite;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gov-form-input.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/input/gov-form-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC5G,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AAE9G,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EACN,cAAc,EACd,cAAc,EAEd,iBAAiB,EAGjB,IAAI,GACJ,MAAM,aAAa,CAAA;AAIpB,IAAK,IAGJ;AAHD,WAAK,IAAI;EACR,uBAAe,CAAA;EACf,6BAAqB,CAAA;AACtB,CAAC,EAHI,IAAI,KAAJ,IAAI,QAGR;AAMD,MAAM,OAAO,YAAY;EAMxB;;;mBAkBkD,WAAW;;gBAQh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CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;EAChG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","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, toOnOffAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\nimport { validateWcagLabelFor, validateWcagRef } from \"../../../helpers/Validate/wcag\"\nimport { createID } from \"../../../utils/string.utils\"\nimport { delay } from \"../../../utils/utils\"\nimport {\n\tFormInputClass,\n\tFormInputSizes,\n\tFormInputSizesType,\n\tFormInputVariants,\n\tFormInputVariantType,\n\tInputType,\n\tType,\n} from \"./constants\"\nimport { FormInputEvent } from \"./gov-form-input.types\"\nimport { Nullable } from \"../../../types/interfaces\"\n\nenum Tags {\n\tINPUT = \"input\",\n\tTEXTAREA = \"textarea\",\n}\n\n@Component({\n\ttag: \"gov-form-input\",\n\tstyleUrl: \"gov-form-input.scss\",\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.inputId = createID(\"GovInput\")\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({ reflect: true, mutable: true }) value: string\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop() readonly variant?: FormInputVariantType = \"secondary\"\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 * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Generates a texarea for the possibility of multiple lines\n\t */\n\t@Prop() readonly multiline: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n\t */\n\t@Prop() readonly rows: number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols\n\t */\n\t@Prop() readonly cols: number\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the input 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 * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Minimum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete\n\t */\n\t@Prop() readonly autocomplete: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect\n\t */\n\t@Prop() readonly autocorrect: boolean\n\t/**\n\t * Defineds the visual style of input\n\t */\n\t@Prop() readonly type?: Type\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n\t */\n\t@Prop() readonly inputType: InputType = \"text\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role\n\t */\n\t@Prop() readonly role: Nullable<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 * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-described-by\" }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-owns\" }) readonly wcagOwns: string\n\t/**\n\t * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value.\n\t */\n\t@Prop({ attribute: \"wcag-autocomplete\" }) readonly wcagAutocomplete: string\n\t/**\n\t * Attribute is set on an element to indicate if a control is expanded or collapsed\n\t */\n\t@Prop({ attribute: \"wcag-expanded\" }) readonly wcagExpanded: boolean\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: \"gov-input\" }) govInput: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: \"gov-keyup\" }) govKeyUp: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: \"gov-keydown\" }) govKeyDown: EventEmitter<FormInputEvent>\n\t@State() focused: boolean\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormInputVariants, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormInputSizes, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"type\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", this.multiline ? Tags.TEXTAREA : Tags.INPUT)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t\tthis.passControlAttrs()\n\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT\n\n\t\treturn (\n\t\t\t<Host class={FormInputClass.root} size={this.size} variant={this.variant} type={this.type}>\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{this.h.hasSlot(\"left-icon\") && <slot name=\"left-icon\" />}\n\n\t\t\t\t\t{this.h.hasSlot(\"right-icon\") && !(this.success || this.invalid) && <slot name=\"right-icon\" />}\n\n\t\t\t\t\t{this.success && !this.multiline &&\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && !this.multiline &&\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttype={this.inputType}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tid={this.identifier || this.inputId}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\tonKeyUp={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\t\tonKeyDown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\treadonly={toBoolAttrIfDefined(this.readonly)}\n\t\t\t\t\t\tautocomplete={toOnOffAttrIfDefined(this.autocomplete)}\n\t\t\t\t\t\tautocorrect={toOnOffAttrIfDefined(this.autocorrect)}\n\t\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\trows={this.rows}\n\t\t\t\t\t\tcols={this.cols}\n\t\t\t\t\t\trole={this.role}\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\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\t\taria-autocomplete={this.wcagAutocomplete}\n\t\t\t\t\t/>\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\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormInputClass.root,\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.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyUpHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyUp.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyDownHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyDown.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\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.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Clears input value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = \"\"\n\t\tthis.inputRef.value = \"\"\n\t}\n\n\t/**\n\t * Returns an instance of the native html input element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"wcag-described-by\", FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, \"wcag-owns\", FormInputClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.inputId, this.wcagLabelledBy, FormInputClass.root)\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"gov-form-input.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/input/gov-form-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC5G,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AAE9G,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EACN,cAAc,EACd,cAAc,EAEd,iBAAiB,EAGjB,IAAI,GACJ,MAAM,aAAa,CAAA;AAIpB,IAAK,IAGJ;AAHD,WAAK,IAAI;EACR,uBAAe,CAAA;EACf,6BAAqB,CAAA;AACtB,CAAC,EAHI,IAAI,KAAJ,IAAI,QAGR;AAMD,MAAM,OAAO,YAAY;EAMxB;;;mBAkBkD,WAAW;;gBAQhB,GAAG;;;;;oBAqBX,KAAK;oBAKL,KAAK;;;;;;;;;;qBAyCyB,MAAM;;;;;;;;;IA5FxE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","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, toOnOffAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\nimport { validateWcagLabelFor, validateWcagRef } from \"../../../helpers/Validate/wcag\"\nimport { createID } from \"../../../utils/string.utils\"\nimport { delay } from \"../../../utils/utils\"\nimport {\n\tFormInputClass,\n\tFormInputSizes,\n\tFormInputSizesType,\n\tFormInputVariants,\n\tFormInputVariantType,\n\tInputType,\n\tType,\n} from \"./constants\"\nimport { FormInputEvent } from \"./gov-form-input.types\"\nimport { Nullable } from \"../../../types/interfaces\"\n\nenum Tags {\n\tINPUT = \"input\",\n\tTEXTAREA = \"textarea\",\n}\n\n@Component({\n\ttag: \"gov-form-input\",\n\tstyleUrl: \"gov-form-input.scss\",\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.inputId = createID(\"GovInput\")\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({ reflect: true, mutable: true }) value: string\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop() readonly variant?: FormInputVariantType = \"secondary\"\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 * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Generates a texarea for the possibility of multiple lines\n\t */\n\t@Prop() readonly multiline: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n\t */\n\t@Prop() readonly rows: number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols\n\t */\n\t@Prop() readonly cols: number\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the input 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 * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Minimum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete\n\t */\n\t@Prop() readonly autocomplete: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect\n\t */\n\t@Prop() readonly autocorrect: boolean\n\t/**\n\t * Defineds the visual style of input\n\t */\n\t@Prop() readonly type?: Type\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n\t */\n\t@Prop({ attribute: \"input-type\" }) readonly inputType: InputType = \"text\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role\n\t */\n\t@Prop() readonly role: Nullable<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 * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-described-by\" }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-owns\" }) readonly wcagOwns: string\n\t/**\n\t * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value.\n\t */\n\t@Prop({ attribute: \"wcag-autocomplete\" }) readonly wcagAutocomplete: string\n\t/**\n\t * Attribute is set on an element to indicate if a control is expanded or collapsed\n\t */\n\t@Prop({ attribute: \"wcag-expanded\" }) readonly wcagExpanded: boolean\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: \"gov-input\" }) govInput: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: \"gov-keyup\" }) govKeyUp: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: \"gov-keydown\" }) govKeyDown: EventEmitter<FormInputEvent>\n\t@State() focused: boolean\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormInputVariants, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormInputSizes, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"type\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", this.multiline ? Tags.TEXTAREA : Tags.INPUT)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t\tthis.passControlAttrs()\n\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT\n\n\t\treturn (\n\t\t\t<Host class={FormInputClass.root} size={this.size} variant={this.variant} type={this.type}>\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{this.h.hasSlot(\"left-icon\") && <slot name=\"left-icon\" />}\n\n\t\t\t\t\t{this.h.hasSlot(\"right-icon\") && !(this.success || this.invalid) && <slot name=\"right-icon\" />}\n\n\t\t\t\t\t{this.success && !this.multiline &&\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && !this.multiline &&\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttype={this.inputType}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tid={this.identifier || this.inputId}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\tonKeyUp={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\t\tonKeyDown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\treadonly={toBoolAttrIfDefined(this.readonly)}\n\t\t\t\t\t\tautocomplete={toOnOffAttrIfDefined(this.autocomplete)}\n\t\t\t\t\t\tautocorrect={toOnOffAttrIfDefined(this.autocorrect)}\n\t\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\trows={this.rows}\n\t\t\t\t\t\tcols={this.cols}\n\t\t\t\t\t\trole={this.role}\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\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\t\taria-autocomplete={this.wcagAutocomplete}\n\t\t\t\t\t/>\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\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormInputClass.root,\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.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyUpHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyUp.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyDownHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyDown.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\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.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Clears input value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = \"\"\n\t\tthis.inputRef.value = \"\"\n\t}\n\n\t/**\n\t * Returns an instance of the native html input element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"wcag-described-by\", FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, \"wcag-owns\", FormInputClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.inputId, this.wcagLabelledBy, FormInputClass.root)\n\t}\n}\n"]}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
/* stylelint-disable order/order */
|
|
40
40
|
/* stylelint-enable order/order */
|
|
41
41
|
/**
|
|
42
|
-
* Generates CSS3 var with
|
|
42
|
+
* Generates CSS3 var with button value
|
|
43
43
|
*/
|
|
44
44
|
/*
|
|
45
45
|
- Variables - General
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
- Variables - Backdrop
|
|
71
71
|
*/
|
|
72
72
|
/*
|
|
73
|
-
- Variables - Buttons (&&
|
|
73
|
+
- Variables - Buttons (&& Chips)
|
|
74
74
|
*/
|
|
75
75
|
/*
|
|
76
76
|
- Variables - Breadcrumbs
|
|
@@ -190,6 +190,9 @@
|
|
|
190
190
|
/*
|
|
191
191
|
- Variables - Layout
|
|
192
192
|
*/
|
|
193
|
+
/*
|
|
194
|
+
- Variables - Tag
|
|
195
|
+
*/
|
|
193
196
|
.gov-spin-animation,
|
|
194
197
|
.gov-pseudo-spin-animation::before {
|
|
195
198
|
animation: spin 4s linear infinite;
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
/* stylelint-disable order/order */
|
|
40
40
|
/* stylelint-enable order/order */
|
|
41
41
|
/**
|
|
42
|
-
* Generates CSS3 var with
|
|
42
|
+
* Generates CSS3 var with button value
|
|
43
43
|
*/
|
|
44
44
|
/*
|
|
45
45
|
- Variables - General
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
- Variables - Backdrop
|
|
71
71
|
*/
|
|
72
72
|
/*
|
|
73
|
-
- Variables - Buttons (&&
|
|
73
|
+
- Variables - Buttons (&& Chips)
|
|
74
74
|
*/
|
|
75
75
|
/*
|
|
76
76
|
- Variables - Breadcrumbs
|
|
@@ -190,6 +190,9 @@
|
|
|
190
190
|
/*
|
|
191
191
|
- Variables - Layout
|
|
192
192
|
*/
|
|
193
|
+
/*
|
|
194
|
+
- Variables - Tag
|
|
195
|
+
*/
|
|
193
196
|
.gov-spin-animation,
|
|
194
197
|
.gov-pseudo-spin-animation::before {
|
|
195
198
|
animation: spin 4s linear infinite;
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
/* stylelint-disable order/order */
|
|
54
54
|
/* stylelint-enable order/order */
|
|
55
55
|
/**
|
|
56
|
-
* Generates CSS3 var with
|
|
56
|
+
* Generates CSS3 var with button value
|
|
57
57
|
*/
|
|
58
58
|
/*
|
|
59
59
|
- Variables - General
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
- Variables - Backdrop
|
|
85
85
|
*/
|
|
86
86
|
/*
|
|
87
|
-
- Variables - Buttons (&&
|
|
87
|
+
- Variables - Buttons (&& Chips)
|
|
88
88
|
*/
|
|
89
89
|
/*
|
|
90
90
|
- Variables - Breadcrumbs
|
|
@@ -204,6 +204,9 @@
|
|
|
204
204
|
/*
|
|
205
205
|
- Variables - Layout
|
|
206
206
|
*/
|
|
207
|
+
/*
|
|
208
|
+
- Variables - Tag
|
|
209
|
+
*/
|
|
207
210
|
.gov-spin-animation,
|
|
208
211
|
.gov-pseudo-spin-animation::before {
|
|
209
212
|
animation: spin 4s linear infinite;
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
/* stylelint-disable order/order */
|
|
40
40
|
/* stylelint-enable order/order */
|
|
41
41
|
/**
|
|
42
|
-
* Generates CSS3 var with
|
|
42
|
+
* Generates CSS3 var with button value
|
|
43
43
|
*/
|
|
44
44
|
/*
|
|
45
45
|
- Variables - General
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
- Variables - Backdrop
|
|
71
71
|
*/
|
|
72
72
|
/*
|
|
73
|
-
- Variables - Buttons (&&
|
|
73
|
+
- Variables - Buttons (&& Chips)
|
|
74
74
|
*/
|
|
75
75
|
/*
|
|
76
76
|
- Variables - Breadcrumbs
|
|
@@ -190,6 +190,9 @@
|
|
|
190
190
|
/*
|
|
191
191
|
- Variables - Layout
|
|
192
192
|
*/
|
|
193
|
+
/*
|
|
194
|
+
- Variables - Tag
|
|
195
|
+
*/
|
|
193
196
|
.gov-spin-animation,
|
|
194
197
|
.gov-pseudo-spin-animation::before {
|
|
195
198
|
animation: spin 4s linear infinite;
|
|
@@ -227,6 +230,7 @@
|
|
|
227
230
|
.gov-form-password-power {
|
|
228
231
|
display: flex;
|
|
229
232
|
align-items: center;
|
|
233
|
+
width: 100%;
|
|
230
234
|
gap: 1.5rem;
|
|
231
235
|
height: 1.5rem;
|
|
232
236
|
}
|
|
@@ -264,8 +268,8 @@
|
|
|
264
268
|
background-color: var(--gov-form-password-power-color-medium, var(--gov-color-warning-500));
|
|
265
269
|
}
|
|
266
270
|
.gov-form-password-power[power="3"] {
|
|
267
|
-
color: var(--gov-form-password-power-color-strong, var(--gov-color-success));
|
|
271
|
+
color: var(--gov-form-password-power-color-strong, var(--gov-color-success-500));
|
|
268
272
|
}
|
|
269
273
|
.gov-form-password-power[power="3"] .gov-form-password-power__bar span {
|
|
270
|
-
background-color: var(--gov-form-password-power-color-strong, var(--gov-color-success));
|
|
274
|
+
background-color: var(--gov-form-password-power-color-strong, var(--gov-color-success-500));
|
|
271
275
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gov-form-password-power.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/password-power/gov-form-password-power.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"gov-form-password-power.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/password-power/gov-form-password-power.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,eAAe,CAAA;AACtD,OAAO,EAAC,sBAAsB,EAAC,MAAM,aAAa,CAAA;AAMlD,MAAM,OAAO,oBAAoB;;;;EAMhC,MAAM;IACL,OAAO,CACN,EAAC,IAAI,IAAC,KAAK,EAAE,sBAAsB,CAAC,IAAI;MACtC,YAAM,KAAK,EAAE,sBAAsB,CAAC,GAAG;QACrC,eAAa;QACb,eAAa;QACb,eAAa,CACR;MACP,YAAM,KAAK,EAAE,sBAAsB,CAAC,IAAI;QACtC,eAAO,CACF,CACF,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import {Component, h, Host, Prop} from '@stencil/core'\nimport {FormPasswordPowerClass} from './constants'\n\n@Component({\n\ttag: 'gov-form-password-power',\n\tstyleUrl: 'gov-form-password-power.scss',\n})\nexport class GovFormPasswordPower {\n\t/**\n\t * Password power: 0 - none, 1 - weak, 2 - medium, 3 - strong\n\t */\n\t@Prop({reflect: true}) readonly power: number\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormPasswordPowerClass.root}>\n\t\t\t\t\t<span class={FormPasswordPowerClass.bar}>\n\t\t\t\t\t\t\t<span></span>\n\t\t\t\t\t\t\t<span></span>\n\t\t\t\t\t\t\t<span></span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class={FormPasswordPowerClass.text}>\n\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/radio/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAG3C,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAGpE,MAAM,CAAC,MAAM,cAAc,GAAG;EAC7B,IAAI,EAAE,gBAAgB;EACtB,MAAM,EAAE,wBAAwB;EAChC,KAAK,EAAE,uBAAuB;EAC9B,SAAS,EAAE,2BAA2B;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/radio/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAG3C,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAGpE,MAAM,CAAC,MAAM,cAAc,GAAG;EAC7B,IAAI,EAAE,gBAAgB;EACtB,MAAM,EAAE,wBAAwB;EAChC,KAAK,EAAE,uBAAuB;EAC9B,SAAS,EAAE,2BAA2B;EACtC,KAAK,EAAE,uBAAuB;CAC9B,CAAA","sourcesContent":["import { Sizes } from '../../../core/constants/sizes'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const FormRadioSizes = pick(Sizes, ['_XS', '_S', '_M', '_L'])\nexport type FormRadioSizesType = `${ValueOf<typeof FormRadioSizes>}`\n\nexport const FormRadioClass = {\n\troot: 'gov-form-radio',\n\tholder: 'gov-form-radio__holder',\n\tinput: 'gov-form-radio__input',\n\tindicator: 'gov-form-radio__indicator',\n\tlabel: 'gov-form-radio__label',\n}\n"]}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
/* stylelint-disable order/order */
|
|
40
40
|
/* stylelint-enable order/order */
|
|
41
41
|
/**
|
|
42
|
-
* Generates CSS3 var with
|
|
42
|
+
* Generates CSS3 var with button value
|
|
43
43
|
*/
|
|
44
44
|
/*
|
|
45
45
|
- Variables - General
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
- Variables - Backdrop
|
|
71
71
|
*/
|
|
72
72
|
/*
|
|
73
|
-
- Variables - Buttons (&&
|
|
73
|
+
- Variables - Buttons (&& Chips)
|
|
74
74
|
*/
|
|
75
75
|
/*
|
|
76
76
|
- Variables - Breadcrumbs
|
|
@@ -190,6 +190,9 @@
|
|
|
190
190
|
/*
|
|
191
191
|
- Variables - Layout
|
|
192
192
|
*/
|
|
193
|
+
/*
|
|
194
|
+
- Variables - Tag
|
|
195
|
+
*/
|
|
193
196
|
.gov-spin-animation,
|
|
194
197
|
.gov-pseudo-spin-animation::before {
|
|
195
198
|
animation: spin 4s linear infinite;
|
|
@@ -360,6 +363,9 @@
|
|
|
360
363
|
opacity: 0;
|
|
361
364
|
transition: 150ms linear opacity;
|
|
362
365
|
}
|
|
366
|
+
.gov-form-radio__label {
|
|
367
|
+
position: relative;
|
|
368
|
+
}
|
|
363
369
|
.gov-form-radio input:checked + span::after {
|
|
364
370
|
opacity: 1;
|
|
365
371
|
}
|
|
@@ -49,13 +49,13 @@ export class GovFormRadio {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
|
-
const
|
|
52
|
+
const wrapRadio = children => {
|
|
53
53
|
if (this.noLabel) {
|
|
54
|
-
return h("label",
|
|
54
|
+
return h("label", { class: FormRadioClass.label }, children);
|
|
55
55
|
}
|
|
56
56
|
return children;
|
|
57
57
|
};
|
|
58
|
-
return (h(Host, { class: FormRadioClass.root, checked: this.checked, size: this.size, invalid: toBoolAttrIfDefined(this.invalid) }, h("div", { class: FormRadioClass.holder },
|
|
58
|
+
return (h(Host, { class: FormRadioClass.root, checked: this.checked, size: this.size, invalid: toBoolAttrIfDefined(this.invalid) }, h("div", { class: FormRadioClass.holder }, wrapRadio(h(Fragment, null, h("input", { class: FormRadioClass.input, id: this.identifier || this.radioId, type: "radio", value: this.value, name: this.name, checked: this.checked, disabled: this.disabled, onClick: this.onClickHandler.bind(this), onChange: this.onChangeHandler.bind(this), onFocus: this.onFocusHandler.bind(this), onBlur: this.onBlurHandler.bind(this), ref: el => (this.inputRef = el), required: this.required, "aria-checked": this.checked, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-disabled": toBoolAttrIfDefined(this.disabled) }), h("span", null, h("slot", { name: "label" })))))));
|
|
59
59
|
}
|
|
60
60
|
onClickHandler(e) {
|
|
61
61
|
e.stopPropagation();
|
|
@@ -162,7 +162,7 @@ export class GovFormRadio {
|
|
|
162
162
|
"optional": false,
|
|
163
163
|
"docs": {
|
|
164
164
|
"tags": [],
|
|
165
|
-
"text": "Radio
|
|
165
|
+
"text": "Radio button state"
|
|
166
166
|
},
|
|
167
167
|
"attribute": "checked",
|
|
168
168
|
"reflect": true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gov-form-radio.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/radio/gov-form-radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrG,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAA;AAChF,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AACxF,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAG5C,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,QAAQ,MAAM,2BAA2B,CAAA;AAOhD,MAAM,OAAO,YAAY;EAOxB;;mBAe6D,KAAK;mBAIhB,KAAK;oBAKlB,KAAK;oBAKL,KAAK;;gBAQG,GAAG;;;;;IApC/C,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAA;IAEnC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,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,cAAc,CAAC,IAAI,CAAC,CAAA;IAC7E,oBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;EAChG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { createID } from \"../../../utils/string.utils\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\nimport { FormRadioClass, FormRadioSizes, FormRadioSizesType } from \"./constants\"\nimport { govHost, toBoolAttr, toBoolAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { validateWcagLabelFor, validateWcagRef } from \"../../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\nimport { delay } from \"../../../utils/utils\"\nimport { GovForm } from \"../../../helpers/Dom/form.types\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { govForm } from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport { FormRadioEvent } from \"./gov-form-radio.types\"\n\n@Component({\n\ttag: \"gov-form-radio\",\n\tstyleUrl: \"gov-form-radio.scss\",\n})\nexport class GovFormRadio {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\n\tprivate readonly radioId: string\n\n\tconstructor() {\n\t\tthis.radioId = createID(\"GovRadio\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormRadioElement\n\t/**\n\t * Value of radio\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({ attribute: \"no-label\" }) readonly noLabel: boolean = false\n\t/**\n\t * Radio default state\n\t */\n\t@Prop({ reflect: true, mutable: true }) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the radio component disabled.\n\t * This prevents users from being able to interact with the radio, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Name of the radio.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Radio's size.\n\t */\n\t@Prop() readonly size?: FormRadioSizesType = \"m\"\n\t/**\n\t * Custom radio identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-described-by\" }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when the radio has focus.\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio loses focus.\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio change value.\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<FormRadioEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormRadioSizes, newValue, FormRadioClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", \"radio\")\n\t}\n\n\n\tcomponentWillLoad() {\n\t\tthis.passControlAttrs()\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.radioId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst wrapCheckbox = children => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn <label>{children}</label>\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormRadioClass.root} checked={this.checked} size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t<div class={FormRadioClass.holder}>\n\t\t\t\t\t{wrapCheckbox(\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tclass={FormRadioClass.input}\n\t\t\t\t\t\t\t\tid={this.identifier || this.radioId}\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t<slot name=\"label\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</Fragment>,\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"wcag-described-by\", FormRadioClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormRadioClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.radioId, this.wcagLabelledBy, FormRadioClass.root)\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"gov-form-radio.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/radio/gov-form-radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrG,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAA;AAChF,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AACxF,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAG5C,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,QAAQ,MAAM,2BAA2B,CAAA;AAOhD,MAAM,OAAO,YAAY;EAOxB;;mBAe6D,KAAK;mBAIhB,KAAK;oBAKlB,KAAK;oBAKL,KAAK;;gBAQG,GAA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ACrB,CAAC;EAED;;KAEG;EAEH,KAAK,CAAC,YAAY;IACjB,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;IAC/E,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;IAC7E,oBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;EAChG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { createID } from \"../../../utils/string.utils\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\nimport { FormRadioClass, FormRadioSizes, FormRadioSizesType } from \"./constants\"\nimport { govHost, toBoolAttr, toBoolAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { validateWcagLabelFor, validateWcagRef } from \"../../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\nimport { delay } from \"../../../utils/utils\"\nimport { GovForm } from \"../../../helpers/Dom/form.types\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { govForm } from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport { FormRadioEvent } from \"./gov-form-radio.types\"\n\n@Component({\n\ttag: \"gov-form-radio\",\n\tstyleUrl: \"gov-form-radio.scss\",\n})\nexport class GovFormRadio {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\n\tprivate readonly radioId: string\n\n\tconstructor() {\n\t\tthis.radioId = createID(\"GovRadio\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormRadioElement\n\t/**\n\t * Value of radio\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({ attribute: \"no-label\" }) readonly noLabel: boolean = false\n\t/**\n\t * Radio button state\n\t */\n\t@Prop({ reflect: true, mutable: true }) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the radio component disabled.\n\t * This prevents users from being able to interact with the radio, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Name of the radio.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Radio's size.\n\t */\n\t@Prop() readonly size?: FormRadioSizesType = \"m\"\n\t/**\n\t * Custom radio identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-described-by\" }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when the radio has focus.\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio loses focus.\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio change value.\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<FormRadioEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormRadioSizes, newValue, FormRadioClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", \"radio\")\n\t}\n\n\n\tcomponentWillLoad() {\n\t\tthis.passControlAttrs()\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.radioId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst wrapRadio = children => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn <label class={FormRadioClass.label}>{children}</label>\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormRadioClass.root} checked={this.checked} size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t<div class={FormRadioClass.holder}>\n\t\t\t\t\t{wrapRadio(\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tclass={FormRadioClass.input}\n\t\t\t\t\t\t\t\tid={this.identifier || this.radioId}\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t<slot name=\"label\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</Fragment>,\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"wcag-described-by\", FormRadioClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormRadioClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.radioId, this.wcagLabelledBy, FormRadioClass.root)\n\t}\n}\n"]}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
/* stylelint-disable order/order */
|
|
40
40
|
/* stylelint-enable order/order */
|
|
41
41
|
/**
|
|
42
|
-
* Generates CSS3 var with
|
|
42
|
+
* Generates CSS3 var with button value
|
|
43
43
|
*/
|
|
44
44
|
/*
|
|
45
45
|
- Variables - General
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
- Variables - Backdrop
|
|
71
71
|
*/
|
|
72
72
|
/*
|
|
73
|
-
- Variables - Buttons (&&
|
|
73
|
+
- Variables - Buttons (&& Chips)
|
|
74
74
|
*/
|
|
75
75
|
/*
|
|
76
76
|
- Variables - Breadcrumbs
|
|
@@ -190,6 +190,9 @@
|
|
|
190
190
|
/*
|
|
191
191
|
- Variables - Layout
|
|
192
192
|
*/
|
|
193
|
+
/*
|
|
194
|
+
- Variables - Tag
|
|
195
|
+
*/
|
|
193
196
|
.gov-spin-animation,
|
|
194
197
|
.gov-pseudo-spin-animation::before {
|
|
195
198
|
animation: spin 4s linear infinite;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gov-form-search.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/search/gov-form-search.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,eAAe,EAAyB,MAAM,aAAa,CAAA;AAKpE,MAAM,OAAO,aAAa;;
|
|
1
|
+
{"version":3,"file":"gov-form-search.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/search/gov-form-search.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,eAAe,EAAyB,MAAM,aAAa,CAAA;AAKpE,MAAM,OAAO,aAAa;;mBAKwC,WAAW;;EAE5E,MAAM;IACL,OAAO,CACN,EAAC,IAAI,IAAC,KAAK,EAAE,eAAe,CAAC,IAAI;MAChC,YAAM,KAAK,EAAE,eAAe,CAAC,KAAK;QACjC,YAAM,IAAI,EAAC,OAAO,GAAG,CACf;MACP,YAAM,KAAK,EAAE,eAAe,CAAC,MAAM;QAClC,YAAM,IAAI,EAAC,QAAQ,GAAG,CAChB,CACD,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { FormSearchClass, FormSearchVariantType } from './constants'\n@Component({\n\ttag: 'gov-form-search',\n\tstyleUrl: 'gov-form-search.scss',\n})\nexport class GovFormSearch {\n\t@Element() host: HTMLGovFormSearchElement\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop({reflect: true}) readonly variant: FormSearchVariantType = 'secondary'\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSearchClass.root}>\n\t\t\t\t<span class={FormSearchClass.input}>\n\t\t\t\t\t<slot name=\"input\" />\n\t\t\t\t</span>\n\t\t\t\t<span class={FormSearchClass.button}>\n\t\t\t\t\t<slot name=\"button\" />\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
|