@gov-design-system-ce/components 0.0.52 → 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 +1 -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/package.json +2 -2
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-tabs.entry.cjs.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,UAAU,GAAG,q1JAAq1J;;MCiB31J,OAAO;EAOnB;;;IALQ,gBAAW,GAAyC,EAAE,CAAA;sBAWhB,EAAE;sBAC1B,CAAC;2BACI,KAAK;gBAIC,MAAM;mBAIE,SAAS;uBAIC,YAAY;;;;IAnB9D,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,YAAY,GAAGC,qBAAQ,CAAC,cAAc,CAAC,CAAA;GAC5C;EAoCD,YAAY,CAAC,QAAgB;IAC5BC,kBAAY,CAACC,kBAAQ,EAAE,QAAQ,EAAEC,mBAAS,CAAC,IAAI,CAAC,CAAA;GAChD;EAED,eAAe,CAAC,QAAgB;IAC/BF,kBAAY,CAACG,qBAAW,EAAE,QAAQ,EAAED,mBAAS,CAAC,IAAI,CAAC,CA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3C;;;;EAMD,MAAM,YAAY,CAAC,UAAkB;IACpC,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAA;IACtC,IAAI,CAAC,QAAQ,EAAE,CAAA;GACf;;;;EAMD,MAAM,YAAY;IACjBI,qBAAgB,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAEV,mBAAS,CAAC,IAAI,CAAC,CAAA;IAC3EW,sBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAEX,mBAAS,CAAC,IAAI,CAAC,CAAA;GACtE;;;;;;;;;;;","names":["govHost","createID","validateProp","TabTypes","TabsClass","TabVariants","canValidateWcagOnRender","delay","TabsItemClass","throttle","h","Host","toBoolAttr","index","validateWcagProp","validateWcagLabel"],"sources":["../../../packages/core/src/components/gov-tabs/gov-tabs.scss?tag=gov-tabs","../../../packages/core/src/components/gov-tabs/gov-tabs.tsx"],"sourcesContent":["/*\n * Tabs\n */\n\n$class: \".gov-tabs\";\n\n#{$class} {\n\t@include base();\n\t&__list {\n\t\t@extend %reset-ul;\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tmargin: rem-calc(0 0 20);\n\t}\n\t&__list > &__item {\n\t\t@extend %reset-ul-li;\n\t\tdisplay: flex;\n\t\tmargin: 0;\n\t}\n\t&__btn {\n\t\t@include typography($font-size-s);\n\t\t@include button-core();\n\t\t@include focus-outline();\n\t\tmargin: 0;\n\t\tpadding: rem-calc(12 0 10);\n\t\tborder-bottom: rem-calc(2) solid transparent;\n\t\tfont-weight: 700;\n\t\ttext-align: center;\n\t\ttext-transform: uppercase;\n\t\ttransition: $t linear color, $t linear border-color;\n\t}\n\n\t// VARIANTS\n\t@each $type, $definitions in $tabs-types {\n\t\t&[type=\"#{$type}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__list {\n\t\t\t\t\tgap: get(\"item-spacing\", $definitions);\n\t\t\t\t\t@if deep-map-check($definitions, \"border\") {\n\t\t\t\t\t\tborder-bottom: $tabs-list-border;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $definitions in $tabs-variants {\n\t\t&[variant=\"#{$variant}\"][type=\"text\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__btn {\n\t\t\t\t\tcolor: get(\"color\", $definitions);\n\t\t\t\t\t@include hover() {\n\t\t\t\t\t\tcolor: get(\"color-hover\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// STATES\n\t\t\t\t&__btn[aria-selected=\"true\"] {\n\t\t\t\t\tborder-bottom-color: get(\"color-active\", $definitions);\n\t\t\t\t\tcolor: get(\"color-active\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t&[orientation=\"vertical\"] {\n\t\t#{$class}__btn {\n\t\t\ttext-align: left;\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: xl) {\n\t\t&[orientation=\"vertical\"] {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\n\t\t\t#{$class}__list {\n\t\t\t\tflex-wrap: nowrap;\n\t\t\t\tflex-direction: column;\n\t\t\t\twidth: max-content;\n\t\t\t\tmax-width: 30vw;\n\t\t\t\tmargin-right: rem-calc(20);\n\t\t\t\tpadding: rem-calc(0 8);\n\t\t\t\tborder-bottom: none;\n\t\t\t\tborder-right: $tabs-list-border;\n\t\t\t}\n\n\t\t\t#{$class}__item {\n\t\t\t\tjustify-content: flex-end;\n\t\t\t}\n\n\t\t\t#{$class}__btn {\n\t\t\t\tpadding: rem-calc(8 12);\n\t\t\t\ttext-align: right;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Host, h, State, Method, Event, EventEmitter, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { TabsItemClass, TabVariants, VariantType } from './constants'\nimport { GovTabControllerItem } from './gov-tabs.types'\nimport { govHost, toBoolAttr } from '../../helpers/Dom/template'\nimport { validateWcagLabel, validateWcagProp } from '../../helpers/Validate/wcag'\nimport { TabsClass, TabType, TabTypes, TabOrientationType } from './constants'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay, throttle } from '../../utils/utils'\nimport { createID } from '../../utils/string.utils'\nimport { Nullable } from '../../types/interfaces'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-tabs',\n\tstyleUrl: 'gov-tabs.scss',\n})\nexport class GovTabs {\n\tprivate h: GovHost\n\tprivate triggerRefs: { [key: string]: HTMLButtonElement } = {}\n\tprivate tabsRef?: HTMLDivElement\n\n\tprivate readonly formSelectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.formSelectId = createID('GovForSelect')\n\t}\n\n\t@Element() host: HTMLGovTabsElement\n\t@State() controller: GovTabControllerItem[] = []\n\t@State() focusIndex = 0\n\t@State() compactControls = false\n\t/**\n\t * Tabs type\n\t */\n\t@Prop() readonly type: TabType = 'text'\n\t/**\n\t * Style variation of the tab badges.\n\t */\n\t@Prop() readonly variant?: VariantType = 'primary'\n\t/**\n\t * Tabs orientation\n\t */\n\t@Prop() readonly orientation: TabOrientationType = 'horizontal'\n\t/**\n\t * Adds accessible label for the tabs that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * Adds accessible label for the tabs select\n\t */\n\t@Prop({ attribute: 'wcag-select-label' }) readonly wcagSelectLabel: string\n\t/**\n\t * Indicates the id of a component that labels the tabs.\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when the tab is changed.\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<HTMLGovTabsItemElement>\n\n\t@Watch('type')\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(TabTypes, newValue, TabsClass.root)\n\t}\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(TabVariants, newValue, TabsClass.root)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.prepareDataSource()\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\n\t\tthis.resizeObserver()\n\t}\n\n\tprivate prepareDataSource(): void {\n\t\tthis.controller = []\n\t\tconst promises: Promise<GovTabControllerItem>[] = []\n\t\tthis.host.querySelectorAll(TabsItemClass.root).forEach((tab: HTMLGovTabsItemElement) => {\n\t\t\tconst controlItem = Promise.all([tab.getIdentifier(), tab.getTriggerIdentifier()]).then(([identifier, triggerIdentifier]) => {\n\t\t\t\tconst isDefault = typeof tab.getAttribute('default') === 'string'\n\t\t\t\treturn {\n\t\t\t\t\tlabel: tab.getAttribute('label'),\n\t\t\t\t\tcontentIdentifier: identifier,\n\t\t\t\t\ttriggerIdentifier: triggerIdentifier,\n\t\t\t\t\telement: tab,\n\t\t\t\t\tactive: false,\n\t\t\t\t\tdefault: isDefault,\n\t\t\t\t}\n\t\t\t})\n\t\t\tpromises.push(controlItem)\n\t\t})\n\t\tPromise.all(promises).then(controllers => {\n\t\t\tlet defaultTab = controllers.findIndex(controller => controller.default)\n\t\t\tif (defaultTab === -1) defaultTab = 0\n\t\t\tthis.focusIndex = defaultTab\n\t\t\tcontrollers[defaultTab].active = true\n\t\t\tthis.controller = [...controllers]\n\t\t\tthis.reRender()\n\t\t})\n\t}\n\n\tprivate setActiveByIdentifier(identifier: string) {\n\t\tconst temp = []\n\t\tthis.controller.map(item => {\n\t\t\titem.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier\n\t\t\ttemp.push(item)\n\t\t})\n\t\tthis.controller = [...temp]\n\t}\n\n\tprivate reRender() {\n\t\tthis.controller.map(control => {\n\t\t\tcontrol.element.setActiveStatus(control.active)\n\t\t})\n\t}\n\n\t/*\n\tprivate evaluateControls() {\n\t\tthis.compactControls = false\n\t\tlet sumOfWidth = this.tabsRef.querySelector(\"ul\").offsetWidth\n\t\tthis.compactControls = this.tabsRef.offsetWidth < sumOfWidth\n\t}\n\t*/\n\n\tprivate resizeObserver() {\n\t\tconst resizeObserver = new ResizeObserver(\n\t\t\tthrottle(() => {\n\t\t\t\t// this.evaluateControls()\n\t\t\t}, 200)\n\t\t)\n\n\t\tresizeObserver.observe(this.tabsRef)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TabsClass.root)}\n\t\t\t\tvariant={this.variant}\n\t\t\t\ttype={this.type}\n\t\t\t\trole=\"tablist\"\n\t\t\t\tref={el => (this.tabsRef = el as HTMLDivElement)}\n\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\tonKeyDown={this.onKeydownHandler.bind(this)}\n\t\t\t>\n\t\t\t\t<div class={TabsClass.tabs} aria-hidden={toBoolAttr(this.compactControls)}>\n\t\t\t\t\t<ul class={TabsClass.list}>\n\t\t\t\t\t\t{this.controller.map((control, index) => (\n\t\t\t\t\t\t\t<li class={TabsClass.item}>\n\t\t\t\t\t\t\t\t{this.type == 'text' ? (\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass={TabsClass.btn}\n\t\t\t\t\t\t\t\t\t\tid={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(control, index)}\n\t\t\t\t\t\t\t\t\t\taria-selected={toBoolAttr(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\ttabindex={control.active ? -1 : 0}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLButtonElement)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<gov-badge\n\t\t\t\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\t\t\t\ttype={toBoolAttr(control.active) == 'true' ? 'solid' : 'outlined'}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onSelectHandler(control, index)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t</gov-badge>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\n\t\t\t\t<span id={this.formSelectId} hidden>\n\t\t\t\t\t{this.wcagSelectLabel}\n\t\t\t\t</span>\n\t\t\t\t{this.compactControls ? (\n\t\t\t\t\t<gov-form-select wcag-labelled-by={this.formSelectId} onGov-change={this.onChangeHandler.bind(this)}>\n\t\t\t\t\t\t{this.controller.map(control => (\n\t\t\t\t\t\t\t<option value={control.triggerIdentifier} selected={control.active}>\n\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</gov-form-select>\n\t\t\t\t) : null}\n\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate getCurrentTab(): GovTabControllerItem | null {\n\t\treturn this.controller.find(control => control.active) || null\n\t}\n\n\tprivate onSelectHandler(control: GovTabControllerItem, index: number) {\n\t\tthis.focusIndex = index\n\t\tthis.setActiveByIdentifier(control.triggerIdentifier)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onChangeHandler(e: CustomEvent) {\n\t\tconst triggerId = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.setActiveByIdentifier(triggerId)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onKeydownHandler(e: KeyboardEvent) {\n\t\tconst keyCode = e.keyCode\n\t\te.stopPropagation()\n\t\tif (keyCode === 39 || keyCode === 37) {\n\t\t\tif (false === (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.controller[this.focusIndex].active = false\n\t\t\tif (keyCode === 39) {\n\t\t\t\tthis.focusIndex++\n\t\t\t\tif (this.focusIndex >= this.controller.length) {\n\t\t\t\t\tthis.focusIndex = 0\n\t\t\t\t}\n\t\t\t} else if (keyCode === 37) {\n\t\t\t\tthis.focusIndex--\n\t\t\t\tif (this.focusIndex < 0) {\n\t\t\t\t\tthis.focusIndex = this.controller.length - 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1) {\n\t\t\t\tconst current = this.controller[this.focusIndex]\n\t\t\t\tcurrent.active = true\n\t\t\t\tthis.triggerRefs[current.triggerIdentifier].focus()\n\t\t\t\tthis.controller = [...this.controller]\n\t\t\t\tthis.reRender()\n\t\t\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync refresh(): Promise<void> {\n\t\tthis.prepareDataSource()\n\t}\n\n\t/**\n\t * Returns the currently selected tabs-item\n\t */\n\t@Method()\n\tasync currentTab(): Promise<Nullable<HTMLGovTabsItemElement>> {\n\t\treturn this.getCurrentTab().element || null\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync setActiveTab(identifier: string): Promise<void> {\n\t\tthis.setActiveByIdentifier(identifier)\n\t\tthis.reRender()\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagProp(this.wcagSelectLabel, 'wcag-select-label', TabsClass.root)\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, TabsClass.root)\n\t}\n}\n"],"version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IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QAChD,OAAO,CAAC,MAAM,GAAG,IAAI,CAAA;QACrB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,KAAK,EAAE,CAAA;QACnD,IAAI,CAAC,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,CAAA;QACtC,IAAI,CAAC,QAAQ,EAAE,CAAA;QACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,CAAA;OACjD;KACD;GACD;;;;EAMD,MAAM,OAAO;IACZ,IAAI,CAAC,iBAAiB,EAAE,CAAA;GACxB;;;;EAMD,MAAM,UAAU;IACf,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,IAAI,IAAI,CAAA;GAC3C;;;;EAMD,MAAM,YAAY,CAAC,UAAkB;IACpC,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAA;IACtC,IAAI,CAAC,QAAQ,EAAE,CAAA;GACf;;;;EAMD,MAAM,YAAY;IACjBI,qBAAgB,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAEV,mBAAS,CAAC,IAAI,CAAC,CAAA;IAC3EW,sBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAEX,mBAAS,CAAC,IAAI,CAAC,CAAA;GACtE;;;;;;;;;;;","names":["govHost","createID","validateProp","TabTypes","TabsClass","TabVariants","canValidateWcagOnRender","delay","TabsItemClass","throttle","h","Host","toBoolAttr","index","validateWcagProp","validateWcagLabel"],"sources":["../../../packages/core/src/components/gov-tabs/gov-tabs.scss?tag=gov-tabs","../../../packages/core/src/components/gov-tabs/gov-tabs.tsx"],"sourcesContent":["/*\n * Tabs\n */\n\n$class: \".gov-tabs\";\n\n#{$class} {\n\t@include base();\n\t&__list {\n\t\t@extend %reset-ul;\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tmargin: rem-calc(0 0 20);\n\t}\n\t&__list > &__item {\n\t\t@extend %reset-ul-li;\n\t\tdisplay: flex;\n\t\tmargin: 0;\n\t}\n\t&__btn {\n\t\t@include typography($font-size-s);\n\t\t@include button-core();\n\t\t@include focus-outline();\n\t\tmargin: 0;\n\t\tpadding: rem-calc(12 0 10);\n\t\tborder-bottom: rem-calc(2) solid transparent;\n\t\tfont-weight: 700;\n\t\ttext-align: center;\n\t\ttext-transform: uppercase;\n\t\ttransition: $t linear color, $t linear border-color;\n\t}\n\n\t// VARIANTS\n\t@each $type, $definitions in $tabs-types {\n\t\t&[type=\"#{$type}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__list {\n\t\t\t\t\tgap: get(\"item-spacing\", $definitions);\n\t\t\t\t\t@if deep-map-check($definitions, \"border\") {\n\t\t\t\t\t\tborder-bottom: $tabs-list-border;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $definitions in $tabs-variants {\n\t\t&[variant=\"#{$variant}\"][type=\"text\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__btn {\n\t\t\t\t\tcolor: get(\"color\", $definitions);\n\t\t\t\t\t@include hover() {\n\t\t\t\t\t\tcolor: get(\"color-hover\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// STATES\n\t\t\t\t&__btn[aria-selected=\"true\"] {\n\t\t\t\t\tborder-bottom-color: get(\"color-active\", $definitions);\n\t\t\t\t\tcolor: get(\"color-active\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t&[orientation=\"vertical\"] {\n\t\t#{$class}__btn {\n\t\t\ttext-align: left;\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: xl) {\n\t\t&[orientation=\"vertical\"] {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\n\t\t\t#{$class}__list {\n\t\t\t\tflex-wrap: nowrap;\n\t\t\t\tflex-direction: column;\n\t\t\t\twidth: max-content;\n\t\t\t\tmax-width: 30vw;\n\t\t\t\tmargin-right: rem-calc(20);\n\t\t\t\tpadding: rem-calc(0 8);\n\t\t\t\tborder-bottom: none;\n\t\t\t\tborder-right: $tabs-list-border;\n\t\t\t}\n\n\t\t\t#{$class}__item {\n\t\t\t\tjustify-content: flex-end;\n\t\t\t}\n\n\t\t\t#{$class}__btn {\n\t\t\t\tpadding: rem-calc(8 12);\n\t\t\t\ttext-align: right;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Host, h, State, Method, Event, EventEmitter, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { TabsItemClass, TabVariants, VariantType } from './constants'\nimport { GovTabControllerItem } from './gov-tabs.types'\nimport { govHost, toBoolAttr } from '../../helpers/Dom/template'\nimport { validateWcagLabel, validateWcagProp } from '../../helpers/Validate/wcag'\nimport { TabsClass, TabType, TabTypes, TabOrientationType } from './constants'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay, throttle } from '../../utils/utils'\nimport { createID } from '../../utils/string.utils'\nimport { Nullable } from '../../types/interfaces'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-tabs',\n\tstyleUrl: 'gov-tabs.scss',\n})\nexport class GovTabs {\n\tprivate h: GovHost\n\tprivate triggerRefs: { [key: string]: HTMLButtonElement } = {}\n\tprivate tabsRef?: HTMLDivElement\n\n\tprivate readonly formSelectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.formSelectId = createID('GovForSelect')\n\t}\n\n\t@Element() host: HTMLGovTabsElement\n\t@State() controller: GovTabControllerItem[] = []\n\t@State() focusIndex = 0\n\t@State() compactControls = false\n\t/**\n\t * Tabs type\n\t */\n\t@Prop() readonly type: TabType = 'text'\n\t/**\n\t * Style variation of the tab badges.\n\t */\n\t@Prop() readonly variant?: VariantType = 'primary'\n\t/**\n\t * Tabs orientation\n\t */\n\t@Prop() readonly orientation: TabOrientationType = 'horizontal'\n\t/**\n\t * Adds accessible label for the tabs that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * Adds accessible label for the tabs select\n\t */\n\t@Prop({ attribute: 'wcag-select-label' }) readonly wcagSelectLabel: string\n\t/**\n\t * Indicates the id of a component that labels the tabs.\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when the tab is changed.\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<HTMLGovTabsItemElement>\n\n\t@Watch('type')\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(TabTypes, newValue, TabsClass.root)\n\t}\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(TabVariants, newValue, TabsClass.root)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.prepareDataSource()\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\n\t\tthis.resizeObserver()\n\t}\n\n\tprivate prepareDataSource(): void {\n\t\tthis.controller = []\n\t\tconst promises: Promise<GovTabControllerItem>[] = []\n\t\tthis.host.querySelectorAll(TabsItemClass.root).forEach((tab: HTMLGovTabsItemElement) => {\n\t\t\tconst controlItem = Promise.all([tab.getIdentifier(), tab.getTriggerIdentifier()]).then(([identifier, triggerIdentifier]) => {\n\t\t\t\tconst isDefault = typeof tab.getAttribute('default') === 'string'\n\t\t\t\treturn {\n\t\t\t\t\tlabel: tab.getAttribute('label'),\n\t\t\t\t\tcontentIdentifier: identifier,\n\t\t\t\t\ttriggerIdentifier: triggerIdentifier,\n\t\t\t\t\telement: tab,\n\t\t\t\t\tactive: false,\n\t\t\t\t\tdefault: isDefault,\n\t\t\t\t}\n\t\t\t})\n\t\t\tpromises.push(controlItem)\n\t\t})\n\t\tPromise.all(promises).then(controllers => {\n\t\t\tlet defaultTab = controllers.findIndex(controller => controller.default)\n\t\t\tif (defaultTab === -1) defaultTab = 0\n\t\t\tthis.focusIndex = defaultTab\n\t\t\tcontrollers[defaultTab].active = true\n\t\t\tthis.controller = [...controllers]\n\t\t\tthis.reRender()\n\t\t})\n\t}\n\n\tprivate setActiveByIdentifier(identifier: string) {\n\t\tconst temp = []\n\t\tthis.controller.map(item => {\n\t\t\titem.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier\n\t\t\ttemp.push(item)\n\t\t})\n\t\tthis.controller = [...temp]\n\t}\n\n\tprivate reRender() {\n\t\tthis.controller.map(control => {\n\t\t\tcontrol.element.setActiveStatus(control.active)\n\t\t})\n\t}\n\n\t/*\n\tprivate evaluateControls() {\n\t\tthis.compactControls = false\n\t\tlet sumOfWidth = this.tabsRef.querySelector(\"ul\").offsetWidth\n\t\tthis.compactControls = this.tabsRef.offsetWidth < sumOfWidth\n\t}\n\t*/\n\n\tprivate resizeObserver() {\n\t\tconst resizeObserver = new ResizeObserver(\n\t\t\tthrottle(() => {\n\t\t\t\t// this.evaluateControls()\n\t\t\t}, 200)\n\t\t)\n\n\t\tresizeObserver.observe(this.tabsRef)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TabsClass.root)}\n\t\t\t\tvariant={this.variant}\n\t\t\t\ttype={this.type}\n\t\t\t\trole=\"tablist\"\n\t\t\t\tref={el => (this.tabsRef = el as HTMLDivElement)}\n\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\tonKeyDown={this.onKeydownHandler.bind(this)}\n\t\t\t>\n\t\t\t\t<div class={TabsClass.tabs} aria-hidden={toBoolAttr(this.compactControls)}>\n\t\t\t\t\t<ul class={TabsClass.list}>\n\t\t\t\t\t\t{this.controller.map((control, index) => (\n\t\t\t\t\t\t\t<li class={TabsClass.item}>\n\t\t\t\t\t\t\t\t{this.type == 'text' ? (\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass={TabsClass.btn}\n\t\t\t\t\t\t\t\t\t\tid={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(control, index)}\n\t\t\t\t\t\t\t\t\t\taria-selected={toBoolAttr(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\ttabindex={control.active ? -1 : 0}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLButtonElement)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<gov-badge\n\t\t\t\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\t\t\t\tinverse={control.active}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onSelectHandler(control, index)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t</gov-badge>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\n\t\t\t\t<span id={this.formSelectId} hidden>\n\t\t\t\t\t{this.wcagSelectLabel}\n\t\t\t\t</span>\n\t\t\t\t{this.compactControls ? (\n\t\t\t\t\t<gov-form-select wcag-labelled-by={this.formSelectId} onGov-change={this.onChangeHandler.bind(this)}>\n\t\t\t\t\t\t{this.controller.map(control => (\n\t\t\t\t\t\t\t<option value={control.triggerIdentifier} selected={control.active}>\n\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</gov-form-select>\n\t\t\t\t) : null}\n\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate getCurrentTab(): GovTabControllerItem | null {\n\t\treturn this.controller.find(control => control.active) || null\n\t}\n\n\tprivate onSelectHandler(control: GovTabControllerItem, index: number) {\n\t\tthis.focusIndex = index\n\t\tthis.setActiveByIdentifier(control.triggerIdentifier)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onChangeHandler(e: CustomEvent) {\n\t\tconst triggerId = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.setActiveByIdentifier(triggerId)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onKeydownHandler(e: KeyboardEvent) {\n\t\tconst keyCode = e.keyCode\n\t\te.stopPropagation()\n\t\tif (keyCode === 39 || keyCode === 37) {\n\t\t\tif (false === (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.controller[this.focusIndex].active = false\n\t\t\tif (keyCode === 39) {\n\t\t\t\tthis.focusIndex++\n\t\t\t\tif (this.focusIndex >= this.controller.length) {\n\t\t\t\t\tthis.focusIndex = 0\n\t\t\t\t}\n\t\t\t} else if (keyCode === 37) {\n\t\t\t\tthis.focusIndex--\n\t\t\t\tif (this.focusIndex < 0) {\n\t\t\t\t\tthis.focusIndex = this.controller.length - 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1) {\n\t\t\t\tconst current = this.controller[this.focusIndex]\n\t\t\t\tcurrent.active = true\n\t\t\t\tthis.triggerRefs[current.triggerIdentifier].focus()\n\t\t\t\tthis.controller = [...this.controller]\n\t\t\t\tthis.reRender()\n\t\t\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync refresh(): Promise<void> {\n\t\tthis.prepareDataSource()\n\t}\n\n\t/**\n\t * Returns the currently selected tabs-item\n\t */\n\t@Method()\n\tasync currentTab(): Promise<Nullable<HTMLGovTabsItemElement>> {\n\t\treturn this.getCurrentTab().element || null\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync setActiveTab(identifier: string): Promise<void> {\n\t\tthis.setActiveByIdentifier(identifier)\n\t\tthis.reRender()\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagProp(this.wcagSelectLabel, 'wcag-select-label', TabsClass.root)\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, TabsClass.root)\n\t}\n}\n"],"version":3}
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ const index = require('./index-83edd4fe.js');
|
|
|
6
6
|
|
|
7
7
|
const defineCustomElements = (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
9
|
-
return index.bootstrapLazy(JSON.parse("[[\"gov-form-file.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[4,\"gov-loading\",{\"loading\":[4]}]]],[\"gov-side-nav-item.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[4,\"gov-tile\",{\"promotion\":[4],\"href\":[1],\"name\":[1],\"getTriggerRef\":[64]}]]],[\"gov-wizzard-item.cjs\",[[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.cjs\",[[4,\"gov-accordion\",{\"size\":[1],\"variant\":[1],\"noBorder\":[4,\"no-border\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-app.cjs\",[[0,\"gov-app\"]]],[\"gov-breadcrumbs.cjs\",[[4,\"gov-breadcrumbs\",{\"collapsible\":[4],\"isExpanded\":[4,\"is-expanded\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelded-by\"],\"validateWcag\":[64]}]]],[\"gov-container.cjs\",[[4,\"gov-container\",{\"slottedChildren\":[64]}]]],[\"gov-control-group.cjs\",[[4,\"gov-control-group\",{\"variant\":[1],\"noBorder\":[4,\"no-border\"]}]]],[\"gov-cookiebar.cjs\",[[4,\"gov-cookiebar\"]]],[\"gov-dropdown.cjs\",[[4,\"gov-dropdown\",{\"open\":[1028],\"position\":[1],\"getState\":[64],\"setOpen\":[64]}]]],[\"gov-empty.cjs\",[[4,\"gov-empty\"]]],[\"gov-error-code.cjs\",[[4,\"gov-error-code\"]]],[\"gov-form-control.cjs\",[[4,\"gov-form-control\",{\"gap\":[1],\"identifier\":[1],\"invalid\":[4],\"disabled\":[4],\"success\":[4],\"fieldset\":[4],\"size\":[1]}]]],[\"gov-form-group.cjs\",[[4,\"gov-form-group\",{\"gap\":[1]}]]],[\"gov-form-label.cjs\",[[4,\"gov-form-label\",{\"identifier\":[1],\"size\":[1],\"required\":[4],\"legend\":[4]}]]],[\"gov-form-password-power.cjs\",[[4,\"gov-form-password-power\",{\"power\":[2]}]]],[\"gov-form-radio.cjs\",[[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.cjs\",[[4,\"gov-form-search\",{\"variant\":[1]}]]],[\"gov-form-switch.cjs\",[[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.cjs\",[[4,\"gov-grid\",{\"alignX\":[1,\"align-x\"],\"alignY\":[1,\"align-y\"]}]]],[\"gov-grid-item.cjs\",[[4,\"gov-grid-item\",{\"size\":[1],\"sizeSm\":[1,\"size-sm\"],\"sizeMd\":[1,\"size-md\"],\"sizeLg\":[1,\"size-lg\"],\"sizeXl\":[1,\"size-xl\"]}]]],[\"gov-layout.cjs\",[[4,\"gov-layout\",{\"type\":[1],\"variant\":[1],\"inverse\":[4]}]]],[\"gov-layout-column.cjs\",[[4,\"gov-layout-column\"]]],[\"gov-message.cjs\",[[4,\"gov-message\",{\"variant\":[1]}]]],[\"gov-nav.cjs\",[[4,\"gov-nav\",{\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-nav-item.cjs\",[[4,\"gov-nav-item\",{\"href\":[1],\"isExpandedState\":[32]}]]],[\"gov-side-nav.cjs\",[[4,\"gov-side-nav\",{\"inverse\":[4],\"compact\":[4],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-skeleton.cjs\",[[0,\"gov-skeleton\",{\"variant\":[1],\"count\":[2],\"shape\":[1],\"width\":[1],\"height\":[1],\"animation\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"validateWcag\":[64]}]]],[\"gov-spacer.cjs\",[[0,\"gov-spacer\",{\"size\":[1],\"breakpoint\":[1]}]]],[\"gov-statsbar.cjs\",[[4,\"gov-statsbar\",{\"iconPosition\":[1,\"icon-position\"],\"variant\":[1]}]]],[\"gov-statsbar-item.cjs\",[[4,\"gov-statsbar-item\",{\"iconPosition\":[1,\"icon-position\"]}]]],[\"gov-stepper.cjs\",[[4,\"gov-stepper\",{\"size\":[1]}]]],[\"gov-stepper-item.cjs\",[[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.cjs\",[[4,\"gov-tabs-item\",{\"identifier\":[1],\"triggerIdentifier\":[1,\"trigger-identifier\"],\"label\":[1],\"default\":[4],\"isActive\":[32],\"getIdentifier\":[64],\"getTriggerIdentifier\":[64],\"setActiveStatus\":[64]}]]],[\"gov-tiles.cjs\",[[4,\"gov-tiles\",{\"columns\":[2],\"noBorder\":[4,\"no-border\"]}]]],[\"gov-tooltip.cjs\",[[4,\"gov-tooltip\",{\"variant\":[1],\"size\":[1],\"position\":[1],\"message\":[1],\"identifier\":[1],\"icon\":[4],\"show\":[64],\"hide\":[64]}]]],[\"gov-tooltip-content.cjs\",[[4,\"gov-tooltip-content\",{\"isVisible\":[4,\"is-visible\"]}]]],[\"gov-wizzard.cjs\",[[4,\"gov-wizzard\",{\"size\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-icon.cjs\",[[0,\"gov-icon\",{\"name\":[1],\"type\":[1],\"iconData\":[32],\"visible\":[32],\"error\":[32]}]]],[\"gov-form-input.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[0,\"gov-backdrop\",{\"inverse\":[4],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-button.cjs\",[[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);
|
|
9
|
+
return index.bootstrapLazy(JSON.parse("[[\"gov-form-file.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[4,\"gov-loading\",{\"loading\":[4]}]]],[\"gov-side-nav-item.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[4,\"gov-tile\",{\"promotion\":[4],\"href\":[1],\"name\":[1],\"getTriggerRef\":[64]}]]],[\"gov-wizzard-item.cjs\",[[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.cjs\",[[4,\"gov-accordion\",{\"size\":[1],\"variant\":[1],\"noBorder\":[4,\"no-border\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-app.cjs\",[[0,\"gov-app\"]]],[\"gov-breadcrumbs.cjs\",[[4,\"gov-breadcrumbs\",{\"collapsible\":[4],\"isExpanded\":[4,\"is-expanded\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labeled-by\"],\"validateWcag\":[64]}]]],[\"gov-container.cjs\",[[4,\"gov-container\",{\"slottedChildren\":[64]}]]],[\"gov-control-group.cjs\",[[4,\"gov-control-group\",{\"variant\":[1],\"noBorder\":[4,\"no-border\"]}]]],[\"gov-cookiebar.cjs\",[[4,\"gov-cookiebar\"]]],[\"gov-dropdown.cjs\",[[4,\"gov-dropdown\",{\"open\":[1028],\"position\":[1],\"getState\":[64],\"setOpen\":[64]}]]],[\"gov-empty.cjs\",[[4,\"gov-empty\"]]],[\"gov-error-code.cjs\",[[4,\"gov-error-code\"]]],[\"gov-form-control.cjs\",[[4,\"gov-form-control\",{\"gap\":[1],\"identifier\":[1],\"invalid\":[4],\"disabled\":[4],\"success\":[4],\"fieldset\":[4],\"size\":[1]}]]],[\"gov-form-group.cjs\",[[4,\"gov-form-group\",{\"gap\":[1],\"orientation\":[1]}]]],[\"gov-form-label.cjs\",[[4,\"gov-form-label\",{\"identifier\":[1],\"size\":[1],\"required\":[4],\"legend\":[4]}]]],[\"gov-form-password-power.cjs\",[[4,\"gov-form-password-power\",{\"power\":[2]}]]],[\"gov-form-radio.cjs\",[[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.cjs\",[[4,\"gov-form-search\",{\"variant\":[1]}]]],[\"gov-form-switch.cjs\",[[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.cjs\",[[4,\"gov-grid\",{\"alignX\":[1,\"align-x\"],\"alignY\":[1,\"align-y\"]}]]],[\"gov-grid-item.cjs\",[[4,\"gov-grid-item\",{\"size\":[1],\"sizeSm\":[1,\"size-sm\"],\"sizeMd\":[1,\"size-md\"],\"sizeLg\":[1,\"size-lg\"],\"sizeXl\":[1,\"size-xl\"]}]]],[\"gov-layout.cjs\",[[4,\"gov-layout\",{\"type\":[1],\"variant\":[1],\"inverse\":[4]}]]],[\"gov-layout-column.cjs\",[[4,\"gov-layout-column\"]]],[\"gov-message.cjs\",[[4,\"gov-message\",{\"variant\":[1]}]]],[\"gov-nav.cjs\",[[4,\"gov-nav\",{\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-nav-item.cjs\",[[4,\"gov-nav-item\",{\"href\":[1],\"isExpandedState\":[32]}]]],[\"gov-side-nav.cjs\",[[4,\"gov-side-nav\",{\"inverse\":[4],\"compact\":[4],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-skeleton.cjs\",[[0,\"gov-skeleton\",{\"variant\":[1],\"count\":[2],\"shape\":[1],\"width\":[1],\"height\":[1],\"animation\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"validateWcag\":[64]}]]],[\"gov-spacer.cjs\",[[0,\"gov-spacer\",{\"size\":[1],\"breakpoint\":[1]}]]],[\"gov-statsbar.cjs\",[[4,\"gov-statsbar\",{\"iconPosition\":[1,\"icon-position\"],\"variant\":[1]}]]],[\"gov-statsbar-item.cjs\",[[4,\"gov-statsbar-item\",{\"iconPosition\":[1,\"icon-position\"]}]]],[\"gov-stepper.cjs\",[[4,\"gov-stepper\",{\"size\":[1]}]]],[\"gov-stepper-item.cjs\",[[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.cjs\",[[4,\"gov-tabs-item\",{\"identifier\":[1],\"triggerIdentifier\":[1,\"trigger-identifier\"],\"label\":[1],\"default\":[4],\"isActive\":[32],\"getIdentifier\":[64],\"getTriggerIdentifier\":[64],\"setActiveStatus\":[64]}]]],[\"gov-tiles.cjs\",[[4,\"gov-tiles\",{\"columns\":[2],\"noBorder\":[4,\"no-border\"]}]]],[\"gov-tooltip.cjs\",[[4,\"gov-tooltip\",{\"variant\":[1],\"size\":[1],\"position\":[1],\"message\":[1],\"identifier\":[1],\"icon\":[4],\"show\":[64],\"hide\":[64]}]]],[\"gov-tooltip-content.cjs\",[[4,\"gov-tooltip-content\",{\"isVisible\":[4,\"is-visible\"]}]]],[\"gov-wizzard.cjs\",[[4,\"gov-wizzard\",{\"size\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-icon.cjs\",[[0,\"gov-icon\",{\"name\":[1],\"type\":[1],\"iconData\":[32],\"visible\":[32],\"error\":[32]}]]],[\"gov-form-input.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[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.cjs\",[[0,\"gov-backdrop\",{\"inverse\":[4],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-button.cjs\",[[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);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -15,7 +15,7 @@ export const AccordionItemClass = {
|
|
|
15
15
|
title: 'gov-accordion-item__title',
|
|
16
16
|
label: 'gov-accordion-item__label',
|
|
17
17
|
name: 'gov-accordion-item__name',
|
|
18
|
-
|
|
18
|
+
annotation: 'gov-accordion-item__annotation',
|
|
19
19
|
content: 'gov-accordion-item__content',
|
|
20
20
|
};
|
|
21
21
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../src/components/gov-accordion/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAGxC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAGpE,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAA;AAGnF,MAAM,CAAC,MAAM,cAAc,GAAG;EAC7B,IAAI,EAAE,eAAe;CACrB,CAAA;AAED,MAAM,CAAC,MAAM,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,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../src/components/gov-accordion/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAGxC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAGpE,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAA;AAGnF,MAAM,CAAC,MAAM,cAAc,GAAG;EAC7B,IAAI,EAAE,eAAe;CACrB,CAAA;AAED,MAAM,CAAC,MAAM,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;CACtC,CAAA","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"]}
|
|
@@ -232,6 +232,16 @@
|
|
|
232
232
|
display: block;
|
|
233
233
|
width: 100%;
|
|
234
234
|
}
|
|
235
|
+
.gov-accordion-item::before {
|
|
236
|
+
content: "";
|
|
237
|
+
position: absolute;
|
|
238
|
+
display: block;
|
|
239
|
+
right: 0;
|
|
240
|
+
bottom: -1px;
|
|
241
|
+
left: 0;
|
|
242
|
+
height: 1px;
|
|
243
|
+
background-color: var(--gov-color-secondary-500);
|
|
244
|
+
}
|
|
235
245
|
.gov-accordion-item__header {
|
|
236
246
|
display: inline-flex;
|
|
237
247
|
vertical-align: middle;
|
|
@@ -245,10 +255,15 @@
|
|
|
245
255
|
-webkit-appearance: none;
|
|
246
256
|
-moz-appearance: none;
|
|
247
257
|
appearance: none;
|
|
258
|
+
margin: 0;
|
|
259
|
+
padding: 0;
|
|
260
|
+
font-family: var(--gov-font-family, "Roboto", sans-serif);
|
|
261
|
+
font-weight: 400;
|
|
262
|
+
box-sizing: border-box;
|
|
248
263
|
position: relative;
|
|
249
264
|
display: flex;
|
|
250
265
|
justify-content: space-between;
|
|
251
|
-
align-items:
|
|
266
|
+
align-items: flex-start;
|
|
252
267
|
width: 100%;
|
|
253
268
|
border-radius: 0;
|
|
254
269
|
text-align: left;
|
|
@@ -266,24 +281,16 @@
|
|
|
266
281
|
outline: var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);
|
|
267
282
|
outline-offset: 0;
|
|
268
283
|
}
|
|
269
|
-
.gov-accordion-item__header::before {
|
|
270
|
-
content: "";
|
|
271
|
-
position: absolute;
|
|
272
|
-
display: block;
|
|
273
|
-
right: 0;
|
|
274
|
-
bottom: -1px;
|
|
275
|
-
left: 0;
|
|
276
|
-
height: 1px;
|
|
277
|
-
}
|
|
278
284
|
.gov-accordion-item__header:focus-visible::before {
|
|
279
285
|
display: none;
|
|
280
286
|
}
|
|
281
|
-
.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 {
|
|
287
|
+
.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]) {
|
|
282
288
|
transform: scale(-1);
|
|
283
289
|
}
|
|
284
290
|
.gov-accordion-item__arrow {
|
|
285
291
|
flex: 0 0 auto;
|
|
286
292
|
align-self: center;
|
|
293
|
+
margin-left: auto;
|
|
287
294
|
}
|
|
288
295
|
.gov-accordion-item__icon {
|
|
289
296
|
display: inline-flex;
|
|
@@ -299,152 +306,143 @@
|
|
|
299
306
|
line-height: initial;
|
|
300
307
|
}
|
|
301
308
|
.gov-accordion-item__title {
|
|
302
|
-
margin: 0;
|
|
303
|
-
padding: 0;
|
|
304
|
-
font-family: var(--gov-font-family, "Roboto", sans-serif);
|
|
305
|
-
font-weight: 400;
|
|
306
|
-
box-sizing: border-box;
|
|
307
|
-
display: flex;
|
|
308
|
-
flex: 1 1 auto;
|
|
309
|
-
align-items: flex-start;
|
|
310
|
-
}
|
|
311
|
-
.gov-accordion-item__name {
|
|
312
309
|
display: flex;
|
|
313
310
|
flex-direction: column;
|
|
314
311
|
}
|
|
315
|
-
.gov-accordion-
|
|
312
|
+
.gov-accordion-item__label * {
|
|
313
|
+
margin-bottom: 0;
|
|
314
|
+
transform: translateY(1px);
|
|
315
|
+
}
|
|
316
|
+
.gov-accordion-item__annotation * {
|
|
316
317
|
color: var(--gov-color-secondary);
|
|
318
|
+
margin-bottom: 0;
|
|
317
319
|
}
|
|
318
320
|
.gov-accordion-item__content > *:last-child {
|
|
319
321
|
margin-bottom: 0;
|
|
320
322
|
}
|
|
321
|
-
.gov-accordion-item[size=xs] .gov-accordion-item__header
|
|
323
|
+
.gov-accordion-item[size=xs] .gov-accordion-item__header {
|
|
322
324
|
gap: var(--gov-accordion-s-headline-gap, 0.5rem);
|
|
323
325
|
min-height: var(--gov-accordion-s-min-height, 3rem);
|
|
324
326
|
padding: var(--gov-accordion-s-padding-y, 0.75rem) var(--gov-accordion-s-padding-x, 0.5rem);
|
|
325
327
|
}
|
|
326
|
-
.gov-accordion-item[size=xs] .gov-accordion-
|
|
327
|
-
width: var(--gov-accordion-s-icon-size, 0.75rem);
|
|
328
|
-
height: var(--gov-accordion-s-icon-size, 0.75rem);
|
|
329
|
-
}
|
|
330
|
-
.gov-accordion-item[size=xs] .gov-accordion-item__icon, .gov-accordion-item .gov-accordion-item[size=xs] .gov-accordion-item__icon {
|
|
331
|
-
width: calc(var(--gov-text-m-font-size) * 1.2);
|
|
332
|
-
height: calc(var(--gov-text-m-font-size) * 1.2);
|
|
333
|
-
transform: translateY(var(--gov-accordion-s-icon-position, 0.0625rem));
|
|
334
|
-
}
|
|
335
|
-
.gov-accordion-item[size=xs] .gov-accordion-item__title, .gov-accordion-item .gov-accordion-item[size=xs] .gov-accordion-item__title {
|
|
328
|
+
.gov-accordion-item[size=xs] .gov-accordion-item__label * {
|
|
336
329
|
font-weight: var(--gov-text-m-font-weight);
|
|
337
330
|
font-size: var(--gov-text-m-font-size);
|
|
338
331
|
line-height: var(--gov-text-m-line-height);
|
|
339
332
|
letter-spacing: var(--gov-text-m-letter-spacing);
|
|
340
|
-
gap: var(--gov-accordion-s-headline-gap, 0.5rem);
|
|
341
333
|
}
|
|
342
|
-
.gov-accordion-item[size=xs] .gov-accordion-
|
|
334
|
+
.gov-accordion-item[size=xs] .gov-accordion-item__arrow {
|
|
335
|
+
width: var(--gov-accordion-s-icon-size, 1rem);
|
|
336
|
+
height: var(--gov-accordion-s-icon-size, 1rem);
|
|
337
|
+
}
|
|
338
|
+
.gov-accordion-item[size=xs] .gov-accordion-item__icon {
|
|
339
|
+
width: calc(var(--gov-text-m-font-size) * 1.2);
|
|
340
|
+
height: calc(var(--gov-text-m-font-size) * 1.2);
|
|
341
|
+
transform: translateY(var(--gov-accordion-s-icon-position, 0.1875rem));
|
|
342
|
+
}
|
|
343
|
+
.gov-accordion-item[size=xs] .gov-accordion-item__annotation {
|
|
343
344
|
font-weight: var(--gov-text-s-font-weight);
|
|
344
345
|
font-size: var(--gov-text-s-font-size);
|
|
345
346
|
line-height: var(--gov-text-s-line-height);
|
|
346
347
|
letter-spacing: var(--gov-text-s-letter-spacing);
|
|
347
348
|
}
|
|
348
|
-
.gov-accordion-item[size=xs] .gov-accordion-item__content
|
|
349
|
+
.gov-accordion-item[size=xs] .gov-accordion-item__content {
|
|
349
350
|
padding: var(--gov-accordion-s-padding-inner, 1rem 0.5rem);
|
|
350
351
|
}
|
|
351
|
-
.gov-accordion-item[size=s] .gov-accordion-item__header
|
|
352
|
+
.gov-accordion-item[size=s] .gov-accordion-item__header {
|
|
352
353
|
gap: var(--gov-accordion-s-headline-gap, 0.5rem);
|
|
353
354
|
min-height: var(--gov-accordion-s-min-height, 3rem);
|
|
354
355
|
padding: var(--gov-accordion-s-padding-y, 1.125rem) var(--gov-accordion-s-padding-x, 0.5rem);
|
|
355
356
|
}
|
|
356
|
-
.gov-accordion-item[size=s] .gov-accordion-
|
|
357
|
-
width: var(--gov-accordion-s-icon-size, 0.75rem);
|
|
358
|
-
height: var(--gov-accordion-s-icon-size, 0.75rem);
|
|
359
|
-
}
|
|
360
|
-
.gov-accordion-item[size=s] .gov-accordion-item__icon, .gov-accordion-item .gov-accordion-item[size=s] .gov-accordion-item__icon {
|
|
361
|
-
width: calc(var(--gov-text-xl-font-size) * 1.2);
|
|
362
|
-
height: calc(var(--gov-text-xl-font-size) * 1.2);
|
|
363
|
-
transform: translateY(var(--gov-accordion-s-icon-position, 0.0625rem));
|
|
364
|
-
}
|
|
365
|
-
.gov-accordion-item[size=s] .gov-accordion-item__title, .gov-accordion-item .gov-accordion-item[size=s] .gov-accordion-item__title {
|
|
357
|
+
.gov-accordion-item[size=s] .gov-accordion-item__label * {
|
|
366
358
|
font-weight: var(--gov-text-xl-font-weight);
|
|
367
359
|
font-size: var(--gov-text-xl-font-size);
|
|
368
360
|
line-height: var(--gov-text-xl-line-height);
|
|
369
361
|
letter-spacing: var(--gov-text-xl-letter-spacing);
|
|
370
|
-
gap: var(--gov-accordion-s-headline-gap, 0.5rem);
|
|
371
362
|
}
|
|
372
|
-
.gov-accordion-item[size=s] .gov-accordion-
|
|
363
|
+
.gov-accordion-item[size=s] .gov-accordion-item__arrow {
|
|
364
|
+
width: var(--gov-accordion-s-icon-size, 1rem);
|
|
365
|
+
height: var(--gov-accordion-s-icon-size, 1rem);
|
|
366
|
+
}
|
|
367
|
+
.gov-accordion-item[size=s] .gov-accordion-item__icon {
|
|
368
|
+
width: calc(var(--gov-text-xl-font-size) * 1.2);
|
|
369
|
+
height: calc(var(--gov-text-xl-font-size) * 1.2);
|
|
370
|
+
transform: translateY(var(--gov-accordion-s-icon-position, 0.1875rem));
|
|
371
|
+
}
|
|
372
|
+
.gov-accordion-item[size=s] .gov-accordion-item__annotation {
|
|
373
373
|
font-weight: var(--gov-text-m-font-weight);
|
|
374
374
|
font-size: var(--gov-text-m-font-size);
|
|
375
375
|
line-height: var(--gov-text-m-line-height);
|
|
376
376
|
letter-spacing: var(--gov-text-m-letter-spacing);
|
|
377
377
|
}
|
|
378
|
-
.gov-accordion-item[size=s] .gov-accordion-item__content
|
|
378
|
+
.gov-accordion-item[size=s] .gov-accordion-item__content {
|
|
379
379
|
padding: var(--gov-accordion-s-padding-inner, 1rem 0.5rem);
|
|
380
380
|
}
|
|
381
|
-
.gov-accordion-item[size=m] .gov-accordion-item__header
|
|
381
|
+
.gov-accordion-item[size=m] .gov-accordion-item__header {
|
|
382
382
|
gap: var(--gov-accordion-m-headline-gap, 1rem);
|
|
383
383
|
min-height: var(--gov-accordion-m-min-height, 4.5rem);
|
|
384
384
|
padding: var(--gov-accordion-m-padding-y, 1.25rem) var(--gov-accordion-m-padding-x, 0.5rem);
|
|
385
385
|
}
|
|
386
|
-
.gov-accordion-item[size=m] .gov-accordion-
|
|
387
|
-
width: var(--gov-accordion-m-icon-size, 1rem);
|
|
388
|
-
height: var(--gov-accordion-m-icon-size, 1rem);
|
|
389
|
-
}
|
|
390
|
-
.gov-accordion-item[size=m] .gov-accordion-item__icon, .gov-accordion-item .gov-accordion-item[size=m] .gov-accordion-item__icon {
|
|
391
|
-
width: calc(var(--gov-text-2xl-font-size) * 1.2);
|
|
392
|
-
height: calc(var(--gov-text-2xl-font-size) * 1.2);
|
|
393
|
-
transform: translateY(var(--gov-accordion-m-icon-position, 0.125rem));
|
|
394
|
-
}
|
|
395
|
-
.gov-accordion-item[size=m] .gov-accordion-item__title, .gov-accordion-item .gov-accordion-item[size=m] .gov-accordion-item__title {
|
|
386
|
+
.gov-accordion-item[size=m] .gov-accordion-item__label * {
|
|
396
387
|
font-weight: var(--gov-text-2xl-font-weight);
|
|
397
388
|
font-size: var(--gov-text-2xl-font-size);
|
|
398
389
|
line-height: var(--gov-text-2xl-line-height);
|
|
399
390
|
letter-spacing: var(--gov-text-2xl-letter-spacing);
|
|
400
|
-
gap: var(--gov-accordion-m-headline-gap, 1rem);
|
|
401
391
|
}
|
|
402
|
-
.gov-accordion-item[size=m] .gov-accordion-
|
|
392
|
+
.gov-accordion-item[size=m] .gov-accordion-item__arrow {
|
|
393
|
+
width: var(--gov-accordion-m-icon-size, 1.5rem);
|
|
394
|
+
height: var(--gov-accordion-m-icon-size, 1.5rem);
|
|
395
|
+
}
|
|
396
|
+
.gov-accordion-item[size=m] .gov-accordion-item__icon {
|
|
397
|
+
width: calc(var(--gov-text-2xl-font-size) * 1.2);
|
|
398
|
+
height: calc(var(--gov-text-2xl-font-size) * 1.2);
|
|
399
|
+
transform: translateY(var(--gov-accordion-m-icon-position, 0.25rem));
|
|
400
|
+
}
|
|
401
|
+
.gov-accordion-item[size=m] .gov-accordion-item__annotation {
|
|
403
402
|
font-weight: var(--gov-text-m-font-weight);
|
|
404
403
|
font-size: var(--gov-text-m-font-size);
|
|
405
404
|
line-height: var(--gov-text-m-line-height);
|
|
406
405
|
letter-spacing: var(--gov-text-m-letter-spacing);
|
|
407
406
|
}
|
|
408
|
-
.gov-accordion-item[size=m] .gov-accordion-item__content
|
|
407
|
+
.gov-accordion-item[size=m] .gov-accordion-item__content {
|
|
409
408
|
padding: var(--gov-accordion-m-padding-inner, 1.25rem 0.5rem);
|
|
410
409
|
}
|
|
411
|
-
.gov-accordion-item[size=l] .gov-accordion-item__header
|
|
410
|
+
.gov-accordion-item[size=l] .gov-accordion-item__header {
|
|
412
411
|
gap: var(--gov-accordion-l-headline-gap, 1rem);
|
|
413
412
|
min-height: var(--gov-accordion-l-min-height, 5.5rem);
|
|
414
413
|
padding: var(--gov-accordion-l-padding-y, 1.375rem) var(--gov-accordion-l-padding-x, 0.5rem);
|
|
415
414
|
}
|
|
416
|
-
.gov-accordion-item[size=l] .gov-accordion-
|
|
417
|
-
width: var(--gov-accordion-l-icon-size, 1.25rem);
|
|
418
|
-
height: var(--gov-accordion-l-icon-size, 1.25rem);
|
|
419
|
-
}
|
|
420
|
-
.gov-accordion-item[size=l] .gov-accordion-item__icon, .gov-accordion-item .gov-accordion-item[size=l] .gov-accordion-item__icon {
|
|
421
|
-
width: calc(var(--gov-text-3xl-font-size) * 1.2);
|
|
422
|
-
height: calc(var(--gov-text-3xl-font-size) * 1.2);
|
|
423
|
-
transform: translateY(var(--gov-accordion-l-icon-position, 0.125rem));
|
|
424
|
-
}
|
|
425
|
-
.gov-accordion-item[size=l] .gov-accordion-item__title, .gov-accordion-item .gov-accordion-item[size=l] .gov-accordion-item__title {
|
|
415
|
+
.gov-accordion-item[size=l] .gov-accordion-item__label * {
|
|
426
416
|
font-weight: var(--gov-text-3xl-font-weight);
|
|
427
417
|
font-size: var(--gov-text-3xl-font-size);
|
|
428
418
|
line-height: var(--gov-text-3xl-line-height);
|
|
429
419
|
letter-spacing: var(--gov-text-3xl-letter-spacing);
|
|
430
|
-
gap: var(--gov-accordion-l-headline-gap, 1rem);
|
|
431
420
|
}
|
|
432
|
-
.gov-accordion-item[size=l] .gov-accordion-
|
|
421
|
+
.gov-accordion-item[size=l] .gov-accordion-item__arrow {
|
|
422
|
+
width: var(--gov-accordion-l-icon-size, 1.5rem);
|
|
423
|
+
height: var(--gov-accordion-l-icon-size, 1.5rem);
|
|
424
|
+
}
|
|
425
|
+
.gov-accordion-item[size=l] .gov-accordion-item__icon {
|
|
426
|
+
width: calc(var(--gov-text-3xl-font-size) * 1.2);
|
|
427
|
+
height: calc(var(--gov-text-3xl-font-size) * 1.2);
|
|
428
|
+
transform: translateY(var(--gov-accordion-l-icon-position, 0.3125rem));
|
|
429
|
+
}
|
|
430
|
+
.gov-accordion-item[size=l] .gov-accordion-item__annotation {
|
|
433
431
|
font-weight: var(--gov-text-m-font-weight);
|
|
434
432
|
font-size: var(--gov-text-m-font-size);
|
|
435
433
|
line-height: var(--gov-text-m-line-height);
|
|
436
434
|
letter-spacing: var(--gov-text-m-letter-spacing);
|
|
437
435
|
}
|
|
438
|
-
.gov-accordion-item[size=l] .gov-accordion-item__content
|
|
436
|
+
.gov-accordion-item[size=l] .gov-accordion-item__content {
|
|
439
437
|
padding: var(--gov-accordion-l-padding-inner, 1.25rem 0.5rem);
|
|
440
438
|
}
|
|
439
|
+
.gov-accordion-item[variant=primary] .gov-accordion-item::before {
|
|
440
|
+
background-color: var(--gov-accordion-primary-separator, var(--gov-color-secondary-500));
|
|
441
|
+
}
|
|
441
442
|
.gov-accordion-item[variant=primary] .gov-accordion-item__header {
|
|
442
443
|
background-color: var(--gov-accordion-primary-background, transparent);
|
|
443
444
|
color: var(--gov-accordion-primary-color, var(--gov-color-primary));
|
|
444
445
|
}
|
|
445
|
-
.gov-accordion-item[variant=primary] .gov-accordion-item__header::before {
|
|
446
|
-
background-color: var(--gov-accordion-primary-separator, var(--gov-color-secondary-500));
|
|
447
|
-
}
|
|
448
446
|
@media not all and (pointer: coarse) {
|
|
449
447
|
.gov-accordion-item[variant=primary] .gov-accordion-item__header:hover {
|
|
450
448
|
background-color: var(--gov-accordion-primary-background-hover, var(--gov-color-primary-200));
|
|
@@ -459,13 +457,13 @@
|
|
|
459
457
|
cursor: not-allowed;
|
|
460
458
|
}
|
|
461
459
|
}
|
|
460
|
+
.gov-accordion-item[variant=secondary] .gov-accordion-item::before {
|
|
461
|
+
background-color: var(--gov-accordion-secondary-separator, var(--gov-color-secondary-500));
|
|
462
|
+
}
|
|
462
463
|
.gov-accordion-item[variant=secondary] .gov-accordion-item__header {
|
|
463
464
|
background-color: var(--gov-accordion-secondary-background, transparent);
|
|
464
465
|
color: var(--gov-accordion-secondary-color, var(--gov-color-secondary));
|
|
465
466
|
}
|
|
466
|
-
.gov-accordion-item[variant=secondary] .gov-accordion-item__header::before {
|
|
467
|
-
background-color: var(--gov-accordion-secondary-separator, var(--gov-color-secondary-500));
|
|
468
|
-
}
|
|
469
467
|
@media not all and (pointer: coarse) {
|
|
470
468
|
.gov-accordion-item[variant=secondary] .gov-accordion-item__header:hover {
|
|
471
469
|
background-color: var(--gov-accordion-secondary-background-hover, var(--gov-color-secondary-200));
|