@gov-design-system-ce/components 0.0.5 → 0.0.6
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-5c8f444a.js → constants-0c6c8e11.js} +8 -3
- package/dist/cjs/constants-0c6c8e11.js.map +1 -0
- package/dist/cjs/constants-1490a5eb.js +25 -0
- package/dist/cjs/constants-1490a5eb.js.map +1 -0
- package/dist/cjs/constants-20b3f7ee.js +28 -0
- package/dist/cjs/constants-20b3f7ee.js.map +1 -0
- package/dist/cjs/{constants-0c6897bc.js → constants-21559414.js} +8 -3
- package/dist/cjs/constants-21559414.js.map +1 -0
- package/dist/cjs/constants-23b7a283.js +33 -0
- package/dist/cjs/constants-23b7a283.js.map +1 -0
- package/dist/cjs/constants-5f6bbc50.js +36 -0
- package/dist/cjs/constants-5f6bbc50.js.map +1 -0
- package/dist/cjs/constants-86fb4eb4.js +19 -0
- package/dist/cjs/constants-86fb4eb4.js.map +1 -0
- package/dist/cjs/constants-caad94b4.js +16 -0
- package/dist/cjs/constants-caad94b4.js.map +1 -0
- package/dist/cjs/constants-dc2ba6bd.js +26 -0
- package/dist/cjs/constants-dc2ba6bd.js.map +1 -0
- package/dist/cjs/{constants-a44c32bc.js → constants-ded92f8a.js} +1 -3
- package/dist/cjs/constants-ded92f8a.js.map +1 -0
- package/dist/cjs/{constants-477ca85a.js → constants-e175be18.js} +7 -4
- package/dist/cjs/constants-e175be18.js.map +1 -0
- package/dist/cjs/constants-e8760a84.js +20 -0
- package/dist/cjs/constants-e8760a84.js.map +1 -0
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{form-d9f0f50c.js → form-49298257.js} +42 -10
- package/dist/cjs/form-49298257.js.map +1 -0
- package/dist/cjs/gov-accordion-item.cjs.entry.js +8 -8
- package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-accordion.cjs.entry.js +10 -10
- package/dist/cjs/gov-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-alert.cjs.entry.js +6 -4
- package/dist/cjs/gov-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-app.cjs.entry.js +165 -45
- package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-attachments_3.cjs.entry.js +9 -9
- package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-backdrop.cjs.entry.js +4 -4
- package/dist/cjs/gov-backdrop.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-badge.cjs.entry.js +11 -10
- package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js +4 -5
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-button.cjs.entry.js +12 -23
- package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-card.cjs.entry.js +3 -3
- package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-container.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-cookiebar.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-empty.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-error-code.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js +8 -8
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-checkbox.cjs.entry.js +13 -22
- package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-control.cjs.entry.js +30 -29
- package/dist/cjs/gov-form-control.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-file.cjs.entry.js +8 -8
- package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-input.cjs.entry.js +13 -19
- package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-multi-select.cjs.entry.js +10 -10
- package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-radio.cjs.entry.js +12 -12
- package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js +0 -2
- package/dist/cjs/gov-form-search.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-select.cjs.entry.js +13 -13
- package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-switch.cjs.entry.js +12 -12
- package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-grid-item.cjs.entry.js +2 -3
- package/dist/cjs/gov-grid-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-grid.cjs.entry.js +1 -2
- package/dist/cjs/gov-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-icon.cjs.entry.js +10 -5
- package/dist/cjs/gov-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-layout-column.cjs.entry.js +25 -0
- package/dist/cjs/gov-layout-column.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-layout.cjs.entry.js +12 -3
- package/dist/cjs/gov-layout.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-loading.cjs.entry.js +1 -1
- package/dist/cjs/gov-loading.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-message.cjs.entry.js +4 -2
- package/dist/cjs/gov-message.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-modal.cjs.entry.js +3 -3
- package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-nav.cjs.entry.js +3 -3
- package/dist/cjs/gov-pagination.cjs.entry.js +26 -21
- package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-prompt.cjs.entry.js +3 -3
- package/dist/cjs/gov-prompt.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-side-nav-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-side-nav-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-side-nav.cjs.entry.js +3 -3
- package/dist/cjs/gov-side-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-spacer.cjs.entry.js +11 -13
- package/dist/cjs/gov-spacer.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-statsbar-item.cjs.entry.js +4 -2
- package/dist/cjs/gov-statsbar-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-statsbar.cjs.entry.js +7 -6
- package/dist/cjs/gov-statsbar.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-stepper-item.cjs.entry.js +9 -9
- package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-stepper.cjs.entry.js +9 -8
- package/dist/cjs/gov-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tabs-item.cjs.entry.js +3 -3
- package/dist/cjs/gov-tabs-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tabs.cjs.entry.js +11 -11
- package/dist/cjs/gov-tabs.cjs.entry.js.map +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-tiles.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-toast.cjs.entry.js +21 -18
- package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tooltip-content.cjs.entry.js +3 -2
- package/dist/cjs/gov-tooltip-content.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tooltip.cjs.entry.js +15 -14
- package/dist/cjs/gov-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizzard-item.cjs.entry.js +10 -11
- package/dist/cjs/gov-wizzard-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizzard.cjs.entry.js +9 -9
- package/dist/cjs/gov-wizzard.cjs.entry.js.map +1 -1
- package/dist/cjs/index-356717ae.js +2 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{props-cc21d3d7.js → props-5f82e4c0.js} +4 -4
- package/dist/cjs/props-5f82e4c0.js.map +1 -0
- package/dist/cjs/template-e1c4ff78.js.map +1 -1
- package/dist/cjs/{utils-4ae73637.js → utils-c9b1bba3.js} +3 -1
- package/dist/cjs/utils-c9b1bba3.js.map +1 -0
- package/dist/cjs/{variants-bacf037a.js → variants-f5ffeef3.js} +3 -3
- package/dist/cjs/variants-f5ffeef3.js.map +1 -0
- package/dist/cjs/{wcag-eca97102.js → wcag-6efc0ab7.js} +2 -2
- package/dist/cjs/wcag-6efc0ab7.js.map +1 -0
- package/dist/cjs/{win-ac5c1806.js → win-84bda0aa.js} +3 -3
- package/dist/cjs/win-84bda0aa.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -2
- package/dist/collection/components/gov-accordion/constants.js +5 -4
- package/dist/collection/components/gov-accordion/constants.js.map +1 -1
- package/dist/collection/components/gov-accordion/gov-accordion-item.js +17 -20
- package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
- package/dist/collection/components/gov-accordion/gov-accordion.js +17 -18
- package/dist/collection/components/gov-accordion/gov-accordion.js.map +1 -1
- package/dist/collection/components/gov-alert/constants.js +3 -9
- package/dist/collection/components/gov-alert/constants.js.map +1 -1
- package/dist/collection/components/gov-alert/gov-alert.js +6 -7
- package/dist/collection/components/gov-alert/gov-alert.js.map +1 -1
- package/dist/collection/components/gov-app/gov-app.js +3 -3
- package/dist/collection/components/gov-app/gov-app.js.map +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments-item.js +5 -5
- package/dist/collection/components/gov-attachments/gov-attachments-item.js.map +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments.js +7 -7
- package/dist/collection/components/gov-attachments/gov-attachments.js.map +1 -1
- package/dist/collection/components/gov-backdrop/gov-backdrop.js +7 -7
- package/dist/collection/components/gov-backdrop/gov-backdrop.js.map +1 -1
- package/dist/collection/components/gov-badge/constants.js +1 -2
- package/dist/collection/components/gov-badge/constants.js.map +1 -1
- package/dist/collection/components/gov-badge/gov-badge.js +25 -27
- package/dist/collection/components/gov-badge/gov-badge.js.map +1 -1
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.d.js.map +1 -1
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +2 -3
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js.map +1 -1
- package/dist/collection/components/gov-button/constants.js +17 -13
- package/dist/collection/components/gov-button/constants.js.map +1 -1
- package/dist/collection/components/gov-button/gov-button.js +37 -44
- package/dist/collection/components/gov-button/gov-button.js.map +1 -1
- package/dist/collection/components/gov-card/gov-card.js.map +1 -1
- package/dist/collection/components/gov-container/gov-container.js +3 -3
- package/dist/collection/components/gov-container/gov-container.js.map +1 -1
- package/dist/collection/components/gov-cookiebar/gov-cookiebar.js.map +1 -1
- package/dist/collection/components/gov-empty/gov-empty.js.map +1 -1
- package/dist/collection/components/gov-error-code/gov-error-code.js.map +1 -1
- package/dist/collection/components/gov-form/autocomplete/constants.js +5 -4
- package/dist/collection/components/gov-form/autocomplete/constants.js.map +1 -1
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +16 -18
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.types.js +2 -0
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.types.js.map +1 -0
- package/dist/collection/components/gov-form/checkbox/constants.js +3 -2
- package/dist/collection/components/gov-form/checkbox/constants.js.map +1 -1
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +11 -21
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
- package/dist/collection/components/gov-form/checkbox/interfaces.js.map +1 -1
- package/dist/collection/components/gov-form/control/constants.js +3 -2
- package/dist/collection/components/gov-form/control/constants.js.map +1 -1
- package/dist/collection/components/gov-form/control/gov-form-control.js +40 -42
- package/dist/collection/components/gov-form/control/gov-form-control.js.map +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.js +3 -3
- package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.types.js +2 -0
- package/dist/collection/components/gov-form/file/gov-form-file.types.js.map +1 -0
- package/dist/collection/components/gov-form/input/constants.js +25 -21
- package/dist/collection/components/gov-form/input/constants.js.map +1 -1
- package/dist/collection/components/gov-form/input/gov-form-input.js +24 -32
- package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
- package/dist/collection/components/gov-form/message/constants.js +3 -2
- package/dist/collection/components/gov-form/message/constants.js.map +1 -1
- package/dist/collection/components/gov-form/message/gov-form-message.js +8 -9
- package/dist/collection/components/gov-form/message/gov-form-message.js.map +1 -1
- package/dist/collection/components/gov-form/multiselect/constants.js +5 -4
- package/dist/collection/components/gov-form/multiselect/constants.js.map +1 -1
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +16 -18
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
- package/dist/collection/components/gov-form/radio/constants.js +3 -2
- package/dist/collection/components/gov-form/radio/constants.js.map +1 -1
- package/dist/collection/components/gov-form/radio/gov-form-radio.js +10 -11
- package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
- package/dist/collection/components/gov-form/radio/interfaces.js.map +1 -1
- package/dist/collection/components/gov-form/search/constants.js +0 -11
- package/dist/collection/components/gov-form/search/constants.js.map +1 -1
- package/dist/collection/components/gov-form/search/gov-form-search.js.map +1 -1
- package/dist/collection/components/gov-form/select/constants.js +5 -4
- package/dist/collection/components/gov-form/select/constants.js.map +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.js +16 -18
- package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
- package/dist/collection/components/gov-form/switch/constants.js +3 -2
- package/dist/collection/components/gov-form/switch/constants.js.map +1 -1
- package/dist/collection/components/gov-form/switch/gov-form-switch.js +10 -11
- package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
- package/dist/collection/components/gov-form/switch/interfaces.js.map +1 -1
- package/dist/collection/components/gov-grid/constants.js +0 -12
- package/dist/collection/components/gov-grid/constants.js.map +1 -1
- package/dist/collection/components/gov-grid/gov-grid-item.js +5 -5
- package/dist/collection/components/gov-grid/gov-grid-item.js.map +1 -1
- package/dist/collection/components/gov-grid/gov-grid.js +3 -3
- package/dist/collection/components/gov-grid/gov-grid.js.map +1 -1
- package/dist/collection/components/gov-icon/constants.js +6 -1
- package/dist/collection/components/gov-icon/constants.js.map +1 -1
- package/dist/collection/components/gov-icon/gov-icon.js +1 -1
- package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
- package/dist/collection/components/gov-icon/list.js +91 -91
- package/dist/collection/components/gov-icon/list.js.map +1 -1
- package/dist/collection/components/gov-layout/constants.js +13 -7
- package/dist/collection/components/gov-layout/constants.js.map +1 -1
- package/dist/collection/components/gov-layout/{gov-layout-aside.css → gov-layout-column.css} +4 -13
- package/dist/collection/components/gov-layout/gov-layout-column.js +24 -0
- package/dist/collection/components/gov-layout/gov-layout-column.js.map +1 -0
- package/dist/collection/components/gov-layout/gov-layout.css +35 -0
- package/dist/collection/components/gov-layout/gov-layout.js +80 -4
- package/dist/collection/components/gov-layout/gov-layout.js.map +1 -1
- package/dist/collection/components/gov-loading/gov-loading.js +4 -4
- package/dist/collection/components/gov-loading/gov-loading.js.map +1 -1
- package/dist/collection/components/gov-message/constants.js +3 -9
- package/dist/collection/components/gov-message/constants.js.map +1 -1
- package/dist/collection/components/gov-message/gov-message.js +4 -4
- package/dist/collection/components/gov-message/gov-message.js.map +1 -1
- package/dist/collection/components/gov-modal/gov-modal.js.map +1 -1
- package/dist/collection/components/gov-pagination/constants.js +10 -5
- package/dist/collection/components/gov-pagination/constants.js.map +1 -1
- package/dist/collection/components/gov-pagination/gov-pagination.css +5 -8
- package/dist/collection/components/gov-pagination/gov-pagination.js +42 -44
- package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
- package/dist/collection/components/gov-promp/gov-prompt.js +1 -1
- package/dist/collection/components/gov-promp/gov-prompt.js.map +1 -1
- package/dist/collection/components/gov-side-nav/gov-side-nav-item.js +1 -1
- 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.js.map +1 -1
- package/dist/collection/components/gov-spacer/constants.js +10 -4
- package/dist/collection/components/gov-spacer/constants.js.map +1 -1
- package/dist/collection/components/gov-spacer/gov-spacer.js +9 -11
- package/dist/collection/components/gov-spacer/gov-spacer.js.map +1 -1
- package/dist/collection/components/gov-statsbar/constants.js +7 -2
- package/dist/collection/components/gov-statsbar/constants.js.map +1 -1
- package/dist/collection/components/gov-statsbar/gov-statsbar-item.js +2 -2
- package/dist/collection/components/gov-statsbar/gov-statsbar-item.js.map +1 -1
- package/dist/collection/components/gov-statsbar/gov-statsbar.js +13 -15
- package/dist/collection/components/gov-statsbar/gov-statsbar.js.map +1 -1
- package/dist/collection/components/gov-stepper/constants.js +5 -11
- package/dist/collection/components/gov-stepper/constants.js.map +1 -1
- package/dist/collection/components/gov-stepper/gov-stepper-item.js +17 -20
- package/dist/collection/components/gov-stepper/gov-stepper-item.js.map +1 -1
- package/dist/collection/components/gov-stepper/gov-stepper.js +14 -15
- package/dist/collection/components/gov-stepper/gov-stepper.js.map +1 -1
- package/dist/collection/components/gov-tabs/constants.js +13 -12
- package/dist/collection/components/gov-tabs/constants.js.map +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs-item.js.map +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs.css +28 -1
- package/dist/collection/components/gov-tabs/gov-tabs.js +38 -15
- package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs.types.js +2 -0
- package/dist/collection/components/gov-tabs/gov-tabs.types.js.map +1 -0
- package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
- package/dist/collection/components/gov-tiles/gov-tiles.js +5 -5
- package/dist/collection/components/gov-tiles/gov-tiles.js.map +1 -1
- package/dist/collection/components/gov-toast/constants.js +10 -20
- package/dist/collection/components/gov-toast/constants.js.map +1 -1
- package/dist/collection/components/gov-toast/gov-toast.js +34 -30
- package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
- package/dist/collection/components/gov-tooltip/constants.js +12 -12
- package/dist/collection/components/gov-tooltip/constants.js.map +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip.js +27 -29
- package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
- package/dist/collection/components/gov-wizzard/constants.js +5 -4
- package/dist/collection/components/gov-wizzard/constants.js.map +1 -1
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.css +8 -17
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.js +16 -20
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.js.map +1 -1
- package/dist/collection/components/gov-wizzard/gov-wizzard.js +9 -10
- package/dist/collection/components/gov-wizzard/gov-wizzard.js.map +1 -1
- package/dist/collection/core/constants/tags.js.map +1 -1
- package/dist/collection/helpers/Dom/form.js.map +1 -1
- package/dist/collection/helpers/Dom/form.types.js +2 -0
- package/dist/collection/helpers/Dom/form.types.js.map +1 -0
- package/dist/collection/helpers/Dom/template.js.map +1 -1
- package/dist/collection/helpers/Dom/template.types.js +2 -0
- package/dist/collection/helpers/Dom/template.types.js.map +1 -0
- package/dist/collection/helpers/Dom/win.js +2 -2
- package/dist/collection/helpers/Dom/win.js.map +1 -1
- package/dist/collection/helpers/Fragment.js.map +1 -1
- package/dist/collection/helpers/StorybookDocsTemplate.js +2 -2
- package/dist/collection/helpers/StorybookDocsTemplate.js.map +1 -1
- package/dist/collection/helpers/Validate/props.js +3 -3
- package/dist/collection/helpers/Validate/props.js.map +1 -1
- package/dist/collection/helpers/Validate/wcag.js +1 -1
- package/dist/collection/helpers/Validate/wcag.js.map +1 -1
- package/dist/collection/pages/Forms.js +1 -1
- package/dist/collection/pages/Forms.js.map +1 -1
- package/dist/collection/pages/Layout.js +65 -35
- package/dist/collection/pages/Layout.js.map +1 -1
- package/dist/collection/pages/Loading.js +3 -3
- package/dist/collection/pages/Loading.js.map +1 -1
- package/dist/collection/pages/Tabs.js +90 -0
- package/dist/collection/pages/Tabs.js.map +1 -1
- package/dist/collection/pages/Wizzard.js +5 -5
- package/dist/collection/pages/Wizzard.js.map +1 -1
- package/dist/collection/types/interfaces.js.map +1 -1
- package/dist/collection/utils/icon.utils.js +3 -4
- package/dist/collection/utils/icon.utils.js.map +1 -1
- package/dist/collection/utils/utils.js +1 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/constants.js +6 -4
- package/dist/components/constants.js.map +1 -1
- package/dist/components/constants11.js +8 -2
- package/dist/components/constants11.js.map +1 -1
- package/dist/components/constants12.js +6 -3
- package/dist/components/constants12.js.map +1 -1
- package/dist/components/constants13.js +14 -4
- package/dist/components/constants13.js.map +1 -1
- package/dist/components/constants14.js +11 -11
- package/dist/components/constants14.js.map +1 -1
- package/dist/components/constants15.js +6 -3
- package/dist/components/constants15.js.map +1 -1
- package/dist/components/constants3.js +18 -13
- package/dist/components/constants3.js.map +1 -1
- package/dist/components/constants5.js +4 -3
- package/dist/components/constants5.js.map +1 -1
- package/dist/components/constants6.js +0 -2
- package/dist/components/constants6.js.map +1 -1
- package/dist/components/constants7.js +14 -8
- package/dist/components/constants7.js.map +1 -1
- package/dist/components/form.js +36 -8
- package/dist/components/form.js.map +1 -1
- package/dist/components/gov-accordion-item.js +8 -9
- package/dist/components/gov-accordion-item.js.map +1 -1
- package/dist/components/gov-accordion.js +9 -8
- package/dist/components/gov-accordion.js.map +1 -1
- package/dist/components/gov-alert.js +6 -3
- package/dist/components/gov-alert.js.map +1 -1
- package/dist/components/gov-app.js +166 -45
- package/dist/components/gov-app.js.map +1 -1
- package/dist/components/gov-attachments-item2.js +3 -1
- package/dist/components/gov-attachments-item2.js.map +1 -1
- package/dist/components/gov-attachments2.js +4 -2
- package/dist/components/gov-attachments2.js.map +1 -1
- package/dist/components/gov-backdrop2.js +4 -2
- package/dist/components/gov-backdrop2.js.map +1 -1
- package/dist/components/gov-badge2.js +12 -13
- package/dist/components/gov-badge2.js.map +1 -1
- package/dist/components/gov-breadcrumbs.js +4 -3
- package/dist/components/gov-breadcrumbs.js.map +1 -1
- package/dist/components/gov-button2.js +14 -23
- package/dist/components/gov-button2.js.map +1 -1
- package/dist/components/gov-card.js +3 -1
- package/dist/components/gov-card.js.map +1 -1
- package/dist/components/gov-container.js +1 -0
- package/dist/components/gov-container.js.map +1 -1
- package/dist/components/gov-cookiebar.js +1 -0
- package/dist/components/gov-cookiebar.js.map +1 -1
- package/dist/components/gov-empty.js +1 -0
- package/dist/components/gov-empty.js.map +1 -1
- package/dist/components/gov-error-code.js +1 -0
- package/dist/components/gov-error-code.js.map +1 -1
- package/dist/components/gov-form-autocomplete2.js +8 -8
- package/dist/components/gov-form-autocomplete2.js.map +1 -1
- package/dist/components/gov-form-checkbox.js +8 -16
- package/dist/components/gov-form-checkbox.js.map +1 -1
- package/dist/components/gov-form-control.js +27 -27
- package/dist/components/gov-form-control.js.map +1 -1
- package/dist/components/gov-form-file.js +3 -1
- package/dist/components/gov-form-file.js.map +1 -1
- package/dist/components/gov-form-group.js +1 -0
- package/dist/components/gov-form-group.js.map +1 -1
- package/dist/components/gov-form-input2.js +11 -16
- package/dist/components/gov-form-input2.js.map +1 -1
- package/dist/components/gov-form-label.js +1 -0
- package/dist/components/gov-form-label.js.map +1 -1
- package/dist/components/gov-form-message2.js +5 -5
- package/dist/components/gov-form-message2.js.map +1 -1
- package/dist/components/gov-form-multi-select.js +9 -8
- package/dist/components/gov-form-multi-select.js.map +1 -1
- package/dist/components/gov-form-radio.js +7 -6
- package/dist/components/gov-form-radio.js.map +1 -1
- package/dist/components/gov-form-search.js +1 -2
- package/dist/components/gov-form-search.js.map +1 -1
- package/dist/components/gov-form-select2.js +9 -8
- package/dist/components/gov-form-select2.js.map +1 -1
- package/dist/components/gov-form-switch.js +7 -6
- package/dist/components/gov-form-switch.js.map +1 -1
- package/dist/components/gov-grid-item.js +2 -1
- package/dist/components/gov-grid-item.js.map +1 -1
- package/dist/components/gov-grid.js +1 -0
- package/dist/components/gov-grid.js.map +1 -1
- package/dist/components/gov-icon2.js +9 -3
- package/dist/components/gov-icon2.js.map +1 -1
- package/dist/components/{gov-layout-aside.d.ts → gov-layout-column.d.ts} +4 -4
- package/dist/components/gov-layout-column.js +39 -0
- package/dist/components/gov-layout-column.js.map +1 -0
- package/dist/components/gov-layout.js +17 -3
- package/dist/components/gov-layout.js.map +1 -1
- package/dist/components/gov-loading.js +2 -1
- package/dist/components/gov-loading.js.map +1 -1
- package/dist/components/gov-message.js +4 -1
- package/dist/components/gov-message.js.map +1 -1
- package/dist/components/gov-modal.js +3 -1
- package/dist/components/gov-modal.js.map +1 -1
- package/dist/components/gov-nav-item.js +1 -0
- package/dist/components/gov-nav-item.js.map +1 -1
- package/dist/components/gov-nav.js +3 -1
- package/dist/components/gov-nav.js.map +1 -1
- package/dist/components/gov-pagination.js +28 -21
- package/dist/components/gov-pagination.js.map +1 -1
- package/dist/components/gov-prompt.js +3 -1
- package/dist/components/gov-prompt.js.map +1 -1
- package/dist/components/gov-side-nav-item.js +2 -1
- package/dist/components/gov-side-nav-item.js.map +1 -1
- package/dist/components/gov-side-nav.js +3 -1
- package/dist/components/gov-side-nav.js.map +1 -1
- package/dist/components/gov-spacer.js +12 -13
- package/dist/components/gov-spacer.js.map +1 -1
- package/dist/components/gov-statsbar-item.js +2 -1
- package/dist/components/gov-statsbar-item.js.map +1 -1
- package/dist/components/gov-statsbar.js +6 -6
- package/dist/components/gov-statsbar.js.map +1 -1
- package/dist/components/gov-stepper-item.js +8 -10
- package/dist/components/gov-stepper-item.js.map +1 -1
- package/dist/components/gov-stepper.js +7 -7
- package/dist/components/gov-stepper.js.map +1 -1
- package/dist/components/gov-tabs-item.js +1 -0
- package/dist/components/gov-tabs-item.js.map +1 -1
- package/dist/components/gov-tabs.js +12 -9
- package/dist/components/gov-tabs.js.map +1 -1
- package/dist/components/gov-tile.js +1 -0
- package/dist/components/gov-tile.js.map +1 -1
- package/dist/components/gov-tiles.js +2 -1
- package/dist/components/gov-tiles.js.map +1 -1
- package/dist/components/gov-toast.js +22 -18
- package/dist/components/gov-toast.js.map +1 -1
- package/dist/components/gov-tooltip-content.js +1 -0
- package/dist/components/gov-tooltip-content.js.map +1 -1
- package/dist/components/gov-tooltip.js +14 -15
- package/dist/components/gov-tooltip.js.map +1 -1
- package/dist/components/gov-wizzard-item.js +8 -11
- package/dist/components/gov-wizzard-item.js.map +1 -1
- package/dist/components/gov-wizzard.js +7 -6
- package/dist/components/gov-wizzard.js.map +1 -1
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.js +1 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/props.js +3 -3
- package/dist/components/props.js.map +1 -1
- package/dist/components/template.js.map +1 -1
- package/dist/{esm/utils-3a968bb9.js → components/utils.js} +3 -2
- package/dist/components/utils.js.map +1 -0
- package/dist/components/variants.js +1 -1
- package/dist/components/variants.js.map +1 -1
- package/dist/components/wcag.js +1 -1
- package/dist/components/wcag.js.map +1 -1
- package/dist/components/win.js +3 -32
- package/dist/components/win.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-c9f0d988.entry.js → p-00182e76.entry.js} +2 -2
- package/dist/core/{p-c9f0d988.entry.js.map → p-00182e76.entry.js.map} +1 -1
- package/dist/core/{p-bbd48feb.entry.js → p-01bdd4a4.entry.js} +2 -2
- package/dist/core/{p-bbd48feb.entry.js.map → p-01bdd4a4.entry.js.map} +1 -1
- package/dist/core/p-0278fcb3.entry.js +2 -0
- package/dist/core/p-0278fcb3.entry.js.map +1 -0
- package/dist/core/p-0284b5e2.js +2 -0
- package/dist/core/p-0284b5e2.js.map +1 -0
- package/dist/core/{p-58691740.js → p-03990da5.js} +2 -2
- package/dist/core/p-03990da5.js.map +1 -0
- package/dist/core/p-03d40bf4.entry.js +2 -0
- package/dist/core/p-03d40bf4.entry.js.map +1 -0
- package/dist/core/{p-9680b966.entry.js → p-08f14c8b.entry.js} +2 -2
- package/dist/core/p-08f14c8b.entry.js.map +1 -0
- package/dist/core/p-0a152bb7.entry.js +2 -0
- package/dist/core/p-0a152bb7.entry.js.map +1 -0
- package/dist/core/p-14f8f2fb.js +2 -0
- package/dist/core/p-14f8f2fb.js.map +1 -0
- package/dist/core/p-2128abe1.entry.js +2 -0
- package/dist/core/p-2128abe1.entry.js.map +1 -0
- package/dist/core/p-22722ff3.entry.js +2 -0
- package/dist/core/p-22722ff3.entry.js.map +1 -0
- package/dist/core/p-2419f4cd.entry.js +2 -0
- package/dist/core/p-2419f4cd.entry.js.map +1 -0
- package/dist/core/p-24cde59e.entry.js.map +1 -1
- package/dist/core/p-25380da6.entry.js +2 -0
- package/dist/core/p-25380da6.entry.js.map +1 -0
- package/dist/core/p-26acf964.js +2 -0
- package/dist/core/p-26acf964.js.map +1 -0
- package/dist/core/p-34360f92.entry.js +2 -0
- package/dist/core/p-34360f92.entry.js.map +1 -0
- package/dist/core/{p-f58b9eec.js → p-364b4792.js} +2 -2
- package/dist/core/p-364b4792.js.map +1 -0
- package/dist/core/p-38fb2d42.entry.js +2 -0
- package/dist/core/p-38fb2d42.entry.js.map +1 -0
- package/dist/core/p-3e9ba1c1.entry.js +2 -0
- package/dist/core/p-3e9ba1c1.entry.js.map +1 -0
- package/dist/core/p-3f37ddb6.js.map +1 -1
- package/dist/core/p-404f469e.js +2 -0
- package/dist/core/p-404f469e.js.map +1 -0
- package/dist/core/p-4681cb3a.entry.js +2 -0
- package/dist/core/p-4681cb3a.entry.js.map +1 -0
- package/dist/core/p-469273be.entry.js +2 -0
- package/dist/core/p-469273be.entry.js.map +1 -0
- package/dist/core/p-4d73d70e.entry.js +2 -0
- package/dist/core/p-4d73d70e.entry.js.map +1 -0
- package/dist/core/{p-2c25aac5.entry.js → p-5547dbb0.entry.js} +2 -2
- package/dist/core/p-5547dbb0.entry.js.map +1 -0
- package/dist/core/p-5cecdaaf.entry.js +2 -0
- package/dist/core/{p-d9ffb84e.entry.js.map → p-5cecdaaf.entry.js.map} +1 -1
- package/dist/core/p-5defdc5e.js +2 -0
- package/dist/core/p-5defdc5e.js.map +1 -0
- package/dist/core/p-5fa41af9.js +2 -0
- package/dist/core/p-5fa41af9.js.map +1 -0
- package/dist/core/p-6278531b.js +2 -0
- package/dist/core/p-6278531b.js.map +1 -0
- package/dist/core/p-63079b80.entry.js +2 -0
- package/dist/core/p-63079b80.entry.js.map +1 -0
- package/dist/core/p-64ced668.js +2 -0
- package/dist/core/p-64ced668.js.map +1 -0
- package/dist/core/p-68d968ac.entry.js +2 -0
- package/dist/core/p-68d968ac.entry.js.map +1 -0
- package/dist/core/{p-6e1b9f39.entry.js → p-6d40721b.entry.js} +2 -2
- package/dist/core/{p-6e1b9f39.entry.js.map → p-6d40721b.entry.js.map} +1 -1
- package/dist/core/p-733bd593.entry.js.map +1 -1
- package/dist/core/{p-cbf4ad73.entry.js → p-7591ecd4.entry.js} +2 -2
- package/dist/core/{p-cbf4ad73.entry.js.map → p-7591ecd4.entry.js.map} +1 -1
- package/dist/core/p-76542f4f.js +2 -0
- package/dist/core/p-76542f4f.js.map +1 -0
- package/dist/core/p-7be3abb5.entry.js.map +1 -1
- package/dist/core/p-80e30702.js +2 -0
- package/dist/core/p-80e30702.js.map +1 -0
- package/dist/core/p-8965f84a.entry.js +2 -0
- package/dist/core/p-8965f84a.entry.js.map +1 -0
- package/dist/core/p-8a8d846c.entry.js +2 -0
- package/dist/core/{p-8e8340b0.entry.js.map → p-8a8d846c.entry.js.map} +1 -1
- package/dist/core/p-9144dde1.js +2 -0
- package/dist/core/p-9144dde1.js.map +1 -0
- package/dist/core/{p-90f818c0.entry.js → p-93facb4a.entry.js} +2 -2
- package/dist/core/p-93facb4a.entry.js.map +1 -0
- package/dist/core/p-9c844f4d.entry.js +2 -0
- package/dist/core/p-9c844f4d.entry.js.map +1 -0
- package/dist/core/p-9cc6ed83.entry.js +2 -0
- package/dist/core/p-9cc6ed83.entry.js.map +1 -0
- package/dist/core/p-9dd1bbdd.entry.js.map +1 -1
- package/dist/core/p-9e6a41cc.entry.js +2 -0
- package/dist/core/p-9e6a41cc.entry.js.map +1 -0
- package/dist/core/{p-64d3cf79.entry.js → p-a5e34e93.entry.js} +2 -2
- package/dist/core/p-a6c8d474.entry.js.map +1 -1
- package/dist/core/p-ad0cc981.entry.js +2 -0
- package/dist/core/p-ad0cc981.entry.js.map +1 -0
- package/dist/core/p-ae3e2d60.entry.js +2 -0
- package/dist/core/p-ae3e2d60.entry.js.map +1 -0
- package/dist/core/p-b48a3112.entry.js +2 -0
- package/dist/core/p-b48a3112.entry.js.map +1 -0
- package/dist/core/{p-59581b1b.entry.js → p-c0d3d3e0.entry.js} +2 -2
- package/dist/core/{p-59581b1b.entry.js.map → p-c0d3d3e0.entry.js.map} +1 -1
- package/dist/core/{p-2b4acb01.js → p-c20102ff.js} +2 -2
- package/dist/core/p-c20102ff.js.map +1 -0
- package/dist/core/p-cf6576fd.entry.js +2 -0
- package/dist/core/p-cf6576fd.entry.js.map +1 -0
- package/dist/core/p-e52a042f.entry.js.map +1 -1
- package/dist/core/p-e7dd2002.entry.js +2 -0
- package/dist/core/p-e7dd2002.entry.js.map +1 -0
- package/dist/core/p-eb1214ab.entry.js +2 -0
- package/dist/core/p-eb1214ab.entry.js.map +1 -0
- package/dist/core/p-ec617f18.entry.js +2 -0
- package/dist/core/p-ec617f18.entry.js.map +1 -0
- package/dist/core/p-ef79904e.js +2 -0
- package/dist/core/p-ef79904e.js.map +1 -0
- package/dist/core/p-f1fe9358.entry.js +2 -0
- package/dist/core/p-f1fe9358.entry.js.map +1 -0
- package/dist/core/p-f2dc8ce3.entry.js.map +1 -1
- package/dist/core/p-f531f5c4.entry.js +2 -0
- package/dist/core/p-f531f5c4.entry.js.map +1 -0
- package/dist/core/p-f5ee7634.entry.js +2 -0
- package/dist/core/p-f5ee7634.entry.js.map +1 -0
- package/dist/core/p-f5ffcb3d.entry.js +2 -0
- package/dist/core/p-f5ffcb3d.entry.js.map +1 -0
- package/dist/core/p-f687452c.js +2 -0
- package/dist/core/p-f687452c.js.map +1 -0
- package/dist/core/{p-08524615.entry.js → p-fc1581f9.entry.js} +2 -2
- package/dist/core/{p-08524615.entry.js.map → p-fc1581f9.entry.js.map} +1 -1
- package/dist/core/{p-fd62c386.entry.js → p-fc91591d.entry.js} +2 -2
- package/dist/core/{p-fd62c386.entry.js.map → p-fc91591d.entry.js.map} +1 -1
- package/dist/core/p-fc9d66ae.entry.js +2 -0
- package/dist/core/{p-9baa1a0e.entry.js.map → p-fc9d66ae.entry.js.map} +1 -1
- package/dist/core/{p-99cc3dba.js → p-ff7365ae.js} +2 -2
- package/dist/core/p-ff7365ae.js.map +1 -0
- package/dist/core/p-ffb7495c.js +2 -0
- package/dist/core/p-ffb7495c.js.map +1 -0
- package/dist/custom-elements/index.d.ts +4 -10
- package/dist/custom-elements/index.js +1 -1
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/constants-136d4cd3.js +16 -0
- package/dist/esm/constants-136d4cd3.js.map +1 -0
- package/dist/esm/{constants-4d4cc5e1.js → constants-14a7ba8e.js} +7 -5
- package/dist/esm/constants-14a7ba8e.js.map +1 -0
- package/dist/esm/constants-1a2146b2.js +32 -0
- package/dist/esm/constants-1a2146b2.js.map +1 -0
- package/dist/esm/constants-24dad929.js +29 -0
- package/dist/esm/constants-24dad929.js.map +1 -0
- package/dist/esm/{constants-2cd89f93.js → constants-2b14bb01.js} +1 -3
- package/dist/esm/constants-2b14bb01.js.map +1 -0
- package/dist/esm/constants-2e8258cf.js +15 -0
- package/dist/esm/constants-2e8258cf.js.map +1 -0
- package/dist/esm/constants-3786b01b.js +22 -0
- package/dist/esm/constants-3786b01b.js.map +1 -0
- package/dist/esm/constants-3df712e2.js +13 -0
- package/dist/esm/constants-3df712e2.js.map +1 -0
- package/dist/esm/{constants-ec176a77.js → constants-78474786.js} +7 -4
- package/dist/esm/constants-78474786.js.map +1 -0
- package/dist/esm/constants-bf5a583f.js +24 -0
- package/dist/esm/constants-bf5a583f.js.map +1 -0
- package/dist/esm/constants-d550c816.js +22 -0
- package/dist/esm/constants-d550c816.js.map +1 -0
- package/dist/esm/constants-f7b618c2.js +23 -0
- package/dist/esm/constants-f7b618c2.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{form-121eab06.js → form-95b9a91b.js} +36 -9
- package/dist/esm/form-95b9a91b.js.map +1 -0
- package/dist/esm/gov-accordion-item.entry.js +8 -8
- package/dist/esm/gov-accordion-item.entry.js.map +1 -1
- package/dist/esm/gov-accordion.entry.js +10 -10
- package/dist/esm/gov-accordion.entry.js.map +1 -1
- package/dist/esm/gov-alert.entry.js +6 -4
- package/dist/esm/gov-alert.entry.js.map +1 -1
- package/dist/esm/gov-app.entry.js +165 -45
- package/dist/esm/gov-app.entry.js.map +1 -1
- package/dist/esm/gov-attachments_3.entry.js +9 -9
- package/dist/esm/gov-attachments_3.entry.js.map +1 -1
- package/dist/esm/gov-backdrop.entry.js +4 -4
- package/dist/esm/gov-backdrop.entry.js.map +1 -1
- package/dist/esm/gov-badge.entry.js +11 -10
- package/dist/esm/gov-badge.entry.js.map +1 -1
- package/dist/esm/gov-breadcrumbs.entry.js +4 -5
- package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
- package/dist/esm/gov-button.entry.js +12 -23
- package/dist/esm/gov-button.entry.js.map +1 -1
- package/dist/esm/gov-card.entry.js +3 -3
- package/dist/esm/gov-card.entry.js.map +1 -1
- package/dist/esm/gov-container.entry.js.map +1 -1
- package/dist/esm/gov-cookiebar.entry.js.map +1 -1
- package/dist/esm/gov-empty.entry.js.map +1 -1
- package/dist/esm/gov-error-code.entry.js.map +1 -1
- package/dist/esm/gov-form-autocomplete.entry.js +8 -8
- package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
- package/dist/esm/gov-form-checkbox.entry.js +13 -22
- package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
- package/dist/esm/gov-form-control.entry.js +30 -29
- package/dist/esm/gov-form-control.entry.js.map +1 -1
- package/dist/esm/gov-form-file.entry.js +8 -8
- package/dist/esm/gov-form-file.entry.js.map +1 -1
- package/dist/esm/gov-form-input.entry.js +13 -19
- package/dist/esm/gov-form-input.entry.js.map +1 -1
- package/dist/esm/gov-form-multi-select.entry.js +10 -10
- package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
- package/dist/esm/gov-form-radio.entry.js +12 -12
- package/dist/esm/gov-form-radio.entry.js.map +1 -1
- package/dist/esm/gov-form-search.entry.js +0 -2
- package/dist/esm/gov-form-search.entry.js.map +1 -1
- package/dist/esm/gov-form-select.entry.js +13 -13
- package/dist/esm/gov-form-select.entry.js.map +1 -1
- package/dist/esm/gov-form-switch.entry.js +12 -12
- package/dist/esm/gov-form-switch.entry.js.map +1 -1
- package/dist/esm/gov-grid-item.entry.js +2 -3
- package/dist/esm/gov-grid-item.entry.js.map +1 -1
- package/dist/esm/gov-grid.entry.js +1 -2
- package/dist/esm/gov-grid.entry.js.map +1 -1
- package/dist/esm/gov-icon.entry.js +10 -5
- package/dist/esm/gov-icon.entry.js.map +1 -1
- package/dist/esm/gov-layout-column.entry.js +21 -0
- package/dist/esm/gov-layout-column.entry.js.map +1 -0
- package/dist/esm/gov-layout.entry.js +12 -3
- package/dist/esm/gov-layout.entry.js.map +1 -1
- package/dist/esm/gov-loading.entry.js +1 -1
- package/dist/esm/gov-loading.entry.js.map +1 -1
- package/dist/esm/gov-message.entry.js +4 -2
- package/dist/esm/gov-message.entry.js.map +1 -1
- package/dist/esm/gov-modal.entry.js +3 -3
- package/dist/esm/gov-modal.entry.js.map +1 -1
- package/dist/esm/gov-nav.entry.js +3 -3
- package/dist/esm/gov-pagination.entry.js +27 -22
- package/dist/esm/gov-pagination.entry.js.map +1 -1
- package/dist/esm/gov-prompt.entry.js +3 -3
- package/dist/esm/gov-prompt.entry.js.map +1 -1
- package/dist/esm/gov-side-nav-item.entry.js +1 -1
- package/dist/esm/gov-side-nav-item.entry.js.map +1 -1
- package/dist/esm/gov-side-nav.entry.js +3 -3
- package/dist/esm/gov-side-nav.entry.js.map +1 -1
- package/dist/esm/gov-spacer.entry.js +11 -13
- package/dist/esm/gov-spacer.entry.js.map +1 -1
- package/dist/esm/gov-statsbar-item.entry.js +4 -2
- package/dist/esm/gov-statsbar-item.entry.js.map +1 -1
- package/dist/esm/gov-statsbar.entry.js +7 -6
- package/dist/esm/gov-statsbar.entry.js.map +1 -1
- package/dist/esm/gov-stepper-item.entry.js +9 -9
- package/dist/esm/gov-stepper-item.entry.js.map +1 -1
- package/dist/esm/gov-stepper.entry.js +9 -8
- package/dist/esm/gov-stepper.entry.js.map +1 -1
- package/dist/esm/gov-tabs-item.entry.js +3 -3
- package/dist/esm/gov-tabs-item.entry.js.map +1 -1
- package/dist/esm/gov-tabs.entry.js +11 -11
- package/dist/esm/gov-tabs.entry.js.map +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-tiles.entry.js.map +1 -1
- package/dist/esm/gov-toast.entry.js +21 -18
- package/dist/esm/gov-toast.entry.js.map +1 -1
- package/dist/esm/gov-tooltip-content.entry.js +3 -2
- package/dist/esm/gov-tooltip-content.entry.js.map +1 -1
- package/dist/esm/gov-tooltip.entry.js +15 -14
- package/dist/esm/gov-tooltip.entry.js.map +1 -1
- package/dist/esm/gov-wizzard-item.entry.js +10 -11
- package/dist/esm/gov-wizzard-item.entry.js.map +1 -1
- package/dist/esm/gov-wizzard.entry.js +9 -9
- package/dist/esm/gov-wizzard.entry.js.map +1 -1
- package/dist/esm/index-00e9a0d5.js +2 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{props-cb992af5.js → props-789f7529.js} +4 -4
- package/dist/esm/props-789f7529.js.map +1 -0
- package/dist/esm/template-10332292.js.map +1 -1
- package/dist/esm/utils-c057a3fa.js +35 -0
- package/dist/esm/utils-c057a3fa.js.map +1 -0
- package/dist/esm/{variants-b5641e3d.js → variants-2b936d58.js} +2 -2
- package/dist/esm/variants-2b936d58.js.map +1 -0
- package/dist/esm/{wcag-af732bfe.js → wcag-3792d4bb.js} +2 -2
- package/dist/esm/wcag-3792d4bb.js.map +1 -0
- package/dist/esm/{win-cb090c11.js → win-9c8460bb.js} +3 -3
- package/dist/esm/win-9c8460bb.js.map +1 -0
- package/dist/hydrate/index.js +532 -390
- package/dist/types/components/gov-accordion/constants.d.ts +7 -6
- package/dist/types/components/gov-accordion/gov-accordion-item.d.ts +3 -3
- package/dist/types/components/gov-accordion/gov-accordion.d.ts +3 -3
- package/dist/types/components/gov-alert/constants.d.ts +4 -3
- package/dist/types/components/gov-app/gov-app.d.ts +1 -1
- package/dist/types/components/gov-attachments/gov-attachments-item.d.ts +1 -1
- package/dist/types/components/gov-backdrop/gov-backdrop.d.ts +1 -1
- package/dist/types/components/gov-badge/constants.d.ts +4 -3
- package/dist/types/components/gov-badge/gov-badge.d.ts +4 -4
- package/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.ts +1 -1
- package/dist/types/components/gov-button/constants.d.ts +20 -10
- package/dist/types/components/gov-button/gov-button.d.ts +6 -8
- package/dist/types/components/gov-cookiebar/gov-cookiebar.d.ts +1 -1
- package/dist/types/components/gov-form/autocomplete/constants.d.ts +7 -6
- package/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +3 -3
- package/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.types.d.ts +3 -0
- package/dist/types/components/gov-form/checkbox/constants.d.ts +4 -3
- package/dist/types/components/gov-form/checkbox/gov-form-checkbox.d.ts +3 -4
- package/dist/types/components/gov-form/control/constants.d.ts +4 -3
- package/dist/types/components/gov-form/control/gov-form-control.d.ts +3 -3
- package/dist/types/components/gov-form/file/gov-form-file.d.ts +1 -1
- package/dist/types/components/gov-form/file/gov-form-file.types.d.ts +6 -0
- package/dist/types/components/gov-form/input/constants.d.ts +27 -10
- package/dist/types/components/gov-form/input/gov-form-input.d.ts +5 -5
- package/dist/types/components/gov-form/message/constants.d.ts +4 -3
- package/dist/types/components/gov-form/message/gov-form-message.d.ts +3 -3
- package/dist/types/components/gov-form/multiselect/constants.d.ts +7 -6
- package/dist/types/components/gov-form/multiselect/gov-form-multi-select.d.ts +4 -4
- package/dist/types/components/gov-form/radio/constants.d.ts +4 -3
- package/dist/types/components/gov-form/radio/gov-form-radio.d.ts +2 -2
- package/dist/types/components/gov-form/search/constants.d.ts +0 -6
- package/dist/types/components/gov-form/select/constants.d.ts +7 -6
- package/dist/types/components/gov-form/select/gov-form-select.d.ts +3 -3
- package/dist/types/components/gov-form/switch/constants.d.ts +4 -3
- package/dist/types/components/gov-form/switch/gov-form-switch.d.ts +2 -2
- package/dist/types/components/gov-grid/constants.d.ts +0 -3
- package/dist/types/components/gov-icon/constants.d.ts +8 -2
- package/dist/types/components/gov-layout/constants.d.ts +14 -6
- package/dist/types/components/gov-layout/gov-layout-column.d.ts +6 -0
- package/dist/types/components/gov-layout/gov-layout.d.ts +14 -0
- package/dist/types/components/gov-message/constants.d.ts +4 -3
- package/dist/types/components/gov-message/gov-message.d.ts +2 -2
- package/dist/types/components/gov-pagination/constants.d.ts +12 -8
- package/dist/types/components/gov-pagination/gov-pagination.d.ts +6 -6
- package/dist/types/components/gov-spacer/constants.d.ts +11 -4
- package/dist/types/components/gov-spacer/gov-spacer.d.ts +2 -2
- package/dist/types/components/gov-statsbar/constants.d.ts +8 -4
- package/dist/types/components/gov-statsbar/gov-statsbar-item.d.ts +1 -1
- package/dist/types/components/gov-statsbar/gov-statsbar.d.ts +1 -1
- package/dist/types/components/gov-stepper/constants.d.ts +7 -6
- package/dist/types/components/gov-stepper/gov-stepper-item.d.ts +3 -3
- package/dist/types/components/gov-stepper/gov-stepper.d.ts +4 -4
- package/dist/types/components/gov-tabs/constants.d.ts +14 -8
- package/dist/types/components/gov-tabs/gov-tabs.d.ts +9 -5
- package/dist/types/components/gov-tabs/gov-tabs.types.d.ts +8 -0
- package/dist/types/components/gov-toast/constants.d.ts +6 -5
- package/dist/types/components/gov-toast/gov-toast.d.ts +7 -6
- package/dist/types/components/gov-tooltip/constants.d.ts +9 -9
- package/dist/types/components/gov-tooltip/gov-tooltip.d.ts +4 -4
- package/dist/types/components/gov-wizzard/constants.d.ts +7 -6
- package/dist/types/components/gov-wizzard/gov-wizzard-item.d.ts +3 -3
- package/dist/types/components/gov-wizzard/gov-wizzard.d.ts +2 -2
- package/dist/types/components.d.ts +157 -153
- package/dist/types/helpers/Dom/form.d.ts +2 -2
- package/dist/types/helpers/Dom/form.types.d.ts +9 -0
- package/dist/types/helpers/Dom/template.d.ts +1 -1
- package/dist/types/helpers/Dom/template.types.d.ts +12 -0
- package/dist/types/helpers/Validate/props.d.ts +1 -1
- package/dist/types/types/interfaces.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/constants-0c6897bc.js.map +0 -1
- package/dist/cjs/constants-24f26d54.js +0 -15
- package/dist/cjs/constants-24f26d54.js.map +0 -1
- package/dist/cjs/constants-404ee283.js +0 -21
- package/dist/cjs/constants-404ee283.js.map +0 -1
- package/dist/cjs/constants-477ca85a.js.map +0 -1
- package/dist/cjs/constants-5c8f444a.js.map +0 -1
- package/dist/cjs/constants-5ca7e728.js +0 -18
- package/dist/cjs/constants-5ca7e728.js.map +0 -1
- package/dist/cjs/constants-8c9eeb15.js +0 -20
- package/dist/cjs/constants-8c9eeb15.js.map +0 -1
- package/dist/cjs/constants-a44c32bc.js.map +0 -1
- package/dist/cjs/constants-a92bbccb.js +0 -17
- package/dist/cjs/constants-a92bbccb.js.map +0 -1
- package/dist/cjs/constants-b39578d9.js +0 -29
- package/dist/cjs/constants-b39578d9.js.map +0 -1
- package/dist/cjs/constants-b3c2277b.js +0 -23
- package/dist/cjs/constants-b3c2277b.js.map +0 -1
- package/dist/cjs/constants-b8ec7b03.js +0 -32
- package/dist/cjs/constants-b8ec7b03.js.map +0 -1
- package/dist/cjs/form-d9f0f50c.js.map +0 -1
- package/dist/cjs/gov-layout-aside.cjs.entry.js +0 -26
- package/dist/cjs/gov-layout-aside.cjs.entry.js.map +0 -1
- package/dist/cjs/gov-layout-content.cjs.entry.js +0 -26
- package/dist/cjs/gov-layout-content.cjs.entry.js.map +0 -1
- package/dist/cjs/props-cc21d3d7.js.map +0 -1
- package/dist/cjs/utils-4ae73637.js.map +0 -1
- package/dist/cjs/variants-bacf037a.js.map +0 -1
- package/dist/cjs/wcag-eca97102.js.map +0 -1
- package/dist/cjs/win-ac5c1806.js.map +0 -1
- package/dist/collection/components/gov-layout/gov-layout-aside.js +0 -47
- package/dist/collection/components/gov-layout/gov-layout-aside.js.map +0 -1
- package/dist/collection/components/gov-layout/gov-layout-content.css +0 -227
- package/dist/collection/components/gov-layout/gov-layout-content.js +0 -47
- package/dist/collection/components/gov-layout/gov-layout-content.js.map +0 -1
- package/dist/collection/core/constants/breakpoint.js +0 -9
- package/dist/collection/core/constants/breakpoint.js.map +0 -1
- package/dist/components/gov-layout-aside.js +0 -41
- package/dist/components/gov-layout-aside.js.map +0 -1
- package/dist/components/gov-layout-content.d.ts +0 -11
- package/dist/components/gov-layout-content.js +0 -41
- package/dist/components/gov-layout-content.js.map +0 -1
- package/dist/core/p-097332b9.entry.js +0 -2
- package/dist/core/p-097332b9.entry.js.map +0 -1
- package/dist/core/p-09b38102.entry.js +0 -2
- package/dist/core/p-09b38102.entry.js.map +0 -1
- package/dist/core/p-1525ef03.entry.js +0 -2
- package/dist/core/p-1525ef03.entry.js.map +0 -1
- package/dist/core/p-1ffe4cac.entry.js +0 -2
- package/dist/core/p-1ffe4cac.entry.js.map +0 -1
- package/dist/core/p-22c3946b.entry.js +0 -2
- package/dist/core/p-22c3946b.entry.js.map +0 -1
- package/dist/core/p-28f08f8b.entry.js +0 -2
- package/dist/core/p-28f08f8b.entry.js.map +0 -1
- package/dist/core/p-2b19bea6.entry.js +0 -2
- package/dist/core/p-2b19bea6.entry.js.map +0 -1
- package/dist/core/p-2b4acb01.js.map +0 -1
- package/dist/core/p-2c25aac5.entry.js.map +0 -1
- package/dist/core/p-2c9031ef.entry.js +0 -2
- package/dist/core/p-2c9031ef.entry.js.map +0 -1
- package/dist/core/p-3426a731.entry.js +0 -2
- package/dist/core/p-3426a731.entry.js.map +0 -1
- package/dist/core/p-3b8d7a9a.entry.js +0 -2
- package/dist/core/p-3b8d7a9a.entry.js.map +0 -1
- package/dist/core/p-44f22320.entry.js +0 -2
- package/dist/core/p-44f22320.entry.js.map +0 -1
- package/dist/core/p-468873ec.entry.js +0 -2
- package/dist/core/p-468873ec.entry.js.map +0 -1
- package/dist/core/p-48a7c794.entry.js +0 -2
- package/dist/core/p-48a7c794.entry.js.map +0 -1
- package/dist/core/p-4e21ca0f.entry.js +0 -2
- package/dist/core/p-4e21ca0f.entry.js.map +0 -1
- package/dist/core/p-58691740.js.map +0 -1
- package/dist/core/p-5f7e38b6.entry.js +0 -2
- package/dist/core/p-5f7e38b6.entry.js.map +0 -1
- package/dist/core/p-64445e87.js +0 -2
- package/dist/core/p-64445e87.js.map +0 -1
- package/dist/core/p-68d4837b.entry.js +0 -2
- package/dist/core/p-68d4837b.entry.js.map +0 -1
- package/dist/core/p-6ce1f525.js +0 -2
- package/dist/core/p-6ce1f525.js.map +0 -1
- package/dist/core/p-708963e6.js +0 -2
- package/dist/core/p-708963e6.js.map +0 -1
- package/dist/core/p-71134d97.js +0 -2
- package/dist/core/p-71134d97.js.map +0 -1
- package/dist/core/p-78a4be4b.entry.js +0 -2
- package/dist/core/p-78a4be4b.entry.js.map +0 -1
- package/dist/core/p-803629e9.entry.js +0 -2
- package/dist/core/p-803629e9.entry.js.map +0 -1
- package/dist/core/p-808cd4b7.entry.js +0 -2
- package/dist/core/p-808cd4b7.entry.js.map +0 -1
- package/dist/core/p-8e8340b0.entry.js +0 -2
- package/dist/core/p-8ebc3217.js +0 -2
- package/dist/core/p-8ebc3217.js.map +0 -1
- package/dist/core/p-8eece26f.entry.js +0 -2
- package/dist/core/p-8eece26f.entry.js.map +0 -1
- package/dist/core/p-90f818c0.entry.js.map +0 -1
- package/dist/core/p-951d9c21.js +0 -2
- package/dist/core/p-951d9c21.js.map +0 -1
- package/dist/core/p-9680b966.entry.js.map +0 -1
- package/dist/core/p-9711e4e5.entry.js +0 -2
- package/dist/core/p-9711e4e5.entry.js.map +0 -1
- package/dist/core/p-99cc3dba.js.map +0 -1
- package/dist/core/p-9baa1a0e.entry.js +0 -2
- package/dist/core/p-a2f9daba.js +0 -2
- package/dist/core/p-a2f9daba.js.map +0 -1
- package/dist/core/p-a32723d4.entry.js +0 -2
- package/dist/core/p-a32723d4.entry.js.map +0 -1
- package/dist/core/p-a5b02584.js +0 -2
- package/dist/core/p-a5b02584.js.map +0 -1
- package/dist/core/p-b4581984.js +0 -2
- package/dist/core/p-b4581984.js.map +0 -1
- package/dist/core/p-b5935207.entry.js +0 -2
- package/dist/core/p-b5935207.entry.js.map +0 -1
- package/dist/core/p-ba500f74.entry.js +0 -2
- package/dist/core/p-ba500f74.entry.js.map +0 -1
- package/dist/core/p-c9e7a558.entry.js +0 -2
- package/dist/core/p-c9e7a558.entry.js.map +0 -1
- package/dist/core/p-cbe6523f.entry.js +0 -2
- package/dist/core/p-cbe6523f.entry.js.map +0 -1
- package/dist/core/p-cd4f034f.js +0 -2
- package/dist/core/p-cd4f034f.js.map +0 -1
- package/dist/core/p-d4aaff74.js +0 -2
- package/dist/core/p-d4aaff74.js.map +0 -1
- package/dist/core/p-d65f71e1.js +0 -2
- package/dist/core/p-d65f71e1.js.map +0 -1
- package/dist/core/p-d9ffb84e.entry.js +0 -2
- package/dist/core/p-dc87f017.entry.js +0 -2
- package/dist/core/p-dc87f017.entry.js.map +0 -1
- package/dist/core/p-eadaa1d1.entry.js +0 -2
- package/dist/core/p-eadaa1d1.entry.js.map +0 -1
- package/dist/core/p-ef3e7866.js +0 -2
- package/dist/core/p-ef3e7866.js.map +0 -1
- package/dist/core/p-f1226ef1.entry.js +0 -2
- package/dist/core/p-f1226ef1.entry.js.map +0 -1
- package/dist/core/p-f4030908.entry.js +0 -2
- package/dist/core/p-f4030908.entry.js.map +0 -1
- package/dist/core/p-f58b9eec.js.map +0 -1
- package/dist/core/p-f82535b7.js +0 -2
- package/dist/core/p-f82535b7.js.map +0 -1
- package/dist/core/p-fc3c7246.entry.js +0 -2
- package/dist/core/p-fc3c7246.entry.js.map +0 -1
- package/dist/esm/constants-129909d1.js +0 -14
- package/dist/esm/constants-129909d1.js.map +0 -1
- package/dist/esm/constants-1f1d1d3e.js +0 -16
- package/dist/esm/constants-1f1d1d3e.js.map +0 -1
- package/dist/esm/constants-2cd89f93.js.map +0 -1
- package/dist/esm/constants-3b157470.js +0 -23
- package/dist/esm/constants-3b157470.js.map +0 -1
- package/dist/esm/constants-3de0521d.js +0 -27
- package/dist/esm/constants-3de0521d.js.map +0 -1
- package/dist/esm/constants-4331e6d9.js +0 -12
- package/dist/esm/constants-4331e6d9.js.map +0 -1
- package/dist/esm/constants-4cdfde31.js +0 -14
- package/dist/esm/constants-4cdfde31.js.map +0 -1
- package/dist/esm/constants-4d4cc5e1.js.map +0 -1
- package/dist/esm/constants-8f0bcad2.js +0 -21
- package/dist/esm/constants-8f0bcad2.js.map +0 -1
- package/dist/esm/constants-b49812cd.js +0 -16
- package/dist/esm/constants-b49812cd.js.map +0 -1
- package/dist/esm/constants-c8f57790.js +0 -19
- package/dist/esm/constants-c8f57790.js.map +0 -1
- package/dist/esm/constants-ec176a77.js.map +0 -1
- package/dist/esm/form-121eab06.js.map +0 -1
- package/dist/esm/gov-layout-aside.entry.js +0 -22
- package/dist/esm/gov-layout-aside.entry.js.map +0 -1
- package/dist/esm/gov-layout-content.entry.js +0 -22
- package/dist/esm/gov-layout-content.entry.js.map +0 -1
- package/dist/esm/props-cb992af5.js.map +0 -1
- package/dist/esm/utils-3a968bb9.js.map +0 -1
- package/dist/esm/variants-b5641e3d.js.map +0 -1
- package/dist/esm/wcag-af732bfe.js.map +0 -1
- package/dist/esm/win-cb090c11.js.map +0 -1
- package/dist/types/components/gov-layout/gov-layout-aside.d.ts +0 -10
- package/dist/types/components/gov-layout/gov-layout-content.d.ts +0 -10
- package/dist/types/core/constants/breakpoint.d.ts +0 -8
- /package/dist/core/{p-64d3cf79.entry.js.map → p-a5e34e93.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-card.js","mappings":";;;;;;;;AAAO,MAAM,SAAS,GAAG;EACxB,IAAI,EAAE,UAAU;EAChB,MAAM,EAAE,kBAAkB;EAC1B,KAAK,EAAE,iBAAiB;EACxB,KAAK,EAAE,iBAAiB;EACxB,GAAG,EAAE,eAAe;EACpB,IAAI,EAAE,gBAAgB;EACtB,OAAO,EAAE,mBAAmB;EAC5B,IAAI,EAAE,gBAAgB;EACtB,IAAI,EAAE,gBAAgB;EACtB,MAAM,EAAE,kBAAkB;EAC1B,KAAK,EAAE,iBAAiB;CACxB;;ACZD,MAAM,UAAU,GAAG,syKAAsyK;;MCe5yKA,SAAO;EAKnB;;;;qBAWsC,KAAK;;uBAQH,KAAK;oBAIR,KAAK;uBAI0B,IAAI;;;;IA1BvE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAA;IAC7C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAA;GAC3C;EAuCD,mBAAmB,CAAC,QAAgB;IACnC,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;IAC9D,IAAI,QAAQ,EAAE;MACb,IAAI,CA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,CACI,EAEL,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,KACxB,WAAK,KAAK,EAAE,SAAS,CAAC,MAAM,IAC3B,YAAM,IAAI,EAAC,QAAQ,GAAG,CACjB,CACN,CACI,CACA,EACP;GACD;EAEO,cAAc,CAAC,CAAC;IACvB,CAAC,CAAC,eAAe,EAAE,CAAA;IACnB,IAAI,IAAI,CAAC,WAAW,EAAE;MACrB,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,UAAU,CAAA;MAClC,IAAI,CAAC,WAAW,EAAE,CAAA;KAClB;GACD;;;;EAMD,MAAM,IAAI;IACT,IAAI,IAAI,CAAC,WAAW,EAAE;MACrB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;MACtB,IAAI,CAAC,WAAW,EAAE,CAAA;KAClB;GACD;;;;EAMD,MAAM,KAAK;IACV,IAAI,IAAI,CAAC,WAAW,EAAE;MACrB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;MACvB,IAAI,CAAC,WAAW,EAAE,CAAA;KAClB;GACD;;;;EAMD,MAAM,YAAY;IACjB,IAAI,IAAI,CAAC,WAAW,EAAE;MACrB,iBAAiB,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;KACpF;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovCard"],"sources":["../../../packages/core/src/components/gov-card/constants.ts","../../../packages/core/src/components/gov-card/gov-card.scss?tag=gov-card","../../../packages/core/src/components/gov-card/gov-card.tsx"],"sourcesContent":["export const CardClass = {\n\troot: 'gov-card',\n\theader: 'gov-card__header',\n\ttitle: 'gov-card__title',\n\tinner: 'gov-card__inner',\n\timg: 'gov-card__img',\n\tmain: 'gov-card__main',\n\tcontent: 'gov-card__content',\n\ticon: 'gov-card__icon',\n\tbtns: 'gov-card__btns',\n\tfooter: 'gov-card__footer',\n\tarrow: 'gov-card__arrow',\n}\n","/*\n * Alert\n */\n\n$class: \".gov-card\";\n\n#{$class} {\n\t@include base(flex);\n\tflex-direction: column;\n\tborder: $card-border;\n\tborder-radius: $border-radius;\n\tbackground: $card-bg;\n\toverflow: hidden;\n\t&__header {\n\t\tgap: rem-calc(28);\n\t\twidth: 100%;\n\t\tpadding: rem-calc(24);\n\t\tborder-bottom: $card-border;\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t\ttext-transform: none;\n\t\ttransition: background-color $t ease-in-out;\n\t}\n\t&__arrow {\n\t\tflex: 0 0 auto;\n\t\twidth: rem-calc(16);\n\t\theight: rem-calc(16);\n\t\tcolor: $card-arrow-color;\n\t}\n\t&__title {\n\t\t@include general;\n\t\t@include typography($font-size-xl);\n\t\tcolor: $card-title-color;\n\t\tfont-weight: 700;\n\t}\n\t&__img {\n\t\twidth: 100%;\n\t\tmargin: 0;\n\t\tline-height: 1;\n\t\timg {\n\t\t\twidth: 100%;\n\t\t\theight: auto;\n\t\t}\n\t}\n\t&__inner {\n\t\tdisplay: flex;\n\t\tflex: 1 1 auto;\n\t\tflex-direction: column;\n\t\t@include parameter(\"aria-hidden\") {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\t&__main {\n\t\tdisplay: flex;\n\t\tgap: 16px 24px;\n\t\tflex: 1 1 auto;\n\t\tflex-direction: column;\n\t\tpadding: rem-calc(24);\n\t}\n\t&__icon {\n\t\tflex: 0 0 auto;\n\t\twidth: rem-calc(40);\n\t\theight: rem-calc(40);\n\t\tcolor: $card-icon-color;\n\t}\n\t&__btns {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\tflex: 0 0 auto;\n\t\tflex-wrap: wrap;\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t}\n\t&__footer {\n\t\t@include reset-last-margin();\n\t\tpadding: rem-calc(16 24);\n\t\tbackground: $card-footer-bg;\n\t\tp {\n\t\t\t@include typography($font-size-s);\n\t\t}\n\t}\n\n\t// STATES\n\t@include parameter(\"is-expanded\") {\n\t\theight: 100%;\n\t}\n\n\t// VARIANTS\n\t@include parameter(\"collapsible\") {\n\t\t#{$class} {\n\t\t\t&__header {\n\t\t\t\t@include button-core();\n\t\t\t\t@include focus-outline($border-radius, rem-calc(-2));\n\t\t\t\tjustify-content: space-between;\n\t\t\t\ttext-align: left;\n\t\t\t\t@include hover() {\n\t\t\t\t\tbackground: $card-header-hover-bg;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// STATES\n\t\t@include parameter(\"is-expanded\") {\n\t\t\t#{$class} {\n\t\t\t\t&__header {\n\t\t\t\t\tborder-bottom: $card-border;\n\t\t\t\t}\n\t\t\t\t&__arrow {\n\t\t\t\t\ttransform: scale(-1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t// VARIANTS\n\t\t@include parameter(\"promotion\") {\n\t\t\t#{$class} {\n\t\t\t\t&__main {\n\t\t\t\t\tflex-direction: row;\n\t\t\t\t\tpadding: rem-calc(32);\n\t\t\t\t}\n\t\t\t\t&__icon {\n\t\t\t\t\twidth: rem-calc(48);\n\t\t\t\t\theight: rem-calc(48);\n\t\t\t\t}\n\t\t\t\t&__btns {\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch, State, Method, Event, EventEmitter } from '@stencil/core'\nimport { CardClass } from './constants'\nimport { govHost, booleanString } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.d'\nimport { createID } from '../../utils/string.utils'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { GovCardChangeEvent } from './interfaces';\n\n@Component({\n\ttag: 'gov-card',\n\tstyleUrl: 'gov-card.scss',\n})\nexport class GovCard {\n\tprivate h: GovHost\n\tprivate readonly headlineId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.headlineId = createID('GovCardHeadline')\n\t\tthis.contentId = createID('GovCardContent')\n\t}\n\n\t@Element() host: HTMLGovCardElement\n\n\t/**\n\t * Style variation of the card.\n\t */\n\t@Prop() readonly promotion: boolean = false\n\t/**\n\t * Item label of the card\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Defines wether the card can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Defines whether the card is open or closed by default\n\t */\n\t@Prop() readonly expanded: boolean = false\n\t/**\n\t * Used to change the HMTL tag in the card headline for correct semantic structure\n\t */\n\t@Prop({ attribute: 'headline-tag' }) readonly headlineTag: string = 'h3'\n\t/**\n\t * Adds accessible label for the collapsible button that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-trigger-label' }) wcagTriggerLabel: string\n\t/**\n\t * A string of identifiers that indicate alternative label elements for collapsible card\n\t */\n\t@Prop({ attribute: 'wcag-trigger-labelled-by' }) wcagTriggerLabelledBy: string\n\t/**\n\t * Called when the card toggle state changes\n\t */\n\t@Event({ eventName: 'gov-toggle' }) govToggle: EventEmitter<GovCardChangeEvent>\n\t@State() isExpanded: boolean\n\n\t@Watch('headlineTag')\n\tvalidateHeadlineTag(newValue: string): void {\n\t\tconst validTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'span']\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${CardClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.isExpanded = this.label ? this.expanded : true\n\t\tthis.validateHeadlineTag(this.headlineTag)\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\tprivate emmitChange(): void {\n\t\tthis.govToggle.emit({ open: this.isExpanded, element: this.host })\n\t}\n\n\trender() {\n\t\tconst HeadlineTag = this.headlineTag\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(CardClass.root)} is-expanded={this.isExpanded} collapsible={booleanString(this.collapsible)} promotion={this.promotion}>\n\t\t\t\t{this.label && this.collapsible ? (\n\t\t\t\t\t<button\n\t\t\t\t\t\tid={this.headlineId}\n\t\t\t\t\t\tclass={CardClass.header}\n\t\t\t\t\t\taria-label={this.wcagTriggerLabel}\n\t\t\t\t\t\taria-labelledby={this.wcagTriggerLabelledBy}\n\t\t\t\t\t\taria-expanded={booleanString(this.isExpanded)}\n\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<HeadlineTag class={CardClass.title}>{this.label}</HeadlineTag>\n\t\t\t\t\t\t<gov-icon class={CardClass.arrow} name=\"arrow-down\"></gov-icon>\n\t\t\t\t\t</button>\n\t\t\t\t) : null}\n\n\t\t\t\t{this.label && !this.collapsible ? (\n\t\t\t\t\t<div class={CardClass.header}>\n\t\t\t\t\t\t<HeadlineTag class={CardClass.title}>{this.label}</HeadlineTag>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\n\t\t\t\t<div\n\t\t\t\t\tclass={CardClass.inner}\n\t\t\t\t\tid={this.contentId}\n\t\t\t\t\taria-hidden={this.collapsible ? booleanString(!this.isExpanded) : undefined}\n\t\t\t\t\thidden={this.collapsible ? !this.isExpanded : undefined}\n\t\t\t\t\taria-labelledby={this.collapsible ? this.headlineId : undefined}\n\t\t\t\t>\n\t\t\t\t\t{this.h.hasSlot('img') && (\n\t\t\t\t\t\t<p class={CardClass.img}>\n\t\t\t\t\t\t\t<slot name=\"img\" />\n\t\t\t\t\t\t</p>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div class={CardClass.main}>\n\t\t\t\t\t\t{this.h.hasSlot('icon') && this.promotion && (\n\t\t\t\t\t\t\t<div class={CardClass.icon}>\n\t\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<div class={CardClass.content}>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{this.h.hasSlot('btn') && this.promotion && (\n\t\t\t\t\t\t\t<div class={CardClass.btns}>\n\t\t\t\t\t\t\t\t<slot name=\"btn\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{this.h.hasSlot('footer') && (\n\t\t\t\t\t\t<div class={CardClass.footer}>\n\t\t\t\t\t\t\t<slot name=\"footer\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e) {\n\t\te.stopPropagation()\n\t\tif (this.collapsible) {\n\t\t\tthis.isExpanded = !this.isExpanded\n\t\t\tthis.emmitChange()\n\t\t}\n\t}\n\n\t/**\n\t * Open the card if it is collapsible\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tif (this.collapsible) {\n\t\t\tthis.isExpanded = true\n\t\t\tthis.emmitChange()\n\t\t}\n\t}\n\n\t/**\n\t * Close the card if it is collapsible\n\t */\n\t@Method()\n\tasync close(): Promise<void> {\n\t\tif (this.collapsible) {\n\t\t\tthis.isExpanded = false\n\t\t\tthis.emmitChange()\n\t\t}\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\tif (this.collapsible) {\n\t\t\tvalidateWcagLabel(this.wcagTriggerLabel, this.wcagTriggerLabelledBy, CardClass.root)\n\t\t}\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"gov-card.js","mappings":";;;;;;;;;AAAO,MAAM,SAAS,GAAG;EACxB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C,WAAW,EAAE;MACrB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;MACtB,IAAI,CAAC,WAAW,EAAE,CAAA;KAClB;GACD;;;;EAMD,MAAM,KAAK;IACV,IAAI,IAAI,CAAC,WAAW,EAAE;MACrB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;MACvB,IAAI,CAAC,WAAW,EAAE,CAAA;KAClB;GACD;;;;EAMD,MAAM,YAAY;IACjB,IAAI,IAAI,CAAC,WAAW,EAAE;MACrB,iBAAiB,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;KACpF;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovCard"],"sources":["../../../packages/core/src/components/gov-card/constants.ts","../../../packages/core/src/components/gov-card/gov-card.scss?tag=gov-card","../../../packages/core/src/components/gov-card/gov-card.tsx"],"sourcesContent":["export const CardClass = {\n\troot: 'gov-card',\n\theader: 'gov-card__header',\n\ttitle: 'gov-card__title',\n\tinner: 'gov-card__inner',\n\timg: 'gov-card__img',\n\tmain: 'gov-card__main',\n\tcontent: 'gov-card__content',\n\ticon: 'gov-card__icon',\n\tbtns: 'gov-card__btns',\n\tfooter: 'gov-card__footer',\n\tarrow: 'gov-card__arrow',\n}\n","/*\n * Alert\n */\n\n$class: \".gov-card\";\n\n#{$class} {\n\t@include base(flex);\n\tflex-direction: column;\n\tborder: $card-border;\n\tborder-radius: $border-radius;\n\tbackground: $card-bg;\n\toverflow: hidden;\n\t&__header {\n\t\tgap: rem-calc(28);\n\t\twidth: 100%;\n\t\tpadding: rem-calc(24);\n\t\tborder-bottom: $card-border;\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t\ttext-transform: none;\n\t\ttransition: background-color $t ease-in-out;\n\t}\n\t&__arrow {\n\t\tflex: 0 0 auto;\n\t\twidth: rem-calc(16);\n\t\theight: rem-calc(16);\n\t\tcolor: $card-arrow-color;\n\t}\n\t&__title {\n\t\t@include general;\n\t\t@include typography($font-size-xl);\n\t\tcolor: $card-title-color;\n\t\tfont-weight: 700;\n\t}\n\t&__img {\n\t\twidth: 100%;\n\t\tmargin: 0;\n\t\tline-height: 1;\n\t\timg {\n\t\t\twidth: 100%;\n\t\t\theight: auto;\n\t\t}\n\t}\n\t&__inner {\n\t\tdisplay: flex;\n\t\tflex: 1 1 auto;\n\t\tflex-direction: column;\n\t\t@include parameter(\"aria-hidden\") {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\t&__main {\n\t\tdisplay: flex;\n\t\tgap: 16px 24px;\n\t\tflex: 1 1 auto;\n\t\tflex-direction: column;\n\t\tpadding: rem-calc(24);\n\t}\n\t&__icon {\n\t\tflex: 0 0 auto;\n\t\twidth: rem-calc(40);\n\t\theight: rem-calc(40);\n\t\tcolor: $card-icon-color;\n\t}\n\t&__btns {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\tflex: 0 0 auto;\n\t\tflex-wrap: wrap;\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t}\n\t&__footer {\n\t\t@include reset-last-margin();\n\t\tpadding: rem-calc(16 24);\n\t\tbackground: $card-footer-bg;\n\t\tp {\n\t\t\t@include typography($font-size-s);\n\t\t}\n\t}\n\n\t// STATES\n\t@include parameter(\"is-expanded\") {\n\t\theight: 100%;\n\t}\n\n\t// VARIANTS\n\t@include parameter(\"collapsible\") {\n\t\t#{$class} {\n\t\t\t&__header {\n\t\t\t\t@include button-core();\n\t\t\t\t@include focus-outline($border-radius, rem-calc(-2));\n\t\t\t\tjustify-content: space-between;\n\t\t\t\ttext-align: left;\n\t\t\t\t@include hover() {\n\t\t\t\t\tbackground: $card-header-hover-bg;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// STATES\n\t\t@include parameter(\"is-expanded\") {\n\t\t\t#{$class} {\n\t\t\t\t&__header {\n\t\t\t\t\tborder-bottom: $card-border;\n\t\t\t\t}\n\t\t\t\t&__arrow {\n\t\t\t\t\ttransform: scale(-1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t// VARIANTS\n\t\t@include parameter(\"promotion\") {\n\t\t\t#{$class} {\n\t\t\t\t&__main {\n\t\t\t\t\tflex-direction: row;\n\t\t\t\t\tpadding: rem-calc(32);\n\t\t\t\t}\n\t\t\t\t&__icon {\n\t\t\t\t\twidth: rem-calc(48);\n\t\t\t\t\theight: rem-calc(48);\n\t\t\t\t}\n\t\t\t\t&__btns {\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch, State, Method, Event, EventEmitter } from '@stencil/core'\nimport { CardClass } from './constants'\nimport { govHost, booleanString } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { createID } from '../../utils/string.utils'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { GovCardChangeEvent } from './interfaces'\n\n@Component({\n\ttag: 'gov-card',\n\tstyleUrl: 'gov-card.scss',\n})\nexport class GovCard {\n\tprivate h: GovHost\n\tprivate readonly headlineId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.headlineId = createID('GovCardHeadline')\n\t\tthis.contentId = createID('GovCardContent')\n\t}\n\n\t@Element() host: HTMLGovCardElement\n\n\t/**\n\t * Style variation of the card.\n\t */\n\t@Prop() readonly promotion: boolean = false\n\t/**\n\t * Item label of the card\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Defines wether the card can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Defines whether the card is open or closed by default\n\t */\n\t@Prop() readonly expanded: boolean = false\n\t/**\n\t * Used to change the HMTL tag in the card headline for correct semantic structure\n\t */\n\t@Prop({ attribute: 'headline-tag' }) readonly headlineTag: string = 'h3'\n\t/**\n\t * Adds accessible label for the collapsible button that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-trigger-label' }) wcagTriggerLabel: string\n\t/**\n\t * A string of identifiers that indicate alternative label elements for collapsible card\n\t */\n\t@Prop({ attribute: 'wcag-trigger-labelled-by' }) wcagTriggerLabelledBy: string\n\t/**\n\t * Called when the card toggle state changes\n\t */\n\t@Event({ eventName: 'gov-toggle' }) govToggle: EventEmitter<GovCardChangeEvent>\n\t@State() isExpanded: boolean\n\n\t@Watch('headlineTag')\n\tvalidateHeadlineTag(newValue: string): void {\n\t\tconst validTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'span']\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${CardClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.isExpanded = this.label ? this.expanded : true\n\t\tthis.validateHeadlineTag(this.headlineTag)\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\tprivate emmitChange(): void {\n\t\tthis.govToggle.emit({ open: this.isExpanded, element: this.host })\n\t}\n\n\trender() {\n\t\tconst HeadlineTag = this.headlineTag\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(CardClass.root)} is-expanded={this.isExpanded} collapsible={booleanString(this.collapsible)} promotion={this.promotion}>\n\t\t\t\t{this.label && this.collapsible ? (\n\t\t\t\t\t<button\n\t\t\t\t\t\tid={this.headlineId}\n\t\t\t\t\t\tclass={CardClass.header}\n\t\t\t\t\t\taria-label={this.wcagTriggerLabel}\n\t\t\t\t\t\taria-labelledby={this.wcagTriggerLabelledBy}\n\t\t\t\t\t\taria-expanded={booleanString(this.isExpanded)}\n\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<HeadlineTag class={CardClass.title}>{this.label}</HeadlineTag>\n\t\t\t\t\t\t<gov-icon class={CardClass.arrow} name=\"arrow-down\"></gov-icon>\n\t\t\t\t\t</button>\n\t\t\t\t) : null}\n\n\t\t\t\t{this.label && !this.collapsible ? (\n\t\t\t\t\t<div class={CardClass.header}>\n\t\t\t\t\t\t<HeadlineTag class={CardClass.title}>{this.label}</HeadlineTag>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\n\t\t\t\t<div\n\t\t\t\t\tclass={CardClass.inner}\n\t\t\t\t\tid={this.contentId}\n\t\t\t\t\taria-hidden={this.collapsible ? booleanString(!this.isExpanded) : undefined}\n\t\t\t\t\thidden={this.collapsible ? !this.isExpanded : undefined}\n\t\t\t\t\taria-labelledby={this.collapsible ? this.headlineId : undefined}\n\t\t\t\t>\n\t\t\t\t\t{this.h.hasSlot('img') && (\n\t\t\t\t\t\t<p class={CardClass.img}>\n\t\t\t\t\t\t\t<slot name=\"img\" />\n\t\t\t\t\t\t</p>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div class={CardClass.main}>\n\t\t\t\t\t\t{this.h.hasSlot('icon') && this.promotion && (\n\t\t\t\t\t\t\t<div class={CardClass.icon}>\n\t\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<div class={CardClass.content}>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{this.h.hasSlot('btn') && this.promotion && (\n\t\t\t\t\t\t\t<div class={CardClass.btns}>\n\t\t\t\t\t\t\t\t<slot name=\"btn\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{this.h.hasSlot('footer') && (\n\t\t\t\t\t\t<div class={CardClass.footer}>\n\t\t\t\t\t\t\t<slot name=\"footer\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e) {\n\t\te.stopPropagation()\n\t\tif (this.collapsible) {\n\t\t\tthis.isExpanded = !this.isExpanded\n\t\t\tthis.emmitChange()\n\t\t}\n\t}\n\n\t/**\n\t * Open the card if it is collapsible\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tif (this.collapsible) {\n\t\t\tthis.isExpanded = true\n\t\t\tthis.emmitChange()\n\t\t}\n\t}\n\n\t/**\n\t * Close the card if it is collapsible\n\t */\n\t@Method()\n\tasync close(): Promise<void> {\n\t\tif (this.collapsible) {\n\t\t\tthis.isExpanded = false\n\t\t\tthis.emmitChange()\n\t\t}\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\tif (this.collapsible) {\n\t\t\tvalidateWcagLabel(this.wcagTriggerLabel, this.wcagTriggerLabelledBy, CardClass.root)\n\t\t}\n\t}\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-container.js","mappings":";;;AAAO,MAAM,cAAc,GAAG;EAC7B,IAAI,EAAE,eAAe;CACrB;;ACFD,MAAM,eAAe,GAAG,qmBAAqmB;;MCShnBA,cAAY;EAGxB;;;IACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAID,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,IAC/C,eAAQ,CACF,EACP;GACD;;;;;;EAQD,MAAM,eAAe;IACpB,OAAO,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;GAClD
|
|
1
|
+
{"file":"gov-container.js","mappings":";;;AAAO,MAAM,cAAc,GAAG;EAC7B,IAAI,EAAE,eAAe;CACrB;;ACFD,MAAM,eAAe,GAAG,qmBAAqmB;;MCShnBA,cAAY;EAGxB;;;IACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAID,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,IAC/C,eAAQ,CACF,EACP;GACD;;;;;;EAQD,MAAM,eAAe;IACpB,OAAO,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;GAClD;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovContainer"],"sources":["../../../packages/core/src/components/gov-container/constants.tsx","../../../packages/core/src/components/gov-container/gov-container.scss?tag=gov-container","../../../packages/core/src/components/gov-container/gov-container.tsx"],"sourcesContent":["export const ContainerClass = {\n\troot: 'gov-container',\n}\n","/*\n * Container\n */\n\n$class: \".gov-container\";\n\n#{$class} {\n\t@include container();\n}\n","import { Component, Element, h, Host, Method } from '@stencil/core'\nimport { govHost, slottedChildren } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { ContainerClass } from './constants'\n\n@Component({\n\ttag: 'gov-container',\n\tstyleUrl: 'gov-container.scss',\n})\nexport class GovContainer {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovContainerElement\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ContainerClass.root)}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns slotted children\n\t *\n\t * @return {Promise<Node[]>}\n\t */\n\t@Method()\n\tasync slottedChildren(): Promise<Node[]> {\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E,eAAe;EACrB,MAAM,EAAE,uBAAuB;EAC/B,OAAO,EAAE,wBAAwB;EACjC,OAAO,EAAE,wBAAwB;EACjC,cAAc,EAAE,gCAAgC;EAChD,gBAAgB,EAAE,kCAAkC;CACpD;;ACPD,MAAM,eAAe,GAAG,khDAAkhD;;MCS7hDA,cAAY;EAGxB;;;IACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAID,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,IAC/C,WAAK,KAAK,EAAE,cAAc,CAAC,MAAM,IAChC,WAAK,KAAK,EAAE,cAAc,CAAC,OAAO,IACjC,eAAQ,CACH,EAEL,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,MACzE,WAAK,KAAK,EAAE,cAAc,CAAC,OAAO,IAChC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,KACjC,WAAK,KAAK,EAAE,cAAc,CAAC,cAAc,IACxC,YAAM,IAAI,EAAC,iBAAiB,GAAG,CAC1B,CACN,EAEA,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,KACnC,WAAK,KAAK,EAAE,cAAc,CAAC,gBAAgB,IAC1C,YAAM,IAAI,EAAC,mBAAmB,GAAG,CAC5B,CACN,CACI,CACN,CACI,CACA,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovCookiebar"],"sources":["../../../packages/core/src/components/gov-cookiebar/constants.tsx","../../../packages/core/src/components/gov-cookiebar/gov-cookiebar.scss?tag=gov-cookiebar","../../../packages/core/src/components/gov-cookiebar/gov-cookiebar.tsx"],"sourcesContent":["export const CookiebarClass = {\n\troot: 'gov-cookiebar',\n\tholder: 'gov-cookiebar__holder',\n\tcontent: 'gov-cookiebar__content',\n\tactions: 'gov-cookiebar__actions',\n\tactionsPrimary: 'gov-cookiebar__actions-primary',\n\tactionsSecondary: 'gov-cookiebar__actions-secondary',\n}\n","/*\n * Cookiebar\n */\n\n$class: \".gov-cookiebar\";\n\n#{$class} {\n\t@include z-index(\"bar\", 1);\n\tposition: fixed;\n\tright: 0;\n\tbottom: 0;\n\tleft: 0;\n\tbackground-color: $cookiebar-bg;\n\tbox-shadow: $cookiebar-box-shadow;\n\t&__holder {\n\t\t@include container();\n\t\t@include space(32);\n\t\tpadding-top: rem-calc(20);\n\t\tpadding-bottom: rem-calc(20);\n\t}\n\t&__content {\n\t\t@include space(12);\n\t\tp {\n\t\t\tcolor: $cookiebar-color;\n\t\t\tletter-spacing: em-calc(0.2);\n\t\t}\n\t}\n\t&__actions {\n\t\t&,\n\t\t&-primary,\n\t\t&-secondary {\n\t\t\tdisplay: flex;\n\t\t\tgap: rem-calc(10);\n\t\t\tflex-wrap: wrap;\n\t\t\tjustify-content: space-between;\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: md) {\n\t\t&__holder {\n\t\t\tpadding-top: rem-calc(32);\n\t\t\tpadding-bottom: rem-calc(32);\n\t\t}\n\t\t&__actions {\n\t\t\t&,\n\t\t\t&-primary,\n\t\t\t&-secondary {\n\t\t\t\tgap: rem-calc(16);\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host } from '@stencil/core'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { CookiebarClass } from './constants'\n\n@Component({\n\ttag: 'gov-cookiebar',\n\tstyleUrl: 'gov-cookiebar.scss',\n})\nexport class GovCookiebar {\n\th: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovCookiebarElement\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(CookiebarClass.root)}>\n\t\t\t\t<div class={CookiebarClass.holder}>\n\t\t\t\t\t<div class={CookiebarClass.content}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{(this.h.hasSlot('actions-primary') || this.h.hasSlot('actions-secondary')) && (\n\t\t\t\t\t\t<div class={CookiebarClass.actions}>\n\t\t\t\t\t\t\t{this.h.hasSlot('actions-primary') && (\n\t\t\t\t\t\t\t\t<div class={CookiebarClass.actionsPrimary}>\n\t\t\t\t\t\t\t\t\t<slot name=\"actions-primary\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{this.h.hasSlot('actions-secondary') && (\n\t\t\t\t\t\t\t\t<div class={CookiebarClass.actionsSecondary}>\n\t\t\t\t\t\t\t\t\t<slot name=\"actions-secondary\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-empty.js","mappings":";;;AAAO,MAAM,UAAU,GAAG;EACzB,IAAI,EAAE,WAAW;EACjB,IAAI,EAAE,iBAAiB;EACvB,SAAS,EAAE,sBAAsB;EACjC,OAAO,EAAE,oBAAoB;CAC7B;;ACLD,MAAM,WAAW,GAAG,wpBAAwpB;;MCS/pBA,UAAQ;EAGpB;;;IACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAID,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAC1C,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KACtB,WAAK,KAAK,EAAE,UAAU,CAAC,IAAI,IAC1B,YAAM,IAAI,EAAC,MAAM,GAAG,CACf,CACN,EACD,WAAK,KAAK,EAAE,UAAU,CAAC,OAAO,IAC7B,eAAQ,CACH,CACA,EACP;GACD
|
|
1
|
+
{"file":"gov-empty.js","mappings":";;;AAAO,MAAM,UAAU,GAAG;EACzB,IAAI,EAAE,WAAW;EACjB,IAAI,EAAE,iBAAiB;EACvB,SAAS,EAAE,sBAAsB;EACjC,OAAO,EAAE,oBAAoB;CAC7B;;ACLD,MAAM,WAAW,GAAG,wpBAAwpB;;MCS/pBA,UAAQ;EAGpB;;;IACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAID,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAC1C,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KACtB,WAAK,KAAK,EAAE,UAAU,CAAC,IAAI,IAC1B,YAAM,IAAI,EAAC,MAAM,GAAG,CACf,CACN,EACD,WAAK,KAAK,EAAE,UAAU,CAAC,OAAO,IAC7B,eAAQ,CACH,CACA,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovEmpty"],"sources":["../../../packages/core/src/components/gov-empty/constants.ts","../../../packages/core/src/components/gov-empty/gov-empty.scss?tag=gov-empty","../../../packages/core/src/components/gov-empty/gov-empty.tsx"],"sourcesContent":["export const EmptyClass = {\n\troot: 'gov-empty',\n\ticon: 'gov-empty__icon',\n\tcontainer: 'gov-empty__container',\n\tcontent: 'gov-empty__content',\n}\n","/*\n * Alert\n */\n\n$class: \".gov-empty\";\n\n#{$class} {\n\t@include base();\n\t&__icon {\n\t\tdisplay: inline-flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\twidth: rem-calc(96);\n\t\theight: rem-calc(96);\n\t\tmargin-bottom: calc(rem-calc(96) / 3);\n\t\tborder-radius: 50%;\n\t\tbackground: $empty-icon-circle-bg;\n\t\tcolor: $empty-icon-color;\n\t\t& > * {\n\t\t\twidth: rem-calc(56);\n\t\t\theight: rem-calc(56);\n\t\t}\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t}\n}\n","import { Component, Element, Host, h } from '@stencil/core'\nimport { EmptyClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-empty',\n\tstyleUrl: 'gov-empty.scss',\n})\nexport class GovEmpty {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovEmptyElement\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(EmptyClass.root)}>\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<div class={EmptyClass.icon}>\n\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<div class={EmptyClass.content}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-error-code.js","mappings":";;;AAAO,MAAM,cAAc,GAAG;EAC7B,IAAI,EAAE,gBAAgB;EACtB,IAAI,EAAE,sBAAsB;EAC5B,MAAM,EAAE,wBAAwB;EAChC,OAAO,EAAE,yBAAyB;CAClC;;ACLD,MAAM,eAAe,GAAG,83BAA83B;;MCSz4BA,cAAY;EAGxB;;;IACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAID,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,IAC/C,WAAK,KAAK,EAAE,cAAc,CAAC,MAAM,IAC/B,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KACtB,WAAK,KAAK,EAAE,cAAc,CAAC,IAAI,IAC9B,YAAM,IAAI,EAAC,MAAM,GAAG,CACf,CACN,EACD,WAAK,KAAK,EAAE,cAAc,CAAC,OAAO,IACjC,eAAQ,CACH,CACD,CACA,EACP;GACD
|
|
1
|
+
{"file":"gov-error-code.js","mappings":";;;AAAO,MAAM,cAAc,GAAG;EAC7B,IAAI,EAAE,gBAAgB;EACtB,IAAI,EAAE,sBAAsB;EAC5B,MAAM,EAAE,wBAAwB;EAChC,OAAO,EAAE,yBAAyB;CAClC;;ACLD,MAAM,eAAe,GAAG,83BAA83B;;MCSz4BA,cAAY;EAGxB;;;IACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAID,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,IAC/C,WAAK,KAAK,EAAE,cAAc,CAAC,MAAM,IAC/B,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KACtB,WAAK,KAAK,EAAE,cAAc,CAAC,IAAI,IAC9B,YAAM,IAAI,EAAC,MAAM,GAAG,CACf,CACN,EACD,WAAK,KAAK,EAAE,cAAc,CAAC,OAAO,IACjC,eAAQ,CACH,CACD,CACA,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovErrorCode"],"sources":["../../../packages/core/src/components/gov-error-code/constants.ts","../../../packages/core/src/components/gov-error-code/gov-error-code.scss?tag=gov-error-code","../../../packages/core/src/components/gov-error-code/gov-error-code.tsx"],"sourcesContent":["export const ErrorCodeClass = {\n\troot: 'gov-error-code',\n\ticon: 'gov-error-code__icon',\n\tholder: 'gov-error-code__holder',\n\tcontent: 'gov-error-code__content',\n}\n","/*\n * Alert\n */\n\n$class: \".gov-error-code\";\n\n#{$class} {\n\t@include base();\n\t&__holder {\n\t\tmargin: 0 auto;\n\t\ttext-align: center;\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t}\n\t&__icon {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\twidth: rem-calc(150);\n\t\theight: rem-calc(150);\n\t\tmargin: 0 auto rem-calc(24);\n\t\tborder-radius: 50%;\n\t\tbackground: $error-icon-circle-bg;\n\t\tcolor: $error-icon-color;\n\t\t& > * {\n\t\t\twidth: rem-calc(114);\n\t\t\theight: rem-calc(114);\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: md) {\n\t\t&__icon {\n\t\t\twidth: rem-calc(200);\n\t\t\theight: rem-calc(200);\n\t\t\tmargin: 0 auto rem-calc(32);\n\t\t\t& > * {\n\t\t\t\twidth: rem-calc(152);\n\t\t\t\theight: rem-calc(152);\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host } from '@stencil/core'\nimport { ErrorCodeClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-error-code',\n\tstyleUrl: 'gov-error-code.scss',\n})\nexport class GovErrorCode {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovErrorCodeElement\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ErrorCodeClass.root)}>\n\t\t\t\t<div class={ErrorCodeClass.holder}>\n\t\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t\t<div class={ErrorCodeClass.icon}>\n\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div class={ErrorCodeClass.content}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as createID } from './string.utils.js';
|
|
3
|
-
import {
|
|
4
|
-
import { S as Sizes } from './sizes.js';
|
|
3
|
+
import { k as FormAutocompleteClass, l as FormAutocompleteVariants, m as FormAutocompleteSizes } from './form.js';
|
|
5
4
|
import { v as validateProp } from './props.js';
|
|
6
|
-
import { t as throttle, h as has } from './
|
|
5
|
+
import { t as throttle, h as has } from './utils.js';
|
|
7
6
|
import { a as toBoolAttr } from './template.js';
|
|
8
7
|
import { d as defineCustomElement$2 } from './gov-form-input2.js';
|
|
9
8
|
import { d as defineCustomElement$1 } from './gov-icon2.js';
|
|
@@ -23,7 +22,7 @@ const GovFormAutocomplete = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
|
|
|
23
22
|
this.identifier = undefined;
|
|
24
23
|
this.variant = undefined;
|
|
25
24
|
this.success = undefined;
|
|
26
|
-
this.size =
|
|
25
|
+
this.size = 'm';
|
|
27
26
|
this.nameKey = 'name';
|
|
28
27
|
this.name = undefined;
|
|
29
28
|
this.required = false;
|
|
@@ -43,10 +42,10 @@ const GovFormAutocomplete = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
|
|
|
43
42
|
this.listBoxId = createID('GovListBox');
|
|
44
43
|
}
|
|
45
44
|
validateVariant(newValue) {
|
|
46
|
-
validateProp(
|
|
45
|
+
validateProp(FormAutocompleteVariants, newValue, FormAutocompleteClass.root);
|
|
47
46
|
}
|
|
48
47
|
validateSize(newValue) {
|
|
49
|
-
validateProp(
|
|
48
|
+
validateProp(FormAutocompleteSizes, newValue, FormAutocompleteClass.root);
|
|
50
49
|
}
|
|
51
50
|
onArrowUp() {
|
|
52
51
|
if (this.arrowCounter > 0) {
|
|
@@ -170,9 +169,9 @@ const GovFormAutocomplete = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
|
|
|
170
169
|
}, [4, "gov-form-autocomplete", {
|
|
171
170
|
"value": [1537],
|
|
172
171
|
"identifier": [1],
|
|
173
|
-
"variant": [
|
|
172
|
+
"variant": [1],
|
|
174
173
|
"success": [4],
|
|
175
|
-
"size": [
|
|
174
|
+
"size": [1],
|
|
176
175
|
"nameKey": [1, "name-key"],
|
|
177
176
|
"name": [1],
|
|
178
177
|
"required": [4],
|
|
@@ -217,6 +216,7 @@ function defineCustomElement() {
|
|
|
217
216
|
break;
|
|
218
217
|
} });
|
|
219
218
|
}
|
|
219
|
+
defineCustomElement();
|
|
220
220
|
|
|
221
221
|
export { GovFormAutocomplete as G, defineCustomElement as d };
|
|
222
222
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-form-autocomplete2.js","mappings":";;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,+gDAA+gD;;MCejiD,mBAAmB;EAM/B;;;;;;;IAFQ,qBAAgB,GAAiE,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;iBAUnE,EAAE;;mBAQV,SAAS;;gBAQdA,KAAW,CAAC,EAAE;mBAId,MAAM;;oBASJ,KAAK;;;;;qBAqBL,CAAC;;;;;;sBAmChB,KAAK;wBACH,CAAC,CAAC;gBACiB,EAAE;IA9F5C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAA;GACvC;EAgGD,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAA;GAC5D;EAGD,YAAY,CAAC,QAAgB;IAC5B,YAAY,CAACC,OAAK,EAAE,QAAQ,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAA;GACzD;EAEO,SAAS;IAChB,IAAI,IAAI,CAAC,YAAY,GAAG,CAAC,EAAE;MAC1B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,GAAG,CAAC,CAAA;KACzC;GACD;EAEO,WAAW;IAClB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,MAA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AAU;IACf,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;IACf,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAA;IAExB,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAA;GAChC;;;;EAMD,MAAM,iBAAiB,CAAC,QAAyC;IAChE,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAA;GAC9B;;;;;EAOD,MAAM,mBAAmB,CAAC,QAAmD;IAC5E,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAA;GAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SizesGlobal","Sizes"],"sources":["../../../packages/core/src/components/gov-form/autocomplete/gov-form-autocomplete.scss?tag=gov-form-autocomplete","../../../packages/core/src/components/gov-form/autocomplete/gov-form-autocomplete.tsx"],"sourcesContent":["$class: \".gov-form-autocomplete\";\n\n#{$class} {\n\t@include base();\n\t&__list {\n\t\t@include typography($font-size-s);\n\t\t@extend %reset-ul;\n\t\tposition: absolute;\n\t\ttop: 100%;\n\t\tright: 0;\n\t\tleft: 0;\n\t\tz-index: 5;\n\t\tmax-height: rem-calc(225);\n\t\tmargin-top: rem-calc(8);\n\t\tborder: $form-autocomplete-border;\n\t\tborder-radius: $border-radius;\n\t\tbackground: $form-autocomplete-bg;\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\toverscroll-behavior: none;\n\t}\n\t&__list > &__item {\n\t\t@extend %reset-ul-li;\n\t\tpadding: rem-calc(12 8);\n\t\tcursor: pointer;\n\t}\n\n\t// STATES\n\t&__list:empty {\n\t\tdisplay: none;\n\t}\n\n\t// HOVERS\n\t&__item {\n\t\t@include parameter(\"aria-selected\") {\n\t\t\tbackground: $form-autocomplete-item-select-bg;\n\t\t}\n\t\t@include hover() {\n\t\t\tbackground: $form-autocomplete-item-hover-bg;\n\t\t}\n\t}\n}\n","import { Component, Element, Host, h, Prop, Watch, Event, EventEmitter, State, Method } from '@stencil/core'\nimport { SizesType } from './constants'\nimport { createID } from '../../../../src/utils/string.utils'\nimport { FormAutocompleteClass, Variants, VariantType, Sizes } from './constants'\nimport { Sizes as SizesGlobal } from '../../../core/constants/sizes'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { has, throttle } from \"../../../utils/utils\";\nimport { GovFormAutocompleteItem } from './gov-form-autocomplete.d'\nimport { toBoolAttr } from '../../../helpers/Dom/template'\nimport { Nullable } from \"../../../types/interfaces\";\n\n@Component({\n\ttag: 'gov-form-autocomplete',\n\tstyleUrl: 'gov-form-autocomplete.scss',\n})\nexport class GovFormAutocomplete {\n\tprivate inputRef?: HTMLGovFormInputElement\n\tprivate readonly listBoxId: string\n\tprivate searchCallback: (value: string) => Promise<GovFormAutocompleteItem[]>\n\tprivate templateResolver: (item: GovFormAutocompleteItem, selected: boolean) => string = item => item[this.nameKey]\n\n\tconstructor() {\n\t\tthis.listBoxId = createID('GovListBox')\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 = ''\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: VariantType = undefined\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: SizesType = SizesGlobal._M\n\t/**\n\t * Main key name in the object\n\t */\n\t@Prop() readonly nameKey: string = 'name'\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * 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\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 * 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 * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number = 2\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\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 * Same as original parameter\n\t * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-owns\n\t */\n\t@Prop({ attribute: 'wcag-owns' }) readonly wcagOwns: string\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({ eventName: 'gov-focus' }) govFocus: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-input' }) govInput: EventEmitter<InputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-select' }) govSelect: EventEmitter<GovFormAutocompleteItem>\n\t@State() focused: boolean\n\t@State() processing = false\n\t@State() arrowCounter = -1\n\t@State() list: GovFormAutocompleteItem[] = []\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(Variants, newValue, FormAutocompleteClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, FormAutocompleteClass.root)\n\t}\n\n\tprivate onArrowUp() {\n\t\tif (this.arrowCounter > 0) {\n\t\t\tthis.arrowCounter = this.arrowCounter - 1\n\t\t}\n\t}\n\n\tprivate onArrowDown() {\n\t\tif (this.arrowCounter < this.list.length - 1) {\n\t\t\tthis.arrowCounter = this.arrowCounter + 1\n\t\t}\n\t}\n\n\tprivate doSearch() {\n\t\tif (Number.isInteger(this.minlength) && String(this.value).length <= this.minlength && this.minlength) {\n\t\t\tthis.list = []\n\t\t\tthis.arrowCounter = -1\n\t\t\tthis.processing = false\n\t\t\treturn\n\t\t}\n\t\tif (this.searchCallback) {\n\t\t\tthis.processing = true\n\t\t\tthis.searchCallback(this.value)\n\t\t\t\t.then(response => (this.list = response))\n\t\t\t\t.catch(() => (this.list = []))\n\t\t\t\t.finally(() => {\n\t\t\t\t\tthis.arrowCounter = -1\n\t\t\t\t\tthis.processing = false\n\t\t\t\t})\n\t\t}\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormAutocompleteClass.root} size={this.size} variant={this.variant}>\n\t\t\t\t<gov-form-input\n\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\treadonly={this.readonly}\n\t\t\t\t\tautocomplete={false}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tinvalid={this.invalid}\n\t\t\t\t\trole={'searchbox'}\n\t\t\t\t\tvalue={this.value}\n\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\ton-gov-input={throttle(this.onInputHandler.bind(this), 200)}\n\t\t\t\t\ton-gov-keyup={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\ton-gov-focus={this.onFocusHandler.bind(this)}\n\t\t\t\t\ton-gov-blur={this.onBlurHandler.bind(this)}\n\t\t\t\t\twcagAutocomplete={'list'}\n\t\t\t\t\twcagDescribedBy={this.wcagDescribedBy}\n\t\t\t\t\twcagLabelledBy={this.wcagLabelledBy}\n\t\t\t\t\twcagOwns={[this.listBoxId, this.wcagOwns].join(' ')}\n\t\t\t\t\twcagExpanded={this.list.length && this.focused}\n\t\t\t\t\tref={el => (this.inputRef = el as HTMLGovFormInputElement)}\n\t\t\t\t>\n\t\t\t\t\t<slot slot=\"right-icon\" name=\"right-icon\" />\n\t\t\t\t</gov-form-input>\n\t\t\t\t<ul class={FormAutocompleteClass.list} role={'listbox'} id={this.listBoxId}>\n\t\t\t\t\t{this.list.map((item, index) => {\n\t\t\t\t\t\tconst isSelected = this.arrowCounter === index\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\tclass={FormAutocompleteClass.item}\n\t\t\t\t\t\t\t\tinnerHTML={this.templateResolver(item, isSelected)}\n\t\t\t\t\t\t\t\trole={'option'}\n\t\t\t\t\t\t\t\taria-posinset={index}\n\t\t\t\t\t\t\t\ttabindex={isSelected ? 0 : -1}\n\t\t\t\t\t\t\t\taria-setsize={this.list.length}\n\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(index)}\n\t\t\t\t\t\t\t\taria-selected={toBoolAttr(isSelected)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)\n\t\t\t\t\t})}\n\t\t\t\t</ul>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.arrowCounter = -1\n\t\tif ((this.value || this.minlength === 0) && this.searchCallback) {\n\t\t\tthis.doSearch()\n\t\t}\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit(e)\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tsetTimeout(() => (this.list = []), 200)\n\t\tthis.arrowCounter = -1\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit(e)\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLGovFormInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit(e)\n\t\tthis.doSearch()\n\t}\n\n\tprivate onSelectHandler(index = -1) {\n\t\tlet selected: Nullable<GovFormAutocompleteItem> = null\n\t\tif (index > -1) {\n\t\t\tselected = this.list[index]\n\t\t} else if (has(this.arrowCounter, this.list)) {\n\t\t\tselected = this.list[this.arrowCounter]\n\t\t}\n\t\tif (selected) {\n\t\t\tthis.govSelect.emit(selected)\n\t\t\tthis.list = []\n\t\t\tif (has(this.nameKey, selected) && typeof selected[this.nameKey] === 'string') {\n\t\t\t\tthis.value = selected[this.nameKey]\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate onKeyUpHandler(e: CustomEvent) {\n\t\tconst event = e.detail as KeyboardEvent\n\t\te.stopPropagation()\n\t\tif (event.keyCode === 38) this.onArrowUp()\n\t\telse if (event.keyCode === 40) this.onArrowDown()\n\t\telse if (event.keyCode === 13) this.onSelectHandler()\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 * Clears whisperer value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = ''\n\t\tthis.inputRef.value = ''\n\n\t\tawait this.inputRef.clearValue()\n\t}\n\n\t/**\n\t * Set a custom asynchronous function for the whisperer\n\t */\n\t@Method()\n\tasync setSearchCallback(callback: (value: string) => Promise<any>) {\n\t\tthis.searchCallback = callback\n\t}\n\n\t/**\n\t * Setting a custom whisper result template\n\t * @param callback\n\t */\n\t@Method()\n\tasync setTemplateResolver(callback: (item: GovFormAutocompleteItem) => string) {\n\t\tthis.templateResolver = callback\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"gov-form-autocomplete2.js","mappings":";;;;;;;;;AAAA,MAAM,sBA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omplete.scss?tag=gov-form-autocomplete","../../../packages/core/src/components/gov-form/autocomplete/gov-form-autocomplete.tsx"],"sourcesContent":["$class: \".gov-form-autocomplete\";\n\n#{$class} {\n\t@include base();\n\t&__list {\n\t\t@include typography($font-size-s);\n\t\t@extend %reset-ul;\n\t\tposition: absolute;\n\t\ttop: 100%;\n\t\tright: 0;\n\t\tleft: 0;\n\t\tz-index: 5;\n\t\tmax-height: rem-calc(225);\n\t\tmargin-top: rem-calc(8);\n\t\tborder: $form-autocomplete-border;\n\t\tborder-radius: $border-radius;\n\t\tbackground: $form-autocomplete-bg;\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\toverscroll-behavior: none;\n\t}\n\t&__list > &__item {\n\t\t@extend %reset-ul-li;\n\t\tpadding: rem-calc(12 8);\n\t\tcursor: pointer;\n\t}\n\n\t// STATES\n\t&__list:empty {\n\t\tdisplay: none;\n\t}\n\n\t// HOVERS\n\t&__item {\n\t\t@include parameter(\"aria-selected\") {\n\t\t\tbackground: $form-autocomplete-item-select-bg;\n\t\t}\n\t\t@include hover() {\n\t\t\tbackground: $form-autocomplete-item-hover-bg;\n\t\t}\n\t}\n}\n","import { Component, Element, Host, h, Prop, Watch, Event, EventEmitter, State, Method } from '@stencil/core'\nimport { SizesType } from './constants'\nimport { createID } from '../../../utils/string.utils'\nimport { FormAutocompleteClass, FormAutocompleteVariants, VariantType, FormAutocompleteSizes } from './constants'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { has, throttle } from '../../../utils/utils'\nimport { GovFormAutocompleteItem } from './gov-form-autocomplete.types'\nimport { toBoolAttr } from '../../../helpers/Dom/template'\nimport { Nullable } from '../../../types/interfaces'\n\n@Component({\n\ttag: 'gov-form-autocomplete',\n\tstyleUrl: 'gov-form-autocomplete.scss',\n})\nexport class GovFormAutocomplete {\n\tprivate inputRef?: HTMLGovFormInputElement\n\tprivate readonly listBoxId: string\n\tprivate searchCallback: (value: string) => Promise<GovFormAutocompleteItem[]>\n\tprivate templateResolver: (item: GovFormAutocompleteItem, selected: boolean) => string = item => item[this.nameKey]\n\n\tconstructor() {\n\t\tthis.listBoxId = createID('GovListBox')\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 = ''\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?: VariantType\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?: SizesType = 'm'\n\t/**\n\t * Main key name in the object\n\t */\n\t@Prop() readonly nameKey: string = 'name'\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * 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\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 * 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 * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number = 2\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\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 * Same as original parameter\n\t * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-owns\n\t */\n\t@Prop({ attribute: 'wcag-owns' }) readonly wcagOwns: string\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({ eventName: 'gov-focus' }) govFocus: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-input' }) govInput: EventEmitter<InputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-select' }) govSelect: EventEmitter<GovFormAutocompleteItem>\n\t@State() focused: boolean\n\t@State() processing = false\n\t@State() arrowCounter = -1\n\t@State() list: GovFormAutocompleteItem[] = []\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormAutocompleteVariants, newValue, FormAutocompleteClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormAutocompleteSizes, newValue, FormAutocompleteClass.root)\n\t}\n\n\tprivate onArrowUp() {\n\t\tif (this.arrowCounter > 0) {\n\t\t\tthis.arrowCounter = this.arrowCounter - 1\n\t\t}\n\t}\n\n\tprivate onArrowDown() {\n\t\tif (this.arrowCounter < this.list.length - 1) {\n\t\t\tthis.arrowCounter = this.arrowCounter + 1\n\t\t}\n\t}\n\n\tprivate doSearch() {\n\t\tif (Number.isInteger(this.minlength) && String(this.value).length <= this.minlength && this.minlength) {\n\t\t\tthis.list = []\n\t\t\tthis.arrowCounter = -1\n\t\t\tthis.processing = false\n\t\t\treturn\n\t\t}\n\t\tif (this.searchCallback) {\n\t\t\tthis.processing = true\n\t\t\tthis.searchCallback(this.value)\n\t\t\t\t.then(response => (this.list = response))\n\t\t\t\t.catch(() => (this.list = []))\n\t\t\t\t.finally(() => {\n\t\t\t\t\tthis.arrowCounter = -1\n\t\t\t\t\tthis.processing = false\n\t\t\t\t})\n\t\t}\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormAutocompleteClass.root} size={this.size} variant={this.variant}>\n\t\t\t\t<gov-form-input\n\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\treadonly={this.readonly}\n\t\t\t\t\tautocomplete={false}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tinvalid={this.invalid}\n\t\t\t\t\trole={'searchbox'}\n\t\t\t\t\tvalue={this.value}\n\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\ton-gov-input={throttle(this.onInputHandler.bind(this), 200)}\n\t\t\t\t\ton-gov-keyup={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\ton-gov-focus={this.onFocusHandler.bind(this)}\n\t\t\t\t\ton-gov-blur={this.onBlurHandler.bind(this)}\n\t\t\t\t\twcagAutocomplete={'list'}\n\t\t\t\t\twcagDescribedBy={this.wcagDescribedBy}\n\t\t\t\t\twcagLabelledBy={this.wcagLabelledBy}\n\t\t\t\t\twcagOwns={[this.listBoxId, this.wcagOwns].join(' ')}\n\t\t\t\t\twcagExpanded={this.list.length && this.focused}\n\t\t\t\t\tref={el => (this.inputRef = el as HTMLGovFormInputElement)}\n\t\t\t\t>\n\t\t\t\t\t<slot slot=\"right-icon\" name=\"right-icon\" />\n\t\t\t\t</gov-form-input>\n\t\t\t\t<ul class={FormAutocompleteClass.list} role={'listbox'} id={this.listBoxId}>\n\t\t\t\t\t{this.list.map((item, index) => {\n\t\t\t\t\t\tconst isSelected = this.arrowCounter === index\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\tclass={FormAutocompleteClass.item}\n\t\t\t\t\t\t\t\tinnerHTML={this.templateResolver(item, isSelected)}\n\t\t\t\t\t\t\t\trole={'option'}\n\t\t\t\t\t\t\t\taria-posinset={index}\n\t\t\t\t\t\t\t\ttabindex={isSelected ? 0 : -1}\n\t\t\t\t\t\t\t\taria-setsize={this.list.length}\n\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(index)}\n\t\t\t\t\t\t\t\taria-selected={toBoolAttr(isSelected)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)\n\t\t\t\t\t})}\n\t\t\t\t</ul>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.arrowCounter = -1\n\t\tif ((this.value || this.minlength === 0) && this.searchCallback) {\n\t\t\tthis.doSearch()\n\t\t}\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit(e)\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tsetTimeout(() => (this.list = []), 200)\n\t\tthis.arrowCounter = -1\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit(e)\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLGovFormInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit(e)\n\t\tthis.doSearch()\n\t}\n\n\tprivate onSelectHandler(index = -1) {\n\t\tlet selected: Nullable<GovFormAutocompleteItem> = null\n\t\tif (index > -1) {\n\t\t\tselected = this.list[index]\n\t\t} else if (has(this.arrowCounter, this.list)) {\n\t\t\tselected = this.list[this.arrowCounter]\n\t\t}\n\t\tif (selected) {\n\t\t\tthis.govSelect.emit(selected)\n\t\t\tthis.list = []\n\t\t\tif (has(this.nameKey, selected) && typeof selected[this.nameKey] === 'string') {\n\t\t\t\tthis.value = selected[this.nameKey]\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate onKeyUpHandler(e: CustomEvent) {\n\t\tconst event = e.detail as KeyboardEvent\n\t\te.stopPropagation()\n\t\tif (event.keyCode === 38) this.onArrowUp()\n\t\telse if (event.keyCode === 40) this.onArrowDown()\n\t\telse if (event.keyCode === 13) this.onSelectHandler()\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 * Clears whisperer value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = ''\n\t\tthis.inputRef.value = ''\n\n\t\tawait this.inputRef.clearValue()\n\t}\n\n\t/**\n\t * Set a custom asynchronous function for the whisperer\n\t */\n\t@Method()\n\tasync setSearchCallback(callback: (value: string) => Promise<any>) {\n\t\tthis.searchCallback = callback\n\t}\n\n\t/**\n\t * Setting a custom whisper result template\n\t * @param callback\n\t */\n\t@Method()\n\tasync setTemplateResolver(callback: (item: GovFormAutocompleteItem) => string) {\n\t\tthis.templateResolver = callback\n\t}\n}\n"],"version":3}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as createID } from './string.utils.js';
|
|
3
3
|
import { v as validateProp } from './props.js';
|
|
4
|
-
import { g as govForm, F as FormCheckboxClass } from './form.js';
|
|
4
|
+
import { g as govForm, F as FormCheckboxClass, a as FormCheckboxSizes } from './form.js';
|
|
5
5
|
import { g as govHost, t as toBoolAttrIfDefined, a as toBoolAttr } from './template.js';
|
|
6
6
|
import { a as validateWcagRef, b as validateWcagLabelFor } from './wcag.js';
|
|
7
|
-
import { c as canValidateWcagOnRender
|
|
8
|
-
import {
|
|
7
|
+
import { c as canValidateWcagOnRender } from './win.js';
|
|
8
|
+
import { d as delay } from './utils.js';
|
|
9
9
|
import { F as FormLabelClass } from './constants4.js';
|
|
10
10
|
import { d as defineCustomElement$2 } from './gov-icon2.js';
|
|
11
11
|
|
|
@@ -23,7 +23,7 @@ const GovFormCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
23
23
|
this.required = false;
|
|
24
24
|
this.disabled = undefined;
|
|
25
25
|
this.name = undefined;
|
|
26
|
-
this.size =
|
|
26
|
+
this.size = 'm';
|
|
27
27
|
this.identifier = undefined;
|
|
28
28
|
this.invalid = undefined;
|
|
29
29
|
this.wcagDescribedBy = undefined;
|
|
@@ -41,7 +41,7 @@ const GovFormCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
validateSize(newValue) {
|
|
44
|
-
validateProp(
|
|
44
|
+
validateProp(FormCheckboxSizes, newValue, FormCheckboxClass.root);
|
|
45
45
|
}
|
|
46
46
|
componentWillLoad() {
|
|
47
47
|
this.isChecked = this.checked;
|
|
@@ -56,26 +56,17 @@ const GovFormCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
58
|
const { isChecked } = this;
|
|
59
|
-
return (h(Host, { class: FormCheckboxClass.root, "is-checked": isChecked, size: this.size, invalid: toBoolAttrIfDefined(this.invalid) }, h("input", { id: this.identifier || this.checkboxId, type: "checkbox", value: this.value, name: this.name, checked: this.isChecked,
|
|
59
|
+
return (h(Host, { class: FormCheckboxClass.root, "is-checked": isChecked, size: this.size, invalid: toBoolAttrIfDefined(this.invalid) }, h("input", { id: this.identifier || this.checkboxId, type: "checkbox", value: this.value, name: this.name, checked: this.isChecked, onChange: this.onChangeHandler.bind(this), onFocus: this.onFocusHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, "aria-checked": toBoolAttr(this.isChecked), "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" }), h("gov-icon", { class: FormCheckboxClass.check, name: "check" }))));
|
|
60
60
|
}
|
|
61
61
|
onFocusHandler(e) {
|
|
62
|
-
e.stopPropagation();
|
|
63
|
-
e.preventDefault();
|
|
64
62
|
this.govFocus.emit(e);
|
|
65
63
|
}
|
|
66
64
|
onBlurHandler(e) {
|
|
67
|
-
e.stopPropagation();
|
|
68
|
-
e.preventDefault();
|
|
69
65
|
this.govBlur.emit(e);
|
|
70
66
|
}
|
|
71
|
-
onClickHandler(e) {
|
|
72
|
-
e.stopPropagation();
|
|
73
|
-
e.preventDefault();
|
|
74
|
-
}
|
|
75
67
|
onChangeHandler(e) {
|
|
76
68
|
this.isChecked = e.target.checked;
|
|
77
69
|
e.stopPropagation();
|
|
78
|
-
e.preventDefault();
|
|
79
70
|
this.govChange.emit({
|
|
80
71
|
checked: this.isChecked,
|
|
81
72
|
value: this.value,
|
|
@@ -101,7 +92,7 @@ const GovFormCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
101
92
|
"required": [4],
|
|
102
93
|
"disabled": [4],
|
|
103
94
|
"name": [1],
|
|
104
|
-
"size": [
|
|
95
|
+
"size": [1],
|
|
105
96
|
"identifier": [1],
|
|
106
97
|
"invalid": [4],
|
|
107
98
|
"wcagDescribedBy": [1, "wcag-described-by"],
|
|
@@ -127,6 +118,7 @@ function defineCustomElement$1() {
|
|
|
127
118
|
break;
|
|
128
119
|
} });
|
|
129
120
|
}
|
|
121
|
+
defineCustomElement$1();
|
|
130
122
|
|
|
131
123
|
const GovFormCheckbox = GovFormCheckbox$1;
|
|
132
124
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-form-checkbox.js","mappings":";;;;;;;;;;;AAAA,MAAM,kBAAkB,GAAG,0oPAA0oP;;MCqBxpPA,iBAAe;EAM3B;;;;;;;mBAeqD,KAAK;oBAKrB,KAAK;;;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AAC,eAAe,EAAE,CAAA;IACnB,CAAC,CAAC,cAAc,EAAE,CAAA;GAClB;EAEO,eAAe,CAAC,CAAQ;IAC/B,IAAI,CAAC,SAAS,GAAI,CAAC,CAAC,MAA2B,CAAC,OAAO,CAAA;IACvD,CAAC,CAAC,eAAe,EAAE,CAAA;IACnB,CAAC,CAAC,cAAc,EAAE,CAAA;IAClB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;MACnB,OAAO,EAAE,IAAI,CAAC,SAAS;MACvB,KAAK,EAAE,IAAI,CAAC,KAAK;KACjB,CAAC,CAAA;GACF;;;;EAMD,MAAM,YAAY;IACjB,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,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;GACrG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovFormCheckbox"],"sources":["../../../packages/core/src/components/gov-form/checkbox/gov-form-checkbox.scss?tag=gov-form-checkbox","../../../packages/core/src/components/gov-form/checkbox/gov-form-checkbox.tsx"],"sourcesContent":["/*\n * Checkbox\n */\n\n@import \"../checkbox/gov-form-checkbox-core.scss\";\n$class: \".gov-form-checkbox\";\n\n#{$class} {\n\t@extend %form-checkbox-core;\n\tinput + span {\n\t\t&::before {\n\t\t\tborder-radius: $border-radius;\n\t\t}\n\t}\n\t&__check {\n\t\tposition: absolute;\n\t\tcolor: $form-checkbox-check-color;\n\t\topacity: 0;\n\t\ttransition: $t linear opacity;\n\t}\n\n\t// STATES\n\tinput:checked + span::before {\n\t\tbackground: $form-checkbox-indicator-bg;\n\t}\n\tinput:checked + span &__check {\n\t\topacity: 1;\n\t}\n\t@include parameter(\"invalid\") {\n\t\tinput:checked + span::before {\n\t\t\tbackground: $form-state-color-error;\n\t\t}\n\t}\n\t@include parameter(\"disabled\") {\n\t\tinput:checked + span::before {\n\t\t\tborder-color: $form-state-bg-disabled;\n\t\t\tbackground-color: $form-state-bg-disabled;\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $form-checkbox-core-sizes {\n\t\t&[size=\"#{$size}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__check {\n\t\t\t\t\ttop: calc((get(\"indicator-size\", $definitions) - get(\"check-size\", $definitions)) / 2);\n\t\t\t\t\tleft: calc((get(\"indicator-size\", $definitions) - get(\"check-size\", $definitions)) / 2);\n\t\t\t\t\twidth: get(\"check-size\", $definitions);\n\t\t\t\t\theight: get(\"check-size\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Host, h, Prop, State, Event, EventEmitter, Element, Watch, Method } from '@stencil/core'\nimport { createID } from '../../../../src/utils/string.utils'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { FormCheckboxClass, SizesType } from './constants'\nimport { toBoolAttrIfDefined } from '../../../helpers/Dom/template'\nimport { validateWcagLabelFor, validateWcagRef } from '../../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../../helpers/Dom/win'\nimport { delay } from '../../../utils/utils'\nimport { Sizes } from '../../../core/constants/sizes'\nimport { GovForm } from '../../../helpers/Dom/form.d'\nimport { govHost, toBoolAttr } from '../../../helpers/Dom/template'\nimport { GovHost } from '../../../helpers/Dom/template.d'\nimport { govForm } from '../../../helpers/Dom/form'\nimport { FormLabelClass } from '../label/constants'\nimport { GovFormCheckboxChangeEvent } from \"./interfaces\"\n\n\n@Component({\n\ttag: 'gov-form-checkbox',\n\tstyleUrl: 'gov-form-checkbox.scss',\n})\nexport class GovFormCheckbox {\n\tprivate h: GovHost\n\tprivate f: GovForm\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 }) readonly checked: boolean = 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\n\t/**\n\t * Name of the checkbox.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Checkbox's size.\n\t */\n\t@Prop() readonly size: SizesType = Sizes._M\n\t/**\n\t * Custom checkbox 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 checkbox has focus.\n\t */\n\t@Event({ eventName: 'gov-focus' }) govFocus: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the checkbox loses focus.\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the checkbox change value.\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovFormCheckboxChangeEvent>\n\n\t@State() isChecked: boolean\n\n\t@Watch('checked')\n\tupdateCheckedState(newValue: boolean): void {\n\t\tthis.isChecked = newValue\n\t\tthis.govChange.emit({\n\t\t\tchecked: this.isChecked,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, FormCheckboxClass.root)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.isChecked = this.checked\n\n\t\tthis.f.passAttrToControl('type', 'checkbox')\n\t\tthis.h.passChildAttr(FormLabelClass.root, 'identifier', this.identifier || this.checkboxId)\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 { isChecked } = this\n\n\t\treturn (\n\t\t\t<Host class={FormCheckboxClass.root} is-checked={isChecked} size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t<input\n\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\tvalue={this.value}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\tchecked={this.isChecked}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\taria-checked={toBoolAttr(this.isChecked)}\n\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t/>\n\t\t\t\t<span>\n\t\t\t\t\t<slot name=\"label\" />\n\t\t\t\t\t<gov-icon class={FormCheckboxClass.check} name=\"check\"></gov-icon>\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\te.preventDefault()\n\t\tthis.govFocus.emit(e)\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\te.preventDefault()\n\t\tthis.govBlur.emit(e)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t\te.preventDefault()\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.isChecked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\te.preventDefault()\n\t\tthis.govChange.emit({\n\t\t\tchecked: this.isChecked,\n\t\t\tvalue: this.value,\n\t\t})\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"],"version":3}
|
|
1
|
+
{"file":"gov-form-checkbox.js","mappings":";;;;;;;;;;;AAAA,MAAM,kBAAkB,GAAG,0oPAA0oP;;MCmBxpPA,iBAAe;EAM3B;;;;;;;mBAeqD,KAAK;oBAKrB,KAAK;;;gBAaM,GAAG;;;;;;IAhClD,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAA;IAEzC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;GACxB;EA6DD,kBAAkB,CAAC,QAAiB;IACnC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;IACzB,IAAI,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I,CAAC,CAAA;GACrG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovFormCheckbox"],"sources":["../../../packages/core/src/components/gov-form/checkbox/gov-form-checkbox.scss?tag=gov-form-checkbox","../../../packages/core/src/components/gov-form/checkbox/gov-form-checkbox.tsx"],"sourcesContent":["/*\n * Checkbox\n */\n\n@import \"../checkbox/gov-form-checkbox-core.scss\";\n$class: \".gov-form-checkbox\";\n\n#{$class} {\n\t@extend %form-checkbox-core;\n\tinput + span {\n\t\t&::before {\n\t\t\tborder-radius: $border-radius;\n\t\t}\n\t}\n\t&__check {\n\t\tposition: absolute;\n\t\tcolor: $form-checkbox-check-color;\n\t\topacity: 0;\n\t\ttransition: $t linear opacity;\n\t}\n\n\t// STATES\n\tinput:checked + span::before {\n\t\tbackground: $form-checkbox-indicator-bg;\n\t}\n\tinput:checked + span &__check {\n\t\topacity: 1;\n\t}\n\t@include parameter(\"invalid\") {\n\t\tinput:checked + span::before {\n\t\t\tbackground: $form-state-color-error;\n\t\t}\n\t}\n\t@include parameter(\"disabled\") {\n\t\tinput:checked + span::before {\n\t\t\tborder-color: $form-state-bg-disabled;\n\t\t\tbackground-color: $form-state-bg-disabled;\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $form-checkbox-core-sizes {\n\t\t&[size=\"#{$size}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__check {\n\t\t\t\t\ttop: calc((get(\"indicator-size\", $definitions) - get(\"check-size\", $definitions)) / 2);\n\t\t\t\t\tleft: calc((get(\"indicator-size\", $definitions) - get(\"check-size\", $definitions)) / 2);\n\t\t\t\t\twidth: get(\"check-size\", $definitions);\n\t\t\t\t\theight: get(\"check-size\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Host, h, Prop, State, Event, EventEmitter, Element, Watch, Method } from '@stencil/core'\nimport { createID } from '../../../utils/string.utils'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { FormCheckboxClass, FormCheckboxSizes, FormCheckboxSizesType } from './constants'\nimport { 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, toBoolAttr } from '../../../helpers/Dom/template'\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { govForm } from '../../../helpers/Dom/form'\nimport { FormLabelClass } from '../label/constants'\nimport { GovFormCheckboxChangeEvent } from './interfaces'\n\n@Component({\n\ttag: 'gov-form-checkbox',\n\tstyleUrl: 'gov-form-checkbox.scss',\n})\nexport class GovFormCheckbox {\n\tprivate h: GovHost\n\tprivate f: GovForm\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 }) readonly checked: boolean = 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\n\t/**\n\t * Name of the checkbox.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Checkbox's 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 * 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<FocusEvent>\n\t/**\n\t * Emitted when the checkbox loses focus.\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the checkbox change value.\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovFormCheckboxChangeEvent>\n\n\t@State() isChecked: boolean\n\n\t@Watch('checked')\n\tupdateCheckedState(newValue: boolean): void {\n\t\tthis.isChecked = newValue\n\t\tthis.govChange.emit({\n\t\t\tchecked: this.isChecked,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormCheckboxSizes, newValue, FormCheckboxClass.root)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.isChecked = this.checked\n\n\t\tthis.f.passAttrToControl('type', 'checkbox')\n\t\tthis.h.passChildAttr(FormLabelClass.root, 'identifier', this.identifier || this.checkboxId)\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 { isChecked } = this\n\n\t\treturn (\n\t\t\t<Host class={FormCheckboxClass.root} is-checked={isChecked} size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t<input\n\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\tvalue={this.value}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\tchecked={this.isChecked}\n\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\taria-checked={toBoolAttr(this.isChecked)}\n\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t/>\n\t\t\t\t<span>\n\t\t\t\t\t<slot name=\"label\" />\n\t\t\t\t\t<gov-icon class={FormCheckboxClass.check} name=\"check\"></gov-icon>\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.govFocus.emit(e)\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.govBlur.emit(e)\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.isChecked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tchecked: this.isChecked,\n\t\t\tvalue: this.value,\n\t\t})\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"],"version":3}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { g as govHost } from './template.js';
|
|
3
|
-
import { g as govForm,
|
|
3
|
+
import { g as govForm, b as FormControlClass } from './form.js';
|
|
4
4
|
import { c as createID, s as splitByWhitespace } from './string.utils.js';
|
|
5
|
-
import { S as Sizes } from './sizes.js';
|
|
6
5
|
|
|
7
6
|
const govFormControlCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-form-control__holder{display:flex;flex-direction:column;padding:0;border:none}.gov-form-control__bottom>*:last-child{margin-bottom:0}.gov-form-control[type=file] .gov-form-label[slot=top] .gov-form-label__label{margin:0rem 0rem 0.5rem}.gov-form-control[type=file] .gov-form-control__bottom{margin:0.5rem 0rem 0rem}.gov-form-control[type=input] .gov-form-label .gov-form-label__label,.gov-form-control[type=select] .gov-form-label .gov-form-label__label{margin:0rem 0rem 0.25rem}.gov-form-control[type=input] .gov-form-control__bottom,.gov-form-control[type=select] .gov-form-control__bottom{margin:0.25rem 0rem 0rem}.gov-form-control[size=xs][type=checkbox] .gov-form-control__bottom,.gov-form-control[size=xs][type=radio] .gov-form-control__bottom{margin-top:var(--gov-form-checkbox-core-xs-message-gap, 0.5rem);margin-left:calc(var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem) + var(--gov-form-checkbox-core-xs-gap, 0.75rem))}.gov-form-control[size=s][type=checkbox] .gov-form-control__bottom,.gov-form-control[size=s][type=radio] .gov-form-control__bottom{margin-top:var(--gov-form-checkbox-core-s-message-gap, 0.5rem);margin-left:calc(var(--gov-form-checkbox-core-s-indicator-size, 1.375rem) + var(--gov-form-checkbox-core-s-gap, 0.75rem))}.gov-form-control[size=m][type=checkbox] .gov-form-control__bottom,.gov-form-control[size=m][type=radio] .gov-form-control__bottom{margin-top:var(--gov-form-checkbox-core-m-message-gap, 0.75rem);margin-left:calc(var(--gov-form-checkbox-core-m-indicator-size, 1.5rem) + var(--gov-form-checkbox-core-m-gap, 1rem))}.gov-form-control[size=l][type=checkbox] .gov-form-control__bottom,.gov-form-control[size=l][type=radio] .gov-form-control__bottom{margin-top:var(--gov-form-checkbox-core-l-message-gap, 0.75rem);margin-left:calc(var(--gov-form-checkbox-core-l-indicator-size, 2rem) + var(--gov-form-checkbox-core-l-gap, 1rem))}.gov-form-control[size=xs][type=switch] .gov-form-control__bottom{margin-top:var(--gov-form-switch-xs-message-gap, 0.5rem);margin-left:calc(var(--gov-form-switch-xs-indicator-height, 1.25rem) * 1.6666666667 + var(--gov-form-switch-xs-gap, 0.75rem))}.gov-form-control[size=s][type=switch] .gov-form-control__bottom{margin-top:var(--gov-form-switch-s-message-gap, 0.5rem);margin-left:calc(var(--gov-form-switch-s-indicator-height, 1.375rem) * 1.6666666667 + var(--gov-form-switch-s-gap, 0.75rem))}.gov-form-control[size=m][type=switch] .gov-form-control__bottom{margin-top:var(--gov-form-switch-m-message-gap, 0.75rem);margin-left:calc(var(--gov-form-switch-m-indicator-height, 1.5rem) * 1.6666666667 + var(--gov-form-switch-m-gap, 1rem))}.gov-form-control[size=l][type=switch] .gov-form-control__bottom{margin-top:var(--gov-form-switch-l-message-gap, 0.75rem);margin-left:calc(var(--gov-form-switch-l-indicator-height, 2rem) * 1.6666666667 + var(--gov-form-switch-l-gap, 1rem))}.gov-form-control[invalid=\"\"] .gov-form-label[slot=top] .gov-form-label__label,.gov-form-control[invalid=true i] .gov-form-label[slot=top] .gov-form-label__label,.gov-form-control[invalid=\"1\"] .gov-form-label[slot=top] .gov-form-label__label{color:var(--gov-form-state-color-error, var(--gov-color-error))}.gov-form-control[disabled=\"\"] .gov-form-label__label,.gov-form-control[disabled=true i] .gov-form-label__label,.gov-form-control[disabled=\"1\"] .gov-form-label__label{pointer-events:none}";
|
|
8
7
|
|
|
@@ -10,16 +9,16 @@ const GovFormControl$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
10
9
|
constructor() {
|
|
11
10
|
super();
|
|
12
11
|
this.__registerHost();
|
|
13
|
-
this.gap =
|
|
12
|
+
this.gap = undefined;
|
|
14
13
|
this.identifier = undefined;
|
|
15
14
|
this.invalid = false;
|
|
16
15
|
this.disabled = false;
|
|
17
16
|
this.success = false;
|
|
18
17
|
this.fieldset = false;
|
|
19
|
-
this.size =
|
|
18
|
+
this.size = 'm';
|
|
20
19
|
this.h = govHost(this.host);
|
|
21
20
|
this.f = govForm(this.h);
|
|
22
|
-
this.controlId = createID(
|
|
21
|
+
this.controlId = createID('GovFormControl');
|
|
23
22
|
}
|
|
24
23
|
watchInvalid() {
|
|
25
24
|
this.passChildAttrs();
|
|
@@ -35,25 +34,25 @@ const GovFormControl$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
35
34
|
}
|
|
36
35
|
passChildAttrs() {
|
|
37
36
|
const formElements = [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
'gov-form-select',
|
|
38
|
+
'gov-form-input',
|
|
39
|
+
'gov-form-switch',
|
|
40
|
+
'gov-form-checkbox',
|
|
41
|
+
'gov-form-radio',
|
|
42
|
+
'gov-form-multi-select',
|
|
43
|
+
'gov-form-file',
|
|
44
|
+
'gov-form-search',
|
|
46
45
|
];
|
|
47
|
-
this.h.passChildAttr(formElements,
|
|
48
|
-
this.h.passChildAttr(formElements,
|
|
49
|
-
this.h.passChildAttr(formElements,
|
|
50
|
-
this.h.passChildAttr(formElements,
|
|
46
|
+
this.h.passChildAttr(formElements, 'size', this.size);
|
|
47
|
+
this.h.passChildAttr(formElements, 'invalid', this.invalid);
|
|
48
|
+
this.h.passChildAttr(formElements, 'disabled', this.disabled);
|
|
49
|
+
this.h.passChildAttr(formElements, 'success', this.success);
|
|
51
50
|
if (this.f.hasGroupChildren === false) {
|
|
52
|
-
this.h.passChildAttr([...formElements,
|
|
51
|
+
this.h.passChildAttr([...formElements, 'gov-form-label'], 'identifier', this.identifier || this.controlId);
|
|
53
52
|
}
|
|
54
53
|
}
|
|
55
54
|
formElementDescriptionControl() {
|
|
56
|
-
const bottomSlot = this.host.querySelector(
|
|
55
|
+
const bottomSlot = this.host.querySelector('.' + FormControlClass.bottom);
|
|
57
56
|
if (!bottomSlot)
|
|
58
57
|
return;
|
|
59
58
|
this.observer = new MutationObserver(function () {
|
|
@@ -64,20 +63,20 @@ const GovFormControl$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
64
63
|
syncControlMessages() {
|
|
65
64
|
Promise.all(this.f.messageElements.map((message) => message.identifier())).then((ids) => {
|
|
66
65
|
this.f.mainElementsInControl.forEach((element) => {
|
|
67
|
-
const currentValue = splitByWhitespace(element.getAttribute(
|
|
68
|
-
element.removeAttribute(
|
|
66
|
+
const currentValue = splitByWhitespace(element.getAttribute('wcag-described-by'));
|
|
67
|
+
element.removeAttribute('wcag-described-by');
|
|
69
68
|
if (Array.isArray(currentValue)) {
|
|
70
|
-
currentValue.forEach(id => (id.indexOf(
|
|
69
|
+
currentValue.forEach(id => (id.indexOf('GovFormMessage') === -1 ? ids.push(id) : null));
|
|
71
70
|
}
|
|
72
71
|
if (ids.length) {
|
|
73
|
-
element.setAttribute(
|
|
72
|
+
element.setAttribute('wcag-described-by', ids.join(' '));
|
|
74
73
|
}
|
|
75
74
|
});
|
|
76
75
|
});
|
|
77
76
|
}
|
|
78
77
|
render() {
|
|
79
|
-
const Tag = this.fieldset ?
|
|
80
|
-
return (h(Host, { size: this.size, class: this.h.classes(FormControlClass.root) }, h(Tag, { class: FormControlClass.holder }, this.h.hasSlot(
|
|
78
|
+
const Tag = this.fieldset ? 'fieldset' : 'div';
|
|
79
|
+
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" }))))));
|
|
81
80
|
}
|
|
82
81
|
get host() { return this; }
|
|
83
82
|
static get watchers() { return {
|
|
@@ -85,13 +84,13 @@ const GovFormControl$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
85
84
|
}; }
|
|
86
85
|
static get style() { return govFormControlCss; }
|
|
87
86
|
}, [4, "gov-form-control", {
|
|
88
|
-
"gap": [
|
|
87
|
+
"gap": [1],
|
|
89
88
|
"identifier": [1],
|
|
90
89
|
"invalid": [4],
|
|
91
90
|
"disabled": [4],
|
|
92
91
|
"success": [4],
|
|
93
92
|
"fieldset": [4],
|
|
94
|
-
"size": [
|
|
93
|
+
"size": [1]
|
|
95
94
|
}]);
|
|
96
95
|
function defineCustomElement$1() {
|
|
97
96
|
if (typeof customElements === "undefined") {
|
|
@@ -106,6 +105,7 @@ function defineCustomElement$1() {
|
|
|
106
105
|
break;
|
|
107
106
|
} });
|
|
108
107
|
}
|
|
108
|
+
defineCustomElement$1();
|
|
109
109
|
|
|
110
110
|
const GovFormControl = GovFormControl$1;
|
|
111
111
|
const defineCustomElement = defineCustomElement$1;
|