@gov-design-system-ce/components 0.0.51 → 0.0.53
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-0883e74c.js → constants-393e915a.js} +2 -2
- package/dist/cjs/{constants-0883e74c.js.map → constants-393e915a.js.map} +1 -1
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/gov-accordion-item.cjs.entry.js +13 -37
- package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-accordion.cjs.entry.js +2 -2
- package/dist/cjs/gov-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-app.cjs.entry.js +158 -326
- package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-backdrop.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-badge.cjs.entry.js +5 -11
- package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-control-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-control.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-control.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-group.cjs.entry.js +7 -1
- package/dist/cjs/gov-form-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-input.cjs.entry.js +14 -12
- package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-icon.cjs.entry.js +5 -3
- package/dist/cjs/gov-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-prompt.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-spacer.cjs.entry.js +2 -2
- package/dist/cjs/gov-spacer.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-statsbar.cjs.entry.js +3 -3
- package/dist/cjs/gov-statsbar.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tabs.cjs.entry.js +1 -1
- package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/gov-accordion/constants.js +1 -1
- package/dist/collection/components/gov-accordion/constants.js.map +1 -1
- package/dist/collection/components/gov-accordion/gov-accordion-item.css +82 -84
- package/dist/collection/components/gov-accordion/gov-accordion-item.js +16 -117
- package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
- package/dist/collection/components/gov-accordion/gov-accordion.js +1 -1
- package/dist/collection/components/gov-accordion/gov-accordion.js.map +1 -1
- package/dist/collection/components/gov-backdrop/gov-backdrop.js +1 -1
- package/dist/collection/components/gov-backdrop/gov-backdrop.js.map +1 -1
- package/dist/collection/components/gov-badge/gov-badge.css +20 -20
- package/dist/collection/components/gov-badge/gov-badge.js +8 -40
- package/dist/collection/components/gov-badge/gov-badge.js.map +1 -1
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +3 -3
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js.map +1 -1
- package/dist/collection/components/gov-control-group/constants.js +1 -1
- package/dist/collection/components/gov-control-group/constants.js.map +1 -1
- package/dist/collection/components/gov-control-group/gov-control-group.js +3 -3
- package/dist/collection/components/gov-control-group/gov-control-group.js.map +1 -1
- package/dist/collection/components/gov-form/control/gov-form-control.css +4 -4
- package/dist/collection/components/gov-form/group/constants.js +5 -0
- package/dist/collection/components/gov-form/group/constants.js.map +1 -1
- package/dist/collection/components/gov-form/group/gov-form-group.css +8 -1
- package/dist/collection/components/gov-form/group/gov-form-group.js +25 -0
- package/dist/collection/components/gov-form/group/gov-form-group.js.map +1 -1
- package/dist/collection/components/gov-form/input/gov-form-input.js +27 -19
- package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
- package/dist/collection/components/gov-icon/gov-icon.js +4 -2
- package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
- package/dist/collection/components/gov-modal/gov-modal.js +8 -2
- package/dist/collection/components/gov-modal/gov-modal.js.map +1 -1
- package/dist/collection/components/gov-promp/gov-prompt.js +9 -4
- package/dist/collection/components/gov-promp/gov-prompt.js.map +1 -1
- package/dist/collection/components/gov-spacer/constants.js +1 -1
- package/dist/collection/components/gov-spacer/constants.js.map +1 -1
- package/dist/collection/components/gov-spacer/gov-spacer.js +3 -3
- package/dist/collection/components/gov-spacer/gov-spacer.js.map +1 -1
- package/dist/collection/components/gov-statsbar/gov-statsbar.js +5 -5
- package/dist/collection/components/gov-statsbar/gov-statsbar.js.map +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs.js +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
- package/dist/collection/core/constants/tokens.js +17 -0
- package/dist/collection/core/constants/tokens.js.map +1 -0
- package/dist/collection/pages/Accordion.js +158 -326
- package/dist/collection/pages/Accordion.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-alert.js.map +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-badge.js +1 -1
- package/dist/components/gov-breadcrumbs.js +1 -1
- package/dist/components/gov-breadcrumbs.js.map +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-control-group.js.map +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-control.js +1 -1
- package/dist/components/gov-form-control.js.map +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-group.js +1 -1
- package/dist/components/gov-form-group.js.map +1 -1
- package/dist/components/gov-form-input.js +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-icon.js +1 -1
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-modal.js +1 -1
- package/dist/components/gov-modal.js.map +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-prompt.js +1 -1
- package/dist/components/gov-prompt.js.map +1 -1
- package/dist/components/gov-side-nav-item.js +1 -1
- package/dist/components/gov-spacer.js +1 -1
- package/dist/components/gov-spacer.js.map +1 -1
- package/dist/components/gov-statsbar-item.js +1 -1
- package/dist/components/gov-statsbar.js +1 -1
- package/dist/components/gov-statsbar.js.map +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tabs.js.map +1 -1
- package/dist/components/gov-tile.js +1 -1
- package/dist/components/gov-toast.js +1 -1
- package/dist/components/gov-wizzard-item.js +1 -1
- package/dist/components/{p-d305407a.js → p-103c7bd5.js} +2 -2
- package/dist/{core/p-1020a160.js → components/p-17ebfe85.js} +2 -2
- package/dist/components/p-37a7409e.js +2 -0
- package/dist/components/p-37a7409e.js.map +1 -0
- package/dist/components/p-386409dc.js.map +1 -1
- package/dist/components/{p-ec26407a.js → p-7bea2390.js} +2 -2
- package/dist/components/{p-cd440c95.js → p-a20f1683.js} +2 -2
- package/dist/components/p-a20f1683.js.map +1 -0
- package/dist/components/{p-1026d931.js → p-c0e49b09.js} +2 -2
- package/dist/components/{p-9da782bf.js → p-c3f560b9.js} +2 -2
- package/dist/components/{p-9da782bf.js.map → p-c3f560b9.js.map} +1 -1
- package/dist/components/p-cf493ba0.js +2 -0
- package/dist/components/p-cf493ba0.js.map +1 -0
- package/dist/components/{p-80b2c231.js → p-db22f9ce.js} +2 -2
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-42cd2cc4.entry.js → p-05dc3d89.entry.js} +2 -2
- package/dist/core/{p-42cd2cc4.entry.js.map → p-05dc3d89.entry.js.map} +1 -1
- package/dist/core/{p-a857915f.entry.js → p-0c769f1a.entry.js} +2 -2
- package/dist/core/p-11be550d.entry.js.map +1 -1
- package/dist/core/p-16c3a489.entry.js +2 -0
- package/dist/core/p-16c3a489.entry.js.map +1 -0
- package/dist/{components/p-1020a160.js → core/p-17ebfe85.js} +2 -2
- package/dist/core/{p-abfa0beb.entry.js → p-2c7af892.entry.js} +2 -2
- package/dist/core/{p-abfa0beb.entry.js.map → p-2c7af892.entry.js.map} +1 -1
- package/dist/core/p-37a7409e.js +2 -0
- package/dist/core/p-37a7409e.js.map +1 -0
- package/dist/core/{p-3dbf7f49.js → p-3bacd021.js} +2 -2
- package/dist/core/p-3bc977e2.entry.js +2 -0
- package/dist/core/p-3bc977e2.entry.js.map +1 -0
- package/dist/core/{p-f969eec7.entry.js → p-41f72892.entry.js} +2 -2
- package/dist/core/p-41f72892.entry.js.map +1 -0
- package/dist/core/p-5195fd36.entry.js +2 -0
- package/dist/core/p-5195fd36.entry.js.map +1 -0
- package/dist/core/p-722218fd.entry.js.map +1 -1
- package/dist/core/{p-02c3a3fd.entry.js → p-7d680665.entry.js} +2 -2
- package/dist/core/{p-6dacb8d3.entry.js → p-88010439.entry.js} +2 -2
- package/dist/core/p-88010439.entry.js.map +1 -0
- package/dist/core/p-89921159.entry.js.map +1 -1
- package/dist/core/p-9a3e3ace.entry.js.map +1 -1
- package/dist/core/p-ab426e50.entry.js +2 -0
- package/dist/core/p-ab426e50.entry.js.map +1 -0
- package/dist/core/{p-1e3cad4b.entry.js → p-c81d62db.entry.js} +2 -2
- package/dist/core/p-e0c04c5f.entry.js.map +1 -1
- package/dist/core/{p-2790d89e.entry.js → p-e1780dba.entry.js} +2 -2
- package/dist/core/p-e1780dba.entry.js.map +1 -0
- package/dist/core/p-e39cd83c.entry.js +2 -0
- package/dist/core/p-e39cd83c.entry.js.map +1 -0
- package/dist/core/p-eda868dc.entry.js.map +1 -1
- package/dist/esm/{constants-037c35bc.js → constants-27b48cd1.js} +2 -2
- package/dist/esm/{constants-037c35bc.js.map → constants-27b48cd1.js.map} +1 -1
- package/dist/esm/{constants-ab132d9c.js → constants-858966b9.js} +2 -2
- package/dist/esm/{constants-ab132d9c.js.map → constants-858966b9.js.map} +1 -1
- package/dist/esm/{constants-5708696f.js → constants-ba92640d.js} +2 -2
- package/dist/esm/{constants-5708696f.js.map → constants-ba92640d.js.map} +1 -1
- package/dist/esm/core.js +1 -1
- package/dist/esm/gov-accordion-item.entry.js +13 -37
- package/dist/esm/gov-accordion-item.entry.js.map +1 -1
- package/dist/esm/gov-accordion.entry.js +2 -2
- package/dist/esm/gov-accordion.entry.js.map +1 -1
- package/dist/esm/gov-app.entry.js +158 -326
- package/dist/esm/gov-app.entry.js.map +1 -1
- package/dist/esm/gov-backdrop.entry.js.map +1 -1
- package/dist/esm/gov-badge.entry.js +6 -12
- package/dist/esm/gov-badge.entry.js.map +1 -1
- package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
- package/dist/esm/gov-button.entry.js +1 -1
- package/dist/esm/gov-control-group.entry.js.map +1 -1
- package/dist/esm/gov-dropdown.entry.js +1 -1
- package/dist/esm/gov-form-control.entry.js +1 -1
- package/dist/esm/gov-form-control.entry.js.map +1 -1
- package/dist/esm/gov-form-group.entry.js +7 -1
- package/dist/esm/gov-form-group.entry.js.map +1 -1
- package/dist/esm/gov-form-input.entry.js +14 -12
- package/dist/esm/gov-form-input.entry.js.map +1 -1
- package/dist/esm/gov-icon.entry.js +5 -3
- package/dist/esm/gov-icon.entry.js.map +1 -1
- package/dist/esm/gov-modal.entry.js.map +1 -1
- package/dist/esm/gov-prompt.entry.js.map +1 -1
- package/dist/esm/gov-spacer.entry.js +2 -2
- package/dist/esm/gov-spacer.entry.js.map +1 -1
- package/dist/esm/gov-statsbar-item.entry.js +1 -1
- package/dist/esm/gov-statsbar.entry.js +4 -4
- package/dist/esm/gov-statsbar.entry.js.map +1 -1
- package/dist/esm/gov-tabs.entry.js +1 -1
- package/dist/esm/gov-tabs.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/hydrate/index.js +210 -404
- package/dist/stencil.config.js +2 -2
- package/dist/stencil.config.js.map +1 -1
- package/dist/types/components/gov-accordion/constants.d.ts +1 -1
- package/dist/types/components/gov-accordion/gov-accordion-item.d.ts +1 -19
- package/dist/types/components/gov-backdrop/gov-backdrop.d.ts +1 -1
- package/dist/types/components/gov-badge/gov-badge.d.ts +3 -8
- package/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.ts +2 -2
- package/dist/types/components/gov-control-group/constants.d.ts +2 -2
- package/dist/types/components/gov-control-group/gov-control-group.d.ts +2 -2
- package/dist/types/components/gov-form/group/constants.d.ts +5 -0
- package/dist/types/components/gov-form/group/gov-form-group.d.ts +5 -1
- package/dist/types/components/gov-form/input/gov-form-input.d.ts +5 -4
- package/dist/types/components/gov-modal/gov-modal.d.ts +2 -1
- package/dist/types/components/gov-promp/gov-prompt.d.ts +2 -1
- package/dist/types/components/gov-spacer/constants.d.ts +1 -1
- package/dist/types/components/gov-statsbar/gov-statsbar.d.ts +1 -1
- package/dist/types/components.d.ts +31 -63
- package/dist/types/core/constants/tokens.d.ts +1 -0
- package/dist/types/interfaces.d.ts +1 -0
- package/package.json +3 -3
- package/dist/components/p-5bf5a42e.js +0 -2
- package/dist/components/p-5bf5a42e.js.map +0 -1
- package/dist/components/p-a5d69694.js +0 -2
- package/dist/components/p-a5d69694.js.map +0 -1
- package/dist/components/p-cd440c95.js.map +0 -1
- package/dist/core/p-0eadfb3e.entry.js +0 -2
- package/dist/core/p-0eadfb3e.entry.js.map +0 -1
- package/dist/core/p-2790d89e.entry.js.map +0 -1
- package/dist/core/p-6dacb8d3.entry.js.map +0 -1
- package/dist/core/p-7ab82a55.entry.js +0 -2
- package/dist/core/p-7ab82a55.entry.js.map +0 -1
- package/dist/core/p-9e208f40.entry.js +0 -2
- package/dist/core/p-9e208f40.entry.js.map +0 -1
- package/dist/core/p-a5d69694.js +0 -2
- package/dist/core/p-a5d69694.js.map +0 -1
- package/dist/core/p-e86db39c.entry.js +0 -2
- package/dist/core/p-e86db39c.entry.js.map +0 -1
- package/dist/core/p-f95bca5f.entry.js +0 -2
- package/dist/core/p-f95bca5f.entry.js.map +0 -1
- package/dist/core/p-f969eec7.entry.js.map +0 -1
- /package/dist/components/{p-d305407a.js.map → p-103c7bd5.js.map} +0 -0
- /package/dist/components/{p-1020a160.js.map → p-17ebfe85.js.map} +0 -0
- /package/dist/components/{p-ec26407a.js.map → p-7bea2390.js.map} +0 -0
- /package/dist/components/{p-1026d931.js.map → p-c0e49b09.js.map} +0 -0
- /package/dist/components/{p-80b2c231.js.map → p-db22f9ce.js.map} +0 -0
- /package/dist/core/{p-a857915f.entry.js.map → p-0c769f1a.entry.js.map} +0 -0
- /package/dist/core/{p-1020a160.js.map → p-17ebfe85.js.map} +0 -0
- /package/dist/core/{p-3dbf7f49.js.map → p-3bacd021.js.map} +0 -0
- /package/dist/core/{p-02c3a3fd.entry.js.map → p-7d680665.entry.js.map} +0 -0
- /package/dist/core/{p-1e3cad4b.entry.js.map → p-c81d62db.entry.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["govFormControlCss","GovFormControl","constructor","hostRef","this","h","govHost","host","f","govForm","controlId","createID","componentDidRender","passChildAttrs","invalidChildAttrs","disabledChildAttrs","syncControlMessages","formElementDescriptionControl","disconnectedCallback","_a","observer","disconnect","formElements","passChildAttr","success","hasGroupChildren","identifier","invalid","disabled","bottomSlot","querySelector","FormControlClass","bottom","MutationObserver","bind","observe","childList","Promise","all","messageElements","map","message","then","ids","mainElementsInControl","forEach","element","currentValue","splitByWhitespace","getAttribute","removeAttribute","Array","isArray","id","indexOf","push","length","setAttribute","join","render","Tag","fieldset","Host","size","class","classes","root","holder","hasSlot","name"],"sources":["../../../packages/core/src/components/gov-form/control/gov-form-control.scss?tag=gov-form-control","../../../packages/core/src/components/gov-form/control/gov-form-control.tsx"],"sourcesContent":["/*\n * Form Control\n */\n\n$class: \".gov-form-control\";\n\n#{$class} {\n\t&__holder {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tpadding: 0;\n\t\tborder: none;\n\t}\n\t&__bottom {\n\t\t@include reset-last-margin();\n\t}\n\n\t// VARIANTS\n\t.gov-form-label .gov-form-label__label {\n\t\tmargin: rem-calc(0 0 4);\n\t}\n\t#{$class} {\n\t\t&__bottom {\n\t\t\tmargin: rem-calc(4 0 0);\n\t\t}\n\t}\n\t&[type=\"file\"] {\n\t\t.gov-form-label[slot=\"top\"] .gov-form-label__label {\n\t\t\tmargin: rem-calc(0 0 8);\n\t\t}\n\t\t#{$class} {\n\t\t\t&__bottom {\n\t\t\t\tmargin: rem-calc(8 0 0);\n\t\t\t}\n\t\t}\n\t}\n\t// Checkbox, radio\n\t@each $size, $definitions in $form-checkbox-core-sizes {\n\t\t&[size=\"#{$size}\"][type=\"checkbox\"],\n\t\t&[size=\"#{$size}\"][type=\"radio\"] {\n\t\t\t#{$class} {\n\t\t\t\t$indicator-width: get(\"indicator-size\", $definitions);\n\t\t\t\t&__holder > #{$class}__bottom {\n\t\t\t\t\tmargin-top: get(\"message-gap\", $definitions);\n\t\t\t\t\tmargin-left: calc($indicator-width + get(\"gap\", $definitions));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Switch\n\t@each $size, $definitions in $form-switch-sizes {\n\t\t&[size=\"#{$size}\"][type=\"switch\"] {\n\t\t\t#{$class} {\n\t\t\t\t$indicator-ratio: calc(5 / 3);\n\t\t\t\t$indicator-width: calc(get(\"indicator-height\", $definitions) * $indicator-ratio);\n\t\t\t\t&__bottom {\n\t\t\t\t\tmargin-top: get(\"message-gap\", $definitions);\n\t\t\t\t\tmargin-left: calc($indicator-width + get(\"gap\", $definitions));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// STATES\n\t@include parameter(\"invalid\") {\n\t\t.gov-form-label[slot=\"top\"] .gov-form-label__label {\n\t\t\tcolor: $form-state-color-error;\n\t\t}\n\t}\n\t@include parameter(\"disabled\") {\n\t\t.gov-form-label__label {\n\t\t\tpointer-events: none;\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop } from \"@stencil/core\"\nimport { govForm } from \"../../../helpers/Dom/form\"\nimport { GovForm } from \"../../../helpers/Dom/form.types\"\nimport { govHost } from \"../../../helpers/Dom/template\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { createID, splitByWhitespace } from \"../../../utils/string.utils\"\nimport { FormControlClass, FormControlSizesType } from \"./constants\"\n\n@Component({\n\ttag: \"gov-form-control\",\n\tstyleUrl: \"gov-form-control.scss\",\n})\nexport class GovFormControl {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate readonly controlId: string\n\tprivate observer: MutationObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.controlId = createID(\"GovFormControl\")\n\t}\n\n\t@Element() host: HTMLGovFormControlElement\n\t/**\n\t * Defines the space between nested components.\n\t */\n\t@Prop() readonly gap?: FormControlSizesType\n\t/**\n\t * Form element identifier\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Indicates the entered value of child form element does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean = false\n\t/**\n\t/**\n\t * Indicates the form element is disabled\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean = false\n\t/**\n\t * Use control as a fieldset for better accessibility.\n\t * Note: Don't forget to set the legend attribute of the gov-form-label component\n\t */\n\t@Prop() readonly fieldset: boolean = false\n\t/**\n\t * Form element size.\n\t */\n\t@Prop() readonly size?: FormControlSizesType = \"m\"\n\n\tcomponentDidRender() {\n\t\tthis.passChildAttrs()\n\t\tthis.invalidChildAttrs()\n\t\tthis.disabledChildAttrs()\n\t\tthis.syncControlMessages()\n\t\tthis.formElementDescriptionControl()\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tthis.observer?.disconnect()\n\t}\n\n\tprivate passChildAttrs() {\n\t\tconst formElements = [\n\t\t\t\"gov-form-select\",\n\t\t\t\"gov-form-input\",\n\t\t\t\"gov-form-switch\",\n\t\t\t\"gov-form-checkbox\",\n\t\t\t\"gov-form-radio\",\n\t\t\t\"gov-form-multi-select\",\n\t\t\t\"gov-form-file\",\n\t\t\t\"gov-form-search\",\n\t\t]\n\t\tthis.h.passChildAttr(formElements, \"success\", this.success)\n\n\t\tif (this.f.hasGroupChildren === false) {\n\t\t\tthis.h.passChildAttr([...formElements, \"gov-form-label\"], \"identifier\", this.identifier || this.controlId)\n\t\t}\n\t}\n\n\tprivate invalidChildAttrs() {\n\t\tconst formElements = [\n\t\t\t\"gov-form-select\",\n\t\t\t\"gov-form-input\",\n\t\t\t\"gov-form-switch\",\n\t\t\t\"gov-form-checkbox\",\n\t\t\t\"gov-form-radio\",\n\t\t\t\"gov-form-multi-select\",\n\t\t\t\"gov-form-file\",\n\t\t\t\"gov-form-search\",\n\t\t]\n\t\tthis.h.passChildAttr(formElements, \"invalid\", this.invalid)\n\n\t\tif (this.f.hasGroupChildren === false) {\n\t\t\tthis.h.passChildAttr([...formElements, \"gov-form-label\"], \"identifier\", this.identifier || this.controlId)\n\t\t}\n\t}\n\n\tprivate disabledChildAttrs() {\n\t\tconst formElements = [\n\t\t\t\"gov-form-select\",\n\t\t\t\"gov-form-input\",\n\t\t\t\"gov-form-switch\",\n\t\t\t\"gov-form-checkbox\",\n\t\t\t\"gov-form-radio\",\n\t\t\t\"gov-form-multi-select\",\n\t\t\t\"gov-form-file\",\n\t\t\t\"gov-form-search\",\n\t\t]\n\t\tthis.h.passChildAttr(formElements, \"disabled\", this.disabled)\n\n\t\tif (this.f.hasGroupChildren === false) {\n\t\t\tthis.h.passChildAttr([...formElements, \"gov-form-label\"], \"identifier\", this.identifier || this.controlId)\n\t\t}\n\t}\n\n\tprivate formElementDescriptionControl() {\n\t\tconst bottomSlot = this.host.querySelector(\".\" + FormControlClass.bottom)\n\t\tif (!bottomSlot) return\n\t\tthis.observer = new MutationObserver(\n\t\t\tfunction() {\n\t\t\t\tthis.syncControlMessages()\n\t\t\t}.bind(this),\n\t\t)\n\n\t\tthis.observer.observe(bottomSlot, { childList: true })\n\t}\n\n\tprivate syncControlMessages() {\n\t\tPromise.all(this.f.messageElements.map((message: HTMLGovFormMessageElement) => message.identifier())).then((ids: string[]) => {\n\t\t\tthis.f.mainElementsInControl.forEach((element: Element) => {\n\t\t\t\tconst currentValue = splitByWhitespace(element.getAttribute(\"wcag-described-by\"))\n\t\t\t\telement.removeAttribute(\"wcag-described-by\")\n\t\t\t\tif (Array.isArray(currentValue)) {\n\t\t\t\t\tcurrentValue.forEach(id => (id.indexOf(\"GovFormMessage\") === -1 ? ids.push(id) : null))\n\t\t\t\t}\n\t\t\t\tif (ids.length) {\n\t\t\t\t\telement.setAttribute(\"wcag-described-by\", ids.join(\" \"))\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\t}\n\n\trender() {\n\t\tconst Tag = this.fieldset ? \"fieldset\" : \"div\"\n\t\treturn (\n\t\t\t<Host size={this.size} class={this.h.classes(FormControlClass.root)}>\n\t\t\t\t<Tag class={FormControlClass.holder}>\n\t\t\t\t\t{this.h.hasSlot(\"top\") && <slot name=\"top\"></slot>}\n\t\t\t\t\t<slot></slot>\n\t\t\t\t\t{this.h.hasSlot(\"bottom\") && (\n\t\t\t\t\t\t<div class={FormControlClass.bottom}>\n\t\t\t\t\t\t\t<slot name=\"bottom\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"mUAAA,MAAMA,EAAoB,uqH,MCYbC,EAAc,MAM1B,WAAAC,CAAAC,G,oEAkBoC,M,cAKC,M,aAKD,M,cAKC,M,UAIU,IApC9CC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,EAAIC,EAAQL,KAAKC,GACtBD,KAAKM,UAAYC,EAAS,iB,CAoC3B,kBAAAC,GACCR,KAAKS,iBACLT,KAAKU,oBACLV,KAAKW,qBACLX,KAAKY,sBACLZ,KAAKa,+B,CAGN,oBAAAC,G,OACCC,EAAAf,KAAKgB,YAAQ,MAAAD,SAAA,SAAAA,EAAEE,Y,CAGR,cAAAR,GACP,MAAMS,EAAe,CACpB,kBACA,iBACA,kBACA,oBACA,iBACA,wBACA,gBACA,mBAEDlB,KAAKC,EAAEkB,cAAcD,EAAc,UAAWlB,KAAKoB,SAEnD,GAAIpB,KAAKI,EAAEiB,mBAAqB,MAAO,CACtCrB,KAAKC,EAAEkB,cAAc,IAAID,EAAc,kBAAmB,aAAclB,KAAKsB,YAActB,KAAKM,U,EAI1F,iBAAAI,GACP,MAAMQ,EAAe,CACpB,kBACA,iBACA,kBACA,oBACA,iBACA,wBACA,gBACA,mBAEDlB,KAAKC,EAAEkB,cAAcD,EAAc,UAAWlB,KAAKuB,SAEnD,GAAIvB,KAAKI,EAAEiB,mBAAqB,MAAO,CACtCrB,KAAKC,EAAEkB,cAAc,IAAID,EAAc,kBAAmB,aAAclB,KAAKsB,YAActB,KAAKM,U,EAI1F,kBAAAK,GACP,MAAMO,EAAe,CACpB,kBACA,iBACA,kBACA,oBACA,iBACA,wBACA,gBACA,mBAEDlB,KAAKC,EAAEkB,cAAcD,EAAc,WAAYlB,KAAKwB,UAEpD,GAAIxB,KAAKI,EAAEiB,mBAAqB,MAAO,CACtCrB,KAAKC,EAAEkB,cAAc,IAAID,EAAc,kBAAmB,aAAclB,KAAKsB,YAActB,KAAKM,U,EAI1F,6BAAAO,GACP,MAAMY,EAAazB,KAAKG,KAAKuB,cAAc,IAAMC,EAAiBC,QAClE,IAAKH,EAAY,OACjBzB,KAAKgB,SAAW,IAAIa,iBACnB,WACC7B,KAAKY,qB,EACJkB,KAAK9B,OAGRA,KAAKgB,SAASe,QAAQN,EAAY,CAAEO,UAAW,M,CAGxC,mBAAApB,GACPqB,QAAQC,IAAIlC,KAAKI,EAAE+B,gBAAgBC,KAAKC,GAAuCA,EAAQf,gBAAegB,MAAMC,IAC3GvC,KAAKI,EAAEoC,sBAAsBC,SAASC,IACrC,MAAMC,EAAeC,EAAkBF,EAAQG,aAAa,sBAC5DH,EAAQI,gBAAgB,qBACxB,GAAIC,MAAMC,QAAQL,GAAe,CAChCA,EAAaF,SAAQQ,GAAOA,EAAGC,QAAQ,qBAAuB,EAAIX,EAAIY,KAAKF,GAAM,M,CAElF,GAAIV,EAAIa,OAAQ,CACfV,EAAQW,aAAa,oBAAqBd,EAAIe,KAAK,K,IAEnD,G,CAIJ,MAAAC,GACC,MAAMC,EAAMxD,KAAKyD,SAAW,WAAa,MACzC,OACCxD,EAACyD,EAAI,CAACC,KAAM3D,KAAK2D,KAAMC,MAAO5D,KAAKC,EAAE4D,QAAQlC,EAAiBmC,OAC7D7D,EAACuD,EAAG,CAACI,MAAOjC,EAAiBoC,QAC3B/D,KAAKC,EAAE+D,QAAQ,QAAU/D,EAAA,QAAMgE,KAAK,QACrChE,EAAA,aACCD,KAAKC,EAAE+D,QAAQ,WACf/D,EAAA,OAAK2D,MAAOjC,EAAiBC,QAC5B3B,EAAA,QAAMgE,KAAK,a"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,h as i,H as e,g as s}from"./p-10cbc3fe.js";import{g as o}from"./p-3f37ddb6.js";import{v as a}from"./p-26acf964.js";import{
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,h as i,H as e,g as s}from"./p-10cbc3fe.js";import{g as o}from"./p-3f37ddb6.js";import{v as a}from"./p-26acf964.js";import{a as n,c as r}from"./p-17ebfe85.js";import"./p-561fa17b.js";import"./p-03990da5.js";import"./p-ff7365ae.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-statsbar-item{position:relative;display:block;padding:1.25rem}.gov-statsbar-item__icon,.gov-statsbar-item__number{margin-bottom:1rem}.gov-statsbar-item__icon{display:block;width:2rem;height:2rem}.gov-statsbar-item__number{font-weight:var(--gov-text-5xl-font-weight);font-size:var(--gov-text-5xl-font-size);line-height:var(--gov-text-5xl-line-height);letter-spacing:var(--gov-text-5xl-letter-spacing)}.gov-statsbar-item__text{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);letter-spacing:0.0125em}.gov-statsbar-item__text>*:last-child{margin-bottom:0}.gov-statsbar-item[icon-position=left]{padding-left:3rem}.gov-statsbar-item[icon-position=left] .gov-statsbar-item__icon{position:absolute;top:1.5rem;left:0}@media (min-width: 30em){.gov-statsbar-item{flex:1 0 50%;max-width:50%}}@media (min-width: 48em){.gov-statsbar-item{padding:2.5rem}.gov-statsbar-item__icon{width:3rem;height:3rem}.gov-statsbar-item[icon-position=left]{padding-left:4rem}.gov-statsbar-item[icon-position=left] .gov-statsbar-item__icon{top:2.75rem}}@media (min-width: 64em){.gov-statsbar-item{flex-basis:auto;max-width:25%}}";const g=class{constructor(i){t(this,i);this.iconPosition=undefined;this.h=o(this.host)}validateIconPosition(t){a(r,t,n.root)}componentWillLoad(){this.validateIconPosition(this.iconPosition)}render(){return i(e,{class:this.h.classes(n.root)},i("article",null,this.h.hasSlot("icon")&&i("span",{class:n.icon},i("slot",{name:"icon"})),i("p",{class:n.number},i("slot",null)),this.h.hasSlot("text")&&i("div",{class:n.text},i("slot",{name:"text"}))))}get host(){return s(this)}static get watchers(){return{iconPosition:["validateIconPosition"]}}};g.style=m;export{g as gov_statsbar_item};
|
|
2
|
+
//# sourceMappingURL=p-c81d62db.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BackdropClass","root","bg","govBackdropCss","GovBackdrop","constructor","hostRef","this","h","govHost","host","componentDidRender","canValidateWcagOnRender","delay","validateWcag","render","Host","class","classes","role","wcagLabel","wcagLabelledBy","onClick","e","govClick","emit","validateWcagLabel"],"sources":["../../../packages/core/src/components/gov-backdrop/constants.ts","../../../packages/core/src/components/gov-backdrop/gov-backdrop.scss?tag=gov-backdrop","../../../packages/core/src/components/gov-backdrop/gov-backdrop.tsx"],"sourcesContent":["export const BackdropClass = {\n\troot: 'gov-backdrop',\n\tbg: 'gov-backdrop__bg',\n}\n","/*\n * Backdrop\n */\n\n$class: \".gov-backdrop\";\n\n#{$class} {\n\t&__bg {\n\t\t@include z-index(\"modal\", 0);\n\t\tposition: fixed;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tbackground-color: $backdrop-bg;\n\t\topacity: $backdrop-opacity;\n\t}\n\n\t// VARIANTS\n\t@include parameter(\"inverse\") {\n\t\t#{$class} {\n\t\t\t&__bg {\n\t\t\t\tbackground-color: $backdrop-bg-inverse;\n\t\t\t\topacity: $backdrop-opacity-inverse;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Event, EventEmitter, h, Method, Prop, Host, Element } from '@stencil/core'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { BackdropClass } from './constants'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-backdrop',\n\tstyleUrl: 'gov-backdrop.scss',\n})\nexport class GovBackdrop {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovAlertElement\n\t/**\n\t *
|
|
1
|
+
{"version":3,"names":["BackdropClass","root","bg","govBackdropCss","GovBackdrop","constructor","hostRef","this","h","govHost","host","componentDidRender","canValidateWcagOnRender","delay","validateWcag","render","Host","class","classes","role","wcagLabel","wcagLabelledBy","onClick","e","govClick","emit","validateWcagLabel"],"sources":["../../../packages/core/src/components/gov-backdrop/constants.ts","../../../packages/core/src/components/gov-backdrop/gov-backdrop.scss?tag=gov-backdrop","../../../packages/core/src/components/gov-backdrop/gov-backdrop.tsx"],"sourcesContent":["export const BackdropClass = {\n\troot: 'gov-backdrop',\n\tbg: 'gov-backdrop__bg',\n}\n","/*\n * Backdrop\n */\n\n$class: \".gov-backdrop\";\n\n#{$class} {\n\t&__bg {\n\t\t@include z-index(\"modal\", 0);\n\t\tposition: fixed;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tbackground-color: $backdrop-bg;\n\t\topacity: $backdrop-opacity;\n\t}\n\n\t// VARIANTS\n\t@include parameter(\"inverse\") {\n\t\t#{$class} {\n\t\t\t&__bg {\n\t\t\t\tbackground-color: $backdrop-bg-inverse;\n\t\t\t\topacity: $backdrop-opacity-inverse;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Event, EventEmitter, h, Method, Prop, Host, Element } from '@stencil/core'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { BackdropClass } from './constants'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-backdrop',\n\tstyleUrl: 'gov-backdrop.scss',\n})\nexport class GovBackdrop {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovAlertElement\n\t/**\n\t * Determine if component should have inverse colors to be used on dark background.\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Adds accessible label for the backdrop that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when button clicks.\n\t */\n\t@Event({ eventName: 'gov-click' }) govClick: EventEmitter<MouseEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BackdropClass.root)}>\n\t\t\t\t<div\n\t\t\t\t\trole={'button'}\n\t\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\tonClick={e => this.govClick.emit(e)}\n\t\t\t\t\tclass={BackdropClass.bg}\n\t\t\t\t></div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, BackdropClass.root)\n\t}\n}\n"],"mappings":"2PAAO,MAAMA,EAAgB,CAC5BC,KAAM,eACNC,GAAI,oBCFL,MAAMC,EAAiB,oxB,MCYVC,EAAW,MAGvB,WAAAC,CAAAC,G,2DAQoC,M,uDAPnCC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAqBvB,wBAAMC,GACL,GAAIC,IAA2B,OACxBC,EAAM,WACNN,KAAKO,c,EAIb,MAAAC,GACC,OACCP,EAACQ,EAAI,CAACC,MAAOV,KAAKC,EAAEU,QAAQlB,EAAcC,OACzCO,EAAA,OACCW,KAAM,SAAQ,aACFZ,KAAKa,UAAS,kBACTb,KAAKc,eACtBC,QAASC,GAAKhB,KAAKiB,SAASC,KAAKF,GACjCN,MAAOjB,EAAcE,K,CAUzB,kBAAMY,GACLY,EAAkBnB,KAAKa,UAAWb,KAAKc,eAAgBrB,EAAcC,K"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as a,h as r,H as o,g as t}from"./p-10cbc3fe.js";import{v as i}from"./p-26acf964.js";import{S as s,a as n,b as e,c as v}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as a,h as r,H as o,g as t}from"./p-10cbc3fe.js";import{v as i}from"./p-26acf964.js";import{S as s,a as n,b as e,c as v}from"./p-17ebfe85.js";import{g as c}from"./p-3f37ddb6.js";import"./p-561fa17b.js";import"./p-03990da5.js";import"./p-ff7365ae.js";const d='.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-statsbar{position:relative;display:block;width:100%;padding:1.25rem 0}.gov-statsbar__section{display:block;width:100%;max-width:calc(var(--gov-container-width, 73.75rem) + 2 * var(--gov-container-padding, 2.5rem));margin-right:auto;margin-left:auto;padding-right:var(--gov-container-padding-mobile, 1.25rem);padding-left:var(--gov-container-padding-mobile, 1.25rem)}@media (min-width: 48em){.gov-statsbar__section{padding-right:var(--gov-container-padding, 2.5rem);padding-left:var(--gov-container-padding, 2.5rem)}}.gov-statsbar[variant=primary]{background-color:var(--gov-statsbar-primary-bg-color, var(--gov-color-primary-200));color:var(--gov-statsbar-primary-text-color, var(--gov-color-primary))}.gov-statsbar[variant=primary][inverse=""],.gov-statsbar[variant=primary][inverse=true i],.gov-statsbar[variant=primary][inverse="1"]{background:var(--gov-color-neutral-white);color:var(--gov-statsbar-primary-text-color-inverse, var(--gov-color-primary))}.gov-statsbar[variant=secondary]{background-color:var(--gov-statsbar-secondary-bg-color, var(--gov-color-secondary));color:var(--gov-statsbar-secondary-text-color, var(--gov-color-neutral-white))}.gov-statsbar[variant=secondary][inverse=""],.gov-statsbar[variant=secondary][inverse=true i],.gov-statsbar[variant=secondary][inverse="1"]{background:var(--gov-color-neutral-white);color:var(--gov-statsbar-secondary-text-color-inverse, var(--gov-color-secondary))}@media (min-width: 30em){.gov-statsbar__section{display:flex;flex-wrap:wrap;justify-content:center}}@media (min-width: 48em){.gov-statsbar{padding:0}}';const g=class{constructor(r){a(this,r);this.iconPosition=undefined;this.variant=s.PRIMARY;this.h=c(this.host)}validateIconPosition(a){i(v,a,e.root)}validateVariant(a){i(s,a,e.root)}componentWillLoad(){this.validateIconPosition(this.iconPosition);this.validateVariant(this.variant)}componentDidLoad(){this.host.querySelectorAll(n.root).forEach((a=>{if(this.iconPosition==="left"){a.setAttribute("icon-position","left")}}))}render(){return r(o,{class:this.h.classes(e.root),variant:this.variant},r("section",{class:e.section},r("slot",null)))}get host(){return t(this)}static get watchers(){return{iconPosition:["validateIconPosition"],variant:["validateVariant"]}}};g.style=d;export{g as gov_statsbar};
|
|
2
|
+
//# sourceMappingURL=p-e1780dba.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["govStatsbarCss","GovStatsbar","constructor","hostRef","StatsBarVariants","PRIMARY","this","h","govHost","host","validateIconPosition","newValue","validateProp","StatsBarIconPosition","StatsBarClass","root","validateVariant","componentWillLoad","iconPosition","variant","componentDidLoad","querySelectorAll","StatsBarItemClass","forEach","node","setAttribute","render","Host","class","classes","section"],"sources":["../../../packages/core/src/components/gov-statsbar/gov-statsbar.scss?tag=gov-statsbar","../../../packages/core/src/components/gov-statsbar/gov-statsbar.tsx"],"sourcesContent":["/*\n * Statsbar\n */\n\n$class: \".gov-statsbar\";\n\n#{$class} {\n\t@include base();\n\tpadding: rem-calc(20) 0;\n\t&__section {\n\t\t@include container();\n\t}\n\n\t// VARIANTS\n\t@each $variant, $definitions in $statsbar-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\tbackground-color: #{get(\"bg-color\", $definitions)};\n\t\t\tcolor: #{get(\"text-color\", $definitions)};\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\tbackground: color(\"neutral.white\");\n\t\t\t\tcolor: #{get(\"text-color-inverse\", $definitions)};\n\t\t\t}\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&__section {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tjustify-content: center;\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\tpadding: 0;\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport {\n\tStatsBarClass,\n\tStatsBarIconPosition,\n\tStatsBarIconPositionType,\n\tStatsBarItemClass,\n\tStatsBarVariants,\n\tStatsBarVariantType,\n} from \"./constants\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { govHost } from \"../../helpers/Dom/template\"\n\n@Component({\n\ttag: \"gov-statsbar\",\n\tstyleUrl: \"gov-statsbar.scss\",\n})\nexport class GovStatsbar {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovStatsbarElement\n\n\t/**\n\t * Icon’s position\n\t */\n\t@Prop({ attribute: \"icon-position\" }) readonly iconPosition?: StatsBarIconPositionType\n\t/**\n\t * Style variation\n\t */\n\t@Prop({ attribute: \"variant\" }) readonly variant?: StatsBarVariantType = StatsBarVariants.PRIMARY\n\n\t@Watch(\"iconPosition\")\n\tvalidateIconPosition(newValue: string): void {\n\t\tvalidateProp(StatsBarIconPosition, newValue, StatsBarClass.root)\n\t}\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(StatsBarVariants, newValue, StatsBarClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateIconPosition(this.iconPosition)\n\t\tthis.validateVariant(this.variant)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.host.querySelectorAll(StatsBarItemClass.root).forEach((node: any) => {\n\t\t\tif (this.iconPosition === \"left\") {\n\t\t\t\tnode.setAttribute(\"icon-position\", \"left\")\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(StatsBarClass.root)} variant={this.variant}>\n\t\t\t\t<section class={StatsBarClass.section}>\n\t\t\t\t\t<slot />\n\t\t\t\t</section>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"kQAAA,MAAMA,EAAiB,83D,MCiBVC,EAAW,MAGvB,WAAAC,CAAAC,G,mDAayEC,EAAiBC,QAZzFC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAevB,oBAAAC,CAAqBC,GACpBC,EAAaC,EAAsBF,EAAUG,EAAcC,K,CAI5D,eAAAC,CAAgBL,GACfC,EAAaR,EAAkBO,EAAUG,EAAcC,K,CAGxD,iBAAAE,GACCX,KAAKI,qBAAqBJ,KAAKY,cAC/BZ,KAAKU,gBAAgBV,KAAKa,Q,CAG3B,gBAAAC,GACCd,KAAKG,KAAKY,iBAAiBC,EAAkBP,MAAMQ,SAASC,IAC3D,GAAIlB,KAAKY,eAAiB,OAAQ,CACjCM,EAAKC,aAAa,gBAAiB,O,KAKtC,MAAAC,GACC,OACCnB,EAACoB,EAAI,CAACC,MAAOtB,KAAKC,EAAEsB,QAAQf,EAAcC,MAAOI,QAASb,KAAKa,SAC9DZ,EAAA,WAASqB,MAAOd,EAAcgB,SAC7BvB,EAAA,c"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as o,h as r,H as a,g as t}from"./p-10cbc3fe.js";import{p as i}from"./p-03990da5.js";import{S as s}from"./p-55500e5a.js";import{g as p}from"./p-3f37ddb6.js";import{v as e}from"./p-26acf964.js";import"./p-561fa17b.js";const n=i(s,["_2XS","_XS","_S","_M","_L"]);var g;(function(o){o["HORIZONTAL"]="horizontal";o["VERTICAL"]="vertical"})(g||(g={}));const m={root:"gov-form-group"};const f='.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-form-group{position:relative;display:flex;width:100%;flex-direction:column;align-items:flex-start}.gov-form-group .gov-form-label__label{margin:0}.gov-form-group[gap="2xs"]{gap:0.25rem}.gov-form-group[gap=xs]{gap:0.5rem}.gov-form-group[gap=s]{gap:0.75rem}.gov-form-group[gap=m]{gap:1rem}.gov-form-group[gap=l]{gap:1.25rem}.gov-form-group[orientation=horizontal]{flex-direction:row;flex-wrap:wrap}.gov-form-group[orientation=horizontal] .gov-form-label__label{white-space:nowrap}';const l=class{constructor(r){o(this,r);this.gap=undefined;this.orientation="vertical";this.h=p(this.host)}validateGap(o){e(n,o,m.root)}componentWillLoad(){this.validateGap(this.gap)}render(){return r(a,{gap:this.gap,class:this.h.classes(m.root)},r("slot",null))}get host(){return t(this)}static get watchers(){return{gap:["validateGap"]}}};l.style=f;export{l as gov_form_group};
|
|
2
|
+
//# sourceMappingURL=p-e39cd83c.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FormGroupSizes","pick","Sizes","FormGroupOrientation","FormGroupClass","root","govFormGroupCss","GovFormGroup","constructor","hostRef","undefined","this","h","govHost","host","validateGap","newValue","validateProp","componentWillLoad","gap","render","Host","class","classes"],"sources":["../../../packages/core/src/components/gov-form/group/constants.ts","../../../packages/core/src/components/gov-form/group/gov-form-group.scss?tag=gov-form-group","../../../packages/core/src/components/gov-form/group/gov-form-group.tsx"],"sourcesContent":["import { pick } from \"../../../utils/utils\"\nimport { Sizes } from \"../../../core/constants/sizes\"\nimport { ValueOf } from \"../../../types/interfaces\"\n\nexport const FormGroupSizes = pick(Sizes, ['_2XS', '_XS', '_S', '_M', '_L'])\nexport type FormGroupSizesType = `${ValueOf<typeof FormGroupSizes>}`\n\nexport enum FormGroupOrientation {\n\tHORIZONTAL = 'horizontal',\n\tVERTICAL = 'vertical',\n}\nexport type FormGroupOrientationType = `${ValueOf<typeof FormGroupOrientation>}`\n\nexport const FormGroupClass = {\n\troot: 'gov-form-group',\n}\n","$class: \".gov-form-group\";\n\n#{$class} {\n\t@include base(flex);\n\tflex-direction: column;\n\talign-items: flex-start;\n\t.gov-form-label__label {\n\t\tmargin: 0;\n\t}\n\n\t// VARIANTS\n\t@each $gap, $definitions in $form-group-gaps {\n\t\t&[gap=\"#{$gap}\"] {\n\t\t\tgap: get($gap, $sizes);\n\t\t}\n\t}\n\n\t&[orientation=\"horizontal\"] {\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\t.gov-form-label__label {\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { FormGroupClass, FormGroupSizes, FormGroupSizesType, FormGroupOrientationType } from \"./constants\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { govHost } from \"../../../helpers/Dom/template\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\n\n@Component({\n\ttag: \"gov-form-group\",\n\tstyleUrl: \"gov-form-group.scss\",\n})\nexport class GovFormGroup {\n\tprivate readonly h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovFormGroupElement\n\t/**\n\t * Gap's size.\n\t */\n\t@Prop() readonly gap?: FormGroupSizesType = undefined\n\t/**\n\t * Elements orientation\n\t */\n\t@Prop() readonly orientation?: FormGroupOrientationType = 'vertical'\n\n\t@Watch(\"gap\")\n\tvalidateGap(newValue: string): void {\n\t\tvalidateProp(FormGroupSizes, newValue, FormGroupClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateGap(this.gap)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host gap={this.gap} class={this.h.classes(FormGroupClass.root)}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"iOAIO,MAAMA,EAAiBC,EAAKC,EAAO,CAAC,OAAQ,MAAO,KAAM,KAAM,OAGtE,IAAYC,GAAZ,SAAYA,GACXA,EAAA,2BACAA,EAAA,sBACA,EAHD,CAAYA,MAAoB,KAMzB,MAAMC,EAAiB,CAC7BC,KAAM,kBCdP,MAAMC,EAAkB,4zB,MCUXC,EAAY,MAGxB,WAAAC,CAAAC,G,mBAQ4CC,U,iBAIc,WAXzDC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAcvB,WAAAC,CAAYC,GACXC,EAAajB,EAAgBgB,EAAUZ,EAAeC,K,CAGvD,iBAAAa,GACCP,KAAKI,YAAYJ,KAAKQ,I,CAGvB,MAAAC,GACC,OACCR,EAACS,EAAI,CAACF,IAAKR,KAAKQ,IAAKG,MAAOX,KAAKC,EAAEW,QAAQnB,EAAeC,OACzDO,EAAA,a"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["govPromptCss","GovPrompt","constructor","hostRef","this","h","govHost","host","labelId","createID","contentId","validateLabelTag","newValue","validTags","includes","govErrorLog","ModalClass","root","watchOpen","open","showModal","document","body","classList","add","bodyFix","hideModal","remove","componentWillRender","componentDidRender","canValidateWcagOnRender","delay","validateWcag","render","LabelTag","labelTag","Host","class","classes","rootPrompt","dialog","hidden","tabindex","toBoolAttr","wcagLabelledBy","wcagDescribedBy","role","inner","header","hasSlot","icon","name","label","title","id","close","variant","wcagLabel","wcagCloseLabel","wcagCloseLabelledBy","type","onCloseHandler","bind","content","actions","e","stopPropagation","govClose","emit","show","hide","validateWcagRef"],"sources":["../../../packages/core/src/components/gov-promp/gov-prompt.scss?tag=gov-prompt","../../../packages/core/src/components/gov-promp/gov-prompt.tsx"],"sourcesContent":["/*\n * Prompt\n */\n\n// $class: \".gov-prompt\";\n@import \"../gov-modal/gov-modal.scss\";\n\n// #{$class} {\n// \t//\n// }\n","import { Component,
|
|
1
|
+
{"version":3,"names":["govPromptCss","GovPrompt","constructor","hostRef","this","h","govHost","host","labelId","createID","contentId","validateLabelTag","newValue","validTags","includes","govErrorLog","ModalClass","root","watchOpen","open","showModal","document","body","classList","add","bodyFix","hideModal","remove","componentWillRender","componentDidRender","canValidateWcagOnRender","delay","validateWcag","render","LabelTag","labelTag","Host","class","classes","rootPrompt","dialog","hidden","tabindex","toBoolAttr","wcagLabelledBy","wcagDescribedBy","role","inner","header","hasSlot","icon","name","label","title","id","close","variant","wcagLabel","wcagCloseLabel","wcagCloseLabelledBy","type","onCloseHandler","bind","content","actions","e","stopPropagation","govClose","emit","show","hide","validateWcagRef"],"sources":["../../../packages/core/src/components/gov-promp/gov-prompt.scss?tag=gov-prompt","../../../packages/core/src/components/gov-promp/gov-prompt.tsx"],"sourcesContent":["/*\n * Prompt\n */\n\n// $class: \".gov-prompt\";\n@import \"../gov-modal/gov-modal.scss\";\n\n// #{$class} {\n// \t//\n// }\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { createID } from \"../../utils/string.utils\"\nimport { validateWcagRef } from \"../../helpers/Validate/wcag\"\nimport { ModalClass } from \"../gov-modal/constants\"\nimport { canValidateWcagOnRender } from \"../../helpers/Dom/win\"\nimport { delay } from \"../../utils/utils\"\nimport { govHost, toBoolAttr } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { govErrorLog } from \"../../helpers/Log/gov.log\"\nimport { Nullable } from \"../../types/interfaces\"\n\n@Component({\n\ttag: \"gov-prompt\",\n\tstyleUrl: \"gov-prompt.scss\",\n})\nexport class GovPrompt {\n\tprivate h: GovHost\n\tprivate readonly labelId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.labelId = createID(\"GovPromptLabel\")\n\t\tthis.contentId = createID(\"GovPromptContent\")\n\t}\n\n\t@Element() host: HTMLGovPromptElement\n\t/**\n\t * Attribute for modal window display\n\t */\n\t@Prop({ mutable: true }) open = false\n\t/**\n\t * Title of modal window\n\t */\n\t@Prop() label: string\n\t/**\n\t * Role of modal\n\t */\n\t@Prop({ attribute: \"role\" }) role: Nullable<string> = \"dialog\"\n\t/**\n\t * Used to change the HTML tag in the modal label for correct semantic structure\n\t */\n\t@Prop({ attribute: \"label-tag\" }) readonly labelTag: string = \"h2\"\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the modal.\n\t */\n\t@Prop({ attribute: \"wcag-described-by\" }) wcagDescribedBy: string\n\t/**\n\t * Adds accessible label for the modal close button that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: \"wcag-close-label\" }) wcagCloseLabel: string\n\t/**\n\t * A string of identifiers that indicate alternative label elements for closing the modal window\n\t */\n\t@Prop({ attribute: \"wcag-close-labelled-by\" }) wcagCloseLabelledBy: string\n\t/**\n\t * Emitted when modal window closes.\n\t */\n\t@Event({ eventName: \"gov-close\" }) govClose: EventEmitter<PointerEvent>\n\n\t@Watch(\"labelTag\")\n\tvalidateLabelTag(newValue: string): void {\n\t\tconst validTags = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"]\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${ModalClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch(\"open\")\n\twatchOpen(newValue: boolean): void {\n\t\tthis.open = newValue\n\t}\n\n\tprivate showModal() {\n\t\tthis.open = true\n\t\tdocument.body.classList.add(ModalClass.bodyFix)\n\t}\n\n\tprivate hideModal() {\n\t\tthis.open = false\n\t\tdocument.body.classList.remove(ModalClass.bodyFix)\n\t}\n\n\tasync componentWillRender() {\n\t\tif (this.open) {\n\t\t\tthis.showModal()\n\t\t} else {\n\t\t\tthis.hideModal()\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\tconst LabelTag = this.labelTag\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ModalClass.rootPrompt)} open={this.open}>\n\t\t\t\t<dialog\n\t\t\t\t\tclass={ModalClass.dialog}\n\t\t\t\t\thidden={!this.open}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\topen={this.open}\n\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\taria-hidden={toBoolAttr(!this.open)}\n\t\t\t\t\taria-labelledby={this.wcagLabelledBy || this.labelId}\n\t\t\t\t\taria-describedby={this.wcagDescribedBy || this.contentId}\n\t\t\t\t\trole={this.role}\n\t\t\t\t>\n\t\t\t\t\t<div class={ModalClass.inner}>\n\t\t\t\t\t\t<div class={ModalClass.header}>\n\t\t\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t\t\t<div class={ModalClass.icon}>\n\t\t\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{this.label && (\n\t\t\t\t\t\t\t\t<LabelTag class={ModalClass.title} id={this.labelId}>\n\t\t\t\t\t\t\t\t\t{this.label}\n\t\t\t\t\t\t\t\t</LabelTag>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\tclass={ModalClass.close}\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\twcagLabel={this.wcagCloseLabel}\n\t\t\t\t\t\t\t\twcagLabelledBy={this.wcagCloseLabelledBy}\n\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<gov-icon name=\"x-lg\" />\n\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={ModalClass.content} id={this.contentId}>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={ModalClass.actions}>\n\t\t\t\t\t\t\t<slot name=\"actions\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</dialog>\n\n\t\t\t\t{this.open ? (\n\t\t\t\t\t<gov-backdrop\n\t\t\t\t\t\twcag-label={this.wcagCloseLabel}\n\t\t\t\t\t\twcag-labelled-by={this.wcagCloseLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t\tthis.hideModal()\n\t\tthis.govClose.emit(e)\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showModal()\n\t}\n\n\t/**\n\t * Hiding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.hideModal()\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", ModalClass.root)\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"wcag-described-by\", ModalClass.root)\n\t}\n}\n"],"mappings":"mUAAA,MAAMA,EAAe,k8F,MCeRC,EAAS,MAKrB,WAAAC,CAAAC,G,wDAUgC,M,+BAQsB,S,cAIQ,K,8HArB7DC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,QAAUC,EAAS,kBACxBL,KAAKM,UAAYD,EAAS,mB,CA0C3B,gBAAAE,CAAiBC,GAChB,MAAMC,EAAY,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,MACjD,GAAID,EAAU,CACb,IAAKC,EAAUC,SAASF,GAAW,CAClCG,EAAY,IAAIC,EAAWC,cAAcL,oB,GAM5C,SAAAM,CAAUN,GACTR,KAAKe,KAAOP,C,CAGL,SAAAQ,GACPhB,KAAKe,KAAO,KACZE,SAASC,KAAKC,UAAUC,IAAIR,EAAWS,Q,CAGhC,SAAAC,GACPtB,KAAKe,KAAO,MACZE,SAASC,KAAKC,UAAUI,OAAOX,EAAWS,Q,CAG3C,yBAAMG,GACL,GAAIxB,KAAKe,KAAM,CACdf,KAAKgB,W,KACC,CACNhB,KAAKsB,W,EAIP,wBAAMG,GACL,GAAIC,IAA2B,OACxBC,EAAM,WACN3B,KAAK4B,c,EAIb,MAAAC,GACC,MAAMC,EAAW9B,KAAK+B,SACtB,OACC9B,EAAC+B,EAAI,CAACC,MAAOjC,KAAKC,EAAEiC,QAAQtB,EAAWuB,YAAapB,KAAMf,KAAKe,MAC9Dd,EAAA,UACCgC,MAAOrB,EAAWwB,OAClBC,QAASrC,KAAKe,KACduB,SAAS,KACTvB,KAAMf,KAAKe,KAAI,aACJ,OAAM,cACJwB,GAAYvC,KAAKe,MAAK,kBAClBf,KAAKwC,gBAAkBxC,KAAKI,QAAO,mBAClCJ,KAAKyC,iBAAmBzC,KAAKM,UAC/CoC,KAAM1C,KAAK0C,MAEXzC,EAAA,OAAKgC,MAAOrB,EAAW+B,OACtB1C,EAAA,OAAKgC,MAAOrB,EAAWgC,QACrB5C,KAAKC,EAAE4C,QAAQ,SACf5C,EAAA,OAAKgC,MAAOrB,EAAWkC,MACtB7C,EAAA,QAAM8C,KAAK,UAGZ/C,KAAKgD,OACL/C,EAAC6B,EAAQ,CAACG,MAAOrB,EAAWqC,MAAOC,GAAIlD,KAAKI,SAC1CJ,KAAKgD,OAGR/C,EAAA,cACCgC,MAAOrB,EAAWuC,MAClBC,QAAQ,UACRC,UAAWrD,KAAKsD,eAChBd,eAAgBxC,KAAKuD,oBACrBC,KAAK,OAAM,eACGxD,KAAKyD,eAAeC,KAAK1D,OAEvCC,EAAA,YAAU8C,KAAK,WAGjB9C,EAAA,OAAKgC,MAAOrB,EAAW+C,QAAST,GAAIlD,KAAKM,WACxCL,EAAA,cAEDA,EAAA,OAAKgC,MAAOrB,EAAWgD,SACtB3D,EAAA,QAAM8C,KAAK,eAKb/C,KAAKe,KACLd,EAAA,6BACaD,KAAKsD,eAAc,mBACbtD,KAAKuD,oBAAmB,eAC5BvD,KAAKyD,eAAeC,KAAK1D,QAErC,K,CAKC,cAAAyD,CAAeI,GACtBA,EAAEC,kBACF9D,KAAKsB,YACLtB,KAAK+D,SAASC,KAAKH,E,CAOpB,UAAMI,GACLjE,KAAKgB,W,CAON,UAAMkD,GACLlE,KAAKsB,W,CAON,kBAAMM,GACLuC,EAAgBnE,KAAKwC,eAAgB,mBAAoB5B,EAAWC,MACpEsD,EAAgBnE,KAAKyC,gBAAiB,oBAAqB7B,EAAWC,K"}
|
|
@@ -17,6 +17,6 @@ const StatsBarItemClass = {
|
|
|
17
17
|
text: 'gov-statsbar-item__text',
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
export {
|
|
20
|
+
export { StatsBarVariants as S, StatsBarItemClass as a, StatsBarClass as b, StatsBarIconPosition as c };
|
|
21
21
|
|
|
22
|
-
//# sourceMappingURL=constants-
|
|
22
|
+
//# sourceMappingURL=constants-27b48cd1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"constants-
|
|
1
|
+
{"file":"constants-27b48cd1.js","mappings":";;;IAIY;AAAZ,WAAY,oBAAoB;EAC/B,qCAAa,CAAA;AACd,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,QAE/B;MAGY,gBAAgB,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,EAAC;MAG3D,aAAa,GAAG;EAC5B,IAAI,EAAE,cAAc;EACpB,OAAO,EAAE,uBAAuB;EAChC;MAEY,iBAAiB,GAAG;EAChC,IAAI,EAAE,mBAAmB;EACzB,IAAI,EAAE,yBAAyB;EAC/B,MAAM,EAAE,2BAA2B;EACnC,IAAI,EAAE,yBAAyB;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-statsbar/constants.tsx"],"sourcesContent":["import { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils'\nimport { Variants } from '../../core/constants/variants'\n\nexport enum StatsBarIconPosition {\n\tLEFT = 'left',\n}\nexport type StatsBarIconPositionType = `${ValueOf<typeof StatsBarIconPosition>}`\n\nexport const StatsBarVariants = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type StatsBarVariantType = `${ValueOf<typeof StatsBarVariants>}`\n\nexport const StatsBarClass = {\n\troot: 'gov-statsbar',\n\tsection: 'gov-statsbar__section',\n}\n\nexport const StatsBarItemClass = {\n\troot: 'gov-statsbar-item',\n\ticon: 'gov-statsbar-item__icon',\n\tnumber: 'gov-statsbar-item__number',\n\ttext: 'gov-statsbar-item__text',\n}\n"],"version":3}
|
|
@@ -16,10 +16,10 @@ const AccordionItemClass = {
|
|
|
16
16
|
title: 'gov-accordion-item__title',
|
|
17
17
|
label: 'gov-accordion-item__label',
|
|
18
18
|
name: 'gov-accordion-item__name',
|
|
19
|
-
|
|
19
|
+
annotation: 'gov-accordion-item__annotation',
|
|
20
20
|
content: 'gov-accordion-item__content',
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
export { AccordionItemClass as A, AccordionClass as a, AccordionSizes as b, AccordionVariants as c };
|
|
24
24
|
|
|
25
|
-
//# sourceMappingURL=constants-
|
|
25
|
+
//# sourceMappingURL=constants-858966b9.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"constants-
|
|
1
|
+
{"file":"constants-858966b9.js","mappings":";;;;MAKa,cAAc,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAC;MAGvD,iBAAiB,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAC;MAGtE,cAAc,GAAG;EAC7B,IAAI,EAAE,eAAe;EACrB;MAEY,kBAAkB,GAAG;EACjC,IAAI,EAAE,oBAAoB;EAC1B,MAAM,EAAE,4BAA4B;EACpC,KAAK,EAAE,2BAA2B;EAClC,IAAI,EAAE,0BAA0B;EAChC,MAAM,EAAE,4BAA4B;EACpC,KAAK,EAAE,2BAA2B;EAClC,KAAK,EAAE,2BAA2B;EAClC,IAAI,EAAE,0BAA0B;EAChC,UAAU,EAAE,gCAAgC;EAC5C,OAAO,EAAE,6BAA6B;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-accordion/constants.ts"],"sourcesContent":["import { Sizes } from '../../core/constants/sizes'\nimport { Variants } from '../../core/constants/variants'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const AccordionSizes = pick(Sizes, ['_XS', '_S', '_M', '_L'])\nexport type AccordionSizeType = `${ValueOf<typeof AccordionSizes>}`\n\nexport const AccordionVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'CUSTOM'])\nexport type AccordionVariantType = `${ValueOf<typeof AccordionVariants>}`\n\nexport const AccordionClass = {\n\troot: 'gov-accordion',\n}\n\nexport const AccordionItemClass = {\n\troot: 'gov-accordion-item',\n\theader: 'gov-accordion-item__header',\n\tarrow: 'gov-accordion-item__arrow',\n\ticon: 'gov-accordion-item__icon',\n\tsuffix: 'gov-accordion-item__suffix',\n\ttitle: 'gov-accordion-item__title',\n\tlabel: 'gov-accordion-item__label',\n\tname: 'gov-accordion-item__name',\n\tannotation: 'gov-accordion-item__annotation',\n\tcontent: 'gov-accordion-item__content',\n}\n"],"version":3}
|
|
@@ -28,6 +28,6 @@ const ButtonClass = {
|
|
|
28
28
|
rootWithIcon: 'gov-button--w-icon',
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
export { ButtonClass as B, NativeType as N, Type as T,
|
|
31
|
+
export { ButtonClass as B, NativeType as N, Type as T, ButtonSizes as a, ButtonVariants as b };
|
|
32
32
|
|
|
33
|
-
//# sourceMappingURL=constants-
|
|
33
|
+
//# sourceMappingURL=constants-ba92640d.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"constants-
|
|
1
|
+
{"file":"constants-ba92640d.js","mappings":";;;;MAKa,WAAW,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAC;MAG3D,cAAc,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,EAAC;IAGzF;AAAZ,WAAY,IAAI;EACf,uBAAe,CAAA;EACf,6BAAqB,CAAA;EACrB,qBAAa,CAAA;EACb,qBAAa,CAAA;AACd,CAAC,EALW,IAAI,KAAJ,IAAI,QAKf;IAIW;AAAZ,WAAY,UAAU;EACrB,+BAAiB,CAAA;EACjB,+BAAiB,CAAA;EACjB,6BAAe,CAAA;AAChB,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AAID,IAAY,YAIX;AAJD,WAAY,YAAY;EACvB,gCAAgB,CAAA;EAChB,8BAAc,CAAA;EACd,4BAAY,CAAA;AACb,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;MAGY,WAAW,GAAG;EAC1B,IAAI,EAAE,YAAY;EAClB,YAAY,EAAE,oBAAoB;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-button/default/constants.ts"],"sourcesContent":["import { Sizes } from '../../../core/constants/sizes'\nimport { Variants } from '../../../core/constants/variants'\nimport { ValueOf } from '../../../types/interfaces'\nimport { pick } from '../../../utils/utils'\n\nexport const ButtonSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL'])\nexport type ButtonSizesType = `${ValueOf<typeof ButtonSizes>}`\n\nexport const ButtonVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'SUCCESS', 'ERROR', 'WARNING'])\nexport type ButtonVariantType = `${ValueOf<typeof ButtonVariants>}`\n\nexport enum Type {\n\tSOLID = 'solid',\n\tOUTLINED = 'outlined',\n\tBASE = 'base',\n\tLINK = 'link',\n}\n\nexport type TypesType = `${ValueOf<typeof Type>}`\n\nexport enum NativeType {\n\tSUBMIT = 'submit',\n\tBUTTON = 'button',\n\tRESET = 'reset',\n}\n\nexport type NativeTypesType = `${ValueOf<typeof NativeType>}`\n\nexport enum ButtonTarget {\n\tBLANK = '_blank',\n\tSELF = '_self',\n\tNEW = '_new',\n}\nexport type ButtonTargetType = `${ValueOf<typeof ButtonTarget>}`\n\nexport const ButtonClass = {\n\troot: 'gov-button',\n\trootWithIcon: 'gov-button--w-icon',\n}\n"],"version":3}
|
package/dist/esm/core.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchBrowser = () => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
|
-
return bootstrapLazy(JSON.parse("[[\"gov-form-file\",[[4,\"gov-form-file\",{\"expanded\":[4],\"required\":[4],\"disabled\":[4],\"displayAttachments\":[4,\"display-attachments\"],\"name\":[1],\"accept\":[1],\"multiple\":[4],\"maxFileSize\":[2,\"max-file-size\"],\"identifier\":[1],\"invalid\":[4],\"errorSize\":[1,\"error-size\"],\"errorAccept\":[1,\"error-accept\"],\"attachmentsLabel\":[1,\"attachments-label\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagRemoveLabel\":[1,\"wcag-remove-label\"],\"wcagAttachmentsLabel\":[1,\"wcag-attachments-label\"],\"files\":[32],\"getRef\":[64],\"getAreaRef\":[64],\"validateWcag\":[64]}]]],[\"gov-form-multi-select\",[[4,\"gov-form-multi-select\",{\"identifier\":[1],\"placeholder\":[1],\"variant\":[1],\"size\":[1],\"name\":[1],\"required\":[4],\"disabled\":[4],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"value\":[32],\"selectedOptions\":[32],\"setFocus\":[64],\"setValue\":[64],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-modal\",[[4,\"gov-modal\",{\"open\":[1028],\"label\":[1],\"role\":[1],\"labelTag\":[1,\"label-tag\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagCloseLabelledBy\":[1,\"wcag-close-labelled-by\"],\"show\":[64],\"hide\":[64],\"validateWcag\":[64]}]]],[\"gov-pagination\",[[0,\"gov-pagination\",{\"type\":[1],\"current\":[2],\"total\":[2],\"inverse\":[4],\"size\":[1],\"variant\":[1],\"pageSize\":[2,\"page-size\"],\"maxPages\":[2,\"max-pages\"],\"link\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagSelectLabel\":[1,\"wcag-select-label\"],\"wcagPageLabel\":[1,\"wcag-page-label\"],\"pagination\":[32],\"validateWcag\":[64]}]]],[\"gov-prompt\",[[4,\"gov-prompt\",{\"open\":[1028],\"label\":[1],\"role\":[1],\"labelTag\":[1,\"label-tag\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagCloseLabelledBy\":[1,\"wcag-close-labelled-by\"],\"show\":[64],\"hide\":[64],\"validateWcag\":[64]}]]],[\"gov-tabs\",[[4,\"gov-tabs\",{\"type\":[1],\"variant\":[1],\"orientation\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagSelectLabel\":[1,\"wcag-select-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"controller\":[32],\"focusIndex\":[32],\"compactControls\":[32],\"refresh\":[64],\"currentTab\":[64],\"setActiveTab\":[64],\"validateWcag\":[64]}]]],[\"gov-alert\",[[4,\"gov-alert\",{\"headline\":[1],\"variant\":[1],\"inverse\":[4],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagToggleLabel\":[1,\"wcag-toggle-label\"],\"closable\":[4],\"toggleContent\":[32],\"validateWcag\":[64]}]]],[\"gov-loading\",[[4,\"gov-loading\",{\"loading\":[4]}]]],[\"gov-side-nav-item\",[[4,\"gov-side-nav-item\",{\"inverse\":[4],\"compact\":[4],\"identifier\":[1],\"count\":[4],\"label\":[1],\"disabled\":[4],\"href\":[1],\"isExpanded\":[4,\"is-expanded\"],\"isExpandedState\":[32],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]}]]],[\"gov-toast\",[[4,\"gov-toast\",{\"variant\":[1],\"gravity\":[1],\"position\":[1],\"type\":[1],\"time\":[2],\"closeLabel\":[1,\"close-label\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"destroy\":[64]}]]],[\"gov-accordion-item\",[[4,\"gov-accordion-item\",{\"variant\":[1025],\"identifier\":[1],\"size\":[1025],\"label\":[1],\"annotation\":[1],\"disabled\":[4],\"isExpanded\":[4,\"is-expanded\"],\"triggerTag\":[1,\"trigger-tag\"],\"noBorder\":[4,\"no-border\"],\"isExpandedState\":[32],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]}]]],[\"gov-card\",[[4,\"gov-card\",{\"promotion\":[4],\"label\":[1],\"collapsible\":[4],\"expanded\":[4],\"headlineTag\":[1,\"headline-tag\"],\"wcagTriggerLabel\":[1,\"wcag-trigger-label\"],\"wcagTriggerLabelledBy\":[1,\"wcag-trigger-labelled-by\"],\"isExpanded\":[32],\"open\":[64],\"close\":[64],\"validateWcag\":[64]}]]],[\"gov-form-checkbox\",[[4,\"gov-form-checkbox\",{\"value\":[1],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"noLabel\":[4,\"no-label\"],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-tile\",[[4,\"gov-tile\",{\"promotion\":[4],\"href\":[1],\"name\":[1],\"getTriggerRef\":[64]}]]],[\"gov-wizzard-item\",[[4,\"gov-wizzard-item\",{\"variant\":[1],\"size\":[1],\"identifier\":[1],\"collapsible\":[4],\"annotation\":[1],\"label\":[1],\"disabled\":[4],\"isExpanded\":[1028,\"is-expanded\"],\"labelTag\":[1,\"label-tag\"],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]}]]],[\"gov-accordion\",[[4,\"gov-accordion\",{\"size\":[1],\"variant\":[1],\"noBorder\":[4,\"no-border\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-app\",[[0,\"gov-app\"]]],[\"gov-breadcrumbs\",[[4,\"gov-breadcrumbs\",{\"collapsible\":[4],\"isExpanded\":[4,\"is-expanded\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelded-by\"],\"validateWcag\":[64]}]]],[\"gov-container\",[[4,\"gov-container\",{\"slottedChildren\":[64]}]]],[\"gov-control-group\",[[4,\"gov-control-group\",{\"variant\":[1],\"noBorder\":[4,\"no-border\"]}]]],[\"gov-cookiebar\",[[4,\"gov-cookiebar\"]]],[\"gov-dropdown\",[[4,\"gov-dropdown\",{\"open\":[1028],\"position\":[1],\"getState\":[64],\"setOpen\":[64]}]]],[\"gov-empty\",[[4,\"gov-empty\"]]],[\"gov-error-code\",[[4,\"gov-error-code\"]]],[\"gov-form-control\",[[4,\"gov-form-control\",{\"gap\":[1],\"identifier\":[1],\"invalid\":[4],\"disabled\":[4],\"success\":[4],\"fieldset\":[4],\"size\":[1]}]]],[\"gov-form-group\",[[4,\"gov-form-group\",{\"gap\":[1]}]]],[\"gov-form-label\",[[4,\"gov-form-label\",{\"identifier\":[1],\"size\":[1],\"required\":[4],\"legend\":[4]}]]],[\"gov-form-password-power\",[[4,\"gov-form-password-power\",{\"power\":[2]}]]],[\"gov-form-radio\",[[4,\"gov-form-radio\",{\"value\":[1],\"noLabel\":[4,\"no-label\"],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-form-search\",[[4,\"gov-form-search\",{\"variant\":[1]}]]],[\"gov-form-switch\",[[4,\"gov-form-switch\",{\"value\":[1],\"noLabel\":[4,\"no-label\"],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-grid\",[[4,\"gov-grid\",{\"alignX\":[1,\"align-x\"],\"alignY\":[1,\"align-y\"]}]]],[\"gov-grid-item\",[[4,\"gov-grid-item\",{\"size\":[1],\"sizeSm\":[1,\"size-sm\"],\"sizeMd\":[1,\"size-md\"],\"sizeLg\":[1,\"size-lg\"],\"sizeXl\":[1,\"size-xl\"]}]]],[\"gov-layout\",[[4,\"gov-layout\",{\"type\":[1],\"variant\":[1],\"inverse\":[4]}]]],[\"gov-layout-column\",[[4,\"gov-layout-column\"]]],[\"gov-message\",[[4,\"gov-message\",{\"variant\":[1]}]]],[\"gov-nav\",[[4,\"gov-nav\",{\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-nav-item\",[[4,\"gov-nav-item\",{\"href\":[1],\"isExpandedState\":[32]}]]],[\"gov-side-nav\",[[4,\"gov-side-nav\",{\"inverse\":[4],\"compact\":[4],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-skeleton\",[[0,\"gov-skeleton\",{\"variant\":[1],\"count\":[2],\"shape\":[1],\"width\":[1],\"height\":[1],\"animation\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"validateWcag\":[64]}]]],[\"gov-spacer\",[[0,\"gov-spacer\",{\"size\":[1],\"breakpoint\":[1]}]]],[\"gov-statsbar\",[[4,\"gov-statsbar\",{\"iconPosition\":[1,\"icon-position\"],\"variant\":[1]}]]],[\"gov-statsbar-item\",[[4,\"gov-statsbar-item\",{\"iconPosition\":[1,\"icon-position\"]}]]],[\"gov-stepper\",[[4,\"gov-stepper\",{\"size\":[1]}]]],[\"gov-stepper-item\",[[4,\"gov-stepper-item\",{\"variant\":[1],\"size\":[1],\"identifier\":[1],\"label\":[1],\"annotation\":[1],\"triggerTag\":[1,\"trigger-tag\"],\"isExpandedState\":[32],\"currentState\":[64]}]]],[\"gov-tabs-item\",[[4,\"gov-tabs-item\",{\"identifier\":[1],\"triggerIdentifier\":[1,\"trigger-identifier\"],\"label\":[1],\"default\":[4],\"isActive\":[32],\"getIdentifier\":[64],\"getTriggerIdentifier\":[64],\"setActiveStatus\":[64]}]]],[\"gov-tiles\",[[4,\"gov-tiles\",{\"columns\":[2],\"noBorder\":[4,\"no-border\"]}]]],[\"gov-tooltip\",[[4,\"gov-tooltip\",{\"variant\":[1],\"size\":[1],\"position\":[1],\"message\":[1],\"identifier\":[1],\"icon\":[4],\"show\":[64],\"hide\":[64]}]]],[\"gov-tooltip-content\",[[4,\"gov-tooltip-content\",{\"isVisible\":[4,\"is-visible\"]}]]],[\"gov-wizzard\",[[4,\"gov-wizzard\",{\"size\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-icon\",[[0,\"gov-icon\",{\"name\":[1],\"type\":[1],\"iconData\":[32],\"visible\":[32],\"error\":[32]}]]],[\"gov-form-input\",[[4,\"gov-form-input\",{\"value\":[1537],\"identifier\":[1],\"variant\":[1],\"success\":[4],\"size\":[1],\"name\":[1],\"multiline\":[4],\"rows\":[2],\"cols\":[2],\"required\":[4],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"minlength\":[2],\"maxlength\":[2],\"min\":[8],\"max\":[8],\"autocomplete\":[4],\"autocorrect\":[4],\"type\":[1],\"inputType\":[1,\"input-type\"],\"role\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"wcagAutocomplete\":[1,\"wcag-autocomplete\"],\"wcagExpanded\":[4,\"wcag-expanded\"],\"focused\":[32],\"setFocus\":[64],\"setValue\":[64],\"clearValue\":[64],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-form-autocomplete\",[[4,\"gov-form-autocomplete\",{\"value\":[1537],\"identifier\":[1],\"variant\":[1],\"success\":[4],\"size\":[1],\"nameKey\":[1,\"name-key\"],\"name\":[1],\"required\":[4],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"invalid\":[4],\"minlength\":[2],\"maxlength\":[2],\"messageEmpty\":[1,\"message-empty\"],\"messageLoading\":[1,\"message-loading\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"processing\":[32],\"arrowCounter\":[32],\"list\":[32],\"setFocus\":[64],\"setOptions\":[64],\"clearValue\":[64],\"setProcessing\":[64],\"setSearchCallback\":[64],\"setTemplateResolver\":[64]}]]],[\"gov-form-select\",[[4,\"gov-form-select\",{\"value\":[1537],\"identifier\":[1],\"variant\":[1],\"size\":[1],\"name\":[1],\"required\":[4],\"disabled\":[4],\"invalid\":[4],\"wcagActiveDescendant\":[1,\"wcag-active-descendant\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"setFocus\":[64],\"setValue\":[64],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-badge\",[[4,\"gov-badge\",{\"inverse\":[4],\"disabled\":[4],\"href\":[1],\"target\":[1],\"size\":[1],\"type\":[1],\"tag\":[1],\"variant\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"getTriggerRef\":[64]}]]],[\"gov-attachments_3\",[[4,\"gov-attachments-item\",{\"wcagRemoveLabel\":[1,\"wcag-remove-label\"],\"wcagRemoveLabelledBy\":[1,\"wcag-remove-labelled-by\"],\"validateWcag\":[64]}],[4,\"gov-attachments\",{\"label\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"validateWcag\":[64]}],[4,\"gov-form-message\",{\"variant\":[1],\"identifier\":[64]}]]],[\"gov-backdrop\",[[0,\"gov-backdrop\",{\"inverse\":[4],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-button\",[[4,\"gov-button\",{\"variant\":[513],\"size\":[513],\"type\":[513],\"expanded\":[4],\"inverse\":[4],\"name\":[1],\"disabled\":[516],\"nativeType\":[1,\"native-type\"],\"href\":[1],\"target\":[1],\"download\":[4],\"hreflang\":[1],\"referrerpolicy\":[1],\"rel\":[1],\"loading\":[1],\"focusable\":[4],\"identifier\":[1],\"wcagActiveDescendant\":[1,\"wcag-active-descendant\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagDescription\":[1,\"wcag-description\"],\"wcagDetails\":[1,\"wcag-details\"],\"wcagExpanded\":[4,\"wcag-expanded\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"wcagHasPopup\":[1,\"wcag-has-popup\"],\"wcagPressed\":[1,\"wcag-pressed\"],\"wcagCurrent\":[1,\"wcag-current\"],\"isPressed\":[32],\"setFocus\":[64],\"getTriggerRef\":[64],\"validateWcag\":[64]}]]]]"), options);
|
|
17
|
+
return bootstrapLazy(JSON.parse("[[\"gov-form-file\",[[4,\"gov-form-file\",{\"expanded\":[4],\"required\":[4],\"disabled\":[4],\"displayAttachments\":[4,\"display-attachments\"],\"name\":[1],\"accept\":[1],\"multiple\":[4],\"maxFileSize\":[2,\"max-file-size\"],\"identifier\":[1],\"invalid\":[4],\"errorSize\":[1,\"error-size\"],\"errorAccept\":[1,\"error-accept\"],\"attachmentsLabel\":[1,\"attachments-label\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagRemoveLabel\":[1,\"wcag-remove-label\"],\"wcagAttachmentsLabel\":[1,\"wcag-attachments-label\"],\"files\":[32],\"getRef\":[64],\"getAreaRef\":[64],\"validateWcag\":[64]}]]],[\"gov-form-multi-select\",[[4,\"gov-form-multi-select\",{\"identifier\":[1],\"placeholder\":[1],\"variant\":[1],\"size\":[1],\"name\":[1],\"required\":[4],\"disabled\":[4],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"value\":[32],\"selectedOptions\":[32],\"setFocus\":[64],\"setValue\":[64],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-modal\",[[4,\"gov-modal\",{\"open\":[1028],\"label\":[1],\"role\":[1],\"labelTag\":[1,\"label-tag\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagCloseLabelledBy\":[1,\"wcag-close-labelled-by\"],\"show\":[64],\"hide\":[64],\"validateWcag\":[64]}]]],[\"gov-pagination\",[[0,\"gov-pagination\",{\"type\":[1],\"current\":[2],\"total\":[2],\"inverse\":[4],\"size\":[1],\"variant\":[1],\"pageSize\":[2,\"page-size\"],\"maxPages\":[2,\"max-pages\"],\"link\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagSelectLabel\":[1,\"wcag-select-label\"],\"wcagPageLabel\":[1,\"wcag-page-label\"],\"pagination\":[32],\"validateWcag\":[64]}]]],[\"gov-prompt\",[[4,\"gov-prompt\",{\"open\":[1028],\"label\":[1],\"role\":[1],\"labelTag\":[1,\"label-tag\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagCloseLabelledBy\":[1,\"wcag-close-labelled-by\"],\"show\":[64],\"hide\":[64],\"validateWcag\":[64]}]]],[\"gov-tabs\",[[4,\"gov-tabs\",{\"type\":[1],\"variant\":[1],\"orientation\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagSelectLabel\":[1,\"wcag-select-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"controller\":[32],\"focusIndex\":[32],\"compactControls\":[32],\"refresh\":[64],\"currentTab\":[64],\"setActiveTab\":[64],\"validateWcag\":[64]}]]],[\"gov-alert\",[[4,\"gov-alert\",{\"headline\":[1],\"variant\":[1],\"inverse\":[4],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagToggleLabel\":[1,\"wcag-toggle-label\"],\"closable\":[4],\"toggleContent\":[32],\"validateWcag\":[64]}]]],[\"gov-loading\",[[4,\"gov-loading\",{\"loading\":[4]}]]],[\"gov-side-nav-item\",[[4,\"gov-side-nav-item\",{\"inverse\":[4],\"compact\":[4],\"identifier\":[1],\"count\":[4],\"label\":[1],\"disabled\":[4],\"href\":[1],\"isExpanded\":[4,\"is-expanded\"],\"isExpandedState\":[32],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]}]]],[\"gov-toast\",[[4,\"gov-toast\",{\"variant\":[1],\"gravity\":[1],\"position\":[1],\"type\":[1],\"time\":[2],\"closeLabel\":[1,\"close-label\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"destroy\":[64]}]]],[\"gov-accordion-item\",[[4,\"gov-accordion-item\",{\"variant\":[1],\"identifier\":[1],\"size\":[1],\"disabled\":[4],\"isExpanded\":[1028,\"is-expanded\"],\"isExpandedState\":[32],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]}]]],[\"gov-card\",[[4,\"gov-card\",{\"promotion\":[4],\"label\":[1],\"collapsible\":[4],\"expanded\":[4],\"headlineTag\":[1,\"headline-tag\"],\"wcagTriggerLabel\":[1,\"wcag-trigger-label\"],\"wcagTriggerLabelledBy\":[1,\"wcag-trigger-labelled-by\"],\"isExpanded\":[32],\"open\":[64],\"close\":[64],\"validateWcag\":[64]}]]],[\"gov-form-checkbox\",[[4,\"gov-form-checkbox\",{\"value\":[1],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"noLabel\":[4,\"no-label\"],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-tile\",[[4,\"gov-tile\",{\"promotion\":[4],\"href\":[1],\"name\":[1],\"getTriggerRef\":[64]}]]],[\"gov-wizzard-item\",[[4,\"gov-wizzard-item\",{\"variant\":[1],\"size\":[1],\"identifier\":[1],\"collapsible\":[4],\"annotation\":[1],\"label\":[1],\"disabled\":[4],\"isExpanded\":[1028,\"is-expanded\"],\"labelTag\":[1,\"label-tag\"],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]}]]],[\"gov-accordion\",[[4,\"gov-accordion\",{\"size\":[1],\"variant\":[1],\"noBorder\":[4,\"no-border\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-app\",[[0,\"gov-app\"]]],[\"gov-breadcrumbs\",[[4,\"gov-breadcrumbs\",{\"collapsible\":[4],\"isExpanded\":[4,\"is-expanded\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labeled-by\"],\"validateWcag\":[64]}]]],[\"gov-container\",[[4,\"gov-container\",{\"slottedChildren\":[64]}]]],[\"gov-control-group\",[[4,\"gov-control-group\",{\"variant\":[1],\"noBorder\":[4,\"no-border\"]}]]],[\"gov-cookiebar\",[[4,\"gov-cookiebar\"]]],[\"gov-dropdown\",[[4,\"gov-dropdown\",{\"open\":[1028],\"position\":[1],\"getState\":[64],\"setOpen\":[64]}]]],[\"gov-empty\",[[4,\"gov-empty\"]]],[\"gov-error-code\",[[4,\"gov-error-code\"]]],[\"gov-form-control\",[[4,\"gov-form-control\",{\"gap\":[1],\"identifier\":[1],\"invalid\":[4],\"disabled\":[4],\"success\":[4],\"fieldset\":[4],\"size\":[1]}]]],[\"gov-form-group\",[[4,\"gov-form-group\",{\"gap\":[1],\"orientation\":[1]}]]],[\"gov-form-label\",[[4,\"gov-form-label\",{\"identifier\":[1],\"size\":[1],\"required\":[4],\"legend\":[4]}]]],[\"gov-form-password-power\",[[4,\"gov-form-password-power\",{\"power\":[2]}]]],[\"gov-form-radio\",[[4,\"gov-form-radio\",{\"value\":[1],\"noLabel\":[4,\"no-label\"],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-form-search\",[[4,\"gov-form-search\",{\"variant\":[1]}]]],[\"gov-form-switch\",[[4,\"gov-form-switch\",{\"value\":[1],\"noLabel\":[4,\"no-label\"],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-grid\",[[4,\"gov-grid\",{\"alignX\":[1,\"align-x\"],\"alignY\":[1,\"align-y\"]}]]],[\"gov-grid-item\",[[4,\"gov-grid-item\",{\"size\":[1],\"sizeSm\":[1,\"size-sm\"],\"sizeMd\":[1,\"size-md\"],\"sizeLg\":[1,\"size-lg\"],\"sizeXl\":[1,\"size-xl\"]}]]],[\"gov-layout\",[[4,\"gov-layout\",{\"type\":[1],\"variant\":[1],\"inverse\":[4]}]]],[\"gov-layout-column\",[[4,\"gov-layout-column\"]]],[\"gov-message\",[[4,\"gov-message\",{\"variant\":[1]}]]],[\"gov-nav\",[[4,\"gov-nav\",{\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-nav-item\",[[4,\"gov-nav-item\",{\"href\":[1],\"isExpandedState\":[32]}]]],[\"gov-side-nav\",[[4,\"gov-side-nav\",{\"inverse\":[4],\"compact\":[4],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-skeleton\",[[0,\"gov-skeleton\",{\"variant\":[1],\"count\":[2],\"shape\":[1],\"width\":[1],\"height\":[1],\"animation\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"validateWcag\":[64]}]]],[\"gov-spacer\",[[0,\"gov-spacer\",{\"size\":[1],\"breakpoint\":[1]}]]],[\"gov-statsbar\",[[4,\"gov-statsbar\",{\"iconPosition\":[1,\"icon-position\"],\"variant\":[1]}]]],[\"gov-statsbar-item\",[[4,\"gov-statsbar-item\",{\"iconPosition\":[1,\"icon-position\"]}]]],[\"gov-stepper\",[[4,\"gov-stepper\",{\"size\":[1]}]]],[\"gov-stepper-item\",[[4,\"gov-stepper-item\",{\"variant\":[1],\"size\":[1],\"identifier\":[1],\"label\":[1],\"annotation\":[1],\"triggerTag\":[1,\"trigger-tag\"],\"isExpandedState\":[32],\"currentState\":[64]}]]],[\"gov-tabs-item\",[[4,\"gov-tabs-item\",{\"identifier\":[1],\"triggerIdentifier\":[1,\"trigger-identifier\"],\"label\":[1],\"default\":[4],\"isActive\":[32],\"getIdentifier\":[64],\"getTriggerIdentifier\":[64],\"setActiveStatus\":[64]}]]],[\"gov-tiles\",[[4,\"gov-tiles\",{\"columns\":[2],\"noBorder\":[4,\"no-border\"]}]]],[\"gov-tooltip\",[[4,\"gov-tooltip\",{\"variant\":[1],\"size\":[1],\"position\":[1],\"message\":[1],\"identifier\":[1],\"icon\":[4],\"show\":[64],\"hide\":[64]}]]],[\"gov-tooltip-content\",[[4,\"gov-tooltip-content\",{\"isVisible\":[4,\"is-visible\"]}]]],[\"gov-wizzard\",[[4,\"gov-wizzard\",{\"size\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-icon\",[[0,\"gov-icon\",{\"name\":[1],\"type\":[1],\"iconData\":[32],\"visible\":[32],\"error\":[32]}]]],[\"gov-form-input\",[[4,\"gov-form-input\",{\"value\":[1537],\"identifier\":[1],\"variant\":[1],\"success\":[4],\"size\":[1],\"name\":[1],\"multiline\":[4],\"rows\":[2],\"cols\":[2],\"required\":[4],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"minlength\":[2],\"maxlength\":[2],\"min\":[8],\"max\":[8],\"autocomplete\":[4],\"autocorrect\":[4],\"type\":[1],\"inputType\":[1,\"input-type\"],\"role\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"wcagAutocomplete\":[1,\"wcag-autocomplete\"],\"wcagExpanded\":[4,\"wcag-expanded\"],\"focused\":[32],\"setFocus\":[64],\"setValue\":[64],\"clearValue\":[64],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-form-autocomplete\",[[4,\"gov-form-autocomplete\",{\"value\":[1537],\"identifier\":[1],\"variant\":[1],\"success\":[4],\"size\":[1],\"nameKey\":[1,\"name-key\"],\"name\":[1],\"required\":[4],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"invalid\":[4],\"minlength\":[2],\"maxlength\":[2],\"messageEmpty\":[1,\"message-empty\"],\"messageLoading\":[1,\"message-loading\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"processing\":[32],\"arrowCounter\":[32],\"list\":[32],\"setFocus\":[64],\"setOptions\":[64],\"clearValue\":[64],\"setProcessing\":[64],\"setSearchCallback\":[64],\"setTemplateResolver\":[64]}]]],[\"gov-form-select\",[[4,\"gov-form-select\",{\"value\":[1537],\"identifier\":[1],\"variant\":[1],\"size\":[1],\"name\":[1],\"required\":[4],\"disabled\":[4],\"invalid\":[4],\"wcagActiveDescendant\":[1,\"wcag-active-descendant\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"setFocus\":[64],\"setValue\":[64],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-badge\",[[4,\"gov-badge\",{\"inverse\":[4],\"disabled\":[4],\"href\":[1],\"target\":[1],\"size\":[1],\"tag\":[1],\"variant\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"getTriggerRef\":[64]}]]],[\"gov-attachments_3\",[[4,\"gov-attachments-item\",{\"wcagRemoveLabel\":[1,\"wcag-remove-label\"],\"wcagRemoveLabelledBy\":[1,\"wcag-remove-labelled-by\"],\"validateWcag\":[64]}],[4,\"gov-attachments\",{\"label\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"validateWcag\":[64]}],[4,\"gov-form-message\",{\"variant\":[1],\"identifier\":[64]}]]],[\"gov-backdrop\",[[0,\"gov-backdrop\",{\"inverse\":[4],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-button\",[[4,\"gov-button\",{\"variant\":[513],\"size\":[513],\"type\":[513],\"expanded\":[4],\"inverse\":[4],\"name\":[1],\"disabled\":[516],\"nativeType\":[1,\"native-type\"],\"href\":[1],\"target\":[1],\"download\":[4],\"hreflang\":[1],\"referrerpolicy\":[1],\"rel\":[1],\"loading\":[1],\"focusable\":[4],\"identifier\":[1],\"wcagActiveDescendant\":[1,\"wcag-active-descendant\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagDescription\":[1,\"wcag-description\"],\"wcagDetails\":[1,\"wcag-details\"],\"wcagExpanded\":[4,\"wcag-expanded\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"wcagHasPopup\":[1,\"wcag-has-popup\"],\"wcagPressed\":[1,\"wcag-pressed\"],\"wcagCurrent\":[1,\"wcag-current\"],\"isPressed\":[32],\"setFocus\":[64],\"getTriggerRef\":[64],\"validateWcag\":[64]}]]]]"), options);
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
//# sourceMappingURL=core.js.map
|
|
@@ -1,46 +1,29 @@
|
|
|
1
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
2
|
import { v as validateProp } from './props-789f7529.js';
|
|
4
|
-
import { A as AccordionItemClass, a as AccordionClass, b as AccordionSizes, c as AccordionVariants } from './constants-
|
|
3
|
+
import { A as AccordionItemClass, a as AccordionClass, b as AccordionSizes, c as AccordionVariants } from './constants-858966b9.js';
|
|
5
4
|
import { c as createID } from './string.utils-f268fc6b.js';
|
|
6
5
|
import { g as govHost, b as booleanString, t as toBoolAttrIfDefined } from './template-10332292.js';
|
|
6
|
+
import './gov.log-af905420.js';
|
|
7
7
|
import './sizes-6c5943b4.js';
|
|
8
8
|
import './variants-2b936d58.js';
|
|
9
9
|
import './utils-c057a3fa.js';
|
|
10
10
|
|
|
11
|
-
const govAccordionItemCss = ".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-accordion-item{position:relative;display:block;width:100%}.gov-accordion-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;position:relative;display:flex;justify-content:space-between;align-items:center;width:100%;border-radius:0;text-align:left;text-transform:none;transition:background-color 150ms ease-in-out}.gov-accordion-item__header:focus{outline:none}.gov-accordion-item__header:focus{outline:none}.gov-accordion-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-accordion-item__header::before{content:\"\";position:absolute;display:block;right:0;bottom:-1px;left:0;height:1px}.gov-accordion-item__header:focus-visible::before{display:none}.gov-accordion-item__header[aria-expanded=\"\"] .gov-accordion-item__arrow,.gov-accordion-item__header[aria-expanded=true i] .gov-accordion-item__arrow,.gov-accordion-item__header[aria-expanded=\"1\"] .gov-accordion-item__arrow{transform:scale(-1)}.gov-accordion-item__arrow{flex:0 0 auto;align-self:center}.gov-accordion-item__icon{display:inline-flex;vertical-align:middle;flex:0 0 auto}.gov-accordion-item__suffix{display:inline-flex;vertical-align:middle;flex:0 0 auto;align-self:start;margin-left:auto;line-height:initial}.gov-accordion-item__title{margin:0;padding:0;font-family:var(--gov-font-family, \"Roboto\", sans-serif);font-weight:400;box-sizing:border-box;display:flex;flex:1 1 auto;align-items:flex-start}.gov-accordion-item__name{display:flex;flex-direction:column}.gov-accordion-item__annot{color:var(--gov-color-secondary)}.gov-accordion-item__content>*:last-child{margin-bottom:0}.gov-accordion-item[size=xs] .gov-accordion-item__header,.gov-accordion-item .gov-accordion-item[size=xs] .gov-accordion-item__header{gap:var(--gov-accordion-s-headline-gap, 0.5rem);min-height:var(--gov-accordion-s-min-height, 3rem);padding:var(--gov-accordion-s-padding-y, 0.75rem) var(--gov-accordion-s-padding-x, 0.5rem)}.gov-accordion-item[size=xs] .gov-accordion-item__arrow,.gov-accordion-item .gov-accordion-item[size=xs] .gov-accordion-item__arrow{width:var(--gov-accordion-s-icon-size, 0.75rem);height:var(--gov-accordion-s-icon-size, 0.75rem)}.gov-accordion-item[size=xs] .gov-accordion-item__icon,.gov-accordion-item .gov-accordion-item[size=xs] .gov-accordion-item__icon{width:calc(var(--gov-text-m-font-size) * 1.2);height:calc(var(--gov-text-m-font-size) * 1.2);transform:translateY(var(--gov-accordion-s-icon-position, 0.0625rem))}.gov-accordion-item[size=xs] .gov-accordion-item__title,.gov-accordion-item .gov-accordion-item[size=xs] .gov-accordion-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);gap:var(--gov-accordion-s-headline-gap, 0.5rem)}.gov-accordion-item[size=xs] .gov-accordion-item__annot,.gov-accordion-item .gov-accordion-item[size=xs] .gov-accordion-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-accordion-item[size=xs] .gov-accordion-item__content,.gov-accordion-item .gov-accordion-item[size=xs] .gov-accordion-item__content{padding:var(--gov-accordion-s-padding-inner, 1rem 0.5rem)}.gov-accordion-item[size=s] .gov-accordion-item__header,.gov-accordion-item .gov-accordion-item[size=s] .gov-accordion-item__header{gap:var(--gov-accordion-s-headline-gap, 0.5rem);min-height:var(--gov-accordion-s-min-height, 3rem);padding:var(--gov-accordion-s-padding-y, 1.125rem) var(--gov-accordion-s-padding-x, 0.5rem)}.gov-accordion-item[size=s] .gov-accordion-item__arrow,.gov-accordion-item .gov-accordion-item[size=s] .gov-accordion-item__arrow{width:var(--gov-accordion-s-icon-size, 0.75rem);height:var(--gov-accordion-s-icon-size, 0.75rem)}.gov-accordion-item[size=s] .gov-accordion-item__icon,.gov-accordion-item .gov-accordion-item[size=s] .gov-accordion-item__icon{width:calc(var(--gov-text-xl-font-size) * 1.2);height:calc(var(--gov-text-xl-font-size) * 1.2);transform:translateY(var(--gov-accordion-s-icon-position, 0.0625rem))}.gov-accordion-item[size=s] .gov-accordion-item__title,.gov-accordion-item .gov-accordion-item[size=s] .gov-accordion-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);gap:var(--gov-accordion-s-headline-gap, 0.5rem)}.gov-accordion-item[size=s] .gov-accordion-item__annot,.gov-accordion-item .gov-accordion-item[size=s] .gov-accordion-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-accordion-item[size=s] .gov-accordion-item__content,.gov-accordion-item .gov-accordion-item[size=s] .gov-accordion-item__content{padding:var(--gov-accordion-s-padding-inner, 1rem 0.5rem)}.gov-accordion-item[size=m] .gov-accordion-item__header,.gov-accordion-item .gov-accordion-item[size=m] .gov-accordion-item__header{gap:var(--gov-accordion-m-headline-gap, 1rem);min-height:var(--gov-accordion-m-min-height, 4.5rem);padding:var(--gov-accordion-m-padding-y, 1.25rem) var(--gov-accordion-m-padding-x, 0.5rem)}.gov-accordion-item[size=m] .gov-accordion-item__arrow,.gov-accordion-item .gov-accordion-item[size=m] .gov-accordion-item__arrow{width:var(--gov-accordion-m-icon-size, 1rem);height:var(--gov-accordion-m-icon-size, 1rem)}.gov-accordion-item[size=m] .gov-accordion-item__icon,.gov-accordion-item .gov-accordion-item[size=m] .gov-accordion-item__icon{width:calc(var(--gov-text-2xl-font-size) * 1.2);height:calc(var(--gov-text-2xl-font-size) * 1.2);transform:translateY(var(--gov-accordion-m-icon-position, 0.125rem))}.gov-accordion-item[size=m] .gov-accordion-item__title,.gov-accordion-item .gov-accordion-item[size=m] .gov-accordion-item__title{font-weight:var(--gov-text-2xl-font-weight);font-size:var(--gov-text-2xl-font-size);line-height:var(--gov-text-2xl-line-height);letter-spacing:var(--gov-text-2xl-letter-spacing);gap:var(--gov-accordion-m-headline-gap, 1rem)}.gov-accordion-item[size=m] .gov-accordion-item__annot,.gov-accordion-item .gov-accordion-item[size=m] .gov-accordion-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-accordion-item[size=m] .gov-accordion-item__content,.gov-accordion-item .gov-accordion-item[size=m] .gov-accordion-item__content{padding:var(--gov-accordion-m-padding-inner, 1.25rem 0.5rem)}.gov-accordion-item[size=l] .gov-accordion-item__header,.gov-accordion-item .gov-accordion-item[size=l] .gov-accordion-item__header{gap:var(--gov-accordion-l-headline-gap, 1rem);min-height:var(--gov-accordion-l-min-height, 5.5rem);padding:var(--gov-accordion-l-padding-y, 1.375rem) var(--gov-accordion-l-padding-x, 0.5rem)}.gov-accordion-item[size=l] .gov-accordion-item__arrow,.gov-accordion-item .gov-accordion-item[size=l] .gov-accordion-item__arrow{width:var(--gov-accordion-l-icon-size, 1.25rem);height:var(--gov-accordion-l-icon-size, 1.25rem)}.gov-accordion-item[size=l] .gov-accordion-item__icon,.gov-accordion-item .gov-accordion-item[size=l] .gov-accordion-item__icon{width:calc(var(--gov-text-3xl-font-size) * 1.2);height:calc(var(--gov-text-3xl-font-size) * 1.2);transform:translateY(var(--gov-accordion-l-icon-position, 0.125rem))}.gov-accordion-item[size=l] .gov-accordion-item__title,.gov-accordion-item .gov-accordion-item[size=l] .gov-accordion-item__title{font-weight:var(--gov-text-3xl-font-weight);font-size:var(--gov-text-3xl-font-size);line-height:var(--gov-text-3xl-line-height);letter-spacing:var(--gov-text-3xl-letter-spacing);gap:var(--gov-accordion-l-headline-gap, 1rem)}.gov-accordion-item[size=l] .gov-accordion-item__annot,.gov-accordion-item .gov-accordion-item[size=l] .gov-accordion-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-accordion-item[size=l] .gov-accordion-item__content,.gov-accordion-item .gov-accordion-item[size=l] .gov-accordion-item__content{padding:var(--gov-accordion-l-padding-inner, 1.25rem 0.5rem)}.gov-accordion-item[variant=primary] .gov-accordion-item__header{background-color:var(--gov-accordion-primary-background, transparent);color:var(--gov-accordion-primary-color, var(--gov-color-primary))}.gov-accordion-item[variant=primary] .gov-accordion-item__header::before{background-color:var(--gov-accordion-primary-separator, var(--gov-color-secondary-500))}@media not all and (pointer: coarse){.gov-accordion-item[variant=primary] .gov-accordion-item__header:hover{background-color:var(--gov-accordion-primary-background-hover, var(--gov-color-primary-200))}}.gov-accordion-item[variant=primary][disabled=\"\"] .gov-accordion-item__header,.gov-accordion-item[variant=primary][disabled=true i] .gov-accordion-item__header,.gov-accordion-item[variant=primary][disabled=\"1\"] .gov-accordion-item__header{color:var(--gov-accordion-primary-disabled-color, var(--gov-color-primary-400))}@media not all and (pointer: coarse){.gov-accordion-item[variant=primary][disabled=\"\"] .gov-accordion-item__header:hover,.gov-accordion-item[variant=primary][disabled=true i] .gov-accordion-item__header:hover,.gov-accordion-item[variant=primary][disabled=\"1\"] .gov-accordion-item__header:hover{background:transparent;cursor:not-allowed}}.gov-accordion-item[variant=secondary] .gov-accordion-item__header{background-color:var(--gov-accordion-secondary-background, transparent);color:var(--gov-accordion-secondary-color, var(--gov-color-secondary))}.gov-accordion-item[variant=secondary] .gov-accordion-item__header::before{background-color:var(--gov-accordion-secondary-separator, var(--gov-color-secondary-500))}@media not all and (pointer: coarse){.gov-accordion-item[variant=secondary] .gov-accordion-item__header:hover{background-color:var(--gov-accordion-secondary-background-hover, var(--gov-color-secondary-200))}}.gov-accordion-item[variant=secondary][disabled=\"\"] .gov-accordion-item__header,.gov-accordion-item[variant=secondary][disabled=true i] .gov-accordion-item__header,.gov-accordion-item[variant=secondary][disabled=\"1\"] .gov-accordion-item__header{color:var(--gov-accordion-secondary-disabled-color, var(--gov-color-secondary-600))}@media not all and (pointer: coarse){.gov-accordion-item[variant=secondary][disabled=\"\"] .gov-accordion-item__header:hover,.gov-accordion-item[variant=secondary][disabled=true i] .gov-accordion-item__header:hover,.gov-accordion-item[variant=secondary][disabled=\"1\"] .gov-accordion-item__header:hover{background:transparent;cursor:not-allowed}}@media (max-width: 47.99em){.gov-accordion-item__title{flex-wrap:wrap}.gov-accordion-item__label{flex:0 0 auto}}";
|
|
11
|
+
const govAccordionItemCss = ".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-accordion-item{position:relative;display:block;width:100%}.gov-accordion-item::before{content:\"\";position:absolute;display:block;right:0;bottom:-1px;left:0;height:1px;background-color:var(--gov-color-secondary-500)}.gov-accordion-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;margin:0;padding:0;font-family:var(--gov-font-family, \"Roboto\", sans-serif);font-weight:400;box-sizing:border-box;position:relative;display:flex;justify-content:space-between;align-items:flex-start;width:100%;border-radius:0;text-align:left;text-transform:none;transition:background-color 150ms ease-in-out}.gov-accordion-item__header:focus{outline:none}.gov-accordion-item__header:focus{outline:none}.gov-accordion-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-accordion-item__header:focus-visible::before{display:none}.gov-accordion-item__header[aria-expanded=\"\"] .gov-accordion-item__arrow gov-icon:not([slot=toggle-icon]),.gov-accordion-item__header[aria-expanded=true i] .gov-accordion-item__arrow gov-icon:not([slot=toggle-icon]),.gov-accordion-item__header[aria-expanded=\"1\"] .gov-accordion-item__arrow gov-icon:not([slot=toggle-icon]){transform:scale(-1)}.gov-accordion-item__arrow{flex:0 0 auto;align-self:center;margin-left:auto}.gov-accordion-item__icon{display:inline-flex;vertical-align:middle;flex:0 0 auto}.gov-accordion-item__suffix{display:inline-flex;vertical-align:middle;flex:0 0 auto;align-self:start;margin-left:auto;line-height:initial}.gov-accordion-item__title{display:flex;flex-direction:column}.gov-accordion-item__label *{margin-bottom:0;transform:translateY(1px)}.gov-accordion-item__annotation *{color:var(--gov-color-secondary);margin-bottom:0}.gov-accordion-item__content>*:last-child{margin-bottom:0}.gov-accordion-item[size=xs] .gov-accordion-item__header{gap:var(--gov-accordion-s-headline-gap, 0.5rem);min-height:var(--gov-accordion-s-min-height, 3rem);padding:var(--gov-accordion-s-padding-y, 0.75rem) var(--gov-accordion-s-padding-x, 0.5rem)}.gov-accordion-item[size=xs] .gov-accordion-item__label *{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-accordion-item[size=xs] .gov-accordion-item__arrow{width:var(--gov-accordion-s-icon-size, 1rem);height:var(--gov-accordion-s-icon-size, 1rem)}.gov-accordion-item[size=xs] .gov-accordion-item__icon{width:calc(var(--gov-text-m-font-size) * 1.2);height:calc(var(--gov-text-m-font-size) * 1.2);transform:translateY(var(--gov-accordion-s-icon-position, 0.1875rem))}.gov-accordion-item[size=xs] .gov-accordion-item__annotation{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-accordion-item[size=xs] .gov-accordion-item__content{padding:var(--gov-accordion-s-padding-inner, 1rem 0.5rem)}.gov-accordion-item[size=s] .gov-accordion-item__header{gap:var(--gov-accordion-s-headline-gap, 0.5rem);min-height:var(--gov-accordion-s-min-height, 3rem);padding:var(--gov-accordion-s-padding-y, 1.125rem) var(--gov-accordion-s-padding-x, 0.5rem)}.gov-accordion-item[size=s] .gov-accordion-item__label *{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-accordion-item[size=s] .gov-accordion-item__arrow{width:var(--gov-accordion-s-icon-size, 1rem);height:var(--gov-accordion-s-icon-size, 1rem)}.gov-accordion-item[size=s] .gov-accordion-item__icon{width:calc(var(--gov-text-xl-font-size) * 1.2);height:calc(var(--gov-text-xl-font-size) * 1.2);transform:translateY(var(--gov-accordion-s-icon-position, 0.1875rem))}.gov-accordion-item[size=s] .gov-accordion-item__annotation{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-accordion-item[size=s] .gov-accordion-item__content{padding:var(--gov-accordion-s-padding-inner, 1rem 0.5rem)}.gov-accordion-item[size=m] .gov-accordion-item__header{gap:var(--gov-accordion-m-headline-gap, 1rem);min-height:var(--gov-accordion-m-min-height, 4.5rem);padding:var(--gov-accordion-m-padding-y, 1.25rem) var(--gov-accordion-m-padding-x, 0.5rem)}.gov-accordion-item[size=m] .gov-accordion-item__label *{font-weight:var(--gov-text-2xl-font-weight);font-size:var(--gov-text-2xl-font-size);line-height:var(--gov-text-2xl-line-height);letter-spacing:var(--gov-text-2xl-letter-spacing)}.gov-accordion-item[size=m] .gov-accordion-item__arrow{width:var(--gov-accordion-m-icon-size, 1.5rem);height:var(--gov-accordion-m-icon-size, 1.5rem)}.gov-accordion-item[size=m] .gov-accordion-item__icon{width:calc(var(--gov-text-2xl-font-size) * 1.2);height:calc(var(--gov-text-2xl-font-size) * 1.2);transform:translateY(var(--gov-accordion-m-icon-position, 0.25rem))}.gov-accordion-item[size=m] .gov-accordion-item__annotation{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-accordion-item[size=m] .gov-accordion-item__content{padding:var(--gov-accordion-m-padding-inner, 1.25rem 0.5rem)}.gov-accordion-item[size=l] .gov-accordion-item__header{gap:var(--gov-accordion-l-headline-gap, 1rem);min-height:var(--gov-accordion-l-min-height, 5.5rem);padding:var(--gov-accordion-l-padding-y, 1.375rem) var(--gov-accordion-l-padding-x, 0.5rem)}.gov-accordion-item[size=l] .gov-accordion-item__label *{font-weight:var(--gov-text-3xl-font-weight);font-size:var(--gov-text-3xl-font-size);line-height:var(--gov-text-3xl-line-height);letter-spacing:var(--gov-text-3xl-letter-spacing)}.gov-accordion-item[size=l] .gov-accordion-item__arrow{width:var(--gov-accordion-l-icon-size, 1.5rem);height:var(--gov-accordion-l-icon-size, 1.5rem)}.gov-accordion-item[size=l] .gov-accordion-item__icon{width:calc(var(--gov-text-3xl-font-size) * 1.2);height:calc(var(--gov-text-3xl-font-size) * 1.2);transform:translateY(var(--gov-accordion-l-icon-position, 0.3125rem))}.gov-accordion-item[size=l] .gov-accordion-item__annotation{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-accordion-item[size=l] .gov-accordion-item__content{padding:var(--gov-accordion-l-padding-inner, 1.25rem 0.5rem)}.gov-accordion-item[variant=primary] .gov-accordion-item::before{background-color:var(--gov-accordion-primary-separator, var(--gov-color-secondary-500))}.gov-accordion-item[variant=primary] .gov-accordion-item__header{background-color:var(--gov-accordion-primary-background, transparent);color:var(--gov-accordion-primary-color, var(--gov-color-primary))}@media not all and (pointer: coarse){.gov-accordion-item[variant=primary] .gov-accordion-item__header:hover{background-color:var(--gov-accordion-primary-background-hover, var(--gov-color-primary-200))}}.gov-accordion-item[variant=primary][disabled=\"\"] .gov-accordion-item__header,.gov-accordion-item[variant=primary][disabled=true i] .gov-accordion-item__header,.gov-accordion-item[variant=primary][disabled=\"1\"] .gov-accordion-item__header{color:var(--gov-accordion-primary-disabled-color, var(--gov-color-primary-400))}@media not all and (pointer: coarse){.gov-accordion-item[variant=primary][disabled=\"\"] .gov-accordion-item__header:hover,.gov-accordion-item[variant=primary][disabled=true i] .gov-accordion-item__header:hover,.gov-accordion-item[variant=primary][disabled=\"1\"] .gov-accordion-item__header:hover{background:transparent;cursor:not-allowed}}.gov-accordion-item[variant=secondary] .gov-accordion-item::before{background-color:var(--gov-accordion-secondary-separator, var(--gov-color-secondary-500))}.gov-accordion-item[variant=secondary] .gov-accordion-item__header{background-color:var(--gov-accordion-secondary-background, transparent);color:var(--gov-accordion-secondary-color, var(--gov-color-secondary))}@media not all and (pointer: coarse){.gov-accordion-item[variant=secondary] .gov-accordion-item__header:hover{background-color:var(--gov-accordion-secondary-background-hover, var(--gov-color-secondary-200))}}.gov-accordion-item[variant=secondary][disabled=\"\"] .gov-accordion-item__header,.gov-accordion-item[variant=secondary][disabled=true i] .gov-accordion-item__header,.gov-accordion-item[variant=secondary][disabled=\"1\"] .gov-accordion-item__header{color:var(--gov-accordion-secondary-disabled-color, var(--gov-color-secondary-600))}@media not all and (pointer: coarse){.gov-accordion-item[variant=secondary][disabled=\"\"] .gov-accordion-item__header:hover,.gov-accordion-item[variant=secondary][disabled=true i] .gov-accordion-item__header:hover,.gov-accordion-item[variant=secondary][disabled=\"1\"] .gov-accordion-item__header:hover{background:transparent;cursor:not-allowed}}@media (max-width: 47.99em){.gov-accordion-item__title{flex-wrap:wrap}.gov-accordion-item__label{flex:0 0 auto}}";
|
|
12
12
|
|
|
13
13
|
const GovAccordionItem = class {
|
|
14
14
|
constructor(hostRef) {
|
|
15
15
|
registerInstance(this, hostRef);
|
|
16
16
|
this.govChange = createEvent(this, "gov-change", 7);
|
|
17
17
|
this.isExpandedState = undefined;
|
|
18
|
-
this.variant =
|
|
18
|
+
this.variant = undefined;
|
|
19
19
|
this.identifier = undefined;
|
|
20
20
|
this.size = undefined;
|
|
21
|
-
this.label = undefined;
|
|
22
|
-
this.annotation = undefined;
|
|
23
21
|
this.disabled = false;
|
|
24
22
|
this.isExpanded = false;
|
|
25
|
-
this.triggerTag = "h3";
|
|
26
|
-
this.noBorder = false;
|
|
27
23
|
this.h = govHost(this.host);
|
|
28
24
|
this.triggerId = createID("GovAccordionItem");
|
|
29
25
|
this.contentId = createID("GovAccordionContent");
|
|
30
26
|
}
|
|
31
|
-
validateLabel(newValue) {
|
|
32
|
-
if (!newValue) {
|
|
33
|
-
govErrorLog(`[${AccordionItemClass.root}]: Parameter label is required.`);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
validateTriggerTag(newValue) {
|
|
37
|
-
const validTags = ["h1", "h2", "h3", "h4", "h5", "h6", "span"];
|
|
38
|
-
if (newValue) {
|
|
39
|
-
if (!validTags.includes(newValue)) {
|
|
40
|
-
govErrorLog(`[${AccordionItemClass.root}]: Tag ${newValue} is not allowed.`);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
27
|
validateSize(newValue) {
|
|
45
28
|
validateProp(AccordionSizes, newValue, AccordionItemClass.root);
|
|
46
29
|
}
|
|
@@ -49,67 +32,60 @@ const GovAccordionItem = class {
|
|
|
49
32
|
}
|
|
50
33
|
emmitChange() {
|
|
51
34
|
this.govChange.emit({
|
|
52
|
-
open: this.
|
|
35
|
+
open: this.isExpanded,
|
|
53
36
|
component: AccordionItemClass.root,
|
|
54
37
|
ref: this.host,
|
|
55
38
|
});
|
|
56
39
|
}
|
|
57
40
|
componentWillLoad() {
|
|
58
|
-
this.isExpandedState = this.isExpanded;
|
|
59
41
|
this.getPropsFromParents();
|
|
60
|
-
this.validateLabel(this.label);
|
|
61
|
-
this.validateTriggerTag(this.triggerTag);
|
|
62
42
|
this.validateSize(this.size);
|
|
63
43
|
this.validateVariant(this.variant);
|
|
64
44
|
}
|
|
65
45
|
getPropsFromParents() {
|
|
66
46
|
const accordion = this.h.getParent(AccordionClass.root);
|
|
67
47
|
if (accordion) {
|
|
68
|
-
this.size = accordion.getAttribute(
|
|
69
|
-
this.variant = accordion.getAttribute(
|
|
48
|
+
this.size = accordion.getAttribute("size");
|
|
49
|
+
this.variant = accordion.getAttribute("variant");
|
|
70
50
|
}
|
|
71
51
|
}
|
|
72
52
|
render() {
|
|
73
53
|
const triggerId = this.identifier || this.triggerId;
|
|
74
54
|
const contentId = this.contentId;
|
|
75
|
-
|
|
76
|
-
const TriggerTag = this.triggerTag;
|
|
77
|
-
return (h(Host, { class: this.h.classes(AccordionItemClass.root), "no-border": this.noBorder, size: this.size, variant: this.variant, role: "listitem" }, h("button", { id: triggerId, class: AccordionItemClass.header, "aria-expanded": booleanString(isExpandedState), "aria-controls": contentId, disabled: this.disabled, type: 'button', "aria-disabled": toBoolAttrIfDefined(this.disabled), onClick: (e) => {
|
|
55
|
+
return (h(Host, { class: this.h.classes(AccordionItemClass.root), size: this.size, variant: this.variant, role: "listitem" }, h("button", { id: triggerId, class: AccordionItemClass.header, "aria-expanded": booleanString(this.isExpanded), "aria-controls": contentId, disabled: this.disabled, type: "button", "aria-disabled": toBoolAttrIfDefined(this.disabled), onClick: (e) => {
|
|
78
56
|
e.stopPropagation();
|
|
79
57
|
this.toggle().finally();
|
|
80
|
-
} },
|
|
58
|
+
} }, this.h.hasSlot("icon") && (h("span", { class: AccordionItemClass.icon }, h("slot", { name: "icon" }))), h("span", { class: AccordionItemClass.title }, h("span", { class: AccordionItemClass.label }, h("slot", { name: "label" })), this.h.hasSlot("annotation") && (h("span", { class: AccordionItemClass.annotation }, h("slot", { name: "annotation" })))), this.h.hasSlot("suffix") && (h("span", { class: AccordionItemClass.suffix }, h("slot", { name: "suffix" }))), h("span", { class: AccordionItemClass.arrow }, this.h.hasSlot("toggle-icon") ? (h("slot", { name: "toggle-icon" })) : (h("gov-icon", { name: "chevron-down" })))), h("div", { class: AccordionItemClass.content, id: contentId, "aria-hidden": booleanString(!this.isExpanded), hidden: !this.isExpanded, "aria-labelledby": triggerId }, h("slot", null))));
|
|
81
59
|
}
|
|
82
60
|
/**
|
|
83
61
|
* Opening the accordion
|
|
84
62
|
*/
|
|
85
63
|
async open() {
|
|
86
|
-
this.
|
|
64
|
+
this.isExpanded = true;
|
|
87
65
|
this.emmitChange();
|
|
88
66
|
}
|
|
89
67
|
/**
|
|
90
68
|
* Closing the accordion
|
|
91
69
|
*/
|
|
92
70
|
async close() {
|
|
93
|
-
this.
|
|
71
|
+
this.isExpanded = false;
|
|
94
72
|
this.emmitChange();
|
|
95
73
|
}
|
|
96
74
|
/**
|
|
97
75
|
* Accordion switch
|
|
98
76
|
*/
|
|
99
77
|
async toggle() {
|
|
100
|
-
this.
|
|
78
|
+
this.isExpanded = !this.isExpanded;
|
|
101
79
|
this.emmitChange();
|
|
102
80
|
}
|
|
103
81
|
/**
|
|
104
82
|
* Returns the current state of the component
|
|
105
83
|
*/
|
|
106
84
|
async currentState() {
|
|
107
|
-
return this.
|
|
85
|
+
return this.isExpanded;
|
|
108
86
|
}
|
|
109
87
|
get host() { return getElement(this); }
|
|
110
88
|
static get watchers() { return {
|
|
111
|
-
"label": ["validateLabel"],
|
|
112
|
-
"triggerTag": ["validateTriggerTag"],
|
|
113
89
|
"size": ["validateSize"],
|
|
114
90
|
"variant": ["validateVariant"]
|
|
115
91
|
}; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-accordion-item.entry.js","mappings":"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","names":[],"sources":["../../../packages/core/src/components/gov-accordion/gov-accordion-item.scss?tag=gov-accordion-item","../../../packages/core/src/components/gov-accordion/gov-accordion-item.tsx"],"sourcesContent":["/*\n * Accordion - Item\n */\n\n$class: \".gov-accordion-item\";\n\n#{$class} {\n\t@include base();\n\t&__header {\n\t\t@include button-core();\n\t\t@include focus-outline();\n\t\tposition: relative;\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\talign-items: center;\n\t\twidth: 100%;\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t\ttext-transform: none;\n\t\ttransition: background-color $t ease-in-out;\n\t\t&::before {\n\t\t\t@include pseudo();\n\t\t\tright: 0;\n\t\t\tbottom: -1px;\n\t\t\tleft: 0;\n\t\t\theight: 1px;\n\t\t}\n\n\t\t// STATES\n\t\t&:focus-visible {\n\t\t\t&::before {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t\t@include parameter(\"aria-expanded\") {\n\t\t\t#{$class} {\n\t\t\t\t&__arrow {\n\t\t\t\t\ttransform: scale(-1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t&__arrow {\n\t\tflex: 0 0 auto;\n\t\talign-self: center;\n\t}\n\t&__icon {\n\t\tdisplay: inline-flex;\n\t\tvertical-align: middle;\n\t\tflex: 0 0 auto;\n\t}\n\t&__suffix {\n\t\tdisplay: inline-flex;\n\t\tvertical-align: middle;\n\t\tflex: 0 0 auto;\n\t\talign-self: start;\n\t\tmargin-left: auto;\n\t\tline-height: initial;\n\t}\n\t&__title {\n\t\t@include general;\n\t\tdisplay: flex;\n\t\tflex: 1 1 auto;\n\t\talign-items: flex-start;\n\t}\n\t&__name {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n\t&__annot {\n\t\tcolor: color(\"secondary\");\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $accordion-sizes {\n\t\t&[size=\"#{$size}\"],\n\t\t& #{$class}[size=\"#{$size}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__header {\n\t\t\t\t\tgap: get(\"headline-gap\", $definitions);\n\t\t\t\t\tmin-height: get(\"min-height\", $definitions);\n\t\t\t\t\tpadding: get(\"padding-y\", $definitions) get(\"padding-x\", $definitions);\n\t\t\t\t}\n\t\t\t\t&__arrow {\n\t\t\t\t\twidth: get(\"icon-size\", $definitions);\n\t\t\t\t\theight: get(\"icon-size\", $definitions);\n\t\t\t\t}\n\t\t\t\t&__icon {\n\t\t\t\t\twidth: calc(get-font-size(get(\"font\", $definitions)) * 1.2);\n\t\t\t\t\theight: calc(get-font-size(get(\"font\", $definitions)) * 1.2);\n\t\t\t\t\ttransform: translateY(get(\"icon-position\", $definitions));\n\t\t\t\t}\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(get(\"font\", $definitions));\n\t\t\t\t\tgap: get(\"headline-gap\", $definitions);\n\t\t\t\t}\n\t\t\t\t&__annot {\n\t\t\t\t\t@include typography(get(\"font-annot\", $definitions));\n\t\t\t\t}\n\t\t\t\t&__content {\n\t\t\t\t\tpadding: get(\"padding-inner\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $definitions in $accordion-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__header {\n\t\t\t\t\tbackground-color: get(\"background\", $definitions);\n\t\t\t\t\tcolor: get(\"color\", $definitions);\n\t\t\t\t\t&::before {\n\t\t\t\t\t\tbackground-color: get(\"separator\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t\t@include hover() {\n\t\t\t\t\t\tbackground-color: get(\"background-hover\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"disabled\") {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__header {\n\t\t\t\t\t\tcolor: get(\"disabled-color\", $definitions);\n\t\t\t\t\t\t@include hover() {\n\t\t\t\t\t\t\tbackground: transparent;\n\t\t\t\t\t\t\tcursor: not-allowed;\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// MQ\n\t@include mq($until: md) {\n\t\t&__title {\n\t\t\tflex-wrap: wrap;\n\t\t}\n\t\t&__label {\n\t\t\tflex: 0 0 auto;\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 {\n\tAccordionSizeType,\n\tAccordionSizes,\n\tAccordionItemClass,\n\tAccordionVariantType,\n\tAccordionVariants, AccordionClass,\n} from \"./constants\"\nimport { createID } from \"../../utils/string.utils\"\nimport { booleanString, toBoolAttrIfDefined } from \"../../helpers/Dom/template\"\nimport { AccordionItemEvent } from \"./gov-accordion.types\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\n\n@Component({\n\ttag: \"gov-accordion-item\",\n\tstyleUrl: \"gov-accordion-item.scss\",\n})\nexport class GovAccordionItem {\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID(\"GovAccordionItem\")\n\t\tthis.contentId = createID(\"GovAccordionContent\")\n\t}\n\n\t@Element() readonly host: HTMLGovAccordionItemElement\n\t@State() isExpandedState: boolean\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop({mutable: true}) variant?: AccordionVariantType = \"primary\"\n\t/**\n\t * Custom accordion item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Accordion’s size.\n\t */\n\t@Prop({mutable: true}) size?: AccordionSizeType\n\t/**\n\t * Item name of the accordion\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Item annotation of the accordion\n\t */\n\t@Prop() readonly annotation: string\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Defines whether the accordion is open or closed by default\n\t */\n\t@Prop({ attribute: \"is-expanded\" }) readonly isExpanded: boolean = 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: \"trigger-tag\" }) readonly triggerTag: string = \"h3\"\n\t/**\n\t * To remove the main underline of an item\n\t */\n\t@Prop({ attribute: \"no-border\" }) readonly noBorder: boolean = false\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<AccordionItemEvent>\n\n\t@Watch(\"label\")\n\tvalidateLabel(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${AccordionItemClass.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(`[${AccordionItemClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(AccordionSizes, newValue, AccordionItemClass.root)\n\t}\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(AccordionVariants, newValue, AccordionItemClass.root)\n\t}\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({\n\t\t\topen: this.isExpandedState,\n\t\t\tcomponent: AccordionItemClass.root,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.isExpandedState = this.isExpanded\n\t\tthis.getPropsFromParents()\n\n\t\tthis.validateLabel(this.label)\n\t\tthis.validateTriggerTag(this.triggerTag)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateVariant(this.variant)\n\n\t}\n\n\tgetPropsFromParents() {\n\t\tconst accordion = this.h.getParent(AccordionClass.root)\n\t\tif(accordion) {\n\t\t\tthis.size = accordion.getAttribute('size') as AccordionSizeType\n\t\t\tthis.variant = accordion.getAttribute('variant') as AccordionVariantType\n\t\t}\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst contentId = this.contentId\n\t\tconst { isExpandedState, label } = this\n\t\tconst TriggerTag = this.triggerTag\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AccordionItemClass.root)} no-border={this.noBorder} size={this.size} variant={this.variant} role=\"listitem\">\n\t\t\t\t<button\n\t\t\t\t\tid={triggerId}\n\t\t\t\t\tclass={AccordionItemClass.header}\n\t\t\t\t\taria-expanded={booleanString(isExpandedState)}\n\t\t\t\t\taria-controls={contentId}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\ttype={'button'}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\tonClick={(e: Event) => {\n\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\tthis.toggle().finally()\n\t\t\t\t\t}}>\n\t\t\t\t\t<TriggerTag class={AccordionItemClass.title}>\n\t\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t\t<span class={AccordionItemClass.icon}>\n\t\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<span class={AccordionItemClass.name}>\n\t\t\t\t\t\t\t<span class={AccordionItemClass.label}>{label}</span>\n\t\t\t\t\t\t\t{this.annotation && <span class={AccordionItemClass.annot}>{this.annotation}</span>}\n\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t{this.h.hasSlot(\"suffix\") && (\n\t\t\t\t\t\t\t<span class={AccordionItemClass.suffix}>\n\t\t\t\t\t\t\t\t<slot name=\"suffix\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TriggerTag>\n\n\t\t\t\t\t<gov-icon class={AccordionItemClass.arrow} name=\"chevron-down\"></gov-icon>\n\t\t\t\t</button>\n\t\t\t\t<div\n\t\t\t\t\tclass={AccordionItemClass.content}\n\t\t\t\t\tid={contentId}\n\t\t\t\t\taria-hidden={booleanString(!isExpandedState)}\n\t\t\t\t\thidden={!isExpandedState}\n\t\t\t\t\taria-labelledby={triggerId}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Opening the accordion\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpandedState = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the accordion\n\t */\n\t@Method()\n\tasync close(): Promise<void> {\n\t\tthis.isExpandedState = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Accordion switch\n\t */\n\t@Method()\n\tasync toggle(): Promise<void> {\n\t\tthis.isExpandedState = !this.isExpandedState\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * 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"],"version":3}
|
|
1
|
+
{"file":"gov-accordion-item.entry.js","mappings":"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","names":[],"sources":["../../../packages/core/src/components/gov-accordion/gov-accordion-item.scss?tag=gov-accordion-item","../../../packages/core/src/components/gov-accordion/gov-accordion-item.tsx"],"sourcesContent":["/*\n * Accordion - Item\n */\n\n$class: \".gov-accordion-item\";\n\n#{$class} {\n\t@include base();\n\t&::before {\n\t\t@include pseudo();\n\t\tright: 0;\n\t\tbottom: -1px;\n\t\tleft: 0;\n\t\theight: 1px;\n\t\tbackground-color: color(\"secondary.500\");\n\t}\n\n\t&__header {\n\t\t@include button-core();\n\t\t@include focus-outline();\n\t\t@include general;\n\t\tposition: relative;\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\talign-items: flex-start;\n\t\twidth: 100%;\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t\ttext-transform: none;\n\t\ttransition: background-color $t ease-in-out;\n\n\t\t// STATES\n\t\t&:focus-visible {\n\t\t\t&::before {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t\t@include parameter(\"aria-expanded\") {\n\t\t\t#{$class} {\n\t\t\t\t&__arrow gov-icon:not([slot=\"toggle-icon\"]) {\n\t\t\t\t\ttransform: scale(-1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t&__arrow {\n\t\tflex: 0 0 auto;\n\t\talign-self: center;\n\t\tmargin-left: auto;\n\t}\n\t&__icon {\n\t\tdisplay: inline-flex;\n\t\tvertical-align: middle;\n\t\tflex: 0 0 auto;\n\t}\n\t&__suffix {\n\t\tdisplay: inline-flex;\n\t\tvertical-align: middle;\n\t\tflex: 0 0 auto;\n\t\talign-self: start;\n\t\tmargin-left: auto;\n\t\tline-height: initial;\n\t}\n\t&__title {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n\t&__label * {\n\t\tmargin-bottom: 0;\n\t\ttransform: translateY(1px);\n\t}\n\t&__annotation * {\n\t\tcolor: color(\"secondary\");\n\t\tmargin-bottom: 0;\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $accordion-sizes {\n\t\t&[size=\"#{$size}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__header {\n\t\t\t\t\tgap: get(\"headline-gap\", $definitions);\n\t\t\t\t\tmin-height: get(\"min-height\", $definitions);\n\t\t\t\t\tpadding: get(\"padding-y\", $definitions) get(\"padding-x\", $definitions);\n\t\t\t\t}\n\t\t\t\t&__label * {\n\t\t\t\t\t@include typography(get(\"font\", $definitions));\n\t\t\t\t}\n\t\t\t\t&__arrow {\n\t\t\t\t\twidth: get(\"icon-size\", $definitions);\n\t\t\t\t\theight: get(\"icon-size\", $definitions);\n\t\t\t\t}\n\t\t\t\t&__icon {\n\t\t\t\t\twidth: calc(get-font-size(get(\"font\", $definitions)) * 1.2);\n\t\t\t\t\theight: calc(get-font-size(get(\"font\", $definitions)) * 1.2);\n\t\t\t\t\ttransform: translateY(get(\"icon-position\", $definitions));\n\t\t\t\t}\n\t\t\t\t&__annotation {\n\t\t\t\t\t@include typography(get(\"font-annotation\", $definitions));\n\t\t\t\t}\n\t\t\t\t&__content {\n\t\t\t\t\tpadding: get(\"padding-inner\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $definitions in $accordion-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&::before {\n\t\t\t\t\tbackground-color: get(\"separator\", $definitions);\n\t\t\t\t}\n\t\t\t\t&__header {\n\t\t\t\t\tbackground-color: get(\"background\", $definitions);\n\t\t\t\t\tcolor: get(\"color\", $definitions);\n\t\t\t\t\t@include hover() {\n\t\t\t\t\t\tbackground-color: get(\"background-hover\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"disabled\") {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__header {\n\t\t\t\t\t\tcolor: get(\"disabled-color\", $definitions);\n\t\t\t\t\t\t@include hover() {\n\t\t\t\t\t\t\tbackground: transparent;\n\t\t\t\t\t\t\tcursor: not-allowed;\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// MQ\n\t@include mq($until: md) {\n\t\t&__title {\n\t\t\tflex-wrap: wrap;\n\t\t}\n\t\t&__label {\n\t\t\tflex: 0 0 auto;\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport {\n\tAccordionClass,\n\tAccordionItemClass,\n\tAccordionSizes,\n\tAccordionSizeType,\n\tAccordionVariants,\n\tAccordionVariantType,\n} from \"./constants\"\nimport { createID } from \"../../utils/string.utils\"\nimport { booleanString, govHost, toBoolAttrIfDefined } from \"../../helpers/Dom/template\"\nimport { AccordionItemEvent } from \"./gov-accordion.types\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\n\n@Component({\n\ttag: \"gov-accordion-item\",\n\tstyleUrl: \"gov-accordion-item.scss\",\n})\nexport class GovAccordionItem {\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID(\"GovAccordionItem\")\n\t\tthis.contentId = createID(\"GovAccordionContent\")\n\t}\n\n\t@Element() readonly host: HTMLGovAccordionItemElement\n\t@State() isExpandedState: boolean\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() variant?: AccordionVariantType\n\t/**\n\t * Custom accordion item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Accordion’s size.\n\t */\n\t@Prop() size?: AccordionSizeType\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * 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 * Called when the accordion state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<AccordionItemEvent>\n\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(AccordionSizes, newValue, AccordionItemClass.root)\n\t}\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(AccordionVariants, newValue, AccordionItemClass.root)\n\t}\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({\n\t\t\topen: this.isExpanded,\n\t\t\tcomponent: AccordionItemClass.root,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.getPropsFromParents()\n\t\tthis.validateSize(this.size)\n\t\tthis.validateVariant(this.variant)\n\n\t}\n\n\tgetPropsFromParents() {\n\t\tconst accordion = this.h.getParent(AccordionClass.root)\n\t\tif (accordion) {\n\t\t\tthis.size = accordion.getAttribute(\"size\") as AccordionSizeType\n\t\t\tthis.variant = accordion.getAttribute(\"variant\") as AccordionVariantType\n\t\t}\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst contentId = this.contentId\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AccordionItemClass.root)} size={this.size} variant={this.variant} role=\"listitem\">\n\t\t\t\t<button\n\t\t\t\t\tid={triggerId}\n\t\t\t\t\tclass={AccordionItemClass.header}\n\t\t\t\t\taria-expanded={booleanString(this.isExpanded)}\n\t\t\t\t\taria-controls={contentId}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\ttype={\"button\"}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\tonClick={(e: Event) => {\n\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\tthis.toggle().finally()\n\t\t\t\t\t}}>\n\n\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t<span class={AccordionItemClass.icon}>\n\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<span class={AccordionItemClass.title}>\n\t\t\t\t\t\t<span class={AccordionItemClass.label}>\n\t\t\t\t\t\t\t<slot name=\"label\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t{this.h.hasSlot(\"annotation\") && (\n\t\t\t\t\t\t\t<span class={AccordionItemClass.annotation}>\n\t\t\t\t\t\t\t\t<slot name=\"annotation\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\n\t\t\t\t\t{this.h.hasSlot(\"suffix\") && (\n\t\t\t\t\t\t<span class={AccordionItemClass.suffix}>\n\t\t\t\t\t\t\t<slot name=\"suffix\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<span class={AccordionItemClass.arrow}>\n\t\t\t\t\t\t{this.h.hasSlot(\"toggle-icon\") ? (\n\t\t\t\t\t\t\t<slot name=\"toggle-icon\" />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<gov-icon name=\"chevron-down\"></gov-icon>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\t\t\t\t<div\n\t\t\t\t\tclass={AccordionItemClass.content}\n\t\t\t\t\tid={contentId}\n\t\t\t\t\taria-hidden={booleanString(!this.isExpanded)}\n\t\t\t\t\thidden={!this.isExpanded}\n\t\t\t\t\taria-labelledby={triggerId}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Opening the accordion\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 accordion\n\t */\n\t@Method()\n\tasync close(): Promise<void> {\n\t\tthis.isExpanded = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Accordion switch\n\t */\n\t@Method()\n\tasync 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\tasync currentState(): Promise<boolean> {\n\t\treturn this.isExpanded\n\t}\n}\n"],"version":3}
|