@gov-design-system-ce/components 4.0.7 → 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/array.utils-5a024b3a.js +46 -0
- package/dist/cjs/array.utils-5a024b3a.js.map +1 -0
- 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-74063d50.js → form-893791cf.js} +3 -3
- package/dist/cjs/form-893791cf.js.map +1 -0
- 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 +83 -102
- 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 +14 -18
- package/dist/cjs/gov-form-select.cjs.entry.js.map +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/gov-pagination.cjs.entry.js +2 -8
- package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/index-7b6bba34.js +8 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/stencil.utils-22814956.js +11 -0
- package/dist/cjs/stencil.utils-22814956.js.map +1 -0
- 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 +134 -253
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.types.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/select/constants.js +1 -1
- package/dist/collection/components/gov-form/select/constants.js.map +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.js +40 -64
- package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.types.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/components/gov-pagination/gov-pagination.js +1 -1
- package/dist/collection/components/gov-pagination/gov-pagination.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 +80 -13
- 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/collection/utils/array.utils.js +14 -0
- package/dist/collection/utils/array.utils.js.map +1 -1
- package/dist/collection/utils/object.utils.js +18 -0
- package/dist/collection/utils/object.utils.js.map +1 -0
- package/dist/collection/utils/stencil.utils.js +6 -0
- package/dist/collection/utils/stencil.utils.js.map +1 -0
- 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-pagination.js.map +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-44762d17.js → p-0a1fbf26.js} +2 -2
- package/dist/components/p-2dee9951.js.map +1 -1
- package/dist/components/p-3a04fb9b.js +2 -0
- package/dist/components/p-3a04fb9b.js.map +1 -0
- package/dist/components/p-4529b963.js +2 -0
- package/dist/components/{p-8b7b916a.js.map → p-4529b963.js.map} +1 -1
- package/dist/components/{p-76b229e3.js → p-4a19259c.js} +2 -2
- package/dist/components/p-75be4c94.js +2 -0
- package/dist/components/p-75be4c94.js.map +1 -0
- package/dist/components/{p-5dbe0178.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-976404a5.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-99860f34.js → p-b5716fb6.js} +2 -2
- package/dist/components/p-f04382c3.js +2 -0
- package/dist/components/p-f04382c3.js.map +1 -0
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-f9dcaafb.entry.js → p-0702b541.entry.js} +2 -2
- package/dist/core/p-0702b541.entry.js.map +1 -0
- package/dist/core/p-0eb3fd76.entry.js +2 -0
- package/dist/core/{p-e3b14974.entry.js.map → p-0eb3fd76.entry.js.map} +1 -1
- package/dist/core/{p-148501cc.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-9402e4cc.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-4b4a270d.entry.js +2 -0
- package/dist/core/p-4b4a270d.entry.js.map +1 -0
- package/dist/core/p-5bc604a3.js.map +1 -1
- package/dist/core/p-61a2b12a.js +2 -0
- package/dist/core/p-61a2b12a.js.map +1 -0
- package/dist/core/p-8fcc8483.js +2 -0
- package/dist/core/p-8fcc8483.js.map +1 -0
- package/dist/core/p-927880d6.entry.js.map +1 -1
- package/dist/core/{p-ac856de6.entry.js → p-9c00b909.entry.js} +2 -2
- package/dist/core/p-ab5a13ea.js +2 -0
- package/dist/core/p-ab5a13ea.js.map +1 -0
- package/dist/core/{p-835f1187.entry.js → p-c20ee863.entry.js} +2 -2
- package/dist/core/p-cad17bfe.entry.js +2 -0
- package/dist/core/p-cad17bfe.entry.js.map +1 -0
- package/dist/core/{p-1bc2f62c.entry.js → p-d07d3dcc.entry.js} +2 -2
- package/dist/core/p-ead75342.entry.js +2 -0
- package/dist/core/p-ead75342.entry.js.map +1 -0
- package/dist/core/p-f4ef1b95.entry.js +2 -0
- package/dist/core/p-f4ef1b95.entry.js.map +1 -0
- package/dist/esm/array.utils-b27436ea.js +43 -0
- package/dist/esm/array.utils-b27436ea.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-39dc6896.js → form-b81fd97e.js} +3 -3
- package/dist/esm/form-b81fd97e.js.map +1 -0
- 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 +83 -102
- 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 +14 -18
- package/dist/esm/gov-form-select.entry.js.map +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/gov-pagination.entry.js +2 -8
- package/dist/esm/gov-pagination.entry.js.map +1 -1
- package/dist/esm/index-eb59f132.js +8 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/stencil.utils-7cb5b075.js +9 -0
- package/dist/esm/stencil.utils-7cb5b075.js.map +1 -0
- package/dist/hydrate/index.js +335 -157
- 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/multiselect/gov-form-multi-select.d.ts +17 -29
- package/dist/types/components/gov-form/multiselect/gov-form-multi-select.types.d.ts +3 -2
- package/dist/types/components/gov-form/radio/gov-form-radio.d.ts +2 -0
- package/dist/types/components/gov-form/select/constants.d.ts +1 -1
- package/dist/types/components/gov-form/select/gov-form-select.d.ts +6 -9
- package/dist/types/components/gov-form/select/gov-form-select.types.d.ts +1 -1
- package/dist/types/components/gov-form/switch/gov-form-switch.d.ts +2 -0
- package/dist/types/components.d.ts +122 -38
- package/dist/types/utils/array.utils.d.ts +1 -0
- package/dist/types/utils/object.utils.d.ts +1 -0
- package/dist/types/utils/stencil.utils.d.ts +1 -0
- package/package.json +2 -2
- package/dist/cjs/form-74063d50.js.map +0 -1
- package/dist/components/p-2d5d24af.js +0 -2
- package/dist/components/p-2d5d24af.js.map +0 -1
- package/dist/components/p-53e02bee.js +0 -2
- package/dist/components/p-53e02bee.js.map +0 -1
- package/dist/components/p-8b7b916a.js +0 -2
- package/dist/core/p-0e5fa8bf.js +0 -2
- package/dist/core/p-0e5fa8bf.js.map +0 -1
- package/dist/core/p-148501cc.entry.js.map +0 -1
- package/dist/core/p-531c350f.entry.js +0 -2
- package/dist/core/p-531c350f.entry.js.map +0 -1
- package/dist/core/p-9402e4cc.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-e3b14974.entry.js +0 -2
- package/dist/core/p-f1031bac.entry.js +0 -2
- package/dist/core/p-f1031bac.entry.js.map +0 -1
- package/dist/core/p-f7065042.entry.js +0 -2
- package/dist/core/p-f7065042.entry.js.map +0 -1
- package/dist/core/p-f9dcaafb.entry.js.map +0 -1
- package/dist/esm/form-39dc6896.js.map +0 -1
- package/dist/globals.d.ts +0 -2
- package/dist/types/types/typings.d.ts +0 -6
- /package/dist/components/{p-44762d17.js.map → p-0a1fbf26.js.map} +0 -0
- /package/dist/components/{p-76b229e3.js.map → p-4a19259c.js.map} +0 -0
- /package/dist/components/{p-5dbe0178.js.map → p-8749590a.js.map} +0 -0
- /package/dist/components/{p-976404a5.js.map → p-a7443b36.js.map} +0 -0
- /package/dist/components/{p-99860f34.js.map → p-b5716fb6.js.map} +0 -0
- /package/dist/core/{p-ac856de6.entry.js.map → p-9c00b909.entry.js.map} +0 -0
- /package/dist/core/{p-835f1187.entry.js.map → p-c20ee863.entry.js.map} +0 -0
- /package/dist/core/{p-1bc2f62c.entry.js.map → p-d07d3dcc.entry.js.map} +0 -0
package/dist/hydrate/index.js
CHANGED
|
@@ -7555,7 +7555,7 @@ const FormInputClass = {
|
|
|
7555
7555
|
root: 'gov-form-input',
|
|
7556
7556
|
};
|
|
7557
7557
|
|
|
7558
|
-
const FormSelectSizes = pick(Sizes, ['_M', '_L', '_XL']);
|
|
7558
|
+
const FormSelectSizes = pick(Sizes, ['_S', '_M', '_L', '_XL']);
|
|
7559
7559
|
const FormSelectVariants = pick(Variants, ['PRIMARY', 'SECONDARY']);
|
|
7560
7560
|
const FormSelectClass = {
|
|
7561
7561
|
root: 'gov-form-select',
|
|
@@ -7618,7 +7618,7 @@ const govForm = (govHost) => {
|
|
|
7618
7618
|
},
|
|
7619
7619
|
get hasGroupChildren() {
|
|
7620
7620
|
if (this.control) {
|
|
7621
|
-
return this.control.querySelectorAll('gov-form-group > *').length > 1;
|
|
7621
|
+
return this.control.querySelectorAll('gov-form-group > *, gov-form-radio-group > *, gov-form-checkbox-group > *').length > 1;
|
|
7622
7622
|
}
|
|
7623
7623
|
return false;
|
|
7624
7624
|
},
|
|
@@ -7673,6 +7673,7 @@ class GovFormCheckbox {
|
|
|
7673
7673
|
this.govFocus = createEvent(this, "gov-focus", 7);
|
|
7674
7674
|
this.govBlur = createEvent(this, "gov-blur", 7);
|
|
7675
7675
|
this.govChange = createEvent(this, "gov-change", 7);
|
|
7676
|
+
this.hydrated = false;
|
|
7676
7677
|
this.value = undefined;
|
|
7677
7678
|
this.checked = false;
|
|
7678
7679
|
this.required = false;
|
|
@@ -7710,6 +7711,9 @@ class GovFormCheckbox {
|
|
|
7710
7711
|
await this.validateWcag();
|
|
7711
7712
|
}
|
|
7712
7713
|
}
|
|
7714
|
+
connectedCallback() {
|
|
7715
|
+
this.hydrated = true;
|
|
7716
|
+
}
|
|
7713
7717
|
render() {
|
|
7714
7718
|
const wrapCheckbox = (children) => {
|
|
7715
7719
|
if (this.noLabel) {
|
|
@@ -7717,7 +7721,7 @@ class GovFormCheckbox {
|
|
|
7717
7721
|
}
|
|
7718
7722
|
return children;
|
|
7719
7723
|
};
|
|
7720
|
-
return (hAsync(Host, { class: FormCheckboxClass.root, checked: this.checked, size: this.size, invalid: toBoolAttrIfDefined(this.invalid) }, wrapCheckbox(hAsync(Fragment, null, hAsync("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": toBoolAttr(this.checked), "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-disabled": toBoolAttrIfDefined(this.disabled) }), hAsync("span", null, hAsync("slot", { name: "label" }), hAsync("gov-icon", { class: FormCheckboxClass.check, name: "check-lg" }))))));
|
|
7724
|
+
return (hAsync(Host, { class: FormCheckboxClass.root, hydrated: this.hydrated, checked: this.checked, size: this.size, invalid: toBoolAttrIfDefined(this.invalid) }, wrapCheckbox(hAsync(Fragment, null, hAsync("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": toBoolAttr(this.checked), "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-disabled": toBoolAttrIfDefined(this.disabled) }), hAsync("span", null, hAsync("slot", { name: "label" }), hAsync("gov-icon", { class: FormCheckboxClass.check, name: "check-lg" }))))));
|
|
7721
7725
|
}
|
|
7722
7726
|
onFocusHandler(e) {
|
|
7723
7727
|
e.stopPropagation();
|
|
@@ -7795,6 +7799,151 @@ class GovFormCheckbox {
|
|
|
7795
7799
|
}; }
|
|
7796
7800
|
}
|
|
7797
7801
|
|
|
7802
|
+
const FormGroupSizes = pick(Sizes, ['_2XS', '_XS', '_S', '_M', '_L']);
|
|
7803
|
+
var FormGroupOrientation;
|
|
7804
|
+
(function (FormGroupOrientation) {
|
|
7805
|
+
FormGroupOrientation["HORIZONTAL"] = "horizontal";
|
|
7806
|
+
FormGroupOrientation["VERTICAL"] = "vertical";
|
|
7807
|
+
})(FormGroupOrientation || (FormGroupOrientation = {}));
|
|
7808
|
+
const FormGroupClass = {
|
|
7809
|
+
root: 'gov-form-group',
|
|
7810
|
+
};
|
|
7811
|
+
const FormRadioGroupClass = {
|
|
7812
|
+
root: 'gov-form-radio-group',
|
|
7813
|
+
};
|
|
7814
|
+
const FormCheckboxGroupClass = {
|
|
7815
|
+
root: 'gov-form-checkbox-group',
|
|
7816
|
+
};
|
|
7817
|
+
|
|
7818
|
+
const tick = (callback) => {
|
|
7819
|
+
setTimeout(() => {
|
|
7820
|
+
callback();
|
|
7821
|
+
}, 0);
|
|
7822
|
+
};
|
|
7823
|
+
|
|
7824
|
+
const is = (value) => value !== undefined && value !== null;
|
|
7825
|
+
const isObject = (obj) => typeof obj === 'object';
|
|
7826
|
+
const isString = (input) => is(input) && typeof input === 'string';
|
|
7827
|
+
|
|
7828
|
+
const parseJSONString = (value) => {
|
|
7829
|
+
if (isString(value) && value.length) {
|
|
7830
|
+
try {
|
|
7831
|
+
console.log(value);
|
|
7832
|
+
const parsed = JSON.parse(value);
|
|
7833
|
+
if (Array.isArray(parsed) || isObject(parsed)) {
|
|
7834
|
+
return parsed;
|
|
7835
|
+
}
|
|
7836
|
+
}
|
|
7837
|
+
catch (e) {
|
|
7838
|
+
console.log(e);
|
|
7839
|
+
return null;
|
|
7840
|
+
}
|
|
7841
|
+
}
|
|
7842
|
+
return null;
|
|
7843
|
+
};
|
|
7844
|
+
|
|
7845
|
+
const createArrayRange = (from, to) => {
|
|
7846
|
+
if (Number.isInteger(from) && Number.isInteger(to)) {
|
|
7847
|
+
return [...Array(to + 1).keys()].slice(from);
|
|
7848
|
+
}
|
|
7849
|
+
return [];
|
|
7850
|
+
};
|
|
7851
|
+
const propsValueToArray = (value) => {
|
|
7852
|
+
if (Array.isArray(value)) {
|
|
7853
|
+
return value;
|
|
7854
|
+
}
|
|
7855
|
+
else if (isString(value)) {
|
|
7856
|
+
const parsed = parseJSONString(value);
|
|
7857
|
+
if (Array.isArray(parsed)) {
|
|
7858
|
+
return parsed;
|
|
7859
|
+
}
|
|
7860
|
+
}
|
|
7861
|
+
return [];
|
|
7862
|
+
};
|
|
7863
|
+
|
|
7864
|
+
const govFormGroupCss$2 = ".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}";
|
|
7865
|
+
|
|
7866
|
+
class GovFormCheckboxGroup {
|
|
7867
|
+
constructor(hostRef) {
|
|
7868
|
+
registerInstance(this, hostRef);
|
|
7869
|
+
this.govChange = createEvent(this, "gov-change", 7);
|
|
7870
|
+
this.handleChange = (event) => {
|
|
7871
|
+
var _a;
|
|
7872
|
+
event.stopPropagation();
|
|
7873
|
+
const value = propsValueToArray(this.value);
|
|
7874
|
+
if (!Array.isArray(value))
|
|
7875
|
+
return;
|
|
7876
|
+
if (event.detail.checked) {
|
|
7877
|
+
this.value = [...value, event.detail.value];
|
|
7878
|
+
}
|
|
7879
|
+
else {
|
|
7880
|
+
this.value = (_a = value.filter((val) => val !== event.detail.value)) !== null && _a !== void 0 ? _a : [];
|
|
7881
|
+
}
|
|
7882
|
+
this.govChange.emit({
|
|
7883
|
+
value: this.value,
|
|
7884
|
+
component: FormCheckboxGroupClass.root,
|
|
7885
|
+
});
|
|
7886
|
+
};
|
|
7887
|
+
this.gap = undefined;
|
|
7888
|
+
this.orientation = 'vertical';
|
|
7889
|
+
this.value = undefined;
|
|
7890
|
+
this.h = govHost(this.host);
|
|
7891
|
+
}
|
|
7892
|
+
validateGap(newValue) {
|
|
7893
|
+
if (newValue) {
|
|
7894
|
+
validateProp(FormGroupSizes, newValue, FormGroupClass.root);
|
|
7895
|
+
}
|
|
7896
|
+
}
|
|
7897
|
+
validateOrientation(newValue) {
|
|
7898
|
+
if (newValue) {
|
|
7899
|
+
validateProp(FormGroupOrientation, newValue, FormGroupClass.root);
|
|
7900
|
+
}
|
|
7901
|
+
}
|
|
7902
|
+
componentWillLoad() {
|
|
7903
|
+
this.validateGap(this.gap);
|
|
7904
|
+
this.validateOrientation(this.orientation);
|
|
7905
|
+
this.value = propsValueToArray(this.value);
|
|
7906
|
+
}
|
|
7907
|
+
componentDidRender() {
|
|
7908
|
+
tick(() => this.rerenderComponent());
|
|
7909
|
+
}
|
|
7910
|
+
rerenderComponent() {
|
|
7911
|
+
this.host.querySelectorAll('gov-form-checkbox').forEach((element) => {
|
|
7912
|
+
if (!element.hasAttribute('listener-attached')) {
|
|
7913
|
+
element.addEventListener('gov-change', this.handleChange);
|
|
7914
|
+
}
|
|
7915
|
+
element.setAttribute('listener-attached', 'true');
|
|
7916
|
+
if (this.value.includes(element.value)) {
|
|
7917
|
+
element.checked = true;
|
|
7918
|
+
}
|
|
7919
|
+
else {
|
|
7920
|
+
element.checked = false;
|
|
7921
|
+
}
|
|
7922
|
+
});
|
|
7923
|
+
}
|
|
7924
|
+
render() {
|
|
7925
|
+
return (hAsync(Host, { gap: this.gap, class: this.h.classes(FormGroupClass.root), value: this.value }, hAsync("slot", null)));
|
|
7926
|
+
}
|
|
7927
|
+
get host() { return getElement(this); }
|
|
7928
|
+
static get watchers() { return {
|
|
7929
|
+
"gap": ["validateGap"],
|
|
7930
|
+
"orientation": ["validateOrientation"]
|
|
7931
|
+
}; }
|
|
7932
|
+
static get style() { return govFormGroupCss$2; }
|
|
7933
|
+
static get cmpMeta() { return {
|
|
7934
|
+
"$flags$": 4,
|
|
7935
|
+
"$tagName$": "gov-form-checkbox-group",
|
|
7936
|
+
"$members$": {
|
|
7937
|
+
"gap": [1],
|
|
7938
|
+
"orientation": [1],
|
|
7939
|
+
"value": [1025]
|
|
7940
|
+
},
|
|
7941
|
+
"$listeners$": undefined,
|
|
7942
|
+
"$lazyBundleId$": "-",
|
|
7943
|
+
"$attrsToReflect$": []
|
|
7944
|
+
}; }
|
|
7945
|
+
}
|
|
7946
|
+
|
|
7798
7947
|
const govFormControlCss = ".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-control__holder{display:flex;flex-direction:column;padding:0;border:none}.gov-form-control__bottom>*:last-child{margin-bottom:0}.gov-form-control__bottom>:first-child{margin-top:0.25rem}.gov-form-control .gov-form-label .gov-form-label__label{margin:0rem 0rem 0.25rem}.gov-form-control[type=file] .gov-form-label[slot=top] .gov-form-label__label{margin:0rem 0rem 0.5rem}.gov-form-control[type=file] .gov-form-control__bottom>:first-child{margin-top:0.5rem}.gov-form-control[size=xs][type=checkbox] .gov-form-control__holder>.gov-form-control__bottom>:first-child,.gov-form-control[size=xs][type=radio] .gov-form-control__holder>.gov-form-control__bottom>:first-child{margin-top:var(--gov-form-checkbox-core-xs-message-gap, 0.5rem);margin-left:calc(var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem) + var(--gov-form-checkbox-core-xs-gap, 0.75rem))}.gov-form-control[size=s][type=checkbox] .gov-form-control__holder>.gov-form-control__bottom>:first-child,.gov-form-control[size=s][type=radio] .gov-form-control__holder>.gov-form-control__bottom>:first-child{margin-top:var(--gov-form-checkbox-core-s-message-gap, 0.5rem);margin-left:calc(var(--gov-form-checkbox-core-s-indicator-size, 1.375rem) + var(--gov-form-checkbox-core-s-gap, 0.75rem))}.gov-form-control[size=m][type=checkbox] .gov-form-control__holder>.gov-form-control__bottom>:first-child,.gov-form-control[size=m][type=radio] .gov-form-control__holder>.gov-form-control__bottom>:first-child{margin-top:var(--gov-form-checkbox-core-m-message-gap, 0.75rem);margin-left:calc(var(--gov-form-checkbox-core-m-indicator-size, 1.5rem) + var(--gov-form-checkbox-core-m-gap, 1rem))}.gov-form-control[size=l][type=checkbox] .gov-form-control__holder>.gov-form-control__bottom>:first-child,.gov-form-control[size=l][type=radio] .gov-form-control__holder>.gov-form-control__bottom>:first-child{margin-top:var(--gov-form-checkbox-core-l-message-gap, 0.75rem);margin-left:calc(var(--gov-form-checkbox-core-l-indicator-size, 2rem) + var(--gov-form-checkbox-core-l-gap, 1rem))}.gov-form-control[size=xs][type=switch] .gov-form-control__bottom>:first-child{margin-top:var(--gov-form-switch-xs-message-gap, 0.5rem);margin-left:calc(var(--gov-form-switch-xs-indicator-height, 1.25rem) * 1.6666666667 + var(--gov-form-switch-xs-gap, 0.75rem))}.gov-form-control[size=s][type=switch] .gov-form-control__bottom>:first-child{margin-top:var(--gov-form-switch-s-message-gap, 0.5rem);margin-left:calc(var(--gov-form-switch-s-indicator-height, 1.375rem) * 1.6666666667 + var(--gov-form-switch-s-gap, 0.75rem))}.gov-form-control[size=m][type=switch] .gov-form-control__bottom>:first-child{margin-top:var(--gov-form-switch-m-message-gap, 0.75rem);margin-left:calc(var(--gov-form-switch-m-indicator-height, 1.5rem) * 1.6666666667 + var(--gov-form-switch-m-gap, 1rem))}.gov-form-control[size=l][type=switch] .gov-form-control__bottom>:first-child{margin-top:var(--gov-form-switch-l-message-gap, 0.75rem);margin-left:calc(var(--gov-form-switch-l-indicator-height, 2rem) * 1.6666666667 + var(--gov-form-switch-l-gap, 1rem))}.gov-form-control[invalid=\"\"] .gov-form-label[slot=top] .gov-form-label__label,.gov-form-control[invalid=true i] .gov-form-label[slot=top] .gov-form-label__label,.gov-form-control[invalid=\"1\"] .gov-form-label[slot=top] .gov-form-label__label{color:var(--gov-form-state-color-error, var(--gov-color-error))}.gov-form-control[disabled=\"\"] .gov-form-label__label,.gov-form-control[disabled=true i] .gov-form-label__label,.gov-form-control[disabled=\"1\"] .gov-form-label__label{pointer-events:none}";
|
|
7799
7948
|
|
|
7800
7949
|
class GovFormControl {
|
|
@@ -8164,17 +8313,7 @@ class GovFormFile {
|
|
|
8164
8313
|
}; }
|
|
8165
8314
|
}
|
|
8166
8315
|
|
|
8167
|
-
const
|
|
8168
|
-
var FormGroupOrientation;
|
|
8169
|
-
(function (FormGroupOrientation) {
|
|
8170
|
-
FormGroupOrientation["HORIZONTAL"] = "horizontal";
|
|
8171
|
-
FormGroupOrientation["VERTICAL"] = "vertical";
|
|
8172
|
-
})(FormGroupOrientation || (FormGroupOrientation = {}));
|
|
8173
|
-
const FormGroupClass = {
|
|
8174
|
-
root: 'gov-form-group',
|
|
8175
|
-
};
|
|
8176
|
-
|
|
8177
|
-
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}";
|
|
8316
|
+
const govFormGroupCss$1 = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}gov-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}";
|
|
8178
8317
|
|
|
8179
8318
|
class GovFormGroup {
|
|
8180
8319
|
constructor(hostRef) {
|
|
@@ -8205,7 +8344,7 @@ class GovFormGroup {
|
|
|
8205
8344
|
"gap": ["validateGap"],
|
|
8206
8345
|
"orientation": ["validateOrientation"]
|
|
8207
8346
|
}; }
|
|
8208
|
-
static get style() { return govFormGroupCss; }
|
|
8347
|
+
static get style() { return govFormGroupCss$1; }
|
|
8209
8348
|
static get cmpMeta() { return {
|
|
8210
8349
|
"$flags$": 4,
|
|
8211
8350
|
"$tagName$": "gov-form-group",
|
|
@@ -8507,11 +8646,7 @@ class GovFormMessage {
|
|
|
8507
8646
|
}; }
|
|
8508
8647
|
}
|
|
8509
8648
|
|
|
8510
|
-
const hasOwnProperty = (obj, prop) => {
|
|
8511
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
8512
|
-
};
|
|
8513
|
-
|
|
8514
|
-
const govFormMultiSelectCss = ".gov-form-multi-select__list{margin:0;padding:0}.gov-form-multi-select__list>.gov-form-multi-select__item{margin:0;padding:0;background:none}.gov-form-multi-select__list>.gov-form-multi-select__item::before{display:none}.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-multi-select{position:relative;display:flex;width:100%;align-items:center}.gov-form-multi-select .element{position:relative;display:flex;flex:1 1 auto}.gov-form-multi-select input,.gov-form-multi-select select,.gov-form-multi-select textarea{width:100%;border-radius:var(--gov-border-radius, 0.1875rem);background-color:var(--gov-form-bg-color, var(--gov-color-neutral-white));font-family:var(--gov-font-family, \"Roboto\", sans-serif)}.gov-form-multi-select input:focus,.gov-form-multi-select select:focus,.gov-form-multi-select textarea:focus{outline:none}.gov-form-multi-select input:focus-visible,.gov-form-multi-select select:focus-visible,.gov-form-multi-select textarea:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-form-multi-select input::-moz-placeholder,.gov-form-multi-select select::-moz-placeholder,.gov-form-multi-select textarea::-moz-placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-multi-select input::placeholder,.gov-form-multi-select select::placeholder,.gov-form-multi-select textarea::placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-multi-select textarea{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);padding:0.5rem 0.75rem;resize:none}.gov-form-multi-select *[slot=left-icon],.gov-form-multi-select *[slot=right-icon]{position:absolute;top:50%;display:flex;justify-content:center;transform:translateY(-50%);pointer-events:none}.gov-form-multi-select *[slot=left-icon]{left:0}.gov-form-multi-select *[slot=right-icon]{right:0}.gov-form-multi-select *[slot=prefix],.gov-form-multi-select *[slot=sufix]{margin:0}[size=s].gov-form-multi-select{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);gap:0.5rem var(--gov-form-input-core-s-icon-size, 1rem)}[size=s].gov-form-multi-select input,[size=s].gov-form-multi-select select{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);height:var(--gov-form-input-core-s-height, 2rem);padding:var(--gov-form-input-core-s-padding, 0.25rem 0.75rem)}[size=s].gov-form-multi-select *[slot=left-icon],[size=s].gov-form-multi-select *[slot=right-icon]{width:var(--gov-form-input-core-s-icon-size, 1rem);height:var(--gov-form-input-core-s-icon-size, 1rem)}[size=s].gov-form-multi-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2)}[size=s].gov-form-multi-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=s].gov-form-multi-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2)}[size=s].gov-form-multi-select *[slot=right-icon]~input,[size=s].gov-form-multi-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=m].gov-form-multi-select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);gap:0.5rem var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-multi-select input,[size=m].gov-form-multi-select select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);height:var(--gov-form-input-core-m-height, 2.5rem);padding:var(--gov-form-input-core-m-padding, 0.4375rem 0.75rem)}[size=m].gov-form-multi-select *[slot=left-icon],[size=m].gov-form-multi-select *[slot=right-icon]{width:var(--gov-form-input-core-m-icon-size, 1rem);height:var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-multi-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-multi-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=m].gov-form-multi-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-multi-select *[slot=right-icon]~input,[size=m].gov-form-multi-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=l].gov-form-multi-select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);gap:0.5rem var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-multi-select input,[size=l].gov-form-multi-select select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);height:var(--gov-form-input-core-l-height, 3rem);padding:var(--gov-form-input-core-l-padding, 0.6875rem 0.75rem)}[size=l].gov-form-multi-select *[slot=left-icon],[size=l].gov-form-multi-select *[slot=right-icon]{width:var(--gov-form-input-core-l-icon-size, 1rem);height:var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-multi-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-multi-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=l].gov-form-multi-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-multi-select *[slot=right-icon]~input,[size=l].gov-form-multi-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=xl].gov-form-multi-select{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing);gap:0.5rem var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-multi-select input,[size=xl].gov-form-multi-select select{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing);height:var(--gov-form-input-core-xl-height, 3.5rem);padding:var(--gov-form-input-core-xl-padding, 0.9375rem 1rem 0.875rem)}[size=xl].gov-form-multi-select *[slot=left-icon],[size=xl].gov-form-multi-select *[slot=right-icon]{width:var(--gov-form-input-core-xl-icon-size, 1.25rem);height:var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-multi-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-multi-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-xl-icon-padding, 3rem)}[size=xl].gov-form-multi-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-multi-select *[slot=right-icon]~input,[size=xl].gov-form-multi-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-xl-icon-padding, 3rem)}[variant=primary].gov-form-multi-select input,[variant=primary].gov-form-multi-select select,[variant=primary].gov-form-multi-select textarea{color:var(--gov-form-input-color-primary, var(--gov-color-secondary-700));border:var(--gov-form-input-border-primary, 0.0625rem solid var(--gov-color-primary-600))}[variant=primary].gov-form-multi-select *[slot=left-icon],[variant=primary].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-primary, var(--gov-color-primary))}[variant=secondary].gov-form-multi-select input,[variant=secondary].gov-form-multi-select select,[variant=secondary].gov-form-multi-select textarea{color:var(--gov-form-input-color-secondary, var(--gov-color-secondary-700));border:var(--gov-form-input-border-secondary, 0.0625rem solid var(--gov-color-secondary-700))}[variant=secondary].gov-form-multi-select *[slot=left-icon],[variant=secondary].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-secondary, var(--gov-color-primary))}[disabled=\"\"].gov-form-multi-select,[disabled=true i].gov-form-multi-select,[disabled=\"1\"].gov-form-multi-select{pointer-events:none}[disabled=\"\"].gov-form-multi-select input,[disabled=\"\"].gov-form-multi-select select,[disabled=\"\"].gov-form-multi-select textarea,[disabled=true i].gov-form-multi-select input,[disabled=true i].gov-form-multi-select select,[disabled=true i].gov-form-multi-select textarea,[disabled=\"1\"].gov-form-multi-select input,[disabled=\"1\"].gov-form-multi-select select,[disabled=\"1\"].gov-form-multi-select textarea{border-color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));background:var(--gov-form-input-disabled-bg, var(--gov-color-secondary-300));color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600))}[disabled=\"\"].gov-form-multi-select *[slot=left-icon],[disabled=\"\"].gov-form-multi-select *[slot=right-icon],[disabled=true i].gov-form-multi-select *[slot=left-icon],[disabled=true i].gov-form-multi-select *[slot=right-icon],[disabled=\"1\"].gov-form-multi-select *[slot=left-icon],[disabled=\"1\"].gov-form-multi-select *[slot=right-icon]{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600)) !important}[invalid=\"\"].gov-form-multi-select input,[invalid=\"\"].gov-form-multi-select select,[invalid=\"\"].gov-form-multi-select textarea,[invalid=true i].gov-form-multi-select input,[invalid=true i].gov-form-multi-select select,[invalid=true i].gov-form-multi-select textarea,[invalid=\"1\"].gov-form-multi-select input,[invalid=\"1\"].gov-form-multi-select select,[invalid=\"1\"].gov-form-multi-select textarea{border-color:var(--gov-form-state-color-error, var(--gov-color-error));color:var(--gov-form-state-color-error, var(--gov-color-error))}[invalid=\"\"].gov-form-multi-select input::-moz-placeholder,[invalid=\"\"].gov-form-multi-select select::-moz-placeholder,[invalid=\"\"].gov-form-multi-select textarea::-moz-placeholder,[invalid=true i].gov-form-multi-select input::-moz-placeholder,[invalid=true i].gov-form-multi-select select::-moz-placeholder,[invalid=true i].gov-form-multi-select textarea::-moz-placeholder,[invalid=\"1\"].gov-form-multi-select input::-moz-placeholder,[invalid=\"1\"].gov-form-multi-select select::-moz-placeholder,[invalid=\"1\"].gov-form-multi-select textarea::-moz-placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=\"\"].gov-form-multi-select input::placeholder,[invalid=\"\"].gov-form-multi-select select::placeholder,[invalid=\"\"].gov-form-multi-select textarea::placeholder,[invalid=true i].gov-form-multi-select input::placeholder,[invalid=true i].gov-form-multi-select select::placeholder,[invalid=true i].gov-form-multi-select textarea::placeholder,[invalid=\"1\"].gov-form-multi-select input::placeholder,[invalid=\"1\"].gov-form-multi-select select::placeholder,[invalid=\"1\"].gov-form-multi-select textarea::placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=\"\"].gov-form-multi-select *[slot=left-icon],[invalid=\"\"].gov-form-multi-select *[slot=right-icon],[invalid=true i].gov-form-multi-select *[slot=left-icon],[invalid=true i].gov-form-multi-select *[slot=right-icon],[invalid=\"1\"].gov-form-multi-select *[slot=left-icon],[invalid=\"1\"].gov-form-multi-select *[slot=right-icon]{color:var(--gov-form-state-color-error, var(--gov-color-error)) !important}[invalid=\"\"].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid=\"1\"].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[success=\"\"].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow),[success=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow),[success=\"1\"].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-state-color-success, var(--gov-color-success))}[success=\"\"].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success=\"1\"].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[multiline=\"\"].gov-form-multi-select *[slot=left-icon],[multiline=\"\"].gov-form-multi-select *[slot=right-icon],[multiline=true i].gov-form-multi-select *[slot=left-icon],[multiline=true i].gov-form-multi-select *[slot=right-icon],[multiline=\"1\"].gov-form-multi-select *[slot=left-icon],[multiline=\"1\"].gov-form-multi-select *[slot=right-icon]{display:none}.gov-form-multi-select{background:none}.gov-form-multi-select select{-webkit-appearance:none;-moz-appearance:none}.gov-form-multi-select select::-ms-expand{display:none}[size=s].gov-form-multi-select *[slot=right-icon]{right:var(--gov-form-select-s-arrow-right-position, 0.75rem);width:var(--gov-form-select-s-arrow-size, 0.75rem);height:var(--gov-form-select-s-arrow-size, 0.75rem)}[size=s][invalid=\"\"].gov-form-multi-select .icon-arrow,[size=s][invalid=true i].gov-form-multi-select .icon-arrow,[size=s][invalid=\"1\"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-s-arrow-right-position, 0.75rem))}[size=s][success=\"\"].gov-form-multi-select .icon-arrow,[size=s][success=true i].gov-form-multi-select .icon-arrow,[size=s][success=\"1\"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-s-arrow-right-position, 0.75rem))}[size=m].gov-form-multi-select *[slot=right-icon]{right:var(--gov-form-select-m-arrow-right-position, 1rem);width:var(--gov-form-select-m-arrow-size, 0.75rem);height:var(--gov-form-select-m-arrow-size, 0.75rem)}[size=m][invalid=\"\"].gov-form-multi-select .icon-arrow,[size=m][invalid=true i].gov-form-multi-select .icon-arrow,[size=m][invalid=\"1\"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-m-arrow-right-position, 1rem))}[size=m][success=\"\"].gov-form-multi-select .icon-arrow,[size=m][success=true i].gov-form-multi-select .icon-arrow,[size=m][success=\"1\"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-m-arrow-right-position, 1rem))}[size=l].gov-form-multi-select *[slot=right-icon]{right:var(--gov-form-select-l-arrow-right-position, 1rem);width:var(--gov-form-select-l-arrow-size, 1rem);height:var(--gov-form-select-l-arrow-size, 1rem)}[size=l][invalid=\"\"].gov-form-multi-select .icon-arrow,[size=l][invalid=true i].gov-form-multi-select .icon-arrow,[size=l][invalid=\"1\"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-l-arrow-right-position, 1rem))}[size=l][success=\"\"].gov-form-multi-select .icon-arrow,[size=l][success=true i].gov-form-multi-select .icon-arrow,[size=l][success=\"1\"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-l-arrow-right-position, 1rem))}[size=xl].gov-form-multi-select *[slot=right-icon]{right:var(--gov-form-select-xl-arrow-right-position, 1.3125rem);width:var(--gov-form-select-xl-arrow-size, 1rem);height:var(--gov-form-select-xl-arrow-size, 1rem)}[size=xl][invalid=\"\"].gov-form-multi-select .icon-arrow,[size=xl][invalid=true i].gov-form-multi-select .icon-arrow,[size=xl][invalid=\"1\"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-xl-arrow-right-position, 1.3125rem))}[size=xl][success=\"\"].gov-form-multi-select .icon-arrow,[size=xl][success=true i].gov-form-multi-select .icon-arrow,[size=xl][success=\"1\"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-xl-arrow-right-position, 1.3125rem))}[size=s][invalid=\"\"].gov-form-multi-select *[slot=right-icon]~select,[size=s][invalid=\"\"].gov-form-multi-select *[slot=right-icon]~input,[size=s][invalid=true i].gov-form-multi-select *[slot=right-icon]~select,[size=s][invalid=true i].gov-form-multi-select *[slot=right-icon]~input,[size=s][invalid=\"1\"].gov-form-multi-select *[slot=right-icon]~select,[size=s][invalid=\"1\"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-s-icon-padding, 2rem))}[size=s][success=\"\"].gov-form-multi-select *[slot=right-icon]~select,[size=s][success=\"\"].gov-form-multi-select *[slot=right-icon]~input,[size=s][success=true i].gov-form-multi-select *[slot=right-icon]~select,[size=s][success=true i].gov-form-multi-select *[slot=right-icon]~input,[size=s][success=\"1\"].gov-form-multi-select *[slot=right-icon]~select,[size=s][success=\"1\"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-s-icon-padding, 2rem))}[size=m][invalid=\"\"].gov-form-multi-select *[slot=right-icon]~select,[size=m][invalid=\"\"].gov-form-multi-select *[slot=right-icon]~input,[size=m][invalid=true i].gov-form-multi-select *[slot=right-icon]~select,[size=m][invalid=true i].gov-form-multi-select *[slot=right-icon]~input,[size=m][invalid=\"1\"].gov-form-multi-select *[slot=right-icon]~select,[size=m][invalid=\"1\"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-m-icon-padding, 2.5rem))}[size=m][success=\"\"].gov-form-multi-select *[slot=right-icon]~select,[size=m][success=\"\"].gov-form-multi-select *[slot=right-icon]~input,[size=m][success=true i].gov-form-multi-select *[slot=right-icon]~select,[size=m][success=true i].gov-form-multi-select *[slot=right-icon]~input,[size=m][success=\"1\"].gov-form-multi-select *[slot=right-icon]~select,[size=m][success=\"1\"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-m-icon-padding, 2.5rem))}[size=l][invalid=\"\"].gov-form-multi-select *[slot=right-icon]~select,[size=l][invalid=\"\"].gov-form-multi-select *[slot=right-icon]~input,[size=l][invalid=true i].gov-form-multi-select *[slot=right-icon]~select,[size=l][invalid=true i].gov-form-multi-select *[slot=right-icon]~input,[size=l][invalid=\"1\"].gov-form-multi-select *[slot=right-icon]~select,[size=l][invalid=\"1\"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-l-icon-padding, 2.5rem))}[size=l][success=\"\"].gov-form-multi-select *[slot=right-icon]~select,[size=l][success=\"\"].gov-form-multi-select *[slot=right-icon]~input,[size=l][success=true i].gov-form-multi-select *[slot=right-icon]~select,[size=l][success=true i].gov-form-multi-select *[slot=right-icon]~input,[size=l][success=\"1\"].gov-form-multi-select *[slot=right-icon]~select,[size=l][success=\"1\"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-l-icon-padding, 2.5rem))}[size=xl][invalid=\"\"].gov-form-multi-select *[slot=right-icon]~select,[size=xl][invalid=\"\"].gov-form-multi-select *[slot=right-icon]~input,[size=xl][invalid=true i].gov-form-multi-select *[slot=right-icon]~select,[size=xl][invalid=true i].gov-form-multi-select *[slot=right-icon]~input,[size=xl][invalid=\"1\"].gov-form-multi-select *[slot=right-icon]~select,[size=xl][invalid=\"1\"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-xl-icon-padding, 3rem))}[size=xl][success=\"\"].gov-form-multi-select *[slot=right-icon]~select,[size=xl][success=\"\"].gov-form-multi-select *[slot=right-icon]~input,[size=xl][success=true i].gov-form-multi-select *[slot=right-icon]~select,[size=xl][success=true i].gov-form-multi-select *[slot=right-icon]~input,[size=xl][success=\"1\"].gov-form-multi-select *[slot=right-icon]~select,[size=xl][success=\"1\"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-xl-icon-padding, 3rem))}.gov-form-multi-select{flex-wrap:wrap}.gov-form-multi-select__wrap{display:flex;gap:0.5rem;width:100%}.gov-form-multi-select__list{font-weight:var(--gov-text-xs-font-weight);font-size:var(--gov-text-xs-font-size);line-height:var(--gov-text-xs-line-height);letter-spacing:var(--gov-text-xs-letter-spacing);display:flex;gap:0.5rem;flex-wrap:wrap}.gov-form-multi-select__list>.gov-form-multi-select__item{position:relative;display:flex;flex:0 0 auto;align-items:center;padding:0rem 0rem 0rem 0.5rem;background:var(--gov-form-multiselect-bg, var(--gov-color-primary-200));transition:150ms linear background-color}";
|
|
8649
|
+
const govFormMultiSelectCss = ".gov-form-multi-select__list{margin:0;padding:0}.gov-form-multi-select__list>.gov-form-multi-select__item{margin:0;padding:0;background:none}.gov-form-multi-select__list>.gov-form-multi-select__item::before{display:none}.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-multi-select{position:relative;display:flex;width:100%;align-items:center}.gov-form-multi-select .element{position:relative;display:flex;flex:1 1 auto}.gov-form-multi-select input,.gov-form-multi-select select,.gov-form-multi-select textarea{width:100%;border-radius:var(--gov-border-radius, 0.1875rem);background-color:var(--gov-form-bg-color, var(--gov-color-neutral-white));font-family:var(--gov-font-family, \"Roboto\", sans-serif)}.gov-form-multi-select input:focus,.gov-form-multi-select select:focus,.gov-form-multi-select textarea:focus{outline:none}.gov-form-multi-select input:focus-visible,.gov-form-multi-select select:focus-visible,.gov-form-multi-select textarea:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-form-multi-select input::-moz-placeholder,.gov-form-multi-select select::-moz-placeholder,.gov-form-multi-select textarea::-moz-placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-multi-select input::placeholder,.gov-form-multi-select select::placeholder,.gov-form-multi-select textarea::placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-multi-select textarea{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);padding:0.5rem 0.75rem;resize:none}.gov-form-multi-select *[slot=left-icon],.gov-form-multi-select *[slot=right-icon]{position:absolute;top:50%;display:flex;justify-content:center;transform:translateY(-50%);pointer-events:none}.gov-form-multi-select *[slot=left-icon]{left:0}.gov-form-multi-select *[slot=right-icon]{right:0}.gov-form-multi-select *[slot=prefix],.gov-form-multi-select *[slot=sufix]{margin:0}[size=s].gov-form-multi-select{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);gap:0.5rem var(--gov-form-input-core-s-icon-size, 1rem)}[size=s].gov-form-multi-select input,[size=s].gov-form-multi-select select{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);height:var(--gov-form-input-core-s-height, 2rem);padding:var(--gov-form-input-core-s-padding, 0.25rem 0.75rem)}[size=s].gov-form-multi-select *[slot=left-icon],[size=s].gov-form-multi-select *[slot=right-icon]{width:var(--gov-form-input-core-s-icon-size, 1rem);height:var(--gov-form-input-core-s-icon-size, 1rem)}[size=s].gov-form-multi-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2)}[size=s].gov-form-multi-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=s].gov-form-multi-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2)}[size=s].gov-form-multi-select *[slot=right-icon]~input,[size=s].gov-form-multi-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=m].gov-form-multi-select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);gap:0.5rem var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-multi-select input,[size=m].gov-form-multi-select select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);height:var(--gov-form-input-core-m-height, 2.5rem);padding:var(--gov-form-input-core-m-padding, 0.4375rem 0.75rem)}[size=m].gov-form-multi-select *[slot=left-icon],[size=m].gov-form-multi-select *[slot=right-icon]{width:var(--gov-form-input-core-m-icon-size, 1rem);height:var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-multi-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-multi-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=m].gov-form-multi-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-multi-select *[slot=right-icon]~input,[size=m].gov-form-multi-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=l].gov-form-multi-select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);gap:0.5rem var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-multi-select input,[size=l].gov-form-multi-select select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);height:var(--gov-form-input-core-l-height, 3rem);padding:var(--gov-form-input-core-l-padding, 0.6875rem 0.75rem)}[size=l].gov-form-multi-select *[slot=left-icon],[size=l].gov-form-multi-select *[slot=right-icon]{width:var(--gov-form-input-core-l-icon-size, 1rem);height:var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-multi-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-multi-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=l].gov-form-multi-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-multi-select *[slot=right-icon]~input,[size=l].gov-form-multi-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=xl].gov-form-multi-select{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing);gap:0.5rem var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-multi-select input,[size=xl].gov-form-multi-select select{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing);height:var(--gov-form-input-core-xl-height, 3.5rem);padding:var(--gov-form-input-core-xl-padding, 0.9375rem 1rem 0.875rem)}[size=xl].gov-form-multi-select *[slot=left-icon],[size=xl].gov-form-multi-select *[slot=right-icon]{width:var(--gov-form-input-core-xl-icon-size, 1.25rem);height:var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-multi-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-multi-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-xl-icon-padding, 3rem)}[size=xl].gov-form-multi-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-multi-select *[slot=right-icon]~input,[size=xl].gov-form-multi-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-xl-icon-padding, 3rem)}[variant=primary].gov-form-multi-select input,[variant=primary].gov-form-multi-select select,[variant=primary].gov-form-multi-select textarea{color:var(--gov-form-input-color-primary, var(--gov-color-secondary-700));border:var(--gov-form-input-border-primary, 0.0625rem solid var(--gov-color-primary-600))}[variant=primary].gov-form-multi-select *[slot=left-icon],[variant=primary].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-primary, var(--gov-color-primary))}[variant=secondary].gov-form-multi-select input,[variant=secondary].gov-form-multi-select select,[variant=secondary].gov-form-multi-select textarea{color:var(--gov-form-input-color-secondary, var(--gov-color-secondary-700));border:var(--gov-form-input-border-secondary, 0.0625rem solid var(--gov-color-secondary-700))}[variant=secondary].gov-form-multi-select *[slot=left-icon],[variant=secondary].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-secondary, var(--gov-color-primary))}[disabled=\"\"].gov-form-multi-select,[disabled=true i].gov-form-multi-select,[disabled=\"1\"].gov-form-multi-select{pointer-events:none}[disabled=\"\"].gov-form-multi-select input,[disabled=\"\"].gov-form-multi-select select,[disabled=\"\"].gov-form-multi-select textarea,[disabled=true i].gov-form-multi-select input,[disabled=true i].gov-form-multi-select select,[disabled=true i].gov-form-multi-select textarea,[disabled=\"1\"].gov-form-multi-select input,[disabled=\"1\"].gov-form-multi-select select,[disabled=\"1\"].gov-form-multi-select textarea{border-color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));background:var(--gov-form-input-disabled-bg, var(--gov-color-secondary-300));color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600))}[disabled=\"\"].gov-form-multi-select *[slot=left-icon],[disabled=\"\"].gov-form-multi-select *[slot=right-icon],[disabled=true i].gov-form-multi-select *[slot=left-icon],[disabled=true i].gov-form-multi-select *[slot=right-icon],[disabled=\"1\"].gov-form-multi-select *[slot=left-icon],[disabled=\"1\"].gov-form-multi-select *[slot=right-icon]{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600)) !important}[invalid=\"\"].gov-form-multi-select input,[invalid=\"\"].gov-form-multi-select select,[invalid=\"\"].gov-form-multi-select textarea,[invalid=true i].gov-form-multi-select input,[invalid=true i].gov-form-multi-select select,[invalid=true i].gov-form-multi-select textarea,[invalid=\"1\"].gov-form-multi-select input,[invalid=\"1\"].gov-form-multi-select select,[invalid=\"1\"].gov-form-multi-select textarea{border-color:var(--gov-form-state-color-error, var(--gov-color-error));color:var(--gov-form-state-color-error, var(--gov-color-error))}[invalid=\"\"].gov-form-multi-select input::-moz-placeholder,[invalid=\"\"].gov-form-multi-select select::-moz-placeholder,[invalid=\"\"].gov-form-multi-select textarea::-moz-placeholder,[invalid=true i].gov-form-multi-select input::-moz-placeholder,[invalid=true i].gov-form-multi-select select::-moz-placeholder,[invalid=true i].gov-form-multi-select textarea::-moz-placeholder,[invalid=\"1\"].gov-form-multi-select input::-moz-placeholder,[invalid=\"1\"].gov-form-multi-select select::-moz-placeholder,[invalid=\"1\"].gov-form-multi-select textarea::-moz-placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=\"\"].gov-form-multi-select input::placeholder,[invalid=\"\"].gov-form-multi-select select::placeholder,[invalid=\"\"].gov-form-multi-select textarea::placeholder,[invalid=true i].gov-form-multi-select input::placeholder,[invalid=true i].gov-form-multi-select select::placeholder,[invalid=true i].gov-form-multi-select textarea::placeholder,[invalid=\"1\"].gov-form-multi-select input::placeholder,[invalid=\"1\"].gov-form-multi-select select::placeholder,[invalid=\"1\"].gov-form-multi-select textarea::placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=\"\"].gov-form-multi-select *[slot=left-icon],[invalid=\"\"].gov-form-multi-select *[slot=right-icon],[invalid=true i].gov-form-multi-select *[slot=left-icon],[invalid=true i].gov-form-multi-select *[slot=right-icon],[invalid=\"1\"].gov-form-multi-select *[slot=left-icon],[invalid=\"1\"].gov-form-multi-select *[slot=right-icon]{color:var(--gov-form-state-color-error, var(--gov-color-error)) !important}[invalid=\"\"].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid=\"1\"].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[success=\"\"].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow),[success=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow),[success=\"1\"].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-state-color-success, var(--gov-color-success))}[success=\"\"].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success=\"1\"].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[multiline=\"\"].gov-form-multi-select *[slot=left-icon],[multiline=\"\"].gov-form-multi-select *[slot=right-icon],[multiline=true i].gov-form-multi-select *[slot=left-icon],[multiline=true i].gov-form-multi-select *[slot=right-icon],[multiline=\"1\"].gov-form-multi-select *[slot=left-icon],[multiline=\"1\"].gov-form-multi-select *[slot=right-icon]{display:none}.gov-form-multi-select{background:none}.gov-form-multi-select select{-webkit-appearance:none;-moz-appearance:none}.gov-form-multi-select select::-ms-expand{display:none}[size=s].gov-form-multi-select *[slot=right-icon]{right:var(--gov-form-select-s-arrow-right-position, 0.75rem);width:var(--gov-form-select-s-arrow-size, 0.75rem);height:var(--gov-form-select-s-arrow-size, 0.75rem)}[size=s][invalid=\"\"].gov-form-multi-select .icon-arrow,[size=s][invalid=true i].gov-form-multi-select .icon-arrow,[size=s][invalid=\"1\"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-s-arrow-right-position, 0.75rem))}[size=s][success=\"\"].gov-form-multi-select .icon-arrow,[size=s][success=true i].gov-form-multi-select .icon-arrow,[size=s][success=\"1\"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-s-arrow-right-position, 0.75rem))}[size=m].gov-form-multi-select *[slot=right-icon]{right:var(--gov-form-select-m-arrow-right-position, 1rem);width:var(--gov-form-select-m-arrow-size, 0.75rem);height:var(--gov-form-select-m-arrow-size, 0.75rem)}[size=m][invalid=\"\"].gov-form-multi-select .icon-arrow,[size=m][invalid=true i].gov-form-multi-select .icon-arrow,[size=m][invalid=\"1\"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-m-arrow-right-position, 1rem))}[size=m][success=\"\"].gov-form-multi-select .icon-arrow,[size=m][success=true i].gov-form-multi-select .icon-arrow,[size=m][success=\"1\"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-m-arrow-right-position, 1rem))}[size=l].gov-form-multi-select *[slot=right-icon]{right:var(--gov-form-select-l-arrow-right-position, 1rem);width:var(--gov-form-select-l-arrow-size, 1rem);height:var(--gov-form-select-l-arrow-size, 1rem)}[size=l][invalid=\"\"].gov-form-multi-select .icon-arrow,[size=l][invalid=true i].gov-form-multi-select .icon-arrow,[size=l][invalid=\"1\"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-l-arrow-right-position, 1rem))}[size=l][success=\"\"].gov-form-multi-select .icon-arrow,[size=l][success=true i].gov-form-multi-select .icon-arrow,[size=l][success=\"1\"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-l-arrow-right-position, 1rem))}[size=xl].gov-form-multi-select *[slot=right-icon]{right:var(--gov-form-select-xl-arrow-right-position, 1.3125rem);width:var(--gov-form-select-xl-arrow-size, 1rem);height:var(--gov-form-select-xl-arrow-size, 1rem)}[size=xl][invalid=\"\"].gov-form-multi-select .icon-arrow,[size=xl][invalid=true i].gov-form-multi-select .icon-arrow,[size=xl][invalid=\"1\"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-xl-arrow-right-position, 1.3125rem))}[size=xl][success=\"\"].gov-form-multi-select .icon-arrow,[size=xl][success=true i].gov-form-multi-select .icon-arrow,[size=xl][success=\"1\"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-xl-arrow-right-position, 1.3125rem))}[size=s][invalid=\"\"].gov-form-multi-select *[slot=right-icon]~select,[size=s][invalid=\"\"].gov-form-multi-select *[slot=right-icon]~input,[size=s][invalid=true i].gov-form-multi-select *[slot=right-icon]~select,[size=s][invalid=true i].gov-form-multi-select *[slot=right-icon]~input,[size=s][invalid=\"1\"].gov-form-multi-select *[slot=right-icon]~select,[size=s][invalid=\"1\"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-s-icon-padding, 2rem))}[size=s][success=\"\"].gov-form-multi-select *[slot=right-icon]~select,[size=s][success=\"\"].gov-form-multi-select *[slot=right-icon]~input,[size=s][success=true i].gov-form-multi-select *[slot=right-icon]~select,[size=s][success=true i].gov-form-multi-select *[slot=right-icon]~input,[size=s][success=\"1\"].gov-form-multi-select *[slot=right-icon]~select,[size=s][success=\"1\"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-s-icon-padding, 2rem))}[size=m][invalid=\"\"].gov-form-multi-select *[slot=right-icon]~select,[size=m][invalid=\"\"].gov-form-multi-select *[slot=right-icon]~input,[size=m][invalid=true i].gov-form-multi-select *[slot=right-icon]~select,[size=m][invalid=true i].gov-form-multi-select *[slot=right-icon]~input,[size=m][invalid=\"1\"].gov-form-multi-select *[slot=right-icon]~select,[size=m][invalid=\"1\"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-m-icon-padding, 2.5rem))}[size=m][success=\"\"].gov-form-multi-select *[slot=right-icon]~select,[size=m][success=\"\"].gov-form-multi-select *[slot=right-icon]~input,[size=m][success=true i].gov-form-multi-select *[slot=right-icon]~select,[size=m][success=true i].gov-form-multi-select *[slot=right-icon]~input,[size=m][success=\"1\"].gov-form-multi-select *[slot=right-icon]~select,[size=m][success=\"1\"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-m-icon-padding, 2.5rem))}[size=l][invalid=\"\"].gov-form-multi-select *[slot=right-icon]~select,[size=l][invalid=\"\"].gov-form-multi-select *[slot=right-icon]~input,[size=l][invalid=true i].gov-form-multi-select *[slot=right-icon]~select,[size=l][invalid=true i].gov-form-multi-select *[slot=right-icon]~input,[size=l][invalid=\"1\"].gov-form-multi-select *[slot=right-icon]~select,[size=l][invalid=\"1\"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-l-icon-padding, 2.5rem))}[size=l][success=\"\"].gov-form-multi-select *[slot=right-icon]~select,[size=l][success=\"\"].gov-form-multi-select *[slot=right-icon]~input,[size=l][success=true i].gov-form-multi-select *[slot=right-icon]~select,[size=l][success=true i].gov-form-multi-select *[slot=right-icon]~input,[size=l][success=\"1\"].gov-form-multi-select *[slot=right-icon]~select,[size=l][success=\"1\"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-l-icon-padding, 2.5rem))}[size=xl][invalid=\"\"].gov-form-multi-select *[slot=right-icon]~select,[size=xl][invalid=\"\"].gov-form-multi-select *[slot=right-icon]~input,[size=xl][invalid=true i].gov-form-multi-select *[slot=right-icon]~select,[size=xl][invalid=true i].gov-form-multi-select *[slot=right-icon]~input,[size=xl][invalid=\"1\"].gov-form-multi-select *[slot=right-icon]~select,[size=xl][invalid=\"1\"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-xl-icon-padding, 3rem))}[size=xl][success=\"\"].gov-form-multi-select *[slot=right-icon]~select,[size=xl][success=\"\"].gov-form-multi-select *[slot=right-icon]~input,[size=xl][success=true i].gov-form-multi-select *[slot=right-icon]~select,[size=xl][success=true i].gov-form-multi-select *[slot=right-icon]~input,[size=xl][success=\"1\"].gov-form-multi-select *[slot=right-icon]~select,[size=xl][success=\"1\"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-xl-icon-padding, 3rem))}.gov-form-multi-select{flex-wrap:wrap}.gov-form-multi-select__wrap{display:flex;align-items:center;gap:0.5rem;width:100%}.gov-form-multi-select__list{font-weight:var(--gov-text-xs-font-weight);font-size:var(--gov-text-xs-font-size);line-height:var(--gov-text-xs-line-height);letter-spacing:var(--gov-text-xs-letter-spacing);display:flex;gap:0.5rem;flex-wrap:wrap}.gov-form-multi-select__list>.gov-form-multi-select__item{position:relative;display:flex;flex:0 0 auto;align-items:center;padding:0rem 0rem 0rem 0.5rem;background:var(--gov-form-multiselect-bg, var(--gov-color-primary-200));transition:150ms linear background-color}";
|
|
8515
8650
|
|
|
8516
8651
|
class GovFormMultiSelect {
|
|
8517
8652
|
constructor(hostRef) {
|
|
@@ -8521,6 +8656,8 @@ class GovFormMultiSelect {
|
|
|
8521
8656
|
this.govChange = createEvent(this, "gov-change", 7);
|
|
8522
8657
|
this.govSelect = createEvent(this, "gov-select", 7);
|
|
8523
8658
|
this.govRemove = createEvent(this, "gov-remove", 7);
|
|
8659
|
+
this.value = undefined;
|
|
8660
|
+
this.options = undefined;
|
|
8524
8661
|
this.identifier = undefined;
|
|
8525
8662
|
this.placeholder = undefined;
|
|
8526
8663
|
this.variant = undefined;
|
|
@@ -8537,9 +8674,9 @@ class GovFormMultiSelect {
|
|
|
8537
8674
|
this.wcagLabelledBy = undefined;
|
|
8538
8675
|
this.wcagOwns = undefined;
|
|
8539
8676
|
this.focused = undefined;
|
|
8540
|
-
this.
|
|
8541
|
-
this.
|
|
8542
|
-
this.
|
|
8677
|
+
this.valueState = undefined;
|
|
8678
|
+
this.selectedOptionsState = [];
|
|
8679
|
+
this.optionsState = [];
|
|
8543
8680
|
this.selectId = createID('GovSelect');
|
|
8544
8681
|
this.listId = createID('GovMultiList');
|
|
8545
8682
|
this.h = govHost(this.host);
|
|
@@ -8551,6 +8688,12 @@ class GovFormMultiSelect {
|
|
|
8551
8688
|
validateSize(newValue) {
|
|
8552
8689
|
validateProp(FormMultiselectSizes, newValue, FormMultiSelectClass.root);
|
|
8553
8690
|
}
|
|
8691
|
+
watchOptions(newValue) {
|
|
8692
|
+
this.optionsState = propsValueToArray(newValue);
|
|
8693
|
+
}
|
|
8694
|
+
watchValue(newValue) {
|
|
8695
|
+
this.selectedOptionsState = propsValueToArray(newValue);
|
|
8696
|
+
}
|
|
8554
8697
|
watchDisabled() {
|
|
8555
8698
|
this.passControlAttrs();
|
|
8556
8699
|
}
|
|
@@ -8563,65 +8706,74 @@ class GovFormMultiSelect {
|
|
|
8563
8706
|
this.validateVariant(this.variant);
|
|
8564
8707
|
this.validateSize(this.size);
|
|
8565
8708
|
this.watchDisabled();
|
|
8709
|
+
this.passControlAttrs();
|
|
8710
|
+
this.f.passAttrToLabel('required', String(this.required));
|
|
8711
|
+
this.optionsState = propsValueToArray(this.options);
|
|
8712
|
+
this.selectedOptionsState = propsValueToArray(this.value);
|
|
8566
8713
|
}
|
|
8567
8714
|
getAvailableOptions(ignoreFilter = false) {
|
|
8568
|
-
if (Array.isArray(this.
|
|
8715
|
+
if (Array.isArray(this.optionsState) && this.optionsState.length) {
|
|
8569
8716
|
if (ignoreFilter) {
|
|
8570
|
-
return this.
|
|
8717
|
+
return this.optionsState;
|
|
8571
8718
|
}
|
|
8572
|
-
return this.
|
|
8573
|
-
const
|
|
8574
|
-
return (
|
|
8575
|
-
});
|
|
8719
|
+
return this.optionsState.filter((option) => {
|
|
8720
|
+
const selectedIndex = this.selectedValueIndex(option.value);
|
|
8721
|
+
return (selectedIndex !== -1 || (option === null || option === void 0 ? void 0 : option.disabled)) ? false : true;
|
|
8722
|
+
}).map((option) => { var _a; return ({ name: (_a = option.name) !== null && _a !== void 0 ? _a : option.value, value: option.value }); });
|
|
8576
8723
|
}
|
|
8577
8724
|
return Array.from(this.selectRef.querySelectorAll('option'))
|
|
8578
8725
|
.filter((option) => {
|
|
8579
8726
|
if (ignoreFilter) {
|
|
8580
8727
|
return true;
|
|
8581
8728
|
}
|
|
8582
|
-
|
|
8729
|
+
const selectedIndex = this.selectedValueIndex(option.value);
|
|
8730
|
+
return !(option.disabled || option.selected || selectedIndex > -1);
|
|
8583
8731
|
})
|
|
8584
8732
|
.map((option) => ({ name: option.textContent, value: option.value }));
|
|
8585
8733
|
}
|
|
8586
8734
|
initAutocomplete() {
|
|
8587
|
-
|
|
8588
|
-
this.autocompleteRef.addEventListener('gov-
|
|
8589
|
-
this.autocompleteRef.addEventListener('gov-
|
|
8590
|
-
this.autocompleteRef.addEventListener('gov-
|
|
8591
|
-
this.autocompleteRef
|
|
8592
|
-
|
|
8735
|
+
var _a, _b, _c, _d, _e;
|
|
8736
|
+
(_a = this.autocompleteRef) === null || _a === void 0 ? void 0 : _a.addEventListener('gov-select', this.onSelectHandler.bind(this));
|
|
8737
|
+
(_b = this.autocompleteRef) === null || _b === void 0 ? void 0 : _b.addEventListener('gov-input', this.onInputHandler.bind(this));
|
|
8738
|
+
(_c = this.autocompleteRef) === null || _c === void 0 ? void 0 : _c.addEventListener('gov-focus', this.onFocusHandler.bind(this));
|
|
8739
|
+
(_d = this.autocompleteRef) === null || _d === void 0 ? void 0 : _d.addEventListener('gov-blur', this.onBlurHandler.bind(this));
|
|
8740
|
+
(_e = this.autocompleteRef) === null || _e === void 0 ? void 0 : _e.setSearchCallback(searchString => {
|
|
8593
8741
|
return new Promise(resolve => {
|
|
8594
8742
|
const data = this.getAvailableOptions();
|
|
8595
|
-
if (String(
|
|
8743
|
+
if (String(searchString).length === 0) {
|
|
8596
8744
|
return resolve(data);
|
|
8597
8745
|
}
|
|
8598
|
-
resolve(data.filter(({ name }) => {
|
|
8746
|
+
resolve(data.filter(({ name, value }) => {
|
|
8599
8747
|
if (!name)
|
|
8600
|
-
|
|
8601
|
-
return removeDiacritics(name).toLowerCase().indexOf(removeDiacritics(
|
|
8748
|
+
name = value;
|
|
8749
|
+
return removeDiacritics(name).toLowerCase().indexOf(removeDiacritics(searchString).toLowerCase()) > -1;
|
|
8602
8750
|
}));
|
|
8603
8751
|
});
|
|
8604
|
-
})
|
|
8605
|
-
.then();
|
|
8752
|
+
}).finally();
|
|
8606
8753
|
}
|
|
8607
|
-
|
|
8608
|
-
return this.
|
|
8754
|
+
selectedValueIndex(value) {
|
|
8755
|
+
return this.selectedOptionsState.findIndex((selected) => selected === value);
|
|
8609
8756
|
}
|
|
8610
8757
|
getOptionElement(value) {
|
|
8611
|
-
return this.selectRef.querySelector('option[value="' + value
|
|
8758
|
+
return this.selectRef.querySelector('option[value="' + value + '"]');
|
|
8759
|
+
}
|
|
8760
|
+
getOption(value) {
|
|
8761
|
+
var _a;
|
|
8762
|
+
return (_a = this.getAvailableOptions(true).find((option) => option.value === value)) !== null && _a !== void 0 ? _a : null;
|
|
8612
8763
|
}
|
|
8613
8764
|
selectOption(newOption, notify = true) {
|
|
8614
|
-
const index = this.
|
|
8765
|
+
const index = this.selectedValueIndex(newOption);
|
|
8615
8766
|
if (index === -1) {
|
|
8616
|
-
this.
|
|
8767
|
+
this.selectedOptionsState = [...this.selectedOptionsState, newOption];
|
|
8768
|
+
this.value = this.selectedOptionsState;
|
|
8617
8769
|
if (notify) {
|
|
8618
8770
|
this.govChange.emit({
|
|
8619
8771
|
component: FormMultiSelectClass.root,
|
|
8620
|
-
value: this.
|
|
8772
|
+
value: this.selectedOptionsState,
|
|
8621
8773
|
});
|
|
8622
8774
|
this.govSelect.emit({
|
|
8623
8775
|
component: FormMultiSelectClass.root,
|
|
8624
|
-
value: this.
|
|
8776
|
+
value: this.selectedOptionsState,
|
|
8625
8777
|
});
|
|
8626
8778
|
}
|
|
8627
8779
|
const option = this.getOptionElement(newOption);
|
|
@@ -8631,18 +8783,19 @@ class GovFormMultiSelect {
|
|
|
8631
8783
|
}
|
|
8632
8784
|
}
|
|
8633
8785
|
removeOption(removeOption, notify = true) {
|
|
8634
|
-
const index = this.
|
|
8786
|
+
const index = this.selectedValueIndex(removeOption);
|
|
8635
8787
|
if (index !== -1) {
|
|
8636
|
-
this.
|
|
8637
|
-
this.
|
|
8788
|
+
this.selectedOptionsState.splice(index, 1);
|
|
8789
|
+
this.selectedOptionsState = [...this.selectedOptionsState];
|
|
8790
|
+
this.value = this.selectedOptionsState;
|
|
8638
8791
|
if (notify) {
|
|
8639
8792
|
this.govChange.emit({
|
|
8640
8793
|
component: FormMultiSelectClass.root,
|
|
8641
|
-
value: this.
|
|
8794
|
+
value: this.selectedOptionsState,
|
|
8642
8795
|
});
|
|
8643
8796
|
this.govRemove.emit({
|
|
8644
8797
|
component: FormMultiSelectClass.root,
|
|
8645
|
-
value: this.
|
|
8798
|
+
value: this.selectedOptionsState,
|
|
8646
8799
|
});
|
|
8647
8800
|
}
|
|
8648
8801
|
const option = this.getOptionElement(removeOption);
|
|
@@ -8653,13 +8806,14 @@ class GovFormMultiSelect {
|
|
|
8653
8806
|
}
|
|
8654
8807
|
async componentDidLoad() {
|
|
8655
8808
|
this.initAutocomplete();
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
|
|
8809
|
+
}
|
|
8810
|
+
async componentDidRender() {
|
|
8811
|
+
tick(() => {
|
|
8812
|
+
this.selectRef.querySelectorAll('option').forEach((option) => {
|
|
8813
|
+
if (option.selected) {
|
|
8814
|
+
this.selectOption(option.value, false);
|
|
8815
|
+
}
|
|
8816
|
+
});
|
|
8663
8817
|
});
|
|
8664
8818
|
if (canValidateWcagOnRender()) {
|
|
8665
8819
|
await delay(500);
|
|
@@ -8667,10 +8821,16 @@ class GovFormMultiSelect {
|
|
|
8667
8821
|
}
|
|
8668
8822
|
}
|
|
8669
8823
|
render() {
|
|
8670
|
-
return (hAsync(Host, { class: FormMultiSelectClass.root, size: this.size, variant: this.variant }, hAsync("div", { class: FormMultiSelectClass.wrap }, hAsync("div", { class: "element" }, hAsync("gov-form-autocomplete", { value: this.
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
return (hAsync("
|
|
8824
|
+
return (hAsync(Host, { class: FormMultiSelectClass.root, size: this.size, variant: this.variant }, hAsync("div", { class: FormMultiSelectClass.wrap }, this.h.hasSlot('prefix') && hAsync("slot", { name: "prefix" }), hAsync("div", { class: "element" }, hAsync("gov-form-autocomplete", { value: this.valueState, disabled: this.disabled, identifier: this.identifier || this.selectId, required: false, size: this.size, variant: this.variant, placeholder: this.placeholder, "message-empty": this.messageEmpty, "message-loading": this.messageLoading, ref: el => (this.autocompleteRef = el), minlength: 0, wcagDescribedBy: this.wcagDescribedBy, wcagLabelledBy: this.wcagLabelledBy, wcagOwns: this.listId }), hAsync("gov-icon", { slot: "right-icon", class: "icon-arrow", name: "chevron-down" }), this.h.hasSlot('right-icon') && !(this.success || this.invalid) && hAsync("slot", { name: "right-icon" }), this.success && hAsync("gov-icon", { slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && hAsync("gov-icon", { slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), hAsync("select", { hidden: true, class: 'hidden-select-list', "aria-hidden": toBoolAttr(true), multiple: true, required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el), "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns }, hAsync("slot", null), Array.isArray(this.optionsState) && this.optionsState.map((option) => {
|
|
8825
|
+
var _a;
|
|
8826
|
+
const selectedOption = this.selectedValueIndex(option.value);
|
|
8827
|
+
return (hAsync("option", { value: option.value, selected: selectedOption > -1, disabled: option === null || option === void 0 ? void 0 : option.disabled }, (_a = option.name) !== null && _a !== void 0 ? _a : option.value));
|
|
8828
|
+
}))), this.h.hasSlot('sufix') && hAsync("slot", { name: "sufix" })), this.hideSelectedList === false ? (hAsync("ul", { role: "listbox", id: this.listId, class: FormMultiSelectClass.list }, Array.isArray(this.selectedOptionsState) && this.selectedOptionsState.map(selected => {
|
|
8829
|
+
var _a, _b;
|
|
8830
|
+
const option = this.getOption(selected);
|
|
8831
|
+
if (!option)
|
|
8832
|
+
return null;
|
|
8833
|
+
return (hAsync("li", { class: FormMultiSelectClass.item, role: "option" }, (_a = option.name) !== null && _a !== void 0 ? _a : option.value, hAsync("gov-button", { wcagLabel: (_b = 'Odebrat vybranou položku ' + option.name) !== null && _b !== void 0 ? _b : option.value, variant: "primary", type: "base", size: "s", "on-gov-click": () => this.onTagRemove(selected) }, hAsync("gov-icon", { name: "x-lg" }))));
|
|
8674
8834
|
}))) : null));
|
|
8675
8835
|
}
|
|
8676
8836
|
onFocusHandler(e) {
|
|
@@ -8679,7 +8839,7 @@ class GovFormMultiSelect {
|
|
|
8679
8839
|
this.govFocus.emit({
|
|
8680
8840
|
component: FormMultiSelectClass.root,
|
|
8681
8841
|
originalEvent: e,
|
|
8682
|
-
value: this.
|
|
8842
|
+
value: this.selectedOptionsState,
|
|
8683
8843
|
});
|
|
8684
8844
|
}
|
|
8685
8845
|
onBlurHandler(e) {
|
|
@@ -8689,19 +8849,19 @@ class GovFormMultiSelect {
|
|
|
8689
8849
|
this.govBlur.emit({
|
|
8690
8850
|
component: FormMultiSelectClass.root,
|
|
8691
8851
|
originalEvent: e,
|
|
8692
|
-
value: this.
|
|
8852
|
+
value: this.selectedOptionsState,
|
|
8693
8853
|
});
|
|
8694
8854
|
}
|
|
8695
8855
|
onInputHandler(e) {
|
|
8696
|
-
this.
|
|
8856
|
+
this.valueState = e.detail.value;
|
|
8697
8857
|
e.stopPropagation();
|
|
8698
8858
|
}
|
|
8699
8859
|
onSelectHandler(e) {
|
|
8700
8860
|
e.stopPropagation();
|
|
8701
8861
|
const value = e.detail.selected;
|
|
8702
|
-
this.selectOption(value);
|
|
8703
|
-
this.
|
|
8704
|
-
this.autocompleteRef.clearValue();
|
|
8862
|
+
this.selectOption(value.value);
|
|
8863
|
+
this.valueState = '';
|
|
8864
|
+
this.autocompleteRef.clearValue().finally();
|
|
8705
8865
|
this.autocompleteRef.focus();
|
|
8706
8866
|
}
|
|
8707
8867
|
onTagRemove(removeOption) {
|
|
@@ -8717,7 +8877,7 @@ class GovFormMultiSelect {
|
|
|
8717
8877
|
* Sets the ordered value of the element
|
|
8718
8878
|
*/
|
|
8719
8879
|
async setValue(value) {
|
|
8720
|
-
this.
|
|
8880
|
+
this.valueState = value;
|
|
8721
8881
|
}
|
|
8722
8882
|
/**
|
|
8723
8883
|
* Returns an instance of the native html select element
|
|
@@ -8725,50 +8885,6 @@ class GovFormMultiSelect {
|
|
|
8725
8885
|
async getRef() {
|
|
8726
8886
|
return this.selectRef;
|
|
8727
8887
|
}
|
|
8728
|
-
/**
|
|
8729
|
-
* Returns a list of selected items
|
|
8730
|
-
*/
|
|
8731
|
-
async getSelectedOptions() {
|
|
8732
|
-
return this.selectedOptions;
|
|
8733
|
-
}
|
|
8734
|
-
/**
|
|
8735
|
-
* Setting a list of options to choose from
|
|
8736
|
-
*/
|
|
8737
|
-
async setOptions(options) {
|
|
8738
|
-
if (Array.isArray(options)) {
|
|
8739
|
-
this.options = [...options];
|
|
8740
|
-
}
|
|
8741
|
-
}
|
|
8742
|
-
/**
|
|
8743
|
-
* Returns all available options
|
|
8744
|
-
*/
|
|
8745
|
-
async getOptions(ignoreFilter = true) {
|
|
8746
|
-
return this.getAvailableOptions(ignoreFilter);
|
|
8747
|
-
}
|
|
8748
|
-
/**
|
|
8749
|
-
* Setting the list of selected options
|
|
8750
|
-
*/
|
|
8751
|
-
async setSelectedOptions(options) {
|
|
8752
|
-
if (Array.isArray(options)) {
|
|
8753
|
-
this.selectedOptions = [...options];
|
|
8754
|
-
}
|
|
8755
|
-
}
|
|
8756
|
-
/**
|
|
8757
|
-
* To remove an option from the selected list
|
|
8758
|
-
*/
|
|
8759
|
-
async removeSelectedOption(option, notify = false) {
|
|
8760
|
-
if (typeof option === 'object' && hasOwnProperty(option, 'name') && hasOwnProperty(option, 'value')) {
|
|
8761
|
-
this.removeOption(option, notify);
|
|
8762
|
-
}
|
|
8763
|
-
}
|
|
8764
|
-
/**
|
|
8765
|
-
* Returns an instance of the native html select element
|
|
8766
|
-
*/
|
|
8767
|
-
async setSelectedOption(option, notify = false) {
|
|
8768
|
-
if (typeof option === 'object' && hasOwnProperty(option, 'name') && hasOwnProperty(option, 'value')) {
|
|
8769
|
-
this.selectOption(option, notify);
|
|
8770
|
-
}
|
|
8771
|
-
}
|
|
8772
8888
|
/**
|
|
8773
8889
|
* Validate the WCAG attributes of the component
|
|
8774
8890
|
*/
|
|
@@ -8782,6 +8898,8 @@ class GovFormMultiSelect {
|
|
|
8782
8898
|
static get watchers() { return {
|
|
8783
8899
|
"variant": ["validateVariant"],
|
|
8784
8900
|
"size": ["validateSize", "watchDisabled"],
|
|
8901
|
+
"options": ["watchOptions"],
|
|
8902
|
+
"value": ["watchValue"],
|
|
8785
8903
|
"disabled": ["watchDisabled"],
|
|
8786
8904
|
"invalid": ["watchDisabled"],
|
|
8787
8905
|
"success": ["watchDisabled"]
|
|
@@ -8791,6 +8909,8 @@ class GovFormMultiSelect {
|
|
|
8791
8909
|
"$flags$": 4,
|
|
8792
8910
|
"$tagName$": "gov-form-multi-select",
|
|
8793
8911
|
"$members$": {
|
|
8912
|
+
"value": [1537],
|
|
8913
|
+
"options": [1537],
|
|
8794
8914
|
"identifier": [1],
|
|
8795
8915
|
"placeholder": [1],
|
|
8796
8916
|
"variant": [1],
|
|
@@ -8807,23 +8927,17 @@ class GovFormMultiSelect {
|
|
|
8807
8927
|
"wcagLabelledBy": [1, "wcag-labelled-by"],
|
|
8808
8928
|
"wcagOwns": [1, "wcag-owns"],
|
|
8809
8929
|
"focused": [32],
|
|
8810
|
-
"
|
|
8811
|
-
"
|
|
8812
|
-
"
|
|
8930
|
+
"valueState": [32],
|
|
8931
|
+
"selectedOptionsState": [32],
|
|
8932
|
+
"optionsState": [32],
|
|
8813
8933
|
"setFocus": [64],
|
|
8814
8934
|
"setValue": [64],
|
|
8815
8935
|
"getRef": [64],
|
|
8816
|
-
"getSelectedOptions": [64],
|
|
8817
|
-
"setOptions": [64],
|
|
8818
|
-
"getOptions": [64],
|
|
8819
|
-
"setSelectedOptions": [64],
|
|
8820
|
-
"removeSelectedOption": [64],
|
|
8821
|
-
"setSelectedOption": [64],
|
|
8822
8936
|
"validateWcag": [64]
|
|
8823
8937
|
},
|
|
8824
8938
|
"$listeners$": undefined,
|
|
8825
8939
|
"$lazyBundleId$": "-",
|
|
8826
|
-
"$attrsToReflect$": []
|
|
8940
|
+
"$attrsToReflect$": [["value", "value"], ["options", "options"]]
|
|
8827
8941
|
}; }
|
|
8828
8942
|
}
|
|
8829
8943
|
|
|
@@ -8864,6 +8978,7 @@ class GovFormRadio {
|
|
|
8864
8978
|
this.govFocus = createEvent(this, "gov-focus", 7);
|
|
8865
8979
|
this.govBlur = createEvent(this, "gov-blur", 7);
|
|
8866
8980
|
this.govChange = createEvent(this, "gov-change", 7);
|
|
8981
|
+
this.hydrated = false;
|
|
8867
8982
|
this.value = undefined;
|
|
8868
8983
|
this.noLabel = false;
|
|
8869
8984
|
this.checked = false;
|
|
@@ -8901,6 +9016,9 @@ class GovFormRadio {
|
|
|
8901
9016
|
await this.validateWcag();
|
|
8902
9017
|
}
|
|
8903
9018
|
}
|
|
9019
|
+
connectedCallback() {
|
|
9020
|
+
this.hydrated = true;
|
|
9021
|
+
}
|
|
8904
9022
|
render() {
|
|
8905
9023
|
const wrapRadio = children => {
|
|
8906
9024
|
if (this.noLabel) {
|
|
@@ -8908,7 +9026,7 @@ class GovFormRadio {
|
|
|
8908
9026
|
}
|
|
8909
9027
|
return children;
|
|
8910
9028
|
};
|
|
8911
|
-
return (hAsync(Host, { class: FormRadioClass.root, checked: this.checked, size: this.size, invalid: toBoolAttrIfDefined(this.invalid) }, hAsync("div", { class: FormRadioClass.holder }, wrapRadio(hAsync(Fragment, null, hAsync("input", { class: FormRadioClass.input, id: this.identifier || this.radioId, type: "radio", value: this.value, name: this.name, checked: this.checked, disabled: this.disabled, onClick: this.onClickHandler.bind(this), onChange: this.onChangeHandler.bind(this), onFocus: this.onFocusHandler.bind(this), onBlur: this.onBlurHandler.bind(this), ref: el => (this.inputRef = el), required: this.required, "aria-checked": this.checked, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-disabled": toBoolAttrIfDefined(this.disabled) }), hAsync("span", null, hAsync("slot", { name: "label" })))))));
|
|
9029
|
+
return (hAsync(Host, { class: FormRadioClass.root, hydrated: this.hydrated, checked: this.checked, size: this.size, invalid: toBoolAttrIfDefined(this.invalid) }, hAsync("div", { class: FormRadioClass.holder }, wrapRadio(hAsync(Fragment, null, hAsync("input", { class: FormRadioClass.input, id: this.identifier || this.radioId, type: "radio", value: this.value, name: this.name, checked: this.checked, disabled: this.disabled, onClick: this.onClickHandler.bind(this), onChange: this.onChangeHandler.bind(this), onFocus: this.onFocusHandler.bind(this), onBlur: this.onBlurHandler.bind(this), ref: el => (this.inputRef = el), required: this.required, "aria-checked": this.checked, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-disabled": toBoolAttrIfDefined(this.disabled) }), hAsync("span", null, hAsync("slot", { name: "label" })))))));
|
|
8912
9030
|
}
|
|
8913
9031
|
onClickHandler(e) {
|
|
8914
9032
|
e.stopPropagation();
|
|
@@ -8986,6 +9104,74 @@ class GovFormRadio {
|
|
|
8986
9104
|
}; }
|
|
8987
9105
|
}
|
|
8988
9106
|
|
|
9107
|
+
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}";
|
|
9108
|
+
|
|
9109
|
+
class GovFormRadioGroup {
|
|
9110
|
+
constructor(hostRef) {
|
|
9111
|
+
registerInstance(this, hostRef);
|
|
9112
|
+
this.govChange = createEvent(this, "gov-change", 7);
|
|
9113
|
+
this.handleChange = (event) => {
|
|
9114
|
+
event.stopPropagation();
|
|
9115
|
+
this.value = event.detail.value;
|
|
9116
|
+
this.govChange.emit({
|
|
9117
|
+
value: this.value,
|
|
9118
|
+
component: FormRadioGroupClass.root,
|
|
9119
|
+
});
|
|
9120
|
+
};
|
|
9121
|
+
this.gap = undefined;
|
|
9122
|
+
this.orientation = 'vertical';
|
|
9123
|
+
this.value = undefined;
|
|
9124
|
+
this.h = govHost(this.host);
|
|
9125
|
+
}
|
|
9126
|
+
validateGap(newValue) {
|
|
9127
|
+
if (newValue) {
|
|
9128
|
+
validateProp(FormGroupSizes, newValue, FormGroupClass.root);
|
|
9129
|
+
}
|
|
9130
|
+
}
|
|
9131
|
+
validateOrientation(newValue) {
|
|
9132
|
+
if (newValue) {
|
|
9133
|
+
validateProp(FormGroupOrientation, newValue, FormGroupClass.root);
|
|
9134
|
+
}
|
|
9135
|
+
}
|
|
9136
|
+
componentWillLoad() {
|
|
9137
|
+
this.validateGap(this.gap);
|
|
9138
|
+
this.validateOrientation(this.orientation);
|
|
9139
|
+
}
|
|
9140
|
+
componentDidRender() {
|
|
9141
|
+
tick(() => this.rerenderComponent());
|
|
9142
|
+
}
|
|
9143
|
+
rerenderComponent() {
|
|
9144
|
+
this.host.querySelectorAll('gov-form-radio').forEach((element) => {
|
|
9145
|
+
if (!element.hasAttribute('listener-attached')) {
|
|
9146
|
+
element.addEventListener('gov-change', this.handleChange);
|
|
9147
|
+
}
|
|
9148
|
+
element.setAttribute('listener-attached', 'true');
|
|
9149
|
+
element.checked = element.value === this.value;
|
|
9150
|
+
});
|
|
9151
|
+
}
|
|
9152
|
+
render() {
|
|
9153
|
+
return (hAsync(Host, { gap: this.gap, class: this.h.classes(FormGroupClass.root), value: this.value }, hAsync("slot", null)));
|
|
9154
|
+
}
|
|
9155
|
+
get host() { return getElement(this); }
|
|
9156
|
+
static get watchers() { return {
|
|
9157
|
+
"gap": ["validateGap"],
|
|
9158
|
+
"orientation": ["validateOrientation"]
|
|
9159
|
+
}; }
|
|
9160
|
+
static get style() { return govFormGroupCss; }
|
|
9161
|
+
static get cmpMeta() { return {
|
|
9162
|
+
"$flags$": 4,
|
|
9163
|
+
"$tagName$": "gov-form-radio-group",
|
|
9164
|
+
"$members$": {
|
|
9165
|
+
"gap": [1],
|
|
9166
|
+
"orientation": [1],
|
|
9167
|
+
"value": [1025]
|
|
9168
|
+
},
|
|
9169
|
+
"$listeners$": undefined,
|
|
9170
|
+
"$lazyBundleId$": "-",
|
|
9171
|
+
"$attrsToReflect$": []
|
|
9172
|
+
}; }
|
|
9173
|
+
}
|
|
9174
|
+
|
|
8989
9175
|
pick(Variants, ['PRIMARY', 'SECONDARY']);
|
|
8990
9176
|
const FormSearchClass = {
|
|
8991
9177
|
root: 'gov-form-search',
|
|
@@ -9026,6 +9212,7 @@ class GovFormSelect {
|
|
|
9026
9212
|
this.govBlur = createEvent(this, "gov-blur", 7);
|
|
9027
9213
|
this.govChange = createEvent(this, "gov-change", 7);
|
|
9028
9214
|
this.value = undefined;
|
|
9215
|
+
this.options = undefined;
|
|
9029
9216
|
this.identifier = undefined;
|
|
9030
9217
|
this.variant = 'secondary';
|
|
9031
9218
|
this.size = 'm';
|
|
@@ -9040,7 +9227,7 @@ class GovFormSelect {
|
|
|
9040
9227
|
this.wcagLabelledBy = undefined;
|
|
9041
9228
|
this.wcagOwns = undefined;
|
|
9042
9229
|
this.focused = undefined;
|
|
9043
|
-
this.
|
|
9230
|
+
this.optionsState = [];
|
|
9044
9231
|
this.h = govHost(this.host);
|
|
9045
9232
|
this.f = govForm(this.h);
|
|
9046
9233
|
this.selectId = createID('GovSelect');
|
|
@@ -9051,6 +9238,9 @@ class GovFormSelect {
|
|
|
9051
9238
|
validateSize(newValue) {
|
|
9052
9239
|
validateProp(FormSelectSizes, newValue, FormSelectClass.root);
|
|
9053
9240
|
}
|
|
9241
|
+
watchOptions(newValue) {
|
|
9242
|
+
this.optionsState = propsValueToArray(newValue);
|
|
9243
|
+
}
|
|
9054
9244
|
watchDisabled() {
|
|
9055
9245
|
this.passControlAttrs();
|
|
9056
9246
|
}
|
|
@@ -9068,12 +9258,14 @@ class GovFormSelect {
|
|
|
9068
9258
|
this.markSelectedValue();
|
|
9069
9259
|
this.passControlAttrs();
|
|
9070
9260
|
this.f.passAttrToLabel('required', String(this.required));
|
|
9261
|
+
this.optionsState = propsValueToArray(this.options);
|
|
9071
9262
|
}
|
|
9072
9263
|
async componentDidRender() {
|
|
9073
9264
|
if (canValidateWcagOnRender()) {
|
|
9074
9265
|
await delay(500);
|
|
9075
9266
|
await this.validateWcag();
|
|
9076
9267
|
}
|
|
9268
|
+
tick(() => this.markSelectedValue());
|
|
9077
9269
|
}
|
|
9078
9270
|
markSelectedValue() {
|
|
9079
9271
|
this.host.querySelectorAll('option').forEach((option) => {
|
|
@@ -9086,8 +9278,9 @@ class GovFormSelect {
|
|
|
9086
9278
|
});
|
|
9087
9279
|
}
|
|
9088
9280
|
render() {
|
|
9089
|
-
return (hAsync(Host, { class: FormSelectClass.root, size: this.size, variant: this.variant }, this.h.hasSlot('prefix') && hAsync("slot", { name: "prefix" }), hAsync("span", { class: "element" }, hAsync("gov-icon", { slot: "right-icon", name: "chevron-down", class: "icon-arrow" }), this.h.hasSlot('right-icon') && !(this.success || this.invalid) && hAsync("slot", { name: "right-icon" }), this.success && hAsync("gov-icon", { slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && hAsync("gov-icon", { slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), hAsync("select", { id: this.identifier || this.selectId, onFocus: this.onFocusHandler.bind(this), onChange: this.onChangeHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el), "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-activedescendant": this.wcagActiveDescendant, "aria-controls": this.wcagControls, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns }, hAsync("slot", null), this.
|
|
9090
|
-
|
|
9281
|
+
return (hAsync(Host, { class: FormSelectClass.root, size: this.size, variant: this.variant }, this.h.hasSlot('prefix') && hAsync("slot", { name: "prefix" }), hAsync("span", { class: "element" }, hAsync("gov-icon", { slot: "right-icon", name: "chevron-down", class: "icon-arrow" }), this.h.hasSlot('right-icon') && !(this.success || this.invalid) && hAsync("slot", { name: "right-icon" }), this.success && hAsync("gov-icon", { slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && hAsync("gov-icon", { slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), hAsync("select", { id: this.identifier || this.selectId, onFocus: this.onFocusHandler.bind(this), onChange: this.onChangeHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el), "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-activedescendant": this.wcagActiveDescendant, "aria-controls": this.wcagControls, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns }, hAsync("slot", null), Array.isArray(this.optionsState) && this.optionsState.map((option) => {
|
|
9282
|
+
var _a;
|
|
9283
|
+
return (hAsync("option", { value: option.value, selected: option.value === this.value, disabled: option === null || option === void 0 ? void 0 : option.disabled }, (_a = option.label) !== null && _a !== void 0 ? _a : option.value));
|
|
9091
9284
|
}))), this.h.hasSlot('sufix') && hAsync("slot", { name: "sufix" })));
|
|
9092
9285
|
}
|
|
9093
9286
|
onFocusHandler(e) {
|
|
@@ -9121,26 +9314,12 @@ class GovFormSelect {
|
|
|
9121
9314
|
async setFocus(options) {
|
|
9122
9315
|
return this.selectRef.focus(options);
|
|
9123
9316
|
}
|
|
9124
|
-
/**
|
|
9125
|
-
* Sets the ordered value of the element
|
|
9126
|
-
*/
|
|
9127
|
-
async setValue(value) {
|
|
9128
|
-
this.value = value;
|
|
9129
|
-
}
|
|
9130
9317
|
/**
|
|
9131
9318
|
* Returns an instance of the native html select element
|
|
9132
9319
|
*/
|
|
9133
9320
|
async getRef() {
|
|
9134
9321
|
return this.selectRef;
|
|
9135
9322
|
}
|
|
9136
|
-
/**
|
|
9137
|
-
* Sets the selection options
|
|
9138
|
-
*/
|
|
9139
|
-
async setOptions(options) {
|
|
9140
|
-
if (Array.isArray(options)) {
|
|
9141
|
-
this.options = options;
|
|
9142
|
-
}
|
|
9143
|
-
}
|
|
9144
9323
|
/**
|
|
9145
9324
|
* Validate the WCAG attributes of the component
|
|
9146
9325
|
*/
|
|
@@ -9155,6 +9334,7 @@ class GovFormSelect {
|
|
|
9155
9334
|
static get watchers() { return {
|
|
9156
9335
|
"variant": ["validateVariant"],
|
|
9157
9336
|
"size": ["validateSize", "watchDisabled"],
|
|
9337
|
+
"options": ["watchOptions"],
|
|
9158
9338
|
"disabled": ["watchDisabled"],
|
|
9159
9339
|
"invalid": ["watchDisabled"],
|
|
9160
9340
|
"value": ["watchValue"]
|
|
@@ -9165,6 +9345,7 @@ class GovFormSelect {
|
|
|
9165
9345
|
"$tagName$": "gov-form-select",
|
|
9166
9346
|
"$members$": {
|
|
9167
9347
|
"value": [1537],
|
|
9348
|
+
"options": [1537],
|
|
9168
9349
|
"identifier": [1],
|
|
9169
9350
|
"variant": [1],
|
|
9170
9351
|
"size": [1],
|
|
@@ -9179,16 +9360,14 @@ class GovFormSelect {
|
|
|
9179
9360
|
"wcagLabelledBy": [1, "wcag-labelled-by"],
|
|
9180
9361
|
"wcagOwns": [1, "wcag-owns"],
|
|
9181
9362
|
"focused": [32],
|
|
9182
|
-
"
|
|
9363
|
+
"optionsState": [32],
|
|
9183
9364
|
"setFocus": [64],
|
|
9184
|
-
"setValue": [64],
|
|
9185
9365
|
"getRef": [64],
|
|
9186
|
-
"setOptions": [64],
|
|
9187
9366
|
"validateWcag": [64]
|
|
9188
9367
|
},
|
|
9189
9368
|
"$listeners$": undefined,
|
|
9190
9369
|
"$lazyBundleId$": "-",
|
|
9191
|
-
"$attrsToReflect$": [["value", "value"]]
|
|
9370
|
+
"$attrsToReflect$": [["value", "value"], ["options", "options"]]
|
|
9192
9371
|
}; }
|
|
9193
9372
|
}
|
|
9194
9373
|
|
|
@@ -9200,6 +9379,7 @@ class GovFormSwitch {
|
|
|
9200
9379
|
this.govFocus = createEvent(this, "gov-focus", 7);
|
|
9201
9380
|
this.govBlur = createEvent(this, "gov-blur", 7);
|
|
9202
9381
|
this.govChange = createEvent(this, "gov-change", 7);
|
|
9382
|
+
this.hydrated = false;
|
|
9203
9383
|
this.value = undefined;
|
|
9204
9384
|
this.noLabel = false;
|
|
9205
9385
|
this.checked = false;
|
|
@@ -9237,6 +9417,9 @@ class GovFormSwitch {
|
|
|
9237
9417
|
await this.validateWcag();
|
|
9238
9418
|
}
|
|
9239
9419
|
}
|
|
9420
|
+
connectedCallback() {
|
|
9421
|
+
this.hydrated = true;
|
|
9422
|
+
}
|
|
9240
9423
|
render() {
|
|
9241
9424
|
const wrapCheckbox = (children) => {
|
|
9242
9425
|
if (this.noLabel) {
|
|
@@ -9244,7 +9427,7 @@ class GovFormSwitch {
|
|
|
9244
9427
|
}
|
|
9245
9428
|
return children;
|
|
9246
9429
|
};
|
|
9247
|
-
return (hAsync(Host, { class: this.h.classes(FormSwitchClass.root), checked: this.checked, size: this.size, invalid: toBoolAttrIfDefined(this.invalid) }, hAsync("div", { class: FormSwitchClass.holder }, wrapCheckbox(hAsync(Fragment, null, hAsync("input", { class: FormSwitchClass.input, id: this.identifier || this.checkboxId, type: "checkbox", value: this.value, name: this.name, disabled: this.disabled, checked: this.checked, onClick: this.onClickHandler.bind(this), onChange: this.onChangeHandler.bind(this), onFocus: this.onFocusHandler.bind(this), onBlur: this.onBlurHandler.bind(this), ref: el => (this.inputRef = el), required: this.required, "aria-checked": this.checked, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-disabled": toBoolAttrIfDefined(this.disabled) }), hAsync("span", { class: FormSwitchClass.indicator }), hAsync("slot", { name: "label" }))))));
|
|
9430
|
+
return (hAsync(Host, { class: this.h.classes(FormSwitchClass.root), hydrated: this.hydrated, checked: this.checked, size: this.size, invalid: toBoolAttrIfDefined(this.invalid) }, hAsync("div", { class: FormSwitchClass.holder }, wrapCheckbox(hAsync(Fragment, null, hAsync("input", { class: FormSwitchClass.input, id: this.identifier || this.checkboxId, type: "checkbox", value: this.value, name: this.name, disabled: this.disabled, checked: this.checked, onClick: this.onClickHandler.bind(this), onChange: this.onChangeHandler.bind(this), onFocus: this.onFocusHandler.bind(this), onBlur: this.onBlurHandler.bind(this), ref: el => (this.inputRef = el), required: this.required, "aria-checked": this.checked, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-disabled": toBoolAttrIfDefined(this.disabled) }), hAsync("span", { class: FormSwitchClass.indicator }), hAsync("slot", { name: "label" }))))));
|
|
9248
9431
|
}
|
|
9249
9432
|
onClickHandler(e) {
|
|
9250
9433
|
e.stopPropagation();
|
|
@@ -9995,13 +10178,6 @@ function paginate(totalItems, currentPage = 1, pageSize = 10, maxPages = 10) {
|
|
|
9995
10178
|
};
|
|
9996
10179
|
}
|
|
9997
10180
|
|
|
9998
|
-
const createArrayRange = (from, to) => {
|
|
9999
|
-
if (Number.isInteger(from) && Number.isInteger(to)) {
|
|
10000
|
-
return [...Array(to + 1).keys()].slice(from);
|
|
10001
|
-
}
|
|
10002
|
-
return [];
|
|
10003
|
-
};
|
|
10004
|
-
|
|
10005
10181
|
const govPaginationCss = ".gov-pagination__list{margin:0;padding:0}.gov-pagination__list .gov-pagination__item{margin:0;padding:0;background:none}.gov-pagination__list .gov-pagination__item::before{display:none}.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-pagination{position:relative;display:block;width:100%}.gov-pagination__list{display:flex;align-items:center;flex-wrap:wrap;font-weight:bold;text-align:center}.gov-pagination__list .gov-pagination__item{display:flex;justify-content:center;align-items:center;margin:0;padding:0.125rem;border-radius:var(--gov-border-radius, 0.1875rem);overflow:hidden}.gov-pagination__list .gov-pagination__item--arrow{display:flex}.gov-pagination__list .gov-pagination__item--select{z-index:1;display:flex;overflow:visible;padding:0rem 1rem}.gov-pagination__arrow{margin:0}.gov-pagination__item--more .gov-form-select select{border:none !important;padding-right:0.75rem !important}.gov-pagination__item--more .gov-form-select .gov-icon{display:none}.gov-pagination__inner{display:flex;justify-content:center;align-items:center;align-self:stretch;width:100%;text-decoration:none}.gov-pagination__inner[wcag-current=true][type=solid][variant=primary] .element{background-color:var(--gov-button-primary-solid-hover-bg, var(--gov-color-primary-700));color:var(--gov-button-primary-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=primary] .element{background-color:var(--gov-button-primary-outlined-hover-bg, var(--gov-color-primary-100));color:var(--gov-button-primary-outlined-hover-color, var(--gov-color-primary))}.gov-pagination__inner[wcag-current=true][type=base][variant=primary] .element{background-color:var(--gov-button-primary-base-hover-bg, var(--gov-color-primary-100));color:var(--gov-button-primary-base-hover-color, var(--gov-color-primary))}.gov-pagination__inner[wcag-current=true][type=link][variant=primary] .element{background-color:var(--gov-button-primary-link-hover-bg, transparent);color:var(--gov-button-primary-link-hover-color, var(--gov-color-primary))}.gov-pagination__inner[wcag-current=true][type=solid][variant=secondary] .element{background-color:var(--gov-button-secondary-solid-hover-bg, var(--gov-color-secondary-900));color:var(--gov-button-secondary-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=secondary] .element{background-color:var(--gov-button-secondary-outlined-hover-bg, var(--gov-color-secondary-300));color:var(--gov-button-secondary-outlined-hover-color, var(--gov-color-secondary))}.gov-pagination__inner[wcag-current=true][type=base][variant=secondary] .element{background-color:var(--gov-button-secondary-base-hover-bg, var(--gov-color-secondary-300));color:var(--gov-button-secondary-base-hover-color, var(--gov-color-secondary))}.gov-pagination__inner[wcag-current=true][type=link][variant=secondary] .element{background-color:var(--gov-button-secondary-link-hover-bg, transparent);color:var(--gov-button-secondary-link-hover-color, var(--gov-color-secondary))}.gov-pagination__inner[wcag-current=true][type=solid][variant=error] .element{background-color:var(--gov-button-error-solid-hover-bg, var(--gov-color-error-500));color:var(--gov-button-error-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=error] .element{background-color:var(--gov-button-error-outlined-hover-bg, var(--gov-color-error-100));color:var(--gov-button-error-outlined-hover-color, var(--gov-color-error))}.gov-pagination__inner[wcag-current=true][type=base][variant=error] .element{background-color:var(--gov-button-error-base-hover-bg, var(--gov-color-error-100));color:var(--gov-button-error-base-hover-color, var(--gov-color-error))}.gov-pagination__inner[wcag-current=true][type=link][variant=error] .element{background-color:var(--gov-button-error-link-hover-bg, transparent);color:var(--gov-button-error-link-hover-color, var(--gov-color-error))}.gov-pagination__inner[wcag-current=true][type=solid][variant=success] .element{background-color:var(--gov-button-success-solid-hover-bg, var(--gov-color-success-600));color:var(--gov-button-success-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=success] .element{background-color:var(--gov-button-success-outlined-hover-bg, var(--gov-color-success-100));color:var(--gov-button-success-outlined-hover-color, var(--gov-color-success-500))}.gov-pagination__inner[wcag-current=true][type=base][variant=success] .element{background-color:var(--gov-button-success-base-hover-bg, var(--gov-color-success-100));color:var(--gov-button-success-base-hover-color, var(--gov-color-success-500))}.gov-pagination__inner[wcag-current=true][type=link][variant=success] .element{background-color:var(--gov-button-success-link-hover-bg, transparent);color:var(--gov-button-success-link-hover-color, var(--gov-color-success-500))}.gov-pagination__inner[wcag-current=true][type=solid][variant=warning] .element{background-color:var(--gov-button-warning-solid-hover-bg, var(--gov-color-warning-600));color:var(--gov-button-warning-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=warning] .element{background-color:var(--gov-button-warning-outlined-hover-bg, var(--gov-color-warning-200));color:var(--gov-button-warning-outlined-hover-color, var(--gov-color-warning-500))}.gov-pagination__inner[wcag-current=true][type=base][variant=warning] .element{background-color:var(--gov-button-warning-base-hover-bg, var(--gov-color-warning-200));color:var(--gov-button-warning-base-hover-color, var(--gov-color-warning-500))}.gov-pagination__inner[wcag-current=true][type=link][variant=warning] .element{background-color:var(--gov-button-warning-link-hover-bg, transparent);color:var(--gov-button-warning-link-hover-color, var(--gov-color-warning-500))}.gov-pagination[size=s] .gov-pagination__inner{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);font-weight:inherit}.gov-pagination[size=s] .gov-pagination__inner .element{min-width:var(--gov-pagination-s-button-size, 2rem)}.gov-pagination[size=m] .gov-pagination__inner{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);font-weight:inherit}.gov-pagination[size=m] .gov-pagination__inner .element{min-width:var(--gov-pagination-m-button-size, 2.5rem)}";
|
|
10006
10182
|
|
|
10007
10183
|
class GovPagination {
|
|
@@ -10083,7 +10259,7 @@ class GovPagination {
|
|
|
10083
10259
|
const ariaCurrent = toBoolAttrIfDefined(this.pagination.currentPage === page ? true : undefined);
|
|
10084
10260
|
return (hAsync("gov-button", { href: this.prepareLinkUrl(page), variant: this.variant, size: this.size, type: "base", disabled: isDisabled, "on-gov-click": (e) => this.onClickHandler(e, page), "wcag-label": description ? description : page > -1 ? this.wcagPageLabel + " " + page : undefined, "wcag-current": ariaCurrent, class: PaginationClass.inner }, content));
|
|
10085
10261
|
};
|
|
10086
|
-
return (hAsync(Host, { class: this.h.classes(PaginationClass.root), type: this.type, variant: this.variant, size: this.size }, hAsync("nav", { "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy }, hAsync("ul", { class: PaginationClass.list }, hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.currentPage > 1 ? 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-left" }), this.labelStart)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-left" }), this.labelPrev)), this.type == "select" ? (hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemSelect]) }, hAsync("span", { class: PaginationClass.inner }, hAsync("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), hAsync("gov-form-select", { size:
|
|
10262
|
+
return (hAsync(Host, { class: this.h.classes(PaginationClass.root), type: this.type, variant: this.variant, size: this.size }, hAsync("nav", { "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy }, hAsync("ul", { class: PaginationClass.list }, hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.currentPage > 1 ? 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-left" }), this.labelStart)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-left" }), this.labelPrev)), this.type == "select" ? (hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemSelect]) }, hAsync("span", { class: PaginationClass.inner }, hAsync("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), hAsync("gov-form-select", { size: this.size, variant: this.variant, "wcag-labelled-by": this.pageSelectId, "on-gov-change": this.onSelectHandler.bind(this) }, createArrayRange(1, this.pagination.totalPages).map(page => (hAsync("option", { value: page, selected: this.pagination.currentPage === page }, page))))))) : (hAsync(Fragment, null, this.pagination.pages.map(page => (hAsync("li", { class: this.isActivePageClass(PaginationClass.item, page) }, pageResolver(page, page, '')))), this.pagination.totalPages ? (hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemMore]) }, hAsync("span", { class: PaginationClass.inner }, hAsync("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), hAsync("gov-form-select", { size: this.size, variant: this.variant, "wcag-labelled-by": this.pageSelectId, ref: el => (this.spreadSelectRef = el), "on-gov-change": this.onSelectHandler.bind(this) }, hAsync("option", { selected: true, hidden: true }, "..."), createArrayRange(1, this.pagination.totalPages).map(page => (hAsync("option", { value: page, selected: false }, page))))))) : null)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-right" }), this.labelNext)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-right" }), this.labelEnd))))));
|
|
10087
10263
|
}
|
|
10088
10264
|
onClickHandler(e, page) {
|
|
10089
10265
|
e.stopPropagation();
|
|
@@ -11865,6 +12041,7 @@ registerComponents([
|
|
|
11865
12041
|
GovErrorCode,
|
|
11866
12042
|
GovFormAutocomplete,
|
|
11867
12043
|
GovFormCheckbox,
|
|
12044
|
+
GovFormCheckboxGroup,
|
|
11868
12045
|
GovFormControl,
|
|
11869
12046
|
GovFormFile,
|
|
11870
12047
|
GovFormGroup,
|
|
@@ -11874,6 +12051,7 @@ registerComponents([
|
|
|
11874
12051
|
GovFormMultiSelect,
|
|
11875
12052
|
GovFormPasswordPower,
|
|
11876
12053
|
GovFormRadio,
|
|
12054
|
+
GovFormRadioGroup,
|
|
11877
12055
|
GovFormSearch,
|
|
11878
12056
|
GovFormSelect,
|
|
11879
12057
|
GovFormSwitch,
|