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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/cjs/gov-form-input.cjs.entry.js +4 -3
  2. package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
  3. package/dist/cjs/gov-icon.cjs.entry.js +1 -1
  4. package/dist/collection/components/gov-form/input/gov-form-input.js +4 -3
  5. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  6. package/dist/components/gov-accordion-item.js +1 -1
  7. package/dist/components/gov-attachments-item.js +1 -1
  8. package/dist/components/gov-breadcrumbs.js +1 -1
  9. package/dist/components/gov-button.js +1 -1
  10. package/dist/components/gov-card.js +1 -1
  11. package/dist/components/gov-chip.js +1 -1
  12. package/dist/components/gov-form-autocomplete.js +1 -1
  13. package/dist/components/gov-form-checkbox.js +1 -1
  14. package/dist/components/gov-form-checkbox.js.map +1 -1
  15. package/dist/components/gov-form-file.js +1 -1
  16. package/dist/components/gov-form-input.js +1 -1
  17. package/dist/components/gov-form-multi-select.js +1 -1
  18. package/dist/components/gov-form-select.js +1 -1
  19. package/dist/components/gov-icon.js +1 -1
  20. package/dist/components/gov-infobar.js +1 -1
  21. package/dist/components/gov-loading.js +1 -1
  22. package/dist/components/gov-modal.js +1 -1
  23. package/dist/components/gov-pagination.js +1 -1
  24. package/dist/components/gov-prompt.js +1 -1
  25. package/dist/components/gov-side-nav-item.js +1 -1
  26. package/dist/components/gov-tabs.js +1 -1
  27. package/dist/components/gov-tag.js +1 -1
  28. package/dist/components/gov-tile.js +1 -1
  29. package/dist/components/gov-toast.js +1 -1
  30. package/dist/components/gov-tooltip-content.js +1 -1
  31. package/dist/components/gov-wizard-item.js +1 -1
  32. package/dist/components/{p-d2a0ad9c.js → p-2dce8f2c.js} +2 -2
  33. package/dist/components/{p-f4086eab.js → p-708dca47.js} +2 -2
  34. package/dist/components/{p-f4086eab.js.map → p-708dca47.js.map} +1 -1
  35. package/dist/components/{p-90ebe1d9.js → p-8977b759.js} +2 -2
  36. package/dist/components/{p-37645839.js → p-aa4122bd.js} +2 -2
  37. package/dist/components/{p-b0aa3804.js → p-bcc76ddd.js} +2 -2
  38. package/dist/components/{p-b0ff29c9.js → p-c2e5e893.js} +2 -2
  39. package/dist/components/{p-280b0104.js → p-f0eb08d6.js} +2 -2
  40. package/dist/core/core.esm.js +1 -1
  41. package/dist/core/{p-c4960938.entry.js → p-7c2fa6df.entry.js} +2 -2
  42. package/dist/core/{p-e102ae1d.entry.js → p-afd40857.entry.js} +2 -2
  43. package/dist/core/{p-e102ae1d.entry.js.map → p-afd40857.entry.js.map} +1 -1
  44. package/dist/esm/gov-form-input.entry.js +4 -3
  45. package/dist/esm/gov-form-input.entry.js.map +1 -1
  46. package/dist/esm/gov-icon.entry.js +1 -1
  47. package/dist/hydrate/index.js +4 -3
  48. package/dist/hydrate/index.mjs +4 -3
  49. package/package.json +1 -1
  50. /package/dist/components/{p-d2a0ad9c.js.map → p-2dce8f2c.js.map} +0 -0
  51. /package/dist/components/{p-90ebe1d9.js.map → p-8977b759.js.map} +0 -0
  52. /package/dist/components/{p-37645839.js.map → p-aa4122bd.js.map} +0 -0
  53. /package/dist/components/{p-b0aa3804.js.map → p-bcc76ddd.js.map} +0 -0
  54. /package/dist/components/{p-b0ff29c9.js.map → p-c2e5e893.js.map} +0 -0
  55. /package/dist/components/{p-280b0104.js.map → p-f0eb08d6.js.map} +0 -0
  56. /package/dist/core/{p-c4960938.entry.js.map → p-7c2fa6df.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["govFormCheckboxCss","GovFormCheckboxStyle0","GovFormCheckbox","proxyCustomElement","H","constructor","this","hydrated","checkboxId","createID","h","govHost","host","f","govForm","validateSize","newValue","validateProp","FormCheckboxSizes","FormCheckboxClass","root","watchControlAttrs","passControlAttrs","passAttrToControl","size","toBoolAttr","disabled","invalid","componentWillLoad","componentDidRender","passAttrToLabel","identifier","String","required","canValidateWcagOnRender","delay","validateWcag","connectedCallback","render","wrapCheckbox","children","noLabel","class","label","Host","checked","toBoolAttrIfDefined","Fragment","id","type","value","name","onClick","onClickHandler","bind","onChange","onChangeHandler","onFocus","onFocusHandler","onBlur","onBlurHandler","ref","el","inputRef","wcagDescribedBy","wcagLabelledBy","check","e","stopPropagation","govFocus","emit","component","originalEvent","govBlur","target","govChange","getRef","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/checkbox/gov-form-checkbox.scss?tag=gov-form-checkbox","../../../packages/core/src/components/gov-form/checkbox/gov-form-checkbox.tsx"],"sourcesContent":["/*\n * Checkbox\n */\n\n@import \"../checkbox/gov-form-checkbox-core.scss\";\n\n$class: \".gov-form-checkbox\";\n\n#{$class} {\n @extend %form-checkbox-core;\n\n input + span {\n &::before {\n border-radius: $border-radius;\n }\n }\n\n &__check {\n position: absolute;\n color: $form-checkbox-check-color;\n opacity: 0;\n transition: $t linear opacity;\n }\n\n &__label {\n position: relative;\n }\n\n // STATES\n input:checked + span::before {\n background: $form-checkbox-indicator-bg;\n }\n\n input:checked + span &__check {\n opacity: 1;\n }\n\n @include parameter(\"invalid\") {\n input:checked + span::before {\n background: $form-state-color-error;\n }\n }\n @include parameter(\"disabled\") {\n input:checked + span::before {\n border-color: $form-state-bg-disabled;\n background-color: $form-state-bg-disabled;\n }\n }\n\n // VARIANTS\n @each $size, $definitions in $form-checkbox-core-sizes {\n &[size=\"#{$size}\"] {\n #{$class} {\n &__check {\n top: calc((get(\"indicator-size\", $definitions) - get(\"check-size\", $definitions)) / 2);\n left: calc((get(\"indicator-size\", $definitions) - get(\"check-size\", $definitions)) / 2);\n width: get(\"check-size\", $definitions);\n height: get(\"check-size\", $definitions);\n }\n }\n }\n }\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormCheckboxClass, FormCheckboxSizes, FormCheckboxSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {validateWcagLabelFor, validateWcagRef} from \"../../../helpers/Validate/wcag\"\nimport {canValidateWcagOnRender} from \"../../../helpers/Dom/win\"\nimport {delay} from \"../../../utils/utils\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport {FormCheckboxEvent} from \"./gov-form-checkbox.types\"\n\n@Component({\n\ttag: \"gov-form-checkbox\",\n\tstyleUrl: \"gov-form-checkbox.scss\",\n})\nexport class GovFormCheckbox {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\n\tprivate readonly checkboxId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.checkboxId = createID(\"GovCheckbox\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormCheckboxElement\n\t/**\n\t * Value of checkbox\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * Checkbox button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the checkbox component disabled.\n\t * This prevents users from being able to interact with the checkbox, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Name of the checkbox.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Checkboxes size.\n\t */\n\t@Prop() readonly size?: FormCheckboxSizesType = \"m\"\n\t/**\n\t * Custom checkbox identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({attribute: \"wcag-described-by\"}) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({attribute: \"wcag-labelled-by\"}) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when the checkbox has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormCheckboxEvent>\n\t/**\n\t * Emitted when the checkbox loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormCheckboxEvent>\n\t/**\n\t * Emitted when the checkbox change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormCheckboxEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormCheckboxSizes, newValue, FormCheckboxClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.f.passAttrToControl(\"type\", \"checkbox\")\n\t\tthis.passControlAttrs()\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.checkboxId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst wrapCheckbox = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn (\n\t\t\t\t\t<label class={FormCheckboxClass.label}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</label>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormCheckboxClass.root} hydrated={this.hydrated} checked={this.checked} size={this.size}\n\t\t\t\t\t\tinvalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapCheckbox(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\taria-checked={toBoolAttr(this.checked)}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\"/>\n\t\t\t\t\t\t\t<gov-icon class={FormCheckboxClass.check} name=\"check-lg\"></gov-icon>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"wcag-described-by\", FormCheckboxClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormCheckboxClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.checkboxId, this.wcagLabelledBy, FormCheckboxClass.root)\n\t}\n}\n"],"mappings":"uaAAA,MAAMA,EAAqB,49PAC3B,MAAAC,EAAeD,E,MCiBFE,EAAeC,EAAA,MAAAD,UAAAE,EAQ3B,WAAAC,G,0IAFQC,KAAAC,SAAW,M,kCAiB6B,M,cAKX,M,cAKA,M,8BAQW,I,uCAQW,M,oFAxC1DD,KAAKE,WAAaC,EAAS,eAE3BH,KAAKI,EAAIC,EAAQL,KAAKM,MACtBN,KAAKO,EAAIC,EAAQR,KAAKI,E,CAgEvB,YAAAK,CAAaC,GACZC,EAAaC,EAAmBF,EAAUG,EAAkBC,K,CAM7D,iBAAAC,GACCf,KAAKgB,kB,CAGE,gBAAAA,GACPhB,KAAKO,EAAEU,kBAAkB,OAAQjB,KAAKkB,MACtClB,KAAKO,EAAEU,kBAAkB,WAAYE,EAAWnB,KAAKoB,WACrDpB,KAAKO,EAAEU,kBAAkB,UAAWE,EAAWnB,KAAKqB,S,CAGrD,iBAAAC,GACCtB,KAAKO,EAAEU,kBAAkB,OAAQ,YACjCjB,KAAKgB,kB,CAGN,wBAAMO,GACLvB,KAAKO,EAAEiB,gBAAgB,aAAcxB,KAAKyB,YAAczB,KAAKE,YAC7DF,KAAKO,EAAEiB,gBAAgB,WAAYE,OAAO1B,KAAK2B,WAC/C,GAAIC,IAA2B,OACxBC,EAAM,WACN7B,KAAK8B,c,EAIb,iBAAAC,GACC/B,KAAKC,SAAW,I,CAGjB,MAAA+B,GACC,MAAMC,EAAgBC,IACrB,GAAIlC,KAAKmC,QAAS,CACjB,OACC/B,EAAA,SAAOgC,MAAOvB,EAAkBwB,OAC9BH,E,CAIJ,OAAOA,CAAQ,EAGhB,OACC9B,EAACkC,EAAI,CAACF,MAAOvB,EAAkBC,KAAMb,SAAUD,KAAKC,SAAUsC,QAASvC,KAAKuC,QAASrB,KAAMlB,KAAKkB,KAC7FG,QAASmB,EAAoBxC,KAAKqB,UACnCY,EACA7B,EAACqC,EAAQ,KACRrC,EAAA,SACCsC,GAAI1C,KAAKyB,YAAczB,KAAKE,WAC5ByC,KAAK,WACLC,MAAO5C,KAAK4C,MACZC,KAAM7C,KAAK6C,KACXN,QAASvC,KAAKuC,QACdO,QAAS9C,KAAK+C,eAAeC,KAAKhD,MAClCiD,SAAUjD,KAAKkD,gBAAgBF,KAAKhD,MACpCmD,QAASnD,KAAKoD,eAAeJ,KAAKhD,MAClCqD,OAAQrD,KAAKsD,cAAcN,KAAKhD,MAChC2B,SAAU3B,KAAK2B,SACfP,SAAUpB,KAAKoB,SACfmC,IAAKC,GAAOxD,KAAKyD,SAAWD,EAAuB,eACrCrC,EAAWnB,KAAKuC,SAAQ,gBACvBC,EAAoBxC,KAAK2B,UAAS,eACnCa,EAAoBxC,KAAKqB,SAAQ,mBAC7BrB,KAAK0D,gBAAe,kBACrB1D,KAAK2D,eAAc,gBACrBnB,EAAoBxC,KAAKoB,YAEzChB,EAAA,YACCA,EAAA,QAAMyC,KAAK,UACXzC,EAAA,YAAUgC,MAAOvB,EAAkB+C,MAAOf,KAAK,gB,CAQ7C,cAAAO,CAAeS,GACtBA,EAAEC,kBACF9D,KAAK+D,SAASC,KAAK,CAClBC,UAAWpD,EAAkBC,KAC7B8B,MAAO5C,KAAK4C,MACZL,QAASvC,KAAKuC,QACd2B,cAAeL,G,CAIT,aAAAP,CAAcO,GACrBA,EAAEC,kBACF9D,KAAKmE,QAAQH,KAAK,CACjBC,UAAWpD,EAAkBC,KAC7B8B,MAAO5C,KAAK4C,MACZL,QAASvC,KAAKuC,QACd2B,cAAeL,G,CAIT,cAAAd,CAAec,GACtBA,EAAEC,iB,CAGK,eAAAZ,CAAgBW,GACvB7D,KAAKuC,QAAWsB,EAAEO,OAA4B7B,QAC9CsB,EAAEC,kBACF9D,KAAKqE,UAAUL,KAAK,CACnBC,UAAWpD,EAAkBC,KAC7B8B,MAAO5C,KAAK4C,MACZL,QAASvC,KAAKuC,QACd2B,cAAeL,G,CAQjB,YAAMS,GACL,OAAOtE,KAAKyD,Q,CAOb,kBAAM3B,GACLyC,EAAgBvE,KAAK0D,gBAAiB,oBAAqB7C,EAAkBC,MAC7EyD,EAAgBvE,KAAK2D,eAAgB,mBAAoB9C,EAAkBC,MAC3E0D,EAAqBxE,KAAKyB,YAAczB,KAAKE,WAAYF,KAAK2D,eAAgB9C,EAAkBC,K","ignoreList":[]}
1
+ {"version":3,"names":["govFormCheckboxCss","GovFormCheckboxStyle0","GovFormCheckbox","proxyCustomElement","H","constructor","this","hydrated","checkboxId","createID","h","govHost","host","f","govForm","validateSize","newValue","validateProp","FormCheckboxSizes","FormCheckboxClass","root","watchControlAttrs","passControlAttrs","passAttrToControl","size","toBoolAttr","disabled","invalid","componentWillLoad","componentDidRender","passAttrToLabel","identifier","String","required","canValidateWcagOnRender","delay","validateWcag","connectedCallback","render","wrapCheckbox","children","noLabel","class","label","Host","checked","toBoolAttrIfDefined","Fragment","id","type","value","name","onClick","onClickHandler","bind","onChange","onChangeHandler","onFocus","onFocusHandler","onBlur","onBlurHandler","ref","el","inputRef","wcagDescribedBy","wcagLabelledBy","check","e","stopPropagation","govFocus","emit","component","originalEvent","govBlur","target","govChange","getRef","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/checkbox/gov-form-checkbox.scss?tag=gov-form-checkbox","../../../packages/core/src/components/gov-form/checkbox/gov-form-checkbox.tsx"],"sourcesContent":["/*\n * Checkbox\n */\n\n@import \"../checkbox/gov-form-checkbox-core.scss\";\n\n$class: \".gov-form-checkbox\";\n\n#{$class} {\n @extend %form-checkbox-core;\n\n input + span {\n &::before {\n border-radius: $border-radius;\n }\n }\n\n &__check {\n position: absolute;\n color: $form-checkbox-check-color;\n opacity: 0;\n transition: $t linear opacity;\n }\n\n &__label {\n position: relative;\n }\n\n // STATES\n input:checked + span::before {\n background: $form-checkbox-indicator-bg;\n }\n\n input:checked + span &__check {\n opacity: 1;\n }\n\n @include parameter(\"invalid\") {\n input:checked + span::before {\n background: $form-state-color-error;\n }\n }\n @include parameter(\"disabled\") {\n input:checked + span::before {\n border-color: $form-state-bg-disabled;\n background-color: $form-state-bg-disabled;\n }\n }\n\n // VARIANTS\n @each $size, $definitions in $form-checkbox-core-sizes {\n &[size=\"#{$size}\"] {\n #{$class} {\n &__check {\n top: calc((get(\"indicator-size\", $definitions) - get(\"check-size\", $definitions)) / 2);\n left: calc((get(\"indicator-size\", $definitions) - get(\"check-size\", $definitions)) / 2);\n width: get(\"check-size\", $definitions);\n height: get(\"check-size\", $definitions);\n }\n }\n }\n }\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormCheckboxClass, FormCheckboxSizes, FormCheckboxSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {validateWcagLabelFor, validateWcagRef} from \"../../../helpers/Validate/wcag\"\nimport {canValidateWcagOnRender} from \"../../../helpers/Dom/win\"\nimport {delay} from \"../../../utils/utils\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport {FormCheckboxEvent} from \"./gov-form-checkbox.types\"\n\n@Component({\n\ttag: \"gov-form-checkbox\",\n\tstyleUrl: \"gov-form-checkbox.scss\",\n})\nexport class GovFormCheckbox {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\n\tprivate readonly checkboxId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.checkboxId = createID(\"GovCheckbox\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormCheckboxElement\n\t/**\n\t * Value of checkbox\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * Checkbox button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the checkbox component disabled.\n\t * This prevents users from being able to interact with the checkbox, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Name of the checkbox.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Checkboxes size.\n\t */\n\t@Prop() readonly size?: FormCheckboxSizesType = \"m\"\n\t/**\n\t * Custom checkbox identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({attribute: \"wcag-described-by\"}) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({attribute: \"wcag-labelled-by\"}) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when the checkbox has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormCheckboxEvent>\n\t/**\n\t * Emitted when the checkbox loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormCheckboxEvent>\n\t/**\n\t * Emitted when the checkbox change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormCheckboxEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormCheckboxSizes, newValue, FormCheckboxClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.f.passAttrToControl(\"type\", \"checkbox\")\n\t\tthis.passControlAttrs()\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.checkboxId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst wrapCheckbox = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn (\n\t\t\t\t\t<label class={FormCheckboxClass.label}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</label>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormCheckboxClass.root} hydrated={this.hydrated} checked={this.checked} size={this.size}\n\t\t\t\t\t\tinvalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapCheckbox(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\taria-checked={toBoolAttr(this.checked)}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\"/>\n\t\t\t\t\t\t\t<gov-icon class={FormCheckboxClass.check} name=\"check-lg\"></gov-icon>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"wcag-described-by\", FormCheckboxClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormCheckboxClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.checkboxId, this.wcagLabelledBy, FormCheckboxClass.root)\n\t}\n}\n"],"mappings":"kaAAA,MAAMA,EAAqB,49PAC3B,MAAAC,EAAeD,E,MCiBFE,EAAeC,EAAA,MAAAD,UAAAE,EAQ3B,WAAAC,G,0IAFQC,KAAAC,SAAW,M,kCAiB6B,M,cAKX,M,cAKA,M,8BAQW,I,uCAQW,M,oFAxC1DD,KAAKE,WAAaC,EAAS,eAE3BH,KAAKI,EAAIC,EAAQL,KAAKM,MACtBN,KAAKO,EAAIC,EAAQR,KAAKI,E,CAgEvB,YAAAK,CAAaC,GACZC,EAAaC,EAAmBF,EAAUG,EAAkBC,K,CAM7D,iBAAAC,GACCf,KAAKgB,kB,CAGE,gBAAAA,GACPhB,KAAKO,EAAEU,kBAAkB,OAAQjB,KAAKkB,MACtClB,KAAKO,EAAEU,kBAAkB,WAAYE,EAAWnB,KAAKoB,WACrDpB,KAAKO,EAAEU,kBAAkB,UAAWE,EAAWnB,KAAKqB,S,CAGrD,iBAAAC,GACCtB,KAAKO,EAAEU,kBAAkB,OAAQ,YACjCjB,KAAKgB,kB,CAGN,wBAAMO,GACLvB,KAAKO,EAAEiB,gBAAgB,aAAcxB,KAAKyB,YAAczB,KAAKE,YAC7DF,KAAKO,EAAEiB,gBAAgB,WAAYE,OAAO1B,KAAK2B,WAC/C,GAAIC,IAA2B,OACxBC,EAAM,WACN7B,KAAK8B,c,EAIb,iBAAAC,GACC/B,KAAKC,SAAW,I,CAGjB,MAAA+B,GACC,MAAMC,EAAgBC,IACrB,GAAIlC,KAAKmC,QAAS,CACjB,OACC/B,EAAA,SAAOgC,MAAOvB,EAAkBwB,OAC9BH,E,CAIJ,OAAOA,CAAQ,EAGhB,OACC9B,EAACkC,EAAI,CAACF,MAAOvB,EAAkBC,KAAMb,SAAUD,KAAKC,SAAUsC,QAASvC,KAAKuC,QAASrB,KAAMlB,KAAKkB,KAC7FG,QAASmB,EAAoBxC,KAAKqB,UACnCY,EACA7B,EAACqC,EAAQ,KACRrC,EAAA,SACCsC,GAAI1C,KAAKyB,YAAczB,KAAKE,WAC5ByC,KAAK,WACLC,MAAO5C,KAAK4C,MACZC,KAAM7C,KAAK6C,KACXN,QAASvC,KAAKuC,QACdO,QAAS9C,KAAK+C,eAAeC,KAAKhD,MAClCiD,SAAUjD,KAAKkD,gBAAgBF,KAAKhD,MACpCmD,QAASnD,KAAKoD,eAAeJ,KAAKhD,MAClCqD,OAAQrD,KAAKsD,cAAcN,KAAKhD,MAChC2B,SAAU3B,KAAK2B,SACfP,SAAUpB,KAAKoB,SACfmC,IAAKC,GAAOxD,KAAKyD,SAAWD,EAAuB,eACrCrC,EAAWnB,KAAKuC,SAAQ,gBACvBC,EAAoBxC,KAAK2B,UAAS,eACnCa,EAAoBxC,KAAKqB,SAAQ,mBAC7BrB,KAAK0D,gBAAe,kBACrB1D,KAAK2D,eAAc,gBACrBnB,EAAoBxC,KAAKoB,YAEzChB,EAAA,YACCA,EAAA,QAAMyC,KAAK,UACXzC,EAAA,YAAUgC,MAAOvB,EAAkB+C,MAAOf,KAAK,gB,CAQ7C,cAAAO,CAAeS,GACtBA,EAAEC,kBACF9D,KAAK+D,SAASC,KAAK,CAClBC,UAAWpD,EAAkBC,KAC7B8B,MAAO5C,KAAK4C,MACZL,QAASvC,KAAKuC,QACd2B,cAAeL,G,CAIT,aAAAP,CAAcO,GACrBA,EAAEC,kBACF9D,KAAKmE,QAAQH,KAAK,CACjBC,UAAWpD,EAAkBC,KAC7B8B,MAAO5C,KAAK4C,MACZL,QAASvC,KAAKuC,QACd2B,cAAeL,G,CAIT,cAAAd,CAAec,GACtBA,EAAEC,iB,CAGK,eAAAZ,CAAgBW,GACvB7D,KAAKuC,QAAWsB,EAAEO,OAA4B7B,QAC9CsB,EAAEC,kBACF9D,KAAKqE,UAAUL,KAAK,CACnBC,UAAWpD,EAAkBC,KAC7B8B,MAAO5C,KAAK4C,MACZL,QAASvC,KAAKuC,QACd2B,cAAeL,G,CAQjB,YAAMS,GACL,OAAOtE,KAAKyD,Q,CAOb,kBAAM3B,GACLyC,EAAgBvE,KAAK0D,gBAAiB,oBAAqB7C,EAAkBC,MAC7EyD,EAAgBvE,KAAK2D,eAAgB,mBAAoB9C,EAAkBC,MAC3E0D,EAAqBxE,KAAKyB,YAAczB,KAAKE,WAAYF,KAAK2D,eAAgB9C,EAAkBC,K","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as e,H as o,c as i,h as a,d as l}from"./p-d6759ac3.js";import{c as t}from"./p-95d41a3b.js";import{g as r,a as s,t as f}from"./p-d687df8f.js";import{b as n,c as d}from"./p-6b0471a8.js";import{c as m}from"./p-e618f1cb.js";import{d as g}from"./p-e0e2e9c1.js";import{g as v}from"./p-77a6e3be.js";import{d as c}from"./p-8df7c635.js";import{d as h}from"./p-b0aa3804.js";import{d as _}from"./p-90ebe1d9.js";import{d as b}from"./p-4489a1da.js";import{d as p}from"./p-d2a0ad9c.js";const u={root:"gov-form-file",area:"gov-form-file__area",label:"gov-form-file__label",input:"gov-form-file__input",list:"gov-form-file__list",item:"gov-form-file__item",attachments:"gov-form-file__attachments"};function x(e){const o=["bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let i=0,a=parseInt(e,10)||0;while(a>=1024&&++i){a=a/1024}return a.toFixed(a<10&&i>0?1:0)+" "+o[i]}function y(e,o){if(typeof o==="string"&&o.length){return o.replace(/\s/g,"").split(",").filter((o=>new RegExp(o.replace("*",".*")).test(e.type))).length>0}else{return true}}function w(e,o){const i=Math.round(e.size);return i<=o}const k='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-form-file{position:relative;display:block;width:100%}.gov-form-file__label .gov-form-label__label>*:last-child{margin-bottom:0}.gov-form-file__input{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0.0001;cursor:pointer}.gov-form-file__attachments{margin-top:1rem 0rem 0rem}.gov-form-file__item{display:flex;gap:1rem;align-items:center}.gov-form-file[disabled=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[disabled=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[disabled="1"] .gov-form-file__label .gov-form-label__label{pointer-events:none}.gov-form-file[disabled=""] .gov-form-file__label .gov-form-label__label *,.gov-form-file[disabled=true i] .gov-form-file__label .gov-form-label__label *,.gov-form-file[disabled="1"] .gov-form-file__label .gov-form-label__label *{color:var(--gov-form-file-disabled-color, var(--gov-color-secondary-600))}.gov-form-file[expanded=""] .gov-form-file__area,.gov-form-file[expanded=true i] .gov-form-file__area,.gov-form-file[expanded="1"] .gov-form-file__area{position:relative;width:100%;padding:2rem 1.375rem 1.375rem;border:var(--gov-form-file-border, 0.0625rem dashed var(--gov-color-secondary-500));text-align:center;transition:background-color 150ms ease-in-out;will-change:background-color}.gov-form-file[expanded=""] .gov-form-file__area.highlight,.gov-form-file[expanded=true i] .gov-form-file__area.highlight,.gov-form-file[expanded="1"] .gov-form-file__area.highlight{background-color:var(--gov-color-primary-200)}.gov-form-file[expanded=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"] .gov-form-file__label .gov-form-label__label{width:100%;padding:1.375rem;border:var(--gov-form-file-border, 0.0625rem dashed var(--gov-color-secondary-500));text-align:center}.gov-form-file[expanded=""] .gov-form-file__attachments,.gov-form-file[expanded=true i] .gov-form-file__attachments,.gov-form-file[expanded="1"] .gov-form-file__attachments{margin:1.5rem 0rem 0rem}.gov-form-file[expanded=""][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=""][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=""][invalid="1"] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid="1"] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid="1"] .gov-form-file__label .gov-form-label__label{border-color:var(--gov-form-state-color-error, var(--gov-color-error))}.gov-form-file[expanded=""][invalid=""] .gov-form-file__area,.gov-form-file[expanded=""][invalid=true i] .gov-form-file__area,.gov-form-file[expanded=""][invalid="1"] .gov-form-file__area,.gov-form-file[expanded=true i][invalid=""] .gov-form-file__area,.gov-form-file[expanded=true i][invalid=true i] .gov-form-file__area,.gov-form-file[expanded=true i][invalid="1"] .gov-form-file__area,.gov-form-file[expanded="1"][invalid=""] .gov-form-file__area,.gov-form-file[expanded="1"][invalid=true i] .gov-form-file__area,.gov-form-file[expanded="1"][invalid="1"] .gov-form-file__area{border-color:var(--gov-form-state-color-error, var(--gov-color-error))}.gov-form-file[expanded=""][disabled=""] .gov-form-file__area,.gov-form-file[expanded=""][disabled=true i] .gov-form-file__area,.gov-form-file[expanded=""][disabled="1"] .gov-form-file__area,.gov-form-file[expanded=true i][disabled=""] .gov-form-file__area,.gov-form-file[expanded=true i][disabled=true i] .gov-form-file__area,.gov-form-file[expanded=true i][disabled="1"] .gov-form-file__area,.gov-form-file[expanded="1"][disabled=""] .gov-form-file__area,.gov-form-file[expanded="1"][disabled=true i] .gov-form-file__area,.gov-form-file[expanded="1"][disabled="1"] .gov-form-file__area{pointer-events:none;color:var(--gov-form-file-disabled-color, var(--gov-color-secondary-600))}@media (min-width: 30em){.gov-form-file[expanded=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"] .gov-form-file__label .gov-form-label__label{padding:2rem}}';const E=k;const A=e(class e extends o{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govFiles=i(this,"gov-files",7);this.govAddFile=i(this,"gov-add-file",7);this.govRemoveFile=i(this,"gov-remove-file",7);this.expanded=false;this.required=false;this.disabled=false;this.resetAfterPick=true;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.attachmentsLabel="Přílohy";this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagRemoveLabel="Odebrat soubor {FILE_NAME}";this.wcagAttachmentsLabel="Přílohy";this.files=[];this.fileId=t("GovInputFile");this.h=r(this.host);this.f=v(this.h)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("invalid",s(this.invalid));this.f.passAttrToControl("disabled",s(this.disabled))}registerListeners(){function e(){this.areaRef.classList.add("highlight")}function o(){this.areaRef.classList.remove("highlight")}this.inputRef.addEventListener("change",(e=>{e.preventDefault();e.stopPropagation();const o=e.target.files;if(this.resetAfterPick){if(o.length){this.validateFiles(o)}}else{this.validateFiles(o)}}),false);if(this.expanded){const i=["dragover","dragleave"];const a=["dragenter","dragover","mouseenter"];const l=["dragleave","drop","mouseleave"];i.map((e=>this.inputRef.addEventListener(e,this.preventDefaults.bind(this),false)));a.map((o=>this.inputRef.addEventListener(o,e.bind(this),false)));l.forEach((e=>this.inputRef.addEventListener(e,o.bind(this),false)));this.areaRef.addEventListener("drop",this.handleDrop.bind(this),false)}}preventDefaults(e){e.preventDefault();e.stopPropagation()}handleDrop(e){const o=e.dataTransfer;this.validateFiles(o.files)}validateFiles(e){let o=[];Array.from(e).map((e=>{const i=this.files.find((o=>o.file.name===e.name&&o.file.size===e.size))||null;if(i===null||this.ignoreFileDuplicationCheck){const i=typeof this.maxFileSize==="number"&&this.maxFileSize>0?w(e,this.maxFileSize):true;const a=y(e,this.accept);const l={id:t("GovFormFile"),file:e,acceptValid:a,sizeValid:i};if(this.displayAttachments){this.files=[...this.files,l]}else{o=[...o,l]}this.govAddFile.emit({component:u.root,file:l})}}));this.govFiles.emit({component:u.root,files:o.length?o:this.files});if(this.resetAfterPick){this.reset().finally()}}componentWillLoad(){this.f.passAttrToLabel("required",String(this.required));this.f.passAttrToControl("type","File");this.passControlAttrs()}async componentDidRender(){if(m()){await g(500);await this.validateWcag()}this.registerListeners()}render(){return a(l,{key:"f8ab9ecfba8ade897c1ba9d343259fd77fe74f68",class:this.h.classes([u.root]),invalid:f(this.invalid),expanded:f(this.expanded)},a("div",{key:"9b1051cb9163af7ceaf42462a2d040a04e3e2088",class:u.area,ref:e=>this.areaRef=e},a("slot",{key:"cf789459997322558f3a27eeaacaab2e11757aed"}),a("input",{key:"82d86f00eecd47a10b9540cc0671303d443b536b",class:u.input,ref:e=>this.inputRef=e,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,"aria-required":f(this.required),"aria-invalid":f(this.invalid),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-disabled":f(this.disabled)})),this.h.hasSlot("attachments")?a("div",{class:u.attachments},a("slot",{name:"attachments"})):null,this.files.length&&this.displayAttachments?a("div",{class:u.attachments},a("gov-attachments",{label:this.wcagAttachmentsLabel,"wcag-label":this.wcagAttachmentsLabel},this.files.map((e=>a("gov-attachments-item",{"wcag-remove-labelled-by":e.id,"on-gov-remove":()=>this.onRemoveFileHandler(e)},a("span",{class:"sr-only",id:e.id},this.wcagRemoveLabel.replace("{FILE_NAME}",e.file.name)),e.file.name,e.acceptValid===false?a("gov-form-message",{slot:"message",variant:"error"},a("gov-icon",{slot:"icon",name:"exclamation-triangle-fill"}),e.acceptValid===false?this.errorAccept:null):null,e.sizeValid===false?a("gov-form-message",{slot:"message",variant:"error"},a("gov-icon",{slot:"icon",name:"exclamation-triangle-fill"}),this.errorSize.replace("{FILE_SIZE}",x(this.maxFileSize))):null,a("span",{slot:"info"},"(",x(e.file.size),")")))))):null)}onRemoveFileHandler(e){const o=this.files.findIndex((o=>o.id===e.id));if(o!==-1){const e=this.files;const i=this.files[o];e.splice(o,1);this.files=[...e];this.govRemoveFile.emit({component:u.root,file:i});this.govFiles.emit({component:u.root,files:e})}}onFocusHandler(e){e.stopPropagation();this.govFocus.emit({component:u.root,originalEvent:e})}onBlurHandler(e){e.stopPropagation();this.govBlur.emit({component:u.root,originalEvent:e})}onChangeHandler(e){e.stopPropagation()}async getRef(){return this.inputRef}async getAreaRef(){return this.areaRef}async reset(){this.files=[];this.inputRef.value=""}async validateWcag(){n(this.wcagDescribedBy,"wcag-described-by",u.root);n(this.wcagLabelledBy,"wcag-labelled-by",u.root);d(this.identifier||this.fileId,this.wcagLabelledBy,u.root)}get host(){return this}static get watchers(){return{disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}static get style(){return E}},[4,"gov-form-file",{expanded:[4],required:[4],disabled:[4],resetAfterPick:[4,"reset-after-pick"],ignoreFileDuplicationCheck:[4,"ignore-file-duplication-check"],displayAttachments:[4,"display-attachments"],name:[1],accept:[1],multiple:[4],maxFileSize:[2,"max-file-size"],identifier:[1],invalid:[4],errorSize:[1,"error-size"],errorAccept:[1,"error-accept"],attachmentsLabel:[1,"attachments-label"],wcagDescribedBy:[1,"wcag-described-by"],wcagLabelledBy:[1,"wcag-labelled-by"],wcagRemoveLabel:[1,"wcag-remove-label"],wcagAttachmentsLabel:[1,"wcag-attachments-label"],files:[32],getRef:[64],getAreaRef:[64],reset:[64],validateWcag:[64]},undefined,{disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}]);function F(){if(typeof customElements==="undefined"){return}const e=["gov-form-file","gov-attachments","gov-attachments-item","gov-button","gov-form-message","gov-icon"];e.forEach((e=>{switch(e){case"gov-form-file":if(!customElements.get(e)){customElements.define(e,A)}break;case"gov-attachments":if(!customElements.get(e)){c()}break;case"gov-attachments-item":if(!customElements.get(e)){h()}break;case"gov-button":if(!customElements.get(e)){_()}break;case"gov-form-message":if(!customElements.get(e)){b()}break;case"gov-icon":if(!customElements.get(e)){p()}break}}))}F();const j=A;const B=F;export{j as GovFormFile,B as defineCustomElement};
1
+ import{p as e,H as o,c as i,h as a,d as l}from"./p-d6759ac3.js";import{c as t}from"./p-95d41a3b.js";import{g as r,a as s,t as f}from"./p-d687df8f.js";import{b as n,c as d}from"./p-6b0471a8.js";import{c as m}from"./p-e618f1cb.js";import{d as g}from"./p-e0e2e9c1.js";import{g as v}from"./p-77a6e3be.js";import{d as c}from"./p-8df7c635.js";import{d as h}from"./p-bcc76ddd.js";import{d as _}from"./p-8977b759.js";import{d as b}from"./p-4489a1da.js";import{d as p}from"./p-2dce8f2c.js";const u={root:"gov-form-file",area:"gov-form-file__area",label:"gov-form-file__label",input:"gov-form-file__input",list:"gov-form-file__list",item:"gov-form-file__item",attachments:"gov-form-file__attachments"};function x(e){const o=["bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let i=0,a=parseInt(e,10)||0;while(a>=1024&&++i){a=a/1024}return a.toFixed(a<10&&i>0?1:0)+" "+o[i]}function y(e,o){if(typeof o==="string"&&o.length){return o.replace(/\s/g,"").split(",").filter((o=>new RegExp(o.replace("*",".*")).test(e.type))).length>0}else{return true}}function w(e,o){const i=Math.round(e.size);return i<=o}const k='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-form-file{position:relative;display:block;width:100%}.gov-form-file__label .gov-form-label__label>*:last-child{margin-bottom:0}.gov-form-file__input{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0.0001;cursor:pointer}.gov-form-file__attachments{margin-top:1rem 0rem 0rem}.gov-form-file__item{display:flex;gap:1rem;align-items:center}.gov-form-file[disabled=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[disabled=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[disabled="1"] .gov-form-file__label .gov-form-label__label{pointer-events:none}.gov-form-file[disabled=""] .gov-form-file__label .gov-form-label__label *,.gov-form-file[disabled=true i] .gov-form-file__label .gov-form-label__label *,.gov-form-file[disabled="1"] .gov-form-file__label .gov-form-label__label *{color:var(--gov-form-file-disabled-color, var(--gov-color-secondary-600))}.gov-form-file[expanded=""] .gov-form-file__area,.gov-form-file[expanded=true i] .gov-form-file__area,.gov-form-file[expanded="1"] .gov-form-file__area{position:relative;width:100%;padding:2rem 1.375rem 1.375rem;border:var(--gov-form-file-border, 0.0625rem dashed var(--gov-color-secondary-500));text-align:center;transition:background-color 150ms ease-in-out;will-change:background-color}.gov-form-file[expanded=""] .gov-form-file__area.highlight,.gov-form-file[expanded=true i] .gov-form-file__area.highlight,.gov-form-file[expanded="1"] .gov-form-file__area.highlight{background-color:var(--gov-color-primary-200)}.gov-form-file[expanded=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"] .gov-form-file__label .gov-form-label__label{width:100%;padding:1.375rem;border:var(--gov-form-file-border, 0.0625rem dashed var(--gov-color-secondary-500));text-align:center}.gov-form-file[expanded=""] .gov-form-file__attachments,.gov-form-file[expanded=true i] .gov-form-file__attachments,.gov-form-file[expanded="1"] .gov-form-file__attachments{margin:1.5rem 0rem 0rem}.gov-form-file[expanded=""][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=""][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=""][invalid="1"] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid="1"] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid="1"] .gov-form-file__label .gov-form-label__label{border-color:var(--gov-form-state-color-error, var(--gov-color-error))}.gov-form-file[expanded=""][invalid=""] .gov-form-file__area,.gov-form-file[expanded=""][invalid=true i] .gov-form-file__area,.gov-form-file[expanded=""][invalid="1"] .gov-form-file__area,.gov-form-file[expanded=true i][invalid=""] .gov-form-file__area,.gov-form-file[expanded=true i][invalid=true i] .gov-form-file__area,.gov-form-file[expanded=true i][invalid="1"] .gov-form-file__area,.gov-form-file[expanded="1"][invalid=""] .gov-form-file__area,.gov-form-file[expanded="1"][invalid=true i] .gov-form-file__area,.gov-form-file[expanded="1"][invalid="1"] .gov-form-file__area{border-color:var(--gov-form-state-color-error, var(--gov-color-error))}.gov-form-file[expanded=""][disabled=""] .gov-form-file__area,.gov-form-file[expanded=""][disabled=true i] .gov-form-file__area,.gov-form-file[expanded=""][disabled="1"] .gov-form-file__area,.gov-form-file[expanded=true i][disabled=""] .gov-form-file__area,.gov-form-file[expanded=true i][disabled=true i] .gov-form-file__area,.gov-form-file[expanded=true i][disabled="1"] .gov-form-file__area,.gov-form-file[expanded="1"][disabled=""] .gov-form-file__area,.gov-form-file[expanded="1"][disabled=true i] .gov-form-file__area,.gov-form-file[expanded="1"][disabled="1"] .gov-form-file__area{pointer-events:none;color:var(--gov-form-file-disabled-color, var(--gov-color-secondary-600))}@media (min-width: 30em){.gov-form-file[expanded=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"] .gov-form-file__label .gov-form-label__label{padding:2rem}}';const E=k;const A=e(class e extends o{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govFiles=i(this,"gov-files",7);this.govAddFile=i(this,"gov-add-file",7);this.govRemoveFile=i(this,"gov-remove-file",7);this.expanded=false;this.required=false;this.disabled=false;this.resetAfterPick=true;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.attachmentsLabel="Přílohy";this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagRemoveLabel="Odebrat soubor {FILE_NAME}";this.wcagAttachmentsLabel="Přílohy";this.files=[];this.fileId=t("GovInputFile");this.h=r(this.host);this.f=v(this.h)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("invalid",s(this.invalid));this.f.passAttrToControl("disabled",s(this.disabled))}registerListeners(){function e(){this.areaRef.classList.add("highlight")}function o(){this.areaRef.classList.remove("highlight")}this.inputRef.addEventListener("change",(e=>{e.preventDefault();e.stopPropagation();const o=e.target.files;if(this.resetAfterPick){if(o.length){this.validateFiles(o)}}else{this.validateFiles(o)}}),false);if(this.expanded){const i=["dragover","dragleave"];const a=["dragenter","dragover","mouseenter"];const l=["dragleave","drop","mouseleave"];i.map((e=>this.inputRef.addEventListener(e,this.preventDefaults.bind(this),false)));a.map((o=>this.inputRef.addEventListener(o,e.bind(this),false)));l.forEach((e=>this.inputRef.addEventListener(e,o.bind(this),false)));this.areaRef.addEventListener("drop",this.handleDrop.bind(this),false)}}preventDefaults(e){e.preventDefault();e.stopPropagation()}handleDrop(e){const o=e.dataTransfer;this.validateFiles(o.files)}validateFiles(e){let o=[];Array.from(e).map((e=>{const i=this.files.find((o=>o.file.name===e.name&&o.file.size===e.size))||null;if(i===null||this.ignoreFileDuplicationCheck){const i=typeof this.maxFileSize==="number"&&this.maxFileSize>0?w(e,this.maxFileSize):true;const a=y(e,this.accept);const l={id:t("GovFormFile"),file:e,acceptValid:a,sizeValid:i};if(this.displayAttachments){this.files=[...this.files,l]}else{o=[...o,l]}this.govAddFile.emit({component:u.root,file:l})}}));this.govFiles.emit({component:u.root,files:o.length?o:this.files});if(this.resetAfterPick){this.reset().finally()}}componentWillLoad(){this.f.passAttrToLabel("required",String(this.required));this.f.passAttrToControl("type","File");this.passControlAttrs()}async componentDidRender(){if(m()){await g(500);await this.validateWcag()}this.registerListeners()}render(){return a(l,{key:"f8ab9ecfba8ade897c1ba9d343259fd77fe74f68",class:this.h.classes([u.root]),invalid:f(this.invalid),expanded:f(this.expanded)},a("div",{key:"9b1051cb9163af7ceaf42462a2d040a04e3e2088",class:u.area,ref:e=>this.areaRef=e},a("slot",{key:"cf789459997322558f3a27eeaacaab2e11757aed"}),a("input",{key:"82d86f00eecd47a10b9540cc0671303d443b536b",class:u.input,ref:e=>this.inputRef=e,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,"aria-required":f(this.required),"aria-invalid":f(this.invalid),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-disabled":f(this.disabled)})),this.h.hasSlot("attachments")?a("div",{class:u.attachments},a("slot",{name:"attachments"})):null,this.files.length&&this.displayAttachments?a("div",{class:u.attachments},a("gov-attachments",{label:this.wcagAttachmentsLabel,"wcag-label":this.wcagAttachmentsLabel},this.files.map((e=>a("gov-attachments-item",{"wcag-remove-labelled-by":e.id,"on-gov-remove":()=>this.onRemoveFileHandler(e)},a("span",{class:"sr-only",id:e.id},this.wcagRemoveLabel.replace("{FILE_NAME}",e.file.name)),e.file.name,e.acceptValid===false?a("gov-form-message",{slot:"message",variant:"error"},a("gov-icon",{slot:"icon",name:"exclamation-triangle-fill"}),e.acceptValid===false?this.errorAccept:null):null,e.sizeValid===false?a("gov-form-message",{slot:"message",variant:"error"},a("gov-icon",{slot:"icon",name:"exclamation-triangle-fill"}),this.errorSize.replace("{FILE_SIZE}",x(this.maxFileSize))):null,a("span",{slot:"info"},"(",x(e.file.size),")")))))):null)}onRemoveFileHandler(e){const o=this.files.findIndex((o=>o.id===e.id));if(o!==-1){const e=this.files;const i=this.files[o];e.splice(o,1);this.files=[...e];this.govRemoveFile.emit({component:u.root,file:i});this.govFiles.emit({component:u.root,files:e})}}onFocusHandler(e){e.stopPropagation();this.govFocus.emit({component:u.root,originalEvent:e})}onBlurHandler(e){e.stopPropagation();this.govBlur.emit({component:u.root,originalEvent:e})}onChangeHandler(e){e.stopPropagation()}async getRef(){return this.inputRef}async getAreaRef(){return this.areaRef}async reset(){this.files=[];this.inputRef.value=""}async validateWcag(){n(this.wcagDescribedBy,"wcag-described-by",u.root);n(this.wcagLabelledBy,"wcag-labelled-by",u.root);d(this.identifier||this.fileId,this.wcagLabelledBy,u.root)}get host(){return this}static get watchers(){return{disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}static get style(){return E}},[4,"gov-form-file",{expanded:[4],required:[4],disabled:[4],resetAfterPick:[4,"reset-after-pick"],ignoreFileDuplicationCheck:[4,"ignore-file-duplication-check"],displayAttachments:[4,"display-attachments"],name:[1],accept:[1],multiple:[4],maxFileSize:[2,"max-file-size"],identifier:[1],invalid:[4],errorSize:[1,"error-size"],errorAccept:[1,"error-accept"],attachmentsLabel:[1,"attachments-label"],wcagDescribedBy:[1,"wcag-described-by"],wcagLabelledBy:[1,"wcag-labelled-by"],wcagRemoveLabel:[1,"wcag-remove-label"],wcagAttachmentsLabel:[1,"wcag-attachments-label"],files:[32],getRef:[64],getAreaRef:[64],reset:[64],validateWcag:[64]},undefined,{disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}]);function F(){if(typeof customElements==="undefined"){return}const e=["gov-form-file","gov-attachments","gov-attachments-item","gov-button","gov-form-message","gov-icon"];e.forEach((e=>{switch(e){case"gov-form-file":if(!customElements.get(e)){customElements.define(e,A)}break;case"gov-attachments":if(!customElements.get(e)){c()}break;case"gov-attachments-item":if(!customElements.get(e)){h()}break;case"gov-button":if(!customElements.get(e)){_()}break;case"gov-form-message":if(!customElements.get(e)){b()}break;case"gov-icon":if(!customElements.get(e)){p()}break}}))}F();const j=A;const B=F;export{j as GovFormFile,B as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-file.js.map
@@ -1,2 +1,2 @@
1
- import{G as o,d as s}from"./p-f4086eab.js";const t=o;const a=s;export{t as GovFormInput,a as defineCustomElement};
1
+ import{G as o,d as s}from"./p-708dca47.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 e,H as t,c as i,h as o,d as r}from"./p-d6759ac3.js";import{g as s,j as l,k as c,l as n}from"./p-77a6e3be.js";import{g as a,a as m,t as g}from"./p-d687df8f.js";import{c as v}from"./p-e618f1cb.js";import{v as u}from"./p-344c72d7.js";import{b as f,c as d}from"./p-6b0471a8.js";import{c as h,r as p}from"./p-95d41a3b.js";import{d as z}from"./p-e0e2e9c1.js";import{p as b}from"./p-3f704a40.js";import{t as x}from"./p-240c302e.js";import{d as w}from"./p-90ebe1d9.js";import{d as y}from"./p-280b0104.js";import{d as k}from"./p-f4086eab.js";import{d as _}from"./p-d2a0ad9c.js";const j='.gov-form-multi-select__list{margin:0;padding:0}.gov-form-multi-select__list>.gov-form-multi-select__item{margin:0;padding:0;background:none}.gov-form-multi-select__list>.gov-form-multi-select__item::before{display:none}.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-form-multi-select{position:relative;display:flex;width:100%;align-items:center}.gov-form-multi-select .element{position:relative;display:flex;flex:1 1 auto}.gov-form-multi-select input,.gov-form-multi-select select,.gov-form-multi-select textarea{width:100%;border-radius:var(--gov-border-radius, 0.1875rem);background-color:var(--gov-form-bg-color, var(--gov-color-neutral-white));font-family:var(--gov-font-family, "Roboto", sans-serif)}.gov-form-multi-select input:focus,.gov-form-multi-select select:focus,.gov-form-multi-select textarea:focus{outline:none}.gov-form-multi-select input:focus-visible,.gov-form-multi-select select:focus-visible,.gov-form-multi-select textarea:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-form-multi-select input::-moz-placeholder,.gov-form-multi-select select::-moz-placeholder,.gov-form-multi-select textarea::-moz-placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-multi-select input::placeholder,.gov-form-multi-select select::placeholder,.gov-form-multi-select textarea::placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-multi-select textarea{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);padding:0.5rem 0.75rem;resize:none}.gov-form-multi-select *[slot=left-icon],.gov-form-multi-select *[slot=right-icon]{position:absolute;top:50%;display:flex;justify-content:center;transform:translateY(-50%);pointer-events:none}.gov-form-multi-select *[slot=left-icon]{left:0}.gov-form-multi-select *[slot=right-icon]{right:0}.gov-form-multi-select *[slot=prefix],.gov-form-multi-select *[slot=sufix]{margin:0}[size=s].gov-form-multi-select{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);gap:0.5rem var(--gov-form-input-core-s-icon-size, 1rem)}[size=s].gov-form-multi-select input,[size=s].gov-form-multi-select select{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);height:var(--gov-form-input-core-s-height, 2rem);padding:var(--gov-form-input-core-s-padding, 0.25rem 0.75rem)}[size=s].gov-form-multi-select *[slot=left-icon],[size=s].gov-form-multi-select *[slot=right-icon]{width:var(--gov-form-input-core-s-icon-size, 1rem);height:var(--gov-form-input-core-s-icon-size, 1rem)}[size=s].gov-form-multi-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2)}[size=s].gov-form-multi-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=s].gov-form-multi-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2)}[size=s].gov-form-multi-select *[slot=right-icon]~input,[size=s].gov-form-multi-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=m].gov-form-multi-select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);gap:0.5rem var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-multi-select input,[size=m].gov-form-multi-select select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);height:var(--gov-form-input-core-m-height, 2.5rem);padding:var(--gov-form-input-core-m-padding, 0.4375rem 0.75rem)}[size=m].gov-form-multi-select *[slot=left-icon],[size=m].gov-form-multi-select *[slot=right-icon]{width:var(--gov-form-input-core-m-icon-size, 1rem);height:var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-multi-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-multi-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=m].gov-form-multi-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-multi-select *[slot=right-icon]~input,[size=m].gov-form-multi-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=l].gov-form-multi-select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);gap:0.5rem var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-multi-select input,[size=l].gov-form-multi-select select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);height:var(--gov-form-input-core-l-height, 3rem);padding:var(--gov-form-input-core-l-padding, 0.6875rem 0.75rem)}[size=l].gov-form-multi-select *[slot=left-icon],[size=l].gov-form-multi-select *[slot=right-icon]{width:var(--gov-form-input-core-l-icon-size, 1rem);height:var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-multi-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-multi-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=l].gov-form-multi-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-multi-select *[slot=right-icon]~input,[size=l].gov-form-multi-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=xl].gov-form-multi-select{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing);gap:0.5rem var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-multi-select input,[size=xl].gov-form-multi-select select{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing);height:var(--gov-form-input-core-xl-height, 3.5rem);padding:var(--gov-form-input-core-xl-padding, 0.9375rem 1rem 0.875rem)}[size=xl].gov-form-multi-select *[slot=left-icon],[size=xl].gov-form-multi-select *[slot=right-icon]{width:var(--gov-form-input-core-xl-icon-size, 1.25rem);height:var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-multi-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-multi-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-xl-icon-padding, 3rem)}[size=xl].gov-form-multi-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-multi-select *[slot=right-icon]~input,[size=xl].gov-form-multi-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-xl-icon-padding, 3rem)}[variant=primary].gov-form-multi-select input,[variant=primary].gov-form-multi-select select,[variant=primary].gov-form-multi-select textarea{color:var(--gov-form-input-color-primary, var(--gov-color-secondary-700));border:var(--gov-form-input-border-primary, 0.0625rem solid var(--gov-color-primary-600))}[variant=primary].gov-form-multi-select *[slot=left-icon],[variant=primary].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-primary, var(--gov-color-primary))}[variant=secondary].gov-form-multi-select input,[variant=secondary].gov-form-multi-select select,[variant=secondary].gov-form-multi-select textarea{color:var(--gov-form-input-color-secondary, var(--gov-color-secondary-700));border:var(--gov-form-input-border-secondary, 0.0625rem solid var(--gov-color-secondary-700))}[variant=secondary].gov-form-multi-select *[slot=left-icon],[variant=secondary].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-secondary, var(--gov-color-primary))}[disabled=""].gov-form-multi-select,[disabled=true i].gov-form-multi-select,[disabled="1"].gov-form-multi-select{pointer-events:none}[disabled=""].gov-form-multi-select input,[disabled=""].gov-form-multi-select select,[disabled=""].gov-form-multi-select textarea,[disabled=true i].gov-form-multi-select input,[disabled=true i].gov-form-multi-select select,[disabled=true i].gov-form-multi-select textarea,[disabled="1"].gov-form-multi-select input,[disabled="1"].gov-form-multi-select select,[disabled="1"].gov-form-multi-select textarea{border-color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));background:var(--gov-form-input-disabled-bg, var(--gov-color-secondary-300));color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600))}[disabled=""].gov-form-multi-select *[slot=left-icon],[disabled=""].gov-form-multi-select *[slot=right-icon],[disabled=true i].gov-form-multi-select *[slot=left-icon],[disabled=true i].gov-form-multi-select *[slot=right-icon],[disabled="1"].gov-form-multi-select *[slot=left-icon],[disabled="1"].gov-form-multi-select *[slot=right-icon]{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600)) !important}[invalid=""].gov-form-multi-select input,[invalid=""].gov-form-multi-select select,[invalid=""].gov-form-multi-select textarea,[invalid=true i].gov-form-multi-select input,[invalid=true i].gov-form-multi-select select,[invalid=true i].gov-form-multi-select textarea,[invalid="1"].gov-form-multi-select input,[invalid="1"].gov-form-multi-select select,[invalid="1"].gov-form-multi-select textarea{border-color:var(--gov-form-state-color-error, var(--gov-color-error));color:var(--gov-form-state-color-error, var(--gov-color-error))}[invalid=""].gov-form-multi-select input::-moz-placeholder,[invalid=""].gov-form-multi-select select::-moz-placeholder,[invalid=""].gov-form-multi-select textarea::-moz-placeholder,[invalid=true i].gov-form-multi-select input::-moz-placeholder,[invalid=true i].gov-form-multi-select select::-moz-placeholder,[invalid=true i].gov-form-multi-select textarea::-moz-placeholder,[invalid="1"].gov-form-multi-select input::-moz-placeholder,[invalid="1"].gov-form-multi-select select::-moz-placeholder,[invalid="1"].gov-form-multi-select textarea::-moz-placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-multi-select input::placeholder,[invalid=""].gov-form-multi-select select::placeholder,[invalid=""].gov-form-multi-select textarea::placeholder,[invalid=true i].gov-form-multi-select input::placeholder,[invalid=true i].gov-form-multi-select select::placeholder,[invalid=true i].gov-form-multi-select textarea::placeholder,[invalid="1"].gov-form-multi-select input::placeholder,[invalid="1"].gov-form-multi-select select::placeholder,[invalid="1"].gov-form-multi-select textarea::placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-multi-select *[slot=left-icon],[invalid=""].gov-form-multi-select *[slot=right-icon],[invalid=true i].gov-form-multi-select *[slot=left-icon],[invalid=true i].gov-form-multi-select *[slot=right-icon],[invalid="1"].gov-form-multi-select *[slot=left-icon],[invalid="1"].gov-form-multi-select *[slot=right-icon]{color:var(--gov-form-state-color-error, var(--gov-color-error)) !important}[invalid=""].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid="1"].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[success=""].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow),[success=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow),[success="1"].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-state-color-success, var(--gov-color-success))}[success=""].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success="1"].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[multiline=""].gov-form-multi-select *[slot=left-icon],[multiline=""].gov-form-multi-select *[slot=right-icon],[multiline=true i].gov-form-multi-select *[slot=left-icon],[multiline=true i].gov-form-multi-select *[slot=right-icon],[multiline="1"].gov-form-multi-select *[slot=left-icon],[multiline="1"].gov-form-multi-select *[slot=right-icon]{display:none}.gov-form-multi-select{background:none}.gov-form-multi-select select{-webkit-appearance:none;-moz-appearance:none}.gov-form-multi-select select::-ms-expand{display:none}[size=s].gov-form-multi-select *[slot=right-icon]{right:var(--gov-form-select-s-arrow-right-position, 0.75rem);width:var(--gov-form-select-s-arrow-size, 0.75rem);height:var(--gov-form-select-s-arrow-size, 0.75rem)}[size=s][invalid=""].gov-form-multi-select .icon-arrow,[size=s][invalid=true i].gov-form-multi-select .icon-arrow,[size=s][invalid="1"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-s-arrow-right-position, 0.75rem))}[size=s][success=""].gov-form-multi-select .icon-arrow,[size=s][success=true i].gov-form-multi-select .icon-arrow,[size=s][success="1"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-s-arrow-right-position, 0.75rem))}[size=m].gov-form-multi-select *[slot=right-icon]{right:var(--gov-form-select-m-arrow-right-position, 1rem);width:var(--gov-form-select-m-arrow-size, 0.75rem);height:var(--gov-form-select-m-arrow-size, 0.75rem)}[size=m][invalid=""].gov-form-multi-select .icon-arrow,[size=m][invalid=true i].gov-form-multi-select .icon-arrow,[size=m][invalid="1"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-m-arrow-right-position, 1rem))}[size=m][success=""].gov-form-multi-select .icon-arrow,[size=m][success=true i].gov-form-multi-select .icon-arrow,[size=m][success="1"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-m-arrow-right-position, 1rem))}[size=l].gov-form-multi-select *[slot=right-icon]{right:var(--gov-form-select-l-arrow-right-position, 1rem);width:var(--gov-form-select-l-arrow-size, 1rem);height:var(--gov-form-select-l-arrow-size, 1rem)}[size=l][invalid=""].gov-form-multi-select .icon-arrow,[size=l][invalid=true i].gov-form-multi-select .icon-arrow,[size=l][invalid="1"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-l-arrow-right-position, 1rem))}[size=l][success=""].gov-form-multi-select .icon-arrow,[size=l][success=true i].gov-form-multi-select .icon-arrow,[size=l][success="1"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-l-arrow-right-position, 1rem))}[size=xl].gov-form-multi-select *[slot=right-icon]{right:var(--gov-form-select-xl-arrow-right-position, 1.3125rem);width:var(--gov-form-select-xl-arrow-size, 1rem);height:var(--gov-form-select-xl-arrow-size, 1rem)}[size=xl][invalid=""].gov-form-multi-select .icon-arrow,[size=xl][invalid=true i].gov-form-multi-select .icon-arrow,[size=xl][invalid="1"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-xl-arrow-right-position, 1.3125rem))}[size=xl][success=""].gov-form-multi-select .icon-arrow,[size=xl][success=true i].gov-form-multi-select .icon-arrow,[size=xl][success="1"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-xl-arrow-right-position, 1.3125rem))}[size=s][invalid=""].gov-form-multi-select *[slot=right-icon]~select,[size=s][invalid=""].gov-form-multi-select *[slot=right-icon]~input,[size=s][invalid=true i].gov-form-multi-select *[slot=right-icon]~select,[size=s][invalid=true i].gov-form-multi-select *[slot=right-icon]~input,[size=s][invalid="1"].gov-form-multi-select *[slot=right-icon]~select,[size=s][invalid="1"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-s-icon-padding, 2rem))}[size=s][success=""].gov-form-multi-select *[slot=right-icon]~select,[size=s][success=""].gov-form-multi-select *[slot=right-icon]~input,[size=s][success=true i].gov-form-multi-select *[slot=right-icon]~select,[size=s][success=true i].gov-form-multi-select *[slot=right-icon]~input,[size=s][success="1"].gov-form-multi-select *[slot=right-icon]~select,[size=s][success="1"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-s-icon-padding, 2rem))}[size=m][invalid=""].gov-form-multi-select *[slot=right-icon]~select,[size=m][invalid=""].gov-form-multi-select *[slot=right-icon]~input,[size=m][invalid=true i].gov-form-multi-select *[slot=right-icon]~select,[size=m][invalid=true i].gov-form-multi-select *[slot=right-icon]~input,[size=m][invalid="1"].gov-form-multi-select *[slot=right-icon]~select,[size=m][invalid="1"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-m-icon-padding, 2.5rem))}[size=m][success=""].gov-form-multi-select *[slot=right-icon]~select,[size=m][success=""].gov-form-multi-select *[slot=right-icon]~input,[size=m][success=true i].gov-form-multi-select *[slot=right-icon]~select,[size=m][success=true i].gov-form-multi-select *[slot=right-icon]~input,[size=m][success="1"].gov-form-multi-select *[slot=right-icon]~select,[size=m][success="1"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-m-icon-padding, 2.5rem))}[size=l][invalid=""].gov-form-multi-select *[slot=right-icon]~select,[size=l][invalid=""].gov-form-multi-select *[slot=right-icon]~input,[size=l][invalid=true i].gov-form-multi-select *[slot=right-icon]~select,[size=l][invalid=true i].gov-form-multi-select *[slot=right-icon]~input,[size=l][invalid="1"].gov-form-multi-select *[slot=right-icon]~select,[size=l][invalid="1"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-l-icon-padding, 2.5rem))}[size=l][success=""].gov-form-multi-select *[slot=right-icon]~select,[size=l][success=""].gov-form-multi-select *[slot=right-icon]~input,[size=l][success=true i].gov-form-multi-select *[slot=right-icon]~select,[size=l][success=true i].gov-form-multi-select *[slot=right-icon]~input,[size=l][success="1"].gov-form-multi-select *[slot=right-icon]~select,[size=l][success="1"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-l-icon-padding, 2.5rem))}[size=xl][invalid=""].gov-form-multi-select *[slot=right-icon]~select,[size=xl][invalid=""].gov-form-multi-select *[slot=right-icon]~input,[size=xl][invalid=true i].gov-form-multi-select *[slot=right-icon]~select,[size=xl][invalid=true i].gov-form-multi-select *[slot=right-icon]~input,[size=xl][invalid="1"].gov-form-multi-select *[slot=right-icon]~select,[size=xl][invalid="1"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-xl-icon-padding, 3rem))}[size=xl][success=""].gov-form-multi-select *[slot=right-icon]~select,[size=xl][success=""].gov-form-multi-select *[slot=right-icon]~input,[size=xl][success=true i].gov-form-multi-select *[slot=right-icon]~select,[size=xl][success=true i].gov-form-multi-select *[slot=right-icon]~input,[size=xl][success="1"].gov-form-multi-select *[slot=right-icon]~select,[size=xl][success="1"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-xl-icon-padding, 3rem))}.gov-form-multi-select{flex-wrap:wrap}.gov-form-multi-select__wrap{display:flex;align-items:center;gap:0.5rem;width:100%}.gov-form-multi-select__list{font-weight:var(--gov-text-xs-font-weight);font-size:var(--gov-text-xs-font-size);line-height:var(--gov-text-xs-line-height);letter-spacing:var(--gov-text-xs-letter-spacing);display:flex;gap:0.5rem;flex-wrap:wrap}.gov-form-multi-select__list>.gov-form-multi-select__item{position:relative;display:flex;flex:0 0 auto;align-items:center;padding:0rem 0rem 0rem 0.5rem;background:var(--gov-form-multiselect-bg, var(--gov-color-primary-200));transition:150ms linear background-color}';const A=j;const O=e(class e extends t{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.variant=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.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagOwns=undefined;this.focused=undefined;this.valueState=undefined;this.selectedOptionsState=[];this.optionsState=[];this.selectId=h("GovSelect");this.listId=h("GovMultiList");this.h=a(this.host);this.f=s(this.h)}validateVariant(e){u(c,e,l.root)}validateSize(e){u(n,e,l.root)}watchOptions(e){this.optionsState=b(e)}watchValue(e){this.selectedOptionsState=b(e)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",m(this.invalid));this.f.passAttrToControl("disabled",m(this.disabled));this.f.passAttrToControl("success",m(this.success))}componentWillLoad(){this.validateVariant(this.variant);this.validateSize(this.size);this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required));this.optionsState=b(this.options);this.selectedOptionsState=b(this.value)}getAvailableOptions(e=false){if(Array.isArray(this.optionsState)&&this.optionsState.length){if(e){return this.optionsState}return this.optionsState.filter((e=>{const t=this.selectedValueIndex(e.value);return t!==-1||(e===null||e===void 0?void 0:e.disabled)?false:true})).map((e=>{var t;return{label:(t=e.label)!==null&&t!==void 0?t:e.value,value:e.value}}))}return Array.from(this.selectRef.querySelectorAll("option")).filter((t=>{if(e){return true}const i=this.selectedValueIndex(t.value);return!(t.disabled||t.selected||i>-1)})).map((e=>({label:e.textContent,value:e.value})))}initAutocomplete(){var e,t,i,o,r;(e=this.autocompleteRef)===null||e===void 0?void 0:e.addEventListener("gov-select",this.onSelectHandler.bind(this));(t=this.autocompleteRef)===null||t===void 0?void 0:t.addEventListener("gov-input",this.onInputHandler.bind(this));(i=this.autocompleteRef)===null||i===void 0?void 0:i.addEventListener("gov-focus",this.onFocusHandler.bind(this));(o=this.autocompleteRef)===null||o===void 0?void 0:o.addEventListener("gov-blur",this.onBlurHandler.bind(this));(r=this.autocompleteRef)===null||r===void 0?void 0:r.setSearchCallback((e=>new Promise((t=>{const i=this.getAvailableOptions();if(String(e).length===0){return t(i)}t(i.filter((({label:t,value:i})=>{if(!t)t=i;return p(t).toLowerCase().indexOf(p(e).toLowerCase())>-1})))})))).finally()}selectedValueIndex(e){return this.selectedOptionsState.findIndex((t=>t===e))}getOptionElement(e){return this.selectRef.querySelector('option[value="'+e+'"]')}getOption(e){var t;return(t=this.getAvailableOptions(true).find((t=>t.value===e)))!==null&&t!==void 0?t:null}selectOption(e,t=true){const i=this.selectedValueIndex(e);if(i===-1){this.selectedOptionsState=[...this.selectedOptionsState,e];this.value=this.selectedOptionsState;if(t){this.govChange.emit({component:l.root,value:this.selectedOptionsState});this.govSelect.emit({component:l.root,value:this.selectedOptionsState})}const i=this.getOptionElement(e);if(i){i.selected=true}}}removeOption(e,t=true){const i=this.selectedValueIndex(e);if(i!==-1){this.selectedOptionsState.splice(i,1);this.selectedOptionsState=[...this.selectedOptionsState];this.value=this.selectedOptionsState;if(t){this.govChange.emit({component:l.root,value:this.selectedOptionsState});this.govRemove.emit({component:l.root,value:this.selectedOptionsState})}const o=this.getOptionElement(e);if(o){o.selected=false}}}async componentDidLoad(){this.initAutocomplete()}async componentDidRender(){x((()=>{this.selectRef.querySelectorAll("option").forEach((e=>{if(e.selected){this.selectOption(e.value,false)}}))}));if(v()){await z(500);await this.validateWcag()}}render(){return o(r,{key:"d196b10aa1a15b405235bec76b0c9a50ce7b7a32",class:l.root,size:this.size,variant:this.variant},o("div",{key:"18b3d6b6b568d4c2e6185cc2b5397dc0d0b397e3",class:l.wrap},this.h.hasSlot("prefix")&&o("slot",{key:"b7c67fef5eea42e0f948487082cb481fbd8f6264",name:"prefix"}),o("div",{key:"a9c6e91522fa96fa40ba75afee7150c2f0b9c07a",class:"element"},o("gov-form-autocomplete",{key:"2792873c33eee760c93bffbaba9268e4dff4acba",value:this.valueState,disabled:this.disabled,identifier:this.identifier||this.selectId,required:false,size:this.size,variant:this.variant,placeholder:this.placeholder,"message-empty":this.messageEmpty,"message-loading":this.messageLoading,ref:e=>this.autocompleteRef=e,minlength:0,"name-key":"label",wcagDescribedBy:this.wcagDescribedBy,wcagLabelledBy:this.wcagLabelledBy,wcagOwns:this.listId}),o("gov-icon",{key:"d03af7b6c89e62d7f6054d8b5be3bc73f8b1fe96",slot:"right-icon",class:"icon-arrow",name:"chevron-down"}),this.h.hasSlot("right-icon")&&!(this.success||this.invalid)&&o("slot",{key:"34299ffce891c3f31947ef8f6ccd5d7144a5e485",name:"right-icon"}),this.success&&o("gov-icon",{key:"0343f86ccaf5a9fad2f6c2c0aa82cf508e19c1c1",slot:"right-icon",class:"icon-validation",name:"check-lg"}),this.invalid&&o("gov-icon",{key:"481ae336432840d2994455371f3407644fd1e1b1",slot:"right-icon",class:"icon-validation",name:"exclamation-lg"}),o("select",{key:"0348cced9ebf67b2047586a024c6fd05ec71dff1",hidden:true,class:"hidden-select-list","aria-hidden":m(true),multiple:true,required:this.required,name:this.name,disabled:this.disabled,ref:e=>this.selectRef=e,"aria-disabled":g(this.disabled),"aria-required":g(this.required),"aria-invalid":g(this.invalid),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-owns":this.wcagOwns},o("slot",{key:"cc4d489c662d6515c2c5d6398bb34cc43871b426"}))),this.h.hasSlot("sufix")&&o("slot",{key:"adabdc557faf6eab58d48e6ad40f6d01fb610132",name:"sufix"})),this.hideSelectedList===false?o("ul",{role:"listbox",id:this.listId,class:l.list},Array.isArray(this.selectedOptionsState)&&this.selectedOptionsState.map((e=>{var t,i;const r=this.getOption(e);if(!r)return null;return o("li",{class:l.item,role:"option"},(t=r.label)!==null&&t!==void 0?t:r.value,o("gov-button",{wcagLabel:(i="Odebrat vybranou položku "+r.label)!==null&&i!==void 0?i:r.value,variant:"primary",type:"base",size:"s","on-gov-click":()=>this.onTagRemove(e)},o("gov-icon",{name:"x-lg"})))}))):null)}onFocusHandler(e){e.stopPropagation();this.focused=true;this.govFocus.emit({component:l.root,originalEvent:e,value:this.selectedOptionsState})}onBlurHandler(e){e.stopPropagation();e.stopPropagation();this.focused=false;this.govBlur.emit({component:l.root,originalEvent:e,value:this.selectedOptionsState})}onInputHandler(e){this.valueState=e.detail.value;e.stopPropagation()}onSelectHandler(e){e.stopPropagation();const t=e.detail.selected;this.selectOption(t.value);this.valueState="";this.autocompleteRef.clearValue().finally();this.autocompleteRef.focus()}onTagRemove(e){this.removeOption(e)}async setFocus(e){return this.selectRef.focus(e)}async setValue(e){this.valueState=e}async getRef(){return this.selectRef}async validateWcag(){f(this.wcagDescribedBy,"wcag-described-by",l.root);f(this.wcagLabelledBy,"wcag-labelled-by",l.root);f(this.wcagOwns,"wcag-owns",l.root);d(this.identifier||this.selectId,this.wcagLabelledBy,l.root)}get host(){return this}static get watchers(){return{variant:["validateVariant"],size:["validateSize","watchControlAttrs"],options:["watchOptions"],value:["watchValue"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}}static get style(){return A}},[4,"gov-form-multi-select",{value:[1537],options:[1537],identifier:[1],placeholder:[1],variant:[1],size:[1],name:[1],hideSelectedList:[4,"hide-selected-list"],required:[4],disabled:[4],invalid:[4],success:[4],messageEmpty:[1,"message-empty"],messageLoading:[1,"message-loading"],wcagDescribedBy:[1,"wcag-described-by"],wcagLabelledBy:[1,"wcag-labelled-by"],wcagOwns:[1,"wcag-owns"],focused:[32],valueState:[32],selectedOptionsState:[32],optionsState:[32],setFocus:[64],setValue:[64],getRef:[64],validateWcag:[64]},undefined,{variant:["validateVariant"],size:["validateSize","watchControlAttrs"],options:["watchOptions"],value:["watchValue"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}]);function E(){if(typeof customElements==="undefined"){return}const e=["gov-form-multi-select","gov-button","gov-form-autocomplete","gov-form-input","gov-icon"];e.forEach((e=>{switch(e){case"gov-form-multi-select":if(!customElements.get(e)){customElements.define(e,O)}break;case"gov-button":if(!customElements.get(e)){w()}break;case"gov-form-autocomplete":if(!customElements.get(e)){y()}break;case"gov-form-input":if(!customElements.get(e)){k()}break;case"gov-icon":if(!customElements.get(e)){_()}break}}))}E();const S=O;const C=E;export{S as GovFormMultiSelect,C as defineCustomElement};
1
+ import{p as e,H as t,c as i,h as o,d as r}from"./p-d6759ac3.js";import{g as s,j as l,k as c,l as n}from"./p-77a6e3be.js";import{g as a,a as m,t as g}from"./p-d687df8f.js";import{c as v}from"./p-e618f1cb.js";import{v as u}from"./p-344c72d7.js";import{b as f,c as d}from"./p-6b0471a8.js";import{c as h,r as p}from"./p-95d41a3b.js";import{d as z}from"./p-e0e2e9c1.js";import{p as b}from"./p-3f704a40.js";import{t as x}from"./p-240c302e.js";import{d as w}from"./p-8977b759.js";import{d as y}from"./p-f0eb08d6.js";import{d as k}from"./p-708dca47.js";import{d as _}from"./p-2dce8f2c.js";const j='.gov-form-multi-select__list{margin:0;padding:0}.gov-form-multi-select__list>.gov-form-multi-select__item{margin:0;padding:0;background:none}.gov-form-multi-select__list>.gov-form-multi-select__item::before{display:none}.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-form-multi-select{position:relative;display:flex;width:100%;align-items:center}.gov-form-multi-select .element{position:relative;display:flex;flex:1 1 auto}.gov-form-multi-select input,.gov-form-multi-select select,.gov-form-multi-select textarea{width:100%;border-radius:var(--gov-border-radius, 0.1875rem);background-color:var(--gov-form-bg-color, var(--gov-color-neutral-white));font-family:var(--gov-font-family, "Roboto", sans-serif)}.gov-form-multi-select input:focus,.gov-form-multi-select select:focus,.gov-form-multi-select textarea:focus{outline:none}.gov-form-multi-select input:focus-visible,.gov-form-multi-select select:focus-visible,.gov-form-multi-select textarea:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-form-multi-select input::-moz-placeholder,.gov-form-multi-select select::-moz-placeholder,.gov-form-multi-select textarea::-moz-placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-multi-select input::placeholder,.gov-form-multi-select select::placeholder,.gov-form-multi-select textarea::placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-multi-select textarea{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);padding:0.5rem 0.75rem;resize:none}.gov-form-multi-select *[slot=left-icon],.gov-form-multi-select *[slot=right-icon]{position:absolute;top:50%;display:flex;justify-content:center;transform:translateY(-50%);pointer-events:none}.gov-form-multi-select *[slot=left-icon]{left:0}.gov-form-multi-select *[slot=right-icon]{right:0}.gov-form-multi-select *[slot=prefix],.gov-form-multi-select *[slot=sufix]{margin:0}[size=s].gov-form-multi-select{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);gap:0.5rem var(--gov-form-input-core-s-icon-size, 1rem)}[size=s].gov-form-multi-select input,[size=s].gov-form-multi-select select{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);height:var(--gov-form-input-core-s-height, 2rem);padding:var(--gov-form-input-core-s-padding, 0.25rem 0.75rem)}[size=s].gov-form-multi-select *[slot=left-icon],[size=s].gov-form-multi-select *[slot=right-icon]{width:var(--gov-form-input-core-s-icon-size, 1rem);height:var(--gov-form-input-core-s-icon-size, 1rem)}[size=s].gov-form-multi-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2)}[size=s].gov-form-multi-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=s].gov-form-multi-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2)}[size=s].gov-form-multi-select *[slot=right-icon]~input,[size=s].gov-form-multi-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=m].gov-form-multi-select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);gap:0.5rem var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-multi-select input,[size=m].gov-form-multi-select select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);height:var(--gov-form-input-core-m-height, 2.5rem);padding:var(--gov-form-input-core-m-padding, 0.4375rem 0.75rem)}[size=m].gov-form-multi-select *[slot=left-icon],[size=m].gov-form-multi-select *[slot=right-icon]{width:var(--gov-form-input-core-m-icon-size, 1rem);height:var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-multi-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-multi-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=m].gov-form-multi-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-multi-select *[slot=right-icon]~input,[size=m].gov-form-multi-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=l].gov-form-multi-select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);gap:0.5rem var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-multi-select input,[size=l].gov-form-multi-select select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);height:var(--gov-form-input-core-l-height, 3rem);padding:var(--gov-form-input-core-l-padding, 0.6875rem 0.75rem)}[size=l].gov-form-multi-select *[slot=left-icon],[size=l].gov-form-multi-select *[slot=right-icon]{width:var(--gov-form-input-core-l-icon-size, 1rem);height:var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-multi-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-multi-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=l].gov-form-multi-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-multi-select *[slot=right-icon]~input,[size=l].gov-form-multi-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=xl].gov-form-multi-select{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing);gap:0.5rem var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-multi-select input,[size=xl].gov-form-multi-select select{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing);height:var(--gov-form-input-core-xl-height, 3.5rem);padding:var(--gov-form-input-core-xl-padding, 0.9375rem 1rem 0.875rem)}[size=xl].gov-form-multi-select *[slot=left-icon],[size=xl].gov-form-multi-select *[slot=right-icon]{width:var(--gov-form-input-core-xl-icon-size, 1.25rem);height:var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-multi-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-multi-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-xl-icon-padding, 3rem)}[size=xl].gov-form-multi-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-multi-select *[slot=right-icon]~input,[size=xl].gov-form-multi-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-xl-icon-padding, 3rem)}[variant=primary].gov-form-multi-select input,[variant=primary].gov-form-multi-select select,[variant=primary].gov-form-multi-select textarea{color:var(--gov-form-input-color-primary, var(--gov-color-secondary-700));border:var(--gov-form-input-border-primary, 0.0625rem solid var(--gov-color-primary-600))}[variant=primary].gov-form-multi-select *[slot=left-icon],[variant=primary].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-primary, var(--gov-color-primary))}[variant=secondary].gov-form-multi-select input,[variant=secondary].gov-form-multi-select select,[variant=secondary].gov-form-multi-select textarea{color:var(--gov-form-input-color-secondary, var(--gov-color-secondary-700));border:var(--gov-form-input-border-secondary, 0.0625rem solid var(--gov-color-secondary-700))}[variant=secondary].gov-form-multi-select *[slot=left-icon],[variant=secondary].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-secondary, var(--gov-color-primary))}[disabled=""].gov-form-multi-select,[disabled=true i].gov-form-multi-select,[disabled="1"].gov-form-multi-select{pointer-events:none}[disabled=""].gov-form-multi-select input,[disabled=""].gov-form-multi-select select,[disabled=""].gov-form-multi-select textarea,[disabled=true i].gov-form-multi-select input,[disabled=true i].gov-form-multi-select select,[disabled=true i].gov-form-multi-select textarea,[disabled="1"].gov-form-multi-select input,[disabled="1"].gov-form-multi-select select,[disabled="1"].gov-form-multi-select textarea{border-color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));background:var(--gov-form-input-disabled-bg, var(--gov-color-secondary-300));color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600))}[disabled=""].gov-form-multi-select *[slot=left-icon],[disabled=""].gov-form-multi-select *[slot=right-icon],[disabled=true i].gov-form-multi-select *[slot=left-icon],[disabled=true i].gov-form-multi-select *[slot=right-icon],[disabled="1"].gov-form-multi-select *[slot=left-icon],[disabled="1"].gov-form-multi-select *[slot=right-icon]{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600)) !important}[invalid=""].gov-form-multi-select input,[invalid=""].gov-form-multi-select select,[invalid=""].gov-form-multi-select textarea,[invalid=true i].gov-form-multi-select input,[invalid=true i].gov-form-multi-select select,[invalid=true i].gov-form-multi-select textarea,[invalid="1"].gov-form-multi-select input,[invalid="1"].gov-form-multi-select select,[invalid="1"].gov-form-multi-select textarea{border-color:var(--gov-form-state-color-error, var(--gov-color-error));color:var(--gov-form-state-color-error, var(--gov-color-error))}[invalid=""].gov-form-multi-select input::-moz-placeholder,[invalid=""].gov-form-multi-select select::-moz-placeholder,[invalid=""].gov-form-multi-select textarea::-moz-placeholder,[invalid=true i].gov-form-multi-select input::-moz-placeholder,[invalid=true i].gov-form-multi-select select::-moz-placeholder,[invalid=true i].gov-form-multi-select textarea::-moz-placeholder,[invalid="1"].gov-form-multi-select input::-moz-placeholder,[invalid="1"].gov-form-multi-select select::-moz-placeholder,[invalid="1"].gov-form-multi-select textarea::-moz-placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-multi-select input::placeholder,[invalid=""].gov-form-multi-select select::placeholder,[invalid=""].gov-form-multi-select textarea::placeholder,[invalid=true i].gov-form-multi-select input::placeholder,[invalid=true i].gov-form-multi-select select::placeholder,[invalid=true i].gov-form-multi-select textarea::placeholder,[invalid="1"].gov-form-multi-select input::placeholder,[invalid="1"].gov-form-multi-select select::placeholder,[invalid="1"].gov-form-multi-select textarea::placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-multi-select *[slot=left-icon],[invalid=""].gov-form-multi-select *[slot=right-icon],[invalid=true i].gov-form-multi-select *[slot=left-icon],[invalid=true i].gov-form-multi-select *[slot=right-icon],[invalid="1"].gov-form-multi-select *[slot=left-icon],[invalid="1"].gov-form-multi-select *[slot=right-icon]{color:var(--gov-form-state-color-error, var(--gov-color-error)) !important}[invalid=""].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid="1"].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[success=""].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow),[success=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow),[success="1"].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-state-color-success, var(--gov-color-success))}[success=""].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success="1"].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[multiline=""].gov-form-multi-select *[slot=left-icon],[multiline=""].gov-form-multi-select *[slot=right-icon],[multiline=true i].gov-form-multi-select *[slot=left-icon],[multiline=true i].gov-form-multi-select *[slot=right-icon],[multiline="1"].gov-form-multi-select *[slot=left-icon],[multiline="1"].gov-form-multi-select *[slot=right-icon]{display:none}.gov-form-multi-select{background:none}.gov-form-multi-select select{-webkit-appearance:none;-moz-appearance:none}.gov-form-multi-select select::-ms-expand{display:none}[size=s].gov-form-multi-select *[slot=right-icon]{right:var(--gov-form-select-s-arrow-right-position, 0.75rem);width:var(--gov-form-select-s-arrow-size, 0.75rem);height:var(--gov-form-select-s-arrow-size, 0.75rem)}[size=s][invalid=""].gov-form-multi-select .icon-arrow,[size=s][invalid=true i].gov-form-multi-select .icon-arrow,[size=s][invalid="1"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-s-arrow-right-position, 0.75rem))}[size=s][success=""].gov-form-multi-select .icon-arrow,[size=s][success=true i].gov-form-multi-select .icon-arrow,[size=s][success="1"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-s-arrow-right-position, 0.75rem))}[size=m].gov-form-multi-select *[slot=right-icon]{right:var(--gov-form-select-m-arrow-right-position, 1rem);width:var(--gov-form-select-m-arrow-size, 0.75rem);height:var(--gov-form-select-m-arrow-size, 0.75rem)}[size=m][invalid=""].gov-form-multi-select .icon-arrow,[size=m][invalid=true i].gov-form-multi-select .icon-arrow,[size=m][invalid="1"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-m-arrow-right-position, 1rem))}[size=m][success=""].gov-form-multi-select .icon-arrow,[size=m][success=true i].gov-form-multi-select .icon-arrow,[size=m][success="1"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-m-arrow-right-position, 1rem))}[size=l].gov-form-multi-select *[slot=right-icon]{right:var(--gov-form-select-l-arrow-right-position, 1rem);width:var(--gov-form-select-l-arrow-size, 1rem);height:var(--gov-form-select-l-arrow-size, 1rem)}[size=l][invalid=""].gov-form-multi-select .icon-arrow,[size=l][invalid=true i].gov-form-multi-select .icon-arrow,[size=l][invalid="1"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-l-arrow-right-position, 1rem))}[size=l][success=""].gov-form-multi-select .icon-arrow,[size=l][success=true i].gov-form-multi-select .icon-arrow,[size=l][success="1"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-l-arrow-right-position, 1rem))}[size=xl].gov-form-multi-select *[slot=right-icon]{right:var(--gov-form-select-xl-arrow-right-position, 1.3125rem);width:var(--gov-form-select-xl-arrow-size, 1rem);height:var(--gov-form-select-xl-arrow-size, 1rem)}[size=xl][invalid=""].gov-form-multi-select .icon-arrow,[size=xl][invalid=true i].gov-form-multi-select .icon-arrow,[size=xl][invalid="1"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-xl-arrow-right-position, 1.3125rem))}[size=xl][success=""].gov-form-multi-select .icon-arrow,[size=xl][success=true i].gov-form-multi-select .icon-arrow,[size=xl][success="1"].gov-form-multi-select .icon-arrow{right:calc(3 * var(--gov-form-select-xl-arrow-right-position, 1.3125rem))}[size=s][invalid=""].gov-form-multi-select *[slot=right-icon]~select,[size=s][invalid=""].gov-form-multi-select *[slot=right-icon]~input,[size=s][invalid=true i].gov-form-multi-select *[slot=right-icon]~select,[size=s][invalid=true i].gov-form-multi-select *[slot=right-icon]~input,[size=s][invalid="1"].gov-form-multi-select *[slot=right-icon]~select,[size=s][invalid="1"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-s-icon-padding, 2rem))}[size=s][success=""].gov-form-multi-select *[slot=right-icon]~select,[size=s][success=""].gov-form-multi-select *[slot=right-icon]~input,[size=s][success=true i].gov-form-multi-select *[slot=right-icon]~select,[size=s][success=true i].gov-form-multi-select *[slot=right-icon]~input,[size=s][success="1"].gov-form-multi-select *[slot=right-icon]~select,[size=s][success="1"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-s-icon-padding, 2rem))}[size=m][invalid=""].gov-form-multi-select *[slot=right-icon]~select,[size=m][invalid=""].gov-form-multi-select *[slot=right-icon]~input,[size=m][invalid=true i].gov-form-multi-select *[slot=right-icon]~select,[size=m][invalid=true i].gov-form-multi-select *[slot=right-icon]~input,[size=m][invalid="1"].gov-form-multi-select *[slot=right-icon]~select,[size=m][invalid="1"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-m-icon-padding, 2.5rem))}[size=m][success=""].gov-form-multi-select *[slot=right-icon]~select,[size=m][success=""].gov-form-multi-select *[slot=right-icon]~input,[size=m][success=true i].gov-form-multi-select *[slot=right-icon]~select,[size=m][success=true i].gov-form-multi-select *[slot=right-icon]~input,[size=m][success="1"].gov-form-multi-select *[slot=right-icon]~select,[size=m][success="1"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-m-icon-padding, 2.5rem))}[size=l][invalid=""].gov-form-multi-select *[slot=right-icon]~select,[size=l][invalid=""].gov-form-multi-select *[slot=right-icon]~input,[size=l][invalid=true i].gov-form-multi-select *[slot=right-icon]~select,[size=l][invalid=true i].gov-form-multi-select *[slot=right-icon]~input,[size=l][invalid="1"].gov-form-multi-select *[slot=right-icon]~select,[size=l][invalid="1"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-l-icon-padding, 2.5rem))}[size=l][success=""].gov-form-multi-select *[slot=right-icon]~select,[size=l][success=""].gov-form-multi-select *[slot=right-icon]~input,[size=l][success=true i].gov-form-multi-select *[slot=right-icon]~select,[size=l][success=true i].gov-form-multi-select *[slot=right-icon]~input,[size=l][success="1"].gov-form-multi-select *[slot=right-icon]~select,[size=l][success="1"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-l-icon-padding, 2.5rem))}[size=xl][invalid=""].gov-form-multi-select *[slot=right-icon]~select,[size=xl][invalid=""].gov-form-multi-select *[slot=right-icon]~input,[size=xl][invalid=true i].gov-form-multi-select *[slot=right-icon]~select,[size=xl][invalid=true i].gov-form-multi-select *[slot=right-icon]~input,[size=xl][invalid="1"].gov-form-multi-select *[slot=right-icon]~select,[size=xl][invalid="1"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-xl-icon-padding, 3rem))}[size=xl][success=""].gov-form-multi-select *[slot=right-icon]~select,[size=xl][success=""].gov-form-multi-select *[slot=right-icon]~input,[size=xl][success=true i].gov-form-multi-select *[slot=right-icon]~select,[size=xl][success=true i].gov-form-multi-select *[slot=right-icon]~input,[size=xl][success="1"].gov-form-multi-select *[slot=right-icon]~select,[size=xl][success="1"].gov-form-multi-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-xl-icon-padding, 3rem))}.gov-form-multi-select{flex-wrap:wrap}.gov-form-multi-select__wrap{display:flex;align-items:center;gap:0.5rem;width:100%}.gov-form-multi-select__list{font-weight:var(--gov-text-xs-font-weight);font-size:var(--gov-text-xs-font-size);line-height:var(--gov-text-xs-line-height);letter-spacing:var(--gov-text-xs-letter-spacing);display:flex;gap:0.5rem;flex-wrap:wrap}.gov-form-multi-select__list>.gov-form-multi-select__item{position:relative;display:flex;flex:0 0 auto;align-items:center;padding:0rem 0rem 0rem 0.5rem;background:var(--gov-form-multiselect-bg, var(--gov-color-primary-200));transition:150ms linear background-color}';const A=j;const O=e(class e extends t{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.variant=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.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagOwns=undefined;this.focused=undefined;this.valueState=undefined;this.selectedOptionsState=[];this.optionsState=[];this.selectId=h("GovSelect");this.listId=h("GovMultiList");this.h=a(this.host);this.f=s(this.h)}validateVariant(e){u(c,e,l.root)}validateSize(e){u(n,e,l.root)}watchOptions(e){this.optionsState=b(e)}watchValue(e){this.selectedOptionsState=b(e)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",m(this.invalid));this.f.passAttrToControl("disabled",m(this.disabled));this.f.passAttrToControl("success",m(this.success))}componentWillLoad(){this.validateVariant(this.variant);this.validateSize(this.size);this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required));this.optionsState=b(this.options);this.selectedOptionsState=b(this.value)}getAvailableOptions(e=false){if(Array.isArray(this.optionsState)&&this.optionsState.length){if(e){return this.optionsState}return this.optionsState.filter((e=>{const t=this.selectedValueIndex(e.value);return t!==-1||(e===null||e===void 0?void 0:e.disabled)?false:true})).map((e=>{var t;return{label:(t=e.label)!==null&&t!==void 0?t:e.value,value:e.value}}))}return Array.from(this.selectRef.querySelectorAll("option")).filter((t=>{if(e){return true}const i=this.selectedValueIndex(t.value);return!(t.disabled||t.selected||i>-1)})).map((e=>({label:e.textContent,value:e.value})))}initAutocomplete(){var e,t,i,o,r;(e=this.autocompleteRef)===null||e===void 0?void 0:e.addEventListener("gov-select",this.onSelectHandler.bind(this));(t=this.autocompleteRef)===null||t===void 0?void 0:t.addEventListener("gov-input",this.onInputHandler.bind(this));(i=this.autocompleteRef)===null||i===void 0?void 0:i.addEventListener("gov-focus",this.onFocusHandler.bind(this));(o=this.autocompleteRef)===null||o===void 0?void 0:o.addEventListener("gov-blur",this.onBlurHandler.bind(this));(r=this.autocompleteRef)===null||r===void 0?void 0:r.setSearchCallback((e=>new Promise((t=>{const i=this.getAvailableOptions();if(String(e).length===0){return t(i)}t(i.filter((({label:t,value:i})=>{if(!t)t=i;return p(t).toLowerCase().indexOf(p(e).toLowerCase())>-1})))})))).finally()}selectedValueIndex(e){return this.selectedOptionsState.findIndex((t=>t===e))}getOptionElement(e){return this.selectRef.querySelector('option[value="'+e+'"]')}getOption(e){var t;return(t=this.getAvailableOptions(true).find((t=>t.value===e)))!==null&&t!==void 0?t:null}selectOption(e,t=true){const i=this.selectedValueIndex(e);if(i===-1){this.selectedOptionsState=[...this.selectedOptionsState,e];this.value=this.selectedOptionsState;if(t){this.govChange.emit({component:l.root,value:this.selectedOptionsState});this.govSelect.emit({component:l.root,value:this.selectedOptionsState})}const i=this.getOptionElement(e);if(i){i.selected=true}}}removeOption(e,t=true){const i=this.selectedValueIndex(e);if(i!==-1){this.selectedOptionsState.splice(i,1);this.selectedOptionsState=[...this.selectedOptionsState];this.value=this.selectedOptionsState;if(t){this.govChange.emit({component:l.root,value:this.selectedOptionsState});this.govRemove.emit({component:l.root,value:this.selectedOptionsState})}const o=this.getOptionElement(e);if(o){o.selected=false}}}async componentDidLoad(){this.initAutocomplete()}async componentDidRender(){x((()=>{this.selectRef.querySelectorAll("option").forEach((e=>{if(e.selected){this.selectOption(e.value,false)}}))}));if(v()){await z(500);await this.validateWcag()}}render(){return o(r,{key:"d196b10aa1a15b405235bec76b0c9a50ce7b7a32",class:l.root,size:this.size,variant:this.variant},o("div",{key:"18b3d6b6b568d4c2e6185cc2b5397dc0d0b397e3",class:l.wrap},this.h.hasSlot("prefix")&&o("slot",{key:"b7c67fef5eea42e0f948487082cb481fbd8f6264",name:"prefix"}),o("div",{key:"a9c6e91522fa96fa40ba75afee7150c2f0b9c07a",class:"element"},o("gov-form-autocomplete",{key:"2792873c33eee760c93bffbaba9268e4dff4acba",value:this.valueState,disabled:this.disabled,identifier:this.identifier||this.selectId,required:false,size:this.size,variant:this.variant,placeholder:this.placeholder,"message-empty":this.messageEmpty,"message-loading":this.messageLoading,ref:e=>this.autocompleteRef=e,minlength:0,"name-key":"label",wcagDescribedBy:this.wcagDescribedBy,wcagLabelledBy:this.wcagLabelledBy,wcagOwns:this.listId}),o("gov-icon",{key:"d03af7b6c89e62d7f6054d8b5be3bc73f8b1fe96",slot:"right-icon",class:"icon-arrow",name:"chevron-down"}),this.h.hasSlot("right-icon")&&!(this.success||this.invalid)&&o("slot",{key:"34299ffce891c3f31947ef8f6ccd5d7144a5e485",name:"right-icon"}),this.success&&o("gov-icon",{key:"0343f86ccaf5a9fad2f6c2c0aa82cf508e19c1c1",slot:"right-icon",class:"icon-validation",name:"check-lg"}),this.invalid&&o("gov-icon",{key:"481ae336432840d2994455371f3407644fd1e1b1",slot:"right-icon",class:"icon-validation",name:"exclamation-lg"}),o("select",{key:"0348cced9ebf67b2047586a024c6fd05ec71dff1",hidden:true,class:"hidden-select-list","aria-hidden":m(true),multiple:true,required:this.required,name:this.name,disabled:this.disabled,ref:e=>this.selectRef=e,"aria-disabled":g(this.disabled),"aria-required":g(this.required),"aria-invalid":g(this.invalid),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-owns":this.wcagOwns},o("slot",{key:"cc4d489c662d6515c2c5d6398bb34cc43871b426"}))),this.h.hasSlot("sufix")&&o("slot",{key:"adabdc557faf6eab58d48e6ad40f6d01fb610132",name:"sufix"})),this.hideSelectedList===false?o("ul",{role:"listbox",id:this.listId,class:l.list},Array.isArray(this.selectedOptionsState)&&this.selectedOptionsState.map((e=>{var t,i;const r=this.getOption(e);if(!r)return null;return o("li",{class:l.item,role:"option"},(t=r.label)!==null&&t!==void 0?t:r.value,o("gov-button",{wcagLabel:(i="Odebrat vybranou položku "+r.label)!==null&&i!==void 0?i:r.value,variant:"primary",type:"base",size:"s","on-gov-click":()=>this.onTagRemove(e)},o("gov-icon",{name:"x-lg"})))}))):null)}onFocusHandler(e){e.stopPropagation();this.focused=true;this.govFocus.emit({component:l.root,originalEvent:e,value:this.selectedOptionsState})}onBlurHandler(e){e.stopPropagation();e.stopPropagation();this.focused=false;this.govBlur.emit({component:l.root,originalEvent:e,value:this.selectedOptionsState})}onInputHandler(e){this.valueState=e.detail.value;e.stopPropagation()}onSelectHandler(e){e.stopPropagation();const t=e.detail.selected;this.selectOption(t.value);this.valueState="";this.autocompleteRef.clearValue().finally();this.autocompleteRef.focus()}onTagRemove(e){this.removeOption(e)}async setFocus(e){return this.selectRef.focus(e)}async setValue(e){this.valueState=e}async getRef(){return this.selectRef}async validateWcag(){f(this.wcagDescribedBy,"wcag-described-by",l.root);f(this.wcagLabelledBy,"wcag-labelled-by",l.root);f(this.wcagOwns,"wcag-owns",l.root);d(this.identifier||this.selectId,this.wcagLabelledBy,l.root)}get host(){return this}static get watchers(){return{variant:["validateVariant"],size:["validateSize","watchControlAttrs"],options:["watchOptions"],value:["watchValue"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}}static get style(){return A}},[4,"gov-form-multi-select",{value:[1537],options:[1537],identifier:[1],placeholder:[1],variant:[1],size:[1],name:[1],hideSelectedList:[4,"hide-selected-list"],required:[4],disabled:[4],invalid:[4],success:[4],messageEmpty:[1,"message-empty"],messageLoading:[1,"message-loading"],wcagDescribedBy:[1,"wcag-described-by"],wcagLabelledBy:[1,"wcag-labelled-by"],wcagOwns:[1,"wcag-owns"],focused:[32],valueState:[32],selectedOptionsState:[32],optionsState:[32],setFocus:[64],setValue:[64],getRef:[64],validateWcag:[64]},undefined,{variant:["validateVariant"],size:["validateSize","watchControlAttrs"],options:["watchOptions"],value:["watchValue"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}]);function E(){if(typeof customElements==="undefined"){return}const e=["gov-form-multi-select","gov-button","gov-form-autocomplete","gov-form-input","gov-icon"];e.forEach((e=>{switch(e){case"gov-form-multi-select":if(!customElements.get(e)){customElements.define(e,O)}break;case"gov-button":if(!customElements.get(e)){w()}break;case"gov-form-autocomplete":if(!customElements.get(e)){y()}break;case"gov-form-input":if(!customElements.get(e)){k()}break;case"gov-icon":if(!customElements.get(e)){_()}break}}))}E();const S=O;const C=E;export{S as GovFormMultiSelect,C 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-b0ff29c9.js";const t=o;const c=s;export{t as GovFormSelect,c as defineCustomElement};
1
+ import{G as o,d as s}from"./p-c2e5e893.js";const t=o;const c=s;export{t as GovFormSelect,c as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-select.js.map
@@ -1,2 +1,2 @@
1
- import{G as o,d as s}from"./p-d2a0ad9c.js";const a=o;const t=s;export{a as GovIcon,t as defineCustomElement};
1
+ import{G as o,d as s}from"./p-2dce8f2c.js";const c=o;const t=s;export{c as GovIcon,t as defineCustomElement};
2
2
  //# sourceMappingURL=gov-icon.js.map
@@ -1,2 +1,2 @@
1
- import{p as o,H as r,c as a,h as n,d as i}from"./p-d6759ac3.js";import{g as e,a as v}from"./p-d687df8f.js";import{c as t}from"./p-e618f1cb.js";import{F as c}from"./p-1c1d0bbe.js";import{v as s}from"./p-344c72d7.js";import{a as g}from"./p-6b0471a8.js";import{p as b,d as f}from"./p-e0e2e9c1.js";import{V as l}from"./p-03dbb8b1.js";import{d}from"./p-90ebe1d9.js";import{d as _}from"./p-d2a0ad9c.js";const m=b(l,["PRIMARY","SECONDARY","WARNING","ERROR","SUCCESS"]);const u={root:"gov-infobar",section:"gov-infobar__section",icon:"gov-infobar__icon",content:"gov-infobar__content",closable:"gov-infobar__content--closable",headline:"gov-infobar__headline",close:"gov-infobar__close"};const h='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-infobar{position:relative;display:block;width:100%}.gov-infobar__section{display:flex;gap:1rem;padding:1rem}.gov-infobar__icon{flex:0 0 auto}.gov-infobar__icon>*{width:1.25rem;height:1.25rem}.gov-infobar__headline{display:flex;gap:1rem}.gov-infobar__headline+div{margin-top:0.5rem}.gov-infobar__headline p{margin-bottom:0}.gov-infobar__headline gov-button{margin-top:-0.25rem}.gov-infobar__content{width:100%}.gov-infobar__content>*:last-child{margin-bottom:0}.gov-infobar__content--closable{padding-right:3.5rem}.gov-infobar__content p{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}.gov-infobar__content a{color:inherit}@media not all and (pointer: coarse){.gov-infobar__content a:hover{color:inherit}}.gov-infobar__content a .gov-icon{color:inherit}.gov-infobar__close{position:absolute;top:0.875rem;right:1rem}.gov-infobar[variant=warning]{background-color:var(--gov-infobar-warning-bg-color, var(--gov-color-warning))}.gov-infobar[variant=warning] .gov-infobar__icon{color:var(--gov-infobar-warning-icon-color, var(--gov-color-secondary))}.gov-infobar[variant=warning] .gov-infobar__content{color:var(--gov-infobar-warning-text-color, var(--gov-color-secondary))}.gov-infobar[variant=warning][inverse=""],.gov-infobar[variant=warning][inverse=true i],.gov-infobar[variant=warning][inverse="1"]{border-bottom:var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white))}.gov-infobar[variant=warning][inverse=""] .gov-infobar__icon,.gov-infobar[variant=warning][inverse=true i] .gov-infobar__icon,.gov-infobar[variant=warning][inverse="1"] .gov-infobar__icon{color:var(--gov-infobar-warning-bg-color, var(--gov-color-warning))}.gov-infobar[variant=warning][inverse=""] .gov-infobar__content,.gov-infobar[variant=warning][inverse=true i] .gov-infobar__content,.gov-infobar[variant=warning][inverse="1"] .gov-infobar__content{color:var(--gov-infobar-inverse-color, var(--gov-color-secondary-800))}.gov-infobar[variant=error]{background-color:var(--gov-infobar-error-bg-color, var(--gov-color-error))}.gov-infobar[variant=error] .gov-infobar__icon{color:var(--gov-infobar-error-icon-color, var(--gov-color-neutral-white))}.gov-infobar[variant=error] .gov-infobar__content{color:var(--gov-infobar-error-text-color, var(--gov-color-neutral-white))}.gov-infobar[variant=error][inverse=""],.gov-infobar[variant=error][inverse=true i],.gov-infobar[variant=error][inverse="1"]{border-bottom:var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white))}.gov-infobar[variant=error][inverse=""] .gov-infobar__icon,.gov-infobar[variant=error][inverse=true i] .gov-infobar__icon,.gov-infobar[variant=error][inverse="1"] .gov-infobar__icon{color:var(--gov-infobar-error-bg-color, var(--gov-color-error))}.gov-infobar[variant=error][inverse=""] .gov-infobar__content,.gov-infobar[variant=error][inverse=true i] .gov-infobar__content,.gov-infobar[variant=error][inverse="1"] .gov-infobar__content{color:var(--gov-infobar-inverse-color, var(--gov-color-secondary-800))}.gov-infobar[variant=secondary]{background-color:var(--gov-infobar-secondary-bg-color, var(--gov-color-secondary))}.gov-infobar[variant=secondary] .gov-infobar__icon{color:var(--gov-infobar-secondary-icon-color, var(--gov-color-neutral-white))}.gov-infobar[variant=secondary] .gov-infobar__content{color:var(--gov-infobar-secondary-text-color, var(--gov-color-neutral-white))}.gov-infobar[variant=secondary][inverse=""],.gov-infobar[variant=secondary][inverse=true i],.gov-infobar[variant=secondary][inverse="1"]{border-bottom:var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white))}.gov-infobar[variant=secondary][inverse=""] .gov-infobar__icon,.gov-infobar[variant=secondary][inverse=true i] .gov-infobar__icon,.gov-infobar[variant=secondary][inverse="1"] .gov-infobar__icon{color:var(--gov-infobar-secondary-bg-color, var(--gov-color-secondary))}.gov-infobar[variant=secondary][inverse=""] .gov-infobar__content,.gov-infobar[variant=secondary][inverse=true i] .gov-infobar__content,.gov-infobar[variant=secondary][inverse="1"] .gov-infobar__content{color:var(--gov-infobar-inverse-color, var(--gov-color-secondary-800))}.gov-infobar[variant=success]{background-color:var(--gov-infobar-success-bg-color, var(--gov-color-success-500))}.gov-infobar[variant=success] .gov-infobar__icon{color:var(--gov-infobar-success-icon-color, var(--gov-color-neutral-white))}.gov-infobar[variant=success] .gov-infobar__content{color:var(--gov-infobar-success-text-color, var(--gov-color-neutral-white))}.gov-infobar[variant=success][inverse=""],.gov-infobar[variant=success][inverse=true i],.gov-infobar[variant=success][inverse="1"]{border-bottom:var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white))}.gov-infobar[variant=success][inverse=""] .gov-infobar__icon,.gov-infobar[variant=success][inverse=true i] .gov-infobar__icon,.gov-infobar[variant=success][inverse="1"] .gov-infobar__icon{color:var(--gov-infobar-success-bg-color, var(--gov-color-success-500))}.gov-infobar[variant=success][inverse=""] .gov-infobar__content,.gov-infobar[variant=success][inverse=true i] .gov-infobar__content,.gov-infobar[variant=success][inverse="1"] .gov-infobar__content{color:var(--gov-infobar-inverse-color, var(--gov-color-secondary-800))}.gov-infobar[variant=primary]{background-color:var(--gov-infobar-primary-bg-color, var(--gov-color-primary))}.gov-infobar[variant=primary] .gov-infobar__icon{color:var(--gov-infobar-primary-icon-color, var(--gov-color-neutral-white))}.gov-infobar[variant=primary] .gov-infobar__content{color:var(--gov-infobar-primary-text-color, var(--gov-color-neutral-white))}.gov-infobar[variant=primary][inverse=""],.gov-infobar[variant=primary][inverse=true i],.gov-infobar[variant=primary][inverse="1"]{border-bottom:var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white))}.gov-infobar[variant=primary][inverse=""] .gov-infobar__icon,.gov-infobar[variant=primary][inverse=true i] .gov-infobar__icon,.gov-infobar[variant=primary][inverse="1"] .gov-infobar__icon{color:var(--gov-infobar-primary-bg-color, var(--gov-color-primary))}.gov-infobar[variant=primary][inverse=""] .gov-infobar__content,.gov-infobar[variant=primary][inverse=true i] .gov-infobar__content,.gov-infobar[variant=primary][inverse="1"] .gov-infobar__content{color:var(--gov-infobar-inverse-color, var(--gov-color-secondary-800))}';const p=h;const y=o(class o extends r{constructor(){super();this.__registerHost();this.govClose=a(this,"gov-close",7);this.headline=undefined;this.variant="primary";this.role=undefined;this.inverse=false;this.wcagCloseLabel="Zavřít informační lištu";this.wcagToggleLabel="Zobrazit více informací";this.closable=false;this.toggleContent=false;this.h=e(this.host)}validateVariant(o){s(m,o,u.root)}componentWillLoad(){this.validateVariant(this.variant)}async componentDidRender(){if(t()){await f(500);await this.validateWcag()}}render(){let o=!this.inverse;let r=this.inverse?"secondary":this.variant;if(this.variant=="warning"){o=false;r="secondary"}const a=n("div",{key:"77b4d53e93469ca4325f5af65c8fc90efa44e821",class:u.close},n("gov-button",{key:"5e8fc17fb25637229c1d5c122edb032ac9eade08",size:"s",wcagLabel:this.wcagCloseLabel,type:"base",variant:r,inverse:o,"on-gov-click":this.onCloseHandler.bind(this)},n("gov-icon",{key:"45a33018478d0ef04211313a10857a7d2ad6e66a",name:"x-lg"})));return n(i,{key:"bbcca556a269756e86610ac5730d780afc10dd1f",class:this.h.classes(u.root),variant:this.variant},n("section",{key:"03af203186f5dabafa3871a27ecef1064dc62138",class:u.section,role:this.role},this.h.hasSlot("icon")&&n("div",{key:"2aa3131f8489eb94a3cf18c58af98c25ea6c6295",class:u.icon},n("slot",{key:"4c81fa3be4aff480578222c3e65f84e51117b221",name:"icon"})),n("div",{key:"190f4f6b6d5b6962551e310a081f765b572b24e9",class:u.content+(this.closable?" "+u.closable:"")},this.headline?n(c,null,n("div",{class:u.headline},n("p",null,this.headline),n("gov-button",{size:"s",wcagLabel:this.wcagToggleLabel,type:"base",variant:r,inverse:o,"on-gov-click":()=>this.toggleContent=!this.toggleContent},n("gov-icon",{name:this.toggleContent?"chevron-up":"chevron-down"}))),n("div",{hidden:!this.toggleContent,"aria-hidden":v(this.toggleContent)},n("slot",null))):n("slot",null))),this.closable&&a)}onCloseHandler(o){this.govClose.emit({component:u.root,ref:this.host,originalEvent:o})}async validateWcag(){if(this.closable){g(this.wcagCloseLabel,"wcag-close-label",u.root)}if(this.headline){g(this.wcagToggleLabel,"wcag-toggle-label",u.root)}}get host(){return this}static get watchers(){return{variant:["validateVariant"]}}static get style(){return p}},[4,"gov-infobar",{headline:[1],variant:[1],role:[1],inverse:[4],wcagCloseLabel:[1,"wcag-close-label"],wcagToggleLabel:[1,"wcag-toggle-label"],closable:[4],toggleContent:[32],validateWcag:[64]},undefined,{variant:["validateVariant"]}]);function w(){if(typeof customElements==="undefined"){return}const o=["gov-infobar","gov-button","gov-icon"];o.forEach((o=>{switch(o){case"gov-infobar":if(!customElements.get(o)){customElements.define(o,y)}break;case"gov-button":if(!customElements.get(o)){d()}break;case"gov-icon":if(!customElements.get(o)){_()}break}}))}w();const k=y;const x=w;export{k as GovInfobar,x as defineCustomElement};
1
+ import{p as o,H as r,c as a,h as n,d as i}from"./p-d6759ac3.js";import{g as e,a as v}from"./p-d687df8f.js";import{c as t}from"./p-e618f1cb.js";import{F as c}from"./p-1c1d0bbe.js";import{v as s}from"./p-344c72d7.js";import{a as g}from"./p-6b0471a8.js";import{p as b,d as f}from"./p-e0e2e9c1.js";import{V as l}from"./p-03dbb8b1.js";import{d}from"./p-8977b759.js";import{d as _}from"./p-2dce8f2c.js";const m=b(l,["PRIMARY","SECONDARY","WARNING","ERROR","SUCCESS"]);const u={root:"gov-infobar",section:"gov-infobar__section",icon:"gov-infobar__icon",content:"gov-infobar__content",closable:"gov-infobar__content--closable",headline:"gov-infobar__headline",close:"gov-infobar__close"};const h='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-infobar{position:relative;display:block;width:100%}.gov-infobar__section{display:flex;gap:1rem;padding:1rem}.gov-infobar__icon{flex:0 0 auto}.gov-infobar__icon>*{width:1.25rem;height:1.25rem}.gov-infobar__headline{display:flex;gap:1rem}.gov-infobar__headline+div{margin-top:0.5rem}.gov-infobar__headline p{margin-bottom:0}.gov-infobar__headline gov-button{margin-top:-0.25rem}.gov-infobar__content{width:100%}.gov-infobar__content>*:last-child{margin-bottom:0}.gov-infobar__content--closable{padding-right:3.5rem}.gov-infobar__content p{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}.gov-infobar__content a{color:inherit}@media not all and (pointer: coarse){.gov-infobar__content a:hover{color:inherit}}.gov-infobar__content a .gov-icon{color:inherit}.gov-infobar__close{position:absolute;top:0.875rem;right:1rem}.gov-infobar[variant=warning]{background-color:var(--gov-infobar-warning-bg-color, var(--gov-color-warning))}.gov-infobar[variant=warning] .gov-infobar__icon{color:var(--gov-infobar-warning-icon-color, var(--gov-color-secondary))}.gov-infobar[variant=warning] .gov-infobar__content{color:var(--gov-infobar-warning-text-color, var(--gov-color-secondary))}.gov-infobar[variant=warning][inverse=""],.gov-infobar[variant=warning][inverse=true i],.gov-infobar[variant=warning][inverse="1"]{border-bottom:var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white))}.gov-infobar[variant=warning][inverse=""] .gov-infobar__icon,.gov-infobar[variant=warning][inverse=true i] .gov-infobar__icon,.gov-infobar[variant=warning][inverse="1"] .gov-infobar__icon{color:var(--gov-infobar-warning-bg-color, var(--gov-color-warning))}.gov-infobar[variant=warning][inverse=""] .gov-infobar__content,.gov-infobar[variant=warning][inverse=true i] .gov-infobar__content,.gov-infobar[variant=warning][inverse="1"] .gov-infobar__content{color:var(--gov-infobar-inverse-color, var(--gov-color-secondary-800))}.gov-infobar[variant=error]{background-color:var(--gov-infobar-error-bg-color, var(--gov-color-error))}.gov-infobar[variant=error] .gov-infobar__icon{color:var(--gov-infobar-error-icon-color, var(--gov-color-neutral-white))}.gov-infobar[variant=error] .gov-infobar__content{color:var(--gov-infobar-error-text-color, var(--gov-color-neutral-white))}.gov-infobar[variant=error][inverse=""],.gov-infobar[variant=error][inverse=true i],.gov-infobar[variant=error][inverse="1"]{border-bottom:var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white))}.gov-infobar[variant=error][inverse=""] .gov-infobar__icon,.gov-infobar[variant=error][inverse=true i] .gov-infobar__icon,.gov-infobar[variant=error][inverse="1"] .gov-infobar__icon{color:var(--gov-infobar-error-bg-color, var(--gov-color-error))}.gov-infobar[variant=error][inverse=""] .gov-infobar__content,.gov-infobar[variant=error][inverse=true i] .gov-infobar__content,.gov-infobar[variant=error][inverse="1"] .gov-infobar__content{color:var(--gov-infobar-inverse-color, var(--gov-color-secondary-800))}.gov-infobar[variant=secondary]{background-color:var(--gov-infobar-secondary-bg-color, var(--gov-color-secondary))}.gov-infobar[variant=secondary] .gov-infobar__icon{color:var(--gov-infobar-secondary-icon-color, var(--gov-color-neutral-white))}.gov-infobar[variant=secondary] .gov-infobar__content{color:var(--gov-infobar-secondary-text-color, var(--gov-color-neutral-white))}.gov-infobar[variant=secondary][inverse=""],.gov-infobar[variant=secondary][inverse=true i],.gov-infobar[variant=secondary][inverse="1"]{border-bottom:var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white))}.gov-infobar[variant=secondary][inverse=""] .gov-infobar__icon,.gov-infobar[variant=secondary][inverse=true i] .gov-infobar__icon,.gov-infobar[variant=secondary][inverse="1"] .gov-infobar__icon{color:var(--gov-infobar-secondary-bg-color, var(--gov-color-secondary))}.gov-infobar[variant=secondary][inverse=""] .gov-infobar__content,.gov-infobar[variant=secondary][inverse=true i] .gov-infobar__content,.gov-infobar[variant=secondary][inverse="1"] .gov-infobar__content{color:var(--gov-infobar-inverse-color, var(--gov-color-secondary-800))}.gov-infobar[variant=success]{background-color:var(--gov-infobar-success-bg-color, var(--gov-color-success-500))}.gov-infobar[variant=success] .gov-infobar__icon{color:var(--gov-infobar-success-icon-color, var(--gov-color-neutral-white))}.gov-infobar[variant=success] .gov-infobar__content{color:var(--gov-infobar-success-text-color, var(--gov-color-neutral-white))}.gov-infobar[variant=success][inverse=""],.gov-infobar[variant=success][inverse=true i],.gov-infobar[variant=success][inverse="1"]{border-bottom:var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white))}.gov-infobar[variant=success][inverse=""] .gov-infobar__icon,.gov-infobar[variant=success][inverse=true i] .gov-infobar__icon,.gov-infobar[variant=success][inverse="1"] .gov-infobar__icon{color:var(--gov-infobar-success-bg-color, var(--gov-color-success-500))}.gov-infobar[variant=success][inverse=""] .gov-infobar__content,.gov-infobar[variant=success][inverse=true i] .gov-infobar__content,.gov-infobar[variant=success][inverse="1"] .gov-infobar__content{color:var(--gov-infobar-inverse-color, var(--gov-color-secondary-800))}.gov-infobar[variant=primary]{background-color:var(--gov-infobar-primary-bg-color, var(--gov-color-primary))}.gov-infobar[variant=primary] .gov-infobar__icon{color:var(--gov-infobar-primary-icon-color, var(--gov-color-neutral-white))}.gov-infobar[variant=primary] .gov-infobar__content{color:var(--gov-infobar-primary-text-color, var(--gov-color-neutral-white))}.gov-infobar[variant=primary][inverse=""],.gov-infobar[variant=primary][inverse=true i],.gov-infobar[variant=primary][inverse="1"]{border-bottom:var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white))}.gov-infobar[variant=primary][inverse=""] .gov-infobar__icon,.gov-infobar[variant=primary][inverse=true i] .gov-infobar__icon,.gov-infobar[variant=primary][inverse="1"] .gov-infobar__icon{color:var(--gov-infobar-primary-bg-color, var(--gov-color-primary))}.gov-infobar[variant=primary][inverse=""] .gov-infobar__content,.gov-infobar[variant=primary][inverse=true i] .gov-infobar__content,.gov-infobar[variant=primary][inverse="1"] .gov-infobar__content{color:var(--gov-infobar-inverse-color, var(--gov-color-secondary-800))}';const p=h;const y=o(class o extends r{constructor(){super();this.__registerHost();this.govClose=a(this,"gov-close",7);this.headline=undefined;this.variant="primary";this.role=undefined;this.inverse=false;this.wcagCloseLabel="Zavřít informační lištu";this.wcagToggleLabel="Zobrazit více informací";this.closable=false;this.toggleContent=false;this.h=e(this.host)}validateVariant(o){s(m,o,u.root)}componentWillLoad(){this.validateVariant(this.variant)}async componentDidRender(){if(t()){await f(500);await this.validateWcag()}}render(){let o=!this.inverse;let r=this.inverse?"secondary":this.variant;if(this.variant=="warning"){o=false;r="secondary"}const a=n("div",{key:"77b4d53e93469ca4325f5af65c8fc90efa44e821",class:u.close},n("gov-button",{key:"5e8fc17fb25637229c1d5c122edb032ac9eade08",size:"s",wcagLabel:this.wcagCloseLabel,type:"base",variant:r,inverse:o,"on-gov-click":this.onCloseHandler.bind(this)},n("gov-icon",{key:"45a33018478d0ef04211313a10857a7d2ad6e66a",name:"x-lg"})));return n(i,{key:"bbcca556a269756e86610ac5730d780afc10dd1f",class:this.h.classes(u.root),variant:this.variant},n("section",{key:"03af203186f5dabafa3871a27ecef1064dc62138",class:u.section,role:this.role},this.h.hasSlot("icon")&&n("div",{key:"2aa3131f8489eb94a3cf18c58af98c25ea6c6295",class:u.icon},n("slot",{key:"4c81fa3be4aff480578222c3e65f84e51117b221",name:"icon"})),n("div",{key:"190f4f6b6d5b6962551e310a081f765b572b24e9",class:u.content+(this.closable?" "+u.closable:"")},this.headline?n(c,null,n("div",{class:u.headline},n("p",null,this.headline),n("gov-button",{size:"s",wcagLabel:this.wcagToggleLabel,type:"base",variant:r,inverse:o,"on-gov-click":()=>this.toggleContent=!this.toggleContent},n("gov-icon",{name:this.toggleContent?"chevron-up":"chevron-down"}))),n("div",{hidden:!this.toggleContent,"aria-hidden":v(this.toggleContent)},n("slot",null))):n("slot",null))),this.closable&&a)}onCloseHandler(o){this.govClose.emit({component:u.root,ref:this.host,originalEvent:o})}async validateWcag(){if(this.closable){g(this.wcagCloseLabel,"wcag-close-label",u.root)}if(this.headline){g(this.wcagToggleLabel,"wcag-toggle-label",u.root)}}get host(){return this}static get watchers(){return{variant:["validateVariant"]}}static get style(){return p}},[4,"gov-infobar",{headline:[1],variant:[1],role:[1],inverse:[4],wcagCloseLabel:[1,"wcag-close-label"],wcagToggleLabel:[1,"wcag-toggle-label"],closable:[4],toggleContent:[32],validateWcag:[64]},undefined,{variant:["validateVariant"]}]);function w(){if(typeof customElements==="undefined"){return}const o=["gov-infobar","gov-button","gov-icon"];o.forEach((o=>{switch(o){case"gov-infobar":if(!customElements.get(o)){customElements.define(o,y)}break;case"gov-button":if(!customElements.get(o)){d()}break;case"gov-icon":if(!customElements.get(o)){_()}break}}))}w();const k=y;const x=w;export{k as GovInfobar,x as defineCustomElement};
2
2
  //# sourceMappingURL=gov-infobar.js.map
@@ -1,2 +1,2 @@
1
- import{p as o,H as e,h as n,d as a}from"./p-d6759ac3.js";import{g as t,p as i}from"./p-d687df8f.js";import{d as s}from"./p-92c6c6aa.js";import{d as c}from"./p-d2a0ad9c.js";const r={root:"gov-loading",content:"gov-loading__content",icon:"gov-loading__icon"};const d=".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-loading{display:block}.gov-loading__content{z-index:101;position:fixed;top:50%;left:50%;display:flex;gap:1rem;flex-direction:column;align-items:center;min-width:9.6875rem;padding:1.5rem;border-radius:0.5rem;background:var(--gov-loading-bg, rgba(var(--gov-color-secondary-400-rgb), 0.8));color:var(--gov-loading-color, var(--gov-color-primary));text-align:center;transform:translate(-50%, -50%)}.gov-loading__icon{width:4rem;height:4rem;line-height:1}.gov-loading__icon svg{width:100%;height:100%}";const g=d;const l=o(class o extends e{constructor(){super();this.__registerHost();this.h=t(this.host)}render(){return n(a,{key:"07e1abd92428555bc7651af43bb1beed4be6585c",class:this.h.classes(r.root)},n("div",{key:"849c10645767b3f3c2e0caa688b57a5454dc4178",class:r.content},n("gov-icon",{key:"c4175ff66bf22dadb3b6779d9efede6dbb6f85e9",class:i([r.icon,"gov-spin-animation"]),name:"loader"}),n("slot",{key:"03e90ff98d83cd748e7b541b579df93de2bcf073"})),n("gov-backdrop",{key:"cbc72236c34803588c4ab1cdcb14f8a420d37238",inverse:true}))}get host(){return this}static get style(){return g}},[4,"gov-loading"]);function m(){if(typeof customElements==="undefined"){return}const o=["gov-loading","gov-backdrop","gov-icon"];o.forEach((o=>{switch(o){case"gov-loading":if(!customElements.get(o)){customElements.define(o,l)}break;case"gov-backdrop":if(!customElements.get(o)){s()}break;case"gov-icon":if(!customElements.get(o)){c()}break}}))}m();const f=l;const p=m;export{f as GovLoading,p as defineCustomElement};
1
+ import{p as o,H as e,h as n,d as a}from"./p-d6759ac3.js";import{g as t,p as i}from"./p-d687df8f.js";import{d as s}from"./p-92c6c6aa.js";import{d as c}from"./p-2dce8f2c.js";const r={root:"gov-loading",content:"gov-loading__content",icon:"gov-loading__icon"};const d=".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-loading{display:block}.gov-loading__content{z-index:101;position:fixed;top:50%;left:50%;display:flex;gap:1rem;flex-direction:column;align-items:center;min-width:9.6875rem;padding:1.5rem;border-radius:0.5rem;background:var(--gov-loading-bg, rgba(var(--gov-color-secondary-400-rgb), 0.8));color:var(--gov-loading-color, var(--gov-color-primary));text-align:center;transform:translate(-50%, -50%)}.gov-loading__icon{width:4rem;height:4rem;line-height:1}.gov-loading__icon svg{width:100%;height:100%}";const g=d;const l=o(class o extends e{constructor(){super();this.__registerHost();this.h=t(this.host)}render(){return n(a,{key:"07e1abd92428555bc7651af43bb1beed4be6585c",class:this.h.classes(r.root)},n("div",{key:"849c10645767b3f3c2e0caa688b57a5454dc4178",class:r.content},n("gov-icon",{key:"c4175ff66bf22dadb3b6779d9efede6dbb6f85e9",class:i([r.icon,"gov-spin-animation"]),name:"loader"}),n("slot",{key:"03e90ff98d83cd748e7b541b579df93de2bcf073"})),n("gov-backdrop",{key:"cbc72236c34803588c4ab1cdcb14f8a420d37238",inverse:true}))}get host(){return this}static get style(){return g}},[4,"gov-loading"]);function m(){if(typeof customElements==="undefined"){return}const o=["gov-loading","gov-backdrop","gov-icon"];o.forEach((o=>{switch(o){case"gov-loading":if(!customElements.get(o)){customElements.define(o,l)}break;case"gov-backdrop":if(!customElements.get(o)){s()}break;case"gov-icon":if(!customElements.get(o)){c()}break}}))}m();const f=l;const p=m;export{f as GovLoading,p as defineCustomElement};
2
2
  //# sourceMappingURL=gov-loading.js.map
@@ -1,2 +1,2 @@
1
- import{p as o,H as e,c as a,h as t,d as i}from"./p-d6759ac3.js";import{g as s,d,a as l}from"./p-d687df8f.js";import{c as r}from"./p-e618f1cb.js";import{a as c}from"./p-e296ca83.js";import{b as n}from"./p-6b0471a8.js";import{c as m}from"./p-95d41a3b.js";import{d as g}from"./p-e0e2e9c1.js";import{M as h}from"./p-0134b442.js";import{d as b}from"./p-92c6c6aa.js";import{d as v}from"./p-90ebe1d9.js";import{d as f}from"./p-d2a0ad9c.js";const p='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-modal{display:none}.gov-modal__dialog{z-index:101;position:fixed;top:50%;left:50%;display:flex;justify-content:center;align-items:center;width:100%;max-width:var(--gov-modal-max-width, 52.5rem);height:100%;padding:0.5rem;border:none;background:transparent;transform:translate(-50%, -50%);pointer-events:none}.gov-modal__inner{position:relative;display:flex;flex-direction:column;width:100%;max-height:100%;border-radius:var(--gov-border-radius, 0.1875rem);background:var(--gov-modal-bg, var(--gov-color-neutral-white));overflow:hidden;pointer-events:auto;box-shadow:0 0 1.5rem rgba(var(--gov-color-secondary-800-rgb), 0.24)}.gov-modal__header{display:flex;gap:1rem;align-items:flex-start;padding:1.5rem 1rem;border-bottom:var(--gov-modal-border-color, 0.0625rem solid var(--gov-color-secondary-500))}.gov-modal__icon{flex:0 0 auto;padding-top:calc((var(--gov-text-3xl-font-size) * 1.5 - 1.5rem) / 2)}.gov-modal__icon>*{width:1.5rem;height:1.5rem}.gov-modal__title{font-weight:var(--gov-text-3xl-font-weight);font-size:var(--gov-text-3xl-font-size);line-height:var(--gov-text-3xl-line-height);letter-spacing:var(--gov-text-3xl-letter-spacing);margin:0}.gov-modal__close{flex:0 0 auto;margin-left:auto}.gov-modal__content{height:100%;padding:1.5rem 1rem;color:var(--gov-modal-text-color, var(--gov-color-secondary-700));overflow:auto}.gov-modal__content>*:last-child{margin-bottom:0}.gov-modal__footer,.gov-modal__actions{padding:1.5rem 1rem;border-top:var(--gov-modal-border-color, 0.0625rem solid var(--gov-color-secondary-500))}.gov-modal__actions{display:flex;gap:0.5rem 1rem;flex-wrap:wrap;justify-content:flex-end}.gov-modal__dialog:focus .gov-modal__inner{outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base)}.gov-modal[open=""],.gov-modal[open=true i],.gov-modal[open="1"]{display:block}@media (min-width: 30em){.gov-modal__dialog{max-width:calc(var(--gov-modal-max-width, 52.5rem) + 3rem);padding:1.5rem}.gov-modal__dialog:focus{outline-offset:-1.5rem}.gov-modal__inner{box-shadow:0 0 2rem rgba(var(--gov-color-secondary-800-rgb), 0.32)}.gov-modal--prompt .gov-modal__dialog{max-width:calc(var(--gov-modal-prompt-max-width, 33.125rem) + 3rem)}}@media (min-width: 48em){.gov-modal__header{gap:1.25rem;padding:2rem 2.5rem 2rem 3rem}.gov-modal__content{padding:2rem 3rem}.gov-modal__footer{padding:1rem 3rem}.gov-modal--prompt .gov-modal__header,.gov-modal--prompt .gov-modal__content,.gov-modal--prompt .gov-modal__footer,.gov-modal--prompt .gov-modal__actions{padding:1.5rem}}';const u=p;const y=o(class o extends e{constructor(){super();this.__registerHost();this.govClose=a(this,"gov-close",7);this.open=false;this.blockClose=false;this.blockBackdropClose=false;this.blockButtonClose=false;this.label=undefined;this.role="dialog";this.labelTag="h2";this.wcagLabelledBy=undefined;this.wcagDescribedBy=undefined;this.wcagCloseLabel="Zavřít okno";this.wcagCloseLabelledBy=undefined;this.h=s(this.host);this.labelId=m("GovModalLabel");this.contentId=m("GovModalContent")}validateLabelTag(o){const e=["h1","h2","h3","h4","h5","h6"];if(o){if(!e.includes(o)){c(`[${h.root}]: Tag ${o} is not allowed.`)}}}watchOpen(o){this.open=o;if(o&&this.closeCtaRef){this.closeCtaRef.setFocus().catch()}}showModal(){this.open=true;document.body.classList.add(h.bodyFix)}hideModal(){this.open=false;document.body.classList.remove(h.bodyFix)}async componentWillRender(){if(this.open){this.showModal()}else{this.hideModal()}}async componentDidRender(){if(r()){await g(500);await this.validateWcag()}}render(){const o=this.labelTag;return t(i,{key:"e1525cfa3cdd7b0efeb2385b25a04ea8dbd49bc7",class:this.h.classes(h.root),open:this.open},t("dialog",{key:"a1116333c938d11049de61a9531109f346297734",class:h.dialog,hidden:!this.open,tabindex:d(this.open),open:this.open,"aria-modal":"true","aria-hidden":l(!this.open),"aria-labelledby":this.wcagLabelledBy||this.labelId,"aria-describedby":this.wcagDescribedBy||this.contentId,role:this.role},t("div",{key:"952ca6b5e7d1f4dcc59e09c1495f9aa9a96e56fb",class:h.inner},t("div",{key:"b00890579ccd683cd171a6200e972e0f02b5b4d3",class:h.header},this.h.hasSlot("icon")&&t("div",{key:"7bcf03a0f1c475b0c3553854c885b3d0900894db",class:h.icon},t("slot",{key:"527c8a9e77dbb2568510b6765634db0234039f8f",name:"icon"})),this.label&&t(o,{key:"c96b0339fcc61ba3f834d35926f6ef13419a901a",class:h.title,id:this.labelId},this.label),!(this.blockButtonClose||this.blockClose)?t("gov-button",{ref:o=>this.closeCtaRef=o,disabled:this.blockClose,class:h.close,variant:"primary",wcagLabel:this.wcagCloseLabel,wcagLabelledBy:this.wcagCloseLabelledBy,type:"base","on-gov-click":this.onCloseHandler.bind(this)},t("gov-icon",{name:"x-lg"})):null),t("div",{key:"47e940a5bf64b87ec065f6c0977546603ca9bb11",class:h.content,id:this.contentId},t("slot",{key:"bc97ebe004ffb446c71a4bc0c8086af5d63cf3ec"})),this.h.hasSlot("footer")&&t("div",{key:"c48e97d8c9f597cc544d5e567cb0d679186b868e",class:h.footer},t("slot",{key:"7c9165dca0a9e20eef86e1937704c0f4154fcfb8",name:"footer"})))),this.open?t("gov-backdrop",{"wcag-label":this.wcagCloseLabel,"wcag-labelled-by":this.wcagCloseLabelledBy,"on-gov-click":o=>!this.blockBackdropClose&&this.onCloseHandler(o)}):null)}onCloseHandler(o){o.stopPropagation();if(this.blockClose===false){this.hideModal();this.govClose.emit(o)}}async show(){this.showModal()}async hide(){this.hideModal()}async validateWcag(){n(this.wcagLabelledBy,"wcag-labelled-by",h.root);n(this.wcagDescribedBy,"wcag-described-by",h.root)}get host(){return this}static get watchers(){return{labelTag:["validateLabelTag"],open:["watchOpen"]}}static get style(){return u}},[4,"gov-modal",{open:[1028],blockClose:[4,"block-close"],blockBackdropClose:[4,"block-backdrop-close"],blockButtonClose:[4,"block-button-close"],label:[1],role:[1],labelTag:[1,"label-tag"],wcagLabelledBy:[1,"wcag-labelled-by"],wcagDescribedBy:[1,"wcag-described-by"],wcagCloseLabel:[1,"wcag-close-label"],wcagCloseLabelledBy:[1,"wcag-close-labelled-by"],show:[64],hide:[64],validateWcag:[64]},undefined,{labelTag:["validateLabelTag"],open:["watchOpen"]}]);function _(){if(typeof customElements==="undefined"){return}const o=["gov-modal","gov-backdrop","gov-button","gov-icon"];o.forEach((o=>{switch(o){case"gov-modal":if(!customElements.get(o)){customElements.define(o,y)}break;case"gov-backdrop":if(!customElements.get(o)){b()}break;case"gov-button":if(!customElements.get(o)){v()}break;case"gov-icon":if(!customElements.get(o)){f()}break}}))}_();const w=y;const k=_;export{w as GovModal,k as defineCustomElement};
1
+ import{p as o,H as e,c as a,h as t,d as i}from"./p-d6759ac3.js";import{g as s,d,a as l}from"./p-d687df8f.js";import{c as r}from"./p-e618f1cb.js";import{a as c}from"./p-e296ca83.js";import{b as n}from"./p-6b0471a8.js";import{c as m}from"./p-95d41a3b.js";import{d as g}from"./p-e0e2e9c1.js";import{M as h}from"./p-0134b442.js";import{d as b}from"./p-92c6c6aa.js";import{d as v}from"./p-8977b759.js";import{d as f}from"./p-2dce8f2c.js";const p='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-modal{display:none}.gov-modal__dialog{z-index:101;position:fixed;top:50%;left:50%;display:flex;justify-content:center;align-items:center;width:100%;max-width:var(--gov-modal-max-width, 52.5rem);height:100%;padding:0.5rem;border:none;background:transparent;transform:translate(-50%, -50%);pointer-events:none}.gov-modal__inner{position:relative;display:flex;flex-direction:column;width:100%;max-height:100%;border-radius:var(--gov-border-radius, 0.1875rem);background:var(--gov-modal-bg, var(--gov-color-neutral-white));overflow:hidden;pointer-events:auto;box-shadow:0 0 1.5rem rgba(var(--gov-color-secondary-800-rgb), 0.24)}.gov-modal__header{display:flex;gap:1rem;align-items:flex-start;padding:1.5rem 1rem;border-bottom:var(--gov-modal-border-color, 0.0625rem solid var(--gov-color-secondary-500))}.gov-modal__icon{flex:0 0 auto;padding-top:calc((var(--gov-text-3xl-font-size) * 1.5 - 1.5rem) / 2)}.gov-modal__icon>*{width:1.5rem;height:1.5rem}.gov-modal__title{font-weight:var(--gov-text-3xl-font-weight);font-size:var(--gov-text-3xl-font-size);line-height:var(--gov-text-3xl-line-height);letter-spacing:var(--gov-text-3xl-letter-spacing);margin:0}.gov-modal__close{flex:0 0 auto;margin-left:auto}.gov-modal__content{height:100%;padding:1.5rem 1rem;color:var(--gov-modal-text-color, var(--gov-color-secondary-700));overflow:auto}.gov-modal__content>*:last-child{margin-bottom:0}.gov-modal__footer,.gov-modal__actions{padding:1.5rem 1rem;border-top:var(--gov-modal-border-color, 0.0625rem solid var(--gov-color-secondary-500))}.gov-modal__actions{display:flex;gap:0.5rem 1rem;flex-wrap:wrap;justify-content:flex-end}.gov-modal__dialog:focus .gov-modal__inner{outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base)}.gov-modal[open=""],.gov-modal[open=true i],.gov-modal[open="1"]{display:block}@media (min-width: 30em){.gov-modal__dialog{max-width:calc(var(--gov-modal-max-width, 52.5rem) + 3rem);padding:1.5rem}.gov-modal__dialog:focus{outline-offset:-1.5rem}.gov-modal__inner{box-shadow:0 0 2rem rgba(var(--gov-color-secondary-800-rgb), 0.32)}.gov-modal--prompt .gov-modal__dialog{max-width:calc(var(--gov-modal-prompt-max-width, 33.125rem) + 3rem)}}@media (min-width: 48em){.gov-modal__header{gap:1.25rem;padding:2rem 2.5rem 2rem 3rem}.gov-modal__content{padding:2rem 3rem}.gov-modal__footer{padding:1rem 3rem}.gov-modal--prompt .gov-modal__header,.gov-modal--prompt .gov-modal__content,.gov-modal--prompt .gov-modal__footer,.gov-modal--prompt .gov-modal__actions{padding:1.5rem}}';const u=p;const y=o(class o extends e{constructor(){super();this.__registerHost();this.govClose=a(this,"gov-close",7);this.open=false;this.blockClose=false;this.blockBackdropClose=false;this.blockButtonClose=false;this.label=undefined;this.role="dialog";this.labelTag="h2";this.wcagLabelledBy=undefined;this.wcagDescribedBy=undefined;this.wcagCloseLabel="Zavřít okno";this.wcagCloseLabelledBy=undefined;this.h=s(this.host);this.labelId=m("GovModalLabel");this.contentId=m("GovModalContent")}validateLabelTag(o){const e=["h1","h2","h3","h4","h5","h6"];if(o){if(!e.includes(o)){c(`[${h.root}]: Tag ${o} is not allowed.`)}}}watchOpen(o){this.open=o;if(o&&this.closeCtaRef){this.closeCtaRef.setFocus().catch()}}showModal(){this.open=true;document.body.classList.add(h.bodyFix)}hideModal(){this.open=false;document.body.classList.remove(h.bodyFix)}async componentWillRender(){if(this.open){this.showModal()}else{this.hideModal()}}async componentDidRender(){if(r()){await g(500);await this.validateWcag()}}render(){const o=this.labelTag;return t(i,{key:"e1525cfa3cdd7b0efeb2385b25a04ea8dbd49bc7",class:this.h.classes(h.root),open:this.open},t("dialog",{key:"a1116333c938d11049de61a9531109f346297734",class:h.dialog,hidden:!this.open,tabindex:d(this.open),open:this.open,"aria-modal":"true","aria-hidden":l(!this.open),"aria-labelledby":this.wcagLabelledBy||this.labelId,"aria-describedby":this.wcagDescribedBy||this.contentId,role:this.role},t("div",{key:"952ca6b5e7d1f4dcc59e09c1495f9aa9a96e56fb",class:h.inner},t("div",{key:"b00890579ccd683cd171a6200e972e0f02b5b4d3",class:h.header},this.h.hasSlot("icon")&&t("div",{key:"7bcf03a0f1c475b0c3553854c885b3d0900894db",class:h.icon},t("slot",{key:"527c8a9e77dbb2568510b6765634db0234039f8f",name:"icon"})),this.label&&t(o,{key:"c96b0339fcc61ba3f834d35926f6ef13419a901a",class:h.title,id:this.labelId},this.label),!(this.blockButtonClose||this.blockClose)?t("gov-button",{ref:o=>this.closeCtaRef=o,disabled:this.blockClose,class:h.close,variant:"primary",wcagLabel:this.wcagCloseLabel,wcagLabelledBy:this.wcagCloseLabelledBy,type:"base","on-gov-click":this.onCloseHandler.bind(this)},t("gov-icon",{name:"x-lg"})):null),t("div",{key:"47e940a5bf64b87ec065f6c0977546603ca9bb11",class:h.content,id:this.contentId},t("slot",{key:"bc97ebe004ffb446c71a4bc0c8086af5d63cf3ec"})),this.h.hasSlot("footer")&&t("div",{key:"c48e97d8c9f597cc544d5e567cb0d679186b868e",class:h.footer},t("slot",{key:"7c9165dca0a9e20eef86e1937704c0f4154fcfb8",name:"footer"})))),this.open?t("gov-backdrop",{"wcag-label":this.wcagCloseLabel,"wcag-labelled-by":this.wcagCloseLabelledBy,"on-gov-click":o=>!this.blockBackdropClose&&this.onCloseHandler(o)}):null)}onCloseHandler(o){o.stopPropagation();if(this.blockClose===false){this.hideModal();this.govClose.emit(o)}}async show(){this.showModal()}async hide(){this.hideModal()}async validateWcag(){n(this.wcagLabelledBy,"wcag-labelled-by",h.root);n(this.wcagDescribedBy,"wcag-described-by",h.root)}get host(){return this}static get watchers(){return{labelTag:["validateLabelTag"],open:["watchOpen"]}}static get style(){return u}},[4,"gov-modal",{open:[1028],blockClose:[4,"block-close"],blockBackdropClose:[4,"block-backdrop-close"],blockButtonClose:[4,"block-button-close"],label:[1],role:[1],labelTag:[1,"label-tag"],wcagLabelledBy:[1,"wcag-labelled-by"],wcagDescribedBy:[1,"wcag-described-by"],wcagCloseLabel:[1,"wcag-close-label"],wcagCloseLabelledBy:[1,"wcag-close-labelled-by"],show:[64],hide:[64],validateWcag:[64]},undefined,{labelTag:["validateLabelTag"],open:["watchOpen"]}]);function _(){if(typeof customElements==="undefined"){return}const o=["gov-modal","gov-backdrop","gov-button","gov-icon"];o.forEach((o=>{switch(o){case"gov-modal":if(!customElements.get(o)){customElements.define(o,y)}break;case"gov-backdrop":if(!customElements.get(o)){b()}break;case"gov-button":if(!customElements.get(o)){v()}break;case"gov-icon":if(!customElements.get(o)){f()}break}}))}_();const w=y;const k=_;export{w as GovModal,k as defineCustomElement};
2
2
  //# sourceMappingURL=gov-modal.js.map
@@ -1,2 +1,2 @@
1
- import{p as o,H as e,c as t,h as r,d as a}from"./p-d6759ac3.js";import{F as n}from"./p-1c1d0bbe.js";import{v as i}from"./p-344c72d7.js";import{S as s}from"./p-92f420cb.js";import{V as c}from"./p-03dbb8b1.js";import{p as g,d as l}from"./p-e0e2e9c1.js";import{g as v,p as u,t as p}from"./p-d687df8f.js";import{a as h,v as d}from"./p-6b0471a8.js";import{c as b}from"./p-e618f1cb.js";import{c as m}from"./p-95d41a3b.js";import{c as f}from"./p-3f704a40.js";import{d as _}from"./p-90ebe1d9.js";import{d as y}from"./p-b0ff29c9.js";import{d as w}from"./p-d2a0ad9c.js";const k=g(s,["_S","_M"]);const x=g(c,["PRIMARY","SECONDARY"]);var z;(function(o){o["BUTTON"]="button";o["SELECT"]="select"})(z||(z={}));const j={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 S(o,e=1,t=10,r=10){const a=Math.ceil(o/t);if(e<1){e=1}else if(e>a){e=a}let n,i;if(a<=r){n=1;i=a}else{const o=Math.floor(r/2);const t=Math.ceil(r/2)-1;if(e<=o){n=1;i=r}else if(e+t>=a){n=a-r+1;i=a}else{n=e-o;i=e+t}}const s=(e-1)*t;const c=Math.min(s+t-1,o-1);const g=Array.from(Array(i+1-n).keys()).map((o=>n+o));return{totalItems:o,currentPage:e,pageSize:t,totalPages:a,startPage:n,endPage:i,startIndex:s,endIndex:c,pages:g}}const P=".gov-pagination__list{margin:0;padding:0}.gov-pagination__list .gov-pagination__item{margin:0;padding:0;background:none}.gov-pagination__list .gov-pagination__item::before{display:none}.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-pagination{position:relative;display:block;width:100%}.gov-pagination__list{display:flex;align-items:center;flex-wrap:wrap;font-weight:bold;text-align:center}.gov-pagination__list .gov-pagination__item{display:flex;justify-content:center;align-items:center;margin:0;padding:0.125rem;border-radius:var(--gov-border-radius, 0.1875rem);overflow:hidden}.gov-pagination__list .gov-pagination__item--arrow{display:flex}.gov-pagination__list .gov-pagination__item--select{z-index:1;display:flex;overflow:visible;padding:0rem 1rem}.gov-pagination__arrow{margin:0}.gov-pagination__item--more .gov-form-select select{border:none !important;padding-right:0.75rem !important}.gov-pagination__item--more .gov-form-select .gov-icon{display:none}.gov-pagination__inner{display:flex;justify-content:center;align-items:center;align-self:stretch;width:100%;text-decoration:none}.gov-pagination__inner[wcag-current=true][type=solid][variant=primary] .element{background-color:var(--gov-button-primary-solid-hover-bg, var(--gov-color-primary-700));color:var(--gov-button-primary-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=primary] .element{background-color:var(--gov-button-primary-outlined-hover-bg, var(--gov-color-primary-100));color:var(--gov-button-primary-outlined-hover-color, var(--gov-color-primary))}.gov-pagination__inner[wcag-current=true][type=base][variant=primary] .element{background-color:var(--gov-button-primary-base-hover-bg, var(--gov-color-primary-100));color:var(--gov-button-primary-base-hover-color, var(--gov-color-primary))}.gov-pagination__inner[wcag-current=true][type=link][variant=primary] .element{background-color:var(--gov-button-primary-link-hover-bg, transparent);color:var(--gov-button-primary-link-hover-color, var(--gov-color-primary))}.gov-pagination__inner[wcag-current=true][type=solid][variant=secondary] .element{background-color:var(--gov-button-secondary-solid-hover-bg, var(--gov-color-secondary-900));color:var(--gov-button-secondary-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=secondary] .element{background-color:var(--gov-button-secondary-outlined-hover-bg, var(--gov-color-secondary-300));color:var(--gov-button-secondary-outlined-hover-color, var(--gov-color-secondary))}.gov-pagination__inner[wcag-current=true][type=base][variant=secondary] .element{background-color:var(--gov-button-secondary-base-hover-bg, var(--gov-color-secondary-300));color:var(--gov-button-secondary-base-hover-color, var(--gov-color-secondary))}.gov-pagination__inner[wcag-current=true][type=link][variant=secondary] .element{background-color:var(--gov-button-secondary-link-hover-bg, transparent);color:var(--gov-button-secondary-link-hover-color, var(--gov-color-secondary))}.gov-pagination__inner[wcag-current=true][type=solid][variant=error] .element{background-color:var(--gov-button-error-solid-hover-bg, var(--gov-color-error-500));color:var(--gov-button-error-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=error] .element{background-color:var(--gov-button-error-outlined-hover-bg, var(--gov-color-error-100));color:var(--gov-button-error-outlined-hover-color, var(--gov-color-error))}.gov-pagination__inner[wcag-current=true][type=base][variant=error] .element{background-color:var(--gov-button-error-base-hover-bg, var(--gov-color-error-100));color:var(--gov-button-error-base-hover-color, var(--gov-color-error))}.gov-pagination__inner[wcag-current=true][type=link][variant=error] .element{background-color:var(--gov-button-error-link-hover-bg, transparent);color:var(--gov-button-error-link-hover-color, var(--gov-color-error))}.gov-pagination__inner[wcag-current=true][type=solid][variant=success] .element{background-color:var(--gov-button-success-solid-hover-bg, var(--gov-color-success-600));color:var(--gov-button-success-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=success] .element{background-color:var(--gov-button-success-outlined-hover-bg, var(--gov-color-success-100));color:var(--gov-button-success-outlined-hover-color, var(--gov-color-success-500))}.gov-pagination__inner[wcag-current=true][type=base][variant=success] .element{background-color:var(--gov-button-success-base-hover-bg, var(--gov-color-success-100));color:var(--gov-button-success-base-hover-color, var(--gov-color-success-500))}.gov-pagination__inner[wcag-current=true][type=link][variant=success] .element{background-color:var(--gov-button-success-link-hover-bg, transparent);color:var(--gov-button-success-link-hover-color, var(--gov-color-success-500))}.gov-pagination__inner[wcag-current=true][type=solid][variant=warning] .element{background-color:var(--gov-button-warning-solid-hover-bg, var(--gov-color-warning-600));color:var(--gov-button-warning-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=warning] .element{background-color:var(--gov-button-warning-outlined-hover-bg, var(--gov-color-warning-200));color:var(--gov-button-warning-outlined-hover-color, var(--gov-color-warning-500))}.gov-pagination__inner[wcag-current=true][type=base][variant=warning] .element{background-color:var(--gov-button-warning-base-hover-bg, var(--gov-color-warning-200));color:var(--gov-button-warning-base-hover-color, var(--gov-color-warning-500))}.gov-pagination__inner[wcag-current=true][type=link][variant=warning] .element{background-color:var(--gov-button-warning-link-hover-bg, transparent);color:var(--gov-button-warning-link-hover-color, var(--gov-color-warning-500))}.gov-pagination[size=s] .gov-pagination__inner{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);font-weight:inherit}.gov-pagination[size=s] .gov-pagination__inner .element{min-width:var(--gov-pagination-s-button-size, 2rem)}.gov-pagination[size=m] .gov-pagination__inner{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);font-weight:inherit}.gov-pagination[size=m] .gov-pagination__inner .element{min-width:var(--gov-pagination-m-button-size, 2.5rem)}";const E=P;const A=o(class o extends e{constructor(){super();this.__registerHost();this.govPage=t(this,"gov-page",7);this.type="button";this.current=1;this.total=0;this.inverse=undefined;this.selectIdentifier=undefined;this.size="m";this.variant="primary";this.pageSize=10;this.maxPages=5;this.link=undefined;this.wcagLabel=undefined;this.wcagLabelledBy=undefined;this.wcagSelectLabel="Vybrat stranu";this.wcagPageLabel="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.h=v(this.host);this.pageSelectId=m("GovPageSelect");this.selectId=m("GovSelect")}validateType(o){i(z,o,j.root)}validateSize(o){i(k,o,j.root)}validateVariant(o){i(x,o,j.root)}recalculate(){this.recalculatePagination(this.current)}componentWillLoad(){this.recalculatePagination(this.current);this.validateSize(this.size);this.validateVariant(this.variant)}async componentDidRender(){if(b()){await l(500);await this.validateWcag()}}recalculatePagination(o){this.pagination=S(this.total,o,this.pageSize,this.maxPages)}isActivePageClass(o,e){if(this.pagination.currentPage===e){return o+" is-active"}else{return o}}prepareLinkUrl(o){if(this.link){return String(this.link).replace("{PAGE}",String(o))}return undefined}resetSelectValue(){if(this.spreadSelectRef){this.spreadSelectRef.getRef().then((o=>{o.value="..."}))}}render(){const o=(o,e,t)=>{const a=o===-1;const n=p(this.pagination.currentPage===o?true:undefined);return r("gov-button",{href:this.prepareLinkUrl(o),variant:this.variant,size:this.size,type:"base",disabled:a,"on-gov-click":e=>this.onClickHandler(e,o),"wcag-label":t?t:o>-1?this.wcagPageLabel+" "+o:undefined,"wcag-current":n,class:j.inner},e)};return r(a,{class:this.h.classes(j.root),type:this.type,variant:this.variant,size:this.size},r("nav",{"aria-label":this.wcagLabel,"aria-labelledby":this.wcagLabelledBy},r("ul",{class:j.list},r("li",{class:u([j.item,j.itemArrow])},o(this.pagination.currentPage>1?1:-1,r("gov-icon",{class:j.arrow,name:"chevron-double-left"}),this.labelStart)),r("li",{class:u([j.item,j.itemArrow])},o(this.pagination.startPage<this.pagination.currentPage?this.pagination.currentPage-1:-1,r("gov-icon",{class:j.arrow,name:"chevron-left"}),this.labelPrev)),this.type=="select"?r("li",{class:u([j.item,j.itemSelect])},r("span",{class:j.inner},r("span",{id:this.pageSelectId,hidden:true},this.wcagSelectLabel),r("gov-form-select",{size:this.size,variant:this.variant,identifier:this.selectIdentifier||this.selectId,"wcag-labelled-by":this.pageSelectId,"on-gov-change":this.onSelectHandler.bind(this)},f(1,this.pagination.totalPages).map((o=>r("option",{value:o,selected:this.pagination.currentPage===o},o)))))):r(n,null,this.pagination.pages.map((e=>r("li",{class:this.isActivePageClass(j.item,e)},o(e,e,"")))),this.pagination.totalPages?r("li",{class:u([j.item,j.itemMore])},r("span",{class:j.inner},r("span",{id:this.pageSelectId,hidden:true},this.wcagSelectLabel),r("gov-form-select",{size:this.size,variant:this.variant,identifier:this.selectIdentifier||this.selectId,"wcag-labelled-by":this.pageSelectId,ref:o=>this.spreadSelectRef=o,"on-gov-change":this.onSelectHandler.bind(this)},r("option",{selected:true,hidden:true},"..."),f(1,this.pagination.totalPages).map((o=>r("option",{value:o,selected:false},o)))))):null),r("li",{class:u([j.item,j.itemArrow])},o(this.pagination.totalPages>this.pagination.currentPage?this.pagination.currentPage+1:-1,r("gov-icon",{class:j.arrow,name:"chevron-right"}),this.labelNext)),r("li",{class:u([j.item,j.itemArrow])},o(this.pagination.totalPages>this.pagination.currentPage?this.pagination.totalPages:-1,r("gov-icon",{class:j.arrow,name:"chevron-double-right"}),this.labelEnd)))))}onClickHandler(o,e){o.stopPropagation();this.recalculatePagination(e);this.govPage.emit({component:j.root,pagination:this.pagination})}onSelectHandler(o){o.stopPropagation();const e=o.detail.value;const t=parseInt(e);this.resetSelectValue();if(isNaN(t)===false){this.recalculatePagination(t);if(this.link){window.location.href=this.prepareLinkUrl(t)}else{this.govPage.emit({component:j.root,pagination:this.pagination})}}}async validateWcag(){h(this.wcagPageLabel,"wcag-page-label",j.root);d(this.wcagLabel,this.wcagLabelledBy,j.root)}get host(){return this}static get watchers(){return{type:["validateType"],size:["validateSize"],variant:["validateVariant"],current:["recalculate"],total:["recalculate"],pageSize:["recalculate"],maxPages:["recalculate"]}}static get style(){return E}},[0,"gov-pagination",{type:[1],current:[2],total:[2],inverse:[4],selectIdentifier:[1,"select-identifier"],size:[1],variant:[1],pageSize:[2,"page-size"],maxPages:[2,"max-pages"],link:[1],wcagLabel:[1,"wcag-label"],wcagLabelledBy:[1,"wcag-labelled-by"],wcagSelectLabel:[1,"wcag-select-label"],wcagPageLabel:[1,"wcag-page-label"],labelPrev:[1,"label-prev"],labelStart:[1,"label-start"],labelNext:[1,"label-next"],labelEnd:[1,"label-end"],pagination:[32],validateWcag:[64]},undefined,{type:["validateType"],size:["validateSize"],variant:["validateVariant"],current:["recalculate"],total:["recalculate"],pageSize:["recalculate"],maxPages:["recalculate"]}]);function M(){if(typeof customElements==="undefined"){return}const o=["gov-pagination","gov-button","gov-form-select","gov-icon"];o.forEach((o=>{switch(o){case"gov-pagination":if(!customElements.get(o)){customElements.define(o,A)}break;case"gov-button":if(!customElements.get(o)){_()}break;case"gov-form-select":if(!customElements.get(o)){y()}break;case"gov-icon":if(!customElements.get(o)){w()}break}}))}M();const I=A;const L=M;export{I as GovPagination,L as defineCustomElement};
1
+ import{p as o,H as e,c as t,h as r,d as a}from"./p-d6759ac3.js";import{F as n}from"./p-1c1d0bbe.js";import{v as i}from"./p-344c72d7.js";import{S as s}from"./p-92f420cb.js";import{V as c}from"./p-03dbb8b1.js";import{p as g,d as l}from"./p-e0e2e9c1.js";import{g as v,p as u,t as p}from"./p-d687df8f.js";import{a as h,v as d}from"./p-6b0471a8.js";import{c as b}from"./p-e618f1cb.js";import{c as m}from"./p-95d41a3b.js";import{c as f}from"./p-3f704a40.js";import{d as _}from"./p-8977b759.js";import{d as y}from"./p-c2e5e893.js";import{d as w}from"./p-2dce8f2c.js";const k=g(s,["_S","_M"]);const x=g(c,["PRIMARY","SECONDARY"]);var z;(function(o){o["BUTTON"]="button";o["SELECT"]="select"})(z||(z={}));const j={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 S(o,e=1,t=10,r=10){const a=Math.ceil(o/t);if(e<1){e=1}else if(e>a){e=a}let n,i;if(a<=r){n=1;i=a}else{const o=Math.floor(r/2);const t=Math.ceil(r/2)-1;if(e<=o){n=1;i=r}else if(e+t>=a){n=a-r+1;i=a}else{n=e-o;i=e+t}}const s=(e-1)*t;const c=Math.min(s+t-1,o-1);const g=Array.from(Array(i+1-n).keys()).map((o=>n+o));return{totalItems:o,currentPage:e,pageSize:t,totalPages:a,startPage:n,endPage:i,startIndex:s,endIndex:c,pages:g}}const P=".gov-pagination__list{margin:0;padding:0}.gov-pagination__list .gov-pagination__item{margin:0;padding:0;background:none}.gov-pagination__list .gov-pagination__item::before{display:none}.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-pagination{position:relative;display:block;width:100%}.gov-pagination__list{display:flex;align-items:center;flex-wrap:wrap;font-weight:bold;text-align:center}.gov-pagination__list .gov-pagination__item{display:flex;justify-content:center;align-items:center;margin:0;padding:0.125rem;border-radius:var(--gov-border-radius, 0.1875rem);overflow:hidden}.gov-pagination__list .gov-pagination__item--arrow{display:flex}.gov-pagination__list .gov-pagination__item--select{z-index:1;display:flex;overflow:visible;padding:0rem 1rem}.gov-pagination__arrow{margin:0}.gov-pagination__item--more .gov-form-select select{border:none !important;padding-right:0.75rem !important}.gov-pagination__item--more .gov-form-select .gov-icon{display:none}.gov-pagination__inner{display:flex;justify-content:center;align-items:center;align-self:stretch;width:100%;text-decoration:none}.gov-pagination__inner[wcag-current=true][type=solid][variant=primary] .element{background-color:var(--gov-button-primary-solid-hover-bg, var(--gov-color-primary-700));color:var(--gov-button-primary-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=primary] .element{background-color:var(--gov-button-primary-outlined-hover-bg, var(--gov-color-primary-100));color:var(--gov-button-primary-outlined-hover-color, var(--gov-color-primary))}.gov-pagination__inner[wcag-current=true][type=base][variant=primary] .element{background-color:var(--gov-button-primary-base-hover-bg, var(--gov-color-primary-100));color:var(--gov-button-primary-base-hover-color, var(--gov-color-primary))}.gov-pagination__inner[wcag-current=true][type=link][variant=primary] .element{background-color:var(--gov-button-primary-link-hover-bg, transparent);color:var(--gov-button-primary-link-hover-color, var(--gov-color-primary))}.gov-pagination__inner[wcag-current=true][type=solid][variant=secondary] .element{background-color:var(--gov-button-secondary-solid-hover-bg, var(--gov-color-secondary-900));color:var(--gov-button-secondary-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=secondary] .element{background-color:var(--gov-button-secondary-outlined-hover-bg, var(--gov-color-secondary-300));color:var(--gov-button-secondary-outlined-hover-color, var(--gov-color-secondary))}.gov-pagination__inner[wcag-current=true][type=base][variant=secondary] .element{background-color:var(--gov-button-secondary-base-hover-bg, var(--gov-color-secondary-300));color:var(--gov-button-secondary-base-hover-color, var(--gov-color-secondary))}.gov-pagination__inner[wcag-current=true][type=link][variant=secondary] .element{background-color:var(--gov-button-secondary-link-hover-bg, transparent);color:var(--gov-button-secondary-link-hover-color, var(--gov-color-secondary))}.gov-pagination__inner[wcag-current=true][type=solid][variant=error] .element{background-color:var(--gov-button-error-solid-hover-bg, var(--gov-color-error-500));color:var(--gov-button-error-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=error] .element{background-color:var(--gov-button-error-outlined-hover-bg, var(--gov-color-error-100));color:var(--gov-button-error-outlined-hover-color, var(--gov-color-error))}.gov-pagination__inner[wcag-current=true][type=base][variant=error] .element{background-color:var(--gov-button-error-base-hover-bg, var(--gov-color-error-100));color:var(--gov-button-error-base-hover-color, var(--gov-color-error))}.gov-pagination__inner[wcag-current=true][type=link][variant=error] .element{background-color:var(--gov-button-error-link-hover-bg, transparent);color:var(--gov-button-error-link-hover-color, var(--gov-color-error))}.gov-pagination__inner[wcag-current=true][type=solid][variant=success] .element{background-color:var(--gov-button-success-solid-hover-bg, var(--gov-color-success-600));color:var(--gov-button-success-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=success] .element{background-color:var(--gov-button-success-outlined-hover-bg, var(--gov-color-success-100));color:var(--gov-button-success-outlined-hover-color, var(--gov-color-success-500))}.gov-pagination__inner[wcag-current=true][type=base][variant=success] .element{background-color:var(--gov-button-success-base-hover-bg, var(--gov-color-success-100));color:var(--gov-button-success-base-hover-color, var(--gov-color-success-500))}.gov-pagination__inner[wcag-current=true][type=link][variant=success] .element{background-color:var(--gov-button-success-link-hover-bg, transparent);color:var(--gov-button-success-link-hover-color, var(--gov-color-success-500))}.gov-pagination__inner[wcag-current=true][type=solid][variant=warning] .element{background-color:var(--gov-button-warning-solid-hover-bg, var(--gov-color-warning-600));color:var(--gov-button-warning-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=warning] .element{background-color:var(--gov-button-warning-outlined-hover-bg, var(--gov-color-warning-200));color:var(--gov-button-warning-outlined-hover-color, var(--gov-color-warning-500))}.gov-pagination__inner[wcag-current=true][type=base][variant=warning] .element{background-color:var(--gov-button-warning-base-hover-bg, var(--gov-color-warning-200));color:var(--gov-button-warning-base-hover-color, var(--gov-color-warning-500))}.gov-pagination__inner[wcag-current=true][type=link][variant=warning] .element{background-color:var(--gov-button-warning-link-hover-bg, transparent);color:var(--gov-button-warning-link-hover-color, var(--gov-color-warning-500))}.gov-pagination[size=s] .gov-pagination__inner{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);font-weight:inherit}.gov-pagination[size=s] .gov-pagination__inner .element{min-width:var(--gov-pagination-s-button-size, 2rem)}.gov-pagination[size=m] .gov-pagination__inner{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);font-weight:inherit}.gov-pagination[size=m] .gov-pagination__inner .element{min-width:var(--gov-pagination-m-button-size, 2.5rem)}";const E=P;const A=o(class o extends e{constructor(){super();this.__registerHost();this.govPage=t(this,"gov-page",7);this.type="button";this.current=1;this.total=0;this.inverse=undefined;this.selectIdentifier=undefined;this.size="m";this.variant="primary";this.pageSize=10;this.maxPages=5;this.link=undefined;this.wcagLabel=undefined;this.wcagLabelledBy=undefined;this.wcagSelectLabel="Vybrat stranu";this.wcagPageLabel="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.h=v(this.host);this.pageSelectId=m("GovPageSelect");this.selectId=m("GovSelect")}validateType(o){i(z,o,j.root)}validateSize(o){i(k,o,j.root)}validateVariant(o){i(x,o,j.root)}recalculate(){this.recalculatePagination(this.current)}componentWillLoad(){this.recalculatePagination(this.current);this.validateSize(this.size);this.validateVariant(this.variant)}async componentDidRender(){if(b()){await l(500);await this.validateWcag()}}recalculatePagination(o){this.pagination=S(this.total,o,this.pageSize,this.maxPages)}isActivePageClass(o,e){if(this.pagination.currentPage===e){return o+" is-active"}else{return o}}prepareLinkUrl(o){if(this.link){return String(this.link).replace("{PAGE}",String(o))}return undefined}resetSelectValue(){if(this.spreadSelectRef){this.spreadSelectRef.getRef().then((o=>{o.value="..."}))}}render(){const o=(o,e,t)=>{const a=o===-1;const n=p(this.pagination.currentPage===o?true:undefined);return r("gov-button",{href:this.prepareLinkUrl(o),variant:this.variant,size:this.size,type:"base",disabled:a,"on-gov-click":e=>this.onClickHandler(e,o),"wcag-label":t?t:o>-1?this.wcagPageLabel+" "+o:undefined,"wcag-current":n,class:j.inner},e)};return r(a,{class:this.h.classes(j.root),type:this.type,variant:this.variant,size:this.size},r("nav",{"aria-label":this.wcagLabel,"aria-labelledby":this.wcagLabelledBy},r("ul",{class:j.list},r("li",{class:u([j.item,j.itemArrow])},o(this.pagination.currentPage>1?1:-1,r("gov-icon",{class:j.arrow,name:"chevron-double-left"}),this.labelStart)),r("li",{class:u([j.item,j.itemArrow])},o(this.pagination.startPage<this.pagination.currentPage?this.pagination.currentPage-1:-1,r("gov-icon",{class:j.arrow,name:"chevron-left"}),this.labelPrev)),this.type=="select"?r("li",{class:u([j.item,j.itemSelect])},r("span",{class:j.inner},r("span",{id:this.pageSelectId,hidden:true},this.wcagSelectLabel),r("gov-form-select",{size:this.size,variant:this.variant,identifier:this.selectIdentifier||this.selectId,"wcag-labelled-by":this.pageSelectId,"on-gov-change":this.onSelectHandler.bind(this)},f(1,this.pagination.totalPages).map((o=>r("option",{value:o,selected:this.pagination.currentPage===o},o)))))):r(n,null,this.pagination.pages.map((e=>r("li",{class:this.isActivePageClass(j.item,e)},o(e,e,"")))),this.pagination.totalPages?r("li",{class:u([j.item,j.itemMore])},r("span",{class:j.inner},r("span",{id:this.pageSelectId,hidden:true},this.wcagSelectLabel),r("gov-form-select",{size:this.size,variant:this.variant,identifier:this.selectIdentifier||this.selectId,"wcag-labelled-by":this.pageSelectId,ref:o=>this.spreadSelectRef=o,"on-gov-change":this.onSelectHandler.bind(this)},r("option",{selected:true,hidden:true},"..."),f(1,this.pagination.totalPages).map((o=>r("option",{value:o,selected:false},o)))))):null),r("li",{class:u([j.item,j.itemArrow])},o(this.pagination.totalPages>this.pagination.currentPage?this.pagination.currentPage+1:-1,r("gov-icon",{class:j.arrow,name:"chevron-right"}),this.labelNext)),r("li",{class:u([j.item,j.itemArrow])},o(this.pagination.totalPages>this.pagination.currentPage?this.pagination.totalPages:-1,r("gov-icon",{class:j.arrow,name:"chevron-double-right"}),this.labelEnd)))))}onClickHandler(o,e){o.stopPropagation();this.recalculatePagination(e);this.govPage.emit({component:j.root,pagination:this.pagination})}onSelectHandler(o){o.stopPropagation();const e=o.detail.value;const t=parseInt(e);this.resetSelectValue();if(isNaN(t)===false){this.recalculatePagination(t);if(this.link){window.location.href=this.prepareLinkUrl(t)}else{this.govPage.emit({component:j.root,pagination:this.pagination})}}}async validateWcag(){h(this.wcagPageLabel,"wcag-page-label",j.root);d(this.wcagLabel,this.wcagLabelledBy,j.root)}get host(){return this}static get watchers(){return{type:["validateType"],size:["validateSize"],variant:["validateVariant"],current:["recalculate"],total:["recalculate"],pageSize:["recalculate"],maxPages:["recalculate"]}}static get style(){return E}},[0,"gov-pagination",{type:[1],current:[2],total:[2],inverse:[4],selectIdentifier:[1,"select-identifier"],size:[1],variant:[1],pageSize:[2,"page-size"],maxPages:[2,"max-pages"],link:[1],wcagLabel:[1,"wcag-label"],wcagLabelledBy:[1,"wcag-labelled-by"],wcagSelectLabel:[1,"wcag-select-label"],wcagPageLabel:[1,"wcag-page-label"],labelPrev:[1,"label-prev"],labelStart:[1,"label-start"],labelNext:[1,"label-next"],labelEnd:[1,"label-end"],pagination:[32],validateWcag:[64]},undefined,{type:["validateType"],size:["validateSize"],variant:["validateVariant"],current:["recalculate"],total:["recalculate"],pageSize:["recalculate"],maxPages:["recalculate"]}]);function M(){if(typeof customElements==="undefined"){return}const o=["gov-pagination","gov-button","gov-form-select","gov-icon"];o.forEach((o=>{switch(o){case"gov-pagination":if(!customElements.get(o)){customElements.define(o,A)}break;case"gov-button":if(!customElements.get(o)){_()}break;case"gov-form-select":if(!customElements.get(o)){y()}break;case"gov-icon":if(!customElements.get(o)){w()}break}}))}M();const I=A;const L=M;export{I as GovPagination,L as defineCustomElement};
2
2
  //# sourceMappingURL=gov-pagination.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as o,c as a,h as t,d as i}from"./p-d6759ac3.js";import{g as d,a as s}from"./p-d687df8f.js";import{c as r}from"./p-e618f1cb.js";import{a as l}from"./p-e296ca83.js";import{b as n}from"./p-6b0471a8.js";import{c}from"./p-95d41a3b.js";import{d as m}from"./p-e0e2e9c1.js";import{M as g}from"./p-0134b442.js";import{d as h}from"./p-92c6c6aa.js";import{d as v}from"./p-90ebe1d9.js";import{d as p}from"./p-d2a0ad9c.js";const b='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-modal{display:none}.gov-modal__dialog{z-index:101;position:fixed;top:50%;left:50%;display:flex;justify-content:center;align-items:center;width:100%;max-width:var(--gov-modal-max-width, 52.5rem);height:100%;padding:0.5rem;border:none;background:transparent;transform:translate(-50%, -50%);pointer-events:none}.gov-modal__inner{position:relative;display:flex;flex-direction:column;width:100%;max-height:100%;border-radius:var(--gov-border-radius, 0.1875rem);background:var(--gov-modal-bg, var(--gov-color-neutral-white));overflow:hidden;pointer-events:auto;box-shadow:0 0 1.5rem rgba(var(--gov-color-secondary-800-rgb), 0.24)}.gov-modal__header{display:flex;gap:1rem;align-items:flex-start;padding:1.5rem 1rem;border-bottom:var(--gov-modal-border-color, 0.0625rem solid var(--gov-color-secondary-500))}.gov-modal__icon{flex:0 0 auto;padding-top:calc((var(--gov-text-3xl-font-size) * 1.5 - 1.5rem) / 2)}.gov-modal__icon>*{width:1.5rem;height:1.5rem}.gov-modal__title{font-weight:var(--gov-text-3xl-font-weight);font-size:var(--gov-text-3xl-font-size);line-height:var(--gov-text-3xl-line-height);letter-spacing:var(--gov-text-3xl-letter-spacing);margin:0}.gov-modal__close{flex:0 0 auto;margin-left:auto}.gov-modal__content{height:100%;padding:1.5rem 1rem;color:var(--gov-modal-text-color, var(--gov-color-secondary-700));overflow:auto}.gov-modal__content>*:last-child{margin-bottom:0}.gov-modal__footer,.gov-modal__actions{padding:1.5rem 1rem;border-top:var(--gov-modal-border-color, 0.0625rem solid var(--gov-color-secondary-500))}.gov-modal__actions{display:flex;gap:0.5rem 1rem;flex-wrap:wrap;justify-content:flex-end}.gov-modal__dialog:focus .gov-modal__inner{outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base)}.gov-modal[open=""],.gov-modal[open=true i],.gov-modal[open="1"]{display:block}@media (min-width: 30em){.gov-modal__dialog{max-width:calc(var(--gov-modal-max-width, 52.5rem) + 3rem);padding:1.5rem}.gov-modal__dialog:focus{outline-offset:-1.5rem}.gov-modal__inner{box-shadow:0 0 2rem rgba(var(--gov-color-secondary-800-rgb), 0.32)}.gov-modal--prompt .gov-modal__dialog{max-width:calc(var(--gov-modal-prompt-max-width, 33.125rem) + 3rem)}}@media (min-width: 48em){.gov-modal__header{gap:1.25rem;padding:2rem 2.5rem 2rem 3rem}.gov-modal__content{padding:2rem 3rem}.gov-modal__footer{padding:1rem 3rem}.gov-modal--prompt .gov-modal__header,.gov-modal--prompt .gov-modal__content,.gov-modal--prompt .gov-modal__footer,.gov-modal--prompt .gov-modal__actions{padding:1.5rem}}';const f=b;const y=e(class e extends o{constructor(){super();this.__registerHost();this.govClose=a(this,"gov-close",7);this.open=false;this.label=undefined;this.role="dialog";this.labelTag="h2";this.wcagLabelledBy=undefined;this.wcagDescribedBy=undefined;this.wcagCloseLabel="Zavřít okno";this.wcagCloseLabelledBy=undefined;this.h=d(this.host);this.labelId=c("GovPromptLabel");this.contentId=c("GovPromptContent")}validateLabelTag(e){const o=["h1","h2","h3","h4","h5","h6"];if(e){if(!o.includes(e)){l(`[${g.root}]: Tag ${e} is not allowed.`)}}}watchOpen(e){this.open=e;if(e&&this.closeCtaRef){this.closeCtaRef.setFocus().catch()}}showModal(){this.open=true;document.body.classList.add(g.bodyFix)}hideModal(){this.open=false;document.body.classList.remove(g.bodyFix)}async componentWillRender(){if(this.open){this.showModal()}else{this.hideModal()}}async componentDidRender(){if(r()){await m(500);await this.validateWcag()}}render(){const e=this.labelTag;return t(i,{key:"eafb47c3de00f2944cf648244a0cc4d57579c7ff",class:this.h.classes(g.rootPrompt),open:this.open},t("dialog",{key:"4e93478ea3a360bb6249725b4299f1db89626e72",class:g.dialog,hidden:!this.open,tabindex:"-1",open:this.open,"aria-modal":"true","aria-hidden":s(!this.open),"aria-labelledby":this.wcagLabelledBy||this.labelId,"aria-describedby":this.wcagDescribedBy||this.contentId,role:this.role},t("div",{key:"0e4dc70872d6bab33e36e192ec921a05e278e844",class:g.inner},t("div",{key:"3be8a8bed33a9640dcba8e8374512efadb4c4a63",class:g.header},this.h.hasSlot("icon")&&t("div",{key:"76931e2ab2a270ce04a71c7d8d32ead065da6eca",class:g.icon},t("slot",{key:"3a49590e4c2b67742aa7202e440408a307975ad3",name:"icon"})),this.label&&t(e,{key:"8e3cd8b4940f6222e15efb63317e151efa2e6b5f",class:g.title,id:this.labelId},this.label),t("gov-button",{key:"23de5a7c3bb39f3896c134665aa564d584160914",class:g.close,variant:"primary",wcagLabel:this.wcagCloseLabel,wcagLabelledBy:this.wcagCloseLabelledBy,type:"base",ref:e=>this.closeCtaRef=e,"on-gov-click":this.onCloseHandler.bind(this)},t("gov-icon",{key:"4769f23e5e772c92ed07ba8244d2da674acb8d33",name:"x-lg"}))),t("div",{key:"1b181dd790d066b2aa943c91ef2e0f47f8a0e5df",class:g.content,id:this.contentId},t("slot",{key:"04cf9527b390b134ee7900ff3283b84cb5b6cdcb"})),t("div",{key:"350de95cfb9e765da4ebdc8f0f179bcc040baf28",class:g.actions},t("slot",{key:"206f016467e43154a75c02c2708a65a589d09710",name:"actions"})))),this.open?t("gov-backdrop",{"wcag-label":this.wcagCloseLabel,"wcag-labelled-by":this.wcagCloseLabelledBy,"on-gov-click":this.onCloseHandler.bind(this)}):null)}onCloseHandler(e){e.stopPropagation();this.hideModal();this.govClose.emit(e)}async show(){this.showModal()}async hide(){this.hideModal()}async validateWcag(){n(this.wcagLabelledBy,"wcag-labelled-by",g.root);n(this.wcagDescribedBy,"wcag-described-by",g.root)}get host(){return this}static get watchers(){return{labelTag:["validateLabelTag"],open:["watchOpen"]}}static get style(){return f}},[4,"gov-prompt",{open:[1028],label:[1],role:[1],labelTag:[1,"label-tag"],wcagLabelledBy:[1,"wcag-labelled-by"],wcagDescribedBy:[1,"wcag-described-by"],wcagCloseLabel:[1,"wcag-close-label"],wcagCloseLabelledBy:[1,"wcag-close-labelled-by"],show:[64],hide:[64],validateWcag:[64]},undefined,{labelTag:["validateLabelTag"],open:["watchOpen"]}]);function u(){if(typeof customElements==="undefined"){return}const e=["gov-prompt","gov-backdrop","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-prompt":if(!customElements.get(e)){customElements.define(e,y)}break;case"gov-backdrop":if(!customElements.get(e)){h()}break;case"gov-button":if(!customElements.get(e)){v()}break;case"gov-icon":if(!customElements.get(e)){p()}break}}))}u();const _=y;const w=u;export{_ as GovPrompt,w as defineCustomElement};
1
+ import{p as e,H as o,c as a,h as t,d as i}from"./p-d6759ac3.js";import{g as d,a as s}from"./p-d687df8f.js";import{c as r}from"./p-e618f1cb.js";import{a as l}from"./p-e296ca83.js";import{b as n}from"./p-6b0471a8.js";import{c}from"./p-95d41a3b.js";import{d as m}from"./p-e0e2e9c1.js";import{M as g}from"./p-0134b442.js";import{d as h}from"./p-92c6c6aa.js";import{d as v}from"./p-8977b759.js";import{d as p}from"./p-2dce8f2c.js";const b='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-modal{display:none}.gov-modal__dialog{z-index:101;position:fixed;top:50%;left:50%;display:flex;justify-content:center;align-items:center;width:100%;max-width:var(--gov-modal-max-width, 52.5rem);height:100%;padding:0.5rem;border:none;background:transparent;transform:translate(-50%, -50%);pointer-events:none}.gov-modal__inner{position:relative;display:flex;flex-direction:column;width:100%;max-height:100%;border-radius:var(--gov-border-radius, 0.1875rem);background:var(--gov-modal-bg, var(--gov-color-neutral-white));overflow:hidden;pointer-events:auto;box-shadow:0 0 1.5rem rgba(var(--gov-color-secondary-800-rgb), 0.24)}.gov-modal__header{display:flex;gap:1rem;align-items:flex-start;padding:1.5rem 1rem;border-bottom:var(--gov-modal-border-color, 0.0625rem solid var(--gov-color-secondary-500))}.gov-modal__icon{flex:0 0 auto;padding-top:calc((var(--gov-text-3xl-font-size) * 1.5 - 1.5rem) / 2)}.gov-modal__icon>*{width:1.5rem;height:1.5rem}.gov-modal__title{font-weight:var(--gov-text-3xl-font-weight);font-size:var(--gov-text-3xl-font-size);line-height:var(--gov-text-3xl-line-height);letter-spacing:var(--gov-text-3xl-letter-spacing);margin:0}.gov-modal__close{flex:0 0 auto;margin-left:auto}.gov-modal__content{height:100%;padding:1.5rem 1rem;color:var(--gov-modal-text-color, var(--gov-color-secondary-700));overflow:auto}.gov-modal__content>*:last-child{margin-bottom:0}.gov-modal__footer,.gov-modal__actions{padding:1.5rem 1rem;border-top:var(--gov-modal-border-color, 0.0625rem solid var(--gov-color-secondary-500))}.gov-modal__actions{display:flex;gap:0.5rem 1rem;flex-wrap:wrap;justify-content:flex-end}.gov-modal__dialog:focus .gov-modal__inner{outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base)}.gov-modal[open=""],.gov-modal[open=true i],.gov-modal[open="1"]{display:block}@media (min-width: 30em){.gov-modal__dialog{max-width:calc(var(--gov-modal-max-width, 52.5rem) + 3rem);padding:1.5rem}.gov-modal__dialog:focus{outline-offset:-1.5rem}.gov-modal__inner{box-shadow:0 0 2rem rgba(var(--gov-color-secondary-800-rgb), 0.32)}.gov-modal--prompt .gov-modal__dialog{max-width:calc(var(--gov-modal-prompt-max-width, 33.125rem) + 3rem)}}@media (min-width: 48em){.gov-modal__header{gap:1.25rem;padding:2rem 2.5rem 2rem 3rem}.gov-modal__content{padding:2rem 3rem}.gov-modal__footer{padding:1rem 3rem}.gov-modal--prompt .gov-modal__header,.gov-modal--prompt .gov-modal__content,.gov-modal--prompt .gov-modal__footer,.gov-modal--prompt .gov-modal__actions{padding:1.5rem}}';const f=b;const y=e(class e extends o{constructor(){super();this.__registerHost();this.govClose=a(this,"gov-close",7);this.open=false;this.label=undefined;this.role="dialog";this.labelTag="h2";this.wcagLabelledBy=undefined;this.wcagDescribedBy=undefined;this.wcagCloseLabel="Zavřít okno";this.wcagCloseLabelledBy=undefined;this.h=d(this.host);this.labelId=c("GovPromptLabel");this.contentId=c("GovPromptContent")}validateLabelTag(e){const o=["h1","h2","h3","h4","h5","h6"];if(e){if(!o.includes(e)){l(`[${g.root}]: Tag ${e} is not allowed.`)}}}watchOpen(e){this.open=e;if(e&&this.closeCtaRef){this.closeCtaRef.setFocus().catch()}}showModal(){this.open=true;document.body.classList.add(g.bodyFix)}hideModal(){this.open=false;document.body.classList.remove(g.bodyFix)}async componentWillRender(){if(this.open){this.showModal()}else{this.hideModal()}}async componentDidRender(){if(r()){await m(500);await this.validateWcag()}}render(){const e=this.labelTag;return t(i,{key:"eafb47c3de00f2944cf648244a0cc4d57579c7ff",class:this.h.classes(g.rootPrompt),open:this.open},t("dialog",{key:"4e93478ea3a360bb6249725b4299f1db89626e72",class:g.dialog,hidden:!this.open,tabindex:"-1",open:this.open,"aria-modal":"true","aria-hidden":s(!this.open),"aria-labelledby":this.wcagLabelledBy||this.labelId,"aria-describedby":this.wcagDescribedBy||this.contentId,role:this.role},t("div",{key:"0e4dc70872d6bab33e36e192ec921a05e278e844",class:g.inner},t("div",{key:"3be8a8bed33a9640dcba8e8374512efadb4c4a63",class:g.header},this.h.hasSlot("icon")&&t("div",{key:"76931e2ab2a270ce04a71c7d8d32ead065da6eca",class:g.icon},t("slot",{key:"3a49590e4c2b67742aa7202e440408a307975ad3",name:"icon"})),this.label&&t(e,{key:"8e3cd8b4940f6222e15efb63317e151efa2e6b5f",class:g.title,id:this.labelId},this.label),t("gov-button",{key:"23de5a7c3bb39f3896c134665aa564d584160914",class:g.close,variant:"primary",wcagLabel:this.wcagCloseLabel,wcagLabelledBy:this.wcagCloseLabelledBy,type:"base",ref:e=>this.closeCtaRef=e,"on-gov-click":this.onCloseHandler.bind(this)},t("gov-icon",{key:"4769f23e5e772c92ed07ba8244d2da674acb8d33",name:"x-lg"}))),t("div",{key:"1b181dd790d066b2aa943c91ef2e0f47f8a0e5df",class:g.content,id:this.contentId},t("slot",{key:"04cf9527b390b134ee7900ff3283b84cb5b6cdcb"})),t("div",{key:"350de95cfb9e765da4ebdc8f0f179bcc040baf28",class:g.actions},t("slot",{key:"206f016467e43154a75c02c2708a65a589d09710",name:"actions"})))),this.open?t("gov-backdrop",{"wcag-label":this.wcagCloseLabel,"wcag-labelled-by":this.wcagCloseLabelledBy,"on-gov-click":this.onCloseHandler.bind(this)}):null)}onCloseHandler(e){e.stopPropagation();this.hideModal();this.govClose.emit(e)}async show(){this.showModal()}async hide(){this.hideModal()}async validateWcag(){n(this.wcagLabelledBy,"wcag-labelled-by",g.root);n(this.wcagDescribedBy,"wcag-described-by",g.root)}get host(){return this}static get watchers(){return{labelTag:["validateLabelTag"],open:["watchOpen"]}}static get style(){return f}},[4,"gov-prompt",{open:[1028],label:[1],role:[1],labelTag:[1,"label-tag"],wcagLabelledBy:[1,"wcag-labelled-by"],wcagDescribedBy:[1,"wcag-described-by"],wcagCloseLabel:[1,"wcag-close-label"],wcagCloseLabelledBy:[1,"wcag-close-labelled-by"],show:[64],hide:[64],validateWcag:[64]},undefined,{labelTag:["validateLabelTag"],open:["watchOpen"]}]);function u(){if(typeof customElements==="undefined"){return}const e=["gov-prompt","gov-backdrop","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-prompt":if(!customElements.get(e)){customElements.define(e,y)}break;case"gov-backdrop":if(!customElements.get(e)){h()}break;case"gov-button":if(!customElements.get(e)){v()}break;case"gov-icon":if(!customElements.get(e)){p()}break}}))}u();const _=y;const w=u;export{_ as GovPrompt,w as defineCustomElement};
2
2
  //# sourceMappingURL=gov-prompt.js.map