@gov-design-system-ce/components 0.0.53 → 0.0.55
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-440cd5c8.js +29 -0
- package/dist/cjs/constants-440cd5c8.js.map +1 -0
- package/dist/cjs/{constants-393e915a.js → constants-dde21dcf.js} +4 -4
- package/dist/cjs/{constants-393e915a.js.map → constants-dde21dcf.js.map} +1 -1
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/gov-accordion-item.cjs.entry.js +3 -3
- package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-accordion.cjs.entry.js +4 -4
- package/dist/cjs/gov-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-alert.cjs.entry.js +2 -2
- package/dist/cjs/gov-app.cjs.entry.js +120 -60
- package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-attachments_3.cjs.entry.js +2 -2
- package/dist/cjs/gov-backdrop.cjs.entry.js +2 -2
- package/dist/cjs/gov-badge.cjs.entry.js +1 -1
- package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js +2 -2
- package/dist/cjs/gov-button.cjs.entry.js +2 -2
- package/dist/cjs/gov-card.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-file.cjs.entry.js +8 -2
- package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-group.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-input.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-multi-select.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-radio.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-select.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-switch.cjs.entry.js +2 -2
- package/dist/cjs/gov-icon.cjs.entry.js +22 -15
- package/dist/cjs/gov-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-message.cjs.entry.js +1 -1
- package/dist/cjs/gov-message.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-modal.cjs.entry.js +2 -2
- package/dist/cjs/gov-nav.cjs.entry.js +2 -2
- package/dist/cjs/gov-pagination.cjs.entry.js +2 -2
- package/dist/cjs/gov-prompt.cjs.entry.js +2 -2
- package/dist/cjs/gov-side-nav.cjs.entry.js +2 -2
- package/dist/cjs/gov-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/gov-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tabs.cjs.entry.js +2 -2
- package/dist/cjs/gov-tile.cjs.entry.js +2 -15
- package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard-item.cjs.entry.js +114 -0
- package/dist/cjs/gov-wizard-item.cjs.entry.js.map +1 -0
- package/dist/cjs/{gov-wizzard.cjs.entry.js → gov-wizard.cjs.entry.js} +13 -13
- package/dist/cjs/gov-wizard.cjs.entry.js.map +1 -0
- package/dist/cjs/index-83edd4fe.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{wcag-b0321f09.js → wcag-d7912060.js} +2 -2
- package/dist/cjs/{wcag-b0321f09.js.map → wcag-d7912060.js.map} +1 -1
- package/dist/cjs/{win-53f637d4.js → win-0427c131.js} +4 -1
- package/dist/cjs/win-0427c131.js.map +1 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/gov-accordion/constants.js +3 -3
- package/dist/collection/components/gov-accordion/constants.js.map +1 -1
- package/dist/collection/components/gov-accordion/gov-accordion-item.css +102 -71
- package/dist/collection/components/gov-accordion/gov-accordion-item.js +1 -1
- package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
- package/dist/collection/components/gov-accordion/gov-accordion.css +2 -2
- package/dist/collection/components/gov-alert/gov-alert.css +1 -1
- package/dist/collection/components/gov-app/gov-app.css +1 -1
- package/dist/collection/components/gov-app/gov-app.js +2 -2
- package/dist/collection/components/gov-app/gov-app.js.map +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments-item.css +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments.css +1 -1
- package/dist/collection/components/gov-backdrop/gov-backdrop.css +1 -1
- package/dist/collection/components/gov-badge/gov-badge.css +1 -1
- package/dist/collection/components/gov-badge/gov-badge.js +2 -2
- package/dist/collection/components/gov-badge/gov-badge.js.map +1 -1
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.css +1 -1
- package/dist/collection/components/gov-button/default/gov-button.css +1 -1
- package/dist/collection/components/gov-button/dropdown/gov-dropdown.css +1 -1
- package/dist/collection/components/gov-card/gov-card.css +1 -1
- package/dist/collection/components/gov-container/gov-container.css +1 -1
- package/dist/collection/components/gov-control-group/gov-control-group.css +1 -1
- package/dist/collection/components/gov-cookiebar/gov-cookiebar.css +1 -1
- package/dist/collection/components/gov-empty/gov-empty.css +1 -1
- package/dist/collection/components/gov-error-code/gov-error-code.css +1 -1
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.css +1 -1
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.css +1 -1
- package/dist/collection/components/gov-form/control/gov-form-control.css +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.css +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.js +23 -0
- package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
- package/dist/collection/components/gov-form/group/gov-form-group.css +8 -8
- package/dist/collection/components/gov-form/input/gov-form-input.css +1 -1
- package/dist/collection/components/gov-form/label/gov-form-label.css +1 -1
- package/dist/collection/components/gov-form/message/gov-form-message.css +1 -1
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +1 -1
- package/dist/collection/components/gov-form/password-power/gov-form-password-power.css +1 -1
- package/dist/collection/components/gov-form/radio/gov-form-radio.css +1 -1
- package/dist/collection/components/gov-form/search/gov-form-search.css +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.css +1 -1
- package/dist/collection/components/gov-form/switch/gov-form-switch.css +1 -1
- package/dist/collection/components/gov-grid/gov-grid-item.css +1 -1
- package/dist/collection/components/gov-grid/gov-grid.css +1 -1
- package/dist/collection/components/gov-icon/gov-icon.css +1 -1
- package/dist/collection/components/gov-icon/gov-icon.js +14 -7
- package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
- package/dist/collection/components/gov-layout/gov-layout-column.css +1 -1
- package/dist/collection/components/gov-layout/gov-layout.css +1 -1
- package/dist/collection/components/gov-loading/loading/gov-loading.css +1 -1
- package/dist/collection/components/gov-loading/skeleton/gov-skeleton.css +1 -1
- package/dist/collection/components/gov-message/gov-message.css +1 -1
- package/dist/collection/components/gov-message/gov-message.js +1 -1
- package/dist/collection/components/gov-message/gov-message.js.map +1 -1
- package/dist/collection/components/gov-modal/gov-modal.css +1 -1
- package/dist/collection/components/gov-nav/gov-nav-item.css +1 -1
- package/dist/collection/components/gov-nav/gov-nav.css +1 -1
- package/dist/collection/components/gov-pagination/gov-pagination.css +1 -1
- package/dist/collection/components/gov-promp/gov-prompt.css +1 -1
- package/dist/collection/components/gov-side-nav/gov-side-nav-item.css +1 -1
- package/dist/collection/components/gov-side-nav/gov-side-nav.css +1 -1
- package/dist/collection/components/gov-spacer/gov-spacer.css +1 -1
- package/dist/collection/components/gov-statsbar/gov-statsbar-item.css +1 -1
- package/dist/collection/components/gov-statsbar/gov-statsbar.css +1 -1
- package/dist/collection/components/gov-stepper/gov-stepper-item.css +23 -23
- package/dist/collection/components/gov-stepper/gov-stepper.css +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs-item.css +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs.css +1 -1
- package/dist/collection/components/gov-tile/container/gov-tiles.css +1 -1
- package/dist/collection/components/gov-tile/gov-tile.css +1 -1
- package/dist/collection/components/gov-tile/gov-tile.js +19 -26
- package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
- package/dist/collection/components/gov-toast/gov-toast.css +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.css +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip.css +1 -1
- package/dist/collection/components/gov-wizard/constants.js +20 -0
- package/dist/collection/components/gov-wizard/constants.js.map +1 -0
- package/dist/collection/components/gov-wizard/gov-wizard-item.css +471 -0
- package/dist/collection/components/gov-wizard/gov-wizard-item.d.js +2 -0
- package/dist/collection/components/gov-wizard/gov-wizard-item.d.js.map +1 -0
- package/dist/collection/components/{gov-wizzard/gov-wizzard-item.js → gov-wizard/gov-wizard-item.js} +35 -35
- package/dist/collection/components/gov-wizard/gov-wizard-item.js.map +1 -0
- package/dist/collection/components/gov-wizard/gov-wizard-item.types.js +2 -0
- package/dist/collection/components/gov-wizard/gov-wizard-item.types.js.map +1 -0
- package/dist/collection/components/{gov-wizzard/gov-wizzard.css → gov-wizard/gov-wizard.css} +4 -4
- package/dist/collection/components/{gov-wizzard/gov-wizzard.js → gov-wizard/gov-wizard.js} +20 -20
- package/dist/collection/components/gov-wizard/gov-wizard.js.map +1 -0
- package/dist/collection/helpers/Dom/win.js +2 -0
- package/dist/collection/helpers/Dom/win.js.map +1 -1
- package/dist/collection/pages/Accordion.js +43 -4
- package/dist/collection/pages/Accordion.js.map +1 -1
- package/dist/collection/pages/Badge.js +6 -0
- package/dist/collection/pages/Badge.js.map +1 -1
- package/dist/collection/pages/Tiles.js +30 -15
- package/dist/collection/pages/Tiles.js.map +1 -1
- package/dist/collection/pages/{Wizzard.js → Wizard.js} +41 -41
- package/dist/collection/pages/Wizard.js.map +1 -0
- package/dist/collection/utils/icon.utils.js +8 -7
- package/dist/collection/utils/icon.utils.js.map +1 -1
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-accordion-item.js.map +1 -1
- package/dist/components/gov-accordion.js +1 -1
- package/dist/components/gov-accordion.js.map +1 -1
- package/dist/components/gov-alert.js +1 -1
- package/dist/components/gov-app.js +1 -1
- package/dist/components/gov-app.js.map +1 -1
- package/dist/components/gov-attachments-item.js +1 -1
- package/dist/components/gov-attachments.js +1 -1
- package/dist/components/gov-backdrop.js +1 -1
- package/dist/components/gov-badge.js +1 -1
- package/dist/components/gov-breadcrumbs.js +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-file.js.map +1 -1
- package/dist/components/gov-form-group.js +1 -1
- package/dist/components/gov-form-group.js.map +1 -1
- package/dist/components/gov-form-input.js +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-radio.js +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-form-switch.js +1 -1
- package/dist/components/gov-icon.js +1 -1
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-message.js.map +1 -1
- package/dist/components/gov-modal.js +1 -1
- package/dist/components/gov-nav.js +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-prompt.js +1 -1
- package/dist/components/gov-side-nav-item.js +1 -1
- package/dist/components/gov-side-nav.js +1 -1
- package/dist/components/gov-side-nav.js.map +1 -1
- package/dist/components/gov-skeleton.js +1 -1
- package/dist/components/gov-skeleton.js.map +1 -1
- package/dist/components/gov-stepper-item.js +1 -1
- package/dist/components/gov-stepper-item.js.map +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tile.js +1 -1
- package/dist/components/gov-tile.js.map +1 -1
- package/dist/components/gov-toast.js +1 -1
- package/dist/components/{gov-wizzard-item.d.ts → gov-wizard-item.d.ts} +4 -4
- package/dist/components/gov-wizard-item.js +2 -0
- package/dist/components/gov-wizard-item.js.map +1 -0
- package/dist/components/{gov-wizzard.d.ts → gov-wizard.d.ts} +4 -4
- package/dist/components/gov-wizard.js +2 -0
- package/dist/components/gov-wizard.js.map +1 -0
- package/dist/components/{p-db22f9ce.js → p-04086571.js} +2 -2
- package/dist/components/{p-7bea2390.js → p-3b1801e4.js} +2 -2
- package/dist/components/{p-386409dc.js → p-3e8a9e92.js} +2 -2
- package/dist/components/{p-103c7bd5.js → p-49620025.js} +2 -2
- package/dist/components/p-6834d779.js +2 -0
- package/dist/components/p-6834d779.js.map +1 -0
- package/dist/components/p-74b2311a.js +2 -0
- package/dist/components/p-74b2311a.js.map +1 -0
- package/dist/components/{p-a20f1683.js → p-8d128f59.js} +2 -2
- package/dist/components/{p-ccc44ac1.js → p-8da17139.js} +2 -2
- package/dist/components/{p-cf493ba0.js → p-a2e601c5.js} +2 -2
- package/dist/components/p-a2e601c5.js.map +1 -0
- package/dist/components/p-ae894a40.js +2 -0
- package/dist/components/p-bacc5e05.js +2 -0
- package/dist/components/p-bacc5e05.js.map +1 -0
- package/dist/components/p-cac3881f.js +2 -0
- package/dist/components/p-cac3881f.js.map +1 -0
- package/dist/components/{p-c0e49b09.js → p-f33b16d3.js} +2 -2
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-e39cd83c.entry.js → p-06699657.entry.js} +2 -2
- package/dist/core/{p-e39cd83c.entry.js.map → p-06699657.entry.js.map} +1 -1
- package/dist/core/{p-41f72892.entry.js → p-0c1697ce.entry.js} +2 -2
- package/dist/core/{p-9a3e3ace.entry.js → p-18ef9623.entry.js} +2 -2
- package/dist/core/{p-eda868dc.entry.js → p-22a86871.entry.js} +2 -2
- package/dist/core/{p-722218fd.entry.js → p-23385300.entry.js} +2 -2
- package/dist/core/{p-48349167.entry.js → p-33bf5974.entry.js} +2 -2
- package/dist/core/{p-9f541022.entry.js → p-3d0ab343.entry.js} +2 -2
- package/dist/core/{p-e0c04c5f.entry.js → p-41e88980.entry.js} +2 -2
- package/dist/core/{p-5a855a15.entry.js → p-42c1935f.entry.js} +2 -2
- package/dist/core/{p-de3dc437.entry.js → p-48cfc1c6.entry.js} +2 -2
- package/dist/core/p-4e3d3563.entry.js +2 -0
- package/dist/core/p-4e3d3563.entry.js.map +1 -0
- package/dist/core/p-5316e768.entry.js.map +1 -1
- package/dist/core/p-63839c58.entry.js +2 -0
- package/dist/core/p-63839c58.entry.js.map +1 -0
- package/dist/core/p-64f7e661.entry.js +2 -0
- package/dist/core/p-64f7e661.entry.js.map +1 -0
- package/dist/core/p-6834d779.js +2 -0
- package/dist/core/p-6834d779.js.map +1 -0
- package/dist/core/{p-9ad54c30.entry.js → p-70140f70.entry.js} +2 -2
- package/dist/core/p-74b2311a.js +2 -0
- package/dist/core/p-74b2311a.js.map +1 -0
- package/dist/core/p-74f0be51.entry.js +2 -0
- package/dist/core/p-74f0be51.entry.js.map +1 -0
- package/dist/core/{p-3d720d54.entry.js → p-7d61b13e.entry.js} +2 -2
- package/dist/core/p-7d61b13e.entry.js.map +1 -0
- package/dist/core/{p-a68547b1.entry.js → p-81643870.entry.js} +2 -2
- package/dist/core/{p-11be550d.entry.js → p-82f64673.entry.js} +2 -2
- package/dist/core/p-87aca157.entry.js +2 -0
- package/dist/core/p-87aca157.entry.js.map +1 -0
- package/dist/core/{p-fa71fb92.entry.js → p-9d72d80b.entry.js} +2 -2
- package/dist/core/{p-1ae47d62.entry.js → p-a5d00433.entry.js} +2 -2
- package/dist/core/{p-3bc977e2.entry.js → p-accf8575.entry.js} +2 -2
- package/dist/core/p-accf8575.entry.js.map +1 -0
- package/dist/core/p-ae894a40.js +2 -0
- package/dist/core/p-bd1cb5bd.entry.js +2 -0
- package/dist/core/p-bd1cb5bd.entry.js.map +1 -0
- package/dist/core/{p-7d680665.entry.js → p-bfb4d904.entry.js} +2 -2
- package/dist/core/p-cac3881f.js +2 -0
- package/dist/core/p-cac3881f.js.map +1 -0
- package/dist/core/{p-b5a560d2.entry.js → p-dfc080f2.entry.js} +2 -2
- package/dist/core/{p-e1b3c361.entry.js → p-e769f3ee.entry.js} +2 -2
- package/dist/core/p-ea4459ae.entry.js +2 -0
- package/dist/core/p-ea4459ae.entry.js.map +1 -0
- package/dist/core/p-ed724948.entry.js +2 -0
- package/dist/core/p-ed724948.entry.js.map +1 -0
- package/dist/core/{p-d921bd4b.entry.js → p-f0a5847a.entry.js} +2 -2
- package/dist/core/{p-5150efee.entry.js → p-fc853777.entry.js} +2 -2
- package/dist/esm/{constants-858966b9.js → constants-09bda759.js} +4 -4
- package/dist/esm/{constants-858966b9.js.map → constants-09bda759.js.map} +1 -1
- package/dist/esm/constants-2499979c.js +24 -0
- package/dist/esm/constants-2499979c.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/gov-accordion-item.entry.js +3 -3
- package/dist/esm/gov-accordion-item.entry.js.map +1 -1
- package/dist/esm/gov-accordion.entry.js +4 -4
- package/dist/esm/gov-accordion.entry.js.map +1 -1
- package/dist/esm/gov-alert.entry.js +2 -2
- package/dist/esm/gov-app.entry.js +120 -60
- package/dist/esm/gov-app.entry.js.map +1 -1
- package/dist/esm/gov-attachments_3.entry.js +2 -2
- package/dist/esm/gov-backdrop.entry.js +2 -2
- package/dist/esm/gov-badge.entry.js +1 -1
- package/dist/esm/gov-badge.entry.js.map +1 -1
- package/dist/esm/gov-breadcrumbs.entry.js +2 -2
- package/dist/esm/gov-button.entry.js +2 -2
- package/dist/esm/gov-card.entry.js +2 -2
- package/dist/esm/gov-form-checkbox.entry.js +2 -2
- package/dist/esm/gov-form-file.entry.js +8 -2
- package/dist/esm/gov-form-file.entry.js.map +1 -1
- package/dist/esm/gov-form-group.entry.js +1 -1
- package/dist/esm/gov-form-group.entry.js.map +1 -1
- package/dist/esm/gov-form-input.entry.js +2 -2
- package/dist/esm/gov-form-multi-select.entry.js +2 -2
- package/dist/esm/gov-form-radio.entry.js +2 -2
- package/dist/esm/gov-form-select.entry.js +2 -2
- package/dist/esm/gov-form-switch.entry.js +2 -2
- package/dist/esm/gov-icon.entry.js +22 -15
- package/dist/esm/gov-icon.entry.js.map +1 -1
- package/dist/esm/gov-message.entry.js +1 -1
- package/dist/esm/gov-message.entry.js.map +1 -1
- package/dist/esm/gov-modal.entry.js +2 -2
- package/dist/esm/gov-nav.entry.js +2 -2
- package/dist/esm/gov-pagination.entry.js +2 -2
- package/dist/esm/gov-prompt.entry.js +2 -2
- package/dist/esm/gov-side-nav.entry.js +2 -2
- package/dist/esm/gov-skeleton.entry.js +2 -2
- package/dist/esm/gov-stepper-item.entry.js +1 -1
- package/dist/esm/gov-stepper-item.entry.js.map +1 -1
- package/dist/esm/gov-tabs.entry.js +2 -2
- package/dist/esm/gov-tile.entry.js +2 -15
- package/dist/esm/gov-tile.entry.js.map +1 -1
- package/dist/esm/gov-wizard-item.entry.js +110 -0
- package/dist/esm/gov-wizard-item.entry.js.map +1 -0
- package/dist/esm/{gov-wizzard.entry.js → gov-wizard.entry.js} +13 -13
- package/dist/esm/gov-wizard.entry.js.map +1 -0
- package/dist/esm/index-ae3c50f1.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{wcag-afdfdddb.js → wcag-062e7ca9.js} +2 -2
- package/dist/esm/{wcag-afdfdddb.js.map → wcag-062e7ca9.js.map} +1 -1
- package/dist/esm/{win-7a1a8ac8.js → win-0a50f66e.js} +4 -2
- package/dist/esm/win-0a50f66e.js.map +1 -0
- package/dist/hydrate/index.js +192 -129
- package/dist/stencil.config.js +3 -3
- package/dist/stencil.config.js.map +1 -1
- package/dist/types/components/gov-accordion/constants.d.ts +3 -3
- package/dist/types/components/gov-app/gov-app.d.ts +1 -1
- package/dist/types/components/gov-form/file/gov-form-file.d.ts +4 -0
- package/dist/types/components/gov-icon/gov-icon.d.ts +1 -1
- package/dist/types/components/gov-message/gov-message.d.ts +1 -1
- package/dist/types/components/gov-tile/gov-tile.d.ts +4 -4
- package/dist/types/components/{gov-wizzard → gov-wizard}/constants.d.ts +2 -2
- package/dist/types/components/gov-wizard/gov-wizard-item.d.d.ts +4 -0
- package/dist/types/components/{gov-wizzard/gov-wizzard-item.d.ts → gov-wizard/gov-wizard-item.d.ts} +13 -13
- package/dist/types/components/{gov-wizzard/gov-wizzard-item.types.d.ts → gov-wizard/gov-wizard-item.types.d.ts} +1 -1
- package/dist/types/components/{gov-wizzard/gov-wizzard.d.ts → gov-wizard/gov-wizard.d.ts} +7 -7
- package/dist/types/components.d.ts +64 -58
- package/dist/types/helpers/Dom/win.d.ts +2 -0
- package/dist/types/pages/Wizard.d.ts +3 -0
- package/package.json +1 -1
- package/dist/cjs/constants-21559414.js +0 -29
- package/dist/cjs/constants-21559414.js.map +0 -1
- package/dist/cjs/gov-wizzard-item.cjs.entry.js +0 -114
- package/dist/cjs/gov-wizzard-item.cjs.entry.js.map +0 -1
- package/dist/cjs/gov-wizzard.cjs.entry.js.map +0 -1
- package/dist/cjs/win-53f637d4.js.map +0 -1
- package/dist/collection/components/gov-wizzard/constants.js +0 -20
- package/dist/collection/components/gov-wizzard/constants.js.map +0 -1
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.css +0 -471
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.d.js +0 -2
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.d.js.map +0 -1
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.js.map +0 -1
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.types.js +0 -2
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.types.js.map +0 -1
- package/dist/collection/components/gov-wizzard/gov-wizzard.js.map +0 -1
- package/dist/collection/pages/Wizzard.js.map +0 -1
- package/dist/components/gov-wizzard-item.js +0 -2
- package/dist/components/gov-wizzard-item.js.map +0 -1
- package/dist/components/gov-wizzard.js +0 -2
- package/dist/components/gov-wizzard.js.map +0 -1
- package/dist/components/p-0f5e2b0a.js +0 -2
- package/dist/components/p-34152b51.js +0 -2
- package/dist/components/p-34152b51.js.map +0 -1
- package/dist/components/p-37a7409e.js +0 -2
- package/dist/components/p-37a7409e.js.map +0 -1
- package/dist/components/p-64ced668.js +0 -2
- package/dist/components/p-64ced668.js.map +0 -1
- package/dist/components/p-c3f560b9.js +0 -2
- package/dist/components/p-c3f560b9.js.map +0 -1
- package/dist/components/p-cf493ba0.js.map +0 -1
- package/dist/core/p-05dc3d89.entry.js +0 -2
- package/dist/core/p-05dc3d89.entry.js.map +0 -1
- package/dist/core/p-0f5e2b0a.js +0 -2
- package/dist/core/p-16c3a489.entry.js +0 -2
- package/dist/core/p-16c3a489.entry.js.map +0 -1
- package/dist/core/p-2c7af892.entry.js +0 -2
- package/dist/core/p-2c7af892.entry.js.map +0 -1
- package/dist/core/p-34152b51.js +0 -2
- package/dist/core/p-34152b51.js.map +0 -1
- package/dist/core/p-37a7409e.js +0 -2
- package/dist/core/p-37a7409e.js.map +0 -1
- package/dist/core/p-3bc977e2.entry.js.map +0 -1
- package/dist/core/p-3d720d54.entry.js.map +0 -1
- package/dist/core/p-5195fd36.entry.js +0 -2
- package/dist/core/p-5195fd36.entry.js.map +0 -1
- package/dist/core/p-64ced668.js +0 -2
- package/dist/core/p-64ced668.js.map +0 -1
- package/dist/core/p-9751af2e.entry.js +0 -2
- package/dist/core/p-9751af2e.entry.js.map +0 -1
- package/dist/core/p-ac94d242.entry.js +0 -2
- package/dist/core/p-ac94d242.entry.js.map +0 -1
- package/dist/core/p-af7a89bc.entry.js +0 -2
- package/dist/core/p-af7a89bc.entry.js.map +0 -1
- package/dist/core/p-d2729599.entry.js +0 -2
- package/dist/core/p-d2729599.entry.js.map +0 -1
- package/dist/esm/constants-bf5a583f.js +0 -24
- package/dist/esm/constants-bf5a583f.js.map +0 -1
- package/dist/esm/gov-wizzard-item.entry.js +0 -110
- package/dist/esm/gov-wizzard-item.entry.js.map +0 -1
- package/dist/esm/gov-wizzard.entry.js.map +0 -1
- package/dist/esm/win-7a1a8ac8.js.map +0 -1
- package/dist/types/components/gov-wizzard/gov-wizzard-item.d.d.ts +0 -4
- package/dist/types/pages/Wizzard.d.ts +0 -3
- /package/dist/components/{p-db22f9ce.js.map → p-04086571.js.map} +0 -0
- /package/dist/components/{p-7bea2390.js.map → p-3b1801e4.js.map} +0 -0
- /package/dist/components/{p-386409dc.js.map → p-3e8a9e92.js.map} +0 -0
- /package/dist/components/{p-103c7bd5.js.map → p-49620025.js.map} +0 -0
- /package/dist/components/{p-a20f1683.js.map → p-8d128f59.js.map} +0 -0
- /package/dist/components/{p-ccc44ac1.js.map → p-8da17139.js.map} +0 -0
- /package/dist/components/{p-0f5e2b0a.js.map → p-ae894a40.js.map} +0 -0
- /package/dist/components/{p-c0e49b09.js.map → p-f33b16d3.js.map} +0 -0
- /package/dist/core/{p-41f72892.entry.js.map → p-0c1697ce.entry.js.map} +0 -0
- /package/dist/core/{p-9a3e3ace.entry.js.map → p-18ef9623.entry.js.map} +0 -0
- /package/dist/core/{p-eda868dc.entry.js.map → p-22a86871.entry.js.map} +0 -0
- /package/dist/core/{p-722218fd.entry.js.map → p-23385300.entry.js.map} +0 -0
- /package/dist/core/{p-48349167.entry.js.map → p-33bf5974.entry.js.map} +0 -0
- /package/dist/core/{p-9f541022.entry.js.map → p-3d0ab343.entry.js.map} +0 -0
- /package/dist/core/{p-e0c04c5f.entry.js.map → p-41e88980.entry.js.map} +0 -0
- /package/dist/core/{p-5a855a15.entry.js.map → p-42c1935f.entry.js.map} +0 -0
- /package/dist/core/{p-de3dc437.entry.js.map → p-48cfc1c6.entry.js.map} +0 -0
- /package/dist/core/{p-9ad54c30.entry.js.map → p-70140f70.entry.js.map} +0 -0
- /package/dist/core/{p-a68547b1.entry.js.map → p-81643870.entry.js.map} +0 -0
- /package/dist/core/{p-11be550d.entry.js.map → p-82f64673.entry.js.map} +0 -0
- /package/dist/core/{p-fa71fb92.entry.js.map → p-9d72d80b.entry.js.map} +0 -0
- /package/dist/core/{p-1ae47d62.entry.js.map → p-a5d00433.entry.js.map} +0 -0
- /package/dist/core/{p-0f5e2b0a.js.map → p-ae894a40.js.map} +0 -0
- /package/dist/core/{p-7d680665.entry.js.map → p-bfb4d904.entry.js.map} +0 -0
- /package/dist/core/{p-b5a560d2.entry.js.map → p-dfc080f2.entry.js.map} +0 -0
- /package/dist/core/{p-e1b3c361.entry.js.map → p-e769f3ee.entry.js.map} +0 -0
- /package/dist/core/{p-d921bd4b.entry.js.map → p-f0a5847a.entry.js.map} +0 -0
- /package/dist/core/{p-5150efee.entry.js.map → p-fc853777.entry.js.map} +0 -0
package/dist/core/p-64ced668.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{V as a}from"./p-ff7365ae.js";import{S as o}from"./p-55500e5a.js";import{p as t}from"./p-03990da5.js";const r=t(a,["PRIMARY","SECONDARY","WARNING","ERROR","SUCCESS"]);const e=t(o,["_XS","_S","_M"]);const i={root:"gov-wizzard"};const z={root:"gov-wizzard-item",header:"gov-wizzard-item__header",arrow:"gov-wizzard-item__arrow",title:"gov-wizzard-item__title",name:"gov-wizzard-item__name",label:"gov-wizzard-item__label",annot:"gov-wizzard-item__annot",prefix:"gov-wizzard-item__prefix",content:"gov-wizzard-item__content"};export{z as W,i as a,e as b,r as c};
|
|
2
|
-
//# sourceMappingURL=p-64ced668.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["WizardVariants","pick","Variants","WizardSizes","Sizes","WizzardClass","root","WizzardItemClass","header","arrow","title","name","label","annot","prefix","content"],"sources":["../../../packages/core/src/components/gov-wizzard/constants.ts"],"sourcesContent":["import { Variants } from '../../core/constants/variants'\nimport { Sizes } from '../../core/constants/sizes'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const WizardVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS'])\nexport type WizardVariantsType = `${ValueOf<typeof WizardVariants>}`\n\nexport const WizardSizes = pick(Sizes, ['_XS', '_S', '_M'])\nexport type WizardSizesType = `${ValueOf<typeof WizardSizes>}`\n\nexport const WizzardClass = {\n\troot: 'gov-wizzard',\n}\n\nexport const WizzardItemClass = {\n\troot: 'gov-wizzard-item',\n\theader: 'gov-wizzard-item__header',\n\tarrow: 'gov-wizzard-item__arrow',\n\ttitle: 'gov-wizzard-item__title',\n\tname: 'gov-wizzard-item__name',\n\tlabel: 'gov-wizzard-item__label',\n\tannot: 'gov-wizzard-item__annot',\n\tprefix: 'gov-wizzard-item__prefix',\n\tcontent: 'gov-wizzard-item__content',\n}\n"],"mappings":"kHAKaA,EAAiBC,EAAKC,EAAU,CAAC,UAAW,YAAa,UAAW,QAAS,Y,MAG7EC,EAAcF,EAAKG,EAAO,CAAC,MAAO,KAAM,O,MAGxCC,EAAe,CAC3BC,KAAM,e,MAGMC,EAAmB,CAC/BD,KAAM,mBACNE,OAAQ,2BACRC,MAAO,0BACPC,MAAO,0BACPC,KAAM,yBACNC,MAAO,0BACPC,MAAO,0BACPC,OAAQ,2BACRC,QAAS,oC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as r,H as o,g as i}from"./p-10cbc3fe.js";import{a}from"./p-561fa17b.js";import{v as s}from"./p-26acf964.js";import{S as g,c as p}from"./p-9144dde1.js";import{c as n}from"./p-24636c53.js";import{g as v,p as c}from"./p-3f37ddb6.js";import"./p-ff7365ae.js";import"./p-55500e5a.js";import"./p-03990da5.js";const m='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-stepper-item{position:relative;display:block;width:100%}.gov-stepper-item__header{position:relative;width:100%}.gov-stepper-item__arrow{flex:0 0 auto;width:0.75rem;height:0.75rem}.gov-stepper-item__title{margin:0;padding:0;font-family:var(--gov-font-family, "Roboto", sans-serif);font-weight:400;box-sizing:border-box;display:flex;gap:1rem;align-items:baseline}.gov-stepper-item__prefix{display:flex;flex:0 0 auto;justify-content:center;align-items:center;border-radius:50%;text-align:center}.gov-stepper-item__prefix .gov-icon{width:45%;height:45%}.gov-stepper-item__prefix span[slot=prefix]{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.gov-stepper-item__name{display:flex;flex-direction:column}.gov-stepper-item__label{display:flex;gap:0.5rem;align-items:center;font-weight:var(--gov-wizzard-title-font-weight, 400)}.gov-stepper-item__annot{color:var(--gov-color-secondary)}.gov-stepper-item__content>*:last-child{margin-bottom:0}.gov-stepper-item[variant=primary] .gov-stepper-item__header{color:var(--gov-wizzard-primary-color, var(--gov-color-primary-800))}.gov-stepper-item[variant=primary] .gov-stepper-item__prefix{background:var(--gov-wizzard-primary-indicator-bg, var(--gov-color-primary-300));color:var(--gov-wizzard-primary-indicator-color, var(--gov-color-primary-800))}.gov-stepper-item[variant=secondary] .gov-stepper-item__header{color:var(--gov-wizzard-secondary-color, var(--gov-color-secondary-700))}.gov-stepper-item[variant=secondary] .gov-stepper-item__prefix{background:var(--gov-wizzard-secondary-indicator-bg, var(--gov-color-secondary-400));color:var(--gov-wizzard-secondary-indicator-color, var(--gov-color-secondary-700))}.gov-stepper-item[variant=success] .gov-stepper-item__header{color:var(--gov-wizzard-success-color, var(--gov-color-success-500))}.gov-stepper-item[variant=success] .gov-stepper-item__prefix{background:var(--gov-wizzard-success-indicator-bg, var(--gov-color-success));color:var(--gov-wizzard-success-indicator-color, var(--gov-color-neutral-white))}.gov-stepper-item[variant=error] .gov-stepper-item__header{color:var(--gov-wizzard-error-color, var(--gov-color-error-500))}.gov-stepper-item[variant=error] .gov-stepper-item__prefix{background:var(--gov-wizzard-error-indicator-bg, var(--gov-color-error));color:var(--gov-wizzard-error-indicator-color, var(--gov-color-neutral-white))}.gov-stepper-item[variant=warning] .gov-stepper-item__header{color:var(--gov-wizzard-warning-color, var(--gov-color-warning-500))}.gov-stepper-item[variant=warning] .gov-stepper-item__prefix{background:var(--gov-wizzard-warning-indicator-bg, var(--gov-color-warning));color:var(--gov-wizzard-warning-indicator-color, var(--gov-color-neutral-white))}.gov-stepper-item::before{content:"";position:absolute;display:block;width:0.125rem}.gov-stepper-item:last-child::before{content:none}.gov-stepper-item[variant=primary]::before{background:var(--gov-wizzard-primary-indicator-bg, var(--gov-color-primary-300))}.gov-stepper-item[variant=secondary]::before{background:var(--gov-wizzard-secondary-indicator-bg, var(--gov-color-secondary-400))}.gov-stepper-item[variant=success]::before{background:var(--gov-wizzard-success-indicator-bg, var(--gov-color-success))}.gov-stepper-item[variant=error]::before{background:var(--gov-wizzard-error-indicator-bg, var(--gov-color-error))}.gov-stepper-item[variant=warning]::before{background:var(--gov-wizzard-warning-indicator-bg, var(--gov-color-warning))}.gov-stepper-item[size=xs]{min-height:calc(var(--gov-stepper-xs-indicator-size, 1.5rem) + 3 * var(--gov-stepper-xs-connect-gap, 0.5rem))}.gov-stepper-item[size=xs]::before{top:calc(var(--gov-stepper-xs-indicator-size, 1.5rem) + var(--gov-stepper-xs-connect-gap, 0.5rem));bottom:var(--gov-stepper-xs-connect-gap, 0.5rem);left:calc((var(--gov-stepper-xs-indicator-size, 1.5rem) - 0.125rem) / 2)}.gov-stepper-item[size=xs]:last-child{min-height:0}.gov-stepper-item[size=xs] .gov-stepper-item__title{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}.gov-stepper-item[size=xs] .gov-stepper-item__annot{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing)}.gov-stepper-item[size=xs] .gov-stepper-item__prefix{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);width:var(--gov-stepper-xs-indicator-size, 1.5rem);height:var(--gov-stepper-xs-indicator-size, 1.5rem);box-shadow:0 0 0 var(--gov-stepper-xs-connect-gap, 0.5rem) var(--gov-color-neutral-white)}.gov-stepper-item[size=xs] .gov-stepper-item__content{padding:var(--gov-stepper-xs-content-padding, 1rem 1rem 2rem 2.5rem)}.gov-stepper-item--w-annot[size=xs]{min-height:calc(var(--gov-stepper-xs-indicator-size, 1.5rem) * 1.5 + 3 * var(--gov-stepper-xs-connect-gap, 0.5rem))}.gov-stepper-item[size=s]{min-height:calc(var(--gov-stepper-s-indicator-size, 2rem) + 3 * var(--gov-stepper-s-connect-gap, 1rem))}.gov-stepper-item[size=s]::before{top:calc(var(--gov-stepper-s-indicator-size, 2rem) + var(--gov-stepper-s-connect-gap, 1rem));bottom:var(--gov-stepper-s-connect-gap, 1rem);left:calc((var(--gov-stepper-s-indicator-size, 2rem) - 0.125rem) / 2)}.gov-stepper-item[size=s]:last-child{min-height:0}.gov-stepper-item[size=s] .gov-stepper-item__title{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing)}.gov-stepper-item[size=s] .gov-stepper-item__annot{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}.gov-stepper-item[size=s] .gov-stepper-item__prefix{font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing);width:var(--gov-stepper-s-indicator-size, 2rem);height:var(--gov-stepper-s-indicator-size, 2rem);box-shadow:0 0 0 var(--gov-stepper-s-connect-gap, 1rem) var(--gov-color-neutral-white)}.gov-stepper-item[size=s] .gov-stepper-item__content{padding:var(--gov-stepper-s-content-padding, 1rem 1rem 2rem 3rem)}.gov-stepper-item--w-annot[size=s]{min-height:calc(var(--gov-stepper-s-indicator-size, 2rem) * 1.5 + 3 * var(--gov-stepper-s-connect-gap, 1rem))}.gov-stepper-item[size=m]{min-height:calc(var(--gov-stepper-m-indicator-size, 2.5rem) + 3 * var(--gov-stepper-m-connect-gap, 1rem))}.gov-stepper-item[size=m]::before{top:calc(var(--gov-stepper-m-indicator-size, 2.5rem) + var(--gov-stepper-m-connect-gap, 1rem));bottom:var(--gov-stepper-m-connect-gap, 1rem);left:calc((var(--gov-stepper-m-indicator-size, 2.5rem) - 0.125rem) / 2)}.gov-stepper-item[size=m]:last-child{min-height:0}.gov-stepper-item[size=m] .gov-stepper-item__title{font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing)}.gov-stepper-item[size=m] .gov-stepper-item__annot{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}.gov-stepper-item[size=m] .gov-stepper-item__prefix{font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing);width:var(--gov-stepper-m-indicator-size, 2.5rem);height:var(--gov-stepper-m-indicator-size, 2.5rem);box-shadow:0 0 0 var(--gov-stepper-m-connect-gap, 1rem) var(--gov-color-neutral-white)}.gov-stepper-item[size=m] .gov-stepper-item__content{padding:var(--gov-stepper-m-content-padding, 1rem 1rem 2rem 3.5rem)}.gov-stepper-item--w-annot[size=m]{min-height:calc(var(--gov-stepper-m-indicator-size, 2.5rem) * 1.5 + 3 * var(--gov-stepper-m-connect-gap, 1rem))}';const l=class{constructor(r){e(this,r);this.govChange=t(this,"gov-change",7);this.isExpandedState=undefined;this.variant="primary";this.size="m";this.identifier=undefined;this.label=undefined;this.annotation=undefined;this.triggerTag="h3";this.h=v(this.host);this.triggerId=n("GovStepperItem");this.contentId=n("GovStepperContent")}validateLabel(e){if(!e){a(`[${g.root}]: Parameter label is required.`)}}validateTriggerTag(e){const t=["h1","h2","h3","h4","h5","h6","span"];if(e){if(!t.includes(e)){a(`[${g.root}]: Tag ${e} is not allowed.`)}}}validateVariant(e){s(p,e,g.root)}componentWillLoad(){this.validateLabel(this.label);this.validateVariant(this.variant);this.validateTriggerTag(this.triggerTag)}render(){const e=this.identifier||this.triggerId;const t=this.contentId;const{label:i}=this;const a=this.triggerTag;return r(o,{class:c([g.root,this.annotation&&g.rootWithAnnot]),variant:this.variant},r("div",{id:e,class:g.header,role:"listitem"},r(a,{class:g.title},this.h.hasSlot("prefix")&&r("span",{class:g.prefix},r("slot",{name:"prefix"})),r("span",{class:g.name},r("span",{class:g.label},i),this.annotation&&r("span",{class:g.annot},this.annotation)))),this.h.hasSlot("content")&&r("div",{class:g.content,id:t,"aria-labelledby":e,role:"tabpanel"},r("slot",{name:"content"})))}async currentState(){return this.isExpandedState}get host(){return i(this)}static get watchers(){return{label:["validateLabel"],triggerTag:["validateTriggerTag"],variant:["validateVariant"]}}};l.style=m;export{l as gov_stepper_item};
|
|
2
|
-
//# sourceMappingURL=p-9751af2e.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["govStepperItemCss","GovStepperItem","constructor","hostRef","this","h","govHost","host","triggerId","createID","contentId","validateLabel","newValue","govErrorLog","StepperItemClass","root","validateTriggerTag","validTags","includes","validateVariant","validateProp","StepperVariants","componentWillLoad","label","variant","triggerTag","render","identifier","TriggerTag","Host","class","prepareClasses","annotation","rootWithAnnot","id","header","role","title","hasSlot","prefix","name","annot","content","currentState","isExpandedState"],"sources":["../../../packages/core/src/components/gov-stepper/gov-stepper-item.scss?tag=gov-stepper-item","../../../packages/core/src/components/gov-stepper/gov-stepper-item.tsx"],"sourcesContent":["/*\n * Stepper - Item\n */\n\n@import \"../gov-wizzard/gov-wizzard-item-core.scss\";\n$class: \".gov-stepper-item\";\n\n#{$class} {\n\t@include wizzard-item-core;\n\t&::before {\n\t\t@include pseudo();\n\t\twidth: rem-calc(2);\n\t}\n\t&:last-child::before {\n\t\tcontent: none;\n\t}\n\n\t// VARIANTS\n\t@each $variant, $definitions in $wizzard-core-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t&::before {\n\t\t\t\tbackground: get(\"indicator-bg\", $definitions);\n\t\t\t}\n\t\t}\n\t}\n\t@each $size, $definitions in $stepper-sizes {\n\t\t$connect-gap: get(\"connect-gap\", $definitions);\n\t\t&[size=\"#{$size}\"] {\n\t\t\tmin-height: calc(get(\"indicator-size\", $definitions) + 3 * $connect-gap);\n\t\t\t&::before {\n\t\t\t\ttop: calc(get(\"indicator-size\", $definitions) + $connect-gap);\n\t\t\t\tbottom: $connect-gap;\n\t\t\t\tleft: calc((get(\"indicator-size\", $definitions) - rem-calc(2)) / 2);\n\t\t\t}\n\t\t\t&:last-child {\n\t\t\t\tmin-height: 0;\n\t\t\t}\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(get(\"font-size\", $definitions));\n\t\t\t\t}\n\t\t\t\t&__annot {\n\t\t\t\t\t@include typography(get(\"font-size-annot\", $definitions));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(get(\"font-size-indicator\", $definitions));\n\t\t\t\t\twidth: get(\"indicator-size\", $definitions);\n\t\t\t\t\theight: get(\"indicator-size\", $definitions);\n\t\t\t\t\tbox-shadow: 0 0 0 $connect-gap color(\"neutral.white\");\n\t\t\t\t}\n\t\t\t\t&__content {\n\t\t\t\t\tpadding: get(\"content-padding\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t&--w-annot[size=\"#{$size}\"] {\n\t\t\tmin-height: calc(get(\"indicator-size\", $definitions) * 1.5 + 3 * $connect-gap);\n\t\t}\n\t}\n}\n","import { Component, Element, h, Prop, State, Watch, Host, Method, Event, EventEmitter } from '@stencil/core'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { StepperSizesType, StepperItemClass, StepperVariantType, StepperVariants } from './constants'\nimport { createID } from '../../utils/string.utils'\nimport { govHost, prepareClasses } from '../../helpers/Dom/template'\nimport { GovStepperItemChangeEvent } from './gov-stepper-item.d'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-stepper-item',\n\tstyleUrl: 'gov-stepper-item.scss',\n})\nexport class GovStepperItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID('GovStepperItem')\n\t\tthis.contentId = createID('GovStepperContent')\n\t}\n\n\t@Element() readonly host: HTMLGovStepperItemElement\n\t@State() isExpandedState: boolean\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant?: StepperVariantType = 'primary'\n\t/**\n\t * Size of stepper\n\t */\n\t@Prop() readonly size?: StepperSizesType = 'm'\n\t/**\n\t * Custom stepper item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Item name of the stepper\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Item annotation of the stepper\n\t */\n\t@Prop() readonly annotation: string\n\t/**\n\t * Used to change the HMTL tag in the stepper trigger for correct semantic structure\n\t */\n\t@Prop({ attribute: 'trigger-tag' }) readonly triggerTag: string = 'h3'\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovStepperItemChangeEvent>\n\n\t@Watch('label')\n\tvalidateLabel(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${StepperItemClass.root}]: Parameter label is required.`)\n\t\t}\n\t}\n\n\t@Watch('triggerTag')\n\tvalidateTriggerTag(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(`[${StepperItemClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(StepperVariants, newValue, StepperItemClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateLabel(this.label)\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateTriggerTag(this.triggerTag)\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst contentId = this.contentId\n\t\tconst { label } = this\n\t\tconst TriggerTag = this.triggerTag\n\n\t\treturn (\n\t\t\t<Host class={prepareClasses([StepperItemClass.root, this.annotation && StepperItemClass.rootWithAnnot])} variant={this.variant}>\n\t\t\t\t<div id={triggerId} class={StepperItemClass.header} role=\"listitem\">\n\t\t\t\t\t<TriggerTag class={StepperItemClass.title}>\n\t\t\t\t\t\t{this.h.hasSlot('prefix') && (\n\t\t\t\t\t\t\t<span class={StepperItemClass.prefix}>\n\t\t\t\t\t\t\t\t<slot name=\"prefix\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<span class={StepperItemClass.name}>\n\t\t\t\t\t\t\t<span class={StepperItemClass.label}>{label}</span>\n\t\t\t\t\t\t\t{this.annotation && <span class={StepperItemClass.annot}>{this.annotation}</span>}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</TriggerTag>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot('content') && (\n\t\t\t\t\t<div class={StepperItemClass.content} id={contentId} aria-labelledby={triggerId} role=\"tabpanel\">\n\t\t\t\t\t\t<slot name=\"content\" />\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 * Returns the current state of the component\n\t */\n\t@Method()\n\tasync currentState(): Promise<boolean> {\n\t\treturn this.isExpandedState\n\t}\n}\n"],"mappings":"qUAAA,MAAMA,EAAoB,oyQ,MCabC,EAAc,MAK1B,WAAAC,CAAAC,G,4FAYgD,U,UAIL,I,yFAgBuB,KA/BjEC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,UAAYC,EAAS,kBAC1BL,KAAKM,UAAYD,EAAS,oB,CAoC3B,aAAAE,CAAcC,GACb,IAAKA,EAAU,CACdC,EAAY,IAAIC,EAAiBC,sC,EAKnC,kBAAAC,CAAmBJ,GAClB,MAAMK,EAAY,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,QACvD,GAAIL,EAAU,CACb,IAAKK,EAAUC,SAASN,GAAW,CAClCC,EAAY,IAAIC,EAAiBC,cAAcH,oB,GAMlD,eAAAO,CAAgBP,GACfQ,EAAaC,EAAiBT,EAAUE,EAAiBC,K,CAG1D,iBAAAO,GACClB,KAAKO,cAAcP,KAAKmB,OACxBnB,KAAKe,gBAAgBf,KAAKoB,SAC1BpB,KAAKY,mBAAmBZ,KAAKqB,W,CAG9B,MAAAC,GACC,MAAMlB,EAAYJ,KAAKuB,YAAcvB,KAAKI,UAC1C,MAAME,EAAYN,KAAKM,UACvB,MAAMa,MAAEA,GAAUnB,KAClB,MAAMwB,EAAaxB,KAAKqB,WAExB,OACCpB,EAACwB,EAAI,CAACC,MAAOC,EAAe,CAACjB,EAAiBC,KAAMX,KAAK4B,YAAclB,EAAiBmB,gBAAiBT,QAASpB,KAAKoB,SACtHnB,EAAA,OAAK6B,GAAI1B,EAAWsB,MAAOhB,EAAiBqB,OAAQC,KAAK,YACxD/B,EAACuB,EAAU,CAACE,MAAOhB,EAAiBuB,OAClCjC,KAAKC,EAAEiC,QAAQ,WACfjC,EAAA,QAAMyB,MAAOhB,EAAiByB,QAC7BlC,EAAA,QAAMmC,KAAK,YAGbnC,EAAA,QAAMyB,MAAOhB,EAAiB0B,MAC7BnC,EAAA,QAAMyB,MAAOhB,EAAiBS,OAAQA,GACrCnB,KAAK4B,YAAc3B,EAAA,QAAMyB,MAAOhB,EAAiB2B,OAAQrC,KAAK4B,eAKjE5B,KAAKC,EAAEiC,QAAQ,YACfjC,EAAA,OAAKyB,MAAOhB,EAAiB4B,QAASR,GAAIxB,EAAS,kBAAmBF,EAAW4B,KAAK,YACrF/B,EAAA,QAAMmC,KAAK,a,CAWhB,kBAAMG,GACL,OAAOvC,KAAKwC,e"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as s,c as i,h as t,H as a,g as o}from"./p-10cbc3fe.js";import{v as e}from"./p-26acf964.js";import{W as r,a as n,b as p}from"./p-64ced668.js";import{g as c}from"./p-3f37ddb6.js";import{v as m}from"./p-0f5e2b0a.js";import{c as d}from"./p-34152b51.js";import{d as f}from"./p-03990da5.js";import"./p-561fa17b.js";import"./p-ff7365ae.js";import"./p-55500e5a.js";import"./p-24636c53.js";const h=".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-wizzard{position:relative;display:block;width:100%}.gov-wizzard>*:last-child{margin-bottom:0}";const l=class{constructor(t){s(this,t);this.govChange=i(this,"gov-change",7);this.size="m";this.wcagLabel=undefined;this.wcagLabelledBy=undefined;this.h=c(this.host)}validateSize(s){e(p,s,n.root)}componentWillLoad(){this.validateSize(this.size)}componentDidLoad(){this.host.querySelectorAll(r.root).forEach((s=>{s.setAttribute("size",this.size)}))}async componentDidRender(){if(d()){await f(500);await this.validateWcag()}}render(){return t(a,{class:this.h.classes(n.root),role:"list",size:this.size},t("slot",null))}async validateWcag(){m(this.wcagLabel,this.wcagLabelledBy,n.root)}get host(){return o(this)}static get watchers(){return{size:["validateSize"]}}};l.style=h;export{l as gov_wizzard};
|
|
2
|
-
//# sourceMappingURL=p-ac94d242.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["govWizzardCss","GovWizzard","constructor","hostRef","this","h","govHost","host","validateSize","newValue","validateProp","WizardSizes","WizzardClass","root","componentWillLoad","size","componentDidLoad","querySelectorAll","WizzardItemClass","forEach","child","setAttribute","componentDidRender","canValidateWcagOnRender","delay","validateWcag","render","Host","class","classes","role","validateWcagLabel","wcagLabel","wcagLabelledBy"],"sources":["../../../packages/core/src/components/gov-wizzard/gov-wizzard.scss?tag=gov-wizzard","../../../packages/core/src/components/gov-wizzard/gov-wizzard.tsx"],"sourcesContent":["/*\n * Wizzard\n */\n\n$class: \".gov-wizzard\";\n\n#{$class} {\n\t@include base();\n\t@include reset-last-margin();\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { WizardSizes, WizardSizesType, WizzardClass, WizzardItemClass } from \"./constants\"\nimport { GovWizzardItemChangeEvent } from \"./gov-wizzard-item.d\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { validateWcagLabel } from \"../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../helpers/Dom/win\"\nimport { delay } from \"../../utils/utils\"\n\n@Component({\n\ttag: \"gov-wizzard\",\n\tstyleUrl: \"gov-wizzard.scss\",\n})\nexport class GovWizzard {\n\tprivate h: GovHost\n\n\t@Element() readonly host: HTMLGovWizzardElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t/**\n\t * Size of wizzard\n\t */\n\t@Prop() readonly size?: WizardSizesType = \"m\"\n\t/**\n\t * Adds accessible label for the wizzard 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 * Called when the wizzard children state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<GovWizzardItemChangeEvent>\n\n\t@Watch(\"size\")\n\tprivate validateSize(newValue: string): void {\n\t\tvalidateProp(WizardSizes, newValue, WizzardClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.host.querySelectorAll(WizzardItemClass.root).forEach((child: HTMLGovWizzardItemElement) => {\n\t\t\tchild.setAttribute(\"size\", this.size)\n\t\t\t/*\n\t\t\tchild.addEventListener('gov-change', (e: GovWizzardItemCustomEvent<GovWizzardItemChangeEvent>) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tthis.govChange.emit(e.detail)\n\t\t\t})\n\t\t\t*/\n\t\t})\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\treturn (\n\t\t\t<Host class={this.h.classes(WizzardClass.root)} role=\"list\" size={this.size}>\n\t\t\t\t<slot />\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\tpublic async validateWcag(): Promise<void> {\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, WizzardClass.root)\n\t}\n}\n"],"mappings":"sYAAA,MAAMA,EAAgB,2b,MCcTC,EAAU,MAKtB,WAAAC,CAAAC,G,0DAO0C,I,uDANzCC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAqBf,YAAAC,CAAaC,GACpBC,EAAaC,EAAaF,EAAUG,EAAaC,K,CAGlD,iBAAAC,GACCV,KAAKI,aAAaJ,KAAKW,K,CAGxB,gBAAAC,GACCZ,KAAKG,KAAKU,iBAAiBC,EAAiBL,MAAMM,SAASC,IAC1DA,EAAMC,aAAa,OAAQjB,KAAKW,KAAK,G,CAUvC,wBAAMO,GACL,GAAIC,IAA2B,OACxBC,EAAM,WACNpB,KAAKqB,c,EAIb,MAAAC,GACC,OACCrB,EAACsB,EAAI,CAACC,MAAOxB,KAAKC,EAAEwB,QAAQjB,EAAaC,MAAOiB,KAAK,OAAOf,KAAMX,KAAKW,MACtEV,EAAA,a,CASI,kBAAMoB,GACZM,EAAkB3B,KAAK4B,UAAW5B,KAAK6B,eAAgBrB,EAAaC,K"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as o,h as i,H as t,g as e}from"./p-10cbc3fe.js";import{a as r}from"./p-561fa17b.js";import{g as n}from"./p-3f37ddb6.js";const l={root:"gov-tile",icon:"gov-tile__icon",arrow:"gov-tile__arrow",title:"gov-tile__title",link:"gov-tile__link",content:"gov-tile__content",heading:"gov-tile__heading"};const a='.gov-tile__heading::before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:1}.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-tile{position:relative;display:block;width:100%;padding:0.75rem;transition:background-color 150ms}.gov-tile__icon{display:flex;margin:0rem 0rem 0.75rem;color:var(--gov-tile-main-color, var(--gov-color-primary))}.gov-tile__icon .gov-icon{width:2.5rem;height:2.5rem}.gov-tile__title{font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing);margin:0 0 0.5rem}.gov-tile__heading{display:flex;gap:0.5rem;justify-content:space-between;color:var(--gov-tile-main-color, var(--gov-color-primary));text-decoration:none}.gov-tile__arrow{flex:0 0 auto;width:0.75rem;height:2rem;margin:0.5rem;color:inherit}.gov-tile__content{color:var(--gov-tile-text-color, var(--gov-color-secondary-700))}.gov-tile__content>*:last-child{margin-bottom:0}.gov-tile__content a{position:relative;z-index:1}.gov-tile__link{display:block;text-decoration:none}@media not all and (pointer: coarse){.gov-tile[href]:hover{background:var(--gov-tile-hover-bg, var(--gov-color-primary-200))}.gov-tile[href]:hover .gov-tile__heading{color:var(--gov-tile-main-color, var(--gov-color-primary))}}@media (min-width: 30em){.gov-tile[promotion=""],.gov-tile[promotion=true i],.gov-tile[promotion="1"]{display:grid;grid-template-columns:auto 1fr;gap:0 0.875rem}.gov-tile[promotion=""] .gov-tile__icon,.gov-tile[promotion=true i] .gov-tile__icon,.gov-tile[promotion="1"] .gov-tile__icon{grid-area:1/1/3/1;margin:0}.gov-tile[promotion=""] .gov-tile__title,.gov-tile[promotion=true i] .gov-tile__title,.gov-tile[promotion="1"] .gov-tile__title{grid-area:1/2/1/2}.gov-tile[promotion=""] .gov-tile__content,.gov-tile[promotion=true i] .gov-tile__content,.gov-tile[promotion="1"] .gov-tile__content{grid-area:2/2/2/2}}@media (min-width: 48em){.gov-tile{padding:1.5rem}.gov-tile__icon{margin:0rem 0rem 1.5rem}.gov-tile__icon .gov-icon{width:3rem;height:3rem}}@media (min-width: 64em){.gov-tile[promotion=""],.gov-tile[promotion=true i],.gov-tile[promotion="1"]{gap:0 1.625rem}}';const g=class{constructor(i){o(this,i);this.promotion=false;this.href=undefined;this.name=undefined;this.h=n(this.host)}validateName(o){if(!o){r(`[${l.root}]: Parameter title is required.`)}}componentWillLoad(){this.validateName(this.name)}render(){return i(t,{class:this.h.classes(l.root),promotion:this.promotion},this.href?i("a",{href:this.href,class:l.link,ref:o=>this.triggerRef=o},this.h.hasSlot("icon")&&i("div",{class:l.icon},i("slot",{name:"icon"})),i("h3",{class:l.title},i("span",{class:l.heading},this.name,i("gov-icon",{class:l.arrow,name:"chevron-right"}))),i("div",{class:l.content},i("slot",null))):i("span",null,this.h.hasSlot("icon")&&i("div",{class:l.icon},i("slot",{name:"icon"})),i("h3",{class:l.title},i("span",null,this.name)),i("div",{class:l.content},i("slot",null))))}async getTriggerRef(){return this.triggerRef}get host(){return e(this)}static get watchers(){return{name:["validateName"]}}};g.style=a;export{g as gov_tile};
|
|
2
|
-
//# sourceMappingURL=p-af7a89bc.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["TileClass","root","icon","arrow","title","link","content","heading","govTileCss","GovTile","constructor","hostRef","this","h","govHost","host","validateName","newValue","govErrorLog","componentWillLoad","name","render","Host","class","classes","promotion","href","ref","el","triggerRef","hasSlot","getTriggerRef"],"sources":["../../../packages/core/src/components/gov-tile/constants.ts","../../../packages/core/src/components/gov-tile/gov-tile.scss?tag=gov-tile","../../../packages/core/src/components/gov-tile/gov-tile.tsx"],"sourcesContent":["export const TileClass = {\n\troot: 'gov-tile',\n\ticon: 'gov-tile__icon',\n\tarrow: 'gov-tile__arrow',\n\ttitle: 'gov-tile__title',\n\tlink: 'gov-tile__link',\n\tcontent: 'gov-tile__content',\n\theading: 'gov-tile__heading',\n}\n","/*\n * Tile\n */\n\n$class: \".gov-tile\";\n\n#{$class} {\n\t@include base();\n\tpadding: rem-calc(12);\n\ttransition: background-color $t;\n\t&__icon {\n\t\tdisplay: flex;\n\t\tmargin: rem-calc(0 0 12);\n\t\tcolor: $tile-main-color;\n\t\t.gov-icon {\n\t\t\twidth: rem-calc(40);\n\t\t\theight: rem-calc(40);\n\t\t}\n\t}\n\t&__title {\n\t\t@include typography($font-size-xl);\n\t\tmargin: 0 0 rem-calc(8);\n\t}\n\t&__heading {\n\t\t@extend %link-mask;\n\t\tdisplay: flex;\n\t\tgap: rem-calc(8);\n\t\tjustify-content: space-between;\n\t\tcolor: $tile-main-color;\n\t\ttext-decoration: none;\n\t}\n\t&__arrow {\n\t\tflex: 0 0 auto;\n\t\twidth: rem-calc(12);\n\t\theight: rem-calc(32);\n\t\tmargin: rem-calc(8);\n\t\tcolor: inherit;\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t\tcolor: $tile-text-color;\n\t\ta {\n\t\t\tposition: relative;\n\t\t\tz-index: 1;\n\t\t}\n\t}\n\t&__link {\n\t\tdisplay: block;\n\t\ttext-decoration: none;\n\t}\n\n\t// HOVERS\n\t&[href] {\n\t\t@include hover() {\n\t\t\tbackground: $tile-hover-bg;\n\t\t\t#{$class} {\n\t\t\t\t&__heading {\n\t\t\t\t\tcolor: $tile-main-color;\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\tdisplay: grid;\n\t\t\tgrid-template-columns: auto 1fr;\n\t\t\tgap: 0 rem-calc(14);\n\t\t\t#{$class} {\n\t\t\t\t&__icon {\n\t\t\t\t\tgrid-area: 1/1/3/1;\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\t\t\t\t&__title {\n\t\t\t\t\tgrid-area: 1/2/1/2;\n\t\t\t\t}\n\t\t\t\t&__content {\n\t\t\t\t\tgrid-area: 2/2/2/2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\tpadding: rem-calc(24);\n\t\t&__icon {\n\t\t\tmargin: rem-calc(0 0 24);\n\t\t\t.gov-icon {\n\t\t\t\twidth: rem-calc(48);\n\t\t\t\theight: rem-calc(48);\n\t\t\t}\n\t\t}\n\t}\n\t@include mq($from: lg) {\n\t\t// VARIANTS\n\t\t@include parameter(\"promotion\") {\n\t\t\tgap: 0 rem-calc(26);\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { govErrorLog } from \"../../helpers/Log/gov.log\"\nimport { TileClass } from \"./constants\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\n\n@Component({\n\ttag: \"gov-tile\",\n\tstyleUrl: \"gov-tile.scss\",\n})\nexport class GovTile {\n\tprivate triggerRef?: HTMLLinkElement | HTMLSpanElement\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovTileElement\n\t/**\n\t * Style variation of the card.\n\t */\n\t@Prop() readonly promotion: boolean = false\n\t/**\n\t * Link on whole tile\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Item name\n\t */\n\t@Prop() readonly name: string\n\n\t@Watch(\"name\")\n\tvalidateName(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${TileClass.root}]: Parameter title is required.`)\n\t\t}\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateName(this.name)\n\t}\n\n\trender() {\n\t\t// tag type\n\t\treturn (\n\t\t\t<Host class={this.h.classes(TileClass.root)} promotion={this.promotion}>\n\t\t\t\t{this.href ? (\n\t\t\t\t\t<a href={this.href} class={TileClass.link} ref={el => (this.triggerRef = el as HTMLLinkElement | HTMLSpanElement)}>\n\t\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t\t<div class={TileClass.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\t\t\t\t\t\t<h3 class={TileClass.title}>\n\t\t\t\t\t\t\t<span class={TileClass.heading}>\n\t\t\t\t\t\t\t\t{this.name}\n\t\t\t\t\t\t\t\t<gov-icon class={TileClass.arrow} name=\"chevron-right\"></gov-icon>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t<div class={TileClass.content}>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</a>\n\t\t\t\t) : (\n\t\t\t\t\t<span>\n\t\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t\t<div class={TileClass.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\t\t\t\t\t\t<h3 class={TileClass.title}>\n\t\t\t\t\t\t\t\t<span>{this.name}</span>\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t<div class={TileClass.content}>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync getTriggerRef() {\n\t\treturn this.triggerRef\n\t}\n}\n"],"mappings":"iIAAO,MAAMA,EAAY,CACxBC,KAAM,WACNC,KAAM,iBACNC,MAAO,kBACPC,MAAO,kBACPC,KAAM,iBACNC,QAAS,oBACTC,QAAS,qBCPV,MAAMC,EAAa,q7E,MCUNC,EAAO,MAInB,WAAAC,CAAAC,G,yBAQsC,M,wCAPrCC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAkBvB,YAAAC,CAAaC,GACZ,IAAKA,EAAU,CACdC,EAAY,IAAIlB,EAAUC,sC,EAI5B,iBAAAkB,GACCP,KAAKI,aAAaJ,KAAKQ,K,CAGxB,MAAAC,GAEC,OACCR,EAACS,EAAI,CAACC,MAAOX,KAAKC,EAAEW,QAAQxB,EAAUC,MAAOwB,UAAWb,KAAKa,WAC3Db,KAAKc,KACLb,EAAA,KAAGa,KAAMd,KAAKc,KAAMH,MAAOvB,EAAUK,KAAMsB,IAAKC,GAAOhB,KAAKiB,WAAaD,GACvEhB,KAAKC,EAAEiB,QAAQ,SACfjB,EAAA,OAAKU,MAAOvB,EAAUE,MACrBW,EAAA,QAAMO,KAAK,UAGbP,EAAA,MAAIU,MAAOvB,EAAUI,OACpBS,EAAA,QAAMU,MAAOvB,EAAUO,SACrBK,KAAKQ,KACNP,EAAA,YAAUU,MAAOvB,EAAUG,MAAOiB,KAAK,oBAGzCP,EAAA,OAAKU,MAAOvB,EAAUM,SACrBO,EAAA,eAIFA,EAAA,YACED,KAAKC,EAAEiB,QAAQ,SACfjB,EAAA,OAAKU,MAAOvB,EAAUE,MACrBW,EAAA,QAAMO,KAAK,UAGbP,EAAA,MAAIU,MAAOvB,EAAUI,OACnBS,EAAA,YAAOD,KAAKQ,OAEdP,EAAA,OAAKU,MAAOvB,EAAUM,SACrBO,EAAA,e,CAaN,mBAAMkB,GACL,OAAOnB,KAAKiB,U"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as i,c as e,h as r,H as a,g as o}from"./p-10cbc3fe.js";import{a as t}from"./p-561fa17b.js";import{v as z}from"./p-26acf964.js";import{W as v,c as n}from"./p-64ced668.js";import{c as d}from"./p-24636c53.js";import{g as s,b as g,t as l}from"./p-3f37ddb6.js";import{F as m}from"./p-1c1d0bbe.js";import"./p-ff7365ae.js";import"./p-55500e5a.js";import"./p-03990da5.js";const c='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-wizzard-item{position:relative;display:block;width:100%;margin-bottom:1rem;background:var(--gov-wizzard-bg-color, var(--gov-color-neutral-white))}.gov-wizzard-item__header{position:relative;width:100%}.gov-wizzard-item__arrow{flex:0 0 auto;width:0.75rem;height:0.75rem}.gov-wizzard-item__title{margin:0;padding:0;font-family:var(--gov-font-family, "Roboto", sans-serif);font-weight:400;box-sizing:border-box;display:flex;gap:1rem;align-items:baseline}.gov-wizzard-item__prefix{display:flex;flex:0 0 auto;justify-content:center;align-items:center;border-radius:50%;text-align:center}.gov-wizzard-item__prefix .gov-icon{width:45%;height:45%}.gov-wizzard-item__prefix span[slot=prefix]{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.gov-wizzard-item__name{display:flex;flex-direction:column}.gov-wizzard-item__label{display:flex;gap:0.5rem;align-items:center;font-weight:var(--gov-wizzard-title-font-weight, 400)}.gov-wizzard-item__annot{color:var(--gov-color-secondary)}.gov-wizzard-item__content>*:last-child{margin-bottom:0}.gov-wizzard-item[variant=primary] .gov-wizzard-item__header{color:var(--gov-wizzard-primary-color, var(--gov-color-primary-800))}.gov-wizzard-item[variant=primary] .gov-wizzard-item__prefix{background:var(--gov-wizzard-primary-indicator-bg, var(--gov-color-primary-300));color:var(--gov-wizzard-primary-indicator-color, var(--gov-color-primary-800))}.gov-wizzard-item[variant=secondary] .gov-wizzard-item__header{color:var(--gov-wizzard-secondary-color, var(--gov-color-secondary-700))}.gov-wizzard-item[variant=secondary] .gov-wizzard-item__prefix{background:var(--gov-wizzard-secondary-indicator-bg, var(--gov-color-secondary-400));color:var(--gov-wizzard-secondary-indicator-color, var(--gov-color-secondary-700))}.gov-wizzard-item[variant=success] .gov-wizzard-item__header{color:var(--gov-wizzard-success-color, var(--gov-color-success-500))}.gov-wizzard-item[variant=success] .gov-wizzard-item__prefix{background:var(--gov-wizzard-success-indicator-bg, var(--gov-color-success));color:var(--gov-wizzard-success-indicator-color, var(--gov-color-neutral-white))}.gov-wizzard-item[variant=error] .gov-wizzard-item__header{color:var(--gov-wizzard-error-color, var(--gov-color-error-500))}.gov-wizzard-item[variant=error] .gov-wizzard-item__prefix{background:var(--gov-wizzard-error-indicator-bg, var(--gov-color-error));color:var(--gov-wizzard-error-indicator-color, var(--gov-color-neutral-white))}.gov-wizzard-item[variant=warning] .gov-wizzard-item__header{color:var(--gov-wizzard-warning-color, var(--gov-color-warning-500))}.gov-wizzard-item[variant=warning] .gov-wizzard-item__prefix{background:var(--gov-wizzard-warning-indicator-bg, var(--gov-color-warning));color:var(--gov-wizzard-warning-indicator-color, var(--gov-color-neutral-white))}.gov-wizzard-item__header{gap:1rem;padding:1rem;border-radius:0;text-align:left;transition:150ms linear color}.gov-wizzard-item__header:focus{outline:none}.gov-wizzard-item__header:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-wizzard-item__prefix{position:absolute;left:1rem}.gov-wizzard-item__header[aria-expanded=true] .gov-wizzard-item__label .gov-icon{transform:scale(-1)}.gov-wizzard-item[size=xs] .gov-wizzard-item__title,.gov-wizzard-item[size=s] .gov-wizzard-item__title,.gov-wizzard-item[size=m] .gov-wizzard-item__title{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}.gov-wizzard-item[size=xs] .gov-wizzard-item__annot,.gov-wizzard-item[size=s] .gov-wizzard-item__annot,.gov-wizzard-item[size=m] .gov-wizzard-item__annot{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing)}.gov-wizzard-item[size=xs] .gov-wizzard-item__prefix,.gov-wizzard-item[size=s] .gov-wizzard-item__prefix,.gov-wizzard-item[size=m] .gov-wizzard-item__prefix{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);width:var(--gov-wizzard-xs-indicator-size, 1.5rem);height:var(--gov-wizzard-xs-indicator-size, 1.5rem);top:var(--gov-wizzard-xs-top, 1rem)}.gov-wizzard-item[size=xs] .gov-wizzard-item__prefix+.gov-wizzard-item__header,.gov-wizzard-item[size=s] .gov-wizzard-item__prefix+.gov-wizzard-item__header,.gov-wizzard-item[size=m] .gov-wizzard-item__prefix+.gov-wizzard-item__header{padding:var(--gov-wizzard-xs-header-padding, 1rem 1rem 1rem 3.5rem)}.gov-wizzard-item[size=xs] .gov-wizzard-item__content,.gov-wizzard-item[size=s] .gov-wizzard-item__content,.gov-wizzard-item[size=m] .gov-wizzard-item__content{padding:var(--gov-wizzard-content-padding, 0rem 1rem 1rem 1rem)}@media not all and (pointer: coarse){.gov-wizzard-item[variant=primary][collapsible=""] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=primary][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=primary][collapsible="1"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-primary-hover-color, var(--gov-color-primary-900))}}@media not all and (pointer: coarse){.gov-wizzard-item[variant=secondary][collapsible=""] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=secondary][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=secondary][collapsible="1"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-secondary-hover-color, var(--gov-color-secondary-800))}}@media not all and (pointer: coarse){.gov-wizzard-item[variant=success][collapsible=""] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=success][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=success][collapsible="1"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-success-hover-color, var(--gov-color-success-600))}}@media not all and (pointer: coarse){.gov-wizzard-item[variant=error][collapsible=""] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=error][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=error][collapsible="1"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-error-hover-color, var(--gov-color-error-600))}}@media not all and (pointer: coarse){.gov-wizzard-item[variant=warning][collapsible=""] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=warning][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=warning][collapsible="1"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-warning-hover-color, var(--gov-color-warning-600))}}button.gov-wizzard-item__header{display:inline-flex;vertical-align:middle;justify-content:center;align-items:center;border:0;background-color:transparent;text-align:center;text-decoration:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;justify-content:flex-start;text-align:left}button.gov-wizzard-item__header:focus{outline:none}@media (min-width: 30em){.gov-wizzard-item[size=s] .gov-wizzard-item__title,.gov-wizzard-item[size=m] .gov-wizzard-item__title{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing)}.gov-wizzard-item[size=s] .gov-wizzard-item__prefix,.gov-wizzard-item[size=m] .gov-wizzard-item__prefix{font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing);width:var(--gov-wizzard-s-indicator-size, 2rem);height:var(--gov-wizzard-s-indicator-size, 2rem);top:var(--gov-wizzard-s-top, 0.8125rem)}.gov-wizzard-item[size=s] .gov-wizzard-item__prefix+.gov-wizzard-item__header,.gov-wizzard-item[size=m] .gov-wizzard-item__prefix+.gov-wizzard-item__header{padding:var(--gov-wizzard-s-header-padding, 1rem 1rem 1rem 4rem)}}@media (min-width: 48em){.gov-wizzard-item[size=m] .gov-wizzard-item__title{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing)}.gov-wizzard-item[size=m] .gov-wizzard-item__prefix{font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing);width:var(--gov-wizzard-m-indicator-size, 2.5rem);height:var(--gov-wizzard-m-indicator-size, 2.5rem);top:var(--gov-wizzard-m-top, 0.5625rem)}.gov-wizzard-item[size=m] .gov-wizzard-item__prefix+.gov-wizzard-item__header{padding:var(--gov-wizzard-m-header-padding, 1rem 1rem 1rem 4.5rem)}.gov-wizzard-item[size=xs] .gov-wizzard-item__content{padding:var(--gov-wizzard-xs-content-padding, 0rem 1rem 1rem 3.5rem)}.gov-wizzard-item[size=s] .gov-wizzard-item__content{padding:var(--gov-wizzard-s-content-padding, 0rem 1rem 1rem 4rem)}.gov-wizzard-item[size=m] .gov-wizzard-item__content{padding:var(--gov-wizzard-m-content-padding, 0rem 1rem 1rem 4.5rem)}}';var w;(function(i){i["DIV"]="div";i["BUTTON"]="button"})(w||(w={}));const h=class{constructor(r){i(this,r);this.govChange=e(this,"gov-change",7);this.variant="primary";this.size="m";this.identifier=undefined;this.collapsible=false;this.annotation=undefined;this.label=undefined;this.disabled=false;this.isExpanded=false;this.labelTag="h3";this.h=s(this.host);this.triggerId=d("GovWizzardItem");this.contentId=d("GovWizzardContent")}validateLabel(i){if(!i){t(`[${v.root}]: Parameter label is required.`)}}validateTriggerTag(i){const e=["h1","h2","h3","h4","h5","h6","span"];if(i){if(!e.includes(i)){t(`[${v.root}]: Tag ${i} is not allowed.`)}}}validateVariant(i){z(n,i,v.root)}emmitChange(){this.govChange.emit({expanded:this.isExpanded,component:v.root})}componentWillLoad(){this.validateLabel(this.label);this.validateVariant(this.variant);this.validateTriggerTag(this.labelTag)}render(){const i=this.identifier||this.triggerId;const e=this.labelTag;const o=this.collapsible?w.BUTTON:w.DIV;const t=this.h.hasSlot("prefix")&&r("span",{class:v.prefix},r("slot",{name:"prefix"}));const z=r(e,{class:v.title},r("span",{class:v.name},r("span",{class:v.label},r("span",null,this.label),this.collapsible&&r("gov-icon",{class:v.arrow,name:"chevron-down"})),this.annotation&&r("span",{class:v.annot},this.annotation)));return r(a,{class:this.h.classes(v.root),"is-expanded":this.isExpanded,variant:this.variant,size:this.size,role:"listitem",collapsible:this.collapsible},this.collapsible?r(m,null,t,r(o,{id:i,class:v.header,"aria-expanded":g(this.isExpanded),"aria-controls":this.contentId,disabled:this.disabled,"aria-disabled":l(this.disabled),onClick:i=>{i.preventDefault();i.stopPropagation();this.collapsible?this.toggle():false}},z)):r(m,null,t,r("div",{class:v.header},z)),this.collapsible?r("div",{class:v.content,id:this.contentId,"aria-hidden":g(!this.isExpanded),hidden:!this.isExpanded,"aria-labelledby":i},r("slot",null)):r("div",{class:v.content,"aria-hidden":g(!this.isExpanded),hidden:!this.isExpanded},r("slot",null)))}async open(){this.isExpanded=true;this.emmitChange()}async close(){this.isExpanded=false;this.emmitChange()}async toggle(){this.isExpanded=!this.isExpanded;this.emmitChange()}async currentState(){return this.isExpanded}get host(){return o(this)}static get watchers(){return{label:["validateLabel"],labelTag:["validateTriggerTag"],variant:["validateVariant"]}}};h.style=c;export{h as gov_wizzard_item};
|
|
2
|
-
//# sourceMappingURL=p-d2729599.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["govWizzardItemCss","Tags","GovWizzardItem","constructor","hostRef","this","h","govHost","host","triggerId","createID","contentId","validateLabel","newValue","govErrorLog","WizzardItemClass","root","validateTriggerTag","validTags","includes","validateVariant","validateProp","WizardVariants","emmitChange","govChange","emit","expanded","isExpanded","component","componentWillLoad","label","variant","labelTag","render","identifier","LabelTag","Tag","collapsible","BUTTON","DIV","prefixSlot","hasSlot","class","prefix","name","title","arrow","annotation","annot","Host","classes","size","role","Fragment","id","header","booleanString","disabled","toBoolAttrIfDefined","onClick","e","preventDefault","stopPropagation","toggle","content","hidden","open","close","currentState"],"sources":["../../../packages/core/src/components/gov-wizzard/gov-wizzard-item.scss?tag=gov-wizzard-item","../../../packages/core/src/components/gov-wizzard/gov-wizzard-item.tsx"],"sourcesContent":["/*\n * Wizzard - Item\n */\n\n@import \"../gov-wizzard/gov-wizzard-item-core.scss\";\n$class: \".gov-wizzard-item\";\n\n#{$class} {\n\t@include wizzard-item-core;\n\tmargin-bottom: rem-calc(16);\n\tbackground: $wizzard-bg-color;\n\t&__header {\n\t\t@include focus-outline();\n\t\tgap: rem-calc(16);\n\t\tpadding: rem-calc(16);\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t\ttransition: $t linear color;\n\t}\n\t&__prefix {\n\t\tposition: absolute;\n\t\tleft: rem-calc(16);\n\t}\n\n\t// STATES\n\t&__header[aria-expanded=\"true\"] {\n\t\t#{$class}__label {\n\t\t\t.gov-icon {\n\t\t\t\ttransform: scale(-1);\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t&[size=\"#{$size-xs}\"],\n\t&[size=\"#{$size-s}\"],\n\t&[size=\"#{$size-m}\"] {\n\t\t#{$class} {\n\t\t\t&__title {\n\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-xs, \"font-size\"));\n\t\t\t}\n\t\t\t&__annot {\n\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-xs, \"font-size-annot\"));\n\t\t\t}\n\t\t\t&__prefix {\n\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-xs, \"font-size-indicator\"));\n\t\t\t\twidth: deep-map-get($wizzard-sizes, $size-xs, \"indicator-size\");\n\t\t\t\theight: deep-map-get($wizzard-sizes, $size-xs, \"indicator-size\");\n\t\t\t\ttop: deep-map-get($wizzard-sizes, $size-xs, \"top\");\n\t\t\t\t+ #{$class}__header {\n\t\t\t\t\tpadding: deep-map-get($wizzard-sizes, $size-xs, \"header-padding\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t&__content {\n\t\t\t\tpadding: $wizzard-content-padding;\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $definitions in $wizzard-core-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t@include parameter(\"collapsible\") {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__header {\n\t\t\t\t\t\t@include hover() {\n\t\t\t\t\t\t\tcolor: get(\"hover-color\", $definitions);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// HOVERS\n\t@at-root button#{&}__header {\n\t\t@include button-core();\n\t\tjustify-content: flex-start;\n\t\ttext-align: left;\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&[size=\"#{$size-s}\"],\n\t\t&[size=\"#{$size-m}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-s, \"font-size\"));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-s, \"font-size-indicator\"));\n\t\t\t\t\twidth: deep-map-get($wizzard-sizes, $size-s, \"indicator-size\");\n\t\t\t\t\theight: deep-map-get($wizzard-sizes, $size-s, \"indicator-size\");\n\t\t\t\t\ttop: deep-map-get($wizzard-sizes, $size-s, \"top\");\n\t\t\t\t\t+ #{$class}__header {\n\t\t\t\t\t\tpadding: deep-map-get($wizzard-sizes, $size-s, \"header-padding\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\t&[size=\"#{$size-m}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-m, \"font-size\"));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-m, \"font-size-indicator\"));\n\t\t\t\t\twidth: deep-map-get($wizzard-sizes, $size-m, \"indicator-size\");\n\t\t\t\t\theight: deep-map-get($wizzard-sizes, $size-m, \"indicator-size\");\n\t\t\t\t\ttop: deep-map-get($wizzard-sizes, $size-m, \"top\");\n\t\t\t\t\t+ #{$class}__header {\n\t\t\t\t\t\tpadding: deep-map-get($wizzard-sizes, $size-m, \"header-padding\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t@each $size, $definitions in $wizzard-sizes {\n\t\t\t&[size=\"#{$size}\"] {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__content {\n\t\t\t\t\t\tpadding: get(\"content-padding\", $definitions);\n\t\t\t\t\t}\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, Watch } from \"@stencil/core\"\nimport { govErrorLog } from \"../../helpers/Log/gov.log\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { WizardSizesType, WizardVariants, WizardVariantsType, WizzardItemClass } from \"./constants\"\nimport { createID } from \"../../utils/string.utils\"\nimport { booleanString, govHost, toBoolAttrIfDefined } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { WizzardItemEvent } from \"./gov-wizzard-item.types\"\nimport Fragment from \"../../helpers/Fragment\"\n\nenum Tags {\n\tDIV = \"div\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-wizzard-item\",\n\tstyleUrl: \"gov-wizzard-item.scss\",\n})\nexport class GovWizzardItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID(\"GovWizzardItem\")\n\t\tthis.contentId = createID(\"GovWizzardContent\")\n\t}\n\n\t@Element() readonly host: HTMLGovWizzardItemElement\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant?: WizardVariantsType = \"primary\"\n\t/**\n\t * Size of wizzard\n\t */\n\t@Prop() readonly size?: WizardSizesType = \"m\"\n\t/**\n\t * Custom wizzard item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Defines weather the wizzard item can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Item annotation of the wizzard\n\t */\n\t@Prop() readonly annotation: string\n\t/**\n\t * Item label of the wizzard\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Makes the wizzard component disabled.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Defines whether the accordion is open or closed by default\n\t */\n\t@Prop({ attribute: \"is-expanded\", mutable: true }) isExpanded = false\n\t/**\n\t * Used to change the HTML tag in the accordion trigger for correct semantic structure\n\t */\n\t@Prop({ attribute: \"label-tag\" }) readonly labelTag: string = \"h3\"\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<WizzardItemEvent>\n\n\t@Watch(\"label\")\n\tprivate validateLabel(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${WizzardItemClass.root}]: Parameter label is required.`)\n\t\t}\n\t}\n\n\t@Watch(\"labelTag\")\n\tprivate validateTriggerTag(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(`[${WizzardItemClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch(\"variant\")\n\tprivate validateVariant(newValue: string): void {\n\t\tvalidateProp(WizardVariants, newValue, WizzardItemClass.root)\n\t}\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({ expanded: this.isExpanded, component: WizzardItemClass.root })\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateLabel(this.label)\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateTriggerTag(this.labelTag)\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst LabelTag = this.labelTag\n\t\tconst Tag = this.collapsible ? Tags.BUTTON : Tags.DIV\n\t\tconst prefixSlot = this.h.hasSlot(\"prefix\") && (<span class={WizzardItemClass.prefix}><slot name=\"prefix\" /></span>)\n\n\t\tconst label = (\n\t\t\t<LabelTag class={WizzardItemClass.title}>\n\t\t\t\t<span class={WizzardItemClass.name}>\n\t\t\t\t\t<span class={WizzardItemClass.label}>\n\t\t\t\t\t\t<span>{this.label}</span>\n\t\t\t\t\t\t{this.collapsible && <gov-icon class={WizzardItemClass.arrow} name=\"chevron-down\"></gov-icon>}\n\t\t\t\t\t</span>\n\n\t\t\t\t\t{this.annotation && <span class={WizzardItemClass.annot}>{this.annotation}</span>}\n\t\t\t\t</span>\n\t\t\t</LabelTag>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(WizzardItemClass.root)} is-expanded={this.isExpanded} variant={this.variant} size={this.size} role=\"listitem\" collapsible={this.collapsible}>\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\tid={triggerId}\n\t\t\t\t\t\t\tclass={WizzardItemClass.header}\n\t\t\t\t\t\t\taria-expanded={booleanString(this.isExpanded)}\n\t\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tthis.collapsible ? this.toggle() : false\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t</Fragment>\n\t\t\t\t) : (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t\t<div class={WizzardItemClass.header}>{label}</div>\n\t\t\t\t\t</Fragment>\n\t\t\t\t)}\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={WizzardItemClass.content}\n\t\t\t\t\t\tid={this.contentId}\n\t\t\t\t\t\taria-hidden={booleanString(!this.isExpanded)}\n\t\t\t\t\t\thidden={!this.isExpanded}\n\t\t\t\t\t\taria-labelledby={triggerId}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div class={WizzardItemClass.content} aria-hidden={booleanString(!this.isExpanded)} hidden={!this.isExpanded}>\n\t\t\t\t\t\t<slot />\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 * Opening the Wizzard\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpanded = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the Wizzard\n\t */\n\t@Method()\n\tpublic async close(): Promise<void> {\n\t\tthis.isExpanded = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Wizzard switch\n\t */\n\t@Method()\n\tpublic async toggle(): Promise<void> {\n\t\tthis.isExpanded = !this.isExpanded\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tpublic async currentState(): Promise<boolean> {\n\t\treturn this.isExpanded\n\t}\n}\n"],"mappings":"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"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { V as Variants } from './variants-2b936d58.js';
|
|
2
|
-
import { S as Sizes } from './sizes-6c5943b4.js';
|
|
3
|
-
import { p as pick } from './utils-c057a3fa.js';
|
|
4
|
-
|
|
5
|
-
const WizardVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS']);
|
|
6
|
-
const WizardSizes = pick(Sizes, ['_XS', '_S', '_M']);
|
|
7
|
-
const WizzardClass = {
|
|
8
|
-
root: 'gov-wizzard',
|
|
9
|
-
};
|
|
10
|
-
const WizzardItemClass = {
|
|
11
|
-
root: 'gov-wizzard-item',
|
|
12
|
-
header: 'gov-wizzard-item__header',
|
|
13
|
-
arrow: 'gov-wizzard-item__arrow',
|
|
14
|
-
title: 'gov-wizzard-item__title',
|
|
15
|
-
name: 'gov-wizzard-item__name',
|
|
16
|
-
label: 'gov-wizzard-item__label',
|
|
17
|
-
annot: 'gov-wizzard-item__annot',
|
|
18
|
-
prefix: 'gov-wizzard-item__prefix',
|
|
19
|
-
content: 'gov-wizzard-item__content',
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export { WizzardItemClass as W, WizzardClass as a, WizardSizes as b, WizardVariants as c };
|
|
23
|
-
|
|
24
|
-
//# sourceMappingURL=constants-bf5a583f.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"constants-bf5a583f.js","mappings":";;;;MAKa,cAAc,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,EAAC;MAGxF,WAAW,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,EAAC;MAG9C,YAAY,GAAG;EAC3B,IAAI,EAAE,aAAa;EACnB;MAEY,gBAAgB,GAAG;EAC/B,IAAI,EAAE,kBAAkB;EACxB,MAAM,EAAE,0BAA0B;EAClC,KAAK,EAAE,yBAAyB;EAChC,KAAK,EAAE,yBAAyB;EAChC,IAAI,EAAE,wBAAwB;EAC9B,KAAK,EAAE,yBAAyB;EAChC,KAAK,EAAE,yBAAyB;EAChC,MAAM,EAAE,0BAA0B;EAClC,OAAO,EAAE,2BAA2B;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-wizzard/constants.ts"],"sourcesContent":["import { Variants } from '../../core/constants/variants'\nimport { Sizes } from '../../core/constants/sizes'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const WizardVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS'])\nexport type WizardVariantsType = `${ValueOf<typeof WizardVariants>}`\n\nexport const WizardSizes = pick(Sizes, ['_XS', '_S', '_M'])\nexport type WizardSizesType = `${ValueOf<typeof WizardSizes>}`\n\nexport const WizzardClass = {\n\troot: 'gov-wizzard',\n}\n\nexport const WizzardItemClass = {\n\troot: 'gov-wizzard-item',\n\theader: 'gov-wizzard-item__header',\n\tarrow: 'gov-wizzard-item__arrow',\n\ttitle: 'gov-wizzard-item__title',\n\tname: 'gov-wizzard-item__name',\n\tlabel: 'gov-wizzard-item__label',\n\tannot: 'gov-wizzard-item__annot',\n\tprefix: 'gov-wizzard-item__prefix',\n\tcontent: 'gov-wizzard-item__content',\n}\n"],"version":3}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-ae3c50f1.js';
|
|
2
|
-
import { a as govErrorLog } from './gov.log-af905420.js';
|
|
3
|
-
import { v as validateProp } from './props-789f7529.js';
|
|
4
|
-
import { W as WizzardItemClass, c as WizardVariants } from './constants-bf5a583f.js';
|
|
5
|
-
import { c as createID } from './string.utils-f268fc6b.js';
|
|
6
|
-
import { g as govHost, b as booleanString, t as toBoolAttrIfDefined } from './template-10332292.js';
|
|
7
|
-
import { F as Fragment } from './Fragment-8d8d54fb.js';
|
|
8
|
-
import './variants-2b936d58.js';
|
|
9
|
-
import './sizes-6c5943b4.js';
|
|
10
|
-
import './utils-c057a3fa.js';
|
|
11
|
-
|
|
12
|
-
const govWizzardItemCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-wizzard-item{position:relative;display:block;width:100%;margin-bottom:1rem;background:var(--gov-wizzard-bg-color, var(--gov-color-neutral-white))}.gov-wizzard-item__header{position:relative;width:100%}.gov-wizzard-item__arrow{flex:0 0 auto;width:0.75rem;height:0.75rem}.gov-wizzard-item__title{margin:0;padding:0;font-family:var(--gov-font-family, \"Roboto\", sans-serif);font-weight:400;box-sizing:border-box;display:flex;gap:1rem;align-items:baseline}.gov-wizzard-item__prefix{display:flex;flex:0 0 auto;justify-content:center;align-items:center;border-radius:50%;text-align:center}.gov-wizzard-item__prefix .gov-icon{width:45%;height:45%}.gov-wizzard-item__prefix span[slot=prefix]{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.gov-wizzard-item__name{display:flex;flex-direction:column}.gov-wizzard-item__label{display:flex;gap:0.5rem;align-items:center;font-weight:var(--gov-wizzard-title-font-weight, 400)}.gov-wizzard-item__annot{color:var(--gov-color-secondary)}.gov-wizzard-item__content>*:last-child{margin-bottom:0}.gov-wizzard-item[variant=primary] .gov-wizzard-item__header{color:var(--gov-wizzard-primary-color, var(--gov-color-primary-800))}.gov-wizzard-item[variant=primary] .gov-wizzard-item__prefix{background:var(--gov-wizzard-primary-indicator-bg, var(--gov-color-primary-300));color:var(--gov-wizzard-primary-indicator-color, var(--gov-color-primary-800))}.gov-wizzard-item[variant=secondary] .gov-wizzard-item__header{color:var(--gov-wizzard-secondary-color, var(--gov-color-secondary-700))}.gov-wizzard-item[variant=secondary] .gov-wizzard-item__prefix{background:var(--gov-wizzard-secondary-indicator-bg, var(--gov-color-secondary-400));color:var(--gov-wizzard-secondary-indicator-color, var(--gov-color-secondary-700))}.gov-wizzard-item[variant=success] .gov-wizzard-item__header{color:var(--gov-wizzard-success-color, var(--gov-color-success-500))}.gov-wizzard-item[variant=success] .gov-wizzard-item__prefix{background:var(--gov-wizzard-success-indicator-bg, var(--gov-color-success));color:var(--gov-wizzard-success-indicator-color, var(--gov-color-neutral-white))}.gov-wizzard-item[variant=error] .gov-wizzard-item__header{color:var(--gov-wizzard-error-color, var(--gov-color-error-500))}.gov-wizzard-item[variant=error] .gov-wizzard-item__prefix{background:var(--gov-wizzard-error-indicator-bg, var(--gov-color-error));color:var(--gov-wizzard-error-indicator-color, var(--gov-color-neutral-white))}.gov-wizzard-item[variant=warning] .gov-wizzard-item__header{color:var(--gov-wizzard-warning-color, var(--gov-color-warning-500))}.gov-wizzard-item[variant=warning] .gov-wizzard-item__prefix{background:var(--gov-wizzard-warning-indicator-bg, var(--gov-color-warning));color:var(--gov-wizzard-warning-indicator-color, var(--gov-color-neutral-white))}.gov-wizzard-item__header{gap:1rem;padding:1rem;border-radius:0;text-align:left;transition:150ms linear color}.gov-wizzard-item__header:focus{outline:none}.gov-wizzard-item__header:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-wizzard-item__prefix{position:absolute;left:1rem}.gov-wizzard-item__header[aria-expanded=true] .gov-wizzard-item__label .gov-icon{transform:scale(-1)}.gov-wizzard-item[size=xs] .gov-wizzard-item__title,.gov-wizzard-item[size=s] .gov-wizzard-item__title,.gov-wizzard-item[size=m] .gov-wizzard-item__title{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}.gov-wizzard-item[size=xs] .gov-wizzard-item__annot,.gov-wizzard-item[size=s] .gov-wizzard-item__annot,.gov-wizzard-item[size=m] .gov-wizzard-item__annot{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing)}.gov-wizzard-item[size=xs] .gov-wizzard-item__prefix,.gov-wizzard-item[size=s] .gov-wizzard-item__prefix,.gov-wizzard-item[size=m] .gov-wizzard-item__prefix{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);width:var(--gov-wizzard-xs-indicator-size, 1.5rem);height:var(--gov-wizzard-xs-indicator-size, 1.5rem);top:var(--gov-wizzard-xs-top, 1rem)}.gov-wizzard-item[size=xs] .gov-wizzard-item__prefix+.gov-wizzard-item__header,.gov-wizzard-item[size=s] .gov-wizzard-item__prefix+.gov-wizzard-item__header,.gov-wizzard-item[size=m] .gov-wizzard-item__prefix+.gov-wizzard-item__header{padding:var(--gov-wizzard-xs-header-padding, 1rem 1rem 1rem 3.5rem)}.gov-wizzard-item[size=xs] .gov-wizzard-item__content,.gov-wizzard-item[size=s] .gov-wizzard-item__content,.gov-wizzard-item[size=m] .gov-wizzard-item__content{padding:var(--gov-wizzard-content-padding, 0rem 1rem 1rem 1rem)}@media not all and (pointer: coarse){.gov-wizzard-item[variant=primary][collapsible=\"\"] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=primary][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=primary][collapsible=\"1\"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-primary-hover-color, var(--gov-color-primary-900))}}@media not all and (pointer: coarse){.gov-wizzard-item[variant=secondary][collapsible=\"\"] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=secondary][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=secondary][collapsible=\"1\"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-secondary-hover-color, var(--gov-color-secondary-800))}}@media not all and (pointer: coarse){.gov-wizzard-item[variant=success][collapsible=\"\"] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=success][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=success][collapsible=\"1\"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-success-hover-color, var(--gov-color-success-600))}}@media not all and (pointer: coarse){.gov-wizzard-item[variant=error][collapsible=\"\"] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=error][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=error][collapsible=\"1\"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-error-hover-color, var(--gov-color-error-600))}}@media not all and (pointer: coarse){.gov-wizzard-item[variant=warning][collapsible=\"\"] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=warning][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=warning][collapsible=\"1\"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-warning-hover-color, var(--gov-color-warning-600))}}button.gov-wizzard-item__header{display:inline-flex;vertical-align:middle;justify-content:center;align-items:center;border:0;background-color:transparent;text-align:center;text-decoration:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;justify-content:flex-start;text-align:left}button.gov-wizzard-item__header:focus{outline:none}@media (min-width: 30em){.gov-wizzard-item[size=s] .gov-wizzard-item__title,.gov-wizzard-item[size=m] .gov-wizzard-item__title{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing)}.gov-wizzard-item[size=s] .gov-wizzard-item__prefix,.gov-wizzard-item[size=m] .gov-wizzard-item__prefix{font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing);width:var(--gov-wizzard-s-indicator-size, 2rem);height:var(--gov-wizzard-s-indicator-size, 2rem);top:var(--gov-wizzard-s-top, 0.8125rem)}.gov-wizzard-item[size=s] .gov-wizzard-item__prefix+.gov-wizzard-item__header,.gov-wizzard-item[size=m] .gov-wizzard-item__prefix+.gov-wizzard-item__header{padding:var(--gov-wizzard-s-header-padding, 1rem 1rem 1rem 4rem)}}@media (min-width: 48em){.gov-wizzard-item[size=m] .gov-wizzard-item__title{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing)}.gov-wizzard-item[size=m] .gov-wizzard-item__prefix{font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing);width:var(--gov-wizzard-m-indicator-size, 2.5rem);height:var(--gov-wizzard-m-indicator-size, 2.5rem);top:var(--gov-wizzard-m-top, 0.5625rem)}.gov-wizzard-item[size=m] .gov-wizzard-item__prefix+.gov-wizzard-item__header{padding:var(--gov-wizzard-m-header-padding, 1rem 1rem 1rem 4.5rem)}.gov-wizzard-item[size=xs] .gov-wizzard-item__content{padding:var(--gov-wizzard-xs-content-padding, 0rem 1rem 1rem 3.5rem)}.gov-wizzard-item[size=s] .gov-wizzard-item__content{padding:var(--gov-wizzard-s-content-padding, 0rem 1rem 1rem 4rem)}.gov-wizzard-item[size=m] .gov-wizzard-item__content{padding:var(--gov-wizzard-m-content-padding, 0rem 1rem 1rem 4.5rem)}}";
|
|
13
|
-
|
|
14
|
-
var Tags;
|
|
15
|
-
(function (Tags) {
|
|
16
|
-
Tags["DIV"] = "div";
|
|
17
|
-
Tags["BUTTON"] = "button";
|
|
18
|
-
})(Tags || (Tags = {}));
|
|
19
|
-
const GovWizzardItem = class {
|
|
20
|
-
constructor(hostRef) {
|
|
21
|
-
registerInstance(this, hostRef);
|
|
22
|
-
this.govChange = createEvent(this, "gov-change", 7);
|
|
23
|
-
this.variant = "primary";
|
|
24
|
-
this.size = "m";
|
|
25
|
-
this.identifier = undefined;
|
|
26
|
-
this.collapsible = false;
|
|
27
|
-
this.annotation = undefined;
|
|
28
|
-
this.label = undefined;
|
|
29
|
-
this.disabled = false;
|
|
30
|
-
this.isExpanded = false;
|
|
31
|
-
this.labelTag = "h3";
|
|
32
|
-
this.h = govHost(this.host);
|
|
33
|
-
this.triggerId = createID("GovWizzardItem");
|
|
34
|
-
this.contentId = createID("GovWizzardContent");
|
|
35
|
-
}
|
|
36
|
-
validateLabel(newValue) {
|
|
37
|
-
if (!newValue) {
|
|
38
|
-
govErrorLog(`[${WizzardItemClass.root}]: Parameter label is required.`);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
validateTriggerTag(newValue) {
|
|
42
|
-
const validTags = ["h1", "h2", "h3", "h4", "h5", "h6", "span"];
|
|
43
|
-
if (newValue) {
|
|
44
|
-
if (!validTags.includes(newValue)) {
|
|
45
|
-
govErrorLog(`[${WizzardItemClass.root}]: Tag ${newValue} is not allowed.`);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
validateVariant(newValue) {
|
|
50
|
-
validateProp(WizardVariants, newValue, WizzardItemClass.root);
|
|
51
|
-
}
|
|
52
|
-
emmitChange() {
|
|
53
|
-
this.govChange.emit({ expanded: this.isExpanded, component: WizzardItemClass.root });
|
|
54
|
-
}
|
|
55
|
-
componentWillLoad() {
|
|
56
|
-
this.validateLabel(this.label);
|
|
57
|
-
this.validateVariant(this.variant);
|
|
58
|
-
this.validateTriggerTag(this.labelTag);
|
|
59
|
-
}
|
|
60
|
-
render() {
|
|
61
|
-
const triggerId = this.identifier || this.triggerId;
|
|
62
|
-
const LabelTag = this.labelTag;
|
|
63
|
-
const Tag = this.collapsible ? Tags.BUTTON : Tags.DIV;
|
|
64
|
-
const prefixSlot = this.h.hasSlot("prefix") && (h("span", { class: WizzardItemClass.prefix }, h("slot", { name: "prefix" })));
|
|
65
|
-
const label = (h(LabelTag, { class: WizzardItemClass.title }, h("span", { class: WizzardItemClass.name }, h("span", { class: WizzardItemClass.label }, h("span", null, this.label), this.collapsible && h("gov-icon", { class: WizzardItemClass.arrow, name: "chevron-down" })), this.annotation && h("span", { class: WizzardItemClass.annot }, this.annotation))));
|
|
66
|
-
return (h(Host, { class: this.h.classes(WizzardItemClass.root), "is-expanded": this.isExpanded, variant: this.variant, size: this.size, role: "listitem", collapsible: this.collapsible }, this.collapsible ? (h(Fragment, null, prefixSlot, h(Tag, { id: triggerId, class: WizzardItemClass.header, "aria-expanded": booleanString(this.isExpanded), "aria-controls": this.contentId, disabled: this.disabled, "aria-disabled": toBoolAttrIfDefined(this.disabled), onClick: (e) => {
|
|
67
|
-
e.preventDefault();
|
|
68
|
-
e.stopPropagation();
|
|
69
|
-
this.collapsible ? this.toggle() : false;
|
|
70
|
-
} }, label))) : (h(Fragment, null, prefixSlot, h("div", { class: WizzardItemClass.header }, label))), this.collapsible ? (h("div", { class: WizzardItemClass.content, id: this.contentId, "aria-hidden": booleanString(!this.isExpanded), hidden: !this.isExpanded, "aria-labelledby": triggerId }, h("slot", null))) : (h("div", { class: WizzardItemClass.content, "aria-hidden": booleanString(!this.isExpanded), hidden: !this.isExpanded }, h("slot", null)))));
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Opening the Wizzard
|
|
74
|
-
*/
|
|
75
|
-
async open() {
|
|
76
|
-
this.isExpanded = true;
|
|
77
|
-
this.emmitChange();
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Closing the Wizzard
|
|
81
|
-
*/
|
|
82
|
-
async close() {
|
|
83
|
-
this.isExpanded = false;
|
|
84
|
-
this.emmitChange();
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Wizzard switch
|
|
88
|
-
*/
|
|
89
|
-
async toggle() {
|
|
90
|
-
this.isExpanded = !this.isExpanded;
|
|
91
|
-
this.emmitChange();
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Returns the current state of the component
|
|
95
|
-
*/
|
|
96
|
-
async currentState() {
|
|
97
|
-
return this.isExpanded;
|
|
98
|
-
}
|
|
99
|
-
get host() { return getElement(this); }
|
|
100
|
-
static get watchers() { return {
|
|
101
|
-
"label": ["validateLabel"],
|
|
102
|
-
"labelTag": ["validateTriggerTag"],
|
|
103
|
-
"variant": ["validateVariant"]
|
|
104
|
-
}; }
|
|
105
|
-
};
|
|
106
|
-
GovWizzardItem.style = govWizzardItemCss;
|
|
107
|
-
|
|
108
|
-
export { GovWizzardItem as gov_wizzard_item };
|
|
109
|
-
|
|
110
|
-
//# sourceMappingURL=gov-wizzard-item.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"gov-wizzard-item.entry.js","mappings":"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","names":[],"sources":["../../../packages/core/src/components/gov-wizzard/gov-wizzard-item.scss?tag=gov-wizzard-item","../../../packages/core/src/components/gov-wizzard/gov-wizzard-item.tsx"],"sourcesContent":["/*\n * Wizzard - Item\n */\n\n@import \"../gov-wizzard/gov-wizzard-item-core.scss\";\n$class: \".gov-wizzard-item\";\n\n#{$class} {\n\t@include wizzard-item-core;\n\tmargin-bottom: rem-calc(16);\n\tbackground: $wizzard-bg-color;\n\t&__header {\n\t\t@include focus-outline();\n\t\tgap: rem-calc(16);\n\t\tpadding: rem-calc(16);\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t\ttransition: $t linear color;\n\t}\n\t&__prefix {\n\t\tposition: absolute;\n\t\tleft: rem-calc(16);\n\t}\n\n\t// STATES\n\t&__header[aria-expanded=\"true\"] {\n\t\t#{$class}__label {\n\t\t\t.gov-icon {\n\t\t\t\ttransform: scale(-1);\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t&[size=\"#{$size-xs}\"],\n\t&[size=\"#{$size-s}\"],\n\t&[size=\"#{$size-m}\"] {\n\t\t#{$class} {\n\t\t\t&__title {\n\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-xs, \"font-size\"));\n\t\t\t}\n\t\t\t&__annot {\n\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-xs, \"font-size-annot\"));\n\t\t\t}\n\t\t\t&__prefix {\n\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-xs, \"font-size-indicator\"));\n\t\t\t\twidth: deep-map-get($wizzard-sizes, $size-xs, \"indicator-size\");\n\t\t\t\theight: deep-map-get($wizzard-sizes, $size-xs, \"indicator-size\");\n\t\t\t\ttop: deep-map-get($wizzard-sizes, $size-xs, \"top\");\n\t\t\t\t+ #{$class}__header {\n\t\t\t\t\tpadding: deep-map-get($wizzard-sizes, $size-xs, \"header-padding\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t&__content {\n\t\t\t\tpadding: $wizzard-content-padding;\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $definitions in $wizzard-core-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t@include parameter(\"collapsible\") {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__header {\n\t\t\t\t\t\t@include hover() {\n\t\t\t\t\t\t\tcolor: get(\"hover-color\", $definitions);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// HOVERS\n\t@at-root button#{&}__header {\n\t\t@include button-core();\n\t\tjustify-content: flex-start;\n\t\ttext-align: left;\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&[size=\"#{$size-s}\"],\n\t\t&[size=\"#{$size-m}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-s, \"font-size\"));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-s, \"font-size-indicator\"));\n\t\t\t\t\twidth: deep-map-get($wizzard-sizes, $size-s, \"indicator-size\");\n\t\t\t\t\theight: deep-map-get($wizzard-sizes, $size-s, \"indicator-size\");\n\t\t\t\t\ttop: deep-map-get($wizzard-sizes, $size-s, \"top\");\n\t\t\t\t\t+ #{$class}__header {\n\t\t\t\t\t\tpadding: deep-map-get($wizzard-sizes, $size-s, \"header-padding\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\t&[size=\"#{$size-m}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-m, \"font-size\"));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-m, \"font-size-indicator\"));\n\t\t\t\t\twidth: deep-map-get($wizzard-sizes, $size-m, \"indicator-size\");\n\t\t\t\t\theight: deep-map-get($wizzard-sizes, $size-m, \"indicator-size\");\n\t\t\t\t\ttop: deep-map-get($wizzard-sizes, $size-m, \"top\");\n\t\t\t\t\t+ #{$class}__header {\n\t\t\t\t\t\tpadding: deep-map-get($wizzard-sizes, $size-m, \"header-padding\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t@each $size, $definitions in $wizzard-sizes {\n\t\t\t&[size=\"#{$size}\"] {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__content {\n\t\t\t\t\t\tpadding: get(\"content-padding\", $definitions);\n\t\t\t\t\t}\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, Watch } from \"@stencil/core\"\nimport { govErrorLog } from \"../../helpers/Log/gov.log\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { WizardSizesType, WizardVariants, WizardVariantsType, WizzardItemClass } from \"./constants\"\nimport { createID } from \"../../utils/string.utils\"\nimport { booleanString, govHost, toBoolAttrIfDefined } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { WizzardItemEvent } from \"./gov-wizzard-item.types\"\nimport Fragment from \"../../helpers/Fragment\"\n\nenum Tags {\n\tDIV = \"div\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-wizzard-item\",\n\tstyleUrl: \"gov-wizzard-item.scss\",\n})\nexport class GovWizzardItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID(\"GovWizzardItem\")\n\t\tthis.contentId = createID(\"GovWizzardContent\")\n\t}\n\n\t@Element() readonly host: HTMLGovWizzardItemElement\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant?: WizardVariantsType = \"primary\"\n\t/**\n\t * Size of wizzard\n\t */\n\t@Prop() readonly size?: WizardSizesType = \"m\"\n\t/**\n\t * Custom wizzard item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Defines weather the wizzard item can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Item annotation of the wizzard\n\t */\n\t@Prop() readonly annotation: string\n\t/**\n\t * Item label of the wizzard\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Makes the wizzard component disabled.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Defines whether the accordion is open or closed by default\n\t */\n\t@Prop({ attribute: \"is-expanded\", mutable: true }) isExpanded = false\n\t/**\n\t * Used to change the HTML tag in the accordion trigger for correct semantic structure\n\t */\n\t@Prop({ attribute: \"label-tag\" }) readonly labelTag: string = \"h3\"\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<WizzardItemEvent>\n\n\t@Watch(\"label\")\n\tprivate validateLabel(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${WizzardItemClass.root}]: Parameter label is required.`)\n\t\t}\n\t}\n\n\t@Watch(\"labelTag\")\n\tprivate validateTriggerTag(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(`[${WizzardItemClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch(\"variant\")\n\tprivate validateVariant(newValue: string): void {\n\t\tvalidateProp(WizardVariants, newValue, WizzardItemClass.root)\n\t}\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({ expanded: this.isExpanded, component: WizzardItemClass.root })\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateLabel(this.label)\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateTriggerTag(this.labelTag)\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst LabelTag = this.labelTag\n\t\tconst Tag = this.collapsible ? Tags.BUTTON : Tags.DIV\n\t\tconst prefixSlot = this.h.hasSlot(\"prefix\") && (<span class={WizzardItemClass.prefix}><slot name=\"prefix\" /></span>)\n\n\t\tconst label = (\n\t\t\t<LabelTag class={WizzardItemClass.title}>\n\t\t\t\t<span class={WizzardItemClass.name}>\n\t\t\t\t\t<span class={WizzardItemClass.label}>\n\t\t\t\t\t\t<span>{this.label}</span>\n\t\t\t\t\t\t{this.collapsible && <gov-icon class={WizzardItemClass.arrow} name=\"chevron-down\"></gov-icon>}\n\t\t\t\t\t</span>\n\n\t\t\t\t\t{this.annotation && <span class={WizzardItemClass.annot}>{this.annotation}</span>}\n\t\t\t\t</span>\n\t\t\t</LabelTag>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(WizzardItemClass.root)} is-expanded={this.isExpanded} variant={this.variant} size={this.size} role=\"listitem\" collapsible={this.collapsible}>\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\tid={triggerId}\n\t\t\t\t\t\t\tclass={WizzardItemClass.header}\n\t\t\t\t\t\t\taria-expanded={booleanString(this.isExpanded)}\n\t\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tthis.collapsible ? this.toggle() : false\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t</Fragment>\n\t\t\t\t) : (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t\t<div class={WizzardItemClass.header}>{label}</div>\n\t\t\t\t\t</Fragment>\n\t\t\t\t)}\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={WizzardItemClass.content}\n\t\t\t\t\t\tid={this.contentId}\n\t\t\t\t\t\taria-hidden={booleanString(!this.isExpanded)}\n\t\t\t\t\t\thidden={!this.isExpanded}\n\t\t\t\t\t\taria-labelledby={triggerId}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div class={WizzardItemClass.content} aria-hidden={booleanString(!this.isExpanded)} hidden={!this.isExpanded}>\n\t\t\t\t\t\t<slot />\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 * Opening the Wizzard\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpanded = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the Wizzard\n\t */\n\t@Method()\n\tpublic async close(): Promise<void> {\n\t\tthis.isExpanded = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Wizzard switch\n\t */\n\t@Method()\n\tpublic async toggle(): Promise<void> {\n\t\tthis.isExpanded = !this.isExpanded\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tpublic async currentState(): Promise<boolean> {\n\t\treturn this.isExpanded\n\t}\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"gov-wizzard.entry.js","mappings":";;;;;;;;;;;;AAAA,MAAM,aAAa,GAAG,0bAA0b;;MCcnc,UAAU;EAKtB;;;gBAO0C,GAAG;;;IAN5C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAoBO,YAAY,CAAC,QAAgB;IACpC,YAAY,CAAC,WAAW,EAAE,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;GACtD;EAED,iBAAiB;IAChB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC5B;EAED,gBAAgB;IACf,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,KAAgC;MAC1F,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;;;;;;;KAOrC,CAAC,CAAA;GACF;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,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IAC1E,eAAQ,CACF,EACP;GACD;;;;EAMM,MAAM,YAAY;IACxB,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;GACzE;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-wizzard/gov-wizzard.scss?tag=gov-wizzard","../../../packages/core/src/components/gov-wizzard/gov-wizzard.tsx"],"sourcesContent":["/*\n * Wizzard\n */\n\n$class: \".gov-wizzard\";\n\n#{$class} {\n\t@include base();\n\t@include reset-last-margin();\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { WizardSizes, WizardSizesType, WizzardClass, WizzardItemClass } from \"./constants\"\nimport { GovWizzardItemChangeEvent } from \"./gov-wizzard-item.d\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { validateWcagLabel } from \"../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../helpers/Dom/win\"\nimport { delay } from \"../../utils/utils\"\n\n@Component({\n\ttag: \"gov-wizzard\",\n\tstyleUrl: \"gov-wizzard.scss\",\n})\nexport class GovWizzard {\n\tprivate h: GovHost\n\n\t@Element() readonly host: HTMLGovWizzardElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t/**\n\t * Size of wizzard\n\t */\n\t@Prop() readonly size?: WizardSizesType = \"m\"\n\t/**\n\t * Adds accessible label for the wizzard 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 * Called when the wizzard children state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<GovWizzardItemChangeEvent>\n\n\t@Watch(\"size\")\n\tprivate validateSize(newValue: string): void {\n\t\tvalidateProp(WizardSizes, newValue, WizzardClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.host.querySelectorAll(WizzardItemClass.root).forEach((child: HTMLGovWizzardItemElement) => {\n\t\t\tchild.setAttribute(\"size\", this.size)\n\t\t\t/*\n\t\t\tchild.addEventListener('gov-change', (e: GovWizzardItemCustomEvent<GovWizzardItemChangeEvent>) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tthis.govChange.emit(e.detail)\n\t\t\t})\n\t\t\t*/\n\t\t})\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\treturn (\n\t\t\t<Host class={this.h.classes(WizzardClass.root)} role=\"list\" size={this.size}>\n\t\t\t\t<slot />\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\tpublic async validateWcag(): Promise<void> {\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, WizzardClass.root)\n\t}\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"win-7a1a8ac8.js","mappings":";;AAQO,MAAM,QAAQ,GAAG,OAAO,MAAM,KAAK,WAAW,CAAA;AAErD,MAAM,iBAAiB,GAAG,CAAI,IAAY,KAA6B,QAAQ,IAAI,MAAM,IAAI,QAAQ,CAAC,IAA2B,EAAE,MAAM,CAAC,CAAA;AAE1I,MAAM,MAAM,GAAG;EACd,MAAM,aAAa,GAAY;IAC9B,uBAAuB,EAAE,KAAK;IAC9B,SAAS,EAAE,gBAAgB;IAC3B,YAAY,EAAE,QAAQ,GAAG,QAAQ,GAAG,IAAI;GACxC,CAAA;EAED,MAAM,cAAc,GAAG,iBAAiB,CAAU,eAAe,CAAC,CAAA;EAClE,IAAI,cAAc,EAAE;IACnB,uCAAY,aAAa,GAAK,cAAc,EAAE;GAC9C;EAED,OAAO,aAAa,CAAA;AACrB,CAAC,CAAA;MAEY,uBAAuB,GAAG,MAA0C,MAAM,EAAE,CAAC,wBAAuB;MACpG,SAAS,GAAG,MAA4B,MAAM,EAAE,CAAC,UAAS;MAC1D,YAAY,GAAG,MAA+B,MAAM,EAAE,CAAC;;;;","names":[],"sources":["../../../packages/core/src/helpers/Dom/win.ts"],"sourcesContent":["import { property } from '../../utils/utils'\n\ninterface IConfig {\n\tcanValidateWcagOnRender: boolean\n\ticonsPath: string\n\tdocumentNode: Document\n}\n\nexport const isWindow = typeof window !== \"undefined\"\n\nconst getWindowProperty = <T>(name: string): Partial<T> | undefined => isWindow && window && property(name as keyof typeof window, window)\n\nconst config = (): IConfig => {\n\tconst defaultConfig: IConfig = {\n\t\tcanValidateWcagOnRender: false,\n\t\ticonsPath: './assets/icons',\n\t\tdocumentNode: document ? document : null,\n\t}\n\n\tconst windowProperty = getWindowProperty<IConfig>('GOV_DS_CONFIG')\n\tif (windowProperty) {\n\t\treturn { ...defaultConfig, ...windowProperty }\n\t}\n\n\treturn defaultConfig\n}\n\nexport const canValidateWcagOnRender = (): IConfig['canValidateWcagOnRender'] => config().canValidateWcagOnRender\nexport const iconsPath = (): IConfig['iconsPath'] => config().iconsPath\nexport const documentNode = (): IConfig['documentNode'] => config().documentNode\n"],"version":3}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|