@gov-design-system-ce/components 4.0.8-rc01 → 4.0.8-rc02
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-9dc978dd.js +27 -0
- package/dist/cjs/constants-9dc978dd.js.map +1 -0
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{form-47b5ef29.js → form-893791cf.js} +2 -2
- package/dist/cjs/{form-47b5ef29.js.map → form-893791cf.js.map} +1 -1
- package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +89 -0
- package/dist/cjs/gov-form-checkbox-group.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-form-checkbox.cjs.entry.js +6 -2
- package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-control.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-file.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-group.cjs.entry.js +7 -16
- package/dist/cjs/gov-form-group.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-input.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-multi-select.cjs.entry.js +4 -4
- package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-radio-group.cjs.entry.js +73 -0
- package/dist/cjs/gov-form-radio-group.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-form-radio.cjs.entry.js +6 -2
- package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-select.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-switch.cjs.entry.js +6 -2
- package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-icon.cjs.entry.js +1 -1
- package/dist/cjs/index-7b6bba34.js +8 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +5 -1
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
- package/dist/collection/components/gov-form/group/constants.js +6 -0
- package/dist/collection/components/gov-form/group/constants.js.map +1 -1
- package/dist/collection/components/gov-form/group/gov-form-checkbox-group.js +182 -0
- package/dist/collection/components/gov-form/group/gov-form-checkbox-group.js.map +1 -0
- package/dist/collection/components/gov-form/group/gov-form-group.css +9 -9
- package/dist/collection/components/gov-form/group/gov-form-group.js.map +1 -1
- package/dist/collection/components/gov-form/group/gov-form-group.types.js +2 -0
- package/dist/collection/components/gov-form/group/gov-form-group.types.js.map +1 -0
- package/dist/collection/components/gov-form/group/gov-form-radio-group.js +166 -0
- package/dist/collection/components/gov-form/group/gov-form-radio-group.js.map +1 -0
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +1 -0
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +2 -2
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
- package/dist/collection/components/gov-form/radio/gov-form-radio.js +5 -1
- package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
- package/dist/collection/components/gov-form/switch/gov-form-switch.js +5 -1
- package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
- package/dist/collection/helpers/Dom/form.js +1 -1
- package/dist/collection/helpers/Dom/form.js.map +1 -1
- package/dist/collection/pages/Forms.js +72 -6
- package/dist/collection/pages/Forms.js.map +1 -1
- package/dist/collection/pages/Home.js +65 -40
- package/dist/collection/pages/Home.js.map +1 -1
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-attachments-item.js +1 -1
- package/dist/components/gov-breadcrumbs.js +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-chip.js +1 -1
- package/dist/components/gov-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox-group.d.ts +11 -0
- package/dist/components/gov-form-checkbox-group.js +2 -0
- package/dist/components/gov-form-checkbox-group.js.map +1 -0
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-checkbox.js.map +1 -1
- package/dist/components/gov-form-control.js +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-multi-select.js.map +1 -1
- package/dist/components/gov-form-radio-group.d.ts +11 -0
- package/dist/components/gov-form-radio-group.js +2 -0
- package/dist/components/gov-form-radio-group.js.map +1 -0
- package/dist/components/gov-form-radio.js +1 -1
- package/dist/components/gov-form-radio.js.map +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-form-switch.js +1 -1
- package/dist/components/gov-form-switch.js.map +1 -1
- package/dist/components/gov-icon.js +1 -1
- package/dist/components/gov-infobar.js +1 -1
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-modal.js +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-prompt.js +1 -1
- package/dist/components/gov-side-nav-item.js +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tag.js +1 -1
- package/dist/components/gov-toast.js +1 -1
- package/dist/components/gov-tooltip-content.js +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/{p-23990b41.js → p-0a1fbf26.js} +2 -2
- package/dist/components/p-3a04fb9b.js +2 -0
- package/dist/components/p-3a04fb9b.js.map +1 -0
- package/dist/components/{p-f9f8e529.js → p-4529b963.js} +2 -2
- package/dist/components/{p-e2bee1ef.js → p-4a19259c.js} +2 -2
- package/dist/components/p-75be4c94.js +2 -0
- package/dist/components/{p-c9baa62f.js.map → p-75be4c94.js.map} +1 -1
- package/dist/components/{p-26805569.js → p-8749590a.js} +2 -2
- package/dist/components/p-8fcc8483.js +2 -0
- package/dist/components/p-8fcc8483.js.map +1 -0
- package/dist/components/{p-b5a06a0a.js → p-a7443b36.js} +2 -2
- package/dist/components/p-ab5a13ea.js +2 -0
- package/dist/components/p-ab5a13ea.js.map +1 -0
- package/dist/components/{p-a6a15eb1.js → p-b5716fb6.js} +2 -2
- package/dist/components/{p-b48d3aae.js → p-f04382c3.js} +2 -2
- package/dist/components/{p-b48d3aae.js.map → p-f04382c3.js.map} +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-af9a14e3.entry.js → p-0702b541.entry.js} +2 -2
- package/dist/core/p-0702b541.entry.js.map +1 -0
- package/dist/core/{p-ef387ab2.entry.js → p-0eb3fd76.entry.js} +2 -2
- package/dist/core/{p-191e9b0c.entry.js → p-115f99f4.entry.js} +2 -2
- package/dist/core/p-115f99f4.entry.js.map +1 -0
- package/dist/core/p-1f769a40.entry.js +2 -0
- package/dist/core/p-1f769a40.entry.js.map +1 -0
- package/dist/core/p-35d6ef00.entry.js +2 -0
- package/dist/core/p-35d6ef00.entry.js.map +1 -0
- package/dist/core/{p-2a13c39c.entry.js → p-39272558.entry.js} +2 -2
- package/dist/core/p-39272558.entry.js.map +1 -0
- package/dist/core/p-3a04fb9b.js +2 -0
- package/dist/core/p-3a04fb9b.js.map +1 -0
- package/dist/core/{p-d784c44d.js → p-61a2b12a.js} +2 -2
- package/dist/core/{p-d784c44d.js.map → p-61a2b12a.js.map} +1 -1
- package/dist/core/{p-dd8816aa.entry.js → p-9c00b909.entry.js} +2 -2
- package/dist/core/{p-c0e8802d.entry.js → p-c20ee863.entry.js} +2 -2
- package/dist/core/{p-575d0c94.entry.js → p-cad17bfe.entry.js} +2 -2
- package/dist/core/p-cad17bfe.entry.js.map +1 -0
- package/dist/core/{p-8f121cad.entry.js → p-d07d3dcc.entry.js} +2 -2
- package/dist/core/{p-831edc90.entry.js → p-ead75342.entry.js} +2 -2
- package/dist/core/p-f4ef1b95.entry.js +2 -0
- package/dist/core/p-f4ef1b95.entry.js.map +1 -0
- package/dist/esm/constants-e80d9514.js +22 -0
- package/dist/esm/constants-e80d9514.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{form-e3424b70.js → form-b81fd97e.js} +2 -2
- package/dist/esm/{form-e3424b70.js.map → form-b81fd97e.js.map} +1 -1
- package/dist/esm/gov-form-checkbox-group.entry.js +85 -0
- package/dist/esm/gov-form-checkbox-group.entry.js.map +1 -0
- package/dist/esm/gov-form-checkbox.entry.js +6 -2
- package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
- package/dist/esm/gov-form-control.entry.js +1 -1
- package/dist/esm/gov-form-file.entry.js +1 -1
- package/dist/esm/gov-form-group.entry.js +4 -13
- package/dist/esm/gov-form-group.entry.js.map +1 -1
- package/dist/esm/gov-form-input.entry.js +1 -1
- package/dist/esm/gov-form-multi-select.entry.js +4 -4
- package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
- package/dist/esm/gov-form-radio-group.entry.js +69 -0
- package/dist/esm/gov-form-radio-group.entry.js.map +1 -0
- package/dist/esm/gov-form-radio.entry.js +6 -2
- package/dist/esm/gov-form-radio.entry.js.map +1 -1
- package/dist/esm/gov-form-select.entry.js +1 -1
- package/dist/esm/gov-form-switch.entry.js +6 -2
- package/dist/esm/gov-form-switch.entry.js.map +1 -1
- package/dist/esm/gov-icon.entry.js +1 -1
- package/dist/esm/index-eb59f132.js +8 -0
- package/dist/esm/loader.js +1 -1
- package/dist/hydrate/index.js +236 -65
- package/dist/types/components/gov-form/checkbox/gov-form-checkbox.d.ts +2 -0
- package/dist/types/components/gov-form/group/constants.d.ts +6 -0
- package/dist/types/components/gov-form/group/gov-form-checkbox-group.d.ts +32 -0
- package/dist/types/components/gov-form/group/gov-form-group.types.d.ts +7 -0
- package/dist/types/components/gov-form/group/gov-form-radio-group.d.ts +32 -0
- package/dist/types/components/gov-form/radio/gov-form-radio.d.ts +2 -0
- package/dist/types/components/gov-form/switch/gov-form-switch.d.ts +2 -0
- package/dist/types/components.d.ts +94 -2
- package/package.json +2 -2
- package/dist/components/p-6c1d0f47.js +0 -2
- package/dist/components/p-6c1d0f47.js.map +0 -1
- package/dist/components/p-c9baa62f.js +0 -2
- package/dist/core/p-191e9b0c.entry.js.map +0 -1
- package/dist/core/p-2a13c39c.entry.js.map +0 -1
- package/dist/core/p-575d0c94.entry.js.map +0 -1
- package/dist/core/p-adf276b0.entry.js +0 -2
- package/dist/core/p-adf276b0.entry.js.map +0 -1
- package/dist/core/p-af9a14e3.entry.js.map +0 -1
- /package/dist/components/{p-23990b41.js.map → p-0a1fbf26.js.map} +0 -0
- /package/dist/components/{p-f9f8e529.js.map → p-4529b963.js.map} +0 -0
- /package/dist/components/{p-e2bee1ef.js.map → p-4a19259c.js.map} +0 -0
- /package/dist/components/{p-26805569.js.map → p-8749590a.js.map} +0 -0
- /package/dist/components/{p-b5a06a0a.js.map → p-a7443b36.js.map} +0 -0
- /package/dist/components/{p-a6a15eb1.js.map → p-b5716fb6.js.map} +0 -0
- /package/dist/core/{p-ef387ab2.entry.js.map → p-0eb3fd76.entry.js.map} +0 -0
- /package/dist/core/{p-dd8816aa.entry.js.map → p-9c00b909.entry.js.map} +0 -0
- /package/dist/core/{p-c0e8802d.entry.js.map → p-c20ee863.entry.js.map} +0 -0
- /package/dist/core/{p-8f121cad.entry.js.map → p-d07d3dcc.entry.js.map} +0 -0
- /package/dist/core/{p-831edc90.entry.js.map → p-ead75342.entry.js.map} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const utils = require('./utils-c9b1bba3.js');
|
|
4
|
+
const sizes = require('./sizes-79872c2a.js');
|
|
5
|
+
|
|
6
|
+
const FormGroupSizes = utils.pick(sizes.Sizes, ['_2XS', '_XS', '_S', '_M', '_L']);
|
|
7
|
+
exports.FormGroupOrientation = void 0;
|
|
8
|
+
(function (FormGroupOrientation) {
|
|
9
|
+
FormGroupOrientation["HORIZONTAL"] = "horizontal";
|
|
10
|
+
FormGroupOrientation["VERTICAL"] = "vertical";
|
|
11
|
+
})(exports.FormGroupOrientation || (exports.FormGroupOrientation = {}));
|
|
12
|
+
const FormGroupClass = {
|
|
13
|
+
root: 'gov-form-group',
|
|
14
|
+
};
|
|
15
|
+
const FormRadioGroupClass = {
|
|
16
|
+
root: 'gov-form-radio-group',
|
|
17
|
+
};
|
|
18
|
+
const FormCheckboxGroupClass = {
|
|
19
|
+
root: 'gov-form-checkbox-group',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
exports.FormCheckboxGroupClass = FormCheckboxGroupClass;
|
|
23
|
+
exports.FormGroupClass = FormGroupClass;
|
|
24
|
+
exports.FormGroupSizes = FormGroupSizes;
|
|
25
|
+
exports.FormRadioGroupClass = FormRadioGroupClass;
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=constants-9dc978dd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"constants-9dc978dd.js","mappings":";;;;;MAIa,cAAc,GAAGA,UAAI,CAACC,WAAK,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAC;AAGhEC;AAAZ,WAAY,oBAAoB;EAC/B,iDAAyB,CAAA;EACzB,6CAAqB,CAAA;AACtB,CAAC,EAHWA,4BAAoB,KAApBA,4BAAoB,QAG/B;MAGY,cAAc,GAAG;EAC7B,IAAI,EAAE,gBAAgB;EACtB;MAEY,mBAAmB,GAAG;EAClC,IAAI,EAAE,sBAAsB;EAC5B;MAEY,sBAAsB,GAAG;EACrC,IAAI,EAAE,yBAAyB;;;;;;;;","names":["pick","Sizes","FormGroupOrientation"],"sources":["../../../packages/core/src/components/gov-form/group/constants.ts"],"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\nexport const FormRadioGroupClass = {\n\troot: 'gov-form-radio-group',\n}\n\nexport const FormCheckboxGroupClass = {\n\troot: 'gov-form-checkbox-group',\n}\n"],"version":3}
|
package/dist/cjs/core.cjs.js
CHANGED
|
@@ -40,7 +40,7 @@ const patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
patchBrowser().then(options => {
|
|
43
|
-
return index.bootstrapLazy(JSON.parse("[[\"gov-form-file.cjs\",[[4,\"gov-form-file\",{\"expanded\":[4],\"required\":[4],\"disabled\":[4],\"resetAfterPick\":[4,\"reset-after-pick\"],\"ignoreFileDuplicationCheck\":[4,\"ignore-file-duplication-check\"],\"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],\"reset\":[64],\"validateWcag\":[64]}]]],[\"gov-form-multi-select.cjs\",[[4,\"gov-form-multi-select\",{\"value\":[1537],\"options\":[1537],\"identifier\":[1],\"placeholder\":[1],\"variant\":[1],\"size\":[1],\"name\":[1],\"hideSelectedList\":[4,\"hide-selected-list\"],\"required\":[4],\"disabled\":[4],\"invalid\":[4],\"success\":[4],\"messageEmpty\":[1,\"message-empty\"],\"messageLoading\":[1,\"message-loading\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"valueState\":[32],\"selectedOptionsState\":[32],\"optionsState\":[32],\"setFocus\":[64],\"setValue\":[64],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-modal.cjs\",[[4,\"gov-modal\",{\"open\":[1028],\"blockClose\":[4,\"block-close\"],\"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\"],\"labelPrev\":[1,\"label-prev\"],\"labelStart\":[1,\"label-start\"],\"labelNext\":[1,\"label-next\"],\"labelEnd\":[1,\"label-end\"],\"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-breadcrumbs.cjs\",[[4,\"gov-breadcrumbs\",{\"collapsible\":[4],\"isExpanded\":[4,\"is-expanded\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labeled-by\"],\"wcagToggleLabel\":[1,\"wcag-toggle-label\"],\"collapsed\":[32],\"toggleOption\":[32],\"validateWcag\":[64]}]]],[\"gov-infobar.cjs\",[[4,\"gov-infobar\",{\"headline\":[1],\"variant\":[1],\"role\":[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\"]]],[\"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-tooltip-content.cjs\",[[4,\"gov-tooltip-content\",{\"variant\":[1],\"size\":[1],\"persist\":[4],\"isVisible\":[1028,\"is-visible\"],\"parentId\":[1,\"parent-id\"]}]]],[\"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-tag.cjs\",[[4,\"gov-tag\",{\"inverse\":[4],\"iconLeft\":[1,\"icon-left\"],\"iconRight\":[1,\"icon-right\"],\"size\":[513],\"variant\":[513]}]]],[\"gov-wizard-item.cjs\",[[4,\"gov-wizard-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-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\":[514]}]]],[\"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\":[513]}]]],[\"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\":[513],\"default\":[4],\"isActive\":[32],\"getIdentifier\":[64],\"getTriggerIdentifier\":[64],\"setActiveStatus\":[64]}]]],[\"gov-tile.cjs\",[[4,\"gov-tile\",{\"href\":[513],\"target\":[1],\"getTriggerRef\":[64]}]]],[\"gov-tiles.cjs\",[[4,\"gov-tiles\",{\"columns\":[2],\"noBorder\":[4,\"no-border\"]}]]],[\"gov-tooltip.cjs\",[[4,\"gov-tooltip\",{\"variant\":[1],\"size\":[1],\"position\":[1025],\"message\":[1],\"identifier\":[1],\"icon\":[516],\"persist\":[32],\"show\":[64],\"hide\":[64]}]]],[\"gov-wizard.cjs\",[[4,\"gov-wizard\",{\"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-chip.cjs\",[[4,\"gov-chip\",{\"inverse\":[4],\"disabled\":[4],\"href\":[1],\"target\":[1],\"iconLeft\":[1,\"icon-left\"],\"iconRight\":[1,\"icon-right\"],\"size\":[1],\"tag\":[1],\"variant\":[1],\"focusable\":[4],\"identifier\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagSelected\":[4,\"wcag-selected\"],\"getTriggerRef\":[64],\"getTriggerIdentifier\":[64],\"setFocus\":[64]}]]],[\"gov-form-select.cjs\",[[4,\"gov-form-select\",{\"value\":[1537],\"options\":[1537],\"identifier\":[1],\"variant\":[1],\"size\":[1],\"name\":[1],\"required\":[4],\"success\":[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],\"optionsState\":[32],\"setFocus\":[64],\"getRef\":[64],\"validateWcag\":[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\":[516],\"inverse\":[516],\"name\":[1],\"iconLeft\":[1,\"icon-left\"],\"iconRight\":[1,\"icon-right\"],\"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\":[4,\"wcag-pressed\"],\"wcagCurrent\":[1,\"wcag-current\"],\"setFocus\":[64],\"getTriggerRef\":[64],\"validateWcag\":[64]}]]]]"), options);
|
|
43
|
+
return index.bootstrapLazy(JSON.parse("[[\"gov-form-file.cjs\",[[4,\"gov-form-file\",{\"expanded\":[4],\"required\":[4],\"disabled\":[4],\"resetAfterPick\":[4,\"reset-after-pick\"],\"ignoreFileDuplicationCheck\":[4,\"ignore-file-duplication-check\"],\"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],\"reset\":[64],\"validateWcag\":[64]}]]],[\"gov-form-multi-select.cjs\",[[4,\"gov-form-multi-select\",{\"value\":[1537],\"options\":[1537],\"identifier\":[1],\"placeholder\":[1],\"variant\":[1],\"size\":[1],\"name\":[1],\"hideSelectedList\":[4,\"hide-selected-list\"],\"required\":[4],\"disabled\":[4],\"invalid\":[4],\"success\":[4],\"messageEmpty\":[1,\"message-empty\"],\"messageLoading\":[1,\"message-loading\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"valueState\":[32],\"selectedOptionsState\":[32],\"optionsState\":[32],\"setFocus\":[64],\"setValue\":[64],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-modal.cjs\",[[4,\"gov-modal\",{\"open\":[1028],\"blockClose\":[4,\"block-close\"],\"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\"],\"labelPrev\":[1,\"label-prev\"],\"labelStart\":[1,\"label-start\"],\"labelNext\":[1,\"label-next\"],\"labelEnd\":[1,\"label-end\"],\"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-breadcrumbs.cjs\",[[4,\"gov-breadcrumbs\",{\"collapsible\":[4],\"isExpanded\":[4,\"is-expanded\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labeled-by\"],\"wcagToggleLabel\":[1,\"wcag-toggle-label\"],\"collapsed\":[32],\"toggleOption\":[32],\"validateWcag\":[64]}]]],[\"gov-infobar.cjs\",[[4,\"gov-infobar\",{\"headline\":[1],\"variant\":[1],\"role\":[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\"]]],[\"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-tooltip-content.cjs\",[[4,\"gov-tooltip-content\",{\"variant\":[1],\"size\":[1],\"persist\":[4],\"isVisible\":[1028,\"is-visible\"],\"parentId\":[1,\"parent-id\"]}]]],[\"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-tag.cjs\",[[4,\"gov-tag\",{\"inverse\":[4],\"iconLeft\":[1,\"icon-left\"],\"iconRight\":[1,\"icon-right\"],\"size\":[513],\"variant\":[513]}]]],[\"gov-wizard-item.cjs\",[[4,\"gov-wizard-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-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-checkbox-group.cjs\",[[4,\"gov-form-checkbox-group\",{\"gap\":[1],\"orientation\":[1],\"value\":[1025]}]]],[\"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\":[514]}]]],[\"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-radio-group.cjs\",[[4,\"gov-form-radio-group\",{\"gap\":[1],\"orientation\":[1],\"value\":[1025]}]]],[\"gov-form-search.cjs\",[[4,\"gov-form-search\",{\"variant\":[513]}]]],[\"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\":[513],\"default\":[4],\"isActive\":[32],\"getIdentifier\":[64],\"getTriggerIdentifier\":[64],\"setActiveStatus\":[64]}]]],[\"gov-tile.cjs\",[[4,\"gov-tile\",{\"href\":[513],\"target\":[1],\"getTriggerRef\":[64]}]]],[\"gov-tiles.cjs\",[[4,\"gov-tiles\",{\"columns\":[2],\"noBorder\":[4,\"no-border\"]}]]],[\"gov-tooltip.cjs\",[[4,\"gov-tooltip\",{\"variant\":[1],\"size\":[1],\"position\":[1025],\"message\":[1],\"identifier\":[1],\"icon\":[516],\"persist\":[32],\"show\":[64],\"hide\":[64]}]]],[\"gov-wizard.cjs\",[[4,\"gov-wizard\",{\"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-chip.cjs\",[[4,\"gov-chip\",{\"inverse\":[4],\"disabled\":[4],\"href\":[1],\"target\":[1],\"iconLeft\":[1,\"icon-left\"],\"iconRight\":[1,\"icon-right\"],\"size\":[1],\"tag\":[1],\"variant\":[1],\"focusable\":[4],\"identifier\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagSelected\":[4,\"wcag-selected\"],\"getTriggerRef\":[64],\"getTriggerIdentifier\":[64],\"setFocus\":[64]}]]],[\"gov-form-select.cjs\",[[4,\"gov-form-select\",{\"value\":[1537],\"options\":[1537],\"identifier\":[1],\"variant\":[1],\"size\":[1],\"name\":[1],\"required\":[4],\"success\":[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],\"optionsState\":[32],\"setFocus\":[64],\"getRef\":[64],\"validateWcag\":[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\":[516],\"inverse\":[516],\"name\":[1],\"iconLeft\":[1,\"icon-left\"],\"iconRight\":[1,\"icon-right\"],\"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\":[4,\"wcag-pressed\"],\"wcagCurrent\":[1,\"wcag-current\"],\"setFocus\":[64],\"getTriggerRef\":[64],\"validateWcag\":[64]}]]]]"), options);
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
exports.setNonce = index.setNonce;
|
|
@@ -97,7 +97,7 @@ const govForm = (govHost) => {
|
|
|
97
97
|
},
|
|
98
98
|
get hasGroupChildren() {
|
|
99
99
|
if (this.control) {
|
|
100
|
-
return this.control.querySelectorAll('gov-form-group > *').length > 1;
|
|
100
|
+
return this.control.querySelectorAll('gov-form-group > *, gov-form-radio-group > *, gov-form-checkbox-group > *').length > 1;
|
|
101
101
|
}
|
|
102
102
|
return false;
|
|
103
103
|
},
|
|
@@ -160,4 +160,4 @@ exports.FormSwitchClass = FormSwitchClass;
|
|
|
160
160
|
exports.FormSwitchSizes = FormSwitchSizes;
|
|
161
161
|
exports.govForm = govForm;
|
|
162
162
|
|
|
163
|
-
//# sourceMappingURL=form-
|
|
163
|
+
//# sourceMappingURL=form-893791cf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"form-47b5ef29.js","mappings":";;;;;;;;;MAIa,iBAAiB,GAAGA,UAAI,CAACC,WAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAC;MAG1D,iBAAiB,GAA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IAAI,eAAe;MAClB,IAAI,IAAI,CAAC,OAAO,EAAE;QACjB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAACC,4BAAgB,CAAC,IAAI,CAAC,CAAC,CAAA;OACvE;MACD,OAAO,EAAE,CAAA;KACT;GACD,CAAA;AACF;;;;;;;;;;;;;;;;;;;;","names":["pick","Sizes","Variants","FormLabelClass","FormAutocompleteClass","FormMessageClass"],"sources":["../../../packages/core/src/components/gov-form/checkbox/constants.ts","../../../packages/core/src/components/gov-form/control/constants.ts","../../../packages/core/src/components/gov-form/input/constants.ts","../../../packages/core/src/components/gov-form/select/constants.ts","../../../packages/core/src/components/gov-form/multiselect/constants.ts","../../../packages/core/src/components/gov-form/switch/constants.ts","../../../packages/core/src/components/gov-form/radio/constants.ts","../../../packages/core/src/helpers/Dom/form.ts"],"sourcesContent":["import { Sizes } from '../../../core/constants/sizes'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const FormCheckboxSizes = pick(Sizes, ['_XS', '_S', '_M', '_L'])\nexport type FormCheckboxSizesType = `${ValueOf<typeof FormCheckboxSizes>}`\n\nexport const FormCheckboxClass = {\n\troot: 'gov-form-checkbox',\n\tcheck: 'gov-form-checkbox__check',\n\tlabel: 'gov-form-checkbox__label',\n}\n","import { Sizes } from '../../../core/constants/sizes'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const FormControlSizes = pick(Sizes, ['_M', '_L', '_XL'])\nexport type FormControlSizesType = `${ValueOf<typeof FormControlSizes>}`\n\nexport const FormControlClass = {\n\troot: 'gov-form-control',\n\tholder: 'gov-form-control__holder',\n\tbottom: 'gov-form-control__bottom',\n}\n","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 FormInputSizes = pick(Sizes, ['_S', '_M', '_L', '_XL'])\nexport type FormInputSizesType = `${ValueOf<typeof FormInputSizes>}`\n\nexport const FormInputVariants = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type FormInputVariantType = `${ValueOf<typeof FormInputVariants>}`\n\nexport enum InputTypes {\n\tCOLOR = 'color',\n\tDATE = 'date',\n\tDATETIME_LOCAL = 'datetime-local',\n\tEMAIL = 'email',\n\tMONTH = 'month',\n\tNUMBER = 'number',\n\tPASSWORD = 'password',\n\tSEARCH = 'search',\n\tTEL = 'tel',\n\tTEXT = 'text',\n\tTIME = 'time',\n\tURL = 'url',\n\tWEEK = 'week',\n}\n\nexport type InputType = `${ValueOf<typeof InputTypes>}`\n\nexport enum Type {\n\tRESET = 'reset',\n}\n\nexport type TypesType = `${ValueOf<typeof Type>}`\n\nexport const FormInputClass = {\n\troot: 'gov-form-input',\n}\n","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 FormSelectSizes = pick(Sizes, ['_S', '_M', '_L', '_XL'])\nexport type FormSelectSizesType = `${ValueOf<typeof FormSelectSizes>}`\n\nexport const FormSelectVariants = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type FormSelectVariantType = `${ValueOf<typeof FormSelectVariants>}`\n\nexport const FormSelectClass = {\n\troot: 'gov-form-select',\n\ticon: 'gov-form-select__icon',\n}\n","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 FormMultiselectSizes = pick(Sizes, ['_M', '_L', '_XL'])\nexport type FormMultiselectSizesType = `${ValueOf<typeof FormMultiselectSizes>}`\n\nexport const FormMultiselectVariants = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type FormMultiselectVariantType = `${ValueOf<typeof FormMultiselectVariants>}`\n\nexport const FormMultiSelectClass = {\n\troot: 'gov-form-multi-select',\n\twrap: 'gov-form-multi-select__wrap',\n\tlist: 'gov-form-multi-select__list',\n\titem: 'gov-form-multi-select__item',\n}\n","import { Sizes } from '../../../core/constants/sizes'\nimport { ValueOf } from '../../../types/interfaces'\nimport { pick } from '../../../utils/utils'\n\nexport const FormSwitchSizes = pick(Sizes, ['_XS', '_S', '_M', '_L'])\nexport type FormSwitchSizesType = `${ValueOf<typeof FormSwitchSizes>}`\n\nexport const FormSwitchClass = {\n\troot: 'gov-form-switch',\n\tholder: 'gov-form-switch__holder',\n\tinput: 'gov-form-switch__input',\n\tindicator: 'gov-form-switch__indicator',\n}\n","import { Sizes } from '../../../core/constants/sizes'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const FormRadioSizes = pick(Sizes, ['_XS', '_S', '_M', '_L'])\nexport type FormRadioSizesType = `${ValueOf<typeof FormRadioSizes>}`\n\nexport const FormRadioClass = {\n\troot: 'gov-form-radio',\n\tholder: 'gov-form-radio__holder',\n\tinput: 'gov-form-radio__input',\n\tindicator: 'gov-form-radio__indicator',\n\tlabel: 'gov-form-radio__label',\n}\n","import { GovHost } from './template.types'\nimport { GovForm } from './form.types'\nimport { FormControlClass } from '../../components/gov-form/control/constants'\nimport { FormInputClass } from '../../components/gov-form/input/constants'\nimport { FormSelectClass } from '../../components/gov-form/select/constants'\nimport { FormMultiSelectClass } from '../../components/gov-form/multiselect/constants'\nimport { FormSwitchClass } from '../../components/gov-form/switch/constants'\nimport { FormCheckboxClass } from '../../components/gov-form/checkbox/constants'\nimport { FormRadioClass } from '../../components/gov-form/radio/constants'\nimport { FormMessageClass } from '../../components/gov-form/message/constants'\nimport { FormAutocompleteClass } from '../../components/gov-form/autocomplete/constants'\nimport { Nullable } from '../../types/interfaces'\nimport { FormLabelClass } from \"../../components/gov-form/label/constants\"\n\nexport const govForm = (govHost: GovHost): GovForm => {\n\treturn {\n\t\tget govHost(): GovHost {\n\t\t\treturn govHost\n\t\t},\n\t\tpassAttrToControl(name: string, value: string): void {\n\t\t\tif (this.control) {\n\t\t\t\tthis.control.setAttribute(name, value)\n\t\t\t}\n\t\t},\n\t\tpassAttrToLabel(name: string, value: string): void {\n\t\t\tif (this.label) {\n\t\t\t\tthis.label.setAttribute(name, value)\n\t\t\t}\n\t\t},\n\t\tget hasGroupChildren(): boolean {\n\t\t\tif (this.control) {\n\t\t\t\treturn this.control.querySelectorAll('gov-form-group > *').length > 1\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t\tget control(): Nullable<HTMLGovFormControlElement> {\n\t\t\tif (this.govHost.name === FormControlClass.root) {\n\t\t\t\treturn this.govHost.hostElement\n\t\t\t}\n\t\t\treturn this.govHost.getParent(FormControlClass.root)\n\t\t},\n\t\tget label(): Nullable<HTMLGovFormLabelElement> {\n\t\t\tconst innerLabel = this.govHost.hostElement.querySelector(`.${FormLabelClass.root}`)\n\t\t\tif(innerLabel) {\n\t\t\t\treturn innerLabel\n\t\t\t}\n\t\t\tif (this.control) {\n\t\t\t\treturn this.control.querySelector(`.${FormLabelClass.root}`)\n\t\t\t}\n\t\t\treturn null\n\t\t},\n\t\tget mainElementsInControl(): Element[] {\n\t\t\tconst formElements = [\n\t\t\t\tFormSelectClass.root,\n\t\t\t\tFormInputClass.root,\n\t\t\t\tFormSwitchClass.root,\n\t\t\t\tFormCheckboxClass.root,\n\t\t\t\tFormRadioClass.root,\n\t\t\t\tFormMultiSelectClass.root,\n\t\t\t\tFormAutocompleteClass.root,\n\t\t\t]\n\t\t\tif (this.control) {\n\t\t\t\tconst elements = formElements.map(el => `${el}:first-of-type`).join(', ')\n\t\t\t\treturn Array.from(this.control.querySelectorAll(elements))\n\t\t\t}\n\t\t\treturn []\n\t\t},\n\t\tget messageElements(): HTMLGovFormMessageElement[] {\n\t\t\tif (this.control) {\n\t\t\t\treturn Array.from(this.control.querySelectorAll(FormMessageClass.root))\n\t\t\t}\n\t\t\treturn []\n\t\t},\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"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AAI,CAAC,CAAA;QACzE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAA;OAC1D;MACD,OAAO,EAAE,CAAA;KACT;IACD,IAAI,eAAe;MAClB,IAAI,IAAI,CAAC,OAAO,EAAE;QACjB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAACC,4BAAgB,CAAC,IAAI,CAAC,CAAC,CAAA;OACvE;MACD,OAAO,EAAE,CAAA;KACT;GACD,CAAA;AACF;;;;;;;;;;;;;;;;;;;;","names":["pick","Sizes","Variants","FormLabelClass","FormAutocompleteClass","FormMessageClass"],"sources":["../../../packages/core/src/components/gov-form/checkbox/constants.ts","../../../packages/core/src/components/gov-form/control/constants.ts","../../../packages/core/src/components/gov-form/input/constants.ts","../../../packages/core/src/components/gov-form/select/constants.ts","../../../packages/core/src/components/gov-form/multiselect/constants.ts","../../../packages/core/src/components/gov-form/switch/constants.ts","../../../packages/core/src/components/gov-form/radio/constants.ts","../../../packages/core/src/helpers/Dom/form.ts"],"sourcesContent":["import { Sizes } from '../../../core/constants/sizes'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const FormCheckboxSizes = pick(Sizes, ['_XS', '_S', '_M', '_L'])\nexport type FormCheckboxSizesType = `${ValueOf<typeof FormCheckboxSizes>}`\n\nexport const FormCheckboxClass = {\n\troot: 'gov-form-checkbox',\n\tcheck: 'gov-form-checkbox__check',\n\tlabel: 'gov-form-checkbox__label',\n}\n","import { Sizes } from '../../../core/constants/sizes'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const FormControlSizes = pick(Sizes, ['_M', '_L', '_XL'])\nexport type FormControlSizesType = `${ValueOf<typeof FormControlSizes>}`\n\nexport const FormControlClass = {\n\troot: 'gov-form-control',\n\tholder: 'gov-form-control__holder',\n\tbottom: 'gov-form-control__bottom',\n}\n","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 FormInputSizes = pick(Sizes, ['_S', '_M', '_L', '_XL'])\nexport type FormInputSizesType = `${ValueOf<typeof FormInputSizes>}`\n\nexport const FormInputVariants = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type FormInputVariantType = `${ValueOf<typeof FormInputVariants>}`\n\nexport enum InputTypes {\n\tCOLOR = 'color',\n\tDATE = 'date',\n\tDATETIME_LOCAL = 'datetime-local',\n\tEMAIL = 'email',\n\tMONTH = 'month',\n\tNUMBER = 'number',\n\tPASSWORD = 'password',\n\tSEARCH = 'search',\n\tTEL = 'tel',\n\tTEXT = 'text',\n\tTIME = 'time',\n\tURL = 'url',\n\tWEEK = 'week',\n}\n\nexport type InputType = `${ValueOf<typeof InputTypes>}`\n\nexport enum Type {\n\tRESET = 'reset',\n}\n\nexport type TypesType = `${ValueOf<typeof Type>}`\n\nexport const FormInputClass = {\n\troot: 'gov-form-input',\n}\n","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 FormSelectSizes = pick(Sizes, ['_S', '_M', '_L', '_XL'])\nexport type FormSelectSizesType = `${ValueOf<typeof FormSelectSizes>}`\n\nexport const FormSelectVariants = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type FormSelectVariantType = `${ValueOf<typeof FormSelectVariants>}`\n\nexport const FormSelectClass = {\n\troot: 'gov-form-select',\n\ticon: 'gov-form-select__icon',\n}\n","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 FormMultiselectSizes = pick(Sizes, ['_M', '_L', '_XL'])\nexport type FormMultiselectSizesType = `${ValueOf<typeof FormMultiselectSizes>}`\n\nexport const FormMultiselectVariants = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type FormMultiselectVariantType = `${ValueOf<typeof FormMultiselectVariants>}`\n\nexport const FormMultiSelectClass = {\n\troot: 'gov-form-multi-select',\n\twrap: 'gov-form-multi-select__wrap',\n\tlist: 'gov-form-multi-select__list',\n\titem: 'gov-form-multi-select__item',\n}\n","import { Sizes } from '../../../core/constants/sizes'\nimport { ValueOf } from '../../../types/interfaces'\nimport { pick } from '../../../utils/utils'\n\nexport const FormSwitchSizes = pick(Sizes, ['_XS', '_S', '_M', '_L'])\nexport type FormSwitchSizesType = `${ValueOf<typeof FormSwitchSizes>}`\n\nexport const FormSwitchClass = {\n\troot: 'gov-form-switch',\n\tholder: 'gov-form-switch__holder',\n\tinput: 'gov-form-switch__input',\n\tindicator: 'gov-form-switch__indicator',\n}\n","import { Sizes } from '../../../core/constants/sizes'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const FormRadioSizes = pick(Sizes, ['_XS', '_S', '_M', '_L'])\nexport type FormRadioSizesType = `${ValueOf<typeof FormRadioSizes>}`\n\nexport const FormRadioClass = {\n\troot: 'gov-form-radio',\n\tholder: 'gov-form-radio__holder',\n\tinput: 'gov-form-radio__input',\n\tindicator: 'gov-form-radio__indicator',\n\tlabel: 'gov-form-radio__label',\n}\n","import { GovHost } from './template.types'\nimport { GovForm } from './form.types'\nimport { FormControlClass } from '../../components/gov-form/control/constants'\nimport { FormInputClass } from '../../components/gov-form/input/constants'\nimport { FormSelectClass } from '../../components/gov-form/select/constants'\nimport { FormMultiSelectClass } from '../../components/gov-form/multiselect/constants'\nimport { FormSwitchClass } from '../../components/gov-form/switch/constants'\nimport { FormCheckboxClass } from '../../components/gov-form/checkbox/constants'\nimport { FormRadioClass } from '../../components/gov-form/radio/constants'\nimport { FormMessageClass } from '../../components/gov-form/message/constants'\nimport { FormAutocompleteClass } from '../../components/gov-form/autocomplete/constants'\nimport { Nullable } from '../../types/interfaces'\nimport { FormLabelClass } from \"../../components/gov-form/label/constants\"\n\nexport const govForm = (govHost: GovHost): GovForm => {\n\treturn {\n\t\tget govHost(): GovHost {\n\t\t\treturn govHost\n\t\t},\n\t\tpassAttrToControl(name: string, value: string): void {\n\t\t\tif (this.control) {\n\t\t\t\tthis.control.setAttribute(name, value)\n\t\t\t}\n\t\t},\n\t\tpassAttrToLabel(name: string, value: string): void {\n\t\t\tif (this.label) {\n\t\t\t\tthis.label.setAttribute(name, value)\n\t\t\t}\n\t\t},\n\t\tget hasGroupChildren(): boolean {\n\t\t\tif (this.control) {\n\t\t\t\treturn this.control.querySelectorAll('gov-form-group > *, gov-form-radio-group > *, gov-form-checkbox-group > *').length > 1\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t\tget control(): Nullable<HTMLGovFormControlElement> {\n\t\t\tif (this.govHost.name === FormControlClass.root) {\n\t\t\t\treturn this.govHost.hostElement\n\t\t\t}\n\t\t\treturn this.govHost.getParent(FormControlClass.root)\n\t\t},\n\t\tget label(): Nullable<HTMLGovFormLabelElement> {\n\t\t\tconst innerLabel = this.govHost.hostElement.querySelector(`.${FormLabelClass.root}`)\n\t\t\tif(innerLabel) {\n\t\t\t\treturn innerLabel\n\t\t\t}\n\t\t\tif (this.control) {\n\t\t\t\treturn this.control.querySelector(`.${FormLabelClass.root}`)\n\t\t\t}\n\t\t\treturn null\n\t\t},\n\t\tget mainElementsInControl(): Element[] {\n\t\t\tconst formElements = [\n\t\t\t\tFormSelectClass.root,\n\t\t\t\tFormInputClass.root,\n\t\t\t\tFormSwitchClass.root,\n\t\t\t\tFormCheckboxClass.root,\n\t\t\t\tFormRadioClass.root,\n\t\t\t\tFormMultiSelectClass.root,\n\t\t\t\tFormAutocompleteClass.root,\n\t\t\t]\n\t\t\tif (this.control) {\n\t\t\t\tconst elements = formElements.map(el => `${el}:first-of-type`).join(', ')\n\t\t\t\treturn Array.from(this.control.querySelectorAll(elements))\n\t\t\t}\n\t\t\treturn []\n\t\t},\n\t\tget messageElements(): HTMLGovFormMessageElement[] {\n\t\t\tif (this.control) {\n\t\t\t\treturn Array.from(this.control.querySelectorAll(FormMessageClass.root))\n\t\t\t}\n\t\t\treturn []\n\t\t},\n\t}\n}\n"],"version":3}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-7b6bba34.js');
|
|
6
|
+
const constants = require('./constants-9dc978dd.js');
|
|
7
|
+
const template = require('./template-9534c584.js');
|
|
8
|
+
const props = require('./props-d6146e54.js');
|
|
9
|
+
const stencil_utils = require('./stencil.utils-22814956.js');
|
|
10
|
+
const array_utils = require('./array.utils-5a024b3a.js');
|
|
11
|
+
require('./utils-c9b1bba3.js');
|
|
12
|
+
require('./sizes-79872c2a.js');
|
|
13
|
+
require('./gov.log-b842920d.js');
|
|
14
|
+
require('./win-5521073d.js');
|
|
15
|
+
|
|
16
|
+
const govFormGroupCss = ".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,gov-form-radio-group,gov-form-checkbox-group,.gov-form-group{position:relative;display:flex;width:100%;flex-direction:column;align-items:flex-start}gov-form-group .gov-form-label__label,gov-form-radio-group .gov-form-label__label,gov-form-checkbox-group .gov-form-label__label,.gov-form-group .gov-form-label__label{margin:0}gov-form-group[orientation=horizontal],gov-form-radio-group[orientation=horizontal],gov-form-checkbox-group[orientation=horizontal],.gov-form-group[orientation=horizontal]{flex-direction:row;flex-wrap:wrap}gov-form-group[orientation=horizontal] .gov-form-label__label,gov-form-radio-group[orientation=horizontal] .gov-form-label__label,gov-form-checkbox-group[orientation=horizontal] .gov-form-label__label,.gov-form-group[orientation=horizontal] .gov-form-label__label{white-space:nowrap}gov-form-group[gap=\"2xs\"],gov-form-radio-group[gap=\"2xs\"],gov-form-checkbox-group[gap=\"2xs\"],.gov-form-group[gap=\"2xs\"]{gap:0.25rem}gov-form-group[gap=xs],gov-form-radio-group[gap=xs],gov-form-checkbox-group[gap=xs],.gov-form-group[gap=xs]{gap:0.5rem}gov-form-group[gap=s],gov-form-radio-group[gap=s],gov-form-checkbox-group[gap=s],.gov-form-group[gap=s]{gap:0.75rem}gov-form-group[gap=m],gov-form-radio-group[gap=m],gov-form-checkbox-group[gap=m],.gov-form-group[gap=m]{gap:1rem}gov-form-group[gap=l],gov-form-radio-group[gap=l],gov-form-checkbox-group[gap=l],.gov-form-group[gap=l]{gap:1.25rem}";
|
|
17
|
+
|
|
18
|
+
const GovFormCheckboxGroup = class {
|
|
19
|
+
constructor(hostRef) {
|
|
20
|
+
index.registerInstance(this, hostRef);
|
|
21
|
+
this.govChange = index.createEvent(this, "gov-change", 7);
|
|
22
|
+
this.handleChange = (event) => {
|
|
23
|
+
var _a;
|
|
24
|
+
event.stopPropagation();
|
|
25
|
+
const value = array_utils.propsValueToArray(this.value);
|
|
26
|
+
if (!Array.isArray(value))
|
|
27
|
+
return;
|
|
28
|
+
if (event.detail.checked) {
|
|
29
|
+
this.value = [...value, event.detail.value];
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
this.value = (_a = value.filter((val) => val !== event.detail.value)) !== null && _a !== void 0 ? _a : [];
|
|
33
|
+
}
|
|
34
|
+
this.govChange.emit({
|
|
35
|
+
value: this.value,
|
|
36
|
+
component: constants.FormCheckboxGroupClass.root,
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
this.gap = undefined;
|
|
40
|
+
this.orientation = 'vertical';
|
|
41
|
+
this.value = undefined;
|
|
42
|
+
this.h = template.govHost(this.host);
|
|
43
|
+
}
|
|
44
|
+
validateGap(newValue) {
|
|
45
|
+
if (newValue) {
|
|
46
|
+
props.validateProp(constants.FormGroupSizes, newValue, constants.FormGroupClass.root);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
validateOrientation(newValue) {
|
|
50
|
+
if (newValue) {
|
|
51
|
+
props.validateProp(constants.FormGroupOrientation, newValue, constants.FormGroupClass.root);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
componentWillLoad() {
|
|
55
|
+
this.validateGap(this.gap);
|
|
56
|
+
this.validateOrientation(this.orientation);
|
|
57
|
+
this.value = array_utils.propsValueToArray(this.value);
|
|
58
|
+
}
|
|
59
|
+
componentDidRender() {
|
|
60
|
+
stencil_utils.tick(() => this.rerenderComponent());
|
|
61
|
+
}
|
|
62
|
+
rerenderComponent() {
|
|
63
|
+
this.host.querySelectorAll('gov-form-checkbox').forEach((element) => {
|
|
64
|
+
if (!element.hasAttribute('listener-attached')) {
|
|
65
|
+
element.addEventListener('gov-change', this.handleChange);
|
|
66
|
+
}
|
|
67
|
+
element.setAttribute('listener-attached', 'true');
|
|
68
|
+
if (this.value.includes(element.value)) {
|
|
69
|
+
element.checked = true;
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
element.checked = false;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
render() {
|
|
77
|
+
return (index.h(index.Host, { gap: this.gap, class: this.h.classes(constants.FormGroupClass.root), value: this.value }, index.h("slot", null)));
|
|
78
|
+
}
|
|
79
|
+
get host() { return index.getElement(this); }
|
|
80
|
+
static get watchers() { return {
|
|
81
|
+
"gap": ["validateGap"],
|
|
82
|
+
"orientation": ["validateOrientation"]
|
|
83
|
+
}; }
|
|
84
|
+
};
|
|
85
|
+
GovFormCheckboxGroup.style = govFormGroupCss;
|
|
86
|
+
|
|
87
|
+
exports.gov_form_checkbox_group = GovFormCheckboxGroup;
|
|
88
|
+
|
|
89
|
+
//# sourceMappingURL=gov-form-checkbox-group.cjs.entry.js.map
|
|
@@ -0,0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AAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAC1B,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IAC1C,IAAI,CAAC,KAAK,GAAGL,6BAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;GAC1C;EAED,kBAAkB;IACjBO,kBAAI,CAAC,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAA;GACpC;EAED,iBAAiB;IAChB,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO;MAC/D,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,EAAE;QAC/C,OAAO,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,CAAA;OACzD;MACD,OAAO,CAAC,YAAY,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAA;MACjD,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACvC,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;OACvB;WAAM;QACN,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;OACxB;KACD,CAAC,CAAA;GACF;EAED,MAAM;IACL,QACCC,QAACC,UAAI,IAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAACJ,wBAAc,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,IACjFG,qBAAa,CACP,EACP;GACD;;;;;;;;;;;","names":["propsValueToArray","FormCheckboxGroupClass","govHost","validateProp","FormGroupSizes","FormGroupClass","FormGroupOrientation","tick","h","Host"],"sources":["../../../packages/core/src/components/gov-form/group/gov-form-group.scss?tag=gov-form-checkbox-group","../../../packages/core/src/components/gov-form/group/gov-form-checkbox-group.tsx"],"sourcesContent":["$class: \".gov-form-group\";\n\ngov-form-group, gov-form-radio-group, gov-form-checkbox-group, #{$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&[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\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","import {Component, Element, Event, EventEmitter, h, Host, Prop, Watch} from \"@stencil/core\"\nimport {\n\tFormCheckboxGroupClass,\n\tFormGroupClass,\n\tFormGroupOrientation,\n\tFormGroupOrientationType,\n\tFormGroupSizes,\n\tFormGroupSizesType\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormCheckboxEvent} from \"../checkbox/gov-form-checkbox.types\"\nimport {FormCheckboxGroupEvent} from \"./gov-form-group.types\"\nimport {tick} from \"../../../utils/stencil.utils\"\nimport {propsValueToArray} from \"../../../utils/array.utils\"\n\n@Component({\n\ttag: \"gov-form-checkbox-group\",\n\tstyleUrl: \"gov-form-group.scss\",\n})\nexport class GovFormCheckboxGroup {\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\t/**\n\t * Group's value\n\t */\n\t@Prop({attribute: \"value\", mutable: true}) value?: string | string[] = undefined\n\t/**\n /* Emitted when the checkbox change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormCheckboxGroupEvent>\n\n\t@Watch(\"gap\")\n\tvalidateGap(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupSizes, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\t@Watch(\"orientation\")\n\tvalidateOrientation(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupOrientation, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\thandleChange = (event: CustomEvent<FormCheckboxEvent>) => {\n\t\tevent.stopPropagation()\n\t\tconst value = propsValueToArray<string[]>(this.value);\n\t\tif (!Array.isArray(value)) return;\n\t\tif (event.detail.checked) {\n\t\t\tthis.value = [...value, event.detail.value]\n\t\t} else {\n\t\t\tthis.value = value.filter((val) => val !== event.detail.value) ?? []\n\t\t}\n\t\tthis.govChange.emit({\n\t\t\tvalue: this.value,\n\t\t\tcomponent: FormCheckboxGroupClass.root,\n\t\t})\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateGap(this.gap)\n\t\tthis.validateOrientation(this.orientation)\n\t\tthis.value = propsValueToArray(this.value)\n\t}\n\n\tcomponentDidRender(): void {\n\t\ttick(() => this.rerenderComponent())\n\t}\n\n\trerenderComponent(): void {\n\t\tthis.host.querySelectorAll('gov-form-checkbox').forEach((element) => {\n\t\t\tif (!element.hasAttribute('listener-attached')) {\n\t\t\t\telement.addEventListener('gov-change', this.handleChange)\n\t\t\t}\n\t\t\telement.setAttribute('listener-attached', 'true')\n\t\t\tif (this.value.includes(element.value)) {\n\t\t\t\telement.checked = true;\n\t\t\t} else {\n\t\t\t\telement.checked = false;\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host gap={this.gap} class={this.h.classes(FormGroupClass.root)} value={this.value}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-7b6bba34.js');
|
|
6
6
|
const string_utils = require('./string.utils-0f08c48c.js');
|
|
7
7
|
const props = require('./props-d6146e54.js');
|
|
8
|
-
const form = require('./form-
|
|
8
|
+
const form = require('./form-893791cf.js');
|
|
9
9
|
const template = require('./template-9534c584.js');
|
|
10
10
|
const wcag = require('./wcag-e6257f27.js');
|
|
11
11
|
const win = require('./win-5521073d.js');
|
|
@@ -26,6 +26,7 @@ const GovFormCheckbox = class {
|
|
|
26
26
|
this.govFocus = index.createEvent(this, "gov-focus", 7);
|
|
27
27
|
this.govBlur = index.createEvent(this, "gov-blur", 7);
|
|
28
28
|
this.govChange = index.createEvent(this, "gov-change", 7);
|
|
29
|
+
this.hydrated = false;
|
|
29
30
|
this.value = undefined;
|
|
30
31
|
this.checked = false;
|
|
31
32
|
this.required = false;
|
|
@@ -63,6 +64,9 @@ const GovFormCheckbox = class {
|
|
|
63
64
|
await this.validateWcag();
|
|
64
65
|
}
|
|
65
66
|
}
|
|
67
|
+
connectedCallback() {
|
|
68
|
+
this.hydrated = true;
|
|
69
|
+
}
|
|
66
70
|
render() {
|
|
67
71
|
const wrapCheckbox = (children) => {
|
|
68
72
|
if (this.noLabel) {
|
|
@@ -70,7 +74,7 @@ const GovFormCheckbox = class {
|
|
|
70
74
|
}
|
|
71
75
|
return children;
|
|
72
76
|
};
|
|
73
|
-
return (index.h(index.Host, { class: form.FormCheckboxClass.root, checked: this.checked, size: this.size, invalid: template.toBoolAttrIfDefined(this.invalid) }, wrapCheckbox(index.h(Fragment.Fragment, null, index.h("input", { id: this.identifier || this.checkboxId, type: "checkbox", value: this.value, name: this.name, checked: this.checked, onClick: this.onClickHandler.bind(this), onChange: this.onChangeHandler.bind(this), onFocus: this.onFocusHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, disabled: this.disabled, ref: el => (this.inputRef = el), "aria-checked": template.toBoolAttr(this.checked), "aria-required": template.toBoolAttrIfDefined(this.required), "aria-invalid": template.toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-disabled": template.toBoolAttrIfDefined(this.disabled) }), index.h("span", null, index.h("slot", { name: "label" }), index.h("gov-icon", { class: form.FormCheckboxClass.check, name: "check-lg" }))))));
|
|
77
|
+
return (index.h(index.Host, { class: form.FormCheckboxClass.root, hydrated: this.hydrated, checked: this.checked, size: this.size, invalid: template.toBoolAttrIfDefined(this.invalid) }, wrapCheckbox(index.h(Fragment.Fragment, null, index.h("input", { id: this.identifier || this.checkboxId, type: "checkbox", value: this.value, name: this.name, checked: this.checked, onClick: this.onClickHandler.bind(this), onChange: this.onChangeHandler.bind(this), onFocus: this.onFocusHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, disabled: this.disabled, ref: el => (this.inputRef = el), "aria-checked": template.toBoolAttr(this.checked), "aria-required": template.toBoolAttrIfDefined(this.required), "aria-invalid": template.toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-disabled": template.toBoolAttrIfDefined(this.disabled) }), index.h("span", null, index.h("slot", { name: "label" }), index.h("gov-icon", { class: form.FormCheckboxClass.check, name: "check-lg" }))))));
|
|
74
78
|
}
|
|
75
79
|
onFocusHandler(e) {
|
|
76
80
|
e.stopPropagation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-form-checkbox.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;AAAA,MAAM,kBAAkB,GAAG,y/PAAy/P;;MCkBvgQ,eAAe;EAO3B;;;;;;mBAekD,KAAK;oBAKlB,KAAK;oBAKL,KAAK;;gBAQM,GAAG;;mBAQU,KAAK;;;;IAxCjE,IAAI,CAAC,UAAU,GAAGA,qBAAQ,CAAC,aAAa,CAAC,CAAA;IAEzC,IAAI,CAAC,CAAC,GAAGC,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,CAAC,GAA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;;;;;;;;;;","names":["createID","govHost","govForm","validateProp","FormCheckboxSizes","FormCheckboxClass","toBoolAttr","canValidateWcagOnRender","delay","h","Host","toBoolAttrIfDefined","Fragment","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/checkbox/gov-form-checkbox.scss?tag=gov-form-checkbox","../../../packages/core/src/components/gov-form/checkbox/gov-form-checkbox.tsx"],"sourcesContent":["/*\n * Checkbox\n */\n\n@import \"../checkbox/gov-form-checkbox-core.scss\";\n\n$class: \".gov-form-checkbox\";\n\n#{$class} {\n @extend %form-checkbox-core;\n\n input + span {\n &::before {\n border-radius: $border-radius;\n }\n }\n\n &__check {\n position: absolute;\n color: $form-checkbox-check-color;\n opacity: 0;\n transition: $t linear opacity;\n }\n\n &__label {\n position: relative;\n }\n\n // STATES\n input:checked + span::before {\n background: $form-checkbox-indicator-bg;\n }\n\n input:checked + span &__check {\n opacity: 1;\n }\n\n @include parameter(\"invalid\") {\n input:checked + span::before {\n background: $form-state-color-error;\n }\n }\n @include parameter(\"disabled\") {\n input:checked + span::before {\n border-color: $form-state-bg-disabled;\n background-color: $form-state-bg-disabled;\n }\n }\n\n // VARIANTS\n @each $size, $definitions in $form-checkbox-core-sizes {\n &[size=\"#{$size}\"] {\n #{$class} {\n &__check {\n top: calc((get(\"indicator-size\", $definitions) - get(\"check-size\", $definitions)) / 2);\n left: calc((get(\"indicator-size\", $definitions) - get(\"check-size\", $definitions)) / 2);\n width: get(\"check-size\", $definitions);\n height: get(\"check-size\", $definitions);\n }\n }\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { createID } from \"../../../utils/string.utils\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\nimport { FormCheckboxClass, FormCheckboxSizes, FormCheckboxSizesType } from \"./constants\"\nimport { govHost, toBoolAttr, toBoolAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { validateWcagLabelFor, validateWcagRef } from \"../../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\nimport { delay } from \"../../../utils/utils\"\nimport { GovForm } from \"../../../helpers/Dom/form.types\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { govForm } from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport { FormCheckboxEvent } from \"./gov-form-checkbox.types\"\n\n@Component({\n\ttag: \"gov-form-checkbox\",\n\tstyleUrl: \"gov-form-checkbox.scss\",\n})\nexport class GovFormCheckbox {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\n\tprivate readonly checkboxId: string\n\n\tconstructor() {\n\t\tthis.checkboxId = createID(\"GovCheckbox\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormCheckboxElement\n\t/**\n\t * Value of checkbox\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * Checkbox button state\n\t */\n\t@Prop({ reflect: true, mutable: true }) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the checkbox component disabled.\n\t * This prevents users from being able to interact with the checkbox, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Name of the checkbox.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Checkboxes size.\n\t */\n\t@Prop() readonly size?: FormCheckboxSizesType = \"m\"\n\t/**\n\t * Custom checkbox identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({ attribute: \"no-label\" }) readonly noLabel: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-described-by\" }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when the checkbox has focus.\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<FormCheckboxEvent>\n\t/**\n\t * Emitted when the checkbox loses focus.\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<FormCheckboxEvent>\n\t/**\n\t * Emitted when the checkbox change value.\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<FormCheckboxEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormCheckboxSizes, newValue, FormCheckboxClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.f.passAttrToControl(\"type\", \"checkbox\")\n\t\tthis.passControlAttrs()\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.checkboxId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\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 wrapCheckbox = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn (\n\t\t\t\t\t<label class={FormCheckboxClass.label}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</label>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormCheckboxClass.root} checked={this.checked} size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapCheckbox(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\taria-checked={toBoolAttr(this.checked)}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\" />\n\t\t\t\t\t\t\t<gov-icon class={FormCheckboxClass.check} name=\"check-lg\"></gov-icon>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"wcag-described-by\", FormCheckboxClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormCheckboxClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.checkboxId, this.wcagLabelledBy, FormCheckboxClass.root)\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"gov-form-checkbox.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;AAAA,MAAM,kBAAkB,GAAG,y/PAAy/P;;MCkBvgQ,eAAe;EAQ3B;;;;;IAFQ,aAAQ,GAAG,KAAK,CAAA;;mBAiB0B,KAAK;oBAKlB,KAAK;oBAKL,KAAK;;gBAQM,GAAG;;mBAQU,KAAK;;;;IAxCjE,IAAI,CAAC,UAAU,GAAGA,qBAAQ,CAAC,aAAa,CAAC,CAAA;IAEzC,IAAI,CAAC,CAAC,GAAGC,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;I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FS,yBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,EAAET,sBAAiB,CAAC,IAAI,CAAC,CAAA;GACrG;;;;;;;;;;;;","names":["createID","govHost","govForm","validateProp","FormCheckboxSizes","FormCheckboxClass","toBoolAttr","canValidateWcagOnRender","delay","h","Host","toBoolAttrIfDefined","Fragment","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/checkbox/gov-form-checkbox.scss?tag=gov-form-checkbox","../../../packages/core/src/components/gov-form/checkbox/gov-form-checkbox.tsx"],"sourcesContent":["/*\n * Checkbox\n */\n\n@import \"../checkbox/gov-form-checkbox-core.scss\";\n\n$class: \".gov-form-checkbox\";\n\n#{$class} {\n @extend %form-checkbox-core;\n\n input + span {\n &::before {\n border-radius: $border-radius;\n }\n }\n\n &__check {\n position: absolute;\n color: $form-checkbox-check-color;\n opacity: 0;\n transition: $t linear opacity;\n }\n\n &__label {\n position: relative;\n }\n\n // STATES\n input:checked + span::before {\n background: $form-checkbox-indicator-bg;\n }\n\n input:checked + span &__check {\n opacity: 1;\n }\n\n @include parameter(\"invalid\") {\n input:checked + span::before {\n background: $form-state-color-error;\n }\n }\n @include parameter(\"disabled\") {\n input:checked + span::before {\n border-color: $form-state-bg-disabled;\n background-color: $form-state-bg-disabled;\n }\n }\n\n // VARIANTS\n @each $size, $definitions in $form-checkbox-core-sizes {\n &[size=\"#{$size}\"] {\n #{$class} {\n &__check {\n top: calc((get(\"indicator-size\", $definitions) - get(\"check-size\", $definitions)) / 2);\n left: calc((get(\"indicator-size\", $definitions) - get(\"check-size\", $definitions)) / 2);\n width: get(\"check-size\", $definitions);\n height: get(\"check-size\", $definitions);\n }\n }\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { createID } from \"../../../utils/string.utils\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\nimport { FormCheckboxClass, FormCheckboxSizes, FormCheckboxSizesType } from \"./constants\"\nimport { govHost, toBoolAttr, toBoolAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { validateWcagLabelFor, validateWcagRef } from \"../../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\nimport { delay } from \"../../../utils/utils\"\nimport { GovForm } from \"../../../helpers/Dom/form.types\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { govForm } from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport { FormCheckboxEvent } from \"./gov-form-checkbox.types\"\n\n@Component({\n\ttag: \"gov-form-checkbox\",\n\tstyleUrl: \"gov-form-checkbox.scss\",\n})\nexport class GovFormCheckbox {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\n\tprivate readonly checkboxId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.checkboxId = createID(\"GovCheckbox\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormCheckboxElement\n\t/**\n\t * Value of checkbox\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * Checkbox button state\n\t */\n\t@Prop({ reflect: true, mutable: true }) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the checkbox component disabled.\n\t * This prevents users from being able to interact with the checkbox, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Name of the checkbox.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Checkboxes size.\n\t */\n\t@Prop() readonly size?: FormCheckboxSizesType = \"m\"\n\t/**\n\t * Custom checkbox identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({ attribute: \"no-label\" }) readonly noLabel: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-described-by\" }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when the checkbox has focus.\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<FormCheckboxEvent>\n\t/**\n\t * Emitted when the checkbox loses focus.\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<FormCheckboxEvent>\n\t/**\n\t * Emitted when the checkbox change value.\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<FormCheckboxEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormCheckboxSizes, newValue, FormCheckboxClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.f.passAttrToControl(\"type\", \"checkbox\")\n\t\tthis.passControlAttrs()\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.checkboxId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst wrapCheckbox = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn (\n\t\t\t\t\t<label class={FormCheckboxClass.label}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</label>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormCheckboxClass.root} hydrated={this.hydrated} checked={this.checked} size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapCheckbox(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\taria-checked={toBoolAttr(this.checked)}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\" />\n\t\t\t\t\t\t\t<gov-icon class={FormCheckboxClass.check} name=\"check-lg\"></gov-icon>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"wcag-described-by\", FormCheckboxClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormCheckboxClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.checkboxId, this.wcagLabelledBy, FormCheckboxClass.root)\n\t}\n}\n"],"version":3}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-7b6bba34.js');
|
|
6
|
-
const form = require('./form-
|
|
6
|
+
const form = require('./form-893791cf.js');
|
|
7
7
|
const template = require('./template-9534c584.js');
|
|
8
8
|
const string_utils = require('./string.utils-0f08c48c.js');
|
|
9
9
|
require('./sizes-79872c2a.js');
|
|
@@ -8,7 +8,7 @@ const template = require('./template-9534c584.js');
|
|
|
8
8
|
const wcag = require('./wcag-e6257f27.js');
|
|
9
9
|
const win = require('./win-5521073d.js');
|
|
10
10
|
const utils = require('./utils-c9b1bba3.js');
|
|
11
|
-
const form = require('./form-
|
|
11
|
+
const form = require('./form-893791cf.js');
|
|
12
12
|
require('./gov.log-b842920d.js');
|
|
13
13
|
require('./sizes-79872c2a.js');
|
|
14
14
|
require('./variants-f5ffeef3.js');
|
|
@@ -3,24 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-7b6bba34.js');
|
|
6
|
-
const
|
|
7
|
-
const sizes = require('./sizes-79872c2a.js');
|
|
6
|
+
const constants = require('./constants-9dc978dd.js');
|
|
8
7
|
const template = require('./template-9534c584.js');
|
|
9
8
|
const props = require('./props-d6146e54.js');
|
|
9
|
+
require('./utils-c9b1bba3.js');
|
|
10
|
+
require('./sizes-79872c2a.js');
|
|
10
11
|
require('./gov.log-b842920d.js');
|
|
11
12
|
require('./win-5521073d.js');
|
|
12
13
|
|
|
13
|
-
const
|
|
14
|
-
var FormGroupOrientation;
|
|
15
|
-
(function (FormGroupOrientation) {
|
|
16
|
-
FormGroupOrientation["HORIZONTAL"] = "horizontal";
|
|
17
|
-
FormGroupOrientation["VERTICAL"] = "vertical";
|
|
18
|
-
})(FormGroupOrientation || (FormGroupOrientation = {}));
|
|
19
|
-
const FormGroupClass = {
|
|
20
|
-
root: 'gov-form-group',
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const govFormGroupCss = ".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[orientation=horizontal]{flex-direction:row;flex-wrap:wrap}.gov-form-group[orientation=horizontal] .gov-form-label__label{white-space:nowrap}.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}";
|
|
14
|
+
const govFormGroupCss = ".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,gov-form-radio-group,gov-form-checkbox-group,.gov-form-group{position:relative;display:flex;width:100%;flex-direction:column;align-items:flex-start}gov-form-group .gov-form-label__label,gov-form-radio-group .gov-form-label__label,gov-form-checkbox-group .gov-form-label__label,.gov-form-group .gov-form-label__label{margin:0}gov-form-group[orientation=horizontal],gov-form-radio-group[orientation=horizontal],gov-form-checkbox-group[orientation=horizontal],.gov-form-group[orientation=horizontal]{flex-direction:row;flex-wrap:wrap}gov-form-group[orientation=horizontal] .gov-form-label__label,gov-form-radio-group[orientation=horizontal] .gov-form-label__label,gov-form-checkbox-group[orientation=horizontal] .gov-form-label__label,.gov-form-group[orientation=horizontal] .gov-form-label__label{white-space:nowrap}gov-form-group[gap=\"2xs\"],gov-form-radio-group[gap=\"2xs\"],gov-form-checkbox-group[gap=\"2xs\"],.gov-form-group[gap=\"2xs\"]{gap:0.25rem}gov-form-group[gap=xs],gov-form-radio-group[gap=xs],gov-form-checkbox-group[gap=xs],.gov-form-group[gap=xs]{gap:0.5rem}gov-form-group[gap=s],gov-form-radio-group[gap=s],gov-form-checkbox-group[gap=s],.gov-form-group[gap=s]{gap:0.75rem}gov-form-group[gap=m],gov-form-radio-group[gap=m],gov-form-checkbox-group[gap=m],.gov-form-group[gap=m]{gap:1rem}gov-form-group[gap=l],gov-form-radio-group[gap=l],gov-form-checkbox-group[gap=l],.gov-form-group[gap=l]{gap:1.25rem}";
|
|
24
15
|
|
|
25
16
|
const GovFormGroup = class {
|
|
26
17
|
constructor(hostRef) {
|
|
@@ -31,12 +22,12 @@ const GovFormGroup = class {
|
|
|
31
22
|
}
|
|
32
23
|
validateGap(newValue) {
|
|
33
24
|
if (newValue) {
|
|
34
|
-
props.validateProp(FormGroupSizes, newValue, FormGroupClass.root);
|
|
25
|
+
props.validateProp(constants.FormGroupSizes, newValue, constants.FormGroupClass.root);
|
|
35
26
|
}
|
|
36
27
|
}
|
|
37
28
|
validateOrientation(newValue) {
|
|
38
29
|
if (newValue) {
|
|
39
|
-
props.validateProp(FormGroupOrientation, newValue, FormGroupClass.root);
|
|
30
|
+
props.validateProp(constants.FormGroupOrientation, newValue, constants.FormGroupClass.root);
|
|
40
31
|
}
|
|
41
32
|
}
|
|
42
33
|
componentWillLoad() {
|
|
@@ -44,7 +35,7 @@ const GovFormGroup = class {
|
|
|
44
35
|
this.validateOrientation(this.orientation);
|
|
45
36
|
}
|
|
46
37
|
render() {
|
|
47
|
-
return (index.h(index.Host, { gap: this.gap, class: this.h.classes(FormGroupClass.root) }, index.h("slot", null)));
|
|
38
|
+
return (index.h(index.Host, { gap: this.gap, class: this.h.classes(constants.FormGroupClass.root) }, index.h("slot", null)));
|
|
48
39
|
}
|
|
49
40
|
get host() { return index.getElement(this); }
|
|
50
41
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gov-form-group.entry.cjs.js","mappings":"
|
|
1
|
+
{"file":"gov-form-group.entry.cjs.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,ivDAAivD;;MCgB5vD,YAAY;EAGvB;;eAQ4C,SAAS;uBAIK,UAAU;IAXlE,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC5B;EAaD,WAAW,CAAC,QAAgB;IAC1B,IAAI,QAAQ,EAAE;MACZC,kBAAY,CAACC,wBAAc,EAAE,QAAQ,EAAEC,wBAAc,CAAC,IAAI,CAAC,CAAA;KAC5D;GACF;EAGD,mBAAmB,CAAC,QAAgB;IAClC,IAAI,QAAQ,EAAE;MACZF,kBAAY,CAACG,8BAAoB,EAAE,QAAQ,EAAED,wBAAc,CAAC,IAAI,CAAC,CAAA;KAClE;GACF;EAED,iBAAiB;IACf,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAC1B,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;GAC3C;EAID,MAAM;IACJ,QACEE,QAACC,UAAI,IAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAACH,wBAAc,CAAC,IAAI,CAAC,IAC7DE,qBAAa,CACR,EACR;GACF;;;;;;;;;;;","names":["govHost","validateProp","FormGroupSizes","FormGroupClass","FormGroupOrientation","h","Host"],"sources":["../../../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":["$class: \".gov-form-group\";\n\ngov-form-group, gov-form-radio-group, gov-form-checkbox-group, #{$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&[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\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","import {Component, Element, h, Host, Prop, Watch} from \"@stencil/core\"\nimport {\n FormGroupClass,\n FormGroupOrientation,\n FormGroupOrientationType,\n FormGroupSizes,\n FormGroupSizesType\n} 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 tag: \"gov-form-group\",\n styleUrl: \"gov-form-group.scss\",\n})\nexport class GovFormGroup {\n private readonly h: GovHost\n\n constructor() {\n this.h = govHost(this.host)\n }\n\n @Element() host: HTMLGovFormGroupElement\n /**\n * Gap's size.\n */\n @Prop() readonly gap?: FormGroupSizesType = undefined\n /**\n * Elements orientation\n */\n @Prop() readonly orientation?: FormGroupOrientationType = 'vertical'\n\n @Watch(\"gap\")\n validateGap(newValue: string): void {\n if (newValue) {\n validateProp(FormGroupSizes, newValue, FormGroupClass.root)\n }\n }\n\n @Watch(\"orientation\")\n validateOrientation(newValue: string): void {\n if (newValue) {\n validateProp(FormGroupOrientation, newValue, FormGroupClass.root)\n }\n }\n\n componentWillLoad(): void {\n this.validateGap(this.gap)\n this.validateOrientation(this.orientation)\n }\n\n\n\n render() {\n return (\n <Host gap={this.gap} class={this.h.classes(FormGroupClass.root)}>\n <slot></slot>\n </Host>\n )\n }\n}\n"],"version":3}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-7b6bba34.js');
|
|
6
|
-
const form = require('./form-
|
|
6
|
+
const form = require('./form-893791cf.js');
|
|
7
7
|
const template = require('./template-9534c584.js');
|
|
8
8
|
const win = require('./win-5521073d.js');
|
|
9
9
|
const props = require('./props-d6146e54.js');
|