@gov-design-system-ce/components 0.0.56 → 0.0.58
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/core.cjs.js +1 -1
- package/dist/cjs/gov-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-app.cjs.entry.js +71 -6
- package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-badge.cjs.entry.js +1 -1
- package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-button.cjs.entry.js +1 -1
- package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-input.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-radio.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-select.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-switch.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-icon.cjs.entry.js +2 -2
- package/dist/cjs/gov-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-loading.cjs.entry.js +2 -3
- package/dist/cjs/gov-loading.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-modal.cjs.entry.js +1 -1
- package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-prompt.cjs.entry.js +1 -1
- package/dist/cjs/gov-prompt.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-toast.cjs.entry.js +9 -15
- package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-wizard-item.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/gov-accordion/gov-accordion-item.css +1 -0
- package/dist/collection/components/gov-badge/gov-badge.css +12 -12
- package/dist/collection/components/gov-button/default/gov-button.css +12 -12
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.css +1 -0
- package/dist/collection/components/gov-form/input/gov-form-input.css +17 -7
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +32 -11
- package/dist/collection/components/gov-form/radio/gov-form-radio.css +1 -0
- package/dist/collection/components/gov-form/select/gov-form-select.css +29 -11
- package/dist/collection/components/gov-form/select/gov-form-select.js +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
- package/dist/collection/components/gov-form/switch/gov-form-switch.css +4 -8
- package/dist/collection/components/gov-icon/gov-icon.css +6 -2
- package/dist/collection/components/gov-icon/list.js +10 -0
- package/dist/collection/components/gov-icon/list.js.map +1 -1
- package/dist/collection/components/gov-loading/loading/gov-loading.css +4 -3
- package/dist/collection/components/gov-loading/loading/gov-loading.js +1 -24
- package/dist/collection/components/gov-loading/loading/gov-loading.js.map +1 -1
- package/dist/collection/components/gov-modal/gov-modal.css +0 -4
- package/dist/collection/components/gov-promp/gov-prompt.css +0 -4
- package/dist/collection/components/gov-stepper/gov-stepper-item.css +0 -1
- package/dist/collection/components/gov-toast/gov-toast.js +15 -21
- package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
- package/dist/collection/components/gov-wizard/gov-wizard-item.css +3 -1
- package/dist/collection/pages/Accordion.js +2 -2
- package/dist/collection/pages/Accordion.js.map +1 -1
- package/dist/collection/pages/Forms.js +69 -4
- package/dist/collection/pages/Forms.js.map +1 -1
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-accordion-item.js.map +1 -1
- package/dist/components/gov-alert.js +1 -1
- package/dist/components/gov-app.js +1 -1
- package/dist/components/gov-app.js.map +1 -1
- package/dist/components/gov-attachments-item.js +1 -1
- package/dist/components/gov-badge.js +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-checkbox.js.map +1 -1
- package/dist/components/gov-form-file.js +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.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-loading.js +1 -1
- package/dist/components/gov-loading.js.map +1 -1
- package/dist/components/gov-modal.js +1 -1
- package/dist/components/gov-modal.js.map +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-prompt.js +1 -1
- package/dist/components/gov-prompt.js.map +1 -1
- package/dist/components/gov-side-nav-item.js +1 -1
- package/dist/components/gov-stepper-item.js +1 -1
- package/dist/components/gov-stepper-item.js.map +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tile.js +1 -1
- package/dist/components/gov-toast.js +1 -1
- package/dist/components/gov-toast.js.map +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/gov-wizard-item.js.map +1 -1
- package/dist/components/{p-a2e601c5.js → p-0378da4d.js} +2 -2
- package/dist/components/{p-a2e601c5.js.map → p-0378da4d.js.map} +1 -1
- package/dist/components/p-35f6490a.js +2 -0
- package/dist/components/{p-04bfe959.js.map → p-35f6490a.js.map} +1 -1
- package/dist/components/{p-6ca0c464.js → p-70d9d879.js} +2 -2
- package/dist/components/{p-6ca0c464.js.map → p-70d9d879.js.map} +1 -1
- package/dist/components/{p-f516d8f6.js → p-9cba3cd3.js} +2 -2
- package/dist/components/p-a6915747.js +2 -0
- package/dist/components/p-a6915747.js.map +1 -0
- package/dist/components/p-da3b225f.js +2 -0
- package/dist/components/{p-2753b6e4.js.map → p-da3b225f.js.map} +1 -1
- package/dist/components/{p-594ba760.js → p-ee60cdd1.js} +2 -2
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-2944bf77.entry.js +2 -0
- package/dist/core/{p-64f7e661.entry.js.map → p-2944bf77.entry.js.map} +1 -1
- package/dist/core/p-2bb9f781.entry.js +2 -0
- package/dist/core/p-2bb9f781.entry.js.map +1 -0
- package/dist/core/p-4c79a97a.entry.js +2 -0
- package/dist/core/p-4c79a97a.entry.js.map +1 -0
- package/dist/core/p-667dc3de.entry.js +2 -0
- package/dist/core/p-667dc3de.entry.js.map +1 -0
- package/dist/core/p-69f944d1.entry.js +2 -0
- package/dist/core/p-69f944d1.entry.js.map +1 -0
- package/dist/core/{p-bfb4d904.entry.js → p-6a65af35.entry.js} +2 -2
- package/dist/core/{p-bfb4d904.entry.js.map → p-6a65af35.entry.js.map} +1 -1
- package/dist/core/p-85258200.entry.js +2 -0
- package/dist/core/{p-f0a5847a.entry.js.map → p-85258200.entry.js.map} +1 -1
- package/dist/core/p-8fce08d1.entry.js +2 -0
- package/dist/core/p-8fce08d1.entry.js.map +1 -0
- package/dist/core/p-9bfab069.entry.js +2 -0
- package/dist/core/{p-fc853777.entry.js.map → p-9bfab069.entry.js.map} +1 -1
- package/dist/core/p-a85f4a62.entry.js +2 -0
- package/dist/core/p-a85f4a62.entry.js.map +1 -0
- package/dist/core/{p-accf8575.entry.js → p-af646ce2.entry.js} +2 -2
- package/dist/core/{p-accf8575.entry.js.map → p-af646ce2.entry.js.map} +1 -1
- package/dist/core/p-cacd0fed.entry.js +2 -0
- package/dist/core/{p-22a86871.entry.js.map → p-cacd0fed.entry.js.map} +1 -1
- package/dist/core/p-d4cfa93a.entry.js +2 -0
- package/dist/core/{p-81643870.entry.js.map → p-d4cfa93a.entry.js.map} +1 -1
- package/dist/core/{p-3858e2c8.entry.js → p-dd39ede4.entry.js} +2 -2
- package/dist/core/p-dd39ede4.entry.js.map +1 -0
- package/dist/core/p-de5c9181.entry.js +2 -0
- package/dist/core/p-de5c9181.entry.js.map +1 -0
- package/dist/core/p-f8252fea.entry.js +2 -0
- package/dist/core/{p-ea4459ae.entry.js.map → p-f8252fea.entry.js.map} +1 -1
- package/dist/core/p-fb99f144.entry.js +2 -0
- package/dist/core/p-fb99f144.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/gov-accordion-item.entry.js +1 -1
- package/dist/esm/gov-accordion-item.entry.js.map +1 -1
- package/dist/esm/gov-app.entry.js +71 -6
- package/dist/esm/gov-app.entry.js.map +1 -1
- package/dist/esm/gov-badge.entry.js +1 -1
- package/dist/esm/gov-badge.entry.js.map +1 -1
- package/dist/esm/gov-button.entry.js +1 -1
- package/dist/esm/gov-button.entry.js.map +1 -1
- package/dist/esm/gov-form-checkbox.entry.js +1 -1
- package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
- package/dist/esm/gov-form-input.entry.js +1 -1
- package/dist/esm/gov-form-input.entry.js.map +1 -1
- package/dist/esm/gov-form-multi-select.entry.js +1 -1
- package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
- package/dist/esm/gov-form-radio.entry.js +1 -1
- package/dist/esm/gov-form-radio.entry.js.map +1 -1
- package/dist/esm/gov-form-select.entry.js +2 -2
- package/dist/esm/gov-form-select.entry.js.map +1 -1
- package/dist/esm/gov-form-switch.entry.js +1 -1
- package/dist/esm/gov-form-switch.entry.js.map +1 -1
- package/dist/esm/gov-icon.entry.js +2 -2
- package/dist/esm/gov-icon.entry.js.map +1 -1
- package/dist/esm/gov-loading.entry.js +2 -3
- package/dist/esm/gov-loading.entry.js.map +1 -1
- package/dist/esm/gov-modal.entry.js +1 -1
- package/dist/esm/gov-modal.entry.js.map +1 -1
- package/dist/esm/gov-prompt.entry.js +1 -1
- package/dist/esm/gov-prompt.entry.js.map +1 -1
- package/dist/esm/gov-stepper-item.entry.js +1 -1
- package/dist/esm/gov-stepper-item.entry.js.map +1 -1
- package/dist/esm/gov-toast.entry.js +9 -15
- package/dist/esm/gov-toast.entry.js.map +1 -1
- package/dist/esm/gov-wizard-item.entry.js +1 -1
- package/dist/esm/gov-wizard-item.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/hydrate/index.js +98 -42
- package/dist/types/components/gov-loading/loading/gov-loading.d.ts +0 -4
- package/dist/types/components/gov-toast/gov-toast.d.ts +4 -6
- package/dist/types/components.d.ts +4 -12
- package/package.json +3 -3
- package/dist/components/p-04bfe959.js +0 -2
- package/dist/components/p-2753b6e4.js +0 -2
- package/dist/components/p-baf87688.js +0 -2
- package/dist/components/p-baf87688.js.map +0 -1
- package/dist/core/p-22a86871.entry.js +0 -2
- package/dist/core/p-23385300.entry.js +0 -2
- package/dist/core/p-23385300.entry.js.map +0 -1
- package/dist/core/p-3858e2c8.entry.js.map +0 -1
- package/dist/core/p-48cfc1c6.entry.js +0 -2
- package/dist/core/p-48cfc1c6.entry.js.map +0 -1
- package/dist/core/p-4df62a13.entry.js +0 -2
- package/dist/core/p-4df62a13.entry.js.map +0 -1
- package/dist/core/p-64f7e661.entry.js +0 -2
- package/dist/core/p-74f0be51.entry.js +0 -2
- package/dist/core/p-74f0be51.entry.js.map +0 -1
- package/dist/core/p-801f1147.entry.js +0 -2
- package/dist/core/p-801f1147.entry.js.map +0 -1
- package/dist/core/p-81643870.entry.js +0 -2
- package/dist/core/p-82f64673.entry.js +0 -2
- package/dist/core/p-82f64673.entry.js.map +0 -1
- package/dist/core/p-aa4e716e.entry.js +0 -2
- package/dist/core/p-aa4e716e.entry.js.map +0 -1
- package/dist/core/p-e769f3ee.entry.js +0 -2
- package/dist/core/p-e769f3ee.entry.js.map +0 -1
- package/dist/core/p-ea4459ae.entry.js +0 -2
- package/dist/core/p-f0a5847a.entry.js +0 -2
- package/dist/core/p-fc853777.entry.js +0 -2
- package/dist/globals.d.ts +0 -2
- package/dist/types/types/typings.d.ts +0 -6
- /package/dist/components/{p-f516d8f6.js.map → p-9cba3cd3.js.map} +0 -0
- /package/dist/components/{p-594ba760.js.map → p-ee60cdd1.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["govFormInputCss","Tags","GovFormInput","proxyCustomElement","H","constructor","this","h","govHost","host","inputId","createID","f","govForm","validateVariant","newValue","validateProp","FormInputVariants","FormInputClass","root","validateSize","FormInputSizes","watchDisabled","passControlAttrs","passAttrToControl","size","toBoolAttr","disabled","invalid","multiline","TEXTAREA","INPUT","componentWillLoad","variant","passAttrToLabel","String","required","componentDidRender","canValidateWcagOnRender","delay","validateWcag","render","Tag","Host","class","type","hasSlot","name","success","slot","inputType","id","identifier","onFocus","onFocusHandler","bind","onInput","onInputHandler","onBlur","onBlurHandler","onKeyUp","onKeyUpHandler","onKeyDown","onKeyDownHandler","ref","el","inputRef","placeholder","value","readonly","toBoolAttrIfDefined","autocomplete","toOnOffAttrIfDefined","autocorrect","minlength","maxlength","min","max","rows","cols","role","wcagDescribedBy","wcagLabelledBy","wcagOwns","wcagExpanded","wcagAutocomplete","e","stopPropagation","focused","govFocus","emit","component","originalEvent","govBlur","govKeyUp","govKeyDown","target","govInput","setFocus","options","focus","setValue","clearValue","getRef","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/input/gov-form-input.scss?tag=gov-form-input","../../../packages/core/src/components/gov-form/input/gov-form-input.tsx"],"sourcesContent":["/*\n * Input\n */\n\n@import \"../input/gov-form-input-core.scss\";\n$class: \".gov-form-input\";\n\n#{$class} {\n\t@extend %form-input-core;\n\n\t// VARIANTS\n\t&[type=\"reset\"] {\n\t\tinput {\n\t\t\tborder-width: 0;\n\t\t\t&:focus {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { govForm } from \"../../../helpers/Dom/form\"\nimport { GovForm } from \"../../../helpers/Dom/form.types\"\nimport { govHost, toBoolAttr, toBoolAttrIfDefined, toOnOffAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\nimport { validateWcagLabelFor, validateWcagRef } from \"../../../helpers/Validate/wcag\"\nimport { createID } from \"../../../utils/string.utils\"\nimport { delay } from \"../../../utils/utils\"\nimport {\n\tFormInputClass,\n\tFormInputSizes,\n\tFormInputSizesType,\n\tFormInputVariants,\n\tFormInputVariantType,\n\tInputType,\n\tType,\n} from \"./constants\"\nimport { FormInputEvent } from \"./gov-form-input.types\"\nimport { Nullable } from \"../../../types/interfaces\"\n\nenum Tags {\n\tINPUT = \"input\",\n\tTEXTAREA = \"textarea\",\n}\n\n@Component({\n\ttag: \"gov-form-input\",\n\tstyleUrl: \"gov-form-input.scss\",\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.inputId = createID(\"GovInput\")\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({ reflect: true, mutable: true }) value: string\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop() readonly variant?: FormInputVariantType = \"secondary\"\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Generates a texarea for the possibility of multiple lines\n\t */\n\t@Prop() readonly multiline: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n\t */\n\t@Prop() readonly rows: number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols\n\t */\n\t@Prop() readonly cols: number\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Minimum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete\n\t */\n\t@Prop() readonly autocomplete: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect\n\t */\n\t@Prop() readonly autocorrect: boolean\n\t/**\n\t * Defineds the visual style of input\n\t */\n\t@Prop() readonly type?: Type\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n\t */\n\t@Prop() readonly inputType: InputType = \"text\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role\n\t */\n\t@Prop() readonly role: Nullable<string>\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-described-by\" }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-owns\" }) readonly wcagOwns: string\n\t/**\n\t * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value.\n\t */\n\t@Prop({ attribute: \"wcag-autocomplete\" }) readonly wcagAutocomplete: string\n\t/**\n\t * Attribute is set on an element to indicate if a control is expanded or collapsed\n\t */\n\t@Prop({ attribute: \"wcag-expanded\" }) readonly wcagExpanded: boolean\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: \"gov-input\" }) govInput: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: \"gov-keyup\" }) govKeyUp: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: \"gov-keydown\" }) govKeyDown: EventEmitter<FormInputEvent>\n\t@State() focused: boolean\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormInputVariants, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormInputSizes, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"type\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", this.multiline ? Tags.TEXTAREA : Tags.INPUT)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t\tthis.passControlAttrs()\n\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT\n\n\t\treturn (\n\t\t\t<Host class={FormInputClass.root} size={this.size} variant={this.variant} type={this.type}>\n\t\t\t\t{this.h.hasSlot(\"prefix\") && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t{this.h.hasSlot(\"left-icon\") && <slot name=\"left-icon\" />}\n\n\t\t\t\t\t{this.h.hasSlot(\"right-icon\") && !(this.success || this.invalid) && <slot name=\"right-icon\" />}\n\n\t\t\t\t\t{this.success && !this.multiline &&\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && !this.multiline &&\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttype={this.inputType}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tid={this.identifier || this.inputId}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\tonKeyUp={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\t\tonKeyDown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\treadonly={toBoolAttrIfDefined(this.readonly)}\n\t\t\t\t\t\tautocomplete={toOnOffAttrIfDefined(this.autocomplete)}\n\t\t\t\t\t\tautocorrect={toOnOffAttrIfDefined(this.autocorrect)}\n\t\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\trows={this.rows}\n\t\t\t\t\t\tcols={this.cols}\n\t\t\t\t\t\trole={this.role}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\t\taria-autocomplete={this.wcagAutocomplete}\n\t\t\t\t\t/>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot(\"sufix\") && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyUpHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyUp.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyDownHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyDown.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Clears input value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = \"\"\n\t\tthis.inputRef.value = \"\"\n\t}\n\n\t/**\n\t * Returns an instance of the native html input element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"wcag-described-by\", FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, \"wcag-owns\", FormInputClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.inputId, this.wcagLabelledBy, FormInputClass.root)\n\t}\n}\n"],"mappings":"iZAAA,MAAMA,EAAkB,28YCsBxB,IAAKC,GAAL,SAAKA,GACJA,EAAA,iBACAA,EAAA,sBACA,EAHD,CAAKA,MAAI,K,MASIC,EAAYC,EAAA,MAAAD,UAAAE,EAMxB,WAAAC,G,gRAkBkD,Y,iCAQL,I,mGAqBR,M,6PA8CG,O,mNA5FvCC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,QAAUC,EAAS,YACxBL,KAAKM,EAAIC,EAAQP,KAAKC,E,CA+IvB,eAAAO,CAAgBC,GACfC,EAAaC,EAAmBF,EAAUG,EAAeC,K,CAI1D,YAAAC,CAAaL,GACZC,EAAaK,EAAgBN,EAAUG,EAAeC,K,CAOvD,aAAAG,GACChB,KAAKiB,kB,CAGE,gBAAAA,GACPjB,KAAKM,EAAEY,kBAAkB,OAAQlB,KAAKmB,MACtCnB,KAAKM,EAAEY,kBAAkB,WAAYE,EAAWpB,KAAKqB,WACrDrB,KAAKM,EAAEY,kBAAkB,UAAWE,EAAWpB,KAAKsB,UACpDtB,KAAKM,EAAEY,kBAAkB,OAAQlB,KAAKuB,UAAY5B,EAAK6B,SAAW7B,EAAK8B,M,CAGxE,iBAAAC,GACC1B,KAAKQ,gBAAgBR,KAAK2B,SAC1B3B,KAAKc,aAAad,KAAKmB,MACvBnB,KAAKiB,mBAELjB,KAAKM,EAAEsB,gBAAgB,WAAYC,OAAO7B,KAAK8B,U,CAGhD,wBAAMC,GACL,GAAIC,IAA2B,OACxBC,EAAM,WACNjC,KAAKkC,c,EAIb,MAAAC,GACC,MAAMC,EAAMpC,KAAKuB,UAAY5B,EAAK6B,SAAW7B,EAAK8B,MAElD,OACCxB,EAACoC,EAAI,CAACC,MAAO1B,EAAeC,KAAMM,KAAMnB,KAAKmB,KAAMQ,QAAS3B,KAAK2B,QAASY,KAAMvC,KAAKuC,MACnFvC,KAAKC,EAAEuC,QAAQ,WAAavC,EAAA,QAAMwC,KAAK,WACxCxC,EAAA,QAAMqC,MAAM,WACVtC,KAAKC,EAAEuC,QAAQ,cAAgBvC,EAAA,QAAMwC,KAAK,cAE1CzC,KAAKC,EAAEuC,QAAQ,iBAAmBxC,KAAK0C,SAAW1C,KAAKsB,UAAYrB,EAAA,QAAMwC,KAAK,eAE9EzC,KAAK0C,UAAY1C,KAAKuB,WACjBtB,EAAA,YAAU0C,KAAK,aAAaL,MAAM,kBAAkBG,KAAK,aAC9DzC,KAAKsB,UAAYtB,KAAKuB,WACjBtB,EAAA,YAAU0C,KAAK,aAAaL,MAAM,kBAAkBG,KAAK,mBAC/DxC,EAACmC,EAAG,CACHG,KAAMvC,KAAK4C,UACXvB,SAAUrB,KAAKqB,SACfwB,GAAI7C,KAAK8C,YAAc9C,KAAKI,QAC5BqC,KAAMzC,KAAKyC,KACXM,QAAS/C,KAAKgD,eAAeC,KAAKjD,MAClCkD,QAASlD,KAAKmD,eAAeF,KAAKjD,MAClCoD,OAAQpD,KAAKqD,cAAcJ,KAAKjD,MAChCsD,QAAStD,KAAKuD,eAAeN,KAAKjD,MAClCwD,UAAWxD,KAAKyD,iBAAiBR,KAAKjD,MACtC0D,IAAKC,GAAO3D,KAAK4D,SAAWD,EAC5BE,YAAa7D,KAAK6D,YAClBC,MAAO9D,KAAK8D,MACZC,SAAUC,EAAoBhE,KAAK+D,UACnCE,aAAcC,EAAqBlE,KAAKiE,cACxCE,YAAaD,EAAqBlE,KAAKmE,aACvCC,UAAWpE,KAAKoE,UAChBC,UAAWrE,KAAKqE,UAChBC,IAAKtE,KAAKsE,IACVC,IAAKvE,KAAKuE,IACVzC,SAAU9B,KAAK8B,SACf0C,KAAMxE,KAAKwE,KACXC,KAAMzE,KAAKyE,KACXC,KAAM1E,KAAK0E,KAAI,gBACAV,EAAoBhE,KAAK8B,UAAS,eACnCkC,EAAoBhE,KAAKsB,SAAQ,gBAChC0C,EAAoBhE,KAAKqB,UAAS,mBAC/BrB,KAAK2E,gBAAe,kBACrB3E,KAAK4E,eAAc,YACzB5E,KAAK6E,SAAQ,gBACTb,EAAoBhE,KAAK8E,cAAa,oBAClC9E,KAAK+E,oBAGzB/E,KAAKC,EAAEuC,QAAQ,UAAYvC,EAAA,QAAMwC,KAAK,U,CAKlC,cAAAO,CAAegC,GACtBA,EAAEC,kBACFjF,KAAKkF,QAAU,KACflF,KAAKmF,SAASC,KAAK,CAClBC,UAAWzE,EAAeC,KAC1BiD,MAAO9D,KAAK8D,MACZwB,cAAeN,G,CAIT,aAAA3B,CAAc2B,GACrBA,EAAEC,kBACFjF,KAAKkF,QAAU,MACflF,KAAKuF,QAAQH,KAAK,CACjBC,UAAWzE,EAAeC,KAC1BiD,MAAO9D,KAAK8D,MACZwB,cAAeN,G,CAIT,cAAAzB,CAAeyB,GACtBA,EAAEC,kBACFjF,KAAKwF,SAASJ,KAAK,CAClBC,UAAWzE,EAAeC,KAC1BiD,MAAO9D,KAAK8D,MACZwB,cAAeN,G,CAIT,gBAAAvB,CAAiBuB,GACxBA,EAAEC,kBACFjF,KAAKyF,WAAWL,KAAK,CACpBC,UAAWzE,EAAeC,KAC1BiD,MAAO9D,KAAK8D,MACZwB,cAAeN,G,CAIT,cAAA7B,CAAe6B,GACtBhF,KAAK8D,MAASkB,EAAEU,OAA4B5B,MAC5CkB,EAAEC,kBACFjF,KAAK2F,SAASP,KAAK,CAClBC,UAAWzE,EAAeC,KAC1BiD,MAAO9D,KAAK8D,MACZwB,cAAeN,G,CAQjB,cAAMY,CAASC,GACd,OAAO7F,KAAK4D,SAASkC,MAAMD,E,CAO5B,cAAME,CAASjC,GACd9D,KAAK8D,MAAQA,C,CAOd,gBAAMkC,GACLhG,KAAK8D,MAAQ,GACb9D,KAAK4D,SAASE,MAAQ,E,CAOvB,YAAMmC,GACL,OAAOjG,KAAK4D,Q,CAOb,kBAAM1B,GACLgE,EAAgBlG,KAAK2E,gBAAiB,oBAAqB/D,EAAeC,MAC1EqF,EAAgBlG,KAAK4E,eAAgB,mBAAoBhE,EAAeC,MACxEqF,EAAgBlG,KAAK6E,SAAU,YAAajE,EAAeC,MAC3DsF,EAAqBnG,KAAK8C,YAAc9C,KAAKI,QAASJ,KAAK4E,eAAgBhE,EAAeC,K"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{p as e,H as o,c as t,h as r,d as i}from"./p-80c0109d.js";import{g as s,o as l,p as a,q as c}from"./p-17c1ffc1.js";import{g as n,a as v,t as g}from"./p-3f37ddb6.js";import{c as m}from"./p-cac3881f.js";import{v as f}from"./p-26acf964.js";import{b as d,c as h}from"./p-ae894a40.js";import{c as p}from"./p-24636c53.js";import{d as u}from"./p-03990da5.js";import{d as z}from"./p-35f6490a.js";const x='.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-select{position:relative;display:flex;width:100%;align-items:center}.gov-form-select .element{position:relative;display:flex;flex:1 1 auto}.gov-form-select input,.gov-form-select select,.gov-form-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-select input:focus,.gov-form-select select:focus,.gov-form-select textarea:focus{outline:none}.gov-form-select input:focus-visible,.gov-form-select select:focus-visible,.gov-form-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-select input::-moz-placeholder,.gov-form-select select::-moz-placeholder,.gov-form-select textarea::-moz-placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-select input::placeholder,.gov-form-select select::placeholder,.gov-form-select textarea::placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-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-select *[slot=left-icon],.gov-form-select *[slot=right-icon]{position:absolute;top:50%;display:flex;justify-content:center;transform:translateY(-50%);pointer-events:none}.gov-form-select *[slot=left-icon]{left:0}.gov-form-select *[slot=right-icon]{right:0}.gov-form-select *[slot=prefix],.gov-form-select *[slot=sufix]{margin:0}[size=s].gov-form-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-select input,[size=s].gov-form-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-select *[slot=left-icon],[size=s].gov-form-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-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-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=s].gov-form-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-select *[slot=right-icon]~input,[size=s].gov-form-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=m].gov-form-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-select input,[size=m].gov-form-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-select *[slot=left-icon],[size=m].gov-form-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-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-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=m].gov-form-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-select *[slot=right-icon]~input,[size=m].gov-form-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=l].gov-form-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-select input,[size=l].gov-form-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-select *[slot=left-icon],[size=l].gov-form-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-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-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=l].gov-form-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-select *[slot=right-icon]~input,[size=l].gov-form-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=xl].gov-form-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-select input,[size=xl].gov-form-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-select *[slot=left-icon],[size=xl].gov-form-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-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-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-xl-icon-padding, 3rem)}[size=xl].gov-form-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-select *[slot=right-icon]~input,[size=xl].gov-form-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-xl-icon-padding, 3rem)}[variant=primary].gov-form-select input,[variant=primary].gov-form-select select,[variant=primary].gov-form-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-select *[slot=left-icon],[variant=primary].gov-form-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-primary, var(--gov-color-primary))}[variant=secondary].gov-form-select input,[variant=secondary].gov-form-select select,[variant=secondary].gov-form-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-select *[slot=left-icon],[variant=secondary].gov-form-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-secondary, var(--gov-color-primary))}[disabled=""].gov-form-select,[disabled=true i].gov-form-select,[disabled="1"].gov-form-select{pointer-events:none}[disabled=""].gov-form-select input,[disabled=""].gov-form-select select,[disabled=""].gov-form-select textarea,[disabled=true i].gov-form-select input,[disabled=true i].gov-form-select select,[disabled=true i].gov-form-select textarea,[disabled="1"].gov-form-select input,[disabled="1"].gov-form-select select,[disabled="1"].gov-form-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-select *[slot=left-icon],[disabled=""].gov-form-select *[slot=right-icon],[disabled=true i].gov-form-select *[slot=left-icon],[disabled=true i].gov-form-select *[slot=right-icon],[disabled="1"].gov-form-select *[slot=left-icon],[disabled="1"].gov-form-select *[slot=right-icon]{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600)) !important}[invalid=""].gov-form-select input,[invalid=""].gov-form-select select,[invalid=""].gov-form-select textarea,[invalid=true i].gov-form-select input,[invalid=true i].gov-form-select select,[invalid=true i].gov-form-select textarea,[invalid="1"].gov-form-select input,[invalid="1"].gov-form-select select,[invalid="1"].gov-form-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-select input::-moz-placeholder,[invalid=""].gov-form-select select::-moz-placeholder,[invalid=""].gov-form-select textarea::-moz-placeholder,[invalid=true i].gov-form-select input::-moz-placeholder,[invalid=true i].gov-form-select select::-moz-placeholder,[invalid=true i].gov-form-select textarea::-moz-placeholder,[invalid="1"].gov-form-select input::-moz-placeholder,[invalid="1"].gov-form-select select::-moz-placeholder,[invalid="1"].gov-form-select textarea::-moz-placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-select input::placeholder,[invalid=""].gov-form-select select::placeholder,[invalid=""].gov-form-select textarea::placeholder,[invalid=true i].gov-form-select input::placeholder,[invalid=true i].gov-form-select select::placeholder,[invalid=true i].gov-form-select textarea::placeholder,[invalid="1"].gov-form-select input::placeholder,[invalid="1"].gov-form-select select::placeholder,[invalid="1"].gov-form-select textarea::placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-select *[slot=left-icon],[invalid=""].gov-form-select *[slot=right-icon],[invalid=true i].gov-form-select *[slot=left-icon],[invalid=true i].gov-form-select *[slot=right-icon],[invalid="1"].gov-form-select *[slot=left-icon],[invalid="1"].gov-form-select *[slot=right-icon]{color:var(--gov-form-state-color-error, var(--gov-color-error)) !important}[invalid=""].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid=true i].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid="1"].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[success=""].gov-form-select *[slot=right-icon]:not(.icon-arrow),[success=true i].gov-form-select *[slot=right-icon]:not(.icon-arrow),[success="1"].gov-form-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-state-color-success, var(--gov-color-success))}[success=""].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success=true i].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success="1"].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[multiline=""].gov-form-select *[slot=left-icon],[multiline=""].gov-form-select *[slot=right-icon],[multiline=true i].gov-form-select *[slot=left-icon],[multiline=true i].gov-form-select *[slot=right-icon],[multiline="1"].gov-form-select *[slot=left-icon],[multiline="1"].gov-form-select *[slot=right-icon]{display:none}.gov-form-select{background:none}.gov-form-select select{-webkit-appearance:none;-moz-appearance:none}.gov-form-select select::-ms-expand{display:none}[size=s].gov-form-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=m].gov-form-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=l].gov-form-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=xl].gov-form-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)}';const w=e(class e extends o{constructor(){super();this.__registerHost();this.govFocus=t(this,"gov-focus",7);this.govBlur=t(this,"gov-blur",7);this.govChange=t(this,"gov-change",7);this.value=undefined;this.identifier=undefined;this.variant="secondary";this.size="m";this.name=undefined;this.required=false;this.disabled=undefined;this.invalid=undefined;this.wcagActiveDescendant=undefined;this.wcagControls=undefined;this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagOwns=undefined;this.focused=undefined;this.h=n(this.host);this.f=s(this.h);this.selectId=p("GovSelect")}validateVariant(e){f(a,e,l.root)}validateSize(e){f(c,e,l.root)}watchDisabled(){this.passControlAttrs()}watchValue(){this.markSelectedValue()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("disabled",v(this.disabled));this.f.passAttrToControl("invalid",v(this.invalid));this.f.passAttrToControl("type","select")}componentWillLoad(){this.validateVariant(this.variant);this.validateSize(this.size);this.markSelectedValue();this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required))}async componentDidRender(){if(m()){await u(500);await this.validateWcag()}}markSelectedValue(){this.host.querySelectorAll("option").forEach((e=>{if(e.value===this.value){e.setAttribute("selected","selected")}else{e.removeAttribute("selected")}}))}render(){return r(i,{class:l.root,size:this.size,variant:this.variant},this.h.hasSlot("prefix")&&r("slot",{name:"prefix"}),r("span",{class:"element"},r("gov-icon",{slot:"right-icon",name:"chevron-down",class:"icon-arrow"}),r("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:e=>this.selectRef=e,"aria-disabled":g(this.disabled),"aria-activedescendant":this.wcagActiveDescendant,"aria-controls":this.wcagControls,"aria-required":g(this.required),"aria-invalid":g(this.invalid),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-owns":this.wcagOwns},r("slot",null))),this.h.hasSlot("sufix")&&r("slot",{name:"sufix"}))}onFocusHandler(e){this.focused=true;this.govFocus.emit({component:l.root,originalEvent:e,value:this.value})}onBlurHandler(e){this.focused=false;this.govBlur.emit({component:l.root,originalEvent:e,value:this.value})}onChangeHandler(e){this.value=e.target.value;e.stopPropagation();this.govChange.emit({component:l.root,originalEvent:e,value:this.value})}async setFocus(e){return this.selectRef.focus(e)}async setValue(e){this.value=e}async getRef(){return this.selectRef}async validateWcag(){d(this.wcagActiveDescendant,"wcag-active-descendant",l.root);d(this.wcagControls,"wcag-controls",l.root);d(this.wcagDescribedBy,"wcag-described-by",l.root);d(this.wcagOwns,"wcag-owns",l.root);h(this.identifier||this.selectId,this.wcagLabelledBy,l.root)}get host(){return this}static get watchers(){return{variant:["validateVariant"],size:["validateSize","watchDisabled"],disabled:["watchDisabled"],invalid:["watchDisabled"],value:["watchValue"]}}static get style(){return x}},[4,"gov-form-select",{value:[1537],identifier:[1],variant:[1],size:[1],name:[1],required:[4],disabled:[4],invalid:[4],wcagActiveDescendant:[1,"wcag-active-descendant"],wcagControls:[1,"wcag-controls"],wcagDescribedBy:[1,"wcag-described-by"],wcagLabelledBy:[1,"wcag-labelled-by"],wcagOwns:[1,"wcag-owns"],focused:[32],setFocus:[64],setValue:[64],getRef:[64],validateWcag:[64]}]);function b(){if(typeof customElements==="undefined"){return}const e=["gov-form-select","gov-icon"];e.forEach((e=>{switch(e){case"gov-form-select":if(!customElements.get(e)){customElements.define(e,w)}break;case"gov-icon":if(!customElements.get(e)){z()}break}}))}b();export{w as G,b as d};
|
|
2
|
+
//# sourceMappingURL=p-da3b225f.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["govFormSelectCss","GovFormSelect","proxyCustomElement","H","constructor","this","h","govHost","host","f","govForm","selectId","createID","validateVariant","newValue","validateProp","FormSelectVariants","FormSelectClass","root","validateSize","FormSelectSizes","watchDisabled","passControlAttrs","watchValue","markSelectedValue","passAttrToControl","size","toBoolAttr","disabled","invalid","componentWillLoad","variant","passAttrToLabel","String","required","componentDidRender","canValidateWcagOnRender","delay","validateWcag","querySelectorAll","forEach","option","value","setAttribute","removeAttribute","render","Host","class","hasSlot","name","slot","id","identifier","onFocus","onFocusHandler","bind","onChange","onChangeHandler","onBlur","onBlurHandler","ref","el","selectRef","toBoolAttrIfDefined","wcagActiveDescendant","wcagControls","wcagDescribedBy","wcagLabelledBy","wcagOwns","e","focused","govFocus","emit","component","originalEvent","govBlur","target","stopPropagation","govChange","setFocus","options","focus","setValue","getRef","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.scss?tag=gov-form-select","../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["/*\n * Select\n */\n\n@import \"../select/gov-form-select-core.scss\";\n\n$class: \".gov-form-select\";\n\n#{$class} {\n\t@extend %form-select-core;\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { govForm } from \"../../../helpers/Dom/form\"\nimport { GovForm } from \"../../../helpers/Dom/form.types\"\nimport { govHost, toBoolAttr, toBoolAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\nimport { validateWcagLabelFor, validateWcagRef } from \"../../../helpers/Validate/wcag\"\nimport { createID } from \"../../../utils/string.utils\"\nimport { delay } from \"../../../utils/utils\"\nimport {\n\tFormSelectClass,\n\tFormSelectSizes,\n\tFormSelectSizesType,\n\tFormSelectVariants,\n\tFormSelectVariantType,\n} from \"./constants\"\nimport { FormSelectEvent } from \"./gov-form-select.types\"\n\n@Component({\n\ttag: \"gov-form-select\",\n\tstyleUrl: \"gov-form-select.scss\",\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID(\"GovSelect\")\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({ reflect: true, mutable: true }) value: string\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Style variation of the form select.\n\t */\n\t@Prop() readonly variant?: FormSelectVariantType = 'secondary'\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = \"m\"\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a related component’s visually focused element.\n\t */\n\t@Prop({ attribute: \"wcag-active-descendant\" }) readonly wcagActiveDescendant: string\n\t/**\n\t * Use this prop to add an aria-controls attribute. Use the attribute to indicate the id of a component controlled by this component.\n\t */\n\t@Prop({ attribute: \"wcag-controls\" }) readonly wcagControls: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-described-by\" }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-owns\" }) readonly wcagOwns: string\n\t/**\n\t * Emitted when the select has focus.\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormSelectVariants, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch(\"value\")\n\twatchValue(): void {\n\t\tthis.markSelectedValue()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", \"select\")\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\n\t\tthis.markSelectedValue()\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\tprivate markSelectedValue() {\n\t\tthis.host.querySelectorAll(\"option\").forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.value === this.value) {\n\t\t\t\toption.setAttribute(\"selected\", \"selected\")\n\t\t\t} else {\n\t\t\t\toption.removeAttribute(\"selected\")\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size} variant={this.variant}>\n\t\t\t\t{this.h.hasSlot(\"prefix\") && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<gov-icon slot=\"right-icon\" name=\"chevron-down\"></gov-icon>\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-activedescendant={this.wcagActiveDescendant}\n\t\t\t\t\t\taria-controls={this.wcagControls}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</select>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot(\"sufix\") && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectElement> {\n\t\treturn this.selectRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagActiveDescendant, \"wcag-active-descendant\", FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagControls, \"wcag-controls\", FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"wcag-described-by\", FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, \"wcag-owns\", FormSelectClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.selectId, this.wcagLabelledBy, FormSelectClass.root)\n\t}\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"names":["govFormSelectCss","GovFormSelect","proxyCustomElement","H","constructor","this","h","govHost","host","f","govForm","selectId","createID","validateVariant","newValue","validateProp","FormSelectVariants","FormSelectClass","root","validateSize","FormSelectSizes","watchDisabled","passControlAttrs","watchValue","markSelectedValue","passAttrToControl","size","toBoolAttr","disabled","invalid","componentWillLoad","variant","passAttrToLabel","String","required","componentDidRender","canValidateWcagOnRender","delay","validateWcag","querySelectorAll","forEach","option","value","setAttribute","removeAttribute","render","Host","class","hasSlot","name","slot","id","identifier","onFocus","onFocusHandler","bind","onChange","onChangeHandler","onBlur","onBlurHandler","ref","el","selectRef","toBoolAttrIfDefined","wcagActiveDescendant","wcagControls","wcagDescribedBy","wcagLabelledBy","wcagOwns","e","focused","govFocus","emit","component","originalEvent","govBlur","target","stopPropagation","govChange","setFocus","options","focus","setValue","getRef","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.scss?tag=gov-form-select","../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["/*\n * Select\n */\n\n@import \"../select/gov-form-select-core.scss\";\n\n$class: \".gov-form-select\";\n\n#{$class} {\n\t@extend %form-select-core;\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { govForm } from \"../../../helpers/Dom/form\"\nimport { GovForm } from \"../../../helpers/Dom/form.types\"\nimport { govHost, toBoolAttr, toBoolAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\nimport { validateWcagLabelFor, validateWcagRef } from \"../../../helpers/Validate/wcag\"\nimport { createID } from \"../../../utils/string.utils\"\nimport { delay } from \"../../../utils/utils\"\nimport {\n\tFormSelectClass,\n\tFormSelectSizes,\n\tFormSelectSizesType,\n\tFormSelectVariants,\n\tFormSelectVariantType,\n} from \"./constants\"\nimport { FormSelectEvent } from \"./gov-form-select.types\"\n\n@Component({\n\ttag: \"gov-form-select\",\n\tstyleUrl: \"gov-form-select.scss\",\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID(\"GovSelect\")\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({ reflect: true, mutable: true }) value: string\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Style variation of the form select.\n\t */\n\t@Prop() readonly variant?: FormSelectVariantType = 'secondary'\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = \"m\"\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a related component’s visually focused element.\n\t */\n\t@Prop({ attribute: \"wcag-active-descendant\" }) readonly wcagActiveDescendant: string\n\t/**\n\t * Use this prop to add an aria-controls attribute. Use the attribute to indicate the id of a component controlled by this component.\n\t */\n\t@Prop({ attribute: \"wcag-controls\" }) readonly wcagControls: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-described-by\" }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-owns\" }) readonly wcagOwns: string\n\t/**\n\t * Emitted when the select has focus.\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormSelectVariants, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch(\"value\")\n\twatchValue(): void {\n\t\tthis.markSelectedValue()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", \"select\")\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\n\t\tthis.markSelectedValue()\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\tprivate markSelectedValue() {\n\t\tthis.host.querySelectorAll(\"option\").forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.value === this.value) {\n\t\t\t\toption.setAttribute(\"selected\", \"selected\")\n\t\t\t} else {\n\t\t\t\toption.removeAttribute(\"selected\")\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size} variant={this.variant}>\n\t\t\t\t{this.h.hasSlot(\"prefix\") && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<gov-icon slot=\"right-icon\" name=\"chevron-down\" class=\"icon-arrow\"></gov-icon>\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-activedescendant={this.wcagActiveDescendant}\n\t\t\t\t\t\taria-controls={this.wcagControls}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</select>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot(\"sufix\") && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectElement> {\n\t\treturn this.selectRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagActiveDescendant, \"wcag-active-descendant\", FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagControls, \"wcag-controls\", FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"wcag-described-by\", FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, \"wcag-owns\", FormSelectClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.selectId, this.wcagLabelledBy, FormSelectClass.root)\n\t}\n}\n"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as t,H as e,c as i,h as s,d as o}from"./p-80c0109d.js";import{a}from"./p-3f37ddb6.js";import{v as n}from"./p-26acf964.js";import{c as r}from"./p-24636c53.js";import{d as l,t as h,h as c}from"./p-03990da5.js";import{F as m,a as d,b as g}from"./p-17c1ffc1.js";import{d as u}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as t,H as e,c as i,h as s,d as o}from"./p-80c0109d.js";import{a}from"./p-3f37ddb6.js";import{v as n}from"./p-26acf964.js";import{c as r}from"./p-24636c53.js";import{d as l,t as h,h as c}from"./p-03990da5.js";import{F as m,a as d,b as g}from"./p-17c1ffc1.js";import{d as u}from"./p-a6915747.js";import{d as p}from"./p-35f6490a.js";const v='.gov-form-autocomplete__list{margin:0;padding:0}.gov-form-autocomplete__list>.gov-form-autocomplete__item{margin:0;padding:0;background:none}.gov-form-autocomplete__list>.gov-form-autocomplete__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-autocomplete{position:relative;display:block;width:100%}.gov-form-autocomplete__list{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);position:absolute;top:100%;right:0;left:0;z-index:5;max-height:14.0625rem;margin-top:0.5rem;border:var(--gov-autocomplete-item-hover, 0.0625rem solid var(--gov-color-secondary-500));border-radius:var(--gov-border-radius, 0.1875rem);background:var(--gov-autocomplete-bg, var(--gov-color-neutral-white));overflow-x:hidden;overflow-y:auto;overscroll-behavior:none}.gov-form-autocomplete__list>.gov-form-autocomplete__item{padding:0.75rem 0.5rem;cursor:pointer}.gov-form-autocomplete__item--empty,.gov-form-autocomplete__item--loading{padding:0.75rem 0.5rem;color:var(--gov-autocomplete-item-disable-color, var(--gov-color-secondary-600))}.gov-form-autocomplete__item--empty .gov-icon,.gov-form-autocomplete__item--loading .gov-icon{height:12px}.gov-form-autocomplete__list:empty{display:none}.gov-form-autocomplete__item[aria-selected=""],.gov-form-autocomplete__item[aria-selected=true i],.gov-form-autocomplete__item[aria-selected="1"]{background:var(--gov-autocomplete-item-select, var(--gov-color-secondary-400))}@media not all and (pointer: coarse){.gov-form-autocomplete__item:hover{background:var(--gov-autocomplete-item-hover, var(--gov-color-primary-100))}}';const f=t(class t extends e{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.govSelect=i(this,"gov-select",7);this.templateResolver=t=>t[this.nameKey];this.value="";this.identifier=undefined;this.variant=undefined;this.success=undefined;this.size="m";this.nameKey="name";this.name=undefined;this.required=false;this.disabled=undefined;this.placeholder=undefined;this.readonly=undefined;this.invalid=undefined;this.minlength=3;this.maxlength=undefined;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.messageLoading="Načítám...";this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagOwns=undefined;this.focused=undefined;this.processing=false;this.arrowCounter=-1;this.list=[];this.listBoxId=r("GovListBox")}validateVariant(t){n(d,t,m.root)}validateSize(t){n(g,t,m.root)}onArrowUp(){if(this.arrowCounter>0){this.arrowCounter=this.arrowCounter-1;this.moveToView().finally()}}onArrowDown(){if(this.arrowCounter<this.list.length-1){this.arrowCounter=this.arrowCounter+1;this.moveToView().finally()}}async moveToView(){await l(200);const t=this.listRef.offsetHeight;const e=this.listRef.querySelector('li[aria-selected="true"]');if(e&&t){const t=e.offsetTop;this.listRef.scrollTo({top:t,behavior:"smooth"})}}doSearch(){if(Number.isInteger(this.minlength)&&this.isValueAccepted===false&&this.minlength){this.list=[];this.arrowCounter=-1;this.processing=false;return}if(this.searchCallback){this.processing=true;this.searchCallback(this.value).then((t=>this.list=t)).catch((()=>this.list=[])).finally((()=>{this.arrowCounter=-1;this.processing=false}))}}get isValueAccepted(){if(typeof this.value==="string"){return this.value.length>=this.minlength}else{return false}}componentWillLoad(){this.validateVariant(this.variant);this.validateSize(this.size)}render(){return s(o,{class:m.root,size:this.size,variant:this.variant},s("gov-form-input",{placeholder:this.placeholder,name:this.name,disabled:this.disabled,readonly:this.readonly,autocomplete:false,size:this.size,variant:this.variant,required:this.required,invalid:this.invalid,role:"searchbox",value:this.value,minlength:this.minlength,maxlength:this.maxlength,"on-gov-input":h(this.onInputHandler.bind(this),200),"on-gov-keyup":this.onKeyUpHandler.bind(this),"on-gov-keydown":this.onKeyDownHandler.bind(this),"on-gov-focus":this.onFocusHandler.bind(this),"on-gov-blur":this.onBlurHandler.bind(this),wcagAutocomplete:"list",wcagDescribedBy:this.wcagDescribedBy,wcagLabelledBy:this.wcagLabelledBy,wcagOwns:[this.listBoxId,this.wcagOwns].join(" "),wcagExpanded:this.list.length&&this.focused,ref:t=>this.inputRef=t},s("slot",{slot:"right-icon",name:"right-icon"})),s("ul",{class:m.list,role:"listbox",id:this.listBoxId,ref:t=>this.listRef=t},this.focused&&this.list.length===0&&this.processing===false&&this.isValueAccepted&&this.messageEmpty?s("li",{class:m.empty},this.messageEmpty):null,this.focused&&this.processing===true&&this.isValueAccepted?s("li",{class:m.loading},s("gov-icon",{name:"loader",class:"gov-spin-animation"})," ",this.messageLoading):null,this.list.map(((t,e)=>{const i=this.arrowCounter===e;return s("li",{class:m.item,innerHTML:this.templateResolver(t,i),role:"option","aria-posinset":e,tabindex:i?0:-1,"aria-setsize":this.list.length,onClick:t=>this.onSelectHandler(t,e),"aria-selected":a(i)})}))))}onFocusHandler(t){this.focused=true;this.arrowCounter=-1;if((this.value||this.minlength===0)&&this.searchCallback){this.doSearch()}t.stopPropagation();this.govFocus.emit({originalEvent:t,component:m.root,value:this.value,selected:null})}onBlurHandler(t){this.focused=false;setTimeout((()=>this.list=[]),200);this.arrowCounter=-1;t.stopPropagation();this.govBlur.emit({originalEvent:t,component:m.root,value:this.value,selected:null})}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit({originalEvent:t,component:m.root,value:this.value,selected:null});this.doSearch()}onSelectHandler(t,e=-1){let i=null;if(e>-1){i=this.list[e]}else if(c(this.arrowCounter,this.list)){i=this.list[this.arrowCounter]}if(i){this.govSelect.emit({component:m.root,value:this.value,selected:i,originalEvent:t});this.list=[];if(c(this.nameKey,i)&&typeof i[this.nameKey]==="string"){this.value=i[this.nameKey]}}}onKeyUpHandler(t){const e=t.detail.originalEvent;t.stopPropagation();e.stopPropagation();if(e.keyCode===38)this.onArrowUp();else if(e.keyCode===40)this.onArrowDown();else if(e.keyCode===13){t.preventDefault();e.preventDefault();this.onSelectHandler(t)}}onKeyDownHandler(t){const e=t.detail.originalEvent;t.stopPropagation();e.stopPropagation();if(e.keyCode===13){t.preventDefault();e.preventDefault()}}async setFocus(t){return this.inputRef.focus(t)}async setOptions(t){this.list=Array.isArray(t)?t:[];this.arrowCounter=-1}async clearValue(){this.value="";this.inputRef.value="";await this.inputRef.clearValue()}async setProcessing(t){this.processing=t}async setSearchCallback(t){this.searchCallback=t}async setTemplateResolver(t){this.templateResolver=t}get host(){return this}static get watchers(){return{variant:["validateVariant"],size:["validateSize"]}}static get style(){return v}},[4,"gov-form-autocomplete",{value:[1537],identifier:[1],variant:[1],success:[4],size:[1],nameKey:[1,"name-key"],name:[1],required:[4],disabled:[4],placeholder:[1],readonly:[4],invalid:[4],minlength:[2],maxlength:[2],messageEmpty:[1,"message-empty"],messageLoading:[1,"message-loading"],wcagDescribedBy:[1,"wcag-described-by"],wcagLabelledBy:[1,"wcag-labelled-by"],wcagOwns:[1,"wcag-owns"],focused:[32],processing:[32],arrowCounter:[32],list:[32],setFocus:[64],setOptions:[64],clearValue:[64],setProcessing:[64],setSearchCallback:[64],setTemplateResolver:[64]}]);function y(){if(typeof customElements==="undefined"){return}const t=["gov-form-autocomplete","gov-form-input","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-autocomplete":if(!customElements.get(t)){customElements.define(t,f)}break;case"gov-form-input":if(!customElements.get(t)){u()}break;case"gov-icon":if(!customElements.get(t)){p()}break}}))}y();export{f as G,y as d};
|
|
2
|
+
//# sourceMappingURL=p-ee60cdd1.js.map
|
package/dist/core/core.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,b as a}from"./p-10cbc3fe.js";export{s as setNonce}from"./p-10cbc3fe.js";const l=()=>{const a=import.meta.url;const l={};if(a!==""){l.resourcesUrl=new URL(".",a).href}return e(l)};l().then((e=>a(JSON.parse('[["p-13624a77",[[4,"gov-form-file",{"expanded":[4],"required":[4],"disabled":[4],"displayAttachments":[4,"display-attachments"],"name":[1],"accept":[1],"multiple":[4],"maxFileSize":[2,"max-file-size"],"identifier":[1],"invalid":[4],"errorSize":[1,"error-size"],"errorAccept":[1,"error-accept"],"attachmentsLabel":[1,"attachments-label"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagRemoveLabel":[1,"wcag-remove-label"],"wcagAttachmentsLabel":[1,"wcag-attachments-label"],"files":[32],"getRef":[64],"getAreaRef":[64],"reset":[64],"validateWcag":[64]}]]],["p-48cfc1c6",[[4,"gov-form-multi-select",{"identifier":[1],"placeholder":[1],"variant":[1],"size":[1],"name":[1],"required":[4],"disabled":[4],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"value":[32],"selectedOptions":[32],"setFocus":[64],"setValue":[64],"getRef":[64],"validateWcag":[64]}]]],["p-82f64673",[[4,"gov-modal",{"open":[1028],"label":[1],"role":[1],"labelTag":[1,"label-tag"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagCloseLabel":[1,"wcag-close-label"],"wcagCloseLabelledBy":[1,"wcag-close-labelled-by"],"show":[64],"hide":[64],"validateWcag":[64]}]]],["p-42c1935f",[[0,"gov-pagination",{"type":[1],"current":[2],"total":[2],"inverse":[4],"size":[1],"variant":[1],"pageSize":[2,"page-size"],"maxPages":[2,"max-pages"],"link":[1],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagSelectLabel":[1,"wcag-select-label"],"wcagPageLabel":[1,"wcag-page-label"],"pagination":[32],"validateWcag":[64]}]]],["p-22a86871",[[4,"gov-prompt",{"open":[1028],"label":[1],"role":[1],"labelTag":[1,"label-tag"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagCloseLabel":[1,"wcag-close-label"],"wcagCloseLabelledBy":[1,"wcag-close-labelled-by"],"show":[64],"hide":[64],"validateWcag":[64]}]]],["p-0c1697ce",[[4,"gov-tabs",{"type":[1],"variant":[1],"orientation":[1],"wcagLabel":[1,"wcag-label"],"wcagSelectLabel":[1,"wcag-select-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"controller":[32],"focusIndex":[32],"compactControls":[32],"refresh":[64],"currentTab":[64],"setActiveTab":[64],"validateWcag":[64]}]]],["p-dfc080f2",[[4,"gov-alert",{"headline":[1],"variant":[1],"inverse":[4],"wcagCloseLabel":[1,"wcag-close-label"],"wcagToggleLabel":[1,"wcag-toggle-label"],"closable":[4],"toggleContent":[32],"validateWcag":[64]}]]],["p-aa4e716e",[[4,"gov-loading",{"loading":[4]}]]],["p-49926f53",[[4,"gov-side-nav-item",{"inverse":[4],"compact":[4],"identifier":[1],"count":[4],"label":[1],"disabled":[4],"href":[1],"isExpanded":[4,"is-expanded"],"isExpandedState":[32],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-3858e2c8",[[4,"gov-toast",{"variant":[1],"gravity":[1],"position":[1],"type":[1],"time":[2],"closeLabel":[1,"close-label"],"wcagCloseLabel":[1,"wcag-close-label"],"destroy":[64]}]]],["p-74f0be51",[[4,"gov-accordion-item",{"variant":[1],"identifier":[1],"size":[1],"disabled":[4],"isExpanded":[1028,"is-expanded"],"isExpandedState":[32],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-3d0ab343",[[4,"gov-card",{"promotion":[4],"label":[1],"collapsible":[4],"expanded":[4],"headlineTag":[1,"headline-tag"],"wcagTriggerLabel":[1,"wcag-trigger-label"],"wcagTriggerLabelledBy":[1,"wcag-trigger-labelled-by"],"isExpanded":[32],"open":[64],"close":[64],"validateWcag":[64]}]]],["p-f0a5847a",[[4,"gov-form-checkbox",{"value":[1],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"noLabel":[4,"no-label"],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-74ce7780",[[4,"gov-tile",{"href":[1],"target":[1],"getTriggerRef":[64]}]]],["p-ea4459ae",[[4,"gov-wizard-item",{"variant":[1],"size":[1],"identifier":[1],"collapsible":[4],"annotation":[1],"label":[1],"disabled":[4],"isExpanded":[1028,"is-expanded"],"labelTag":[1,"label-tag"],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-87aca157",[[4,"gov-accordion",{"size":[1],"variant":[1],"noBorder":[4,"no-border"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-801f1147",[[0,"gov-app"]]],["p-18ef9623",[[4,"gov-breadcrumbs",{"collapsible":[4],"isExpanded":[4,"is-expanded"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labeled-by"],"validateWcag":[64]}]]],["p-1c62f175",[[4,"gov-container",{"slottedChildren":[64]}]]],["p-89921159",[[4,"gov-control-group",{"variant":[1],"noBorder":[4,"no-border"]}]]],["p-041d30b1",[[4,"gov-cookiebar"]]],["p-0c769f1a",[[4,"gov-dropdown",{"open":[1028],"position":[1],"getState":[64],"setOpen":[64]}]]],["p-1da9f871",[[4,"gov-empty"]]],["p-88a78167",[[4,"gov-error-code"]]],["p-ab426e50",[[4,"gov-form-control",{"gap":[1],"identifier":[1],"invalid":[4],"disabled":[4],"success":[4],"fieldset":[4],"size":[1]}]]],["p-06699657",[[4,"gov-form-group",{"gap":[1],"orientation":[1]}]]],["p-bbcbe1cc",[[4,"gov-form-label",{"identifier":[1],"size":[1],"required":[4],"legend":[4]}]]],["p-da762184",[[4,"gov-form-password-power",{"power":[2]}]]],["p-fc853777",[[4,"gov-form-radio",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-5e23a6ba",[[4,"gov-form-search",{"variant":[1]}]]],["p-e769f3ee",[[4,"gov-form-switch",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-0eb11cfc",[[4,"gov-grid",{"alignX":[1,"align-x"],"alignY":[1,"align-y"]}]]],["p-739dd451",[[4,"gov-grid-item",{"size":[1],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]}]]],["p-6f43bd00",[[4,"gov-layout",{"type":[1],"variant":[1],"inverse":[4]}]]],["p-93042b25",[[4,"gov-layout-column"]]],["p-5316e768",[[4,"gov-message",{"variant":[1]}]]],["p-70140f70",[[4,"gov-nav",{"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-33895061",[[4,"gov-nav-item",{"href":[1],"isExpandedState":[32]}]]],["p-a5d00433",[[4,"gov-side-nav",{"inverse":[4],"compact":[4],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-33bf5974",[[0,"gov-skeleton",{"variant":[1],"count":[2],"shape":[1],"width":[1],"height":[1],"animation":[1],"wcagLabel":[1,"wcag-label"],"validateWcag":[64]}]]],["p-88010439",[[0,"gov-spacer",{"size":[1],"breakpoint":[1]}]]],["p-e1780dba",[[4,"gov-statsbar",{"iconPosition":[1,"icon-position"],"variant":[1]}]]],["p-c81d62db",[[4,"gov-statsbar-item",{"iconPosition":[1,"icon-position"]}]]],["p-2fe9d3ea",[[4,"gov-stepper",{"size":[1]}]]],["p-64f7e661",[[4,"gov-stepper-item",{"variant":[1],"size":[1],"identifier":[1],"label":[1],"annotation":[1],"triggerTag":[1,"trigger-tag"],"isExpandedState":[32],"currentState":[64]}]]],["p-9633e7b5",[[4,"gov-tabs-item",{"identifier":[1],"triggerIdentifier":[1,"trigger-identifier"],"label":[1],"default":[4],"isActive":[32],"getIdentifier":[64],"getTriggerIdentifier":[64],"setActiveStatus":[64]}]]],["p-228da18e",[[4,"gov-tiles",{"columns":[2],"noBorder":[4,"no-border"]}]]],["p-3b9df792",[[4,"gov-tooltip",{"variant":[1],"size":[1],"position":[1],"message":[1],"identifier":[1],"icon":[4],"show":[64],"hide":[64]}]]],["p-3e5432d7",[[4,"gov-tooltip-content",{"isVisible":[4,"is-visible"]}]]],["p-bd1cb5bd",[[4,"gov-wizard",{"size":[1],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-4df62a13",[[0,"gov-icon",{"name":[1],"type":[1],"iconData":[32],"visible":[32],"error":[32]}]]],["p-23385300",[[4,"gov-form-input",{"value":[1537],"identifier":[1],"variant":[1],"success":[4],"size":[1],"name":[1],"multiline":[4],"rows":[2],"cols":[2],"required":[4],"disabled":[4],"placeholder":[1],"readonly":[4],"minlength":[2],"maxlength":[2],"min":[8],"max":[8],"autocomplete":[4],"autocorrect":[4],"type":[1],"inputType":[1,"input-type"],"role":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"wcagAutocomplete":[1,"wcag-autocomplete"],"wcagExpanded":[4,"wcag-expanded"],"focused":[32],"setFocus":[64],"setValue":[64],"clearValue":[64],"getRef":[64],"validateWcag":[64]}]]],["p-ae04e58f",[[4,"gov-form-autocomplete",{"value":[1537],"identifier":[1],"variant":[1],"success":[4],"size":[1],"nameKey":[1,"name-key"],"name":[1],"required":[4],"disabled":[4],"placeholder":[1],"readonly":[4],"invalid":[4],"minlength":[2],"maxlength":[2],"messageEmpty":[1,"message-empty"],"messageLoading":[1,"message-loading"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"processing":[32],"arrowCounter":[32],"list":[32],"setFocus":[64],"setOptions":[64],"clearValue":[64],"setProcessing":[64],"setSearchCallback":[64],"setTemplateResolver":[64]}]]],["p-81643870",[[4,"gov-form-select",{"value":[1537],"identifier":[1],"variant":[1],"size":[1],"name":[1],"required":[4],"disabled":[4],"invalid":[4],"wcagActiveDescendant":[1,"wcag-active-descendant"],"wcagControls":[1,"wcag-controls"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"setFocus":[64],"setValue":[64],"getRef":[64],"validateWcag":[64]}]]],["p-accf8575",[[4,"gov-badge",{"inverse":[4],"disabled":[4],"href":[1],"target":[1],"size":[1],"tag":[1],"variant":[1],"wcagLabel":[1,"wcag-label"],"getTriggerRef":[64]}]]],["p-9d72d80b",[[4,"gov-attachments-item",{"wcagRemoveLabel":[1,"wcag-remove-label"],"wcagRemoveLabelledBy":[1,"wcag-remove-labelled-by"],"validateWcag":[64]}],[4,"gov-attachments",{"label":[1],"wcagLabel":[1,"wcag-label"],"validateWcag":[64]}],[4,"gov-form-message",{"variant":[1],"identifier":[64]}]]],["p-41e88980",[[0,"gov-backdrop",{"inverse":[4],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-bfb4d904",[[4,"gov-button",{"variant":[513],"size":[513],"type":[513],"expanded":[4],"inverse":[4],"name":[1],"disabled":[516],"nativeType":[1,"native-type"],"href":[1],"target":[1],"download":[4],"hreflang":[1],"referrerpolicy":[1],"rel":[1],"loading":[1],"focusable":[4],"identifier":[1],"wcagActiveDescendant":[1,"wcag-active-descendant"],"wcagControls":[1,"wcag-controls"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagDescription":[1,"wcag-description"],"wcagDetails":[1,"wcag-details"],"wcagExpanded":[4,"wcag-expanded"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"wcagHasPopup":[1,"wcag-has-popup"],"wcagPressed":[1,"wcag-pressed"],"wcagCurrent":[1,"wcag-current"],"isPressed":[32],"setFocus":[64],"getTriggerRef":[64],"validateWcag":[64]}]]]]'),e)));
|
|
1
|
+
import{p as e,b as a}from"./p-10cbc3fe.js";export{s as setNonce}from"./p-10cbc3fe.js";const l=()=>{const a=import.meta.url;const l={};if(a!==""){l.resourcesUrl=new URL(".",a).href}return e(l)};l().then((e=>a(JSON.parse('[["p-13624a77",[[4,"gov-form-file",{"expanded":[4],"required":[4],"disabled":[4],"displayAttachments":[4,"display-attachments"],"name":[1],"accept":[1],"multiple":[4],"maxFileSize":[2,"max-file-size"],"identifier":[1],"invalid":[4],"errorSize":[1,"error-size"],"errorAccept":[1,"error-accept"],"attachmentsLabel":[1,"attachments-label"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagRemoveLabel":[1,"wcag-remove-label"],"wcagAttachmentsLabel":[1,"wcag-attachments-label"],"files":[32],"getRef":[64],"getAreaRef":[64],"reset":[64],"validateWcag":[64]}]]],["p-a85f4a62",[[4,"gov-form-multi-select",{"identifier":[1],"placeholder":[1],"variant":[1],"size":[1],"name":[1],"required":[4],"disabled":[4],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"value":[32],"selectedOptions":[32],"setFocus":[64],"setValue":[64],"getRef":[64],"validateWcag":[64]}]]],["p-667dc3de",[[4,"gov-modal",{"open":[1028],"label":[1],"role":[1],"labelTag":[1,"label-tag"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagCloseLabel":[1,"wcag-close-label"],"wcagCloseLabelledBy":[1,"wcag-close-labelled-by"],"show":[64],"hide":[64],"validateWcag":[64]}]]],["p-42c1935f",[[0,"gov-pagination",{"type":[1],"current":[2],"total":[2],"inverse":[4],"size":[1],"variant":[1],"pageSize":[2,"page-size"],"maxPages":[2,"max-pages"],"link":[1],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagSelectLabel":[1,"wcag-select-label"],"wcagPageLabel":[1,"wcag-page-label"],"pagination":[32],"validateWcag":[64]}]]],["p-cacd0fed",[[4,"gov-prompt",{"open":[1028],"label":[1],"role":[1],"labelTag":[1,"label-tag"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagCloseLabel":[1,"wcag-close-label"],"wcagCloseLabelledBy":[1,"wcag-close-labelled-by"],"show":[64],"hide":[64],"validateWcag":[64]}]]],["p-0c1697ce",[[4,"gov-tabs",{"type":[1],"variant":[1],"orientation":[1],"wcagLabel":[1,"wcag-label"],"wcagSelectLabel":[1,"wcag-select-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"controller":[32],"focusIndex":[32],"compactControls":[32],"refresh":[64],"currentTab":[64],"setActiveTab":[64],"validateWcag":[64]}]]],["p-dfc080f2",[[4,"gov-alert",{"headline":[1],"variant":[1],"inverse":[4],"wcagCloseLabel":[1,"wcag-close-label"],"wcagToggleLabel":[1,"wcag-toggle-label"],"closable":[4],"toggleContent":[32],"validateWcag":[64]}]]],["p-2bb9f781",[[4,"gov-loading"]]],["p-49926f53",[[4,"gov-side-nav-item",{"inverse":[4],"compact":[4],"identifier":[1],"count":[4],"label":[1],"disabled":[4],"href":[1],"isExpanded":[4,"is-expanded"],"isExpandedState":[32],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-dd39ede4",[[4,"gov-toast",{"variant":[1],"gravity":[1],"position":[1],"type":[1],"time":[2],"closeLabel":[1,"close-label"],"wcagCloseLabel":[1,"wcag-close-label"],"destroy":[64]}]]],["p-de5c9181",[[4,"gov-accordion-item",{"variant":[1],"identifier":[1],"size":[1],"disabled":[4],"isExpanded":[1028,"is-expanded"],"isExpandedState":[32],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-3d0ab343",[[4,"gov-card",{"promotion":[4],"label":[1],"collapsible":[4],"expanded":[4],"headlineTag":[1,"headline-tag"],"wcagTriggerLabel":[1,"wcag-trigger-label"],"wcagTriggerLabelledBy":[1,"wcag-trigger-labelled-by"],"isExpanded":[32],"open":[64],"close":[64],"validateWcag":[64]}]]],["p-85258200",[[4,"gov-form-checkbox",{"value":[1],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"noLabel":[4,"no-label"],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-74ce7780",[[4,"gov-tile",{"href":[1],"target":[1],"getTriggerRef":[64]}]]],["p-f8252fea",[[4,"gov-wizard-item",{"variant":[1],"size":[1],"identifier":[1],"collapsible":[4],"annotation":[1],"label":[1],"disabled":[4],"isExpanded":[1028,"is-expanded"],"labelTag":[1,"label-tag"],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-87aca157",[[4,"gov-accordion",{"size":[1],"variant":[1],"noBorder":[4,"no-border"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-4c79a97a",[[0,"gov-app"]]],["p-18ef9623",[[4,"gov-breadcrumbs",{"collapsible":[4],"isExpanded":[4,"is-expanded"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labeled-by"],"validateWcag":[64]}]]],["p-1c62f175",[[4,"gov-container",{"slottedChildren":[64]}]]],["p-89921159",[[4,"gov-control-group",{"variant":[1],"noBorder":[4,"no-border"]}]]],["p-041d30b1",[[4,"gov-cookiebar"]]],["p-0c769f1a",[[4,"gov-dropdown",{"open":[1028],"position":[1],"getState":[64],"setOpen":[64]}]]],["p-1da9f871",[[4,"gov-empty"]]],["p-88a78167",[[4,"gov-error-code"]]],["p-ab426e50",[[4,"gov-form-control",{"gap":[1],"identifier":[1],"invalid":[4],"disabled":[4],"success":[4],"fieldset":[4],"size":[1]}]]],["p-06699657",[[4,"gov-form-group",{"gap":[1],"orientation":[1]}]]],["p-bbcbe1cc",[[4,"gov-form-label",{"identifier":[1],"size":[1],"required":[4],"legend":[4]}]]],["p-da762184",[[4,"gov-form-password-power",{"power":[2]}]]],["p-9bfab069",[[4,"gov-form-radio",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-5e23a6ba",[[4,"gov-form-search",{"variant":[1]}]]],["p-8fce08d1",[[4,"gov-form-switch",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-0eb11cfc",[[4,"gov-grid",{"alignX":[1,"align-x"],"alignY":[1,"align-y"]}]]],["p-739dd451",[[4,"gov-grid-item",{"size":[1],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]}]]],["p-6f43bd00",[[4,"gov-layout",{"type":[1],"variant":[1],"inverse":[4]}]]],["p-93042b25",[[4,"gov-layout-column"]]],["p-5316e768",[[4,"gov-message",{"variant":[1]}]]],["p-70140f70",[[4,"gov-nav",{"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-33895061",[[4,"gov-nav-item",{"href":[1],"isExpandedState":[32]}]]],["p-a5d00433",[[4,"gov-side-nav",{"inverse":[4],"compact":[4],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-33bf5974",[[0,"gov-skeleton",{"variant":[1],"count":[2],"shape":[1],"width":[1],"height":[1],"animation":[1],"wcagLabel":[1,"wcag-label"],"validateWcag":[64]}]]],["p-88010439",[[0,"gov-spacer",{"size":[1],"breakpoint":[1]}]]],["p-e1780dba",[[4,"gov-statsbar",{"iconPosition":[1,"icon-position"],"variant":[1]}]]],["p-c81d62db",[[4,"gov-statsbar-item",{"iconPosition":[1,"icon-position"]}]]],["p-2fe9d3ea",[[4,"gov-stepper",{"size":[1]}]]],["p-2944bf77",[[4,"gov-stepper-item",{"variant":[1],"size":[1],"identifier":[1],"label":[1],"annotation":[1],"triggerTag":[1,"trigger-tag"],"isExpandedState":[32],"currentState":[64]}]]],["p-9633e7b5",[[4,"gov-tabs-item",{"identifier":[1],"triggerIdentifier":[1,"trigger-identifier"],"label":[1],"default":[4],"isActive":[32],"getIdentifier":[64],"getTriggerIdentifier":[64],"setActiveStatus":[64]}]]],["p-228da18e",[[4,"gov-tiles",{"columns":[2],"noBorder":[4,"no-border"]}]]],["p-3b9df792",[[4,"gov-tooltip",{"variant":[1],"size":[1],"position":[1],"message":[1],"identifier":[1],"icon":[4],"show":[64],"hide":[64]}]]],["p-3e5432d7",[[4,"gov-tooltip-content",{"isVisible":[4,"is-visible"]}]]],["p-bd1cb5bd",[[4,"gov-wizard",{"size":[1],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-fb99f144",[[0,"gov-icon",{"name":[1],"type":[1],"iconData":[32],"visible":[32],"error":[32]}]]],["p-69f944d1",[[4,"gov-form-input",{"value":[1537],"identifier":[1],"variant":[1],"success":[4],"size":[1],"name":[1],"multiline":[4],"rows":[2],"cols":[2],"required":[4],"disabled":[4],"placeholder":[1],"readonly":[4],"minlength":[2],"maxlength":[2],"min":[8],"max":[8],"autocomplete":[4],"autocorrect":[4],"type":[1],"inputType":[1,"input-type"],"role":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"wcagAutocomplete":[1,"wcag-autocomplete"],"wcagExpanded":[4,"wcag-expanded"],"focused":[32],"setFocus":[64],"setValue":[64],"clearValue":[64],"getRef":[64],"validateWcag":[64]}]]],["p-ae04e58f",[[4,"gov-form-autocomplete",{"value":[1537],"identifier":[1],"variant":[1],"success":[4],"size":[1],"nameKey":[1,"name-key"],"name":[1],"required":[4],"disabled":[4],"placeholder":[1],"readonly":[4],"invalid":[4],"minlength":[2],"maxlength":[2],"messageEmpty":[1,"message-empty"],"messageLoading":[1,"message-loading"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"processing":[32],"arrowCounter":[32],"list":[32],"setFocus":[64],"setOptions":[64],"clearValue":[64],"setProcessing":[64],"setSearchCallback":[64],"setTemplateResolver":[64]}]]],["p-d4cfa93a",[[4,"gov-form-select",{"value":[1537],"identifier":[1],"variant":[1],"size":[1],"name":[1],"required":[4],"disabled":[4],"invalid":[4],"wcagActiveDescendant":[1,"wcag-active-descendant"],"wcagControls":[1,"wcag-controls"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"setFocus":[64],"setValue":[64],"getRef":[64],"validateWcag":[64]}]]],["p-af646ce2",[[4,"gov-badge",{"inverse":[4],"disabled":[4],"href":[1],"target":[1],"size":[1],"tag":[1],"variant":[1],"wcagLabel":[1,"wcag-label"],"getTriggerRef":[64]}]]],["p-9d72d80b",[[4,"gov-attachments-item",{"wcagRemoveLabel":[1,"wcag-remove-label"],"wcagRemoveLabelledBy":[1,"wcag-remove-labelled-by"],"validateWcag":[64]}],[4,"gov-attachments",{"label":[1],"wcagLabel":[1,"wcag-label"],"validateWcag":[64]}],[4,"gov-form-message",{"variant":[1],"identifier":[64]}]]],["p-41e88980",[[0,"gov-backdrop",{"inverse":[4],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-6a65af35",[[4,"gov-button",{"variant":[513],"size":[513],"type":[513],"expanded":[4],"inverse":[4],"name":[1],"disabled":[516],"nativeType":[1,"native-type"],"href":[1],"target":[1],"download":[4],"hreflang":[1],"referrerpolicy":[1],"rel":[1],"loading":[1],"focusable":[4],"identifier":[1],"wcagActiveDescendant":[1,"wcag-active-descendant"],"wcagControls":[1,"wcag-controls"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagDescription":[1,"wcag-description"],"wcagDetails":[1,"wcag-details"],"wcagExpanded":[4,"wcag-expanded"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"wcagHasPopup":[1,"wcag-has-popup"],"wcagPressed":[1,"wcag-pressed"],"wcagCurrent":[1,"wcag-current"],"isPressed":[32],"setFocus":[64],"getTriggerRef":[64],"validateWcag":[64]}]]]]'),e)));
|
|
2
2
|
//# sourceMappingURL=core.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","JSON","parse"],"sources":["../../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.2.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"sFAKA,MAAMA,EAAe,KAyBjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACnBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACrD,CACI,OAAOC,EAAeJ,EAAK,EC/B/BH,IAAeQ,MAAKC,GAEXC,EAAcC,KAAAC,MAAA,
|
|
1
|
+
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","JSON","parse"],"sources":["../../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.2.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"sFAKA,MAAMA,EAAe,KAyBjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACnBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACrD,CACI,OAAOC,EAAeJ,EAAK,EC/B/BH,IAAeQ,MAAKC,GAEXC,EAAcC,KAAAC,MAAA,m5VAAuCH"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,c as t,h as r,H as o,g as i}from"./p-10cbc3fe.js";import{a}from"./p-561fa17b.js";import{v as s}from"./p-26acf964.js";import{S as p,c as g}from"./p-9144dde1.js";import{c as n}from"./p-24636c53.js";import{g as v,p as c}from"./p-3f37ddb6.js";import"./p-ff7365ae.js";import"./p-55500e5a.js";import"./p-03990da5.js";const m='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-stepper-item{position:relative;display:block;width:100%}.gov-stepper-item__header{position:relative;width:100%}.gov-stepper-item__arrow{flex:0 0 auto;width:0.75rem;height:0.75rem}.gov-stepper-item__title{margin:0;padding:0;font-family:var(--gov-font-family, "Roboto", sans-serif);font-weight:400;box-sizing:border-box;display:flex;gap:1rem;align-items:baseline}.gov-stepper-item__prefix{display:flex;flex:0 0 auto;justify-content:center;align-items:center;border-radius:50%;text-align:center}.gov-stepper-item__prefix .gov-icon{width:45%;height:45%}.gov-stepper-item__prefix span[slot=prefix]{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.gov-stepper-item__name{display:flex;flex-direction:column}.gov-stepper-item__label{display:flex;gap:0.5rem;align-items:center}.gov-stepper-item__annot{color:var(--gov-color-secondary)}.gov-stepper-item__content>*:last-child{margin-bottom:0}.gov-stepper-item[variant=primary] .gov-stepper-item__header{color:var(--gov-wizard-primary-color, var(--gov-color-primary-800))}.gov-stepper-item[variant=primary] .gov-stepper-item__prefix{background:var(--gov-wizard-primary-indicator-bg, var(--gov-color-primary-300));color:var(--gov-wizard-primary-indicator-color, var(--gov-color-primary-800))}.gov-stepper-item[variant=secondary] .gov-stepper-item__header{color:var(--gov-wizard-secondary-color, var(--gov-color-secondary-700))}.gov-stepper-item[variant=secondary] .gov-stepper-item__prefix{background:var(--gov-wizard-secondary-indicator-bg, var(--gov-color-secondary-400));color:var(--gov-wizard-secondary-indicator-color, var(--gov-color-secondary-700))}.gov-stepper-item[variant=success] .gov-stepper-item__header{color:var(--gov-wizard-success-color, var(--gov-color-success-500))}.gov-stepper-item[variant=success] .gov-stepper-item__prefix{background:var(--gov-wizard-success-indicator-bg, var(--gov-color-success));color:var(--gov-wizard-success-indicator-color, var(--gov-color-neutral-white))}.gov-stepper-item[variant=error] .gov-stepper-item__header{color:var(--gov-wizard-error-color, var(--gov-color-error-500))}.gov-stepper-item[variant=error] .gov-stepper-item__prefix{background:var(--gov-wizard-error-indicator-bg, var(--gov-color-error));color:var(--gov-wizard-error-indicator-color, var(--gov-color-neutral-white))}.gov-stepper-item[variant=warning] .gov-stepper-item__header{color:var(--gov-wizard-warning-color, var(--gov-color-warning-500))}.gov-stepper-item[variant=warning] .gov-stepper-item__prefix{background:var(--gov-wizard-warning-indicator-bg, var(--gov-color-warning));color:var(--gov-wizard-warning-indicator-color, var(--gov-color-neutral-white))}.gov-stepper-item::before{content:"";position:absolute;display:block;width:0.125rem}.gov-stepper-item:last-child::before{content:none}.gov-stepper-item[variant=primary]::before{background:var(--gov-wizard-primary-indicator-bg, var(--gov-color-primary-300))}.gov-stepper-item[variant=secondary]::before{background:var(--gov-wizard-secondary-indicator-bg, var(--gov-color-secondary-400))}.gov-stepper-item[variant=success]::before{background:var(--gov-wizard-success-indicator-bg, var(--gov-color-success))}.gov-stepper-item[variant=error]::before{background:var(--gov-wizard-error-indicator-bg, var(--gov-color-error))}.gov-stepper-item[variant=warning]::before{background:var(--gov-wizard-warning-indicator-bg, var(--gov-color-warning))}.gov-stepper-item[size=xs]{min-height:calc(var(--gov-stepper-xs-indicator-size, 1.5rem) + 3 * var(--gov-stepper-xs-connect-gap, 0.5rem))}.gov-stepper-item[size=xs]::before{top:calc(var(--gov-stepper-xs-indicator-size, 1.5rem) + var(--gov-stepper-xs-connect-gap, 0.5rem));bottom:var(--gov-stepper-xs-connect-gap, 0.5rem);left:calc((var(--gov-stepper-xs-indicator-size, 1.5rem) - 0.125rem) / 2)}.gov-stepper-item[size=xs]:last-child{min-height:0}.gov-stepper-item[size=xs] .gov-stepper-item__title{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}.gov-stepper-item[size=xs] .gov-stepper-item__annot{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing)}.gov-stepper-item[size=xs] .gov-stepper-item__prefix{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);width:var(--gov-stepper-xs-indicator-size, 1.5rem);height:var(--gov-stepper-xs-indicator-size, 1.5rem);box-shadow:0 0 0 var(--gov-stepper-xs-connect-gap, 0.5rem) var(--gov-color-neutral-white)}.gov-stepper-item[size=xs] .gov-stepper-item__content{padding:var(--gov-stepper-xs-content-padding, 1rem 1rem 2rem 2.5rem)}.gov-stepper-item--w-annot[size=xs]{min-height:calc(var(--gov-stepper-xs-indicator-size, 1.5rem) * 1.5 + 3 * var(--gov-stepper-xs-connect-gap, 0.5rem))}.gov-stepper-item[size=s]{min-height:calc(var(--gov-stepper-s-indicator-size, 2rem) + 3 * var(--gov-stepper-s-connect-gap, 1rem))}.gov-stepper-item[size=s]::before{top:calc(var(--gov-stepper-s-indicator-size, 2rem) + var(--gov-stepper-s-connect-gap, 1rem));bottom:var(--gov-stepper-s-connect-gap, 1rem);left:calc((var(--gov-stepper-s-indicator-size, 2rem) - 0.125rem) / 2)}.gov-stepper-item[size=s]:last-child{min-height:0}.gov-stepper-item[size=s] .gov-stepper-item__title{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing)}.gov-stepper-item[size=s] .gov-stepper-item__annot{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}.gov-stepper-item[size=s] .gov-stepper-item__prefix{font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing);width:var(--gov-stepper-s-indicator-size, 2rem);height:var(--gov-stepper-s-indicator-size, 2rem);box-shadow:0 0 0 var(--gov-stepper-s-connect-gap, 1rem) var(--gov-color-neutral-white)}.gov-stepper-item[size=s] .gov-stepper-item__content{padding:var(--gov-stepper-s-content-padding, 1rem 1rem 2rem 3rem)}.gov-stepper-item--w-annot[size=s]{min-height:calc(var(--gov-stepper-s-indicator-size, 2rem) * 1.5 + 3 * var(--gov-stepper-s-connect-gap, 1rem))}.gov-stepper-item[size=m]{min-height:calc(var(--gov-stepper-m-indicator-size, 2.5rem) + 3 * var(--gov-stepper-m-connect-gap, 1rem))}.gov-stepper-item[size=m]::before{top:calc(var(--gov-stepper-m-indicator-size, 2.5rem) + var(--gov-stepper-m-connect-gap, 1rem));bottom:var(--gov-stepper-m-connect-gap, 1rem);left:calc((var(--gov-stepper-m-indicator-size, 2.5rem) - 0.125rem) / 2)}.gov-stepper-item[size=m]:last-child{min-height:0}.gov-stepper-item[size=m] .gov-stepper-item__title{font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing)}.gov-stepper-item[size=m] .gov-stepper-item__annot{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}.gov-stepper-item[size=m] .gov-stepper-item__prefix{font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing);width:var(--gov-stepper-m-indicator-size, 2.5rem);height:var(--gov-stepper-m-indicator-size, 2.5rem);box-shadow:0 0 0 var(--gov-stepper-m-connect-gap, 1rem) var(--gov-color-neutral-white)}.gov-stepper-item[size=m] .gov-stepper-item__content{padding:var(--gov-stepper-m-content-padding, 1rem 1rem 2rem 3.5rem)}.gov-stepper-item--w-annot[size=m]{min-height:calc(var(--gov-stepper-m-indicator-size, 2.5rem) * 1.5 + 3 * var(--gov-stepper-m-connect-gap, 1rem))}';const l=class{constructor(r){e(this,r);this.govChange=t(this,"gov-change",7);this.isExpandedState=undefined;this.variant="primary";this.size="m";this.identifier=undefined;this.label=undefined;this.annotation=undefined;this.triggerTag="h3";this.h=v(this.host);this.triggerId=n("GovStepperItem");this.contentId=n("GovStepperContent")}validateLabel(e){if(!e){a(`[${p.root}]: Parameter label is required.`)}}validateTriggerTag(e){const t=["h1","h2","h3","h4","h5","h6","span"];if(e){if(!t.includes(e)){a(`[${p.root}]: Tag ${e} is not allowed.`)}}}validateVariant(e){s(g,e,p.root)}componentWillLoad(){this.validateLabel(this.label);this.validateVariant(this.variant);this.validateTriggerTag(this.triggerTag)}render(){const e=this.identifier||this.triggerId;const t=this.contentId;const{label:i}=this;const a=this.triggerTag;return r(o,{class:c([p.root,this.annotation&&p.rootWithAnnot]),variant:this.variant},r("div",{id:e,class:p.header,role:"listitem"},r(a,{class:p.title},this.h.hasSlot("prefix")&&r("span",{class:p.prefix},r("slot",{name:"prefix"})),r("span",{class:p.name},r("span",{class:p.label},i),this.annotation&&r("span",{class:p.annot},this.annotation)))),this.h.hasSlot("content")&&r("div",{class:p.content,id:t,"aria-labelledby":e,role:"tabpanel"},r("slot",{name:"content"})))}async currentState(){return this.isExpandedState}get host(){return i(this)}static get watchers(){return{label:["validateLabel"],triggerTag:["validateTriggerTag"],variant:["validateVariant"]}}};l.style=m;export{l as gov_stepper_item};
|
|
2
|
+
//# sourceMappingURL=p-2944bf77.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["govStepperItemCss","GovStepperItem","constructor","hostRef","this","h","govHost","host","triggerId","createID","contentId","validateLabel","newValue","govErrorLog","StepperItemClass","root","validateTriggerTag","validTags","includes","validateVariant","validateProp","StepperVariants","componentWillLoad","label","variant","triggerTag","render","identifier","TriggerTag","Host","class","prepareClasses","annotation","rootWithAnnot","id","header","role","title","hasSlot","prefix","name","annot","content","currentState","isExpandedState"],"sources":["../../../packages/core/src/components/gov-stepper/gov-stepper-item.scss?tag=gov-stepper-item","../../../packages/core/src/components/gov-stepper/gov-stepper-item.tsx"],"sourcesContent":["/*\n * Stepper - Item\n */\n\n@import \"../gov-wizard/gov-wizard-item-core.scss\";\n$class: \".gov-stepper-item\";\n\n#{$class} {\n\t@include wizard-item-core;\n\t&::before {\n\t\t@include pseudo();\n\t\twidth: rem-calc(2);\n\t}\n\t&:last-child::before {\n\t\tcontent: none;\n\t}\n\n\t// VARIANTS\n\t@each $variant, $definitions in $wizard-core-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t&::before {\n\t\t\t\tbackground: get(\"indicator-bg\", $definitions);\n\t\t\t}\n\t\t}\n\t}\n\t@each $size, $definitions in $stepper-sizes {\n\t\t$connect-gap: get(\"connect-gap\", $definitions);\n\t\t&[size=\"#{$size}\"] {\n\t\t\tmin-height: calc(get(\"indicator-size\", $definitions) + 3 * $connect-gap);\n\t\t\t&::before {\n\t\t\t\ttop: calc(get(\"indicator-size\", $definitions) + $connect-gap);\n\t\t\t\tbottom: $connect-gap;\n\t\t\t\tleft: calc((get(\"indicator-size\", $definitions) - rem-calc(2)) / 2);\n\t\t\t}\n\t\t\t&:last-child {\n\t\t\t\tmin-height: 0;\n\t\t\t}\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(get(\"font-size\", $definitions));\n\t\t\t\t}\n\t\t\t\t&__annot {\n\t\t\t\t\t@include typography(get(\"font-size-annot\", $definitions));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(get(\"font-size-indicator\", $definitions));\n\t\t\t\t\twidth: get(\"indicator-size\", $definitions);\n\t\t\t\t\theight: get(\"indicator-size\", $definitions);\n\t\t\t\t\tbox-shadow: 0 0 0 $connect-gap color(\"neutral.white\");\n\t\t\t\t}\n\t\t\t\t&__content {\n\t\t\t\t\tpadding: get(\"content-padding\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t&--w-annot[size=\"#{$size}\"] {\n\t\t\tmin-height: calc(get(\"indicator-size\", $definitions) * 1.5 + 3 * $connect-gap);\n\t\t}\n\t}\n}\n","import { Component, Element, h, Prop, State, Watch, Host, Method, Event, EventEmitter } from '@stencil/core'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { StepperSizesType, StepperItemClass, StepperVariantType, StepperVariants } from './constants'\nimport { createID } from '../../utils/string.utils'\nimport { govHost, prepareClasses } from '../../helpers/Dom/template'\nimport { GovStepperItemChangeEvent } from './gov-stepper-item.d'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-stepper-item',\n\tstyleUrl: 'gov-stepper-item.scss',\n})\nexport class GovStepperItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID('GovStepperItem')\n\t\tthis.contentId = createID('GovStepperContent')\n\t}\n\n\t@Element() readonly host: HTMLGovStepperItemElement\n\t@State() isExpandedState: boolean\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant?: StepperVariantType = 'primary'\n\t/**\n\t * Size of stepper\n\t */\n\t@Prop() readonly size?: StepperSizesType = 'm'\n\t/**\n\t * Custom stepper item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Item name of the stepper\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Item annotation of the stepper\n\t */\n\t@Prop() readonly annotation: string\n\t/**\n\t * Used to change the HMTL tag in the stepper trigger for correct semantic structure\n\t */\n\t@Prop({ attribute: 'trigger-tag' }) readonly triggerTag: string = 'h3'\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovStepperItemChangeEvent>\n\n\t@Watch('label')\n\tvalidateLabel(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${StepperItemClass.root}]: Parameter label is required.`)\n\t\t}\n\t}\n\n\t@Watch('triggerTag')\n\tvalidateTriggerTag(newValue: string): void {\n\t\tconst validTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'span']\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${StepperItemClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(StepperVariants, newValue, StepperItemClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateLabel(this.label)\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateTriggerTag(this.triggerTag)\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst contentId = this.contentId\n\t\tconst { label } = this\n\t\tconst TriggerTag = this.triggerTag\n\n\t\treturn (\n\t\t\t<Host class={prepareClasses([StepperItemClass.root, this.annotation && StepperItemClass.rootWithAnnot])} variant={this.variant}>\n\t\t\t\t<div id={triggerId} class={StepperItemClass.header} role=\"listitem\">\n\t\t\t\t\t<TriggerTag class={StepperItemClass.title}>\n\t\t\t\t\t\t{this.h.hasSlot('prefix') && (\n\t\t\t\t\t\t\t<span class={StepperItemClass.prefix}>\n\t\t\t\t\t\t\t\t<slot name=\"prefix\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<span class={StepperItemClass.name}>\n\t\t\t\t\t\t\t<span class={StepperItemClass.label}>{label}</span>\n\t\t\t\t\t\t\t{this.annotation && <span class={StepperItemClass.annot}>{this.annotation}</span>}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</TriggerTag>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot('content') && (\n\t\t\t\t\t<div class={StepperItemClass.content} id={contentId} aria-labelledby={triggerId} role=\"tabpanel\">\n\t\t\t\t\t\t<slot name=\"content\" />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync currentState(): Promise<boolean> {\n\t\treturn this.isExpandedState\n\t}\n}\n"],"mappings":"qUAAA,MAAMA,EAAoB
|
|
1
|
+
{"version":3,"names":["govStepperItemCss","GovStepperItem","constructor","hostRef","this","h","govHost","host","triggerId","createID","contentId","validateLabel","newValue","govErrorLog","StepperItemClass","root","validateTriggerTag","validTags","includes","validateVariant","validateProp","StepperVariants","componentWillLoad","label","variant","triggerTag","render","identifier","TriggerTag","Host","class","prepareClasses","annotation","rootWithAnnot","id","header","role","title","hasSlot","prefix","name","annot","content","currentState","isExpandedState"],"sources":["../../../packages/core/src/components/gov-stepper/gov-stepper-item.scss?tag=gov-stepper-item","../../../packages/core/src/components/gov-stepper/gov-stepper-item.tsx"],"sourcesContent":["/*\n * Stepper - Item\n */\n\n@import \"../gov-wizard/gov-wizard-item-core.scss\";\n$class: \".gov-stepper-item\";\n\n#{$class} {\n\t@include wizard-item-core;\n\t&::before {\n\t\t@include pseudo();\n\t\twidth: rem-calc(2);\n\t}\n\t&:last-child::before {\n\t\tcontent: none;\n\t}\n\n\t// VARIANTS\n\t@each $variant, $definitions in $wizard-core-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t&::before {\n\t\t\t\tbackground: get(\"indicator-bg\", $definitions);\n\t\t\t}\n\t\t}\n\t}\n\t@each $size, $definitions in $stepper-sizes {\n\t\t$connect-gap: get(\"connect-gap\", $definitions);\n\t\t&[size=\"#{$size}\"] {\n\t\t\tmin-height: calc(get(\"indicator-size\", $definitions) + 3 * $connect-gap);\n\t\t\t&::before {\n\t\t\t\ttop: calc(get(\"indicator-size\", $definitions) + $connect-gap);\n\t\t\t\tbottom: $connect-gap;\n\t\t\t\tleft: calc((get(\"indicator-size\", $definitions) - rem-calc(2)) / 2);\n\t\t\t}\n\t\t\t&:last-child {\n\t\t\t\tmin-height: 0;\n\t\t\t}\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(get(\"font-size\", $definitions));\n\t\t\t\t}\n\t\t\t\t&__annot {\n\t\t\t\t\t@include typography(get(\"font-size-annot\", $definitions));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(get(\"font-size-indicator\", $definitions));\n\t\t\t\t\twidth: get(\"indicator-size\", $definitions);\n\t\t\t\t\theight: get(\"indicator-size\", $definitions);\n\t\t\t\t\tbox-shadow: 0 0 0 $connect-gap color(\"neutral.white\");\n\t\t\t\t}\n\t\t\t\t&__content {\n\t\t\t\t\tpadding: get(\"content-padding\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t&--w-annot[size=\"#{$size}\"] {\n\t\t\tmin-height: calc(get(\"indicator-size\", $definitions) * 1.5 + 3 * $connect-gap);\n\t\t}\n\t}\n}\n","import { Component, Element, h, Prop, State, Watch, Host, Method, Event, EventEmitter } from '@stencil/core'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { StepperSizesType, StepperItemClass, StepperVariantType, StepperVariants } from './constants'\nimport { createID } from '../../utils/string.utils'\nimport { govHost, prepareClasses } from '../../helpers/Dom/template'\nimport { GovStepperItemChangeEvent } from './gov-stepper-item.d'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-stepper-item',\n\tstyleUrl: 'gov-stepper-item.scss',\n})\nexport class GovStepperItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID('GovStepperItem')\n\t\tthis.contentId = createID('GovStepperContent')\n\t}\n\n\t@Element() readonly host: HTMLGovStepperItemElement\n\t@State() isExpandedState: boolean\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant?: StepperVariantType = 'primary'\n\t/**\n\t * Size of stepper\n\t */\n\t@Prop() readonly size?: StepperSizesType = 'm'\n\t/**\n\t * Custom stepper item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Item name of the stepper\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Item annotation of the stepper\n\t */\n\t@Prop() readonly annotation: string\n\t/**\n\t * Used to change the HMTL tag in the stepper trigger for correct semantic structure\n\t */\n\t@Prop({ attribute: 'trigger-tag' }) readonly triggerTag: string = 'h3'\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovStepperItemChangeEvent>\n\n\t@Watch('label')\n\tvalidateLabel(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${StepperItemClass.root}]: Parameter label is required.`)\n\t\t}\n\t}\n\n\t@Watch('triggerTag')\n\tvalidateTriggerTag(newValue: string): void {\n\t\tconst validTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'span']\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${StepperItemClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(StepperVariants, newValue, StepperItemClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateLabel(this.label)\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateTriggerTag(this.triggerTag)\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst contentId = this.contentId\n\t\tconst { label } = this\n\t\tconst TriggerTag = this.triggerTag\n\n\t\treturn (\n\t\t\t<Host class={prepareClasses([StepperItemClass.root, this.annotation && StepperItemClass.rootWithAnnot])} variant={this.variant}>\n\t\t\t\t<div id={triggerId} class={StepperItemClass.header} role=\"listitem\">\n\t\t\t\t\t<TriggerTag class={StepperItemClass.title}>\n\t\t\t\t\t\t{this.h.hasSlot('prefix') && (\n\t\t\t\t\t\t\t<span class={StepperItemClass.prefix}>\n\t\t\t\t\t\t\t\t<slot name=\"prefix\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<span class={StepperItemClass.name}>\n\t\t\t\t\t\t\t<span class={StepperItemClass.label}>{label}</span>\n\t\t\t\t\t\t\t{this.annotation && <span class={StepperItemClass.annot}>{this.annotation}</span>}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</TriggerTag>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot('content') && (\n\t\t\t\t\t<div class={StepperItemClass.content} id={contentId} aria-labelledby={triggerId} role=\"tabpanel\">\n\t\t\t\t\t\t<slot name=\"content\" />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync currentState(): Promise<boolean> {\n\t\treturn this.isExpandedState\n\t}\n}\n"],"mappings":"qUAAA,MAAMA,EAAoB,0tQ,MCabC,EAAc,MAK1B,WAAAC,CAAAC,G,4FAYgD,U,UAIL,I,yFAgBuB,KA/BjEC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,UAAYC,EAAS,kBAC1BL,KAAKM,UAAYD,EAAS,oB,CAoC3B,aAAAE,CAAcC,GACb,IAAKA,EAAU,CACdC,EAAY,IAAIC,EAAiBC,sC,EAKnC,kBAAAC,CAAmBJ,GAClB,MAAMK,EAAY,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,QACvD,GAAIL,EAAU,CACb,IAAKK,EAAUC,SAASN,GAAW,CAClCC,EAAY,IAAIC,EAAiBC,cAAcH,oB,GAMlD,eAAAO,CAAgBP,GACfQ,EAAaC,EAAiBT,EAAUE,EAAiBC,K,CAG1D,iBAAAO,GACClB,KAAKO,cAAcP,KAAKmB,OACxBnB,KAAKe,gBAAgBf,KAAKoB,SAC1BpB,KAAKY,mBAAmBZ,KAAKqB,W,CAG9B,MAAAC,GACC,MAAMlB,EAAYJ,KAAKuB,YAAcvB,KAAKI,UAC1C,MAAME,EAAYN,KAAKM,UACvB,MAAMa,MAAEA,GAAUnB,KAClB,MAAMwB,EAAaxB,KAAKqB,WAExB,OACCpB,EAACwB,EAAI,CAACC,MAAOC,EAAe,CAACjB,EAAiBC,KAAMX,KAAK4B,YAAclB,EAAiBmB,gBAAiBT,QAASpB,KAAKoB,SACtHnB,EAAA,OAAK6B,GAAI1B,EAAWsB,MAAOhB,EAAiBqB,OAAQC,KAAK,YACxD/B,EAACuB,EAAU,CAACE,MAAOhB,EAAiBuB,OAClCjC,KAAKC,EAAEiC,QAAQ,WACfjC,EAAA,QAAMyB,MAAOhB,EAAiByB,QAC7BlC,EAAA,QAAMmC,KAAK,YAGbnC,EAAA,QAAMyB,MAAOhB,EAAiB0B,MAC7BnC,EAAA,QAAMyB,MAAOhB,EAAiBS,OAAQA,GACrCnB,KAAK4B,YAAc3B,EAAA,QAAMyB,MAAOhB,EAAiB2B,OAAQrC,KAAK4B,eAKjE5B,KAAKC,EAAEiC,QAAQ,YACfjC,EAAA,OAAKyB,MAAOhB,EAAiB4B,QAASR,GAAIxB,EAAS,kBAAmBF,EAAW4B,KAAK,YACrF/B,EAAA,QAAMmC,KAAK,a,CAWhB,kBAAMG,GACL,OAAOvC,KAAKwC,e"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as o,h as i,H as n,g as a}from"./p-10cbc3fe.js";import{g as r,p as t}from"./p-3f37ddb6.js";const e={root:"gov-loading",content:"gov-loading__content",icon:"gov-loading__icon"};const s=".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-loading{display:block}.gov-loading__content{z-index:101;position:fixed;top:50%;left:50%;display:flex;gap:1rem;flex-direction:column;align-items:center;min-width:9.6875rem;padding:1.5rem;border-radius:0.5rem;background:var(--gov-loading-bg, rgba(var(--gov-color-secondary-400-rgb), 0.8));color:var(--gov-loading-color, var(--gov-color-primary));text-align:center;transform:translate(-50%, -50%)}.gov-loading__icon{width:4rem;height:4rem;line-height:1}.gov-loading__icon svg{width:100%;height:100%}";const g=class{constructor(i){o(this,i);this.h=r(this.host)}render(){return i(n,{class:this.h.classes(e.root)},i("div",{class:e.content},i("gov-icon",{class:t([e.icon,"gov-spin-animation"]),name:"loader"}),i("slot",null)),i("gov-backdrop",{inverse:true}))}get host(){return a(this)}};g.style=s;export{g as gov_loading};
|
|
2
|
+
//# sourceMappingURL=p-2bb9f781.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LoadingClass","root","content","icon","govLoadingCss","GovLoading","constructor","hostRef","this","h","govHost","host","render","Host","class","classes","prepareClasses","name","inverse"],"sources":["../../../packages/core/src/components/gov-loading/loading/constants.ts","../../../packages/core/src/components/gov-loading/loading/gov-loading.scss?tag=gov-loading","../../../packages/core/src/components/gov-loading/loading/gov-loading.tsx"],"sourcesContent":["export const LoadingClass = {\n\troot: 'gov-loading',\n\tcontent: 'gov-loading__content',\n\ticon: 'gov-loading__icon',\n}\n","/*\n * Loading\n */\n\n$class: \".gov-loading\";\n\n#{$class} {\n\tdisplay: block;\n\t&__content {\n\t\t@include z-index(\"modal\", 1);\n\t\tposition: fixed;\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tmin-width: rem-calc(155);\n\t\tpadding: rem-calc(24);\n\t\tborder-radius: rem-calc(8);\n\t\tbackground: $loading-bg;\n\t\tcolor: $loading-color;\n\t\ttext-align: center;\n\t\ttransform: translate(-50%, -50%);\n\t}\n\t&__icon {\n\t\twidth: rem-calc(64);\n\t\theight: rem-calc(64);\n\t\tline-height: 1;\n\n\t\tsvg {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host } from \"@stencil/core\"\nimport { LoadingClass } from \"./constants\"\nimport { govHost, prepareClasses } from \"../../../helpers/Dom/template\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\n\n@Component({\n\ttag: \"gov-loading\",\n\tstyleUrl: \"gov-loading.scss\",\n})\nexport class GovLoading {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovLoadingElement\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(LoadingClass.root)}>\n\t\t\t\t<div class={LoadingClass.content}>\n\t\t\t\t\t<gov-icon class={prepareClasses([LoadingClass.icon, \"gov-spin-animation\"])} name=\"loader\"></gov-icon>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t\t<gov-backdrop inverse={true} />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"oGAAO,MAAMA,EAAe,CAC3BC,KAAM,cACNC,QAAS,uBACTC,KAAM,qBCHP,MAAMC,EAAgB,80B,MCSTC,EAAU,MAGtB,WAAAC,CAAAC,G,UACCC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAKvB,MAAAC,GACC,OACCH,EAACI,EAAI,CAACC,MAAON,KAAKC,EAAEM,QAAQf,EAAaC,OACxCQ,EAAA,OAAKK,MAAOd,EAAaE,SACxBO,EAAA,YAAUK,MAAOE,EAAe,CAAChB,EAAaG,KAAM,uBAAwBc,KAAK,WACjFR,EAAA,cAEDA,EAAA,gBAAcS,QAAS,O"}
|