@gov-design-system-ce/components 4.1.1 → 4.1.3-BETA-1

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 (471) hide show
  1. package/dist/cjs/core.cjs.js +2 -2
  2. package/dist/cjs/gov-accordion-item.cjs.entry.js +1 -1
  3. package/dist/cjs/gov-accordion.cjs.entry.js +1 -1
  4. package/dist/cjs/gov-attachments_3.cjs.entry.js +3 -3
  5. package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
  6. package/dist/cjs/gov-backdrop.cjs.entry.js +1 -1
  7. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +1 -1
  8. package/dist/cjs/gov-button.cjs.entry.js +1 -1
  9. package/dist/cjs/gov-card.cjs.entry.js +10 -7
  10. package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
  11. package/dist/cjs/gov-chip.cjs.entry.js +3 -3
  12. package/dist/cjs/gov-container.cjs.entry.js +2 -2
  13. package/dist/cjs/gov-control-group.cjs.entry.js +2 -2
  14. package/dist/cjs/gov-cookiebar.cjs.entry.js +2 -2
  15. package/dist/cjs/gov-dialog.cjs.entry.js +2 -2
  16. package/dist/cjs/gov-dropdown.cjs.entry.js +1 -1
  17. package/dist/cjs/gov-empty.cjs.entry.js +2 -2
  18. package/dist/cjs/gov-error-code.cjs.entry.js +2 -2
  19. package/dist/cjs/{gov-flex_4.cjs.entry.js → gov-flex_3.cjs.entry.js} +24 -29
  20. package/dist/cjs/gov-flex_3.cjs.entry.js.map +1 -0
  21. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +2 -2
  22. package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +3 -3
  23. package/dist/cjs/gov-form-checkbox-group.cjs.entry.js.map +1 -1
  24. package/dist/cjs/gov-form-checkbox.cjs.entry.js +1 -1
  25. package/dist/cjs/gov-form-control.cjs.entry.js +2 -2
  26. package/dist/cjs/gov-form-file.cjs.entry.js +2 -2
  27. package/dist/cjs/gov-form-group.cjs.entry.js +2 -2
  28. package/dist/cjs/gov-form-input_2.cjs.entry.js +7 -7
  29. package/dist/cjs/gov-form-label.cjs.entry.js +27 -0
  30. package/dist/cjs/gov-form-label.cjs.entry.js.map +1 -0
  31. package/dist/cjs/gov-form-multi-select.cjs.entry.js +3 -3
  32. package/dist/cjs/gov-form-password-power.cjs.entry.js +2 -2
  33. package/dist/cjs/gov-form-radio-group.cjs.entry.js +3 -3
  34. package/dist/cjs/gov-form-radio-group.cjs.entry.js.map +1 -1
  35. package/dist/cjs/gov-form-radio.cjs.entry.js +1 -1
  36. package/dist/cjs/gov-form-search.cjs.entry.js +2 -2
  37. package/dist/cjs/gov-form-select.cjs.entry.js +3 -3
  38. package/dist/cjs/gov-form-switch.cjs.entry.js +1 -1
  39. package/dist/cjs/gov-grid-item.cjs.entry.js +2 -2
  40. package/dist/cjs/gov-grid.cjs.entry.js +2 -2
  41. package/dist/cjs/gov-infobar.cjs.entry.js +3 -3
  42. package/dist/cjs/gov-layout-column.cjs.entry.js +2 -2
  43. package/dist/cjs/gov-layout.cjs.entry.js +2 -2
  44. package/dist/cjs/gov-lifecycle.cjs.entry.js +2 -2
  45. package/dist/cjs/gov-link.cjs.entry.js +2 -2
  46. package/dist/cjs/gov-loading.cjs.entry.js +2 -2
  47. package/dist/cjs/gov-message.cjs.entry.js +2 -2
  48. package/dist/cjs/gov-pagination.cjs.entry.js +1 -1
  49. package/dist/cjs/gov-spacer.cjs.entry.js +2 -2
  50. package/dist/cjs/gov-stepper-item.cjs.entry.js +2 -2
  51. package/dist/cjs/gov-stepper.cjs.entry.js +2 -2
  52. package/dist/cjs/gov-tabs-item.cjs.entry.js +2 -2
  53. package/dist/cjs/gov-tabs.cjs.entry.js +2 -2
  54. package/dist/cjs/gov-tag.cjs.entry.js +3 -2
  55. package/dist/cjs/gov-tag.cjs.entry.js.map +1 -1
  56. package/dist/cjs/gov-tile.cjs.entry.js +2 -2
  57. package/dist/cjs/gov-tiles.cjs.entry.js +2 -2
  58. package/dist/cjs/gov-toast.cjs.entry.js +2 -2
  59. package/dist/cjs/gov-tooltip-content.cjs.entry.js +2 -2
  60. package/dist/cjs/gov-tooltip.cjs.entry.js +3 -3
  61. package/dist/cjs/gov-wizard-item.cjs.entry.js +3 -3
  62. package/dist/cjs/gov-wizard.cjs.entry.js +2 -2
  63. package/dist/cjs/{index-7ff4447c.js → index-67e87c27.js} +14 -3
  64. package/dist/cjs/index-67e87c27.js.map +1 -0
  65. package/dist/cjs/loader.cjs.js +2 -2
  66. package/dist/collection/components/gov-attachments/gov-attachments-item.css +2 -7
  67. package/dist/collection/components/gov-card/constants.js +7 -4
  68. package/dist/collection/components/gov-card/constants.js.map +1 -1
  69. package/dist/collection/components/gov-card/gov-card.js +16 -10
  70. package/dist/collection/components/gov-card/gov-card.js.map +1 -1
  71. package/dist/collection/components/gov-chip/gov-chip.js +2 -2
  72. package/dist/collection/components/gov-container/gov-container.js +1 -1
  73. package/dist/collection/components/gov-control-group/gov-control-group.js +1 -1
  74. package/dist/collection/components/gov-cookiebar/gov-cookiebar.js +1 -1
  75. package/dist/collection/components/gov-dialog/gov-dialog.js +1 -1
  76. package/dist/collection/components/gov-empty/gov-empty.js +1 -1
  77. package/dist/collection/components/gov-error-code/gov-error-code.js +1 -1
  78. package/dist/collection/components/gov-flex/constants.js +2 -0
  79. package/dist/collection/components/gov-flex/constants.js.map +1 -1
  80. package/dist/collection/components/gov-flex/gov-flex.js +33 -9
  81. package/dist/collection/components/gov-flex/gov-flex.js.map +1 -1
  82. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +1 -1
  83. package/dist/collection/components/gov-form/control/gov-form-control.js +1 -1
  84. package/dist/collection/components/gov-form/file/gov-form-file.js +1 -1
  85. package/dist/collection/components/gov-form/group/gov-form-checkbox-group.js +1 -1
  86. package/dist/collection/components/gov-form/group/gov-form-group.css +3 -8
  87. package/dist/collection/components/gov-form/group/gov-form-group.js +1 -1
  88. package/dist/collection/components/gov-form/group/gov-form-radio-group.js +1 -1
  89. package/dist/collection/components/gov-form/input/gov-form-input.js +5 -5
  90. package/dist/collection/components/gov-form/label/gov-form-label.js +1 -1
  91. package/dist/collection/components/gov-form/message/gov-form-message.js +1 -1
  92. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +2 -2
  93. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +1 -1
  94. package/dist/collection/components/gov-form/search/gov-form-search.js +1 -1
  95. package/dist/collection/components/gov-form/select/gov-form-select.js +2 -2
  96. package/dist/collection/components/gov-grid/gov-grid-item.js +1 -1
  97. package/dist/collection/components/gov-grid/gov-grid.js +1 -1
  98. package/dist/collection/components/gov-icon/gov-icon.js +8 -0
  99. package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
  100. package/dist/collection/components/gov-infobar/gov-infobar.js +2 -2
  101. package/dist/collection/components/gov-layout/gov-layout-column.js +1 -1
  102. package/dist/collection/components/gov-layout/gov-layout.js +1 -1
  103. package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js +1 -1
  104. package/dist/collection/components/gov-link/gov-link.js +1 -1
  105. package/dist/collection/components/gov-loading/loading/gov-loading.js +1 -1
  106. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +1 -1
  107. package/dist/collection/components/gov-message/gov-message.js +1 -1
  108. package/dist/collection/components/gov-spacer/gov-spacer.js +1 -1
  109. package/dist/collection/components/gov-stepper/gov-stepper-item.js +1 -1
  110. package/dist/collection/components/gov-stepper/gov-stepper.js +1 -1
  111. package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
  112. package/dist/collection/components/gov-tabs/gov-tabs.js +1 -1
  113. package/dist/collection/components/gov-tag/gov-tag.js +20 -1
  114. package/dist/collection/components/gov-tag/gov-tag.js.map +1 -1
  115. package/dist/collection/components/gov-theme-switch/constants.js +0 -2
  116. package/dist/collection/components/gov-theme-switch/constants.js.map +1 -1
  117. package/dist/collection/components/gov-theme-switch/gov-theme-switch.js +32 -9
  118. package/dist/collection/components/gov-theme-switch/gov-theme-switch.js.map +1 -1
  119. package/dist/collection/components/gov-tile/container/gov-tiles.js +1 -1
  120. package/dist/collection/components/gov-tile/gov-tile.js +1 -1
  121. package/dist/collection/components/gov-toast/gov-toast.js +1 -1
  122. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +1 -1
  123. package/dist/collection/components/gov-tooltip/gov-tooltip.js +2 -2
  124. package/dist/collection/components/gov-wizard/gov-wizard-item.js +2 -2
  125. package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
  126. package/dist/collection/pages/Card.js +22 -37
  127. package/dist/collection/pages/Card.js.map +1 -1
  128. package/dist/collection/pages/Flex.js +62 -0
  129. package/dist/collection/pages/Flex.js.map +1 -0
  130. package/dist/collection/pages/Forms.js +5 -5
  131. package/dist/collection/pages/Forms.js.map +1 -1
  132. package/dist/collection/pages/Tag.js +30 -23
  133. package/dist/collection/pages/Tag.js.map +1 -1
  134. package/dist/collection/utils/icon.utils.js +4 -0
  135. package/dist/collection/utils/icon.utils.js.map +1 -1
  136. package/dist/components/gov-accordion-item.js +1 -1
  137. package/dist/components/gov-accordion.js +1 -1
  138. package/dist/components/gov-attachments-item.js +1 -1
  139. package/dist/components/gov-attachments.js +1 -1
  140. package/dist/components/gov-backdrop.js +1 -1
  141. package/dist/components/gov-breadcrumbs.js +1 -1
  142. package/dist/components/gov-button.js +1 -1
  143. package/dist/components/gov-card.js +1 -1
  144. package/dist/components/gov-card.js.map +1 -1
  145. package/dist/components/gov-chip.js +1 -1
  146. package/dist/components/gov-container.js +1 -1
  147. package/dist/components/gov-control-group.js +1 -1
  148. package/dist/components/gov-cookiebar.js +1 -1
  149. package/dist/components/gov-dialog.js +1 -1
  150. package/dist/components/gov-dropdown.js +1 -1
  151. package/dist/components/gov-empty.js +1 -1
  152. package/dist/components/gov-error-code.js +1 -1
  153. package/dist/components/gov-flex.js +1 -1
  154. package/dist/components/gov-flex.js.map +1 -1
  155. package/dist/components/gov-form-autocomplete.js +1 -1
  156. package/dist/components/gov-form-checkbox-group.js +1 -1
  157. package/dist/components/gov-form-checkbox-group.js.map +1 -1
  158. package/dist/components/gov-form-checkbox.js +1 -1
  159. package/dist/components/gov-form-control.js +1 -1
  160. package/dist/components/gov-form-file.js +1 -1
  161. package/dist/components/gov-form-file.js.map +1 -1
  162. package/dist/components/gov-form-group.js +1 -1
  163. package/dist/components/gov-form-input.js +1 -1
  164. package/dist/components/gov-form-label.js +1 -1
  165. package/dist/components/gov-form-label.js.map +1 -1
  166. package/dist/components/gov-form-message.js +1 -1
  167. package/dist/components/gov-form-multi-select.js +1 -1
  168. package/dist/components/gov-form-password-power.js +1 -1
  169. package/dist/components/gov-form-radio-group.js +1 -1
  170. package/dist/components/gov-form-radio-group.js.map +1 -1
  171. package/dist/components/gov-form-radio.js +1 -1
  172. package/dist/components/gov-form-search.js +1 -1
  173. package/dist/components/gov-form-select.js +1 -1
  174. package/dist/components/gov-form-switch.js +1 -1
  175. package/dist/components/gov-grid-item.js +1 -1
  176. package/dist/components/gov-grid.js +1 -1
  177. package/dist/components/gov-icon.js +1 -1
  178. package/dist/components/gov-infobar.js +1 -1
  179. package/dist/components/gov-layout-column.js +1 -1
  180. package/dist/components/gov-layout.js +1 -1
  181. package/dist/components/gov-lifecycle.js +1 -1
  182. package/dist/components/gov-link.js +1 -1
  183. package/dist/components/gov-link.js.map +1 -1
  184. package/dist/components/gov-loading.js +1 -1
  185. package/dist/components/gov-loading.js.map +1 -1
  186. package/dist/components/gov-message.js +1 -1
  187. package/dist/components/gov-pagination.js +1 -1
  188. package/dist/components/gov-skeleton.js +1 -1
  189. package/dist/components/gov-spacer.js +1 -1
  190. package/dist/components/gov-stepper-item.js +1 -1
  191. package/dist/components/gov-stepper.js +1 -1
  192. package/dist/components/gov-tabs-item.js +1 -1
  193. package/dist/components/gov-tabs.js +1 -1
  194. package/dist/components/gov-tabs.js.map +1 -1
  195. package/dist/components/gov-tag.js +1 -1
  196. package/dist/components/gov-tag.js.map +1 -1
  197. package/dist/components/gov-theme-switch.js +1 -1
  198. package/dist/components/gov-theme-switch.js.map +1 -1
  199. package/dist/components/gov-tile.js +1 -1
  200. package/dist/components/gov-tiles.js +1 -1
  201. package/dist/components/gov-toast.js +1 -1
  202. package/dist/components/gov-tooltip-content.js +1 -1
  203. package/dist/components/gov-tooltip.js +1 -1
  204. package/dist/components/gov-tooltip.js.map +1 -1
  205. package/dist/components/gov-wizard-item.js +1 -1
  206. package/dist/components/gov-wizard.js +1 -1
  207. package/dist/components/index.js +1 -1
  208. package/dist/components/{p-73938936.js → p-03ad4e0f.js} +2 -2
  209. package/dist/components/p-115b9cf3.js +3 -0
  210. package/dist/components/p-115b9cf3.js.map +1 -0
  211. package/dist/components/p-2bd9e821.js +2 -0
  212. package/dist/components/{p-1eb9c053.js.map → p-2bd9e821.js.map} +1 -1
  213. package/dist/components/p-34c6a704.js +2 -0
  214. package/dist/components/{p-b95ebe8c.js.map → p-34c6a704.js.map} +1 -1
  215. package/dist/components/{p-ac359044.js → p-350e060c.js} +2 -2
  216. package/dist/components/{p-7be2301a.js → p-384c7f2a.js} +2 -2
  217. package/dist/components/p-50964838.js +2 -0
  218. package/dist/components/p-50964838.js.map +1 -0
  219. package/dist/components/{p-318d89bd.js → p-8080982e.js} +2 -2
  220. package/dist/components/p-8ee6f2f3.js +2 -0
  221. package/dist/components/{p-a6be4769.js → p-915c4f3a.js} +2 -2
  222. package/dist/components/p-ae7a283c.js +2 -0
  223. package/dist/components/{p-283b66c3.js → p-e532e5e5.js} +2 -2
  224. package/dist/core/core.css +438 -273
  225. package/dist/core/core.esm.js +1 -1
  226. package/dist/core/core.esm.js.map +1 -1
  227. package/dist/core/p-017ff5a5.entry.js +2 -0
  228. package/dist/core/{p-2739fa61.entry.js.map → p-017ff5a5.entry.js.map} +1 -1
  229. package/dist/core/{p-c916d0d2.entry.js → p-032accfb.entry.js} +2 -2
  230. package/dist/core/p-058e6fe2.entry.js +2 -0
  231. package/dist/core/{p-3d6edb09.entry.js.map → p-058e6fe2.entry.js.map} +1 -1
  232. package/dist/core/{p-0be19b89.entry.js → p-063b70a2.entry.js} +2 -2
  233. package/dist/core/{p-dea64896.entry.js → p-0724cb6a.entry.js} +2 -2
  234. package/dist/core/p-09c9eba6.entry.js +2 -0
  235. package/dist/core/p-09ea5c11.entry.js +2 -0
  236. package/dist/core/p-09ea5c11.entry.js.map +1 -0
  237. package/dist/core/p-0c076b21.entry.js +2 -0
  238. package/dist/core/{p-97a9725d.entry.js → p-0f0f7302.entry.js} +2 -2
  239. package/dist/core/p-10f773c2.entry.js +2 -0
  240. package/dist/core/p-14d66f26.entry.js +2 -0
  241. package/dist/core/p-1aa7450e.entry.js +2 -0
  242. package/dist/core/{p-6bb37fe2.entry.js.map → p-1aa7450e.entry.js.map} +1 -1
  243. package/dist/core/p-237a5b91.entry.js +2 -0
  244. package/dist/core/{p-e61aa53b.entry.js.map → p-237a5b91.entry.js.map} +1 -1
  245. package/dist/core/p-269071f5.entry.js +2 -0
  246. package/dist/core/{p-da7f1e11.entry.js.map → p-269071f5.entry.js.map} +1 -1
  247. package/dist/core/p-2ee042d4.js +3 -0
  248. package/dist/core/p-2ee042d4.js.map +1 -0
  249. package/dist/core/{p-ed833334.entry.js → p-33310735.entry.js} +2 -2
  250. package/dist/core/p-347d15d5.entry.js +2 -0
  251. package/dist/core/{p-019e967c.entry.js.map → p-347d15d5.entry.js.map} +1 -1
  252. package/dist/core/p-37473c34.entry.js +2 -0
  253. package/dist/core/p-37473c34.entry.js.map +1 -0
  254. package/dist/core/{p-432c3875.entry.js → p-3849ca02.entry.js} +2 -2
  255. package/dist/core/p-3a7381e7.entry.js +2 -0
  256. package/dist/core/{p-bdc51179.entry.js.map → p-3a7381e7.entry.js.map} +1 -1
  257. package/dist/core/p-43d3dbc0.entry.js +2 -0
  258. package/dist/core/p-45b759f4.entry.js +2 -0
  259. package/dist/core/{p-f4dac942.entry.js.map → p-45b759f4.entry.js.map} +1 -1
  260. package/dist/core/p-4c60e125.entry.js +2 -0
  261. package/dist/core/p-4e29744a.entry.js +2 -0
  262. package/dist/core/{p-41c6b262.entry.js.map → p-4e29744a.entry.js.map} +1 -1
  263. package/dist/core/p-4fa0320d.entry.js +2 -0
  264. package/dist/core/p-50af9ae8.entry.js +2 -0
  265. package/dist/core/{p-ccec8019.entry.js → p-5c3f4cfe.entry.js} +2 -2
  266. package/dist/core/p-6b7c3a96.entry.js +2 -0
  267. package/dist/core/{p-4c5f6299.entry.js.map → p-6b7c3a96.entry.js.map} +1 -1
  268. package/dist/core/p-71f5d4ff.entry.js +2 -0
  269. package/dist/core/{p-439b66a5.entry.js.map → p-71f5d4ff.entry.js.map} +1 -1
  270. package/dist/core/{p-9fe35463.entry.js → p-77daba72.entry.js} +2 -2
  271. package/dist/core/p-7a21fb90.entry.js +2 -0
  272. package/dist/core/{p-56dc370d.entry.js.map → p-7a21fb90.entry.js.map} +1 -1
  273. package/dist/core/{p-d65cef62.entry.js → p-7baee44f.entry.js} +2 -2
  274. package/dist/core/{p-7e04730a.entry.js → p-7dfb7e36.entry.js} +2 -2
  275. package/dist/core/p-8bb6c816.entry.js +2 -0
  276. package/dist/core/{p-bc966c46.entry.js.map → p-8bb6c816.entry.js.map} +1 -1
  277. package/dist/core/p-8cc5ad01.entry.js +2 -0
  278. package/dist/core/p-8cc5ad01.entry.js.map +1 -0
  279. package/dist/core/p-906865d0.entry.js +2 -0
  280. package/dist/core/{p-c054f955.entry.js.map → p-906865d0.entry.js.map} +1 -1
  281. package/dist/core/{p-b7cfe254.entry.js → p-927c31dd.entry.js} +2 -2
  282. package/dist/core/p-967a1094.entry.js +2 -0
  283. package/dist/core/{p-04fa0ab5.entry.js.map → p-967a1094.entry.js.map} +1 -1
  284. package/dist/core/{p-3cb36bae.entry.js → p-9846fd13.entry.js} +2 -2
  285. package/dist/core/{p-1200a32d.entry.js → p-994385ca.entry.js} +2 -2
  286. package/dist/core/{p-d836fcde.entry.js → p-9f8d69a9.entry.js} +2 -2
  287. package/dist/core/{p-e834ee73.entry.js → p-a6a9de9a.entry.js} +2 -2
  288. package/dist/core/p-b62e49ee.entry.js +2 -0
  289. package/dist/core/{p-bcb45a18.entry.js → p-c0800e6d.entry.js} +2 -2
  290. package/dist/core/p-cecbe73f.entry.js +2 -0
  291. package/dist/core/{p-5c9e6275.entry.js.map → p-cecbe73f.entry.js.map} +1 -1
  292. package/dist/core/p-d795a421.entry.js +2 -0
  293. package/dist/core/{p-0fdd8929.entry.js → p-d9b42773.entry.js} +2 -2
  294. package/dist/core/{p-561718cd.entry.js → p-e0a199ff.entry.js} +2 -2
  295. package/dist/core/p-e215f3ee.entry.js +2 -0
  296. package/dist/core/p-ed02945f.entry.js +2 -0
  297. package/dist/core/p-ee55932a.entry.js +2 -0
  298. package/dist/core/{p-f7a4da9d.entry.js → p-f2bb8c29.entry.js} +2 -2
  299. package/dist/core/{p-72130a8f.entry.js → p-f54edd6c.entry.js} +2 -2
  300. package/dist/core/p-f7f60f91.entry.js +2 -0
  301. package/dist/core/{p-b923a8d9.entry.js.map → p-f7f60f91.entry.js.map} +1 -1
  302. package/dist/core/{p-ed8fc183.entry.js → p-fcac8531.entry.js} +2 -2
  303. package/dist/esm/core.js +3 -3
  304. package/dist/esm/gov-accordion-item.entry.js +1 -1
  305. package/dist/esm/gov-accordion.entry.js +1 -1
  306. package/dist/esm/gov-attachments_3.entry.js +3 -3
  307. package/dist/esm/gov-attachments_3.entry.js.map +1 -1
  308. package/dist/esm/gov-backdrop.entry.js +1 -1
  309. package/dist/esm/gov-breadcrumbs.entry.js +1 -1
  310. package/dist/esm/gov-button.entry.js +1 -1
  311. package/dist/esm/gov-card.entry.js +10 -7
  312. package/dist/esm/gov-card.entry.js.map +1 -1
  313. package/dist/esm/gov-chip.entry.js +3 -3
  314. package/dist/esm/gov-container.entry.js +2 -2
  315. package/dist/esm/gov-control-group.entry.js +2 -2
  316. package/dist/esm/gov-cookiebar.entry.js +2 -2
  317. package/dist/esm/gov-dialog.entry.js +2 -2
  318. package/dist/esm/gov-dropdown.entry.js +1 -1
  319. package/dist/esm/gov-empty.entry.js +2 -2
  320. package/dist/esm/gov-error-code.entry.js +2 -2
  321. package/dist/esm/{gov-flex_4.entry.js → gov-flex_3.entry.js} +25 -29
  322. package/dist/esm/gov-flex_3.entry.js.map +1 -0
  323. package/dist/esm/gov-form-autocomplete.entry.js +2 -2
  324. package/dist/esm/gov-form-checkbox-group.entry.js +3 -3
  325. package/dist/esm/gov-form-checkbox-group.entry.js.map +1 -1
  326. package/dist/esm/gov-form-checkbox.entry.js +1 -1
  327. package/dist/esm/gov-form-control.entry.js +2 -2
  328. package/dist/esm/gov-form-file.entry.js +2 -2
  329. package/dist/esm/gov-form-group.entry.js +2 -2
  330. package/dist/esm/gov-form-input_2.entry.js +7 -7
  331. package/dist/esm/gov-form-label.entry.js +23 -0
  332. package/dist/esm/gov-form-label.entry.js.map +1 -0
  333. package/dist/esm/gov-form-multi-select.entry.js +3 -3
  334. package/dist/esm/gov-form-password-power.entry.js +2 -2
  335. package/dist/esm/gov-form-radio-group.entry.js +3 -3
  336. package/dist/esm/gov-form-radio-group.entry.js.map +1 -1
  337. package/dist/esm/gov-form-radio.entry.js +1 -1
  338. package/dist/esm/gov-form-search.entry.js +2 -2
  339. package/dist/esm/gov-form-select.entry.js +3 -3
  340. package/dist/esm/gov-form-switch.entry.js +1 -1
  341. package/dist/esm/gov-grid-item.entry.js +2 -2
  342. package/dist/esm/gov-grid.entry.js +2 -2
  343. package/dist/esm/gov-infobar.entry.js +3 -3
  344. package/dist/esm/gov-layout-column.entry.js +2 -2
  345. package/dist/esm/gov-layout.entry.js +2 -2
  346. package/dist/esm/gov-lifecycle.entry.js +2 -2
  347. package/dist/esm/gov-link.entry.js +2 -2
  348. package/dist/esm/gov-loading.entry.js +2 -2
  349. package/dist/esm/gov-message.entry.js +2 -2
  350. package/dist/esm/gov-pagination.entry.js +1 -1
  351. package/dist/esm/gov-spacer.entry.js +2 -2
  352. package/dist/esm/gov-stepper-item.entry.js +2 -2
  353. package/dist/esm/gov-stepper.entry.js +2 -2
  354. package/dist/esm/gov-tabs-item.entry.js +2 -2
  355. package/dist/esm/gov-tabs.entry.js +2 -2
  356. package/dist/esm/gov-tag.entry.js +3 -2
  357. package/dist/esm/gov-tag.entry.js.map +1 -1
  358. package/dist/esm/gov-tile.entry.js +2 -2
  359. package/dist/esm/gov-tiles.entry.js +2 -2
  360. package/dist/esm/gov-toast.entry.js +2 -2
  361. package/dist/esm/gov-tooltip-content.entry.js +2 -2
  362. package/dist/esm/gov-tooltip.entry.js +3 -3
  363. package/dist/esm/gov-wizard-item.entry.js +3 -3
  364. package/dist/esm/gov-wizard.entry.js +2 -2
  365. package/dist/esm/{index-c263e031.js → index-087b155c.js} +14 -4
  366. package/dist/esm/index-087b155c.js.map +1 -0
  367. package/dist/esm/loader.js +3 -3
  368. package/dist/hydrate/index.js +102 -76
  369. package/dist/hydrate/index.mjs +102 -76
  370. package/dist/types/components/gov-card/constants.d.ts +8 -4
  371. package/dist/types/components/gov-card/gov-card.d.ts +3 -2
  372. package/dist/types/components/gov-flex/constants.d.ts +4 -0
  373. package/dist/types/components/gov-flex/gov-flex.d.ts +9 -7
  374. package/dist/types/components/gov-tag/gov-tag.d.ts +4 -0
  375. package/dist/types/components/gov-theme-switch/constants.d.ts +0 -2
  376. package/dist/types/components/gov-theme-switch/gov-theme-switch.d.ts +8 -4
  377. package/dist/types/components.d.ts +50 -22
  378. package/dist/types/pages/Flex.d.ts +3 -0
  379. package/package.json +1 -1
  380. package/dist/cjs/gov-flex_4.cjs.entry.js.map +0 -1
  381. package/dist/cjs/index-7ff4447c.js.map +0 -1
  382. package/dist/components/p-1eb9c053.js +0 -2
  383. package/dist/components/p-3d7a21b5.js +0 -2
  384. package/dist/components/p-42200001.js +0 -3
  385. package/dist/components/p-42200001.js.map +0 -1
  386. package/dist/components/p-46c567fd.js +0 -2
  387. package/dist/components/p-46c567fd.js.map +0 -1
  388. package/dist/components/p-68a1aaec.js +0 -2
  389. package/dist/components/p-68a1aaec.js.map +0 -1
  390. package/dist/components/p-a6b7a6c2.js +0 -2
  391. package/dist/components/p-b95ebe8c.js +0 -2
  392. package/dist/core/p-00d153bf.entry.js +0 -2
  393. package/dist/core/p-019e967c.entry.js +0 -2
  394. package/dist/core/p-04fa0ab5.entry.js +0 -2
  395. package/dist/core/p-22fa411d.entry.js +0 -2
  396. package/dist/core/p-2739fa61.entry.js +0 -2
  397. package/dist/core/p-30eaeeec.entry.js +0 -2
  398. package/dist/core/p-3d6edb09.entry.js +0 -2
  399. package/dist/core/p-3f6a2d20.entry.js +0 -2
  400. package/dist/core/p-3f6a2d20.entry.js.map +0 -1
  401. package/dist/core/p-41c6b262.entry.js +0 -2
  402. package/dist/core/p-439b66a5.entry.js +0 -2
  403. package/dist/core/p-4b90fbc4.entry.js +0 -2
  404. package/dist/core/p-4c5f6299.entry.js +0 -2
  405. package/dist/core/p-535316b4.entry.js +0 -2
  406. package/dist/core/p-5396935e.entry.js +0 -2
  407. package/dist/core/p-56dc370d.entry.js +0 -2
  408. package/dist/core/p-5b2131c1.entry.js +0 -2
  409. package/dist/core/p-5c9e6275.entry.js +0 -2
  410. package/dist/core/p-65e67731.entry.js +0 -2
  411. package/dist/core/p-6bb37fe2.entry.js +0 -2
  412. package/dist/core/p-6e457b3d.entry.js +0 -2
  413. package/dist/core/p-7b7e502b.entry.js +0 -2
  414. package/dist/core/p-8506b611.js +0 -3
  415. package/dist/core/p-8506b611.js.map +0 -1
  416. package/dist/core/p-9c2c5447.entry.js +0 -2
  417. package/dist/core/p-9c2c5447.entry.js.map +0 -1
  418. package/dist/core/p-b923a8d9.entry.js +0 -2
  419. package/dist/core/p-bc966c46.entry.js +0 -2
  420. package/dist/core/p-bdc51179.entry.js +0 -2
  421. package/dist/core/p-c054f955.entry.js +0 -2
  422. package/dist/core/p-cd2d335d.entry.js +0 -2
  423. package/dist/core/p-da7f1e11.entry.js +0 -2
  424. package/dist/core/p-e61aa53b.entry.js +0 -2
  425. package/dist/core/p-ea44d447.entry.js +0 -2
  426. package/dist/core/p-f4bcf817.entry.js +0 -2
  427. package/dist/core/p-f4dac942.entry.js +0 -2
  428. package/dist/esm/gov-flex_4.entry.js.map +0 -1
  429. package/dist/esm/index-c263e031.js.map +0 -1
  430. /package/dist/components/{p-73938936.js.map → p-03ad4e0f.js.map} +0 -0
  431. /package/dist/components/{p-ac359044.js.map → p-350e060c.js.map} +0 -0
  432. /package/dist/components/{p-7be2301a.js.map → p-384c7f2a.js.map} +0 -0
  433. /package/dist/components/{p-318d89bd.js.map → p-8080982e.js.map} +0 -0
  434. /package/dist/components/{p-a6b7a6c2.js.map → p-8ee6f2f3.js.map} +0 -0
  435. /package/dist/components/{p-a6be4769.js.map → p-915c4f3a.js.map} +0 -0
  436. /package/dist/components/{p-3d7a21b5.js.map → p-ae7a283c.js.map} +0 -0
  437. /package/dist/components/{p-283b66c3.js.map → p-e532e5e5.js.map} +0 -0
  438. /package/dist/core/{p-c916d0d2.entry.js.map → p-032accfb.entry.js.map} +0 -0
  439. /package/dist/core/{p-0be19b89.entry.js.map → p-063b70a2.entry.js.map} +0 -0
  440. /package/dist/core/{p-dea64896.entry.js.map → p-0724cb6a.entry.js.map} +0 -0
  441. /package/dist/core/{p-7b7e502b.entry.js.map → p-09c9eba6.entry.js.map} +0 -0
  442. /package/dist/core/{p-5b2131c1.entry.js.map → p-0c076b21.entry.js.map} +0 -0
  443. /package/dist/core/{p-97a9725d.entry.js.map → p-0f0f7302.entry.js.map} +0 -0
  444. /package/dist/core/{p-65e67731.entry.js.map → p-10f773c2.entry.js.map} +0 -0
  445. /package/dist/core/{p-cd2d335d.entry.js.map → p-14d66f26.entry.js.map} +0 -0
  446. /package/dist/core/{p-ed833334.entry.js.map → p-33310735.entry.js.map} +0 -0
  447. /package/dist/core/{p-432c3875.entry.js.map → p-3849ca02.entry.js.map} +0 -0
  448. /package/dist/core/{p-22fa411d.entry.js.map → p-43d3dbc0.entry.js.map} +0 -0
  449. /package/dist/core/{p-30eaeeec.entry.js.map → p-4c60e125.entry.js.map} +0 -0
  450. /package/dist/core/{p-5396935e.entry.js.map → p-4fa0320d.entry.js.map} +0 -0
  451. /package/dist/core/{p-6e457b3d.entry.js.map → p-50af9ae8.entry.js.map} +0 -0
  452. /package/dist/core/{p-ccec8019.entry.js.map → p-5c3f4cfe.entry.js.map} +0 -0
  453. /package/dist/core/{p-9fe35463.entry.js.map → p-77daba72.entry.js.map} +0 -0
  454. /package/dist/core/{p-d65cef62.entry.js.map → p-7baee44f.entry.js.map} +0 -0
  455. /package/dist/core/{p-7e04730a.entry.js.map → p-7dfb7e36.entry.js.map} +0 -0
  456. /package/dist/core/{p-b7cfe254.entry.js.map → p-927c31dd.entry.js.map} +0 -0
  457. /package/dist/core/{p-3cb36bae.entry.js.map → p-9846fd13.entry.js.map} +0 -0
  458. /package/dist/core/{p-1200a32d.entry.js.map → p-994385ca.entry.js.map} +0 -0
  459. /package/dist/core/{p-d836fcde.entry.js.map → p-9f8d69a9.entry.js.map} +0 -0
  460. /package/dist/core/{p-e834ee73.entry.js.map → p-a6a9de9a.entry.js.map} +0 -0
  461. /package/dist/core/{p-ea44d447.entry.js.map → p-b62e49ee.entry.js.map} +0 -0
  462. /package/dist/core/{p-bcb45a18.entry.js.map → p-c0800e6d.entry.js.map} +0 -0
  463. /package/dist/core/{p-00d153bf.entry.js.map → p-d795a421.entry.js.map} +0 -0
  464. /package/dist/core/{p-0fdd8929.entry.js.map → p-d9b42773.entry.js.map} +0 -0
  465. /package/dist/core/{p-561718cd.entry.js.map → p-e0a199ff.entry.js.map} +0 -0
  466. /package/dist/core/{p-535316b4.entry.js.map → p-e215f3ee.entry.js.map} +0 -0
  467. /package/dist/core/{p-4b90fbc4.entry.js.map → p-ed02945f.entry.js.map} +0 -0
  468. /package/dist/core/{p-f4bcf817.entry.js.map → p-ee55932a.entry.js.map} +0 -0
  469. /package/dist/core/{p-f7a4da9d.entry.js.map → p-f2bb8c29.entry.js.map} +0 -0
  470. /package/dist/core/{p-72130a8f.entry.js.map → p-f54edd6c.entry.js.map} +0 -0
  471. /package/dist/core/{p-ed8fc183.entry.js.map → p-fcac8531.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["govFormGroupCss","GovFormCheckboxGroupStyle0","GovFormCheckboxGroup","proxyCustomElement","H","constructor","this","handleChange","event","stopPropagation","value","propsValueToArray","Array","isArray","detail","checked","_a","filter","val","govChange","emit","component","FormCheckboxGroupClass","root","undefined","h","govHost","host","validateGap","newValue","validateProp","FormGroupSizes","FormGroupClass","validateOrientation","FormGroupOrientation","componentWillLoad","gap","orientation","componentDidRender","tick","rerenderComponent","querySelectorAll","forEach","element","hasAttribute","addEventListener","setAttribute","includes","render","Host","key","class","classes"],"sources":["../../../packages/core/src/components/gov-form/group/gov-form-group.scss?tag=gov-form-checkbox-group","../../../packages/core/src/components/gov-form/group/gov-form-checkbox-group.tsx"],"sourcesContent":["/* Form Control */\n\n\ngov-form-group, .gov-form-group,\ngov-form-radio-group, .gov-form-radio-group,\ngov-form-checkbox-group, .gov-form-checkbox-group {\n\t// VARIABLES\n\t@import \"./gov-form-group-variables\";\n\n\t@include reset-margin();\n\t@include base(flex);\n\tflex-direction: column;\n\talign-items: flex-start;\n\t.gov-form-label__label {\n\t\tmargin: 0;\n\t}\n\n\t&[orientation=\"horizontal\"] {\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\t.gov-form-label__label {\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n\n\t// SIZES\n\t@each $size, $definitions in $form-group-gaps {\n\t\t&[gap=\"#{$size}\"] {\n\t\t\tgap: map-get($definitions, \"gap\");\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, Watch} from \"@stencil/core\"\nimport {\n\tFormCheckboxGroupClass,\n\tFormGroupClass,\n\tFormGroupOrientation,\n\tFormGroupOrientationType,\n\tFormGroupSizes,\n\tFormGroupSizesType\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormCheckboxEvent} from \"../checkbox/gov-form-checkbox.types\"\nimport {FormCheckboxGroupEvent} from \"./gov-form-group.types\"\nimport {tick} from \"../../../utils/stencil.utils\"\nimport {propsValueToArray} from \"../../../utils/array.utils\"\n\n@Component({\n\ttag: \"gov-form-checkbox-group\",\n\tstyleUrl: \"gov-form-group.scss\",\n})\nexport class GovFormCheckboxGroup {\n\tprivate readonly h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovFormGroupElement\n\t/**\n\t * Gap's size.\n\t */\n\t@Prop() readonly gap?: FormGroupSizesType = undefined\n\t/**\n\t * Elements orientation\n\t */\n\t@Prop() readonly orientation?: FormGroupOrientationType = 'vertical'\n\t/**\n\t * Group's value\n\t */\n\t@Prop({attribute: \"value\", mutable: true}) value?: string | string[] = undefined\n\t/**\n /* Emitted when the checkbox change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormCheckboxGroupEvent>\n\n\t@Watch(\"gap\")\n\tvalidateGap(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupSizes, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\t@Watch(\"orientation\")\n\tvalidateOrientation(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupOrientation, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\thandleChange = (event: CustomEvent<FormCheckboxEvent>) => {\n\t\tevent.stopPropagation()\n\t\tconst value = propsValueToArray<string[]>(this.value);\n\t\tif (!Array.isArray(value)) return;\n\t\tif (event.detail.checked) {\n\t\t\tthis.value = [...value, event.detail.value]\n\t\t} else {\n\t\t\tthis.value = value.filter((val) => val !== event.detail.value) ?? []\n\t\t}\n\t\tthis.govChange.emit({\n\t\t\tvalue: this.value,\n\t\t\tcomponent: FormCheckboxGroupClass.root,\n\t\t})\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateGap(this.gap)\n\t\tthis.validateOrientation(this.orientation)\n\t\tthis.value = propsValueToArray(this.value)\n\t}\n\n\tcomponentDidRender(): void {\n\t\ttick(() => this.rerenderComponent())\n\t}\n\n\trerenderComponent(): void {\n\t\tthis.host.querySelectorAll('gov-form-checkbox').forEach((element) => {\n\t\t\tif (!element.hasAttribute('listener-attached')) {\n\t\t\t\telement.addEventListener('gov-change', this.handleChange)\n\t\t\t}\n\t\t\telement.setAttribute('listener-attached', 'true')\n\t\t\telement.checked = this.value.includes(element.value);\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host gap={this.gap} class={this.h.classes(FormGroupClass.root)} value={this.value}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"yQAAA,MAAMA,EAAkB,0wEACxB,MAAAC,EAAeD,E,MCoBFE,EAAoBC,EAAA,MAAAD,UAAAE,EAGhC,WAAAC,G,oEAoCAC,KAAAC,aAAgBC,I,MACfA,EAAMC,kBACN,MAAMC,EAAQC,EAA4BL,KAAKI,OAC/C,IAAKE,MAAMC,QAAQH,GAAQ,OAC3B,GAAIF,EAAMM,OAAOC,QAAS,CACzBT,KAAKI,MAAQ,IAAIA,EAAOF,EAAMM,OAAOJ,M,KAC/B,CACNJ,KAAKI,OAAQM,EAAAN,EAAMO,QAAQC,GAAQA,IAAQV,EAAMM,OAAOJ,WAAM,MAAAM,SAAA,EAAAA,EAAI,E,CAEnEV,KAAKa,UAAUC,KAAK,CACnBV,MAAOJ,KAAKI,MACZW,UAAWC,EAAuBC,MACjC,E,SAxCyCC,U,iBAIc,W,WAIaA,UAftElB,KAAKmB,EAAIC,EAAQpB,KAAKqB,K,CAsBvB,WAAAC,CAAYC,GACX,GAAIA,EAAU,CACbC,EAAaC,EAAgBF,EAAUG,EAAeT,K,EAKxD,mBAAAU,CAAoBJ,GACnB,GAAIA,EAAU,CACbC,EAAaI,EAAsBL,EAAUG,EAAeT,K,EAmB9D,iBAAAY,GACC7B,KAAKsB,YAAYtB,KAAK8B,KACtB9B,KAAK2B,oBAAoB3B,KAAK+B,aAC9B/B,KAAKI,MAAQC,EAAkBL,KAAKI,M,CAGrC,kBAAA4B,GACCC,GAAK,IAAMjC,KAAKkC,qB,CAGjB,iBAAAA,GACClC,KAAKqB,KAAKc,iBAAiB,qBAAqBC,SAASC,IACxD,IAAKA,EAAQC,aAAa,qBAAsB,CAC/CD,EAAQE,iBAAiB,aAAcvC,KAAKC,a,CAE7CoC,EAAQG,aAAa,oBAAqB,QAC1CH,EAAQ5B,QAAUT,KAAKI,MAAMqC,SAASJ,EAAQjC,MAAM,G,CAItD,MAAAsC,GACC,OACCvB,EAACwB,EAAI,CAAAC,IAAA,2CAACd,IAAK9B,KAAK8B,IAAKe,MAAO7C,KAAKmB,EAAE2B,QAAQpB,EAAeT,MAAOb,MAAOJ,KAAKI,OAC5Ee,EAAA,QAAAyB,IAAA,6C","ignoreList":[]}
1
+ {"version":3,"names":["govFormGroupCss","GovFormCheckboxGroupStyle0","GovFormCheckboxGroup","proxyCustomElement","H","constructor","this","handleChange","event","stopPropagation","value","propsValueToArray","Array","isArray","detail","checked","_a","filter","val","govChange","emit","component","FormCheckboxGroupClass","root","undefined","h","govHost","host","validateGap","newValue","validateProp","FormGroupSizes","FormGroupClass","validateOrientation","FormGroupOrientation","componentWillLoad","gap","orientation","componentDidRender","tick","rerenderComponent","querySelectorAll","forEach","element","hasAttribute","addEventListener","setAttribute","includes","render","Host","key","class","classes"],"sources":["../../../packages/core/src/components/gov-form/group/gov-form-group.scss?tag=gov-form-checkbox-group","../../../packages/core/src/components/gov-form/group/gov-form-checkbox-group.tsx"],"sourcesContent":["/* Form Control */\n\n\ngov-form-group, .gov-form-group,\ngov-form-radio-group, .gov-form-radio-group,\ngov-form-checkbox-group, .gov-form-checkbox-group {\n\t// VARIABLES\n\t@import \"./gov-form-group-variables\";\n\n\t@include reset-margin();\n\t@include base(flex);\n\tflex-direction: column;\n\talign-items: flex-start;\n\t.gov-form-label__label {\n\t\tmargin: 0;\n\t}\n\n\t&[orientation=\"horizontal\"] {\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\t.gov-form-label__label {\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n\n\t// SIZES\n\t@each $size, $definitions in $form-group-gaps {\n\t\t&[gap=\"#{$size}\"] {\n\t\t\tgap: map-get($definitions, \"gap\");\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, Watch} from \"@stencil/core\"\nimport {\n\tFormCheckboxGroupClass,\n\tFormGroupClass,\n\tFormGroupOrientation,\n\tFormGroupOrientationType,\n\tFormGroupSizes,\n\tFormGroupSizesType\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormCheckboxEvent} from \"../checkbox/gov-form-checkbox.types\"\nimport {FormCheckboxGroupEvent} from \"./gov-form-group.types\"\nimport {tick} from \"../../../utils/stencil.utils\"\nimport {propsValueToArray} from \"../../../utils/array.utils\"\n\n@Component({\n\ttag: \"gov-form-checkbox-group\",\n\tstyleUrl: \"gov-form-group.scss\",\n})\nexport class GovFormCheckboxGroup {\n\tprivate readonly h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovFormGroupElement\n\t/**\n\t * Gap's size.\n\t */\n\t@Prop() readonly gap?: FormGroupSizesType = undefined\n\t/**\n\t * Elements orientation\n\t */\n\t@Prop() readonly orientation?: FormGroupOrientationType = 'vertical'\n\t/**\n\t * Group's value\n\t */\n\t@Prop({attribute: \"value\", mutable: true}) value?: string | string[] = undefined\n\t/**\n /* Emitted when the checkbox change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormCheckboxGroupEvent>\n\n\t@Watch(\"gap\")\n\tvalidateGap(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupSizes, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\t@Watch(\"orientation\")\n\tvalidateOrientation(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupOrientation, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\thandleChange = (event: CustomEvent<FormCheckboxEvent>) => {\n\t\tevent.stopPropagation()\n\t\tconst value = propsValueToArray<string[]>(this.value);\n\t\tif (!Array.isArray(value)) return;\n\t\tif (event.detail.checked) {\n\t\t\tthis.value = [...value, event.detail.value]\n\t\t} else {\n\t\t\tthis.value = value.filter((val) => val !== event.detail.value) ?? []\n\t\t}\n\t\tthis.govChange.emit({\n\t\t\tvalue: this.value,\n\t\t\tcomponent: FormCheckboxGroupClass.root,\n\t\t})\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateGap(this.gap)\n\t\tthis.validateOrientation(this.orientation)\n\t\tthis.value = propsValueToArray(this.value)\n\t}\n\n\tcomponentDidRender(): void {\n\t\ttick(() => this.rerenderComponent())\n\t}\n\n\trerenderComponent(): void {\n\t\tthis.host.querySelectorAll('gov-form-checkbox').forEach((element) => {\n\t\t\tif (!element.hasAttribute('listener-attached')) {\n\t\t\t\telement.addEventListener('gov-change', this.handleChange)\n\t\t\t}\n\t\t\telement.setAttribute('listener-attached', 'true')\n\t\t\telement.checked = this.value.includes(element.value);\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host gap={this.gap} class={this.h.classes(FormGroupClass.root)} value={this.value}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"yQAAA,MAAMA,EAAkB,ktEACxB,MAAAC,EAAeD,E,MCoBFE,EAAoBC,EAAA,MAAAD,UAAAE,EAGhC,WAAAC,G,oEAoCAC,KAAAC,aAAgBC,I,MACfA,EAAMC,kBACN,MAAMC,EAAQC,EAA4BL,KAAKI,OAC/C,IAAKE,MAAMC,QAAQH,GAAQ,OAC3B,GAAIF,EAAMM,OAAOC,QAAS,CACzBT,KAAKI,MAAQ,IAAIA,EAAOF,EAAMM,OAAOJ,M,KAC/B,CACNJ,KAAKI,OAAQM,EAAAN,EAAMO,QAAQC,GAAQA,IAAQV,EAAMM,OAAOJ,WAAM,MAAAM,SAAA,EAAAA,EAAI,E,CAEnEV,KAAKa,UAAUC,KAAK,CACnBV,MAAOJ,KAAKI,MACZW,UAAWC,EAAuBC,MACjC,E,SAxCyCC,U,iBAIc,W,WAIaA,UAftElB,KAAKmB,EAAIC,EAAQpB,KAAKqB,K,CAsBvB,WAAAC,CAAYC,GACX,GAAIA,EAAU,CACbC,EAAaC,EAAgBF,EAAUG,EAAeT,K,EAKxD,mBAAAU,CAAoBJ,GACnB,GAAIA,EAAU,CACbC,EAAaI,EAAsBL,EAAUG,EAAeT,K,EAmB9D,iBAAAY,GACC7B,KAAKsB,YAAYtB,KAAK8B,KACtB9B,KAAK2B,oBAAoB3B,KAAK+B,aAC9B/B,KAAKI,MAAQC,EAAkBL,KAAKI,M,CAGrC,kBAAA4B,GACCC,GAAK,IAAMjC,KAAKkC,qB,CAGjB,iBAAAA,GACClC,KAAKqB,KAAKc,iBAAiB,qBAAqBC,SAASC,IACxD,IAAKA,EAAQC,aAAa,qBAAsB,CAC/CD,EAAQE,iBAAiB,aAAcvC,KAAKC,a,CAE7CoC,EAAQG,aAAa,oBAAqB,QAC1CH,EAAQ5B,QAAUT,KAAKI,MAAMqC,SAASJ,EAAQjC,MAAM,G,CAItD,MAAAsC,GACC,OACCvB,EAACwB,EAAI,CAAAC,IAAA,2CAACd,IAAK9B,KAAK8B,IAAKe,MAAO7C,KAAKmB,EAAE2B,QAAQpB,EAAeT,MAAOb,MAAOJ,KAAKI,OAC5Ee,EAAA,QAAAyB,IAAA,6C","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,c as i,h as e,d as h}from"./p-42200001.js";import{c as n}from"./p-cd6c2938.js";import{v as o}from"./p-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-46c567fd.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};
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-50964838.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 d}from"./p-9908b9f0.js";import{g as c}from"./p-ea7fdd2e.js";import{s as r}from"./p-cd6c2938.js";const a=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=c(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("."+d.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=r(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:"5d1b7313e297a68d4349290d98190e7a0e3039b2",size:this.size,class:this.h.classes(d.root)},t(s,{key:"d4af40d1dcd012c374e0cd43a6d6777945b8e7d7",class:d.holder},this.h.hasSlot("top")&&t("slot",{key:"d46ee92af80770af49c075387f534b9d538a7e39",name:"top"}),t("slot",{key:"ce46e5d88ca4a1069436d702b27ad0c5051e63b5"}),this.h.hasSlot("bottom")&&t("div",{key:"b9da32bf3ad735b0c8bc187fb32528c710e3383c",class:d.bottom},t("slot",{key:"06f43763e2e0a88a2919e33d730898dd2048dcd0",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,a)}break}}))}n();const f=a;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-73938936.js";import{d as u}from"./p-b95ebe8c.js";import{d as p}from"./p-318d89bd.js";import{d as g}from"./p-a6b7a6c2.js";import{d as v}from"./p-46c567fd.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:"30047bbc26c5d51b5e24a6e8ce33690b31fe3b1d",class:this.h.classes([b.root]),invalid:h(this.invalid),expanded:h(this.expanded)},i("div",{key:"f99d4ee71f9126f9fc72acb6adf2ea964410d738",class:b.area,ref:t=>this.areaRef=t},i("slot",{key:"a280d44c9b649aa8ccdc48356a0173e183dbd3ee"}),i("input",Object.assign({key:"2abf8d4c1f0d9086fbe63d86f71c9cdc3e0867c3",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-34c6a704.js";import{d as p}from"./p-8080982e.js";import{d as g}from"./p-8ee6f2f3.js";import{d as v}from"./p-50964838.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-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:"a6b2a022f3c8573fb1bb7424d6a5ac2dc54b101b",gap:this.gap,class:this.h.classes(s.root)},a("slot",{key:"e1b5f38d87e9f46f555e2fc3d247a9c3c10b5872"}))}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};
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-1eb9c053.js";const t=o;const c=s;export{t as GovFormInput,c as defineCustomElement};
1
+ import{G as o,d as s}from"./p-2bd9e821.js";const t=o;const p=s;export{t as GovFormInput,p as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-input.js.map
@@ -1,2 +1,2 @@
1
- import{G as a,d as o}from"./p-68a1aaec.js";const s=a;const t=o;export{s as GovFormLabel,t 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 +1 @@
1
- {"version":3,"names":[],"sources":[],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":["GovFormLabel","proxyCustomElement","H","render","Tag","this","legend","h","Host","key","class","FormLabelClass","root","size","label","htmlFor","identifier","onClick","govClick","emit","required"],"sources":["../../../packages/core/src/components/gov-form/label/gov-form-label.tsx"],"sourcesContent":["import { Component, Event, EventEmitter, h, Prop, Host } from '@stencil/core'\nimport { FormLabelClass, FormLabelSizesTypes } from './constants'\n\n@Component({\n\ttag: 'gov-form-label',\n})\nexport class GovFormLabel {\n\t/**\n\t * Identifier for label.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Label's size.\n\t */\n\t@Prop() readonly size?: FormLabelSizesTypes = 'm'\n\t/**\n\t * Set whether the input is required or not.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Use label as a legend for better accessibility.\n\t * Note: Don't forget to set the fieldset attribute of the gov-form-control component\n\t */\n\t@Prop() readonly legend: boolean = false\n\t/**\n\t * Emitted when the label click.\n\t */\n\t@Event({ eventName: 'gov-click' }) govClick: EventEmitter<PointerEvent>\n\n\trender() {\n\t\tconst Tag = this.legend ? 'legend' : 'label'\n\t\treturn (\n\t\t\t<Host class={FormLabelClass.root} size={this.size}>\n\t\t\t\t<Tag class={FormLabelClass.label} htmlFor={this.identifier} onClick={() => this.govClick.emit()}>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t\t{this.required ? <span class=\"gov-color--error-500\">&nbsp;*</span> : null}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"0GAMaA,EAAYC,EAAA,MAAAD,UAAAE,E,oHAQsB,I,cAIT,M,YAKF,K,CAMnC,MAAAC,GACC,MAAMC,EAAMC,KAAKC,OAAS,SAAW,QACrC,OACCC,EAACC,EAAI,CAAAC,IAAA,2CAACC,MAAOC,EAAeC,KAAMC,KAAMR,KAAKQ,MAC5CN,EAACH,EAAG,CAAAK,IAAA,2CAACC,MAAOC,EAAeG,MAAOC,QAASV,KAAKW,WAAYC,QAAS,IAAMZ,KAAKa,SAASC,QACxFZ,EAAA,QAAAE,IAAA,6CACCJ,KAAKe,SAAWb,EAAA,QAAMG,MAAM,wBAAsB,MAAkB,M","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{G as o,d as s}from"./p-a6b7a6c2.js";const a=o;const t=s;export{a as GovFormMessage,t 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-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 b}from"./p-33d5d1ed.js";import{d as g}from"./p-318d89bd.js";import{d as y}from"./p-a6be4769.js";import{d as k}from"./p-1eb9c053.js";import{d as j}from"./p-46c567fd.js";import{d as w}from"./p-ac359044.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(b);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:"11352c6950674badb00870e18c17a031c81235df",class:a.root,size:this.size},s("div",{key:"edd74cbfbbf116700dfdcd7d33307c6416e2ad8c",class:a.wrap},this.h.hasSlot("prefix")&&s("slot",{key:"6aa65aa9875527890bfecb2a1e6c56b2eb9ce827",name:"prefix"}),s("gov-form-autocomplete",{key:"60c5065ccb09073c2e1ca17c329f980cda52761f",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:"907aac2768a9bd5384326377fcad9e90795ff170",slot:"validation-icon",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&s("gov-icon",{key:"7294050c2910097d6a316b37fdc1f571f3450f8a",slot:"validation-icon",class:"validation-icon",name:"exclamation-lg",type:"components"}),s("gov-icon",{key:"ac4474f517f8124831c22055e69d0eb45e6e2d4f",slot:"icon-end",class:"arrow-icon",name:"chevron-down",type:"components"})),s("select",Object.assign({key:"9437199c079132409bdbf0f932605474b885781e",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:"59f4071b90b40ed6291b9180b5caa29101b5e95a"}),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:"0620c4ab3b9d9d122456f91cc3dd5cefd85e8bba",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)){g()}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-8080982e.js";import{d as y}from"./p-915c4f3a.js";import{d as k}from"./p-2bd9e821.js";import{d as j}from"./p-50964838.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 b=e(class e extends s{constructor(){super();this.__registerHost();this.power=undefined}render(){return o(a,{key:"9125566cb99bfc49e2e61edb5af71b5b052d6790",class:c.root},o("span",{key:"b293292f3b8faca38bbbd6cb03fdd49d8601aab3",class:c.bar},o("span",{key:"20995fbc87342a8e0db8031b0ff23a9cb01b4068"}),o("span",{key:"4fec375a3f27cc35025c165badbff731c8fb26ab"}),o("span",{key:"426f641b8b8e179e25e8a1006a0afd0394615058"})),o("span",{key:"7aeaf7222b484ad59084bb20fcbff4660cdcb1db",class:c.text},o("slot",{key:"57c3415c9b2dfc688ec5762c33cdad473b8110bd"})))}},[4,"gov-form-password-power",{power:[514]}]);function r(){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,b)}break}}))}r();const f=b;const d=r;export{f as GovFormPasswordPower,d 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 t}from"./p-42200001.js";import{d as e,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 f}from"./p-26618322.js";const s=":root{--roboto:Roboto, sans-serif}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 !important;margin-bottom:0 !important;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 v=s;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:e.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)}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(t,{key:"5a9b1bd507ef9c0a57cdb25fb200ab6c9fb46604",gap:this.gap,class:this.h.classes(i.root),value:this.value},g("slot",{key:"34b587d61d716b51729431c52879b6fcd0285fee"}))}get host(){return this}static get watchers(){return{gap:["validateGap"],orientation:["validateOrientation"]}}static get style(){return v}},[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 h=c;const d=u;export{h as GovFormRadioGroup,d 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 +1 @@
1
- {"version":3,"names":["govFormGroupCss","GovFormRadioGroupStyle0","GovFormRadioGroup","proxyCustomElement","H","constructor","this","handleChange","event","stopPropagation","value","detail","govChange","emit","component","FormRadioGroupClass","root","undefined","h","govHost","host","validateGap","newValue","validateProp","FormGroupSizes","FormGroupClass","validateOrientation","FormGroupOrientation","componentWillLoad","gap","orientation","componentDidRender","tick","rerenderComponent","querySelectorAll","forEach","element","hasAttribute","addEventListener","setAttribute","checked","render","Host","key","class","classes"],"sources":["../../../packages/core/src/components/gov-form/group/gov-form-group.scss?tag=gov-form-radio-group","../../../packages/core/src/components/gov-form/group/gov-form-radio-group.tsx"],"sourcesContent":["/* Form Control */\n\n\ngov-form-group, .gov-form-group,\ngov-form-radio-group, .gov-form-radio-group,\ngov-form-checkbox-group, .gov-form-checkbox-group {\n\t// VARIABLES\n\t@import \"./gov-form-group-variables\";\n\n\t@include reset-margin();\n\t@include base(flex);\n\tflex-direction: column;\n\talign-items: flex-start;\n\t.gov-form-label__label {\n\t\tmargin: 0;\n\t}\n\n\t&[orientation=\"horizontal\"] {\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\t.gov-form-label__label {\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n\n\t// SIZES\n\t@each $size, $definitions in $form-group-gaps {\n\t\t&[gap=\"#{$size}\"] {\n\t\t\tgap: map-get($definitions, \"gap\");\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, Watch} from \"@stencil/core\"\nimport {\n\tFormGroupClass,\n\tFormGroupOrientation,\n\tFormGroupOrientationType,\n\tFormGroupSizes,\n\tFormGroupSizesType,\n\tFormRadioGroupClass\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormRadioEvent} from \"../radio/gov-form-radio.types\"\nimport {FormRadioGroupEvent} from \"./gov-form-group.types\"\nimport {tick} from \"../../../utils/stencil.utils\"\n\n@Component({\n\ttag: \"gov-form-radio-group\",\n\tstyleUrl: \"gov-form-group.scss\",\n})\nexport class GovFormRadioGroup {\n\tprivate readonly h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovFormGroupElement\n\t/**\n\t * Gap's size.\n\t */\n\t@Prop() readonly gap?: FormGroupSizesType = undefined\n\t/**\n\t * Elements orientation\n\t */\n\t@Prop() readonly orientation?: FormGroupOrientationType = 'vertical'\n\t/**\n\t * Group's value\n\t */\n\t@Prop({attribute: \"value\", mutable: true}) value?: string = undefined\n\t/**\n\t * Emitted when the checkbox change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormRadioGroupEvent>\n\n\t@Watch(\"gap\")\n\tvalidateGap(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupSizes, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\t@Watch(\"orientation\")\n\tvalidateOrientation(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupOrientation, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\thandleChange = (event: CustomEvent<FormRadioEvent>) => {\n\t\tevent.stopPropagation()\n\t\tthis.value = event.detail.value\n\t\tthis.govChange.emit({\n\t\t\tvalue: this.value,\n\t\t\tcomponent: FormRadioGroupClass.root,\n\t\t})\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateGap(this.gap)\n\t\tthis.validateOrientation(this.orientation)\n\t}\n\n\tcomponentDidRender(): void {\n\t\ttick(() => this.rerenderComponent())\n\t}\n\n\trerenderComponent(): void {\n\t\tthis.host.querySelectorAll('gov-form-radio').forEach((element) => {\n\t\t\tif (!element.hasAttribute('listener-attached')) {\n\t\t\t\telement.addEventListener('gov-change', this.handleChange)\n\t\t\t}\n\t\t\telement.setAttribute('listener-attached', 'true')\n\t\t\telement.checked = element.value === this.value;\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host gap={this.gap} class={this.h.classes(FormGroupClass.root)} value={this.value}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"qOAAA,MAAMA,EAAkB,0wEACxB,MAAAC,EAAeD,E,MCmBFE,EAAiBC,EAAA,MAAAD,UAAAE,EAG7B,WAAAC,G,oEAoCAC,KAAAC,aAAgBC,IACfA,EAAMC,kBACNH,KAAKI,MAAQF,EAAMG,OAAOD,MAC1BJ,KAAKM,UAAUC,KAAK,CACnBH,MAAOJ,KAAKI,MACZI,UAAWC,EAAoBC,MAC9B,E,SAlCyCC,U,iBAIc,W,WAIEA,UAf3DX,KAAKY,EAAIC,EAAQb,KAAKc,K,CAsBvB,WAAAC,CAAYC,GACX,GAAIA,EAAU,CACbC,EAAaC,EAAgBF,EAAUG,EAAeT,K,EAKxD,mBAAAU,CAAoBJ,GACnB,GAAIA,EAAU,CACbC,EAAaI,EAAsBL,EAAUG,EAAeT,K,EAa9D,iBAAAY,GACCtB,KAAKe,YAAYf,KAAKuB,KACtBvB,KAAKoB,oBAAoBpB,KAAKwB,Y,CAG/B,kBAAAC,GACCC,GAAK,IAAM1B,KAAK2B,qB,CAGjB,iBAAAA,GACC3B,KAAKc,KAAKc,iBAAiB,kBAAkBC,SAASC,IACrD,IAAKA,EAAQC,aAAa,qBAAsB,CAC/CD,EAAQE,iBAAiB,aAAchC,KAAKC,a,CAE7C6B,EAAQG,aAAa,oBAAqB,QAC1CH,EAAQI,QAAUJ,EAAQ1B,QAAUJ,KAAKI,KAAK,G,CAIhD,MAAA+B,GACC,OACCvB,EAACwB,EAAI,CAAAC,IAAA,2CAACd,IAAKvB,KAAKuB,IAAKe,MAAOtC,KAAKY,EAAE2B,QAAQpB,EAAeT,MAAON,MAAOJ,KAAKI,OAC5EQ,EAAA,QAAAyB,IAAA,6C","ignoreList":[]}
1
+ {"version":3,"names":["govFormGroupCss","GovFormRadioGroupStyle0","GovFormRadioGroup","proxyCustomElement","H","constructor","this","handleChange","event","stopPropagation","value","detail","govChange","emit","component","FormRadioGroupClass","root","undefined","h","govHost","host","validateGap","newValue","validateProp","FormGroupSizes","FormGroupClass","validateOrientation","FormGroupOrientation","componentWillLoad","gap","orientation","componentDidRender","tick","rerenderComponent","querySelectorAll","forEach","element","hasAttribute","addEventListener","setAttribute","checked","render","Host","key","class","classes"],"sources":["../../../packages/core/src/components/gov-form/group/gov-form-group.scss?tag=gov-form-radio-group","../../../packages/core/src/components/gov-form/group/gov-form-radio-group.tsx"],"sourcesContent":["/* Form Control */\n\n\ngov-form-group, .gov-form-group,\ngov-form-radio-group, .gov-form-radio-group,\ngov-form-checkbox-group, .gov-form-checkbox-group {\n\t// VARIABLES\n\t@import \"./gov-form-group-variables\";\n\n\t@include reset-margin();\n\t@include base(flex);\n\tflex-direction: column;\n\talign-items: flex-start;\n\t.gov-form-label__label {\n\t\tmargin: 0;\n\t}\n\n\t&[orientation=\"horizontal\"] {\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\t.gov-form-label__label {\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n\n\t// SIZES\n\t@each $size, $definitions in $form-group-gaps {\n\t\t&[gap=\"#{$size}\"] {\n\t\t\tgap: map-get($definitions, \"gap\");\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, Watch} from \"@stencil/core\"\nimport {\n\tFormGroupClass,\n\tFormGroupOrientation,\n\tFormGroupOrientationType,\n\tFormGroupSizes,\n\tFormGroupSizesType,\n\tFormRadioGroupClass\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormRadioEvent} from \"../radio/gov-form-radio.types\"\nimport {FormRadioGroupEvent} from \"./gov-form-group.types\"\nimport {tick} from \"../../../utils/stencil.utils\"\n\n@Component({\n\ttag: \"gov-form-radio-group\",\n\tstyleUrl: \"gov-form-group.scss\",\n})\nexport class GovFormRadioGroup {\n\tprivate readonly h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovFormGroupElement\n\t/**\n\t * Gap's size.\n\t */\n\t@Prop() readonly gap?: FormGroupSizesType = undefined\n\t/**\n\t * Elements orientation\n\t */\n\t@Prop() readonly orientation?: FormGroupOrientationType = 'vertical'\n\t/**\n\t * Group's value\n\t */\n\t@Prop({attribute: \"value\", mutable: true}) value?: string = undefined\n\t/**\n\t * Emitted when the checkbox change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormRadioGroupEvent>\n\n\t@Watch(\"gap\")\n\tvalidateGap(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupSizes, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\t@Watch(\"orientation\")\n\tvalidateOrientation(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupOrientation, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\thandleChange = (event: CustomEvent<FormRadioEvent>) => {\n\t\tevent.stopPropagation()\n\t\tthis.value = event.detail.value\n\t\tthis.govChange.emit({\n\t\t\tvalue: this.value,\n\t\t\tcomponent: FormRadioGroupClass.root,\n\t\t})\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateGap(this.gap)\n\t\tthis.validateOrientation(this.orientation)\n\t}\n\n\tcomponentDidRender(): void {\n\t\ttick(() => this.rerenderComponent())\n\t}\n\n\trerenderComponent(): void {\n\t\tthis.host.querySelectorAll('gov-form-radio').forEach((element) => {\n\t\t\tif (!element.hasAttribute('listener-attached')) {\n\t\t\t\telement.addEventListener('gov-change', this.handleChange)\n\t\t\t}\n\t\t\telement.setAttribute('listener-attached', 'true')\n\t\t\telement.checked = element.value === this.value;\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host gap={this.gap} class={this.h.classes(FormGroupClass.root)} value={this.value}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"qOAAA,MAAMA,EAAkB,ktEACxB,MAAAC,EAAeD,E,MCmBFE,EAAiBC,EAAA,MAAAD,UAAAE,EAG7B,WAAAC,G,oEAoCAC,KAAAC,aAAgBC,IACfA,EAAMC,kBACNH,KAAKI,MAAQF,EAAMG,OAAOD,MAC1BJ,KAAKM,UAAUC,KAAK,CACnBH,MAAOJ,KAAKI,MACZI,UAAWC,EAAoBC,MAC9B,E,SAlCyCC,U,iBAIc,W,WAIEA,UAf3DX,KAAKY,EAAIC,EAAQb,KAAKc,K,CAsBvB,WAAAC,CAAYC,GACX,GAAIA,EAAU,CACbC,EAAaC,EAAgBF,EAAUG,EAAeT,K,EAKxD,mBAAAU,CAAoBJ,GACnB,GAAIA,EAAU,CACbC,EAAaI,EAAsBL,EAAUG,EAAeT,K,EAa9D,iBAAAY,GACCtB,KAAKe,YAAYf,KAAKuB,KACtBvB,KAAKoB,oBAAoBpB,KAAKwB,Y,CAG/B,kBAAAC,GACCC,GAAK,IAAM1B,KAAK2B,qB,CAGjB,iBAAAA,GACC3B,KAAKc,KAAKc,iBAAiB,kBAAkBC,SAASC,IACrD,IAAKA,EAAQC,aAAa,qBAAsB,CAC/CD,EAAQE,iBAAiB,aAAchC,KAAKC,a,CAE7C6B,EAAQG,aAAa,oBAAqB,QAC1CH,EAAQI,QAAUJ,EAAQ1B,QAAUJ,KAAKI,KAAK,G,CAIhD,MAAA+B,GACC,OACCvB,EAACwB,EAAI,CAAAC,IAAA,2CAACd,IAAKvB,KAAKuB,IAAKe,MAAOtC,KAAKY,EAAE2B,QAAQpB,EAAeT,MAAON,MAAOJ,KAAKI,OAC5EQ,EAAA,QAAAyB,IAAA,6C","ignoreList":[]}
@@ -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-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};
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,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:"9d628d34bd6f19132ea398437faf9023a322bdcf",class:f.root,color:this.color,size:this.size},t("slot",{key:"aa70625f5e6b754a18b36ad87634fe5be1a34fb7",name:"input"}),t("slot",{key:"d098e011406c85877131ee57c04bc9a3f05ded18",name:"button-erase"}),t("slot",{key:"6a5226ae29cf22f4ec33ecf5604db44d8154d2fa",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 i=n;const d=m;export{i as GovFormSearch,d 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-283b66c3.js";const t=o;const c=s;export{t as GovFormSelect,c as defineCustomElement};
1
+ import{G as o,d as s}from"./p-e532e5e5.js";const e=o;const t=s;export{e as GovFormSelect,t as defineCustomElement};
2
2
  //# sourceMappingURL=gov-form-select.js.map
@@ -1,2 +1,2 @@
1
- import{p as i,H as s,c as t,h as e,d as h}from"./p-42200001.js";import{c as a}from"./p-cd6c2938.js";import{v as n}from"./p-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 p,i as b}from"./p-33d5d1ed.js";import{d as v}from"./p-46c567fd.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-50964838.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:"d830b7cb16e1ad4a07b5b5348c05434eb31a1f9e",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:"235bd47e47d94457cdbbf1d4530cf2e0bcddc4a3"}))}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 c=r;export{m as GovGridItem,c 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 s,H as e,h as t,d as i}from"./p-42200001.js";import{G as n}from"./p-880743a5.js";import{g as o}from"./p-ea7fdd2e.js";const a=s(class s extends e{constructor(){super();this.__registerHost();this.alignX=undefined;this.alignY=undefined;this.h=o(this.host)}render(){return t(i,{key:"81e96a065c6472ae76e4768cf2b8373b94f0d0a4",class:this.h.classes(n.root),"align-x":this.alignX,"align-y":this.alignY,role:"list"},t("slot",{key:"c3965bafe6a5870352a7cded3fc96adfbeb41724"}))}get host(){return this}},[4,"gov-grid",{alignX:[1,"align-x"],alignY:[1,"align-y"]}]);function r(){if(typeof customElements==="undefined"){return}const s=["gov-grid"];s.forEach((s=>{switch(s){case"gov-grid":if(!customElements.get(s)){customElements.define(s,a)}break}}))}r();const c=a;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-46c567fd.js";const t=o;const c=s;export{t as GovIcon,c as defineCustomElement};
1
+ import{G as o,d as s}from"./p-50964838.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-0b3574c2.js";import{C as r}from"./p-5aad3497.js";import{p as d}from"./p-e0e2e9c1.js";import{A as h,a as b,i as f}from"./p-33d5d1ed.js";import{d as m}from"./p-318d89bd.js";import{d as p}from"./p-46c567fd.js";const g=d(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 h(this.host,((e,t)=>{this.onAriaAttributeChange(e,t)}));this.attributeObserver.startObserving(b)}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:"4569d98296984f33ff83947f92a95a0a3bf0d3e3",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:"aafcdbde7ca0e13d9e733036da6cc6085143966d",name:"x-lg",type:"components"}));return o(i,{key:"9b558a0c786862d032ed6fb5d274fc0c3cdae617",class:this.h.classes(u.root),color:this.color,type:this.type},o("section",Object.assign({key:"9bded4750afdfef6ace0e5a39be2d6283b30d725",class:u.section},this.inheritedAttributes,{role:this.role}),o("slot",{key:"011f9d52f9f971a560fd0220be40b5a221a5f4b3",name:"icon"}),o("div",{key:"d613d4ab22f89da935fe60b866ea262802c5d18f",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 t,H as e,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-8080982e.js";import{d as p}from"./p-50964838.js";const g=b(r,["PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);var v;(function(t){t["BOLD"]="bold";t["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=t(class t extends e{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(t){l(g,t,u.root)}componentDidLoad(){this.attributeObserver=new d(this.host,((t,e)=>{this.onAriaAttributeChange(t,e)}));this.attributeObserver.startObserving(h)}componentWillLoad(){this.validateColor(this.color);this.inheritedAttributes=f(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}render(){const t=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&&t))}onCloseHandler(t){this.govClose.emit({component:u.root,ref:this.host,originalEvent:t})}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 t=["gov-infobar","gov-button","gov-icon"];t.forEach((t=>{switch(t){case"gov-infobar":if(!customElements.get(t)){customElements.define(t,y)}break;case"gov-button":if(!customElements.get(t)){m()}break;case"gov-icon":if(!customElements.get(t)){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:"8566cc892984b1ce728c679107e228d8320f3048",class:this.h.classes(c.root)},e("slot",{key:"e3a085ef568fa75ef813b775344adbd6f4ef2773"}))}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 f=a;export{u as GovLayoutColumn,f 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 c}from"./p-42200001.js";import{L as o}from"./p-13ebd887.js";import{g as a}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=a(this.host)}typeClass(s,t,e,c){const o=t?"-"+t:"";const a=e?"-"+e:"";const n=c?"-inverse":"";return s+" "+s+o+a+n}render(){return e(c,{key:"ba8fc53df2f13fcf8b87f25f073d0284b68b0a3a",type:this.type,class:this.h.classes(o.root)},e("section",{key:"f645a9b32495c4fc1c0c86a0078c78c4bc00a1e8",class:this.typeClass(o.section,this.type,this.variant,this.inverse)},e("slot",{key:"5b0d1a3a137a8fe3bb90ae5dff2dbc179575af56"})))}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 f=i;export{r as GovLayout,f 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 n,d as c}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 n(c,{key:"7bd4b9b30b6fe4e1732232fa4e70d66756c2139d",identifier:this.uniqueId},n("span",{key:"70d6b8d178133ee89b795c4018687c7afb2576f0"},"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};
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
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,h as s,d as i}from"./p-42200001.js";import{p as o}from"./p-e0e2e9c1.js";import{S as n}from"./p-92f420cb.js";import{g as a}from"./p-ea7fdd2e.js";import{v as r}from"./p-0b3574c2.js";import{i as c}from"./p-33d5d1ed.js";import{d}from"./p-46c567fd.js";const f=o(n,["_S","_M","_L"]);const h={root:"gov-link"};const m=e(class e extends t{constructor(){super();this.__registerHost();this.size="m";this.external=false;this.href=undefined;this.target=undefined;this.inheritedAttributes={};this.h=a(this.host)}validateSize(e){r(f,e,h.root)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=c(this.host)}onAriaAttributeChange(e,t){this.host.removeAttribute(e);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[e]:t})}render(){return s(i,{key:"8723fc6fc0cf3faf4a0fb48b38ad2f0d0a21704b",class:this.h.classes(h.root),size:this.size,href:this.href,external:this.external},s("a",Object.assign({key:"1bfe7837dab38690789ec818f6134a50a93d1e4e",class:"element",href:this.href,target:this.target},this.inheritedAttributes),s("slot",{key:"96d6ce9e164a8fa5b6d5c115d52988bdfff3eceb",name:"icon-start"}),s("slot",{key:"bcc373fec9e7e159c6b31a2ad846dd929d189d1e"}),this.external?s("gov-icon",{name:"box-arrow-up-right",type:"components"}):s("slot",{name:"icon-end"})))}get host(){return this}static get watchers(){return{size:["validateSize"]}}},[4,"gov-link",{size:[1],external:[4],href:[1],target:[1],inheritedAttributes:[32]},undefined,{size:["validateSize"]}]);function l(){if(typeof customElements==="undefined"){return}const e=["gov-link","gov-icon"];e.forEach((e=>{switch(e){case"gov-link":if(!customElements.get(e)){customElements.define(e,m)}break;case"gov-icon":if(!customElements.get(e)){d()}break}}))}l();const p=m;const b=l;export{p as GovLink,b as defineCustomElement};
1
+ import{p as t,H as e,h as s,d as i}from"./p-115b9cf3.js";import{p as o}from"./p-e0e2e9c1.js";import{S as n}from"./p-92f420cb.js";import{g as r}from"./p-ea7fdd2e.js";import{v as a}from"./p-0b3574c2.js";import{i as c}from"./p-33d5d1ed.js";import{d as h}from"./p-50964838.js";const f=o(n,["_S","_M","_L"]);const m={root:"gov-link"};const d=t(class t extends e{constructor(){super();this.__registerHost();this.size="m";this.external=false;this.href=undefined;this.target=undefined;this.inheritedAttributes={};this.h=r(this.host)}validateSize(t){a(f,t,m.root)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=c(this.host)}onAriaAttributeChange(t,e){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e})}render(){return s(i,{key:"233af48c179501fe03ee2e5931806e1955913b59",class:this.h.classes(m.root),size:this.size,href:this.href,external:this.external},s("a",Object.assign({key:"679067805205d76500979620b1ef4405139bb339",class:"element",href:this.href,target:this.target},this.inheritedAttributes),s("slot",{key:"d24c4ab99451f317a453c8131bd0506606322553",name:"icon-start"}),s("slot",{key:"276923f48cdc13985115e8d4e8860a2fb0c692e2"}),this.external?s("gov-icon",{name:"box-arrow-up-right",type:"components"}):s("slot",{name:"icon-end"})))}get host(){return this}static get watchers(){return{size:["validateSize"]}}},[4,"gov-link",{size:[1],external:[4],href:[1],target:[1],inheritedAttributes:[32]},undefined,{size:["validateSize"]}]);function l(){if(typeof customElements==="undefined"){return}const t=["gov-link","gov-icon"];t.forEach((t=>{switch(t){case"gov-link":if(!customElements.get(t)){customElements.define(t,d)}break;case"gov-icon":if(!customElements.get(t)){h()}break}}))}l();const p=d;const b=l;export{p as GovLink,b as defineCustomElement};
2
2
  //# sourceMappingURL=gov-link.js.map