@gov-design-system-ce/components 4.1.0-rc02 → 4.1.0-rc1

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 (55) hide show
  1. package/dist/cjs/gov-icon.cjs.entry.js +1 -1
  2. package/dist/components/gov-accordion-item.js +1 -1
  3. package/dist/components/gov-attachments-item.js +1 -1
  4. package/dist/components/gov-breadcrumbs.js +1 -1
  5. package/dist/components/gov-breadcrumbs.js.map +1 -1
  6. package/dist/components/gov-button.js +1 -1
  7. package/dist/components/gov-card.js +1 -1
  8. package/dist/components/gov-chip.js +1 -1
  9. package/dist/components/gov-dialog.js +1 -1
  10. package/dist/components/gov-form-autocomplete.js +1 -1
  11. package/dist/components/gov-form-checkbox.js +1 -1
  12. package/dist/components/gov-form-file.js +1 -1
  13. package/dist/components/gov-form-input.js +1 -1
  14. package/dist/components/gov-form-multi-select.js +1 -1
  15. package/dist/components/gov-form-select.js +1 -1
  16. package/dist/components/gov-form-switch.js +1 -1
  17. package/dist/components/gov-icon.js +1 -1
  18. package/dist/components/gov-infobar.js +1 -1
  19. package/dist/components/gov-loading.js +1 -1
  20. package/dist/components/gov-pagination.js +1 -1
  21. package/dist/components/gov-pagination.js.map +1 -1
  22. package/dist/components/gov-tabs.js +1 -1
  23. package/dist/components/gov-tag.js +1 -1
  24. package/dist/components/gov-tile.js +1 -1
  25. package/dist/components/gov-toast.js +1 -1
  26. package/dist/components/gov-tooltip-content.js +1 -1
  27. package/dist/components/gov-tooltip-content.js.map +1 -1
  28. package/dist/components/gov-wizard-item.js +1 -1
  29. package/dist/components/{p-e20bb5dc.js → p-1366ed8d.js} +2 -2
  30. package/dist/components/p-778e3fff.js +2 -0
  31. package/dist/components/{p-e9b35956.js.map → p-778e3fff.js.map} +1 -1
  32. package/dist/components/{p-c9a15c52.js → p-7fd16831.js} +2 -2
  33. package/dist/components/{p-2da35aa8.js → p-cc90a508.js} +2 -2
  34. package/dist/components/p-d5f25595.js +2 -0
  35. package/dist/components/{p-5caf1fe1.js.map → p-d5f25595.js.map} +1 -1
  36. package/dist/components/p-dbae2385.js +2 -0
  37. package/dist/components/{p-fe1842da.js.map → p-dbae2385.js.map} +1 -1
  38. package/dist/components/{p-ff0cf148.js → p-dcaf0383.js} +2 -2
  39. package/dist/core/core.esm.js +1 -1
  40. package/dist/core/p-a16229c6.entry.js +2 -0
  41. package/dist/core/{p-74e9ad9d.entry.js.map → p-a16229c6.entry.js.map} +1 -1
  42. package/dist/esm/gov-icon.entry.js +1 -1
  43. package/dist/hydrate/index.js +1 -1
  44. package/dist/hydrate/index.mjs +1 -1
  45. package/dist/stencil.config.js +3 -4
  46. package/dist/stencil.config.js.map +1 -1
  47. package/package.json +2 -2
  48. package/dist/components/p-5caf1fe1.js +0 -2
  49. package/dist/components/p-e9b35956.js +0 -2
  50. package/dist/components/p-fe1842da.js +0 -2
  51. package/dist/core/p-74e9ad9d.entry.js +0 -2
  52. /package/dist/components/{p-e20bb5dc.js.map → p-1366ed8d.js.map} +0 -0
  53. /package/dist/components/{p-c9a15c52.js.map → p-7fd16831.js.map} +0 -0
  54. /package/dist/components/{p-2da35aa8.js.map → p-cc90a508.js.map} +0 -0
  55. /package/dist/components/{p-ff0cf148.js.map → p-dcaf0383.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,h as s,d as o}from"./p-ae3dada7.js";import{g as i}from"./p-0075138f.js";import{v as a}from"./p-19c681a3.js";import{a as c,c as n}from"./p-08621bdf.js";import{p as f}from"./p-e0e2e9c1.js";import{S as r}from"./p-92f420cb.js";import{p as d}from"./p-016bbea6.js";import{d as l}from"./p-5caf1fe1.js";const m=f(r,["_XS","_S","_M"]);var h;(function(e){e["BOLD"]="bold";e["SUBTLE"]="subtle"})(h||(h={}));const p={root:"gov-tag"};const b=e(class e extends t{constructor(){super();this.__registerHost();this.iconLeft=undefined;this.iconRight=undefined;this.size=m._S;this.color=c.PRIMARY;this.type=undefined;this.h=i(this.host)}validateColor(e){a(c,e,p.root)}validateSize(e){a(n,e,p.root)}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size)}render(){const e=d(this.iconLeft);const t=d(this.iconRight);return s(o,{key:"836c745e82121e969d096f83fd799593de02a52b",class:this.h.classes(p.root),color:this.color,size:this.size,type:this.type},s("span",{key:"03084f10265357de1e4f136d2da12390ada68701",class:"element"},this.h.hasSlot("left-icon")&&s("slot",{key:"6014fd042c92e618af0bfa08cf27c56f42091034",name:"left-icon"}),e&&s("gov-icon",{key:"86b2616d3e6d26b73c65cf6f0f602a87e2f60e11",type:e.type,name:e.name}),s("slot",{key:"6e8a6587e99230060dba6e803e79d301c6bb206c"}),t&&s("gov-icon",{key:"7e89a01d59ce60b16af9ad1a4b7e4f31373ffa13",type:t.type,name:t.name}),this.h.hasSlot("right-icon")&&s("slot",{key:"530777fa0fd108080debaecb412b486bc17e3153",name:"right-icon"})))}get host(){return this}static get watchers(){return{color:["validateColor"],size:["validateSize"]}}},[4,"gov-tag",{iconLeft:[1,"icon-left"],iconRight:[1,"icon-right"],size:[513],color:[513],type:[513]},undefined,{color:["validateColor"],size:["validateSize"]}]);function g(){if(typeof customElements==="undefined"){return}const e=["gov-tag","gov-icon"];e.forEach((e=>{switch(e){case"gov-tag":if(!customElements.get(e)){customElements.define(e,b)}break;case"gov-icon":if(!customElements.get(e)){l()}break}}))}g();const u=b;const v=g;export{u as GovTag,v as defineCustomElement};
1
+ import{p as e,H as t,h as s,d as o}from"./p-ae3dada7.js";import{g as i}from"./p-0075138f.js";import{v as a}from"./p-19c681a3.js";import{a as c,c as n}from"./p-08621bdf.js";import{p as f}from"./p-e0e2e9c1.js";import{S as r}from"./p-92f420cb.js";import{p as d}from"./p-016bbea6.js";import{d as l}from"./p-d5f25595.js";const m=f(r,["_XS","_S","_M"]);var h;(function(e){e["BOLD"]="bold";e["SUBTLE"]="subtle"})(h||(h={}));const p={root:"gov-tag"};const b=e(class e extends t{constructor(){super();this.__registerHost();this.iconLeft=undefined;this.iconRight=undefined;this.size=m._S;this.color=c.PRIMARY;this.type=undefined;this.h=i(this.host)}validateColor(e){a(c,e,p.root)}validateSize(e){a(n,e,p.root)}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size)}render(){const e=d(this.iconLeft);const t=d(this.iconRight);return s(o,{key:"836c745e82121e969d096f83fd799593de02a52b",class:this.h.classes(p.root),color:this.color,size:this.size,type:this.type},s("span",{key:"03084f10265357de1e4f136d2da12390ada68701",class:"element"},this.h.hasSlot("left-icon")&&s("slot",{key:"6014fd042c92e618af0bfa08cf27c56f42091034",name:"left-icon"}),e&&s("gov-icon",{key:"86b2616d3e6d26b73c65cf6f0f602a87e2f60e11",type:e.type,name:e.name}),s("slot",{key:"6e8a6587e99230060dba6e803e79d301c6bb206c"}),t&&s("gov-icon",{key:"7e89a01d59ce60b16af9ad1a4b7e4f31373ffa13",type:t.type,name:t.name}),this.h.hasSlot("right-icon")&&s("slot",{key:"530777fa0fd108080debaecb412b486bc17e3153",name:"right-icon"})))}get host(){return this}static get watchers(){return{color:["validateColor"],size:["validateSize"]}}},[4,"gov-tag",{iconLeft:[1,"icon-left"],iconRight:[1,"icon-right"],size:[513],color:[513],type:[513]},undefined,{color:["validateColor"],size:["validateSize"]}]);function g(){if(typeof customElements==="undefined"){return}const e=["gov-tag","gov-icon"];e.forEach((e=>{switch(e){case"gov-tag":if(!customElements.get(e)){customElements.define(e,b)}break;case"gov-icon":if(!customElements.get(e)){l()}break}}))}g();const u=b;const v=g;export{u as GovTag,v as defineCustomElement};
2
2
  //# sourceMappingURL=gov-tag.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,h as s,F as i,d as o}from"./p-ae3dada7.js";import{p as n}from"./p-e0e2e9c1.js";import{S as a}from"./p-92f420cb.js";import{g as c}from"./p-0075138f.js";import{d as r}from"./p-5caf1fe1.js";n(a,["_S","_M","_L"]);const d={root:"gov-tile",link:"gov-tile__link",content:"gov-tile__content",text:"gov-tile__text",title:"gov-tile__title",icon:"gov-tile__icon",annotation:"gov-tile__annotation"};const f=e(class e extends t{constructor(){super();this.__registerHost();this.size="m";this.orientation=undefined;this.noBorder=false;this.href=undefined;this.target=undefined;this.h=c(this.host)}render(){return s(o,{key:"64992b51709754e4b094dffaacb32439800e878f",class:this.h.classes(d.root),size:this.size,orientation:this.orientation,clickable:this.href?true:null},s("slot",{key:"807706674b6d398a41a25bcbb100742a8bc8cebc",name:"icon"}),s("div",{key:"b46011ea1ced783cf69187e18739b67c45137074",class:d.content},s("div",{key:"9e491d7ddc78c02290102623db5c2d639e19bb3e",class:d.text},s("div",{key:"12ec2a5d7988d7772f3228f79f1473378e5fe97d",class:d.title},this.href?s(i,null,s("a",{href:this.href,target:this.target,class:d.link,ref:e=>this.triggerRef=e},s("slot",{name:"title"})),s("span",{class:d.icon},s("gov-icon",{name:"chevron-right"}))):s("slot",{name:"title"})),s("div",{key:"6ef9ba50fcd48facb2afea70d3881141e3c6e54a",class:`${d.annotation} ${this.href?`${d.annotation}--padding`:""}`},s("slot",{key:"c7d77b3642179b42a3b54423e53197385c0970e4"}))),s("slot",{key:"efe6564689ed24e259985fddfe53ddf70ac76238",name:"button"})))}async getTriggerRef(){return this.triggerRef}get host(){return this}},[4,"gov-tile",{size:[513],orientation:[1],noBorder:[4,"no-border"],href:[513],target:[1],getTriggerRef:[64]}]);function l(){if(typeof customElements==="undefined"){return}const e=["gov-tile","gov-icon"];e.forEach((e=>{switch(e){case"gov-tile":if(!customElements.get(e)){customElements.define(e,f)}break;case"gov-icon":if(!customElements.get(e)){r()}break}}))}l();const b=f;const g=l;export{b as GovTile,g as defineCustomElement};
1
+ import{p as e,H as t,h as s,F as i,d as o}from"./p-ae3dada7.js";import{p as n}from"./p-e0e2e9c1.js";import{S as a}from"./p-92f420cb.js";import{g as c}from"./p-0075138f.js";import{d as r}from"./p-d5f25595.js";n(a,["_S","_M","_L"]);const d={root:"gov-tile",link:"gov-tile__link",content:"gov-tile__content",text:"gov-tile__text",title:"gov-tile__title",icon:"gov-tile__icon",annotation:"gov-tile__annotation"};const l=e(class e extends t{constructor(){super();this.__registerHost();this.size="m";this.orientation=undefined;this.noBorder=false;this.href=undefined;this.target=undefined;this.h=c(this.host)}render(){return s(o,{key:"64992b51709754e4b094dffaacb32439800e878f",class:this.h.classes(d.root),size:this.size,orientation:this.orientation,clickable:this.href?true:null},s("slot",{key:"807706674b6d398a41a25bcbb100742a8bc8cebc",name:"icon"}),s("div",{key:"b46011ea1ced783cf69187e18739b67c45137074",class:d.content},s("div",{key:"9e491d7ddc78c02290102623db5c2d639e19bb3e",class:d.text},s("div",{key:"12ec2a5d7988d7772f3228f79f1473378e5fe97d",class:d.title},this.href?s(i,null,s("a",{href:this.href,target:this.target,class:d.link,ref:e=>this.triggerRef=e},s("slot",{name:"title"})),s("span",{class:d.icon},s("gov-icon",{name:"chevron-right"}))):s("slot",{name:"title"})),s("div",{key:"6ef9ba50fcd48facb2afea70d3881141e3c6e54a",class:`${d.annotation} ${this.href?`${d.annotation}--padding`:""}`},s("slot",{key:"c7d77b3642179b42a3b54423e53197385c0970e4"}))),s("slot",{key:"efe6564689ed24e259985fddfe53ddf70ac76238",name:"button"})))}async getTriggerRef(){return this.triggerRef}get host(){return this}},[4,"gov-tile",{size:[513],orientation:[1],noBorder:[4,"no-border"],href:[513],target:[1],getTriggerRef:[64]}]);function f(){if(typeof customElements==="undefined"){return}const e=["gov-tile","gov-icon"];e.forEach((e=>{switch(e){case"gov-tile":if(!customElements.get(e)){customElements.define(e,l)}break;case"gov-icon":if(!customElements.get(e)){r()}break}}))}f();const b=l;const g=f;export{b as GovTile,g as defineCustomElement};
2
2
  //# sourceMappingURL=gov-tile.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,c as e,h as i,d as o}from"./p-ae3dada7.js";import{v as a}from"./p-19c681a3.js";import{C as c}from"./p-e3aeaca0.js";import{p as r}from"./p-e0e2e9c1.js";import{g as n}from"./p-0075138f.js";import{c as h}from"./p-95d41a3b.js";import{A as d,a as l,i as m}from"./p-33d5d1ed.js";import{d as f}from"./p-e20bb5dc.js";import{d as b}from"./p-5caf1fe1.js";const u=r(c,["PRIMARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);var p;(function(t){t["BOLD"]="bold";t["SUBTLE"]="subtle"})(p||(p={}));const v={root:"gov-toast",hidden:"gov-toast--hidden",content:"gov-toast__content",close:"gov-toast__close",timer:"gov-toast__timer"};const g=t(class t extends s{constructor(){super();this.__registerHost();this.govClose=e(this,"gov-close",7);this.color="primary";this.gravity="top";this.position="right";this.type="bold";this.time=0;this.closeLabel=undefined;this.accessibleCloseLabel=undefined;this.inheritedAttributes={};this.h=n(this.host);this.toastId=h("GovToast")}validateColor(t){a(u,t,v.root)}componentDidLoad(){this.attributeObserver=new d(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(l)}componentWillLoad(){this.validateColor(this.color);this.runTimer();this.inheritedAttributes=m(this.host)}disconnectedCallback(){clearTimeout(this.timeout);this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}runTimer(){if(this.isTimer){this.timeout=setTimeout((()=>{this.host.classList.add(v.hidden);setTimeout((()=>{this.destroy().catch();this.govClose.emit(this.toastId)}),600)}),this.time)}}render(){return i(o,{key:"940d040e89e39a45d89398d0b1bf7df0ad541132",class:this.h.classes(v.root),"data-toast-id":this.toastId,gravity:this.gravity,position:this.position,color:this.color,type:this.type,style:{"--toast-duration":this.time+"ms"}},this.h.hasSlot("icon")&&i("slot",{key:"83468790661861781f8c1a0cbbb3b9a81f4a3120",name:"icon"}),i("div",Object.assign({key:"ae1ade607226894dfa26a0a5d9cd8dc727d23ea7",class:v.content},this.inheritedAttributes,{"aria-live":"polite",role:"status"}),i("slot",{key:"a53e4ec532d32417cd64950cc174c63c83e1a7eb"})),i("gov-button",{key:"5e8ff6bc372ff702e883386e0968a61a297afdf5",size:"s","aria-label":this.accessibleCloseLabel,color:this.isBold?this.color:"neutral",type:"base","on-gov-click":this.onCloseHandler.bind(this),class:v.close},this.closeLabel?this.closeLabel:i("gov-icon",{name:"x-lg"})),i("div",{key:"bf031915e9731e8f34a922651948f5a2efd8e95c",class:v.timer}))}onCloseHandler(){this.destroy().then((()=>this.govClose.emit(this.toastId))).catch()}get isBold(){return this.type==="bold"}get isTimer(){return Number.isInteger(this.time)&&this.time>0}async destroy(){clearTimeout(this.timeout);const t=document.querySelector(`[data-toast-id="${this.toastId}"]`);if(t){t.classList.add(v.hidden);if(typeof t.remove==="function"){t.remove()}}}get host(){return this}static get watchers(){return{color:["validateColor"]}}},[4,"gov-toast",{color:[1],gravity:[1],position:[1],type:[1],time:[2],closeLabel:[1,"close-label"],accessibleCloseLabel:[1,"accessible-close-label"],inheritedAttributes:[32],destroy:[64]},undefined,{color:["validateColor"]}]);function y(){if(typeof customElements==="undefined"){return}const t=["gov-toast","gov-button","gov-icon"];t.forEach((t=>{switch(t){case"gov-toast":if(!customElements.get(t)){customElements.define(t,g)}break;case"gov-button":if(!customElements.get(t)){f()}break;case"gov-icon":if(!customElements.get(t)){b()}break}}))}y();const j=g;const k=y;export{j as GovToast,k as defineCustomElement};
1
+ import{p as t,H as s,c as e,h as i,d as o}from"./p-ae3dada7.js";import{v as a}from"./p-19c681a3.js";import{C as c}from"./p-e3aeaca0.js";import{p as r}from"./p-e0e2e9c1.js";import{g as n}from"./p-0075138f.js";import{c as h}from"./p-95d41a3b.js";import{A as d,a as l,i as m}from"./p-33d5d1ed.js";import{d as f}from"./p-1366ed8d.js";import{d as u}from"./p-d5f25595.js";const b=r(c,["PRIMARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);var p;(function(t){t["BOLD"]="bold";t["SUBTLE"]="subtle"})(p||(p={}));const v={root:"gov-toast",hidden:"gov-toast--hidden",content:"gov-toast__content",close:"gov-toast__close",timer:"gov-toast__timer"};const g=t(class t extends s{constructor(){super();this.__registerHost();this.govClose=e(this,"gov-close",7);this.color="primary";this.gravity="top";this.position="right";this.type="bold";this.time=0;this.closeLabel=undefined;this.accessibleCloseLabel=undefined;this.inheritedAttributes={};this.h=n(this.host);this.toastId=h("GovToast")}validateColor(t){a(b,t,v.root)}componentDidLoad(){this.attributeObserver=new d(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(l)}componentWillLoad(){this.validateColor(this.color);this.runTimer();this.inheritedAttributes=m(this.host)}disconnectedCallback(){clearTimeout(this.timeout);this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}runTimer(){if(this.isTimer){this.timeout=setTimeout((()=>{this.host.classList.add(v.hidden);setTimeout((()=>{this.destroy().catch();this.govClose.emit(this.toastId)}),600)}),this.time)}}render(){return i(o,{key:"940d040e89e39a45d89398d0b1bf7df0ad541132",class:this.h.classes(v.root),"data-toast-id":this.toastId,gravity:this.gravity,position:this.position,color:this.color,type:this.type,style:{"--toast-duration":this.time+"ms"}},this.h.hasSlot("icon")&&i("slot",{key:"83468790661861781f8c1a0cbbb3b9a81f4a3120",name:"icon"}),i("div",Object.assign({key:"ae1ade607226894dfa26a0a5d9cd8dc727d23ea7",class:v.content},this.inheritedAttributes,{"aria-live":"polite",role:"status"}),i("slot",{key:"a53e4ec532d32417cd64950cc174c63c83e1a7eb"})),i("gov-button",{key:"5e8ff6bc372ff702e883386e0968a61a297afdf5",size:"s","aria-label":this.accessibleCloseLabel,color:this.isBold?this.color:"neutral",type:"base","on-gov-click":this.onCloseHandler.bind(this),class:v.close},this.closeLabel?this.closeLabel:i("gov-icon",{name:"x-lg"})),i("div",{key:"bf031915e9731e8f34a922651948f5a2efd8e95c",class:v.timer}))}onCloseHandler(){this.destroy().then((()=>this.govClose.emit(this.toastId))).catch()}get isBold(){return this.type==="bold"}get isTimer(){return Number.isInteger(this.time)&&this.time>0}async destroy(){clearTimeout(this.timeout);const t=document.querySelector(`[data-toast-id="${this.toastId}"]`);if(t){t.classList.add(v.hidden);if(typeof t.remove==="function"){t.remove()}}}get host(){return this}static get watchers(){return{color:["validateColor"]}}},[4,"gov-toast",{color:[1],gravity:[1],position:[1],type:[1],time:[2],closeLabel:[1,"close-label"],accessibleCloseLabel:[1,"accessible-close-label"],inheritedAttributes:[32],destroy:[64]},undefined,{color:["validateColor"]}]);function y(){if(typeof customElements==="undefined"){return}const t=["gov-toast","gov-button","gov-icon"];t.forEach((t=>{switch(t){case"gov-toast":if(!customElements.get(t)){customElements.define(t,g)}break;case"gov-button":if(!customElements.get(t)){f()}break;case"gov-icon":if(!customElements.get(t)){u()}break}}))}y();const j=g;const k=y;export{j as GovToast,k as defineCustomElement};
2
2
  //# sourceMappingURL=gov-toast.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,h as e,d as i}from"./p-ae3dada7.js";import{T as o,a as n,b as c}from"./p-565120d5.js";import{c as a}from"./p-0075138f.js";import{d as l}from"./p-e20bb5dc.js";import{d as r}from"./p-5caf1fe1.js";const f=t(class t extends s{constructor(){super();this.__registerHost();this.color=o.PRIMARY;this.size=n._M;this.persist=false;this.isVisible=false;this.parentId=null}visibleContent(t){clearTimeout(this.timeout);if(t===false){this.timeout=setTimeout((()=>{this.host.style.visibility="hidden"}),250)}else{this.host.style.visibility="visible"}}hideContent(){this.isVisible=false;this.persist=false;const t=document.getElementById(this.parentId);if(t){t.hide().catch()}}render(){return e(i,{key:"53f6685cde44dc337600773140715671884c8d1f",class:c.root,role:"tooltip",hidden:!this.isVisible,"aria-hidden":!a(this.isVisible),"is-visible":this.isVisible},e("slot",{key:"5f552ef5d7b650ae3bca48a41a244d058f9812a7"}),this.persist?e("gov-button",{"on-gov-click":this.hideContent.bind(this),color:this.color,size:this.size,type:"base"},e("gov-icon",{slot:"left-icon",name:"x-lg",type:"basic"})):null)}get host(){return this}static get watchers(){return{isVisible:["visibleContent"]}}},[4,"gov-tooltip-content",{color:[1],size:[1],persist:[4],isVisible:[1028,"is-visible"],parentId:[1,"parent-id"]},undefined,{isVisible:["visibleContent"]}]);function h(){if(typeof customElements==="undefined"){return}const t=["gov-tooltip-content","gov-button","gov-icon"];t.forEach((t=>{switch(t){case"gov-tooltip-content":if(!customElements.get(t)){customElements.define(t,f)}break;case"gov-button":if(!customElements.get(t)){l()}break;case"gov-icon":if(!customElements.get(t)){r()}break}}))}h();const d=f;const m=h;export{d as GovTooltipContent,m as defineCustomElement};
1
+ import{p as t,H as s,h as e,d as i}from"./p-ae3dada7.js";import{T as o,a as n,b as a}from"./p-565120d5.js";import{c}from"./p-0075138f.js";import{d as l}from"./p-1366ed8d.js";import{d as r}from"./p-d5f25595.js";const d=t(class t extends s{constructor(){super();this.__registerHost();this.color=o.PRIMARY;this.size=n._M;this.persist=false;this.isVisible=false;this.parentId=null}visibleContent(t){clearTimeout(this.timeout);if(t===false){this.timeout=setTimeout((()=>{this.host.style.visibility="hidden"}),250)}else{this.host.style.visibility="visible"}}hideContent(){this.isVisible=false;this.persist=false;const t=document.getElementById(this.parentId);if(t){t.hide().catch()}}render(){return e(i,{key:"53f6685cde44dc337600773140715671884c8d1f",class:a.root,role:"tooltip",hidden:!this.isVisible,"aria-hidden":!c(this.isVisible),"is-visible":this.isVisible},e("slot",{key:"5f552ef5d7b650ae3bca48a41a244d058f9812a7"}),this.persist?e("gov-button",{"on-gov-click":this.hideContent.bind(this),color:this.color,size:this.size,type:"base"},e("gov-icon",{slot:"left-icon",name:"x-lg",type:"basic"})):null)}get host(){return this}static get watchers(){return{isVisible:["visibleContent"]}}},[4,"gov-tooltip-content",{color:[1],size:[1],persist:[4],isVisible:[1028,"is-visible"],parentId:[1,"parent-id"]},undefined,{isVisible:["visibleContent"]}]);function h(){if(typeof customElements==="undefined"){return}const t=["gov-tooltip-content","gov-button","gov-icon"];t.forEach((t=>{switch(t){case"gov-tooltip-content":if(!customElements.get(t)){customElements.define(t,d)}break;case"gov-button":if(!customElements.get(t)){l()}break;case"gov-icon":if(!customElements.get(t)){r()}break}}))}h();const f=d;const m=h;export{f as GovTooltipContent,m as defineCustomElement};
2
2
  //# sourceMappingURL=gov-tooltip-content.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["GovTooltipContent","proxyCustomElement","H","TooltipColors","PRIMARY","TooltipSize","_M","visibleContent","newValue","clearTimeout","this","timeout","setTimeout","host","style","visibility","hideContent","isVisible","persist","parentEl","document","getElementById","parentId","hide","catch","render","h","Host","key","class","TooltipContentClass","root","role","hidden","toBoolAttr","bind","color","size","type","slot","name"],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip-content.tsx"],"sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { TooltipContentClass, TooltipSize, TooltipSizeType, TooltipColors, TooltipColorType } from \"./constants\"\nimport { toBoolAttr } from \"../../helpers/Dom/template\"\n\n@Component({\n\ttag: \"gov-tooltip-content\",\n})\nexport class GovTooltipContent {\n\tprivate timeout\n\n\t@Element() host: HTMLGovTooltipContentElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly color?: TooltipColorType = TooltipColors.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip is still visible.\n\t */\n\t@Prop() persist?: boolean = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"is-visible\", mutable: true }) isVisible = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"parent-id\" }) parentId: string = null\n\n\t@Watch(\"isVisible\")\n\tvisibleContent(newValue: boolean): void {\n\t\tclearTimeout(this.timeout)\n\t\tif (newValue === false) {\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.host.style.visibility = \"hidden\"\n\t\t\t}, 250)\n\t\t} else {\n\t\t\tthis.host.style.visibility = \"visible\"\n\t\t}\n\t}\n\n\thideContent() {\n\t\tthis.isVisible = false\n\t\tthis.persist = false\n\t\tconst parentEl = document.getElementById(this.parentId) as HTMLGovTooltipElement\n\t\tif (parentEl) {\n\t\t\tparentEl.hide().catch()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={TooltipContentClass.root}\n\t\t\t\trole={\"tooltip\"}\n\t\t\t\thidden={!this.isVisible}\n\t\t\t\taria-hidden={!toBoolAttr(this.isVisible)}\n\t\t\t\tis-visible={this.isVisible}>\n\t\t\t\t<slot></slot>\n\t\t\t\t{this.persist ? (\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\ton-gov-click={this.hideContent.bind(this)}\n\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\ttype={\"base\"}>\n\t\t\t\t\t\t<gov-icon slot={\"left-icon\"} name={\"x-lg\"} type={\"basic\"}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"6NAOaA,EAAiBC,EAAA,MAAAD,UAAAE,E,uDAOeC,EAAcC,Q,UAIhBC,EAAYC,G,aAI1B,M,eAIkC,M,cAIT,I,CAGrD,cAAAC,CAAeC,GACdC,aAAaC,KAAKC,SAClB,GAAIH,IAAa,MAAO,CACvBE,KAAKC,QAAUC,YAAW,KACzBF,KAAKG,KAAKC,MAAMC,WAAa,QAAQ,GACnC,I,KACG,CACNL,KAAKG,KAAKC,MAAMC,WAAa,S,EAI/B,WAAAC,GACCN,KAAKO,UAAY,MACjBP,KAAKQ,QAAU,MACf,MAAMC,EAAWC,SAASC,eAAeX,KAAKY,UAC9C,GAAIH,EAAU,CACbA,EAASI,OAAOC,O,EAIlB,MAAAC,GACC,OACCC,EAACC,EAAI,CAAAC,IAAA,2CACJC,MAAOC,EAAoBC,KAC3BC,KAAM,UACNC,QAASvB,KAAKO,UAAS,eACTiB,EAAWxB,KAAKO,WAAU,aAC5BP,KAAKO,WACjBS,EAAA,QAAAE,IAAA,6CACClB,KAAKQ,QACLQ,EAAA,6BACehB,KAAKM,YAAYmB,KAAKzB,MACpC0B,MAAO1B,KAAK0B,MACZC,KAAM3B,KAAK2B,KACXC,KAAM,QACNZ,EAAA,YAAUa,KAAM,YAAaC,KAAM,OAAQF,KAAM,WAE/C,K","ignoreList":[]}
1
+ {"version":3,"names":["GovTooltipContent","proxyCustomElement","H","TooltipColors","PRIMARY","TooltipSize","_M","visibleContent","newValue","clearTimeout","this","timeout","setTimeout","host","style","visibility","hideContent","isVisible","persist","parentEl","document","getElementById","parentId","hide","catch","render","h","Host","key","class","TooltipContentClass","root","role","hidden","toBoolAttr","bind","color","size","type","slot","name"],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip-content.tsx"],"sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { TooltipContentClass, TooltipSize, TooltipSizeType, TooltipColors, TooltipColorType } from \"./constants\"\nimport { toBoolAttr } from \"../../helpers/Dom/template\"\n\n@Component({\n\ttag: \"gov-tooltip-content\",\n})\nexport class GovTooltipContent {\n\tprivate timeout\n\n\t@Element() host: HTMLGovTooltipContentElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly color?: TooltipColorType = TooltipColors.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip is still visible.\n\t */\n\t@Prop() persist?: boolean = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"is-visible\", mutable: true }) isVisible = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"parent-id\" }) parentId: string = null\n\n\t@Watch(\"isVisible\")\n\tvisibleContent(newValue: boolean): void {\n\t\tclearTimeout(this.timeout)\n\t\tif (newValue === false) {\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.host.style.visibility = \"hidden\"\n\t\t\t}, 250)\n\t\t} else {\n\t\t\tthis.host.style.visibility = \"visible\"\n\t\t}\n\t}\n\n\thideContent() {\n\t\tthis.isVisible = false\n\t\tthis.persist = false\n\t\tconst parentEl = document.getElementById(this.parentId) as HTMLGovTooltipElement\n\t\tif (parentEl) {\n\t\t\tparentEl.hide().catch()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={TooltipContentClass.root}\n\t\t\t\trole={\"tooltip\"}\n\t\t\t\thidden={!this.isVisible}\n\t\t\t\taria-hidden={!toBoolAttr(this.isVisible)}\n\t\t\t\tis-visible={this.isVisible}>\n\t\t\t\t<slot></slot>\n\t\t\t\t{this.persist ? (\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\ton-gov-click={this.hideContent.bind(this)}\n\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\ttype={\"base\"}>\n\t\t\t\t\t\t<gov-icon slot={\"left-icon\"} name={\"x-lg\"} type={\"basic\"}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"wNAOaA,EAAiBC,EAAA,MAAAD,UAAAE,E,uDAOeC,EAAcC,Q,UAIhBC,EAAYC,G,aAI1B,M,eAIkC,M,cAIT,I,CAGrD,cAAAC,CAAeC,GACdC,aAAaC,KAAKC,SAClB,GAAIH,IAAa,MAAO,CACvBE,KAAKC,QAAUC,YAAW,KACzBF,KAAKG,KAAKC,MAAMC,WAAa,QAAQ,GACnC,I,KACG,CACNL,KAAKG,KAAKC,MAAMC,WAAa,S,EAI/B,WAAAC,GACCN,KAAKO,UAAY,MACjBP,KAAKQ,QAAU,MACf,MAAMC,EAAWC,SAASC,eAAeX,KAAKY,UAC9C,GAAIH,EAAU,CACbA,EAASI,OAAOC,O,EAIlB,MAAAC,GACC,OACCC,EAACC,EAAI,CAAAC,IAAA,2CACJC,MAAOC,EAAoBC,KAC3BC,KAAM,UACNC,QAASvB,KAAKO,UAAS,eACTiB,EAAWxB,KAAKO,WAAU,aAC5BP,KAAKO,WACjBS,EAAA,QAAAE,IAAA,6CACClB,KAAKQ,QACLQ,EAAA,6BACehB,KAAKM,YAAYmB,KAAKzB,MACpC0B,MAAO1B,KAAK0B,MACZC,KAAM3B,KAAK2B,KACXC,KAAM,QACNZ,EAAA,YAAUa,KAAM,YAAaC,KAAM,OAAQF,KAAM,WAE/C,K","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as s,H as t,c as i,h as e,d as a}from"./p-ae3dada7.js";import{v as o}from"./p-19c681a3.js";import{W as n,c}from"./p-0c93dd39.js";import{c as d}from"./p-95d41a3b.js";import{g as h,b as l,t as r}from"./p-0075138f.js";import{d as m}from"./p-5caf1fe1.js";var f;(function(s){s["DIV"]="div";s["BUTTON"]="button"})(f||(f={}));const p=s(class s extends t{constructor(){super();this.__registerHost();this.govChange=i(this,"gov-change",7);this.hydrated=false;this.color="primary";this.size="m";this.identifier=undefined;this.collapsible=false;this.disabled=false;this.isExpanded=false;this.h=h(this.host);this.triggerId=d("GovWizardItem");this.contentId=d("GovWizardContent")}validateColor(s){o(c,s,n.root)}emmitChange(){this.govChange.emit({expanded:this.isExpanded,component:n.root})}componentWillLoad(){this.validateColor(this.color)}connectedCallback(){this.hydrated=true}render(){const s=this.identifier||this.triggerId;const t=this.collapsible?f.BUTTON:f.DIV;const i=this.h.hasSlot("prefix")&&e("span",{key:"3f59956339df074998165a5224c9df58054b3f34",class:n.prefix},e("slot",{key:"6c9b2007a4480ea06d9c1968c9c9f90b1d03fe12",name:"prefix"}));return e(a,{key:"7c6523696e4ee074c82047d453355a46460e5f29",class:this.h.classes(n.root),"is-expanded":this.isExpanded,color:this.color,size:this.size,role:"listitem",collapsible:this.collapsible,hydrated:this.hydrated},e("div",{key:"1881b5a37ce7b3587295ed8a38a5923afbf2ffdb",class:n.header},i,this.collapsible?e(t,{id:s,class:this.h.classes(n.label),"aria-expanded":l(this.isExpanded),"aria-controls":this.contentId,disabled:this.disabled,"aria-disabled":r(this.disabled),onClick:s=>{s.preventDefault();s.stopPropagation();this.toggle()}},e("span",{class:n.headline},e("slot",{name:"headline"}),this.collapsible&&e("gov-icon",{class:n.chevron,name:"chevron-down"})),e("slot",{name:"annotation"})):e(t,{class:this.h.classes(n.label)},e("span",{class:n.headline},e("slot",{name:"headline"}),this.collapsible&&e("gov-icon",{class:n.chevron,name:"chevron-down"})),e("slot",{name:"annotation"}))),this.collapsible?e("div",{class:n.content,id:this.contentId,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded,"aria-labelledby":s},e("slot",null)):e("div",{class:n.content,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded},e("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{color:["validateColor"]}}},[4,"gov-wizard-item",{color:[1],size:[1],identifier:[1],collapsible:[4],disabled:[4],isExpanded:[1028,"is-expanded"],open:[64],close:[64],toggle:[64],currentState:[64]},undefined,{color:["validateColor"]}]);function u(){if(typeof customElements==="undefined"){return}const s=["gov-wizard-item","gov-icon"];s.forEach((s=>{switch(s){case"gov-wizard-item":if(!customElements.get(s)){customElements.define(s,p)}break;case"gov-icon":if(!customElements.get(s)){m()}break}}))}u();const v=p;const b=u;export{v as GovWizardItem,b as defineCustomElement};
1
+ import{p as s,H as t,c as i,h as e,d as a}from"./p-ae3dada7.js";import{v as o}from"./p-19c681a3.js";import{W as n,c}from"./p-0c93dd39.js";import{c as d}from"./p-95d41a3b.js";import{g as h,b as l,t as r}from"./p-0075138f.js";import{d as m}from"./p-d5f25595.js";var f;(function(s){s["DIV"]="div";s["BUTTON"]="button"})(f||(f={}));const p=s(class s extends t{constructor(){super();this.__registerHost();this.govChange=i(this,"gov-change",7);this.hydrated=false;this.color="primary";this.size="m";this.identifier=undefined;this.collapsible=false;this.disabled=false;this.isExpanded=false;this.h=h(this.host);this.triggerId=d("GovWizardItem");this.contentId=d("GovWizardContent")}validateColor(s){o(c,s,n.root)}emmitChange(){this.govChange.emit({expanded:this.isExpanded,component:n.root})}componentWillLoad(){this.validateColor(this.color)}connectedCallback(){this.hydrated=true}render(){const s=this.identifier||this.triggerId;const t=this.collapsible?f.BUTTON:f.DIV;const i=this.h.hasSlot("prefix")&&e("span",{key:"3f59956339df074998165a5224c9df58054b3f34",class:n.prefix},e("slot",{key:"6c9b2007a4480ea06d9c1968c9c9f90b1d03fe12",name:"prefix"}));return e(a,{key:"7c6523696e4ee074c82047d453355a46460e5f29",class:this.h.classes(n.root),"is-expanded":this.isExpanded,color:this.color,size:this.size,role:"listitem",collapsible:this.collapsible,hydrated:this.hydrated},e("div",{key:"1881b5a37ce7b3587295ed8a38a5923afbf2ffdb",class:n.header},i,this.collapsible?e(t,{id:s,class:this.h.classes(n.label),"aria-expanded":l(this.isExpanded),"aria-controls":this.contentId,disabled:this.disabled,"aria-disabled":r(this.disabled),onClick:s=>{s.preventDefault();s.stopPropagation();this.toggle()}},e("span",{class:n.headline},e("slot",{name:"headline"}),this.collapsible&&e("gov-icon",{class:n.chevron,name:"chevron-down"})),e("slot",{name:"annotation"})):e(t,{class:this.h.classes(n.label)},e("span",{class:n.headline},e("slot",{name:"headline"}),this.collapsible&&e("gov-icon",{class:n.chevron,name:"chevron-down"})),e("slot",{name:"annotation"}))),this.collapsible?e("div",{class:n.content,id:this.contentId,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded,"aria-labelledby":s},e("slot",null)):e("div",{class:n.content,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded},e("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{color:["validateColor"]}}},[4,"gov-wizard-item",{color:[1],size:[1],identifier:[1],collapsible:[4],disabled:[4],isExpanded:[1028,"is-expanded"],open:[64],close:[64],toggle:[64],currentState:[64]},undefined,{color:["validateColor"]}]);function u(){if(typeof customElements==="undefined"){return}const s=["gov-wizard-item","gov-icon"];s.forEach((s=>{switch(s){case"gov-wizard-item":if(!customElements.get(s)){customElements.define(s,p)}break;case"gov-icon":if(!customElements.get(s)){m()}break}}))}u();const v=p;const b=u;export{v as GovWizardItem,b as defineCustomElement};
2
2
  //# sourceMappingURL=gov-wizard-item.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,c as i,h as s,d as a}from"./p-ae3dada7.js";import{v as n}from"./p-19c681a3.js";import{B as o,a as h,b as r,N as d}from"./p-08621bdf.js";import{g as c,t as l}from"./p-0075138f.js";import{S as f}from"./p-92f420cb.js";import{a as u}from"./p-9a93146e.js";import{d as p}from"./p-7501abe8.js";import{d as b}from"./p-e0e2e9c1.js";import{A as m,a as v,i as y}from"./p-33d5d1ed.js";import{d as g}from"./p-5caf1fe1.js";function k(t){if(typeof t==="string"){return["true","True","TRUE","1"].indexOf(t)!==-1}else if(typeof t==="number"){return t>0}else if(typeof t==="boolean"){return t}else{return t?true:false}}var j;(function(t){t["A"]="a";t["BUTTON"]="button"})(j||(j={}));const T=t(class t extends e{constructor(){super();this.__registerHost();this.govClick=i(this,"gov-click",7);this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.hydrated=false;this.color=undefined;this.size="m";this.type=undefined;this.expanded=false;this.name=undefined;this.disabled=false;this.nativeType="button";this.href=undefined;this.target=undefined;this.download=undefined;this.hreflang=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.loading=undefined;this.focusable=true;this.identifier=undefined;this.inheritedAttributes={};this.h=c(this.host)}validateColor(t){n(h,t,o.root)}validateType(t){n(r,t,o.root)}validateSize(t){n(f,t,o.root)}validateNativeType(t){n(d,t,o.root)}componentDidLoad(){this.attributeObserver=new m(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(v)}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}disconnectedCallback(){this.attributeObserver.stopObserving()}componentWillLoad(){this.validateColor(this.color);this.validateType(this.type);this.validateSize(this.size);this.validateNativeType(this.nativeType);this.inheritedAttributes=y(this.host)}async componentDidRender(){if(p()){await b(500);await this.validateAccessibility()}}connectedCallback(){this.hydrated=true}render(){const t=this.href?j.A:j.BUTTON;const e=t===j.A?undefined:this.nativeType;return s(a,{key:"2bb50646642155813d3b424d93abe66e402980fc",size:this.size,hydrated:this.hydrated,color:this.color,class:this.h.classes(o.root),type:this.type},s(t,Object.assign({key:"9eb0aef9aad90c4d8b36c98713f8b4368ec3ea60",class:"element",ref:t=>this.triggerRef=t,onClick:this.onClickHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),disabled:this.disabled,id:this.identifier,href:this.href,target:this.target,download:this.download,hreflang:this.hreflang,rel:this.rel,name:this.name,type:e,tabindex:this.disabled?"-1":"0"},this.inheritedAttributes,{"aria-disabled":l(this.disabled)}),k(this.loading)&&!this.h.hasSlot("right-icon")&&s("gov-icon",{key:"32e8ad524e440068871b84a7cfe0a297d729cdb1",name:"loader",class:"gov-spin-animation"}),this.h.hasSlot("left-icon")&&s("slot",{key:"9cb9034730ff04ec4ecb17c7ab75618368074b5c",name:"left-icon"}),s("slot",{key:"ba5a094a07caa393510f956f5797b73f4811d0a9"}),this.h.hasSlot("right-icon")&&s("slot",{key:"4b62acb8f9c327c21ccd500688a1e0effa7bbfa8",name:"right-icon"}),k(this.loading)&&this.h.hasSlot("right-icon")&&s("gov-icon",{key:"25f567c70ee5e4a89c37747fa17df87d9a4e6fb2",name:"loader",class:"gov-spin-animation"})))}onClickHandler(t){t.stopPropagation();if(this.disabled===false){this.govClick.emit({component:o.root,originalEvent:t,ref:this.host})}}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:o.root,originalEvent:t,ref:this.host})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:o.root,originalEvent:t,ref:this.host})}async setFocus(){this.triggerRef.focus()}async getRef(){return this.triggerRef}async validateAccessibility(){if(this.focusable){u(this.triggerRef.getAttribute("aria-label"),this.triggerRef.getAttribute("aria-labelledby"),o.root,this.host)}}get host(){return this}static get watchers(){return{color:["validateColor"],type:["validateType"],size:["validateSize"],nativeType:["validateNativeType"]}}},[4,"gov-button",{color:[513],size:[513],type:[513],expanded:[516],name:[1],disabled:[516],nativeType:[1,"native-type"],href:[1],target:[1],download:[4],hreflang:[1],referrerpolicy:[1],rel:[1],loading:[1],focusable:[4],identifier:[1],inheritedAttributes:[32],setFocus:[64],getRef:[64],validateAccessibility:[64]},undefined,{color:["validateColor"],type:["validateType"],size:["validateSize"],nativeType:["validateNativeType"]}]);function C(){if(typeof customElements==="undefined"){return}const t=["gov-button","gov-icon"];t.forEach((t=>{switch(t){case"gov-button":if(!customElements.get(t)){customElements.define(t,T)}break;case"gov-icon":if(!customElements.get(t)){g()}break}}))}C();export{T as G,C as d};
2
- //# sourceMappingURL=p-e20bb5dc.js.map
1
+ import{p as t,H as e,c as i,h as s,d as a}from"./p-ae3dada7.js";import{v as n}from"./p-19c681a3.js";import{B as o,a as h,b as r,N as d}from"./p-08621bdf.js";import{g as c,t as l}from"./p-0075138f.js";import{S as f}from"./p-92f420cb.js";import{a as u}from"./p-9a93146e.js";import{d as p}from"./p-7501abe8.js";import{d as b}from"./p-e0e2e9c1.js";import{A as m,a as v,i as y}from"./p-33d5d1ed.js";import{d as g}from"./p-d5f25595.js";function k(t){if(typeof t==="string"){return["true","True","TRUE","1"].indexOf(t)!==-1}else if(typeof t==="number"){return t>0}else if(typeof t==="boolean"){return t}else{return t?true:false}}var j;(function(t){t["A"]="a";t["BUTTON"]="button"})(j||(j={}));const T=t(class t extends e{constructor(){super();this.__registerHost();this.govClick=i(this,"gov-click",7);this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.hydrated=false;this.color=undefined;this.size="m";this.type=undefined;this.expanded=false;this.name=undefined;this.disabled=false;this.nativeType="button";this.href=undefined;this.target=undefined;this.download=undefined;this.hreflang=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.loading=undefined;this.focusable=true;this.identifier=undefined;this.inheritedAttributes={};this.h=c(this.host)}validateColor(t){n(h,t,o.root)}validateType(t){n(r,t,o.root)}validateSize(t){n(f,t,o.root)}validateNativeType(t){n(d,t,o.root)}componentDidLoad(){this.attributeObserver=new m(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(v)}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}disconnectedCallback(){this.attributeObserver.stopObserving()}componentWillLoad(){this.validateColor(this.color);this.validateType(this.type);this.validateSize(this.size);this.validateNativeType(this.nativeType);this.inheritedAttributes=y(this.host)}async componentDidRender(){if(p()){await b(500);await this.validateAccessibility()}}connectedCallback(){this.hydrated=true}render(){const t=this.href?j.A:j.BUTTON;const e=t===j.A?undefined:this.nativeType;return s(a,{key:"2bb50646642155813d3b424d93abe66e402980fc",size:this.size,hydrated:this.hydrated,color:this.color,class:this.h.classes(o.root),type:this.type},s(t,Object.assign({key:"9eb0aef9aad90c4d8b36c98713f8b4368ec3ea60",class:"element",ref:t=>this.triggerRef=t,onClick:this.onClickHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),disabled:this.disabled,id:this.identifier,href:this.href,target:this.target,download:this.download,hreflang:this.hreflang,rel:this.rel,name:this.name,type:e,tabindex:this.disabled?"-1":"0"},this.inheritedAttributes,{"aria-disabled":l(this.disabled)}),k(this.loading)&&!this.h.hasSlot("right-icon")&&s("gov-icon",{key:"32e8ad524e440068871b84a7cfe0a297d729cdb1",name:"loader",class:"gov-spin-animation"}),this.h.hasSlot("left-icon")&&s("slot",{key:"9cb9034730ff04ec4ecb17c7ab75618368074b5c",name:"left-icon"}),s("slot",{key:"ba5a094a07caa393510f956f5797b73f4811d0a9"}),this.h.hasSlot("right-icon")&&s("slot",{key:"4b62acb8f9c327c21ccd500688a1e0effa7bbfa8",name:"right-icon"}),k(this.loading)&&this.h.hasSlot("right-icon")&&s("gov-icon",{key:"25f567c70ee5e4a89c37747fa17df87d9a4e6fb2",name:"loader",class:"gov-spin-animation"})))}onClickHandler(t){t.stopPropagation();if(this.disabled===false){this.govClick.emit({component:o.root,originalEvent:t,ref:this.host})}}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:o.root,originalEvent:t,ref:this.host})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:o.root,originalEvent:t,ref:this.host})}async setFocus(){this.triggerRef.focus()}async getRef(){return this.triggerRef}async validateAccessibility(){if(this.focusable){u(this.triggerRef.getAttribute("aria-label"),this.triggerRef.getAttribute("aria-labelledby"),o.root,this.host)}}get host(){return this}static get watchers(){return{color:["validateColor"],type:["validateType"],size:["validateSize"],nativeType:["validateNativeType"]}}},[4,"gov-button",{color:[513],size:[513],type:[513],expanded:[516],name:[1],disabled:[516],nativeType:[1,"native-type"],href:[1],target:[1],download:[4],hreflang:[1],referrerpolicy:[1],rel:[1],loading:[1],focusable:[4],identifier:[1],inheritedAttributes:[32],setFocus:[64],getRef:[64],validateAccessibility:[64]},undefined,{color:["validateColor"],type:["validateType"],size:["validateSize"],nativeType:["validateNativeType"]}]);function C(){if(typeof customElements==="undefined"){return}const t=["gov-button","gov-icon"];t.forEach((t=>{switch(t){case"gov-button":if(!customElements.get(t)){customElements.define(t,T)}break;case"gov-icon":if(!customElements.get(t)){g()}break}}))}C();export{T as G,C as d};
2
+ //# sourceMappingURL=p-1366ed8d.js.map
@@ -0,0 +1,2 @@
1
+ import{p as t,H as s,c as i,h as e,d as n}from"./p-ae3dada7.js";import{g as a,b as h,c as o}from"./p-255d0471.js";import{g as d,c,t as r,d as l}from"./p-0075138f.js";import{v as u}from"./p-19c681a3.js";import{c as f}from"./p-95d41a3b.js";import{A as p,a as m,i as b}from"./p-33d5d1ed.js";import{d as v}from"./p-1366ed8d.js";import{d as g}from"./p-d5f25595.js";var y;(function(t){t["INPUT"]="input";t["TEXTAREA"]="textarea"})(y||(y={}));const w=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.govKeyUp=i(this,"gov-keyup",7);this.govHydrated=i(this,"gov-hydrated",7);this.govKeyDown=i(this,"gov-keydown",7);this.value=undefined;this.identifier=undefined;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.accessibleShowPasswordLabel="Zobrazit heslo";this.accessibleHidePasswordLabel="Skrýt heslo";this.focused=undefined;this.showPassword=false;this.inheritedAttributes={};this.h=d(this.host);this.inputId=f("GovInput");this.f=a(this.h)}validateSize(t){u(o,t,h.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("success",c(this.success));this.f.passAttrToControl("disabled",c(this.disabled));this.f.passAttrToControl("invalid",c(this.invalid));this.f.passAttrToControl("type",this.multiline?y.TEXTAREA:y.INPUT)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(m);this.govHydrated.emit()}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=b(this.host)}componentDidRender(){this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required))}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}disconnectedCallback(){this.attributeObserver.stopObserving()}render(){const t=this.multiline?y.TEXTAREA:y.INPUT;return e(n,{key:"8b60864f0792fe1946d4b7cb6489cff0ffc767e1",class:h.root,size:this.size,type:this.type},this.h.hasSlot("prefix")&&e("slot",{key:"4d5d0bb755acbb42033f572633e4969c8e6e8b36",name:"prefix"}),e("span",{key:"eaac4a690052077ca631ae1e9c69a65518a1902f",class:"element"},this.h.hasSlot("left-icon")&&e("slot",{key:"75c58db96fdda7395ee77c9a71b5b01f2fe92503",name:"left-icon"}),this.h.hasSlot("right-icon")&&this.inputType!=="password"&&e("slot",{key:"a3fb32c7d9103fed20f769c5220ebe8d0254efac",name:"right-icon"}),this.success&&!this.multiline&&e("gov-icon",{key:"ef85a7526e0542007cf6978e1dd9f9f872a529f7",slot:"validation-icon",class:"icon-validation",name:"check-lg"}),this.invalid&&!this.multiline&&e("gov-icon",{key:"0869b21bce101fde9b5beb169e042ca72f2d2c52",slot:"validation-icon",class:"icon-validation",name:"exclamation-lg"}),e(t,Object.assign({key:"51a15f6e77ab64f16b168d392fbe9d68b77c5821",type:this.inputType==="password"&&this.showPassword?"text":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:t=>this.inputRef=t,placeholder:this.placeholder,spellcheck:r(this.spellcheck),lang:this.inputLang,readonly:r(this.readonly),autocomplete:l(this.autocomplete),autocorrect:l(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,value:this.value},this.inheritedAttributes,{"aria-required":r(this.required),"aria-invalid":r(this.invalid),"aria-disabled":r(this.disabled)})),this.inputType==="password"?e("gov-button",{color:"primary",type:"base",size:this.size,"aria-label":this.showPassword?this.accessibleHidePasswordLabel:this.accessibleShowPasswordLabel,"on-gov-click":()=>this.showPassword=!this.showPassword},e("gov-icon",{slot:"left-icon",name:"eye",type:"basic"})):null),this.h.hasSlot("sufix")&&e("slot",{key:"2cec0cab2e419776e89506a47f93936249b47fe9",name:"sufix"}))}onFocusHandler(t){t.stopPropagation();this.focused=true;this.govFocus.emit({component:h.root,value:this.value,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.focused=false;this.govBlur.emit({component:h.root,value:this.value,originalEvent:t})}onKeyUpHandler(t){t.stopPropagation();this.govKeyUp.emit({component:h.root,value:this.value,originalEvent:t})}onKeyDownHandler(t){t.stopPropagation();this.govKeyDown.emit({component:h.root,value:this.value,originalEvent:t})}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit({component:h.root,value:this.value,originalEvent:t})}async setFocus(t){return this.inputRef.focus(t)}async setValue(t){this.value=t}async clearValue(){this.value="";this.inputRef.value=""}async getRef(){return this.inputRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}}},[4,"gov-form-input",{value:[1537],identifier:[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],accessibleShowPasswordLabel:[1,"accessible-show-password-label"],accessibleHidePasswordLabel:[1,"accessible-hide-password-label"],focused:[32],showPassword:[32],inheritedAttributes:[32],setFocus:[64],setValue:[64],clearValue:[64],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}]);function k(){if(typeof customElements==="undefined"){return}const t=["gov-form-input","gov-button","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-input":if(!customElements.get(t)){customElements.define(t,w)}break;case"gov-button":if(!customElements.get(t)){v()}break;case"gov-icon":if(!customElements.get(t)){g()}break}}))}k();export{w as G,k as d};
2
+ //# sourceMappingURL=p-778e3fff.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Tags","GovFormInput","proxyCustomElement","H","constructor","this","h","govHost","host","inputId","createID","f","govForm","validateSize","newValue","validateProp","FormInputSizes","FormInputClass","root","watchControlAttrs","passControlAttrs","passAttrToControl","size","toBoolAttr","success","disabled","invalid","multiline","TEXTAREA","INPUT","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","govHydrated","emit","componentWillLoad","inheritedAttributes","inheritAriaAttributes","componentDidRender","passAttrToLabel","String","required","removeAttribute","Object","assign","disconnectedCallback","stopObserving","render","Tag","Host","key","class","type","hasSlot","name","inputType","slot","showPassword","id","identifier","onFocus","onFocusHandler","bind","onInput","onInputHandler","onBlur","onBlurHandler","onKeyUp","onKeyUpHandler","onKeyDown","onKeyDownHandler","ref","el","inputRef","placeholder","spellcheck","toBoolAttrIfDefined","lang","inputLang","readonly","autocomplete","toOnOffAttrIfDefined","autocorrect","minlength","maxlength","min","max","rows","cols","role","value","color","accessibleHidePasswordLabel","accessibleShowPasswordLabel","e","stopPropagation","focused","govFocus","component","originalEvent","govBlur","govKeyUp","govKeyDown","target","govInput","setFocus","options","focus","setValue","clearValue","getRef"],"sources":["../../../packages/core/src/components/gov-form/input/gov-form-input.tsx"],"sourcesContent":["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 {validateProp} from \"../../../helpers/Validate/props\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {FormInputClass, FormInputSizes, FormInputSizesType, InputType, Type,} from \"./constants\"\nimport {FormInputEvent} from \"./gov-form-input.types\"\nimport {Nullable} from \"../../../types/interfaces\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\nenum Tags {\n\tINPUT = \"input\",\n\tTEXTAREA = \"textarea\",\n}\n\n@Component({\n\ttag: \"gov-form-input\",\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\tprivate attributeObserver: AttributeObserver\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 * 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 */\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 * Accessible text for password display\n\t */\n\t@Prop({attribute: \"accessible-show-password-label\"}) readonly accessibleShowPasswordLabel = 'Zobrazit heslo'\n\t/**\n\t * Accessible text to hide the password\n\t */\n\t@Prop({attribute: \"accessible-hide-password-label\"}) readonly accessibleHidePasswordLabel = 'Skrýt heslo'\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\t@State() showPassword: boolean = false\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\t@State() inheritedAttributes: Attributes = {}\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\tthis.f.passAttrToControl(\"type\", this.multiline ? Tags.TEXTAREA : Tags.INPUT)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t\tthis.govHydrated.emit();\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\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} 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.inputType !== 'password' && <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=\"validation-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=\"validation-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 === 'password' && this.showPassword ? 'text' : 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\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\tvalue={this.value}\n\t\t\t\t\t\t{...this.inheritedAttributes}\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/>\n\t\t\t\t\t{this.inputType === 'password' ? (\n\t\t\t\t\t\t<gov-button color={'primary'}\n\t\t\t\t\t\t\t\t\ttype={'base'}\n\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\taria-label={this.showPassword ? this.accessibleHidePasswordLabel : this.accessibleShowPasswordLabel}\n\t\t\t\t\t\t\t\t\ton-gov-click={() => this.showPassword = !this.showPassword}>\n\t\t\t\t\t\t\t<gov-icon slot=\"left-icon\" name=\"eye\" type=\"basic\"></gov-icon>\n\t\t\t\t\t\t</gov-button>) : null}\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"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"names":["Tags","GovFormInput","proxyCustomElement","H","constructor","this","h","govHost","host","inputId","createID","f","govForm","validateSize","newValue","validateProp","FormInputSizes","FormInputClass","root","watchControlAttrs","passControlAttrs","passAttrToControl","size","toBoolAttr","success","disabled","invalid","multiline","TEXTAREA","INPUT","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","govHydrated","emit","componentWillLoad","inheritedAttributes","inheritAriaAttributes","componentDidRender","passAttrToLabel","String","required","removeAttribute","Object","assign","disconnectedCallback","stopObserving","render","Tag","Host","key","class","type","hasSlot","name","inputType","slot","showPassword","id","identifier","onFocus","onFocusHandler","bind","onInput","onInputHandler","onBlur","onBlurHandler","onKeyUp","onKeyUpHandler","onKeyDown","onKeyDownHandler","ref","el","inputRef","placeholder","spellcheck","toBoolAttrIfDefined","lang","inputLang","readonly","autocomplete","toOnOffAttrIfDefined","autocorrect","minlength","maxlength","min","max","rows","cols","role","value","color","accessibleHidePasswordLabel","accessibleShowPasswordLabel","e","stopPropagation","focused","govFocus","component","originalEvent","govBlur","govKeyUp","govKeyDown","target","govInput","setFocus","options","focus","setValue","clearValue","getRef"],"sources":["../../../packages/core/src/components/gov-form/input/gov-form-input.tsx"],"sourcesContent":["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 {validateProp} from \"../../../helpers/Validate/props\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {FormInputClass, FormInputSizes, FormInputSizesType, InputType, Type,} from \"./constants\"\nimport {FormInputEvent} from \"./gov-form-input.types\"\nimport {Nullable} from \"../../../types/interfaces\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\nenum Tags {\n\tINPUT = \"input\",\n\tTEXTAREA = \"textarea\",\n}\n\n@Component({\n\ttag: \"gov-form-input\",\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\tprivate attributeObserver: AttributeObserver\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 * 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 */\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 * Accessible text for password display\n\t */\n\t@Prop({attribute: \"accessible-show-password-label\"}) readonly accessibleShowPasswordLabel = 'Zobrazit heslo'\n\t/**\n\t * Accessible text to hide the password\n\t */\n\t@Prop({attribute: \"accessible-hide-password-label\"}) readonly accessibleHidePasswordLabel = 'Skrýt heslo'\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\t@State() showPassword: boolean = false\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\t@State() inheritedAttributes: Attributes = {}\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\tthis.f.passAttrToControl(\"type\", this.multiline ? Tags.TEXTAREA : Tags.INPUT)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t\tthis.govHydrated.emit();\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\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} 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.inputType !== 'password' && <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=\"validation-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=\"validation-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 === 'password' && this.showPassword ? 'text' : 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\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\tvalue={this.value}\n\t\t\t\t\t\t{...this.inheritedAttributes}\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/>\n\t\t\t\t\t{this.inputType === 'password' ? (\n\t\t\t\t\t\t<gov-button color={'primary'}\n\t\t\t\t\t\t\t\t\ttype={'base'}\n\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\taria-label={this.showPassword ? this.accessibleHidePasswordLabel : this.accessibleShowPasswordLabel}\n\t\t\t\t\t\t\t\t\ton-gov-click={() => this.showPassword = !this.showPassword}>\n\t\t\t\t\t\t\t<gov-icon slot=\"left-icon\" name=\"eye\" type=\"basic\"></gov-icon>\n\t\t\t\t\t\t</gov-button>) : null}\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"],"mappings":"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","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,c as e,h as i,d as a}from"./p-ae3dada7.js";import{g as o,l as n,m as h}from"./p-255d0471.js";import{g as c,c as r,t as d}from"./p-0075138f.js";import{v as l}from"./p-19c681a3.js";import{c as f}from"./p-95d41a3b.js";import{p as u}from"./p-ded281e6.js";import{t as m}from"./p-26618322.js";import{A as p,a as b,i as v}from"./p-33d5d1ed.js";import{d as g}from"./p-5caf1fe1.js";const w=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=e(this,"gov-focus",7);this.govBlur=e(this,"gov-blur",7);this.govChange=e(this,"gov-change",7);this.value=undefined;this.options=undefined;this.identifier=undefined;this.size="m";this.name=undefined;this.required=false;this.success=undefined;this.disabled=false;this.invalid=undefined;this.focused=undefined;this.optionsState=[];this.inheritedAttributes={};this.h=c(this.host);this.f=o(this.h);this.selectId=f("GovSelect")}validateSize(t){l(h,t,n.root)}watchOptions(t){this.optionsState=u(t)}watchControlAttrs(){this.passControlAttrs()}watchValue(){this.markSelectedValue()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",r(this.invalid));this.f.passAttrToControl("success",r(this.success));this.f.passAttrToControl("disabled",r(this.disabled));this.f.passAttrToControl("type","select")}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(b)}disconnectedCallback(){this.attributeObserver.stopObserving()}componentWillLoad(){this.validateSize(this.size);this.markSelectedValue();this.optionsState=u(this.options);this.inheritedAttributes=v(this.host)}async componentDidRender(){this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required));m((()=>this.markSelectedValue()))}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}markSelectedValue(){this.host.querySelectorAll("option").forEach((t=>{if(t.value===this.value){t.setAttribute("selected","selected")}else{t.removeAttribute("selected")}}))}render(){return i(a,{key:"1603b487cb27e87d0c7d894c52179fc0f10f5889",class:n.root,size:this.size},this.h.hasSlot("prefix")&&i("slot",{key:"6ccaee3373fff628f817bc5c64846dbe70b2a0e1",name:"prefix"}),i("span",{key:"71c8144f67cfb19874fadbc56a5e3b14be80de35",class:"element"},i("gov-icon",{key:"2a95e7d17ae06b1fef26fb7c6b6bca6229992a73",slot:"right-icon",name:"chevron-down",class:"icon-arrow"}),this.h.hasSlot("right-icon")&&!(this.success||this.invalid)&&i("slot",{key:"35b5bd9fb11ed7e7aecefa7a2dc5e32552eb44e5",name:"right-icon"}),this.success&&i("gov-icon",{key:"c35c20feca720276afc86378338a124c31ae72e7",slot:"validation-icon",name:"check-lg"}),this.invalid&&i("gov-icon",{key:"dff3726140aef5632b7ae1f73144a69c042c43eb",slot:"validation-icon",name:"exclamation-lg"}),i("select",Object.assign({key:"1174e88bc1ad6b60c843addd245b936e778a49e4",id:this.identifier||this.selectId,onFocus:this.onFocusHandler.bind(this),onChange:this.onChangeHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,name:this.name,disabled:this.disabled,ref:t=>this.selectRef=t},this.inheritedAttributes,{"aria-disabled":d(this.disabled),"aria-required":d(this.required),"aria-invalid":d(this.invalid)}),i("slot",{key:"1cfedcf253a859a468bfc0be2125d8c8da8d92aa"}),Array.isArray(this.optionsState)&&this.optionsState.map((t=>{var s;return i("option",{value:t.value,selected:t.value===this.value,disabled:t===null||t===void 0?void 0:t.disabled},(s=t.label)!==null&&s!==void 0?s:t.value)})))),this.h.hasSlot("sufix")&&i("slot",{key:"f9f301a9b9e64aa83df509479ad21e382052e13a",name:"sufix"}))}onFocusHandler(t){this.focused=true;this.govFocus.emit({component:n.root,originalEvent:t,value:this.value})}onBlurHandler(t){this.focused=false;this.govBlur.emit({component:n.root,originalEvent:t,value:this.value})}onChangeHandler(t){this.value=t.target.value;t.stopPropagation();this.govChange.emit({component:n.root,originalEvent:t,value:this.value})}async setFocus(t){return this.selectRef.focus(t)}async getRef(){return this.selectRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],options:["watchOptions"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"],value:["watchValue"]}}},[4,"gov-form-select",{value:[1537],options:[1537],identifier:[1],size:[1],name:[1],required:[4],success:[4],disabled:[4],invalid:[4],focused:[32],optionsState:[32],inheritedAttributes:[32],setFocus:[64],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],options:["watchOptions"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"],value:["watchValue"]}]);function y(){if(typeof customElements==="undefined"){return}const t=["gov-form-select","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-select":if(!customElements.get(t)){customElements.define(t,w)}break;case"gov-icon":if(!customElements.get(t)){g()}break}}))}y();export{w as G,y as d};
2
- //# sourceMappingURL=p-c9a15c52.js.map
1
+ import{p as t,H as s,c as e,h as i,d as a}from"./p-ae3dada7.js";import{g as o,l as n,m as h}from"./p-255d0471.js";import{g as c,c as r,t as d}from"./p-0075138f.js";import{v as l}from"./p-19c681a3.js";import{c as f}from"./p-95d41a3b.js";import{p as u}from"./p-ded281e6.js";import{t as m}from"./p-26618322.js";import{A as p,a as b,i as v}from"./p-33d5d1ed.js";import{d as g}from"./p-d5f25595.js";const w=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=e(this,"gov-focus",7);this.govBlur=e(this,"gov-blur",7);this.govChange=e(this,"gov-change",7);this.value=undefined;this.options=undefined;this.identifier=undefined;this.size="m";this.name=undefined;this.required=false;this.success=undefined;this.disabled=false;this.invalid=undefined;this.focused=undefined;this.optionsState=[];this.inheritedAttributes={};this.h=c(this.host);this.f=o(this.h);this.selectId=f("GovSelect")}validateSize(t){l(h,t,n.root)}watchOptions(t){this.optionsState=u(t)}watchControlAttrs(){this.passControlAttrs()}watchValue(){this.markSelectedValue()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",r(this.invalid));this.f.passAttrToControl("success",r(this.success));this.f.passAttrToControl("disabled",r(this.disabled));this.f.passAttrToControl("type","select")}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(b)}disconnectedCallback(){this.attributeObserver.stopObserving()}componentWillLoad(){this.validateSize(this.size);this.markSelectedValue();this.optionsState=u(this.options);this.inheritedAttributes=v(this.host)}async componentDidRender(){this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required));m((()=>this.markSelectedValue()))}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}markSelectedValue(){this.host.querySelectorAll("option").forEach((t=>{if(t.value===this.value){t.setAttribute("selected","selected")}else{t.removeAttribute("selected")}}))}render(){return i(a,{key:"1603b487cb27e87d0c7d894c52179fc0f10f5889",class:n.root,size:this.size},this.h.hasSlot("prefix")&&i("slot",{key:"6ccaee3373fff628f817bc5c64846dbe70b2a0e1",name:"prefix"}),i("span",{key:"71c8144f67cfb19874fadbc56a5e3b14be80de35",class:"element"},i("gov-icon",{key:"2a95e7d17ae06b1fef26fb7c6b6bca6229992a73",slot:"right-icon",name:"chevron-down",class:"icon-arrow"}),this.h.hasSlot("right-icon")&&!(this.success||this.invalid)&&i("slot",{key:"35b5bd9fb11ed7e7aecefa7a2dc5e32552eb44e5",name:"right-icon"}),this.success&&i("gov-icon",{key:"c35c20feca720276afc86378338a124c31ae72e7",slot:"validation-icon",name:"check-lg"}),this.invalid&&i("gov-icon",{key:"dff3726140aef5632b7ae1f73144a69c042c43eb",slot:"validation-icon",name:"exclamation-lg"}),i("select",Object.assign({key:"1174e88bc1ad6b60c843addd245b936e778a49e4",id:this.identifier||this.selectId,onFocus:this.onFocusHandler.bind(this),onChange:this.onChangeHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,name:this.name,disabled:this.disabled,ref:t=>this.selectRef=t},this.inheritedAttributes,{"aria-disabled":d(this.disabled),"aria-required":d(this.required),"aria-invalid":d(this.invalid)}),i("slot",{key:"1cfedcf253a859a468bfc0be2125d8c8da8d92aa"}),Array.isArray(this.optionsState)&&this.optionsState.map((t=>{var s;return i("option",{value:t.value,selected:t.value===this.value,disabled:t===null||t===void 0?void 0:t.disabled},(s=t.label)!==null&&s!==void 0?s:t.value)})))),this.h.hasSlot("sufix")&&i("slot",{key:"f9f301a9b9e64aa83df509479ad21e382052e13a",name:"sufix"}))}onFocusHandler(t){this.focused=true;this.govFocus.emit({component:n.root,originalEvent:t,value:this.value})}onBlurHandler(t){this.focused=false;this.govBlur.emit({component:n.root,originalEvent:t,value:this.value})}onChangeHandler(t){this.value=t.target.value;t.stopPropagation();this.govChange.emit({component:n.root,originalEvent:t,value:this.value})}async setFocus(t){return this.selectRef.focus(t)}async getRef(){return this.selectRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],options:["watchOptions"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"],value:["watchValue"]}}},[4,"gov-form-select",{value:[1537],options:[1537],identifier:[1],size:[1],name:[1],required:[4],success:[4],disabled:[4],invalid:[4],focused:[32],optionsState:[32],inheritedAttributes:[32],setFocus:[64],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],options:["watchOptions"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"],value:["watchValue"]}]);function y(){if(typeof customElements==="undefined"){return}const t=["gov-form-select","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-select":if(!customElements.get(t)){customElements.define(t,w)}break;case"gov-icon":if(!customElements.get(t)){g()}break}}))}y();export{w as G,y as d};
2
+ //# sourceMappingURL=p-7fd16831.js.map
@@ -1,2 +1,2 @@
1
- import{p as s,H as t,c as i,h as e,d as h}from"./p-ae3dada7.js";import{c as o,b as a}from"./p-0075138f.js";import{v as n}from"./p-19c681a3.js";import{c as r}from"./p-95d41a3b.js";import{d as l,t as c,h as d}from"./p-e0e2e9c1.js";import{F as u,a as m}from"./p-255d0471.js";import{p as f}from"./p-ded281e6.js";import{A as p,a as g,i as v}from"./p-33d5d1ed.js";import{d as b}from"./p-e20bb5dc.js";import{d as y}from"./p-e9b35956.js";import{d as k}from"./p-5caf1fe1.js";import{d as w}from"./p-6e19816b.js";const j=s(class s extends t{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.govSelect=i(this,"gov-select",7);this.templateResolver=s=>s[this.nameKey];this.value="";this.options=undefined;this.identifier=undefined;this.success=undefined;this.size="m";this.nameKey="name";this.name=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.invalid=undefined;this.minlength=3;this.maxlength=undefined;this.throttleTime=200;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.messageLoading="Načítám...";this.focused=undefined;this.processing=false;this.arrowCounter=-1;this.list=[];this.inheritedAttributes={};this.listBoxId=r("GovListBox")}validateSize(s){n(m,s,u.root)}watchOptions(s){this.setOptions(f(s)).catch()}onArrowUp(){if(this.arrowCounter>0){this.arrowCounter=this.arrowCounter-1;this.moveToView().finally()}}onArrowDown(){if(this.arrowCounter<this.list.length-1){this.arrowCounter=this.arrowCounter+1;this.moveToView().finally()}}async moveToView(){await l(200);const s=this.listRef.offsetHeight;const t=this.listRef.querySelector('li[aria-selected="true"]');if(t&&s){const s=t.offsetTop;this.listRef.scrollTo({top:s,behavior:"smooth"})}}doSearch(){if(Number.isInteger(this.minlength)&&this.isValueAccepted===false&&this.minlength){this.list=[];this.arrowCounter=-1;this.processing=false;return}if(this.searchCallback){this.processing=true;this.searchCallback(this.value).then((s=>this.list=s)).catch((()=>this.list=[])).finally((()=>{this.arrowCounter=-1;this.processing=false}))}}clearList(){const s=f(this.options);if(s.length===0){this.list=[]}}get isValueAccepted(){if(typeof this.value==="string"){return this.value.length>=this.minlength}else{return false}}componentDidLoad(){this.attributeObserver=new p(this.host,((s,t)=>{this.onAriaAttributeChange(s,t)}));this.attributeObserver.startObserving(g)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=v(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(s,t){this.host.removeAttribute(s);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[s]:t})}render(){return e(h,{key:"ea390b2ba5832f3269f5bc27732b212f2c893ace",class:u.root,size:this.size},e("gov-form-input",Object.assign({key:"d76f02655c5e640062c413e8ac8e40266a74fa1e",placeholder:this.placeholder,name:this.name,disabled:this.disabled,readonly:this.readonly,autocomplete:false,size:this.size,required:this.required,invalid:this.invalid,success:this.success,role:"searchbox",value:this.value,minlength:this.minlength,maxlength:this.maxlength,"on-gov-input":c(this.onInputHandler.bind(this),this.throttleTime),"on-gov-keyup":this.onKeyUpHandler.bind(this),"on-gov-keydown":this.onKeyDownHandler.bind(this),"on-gov-focus":this.onFocusHandler.bind(this),"on-gov-blur":this.onBlurHandler.bind(this)},this.inheritedAttributes,{"aria-autocomplete":"list","aria-owns":[this.listBoxId,this.inheritedAttributes["aria-owns"]].join(" "),"aria-expanded":a(this.list.length&&this.focused?true:false),ref:s=>this.inputRef=s}),e("slot",{key:"d5a3373d4b1aa5883c67a79dee06124d794a4956",name:"right-icon"})),e("ul",{key:"26bb0a0e05692a25e8ceda76ce7439c43d49325a",class:u.list,role:"listbox","aria-hidden":o(!this.focused),hidden:!this.focused,id:this.listBoxId,ref:s=>this.listRef=s},this.focused&&this.list.length===0&&this.processing===false&&this.isValueAccepted&&this.messageEmpty?e("li",{class:u.empty},this.messageEmpty):null,this.focused&&this.processing===true&&this.isValueAccepted?e("li",{class:u.loading},e("gov-skeleton",{size:"m"})):null,this.focused?this.list.map(((s,t)=>{const i=this.arrowCounter===t;return e("li",{class:u.item,innerHTML:this.templateResolver(s,i),role:"option","aria-posinset":t,tabindex:i?0:-1,"aria-setsize":this.list.length,onTouchStart:s=>this.onSelectHandler(s,t),onMouseDown:s=>this.onSelectHandler(s,t),"aria-selected":o(i)},e("slot",{name:"list-item-left"}),e("slot",{name:"list-item-right"}))})):null))}onFocusHandler(s){this.focused=true;this.arrowCounter=-1;if(this.isValueAccepted&&this.searchCallback){this.doSearch()}s.stopPropagation();this.govFocus.emit({originalEvent:s,component:u.root,value:this.value,selected:null})}onBlurHandler(s){this.focused=false;this.clearList();this.arrowCounter=-1;s.stopPropagation();this.govBlur.emit({originalEvent:s,component:u.root,value:this.value,selected:null})}onInputHandler(s){this.value=s.target.value;s.stopPropagation();this.govInput.emit({originalEvent:s,component:u.root,value:this.value,selected:null});this.doSearch()}onSelectHandler(s,t=-1){let i=null;if(t>-1){i=this.list[t]}else if(d(this.arrowCounter,this.list)){i=this.list[this.arrowCounter]}if(i){this.govSelect.emit({component:u.root,value:this.value,selected:i,originalEvent:s});this.clearList();if(d(this.nameKey,i)&&typeof i[this.nameKey]==="string"){this.value=i[this.nameKey]}}}onKeyUpHandler(s){const t=s.detail.originalEvent;s.stopPropagation();t.stopPropagation();if(t.keyCode===38)this.onArrowUp();else if(t.keyCode===40)this.onArrowDown();else if(t.keyCode===13){s.preventDefault();t.preventDefault();this.onSelectHandler(s)}}onKeyDownHandler(s){const t=s.detail.originalEvent;s.stopPropagation();t.stopPropagation();if(t.keyCode===13){s.preventDefault();t.preventDefault()}}async setFocus(s){return this.inputRef.focus(s)}async setBlur(){return this.inputRef.blur()}async setOptions(s){this.list=Array.isArray(s)?s:[];this.arrowCounter=-1}async clearValue(){this.value="";this.inputRef.value="";await this.inputRef.clearValue()}async setProcessing(s){this.processing=s}async setSearchCallback(s){this.searchCallback=s}async setTemplateResolver(s){this.templateResolver=s}get host(){return this}static get watchers(){return{size:["validateSize"],options:["watchOptions"]}}},[4,"gov-form-autocomplete",{value:[1537],options:[1537],identifier:[1],success:[4],size:[1],nameKey:[1,"name-key"],name:[1],required:[4],disabled:[4],placeholder:[1],readonly:[4],invalid:[4],minlength:[2],maxlength:[2],throttleTime:[2,"throttle-time"],messageEmpty:[1,"message-empty"],messageLoading:[1,"message-loading"],focused:[32],processing:[32],arrowCounter:[32],list:[32],inheritedAttributes:[32],setFocus:[64],setBlur:[64],setOptions:[64],clearValue:[64],setProcessing:[64],setSearchCallback:[64],setTemplateResolver:[64]},undefined,{size:["validateSize"],options:["watchOptions"]}]);function E(){if(typeof customElements==="undefined"){return}const s=["gov-form-autocomplete","gov-button","gov-form-input","gov-icon","gov-skeleton"];s.forEach((s=>{switch(s){case"gov-form-autocomplete":if(!customElements.get(s)){customElements.define(s,j)}break;case"gov-button":if(!customElements.get(s)){b()}break;case"gov-form-input":if(!customElements.get(s)){y()}break;case"gov-icon":if(!customElements.get(s)){k()}break;case"gov-skeleton":if(!customElements.get(s)){w()}break}}))}E();export{j as G,E as d};
2
- //# sourceMappingURL=p-2da35aa8.js.map
1
+ import{p as s,H as t,c as i,h as e,d as h}from"./p-ae3dada7.js";import{c as o,b as a}from"./p-0075138f.js";import{v as n}from"./p-19c681a3.js";import{c as r}from"./p-95d41a3b.js";import{d as l,t as c,h as d}from"./p-e0e2e9c1.js";import{F as u,a as m}from"./p-255d0471.js";import{p as f}from"./p-ded281e6.js";import{A as p,a as g,i as v}from"./p-33d5d1ed.js";import{d as b}from"./p-1366ed8d.js";import{d as y}from"./p-778e3fff.js";import{d as k}from"./p-d5f25595.js";import{d as w}from"./p-6e19816b.js";const j=s(class s extends t{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.govSelect=i(this,"gov-select",7);this.templateResolver=s=>s[this.nameKey];this.value="";this.options=undefined;this.identifier=undefined;this.success=undefined;this.size="m";this.nameKey="name";this.name=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.invalid=undefined;this.minlength=3;this.maxlength=undefined;this.throttleTime=200;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.messageLoading="Načítám...";this.focused=undefined;this.processing=false;this.arrowCounter=-1;this.list=[];this.inheritedAttributes={};this.listBoxId=r("GovListBox")}validateSize(s){n(m,s,u.root)}watchOptions(s){this.setOptions(f(s)).catch()}onArrowUp(){if(this.arrowCounter>0){this.arrowCounter=this.arrowCounter-1;this.moveToView().finally()}}onArrowDown(){if(this.arrowCounter<this.list.length-1){this.arrowCounter=this.arrowCounter+1;this.moveToView().finally()}}async moveToView(){await l(200);const s=this.listRef.offsetHeight;const t=this.listRef.querySelector('li[aria-selected="true"]');if(t&&s){const s=t.offsetTop;this.listRef.scrollTo({top:s,behavior:"smooth"})}}doSearch(){if(Number.isInteger(this.minlength)&&this.isValueAccepted===false&&this.minlength){this.list=[];this.arrowCounter=-1;this.processing=false;return}if(this.searchCallback){this.processing=true;this.searchCallback(this.value).then((s=>this.list=s)).catch((()=>this.list=[])).finally((()=>{this.arrowCounter=-1;this.processing=false}))}}clearList(){const s=f(this.options);if(s.length===0){this.list=[]}}get isValueAccepted(){if(typeof this.value==="string"){return this.value.length>=this.minlength}else{return false}}componentDidLoad(){this.attributeObserver=new p(this.host,((s,t)=>{this.onAriaAttributeChange(s,t)}));this.attributeObserver.startObserving(g)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=v(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(s,t){this.host.removeAttribute(s);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[s]:t})}render(){return e(h,{key:"ea390b2ba5832f3269f5bc27732b212f2c893ace",class:u.root,size:this.size},e("gov-form-input",Object.assign({key:"d76f02655c5e640062c413e8ac8e40266a74fa1e",placeholder:this.placeholder,name:this.name,disabled:this.disabled,readonly:this.readonly,autocomplete:false,size:this.size,required:this.required,invalid:this.invalid,success:this.success,role:"searchbox",value:this.value,minlength:this.minlength,maxlength:this.maxlength,"on-gov-input":c(this.onInputHandler.bind(this),this.throttleTime),"on-gov-keyup":this.onKeyUpHandler.bind(this),"on-gov-keydown":this.onKeyDownHandler.bind(this),"on-gov-focus":this.onFocusHandler.bind(this),"on-gov-blur":this.onBlurHandler.bind(this)},this.inheritedAttributes,{"aria-autocomplete":"list","aria-owns":[this.listBoxId,this.inheritedAttributes["aria-owns"]].join(" "),"aria-expanded":a(this.list.length&&this.focused?true:false),ref:s=>this.inputRef=s}),e("slot",{key:"d5a3373d4b1aa5883c67a79dee06124d794a4956",name:"right-icon"})),e("ul",{key:"26bb0a0e05692a25e8ceda76ce7439c43d49325a",class:u.list,role:"listbox","aria-hidden":o(!this.focused),hidden:!this.focused,id:this.listBoxId,ref:s=>this.listRef=s},this.focused&&this.list.length===0&&this.processing===false&&this.isValueAccepted&&this.messageEmpty?e("li",{class:u.empty},this.messageEmpty):null,this.focused&&this.processing===true&&this.isValueAccepted?e("li",{class:u.loading},e("gov-skeleton",{size:"m"})):null,this.focused?this.list.map(((s,t)=>{const i=this.arrowCounter===t;return e("li",{class:u.item,innerHTML:this.templateResolver(s,i),role:"option","aria-posinset":t,tabindex:i?0:-1,"aria-setsize":this.list.length,onTouchStart:s=>this.onSelectHandler(s,t),onMouseDown:s=>this.onSelectHandler(s,t),"aria-selected":o(i)},e("slot",{name:"list-item-left"}),e("slot",{name:"list-item-right"}))})):null))}onFocusHandler(s){this.focused=true;this.arrowCounter=-1;if(this.isValueAccepted&&this.searchCallback){this.doSearch()}s.stopPropagation();this.govFocus.emit({originalEvent:s,component:u.root,value:this.value,selected:null})}onBlurHandler(s){this.focused=false;this.clearList();this.arrowCounter=-1;s.stopPropagation();this.govBlur.emit({originalEvent:s,component:u.root,value:this.value,selected:null})}onInputHandler(s){this.value=s.target.value;s.stopPropagation();this.govInput.emit({originalEvent:s,component:u.root,value:this.value,selected:null});this.doSearch()}onSelectHandler(s,t=-1){let i=null;if(t>-1){i=this.list[t]}else if(d(this.arrowCounter,this.list)){i=this.list[this.arrowCounter]}if(i){this.govSelect.emit({component:u.root,value:this.value,selected:i,originalEvent:s});this.clearList();if(d(this.nameKey,i)&&typeof i[this.nameKey]==="string"){this.value=i[this.nameKey]}}}onKeyUpHandler(s){const t=s.detail.originalEvent;s.stopPropagation();t.stopPropagation();if(t.keyCode===38)this.onArrowUp();else if(t.keyCode===40)this.onArrowDown();else if(t.keyCode===13){s.preventDefault();t.preventDefault();this.onSelectHandler(s)}}onKeyDownHandler(s){const t=s.detail.originalEvent;s.stopPropagation();t.stopPropagation();if(t.keyCode===13){s.preventDefault();t.preventDefault()}}async setFocus(s){return this.inputRef.focus(s)}async setBlur(){return this.inputRef.blur()}async setOptions(s){this.list=Array.isArray(s)?s:[];this.arrowCounter=-1}async clearValue(){this.value="";this.inputRef.value="";await this.inputRef.clearValue()}async setProcessing(s){this.processing=s}async setSearchCallback(s){this.searchCallback=s}async setTemplateResolver(s){this.templateResolver=s}get host(){return this}static get watchers(){return{size:["validateSize"],options:["watchOptions"]}}},[4,"gov-form-autocomplete",{value:[1537],options:[1537],identifier:[1],success:[4],size:[1],nameKey:[1,"name-key"],name:[1],required:[4],disabled:[4],placeholder:[1],readonly:[4],invalid:[4],minlength:[2],maxlength:[2],throttleTime:[2,"throttle-time"],messageEmpty:[1,"message-empty"],messageLoading:[1,"message-loading"],focused:[32],processing:[32],arrowCounter:[32],list:[32],inheritedAttributes:[32],setFocus:[64],setBlur:[64],setOptions:[64],clearValue:[64],setProcessing:[64],setSearchCallback:[64],setTemplateResolver:[64]},undefined,{size:["validateSize"],options:["watchOptions"]}]);function E(){if(typeof customElements==="undefined"){return}const s=["gov-form-autocomplete","gov-button","gov-form-input","gov-icon","gov-skeleton"];s.forEach((s=>{switch(s){case"gov-form-autocomplete":if(!customElements.get(s)){customElements.define(s,j)}break;case"gov-button":if(!customElements.get(s)){b()}break;case"gov-form-input":if(!customElements.get(s)){y()}break;case"gov-icon":if(!customElements.get(s)){k()}break;case"gov-skeleton":if(!customElements.get(s)){w()}break}}))}E();export{j as G,E as d};
2
+ //# sourceMappingURL=p-cc90a508.js.map
@@ -0,0 +1,2 @@
1
+ import{p as t,H as s,h as i,d as o}from"./p-ae3dada7.js";import{p as e}from"./p-e0e2e9c1.js";import{C as n}from"./p-e3aeaca0.js";import{g as a}from"./p-bfce6f99.js";import{i as r,c}from"./p-7501abe8.js";import{g as h}from"./p-0075138f.js";import{i as l}from"./p-2aedc81e.js";import{v as f}from"./p-19c681a3.js";const u=e(n,["DEFAULT","DISABLED","ERROR","NEUTRAL","SECONDARY","SUCCESS","WARNING","ON_BOLD_WHITE","ON_BOLD_BLACK","ON_SUBTLE","WHITE_FIXED"]);var d;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(d||(d={}));const m={root:"gov-icon",holder:"gov-icon__holder"};const p="4.1.0-rc1";const v=()=>p;const w={};const g={};const E=t=>t.startsWith("http://")||t.startsWith("https://");const y=(t,s,i)=>{if(E(t)){return`${t}/${i}/${s}.svg?v=${v()}`}return a(`${t}/${i}/${s}.svg`)+`?v=${v()}`};async function b({name:t,type:s}){const i=s+"-"+t;if(w[i]){return w[i]}if(!g[i]){g[i]=fetch(y(r(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const o=await g[i];w[i]=o;return o}const D=t(class t extends s{constructor(){super();this.__registerHost();this.color=undefined;this.name=null;this.type="basic";this.visible=false;this.error=false;this.h=h(this.host)}validateColor(t){f(u,t,m.root)}async loadIconPathData(){const{name:t,visible:s}=this;if(!t||!s){return}await this.loadIcon()}connectedCallback(){if(c()){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(){this.validateColor(this.color);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)}async loadIcon(){try{const{name:t,type:s}=this;const i=await b({name:t,type:s});const o=l(i)&&i.indexOf("svg")>-1;this.host.innerHTML=o?i:null}catch(t){this.host.innerHTML="";this.error=true}}render(){if(this.error){return null}return i(o,{class:this.h.classes(m.root),color:this.color})}static get assetsDirs(){return["assets"]}get host(){return this}static get watchers(){return{color:["validateColor"],name:["loadIconPathData"]}}},[0,"gov-icon",{color:[513],name:[513],type:[513],visible:[32],error:[32]},undefined,{color:["validateColor"],name:["loadIconPathData"]}]);function I(){if(typeof customElements==="undefined"){return}const t=["gov-icon"];t.forEach((t=>{switch(t){case"gov-icon":if(!customElements.get(t)){customElements.define(t,D)}break}}))}I();export{D as G,I as d};
2
+ //# sourceMappingURL=p-d5f25595.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["IconColors","pick","Colors","Types","IconClass","root","holder","dsVersion","version","iconCache","requestCache","isExternalUrl","path","startsWith","iconUrl","name","type","getAssetPath","async","fetchIcon","cacheKey","fetch","iconsPath","then","resp","status","text","Error","GovIcon","proxyCustomElement","H","constructor","this","h","govHost","host","validateColor","newValue","validateProp","loadIconPathData","visible","loadIcon","connectedCallback","iconsLazyLoad","finally","waitUntilVisible","disconnectedCallback","intersectionObserver","disconnect","componentWillLoad","color","callback","window","IntersectionObserver","entries","forEach","entry","isIntersecting","rootMargin","observe","data","isValid","isString","indexOf","innerHTML","e","error","render","Host","class","classes"],"sources":["../../../packages/core/src/components/gov-icon/constants.ts","../../../packages/core/src/utils/ds.utils.ts","../../../packages/core/src/utils/icon.utils.ts","../../../packages/core/src/components/gov-icon/gov-icon.tsx"],"sourcesContent":["import { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils';\nimport { Colors } from '../../core/constants/colors';\n\nexport const IconColors = pick(Colors, [\n\t'DEFAULT',\n\t'DISABLED',\n\t'ERROR',\n\t'NEUTRAL',\n\t'SECONDARY',\n\t'SUCCESS',\n\t'WARNING',\n\t'ON_BOLD_WHITE',\n\t'ON_BOLD_BLACK',\n\t'ON_SUBTLE',\n\t'WHITE_FIXED'\n])\nexport type IconColorType = `${ValueOf<typeof IconColors>}`\n\nenum Types {\n\tBASIC = 'basic',\n\tCOMPLEX = 'complex',\n\tCOLORED = 'colored',\n}\nexport type Type = `${ValueOf<typeof Types>}`\n\nexport const IconClass = {\n\troot: 'gov-icon',\n\tholder: 'gov-icon__holder',\n}\n","import { version } from '../../package.json'\n\nexport const dsVersion = (): string => {\n\treturn version\n}\n","import { getAssetPath } from \"@stencil/core\"\nimport { dsVersion } from \"./ds.utils\"\nimport { iconsPath } from \"../helpers/Dom/win\"\n\nconst iconCache: { [key: string]: string } = {}\nconst requestCache: { [key: string]: Promise<string> } = {}\n\nconst isExternalUrl = (path: string) => path.startsWith(\"http://\") || path.startsWith(\"https://\")\nconst iconUrl = (path: string, name: string, type: string) => {\n\tif (isExternalUrl(path)) {\n\t\treturn `${path}/${type}/${name}.svg?v=${dsVersion()}`\n\t}\n\treturn getAssetPath(`${path}/${type}/${name}.svg`) + `?v=${dsVersion()}`\n}\n\nexport async function fetchIcon({ name, type }: { name: string; type: string }): Promise<string> {\n\tconst cacheKey = type + \"-\" + name\n\tif (iconCache[cacheKey]) {\n\t\treturn iconCache[cacheKey]\n\t}\n\tif (!requestCache[cacheKey]) {\n\t\trequestCache[cacheKey] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {\n\t\t\tif (resp.status === 200) {\n\t\t\t\treturn resp.text()\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Gov Icon doesn't exists\")\n\t\t\t}\n\t\t})\n\t}\n\tconst path = await requestCache[cacheKey]\n\ticonCache[cacheKey] = path\n\treturn path\n}\n","import {Build, Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {IconClass} from \"./constants\"\nimport {fetchIcon} from \"../../utils/icon.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {iconsLazyLoad} from \"../../helpers/Dom/win\"\nimport {isString} from \"../../utils/helpers.types\";\nimport { type IconColorType, IconColors } from \"./constants\";\nimport { validateProp } from \"../../helpers/Validate/props\";\n\n@Component({\n\tassetsDirs: [\"assets\"],\n\ttag: \"gov-icon\",\n})\nexport class GovIcon {\n\tprivate h: GovHost\n\tprivate intersectionObserver: IntersectionObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovIconElement\n\t/**\n\t * Style variation of the button\n\t */\n\t@Prop({reflect: true}) readonly color: IconColorType\n\t/**\n\t * Name of icon in folder\n\t */\n\t@Prop({reflect: true}) name: string = null\n\t/**\n\t * Type (folder) of icon\n\t */\n\t@Prop({reflect: true}) type = \"basic\"\n\n\t@State() private visible = false\n\t@State() private error = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(IconColors, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"name\")\n\tprivate async loadIconPathData(): Promise<void> {\n\t\tconst {name, visible} = this\n\t\tif (!Build.isBrowser || !name || !visible) {\n\t\t\treturn\n\t\t}\n\t\tawait this.loadIcon()\n\t}\n\n\tconnectedCallback(): void {\n\t\tif (iconsLazyLoad()) {\n\t\t\tthis.visible = true\n\t\t\tthis.loadIconPathData().finally()\n\t\t} else {\n\t\t\tthis.waitUntilVisible(async () => {\n\t\t\t\tthis.visible = true\n\t\t\t\tawait this.loadIconPathData()\n\t\t\t})\n\t\t}\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tif (this.intersectionObserver) {\n\t\t\tthis.intersectionObserver.disconnect()\n\t\t\tthis.intersectionObserver = null\n\t\t}\n\t}\n\n\tasync componentWillLoad(): Promise<void> {\n\t\tthis.validateColor(this.color)\n\t\tawait this.loadIconPathData()\n\t}\n\n\tprivate waitUntilVisible(callback: () => void): void {\n\t\tif (!Build.isBrowser || typeof window === \"undefined\" || !(window as any).IntersectionObserver) {\n\t\t\tcallback()\n\t\t\treturn\n\t\t}\n\t\tthis.intersectionObserver = new IntersectionObserver(\n\t\t\tentries => {\n\t\t\t\tentries.forEach(entry => {\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tif (this.intersectionObserver) {\n\t\t\t\t\t\t\tthis.intersectionObserver.disconnect()\n\t\t\t\t\t\t\tthis.intersectionObserver = null\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcallback()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t{rootMargin: \"50px\"},\n\t\t)\n\t\tthis.intersectionObserver.observe(this.host)\n\t}\n\n\tprivate async loadIcon() {\n\t\ttry {\n\t\t\tconst {name, type} = this\n\t\t\tconst data = await fetchIcon({name, type})\n\t\t\tconst isValid = isString(data) && data.indexOf('svg') > -1\n\t\t\tthis.host.innerHTML = isValid ? data : null;\n\t\t} catch (e) {\n\t\t\tthis.host.innerHTML = ''\n\t\t\tthis.error = true\n\t\t}\n\t}\n\n\trender() {\n\t\tif (this.error) {\n\t\t\treturn null\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(IconClass.root)} color={this.color}/>\n\t\t)\n\t}\n}\n"],"mappings":"uTAIO,MAAMA,EAAaC,EAAKC,EAAQ,CACtC,UACA,WACA,QACA,UACA,YACA,UACA,UACA,gBACA,gBACA,YACA,gBAID,IAAKC,GAAL,SAAKA,GACJA,EAAA,iBACAA,EAAA,qBACAA,EAAA,oBACA,EAJD,CAAKA,MAAK,KAOH,MAAMC,EAAY,CACxBC,KAAM,WACNC,OAAQ,oB,qBC1BF,MAAMC,EAAY,IACjBC,ECCR,MAAMC,EAAuC,GAC7C,MAAMC,EAAmD,GAEzD,MAAMC,EAAiBC,GAAiBA,EAAKC,WAAW,YAAcD,EAAKC,WAAW,YACtF,MAAMC,EAAU,CAACF,EAAcG,EAAcC,KAC5C,GAAIL,EAAcC,GAAO,CACxB,MAAO,GAAGA,KAAQI,KAAQD,WAAcR,K,CAEzC,OAAOU,EAAa,GAAGL,KAAQI,KAAQD,SAAc,MAAMR,KAAa,EAGlEW,eAAeC,GAAUJ,KAAEA,EAAIC,KAAEA,IACvC,MAAMI,EAAWJ,EAAO,IAAMD,EAC9B,GAAIN,EAAUW,GAAW,CACxB,OAAOX,EAAUW,E,CAElB,IAAKV,EAAaU,GAAW,CAC5BV,EAAaU,GAAYC,MAAMP,EAAQQ,IAAaP,EAAMC,IAAOO,MAAKC,IACrE,GAAIA,EAAKC,SAAW,IAAK,CACxB,OAAOD,EAAKE,M,KACN,CACN,MAAM,IAAIC,MAAM,0B,KAInB,MAAMf,QAAaF,EAAaU,GAChCX,EAAUW,GAAYR,EACtB,OAAOA,CACR,C,MClBagB,EAAOC,EAAA,MAAAD,UAAAE,EAInB,WAAAC,G,6DAYsC,K,UAIR,Q,aAEH,M,WACF,MAlBxBC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAqBvB,aAAAC,CAAcC,GACbC,EAAatC,EAAYqC,EAAUjC,EAAUC,K,CAItC,sBAAMkC,GACb,MAAMxB,KAACA,EAAIyB,QAAEA,GAAWR,KACxB,IAAyBjB,IAASyB,EAAS,CAC1C,M,OAEKR,KAAKS,U,CAGZ,iBAAAC,GACC,GAAIC,IAAiB,CACpBX,KAAKQ,QAAU,KACfR,KAAKO,mBAAmBK,S,KAClB,CACNZ,KAAKa,kBAAiB3B,UACrBc,KAAKQ,QAAU,WACTR,KAAKO,kBAAkB,G,EAKhC,oBAAAO,GACC,GAAId,KAAKe,qBAAsB,CAC9Bf,KAAKe,qBAAqBC,aAC1BhB,KAAKe,qBAAuB,I,EAI9B,uBAAME,GACLjB,KAAKI,cAAcJ,KAAKkB,aAClBlB,KAAKO,kB,CAGJ,gBAAAM,CAAiBM,GACxB,UAA+BC,SAAW,cAAiBA,OAAeC,qBAAsB,CAC/FF,IACA,M,CAEDnB,KAAKe,qBAAuB,IAAIM,sBAC/BC,IACCA,EAAQC,SAAQC,IACf,GAAIA,EAAMC,eAAgB,CACzB,GAAIzB,KAAKe,qBAAsB,CAC9Bf,KAAKe,qBAAqBC,aAC1BhB,KAAKe,qBAAuB,I,CAE7BI,G,IAEA,GAEH,CAACO,WAAY,SAEd1B,KAAKe,qBAAqBY,QAAQ3B,KAAKG,K,CAGhC,cAAMM,GACb,IACC,MAAM1B,KAACA,EAAIC,KAAEA,GAAQgB,KACrB,MAAM4B,QAAazC,EAAU,CAACJ,OAAMC,SACpC,MAAM6C,EAAUC,EAASF,IAASA,EAAKG,QAAQ,QAAU,EACzD/B,KAAKG,KAAK6B,UAAYH,EAAUD,EAAO,I,CACtC,MAAOK,GACRjC,KAAKG,KAAK6B,UAAY,GACtBhC,KAAKkC,MAAQ,I,EAIf,MAAAC,GACC,GAAInC,KAAKkC,MAAO,CACf,OAAO,I,CAER,OACCjC,EAACmC,EAAI,CAACC,MAAOrC,KAAKC,EAAEqC,QAAQlE,EAAUC,MAAO6C,MAAOlB,KAAKkB,O","ignoreList":[]}
1
+ {"version":3,"names":["IconColors","pick","Colors","Types","IconClass","root","holder","dsVersion","version","iconCache","requestCache","isExternalUrl","path","startsWith","iconUrl","name","type","getAssetPath","async","fetchIcon","cacheKey","fetch","iconsPath","then","resp","status","text","Error","GovIcon","proxyCustomElement","H","constructor","this","h","govHost","host","validateColor","newValue","validateProp","loadIconPathData","visible","loadIcon","connectedCallback","iconsLazyLoad","finally","waitUntilVisible","disconnectedCallback","intersectionObserver","disconnect","componentWillLoad","color","callback","window","IntersectionObserver","entries","forEach","entry","isIntersecting","rootMargin","observe","data","isValid","isString","indexOf","innerHTML","e","error","render","Host","class","classes"],"sources":["../../../packages/core/src/components/gov-icon/constants.ts","../../../packages/core/src/utils/ds.utils.ts","../../../packages/core/src/utils/icon.utils.ts","../../../packages/core/src/components/gov-icon/gov-icon.tsx"],"sourcesContent":["import { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils';\nimport { Colors } from '../../core/constants/colors';\n\nexport const IconColors = pick(Colors, [\n\t'DEFAULT',\n\t'DISABLED',\n\t'ERROR',\n\t'NEUTRAL',\n\t'SECONDARY',\n\t'SUCCESS',\n\t'WARNING',\n\t'ON_BOLD_WHITE',\n\t'ON_BOLD_BLACK',\n\t'ON_SUBTLE',\n\t'WHITE_FIXED'\n])\nexport type IconColorType = `${ValueOf<typeof IconColors>}`\n\nenum Types {\n\tBASIC = 'basic',\n\tCOMPLEX = 'complex',\n\tCOLORED = 'colored',\n}\nexport type Type = `${ValueOf<typeof Types>}`\n\nexport const IconClass = {\n\troot: 'gov-icon',\n\tholder: 'gov-icon__holder',\n}\n","import { version } from '../../package.json'\n\nexport const dsVersion = (): string => {\n\treturn version\n}\n","import { getAssetPath } from \"@stencil/core\"\nimport { dsVersion } from \"./ds.utils\"\nimport { iconsPath } from \"../helpers/Dom/win\"\n\nconst iconCache: { [key: string]: string } = {}\nconst requestCache: { [key: string]: Promise<string> } = {}\n\nconst isExternalUrl = (path: string) => path.startsWith(\"http://\") || path.startsWith(\"https://\")\nconst iconUrl = (path: string, name: string, type: string) => {\n\tif (isExternalUrl(path)) {\n\t\treturn `${path}/${type}/${name}.svg?v=${dsVersion()}`\n\t}\n\treturn getAssetPath(`${path}/${type}/${name}.svg`) + `?v=${dsVersion()}`\n}\n\nexport async function fetchIcon({ name, type }: { name: string; type: string }): Promise<string> {\n\tconst cacheKey = type + \"-\" + name\n\tif (iconCache[cacheKey]) {\n\t\treturn iconCache[cacheKey]\n\t}\n\tif (!requestCache[cacheKey]) {\n\t\trequestCache[cacheKey] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {\n\t\t\tif (resp.status === 200) {\n\t\t\t\treturn resp.text()\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Gov Icon doesn't exists\")\n\t\t\t}\n\t\t})\n\t}\n\tconst path = await requestCache[cacheKey]\n\ticonCache[cacheKey] = path\n\treturn path\n}\n","import {Build, Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {IconClass} from \"./constants\"\nimport {fetchIcon} from \"../../utils/icon.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {iconsLazyLoad} from \"../../helpers/Dom/win\"\nimport {isString} from \"../../utils/helpers.types\";\nimport { type IconColorType, IconColors } from \"./constants\";\nimport { validateProp } from \"../../helpers/Validate/props\";\n\n@Component({\n\tassetsDirs: [\"assets\"],\n\ttag: \"gov-icon\",\n})\nexport class GovIcon {\n\tprivate h: GovHost\n\tprivate intersectionObserver: IntersectionObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovIconElement\n\t/**\n\t * Style variation of the button\n\t */\n\t@Prop({reflect: true}) readonly color: IconColorType\n\t/**\n\t * Name of icon in folder\n\t */\n\t@Prop({reflect: true}) name: string = null\n\t/**\n\t * Type (folder) of icon\n\t */\n\t@Prop({reflect: true}) type = \"basic\"\n\n\t@State() private visible = false\n\t@State() private error = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(IconColors, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"name\")\n\tprivate async loadIconPathData(): Promise<void> {\n\t\tconst {name, visible} = this\n\t\tif (!Build.isBrowser || !name || !visible) {\n\t\t\treturn\n\t\t}\n\t\tawait this.loadIcon()\n\t}\n\n\tconnectedCallback(): void {\n\t\tif (iconsLazyLoad()) {\n\t\t\tthis.visible = true\n\t\t\tthis.loadIconPathData().finally()\n\t\t} else {\n\t\t\tthis.waitUntilVisible(async () => {\n\t\t\t\tthis.visible = true\n\t\t\t\tawait this.loadIconPathData()\n\t\t\t})\n\t\t}\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tif (this.intersectionObserver) {\n\t\t\tthis.intersectionObserver.disconnect()\n\t\t\tthis.intersectionObserver = null\n\t\t}\n\t}\n\n\tasync componentWillLoad(): Promise<void> {\n\t\tthis.validateColor(this.color)\n\t\tawait this.loadIconPathData()\n\t}\n\n\tprivate waitUntilVisible(callback: () => void): void {\n\t\tif (!Build.isBrowser || typeof window === \"undefined\" || !(window as any).IntersectionObserver) {\n\t\t\tcallback()\n\t\t\treturn\n\t\t}\n\t\tthis.intersectionObserver = new IntersectionObserver(\n\t\t\tentries => {\n\t\t\t\tentries.forEach(entry => {\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tif (this.intersectionObserver) {\n\t\t\t\t\t\t\tthis.intersectionObserver.disconnect()\n\t\t\t\t\t\t\tthis.intersectionObserver = null\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcallback()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t{rootMargin: \"50px\"},\n\t\t)\n\t\tthis.intersectionObserver.observe(this.host)\n\t}\n\n\tprivate async loadIcon() {\n\t\ttry {\n\t\t\tconst {name, type} = this\n\t\t\tconst data = await fetchIcon({name, type})\n\t\t\tconst isValid = isString(data) && data.indexOf('svg') > -1\n\t\t\tthis.host.innerHTML = isValid ? data : null;\n\t\t} catch (e) {\n\t\t\tthis.host.innerHTML = ''\n\t\t\tthis.error = true\n\t\t}\n\t}\n\n\trender() {\n\t\tif (this.error) {\n\t\t\treturn null\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(IconClass.root)} color={this.color}/>\n\t\t)\n\t}\n}\n"],"mappings":"uTAIO,MAAMA,EAAaC,EAAKC,EAAQ,CACtC,UACA,WACA,QACA,UACA,YACA,UACA,UACA,gBACA,gBACA,YACA,gBAID,IAAKC,GAAL,SAAKA,GACJA,EAAA,iBACAA,EAAA,qBACAA,EAAA,oBACA,EAJD,CAAKA,MAAK,KAOH,MAAMC,EAAY,CACxBC,KAAM,WACNC,OAAQ,oB,oBC1BF,MAAMC,EAAY,IACjBC,ECCR,MAAMC,EAAuC,GAC7C,MAAMC,EAAmD,GAEzD,MAAMC,EAAiBC,GAAiBA,EAAKC,WAAW,YAAcD,EAAKC,WAAW,YACtF,MAAMC,EAAU,CAACF,EAAcG,EAAcC,KAC5C,GAAIL,EAAcC,GAAO,CACxB,MAAO,GAAGA,KAAQI,KAAQD,WAAcR,K,CAEzC,OAAOU,EAAa,GAAGL,KAAQI,KAAQD,SAAc,MAAMR,KAAa,EAGlEW,eAAeC,GAAUJ,KAAEA,EAAIC,KAAEA,IACvC,MAAMI,EAAWJ,EAAO,IAAMD,EAC9B,GAAIN,EAAUW,GAAW,CACxB,OAAOX,EAAUW,E,CAElB,IAAKV,EAAaU,GAAW,CAC5BV,EAAaU,GAAYC,MAAMP,EAAQQ,IAAaP,EAAMC,IAAOO,MAAKC,IACrE,GAAIA,EAAKC,SAAW,IAAK,CACxB,OAAOD,EAAKE,M,KACN,CACN,MAAM,IAAIC,MAAM,0B,KAInB,MAAMf,QAAaF,EAAaU,GAChCX,EAAUW,GAAYR,EACtB,OAAOA,CACR,C,MClBagB,EAAOC,EAAA,MAAAD,UAAAE,EAInB,WAAAC,G,6DAYsC,K,UAIR,Q,aAEH,M,WACF,MAlBxBC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAqBvB,aAAAC,CAAcC,GACbC,EAAatC,EAAYqC,EAAUjC,EAAUC,K,CAItC,sBAAMkC,GACb,MAAMxB,KAACA,EAAIyB,QAAEA,GAAWR,KACxB,IAAyBjB,IAASyB,EAAS,CAC1C,M,OAEKR,KAAKS,U,CAGZ,iBAAAC,GACC,GAAIC,IAAiB,CACpBX,KAAKQ,QAAU,KACfR,KAAKO,mBAAmBK,S,KAClB,CACNZ,KAAKa,kBAAiB3B,UACrBc,KAAKQ,QAAU,WACTR,KAAKO,kBAAkB,G,EAKhC,oBAAAO,GACC,GAAId,KAAKe,qBAAsB,CAC9Bf,KAAKe,qBAAqBC,aAC1BhB,KAAKe,qBAAuB,I,EAI9B,uBAAME,GACLjB,KAAKI,cAAcJ,KAAKkB,aAClBlB,KAAKO,kB,CAGJ,gBAAAM,CAAiBM,GACxB,UAA+BC,SAAW,cAAiBA,OAAeC,qBAAsB,CAC/FF,IACA,M,CAEDnB,KAAKe,qBAAuB,IAAIM,sBAC/BC,IACCA,EAAQC,SAAQC,IACf,GAAIA,EAAMC,eAAgB,CACzB,GAAIzB,KAAKe,qBAAsB,CAC9Bf,KAAKe,qBAAqBC,aAC1BhB,KAAKe,qBAAuB,I,CAE7BI,G,IAEA,GAEH,CAACO,WAAY,SAEd1B,KAAKe,qBAAqBY,QAAQ3B,KAAKG,K,CAGhC,cAAMM,GACb,IACC,MAAM1B,KAACA,EAAIC,KAAEA,GAAQgB,KACrB,MAAM4B,QAAazC,EAAU,CAACJ,OAAMC,SACpC,MAAM6C,EAAUC,EAASF,IAASA,EAAKG,QAAQ,QAAU,EACzD/B,KAAKG,KAAK6B,UAAYH,EAAUD,EAAO,I,CACtC,MAAOK,GACRjC,KAAKG,KAAK6B,UAAY,GACtBhC,KAAKkC,MAAQ,I,EAIf,MAAAC,GACC,GAAInC,KAAKkC,MAAO,CACf,OAAO,I,CAER,OACCjC,EAACmC,EAAI,CAACC,MAAOrC,KAAKC,EAAEqC,QAAQlE,EAAUC,MAAO6C,MAAOlB,KAAKkB,O","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{p as e,H as a,c as t,h as s,d as i}from"./p-ae3dada7.js";import{a as o}from"./p-07165d99.js";import{a as c}from"./p-9a93146e.js";import{d as n}from"./p-7501abe8.js";import{d as m}from"./p-e0e2e9c1.js";import{g as r}from"./p-0075138f.js";import{d as l}from"./p-1366ed8d.js";import{d}from"./p-d5f25595.js";const f=".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-attachments-item,.gov-attachments-item{position:relative;display:flex;width:100%;gap:var(--spacing-s)}gov-attachments-item__messages>*:last-child,.gov-attachments-item__messages>*:last-child{margin-bottom:0}gov-attachments-item__file,.gov-attachments-item__file{display:flex;gap:var(--spacing-s)}gov-attachments-item__name,.gov-attachments-item__name{display:flex;gap:var(--spacing-s);flex-wrap:wrap;align-items:center;margin:0;color:var(--name-color, var(--text-primary))}gov-attachments-item__name span,.gov-attachments-item__name span{font-size:var(--font-size-xs);line-height:var(--height-line-xs);letter-spacing:0.0125rem;font-weight:400;color:var(--decor-color, var(--text-secondary))}";const p=f;const b=e(class e extends a{constructor(){super();this.__registerHost();this.govRemove=t(this,"gov-remove",7);this.accessibleRemoveLabel=undefined;this.accessibleRemoveLabelledBy=undefined;this.h=r(this.host)}async componentDidRender(){if(n()){await m(500);await this.validateAccessibility()}}render(){return s(i,{key:"f7878b14f668e2a1b23368dfcdea2e65e5de13b6",class:this.h.classes(o.root),role:"listitem"},s("div",{key:"4aaa01614a40507bc74d524756be66aac0632a4f",class:o.file},s("p",{key:"26eb87dd09942ee1d9bbf4bb13a76b4cb0240902",class:o.name},s("slot",{key:"5d4b3f690907e557526c9c22c88705a7e9ee3ef7"}),s("slot",{key:"1eff0d73e720ce22936a0004c476c3e01cbd88e1",name:"info"})),s("gov-button",{key:"e2395e9c5139093e01bd48b14221643394a22c6c",color:"primary",type:"base",size:"s","accessible-label":this.accessibleRemoveLabel,"accessible-labelledby":this.accessibleRemoveLabelledBy,"on-gov-click":this.govRemove.emit},s("gov-icon",{key:"c592f72a09dfce70c0cd2563ec0d781cc65ad77c",slot:"left-icon",name:"x-lg"}))),this.h.hasSlot("message")&&s("div",{key:"0bffbbe4622f291fd269637a4b4ff8c624fb04f7",class:o.messages},s("slot",{key:"2e6ad7d812e9b68f5c0e88ca734bf0bba78924a2",name:"message"})))}async validateAccessibility(){c(this.accessibleRemoveLabel,this.accessibleRemoveLabelledBy,o.root,this.host)}get host(){return this}static get style(){return p}},[4,"gov-attachments-item",{accessibleRemoveLabel:[1,"accessible-remove-label"],accessibleRemoveLabelledBy:[1,"accessible-remove-labelledby"],validateAccessibility:[64]}]);function g(){if(typeof customElements==="undefined"){return}const e=["gov-attachments-item","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-attachments-item":if(!customElements.get(e)){customElements.define(e,b)}break;case"gov-button":if(!customElements.get(e)){l()}break;case"gov-icon":if(!customElements.get(e)){d()}break}}))}g();export{b as G,g as d};
2
+ //# sourceMappingURL=p-dbae2385.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["govAttachmentsItemCss","GovAttachmentsItemStyle0","GovAttachmentsItem","proxyCustomElement","H","constructor","this","h","govHost","host","componentDidRender","canValidateWcagOnRender","delay","validateAccessibility","render","Host","key","class","classes","AttachmentsItemClass","root","role","file","name","color","type","size","accessibleRemoveLabel","accessibleRemoveLabelledBy","govRemove","emit","slot","hasSlot","messages","validateAccessibleLabel"],"sources":["../../../packages/core/src/components/gov-attachments/gov-attachments-item.scss?tag=gov-attachments-item","../../../packages/core/src/components/gov-attachments/gov-attachments-item.tsx"],"sourcesContent":["/* Attachments - Item */\n\n\ngov-attachments-item, .gov-attachments-item {\n\t// VARIABLES\n\t@import \"gov-attachments-variables\";\n\n\t@include base($display: flex);\n\tgap: var(--spacing-s);\n\t&__messages {\n\t\t@include reset-last-margin();\n\t}\n\t&__file {\n\t\tdisplay: flex;\n\t\tgap: var(--spacing-s);\n\t}\n\t&__name {\n\t\tdisplay: flex;\n\t\tgap: var(--spacing-s);\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\tmargin: 0;\n\t\tcolor: $attachments-name-color;\n\t\tspan {\n\t\t\t@include typography(\"xs\");\n\t\t\tcolor: $attachments-decor-color;\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop} from '@stencil/core'\nimport {AttachmentsItemClass} from './constants'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {delay} from '../../utils/utils'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-attachments-item',\n\tstyleUrl: 'gov-attachments-item.scss',\n})\nexport class GovAttachmentsItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovAttachmentsItemElement\n\n\t/**\n\t * Adds accessible label for the remove button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-remove-label'}) readonly accessibleRemoveLabel: string\n\t/**\n\t * Indicates the id of a component that labels the remove button.\n\t */\n\t@Prop({attribute: 'accessible-remove-labelledby'}) readonly accessibleRemoveLabelledBy: string\n\t/**\n\t * Emitted when the file is removed\n\t */\n\t@Event({eventName: 'gov-remove'}) govRemove: EventEmitter<PointerEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AttachmentsItemClass.root)} role=\"listitem\">\n\t\t\t\t<div class={AttachmentsItemClass.file}>\n\t\t\t\t\t<p class={AttachmentsItemClass.name}>\n\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t<slot name=\"info\"/>\n\t\t\t\t\t</p>\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\taccessible-label={this.accessibleRemoveLabel}\n\t\t\t\t\t\taccessible-labelledby={this.accessibleRemoveLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.govRemove.emit}\n\t\t\t\t\t>\n\t\t\t\t\t\t<gov-icon slot=\"left-icon\" name=\"x-lg\"></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot('message') && (\n\t\t\t\t\t<div class={AttachmentsItemClass.messages}>\n\t\t\t\t\t\t<slot name=\"message\"/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the accessible attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateAccessibleLabel(this.accessibleRemoveLabel, this.accessibleRemoveLabelledBy, AttachmentsItemClass.root, this.host)\n\t}\n}\n"],"mappings":"4TAAA,MAAMA,EAAwB,ghCAC9B,MAAAC,EAAeD,E,MCWFE,EAAkBC,EAAA,MAAAD,UAAAE,EAG9B,WAAAC,G,mJACCC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAkBvB,wBAAMC,GACL,GAAIC,IAA2B,OACxBC,EAAM,WACNN,KAAKO,uB,EAIb,MAAAC,GACC,OACCP,EAACQ,EAAI,CAAAC,IAAA,2CAACC,MAAOX,KAAKC,EAAEW,QAAQC,EAAqBC,MAAOC,KAAK,YAC5Dd,EAAA,OAAAS,IAAA,2CAAKC,MAAOE,EAAqBG,MAChCf,EAAA,KAAAS,IAAA,2CAAGC,MAAOE,EAAqBI,MAC9BhB,EAAA,QAAAS,IAAA,6CACAT,EAAA,QAAAS,IAAA,2CAAMO,KAAK,UAEZhB,EAAA,cAAAS,IAAA,2CACCQ,MAAM,UACNC,KAAK,OACLC,KAAK,IAAG,mBACUpB,KAAKqB,sBAAqB,wBACrBrB,KAAKsB,2BAA0B,eACxCtB,KAAKuB,UAAUC,MAE7BvB,EAAA,YAAAS,IAAA,2CAAUe,KAAK,YAAYR,KAAK,WAIjCjB,KAAKC,EAAEyB,QAAQ,YACfzB,EAAA,OAAAS,IAAA,2CAAKC,MAAOE,EAAqBc,UAChC1B,EAAA,QAAAS,IAAA,2CAAMO,KAAK,a,CAWhB,2BAAMV,GACLqB,EAAwB5B,KAAKqB,sBAAuBrB,KAAKsB,2BAA4BT,EAAqBC,KAAMd,KAAKG,K","ignoreList":[]}
1
+ {"version":3,"names":["govAttachmentsItemCss","GovAttachmentsItemStyle0","GovAttachmentsItem","proxyCustomElement","H","constructor","this","h","govHost","host","componentDidRender","canValidateWcagOnRender","delay","validateAccessibility","render","Host","key","class","classes","AttachmentsItemClass","root","role","file","name","color","type","size","accessibleRemoveLabel","accessibleRemoveLabelledBy","govRemove","emit","slot","hasSlot","messages","validateAccessibleLabel"],"sources":["../../../packages/core/src/components/gov-attachments/gov-attachments-item.scss?tag=gov-attachments-item","../../../packages/core/src/components/gov-attachments/gov-attachments-item.tsx"],"sourcesContent":["/* Attachments - Item */\n\n\ngov-attachments-item, .gov-attachments-item {\n\t// VARIABLES\n\t@import \"gov-attachments-variables\";\n\n\t@include base($display: flex);\n\tgap: var(--spacing-s);\n\t&__messages {\n\t\t@include reset-last-margin();\n\t}\n\t&__file {\n\t\tdisplay: flex;\n\t\tgap: var(--spacing-s);\n\t}\n\t&__name {\n\t\tdisplay: flex;\n\t\tgap: var(--spacing-s);\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\tmargin: 0;\n\t\tcolor: $attachments-name-color;\n\t\tspan {\n\t\t\t@include typography(\"xs\");\n\t\t\tcolor: $attachments-decor-color;\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop} from '@stencil/core'\nimport {AttachmentsItemClass} from './constants'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {delay} from '../../utils/utils'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-attachments-item',\n\tstyleUrl: 'gov-attachments-item.scss',\n})\nexport class GovAttachmentsItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovAttachmentsItemElement\n\n\t/**\n\t * Adds accessible label for the remove button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-remove-label'}) readonly accessibleRemoveLabel: string\n\t/**\n\t * Indicates the id of a component that labels the remove button.\n\t */\n\t@Prop({attribute: 'accessible-remove-labelledby'}) readonly accessibleRemoveLabelledBy: string\n\t/**\n\t * Emitted when the file is removed\n\t */\n\t@Event({eventName: 'gov-remove'}) govRemove: EventEmitter<PointerEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AttachmentsItemClass.root)} role=\"listitem\">\n\t\t\t\t<div class={AttachmentsItemClass.file}>\n\t\t\t\t\t<p class={AttachmentsItemClass.name}>\n\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t<slot name=\"info\"/>\n\t\t\t\t\t</p>\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\taccessible-label={this.accessibleRemoveLabel}\n\t\t\t\t\t\taccessible-labelledby={this.accessibleRemoveLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.govRemove.emit}\n\t\t\t\t\t>\n\t\t\t\t\t\t<gov-icon slot=\"left-icon\" name=\"x-lg\"></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot('message') && (\n\t\t\t\t\t<div class={AttachmentsItemClass.messages}>\n\t\t\t\t\t\t<slot name=\"message\"/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the accessible attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateAccessibleLabel(this.accessibleRemoveLabel, this.accessibleRemoveLabelledBy, AttachmentsItemClass.root, this.host)\n\t}\n}\n"],"mappings":"uTAAA,MAAMA,EAAwB,ghCAC9B,MAAAC,EAAeD,E,MCWFE,EAAkBC,EAAA,MAAAD,UAAAE,EAG9B,WAAAC,G,mJACCC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAkBvB,wBAAMC,GACL,GAAIC,IAA2B,OACxBC,EAAM,WACNN,KAAKO,uB,EAIb,MAAAC,GACC,OACCP,EAACQ,EAAI,CAAAC,IAAA,2CAACC,MAAOX,KAAKC,EAAEW,QAAQC,EAAqBC,MAAOC,KAAK,YAC5Dd,EAAA,OAAAS,IAAA,2CAAKC,MAAOE,EAAqBG,MAChCf,EAAA,KAAAS,IAAA,2CAAGC,MAAOE,EAAqBI,MAC9BhB,EAAA,QAAAS,IAAA,6CACAT,EAAA,QAAAS,IAAA,2CAAMO,KAAK,UAEZhB,EAAA,cAAAS,IAAA,2CACCQ,MAAM,UACNC,KAAK,OACLC,KAAK,IAAG,mBACUpB,KAAKqB,sBAAqB,wBACrBrB,KAAKsB,2BAA0B,eACxCtB,KAAKuB,UAAUC,MAE7BvB,EAAA,YAAAS,IAAA,2CAAUe,KAAK,YAAYR,KAAK,WAIjCjB,KAAKC,EAAEyB,QAAQ,YACfzB,EAAA,OAAAS,IAAA,2CAAKC,MAAOE,EAAqBc,UAChC1B,EAAA,QAAAS,IAAA,2CAAMO,KAAK,a,CAWhB,2BAAMV,GACLqB,EAAwB5B,KAAKqB,sBAAuBrB,KAAKsB,2BAA4BT,EAAqBC,KAAMd,KAAKG,K","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,c as i,h as s,d as a}from"./p-ae3dada7.js";import{v as o}from"./p-19c681a3.js";import{g as c}from"./p-0075138f.js";import{p as h}from"./p-e0e2e9c1.js";import{S as n}from"./p-92f420cb.js";import{a as f,c as d}from"./p-08621bdf.js";import{c as r}from"./p-95d41a3b.js";import{p as l}from"./p-016bbea6.js";import{i as b,A as p,a as m}from"./p-33d5d1ed.js";import{d as u}from"./p-5caf1fe1.js";const g=h(n,["_XS","_S","_M"]);var v;(function(t){t["SOLID"]="solid";t["OUTLINED"]="outlined"})(v||(v={}));var y;(function(t){t["A"]="a";t["SPAN"]="span";t["BUTTON"]="button"})(y||(y={}));const k={root:"gov-chip",inner:"gov-chip__inner",hasRight:"gov-chip--has-right",hasLeft:"gov-chip--has-left"};const j=t(class t extends e{constructor(){super();this.__registerHost();this.govClick=i(this,"gov-click",7);this.hydrated=false;this.disabled=false;this.href=undefined;this.target=undefined;this.iconLeft=undefined;this.iconRight=undefined;this.size=g._M;this.tag="span";this.color=f.PRIMARY;this.type=undefined;this.focusable=true;this.identifier=undefined;this.inheritedAttributes={};this.h=c(this.host);this.chipId=r("GovChip")}validateColor(t){o(f,t,k.root)}validateSize(t){o(d,t,k.root)}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size);this.inheritedAttributes=b(this.host)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(m)}disconnectedCallback(){this.attributeObserver.stopObserving()}connectedCallback(){this.hydrated=true}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}render(){const t=this.href?y.A:this.tag;const e=t==y.BUTTON?y.BUTTON:undefined;const i=l(this.iconLeft);const o=l(this.iconRight);return s(a,{key:"7273e571a906515a35208303f36eb3d2bac4b663",class:this.h.classes([k.root,this.h.hasSlot("right")?k.hasRight:undefined,this.h.hasSlot("left")?k.hasLeft:undefined]),disabled:this.disabled,href:this.href,color:this.color,type:this.type,size:this.size,hoverable:t==y.A||t==y.BUTTON,hydrated:this.hydrated},s(t,Object.assign({key:"8c32f17c36a757d8be7ae813ca113aa505375159",class:"element",href:this.href,target:this.target,ref:t=>this.triggerRef=t,onClick:this.onClickHandler.bind(this),tabindex:(this.h.hasSlot("left")||this.h.hasSlot("right")||this.disabled)&&!this.focusable?"-1":"0",id:this.identifier||this.chipId,type:e},this.inheritedAttributes,{"aria-disabled":this.disabled}),s("slot",{key:"e9fec4f49fbb1b43f73face265bc3c8dfcebc4fe",name:"left"}),s("slot",{key:"7fd9b938c44c55e66041d9298e285f34c80a0722",name:"left-icon"},i&&s("gov-icon",{key:"5f1a73b93fdbecfc0fe30ad45d0a86444e1b4703",type:i.type,name:i.name})),s("slot",{key:"e63ae004f3c4b5e164e326ca7cff300b68ba02ee"}),s("slot",{key:"39da8e323a6623cfb0eb6f6807931f496cfeb867",name:"right-icon"},o&&s("gov-icon",{key:"1518485f6d60b515a138dedc142ca7a013dd67bb",type:o.type,name:o.name})),s("slot",{key:"20059af90e74b6f8bb68673c56b387fd558eee29",name:"right"})))}onClickHandler(t){t.stopPropagation();if(this.disabled===false&&this.tag===y.BUTTON){this.govClick.emit(t)}}async geRef(){return this.triggerRef}async setFocus(){this.triggerRef.focus()}get host(){return this}static get watchers(){return{color:["validateColor"],size:["validateSize"]}}},[4,"gov-chip",{disabled:[516],href:[1],target:[1],iconLeft:[1,"icon-left"],iconRight:[1,"icon-right"],size:[1],tag:[1],color:[1],type:[513],focusable:[4],identifier:[1],inheritedAttributes:[32],geRef:[64],setFocus:[64]},undefined,{color:["validateColor"],size:["validateSize"]}]);function C(){if(typeof customElements==="undefined"){return}const t=["gov-chip","gov-icon"];t.forEach((t=>{switch(t){case"gov-chip":if(!customElements.get(t)){customElements.define(t,j)}break;case"gov-icon":if(!customElements.get(t)){u()}break}}))}C();export{j as G,C as d};
2
- //# sourceMappingURL=p-ff0cf148.js.map
1
+ import{p as t,H as e,c as i,h as s,d as a}from"./p-ae3dada7.js";import{v as o}from"./p-19c681a3.js";import{g as h}from"./p-0075138f.js";import{p as c}from"./p-e0e2e9c1.js";import{S as n}from"./p-92f420cb.js";import{a as f,c as d}from"./p-08621bdf.js";import{c as r}from"./p-95d41a3b.js";import{p as l}from"./p-016bbea6.js";import{i as b,A as p,a as m}from"./p-33d5d1ed.js";import{d as u}from"./p-d5f25595.js";const g=c(n,["_XS","_S","_M"]);var v;(function(t){t["SOLID"]="solid";t["OUTLINED"]="outlined"})(v||(v={}));var y;(function(t){t["A"]="a";t["SPAN"]="span";t["BUTTON"]="button"})(y||(y={}));const k={root:"gov-chip",inner:"gov-chip__inner",hasRight:"gov-chip--has-right",hasLeft:"gov-chip--has-left"};const j=t(class t extends e{constructor(){super();this.__registerHost();this.govClick=i(this,"gov-click",7);this.hydrated=false;this.disabled=false;this.href=undefined;this.target=undefined;this.iconLeft=undefined;this.iconRight=undefined;this.size=g._M;this.tag="span";this.color=f.PRIMARY;this.type=undefined;this.focusable=true;this.identifier=undefined;this.inheritedAttributes={};this.h=h(this.host);this.chipId=r("GovChip")}validateColor(t){o(f,t,k.root)}validateSize(t){o(d,t,k.root)}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size);this.inheritedAttributes=b(this.host)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(m)}disconnectedCallback(){this.attributeObserver.stopObserving()}connectedCallback(){this.hydrated=true}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}render(){const t=this.href?y.A:this.tag;const e=t==y.BUTTON?y.BUTTON:undefined;const i=l(this.iconLeft);const o=l(this.iconRight);return s(a,{key:"7273e571a906515a35208303f36eb3d2bac4b663",class:this.h.classes([k.root,this.h.hasSlot("right")?k.hasRight:undefined,this.h.hasSlot("left")?k.hasLeft:undefined]),disabled:this.disabled,href:this.href,color:this.color,type:this.type,size:this.size,hoverable:t==y.A||t==y.BUTTON,hydrated:this.hydrated},s(t,Object.assign({key:"8c32f17c36a757d8be7ae813ca113aa505375159",class:"element",href:this.href,target:this.target,ref:t=>this.triggerRef=t,onClick:this.onClickHandler.bind(this),tabindex:(this.h.hasSlot("left")||this.h.hasSlot("right")||this.disabled)&&!this.focusable?"-1":"0",id:this.identifier||this.chipId,type:e},this.inheritedAttributes,{"aria-disabled":this.disabled}),s("slot",{key:"e9fec4f49fbb1b43f73face265bc3c8dfcebc4fe",name:"left"}),s("slot",{key:"7fd9b938c44c55e66041d9298e285f34c80a0722",name:"left-icon"},i&&s("gov-icon",{key:"5f1a73b93fdbecfc0fe30ad45d0a86444e1b4703",type:i.type,name:i.name})),s("slot",{key:"e63ae004f3c4b5e164e326ca7cff300b68ba02ee"}),s("slot",{key:"39da8e323a6623cfb0eb6f6807931f496cfeb867",name:"right-icon"},o&&s("gov-icon",{key:"1518485f6d60b515a138dedc142ca7a013dd67bb",type:o.type,name:o.name})),s("slot",{key:"20059af90e74b6f8bb68673c56b387fd558eee29",name:"right"})))}onClickHandler(t){t.stopPropagation();if(this.disabled===false&&this.tag===y.BUTTON){this.govClick.emit(t)}}async geRef(){return this.triggerRef}async setFocus(){this.triggerRef.focus()}get host(){return this}static get watchers(){return{color:["validateColor"],size:["validateSize"]}}},[4,"gov-chip",{disabled:[516],href:[1],target:[1],iconLeft:[1,"icon-left"],iconRight:[1,"icon-right"],size:[1],tag:[1],color:[1],type:[513],focusable:[4],identifier:[1],inheritedAttributes:[32],geRef:[64],setFocus:[64]},undefined,{color:["validateColor"],size:["validateSize"]}]);function C(){if(typeof customElements==="undefined"){return}const t=["gov-chip","gov-icon"];t.forEach((t=>{switch(t){case"gov-chip":if(!customElements.get(t)){customElements.define(t,j)}break;case"gov-icon":if(!customElements.get(t)){u()}break}}))}C();export{j as G,C as d};
2
+ //# sourceMappingURL=p-dcaf0383.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as i,b as a}from"./p-a1e95a5f.js";export{s as setNonce}from"./p-a1e95a5f.js";import{g as l}from"./p-e1255160.js";var t=()=>{{o(i.prototype)}const a=import.meta.url;const l={};if(a!==""){l.resourcesUrl=new URL(".",a).href}return e(l)};var o=e=>{const i=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return i.call(this,e)}const a=i.call(this,false);const l=this.childNodes;if(e){for(let e=0;e<l.length;e++){if(l[e].nodeType!==2){a.appendChild(l[e].cloneNode(true))}}}return a}};t().then((async e=>{await l();return a(JSON.parse('[["p-edc05eff",[[4,"gov-form-file",{"expanded":[4],"required":[4],"disabled":[4],"resetAfterPick":[4,"reset-after-pick"],"ignoreFileDuplicationCheck":[4,"ignore-file-duplication-check"],"displayAttachments":[4,"display-attachments"],"name":[1],"accept":[1],"multiple":[4],"maxFileSize":[2,"max-file-size"],"identifier":[1],"invalid":[4],"errorSize":[1,"error-size"],"errorAccept":[1,"error-accept"],"attachmentsLabel":[1,"attachments-label"],"accessibleRemoveLabel":[1,"accessible-remove-label"],"accessibleAttachmentsLabel":[1,"accessible-attachments-label"],"files":[32],"inheritedAttributes":[32],"getRef":[64],"getAreaRef":[64],"reset":[64]},null,{"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"]}]]],["p-6ed147a6",[[4,"gov-form-multi-select",{"value":[1537],"options":[1537],"identifier":[1],"placeholder":[1],"size":[1],"name":[1],"hideSelectedList":[4,"hide-selected-list"],"required":[4],"disabled":[4],"invalid":[4],"success":[4],"messageEmpty":[1,"message-empty"],"messageLoading":[1,"message-loading"],"focused":[32],"valueState":[32],"selectedOptionsState":[32],"optionsState":[32],"inheritedAttributes":[32],"setFocus":[64],"setValue":[64],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"options":["watchOptions"],"value":["watchValue"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"],"success":["watchControlAttrs"]}]]],["p-f456bd71",[[4,"gov-dialog",{"open":[1540],"blockClose":[4,"block-close"],"blockBackdropClose":[4,"block-backdrop-close"],"role":[1],"labelTag":[1,"label-tag"],"accessibleLabelledBy":[1,"accessible-labelled-by"],"accessibleDescribedBy":[1,"accessible-described-by"],"accessibleCloseLabel":[1,"accessible-close-label"],"accessibleCloseLabelledBy":[1,"accessible-close-labelled-by"],"setFocus":[64],"validateAccessibility":[64]},null,{"open":["watchOpen"]}]]],["p-dc3fab19",[[0,"gov-pagination",{"type":[1],"current":[2],"total":[2],"selectIdentifier":[1,"select-identifier"],"size":[1],"color":[1],"pageSize":[2,"page-size"],"maxPages":[2,"max-pages"],"link":[1],"accessibleSelectLabel":[1,"accessible-select-label"],"accessiblePageLabel":[1,"accessible-page-label"],"labelPrev":[1,"label-prev"],"labelStart":[1,"label-start"],"labelNext":[1,"label-next"],"labelEnd":[1,"label-end"],"pagination":[32],"inheritedAttributes":[32]},null,{"type":["validateType"],"size":["validateSize"],"color":["validateColor"],"current":["recalculate"],"total":["recalculate"],"pageSize":["recalculate"],"maxPages":["recalculate"]}]]],["p-b55fc943",[[4,"gov-breadcrumbs",{"collapsible":[4],"isExpanded":[4,"is-expanded"],"accessibleLabel":[1,"accessible-label"],"accessibleLabelledBy":[1,"accessible-labelledby"],"accessibleToggleLabel":[1,"accessible-toggle-label"],"expanded":[32],"toggleOption":[32],"validateAccessibility":[64]}]]],["p-7cf554e6",[[4,"gov-infobar",{"color":[1],"type":[1],"role":[1],"accessibleCloseLabel":[1,"accessible-close-label"],"accessibleToggleLabel":[1,"accessible-toggle-label"],"closable":[4],"toggleContent":[32],"inheritedAttributes":[32]},null,{"color":["validateColor"]}]]],["p-a1ebb4da",[[4,"gov-loading",{"size":[1]},null,{"size":["validateSize"]}]]],["p-0a952b3c",[[4,"gov-tabs",{"type":[1],"size":[1],"color":[1],"orientation":[1],"direction":[513],"controllers":[32],"focusIndex":[32],"inheritedAttributes":[32],"refresh":[64],"currentTab":[64],"setActiveTab":[64],"rerender":[64]},null,{"type":["validateType"],"color":["validateColor"],"size":["validateSize"]}]]],["p-c214c202",[[4,"gov-toast",{"color":[1],"gravity":[1],"position":[1],"type":[1],"time":[2],"closeLabel":[1,"close-label"],"accessibleCloseLabel":[1,"accessible-close-label"],"inheritedAttributes":[32],"destroy":[64]},null,{"color":["validateColor"]}]]],["p-aa8adc45",[[4,"gov-tooltip-content",{"color":[1],"size":[1],"persist":[4],"isVisible":[1028,"is-visible"],"parentId":[1,"parent-id"]},null,{"isVisible":["visibleContent"]}]]],["p-023787b3",[[4,"gov-accordion-item",{"identifier":[1],"size":[1],"disabled":[4],"open":[1028],"openState":[32],"toggle":[64],"currentState":[64]},null,{"size":["validateSize"]}]]],["p-904de5e6",[[4,"gov-card",{"promotion":[4],"collapsible":[4],"open":[1540],"accessibleTriggerLabel":[1,"accessible-label"],"accessibleTriggerLabelledBy":[1,"accessible-labelledby"],"validateAccessibility":[64]}]]],["p-0ebc8365",[[4,"gov-form-checkbox",{"value":[1],"checked":[1540],"required":[4],"disabled":[4],"indeterminate":[516],"name":[1],"size":[1],"identifier":[1],"noLabel":[4,"no-label"],"invalid":[4],"inheritedAttributes":[32],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"]}]]],["p-35e66bef",[[4,"gov-form-switch",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"inheritedAttributes":[32],"getRef":[64]},null,{"size":["validateSize","watchDisabled"],"disabled":["watchDisabled"],"invalid":["watchDisabled"]}]]],["p-2effdd60",[[4,"gov-tag",{"iconLeft":[1,"icon-left"],"iconRight":[1,"icon-right"],"size":[513],"color":[513],"type":[513]},null,{"color":["validateColor"],"size":["validateSize"]}]]],["p-9dde00d8",[[4,"gov-tile",{"size":[513],"orientation":[1],"noBorder":[4,"no-border"],"href":[513],"target":[1],"getTriggerRef":[64]}]]],["p-5dc0af54",[[4,"gov-wizard-item",{"color":[1],"size":[1],"identifier":[1],"collapsible":[4],"disabled":[4],"isExpanded":[1028,"is-expanded"],"open":[64],"close":[64],"toggle":[64],"currentState":[64]},null,{"color":["validateColor"]}]]],["p-477a5027",[[0,"gov-app"],[0,"gov-theme-switch",{"theme":[32]}]]],["p-9b41ac88",[[4,"gov-accordion",{"size":[1],"noBorder":[4,"no-border"]},null,{"size":["validateSize"]}]]],["p-006e52f1",[[4,"gov-container",{"slottedChildren":[64]}]]],["p-5dcbfca3",[[4,"gov-control-group",{"color":[1],"noBorder":[4,"no-border"],"fitContent":[4,"fit-content"]},null,{"color":["validateColor"]}]]],["p-e134b123",[[4,"gov-cookiebar"]]],["p-a5489b0e",[[4,"gov-dropdown",{"identifier":[1],"open":[1028],"position":[1],"getState":[64],"toggle":[64]},null,{"open":["watchOpen"]}]]],["p-17015e36",[[4,"gov-empty",{"size":[1]},null,{"size":["validateSize"]}]]],["p-91a9cd24",[[4,"gov-error-code"]]],["p-f1be099b",[[4,"gov-form-checkbox-group",{"gap":[1],"orientation":[1],"value":[1025]},null,{"gap":["validateGap"],"orientation":["validateOrientation"]}]]],["p-6b42a387",[[4,"gov-form-control",{"identifier":[1],"invalid":[516],"disabled":[516],"success":[516],"fieldset":[4],"size":[1]}]]],["p-9ff8f059",[[4,"gov-form-group",{"gap":[1],"orientation":[1]},null,{"gap":["validateGap"],"orientation":["validateOrientation"]}]]],["p-47e364bb",[[4,"gov-form-label",{"identifier":[1],"size":[1],"required":[4],"legend":[4]}]]],["p-f141ad5e",[[4,"gov-form-password-power",{"power":[514]}]]],["p-9d0f20ec",[[4,"gov-form-radio",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"inheritedAttributes":[32],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"]}]]],["p-d2351924",[[4,"gov-form-radio-group",{"gap":[1],"orientation":[1],"value":[1025]},null,{"gap":["validateGap"],"orientation":["validateOrientation"]}]]],["p-eeb9cb73",[[4,"gov-form-search",{"size":[1],"color":[513]}]]],["p-a54f1db9",[[4,"gov-grid",{"alignX":[1,"align-x"],"alignY":[1,"align-y"]}]]],["p-83039b10",[[4,"gov-grid-item",{"size":[1],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]}]]],["p-a53a277a",[[4,"gov-layout",{"type":[1],"variant":[1],"inverse":[4]}]]],["p-b838bb27",[[4,"gov-layout-column"]]],["p-b3acb156",[[4,"gov-message",{"color":[1],"type":[1]},null,{"color":["validateColor"]}]]],["p-182189d2",[[0,"gov-spacer",{"size":[1],"breakpoint":[1]},null,{"size":["validateSize"],"breakpoint":["validateBreakpoint"]}]]],["p-2ed3afef",[[4,"gov-stepper",{"size":[1]},null,{"size":["validateSize"]}]]],["p-e4978aab",[[4,"gov-stepper-item",{"color":[1],"size":[1],"identifier":[1]},null,{"color":["validateColor"]}]]],["p-3f2b803c",[[4,"gov-tabs-item",{"identifier":[1],"triggerIdentifier":[1,"trigger-identifier"],"label":[513],"disabled":[516],"iconStart":[513,"icon-start"],"iconEnd":[513,"icon-end"],"default":[4],"isActive":[32],"getIdentifier":[64],"getTriggerIdentifier":[64],"getDisableState":[64],"setActiveStatus":[64]},null,{"label":["rerenderParent"],"disabled":["rerenderParent"]}]]],["p-c4c7cb24",[[4,"gov-tiles",{"columns":[514]}]]],["p-db940455",[[4,"gov-tooltip",{"color":[1],"size":[1],"position":[1025],"message":[1],"identifier":[1],"icon":[516],"persist":[32],"show":[64],"hide":[64]},null,{"color":["validateColor"],"size":["validateSize"],"position":["validatePosition"],"message":["rerenderMessage"]}]]],["p-963f9fcd",[[4,"gov-wizard",{"size":[1],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]},null,{"size":["validateSize"]}]]],["p-74e9ad9d",[[0,"gov-icon",{"color":[513],"name":[513],"type":[513],"visible":[32],"error":[32]},null,{"color":["validateColor"],"name":["loadIconPathData"]}]]],["p-ab9ae7ba",[[4,"gov-button",{"color":[513],"size":[513],"type":[513],"expanded":[516],"name":[1],"disabled":[516],"nativeType":[1,"native-type"],"href":[1],"target":[1],"download":[4],"hreflang":[1],"referrerpolicy":[1],"rel":[1],"loading":[1],"focusable":[4],"identifier":[1],"inheritedAttributes":[32],"setFocus":[64],"getRef":[64],"validateAccessibility":[64]},null,{"color":["validateColor"],"type":["validateType"],"size":["validateSize"],"nativeType":["validateNativeType"]}]]],["p-fc90bf06",[[4,"gov-form-autocomplete",{"value":[1537],"options":[1537],"identifier":[1],"success":[4],"size":[1],"nameKey":[1,"name-key"],"name":[1],"required":[4],"disabled":[4],"placeholder":[1],"readonly":[4],"invalid":[4],"minlength":[2],"maxlength":[2],"throttleTime":[2,"throttle-time"],"messageEmpty":[1,"message-empty"],"messageLoading":[1,"message-loading"],"focused":[32],"processing":[32],"arrowCounter":[32],"list":[32],"inheritedAttributes":[32],"setFocus":[64],"setBlur":[64],"setOptions":[64],"clearValue":[64],"setProcessing":[64],"setSearchCallback":[64],"setTemplateResolver":[64]},null,{"size":["validateSize"],"options":["watchOptions"]}]]],["p-81b0848c",[[4,"gov-chip",{"disabled":[516],"href":[1],"target":[1],"iconLeft":[1,"icon-left"],"iconRight":[1,"icon-right"],"size":[1],"tag":[1],"color":[1],"type":[513],"focusable":[4],"identifier":[1],"inheritedAttributes":[32],"geRef":[64],"setFocus":[64]},null,{"color":["validateColor"],"size":["validateSize"]}]]],["p-fa7caad6",[[4,"gov-form-select",{"value":[1537],"options":[1537],"identifier":[1],"size":[1],"name":[1],"required":[4],"success":[4],"disabled":[4],"invalid":[4],"focused":[32],"optionsState":[32],"inheritedAttributes":[32],"setFocus":[64],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"options":["watchOptions"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"],"success":["watchControlAttrs"],"value":["watchValue"]}]]],["p-663d3db2",[[0,"gov-backdrop",{"inverse":[4],"disabled":[1540],"accessibleLabel":[1,"accessible-label"],"accessibleLabelledBy":[1,"accessible-labelledby"],"validateAccessibility":[64]}]]],["p-6d772ff9",[[4,"gov-attachments-item",{"accessibleRemoveLabel":[1,"accessible-remove-label"],"accessibleRemoveLabelledBy":[1,"accessible-remove-labelledby"],"validateAccessibility":[64]}],[4,"gov-attachments",{"label":[1],"wcagLabel":[1,"wcag-label"],"validateWcag":[64]}],[4,"gov-form-message",{"color":[1],"size":[1],"identifier":[64]},null,{"color":["validateColor"]}]]],["p-5c88f415",[[4,"gov-form-input",{"value":[1537],"identifier":[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],"accessibleShowPasswordLabel":[1,"accessible-show-password-label"],"accessibleHidePasswordLabel":[1,"accessible-hide-password-label"],"focused":[32],"showPassword":[32],"inheritedAttributes":[32],"setFocus":[64],"setValue":[64],"clearValue":[64],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"],"success":["watchControlAttrs"]}],[0,"gov-skeleton",{"size":[1],"color":[1],"shape":[1],"width":[1],"height":[1],"animation":[1],"inheritedAttributes":[32]},null,{"size":["validateSize"],"shape":["validateShape"],"animation":["validateAnimation"]}]]]]'),e)}));
1
+ import{p as e,H as i,b as a}from"./p-a1e95a5f.js";export{s as setNonce}from"./p-a1e95a5f.js";import{g as l}from"./p-e1255160.js";var t=()=>{{o(i.prototype)}const a=import.meta.url;const l={};if(a!==""){l.resourcesUrl=new URL(".",a).href}return e(l)};var o=e=>{const i=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return i.call(this,e)}const a=i.call(this,false);const l=this.childNodes;if(e){for(let e=0;e<l.length;e++){if(l[e].nodeType!==2){a.appendChild(l[e].cloneNode(true))}}}return a}};t().then((async e=>{await l();return a(JSON.parse('[["p-edc05eff",[[4,"gov-form-file",{"expanded":[4],"required":[4],"disabled":[4],"resetAfterPick":[4,"reset-after-pick"],"ignoreFileDuplicationCheck":[4,"ignore-file-duplication-check"],"displayAttachments":[4,"display-attachments"],"name":[1],"accept":[1],"multiple":[4],"maxFileSize":[2,"max-file-size"],"identifier":[1],"invalid":[4],"errorSize":[1,"error-size"],"errorAccept":[1,"error-accept"],"attachmentsLabel":[1,"attachments-label"],"accessibleRemoveLabel":[1,"accessible-remove-label"],"accessibleAttachmentsLabel":[1,"accessible-attachments-label"],"files":[32],"inheritedAttributes":[32],"getRef":[64],"getAreaRef":[64],"reset":[64]},null,{"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"]}]]],["p-6ed147a6",[[4,"gov-form-multi-select",{"value":[1537],"options":[1537],"identifier":[1],"placeholder":[1],"size":[1],"name":[1],"hideSelectedList":[4,"hide-selected-list"],"required":[4],"disabled":[4],"invalid":[4],"success":[4],"messageEmpty":[1,"message-empty"],"messageLoading":[1,"message-loading"],"focused":[32],"valueState":[32],"selectedOptionsState":[32],"optionsState":[32],"inheritedAttributes":[32],"setFocus":[64],"setValue":[64],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"options":["watchOptions"],"value":["watchValue"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"],"success":["watchControlAttrs"]}]]],["p-f456bd71",[[4,"gov-dialog",{"open":[1540],"blockClose":[4,"block-close"],"blockBackdropClose":[4,"block-backdrop-close"],"role":[1],"labelTag":[1,"label-tag"],"accessibleLabelledBy":[1,"accessible-labelled-by"],"accessibleDescribedBy":[1,"accessible-described-by"],"accessibleCloseLabel":[1,"accessible-close-label"],"accessibleCloseLabelledBy":[1,"accessible-close-labelled-by"],"setFocus":[64],"validateAccessibility":[64]},null,{"open":["watchOpen"]}]]],["p-dc3fab19",[[0,"gov-pagination",{"type":[1],"current":[2],"total":[2],"selectIdentifier":[1,"select-identifier"],"size":[1],"color":[1],"pageSize":[2,"page-size"],"maxPages":[2,"max-pages"],"link":[1],"accessibleSelectLabel":[1,"accessible-select-label"],"accessiblePageLabel":[1,"accessible-page-label"],"labelPrev":[1,"label-prev"],"labelStart":[1,"label-start"],"labelNext":[1,"label-next"],"labelEnd":[1,"label-end"],"pagination":[32],"inheritedAttributes":[32]},null,{"type":["validateType"],"size":["validateSize"],"color":["validateColor"],"current":["recalculate"],"total":["recalculate"],"pageSize":["recalculate"],"maxPages":["recalculate"]}]]],["p-b55fc943",[[4,"gov-breadcrumbs",{"collapsible":[4],"isExpanded":[4,"is-expanded"],"accessibleLabel":[1,"accessible-label"],"accessibleLabelledBy":[1,"accessible-labelledby"],"accessibleToggleLabel":[1,"accessible-toggle-label"],"expanded":[32],"toggleOption":[32],"validateAccessibility":[64]}]]],["p-7cf554e6",[[4,"gov-infobar",{"color":[1],"type":[1],"role":[1],"accessibleCloseLabel":[1,"accessible-close-label"],"accessibleToggleLabel":[1,"accessible-toggle-label"],"closable":[4],"toggleContent":[32],"inheritedAttributes":[32]},null,{"color":["validateColor"]}]]],["p-a1ebb4da",[[4,"gov-loading",{"size":[1]},null,{"size":["validateSize"]}]]],["p-0a952b3c",[[4,"gov-tabs",{"type":[1],"size":[1],"color":[1],"orientation":[1],"direction":[513],"controllers":[32],"focusIndex":[32],"inheritedAttributes":[32],"refresh":[64],"currentTab":[64],"setActiveTab":[64],"rerender":[64]},null,{"type":["validateType"],"color":["validateColor"],"size":["validateSize"]}]]],["p-c214c202",[[4,"gov-toast",{"color":[1],"gravity":[1],"position":[1],"type":[1],"time":[2],"closeLabel":[1,"close-label"],"accessibleCloseLabel":[1,"accessible-close-label"],"inheritedAttributes":[32],"destroy":[64]},null,{"color":["validateColor"]}]]],["p-aa8adc45",[[4,"gov-tooltip-content",{"color":[1],"size":[1],"persist":[4],"isVisible":[1028,"is-visible"],"parentId":[1,"parent-id"]},null,{"isVisible":["visibleContent"]}]]],["p-023787b3",[[4,"gov-accordion-item",{"identifier":[1],"size":[1],"disabled":[4],"open":[1028],"openState":[32],"toggle":[64],"currentState":[64]},null,{"size":["validateSize"]}]]],["p-904de5e6",[[4,"gov-card",{"promotion":[4],"collapsible":[4],"open":[1540],"accessibleTriggerLabel":[1,"accessible-label"],"accessibleTriggerLabelledBy":[1,"accessible-labelledby"],"validateAccessibility":[64]}]]],["p-0ebc8365",[[4,"gov-form-checkbox",{"value":[1],"checked":[1540],"required":[4],"disabled":[4],"indeterminate":[516],"name":[1],"size":[1],"identifier":[1],"noLabel":[4,"no-label"],"invalid":[4],"inheritedAttributes":[32],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"]}]]],["p-35e66bef",[[4,"gov-form-switch",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"inheritedAttributes":[32],"getRef":[64]},null,{"size":["validateSize","watchDisabled"],"disabled":["watchDisabled"],"invalid":["watchDisabled"]}]]],["p-2effdd60",[[4,"gov-tag",{"iconLeft":[1,"icon-left"],"iconRight":[1,"icon-right"],"size":[513],"color":[513],"type":[513]},null,{"color":["validateColor"],"size":["validateSize"]}]]],["p-9dde00d8",[[4,"gov-tile",{"size":[513],"orientation":[1],"noBorder":[4,"no-border"],"href":[513],"target":[1],"getTriggerRef":[64]}]]],["p-5dc0af54",[[4,"gov-wizard-item",{"color":[1],"size":[1],"identifier":[1],"collapsible":[4],"disabled":[4],"isExpanded":[1028,"is-expanded"],"open":[64],"close":[64],"toggle":[64],"currentState":[64]},null,{"color":["validateColor"]}]]],["p-477a5027",[[0,"gov-app"],[0,"gov-theme-switch",{"theme":[32]}]]],["p-9b41ac88",[[4,"gov-accordion",{"size":[1],"noBorder":[4,"no-border"]},null,{"size":["validateSize"]}]]],["p-006e52f1",[[4,"gov-container",{"slottedChildren":[64]}]]],["p-5dcbfca3",[[4,"gov-control-group",{"color":[1],"noBorder":[4,"no-border"],"fitContent":[4,"fit-content"]},null,{"color":["validateColor"]}]]],["p-e134b123",[[4,"gov-cookiebar"]]],["p-a5489b0e",[[4,"gov-dropdown",{"identifier":[1],"open":[1028],"position":[1],"getState":[64],"toggle":[64]},null,{"open":["watchOpen"]}]]],["p-17015e36",[[4,"gov-empty",{"size":[1]},null,{"size":["validateSize"]}]]],["p-91a9cd24",[[4,"gov-error-code"]]],["p-f1be099b",[[4,"gov-form-checkbox-group",{"gap":[1],"orientation":[1],"value":[1025]},null,{"gap":["validateGap"],"orientation":["validateOrientation"]}]]],["p-6b42a387",[[4,"gov-form-control",{"identifier":[1],"invalid":[516],"disabled":[516],"success":[516],"fieldset":[4],"size":[1]}]]],["p-9ff8f059",[[4,"gov-form-group",{"gap":[1],"orientation":[1]},null,{"gap":["validateGap"],"orientation":["validateOrientation"]}]]],["p-47e364bb",[[4,"gov-form-label",{"identifier":[1],"size":[1],"required":[4],"legend":[4]}]]],["p-f141ad5e",[[4,"gov-form-password-power",{"power":[514]}]]],["p-9d0f20ec",[[4,"gov-form-radio",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"inheritedAttributes":[32],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"]}]]],["p-d2351924",[[4,"gov-form-radio-group",{"gap":[1],"orientation":[1],"value":[1025]},null,{"gap":["validateGap"],"orientation":["validateOrientation"]}]]],["p-eeb9cb73",[[4,"gov-form-search",{"size":[1],"color":[513]}]]],["p-a54f1db9",[[4,"gov-grid",{"alignX":[1,"align-x"],"alignY":[1,"align-y"]}]]],["p-83039b10",[[4,"gov-grid-item",{"size":[1],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]}]]],["p-a53a277a",[[4,"gov-layout",{"type":[1],"variant":[1],"inverse":[4]}]]],["p-b838bb27",[[4,"gov-layout-column"]]],["p-b3acb156",[[4,"gov-message",{"color":[1],"type":[1]},null,{"color":["validateColor"]}]]],["p-182189d2",[[0,"gov-spacer",{"size":[1],"breakpoint":[1]},null,{"size":["validateSize"],"breakpoint":["validateBreakpoint"]}]]],["p-2ed3afef",[[4,"gov-stepper",{"size":[1]},null,{"size":["validateSize"]}]]],["p-e4978aab",[[4,"gov-stepper-item",{"color":[1],"size":[1],"identifier":[1]},null,{"color":["validateColor"]}]]],["p-3f2b803c",[[4,"gov-tabs-item",{"identifier":[1],"triggerIdentifier":[1,"trigger-identifier"],"label":[513],"disabled":[516],"iconStart":[513,"icon-start"],"iconEnd":[513,"icon-end"],"default":[4],"isActive":[32],"getIdentifier":[64],"getTriggerIdentifier":[64],"getDisableState":[64],"setActiveStatus":[64]},null,{"label":["rerenderParent"],"disabled":["rerenderParent"]}]]],["p-c4c7cb24",[[4,"gov-tiles",{"columns":[514]}]]],["p-db940455",[[4,"gov-tooltip",{"color":[1],"size":[1],"position":[1025],"message":[1],"identifier":[1],"icon":[516],"persist":[32],"show":[64],"hide":[64]},null,{"color":["validateColor"],"size":["validateSize"],"position":["validatePosition"],"message":["rerenderMessage"]}]]],["p-963f9fcd",[[4,"gov-wizard",{"size":[1],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]},null,{"size":["validateSize"]}]]],["p-a16229c6",[[0,"gov-icon",{"color":[513],"name":[513],"type":[513],"visible":[32],"error":[32]},null,{"color":["validateColor"],"name":["loadIconPathData"]}]]],["p-ab9ae7ba",[[4,"gov-button",{"color":[513],"size":[513],"type":[513],"expanded":[516],"name":[1],"disabled":[516],"nativeType":[1,"native-type"],"href":[1],"target":[1],"download":[4],"hreflang":[1],"referrerpolicy":[1],"rel":[1],"loading":[1],"focusable":[4],"identifier":[1],"inheritedAttributes":[32],"setFocus":[64],"getRef":[64],"validateAccessibility":[64]},null,{"color":["validateColor"],"type":["validateType"],"size":["validateSize"],"nativeType":["validateNativeType"]}]]],["p-fc90bf06",[[4,"gov-form-autocomplete",{"value":[1537],"options":[1537],"identifier":[1],"success":[4],"size":[1],"nameKey":[1,"name-key"],"name":[1],"required":[4],"disabled":[4],"placeholder":[1],"readonly":[4],"invalid":[4],"minlength":[2],"maxlength":[2],"throttleTime":[2,"throttle-time"],"messageEmpty":[1,"message-empty"],"messageLoading":[1,"message-loading"],"focused":[32],"processing":[32],"arrowCounter":[32],"list":[32],"inheritedAttributes":[32],"setFocus":[64],"setBlur":[64],"setOptions":[64],"clearValue":[64],"setProcessing":[64],"setSearchCallback":[64],"setTemplateResolver":[64]},null,{"size":["validateSize"],"options":["watchOptions"]}]]],["p-81b0848c",[[4,"gov-chip",{"disabled":[516],"href":[1],"target":[1],"iconLeft":[1,"icon-left"],"iconRight":[1,"icon-right"],"size":[1],"tag":[1],"color":[1],"type":[513],"focusable":[4],"identifier":[1],"inheritedAttributes":[32],"geRef":[64],"setFocus":[64]},null,{"color":["validateColor"],"size":["validateSize"]}]]],["p-fa7caad6",[[4,"gov-form-select",{"value":[1537],"options":[1537],"identifier":[1],"size":[1],"name":[1],"required":[4],"success":[4],"disabled":[4],"invalid":[4],"focused":[32],"optionsState":[32],"inheritedAttributes":[32],"setFocus":[64],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"options":["watchOptions"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"],"success":["watchControlAttrs"],"value":["watchValue"]}]]],["p-663d3db2",[[0,"gov-backdrop",{"inverse":[4],"disabled":[1540],"accessibleLabel":[1,"accessible-label"],"accessibleLabelledBy":[1,"accessible-labelledby"],"validateAccessibility":[64]}]]],["p-6d772ff9",[[4,"gov-attachments-item",{"accessibleRemoveLabel":[1,"accessible-remove-label"],"accessibleRemoveLabelledBy":[1,"accessible-remove-labelledby"],"validateAccessibility":[64]}],[4,"gov-attachments",{"label":[1],"wcagLabel":[1,"wcag-label"],"validateWcag":[64]}],[4,"gov-form-message",{"color":[1],"size":[1],"identifier":[64]},null,{"color":["validateColor"]}]]],["p-5c88f415",[[4,"gov-form-input",{"value":[1537],"identifier":[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],"accessibleShowPasswordLabel":[1,"accessible-show-password-label"],"accessibleHidePasswordLabel":[1,"accessible-hide-password-label"],"focused":[32],"showPassword":[32],"inheritedAttributes":[32],"setFocus":[64],"setValue":[64],"clearValue":[64],"getRef":[64]},null,{"size":["validateSize","watchControlAttrs"],"disabled":["watchControlAttrs"],"invalid":["watchControlAttrs"],"success":["watchControlAttrs"]}],[0,"gov-skeleton",{"size":[1],"color":[1],"shape":[1],"width":[1],"height":[1],"animation":[1],"inheritedAttributes":[32]},null,{"size":["validateSize"],"shape":["validateShape"],"animation":["validateAnimation"]}]]]]'),e)}));
2
2
  //# sourceMappingURL=core.esm.js.map