@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,13 +1,13 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-00e9a0d5.js';
|
|
2
|
-
import { c as validateWcagProp, v as validateWcagLabel } from './wcag-
|
|
3
|
-
import { c as canValidateWcagOnRender } from './win-
|
|
4
|
-
import { d as delay } from './utils-
|
|
2
|
+
import { c as validateWcagProp, v as validateWcagLabel } from './wcag-3792d4bb.js';
|
|
3
|
+
import { c as canValidateWcagOnRender } from './win-9c8460bb.js';
|
|
4
|
+
import { d as delay } from './utils-c057a3fa.js';
|
|
5
5
|
import { g as govHost } from './template-10332292.js';
|
|
6
|
-
import { F as FormMessageClass,
|
|
7
|
-
import {
|
|
8
|
-
import { v as validateProp } from './props-cb992af5.js';
|
|
6
|
+
import { F as FormMessageClass, a as FormMessageVariants } from './constants-3df712e2.js';
|
|
7
|
+
import { v as validateProp } from './props-789f7529.js';
|
|
9
8
|
import { c as createID } from './string.utils-f268fc6b.js';
|
|
10
9
|
import './gov.log-af905420.js';
|
|
10
|
+
import './variants-2b936d58.js';
|
|
11
11
|
|
|
12
12
|
const AttachmentsClass = {
|
|
13
13
|
root: 'gov-attachments',
|
|
@@ -43,7 +43,7 @@ const GovAttachments = class {
|
|
|
43
43
|
* Validate the WCAG attributes of the component
|
|
44
44
|
*/
|
|
45
45
|
async validateWcag() {
|
|
46
|
-
validateWcagProp(this.wcagLabel,
|
|
46
|
+
validateWcagProp(this.wcagLabel, 'wcag-label', AttachmentsClass.root);
|
|
47
47
|
}
|
|
48
48
|
get host() { return getElement(this); }
|
|
49
49
|
};
|
|
@@ -83,12 +83,12 @@ const govFormMessageCss = ".gov-spin-animation,.gov-pseudo-spin-animation::befor
|
|
|
83
83
|
const GovFormMessage = class {
|
|
84
84
|
constructor(hostRef) {
|
|
85
85
|
registerInstance(this, hostRef);
|
|
86
|
-
this.variant =
|
|
86
|
+
this.variant = 'secondary';
|
|
87
87
|
this.h = govHost(this.host);
|
|
88
88
|
this.messageId = createID('GovFormMessage');
|
|
89
89
|
}
|
|
90
90
|
validateVariant(newValue) {
|
|
91
|
-
validateProp(
|
|
91
|
+
validateProp(FormMessageVariants, newValue, FormMessageClass.root);
|
|
92
92
|
}
|
|
93
93
|
componentWillLoad() {
|
|
94
94
|
this.validateVariant(this.variant);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-attachments.gov-attachments-item.gov-form-message.entry.js","mappings":";;;;;;;;;;;AAAO,MAAM,gBAAgB,GAAG;EAC/B,IAAI,EAAE,iBAAiB;EACvB,KAAK,EAAE,wBAAwB;EAC/B,IAAI,EAAE,uBAAuB;CAC7B,CAAA;AAEM,MAAM,oBAAoB,GAAG;EACnC,IAAI,EAAE,sBAAsB;EAC5B,IAAI,EAAE,4BAA4B;EAClC,IAAI,EAAE,4BAA4B;EAClC,QAAQ,EAAE,gCAAgC;CAC1C;;ACXD,MAAM,iBAAiB,GAAG,ohBAAohB;;MCYjiB,cAAc;EAG1B;;;;IACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAYD,MAAM,kBAAkB;IACvB,IAAI,uBAAuB,EAAE,EAAE;MAC9B,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;MAChB,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;KACzB;GACD;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,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,CAAC,OAAO,CAAC,SAAS,CAAC,KACzB,WAAK,KAAK,EAAE,oBAAoB,CAAC,QAAQ,IACxC,YAAM,IAAI,EAAC,SAAS,GAAG,CAClB,CACN,CACK,EACP;GACD;;;;EAMD,MAAM,YAAY;IACjB,iBAAiB,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAA;GAC7F;;;;;AC3EF,MAAM,iBAAiB,GAAG,ijCAAijC;;MCY9jC,cAAc;EAI1B;;mBASiEA,QAAc,CAAC,SAAS;IARxF,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAA;GAC3C;EASD,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAACC,UAAQ,EAAE,QAAQ,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAA;GACvD;EAED,iBAAiB;IAChB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;GAClC;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IACvE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KACtB,YAAM,KAAK,EAAE,gBAAgB,CAAC,IAAI,IACjC,YAAM,IAAI,EAAC,MAAM,GAAG,CACd,CACP,EACD,YAAM,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,gBAAgB,CAAC,OAAO,IACxD,eAAQ,CACF,CACD,EACP;GACD;;;;EAMD,MAAM,UAAU;IACf,OAAO,IAAI,CAAC,SAAS,CAAA;GACrB;;;;;;;;;;","names":["GlobalVariants","Variants"],"sources":["../../../packages/core/src/components/gov-attachments/constants.ts","../../../packages/core/src/components/gov-attachments/gov-attachments.scss?tag=gov-attachments","../../../packages/core/src/components/gov-attachments/gov-attachments.tsx","../../../packages/core/src/components/gov-attachments/gov-attachments-item.scss?tag=gov-attachments-item","../../../packages/core/src/components/gov-attachments/gov-attachments-item.tsx","../../../packages/core/src/components/gov-form/message/gov-form-message.scss?tag=gov-form-message","../../../packages/core/src/components/gov-form/message/gov-form-message.tsx"],"sourcesContent":["export const AttachmentsClass = {\n\troot: 'gov-attachments',\n\tlabel: 'gov-attachments__label',\n\tlist: 'gov-attachments__list',\n}\n\nexport const AttachmentsItemClass = {\n\troot: 'gov-attachments-item',\n\tname: 'gov-attachments-item__name',\n\tfile: 'gov-attachments-item__file',\n\tmessages: 'gov-attachments-item__messages',\n}\n","/*\n * Attachments\n */\n\n$class: \".gov-attachments\";\n\n#{$class} {\n\t@include base();\n\t&__label {\n\t\t@include typography($font-size-s);\n\t\tcolor: $form-label-color;\n\t}\n\t&__list {\n\t\t@include reset-last-margin();\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop } from \"@stencil/core\"\nimport { AttachmentsClass } from \"./constants\"\nimport { validateWcagProp } from \"../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../helpers/Dom/win\"\nimport { delay } from \"../../utils/utils\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.d\"\n\n@Component({\n\ttag: \"gov-attachments\",\n\tstyleUrl: \"gov-attachments.scss\",\n})\nexport class GovAttachments {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovAttachmentsElement\n\t/**\n\t * Label of attachments section\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Adds accessible label for the attachment section that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: \"wcag-label\" }) readonly wcagLabel: string\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\treturn (\n\t\t\t<Host class={this.h.classes(AttachmentsClass.root)}>\n\t\t\t\t{this.label ? <p class={AttachmentsClass.label}>{this.label}</p> : null}\n\t\t\t\t<div class={AttachmentsClass.list} role=\"list\" aria-label={this.wcagLabel}>\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\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagProp(this.wcagLabel, \"wcag-label\", AttachmentsClass.root)\n\t}\n}\n","/*\n * Attachments - Item\n */\n\n$class: \".gov-attachments-item\";\n\n#{$class} {\n\t@include base();\n\tmargin: rem-calc(0 0 8);\n\t&__messages {\n\t\t@include reset-last-margin();\n\t}\n\t&__file {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t}\n\t&__name {\n\t\tdisplay: flex;\n\t\tgap: 0 rem-calc(8);\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\talign-self: center;\n\t\tmargin: 0;\n\t\tcolor: $attachments-name-color;\n\t\tspan {\n\t\t\t@include typography($font-size-xs);\n\t\t\tcolor: $attachments-decor-color;\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from \"@stencil/core\"\nimport { AttachmentsItemClass } from \"./constants\"\nimport { validateWcagLabel } from \"../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../helpers/Dom/win\"\nimport { delay } from \"../../utils/utils\"\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.d'\n\n@Component({\n\ttag: \"gov-attachments-item\",\n\tstyleUrl: \"gov-attachments-item.scss\",\n})\nexport class GovAttachmentsItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovAttachmentsItemElement\n\n\t/**\n\t * Adds accessible label for the remove button that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: \"wcag-remove-label\" }) readonly wcagRemoveLabel: string\n\t/**\n\t * Indicates the id of a component that labels the remove button.\n\t */\n\t@Prop({ attribute: \"wcag-remove-labelled-by\" }) readonly wcagRemoveLabelledBy: string\n\t/**\n\t * Emitted when the file is removed\n\t */\n\t@Event({ eventName: \"gov-remove\" }) govRemove: EventEmitter<PointerEvent>\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\treturn (\n\t\t\t<Host class={this.h.classes(AttachmentsItemClass.root)} role=\"listitem\">\n\t\t\t\t<div class={AttachmentsItemClass.file}>\n\t\t\t\t\t<p class={AttachmentsItemClass.name}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t<slot name=\"info\" />\n\t\t\t\t\t</p>\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\twcag-label={this.wcagRemoveLabel}\n\t\t\t\t\t\twcag-labelled-by={this.wcagRemoveLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.govRemove.emit}>\n\t\t\t\t\t\t<gov-icon slot=\"left-icon\" name=\"cross\"></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot('message') && (\n\t\t\t\t\t<div class={AttachmentsItemClass.messages}>\n\t\t\t\t\t\t<slot name=\"message\" />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\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\tvalidateWcagLabel(this.wcagRemoveLabel, this.wcagRemoveLabelledBy, AttachmentsItemClass.root)\n\t}\n}\n","/*\n * Form Message\n */\n\n$class: \".gov-form-message\";\n$font-size: $font-size-s;\n\n#{$class} {\n\t@include typography($font-size);\n\tdisplay: flex;\n\tgap: rem-calc(8);\n\tmargin: rem-calc(0 0 16);\n\t&__icon {\n\t\tposition: relative;\n\t\ttop: calc(var(--gov-text-#{$font-size}-font-size) / 6);\n\t\tdisplay: flex;\n\t\t& > * {\n\t\t\twidth: calc(var(--gov-text-#{$font-size}-font-size) * 1.167);\n\t\t\theight: calc(var(--gov-text-#{$font-size}-font-size) * 1.167);\n\t\t}\n\t}\n\n\t@each $variant, $definitions in $form-message-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\tcolor: get(\"color\", $definitions);\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop, Watch } from '@stencil/core'\nimport { FormMessageClass, Variants, VariantType } from './constants'\nimport { govHost } from '../../../helpers/Dom/template'\nimport { GovHost } from '../../../helpers/Dom/template.d'\nimport { Variants as GlobalVariants } from '../../../core/constants/variants'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { createID } from '../../../utils/string.utils'\n\n@Component({\n\ttag: 'gov-form-message',\n\tstyleUrl: 'gov-form-message.scss',\n})\nexport class GovFormMessage {\n\th: GovHost\n\tprivate readonly messageId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.messageId = createID('GovFormMessage')\n\t}\n\n\t@Element() host: HTMLGovFormMessageElement\n\t/**\n\t * Style variation of the mesage.\n\t */\n\t@Prop({ attribute: 'variant' }) readonly variant?: VariantType = GlobalVariants.SECONDARY\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(Variants, newValue, FormMessageClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FormMessageClass.root)} variant={this.variant}>\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<span class={FormMessageClass.icon}>\n\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<span id={this.messageId} class={FormMessageClass.content}>\n\t\t\t\t\t<slot />\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns unique identfiier of message\n\t */\n\t@Method()\n\tasync identifier(): Promise<string> {\n\t\treturn this.messageId\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"gov-attachments.gov-attachments-item.gov-form-message.entry.js","mappings":";;;;;;;;;;;AAAO,MAAM,gBAAgB,GAAG;EAC/B,IAAI,EAAE,iBAAiB;EACvB,KAAK,EAAE,wBAAwB;EAC/B,IAAI,EAAE,uBAAuB;CAC7B,CAAA;AAEM,MAAM,oBAAoB,GAAG;EACnC,IAAI,EAAE,sBAAsB;EAC5B,IAAI,EAAE,4BAA4B;EAClC,IAAI,EAAE,4BAA4B;EAClC,QAAQ,EAAE,gCAAgC;CAC1C;;ACXD,MAAM,iBAAiB,GAAG,ohBAAohB;;MCYjiB,cAAc;EAG1B;;;;IACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAYD,MAAM,kBAAkB;IACvB,IAAI,uBAAuB,EAAE,EAAE;MAC9B,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;MAChB,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;KACzB;GACD;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAChD,IAAI,CAAC,KAAK,GAAG,SAAG,KAAK,EAAE,gBAAgB,CAAC,KAAK,IAAG,IAAI,CAAC,KAAK,CAAK,GAAG,IAAI,EACvE,WAAK,KAAK,EAAE,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAC,MAAM,gBAAa,IAAI,CAAC,SAAS,IACxE,eAAQ,CAC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CAAA;GAC7F;;;;;AC5EF,MAAM,iBAAiB,GAAG,ijCAAijC;;MCW9jC,cAAc;EAI1B;;mBAS4E,WAAW;IARtF,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAA;GAC3C;EASD,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,mBAAmB,EAAE,QAAQ,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAA;GAClE;EAED,iBAAiB;IAChB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;GAClC;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IACvE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KACtB,YAAM,KAAK,EAAE,gBAAgB,CAAC,IAAI,IACjC,YAAM,IAAI,EAAC,MAAM,GAAG,CACd,CACP,EACD,YAAM,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,gBAAgB,CAAC,OAAO,IACxD,eAAQ,CACF,CACD,EACP;GACD;;;;EAMD,MAAM,UAAU;IACf,OAAO,IAAI,CAAC,SAAS,CAAA;GACrB;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-attachments/constants.ts","../../../packages/core/src/components/gov-attachments/gov-attachments.scss?tag=gov-attachments","../../../packages/core/src/components/gov-attachments/gov-attachments.tsx","../../../packages/core/src/components/gov-attachments/gov-attachments-item.scss?tag=gov-attachments-item","../../../packages/core/src/components/gov-attachments/gov-attachments-item.tsx","../../../packages/core/src/components/gov-form/message/gov-form-message.scss?tag=gov-form-message","../../../packages/core/src/components/gov-form/message/gov-form-message.tsx"],"sourcesContent":["export const AttachmentsClass = {\n\troot: 'gov-attachments',\n\tlabel: 'gov-attachments__label',\n\tlist: 'gov-attachments__list',\n}\n\nexport const AttachmentsItemClass = {\n\troot: 'gov-attachments-item',\n\tname: 'gov-attachments-item__name',\n\tfile: 'gov-attachments-item__file',\n\tmessages: 'gov-attachments-item__messages',\n}\n","/*\n * Attachments\n */\n\n$class: \".gov-attachments\";\n\n#{$class} {\n\t@include base();\n\t&__label {\n\t\t@include typography($font-size-s);\n\t\tcolor: $form-label-color;\n\t}\n\t&__list {\n\t\t@include reset-last-margin();\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop } from '@stencil/core'\nimport { AttachmentsClass } from './constants'\nimport { validateWcagProp } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-attachments',\n\tstyleUrl: 'gov-attachments.scss',\n})\nexport class GovAttachments {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovAttachmentsElement\n\t/**\n\t * Label of attachments section\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Adds accessible label for the attachment section that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\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\treturn (\n\t\t\t<Host class={this.h.classes(AttachmentsClass.root)}>\n\t\t\t\t{this.label ? <p class={AttachmentsClass.label}>{this.label}</p> : null}\n\t\t\t\t<div class={AttachmentsClass.list} role=\"list\" aria-label={this.wcagLabel}>\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\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagProp(this.wcagLabel, 'wcag-label', AttachmentsClass.root)\n\t}\n}\n","/*\n * Attachments - Item\n */\n\n$class: \".gov-attachments-item\";\n\n#{$class} {\n\t@include base();\n\tmargin: rem-calc(0 0 8);\n\t&__messages {\n\t\t@include reset-last-margin();\n\t}\n\t&__file {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t}\n\t&__name {\n\t\tdisplay: flex;\n\t\tgap: 0 rem-calc(8);\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\talign-self: center;\n\t\tmargin: 0;\n\t\tcolor: $attachments-name-color;\n\t\tspan {\n\t\t\t@include typography($font-size-xs);\n\t\t\tcolor: $attachments-decor-color;\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core'\nimport { AttachmentsItemClass } from './constants'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-attachments-item',\n\tstyleUrl: 'gov-attachments-item.scss',\n})\nexport class GovAttachmentsItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovAttachmentsItemElement\n\n\t/**\n\t * Adds accessible label for the remove button that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-remove-label' }) readonly wcagRemoveLabel: string\n\t/**\n\t * Indicates the id of a component that labels the remove button.\n\t */\n\t@Prop({ attribute: 'wcag-remove-labelled-by' }) readonly wcagRemoveLabelledBy: string\n\t/**\n\t * Emitted when the file is removed\n\t */\n\t@Event({ eventName: 'gov-remove' }) govRemove: EventEmitter<PointerEvent>\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\treturn (\n\t\t\t<Host class={this.h.classes(AttachmentsItemClass.root)} role=\"listitem\">\n\t\t\t\t<div class={AttachmentsItemClass.file}>\n\t\t\t\t\t<p class={AttachmentsItemClass.name}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t<slot name=\"info\" />\n\t\t\t\t\t</p>\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\twcag-label={this.wcagRemoveLabel}\n\t\t\t\t\t\twcag-labelled-by={this.wcagRemoveLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.govRemove.emit}\n\t\t\t\t\t>\n\t\t\t\t\t\t<gov-icon slot=\"left-icon\" name=\"cross\"></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot('message') && (\n\t\t\t\t\t<div class={AttachmentsItemClass.messages}>\n\t\t\t\t\t\t<slot name=\"message\" />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\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\tvalidateWcagLabel(this.wcagRemoveLabel, this.wcagRemoveLabelledBy, AttachmentsItemClass.root)\n\t}\n}\n","/*\n * Form Message\n */\n\n$class: \".gov-form-message\";\n$font-size: $font-size-s;\n\n#{$class} {\n\t@include typography($font-size);\n\tdisplay: flex;\n\tgap: rem-calc(8);\n\tmargin: rem-calc(0 0 16);\n\t&__icon {\n\t\tposition: relative;\n\t\ttop: calc(var(--gov-text-#{$font-size}-font-size) / 6);\n\t\tdisplay: flex;\n\t\t& > * {\n\t\t\twidth: calc(var(--gov-text-#{$font-size}-font-size) * 1.167);\n\t\t\theight: calc(var(--gov-text-#{$font-size}-font-size) * 1.167);\n\t\t}\n\t}\n\n\t@each $variant, $definitions in $form-message-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\tcolor: get(\"color\", $definitions);\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop, Watch } from '@stencil/core'\nimport { FormMessageClass, FormMessageVariants, FormMessageVariantType } from './constants'\nimport { govHost } from '../../../helpers/Dom/template'\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { createID } from '../../../utils/string.utils'\n\n@Component({\n\ttag: 'gov-form-message',\n\tstyleUrl: 'gov-form-message.scss',\n})\nexport class GovFormMessage {\n\th: GovHost\n\tprivate readonly messageId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.messageId = createID('GovFormMessage')\n\t}\n\n\t@Element() host: HTMLGovFormMessageElement\n\t/**\n\t * Style variation of the mesage.\n\t */\n\t@Prop({ attribute: 'variant' }) readonly variant?: FormMessageVariantType = 'secondary'\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormMessageVariants, newValue, FormMessageClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FormMessageClass.root)} variant={this.variant}>\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<span class={FormMessageClass.icon}>\n\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<span id={this.messageId} class={FormMessageClass.content}>\n\t\t\t\t\t<slot />\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns unique identfiier of message\n\t */\n\t@Method()\n\tasync identifier(): Promise<string> {\n\t\treturn this.messageId\n\t}\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-00e9a0d5.js';
|
|
2
|
-
import { v as validateWcagLabel } from './wcag-
|
|
3
|
-
import { c as canValidateWcagOnRender } from './win-
|
|
4
|
-
import { d as delay } from './utils-
|
|
2
|
+
import { v as validateWcagLabel } from './wcag-3792d4bb.js';
|
|
3
|
+
import { c as canValidateWcagOnRender } from './win-9c8460bb.js';
|
|
4
|
+
import { d as delay } from './utils-c057a3fa.js';
|
|
5
5
|
import { g as govHost, b as booleanString } from './template-10332292.js';
|
|
6
6
|
import './gov.log-af905420.js';
|
|
7
7
|
import './string.utils-f268fc6b.js';
|
|
@@ -32,7 +32,7 @@ const GovBackdrop = class {
|
|
|
32
32
|
render() {
|
|
33
33
|
if (!this.visible)
|
|
34
34
|
return null;
|
|
35
|
-
return (h(Host, { class: this.h.classes(BackdropClass.root), inverse: booleanString(this.inverse) }, h("div", { role:
|
|
35
|
+
return (h(Host, { class: this.h.classes(BackdropClass.root), inverse: booleanString(this.inverse) }, h("div", { role: 'button', "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy, onClick: e => this.govClick.emit(e), class: BackdropClass.bg })));
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* Validate the WCAG attributes of the component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-backdrop.entry.js","mappings":";;;;;;;;AAAO,MAAM,aAAa,GAAG;EAC5B,IAAI,EAAE,cAAc;EACpB,EAAE,EAAE,kBAAkB;CACtB;;ACHD,MAAM,cAAc,GAAG,snBAAsnB;;MCYhoB,WAAW;EAGvB;;;mBAQoC,KAAK;mBAIvB,KAAK;;;IAXtB,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAwBD,MAAM,kBAAkB;IACvB,IAAI,uBAAuB,EAAE,EAAE;MAC9B,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;MAChB,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;KACzB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C,IAAI,CAAC,CAAA;GAC1E;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-backdrop/constants.ts","../../../packages/core/src/components/gov-backdrop/gov-backdrop.scss?tag=gov-backdrop","../../../packages/core/src/components/gov-backdrop/gov-backdrop.tsx"],"sourcesContent":["export const BackdropClass = {\n\troot: 'gov-backdrop',\n\tbg: 'gov-backdrop__bg',\n}\n","/*\n * Backdrop\n */\n\n$class: \".gov-backdrop\";\n\n#{$class} {\n\t&__bg {\n\t\t@include z-index(\"modal\", 0);\n\t\tposition: fixed;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tbackground-color: $backdrop-bg;\n\t\topacity: $backdrop-opacity;\n\t}\n\n\t// VARIANTS\n\t@include parameter(\"inverse\") {\n\t\t#{$class} {\n\t\t\t&__bg {\n\t\t\t\tbackground-color: $backdrop-bg-inverse;\n\t\t\t\topacity: $backdrop-opacity-inverse;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Event, EventEmitter, h, Method, Prop, Host, Element } from '@stencil/core'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { BackdropClass } from './constants'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { booleanString, govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-backdrop',\n\tstyleUrl: 'gov-backdrop.scss',\n})\nexport class GovBackdrop {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovAlertElement\n\t/**\n\t * Determide if component should have inversed colors to be used on dark background.\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Default attribute for backdrop display\n\t */\n\t@Prop() visible = false\n\t/**\n\t * Adds accessible label for the backdrop that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when button clicks.\n\t */\n\t@Event({ eventName: 'gov-click' }) govClick: EventEmitter<MouseEvent>\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\tif (!this.visible) return null\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BackdropClass.root)} inverse={booleanString(this.inverse)}>\n\t\t\t\t<div\n\t\t\t\t\trole={'button'}\n\t\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\tonClick={e => this.govClick.emit(e)}\n\t\t\t\t\tclass={BackdropClass.bg}\n\t\t\t\t></div>\n\t\t\t</Host>\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\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, BackdropClass.root)\n\t}\n}\n"],"version":3}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-00e9a0d5.js';
|
|
2
|
-
import { v as validateProp } from './props-
|
|
3
|
-
import { S as Sizes } from './sizes-6c5943b4.js';
|
|
2
|
+
import { v as validateProp } from './props-789f7529.js';
|
|
4
3
|
import { g as govHost } from './template-10332292.js';
|
|
5
|
-
import { T as
|
|
6
|
-
import { V as Variants } from './variants-b5641e3d.js';
|
|
4
|
+
import { B as ButtonVariants, a as ButtonSizes, T as Type } from './constants-1a2146b2.js';
|
|
7
5
|
import './gov.log-af905420.js';
|
|
6
|
+
import './sizes-6c5943b4.js';
|
|
7
|
+
import './variants-2b936d58.js';
|
|
8
|
+
import './utils-c057a3fa.js';
|
|
8
9
|
|
|
9
10
|
var NativeType;
|
|
10
11
|
(function (NativeType) {
|
|
@@ -32,22 +33,22 @@ const GovBadge = class {
|
|
|
32
33
|
this.disabled = false;
|
|
33
34
|
this.href = undefined;
|
|
34
35
|
this.target = undefined;
|
|
35
|
-
this.size =
|
|
36
|
+
this.size = 'm';
|
|
36
37
|
this.type = 'solid';
|
|
37
38
|
this.tag = 'span';
|
|
38
|
-
this.nativeType =
|
|
39
|
-
this.variant =
|
|
39
|
+
this.nativeType = 'span';
|
|
40
|
+
this.variant = 'primary';
|
|
40
41
|
this.wcagLabel = undefined;
|
|
41
42
|
this.h = govHost(this.host);
|
|
42
43
|
}
|
|
43
44
|
validateVariant(newValue) {
|
|
44
|
-
validateProp(
|
|
45
|
+
validateProp(ButtonVariants, newValue, BadgeClass.root);
|
|
45
46
|
}
|
|
46
47
|
validateSize(newValue) {
|
|
47
|
-
validateProp(
|
|
48
|
+
validateProp(ButtonSizes, newValue, BadgeClass.root);
|
|
48
49
|
}
|
|
49
50
|
validateType(newValue) {
|
|
50
|
-
validateProp(
|
|
51
|
+
validateProp(Type, newValue, BadgeClass.root);
|
|
51
52
|
}
|
|
52
53
|
componentWillLoad() {
|
|
53
54
|
this.validateVariant(this.variant);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-badge.entry.js","mappings":"
|
|
1
|
+
{"file":"gov-badge.entry.js","mappings":";;;;;;;;;AAEA,IAAK,UAGJ;AAHD,WAAK,UAAU;EACd,2BAAa,CAAA;EACb,+BAAiB,CAAA;AAClB,CAAC,EAHI,UAAU,KAAV,UAAU,QAGd;AAIM,MAAM,UAAU,GAAG;EACzB,IAAI,EAAE,WAAW;EACjB,KAAK,EAAE,kBAAkB;CACzB;;ACZD,MAAM,WAAW,GAAG,q/+DAAq/+D;;ACOzg/D,IAAK,IAIJ;AAJD,WAAK,IAAI;EACR,eAAO,CAAA;EACP,qBAAa,CAAA;EACb,yBAAiB,CAAA;AAClB,CAAC,EAJI,IAAI,KAAJ,IAAI,QAIR;MAMY,QAAQ;E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AAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,SAAS,EAAE,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,IAE9C,EAAC,GAAG,IAAC,KAAK,EAAC,SAAS,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,gBAAc,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,IAC9I,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,YAAM,IAAI,EAAC,WAAW,GAAQ,EAC9D,eAAQ,EACP,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,YAAM,IAAI,EAAC,YAAY,GAAQ,CAC3D,CACA,EACP;GACD;EAEO,cAAc,CAAC,CAAe;IACrC,CAAC,CAAC,eAAe,EAAE,CAAA;IACnB,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,EAAE;MAC5B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KACrB;GACD;;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-badge/constants.ts","../../../packages/core/src/components/gov-badge/gov-badge.scss?tag=gov-badge","../../../packages/core/src/components/gov-badge/gov-badge.tsx"],"sourcesContent":["import { ValueOf } from '../../types/interfaces'\n\nenum NativeType {\n\tSPAN = 'span',\n\tBUTTON = 'button',\n}\n\nexport type NativeTypesType = `${ValueOf<typeof NativeType>}`\n\nexport const BadgeClass = {\n\troot: 'gov-badge',\n\tinner: 'gov-badge__inner',\n}\n","/*\n * Badge\n */\n\n// Shared definitions - button & badge\n@import \"../gov-button/gov-button-core.scss\";\n\n.gov-badge {\n\t@extend %button-core;\n\ta .gov-icon {\n\t\tmargin: 0;\n\t}\n\t.element {\n\t\tpadding: rem-calc(4 10);\n\t\tfont-family: $font-family-primary;\n\t\tfont-weight: 400;\n\t\tletter-spacing: initial;\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $button-sizes {\n\t\t$radius: calc(#{get(\"min-height\", $definitions)} * 0.5);\n\t\t&[size=\"#{$size}\"] {\n\t\t\t.element {\n\t\t\t\tborder-radius: $radius;\n\t\t\t}\n\n\t\t\t// HOVERS\n\t\t\t&[hoverable] .element {\n\t\t\t\t@include focus-outline($radius, $outline-offset);\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $types in $badge-inverse-variants {\n\t\t&[type=\"solid\"][variant=\"#{$variant}\"] {\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\t.element {\n\t\t\t\t\tborder-width: rem-calc(1);\n\t\t\t\t\tborder-color: deep-map-get($badge-inverse-variants, $variant, \"border-color\");\n\t\t\t\t\tbackground-color: deep-map-get($badge-inverse-variants, $variant, \"bg\");\n\t\t\t\t\tcolor: deep-map-get($badge-inverse-variants, $variant, \"color\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch, Event, EventEmitter } from '@stencil/core'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { govHost } from '../../helpers/Dom/template'\nimport { BadgeClass, NativeTypesType } from './constants'\nimport { ButtonSizesType, TypesType, Type, ButtonVariantType, ButtonVariants, ButtonSizes } from '../gov-button/constants'\n\nenum Tags {\n\tA = 'a',\n\tSPAN = 'span',\n\tBUTTON = 'button',\n}\n\n@Component({\n\ttag: 'gov-badge',\n\tstyleUrl: 'gov-badge.scss',\n})\nexport class GovBadge {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovBadgeElement\n\n\t/**\n\t * Determide if component should have inversed colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Makes the badge component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target: string\n\t/**\n\t * Badge’s size.\n\t */\n\t@Prop() readonly size: ButtonSizesType = 'm'\n\t/**\n\t * Badges's type\n\t */\n\t@Prop() readonly type: TypesType = 'solid'\n\t/**\n\t * Used to change the HMTL tag in the badge\n\t */\n\t@Prop() readonly tag: string = 'span'\n\t/**\n\t * Same as original parameter\n\t * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n\t */\n\t@Prop() readonly nativeType: NativeTypesType = 'span'\n\t/**\n\t * Style variation of the badge.\n\t */\n\t@Prop() readonly variant: ButtonVariantType = 'primary'\n\t/**\n\t * Adds accessible label for the button that is only shown for screen readers.\n\t * Typically, this label text replaces the visible text on the button for users who use assistive technology.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * Emitted when the button click.\n\t */\n\t@Event({ eventName: 'gov-click' }) govClick: EventEmitter<PointerEvent>\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(ButtonVariants, newValue, BadgeClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ButtonSizes, newValue, BadgeClass.root)\n\t}\n\n\t@Watch('type')\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(Type, newValue, BadgeClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateType(this.type)\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? Tags.A : this.nativeType == 'button' ? Tags.BUTTON : this.tag\n\t\tconst nativeType = Tag == Tags.BUTTON ? this.nativeType : undefined\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(BadgeClass.root)}\n\t\t\t\tdisabled={this.disabled}\n\t\t\t\thref={this.href}\n\t\t\t\tvariant={this.variant}\n\t\t\t\tsize={this.size}\n\t\t\t\ttype={this.type}\n\t\t\t\tinverse={this.inverse}\n\t\t\t\thoverable={Tag == Tags.A || Tag == Tags.BUTTON}\n\t\t\t>\n\t\t\t\t<Tag class=\"element\" href={this.href} target={this.target} aria-label={this.wcagLabel} onClick={this.onClickHandler.bind(this)} type={nativeType}>\n\t\t\t\t\t{this.h.hasSlot('left-icon') && <slot name=\"left-icon\"></slot>}\n\t\t\t\t\t<slot />\n\t\t\t\t\t{this.h.hasSlot('right-icon') && <slot name=\"right-icon\"></slot>}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false) {\n\t\t\tthis.govClick.emit(e)\n\t\t}\n\t}\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-00e9a0d5.js';
|
|
2
|
-
import { v as validateWcagLabel } from './wcag-
|
|
3
|
-
import { c as canValidateWcagOnRender } from './win-
|
|
4
|
-
import { d as delay } from './utils-
|
|
2
|
+
import { v as validateWcagLabel } from './wcag-3792d4bb.js';
|
|
3
|
+
import { c as canValidateWcagOnRender } from './win-9c8460bb.js';
|
|
4
|
+
import { d as delay } from './utils-c057a3fa.js';
|
|
5
5
|
import { g as govHost, b as booleanString } from './template-10332292.js';
|
|
6
6
|
import './gov.log-af905420.js';
|
|
7
7
|
import './string.utils-f268fc6b.js';
|
|
@@ -38,8 +38,7 @@ const GovBreadcrumbs = class {
|
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
40
|
const { isExpandedState } = this;
|
|
41
|
-
return (h(Host, { class: this.h.classes(BreadcrumbsClass.root), collapsible: this.collapsible }, h("nav", { "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy }, h("ul", { class: BreadcrumbsClass.list }, h("li", { class: BreadcrumbsClass.item }, h("a", { href: "#", class: "gov-link" }, "Dom\u016F"), h("gov-icon", { class: BreadcrumbsClass.arrow, name: "arrow-right" })), h("li", { class: BreadcrumbsClass.item }, h("a", { href: "#", class: "gov-link" }, "Kam d\u00E1l"), h("gov-icon", { class: BreadcrumbsClass.arrow, name: "arrow-right" })), h("li", { class: BreadcrumbsClass.item }, h("a", { href: "#", class: "gov-link" }, "\u010Cesk\u00FD eGovernment"), h("gov-icon", { class: BreadcrumbsClass.arrow, name: "arrow-right" })), h("li", { class: BreadcrumbsClass.item }, h("strong", null, "Czech POINT")))), this.collapsible &&
|
|
42
|
-
h("gov-button", { "aria-expanded": booleanString(isExpandedState), class: BreadcrumbsClass.button, variant: "primary", size: "s", inverse: true }, h("gov-icon", { slot: "left-icon", name: "arrow-down", onClick: () => this.toggle() }))));
|
|
41
|
+
return (h(Host, { class: this.h.classes(BreadcrumbsClass.root), collapsible: this.collapsible }, h("nav", { "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy }, h("ul", { class: BreadcrumbsClass.list }, h("li", { class: BreadcrumbsClass.item }, h("a", { href: "#", class: "gov-link" }, "Dom\u016F"), h("gov-icon", { class: BreadcrumbsClass.arrow, name: "arrow-right" })), h("li", { class: BreadcrumbsClass.item }, h("a", { href: "#", class: "gov-link" }, "Kam d\u00E1l"), h("gov-icon", { class: BreadcrumbsClass.arrow, name: "arrow-right" })), h("li", { class: BreadcrumbsClass.item }, h("a", { href: "#", class: "gov-link" }, "\u010Cesk\u00FD eGovernment"), h("gov-icon", { class: BreadcrumbsClass.arrow, name: "arrow-right" })), h("li", { class: BreadcrumbsClass.item }, h("strong", null, "Czech POINT")))), this.collapsible && (h("gov-button", { "aria-expanded": booleanString(isExpandedState), class: BreadcrumbsClass.button, variant: "primary", size: "s", inverse: true }, h("gov-icon", { slot: "left-icon", name: "arrow-down", onClick: () => this.toggle() })))));
|
|
43
42
|
}
|
|
44
43
|
/**
|
|
45
44
|
* Opening the Breadcrumbs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-breadcrumbs.entry.js","mappings":";;;;;;;;AAAO,MAAM,gBAAgB,GAAG;EAC/B,IAAI,EAAE,iBAAiB;EACvB,KAAK,EAAE,wBAAwB;EAC/B,IAAI,EAAE,uBAAuB;EAC7B,IAAI,EAAE,uBAAuB;EAC7B,MAAM,EAAE,yBAAyB;CACjC;;ACND,MAAM,iBAAiB,GAAG,i4BAAi4B;;MCa94B,cAAc;EAG1B;;;;uBASwC,KAAK;sBAIsB,KAAK;;;IAZvE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EA0BO,WAAW;IAClB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;GACvE;EAED,MAAM,kBAAkB;IACvB,IAAI,uBAAuB,EAAE,EAAE;MAC9B,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;MAChB,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;KACzB;GACD;EAED,MAAM;IACL,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAA;IAEhC,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,IAChF,yBAAiB,IAAI,CAAC,SAAS,qBAAmB,IAAI,CAAC,cAAc,IACpE,UAAI,KAAK,EAAE,gBAAgB,CAAC,IAAI,IAC/B,UAAI,KAAK,EAAE,gBAAgB,CAAC,IAAI,IAC/B,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,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,GAAa,CAC1E,CACb,CACK,EACP;GACD;;;;EAKD,MAAM,IAAI;IACT,IAAI,CAAC,eAAe,GAAG,IAAI,CAAA;IAC3B,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMD,MAAM,KAAK;IACV,IAAI,CAAC,eAAe,GAAG,KAAK,CAAA;IAC5B,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMD,MAAM,MAAM;IACX,IAAI,CAAC,eAAe,GAAG,CAAC,IAAI,CAAC,eAAe,CAAA;IAC5C,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMD,MAAM,YAAY;IACjB,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAA;GAC7E;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-breadcrumbs/constants.ts","../../../packages/core/src/components/gov-breadcrumbs/gov-breadcrumbs.scss?tag=gov-breadcrumbs","../../../packages/core/src/components/gov-breadcrumbs/gov-breadcrumbs.tsx"],"sourcesContent":["export const BreadcrumbsClass = {\n\troot: 'gov-breadcrumbs',\n\tarrow: 'gov-breadcrumbs__arrow',\n\tlist: 'gov-breadcrumbs__list',\n\titem: 'gov-breadcrumbs__item',\n\tbutton: 'gov-breadcrumbs__button',\n}\n","/*\n * Pagination\n */\n\n$class: \".gov-breadcrumbs\";\n\n#{$class} {\n\t@include base(flex);\n\tgap: rem-calc(16);\n\tjustify-content: space-between;\n\talign-items: flex-start;\n\t&__list {\n\t\t@extend %reset-ul;\n\t}\n\t&__list &__item {\n\t\t@extend %reset-ul-li;\n\t\tdisplay: inline;\n\t}\n\t&__arrow {\n\t\twidth: rem-calc(10);\n\t\theight: rem-calc(10);\n\t\tmargin: rem-calc(0 16px);\n\t\tcolor: $breadcrumbs-arrow-color;\n\t}\n\t&__button {\n\t\tflex: 0 0 auto;\n\n\t\t// STATES\n\t\t@include parameter(\"aria-expanded\") {\n\t\t\ttransform: scale(-1);\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop, State, Event, EventEmitter } from '@stencil/core'\nimport { BreadcrumbsClass } from './constants'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { GovBreadcrumbsChangeEvent } from './gov-breadcrumbs.d'\nimport { booleanString, govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-breadcrumbs',\n\tstyleUrl: 'gov-breadcrumbs.scss',\n})\nexport class GovBreadcrumbs {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovBreadcrumbsElement\n\t@State() isExpandedState: boolean\n\t/**\n\t * Defines wether the components can be collapsible when element doesn't fit in one row.\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Defines whether the breadcrumbs are open or closed by default\n\t */\n\t@Prop({ attribute: 'is-expanded' }) readonly isExpanded: boolean = false\n\t/**\n\t * Adds accessible label for the pagination that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * Indicates the id of a component that labels the pagination.\n\t */\n\t@Prop({ attribute: 'wcag-labelded-by' }) readonly wcagLabelledBy: string\n\n\t/**\n\t * Called when the Breadrumbs state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovBreadcrumbsChangeEvent>\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({ open: this.isExpandedState, element: this.host })\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 { isExpandedState } = this\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BreadcrumbsClass.root)} collapsible={this.collapsible}>\n\t\t\t\t<nav aria-label={this.wcagLabel} aria-labelledby={this.wcagLabelledBy}>\n\t\t\t\t\t<ul class={BreadcrumbsClass.list}>\n\t\t\t\t\t\t<li class={BreadcrumbsClass.item}>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"gov-link\">\n\t\t\t\t\t\t\t\tDomů\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<gov-icon class={BreadcrumbsClass.arrow} name=\"arrow-right\"></gov-icon>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li class={BreadcrumbsClass.item}>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"gov-link\">\n\t\t\t\t\t\t\t\tKam dál\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<gov-icon class={BreadcrumbsClass.arrow} name=\"arrow-right\"></gov-icon>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li class={BreadcrumbsClass.item}>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"gov-link\">\n\t\t\t\t\t\t\t\tČeský eGovernment\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<gov-icon class={BreadcrumbsClass.arrow} name=\"arrow-right\"></gov-icon>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li class={BreadcrumbsClass.item}>\n\t\t\t\t\t\t\t<strong>Czech POINT</strong>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</nav>\n\n\t\t\t\t{this.collapsible && (\n\t\t\t\t\t<gov-button aria-expanded={booleanString(isExpandedState)} class={BreadcrumbsClass.button} variant=\"primary\" size=\"s\" inverse>\n\t\t\t\t\t\t<gov-icon slot=\"left-icon\" name=\"arrow-down\" onClick={() => this.toggle()}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\t/**\n\t * Opening the Breadcrumbs\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpandedState = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the Breadcrumbs\n\t */\n\t@Method()\n\tasync close(): Promise<void> {\n\t\tthis.isExpandedState = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Breadcrumbs switch\n\t */\n\t@Method()\n\tasync toggle(): Promise<void> {\n\t\tthis.isExpandedState = !this.isExpandedState\n\t\tthis.emmitChange()\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\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, BreadcrumbsClass.root)\n\t}\n}\n"],"version":3}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-00e9a0d5.js';
|
|
2
|
-
import { v as validateProp } from './props-
|
|
3
|
-
import {
|
|
2
|
+
import { v as validateProp } from './props-789f7529.js';
|
|
3
|
+
import { b as ButtonClass, B as ButtonVariants, T as Type, N as NativeType } from './constants-1a2146b2.js';
|
|
4
4
|
import { g as govHost, p as prepareClasses, t as toBoolAttrIfDefined, a as toBoolAttr } from './template-10332292.js';
|
|
5
5
|
import { S as Sizes } from './sizes-6c5943b4.js';
|
|
6
|
-
import { a as validateWcagRef, v as validateWcagLabel } from './wcag-
|
|
7
|
-
import { c as canValidateWcagOnRender } from './win-
|
|
8
|
-
import { d as delay } from './utils-
|
|
6
|
+
import { a as validateWcagRef, v as validateWcagLabel } from './wcag-3792d4bb.js';
|
|
7
|
+
import { c as canValidateWcagOnRender } from './win-9c8460bb.js';
|
|
8
|
+
import { d as delay } from './utils-c057a3fa.js';
|
|
9
9
|
import './gov.log-af905420.js';
|
|
10
|
-
import './variants-
|
|
10
|
+
import './variants-2b936d58.js';
|
|
11
11
|
import './string.utils-f268fc6b.js';
|
|
12
12
|
|
|
13
13
|
function toBool(value) {
|
|
@@ -39,13 +39,13 @@ const GovButton = class {
|
|
|
39
39
|
this.govFocus = createEvent(this, "gov-focus", 7);
|
|
40
40
|
this.govBlur = createEvent(this, "gov-blur", 7);
|
|
41
41
|
this.variant = undefined;
|
|
42
|
-
this.size =
|
|
42
|
+
this.size = 'm';
|
|
43
43
|
this.type = 'solid';
|
|
44
44
|
this.expanded = false;
|
|
45
45
|
this.inverse = false;
|
|
46
46
|
this.name = undefined;
|
|
47
47
|
this.disabled = false;
|
|
48
|
-
this.nativeType =
|
|
48
|
+
this.nativeType = 'button';
|
|
49
49
|
this.href = undefined;
|
|
50
50
|
this.target = undefined;
|
|
51
51
|
this.download = undefined;
|
|
@@ -71,16 +71,16 @@ const GovButton = class {
|
|
|
71
71
|
this.h = govHost(this.host);
|
|
72
72
|
}
|
|
73
73
|
validateVariant(newValue) {
|
|
74
|
-
validateProp(
|
|
74
|
+
validateProp(ButtonVariants, newValue, ButtonClass.root);
|
|
75
75
|
}
|
|
76
76
|
validateType(newValue) {
|
|
77
|
-
validateProp(
|
|
77
|
+
validateProp(Type, newValue, ButtonClass.root);
|
|
78
78
|
}
|
|
79
79
|
validateSize(newValue) {
|
|
80
80
|
validateProp(Sizes, newValue, ButtonClass.root);
|
|
81
81
|
}
|
|
82
82
|
validateNativeType(newValue) {
|
|
83
|
-
validateProp(
|
|
83
|
+
validateProp(NativeType, newValue, ButtonClass.root);
|
|
84
84
|
}
|
|
85
85
|
componentWillLoad() {
|
|
86
86
|
this.validateVariant(this.variant);
|
|
@@ -101,25 +101,14 @@ const GovButton = class {
|
|
|
101
101
|
render() {
|
|
102
102
|
const Tag = this.href ? Tags.A : Tags.BUTTON;
|
|
103
103
|
const nativeType = Tag === Tags.A ? undefined : this.nativeType;
|
|
104
|
-
return (h(Host, { hoverable: true, size: this.size, variant: this.variant, class: this.h.classes(this.classNames), type: this.type, inverse: this.inverse }, h(Tag, { class: "element", ref: el => (this.buttonRef = el), onClick: this.onClickHandler.bind(this), onFocus: this.
|
|
104
|
+
return (h(Host, { hoverable: true, size: this.size, variant: this.variant, class: this.h.classes(this.classNames), type: this.type, inverse: this.inverse }, h(Tag, { class: "element", ref: el => (this.buttonRef = el), onClick: this.onClickHandler.bind(this), onFocus: () => this.govFocus.emit(), onBlur: () => this.govBlur.emit(), onMouseDown: () => (this.isPressed = true), onMouseUp: () => (this.isPressed = false), disabled: this.disabled, id: this.identifier, href: this.href, target: this.target, download: this.download, hreflang: this.hreflang, rel: this.rel, name: this.name, type: nativeType, tabindex: this.focusable ? '0' : '-1', "aria-activedescendant": this.wcagActiveDescendant, "aria-describedby": this.wcagActiveDescendant, "aria-description": this.wcagDescription, "aria-controls": this.wcagControls, "aria-details": this.wcagDetails, "aria-expanded": toBoolAttrIfDefined(this.wcagExpanded), "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns, "aria-haspopup": toBoolAttrIfDefined(this.wcagHasPopup), "aria-pressed": toBoolAttr(this.isPressed), "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-current": this.wcagCurrent }, toBool(this.loading) && !this.h.hasSlot('right-icon') && h("gov-icon", { name: "loader", class: "gov-spin-animation" }), this.h.hasSlot('left-icon') && h("slot", { name: "left-icon" }), h("slot", null), this.h.hasSlot('right-icon') && h("slot", { name: "right-icon" }), toBool(this.loading) && this.h.hasSlot('right-icon') && h("gov-icon", { name: "loader", class: "gov-spin-animation" }))));
|
|
105
105
|
}
|
|
106
106
|
onClickHandler(e) {
|
|
107
107
|
e.stopPropagation();
|
|
108
|
-
e.preventDefault();
|
|
109
108
|
if (this.disabled === false) {
|
|
110
109
|
this.govClick.emit(e);
|
|
111
110
|
}
|
|
112
111
|
}
|
|
113
|
-
onFocusHandler(e) {
|
|
114
|
-
e.stopPropagation();
|
|
115
|
-
e.preventDefault();
|
|
116
|
-
this.govFocus.emit(e);
|
|
117
|
-
}
|
|
118
|
-
onBlurHandler(e) {
|
|
119
|
-
e.stopPropagation();
|
|
120
|
-
e.preventDefault();
|
|
121
|
-
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ACb,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAA;GACtB;;;;EAMD,MAAM,YAAY;IACjB,IAAI,IAAI,CAAC,SAAS,EAAE;MACnB,eAAe,CAAC,IAAI,CAAC,oBAAoB,EAAE,uBAAuB,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;MACrF,eAAe,CAAC,IAAI,CAAC,YAAY,EAAE,eAAe,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;MACrE,eAAe,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;MACnE,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;MAC7D,eAAe,CAAC,IAAI,CAAC,YAAY,EAAE,eAAe,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;MACrE,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;KACxE;GACD;;;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/utils/bool.utils.ts","../../../packages/core/src/components/gov-button/gov-button.scss?tag=gov-button","../../../packages/core/src/components/gov-button/gov-button.tsx"],"sourcesContent":["export function toBool(value: any): boolean {\n\tif (typeof value === 'string') {\n\t\treturn ['true', 'True', 'TRUE', '1'].indexOf(value) !== -1\n\t} else if (typeof value === 'number') {\n\t\treturn value > 0\n\t} else if (typeof value === 'boolean') {\n\t\treturn value\n\t} else {\n\t\treturn value ? true : false\n\t}\n}\n","/*\n * Button\n */\n\n// Shared definitions - BUTTON & badge\n@import \"./gov-button-core.scss\";\n\n.gov-button {\n\t@extend %button-core;\n\tdisplay: inline-block;\n\t.element {\n\t\tborder-radius: #{$border-radius};\n\t}\n\n\t// STATES\n\t&[loading=\"true\"],\n\t&[loading=\"1\"] {\n\t\t.element {\n\t\t\t> .gov-icon:not(.gov-spin-animation),\n\t\t\t> gov-icon:not(.gov-spin-animation) {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $button-sizes {\n\t\t// Loading state\n\t\t&:not(&--w-icon)[loading=\"0\"][size=\"#{$size}\"],\n\t\t&:not(&--w-icon)[loading=\"false\"][size=\"#{$size}\"],\n\t\t&:not(&--w-icon)[loading=\"\"][size=\"#{$size}\"] {\n\t\t\t.element {\n\t\t\t\tpadding: get(\"padding-y\", $definitions)\n\t\t\t\t\tcalc(get(\"padding-x\", $definitions) + (get(\"padding-x\", $definitions) / 2) + (get(\"icon-size\", $definitions) / 2));\n\t\t\t}\n\t\t}\n\t}\n\t// Loading icon color\n\t@each $variant, $types in $button-variants {\n\t\t&[type=\"outlined\"][variant=\"#{$variant}\"],\n\t\t&[type=\"base\"][variant=\"#{$variant}\"] {\n\t\t\t.gov-spin-animation {\n\t\t\t\tcolor: deep-map-get($button-variants, $variant, \"outlined\", \"color\");\n\t\t\t}\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\t.gov-spin-animation {\n\t\t\t\t\tcolor: inherit;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { SizesType, NativeType, NativeTypes, NativeTypesType, Type, Types, Variants, VariantType, ButtonClass } from './constants'\nimport { govHost, toBoolAttr, toBoolAttrIfDefined, prepareClasses } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.d'\nimport { toBool } from '../../utils/bool.utils'\nimport { Sizes } from '../../core/constants/sizes'\nimport { validateWcagLabel, validateWcagRef } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\n\nenum Tags {\n\tA = 'a',\n\tBUTTON = 'button',\n}\n\n@Component({\n\ttag: 'gov-button',\n\tstyleUrl: 'gov-button.scss',\n})\nexport class GovButton {\n\tprivate h: GovHost\n\tprivate buttonRef?: HTMLButtonElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovButtonElement\n\n\t/**\n\t * Style variation of the button\n\t */\n\t@Prop() readonly variant: VariantType = undefined\n\t/**\n\t * Button’s size\n\t */\n\t@Prop() readonly size: SizesType = Sizes._M\n\t/**\n\t * Button's type\n\t */\n\t@Prop() readonly type: Type = 'solid'\n\t/**\n\t * Expands the button to fill 100% of the container width\n\t */\n\t@Prop() readonly expanded: boolean = false\n\t/**\n\t * Determine if component should have inversed colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * The name of the button, which gets paired with the button's value when submitted as part of a form. Corresponds with the native HTML name attribute\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n\t */\n\t@Prop() readonly nativeType: NativeTypesType = NativeType.BUTTON\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n\t */\n\t@Prop() readonly download: boolean\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-hreflang\n\t */\n\t@Prop() readonly hreflang: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-referrerpolicy\n\t */\n\t@Prop() readonly referrerpolicy: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-rel\n\t */\n\t@Prop() readonly rel: string\n\t/**\n\t * Indicates whether an asynchronous process is running\n\t */\n\t@Prop() readonly loading: string\n\t/**\n\t * Same as original parametr\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom button identifier\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Indicates the id of a related component’s visually focused element\n\t */\n\t@Prop({ attribute: 'wcag-active-descendant' }) readonly wcagActiveDescendant: string\n\t/**\n\t * Use this property to add an aria-controls attribute to the button. Use the attribute to point to the unique id of the content that the button manages\n\t */\n\t@Prop({ attribute: 'wcag-controls' }) readonly wcagControls: string\n\t/**\n\t * Indicates the id of a component that describes the button\n\t */\n\t@Prop({ attribute: 'wcag-described-by' }) readonly wcagDescribedBy: string\n\t/**\n\t * Aria description the button\n\t */\n\t@Prop({ attribute: 'wcag-description' }) readonly wcagDescription: string\n\t/**\n\t * Details of the component\n\t */\n\t@Prop({ attribute: 'wcag-details' }) readonly wcagDetails: string\n\t/**\n\t * If a button expands or collapses adjacent content, then use the ariaExpanded prop to add the aria-expanded attribute to the button\n\t * Set the value to convey the current expanded (true) or collapsed (false) state of the content\n\t */\n\t@Prop({ attribute: 'wcag-expanded' }) readonly wcagExpanded: boolean\n\t/**\n\t * Adds accessible label for the button that is only shown for screen readers\n\t * Typically, this label text replaces the visible text on the button for users who use assistive technology\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component owned by the button\n\t */\n\t@Prop({ attribute: 'wcag-owns' }) readonly wcagOwns: string\n\t/**\n\t * \tUse this property to add an aria-haspopup attribute to a button, if you are using it as a menu button\n\t */\n\t@Prop({ attribute: 'wcag-has-popup' }) readonly wcagHasPopup: string\n\t/**\n\t * Tells screen reader the element is pressed\n\t */\n\t@Prop({ attribute: 'wcag-pressed' }) readonly wcagPressed: string\n\t/**\n\t * Indicates the current item within a container or set of related elements\n\t */\n\t@Prop({ attribute: 'wcag-current' }) readonly wcagCurrent: string\n\t/**\n\t * Emitted when the button click\n\t */\n\t@Event({ eventName: 'gov-click' }) govClick: EventEmitter<PointerEvent>\n\t/**\n\t * Emitted when the button has focus\n\t */\n\t@Event({ eventName: 'gov-focus' }) govFocus: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the button loses focus\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FocusEvent>\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(Variants, newValue, ButtonClass.root)\n\t}\n\n\t@Watch('type')\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(Types, newValue, ButtonClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, ButtonClass.root)\n\t}\n\n\t@Watch('nativeType')\n\tvalidateNativeType(newValue: string): void {\n\t\tvalidateProp(NativeTypes, newValue, ButtonClass.root)\n\t}\n\n\t@State() isPressed = false\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateType(this.type)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateNativeType(this.nativeType)\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\tget classNames(): string {\n\t\tconst { h } = this\n\n\t\treturn prepareClasses([ButtonClass.root, h.hasSlot('left-icon') && ButtonClass.rootWithIcon, h.hasSlot('right-icon') && ButtonClass.rootWithIcon])\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? Tags.A : Tags.BUTTON\n\t\tconst nativeType = Tag === Tags.A ? undefined : this.nativeType\n\n\t\treturn (\n\t\t\t<Host hoverable={true} size={this.size} variant={this.variant} class={this.h.classes(this.classNames)} type={this.type} inverse={this.inverse}>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\tref={el => (this.buttonRef = el as HTMLButtonElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\tonMouseDown={() => (this.isPressed = true)}\n\t\t\t\t\tonMouseUp={() => (this.isPressed = false)}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tid={this.identifier}\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tdownload={this.download}\n\t\t\t\t\threflang={this.hreflang}\n\t\t\t\t\trel={this.rel}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\ttabindex={this.focusable ? '0' : '-1'}\n\t\t\t\t\taria-activedescendant={this.wcagActiveDescendant}\n\t\t\t\t\taria-describedby={this.wcagActiveDescendant}\n\t\t\t\t\taria-description={this.wcagDescription}\n\t\t\t\t\taria-controls={this.wcagControls}\n\t\t\t\t\taria-details={this.wcagDetails}\n\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\taria-haspopup={toBoolAttrIfDefined(this.wcagHasPopup)}\n\t\t\t\t\taria-pressed={toBoolAttr(this.isPressed)}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\taria-current={this.wcagCurrent}\n\t\t\t\t>\n\t\t\t\t\t{toBool(this.loading) && !this.h.hasSlot('right-icon') && <gov-icon name=\"loader\" class=\"gov-spin-animation\"></gov-icon>}\n\t\t\t\t\t{this.h.hasSlot('left-icon') && <slot name=\"left-icon\"></slot>}\n\t\t\t\t\t<slot />\n\t\t\t\t\t{this.h.hasSlot('right-icon') && <slot name=\"right-icon\"></slot>}\n\t\t\t\t\t{toBool(this.loading) && this.h.hasSlot('right-icon') && <gov-icon name=\"loader\" class=\"gov-spin-animation\"></gov-icon>}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\te.preventDefault()\n\t\tif (this.disabled === false) {\n\t\t\tthis.govClick.emit(e)\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\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.buttonRef.focus()\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.focusable) {\n\t\t\tvalidateWcagRef(this.wcagActiveDescendant, 'aria-activedescendant', ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagControls, 'aria-controls', ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagDetails, 'aria-details', ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagOwns, 'aria-owns', ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagHasPopup, 'aria-haspopup', ButtonClass.root)\n\t\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, ButtonClass.root)\n\t\t}\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"gov-button.entry.js","mappings":";;;;;;;;;;;;SAAgB,MAAM,CAAC,KAAU;EAChC,IAA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AAc,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;KACxE;GACD;;;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/utils/bool.utils.ts","../../../packages/core/src/components/gov-button/gov-button.scss?tag=gov-button","../../../packages/core/src/components/gov-button/gov-button.tsx"],"sourcesContent":["export function toBool(value: any): boolean {\n\tif (typeof value === 'string') {\n\t\treturn ['true', 'True', 'TRUE', '1'].indexOf(value) !== -1\n\t} else if (typeof value === 'number') {\n\t\treturn value > 0\n\t} else if (typeof value === 'boolean') {\n\t\treturn value\n\t} else {\n\t\treturn value ? true : false\n\t}\n}\n","/*\n * Button\n */\n\n// Shared definitions - BUTTON & badge\n@import \"./gov-button-core.scss\";\n\n.gov-button {\n\t@extend %button-core;\n\tdisplay: inline-block;\n\t.element {\n\t\tborder-radius: #{$border-radius};\n\t}\n\n\t// STATES\n\t&[loading=\"true\"],\n\t&[loading=\"1\"] {\n\t\t.element {\n\t\t\t> .gov-icon:not(.gov-spin-animation),\n\t\t\t> gov-icon:not(.gov-spin-animation) {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $button-sizes {\n\t\t// Loading state\n\t\t&:not(&--w-icon)[loading=\"0\"][size=\"#{$size}\"],\n\t\t&:not(&--w-icon)[loading=\"false\"][size=\"#{$size}\"],\n\t\t&:not(&--w-icon)[loading=\"\"][size=\"#{$size}\"] {\n\t\t\t.element {\n\t\t\t\tpadding: get(\"padding-y\", $definitions)\n\t\t\t\t\tcalc(get(\"padding-x\", $definitions) + (get(\"padding-x\", $definitions) / 2) + (get(\"icon-size\", $definitions) / 2));\n\t\t\t}\n\t\t}\n\t}\n\t// Loading icon color\n\t@each $variant, $types in $button-variants {\n\t\t&[type=\"outlined\"][variant=\"#{$variant}\"],\n\t\t&[type=\"base\"][variant=\"#{$variant}\"] {\n\t\t\t.gov-spin-animation {\n\t\t\t\tcolor: deep-map-get($button-variants, $variant, \"outlined\", \"color\");\n\t\t\t}\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\t.gov-spin-animation {\n\t\t\t\t\tcolor: inherit;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { ButtonSizesType, NativeTypesType, TypesType, ButtonVariants, ButtonVariantType, ButtonClass, Type, NativeType, ButtonTargetType } from './constants'\nimport { govHost, toBoolAttr, toBoolAttrIfDefined, prepareClasses } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { toBool } from '../../utils/bool.utils'\nimport { Sizes } from '../../core/constants/sizes'\nimport { validateWcagLabel, validateWcagRef } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\n\nenum Tags {\n\tA = 'a',\n\tBUTTON = 'button',\n}\n\n@Component({\n\ttag: 'gov-button',\n\tstyleUrl: 'gov-button.scss',\n})\nexport class GovButton {\n\tprivate h: GovHost\n\tprivate buttonRef?: HTMLButtonElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovButtonElement\n\n\t/**\n\t * Style variation of the button\n\t */\n\t@Prop() readonly variant?: ButtonVariantType\n\t/**\n\t * Button’s size\n\t */\n\t@Prop() readonly size?: ButtonSizesType = 'm'\n\t/**\n\t * Button's type\n\t */\n\t@Prop() readonly type?: TypesType = 'solid'\n\t/**\n\t * Expands the button to fill 100% of the container width\n\t */\n\t@Prop() readonly expanded: boolean = false\n\t/**\n\t * Determine if component should have inversed colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * The name of the button, which gets paired with the button's value when submitted as part of a form. Corresponds with the native HTML name attribute\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n\t */\n\t@Prop() readonly nativeType?: NativeTypesType = 'button'\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target?: ButtonTargetType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n\t */\n\t@Prop() readonly download: boolean\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-hreflang\n\t */\n\t@Prop() readonly hreflang: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-referrerpolicy\n\t */\n\t@Prop() readonly referrerpolicy: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-rel\n\t */\n\t@Prop() readonly rel: string\n\t/**\n\t * Indicates whether an asynchronous process is running\n\t */\n\t@Prop() readonly loading: string\n\t/**\n\t * Same as original parametr\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom button identifier\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Indicates the id of a related component’s visually focused element\n\t */\n\t@Prop({ attribute: 'wcag-active-descendant' }) readonly wcagActiveDescendant: string\n\t/**\n\t * Use this property to add an aria-controls attribute to the button. Use the attribute to point to the unique id of the content that the button manages\n\t */\n\t@Prop({ attribute: 'wcag-controls' }) readonly wcagControls: string\n\t/**\n\t * Indicates the id of a component that describes the button\n\t */\n\t@Prop({ attribute: 'wcag-described-by' }) readonly wcagDescribedBy: string\n\t/**\n\t * Aria description the button\n\t */\n\t@Prop({ attribute: 'wcag-description' }) readonly wcagDescription: string\n\t/**\n\t * Details of the component\n\t */\n\t@Prop({ attribute: 'wcag-details' }) readonly wcagDetails: string\n\t/**\n\t * If a button expands or collapses adjacent content, then use the ariaExpanded prop to add the aria-expanded attribute to the button\n\t * Set the value to convey the current expanded (true) or collapsed (false) state of the content\n\t */\n\t@Prop({ attribute: 'wcag-expanded' }) readonly wcagExpanded: boolean\n\t/**\n\t * Adds accessible label for the button that is only shown for screen readers\n\t * Typically, this label text replaces the visible text on the button for users who use assistive technology\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component owned by the button\n\t */\n\t@Prop({ attribute: 'wcag-owns' }) readonly wcagOwns: string\n\t/**\n\t * \tUse this property to add an aria-haspopup attribute to a button, if you are using it as a menu button\n\t */\n\t@Prop({ attribute: 'wcag-has-popup' }) readonly wcagHasPopup: string\n\t/**\n\t * Tells screen reader the element is pressed\n\t */\n\t@Prop({ attribute: 'wcag-pressed' }) readonly wcagPressed: string\n\t/**\n\t * Indicates the current item within a container or set of related elements\n\t */\n\t@Prop({ attribute: 'wcag-current' }) readonly wcagCurrent: string\n\t/**\n\t * Emitted when the button click\n\t */\n\t@Event({ eventName: 'gov-click' }) govClick: EventEmitter<PointerEvent>\n\t/**\n\t * Emitted when the button has focus\n\t */\n\t@Event({ eventName: 'gov-focus' }) govFocus: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the button loses focus\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FocusEvent>\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(ButtonVariants, newValue, ButtonClass.root)\n\t}\n\n\t@Watch('type')\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(Type, newValue, ButtonClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, ButtonClass.root)\n\t}\n\n\t@Watch('nativeType')\n\tvalidateNativeType(newValue: string): void {\n\t\tvalidateProp(NativeType, newValue, ButtonClass.root)\n\t}\n\n\t@State() isPressed = false\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateType(this.type)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateNativeType(this.nativeType)\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\tget classNames(): string {\n\t\tconst { h } = this\n\n\t\treturn prepareClasses([ButtonClass.root, h.hasSlot('left-icon') && ButtonClass.rootWithIcon, h.hasSlot('right-icon') && ButtonClass.rootWithIcon])\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? Tags.A : Tags.BUTTON\n\t\tconst nativeType = Tag === Tags.A ? undefined : this.nativeType\n\n\t\treturn (\n\t\t\t<Host hoverable={true} size={this.size} variant={this.variant} class={this.h.classes(this.classNames)} type={this.type} inverse={this.inverse}>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\tref={el => (this.buttonRef = el as HTMLButtonElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\tonFocus={() => this.govFocus.emit()}\n\t\t\t\t\tonBlur={() => this.govBlur.emit()}\n\t\t\t\t\tonMouseDown={() => (this.isPressed = true)}\n\t\t\t\t\tonMouseUp={() => (this.isPressed = false)}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tid={this.identifier}\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tdownload={this.download}\n\t\t\t\t\threflang={this.hreflang}\n\t\t\t\t\trel={this.rel}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\ttabindex={this.focusable ? '0' : '-1'}\n\t\t\t\t\taria-activedescendant={this.wcagActiveDescendant}\n\t\t\t\t\taria-describedby={this.wcagActiveDescendant}\n\t\t\t\t\taria-description={this.wcagDescription}\n\t\t\t\t\taria-controls={this.wcagControls}\n\t\t\t\t\taria-details={this.wcagDetails}\n\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\taria-haspopup={toBoolAttrIfDefined(this.wcagHasPopup)}\n\t\t\t\t\taria-pressed={toBoolAttr(this.isPressed)}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\taria-current={this.wcagCurrent}\n\t\t\t\t>\n\t\t\t\t\t{toBool(this.loading) && !this.h.hasSlot('right-icon') && <gov-icon name=\"loader\" class=\"gov-spin-animation\"></gov-icon>}\n\t\t\t\t\t{this.h.hasSlot('left-icon') && <slot name=\"left-icon\"></slot>}\n\t\t\t\t\t<slot />\n\t\t\t\t\t{this.h.hasSlot('right-icon') && <slot name=\"right-icon\"></slot>}\n\t\t\t\t\t{toBool(this.loading) && this.h.hasSlot('right-icon') && <gov-icon name=\"loader\" class=\"gov-spin-animation\"></gov-icon>}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false) {\n\t\t\tthis.govClick.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.buttonRef.focus()\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.focusable) {\n\t\t\tvalidateWcagRef(this.wcagActiveDescendant, 'aria-activedescendant', ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagControls, 'aria-controls', ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagDetails, 'aria-details', ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagOwns, 'aria-owns', ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagHasPopup, 'aria-haspopup', ButtonClass.root)\n\t\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, ButtonClass.root)\n\t\t}\n\t}\n}\n"],"version":3}
|
|
@@ -2,9 +2,9 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
|
|
|
2
2
|
import { g as govHost, b as booleanString } from './template-10332292.js';
|
|
3
3
|
import { c as createID } from './string.utils-f268fc6b.js';
|
|
4
4
|
import { a as govErrorLog } from './gov.log-af905420.js';
|
|
5
|
-
import { v as validateWcagLabel } from './wcag-
|
|
6
|
-
import { c as canValidateWcagOnRender } from './win-
|
|
7
|
-
import { d as delay } from './utils-
|
|
5
|
+
import { v as validateWcagLabel } from './wcag-3792d4bb.js';
|
|
6
|
+
import { c as canValidateWcagOnRender } from './win-9c8460bb.js';
|
|
7
|
+
import { d as delay } from './utils-c057a3fa.js';
|
|
8
8
|
|
|
9
9
|
const CardClass = {
|
|
10
10
|
root: 'gov-card',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-card.entry.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,iBA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IAAI,CAAC,WAAW,EAAE;MACrB,iBAAiB,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;KACpF;GACD;;;;;;;;;;","names":[],"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.entry.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;;MCe5yK,OAAO;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,I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EAAE,SAAS,CAAC,IAAI,IACzB,YAAM,IAAI,EAAC,KAAK,GAAG,CACd,CACN,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":[],"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.entry.js","mappings":";;;AAAO,MAAM,cAAc,GAAG;EAC7B,IAAI,EAAE,eAAe;CACrB;;ACFD,MAAM,eAAe,GAAG,qmBAAqmB;;MCShnB,YAAY;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":[],"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
|
|
1
|
+
{"file":"gov-container.entry.js","mappings":";;;AAAO,MAAM,cAAc,GAAG;EAC7B,IAAI,EAAE,eAAe;CACrB;;ACFD,MAAM,eAAe,GAAG,qmBAAqmB;;MCShnB,YAAY;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":[],"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[]> {\n\t\treturn Promise.resolve(slottedChildren(this.host))\n\t}\n}\n"],"version":3}
|