@gov-design-system-ce/components 4.0.8-rc20 → 4.0.8-rc21

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.
Files changed (56) hide show
  1. package/dist/cjs/gov-form-input.cjs.entry.js +4 -3
  2. package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
  3. package/dist/cjs/gov-icon.cjs.entry.js +1 -1
  4. package/dist/collection/components/gov-form/input/gov-form-input.js +4 -3
  5. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  6. package/dist/components/gov-accordion-item.js +1 -1
  7. package/dist/components/gov-attachments-item.js +1 -1
  8. package/dist/components/gov-breadcrumbs.js +1 -1
  9. package/dist/components/gov-button.js +1 -1
  10. package/dist/components/gov-card.js +1 -1
  11. package/dist/components/gov-chip.js +1 -1
  12. package/dist/components/gov-form-autocomplete.js +1 -1
  13. package/dist/components/gov-form-checkbox.js +1 -1
  14. package/dist/components/gov-form-checkbox.js.map +1 -1
  15. package/dist/components/gov-form-file.js +1 -1
  16. package/dist/components/gov-form-input.js +1 -1
  17. package/dist/components/gov-form-multi-select.js +1 -1
  18. package/dist/components/gov-form-select.js +1 -1
  19. package/dist/components/gov-icon.js +1 -1
  20. package/dist/components/gov-infobar.js +1 -1
  21. package/dist/components/gov-loading.js +1 -1
  22. package/dist/components/gov-modal.js +1 -1
  23. package/dist/components/gov-pagination.js +1 -1
  24. package/dist/components/gov-prompt.js +1 -1
  25. package/dist/components/gov-side-nav-item.js +1 -1
  26. package/dist/components/gov-tabs.js +1 -1
  27. package/dist/components/gov-tag.js +1 -1
  28. package/dist/components/gov-tile.js +1 -1
  29. package/dist/components/gov-toast.js +1 -1
  30. package/dist/components/gov-tooltip-content.js +1 -1
  31. package/dist/components/gov-wizard-item.js +1 -1
  32. package/dist/components/{p-d2a0ad9c.js → p-2dce8f2c.js} +2 -2
  33. package/dist/components/{p-f4086eab.js → p-708dca47.js} +2 -2
  34. package/dist/components/{p-f4086eab.js.map → p-708dca47.js.map} +1 -1
  35. package/dist/components/{p-90ebe1d9.js → p-8977b759.js} +2 -2
  36. package/dist/components/{p-37645839.js → p-aa4122bd.js} +2 -2
  37. package/dist/components/{p-b0aa3804.js → p-bcc76ddd.js} +2 -2
  38. package/dist/components/{p-b0ff29c9.js → p-c2e5e893.js} +2 -2
  39. package/dist/components/{p-280b0104.js → p-f0eb08d6.js} +2 -2
  40. package/dist/core/core.esm.js +1 -1
  41. package/dist/core/{p-c4960938.entry.js → p-7c2fa6df.entry.js} +2 -2
  42. package/dist/core/{p-e102ae1d.entry.js → p-afd40857.entry.js} +2 -2
  43. package/dist/core/{p-e102ae1d.entry.js.map → p-afd40857.entry.js.map} +1 -1
  44. package/dist/esm/gov-form-input.entry.js +4 -3
  45. package/dist/esm/gov-form-input.entry.js.map +1 -1
  46. package/dist/esm/gov-icon.entry.js +1 -1
  47. package/dist/hydrate/index.js +4 -3
  48. package/dist/hydrate/index.mjs +4 -3
  49. package/package.json +1 -1
  50. /package/dist/components/{p-d2a0ad9c.js.map → p-2dce8f2c.js.map} +0 -0
  51. /package/dist/components/{p-90ebe1d9.js.map → p-8977b759.js.map} +0 -0
  52. /package/dist/components/{p-37645839.js.map → p-aa4122bd.js.map} +0 -0
  53. /package/dist/components/{p-b0aa3804.js.map → p-bcc76ddd.js.map} +0 -0
  54. /package/dist/components/{p-b0ff29c9.js.map → p-c2e5e893.js.map} +0 -0
  55. /package/dist/components/{p-280b0104.js.map → p-f0eb08d6.js.map} +0 -0
  56. /package/dist/core/{p-c4960938.entry.js.map → p-7c2fa6df.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{p as i,H as e,c as r,h as a,d as t}from"./p-d6759ac3.js";import{a as o}from"./p-e296ca83.js";import{v as d}from"./p-344c72d7.js";import{W as n,c as s}from"./p-20fd8011.js";import{c as v}from"./p-95d41a3b.js";import{g,b as l,t as c}from"./p-d687df8f.js";import{F as m}from"./p-1c1d0bbe.js";import{d as z}from"./p-d2a0ad9c.js";const w='.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-wizard-item{position:relative;display:block;width:100%;margin-bottom:1rem;background:var(--gov-wizard-bg-color, var(--gov-color-neutral-white))}.gov-wizard-item__header{position:relative;width:100%}.gov-wizard-item__arrow{flex:0 0 auto;width:0.75rem;height:0.75rem}.gov-wizard-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-wizard-item__prefix{display:flex;flex:0 0 auto;justify-content:center;align-items:center;border-radius:50%;text-align:center}.gov-wizard-item__prefix .gov-icon{width:45%;height:45%}.gov-wizard-item__prefix span[slot=prefix]{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.gov-wizard-item__name{display:flex;flex-direction:column}.gov-wizard-item__label{display:flex;gap:0.5rem;align-items:center;font-weight:var(--gov-wizard-title-font-weight, 700)}.gov-wizard-item__annot{color:var(--gov-color-secondary)}.gov-wizard-item__content>*:last-child{margin-bottom:0}.gov-wizard-item[variant=primary] .gov-wizard-item__header{color:var(--gov-wizard-primary-color, var(--gov-color-primary-800))}.gov-wizard-item[variant=primary] .gov-wizard-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-wizard-item[variant=secondary] .gov-wizard-item__header{color:var(--gov-wizard-secondary-color, var(--gov-color-secondary-700))}.gov-wizard-item[variant=secondary] .gov-wizard-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-wizard-item[variant=success] .gov-wizard-item__header{color:var(--gov-wizard-success-color, var(--gov-color-success-500))}.gov-wizard-item[variant=success] .gov-wizard-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-wizard-item[variant=error] .gov-wizard-item__header{color:var(--gov-wizard-error-color, var(--gov-color-error-500))}.gov-wizard-item[variant=error] .gov-wizard-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-wizard-item[variant=warning] .gov-wizard-item__header{color:var(--gov-wizard-warning-color, var(--gov-color-warning-500))}.gov-wizard-item[variant=warning] .gov-wizard-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-wizard-item__header{gap:1rem;padding:1rem;border-radius:0;text-align:left;transition:150ms linear color}.gov-wizard-item__header:focus{outline:none}.gov-wizard-item__header:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-wizard-item__prefix{position:absolute;left:1rem}.gov-wizard-item__header[aria-expanded=true] .gov-wizard-item__label .gov-icon{transform:scale(-1)}.gov-wizard-item[size=xs] .gov-wizard-item__title,.gov-wizard-item[size=s] .gov-wizard-item__title,.gov-wizard-item[size=m] .gov-wizard-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-wizard-item[size=xs] .gov-wizard-item__annot,.gov-wizard-item[size=s] .gov-wizard-item__annot,.gov-wizard-item[size=m] .gov-wizard-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-wizard-item[size=xs] .gov-wizard-item__prefix,.gov-wizard-item[size=s] .gov-wizard-item__prefix,.gov-wizard-item[size=m] .gov-wizard-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-wizard-xs-indicator-size, 1.5rem);height:var(--gov-wizard-xs-indicator-size, 1.5rem);top:var(--gov-wizard-xs-top, 1rem)}.gov-wizard-item[size=xs] .gov-wizard-item__prefix+.gov-wizard-item__header,.gov-wizard-item[size=s] .gov-wizard-item__prefix+.gov-wizard-item__header,.gov-wizard-item[size=m] .gov-wizard-item__prefix+.gov-wizard-item__header{padding:var(--gov-wizard-xs-header-padding, 1rem 1rem 1rem 3.5rem)}.gov-wizard-item[size=xs] .gov-wizard-item__content,.gov-wizard-item[size=s] .gov-wizard-item__content,.gov-wizard-item[size=m] .gov-wizard-item__content{padding:var(--gov-wizard-content-padding, 0rem 1rem 1rem 1rem)}@media not all and (pointer: coarse){.gov-wizard-item[variant=primary][collapsible=""] .gov-wizard-item__header:hover,.gov-wizard-item[variant=primary][collapsible=true i] .gov-wizard-item__header:hover,.gov-wizard-item[variant=primary][collapsible="1"] .gov-wizard-item__header:hover{color:var(--gov-wizard-primary-hover-color, var(--gov-color-primary-900))}}@media not all and (pointer: coarse){.gov-wizard-item[variant=secondary][collapsible=""] .gov-wizard-item__header:hover,.gov-wizard-item[variant=secondary][collapsible=true i] .gov-wizard-item__header:hover,.gov-wizard-item[variant=secondary][collapsible="1"] .gov-wizard-item__header:hover{color:var(--gov-wizard-secondary-hover-color, var(--gov-color-secondary-800))}}@media not all and (pointer: coarse){.gov-wizard-item[variant=success][collapsible=""] .gov-wizard-item__header:hover,.gov-wizard-item[variant=success][collapsible=true i] .gov-wizard-item__header:hover,.gov-wizard-item[variant=success][collapsible="1"] .gov-wizard-item__header:hover{color:var(--gov-wizard-success-hover-color, var(--gov-color-success-600))}}@media not all and (pointer: coarse){.gov-wizard-item[variant=error][collapsible=""] .gov-wizard-item__header:hover,.gov-wizard-item[variant=error][collapsible=true i] .gov-wizard-item__header:hover,.gov-wizard-item[variant=error][collapsible="1"] .gov-wizard-item__header:hover{color:var(--gov-wizard-error-hover-color, var(--gov-color-error-600))}}@media not all and (pointer: coarse){.gov-wizard-item[variant=warning][collapsible=""] .gov-wizard-item__header:hover,.gov-wizard-item[variant=warning][collapsible=true i] .gov-wizard-item__header:hover,.gov-wizard-item[variant=warning][collapsible="1"] .gov-wizard-item__header:hover{color:var(--gov-wizard-warning-hover-color, var(--gov-color-warning-600))}}button.gov-wizard-item__header{display:inline-flex;vertical-align:middle;justify-content:center;align-items:center;border:0;background-color:transparent;text-align:center;text-decoration:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;justify-content:flex-start;text-align:left}button.gov-wizard-item__header:focus{outline:none}@media (min-width: 30em){.gov-wizard-item[size=s] .gov-wizard-item__title,.gov-wizard-item[size=m] .gov-wizard-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-wizard-item[size=s] .gov-wizard-item__prefix,.gov-wizard-item[size=m] .gov-wizard-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-wizard-s-indicator-size, 2rem);height:var(--gov-wizard-s-indicator-size, 2rem);top:var(--gov-wizard-s-top, 0.8125rem)}.gov-wizard-item[size=s] .gov-wizard-item__prefix+.gov-wizard-item__header,.gov-wizard-item[size=m] .gov-wizard-item__prefix+.gov-wizard-item__header{padding:var(--gov-wizard-s-header-padding, 1rem 1rem 1rem 4rem)}}@media (min-width: 48em){.gov-wizard-item[size=m] .gov-wizard-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-wizard-item[size=m] .gov-wizard-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-wizard-m-indicator-size, 2.5rem);height:var(--gov-wizard-m-indicator-size, 2.5rem);top:var(--gov-wizard-m-top, 0.5625rem)}.gov-wizard-item[size=m] .gov-wizard-item__prefix+.gov-wizard-item__header{padding:var(--gov-wizard-m-header-padding, 1rem 1rem 1rem 4.5rem)}.gov-wizard-item[size=xs] .gov-wizard-item__content{padding:var(--gov-wizard-xs-content-padding, 0rem 1rem 1rem 3.5rem)}.gov-wizard-item[size=s] .gov-wizard-item__content{padding:var(--gov-wizard-s-content-padding, 0rem 1rem 1rem 4rem)}.gov-wizard-item[size=m] .gov-wizard-item__content{padding:var(--gov-wizard-m-content-padding, 0rem 1rem 1rem 4.5rem)}}';const h=w;var p;(function(i){i["DIV"]="div";i["BUTTON"]="button"})(p||(p={}));const _=i(class i extends e{constructor(){super();this.__registerHost();this.govChange=r(this,"gov-change",7);this.variant="primary";this.size="m";this.identifier=undefined;this.collapsible=false;this.annotation=undefined;this.label=undefined;this.disabled=false;this.isExpanded=false;this.labelTag="h3";this.h=g(this.host);this.triggerId=v("GovWizardItem");this.contentId=v("GovWizardContent")}validateLabel(i){if(!i){o(`[${n.root}]: Parameter label is required.`)}}validateTriggerTag(i){const e=["h1","h2","h3","h4","h5","h6","span"];if(i){if(!e.includes(i)){o(`[${n.root}]: Tag ${i} is not allowed.`)}}}validateVariant(i){d(s,i,n.root)}emmitChange(){this.govChange.emit({expanded:this.isExpanded,component:n.root})}componentWillLoad(){this.validateLabel(this.label);this.validateVariant(this.variant);this.validateTriggerTag(this.labelTag)}render(){const i=this.identifier||this.triggerId;const e=this.labelTag;const r=this.collapsible?p.BUTTON:p.DIV;const o=this.h.hasSlot("prefix")&&a("span",{key:"959248c1bae00af1c1de0009e8db1317f57773b5",class:n.prefix},a("slot",{key:"9c9b5c4f0d3024b68c49a47fea8d0c504f0c44bd",name:"prefix"}));const d=a(e,{key:"fd079e23c2fd79052d42ff5ba30a55a4d8240c44",class:n.title},a("span",{key:"cb40be0048459dfff7468598c60e157377e77fce",class:n.name},a("span",{key:"29a40cff9bcca1a166fde9a22d84cf1c7ac5dc00",class:n.label},a("span",{key:"03b626c21f20592c9729f3ec4dd217d13e35813a"},this.label),this.collapsible&&a("gov-icon",{key:"19f6a985e209cedf1f49cab330973bd9839d9881",class:n.arrow,name:"chevron-down"})),this.annotation&&a("span",{key:"17c5dddce1df76479a02bdc688bab54b498cef81",class:n.annot},this.annotation)));return a(t,{key:"be03f0870b5b3b6691700478e6c33f4e130bf2ae",class:this.h.classes(n.root),"is-expanded":this.isExpanded,variant:this.variant,size:this.size,role:"listitem",collapsible:this.collapsible},this.collapsible?a(m,null,o,a(r,{id:i,class:n.header,"aria-expanded":l(this.isExpanded),"aria-controls":this.contentId,disabled:this.disabled,"aria-disabled":c(this.disabled),onClick:i=>{i.preventDefault();i.stopPropagation();this.collapsible?this.toggle():false}},d)):a(m,null,o,a("div",{class:n.header},d)),this.collapsible?a("div",{class:n.content,id:this.contentId,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded,"aria-labelledby":i},a("slot",null)):a("div",{class:n.content,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded},a("slot",null)))}async open(){this.isExpanded=true;this.emmitChange()}async close(){this.isExpanded=false;this.emmitChange()}async toggle(){this.isExpanded=!this.isExpanded;this.emmitChange()}async currentState(){return this.isExpanded}get host(){return this}static get watchers(){return{label:["validateLabel"],labelTag:["validateTriggerTag"],variant:["validateVariant"]}}static get style(){return h}},[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]},undefined,{label:["validateLabel"],labelTag:["validateTriggerTag"],variant:["validateVariant"]}]);function f(){if(typeof customElements==="undefined"){return}const i=["gov-wizard-item","gov-icon"];i.forEach((i=>{switch(i){case"gov-wizard-item":if(!customElements.get(i)){customElements.define(i,_)}break;case"gov-icon":if(!customElements.get(i)){z()}break}}))}f();const b=_;const x=f;export{b as GovWizardItem,x as defineCustomElement};
1
+ import{p as i,H as e,c as r,h as a,d as t}from"./p-d6759ac3.js";import{a as o}from"./p-e296ca83.js";import{v as d}from"./p-344c72d7.js";import{W as n,c as s}from"./p-20fd8011.js";import{c as v}from"./p-95d41a3b.js";import{g,b as l,t as c}from"./p-d687df8f.js";import{F as m}from"./p-1c1d0bbe.js";import{d as z}from"./p-2dce8f2c.js";const w='.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-wizard-item{position:relative;display:block;width:100%;margin-bottom:1rem;background:var(--gov-wizard-bg-color, var(--gov-color-neutral-white))}.gov-wizard-item__header{position:relative;width:100%}.gov-wizard-item__arrow{flex:0 0 auto;width:0.75rem;height:0.75rem}.gov-wizard-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-wizard-item__prefix{display:flex;flex:0 0 auto;justify-content:center;align-items:center;border-radius:50%;text-align:center}.gov-wizard-item__prefix .gov-icon{width:45%;height:45%}.gov-wizard-item__prefix span[slot=prefix]{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.gov-wizard-item__name{display:flex;flex-direction:column}.gov-wizard-item__label{display:flex;gap:0.5rem;align-items:center;font-weight:var(--gov-wizard-title-font-weight, 700)}.gov-wizard-item__annot{color:var(--gov-color-secondary)}.gov-wizard-item__content>*:last-child{margin-bottom:0}.gov-wizard-item[variant=primary] .gov-wizard-item__header{color:var(--gov-wizard-primary-color, var(--gov-color-primary-800))}.gov-wizard-item[variant=primary] .gov-wizard-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-wizard-item[variant=secondary] .gov-wizard-item__header{color:var(--gov-wizard-secondary-color, var(--gov-color-secondary-700))}.gov-wizard-item[variant=secondary] .gov-wizard-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-wizard-item[variant=success] .gov-wizard-item__header{color:var(--gov-wizard-success-color, var(--gov-color-success-500))}.gov-wizard-item[variant=success] .gov-wizard-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-wizard-item[variant=error] .gov-wizard-item__header{color:var(--gov-wizard-error-color, var(--gov-color-error-500))}.gov-wizard-item[variant=error] .gov-wizard-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-wizard-item[variant=warning] .gov-wizard-item__header{color:var(--gov-wizard-warning-color, var(--gov-color-warning-500))}.gov-wizard-item[variant=warning] .gov-wizard-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-wizard-item__header{gap:1rem;padding:1rem;border-radius:0;text-align:left;transition:150ms linear color}.gov-wizard-item__header:focus{outline:none}.gov-wizard-item__header:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-wizard-item__prefix{position:absolute;left:1rem}.gov-wizard-item__header[aria-expanded=true] .gov-wizard-item__label .gov-icon{transform:scale(-1)}.gov-wizard-item[size=xs] .gov-wizard-item__title,.gov-wizard-item[size=s] .gov-wizard-item__title,.gov-wizard-item[size=m] .gov-wizard-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-wizard-item[size=xs] .gov-wizard-item__annot,.gov-wizard-item[size=s] .gov-wizard-item__annot,.gov-wizard-item[size=m] .gov-wizard-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-wizard-item[size=xs] .gov-wizard-item__prefix,.gov-wizard-item[size=s] .gov-wizard-item__prefix,.gov-wizard-item[size=m] .gov-wizard-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-wizard-xs-indicator-size, 1.5rem);height:var(--gov-wizard-xs-indicator-size, 1.5rem);top:var(--gov-wizard-xs-top, 1rem)}.gov-wizard-item[size=xs] .gov-wizard-item__prefix+.gov-wizard-item__header,.gov-wizard-item[size=s] .gov-wizard-item__prefix+.gov-wizard-item__header,.gov-wizard-item[size=m] .gov-wizard-item__prefix+.gov-wizard-item__header{padding:var(--gov-wizard-xs-header-padding, 1rem 1rem 1rem 3.5rem)}.gov-wizard-item[size=xs] .gov-wizard-item__content,.gov-wizard-item[size=s] .gov-wizard-item__content,.gov-wizard-item[size=m] .gov-wizard-item__content{padding:var(--gov-wizard-content-padding, 0rem 1rem 1rem 1rem)}@media not all and (pointer: coarse){.gov-wizard-item[variant=primary][collapsible=""] .gov-wizard-item__header:hover,.gov-wizard-item[variant=primary][collapsible=true i] .gov-wizard-item__header:hover,.gov-wizard-item[variant=primary][collapsible="1"] .gov-wizard-item__header:hover{color:var(--gov-wizard-primary-hover-color, var(--gov-color-primary-900))}}@media not all and (pointer: coarse){.gov-wizard-item[variant=secondary][collapsible=""] .gov-wizard-item__header:hover,.gov-wizard-item[variant=secondary][collapsible=true i] .gov-wizard-item__header:hover,.gov-wizard-item[variant=secondary][collapsible="1"] .gov-wizard-item__header:hover{color:var(--gov-wizard-secondary-hover-color, var(--gov-color-secondary-800))}}@media not all and (pointer: coarse){.gov-wizard-item[variant=success][collapsible=""] .gov-wizard-item__header:hover,.gov-wizard-item[variant=success][collapsible=true i] .gov-wizard-item__header:hover,.gov-wizard-item[variant=success][collapsible="1"] .gov-wizard-item__header:hover{color:var(--gov-wizard-success-hover-color, var(--gov-color-success-600))}}@media not all and (pointer: coarse){.gov-wizard-item[variant=error][collapsible=""] .gov-wizard-item__header:hover,.gov-wizard-item[variant=error][collapsible=true i] .gov-wizard-item__header:hover,.gov-wizard-item[variant=error][collapsible="1"] .gov-wizard-item__header:hover{color:var(--gov-wizard-error-hover-color, var(--gov-color-error-600))}}@media not all and (pointer: coarse){.gov-wizard-item[variant=warning][collapsible=""] .gov-wizard-item__header:hover,.gov-wizard-item[variant=warning][collapsible=true i] .gov-wizard-item__header:hover,.gov-wizard-item[variant=warning][collapsible="1"] .gov-wizard-item__header:hover{color:var(--gov-wizard-warning-hover-color, var(--gov-color-warning-600))}}button.gov-wizard-item__header{display:inline-flex;vertical-align:middle;justify-content:center;align-items:center;border:0;background-color:transparent;text-align:center;text-decoration:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;justify-content:flex-start;text-align:left}button.gov-wizard-item__header:focus{outline:none}@media (min-width: 30em){.gov-wizard-item[size=s] .gov-wizard-item__title,.gov-wizard-item[size=m] .gov-wizard-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-wizard-item[size=s] .gov-wizard-item__prefix,.gov-wizard-item[size=m] .gov-wizard-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-wizard-s-indicator-size, 2rem);height:var(--gov-wizard-s-indicator-size, 2rem);top:var(--gov-wizard-s-top, 0.8125rem)}.gov-wizard-item[size=s] .gov-wizard-item__prefix+.gov-wizard-item__header,.gov-wizard-item[size=m] .gov-wizard-item__prefix+.gov-wizard-item__header{padding:var(--gov-wizard-s-header-padding, 1rem 1rem 1rem 4rem)}}@media (min-width: 48em){.gov-wizard-item[size=m] .gov-wizard-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-wizard-item[size=m] .gov-wizard-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-wizard-m-indicator-size, 2.5rem);height:var(--gov-wizard-m-indicator-size, 2.5rem);top:var(--gov-wizard-m-top, 0.5625rem)}.gov-wizard-item[size=m] .gov-wizard-item__prefix+.gov-wizard-item__header{padding:var(--gov-wizard-m-header-padding, 1rem 1rem 1rem 4.5rem)}.gov-wizard-item[size=xs] .gov-wizard-item__content{padding:var(--gov-wizard-xs-content-padding, 0rem 1rem 1rem 3.5rem)}.gov-wizard-item[size=s] .gov-wizard-item__content{padding:var(--gov-wizard-s-content-padding, 0rem 1rem 1rem 4rem)}.gov-wizard-item[size=m] .gov-wizard-item__content{padding:var(--gov-wizard-m-content-padding, 0rem 1rem 1rem 4.5rem)}}';const h=w;var p;(function(i){i["DIV"]="div";i["BUTTON"]="button"})(p||(p={}));const _=i(class i extends e{constructor(){super();this.__registerHost();this.govChange=r(this,"gov-change",7);this.variant="primary";this.size="m";this.identifier=undefined;this.collapsible=false;this.annotation=undefined;this.label=undefined;this.disabled=false;this.isExpanded=false;this.labelTag="h3";this.h=g(this.host);this.triggerId=v("GovWizardItem");this.contentId=v("GovWizardContent")}validateLabel(i){if(!i){o(`[${n.root}]: Parameter label is required.`)}}validateTriggerTag(i){const e=["h1","h2","h3","h4","h5","h6","span"];if(i){if(!e.includes(i)){o(`[${n.root}]: Tag ${i} is not allowed.`)}}}validateVariant(i){d(s,i,n.root)}emmitChange(){this.govChange.emit({expanded:this.isExpanded,component:n.root})}componentWillLoad(){this.validateLabel(this.label);this.validateVariant(this.variant);this.validateTriggerTag(this.labelTag)}render(){const i=this.identifier||this.triggerId;const e=this.labelTag;const r=this.collapsible?p.BUTTON:p.DIV;const o=this.h.hasSlot("prefix")&&a("span",{key:"959248c1bae00af1c1de0009e8db1317f57773b5",class:n.prefix},a("slot",{key:"9c9b5c4f0d3024b68c49a47fea8d0c504f0c44bd",name:"prefix"}));const d=a(e,{key:"fd079e23c2fd79052d42ff5ba30a55a4d8240c44",class:n.title},a("span",{key:"cb40be0048459dfff7468598c60e157377e77fce",class:n.name},a("span",{key:"29a40cff9bcca1a166fde9a22d84cf1c7ac5dc00",class:n.label},a("span",{key:"03b626c21f20592c9729f3ec4dd217d13e35813a"},this.label),this.collapsible&&a("gov-icon",{key:"19f6a985e209cedf1f49cab330973bd9839d9881",class:n.arrow,name:"chevron-down"})),this.annotation&&a("span",{key:"17c5dddce1df76479a02bdc688bab54b498cef81",class:n.annot},this.annotation)));return a(t,{key:"be03f0870b5b3b6691700478e6c33f4e130bf2ae",class:this.h.classes(n.root),"is-expanded":this.isExpanded,variant:this.variant,size:this.size,role:"listitem",collapsible:this.collapsible},this.collapsible?a(m,null,o,a(r,{id:i,class:n.header,"aria-expanded":l(this.isExpanded),"aria-controls":this.contentId,disabled:this.disabled,"aria-disabled":c(this.disabled),onClick:i=>{i.preventDefault();i.stopPropagation();this.collapsible?this.toggle():false}},d)):a(m,null,o,a("div",{class:n.header},d)),this.collapsible?a("div",{class:n.content,id:this.contentId,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded,"aria-labelledby":i},a("slot",null)):a("div",{class:n.content,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded},a("slot",null)))}async open(){this.isExpanded=true;this.emmitChange()}async close(){this.isExpanded=false;this.emmitChange()}async toggle(){this.isExpanded=!this.isExpanded;this.emmitChange()}async currentState(){return this.isExpanded}get host(){return this}static get watchers(){return{label:["validateLabel"],labelTag:["validateTriggerTag"],variant:["validateVariant"]}}static get style(){return h}},[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]},undefined,{label:["validateLabel"],labelTag:["validateTriggerTag"],variant:["validateVariant"]}]);function f(){if(typeof customElements==="undefined"){return}const i=["gov-wizard-item","gov-icon"];i.forEach((i=>{switch(i){case"gov-wizard-item":if(!customElements.get(i)){customElements.define(i,_)}break;case"gov-icon":if(!customElements.get(i)){z()}break}}))}f();const b=_;const x=f;export{b as GovWizardItem,x as defineCustomElement};
2
2
  //# sourceMappingURL=gov-wizard-item.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,h as i,d as n}from"./p-d6759ac3.js";import{g as e}from"./p-bfce6f99.js";import{i as o,e as a}from"./p-e618f1cb.js";import{g as r}from"./p-d687df8f.js";var c;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(c||(c={}));const h={root:"gov-icon",holder:"gov-icon__holder"};const l="4.0.8-rc20";const f=()=>l;const d={};const p={};const u=t=>t.startsWith("http://")||t.startsWith("https://");const m=(t,s,i)=>{if(u(t)){return`${t}/${i}/${s}.svg?v=${f()}`}return e(`${t}/${i}/${s}.svg`)+`?v=${f()}`};async function g({name:t,type:s}){const i=s+"-"+t;if(d[i]){return d[i]}if(!p[i]){p[i]=fetch(m(o(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const n=await p[i];d[i]=n;return n}const y=".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-icon{display:inline-flex}.gov-icon__holder{display:inline-flex;width:100%;height:100%}.gov-icon__holder+.gov-icon__holder{display:none !important}.gov-icon svg{display:inline-flex;width:100%;height:100%;max-width:100%;max-height:100%}";const v=y;const w=t(class t extends s{constructor(){super();this.__registerHost();this.name=null;this.type="basic";this.iconData=undefined;this.visible=false;this.error=false;this.h=r(this.host)}async loadIconPathData(){const{name:t,visible:s,type:i}=this;if(!t||!s){return}try{this.iconData=await g({name:t,type:i})}catch(t){this.error=true}}connectedCallback(){if(a()){this.visible=true;this.loadIconPathData().finally()}else{this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((s=>{s.forEach((s=>{if(s.isIntersecting){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}render(){if(this.error){return null}return i(n,{class:this.h.classes(h.root)},i("span",{class:h.holder,innerHTML:this.iconData}))}static get assetsDirs(){return["assets"]}get host(){return this}static get watchers(){return{name:["loadIconPathData"]}}static get style(){return v}},[0,"gov-icon",{name:[1],type:[1],iconData:[32],visible:[32],error:[32]},undefined,{name:["loadIconPathData"]}]);function b(){if(typeof customElements==="undefined"){return}const t=["gov-icon"];t.forEach((t=>{switch(t){case"gov-icon":if(!customElements.get(t)){customElements.define(t,w)}break}}))}b();export{w as G,b as d};
2
- //# sourceMappingURL=p-d2a0ad9c.js.map
1
+ import{p as t,H as s,h as i,d as n}from"./p-d6759ac3.js";import{g as e}from"./p-bfce6f99.js";import{i as o,e as a}from"./p-e618f1cb.js";import{g as r}from"./p-d687df8f.js";var c;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(c||(c={}));const h={root:"gov-icon",holder:"gov-icon__holder"};const l="4.0.8-rc21";const f=()=>l;const d={};const p={};const u=t=>t.startsWith("http://")||t.startsWith("https://");const m=(t,s,i)=>{if(u(t)){return`${t}/${i}/${s}.svg?v=${f()}`}return e(`${t}/${i}/${s}.svg`)+`?v=${f()}`};async function g({name:t,type:s}){const i=s+"-"+t;if(d[i]){return d[i]}if(!p[i]){p[i]=fetch(m(o(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const n=await p[i];d[i]=n;return n}const y=".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-icon{display:inline-flex}.gov-icon__holder{display:inline-flex;width:100%;height:100%}.gov-icon__holder+.gov-icon__holder{display:none !important}.gov-icon svg{display:inline-flex;width:100%;height:100%;max-width:100%;max-height:100%}";const v=y;const w=t(class t extends s{constructor(){super();this.__registerHost();this.name=null;this.type="basic";this.iconData=undefined;this.visible=false;this.error=false;this.h=r(this.host)}async loadIconPathData(){const{name:t,visible:s,type:i}=this;if(!t||!s){return}try{this.iconData=await g({name:t,type:i})}catch(t){this.error=true}}connectedCallback(){if(a()){this.visible=true;this.loadIconPathData().finally()}else{this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((s=>{s.forEach((s=>{if(s.isIntersecting){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}render(){if(this.error){return null}return i(n,{class:this.h.classes(h.root)},i("span",{class:h.holder,innerHTML:this.iconData}))}static get assetsDirs(){return["assets"]}get host(){return this}static get watchers(){return{name:["loadIconPathData"]}}static get style(){return v}},[0,"gov-icon",{name:[1],type:[1],iconData:[32],visible:[32],error:[32]},undefined,{name:["loadIconPathData"]}]);function b(){if(typeof customElements==="undefined"){return}const t=["gov-icon"];t.forEach((t=>{switch(t){case"gov-icon":if(!customElements.get(t)){customElements.define(t,w)}break}}))}b();export{w as G,b as d};
2
+ //# sourceMappingURL=p-2dce8f2c.js.map
@@ -1,2 +1,2 @@
1
- import{p as o,H as i,c as t,h as e,d as r}from"./p-d6759ac3.js";import{g as n,c as a,d as s,e as l}from"./p-77a6e3be.js";import{g as c,a as v,t as g,c as p}from"./p-d687df8f.js";import{c as m}from"./p-e618f1cb.js";import{v as d}from"./p-344c72d7.js";import{b as f,c as u}from"./p-6b0471a8.js";import{c as h}from"./p-95d41a3b.js";import{d as x}from"./p-e0e2e9c1.js";import{d as z}from"./p-d2a0ad9c.js";const b='.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-input{position:relative;display:flex;width:100%;align-items:center}.gov-form-input .element{position:relative;display:flex;flex:1 1 auto}.gov-form-input input,.gov-form-input select,.gov-form-input 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-input input:focus,.gov-form-input select:focus,.gov-form-input textarea:focus{outline:none}.gov-form-input input:focus-visible,.gov-form-input select:focus-visible,.gov-form-input 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-input input::-moz-placeholder,.gov-form-input select::-moz-placeholder,.gov-form-input textarea::-moz-placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-input input::placeholder,.gov-form-input select::placeholder,.gov-form-input textarea::placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-input 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-input *[slot=left-icon],.gov-form-input *[slot=right-icon]{position:absolute;top:50%;display:flex;justify-content:center;transform:translateY(-50%);pointer-events:none}.gov-form-input *[slot=left-icon]{left:0}.gov-form-input *[slot=right-icon]{right:0}.gov-form-input *[slot=prefix],.gov-form-input *[slot=sufix]{margin:0}[size=s].gov-form-input{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-input input,[size=s].gov-form-input 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-input *[slot=left-icon],[size=s].gov-form-input *[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-input *[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-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=s].gov-form-input *[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-input *[slot=right-icon]~input,[size=s].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=m].gov-form-input{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-input input,[size=m].gov-form-input 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-input *[slot=left-icon],[size=m].gov-form-input *[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-input *[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-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=m].gov-form-input *[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-input *[slot=right-icon]~input,[size=m].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=l].gov-form-input{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-input input,[size=l].gov-form-input 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-input *[slot=left-icon],[size=l].gov-form-input *[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-input *[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-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=l].gov-form-input *[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-input *[slot=right-icon]~input,[size=l].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=xl].gov-form-input{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-input input,[size=xl].gov-form-input 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-input *[slot=left-icon],[size=xl].gov-form-input *[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-input *[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-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-xl-icon-padding, 3rem)}[size=xl].gov-form-input *[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-input *[slot=right-icon]~input,[size=xl].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-xl-icon-padding, 3rem)}[variant=primary].gov-form-input input,[variant=primary].gov-form-input select,[variant=primary].gov-form-input 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-input *[slot=left-icon],[variant=primary].gov-form-input *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-primary, var(--gov-color-primary))}[variant=secondary].gov-form-input input,[variant=secondary].gov-form-input select,[variant=secondary].gov-form-input 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-input *[slot=left-icon],[variant=secondary].gov-form-input *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-secondary, var(--gov-color-primary))}[disabled=""].gov-form-input,[disabled=true i].gov-form-input,[disabled="1"].gov-form-input{pointer-events:none}[disabled=""].gov-form-input input,[disabled=""].gov-form-input select,[disabled=""].gov-form-input textarea,[disabled=true i].gov-form-input input,[disabled=true i].gov-form-input select,[disabled=true i].gov-form-input textarea,[disabled="1"].gov-form-input input,[disabled="1"].gov-form-input select,[disabled="1"].gov-form-input 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-input *[slot=left-icon],[disabled=""].gov-form-input *[slot=right-icon],[disabled=true i].gov-form-input *[slot=left-icon],[disabled=true i].gov-form-input *[slot=right-icon],[disabled="1"].gov-form-input *[slot=left-icon],[disabled="1"].gov-form-input *[slot=right-icon]{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600)) !important}[invalid=""].gov-form-input input,[invalid=""].gov-form-input select,[invalid=""].gov-form-input textarea,[invalid=true i].gov-form-input input,[invalid=true i].gov-form-input select,[invalid=true i].gov-form-input textarea,[invalid="1"].gov-form-input input,[invalid="1"].gov-form-input select,[invalid="1"].gov-form-input 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-input input::-moz-placeholder,[invalid=""].gov-form-input select::-moz-placeholder,[invalid=""].gov-form-input textarea::-moz-placeholder,[invalid=true i].gov-form-input input::-moz-placeholder,[invalid=true i].gov-form-input select::-moz-placeholder,[invalid=true i].gov-form-input textarea::-moz-placeholder,[invalid="1"].gov-form-input input::-moz-placeholder,[invalid="1"].gov-form-input select::-moz-placeholder,[invalid="1"].gov-form-input textarea::-moz-placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-input input::placeholder,[invalid=""].gov-form-input select::placeholder,[invalid=""].gov-form-input textarea::placeholder,[invalid=true i].gov-form-input input::placeholder,[invalid=true i].gov-form-input select::placeholder,[invalid=true i].gov-form-input textarea::placeholder,[invalid="1"].gov-form-input input::placeholder,[invalid="1"].gov-form-input select::placeholder,[invalid="1"].gov-form-input textarea::placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-input *[slot=left-icon],[invalid=""].gov-form-input *[slot=right-icon],[invalid=true i].gov-form-input *[slot=left-icon],[invalid=true i].gov-form-input *[slot=right-icon],[invalid="1"].gov-form-input *[slot=left-icon],[invalid="1"].gov-form-input *[slot=right-icon]{color:var(--gov-form-state-color-error, var(--gov-color-error)) !important}[invalid=""].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid=true i].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid="1"].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[success=""].gov-form-input *[slot=right-icon]:not(.icon-arrow),[success=true i].gov-form-input *[slot=right-icon]:not(.icon-arrow),[success="1"].gov-form-input *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-state-color-success, var(--gov-color-success))}[success=""].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success=true i].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success="1"].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[multiline=""].gov-form-input *[slot=left-icon],[multiline=""].gov-form-input *[slot=right-icon],[multiline=true i].gov-form-input *[slot=left-icon],[multiline=true i].gov-form-input *[slot=right-icon],[multiline="1"].gov-form-input *[slot=left-icon],[multiline="1"].gov-form-input *[slot=right-icon]{display:none}.gov-form-input[type=reset] input{border-width:0}.gov-form-input[type=reset] input:focus{outline:none}';const y=b;var w;(function(o){o["INPUT"]="input";o["TEXTAREA"]="textarea"})(w||(w={}));const k=o(class o extends i{constructor(){super();this.__registerHost();this.govFocus=t(this,"gov-focus",7);this.govBlur=t(this,"gov-blur",7);this.govInput=t(this,"gov-input",7);this.govKeyUp=t(this,"gov-keyup",7);this.govHydrated=t(this,"gov-hydrated",7);this.govKeyDown=t(this,"gov-keydown",7);this.value=undefined;this.identifier=undefined;this.variant="secondary";this.success=undefined;this.size="m";this.name=undefined;this.multiline=undefined;this.rows=undefined;this.cols=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.minlength=undefined;this.maxlength=undefined;this.min=undefined;this.max=undefined;this.autocomplete=undefined;this.autocorrect=undefined;this.spellcheck=undefined;this.inputLang=undefined;this.type=undefined;this.inputType="text";this.role=undefined;this.invalid=undefined;this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagOwns=undefined;this.wcagAutocomplete=undefined;this.wcagExpanded=undefined;this.focused=undefined;this.h=c(this.host);this.inputId=h("GovInput");this.f=n(this.h)}validateVariant(o){d(s,o,a.root)}validateSize(o){d(l,o,a.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("success",v(this.success));this.f.passAttrToControl("disabled",v(this.disabled));this.f.passAttrToControl("invalid",v(this.invalid))}componentWillLoad(){this.validateVariant(this.variant);this.validateSize(this.size);this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required));this.f.passAttrToControl("type",this.multiline?w.TEXTAREA:w.INPUT)}async componentDidRender(){if(m()){await x(500);await this.validateWcag()}}componentDidLoad(){this.govHydrated.emit()}render(){const o=this.multiline?w.TEXTAREA:w.INPUT;return e(r,{key:"fb06974797e9fe99cc0845cd9aac8cc79bfc0583",class:a.root,size:this.size,variant:this.variant,type:this.type},this.h.hasSlot("prefix")&&e("slot",{key:"c8a307ca8c1e4e4a27ac00463523f19c4012bbfe",name:"prefix"}),e("span",{key:"b86a839790465feda8d50385ca5b44a98c3ee81d",class:"element"},this.h.hasSlot("left-icon")&&e("slot",{key:"300d97f0f13e95ac306b3c0332ccb58b99988c7a",name:"left-icon"}),this.h.hasSlot("right-icon")&&!(this.success||this.invalid)&&e("slot",{key:"6d2673bc16e363b52662671a172f7c20eca85c62",name:"right-icon"}),this.success&&!this.multiline&&e("gov-icon",{key:"40c2f0e9991833ad731e469164d0bd148d883007",slot:"right-icon",class:"icon-validation",name:"check-lg"}),this.invalid&&!this.multiline&&e("gov-icon",{key:"56d940b36602db7749fc1656fdee739b2ad21370",slot:"right-icon",class:"icon-validation",name:"exclamation-lg"}),e(o,{key:"ecdf27b1a0889cfd0367ded8cffd24152c2e1d01",type:this.inputType,disabled:this.disabled,id:this.identifier||this.inputId,name:this.name,onFocus:this.onFocusHandler.bind(this),onInput:this.onInputHandler.bind(this),onBlur:this.onBlurHandler.bind(this),onKeyUp:this.onKeyUpHandler.bind(this),onKeyDown:this.onKeyDownHandler.bind(this),ref:o=>this.inputRef=o,placeholder:this.placeholder,value:this.value,spellcheck:g(this.spellcheck),lang:this.inputLang,readonly:g(this.readonly),autocomplete:p(this.autocomplete),autocorrect:p(this.autocorrect),minlength:this.minlength,maxlength:this.maxlength,min:this.min,max:this.max,required:this.required,rows:this.rows,cols:this.cols,role:this.role,"aria-required":g(this.required),"aria-invalid":g(this.invalid),"aria-disabled":g(this.disabled),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-owns":this.wcagOwns,"aria-expanded":g(this.wcagExpanded),"aria-autocomplete":this.wcagAutocomplete})),this.h.hasSlot("sufix")&&e("slot",{key:"bd6b9c7a981c40fdddf83e8ce0778978e1ea31af",name:"sufix"}))}onFocusHandler(o){o.stopPropagation();this.focused=true;this.govFocus.emit({component:a.root,value:this.value,originalEvent:o})}onBlurHandler(o){o.stopPropagation();this.focused=false;this.govBlur.emit({component:a.root,value:this.value,originalEvent:o})}onKeyUpHandler(o){o.stopPropagation();this.govKeyUp.emit({component:a.root,value:this.value,originalEvent:o})}onKeyDownHandler(o){o.stopPropagation();this.govKeyDown.emit({component:a.root,value:this.value,originalEvent:o})}onInputHandler(o){this.value=o.target.value;o.stopPropagation();this.govInput.emit({component:a.root,value:this.value,originalEvent:o})}async setFocus(o){return this.inputRef.focus(o)}async setValue(o){this.value=o}async clearValue(){this.value="";this.inputRef.value=""}async getRef(){return this.inputRef}async validateWcag(){f(this.wcagDescribedBy,"wcag-described-by",a.root);f(this.wcagLabelledBy,"wcag-labelled-by",a.root);f(this.wcagOwns,"wcag-owns",a.root);u(this.identifier||this.inputId,this.wcagLabelledBy,a.root)}get host(){return this}static get watchers(){return{variant:["validateVariant"],size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}}static get style(){return y}},[4,"gov-form-input",{value:[1537],identifier:[1],variant:[1],success:[516],size:[1],name:[1],multiline:[4],rows:[2],cols:[2],required:[516],disabled:[516],placeholder:[1],readonly:[4],minlength:[2],maxlength:[2],min:[8],max:[8],autocomplete:[4],autocorrect:[4],spellcheck:[4],inputLang:[1,"input-lang"],type:[1],inputType:[1,"input-type"],role:[1],invalid:[516],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]},undefined,{variant:["validateVariant"],size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}]);function A(){if(typeof customElements==="undefined"){return}const o=["gov-form-input","gov-icon"];o.forEach((o=>{switch(o){case"gov-form-input":if(!customElements.get(o)){customElements.define(o,k)}break;case"gov-icon":if(!customElements.get(o)){z()}break}}))}A();export{k as G,A as d};
2
- //# sourceMappingURL=p-f4086eab.js.map
1
+ import{p as o,H as i,c as t,h as e,d as r}from"./p-d6759ac3.js";import{g as n,c as a,d as s,e as l}from"./p-77a6e3be.js";import{g as c,a as v,t as g,c as p}from"./p-d687df8f.js";import{c as m}from"./p-e618f1cb.js";import{v as d}from"./p-344c72d7.js";import{b as f,c as u}from"./p-6b0471a8.js";import{c as h}from"./p-95d41a3b.js";import{d as x}from"./p-e0e2e9c1.js";import{d as z}from"./p-2dce8f2c.js";const b='.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-input{position:relative;display:flex;width:100%;align-items:center}.gov-form-input .element{position:relative;display:flex;flex:1 1 auto}.gov-form-input input,.gov-form-input select,.gov-form-input 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-input input:focus,.gov-form-input select:focus,.gov-form-input textarea:focus{outline:none}.gov-form-input input:focus-visible,.gov-form-input select:focus-visible,.gov-form-input 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-input input::-moz-placeholder,.gov-form-input select::-moz-placeholder,.gov-form-input textarea::-moz-placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-input input::placeholder,.gov-form-input select::placeholder,.gov-form-input textarea::placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-input 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-input *[slot=left-icon],.gov-form-input *[slot=right-icon]{position:absolute;top:50%;display:flex;justify-content:center;transform:translateY(-50%);pointer-events:none}.gov-form-input *[slot=left-icon]{left:0}.gov-form-input *[slot=right-icon]{right:0}.gov-form-input *[slot=prefix],.gov-form-input *[slot=sufix]{margin:0}[size=s].gov-form-input{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-input input,[size=s].gov-form-input 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-input *[slot=left-icon],[size=s].gov-form-input *[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-input *[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-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=s].gov-form-input *[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-input *[slot=right-icon]~input,[size=s].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=m].gov-form-input{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-input input,[size=m].gov-form-input 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-input *[slot=left-icon],[size=m].gov-form-input *[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-input *[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-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=m].gov-form-input *[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-input *[slot=right-icon]~input,[size=m].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=l].gov-form-input{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-input input,[size=l].gov-form-input 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-input *[slot=left-icon],[size=l].gov-form-input *[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-input *[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-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=l].gov-form-input *[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-input *[slot=right-icon]~input,[size=l].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=xl].gov-form-input{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-input input,[size=xl].gov-form-input 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-input *[slot=left-icon],[size=xl].gov-form-input *[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-input *[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-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-xl-icon-padding, 3rem)}[size=xl].gov-form-input *[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-input *[slot=right-icon]~input,[size=xl].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-xl-icon-padding, 3rem)}[variant=primary].gov-form-input input,[variant=primary].gov-form-input select,[variant=primary].gov-form-input 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-input *[slot=left-icon],[variant=primary].gov-form-input *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-primary, var(--gov-color-primary))}[variant=secondary].gov-form-input input,[variant=secondary].gov-form-input select,[variant=secondary].gov-form-input 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-input *[slot=left-icon],[variant=secondary].gov-form-input *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-secondary, var(--gov-color-primary))}[disabled=""].gov-form-input,[disabled=true i].gov-form-input,[disabled="1"].gov-form-input{pointer-events:none}[disabled=""].gov-form-input input,[disabled=""].gov-form-input select,[disabled=""].gov-form-input textarea,[disabled=true i].gov-form-input input,[disabled=true i].gov-form-input select,[disabled=true i].gov-form-input textarea,[disabled="1"].gov-form-input input,[disabled="1"].gov-form-input select,[disabled="1"].gov-form-input 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-input *[slot=left-icon],[disabled=""].gov-form-input *[slot=right-icon],[disabled=true i].gov-form-input *[slot=left-icon],[disabled=true i].gov-form-input *[slot=right-icon],[disabled="1"].gov-form-input *[slot=left-icon],[disabled="1"].gov-form-input *[slot=right-icon]{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600)) !important}[invalid=""].gov-form-input input,[invalid=""].gov-form-input select,[invalid=""].gov-form-input textarea,[invalid=true i].gov-form-input input,[invalid=true i].gov-form-input select,[invalid=true i].gov-form-input textarea,[invalid="1"].gov-form-input input,[invalid="1"].gov-form-input select,[invalid="1"].gov-form-input 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-input input::-moz-placeholder,[invalid=""].gov-form-input select::-moz-placeholder,[invalid=""].gov-form-input textarea::-moz-placeholder,[invalid=true i].gov-form-input input::-moz-placeholder,[invalid=true i].gov-form-input select::-moz-placeholder,[invalid=true i].gov-form-input textarea::-moz-placeholder,[invalid="1"].gov-form-input input::-moz-placeholder,[invalid="1"].gov-form-input select::-moz-placeholder,[invalid="1"].gov-form-input textarea::-moz-placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-input input::placeholder,[invalid=""].gov-form-input select::placeholder,[invalid=""].gov-form-input textarea::placeholder,[invalid=true i].gov-form-input input::placeholder,[invalid=true i].gov-form-input select::placeholder,[invalid=true i].gov-form-input textarea::placeholder,[invalid="1"].gov-form-input input::placeholder,[invalid="1"].gov-form-input select::placeholder,[invalid="1"].gov-form-input textarea::placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-input *[slot=left-icon],[invalid=""].gov-form-input *[slot=right-icon],[invalid=true i].gov-form-input *[slot=left-icon],[invalid=true i].gov-form-input *[slot=right-icon],[invalid="1"].gov-form-input *[slot=left-icon],[invalid="1"].gov-form-input *[slot=right-icon]{color:var(--gov-form-state-color-error, var(--gov-color-error)) !important}[invalid=""].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid=true i].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid="1"].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[success=""].gov-form-input *[slot=right-icon]:not(.icon-arrow),[success=true i].gov-form-input *[slot=right-icon]:not(.icon-arrow),[success="1"].gov-form-input *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-state-color-success, var(--gov-color-success))}[success=""].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success=true i].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success="1"].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[multiline=""].gov-form-input *[slot=left-icon],[multiline=""].gov-form-input *[slot=right-icon],[multiline=true i].gov-form-input *[slot=left-icon],[multiline=true i].gov-form-input *[slot=right-icon],[multiline="1"].gov-form-input *[slot=left-icon],[multiline="1"].gov-form-input *[slot=right-icon]{display:none}.gov-form-input[type=reset] input{border-width:0}.gov-form-input[type=reset] input:focus{outline:none}';const y=b;var w;(function(o){o["INPUT"]="input";o["TEXTAREA"]="textarea"})(w||(w={}));const k=o(class o extends i{constructor(){super();this.__registerHost();this.govFocus=t(this,"gov-focus",7);this.govBlur=t(this,"gov-blur",7);this.govInput=t(this,"gov-input",7);this.govKeyUp=t(this,"gov-keyup",7);this.govHydrated=t(this,"gov-hydrated",7);this.govKeyDown=t(this,"gov-keydown",7);this.value=undefined;this.identifier=undefined;this.variant="secondary";this.success=undefined;this.size="m";this.name=undefined;this.multiline=undefined;this.rows=undefined;this.cols=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.minlength=undefined;this.maxlength=undefined;this.min=undefined;this.max=undefined;this.autocomplete=undefined;this.autocorrect=undefined;this.spellcheck=undefined;this.inputLang=undefined;this.type=undefined;this.inputType="text";this.role=undefined;this.invalid=undefined;this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagOwns=undefined;this.wcagAutocomplete=undefined;this.wcagExpanded=undefined;this.focused=undefined;this.h=c(this.host);this.inputId=h("GovInput");this.f=n(this.h)}validateVariant(o){d(s,o,a.root)}validateSize(o){d(l,o,a.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("success",v(this.success));this.f.passAttrToControl("disabled",v(this.disabled));this.f.passAttrToControl("invalid",v(this.invalid))}componentWillLoad(){this.validateVariant(this.variant);this.validateSize(this.size);this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required));this.f.passAttrToControl("type",this.multiline?w.TEXTAREA:w.INPUT)}async componentDidRender(){if(m()){await x(500);await this.validateWcag()}this.passControlAttrs()}componentDidLoad(){this.govHydrated.emit()}render(){const o=this.multiline?w.TEXTAREA:w.INPUT;return e(r,{key:"bae879c01d6c58022adc6c0fe5e5a68e66dad44f",class:a.root,size:this.size,variant:this.variant,type:this.type},this.h.hasSlot("prefix")&&e("slot",{key:"bdbc330daa350dfa24f666dfc6d29a4fe35b2a2b",name:"prefix"}),e("span",{key:"a90eaab54b005ee3b8f063a8d056154f5f178ee5",class:"element"},this.h.hasSlot("left-icon")&&e("slot",{key:"681a2029ee87092deac624df44788c494303e52e",name:"left-icon"}),this.h.hasSlot("right-icon")&&!(this.success||this.invalid)&&e("slot",{key:"80963733351147407a2df6acd26892198de250b5",name:"right-icon"}),this.success&&!this.multiline&&e("gov-icon",{key:"4ebf87ec5d022f1c6943481ca69e0cab62931ddf",slot:"right-icon",class:"icon-validation",name:"check-lg"}),this.invalid&&!this.multiline&&e("gov-icon",{key:"ee2b21a80ce8757f94a424019f4104f3a630f05c",slot:"right-icon",class:"icon-validation",name:"exclamation-lg"}),e(o,{key:"a69eb58bc00c299f1d66601de19cc7112757a4d0",type:this.inputType,disabled:this.disabled,id:this.identifier||this.inputId,name:this.name,onFocus:this.onFocusHandler.bind(this),onInput:this.onInputHandler.bind(this),onBlur:this.onBlurHandler.bind(this),onKeyUp:this.onKeyUpHandler.bind(this),onKeyDown:this.onKeyDownHandler.bind(this),ref:o=>this.inputRef=o,placeholder:this.placeholder,value:this.value,spellcheck:g(this.spellcheck),lang:this.inputLang,readonly:g(this.readonly),autocomplete:p(this.autocomplete),autocorrect:p(this.autocorrect),minlength:this.minlength,maxlength:this.maxlength,min:this.min,max:this.max,required:this.required,rows:this.rows,cols:this.cols,role:this.role,"aria-required":g(this.required),"aria-invalid":g(this.invalid),"aria-disabled":g(this.disabled),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-owns":this.wcagOwns,"aria-expanded":g(this.wcagExpanded),"aria-autocomplete":this.wcagAutocomplete})),this.h.hasSlot("sufix")&&e("slot",{key:"0624cc730480547bf250a7ab553212c0e17d6fe8",name:"sufix"}))}onFocusHandler(o){o.stopPropagation();this.focused=true;this.govFocus.emit({component:a.root,value:this.value,originalEvent:o})}onBlurHandler(o){o.stopPropagation();this.focused=false;this.govBlur.emit({component:a.root,value:this.value,originalEvent:o})}onKeyUpHandler(o){o.stopPropagation();this.govKeyUp.emit({component:a.root,value:this.value,originalEvent:o})}onKeyDownHandler(o){o.stopPropagation();this.govKeyDown.emit({component:a.root,value:this.value,originalEvent:o})}onInputHandler(o){this.value=o.target.value;o.stopPropagation();this.govInput.emit({component:a.root,value:this.value,originalEvent:o})}async setFocus(o){return this.inputRef.focus(o)}async setValue(o){this.value=o}async clearValue(){this.value="";this.inputRef.value=""}async getRef(){return this.inputRef}async validateWcag(){f(this.wcagDescribedBy,"wcag-described-by",a.root);f(this.wcagLabelledBy,"wcag-labelled-by",a.root);f(this.wcagOwns,"wcag-owns",a.root);u(this.identifier||this.inputId,this.wcagLabelledBy,a.root)}get host(){return this}static get watchers(){return{variant:["validateVariant"],size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}}static get style(){return y}},[4,"gov-form-input",{value:[1537],identifier:[1],variant:[1],success:[516],size:[1],name:[1],multiline:[4],rows:[2],cols:[2],required:[516],disabled:[516],placeholder:[1],readonly:[4],minlength:[2],maxlength:[2],min:[8],max:[8],autocomplete:[4],autocorrect:[4],spellcheck:[4],inputLang:[1,"input-lang"],type:[1],inputType:[1,"input-type"],role:[1],invalid:[516],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]},undefined,{variant:["validateVariant"],size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}]);function A(){if(typeof customElements==="undefined"){return}const o=["gov-form-input","gov-icon"];o.forEach((o=>{switch(o){case"gov-form-input":if(!customElements.get(o)){customElements.define(o,k)}break;case"gov-icon":if(!customElements.get(o)){z()}break}}))}A();export{k as G,A as d};
2
+ //# sourceMappingURL=p-708dca47.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["govFormInputCss","GovFormInputStyle0","Tags","GovFormInput","proxyCustomElement","H","constructor","this","h","govHost","host","inputId","createID","f","govForm","validateVariant","newValue","validateProp","FormInputVariants","FormInputClass","root","validateSize","FormInputSizes","watchControlAttrs","passControlAttrs","passAttrToControl","size","toBoolAttr","success","disabled","invalid","componentWillLoad","variant","passAttrToLabel","String","required","multiline","TEXTAREA","INPUT","componentDidRender","canValidateWcagOnRender","delay","validateWcag","componentDidLoad","govHydrated","emit","render","Tag","Host","key","class","type","hasSlot","name","slot","inputType","id","identifier","onFocus","onFocusHandler","bind","onInput","onInputHandler","onBlur","onBlurHandler","onKeyUp","onKeyUpHandler","onKeyDown","onKeyDownHandler","ref","el","inputRef","placeholder","value","spellcheck","toBoolAttrIfDefined","lang","inputLang","readonly","autocomplete","toOnOffAttrIfDefined","autocorrect","minlength","maxlength","min","max","rows","cols","role","wcagDescribedBy","wcagLabelledBy","wcagOwns","wcagExpanded","wcagAutocomplete","e","stopPropagation","focused","govFocus","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({reflect:true}) 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({reflect:true}) 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({reflect:true}) readonly disabled: boolean = false\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 * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck\n\t */\n\t@Prop() readonly spellcheck: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang\n\t */\n\t@Prop({attribute: \"input-lang\"}) readonly inputLang: string\n\t/**\n\t * Defined 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({attribute: \"input-type\"}) 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({reflect:true}) 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-hydrated\"}) govHydrated: EventEmitter<void>\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(\"success\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"success\", toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\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\tthis.f.passAttrToControl(\"type\", this.multiline ? Tags.TEXTAREA : Tags.INPUT)\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\tcomponentDidLoad() {\n\t\tthis.govHydrated.emit();\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<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<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\tspellcheck={toBoolAttrIfDefined(this.spellcheck)}\n\t\t\t\t\t\tlang={this.inputLang}\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":"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","ignoreList":[]}
1
+ {"version":3,"names":["govFormInputCss","GovFormInputStyle0","Tags","GovFormInput","proxyCustomElement","H","constructor","this","h","govHost","host","inputId","createID","f","govForm","validateVariant","newValue","validateProp","FormInputVariants","FormInputClass","root","validateSize","FormInputSizes","watchControlAttrs","passControlAttrs","passAttrToControl","size","toBoolAttr","success","disabled","invalid","componentWillLoad","variant","passAttrToLabel","String","required","multiline","TEXTAREA","INPUT","componentDidRender","canValidateWcagOnRender","delay","validateWcag","componentDidLoad","govHydrated","emit","render","Tag","Host","key","class","type","hasSlot","name","slot","inputType","id","identifier","onFocus","onFocusHandler","bind","onInput","onInputHandler","onBlur","onBlurHandler","onKeyUp","onKeyUpHandler","onKeyDown","onKeyDownHandler","ref","el","inputRef","placeholder","value","spellcheck","toBoolAttrIfDefined","lang","inputLang","readonly","autocomplete","toOnOffAttrIfDefined","autocorrect","minlength","maxlength","min","max","rows","cols","role","wcagDescribedBy","wcagLabelledBy","wcagOwns","wcagExpanded","wcagAutocomplete","e","stopPropagation","focused","govFocus","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({reflect:true}) 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({reflect:true}) 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({reflect:true}) readonly disabled: boolean = false\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 * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck\n\t */\n\t@Prop() readonly spellcheck: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang\n\t */\n\t@Prop({attribute: \"input-lang\"}) readonly inputLang: string\n\t/**\n\t * Defined 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({attribute: \"input-type\"}) 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({reflect:true}) 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-hydrated\"}) govHydrated: EventEmitter<void>\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(\"success\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"success\", toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\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\tthis.f.passAttrToControl(\"type\", this.multiline ? Tags.TEXTAREA : Tags.INPUT)\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\tthis.passControlAttrs()\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.govHydrated.emit();\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<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<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\tspellcheck={toBoolAttrIfDefined(this.spellcheck)}\n\t\t\t\t\t\tlang={this.inputLang}\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":"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","ignoreList":[]}