@gov-design-system-ce/components 0.0.61 → 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,9 +1,10 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { validateProp } from "../../helpers/Validate/props";
|
|
3
|
-
import { govHost } from "../../helpers/Dom/template";
|
|
4
|
-
import {
|
|
5
|
-
import { ButtonSizes, ButtonVariants } from "../gov-button/
|
|
6
|
-
|
|
3
|
+
import { govHost, toBoolAttr } from "../../helpers/Dom/template";
|
|
4
|
+
import { ChipClass, NativeType } from "./constants";
|
|
5
|
+
import { ButtonSizes, ButtonVariants } from "../gov-button/button/constants";
|
|
6
|
+
import { createID } from "../../utils/string.utils";
|
|
7
|
+
export class GovChip {
|
|
7
8
|
constructor() {
|
|
8
9
|
this.inverse = false;
|
|
9
10
|
this.disabled = false;
|
|
@@ -12,14 +13,19 @@ export class GovBadge {
|
|
|
12
13
|
this.size = ButtonSizes._M;
|
|
13
14
|
this.tag = "span";
|
|
14
15
|
this.variant = ButtonVariants.PRIMARY;
|
|
16
|
+
this.focusable = true;
|
|
17
|
+
this.identifier = undefined;
|
|
15
18
|
this.wcagLabel = undefined;
|
|
19
|
+
this.wcagControls = undefined;
|
|
20
|
+
this.wcagSelected = undefined;
|
|
16
21
|
this.h = govHost(this.host);
|
|
22
|
+
this.chipId = createID('GovChip');
|
|
17
23
|
}
|
|
18
24
|
validateVariant(newValue) {
|
|
19
|
-
validateProp(ButtonVariants, newValue,
|
|
25
|
+
validateProp(ButtonVariants, newValue, ChipClass.root);
|
|
20
26
|
}
|
|
21
27
|
validateSize(newValue) {
|
|
22
|
-
validateProp(ButtonSizes, newValue,
|
|
28
|
+
validateProp(ButtonSizes, newValue, ChipClass.root);
|
|
23
29
|
}
|
|
24
30
|
componentWillLoad() {
|
|
25
31
|
this.validateVariant(this.variant);
|
|
@@ -29,10 +35,10 @@ export class GovBadge {
|
|
|
29
35
|
const Tag = this.href ? NativeType.A : this.tag;
|
|
30
36
|
const nativeType = Tag == NativeType.BUTTON ? NativeType.BUTTON : undefined;
|
|
31
37
|
return (h(Host, { class: this.h.classes([
|
|
32
|
-
|
|
33
|
-
this.h.hasSlot("right") ?
|
|
34
|
-
this.h.hasSlot("left") ?
|
|
35
|
-
]), disabled: this.disabled, href: this.href, variant: this.variant, type: this.inverse ? undefined : "solid", size: this.size, inverse: this.inverse, hoverable: Tag == NativeType.A || Tag == NativeType.BUTTON }, h(Tag, { class: "element", href: this.href, target: this.target, "aria-label": this.wcagLabel, ref: el => (this.triggerRef = el), onClick: this.onClickHandler.bind(this), type: nativeType }, this.h.hasSlot("left") && h("slot", { name: "left" }), this.h.hasSlot("left-icon") && h("slot", { name: "left-icon" }), h("slot", null), this.h.hasSlot("right-icon") && h("slot", { name: "right-icon" }), this.h.hasSlot("right") && h("slot", { name: "right" }))));
|
|
38
|
+
ChipClass.root,
|
|
39
|
+
this.h.hasSlot("right") ? ChipClass.hasRight : undefined,
|
|
40
|
+
this.h.hasSlot("left") ? ChipClass.hasLeft : undefined,
|
|
41
|
+
]), disabled: this.disabled, href: this.href, variant: this.variant, type: this.inverse ? undefined : "solid", size: this.size, inverse: this.inverse, hoverable: Tag == NativeType.A || Tag == NativeType.BUTTON }, h(Tag, { class: "element", href: this.href, target: this.target, "aria-label": this.wcagLabel, ref: el => (this.triggerRef = el), onClick: this.onClickHandler.bind(this), "aria-controls": this.wcagControls, "aria-selected": toBoolAttr(this.wcagSelected), tabindex: this.focusable ? "0" : "-1", id: this.identifier || this.chipId, type: nativeType }, this.h.hasSlot("left") && h("slot", { name: "left" }), this.h.hasSlot("left-icon") && h("slot", { name: "left-icon" }), h("slot", null), this.h.hasSlot("right-icon") && h("slot", { name: "right-icon" }), this.h.hasSlot("right") && h("slot", { name: "right" }))));
|
|
36
42
|
}
|
|
37
43
|
onClickHandler(e) {
|
|
38
44
|
e.stopPropagation();
|
|
@@ -46,15 +52,27 @@ export class GovBadge {
|
|
|
46
52
|
async getTriggerRef() {
|
|
47
53
|
return this.triggerRef;
|
|
48
54
|
}
|
|
49
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Returns a unique tab trigger identifier
|
|
57
|
+
*/
|
|
58
|
+
async getTriggerIdentifier() {
|
|
59
|
+
return this.identifier || this.chipId;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Focus button element
|
|
63
|
+
*/
|
|
64
|
+
async setFocus() {
|
|
65
|
+
this.triggerRef.focus();
|
|
66
|
+
}
|
|
67
|
+
static get is() { return "gov-chip"; }
|
|
50
68
|
static get originalStyleUrls() {
|
|
51
69
|
return {
|
|
52
|
-
"$": ["gov-
|
|
70
|
+
"$": ["gov-chip.scss"]
|
|
53
71
|
};
|
|
54
72
|
}
|
|
55
73
|
static get styleUrls() {
|
|
56
74
|
return {
|
|
57
|
-
"$": ["gov-
|
|
75
|
+
"$": ["gov-chip.css"]
|
|
58
76
|
};
|
|
59
77
|
}
|
|
60
78
|
static get properties() {
|
|
@@ -89,7 +107,7 @@ export class GovBadge {
|
|
|
89
107
|
"optional": false,
|
|
90
108
|
"docs": {
|
|
91
109
|
"tags": [],
|
|
92
|
-
"text": "Makes the
|
|
110
|
+
"text": "Makes the chip component disabled.\nThis prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies."
|
|
93
111
|
},
|
|
94
112
|
"attribute": "disabled",
|
|
95
113
|
"reflect": false,
|
|
@@ -144,8 +162,8 @@ export class GovBadge {
|
|
|
144
162
|
"references": {
|
|
145
163
|
"ButtonSizesType": {
|
|
146
164
|
"location": "import",
|
|
147
|
-
"path": "../gov-button/
|
|
148
|
-
"id": "../../../packages/core/src/components/gov-button/
|
|
165
|
+
"path": "../gov-button/button/constants",
|
|
166
|
+
"id": "../../../packages/core/src/components/gov-button/button/constants.ts::ButtonSizesType"
|
|
149
167
|
}
|
|
150
168
|
}
|
|
151
169
|
},
|
|
@@ -153,7 +171,7 @@ export class GovBadge {
|
|
|
153
171
|
"optional": false,
|
|
154
172
|
"docs": {
|
|
155
173
|
"tags": [],
|
|
156
|
-
"text": "
|
|
174
|
+
"text": "Chip\u2019s size."
|
|
157
175
|
},
|
|
158
176
|
"attribute": "size",
|
|
159
177
|
"reflect": false,
|
|
@@ -169,7 +187,7 @@ export class GovBadge {
|
|
|
169
187
|
"NativeTypesType": {
|
|
170
188
|
"location": "import",
|
|
171
189
|
"path": "./constants",
|
|
172
|
-
"id": "../../../packages/core/src/components/gov-
|
|
190
|
+
"id": "../../../packages/core/src/components/gov-chip/constants.ts::NativeTypesType"
|
|
173
191
|
}
|
|
174
192
|
}
|
|
175
193
|
},
|
|
@@ -177,7 +195,7 @@ export class GovBadge {
|
|
|
177
195
|
"optional": false,
|
|
178
196
|
"docs": {
|
|
179
197
|
"tags": [],
|
|
180
|
-
"text": "Used to change the HTML tag in the
|
|
198
|
+
"text": "Used to change the HTML tag in the chip"
|
|
181
199
|
},
|
|
182
200
|
"attribute": "tag",
|
|
183
201
|
"reflect": false,
|
|
@@ -192,8 +210,8 @@ export class GovBadge {
|
|
|
192
210
|
"references": {
|
|
193
211
|
"ButtonVariantType": {
|
|
194
212
|
"location": "import",
|
|
195
|
-
"path": "../gov-button/
|
|
196
|
-
"id": "../../../packages/core/src/components/gov-button/
|
|
213
|
+
"path": "../gov-button/button/constants",
|
|
214
|
+
"id": "../../../packages/core/src/components/gov-button/button/constants.ts::ButtonVariantType"
|
|
197
215
|
}
|
|
198
216
|
}
|
|
199
217
|
},
|
|
@@ -201,12 +219,50 @@ export class GovBadge {
|
|
|
201
219
|
"optional": false,
|
|
202
220
|
"docs": {
|
|
203
221
|
"tags": [],
|
|
204
|
-
"text": "Style variation of the
|
|
222
|
+
"text": "Style variation of the chip."
|
|
205
223
|
},
|
|
206
224
|
"attribute": "variant",
|
|
207
225
|
"reflect": false,
|
|
208
226
|
"defaultValue": "ButtonVariants.PRIMARY"
|
|
209
227
|
},
|
|
228
|
+
"focusable": {
|
|
229
|
+
"type": "boolean",
|
|
230
|
+
"mutable": false,
|
|
231
|
+
"complexType": {
|
|
232
|
+
"original": "boolean",
|
|
233
|
+
"resolved": "boolean",
|
|
234
|
+
"references": {}
|
|
235
|
+
},
|
|
236
|
+
"required": false,
|
|
237
|
+
"optional": false,
|
|
238
|
+
"docs": {
|
|
239
|
+
"tags": [{
|
|
240
|
+
"name": "link",
|
|
241
|
+
"text": "https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable"
|
|
242
|
+
}],
|
|
243
|
+
"text": "Same as original parameter"
|
|
244
|
+
},
|
|
245
|
+
"attribute": "focusable",
|
|
246
|
+
"reflect": false,
|
|
247
|
+
"defaultValue": "true"
|
|
248
|
+
},
|
|
249
|
+
"identifier": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"mutable": false,
|
|
252
|
+
"complexType": {
|
|
253
|
+
"original": "string",
|
|
254
|
+
"resolved": "string",
|
|
255
|
+
"references": {}
|
|
256
|
+
},
|
|
257
|
+
"required": false,
|
|
258
|
+
"optional": false,
|
|
259
|
+
"docs": {
|
|
260
|
+
"tags": [],
|
|
261
|
+
"text": "Custom chip identifier. Otherwise, it will be generated"
|
|
262
|
+
},
|
|
263
|
+
"attribute": "identifier",
|
|
264
|
+
"reflect": false
|
|
265
|
+
},
|
|
210
266
|
"wcagLabel": {
|
|
211
267
|
"type": "string",
|
|
212
268
|
"mutable": false,
|
|
@@ -223,6 +279,43 @@ export class GovBadge {
|
|
|
223
279
|
},
|
|
224
280
|
"attribute": "wcag-label",
|
|
225
281
|
"reflect": false
|
|
282
|
+
},
|
|
283
|
+
"wcagControls": {
|
|
284
|
+
"type": "string",
|
|
285
|
+
"mutable": false,
|
|
286
|
+
"complexType": {
|
|
287
|
+
"original": "string",
|
|
288
|
+
"resolved": "string",
|
|
289
|
+
"references": {}
|
|
290
|
+
},
|
|
291
|
+
"required": false,
|
|
292
|
+
"optional": false,
|
|
293
|
+
"docs": {
|
|
294
|
+
"tags": [],
|
|
295
|
+
"text": "Use this property to add an aria-controls attribute to the button. Use the attribute to point to the unique id of the content that the button manages"
|
|
296
|
+
},
|
|
297
|
+
"attribute": "wcag-controls",
|
|
298
|
+
"reflect": false
|
|
299
|
+
},
|
|
300
|
+
"wcagSelected": {
|
|
301
|
+
"type": "boolean",
|
|
302
|
+
"mutable": false,
|
|
303
|
+
"complexType": {
|
|
304
|
+
"original": "boolean",
|
|
305
|
+
"resolved": "boolean",
|
|
306
|
+
"references": {}
|
|
307
|
+
},
|
|
308
|
+
"required": false,
|
|
309
|
+
"optional": false,
|
|
310
|
+
"docs": {
|
|
311
|
+
"tags": [{
|
|
312
|
+
"name": "link",
|
|
313
|
+
"text": "https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected"
|
|
314
|
+
}],
|
|
315
|
+
"text": "Same as original parameter"
|
|
316
|
+
},
|
|
317
|
+
"attribute": "wcag-selected",
|
|
318
|
+
"reflect": false
|
|
226
319
|
}
|
|
227
320
|
};
|
|
228
321
|
}
|
|
@@ -279,6 +372,40 @@ export class GovBadge {
|
|
|
279
372
|
"text": "Returns a clickable element instance",
|
|
280
373
|
"tags": []
|
|
281
374
|
}
|
|
375
|
+
},
|
|
376
|
+
"getTriggerIdentifier": {
|
|
377
|
+
"complexType": {
|
|
378
|
+
"signature": "() => Promise<string>",
|
|
379
|
+
"parameters": [],
|
|
380
|
+
"references": {
|
|
381
|
+
"Promise": {
|
|
382
|
+
"location": "global",
|
|
383
|
+
"id": "global::Promise"
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
"return": "Promise<string>"
|
|
387
|
+
},
|
|
388
|
+
"docs": {
|
|
389
|
+
"text": "Returns a unique tab trigger identifier",
|
|
390
|
+
"tags": []
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
"setFocus": {
|
|
394
|
+
"complexType": {
|
|
395
|
+
"signature": "() => Promise<void>",
|
|
396
|
+
"parameters": [],
|
|
397
|
+
"references": {
|
|
398
|
+
"Promise": {
|
|
399
|
+
"location": "global",
|
|
400
|
+
"id": "global::Promise"
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
"return": "Promise<void>"
|
|
404
|
+
},
|
|
405
|
+
"docs": {
|
|
406
|
+
"text": "Focus button element",
|
|
407
|
+
"tags": []
|
|
408
|
+
}
|
|
282
409
|
}
|
|
283
410
|
};
|
|
284
411
|
}
|
|
@@ -293,4 +420,4 @@ export class GovBadge {
|
|
|
293
420
|
}];
|
|
294
421
|
}
|
|
295
422
|
}
|
|
296
|
-
//# sourceMappingURL=gov-
|
|
423
|
+
//# sourceMappingURL=gov-chip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gov-chip.js","sourceRoot":"","sources":["../../../../../../src/components/gov-chip/gov-chip.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;AAErG,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAmB,MAAM,aAAa,CAAA;AACpE,OAAO,EAAE,WAAW,EAAmB,cAAc,EAAqB,MAAM,gCAAgC,CAAA;AAChH,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAMnD,MAAM,OAAO,OAAO;EAKnB;mBAUoC,KAAK;oBAKJ,KAAK;;;gBAcD,WAAW,CAAC,EAAE;eAIf,MAAM;mBAIA,cAAc,CAAC,OAAO;qBAK9B,IAAI;;;;;IAzCzC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CA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,KAAK,UAAU,CAAC,MAAM,EAAE;MAC9D,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KACrB;EACF,CAAC;EAED;;KAEG;EAEH,KAAK,CAAC,aAAa;IAClB,OAAO,IAAI,CAAC,UAAU,CAAA;EACvB,CAAC;EAED;;KAEG;EAEH,KAAK,CAAC,oBAAoB;IACzB,OAAO,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,CAAA;EACtC,CAAC;EAED;;KAEG;EAEH,KAAK,CAAC,QAAQ;IACb,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;EACxB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { govHost, toBoolAttr } from \"../../helpers/Dom/template\"\nimport { ChipClass, NativeType, NativeTypesType } from \"./constants\"\nimport { ButtonSizes, ButtonSizesType, ButtonVariants, ButtonVariantType } from \"../gov-button/button/constants\"\nimport { createID } from \"../../utils/string.utils\"\n\n@Component({\n\ttag: \"gov-chip\",\n\tstyleUrl: \"gov-chip.scss\",\n})\nexport class GovChip {\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement | HTMLSpanElement\n\tprivate h: GovHost\n\tprivate readonly chipId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.chipId = createID('GovChip')\n\t}\n\n\t@Element() host: HTMLGovChipElement\n\n\t/**\n\t * Determine if component should have inverse colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Makes the chip component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target: string\n\t/**\n\t * Chip’s size.\n\t */\n\t@Prop() readonly size: ButtonSizesType = ButtonSizes._M\n\t/**\n\t * Used to change the HTML tag in the chip\n\t */\n\t@Prop() readonly tag: NativeTypesType = \"span\"\n\t/**\n\t * Style variation of the chip.\n\t */\n\t@Prop() readonly variant: ButtonVariantType = ButtonVariants.PRIMARY\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom chip identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Adds accessible label for the button that is only shown for screen readers.\n\t * Typically, this label text replaces the visible text on the button for users who use assistive technology.\n\t */\n\t@Prop({ attribute: \"wcag-label\" }) readonly wcagLabel: string\n\t/**\n\t * Use this property to add an aria-controls attribute to the button. Use the attribute to point to the unique id of the content that the button manages\n\t */\n\t@Prop({ attribute: \"wcag-controls\" }) readonly wcagControls: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected\n\t */\n\t@Prop({ attribute: \"wcag-selected\" }) readonly wcagSelected: boolean\n\t/**\n\t * Emitted when the button click.\n\t */\n\t@Event({ eventName: \"gov-click\" }) govClick: EventEmitter<PointerEvent>\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(ButtonVariants, newValue, ChipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ButtonSizes, newValue, ChipClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? NativeType.A : this.tag\n\t\tconst nativeType = Tag == NativeType.BUTTON ? NativeType.BUTTON : undefined\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes([\n\t\t\t\t\tChipClass.root,\n\t\t\t\t\tthis.h.hasSlot(\"right\") ? ChipClass.hasRight : undefined,\n\t\t\t\t\tthis.h.hasSlot(\"left\") ? ChipClass.hasLeft : undefined,\n\t\t\t\t])}\n\t\t\t\tdisabled={this.disabled}\n\t\t\t\thref={this.href}\n\t\t\t\tvariant={this.variant}\n\t\t\t\ttype={this.inverse ? undefined : \"solid\"}\n\t\t\t\tsize={this.size}\n\t\t\t\tinverse={this.inverse}\n\t\t\t\thoverable={Tag == NativeType.A || Tag == NativeType.BUTTON}\n\t\t\t>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLLinkElement | HTMLButtonElement | HTMLSpanElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\taria-controls={this.wcagControls}\n\t\t\t\t\taria-selected={toBoolAttr(this.wcagSelected)}\n\t\t\t\t\ttabindex={this.focusable ? \"0\" : \"-1\"}\n\t\t\t\t\tid={this.identifier || this.chipId}\n\t\t\t\t\ttype={nativeType}>\n\t\t\t\t\t{this.h.hasSlot(\"left\") && <slot name=\"left\"></slot>}\n\t\t\t\t\t{this.h.hasSlot(\"left-icon\") && <slot name=\"left-icon\"></slot>}\n\t\t\t\t\t<slot />\n\t\t\t\t\t{this.h.hasSlot(\"right-icon\") && <slot name=\"right-icon\"></slot>}\n\t\t\t\t\t{this.h.hasSlot(\"right\") && <slot name=\"right\"></slot>}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false && this.tag === NativeType.BUTTON) {\n\t\t\tthis.govClick.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync getTriggerRef() {\n\t\treturn this.triggerRef\n\t}\n\n\t/**\n\t * Returns a unique tab trigger identifier\n\t */\n\t@Method()\n\tasync getTriggerIdentifier(): Promise<string> {\n\t\treturn this.identifier || this.chipId\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.triggerRef.focus()\n\t}\n}\n"]}
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/checkbox/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,iBAAiB,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAGvE,MAAM,CAAC,MAAM,iBAAiB,GAAG;EAChC,IAAI,EAAE,mBAAmB;EACzB,KAAK,EAAE,0BAA0B;CACjC,CAAA","sourcesContent":["import { Sizes } from '../../../core/constants/sizes'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const FormCheckboxSizes = pick(Sizes, ['_XS', '_S', '_M', '_L'])\nexport type FormCheckboxSizesType = `${ValueOf<typeof FormCheckboxSizes>}`\n\nexport const FormCheckboxClass = {\n\troot: 'gov-form-checkbox',\n\tcheck: 'gov-form-checkbox__check',\n}\n"]}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/checkbox/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,iBAAiB,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAGvE,MAAM,CAAC,MAAM,iBAAiB,GAAG;EAChC,IAAI,EAAE,mBAAmB;EACzB,KAAK,EAAE,0BAA0B;EACjC,KAAK,EAAE,0BAA0B;CACjC,CAAA","sourcesContent":["import { Sizes } from '../../../core/constants/sizes'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const FormCheckboxSizes = pick(Sizes, ['_XS', '_S', '_M', '_L'])\nexport type FormCheckboxSizesType = `${ValueOf<typeof FormCheckboxSizes>}`\n\nexport const FormCheckboxClass = {\n\troot: 'gov-form-checkbox',\n\tcheck: 'gov-form-checkbox__check',\n\tlabel: 'gov-form-checkbox__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;
|
|
@@ -357,6 +360,9 @@
|
|
|
357
360
|
opacity: 0;
|
|
358
361
|
transition: 150ms linear opacity;
|
|
359
362
|
}
|
|
363
|
+
.gov-form-checkbox__label {
|
|
364
|
+
position: relative;
|
|
365
|
+
}
|
|
360
366
|
.gov-form-checkbox input:checked + span::before {
|
|
361
367
|
background: var(--gov-form-checkbox-indicator-bg, var(--gov-color-primary));
|
|
362
368
|
}
|
|
@@ -51,7 +51,7 @@ export class GovFormCheckbox {
|
|
|
51
51
|
render() {
|
|
52
52
|
const wrapCheckbox = (children) => {
|
|
53
53
|
if (this.noLabel) {
|
|
54
|
-
return (h("label",
|
|
54
|
+
return (h("label", { class: FormCheckboxClass.label }, children));
|
|
55
55
|
}
|
|
56
56
|
return children;
|
|
57
57
|
};
|
|
@@ -144,7 +144,7 @@ export class GovFormCheckbox {
|
|
|
144
144
|
"optional": false,
|
|
145
145
|
"docs": {
|
|
146
146
|
"tags": [],
|
|
147
|
-
"text": "Checkbox
|
|
147
|
+
"text": "Checkbox button state"
|
|
148
148
|
},
|
|
149
149
|
"attribute": "checked",
|
|
150
150
|
"reflect": true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gov-form-checkb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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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 { FormCheckboxClass, FormCheckboxSizes, FormCheckboxSizesType } 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 { FormCheckboxEvent } from \"./gov-form-checkbox.types\"\n\n@Component({\n\ttag: \"gov-form-checkbox\",\n\tstyleUrl: \"gov-form-checkbox.scss\",\n})\nexport class GovFormCheckbox {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\n\tprivate readonly checkboxId: string\n\n\tconstructor() {\n\t\tthis.checkboxId = createID(\"GovCheckbox\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormCheckboxElement\n\t/**\n\t * Value of checkbox\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * Checkbox 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 checkbox component disabled.\n\t * This prevents users from being able to interact with the checkbox, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Name of the checkbox.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Checkboxes size.\n\t */\n\t@Prop() readonly size?: FormCheckboxSizesType = \"m\"\n\t/**\n\t * Custom checkbox identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: 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 * 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 checkbox has focus.\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<FormCheckboxEvent>\n\t/**\n\t * Emitted when the checkbox loses focus.\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<FormCheckboxEvent>\n\t/**\n\t * Emitted when the checkbox change value.\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<FormCheckboxEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormCheckboxSizes, newValue, FormCheckboxClass.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}\n\n\tcomponentWillLoad() {\n\t\tthis.f.passAttrToControl(\"type\", \"checkbox\")\n\t\tthis.passControlAttrs()\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.checkboxId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\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 (\n\t\t\t\t\t<label>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</label>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormCheckboxClass.root} checked={this.checked} size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapCheckbox(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\taria-checked={toBoolAttr(this.checked)}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\" />\n\t\t\t\t\t\t\t<gov-icon class={FormCheckboxClass.check} name=\"check-lg\"></gov-icon>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormCheckboxClass.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: FormCheckboxClass.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 onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\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: FormCheckboxClass.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\", FormCheckboxClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormCheckboxClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.checkboxId, this.wcagLabelledBy, FormCheckboxClass.root)\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"gov-form-checkbox.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/checkbox/gov-form-checkbox.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,iBAAiB,EAAE,iBAAiB,EAAyB,MAAM,aAAa,CAAA;AACzF,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,eAAe;EAO3B;;mBAekD,KAAK;oBAKlB,KAAK;oBAKL,KAAK;;gBAQM,GAAG;;mBAQU,KAAK;;;;IAxCjE,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAA;IAEzC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI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B,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAA;IAClF,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAA;IAChF,oBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAA;EACtG,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 { FormCheckboxClass, FormCheckboxSizes, FormCheckboxSizesType } 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 { FormCheckboxEvent } from \"./gov-form-checkbox.types\"\n\n@Component({\n\ttag: \"gov-form-checkbox\",\n\tstyleUrl: \"gov-form-checkbox.scss\",\n})\nexport class GovFormCheckbox {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\n\tprivate readonly checkboxId: string\n\n\tconstructor() {\n\t\tthis.checkboxId = createID(\"GovCheckbox\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormCheckboxElement\n\t/**\n\t * Value of checkbox\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * Checkbox 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 checkbox component disabled.\n\t * This prevents users from being able to interact with the checkbox, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Name of the checkbox.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Checkboxes size.\n\t */\n\t@Prop() readonly size?: FormCheckboxSizesType = \"m\"\n\t/**\n\t * Custom checkbox identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: 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 * 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 checkbox has focus.\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<FormCheckboxEvent>\n\t/**\n\t * Emitted when the checkbox loses focus.\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<FormCheckboxEvent>\n\t/**\n\t * Emitted when the checkbox change value.\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<FormCheckboxEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormCheckboxSizes, newValue, FormCheckboxClass.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}\n\n\tcomponentWillLoad() {\n\t\tthis.f.passAttrToControl(\"type\", \"checkbox\")\n\t\tthis.passControlAttrs()\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.checkboxId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\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 (\n\t\t\t\t\t<label class={FormCheckboxClass.label}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</label>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormCheckboxClass.root} checked={this.checked} size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapCheckbox(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\taria-checked={toBoolAttr(this.checked)}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\" />\n\t\t\t\t\t\t\t<gov-icon class={FormCheckboxClass.check} name=\"check-lg\"></gov-icon>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormCheckboxClass.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: FormCheckboxClass.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 onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\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: FormCheckboxClass.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\", FormCheckboxClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormCheckboxClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.checkboxId, this.wcagLabelledBy, FormCheckboxClass.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;
|
|
@@ -83,7 +83,7 @@ export class GovFormControl {
|
|
|
83
83
|
}
|
|
84
84
|
render() {
|
|
85
85
|
const Tag = this.fieldset ? "fieldset" : "div";
|
|
86
|
-
return (h(Host, { size: this.size, class: this.h.classes(FormControlClass.root) }, h(Tag, { class: FormControlClass.holder }, this.h.hasSlot("top") && h("slot", { name: "top" }), h("slot", null), this.h.hasSlot("bottom") && (h("div", { class: FormControlClass.bottom }, h("slot", { name: "bottom" }))))));
|
|
86
|
+
return (h(Host, { size: this.size, class: this.h.classes(FormControlClass.root) }, h(Tag, { class: FormControlClass.holder }, this.h.hasSlot("top") && h("slot", { name: "top" }), h("slot", null), (this.h.hasSlot("bottom") && !this.h.isSlotEmpty("bottom")) && (h("div", { class: FormControlClass.bottom }, h("slot", { name: "bottom" }))))));
|
|
87
87
|
}
|
|
88
88
|
static get is() { return "gov-form-control"; }
|
|
89
89
|
static get originalStyleUrls() {
|