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

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 (416) hide show
  1. package/dist/cjs/core.cjs.js +2 -2
  2. package/dist/cjs/gov-accordion-item.cjs.entry.js +3 -3
  3. package/dist/cjs/gov-accordion.cjs.entry.js +3 -3
  4. package/dist/cjs/gov-attachments_3.cjs.entry.js +4 -4
  5. package/dist/cjs/gov-backdrop.cjs.entry.js +3 -3
  6. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +3 -3
  7. package/dist/cjs/gov-button.cjs.entry.js +4 -4
  8. package/dist/cjs/gov-card.cjs.entry.js +3 -3
  9. package/dist/cjs/gov-chip.cjs.entry.js +3 -3
  10. package/dist/cjs/gov-container.cjs.entry.js +1 -1
  11. package/dist/cjs/gov-control-group.cjs.entry.js +3 -3
  12. package/dist/cjs/gov-cookiebar.cjs.entry.js +1 -1
  13. package/dist/cjs/gov-dialog.cjs.entry.js +3 -3
  14. package/dist/cjs/gov-dropdown.cjs.entry.js +1 -1
  15. package/dist/cjs/gov-empty.cjs.entry.js +3 -3
  16. package/dist/cjs/gov-error-code.cjs.entry.js +1 -1
  17. package/dist/cjs/gov-flex_3.cjs.entry.js +202 -24
  18. package/dist/cjs/gov-flex_3.cjs.entry.js.map +1 -1
  19. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +3 -3
  20. package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +3 -3
  21. package/dist/cjs/gov-form-checkbox.cjs.entry.js +3 -3
  22. package/dist/cjs/gov-form-control.cjs.entry.js +1 -1
  23. package/dist/cjs/gov-form-file.cjs.entry.js +1 -1
  24. package/dist/cjs/gov-form-group.cjs.entry.js +3 -3
  25. package/dist/cjs/gov-form-input_2.cjs.entry.js +4 -4
  26. package/dist/cjs/gov-form-label.cjs.entry.js +1 -1
  27. package/dist/cjs/gov-form-multi-select.cjs.entry.js +3 -3
  28. package/dist/cjs/gov-form-password-power.cjs.entry.js +1 -1
  29. package/dist/cjs/gov-form-radio-group.cjs.entry.js +3 -3
  30. package/dist/cjs/gov-form-radio.cjs.entry.js +3 -3
  31. package/dist/cjs/gov-form-search.cjs.entry.js +1 -1
  32. package/dist/cjs/gov-form-select.cjs.entry.js +3 -3
  33. package/dist/cjs/gov-form-switch.cjs.entry.js +3 -3
  34. package/dist/cjs/gov-grid-item.cjs.entry.js +1 -1
  35. package/dist/cjs/gov-grid.cjs.entry.js +1 -1
  36. package/dist/cjs/gov-infobar.cjs.entry.js +5 -5
  37. package/dist/cjs/gov-layout-column.cjs.entry.js +2 -2
  38. package/dist/cjs/gov-layout.cjs.entry.js +2 -2
  39. package/dist/cjs/gov-lifecycle.cjs.entry.js +2 -2
  40. package/dist/cjs/gov-link.cjs.entry.js +4 -4
  41. package/dist/cjs/gov-loading.cjs.entry.js +4 -4
  42. package/dist/cjs/gov-message.cjs.entry.js +4 -4
  43. package/dist/cjs/gov-pagination.cjs.entry.js +3 -3
  44. package/dist/cjs/gov-spacer.cjs.entry.js +4 -4
  45. package/dist/cjs/gov-stepper-item.cjs.entry.js +4 -4
  46. package/dist/cjs/gov-stepper.cjs.entry.js +4 -4
  47. package/dist/cjs/gov-tabs-item.cjs.entry.js +2 -2
  48. package/dist/cjs/gov-tabs.cjs.entry.js +4 -4
  49. package/dist/cjs/gov-tag.cjs.entry.js +4 -4
  50. package/dist/cjs/gov-tile.cjs.entry.js +2 -2
  51. package/dist/cjs/gov-tiles.cjs.entry.js +2 -2
  52. package/dist/cjs/gov-toast.cjs.entry.js +4 -4
  53. package/dist/cjs/gov-tooltip-content.cjs.entry.js +2 -2
  54. package/dist/cjs/gov-tooltip.cjs.entry.js +5 -5
  55. package/dist/cjs/gov-wizard-item.cjs.entry.js +5 -5
  56. package/dist/cjs/gov-wizard.cjs.entry.js +5 -5
  57. package/dist/cjs/{gov.log-21ea2c96.js → gov.log-bfea3151.js} +5 -1
  58. package/dist/cjs/gov.log-bfea3151.js.map +1 -0
  59. package/dist/cjs/{index-0e4f24f9.js → index-67e87c27.js} +15 -1
  60. package/dist/cjs/index-67e87c27.js.map +1 -0
  61. package/dist/cjs/loader.cjs.js +2 -2
  62. package/dist/cjs/{props-b079c32b.js → props-d189860c.js} +2 -2
  63. package/dist/cjs/{props-b079c32b.js.map → props-d189860c.js.map} +1 -1
  64. package/dist/cjs/{wcag-efe9bf16.js → wcag-2927ff73.js} +2 -2
  65. package/dist/cjs/{wcag-efe9bf16.js.map → wcag-2927ff73.js.map} +1 -1
  66. package/dist/collection/components/gov-icon/gov-icon.js +208 -2
  67. package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
  68. package/dist/collection/components/gov-infobar/gov-infobar.js +2 -2
  69. package/dist/collection/components/gov-layout/gov-layout-column.js +1 -1
  70. package/dist/collection/components/gov-layout/gov-layout.js +1 -1
  71. package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js +1 -1
  72. package/dist/collection/components/gov-link/gov-link.js +1 -1
  73. package/dist/collection/components/gov-loading/loading/gov-loading.js +1 -1
  74. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +1 -1
  75. package/dist/collection/components/gov-message/gov-message.js +1 -1
  76. package/dist/collection/components/gov-spacer/gov-spacer.js +1 -1
  77. package/dist/collection/components/gov-stepper/gov-stepper-item.js +1 -1
  78. package/dist/collection/components/gov-stepper/gov-stepper.js +1 -1
  79. package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
  80. package/dist/collection/components/gov-tabs/gov-tabs.js +1 -1
  81. package/dist/collection/components/gov-tag/gov-tag.js +1 -1
  82. package/dist/collection/components/gov-theme-switch/gov-theme-switch.js +1 -1
  83. package/dist/collection/components/gov-tile/container/gov-tiles.js +1 -1
  84. package/dist/collection/components/gov-tile/gov-tile.js +1 -1
  85. package/dist/collection/components/gov-toast/gov-toast.js +1 -1
  86. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +1 -1
  87. package/dist/collection/components/gov-tooltip/gov-tooltip.js +2 -2
  88. package/dist/collection/components/gov-wizard/gov-wizard-item.js +2 -2
  89. package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
  90. package/dist/collection/utils/icon.utils.js.map +1 -1
  91. package/dist/components/gov-accordion-item.js +1 -1
  92. package/dist/components/gov-accordion.js +1 -1
  93. package/dist/components/gov-attachments-item.js +1 -1
  94. package/dist/components/gov-attachments.js +1 -1
  95. package/dist/components/gov-backdrop.js +1 -1
  96. package/dist/components/gov-breadcrumbs.js +1 -1
  97. package/dist/components/gov-button.js +1 -1
  98. package/dist/components/gov-card.js +1 -1
  99. package/dist/components/gov-chip.js +1 -1
  100. package/dist/components/gov-container.js +1 -1
  101. package/dist/components/gov-control-group.js +1 -1
  102. package/dist/components/gov-cookiebar.js +1 -1
  103. package/dist/components/gov-dialog.js +1 -1
  104. package/dist/components/gov-dropdown.js +1 -1
  105. package/dist/components/gov-dropdown.js.map +1 -1
  106. package/dist/components/gov-empty.js +1 -1
  107. package/dist/components/gov-error-code.js +1 -1
  108. package/dist/components/gov-flex.js +1 -1
  109. package/dist/components/gov-form-autocomplete.js +1 -1
  110. package/dist/components/gov-form-checkbox-group.js +1 -1
  111. package/dist/components/gov-form-checkbox.js +1 -1
  112. package/dist/components/gov-form-control.js +1 -1
  113. package/dist/components/gov-form-file.js +1 -1
  114. package/dist/components/gov-form-file.js.map +1 -1
  115. package/dist/components/gov-form-group.js +1 -1
  116. package/dist/components/gov-form-input.js +1 -1
  117. package/dist/components/gov-form-label.js +1 -1
  118. package/dist/components/gov-form-message.js +1 -1
  119. package/dist/components/gov-form-multi-select.js +1 -1
  120. package/dist/components/gov-form-password-power.js +1 -1
  121. package/dist/components/gov-form-radio-group.js +1 -1
  122. package/dist/components/gov-form-radio.js +1 -1
  123. package/dist/components/gov-form-radio.js.map +1 -1
  124. package/dist/components/gov-form-search.js +1 -1
  125. package/dist/components/gov-form-select.js +1 -1
  126. package/dist/components/gov-form-switch.js +1 -1
  127. package/dist/components/gov-grid-item.js +1 -1
  128. package/dist/components/gov-grid.js +1 -1
  129. package/dist/components/gov-icon.js +1 -1
  130. package/dist/components/gov-infobar.js +1 -1
  131. package/dist/components/gov-layout-column.js +1 -1
  132. package/dist/components/gov-layout.js +1 -1
  133. package/dist/components/gov-lifecycle.js +1 -1
  134. package/dist/components/gov-link.js +1 -1
  135. package/dist/components/gov-loading.js +1 -1
  136. package/dist/components/gov-loading.js.map +1 -1
  137. package/dist/components/gov-message.js +1 -1
  138. package/dist/components/gov-pagination.js +1 -1
  139. package/dist/components/gov-skeleton.js +1 -1
  140. package/dist/components/gov-spacer.js +1 -1
  141. package/dist/components/gov-stepper-item.js +1 -1
  142. package/dist/components/gov-stepper.js +1 -1
  143. package/dist/components/gov-tabs-item.js +1 -1
  144. package/dist/components/gov-tabs.js +1 -1
  145. package/dist/components/gov-tag.js +1 -1
  146. package/dist/components/gov-theme-switch.js +1 -1
  147. package/dist/components/gov-theme-switch.js.map +1 -1
  148. package/dist/components/gov-tile.js +1 -1
  149. package/dist/components/gov-tile.js.map +1 -1
  150. package/dist/components/gov-tiles.js +1 -1
  151. package/dist/components/gov-toast.js +1 -1
  152. package/dist/components/gov-tooltip-content.js +1 -1
  153. package/dist/components/gov-tooltip.js +1 -1
  154. package/dist/components/gov-wizard-item.js +1 -1
  155. package/dist/components/gov-wizard.js +1 -1
  156. package/dist/components/index.js +1 -1
  157. package/dist/components/{p-56399a9b.js → p-03ad4e0f.js} +2 -2
  158. package/dist/components/p-0b3574c2.js +2 -0
  159. package/dist/components/p-115b9cf3.js +3 -0
  160. package/dist/components/p-115b9cf3.js.map +1 -0
  161. package/dist/components/{p-a63665c2.js → p-2237d3a5.js} +2 -2
  162. package/dist/components/{p-495b793e.js → p-350e060c.js} +2 -2
  163. package/dist/components/{p-de0a517f.js → p-384c7f2a.js} +2 -2
  164. package/dist/components/{p-d7d988d7.js → p-7d808445.js} +2 -2
  165. package/dist/components/{p-454ce5f2.js → p-80dad64b.js} +2 -2
  166. package/dist/components/p-88b2667e.js +2 -0
  167. package/dist/components/p-88b2667e.js.map +1 -0
  168. package/dist/components/{p-080d5d41.js → p-8ee6f2f3.js} +2 -2
  169. package/dist/components/{p-ff5e9e32.js → p-94002301.js} +2 -2
  170. package/dist/components/{p-6a473654.js → p-9992e831.js} +2 -2
  171. package/dist/components/p-bfce6f99.js +2 -0
  172. package/dist/components/p-bfce6f99.js.map +1 -0
  173. package/dist/components/{p-52fcba77.js → p-c67a25ad.js} +2 -2
  174. package/dist/components/p-e8ec030e.js +2 -0
  175. package/dist/components/{p-ceafa242.js.map → p-e8ec030e.js.map} +1 -1
  176. package/dist/components/{p-ab3a34b0.js → p-f4ca9c18.js} +2 -2
  177. package/dist/core/core.esm.js +1 -1
  178. package/dist/core/core.esm.js.map +1 -1
  179. package/dist/core/p-017ff5a5.entry.js +2 -0
  180. package/dist/core/{p-9ee41510.entry.js.map → p-017ff5a5.entry.js.map} +1 -1
  181. package/dist/core/{p-b2c00946.entry.js → p-032accfb.entry.js} +2 -2
  182. package/dist/core/{p-5802e37e.entry.js → p-058e6fe2.entry.js} +2 -2
  183. package/dist/core/{p-b36f84d2.entry.js → p-063b70a2.entry.js} +2 -2
  184. package/dist/core/{p-38287e92.entry.js → p-0724cb6a.entry.js} +2 -2
  185. package/dist/core/p-09c9eba6.entry.js +2 -0
  186. package/dist/core/p-0b3574c2.js +2 -0
  187. package/dist/core/{p-b404f53c.entry.js → p-0c076b21.entry.js} +2 -2
  188. package/dist/core/p-0f0f7302.entry.js +2 -0
  189. package/dist/core/{p-df338d69.entry.js.map → p-0f0f7302.entry.js.map} +1 -1
  190. package/dist/core/p-10f773c2.entry.js +2 -0
  191. package/dist/core/p-14d66f26.entry.js +2 -0
  192. package/dist/core/{p-54d924fc.entry.js.map → p-14d66f26.entry.js.map} +1 -1
  193. package/dist/core/{p-3abf57dc.entry.js → p-1aa7450e.entry.js} +2 -2
  194. package/dist/core/p-237a5b91.entry.js +2 -0
  195. package/dist/core/{p-e6b08d9b.entry.js.map → p-237a5b91.entry.js.map} +1 -1
  196. package/dist/core/p-269071f5.entry.js +2 -0
  197. package/dist/core/{p-2f3228e4.js → p-29ac15d2.js} +2 -2
  198. package/dist/core/p-2ee042d4.js +3 -0
  199. package/dist/core/p-2ee042d4.js.map +1 -0
  200. package/dist/core/{p-8a063925.entry.js → p-33310735.entry.js} +2 -2
  201. package/dist/core/p-347d15d5.entry.js +2 -0
  202. package/dist/core/{p-07b1fa1c.entry.js.map → p-347d15d5.entry.js.map} +1 -1
  203. package/dist/core/{p-8e5f45d0.entry.js → p-37473c34.entry.js} +2 -2
  204. package/dist/core/{p-9514520c.entry.js → p-3849ca02.entry.js} +2 -2
  205. package/dist/core/p-3a7381e7.entry.js +2 -0
  206. package/dist/core/{p-e078dab3.entry.js.map → p-3a7381e7.entry.js.map} +1 -1
  207. package/dist/core/p-43d3dbc0.entry.js +2 -0
  208. package/dist/core/p-45b759f4.entry.js +2 -0
  209. package/dist/core/{p-123d26eb.entry.js.map → p-45b759f4.entry.js.map} +1 -1
  210. package/dist/core/p-4c60e125.entry.js +2 -0
  211. package/dist/core/p-4e29744a.entry.js +2 -0
  212. package/dist/core/{p-402f36af.entry.js.map → p-4e29744a.entry.js.map} +1 -1
  213. package/dist/core/{p-3b8b331f.entry.js → p-4fa0320d.entry.js} +2 -2
  214. package/dist/core/p-50af9ae8.entry.js +2 -0
  215. package/dist/core/{p-4ea79bda.entry.js → p-5c3f4cfe.entry.js} +2 -2
  216. package/dist/core/{p-75ff8ad0.entry.js → p-6b7c3a96.entry.js} +2 -2
  217. package/dist/core/p-71f5d4ff.entry.js +2 -0
  218. package/dist/core/{p-0a49e852.entry.js → p-77daba72.entry.js} +2 -2
  219. package/dist/core/{p-cb76cda0.entry.js → p-7a21fb90.entry.js} +2 -2
  220. package/dist/core/{p-c723877b.entry.js → p-7baee44f.entry.js} +2 -2
  221. package/dist/core/{p-7f7c31e2.entry.js → p-7dfb7e36.entry.js} +2 -2
  222. package/dist/core/{p-9897ac81.entry.js → p-8bb6c816.entry.js} +2 -2
  223. package/dist/core/p-8cc5ad01.entry.js +2 -0
  224. package/dist/core/{p-9410ca28.entry.js.map → p-8cc5ad01.entry.js.map} +1 -1
  225. package/dist/core/p-906865d0.entry.js +2 -0
  226. package/dist/core/{p-9096ac3f.entry.js.map → p-906865d0.entry.js.map} +1 -1
  227. package/dist/core/p-927c31dd.entry.js +2 -0
  228. package/dist/core/{p-2800bec9.entry.js → p-967a1094.entry.js} +2 -2
  229. package/dist/core/{p-1399f929.entry.js → p-9846fd13.entry.js} +2 -2
  230. package/dist/core/{p-87e5b1d0.entry.js → p-994385ca.entry.js} +2 -2
  231. package/dist/core/{p-f35f3261.entry.js → p-9f8d69a9.entry.js} +2 -2
  232. package/dist/core/{p-47d27845.entry.js → p-a6a9de9a.entry.js} +2 -2
  233. package/dist/core/p-b62e49ee.entry.js +2 -0
  234. package/dist/core/p-c0800e6d.entry.js +2 -0
  235. package/dist/core/p-cecbe73f.entry.js +2 -0
  236. package/dist/core/{p-0087a816.entry.js.map → p-cecbe73f.entry.js.map} +1 -1
  237. package/dist/core/p-d795a421.entry.js +2 -0
  238. package/dist/core/{p-80c7db1f.entry.js.map → p-d795a421.entry.js.map} +1 -1
  239. package/dist/core/{p-bf0712e0.entry.js → p-d9b42773.entry.js} +2 -2
  240. package/dist/core/{p-6cf9500c.entry.js → p-e0a199ff.entry.js} +2 -2
  241. package/dist/core/{p-c34dad75.entry.js → p-e215f3ee.entry.js} +2 -2
  242. package/dist/core/p-e8ec030e.js +2 -0
  243. package/dist/core/{p-ceafa242.js.map → p-e8ec030e.js.map} +1 -1
  244. package/dist/core/{p-368aa2f4.entry.js → p-ed02945f.entry.js} +2 -2
  245. package/dist/core/p-ee55932a.entry.js +2 -0
  246. package/dist/core/p-f14252eb.entry.js +2 -0
  247. package/dist/core/p-f14252eb.entry.js.map +1 -0
  248. package/dist/core/{p-f9474bb3.entry.js → p-f2bb8c29.entry.js} +2 -2
  249. package/dist/core/{p-16a3deca.entry.js → p-f54edd6c.entry.js} +2 -2
  250. package/dist/core/p-f7f60f91.entry.js +2 -0
  251. package/dist/core/{p-1043fe0d.entry.js.map → p-f7f60f91.entry.js.map} +1 -1
  252. package/dist/core/{p-fc795b0e.entry.js → p-fcac8531.entry.js} +2 -2
  253. package/dist/esm/core.js +3 -3
  254. package/dist/esm/gov-accordion-item.entry.js +3 -3
  255. package/dist/esm/gov-accordion.entry.js +3 -3
  256. package/dist/esm/gov-attachments_3.entry.js +4 -4
  257. package/dist/esm/gov-backdrop.entry.js +3 -3
  258. package/dist/esm/gov-breadcrumbs.entry.js +3 -3
  259. package/dist/esm/gov-button.entry.js +4 -4
  260. package/dist/esm/gov-card.entry.js +3 -3
  261. package/dist/esm/gov-chip.entry.js +3 -3
  262. package/dist/esm/gov-container.entry.js +1 -1
  263. package/dist/esm/gov-control-group.entry.js +3 -3
  264. package/dist/esm/gov-cookiebar.entry.js +1 -1
  265. package/dist/esm/gov-dialog.entry.js +3 -3
  266. package/dist/esm/gov-dropdown.entry.js +1 -1
  267. package/dist/esm/gov-empty.entry.js +3 -3
  268. package/dist/esm/gov-error-code.entry.js +1 -1
  269. package/dist/esm/gov-flex_3.entry.js +202 -24
  270. package/dist/esm/gov-flex_3.entry.js.map +1 -1
  271. package/dist/esm/gov-form-autocomplete.entry.js +3 -3
  272. package/dist/esm/gov-form-checkbox-group.entry.js +3 -3
  273. package/dist/esm/gov-form-checkbox.entry.js +3 -3
  274. package/dist/esm/gov-form-control.entry.js +1 -1
  275. package/dist/esm/gov-form-file.entry.js +1 -1
  276. package/dist/esm/gov-form-group.entry.js +3 -3
  277. package/dist/esm/gov-form-input_2.entry.js +4 -4
  278. package/dist/esm/gov-form-label.entry.js +1 -1
  279. package/dist/esm/gov-form-multi-select.entry.js +3 -3
  280. package/dist/esm/gov-form-password-power.entry.js +1 -1
  281. package/dist/esm/gov-form-radio-group.entry.js +3 -3
  282. package/dist/esm/gov-form-radio.entry.js +3 -3
  283. package/dist/esm/gov-form-search.entry.js +1 -1
  284. package/dist/esm/gov-form-select.entry.js +3 -3
  285. package/dist/esm/gov-form-switch.entry.js +3 -3
  286. package/dist/esm/gov-grid-item.entry.js +1 -1
  287. package/dist/esm/gov-grid.entry.js +1 -1
  288. package/dist/esm/gov-infobar.entry.js +5 -5
  289. package/dist/esm/gov-layout-column.entry.js +2 -2
  290. package/dist/esm/gov-layout.entry.js +2 -2
  291. package/dist/esm/gov-lifecycle.entry.js +2 -2
  292. package/dist/esm/gov-link.entry.js +4 -4
  293. package/dist/esm/gov-loading.entry.js +4 -4
  294. package/dist/esm/gov-message.entry.js +4 -4
  295. package/dist/esm/gov-pagination.entry.js +3 -3
  296. package/dist/esm/gov-spacer.entry.js +4 -4
  297. package/dist/esm/gov-stepper-item.entry.js +4 -4
  298. package/dist/esm/gov-stepper.entry.js +4 -4
  299. package/dist/esm/gov-tabs-item.entry.js +2 -2
  300. package/dist/esm/gov-tabs.entry.js +4 -4
  301. package/dist/esm/gov-tag.entry.js +4 -4
  302. package/dist/esm/gov-tile.entry.js +2 -2
  303. package/dist/esm/gov-tiles.entry.js +2 -2
  304. package/dist/esm/gov-toast.entry.js +4 -4
  305. package/dist/esm/gov-tooltip-content.entry.js +2 -2
  306. package/dist/esm/gov-tooltip.entry.js +5 -5
  307. package/dist/esm/gov-wizard-item.entry.js +5 -5
  308. package/dist/esm/gov-wizard.entry.js +5 -5
  309. package/dist/esm/{gov.log-55c240b2.js → gov.log-6b64cda6.js} +4 -2
  310. package/dist/esm/gov.log-6b64cda6.js.map +1 -0
  311. package/dist/esm/{index-bf8a6f64.js → index-087b155c.js} +14 -2
  312. package/dist/esm/index-087b155c.js.map +1 -0
  313. package/dist/esm/loader.js +3 -3
  314. package/dist/esm/{props-c54f7897.js → props-9d3c7ac1.js} +2 -2
  315. package/dist/esm/{props-c54f7897.js.map → props-9d3c7ac1.js.map} +1 -1
  316. package/dist/esm/{wcag-1a5ae5e3.js → wcag-253a4421.js} +2 -2
  317. package/dist/esm/{wcag-1a5ae5e3.js.map → wcag-253a4421.js.map} +1 -1
  318. package/dist/hydrate/index.js +240 -55
  319. package/dist/hydrate/index.mjs +240 -55
  320. package/dist/types/components/gov-icon/gov-icon.d.ts +32 -0
  321. package/dist/types/components.d.ts +34 -0
  322. package/package.json +1 -1
  323. package/dist/cjs/gov.log-21ea2c96.js.map +0 -1
  324. package/dist/cjs/index-0e4f24f9.js.map +0 -1
  325. package/dist/components/p-16e68a91.js +0 -2
  326. package/dist/components/p-16e68a91.js.map +0 -1
  327. package/dist/components/p-42200001.js +0 -3
  328. package/dist/components/p-42200001.js.map +0 -1
  329. package/dist/components/p-ceafa242.js +0 -2
  330. package/dist/components/p-d8135701.js +0 -2
  331. package/dist/core/p-0087a816.entry.js +0 -2
  332. package/dist/core/p-07b1fa1c.entry.js +0 -2
  333. package/dist/core/p-1043fe0d.entry.js +0 -2
  334. package/dist/core/p-123d26eb.entry.js +0 -2
  335. package/dist/core/p-1d5cc2b1.entry.js +0 -2
  336. package/dist/core/p-200a0be4.entry.js +0 -2
  337. package/dist/core/p-26726401.entry.js +0 -2
  338. package/dist/core/p-2b62c4ee.entry.js +0 -2
  339. package/dist/core/p-2f693f59.entry.js +0 -2
  340. package/dist/core/p-402f36af.entry.js +0 -2
  341. package/dist/core/p-54d924fc.entry.js +0 -2
  342. package/dist/core/p-80c7db1f.entry.js +0 -2
  343. package/dist/core/p-8f21a858.entry.js +0 -2
  344. package/dist/core/p-9096ac3f.entry.js +0 -2
  345. package/dist/core/p-93b747c1.entry.js +0 -2
  346. package/dist/core/p-9410ca28.entry.js +0 -2
  347. package/dist/core/p-9dea2efa.js +0 -3
  348. package/dist/core/p-9dea2efa.js.map +0 -1
  349. package/dist/core/p-9ee41510.entry.js +0 -2
  350. package/dist/core/p-b480cda1.entry.js +0 -2
  351. package/dist/core/p-c742b08e.entry.js +0 -2
  352. package/dist/core/p-ceafa242.js +0 -2
  353. package/dist/core/p-d8135701.js +0 -2
  354. package/dist/core/p-df338d69.entry.js +0 -2
  355. package/dist/core/p-e078dab3.entry.js +0 -2
  356. package/dist/core/p-e6b08d9b.entry.js +0 -2
  357. package/dist/core/p-fe5030a6.entry.js +0 -2
  358. package/dist/core/p-fe9ca9e6.entry.js +0 -2
  359. package/dist/core/p-ff03dcd3.entry.js +0 -2
  360. package/dist/core/p-ff03dcd3.entry.js.map +0 -1
  361. package/dist/esm/gov.log-55c240b2.js.map +0 -1
  362. package/dist/esm/index-bf8a6f64.js.map +0 -1
  363. /package/dist/components/{p-56399a9b.js.map → p-03ad4e0f.js.map} +0 -0
  364. /package/dist/components/{p-d8135701.js.map → p-0b3574c2.js.map} +0 -0
  365. /package/dist/components/{p-a63665c2.js.map → p-2237d3a5.js.map} +0 -0
  366. /package/dist/components/{p-495b793e.js.map → p-350e060c.js.map} +0 -0
  367. /package/dist/components/{p-de0a517f.js.map → p-384c7f2a.js.map} +0 -0
  368. /package/dist/components/{p-d7d988d7.js.map → p-7d808445.js.map} +0 -0
  369. /package/dist/components/{p-454ce5f2.js.map → p-80dad64b.js.map} +0 -0
  370. /package/dist/components/{p-080d5d41.js.map → p-8ee6f2f3.js.map} +0 -0
  371. /package/dist/components/{p-ff5e9e32.js.map → p-94002301.js.map} +0 -0
  372. /package/dist/components/{p-6a473654.js.map → p-9992e831.js.map} +0 -0
  373. /package/dist/components/{p-52fcba77.js.map → p-c67a25ad.js.map} +0 -0
  374. /package/dist/components/{p-ab3a34b0.js.map → p-f4ca9c18.js.map} +0 -0
  375. /package/dist/core/{p-b2c00946.entry.js.map → p-032accfb.entry.js.map} +0 -0
  376. /package/dist/core/{p-5802e37e.entry.js.map → p-058e6fe2.entry.js.map} +0 -0
  377. /package/dist/core/{p-b36f84d2.entry.js.map → p-063b70a2.entry.js.map} +0 -0
  378. /package/dist/core/{p-38287e92.entry.js.map → p-0724cb6a.entry.js.map} +0 -0
  379. /package/dist/core/{p-2b62c4ee.entry.js.map → p-09c9eba6.entry.js.map} +0 -0
  380. /package/dist/core/{p-d8135701.js.map → p-0b3574c2.js.map} +0 -0
  381. /package/dist/core/{p-b404f53c.entry.js.map → p-0c076b21.entry.js.map} +0 -0
  382. /package/dist/core/{p-1d5cc2b1.entry.js.map → p-10f773c2.entry.js.map} +0 -0
  383. /package/dist/core/{p-3abf57dc.entry.js.map → p-1aa7450e.entry.js.map} +0 -0
  384. /package/dist/core/{p-26726401.entry.js.map → p-269071f5.entry.js.map} +0 -0
  385. /package/dist/core/{p-2f3228e4.js.map → p-29ac15d2.js.map} +0 -0
  386. /package/dist/core/{p-8a063925.entry.js.map → p-33310735.entry.js.map} +0 -0
  387. /package/dist/core/{p-8e5f45d0.entry.js.map → p-37473c34.entry.js.map} +0 -0
  388. /package/dist/core/{p-9514520c.entry.js.map → p-3849ca02.entry.js.map} +0 -0
  389. /package/dist/core/{p-93b747c1.entry.js.map → p-43d3dbc0.entry.js.map} +0 -0
  390. /package/dist/core/{p-fe9ca9e6.entry.js.map → p-4c60e125.entry.js.map} +0 -0
  391. /package/dist/core/{p-3b8b331f.entry.js.map → p-4fa0320d.entry.js.map} +0 -0
  392. /package/dist/core/{p-200a0be4.entry.js.map → p-50af9ae8.entry.js.map} +0 -0
  393. /package/dist/core/{p-4ea79bda.entry.js.map → p-5c3f4cfe.entry.js.map} +0 -0
  394. /package/dist/core/{p-75ff8ad0.entry.js.map → p-6b7c3a96.entry.js.map} +0 -0
  395. /package/dist/core/{p-8f21a858.entry.js.map → p-71f5d4ff.entry.js.map} +0 -0
  396. /package/dist/core/{p-0a49e852.entry.js.map → p-77daba72.entry.js.map} +0 -0
  397. /package/dist/core/{p-cb76cda0.entry.js.map → p-7a21fb90.entry.js.map} +0 -0
  398. /package/dist/core/{p-c723877b.entry.js.map → p-7baee44f.entry.js.map} +0 -0
  399. /package/dist/core/{p-7f7c31e2.entry.js.map → p-7dfb7e36.entry.js.map} +0 -0
  400. /package/dist/core/{p-9897ac81.entry.js.map → p-8bb6c816.entry.js.map} +0 -0
  401. /package/dist/core/{p-fe5030a6.entry.js.map → p-927c31dd.entry.js.map} +0 -0
  402. /package/dist/core/{p-2800bec9.entry.js.map → p-967a1094.entry.js.map} +0 -0
  403. /package/dist/core/{p-1399f929.entry.js.map → p-9846fd13.entry.js.map} +0 -0
  404. /package/dist/core/{p-87e5b1d0.entry.js.map → p-994385ca.entry.js.map} +0 -0
  405. /package/dist/core/{p-f35f3261.entry.js.map → p-9f8d69a9.entry.js.map} +0 -0
  406. /package/dist/core/{p-47d27845.entry.js.map → p-a6a9de9a.entry.js.map} +0 -0
  407. /package/dist/core/{p-c742b08e.entry.js.map → p-b62e49ee.entry.js.map} +0 -0
  408. /package/dist/core/{p-2f693f59.entry.js.map → p-c0800e6d.entry.js.map} +0 -0
  409. /package/dist/core/{p-bf0712e0.entry.js.map → p-d9b42773.entry.js.map} +0 -0
  410. /package/dist/core/{p-6cf9500c.entry.js.map → p-e0a199ff.entry.js.map} +0 -0
  411. /package/dist/core/{p-c34dad75.entry.js.map → p-e215f3ee.entry.js.map} +0 -0
  412. /package/dist/core/{p-368aa2f4.entry.js.map → p-ed02945f.entry.js.map} +0 -0
  413. /package/dist/core/{p-b480cda1.entry.js.map → p-ee55932a.entry.js.map} +0 -0
  414. /package/dist/core/{p-f9474bb3.entry.js.map → p-f2bb8c29.entry.js.map} +0 -0
  415. /package/dist/core/{p-16a3deca.entry.js.map → p-f54edd6c.entry.js.map} +0 -0
  416. /package/dist/core/{p-fc795b0e.entry.js.map → p-fcac8531.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{G as o,d as s}from"./p-ff5e9e32.js";const t=o;const e=s;export{t as GovFormAutocomplete,e as defineCustomElement};
1
+ import{G as o,d as s}from"./p-94002301.js";const t=o;const p=s;export{t as GovFormAutocomplete,p as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-autocomplete.js.map
@@ -1,2 +1,2 @@
1
- import{p as o,H as r,c as a,h as g,d as e}from"./p-42200001.js";import{F as t,a as i,b as p,c as n}from"./p-e44a0fee.js";import{g as m}from"./p-ea7fdd2e.js";import{v as l}from"./p-d8135701.js";import{t as s}from"./p-26618322.js";import{p as f}from"./p-ded281e6.js";const v="gov-form-group,.gov-form-group,gov-form-radio-group,.gov-form-radio-group,gov-form-checkbox-group,.gov-form-checkbox-group{margin-top:0;margin-bottom:0;position:relative;display:flex;width:100%;flex-direction:column;align-items:flex-start}gov-form-group .gov-form-label__label,.gov-form-group .gov-form-label__label,gov-form-radio-group .gov-form-label__label,.gov-form-radio-group .gov-form-label__label,gov-form-checkbox-group .gov-form-label__label,.gov-form-checkbox-group .gov-form-label__label{margin:0}gov-form-group[orientation=horizontal],.gov-form-group[orientation=horizontal],gov-form-radio-group[orientation=horizontal],.gov-form-radio-group[orientation=horizontal],gov-form-checkbox-group[orientation=horizontal],.gov-form-checkbox-group[orientation=horizontal]{flex-direction:row;flex-wrap:wrap}gov-form-group[orientation=horizontal] .gov-form-label__label,.gov-form-group[orientation=horizontal] .gov-form-label__label,gov-form-radio-group[orientation=horizontal] .gov-form-label__label,.gov-form-radio-group[orientation=horizontal] .gov-form-label__label,gov-form-checkbox-group[orientation=horizontal] .gov-form-label__label,.gov-form-checkbox-group[orientation=horizontal] .gov-form-label__label{white-space:nowrap}gov-form-group[gap=xs],.gov-form-group[gap=xs],gov-form-radio-group[gap=xs],.gov-form-radio-group[gap=xs],gov-form-checkbox-group[gap=xs],.gov-form-checkbox-group[gap=xs]{gap:var(--gap, var(--spacing-xs-nudge))}gov-form-group[gap=s],.gov-form-group[gap=s],gov-form-radio-group[gap=s],.gov-form-radio-group[gap=s],gov-form-checkbox-group[gap=s],.gov-form-checkbox-group[gap=s]{gap:var(--gap, var(--spacing-s))}gov-form-group[gap=m],.gov-form-group[gap=m],gov-form-radio-group[gap=m],.gov-form-radio-group[gap=m],gov-form-checkbox-group[gap=m],.gov-form-checkbox-group[gap=m]{gap:var(--gap, var(--spacing-s-nudge))}gov-form-group[gap=l],.gov-form-group[gap=l],gov-form-radio-group[gap=l],.gov-form-radio-group[gap=l],gov-form-checkbox-group[gap=l],.gov-form-checkbox-group[gap=l]{gap:var(--gap, var(--spacing-m))}gov-form-group[gap=xl],.gov-form-group[gap=xl],gov-form-radio-group[gap=xl],.gov-form-radio-group[gap=xl],gov-form-checkbox-group[gap=xl],.gov-form-checkbox-group[gap=xl]{gap:var(--gap, var(--spacing-m-nudge))}";const c=v;const u=o(class o extends r{constructor(){super();this.__registerHost();this.govChange=a(this,"gov-change",7);this.handleChange=o=>{var r;o.stopPropagation();const a=f(this.value);if(!Array.isArray(a))return;if(o.detail.checked){this.value=[...a,o.detail.value]}else{this.value=(r=a.filter((r=>r!==o.detail.value)))!==null&&r!==void 0?r:[]}this.govChange.emit({value:this.value,component:t.root})};this.gap=undefined;this.orientation="vertical";this.value=undefined;this.h=m(this.host)}validateGap(o){if(o){l(p,o,i.root)}}validateOrientation(o){if(o){l(n,o,i.root)}}componentWillLoad(){this.validateGap(this.gap);this.validateOrientation(this.orientation);this.value=f(this.value)}componentDidRender(){s((()=>this.rerenderComponent()))}rerenderComponent(){this.host.querySelectorAll("gov-form-checkbox").forEach((o=>{if(!o.hasAttribute("listener-attached")){o.addEventListener("gov-change",this.handleChange)}o.setAttribute("listener-attached","true");o.checked=this.value.includes(o.value)}))}render(){return g(e,{key:"7f71876a9b72b688bb354a1477153bd8d1b5ad05",gap:this.gap,class:this.h.classes(i.root),value:this.value},g("slot",{key:"2b3ce2b04ab3a2e55128a6d8c00a1d41217061f6"}))}get host(){return this}static get watchers(){return{gap:["validateGap"],orientation:["validateOrientation"]}}static get style(){return c}},[4,"gov-form-checkbox-group",{gap:[1],orientation:[1],value:[1025]},undefined,{gap:["validateGap"],orientation:["validateOrientation"]}]);function h(){if(typeof customElements==="undefined"){return}const o=["gov-form-checkbox-group"];o.forEach((o=>{switch(o){case"gov-form-checkbox-group":if(!customElements.get(o)){customElements.define(o,u)}break}}))}h();const d=u;const b=h;export{d as GovFormCheckboxGroup,b as defineCustomElement};
1
+ import{p as o,H as r,c as a,h as g,d as e}from"./p-115b9cf3.js";import{F as t,a as i,b as p,c as n}from"./p-e44a0fee.js";import{g as m}from"./p-ea7fdd2e.js";import{v as l}from"./p-0b3574c2.js";import{t as s}from"./p-26618322.js";import{p as f}from"./p-ded281e6.js";const v="gov-form-group,.gov-form-group,gov-form-radio-group,.gov-form-radio-group,gov-form-checkbox-group,.gov-form-checkbox-group{margin-top:0;margin-bottom:0;position:relative;display:flex;width:100%;flex-direction:column;align-items:flex-start}gov-form-group .gov-form-label__label,.gov-form-group .gov-form-label__label,gov-form-radio-group .gov-form-label__label,.gov-form-radio-group .gov-form-label__label,gov-form-checkbox-group .gov-form-label__label,.gov-form-checkbox-group .gov-form-label__label{margin:0}gov-form-group[orientation=horizontal],.gov-form-group[orientation=horizontal],gov-form-radio-group[orientation=horizontal],.gov-form-radio-group[orientation=horizontal],gov-form-checkbox-group[orientation=horizontal],.gov-form-checkbox-group[orientation=horizontal]{flex-direction:row;flex-wrap:wrap}gov-form-group[orientation=horizontal] .gov-form-label__label,.gov-form-group[orientation=horizontal] .gov-form-label__label,gov-form-radio-group[orientation=horizontal] .gov-form-label__label,.gov-form-radio-group[orientation=horizontal] .gov-form-label__label,gov-form-checkbox-group[orientation=horizontal] .gov-form-label__label,.gov-form-checkbox-group[orientation=horizontal] .gov-form-label__label{white-space:nowrap}gov-form-group[gap=xs],.gov-form-group[gap=xs],gov-form-radio-group[gap=xs],.gov-form-radio-group[gap=xs],gov-form-checkbox-group[gap=xs],.gov-form-checkbox-group[gap=xs]{gap:var(--gap, var(--spacing-xs-nudge))}gov-form-group[gap=s],.gov-form-group[gap=s],gov-form-radio-group[gap=s],.gov-form-radio-group[gap=s],gov-form-checkbox-group[gap=s],.gov-form-checkbox-group[gap=s]{gap:var(--gap, var(--spacing-s))}gov-form-group[gap=m],.gov-form-group[gap=m],gov-form-radio-group[gap=m],.gov-form-radio-group[gap=m],gov-form-checkbox-group[gap=m],.gov-form-checkbox-group[gap=m]{gap:var(--gap, var(--spacing-s-nudge))}gov-form-group[gap=l],.gov-form-group[gap=l],gov-form-radio-group[gap=l],.gov-form-radio-group[gap=l],gov-form-checkbox-group[gap=l],.gov-form-checkbox-group[gap=l]{gap:var(--gap, var(--spacing-m))}gov-form-group[gap=xl],.gov-form-group[gap=xl],gov-form-radio-group[gap=xl],.gov-form-radio-group[gap=xl],gov-form-checkbox-group[gap=xl],.gov-form-checkbox-group[gap=xl]{gap:var(--gap, var(--spacing-m-nudge))}";const c=v;const u=o(class o extends r{constructor(){super();this.__registerHost();this.govChange=a(this,"gov-change",7);this.handleChange=o=>{var r;o.stopPropagation();const a=f(this.value);if(!Array.isArray(a))return;if(o.detail.checked){this.value=[...a,o.detail.value]}else{this.value=(r=a.filter((r=>r!==o.detail.value)))!==null&&r!==void 0?r:[]}this.govChange.emit({value:this.value,component:t.root})};this.gap=undefined;this.orientation="vertical";this.value=undefined;this.h=m(this.host)}validateGap(o){if(o){l(p,o,i.root)}}validateOrientation(o){if(o){l(n,o,i.root)}}componentWillLoad(){this.validateGap(this.gap);this.validateOrientation(this.orientation);this.value=f(this.value)}componentDidRender(){s((()=>this.rerenderComponent()))}rerenderComponent(){this.host.querySelectorAll("gov-form-checkbox").forEach((o=>{if(!o.hasAttribute("listener-attached")){o.addEventListener("gov-change",this.handleChange)}o.setAttribute("listener-attached","true");o.checked=this.value.includes(o.value)}))}render(){return g(e,{key:"7f71876a9b72b688bb354a1477153bd8d1b5ad05",gap:this.gap,class:this.h.classes(i.root),value:this.value},g("slot",{key:"2b3ce2b04ab3a2e55128a6d8c00a1d41217061f6"}))}get host(){return this}static get watchers(){return{gap:["validateGap"],orientation:["validateOrientation"]}}static get style(){return c}},[4,"gov-form-checkbox-group",{gap:[1],orientation:[1],value:[1025]},undefined,{gap:["validateGap"],orientation:["validateOrientation"]}]);function h(){if(typeof customElements==="undefined"){return}const o=["gov-form-checkbox-group"];o.forEach((o=>{switch(o){case"gov-form-checkbox-group":if(!customElements.get(o)){customElements.define(o,u)}break}}))}h();const b=u;const d=h;export{b as GovFormCheckboxGroup,d as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-checkbox-group.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,c as i,h as e,d as h}from"./p-42200001.js";import{c as n}from"./p-cd6c2938.js";import{v as a}from"./p-d8135701.js";import{g as o,d as r,e as c}from"./p-9908b9f0.js";import{g as d,c as l,t as m}from"./p-ea7fdd2e.js";import{F as u}from"./p-1c1d0bbe.js";import{i as f,A as p,a as b}from"./p-33d5d1ed.js";import{d as v}from"./p-16e68a91.js";const g=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govChange=i(this,"gov-change",7);this.hydrated=false;this.value=undefined;this.checked=false;this.required=false;this.disabled=false;this.indeterminate=false;this.name=undefined;this.size="m";this.identifier=undefined;this.noLabel=false;this.invalid=undefined;this.inheritedAttributes={};this.checkboxId=n("GovCheckbox");this.h=d(this.host);this.f=o(this.h)}validateSize(t){a(c,t,r.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("disabled",l(this.disabled));this.f.passAttrToControl("invalid",l(this.invalid));this.f.passAttrToControl("type","checkbox")}componentWillLoad(){this.passControlAttrs();this.inheritedAttributes=f(this.host)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(b)}async componentDidRender(){this.f.passAttrToLabel("identifier",this.identifier||this.checkboxId);this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs()}connectedCallback(){this.hydrated=true}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){const t=t=>{if(this.noLabel){return e("label",{class:r.label},t)}return t};return e(h,{class:r.root,hydrated:this.hydrated,checked:this.checked,size:this.size,invalid:m(this.invalid)},t(e(u,null,e("input",Object.assign({id:this.identifier||this.checkboxId,type:"checkbox",value:this.value,name:this.name,checked:this.checked,onClick:this.onClickHandler.bind(this),onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled,indeterminate:this.indeterminate,ref:t=>this.inputRef=t},this.inheritedAttributes,{"aria-checked":l(this.checked),"aria-required":m(this.required),"aria-invalid":m(this.invalid),"aria-disabled":m(this.disabled)})),e("span",null,e("slot",{name:"label"}),e("gov-icon",{class:r.check,name:"check-lg",type:"components"}),e("gov-icon",{class:r.indeterminate,name:"dash-lg",type:"components"})))))}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}onClickHandler(t){t.stopPropagation()}onChangeHandler(t){this.checked=t.target.checked;t.stopPropagation();this.govChange.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}async getRef(){return this.inputRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}},[4,"gov-form-checkbox",{value:[1],checked:[1540],required:[4],disabled:[516],indeterminate:[516],name:[1],size:[513],identifier:[1],noLabel:[4,"no-label"],invalid:[4],inheritedAttributes:[32],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}]);function k(){if(typeof customElements==="undefined"){return}const t=["gov-form-checkbox","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-checkbox":if(!customElements.get(t)){customElements.define(t,g)}break;case"gov-icon":if(!customElements.get(t)){v()}break}}))}k();const C=g;const A=k;export{C as GovFormCheckbox,A as defineCustomElement};
1
+ import{p as t,H as s,c as i,h as e,d as h}from"./p-115b9cf3.js";import{c as n}from"./p-cd6c2938.js";import{v as o}from"./p-0b3574c2.js";import{g as a,d as c,e as r}from"./p-9908b9f0.js";import{g as d,c as l,t as m}from"./p-ea7fdd2e.js";import{F as u}from"./p-1c1d0bbe.js";import{i as f,A as p,a as b}from"./p-33d5d1ed.js";import{d as v}from"./p-88b2667e.js";const g=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govChange=i(this,"gov-change",7);this.hydrated=false;this.value=undefined;this.checked=false;this.required=false;this.disabled=false;this.indeterminate=false;this.name=undefined;this.size="m";this.identifier=undefined;this.noLabel=false;this.invalid=undefined;this.inheritedAttributes={};this.checkboxId=n("GovCheckbox");this.h=d(this.host);this.f=a(this.h)}validateSize(t){o(r,t,c.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("disabled",l(this.disabled));this.f.passAttrToControl("invalid",l(this.invalid));this.f.passAttrToControl("type","checkbox")}componentWillLoad(){this.passControlAttrs();this.inheritedAttributes=f(this.host)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(b)}async componentDidRender(){this.f.passAttrToLabel("identifier",this.identifier||this.checkboxId);this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs()}connectedCallback(){this.hydrated=true}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){const t=t=>{if(this.noLabel){return e("label",{class:c.label},t)}return t};return e(h,{class:c.root,hydrated:this.hydrated,checked:this.checked,size:this.size,invalid:m(this.invalid)},t(e(u,null,e("input",Object.assign({id:this.identifier||this.checkboxId,type:"checkbox",value:this.value,name:this.name,checked:this.checked,onClick:this.onClickHandler.bind(this),onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled,indeterminate:this.indeterminate,ref:t=>this.inputRef=t},this.inheritedAttributes,{"aria-checked":l(this.checked),"aria-required":m(this.required),"aria-invalid":m(this.invalid),"aria-disabled":m(this.disabled)})),e("span",null,e("slot",{name:"label"}),e("gov-icon",{class:c.check,name:"check-lg",type:"components"}),e("gov-icon",{class:c.indeterminate,name:"dash-lg",type:"components"})))))}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:c.root,value:this.value,checked:this.checked,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:c.root,value:this.value,checked:this.checked,originalEvent:t})}onClickHandler(t){t.stopPropagation()}onChangeHandler(t){this.checked=t.target.checked;t.stopPropagation();this.govChange.emit({component:c.root,value:this.value,checked:this.checked,originalEvent:t})}async getRef(){return this.inputRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}},[4,"gov-form-checkbox",{value:[1],checked:[1540],required:[4],disabled:[516],indeterminate:[516],name:[1],size:[513],identifier:[1],noLabel:[4,"no-label"],invalid:[4],inheritedAttributes:[32],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}]);function k(){if(typeof customElements==="undefined"){return}const t=["gov-form-checkbox","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-checkbox":if(!customElements.get(t)){customElements.define(t,g)}break;case"gov-icon":if(!customElements.get(t)){v()}break}}))}k();const C=g;const A=k;export{C as GovFormCheckbox,A as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-checkbox.js.map
@@ -1,2 +1,2 @@
1
- import{p as s,H as e,h as t,d as i}from"./p-42200001.js";import{g as o,f as c}from"./p-9908b9f0.js";import{g as r}from"./p-ea7fdd2e.js";import{s as a}from"./p-cd6c2938.js";const d=s(class s extends e{constructor(){super();this.__registerHost();this.identifier=undefined;this.invalid=false;this.disabled=false;this.success=false;this.fieldset=false;this.size="m";this.h=r(this.host);this.f=o(this.h)}componentDidRender(){this.syncControlMessages();this.formElementDescriptionControl()}disconnectedCallback(){var s;(s=this.observer)===null||s===void 0?void 0:s.disconnect()}formElementDescriptionControl(){const s=this.host.querySelector("."+c.bottom);if(!s)return;this.observer=new MutationObserver(function(){this.syncControlMessages()}.bind(this));this.observer.observe(s,{childList:true})}syncControlMessages(){Promise.all(this.f.messageElements.map((s=>s.identifier()))).then((s=>{this.f.mainElementsInControl.forEach((e=>{const t=a(e.getAttribute("aria-describedby"));e.removeAttribute("aria-describedby");if(Array.isArray(t)){t.forEach((e=>e.indexOf("GovFormMessage")===-1?s.push(e):null))}if(s.length){e.setAttribute("aria-describedby",s.join(" "))}}))}))}render(){const s=this.fieldset?"fieldset":"div";return t(i,{key:"ca3d81a16858cbe4b2c06580cb2e9523a77191be",size:this.size,class:this.h.classes(c.root)},t(s,{key:"4b2bdfbc3c227b910660596d5815c70ef8fa22dd",class:c.holder},this.h.hasSlot("top")&&t("slot",{key:"21e1b5d8e989e6e4ecf9795a2d9d3ccd6dc29543",name:"top"}),t("slot",{key:"d2acefce44c05404f9d1ce224f7f259361423d82"}),this.h.hasSlot("bottom")&&t("div",{key:"e5c095ee40f41623e9f6a871e29724be42a8be8f",class:c.bottom},t("slot",{key:"941873ca1268fca177d3ff92b10a205dea0faad3",name:"bottom"}))))}get host(){return this}},[4,"gov-form-control",{identifier:[1],invalid:[516],disabled:[516],success:[516],fieldset:[4],size:[1]}]);function n(){if(typeof customElements==="undefined"){return}const s=["gov-form-control"];s.forEach((s=>{switch(s){case"gov-form-control":if(!customElements.get(s)){customElements.define(s,d)}break}}))}n();const f=d;const l=n;export{f as GovFormControl,l as defineCustomElement};
1
+ import{p as s,H as e,h as t,d as i}from"./p-115b9cf3.js";import{g as o,f as c}from"./p-9908b9f0.js";import{g as r}from"./p-ea7fdd2e.js";import{s as a}from"./p-cd6c2938.js";const d=s(class s extends e{constructor(){super();this.__registerHost();this.identifier=undefined;this.invalid=false;this.disabled=false;this.success=false;this.fieldset=false;this.size="m";this.h=r(this.host);this.f=o(this.h)}componentDidRender(){this.syncControlMessages();this.formElementDescriptionControl()}disconnectedCallback(){var s;(s=this.observer)===null||s===void 0?void 0:s.disconnect()}formElementDescriptionControl(){const s=this.host.querySelector("."+c.bottom);if(!s)return;this.observer=new MutationObserver(function(){this.syncControlMessages()}.bind(this));this.observer.observe(s,{childList:true})}syncControlMessages(){Promise.all(this.f.messageElements.map((s=>s.identifier()))).then((s=>{this.f.mainElementsInControl.forEach((e=>{const t=a(e.getAttribute("aria-describedby"));e.removeAttribute("aria-describedby");if(Array.isArray(t)){t.forEach((e=>e.indexOf("GovFormMessage")===-1?s.push(e):null))}if(s.length){e.setAttribute("aria-describedby",s.join(" "))}}))}))}render(){const s=this.fieldset?"fieldset":"div";return t(i,{key:"ca3d81a16858cbe4b2c06580cb2e9523a77191be",size:this.size,class:this.h.classes(c.root)},t(s,{key:"4b2bdfbc3c227b910660596d5815c70ef8fa22dd",class:c.holder},this.h.hasSlot("top")&&t("slot",{key:"21e1b5d8e989e6e4ecf9795a2d9d3ccd6dc29543",name:"top"}),t("slot",{key:"d2acefce44c05404f9d1ce224f7f259361423d82"}),this.h.hasSlot("bottom")&&t("div",{key:"e5c095ee40f41623e9f6a871e29724be42a8be8f",class:c.bottom},t("slot",{key:"941873ca1268fca177d3ff92b10a205dea0faad3",name:"bottom"}))))}get host(){return this}},[4,"gov-form-control",{identifier:[1],invalid:[516],disabled:[516],success:[516],fieldset:[4],size:[1]}]);function n(){if(typeof customElements==="undefined"){return}const s=["gov-form-control"];s.forEach((s=>{switch(s){case"gov-form-control":if(!customElements.get(s)){customElements.define(s,d)}break}}))}n();const f=d;const l=n;export{f as GovFormControl,l as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-control.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,c as s,h as i,d as o}from"./p-42200001.js";import{c as a}from"./p-cd6c2938.js";import{g as n,c as r,t as h}from"./p-ea7fdd2e.js";import{g as l}from"./p-9908b9f0.js";import{A as c,a as f,i as d}from"./p-33d5d1ed.js";import{d as m}from"./p-56399a9b.js";import{d as u}from"./p-ab3a34b0.js";import{d as p}from"./p-6a473654.js";import{d as g}from"./p-080d5d41.js";import{d as v}from"./p-16e68a91.js";const b={root:"gov-form-file",area:"gov-form-file__area",input:"gov-form-file__input",attachments:"gov-form-file__attachments"};function y(t){const e=["bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let s=0,i=parseInt(t,10)||0;while(i>=1024&&++s){i=i/1024}return i.toFixed(i<10&&s>0?1:0)+" "+e[s]}function E(t,e){if(typeof e==="string"&&e.length){return e.replace(/\s/g,"").split(",").filter((e=>new RegExp(e.replace("*",".*")).test(t.type))).length>0}else{return true}}function A(t,e){const s=Math.round(t.size);return s<=e}const k=t(class t extends e{constructor(){super();this.__registerHost();this.govFocus=s(this,"gov-focus",7);this.govBlur=s(this,"gov-blur",7);this.govFiles=s(this,"gov-files",7);this.govAddFile=s(this,"gov-add-file",7);this.govRemoveFile=s(this,"gov-remove-file",7);this.eventsRegistered=false;this.expanded=false;this.required=false;this.disabled=false;this.resetAfterPick=false;this.ignoreFileDuplicationCheck=false;this.displayAttachments=true;this.name=undefined;this.accept=undefined;this.multiple=false;this.maxFileSize=-1;this.identifier=undefined;this.invalid=undefined;this.errorSize="Soubor je větší než povolená velikost {FILE_SIZE}";this.errorAccept="Soubor tohoto typu není povolen";this.accessibleRemoveLabel="Odebrat soubor {FILE_NAME}";this.accessibleAttachmentsLabel="Přílohy";this.files=[];this.inheritedAttributes={};this.fileId=a("GovInputFile");this.h=n(this.host);this.f=l(this.h)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("invalid",r(this.invalid));this.f.passAttrToControl("disabled",r(this.disabled));this.f.passAttrToControl("type","File")}registerListeners(){if(this.eventsRegistered){return}this.eventsRegistered=true;function t(){this.areaRef.classList.add("highlight")}function e(){this.areaRef.classList.remove("highlight")}this.inputRef.addEventListener("change",(t=>{t.preventDefault();t.stopPropagation();const e=t.target.files;if(this.resetAfterPick){if(e.length){this.validateFiles(e)}}else{this.validateFiles(e)}}),false);if(this.expanded){const s=["dragover","dragleave"];const i=["dragenter","dragover","mouseenter"];const o=["dragleave","mouseleave"];s.map((t=>this.inputRef.addEventListener(t,this.preventDefaults.bind(this),false)));i.map((e=>this.inputRef.addEventListener(e,t.bind(this),false)));o.forEach((t=>this.inputRef.addEventListener(t,e.bind(this),false)))}}preventDefaults(t){t.preventDefault();t.stopPropagation()}handleDrop(t){const e=t.dataTransfer;this.validateFiles(e.files)}validateFiles(t){let e=[];Array.from(t).map((t=>{const s=this.files.find((e=>e.file.name===t.name&&e.file.size===t.size))||null;if(s===null||this.ignoreFileDuplicationCheck){const s=typeof this.maxFileSize==="number"&&this.maxFileSize>0?A(t,this.maxFileSize):true;const i=E(t,this.accept);const o={id:a("GovFormFile"),file:t,acceptValid:i,sizeValid:s};if(this.displayAttachments){this.files=[...this.files,o]}else{e=[...e,o]}this.govAddFile.emit({component:b.root,file:o})}}));this.govFiles.emit({component:b.root,files:e.length?e:this.files});if(this.resetAfterPick){this.reset().finally()}}componentDidLoad(){this.attributeObserver=new c(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(f)}componentWillLoad(){this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs();this.inheritedAttributes=d(this.host)}async componentDidRender(){this.registerListeners()}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}render(){return i(o,{key:"92ee90aa5d8d28d310c0229ce513be88edafd68d",class:this.h.classes([b.root]),invalid:h(this.invalid),expanded:h(this.expanded)},i("div",{key:"ada51c64168a7cb4dcb4f123e7f74fe401b63c82",class:b.area,ref:t=>this.areaRef=t},i("slot",{key:"77a4e7096f1949c8c284b0d6607ffd96567669ef"}),i("input",Object.assign({key:"63382d1ccfc1254b9073923713677af25ed0fed3",class:b.input,ref:t=>this.inputRef=t,id:this.identifier||this.fileId,type:"file",name:this.name,accept:this.accept,multiple:this.multiple,onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled},this.inheritedAttributes,{"aria-required":h(this.required),"aria-invalid":h(this.invalid),"aria-disabled":h(this.disabled)}))),this.h.hasSlot("attachments")?i("div",{class:b.attachments},i("slot",{name:"attachments"})):null,this.files.length&&this.displayAttachments?i("div",{class:b.attachments},i("gov-attachments",{label:this.accessibleAttachmentsLabel,"accessible-label":this.accessibleAttachmentsLabel},this.files.map((t=>i("gov-attachments-item",{"accessible-remove-labelledby":t.id,"on-gov-remove":()=>this.onRemoveFileHandler(t)},i("span",{class:"sr-only",id:t.id},this.accessibleRemoveLabel.replace("{FILE_NAME}",t.file.name)),t.file.name,t.acceptValid===false?i("gov-form-message",{slot:"message",color:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill",type:"components"}),t.acceptValid===false?this.errorAccept:null):null,t.sizeValid===false?i("gov-form-message",{slot:"message",color:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill",type:"components"}),this.errorSize.replace("{FILE_SIZE}",y(this.maxFileSize))):null,i("span",{slot:"info"},"(",y(t.file.size),")")))))):null)}onRemoveFileHandler(t){const e=this.files.findIndex((e=>e.id===t.id));if(e!==-1){const t=this.files;const s=this.files[e];t.splice(e,1);this.files=[...t];this.govRemoveFile.emit({component:b.root,file:s});this.govFiles.emit({component:b.root,files:t})}}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:b.root,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:b.root,originalEvent:t})}onChangeHandler(t){t.stopPropagation()}async getRef(){return this.inputRef}async getAreaRef(){return this.areaRef}async reset(){this.files=[];this.inputRef.value=""}get host(){return this}static get watchers(){return{disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}},[4,"gov-form-file",{expanded:[4],required:[4],disabled:[516],resetAfterPick:[4,"reset-after-pick"],ignoreFileDuplicationCheck:[4,"ignore-file-duplication-check"],displayAttachments:[4,"display-attachments"],name:[1],accept:[1],multiple:[4],maxFileSize:[2,"max-file-size"],identifier:[1],invalid:[4],errorSize:[1,"error-size"],errorAccept:[1,"error-accept"],accessibleRemoveLabel:[1,"accessible-remove-label"],accessibleAttachmentsLabel:[1,"accessible-attachments-label"],files:[32],inheritedAttributes:[32],getRef:[64],getAreaRef:[64],reset:[64]},undefined,{disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}]);function j(){if(typeof customElements==="undefined"){return}const t=["gov-form-file","gov-attachments","gov-attachments-item","gov-button","gov-form-message","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-file":if(!customElements.get(t)){customElements.define(t,k)}break;case"gov-attachments":if(!customElements.get(t)){m()}break;case"gov-attachments-item":if(!customElements.get(t)){u()}break;case"gov-button":if(!customElements.get(t)){p()}break;case"gov-form-message":if(!customElements.get(t)){g()}break;case"gov-icon":if(!customElements.get(t)){v()}break}}))}j();const F=k;const C=j;export{F as GovFormFile,C as defineCustomElement};
1
+ import{p as t,H as e,c as s,h as i,d as o}from"./p-115b9cf3.js";import{c as a}from"./p-cd6c2938.js";import{g as n,c as r,t as h}from"./p-ea7fdd2e.js";import{g as l}from"./p-9908b9f0.js";import{A as c,a as f,i as m}from"./p-33d5d1ed.js";import{d}from"./p-03ad4e0f.js";import{d as u}from"./p-f4ca9c18.js";import{d as p}from"./p-9992e831.js";import{d as g}from"./p-8ee6f2f3.js";import{d as v}from"./p-88b2667e.js";const b={root:"gov-form-file",area:"gov-form-file__area",input:"gov-form-file__input",attachments:"gov-form-file__attachments"};function y(t){const e=["bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let s=0,i=parseInt(t,10)||0;while(i>=1024&&++s){i=i/1024}return i.toFixed(i<10&&s>0?1:0)+" "+e[s]}function E(t,e){if(typeof e==="string"&&e.length){return e.replace(/\s/g,"").split(",").filter((e=>new RegExp(e.replace("*",".*")).test(t.type))).length>0}else{return true}}function A(t,e){const s=Math.round(t.size);return s<=e}const k=t(class t extends e{constructor(){super();this.__registerHost();this.govFocus=s(this,"gov-focus",7);this.govBlur=s(this,"gov-blur",7);this.govFiles=s(this,"gov-files",7);this.govAddFile=s(this,"gov-add-file",7);this.govRemoveFile=s(this,"gov-remove-file",7);this.eventsRegistered=false;this.expanded=false;this.required=false;this.disabled=false;this.resetAfterPick=false;this.ignoreFileDuplicationCheck=false;this.displayAttachments=true;this.name=undefined;this.accept=undefined;this.multiple=false;this.maxFileSize=-1;this.identifier=undefined;this.invalid=undefined;this.errorSize="Soubor je větší než povolená velikost {FILE_SIZE}";this.errorAccept="Soubor tohoto typu není povolen";this.accessibleRemoveLabel="Odebrat soubor {FILE_NAME}";this.accessibleAttachmentsLabel="Přílohy";this.files=[];this.inheritedAttributes={};this.fileId=a("GovInputFile");this.h=n(this.host);this.f=l(this.h)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("invalid",r(this.invalid));this.f.passAttrToControl("disabled",r(this.disabled));this.f.passAttrToControl("type","File")}registerListeners(){if(this.eventsRegistered){return}this.eventsRegistered=true;function t(){this.areaRef.classList.add("highlight")}function e(){this.areaRef.classList.remove("highlight")}this.inputRef.addEventListener("change",(t=>{t.preventDefault();t.stopPropagation();const e=t.target.files;if(this.resetAfterPick){if(e.length){this.validateFiles(e)}}else{this.validateFiles(e)}}),false);if(this.expanded){const s=["dragover","dragleave"];const i=["dragenter","dragover","mouseenter"];const o=["dragleave","mouseleave"];s.map((t=>this.inputRef.addEventListener(t,this.preventDefaults.bind(this),false)));i.map((e=>this.inputRef.addEventListener(e,t.bind(this),false)));o.forEach((t=>this.inputRef.addEventListener(t,e.bind(this),false)))}}preventDefaults(t){t.preventDefault();t.stopPropagation()}handleDrop(t){const e=t.dataTransfer;this.validateFiles(e.files)}validateFiles(t){let e=[];Array.from(t).map((t=>{const s=this.files.find((e=>e.file.name===t.name&&e.file.size===t.size))||null;if(s===null||this.ignoreFileDuplicationCheck){const s=typeof this.maxFileSize==="number"&&this.maxFileSize>0?A(t,this.maxFileSize):true;const i=E(t,this.accept);const o={id:a("GovFormFile"),file:t,acceptValid:i,sizeValid:s};if(this.displayAttachments){this.files=[...this.files,o]}else{e=[...e,o]}this.govAddFile.emit({component:b.root,file:o})}}));this.govFiles.emit({component:b.root,files:e.length?e:this.files});if(this.resetAfterPick){this.reset().finally()}}componentDidLoad(){this.attributeObserver=new c(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(f)}componentWillLoad(){this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs();this.inheritedAttributes=m(this.host)}async componentDidRender(){this.registerListeners()}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}render(){return i(o,{key:"92ee90aa5d8d28d310c0229ce513be88edafd68d",class:this.h.classes([b.root]),invalid:h(this.invalid),expanded:h(this.expanded)},i("div",{key:"ada51c64168a7cb4dcb4f123e7f74fe401b63c82",class:b.area,ref:t=>this.areaRef=t},i("slot",{key:"77a4e7096f1949c8c284b0d6607ffd96567669ef"}),i("input",Object.assign({key:"63382d1ccfc1254b9073923713677af25ed0fed3",class:b.input,ref:t=>this.inputRef=t,id:this.identifier||this.fileId,type:"file",name:this.name,accept:this.accept,multiple:this.multiple,onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled},this.inheritedAttributes,{"aria-required":h(this.required),"aria-invalid":h(this.invalid),"aria-disabled":h(this.disabled)}))),this.h.hasSlot("attachments")?i("div",{class:b.attachments},i("slot",{name:"attachments"})):null,this.files.length&&this.displayAttachments?i("div",{class:b.attachments},i("gov-attachments",{label:this.accessibleAttachmentsLabel,"accessible-label":this.accessibleAttachmentsLabel},this.files.map((t=>i("gov-attachments-item",{"accessible-remove-labelledby":t.id,"on-gov-remove":()=>this.onRemoveFileHandler(t)},i("span",{class:"sr-only",id:t.id},this.accessibleRemoveLabel.replace("{FILE_NAME}",t.file.name)),t.file.name,t.acceptValid===false?i("gov-form-message",{slot:"message",color:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill",type:"components"}),t.acceptValid===false?this.errorAccept:null):null,t.sizeValid===false?i("gov-form-message",{slot:"message",color:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill",type:"components"}),this.errorSize.replace("{FILE_SIZE}",y(this.maxFileSize))):null,i("span",{slot:"info"},"(",y(t.file.size),")")))))):null)}onRemoveFileHandler(t){const e=this.files.findIndex((e=>e.id===t.id));if(e!==-1){const t=this.files;const s=this.files[e];t.splice(e,1);this.files=[...t];this.govRemoveFile.emit({component:b.root,file:s});this.govFiles.emit({component:b.root,files:t})}}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:b.root,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:b.root,originalEvent:t})}onChangeHandler(t){t.stopPropagation()}async getRef(){return this.inputRef}async getAreaRef(){return this.areaRef}async reset(){this.files=[];this.inputRef.value=""}get host(){return this}static get watchers(){return{disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}},[4,"gov-form-file",{expanded:[4],required:[4],disabled:[516],resetAfterPick:[4,"reset-after-pick"],ignoreFileDuplicationCheck:[4,"ignore-file-duplication-check"],displayAttachments:[4,"display-attachments"],name:[1],accept:[1],multiple:[4],maxFileSize:[2,"max-file-size"],identifier:[1],invalid:[4],errorSize:[1,"error-size"],errorAccept:[1,"error-accept"],accessibleRemoveLabel:[1,"accessible-remove-label"],accessibleAttachmentsLabel:[1,"accessible-attachments-label"],files:[32],inheritedAttributes:[32],getRef:[64],getAreaRef:[64],reset:[64]},undefined,{disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}]);function j(){if(typeof customElements==="undefined"){return}const t=["gov-form-file","gov-attachments","gov-attachments-item","gov-button","gov-form-message","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-file":if(!customElements.get(t)){customElements.define(t,k)}break;case"gov-attachments":if(!customElements.get(t)){d()}break;case"gov-attachments-item":if(!customElements.get(t)){u()}break;case"gov-button":if(!customElements.get(t)){p()}break;case"gov-form-message":if(!customElements.get(t)){g()}break;case"gov-icon":if(!customElements.get(t)){v()}break}}))}j();const F=k;const C=j;export{F as GovFormFile,C as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-file.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["FormFileClass","root","area","input","attachments","formatBytes","bytes","units","l","n","parseInt","toFixed","fileAcceptValidation","file","accept","length","replace","split","filter","RegExp","test","type","fileSizeValidation","maxSize","fileSize","Math","round","size","GovFormFile","proxyCustomElement","H","constructor","this","eventsRegistered","fileId","createID","h","govHost","host","f","govForm","watchControlAttrs","passControlAttrs","passAttrToControl","toBoolAttr","invalid","disabled","registerListeners","highlight","areaRef","classList","add","unhighlight","remove","inputRef","addEventListener","e","preventDefault","stopPropagation","files","target","resetAfterPick","validateFiles","expanded","events","inEvents","outEvents","map","eventName","preventDefaults","bind","forEach","handleDrop","dataTransfer","filesBuffer","Array","from","isFile","find","item","name","ignoreFileDuplicationCheck","isSizeValid","maxFileSize","isAcceptValid","newFile","id","acceptValid","sizeValid","displayAttachments","govAddFile","emit","component","govFiles","reset","finally","componentDidLoad","attributeObserver","AttributeObserver","attributeName","newValue","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","passAttrToLabel","String","required","inheritedAttributes","inheritAriaAttributes","componentDidRender","disconnectedCallback","stopObserving","removeAttribute","Object","assign","render","Host","key","class","classes","toBoolAttrIfDefined","ref","el","identifier","multiple","onChange","onChangeHandler","onFocus","onFocusHandler","onBlur","onBlurHandler","hasSlot","label","accessibleAttachmentsLabel","onRemoveFileHandler","accessibleRemoveLabel","slot","color","errorAccept","errorSize","index","findIndex","removeFile","splice","govRemoveFile","govFocus","originalEvent","govBlur","getRef","getAreaRef","value"],"sources":["../../../packages/core/src/components/gov-form/file/constants.ts","../../../packages/core/src/utils/file.utils.ts","../../../packages/core/src/components/gov-form/file/gov-form-file.tsx"],"sourcesContent":["export const FormFileClass = {\n\troot: 'gov-form-file',\n\tarea: 'gov-form-file__area',\n\tinput: 'gov-form-file__input',\n\tattachments: 'gov-form-file__attachments',\n}\n","export function formatBytes(bytes: any): string {\n\tconst units = ['bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']\n\tlet l = 0,\n\t\tn = parseInt(bytes, 10) || 0\n\n\twhile (n >= 1024 && ++l) {\n\t\tn = n / 1024\n\t}\n\n\treturn n.toFixed(n < 10 && l > 0 ? 1 : 0) + ' ' + units[l]\n}\n\nexport function fileAcceptValidation(file: File, accept: string): boolean {\n\tif (typeof accept === 'string' && accept.length) {\n\t\treturn (\n\t\t\taccept\n\t\t\t\t.replace(/\\s/g, '')\n\t\t\t\t.split(',')\n\t\t\t\t.filter(accept => {\n\t\t\t\t\treturn new RegExp(accept.replace('*', '.*')).test(file.type)\n\t\t\t\t}).length > 0\n\t\t)\n\t} else {\n\t\treturn true\n\t}\n}\n\nexport function fileSizeValidation(file: File, maxSize: number): boolean {\n\tconst fileSize = Math.round(file.size)\n\treturn fileSize <= maxSize\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {FormFileClass} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {fileAcceptValidation, fileSizeValidation, formatBytes} from \"../../../utils/file.utils\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport {GovFormFileEvent, GovFormFileItem} from \"./gov-form-file.types\"\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\n\n@Component({\n\ttag: \"gov-form-file\",\n})\nexport class GovFormFile {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\n\tprivate areaRef?: HTMLDivElement\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly fileId: string\n\tprivate attributeObserver: AttributeObserver\n\tprivate eventsRegistered = false\n\n\tconstructor() {\n\t\tthis.fileId = createID(\"GovInputFile\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormFileElement\n\t/**\n\t * Expands the file input to fill 100% of the container width.\n\t */\n\t@Prop() readonly expanded: boolean = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the File component disabled.\n\t * This prevents users from being able to interact with the File, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * After selecting the files, the main input element will be reset.\n\t * The propagation of the event with the selected files will not be affected.\n\t */\n\t@Prop({attribute: \"reset-after-pick\"}) readonly resetAfterPick: boolean = false\n\t/**\n\t * Selected files will not be checked for duplicates based on name and size.\n\t */\n\t@Prop({attribute: \"ignore-file-duplication-check\"}) readonly ignoreFileDuplicationCheck: boolean = false\n\t/**\n\t * Show list of attachments\n\t */\n\t@Prop({attribute: \"display-attachments\"}) readonly displayAttachments: boolean = true\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept\n\t */\n\t@Prop() readonly accept: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/multiple\n\t */\n\t@Prop() readonly multiple: boolean = false\n\t/**\n\t * Maximum embedded file size\n\t */\n\t@Prop({attribute: \"max-file-size\"}) readonly maxFileSize: number = -1\n\t/**\n\t * Custom File identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\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 * Error message when the maximum file size is exceeded\n\t */\n\t@Prop({attribute: \"error-size\"}) readonly errorSize: string = \"Soubor je větší než povolená velikost {FILE_SIZE}\"\n\t/**\n\t * Insert unsupported file error message\n\t */\n\t@Prop({attribute: \"error-accept\"}) readonly errorAccept: string = \"Soubor tohoto typu není povolen\"\n\t/**\n\t * Adds accessible label for the remove button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: \"accessible-remove-label\"}) readonly accessibleRemoveLabel: string = \"Odebrat soubor {FILE_NAME}\"\n\t/**\n\t * Adds accessible label for the list of attachments.\n\t */\n\t@Prop({attribute: \"accessible-attachments-label\"}) readonly accessibleAttachmentsLabel: string = \"Přílohy\"\n\t/**\n\t * Emitted when the File has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Emitted when the File loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when the list of inserted files is changed\n\t */\n\t@Event({eventName: \"gov-files\"}) govFiles: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when a new file is added\n\t */\n\t@Event({eventName: \"gov-add-file\"}) govAddFile: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when a file is removed from the list\n\t */\n\t@Event({eventName: \"gov-remove-file\"}) govRemoveFile: EventEmitter<GovFormFileEvent>\n\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() files: GovFormFileItem[] = []\n\t@State() inheritedAttributes: Attributes = {}\n\n\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"File\")\n\t}\n\n\n\tprivate registerListeners() {\n\t\tif (this.eventsRegistered) {\n\t\t\treturn\n\t\t}\n\t\tthis.eventsRegistered = true\n\n\t\tfunction highlight() {\n\t\t\tthis.areaRef.classList.add(\"highlight\")\n\t\t}\n\n\t\tfunction unhighlight() {\n\t\t\tthis.areaRef.classList.remove(\"highlight\")\n\t\t}\n\n\t\tthis.inputRef.addEventListener(\n\t\t\t\"change\",\n\t\t\te => {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopPropagation()\n\t\t\t\tconst files = (e.target as HTMLInputElement).files\n\t\t\t\tif (this.resetAfterPick) {\n\t\t\t\t\tif (files.length) {\n\t\t\t\t\t\tthis.validateFiles(files)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.validateFiles(files)\n\t\t\t\t}\n\t\t\t},\n\t\t\tfalse,\n\t\t)\n\n\t\tif (this.expanded) {\n\t\t\tconst events = [\"dragover\", \"dragleave\"]\n\t\t\tconst inEvents = [\"dragenter\", \"dragover\", \"mouseenter\"]\n\t\t\tconst outEvents = [\"dragleave\", \"mouseleave\"]\n\n\t\t\tevents.map(eventName => this.inputRef.addEventListener(eventName, this.preventDefaults.bind(this), false))\n\t\t\tinEvents.map(eventName => this.inputRef.addEventListener(eventName, highlight.bind(this), false))\n\t\t\toutEvents.forEach(eventName => this.inputRef.addEventListener(eventName, unhighlight.bind(this), false))\n\t\t}\n\t}\n\n\tpreventDefaults(e) {\n\t\te.preventDefault()\n\t\te.stopPropagation()\n\t}\n\n\thandleDrop(e: DragEvent) {\n\t\tconst dataTransfer = e.dataTransfer\n\t\tthis.validateFiles(dataTransfer.files)\n\t}\n\n\tprivate validateFiles(files: FileList) {\n\t\tlet filesBuffer: GovFormFileItem[] = []\n\t\tArray.from(files).map(file => {\n\t\t\tconst isFile = this.files.find(item => item.file.name === file.name && item.file.size === file.size) || null\n\t\t\tif (isFile === null || this.ignoreFileDuplicationCheck) {\n\t\t\t\tconst isSizeValid = typeof this.maxFileSize === \"number\" && this.maxFileSize > 0 ? fileSizeValidation(file, this.maxFileSize) : true\n\t\t\t\tconst isAcceptValid = fileAcceptValidation(file, this.accept)\n\t\t\t\tconst newFile = {\n\t\t\t\t\tid: createID(\"GovFormFile\"),\n\t\t\t\t\tfile,\n\t\t\t\t\tacceptValid: isAcceptValid,\n\t\t\t\t\tsizeValid: isSizeValid,\n\t\t\t\t}\n\t\t\t\tif (this.displayAttachments) {\n\t\t\t\t\tthis.files = [...this.files, newFile]\n\t\t\t\t} else {\n\t\t\t\t\tfilesBuffer = [...filesBuffer, newFile]\n\t\t\t\t}\n\t\t\t\tthis.govAddFile.emit({\n\t\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\t\tfile: newFile,\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\t\tthis.govFiles.emit({\n\t\t\tcomponent: FormFileClass.root,\n\t\t\tfiles: filesBuffer.length ? filesBuffer : this.files,\n\t\t})\n\n\t\tif (this.resetAfterPick) {\n\t\t\tthis.reset().finally()\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.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.registerListeners()\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={this.h.classes([FormFileClass.root])}\n\t\t\t\t invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t expanded={toBoolAttrIfDefined(this.expanded)}>\n\t\t\t\t<div class={FormFileClass.area} ref={el => (this.areaRef = el as HTMLDivElement)}>\n\t\t\t\t\t<slot/>\n\t\t\t\t\t<input\n\t\t\t\t\t\tclass={FormFileClass.input}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tid={this.identifier || this.fileId}\n\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\taccept={this.accept}\n\t\t\t\t\t\tmultiple={this.multiple}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.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\tdisabled={this.disabled}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot(\"attachments\") ? (\n\t\t\t\t\t<div class={FormFileClass.attachments}>\n\t\t\t\t\t\t<slot name={\"attachments\"}/>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\n\t\t\t\t{this.files.length && this.displayAttachments ? (\n\t\t\t\t\t<div class={FormFileClass.attachments}>\n\t\t\t\t\t\t<gov-attachments label={this.accessibleAttachmentsLabel}\n\t\t\t\t\t\t\t\t\t\t accessible-label={this.accessibleAttachmentsLabel}>\n\t\t\t\t\t\t\t{this.files.map(item => (\n\t\t\t\t\t\t\t\t<gov-attachments-item accessible-remove-labelledby={item.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t on-gov-remove={() => this.onRemoveFileHandler(item)}>\n\t\t\t\t\t\t\t\t\t<span class={\"sr-only\"} id={item.id}>\n\t\t\t\t\t\t\t\t\t\t{this.accessibleRemoveLabel.replace(\"{FILE_NAME}\", item.file.name)}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{item.file.name}\n\t\t\t\t\t\t\t\t\t{item.acceptValid === false ? (\n\t\t\t\t\t\t\t\t\t\t<gov-form-message slot=\"message\" color=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon\" name=\"exclamation-triangle-fill\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t\t\t\t\t{item.acceptValid === false ? this.errorAccept : null}\n\t\t\t\t\t\t\t\t\t\t</gov-form-message>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t{item.sizeValid === false ? (\n\t\t\t\t\t\t\t\t\t\t<gov-form-message slot=\"message\" color=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon\" name=\"exclamation-triangle-fill\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t\t\t\t\t{this.errorSize.replace(\"{FILE_SIZE}\", formatBytes(this.maxFileSize))}\n\t\t\t\t\t\t\t\t\t\t</gov-form-message>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t<span slot=\"info\">({formatBytes(item.file.size)})</span>\n\t\t\t\t\t\t\t\t</gov-attachments-item>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</gov-attachments>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onRemoveFileHandler(file: GovFormFileItem) {\n\t\tconst index = this.files.findIndex(item => item.id === file.id)\n\t\tif (index !== -1) {\n\t\t\tconst files = this.files\n\t\t\tconst removeFile = this.files[index]\n\t\t\tfiles.splice(index, 1)\n\t\t\tthis.files = [...files]\n\t\t\tthis.govRemoveFile.emit({\n\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\tfile: removeFile,\n\t\t\t})\n\t\t\tthis.govFiles.emit({\n\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\tfiles,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormFileClass.root,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormFileClass.root,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\te.stopPropagation()\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Returns the reference of the native area element\n\t */\n\t@Method()\n\tasync getAreaRef(): Promise<HTMLDivElement> {\n\t\treturn this.areaRef\n\t}\n\n\t/**\n\t * Remove all files from component state\n\t */\n\t@Method()\n\tasync reset(): Promise<void> {\n\t\tthis.files = []\n\t\tthis.inputRef.value = '';\n\t}\n}\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"names":["FormFileClass","root","area","input","attachments","formatBytes","bytes","units","l","n","parseInt","toFixed","fileAcceptValidation","file","accept","length","replace","split","filter","RegExp","test","type","fileSizeValidation","maxSize","fileSize","Math","round","size","GovFormFile","proxyCustomElement","H","constructor","this","eventsRegistered","fileId","createID","h","govHost","host","f","govForm","watchControlAttrs","passControlAttrs","passAttrToControl","toBoolAttr","invalid","disabled","registerListeners","highlight","areaRef","classList","add","unhighlight","remove","inputRef","addEventListener","e","preventDefault","stopPropagation","files","target","resetAfterPick","validateFiles","expanded","events","inEvents","outEvents","map","eventName","preventDefaults","bind","forEach","handleDrop","dataTransfer","filesBuffer","Array","from","isFile","find","item","name","ignoreFileDuplicationCheck","isSizeValid","maxFileSize","isAcceptValid","newFile","id","acceptValid","sizeValid","displayAttachments","govAddFile","emit","component","govFiles","reset","finally","componentDidLoad","attributeObserver","AttributeObserver","attributeName","newValue","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","passAttrToLabel","String","required","inheritedAttributes","inheritAriaAttributes","componentDidRender","disconnectedCallback","stopObserving","removeAttribute","Object","assign","render","Host","key","class","classes","toBoolAttrIfDefined","ref","el","identifier","multiple","onChange","onChangeHandler","onFocus","onFocusHandler","onBlur","onBlurHandler","hasSlot","label","accessibleAttachmentsLabel","onRemoveFileHandler","accessibleRemoveLabel","slot","color","errorAccept","errorSize","index","findIndex","removeFile","splice","govRemoveFile","govFocus","originalEvent","govBlur","getRef","getAreaRef","value"],"sources":["../../../packages/core/src/components/gov-form/file/constants.ts","../../../packages/core/src/utils/file.utils.ts","../../../packages/core/src/components/gov-form/file/gov-form-file.tsx"],"sourcesContent":["export const FormFileClass = {\n\troot: 'gov-form-file',\n\tarea: 'gov-form-file__area',\n\tinput: 'gov-form-file__input',\n\tattachments: 'gov-form-file__attachments',\n}\n","export function formatBytes(bytes: any): string {\n\tconst units = ['bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']\n\tlet l = 0,\n\t\tn = parseInt(bytes, 10) || 0\n\n\twhile (n >= 1024 && ++l) {\n\t\tn = n / 1024\n\t}\n\n\treturn n.toFixed(n < 10 && l > 0 ? 1 : 0) + ' ' + units[l]\n}\n\nexport function fileAcceptValidation(file: File, accept: string): boolean {\n\tif (typeof accept === 'string' && accept.length) {\n\t\treturn (\n\t\t\taccept\n\t\t\t\t.replace(/\\s/g, '')\n\t\t\t\t.split(',')\n\t\t\t\t.filter(accept => {\n\t\t\t\t\treturn new RegExp(accept.replace('*', '.*')).test(file.type)\n\t\t\t\t}).length > 0\n\t\t)\n\t} else {\n\t\treturn true\n\t}\n}\n\nexport function fileSizeValidation(file: File, maxSize: number): boolean {\n\tconst fileSize = Math.round(file.size)\n\treturn fileSize <= maxSize\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {FormFileClass} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {fileAcceptValidation, fileSizeValidation, formatBytes} from \"../../../utils/file.utils\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport {GovFormFileEvent, GovFormFileItem} from \"./gov-form-file.types\"\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\n\n@Component({\n\ttag: \"gov-form-file\",\n})\nexport class GovFormFile {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\n\tprivate areaRef?: HTMLDivElement\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly fileId: string\n\tprivate attributeObserver: AttributeObserver\n\tprivate eventsRegistered = false\n\n\tconstructor() {\n\t\tthis.fileId = createID(\"GovInputFile\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormFileElement\n\t/**\n\t * Expands the file input to fill 100% of the container width.\n\t */\n\t@Prop() readonly expanded: boolean = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the File component disabled.\n\t * This prevents users from being able to interact with the File, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * After selecting the files, the main input element will be reset.\n\t * The propagation of the event with the selected files will not be affected.\n\t */\n\t@Prop({attribute: \"reset-after-pick\"}) readonly resetAfterPick: boolean = false\n\t/**\n\t * Selected files will not be checked for duplicates based on name and size.\n\t */\n\t@Prop({attribute: \"ignore-file-duplication-check\"}) readonly ignoreFileDuplicationCheck: boolean = false\n\t/**\n\t * Show list of attachments\n\t */\n\t@Prop({attribute: \"display-attachments\"}) readonly displayAttachments: boolean = true\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept\n\t */\n\t@Prop() readonly accept: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/multiple\n\t */\n\t@Prop() readonly multiple: boolean = false\n\t/**\n\t * Maximum embedded file size\n\t */\n\t@Prop({attribute: \"max-file-size\"}) readonly maxFileSize: number = -1\n\t/**\n\t * Custom File identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\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 * Error message when the maximum file size is exceeded\n\t */\n\t@Prop({attribute: \"error-size\"}) readonly errorSize: string = \"Soubor je větší než povolená velikost {FILE_SIZE}\"\n\t/**\n\t * Insert unsupported file error message\n\t */\n\t@Prop({attribute: \"error-accept\"}) readonly errorAccept: string = \"Soubor tohoto typu není povolen\"\n\t/**\n\t * Adds accessible label for the remove button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: \"accessible-remove-label\"}) readonly accessibleRemoveLabel: string = \"Odebrat soubor {FILE_NAME}\"\n\t/**\n\t * Adds accessible label for the list of attachments.\n\t */\n\t@Prop({attribute: \"accessible-attachments-label\"}) readonly accessibleAttachmentsLabel: string = \"Přílohy\"\n\t/**\n\t * Emitted when the File has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Emitted when the File loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when the list of inserted files is changed\n\t */\n\t@Event({eventName: \"gov-files\"}) govFiles: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when a new file is added\n\t */\n\t@Event({eventName: \"gov-add-file\"}) govAddFile: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when a file is removed from the list\n\t */\n\t@Event({eventName: \"gov-remove-file\"}) govRemoveFile: EventEmitter<GovFormFileEvent>\n\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() files: GovFormFileItem[] = []\n\t@State() inheritedAttributes: Attributes = {}\n\n\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"File\")\n\t}\n\n\n\tprivate registerListeners() {\n\t\tif (this.eventsRegistered) {\n\t\t\treturn\n\t\t}\n\t\tthis.eventsRegistered = true\n\n\t\tfunction highlight() {\n\t\t\tthis.areaRef.classList.add(\"highlight\")\n\t\t}\n\n\t\tfunction unhighlight() {\n\t\t\tthis.areaRef.classList.remove(\"highlight\")\n\t\t}\n\n\t\tthis.inputRef.addEventListener(\n\t\t\t\"change\",\n\t\t\te => {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopPropagation()\n\t\t\t\tconst files = (e.target as HTMLInputElement).files\n\t\t\t\tif (this.resetAfterPick) {\n\t\t\t\t\tif (files.length) {\n\t\t\t\t\t\tthis.validateFiles(files)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.validateFiles(files)\n\t\t\t\t}\n\t\t\t},\n\t\t\tfalse,\n\t\t)\n\n\t\tif (this.expanded) {\n\t\t\tconst events = [\"dragover\", \"dragleave\"]\n\t\t\tconst inEvents = [\"dragenter\", \"dragover\", \"mouseenter\"]\n\t\t\tconst outEvents = [\"dragleave\", \"mouseleave\"]\n\n\t\t\tevents.map(eventName => this.inputRef.addEventListener(eventName, this.preventDefaults.bind(this), false))\n\t\t\tinEvents.map(eventName => this.inputRef.addEventListener(eventName, highlight.bind(this), false))\n\t\t\toutEvents.forEach(eventName => this.inputRef.addEventListener(eventName, unhighlight.bind(this), false))\n\t\t}\n\t}\n\n\tpreventDefaults(e) {\n\t\te.preventDefault()\n\t\te.stopPropagation()\n\t}\n\n\thandleDrop(e: DragEvent) {\n\t\tconst dataTransfer = e.dataTransfer\n\t\tthis.validateFiles(dataTransfer.files)\n\t}\n\n\tprivate validateFiles(files: FileList) {\n\t\tlet filesBuffer: GovFormFileItem[] = []\n\t\tArray.from(files).map(file => {\n\t\t\tconst isFile = this.files.find(item => item.file.name === file.name && item.file.size === file.size) || null\n\t\t\tif (isFile === null || this.ignoreFileDuplicationCheck) {\n\t\t\t\tconst isSizeValid = typeof this.maxFileSize === \"number\" && this.maxFileSize > 0 ? fileSizeValidation(file, this.maxFileSize) : true\n\t\t\t\tconst isAcceptValid = fileAcceptValidation(file, this.accept)\n\t\t\t\tconst newFile = {\n\t\t\t\t\tid: createID(\"GovFormFile\"),\n\t\t\t\t\tfile,\n\t\t\t\t\tacceptValid: isAcceptValid,\n\t\t\t\t\tsizeValid: isSizeValid,\n\t\t\t\t}\n\t\t\t\tif (this.displayAttachments) {\n\t\t\t\t\tthis.files = [...this.files, newFile]\n\t\t\t\t} else {\n\t\t\t\t\tfilesBuffer = [...filesBuffer, newFile]\n\t\t\t\t}\n\t\t\t\tthis.govAddFile.emit({\n\t\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\t\tfile: newFile,\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\t\tthis.govFiles.emit({\n\t\t\tcomponent: FormFileClass.root,\n\t\t\tfiles: filesBuffer.length ? filesBuffer : this.files,\n\t\t})\n\n\t\tif (this.resetAfterPick) {\n\t\t\tthis.reset().finally()\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.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.registerListeners()\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={this.h.classes([FormFileClass.root])}\n\t\t\t\t invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t expanded={toBoolAttrIfDefined(this.expanded)}>\n\t\t\t\t<div class={FormFileClass.area} ref={el => (this.areaRef = el as HTMLDivElement)}>\n\t\t\t\t\t<slot/>\n\t\t\t\t\t<input\n\t\t\t\t\t\tclass={FormFileClass.input}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tid={this.identifier || this.fileId}\n\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\taccept={this.accept}\n\t\t\t\t\t\tmultiple={this.multiple}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.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\tdisabled={this.disabled}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot(\"attachments\") ? (\n\t\t\t\t\t<div class={FormFileClass.attachments}>\n\t\t\t\t\t\t<slot name={\"attachments\"}/>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\n\t\t\t\t{this.files.length && this.displayAttachments ? (\n\t\t\t\t\t<div class={FormFileClass.attachments}>\n\t\t\t\t\t\t<gov-attachments label={this.accessibleAttachmentsLabel}\n\t\t\t\t\t\t\t\t\t\t accessible-label={this.accessibleAttachmentsLabel}>\n\t\t\t\t\t\t\t{this.files.map(item => (\n\t\t\t\t\t\t\t\t<gov-attachments-item accessible-remove-labelledby={item.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t on-gov-remove={() => this.onRemoveFileHandler(item)}>\n\t\t\t\t\t\t\t\t\t<span class={\"sr-only\"} id={item.id}>\n\t\t\t\t\t\t\t\t\t\t{this.accessibleRemoveLabel.replace(\"{FILE_NAME}\", item.file.name)}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{item.file.name}\n\t\t\t\t\t\t\t\t\t{item.acceptValid === false ? (\n\t\t\t\t\t\t\t\t\t\t<gov-form-message slot=\"message\" color=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon\" name=\"exclamation-triangle-fill\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t\t\t\t\t{item.acceptValid === false ? this.errorAccept : null}\n\t\t\t\t\t\t\t\t\t\t</gov-form-message>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t{item.sizeValid === false ? (\n\t\t\t\t\t\t\t\t\t\t<gov-form-message slot=\"message\" color=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon\" name=\"exclamation-triangle-fill\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t\t\t\t\t{this.errorSize.replace(\"{FILE_SIZE}\", formatBytes(this.maxFileSize))}\n\t\t\t\t\t\t\t\t\t\t</gov-form-message>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t<span slot=\"info\">({formatBytes(item.file.size)})</span>\n\t\t\t\t\t\t\t\t</gov-attachments-item>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</gov-attachments>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onRemoveFileHandler(file: GovFormFileItem) {\n\t\tconst index = this.files.findIndex(item => item.id === file.id)\n\t\tif (index !== -1) {\n\t\t\tconst files = this.files\n\t\t\tconst removeFile = this.files[index]\n\t\t\tfiles.splice(index, 1)\n\t\t\tthis.files = [...files]\n\t\t\tthis.govRemoveFile.emit({\n\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\tfile: removeFile,\n\t\t\t})\n\t\t\tthis.govFiles.emit({\n\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\tfiles,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormFileClass.root,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormFileClass.root,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\te.stopPropagation()\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Returns the reference of the native area element\n\t */\n\t@Method()\n\tasync getAreaRef(): Promise<HTMLDivElement> {\n\t\treturn this.areaRef\n\t}\n\n\t/**\n\t * Remove all files from component state\n\t */\n\t@Method()\n\tasync reset(): Promise<void> {\n\t\tthis.files = []\n\t\tthis.inputRef.value = '';\n\t}\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,h as a,d as i}from"./p-42200001.js";import{a as s,b as o,c as r}from"./p-e44a0fee.js";import{g as n}from"./p-ea7fdd2e.js";import{v as c}from"./p-d8135701.js";const f=t(class t extends e{constructor(){super();this.__registerHost();this.gap=undefined;this.orientation="vertical";this.h=n(this.host)}validateGap(t){if(t){c(o,t,s.root)}}validateOrientation(t){if(t){c(r,t,s.root)}}componentWillLoad(){this.validateGap(this.gap);this.validateOrientation(this.orientation)}render(){return a(i,{key:"b7a379997ac1f4080471c42c23cad6f0ed055fd7",gap:this.gap,class:this.h.classes(s.root)},a("slot",{key:"a36809822e81913ec6c8cabdee9eaf64c9f9f471"}))}get host(){return this}static get watchers(){return{gap:["validateGap"],orientation:["validateOrientation"]}}},[4,"gov-form-group",{gap:[1],orientation:[1]},undefined,{gap:["validateGap"],orientation:["validateOrientation"]}]);function d(){if(typeof customElements==="undefined"){return}const t=["gov-form-group"];t.forEach((t=>{switch(t){case"gov-form-group":if(!customElements.get(t)){customElements.define(t,f)}break}}))}d();const p=f;const m=d;export{p as GovFormGroup,m as defineCustomElement};
1
+ import{p as t,H as e,h as a,d as i}from"./p-115b9cf3.js";import{a as s,b as o,c as r}from"./p-e44a0fee.js";import{g as n}from"./p-ea7fdd2e.js";import{v as c}from"./p-0b3574c2.js";const f=t(class t extends e{constructor(){super();this.__registerHost();this.gap=undefined;this.orientation="vertical";this.h=n(this.host)}validateGap(t){if(t){c(o,t,s.root)}}validateOrientation(t){if(t){c(r,t,s.root)}}componentWillLoad(){this.validateGap(this.gap);this.validateOrientation(this.orientation)}render(){return a(i,{key:"b7a379997ac1f4080471c42c23cad6f0ed055fd7",gap:this.gap,class:this.h.classes(s.root)},a("slot",{key:"a36809822e81913ec6c8cabdee9eaf64c9f9f471"}))}get host(){return this}static get watchers(){return{gap:["validateGap"],orientation:["validateOrientation"]}}},[4,"gov-form-group",{gap:[1],orientation:[1]},undefined,{gap:["validateGap"],orientation:["validateOrientation"]}]);function p(){if(typeof customElements==="undefined"){return}const t=["gov-form-group"];t.forEach((t=>{switch(t){case"gov-form-group":if(!customElements.get(t)){customElements.define(t,f)}break}}))}p();const d=f;const m=p;export{d as GovFormGroup,m as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-group.js.map
@@ -1,2 +1,2 @@
1
- import{G as o,d as s}from"./p-a63665c2.js";const t=o;const a=s;export{t as GovFormInput,a as defineCustomElement};
1
+ import{G as o,d as s}from"./p-2237d3a5.js";const t=o;const a=s;export{t as GovFormInput,a as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-input.js.map
@@ -1,2 +1,2 @@
1
- import{p as s,H as e,c as t,h as o,d as c}from"./p-42200001.js";import{F as i}from"./p-7ba4daf4.js";const a=s(class s extends e{constructor(){super();this.__registerHost();this.govClick=t(this,"gov-click",7);this.identifier=undefined;this.size="m";this.required=false;this.legend=false}render(){const s=this.legend?"legend":"label";return o(c,{key:"3f52c93a7721a458d430874b447421f7a5d30a41",class:i.root,size:this.size},o(s,{key:"c122a9bce9b9a98b0c8c336190b70bc4bf5389cf",class:i.label,htmlFor:this.identifier,onClick:()=>this.govClick.emit()},o("slot",{key:"de892d47334dbd3448a33d18586c77248b08b036"}),this.required?o("span",{class:"gov-color--error-500"}," *"):null))}},[4,"gov-form-label",{identifier:[1],size:[1],required:[4],legend:[4]}]);function l(){if(typeof customElements==="undefined"){return}const s=["gov-form-label"];s.forEach((s=>{switch(s){case"gov-form-label":if(!customElements.get(s)){customElements.define(s,a)}break}}))}l();const r=a;const n=l;export{r as GovFormLabel,n as defineCustomElement};
1
+ import{p as s,H as e,c as t,h as c,d as o}from"./p-115b9cf3.js";import{F as i}from"./p-7ba4daf4.js";const a=s(class s extends e{constructor(){super();this.__registerHost();this.govClick=t(this,"gov-click",7);this.identifier=undefined;this.size="m";this.required=false;this.legend=false}render(){const s=this.legend?"legend":"label";return c(o,{key:"3f52c93a7721a458d430874b447421f7a5d30a41",class:i.root,size:this.size},c(s,{key:"c122a9bce9b9a98b0c8c336190b70bc4bf5389cf",class:i.label,htmlFor:this.identifier,onClick:()=>this.govClick.emit()},c("slot",{key:"de892d47334dbd3448a33d18586c77248b08b036"}),this.required?c("span",{class:"gov-color--error-500"}," *"):null))}},[4,"gov-form-label",{identifier:[1],size:[1],required:[4],legend:[4]}]);function l(){if(typeof customElements==="undefined"){return}const s=["gov-form-label"];s.forEach((s=>{switch(s){case"gov-form-label":if(!customElements.get(s)){customElements.define(s,a)}break}}))}l();const r=a;const n=l;export{r as GovFormLabel,n as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-label.js.map
@@ -1,2 +1,2 @@
1
- import{G as o,d as s}from"./p-080d5d41.js";const t=o;const d=s;export{t as GovFormMessage,d as defineCustomElement};
1
+ import{G as o,d as s}from"./p-8ee6f2f3.js";const t=o;const e=s;export{t as GovFormMessage,e as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-message.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,c as i,h as s,d as o}from"./p-42200001.js";import{g as n,h as a,i as h}from"./p-9908b9f0.js";import{g as l,c as r,t as c}from"./p-ea7fdd2e.js";import{v as d}from"./p-d8135701.js";import{c as u,r as f}from"./p-cd6c2938.js";import{p as m}from"./p-ded281e6.js";import{t as v}from"./p-26618322.js";import{A as p,a as g}from"./p-33d5d1ed.js";import{d as b}from"./p-6a473654.js";import{d as y}from"./p-ff5e9e32.js";import{d as k}from"./p-a63665c2.js";import{d as j}from"./p-16e68a91.js";import{d as w}from"./p-495b793e.js";const O=t(class t extends e{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govChange=i(this,"gov-change",7);this.govSelect=i(this,"gov-select",7);this.govRemove=i(this,"gov-remove",7);this.value=undefined;this.options=undefined;this.identifier=undefined;this.placeholder=undefined;this.size="m";this.name=undefined;this.hideSelectedList=false;this.required=false;this.disabled=false;this.invalid=undefined;this.success=undefined;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.messageLoading="Načítám...";this.focused=undefined;this.valueState=undefined;this.selectedOptionsState=[];this.optionsState=[];this.inheritedAttributes={};this.selectId=u("GovSelect");this.listId=u("GovMultiList");this.h=l(this.host);this.f=n(this.h)}validateSize(t){d(h,t,a.root)}watchOptions(t){this.optionsState=m(t)}watchValue(t){this.selectedOptionsState=m(t)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(g);this.initAutocomplete()}componentWillLoad(){this.validateSize(this.size);this.optionsState=m(this.options);this.selectedOptionsState=m(this.value)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}getAvailableOptions(t=false){if(Array.isArray(this.optionsState)&&this.optionsState.length){if(t){return this.optionsState}return this.optionsState.filter((t=>{const e=this.selectedValueIndex(t.value);return e!==-1||(t===null||t===void 0?void 0:t.disabled)?false:true})).map((t=>{var e;return{name:(e=t.label)!==null&&e!==void 0?e:t.value,value:t.value}}))}return Array.from(this.selectRef.querySelectorAll("option")).filter((e=>{if(t){return true}const i=this.selectedValueIndex(e.value);return!(e.disabled||e.selected||i>-1)})).map((t=>({name:t.textContent,value:t.value})))}initAutocomplete(){var t,e,i,s,o;(t=this.autocompleteRef)===null||t===void 0?void 0:t.addEventListener("gov-select",this.onSelectHandler.bind(this));(e=this.autocompleteRef)===null||e===void 0?void 0:e.addEventListener("gov-input",this.onInputHandler.bind(this));(i=this.autocompleteRef)===null||i===void 0?void 0:i.addEventListener("gov-focus",this.onFocusHandler.bind(this));(s=this.autocompleteRef)===null||s===void 0?void 0:s.addEventListener("gov-blur",this.onBlurHandler.bind(this));(o=this.autocompleteRef)===null||o===void 0?void 0:o.setSearchCallback((t=>new Promise((e=>{const i=this.getAvailableOptions();if(String(t).length===0){return e(i)}e(i.filter((({label:e,value:i})=>{if(!e)e=i;return f(e).toLowerCase().indexOf(f(t).toLowerCase())>-1})))})))).finally()}selectedValueIndex(t){return this.selectedOptionsState.findIndex((e=>e===t))}getOptionElement(t){return this.selectRef.querySelector('option[value="'+t+'"]')}getOption(t){var e;return(e=this.getAvailableOptions(true).find((e=>e.value===t)))!==null&&e!==void 0?e:null}selectOption(t,e=true){const i=this.selectedValueIndex(t);if(i===-1){this.selectedOptionsState=[...this.selectedOptionsState,t];this.value=this.selectedOptionsState;if(e){this.govChange.emit({component:a.root,value:this.selectedOptionsState});this.govSelect.emit({component:a.root,value:this.selectedOptionsState})}const i=this.getOptionElement(t);if(i){i.selected=true}}}removeOption(t,e=true){const i=this.selectedValueIndex(t);if(i!==-1){this.selectedOptionsState.splice(i,1);this.selectedOptionsState=[...this.selectedOptionsState];this.value=this.selectedOptionsState;if(e){this.govChange.emit({component:a.root,value:this.selectedOptionsState});this.govRemove.emit({component:a.root,value:this.selectedOptionsState})}const s=this.getOptionElement(t);if(s){s.selected=false}}}async componentDidRender(){this.f.passAttrToLabel("required",String(this.required));v((()=>{this.selectRef.querySelectorAll("option").forEach((t=>{if(t.selected){this.selectOption(t.value,false)}}))}))}render(){return s(o,{key:"e112f9d20d170e70616fd4f089b93dd040e737fa",class:a.root,size:this.size},s("div",{key:"ffc5af48051e7d24559e0c77a595b48e287771f5",class:a.wrap},this.h.hasSlot("prefix")&&s("slot",{key:"3c22442cfbcb010f240a014ba7c9c48ec4522555",name:"prefix"}),s("gov-form-autocomplete",{key:"c02857a7ea06c203aa94b317837ea2c7c921b505",value:this.valueState,disabled:this.disabled,identifier:this.identifier||this.selectId,required:false,invalid:this.invalid,success:this.success,size:this.size,placeholder:this.placeholder,"message-empty":this.messageEmpty,"message-loading":this.messageLoading,ref:t=>this.autocompleteRef=t,minlength:0,"aria-owns":this.listId},this.success&&s("gov-icon",{key:"2b06057b6343fce21d08731f5a6675ffccfa3f6e",slot:"validation-icon",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&s("gov-icon",{key:"6f33cb3764c0df058b0743ba617c950cf7909cdc",slot:"validation-icon",class:"validation-icon",name:"exclamation-lg",type:"components"}),s("gov-icon",{key:"05be66ee199dee177d0b18a7a6a59e25a724571f",slot:"icon-end",class:"arrow-icon",name:"chevron-down",type:"components"})),s("select",Object.assign({key:"d50fe47c2c859561b8aba62e6d6dedd7bceed6ae",hidden:true,class:"hidden-select-list","aria-hidden":r(true),multiple:true,required:this.required,name:this.name,disabled:this.disabled,ref:t=>this.selectRef=t},this.inheritedAttributes,{"aria-disabled":c(this.disabled),"aria-required":c(this.required),"aria-invalid":c(this.invalid)}),s("slot",{key:"cf2ebfd8dc2cdf49c3581ba0ba3fff959a50a221"}),Array.isArray(this.optionsState)&&this.optionsState.map((t=>{var e;const i=this.selectedValueIndex(t.value);return s("option",{value:t.value,selected:i>-1,disabled:t===null||t===void 0?void 0:t.disabled},(e=t.label)!==null&&e!==void 0?e:t.value)}))),this.h.hasSlot("sufix")&&s("slot",{key:"dddc8a99daeb345be9d778ade22622ae9ed35769",name:"sufix"})),this.hideSelectedList===false?s("ul",{role:"listbox",id:this.listId,class:a.list},Array.isArray(this.selectedOptionsState)&&this.selectedOptionsState.map((t=>{var e,i;const o=this.getOption(t);if(!o)return null;return s("li",{class:a.item,role:"option"},(e=o.label)!==null&&e!==void 0?e:o.value,s("gov-button",{"aria-label":(i="Odebrat vybranou položku "+o.label)!==null&&i!==void 0?i:o.value,color:"primary",type:"base",size:this.size,"on-gov-click":()=>this.onTagRemove(t)},s("gov-icon",{name:"x-lg",type:"components"})))}))):null)}onFocusHandler(t){t.stopPropagation();this.focused=true;this.govFocus.emit({component:a.root,originalEvent:t,value:this.selectedOptionsState})}onBlurHandler(t){t.stopPropagation();t.stopPropagation();this.focused=false;this.govBlur.emit({component:a.root,originalEvent:t,value:this.selectedOptionsState})}onInputHandler(t){this.valueState=t.detail.value;t.stopPropagation()}onSelectHandler(t){t.stopPropagation();const e=t.detail.selected;this.selectOption(e.value);this.valueState="";this.autocompleteRef.clearValue().finally();this.autocompleteRef.focus()}onTagRemove(t){this.removeOption(t)}async setFocus(t){return this.selectRef.focus(t)}async setValue(t){this.valueState=t}async getRef(){return this.selectRef}get host(){return this}static get watchers(){return{size:["validateSize"],options:["watchOptions"],value:["watchValue"]}}},[4,"gov-form-multi-select",{value:[1537],options:[1537],identifier:[1],placeholder:[1],size:[1],name:[1],hideSelectedList:[4,"hide-selected-list"],required:[4],disabled:[516],invalid:[516],success:[4],messageEmpty:[1,"message-empty"],messageLoading:[1,"message-loading"],focused:[32],valueState:[32],selectedOptionsState:[32],optionsState:[32],inheritedAttributes:[32],setFocus:[64],setValue:[64],getRef:[64]},undefined,{size:["validateSize"],options:["watchOptions"],value:["watchValue"]}]);function E(){if(typeof customElements==="undefined"){return}const t=["gov-form-multi-select","gov-button","gov-form-autocomplete","gov-form-input","gov-icon","gov-skeleton"];t.forEach((t=>{switch(t){case"gov-form-multi-select":if(!customElements.get(t)){customElements.define(t,O)}break;case"gov-button":if(!customElements.get(t)){b()}break;case"gov-form-autocomplete":if(!customElements.get(t)){y()}break;case"gov-form-input":if(!customElements.get(t)){k()}break;case"gov-icon":if(!customElements.get(t)){j()}break;case"gov-skeleton":if(!customElements.get(t)){w()}break}}))}E();const S=O;const x=E;export{S as GovFormMultiSelect,x as defineCustomElement};
1
+ import{p as t,H as e,c as i,h as s,d as o}from"./p-115b9cf3.js";import{g as n,h as a,i as h}from"./p-9908b9f0.js";import{g as l,c as r,t as c}from"./p-ea7fdd2e.js";import{v as d}from"./p-0b3574c2.js";import{c as u,r as f}from"./p-cd6c2938.js";import{p as m}from"./p-ded281e6.js";import{t as v}from"./p-26618322.js";import{A as p,a as g}from"./p-33d5d1ed.js";import{d as b}from"./p-9992e831.js";import{d as y}from"./p-94002301.js";import{d as k}from"./p-2237d3a5.js";import{d as j}from"./p-88b2667e.js";import{d as w}from"./p-350e060c.js";const O=t(class t extends e{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govChange=i(this,"gov-change",7);this.govSelect=i(this,"gov-select",7);this.govRemove=i(this,"gov-remove",7);this.value=undefined;this.options=undefined;this.identifier=undefined;this.placeholder=undefined;this.size="m";this.name=undefined;this.hideSelectedList=false;this.required=false;this.disabled=false;this.invalid=undefined;this.success=undefined;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.messageLoading="Načítám...";this.focused=undefined;this.valueState=undefined;this.selectedOptionsState=[];this.optionsState=[];this.inheritedAttributes={};this.selectId=u("GovSelect");this.listId=u("GovMultiList");this.h=l(this.host);this.f=n(this.h)}validateSize(t){d(h,t,a.root)}watchOptions(t){this.optionsState=m(t)}watchValue(t){this.selectedOptionsState=m(t)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(g);this.initAutocomplete()}componentWillLoad(){this.validateSize(this.size);this.optionsState=m(this.options);this.selectedOptionsState=m(this.value)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}getAvailableOptions(t=false){if(Array.isArray(this.optionsState)&&this.optionsState.length){if(t){return this.optionsState}return this.optionsState.filter((t=>{const e=this.selectedValueIndex(t.value);return e!==-1||(t===null||t===void 0?void 0:t.disabled)?false:true})).map((t=>{var e;return{name:(e=t.label)!==null&&e!==void 0?e:t.value,value:t.value}}))}return Array.from(this.selectRef.querySelectorAll("option")).filter((e=>{if(t){return true}const i=this.selectedValueIndex(e.value);return!(e.disabled||e.selected||i>-1)})).map((t=>({name:t.textContent,value:t.value})))}initAutocomplete(){var t,e,i,s,o;(t=this.autocompleteRef)===null||t===void 0?void 0:t.addEventListener("gov-select",this.onSelectHandler.bind(this));(e=this.autocompleteRef)===null||e===void 0?void 0:e.addEventListener("gov-input",this.onInputHandler.bind(this));(i=this.autocompleteRef)===null||i===void 0?void 0:i.addEventListener("gov-focus",this.onFocusHandler.bind(this));(s=this.autocompleteRef)===null||s===void 0?void 0:s.addEventListener("gov-blur",this.onBlurHandler.bind(this));(o=this.autocompleteRef)===null||o===void 0?void 0:o.setSearchCallback((t=>new Promise((e=>{const i=this.getAvailableOptions();if(String(t).length===0){return e(i)}e(i.filter((({label:e,value:i})=>{if(!e)e=i;return f(e).toLowerCase().indexOf(f(t).toLowerCase())>-1})))})))).finally()}selectedValueIndex(t){return this.selectedOptionsState.findIndex((e=>e===t))}getOptionElement(t){return this.selectRef.querySelector('option[value="'+t+'"]')}getOption(t){var e;return(e=this.getAvailableOptions(true).find((e=>e.value===t)))!==null&&e!==void 0?e:null}selectOption(t,e=true){const i=this.selectedValueIndex(t);if(i===-1){this.selectedOptionsState=[...this.selectedOptionsState,t];this.value=this.selectedOptionsState;if(e){this.govChange.emit({component:a.root,value:this.selectedOptionsState});this.govSelect.emit({component:a.root,value:this.selectedOptionsState})}const i=this.getOptionElement(t);if(i){i.selected=true}}}removeOption(t,e=true){const i=this.selectedValueIndex(t);if(i!==-1){this.selectedOptionsState.splice(i,1);this.selectedOptionsState=[...this.selectedOptionsState];this.value=this.selectedOptionsState;if(e){this.govChange.emit({component:a.root,value:this.selectedOptionsState});this.govRemove.emit({component:a.root,value:this.selectedOptionsState})}const s=this.getOptionElement(t);if(s){s.selected=false}}}async componentDidRender(){this.f.passAttrToLabel("required",String(this.required));v((()=>{this.selectRef.querySelectorAll("option").forEach((t=>{if(t.selected){this.selectOption(t.value,false)}}))}))}render(){return s(o,{key:"e112f9d20d170e70616fd4f089b93dd040e737fa",class:a.root,size:this.size},s("div",{key:"ffc5af48051e7d24559e0c77a595b48e287771f5",class:a.wrap},this.h.hasSlot("prefix")&&s("slot",{key:"3c22442cfbcb010f240a014ba7c9c48ec4522555",name:"prefix"}),s("gov-form-autocomplete",{key:"c02857a7ea06c203aa94b317837ea2c7c921b505",value:this.valueState,disabled:this.disabled,identifier:this.identifier||this.selectId,required:false,invalid:this.invalid,success:this.success,size:this.size,placeholder:this.placeholder,"message-empty":this.messageEmpty,"message-loading":this.messageLoading,ref:t=>this.autocompleteRef=t,minlength:0,"aria-owns":this.listId},this.success&&s("gov-icon",{key:"2b06057b6343fce21d08731f5a6675ffccfa3f6e",slot:"validation-icon",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&s("gov-icon",{key:"6f33cb3764c0df058b0743ba617c950cf7909cdc",slot:"validation-icon",class:"validation-icon",name:"exclamation-lg",type:"components"}),s("gov-icon",{key:"05be66ee199dee177d0b18a7a6a59e25a724571f",slot:"icon-end",class:"arrow-icon",name:"chevron-down",type:"components"})),s("select",Object.assign({key:"d50fe47c2c859561b8aba62e6d6dedd7bceed6ae",hidden:true,class:"hidden-select-list","aria-hidden":r(true),multiple:true,required:this.required,name:this.name,disabled:this.disabled,ref:t=>this.selectRef=t},this.inheritedAttributes,{"aria-disabled":c(this.disabled),"aria-required":c(this.required),"aria-invalid":c(this.invalid)}),s("slot",{key:"cf2ebfd8dc2cdf49c3581ba0ba3fff959a50a221"}),Array.isArray(this.optionsState)&&this.optionsState.map((t=>{var e;const i=this.selectedValueIndex(t.value);return s("option",{value:t.value,selected:i>-1,disabled:t===null||t===void 0?void 0:t.disabled},(e=t.label)!==null&&e!==void 0?e:t.value)}))),this.h.hasSlot("sufix")&&s("slot",{key:"dddc8a99daeb345be9d778ade22622ae9ed35769",name:"sufix"})),this.hideSelectedList===false?s("ul",{role:"listbox",id:this.listId,class:a.list},Array.isArray(this.selectedOptionsState)&&this.selectedOptionsState.map((t=>{var e,i;const o=this.getOption(t);if(!o)return null;return s("li",{class:a.item,role:"option"},(e=o.label)!==null&&e!==void 0?e:o.value,s("gov-button",{"aria-label":(i="Odebrat vybranou položku "+o.label)!==null&&i!==void 0?i:o.value,color:"primary",type:"base",size:this.size,"on-gov-click":()=>this.onTagRemove(t)},s("gov-icon",{name:"x-lg",type:"components"})))}))):null)}onFocusHandler(t){t.stopPropagation();this.focused=true;this.govFocus.emit({component:a.root,originalEvent:t,value:this.selectedOptionsState})}onBlurHandler(t){t.stopPropagation();t.stopPropagation();this.focused=false;this.govBlur.emit({component:a.root,originalEvent:t,value:this.selectedOptionsState})}onInputHandler(t){this.valueState=t.detail.value;t.stopPropagation()}onSelectHandler(t){t.stopPropagation();const e=t.detail.selected;this.selectOption(e.value);this.valueState="";this.autocompleteRef.clearValue().finally();this.autocompleteRef.focus()}onTagRemove(t){this.removeOption(t)}async setFocus(t){return this.selectRef.focus(t)}async setValue(t){this.valueState=t}async getRef(){return this.selectRef}get host(){return this}static get watchers(){return{size:["validateSize"],options:["watchOptions"],value:["watchValue"]}}},[4,"gov-form-multi-select",{value:[1537],options:[1537],identifier:[1],placeholder:[1],size:[1],name:[1],hideSelectedList:[4,"hide-selected-list"],required:[4],disabled:[516],invalid:[516],success:[4],messageEmpty:[1,"message-empty"],messageLoading:[1,"message-loading"],focused:[32],valueState:[32],selectedOptionsState:[32],optionsState:[32],inheritedAttributes:[32],setFocus:[64],setValue:[64],getRef:[64]},undefined,{size:["validateSize"],options:["watchOptions"],value:["watchValue"]}]);function E(){if(typeof customElements==="undefined"){return}const t=["gov-form-multi-select","gov-button","gov-form-autocomplete","gov-form-input","gov-icon","gov-skeleton"];t.forEach((t=>{switch(t){case"gov-form-multi-select":if(!customElements.get(t)){customElements.define(t,O)}break;case"gov-button":if(!customElements.get(t)){b()}break;case"gov-form-autocomplete":if(!customElements.get(t)){y()}break;case"gov-form-input":if(!customElements.get(t)){k()}break;case"gov-icon":if(!customElements.get(t)){j()}break;case"gov-skeleton":if(!customElements.get(t)){w()}break}}))}E();const S=O;const x=E;export{S as GovFormMultiSelect,x as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-multi-select.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as s,h as o,d as a}from"./p-42200001.js";const c={root:"gov-form-password-power",bar:"gov-form-password-power__bar",text:"gov-form-password-power__text"};const r=e(class e extends s{constructor(){super();this.__registerHost();this.power=undefined}render(){return o(a,{key:"ca17606a7f29175d97da93daed3005a27b38d607",class:c.root},o("span",{key:"b2b80382c10034b88adb971db02c7e3f901453ee",class:c.bar},o("span",{key:"0c0de35b5c257c175281792765d3fec89f5ee498"}),o("span",{key:"92847bc51174d38543a2e0f9a1a7c3ba37fec6f4"}),o("span",{key:"7cc7a9cbda4c54c4d1269874a1f8d2b91e533bad"})),o("span",{key:"de62cf845c51d870e4fa1b1b6156348be8460d6b",class:c.text},o("slot",{key:"8132df44d6ce3f83f89d1d45b34c182850663571"})))}},[4,"gov-form-password-power",{power:[514]}]);function d(){if(typeof customElements==="undefined"){return}const e=["gov-form-password-power"];e.forEach((e=>{switch(e){case"gov-form-password-power":if(!customElements.get(e)){customElements.define(e,r)}break}}))}d();const t=r;const f=d;export{t as GovFormPasswordPower,f as defineCustomElement};
1
+ import{p as e,H as s,h as o,d as c}from"./p-115b9cf3.js";const a={root:"gov-form-password-power",bar:"gov-form-password-power__bar",text:"gov-form-password-power__text"};const r=e(class e extends s{constructor(){super();this.__registerHost();this.power=undefined}render(){return o(c,{key:"ca17606a7f29175d97da93daed3005a27b38d607",class:a.root},o("span",{key:"b2b80382c10034b88adb971db02c7e3f901453ee",class:a.bar},o("span",{key:"0c0de35b5c257c175281792765d3fec89f5ee498"}),o("span",{key:"92847bc51174d38543a2e0f9a1a7c3ba37fec6f4"}),o("span",{key:"7cc7a9cbda4c54c4d1269874a1f8d2b91e533bad"})),o("span",{key:"de62cf845c51d870e4fa1b1b6156348be8460d6b",class:a.text},o("slot",{key:"8132df44d6ce3f83f89d1d45b34c182850663571"})))}},[4,"gov-form-password-power",{power:[514]}]);function d(){if(typeof customElements==="undefined"){return}const e=["gov-form-password-power"];e.forEach((e=>{switch(e){case"gov-form-password-power":if(!customElements.get(e)){customElements.define(e,r)}break}}))}d();const t=r;const f=d;export{t as GovFormPasswordPower,f as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-password-power.js.map
@@ -1,2 +1,2 @@
1
- import{p as o,H as r,c as a,h as g,d as e}from"./p-42200001.js";import{d as i,a as t,b as p,c as n}from"./p-e44a0fee.js";import{g as m}from"./p-ea7fdd2e.js";import{v as l}from"./p-d8135701.js";import{t as f}from"./p-26618322.js";const v="gov-form-group,.gov-form-group,gov-form-radio-group,.gov-form-radio-group,gov-form-checkbox-group,.gov-form-checkbox-group{margin-top:0;margin-bottom:0;position:relative;display:flex;width:100%;flex-direction:column;align-items:flex-start}gov-form-group .gov-form-label__label,.gov-form-group .gov-form-label__label,gov-form-radio-group .gov-form-label__label,.gov-form-radio-group .gov-form-label__label,gov-form-checkbox-group .gov-form-label__label,.gov-form-checkbox-group .gov-form-label__label{margin:0}gov-form-group[orientation=horizontal],.gov-form-group[orientation=horizontal],gov-form-radio-group[orientation=horizontal],.gov-form-radio-group[orientation=horizontal],gov-form-checkbox-group[orientation=horizontal],.gov-form-checkbox-group[orientation=horizontal]{flex-direction:row;flex-wrap:wrap}gov-form-group[orientation=horizontal] .gov-form-label__label,.gov-form-group[orientation=horizontal] .gov-form-label__label,gov-form-radio-group[orientation=horizontal] .gov-form-label__label,.gov-form-radio-group[orientation=horizontal] .gov-form-label__label,gov-form-checkbox-group[orientation=horizontal] .gov-form-label__label,.gov-form-checkbox-group[orientation=horizontal] .gov-form-label__label{white-space:nowrap}gov-form-group[gap=xs],.gov-form-group[gap=xs],gov-form-radio-group[gap=xs],.gov-form-radio-group[gap=xs],gov-form-checkbox-group[gap=xs],.gov-form-checkbox-group[gap=xs]{gap:var(--gap, var(--spacing-xs-nudge))}gov-form-group[gap=s],.gov-form-group[gap=s],gov-form-radio-group[gap=s],.gov-form-radio-group[gap=s],gov-form-checkbox-group[gap=s],.gov-form-checkbox-group[gap=s]{gap:var(--gap, var(--spacing-s))}gov-form-group[gap=m],.gov-form-group[gap=m],gov-form-radio-group[gap=m],.gov-form-radio-group[gap=m],gov-form-checkbox-group[gap=m],.gov-form-checkbox-group[gap=m]{gap:var(--gap, var(--spacing-s-nudge))}gov-form-group[gap=l],.gov-form-group[gap=l],gov-form-radio-group[gap=l],.gov-form-radio-group[gap=l],gov-form-checkbox-group[gap=l],.gov-form-checkbox-group[gap=l]{gap:var(--gap, var(--spacing-m))}gov-form-group[gap=xl],.gov-form-group[gap=xl],gov-form-radio-group[gap=xl],.gov-form-radio-group[gap=xl],gov-form-checkbox-group[gap=xl],.gov-form-checkbox-group[gap=xl]{gap:var(--gap, var(--spacing-m-nudge))}";const s=v;const u=o(class o extends r{constructor(){super();this.__registerHost();this.govChange=a(this,"gov-change",7);this.handleChange=o=>{o.stopPropagation();this.value=o.detail.value;this.govChange.emit({value:this.value,component:i.root})};this.gap=undefined;this.orientation="vertical";this.value=undefined;this.h=m(this.host)}validateGap(o){if(o){l(p,o,t.root)}}validateOrientation(o){if(o){l(n,o,t.root)}}componentWillLoad(){this.validateGap(this.gap);this.validateOrientation(this.orientation)}componentDidRender(){f((()=>this.rerenderComponent()))}rerenderComponent(){this.host.querySelectorAll("gov-form-radio").forEach((o=>{if(!o.hasAttribute("listener-attached")){o.addEventListener("gov-change",this.handleChange)}o.setAttribute("listener-attached","true");o.checked=o.value===this.value}))}render(){return g(e,{key:"0526062e74e480edc22bdbbdf8c1f82a91ff463d",gap:this.gap,class:this.h.classes(t.root),value:this.value},g("slot",{key:"f11696b75d4f0c4bc72da3ca70d3111825edd36a"}))}get host(){return this}static get watchers(){return{gap:["validateGap"],orientation:["validateOrientation"]}}static get style(){return s}},[4,"gov-form-radio-group",{gap:[1],orientation:[1],value:[1025]},undefined,{gap:["validateGap"],orientation:["validateOrientation"]}]);function c(){if(typeof customElements==="undefined"){return}const o=["gov-form-radio-group"];o.forEach((o=>{switch(o){case"gov-form-radio-group":if(!customElements.get(o)){customElements.define(o,u)}break}}))}c();const d=u;const h=c;export{d as GovFormRadioGroup,h as defineCustomElement};
1
+ import{p as o,H as r,c as a,h as g,d as e}from"./p-115b9cf3.js";import{d as i,a as t,b as p,c as n}from"./p-e44a0fee.js";import{g as m}from"./p-ea7fdd2e.js";import{v as l}from"./p-0b3574c2.js";import{t as f}from"./p-26618322.js";const v="gov-form-group,.gov-form-group,gov-form-radio-group,.gov-form-radio-group,gov-form-checkbox-group,.gov-form-checkbox-group{margin-top:0;margin-bottom:0;position:relative;display:flex;width:100%;flex-direction:column;align-items:flex-start}gov-form-group .gov-form-label__label,.gov-form-group .gov-form-label__label,gov-form-radio-group .gov-form-label__label,.gov-form-radio-group .gov-form-label__label,gov-form-checkbox-group .gov-form-label__label,.gov-form-checkbox-group .gov-form-label__label{margin:0}gov-form-group[orientation=horizontal],.gov-form-group[orientation=horizontal],gov-form-radio-group[orientation=horizontal],.gov-form-radio-group[orientation=horizontal],gov-form-checkbox-group[orientation=horizontal],.gov-form-checkbox-group[orientation=horizontal]{flex-direction:row;flex-wrap:wrap}gov-form-group[orientation=horizontal] .gov-form-label__label,.gov-form-group[orientation=horizontal] .gov-form-label__label,gov-form-radio-group[orientation=horizontal] .gov-form-label__label,.gov-form-radio-group[orientation=horizontal] .gov-form-label__label,gov-form-checkbox-group[orientation=horizontal] .gov-form-label__label,.gov-form-checkbox-group[orientation=horizontal] .gov-form-label__label{white-space:nowrap}gov-form-group[gap=xs],.gov-form-group[gap=xs],gov-form-radio-group[gap=xs],.gov-form-radio-group[gap=xs],gov-form-checkbox-group[gap=xs],.gov-form-checkbox-group[gap=xs]{gap:var(--gap, var(--spacing-xs-nudge))}gov-form-group[gap=s],.gov-form-group[gap=s],gov-form-radio-group[gap=s],.gov-form-radio-group[gap=s],gov-form-checkbox-group[gap=s],.gov-form-checkbox-group[gap=s]{gap:var(--gap, var(--spacing-s))}gov-form-group[gap=m],.gov-form-group[gap=m],gov-form-radio-group[gap=m],.gov-form-radio-group[gap=m],gov-form-checkbox-group[gap=m],.gov-form-checkbox-group[gap=m]{gap:var(--gap, var(--spacing-s-nudge))}gov-form-group[gap=l],.gov-form-group[gap=l],gov-form-radio-group[gap=l],.gov-form-radio-group[gap=l],gov-form-checkbox-group[gap=l],.gov-form-checkbox-group[gap=l]{gap:var(--gap, var(--spacing-m))}gov-form-group[gap=xl],.gov-form-group[gap=xl],gov-form-radio-group[gap=xl],.gov-form-radio-group[gap=xl],gov-form-checkbox-group[gap=xl],.gov-form-checkbox-group[gap=xl]{gap:var(--gap, var(--spacing-m-nudge))}";const s=v;const c=o(class o extends r{constructor(){super();this.__registerHost();this.govChange=a(this,"gov-change",7);this.handleChange=o=>{o.stopPropagation();this.value=o.detail.value;this.govChange.emit({value:this.value,component:i.root})};this.gap=undefined;this.orientation="vertical";this.value=undefined;this.h=m(this.host)}validateGap(o){if(o){l(p,o,t.root)}}validateOrientation(o){if(o){l(n,o,t.root)}}componentWillLoad(){this.validateGap(this.gap);this.validateOrientation(this.orientation)}componentDidRender(){f((()=>this.rerenderComponent()))}rerenderComponent(){this.host.querySelectorAll("gov-form-radio").forEach((o=>{if(!o.hasAttribute("listener-attached")){o.addEventListener("gov-change",this.handleChange)}o.setAttribute("listener-attached","true");o.checked=o.value===this.value}))}render(){return g(e,{key:"0526062e74e480edc22bdbbdf8c1f82a91ff463d",gap:this.gap,class:this.h.classes(t.root),value:this.value},g("slot",{key:"f11696b75d4f0c4bc72da3ca70d3111825edd36a"}))}get host(){return this}static get watchers(){return{gap:["validateGap"],orientation:["validateOrientation"]}}static get style(){return s}},[4,"gov-form-radio-group",{gap:[1],orientation:[1],value:[1025]},undefined,{gap:["validateGap"],orientation:["validateOrientation"]}]);function u(){if(typeof customElements==="undefined"){return}const o=["gov-form-radio-group"];o.forEach((o=>{switch(o){case"gov-form-radio-group":if(!customElements.get(o)){customElements.define(o,c)}break}}))}u();const d=c;const h=u;export{d as GovFormRadioGroup,h as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-radio-group.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as i,c as s,h as e,d as h}from"./p-42200001.js";import{c as a}from"./p-cd6c2938.js";import{v as n}from"./p-d8135701.js";import{g as o,j as r,k as d}from"./p-9908b9f0.js";import{g as l,c,t as u}from"./p-ea7fdd2e.js";import{F as f}from"./p-1c1d0bbe.js";import{i as m,A as p,a as v}from"./p-33d5d1ed.js";const b=t(class t extends i{constructor(){super();this.__registerHost();this.govFocus=s(this,"gov-focus",7);this.govBlur=s(this,"gov-blur",7);this.govChange=s(this,"gov-change",7);this.hydrated=false;this.value=undefined;this.noLabel=false;this.checked=false;this.required=false;this.disabled=false;this.name=undefined;this.size="m";this.identifier=undefined;this.invalid=undefined;this.inheritedAttributes={};this.radioId=a("GovRadio");this.h=l(this.host);this.f=o(this.h)}validateSize(t){n(d,t,r.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",c(this.invalid));this.f.passAttrToControl("disabled",c(this.disabled));this.f.passAttrToControl("type","radio")}componentWillLoad(){this.inheritedAttributes=m(this.host)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(v)}async componentDidRender(){this.f.passAttrToLabel("identifier",this.identifier||this.radioId);this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs()}connectedCallback(){this.hydrated=true}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,i){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:i})}render(){const t=t=>{if(this.noLabel){return e("label",{class:r.label},t)}return t};return e(h,{class:r.root,hydrated:this.hydrated,checked:this.checked,size:this.size,invalid:u(this.invalid)},t(e(f,null,e("input",Object.assign({class:r.input,id:this.identifier||this.radioId,type:"radio",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled,onClick:this.onClickHandler.bind(this),onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),ref:t=>this.inputRef=t,required:this.required},this.inheritedAttributes,{"aria-checked":this.checked,"aria-required":u(this.required),"aria-invalid":u(this.invalid),"aria-disabled":u(this.disabled)})),e("span",null,e("slot",{name:"label"})))))}onClickHandler(t){t.stopPropagation()}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}onChangeHandler(t){this.checked=t.target.checked;t.stopPropagation();this.govChange.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}async getRef(){return this.inputRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}},[4,"gov-form-radio",{value:[1],noLabel:[4,"no-label"],checked:[1540],required:[4],disabled:[516],name:[1],size:[1],identifier:[1],invalid:[4],inheritedAttributes:[32],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}]);function g(){if(typeof customElements==="undefined"){return}const t=["gov-form-radio"];t.forEach((t=>{switch(t){case"gov-form-radio":if(!customElements.get(t)){customElements.define(t,b)}break}}))}g();const C=b;const k=g;export{C as GovFormRadio,k as defineCustomElement};
1
+ import{p as t,H as i,c as s,h as e,d as h}from"./p-115b9cf3.js";import{c as a}from"./p-cd6c2938.js";import{v as n}from"./p-0b3574c2.js";import{g as o,j as r,k as d}from"./p-9908b9f0.js";import{g as c,c as l,t as u}from"./p-ea7fdd2e.js";import{F as f}from"./p-1c1d0bbe.js";import{i as m,A as p,a as v}from"./p-33d5d1ed.js";const b=t(class t extends i{constructor(){super();this.__registerHost();this.govFocus=s(this,"gov-focus",7);this.govBlur=s(this,"gov-blur",7);this.govChange=s(this,"gov-change",7);this.hydrated=false;this.value=undefined;this.noLabel=false;this.checked=false;this.required=false;this.disabled=false;this.name=undefined;this.size="m";this.identifier=undefined;this.invalid=undefined;this.inheritedAttributes={};this.radioId=a("GovRadio");this.h=c(this.host);this.f=o(this.h)}validateSize(t){n(d,t,r.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",l(this.invalid));this.f.passAttrToControl("disabled",l(this.disabled));this.f.passAttrToControl("type","radio")}componentWillLoad(){this.inheritedAttributes=m(this.host)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(v)}async componentDidRender(){this.f.passAttrToLabel("identifier",this.identifier||this.radioId);this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs()}connectedCallback(){this.hydrated=true}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,i){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:i})}render(){const t=t=>{if(this.noLabel){return e("label",{class:r.label},t)}return t};return e(h,{class:r.root,hydrated:this.hydrated,checked:this.checked,size:this.size,invalid:u(this.invalid)},t(e(f,null,e("input",Object.assign({class:r.input,id:this.identifier||this.radioId,type:"radio",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled,onClick:this.onClickHandler.bind(this),onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),ref:t=>this.inputRef=t,required:this.required},this.inheritedAttributes,{"aria-checked":this.checked,"aria-required":u(this.required),"aria-invalid":u(this.invalid),"aria-disabled":u(this.disabled)})),e("span",null,e("slot",{name:"label"})))))}onClickHandler(t){t.stopPropagation()}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}onChangeHandler(t){this.checked=t.target.checked;t.stopPropagation();this.govChange.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}async getRef(){return this.inputRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}},[4,"gov-form-radio",{value:[1],noLabel:[4,"no-label"],checked:[1540],required:[4],disabled:[516],name:[1],size:[1],identifier:[1],invalid:[4],inheritedAttributes:[32],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}]);function g(){if(typeof customElements==="undefined"){return}const t=["gov-form-radio"];t.forEach((t=>{switch(t){case"gov-form-radio":if(!customElements.get(t)){customElements.define(t,b)}break}}))}g();const C=b;const k=g;export{C as GovFormRadio,k as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-radio.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["GovFormRadio","proxyCustomElement","H","constructor","this","hydrated","radioId","createID","h","govHost","host","f","govForm","validateSize","newValue","validateProp","FormRadioSizes","FormRadioClass","root","watchControlAttrs","passControlAttrs","passAttrToControl","size","toBoolAttr","invalid","disabled","componentWillLoad","inheritedAttributes","inheritAriaAttributes","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentDidRender","passAttrToLabel","identifier","String","required","connectedCallback","disconnectedCallback","stopObserving","removeAttribute","Object","assign","render","wrapRadio","children","noLabel","class","label","Host","checked","toBoolAttrIfDefined","Fragment","input","id","type","value","name","onClick","onClickHandler","bind","onChange","onChangeHandler","onFocus","onFocusHandler","onBlur","onBlurHandler","ref","el","inputRef","e","stopPropagation","govFocus","emit","component","originalEvent","govBlur","target","govChange","getRef"],"sources":["../../../packages/core/src/components/gov-form/radio/gov-form-radio.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormRadioClass, FormRadioSizes, FormRadioSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport {FormRadioEvent} from \"./gov-form-radio.types\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\n\n@Component({\n\ttag: \"gov-form-radio\",\n})\nexport class GovFormRadio {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly radioId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.radioId = createID(\"GovRadio\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormRadioElement\n\t/**\n\t * Value of radio\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Radio button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the radio component disabled.\n\t * This prevents users from being able to interact with the radio, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Name of the radio.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Radio's size.\n\t */\n\t@Prop() readonly size?: FormRadioSizesType = \"m\"\n\t/**\n\t * Custom radio identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\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 radio has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormRadioEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormRadioSizes, newValue, FormRadioClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\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(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"radio\")\n\t}\n\n\n\tcomponentWillLoad() {\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\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\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.radioId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\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\tconst wrapRadio = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn <label class={FormRadioClass.label}>{children}</label>\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormRadioClass.root} hydrated={this.hydrated} checked={this.checked} size={this.size}\n\t\t\t\t invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapRadio(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={FormRadioClass.input}\n\t\t\t\t\t\t\tid={this.identifier || this.radioId}\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\"/>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"names":["GovFormRadio","proxyCustomElement","H","constructor","this","hydrated","radioId","createID","h","govHost","host","f","govForm","validateSize","newValue","validateProp","FormRadioSizes","FormRadioClass","root","watchControlAttrs","passControlAttrs","passAttrToControl","size","toBoolAttr","invalid","disabled","componentWillLoad","inheritedAttributes","inheritAriaAttributes","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentDidRender","passAttrToLabel","identifier","String","required","connectedCallback","disconnectedCallback","stopObserving","removeAttribute","Object","assign","render","wrapRadio","children","noLabel","class","label","Host","checked","toBoolAttrIfDefined","Fragment","input","id","type","value","name","onClick","onClickHandler","bind","onChange","onChangeHandler","onFocus","onFocusHandler","onBlur","onBlurHandler","ref","el","inputRef","e","stopPropagation","govFocus","emit","component","originalEvent","govBlur","target","govChange","getRef"],"sources":["../../../packages/core/src/components/gov-form/radio/gov-form-radio.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormRadioClass, FormRadioSizes, FormRadioSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport {FormRadioEvent} from \"./gov-form-radio.types\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\n\n@Component({\n\ttag: \"gov-form-radio\",\n})\nexport class GovFormRadio {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly radioId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.radioId = createID(\"GovRadio\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormRadioElement\n\t/**\n\t * Value of radio\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Radio button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the radio component disabled.\n\t * This prevents users from being able to interact with the radio, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Name of the radio.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Radio's size.\n\t */\n\t@Prop() readonly size?: FormRadioSizesType = \"m\"\n\t/**\n\t * Custom radio identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\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 radio has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormRadioEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormRadioSizes, newValue, FormRadioClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\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(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"radio\")\n\t}\n\n\n\tcomponentWillLoad() {\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\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\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.radioId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\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\tconst wrapRadio = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn <label class={FormRadioClass.label}>{children}</label>\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormRadioClass.root} hydrated={this.hydrated} checked={this.checked} size={this.size}\n\t\t\t\t invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapRadio(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={FormRadioClass.input}\n\t\t\t\t\t\t\tid={this.identifier || this.radioId}\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\"/>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as e,H as s,h as t,d as o}from"./p-42200001.js";import{C as r}from"./p-5aad3497.js";import{p as a}from"./p-e0e2e9c1.js";import{S as c}from"./p-92f420cb.js";a(c,["_S","_M","_L"]);a(r,["PRIMARY","NEUTRAL"]);const f={root:"gov-form-search"};const n=e(class e extends s{constructor(){super();this.__registerHost();this.size="m";this.color="neutral"}render(){return t(o,{key:"05f033c30dffd615b36b181535329704d46665ae",class:f.root,color:this.color,size:this.size},t("slot",{key:"7c7fb4e2d90ace38aef4b63454e1f9513903977c",name:"input"}),t("slot",{key:"92484cbbbae29ba45bb963f80da8237d9406a91b",name:"button-erase"}),t("slot",{key:"92ebb818ee922d790534ffb7816be400ff4a1f98",name:"button"}))}get host(){return this}},[4,"gov-form-search",{size:[1],color:[513]}]);function m(){if(typeof customElements==="undefined"){return}const e=["gov-form-search"];e.forEach((e=>{switch(e){case"gov-form-search":if(!customElements.get(e)){customElements.define(e,n)}break}}))}m();const b=n;const i=m;export{b as GovFormSearch,i as defineCustomElement};
1
+ import{p as e,H as s,h as t,d as o}from"./p-115b9cf3.js";import{C as r}from"./p-5aad3497.js";import{p as c}from"./p-e0e2e9c1.js";import{S as a}from"./p-92f420cb.js";c(a,["_S","_M","_L"]);c(r,["PRIMARY","NEUTRAL"]);const f={root:"gov-form-search"};const n=e(class e extends s{constructor(){super();this.__registerHost();this.size="m";this.color="neutral"}render(){return t(o,{key:"05f033c30dffd615b36b181535329704d46665ae",class:f.root,color:this.color,size:this.size},t("slot",{key:"7c7fb4e2d90ace38aef4b63454e1f9513903977c",name:"input"}),t("slot",{key:"92484cbbbae29ba45bb963f80da8237d9406a91b",name:"button-erase"}),t("slot",{key:"92ebb818ee922d790534ffb7816be400ff4a1f98",name:"button"}))}get host(){return this}},[4,"gov-form-search",{size:[1],color:[513]}]);function m(){if(typeof customElements==="undefined"){return}const e=["gov-form-search"];e.forEach((e=>{switch(e){case"gov-form-search":if(!customElements.get(e)){customElements.define(e,n)}break}}))}m();const b=n;const i=m;export{b as GovFormSearch,i as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-search.js.map
@@ -1,2 +1,2 @@
1
- import{G as o,d as s}from"./p-d7d988d7.js";const d=o;const t=s;export{d as GovFormSelect,t as defineCustomElement};
1
+ import{G as o,d as s}from"./p-7d808445.js";const t=o;const p=s;export{t as GovFormSelect,p as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-select.js.map
@@ -1,2 +1,2 @@
1
- import{p as i,H as s,c as t,h as e,d as h}from"./p-42200001.js";import{c as a}from"./p-cd6c2938.js";import{v as n}from"./p-d8135701.js";import{g as o,n as c,o as d}from"./p-9908b9f0.js";import{g as r,c as l,t as u}from"./p-ea7fdd2e.js";import{F as m}from"./p-1c1d0bbe.js";import{A as f,a as p,i as b}from"./p-33d5d1ed.js";import{d as v}from"./p-16e68a91.js";const g=i(class i extends s{constructor(){super();this.__registerHost();this.govFocus=t(this,"gov-focus",7);this.govBlur=t(this,"gov-blur",7);this.govChange=t(this,"gov-change",7);this.hydrated=false;this.value=undefined;this.noLabel=false;this.checked=false;this.required=false;this.disabled=false;this.name=undefined;this.size="m";this.identifier=undefined;this.invalid=undefined;this.inheritedAttributes={};this.checkboxId=a("GovCheckbox");this.h=r(this.host);this.f=o(this.h)}validateSize(i){n(d,i,c.root)}watchDisabled(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",l(this.invalid));this.f.passAttrToControl("disabled",l(this.disabled));this.f.passAttrToControl("type","switch")}componentDidLoad(){this.attributeObserver=new f(this.host,((i,s)=>{this.onAriaAttributeChange(i,s)}));this.attributeObserver.startObserving(p)}componentWillLoad(){this.passControlAttrs();this.inheritedAttributes=b(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}async componentDidRender(){this.f.passAttrToLabel("identifier",this.identifier||this.checkboxId);this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs()}connectedCallback(){this.hydrated=true}onAriaAttributeChange(i,s){this.host.removeAttribute(i);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[i]:s})}render(){const i=i=>{if(this.noLabel){return e("label",{class:c.label},i)}return i};return e(h,{class:this.h.classes(c.root),hydrated:this.hydrated,checked:this.checked,size:this.size,invalid:u(this.invalid)},i(e(m,null,e("input",Object.assign({class:c.input,id:this.identifier||this.checkboxId,type:"checkbox",value:this.value,name:this.name,disabled:this.disabled,checked:this.checked,onClick:this.onClickHandler.bind(this),onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),ref:i=>this.inputRef=i,required:this.required},this.inheritedAttributes,{"aria-checked":this.checked,"aria-required":u(this.required),"aria-invalid":u(this.invalid),"aria-disabled":u(this.disabled)})),e("span",null,e("span",{class:c.indicator},this.checked&&e("gov-icon",{name:"check-lg",type:"components"})),e("slot",{name:"label"})))))}onClickHandler(i){i.stopPropagation()}onFocusHandler(i){i.stopPropagation();this.govFocus.emit({component:c.root,checked:this.checked,value:this.value,originalEvent:i})}onBlurHandler(i){i.stopPropagation();this.govBlur.emit({component:c.root,checked:this.checked,value:this.value,originalEvent:i})}onChangeHandler(i){this.checked=i.target.checked;i.stopPropagation();this.govChange.emit({component:c.root,checked:this.checked,value:this.value,originalEvent:i})}async getRef(){return this.inputRef}get host(){return this}static get watchers(){return{size:["validateSize","watchDisabled"],disabled:["watchDisabled"],invalid:["watchDisabled"]}}},[4,"gov-form-switch",{value:[1],noLabel:[4,"no-label"],checked:[1540],required:[4],disabled:[516],name:[1],size:[513],identifier:[1],invalid:[4],inheritedAttributes:[32],getRef:[64]},undefined,{size:["validateSize","watchDisabled"],disabled:["watchDisabled"],invalid:["watchDisabled"]}]);function k(){if(typeof customElements==="undefined"){return}const i=["gov-form-switch","gov-icon"];i.forEach((i=>{switch(i){case"gov-form-switch":if(!customElements.get(i)){customElements.define(i,g)}break;case"gov-icon":if(!customElements.get(i)){v()}break}}))}k();const w=g;const j=k;export{w as GovFormSwitch,j as defineCustomElement};
1
+ import{p as i,H as s,c as t,h as e,d as h}from"./p-115b9cf3.js";import{c as a}from"./p-cd6c2938.js";import{v as n}from"./p-0b3574c2.js";import{g as o,n as c,o as d}from"./p-9908b9f0.js";import{g as r,c as l,t as u}from"./p-ea7fdd2e.js";import{F as m}from"./p-1c1d0bbe.js";import{A as f,a as b,i as p}from"./p-33d5d1ed.js";import{d as v}from"./p-88b2667e.js";const g=i(class i extends s{constructor(){super();this.__registerHost();this.govFocus=t(this,"gov-focus",7);this.govBlur=t(this,"gov-blur",7);this.govChange=t(this,"gov-change",7);this.hydrated=false;this.value=undefined;this.noLabel=false;this.checked=false;this.required=false;this.disabled=false;this.name=undefined;this.size="m";this.identifier=undefined;this.invalid=undefined;this.inheritedAttributes={};this.checkboxId=a("GovCheckbox");this.h=r(this.host);this.f=o(this.h)}validateSize(i){n(d,i,c.root)}watchDisabled(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",l(this.invalid));this.f.passAttrToControl("disabled",l(this.disabled));this.f.passAttrToControl("type","switch")}componentDidLoad(){this.attributeObserver=new f(this.host,((i,s)=>{this.onAriaAttributeChange(i,s)}));this.attributeObserver.startObserving(b)}componentWillLoad(){this.passControlAttrs();this.inheritedAttributes=p(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}async componentDidRender(){this.f.passAttrToLabel("identifier",this.identifier||this.checkboxId);this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs()}connectedCallback(){this.hydrated=true}onAriaAttributeChange(i,s){this.host.removeAttribute(i);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[i]:s})}render(){const i=i=>{if(this.noLabel){return e("label",{class:c.label},i)}return i};return e(h,{class:this.h.classes(c.root),hydrated:this.hydrated,checked:this.checked,size:this.size,invalid:u(this.invalid)},i(e(m,null,e("input",Object.assign({class:c.input,id:this.identifier||this.checkboxId,type:"checkbox",value:this.value,name:this.name,disabled:this.disabled,checked:this.checked,onClick:this.onClickHandler.bind(this),onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),ref:i=>this.inputRef=i,required:this.required},this.inheritedAttributes,{"aria-checked":this.checked,"aria-required":u(this.required),"aria-invalid":u(this.invalid),"aria-disabled":u(this.disabled)})),e("span",null,e("span",{class:c.indicator},this.checked&&e("gov-icon",{name:"check-lg",type:"components"})),e("slot",{name:"label"})))))}onClickHandler(i){i.stopPropagation()}onFocusHandler(i){i.stopPropagation();this.govFocus.emit({component:c.root,checked:this.checked,value:this.value,originalEvent:i})}onBlurHandler(i){i.stopPropagation();this.govBlur.emit({component:c.root,checked:this.checked,value:this.value,originalEvent:i})}onChangeHandler(i){this.checked=i.target.checked;i.stopPropagation();this.govChange.emit({component:c.root,checked:this.checked,value:this.value,originalEvent:i})}async getRef(){return this.inputRef}get host(){return this}static get watchers(){return{size:["validateSize","watchDisabled"],disabled:["watchDisabled"],invalid:["watchDisabled"]}}},[4,"gov-form-switch",{value:[1],noLabel:[4,"no-label"],checked:[1540],required:[4],disabled:[516],name:[1],size:[513],identifier:[1],invalid:[4],inheritedAttributes:[32],getRef:[64]},undefined,{size:["validateSize","watchDisabled"],disabled:["watchDisabled"],invalid:["watchDisabled"]}]);function k(){if(typeof customElements==="undefined"){return}const i=["gov-form-switch","gov-icon"];i.forEach((i=>{switch(i){case"gov-form-switch":if(!customElements.get(i)){customElements.define(i,g)}break;case"gov-icon":if(!customElements.get(i)){v()}break}}))}k();const w=g;const j=k;export{w as GovFormSwitch,j as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-switch.js.map
@@ -1,2 +1,2 @@
1
- import{p as s,H as e,h as i,d as t}from"./p-42200001.js";import{a as d}from"./p-880743a5.js";import{g as n}from"./p-ea7fdd2e.js";const o=s(class s extends e{constructor(){super();this.__registerHost();this.size="12/12";this.sizeSm=undefined;this.sizeMd=undefined;this.sizeLg=undefined;this.sizeXl=undefined;this.h=n(this.host)}render(){return i(t,{key:"e1dc6e3517618361ab3b5e3ad499a5bbbaae3d6a",class:this.h.classes(d.root),role:"listitem",size:this.size,"size-sm":this.sizeSm,"size-md":this.sizeMd,"size-lg":this.sizeLg,"size-xl":this.sizeXl},i("slot",{key:"53780db95fa728f252302cb86923ad9e9fcd9b66"}))}get host(){return this}},[4,"gov-grid-item",{size:[1],sizeSm:[1,"size-sm"],sizeMd:[1,"size-md"],sizeLg:[1,"size-lg"],sizeXl:[1,"size-xl"]}]);function r(){if(typeof customElements==="undefined"){return}const s=["gov-grid-item"];s.forEach((s=>{switch(s){case"gov-grid-item":if(!customElements.get(s)){customElements.define(s,o)}break}}))}r();const m=o;const a=r;export{m as GovGridItem,a as defineCustomElement};
1
+ import{p as s,H as e,h as i,d as t}from"./p-115b9cf3.js";import{a as d}from"./p-880743a5.js";import{g as n}from"./p-ea7fdd2e.js";const o=s(class s extends e{constructor(){super();this.__registerHost();this.size="12/12";this.sizeSm=undefined;this.sizeMd=undefined;this.sizeLg=undefined;this.sizeXl=undefined;this.h=n(this.host)}render(){return i(t,{key:"e1dc6e3517618361ab3b5e3ad499a5bbbaae3d6a",class:this.h.classes(d.root),role:"listitem",size:this.size,"size-sm":this.sizeSm,"size-md":this.sizeMd,"size-lg":this.sizeLg,"size-xl":this.sizeXl},i("slot",{key:"53780db95fa728f252302cb86923ad9e9fcd9b66"}))}get host(){return this}},[4,"gov-grid-item",{size:[1],sizeSm:[1,"size-sm"],sizeMd:[1,"size-md"],sizeLg:[1,"size-lg"],sizeXl:[1,"size-xl"]}]);function r(){if(typeof customElements==="undefined"){return}const s=["gov-grid-item"];s.forEach((s=>{switch(s){case"gov-grid-item":if(!customElements.get(s)){customElements.define(s,o)}break}}))}r();const m=o;const a=r;export{m as GovGridItem,a as defineCustomElement};
2
2
  //# sourceMappingURL=gov-grid-item.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as s,h as t,d as i}from"./p-42200001.js";import{G as n}from"./p-880743a5.js";import{g as a}from"./p-ea7fdd2e.js";const o=e(class e extends s{constructor(){super();this.__registerHost();this.alignX=undefined;this.alignY=undefined;this.h=a(this.host)}render(){return t(i,{key:"d2f4e42a186e0d8020abc96ef3ca0956e1492d05",class:this.h.classes(n.root),"align-x":this.alignX,"align-y":this.alignY,role:"list"},t("slot",{key:"46c60ccdda81ce271aeaca46bead1bf33e22c041"}))}get host(){return this}},[4,"gov-grid",{alignX:[1,"align-x"],alignY:[1,"align-y"]}]);function r(){if(typeof customElements==="undefined"){return}const e=["gov-grid"];e.forEach((e=>{switch(e){case"gov-grid":if(!customElements.get(e)){customElements.define(e,o)}break}}))}r();const c=o;const d=r;export{c as GovGrid,d as defineCustomElement};
1
+ import{p as e,H as s,h as t,d as i}from"./p-115b9cf3.js";import{G as n}from"./p-880743a5.js";import{g as a}from"./p-ea7fdd2e.js";const o=e(class e extends s{constructor(){super();this.__registerHost();this.alignX=undefined;this.alignY=undefined;this.h=a(this.host)}render(){return t(i,{key:"d2f4e42a186e0d8020abc96ef3ca0956e1492d05",class:this.h.classes(n.root),"align-x":this.alignX,"align-y":this.alignY,role:"list"},t("slot",{key:"46c60ccdda81ce271aeaca46bead1bf33e22c041"}))}get host(){return this}},[4,"gov-grid",{alignX:[1,"align-x"],alignY:[1,"align-y"]}]);function c(){if(typeof customElements==="undefined"){return}const e=["gov-grid"];e.forEach((e=>{switch(e){case"gov-grid":if(!customElements.get(e)){customElements.define(e,o)}break}}))}c();const r=o;const d=c;export{r as GovGrid,d as defineCustomElement};
2
2
  //# sourceMappingURL=gov-grid.js.map
@@ -1,2 +1,2 @@
1
- import{G as o,d as s}from"./p-16e68a91.js";const t=o;const a=s;export{t as GovIcon,a as defineCustomElement};
1
+ import{G as o,d as s}from"./p-88b2667e.js";const t=o;const p=s;export{t as GovIcon,p as defineCustomElement};
2
2
  //# sourceMappingURL=gov-icon.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,c as s,h as o,d as i}from"./p-42200001.js";import{g as a,c as n}from"./p-ea7fdd2e.js";import{F as c}from"./p-1c1d0bbe.js";import{v as l}from"./p-d8135701.js";import{C as r}from"./p-5aad3497.js";import{p as h}from"./p-e0e2e9c1.js";import{A as b,a as d,i as f}from"./p-33d5d1ed.js";import{d as m}from"./p-6a473654.js";import{d as p}from"./p-16e68a91.js";const g=h(r,["PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);var v;(function(e){e["BOLD"]="bold";e["SUBTLE"]="subtle"})(v||(v={}));const u={root:"gov-infobar",section:"gov-infobar__section",content:"gov-infobar__content",headline:"gov-infobar__headline",close:"gov-infobar__close"};const y=e(class e extends t{constructor(){super();this.__registerHost();this.govClose=s(this,"gov-close",7);this.color="primary";this.type="bold";this.role=undefined;this.accessibleCloseLabel="Zavřít informační lištu";this.accessibleToggleLabel="Zobrazit více informací";this.closable=false;this.toggleContent=false;this.inheritedAttributes={};this.h=a(this.host)}validateColor(e){l(g,e,u.root)}componentDidLoad(){this.attributeObserver=new b(this.host,((e,t)=>{this.onAriaAttributeChange(e,t)}));this.attributeObserver.startObserving(d)}componentWillLoad(){this.validateColor(this.color);this.inheritedAttributes=f(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(e,t){this.host.removeAttribute(e);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[e]:t})}render(){const e=o("gov-button",{key:"03f7921b0eef199be48f021a23f431cfb116d001",size:"s","aria-label":this.accessibleCloseLabel,type:"base",color:this.isBold?this.color:"neutral","on-gov-click":this.onCloseHandler.bind(this),class:u.close},o("gov-icon",{key:"5b8385ff70a5ae33032451d56e1d1a2e4938656e",name:"x-lg",type:"components"}));return o(i,{key:"cb9dbd10b36253597b3190b5ec6558761cf32ffb",class:this.h.classes(u.root),color:this.color,type:this.type},o("section",Object.assign({key:"301e4d6b31069183e7a84015bebe0ca9ffc0c667",class:u.section},this.inheritedAttributes,{role:this.role}),o("slot",{key:"a0cb4376440cc034c501dcb41f0f8912e6331a0a",name:"icon"}),o("div",{key:"99f1c4dbf739de828c10277e83a3c94e9aaf68bd",class:u.content},this.h.hasSlot("headline")?o(c,null,o("div",{class:u.headline},o("slot",{name:"headline"}),o("gov-button",{size:"s",type:"base",color:this.isBold?this.color:"neutral","aria-label":this.accessibleToggleLabel,"on-gov-click":()=>this.toggleContent=!this.toggleContent},o("gov-icon",{name:this.toggleContent?"chevron-up":"chevron-down",type:"components"}))),o("div",{hidden:!this.toggleContent,"aria-hidden":n(this.toggleContent)},o("slot",null))):o("slot",null)),this.closable&&e))}onCloseHandler(e){this.govClose.emit({component:u.root,ref:this.host,originalEvent:e})}get isBold(){return this.type==="bold"}get host(){return this}static get watchers(){return{color:["validateColor"]}}},[4,"gov-infobar",{color:[1],type:[1],role:[1],accessibleCloseLabel:[1,"accessible-close-label"],accessibleToggleLabel:[1,"accessible-toggle-label"],closable:[4],toggleContent:[32],inheritedAttributes:[32]},undefined,{color:["validateColor"]}]);function j(){if(typeof customElements==="undefined"){return}const e=["gov-infobar","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-infobar":if(!customElements.get(e)){customElements.define(e,y)}break;case"gov-button":if(!customElements.get(e)){m()}break;case"gov-icon":if(!customElements.get(e)){p()}break}}))}j();const k=y;const C=j;export{k as GovInfobar,C as defineCustomElement};
1
+ import{p as e,H as t,c as s,h as o,d as i}from"./p-115b9cf3.js";import{g as a,c as n}from"./p-ea7fdd2e.js";import{F as c}from"./p-1c1d0bbe.js";import{v as l}from"./p-0b3574c2.js";import{C as r}from"./p-5aad3497.js";import{p as b}from"./p-e0e2e9c1.js";import{A as d,a as h,i as f}from"./p-33d5d1ed.js";import{d as m}from"./p-9992e831.js";import{d as p}from"./p-88b2667e.js";const g=b(r,["PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);var v;(function(e){e["BOLD"]="bold";e["SUBTLE"]="subtle"})(v||(v={}));const u={root:"gov-infobar",section:"gov-infobar__section",content:"gov-infobar__content",headline:"gov-infobar__headline",close:"gov-infobar__close"};const y=e(class e extends t{constructor(){super();this.__registerHost();this.govClose=s(this,"gov-close",7);this.color="primary";this.type="bold";this.role=undefined;this.accessibleCloseLabel="Zavřít informační lištu";this.accessibleToggleLabel="Zobrazit více informací";this.closable=false;this.toggleContent=false;this.inheritedAttributes={};this.h=a(this.host)}validateColor(e){l(g,e,u.root)}componentDidLoad(){this.attributeObserver=new d(this.host,((e,t)=>{this.onAriaAttributeChange(e,t)}));this.attributeObserver.startObserving(h)}componentWillLoad(){this.validateColor(this.color);this.inheritedAttributes=f(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(e,t){this.host.removeAttribute(e);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[e]:t})}render(){const e=o("gov-button",{key:"2d0597a56f6edb97e7feff654ba98885fa48033a",size:"s","aria-label":this.accessibleCloseLabel,type:"base",color:this.isBold?this.color:"neutral","on-gov-click":this.onCloseHandler.bind(this),class:u.close},o("gov-icon",{key:"c17ba542b02a4910a136eec6cb4556d1857dffb2",name:"x-lg",type:"components"}));return o(i,{key:"d71d1b8ffe158de90f3fb520bd996a8246988d3d",class:this.h.classes(u.root),color:this.color,type:this.type},o("section",Object.assign({key:"12cce82faa13fa39135fe92b0ab61bc2b01fa083",class:u.section},this.inheritedAttributes,{role:this.role}),o("slot",{key:"bc48d4e5dfad03cd9c54054225a4c3db0ec09cd9",name:"icon"}),o("div",{key:"70422e59cb69504d1aca5d45b9f9700b35b344f0",class:u.content},this.h.hasSlot("headline")?o(c,null,o("div",{class:u.headline},o("slot",{name:"headline"}),o("gov-button",{size:"s",type:"base",color:this.isBold?this.color:"neutral","aria-label":this.accessibleToggleLabel,"on-gov-click":()=>this.toggleContent=!this.toggleContent},o("gov-icon",{name:this.toggleContent?"chevron-up":"chevron-down",type:"components"}))),o("div",{hidden:!this.toggleContent,"aria-hidden":n(this.toggleContent)},o("slot",null))):o("slot",null)),this.closable&&e))}onCloseHandler(e){this.govClose.emit({component:u.root,ref:this.host,originalEvent:e})}get isBold(){return this.type==="bold"}get host(){return this}static get watchers(){return{color:["validateColor"]}}},[4,"gov-infobar",{color:[1],type:[1],role:[1],accessibleCloseLabel:[1,"accessible-close-label"],accessibleToggleLabel:[1,"accessible-toggle-label"],closable:[4],toggleContent:[32],inheritedAttributes:[32]},undefined,{color:["validateColor"]}]);function j(){if(typeof customElements==="undefined"){return}const e=["gov-infobar","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-infobar":if(!customElements.get(e)){customElements.define(e,y)}break;case"gov-button":if(!customElements.get(e)){m()}break;case"gov-icon":if(!customElements.get(e)){p()}break}}))}j();const k=y;const C=j;export{k as GovInfobar,C as defineCustomElement};
2
2
  //# sourceMappingURL=gov-infobar.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,h as e,d as o}from"./p-42200001.js";import{a as c}from"./p-13ebd887.js";import{g as n}from"./p-ea7fdd2e.js";const r=t(class t extends s{constructor(){super();this.__registerHost();this.h=n(this.host)}render(){return e(o,{key:"6d327408b450774b24d976e4450378d3cb41fc99",class:this.h.classes(c.root)},e("slot",{key:"8c73b3c0a3c5e1e4a79205bc7631ae8579f38643"}))}get host(){return this}},[4,"gov-layout-column"]);function a(){if(typeof customElements==="undefined"){return}const t=["gov-layout-column"];t.forEach((t=>{switch(t){case"gov-layout-column":if(!customElements.get(t)){customElements.define(t,r)}break}}))}a();const u=r;const m=a;export{u as GovLayoutColumn,m as defineCustomElement};
1
+ import{p as e,H as t,h as s,d as o}from"./p-115b9cf3.js";import{a as c}from"./p-13ebd887.js";import{g as n}from"./p-ea7fdd2e.js";const a=e(class e extends t{constructor(){super();this.__registerHost();this.h=n(this.host)}render(){return s(o,{key:"ebef4ca76b1308a566c862b5a49eecf1eb3fce99",class:this.h.classes(c.root)},s("slot",{key:"aaeefeb1a56b294d91b1327fd52eb16486cfb918"}))}get host(){return this}},[4,"gov-layout-column"]);function r(){if(typeof customElements==="undefined"){return}const e=["gov-layout-column"];e.forEach((e=>{switch(e){case"gov-layout-column":if(!customElements.get(e)){customElements.define(e,a)}break}}))}r();const f=a;const u=r;export{f as GovLayoutColumn,u as defineCustomElement};
2
2
  //# sourceMappingURL=gov-layout-column.js.map
@@ -1,2 +1,2 @@
1
- import{p as s,H as t,h as e,d as a}from"./p-42200001.js";import{L as o}from"./p-13ebd887.js";import{g as c}from"./p-ea7fdd2e.js";const n=s(class s extends t{constructor(){super();this.__registerHost();this.type="stretch";this.variant=undefined;this.inverse=false;this.h=c(this.host)}typeClass(s,t,e,a){const o=t?"-"+t:"";const c=e?"-"+e:"";const n=a?"-inverse":"";return s+" "+s+o+c+n}render(){return e(a,{key:"0797feef52b833ead99b61d5aa78c0dbc4f5b5b7",type:this.type,class:this.h.classes(o.root)},e("section",{key:"aab90b8796879b296ae09f3a7975e8931adacea8",class:this.typeClass(o.section,this.type,this.variant,this.inverse)},e("slot",{key:"ac79827788dfac2c3e2cfb57671a4b9422d31d7b"})))}get host(){return this}},[4,"gov-layout",{type:[1],variant:[1],inverse:[4]}]);function i(){if(typeof customElements==="undefined"){return}const s=["gov-layout"];s.forEach((s=>{switch(s){case"gov-layout":if(!customElements.get(s)){customElements.define(s,n)}break}}))}i();const r=n;const d=i;export{r as GovLayout,d as defineCustomElement};
1
+ import{p as s,H as t,h as e,d as c}from"./p-115b9cf3.js";import{L as o}from"./p-13ebd887.js";import{g as n}from"./p-ea7fdd2e.js";const i=s(class s extends t{constructor(){super();this.__registerHost();this.type="stretch";this.variant=undefined;this.inverse=false;this.h=n(this.host)}typeClass(s,t,e,c){const o=t?"-"+t:"";const n=e?"-"+e:"";const i=c?"-inverse":"";return s+" "+s+o+n+i}render(){return e(c,{key:"c35fc39e07229363bdf36be5856165e7e8eb7985",type:this.type,class:this.h.classes(o.root)},e("section",{key:"dc50cf9cba8bd4e879291fddfbd41955f2d10330",class:this.typeClass(o.section,this.type,this.variant,this.inverse)},e("slot",{key:"017a329c119529d3893e187b6a8bbccfbbc76679"})))}get host(){return this}},[4,"gov-layout",{type:[1],variant:[1],inverse:[4]}]);function r(){if(typeof customElements==="undefined"){return}const s=["gov-layout"];s.forEach((s=>{switch(s){case"gov-layout":if(!customElements.get(s)){customElements.define(s,i)}break}}))}r();const a=i;const f=r;export{a as GovLayout,f as defineCustomElement};
2
2
  //# sourceMappingURL=gov-layout.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as o,h as c,d as n}from"./p-42200001.js";import{a as t}from"./p-cd6c2938.js";const s=e(class e extends o{constructor(){super();this.__registerHost();this.uniqueId="lifecycle-"+t()}connectedCallback(){console.log("connectedCallback",this.uniqueId)}disconnectedCallback(){console.log("disconnectedCallback",this.uniqueId)}componentWillLoad(){console.log("componentWillLoad",this.uniqueId)}componentDidLoad(){console.log("componentDidLoad",this.uniqueId)}componentShouldUpdate(){console.log("componentShouldUpdate",this.uniqueId)}componentWillRender(){console.log("componentWillRender",this.uniqueId)}componentDidRender(){console.log("componentDidRender",this.uniqueId)}componentWillUpdate(){console.log("componentWillUpdate",this.uniqueId)}componentDidUpdate(){console.log("componentDidUpdate",this.uniqueId)}render(){return c(n,{key:"914b3fa860f16bb35d1219f9d758cc7c0c51ca1a",identifier:this.uniqueId},c("span",{key:"ccd8f0d9c97e53e958d0db4452d12c66fc33dd7a"},"lifecycle ",this.uniqueId))}},[0,"gov-lifecycle"]);function l(){if(typeof customElements==="undefined"){return}const e=["gov-lifecycle"];e.forEach((e=>{switch(e){case"gov-lifecycle":if(!customElements.get(e)){customElements.define(e,s)}break}}))}l();const d=s;const i=l;export{d as GovLifecycle,i as defineCustomElement};
1
+ import{p as e,H as o,h as n,d as c}from"./p-115b9cf3.js";import{a as t}from"./p-cd6c2938.js";const s=e(class e extends o{constructor(){super();this.__registerHost();this.uniqueId="lifecycle-"+t()}connectedCallback(){console.log("connectedCallback",this.uniqueId)}disconnectedCallback(){console.log("disconnectedCallback",this.uniqueId)}componentWillLoad(){console.log("componentWillLoad",this.uniqueId)}componentDidLoad(){console.log("componentDidLoad",this.uniqueId)}componentShouldUpdate(){console.log("componentShouldUpdate",this.uniqueId)}componentWillRender(){console.log("componentWillRender",this.uniqueId)}componentDidRender(){console.log("componentDidRender",this.uniqueId)}componentWillUpdate(){console.log("componentWillUpdate",this.uniqueId)}componentDidUpdate(){console.log("componentDidUpdate",this.uniqueId)}render(){return n(c,{key:"506eabaae01ae888fa838c10572e55bbe6fb7015",identifier:this.uniqueId},n("span",{key:"7604a29214fdffb1a470d83d7db37a583e5072ed"},"lifecycle ",this.uniqueId))}},[0,"gov-lifecycle"]);function l(){if(typeof customElements==="undefined"){return}const e=["gov-lifecycle"];e.forEach((e=>{switch(e){case"gov-lifecycle":if(!customElements.get(e)){customElements.define(e,s)}break}}))}l();const i=s;const d=l;export{i as GovLifecycle,d as defineCustomElement};
2
2
  //# sourceMappingURL=gov-lifecycle.js.map