@gov-design-system-ce/components 4.6.3 → 4.6.4

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 (218) hide show
  1. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -1
  2. package/dist/cjs/core.cjs.js +1 -1
  3. package/dist/cjs/gov-banner.cjs.entry.js +3 -3
  4. package/dist/cjs/gov-banner.cjs.entry.js.map +1 -1
  5. package/dist/cjs/gov-banner.entry.cjs.js.map +1 -1
  6. package/dist/cjs/gov-flex_3.cjs.entry.js +1 -1
  7. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +67 -23
  8. package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
  9. package/dist/cjs/gov-form-autocomplete.entry.cjs.js.map +1 -1
  10. package/dist/cjs/gov-form-file.cjs.entry.js +32 -3
  11. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  12. package/dist/cjs/gov-form-file.entry.cjs.js.map +1 -1
  13. package/dist/cjs/gov-form-search.cjs.entry.js +1 -1
  14. package/dist/cjs/gov-form-search.cjs.entry.js.map +1 -1
  15. package/dist/cjs/gov-form-search.entry.cjs.js.map +1 -1
  16. package/dist/cjs/gov-form-select.cjs.entry.js +8 -15
  17. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  18. package/dist/cjs/gov-form-select.entry.cjs.js.map +1 -1
  19. package/dist/cjs/gov-tooltip.gov-tooltip-content.entry.cjs.js.map +1 -1
  20. package/dist/cjs/gov-tooltip_2.cjs.entry.js +34 -9
  21. package/dist/cjs/gov-tooltip_2.cjs.entry.js.map +1 -1
  22. package/dist/cjs/gov-wizard-item.cjs.entry.js +2 -2
  23. package/dist/cjs/gov-wizard.cjs.entry.js +1 -1
  24. package/dist/cjs/index-BEF5cZxd.js +4 -4
  25. package/dist/cjs/loader.cjs.js +1 -1
  26. package/dist/collection/components/gov-banner/gov-banner.js +4 -4
  27. package/dist/collection/components/gov-banner/gov-banner.js.map +1 -1
  28. package/dist/collection/components/gov-form/autocomplete/autocomplete.utils.js +14 -0
  29. package/dist/collection/components/gov-form/autocomplete/autocomplete.utils.js.map +1 -0
  30. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +76 -22
  31. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
  32. package/dist/collection/components/gov-form/file/gov-form-file.js +34 -3
  33. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  34. package/dist/collection/components/gov-form/search/gov-form-search.js +2 -2
  35. package/dist/collection/components/gov-form/search/gov-form-search.js.map +1 -1
  36. package/dist/collection/components/gov-form/select/gov-form-select.js +8 -15
  37. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  38. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +22 -1
  39. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js.map +1 -1
  40. package/dist/collection/components/gov-tooltip/gov-tooltip.js +31 -8
  41. package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
  42. package/dist/collection/components/gov-wizard/gov-wizard-item.js +2 -2
  43. package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
  44. package/dist/components/gov-accordion-item.js +1 -1
  45. package/dist/components/gov-accordion.js +1 -1
  46. package/dist/components/gov-attachments-item.js +1 -1
  47. package/dist/components/gov-attachments.js +1 -1
  48. package/dist/components/gov-backdrop.js +1 -1
  49. package/dist/components/gov-banner.js +1 -1
  50. package/dist/components/gov-banner.js.map +1 -1
  51. package/dist/components/gov-blockquote.js +1 -1
  52. package/dist/components/gov-breadcrumbs.js +1 -1
  53. package/dist/components/gov-breadcrumbs.js.map +1 -1
  54. package/dist/components/gov-button.js +1 -1
  55. package/dist/components/gov-card.js +1 -1
  56. package/dist/components/gov-chip.js +1 -1
  57. package/dist/components/gov-collapsible.js +1 -1
  58. package/dist/components/gov-collapsible.js.map +1 -1
  59. package/dist/components/gov-container.js +1 -1
  60. package/dist/components/gov-control-group.js +1 -1
  61. package/dist/components/gov-cookiebar.js +1 -1
  62. package/dist/components/gov-dialog.js +1 -1
  63. package/dist/components/gov-dropdown.js +1 -1
  64. package/dist/components/gov-empty.js +1 -1
  65. package/dist/components/gov-error-code.js +1 -1
  66. package/dist/components/gov-flex.js +1 -1
  67. package/dist/components/gov-form-autocomplete.js +1 -1
  68. package/dist/components/gov-form-checkbox-group.js +1 -1
  69. package/dist/components/gov-form-checkbox.js +1 -1
  70. package/dist/components/gov-form-control.js +1 -1
  71. package/dist/components/gov-form-file.js +1 -1
  72. package/dist/components/gov-form-file.js.map +1 -1
  73. package/dist/components/gov-form-group.js +1 -1
  74. package/dist/components/gov-form-input.js +1 -1
  75. package/dist/components/gov-form-message.js +1 -1
  76. package/dist/components/gov-form-multi-select.js +1 -1
  77. package/dist/components/gov-form-multi-select.js.map +1 -1
  78. package/dist/components/gov-form-radio-group.js +1 -1
  79. package/dist/components/gov-form-radio.js +1 -1
  80. package/dist/components/gov-form-range.js +1 -1
  81. package/dist/components/gov-form-range.js.map +1 -1
  82. package/dist/components/gov-form-search.js +1 -1
  83. package/dist/components/gov-form-search.js.map +1 -1
  84. package/dist/components/gov-form-select.js +1 -1
  85. package/dist/components/gov-form-switch.js +1 -1
  86. package/dist/components/gov-grid-item.js +1 -1
  87. package/dist/components/gov-grid.js +1 -1
  88. package/dist/components/gov-icon.js +1 -1
  89. package/dist/components/gov-infobar.js +1 -1
  90. package/dist/components/gov-layout-column.js +1 -1
  91. package/dist/components/gov-layout.js +1 -1
  92. package/dist/components/gov-link.js +1 -1
  93. package/dist/components/gov-loading.js +1 -1
  94. package/dist/components/gov-message.js +1 -1
  95. package/dist/components/gov-pagination.js +1 -1
  96. package/dist/components/gov-skeleton.js +1 -1
  97. package/dist/components/gov-spacer.js +1 -1
  98. package/dist/components/gov-stepper-item.js +1 -1
  99. package/dist/components/gov-stepper.js +1 -1
  100. package/dist/components/gov-tabs-item.js +1 -1
  101. package/dist/components/gov-tabs.js +1 -1
  102. package/dist/components/gov-tag.js +1 -1
  103. package/dist/components/gov-theme-switch.js +1 -1
  104. package/dist/components/gov-tile.js +1 -1
  105. package/dist/components/gov-toast.js +1 -1
  106. package/dist/components/gov-tooltip-content.js +1 -1
  107. package/dist/components/gov-tooltip.js +1 -1
  108. package/dist/components/gov-wizard-item.js +1 -1
  109. package/dist/components/gov-wizard.js +1 -1
  110. package/dist/components/{p-DKo9A5gq.js → p-BHRF-5cf.js} +2 -2
  111. package/dist/components/{p-9imLQpxb.js → p-BSr8e18S.js} +2 -2
  112. package/dist/components/{p-BNnuBQvo.js → p-BxS4InzB.js} +2 -2
  113. package/dist/components/{p-CfaJM4SA.js → p-CMmyR4-k.js} +2 -2
  114. package/dist/components/{p-B0KFtEn3.js → p-CU0plGZP.js} +2 -2
  115. package/dist/components/{p-BrdXh0mI.js → p-CXPP9vec.js} +2 -2
  116. package/dist/components/{p-djqfSbq-.js → p-C_URF9Su.js} +2 -2
  117. package/dist/components/{p-yqJEurSE.js → p-CnKqUwf9.js} +2 -2
  118. package/dist/components/p-DEthsMuE.js +2 -0
  119. package/dist/components/p-DEthsMuE.js.map +1 -0
  120. package/dist/components/{p-Bv5L0j6n.js → p-DN5pb9xA.js} +2 -2
  121. package/dist/components/{p-DesycS6d.js → p-iTwUkISB.js} +2 -2
  122. package/dist/components/{p-BZTY3MxF.js → p-ibUK7mfI.js} +2 -2
  123. package/dist/components/p-keC6luw7.js +2 -0
  124. package/dist/components/p-keC6luw7.js.map +1 -0
  125. package/dist/components/p-pJ_vPAO0.js +2 -0
  126. package/dist/components/p-pJ_vPAO0.js.map +1 -0
  127. package/dist/components/p-yIpIIG5A.js +2 -0
  128. package/dist/components/p-yIpIIG5A.js.map +1 -0
  129. package/dist/core/core.css +47 -47
  130. package/dist/core/core.esm.js +1 -1
  131. package/dist/core/gov-banner.entry.esm.js.map +1 -1
  132. package/dist/core/gov-form-autocomplete.entry.esm.js.map +1 -1
  133. package/dist/core/gov-form-file.entry.esm.js.map +1 -1
  134. package/dist/core/gov-form-search.entry.esm.js.map +1 -1
  135. package/dist/core/gov-form-select.entry.esm.js.map +1 -1
  136. package/dist/core/gov-tooltip.gov-tooltip-content.entry.esm.js.map +1 -1
  137. package/dist/core/{p-4da8ac1d.entry.js → p-10991f00.entry.js} +2 -2
  138. package/dist/core/p-19300834.entry.js +2 -0
  139. package/dist/core/{p-bd389bfd.entry.js.map → p-19300834.entry.js.map} +1 -1
  140. package/dist/core/p-4e2faea7.entry.js +2 -0
  141. package/dist/core/p-4e2faea7.entry.js.map +1 -0
  142. package/dist/core/p-7f513718.entry.js +2 -0
  143. package/dist/core/p-7f513718.entry.js.map +1 -0
  144. package/dist/core/p-8d47e346.entry.js +2 -0
  145. package/dist/core/p-8d47e346.entry.js.map +1 -0
  146. package/dist/core/p-DQuL1Twl.js.map +1 -1
  147. package/dist/core/p-afe254cb.entry.js +2 -0
  148. package/dist/core/p-afe254cb.entry.js.map +1 -0
  149. package/dist/core/{p-469f14db.entry.js → p-bec959c4.entry.js} +2 -2
  150. package/dist/core/p-d9d29f50.entry.js +2 -0
  151. package/dist/core/p-d9d29f50.entry.js.map +1 -0
  152. package/dist/core/{p-4d365881.entry.js → p-f75ad657.entry.js} +2 -2
  153. package/dist/esm/app-globals-DQuL1Twl.js.map +1 -1
  154. package/dist/esm/core.js +1 -1
  155. package/dist/esm/gov-banner.entry.js +3 -3
  156. package/dist/esm/gov-banner.entry.js.map +1 -1
  157. package/dist/esm/gov-flex_3.entry.js +1 -1
  158. package/dist/esm/gov-form-autocomplete.entry.js +68 -24
  159. package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
  160. package/dist/esm/gov-form-file.entry.js +32 -3
  161. package/dist/esm/gov-form-file.entry.js.map +1 -1
  162. package/dist/esm/gov-form-search.entry.js +1 -1
  163. package/dist/esm/gov-form-search.entry.js.map +1 -1
  164. package/dist/esm/gov-form-select.entry.js +8 -15
  165. package/dist/esm/gov-form-select.entry.js.map +1 -1
  166. package/dist/esm/gov-tooltip.gov-tooltip-content.entry.js.map +1 -1
  167. package/dist/esm/gov-tooltip_2.entry.js +34 -9
  168. package/dist/esm/gov-tooltip_2.entry.js.map +1 -1
  169. package/dist/esm/gov-wizard-item.entry.js +2 -2
  170. package/dist/esm/gov-wizard.entry.js +1 -1
  171. package/dist/esm/index-ClISz4NF.js +4 -4
  172. package/dist/esm/loader.js +1 -1
  173. package/dist/hydrate/index.js +154 -60
  174. package/dist/hydrate/index.mjs +154 -60
  175. package/dist/types/Users/jf/dev/designSystem/gov-design-system/packages/core/.stencil/packages/core/stencil.config.d.ts +2 -0
  176. package/dist/types/components/gov-form/autocomplete/autocomplete.utils.d.ts +2 -0
  177. package/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +9 -0
  178. package/dist/types/components/gov-form/file/gov-form-file.d.ts +1 -0
  179. package/dist/types/components/gov-form/select/gov-form-select.d.ts +1 -1
  180. package/dist/types/components/gov-tooltip/gov-tooltip-content.d.ts +4 -0
  181. package/dist/types/components/gov-tooltip/gov-tooltip.d.ts +3 -0
  182. package/dist/types/components.d.ts +20 -2
  183. package/package.json +2 -2
  184. package/readme.md +9 -0
  185. package/dist/components/p-DFu5UVoP.js +0 -2
  186. package/dist/components/p-DFu5UVoP.js.map +0 -1
  187. package/dist/components/p-DMVQRz4f.js +0 -2
  188. package/dist/components/p-DMVQRz4f.js.map +0 -1
  189. package/dist/components/p-UDT3DloZ.js +0 -2
  190. package/dist/components/p-UDT3DloZ.js.map +0 -1
  191. package/dist/components/p-x3w8Mun_.js +0 -2
  192. package/dist/components/p-x3w8Mun_.js.map +0 -1
  193. package/dist/core/p-11fc3899.entry.js +0 -2
  194. package/dist/core/p-11fc3899.entry.js.map +0 -1
  195. package/dist/core/p-33b462c9.entry.js +0 -2
  196. package/dist/core/p-33b462c9.entry.js.map +0 -1
  197. package/dist/core/p-3e5ae012.entry.js +0 -2
  198. package/dist/core/p-3e5ae012.entry.js.map +0 -1
  199. package/dist/core/p-bd389bfd.entry.js +0 -2
  200. package/dist/core/p-c21bc8f9.entry.js +0 -2
  201. package/dist/core/p-c21bc8f9.entry.js.map +0 -1
  202. package/dist/core/p-def34832.entry.js +0 -2
  203. package/dist/core/p-def34832.entry.js.map +0 -1
  204. package/dist/types/work/packages/core/.stencil/packages/core/stencil.config.d.ts +0 -2
  205. /package/dist/components/{p-DKo9A5gq.js.map → p-BHRF-5cf.js.map} +0 -0
  206. /package/dist/components/{p-9imLQpxb.js.map → p-BSr8e18S.js.map} +0 -0
  207. /package/dist/components/{p-BNnuBQvo.js.map → p-BxS4InzB.js.map} +0 -0
  208. /package/dist/components/{p-CfaJM4SA.js.map → p-CMmyR4-k.js.map} +0 -0
  209. /package/dist/components/{p-B0KFtEn3.js.map → p-CU0plGZP.js.map} +0 -0
  210. /package/dist/components/{p-BrdXh0mI.js.map → p-CXPP9vec.js.map} +0 -0
  211. /package/dist/components/{p-djqfSbq-.js.map → p-C_URF9Su.js.map} +0 -0
  212. /package/dist/components/{p-yqJEurSE.js.map → p-CnKqUwf9.js.map} +0 -0
  213. /package/dist/components/{p-Bv5L0j6n.js.map → p-DN5pb9xA.js.map} +0 -0
  214. /package/dist/components/{p-DesycS6d.js.map → p-iTwUkISB.js.map} +0 -0
  215. /package/dist/components/{p-BZTY3MxF.js.map → p-ibUK7mfI.js.map} +0 -0
  216. /package/dist/core/{p-4da8ac1d.entry.js.map → p-10991f00.entry.js.map} +0 -0
  217. /package/dist/core/{p-469f14db.entry.js.map → p-bec959c4.entry.js.map} +0 -0
  218. /package/dist/core/{p-4d365881.entry.js.map → p-f75ad657.entry.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["normalize","value","removeDiacritics","toLowerCase","filterAutocompleteOptions","options","query","nameKey","maxOptions","source","Array","isArray","normalizedQuery","matches","length","filter","item","text","includes","Number","isInteger","slice","GovFormAutocomplete","__stencil_proxyCustomElement","HTMLElement","constructor","this","fullOptions","templateResolver","size","required","disabled","minlength","throttleTime","messageEmpty","processing","arrowCounter","list","inheritedAttributes","emitAndSearch","e","govInput","emit","originalEvent","component","FormAutocompleteClass","root","selected","doSearch","onInputHandler","stopPropagation","detail","debouncedSearch","listBoxId","createID","validateSize","newValue","validateProp","FormAutocompleteSizes","watchOptions","propsValueToArray","searchCallback","setOptions","catch","onArrowUp","moveToView","finally","onArrowDown","delay","heightOfList","listRef","offsetHeight","querySelector","offsetTop","scrollTo","top","behavior","isValueAccepted","then","response","clearList","componentDidLoad","attributeObserver","AttributeObserver","host","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","inheritAriaAttributes","throttle","watchThrottleTime","disconnectedCallback","_a","stopObserving","removeAttribute","Object","assign","render","h","Host","key","class","placeholder","name","readonly","autocomplete","invalid","success","role","maxlength","onKeyUpHandler","bind","onKeyDownHandler","onFocusHandler","onBlurHandler","join","booleanString","focused","ref","el","inputRef","toBoolAttr","hidden","id","empty","loading","map","index","isSelected","innerHTML","tabindex","onTouchStart","onSelectHandler","onMouseDown","govFocus","govBlur","has","govSelect","event","keyCode","preventDefault","setFocus","focus","setBlur","blur","clearValue","setProcessing","status","setSearchCallback","callback","setTemplateResolver"],"sources":["../../../packages/core/src/components/gov-form/autocomplete/autocomplete.utils.ts","../../../packages/core/src/components/gov-form/autocomplete/gov-form-autocomplete.tsx"],"sourcesContent":["import { removeDiacritics } from '../../../utils/string.utils'\nimport { GovFormAutocompleteItem } from './gov-form-autocomplete.types'\n\nconst normalize = (value: unknown): string =>\n\ttypeof value === 'string' ? removeDiacritics(value).toLowerCase() : ''\n\nexport const filterAutocompleteOptions = (\n\toptions: GovFormAutocompleteItem[],\n\tquery: string,\n\tnameKey: string,\n\tmaxOptions: number,\n): GovFormAutocompleteItem[] => {\n\tconst source = Array.isArray(options) ? options : []\n\tconst normalizedQuery = normalize(query)\n\tconst matches =\n\t\tnormalizedQuery.length === 0\n\t\t\t? source\n\t\t\t: source.filter(item => {\n\t\t\t\t\tconst text = item?.[nameKey]\n\t\t\t\t\treturn typeof text === 'string' && normalize(text).includes(normalizedQuery)\n\t\t\t\t})\n\treturn Number.isInteger(maxOptions) && maxOptions > 0 ? matches.slice(0, maxOptions) : matches\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {booleanString, toBoolAttr} from '../../../helpers/Dom/template'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {Nullable} from '../../../types/interfaces'\nimport {createID} from '../../../utils/string.utils'\nimport {delay, has, throttle} from '../../../utils/utils'\nimport {FormInputEvent} from '../input/gov-form-input.types'\nimport {FormAutocompleteClass, FormAutocompleteSizes, SizesType,} from './constants'\nimport {FormAutocompleteEvent, GovFormAutocompleteItem} from './gov-form-autocomplete.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport { filterAutocompleteOptions } from './autocomplete.utils'\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-form-autocomplete',\n})\nexport class GovFormAutocomplete {\n\tprivate inputRef?: HTMLGovFormInputElement\n\tprivate listRef?: HTMLUListElement\n\tprivate readonly listBoxId: string\n\tprivate searchCallback: (value: string) => Promise<GovFormAutocompleteItem[]>\n\tprivate fullOptions: GovFormAutocompleteItem[] = []\n\tprivate templateResolver: (item: GovFormAutocompleteItem, selected: boolean) => string = item => item[this.nameKey]\n\tprivate attributeObserver: AttributeObserver\n\tprivate debouncedSearch: (e: CustomEvent<FormInputEvent>) => void\n\n\tconstructor() {\n\t\tthis.listBoxId = createID('GovListBox')\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({reflect: true, mutable: true}) value = ''\n\t/**\n\t * Options of autocomplete\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | GovFormAutocompleteItem[]\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: SizesType = 'm'\n\t/**\n\t * Main key name in the object\n\t */\n\t@Prop({attribute: 'name-key'}) readonly nameKey: string = 'name'\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number = 3\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Maximum number of items shown from a static `options` list (0 = unlimited).\n\t * Applies only when no async search callback is set.\n\t */\n\t@Prop({attribute: 'max-options'}) readonly maxOptions: number = 10\n\t/**\n\t * Input throttle in milliseconds\n\t */\n\t@Prop() readonly throttleTime: number = 200\n\t/**\n\t * Custom message for when there is a blank sheet\n\t */\n\t@Prop({attribute: 'message-empty'}) readonly messageEmpty: string = 'Nebyly nalezeny žádné výsledky'\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: 'gov-input'}) govInput: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: 'gov-select'}) govSelect: EventEmitter<FormAutocompleteEvent>\n\n\t@State() focused: boolean\n\t@State() processing = false\n\t@State() arrowCounter = -1\n\t@State() list: GovFormAutocompleteItem[] = []\n\t@State() inheritedAttributes: Attributes = {}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormAutocompleteSizes, newValue, FormAutocompleteClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | GovFormAutocompleteItem[]): void {\n\t\tthis.fullOptions = propsValueToArray<GovFormAutocompleteItem[]>(newValue)\n\t\tif (this.searchCallback) {\n\t\t\tthis.setOptions(this.fullOptions).catch()\n\t\t} else {\n\t\t\tthis.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions)\n\t\t}\n\t}\n\n\tprivate onArrowUp() {\n\t\tif (this.arrowCounter > 0) {\n\t\t\tthis.arrowCounter = this.arrowCounter - 1\n\t\t\tthis.moveToView().finally()\n\t\t}\n\t}\n\n\tprivate onArrowDown() {\n\t\tif (this.arrowCounter < this.list.length - 1) {\n\t\t\tthis.arrowCounter = this.arrowCounter + 1\n\t\t\tthis.moveToView().finally()\n\t\t}\n\t}\n\n\tprivate async moveToView() {\n\t\tawait delay(200)\n\t\tconst heightOfList = this.listRef.offsetHeight\n\t\tconst selected = this.listRef.querySelector('li[aria-selected=\"true\"]') as HTMLUListElement\n\t\tif (selected && heightOfList) {\n\t\t\tconst offsetTop = selected.offsetTop\n\t\t\tthis.listRef.scrollTo({top: offsetTop, behavior: 'smooth'})\n\t\t}\n\t}\n\n\tprivate doSearch() {\n\t\tif (this.searchCallback) {\n\t\t\tif (Number.isInteger(this.minlength) && this.isValueAccepted === false && this.minlength) {\n\t\t\t\tthis.list = []\n\t\t\t\tthis.arrowCounter = -1\n\t\t\t\tthis.processing = false\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.processing = true\n\t\t\tthis.searchCallback(this.value)\n\t\t\t\t.then(response => (this.list = response))\n\t\t\t\t.catch(() => (this.list = []))\n\t\t\t\t.finally(() => {\n\t\t\t\t\tthis.arrowCounter = -1\n\t\t\t\t\tthis.processing = false\n\t\t\t\t})\n\t\t\treturn\n\t\t}\n\t\tthis.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions)\n\t\tthis.arrowCounter = -1\n\t}\n\n\tprivate clearList() {\n\t\tif (this.fullOptions.length === 0) {\n\t\t\tthis.list = []\n\t\t}\n\t}\n\n\tget isValueAccepted() {\n\t\tif (typeof this.value === 'string') {\n\t\t\treturn this.value.length >= this.minlength\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t\tthis.debouncedSearch = throttle(this.emitAndSearch, this.throttleTime)\n\t\tthis.fullOptions = propsValueToArray<GovFormAutocompleteItem[]>(this.options)\n\t\tif (!this.searchCallback) {\n\t\t\tthis.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions)\n\t\t}\n\t}\n\n\t@Watch('throttleTime')\n\twatchThrottleTime() {\n\t\tthis.debouncedSearch = throttle(this.emitAndSearch, this.throttleTime)\n\t}\n\n\tprivate emitAndSearch = (e: CustomEvent<FormInputEvent>) => {\n\t\tthis.govInput.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t\tthis.doSearch()\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\trender() {\n\t\treturn (\n\t\t\t<Host class={FormAutocompleteClass.root} size={this.size}>\n\t\t\t\t<gov-form-input\n\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\treadonly={this.readonly}\n\t\t\t\t\tautocomplete={false}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tinvalid={this.invalid}\n\t\t\t\t\tsuccess={this.success}\n\t\t\t\t\trole={'searchbox'}\n\t\t\t\t\tvalue={this.value}\n\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\ton-gov-input={this.onInputHandler}\n\t\t\t\t\ton-gov-keyup={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\ton-gov-keydown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\ton-gov-focus={this.onFocusHandler.bind(this)}\n\t\t\t\t\ton-gov-blur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-autocomplete={'list'}\n\t\t\t\t\taria-owns={[this.listBoxId, this.inheritedAttributes['aria-owns']].join(' ')}\n\t\t\t\t\taria-expanded={booleanString(this.list.length && this.focused ? true : false)}\n\t\t\t\t\tref={el => (this.inputRef = el as HTMLGovFormInputElement)}\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"validation-icon\" />\n\t\t\t\t\t<slot name=\"icon-end\" />\n\t\t\t\t</gov-form-input>\n\t\t\t\t<ul class={FormAutocompleteClass.list}\n\t\t\t\t\trole={'listbox'}\n\t\t\t\t\taria-hidden={toBoolAttr(!this.focused)}\n\t\t\t\t\thidden={!this.focused}\n\t\t\t\t\tid={this.listBoxId}\n\t\t\t\t\tref={el => (this.listRef = el as HTMLUListElement)}>\n\t\t\t\t\t{this.focused && this.list.length === 0 && this.processing === false && (this.isValueAccepted || (!this.searchCallback && this.fullOptions.length > 0)) && this.messageEmpty ? (\n\t\t\t\t\t\t<li class={FormAutocompleteClass.empty}>{this.messageEmpty}</li>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{this.focused && this.processing === true && this.isValueAccepted ? (\n\t\t\t\t\t\t<li class={FormAutocompleteClass.loading}>\n\t\t\t\t\t\t\t<gov-skeleton size=\"m\"></gov-skeleton>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{this.focused ? this.list.map((item, index) => {\n\t\t\t\t\t\tconst isSelected = this.arrowCounter === index\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\tclass={FormAutocompleteClass.item}\n\t\t\t\t\t\t\t\tinnerHTML={this.templateResolver(item, isSelected)}\n\t\t\t\t\t\t\t\trole={'option'}\n\t\t\t\t\t\t\t\taria-posinset={index}\n\t\t\t\t\t\t\t\ttabindex={isSelected ? 0 : -1}\n\t\t\t\t\t\t\t\taria-setsize={this.list.length}\n\t\t\t\t\t\t\t\tonTouchStart={(e: TouchEvent) => this.onSelectHandler(e, index)}\n\t\t\t\t\t\t\t\tonMouseDown={(e: PointerEvent) => this.onSelectHandler(e, index)}\n\t\t\t\t\t\t\t\taria-selected={toBoolAttr(isSelected)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<slot name=\"list-item-left\"/>\n\t\t\t\t\t\t\t\t<slot name=\"list-item-right\"/>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t)\n\t\t\t\t\t}) : null}\n\t\t\t\t</ul>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.arrowCounter = -1\n\t\tif (this.searchCallback) {\n\t\t\tif (this.isValueAccepted) {\n\t\t\t\tthis.doSearch()\n\t\t\t}\n\t\t} else {\n\t\t\tthis.doSearch()\n\t\t}\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.clearList();\n\t\tthis.arrowCounter = -1\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t}\n\n\tprivate onInputHandler = (e: CustomEvent<FormInputEvent>) => {\n\t\te.stopPropagation()\n\t\tthis.value = e.detail.value\n\t\tthis.debouncedSearch(e)\n\t}\n\n\tprivate onSelectHandler(e: PointerEvent | CustomEvent | TouchEvent, index = -1) {\n\t\tlet selected: Nullable<GovFormAutocompleteItem> = null\n\t\tif (index > -1) {\n\t\t\tselected = this.list[index]\n\t\t} else if (has(this.arrowCounter, this.list)) {\n\t\t\tselected = this.list[this.arrowCounter]\n\t\t}\n\t\tif (selected) {\n\t\t\tthis.govSelect.emit({\n\t\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\t\tvalue: this.value,\n\t\t\t\tselected: selected,\n\t\t\t\toriginalEvent: e,\n\t\t\t})\n\t\t\tthis.clearList();\n\t\t\tif (has(this.nameKey, selected) && typeof selected[this.nameKey] === 'string') {\n\t\t\t\tthis.value = selected[this.nameKey]\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate onKeyUpHandler(e: CustomEvent) {\n\t\tconst event = (e.detail as FormInputEvent).originalEvent as KeyboardEvent\n\t\te.stopPropagation()\n\t\tevent.stopPropagation()\n\t\tif (event.keyCode === 38) this.onArrowUp()\n\t\telse if (event.keyCode === 40) this.onArrowDown()\n\t\telse if (event.keyCode === 13) {\n\t\t\te.preventDefault()\n\t\t\tevent.preventDefault()\n\t\t\tthis.onSelectHandler(e)\n\t\t}\n\t}\n\n\tprivate onKeyDownHandler(e: CustomEvent) {\n\t\tconst event = (e.detail as FormInputEvent).originalEvent as KeyboardEvent\n\t\te.stopPropagation()\n\t\tevent.stopPropagation()\n\t\tif (event.keyCode === 13) {\n\t\t\te.preventDefault()\n\t\t\tevent.preventDefault()\n\t\t}\n\t}\n\n\t/**\n\t * Focus main input element\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Blur main input element\n\t */\n\t@Method()\n\tasync setBlur(): Promise<void> {\n\t\treturn this.inputRef.blur()\n\t}\n\n\t/**\n\t * Set options for list\n\t */\n\t@Method()\n\tasync setOptions(options: GovFormAutocompleteItem[]): Promise<void> {\n\t\tthis.list = Array.isArray(options) ? options : []\n\t\tthis.arrowCounter = -1\n\t}\n\n\t/**\n\t * Clears whisperer value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = ''\n\t\tthis.inputRef.value = ''\n\n\t\tawait this.inputRef.clearValue()\n\t}\n\n\t/**\n\t * Clears whisperer value\n\t */\n\t@Method()\n\tasync setProcessing(status: boolean): Promise<void> {\n\t\tthis.processing = status\n\t}\n\n\t/**\n\t * Set a custom asynchronous function for the whisperer\n\t */\n\t@Method()\n\tasync setSearchCallback(callback: (value: string) => Promise<any>) {\n\t\tthis.searchCallback = callback\n\t}\n\n\t/**\n\t * Setting a custom whisper result template\n\t * @param callback\n\t */\n\t@Method()\n\tasync setTemplateResolver(callback: (item: GovFormAutocompleteItem) => string) {\n\t\tthis.templateResolver = callback\n\t}\n}\n"],"mappings":"8eAGA,MAAMA,EAAaC,UACXA,IAAU,SAAWC,EAAiBD,GAAOE,cAAgB,GAE9D,MAAMC,EAA4B,CACxCC,EACAC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KAAKnB,Q,GAKtB,cAAAyG,CAAexE,GACtB,MAAMoG,EAASpG,EAAEW,OAA0BR,cAC3CH,EAAEU,kBACF0F,EAAM1F,kBACN,GAAI0F,EAAMC,UAAY,GAAInH,KAAKsC,iBAC1B,GAAI4E,EAAMC,UAAY,GAAInH,KAAKyC,mBAC/B,GAAIyE,EAAMC,UAAY,GAAI,CAC9BrG,EAAEsG,iBACFF,EAAME,iBACNpH,KAAK4G,gBAAgB9F,E,EAIf,gBAAA0E,CAAiB1E,GACxB,MAAMoG,EAASpG,EAAEW,OAA0BR,cAC3CH,EAAEU,kBACF0F,EAAM1F,kBACN,GAAI0F,EAAMC,UAAY,GAAI,CACzBrG,EAAEsG,iBACFF,EAAME,gB,EAQR,cAAMC,CAAS1I,GACd,OAAOqB,KAAKgG,SAASsB,MAAM3I,E,CAO5B,aAAM4I,GACL,OAAOvH,KAAKgG,SAASwB,M,CAOtB,gBAAMpF,CAAWzD,GAChBqB,KAAKW,KAAO3B,MAAMC,QAAQN,GAAWA,EAAU,GAC/CqB,KAAKU,cAAe,C,CAOrB,gBAAM+G,GACLzH,KAAKzB,MAAQ,GACbyB,KAAKgG,SAASzH,MAAQ,SAEhByB,KAAKgG,SAASyB,Y,CAOrB,mBAAMC,CAAcC,GACnB3H,KAAKS,WAAakH,C,CAOnB,uBAAMC,CAAkBC,GACvB7H,KAAKmC,eAAiB0F,C,CAQvB,yBAAMC,CAAoBD,GACzB7H,KAAKE,iBAAmB2H,C","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,c as i,h as e,a}from"./index.js";import{g as o,b as n,c as h}from"./p-9imLQpxb.js";import{g as c,t as r,a as l,c as d}from"./p-DKo9A5gq.js";import{v as p}from"./p-BKP-F1qP.js";import{c as u}from"./p-vN03FcXN.js";import{A as m,a as b,i as f}from"./p-CXgom82_.js";import{d as v}from"./p-djqfSbq-.js";import{d as g}from"./p-BrdXh0mI.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");this.govBlur=i(this,"gov-blur");this.govInput=i(this,"gov-input");this.govKeyUp=i(this,"gov-keyup");this.govHydrated=i(this,"gov-hydrated");this.govKeyDown=i(this,"gov-keydown");this.size="m";this.required=false;this.disabled=false;this.inputType="text";this.accessibleShowPasswordLabel="Zobrazit heslo";this.accessibleHidePasswordLabel="Skrýt heslo";this.showPassword=false;this.inheritedAttributes={};this.h=c(this.host);this.inputId=u("GovInput");this.f=o(this.h)}validateSize(t){p(h,t,n.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("success",r(this.success));this.f.passAttrToControl("disabled",r(this.disabled));this.f.passAttrToControl("invalid",r(this.invalid));this.f.passAttrToControl("type",this.multiline?y.TEXTAREA:y.INPUT)}componentDidLoad(){this.attributeObserver=new m(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(b);this.govHydrated.emit()}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=f(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(a,{key:"470bdae759d1432aebbffcf4c13b228b1a50c21a",class:n.root,size:this.size,type:this.type},this.h.hasSlot("prefix")&&e("slot",{key:"0963159d9d3f2ce33a994d85bc87b72ba7b52358",name:"prefix"}),e("span",{key:"ac3fd14a01fff348764c8d7ce583cb9335f1fc54",class:"element"},this.h.hasSlot("icon-start")&&!this.multiline&&e("div",{key:"24bf34d61668b77b7c8c673f8046dec464a1ced4",class:n.icons,onClick:()=>this.inputRef.focus()},e("slot",{key:"11c141e20982053571112b8b8abe1c714ffa1618",name:"icon-start"})),e(t,Object.assign({key:"4cdf4caf3597527525bc0d858895d6588e510a69",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:d(this.spellcheck),lang:this.inputLang,readonly:d(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":d(this.required),"aria-invalid":d(this.invalid),"aria-disabled":d(this.disabled)})),(this.success||this.invalid||this.h.hasSlot("icon-end")||this.inputType==="password")&&!this.multiline&&e("div",{key:"fb1083c88c21dd1ed9651c3ed419c86acfcb29a0",class:n.icons,onClick:()=>this.inputRef.focus()},this.success&&!this.multiline&&e("gov-icon",{key:"5e3b97be29c7a1e5fe019f4b39a266283b097876",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&!this.multiline&&e("gov-icon",{key:"71082970477091c678241cf81a834b241203ea93",class:"validation-icon",name:"exclamation-lg",type:"components"}),this.h.hasSlot("icon-end")&&this.inputType!=="password"&&e("slot",{key:"cc1cc59a5e806ecc90b7a5da3d437e80a340ac30",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:"c8e382b5dfa2973b9e36bf5074860439f5f13236",name:"sufix"}))}onFocusHandler(t){t.stopPropagation();this.focused=true;this.govFocus.emit({component:n.root,value:this.value,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.focused=false;this.govBlur.emit({component:n.root,value:this.value,originalEvent:t})}onKeyUpHandler(t){t.stopPropagation();this.govKeyUp.emit({component:n.root,value:this.value,originalEvent:t})}onKeyDownHandler(t){t.stopPropagation();this.govKeyDown.emit({component:n.root,value:this.value,originalEvent:t})}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit({component:n.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-Bv5L0j6n.js.map
1
+ import{p as t,H as s,c as i,h as e,a}from"./index.js";import{g as o,F as n,a as h}from"./p-BSr8e18S.js";import{g as c,t as r,a as l,b as d}from"./p-BHRF-5cf.js";import{v as u}from"./p-BKP-F1qP.js";import{c as p}from"./p-vN03FcXN.js";import{A as m,a as f,i as b}from"./p-CXgom82_.js";import{d as v}from"./p-C_URF9Su.js";import{d as g}from"./p-CXPP9vec.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");this.govBlur=i(this,"gov-blur");this.govInput=i(this,"gov-input");this.govKeyUp=i(this,"gov-keyup");this.govHydrated=i(this,"gov-hydrated");this.govKeyDown=i(this,"gov-keydown");this.size="m";this.required=false;this.disabled=false;this.inputType="text";this.accessibleShowPasswordLabel="Zobrazit heslo";this.accessibleHidePasswordLabel="Skrýt heslo";this.showPassword=false;this.inheritedAttributes={};this.h=c(this.host);this.inputId=p("GovInput");this.f=o(this.h)}validateSize(t){u(h,t,n.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("success",r(this.success));this.f.passAttrToControl("disabled",r(this.disabled));this.f.passAttrToControl("invalid",r(this.invalid));this.f.passAttrToControl("type",this.multiline?y.TEXTAREA:y.INPUT)}componentDidLoad(){this.attributeObserver=new m(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(f);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(a,{key:"470bdae759d1432aebbffcf4c13b228b1a50c21a",class:n.root,size:this.size,type:this.type},this.h.hasSlot("prefix")&&e("slot",{key:"0963159d9d3f2ce33a994d85bc87b72ba7b52358",name:"prefix"}),e("span",{key:"ac3fd14a01fff348764c8d7ce583cb9335f1fc54",class:"element"},this.h.hasSlot("icon-start")&&!this.multiline&&e("div",{key:"24bf34d61668b77b7c8c673f8046dec464a1ced4",class:n.icons,onClick:()=>this.inputRef.focus()},e("slot",{key:"11c141e20982053571112b8b8abe1c714ffa1618",name:"icon-start"})),e(t,Object.assign({key:"4cdf4caf3597527525bc0d858895d6588e510a69",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:d(this.spellcheck),lang:this.inputLang,readonly:d(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":d(this.required),"aria-invalid":d(this.invalid),"aria-disabled":d(this.disabled)})),(this.success||this.invalid||this.h.hasSlot("icon-end")||this.inputType==="password")&&!this.multiline&&e("div",{key:"fb1083c88c21dd1ed9651c3ed419c86acfcb29a0",class:n.icons,onClick:()=>this.inputRef.focus()},this.success&&!this.multiline&&e("gov-icon",{key:"5e3b97be29c7a1e5fe019f4b39a266283b097876",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&!this.multiline&&e("gov-icon",{key:"71082970477091c678241cf81a834b241203ea93",class:"validation-icon",name:"exclamation-lg",type:"components"}),this.h.hasSlot("icon-end")&&this.inputType!=="password"&&e("slot",{key:"cc1cc59a5e806ecc90b7a5da3d437e80a340ac30",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:"c8e382b5dfa2973b9e36bf5074860439f5f13236",name:"sufix"}))}onFocusHandler(t){t.stopPropagation();this.focused=true;this.govFocus.emit({component:n.root,value:this.value,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.focused=false;this.govBlur.emit({component:n.root,value:this.value,originalEvent:t})}onKeyUpHandler(t){t.stopPropagation();this.govKeyUp.emit({component:n.root,value:this.value,originalEvent:t})}onKeyDownHandler(t){t.stopPropagation();this.govKeyDown.emit({component:n.root,value:this.value,originalEvent:t})}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit({component:n.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-DN5pb9xA.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,c as a,h as s,a as o}from"./index.js";import{a as i}from"./p-CUVZZBqo.js";import{a as c}from"./p-Nvj7WFs_.js";import{c as m}from"./p-DrPpH_9c.js";import{d as n}from"./p-CQvUntGY.js";import{g as r}from"./p-DKo9A5gq.js";import{i as l}from"./p-B3tdsiZv.js";import{d as f}from"./p-djqfSbq-.js";import{d as v}from"./p-BrdXh0mI.js";import{d as p}from"./p-DMVQRz4f.js";import{d as g}from"./p-UDT3DloZ.js";const d="gov-attachments-item,.gov-attachments-item{display:flex;flex-direction:column}gov-attachments-item__messages>*:last-child,.gov-attachments-item__messages>*:last-child{margin-bottom:0}gov-attachments-item__messages>*,.gov-attachments-item__messages>*{position:relative;top:calc(-1 * var(--spacing-xs))}gov-attachments-item__file,.gov-attachments-item__file{display:flex;gap:var(--spacing-s);max-width:100%}gov-attachments-item__name,.gov-attachments-item__name{display:flex;-moz-column-gap:var(--spacing-s);column-gap:var(--spacing-s);align-items:center;max-width:calc(100% - var(--spacing-s) - var(--icon-size-s) - (var(--spacing-s-nudge) + var(--border-width, 0.0625rem)) * 2);margin:0}gov-attachments-item__name>gov-tooltip,gov-attachments-item__name .gov-tooltip,.gov-attachments-item__name>gov-tooltip,.gov-attachments-item__name .gov-tooltip{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;color:var(--name-color, var(--text-primary))}gov-attachments-item__name span[slot=info],.gov-attachments-item__name span[slot=info]{font-size:var(--font-size-body-xs);line-height:150%;font-weight:400;color:var(--decor-color, var(--text-secondary));white-space:nowrap}";const h=t(class t extends e{constructor(){super();this.__registerHost();this.govRemove=a(this,"gov-remove");this.accessibleRemoveLabel="Odebrat soubor {FILE_NAME}";this.h=r(this.host)}async componentDidRender(){if(m()){await n(500);await this.validateAccessibility()}}render(){return s(o,{key:"7a7acaf1946577d29894242aa9606768afc96f77",class:this.h.classes(i.root),role:"listitem"},s("div",{key:"5cc40f9f91438105713d5c6a70686c5c12208b66",class:i.file},s("div",{key:"77e578b8c71cfc1bba2e89eacaa12e582692ff30",class:i.name},s("gov-tooltip",{key:"bf9a97f411e3877fdb1278b064910a64184662cd",position:"top",icon:true},s("slot",{key:"0eba40236e53407fa5fc380ebd552d339cff0054"}),s("gov-tooltip-content",{key:"624f6e919d73eae63db9cb667b5243997541a6c6"},this.h.getSlotContent(`name`))),s("slot",{key:"524f5a4397490a1371bd476361d1fc0e2308745c",name:"info"})),s("gov-button",{key:"0f0f046e9ab994201088ab802c9fb9bc4ff0f04c",color:"primary",type:"base",size:"s","aria-label":l(this.accessibleRemoveLabel)?this.accessibleRemoveLabel.replace("{FILE_NAME}",this.h.getSlotContent(`name`)||"").trim():null,"aria-labelledby":this.accessibleRemoveLabelledBy,"on-gov-click":this.govRemove.emit},s("gov-icon",{key:"16fc279022a36799b03ec2af3a5f2e2b8f70755f",slot:"icon-start",name:"x-lg",type:"components"}))),this.h.hasSlot("message")&&s("div",{key:"554ff1ff7dce9b034db47c13a66ac17f29ad38f4",class:i.messages},s("slot",{key:"09a9a492fb503a8c285cb21e10ec9d26c8cc71f5",name:"message"})))}async validateAccessibility(){c(this.accessibleRemoveLabel,this.accessibleRemoveLabelledBy,i.root,this.host)}get host(){return this}static get style(){return d}},[4,"gov-attachments-item",{accessibleRemoveLabel:[1,"accessible-remove-label"],accessibleRemoveLabelledBy:[1,"accessible-remove-labelledby"],validateAccessibility:[64]}]);function b(){if(typeof customElements==="undefined"){return}const t=["gov-attachments-item","gov-button","gov-icon","gov-tooltip","gov-tooltip-content"];t.forEach((t=>{switch(t){case"gov-attachments-item":if(!customElements.get(t)){customElements.define(t,h)}break;case"gov-button":if(!customElements.get(t)){f()}break;case"gov-icon":if(!customElements.get(t)){v()}break;case"gov-tooltip":if(!customElements.get(t)){p()}break;case"gov-tooltip-content":if(!customElements.get(t)){g()}break}}))}b();export{h as G,b as d};
2
- //# sourceMappingURL=p-DesycS6d.js.map
1
+ import{p as t,H as e,c as a,h as s,a as o}from"./index.js";import{a as i}from"./p-CUVZZBqo.js";import{a as c}from"./p-Nvj7WFs_.js";import{c as m}from"./p-DrPpH_9c.js";import{d as n}from"./p-CQvUntGY.js";import{g as r}from"./p-BHRF-5cf.js";import{i as l}from"./p-B3tdsiZv.js";import{d as f}from"./p-C_URF9Su.js";import{d as v}from"./p-CXPP9vec.js";import{d as p}from"./p-keC6luw7.js";import{d as g}from"./p-pJ_vPAO0.js";const d="gov-attachments-item,.gov-attachments-item{display:flex;flex-direction:column}gov-attachments-item__messages>*:last-child,.gov-attachments-item__messages>*:last-child{margin-bottom:0}gov-attachments-item__messages>*,.gov-attachments-item__messages>*{position:relative;top:calc(-1 * var(--spacing-xs))}gov-attachments-item__file,.gov-attachments-item__file{display:flex;gap:var(--spacing-s);max-width:100%}gov-attachments-item__name,.gov-attachments-item__name{display:flex;-moz-column-gap:var(--spacing-s);column-gap:var(--spacing-s);align-items:center;max-width:calc(100% - var(--spacing-s) - var(--icon-size-s) - (var(--spacing-s-nudge) + var(--border-width, 0.0625rem)) * 2);margin:0}gov-attachments-item__name>gov-tooltip,gov-attachments-item__name .gov-tooltip,.gov-attachments-item__name>gov-tooltip,.gov-attachments-item__name .gov-tooltip{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;color:var(--name-color, var(--text-primary))}gov-attachments-item__name span[slot=info],.gov-attachments-item__name span[slot=info]{font-size:var(--font-size-body-xs);line-height:150%;font-weight:400;color:var(--decor-color, var(--text-secondary));white-space:nowrap}";const h=t(class t extends e{constructor(){super();this.__registerHost();this.govRemove=a(this,"gov-remove");this.accessibleRemoveLabel="Odebrat soubor {FILE_NAME}";this.h=r(this.host)}async componentDidRender(){if(m()){await n(500);await this.validateAccessibility()}}render(){return s(o,{key:"7a7acaf1946577d29894242aa9606768afc96f77",class:this.h.classes(i.root),role:"listitem"},s("div",{key:"5cc40f9f91438105713d5c6a70686c5c12208b66",class:i.file},s("div",{key:"77e578b8c71cfc1bba2e89eacaa12e582692ff30",class:i.name},s("gov-tooltip",{key:"bf9a97f411e3877fdb1278b064910a64184662cd",position:"top",icon:true},s("slot",{key:"0eba40236e53407fa5fc380ebd552d339cff0054"}),s("gov-tooltip-content",{key:"624f6e919d73eae63db9cb667b5243997541a6c6"},this.h.getSlotContent(`name`))),s("slot",{key:"524f5a4397490a1371bd476361d1fc0e2308745c",name:"info"})),s("gov-button",{key:"0f0f046e9ab994201088ab802c9fb9bc4ff0f04c",color:"primary",type:"base",size:"s","aria-label":l(this.accessibleRemoveLabel)?this.accessibleRemoveLabel.replace("{FILE_NAME}",this.h.getSlotContent(`name`)||"").trim():null,"aria-labelledby":this.accessibleRemoveLabelledBy,"on-gov-click":this.govRemove.emit},s("gov-icon",{key:"16fc279022a36799b03ec2af3a5f2e2b8f70755f",slot:"icon-start",name:"x-lg",type:"components"}))),this.h.hasSlot("message")&&s("div",{key:"554ff1ff7dce9b034db47c13a66ac17f29ad38f4",class:i.messages},s("slot",{key:"09a9a492fb503a8c285cb21e10ec9d26c8cc71f5",name:"message"})))}async validateAccessibility(){c(this.accessibleRemoveLabel,this.accessibleRemoveLabelledBy,i.root,this.host)}get host(){return this}static get style(){return d}},[4,"gov-attachments-item",{accessibleRemoveLabel:[1,"accessible-remove-label"],accessibleRemoveLabelledBy:[1,"accessible-remove-labelledby"],validateAccessibility:[64]}]);function b(){if(typeof customElements==="undefined"){return}const t=["gov-attachments-item","gov-button","gov-icon","gov-tooltip","gov-tooltip-content"];t.forEach((t=>{switch(t){case"gov-attachments-item":if(!customElements.get(t)){customElements.define(t,h)}break;case"gov-button":if(!customElements.get(t)){f()}break;case"gov-icon":if(!customElements.get(t)){v()}break;case"gov-tooltip":if(!customElements.get(t)){p()}break;case"gov-tooltip-content":if(!customElements.get(t)){g()}break}}))}b();export{h as G,b as d};
2
+ //# sourceMappingURL=p-iTwUkISB.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,c as e,h as i,a as o}from"./index.js";import{v as a}from"./p-BKP-F1qP.js";import{g as c}from"./p-DKo9A5gq.js";import{p as h}from"./p-CQvUntGY.js";import{S as n}from"./p-BcQO4NH2.js";import{a as r,c as d}from"./p-CNqoJU2V.js";import{c as f}from"./p-vN03FcXN.js";import{p as l}from"./p-GYov8gU1.js";import{i as b,A as p,a as m}from"./p-CXgom82_.js";import{d as u}from"./p-BrdXh0mI.js";const g=h(n,["_XS","_S","_M"]);var v;(function(t){t["SOLID"]="solid";t["OUTLINED"]="outlined"})(v||(v={}));var y;(function(t){t["A"]="a";t["SPAN"]="span";t["BUTTON"]="button"})(y||(y={}));const k={root:"gov-chip",hasRight:"gov-chip--has-right",hasLeft:"gov-chip--has-left"};const j=t(class t extends s{constructor(){super();this.__registerHost();this.govClick=e(this,"gov-click");this.hydrated=false;this.disabled=false;this.size=g._M;this.tag="span";this.color=r.PRIMARY;this.focusable=true;this.inheritedAttributes={};this.h=c(this.host);this.chipId=f("GovChip")}validateColor(t){a(r,t,k.root)}validateSize(t){a(d,t,k.root)}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size);this.inheritedAttributes=b(this.host)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(m)}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}connectedCallback(){this.hydrated=true}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){const t=this.href?y.A:this.tag;const s=t==y.BUTTON?y.BUTTON:undefined;const e=l(this.iconStart);const a=l(this.iconEnd);return i(o,{key:"bbe58de10514cfa5049188d6cbea7402e4abef1a",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,focusable:this.focusable,hydrated:this.hydrated},i(t,Object.assign({key:"593f0ccd8f024d3b0539d029eb1ce15744b99dcc",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:s},this.inheritedAttributes,{"aria-disabled":this.disabled}),i("slot",{key:"d67eb38a50b78d336c6f26b94d771862f22d27e4",name:"left"}),i("slot",{key:"2642c53b31ace283aca7b21566b39e56caf7a0e2",name:"icon-start"},e&&i("gov-icon",{key:"8320fe3e6540b008684af9306b09b2464809948b",type:e.type,name:e.name})),i("slot",{key:"5c3c63c5cfef7d7c8ff1420ef6121e90fc735d80"}),i("slot",{key:"4e1e6f8751b8708a92b73d499c1f406c0fcb2fcc",name:"icon-end"},a&&i("gov-icon",{key:"a660967c54adc0b623b5f94b04e8e689425b7f28",type:a.type,name:a.name})),i("slot",{key:"af67d89fc3d70312d65078ad6f38b4ec4056542f",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-BZTY3MxF.js.map
1
+ import{p as t,H as s,c as e,h as i,a as o}from"./index.js";import{v as a}from"./p-BKP-F1qP.js";import{g as c}from"./p-BHRF-5cf.js";import{p as h}from"./p-CQvUntGY.js";import{S as n}from"./p-BcQO4NH2.js";import{a as r,c as f}from"./p-CNqoJU2V.js";import{c as d}from"./p-vN03FcXN.js";import{p as l}from"./p-GYov8gU1.js";import{i as b,A as p,a as m}from"./p-CXgom82_.js";import{d as u}from"./p-CXPP9vec.js";const v=h(n,["_XS","_S","_M"]);var g;(function(t){t["SOLID"]="solid";t["OUTLINED"]="outlined"})(g||(g={}));var y;(function(t){t["A"]="a";t["SPAN"]="span";t["BUTTON"]="button"})(y||(y={}));const k={root:"gov-chip",hasRight:"gov-chip--has-right",hasLeft:"gov-chip--has-left"};const j=t(class t extends s{constructor(){super();this.__registerHost();this.govClick=e(this,"gov-click");this.hydrated=false;this.disabled=false;this.size=v._M;this.tag="span";this.color=r.PRIMARY;this.focusable=true;this.inheritedAttributes={};this.h=c(this.host);this.chipId=d("GovChip")}validateColor(t){a(r,t,k.root)}validateSize(t){a(f,t,k.root)}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size);this.inheritedAttributes=b(this.host)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(m)}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}connectedCallback(){this.hydrated=true}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){const t=this.href?y.A:this.tag;const s=t==y.BUTTON?y.BUTTON:undefined;const e=l(this.iconStart);const a=l(this.iconEnd);return i(o,{key:"bbe58de10514cfa5049188d6cbea7402e4abef1a",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,focusable:this.focusable,hydrated:this.hydrated},i(t,Object.assign({key:"593f0ccd8f024d3b0539d029eb1ce15744b99dcc",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:s},this.inheritedAttributes,{"aria-disabled":this.disabled}),i("slot",{key:"d67eb38a50b78d336c6f26b94d771862f22d27e4",name:"left"}),i("slot",{key:"2642c53b31ace283aca7b21566b39e56caf7a0e2",name:"icon-start"},e&&i("gov-icon",{key:"8320fe3e6540b008684af9306b09b2464809948b",type:e.type,name:e.name})),i("slot",{key:"5c3c63c5cfef7d7c8ff1420ef6121e90fc735d80"}),i("slot",{key:"4e1e6f8751b8708a92b73d499c1f406c0fcb2fcc",name:"icon-end"},a&&i("gov-icon",{key:"a660967c54adc0b623b5f94b04e8e689425b7f28",type:a.type,name:a.name})),i("slot",{key:"af67d89fc3d70312d65078ad6f38b4ec4056542f",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-ibUK7mfI.js.map
@@ -0,0 +1,2 @@
1
+ import{p as i,H as s,h as t,a as e}from"./index.js";import{v as o}from"./p-BKP-F1qP.js";import{T as h,a as n,b as a,c as r,d as l}from"./p-DfI_0WW6.js";import{c as d}from"./p-vN03FcXN.js";import{g as f}from"./p-BHRF-5cf.js";import{d as c}from"./p-DrPpH_9c.js";import{t as p}from"./p-Cjg0wpDG.js";const u=i(class i extends s{constructor(){super();this.__registerHost();this.tooltipContentId=undefined;this.tooltipId=undefined;this.color=h.PRIMARY;this.size=n._M;this.position="right";this.message=undefined;this.icon=undefined;this.persist=false;this.repositionListenersAttached=false;this.reposition=()=>{if(this.tooltipContent){this.verifyPositionSpace()}};this.h=f(this.host);this.tooltipId=d("GovTooltip");this.tooltipContentId=d("GovContentTooltip")}validateColor(i){o(h,i,a.root)}validateSize(i){o(n,i,a.root)}validatePosition(i){o(r,i,a.root)}rerenderMessage(){this.createContentWrapper()}connectedCallback(){this.createContentWrapper();this.registerListeners()}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size);this.validatePosition(this.position)}componentDidUpdate(){this.createContentWrapper()}disconnectedCallback(){var i;(i=this.resizeObserver)===null||i===void 0?void 0:i.disconnect();this.resizeObserver=undefined;window.removeEventListener("resize",this.reposition);this.repositionListenersAttached=false;this.removeContent()}createContentWrapper(){var i;if(this.tooltipContent){if(this.message!=null){this.tooltipContent.setAttribute("message",this.message)}return}let s;if(this.insideContent){s=this.insideContent}else{s=c().createElement(l.root);if(this.message!=null){s.setAttribute("message",this.message)}}s.setAttribute("id",(i=this.identifier)!==null&&i!==void 0?i:this.tooltipContentId);s.setAttribute("parent-id",this.tooltipId);s.setAttribute("color",this.color);s.setAttribute("size",this.size);c().body.appendChild(s)}get tooltipContent(){var i;return c().body.querySelector(`#${(i=this.identifier)!==null&&i!==void 0?i:this.tooltipContentId}`)}get insideContent(){return this.host.querySelector(l.root)}registerListeners(){this.host.addEventListener("click",(i=>{i.preventDefault();this.persist=true;if(this.tooltipContent){this.tooltipContent.setAttribute("persist","true")}this.showTooltip()}));this.host.addEventListener("mouseenter",(i=>{i.preventDefault();this.showTooltip()}));this.host.addEventListener("mouseleave",(i=>{i.preventDefault();if(this.persist===false){this.hideTooltip()}}))}verifyPositionSpace(){const i=12;const s=window.innerWidth-(window.innerWidth-document.documentElement.clientWidth);const t=this.host.getBoundingClientRect();const e=this.host.offsetWidth;const o=this.host.offsetHeight;const h=this.tooltipContent.offsetWidth;const n=this.tooltipContent.offsetHeight;const a={left:t.left+document.documentElement.scrollLeft,top:t.top+document.documentElement.scrollTop};const l=a.left+i+t.width+h<=s;const d=a.left>h;if(this.position===r.LEFT||this.position===r.RIGHT){this.tooltipContent.style.top=a.top-(n-o)/2+"px";if(l===false&&d===false){this.position=r.TOP;this.tooltipContent.setAttribute("position",r.TOP)}if(d&&l===false&&this.position===r.RIGHT){this.position=r.LEFT}if(l&&d===false&&this.position===r.LEFT){this.position=r.RIGHT}}if(this.position===r.RIGHT){this.tooltipContent.setAttribute("position",r.RIGHT);this.tooltipContent.style.left=a.left+i+t.width+"px"}if(this.position===r.LEFT){this.tooltipContent.setAttribute("position",r.LEFT);this.tooltipContent.style.left=a.left-(h+i)+"px"}if(this.position===r.TOP||this.position===r.BOTTOM){if(h>e){let t=a.left-(h-e)/2;const o=t<0;const n=t+h>s;if(o&&n){this.tooltipContent.style.width="auto";this.tooltipContent.style.left=i+"px";this.tooltipContent.style.right=i+"px"}else{if(o){t=i}if(n){t=t-(s-(t+h+i))*-1}this.tooltipContent.style.left=t+"px"}}else{const i=a.left+(e-h)/2;this.tooltipContent.style.left=i+"px"}}if(this.position===r.TOP){this.tooltipContent.setAttribute("position",r.TOP);this.tooltipContent.style.top=a.top-(n+i)+"px"}if(this.position===r.BOTTOM){this.tooltipContent.setAttribute("position",r.BOTTOM);this.tooltipContent.style.top=a.top+(o+i)+"px"}this.tooltipContent.style.opacity="1"}showTooltip(){if(this.tooltipContent){this.tooltipContent.style.opacity="0";this.tooltipContent.hidden=false;this.tooltipContent.setAttribute("is-visible","true");p((()=>{this.verifyPositionSpace()}));if(!this.repositionListenersAttached){this.repositionListenersAttached=true;if(typeof ResizeObserver!=="undefined"){this.resizeObserver=new ResizeObserver(this.reposition);this.resizeObserver.observe(this.tooltipContent)}window.addEventListener("resize",this.reposition)}}}hideTooltip(){var i;if(this.tooltipContent){this.tooltipContent.setAttribute("is-visible","false");this.tooltipContent.setAttribute("persist","false");this.tooltipContent.removeAttribute("style")}(i=this.resizeObserver)===null||i===void 0?void 0:i.disconnect();this.resizeObserver=undefined;window.removeEventListener("resize",this.reposition);this.repositionListenersAttached=false}removeContent(){const i=document.getElementById(this.tooltipContentId);if(i){i.remove()}}render(){var i;return t(e,{key:"20ebe5eea59967e8681fd0e35fc7aff53b5915dd",id:this.tooltipId,class:this.h.classes(a.root),position:this.position},t("span",{key:"847b78886907d683425013227eb78bbf9261b709",role:"button",tabindex:0,onKeyPress:()=>this.showTooltip(),onBlur:()=>{if(this.persist===false){this.hideTooltip()}},"aria-describedby":(i=this.identifier)!==null&&i!==void 0?i:this.tooltipContentId},t("slot",{key:"84c4c02ee11e05166fca208b82ef54298dcaa6ee"})))}async show(){this.showTooltip()}async hide(){this.persist=false;this.hideTooltip()}get host(){return this}static get watchers(){return{color:["validateColor"],size:["validateSize"],position:["validatePosition"],message:["rerenderMessage"]}}},[4,"gov-tooltip",{color:[1],size:[1],position:[1025],message:[1],identifier:[1],icon:[516],persist:[32],show:[64],hide:[64]},undefined,{color:["validateColor"],size:["validateSize"],position:["validatePosition"],message:["rerenderMessage"]}]);function v(){if(typeof customElements==="undefined"){return}const i=["gov-tooltip"];i.forEach((i=>{switch(i){case"gov-tooltip":if(!customElements.get(i)){customElements.define(i,u)}break}}))}v();export{u as G,v as d};
2
+ //# sourceMappingURL=p-keC6luw7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GovTooltip","__stencil_proxyCustomElement","HTMLElement","constructor","this","tooltipContentId","undefined","tooltipId","color","TooltipColors","PRIMARY","size","TooltipSize","_M","position","message","icon","persist","repositionListenersAttached","reposition","tooltipContent","verifyPositionSpace","h","govHost","host","createID","validateColor","newValue","validateProp","TooltipClass","root","validateSize","validatePosition","TooltipPosition","rerenderMessage","createContentWrapper","connectedCallback","registerListeners","componentWillLoad","componentDidUpdate","disconnectedCallback","_a","resizeObserver","disconnect","window","removeEventListener","removeContent","setAttribute","content","insideContent","documentNode","createElement","TooltipContentClass","identifier","body","appendChild","querySelector","addEventListener","e","preventDefault","showTooltip","hideTooltip","offset","windowWidth","innerWidth","document","documentElement","clientWidth","trigger","getBoundingClientRect","trgWidth","offsetWidth","trgHeight","offsetHeight","contentWidth","contentHeight","triggerPos","left","scrollLeft","top","scrollTop","isRightSpace","width","isLeftSpace","LEFT","RIGHT","style","TOP","BOTTOM","leftPosition","isNotLeftSpace","isNotRightSpace","right","opacity","hidden","tick","ResizeObserver","observe","removeAttribute","contentEl","getElementById","remove","render","Host","key","id","class","classes","role","tabindex","onKeyPress","onBlur","show","hide"],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip.tsx"],"sourcesContent":["import {Component, Element, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tTooltipClass,\n\tTooltipContentClass,\n\tTooltipPosition,\n\tTooltipPositionType,\n\tTooltipSize,\n\tTooltipSizeType,\n\tTooltipColors,\n\tTooltipColorType,\n} from \"./constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {documentNode} from \"../../helpers/Dom/win\";\nimport {Nullable} from \"../../utils/helpers.types\";\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: \"gov-tooltip\",\n})\nexport class GovTooltip {\n\tprivate h: GovHost\n\tprivate readonly tooltipContentId = undefined\n\tprivate readonly tooltipId = undefined\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.tooltipId = createID(\"GovTooltip\")\n\t\tthis.tooltipContentId = createID(\"GovContentTooltip\")\n\t}\n\n\t@Element() host: HTMLGovTooltipElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly color?: TooltipColorType = TooltipColors.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip display position\n\t */\n\t@Prop({mutable: true}) position: TooltipPositionType = \"right\"\n\t/**\n\t * Information contained in the tooltip\n\t */\n\t@Prop() readonly message: string = undefined\n\t/**\n\t * Custom tooltip identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Trigger is just an icon\n\t */\n\t@Prop({reflect: true}) readonly icon: boolean = undefined\n\n\t@State() persist = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TooltipColors, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TooltipSize, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"position\")\n\tvalidatePosition(newValue: string): void {\n\t\tvalidateProp(TooltipPosition, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"message\")\n\trerenderMessage(): void {\n\t\tthis.createContentWrapper();\n\t}\n\n\tconnectedCallback() {\n\t\tthis.createContentWrapper()\n\t\tthis.registerListeners()\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\n\t\tthis.validatePosition(this.position)\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.createContentWrapper()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.resizeObserver?.disconnect()\n\t\tthis.resizeObserver = undefined\n\t\twindow.removeEventListener(\"resize\", this.reposition)\n\t\tthis.repositionListenersAttached = false\n\t\tthis.removeContent()\n\t}\n\n\tprivate createContentWrapper() {\n\t\tif (this.tooltipContent) {\n\t\t\tif (this.message != null) {\n\t\t\t\tthis.tooltipContent.setAttribute(\"message\", this.message)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tlet content: HTMLGovTooltipContentElement;\n\t\tif (this.insideContent) {\n\t\t\tcontent = this.insideContent\n\t\t} else {\n\t\t\tcontent = documentNode().createElement(TooltipContentClass.root) as HTMLGovTooltipContentElement\n\t\t\tif (this.message != null) {\n\t\t\t\tcontent.setAttribute(\"message\", this.message)\n\t\t\t}\n\t\t}\n\n\t\tcontent.setAttribute(\"id\", this.identifier ?? this.tooltipContentId)\n\t\tcontent.setAttribute(\"parent-id\", this.tooltipId)\n\t\tcontent.setAttribute(\"color\", this.color)\n\t\tcontent.setAttribute(\"size\", this.size)\n\t\tdocumentNode().body.appendChild(content)\n\t}\n\n\tprivate get tooltipContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn documentNode().body.querySelector(`#${this.identifier ?? this.tooltipContentId}`);\n\t}\n\n\tprivate get insideContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn this.host.querySelector(TooltipContentClass.root)\n\t}\n\n\tprivate registerListeners() {\n\t\tthis.host.addEventListener(\"click\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.persist = true\n\t\t\tif (this.tooltipContent) {\n\t\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"true\")\n\t\t\t}\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseenter\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseleave\", e => {\n\t\t\te.preventDefault()\n\t\t\tif (this.persist === false) {\n\t\t\t\tthis.hideTooltip()\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate verifyPositionSpace() {\n\t\tconst offset = 12\n\t\tconst windowWidth = window.innerWidth - (window.innerWidth - document.documentElement.clientWidth);\n\t\tconst trigger = this.host.getBoundingClientRect()\n\t\tconst trgWidth = this.host.offsetWidth\n\t\tconst trgHeight = this.host.offsetHeight\n\t\tconst contentWidth = this.tooltipContent.offsetWidth\n\t\tconst contentHeight = this.tooltipContent.offsetHeight\n\t\tconst triggerPos = {\n\t\t\tleft: trigger.left + document.documentElement.scrollLeft,\n\t\t\ttop: trigger.top + document.documentElement.scrollTop,\n\t\t}\n\n\t\tconst isRightSpace = ((triggerPos.left + offset + trigger.width) + contentWidth) <= windowWidth;\n\t\tconst isLeftSpace = triggerPos.left > contentWidth;\n\n\t\t// LEFT/RIGHT\n\t\tif (this.position === TooltipPosition.LEFT || this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - ((contentHeight - trgHeight) / 2)) + \"px\";\n\t\t\tif (isRightSpace === false && isLeftSpace === false) {\n\t\t\t\tthis.position = TooltipPosition.TOP\n\t\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\t}\n\t\t\tif (isLeftSpace && isRightSpace === false && this.position === TooltipPosition.RIGHT) {\n\t\t\t\tthis.position = TooltipPosition.LEFT\n\t\t\t}\n\t\t\tif (isRightSpace && isLeftSpace === false && this.position === TooltipPosition.LEFT) {\n\t\t\t\tthis.position = TooltipPosition.RIGHT\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.RIGHT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left + offset + trigger.width) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.LEFT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.LEFT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left - (contentWidth + offset)) + \"px\"\n\t\t}\n\n\t\t// LEFT/RIGHT FOR TOP/BOTTOM\n\t\tif (this.position === TooltipPosition.TOP || this.position === TooltipPosition.BOTTOM) {\n\t\t\tif (contentWidth > trgWidth) {\n\t\t\t\tlet leftPosition = (triggerPos.left - ((contentWidth - trgWidth) / 2));\n\t\t\t\tconst isNotLeftSpace = leftPosition < 0;\n\t\t\t\tconst isNotRightSpace = (leftPosition + contentWidth) > windowWidth;\n\t\t\t\tif (isNotLeftSpace && isNotRightSpace) {\n\t\t\t\t\tthis.tooltipContent.style.width = \"auto\";\n\t\t\t\t\tthis.tooltipContent.style.left = offset + \"px\";\n\t\t\t\t\tthis.tooltipContent.style.right = offset + \"px\";\n\t\t\t\t} else {\n\t\t\t\t\tif (isNotLeftSpace) {\n\t\t\t\t\t\tleftPosition = offset\n\t\t\t\t\t}\n\t\t\t\t\tif (isNotRightSpace) {\n\t\t\t\t\t\tleftPosition = leftPosition - ((windowWidth - (leftPosition + contentWidth + offset)) * -1)\n\t\t\t\t\t}\n\t\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst leftPosition = (triggerPos.left + ((trgWidth - contentWidth) / 2))\n\n\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.TOP) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - (contentHeight + offset)) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.BOTTOM) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.BOTTOM)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top + (trgHeight + offset)) + \"px\"\n\t\t}\n\n\t\tthis.tooltipContent.style.opacity = '1'\n\n\t}\n\n\tprivate resizeObserver?: ResizeObserver\n\tprivate repositionListenersAttached = false\n\tprivate readonly reposition = () => {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.verifyPositionSpace()\n\t\t}\n\t}\n\n\tprivate showTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.style.opacity = '0'\n\t\t\tthis.tooltipContent.hidden = false\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"true\")\n\t\t\ttick(() => {\n\t\t\t\tthis.verifyPositionSpace()\n\t\t\t})\n\t\t\tif (!this.repositionListenersAttached) {\n\t\t\t\tthis.repositionListenersAttached = true\n\t\t\t\tif (typeof ResizeObserver !== \"undefined\") {\n\t\t\t\t\tthis.resizeObserver = new ResizeObserver(this.reposition)\n\t\t\t\t\tthis.resizeObserver.observe(this.tooltipContent)\n\t\t\t\t}\n\t\t\t\twindow.addEventListener(\"resize\", this.reposition)\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate hideTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"false\")\n\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"false\")\n\t\t\tthis.tooltipContent.removeAttribute('style')\n\t\t}\n\t\tthis.resizeObserver?.disconnect()\n\t\tthis.resizeObserver = undefined\n\t\twindow.removeEventListener(\"resize\", this.reposition)\n\t\tthis.repositionListenersAttached = false\n\t}\n\n\tprivate removeContent() {\n\t\tconst contentEl = document.getElementById(this.tooltipContentId)\n\t\tif (contentEl) {\n\t\t\tcontentEl.remove()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tid={this.tooltipId}\n\t\t\t\tclass={this.h.classes(TooltipClass.root)}\n\t\t\t\tposition={this.position}>\n\t\t\t\t<span role={'button'}\n\t\t\t\t\t\t\ttabindex={0}\n\t\t\t\t\t\t\tonKeyPress={() => this.showTooltip()}\n\t\t\t\t\t\t\tonBlur={() => {\n\t\t\t\t\t\t\t\tif (this.persist === false) {\n\t\t\t\t\t\t\t\t\tthis.hideTooltip()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\taria-describedby={this.identifier ?? this.tooltipContentId}><slot/></span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showTooltip()\n\t}\n\n\t/**\n\t * Hiding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.persist = false\n\t\tthis.hide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KAAKgB,e,CAElCwB,OAAOa,iBAAiB,SAAUrD,KAAKe,W,GAKlC,WAAA0C,G,MACP,GAAIzD,KAAKgB,eAAgB,CACxBhB,KAAKgB,eAAe2B,aAAa,aAAc,SAC/C3C,KAAKgB,eAAe2B,aAAa,UAAW,SAC5C3C,KAAKgB,eAAe8E,gBAAgB,Q,EAErCzD,EAAArC,KAAKsC,kBAAgB,MAAAD,SAAA,SAAAA,EAAAE,aACrBvC,KAAKsC,eAAiBpC,UACtBsC,OAAOC,oBAAoB,SAAUzC,KAAKe,YAC1Cf,KAAKc,4BAA8B,K,CAG5B,aAAA4B,GACP,MAAMqD,EAAYlC,SAASmC,eAAehG,KAAKC,kBAC/C,GAAI8F,EAAW,CACdA,EAAUE,Q,EAIZ,MAAAC,G,MACC,OACChF,EAACiF,EACA,CAAAC,IAAA,2CAAAC,GAAIrG,KAAKG,UACTmG,MAAOtG,KAAKkB,EAAEqF,QAAQ9E,EAAaC,MACnChB,SAAUV,KAAKU,UACfQ,EAAM,QAAAkF,IAAA,2CAAAI,KAAM,SACTC,SAAU,EACVC,WAAY,IAAM1G,KAAKwD,cACvBmD,OAAQ,KACP,GAAI3G,KAAKa,UAAY,MAAO,CAC3Bb,KAAKyD,a,GAEN,oBACiBpB,EAAArC,KAAKiD,cAAc,MAAAZ,SAAA,EAAAA,EAAArC,KAAKC,kBAAkBiB,EAAO,QAAAkF,IAAA,8C,CASzE,UAAMQ,GACL5G,KAAKwD,a,CAON,UAAMqD,GACL7G,KAAKa,QAAU,MACfb,KAAKyD,a","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{p as t,H as s,h as e,a as i}from"./index.js";import{T as o,a as n,d as l}from"./p-DfI_0WW6.js";import{t as a}from"./p-BHRF-5cf.js";import{d as c}from"./p-C_URF9Su.js";import{d as r}from"./p-CXPP9vec.js";const h=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:"121b5cd3878956618a7a917511e6d8d76edf6672",class:l.root,role:"tooltip",hidden:!this.isVisible,"aria-hidden":!a(this.isVisible),"is-visible":this.isVisible},this.message?e("span",{class:"gov-tooltip-content__message",innerHTML:this.message}):e("slot",null),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"],message:[1025]},undefined,{isVisible:["visibleContent"]}]);function m(){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,h)}break;case"gov-button":if(!customElements.get(t)){c()}break;case"gov-icon":if(!customElements.get(t)){r()}break}}))}m();export{h as G,m as d};
2
+ //# sourceMappingURL=p-pJ_vPAO0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GovTooltipContent","__stencil_proxyCustomElement","HTMLElement","constructor","this","color","TooltipColors","PRIMARY","size","TooltipSize","_M","persist","isVisible","parentId","visibleContent","newValue","clearTimeout","timeout","setTimeout","host","style","visibility","hideContent","parentEl","document","getElementById","hide","catch","render","h","Host","key","class","TooltipContentClass","root","role","hidden","toBoolAttr","message","innerHTML","bind","type","slot","name"],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip-content.tsx"],"sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { TooltipContentClass, TooltipSize, TooltipSizeType, TooltipColors, TooltipColorType } from \"./constants\"\nimport { toBoolAttr } from \"../../helpers/Dom/template\"\n\n@Component({\n\ttag: \"gov-tooltip-content\",\n})\nexport class GovTooltipContent {\n\tprivate timeout\n\n\t@Element() host: HTMLGovTooltipContentElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly color?: TooltipColorType = TooltipColors.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip is still visible.\n\t */\n\t@Prop() persist?: boolean = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"is-visible\", mutable: true }) isVisible = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"parent-id\" }) parentId: string = null\n\t/**\n\t * Tooltip text. When set, renders the HTML message; otherwise the default `<slot/>` is used.\n\t */\n\t@Prop({ attribute: \"message\", mutable: true }) message?: string\n\n\t@Watch(\"isVisible\")\n\tvisibleContent(newValue: boolean): void {\n\t\tclearTimeout(this.timeout)\n\t\tif (newValue === false) {\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.host.style.visibility = \"hidden\"\n\t\t\t}, 250)\n\t\t} else {\n\t\t\tthis.host.style.visibility = \"visible\"\n\t\t}\n\t}\n\n\thideContent() {\n\t\tthis.isVisible = false\n\t\tthis.persist = false\n\t\tconst parentEl = document.getElementById(this.parentId) as HTMLGovTooltipElement\n\t\tif (parentEl) {\n\t\t\tparentEl.hide().catch()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={TooltipContentClass.root}\n\t\t\t\trole={\"tooltip\"}\n\t\t\t\thidden={!this.isVisible}\n\t\t\t\taria-hidden={!toBoolAttr(this.isVisible)}\n\t\t\t\tis-visible={this.isVisible}>\n\t\t\t\t{this.message\n\t\t\t\t\t? <span class=\"gov-tooltip-content__message\" innerHTML={this.message}></span>\n\t\t\t\t\t: <slot></slot>}\n\t\t\t\t{this.persist ? (\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\ton-gov-click={this.hideContent.bind(this)}\n\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\ttype={\"base\"}>\n\t\t\t\t\t\t<gov-icon slot={\"icon-start\"} name={\"x-lg\"} type={\"components\"}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"wNAOaA,EAAiBC,EAAA,MAAAD,UAAAE,EAH9B,WAAAC,G,8BAUkBC,KAAAC,MAA2BC,EAAcC,QAIzCH,KAAAI,KAAyBC,EAAYC,GAI9CN,KAAOO,QAAa,MAIsBP,KAASQ,UAAG,MAI5BR,KAAQS,SAAW,IAkDrD,CA3CA,cAAAC,CAAeC,GACdC,aAAaZ,KAAKa,SAClB,GAAIF,IAAa,MAAO,CACvBX,KAAKa,QAAUC,YAAW,KACzBd,KAAKe,KAAKC,MAAMC,WAAa,QAAQ,GACnC,I,KACG,CACNjB,KAAKe,KAAKC,MAAMC,WAAa,S,EAI/B,WAAAC,GACClB,KAAKQ,UAAY,MACjBR,KAAKO,QAAU,MACf,MAAMY,EAAWC,SAASC,eAAerB,KAAKS,UAC9C,GAAIU,EAAU,CACbA,EAASG,OAAOC,O,EAIlB,MAAAC,GACC,OACCC,EAACC,EAAI,CAAAC,IAAA,2CACJC,MAAOC,EAAoBC,KAC3BC,KAAM,UACNC,QAAShC,KAAKQ,UAAS,eACTyB,EAAWjC,KAAKQ,WAClB,aAAAR,KAAKQ,WAChBR,KAAKkC,QACHT,EAAM,QAAAG,MAAM,+BAA+BO,UAAWnC,KAAKkC,UAC3DT,EAAa,aACfzB,KAAKO,QACLkB,EACe,6BAAAzB,KAAKkB,YAAYkB,KAAKpC,MACpCC,MAAOD,KAAKC,MACZG,KAAMJ,KAAKI,KACXiC,KAAM,QACNZ,EAAU,YAAAa,KAAM,aAAcC,KAAM,OAAQF,KAAM,gBAEhD,K","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{p as t,H as s,c as i,h as e,a}from"./index.js";import{g as o,b as n,c}from"./p-BSr8e18S.js";import{g as h,t as r,b as d}from"./p-BHRF-5cf.js";import{v as l}from"./p-BKP-F1qP.js";import{c as f}from"./p-vN03FcXN.js";import{p as u}from"./p-B0hcuYXk.js";import{A as m,a as p,i as v}from"./p-CXgom82_.js";import{d as b}from"./p-CXPP9vec.js";const g=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus");this.govBlur=i(this,"gov-blur");this.govChange=i(this,"gov-change");this.size="m";this.required=false;this.disabled=false;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.syncSelectValue()}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 m(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(p);this.syncSelectValue()}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}componentWillLoad(){this.validateSize(this.size);this.optionsState=u(this.options);this.inheritedAttributes=v(this.host)}async 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})}syncSelectValue(){if(this.selectRef&&this.value!==undefined&&this.selectRef.value!==this.value){this.selectRef.value=this.value}}render(){return e(a,{key:"d29638f5868731a2324971d197dcd636364a4f6c",class:n.root,size:this.size},this.h.hasSlot("prefix")&&e("slot",{key:"41cc14ee33022a4cf6d10c3d86c8915551221e94",name:"prefix"}),e("span",{key:"f9c167589fa81f0a060a13d9a31d16ab642d5ad2",class:"element"},e("select",Object.assign({key:"2dd5c948ccc7b65674e7d7f730cb2c9567287668",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)}),e("slot",{key:"f6f0b21c9e43e1216446bce09c57a757a40d7b7b"}),Array.isArray(this.optionsState)&&this.optionsState.map((t=>{var s;return e("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&&e("gov-icon",{key:"d94a0191bc7d02d55450dfad627457101226ad22",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&e("gov-icon",{key:"84ecf7197313c8a145efa54730d22068679df3f5",class:"validation-icon",name:"exclamation-lg",type:"components"}),e("gov-icon",{key:"1a219d4d230466ac15e316eee16d4a55db1889fe",class:"arrow-icon",name:"chevron-down",type:"components"})),this.h.hasSlot("sufix")&&e("slot",{key:"c7f4816548e3494de94f7ff0dd33f6c904acc14b",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 w(){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,g)}break;case"gov-icon":if(!customElements.get(t)){b()}break}}))}w();export{g as G,w as d};
2
+ //# sourceMappingURL=p-yIpIIG5A.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GovFormSelect","__stencil_proxyCustomElement","HTMLElement","constructor","this","size","required","disabled","optionsState","inheritedAttributes","h","govHost","host","f","govForm","selectId","createID","validateSize","newValue","validateProp","FormSelectSizes","FormSelectClass","root","watchOptions","propsValueToArray","watchControlAttrs","passControlAttrs","watchValue","syncSelectValue","passAttrToControl","toBoolAttr","invalid","success","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","disconnectedCallback","_a","stopObserving","componentWillLoad","options","inheritAriaAttributes","componentDidRender","passAttrToLabel","String","removeAttribute","Object","assign","selectRef","value","undefined","render","Host","key","class","hasSlot","name","id","identifier","onFocus","onFocusHandler","bind","onChange","onChangeHandler","onBlur","onBlurHandler","ref","el","toBoolAttrIfDefined","Array","isArray","map","option","selected","label","type","e","focused","govFocus","emit","component","originalEvent","govBlur","target","stopPropagation","govChange","setFocus","focus","getRef"],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {govForm} from '../../../helpers/Dom/form'\nimport {GovForm} from '../../../helpers/Dom/form.types'\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from '../../../helpers/Dom/template'\nimport {GovHost} from '../../../helpers/Dom/template.types'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {createID} from '../../../utils/string.utils'\nimport {FormSelectClass, FormSelectSizes, FormSelectSizesType,} from './constants'\nimport {FormSelectEvent, FormSelectOption} from './gov-form-select.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\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-form-select',\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID('GovSelect')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Options of select\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | FormSelectOption[]\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop({reflect: true}) readonly success: boolean\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\t@State() optionsState: FormSelectOption[] = []\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | FormSelectOption[]): void {\n\t\tthis.optionsState = propsValueToArray(newValue)\n\t}\n\n\t@Watch('disabled')\n\t@Watch('invalid')\n\t@Watch('success')\n\t@Watch('size')\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch('value')\n\twatchValue(): void {\n\t\tthis.syncSelectValue()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl('size', this.size)\n\t\tthis.f.passAttrToControl('invalid', toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('success', toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl('disabled', toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl('type', 'select')\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\n\t\tthis.syncSelectValue()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\t\tthis.optionsState = propsValueToArray(this.options)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate syncSelectValue() {\n\t\tif (this.selectRef && this.value !== undefined && this.selectRef.value !== this.value) {\n\t\t\tthis.selectRef.value = this.value\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size}>\n\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t{Array.isArray(this.optionsState) && this.optionsState.map((option) => {\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={option.value === this.value}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={option?.disabled}>{option.label ?? option.value}</option>)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</select>\n\t\t\t\t\t{this.success && <gov-icon class=\"validation-icon\" name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t{this.invalid && <gov-icon class=\"validation-icon\" name=\"exclamation-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t<gov-icon class=\"arrow-icon\" name=\"chevron-down\" type=\"components\"></gov-icon>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectElement> {\n\t\treturn this.selectRef\n\t}\n}\n"],"mappings":"6VAiBaA,EAAaC,EAAA,MAAAD,UAAAE,EAQzB,WAAAC,G,oIAsBiBC,KAAIC,KAAyB,IAS7BD,KAAQE,SAAY,MASLF,KAAQG,SAAY,MAkB3CH,KAAYI,aAAuB,GAyBnCJ,KAAmBK,oBAAe,GAlF1CL,KAAKM,EAAIC,EAAQP,KAAKQ,MACtBR,KAAKS,EAAIC,EAAQV,KAAKM,GACtBN,KAAKW,SAAWC,EAAS,YACzB,CAyDD,YAAAC,CAAaC,GACZC,EAAaC,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Q,UAAYjD,EAAA,QAAA+C,IAAA,2CAAMG,KAAK,U,CAKlC,cAAAI,CAAegB,GACtB5E,KAAK6E,QAAU,KACf7E,KAAK8E,SAASC,KAAK,CAClBC,UAAW/D,EAAgBC,KAC3B+D,cAAeL,EACf3B,MAAOjD,KAAKiD,O,CAIN,aAAAgB,CAAcW,GACrB5E,KAAK6E,QAAU,MACf7E,KAAKkF,QAAQH,KAAK,CACjBC,UAAW/D,EAAgBC,KAC3B+D,cAAeL,EACf3B,MAAOjD,KAAKiD,O,CAIN,eAAAc,CAAgBa,GACvB5E,KAAKiD,MAAS2B,EAAEO,OAA6BlC,MAC7C2B,EAAEQ,kBACFpF,KAAKqF,UAAUN,KAAK,CACnBC,UAAW/D,EAAgBC,KAC3B+D,cAAeL,EACf3B,MAAOjD,KAAKiD,O,CAQd,cAAMqC,CAAS9C,GACd,OAAOxC,KAAKgD,UAAUuC,MAAM/C,E,CAO7B,YAAMgD,GACL,OAAOxF,KAAKgD,S","ignoreList":[]}
@@ -191,11 +191,11 @@ body {
191
191
  --color-primary-100: rgb(226, 238, 248);
192
192
  --color-primary-200: rgb(206, 227, 244);
193
193
  --color-primary-300: rgb(158, 200, 233);
194
- --color-primary-400: rgb(111, 166, 216);
195
- --color-primary-500: rgb(79, 135, 194);
196
- --color-primary-600: rgb(46, 106, 168);
197
- --color-primary-700: rgb(0, 70, 155);
198
- --color-primary-800: rgb(14, 62, 134);
194
+ --color-primary-400: rgb(104, 156, 209);
195
+ --color-primary-500: rgb(55, 113, 184);
196
+ --color-primary-600: rgb(0, 70, 155);
197
+ --color-primary-700: rgb(0, 62, 138);
198
+ --color-primary-800: rgb(6, 57, 126);
199
199
  --color-primary-900: rgb(12, 51, 114);
200
200
  --color-primary-950: rgb(10, 36, 80);
201
201
  --color-primary-1000: rgb(12, 24, 56);
@@ -284,7 +284,7 @@ body {
284
284
  --background-neutral-subtle: var(--color-neutral-100);
285
285
  --background-neutral-subtlest: var(--color-neutral-50);
286
286
  --background-neutral-white: var(--color-neutral-0);
287
- --background-primary: var(--color-primary-700);
287
+ --background-primary: var(--color-primary-600);
288
288
  --background-primary-subtle: var(--color-primary-100);
289
289
  --background-primary-subtlest: var(--color-primary-50);
290
290
  --background-secondary: var(--color-secondary-600);
@@ -301,7 +301,7 @@ body {
301
301
  --background-status-warning-subtlest: var(--color-warning-50);
302
302
  --border-error: var(--color-error-600);
303
303
  --border-neutral: var(--color-neutral-700);
304
- --border-primary: var(--color-primary-700);
304
+ --border-primary: var(--color-primary-600);
305
305
  --border-secondary: var(--color-secondary-600);
306
306
  --border-secondary-bold: var(--color-secondary-800);
307
307
  --border-subtle: var(--color-neutral-300);
@@ -334,9 +334,9 @@ body {
334
334
  --button-solid-neutral: var(--color-neutral-600);
335
335
  --button-solid-neutral-active: var(--color-neutral-800);
336
336
  --button-solid-neutral-hover: var(--color-neutral-700);
337
- --button-solid-primary: var(--color-primary-700);
338
- --button-solid-primary-active: var(--color-primary-900);
339
- --button-solid-primary-hover: var(--color-primary-800);
337
+ --button-solid-primary: var(--color-primary-600);
338
+ --button-solid-primary-active: var(--color-primary-800);
339
+ --button-solid-primary-hover: var(--color-primary-700);
340
340
  --button-solid-secondary: var(--color-secondary-600);
341
341
  --button-solid-secondary-active: var(--color-secondary-300);
342
342
  --button-solid-secondary-hover: var(--color-secondary-400);
@@ -355,9 +355,9 @@ body {
355
355
  --icon-warning: var(--color-warning-700);
356
356
  --icon-on-bold-black: var(--color-neutral-1000);
357
357
  --icon-on-bold-white: var(--color-neutral-0);
358
- --icon-on-subtle: var(--color-primary-700);
359
- --icon-on-subtle-fixed-bg: var(--color-primary-700);
360
- --interactive-active: var(--color-primary-700);
358
+ --icon-on-subtle: var(--color-primary-600);
359
+ --icon-on-subtle-fixed-bg: var(--color-primary-600);
360
+ --interactive-active: var(--color-primary-600);
361
361
  --interactive-disabled: var(--color-neutral-200);
362
362
  --interactive-error: var(--color-error-600);
363
363
  --interactive-inactive: var(--color-neutral-300);
@@ -390,7 +390,7 @@ body {
390
390
  --text-white: var(--color-neutral-0);
391
391
  --text-white-fixed: var(--color-neutral-0);
392
392
  --text-status-error: var(--color-error-700);
393
- --text-status-info: var(--color-primary-700);
393
+ --text-status-info: var(--color-primary-600);
394
394
  --text-status-success: var(--color-success-700);
395
395
  --text-status-warning: var(--color-warning-900);
396
396
  }
@@ -410,7 +410,7 @@ body {
410
410
  --background-neutral-subtle: var(--color-neutral-100);
411
411
  --background-neutral-subtlest: var(--color-neutral-50);
412
412
  --background-neutral-white: var(--color-neutral-0);
413
- --background-primary: var(--color-primary-700);
413
+ --background-primary: var(--color-primary-600);
414
414
  --background-primary-subtle: var(--color-primary-100);
415
415
  --background-primary-subtlest: var(--color-primary-50);
416
416
  --background-secondary: var(--color-secondary-600);
@@ -427,7 +427,7 @@ body {
427
427
  --background-status-warning-subtlest: var(--color-warning-50);
428
428
  --border-error: var(--color-error-600);
429
429
  --border-neutral: var(--color-neutral-700);
430
- --border-primary: var(--color-primary-700);
430
+ --border-primary: var(--color-primary-600);
431
431
  --border-secondary: var(--color-secondary-600);
432
432
  --border-secondary-bold: var(--color-secondary-800);
433
433
  --border-subtle: var(--color-neutral-300);
@@ -460,9 +460,9 @@ body {
460
460
  --button-solid-neutral: var(--color-neutral-600);
461
461
  --button-solid-neutral-active: var(--color-neutral-800);
462
462
  --button-solid-neutral-hover: var(--color-neutral-700);
463
- --button-solid-primary: var(--color-primary-700);
464
- --button-solid-primary-active: var(--color-primary-900);
465
- --button-solid-primary-hover: var(--color-primary-800);
463
+ --button-solid-primary: var(--color-primary-600);
464
+ --button-solid-primary-active: var(--color-primary-800);
465
+ --button-solid-primary-hover: var(--color-primary-700);
466
466
  --button-solid-secondary: var(--color-secondary-600);
467
467
  --button-solid-secondary-active: var(--color-secondary-300);
468
468
  --button-solid-secondary-hover: var(--color-secondary-400);
@@ -481,9 +481,9 @@ body {
481
481
  --icon-warning: var(--color-warning-700);
482
482
  --icon-on-bold-black: var(--color-neutral-1000);
483
483
  --icon-on-bold-white: var(--color-neutral-0);
484
- --icon-on-subtle: var(--color-primary-700);
485
- --icon-on-subtle-fixed-bg: var(--color-primary-700);
486
- --interactive-active: var(--color-primary-700);
484
+ --icon-on-subtle: var(--color-primary-600);
485
+ --icon-on-subtle-fixed-bg: var(--color-primary-600);
486
+ --interactive-active: var(--color-primary-600);
487
487
  --interactive-disabled: var(--color-neutral-200);
488
488
  --interactive-error: var(--color-error-600);
489
489
  --interactive-inactive: var(--color-neutral-300);
@@ -516,7 +516,7 @@ body {
516
516
  --text-white: var(--color-neutral-0);
517
517
  --text-white-fixed: var(--color-neutral-0);
518
518
  --text-status-error: var(--color-error-700);
519
- --text-status-info: var(--color-primary-700);
519
+ --text-status-info: var(--color-primary-600);
520
520
  --text-status-success: var(--color-success-700);
521
521
  --text-status-warning: var(--color-warning-900);
522
522
  }
@@ -536,7 +536,7 @@ body {
536
536
  --background-neutral-subtle: var(--color-neutral-900);
537
537
  --background-neutral-subtlest: var(--color-neutral-950);
538
538
  --background-neutral-white: var(--color-neutral-1000);
539
- --background-primary: var(--color-primary-700);
539
+ --background-primary: var(--color-primary-600);
540
540
  --background-primary-subtle: var(--color-primary-950);
541
541
  --background-primary-subtlest: var(--color-primary-900);
542
542
  --background-secondary: var(--color-secondary-600);
@@ -553,7 +553,7 @@ body {
553
553
  --background-status-warning-subtlest: var(--color-warning-950);
554
554
  --border-error: var(--color-error-600);
555
555
  --border-neutral: var(--color-neutral-200);
556
- --border-primary: var(--color-primary-700);
556
+ --border-primary: var(--color-primary-600);
557
557
  --border-secondary: var(--color-secondary-600);
558
558
  --border-secondary-bold: var(--color-secondary-800);
559
559
  --border-subtle: var(--color-neutral-600);
@@ -586,9 +586,9 @@ body {
586
586
  --button-solid-neutral: var(--color-neutral-600);
587
587
  --button-solid-neutral-active: var(--color-neutral-700);
588
588
  --button-solid-neutral-hover: var(--color-neutral-500);
589
- --button-solid-primary: var(--color-primary-700);
590
- --button-solid-primary-active: var(--color-primary-800);
591
- --button-solid-primary-hover: var(--color-primary-600);
589
+ --button-solid-primary: var(--color-primary-600);
590
+ --button-solid-primary-active: var(--color-primary-700);
591
+ --button-solid-primary-hover: var(--color-primary-500);
592
592
  --button-solid-secondary: var(--color-secondary-600);
593
593
  --button-solid-secondary-active: var(--color-secondary-700);
594
594
  --button-solid-secondary-hover: var(--color-secondary-500);
@@ -608,8 +608,8 @@ body {
608
608
  --icon-on-bold-black: var(--color-neutral-1000);
609
609
  --icon-on-bold-white: var(--color-neutral-0);
610
610
  --icon-on-subtle: var(--color-primary-100);
611
- --icon-on-subtle-fixed-bg: var(--color-primary-700);
612
- --interactive-active: var(--color-primary-700);
611
+ --icon-on-subtle-fixed-bg: var(--color-primary-600);
612
+ --interactive-active: var(--color-primary-600);
613
613
  --interactive-disabled: var(--color-neutral-800);
614
614
  --interactive-error: var(--color-error-600);
615
615
  --interactive-inactive: var(--color-neutral-600);
@@ -662,7 +662,7 @@ body {
662
662
  --background-neutral-subtle: var(--color-neutral-900);
663
663
  --background-neutral-subtlest: var(--color-neutral-950);
664
664
  --background-neutral-white: var(--color-neutral-1000);
665
- --background-primary: var(--color-primary-700);
665
+ --background-primary: var(--color-primary-600);
666
666
  --background-primary-subtle: var(--color-primary-950);
667
667
  --background-primary-subtlest: var(--color-primary-900);
668
668
  --background-secondary: var(--color-secondary-600);
@@ -679,7 +679,7 @@ body {
679
679
  --background-status-warning-subtlest: var(--color-warning-950);
680
680
  --border-error: var(--color-error-600);
681
681
  --border-neutral: var(--color-neutral-200);
682
- --border-primary: var(--color-primary-700);
682
+ --border-primary: var(--color-primary-600);
683
683
  --border-secondary: var(--color-secondary-600);
684
684
  --border-secondary-bold: var(--color-secondary-800);
685
685
  --border-subtle: var(--color-neutral-600);
@@ -712,9 +712,9 @@ body {
712
712
  --button-solid-neutral: var(--color-neutral-600);
713
713
  --button-solid-neutral-active: var(--color-neutral-700);
714
714
  --button-solid-neutral-hover: var(--color-neutral-500);
715
- --button-solid-primary: var(--color-primary-700);
716
- --button-solid-primary-active: var(--color-primary-800);
717
- --button-solid-primary-hover: var(--color-primary-600);
715
+ --button-solid-primary: var(--color-primary-600);
716
+ --button-solid-primary-active: var(--color-primary-700);
717
+ --button-solid-primary-hover: var(--color-primary-500);
718
718
  --button-solid-secondary: var(--color-secondary-600);
719
719
  --button-solid-secondary-active: var(--color-secondary-700);
720
720
  --button-solid-secondary-hover: var(--color-secondary-500);
@@ -734,8 +734,8 @@ body {
734
734
  --icon-on-bold-black: var(--color-neutral-1000);
735
735
  --icon-on-bold-white: var(--color-neutral-0);
736
736
  --icon-on-subtle: var(--color-primary-100);
737
- --icon-on-subtle-fixed-bg: var(--color-primary-700);
738
- --interactive-active: var(--color-primary-700);
737
+ --icon-on-subtle-fixed-bg: var(--color-primary-600);
738
+ --interactive-active: var(--color-primary-600);
739
739
  --interactive-disabled: var(--color-neutral-800);
740
740
  --interactive-error: var(--color-error-600);
741
741
  --interactive-inactive: var(--color-neutral-600);
@@ -7322,7 +7322,7 @@ gov-form-checkbox *[slot=label], .gov-form-checkbox *[slot=label] {
7322
7322
  margin-bottom: 0;
7323
7323
  cursor: pointer;
7324
7324
  }
7325
- gov-form-checkbox *[slot=label] *, .gov-form-checkbox *[slot=label] * {
7325
+ gov-form-checkbox *[slot=label] > *, .gov-form-checkbox *[slot=label] > * {
7326
7326
  position: relative;
7327
7327
  z-index: 1;
7328
7328
  width: 100%;
@@ -9671,7 +9671,8 @@ gov-form-search, .gov-form-search {
9671
9671
  position: relative;
9672
9672
  display: flex;
9673
9673
  width: 100%;
9674
- padding-right: var(--spacing-multiline-vertical-padding-xs);
9674
+ padding: var(--spacing-2xs);
9675
+ padding-left: 0;
9675
9676
  align-items: center;
9676
9677
  border-radius: var(--border-radius, var(--corner-radius-s));
9677
9678
  background-color: var(--form-bg-color, var(--background-block-primary));
@@ -9710,6 +9711,13 @@ gov-form-search [slot=input] .element:focus-within, .gov-form-search [slot=input
9710
9711
  }
9711
9712
  gov-form-search [slot=button], .gov-form-search [slot=button] {
9712
9713
  flex: 0 0 auto;
9714
+ align-self: stretch;
9715
+ height: 100%;
9716
+ }
9717
+ gov-form-search [slot=button] .element, .gov-form-search [slot=button] .element {
9718
+ height: 100%;
9719
+ margin-top: 0;
9720
+ margin-bottom: 0;
9713
9721
  }
9714
9722
  gov-form-search:not(.hydrated) gov-form-input, .gov-form-search:not(.hydrated) gov-form-input {
9715
9723
  border: none;
@@ -10005,14 +10013,6 @@ gov-form-select[success=""] .validation-icon, gov-form-select[success=true i] .v
10005
10013
  color: var(--form-state-icon-success, var(--icon-success));
10006
10014
  }
10007
10015
 
10008
- gov-form-select option:not([selected]) {
10009
- display: none;
10010
- }
10011
-
10012
- .gov-form-select option:not([selected]) {
10013
- display: inherit;
10014
- }
10015
-
10016
10016
  /* Switch */
10017
10017
  gov-form-switch, .gov-form-switch {
10018
10018
  position: relative;