@gov-design-system-ce/components 4.2.4 → 4.2.5

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 (75) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/gov-flex_3.cjs.entry.js +1 -1
  3. package/dist/cjs/gov-form-input_2.cjs.entry.js +1 -1
  4. package/dist/cjs/gov-form-input_2.cjs.entry.js.map +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +6 -6
  7. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js.map +1 -1
  8. package/dist/collection/pages/Loading.js +5 -1
  9. package/dist/collection/pages/Loading.js.map +1 -1
  10. package/dist/components/gov-accordion-item.js +1 -1
  11. package/dist/components/gov-attachments-item.js +1 -1
  12. package/dist/components/gov-blockquote.js +1 -1
  13. package/dist/components/gov-breadcrumbs.js +1 -1
  14. package/dist/components/gov-button.js +1 -1
  15. package/dist/components/gov-card.js +1 -1
  16. package/dist/components/gov-chip.js +1 -1
  17. package/dist/components/gov-dialog.js +1 -1
  18. package/dist/components/gov-form-autocomplete.js +1 -1
  19. package/dist/components/gov-form-checkbox.js +1 -1
  20. package/dist/components/gov-form-file.js +1 -1
  21. package/dist/components/gov-form-input.js +1 -1
  22. package/dist/components/gov-form-multi-select.js +1 -1
  23. package/dist/components/gov-form-range.js +1 -1
  24. package/dist/components/gov-form-range.js.map +1 -1
  25. package/dist/components/gov-form-select.js +1 -1
  26. package/dist/components/gov-form-switch.js +1 -1
  27. package/dist/components/gov-icon.js +1 -1
  28. package/dist/components/gov-infobar.js +1 -1
  29. package/dist/components/gov-link.js +1 -1
  30. package/dist/components/gov-loading.js +1 -1
  31. package/dist/components/gov-pagination.js +1 -1
  32. package/dist/components/gov-skeleton.js +1 -1
  33. package/dist/components/gov-tabs.js +1 -1
  34. package/dist/components/gov-tabs.js.map +1 -1
  35. package/dist/components/gov-tag.js +1 -1
  36. package/dist/components/gov-theme-switch.js +1 -1
  37. package/dist/components/gov-tile.js +1 -1
  38. package/dist/components/gov-toast.js +1 -1
  39. package/dist/components/gov-tooltip-content.js +1 -1
  40. package/dist/components/gov-wizard-item.js +1 -1
  41. package/dist/components/{p-bd393ff0.js → p-106a27de.js} +2 -2
  42. package/dist/components/{p-90657523.js → p-246216b9.js} +2 -2
  43. package/dist/components/{p-043a676e.js → p-2d1d727d.js} +2 -2
  44. package/dist/components/{p-cbe3bc71.js → p-5c247bc2.js} +2 -2
  45. package/dist/components/{p-abea96cf.js → p-80c889e2.js} +2 -2
  46. package/dist/components/{p-2b33d27c.js → p-d1a59544.js} +2 -2
  47. package/dist/components/{p-b56d6b99.js → p-f7ca5e39.js} +2 -2
  48. package/dist/components/{p-313b4611.js → p-fcc6dd1d.js} +2 -2
  49. package/dist/components/p-fcc6dd1d.js.map +1 -0
  50. package/dist/core/core.css +20 -18
  51. package/dist/core/core.esm.js +1 -1
  52. package/dist/core/core.esm.js.map +1 -1
  53. package/dist/core/p-2fd53723.entry.js +2 -0
  54. package/dist/core/{p-b9f1c2ef.entry.js.map → p-2fd53723.entry.js.map} +1 -1
  55. package/dist/core/{p-9e5eb19a.entry.js → p-d3014dc5.entry.js} +2 -2
  56. package/dist/esm/core.js +1 -1
  57. package/dist/esm/gov-flex_3.entry.js +1 -1
  58. package/dist/esm/gov-form-input_2.entry.js +1 -1
  59. package/dist/esm/gov-form-input_2.entry.js.map +1 -1
  60. package/dist/esm/loader.js +1 -1
  61. package/dist/hydrate/index.js +6 -6
  62. package/dist/hydrate/index.mjs +6 -6
  63. package/dist/types/components/gov-loading/skeleton/gov-skeleton.d.ts +2 -2
  64. package/dist/types/components.d.ts +2 -2
  65. package/package.json +1 -1
  66. package/dist/components/p-313b4611.js.map +0 -1
  67. package/dist/core/p-b9f1c2ef.entry.js +0 -2
  68. /package/dist/components/{p-bd393ff0.js.map → p-106a27de.js.map} +0 -0
  69. /package/dist/components/{p-90657523.js.map → p-246216b9.js.map} +0 -0
  70. /package/dist/components/{p-043a676e.js.map → p-2d1d727d.js.map} +0 -0
  71. /package/dist/components/{p-cbe3bc71.js.map → p-5c247bc2.js.map} +0 -0
  72. /package/dist/components/{p-abea96cf.js.map → p-80c889e2.js.map} +0 -0
  73. /package/dist/components/{p-2b33d27c.js.map → p-d1a59544.js.map} +0 -0
  74. /package/dist/components/{p-b56d6b99.js.map → p-f7ca5e39.js.map} +0 -0
  75. /package/dist/core/{p-9e5eb19a.entry.js.map → p-d3014dc5.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["GovTabs","proxyCustomElement","H","constructor","this","triggerRefs","h","govHost","host","validateType","newValue","validateProp","TabTypes","TabsClass","root","validateColor","TabColors","validateSize","TabSizes","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","prepareControllers","size","inheritedAttributes","inheritAriaAttributes","disconnectedCallback","_a","stopObserving","removeAttribute","Object","assign","skipDefault","controllers","promises","querySelectorAll","TabsItemClass","forEach","tab","controlItem","Promise","all","getIdentifier","getTriggerIdentifier","getDisableState","then","identifier","triggerIdentifier","disabled","isDefault","getAttribute","iconStart","prepareIconFormat","iconEnd","label","direction","contentIdentifier","element","active","default","push","defaultTabIndex","findIndex","controller","focusIndex","hasOwnProperty","isWrongCombination","firstGoodTab","reRender","setActiveByIdentifier","temp","map","item","control","setActiveStatus","catch","render","Host","key","class","classes","color","type","onKeyDown","onKeydownHandler","bind","tabs","role","list","btn","id","onClick","onSelectHandler","toBoolAttr","tabindex","ref","el","name","tag","booleanString","focusable","slot","getCurrentTab","find","index","t","govChange","emit","e","keyCode","stopPropagation","goToPrevNext","includes","length","current","trigger","nodeName","toLowerCase","setFocus","focus","refresh","currentTab","setActiveTab","rerender"],"sources":["../../../packages/core/src/components/gov-tabs/gov-tabs.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tColorType,\n\tTabColors,\n\tTabOrientationType,\n\tTabsClass,\n\tTabsItemClass,\n\tTabSizes,\n\tTabSizeType,\n\tTabType,\n\tTabTypes\n} from \"./constants\"\nimport {GovTabControllerItem} from \"./gov-tabs.types\"\nimport {booleanString, govHost, toBoolAttr} from \"../../helpers/Dom/template\"\nimport {Nullable} from \"../../types/interfaces\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {hasOwnProperty} from \"../../utils/helpers.types\";\nimport {prepareIconFormat} from \"../gov-icon/helpers\";\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n\n@Component({\n\ttag: \"gov-tabs\",\n})\nexport class GovTabs {\n\tprivate h: GovHost\n\tprivate triggerRefs: Record<string, HTMLButtonElement | HTMLGovChipElement> = {}\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovTabsElement\n\t/**\n\t * Tabs type\n\t */\n\t@Prop() readonly type: TabType = \"text\"\n\t/**\n\t * Tabs size.\n\t */\n\t@Prop() readonly size?: TabSizeType = 'm'\n\t/**\n\t * Style variation of the tab chips.\n\t */\n\t@Prop() readonly color?: ColorType = \"primary\"\n\t/**\n\t * Tabs orientation\n\t */\n\t@Prop() readonly orientation: TabOrientationType = \"horizontal\"\n\t/**\n\t * Icon and description display direction\n\t */\n\t@Prop({reflect: true}) readonly direction: 'row' | 'column' = 'row'\n\t/**\n\t * Emitted when the tab is changed.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<HTMLGovTabsItemElement>\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(TabTypes, newValue, TabsClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TabColors, newValue, TabsClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TabSizes, newValue, TabsClass.root)\n\t}\n\n\t@State() controllers: GovTabControllerItem[] = []\n\t@State() focusIndex = 0\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.prepareControllers()\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate prepareControllers(skipDefault = false): void {\n\t\tthis.controllers = []\n\t\tconst promises: Promise<GovTabControllerItem>[] = []\n\t\tthis.host.querySelectorAll(':scope > ' + TabsItemClass.root).forEach((tab: HTMLGovTabsItemElement) => {\n\t\t\tconst controlItem = Promise.all([\n\t\t\t\ttab.getIdentifier(),\n\t\t\t\ttab.getTriggerIdentifier(),\n\t\t\t\ttab.getDisableState()\n\t\t\t]).then(([identifier, triggerIdentifier, disabled]) => {\n\t\t\t\tconst isDefault = typeof tab.getAttribute(\"default\") === \"string\"\n\t\t\t\tconst iconStart = prepareIconFormat(tab.getAttribute('icon-start'))\n\t\t\t\tconst iconEnd = prepareIconFormat(tab.getAttribute('icon-end'))\n\t\t\t\treturn {\n\t\t\t\t\tlabel: tab.getAttribute(\"label\"),\n\t\t\t\t\tdirection: tab.getAttribute(\"direction\"),\n\t\t\t\t\tcontentIdentifier: identifier,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\ttriggerIdentifier: triggerIdentifier,\n\t\t\t\t\telement: tab,\n\t\t\t\t\tactive: false,\n\t\t\t\t\tdefault: isDefault,\n\t\t\t\t\ticonStart,\n\t\t\t\t\ticonEnd\n\t\t\t\t}\n\t\t\t})\n\t\t\tpromises.push(controlItem)\n\t\t});\n\t\tPromise.all(promises).then(controllers => {\n\t\t\tif (skipDefault === false) {\n\t\t\t\tlet defaultTabIndex = controllers.findIndex(controller => controller.default)\n\t\t\t\tif (defaultTabIndex === -1) defaultTabIndex = 0\n\t\t\t\tthis.focusIndex = defaultTabIndex\n\t\t\t\tcontrollers[defaultTabIndex].active = true\n\t\t\t} else if (this.focusIndex > -1 && hasOwnProperty(controllers, this.focusIndex)) {\n\t\t\t\tcontrollers[this.focusIndex].active = true\n\t\t\t}\n\t\t\tconst isWrongCombination = controllers.findIndex((controller) => controller.active && controller.disabled)\n\t\t\tif (isWrongCombination > -1) {\n\t\t\t\tcontrollers[isWrongCombination].active = false;\n\t\t\t\tconst firstGoodTab = controllers.findIndex((controller) => !controller.disabled)\n\t\t\t\tif (firstGoodTab > -1) {\n\t\t\t\t\tcontrollers[firstGoodTab].active = true\n\t\t\t\t\tthis.focusIndex = firstGoodTab;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.controllers = [...controllers]\n\t\t\tthis.reRender()\n\t\t})\n\t}\n\n\tprivate setActiveByIdentifier(identifier: string) {\n\t\tconst temp = []\n\t\tthis.controllers.map(item => {\n\t\t\titem.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier\n\t\t\ttemp.push(item)\n\t\t})\n\t\tthis.controllers = [...temp]\n\t}\n\n\tprivate reRender() {\n\t\tthis.controllers.map(control => {\n\t\t\tcontrol.element.setActiveStatus(control.active).catch()\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TabsClass.root)}\n\t\t\t\tsize={this.size}\n\t\t\t\tcolor={this.color}\n\t\t\t\ttype={this.type}\n\t\t\t\tdirection={this.direction}\n\t\t\t\tonKeyDown={this.onKeydownHandler.bind(this)}\n\t\t\t>\n\t\t\t\t<div class={TabsClass.tabs}\n\t\t\t\t\t role=\"tablist\"\n\t\t\t\t\t {...this.inheritedAttributes}>\n\t\t\t\t\t<ul class={TabsClass.list}>\n\t\t\t\t\t\t{this.controllers.map(control => (\n\t\t\t\t\t\t\t<li class={TabsClass.item}>\n\t\t\t\t\t\t\t\t{this.type == \"text\" ? (\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass={TabsClass.btn}\n\t\t\t\t\t\t\t\t\t\tid={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\taria-disabled={toBoolAttr(control.disabled)}\n\t\t\t\t\t\t\t\t\t\taria-selected={toBoolAttr(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\ttabindex={control.active && !control.disabled ? 0 : -1}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLButtonElement)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.iconStart ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconStart.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconStart.type}></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t\t{control.iconEnd ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconEnd.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconEnd.type}></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<gov-chip\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\ttag={'button'}\n\t\t\t\t\t\t\t\t\t\tidentifier={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\taria-selected={booleanString(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\tfocusable={control.active}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\t\t\t\t\tsize={this.size === \"xs\" ? \"xs\" : (this.size === \"s\" ? \"s\" : \"m\")}\n\t\t\t\t\t\t\t\t\t\ttype={control.active ? \"solid\" : \"outlined\"}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLGovChipElement)}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.iconStart ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconStart.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconStart.type}\n\t\t\t\t\t\t\t\t\t\t\tslot=\"icon-start\"></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t\t{control.iconEnd ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconEnd.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconEnd.type}\n\t\t\t\t\t\t\t\t\t\t\tslot=\"icon-end\"></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t</gov-chip>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate getCurrentTab(): GovTabControllerItem | null {\n\t\treturn this.controllers.find(control => control.active) || null\n\t}\n\n\tprivate onSelectHandler(control: GovTabControllerItem) {\n\t\tconst index = this.controllers.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);\n\t\tthis.focusIndex = index\n\t\tthis.setActiveByIdentifier(control.triggerIdentifier)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onKeydownHandler(e: KeyboardEvent) {\n\t\tconst keyCode = e.keyCode\n\n\t\te.stopPropagation()\n\t\tthis.goToPrevNext(keyCode)\n\t}\n\n\tprivate goToPrevNext(keyCode: number) {\n\t\tif ([37, 38, 39, 40].includes(keyCode)) {\n\t\t\tif (false === (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1)) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.controllers[this.focusIndex].active = false\n\n\t\t\tif (keyCode === 39 || keyCode === 40) {\n\t\t\t\tthis.focusIndex++\n\t\t\t\tif (this.focusIndex >= this.controllers.length) {\n\t\t\t\t\tthis.focusIndex = 0\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(40)\n\t\t\t\t}\n\t\t\t} else if (keyCode === 37 || keyCode === 38) {\n\t\t\t\tthis.focusIndex--\n\t\t\t\tif (this.focusIndex < 0) {\n\t\t\t\t\tthis.focusIndex = this.controllers.length - 1\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(38)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1) {\n\t\t\t\tconst current = this.controllers[this.focusIndex]\n\t\t\t\tcurrent.active = true\n\t\t\t\tconst trigger = this.triggerRefs[current.triggerIdentifier]\n\t\t\t\tif (trigger.nodeName.toLowerCase() === 'gov-chip') {\n\t\t\t\t\t(this.triggerRefs[current.triggerIdentifier] as HTMLGovChipElement).setFocus()\n\t\t\t\t} else {\n\t\t\t\t\tthis.triggerRefs[current.triggerIdentifier].focus()\n\t\t\t\t}\n\n\t\t\t\tthis.controllers = [...this.controllers]\n\t\t\t\tthis.reRender()\n\t\t\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync refresh(): Promise<void> {\n\t\tthis.prepareControllers()\n\t}\n\n\t/**\n\t * Returns the currently selected tabs-item\n\t */\n\t@Method()\n\tasync currentTab(): Promise<Nullable<HTMLGovTabsItemElement>> {\n\t\treturn this.getCurrentTab().element || null\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync setActiveTab(identifier: string): Promise<void> {\n\t\tthis.setActiveByIdentifier(identifier)\n\t\tthis.reRender()\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync rerender(): Promise<void> {\n\t\tthis.prepareControllers(true);\n\t}\n}\n"],"mappings":"oZA2BaA,EAAOC,EAAA,MAAAD,UAAAE,EAKnB,WAAAC,G,oEAHQC,KAAAC,YAAsE,G,UAW7C,O,UAIK,I,WAID,U,iBAIc,a,eAIW,M,iBAqBf,G,gBACzB,E,yBACqB,GA9C1CD,KAAKE,EAAIC,EAAQH,KAAKI,K,CA8BvB,YAAAC,CAAaC,GACZC,EAAaC,EAAUF,EAAUG,EAAUC,K,CAI5C,aAAAC,CAAcL,GACbC,EAAaK,EAAWN,EAAUG,EAAUC,K,CAI7C,YAAAG,CAAaP,GACZC,EAAaO,EAAUR,EAAUG,EAAUC,K,CAO5C,gBAAAK,GACCf,KAAKgB,kBAAoB,IAAIC,EAAkBjB,KAAKI,MAAM,CAACc,EAAeZ,KACzEN,KAAKmB,sBAAsBD,EAAeZ,EAAS,IAGpDN,KAAKgB,kBAAkBI,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KAAKC,YAAYkH,EAAQnE,mBACzC,GAAIoE,EAAQC,SAASC,gBAAkB,WAAY,CACjDtH,KAAKC,YAAYkH,EAAQnE,mBAA0CuE,U,KAC9D,CACNvH,KAAKC,YAAYkH,EAAQnE,mBAAmBwE,O,CAG7CxH,KAAKkC,YAAc,IAAIlC,KAAKkC,aAC5BlC,KAAKqE,WACLrE,KAAK2G,UAAUC,KAAK5G,KAAKuG,gBAAgB7C,Q,GAS5C,aAAM+D,GACLzH,KAAKuB,oB,CAON,gBAAMmG,GACL,OAAO1H,KAAKuG,gBAAgB7C,SAAW,I,CAOxC,kBAAMiE,CAAa5E,GAClB/C,KAAKsE,sBAAsBvB,GAC3B/C,KAAKqE,U,CAON,cAAMuD,GACL5H,KAAKuB,mBAAmB,K","ignoreList":[]}
1
+ {"version":3,"names":["GovTabs","proxyCustomElement","H","constructor","this","triggerRefs","h","govHost","host","validateType","newValue","validateProp","TabTypes","TabsClass","root","validateColor","TabColors","validateSize","TabSizes","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","prepareControllers","size","inheritedAttributes","inheritAriaAttributes","disconnectedCallback","_a","stopObserving","removeAttribute","Object","assign","skipDefault","controllers","promises","querySelectorAll","TabsItemClass","forEach","tab","controlItem","Promise","all","getIdentifier","getTriggerIdentifier","getDisableState","then","identifier","triggerIdentifier","disabled","isDefault","getAttribute","iconStart","prepareIconFormat","iconEnd","label","direction","contentIdentifier","element","active","default","push","defaultTabIndex","findIndex","controller","focusIndex","hasOwnProperty","isWrongCombination","firstGoodTab","reRender","setActiveByIdentifier","temp","map","item","control","setActiveStatus","catch","render","Host","key","class","classes","color","type","onKeyDown","onKeydownHandler","bind","tabs","role","list","btn","id","onClick","onSelectHandler","toBoolAttr","tabindex","ref","el","name","tag","booleanString","focusable","slot","getCurrentTab","find","index","t","govChange","emit","e","keyCode","stopPropagation","goToPrevNext","includes","length","current","trigger","nodeName","toLowerCase","setFocus","focus","refresh","currentTab","setActiveTab","rerender"],"sources":["../../../packages/core/src/components/gov-tabs/gov-tabs.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tColorType,\n\tTabColors,\n\tTabOrientationType,\n\tTabsClass,\n\tTabsItemClass,\n\tTabSizes,\n\tTabSizeType,\n\tTabType,\n\tTabTypes\n} from \"./constants\"\nimport {GovTabControllerItem} from \"./gov-tabs.types\"\nimport {booleanString, govHost, toBoolAttr} from \"../../helpers/Dom/template\"\nimport {Nullable} from \"../../types/interfaces\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {hasOwnProperty} from \"../../utils/helpers.types\";\nimport {prepareIconFormat} from \"../gov-icon/helpers\";\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n\n@Component({\n\ttag: \"gov-tabs\",\n})\nexport class GovTabs {\n\tprivate h: GovHost\n\tprivate triggerRefs: Record<string, HTMLButtonElement | HTMLGovChipElement> = {}\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovTabsElement\n\t/**\n\t * Tabs type\n\t */\n\t@Prop() readonly type: TabType = \"text\"\n\t/**\n\t * Tabs size.\n\t */\n\t@Prop() readonly size?: TabSizeType = 'm'\n\t/**\n\t * Style variation of the tab chips.\n\t */\n\t@Prop() readonly color?: ColorType = \"primary\"\n\t/**\n\t * Tabs orientation\n\t */\n\t@Prop() readonly orientation: TabOrientationType = \"horizontal\"\n\t/**\n\t * Icon and description display direction\n\t */\n\t@Prop({reflect: true}) readonly direction: 'row' | 'column' = 'row'\n\t/**\n\t * Emitted when the tab is changed.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<HTMLGovTabsItemElement>\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(TabTypes, newValue, TabsClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TabColors, newValue, TabsClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TabSizes, newValue, TabsClass.root)\n\t}\n\n\t@State() controllers: GovTabControllerItem[] = []\n\t@State() focusIndex = 0\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.prepareControllers()\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate prepareControllers(skipDefault = false): void {\n\t\tthis.controllers = []\n\t\tconst promises: Promise<GovTabControllerItem>[] = []\n\t\tthis.host.querySelectorAll(':scope > ' + TabsItemClass.root).forEach((tab: HTMLGovTabsItemElement) => {\n\t\t\tconst controlItem = Promise.all([\n\t\t\t\ttab.getIdentifier(),\n\t\t\t\ttab.getTriggerIdentifier(),\n\t\t\t\ttab.getDisableState()\n\t\t\t]).then(([identifier, triggerIdentifier, disabled]) => {\n\t\t\t\tconst isDefault = typeof tab.getAttribute(\"default\") === \"string\"\n\t\t\t\tconst iconStart = prepareIconFormat(tab.getAttribute('icon-start'))\n\t\t\t\tconst iconEnd = prepareIconFormat(tab.getAttribute('icon-end'))\n\t\t\t\treturn {\n\t\t\t\t\tlabel: tab.getAttribute(\"label\"),\n\t\t\t\t\tdirection: tab.getAttribute(\"direction\"),\n\t\t\t\t\tcontentIdentifier: identifier,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\ttriggerIdentifier: triggerIdentifier,\n\t\t\t\t\telement: tab,\n\t\t\t\t\tactive: false,\n\t\t\t\t\tdefault: isDefault,\n\t\t\t\t\ticonStart,\n\t\t\t\t\ticonEnd\n\t\t\t\t}\n\t\t\t})\n\t\t\tpromises.push(controlItem)\n\t\t});\n\t\tPromise.all(promises).then(controllers => {\n\t\t\tif (skipDefault === false) {\n\t\t\t\tlet defaultTabIndex = controllers.findIndex(controller => controller.default)\n\t\t\t\tif (defaultTabIndex === -1) defaultTabIndex = 0\n\t\t\t\tthis.focusIndex = defaultTabIndex\n\t\t\t\tcontrollers[defaultTabIndex].active = true\n\t\t\t} else if (this.focusIndex > -1 && hasOwnProperty(controllers, this.focusIndex)) {\n\t\t\t\tcontrollers[this.focusIndex].active = true\n\t\t\t}\n\t\t\tconst isWrongCombination = controllers.findIndex((controller) => controller.active && controller.disabled)\n\t\t\tif (isWrongCombination > -1) {\n\t\t\t\tcontrollers[isWrongCombination].active = false;\n\t\t\t\tconst firstGoodTab = controllers.findIndex((controller) => !controller.disabled)\n\t\t\t\tif (firstGoodTab > -1) {\n\t\t\t\t\tcontrollers[firstGoodTab].active = true\n\t\t\t\t\tthis.focusIndex = firstGoodTab;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.controllers = [...controllers]\n\t\t\tthis.reRender()\n\t\t})\n\t}\n\n\tprivate setActiveByIdentifier(identifier: string) {\n\t\tconst temp = []\n\t\tthis.controllers.map(item => {\n\t\t\titem.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier\n\t\t\ttemp.push(item)\n\t\t})\n\t\tthis.controllers = [...temp]\n\t}\n\n\tprivate reRender() {\n\t\tthis.controllers.map(control => {\n\t\t\tcontrol.element.setActiveStatus(control.active).catch()\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TabsClass.root)}\n\t\t\t\tsize={this.size}\n\t\t\t\tcolor={this.color}\n\t\t\t\ttype={this.type}\n\t\t\t\tdirection={this.direction}\n\t\t\t\tonKeyDown={this.onKeydownHandler.bind(this)}\n\t\t\t>\n\t\t\t\t<div class={TabsClass.tabs}\n\t\t\t\t\t role=\"tablist\"\n\t\t\t\t\t {...this.inheritedAttributes}>\n\t\t\t\t\t<ul class={TabsClass.list}>\n\t\t\t\t\t\t{this.controllers.map(control => (\n\t\t\t\t\t\t\t<li class={TabsClass.item}>\n\t\t\t\t\t\t\t\t{this.type == \"text\" ? (\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass={TabsClass.btn}\n\t\t\t\t\t\t\t\t\t\tid={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\taria-disabled={toBoolAttr(control.disabled)}\n\t\t\t\t\t\t\t\t\t\taria-selected={toBoolAttr(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\ttabindex={control.active && !control.disabled ? 0 : -1}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLButtonElement)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.iconStart ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconStart.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconStart.type}></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t\t{control.iconEnd ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconEnd.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconEnd.type}></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<gov-chip\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\ttag={'button'}\n\t\t\t\t\t\t\t\t\t\tidentifier={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\taria-selected={booleanString(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\tfocusable={control.active}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\t\t\t\t\tsize={this.size === \"xs\" ? \"xs\" : (this.size === \"s\" ? \"s\" : \"m\")}\n\t\t\t\t\t\t\t\t\t\ttype={control.active ? \"solid\" : \"outlined\"}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLGovChipElement)}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.iconStart ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconStart.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconStart.type}\n\t\t\t\t\t\t\t\t\t\t\tslot=\"icon-start\"></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t\t{control.iconEnd ? (<gov-icon\n\t\t\t\t\t\t\t\t\t\t\tname={control.iconEnd.name}\n\t\t\t\t\t\t\t\t\t\t\ttype={control.iconEnd.type}\n\t\t\t\t\t\t\t\t\t\t\tslot=\"icon-end\"></gov-icon>) : null}\n\t\t\t\t\t\t\t\t\t</gov-chip>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate getCurrentTab(): GovTabControllerItem | null {\n\t\treturn this.controllers.find(control => control.active) || null\n\t}\n\n\tprivate onSelectHandler(control: GovTabControllerItem) {\n\t\tconst index = this.controllers.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);\n\t\tthis.focusIndex = index\n\t\tthis.setActiveByIdentifier(control.triggerIdentifier)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onKeydownHandler(e: KeyboardEvent) {\n\t\tconst keyCode = e.keyCode\n\n\t\te.stopPropagation()\n\t\tthis.goToPrevNext(keyCode)\n\t}\n\n\tprivate goToPrevNext(keyCode: number) {\n\t\tif ([37, 38, 39, 40].includes(keyCode)) {\n\t\t\tif (false === (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1)) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.controllers[this.focusIndex].active = false\n\n\t\t\tif (keyCode === 39 || keyCode === 40) {\n\t\t\t\tthis.focusIndex++\n\t\t\t\tif (this.focusIndex >= this.controllers.length) {\n\t\t\t\t\tthis.focusIndex = 0\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(40)\n\t\t\t\t}\n\t\t\t} else if (keyCode === 37 || keyCode === 38) {\n\t\t\t\tthis.focusIndex--\n\t\t\t\tif (this.focusIndex < 0) {\n\t\t\t\t\tthis.focusIndex = this.controllers.length - 1\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(38)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1) {\n\t\t\t\tconst current = this.controllers[this.focusIndex]\n\t\t\t\tcurrent.active = true\n\t\t\t\tconst trigger = this.triggerRefs[current.triggerIdentifier]\n\t\t\t\tif (trigger.nodeName.toLowerCase() === 'gov-chip') {\n\t\t\t\t\t(this.triggerRefs[current.triggerIdentifier] as HTMLGovChipElement).setFocus()\n\t\t\t\t} else {\n\t\t\t\t\tthis.triggerRefs[current.triggerIdentifier].focus()\n\t\t\t\t}\n\n\t\t\t\tthis.controllers = [...this.controllers]\n\t\t\t\tthis.reRender()\n\t\t\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync refresh(): Promise<void> {\n\t\tthis.prepareControllers()\n\t}\n\n\t/**\n\t * Returns the currently selected tabs-item\n\t */\n\t@Method()\n\tasync currentTab(): Promise<Nullable<HTMLGovTabsItemElement>> {\n\t\treturn this.getCurrentTab().element || null\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync setActiveTab(identifier: string): Promise<void> {\n\t\tthis.setActiveByIdentifier(identifier)\n\t\tthis.reRender()\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync rerender(): Promise<void> {\n\t\tthis.prepareControllers(true);\n\t}\n}\n"],"mappings":"yZA2BaA,EAAOC,EAAA,MAAAD,UAAAE,EAKnB,WAAAC,G,oEAHQC,KAAAC,YAAsE,G,UAW7C,O,UAIK,I,WAID,U,iBAIc,a,eAIW,M,iBAqBf,G,gBACzB,E,yBACqB,GA9C1CD,KAAKE,EAAIC,EAAQH,KAAKI,K,CA8BvB,YAAAC,CAAaC,GACZC,EAAaC,EAAUF,EAAUG,EAAUC,K,CAI5C,aAAAC,CAAcL,GACbC,EAAaK,EAAWN,EAAUG,EAAUC,K,CAI7C,YAAAG,CAAaP,GACZC,EAAaO,EAAUR,EAAUG,EAAUC,K,CAO5C,gBAAAK,GACCf,K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jE,KAAKkC,YAAYgF,OAAS,EAAG,CAC3E,MAAMC,EAAUnH,KAAKkC,YAAYlC,KAAKiE,YACtCkD,EAAQxD,OAAS,KACjB,MAAMyD,EAAUpH,KAAKC,YAAYkH,EAAQnE,mBACzC,GAAIoE,EAAQC,SAASC,gBAAkB,WAAY,CACjDtH,KAAKC,YAAYkH,EAAQnE,mBAA0CuE,U,KAC9D,CACNvH,KAAKC,YAAYkH,EAAQnE,mBAAmBwE,O,CAG7CxH,KAAKkC,YAAc,IAAIlC,KAAKkC,aAC5BlC,KAAKqE,WACLrE,KAAK2G,UAAUC,KAAK5G,KAAKuG,gBAAgB7C,Q,GAS5C,aAAM+D,GACLzH,KAAKuB,oB,CAON,gBAAMmG,GACL,OAAO1H,KAAKuG,gBAAgB7C,SAAW,I,CAOxC,kBAAMiE,CAAa5E,GAClB/C,KAAKsE,sBAAsBvB,GAC3B/C,KAAKqE,U,CAON,cAAMuD,GACL5H,KAAKuB,mBAAmB,K","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,h as s,d as o}from"./p-42200001.js";import{g as a}from"./p-ea7fdd2e.js";import{v as i}from"./p-0b3574c2.js";import{a as c,c as n}from"./p-44a8a668.js";import{p as d}from"./p-e0e2e9c1.js";import{S as r}from"./p-92f420cb.js";import{p as f}from"./p-016bbea6.js";import{d as b}from"./p-2b33d27c.js";const m=d(r,["_XS","_S","_M"]);var l;(function(e){e["BOLD"]="bold";e["SUBTLE"]="subtle"})(l||(l={}));const p={root:"gov-tag"};const h=e(class e extends t{constructor(){super();this.__registerHost();this.iconStart=undefined;this.iconEnd=undefined;this.size=m._S;this.color=c.PRIMARY;this.type=undefined;this.expanded=false;this.h=a(this.host)}validateColor(e){i(c,e,p.root)}validateSize(e){i(n,e,p.root)}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size)}render(){const e=f(this.iconStart);const t=f(this.iconEnd);return s(o,{key:"df3988a7cb0dbf8e7ee418918e9f65e7cca6ba87",class:this.h.classes(p.root),color:this.color,size:this.size,type:this.type},s("span",{key:"bcb9b024178012722badffe0b0faaf79e2e8a933",class:"element"},s("slot",{key:"2651a7dbce1b7a893dfc703e1393235286353e4b",name:"icon-start"},e&&s("gov-icon",{key:"111e55c5ee1edaf6b578af8f37667e18c4d2487c",type:e.type,name:e.name})),s("slot",{key:"fb60c7f3f3f25168f062134a93c4c4bb039fc29b"}),s("slot",{key:"20e64ee3addb1e45de10d486d25d7f024725626e",name:"icon-end"},t&&s("gov-icon",{key:"e11b23de2ce9b35a27367c7ba7bb1b907bded75b",type:t.type,name:t.name}))))}get host(){return this}static get watchers(){return{color:["validateColor"],size:["validateSize"]}}},[4,"gov-tag",{iconStart:[1,"icon-start"],iconEnd:[1,"icon-end"],size:[513],color:[513],type:[513],expanded:[516]},undefined,{color:["validateColor"],size:["validateSize"]}]);function u(){if(typeof customElements==="undefined"){return}const e=["gov-tag","gov-icon"];e.forEach((e=>{switch(e){case"gov-tag":if(!customElements.get(e)){customElements.define(e,h)}break;case"gov-icon":if(!customElements.get(e)){b()}break}}))}u();const v=h;const g=u;export{v as GovTag,g as defineCustomElement};
1
+ import{p as e,H as t,h as s,d as o}from"./p-42200001.js";import{g as a}from"./p-ea7fdd2e.js";import{v as i}from"./p-0b3574c2.js";import{a as c,c as n}from"./p-44a8a668.js";import{p as d}from"./p-e0e2e9c1.js";import{S as r}from"./p-92f420cb.js";import{p as f}from"./p-016bbea6.js";import{d as b}from"./p-d1a59544.js";const m=d(r,["_XS","_S","_M"]);var l;(function(e){e["BOLD"]="bold";e["SUBTLE"]="subtle"})(l||(l={}));const p={root:"gov-tag"};const h=e(class e extends t{constructor(){super();this.__registerHost();this.iconStart=undefined;this.iconEnd=undefined;this.size=m._S;this.color=c.PRIMARY;this.type=undefined;this.expanded=false;this.h=a(this.host)}validateColor(e){i(c,e,p.root)}validateSize(e){i(n,e,p.root)}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size)}render(){const e=f(this.iconStart);const t=f(this.iconEnd);return s(o,{key:"df3988a7cb0dbf8e7ee418918e9f65e7cca6ba87",class:this.h.classes(p.root),color:this.color,size:this.size,type:this.type},s("span",{key:"bcb9b024178012722badffe0b0faaf79e2e8a933",class:"element"},s("slot",{key:"2651a7dbce1b7a893dfc703e1393235286353e4b",name:"icon-start"},e&&s("gov-icon",{key:"111e55c5ee1edaf6b578af8f37667e18c4d2487c",type:e.type,name:e.name})),s("slot",{key:"fb60c7f3f3f25168f062134a93c4c4bb039fc29b"}),s("slot",{key:"20e64ee3addb1e45de10d486d25d7f024725626e",name:"icon-end"},t&&s("gov-icon",{key:"e11b23de2ce9b35a27367c7ba7bb1b907bded75b",type:t.type,name:t.name}))))}get host(){return this}static get watchers(){return{color:["validateColor"],size:["validateSize"]}}},[4,"gov-tag",{iconStart:[1,"icon-start"],iconEnd:[1,"icon-end"],size:[513],color:[513],type:[513],expanded:[516]},undefined,{color:["validateColor"],size:["validateSize"]}]);function u(){if(typeof customElements==="undefined"){return}const e=["gov-tag","gov-icon"];e.forEach((e=>{switch(e){case"gov-tag":if(!customElements.get(e)){customElements.define(e,h)}break;case"gov-icon":if(!customElements.get(e)){b()}break}}))}u();const v=h;const g=u;export{v as GovTag,g as defineCustomElement};
2
2
  //# sourceMappingURL=gov-tag.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,c as s,h as i,d as a}from"./p-42200001.js";import{g as o}from"./p-ea7fdd2e.js";import{p as c}from"./p-e0e2e9c1.js";import{S as h}from"./p-92f420cb.js";import{a as n}from"./p-e8ec030e.js";import{v as r}from"./p-0b3574c2.js";import{d as l,s as m,g as d}from"./p-2b33d27c.js";const f=c(h,["_XS","_S","_M","_L","_XL"]);const b={root:"gov-theme-switch",indicator:"gov-theme-switch__indicator",label:"gov-theme-switch__label",iconLight:"gov-theme-switch__icon-light",iconDark:"gov-theme-switch__icon-dark"};const p="data-theme";var g;(function(e){e["auto"]="auto";e["light"]="light";e["dark"]="dark"})(g||(g={}));const u=e(class e extends t{constructor(){super();this.__registerHost();this.govChange=s(this,"gov-change",7);this.setThemeState=e=>{this.theme=e;this.govChange.emit({component:b.root,state:this.theme,ref:this.host})};this.size="m";this.displayLabel=false;this.ariaLabelLight="Přepnout na tmavý mód";this.ariaLabelDark="Přepnout na světlý mód";this.labelLight="Světlý mód";this.labelDark="Tmavý mód";this.theme=g.auto;this.h=o(this.host)}validateSize(e){r(f,e,b.root)}watchTheme(e){this.htmlElement.setAttribute(p,e);this.htmlElement.classList.remove(...Object.keys(g));this.htmlElement.classList.add(e);m(p,e)}get storageValue(){return d(p)}get htmlElement(){return document.documentElement}get isSystemPrefersColorDark(){return n&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}componentWillLoad(){this.initDefaultState();this.validateSize(this.size)}initDefaultState(){const e=Object.keys(g);let t=this.storageValue;const s=this.htmlElement.getAttribute(p);if(t&&e.includes(t)){this.theme=t}else if(s&&e.includes(s)){this.theme=s}else{this.theme=g.auto}}render(){let e=this.theme===g.dark;if(this.theme===g.auto){e=this.isSystemPrefersColorDark}return i(a,{key:"544d940df577f621ba8ee0d8f46bc6b6b41815ca",class:this.h.classes(b.root),theme:e?g.dark:g.light,size:this.size},i("button",{key:"8b1165e9c7ade60a00f4b8dcc65ba50dd0ee9408",onClick:()=>this.setThemeState(e?g.light:g.dark),"aria-current":this.theme,"aria-label":e?this.ariaLabelDark:this.ariaLabelLight},i("span",{key:"3d78b019112d3b3bcf75517d85d61e2ed17cd717"},i("span",{key:"cf2293cd960946e2be0fe54bd847a0d616219887",class:b.indicator},g.light&&i("gov-icon",{key:"7d1affc44645eca82d285a51a138ddf73b03ad3e",name:"sun",class:b.iconLight,type:"components"}),g.dark&&i("gov-icon",{key:"df70460dc0cf1530f2ca36917f2bd203aee324ab",name:"moon",class:b.iconDark,type:"components"})),this.displayLabel?i("span",{class:b.label},e?this.labelDark:this.labelLight):null)))}get host(){return this}static get watchers(){return{size:["validateSize"],theme:["watchTheme"]}}},[0,"gov-theme-switch",{size:[1],displayLabel:[4,"display-label"],ariaLabelLight:[1,"aria-label-light"],ariaLabelDark:[1,"aria-label-dark"],labelLight:[1,"label-light"],labelDark:[1,"label-dark"],theme:[32]},undefined,{size:["validateSize"],theme:["watchTheme"]}]);function v(){if(typeof customElements==="undefined"){return}const e=["gov-theme-switch","gov-icon"];e.forEach((e=>{switch(e){case"gov-theme-switch":if(!customElements.get(e)){customElements.define(e,u)}break;case"gov-icon":if(!customElements.get(e)){l()}break}}))}v();const k=u;const w=v;export{k as GovThemeSwitch,w as defineCustomElement};
1
+ import{p as e,H as t,c as s,h as i,d as a}from"./p-42200001.js";import{g as o}from"./p-ea7fdd2e.js";import{p as h}from"./p-e0e2e9c1.js";import{S as c}from"./p-92f420cb.js";import{a as n}from"./p-e8ec030e.js";import{v as r}from"./p-0b3574c2.js";import{d as l,s as m,g as d}from"./p-d1a59544.js";const f=h(c,["_XS","_S","_M","_L","_XL"]);const b={root:"gov-theme-switch",indicator:"gov-theme-switch__indicator",label:"gov-theme-switch__label",iconLight:"gov-theme-switch__icon-light",iconDark:"gov-theme-switch__icon-dark"};const p="data-theme";var g;(function(e){e["auto"]="auto";e["light"]="light";e["dark"]="dark"})(g||(g={}));const u=e(class e extends t{constructor(){super();this.__registerHost();this.govChange=s(this,"gov-change",7);this.setThemeState=e=>{this.theme=e;this.govChange.emit({component:b.root,state:this.theme,ref:this.host})};this.size="m";this.displayLabel=false;this.ariaLabelLight="Přepnout na tmavý mód";this.ariaLabelDark="Přepnout na světlý mód";this.labelLight="Světlý mód";this.labelDark="Tmavý mód";this.theme=g.auto;this.h=o(this.host)}validateSize(e){r(f,e,b.root)}watchTheme(e){this.htmlElement.setAttribute(p,e);this.htmlElement.classList.remove(...Object.keys(g));this.htmlElement.classList.add(e);m(p,e)}get storageValue(){return d(p)}get htmlElement(){return document.documentElement}get isSystemPrefersColorDark(){return n&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}componentWillLoad(){this.initDefaultState();this.validateSize(this.size)}initDefaultState(){const e=Object.keys(g);let t=this.storageValue;const s=this.htmlElement.getAttribute(p);if(t&&e.includes(t)){this.theme=t}else if(s&&e.includes(s)){this.theme=s}else{this.theme=g.auto}}render(){let e=this.theme===g.dark;if(this.theme===g.auto){e=this.isSystemPrefersColorDark}return i(a,{key:"544d940df577f621ba8ee0d8f46bc6b6b41815ca",class:this.h.classes(b.root),theme:e?g.dark:g.light,size:this.size},i("button",{key:"8b1165e9c7ade60a00f4b8dcc65ba50dd0ee9408",onClick:()=>this.setThemeState(e?g.light:g.dark),"aria-current":this.theme,"aria-label":e?this.ariaLabelDark:this.ariaLabelLight},i("span",{key:"3d78b019112d3b3bcf75517d85d61e2ed17cd717"},i("span",{key:"cf2293cd960946e2be0fe54bd847a0d616219887",class:b.indicator},g.light&&i("gov-icon",{key:"7d1affc44645eca82d285a51a138ddf73b03ad3e",name:"sun",class:b.iconLight,type:"components"}),g.dark&&i("gov-icon",{key:"df70460dc0cf1530f2ca36917f2bd203aee324ab",name:"moon",class:b.iconDark,type:"components"})),this.displayLabel?i("span",{class:b.label},e?this.labelDark:this.labelLight):null)))}get host(){return this}static get watchers(){return{size:["validateSize"],theme:["watchTheme"]}}},[0,"gov-theme-switch",{size:[1],displayLabel:[4,"display-label"],ariaLabelLight:[1,"aria-label-light"],ariaLabelDark:[1,"aria-label-dark"],labelLight:[1,"label-light"],labelDark:[1,"label-dark"],theme:[32]},undefined,{size:["validateSize"],theme:["watchTheme"]}]);function v(){if(typeof customElements==="undefined"){return}const e=["gov-theme-switch","gov-icon"];e.forEach((e=>{switch(e){case"gov-theme-switch":if(!customElements.get(e)){customElements.define(e,u)}break;case"gov-icon":if(!customElements.get(e)){l()}break}}))}v();const k=u;const w=v;export{k as GovThemeSwitch,w as defineCustomElement};
2
2
  //# sourceMappingURL=gov-theme-switch.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,h as s,F as i,d as o}from"./p-42200001.js";import{p as n}from"./p-e0e2e9c1.js";import{S as a}from"./p-92f420cb.js";import{g as c}from"./p-ea7fdd2e.js";import{d as r}from"./p-2b33d27c.js";n(a,["_S","_M","_L"]);const f={root:"gov-tile",link:"gov-tile__link",content:"gov-tile__content",text:"gov-tile__text",title:"gov-tile__title",icon:"gov-tile__icon",annotation:"gov-tile__annotation"};const d=e(class e extends t{constructor(){super();this.__registerHost();this.size="m";this.orientation=undefined;this.noBorder=false;this.href=undefined;this.target=undefined;this.h=c(this.host)}render(){return s(o,{key:"ab52fb23f84579e2b32b063e45f7bf23605011d6",class:this.h.classes(f.root),size:this.size,orientation:this.orientation,clickable:this.href?true:null},s("slot",{key:"6a2bf399f6767b74a29e2372d84025bd5046377f",name:"icon"}),s("div",{key:"64b519f3b42dc5c9f51d4564a083aa95448c61b3",class:f.content},s("div",{key:"56b85285dd5151ca428889fe78888289a1ce75bb",class:f.text},s("div",{key:"2f26093e140f3db65d5fdb08daf834686b0b5743",class:f.title},this.href?s(i,null,s("a",{href:this.href,target:this.target,class:f.link,ref:e=>this.triggerRef=e},s("slot",{name:"title"})),s("span",{class:f.icon},s("gov-icon",{name:"chevron-right",type:"components"}))):s("slot",{name:"title"})),s("div",{key:"25d8abd31e31062bd2da487c0ff9946b1893278c",class:`${f.annotation} ${this.href?`${f.annotation}--padding`:""}`},s("slot",{key:"bebce043085e0440e2eca20c3af4abee18b292e4"}))),s("slot",{key:"e34513bbd6c59b113f6c8f39d6ebfaf61696d2fe",name:"button"})))}async getTriggerRef(){return this.triggerRef}get host(){return this}},[4,"gov-tile",{size:[513],orientation:[1],noBorder:[4,"no-border"],href:[513],target:[1],getTriggerRef:[64]}]);function l(){if(typeof customElements==="undefined"){return}const e=["gov-tile","gov-icon"];e.forEach((e=>{switch(e){case"gov-tile":if(!customElements.get(e)){customElements.define(e,d)}break;case"gov-icon":if(!customElements.get(e)){r()}break}}))}l();const b=d;const g=l;export{b as GovTile,g as defineCustomElement};
1
+ import{p as e,H as t,h as s,F as i,d as o}from"./p-42200001.js";import{p as n}from"./p-e0e2e9c1.js";import{S as a}from"./p-92f420cb.js";import{g as c}from"./p-ea7fdd2e.js";import{d as r}from"./p-d1a59544.js";n(a,["_S","_M","_L"]);const f={root:"gov-tile",link:"gov-tile__link",content:"gov-tile__content",text:"gov-tile__text",title:"gov-tile__title",icon:"gov-tile__icon",annotation:"gov-tile__annotation"};const d=e(class e extends t{constructor(){super();this.__registerHost();this.size="m";this.orientation=undefined;this.noBorder=false;this.href=undefined;this.target=undefined;this.h=c(this.host)}render(){return s(o,{key:"ab52fb23f84579e2b32b063e45f7bf23605011d6",class:this.h.classes(f.root),size:this.size,orientation:this.orientation,clickable:this.href?true:null},s("slot",{key:"6a2bf399f6767b74a29e2372d84025bd5046377f",name:"icon"}),s("div",{key:"64b519f3b42dc5c9f51d4564a083aa95448c61b3",class:f.content},s("div",{key:"56b85285dd5151ca428889fe78888289a1ce75bb",class:f.text},s("div",{key:"2f26093e140f3db65d5fdb08daf834686b0b5743",class:f.title},this.href?s(i,null,s("a",{href:this.href,target:this.target,class:f.link,ref:e=>this.triggerRef=e},s("slot",{name:"title"})),s("span",{class:f.icon},s("gov-icon",{name:"chevron-right",type:"components"}))):s("slot",{name:"title"})),s("div",{key:"25d8abd31e31062bd2da487c0ff9946b1893278c",class:`${f.annotation} ${this.href?`${f.annotation}--padding`:""}`},s("slot",{key:"bebce043085e0440e2eca20c3af4abee18b292e4"}))),s("slot",{key:"e34513bbd6c59b113f6c8f39d6ebfaf61696d2fe",name:"button"})))}async getTriggerRef(){return this.triggerRef}get host(){return this}},[4,"gov-tile",{size:[513],orientation:[1],noBorder:[4,"no-border"],href:[513],target:[1],getTriggerRef:[64]}]);function l(){if(typeof customElements==="undefined"){return}const e=["gov-tile","gov-icon"];e.forEach((e=>{switch(e){case"gov-tile":if(!customElements.get(e)){customElements.define(e,d)}break;case"gov-icon":if(!customElements.get(e)){r()}break}}))}l();const b=d;const g=l;export{b as GovTile,g as defineCustomElement};
2
2
  //# sourceMappingURL=gov-tile.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,c as e,h as o,d as i}from"./p-42200001.js";import{v as a}from"./p-0b3574c2.js";import{C as c}from"./p-5aad3497.js";import{p as n}from"./p-e0e2e9c1.js";import{g as r}from"./p-ea7fdd2e.js";import{c as d}from"./p-cd6c2938.js";import{A as h,a as l,i as b}from"./p-33d5d1ed.js";import{d as m}from"./p-abea96cf.js";import{d as f}from"./p-2b33d27c.js";const p=n(c,["PRIMARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);var u;(function(t){t["BOLD"]="bold";t["SUBTLE"]="subtle"})(u||(u={}));const v={root:"gov-toast",hidden:"gov-toast--hidden",content:"gov-toast__content",icon:"gov-toast__icon",close:"gov-toast__close",timer:"gov-toast__timer"};const g=t(class t extends s{constructor(){super();this.__registerHost();this.govClose=e(this,"gov-close",7);this.color="primary";this.gravity="top";this.position="right";this.type="bold";this.time=0;this.closeLabel=undefined;this.accessibleCloseLabel=undefined;this.inheritedAttributes={};this.h=r(this.host);this.toastId=d("GovToast")}validateColor(t){a(p,t,v.root)}componentDidLoad(){this.attributeObserver=new h(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(l)}componentWillLoad(){this.validateColor(this.color);this.runTimer();this.inheritedAttributes=b(this.host)}disconnectedCallback(){var t;clearTimeout(this.timeout);(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}runTimer(){if(this.isTimer){this.timeout=setTimeout((()=>{this.host.classList.add(v.hidden);setTimeout((()=>{this.destroy().catch();this.govClose.emit(this.toastId)}),600)}),this.time)}}render(){return o(i,{key:"1e6e189eb820b1d3cc2b8404ad449ad91d0d81cb",class:this.h.classes(v.root),"data-toast-id":this.toastId,gravity:this.gravity,position:this.position,color:this.color,type:this.type,style:{"--toast-duration":this.time+"ms"}},this.h.hasSlot("icon")&&o("span",{key:"e55556b89b1e667e3eded15cc0293afad61a55b5",class:v.icon},o("slot",{key:"918cd31f3e80f36ea346ad1be27d093baab60eef",name:"icon"})),o("div",Object.assign({key:"6232d63367c11301b626620211b8a7cc30f171cf",class:v.content},this.inheritedAttributes,{"aria-live":"polite",role:"status"}),o("slot",{key:"bfd4174fae30924135ca10b1a1f2a2338179de24"})),o("gov-button",{key:"d1f68ef7ed4933bd15987843df78d142c9d4e588",size:"s","aria-label":this.accessibleCloseLabel,color:this.isBold?this.color:"neutral",type:"base","on-gov-click":this.onCloseHandler.bind(this),class:v.close},this.closeLabel?this.closeLabel:o("gov-icon",{name:"x-lg",type:"components"})),o("div",{key:"f863b0cb33027641fff15771b051a091d4fdf782",class:v.timer}))}onCloseHandler(){this.govClose.emit(this.toastId);this.destroy().catch()}get isBold(){return this.type==="bold"}get isTimer(){return Number.isInteger(this.time)&&this.time>0}async destroy(){clearTimeout(this.timeout);const t=document.querySelector(`[data-toast-id="${this.toastId}"]`);if(t){t.classList.add(v.hidden);if(typeof t.remove==="function"){t.remove()}}}get host(){return this}static get watchers(){return{color:["validateColor"]}}},[4,"gov-toast",{color:[1],gravity:[1],position:[1],type:[1],time:[2],closeLabel:[1,"close-label"],accessibleCloseLabel:[1,"accessible-close-label"],inheritedAttributes:[32],destroy:[64]},undefined,{color:["validateColor"]}]);function y(){if(typeof customElements==="undefined"){return}const t=["gov-toast","gov-button","gov-icon"];t.forEach((t=>{switch(t){case"gov-toast":if(!customElements.get(t)){customElements.define(t,g)}break;case"gov-button":if(!customElements.get(t)){m()}break;case"gov-icon":if(!customElements.get(t)){f()}break}}))}y();const j=g;const k=y;export{j as GovToast,k as defineCustomElement};
1
+ import{p as t,H as s,c as e,h as o,d as i}from"./p-42200001.js";import{v as a}from"./p-0b3574c2.js";import{C as c}from"./p-5aad3497.js";import{p as n}from"./p-e0e2e9c1.js";import{g as r}from"./p-ea7fdd2e.js";import{c as d}from"./p-cd6c2938.js";import{A as h,a as l,i as m}from"./p-33d5d1ed.js";import{d as b}from"./p-80c889e2.js";import{d as f}from"./p-d1a59544.js";const p=n(c,["PRIMARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);var u;(function(t){t["BOLD"]="bold";t["SUBTLE"]="subtle"})(u||(u={}));const v={root:"gov-toast",hidden:"gov-toast--hidden",content:"gov-toast__content",icon:"gov-toast__icon",close:"gov-toast__close",timer:"gov-toast__timer"};const g=t(class t extends s{constructor(){super();this.__registerHost();this.govClose=e(this,"gov-close",7);this.color="primary";this.gravity="top";this.position="right";this.type="bold";this.time=0;this.closeLabel=undefined;this.accessibleCloseLabel=undefined;this.inheritedAttributes={};this.h=r(this.host);this.toastId=d("GovToast")}validateColor(t){a(p,t,v.root)}componentDidLoad(){this.attributeObserver=new h(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(l)}componentWillLoad(){this.validateColor(this.color);this.runTimer();this.inheritedAttributes=m(this.host)}disconnectedCallback(){var t;clearTimeout(this.timeout);(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}runTimer(){if(this.isTimer){this.timeout=setTimeout((()=>{this.host.classList.add(v.hidden);setTimeout((()=>{this.destroy().catch();this.govClose.emit(this.toastId)}),600)}),this.time)}}render(){return o(i,{key:"1e6e189eb820b1d3cc2b8404ad449ad91d0d81cb",class:this.h.classes(v.root),"data-toast-id":this.toastId,gravity:this.gravity,position:this.position,color:this.color,type:this.type,style:{"--toast-duration":this.time+"ms"}},this.h.hasSlot("icon")&&o("span",{key:"e55556b89b1e667e3eded15cc0293afad61a55b5",class:v.icon},o("slot",{key:"918cd31f3e80f36ea346ad1be27d093baab60eef",name:"icon"})),o("div",Object.assign({key:"6232d63367c11301b626620211b8a7cc30f171cf",class:v.content},this.inheritedAttributes,{"aria-live":"polite",role:"status"}),o("slot",{key:"bfd4174fae30924135ca10b1a1f2a2338179de24"})),o("gov-button",{key:"d1f68ef7ed4933bd15987843df78d142c9d4e588",size:"s","aria-label":this.accessibleCloseLabel,color:this.isBold?this.color:"neutral",type:"base","on-gov-click":this.onCloseHandler.bind(this),class:v.close},this.closeLabel?this.closeLabel:o("gov-icon",{name:"x-lg",type:"components"})),o("div",{key:"f863b0cb33027641fff15771b051a091d4fdf782",class:v.timer}))}onCloseHandler(){this.govClose.emit(this.toastId);this.destroy().catch()}get isBold(){return this.type==="bold"}get isTimer(){return Number.isInteger(this.time)&&this.time>0}async destroy(){clearTimeout(this.timeout);const t=document.querySelector(`[data-toast-id="${this.toastId}"]`);if(t){t.classList.add(v.hidden);if(typeof t.remove==="function"){t.remove()}}}get host(){return this}static get watchers(){return{color:["validateColor"]}}},[4,"gov-toast",{color:[1],gravity:[1],position:[1],type:[1],time:[2],closeLabel:[1,"close-label"],accessibleCloseLabel:[1,"accessible-close-label"],inheritedAttributes:[32],destroy:[64]},undefined,{color:["validateColor"]}]);function y(){if(typeof customElements==="undefined"){return}const t=["gov-toast","gov-button","gov-icon"];t.forEach((t=>{switch(t){case"gov-toast":if(!customElements.get(t)){customElements.define(t,g)}break;case"gov-button":if(!customElements.get(t)){b()}break;case"gov-icon":if(!customElements.get(t)){f()}break}}))}y();const j=g;const k=y;export{j as GovToast,k as defineCustomElement};
2
2
  //# sourceMappingURL=gov-toast.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,h as e,d as i}from"./p-42200001.js";import{T as o,a as n,b as c}from"./p-76d604c6.js";import{c as a}from"./p-ea7fdd2e.js";import{d as l}from"./p-abea96cf.js";import{d as r}from"./p-2b33d27c.js";const d=t(class t extends s{constructor(){super();this.__registerHost();this.color=o.PRIMARY;this.size=n._M;this.persist=false;this.isVisible=false;this.parentId=null}visibleContent(t){clearTimeout(this.timeout);if(t===false){this.timeout=setTimeout((()=>{this.host.style.visibility="hidden"}),250)}else{this.host.style.visibility="visible"}}hideContent(){this.isVisible=false;this.persist=false;const t=document.getElementById(this.parentId);if(t){t.hide().catch()}}render(){return e(i,{key:"f147a718b5c556b3314f48a86edfd9ee4db6d93e",class:c.root,role:"tooltip",hidden:!this.isVisible,"aria-hidden":!a(this.isVisible),"is-visible":this.isVisible},e("slot",{key:"4cde158814765edfb1fc6ab1e8cce6ad1d98e175"}),this.persist?e("gov-button",{"on-gov-click":this.hideContent.bind(this),color:this.color,size:this.size,type:"base"},e("gov-icon",{slot:"icon-start",name:"x-lg",type:"components"})):null)}get host(){return this}static get watchers(){return{isVisible:["visibleContent"]}}},[4,"gov-tooltip-content",{color:[1],size:[1],persist:[4],isVisible:[1028,"is-visible"],parentId:[1,"parent-id"]},undefined,{isVisible:["visibleContent"]}]);function h(){if(typeof customElements==="undefined"){return}const t=["gov-tooltip-content","gov-button","gov-icon"];t.forEach((t=>{switch(t){case"gov-tooltip-content":if(!customElements.get(t)){customElements.define(t,d)}break;case"gov-button":if(!customElements.get(t)){l()}break;case"gov-icon":if(!customElements.get(t)){r()}break}}))}h();const f=d;const m=h;export{f as GovTooltipContent,m as defineCustomElement};
1
+ import{p as t,H as s,h as e,d as i}from"./p-42200001.js";import{T as o,a as n,b as c}from"./p-76d604c6.js";import{c as a}from"./p-ea7fdd2e.js";import{d as l}from"./p-80c889e2.js";import{d as r}from"./p-d1a59544.js";const d=t(class t extends s{constructor(){super();this.__registerHost();this.color=o.PRIMARY;this.size=n._M;this.persist=false;this.isVisible=false;this.parentId=null}visibleContent(t){clearTimeout(this.timeout);if(t===false){this.timeout=setTimeout((()=>{this.host.style.visibility="hidden"}),250)}else{this.host.style.visibility="visible"}}hideContent(){this.isVisible=false;this.persist=false;const t=document.getElementById(this.parentId);if(t){t.hide().catch()}}render(){return e(i,{key:"f147a718b5c556b3314f48a86edfd9ee4db6d93e",class:c.root,role:"tooltip",hidden:!this.isVisible,"aria-hidden":!a(this.isVisible),"is-visible":this.isVisible},e("slot",{key:"4cde158814765edfb1fc6ab1e8cce6ad1d98e175"}),this.persist?e("gov-button",{"on-gov-click":this.hideContent.bind(this),color:this.color,size:this.size,type:"base"},e("gov-icon",{slot:"icon-start",name:"x-lg",type:"components"})):null)}get host(){return this}static get watchers(){return{isVisible:["visibleContent"]}}},[4,"gov-tooltip-content",{color:[1],size:[1],persist:[4],isVisible:[1028,"is-visible"],parentId:[1,"parent-id"]},undefined,{isVisible:["visibleContent"]}]);function h(){if(typeof customElements==="undefined"){return}const t=["gov-tooltip-content","gov-button","gov-icon"];t.forEach((t=>{switch(t){case"gov-tooltip-content":if(!customElements.get(t)){customElements.define(t,d)}break;case"gov-button":if(!customElements.get(t)){l()}break;case"gov-icon":if(!customElements.get(t)){r()}break}}))}h();const f=d;const m=h;export{f as GovTooltipContent,m as defineCustomElement};
2
2
  //# sourceMappingURL=gov-tooltip-content.js.map
@@ -1,2 +1,2 @@
1
- import{p as s,H as t,c as e,h as i,d as a}from"./p-42200001.js";import{v as o}from"./p-0b3574c2.js";import{W as n,c}from"./p-c61a5830.js";import{c as d}from"./p-cd6c2938.js";import{g as h,b as l,t as r}from"./p-ea7fdd2e.js";import{d as m}from"./p-2b33d27c.js";var p;(function(s){s["DIV"]="div";s["BUTTON"]="button"})(p||(p={}));const f=s(class s extends t{constructor(){super();this.__registerHost();this.govChange=e(this,"gov-change",7);this.hydrated=false;this.color="primary";this.size="m";this.identifier=undefined;this.collapsible=false;this.disabled=false;this.isExpanded=false;this.h=h(this.host);this.triggerId=d("GovWizardItem");this.contentId=d("GovWizardContent")}validateColor(s){o(c,s,n.root)}emmitChange(){this.govChange.emit({expanded:this.isExpanded,component:n.root})}componentWillLoad(){this.validateColor(this.color)}connectedCallback(){this.hydrated=true}render(){const s=this.identifier||this.triggerId;const t=this.collapsible?p.BUTTON:p.DIV;const e=this.h.hasSlot("prefix")&&i("span",{key:"394a8843e47dd540dd1b22ba6cec699f73d55870",class:n.prefix},i("slot",{key:"811680c41b1729b689a0679e16e3aba4455d4d17",name:"prefix"}));return i(a,{key:"e99661de092cfa2f0476faf5fb9c266e52bb3b0b",class:this.h.classes(n.root),"is-expanded":this.isExpanded,color:this.color,size:this.size,role:"listitem",collapsible:this.collapsible,hydrated:this.hydrated},i("div",{key:"a2a2218a1b036da0c9a6edb7b0c0ce1be5a214ff",class:n.header},e,this.collapsible?i(t,{id:s,class:this.h.classes(n.label),"aria-expanded":l(this.isExpanded),"aria-controls":this.contentId,disabled:this.disabled,"aria-disabled":r(this.disabled),onClick:s=>{s.preventDefault();s.stopPropagation();this.toggle()}},i("span",{class:n.headline},i("slot",{name:"headline"}),this.collapsible&&i("gov-icon",{class:n.chevron,name:"chevron-down",type:"components"})),i("slot",{name:"annotation"})):i(t,{class:this.h.classes(n.label)},i("span",{class:n.headline},i("slot",{name:"headline"}),this.collapsible&&i("gov-icon",{class:n.chevron,name:"chevron-down",type:"components"})),i("slot",{name:"annotation"}))),this.collapsible?i("div",{class:n.content,id:this.contentId,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded,"aria-labelledby":s},i("slot",null)):i("div",{class:n.content,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded},i("slot",null)))}async open(){this.isExpanded=true;this.emmitChange()}async close(){this.isExpanded=false;this.emmitChange()}async toggle(){this.isExpanded=!this.isExpanded;this.emmitChange()}async currentState(){return this.isExpanded}get host(){return this}static get watchers(){return{color:["validateColor"]}}},[4,"gov-wizard-item",{color:[1],size:[1],identifier:[1],collapsible:[4],disabled:[4],isExpanded:[1028,"is-expanded"],open:[64],close:[64],toggle:[64],currentState:[64]},undefined,{color:["validateColor"]}]);function b(){if(typeof customElements==="undefined"){return}const s=["gov-wizard-item","gov-icon"];s.forEach((s=>{switch(s){case"gov-wizard-item":if(!customElements.get(s)){customElements.define(s,f)}break;case"gov-icon":if(!customElements.get(s)){m()}break}}))}b();const u=f;const v=b;export{u as GovWizardItem,v as defineCustomElement};
1
+ import{p as s,H as t,c as e,h as i,d as a}from"./p-42200001.js";import{v as o}from"./p-0b3574c2.js";import{W as n,c}from"./p-c61a5830.js";import{c as d}from"./p-cd6c2938.js";import{g as h,b as l,t as r}from"./p-ea7fdd2e.js";import{d as m}from"./p-d1a59544.js";var p;(function(s){s["DIV"]="div";s["BUTTON"]="button"})(p||(p={}));const f=s(class s extends t{constructor(){super();this.__registerHost();this.govChange=e(this,"gov-change",7);this.hydrated=false;this.color="primary";this.size="m";this.identifier=undefined;this.collapsible=false;this.disabled=false;this.isExpanded=false;this.h=h(this.host);this.triggerId=d("GovWizardItem");this.contentId=d("GovWizardContent")}validateColor(s){o(c,s,n.root)}emmitChange(){this.govChange.emit({expanded:this.isExpanded,component:n.root})}componentWillLoad(){this.validateColor(this.color)}connectedCallback(){this.hydrated=true}render(){const s=this.identifier||this.triggerId;const t=this.collapsible?p.BUTTON:p.DIV;const e=this.h.hasSlot("prefix")&&i("span",{key:"394a8843e47dd540dd1b22ba6cec699f73d55870",class:n.prefix},i("slot",{key:"811680c41b1729b689a0679e16e3aba4455d4d17",name:"prefix"}));return i(a,{key:"e99661de092cfa2f0476faf5fb9c266e52bb3b0b",class:this.h.classes(n.root),"is-expanded":this.isExpanded,color:this.color,size:this.size,role:"listitem",collapsible:this.collapsible,hydrated:this.hydrated},i("div",{key:"a2a2218a1b036da0c9a6edb7b0c0ce1be5a214ff",class:n.header},e,this.collapsible?i(t,{id:s,class:this.h.classes(n.label),"aria-expanded":l(this.isExpanded),"aria-controls":this.contentId,disabled:this.disabled,"aria-disabled":r(this.disabled),onClick:s=>{s.preventDefault();s.stopPropagation();this.toggle()}},i("span",{class:n.headline},i("slot",{name:"headline"}),this.collapsible&&i("gov-icon",{class:n.chevron,name:"chevron-down",type:"components"})),i("slot",{name:"annotation"})):i(t,{class:this.h.classes(n.label)},i("span",{class:n.headline},i("slot",{name:"headline"}),this.collapsible&&i("gov-icon",{class:n.chevron,name:"chevron-down",type:"components"})),i("slot",{name:"annotation"}))),this.collapsible?i("div",{class:n.content,id:this.contentId,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded,"aria-labelledby":s},i("slot",null)):i("div",{class:n.content,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded},i("slot",null)))}async open(){this.isExpanded=true;this.emmitChange()}async close(){this.isExpanded=false;this.emmitChange()}async toggle(){this.isExpanded=!this.isExpanded;this.emmitChange()}async currentState(){return this.isExpanded}get host(){return this}static get watchers(){return{color:["validateColor"]}}},[4,"gov-wizard-item",{color:[1],size:[1],identifier:[1],collapsible:[4],disabled:[4],isExpanded:[1028,"is-expanded"],open:[64],close:[64],toggle:[64],currentState:[64]},undefined,{color:["validateColor"]}]);function b(){if(typeof customElements==="undefined"){return}const s=["gov-wizard-item","gov-icon"];s.forEach((s=>{switch(s){case"gov-wizard-item":if(!customElements.get(s)){customElements.define(s,f)}break;case"gov-icon":if(!customElements.get(s)){m()}break}}))}b();const u=f;const v=b;export{u as GovWizardItem,v as defineCustomElement};
2
2
  //# sourceMappingURL=gov-wizard-item.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,c as i,h as e,d as n}from"./p-42200001.js";import{g as a,b as h,c as o}from"./p-9908b9f0.js";import{g as d,c,t as r,d as l}from"./p-ea7fdd2e.js";import{v as u}from"./p-0b3574c2.js";import{c as f}from"./p-cd6c2938.js";import{A as p,a as m,i as b}from"./p-33d5d1ed.js";import{d as v}from"./p-abea96cf.js";import{d as g}from"./p-2b33d27c.js";var y;(function(t){t["INPUT"]="input";t["TEXTAREA"]="textarea"})(y||(y={}));const w=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.govKeyUp=i(this,"gov-keyup",7);this.govHydrated=i(this,"gov-hydrated",7);this.govKeyDown=i(this,"gov-keydown",7);this.value=undefined;this.identifier=undefined;this.success=undefined;this.size="m";this.name=undefined;this.multiline=undefined;this.rows=undefined;this.cols=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.minlength=undefined;this.maxlength=undefined;this.min=undefined;this.max=undefined;this.autocomplete=undefined;this.autocorrect=undefined;this.spellcheck=undefined;this.inputLang=undefined;this.type=undefined;this.inputType="text";this.role=undefined;this.invalid=undefined;this.accessibleShowPasswordLabel="Zobrazit heslo";this.accessibleHidePasswordLabel="Skrýt heslo";this.focused=undefined;this.showPassword=false;this.inheritedAttributes={};this.h=d(this.host);this.inputId=f("GovInput");this.f=a(this.h)}validateSize(t){u(o,t,h.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("success",c(this.success));this.f.passAttrToControl("disabled",c(this.disabled));this.f.passAttrToControl("invalid",c(this.invalid));this.f.passAttrToControl("type",this.multiline?y.TEXTAREA:y.INPUT)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(m);this.govHydrated.emit()}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=b(this.host)}componentDidRender(){this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required))}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}render(){const t=this.multiline?y.TEXTAREA:y.INPUT;return e(n,{key:"f2b0e3a105b6a3904d59821bc68e13bfa01acea9",class:h.root,size:this.size,type:this.type},this.h.hasSlot("prefix")&&e("slot",{key:"13ff8da008e08322cd0eb241600751f8e896416b",name:"prefix"}),e("span",{key:"22c1467190afaf1a2c8e98d0cd4500f123494885",class:"element"},this.h.hasSlot("icon-start")&&!this.multiline&&e("div",{key:"1ab85a6556b44fd92959c0311b57028a8e3b8d74",class:h.icons,onClick:()=>this.inputRef.focus()},e("slot",{key:"dcc9f5a1da1245bd4eccc0a919b08b73a556efe7",name:"icon-start"})),e(t,Object.assign({key:"f05f59a1ad7d28acfd005942fdd22e7ba04e2d73",type:this.inputType==="password"&&this.showPassword?"text":this.inputType,disabled:this.disabled,id:this.identifier||this.inputId,name:this.name,onFocus:this.onFocusHandler.bind(this),onInput:this.onInputHandler.bind(this),onBlur:this.onBlurHandler.bind(this),onKeyUp:this.onKeyUpHandler.bind(this),onKeyDown:this.onKeyDownHandler.bind(this),ref:t=>this.inputRef=t,placeholder:this.placeholder,spellcheck:r(this.spellcheck),lang:this.inputLang,readonly:r(this.readonly),autocomplete:l(this.autocomplete),autocorrect:l(this.autocorrect),minlength:this.minlength,maxlength:this.maxlength,min:this.min,max:this.max,required:this.required,rows:this.rows,cols:this.cols,role:this.role,value:this.value},this.inheritedAttributes,{"aria-required":r(this.required),"aria-invalid":r(this.invalid),"aria-disabled":r(this.disabled)})),(this.success||this.invalid||this.h.hasSlot("icon-end")||this.inputType==="password")&&!this.multiline&&e("div",{key:"ab940283ca797a54590c73881aabe6e4032d4a77",class:h.icons,onClick:()=>this.inputRef.focus()},this.success&&!this.multiline&&e("gov-icon",{key:"af0b7c6e3c815eb74318052f490db2241f246707",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&!this.multiline&&e("gov-icon",{key:"4feef0479c061b9b073dea6c04e2bc428464a9de",class:"validation-icon",name:"exclamation-lg",type:"components"}),this.h.hasSlot("icon-end")&&this.inputType!=="password"&&e("slot",{key:"fa3f4ac957a08d066706c273b008edef401f0a2b",name:"icon-end"}),this.inputType==="password"?e("gov-button",{color:"primary",type:"base",size:this.size,"aria-label":this.showPassword?this.accessibleHidePasswordLabel:this.accessibleShowPasswordLabel,"on-gov-click":()=>this.showPassword=!this.showPassword},e("gov-icon",{slot:"icon-start",name:"eye",type:"components"})):null)),this.h.hasSlot("sufix")&&e("slot",{key:"ce4b50ff45632098c4457339538bac4a5a685df8",name:"sufix"}))}onFocusHandler(t){t.stopPropagation();this.focused=true;this.govFocus.emit({component:h.root,value:this.value,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.focused=false;this.govBlur.emit({component:h.root,value:this.value,originalEvent:t})}onKeyUpHandler(t){t.stopPropagation();this.govKeyUp.emit({component:h.root,value:this.value,originalEvent:t})}onKeyDownHandler(t){t.stopPropagation();this.govKeyDown.emit({component:h.root,value:this.value,originalEvent:t})}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit({component:h.root,value:this.value,originalEvent:t})}async setFocus(t){return this.inputRef.focus(t)}async setValue(t){this.value=t}async clearValue(){this.value="";this.inputRef.value=""}async getRef(){return this.inputRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}}},[4,"gov-form-input",{value:[1537],identifier:[1],success:[516],size:[1],name:[1],multiline:[4],rows:[2],cols:[2],required:[516],disabled:[516],placeholder:[1],readonly:[4],minlength:[2],maxlength:[2],min:[8],max:[8],autocomplete:[4],autocorrect:[4],spellcheck:[4],inputLang:[1,"input-lang"],type:[1],inputType:[1,"input-type"],role:[1],invalid:[516],accessibleShowPasswordLabel:[1,"accessible-show-password-label"],accessibleHidePasswordLabel:[1,"accessible-hide-password-label"],focused:[32],showPassword:[32],inheritedAttributes:[32],setFocus:[64],setValue:[64],clearValue:[64],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}]);function k(){if(typeof customElements==="undefined"){return}const t=["gov-form-input","gov-button","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-input":if(!customElements.get(t)){customElements.define(t,w)}break;case"gov-button":if(!customElements.get(t)){v()}break;case"gov-icon":if(!customElements.get(t)){g()}break}}))}k();export{w as G,k as d};
2
- //# sourceMappingURL=p-bd393ff0.js.map
1
+ import{p as t,H as s,c as i,h as e,d as n}from"./p-42200001.js";import{g as a,b as h,c as o}from"./p-9908b9f0.js";import{g as d,c,t as r,d as l}from"./p-ea7fdd2e.js";import{v as u}from"./p-0b3574c2.js";import{c as f}from"./p-cd6c2938.js";import{A as p,a as m,i as b}from"./p-33d5d1ed.js";import{d as v}from"./p-80c889e2.js";import{d as g}from"./p-d1a59544.js";var y;(function(t){t["INPUT"]="input";t["TEXTAREA"]="textarea"})(y||(y={}));const w=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.govKeyUp=i(this,"gov-keyup",7);this.govHydrated=i(this,"gov-hydrated",7);this.govKeyDown=i(this,"gov-keydown",7);this.value=undefined;this.identifier=undefined;this.success=undefined;this.size="m";this.name=undefined;this.multiline=undefined;this.rows=undefined;this.cols=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.minlength=undefined;this.maxlength=undefined;this.min=undefined;this.max=undefined;this.autocomplete=undefined;this.autocorrect=undefined;this.spellcheck=undefined;this.inputLang=undefined;this.type=undefined;this.inputType="text";this.role=undefined;this.invalid=undefined;this.accessibleShowPasswordLabel="Zobrazit heslo";this.accessibleHidePasswordLabel="Skrýt heslo";this.focused=undefined;this.showPassword=false;this.inheritedAttributes={};this.h=d(this.host);this.inputId=f("GovInput");this.f=a(this.h)}validateSize(t){u(o,t,h.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("success",c(this.success));this.f.passAttrToControl("disabled",c(this.disabled));this.f.passAttrToControl("invalid",c(this.invalid));this.f.passAttrToControl("type",this.multiline?y.TEXTAREA:y.INPUT)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(m);this.govHydrated.emit()}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=b(this.host)}componentDidRender(){this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required))}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}render(){const t=this.multiline?y.TEXTAREA:y.INPUT;return e(n,{key:"f2b0e3a105b6a3904d59821bc68e13bfa01acea9",class:h.root,size:this.size,type:this.type},this.h.hasSlot("prefix")&&e("slot",{key:"13ff8da008e08322cd0eb241600751f8e896416b",name:"prefix"}),e("span",{key:"22c1467190afaf1a2c8e98d0cd4500f123494885",class:"element"},this.h.hasSlot("icon-start")&&!this.multiline&&e("div",{key:"1ab85a6556b44fd92959c0311b57028a8e3b8d74",class:h.icons,onClick:()=>this.inputRef.focus()},e("slot",{key:"dcc9f5a1da1245bd4eccc0a919b08b73a556efe7",name:"icon-start"})),e(t,Object.assign({key:"f05f59a1ad7d28acfd005942fdd22e7ba04e2d73",type:this.inputType==="password"&&this.showPassword?"text":this.inputType,disabled:this.disabled,id:this.identifier||this.inputId,name:this.name,onFocus:this.onFocusHandler.bind(this),onInput:this.onInputHandler.bind(this),onBlur:this.onBlurHandler.bind(this),onKeyUp:this.onKeyUpHandler.bind(this),onKeyDown:this.onKeyDownHandler.bind(this),ref:t=>this.inputRef=t,placeholder:this.placeholder,spellcheck:r(this.spellcheck),lang:this.inputLang,readonly:r(this.readonly),autocomplete:l(this.autocomplete),autocorrect:l(this.autocorrect),minlength:this.minlength,maxlength:this.maxlength,min:this.min,max:this.max,required:this.required,rows:this.rows,cols:this.cols,role:this.role,value:this.value},this.inheritedAttributes,{"aria-required":r(this.required),"aria-invalid":r(this.invalid),"aria-disabled":r(this.disabled)})),(this.success||this.invalid||this.h.hasSlot("icon-end")||this.inputType==="password")&&!this.multiline&&e("div",{key:"ab940283ca797a54590c73881aabe6e4032d4a77",class:h.icons,onClick:()=>this.inputRef.focus()},this.success&&!this.multiline&&e("gov-icon",{key:"af0b7c6e3c815eb74318052f490db2241f246707",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&!this.multiline&&e("gov-icon",{key:"4feef0479c061b9b073dea6c04e2bc428464a9de",class:"validation-icon",name:"exclamation-lg",type:"components"}),this.h.hasSlot("icon-end")&&this.inputType!=="password"&&e("slot",{key:"fa3f4ac957a08d066706c273b008edef401f0a2b",name:"icon-end"}),this.inputType==="password"?e("gov-button",{color:"primary",type:"base",size:this.size,"aria-label":this.showPassword?this.accessibleHidePasswordLabel:this.accessibleShowPasswordLabel,"on-gov-click":()=>this.showPassword=!this.showPassword},e("gov-icon",{slot:"icon-start",name:"eye",type:"components"})):null)),this.h.hasSlot("sufix")&&e("slot",{key:"ce4b50ff45632098c4457339538bac4a5a685df8",name:"sufix"}))}onFocusHandler(t){t.stopPropagation();this.focused=true;this.govFocus.emit({component:h.root,value:this.value,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.focused=false;this.govBlur.emit({component:h.root,value:this.value,originalEvent:t})}onKeyUpHandler(t){t.stopPropagation();this.govKeyUp.emit({component:h.root,value:this.value,originalEvent:t})}onKeyDownHandler(t){t.stopPropagation();this.govKeyDown.emit({component:h.root,value:this.value,originalEvent:t})}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit({component:h.root,value:this.value,originalEvent:t})}async setFocus(t){return this.inputRef.focus(t)}async setValue(t){this.value=t}async clearValue(){this.value="";this.inputRef.value=""}async getRef(){return this.inputRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}}},[4,"gov-form-input",{value:[1537],identifier:[1],success:[516],size:[1],name:[1],multiline:[4],rows:[2],cols:[2],required:[516],disabled:[516],placeholder:[1],readonly:[4],minlength:[2],maxlength:[2],min:[8],max:[8],autocomplete:[4],autocorrect:[4],spellcheck:[4],inputLang:[1,"input-lang"],type:[1],inputType:[1,"input-type"],role:[1],invalid:[516],accessibleShowPasswordLabel:[1,"accessible-show-password-label"],accessibleHidePasswordLabel:[1,"accessible-hide-password-label"],focused:[32],showPassword:[32],inheritedAttributes:[32],setFocus:[64],setValue:[64],clearValue:[64],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}]);function k(){if(typeof customElements==="undefined"){return}const t=["gov-form-input","gov-button","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-input":if(!customElements.get(t)){customElements.define(t,w)}break;case"gov-button":if(!customElements.get(t)){v()}break;case"gov-icon":if(!customElements.get(t)){g()}break}}))}k();export{w as G,k as d};
2
+ //# sourceMappingURL=p-106a27de.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,c as i,h as e,d as h}from"./p-42200001.js";import{c as o,b as n}from"./p-ea7fdd2e.js";import{v as a}from"./p-0b3574c2.js";import{c as l}from"./p-cd6c2938.js";import{d as r,t as c,h as d}from"./p-e0e2e9c1.js";import{F as f,a as u}from"./p-9908b9f0.js";import{p as m}from"./p-be086357.js";import{A as p,a as v,i as b}from"./p-33d5d1ed.js";import{d as g}from"./p-abea96cf.js";import{d as y}from"./p-bd393ff0.js";import{d as k}from"./p-2b33d27c.js";import{d as w}from"./p-313b4611.js";const j=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.govSelect=i(this,"gov-select",7);this.templateResolver=t=>t[this.nameKey];this.value="";this.options=undefined;this.identifier=undefined;this.success=undefined;this.size="m";this.nameKey="name";this.name=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.invalid=undefined;this.minlength=3;this.maxlength=undefined;this.throttleTime=200;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.focused=undefined;this.processing=false;this.arrowCounter=-1;this.list=[];this.inheritedAttributes={};this.listBoxId=l("GovListBox")}validateSize(t){a(u,t,f.root)}watchOptions(t){this.setOptions(m(t)).catch()}onArrowUp(){if(this.arrowCounter>0){this.arrowCounter=this.arrowCounter-1;this.moveToView().finally()}}onArrowDown(){if(this.arrowCounter<this.list.length-1){this.arrowCounter=this.arrowCounter+1;this.moveToView().finally()}}async moveToView(){await r(200);const t=this.listRef.offsetHeight;const s=this.listRef.querySelector('li[aria-selected="true"]');if(s&&t){const t=s.offsetTop;this.listRef.scrollTo({top:t,behavior:"smooth"})}}doSearch(){if(Number.isInteger(this.minlength)&&this.isValueAccepted===false&&this.minlength){this.list=[];this.arrowCounter=-1;this.processing=false;return}if(this.searchCallback){this.processing=true;this.searchCallback(this.value).then((t=>this.list=t)).catch((()=>this.list=[])).finally((()=>{this.arrowCounter=-1;this.processing=false}))}}clearList(){const t=m(this.options);if(t.length===0){this.list=[]}}get isValueAccepted(){if(typeof this.value==="string"){return this.value.length>=this.minlength}else{return false}}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(v)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=b(this.host)}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){return e(h,{key:"22d9a81f648404e942ee680acddda83165af4dc2",class:f.root,size:this.size},e("gov-form-input",Object.assign({key:"4b60cfea2591a4bde6c97dee3c11b75461db3c5d",placeholder:this.placeholder,name:this.name,disabled:this.disabled,readonly:this.readonly,autocomplete:false,size:this.size,required:this.required,invalid:this.invalid,success:this.success,role:"searchbox",value:this.value,minlength:this.minlength,maxlength:this.maxlength,"on-gov-input":c(this.onInputHandler.bind(this),this.throttleTime),"on-gov-keyup":this.onKeyUpHandler.bind(this),"on-gov-keydown":this.onKeyDownHandler.bind(this),"on-gov-focus":this.onFocusHandler.bind(this),"on-gov-blur":this.onBlurHandler.bind(this)},this.inheritedAttributes,{"aria-autocomplete":"list","aria-owns":[this.listBoxId,this.inheritedAttributes["aria-owns"]].join(" "),"aria-expanded":n(this.list.length&&this.focused?true:false),ref:t=>this.inputRef=t}),e("slot",{key:"739722e49f8062d3ebec84dc2a1f840413439c7c",name:"validation-icon"}),e("slot",{key:"6f3b3c7695a5c7d56276fbc41f854b9afff3800e",name:"icon-end"})),e("ul",{key:"52b34c8501d976b438350104594b02137d40a386",class:f.list,role:"listbox","aria-hidden":o(!this.focused),hidden:!this.focused,id:this.listBoxId,ref:t=>this.listRef=t},this.focused&&this.list.length===0&&this.processing===false&&this.isValueAccepted&&this.messageEmpty?e("li",{class:f.empty},this.messageEmpty):null,this.focused&&this.processing===true&&this.isValueAccepted?e("li",{class:f.loading},e("gov-skeleton",{size:"m"})):null,this.focused?this.list.map(((t,s)=>{const i=this.arrowCounter===s;return e("li",{class:f.item,innerHTML:this.templateResolver(t,i),role:"option","aria-posinset":s,tabindex:i?0:-1,"aria-setsize":this.list.length,onTouchStart:t=>this.onSelectHandler(t,s),onMouseDown:t=>this.onSelectHandler(t,s),"aria-selected":o(i)},e("slot",{name:"list-item-left"}),e("slot",{name:"list-item-right"}))})):null))}onFocusHandler(t){this.focused=true;this.arrowCounter=-1;if(this.isValueAccepted&&this.searchCallback){this.doSearch()}t.stopPropagation();this.govFocus.emit({originalEvent:t,component:f.root,value:this.value,selected:null})}onBlurHandler(t){this.focused=false;this.clearList();this.arrowCounter=-1;t.stopPropagation();this.govBlur.emit({originalEvent:t,component:f.root,value:this.value,selected:null})}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit({originalEvent:t,component:f.root,value:this.value,selected:null});this.doSearch()}onSelectHandler(t,s=-1){let i=null;if(s>-1){i=this.list[s]}else if(d(this.arrowCounter,this.list)){i=this.list[this.arrowCounter]}if(i){this.govSelect.emit({component:f.root,value:this.value,selected:i,originalEvent:t});this.clearList();if(d(this.nameKey,i)&&typeof i[this.nameKey]==="string"){this.value=i[this.nameKey]}}}onKeyUpHandler(t){const s=t.detail.originalEvent;t.stopPropagation();s.stopPropagation();if(s.keyCode===38)this.onArrowUp();else if(s.keyCode===40)this.onArrowDown();else if(s.keyCode===13){t.preventDefault();s.preventDefault();this.onSelectHandler(t)}}onKeyDownHandler(t){const s=t.detail.originalEvent;t.stopPropagation();s.stopPropagation();if(s.keyCode===13){t.preventDefault();s.preventDefault()}}async setFocus(t){return this.inputRef.focus(t)}async setBlur(){return this.inputRef.blur()}async setOptions(t){this.list=Array.isArray(t)?t:[];this.arrowCounter=-1}async clearValue(){this.value="";this.inputRef.value="";await this.inputRef.clearValue()}async setProcessing(t){this.processing=t}async setSearchCallback(t){this.searchCallback=t}async setTemplateResolver(t){this.templateResolver=t}get host(){return this}static get watchers(){return{size:["validateSize"],options:["watchOptions"]}}},[4,"gov-form-autocomplete",{value:[1537],options:[1537],identifier:[1],success:[4],size:[1],nameKey:[1,"name-key"],name:[1],required:[4],disabled:[516],placeholder:[1],readonly:[4],invalid:[4],minlength:[2],maxlength:[2],throttleTime:[2,"throttle-time"],messageEmpty:[1,"message-empty"],focused:[32],processing:[32],arrowCounter:[32],list:[32],inheritedAttributes:[32],setFocus:[64],setBlur:[64],setOptions:[64],clearValue:[64],setProcessing:[64],setSearchCallback:[64],setTemplateResolver:[64]},undefined,{size:["validateSize"],options:["watchOptions"]}]);function E(){if(typeof customElements==="undefined"){return}const t=["gov-form-autocomplete","gov-button","gov-form-input","gov-icon","gov-skeleton"];t.forEach((t=>{switch(t){case"gov-form-autocomplete":if(!customElements.get(t)){customElements.define(t,j)}break;case"gov-button":if(!customElements.get(t)){g()}break;case"gov-form-input":if(!customElements.get(t)){y()}break;case"gov-icon":if(!customElements.get(t)){k()}break;case"gov-skeleton":if(!customElements.get(t)){w()}break}}))}E();export{j as G,E as d};
2
- //# sourceMappingURL=p-90657523.js.map
1
+ import{p as t,H as s,c as i,h as e,d as h}from"./p-42200001.js";import{c as o,b as n}from"./p-ea7fdd2e.js";import{v as a}from"./p-0b3574c2.js";import{c as l}from"./p-cd6c2938.js";import{d as r,t as c,h as d}from"./p-e0e2e9c1.js";import{F as u,a as f}from"./p-9908b9f0.js";import{p as m}from"./p-be086357.js";import{A as p,a as v,i as g}from"./p-33d5d1ed.js";import{d as b}from"./p-80c889e2.js";import{d as y}from"./p-106a27de.js";import{d as k}from"./p-d1a59544.js";import{d as w}from"./p-fcc6dd1d.js";const j=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.govSelect=i(this,"gov-select",7);this.templateResolver=t=>t[this.nameKey];this.value="";this.options=undefined;this.identifier=undefined;this.success=undefined;this.size="m";this.nameKey="name";this.name=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.invalid=undefined;this.minlength=3;this.maxlength=undefined;this.throttleTime=200;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.focused=undefined;this.processing=false;this.arrowCounter=-1;this.list=[];this.inheritedAttributes={};this.listBoxId=l("GovListBox")}validateSize(t){a(f,t,u.root)}watchOptions(t){this.setOptions(m(t)).catch()}onArrowUp(){if(this.arrowCounter>0){this.arrowCounter=this.arrowCounter-1;this.moveToView().finally()}}onArrowDown(){if(this.arrowCounter<this.list.length-1){this.arrowCounter=this.arrowCounter+1;this.moveToView().finally()}}async moveToView(){await r(200);const t=this.listRef.offsetHeight;const s=this.listRef.querySelector('li[aria-selected="true"]');if(s&&t){const t=s.offsetTop;this.listRef.scrollTo({top:t,behavior:"smooth"})}}doSearch(){if(Number.isInteger(this.minlength)&&this.isValueAccepted===false&&this.minlength){this.list=[];this.arrowCounter=-1;this.processing=false;return}if(this.searchCallback){this.processing=true;this.searchCallback(this.value).then((t=>this.list=t)).catch((()=>this.list=[])).finally((()=>{this.arrowCounter=-1;this.processing=false}))}}clearList(){const t=m(this.options);if(t.length===0){this.list=[]}}get isValueAccepted(){if(typeof this.value==="string"){return this.value.length>=this.minlength}else{return false}}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(v)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=g(this.host)}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){return e(h,{key:"22d9a81f648404e942ee680acddda83165af4dc2",class:u.root,size:this.size},e("gov-form-input",Object.assign({key:"4b60cfea2591a4bde6c97dee3c11b75461db3c5d",placeholder:this.placeholder,name:this.name,disabled:this.disabled,readonly:this.readonly,autocomplete:false,size:this.size,required:this.required,invalid:this.invalid,success:this.success,role:"searchbox",value:this.value,minlength:this.minlength,maxlength:this.maxlength,"on-gov-input":c(this.onInputHandler.bind(this),this.throttleTime),"on-gov-keyup":this.onKeyUpHandler.bind(this),"on-gov-keydown":this.onKeyDownHandler.bind(this),"on-gov-focus":this.onFocusHandler.bind(this),"on-gov-blur":this.onBlurHandler.bind(this)},this.inheritedAttributes,{"aria-autocomplete":"list","aria-owns":[this.listBoxId,this.inheritedAttributes["aria-owns"]].join(" "),"aria-expanded":n(this.list.length&&this.focused?true:false),ref:t=>this.inputRef=t}),e("slot",{key:"739722e49f8062d3ebec84dc2a1f840413439c7c",name:"validation-icon"}),e("slot",{key:"6f3b3c7695a5c7d56276fbc41f854b9afff3800e",name:"icon-end"})),e("ul",{key:"52b34c8501d976b438350104594b02137d40a386",class:u.list,role:"listbox","aria-hidden":o(!this.focused),hidden:!this.focused,id:this.listBoxId,ref:t=>this.listRef=t},this.focused&&this.list.length===0&&this.processing===false&&this.isValueAccepted&&this.messageEmpty?e("li",{class:u.empty},this.messageEmpty):null,this.focused&&this.processing===true&&this.isValueAccepted?e("li",{class:u.loading},e("gov-skeleton",{size:"m"})):null,this.focused?this.list.map(((t,s)=>{const i=this.arrowCounter===s;return e("li",{class:u.item,innerHTML:this.templateResolver(t,i),role:"option","aria-posinset":s,tabindex:i?0:-1,"aria-setsize":this.list.length,onTouchStart:t=>this.onSelectHandler(t,s),onMouseDown:t=>this.onSelectHandler(t,s),"aria-selected":o(i)},e("slot",{name:"list-item-left"}),e("slot",{name:"list-item-right"}))})):null))}onFocusHandler(t){this.focused=true;this.arrowCounter=-1;if(this.isValueAccepted&&this.searchCallback){this.doSearch()}t.stopPropagation();this.govFocus.emit({originalEvent:t,component:u.root,value:this.value,selected:null})}onBlurHandler(t){this.focused=false;this.clearList();this.arrowCounter=-1;t.stopPropagation();this.govBlur.emit({originalEvent:t,component:u.root,value:this.value,selected:null})}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit({originalEvent:t,component:u.root,value:this.value,selected:null});this.doSearch()}onSelectHandler(t,s=-1){let i=null;if(s>-1){i=this.list[s]}else if(d(this.arrowCounter,this.list)){i=this.list[this.arrowCounter]}if(i){this.govSelect.emit({component:u.root,value:this.value,selected:i,originalEvent:t});this.clearList();if(d(this.nameKey,i)&&typeof i[this.nameKey]==="string"){this.value=i[this.nameKey]}}}onKeyUpHandler(t){const s=t.detail.originalEvent;t.stopPropagation();s.stopPropagation();if(s.keyCode===38)this.onArrowUp();else if(s.keyCode===40)this.onArrowDown();else if(s.keyCode===13){t.preventDefault();s.preventDefault();this.onSelectHandler(t)}}onKeyDownHandler(t){const s=t.detail.originalEvent;t.stopPropagation();s.stopPropagation();if(s.keyCode===13){t.preventDefault();s.preventDefault()}}async setFocus(t){return this.inputRef.focus(t)}async setBlur(){return this.inputRef.blur()}async setOptions(t){this.list=Array.isArray(t)?t:[];this.arrowCounter=-1}async clearValue(){this.value="";this.inputRef.value="";await this.inputRef.clearValue()}async setProcessing(t){this.processing=t}async setSearchCallback(t){this.searchCallback=t}async setTemplateResolver(t){this.templateResolver=t}get host(){return this}static get watchers(){return{size:["validateSize"],options:["watchOptions"]}}},[4,"gov-form-autocomplete",{value:[1537],options:[1537],identifier:[1],success:[4],size:[1],nameKey:[1,"name-key"],name:[1],required:[4],disabled:[516],placeholder:[1],readonly:[4],invalid:[4],minlength:[2],maxlength:[2],throttleTime:[2,"throttle-time"],messageEmpty:[1,"message-empty"],focused:[32],processing:[32],arrowCounter:[32],list:[32],inheritedAttributes:[32],setFocus:[64],setBlur:[64],setOptions:[64],clearValue:[64],setProcessing:[64],setSearchCallback:[64],setTemplateResolver:[64]},undefined,{size:["validateSize"],options:["watchOptions"]}]);function E(){if(typeof customElements==="undefined"){return}const t=["gov-form-autocomplete","gov-button","gov-form-input","gov-icon","gov-skeleton"];t.forEach((t=>{switch(t){case"gov-form-autocomplete":if(!customElements.get(t)){customElements.define(t,j)}break;case"gov-button":if(!customElements.get(t)){b()}break;case"gov-form-input":if(!customElements.get(t)){y()}break;case"gov-icon":if(!customElements.get(t)){k()}break;case"gov-skeleton":if(!customElements.get(t)){w()}break}}))}E();export{j as G,E as d};
2
+ //# sourceMappingURL=p-246216b9.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,c as e,h as i,d as a}from"./p-42200001.js";import{g as o,l as n,m as c}from"./p-9908b9f0.js";import{g as h,c as r,t as d}from"./p-ea7fdd2e.js";import{v as l}from"./p-0b3574c2.js";import{c as f}from"./p-cd6c2938.js";import{p as u}from"./p-be086357.js";import{t as m}from"./p-26618322.js";import{A as b,a as p,i as v}from"./p-33d5d1ed.js";import{d as g}from"./p-2b33d27c.js";const w=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=e(this,"gov-focus",7);this.govBlur=e(this,"gov-blur",7);this.govChange=e(this,"gov-change",7);this.value=undefined;this.options=undefined;this.identifier=undefined;this.size="m";this.name=undefined;this.required=false;this.success=undefined;this.disabled=false;this.invalid=undefined;this.focused=undefined;this.optionsState=[];this.inheritedAttributes={};this.h=h(this.host);this.f=o(this.h);this.selectId=f("GovSelect")}validateSize(t){l(c,t,n.root)}watchOptions(t){this.optionsState=u(t)}watchControlAttrs(){this.passControlAttrs()}watchValue(){this.markSelectedValue()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",r(this.invalid));this.f.passAttrToControl("success",r(this.success));this.f.passAttrToControl("disabled",r(this.disabled));this.f.passAttrToControl("type","select")}componentDidLoad(){this.attributeObserver=new b(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(p)}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}componentWillLoad(){this.validateSize(this.size);this.markSelectedValue();this.optionsState=u(this.options);this.inheritedAttributes=v(this.host)}async componentDidRender(){this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required));m((()=>this.markSelectedValue()))}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}markSelectedValue(){this.host.querySelectorAll("option").forEach((t=>{if(t.value===this.value){t.setAttribute("selected","selected")}else{t.removeAttribute("selected")}}))}render(){return i(a,{key:"ece22604354a3bc7b27aebb52b767e720c470fb2",class:n.root,size:this.size},this.h.hasSlot("prefix")&&i("slot",{key:"fdff42c0ad6111e691b8246a8cbe3d77cbb9ab94",name:"prefix"}),i("span",{key:"726341bdd8a76bb6dde8af330505d97273007bb3",class:"element"},i("select",Object.assign({key:"cb51afcb898b91f87236cdfd416cd26013e01fc7",id:this.identifier||this.selectId,onFocus:this.onFocusHandler.bind(this),onChange:this.onChangeHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,name:this.name,disabled:this.disabled,ref:t=>this.selectRef=t},this.inheritedAttributes,{"aria-disabled":d(this.disabled),"aria-required":d(this.required),"aria-invalid":d(this.invalid)}),i("slot",{key:"8a81f952601ac949f68047eca18cd7aab61f5ffa"}),Array.isArray(this.optionsState)&&this.optionsState.map((t=>{var s;return i("option",{value:t.value,selected:t.value===this.value,disabled:t===null||t===void 0?void 0:t.disabled},(s=t.label)!==null&&s!==void 0?s:t.value)}))),this.success&&i("gov-icon",{key:"4567f0e75b9f9b9eba7a2a624107699ee531c580",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&i("gov-icon",{key:"818e5fe59f78b86280abdf117cb9b786e9ac103a",class:"validation-icon",name:"exclamation-lg",type:"components"}),i("gov-icon",{key:"9705a3e034da03543a074eb206224f3e63236b7c",class:"arrow-icon",name:"chevron-down",type:"components"})),this.h.hasSlot("sufix")&&i("slot",{key:"dd8fcce83d933ce39a8195d288472d013f708870",name:"sufix"}))}onFocusHandler(t){this.focused=true;this.govFocus.emit({component:n.root,originalEvent:t,value:this.value})}onBlurHandler(t){this.focused=false;this.govBlur.emit({component:n.root,originalEvent:t,value:this.value})}onChangeHandler(t){this.value=t.target.value;t.stopPropagation();this.govChange.emit({component:n.root,originalEvent:t,value:this.value})}async setFocus(t){return this.selectRef.focus(t)}async getRef(){return this.selectRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],options:["watchOptions"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"],value:["watchValue"]}}},[4,"gov-form-select",{value:[1537],options:[1537],identifier:[1],size:[1],name:[1],required:[4],success:[516],disabled:[516],invalid:[4],focused:[32],optionsState:[32],inheritedAttributes:[32],setFocus:[64],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],options:["watchOptions"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"],value:["watchValue"]}]);function y(){if(typeof customElements==="undefined"){return}const t=["gov-form-select","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-select":if(!customElements.get(t)){customElements.define(t,w)}break;case"gov-icon":if(!customElements.get(t)){g()}break}}))}y();export{w as G,y as d};
2
- //# sourceMappingURL=p-043a676e.js.map
1
+ import{p as t,H as s,c as e,h as i,d as a}from"./p-42200001.js";import{g as o,l as n,m as c}from"./p-9908b9f0.js";import{g as h,c as r,t as d}from"./p-ea7fdd2e.js";import{v as l}from"./p-0b3574c2.js";import{c as f}from"./p-cd6c2938.js";import{p as u}from"./p-be086357.js";import{t as m}from"./p-26618322.js";import{A as p,a as b,i as v}from"./p-33d5d1ed.js";import{d as g}from"./p-d1a59544.js";const w=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=e(this,"gov-focus",7);this.govBlur=e(this,"gov-blur",7);this.govChange=e(this,"gov-change",7);this.value=undefined;this.options=undefined;this.identifier=undefined;this.size="m";this.name=undefined;this.required=false;this.success=undefined;this.disabled=false;this.invalid=undefined;this.focused=undefined;this.optionsState=[];this.inheritedAttributes={};this.h=h(this.host);this.f=o(this.h);this.selectId=f("GovSelect")}validateSize(t){l(c,t,n.root)}watchOptions(t){this.optionsState=u(t)}watchControlAttrs(){this.passControlAttrs()}watchValue(){this.markSelectedValue()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",r(this.invalid));this.f.passAttrToControl("success",r(this.success));this.f.passAttrToControl("disabled",r(this.disabled));this.f.passAttrToControl("type","select")}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(b)}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}componentWillLoad(){this.validateSize(this.size);this.markSelectedValue();this.optionsState=u(this.options);this.inheritedAttributes=v(this.host)}async componentDidRender(){this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required));m((()=>this.markSelectedValue()))}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}markSelectedValue(){this.host.querySelectorAll("option").forEach((t=>{if(t.value===this.value){t.setAttribute("selected","selected")}else{t.removeAttribute("selected")}}))}render(){return i(a,{key:"ece22604354a3bc7b27aebb52b767e720c470fb2",class:n.root,size:this.size},this.h.hasSlot("prefix")&&i("slot",{key:"fdff42c0ad6111e691b8246a8cbe3d77cbb9ab94",name:"prefix"}),i("span",{key:"726341bdd8a76bb6dde8af330505d97273007bb3",class:"element"},i("select",Object.assign({key:"cb51afcb898b91f87236cdfd416cd26013e01fc7",id:this.identifier||this.selectId,onFocus:this.onFocusHandler.bind(this),onChange:this.onChangeHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,name:this.name,disabled:this.disabled,ref:t=>this.selectRef=t},this.inheritedAttributes,{"aria-disabled":d(this.disabled),"aria-required":d(this.required),"aria-invalid":d(this.invalid)}),i("slot",{key:"8a81f952601ac949f68047eca18cd7aab61f5ffa"}),Array.isArray(this.optionsState)&&this.optionsState.map((t=>{var s;return i("option",{value:t.value,selected:t.value===this.value,disabled:t===null||t===void 0?void 0:t.disabled},(s=t.label)!==null&&s!==void 0?s:t.value)}))),this.success&&i("gov-icon",{key:"4567f0e75b9f9b9eba7a2a624107699ee531c580",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&i("gov-icon",{key:"818e5fe59f78b86280abdf117cb9b786e9ac103a",class:"validation-icon",name:"exclamation-lg",type:"components"}),i("gov-icon",{key:"9705a3e034da03543a074eb206224f3e63236b7c",class:"arrow-icon",name:"chevron-down",type:"components"})),this.h.hasSlot("sufix")&&i("slot",{key:"dd8fcce83d933ce39a8195d288472d013f708870",name:"sufix"}))}onFocusHandler(t){this.focused=true;this.govFocus.emit({component:n.root,originalEvent:t,value:this.value})}onBlurHandler(t){this.focused=false;this.govBlur.emit({component:n.root,originalEvent:t,value:this.value})}onChangeHandler(t){this.value=t.target.value;t.stopPropagation();this.govChange.emit({component:n.root,originalEvent:t,value:this.value})}async setFocus(t){return this.selectRef.focus(t)}async getRef(){return this.selectRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],options:["watchOptions"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"],value:["watchValue"]}}},[4,"gov-form-select",{value:[1537],options:[1537],identifier:[1],size:[1],name:[1],required:[4],success:[516],disabled:[516],invalid:[4],focused:[32],optionsState:[32],inheritedAttributes:[32],setFocus:[64],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],options:["watchOptions"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"],value:["watchValue"]}]);function y(){if(typeof customElements==="undefined"){return}const t=["gov-form-select","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-select":if(!customElements.get(t)){customElements.define(t,w)}break;case"gov-icon":if(!customElements.get(t)){g()}break}}))}y();export{w as G,y as d};
2
+ //# sourceMappingURL=p-2d1d727d.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,c as i,h as s,d as a}from"./p-42200001.js";import{v as o}from"./p-0b3574c2.js";import{g as n}from"./p-ea7fdd2e.js";import{p as h}from"./p-e0e2e9c1.js";import{S as c}from"./p-92f420cb.js";import{a as d,c as r}from"./p-44a8a668.js";import{c as f}from"./p-cd6c2938.js";import{p as l}from"./p-016bbea6.js";import{i as p,A as b,a as m}from"./p-33d5d1ed.js";import{d as u}from"./p-2b33d27c.js";const g=h(c,["_XS","_S","_M"]);var v;(function(t){t["SOLID"]="solid";t["OUTLINED"]="outlined"})(v||(v={}));var y;(function(t){t["A"]="a";t["SPAN"]="span";t["BUTTON"]="button"})(y||(y={}));const k={root:"gov-chip",inner:"gov-chip__inner",hasRight:"gov-chip--has-right",hasLeft:"gov-chip--has-left"};const j=t(class t extends e{constructor(){super();this.__registerHost();this.govClick=i(this,"gov-click",7);this.hydrated=false;this.disabled=false;this.href=undefined;this.target=undefined;this.iconStart=undefined;this.iconEnd=undefined;this.size=g._M;this.tag="span";this.color=d.PRIMARY;this.type=undefined;this.focusable=true;this.identifier=undefined;this.inheritedAttributes={};this.h=n(this.host);this.chipId=f("GovChip")}validateColor(t){o(d,t,k.root)}validateSize(t){o(r,t,k.root)}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size);this.inheritedAttributes=p(this.host)}componentDidLoad(){this.attributeObserver=new b(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(m)}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}connectedCallback(){this.hydrated=true}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}render(){const t=this.href?y.A:this.tag;const e=t==y.BUTTON?y.BUTTON:undefined;const i=l(this.iconStart);const o=l(this.iconEnd);return s(a,{key:"6891a65866779d31691de4842180ae22767c4268",class:this.h.classes([k.root,this.h.hasSlot("right")?k.hasRight:undefined,this.h.hasSlot("left")?k.hasLeft:undefined]),disabled:this.disabled,href:this.href,color:this.color,type:this.type,size:this.size,hoverable:t==y.A||t==y.BUTTON,hydrated:this.hydrated},s(t,Object.assign({key:"32a2696de42de539438caa0842d0fefa31804b77",class:"element",href:this.href,target:this.target,ref:t=>this.triggerRef=t,onClick:this.onClickHandler.bind(this),tabindex:(this.h.hasSlot("left")||this.h.hasSlot("right")||this.disabled)&&!this.focusable?"-1":"0",id:this.identifier||this.chipId,type:e},this.inheritedAttributes,{"aria-disabled":this.disabled}),s("slot",{key:"93a5178477cbd4e0e09789c3ff0941e0972943f3",name:"left"}),s("slot",{key:"7d019aa4f2e543a8cb22e7d694c6994656e92065",name:"icon-start"},i&&s("gov-icon",{key:"6077e90d13e1fe7945c43abf142e308fa88b10b9",type:i.type,name:i.name})),s("slot",{key:"8c2fbc69cade5187c4dc3805e2eb9b2639620687"}),s("slot",{key:"ba590e6f48cf44ceb293917dbdecf34472db28ad",name:"icon-end"},o&&s("gov-icon",{key:"030988484d52eb2a47b192888a8e4a1e8773bd74",type:o.type,name:o.name})),s("slot",{key:"b62f2b1359a70b2aba874686d33f3dd5b7d0c8a2",name:"right"})))}onClickHandler(t){t.stopPropagation();if(this.disabled===false&&this.tag===y.BUTTON){this.govClick.emit(t)}}async geRef(){return this.triggerRef}async setFocus(){this.triggerRef.focus()}get host(){return this}static get watchers(){return{color:["validateColor"],size:["validateSize"]}}},[4,"gov-chip",{disabled:[516],href:[1],target:[1],iconStart:[1,"icon-start"],iconEnd:[1,"icon-end"],size:[1],tag:[1],color:[1],type:[513],focusable:[4],identifier:[1],inheritedAttributes:[32],geRef:[64],setFocus:[64]},undefined,{color:["validateColor"],size:["validateSize"]}]);function C(){if(typeof customElements==="undefined"){return}const t=["gov-chip","gov-icon"];t.forEach((t=>{switch(t){case"gov-chip":if(!customElements.get(t)){customElements.define(t,j)}break;case"gov-icon":if(!customElements.get(t)){u()}break}}))}C();export{j as G,C as d};
2
- //# sourceMappingURL=p-cbe3bc71.js.map
1
+ import{p as t,H as e,c as i,h as s,d as a}from"./p-42200001.js";import{v as o}from"./p-0b3574c2.js";import{g as n}from"./p-ea7fdd2e.js";import{p as h}from"./p-e0e2e9c1.js";import{S as c}from"./p-92f420cb.js";import{a as d,c as r}from"./p-44a8a668.js";import{c as f}from"./p-cd6c2938.js";import{p as l}from"./p-016bbea6.js";import{i as p,A as b,a as m}from"./p-33d5d1ed.js";import{d as u}from"./p-d1a59544.js";const g=h(c,["_XS","_S","_M"]);var v;(function(t){t["SOLID"]="solid";t["OUTLINED"]="outlined"})(v||(v={}));var y;(function(t){t["A"]="a";t["SPAN"]="span";t["BUTTON"]="button"})(y||(y={}));const k={root:"gov-chip",inner:"gov-chip__inner",hasRight:"gov-chip--has-right",hasLeft:"gov-chip--has-left"};const j=t(class t extends e{constructor(){super();this.__registerHost();this.govClick=i(this,"gov-click",7);this.hydrated=false;this.disabled=false;this.href=undefined;this.target=undefined;this.iconStart=undefined;this.iconEnd=undefined;this.size=g._M;this.tag="span";this.color=d.PRIMARY;this.type=undefined;this.focusable=true;this.identifier=undefined;this.inheritedAttributes={};this.h=n(this.host);this.chipId=f("GovChip")}validateColor(t){o(d,t,k.root)}validateSize(t){o(r,t,k.root)}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size);this.inheritedAttributes=p(this.host)}componentDidLoad(){this.attributeObserver=new b(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(m)}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}connectedCallback(){this.hydrated=true}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}render(){const t=this.href?y.A:this.tag;const e=t==y.BUTTON?y.BUTTON:undefined;const i=l(this.iconStart);const o=l(this.iconEnd);return s(a,{key:"6891a65866779d31691de4842180ae22767c4268",class:this.h.classes([k.root,this.h.hasSlot("right")?k.hasRight:undefined,this.h.hasSlot("left")?k.hasLeft:undefined]),disabled:this.disabled,href:this.href,color:this.color,type:this.type,size:this.size,hoverable:t==y.A||t==y.BUTTON,hydrated:this.hydrated},s(t,Object.assign({key:"32a2696de42de539438caa0842d0fefa31804b77",class:"element",href:this.href,target:this.target,ref:t=>this.triggerRef=t,onClick:this.onClickHandler.bind(this),tabindex:(this.h.hasSlot("left")||this.h.hasSlot("right")||this.disabled)&&!this.focusable?"-1":"0",id:this.identifier||this.chipId,type:e},this.inheritedAttributes,{"aria-disabled":this.disabled}),s("slot",{key:"93a5178477cbd4e0e09789c3ff0941e0972943f3",name:"left"}),s("slot",{key:"7d019aa4f2e543a8cb22e7d694c6994656e92065",name:"icon-start"},i&&s("gov-icon",{key:"6077e90d13e1fe7945c43abf142e308fa88b10b9",type:i.type,name:i.name})),s("slot",{key:"8c2fbc69cade5187c4dc3805e2eb9b2639620687"}),s("slot",{key:"ba590e6f48cf44ceb293917dbdecf34472db28ad",name:"icon-end"},o&&s("gov-icon",{key:"030988484d52eb2a47b192888a8e4a1e8773bd74",type:o.type,name:o.name})),s("slot",{key:"b62f2b1359a70b2aba874686d33f3dd5b7d0c8a2",name:"right"})))}onClickHandler(t){t.stopPropagation();if(this.disabled===false&&this.tag===y.BUTTON){this.govClick.emit(t)}}async geRef(){return this.triggerRef}async setFocus(){this.triggerRef.focus()}get host(){return this}static get watchers(){return{color:["validateColor"],size:["validateSize"]}}},[4,"gov-chip",{disabled:[516],href:[1],target:[1],iconStart:[1,"icon-start"],iconEnd:[1,"icon-end"],size:[1],tag:[1],color:[1],type:[513],focusable:[4],identifier:[1],inheritedAttributes:[32],geRef:[64],setFocus:[64]},undefined,{color:["validateColor"],size:["validateSize"]}]);function C(){if(typeof customElements==="undefined"){return}const t=["gov-chip","gov-icon"];t.forEach((t=>{switch(t){case"gov-chip":if(!customElements.get(t)){customElements.define(t,j)}break;case"gov-icon":if(!customElements.get(t)){u()}break}}))}C();export{j as G,C as d};
2
+ //# sourceMappingURL=p-5c247bc2.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,c as i,h as s,d as a}from"./p-42200001.js";import{v as n}from"./p-0b3574c2.js";import{B as o,a as d,b as h,N as r}from"./p-44a8a668.js";import{g as c,t as l}from"./p-ea7fdd2e.js";import{S as f}from"./p-92f420cb.js";import{a as p}from"./p-10cad7f1.js";import{c as u}from"./p-e8ec030e.js";import{d as b}from"./p-e0e2e9c1.js";import{A as m,a as v,i as y}from"./p-33d5d1ed.js";import{d as g}from"./p-2b33d27c.js";function k(e){if(typeof e==="string"){return["true","True","TRUE","1"].indexOf(e)!==-1}else if(typeof e==="number"){return e>0}else if(typeof e==="boolean"){return e}else{return e?true:false}}var j;(function(e){e["A"]="a";e["BUTTON"]="button"})(j||(j={}));const T=e(class e extends t{constructor(){super();this.__registerHost();this.govClick=i(this,"gov-click",7);this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.hydrated=false;this.color=undefined;this.size="m";this.type=undefined;this.expanded=false;this.expandedMobile=false;this.name=undefined;this.disabled=false;this.nativeType="button";this.href=undefined;this.target=undefined;this.download=undefined;this.hreflang=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.loading=undefined;this.focusable=true;this.identifier=undefined;this.inheritedAttributes={};this.h=c(this.host)}validateColor(e){n(d,e,o.root)}validateType(e){n(h,e,o.root)}validateSize(e){n(f,e,o.root)}validateNativeType(e){n(r,e,o.root)}componentDidLoad(){this.attributeObserver=new m(this.host,((e,t)=>{this.onAriaAttributeChange(e,t)}));this.attributeObserver.startObserving(v)}onAriaAttributeChange(e,t){this.host.removeAttribute(e);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[e]:t})}disconnectedCallback(){var e;(e=this.attributeObserver)===null||e===void 0?void 0:e.stopObserving()}componentWillLoad(){this.validateColor(this.color);this.validateType(this.type);this.validateSize(this.size);this.validateNativeType(this.nativeType);this.inheritedAttributes=y(this.host)}async componentDidRender(){if(u()){await b(500);await this.validateAccessibility()}}connectedCallback(){this.hydrated=true}render(){const e=this.href?j.A:j.BUTTON;const t=e===j.A?undefined:this.nativeType;return s(a,{key:"1f7bae74ab0d6f1b451c6ccc60cf614fb2671303",size:this.size,hydrated:this.hydrated,color:this.color,class:this.h.classes(o.root),type:this.type},s(e,Object.assign({key:"23e34ef9581b3dfa0c571aaef6a5b9a82dfe7c91",class:"element",ref:e=>this.triggerRef=e,onClick:this.onClickHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),disabled:this.disabled,id:this.identifier,href:this.href,target:this.target,download:this.download,hreflang:this.hreflang,rel:this.rel,name:this.name,type:t,tabindex:this.disabled?"-1":"0"},this.inheritedAttributes,{"aria-disabled":l(this.disabled)}),k(this.loading)&&!this.h.hasSlot("icon-end")&&s("gov-icon",{key:"03f9d20b44f5424f5fe71e02d1c66fba64875c04",name:"loader",class:"gov-spin-animation",type:"components"}),this.h.hasSlot("icon-start")&&s("slot",{key:"674ca625c6c5a9678c4a87ce370b894e704dbb1c",name:"icon-start"}),s("slot",{key:"d7443ddf6d04ef50934ddb11be083eb6abf1448a"}),this.h.hasSlot("icon-end")&&s("slot",{key:"977ea88979aae53ff5f0c8e5801e0682833e4f41",name:"icon-end"}),k(this.loading)&&this.h.hasSlot("icon-end")&&s("gov-icon",{key:"755b00182e3af1734483ee7bbeb63e541ad015f2",name:"loader",class:"gov-spin-animation",type:"components"})))}onClickHandler(e){e.stopPropagation();if(this.disabled===false){this.govClick.emit({component:o.root,originalEvent:e,ref:this.host})}}onFocusHandler(e){e.stopPropagation();this.govFocus.emit({component:o.root,originalEvent:e,ref:this.host})}onBlurHandler(e){e.stopPropagation();this.govBlur.emit({component:o.root,originalEvent:e,ref:this.host})}async setFocus(){this.triggerRef.focus()}async getRef(){return this.triggerRef}async validateAccessibility(){if(this.focusable){p(this.triggerRef.getAttribute("aria-label"),this.triggerRef.getAttribute("aria-labelledby"),o.root,this.host)}}get host(){return this}static get watchers(){return{color:["validateColor"],type:["validateType"],size:["validateSize"],nativeType:["validateNativeType"]}}},[4,"gov-button",{color:[513],size:[513],type:[513],expanded:[516],expandedMobile:[516,"expanded-mobile"],name:[1],disabled:[516],nativeType:[1,"native-type"],href:[1],target:[1],download:[4],hreflang:[1],referrerpolicy:[1],rel:[1],loading:[1],focusable:[4],identifier:[1],inheritedAttributes:[32],setFocus:[64],getRef:[64],validateAccessibility:[64]},undefined,{color:["validateColor"],type:["validateType"],size:["validateSize"],nativeType:["validateNativeType"]}]);function C(){if(typeof customElements==="undefined"){return}const e=["gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-button":if(!customElements.get(e)){customElements.define(e,T)}break;case"gov-icon":if(!customElements.get(e)){g()}break}}))}C();export{T as G,C as d};
2
- //# sourceMappingURL=p-abea96cf.js.map
1
+ import{p as e,H as t,c as i,h as s,d as a}from"./p-42200001.js";import{v as n}from"./p-0b3574c2.js";import{B as o,a as d,b as h,N as r}from"./p-44a8a668.js";import{g as c,t as l}from"./p-ea7fdd2e.js";import{S as f}from"./p-92f420cb.js";import{a as p}from"./p-10cad7f1.js";import{c as u}from"./p-e8ec030e.js";import{d as b}from"./p-e0e2e9c1.js";import{A as m,a as v,i as y}from"./p-33d5d1ed.js";import{d as g}from"./p-d1a59544.js";function k(e){if(typeof e==="string"){return["true","True","TRUE","1"].indexOf(e)!==-1}else if(typeof e==="number"){return e>0}else if(typeof e==="boolean"){return e}else{return e?true:false}}var j;(function(e){e["A"]="a";e["BUTTON"]="button"})(j||(j={}));const T=e(class e extends t{constructor(){super();this.__registerHost();this.govClick=i(this,"gov-click",7);this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.hydrated=false;this.color=undefined;this.size="m";this.type=undefined;this.expanded=false;this.expandedMobile=false;this.name=undefined;this.disabled=false;this.nativeType="button";this.href=undefined;this.target=undefined;this.download=undefined;this.hreflang=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.loading=undefined;this.focusable=true;this.identifier=undefined;this.inheritedAttributes={};this.h=c(this.host)}validateColor(e){n(d,e,o.root)}validateType(e){n(h,e,o.root)}validateSize(e){n(f,e,o.root)}validateNativeType(e){n(r,e,o.root)}componentDidLoad(){this.attributeObserver=new m(this.host,((e,t)=>{this.onAriaAttributeChange(e,t)}));this.attributeObserver.startObserving(v)}onAriaAttributeChange(e,t){this.host.removeAttribute(e);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[e]:t})}disconnectedCallback(){var e;(e=this.attributeObserver)===null||e===void 0?void 0:e.stopObserving()}componentWillLoad(){this.validateColor(this.color);this.validateType(this.type);this.validateSize(this.size);this.validateNativeType(this.nativeType);this.inheritedAttributes=y(this.host)}async componentDidRender(){if(u()){await b(500);await this.validateAccessibility()}}connectedCallback(){this.hydrated=true}render(){const e=this.href?j.A:j.BUTTON;const t=e===j.A?undefined:this.nativeType;return s(a,{key:"1f7bae74ab0d6f1b451c6ccc60cf614fb2671303",size:this.size,hydrated:this.hydrated,color:this.color,class:this.h.classes(o.root),type:this.type},s(e,Object.assign({key:"23e34ef9581b3dfa0c571aaef6a5b9a82dfe7c91",class:"element",ref:e=>this.triggerRef=e,onClick:this.onClickHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),disabled:this.disabled,id:this.identifier,href:this.href,target:this.target,download:this.download,hreflang:this.hreflang,rel:this.rel,name:this.name,type:t,tabindex:this.disabled?"-1":"0"},this.inheritedAttributes,{"aria-disabled":l(this.disabled)}),k(this.loading)&&!this.h.hasSlot("icon-end")&&s("gov-icon",{key:"03f9d20b44f5424f5fe71e02d1c66fba64875c04",name:"loader",class:"gov-spin-animation",type:"components"}),this.h.hasSlot("icon-start")&&s("slot",{key:"674ca625c6c5a9678c4a87ce370b894e704dbb1c",name:"icon-start"}),s("slot",{key:"d7443ddf6d04ef50934ddb11be083eb6abf1448a"}),this.h.hasSlot("icon-end")&&s("slot",{key:"977ea88979aae53ff5f0c8e5801e0682833e4f41",name:"icon-end"}),k(this.loading)&&this.h.hasSlot("icon-end")&&s("gov-icon",{key:"755b00182e3af1734483ee7bbeb63e541ad015f2",name:"loader",class:"gov-spin-animation",type:"components"})))}onClickHandler(e){e.stopPropagation();if(this.disabled===false){this.govClick.emit({component:o.root,originalEvent:e,ref:this.host})}}onFocusHandler(e){e.stopPropagation();this.govFocus.emit({component:o.root,originalEvent:e,ref:this.host})}onBlurHandler(e){e.stopPropagation();this.govBlur.emit({component:o.root,originalEvent:e,ref:this.host})}async setFocus(){this.triggerRef.focus()}async getRef(){return this.triggerRef}async validateAccessibility(){if(this.focusable){p(this.triggerRef.getAttribute("aria-label"),this.triggerRef.getAttribute("aria-labelledby"),o.root,this.host)}}get host(){return this}static get watchers(){return{color:["validateColor"],type:["validateType"],size:["validateSize"],nativeType:["validateNativeType"]}}},[4,"gov-button",{color:[513],size:[513],type:[513],expanded:[516],expandedMobile:[516,"expanded-mobile"],name:[1],disabled:[516],nativeType:[1,"native-type"],href:[1],target:[1],download:[4],hreflang:[1],referrerpolicy:[1],rel:[1],loading:[1],focusable:[4],identifier:[1],inheritedAttributes:[32],setFocus:[64],getRef:[64],validateAccessibility:[64]},undefined,{color:["validateColor"],type:["validateType"],size:["validateSize"],nativeType:["validateNativeType"]}]);function C(){if(typeof customElements==="undefined"){return}const e=["gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-button":if(!customElements.get(e)){customElements.define(e,T)}break;case"gov-icon":if(!customElements.get(e)){g()}break}}))}C();export{T as G,C as d};
2
+ //# sourceMappingURL=p-80c889e2.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,h as e,d as n}from"./p-42200001.js";import{p as i}from"./p-e0e2e9c1.js";import{C as o}from"./p-5aad3497.js";import{S as r}from"./p-92f420cb.js";import{i as a,a as c,b as l}from"./p-e8ec030e.js";import{g as h}from"./p-ea7fdd2e.js";import{v as u}from"./p-0b3574c2.js";i(r,["_XS","_S","_M","_L","_XL","_2XL","_3XL","_4XL","_5XL"]);const f=i(o,["DEFAULT","PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING","DISABLED","WHITE","BLACK"]);var d;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(d||(d={}));const m={root:"gov-icon",holder:"gov-icon__holder"};const p="4.2.4";const v=()=>p;const w={};const g={};const y=t=>t.startsWith("http://")||t.startsWith("https://");const C=(t,s,e)=>{if(y(t)){return`${t}/${e}/${s}.svg?v=${v()}`}return`${t}/${e}/${s}.svg`+`?v=${v()}`};async function I({name:t,type:s}){const e=s+"-"+t;if(w[e]){return w[e]}if(!g[e]){g[e]=fetch(C(a(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const n=await g[e];w[e]=n;return n}const b=(t,s,e)=>{if(!c){return}let n="";if(e){const t=new Date;t.setTime(t.getTime()+e*24*60*60*1e3);n="; expires="+t.toUTCString()}document.cookie=`${t}=${encodeURIComponent(s)}${n}; path=/`};const E=t=>{if(!c){return null}const s=t+"=";const e=document.cookie.split(";");for(let t=0;t<e.length;t++){let n=e[t].trim();if(n.startsWith(s)){return decodeURIComponent(n.substring(s.length))}}return null};const L=t=>{try{const s=new DOMParser;const e=s.parseFromString(t,"image/svg+xml");const n=e.querySelector("parsererror");if(n){return false}const i=e.documentElement;if(i.tagName.toLowerCase()!=="svg"){return false}return true}catch(t){return false}};const S=t(class t extends s{constructor(){super();this.__registerHost();this.size=undefined;this.color=undefined;this.name=null;this.type="components";this.visible=false;this.error=false;this.h=h(this.host)}validateSize(t){u(r,t,m.root)}validateColor(t){u(f,t,m.root)}async loadIconPathData(){const{name:t,visible:s}=this;if(!t||!s){return}await this.loadIcon()}connectedCallback(){if(l()){this.visible=true;this.loadIconPathData().finally()}else{this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){this.validateSize(this.size);this.validateColor(this.color);await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((s=>{s.forEach((s=>{if(s.isIntersecting){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}async loadIcon(){try{const{name:t,type:s}=this;const e=await I({name:t,type:s});const n=L(e);this.host.innerHTML=n?e:null}catch(t){this.host.innerHTML="";this.error=true}}render(){if(this.error){return null}return e(n,{class:this.h.classes(m.root),size:this.size,color:this.color})}static get assetsDirs(){return["assets"]}get host(){return this}static get watchers(){return{size:["validateSize"],color:["validateColor"],name:["loadIconPathData"]}}},[0,"gov-icon",{size:[513],color:[513],name:[513],type:[513],visible:[32],error:[32]},undefined,{size:["validateSize"],color:["validateColor"],name:["loadIconPathData"]}]);function $(){if(typeof customElements==="undefined"){return}const t=["gov-icon"];t.forEach((t=>{switch(t){case"gov-icon":if(!customElements.get(t)){customElements.define(t,S)}break}}))}$();export{S as G,$ as d,E as g,b as s};
2
- //# sourceMappingURL=p-2b33d27c.js.map
1
+ import{p as t,H as s,h as e,d as n}from"./p-42200001.js";import{p as i}from"./p-e0e2e9c1.js";import{C as o}from"./p-5aad3497.js";import{S as r}from"./p-92f420cb.js";import{i as a,a as c,b as l}from"./p-e8ec030e.js";import{g as h}from"./p-ea7fdd2e.js";import{v as u}from"./p-0b3574c2.js";i(r,["_XS","_S","_M","_L","_XL","_2XL","_3XL","_4XL","_5XL"]);const f=i(o,["DEFAULT","PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING","DISABLED","WHITE","BLACK"]);var d;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(d||(d={}));const m={root:"gov-icon",holder:"gov-icon__holder"};const p="4.2.5";const v=()=>p;const w={};const g={};const y=t=>t.startsWith("http://")||t.startsWith("https://");const C=(t,s,e)=>{if(y(t)){return`${t}/${e}/${s}.svg?v=${v()}`}return`${t}/${e}/${s}.svg`+`?v=${v()}`};async function I({name:t,type:s}){const e=s+"-"+t;if(w[e]){return w[e]}if(!g[e]){g[e]=fetch(C(a(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const n=await g[e];w[e]=n;return n}const b=(t,s,e)=>{if(!c){return}let n="";if(e){const t=new Date;t.setTime(t.getTime()+e*24*60*60*1e3);n="; expires="+t.toUTCString()}document.cookie=`${t}=${encodeURIComponent(s)}${n}; path=/`};const E=t=>{if(!c){return null}const s=t+"=";const e=document.cookie.split(";");for(let t=0;t<e.length;t++){let n=e[t].trim();if(n.startsWith(s)){return decodeURIComponent(n.substring(s.length))}}return null};const L=t=>{try{const s=new DOMParser;const e=s.parseFromString(t,"image/svg+xml");const n=e.querySelector("parsererror");if(n){return false}const i=e.documentElement;if(i.tagName.toLowerCase()!=="svg"){return false}return true}catch(t){return false}};const S=t(class t extends s{constructor(){super();this.__registerHost();this.size=undefined;this.color=undefined;this.name=null;this.type="components";this.visible=false;this.error=false;this.h=h(this.host)}validateSize(t){u(r,t,m.root)}validateColor(t){u(f,t,m.root)}async loadIconPathData(){const{name:t,visible:s}=this;if(!t||!s){return}await this.loadIcon()}connectedCallback(){if(l()){this.visible=true;this.loadIconPathData().finally()}else{this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){this.validateSize(this.size);this.validateColor(this.color);await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((s=>{s.forEach((s=>{if(s.isIntersecting){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}async loadIcon(){try{const{name:t,type:s}=this;const e=await I({name:t,type:s});const n=L(e);this.host.innerHTML=n?e:null}catch(t){this.host.innerHTML="";this.error=true}}render(){if(this.error){return null}return e(n,{class:this.h.classes(m.root),size:this.size,color:this.color})}static get assetsDirs(){return["assets"]}get host(){return this}static get watchers(){return{size:["validateSize"],color:["validateColor"],name:["loadIconPathData"]}}},[0,"gov-icon",{size:[513],color:[513],name:[513],type:[513],visible:[32],error:[32]},undefined,{size:["validateSize"],color:["validateColor"],name:["loadIconPathData"]}]);function $(){if(typeof customElements==="undefined"){return}const t=["gov-icon"];t.forEach((t=>{switch(t){case"gov-icon":if(!customElements.get(t)){customElements.define(t,S)}break}}))}$();export{S as G,$ as d,E as g,b as s};
2
+ //# sourceMappingURL=p-d1a59544.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,c as a,h as s,d as i}from"./p-42200001.js";import{a as c}from"./p-07165d99.js";import{a as o}from"./p-10cad7f1.js";import{c as m}from"./p-e8ec030e.js";import{d as n}from"./p-e0e2e9c1.js";import{g as r}from"./p-ea7fdd2e.js";import{d}from"./p-abea96cf.js";import{d as l}from"./p-2b33d27c.js";const f="gov-attachments-item,.gov-attachments-item{position:relative;display:flex;width:100%;gap:var(--spacing-s)}gov-attachments-item__messages>*:last-child,.gov-attachments-item__messages>*:last-child{margin-bottom:0}gov-attachments-item__file,.gov-attachments-item__file{display:flex;gap:var(--spacing-s)}gov-attachments-item__name,.gov-attachments-item__name{display:flex;gap:var(--spacing-s);flex-wrap:wrap;align-items:center;margin:0;color:var(--name-color, var(--text-primary))}gov-attachments-item__name span,.gov-attachments-item__name span{font-size:var(--font-size-body-xs);line-height:150%;font-weight:400;color:var(--decor-color, var(--text-secondary))}";const b=f;const p=e(class e extends t{constructor(){super();this.__registerHost();this.govRemove=a(this,"gov-remove",7);this.accessibleRemoveLabel=undefined;this.accessibleRemoveLabelledBy=undefined;this.h=r(this.host)}async componentDidRender(){if(m()){await n(500);await this.validateAccessibility()}}render(){return s(i,{key:"a8fffc03fb890c1aaae5a1d63240747f5fcb013e",class:this.h.classes(c.root),role:"listitem"},s("div",{key:"0aa555d1c5b3bdf089cf020db1271e40389522f9",class:c.file},s("p",{key:"46014b9e9d9a46fea6f813ef271815be6ab6dfc4",class:c.name},s("slot",{key:"806f9dc2b2ee44248f7fe613e8362d92ed938ba8"}),s("slot",{key:"97d69e72afd5063f41ea7b41e50012893ee5027c",name:"info"})),s("gov-button",{key:"6c40ff9ae6be99cde30fde276db287a3d14dccd1",color:"primary",type:"base",size:"s","aria-label":this.accessibleRemoveLabel,"aria-labelledby":this.accessibleRemoveLabelledBy,"on-gov-click":this.govRemove.emit},s("gov-icon",{key:"24871273b10ca807811acd15dabb49c6a45d76d1",slot:"icon-start",name:"x-lg",type:"components"}))),this.h.hasSlot("message")&&s("div",{key:"7683c6c6bfd1ca4b9660ee56ec190472970d0ac8",class:c.messages},s("slot",{key:"20b46c868809d19f9c67105a4c4774df9688a2c1",name:"message"})))}async validateAccessibility(){o(this.accessibleRemoveLabel,this.accessibleRemoveLabelledBy,c.root,this.host)}get host(){return this}static get style(){return b}},[4,"gov-attachments-item",{accessibleRemoveLabel:[1,"accessible-remove-label"],accessibleRemoveLabelledBy:[1,"accessible-remove-labelledby"],validateAccessibility:[64]}]);function g(){if(typeof customElements==="undefined"){return}const e=["gov-attachments-item","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-attachments-item":if(!customElements.get(e)){customElements.define(e,p)}break;case"gov-button":if(!customElements.get(e)){d()}break;case"gov-icon":if(!customElements.get(e)){l()}break}}))}g();export{p as G,g as d};
2
- //# sourceMappingURL=p-b56d6b99.js.map
1
+ import{p as e,H as t,c as a,h as s,d as i}from"./p-42200001.js";import{a as c}from"./p-07165d99.js";import{a as o}from"./p-10cad7f1.js";import{c as m}from"./p-e8ec030e.js";import{d as n}from"./p-e0e2e9c1.js";import{g as r}from"./p-ea7fdd2e.js";import{d}from"./p-80c889e2.js";import{d as l}from"./p-d1a59544.js";const f="gov-attachments-item,.gov-attachments-item{position:relative;display:flex;width:100%;gap:var(--spacing-s)}gov-attachments-item__messages>*:last-child,.gov-attachments-item__messages>*:last-child{margin-bottom:0}gov-attachments-item__file,.gov-attachments-item__file{display:flex;gap:var(--spacing-s)}gov-attachments-item__name,.gov-attachments-item__name{display:flex;gap:var(--spacing-s);flex-wrap:wrap;align-items:center;margin:0;color:var(--name-color, var(--text-primary))}gov-attachments-item__name span,.gov-attachments-item__name span{font-size:var(--font-size-body-xs);line-height:150%;font-weight:400;color:var(--decor-color, var(--text-secondary))}";const b=f;const p=e(class e extends t{constructor(){super();this.__registerHost();this.govRemove=a(this,"gov-remove",7);this.accessibleRemoveLabel=undefined;this.accessibleRemoveLabelledBy=undefined;this.h=r(this.host)}async componentDidRender(){if(m()){await n(500);await this.validateAccessibility()}}render(){return s(i,{key:"a8fffc03fb890c1aaae5a1d63240747f5fcb013e",class:this.h.classes(c.root),role:"listitem"},s("div",{key:"0aa555d1c5b3bdf089cf020db1271e40389522f9",class:c.file},s("p",{key:"46014b9e9d9a46fea6f813ef271815be6ab6dfc4",class:c.name},s("slot",{key:"806f9dc2b2ee44248f7fe613e8362d92ed938ba8"}),s("slot",{key:"97d69e72afd5063f41ea7b41e50012893ee5027c",name:"info"})),s("gov-button",{key:"6c40ff9ae6be99cde30fde276db287a3d14dccd1",color:"primary",type:"base",size:"s","aria-label":this.accessibleRemoveLabel,"aria-labelledby":this.accessibleRemoveLabelledBy,"on-gov-click":this.govRemove.emit},s("gov-icon",{key:"24871273b10ca807811acd15dabb49c6a45d76d1",slot:"icon-start",name:"x-lg",type:"components"}))),this.h.hasSlot("message")&&s("div",{key:"7683c6c6bfd1ca4b9660ee56ec190472970d0ac8",class:c.messages},s("slot",{key:"20b46c868809d19f9c67105a4c4774df9688a2c1",name:"message"})))}async validateAccessibility(){o(this.accessibleRemoveLabel,this.accessibleRemoveLabelledBy,c.root,this.host)}get host(){return this}static get style(){return b}},[4,"gov-attachments-item",{accessibleRemoveLabel:[1,"accessible-remove-label"],accessibleRemoveLabelledBy:[1,"accessible-remove-labelledby"],validateAccessibility:[64]}]);function g(){if(typeof customElements==="undefined"){return}const e=["gov-attachments-item","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-attachments-item":if(!customElements.get(e)){customElements.define(e,p)}break;case"gov-button":if(!customElements.get(e)){d()}break;case"gov-icon":if(!customElements.get(e)){l()}break}}))}g();export{p as G,g as d};
2
+ //# sourceMappingURL=p-f7ca5e39.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as i,h as s,d as e}from"./p-42200001.js";import{p as a}from"./p-e0e2e9c1.js";import{S as o}from"./p-92f420cb.js";import{C as n}from"./p-5aad3497.js";import{g as r}from"./p-ea7fdd2e.js";import{v as h}from"./p-0b3574c2.js";import{A as l,a as c,i as p}from"./p-33d5d1ed.js";const d=a(o,["_XS","_S","_M","_L","_XL"]);a(n,["PRIMARY","NEUTRAL"]);var m;(function(t){t["CIRCLE"]="circle";t["LINE"]="line"})(m||(m={}));var u;(function(t){t["PULSE"]="pulse";t["PROGRESS"]="progress";t["FALSE"]="false"})(u||(u={}));const f={root:"gov-skeleton"};const v=t(class t extends i{constructor(){super();this.__registerHost();this.items=[];this.size="m";this.color="neutral";this.shape="line";this.width=null;this.height=null;this.animation="progress";this.inheritedAttributes={};this.h=r(this.host)}validateSize(t){h(d,t,f.root)}validateShape(t){h(m,t,f.root)}validateAnimation(t){h(u,t,f.root)}componentDidLoad(){this.attributeObserver=new l(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(c)}componentWillLoad(){this.validateSize(this.size);this.validateShape(this.shape);this.validateAnimation(this.animation);this.init();this.inheritedAttributes=p(this.host)}componentWillUpdate(){this.init()}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,i){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:i})}init(){this.items.fill(1)}get style(){const t={width:null,height:null};if(this.width){t.width=this.width}if(this.height){t.height=this.height}return Object.assign({},t)}render(){return s(e,Object.assign({key:"fa43a5bc92210a51bb681449542c6f5c2863e3ad",size:this.size,color:this.color,class:{[f.root]:true,circle:this.shape==="circle",line:this.shape==="line",progress:this.animation==="progress",pulse:this.animation==="pulse"}},this.inheritedAttributes,{"aria-busy":"true","aria-valuemin":"0","aria-valuemax":"100",role:"progressbar",tabindex:"0",style:this.style}))}get host(){return this}static get watchers(){return{size:["validateSize"],shape:["validateShape"],animation:["validateAnimation"]}}},[0,"gov-skeleton",{size:[1],color:[1],shape:[1],width:[1],height:[1],animation:[1],inheritedAttributes:[32]},undefined,{size:["validateSize"],shape:["validateShape"],animation:["validateAnimation"]}]);function b(){if(typeof customElements==="undefined"){return}const t=["gov-skeleton"];t.forEach((t=>{switch(t){case"gov-skeleton":if(!customElements.get(t)){customElements.define(t,v)}break}}))}b();export{v as G,b as d};
2
- //# sourceMappingURL=p-313b4611.js.map
1
+ import{p as t,H as i,h as s,d as e}from"./p-42200001.js";import{p as a}from"./p-e0e2e9c1.js";import{S as o}from"./p-92f420cb.js";import{C as n}from"./p-5aad3497.js";import{g as r}from"./p-ea7fdd2e.js";import{v as h}from"./p-0b3574c2.js";import{A as l,a as c,i as p}from"./p-33d5d1ed.js";const d=a(o,["_XS","_S","_M","_L","_XL"]);a(n,["PRIMARY","NEUTRAL"]);var m;(function(t){t["CIRCLE"]="circle";t["LINE"]="line"})(m||(m={}));var u;(function(t){t["PULSE"]="pulse";t["PROGRESS"]="progress";t["FALSE"]="false"})(u||(u={}));const f={root:"gov-skeleton"};const v=t(class t extends i{constructor(){super();this.__registerHost();this.items=[];this.size="m";this.color="neutral";this.shape="line";this.width=null;this.height=null;this.animation="progress";this.inheritedAttributes={};this.h=r(this.host)}validateSize(t){h(d,t,f.root)}validateShape(t){h(m,t,f.root)}validateAnimation(t){h(u,t,f.root)}componentDidLoad(){this.attributeObserver=new l(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(c)}componentWillLoad(){this.validateSize(this.size);this.validateShape(this.shape);this.validateAnimation(this.animation);this.init();this.inheritedAttributes=p(this.host)}componentWillUpdate(){this.init()}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,i){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:i})}init(){this.items.fill(1)}get style(){const t={width:null,height:null};if(this.width){t.width=this.width}if(this.height){t.height=this.height}return Object.assign({},t)}render(){return s(e,Object.assign({key:"613250c817d9f03aa3af10639b01b523c3107868",size:this.size,color:this.color,class:{[f.root]:true,circle:this.shape==="circle",line:this.shape==="line",progress:this.animation==="progress",pulse:this.animation==="pulse"}},this.inheritedAttributes,{"aria-busy":"true","aria-valuemin":"0","aria-valuemax":"100",role:"progressbar",tabindex:"0",style:this.style}))}get host(){return this}static get watchers(){return{size:["validateSize"],shape:["validateShape"],animation:["validateAnimation"]}}},[0,"gov-skeleton",{size:[513],color:[1],shape:[1],width:[513],height:[513],animation:[1],inheritedAttributes:[32]},undefined,{size:["validateSize"],shape:["validateShape"],animation:["validateAnimation"]}]);function g(){if(typeof customElements==="undefined"){return}const t=["gov-skeleton"];t.forEach((t=>{switch(t){case"gov-skeleton":if(!customElements.get(t)){customElements.define(t,v)}break}}))}g();export{v as G,g as d};
2
+ //# sourceMappingURL=p-fcc6dd1d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SkeletonSizes","pick","Sizes","Colors","SkeletonShapes","SkeletonAnimation","SkeletonClass","root","GovSkeleton","proxyCustomElement","H","constructor","this","items","h","govHost","host","validateSize","newValue","validateProp","validateShape","validateAnimation","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","size","shape","animation","init","inheritedAttributes","inheritAriaAttributes","componentWillUpdate","disconnectedCallback","_a","stopObserving","removeAttribute","Object","assign","fill","style","dimenssionsStyles","width","height","render","Host","key","color","class","circle","line","progress","pulse","role","tabindex"],"sources":["../../../packages/core/src/components/gov-loading/skeleton/constants.ts","../../../packages/core/src/components/gov-loading/skeleton/gov-skeleton.tsx"],"sourcesContent":["import { pick } from \"../../../utils/utils\"\nimport { ValueOf } from \"../../../types/interfaces\"\nimport {Sizes} from \"../../../core/constants/sizes\";\nimport {Colors} from \"../../../core/constants/colors\";\n\nexport const SkeletonSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL'])\nexport type SkeletonSizesType = `${ValueOf<typeof SkeletonSizes>}`\n\nexport const SkeletonColors = pick(Colors, [\"PRIMARY\", \"NEUTRAL\"])\nexport type SkeletonColorType = `${ValueOf<typeof SkeletonColors>}`\n\nexport enum SkeletonShapes {\n\tCIRCLE = 'circle',\n\tLINE = 'line'\n}\nexport type SkeletonShapesType = `${ValueOf<typeof SkeletonShapes>}`\n\nexport enum SkeletonAnimation {\n\tPULSE = 'pulse',\n\tPROGRESS = 'progress',\n\tFALSE = 'false'\n}\nexport type SkeletonAnimationType = `${ValueOf<typeof SkeletonAnimation>}`\n\nexport const SkeletonClass = {\n\troot: 'gov-skeleton',\n}\n","import {Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {\n\tSkeletonAnimation,\n\tSkeletonAnimationType,\n\tSkeletonClass,\n\tSkeletonColorType,\n\tSkeletonShapes,\n\tSkeletonShapesType,\n\tSkeletonSizes,\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormInputSizesType} from \"../../gov-form/input/constants\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-skeleton\",\n})\nexport class GovSkeleton {\n\th: GovHost\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovSkeletonElement\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop({reflect: true}) readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Style variation of the skeleton.\n\t */\n\t@Prop() readonly color?: SkeletonColorType = \"neutral\"\n\t/**\n\t * Shape of the skeleton\n\t */\n\t@Prop() shape?: SkeletonShapesType = \"line\"\n\t/**\n\t * Width of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop({reflect: true}) width?: string = null\n\t/**\n\t * Height of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop({reflect: true}) height?: string = null\n\t/**\n\t * Animation type\n\t */\n\t@Prop() animation?: SkeletonAnimationType = \"progress\"\n\n\titems: number[] = []\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(SkeletonSizes, newValue, SkeletonClass.root)\n\t}\n\n\t@Watch('shape')\n\tvalidateShape(newValue: string): void {\n\t\tvalidateProp(SkeletonShapes, newValue, SkeletonClass.root)\n\t}\n\n\t@Watch('animation')\n\tvalidateAnimation(newValue: string): void {\n\t\tvalidateProp(SkeletonAnimation, newValue, SkeletonClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateShape(this.shape)\n\t\tthis.validateAnimation(this.animation)\n\t\tthis.init()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentWillUpdate() {\n\t\tthis.init()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tinit() {\n\t\tthis.items.fill(1)\n\t}\n\n\tget style() {\n\t\tconst dimenssionsStyles: {\n\t\t\twidth?: string,\n\t\t\theight?: string,\n\t\t} = {\n\t\t\twidth: null,\n\t\t\theight: null,\n\t\t}\n\t\tif (this.width) {\n\t\t\tdimenssionsStyles.width = this.width\n\t\t}\n\n\t\tif (this.height) {\n\t\t\tdimenssionsStyles.height = this.height\n\t\t}\n\n\t\treturn {...dimenssionsStyles}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host size={this.size}\n\t\t\t\t color={this.color}\n\t\t\t\t class={{\n\t\t\t\t\t [SkeletonClass.root]: true,\n\t\t\t\t\t circle: this.shape === \"circle\",\n\t\t\t\t\t line: this.shape === \"line\",\n\t\t\t\t\t progress: this.animation === \"progress\",\n\t\t\t\t\t pulse: this.animation === \"pulse\",\n\t\t\t\t }}\n\t\t\t\t {...this.inheritedAttributes}\n\t\t\t\t aria-busy=\"true\"\n\t\t\t\t aria-valuemin=\"0\"\n\t\t\t\t aria-valuemax=\"100\"\n\t\t\t\t role=\"progressbar\"\n\t\t\t\t tabindex=\"0\"\n\t\t\t\t style={this.style}>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"+RAKO,MAAMA,EAAgBC,EAAKC,EAAO,CAAC,MAAO,KAAM,KAAM,KAAM,QAGrCD,EAAKE,EAAQ,CAAC,UAAW,YAGvD,IAAYC,GAAZ,SAAYA,GACXA,EAAA,mBACAA,EAAA,cACA,EAHD,CAAYA,MAAc,KAM1B,IAAYC,GAAZ,SAAYA,GACXA,EAAA,iBACAA,EAAA,uBACAA,EAAA,gBACA,EAJD,CAAYA,MAAiB,KAOtB,M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