@gov-design-system-ce/components 4.1.3-BETA-5 → 4.1.3-BETA-6

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 (64) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/gov-flex_3.cjs.entry.js +1 -34
  3. package/dist/cjs/gov-flex_3.cjs.entry.js.map +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/collection/components/gov-icon/gov-icon.js +1 -99
  6. package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
  7. package/dist/components/gov-accordion-item.js +1 -1
  8. package/dist/components/gov-attachments-item.js +1 -1
  9. package/dist/components/gov-breadcrumbs.js +1 -1
  10. package/dist/components/gov-button.js +1 -1
  11. package/dist/components/gov-card.js +1 -1
  12. package/dist/components/gov-chip.js +1 -1
  13. package/dist/components/gov-dialog.js +1 -1
  14. package/dist/components/gov-form-autocomplete.js +1 -1
  15. package/dist/components/gov-form-checkbox.js +1 -1
  16. package/dist/components/gov-form-file.js +1 -1
  17. package/dist/components/gov-form-input.js +1 -1
  18. package/dist/components/gov-form-multi-select.js +1 -1
  19. package/dist/components/gov-form-select.js +1 -1
  20. package/dist/components/gov-form-switch.js +1 -1
  21. package/dist/components/gov-icon.js +1 -1
  22. package/dist/components/gov-infobar.js +1 -1
  23. package/dist/components/gov-link.js +1 -1
  24. package/dist/components/gov-link.js.map +1 -1
  25. package/dist/components/gov-loading.js +1 -1
  26. package/dist/components/gov-pagination.js +1 -1
  27. package/dist/components/gov-tabs.js +1 -1
  28. package/dist/components/gov-tag.js +1 -1
  29. package/dist/components/gov-theme-switch.js +1 -1
  30. package/dist/components/gov-tile.js +1 -1
  31. package/dist/components/gov-toast.js +1 -1
  32. package/dist/components/gov-tooltip-content.js +1 -1
  33. package/dist/components/gov-wizard-item.js +1 -1
  34. package/dist/components/p-16e68a91.js +2 -0
  35. package/dist/components/p-16e68a91.js.map +1 -0
  36. package/dist/components/{p-b642e485.js → p-52fcba77.js} +2 -2
  37. package/dist/components/{p-61453dbf.js → p-6a473654.js} +2 -2
  38. package/dist/components/{p-c024f757.js → p-a63665c2.js} +2 -2
  39. package/dist/components/{p-7007bd16.js → p-ab3a34b0.js} +2 -2
  40. package/dist/components/{p-88b35bda.js → p-d7d988d7.js} +2 -2
  41. package/dist/components/{p-438d5e0f.js → p-ff5e9e32.js} +2 -2
  42. package/dist/core/core.esm.js +1 -1
  43. package/dist/core/core.esm.js.map +1 -1
  44. package/dist/core/p-ff03dcd3.entry.js +2 -0
  45. package/dist/core/p-ff03dcd3.entry.js.map +1 -0
  46. package/dist/esm/core.js +1 -1
  47. package/dist/esm/gov-flex_3.entry.js +1 -34
  48. package/dist/esm/gov-flex_3.entry.js.map +1 -1
  49. package/dist/esm/loader.js +1 -1
  50. package/dist/hydrate/index.js +3 -40
  51. package/dist/hydrate/index.mjs +3 -40
  52. package/dist/types/components/gov-icon/gov-icon.d.ts +0 -20
  53. package/dist/types/components.d.ts +0 -34
  54. package/package.json +1 -1
  55. package/dist/components/p-df29e931.js +0 -2
  56. package/dist/components/p-df29e931.js.map +0 -1
  57. package/dist/core/p-af2bc7cf.entry.js +0 -2
  58. package/dist/core/p-af2bc7cf.entry.js.map +0 -1
  59. /package/dist/components/{p-b642e485.js.map → p-52fcba77.js.map} +0 -0
  60. /package/dist/components/{p-61453dbf.js.map → p-6a473654.js.map} +0 -0
  61. /package/dist/components/{p-c024f757.js.map → p-a63665c2.js.map} +0 -0
  62. /package/dist/components/{p-7007bd16.js.map → p-ab3a34b0.js.map} +0 -0
  63. /package/dist/components/{p-88b35bda.js.map → p-d7d988d7.js.map} +0 -0
  64. /package/dist/components/{p-438d5e0f.js.map → p-ff5e9e32.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,c as i,h as e,d as h}from"./p-42200001.js";import{c as n}from"./p-cd6c2938.js";import{v as o}from"./p-d8135701.js";import{g as a,d as r,e as c}from"./p-9908b9f0.js";import{g as d,c as l,t as m}from"./p-ea7fdd2e.js";import{F as u}from"./p-1c1d0bbe.js";import{i as f,A as p,a as b}from"./p-33d5d1ed.js";import{d as v}from"./p-df29e931.js";const g=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govChange=i(this,"gov-change",7);this.hydrated=false;this.value=undefined;this.checked=false;this.required=false;this.disabled=false;this.indeterminate=false;this.name=undefined;this.size="m";this.identifier=undefined;this.noLabel=false;this.invalid=undefined;this.inheritedAttributes={};this.checkboxId=n("GovCheckbox");this.h=d(this.host);this.f=a(this.h)}validateSize(t){o(c,t,r.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("disabled",l(this.disabled));this.f.passAttrToControl("invalid",l(this.invalid));this.f.passAttrToControl("type","checkbox")}componentWillLoad(){this.passControlAttrs();this.inheritedAttributes=f(this.host)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(b)}async componentDidRender(){this.f.passAttrToLabel("identifier",this.identifier||this.checkboxId);this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs()}connectedCallback(){this.hydrated=true}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){const t=t=>{if(this.noLabel){return e("label",{class:r.label},t)}return t};return e(h,{class:r.root,hydrated:this.hydrated,checked:this.checked,size:this.size,invalid:m(this.invalid)},t(e(u,null,e("input",Object.assign({id:this.identifier||this.checkboxId,type:"checkbox",value:this.value,name:this.name,checked:this.checked,onClick:this.onClickHandler.bind(this),onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled,indeterminate:this.indeterminate,ref:t=>this.inputRef=t},this.inheritedAttributes,{"aria-checked":l(this.checked),"aria-required":m(this.required),"aria-invalid":m(this.invalid),"aria-disabled":m(this.disabled)})),e("span",null,e("slot",{name:"label"}),e("gov-icon",{class:r.check,name:"check-lg",type:"components"}),e("gov-icon",{class:r.indeterminate,name:"dash-lg",type:"components"})))))}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}onClickHandler(t){t.stopPropagation()}onChangeHandler(t){this.checked=t.target.checked;t.stopPropagation();this.govChange.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}async getRef(){return this.inputRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}},[4,"gov-form-checkbox",{value:[1],checked:[1540],required:[4],disabled:[516],indeterminate:[516],name:[1],size:[513],identifier:[1],noLabel:[4,"no-label"],invalid:[4],inheritedAttributes:[32],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}]);function k(){if(typeof customElements==="undefined"){return}const t=["gov-form-checkbox","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-checkbox":if(!customElements.get(t)){customElements.define(t,g)}break;case"gov-icon":if(!customElements.get(t)){v()}break}}))}k();const C=g;const A=k;export{C as GovFormCheckbox,A as defineCustomElement};
1
+ import{p as t,H as s,c as i,h as e,d as h}from"./p-42200001.js";import{c as n}from"./p-cd6c2938.js";import{v as a}from"./p-d8135701.js";import{g as o,d as r,e as c}from"./p-9908b9f0.js";import{g as d,c as l,t as m}from"./p-ea7fdd2e.js";import{F as u}from"./p-1c1d0bbe.js";import{i as f,A as p,a as b}from"./p-33d5d1ed.js";import{d as v}from"./p-16e68a91.js";const g=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govChange=i(this,"gov-change",7);this.hydrated=false;this.value=undefined;this.checked=false;this.required=false;this.disabled=false;this.indeterminate=false;this.name=undefined;this.size="m";this.identifier=undefined;this.noLabel=false;this.invalid=undefined;this.inheritedAttributes={};this.checkboxId=n("GovCheckbox");this.h=d(this.host);this.f=o(this.h)}validateSize(t){a(c,t,r.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("disabled",l(this.disabled));this.f.passAttrToControl("invalid",l(this.invalid));this.f.passAttrToControl("type","checkbox")}componentWillLoad(){this.passControlAttrs();this.inheritedAttributes=f(this.host)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(b)}async componentDidRender(){this.f.passAttrToLabel("identifier",this.identifier||this.checkboxId);this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs()}connectedCallback(){this.hydrated=true}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){const t=t=>{if(this.noLabel){return e("label",{class:r.label},t)}return t};return e(h,{class:r.root,hydrated:this.hydrated,checked:this.checked,size:this.size,invalid:m(this.invalid)},t(e(u,null,e("input",Object.assign({id:this.identifier||this.checkboxId,type:"checkbox",value:this.value,name:this.name,checked:this.checked,onClick:this.onClickHandler.bind(this),onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled,indeterminate:this.indeterminate,ref:t=>this.inputRef=t},this.inheritedAttributes,{"aria-checked":l(this.checked),"aria-required":m(this.required),"aria-invalid":m(this.invalid),"aria-disabled":m(this.disabled)})),e("span",null,e("slot",{name:"label"}),e("gov-icon",{class:r.check,name:"check-lg",type:"components"}),e("gov-icon",{class:r.indeterminate,name:"dash-lg",type:"components"})))))}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}onClickHandler(t){t.stopPropagation()}onChangeHandler(t){this.checked=t.target.checked;t.stopPropagation();this.govChange.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}async getRef(){return this.inputRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}},[4,"gov-form-checkbox",{value:[1],checked:[1540],required:[4],disabled:[516],indeterminate:[516],name:[1],size:[513],identifier:[1],noLabel:[4,"no-label"],invalid:[4],inheritedAttributes:[32],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}]);function k(){if(typeof customElements==="undefined"){return}const t=["gov-form-checkbox","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-checkbox":if(!customElements.get(t)){customElements.define(t,g)}break;case"gov-icon":if(!customElements.get(t)){v()}break}}))}k();const C=g;const A=k;export{C as GovFormCheckbox,A as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-checkbox.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,c as s,h as i,d as o}from"./p-42200001.js";import{c as a}from"./p-cd6c2938.js";import{g as n,c as r,t as h}from"./p-ea7fdd2e.js";import{g as l}from"./p-9908b9f0.js";import{A as c,a as f,i as d}from"./p-33d5d1ed.js";import{d as m}from"./p-56399a9b.js";import{d as u}from"./p-7007bd16.js";import{d as p}from"./p-61453dbf.js";import{d as g}from"./p-080d5d41.js";import{d as v}from"./p-df29e931.js";const b={root:"gov-form-file",area:"gov-form-file__area",input:"gov-form-file__input",attachments:"gov-form-file__attachments"};function y(t){const e=["bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let s=0,i=parseInt(t,10)||0;while(i>=1024&&++s){i=i/1024}return i.toFixed(i<10&&s>0?1:0)+" "+e[s]}function E(t,e){if(typeof e==="string"&&e.length){return e.replace(/\s/g,"").split(",").filter((e=>new RegExp(e.replace("*",".*")).test(t.type))).length>0}else{return true}}function A(t,e){const s=Math.round(t.size);return s<=e}const k=t(class t extends e{constructor(){super();this.__registerHost();this.govFocus=s(this,"gov-focus",7);this.govBlur=s(this,"gov-blur",7);this.govFiles=s(this,"gov-files",7);this.govAddFile=s(this,"gov-add-file",7);this.govRemoveFile=s(this,"gov-remove-file",7);this.eventsRegistered=false;this.expanded=false;this.required=false;this.disabled=false;this.resetAfterPick=false;this.ignoreFileDuplicationCheck=false;this.displayAttachments=true;this.name=undefined;this.accept=undefined;this.multiple=false;this.maxFileSize=-1;this.identifier=undefined;this.invalid=undefined;this.errorSize="Soubor je větší než povolená velikost {FILE_SIZE}";this.errorAccept="Soubor tohoto typu není povolen";this.accessibleRemoveLabel="Odebrat soubor {FILE_NAME}";this.accessibleAttachmentsLabel="Přílohy";this.files=[];this.inheritedAttributes={};this.fileId=a("GovInputFile");this.h=n(this.host);this.f=l(this.h)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("invalid",r(this.invalid));this.f.passAttrToControl("disabled",r(this.disabled));this.f.passAttrToControl("type","File")}registerListeners(){if(this.eventsRegistered){return}this.eventsRegistered=true;function t(){this.areaRef.classList.add("highlight")}function e(){this.areaRef.classList.remove("highlight")}this.inputRef.addEventListener("change",(t=>{t.preventDefault();t.stopPropagation();const e=t.target.files;if(this.resetAfterPick){if(e.length){this.validateFiles(e)}}else{this.validateFiles(e)}}),false);if(this.expanded){const s=["dragover","dragleave"];const i=["dragenter","dragover","mouseenter"];const o=["dragleave","mouseleave"];s.map((t=>this.inputRef.addEventListener(t,this.preventDefaults.bind(this),false)));i.map((e=>this.inputRef.addEventListener(e,t.bind(this),false)));o.forEach((t=>this.inputRef.addEventListener(t,e.bind(this),false)))}}preventDefaults(t){t.preventDefault();t.stopPropagation()}handleDrop(t){const e=t.dataTransfer;this.validateFiles(e.files)}validateFiles(t){let e=[];Array.from(t).map((t=>{const s=this.files.find((e=>e.file.name===t.name&&e.file.size===t.size))||null;if(s===null||this.ignoreFileDuplicationCheck){const s=typeof this.maxFileSize==="number"&&this.maxFileSize>0?A(t,this.maxFileSize):true;const i=E(t,this.accept);const o={id:a("GovFormFile"),file:t,acceptValid:i,sizeValid:s};if(this.displayAttachments){this.files=[...this.files,o]}else{e=[...e,o]}this.govAddFile.emit({component:b.root,file:o})}}));this.govFiles.emit({component:b.root,files:e.length?e:this.files});if(this.resetAfterPick){this.reset().finally()}}componentDidLoad(){this.attributeObserver=new c(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(f)}componentWillLoad(){this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs();this.inheritedAttributes=d(this.host)}async componentDidRender(){this.registerListeners()}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}render(){return i(o,{key:"92ee90aa5d8d28d310c0229ce513be88edafd68d",class:this.h.classes([b.root]),invalid:h(this.invalid),expanded:h(this.expanded)},i("div",{key:"ada51c64168a7cb4dcb4f123e7f74fe401b63c82",class:b.area,ref:t=>this.areaRef=t},i("slot",{key:"77a4e7096f1949c8c284b0d6607ffd96567669ef"}),i("input",Object.assign({key:"63382d1ccfc1254b9073923713677af25ed0fed3",class:b.input,ref:t=>this.inputRef=t,id:this.identifier||this.fileId,type:"file",name:this.name,accept:this.accept,multiple:this.multiple,onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled},this.inheritedAttributes,{"aria-required":h(this.required),"aria-invalid":h(this.invalid),"aria-disabled":h(this.disabled)}))),this.h.hasSlot("attachments")?i("div",{class:b.attachments},i("slot",{name:"attachments"})):null,this.files.length&&this.displayAttachments?i("div",{class:b.attachments},i("gov-attachments",{label:this.accessibleAttachmentsLabel,"accessible-label":this.accessibleAttachmentsLabel},this.files.map((t=>i("gov-attachments-item",{"accessible-remove-labelledby":t.id,"on-gov-remove":()=>this.onRemoveFileHandler(t)},i("span",{class:"sr-only",id:t.id},this.accessibleRemoveLabel.replace("{FILE_NAME}",t.file.name)),t.file.name,t.acceptValid===false?i("gov-form-message",{slot:"message",color:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill",type:"components"}),t.acceptValid===false?this.errorAccept:null):null,t.sizeValid===false?i("gov-form-message",{slot:"message",color:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill",type:"components"}),this.errorSize.replace("{FILE_SIZE}",y(this.maxFileSize))):null,i("span",{slot:"info"},"(",y(t.file.size),")")))))):null)}onRemoveFileHandler(t){const e=this.files.findIndex((e=>e.id===t.id));if(e!==-1){const t=this.files;const s=this.files[e];t.splice(e,1);this.files=[...t];this.govRemoveFile.emit({component:b.root,file:s});this.govFiles.emit({component:b.root,files:t})}}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:b.root,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:b.root,originalEvent:t})}onChangeHandler(t){t.stopPropagation()}async getRef(){return this.inputRef}async getAreaRef(){return this.areaRef}async reset(){this.files=[];this.inputRef.value=""}get host(){return this}static get watchers(){return{disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}},[4,"gov-form-file",{expanded:[4],required:[4],disabled:[516],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"],accessibleRemoveLabel:[1,"accessible-remove-label"],accessibleAttachmentsLabel:[1,"accessible-attachments-label"],files:[32],inheritedAttributes:[32],getRef:[64],getAreaRef:[64],reset:[64]},undefined,{disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}]);function j(){if(typeof customElements==="undefined"){return}const t=["gov-form-file","gov-attachments","gov-attachments-item","gov-button","gov-form-message","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-file":if(!customElements.get(t)){customElements.define(t,k)}break;case"gov-attachments":if(!customElements.get(t)){m()}break;case"gov-attachments-item":if(!customElements.get(t)){u()}break;case"gov-button":if(!customElements.get(t)){p()}break;case"gov-form-message":if(!customElements.get(t)){g()}break;case"gov-icon":if(!customElements.get(t)){v()}break}}))}j();const F=k;const C=j;export{F as GovFormFile,C as defineCustomElement};
1
+ import{p as t,H as e,c as s,h as i,d as o}from"./p-42200001.js";import{c as a}from"./p-cd6c2938.js";import{g as n,c as r,t as h}from"./p-ea7fdd2e.js";import{g as l}from"./p-9908b9f0.js";import{A as c,a as f,i as d}from"./p-33d5d1ed.js";import{d as m}from"./p-56399a9b.js";import{d as u}from"./p-ab3a34b0.js";import{d as p}from"./p-6a473654.js";import{d as g}from"./p-080d5d41.js";import{d as v}from"./p-16e68a91.js";const b={root:"gov-form-file",area:"gov-form-file__area",input:"gov-form-file__input",attachments:"gov-form-file__attachments"};function y(t){const e=["bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let s=0,i=parseInt(t,10)||0;while(i>=1024&&++s){i=i/1024}return i.toFixed(i<10&&s>0?1:0)+" "+e[s]}function E(t,e){if(typeof e==="string"&&e.length){return e.replace(/\s/g,"").split(",").filter((e=>new RegExp(e.replace("*",".*")).test(t.type))).length>0}else{return true}}function A(t,e){const s=Math.round(t.size);return s<=e}const k=t(class t extends e{constructor(){super();this.__registerHost();this.govFocus=s(this,"gov-focus",7);this.govBlur=s(this,"gov-blur",7);this.govFiles=s(this,"gov-files",7);this.govAddFile=s(this,"gov-add-file",7);this.govRemoveFile=s(this,"gov-remove-file",7);this.eventsRegistered=false;this.expanded=false;this.required=false;this.disabled=false;this.resetAfterPick=false;this.ignoreFileDuplicationCheck=false;this.displayAttachments=true;this.name=undefined;this.accept=undefined;this.multiple=false;this.maxFileSize=-1;this.identifier=undefined;this.invalid=undefined;this.errorSize="Soubor je větší než povolená velikost {FILE_SIZE}";this.errorAccept="Soubor tohoto typu není povolen";this.accessibleRemoveLabel="Odebrat soubor {FILE_NAME}";this.accessibleAttachmentsLabel="Přílohy";this.files=[];this.inheritedAttributes={};this.fileId=a("GovInputFile");this.h=n(this.host);this.f=l(this.h)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("invalid",r(this.invalid));this.f.passAttrToControl("disabled",r(this.disabled));this.f.passAttrToControl("type","File")}registerListeners(){if(this.eventsRegistered){return}this.eventsRegistered=true;function t(){this.areaRef.classList.add("highlight")}function e(){this.areaRef.classList.remove("highlight")}this.inputRef.addEventListener("change",(t=>{t.preventDefault();t.stopPropagation();const e=t.target.files;if(this.resetAfterPick){if(e.length){this.validateFiles(e)}}else{this.validateFiles(e)}}),false);if(this.expanded){const s=["dragover","dragleave"];const i=["dragenter","dragover","mouseenter"];const o=["dragleave","mouseleave"];s.map((t=>this.inputRef.addEventListener(t,this.preventDefaults.bind(this),false)));i.map((e=>this.inputRef.addEventListener(e,t.bind(this),false)));o.forEach((t=>this.inputRef.addEventListener(t,e.bind(this),false)))}}preventDefaults(t){t.preventDefault();t.stopPropagation()}handleDrop(t){const e=t.dataTransfer;this.validateFiles(e.files)}validateFiles(t){let e=[];Array.from(t).map((t=>{const s=this.files.find((e=>e.file.name===t.name&&e.file.size===t.size))||null;if(s===null||this.ignoreFileDuplicationCheck){const s=typeof this.maxFileSize==="number"&&this.maxFileSize>0?A(t,this.maxFileSize):true;const i=E(t,this.accept);const o={id:a("GovFormFile"),file:t,acceptValid:i,sizeValid:s};if(this.displayAttachments){this.files=[...this.files,o]}else{e=[...e,o]}this.govAddFile.emit({component:b.root,file:o})}}));this.govFiles.emit({component:b.root,files:e.length?e:this.files});if(this.resetAfterPick){this.reset().finally()}}componentDidLoad(){this.attributeObserver=new c(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(f)}componentWillLoad(){this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs();this.inheritedAttributes=d(this.host)}async componentDidRender(){this.registerListeners()}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}render(){return i(o,{key:"92ee90aa5d8d28d310c0229ce513be88edafd68d",class:this.h.classes([b.root]),invalid:h(this.invalid),expanded:h(this.expanded)},i("div",{key:"ada51c64168a7cb4dcb4f123e7f74fe401b63c82",class:b.area,ref:t=>this.areaRef=t},i("slot",{key:"77a4e7096f1949c8c284b0d6607ffd96567669ef"}),i("input",Object.assign({key:"63382d1ccfc1254b9073923713677af25ed0fed3",class:b.input,ref:t=>this.inputRef=t,id:this.identifier||this.fileId,type:"file",name:this.name,accept:this.accept,multiple:this.multiple,onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled},this.inheritedAttributes,{"aria-required":h(this.required),"aria-invalid":h(this.invalid),"aria-disabled":h(this.disabled)}))),this.h.hasSlot("attachments")?i("div",{class:b.attachments},i("slot",{name:"attachments"})):null,this.files.length&&this.displayAttachments?i("div",{class:b.attachments},i("gov-attachments",{label:this.accessibleAttachmentsLabel,"accessible-label":this.accessibleAttachmentsLabel},this.files.map((t=>i("gov-attachments-item",{"accessible-remove-labelledby":t.id,"on-gov-remove":()=>this.onRemoveFileHandler(t)},i("span",{class:"sr-only",id:t.id},this.accessibleRemoveLabel.replace("{FILE_NAME}",t.file.name)),t.file.name,t.acceptValid===false?i("gov-form-message",{slot:"message",color:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill",type:"components"}),t.acceptValid===false?this.errorAccept:null):null,t.sizeValid===false?i("gov-form-message",{slot:"message",color:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill",type:"components"}),this.errorSize.replace("{FILE_SIZE}",y(this.maxFileSize))):null,i("span",{slot:"info"},"(",y(t.file.size),")")))))):null)}onRemoveFileHandler(t){const e=this.files.findIndex((e=>e.id===t.id));if(e!==-1){const t=this.files;const s=this.files[e];t.splice(e,1);this.files=[...t];this.govRemoveFile.emit({component:b.root,file:s});this.govFiles.emit({component:b.root,files:t})}}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:b.root,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:b.root,originalEvent:t})}onChangeHandler(t){t.stopPropagation()}async getRef(){return this.inputRef}async getAreaRef(){return this.areaRef}async reset(){this.files=[];this.inputRef.value=""}get host(){return this}static get watchers(){return{disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}},[4,"gov-form-file",{expanded:[4],required:[4],disabled:[516],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"],accessibleRemoveLabel:[1,"accessible-remove-label"],accessibleAttachmentsLabel:[1,"accessible-attachments-label"],files:[32],inheritedAttributes:[32],getRef:[64],getAreaRef:[64],reset:[64]},undefined,{disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}]);function j(){if(typeof customElements==="undefined"){return}const t=["gov-form-file","gov-attachments","gov-attachments-item","gov-button","gov-form-message","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-file":if(!customElements.get(t)){customElements.define(t,k)}break;case"gov-attachments":if(!customElements.get(t)){m()}break;case"gov-attachments-item":if(!customElements.get(t)){u()}break;case"gov-button":if(!customElements.get(t)){p()}break;case"gov-form-message":if(!customElements.get(t)){g()}break;case"gov-icon":if(!customElements.get(t)){v()}break}}))}j();const F=k;const C=j;export{F as GovFormFile,C as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-file.js.map
@@ -1,2 +1,2 @@
1
- import{G as o,d as s}from"./p-c024f757.js";const t=o;const c=s;export{t as GovFormInput,c as defineCustomElement};
1
+ import{G as o,d as s}from"./p-a63665c2.js";const t=o;const a=s;export{t as GovFormInput,a as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-input.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,c as i,h as s,d as o}from"./p-42200001.js";import{g as n,h as a,i as h}from"./p-9908b9f0.js";import{g as l,c as r,t as c}from"./p-ea7fdd2e.js";import{v as d}from"./p-d8135701.js";import{c as u,r as f}from"./p-cd6c2938.js";import{p as m}from"./p-ded281e6.js";import{t as v}from"./p-26618322.js";import{A as p,a as g}from"./p-33d5d1ed.js";import{d as b}from"./p-61453dbf.js";import{d as y}from"./p-438d5e0f.js";import{d as k}from"./p-c024f757.js";import{d as j}from"./p-df29e931.js";import{d as w}from"./p-495b793e.js";const O=t(class t extends e{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govChange=i(this,"gov-change",7);this.govSelect=i(this,"gov-select",7);this.govRemove=i(this,"gov-remove",7);this.value=undefined;this.options=undefined;this.identifier=undefined;this.placeholder=undefined;this.size="m";this.name=undefined;this.hideSelectedList=false;this.required=false;this.disabled=false;this.invalid=undefined;this.success=undefined;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.messageLoading="Načítám...";this.focused=undefined;this.valueState=undefined;this.selectedOptionsState=[];this.optionsState=[];this.inheritedAttributes={};this.selectId=u("GovSelect");this.listId=u("GovMultiList");this.h=l(this.host);this.f=n(this.h)}validateSize(t){d(h,t,a.root)}watchOptions(t){this.optionsState=m(t)}watchValue(t){this.selectedOptionsState=m(t)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(g);this.initAutocomplete()}componentWillLoad(){this.validateSize(this.size);this.optionsState=m(this.options);this.selectedOptionsState=m(this.value)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}getAvailableOptions(t=false){if(Array.isArray(this.optionsState)&&this.optionsState.length){if(t){return this.optionsState}return this.optionsState.filter((t=>{const e=this.selectedValueIndex(t.value);return e!==-1||(t===null||t===void 0?void 0:t.disabled)?false:true})).map((t=>{var e;return{name:(e=t.label)!==null&&e!==void 0?e:t.value,value:t.value}}))}return Array.from(this.selectRef.querySelectorAll("option")).filter((e=>{if(t){return true}const i=this.selectedValueIndex(e.value);return!(e.disabled||e.selected||i>-1)})).map((t=>({name:t.textContent,value:t.value})))}initAutocomplete(){var t,e,i,s,o;(t=this.autocompleteRef)===null||t===void 0?void 0:t.addEventListener("gov-select",this.onSelectHandler.bind(this));(e=this.autocompleteRef)===null||e===void 0?void 0:e.addEventListener("gov-input",this.onInputHandler.bind(this));(i=this.autocompleteRef)===null||i===void 0?void 0:i.addEventListener("gov-focus",this.onFocusHandler.bind(this));(s=this.autocompleteRef)===null||s===void 0?void 0:s.addEventListener("gov-blur",this.onBlurHandler.bind(this));(o=this.autocompleteRef)===null||o===void 0?void 0:o.setSearchCallback((t=>new Promise((e=>{const i=this.getAvailableOptions();if(String(t).length===0){return e(i)}e(i.filter((({label:e,value:i})=>{if(!e)e=i;return f(e).toLowerCase().indexOf(f(t).toLowerCase())>-1})))})))).finally()}selectedValueIndex(t){return this.selectedOptionsState.findIndex((e=>e===t))}getOptionElement(t){return this.selectRef.querySelector('option[value="'+t+'"]')}getOption(t){var e;return(e=this.getAvailableOptions(true).find((e=>e.value===t)))!==null&&e!==void 0?e:null}selectOption(t,e=true){const i=this.selectedValueIndex(t);if(i===-1){this.selectedOptionsState=[...this.selectedOptionsState,t];this.value=this.selectedOptionsState;if(e){this.govChange.emit({component:a.root,value:this.selectedOptionsState});this.govSelect.emit({component:a.root,value:this.selectedOptionsState})}const i=this.getOptionElement(t);if(i){i.selected=true}}}removeOption(t,e=true){const i=this.selectedValueIndex(t);if(i!==-1){this.selectedOptionsState.splice(i,1);this.selectedOptionsState=[...this.selectedOptionsState];this.value=this.selectedOptionsState;if(e){this.govChange.emit({component:a.root,value:this.selectedOptionsState});this.govRemove.emit({component:a.root,value:this.selectedOptionsState})}const s=this.getOptionElement(t);if(s){s.selected=false}}}async componentDidRender(){this.f.passAttrToLabel("required",String(this.required));v((()=>{this.selectRef.querySelectorAll("option").forEach((t=>{if(t.selected){this.selectOption(t.value,false)}}))}))}render(){return s(o,{key:"e112f9d20d170e70616fd4f089b93dd040e737fa",class:a.root,size:this.size},s("div",{key:"ffc5af48051e7d24559e0c77a595b48e287771f5",class:a.wrap},this.h.hasSlot("prefix")&&s("slot",{key:"3c22442cfbcb010f240a014ba7c9c48ec4522555",name:"prefix"}),s("gov-form-autocomplete",{key:"c02857a7ea06c203aa94b317837ea2c7c921b505",value:this.valueState,disabled:this.disabled,identifier:this.identifier||this.selectId,required:false,invalid:this.invalid,success:this.success,size:this.size,placeholder:this.placeholder,"message-empty":this.messageEmpty,"message-loading":this.messageLoading,ref:t=>this.autocompleteRef=t,minlength:0,"aria-owns":this.listId},this.success&&s("gov-icon",{key:"2b06057b6343fce21d08731f5a6675ffccfa3f6e",slot:"validation-icon",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&s("gov-icon",{key:"6f33cb3764c0df058b0743ba617c950cf7909cdc",slot:"validation-icon",class:"validation-icon",name:"exclamation-lg",type:"components"}),s("gov-icon",{key:"05be66ee199dee177d0b18a7a6a59e25a724571f",slot:"icon-end",class:"arrow-icon",name:"chevron-down",type:"components"})),s("select",Object.assign({key:"d50fe47c2c859561b8aba62e6d6dedd7bceed6ae",hidden:true,class:"hidden-select-list","aria-hidden":r(true),multiple:true,required:this.required,name:this.name,disabled:this.disabled,ref:t=>this.selectRef=t},this.inheritedAttributes,{"aria-disabled":c(this.disabled),"aria-required":c(this.required),"aria-invalid":c(this.invalid)}),s("slot",{key:"cf2ebfd8dc2cdf49c3581ba0ba3fff959a50a221"}),Array.isArray(this.optionsState)&&this.optionsState.map((t=>{var e;const i=this.selectedValueIndex(t.value);return s("option",{value:t.value,selected:i>-1,disabled:t===null||t===void 0?void 0:t.disabled},(e=t.label)!==null&&e!==void 0?e:t.value)}))),this.h.hasSlot("sufix")&&s("slot",{key:"dddc8a99daeb345be9d778ade22622ae9ed35769",name:"sufix"})),this.hideSelectedList===false?s("ul",{role:"listbox",id:this.listId,class:a.list},Array.isArray(this.selectedOptionsState)&&this.selectedOptionsState.map((t=>{var e,i;const o=this.getOption(t);if(!o)return null;return s("li",{class:a.item,role:"option"},(e=o.label)!==null&&e!==void 0?e:o.value,s("gov-button",{"aria-label":(i="Odebrat vybranou položku "+o.label)!==null&&i!==void 0?i:o.value,color:"primary",type:"base",size:this.size,"on-gov-click":()=>this.onTagRemove(t)},s("gov-icon",{name:"x-lg",type:"components"})))}))):null)}onFocusHandler(t){t.stopPropagation();this.focused=true;this.govFocus.emit({component:a.root,originalEvent:t,value:this.selectedOptionsState})}onBlurHandler(t){t.stopPropagation();t.stopPropagation();this.focused=false;this.govBlur.emit({component:a.root,originalEvent:t,value:this.selectedOptionsState})}onInputHandler(t){this.valueState=t.detail.value;t.stopPropagation()}onSelectHandler(t){t.stopPropagation();const e=t.detail.selected;this.selectOption(e.value);this.valueState="";this.autocompleteRef.clearValue().finally();this.autocompleteRef.focus()}onTagRemove(t){this.removeOption(t)}async setFocus(t){return this.selectRef.focus(t)}async setValue(t){this.valueState=t}async getRef(){return this.selectRef}get host(){return this}static get watchers(){return{size:["validateSize"],options:["watchOptions"],value:["watchValue"]}}},[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:[516],invalid:[516],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]},undefined,{size:["validateSize"],options:["watchOptions"],value:["watchValue"]}]);function E(){if(typeof customElements==="undefined"){return}const t=["gov-form-multi-select","gov-button","gov-form-autocomplete","gov-form-input","gov-icon","gov-skeleton"];t.forEach((t=>{switch(t){case"gov-form-multi-select":if(!customElements.get(t)){customElements.define(t,O)}break;case"gov-button":if(!customElements.get(t)){b()}break;case"gov-form-autocomplete":if(!customElements.get(t)){y()}break;case"gov-form-input":if(!customElements.get(t)){k()}break;case"gov-icon":if(!customElements.get(t)){j()}break;case"gov-skeleton":if(!customElements.get(t)){w()}break}}))}E();const S=O;const x=E;export{S as GovFormMultiSelect,x as defineCustomElement};
1
+ import{p as t,H as e,c as i,h as s,d as o}from"./p-42200001.js";import{g as n,h as a,i as h}from"./p-9908b9f0.js";import{g as l,c as r,t as c}from"./p-ea7fdd2e.js";import{v as d}from"./p-d8135701.js";import{c as u,r as f}from"./p-cd6c2938.js";import{p as m}from"./p-ded281e6.js";import{t as v}from"./p-26618322.js";import{A as p,a as g}from"./p-33d5d1ed.js";import{d as b}from"./p-6a473654.js";import{d as y}from"./p-ff5e9e32.js";import{d as k}from"./p-a63665c2.js";import{d as j}from"./p-16e68a91.js";import{d as w}from"./p-495b793e.js";const O=t(class t extends e{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govChange=i(this,"gov-change",7);this.govSelect=i(this,"gov-select",7);this.govRemove=i(this,"gov-remove",7);this.value=undefined;this.options=undefined;this.identifier=undefined;this.placeholder=undefined;this.size="m";this.name=undefined;this.hideSelectedList=false;this.required=false;this.disabled=false;this.invalid=undefined;this.success=undefined;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.messageLoading="Načítám...";this.focused=undefined;this.valueState=undefined;this.selectedOptionsState=[];this.optionsState=[];this.inheritedAttributes={};this.selectId=u("GovSelect");this.listId=u("GovMultiList");this.h=l(this.host);this.f=n(this.h)}validateSize(t){d(h,t,a.root)}watchOptions(t){this.optionsState=m(t)}watchValue(t){this.selectedOptionsState=m(t)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(g);this.initAutocomplete()}componentWillLoad(){this.validateSize(this.size);this.optionsState=m(this.options);this.selectedOptionsState=m(this.value)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}getAvailableOptions(t=false){if(Array.isArray(this.optionsState)&&this.optionsState.length){if(t){return this.optionsState}return this.optionsState.filter((t=>{const e=this.selectedValueIndex(t.value);return e!==-1||(t===null||t===void 0?void 0:t.disabled)?false:true})).map((t=>{var e;return{name:(e=t.label)!==null&&e!==void 0?e:t.value,value:t.value}}))}return Array.from(this.selectRef.querySelectorAll("option")).filter((e=>{if(t){return true}const i=this.selectedValueIndex(e.value);return!(e.disabled||e.selected||i>-1)})).map((t=>({name:t.textContent,value:t.value})))}initAutocomplete(){var t,e,i,s,o;(t=this.autocompleteRef)===null||t===void 0?void 0:t.addEventListener("gov-select",this.onSelectHandler.bind(this));(e=this.autocompleteRef)===null||e===void 0?void 0:e.addEventListener("gov-input",this.onInputHandler.bind(this));(i=this.autocompleteRef)===null||i===void 0?void 0:i.addEventListener("gov-focus",this.onFocusHandler.bind(this));(s=this.autocompleteRef)===null||s===void 0?void 0:s.addEventListener("gov-blur",this.onBlurHandler.bind(this));(o=this.autocompleteRef)===null||o===void 0?void 0:o.setSearchCallback((t=>new Promise((e=>{const i=this.getAvailableOptions();if(String(t).length===0){return e(i)}e(i.filter((({label:e,value:i})=>{if(!e)e=i;return f(e).toLowerCase().indexOf(f(t).toLowerCase())>-1})))})))).finally()}selectedValueIndex(t){return this.selectedOptionsState.findIndex((e=>e===t))}getOptionElement(t){return this.selectRef.querySelector('option[value="'+t+'"]')}getOption(t){var e;return(e=this.getAvailableOptions(true).find((e=>e.value===t)))!==null&&e!==void 0?e:null}selectOption(t,e=true){const i=this.selectedValueIndex(t);if(i===-1){this.selectedOptionsState=[...this.selectedOptionsState,t];this.value=this.selectedOptionsState;if(e){this.govChange.emit({component:a.root,value:this.selectedOptionsState});this.govSelect.emit({component:a.root,value:this.selectedOptionsState})}const i=this.getOptionElement(t);if(i){i.selected=true}}}removeOption(t,e=true){const i=this.selectedValueIndex(t);if(i!==-1){this.selectedOptionsState.splice(i,1);this.selectedOptionsState=[...this.selectedOptionsState];this.value=this.selectedOptionsState;if(e){this.govChange.emit({component:a.root,value:this.selectedOptionsState});this.govRemove.emit({component:a.root,value:this.selectedOptionsState})}const s=this.getOptionElement(t);if(s){s.selected=false}}}async componentDidRender(){this.f.passAttrToLabel("required",String(this.required));v((()=>{this.selectRef.querySelectorAll("option").forEach((t=>{if(t.selected){this.selectOption(t.value,false)}}))}))}render(){return s(o,{key:"e112f9d20d170e70616fd4f089b93dd040e737fa",class:a.root,size:this.size},s("div",{key:"ffc5af48051e7d24559e0c77a595b48e287771f5",class:a.wrap},this.h.hasSlot("prefix")&&s("slot",{key:"3c22442cfbcb010f240a014ba7c9c48ec4522555",name:"prefix"}),s("gov-form-autocomplete",{key:"c02857a7ea06c203aa94b317837ea2c7c921b505",value:this.valueState,disabled:this.disabled,identifier:this.identifier||this.selectId,required:false,invalid:this.invalid,success:this.success,size:this.size,placeholder:this.placeholder,"message-empty":this.messageEmpty,"message-loading":this.messageLoading,ref:t=>this.autocompleteRef=t,minlength:0,"aria-owns":this.listId},this.success&&s("gov-icon",{key:"2b06057b6343fce21d08731f5a6675ffccfa3f6e",slot:"validation-icon",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&s("gov-icon",{key:"6f33cb3764c0df058b0743ba617c950cf7909cdc",slot:"validation-icon",class:"validation-icon",name:"exclamation-lg",type:"components"}),s("gov-icon",{key:"05be66ee199dee177d0b18a7a6a59e25a724571f",slot:"icon-end",class:"arrow-icon",name:"chevron-down",type:"components"})),s("select",Object.assign({key:"d50fe47c2c859561b8aba62e6d6dedd7bceed6ae",hidden:true,class:"hidden-select-list","aria-hidden":r(true),multiple:true,required:this.required,name:this.name,disabled:this.disabled,ref:t=>this.selectRef=t},this.inheritedAttributes,{"aria-disabled":c(this.disabled),"aria-required":c(this.required),"aria-invalid":c(this.invalid)}),s("slot",{key:"cf2ebfd8dc2cdf49c3581ba0ba3fff959a50a221"}),Array.isArray(this.optionsState)&&this.optionsState.map((t=>{var e;const i=this.selectedValueIndex(t.value);return s("option",{value:t.value,selected:i>-1,disabled:t===null||t===void 0?void 0:t.disabled},(e=t.label)!==null&&e!==void 0?e:t.value)}))),this.h.hasSlot("sufix")&&s("slot",{key:"dddc8a99daeb345be9d778ade22622ae9ed35769",name:"sufix"})),this.hideSelectedList===false?s("ul",{role:"listbox",id:this.listId,class:a.list},Array.isArray(this.selectedOptionsState)&&this.selectedOptionsState.map((t=>{var e,i;const o=this.getOption(t);if(!o)return null;return s("li",{class:a.item,role:"option"},(e=o.label)!==null&&e!==void 0?e:o.value,s("gov-button",{"aria-label":(i="Odebrat vybranou položku "+o.label)!==null&&i!==void 0?i:o.value,color:"primary",type:"base",size:this.size,"on-gov-click":()=>this.onTagRemove(t)},s("gov-icon",{name:"x-lg",type:"components"})))}))):null)}onFocusHandler(t){t.stopPropagation();this.focused=true;this.govFocus.emit({component:a.root,originalEvent:t,value:this.selectedOptionsState})}onBlurHandler(t){t.stopPropagation();t.stopPropagation();this.focused=false;this.govBlur.emit({component:a.root,originalEvent:t,value:this.selectedOptionsState})}onInputHandler(t){this.valueState=t.detail.value;t.stopPropagation()}onSelectHandler(t){t.stopPropagation();const e=t.detail.selected;this.selectOption(e.value);this.valueState="";this.autocompleteRef.clearValue().finally();this.autocompleteRef.focus()}onTagRemove(t){this.removeOption(t)}async setFocus(t){return this.selectRef.focus(t)}async setValue(t){this.valueState=t}async getRef(){return this.selectRef}get host(){return this}static get watchers(){return{size:["validateSize"],options:["watchOptions"],value:["watchValue"]}}},[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:[516],invalid:[516],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]},undefined,{size:["validateSize"],options:["watchOptions"],value:["watchValue"]}]);function E(){if(typeof customElements==="undefined"){return}const t=["gov-form-multi-select","gov-button","gov-form-autocomplete","gov-form-input","gov-icon","gov-skeleton"];t.forEach((t=>{switch(t){case"gov-form-multi-select":if(!customElements.get(t)){customElements.define(t,O)}break;case"gov-button":if(!customElements.get(t)){b()}break;case"gov-form-autocomplete":if(!customElements.get(t)){y()}break;case"gov-form-input":if(!customElements.get(t)){k()}break;case"gov-icon":if(!customElements.get(t)){j()}break;case"gov-skeleton":if(!customElements.get(t)){w()}break}}))}E();const S=O;const x=E;export{S as GovFormMultiSelect,x as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-multi-select.js.map
@@ -1,2 +1,2 @@
1
- import{G as o,d as s}from"./p-88b35bda.js";const t=o;const a=s;export{t as GovFormSelect,a as defineCustomElement};
1
+ import{G as o,d as s}from"./p-d7d988d7.js";const d=o;const t=s;export{d as GovFormSelect,t as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-select.js.map
@@ -1,2 +1,2 @@
1
- import{p as i,H as s,c as t,h as e,d as h}from"./p-42200001.js";import{c as a}from"./p-cd6c2938.js";import{v as n}from"./p-d8135701.js";import{g as o,n as c,o as d}from"./p-9908b9f0.js";import{g as r,c as l,t as u}from"./p-ea7fdd2e.js";import{F as m}from"./p-1c1d0bbe.js";import{A as f,a as p,i as b}from"./p-33d5d1ed.js";import{d as v}from"./p-df29e931.js";const g=i(class i extends s{constructor(){super();this.__registerHost();this.govFocus=t(this,"gov-focus",7);this.govBlur=t(this,"gov-blur",7);this.govChange=t(this,"gov-change",7);this.hydrated=false;this.value=undefined;this.noLabel=false;this.checked=false;this.required=false;this.disabled=false;this.name=undefined;this.size="m";this.identifier=undefined;this.invalid=undefined;this.inheritedAttributes={};this.checkboxId=a("GovCheckbox");this.h=r(this.host);this.f=o(this.h)}validateSize(i){n(d,i,c.root)}watchDisabled(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",l(this.invalid));this.f.passAttrToControl("disabled",l(this.disabled));this.f.passAttrToControl("type","switch")}componentDidLoad(){this.attributeObserver=new f(this.host,((i,s)=>{this.onAriaAttributeChange(i,s)}));this.attributeObserver.startObserving(p)}componentWillLoad(){this.passControlAttrs();this.inheritedAttributes=b(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}async componentDidRender(){this.f.passAttrToLabel("identifier",this.identifier||this.checkboxId);this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs()}connectedCallback(){this.hydrated=true}onAriaAttributeChange(i,s){this.host.removeAttribute(i);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[i]:s})}render(){const i=i=>{if(this.noLabel){return e("label",{class:c.label},i)}return i};return e(h,{class:this.h.classes(c.root),hydrated:this.hydrated,checked:this.checked,size:this.size,invalid:u(this.invalid)},i(e(m,null,e("input",Object.assign({class:c.input,id:this.identifier||this.checkboxId,type:"checkbox",value:this.value,name:this.name,disabled:this.disabled,checked:this.checked,onClick:this.onClickHandler.bind(this),onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),ref:i=>this.inputRef=i,required:this.required},this.inheritedAttributes,{"aria-checked":this.checked,"aria-required":u(this.required),"aria-invalid":u(this.invalid),"aria-disabled":u(this.disabled)})),e("span",null,e("span",{class:c.indicator},this.checked&&e("gov-icon",{name:"check-lg",type:"components"})),e("slot",{name:"label"})))))}onClickHandler(i){i.stopPropagation()}onFocusHandler(i){i.stopPropagation();this.govFocus.emit({component:c.root,checked:this.checked,value:this.value,originalEvent:i})}onBlurHandler(i){i.stopPropagation();this.govBlur.emit({component:c.root,checked:this.checked,value:this.value,originalEvent:i})}onChangeHandler(i){this.checked=i.target.checked;i.stopPropagation();this.govChange.emit({component:c.root,checked:this.checked,value:this.value,originalEvent:i})}async getRef(){return this.inputRef}get host(){return this}static get watchers(){return{size:["validateSize","watchDisabled"],disabled:["watchDisabled"],invalid:["watchDisabled"]}}},[4,"gov-form-switch",{value:[1],noLabel:[4,"no-label"],checked:[1540],required:[4],disabled:[516],name:[1],size:[513],identifier:[1],invalid:[4],inheritedAttributes:[32],getRef:[64]},undefined,{size:["validateSize","watchDisabled"],disabled:["watchDisabled"],invalid:["watchDisabled"]}]);function k(){if(typeof customElements==="undefined"){return}const i=["gov-form-switch","gov-icon"];i.forEach((i=>{switch(i){case"gov-form-switch":if(!customElements.get(i)){customElements.define(i,g)}break;case"gov-icon":if(!customElements.get(i)){v()}break}}))}k();const w=g;const j=k;export{w as GovFormSwitch,j as defineCustomElement};
1
+ import{p as i,H as s,c as t,h as e,d as h}from"./p-42200001.js";import{c as a}from"./p-cd6c2938.js";import{v as n}from"./p-d8135701.js";import{g as o,n as c,o as d}from"./p-9908b9f0.js";import{g as r,c as l,t as u}from"./p-ea7fdd2e.js";import{F as m}from"./p-1c1d0bbe.js";import{A as f,a as p,i as b}from"./p-33d5d1ed.js";import{d as v}from"./p-16e68a91.js";const g=i(class i extends s{constructor(){super();this.__registerHost();this.govFocus=t(this,"gov-focus",7);this.govBlur=t(this,"gov-blur",7);this.govChange=t(this,"gov-change",7);this.hydrated=false;this.value=undefined;this.noLabel=false;this.checked=false;this.required=false;this.disabled=false;this.name=undefined;this.size="m";this.identifier=undefined;this.invalid=undefined;this.inheritedAttributes={};this.checkboxId=a("GovCheckbox");this.h=r(this.host);this.f=o(this.h)}validateSize(i){n(d,i,c.root)}watchDisabled(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",l(this.invalid));this.f.passAttrToControl("disabled",l(this.disabled));this.f.passAttrToControl("type","switch")}componentDidLoad(){this.attributeObserver=new f(this.host,((i,s)=>{this.onAriaAttributeChange(i,s)}));this.attributeObserver.startObserving(p)}componentWillLoad(){this.passControlAttrs();this.inheritedAttributes=b(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}async componentDidRender(){this.f.passAttrToLabel("identifier",this.identifier||this.checkboxId);this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs()}connectedCallback(){this.hydrated=true}onAriaAttributeChange(i,s){this.host.removeAttribute(i);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[i]:s})}render(){const i=i=>{if(this.noLabel){return e("label",{class:c.label},i)}return i};return e(h,{class:this.h.classes(c.root),hydrated:this.hydrated,checked:this.checked,size:this.size,invalid:u(this.invalid)},i(e(m,null,e("input",Object.assign({class:c.input,id:this.identifier||this.checkboxId,type:"checkbox",value:this.value,name:this.name,disabled:this.disabled,checked:this.checked,onClick:this.onClickHandler.bind(this),onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),ref:i=>this.inputRef=i,required:this.required},this.inheritedAttributes,{"aria-checked":this.checked,"aria-required":u(this.required),"aria-invalid":u(this.invalid),"aria-disabled":u(this.disabled)})),e("span",null,e("span",{class:c.indicator},this.checked&&e("gov-icon",{name:"check-lg",type:"components"})),e("slot",{name:"label"})))))}onClickHandler(i){i.stopPropagation()}onFocusHandler(i){i.stopPropagation();this.govFocus.emit({component:c.root,checked:this.checked,value:this.value,originalEvent:i})}onBlurHandler(i){i.stopPropagation();this.govBlur.emit({component:c.root,checked:this.checked,value:this.value,originalEvent:i})}onChangeHandler(i){this.checked=i.target.checked;i.stopPropagation();this.govChange.emit({component:c.root,checked:this.checked,value:this.value,originalEvent:i})}async getRef(){return this.inputRef}get host(){return this}static get watchers(){return{size:["validateSize","watchDisabled"],disabled:["watchDisabled"],invalid:["watchDisabled"]}}},[4,"gov-form-switch",{value:[1],noLabel:[4,"no-label"],checked:[1540],required:[4],disabled:[516],name:[1],size:[513],identifier:[1],invalid:[4],inheritedAttributes:[32],getRef:[64]},undefined,{size:["validateSize","watchDisabled"],disabled:["watchDisabled"],invalid:["watchDisabled"]}]);function k(){if(typeof customElements==="undefined"){return}const i=["gov-form-switch","gov-icon"];i.forEach((i=>{switch(i){case"gov-form-switch":if(!customElements.get(i)){customElements.define(i,g)}break;case"gov-icon":if(!customElements.get(i)){v()}break}}))}k();const w=g;const j=k;export{w as GovFormSwitch,j as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-switch.js.map
@@ -1,2 +1,2 @@
1
- import{G as o,d as s}from"./p-df29e931.js";const t=o;const p=s;export{t as GovIcon,p as defineCustomElement};
1
+ import{G as o,d as s}from"./p-16e68a91.js";const t=o;const a=s;export{t as GovIcon,a as defineCustomElement};
2
2
  //# sourceMappingURL=gov-icon.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,c as s,h as o,d as i}from"./p-42200001.js";import{g as a,c as n}from"./p-ea7fdd2e.js";import{F as c}from"./p-1c1d0bbe.js";import{v as l}from"./p-d8135701.js";import{C as r}from"./p-5aad3497.js";import{p as h}from"./p-e0e2e9c1.js";import{A as b,a as d,i as f}from"./p-33d5d1ed.js";import{d as m}from"./p-61453dbf.js";import{d as p}from"./p-df29e931.js";const g=h(r,["PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);var v;(function(e){e["BOLD"]="bold";e["SUBTLE"]="subtle"})(v||(v={}));const u={root:"gov-infobar",section:"gov-infobar__section",content:"gov-infobar__content",headline:"gov-infobar__headline",close:"gov-infobar__close"};const y=e(class e extends t{constructor(){super();this.__registerHost();this.govClose=s(this,"gov-close",7);this.color="primary";this.type="bold";this.role=undefined;this.accessibleCloseLabel="Zavřít informační lištu";this.accessibleToggleLabel="Zobrazit více informací";this.closable=false;this.toggleContent=false;this.inheritedAttributes={};this.h=a(this.host)}validateColor(e){l(g,e,u.root)}componentDidLoad(){this.attributeObserver=new b(this.host,((e,t)=>{this.onAriaAttributeChange(e,t)}));this.attributeObserver.startObserving(d)}componentWillLoad(){this.validateColor(this.color);this.inheritedAttributes=f(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(e,t){this.host.removeAttribute(e);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[e]:t})}render(){const e=o("gov-button",{key:"03f7921b0eef199be48f021a23f431cfb116d001",size:"s","aria-label":this.accessibleCloseLabel,type:"base",color:this.isBold?this.color:"neutral","on-gov-click":this.onCloseHandler.bind(this),class:u.close},o("gov-icon",{key:"5b8385ff70a5ae33032451d56e1d1a2e4938656e",name:"x-lg",type:"components"}));return o(i,{key:"cb9dbd10b36253597b3190b5ec6558761cf32ffb",class:this.h.classes(u.root),color:this.color,type:this.type},o("section",Object.assign({key:"301e4d6b31069183e7a84015bebe0ca9ffc0c667",class:u.section},this.inheritedAttributes,{role:this.role}),o("slot",{key:"a0cb4376440cc034c501dcb41f0f8912e6331a0a",name:"icon"}),o("div",{key:"99f1c4dbf739de828c10277e83a3c94e9aaf68bd",class:u.content},this.h.hasSlot("headline")?o(c,null,o("div",{class:u.headline},o("slot",{name:"headline"}),o("gov-button",{size:"s",type:"base",color:this.isBold?this.color:"neutral","aria-label":this.accessibleToggleLabel,"on-gov-click":()=>this.toggleContent=!this.toggleContent},o("gov-icon",{name:this.toggleContent?"chevron-up":"chevron-down",type:"components"}))),o("div",{hidden:!this.toggleContent,"aria-hidden":n(this.toggleContent)},o("slot",null))):o("slot",null)),this.closable&&e))}onCloseHandler(e){this.govClose.emit({component:u.root,ref:this.host,originalEvent:e})}get isBold(){return this.type==="bold"}get host(){return this}static get watchers(){return{color:["validateColor"]}}},[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]},undefined,{color:["validateColor"]}]);function j(){if(typeof customElements==="undefined"){return}const e=["gov-infobar","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-infobar":if(!customElements.get(e)){customElements.define(e,y)}break;case"gov-button":if(!customElements.get(e)){m()}break;case"gov-icon":if(!customElements.get(e)){p()}break}}))}j();const k=y;const C=j;export{k as GovInfobar,C as defineCustomElement};
1
+ import{p as e,H as t,c as s,h as o,d as i}from"./p-42200001.js";import{g as a,c as n}from"./p-ea7fdd2e.js";import{F as c}from"./p-1c1d0bbe.js";import{v as l}from"./p-d8135701.js";import{C as r}from"./p-5aad3497.js";import{p as h}from"./p-e0e2e9c1.js";import{A as b,a as d,i as f}from"./p-33d5d1ed.js";import{d as m}from"./p-6a473654.js";import{d as p}from"./p-16e68a91.js";const g=h(r,["PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);var v;(function(e){e["BOLD"]="bold";e["SUBTLE"]="subtle"})(v||(v={}));const u={root:"gov-infobar",section:"gov-infobar__section",content:"gov-infobar__content",headline:"gov-infobar__headline",close:"gov-infobar__close"};const y=e(class e extends t{constructor(){super();this.__registerHost();this.govClose=s(this,"gov-close",7);this.color="primary";this.type="bold";this.role=undefined;this.accessibleCloseLabel="Zavřít informační lištu";this.accessibleToggleLabel="Zobrazit více informací";this.closable=false;this.toggleContent=false;this.inheritedAttributes={};this.h=a(this.host)}validateColor(e){l(g,e,u.root)}componentDidLoad(){this.attributeObserver=new b(this.host,((e,t)=>{this.onAriaAttributeChange(e,t)}));this.attributeObserver.startObserving(d)}componentWillLoad(){this.validateColor(this.color);this.inheritedAttributes=f(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(e,t){this.host.removeAttribute(e);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[e]:t})}render(){const e=o("gov-button",{key:"03f7921b0eef199be48f021a23f431cfb116d001",size:"s","aria-label":this.accessibleCloseLabel,type:"base",color:this.isBold?this.color:"neutral","on-gov-click":this.onCloseHandler.bind(this),class:u.close},o("gov-icon",{key:"5b8385ff70a5ae33032451d56e1d1a2e4938656e",name:"x-lg",type:"components"}));return o(i,{key:"cb9dbd10b36253597b3190b5ec6558761cf32ffb",class:this.h.classes(u.root),color:this.color,type:this.type},o("section",Object.assign({key:"301e4d6b31069183e7a84015bebe0ca9ffc0c667",class:u.section},this.inheritedAttributes,{role:this.role}),o("slot",{key:"a0cb4376440cc034c501dcb41f0f8912e6331a0a",name:"icon"}),o("div",{key:"99f1c4dbf739de828c10277e83a3c94e9aaf68bd",class:u.content},this.h.hasSlot("headline")?o(c,null,o("div",{class:u.headline},o("slot",{name:"headline"}),o("gov-button",{size:"s",type:"base",color:this.isBold?this.color:"neutral","aria-label":this.accessibleToggleLabel,"on-gov-click":()=>this.toggleContent=!this.toggleContent},o("gov-icon",{name:this.toggleContent?"chevron-up":"chevron-down",type:"components"}))),o("div",{hidden:!this.toggleContent,"aria-hidden":n(this.toggleContent)},o("slot",null))):o("slot",null)),this.closable&&e))}onCloseHandler(e){this.govClose.emit({component:u.root,ref:this.host,originalEvent:e})}get isBold(){return this.type==="bold"}get host(){return this}static get watchers(){return{color:["validateColor"]}}},[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]},undefined,{color:["validateColor"]}]);function j(){if(typeof customElements==="undefined"){return}const e=["gov-infobar","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-infobar":if(!customElements.get(e)){customElements.define(e,y)}break;case"gov-button":if(!customElements.get(e)){m()}break;case"gov-icon":if(!customElements.get(e)){p()}break}}))}j();const k=y;const C=j;export{k as GovInfobar,C as defineCustomElement};
2
2
  //# sourceMappingURL=gov-infobar.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,h as s,d as i}from"./p-42200001.js";import{p as o}from"./p-e0e2e9c1.js";import{S as a}from"./p-92f420cb.js";import{g as n}from"./p-ea7fdd2e.js";import{v as r}from"./p-d8135701.js";import{i as c}from"./p-33d5d1ed.js";import{d}from"./p-df29e931.js";const h=o(a,["_S","_M","_L"]);const f={root:"gov-link"};const m=e(class e extends t{constructor(){super();this.__registerHost();this.size="m";this.external=false;this.href=undefined;this.target=undefined;this.inheritedAttributes={};this.h=n(this.host)}validateSize(e){r(h,e,f.root)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=c(this.host)}onAriaAttributeChange(e,t){this.host.removeAttribute(e);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[e]:t})}render(){return s(i,{key:"3555b4e5b485f3928dba84bf929d3d22d0e5d4ae",class:this.h.classes(f.root),size:this.size,href:this.href,external:this.external},s("a",Object.assign({key:"4844af47b5a20f84b7ea81812eede0d0361208e8",class:"element",href:this.href,target:this.target},this.inheritedAttributes),s("slot",{key:"4a77215c37a5807be36a996ab250b52b4eaac64c",name:"icon-start"}),s("slot",{key:"1f10e44babae3c7cfb702ca61b8f9c5dc0cbe999"}),this.external?s("gov-icon",{name:"box-arrow-up-right",type:"components"}):s("slot",{name:"icon-end"})))}get host(){return this}static get watchers(){return{size:["validateSize"]}}},[4,"gov-link",{size:[1],external:[4],href:[1],target:[1],inheritedAttributes:[32]},undefined,{size:["validateSize"]}]);function b(){if(typeof customElements==="undefined"){return}const e=["gov-link","gov-icon"];e.forEach((e=>{switch(e){case"gov-link":if(!customElements.get(e)){customElements.define(e,m)}break;case"gov-icon":if(!customElements.get(e)){d()}break}}))}b();const l=m;const p=b;export{l as GovLink,p as defineCustomElement};
1
+ import{p as e,H as t,h as s,d as i}from"./p-42200001.js";import{p as o}from"./p-e0e2e9c1.js";import{S as a}from"./p-92f420cb.js";import{g as n}from"./p-ea7fdd2e.js";import{v as r}from"./p-d8135701.js";import{i as c}from"./p-33d5d1ed.js";import{d as h}from"./p-16e68a91.js";const d=o(a,["_S","_M","_L"]);const f={root:"gov-link"};const m=e(class e extends t{constructor(){super();this.__registerHost();this.size="m";this.external=false;this.href=undefined;this.target=undefined;this.inheritedAttributes={};this.h=n(this.host)}validateSize(e){r(d,e,f.root)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=c(this.host)}onAriaAttributeChange(e,t){this.host.removeAttribute(e);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[e]:t})}render(){return s(i,{key:"3555b4e5b485f3928dba84bf929d3d22d0e5d4ae",class:this.h.classes(f.root),size:this.size,href:this.href,external:this.external},s("a",Object.assign({key:"4844af47b5a20f84b7ea81812eede0d0361208e8",class:"element",href:this.href,target:this.target},this.inheritedAttributes),s("slot",{key:"4a77215c37a5807be36a996ab250b52b4eaac64c",name:"icon-start"}),s("slot",{key:"1f10e44babae3c7cfb702ca61b8f9c5dc0cbe999"}),this.external?s("gov-icon",{name:"box-arrow-up-right",type:"components"}):s("slot",{name:"icon-end"})))}get host(){return this}static get watchers(){return{size:["validateSize"]}}},[4,"gov-link",{size:[1],external:[4],href:[1],target:[1],inheritedAttributes:[32]},undefined,{size:["validateSize"]}]);function b(){if(typeof customElements==="undefined"){return}const e=["gov-link","gov-icon"];e.forEach((e=>{switch(e){case"gov-link":if(!customElements.get(e)){customElements.define(e,m)}break;case"gov-icon":if(!customElements.get(e)){h()}break}}))}b();const l=m;const p=b;export{l as GovLink,p as defineCustomElement};
2
2
  //# sourceMappingURL=gov-link.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["LinkSizes","pick","Sizes","LinkClass","root","GovLink","proxyCustomElement","H","constructor","this","h","govHost","host","validateSize","newValue","validateProp","componentWillLoad","size","inheritedAttributes","inheritAriaAttributes","onAriaAttributeChange","attributeName","removeAttribute","Object","assign","render","Host","key","class","classes","href","external","target","name","type"],"sources":["../../../packages/core/src/components/gov-link/constants.ts","../../../packages/core/src/components/gov-link/gov-link.tsx"],"sourcesContent":["import {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const LinkSizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type LinkSizesType = `${ValueOf<typeof LinkSizes>}`\n\nexport const LinkClass = {\n\troot: 'gov-link',\n}\n","import {Component, Element, Host, h, Prop, Watch, State} from '@stencil/core'\nimport {LinkClass, LinkSizes, LinkSizesType} from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {Attributes} from \"../../helpers/Dom/attribute\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-link',\n})\nexport class GovLink {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovLinkElement\n\t/**\n\t * Element size.\n\t */\n\t@Prop() readonly size?: LinkSizesType = 'm'\n\t/**\n\t * Element size.\n\t */\n\t@Prop() readonly external?: boolean = false\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target: string\n\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(LinkSizes, newValue, LinkClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host)\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\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(LinkClass.root)}\n\t\t\t\t size={this.size}\n\t\t\t\t href={this.href}\n\t\t\t\t external={this.external}>\n\t\t\t\t<a class=\"element\"\n\t\t\t\t href={this.href}\n\t\t\t\t target={this.target}\n\t\t\t\t {...this.inheritedAttributes}>\n\t\t\t\t\t<slot name=\"icon-start\"/>\n\t\t\t\t\t<slot/>\n\t\t\t\t\t{this.external ? <gov-icon name=\"box-arrow-up-right\" type=\"components\"></gov-icon> : <slot name=\"icon-end\"/>}\n\t\t\t\t</a>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"4QAIO,MAAMA,EAAYC,EAAKC,EAAO,CAAC,KAAM,KAAM,OAG3C,MAAMC,EAAY,CACxBC,KAAM,Y,MCGMC,EAAOC,EAAA,MAAAD,UAAAE,EAGnB,WAAAC,G,wCAQwC,I,cAIF,M,mEAkBK,GA7B1CC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAyBvB,YAAAC,CAAaC,GACZC,EAAaf,EAAWc,EAAUX,EAAUC,K,CAK7C,iBAAAY,GACCP,KAAKI,aAAaJ,KAAKQ,MACvBR,KAAKS,oBAAsBC,EAAsBV,KAAKG,K,CAGvD,qBAAAQ,CAAsBC,EAAuBP,GAC5CL,KAAKG,KAAKU,gBAAgBD,GAC1BZ,KAAKS,oBAAmBK,OAAAC,OAAAD,OAAAC,OAAA,GAAOf,KAAKS,qBAAmB,CAAEG,CAACA,GAAgBP,G,CAG3E,MAAAW,GACC,OACCf,EAACgB,EAAI,CAAAC,IAAA,2CAACC,MAAOnB,KAAKC,EAAEmB,QAAQ1B,EAAUC,MACnCa,KAAMR,KAAKQ,KACXa,KAAMrB,KAAKqB,KACXC,SAAUtB,KAAKsB,UACjBrB,EAAA,IAAAa,OAAAC,OAAA,CAAAG,IAAA,2CAAGC,MAAM,UACNE,KAAMrB,KAAKqB,KACXE,OAAQvB,KAAKuB,QACTvB,KAAKS,qBACXR,EAAA,QAAAiB,IAAA,2CAAMM,KAAK,eACXvB,EAAA,QAAAiB,IAAA,6CACClB,KAAKsB,SAAWrB,EAAA,YAAUuB,KAAK,qBAAqBC,KAAK,eAA2BxB,EAAA,QAAMuB,KAAK,c","ignoreList":[]}
1
+ {"version":3,"names":["LinkSizes","pick","Sizes","LinkClass","root","GovLink","proxyCustomElement","H","constructor","this","h","govHost","host","validateSize","newValue","validateProp","componentWillLoad","size","inheritedAttributes","inheritAriaAttributes","onAriaAttributeChange","attributeName","removeAttribute","Object","assign","render","Host","key","class","classes","href","external","target","name","type"],"sources":["../../../packages/core/src/components/gov-link/constants.ts","../../../packages/core/src/components/gov-link/gov-link.tsx"],"sourcesContent":["import {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const LinkSizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type LinkSizesType = `${ValueOf<typeof LinkSizes>}`\n\nexport const LinkClass = {\n\troot: 'gov-link',\n}\n","import {Component, Element, Host, h, Prop, Watch, State} from '@stencil/core'\nimport {LinkClass, LinkSizes, LinkSizesType} from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {Attributes} from \"../../helpers/Dom/attribute\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-link',\n})\nexport class GovLink {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovLinkElement\n\t/**\n\t * Element size.\n\t */\n\t@Prop() readonly size?: LinkSizesType = 'm'\n\t/**\n\t * Element size.\n\t */\n\t@Prop() readonly external?: boolean = false\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target: string\n\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(LinkSizes, newValue, LinkClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host)\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\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(LinkClass.root)}\n\t\t\t\t size={this.size}\n\t\t\t\t href={this.href}\n\t\t\t\t external={this.external}>\n\t\t\t\t<a class=\"element\"\n\t\t\t\t href={this.href}\n\t\t\t\t target={this.target}\n\t\t\t\t {...this.inheritedAttributes}>\n\t\t\t\t\t<slot name=\"icon-start\"/>\n\t\t\t\t\t<slot/>\n\t\t\t\t\t{this.external ? <gov-icon name=\"box-arrow-up-right\" type=\"components\"></gov-icon> : <slot name=\"icon-end\"/>}\n\t\t\t\t</a>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"iRAIO,MAAMA,EAAYC,EAAKC,EAAO,CAAC,KAAM,KAAM,OAG3C,MAAMC,EAAY,CACxBC,KAAM,Y,MCGMC,EAAOC,EAAA,MAAAD,UAAAE,EAGnB,WAAAC,G,wCAQwC,I,cAIF,M,mEAkBK,GA7B1CC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAyBvB,YAAAC,CAAaC,GACZC,EAAaf,EAAWc,EAAUX,EAAUC,K,CAK7C,iBAAAY,GACCP,KAAKI,aAAaJ,KAAKQ,MACvBR,KAAKS,oBAAsBC,EAAsBV,KAAKG,K,CAGvD,qBAAAQ,CAAsBC,EAAuBP,GAC5CL,KAAKG,KAAKU,gBAAgBD,GAC1BZ,KAAKS,oBAAmBK,OAAAC,OAAAD,OAAAC,OAAA,GAAOf,KAAKS,qBAAmB,CAAEG,CAACA,GAAgBP,G,CAG3E,MAAAW,GACC,OACCf,EAACgB,EAAI,CAAAC,IAAA,2CAACC,MAAOnB,KAAKC,EAAEmB,QAAQ1B,EAAUC,MACnCa,KAAMR,KAAKQ,KACXa,KAAMrB,KAAKqB,KACXC,SAAUtB,KAAKsB,UACjBrB,EAAA,IAAAa,OAAAC,OAAA,CAAAG,IAAA,2CAAGC,MAAM,UACNE,KAAMrB,KAAKqB,KACXE,OAAQvB,KAAKuB,QACTvB,KAAKS,qBACXR,EAAA,QAAAiB,IAAA,2CAAMM,KAAK,eACXvB,EAAA,QAAAiB,IAAA,6CACClB,KAAKsB,SAAWrB,EAAA,YAAUuB,KAAK,qBAAqBC,KAAK,eAA2BxB,EAAA,QAAMuB,KAAK,c","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as e,H as o,h as s,d as t}from"./p-42200001.js";import{p as a}from"./p-e0e2e9c1.js";import{S as c}from"./p-92f420cb.js";import{g as i,p as n}from"./p-ea7fdd2e.js";import{v as r}from"./p-d8135701.js";import{d}from"./p-de0a517f.js";import{d as f}from"./p-df29e931.js";const m=a(c,["_S","_M","_L"]);const p={root:"gov-loading",content:"gov-loading__content",icon:"gov-loading__icon"};const b=e(class e extends o{constructor(){super();this.__registerHost();this.size="m";this.h=i(this.host)}validateSize(e){r(m,e,p.root)}componentWillLoad(){this.validateSize(this.size)}render(){return s(t,{key:"c898509b3ef6060aaf7fe430738f8b40ae37810f",class:this.h.classes(p.root),size:this.size},s("div",{key:"2dcb83c719ba81284fe78c1c30a12c4630571712",class:p.content},s("gov-icon",{key:"9e499b414ceb2b601b5f7f093f403e4317fbebec",class:n([p.icon,"gov-spin-animation"]),name:"loader",type:"components"}),s("slot",{key:"638d2b827845d5ca7b6ac9dc4ebb27e790dc710e"})),s("gov-backdrop",{key:"1124baa1e77cf732888acdd3938d5b3661514b6d",inverse:true}))}get host(){return this}static get watchers(){return{size:["validateSize"]}}},[4,"gov-loading",{size:[1]},undefined,{size:["validateSize"]}]);function g(){if(typeof customElements==="undefined"){return}const e=["gov-loading","gov-backdrop","gov-icon"];e.forEach((e=>{switch(e){case"gov-loading":if(!customElements.get(e)){customElements.define(e,b)}break;case"gov-backdrop":if(!customElements.get(e)){d()}break;case"gov-icon":if(!customElements.get(e)){f()}break}}))}g();const l=b;const v=g;export{l as GovLoading,v as defineCustomElement};
1
+ import{p as e,H as o,h as s,d as t}from"./p-42200001.js";import{p as a}from"./p-e0e2e9c1.js";import{S as c}from"./p-92f420cb.js";import{g as i,p as n}from"./p-ea7fdd2e.js";import{v as r}from"./p-d8135701.js";import{d}from"./p-de0a517f.js";import{d as f}from"./p-16e68a91.js";const m=a(c,["_S","_M","_L"]);const p={root:"gov-loading",content:"gov-loading__content",icon:"gov-loading__icon"};const b=e(class e extends o{constructor(){super();this.__registerHost();this.size="m";this.h=i(this.host)}validateSize(e){r(m,e,p.root)}componentWillLoad(){this.validateSize(this.size)}render(){return s(t,{key:"c898509b3ef6060aaf7fe430738f8b40ae37810f",class:this.h.classes(p.root),size:this.size},s("div",{key:"2dcb83c719ba81284fe78c1c30a12c4630571712",class:p.content},s("gov-icon",{key:"9e499b414ceb2b601b5f7f093f403e4317fbebec",class:n([p.icon,"gov-spin-animation"]),name:"loader",type:"components"}),s("slot",{key:"638d2b827845d5ca7b6ac9dc4ebb27e790dc710e"})),s("gov-backdrop",{key:"1124baa1e77cf732888acdd3938d5b3661514b6d",inverse:true}))}get host(){return this}static get watchers(){return{size:["validateSize"]}}},[4,"gov-loading",{size:[1]},undefined,{size:["validateSize"]}]);function g(){if(typeof customElements==="undefined"){return}const e=["gov-loading","gov-backdrop","gov-icon"];e.forEach((e=>{switch(e){case"gov-loading":if(!customElements.get(e)){customElements.define(e,b)}break;case"gov-backdrop":if(!customElements.get(e)){d()}break;case"gov-icon":if(!customElements.get(e)){f()}break}}))}g();const l=b;const v=g;export{l as GovLoading,v as defineCustomElement};
2
2
  //# sourceMappingURL=gov-loading.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,c as s,h as i,d as a}from"./p-42200001.js";import{F as o}from"./p-1c1d0bbe.js";import{v as n}from"./p-d8135701.js";import{S as l}from"./p-92f420cb.js";import{C as r}from"./p-5aad3497.js";import{p as c}from"./p-e0e2e9c1.js";import{g as h,p,t as d}from"./p-ea7fdd2e.js";import{c as g}from"./p-cd6c2938.js";import{c as m}from"./p-ded281e6.js";import{A as u,a as f,i as v}from"./p-33d5d1ed.js";import{d as b}from"./p-61453dbf.js";import{d as j}from"./p-88b35bda.js";import{d as y}from"./p-df29e931.js";const S=c(l,["_S","_M"]);const P=c(r,["PRIMARY","NEUTRAL"]);var z;(function(t){t["BUTTON"]="button";t["SELECT"]="select"})(z||(z={}));const _={root:"gov-pagination",list:"gov-pagination__list",item:"gov-pagination__item",itemArrow:"gov-pagination__item--arrow",itemMore:"gov-pagination__item--more",itemSelect:"gov-pagination__item--select",inner:"gov-pagination__inner",arrow:"gov-pagination__arrow"};function k(t,e=1,s=10,i=10){const a=Math.ceil(t/s);if(e<1){e=1}else if(e>a){e=a}let o,n;if(a<=i){o=1;n=a}else{const t=Math.floor(i/2);const s=Math.ceil(i/2)-1;if(e<=t){o=1;n=i}else if(e+s>=a){o=a-i+1;n=a}else{o=e-t;n=e+s}}const l=(e-1)*s;const r=Math.min(l+s-1,t-1);const c=Array.from(Array(n+1-o).keys()).map((t=>o+t));return{totalItems:t,currentPage:e,pageSize:s,totalPages:a,startPage:o,endPage:n,startIndex:l,endIndex:r,pages:c}}const A=t(class t extends e{constructor(){super();this.__registerHost();this.govPage=s(this,"gov-page",7);this.type="button";this.current=1;this.total=0;this.selectIdentifier=undefined;this.size="m";this.color="primary";this.pageSize=10;this.maxPages=5;this.link=undefined;this.accessibleSelectLabel="Vybrat stranu";this.accessiblePageLabel="Strana";this.labelPrev="Přejít o stranu zpět";this.labelStart="Přejít na začátek";this.labelNext="Přejít na další stranu";this.labelEnd="Přejít na konec";this.pagination=undefined;this.inheritedAttributes={};this.h=h(this.host);this.pageSelectId=g("GovPageSelect");this.selectId=g("GovSelect")}validateType(t){n(z,t,_.root)}validateSize(t){n(S,t,_.root)}validateColor(t){n(P,t,_.root)}recalculate(){this.recalculatePagination(this.current)}componentDidLoad(){this.attributeObserver=new u(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(f)}componentWillLoad(){this.recalculatePagination(this.current);this.validateSize(this.size);this.validateColor(this.color);this.inheritedAttributes=v(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}recalculatePagination(t){this.pagination=k(this.total,t,this.pageSize,this.maxPages)}isActivePageClass(t,e){if(this.pagination.currentPage===e){return t+" is-active"}else{return t}}prepareLinkUrl(t){if(this.link){return String(this.link).replace("{PAGE}",String(t))}return undefined}resetSelectValue(){if(this.spreadSelectRef){this.spreadSelectRef.getRef().then((t=>{t.value="..."}))}}render(){const t=(t,e,s)=>{const a=t===-1;const o=d(this.pagination.currentPage===t?true:undefined);return i("gov-button",{href:this.prepareLinkUrl(t),color:this.color,size:this.size,type:"base",disabled:a,"on-gov-click":e=>this.onClickHandler(e,t),"aria-label":s?s:t>-1?`${this.accessiblePageLabel} ${t}`:undefined,"aria-current":o,class:_.inner,focusable:true},e)};return i(a,{class:this.h.classes(_.root),type:this.type,color:this.color,size:this.size},i("nav",Object.assign({},this.inheritedAttributes),i("ul",{class:_.list},i("li",{class:p([_.item,_.itemArrow])},t(this.pagination.currentPage>1?1:-1,i("gov-icon",{class:_.arrow,name:"chevron-double-left",type:"components"}),this.labelStart)),i("li",{class:p([_.item,_.itemArrow])},t(this.pagination.startPage<this.pagination.currentPage?this.pagination.currentPage-1:-1,i("gov-icon",{class:_.arrow,name:"chevron-left",type:"components"}),this.labelPrev)),this.type=="select"?i("li",{class:p([_.item,_.itemSelect])},i("span",{class:_.inner},i("span",{id:this.pageSelectId,hidden:true},this.accessibleSelectLabel),i("gov-form-select",{size:this.size,color:this.color,identifier:this.selectIdentifier||this.selectId,"aria-labelledby":this.pageSelectId,"on-gov-change":this.onSelectHandler.bind(this)},m(1,this.pagination.totalPages).map((t=>i("option",{value:t,selected:this.pagination.currentPage===t},t)))))):i(o,null,this.pagination.pages.map((e=>i("li",{class:this.isActivePageClass(_.item,e)},t(e,e,"")))),this.pagination.totalPages?i("li",{class:p([_.item,_.itemMore])},i("span",{class:_.inner},i("span",{id:this.pageSelectId,hidden:true},this.accessibleSelectLabel),i("gov-form-select",{size:this.size,color:this.color,identifier:this.selectIdentifier||this.selectId,"aria-labelledby":this.pageSelectId,ref:t=>this.spreadSelectRef=t,"on-gov-change":this.onSelectHandler.bind(this)},i("option",{selected:true,hidden:true},"..."),m(1,this.pagination.totalPages).map((t=>i("option",{value:t,selected:false},t)))))):null),i("li",{class:p([_.item,_.itemArrow])},t(this.pagination.totalPages>this.pagination.currentPage?this.pagination.currentPage+1:-1,i("gov-icon",{class:_.arrow,name:"chevron-right",type:"components"}),this.labelNext)),i("li",{class:p([_.item,_.itemArrow])},t(this.pagination.totalPages>this.pagination.currentPage?this.pagination.totalPages:-1,i("gov-icon",{class:_.arrow,name:"chevron-double-right",type:"components"}),this.labelEnd)))))}onClickHandler(t,e){t.stopPropagation();this.recalculatePagination(e);this.govPage.emit({component:_.root,pagination:this.pagination})}onSelectHandler(t){t.stopPropagation();const e=t.detail.value;const s=parseInt(e);this.resetSelectValue();if(isNaN(s)===false){this.recalculatePagination(s);if(this.link){window.location.href=this.prepareLinkUrl(s)}else{this.govPage.emit({component:_.root,pagination:this.pagination})}}}get host(){return this}static get watchers(){return{type:["validateType"],size:["validateSize"],color:["validateColor"],current:["recalculate"],total:["recalculate"],pageSize:["recalculate"],maxPages:["recalculate"]}}},[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]},undefined,{type:["validateType"],size:["validateSize"],color:["validateColor"],current:["recalculate"],total:["recalculate"],pageSize:["recalculate"],maxPages:["recalculate"]}]);function x(){if(typeof customElements==="undefined"){return}const t=["gov-pagination","gov-button","gov-form-select","gov-icon"];t.forEach((t=>{switch(t){case"gov-pagination":if(!customElements.get(t)){customElements.define(t,A)}break;case"gov-button":if(!customElements.get(t)){b()}break;case"gov-form-select":if(!customElements.get(t)){j()}break;case"gov-icon":if(!customElements.get(t)){y()}break}}))}x();const w=A;const E=x;export{w as GovPagination,E as defineCustomElement};
1
+ import{p as t,H as e,c as s,h as i,d as a}from"./p-42200001.js";import{F as o}from"./p-1c1d0bbe.js";import{v as n}from"./p-d8135701.js";import{S as l}from"./p-92f420cb.js";import{C as r}from"./p-5aad3497.js";import{p as c}from"./p-e0e2e9c1.js";import{g as h,p,t as d}from"./p-ea7fdd2e.js";import{c as g}from"./p-cd6c2938.js";import{c as m}from"./p-ded281e6.js";import{A as u,a as f,i as v}from"./p-33d5d1ed.js";import{d as b}from"./p-6a473654.js";import{d as j}from"./p-d7d988d7.js";import{d as y}from"./p-16e68a91.js";const S=c(l,["_S","_M"]);const P=c(r,["PRIMARY","NEUTRAL"]);var z;(function(t){t["BUTTON"]="button";t["SELECT"]="select"})(z||(z={}));const _={root:"gov-pagination",list:"gov-pagination__list",item:"gov-pagination__item",itemArrow:"gov-pagination__item--arrow",itemMore:"gov-pagination__item--more",itemSelect:"gov-pagination__item--select",inner:"gov-pagination__inner",arrow:"gov-pagination__arrow"};function k(t,e=1,s=10,i=10){const a=Math.ceil(t/s);if(e<1){e=1}else if(e>a){e=a}let o,n;if(a<=i){o=1;n=a}else{const t=Math.floor(i/2);const s=Math.ceil(i/2)-1;if(e<=t){o=1;n=i}else if(e+s>=a){o=a-i+1;n=a}else{o=e-t;n=e+s}}const l=(e-1)*s;const r=Math.min(l+s-1,t-1);const c=Array.from(Array(n+1-o).keys()).map((t=>o+t));return{totalItems:t,currentPage:e,pageSize:s,totalPages:a,startPage:o,endPage:n,startIndex:l,endIndex:r,pages:c}}const A=t(class t extends e{constructor(){super();this.__registerHost();this.govPage=s(this,"gov-page",7);this.type="button";this.current=1;this.total=0;this.selectIdentifier=undefined;this.size="m";this.color="primary";this.pageSize=10;this.maxPages=5;this.link=undefined;this.accessibleSelectLabel="Vybrat stranu";this.accessiblePageLabel="Strana";this.labelPrev="Přejít o stranu zpět";this.labelStart="Přejít na začátek";this.labelNext="Přejít na další stranu";this.labelEnd="Přejít na konec";this.pagination=undefined;this.inheritedAttributes={};this.h=h(this.host);this.pageSelectId=g("GovPageSelect");this.selectId=g("GovSelect")}validateType(t){n(z,t,_.root)}validateSize(t){n(S,t,_.root)}validateColor(t){n(P,t,_.root)}recalculate(){this.recalculatePagination(this.current)}componentDidLoad(){this.attributeObserver=new u(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(f)}componentWillLoad(){this.recalculatePagination(this.current);this.validateSize(this.size);this.validateColor(this.color);this.inheritedAttributes=v(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}recalculatePagination(t){this.pagination=k(this.total,t,this.pageSize,this.maxPages)}isActivePageClass(t,e){if(this.pagination.currentPage===e){return t+" is-active"}else{return t}}prepareLinkUrl(t){if(this.link){return String(this.link).replace("{PAGE}",String(t))}return undefined}resetSelectValue(){if(this.spreadSelectRef){this.spreadSelectRef.getRef().then((t=>{t.value="..."}))}}render(){const t=(t,e,s)=>{const a=t===-1;const o=d(this.pagination.currentPage===t?true:undefined);return i("gov-button",{href:this.prepareLinkUrl(t),color:this.color,size:this.size,type:"base",disabled:a,"on-gov-click":e=>this.onClickHandler(e,t),"aria-label":s?s:t>-1?`${this.accessiblePageLabel} ${t}`:undefined,"aria-current":o,class:_.inner,focusable:true},e)};return i(a,{class:this.h.classes(_.root),type:this.type,color:this.color,size:this.size},i("nav",Object.assign({},this.inheritedAttributes),i("ul",{class:_.list},i("li",{class:p([_.item,_.itemArrow])},t(this.pagination.currentPage>1?1:-1,i("gov-icon",{class:_.arrow,name:"chevron-double-left",type:"components"}),this.labelStart)),i("li",{class:p([_.item,_.itemArrow])},t(this.pagination.startPage<this.pagination.currentPage?this.pagination.currentPage-1:-1,i("gov-icon",{class:_.arrow,name:"chevron-left",type:"components"}),this.labelPrev)),this.type=="select"?i("li",{class:p([_.item,_.itemSelect])},i("span",{class:_.inner},i("span",{id:this.pageSelectId,hidden:true},this.accessibleSelectLabel),i("gov-form-select",{size:this.size,color:this.color,identifier:this.selectIdentifier||this.selectId,"aria-labelledby":this.pageSelectId,"on-gov-change":this.onSelectHandler.bind(this)},m(1,this.pagination.totalPages).map((t=>i("option",{value:t,selected:this.pagination.currentPage===t},t)))))):i(o,null,this.pagination.pages.map((e=>i("li",{class:this.isActivePageClass(_.item,e)},t(e,e,"")))),this.pagination.totalPages?i("li",{class:p([_.item,_.itemMore])},i("span",{class:_.inner},i("span",{id:this.pageSelectId,hidden:true},this.accessibleSelectLabel),i("gov-form-select",{size:this.size,color:this.color,identifier:this.selectIdentifier||this.selectId,"aria-labelledby":this.pageSelectId,ref:t=>this.spreadSelectRef=t,"on-gov-change":this.onSelectHandler.bind(this)},i("option",{selected:true,hidden:true},"..."),m(1,this.pagination.totalPages).map((t=>i("option",{value:t,selected:false},t)))))):null),i("li",{class:p([_.item,_.itemArrow])},t(this.pagination.totalPages>this.pagination.currentPage?this.pagination.currentPage+1:-1,i("gov-icon",{class:_.arrow,name:"chevron-right",type:"components"}),this.labelNext)),i("li",{class:p([_.item,_.itemArrow])},t(this.pagination.totalPages>this.pagination.currentPage?this.pagination.totalPages:-1,i("gov-icon",{class:_.arrow,name:"chevron-double-right",type:"components"}),this.labelEnd)))))}onClickHandler(t,e){t.stopPropagation();this.recalculatePagination(e);this.govPage.emit({component:_.root,pagination:this.pagination})}onSelectHandler(t){t.stopPropagation();const e=t.detail.value;const s=parseInt(e);this.resetSelectValue();if(isNaN(s)===false){this.recalculatePagination(s);if(this.link){window.location.href=this.prepareLinkUrl(s)}else{this.govPage.emit({component:_.root,pagination:this.pagination})}}}get host(){return this}static get watchers(){return{type:["validateType"],size:["validateSize"],color:["validateColor"],current:["recalculate"],total:["recalculate"],pageSize:["recalculate"],maxPages:["recalculate"]}}},[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]},undefined,{type:["validateType"],size:["validateSize"],color:["validateColor"],current:["recalculate"],total:["recalculate"],pageSize:["recalculate"],maxPages:["recalculate"]}]);function x(){if(typeof customElements==="undefined"){return}const t=["gov-pagination","gov-button","gov-form-select","gov-icon"];t.forEach((t=>{switch(t){case"gov-pagination":if(!customElements.get(t)){customElements.define(t,A)}break;case"gov-button":if(!customElements.get(t)){b()}break;case"gov-form-select":if(!customElements.get(t)){j()}break;case"gov-icon":if(!customElements.get(t)){y()}break}}))}x();const w=A;const E=x;export{w as GovPagination,E as defineCustomElement};
2
2
  //# sourceMappingURL=gov-pagination.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,c as i,h as e,d as o}from"./p-42200001.js";import{v as a}from"./p-d8135701.js";import{T as r,a as n,b as h,c,d as l}from"./p-860520b0.js";import{g as d,c as f,b}from"./p-ea7fdd2e.js";import{h as p}from"./p-2aedc81e.js";import{p as u}from"./p-016bbea6.js";import{A as m,a as v,i as g}from"./p-33d5d1ed.js";import{d as y}from"./p-b642e485.js";import{d as j}from"./p-df29e931.js";const k=t(class t extends s{constructor(){super();this.__registerHost();this.govChange=i(this,"gov-change",7);this.triggerRefs={};this.type="text";this.size="m";this.color="primary";this.orientation="horizontal";this.direction="row";this.controllers=[];this.focusIndex=0;this.inheritedAttributes={};this.h=d(this.host)}validateType(t){a(h,t,n.root)}validateColor(t){a(c,t,n.root)}validateSize(t){a(l,t,n.root)}componentDidLoad(){this.attributeObserver=new m(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(v)}componentWillLoad(){this.prepareControllers();this.validateSize(this.size);this.inheritedAttributes=g(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}prepareControllers(t=false){this.controllers=[];const s=[];this.host.querySelectorAll(r.root).forEach((t=>{const i=Promise.all([t.getIdentifier(),t.getTriggerIdentifier(),t.getDisableState()]).then((([s,i,e])=>{const o=typeof t.getAttribute("default")==="string";const a=u(t.getAttribute("icon-start"));const r=u(t.getAttribute("icon-end"));return{label:t.getAttribute("label"),direction:t.getAttribute("direction"),contentIdentifier:s,disabled:e,triggerIdentifier:i,element:t,active:false,default:o,iconStart:a,iconEnd:r}}));s.push(i)}));Promise.all(s).then((s=>{if(t===false){let t=s.findIndex((t=>t.default));if(t===-1)t=0;this.focusIndex=t;s[t].active=true}else if(this.focusIndex>-1&&p(s,this.focusIndex)){s[this.focusIndex].active=true}const i=s.findIndex((t=>t.active&&t.disabled));if(i>-1){s[i].active=false;const t=s.findIndex((t=>!t.disabled));if(t>-1){s[t].active=true;this.focusIndex=t}}this.controllers=[...s];this.reRender()}))}setActiveByIdentifier(t){const s=[];this.controllers.map((i=>{i.active=t===i.triggerIdentifier||t===i.contentIdentifier;s.push(i)}));this.controllers=[...s]}reRender(){this.controllers.map((t=>{t.element.setActiveStatus(t.active).catch()}))}render(){return e(o,{key:"1fffeff827b0d4944bf701c3a838eebd9666abcb",class:this.h.classes(n.root),size:this.size,color:this.color,type:this.type,direction:this.direction,onKeyDown:this.onKeydownHandler.bind(this)},e("div",Object.assign({key:"3be472d6bc3d111de4b73f1c6e6a89d5d7e92110",class:n.tabs,role:"tablist"},this.inheritedAttributes),e("ul",{key:"cc7108c86e22104094ef8eb6d1430a0a0abe11db",class:n.list},this.controllers.map((t=>e("li",{class:n.item},this.type=="text"?e("button",{class:n.btn,id:t.triggerIdentifier,role:"tab",onClick:()=>this.onSelectHandler(t),disabled:t.disabled,"aria-disabled":f(t.disabled),"aria-selected":f(t.active),"aria-controls":t.contentIdentifier,tabindex:t.active&&!t.disabled?0:-1,ref:s=>this.triggerRefs[t.triggerIdentifier]=s},t.iconStart?e("gov-icon",{name:t.iconStart.name,type:t.iconStart.type}):null,t.label,t.iconEnd?e("gov-icon",{name:t.iconEnd.name,type:t.iconEnd.type}):null):e("gov-chip",{role:"tab",tag:"button",identifier:t.triggerIdentifier,"aria-selected":b(t.active),"aria-controls":t.contentIdentifier,focusable:t.active,disabled:t.disabled,color:this.color,size:this.size==="xs"?"xs":this.size==="s"?"s":"m",type:t.active?"solid":"outlined",ref:s=>this.triggerRefs[t.triggerIdentifier]=s,"on-gov-click":()=>this.onSelectHandler(t)},t.iconStart?e("gov-icon",{name:t.iconStart.name,type:t.iconStart.type,slot:"icon-start"}):null,t.label,t.iconEnd?e("gov-icon",{name:t.iconEnd.name,type:t.iconEnd.type,slot:"icon-end"}):null)))))),e("slot",{key:"6e8295947f0555d54060a29fd8f5b7c607be4c20"}))}getCurrentTab(){return this.controllers.find((t=>t.active))||null}onSelectHandler(t){const s=this.controllers.findIndex((s=>s.triggerIdentifier===t.triggerIdentifier));this.focusIndex=s;this.setActiveByIdentifier(t.triggerIdentifier);this.reRender();this.govChange.emit(this.getCurrentTab().element)}onKeydownHandler(t){const s=t.keyCode;t.stopPropagation();this.goToPrevNext(s)}goToPrevNext(t){if([37,38,39,40].includes(t)){if(false===(this.focusIndex>=0&&this.focusIndex<=this.controllers.length-1)){return}this.controllers[this.focusIndex].active=false;if(t===39||t===40){this.focusIndex++;if(this.focusIndex>=this.controllers.length){this.focusIndex=0}if(this.controllers[this.focusIndex].disabled){this.goToPrevNext(40)}}else if(t===37||t===38){this.focusIndex--;if(this.focusIndex<0){this.focusIndex=this.controllers.length-1}if(this.controllers[this.focusIndex].disabled){this.goToPrevNext(38)}}if(this.focusIndex>=0&&this.focusIndex<=this.controllers.length-1){const t=this.controllers[this.focusIndex];t.active=true;const s=this.triggerRefs[t.triggerIdentifier];if(s.nodeName.toLowerCase()==="gov-chip"){this.triggerRefs[t.triggerIdentifier].setFocus()}else{this.triggerRefs[t.triggerIdentifier].focus()}this.controllers=[...this.controllers];this.reRender();this.govChange.emit(this.getCurrentTab().element)}}}async refresh(){this.prepareControllers()}async currentTab(){return this.getCurrentTab().element||null}async setActiveTab(t){this.setActiveByIdentifier(t);this.reRender()}async rerender(){this.prepareControllers(true)}get host(){return this}static get watchers(){return{type:["validateType"],color:["validateColor"],size:["validateSize"]}}},[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]},undefined,{type:["validateType"],color:["validateColor"],size:["validateSize"]}]);function T(){if(typeof customElements==="undefined"){return}const t=["gov-tabs","gov-chip","gov-icon"];t.forEach((t=>{switch(t){case"gov-tabs":if(!customElements.get(t)){customElements.define(t,k)}break;case"gov-chip":if(!customElements.get(t)){y()}break;case"gov-icon":if(!customElements.get(t)){j()}break}}))}T();const x=k;const z=T;export{x as GovTabs,z as defineCustomElement};
1
+ import{p as t,H as s,c as i,h as e,d as o}from"./p-42200001.js";import{v as a}from"./p-d8135701.js";import{T as r,a as n,b as h,c,d as l}from"./p-860520b0.js";import{g as d,c as f,b}from"./p-ea7fdd2e.js";import{h as p}from"./p-2aedc81e.js";import{p as u}from"./p-016bbea6.js";import{A as m,a as v,i as g}from"./p-33d5d1ed.js";import{d as y}from"./p-52fcba77.js";import{d as j}from"./p-16e68a91.js";const k=t(class t extends s{constructor(){super();this.__registerHost();this.govChange=i(this,"gov-change",7);this.triggerRefs={};this.type="text";this.size="m";this.color="primary";this.orientation="horizontal";this.direction="row";this.controllers=[];this.focusIndex=0;this.inheritedAttributes={};this.h=d(this.host)}validateType(t){a(h,t,n.root)}validateColor(t){a(c,t,n.root)}validateSize(t){a(l,t,n.root)}componentDidLoad(){this.attributeObserver=new m(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(v)}componentWillLoad(){this.prepareControllers();this.validateSize(this.size);this.inheritedAttributes=g(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}prepareControllers(t=false){this.controllers=[];const s=[];this.host.querySelectorAll(r.root).forEach((t=>{const i=Promise.all([t.getIdentifier(),t.getTriggerIdentifier(),t.getDisableState()]).then((([s,i,e])=>{const o=typeof t.getAttribute("default")==="string";const a=u(t.getAttribute("icon-start"));const r=u(t.getAttribute("icon-end"));return{label:t.getAttribute("label"),direction:t.getAttribute("direction"),contentIdentifier:s,disabled:e,triggerIdentifier:i,element:t,active:false,default:o,iconStart:a,iconEnd:r}}));s.push(i)}));Promise.all(s).then((s=>{if(t===false){let t=s.findIndex((t=>t.default));if(t===-1)t=0;this.focusIndex=t;s[t].active=true}else if(this.focusIndex>-1&&p(s,this.focusIndex)){s[this.focusIndex].active=true}const i=s.findIndex((t=>t.active&&t.disabled));if(i>-1){s[i].active=false;const t=s.findIndex((t=>!t.disabled));if(t>-1){s[t].active=true;this.focusIndex=t}}this.controllers=[...s];this.reRender()}))}setActiveByIdentifier(t){const s=[];this.controllers.map((i=>{i.active=t===i.triggerIdentifier||t===i.contentIdentifier;s.push(i)}));this.controllers=[...s]}reRender(){this.controllers.map((t=>{t.element.setActiveStatus(t.active).catch()}))}render(){return e(o,{key:"1fffeff827b0d4944bf701c3a838eebd9666abcb",class:this.h.classes(n.root),size:this.size,color:this.color,type:this.type,direction:this.direction,onKeyDown:this.onKeydownHandler.bind(this)},e("div",Object.assign({key:"3be472d6bc3d111de4b73f1c6e6a89d5d7e92110",class:n.tabs,role:"tablist"},this.inheritedAttributes),e("ul",{key:"cc7108c86e22104094ef8eb6d1430a0a0abe11db",class:n.list},this.controllers.map((t=>e("li",{class:n.item},this.type=="text"?e("button",{class:n.btn,id:t.triggerIdentifier,role:"tab",onClick:()=>this.onSelectHandler(t),disabled:t.disabled,"aria-disabled":f(t.disabled),"aria-selected":f(t.active),"aria-controls":t.contentIdentifier,tabindex:t.active&&!t.disabled?0:-1,ref:s=>this.triggerRefs[t.triggerIdentifier]=s},t.iconStart?e("gov-icon",{name:t.iconStart.name,type:t.iconStart.type}):null,t.label,t.iconEnd?e("gov-icon",{name:t.iconEnd.name,type:t.iconEnd.type}):null):e("gov-chip",{role:"tab",tag:"button",identifier:t.triggerIdentifier,"aria-selected":b(t.active),"aria-controls":t.contentIdentifier,focusable:t.active,disabled:t.disabled,color:this.color,size:this.size==="xs"?"xs":this.size==="s"?"s":"m",type:t.active?"solid":"outlined",ref:s=>this.triggerRefs[t.triggerIdentifier]=s,"on-gov-click":()=>this.onSelectHandler(t)},t.iconStart?e("gov-icon",{name:t.iconStart.name,type:t.iconStart.type,slot:"icon-start"}):null,t.label,t.iconEnd?e("gov-icon",{name:t.iconEnd.name,type:t.iconEnd.type,slot:"icon-end"}):null)))))),e("slot",{key:"6e8295947f0555d54060a29fd8f5b7c607be4c20"}))}getCurrentTab(){return this.controllers.find((t=>t.active))||null}onSelectHandler(t){const s=this.controllers.findIndex((s=>s.triggerIdentifier===t.triggerIdentifier));this.focusIndex=s;this.setActiveByIdentifier(t.triggerIdentifier);this.reRender();this.govChange.emit(this.getCurrentTab().element)}onKeydownHandler(t){const s=t.keyCode;t.stopPropagation();this.goToPrevNext(s)}goToPrevNext(t){if([37,38,39,40].includes(t)){if(false===(this.focusIndex>=0&&this.focusIndex<=this.controllers.length-1)){return}this.controllers[this.focusIndex].active=false;if(t===39||t===40){this.focusIndex++;if(this.focusIndex>=this.controllers.length){this.focusIndex=0}if(this.controllers[this.focusIndex].disabled){this.goToPrevNext(40)}}else if(t===37||t===38){this.focusIndex--;if(this.focusIndex<0){this.focusIndex=this.controllers.length-1}if(this.controllers[this.focusIndex].disabled){this.goToPrevNext(38)}}if(this.focusIndex>=0&&this.focusIndex<=this.controllers.length-1){const t=this.controllers[this.focusIndex];t.active=true;const s=this.triggerRefs[t.triggerIdentifier];if(s.nodeName.toLowerCase()==="gov-chip"){this.triggerRefs[t.triggerIdentifier].setFocus()}else{this.triggerRefs[t.triggerIdentifier].focus()}this.controllers=[...this.controllers];this.reRender();this.govChange.emit(this.getCurrentTab().element)}}}async refresh(){this.prepareControllers()}async currentTab(){return this.getCurrentTab().element||null}async setActiveTab(t){this.setActiveByIdentifier(t);this.reRender()}async rerender(){this.prepareControllers(true)}get host(){return this}static get watchers(){return{type:["validateType"],color:["validateColor"],size:["validateSize"]}}},[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]},undefined,{type:["validateType"],color:["validateColor"],size:["validateSize"]}]);function T(){if(typeof customElements==="undefined"){return}const t=["gov-tabs","gov-chip","gov-icon"];t.forEach((t=>{switch(t){case"gov-tabs":if(!customElements.get(t)){customElements.define(t,k)}break;case"gov-chip":if(!customElements.get(t)){y()}break;case"gov-icon":if(!customElements.get(t)){j()}break}}))}T();const x=k;const z=T;export{x as GovTabs,z as defineCustomElement};
2
2
  //# sourceMappingURL=gov-tabs.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,h as s,d as o}from"./p-42200001.js";import{g as a}from"./p-ea7fdd2e.js";import{v as i}from"./p-d8135701.js";import{a as c,c as n}from"./p-44a8a668.js";import{p as d}from"./p-e0e2e9c1.js";import{S as r}from"./p-92f420cb.js";import{p as f}from"./p-016bbea6.js";import{d as m}from"./p-df29e931.js";const l=d(r,["_XS","_S","_M"]);var p;(function(e){e["BOLD"]="bold";e["SUBTLE"]="subtle"})(p||(p={}));const b={root:"gov-tag"};const h=e(class e extends t{constructor(){super();this.__registerHost();this.iconStart=undefined;this.iconEnd=undefined;this.size=l._S;this.color=c.PRIMARY;this.type=undefined;this.expanded=false;this.h=a(this.host)}validateColor(e){i(c,e,b.root)}validateSize(e){i(n,e,b.root)}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size)}render(){const e=f(this.iconStart);const t=f(this.iconEnd);return s(o,{key:"6e4203592cd24134cb9e1a187dbecd6cc70d20bb",class:this.h.classes(b.root),color:this.color,size:this.size,type:this.type},s("span",{key:"a58f1a4fd78d57f8e4a89d1c325ea0f24347ccaf",class:"element"},s("slot",{key:"bc52f9aa456b154b67b97903babe69c8b7731f50",name:"icon-start"},e&&s("gov-icon",{key:"ed492a9c4746766d8ac7bf810da994147d189133",type:e.type,name:e.name})),s("slot",{key:"52e2c10f8048aa0168dc7daf44392f19dd118e43"}),s("slot",{key:"ccbd781c7a0e8fd2e02725cebc5df48e8e84b6ea",name:"icon-end"},t&&s("gov-icon",{key:"cce60e6a25e14d42281111979b7689d03ea264e1",type:t.type,name:t.name}))))}get host(){return this}static get watchers(){return{color:["validateColor"],size:["validateSize"]}}},[4,"gov-tag",{iconStart:[1,"icon-start"],iconEnd:[1,"icon-end"],size:[513],color:[513],type:[513],expanded:[516]},undefined,{color:["validateColor"],size:["validateSize"]}]);function u(){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,h)}break;case"gov-icon":if(!customElements.get(e)){m()}break}}))}u();const v=h;const g=u;export{v as GovTag,g as defineCustomElement};
1
+ import{p as e,H as t,h as s,d as o}from"./p-42200001.js";import{g as a}from"./p-ea7fdd2e.js";import{v as i}from"./p-d8135701.js";import{a as c,c as n}from"./p-44a8a668.js";import{p as d}from"./p-e0e2e9c1.js";import{S as r}from"./p-92f420cb.js";import{p as f}from"./p-016bbea6.js";import{d as m}from"./p-16e68a91.js";const l=d(r,["_XS","_S","_M"]);var p;(function(e){e["BOLD"]="bold";e["SUBTLE"]="subtle"})(p||(p={}));const b={root:"gov-tag"};const h=e(class e extends t{constructor(){super();this.__registerHost();this.iconStart=undefined;this.iconEnd=undefined;this.size=l._S;this.color=c.PRIMARY;this.type=undefined;this.expanded=false;this.h=a(this.host)}validateColor(e){i(c,e,b.root)}validateSize(e){i(n,e,b.root)}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size)}render(){const e=f(this.iconStart);const t=f(this.iconEnd);return s(o,{key:"6e4203592cd24134cb9e1a187dbecd6cc70d20bb",class:this.h.classes(b.root),color:this.color,size:this.size,type:this.type},s("span",{key:"a58f1a4fd78d57f8e4a89d1c325ea0f24347ccaf",class:"element"},s("slot",{key:"bc52f9aa456b154b67b97903babe69c8b7731f50",name:"icon-start"},e&&s("gov-icon",{key:"ed492a9c4746766d8ac7bf810da994147d189133",type:e.type,name:e.name})),s("slot",{key:"52e2c10f8048aa0168dc7daf44392f19dd118e43"}),s("slot",{key:"ccbd781c7a0e8fd2e02725cebc5df48e8e84b6ea",name:"icon-end"},t&&s("gov-icon",{key:"cce60e6a25e14d42281111979b7689d03ea264e1",type:t.type,name:t.name}))))}get host(){return this}static get watchers(){return{color:["validateColor"],size:["validateSize"]}}},[4,"gov-tag",{iconStart:[1,"icon-start"],iconEnd:[1,"icon-end"],size:[513],color:[513],type:[513],expanded:[516]},undefined,{color:["validateColor"],size:["validateSize"]}]);function u(){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,h)}break;case"gov-icon":if(!customElements.get(e)){m()}break}}))}u();const v=h;const g=u;export{v as GovTag,g as defineCustomElement};
2
2
  //# sourceMappingURL=gov-tag.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,c as s,h as i,d as a}from"./p-42200001.js";import{g as o}from"./p-ea7fdd2e.js";import{p as c}from"./p-e0e2e9c1.js";import{S as n}from"./p-92f420cb.js";import{i as h}from"./p-ceafa242.js";import{v as r}from"./p-d8135701.js";import{d as l}from"./p-df29e931.js";const m=c(n,["_XS","_S","_M","_L","_XL"]);const d={root:"gov-theme-switch",indicator:"gov-theme-switch__indicator",iconLight:"gov-theme-switch__icon-light",iconDark:"gov-theme-switch__icon-dark"};const f="data-theme";var p;(function(t){t["auto"]="auto";t["light"]="light";t["dark"]="dark"})(p||(p={}));const u=(t,e,s)=>{if(!h){return}let i="";if(s){const t=new Date;t.setTime(t.getTime()+s*24*60*60*1e3);i="; expires="+t.toUTCString()}document.cookie=`${t}=${encodeURIComponent(e)}${i}; path=/`};const b=t=>{if(!h){return null}const e=t+"=";const s=document.cookie.split(";");for(let t=0;t<s.length;t++){let i=s[t].trim();if(i.startsWith(e)){return decodeURIComponent(i.substring(e.length))}}return null};const g=t(class t extends e{constructor(){super();this.__registerHost();this.govChange=s(this,"gov-change",7);this.setThemeState=t=>{this.theme=t;this.govChange.emit({component:d.root,state:this.theme,ref:this.host})};this.size="m";this.displayLabel=false;this.ariaLabelLight="Přenout na tmavý mód";this.ariaLabelDark="Přepnout na světlý mód";this.labelLight="Světlý mód";this.labelDark="Tmavý mód";this.theme=p.auto;this.h=o(this.host)}validateSize(t){r(m,t,d.root)}watchTheme(t){this.htmlElement.setAttribute(f,t);this.htmlElement.classList.remove(...Object.keys(p));this.htmlElement.classList.add(t);u(f,t)}get storageValue(){return b(f)}get htmlElement(){return document.documentElement}get isSystemPrefersColorDark(){return h&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}componentWillLoad(){this.initDefaultState();this.validateSize(this.size)}initDefaultState(){const t=Object.keys(p);let e=this.storageValue;const s=this.htmlElement.getAttribute(f);if(e&&t.includes(e)){this.theme=e}else if(s&&t.includes(s)){this.theme=s}else{this.theme=p.auto}}render(){let t=this.theme===p.dark;if(this.theme===p.auto){t=this.isSystemPrefersColorDark}return i(a,{key:"51cbe413c4cd97f82ae8e34376cad4cb59c3a41d",class:this.h.classes(d.root),theme:t?p.dark:p.light,size:this.size},i("button",{key:"8f7dbeec9ff6617c4953c4a0582b374baf7ba8c3",onClick:()=>this.setThemeState(t?p.light:p.dark),"aria-current":this.theme,"aria-label":t?this.ariaLabelDark:this.ariaLabelLight},i("span",{key:"64f9a96872b50f33483721541178e0d4c553d834"},i("span",{key:"f363538d18d9a4419f1ef15b1172c941277372a3",class:d.indicator},p.light&&i("gov-icon",{key:"762947b5442313672e7ace3ed59523404f548b5b",name:"sun",class:d.iconLight,type:"components"}),p.dark&&i("gov-icon",{key:"371ace4006ae511225583323682b08c8bc154f61",name:"moon",class:d.iconDark,type:"components"})),this.displayLabel&&(t?this.labelDark:this.labelLight))))}get host(){return this}static get watchers(){return{size:["validateSize"],theme:["watchTheme"]}}},[0,"gov-theme-switch",{size:[1],displayLabel:[4,"display-label"],ariaLabelLight:[1,"aria-label-light"],ariaLabelDark:[1,"aria-label-dark"],labelLight:[1,"label-light"],labelDark:[1,"label-dark"],theme:[32]},undefined,{size:["validateSize"],theme:["watchTheme"]}]);function v(){if(typeof customElements==="undefined"){return}const t=["gov-theme-switch","gov-icon"];t.forEach((t=>{switch(t){case"gov-theme-switch":if(!customElements.get(t)){customElements.define(t,g)}break;case"gov-icon":if(!customElements.get(t)){l()}break}}))}v();const k=g;const w=v;export{k as GovThemeSwitch,w as defineCustomElement};
1
+ import{p as t,H as e,c as s,h as i,d as a}from"./p-42200001.js";import{g as o}from"./p-ea7fdd2e.js";import{p as c}from"./p-e0e2e9c1.js";import{S as n}from"./p-92f420cb.js";import{i as h}from"./p-ceafa242.js";import{v as r}from"./p-d8135701.js";import{d as l}from"./p-16e68a91.js";const m=c(n,["_XS","_S","_M","_L","_XL"]);const d={root:"gov-theme-switch",indicator:"gov-theme-switch__indicator",iconLight:"gov-theme-switch__icon-light",iconDark:"gov-theme-switch__icon-dark"};const f="data-theme";var p;(function(t){t["auto"]="auto";t["light"]="light";t["dark"]="dark"})(p||(p={}));const u=(t,e,s)=>{if(!h){return}let i="";if(s){const t=new Date;t.setTime(t.getTime()+s*24*60*60*1e3);i="; expires="+t.toUTCString()}document.cookie=`${t}=${encodeURIComponent(e)}${i}; path=/`};const b=t=>{if(!h){return null}const e=t+"=";const s=document.cookie.split(";");for(let t=0;t<s.length;t++){let i=s[t].trim();if(i.startsWith(e)){return decodeURIComponent(i.substring(e.length))}}return null};const g=t(class t extends e{constructor(){super();this.__registerHost();this.govChange=s(this,"gov-change",7);this.setThemeState=t=>{this.theme=t;this.govChange.emit({component:d.root,state:this.theme,ref:this.host})};this.size="m";this.displayLabel=false;this.ariaLabelLight="Přenout na tmavý mód";this.ariaLabelDark="Přepnout na světlý mód";this.labelLight="Světlý mód";this.labelDark="Tmavý mód";this.theme=p.auto;this.h=o(this.host)}validateSize(t){r(m,t,d.root)}watchTheme(t){this.htmlElement.setAttribute(f,t);this.htmlElement.classList.remove(...Object.keys(p));this.htmlElement.classList.add(t);u(f,t)}get storageValue(){return b(f)}get htmlElement(){return document.documentElement}get isSystemPrefersColorDark(){return h&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}componentWillLoad(){this.initDefaultState();this.validateSize(this.size)}initDefaultState(){const t=Object.keys(p);let e=this.storageValue;const s=this.htmlElement.getAttribute(f);if(e&&t.includes(e)){this.theme=e}else if(s&&t.includes(s)){this.theme=s}else{this.theme=p.auto}}render(){let t=this.theme===p.dark;if(this.theme===p.auto){t=this.isSystemPrefersColorDark}return i(a,{key:"51cbe413c4cd97f82ae8e34376cad4cb59c3a41d",class:this.h.classes(d.root),theme:t?p.dark:p.light,size:this.size},i("button",{key:"8f7dbeec9ff6617c4953c4a0582b374baf7ba8c3",onClick:()=>this.setThemeState(t?p.light:p.dark),"aria-current":this.theme,"aria-label":t?this.ariaLabelDark:this.ariaLabelLight},i("span",{key:"64f9a96872b50f33483721541178e0d4c553d834"},i("span",{key:"f363538d18d9a4419f1ef15b1172c941277372a3",class:d.indicator},p.light&&i("gov-icon",{key:"762947b5442313672e7ace3ed59523404f548b5b",name:"sun",class:d.iconLight,type:"components"}),p.dark&&i("gov-icon",{key:"371ace4006ae511225583323682b08c8bc154f61",name:"moon",class:d.iconDark,type:"components"})),this.displayLabel&&(t?this.labelDark:this.labelLight))))}get host(){return this}static get watchers(){return{size:["validateSize"],theme:["watchTheme"]}}},[0,"gov-theme-switch",{size:[1],displayLabel:[4,"display-label"],ariaLabelLight:[1,"aria-label-light"],ariaLabelDark:[1,"aria-label-dark"],labelLight:[1,"label-light"],labelDark:[1,"label-dark"],theme:[32]},undefined,{size:["validateSize"],theme:["watchTheme"]}]);function v(){if(typeof customElements==="undefined"){return}const t=["gov-theme-switch","gov-icon"];t.forEach((t=>{switch(t){case"gov-theme-switch":if(!customElements.get(t)){customElements.define(t,g)}break;case"gov-icon":if(!customElements.get(t)){l()}break}}))}v();const k=g;const w=v;export{k as GovThemeSwitch,w as defineCustomElement};
2
2
  //# sourceMappingURL=gov-theme-switch.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-42200001.js";import{p as a}from"./p-e0e2e9c1.js";import{S as n}from"./p-92f420cb.js";import{g as c}from"./p-ea7fdd2e.js";import{d}from"./p-df29e931.js";a(n,["_S","_M","_L"]);const r={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:"84c41fa8adec27a169b9af69b9d7542bd86dcf36",class:this.h.classes(r.root),size:this.size,orientation:this.orientation,clickable:this.href?true:null},s("slot",{key:"7176b3b1da20e5ba92c87c32b48f850e141558f9",name:"icon"}),s("div",{key:"614de838391b6e65368cdb58b5db81af5a344d21",class:r.content},s("div",{key:"f952461981e6a5f20172a6d0ad9d041a5f9d8171",class:r.text},s("div",{key:"fb411a7f50a8a0ecb6015a69fccb8b0832c5aed4",class:r.title},this.href?s(i,null,s("a",{href:this.href,target:this.target,class:r.link,ref:e=>this.triggerRef=e},s("slot",{name:"title"})),s("span",{class:r.icon},s("gov-icon",{name:"chevron-right",type:"components"}))):s("slot",{name:"title"})),s("div",{key:"555c1aff4029a9b62f8e53391da8e289d373e100",class:`${r.annotation} ${this.href?`${r.annotation}--padding`:""}`},s("slot",{key:"e9310d039ca17a2a45dc9ef6a04c107dc6cf1bcd"}))),s("slot",{key:"e8c792e1682c30d5dcaf33798908ec06da7a8d1a",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)){d()}break}}))}l();const g=f;const h=l;export{g as GovTile,h as defineCustomElement};
1
+ import{p as e,H as t,h as s,F as i,d as o}from"./p-42200001.js";import{p as a}from"./p-e0e2e9c1.js";import{S as n}from"./p-92f420cb.js";import{g as c}from"./p-ea7fdd2e.js";import{d}from"./p-16e68a91.js";a(n,["_S","_M","_L"]);const r={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:"84c41fa8adec27a169b9af69b9d7542bd86dcf36",class:this.h.classes(r.root),size:this.size,orientation:this.orientation,clickable:this.href?true:null},s("slot",{key:"7176b3b1da20e5ba92c87c32b48f850e141558f9",name:"icon"}),s("div",{key:"614de838391b6e65368cdb58b5db81af5a344d21",class:r.content},s("div",{key:"f952461981e6a5f20172a6d0ad9d041a5f9d8171",class:r.text},s("div",{key:"fb411a7f50a8a0ecb6015a69fccb8b0832c5aed4",class:r.title},this.href?s(i,null,s("a",{href:this.href,target:this.target,class:r.link,ref:e=>this.triggerRef=e},s("slot",{name:"title"})),s("span",{class:r.icon},s("gov-icon",{name:"chevron-right",type:"components"}))):s("slot",{name:"title"})),s("div",{key:"555c1aff4029a9b62f8e53391da8e289d373e100",class:`${r.annotation} ${this.href?`${r.annotation}--padding`:""}`},s("slot",{key:"e9310d039ca17a2a45dc9ef6a04c107dc6cf1bcd"}))),s("slot",{key:"e8c792e1682c30d5dcaf33798908ec06da7a8d1a",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)){d()}break}}))}l();const g=f;const h=l;export{g as GovTile,h 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 o,d as i}from"./p-42200001.js";import{v as a}from"./p-d8135701.js";import{C as c}from"./p-5aad3497.js";import{p as n}from"./p-e0e2e9c1.js";import{g as d}from"./p-ea7fdd2e.js";import{c as r}from"./p-cd6c2938.js";import{A as h,a as l,i as f}from"./p-33d5d1ed.js";import{d as m}from"./p-61453dbf.js";import{d as b}from"./p-df29e931.js";const p=n(c,["PRIMARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);var u;(function(t){t["BOLD"]="bold";t["SUBTLE"]="subtle"})(u||(u={}));const v={root:"gov-toast",hidden:"gov-toast--hidden",content:"gov-toast__content",icon:"gov-toast__icon",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=d(this.host);this.toastId=r("GovToast")}validateColor(t){a(p,t,v.root)}componentDidLoad(){this.attributeObserver=new h(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(l)}componentWillLoad(){this.validateColor(this.color);this.runTimer();this.inheritedAttributes=f(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 o(i,{key:"9d2e214ed4c883f0ac90eb6d580ed95cb55e42cd",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")&&o("span",{key:"54292ad196806932ab9ae44bfc33187f4154e616",class:v.icon},o("slot",{key:"9545c651a46a7bb55990e9327e8fbe4fe126954f",name:"icon"})),o("div",Object.assign({key:"daed3fcbd83eec05979a9e00e2f983d5c6b1b538",class:v.content},this.inheritedAttributes,{"aria-live":"polite",role:"status"}),o("slot",{key:"d3f78c0d713d56ef32b0dece9553e258f0ef4ef4"})),o("gov-button",{key:"dad799261c83b387c0590fd0ad13bdad584ee6b4",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:o("gov-icon",{name:"x-lg",type:"components"})),o("div",{key:"e13b568ada5e34f00c405d359665cd9d0af5ff89",class:v.timer}))}onCloseHandler(){this.govClose.emit(this.toastId);this.destroy().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)){m()}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 o,d as i}from"./p-42200001.js";import{v as a}from"./p-d8135701.js";import{C as c}from"./p-5aad3497.js";import{p as n}from"./p-e0e2e9c1.js";import{g as r}from"./p-ea7fdd2e.js";import{c as d}from"./p-cd6c2938.js";import{A as h,a as l,i as m}from"./p-33d5d1ed.js";import{d as f}from"./p-6a473654.js";import{d as b}from"./p-16e68a91.js";const p=n(c,["PRIMARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);var u;(function(t){t["BOLD"]="bold";t["SUBTLE"]="subtle"})(u||(u={}));const v={root:"gov-toast",hidden:"gov-toast--hidden",content:"gov-toast__content",icon:"gov-toast__icon",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=r(this.host);this.toastId=d("GovToast")}validateColor(t){a(p,t,v.root)}componentDidLoad(){this.attributeObserver=new h(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 o(i,{key:"9d2e214ed4c883f0ac90eb6d580ed95cb55e42cd",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")&&o("span",{key:"54292ad196806932ab9ae44bfc33187f4154e616",class:v.icon},o("slot",{key:"9545c651a46a7bb55990e9327e8fbe4fe126954f",name:"icon"})),o("div",Object.assign({key:"daed3fcbd83eec05979a9e00e2f983d5c6b1b538",class:v.content},this.inheritedAttributes,{"aria-live":"polite",role:"status"}),o("slot",{key:"d3f78c0d713d56ef32b0dece9553e258f0ef4ef4"})),o("gov-button",{key:"dad799261c83b387c0590fd0ad13bdad584ee6b4",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:o("gov-icon",{name:"x-lg",type:"components"})),o("div",{key:"e13b568ada5e34f00c405d359665cd9d0af5ff89",class:v.timer}))}onCloseHandler(){this.govClose.emit(this.toastId);this.destroy().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};
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-42200001.js";import{T as o,a as n,b as c}from"./p-76d604c6.js";import{c as l}from"./p-ea7fdd2e.js";import{d as a}from"./p-61453dbf.js";import{d as r}from"./p-df29e931.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:"c47f590b5f8dffb0c0f1caa17978075fb64c3603",class:c.root,role:"tooltip",hidden:!this.isVisible,"aria-hidden":!l(this.isVisible),"is-visible":this.isVisible},e("slot",{key:"276690a83ede038b09f5e439495693b7215e4af7"}),this.persist?e("gov-button",{"on-gov-click":this.hideContent.bind(this),color:this.color,size:this.size,type:"base"},e("gov-icon",{slot:"icon-start",name:"x-lg",type:"components"})):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)){a()}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-42200001.js";import{T as o,a as n,b as c}from"./p-76d604c6.js";import{c as a}from"./p-ea7fdd2e.js";import{d as l}from"./p-6a473654.js";import{d as r}from"./p-16e68a91.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:"c47f590b5f8dffb0c0f1caa17978075fb64c3603",class:c.root,role:"tooltip",hidden:!this.isVisible,"aria-hidden":!a(this.isVisible),"is-visible":this.isVisible},e("slot",{key:"276690a83ede038b09f5e439495693b7215e4af7"}),this.persist?e("gov-button",{"on-gov-click":this.hideContent.bind(this),color:this.color,size:this.size,type:"base"},e("gov-icon",{slot:"icon-start",name:"x-lg",type:"components"})):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 m=f;const d=h;export{m as GovTooltipContent,d as defineCustomElement};
2
2
  //# sourceMappingURL=gov-tooltip-content.js.map
@@ -1,2 +1,2 @@
1
- import{p as s,H as t,c as e,h as i,d as a}from"./p-42200001.js";import{v as o}from"./p-d8135701.js";import{W as n,c}from"./p-c61a5830.js";import{c as d}from"./p-cd6c2938.js";import{g as h,b as l,t as r}from"./p-ea7fdd2e.js";import{d as m}from"./p-df29e931.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=e(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 e=this.h.hasSlot("prefix")&&i("span",{key:"82b6be7faa5fdf29249eec96683ca3914a060dd7",class:n.prefix},i("slot",{key:"4aa4139f7ae8fa022c6f93b3f6fe508ee30e881e",name:"prefix"}));return i(a,{key:"70570aa0326bc056bdcada429a04f87b2e106051",class:this.h.classes(n.root),"is-expanded":this.isExpanded,color:this.color,size:this.size,role:"listitem",collapsible:this.collapsible,hydrated:this.hydrated},i("div",{key:"ef0e103ec1535e155c12df999f5b64747c1167c2",class:n.header},e,this.collapsible?i(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()}},i("span",{class:n.headline},i("slot",{name:"headline"}),this.collapsible&&i("gov-icon",{class:n.chevron,name:"chevron-down",type:"components"})),i("slot",{name:"annotation"})):i(t,{class:this.h.classes(n.label)},i("span",{class:n.headline},i("slot",{name:"headline"}),this.collapsible&&i("gov-icon",{class:n.chevron,name:"chevron-down",type:"components"})),i("slot",{name:"annotation"}))),this.collapsible?i("div",{class:n.content,id:this.contentId,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded,"aria-labelledby":s},i("slot",null)):i("div",{class:n.content,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded},i("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 e,h as i,d as a}from"./p-42200001.js";import{v as o}from"./p-d8135701.js";import{W as n,c}from"./p-c61a5830.js";import{c as d}from"./p-cd6c2938.js";import{g as h,b as l,t as r}from"./p-ea7fdd2e.js";import{d as m}from"./p-16e68a91.js";var p;(function(s){s["DIV"]="div";s["BUTTON"]="button"})(p||(p={}));const f=s(class s extends t{constructor(){super();this.__registerHost();this.govChange=e(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?p.BUTTON:p.DIV;const e=this.h.hasSlot("prefix")&&i("span",{key:"82b6be7faa5fdf29249eec96683ca3914a060dd7",class:n.prefix},i("slot",{key:"4aa4139f7ae8fa022c6f93b3f6fe508ee30e881e",name:"prefix"}));return i(a,{key:"70570aa0326bc056bdcada429a04f87b2e106051",class:this.h.classes(n.root),"is-expanded":this.isExpanded,color:this.color,size:this.size,role:"listitem",collapsible:this.collapsible,hydrated:this.hydrated},i("div",{key:"ef0e103ec1535e155c12df999f5b64747c1167c2",class:n.header},e,this.collapsible?i(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()}},i("span",{class:n.headline},i("slot",{name:"headline"}),this.collapsible&&i("gov-icon",{class:n.chevron,name:"chevron-down",type:"components"})),i("slot",{name:"annotation"})):i(t,{class:this.h.classes(n.label)},i("span",{class:n.headline},i("slot",{name:"headline"}),this.collapsible&&i("gov-icon",{class:n.chevron,name:"chevron-down",type:"components"})),i("slot",{name:"annotation"}))),this.collapsible?i("div",{class:n.content,id:this.contentId,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded,"aria-labelledby":s},i("slot",null)):i("div",{class:n.content,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded},i("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,f)}break;case"gov-icon":if(!customElements.get(s)){m()}break}}))}u();const v=f;const b=u;export{v as GovWizardItem,b as defineCustomElement};
2
2
  //# sourceMappingURL=gov-wizard-item.js.map
@@ -0,0 +1,2 @@
1
+ import{p as e,H as s,h as t,d as o}from"./p-42200001.js";const n=e(class e extends s{constructor(){super();this.__registerHost()}render(){return t(o,{key:"84fe45f5f823788977603df4b40469854a23ea1b"},"HELLO")}},[0,"gov-icon"]);function c(){if(typeof customElements==="undefined"){return}const e=["gov-icon"];e.forEach((e=>{switch(e){case"gov-icon":if(!customElements.get(e)){customElements.define(e,n)}break}}))}c();export{n as G,c as d};
2
+ //# sourceMappingURL=p-16e68a91.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GovIcon","proxyCustomElement","H","render","h","Host","key"],"sources":["../../../packages/core/src/components/gov-icon/gov-icon.tsx"],"sourcesContent":["import {Component, h, Host} from \"@stencil/core\"\n\n@Component({\n tag: \"gov-icon\",\n})\nexport class GovIcon {\n render() {\n return (\n <Host>\n HELLO\n </Host>\n )\n }\n}\n"],"mappings":"+DAKaA,EAAOC,EAAA,MAAAD,UAAAE,E,4CAChB,MAAAC,GACI,OACIC,EAACC,EAAI,CAAAC,IAAA,oD","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,c as i,h as s,d as a}from"./p-42200001.js";import{v as o}from"./p-d8135701.js";import{g as c}from"./p-ea7fdd2e.js";import{p as n}from"./p-e0e2e9c1.js";import{S as h}from"./p-92f420cb.js";import{a as d,c as r}from"./p-44a8a668.js";import{c as f}from"./p-cd6c2938.js";import{p as l}from"./p-016bbea6.js";import{i as p,A as b,a as m}from"./p-33d5d1ed.js";import{d as u}from"./p-df29e931.js";const g=n(h,["_XS","_S","_M"]);var v;(function(e){e["SOLID"]="solid";e["OUTLINED"]="outlined"})(v||(v={}));var y;(function(e){e["A"]="a";e["SPAN"]="span";e["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=e(class e extends t{constructor(){super();this.__registerHost();this.govClick=i(this,"gov-click",7);this.hydrated=false;this.disabled=false;this.href=undefined;this.target=undefined;this.iconStart=undefined;this.iconEnd=undefined;this.size=g._M;this.tag="span";this.color=d.PRIMARY;this.type=undefined;this.focusable=true;this.identifier=undefined;this.inheritedAttributes={};this.h=c(this.host);this.chipId=f("GovChip")}validateColor(e){o(d,e,k.root)}validateSize(e){o(r,e,k.root)}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size);this.inheritedAttributes=p(this.host)}componentDidLoad(){this.attributeObserver=new b(this.host,((e,t)=>{this.onAriaAttributeChange(e,t)}));this.attributeObserver.startObserving(m)}disconnectedCallback(){this.attributeObserver.stopObserving()}connectedCallback(){this.hydrated=true}onAriaAttributeChange(e,t){this.host.removeAttribute(e);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[e]:t})}render(){const e=this.href?y.A:this.tag;const t=e==y.BUTTON?y.BUTTON:undefined;const i=l(this.iconStart);const o=l(this.iconEnd);return s(a,{key:"35148b293a6ae608eb1c4e0db06bbfff8b9fdca7",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:e==y.A||e==y.BUTTON,hydrated:this.hydrated},s(e,Object.assign({key:"01ba70f91c8be428f91ca4744d093e408dd5acbe",class:"element",href:this.href,target:this.target,ref:e=>this.triggerRef=e,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:t},this.inheritedAttributes,{"aria-disabled":this.disabled}),s("slot",{key:"28acde76889a8b529dae69b1e55f5f3db51b8e25",name:"left"}),s("slot",{key:"1c8fc171656757933a0bb0568a335ee11c09ce6f",name:"icon-start"},i&&s("gov-icon",{key:"b2e91ec6724f3ad50433c10597c44f50826dfcfe",type:i.type,name:i.name})),s("slot",{key:"0a37763084f9a0b7269efe6cc6ebd71161890861"}),s("slot",{key:"5b37c8b8350ed2ead0a85d81ed0ba22295b3679e",name:"icon-end"},o&&s("gov-icon",{key:"22dfae0ca565fddaa10e6179dc7d0ef38839764f",type:o.type,name:o.name})),s("slot",{key:"fe177d273f38e81cc9ffc686c62e05bd466c1fe8",name:"right"})))}onClickHandler(e){e.stopPropagation();if(this.disabled===false&&this.tag===y.BUTTON){this.govClick.emit(e)}}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],iconStart:[1,"icon-start"],iconEnd:[1,"icon-end"],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 e=["gov-chip","gov-icon"];e.forEach((e=>{switch(e){case"gov-chip":if(!customElements.get(e)){customElements.define(e,j)}break;case"gov-icon":if(!customElements.get(e)){u()}break}}))}C();export{j as G,C as d};
2
- //# sourceMappingURL=p-b642e485.js.map
1
+ import{p as e,H as t,c as i,h as s,d as a}from"./p-42200001.js";import{v as o}from"./p-d8135701.js";import{g as c}from"./p-ea7fdd2e.js";import{p as n}from"./p-e0e2e9c1.js";import{S as h}from"./p-92f420cb.js";import{a as d,c as r}from"./p-44a8a668.js";import{c as f}from"./p-cd6c2938.js";import{p as l}from"./p-016bbea6.js";import{i as p,A as b,a as m}from"./p-33d5d1ed.js";import{d as u}from"./p-16e68a91.js";const g=n(h,["_XS","_S","_M"]);var v;(function(e){e["SOLID"]="solid";e["OUTLINED"]="outlined"})(v||(v={}));var y;(function(e){e["A"]="a";e["SPAN"]="span";e["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=e(class e extends t{constructor(){super();this.__registerHost();this.govClick=i(this,"gov-click",7);this.hydrated=false;this.disabled=false;this.href=undefined;this.target=undefined;this.iconStart=undefined;this.iconEnd=undefined;this.size=g._M;this.tag="span";this.color=d.PRIMARY;this.type=undefined;this.focusable=true;this.identifier=undefined;this.inheritedAttributes={};this.h=c(this.host);this.chipId=f("GovChip")}validateColor(e){o(d,e,k.root)}validateSize(e){o(r,e,k.root)}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size);this.inheritedAttributes=p(this.host)}componentDidLoad(){this.attributeObserver=new b(this.host,((e,t)=>{this.onAriaAttributeChange(e,t)}));this.attributeObserver.startObserving(m)}disconnectedCallback(){this.attributeObserver.stopObserving()}connectedCallback(){this.hydrated=true}onAriaAttributeChange(e,t){this.host.removeAttribute(e);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[e]:t})}render(){const e=this.href?y.A:this.tag;const t=e==y.BUTTON?y.BUTTON:undefined;const i=l(this.iconStart);const o=l(this.iconEnd);return s(a,{key:"35148b293a6ae608eb1c4e0db06bbfff8b9fdca7",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:e==y.A||e==y.BUTTON,hydrated:this.hydrated},s(e,Object.assign({key:"01ba70f91c8be428f91ca4744d093e408dd5acbe",class:"element",href:this.href,target:this.target,ref:e=>this.triggerRef=e,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:t},this.inheritedAttributes,{"aria-disabled":this.disabled}),s("slot",{key:"28acde76889a8b529dae69b1e55f5f3db51b8e25",name:"left"}),s("slot",{key:"1c8fc171656757933a0bb0568a335ee11c09ce6f",name:"icon-start"},i&&s("gov-icon",{key:"b2e91ec6724f3ad50433c10597c44f50826dfcfe",type:i.type,name:i.name})),s("slot",{key:"0a37763084f9a0b7269efe6cc6ebd71161890861"}),s("slot",{key:"5b37c8b8350ed2ead0a85d81ed0ba22295b3679e",name:"icon-end"},o&&s("gov-icon",{key:"22dfae0ca565fddaa10e6179dc7d0ef38839764f",type:o.type,name:o.name})),s("slot",{key:"fe177d273f38e81cc9ffc686c62e05bd466c1fe8",name:"right"})))}onClickHandler(e){e.stopPropagation();if(this.disabled===false&&this.tag===y.BUTTON){this.govClick.emit(e)}}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],iconStart:[1,"icon-start"],iconEnd:[1,"icon-end"],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 e=["gov-chip","gov-icon"];e.forEach((e=>{switch(e){case"gov-chip":if(!customElements.get(e)){customElements.define(e,j)}break;case"gov-icon":if(!customElements.get(e)){u()}break}}))}C();export{j as G,C as d};
2
+ //# sourceMappingURL=p-52fcba77.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,c as i,h as s,d as a}from"./p-42200001.js";import{v as n}from"./p-d8135701.js";import{B as o,a as d,b as h,N as r}from"./p-44a8a668.js";import{g as c,t as l}from"./p-ea7fdd2e.js";import{S as f}from"./p-92f420cb.js";import{a as p}from"./p-454ce5f2.js";import{c as u}from"./p-ceafa242.js";import{d as m}from"./p-e0e2e9c1.js";import{A as b,a as v,i as y}from"./p-33d5d1ed.js";import{d as g}from"./p-df29e931.js";function k(e){if(typeof e==="string"){return["true","True","TRUE","1"].indexOf(e)!==-1}else if(typeof e==="number"){return e>0}else if(typeof e==="boolean"){return e}else{return e?true:false}}var j;(function(e){e["A"]="a";e["BUTTON"]="button"})(j||(j={}));const T=e(class e extends t{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(e){n(d,e,o.root)}validateType(e){n(h,e,o.root)}validateSize(e){n(f,e,o.root)}validateNativeType(e){n(r,e,o.root)}componentDidLoad(){this.attributeObserver=new b(this.host,((e,t)=>{this.onAriaAttributeChange(e,t)}));this.attributeObserver.startObserving(v)}onAriaAttributeChange(e,t){this.host.removeAttribute(e);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[e]:t})}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(u()){await m(500);await this.validateAccessibility()}}connectedCallback(){this.hydrated=true}render(){const e=this.href?j.A:j.BUTTON;const t=e===j.A?undefined:this.nativeType;return s(a,{key:"4e5ef3fbf897b81b07452a9383985353d673fdd6",size:this.size,hydrated:this.hydrated,color:this.color,class:this.h.classes(o.root),type:this.type},s(e,Object.assign({key:"d0689b6c773257059fa9334d4bb1d003a0ec58c3",class:"element",ref:e=>this.triggerRef=e,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:t,tabindex:this.disabled?"-1":"0"},this.inheritedAttributes,{"aria-disabled":l(this.disabled)}),k(this.loading)&&!this.h.hasSlot("icon-end")&&s("gov-icon",{key:"16a969ee29897508924e61d70b40589d0410f649",name:"loader",class:"gov-spin-animation",type:"components"}),this.h.hasSlot("icon-start")&&s("slot",{key:"7d208cc950fedd5b6bbf376152a0c641d8885846",name:"icon-start"}),s("slot",{key:"7c43309c657363dbcc1df14ae3c21d977ec3eb20"}),this.h.hasSlot("icon-end")&&s("slot",{key:"d90b7831900331fe8482757f33847295207f73d2",name:"icon-end"}),k(this.loading)&&this.h.hasSlot("icon-end")&&s("gov-icon",{key:"d23e2000e5bf5b78a81e78d6c3e30aa0e1f3f42c",name:"loader",class:"gov-spin-animation",type:"components"})))}onClickHandler(e){e.stopPropagation();if(this.disabled===false){this.govClick.emit({component:o.root,originalEvent:e,ref:this.host})}}onFocusHandler(e){e.stopPropagation();this.govFocus.emit({component:o.root,originalEvent:e,ref:this.host})}onBlurHandler(e){e.stopPropagation();this.govBlur.emit({component:o.root,originalEvent:e,ref:this.host})}async setFocus(){this.triggerRef.focus()}async getRef(){return this.triggerRef}async validateAccessibility(){if(this.focusable){p(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 e=["gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-button":if(!customElements.get(e)){customElements.define(e,T)}break;case"gov-icon":if(!customElements.get(e)){g()}break}}))}C();export{T as G,C as d};
2
- //# sourceMappingURL=p-61453dbf.js.map
1
+ import{p as e,H as t,c as i,h as s,d as a}from"./p-42200001.js";import{v as n}from"./p-d8135701.js";import{B as o,a as d,b as h,N as r}from"./p-44a8a668.js";import{g as c,t as l}from"./p-ea7fdd2e.js";import{S as f}from"./p-92f420cb.js";import{a as p}from"./p-454ce5f2.js";import{c as u}from"./p-ceafa242.js";import{d as m}from"./p-e0e2e9c1.js";import{A as b,a as v,i as y}from"./p-33d5d1ed.js";import{d as g}from"./p-16e68a91.js";function k(e){if(typeof e==="string"){return["true","True","TRUE","1"].indexOf(e)!==-1}else if(typeof e==="number"){return e>0}else if(typeof e==="boolean"){return e}else{return e?true:false}}var j;(function(e){e["A"]="a";e["BUTTON"]="button"})(j||(j={}));const T=e(class e extends t{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(e){n(d,e,o.root)}validateType(e){n(h,e,o.root)}validateSize(e){n(f,e,o.root)}validateNativeType(e){n(r,e,o.root)}componentDidLoad(){this.attributeObserver=new b(this.host,((e,t)=>{this.onAriaAttributeChange(e,t)}));this.attributeObserver.startObserving(v)}onAriaAttributeChange(e,t){this.host.removeAttribute(e);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[e]:t})}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(u()){await m(500);await this.validateAccessibility()}}connectedCallback(){this.hydrated=true}render(){const e=this.href?j.A:j.BUTTON;const t=e===j.A?undefined:this.nativeType;return s(a,{key:"4e5ef3fbf897b81b07452a9383985353d673fdd6",size:this.size,hydrated:this.hydrated,color:this.color,class:this.h.classes(o.root),type:this.type},s(e,Object.assign({key:"d0689b6c773257059fa9334d4bb1d003a0ec58c3",class:"element",ref:e=>this.triggerRef=e,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:t,tabindex:this.disabled?"-1":"0"},this.inheritedAttributes,{"aria-disabled":l(this.disabled)}),k(this.loading)&&!this.h.hasSlot("icon-end")&&s("gov-icon",{key:"16a969ee29897508924e61d70b40589d0410f649",name:"loader",class:"gov-spin-animation",type:"components"}),this.h.hasSlot("icon-start")&&s("slot",{key:"7d208cc950fedd5b6bbf376152a0c641d8885846",name:"icon-start"}),s("slot",{key:"7c43309c657363dbcc1df14ae3c21d977ec3eb20"}),this.h.hasSlot("icon-end")&&s("slot",{key:"d90b7831900331fe8482757f33847295207f73d2",name:"icon-end"}),k(this.loading)&&this.h.hasSlot("icon-end")&&s("gov-icon",{key:"d23e2000e5bf5b78a81e78d6c3e30aa0e1f3f42c",name:"loader",class:"gov-spin-animation",type:"components"})))}onClickHandler(e){e.stopPropagation();if(this.disabled===false){this.govClick.emit({component:o.root,originalEvent:e,ref:this.host})}}onFocusHandler(e){e.stopPropagation();this.govFocus.emit({component:o.root,originalEvent:e,ref:this.host})}onBlurHandler(e){e.stopPropagation();this.govBlur.emit({component:o.root,originalEvent:e,ref:this.host})}async setFocus(){this.triggerRef.focus()}async getRef(){return this.triggerRef}async validateAccessibility(){if(this.focusable){p(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 e=["gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-button":if(!customElements.get(e)){customElements.define(e,T)}break;case"gov-icon":if(!customElements.get(e)){g()}break}}))}C();export{T as G,C as d};
2
+ //# sourceMappingURL=p-6a473654.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,c as i,h as e,d as n}from"./p-42200001.js";import{g as a,b as h,c as o}from"./p-9908b9f0.js";import{g as c,c as d,t as r,d as l}from"./p-ea7fdd2e.js";import{v as f}from"./p-d8135701.js";import{c as u}from"./p-cd6c2938.js";import{A as p,a as m,i as b}from"./p-33d5d1ed.js";import{d as v}from"./p-61453dbf.js";import{d as g}from"./p-df29e931.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=c(this.host);this.inputId=u("GovInput");this.f=a(this.h)}validateSize(t){f(o,t,h.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("success",d(this.success));this.f.passAttrToControl("disabled",d(this.disabled));this.f.passAttrToControl("invalid",d(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("icon-start")&&!this.multiline&&e("div",{key:"e8be567c923c023bce7d0ebf0cccff592ac15c5a",class:h.icons,onClick:()=>this.inputRef.focus()},e("slot",{key:"4c76013e8a7db99b43e7b8f426f3907d89708b5a",name:"icon-start"})),e(t,Object.assign({key:"22e1714e66085290e7fe984a4672512324143397",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.success||this.invalid||this.h.hasSlot("icon-end")||this.inputType==="password")&&!this.multiline&&e("div",{key:"19ab7fe83fcecde7a506f21611fae64126464b88",class:h.icons,onClick:()=>this.inputRef.focus()},this.success&&!this.multiline&&e("gov-icon",{key:"9dd7b8413b351d957a63f7df09aee8b6e3e0ac53",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&!this.multiline&&e("gov-icon",{key:"06540c7f7cf3c0fbdab8b5a63aba35cf7a78df3a",class:"validation-icon",name:"exclamation-lg",type:"components"}),this.h.hasSlot("icon-end")&&this.inputType!=="password"&&e("slot",{key:"8cb1103f101fa9bd5719f1657ae1a404fc3882f4",name:"icon-end"}),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:"icon-start",name:"eye",type:"components"})):null)),this.h.hasSlot("sufix")&&e("slot",{key:"78308cfef71f34839d86af88df5dadb28c01adf1",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-c024f757.js.map
1
+ import{p as t,H as s,c as i,h as e,d as n}from"./p-42200001.js";import{g as a,b as h,c as o}from"./p-9908b9f0.js";import{g as c,c as d,t as r,d as l}from"./p-ea7fdd2e.js";import{v as f}from"./p-d8135701.js";import{c as u}from"./p-cd6c2938.js";import{A as p,a as m,i as b}from"./p-33d5d1ed.js";import{d as v}from"./p-6a473654.js";import{d as g}from"./p-16e68a91.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=c(this.host);this.inputId=u("GovInput");this.f=a(this.h)}validateSize(t){f(o,t,h.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("success",d(this.success));this.f.passAttrToControl("disabled",d(this.disabled));this.f.passAttrToControl("invalid",d(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("icon-start")&&!this.multiline&&e("div",{key:"e8be567c923c023bce7d0ebf0cccff592ac15c5a",class:h.icons,onClick:()=>this.inputRef.focus()},e("slot",{key:"4c76013e8a7db99b43e7b8f426f3907d89708b5a",name:"icon-start"})),e(t,Object.assign({key:"22e1714e66085290e7fe984a4672512324143397",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.success||this.invalid||this.h.hasSlot("icon-end")||this.inputType==="password")&&!this.multiline&&e("div",{key:"19ab7fe83fcecde7a506f21611fae64126464b88",class:h.icons,onClick:()=>this.inputRef.focus()},this.success&&!this.multiline&&e("gov-icon",{key:"9dd7b8413b351d957a63f7df09aee8b6e3e0ac53",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&!this.multiline&&e("gov-icon",{key:"06540c7f7cf3c0fbdab8b5a63aba35cf7a78df3a",class:"validation-icon",name:"exclamation-lg",type:"components"}),this.h.hasSlot("icon-end")&&this.inputType!=="password"&&e("slot",{key:"8cb1103f101fa9bd5719f1657ae1a404fc3882f4",name:"icon-end"}),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:"icon-start",name:"eye",type:"components"})):null)),this.h.hasSlot("sufix")&&e("slot",{key:"78308cfef71f34839d86af88df5dadb28c01adf1",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-a63665c2.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,c as a,h as s,d as i}from"./p-42200001.js";import{a as c}from"./p-07165d99.js";import{a as o}from"./p-454ce5f2.js";import{c as m}from"./p-ceafa242.js";import{d as n}from"./p-e0e2e9c1.js";import{g as r}from"./p-ea7fdd2e.js";import{d as l}from"./p-61453dbf.js";import{d}from"./p-df29e931.js";const f="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 b=f;const g=e(class e extends t{constructor(){super();this.__registerHost();this.govRemove=a(this,"gov-remove",7);this.accessibleRemoveLabel=undefined;this.accessibleRemoveLabelledBy=undefined;this.h=r(this.host)}async componentDidRender(){if(m()){await n(500);await this.validateAccessibility()}}render(){return s(i,{key:"a8fffc03fb890c1aaae5a1d63240747f5fcb013e",class:this.h.classes(c.root),role:"listitem"},s("div",{key:"0aa555d1c5b3bdf089cf020db1271e40389522f9",class:c.file},s("p",{key:"46014b9e9d9a46fea6f813ef271815be6ab6dfc4",class:c.name},s("slot",{key:"806f9dc2b2ee44248f7fe613e8362d92ed938ba8"}),s("slot",{key:"97d69e72afd5063f41ea7b41e50012893ee5027c",name:"info"})),s("gov-button",{key:"6c40ff9ae6be99cde30fde276db287a3d14dccd1",color:"primary",type:"base",size:"s","aria-label":this.accessibleRemoveLabel,"aria-labelledby":this.accessibleRemoveLabelledBy,"on-gov-click":this.govRemove.emit},s("gov-icon",{key:"24871273b10ca807811acd15dabb49c6a45d76d1",slot:"icon-start",name:"x-lg",type:"components"}))),this.h.hasSlot("message")&&s("div",{key:"7683c6c6bfd1ca4b9660ee56ec190472970d0ac8",class:c.messages},s("slot",{key:"20b46c868809d19f9c67105a4c4774df9688a2c1",name:"message"})))}async validateAccessibility(){o(this.accessibleRemoveLabel,this.accessibleRemoveLabelledBy,c.root,this.host)}get host(){return this}static get style(){return b}},[4,"gov-attachments-item",{accessibleRemoveLabel:[1,"accessible-remove-label"],accessibleRemoveLabelledBy:[1,"accessible-remove-labelledby"],validateAccessibility:[64]}]);function p(){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,g)}break;case"gov-button":if(!customElements.get(e)){l()}break;case"gov-icon":if(!customElements.get(e)){d()}break}}))}p();export{g as G,p as d};
2
- //# sourceMappingURL=p-7007bd16.js.map
1
+ import{p as e,H as t,c as a,h as s,d as i}from"./p-42200001.js";import{a as c}from"./p-07165d99.js";import{a as o}from"./p-454ce5f2.js";import{c as m}from"./p-ceafa242.js";import{d as n}from"./p-e0e2e9c1.js";import{g as r}from"./p-ea7fdd2e.js";import{d as l}from"./p-6a473654.js";import{d}from"./p-16e68a91.js";const f="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 g=f;const p=e(class e extends t{constructor(){super();this.__registerHost();this.govRemove=a(this,"gov-remove",7);this.accessibleRemoveLabel=undefined;this.accessibleRemoveLabelledBy=undefined;this.h=r(this.host)}async componentDidRender(){if(m()){await n(500);await this.validateAccessibility()}}render(){return s(i,{key:"a8fffc03fb890c1aaae5a1d63240747f5fcb013e",class:this.h.classes(c.root),role:"listitem"},s("div",{key:"0aa555d1c5b3bdf089cf020db1271e40389522f9",class:c.file},s("p",{key:"46014b9e9d9a46fea6f813ef271815be6ab6dfc4",class:c.name},s("slot",{key:"806f9dc2b2ee44248f7fe613e8362d92ed938ba8"}),s("slot",{key:"97d69e72afd5063f41ea7b41e50012893ee5027c",name:"info"})),s("gov-button",{key:"6c40ff9ae6be99cde30fde276db287a3d14dccd1",color:"primary",type:"base",size:"s","aria-label":this.accessibleRemoveLabel,"aria-labelledby":this.accessibleRemoveLabelledBy,"on-gov-click":this.govRemove.emit},s("gov-icon",{key:"24871273b10ca807811acd15dabb49c6a45d76d1",slot:"icon-start",name:"x-lg",type:"components"}))),this.h.hasSlot("message")&&s("div",{key:"7683c6c6bfd1ca4b9660ee56ec190472970d0ac8",class:c.messages},s("slot",{key:"20b46c868809d19f9c67105a4c4774df9688a2c1",name:"message"})))}async validateAccessibility(){o(this.accessibleRemoveLabel,this.accessibleRemoveLabelledBy,c.root,this.host)}get host(){return this}static get style(){return g}},[4,"gov-attachments-item",{accessibleRemoveLabel:[1,"accessible-remove-label"],accessibleRemoveLabelledBy:[1,"accessible-remove-labelledby"],validateAccessibility:[64]}]);function b(){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,p)}break;case"gov-button":if(!customElements.get(e)){l()}break;case"gov-icon":if(!customElements.get(e)){d()}break}}))}b();export{p as G,b as d};
2
+ //# sourceMappingURL=p-ab3a34b0.js.map