@gov-design-system-ce/components 4.1.0-rc02 → 4.1.0-rc04

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 (531) hide show
  1. package/dist/cjs/core.cjs.js +2 -2
  2. package/dist/cjs/gov-accordion-item.cjs.entry.js +8 -5
  3. package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
  4. package/dist/cjs/gov-accordion.cjs.entry.js +1 -1
  5. package/dist/cjs/gov-attachments_3.cjs.entry.js +6 -6
  6. package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
  7. package/dist/cjs/gov-backdrop.cjs.entry.js +4 -4
  8. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +4 -4
  9. package/dist/cjs/gov-button.cjs.entry.js +6 -6
  10. package/dist/cjs/gov-card.cjs.entry.js +4 -4
  11. package/dist/cjs/gov-chip.cjs.entry.js +4 -4
  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 +4 -4
  16. package/dist/cjs/gov-dialog.cjs.entry.js.map +1 -1
  17. package/dist/cjs/gov-dropdown.cjs.entry.js +3 -3
  18. package/dist/cjs/gov-empty.cjs.entry.js +2 -2
  19. package/dist/cjs/gov-error-code.cjs.entry.js +2 -2
  20. package/dist/cjs/gov-flex.cjs.entry.js +31 -0
  21. package/dist/cjs/gov-flex.cjs.entry.js.map +1 -0
  22. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +3 -3
  23. package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +2 -2
  24. package/dist/cjs/gov-form-checkbox.cjs.entry.js +2 -2
  25. package/dist/cjs/gov-form-control.cjs.entry.js +3 -3
  26. package/dist/cjs/gov-form-file.cjs.entry.js +8 -3
  27. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  28. package/dist/cjs/gov-form-group.cjs.entry.js +2 -2
  29. package/dist/cjs/gov-form-input_2.cjs.entry.js +6 -6
  30. package/dist/cjs/gov-form-label.cjs.entry.js +2 -2
  31. package/dist/cjs/gov-form-multi-select.cjs.entry.js +7 -22
  32. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  33. package/dist/cjs/gov-form-password-power.cjs.entry.js +2 -2
  34. package/dist/cjs/gov-form-radio-group.cjs.entry.js +2 -2
  35. package/dist/cjs/gov-form-radio.cjs.entry.js +2 -2
  36. package/dist/cjs/gov-form-search.cjs.entry.js +2 -2
  37. package/dist/cjs/gov-form-select.cjs.entry.js +4 -4
  38. package/dist/cjs/gov-form-switch.cjs.entry.js +2 -2
  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-icon.cjs.entry.js +2 -2
  42. package/dist/cjs/gov-infobar.cjs.entry.js +3 -3
  43. package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -1
  44. package/dist/cjs/gov-layout-column.cjs.entry.js +2 -2
  45. package/dist/cjs/gov-layout.cjs.entry.js +2 -2
  46. package/dist/cjs/gov-lifecycle.cjs.entry.js +47 -0
  47. package/dist/cjs/gov-lifecycle.cjs.entry.js.map +1 -0
  48. package/dist/cjs/gov-loading.cjs.entry.js +2 -2
  49. package/dist/cjs/gov-message.cjs.entry.js +2 -2
  50. package/dist/cjs/gov-pagination.cjs.entry.js +3 -3
  51. package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
  52. package/dist/cjs/gov-spacer.cjs.entry.js +2 -2
  53. package/dist/cjs/gov-stepper-item.cjs.entry.js +3 -3
  54. package/dist/cjs/gov-stepper.cjs.entry.js +2 -2
  55. package/dist/cjs/gov-tabs-item.cjs.entry.js +3 -3
  56. package/dist/cjs/gov-tabs.cjs.entry.js +2 -2
  57. package/dist/cjs/gov-tag.cjs.entry.js +2 -2
  58. package/dist/cjs/gov-tag.cjs.entry.js.map +1 -1
  59. package/dist/cjs/gov-theme-switch.cjs.entry.js +73 -0
  60. package/dist/cjs/gov-theme-switch.cjs.entry.js.map +1 -0
  61. package/dist/cjs/gov-tile.cjs.entry.js +2 -2
  62. package/dist/cjs/gov-tiles.cjs.entry.js +2 -2
  63. package/dist/cjs/gov-toast.cjs.entry.js +5 -6
  64. package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
  65. package/dist/cjs/gov-tooltip-content.cjs.entry.js +2 -2
  66. package/dist/cjs/gov-tooltip.cjs.entry.js +4 -4
  67. package/dist/cjs/gov-wizard-item.cjs.entry.js +4 -4
  68. package/dist/cjs/gov-wizard.cjs.entry.js +4 -4
  69. package/dist/cjs/{index-1af4880c.js → index-7ff4447c.js} +20 -4
  70. package/dist/cjs/index-7ff4447c.js.map +1 -0
  71. package/dist/cjs/loader.cjs.js +2 -2
  72. package/dist/cjs/{string.utils-2335838f.js → string.utils-b84c81cf.js} +2 -1
  73. package/dist/cjs/string.utils-b84c81cf.js.map +1 -0
  74. package/dist/cjs/{wcag-31089f70.js → wcag-b8d80c7d.js} +2 -2
  75. package/dist/cjs/{wcag-31089f70.js.map → wcag-b8d80c7d.js.map} +1 -1
  76. package/dist/collection/collection-manifest.json +2 -1
  77. package/dist/collection/components/gov-accordion/gov-accordion-item.js +8 -5
  78. package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
  79. package/dist/collection/components/gov-attachments/gov-attachments-item.js +1 -1
  80. package/dist/collection/components/gov-attachments/gov-attachments-item.js.map +1 -1
  81. package/dist/collection/components/gov-attachments/gov-attachments.js +1 -1
  82. package/dist/collection/components/gov-backdrop/gov-backdrop.js +1 -1
  83. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +1 -1
  84. package/dist/collection/components/gov-button/button/gov-button.js +3 -3
  85. package/dist/collection/components/gov-button/dropdown/gov-dropdown.js +1 -1
  86. package/dist/collection/components/gov-card/gov-card.js +1 -1
  87. package/dist/collection/components/gov-chip/gov-chip.js +2 -2
  88. package/dist/collection/components/gov-container/gov-container.js +1 -1
  89. package/dist/collection/components/gov-control-group/gov-control-group.js +1 -1
  90. package/dist/collection/components/gov-cookiebar/gov-cookiebar.js +1 -1
  91. package/dist/collection/components/gov-dialog/gov-dialog.js +1 -1
  92. package/dist/collection/components/gov-dialog/gov-dialog.js.map +1 -1
  93. package/dist/collection/components/gov-empty/gov-empty.js +1 -1
  94. package/dist/collection/components/gov-error-code/gov-error-code.js +1 -1
  95. package/dist/collection/components/gov-flex/constants.js +4 -0
  96. package/dist/collection/components/gov-flex/constants.js.map +1 -0
  97. package/dist/collection/components/gov-flex/gov-flex.js +127 -0
  98. package/dist/collection/components/gov-flex/gov-flex.js.map +1 -0
  99. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +1 -1
  100. package/dist/collection/components/gov-form/control/gov-form-control.js +1 -1
  101. package/dist/collection/components/gov-form/file/gov-form-file.js +6 -1
  102. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  103. package/dist/collection/components/gov-form/group/gov-form-checkbox-group.js +1 -1
  104. package/dist/collection/components/gov-form/group/gov-form-group.js +1 -1
  105. package/dist/collection/components/gov-form/group/gov-form-radio-group.js +1 -1
  106. package/dist/collection/components/gov-form/input/gov-form-input.js +3 -3
  107. package/dist/collection/components/gov-form/label/gov-form-label.js +1 -1
  108. package/dist/collection/components/gov-form/message/gov-form-message.js +1 -1
  109. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +4 -28
  110. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
  111. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +1 -1
  112. package/dist/collection/components/gov-form/search/gov-form-search.js +1 -1
  113. package/dist/collection/components/gov-form/select/gov-form-select.js +2 -2
  114. package/dist/collection/components/gov-grid/gov-grid-item.js +1 -1
  115. package/dist/collection/components/gov-grid/gov-grid.js +1 -1
  116. package/dist/collection/components/gov-infobar/gov-infobar.js +2 -2
  117. package/dist/collection/components/gov-infobar/gov-infobar.js.map +1 -1
  118. package/dist/collection/components/gov-layout/gov-layout-column.js +1 -1
  119. package/dist/collection/components/gov-layout/gov-layout.js +1 -1
  120. package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js +39 -0
  121. package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js.map +1 -0
  122. package/dist/collection/components/gov-loading/loading/gov-loading.js +1 -1
  123. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +1 -1
  124. package/dist/collection/components/gov-message/gov-message.js +1 -1
  125. package/dist/collection/components/gov-pagination/gov-pagination.js +1 -1
  126. package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
  127. package/dist/collection/components/gov-spacer/gov-spacer.js +1 -1
  128. package/dist/collection/components/gov-stepper/gov-stepper-item.js +1 -1
  129. package/dist/collection/components/gov-stepper/gov-stepper.js +1 -1
  130. package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
  131. package/dist/collection/components/gov-tabs/gov-tabs.js +1 -1
  132. package/dist/collection/components/gov-tag/gov-tag.js +1 -1
  133. package/dist/collection/components/gov-tag/gov-tag.js.map +1 -1
  134. package/dist/collection/components/gov-theme-switch/gov-theme-switch.js +1 -1
  135. package/dist/collection/components/gov-tile/container/gov-tiles.js +1 -1
  136. package/dist/collection/components/gov-tile/gov-tile.js +1 -1
  137. package/dist/collection/components/gov-toast/gov-toast.js +3 -4
  138. package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
  139. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +1 -1
  140. package/dist/collection/components/gov-tooltip/gov-tooltip.js +2 -2
  141. package/dist/collection/components/gov-wizard/gov-wizard-item.js +2 -2
  142. package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
  143. package/dist/collection/pages/Forms.js +159 -159
  144. package/dist/collection/pages/Forms.js.map +1 -1
  145. package/dist/collection/pages/Grid.js +1 -1
  146. package/dist/collection/pages/Grid.js.map +1 -1
  147. package/dist/collection/pages/Spacer.js +1 -1
  148. package/dist/collection/pages/Spacer.js.map +1 -1
  149. package/dist/collection/pages/Tag.js +135 -160
  150. package/dist/collection/pages/Tag.js.map +1 -1
  151. package/dist/collection/pages/Wizard.js +1 -1
  152. package/dist/collection/pages/Wizard.js.map +1 -1
  153. package/dist/collection/utils/string.utils.js +1 -1
  154. package/dist/collection/utils/string.utils.js.map +1 -1
  155. package/dist/components/gov-accordion-item.js +1 -1
  156. package/dist/components/gov-accordion-item.js.map +1 -1
  157. package/dist/components/gov-accordion.js +1 -1
  158. package/dist/components/gov-attachments-item.js +1 -1
  159. package/dist/components/gov-attachments.js +1 -1
  160. package/dist/components/gov-backdrop.js +1 -1
  161. package/dist/components/gov-breadcrumbs.js +1 -1
  162. package/dist/components/gov-breadcrumbs.js.map +1 -1
  163. package/dist/components/gov-button.js +1 -1
  164. package/dist/components/gov-card.js +1 -1
  165. package/dist/components/gov-chip.js +1 -1
  166. package/dist/components/gov-container.js +1 -1
  167. package/dist/components/gov-control-group.js +1 -1
  168. package/dist/components/gov-cookiebar.js +1 -1
  169. package/dist/components/gov-dialog.js +1 -1
  170. package/dist/components/gov-dialog.js.map +1 -1
  171. package/dist/components/gov-dropdown.js +1 -1
  172. package/dist/components/gov-dropdown.js.map +1 -1
  173. package/dist/components/gov-empty.js +1 -1
  174. package/dist/components/gov-error-code.js +1 -1
  175. package/dist/components/{gov-app.d.ts → gov-flex.d.ts} +4 -4
  176. package/dist/components/gov-flex.js +2 -0
  177. package/dist/components/gov-flex.js.map +1 -0
  178. package/dist/components/gov-form-autocomplete.js +1 -1
  179. package/dist/components/gov-form-checkbox-group.js +1 -1
  180. package/dist/components/gov-form-checkbox.js +1 -1
  181. package/dist/components/gov-form-control.js +1 -1
  182. package/dist/components/gov-form-file.js +1 -1
  183. package/dist/components/gov-form-file.js.map +1 -1
  184. package/dist/components/gov-form-group.js +1 -1
  185. package/dist/components/gov-form-input.js +1 -1
  186. package/dist/components/gov-form-label.js +1 -1
  187. package/dist/components/gov-form-message.js +1 -1
  188. package/dist/components/gov-form-multi-select.js +1 -1
  189. package/dist/components/gov-form-multi-select.js.map +1 -1
  190. package/dist/components/gov-form-password-power.js +1 -1
  191. package/dist/components/gov-form-password-power.js.map +1 -1
  192. package/dist/components/gov-form-radio-group.js +1 -1
  193. package/dist/components/gov-form-radio.js +1 -1
  194. package/dist/components/gov-form-radio.js.map +1 -1
  195. package/dist/components/gov-form-search.js +1 -1
  196. package/dist/components/gov-form-select.js +1 -1
  197. package/dist/components/gov-form-switch.js +1 -1
  198. package/dist/components/gov-grid-item.js +1 -1
  199. package/dist/components/gov-grid.js +1 -1
  200. package/dist/components/gov-icon.js +1 -1
  201. package/dist/components/gov-infobar.js +1 -1
  202. package/dist/components/gov-infobar.js.map +1 -1
  203. package/dist/components/gov-layout-column.js +1 -1
  204. package/dist/components/gov-layout.js +1 -1
  205. package/dist/components/gov-lifecycle.d.ts +11 -0
  206. package/dist/components/gov-lifecycle.js +2 -0
  207. package/dist/components/gov-lifecycle.js.map +1 -0
  208. package/dist/components/gov-loading.js +1 -1
  209. package/dist/components/gov-loading.js.map +1 -1
  210. package/dist/components/gov-message.js +1 -1
  211. package/dist/components/gov-pagination.js +1 -1
  212. package/dist/components/gov-pagination.js.map +1 -1
  213. package/dist/components/gov-skeleton.js +1 -1
  214. package/dist/components/gov-spacer.js +1 -1
  215. package/dist/components/gov-stepper-item.js +1 -1
  216. package/dist/components/gov-stepper.js +1 -1
  217. package/dist/components/gov-tabs-item.js +1 -1
  218. package/dist/components/gov-tabs.js +1 -1
  219. package/dist/components/gov-tabs.js.map +1 -1
  220. package/dist/components/gov-tag.js +1 -1
  221. package/dist/components/gov-tag.js.map +1 -1
  222. package/dist/components/gov-theme-switch.js +1 -1
  223. package/dist/components/gov-tile.js +1 -1
  224. package/dist/components/gov-tiles.js +1 -1
  225. package/dist/components/gov-toast.js +1 -1
  226. package/dist/components/gov-toast.js.map +1 -1
  227. package/dist/components/gov-tooltip-content.js +1 -1
  228. package/dist/components/gov-tooltip-content.js.map +1 -1
  229. package/dist/components/gov-tooltip.js +1 -1
  230. package/dist/components/gov-wizard-item.js +1 -1
  231. package/dist/components/gov-wizard.js +1 -1
  232. package/dist/components/index.js +1 -1
  233. package/dist/components/p-02da2aee.js +2 -0
  234. package/dist/components/{p-e9b35956.js.map → p-02da2aee.js.map} +1 -1
  235. package/dist/components/p-1d3019f3.js +2 -0
  236. package/dist/components/{p-e183a7c7.js → p-1f3bb41d.js} +2 -2
  237. package/dist/components/{p-6e19816b.js → p-23b7e680.js} +2 -2
  238. package/dist/components/{p-5caf1fe1.js → p-387052e1.js} +2 -2
  239. package/dist/components/{p-c9a15c52.js → p-3b807239.js} +2 -2
  240. package/dist/components/{p-ae3dada7.js → p-42200001.js} +3 -3
  241. package/dist/components/p-42200001.js.map +1 -0
  242. package/dist/components/{p-ff0cf148.js → p-5cc316bc.js} +2 -2
  243. package/dist/components/{p-e20bb5dc.js → p-6ea84137.js} +2 -2
  244. package/dist/components/p-820b66c0.js +2 -0
  245. package/dist/components/{p-fe1842da.js.map → p-820b66c0.js.map} +1 -1
  246. package/dist/components/p-880743a5.js.map +1 -1
  247. package/dist/components/{p-736e4917.js → p-bd22e21d.js} +2 -2
  248. package/dist/components/{p-2da35aa8.js → p-c211c3e1.js} +2 -2
  249. package/dist/components/{p-95d41a3b.js → p-cd6c2938.js} +2 -2
  250. package/dist/components/p-cd6c2938.js.map +1 -0
  251. package/dist/components/{p-9a93146e.js → p-dcee21ca.js} +2 -2
  252. package/dist/core/core.css +158 -29
  253. package/dist/core/core.esm.js +1 -1
  254. package/dist/core/core.esm.js.map +1 -1
  255. package/dist/core/p-0a24806a.entry.js +2 -0
  256. package/dist/core/{p-9d0f20ec.entry.js.map → p-0a24806a.entry.js.map} +1 -1
  257. package/dist/core/{p-9ff8f059.entry.js → p-0d2c4d31.entry.js} +2 -2
  258. package/dist/core/p-10f9bf55.entry.js +2 -0
  259. package/dist/core/{p-17015e36.entry.js.map → p-10f9bf55.entry.js.map} +1 -1
  260. package/dist/core/{p-0a952b3c.entry.js → p-12680890.entry.js} +2 -2
  261. package/dist/core/p-1600c1fb.entry.js +2 -0
  262. package/dist/core/p-18025823.entry.js +2 -0
  263. package/dist/core/p-18025823.entry.js.map +1 -0
  264. package/dist/core/p-18dbe177.entry.js +2 -0
  265. package/dist/core/p-18dbe177.entry.js.map +1 -0
  266. package/dist/core/{p-74e9ad9d.entry.js → p-1a550eee.entry.js} +2 -2
  267. package/dist/core/{p-9b41ac88.entry.js → p-1f1895c0.entry.js} +2 -2
  268. package/dist/core/p-1fdc2457.entry.js +2 -0
  269. package/dist/core/p-212759be.entry.js +2 -0
  270. package/dist/core/{p-db940455.entry.js.map → p-212759be.entry.js.map} +1 -1
  271. package/dist/core/p-215504c1.entry.js +2 -0
  272. package/dist/core/p-2c3ddc57.entry.js +2 -0
  273. package/dist/core/{p-83039b10.entry.js.map → p-2c3ddc57.entry.js.map} +1 -1
  274. package/dist/core/p-31e7d262.entry.js +2 -0
  275. package/dist/core/p-31e7d262.entry.js.map +1 -0
  276. package/dist/core/{p-b3acb156.entry.js → p-32bba4e7.entry.js} +2 -2
  277. package/dist/core/{p-fa7caad6.entry.js → p-378e0723.entry.js} +2 -2
  278. package/dist/core/{p-0ebc8365.entry.js → p-3844a27d.entry.js} +2 -2
  279. package/dist/core/p-4cb4de7b.entry.js +2 -0
  280. package/dist/core/{p-aa8adc45.entry.js.map → p-4cb4de7b.entry.js.map} +1 -1
  281. package/dist/core/p-56f9e026.entry.js +2 -0
  282. package/dist/core/p-57b0e670.entry.js +2 -0
  283. package/dist/core/{p-b55fc943.entry.js.map → p-57b0e670.entry.js.map} +1 -1
  284. package/dist/core/p-58dc3ec3.entry.js +2 -0
  285. package/dist/core/p-58dc3ec3.entry.js.map +1 -0
  286. package/dist/core/p-5ad3097c.entry.js +2 -0
  287. package/dist/core/{p-a5489b0e.entry.js.map → p-5ad3097c.entry.js.map} +1 -1
  288. package/dist/core/p-668ca722.entry.js +2 -0
  289. package/dist/core/{p-f1be099b.entry.js → p-67200095.entry.js} +2 -2
  290. package/dist/core/p-731fe7d8.entry.js +2 -0
  291. package/dist/core/{p-5c88f415.entry.js.map → p-731fe7d8.entry.js.map} +1 -1
  292. package/dist/core/p-7591976a.entry.js +2 -0
  293. package/dist/core/p-75ea368b.entry.js +2 -0
  294. package/dist/core/{p-ab9ae7ba.entry.js → p-7b48b1b8.entry.js} +2 -2
  295. package/dist/core/p-7de47344.entry.js +2 -0
  296. package/dist/core/p-7de47344.entry.js.map +1 -0
  297. package/dist/core/p-83aa4327.entry.js +2 -0
  298. package/dist/core/{p-28a7d3f7.js → p-842cb87f.js} +2 -2
  299. package/dist/core/{p-a1e95a5f.js → p-8506b611.js} +3 -3
  300. package/dist/core/p-8506b611.js.map +1 -0
  301. package/dist/core/p-880743a5.js.map +1 -1
  302. package/dist/core/p-89b69743.entry.js +2 -0
  303. package/dist/core/p-8a796fbe.entry.js +2 -0
  304. package/dist/core/p-8f10919c.entry.js +2 -0
  305. package/dist/core/{p-f456bd71.entry.js.map → p-8f10919c.entry.js.map} +1 -1
  306. package/dist/core/p-8fe36a5b.entry.js +2 -0
  307. package/dist/core/p-915e53ac.entry.js +2 -0
  308. package/dist/core/{p-47e364bb.entry.js.map → p-915e53ac.entry.js.map} +1 -1
  309. package/dist/core/p-92e13f9d.entry.js +2 -0
  310. package/dist/core/p-a274cdaa.entry.js +2 -0
  311. package/dist/core/p-a274cdaa.entry.js.map +1 -0
  312. package/dist/core/p-a9a095c2.entry.js +2 -0
  313. package/dist/core/p-a9a095c2.entry.js.map +1 -0
  314. package/dist/core/{p-81b0848c.entry.js → p-ab68c0b7.entry.js} +2 -2
  315. package/dist/core/p-b50ffab3.entry.js +2 -0
  316. package/dist/core/p-b70cc248.entry.js +2 -0
  317. package/dist/core/p-b822b9ff.entry.js +2 -0
  318. package/dist/core/p-c0a5a3f7.entry.js +2 -0
  319. package/dist/core/p-c5b5fd69.entry.js +2 -0
  320. package/dist/core/{p-6d772ff9.entry.js.map → p-c5b5fd69.entry.js.map} +1 -1
  321. package/dist/core/{p-95d41a3b.js → p-cd6c2938.js} +2 -2
  322. package/dist/core/p-cd6c2938.js.map +1 -0
  323. package/dist/core/{p-3f2b803c.entry.js → p-d1c4eb91.entry.js} +2 -2
  324. package/dist/core/{p-d2351924.entry.js → p-d3963396.entry.js} +2 -2
  325. package/dist/core/p-d4fbc249.entry.js +2 -0
  326. package/dist/core/{p-5dc0af54.entry.js.map → p-d4fbc249.entry.js.map} +1 -1
  327. package/dist/core/{p-fc90bf06.entry.js → p-d949aac7.entry.js} +2 -2
  328. package/dist/core/p-e6af4c58.entry.js +2 -0
  329. package/dist/core/p-ede7af0a.entry.js +2 -0
  330. package/dist/core/p-ede7af0a.entry.js.map +1 -0
  331. package/dist/core/p-eebc9e71.entry.js +2 -0
  332. package/dist/core/{p-2ed3afef.entry.js → p-eebf7ad8.entry.js} +2 -2
  333. package/dist/core/{p-dc3fab19.entry.js → p-f1c8a96b.entry.js} +2 -2
  334. package/dist/core/{p-dc3fab19.entry.js.map → p-f1c8a96b.entry.js.map} +1 -1
  335. package/dist/core/{p-35e66bef.entry.js → p-f963bb2f.entry.js} +2 -2
  336. package/dist/core/p-fb0df3a5.entry.js +2 -0
  337. package/dist/core/{p-7cf554e6.entry.js.map → p-fb0df3a5.entry.js.map} +1 -1
  338. package/dist/esm/core.js +3 -3
  339. package/dist/esm/gov-accordion-item.entry.js +8 -5
  340. package/dist/esm/gov-accordion-item.entry.js.map +1 -1
  341. package/dist/esm/gov-accordion.entry.js +1 -1
  342. package/dist/esm/gov-attachments_3.entry.js +6 -6
  343. package/dist/esm/gov-attachments_3.entry.js.map +1 -1
  344. package/dist/esm/gov-backdrop.entry.js +4 -4
  345. package/dist/esm/gov-breadcrumbs.entry.js +4 -4
  346. package/dist/esm/gov-button.entry.js +6 -6
  347. package/dist/esm/gov-card.entry.js +4 -4
  348. package/dist/esm/gov-chip.entry.js +4 -4
  349. package/dist/esm/gov-container.entry.js +2 -2
  350. package/dist/esm/gov-control-group.entry.js +2 -2
  351. package/dist/esm/gov-cookiebar.entry.js +2 -2
  352. package/dist/esm/gov-dialog.entry.js +4 -4
  353. package/dist/esm/gov-dialog.entry.js.map +1 -1
  354. package/dist/esm/gov-dropdown.entry.js +3 -3
  355. package/dist/esm/gov-empty.entry.js +2 -2
  356. package/dist/esm/gov-error-code.entry.js +2 -2
  357. package/dist/esm/gov-flex.entry.js +27 -0
  358. package/dist/esm/gov-flex.entry.js.map +1 -0
  359. package/dist/esm/gov-form-autocomplete.entry.js +3 -3
  360. package/dist/esm/gov-form-checkbox-group.entry.js +2 -2
  361. package/dist/esm/gov-form-checkbox.entry.js +2 -2
  362. package/dist/esm/gov-form-control.entry.js +3 -3
  363. package/dist/esm/gov-form-file.entry.js +8 -3
  364. package/dist/esm/gov-form-file.entry.js.map +1 -1
  365. package/dist/esm/gov-form-group.entry.js +2 -2
  366. package/dist/esm/gov-form-input_2.entry.js +6 -6
  367. package/dist/esm/gov-form-label.entry.js +2 -2
  368. package/dist/esm/gov-form-multi-select.entry.js +7 -22
  369. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  370. package/dist/esm/gov-form-password-power.entry.js +2 -2
  371. package/dist/esm/gov-form-radio-group.entry.js +2 -2
  372. package/dist/esm/gov-form-radio.entry.js +2 -2
  373. package/dist/esm/gov-form-search.entry.js +2 -2
  374. package/dist/esm/gov-form-select.entry.js +4 -4
  375. package/dist/esm/gov-form-switch.entry.js +2 -2
  376. package/dist/esm/gov-grid-item.entry.js +2 -2
  377. package/dist/esm/gov-grid.entry.js +2 -2
  378. package/dist/esm/gov-icon.entry.js +2 -2
  379. package/dist/esm/gov-infobar.entry.js +3 -3
  380. package/dist/esm/gov-infobar.entry.js.map +1 -1
  381. package/dist/esm/gov-layout-column.entry.js +2 -2
  382. package/dist/esm/gov-layout.entry.js +2 -2
  383. package/dist/esm/gov-lifecycle.entry.js +43 -0
  384. package/dist/esm/gov-lifecycle.entry.js.map +1 -0
  385. package/dist/esm/gov-loading.entry.js +2 -2
  386. package/dist/esm/gov-message.entry.js +2 -2
  387. package/dist/esm/gov-pagination.entry.js +3 -3
  388. package/dist/esm/gov-pagination.entry.js.map +1 -1
  389. package/dist/esm/gov-spacer.entry.js +2 -2
  390. package/dist/esm/gov-stepper-item.entry.js +3 -3
  391. package/dist/esm/gov-stepper.entry.js +2 -2
  392. package/dist/esm/gov-tabs-item.entry.js +3 -3
  393. package/dist/esm/gov-tabs.entry.js +2 -2
  394. package/dist/esm/gov-tag.entry.js +2 -2
  395. package/dist/esm/gov-tag.entry.js.map +1 -1
  396. package/dist/esm/gov-theme-switch.entry.js +69 -0
  397. package/dist/esm/gov-theme-switch.entry.js.map +1 -0
  398. package/dist/esm/gov-tile.entry.js +2 -2
  399. package/dist/esm/gov-tiles.entry.js +2 -2
  400. package/dist/esm/gov-toast.entry.js +5 -6
  401. package/dist/esm/gov-toast.entry.js.map +1 -1
  402. package/dist/esm/gov-tooltip-content.entry.js +2 -2
  403. package/dist/esm/gov-tooltip.entry.js +4 -4
  404. package/dist/esm/gov-wizard-item.entry.js +4 -4
  405. package/dist/esm/gov-wizard.entry.js +4 -4
  406. package/dist/esm/{index-d8b4eb6c.js → index-c263e031.js} +20 -4
  407. package/dist/esm/index-c263e031.js.map +1 -0
  408. package/dist/esm/loader.js +3 -3
  409. package/dist/esm/{string.utils-5ce3f551.js → string.utils-1da8f8fb.js} +2 -2
  410. package/dist/esm/string.utils-1da8f8fb.js.map +1 -0
  411. package/dist/esm/{wcag-fa5ce56c.js → wcag-d7c6c252.js} +2 -2
  412. package/dist/esm/{wcag-fa5ce56c.js.map → wcag-d7c6c252.js.map} +1 -1
  413. package/dist/hydrate/index.js +277 -10021
  414. package/dist/hydrate/index.mjs +277 -10021
  415. package/dist/types/components/gov-accordion/gov-accordion-item.d.ts +1 -0
  416. package/dist/types/components/gov-flex/constants.d.ts +3 -0
  417. package/dist/types/components/gov-flex/gov-flex.d.ts +33 -0
  418. package/dist/types/components/gov-form/file/gov-form-file.d.ts +1 -0
  419. package/dist/types/components/gov-form/multiselect/gov-form-multi-select.d.ts +0 -2
  420. package/dist/types/components/gov-lifecycle-tester/gov-lifecycle-tester.d.ts +14 -0
  421. package/dist/types/components.d.ts +74 -13
  422. package/dist/types/utils/string.utils.d.ts +1 -0
  423. package/package.json +2 -2
  424. package/dist/cjs/gov-app_2.cjs.entry.js +0 -9891
  425. package/dist/cjs/gov-app_2.cjs.entry.js.map +0 -1
  426. package/dist/cjs/index-1af4880c.js.map +0 -1
  427. package/dist/cjs/string.utils-2335838f.js.map +0 -1
  428. package/dist/collection/components/gov-app/gov-app.css +0 -68
  429. package/dist/collection/components/gov-app/gov-app.js +0 -93
  430. package/dist/collection/components/gov-app/gov-app.js.map +0 -1
  431. package/dist/components/gov-app.js +0 -2
  432. package/dist/components/gov-app.js.map +0 -1
  433. package/dist/components/p-95d41a3b.js.map +0 -1
  434. package/dist/components/p-ae3dada7.js.map +0 -1
  435. package/dist/components/p-ae7e6127.js +0 -2
  436. package/dist/components/p-e9b35956.js +0 -2
  437. package/dist/components/p-fe1842da.js +0 -2
  438. package/dist/core/p-006e52f1.entry.js +0 -2
  439. package/dist/core/p-023787b3.entry.js +0 -2
  440. package/dist/core/p-023787b3.entry.js.map +0 -1
  441. package/dist/core/p-17015e36.entry.js +0 -2
  442. package/dist/core/p-182189d2.entry.js +0 -2
  443. package/dist/core/p-2effdd60.entry.js +0 -2
  444. package/dist/core/p-2effdd60.entry.js.map +0 -1
  445. package/dist/core/p-477a5027.entry.js +0 -2
  446. package/dist/core/p-477a5027.entry.js.map +0 -1
  447. package/dist/core/p-47e364bb.entry.js +0 -2
  448. package/dist/core/p-5c88f415.entry.js +0 -2
  449. package/dist/core/p-5dc0af54.entry.js +0 -2
  450. package/dist/core/p-5dcbfca3.entry.js +0 -2
  451. package/dist/core/p-663d3db2.entry.js +0 -2
  452. package/dist/core/p-6b42a387.entry.js +0 -2
  453. package/dist/core/p-6d772ff9.entry.js +0 -2
  454. package/dist/core/p-6ed147a6.entry.js +0 -2
  455. package/dist/core/p-6ed147a6.entry.js.map +0 -1
  456. package/dist/core/p-7cf554e6.entry.js +0 -2
  457. package/dist/core/p-83039b10.entry.js +0 -2
  458. package/dist/core/p-904de5e6.entry.js +0 -2
  459. package/dist/core/p-91a9cd24.entry.js +0 -2
  460. package/dist/core/p-95d41a3b.js.map +0 -1
  461. package/dist/core/p-963f9fcd.entry.js +0 -2
  462. package/dist/core/p-9d0f20ec.entry.js +0 -2
  463. package/dist/core/p-9dde00d8.entry.js +0 -2
  464. package/dist/core/p-a1e95a5f.js.map +0 -1
  465. package/dist/core/p-a1ebb4da.entry.js +0 -2
  466. package/dist/core/p-a53a277a.entry.js +0 -2
  467. package/dist/core/p-a5489b0e.entry.js +0 -2
  468. package/dist/core/p-a54f1db9.entry.js +0 -2
  469. package/dist/core/p-aa8adc45.entry.js +0 -2
  470. package/dist/core/p-b55fc943.entry.js +0 -2
  471. package/dist/core/p-b838bb27.entry.js +0 -2
  472. package/dist/core/p-c214c202.entry.js +0 -2
  473. package/dist/core/p-c214c202.entry.js.map +0 -1
  474. package/dist/core/p-c4c7cb24.entry.js +0 -2
  475. package/dist/core/p-db940455.entry.js +0 -2
  476. package/dist/core/p-e134b123.entry.js +0 -2
  477. package/dist/core/p-e4978aab.entry.js +0 -2
  478. package/dist/core/p-edc05eff.entry.js +0 -2
  479. package/dist/core/p-edc05eff.entry.js.map +0 -1
  480. package/dist/core/p-eeb9cb73.entry.js +0 -2
  481. package/dist/core/p-f141ad5e.entry.js +0 -2
  482. package/dist/core/p-f456bd71.entry.js +0 -2
  483. package/dist/esm/gov-app_2.entry.js +0 -9886
  484. package/dist/esm/gov-app_2.entry.js.map +0 -1
  485. package/dist/esm/index-d8b4eb6c.js.map +0 -1
  486. package/dist/esm/string.utils-5ce3f551.js.map +0 -1
  487. package/dist/types/components/gov-app/gov-app.d.ts +0 -37
  488. /package/dist/components/{p-ae7e6127.js.map → p-1d3019f3.js.map} +0 -0
  489. /package/dist/components/{p-e183a7c7.js.map → p-1f3bb41d.js.map} +0 -0
  490. /package/dist/components/{p-6e19816b.js.map → p-23b7e680.js.map} +0 -0
  491. /package/dist/components/{p-5caf1fe1.js.map → p-387052e1.js.map} +0 -0
  492. /package/dist/components/{p-c9a15c52.js.map → p-3b807239.js.map} +0 -0
  493. /package/dist/components/{p-ff0cf148.js.map → p-5cc316bc.js.map} +0 -0
  494. /package/dist/components/{p-e20bb5dc.js.map → p-6ea84137.js.map} +0 -0
  495. /package/dist/components/{p-736e4917.js.map → p-bd22e21d.js.map} +0 -0
  496. /package/dist/components/{p-2da35aa8.js.map → p-c211c3e1.js.map} +0 -0
  497. /package/dist/components/{p-9a93146e.js.map → p-dcee21ca.js.map} +0 -0
  498. /package/dist/core/{p-9ff8f059.entry.js.map → p-0d2c4d31.entry.js.map} +0 -0
  499. /package/dist/core/{p-0a952b3c.entry.js.map → p-12680890.entry.js.map} +0 -0
  500. /package/dist/core/{p-e4978aab.entry.js.map → p-1600c1fb.entry.js.map} +0 -0
  501. /package/dist/core/{p-74e9ad9d.entry.js.map → p-1a550eee.entry.js.map} +0 -0
  502. /package/dist/core/{p-9b41ac88.entry.js.map → p-1f1895c0.entry.js.map} +0 -0
  503. /package/dist/core/{p-5dcbfca3.entry.js.map → p-1fdc2457.entry.js.map} +0 -0
  504. /package/dist/core/{p-f141ad5e.entry.js.map → p-215504c1.entry.js.map} +0 -0
  505. /package/dist/core/{p-b3acb156.entry.js.map → p-32bba4e7.entry.js.map} +0 -0
  506. /package/dist/core/{p-fa7caad6.entry.js.map → p-378e0723.entry.js.map} +0 -0
  507. /package/dist/core/{p-0ebc8365.entry.js.map → p-3844a27d.entry.js.map} +0 -0
  508. /package/dist/core/{p-182189d2.entry.js.map → p-56f9e026.entry.js.map} +0 -0
  509. /package/dist/core/{p-b838bb27.entry.js.map → p-668ca722.entry.js.map} +0 -0
  510. /package/dist/core/{p-f1be099b.entry.js.map → p-67200095.entry.js.map} +0 -0
  511. /package/dist/core/{p-6b42a387.entry.js.map → p-7591976a.entry.js.map} +0 -0
  512. /package/dist/core/{p-963f9fcd.entry.js.map → p-75ea368b.entry.js.map} +0 -0
  513. /package/dist/core/{p-ab9ae7ba.entry.js.map → p-7b48b1b8.entry.js.map} +0 -0
  514. /package/dist/core/{p-eeb9cb73.entry.js.map → p-83aa4327.entry.js.map} +0 -0
  515. /package/dist/core/{p-28a7d3f7.js.map → p-842cb87f.js.map} +0 -0
  516. /package/dist/core/{p-904de5e6.entry.js.map → p-89b69743.entry.js.map} +0 -0
  517. /package/dist/core/{p-e134b123.entry.js.map → p-8a796fbe.entry.js.map} +0 -0
  518. /package/dist/core/{p-663d3db2.entry.js.map → p-8fe36a5b.entry.js.map} +0 -0
  519. /package/dist/core/{p-a53a277a.entry.js.map → p-92e13f9d.entry.js.map} +0 -0
  520. /package/dist/core/{p-81b0848c.entry.js.map → p-ab68c0b7.entry.js.map} +0 -0
  521. /package/dist/core/{p-a54f1db9.entry.js.map → p-b50ffab3.entry.js.map} +0 -0
  522. /package/dist/core/{p-c4c7cb24.entry.js.map → p-b70cc248.entry.js.map} +0 -0
  523. /package/dist/core/{p-91a9cd24.entry.js.map → p-b822b9ff.entry.js.map} +0 -0
  524. /package/dist/core/{p-a1ebb4da.entry.js.map → p-c0a5a3f7.entry.js.map} +0 -0
  525. /package/dist/core/{p-3f2b803c.entry.js.map → p-d1c4eb91.entry.js.map} +0 -0
  526. /package/dist/core/{p-d2351924.entry.js.map → p-d3963396.entry.js.map} +0 -0
  527. /package/dist/core/{p-fc90bf06.entry.js.map → p-d949aac7.entry.js.map} +0 -0
  528. /package/dist/core/{p-006e52f1.entry.js.map → p-e6af4c58.entry.js.map} +0 -0
  529. /package/dist/core/{p-9dde00d8.entry.js.map → p-eebc9e71.entry.js.map} +0 -0
  530. /package/dist/core/{p-2ed3afef.entry.js.map → p-eebf7ad8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AI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAA;SACnC;KACD;;;;IAOD,MAAM,qBAAqB;QAC1BI,oBAAe,CAAC,IAAI,CAAC,oBAAoB,EAAE,wBAAwB,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;QACtFA,oBAAe,CAAC,IAAI,CAAC,qBAAqB,EAAE,yBAAyB,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;KACxF;;;;;;;;;","names":["govHost","createID","canValidateWcagOnRender","tick","h","Host","boolToFocusValue","toBoolAttr","validateWcagRef"],"sources":["../../../packages/core/src/components/gov-dialog/constants.ts","../../../packages/core/src/components/gov-dialog/gov-dialog.tsx"],"sourcesContent":["export const DialogClass = {\n\troot: 'gov-dialog',\n\tdialog: 'gov-dialog__dialog',\n\tinner: 'gov-dialog__inner',\n\theader: 'gov-dialog__header',\n\ttitle: 'gov-dialog__title',\n\tcontent: 'gov-dialog__content',\n\tclose: 'gov-dialog__close',\n\tfooter: 'gov-dialog__footer',\n\tbodyFix: 'body-fixed',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch} from '@stencil/core'\nimport {boolToFocusValue, govHost, toBoolAttr} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {validateWcagRef} from '../../helpers/Validate/wcag'\nimport {Nullable} from '../../types/interfaces'\nimport {createID} from '../../utils/string.utils'\nimport {DialogClass} from './constants'\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-dialog',\n})\nexport class GovDialog {\n\tprivate h: GovHost\n\tprivate readonly labelId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false;\n\tprivate closeCtaRef?: HTMLGovButtonElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.labelId = createID('GovDialogLabel')\n\t\tthis.contentId = createID('GovDialogContent')\n\t}\n\n\t@Element() host: HTMLGovDialogElement\n\n\t/**\n\t * Attribute for dialog window display\n\t */\n\t@Prop({mutable: true, reflect: true}) open = false\n\t/**\n\t * Attribute allowing blocking the dialog closing\n\t */\n\t@Prop({attribute: 'block-close'}) blockClose = false\n\t/**\n\t * Attribute allowing blocking the backdrop dialog closing\n\t */\n\t@Prop({attribute: 'block-backdrop-close'}) blockBackdropClose = false\n\t/**\n\t * Role of dialog\n\t */\n\t@Prop({attribute: 'role'}) role: Nullable<string> = 'dialog'\n\t/**\n\t * Used to change the HTML tag in the dialog label for correct semantic structure\n\t */\n\t@Prop({attribute: 'label-tag'}) readonly labelTag: string = 'h2'\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({attribute: 'accessible-labelled-by'}) accessibleLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the dialog.\n\t */\n\t@Prop({attribute: 'accessible-described-by'}) accessibleDescribedBy: string\n\t/**\n\t * Adds accessible label for the dialog close button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-close-label'}) readonly accessibleCloseLabel: string = 'Zavřít okno'\n\t/**\n\t * A string of identifiers that indicate alternative label elements for closing the dialog window\n\t */\n\t@Prop({attribute: 'accessible-close-labelled-by'}) accessibleCloseLabelledBy: string\n\t/**\n\t * Emitted when dialog window closes.\n\t */\n\t@Event({eventName: 'gov-close'}) govClose: EventEmitter<PointerEvent>\n\n\t@Watch('open')\n\twatchOpen(newValue: boolean): void {\n\t\tthis.open = newValue\n\t\tthis.setFocus().finally()\n\t}\n\n\tprivate showDialog() {\n\t\tthis.open = true\n\t\tdocument.body.classList.add(DialogClass.bodyFix)\n\t}\n\n\tprivate hideDialog() {\n\t\tthis.open = false\n\t\tdocument.body.classList.remove(DialogClass.bodyFix)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\ttick(() => this.validateAccessibility())\n\t\t}\n\n\t\tif (this.open) {\n\t\t\tthis.showDialog()\n\t\t} else {\n\t\t\tthis.hideDialog()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tdocument.body.classList.remove(DialogClass.bodyFix)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(DialogClass.root)} open={this.open} hydrated={this.hydrated}>\n\t\t\t\t<dialog\n\t\t\t\t\tclass={DialogClass.dialog}\n\t\t\t\t\thidden={!this.open}\n\t\t\t\t\ttabindex={boolToFocusValue(this.open)}\n\t\t\t\t\topen={this.open}\n\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\taria-hidden={toBoolAttr(!this.open)}\n\t\t\t\t\taria-labelledby={this.accessibleLabelledBy || this.labelId}\n\t\t\t\t\taria-describedby={this.accessibleDescribedBy || this.contentId}\n\t\t\t\t\trole={this.role}\n\t\t\t\t>\n\t\t\t\t\t<div class={DialogClass.inner}>\n\t\t\t\t\t\t<div class={DialogClass.header}>\n\t\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t\t\t{this.h.hasSlot('title') && (\n\t\t\t\t\t\t\t\t<span class={DialogClass.title} id={this.labelId}>\n\t\t\t\t\t\t\t\t\t<slot name=\"title\"/>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\tref={el => (this.closeCtaRef = el)}\n\t\t\t\t\t\t\t\tdisabled={this.blockClose}\n\t\t\t\t\t\t\t\tclass={DialogClass.close}\n\t\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t\taccessible-label={this.accessibleCloseLabel}\n\t\t\t\t\t\t\t\taccessible-labelledby={this.accessibleCloseLabelledBy}\n\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<gov-icon slot=\"left-icon\" name=\"x-lg\"/>\n\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={DialogClass.content} id={this.contentId}>\n\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{this.h.hasSlot('footer') && (\n\t\t\t\t\t\t\t<div class={DialogClass.footer}>\n\t\t\t\t\t\t\t\t<slot name=\"footer\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</dialog>\n\n\t\t\t\t{this.open ? (\n\t\t\t\t\t<gov-backdrop\n\t\t\t\t\t\tdisabled={this.blockBackdropClose}\n\t\t\t\t\t\taccessible-label={this.accessibleCloseLabel}\n\t\t\t\t\t\taccessible-labelled-by={this.accessibleCloseLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t\te.preventDefault()\n\t\tif (this.blockClose === false) {\n\t\t\tthis.hideDialog()\n\t\t\tthis.govClose.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Sets the close button to focus\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tif (this.open && this.closeCtaRef) {\n\t\t\tthis.closeCtaRef.setFocus().catch()\n\t\t}\n\t}\n\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateWcagRef(this.accessibleLabelledBy, 'accessible-labelled-by', DialogClass.root)\n\t\tvalidateWcagRef(this.accessibleDescribedBy, 'accessible-described-by', DialogClass.root)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-dialog.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAO,MAAM,WAAW,GAAG;IAC1B,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,oBAAoB;IAC5B,KAAK,EA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AE,yBAAyB,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;KACxF;;;;;;;;;","names":["govHost","createID","canValidateWcagOnRender","tick","h","Host","boolToFocusValue","toBoolAttr","validateWcagRef"],"sources":["../../../packages/core/src/components/gov-dialog/constants.ts","../../../packages/core/src/components/gov-dialog/gov-dialog.tsx"],"sourcesContent":["export const DialogClass = {\n\troot: 'gov-dialog',\n\tdialog: 'gov-dialog__dialog',\n\tinner: 'gov-dialog__inner',\n\theader: 'gov-dialog__header',\n\ttitle: 'gov-dialog__title',\n\tcontent: 'gov-dialog__content',\n\tclose: 'gov-dialog__close',\n\tfooter: 'gov-dialog__footer',\n\tbodyFix: 'body-fixed',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch} from '@stencil/core'\nimport {boolToFocusValue, govHost, toBoolAttr} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {validateWcagRef} from '../../helpers/Validate/wcag'\nimport {Nullable} from '../../types/interfaces'\nimport {createID} from '../../utils/string.utils'\nimport {DialogClass} from './constants'\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-dialog',\n})\nexport class GovDialog {\n\tprivate h: GovHost\n\tprivate readonly labelId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false;\n\tprivate closeCtaRef?: HTMLGovButtonElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.labelId = createID('GovDialogLabel')\n\t\tthis.contentId = createID('GovDialogContent')\n\t}\n\n\t@Element() host: HTMLGovDialogElement\n\n\t/**\n\t * Attribute for dialog window display\n\t */\n\t@Prop({mutable: true, reflect: true}) open = false\n\t/**\n\t * Attribute allowing blocking the dialog closing\n\t */\n\t@Prop({attribute: 'block-close'}) blockClose = false\n\t/**\n\t * Attribute allowing blocking the backdrop dialog closing\n\t */\n\t@Prop({attribute: 'block-backdrop-close'}) blockBackdropClose = false\n\t/**\n\t * Role of dialog\n\t */\n\t@Prop({attribute: 'role'}) role: Nullable<string> = 'dialog'\n\t/**\n\t * Used to change the HTML tag in the dialog label for correct semantic structure\n\t */\n\t@Prop({attribute: 'label-tag'}) readonly labelTag: string = 'h2'\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({attribute: 'accessible-labelled-by'}) accessibleLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the dialog.\n\t */\n\t@Prop({attribute: 'accessible-described-by'}) accessibleDescribedBy: string\n\t/**\n\t * Adds accessible label for the dialog close button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-close-label'}) readonly accessibleCloseLabel: string = 'Zavřít okno'\n\t/**\n\t * A string of identifiers that indicate alternative label elements for closing the dialog window\n\t */\n\t@Prop({attribute: 'accessible-close-labelled-by'}) accessibleCloseLabelledBy: string\n\t/**\n\t * Emitted when dialog window closes.\n\t */\n\t@Event({eventName: 'gov-close'}) govClose: EventEmitter<PointerEvent>\n\n\t@Watch('open')\n\twatchOpen(newValue: boolean): void {\n\t\tthis.open = newValue\n\t\tthis.setFocus().finally()\n\t}\n\n\tprivate showDialog() {\n\t\tthis.open = true\n\t\tdocument.body.classList.add(DialogClass.bodyFix)\n\t}\n\n\tprivate hideDialog() {\n\t\tthis.open = false\n\t\tdocument.body.classList.remove(DialogClass.bodyFix)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\ttick(() => this.validateAccessibility())\n\t\t}\n\n\t\tif (this.open) {\n\t\t\tthis.showDialog()\n\t\t} else {\n\t\t\tthis.hideDialog()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tdocument.body.classList.remove(DialogClass.bodyFix)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(DialogClass.root)} open={this.open} hydrated={this.hydrated}>\n\t\t\t\t<dialog\n\t\t\t\t\tclass={DialogClass.dialog}\n\t\t\t\t\thidden={!this.open}\n\t\t\t\t\ttabindex={boolToFocusValue(this.open)}\n\t\t\t\t\topen={this.open}\n\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\taria-hidden={toBoolAttr(!this.open)}\n\t\t\t\t\taria-labelledby={this.accessibleLabelledBy || this.labelId}\n\t\t\t\t\taria-describedby={this.accessibleDescribedBy || this.contentId}\n\t\t\t\t\trole={this.role}\n\t\t\t\t>\n\t\t\t\t\t<div class={DialogClass.inner}>\n\t\t\t\t\t\t<div class={DialogClass.header}>\n\t\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t\t\t{this.h.hasSlot('title') && (\n\t\t\t\t\t\t\t\t<span class={DialogClass.title} id={this.labelId}>\n\t\t\t\t\t\t\t\t\t<slot name=\"title\"/>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\tref={el => (this.closeCtaRef = el)}\n\t\t\t\t\t\t\t\tdisabled={this.blockClose}\n\t\t\t\t\t\t\t\tclass={DialogClass.close}\n\t\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t\taria-label={this.accessibleCloseLabel}\n\t\t\t\t\t\t\t\taria-labelledby={this.accessibleCloseLabelledBy}\n\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<gov-icon slot=\"left-icon\" name=\"x-lg\"/>\n\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={DialogClass.content} id={this.contentId}>\n\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{this.h.hasSlot('footer') && (\n\t\t\t\t\t\t\t<div class={DialogClass.footer}>\n\t\t\t\t\t\t\t\t<slot name=\"footer\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</dialog>\n\n\t\t\t\t{this.open ? (\n\t\t\t\t\t<gov-backdrop\n\t\t\t\t\t\tdisabled={this.blockBackdropClose}\n\t\t\t\t\t\taria-label={this.accessibleCloseLabel}\n\t\t\t\t\t\taria-labelled-by={this.accessibleCloseLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t\te.preventDefault()\n\t\tif (this.blockClose === false) {\n\t\t\tthis.hideDialog()\n\t\t\tthis.govClose.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Sets the close button to focus\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tif (this.open && this.closeCtaRef) {\n\t\t\tthis.closeCtaRef.setFocus().catch()\n\t\t}\n\t}\n\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateWcagRef(this.accessibleLabelledBy, 'accessible-labelled-by', DialogClass.root)\n\t\tvalidateWcagRef(this.accessibleDescribedBy, 'accessible-described-by', DialogClass.root)\n\t}\n}\n"],"version":3}
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1af4880c.js');
5
+ const index = require('./index-7ff4447c.js');
6
6
  const template = require('./template-b070338f.js');
7
- const string_utils = require('./string.utils-2335838f.js');
7
+ const string_utils = require('./string.utils-b84c81cf.js');
8
8
  const constants = require('./constants-861428a4.js');
9
9
  require('./sizes-89f8d3b2.js');
10
10
  require('./colors-976f6dff.js');
@@ -117,7 +117,7 @@ const GovDropdown = class {
117
117
  });
118
118
  }
119
119
  render() {
120
- return (index.h(index.Host, { key: 'ee6eaf511c26f189e161ac9d13c26e8dbc5a3ac7', class: this.h.classes([DropdownClass.root]), open: this.open, position: this.position }, index.h("slot", { key: '964f39a16b89cebb8fdaab7025ff63a0298f1a8c' }), index.h("div", { key: '344a7f2b55a7e4fa9ee92777276e65057bcf025d', ref: el => registerClickOutside(this, el, () => this.open = false), class: DropdownClass.list, id: this.listId, "aria-labelledby": this.controlId, "aria-hidden": template.toBoolAttr(!this.open), hidden: !this.open }, index.h("slot", { key: '54ee18b9f2ec257708d21fe7fa1c3b2ff1827824', name: "list" }))));
120
+ return (index.h(index.Host, { key: '43c2a03dcb27ebe54f8dd00ca1120b848cac957c', class: this.h.classes([DropdownClass.root]), open: this.open, position: this.position }, index.h("slot", { key: '732c956fe37283578a95c843cf94ad590cd16402' }), index.h("div", { key: 'c3934a0f7c8303950a5c7898574fcea2e14e1890', ref: el => registerClickOutside(this, el, () => this.open = false), class: DropdownClass.list, id: this.listId, "aria-labelledby": this.controlId, "aria-hidden": template.toBoolAttr(!this.open), hidden: !this.open }, index.h("slot", { key: 'cb685039c57f9d32ae7c238fcb7457fe72b4c9c4', name: "list" }))));
121
121
  }
122
122
  /**
123
123
  * Returns the current state of the dropdown
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1af4880c.js');
5
+ const index = require('./index-7ff4447c.js');
6
6
  const utils = require('./utils-d263c5c6.js');
7
7
  const sizes = require('./sizes-89f8d3b2.js');
8
8
  const template = require('./template-b070338f.js');
@@ -30,7 +30,7 @@ const GovEmpty = class {
30
30
  this.validateSize(this.size);
31
31
  }
32
32
  render() {
33
- return (index.h(index.Host, { key: 'd69440398b476c59b60240f687d7f00dacfe4f0d', class: this.h.classes(EmptyClass.root), size: this.size }, this.h.hasSlot('icon') && (index.h("slot", { key: '7832fc85c0ccbb79a2832cf2bc9bee560790a10e', name: "icon" })), index.h("div", { key: '0cc061e85c0817f996ffc18601b3ac6dcf2b52b5', class: EmptyClass.content }, index.h("slot", { key: 'fbe776f189de07ba54ca1c600e9979d6af7667b9', name: "headline" }), index.h("slot", { key: 'e28fb1ef408ae3daa1b642ff3b15e87457553b6b' }))));
33
+ return (index.h(index.Host, { key: '25d3813acc796b96c6e51aec4a55fc2efa725aa6', class: this.h.classes(EmptyClass.root), size: this.size }, this.h.hasSlot('icon') && (index.h("slot", { key: '7fccad0fe25b57219f06cfbcf18a2f2bff19c905', name: "icon" })), index.h("div", { key: 'a4cffd5e7175ba9273a5ea74ba622e2a577ba0fe', class: EmptyClass.content }, index.h("slot", { key: '53fd435d43baa4841ecb5e3d5817efcb57433eab', name: "headline" }), index.h("slot", { key: '314e7a0fd7a381dbc4a85da4df2082ce4946b7b5' }))));
34
34
  }
35
35
  get host() { return index.getElement(this); }
36
36
  static get watchers() { return {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1af4880c.js');
5
+ const index = require('./index-7ff4447c.js');
6
6
  const template = require('./template-b070338f.js');
7
7
 
8
8
  const ErrorCodeClass = {
@@ -16,7 +16,7 @@ const GovErrorCode = class {
16
16
  this.h = template.govHost(this.host);
17
17
  }
18
18
  render() {
19
- return (index.h(index.Host, { key: '8c7ac0985621c075b94e1bad82a913c9454b10cf', class: this.h.classes(ErrorCodeClass.root), align: "center" }, this.h.hasSlot('icon') && (index.h("slot", { key: '498d60a762977d1dfd24750a2c0afd2ce21f1c68', name: "icon" })), index.h("div", { key: 'bdd3a7505c44660e772bd55f80519fc0f4026a4a', class: ErrorCodeClass.content }, index.h("slot", { key: 'f9c789de200eb94d4844c633c771339be14f416e', name: "headline" }), index.h("slot", { key: '475487ef2fb1bb63eea1ca35a81024b734c402be' }))));
19
+ return (index.h(index.Host, { key: '90ebeeb8f2e7ed539e7069a876aa1fe3027873fc', class: this.h.classes(ErrorCodeClass.root), align: "center" }, this.h.hasSlot('icon') && (index.h("slot", { key: 'a31a15dd5276be32288c691d5bb7b8cf9d6615ab', name: "icon" })), index.h("div", { key: '0dfc7905d1e515a7ecc1eba1dd3912cd32774ca3', class: ErrorCodeClass.content }, index.h("slot", { key: '238e3ab94cf05880567e2ac2c54c9f9c572ff014', name: "headline" }), index.h("slot", { key: '56519d70f3ab7b162e9e9a78bf7bfabef89a9b2d' }))));
20
20
  }
21
21
  get host() { return index.getElement(this); }
22
22
  };
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-7ff4447c.js');
6
+ const template = require('./template-b070338f.js');
7
+
8
+ const FlexClass = {
9
+ root: 'gov-flex',
10
+ };
11
+
12
+ const GovFlex = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ this.direction = 'row';
16
+ this.justifyContent = undefined;
17
+ this.alignItems = undefined;
18
+ this.wrap = undefined;
19
+ this.alignContent = undefined;
20
+ this.alignSelf = undefined;
21
+ this.h = template.govHost(this.host);
22
+ }
23
+ render() {
24
+ return (index.h(index.Host, { key: '77d5eb1db594698f6fde4bf497209912de71173f', class: this.h.classes(FlexClass.root) }, index.h("slot", { key: '6c01ff6ec88c53dbf9e83d492f660c96e9e7fc2a' })));
25
+ }
26
+ get host() { return index.getElement(this); }
27
+ };
28
+
29
+ exports.gov_flex = GovFlex;
30
+
31
+ //# sourceMappingURL=gov-flex.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"gov-flex.entry.cjs.js","mappings":";;;;;;;AAAO,MAAM,SAAS,GAAG;IACxB,IAAI,EAAE,UAAU;CAChB;;MCMY,OAAO;IAGnB;;yBASyE,KAAK;;;;;;QAR7E,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAgDD,MAAM;QACL,QACCC,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAC1CD,oEAAa,CACP,EACP;KACD;;;;;;","names":["govHost","h","Host"],"sources":["../../../packages/core/src/components/gov-flex/constants.ts","../../../packages/core/src/components/gov-flex/gov-flex.tsx"],"sourcesContent":["export const FlexClass = {\n\troot: 'gov-flex',\n}\n\n","import {Component, Element, h, Host, Prop} from '@stencil/core'\nimport {FlexClass} from './constants'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-flex',\n})\nexport class GovFlex {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovGridElement\n\n\t/**\n\t * Controls the flex direction of the container. Can be 'row', 'row-reverse', 'column', or 'column-reverse'.\n\t */\n\t@Prop() direction: 'row' | 'row-reverse' | 'column' | 'column-reverse' = 'row';\n\n\t/**\n\t * Defines how the browser distributes space between and around content items along the main axis.\n\t * Allowed values: 'flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'space-evenly'.\n\t */\n\t@Prop({\n\t\tattribute: 'justify-content',\n\t\treflect: true\n\t}) justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';\n\n\t/**\n\t * Aligns flex items along the cross axis. Can be 'stretch', 'flex-start', 'flex-end', 'center', or 'baseline'.\n\t */\n\t@Prop({\n\t\tattribute: 'align-items', reflect: true\n\t}) alignItems?: 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'baseline';\n\n\t/**\n\t * Controls whether the flex container is a single-line or multi-line flex container. Can be 'nowrap', 'wrap', or 'wrap-reverse'.\n\t */\n\t@Prop({reflect: true}) wrap?: 'nowrap' | 'wrap' | 'wrap-reverse';\n\n\t/**\n\t * Aligns the flex container's lines within when there is extra space in the cross-axis.\n\t * Allowed values: 'flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'stretch'.\n\t */\n\t@Prop({\n\t\tattribute: 'align-content',\n\t\treflect: true\n\t}) alignContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'stretch';\n\n\t/**\n\t * Sets the alignment of the flex container’s children along the flex container’s cross axis, overriding the `align-items` property for individual flex items.\n\t * Allowed values: 'auto', 'flex-start', 'flex-end', 'center', 'baseline', 'stretch'.\n\t */\n\t@Prop({\n\t\tattribute: 'align-self',\n\t\treflect: true\n\t}) alignSelf?: 'auto' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FlexClass.root)}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1af4880c.js');
5
+ const index = require('./index-7ff4447c.js');
6
6
  const template = require('./template-b070338f.js');
7
7
  const props = require('./props-b8a955b2.js');
8
- const string_utils = require('./string.utils-2335838f.js');
8
+ const string_utils = require('./string.utils-b84c81cf.js');
9
9
  const utils = require('./utils-d263c5c6.js');
10
10
  const constants = require('./constants-47ba678b.js');
11
11
  const array_utils = require('./array.utils-96eadde3.js');
@@ -125,7 +125,7 @@ const GovFormAutocomplete = class {
125
125
  this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { [attributeName]: newValue });
126
126
  }
127
127
  render() {
128
- return (index.h(index.Host, { key: 'ea390b2ba5832f3269f5bc27732b212f2c893ace', class: constants.FormAutocompleteClass.root, size: this.size }, index.h("gov-form-input", Object.assign({ key: 'd76f02655c5e640062c413e8ac8e40266a74fa1e', placeholder: this.placeholder, name: this.name, disabled: this.disabled, readonly: this.readonly, autocomplete: false, size: this.size, required: this.required, invalid: this.invalid, success: this.success, role: 'searchbox', value: this.value, minlength: this.minlength, maxlength: this.maxlength, "on-gov-input": utils.throttle(this.onInputHandler.bind(this), this.throttleTime), "on-gov-keyup": this.onKeyUpHandler.bind(this), "on-gov-keydown": this.onKeyDownHandler.bind(this), "on-gov-focus": this.onFocusHandler.bind(this), "on-gov-blur": this.onBlurHandler.bind(this) }, this.inheritedAttributes, { "aria-autocomplete": 'list', "aria-owns": [this.listBoxId, this.inheritedAttributes['aria-owns']].join(' '), "aria-expanded": template.booleanString(this.list.length && this.focused ? true : false), ref: el => (this.inputRef = el) }), index.h("slot", { key: 'd5a3373d4b1aa5883c67a79dee06124d794a4956', name: "right-icon" })), index.h("ul", { key: '26bb0a0e05692a25e8ceda76ce7439c43d49325a', class: constants.FormAutocompleteClass.list, role: 'listbox', "aria-hidden": template.toBoolAttr(!this.focused), hidden: !this.focused, id: this.listBoxId, ref: el => (this.listRef = el) }, this.focused && this.list.length === 0 && this.processing === false && this.isValueAccepted && this.messageEmpty ? (index.h("li", { class: constants.FormAutocompleteClass.empty }, this.messageEmpty)) : null, this.focused && this.processing === true && this.isValueAccepted ? (index.h("li", { class: constants.FormAutocompleteClass.loading }, index.h("gov-skeleton", { size: "m" }))) : null, this.focused ? this.list.map((item, index$1) => {
128
+ return (index.h(index.Host, { key: '4c1ca728a4fcbb5a3b39d219a166896fb6e41c5c', class: constants.FormAutocompleteClass.root, size: this.size }, index.h("gov-form-input", Object.assign({ key: '34c6ec7581edd63d5aab4f8aba0a3e1e074ca0d9', placeholder: this.placeholder, name: this.name, disabled: this.disabled, readonly: this.readonly, autocomplete: false, size: this.size, required: this.required, invalid: this.invalid, success: this.success, role: 'searchbox', value: this.value, minlength: this.minlength, maxlength: this.maxlength, "on-gov-input": utils.throttle(this.onInputHandler.bind(this), this.throttleTime), "on-gov-keyup": this.onKeyUpHandler.bind(this), "on-gov-keydown": this.onKeyDownHandler.bind(this), "on-gov-focus": this.onFocusHandler.bind(this), "on-gov-blur": this.onBlurHandler.bind(this) }, this.inheritedAttributes, { "aria-autocomplete": 'list', "aria-owns": [this.listBoxId, this.inheritedAttributes['aria-owns']].join(' '), "aria-expanded": template.booleanString(this.list.length && this.focused ? true : false), ref: el => (this.inputRef = el) }), index.h("slot", { key: '6fa5e8463b84faa2053047c1544c2097359f268e', name: "right-icon" })), index.h("ul", { key: '1ed5e02694c8af1981a320ed7e91c81784032dae', class: constants.FormAutocompleteClass.list, role: 'listbox', "aria-hidden": template.toBoolAttr(!this.focused), hidden: !this.focused, id: this.listBoxId, ref: el => (this.listRef = el) }, this.focused && this.list.length === 0 && this.processing === false && this.isValueAccepted && this.messageEmpty ? (index.h("li", { class: constants.FormAutocompleteClass.empty }, this.messageEmpty)) : null, this.focused && this.processing === true && this.isValueAccepted ? (index.h("li", { class: constants.FormAutocompleteClass.loading }, index.h("gov-skeleton", { size: "m" }))) : null, this.focused ? this.list.map((item, index$1) => {
129
129
  const isSelected = this.arrowCounter === index$1;
130
130
  return (index.h("li", { class: constants.FormAutocompleteClass.item, innerHTML: this.templateResolver(item, isSelected), role: 'option', "aria-posinset": index$1, tabindex: isSelected ? 0 : -1, "aria-setsize": this.list.length, onTouchStart: (e) => this.onSelectHandler(e, index$1), onMouseDown: (e) => this.onSelectHandler(e, index$1), "aria-selected": template.toBoolAttr(isSelected) }, index.h("slot", { name: "list-item-left" }), index.h("slot", { name: "list-item-right" })));
131
131
  }) : null)));
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1af4880c.js');
5
+ const index = require('./index-7ff4447c.js');
6
6
  const constants = require('./constants-02aec493.js');
7
7
  const template = require('./template-b070338f.js');
8
8
  const props = require('./props-b8a955b2.js');
@@ -71,7 +71,7 @@ const GovFormCheckboxGroup = class {
71
71
  });
72
72
  }
73
73
  render() {
74
- return (index.h(index.Host, { key: '7f71876a9b72b688bb354a1477153bd8d1b5ad05', gap: this.gap, class: this.h.classes(constants.FormGroupClass.root), value: this.value }, index.h("slot", { key: '2b3ce2b04ab3a2e55128a6d8c00a1d41217061f6' })));
74
+ return (index.h(index.Host, { key: '4db534d7f8775aaac6fecb7550037d0830763543', gap: this.gap, class: this.h.classes(constants.FormGroupClass.root), value: this.value }, index.h("slot", { key: '836498262409058cdbb62066e482897ba0f0ec1c' })));
75
75
  }
76
76
  get host() { return index.getElement(this); }
77
77
  static get watchers() { return {
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1af4880c.js');
6
- const string_utils = require('./string.utils-2335838f.js');
5
+ const index = require('./index-7ff4447c.js');
6
+ const string_utils = require('./string.utils-b84c81cf.js');
7
7
  const props = require('./props-b8a955b2.js');
8
8
  const form = require('./form-c1aec07a.js');
9
9
  const template = require('./template-b070338f.js');
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1af4880c.js');
5
+ const index = require('./index-7ff4447c.js');
6
6
  const form = require('./form-c1aec07a.js');
7
7
  const template = require('./template-b070338f.js');
8
- const string_utils = require('./string.utils-2335838f.js');
8
+ const string_utils = require('./string.utils-b84c81cf.js');
9
9
  require('./sizes-89f8d3b2.js');
10
10
  require('./utils-d263c5c6.js');
11
11
  require('./constants-bd0d66ac.js');
@@ -58,7 +58,7 @@ const GovFormControl = class {
58
58
  }
59
59
  render() {
60
60
  const Tag = this.fieldset ? "fieldset" : "div";
61
- return (index.h(index.Host, { key: 'ca3d81a16858cbe4b2c06580cb2e9523a77191be', size: this.size, class: this.h.classes(form.FormControlClass.root) }, index.h(Tag, { key: '4b2bdfbc3c227b910660596d5815c70ef8fa22dd', class: form.FormControlClass.holder }, this.h.hasSlot("top") && index.h("slot", { key: '21e1b5d8e989e6e4ecf9795a2d9d3ccd6dc29543', name: "top" }), index.h("slot", { key: 'd2acefce44c05404f9d1ce224f7f259361423d82' }), this.h.hasSlot("bottom") && (index.h("div", { key: 'e5c095ee40f41623e9f6a871e29724be42a8be8f', class: form.FormControlClass.bottom }, index.h("slot", { key: '941873ca1268fca177d3ff92b10a205dea0faad3', name: "bottom" }))))));
61
+ return (index.h(index.Host, { key: '81635a0efe09a262be2b2359355dac108e542726', size: this.size, class: this.h.classes(form.FormControlClass.root) }, index.h(Tag, { key: '5251c4b5fba8f699c9a017e310932b85c8fb3abf', class: form.FormControlClass.holder }, this.h.hasSlot("top") && index.h("slot", { key: '8f6695209e018ad74a8b7e32945cc51ead47dc2d', name: "top" }), index.h("slot", { key: '380304f4a8c70e9db2f1f062761ece479a0b6ca8' }), this.h.hasSlot("bottom") && (index.h("div", { key: '3f37cb4c4165cdf80e8e3fc081d8503c1f975230', class: form.FormControlClass.bottom }, index.h("slot", { key: 'b6be21c67739f3f50d15bf3ca69aa1e71ca96e4c', name: "bottom" }))))));
62
62
  }
63
63
  get host() { return index.getElement(this); }
64
64
  };
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1af4880c.js');
6
- const string_utils = require('./string.utils-2335838f.js');
5
+ const index = require('./index-7ff4447c.js');
6
+ const string_utils = require('./string.utils-b84c81cf.js');
7
7
  const template = require('./template-b070338f.js');
8
8
  const form = require('./form-c1aec07a.js');
9
9
  const accessibility = require('./accessibility-c475826b.js');
@@ -56,6 +56,7 @@ const GovFormFile = class {
56
56
  this.govFiles = index.createEvent(this, "gov-files", 7);
57
57
  this.govAddFile = index.createEvent(this, "gov-add-file", 7);
58
58
  this.govRemoveFile = index.createEvent(this, "gov-remove-file", 7);
59
+ this.eventsRegistered = false;
59
60
  this.expanded = false;
60
61
  this.required = false;
61
62
  this.disabled = false;
@@ -88,6 +89,10 @@ const GovFormFile = class {
88
89
  this.f.passAttrToControl("type", "File");
89
90
  }
90
91
  registerListeners() {
92
+ if (this.eventsRegistered) {
93
+ return;
94
+ }
95
+ this.eventsRegistered = true;
91
96
  function highlight() {
92
97
  this.areaRef.classList.add("highlight");
93
98
  }
@@ -180,7 +185,7 @@ const GovFormFile = class {
180
185
  this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { [attributeName]: newValue });
181
186
  }
182
187
  render() {
183
- return (index.h(index.Host, { key: '42f26e67f508d85b5db8cbc970cc569ed5b748cc', class: this.h.classes([FormFileClass.root]), invalid: template.toBoolAttrIfDefined(this.invalid), expanded: template.toBoolAttrIfDefined(this.expanded) }, index.h("div", { key: 'b070c1245b8af9c57a629bef4e0e451cb641e087', class: FormFileClass.area, ref: el => (this.areaRef = el) }, index.h("slot", { key: 'f74be405c9855462a2caa9beca649d78a6ab3fc0' }), index.h("input", Object.assign({ key: 'ac277c3c42b72dcc24678c756a89991b6fe6e681', class: FormFileClass.input, ref: el => (this.inputRef = el), 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": template.toBoolAttrIfDefined(this.required), "aria-invalid": template.toBoolAttrIfDefined(this.invalid), "aria-disabled": template.toBoolAttrIfDefined(this.disabled) }))), this.h.hasSlot("attachments") ? (index.h("div", { class: FormFileClass.attachments }, index.h("slot", { name: "attachments" }))) : null, this.files.length && this.displayAttachments ? (index.h("div", { class: FormFileClass.attachments }, index.h("gov-attachments", { label: this.accessibleAttachmentsLabel, "accessible-label": this.accessibleAttachmentsLabel }, this.files.map(item => (index.h("gov-attachments-item", { "accessible-remove-labelledby": item.id, "on-gov-remove": () => this.onRemoveFileHandler(item) }, index.h("span", { class: "sr-only", id: item.id }, this.accessibleRemoveLabel.replace("{FILE_NAME}", item.file.name)), item.file.name, item.acceptValid === false ? (index.h("gov-form-message", { slot: "message", color: "error" }, index.h("gov-icon", { slot: "icon", name: "exclamation-triangle-fill" }), item.acceptValid === false ? this.errorAccept : null)) : null, item.sizeValid === false ? (index.h("gov-form-message", { slot: "message", color: "error" }, index.h("gov-icon", { slot: "icon", name: "exclamation-triangle-fill" }), this.errorSize.replace("{FILE_SIZE}", formatBytes(this.maxFileSize)))) : null, index.h("span", { slot: "info" }, "(", formatBytes(item.file.size), ")"))))))) : null));
188
+ return (index.h(index.Host, { key: '1f69ad55f386a3e0429a0616020c04dbaadc8025', class: this.h.classes([FormFileClass.root]), invalid: template.toBoolAttrIfDefined(this.invalid), expanded: template.toBoolAttrIfDefined(this.expanded) }, index.h("div", { key: '0927e067de4a7fa12fe73b9eb3ac48af1a930092', class: FormFileClass.area, ref: el => (this.areaRef = el) }, index.h("slot", { key: '810a669af48af7306884a3a32b81aaf3a8498c41' }), index.h("input", Object.assign({ key: 'c7c5e6f71ee55c154348503693d83f022f73c346', class: FormFileClass.input, ref: el => (this.inputRef = el), 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": template.toBoolAttrIfDefined(this.required), "aria-invalid": template.toBoolAttrIfDefined(this.invalid), "aria-disabled": template.toBoolAttrIfDefined(this.disabled) }))), this.h.hasSlot("attachments") ? (index.h("div", { class: FormFileClass.attachments }, index.h("slot", { name: "attachments" }))) : null, this.files.length && this.displayAttachments ? (index.h("div", { class: FormFileClass.attachments }, index.h("gov-attachments", { label: this.accessibleAttachmentsLabel, "accessible-label": this.accessibleAttachmentsLabel }, this.files.map(item => (index.h("gov-attachments-item", { "accessible-remove-labelledby": item.id, "on-gov-remove": () => this.onRemoveFileHandler(item) }, index.h("span", { class: "sr-only", id: item.id }, this.accessibleRemoveLabel.replace("{FILE_NAME}", item.file.name)), item.file.name, item.acceptValid === false ? (index.h("gov-form-message", { slot: "message", color: "error" }, index.h("gov-icon", { slot: "icon", name: "exclamation-triangle-fill" }), item.acceptValid === false ? this.errorAccept : null)) : null, item.sizeValid === false ? (index.h("gov-form-message", { slot: "message", color: "error" }, index.h("gov-icon", { slot: "icon", name: "exclamation-triangle-fill" }), this.errorSize.replace("{FILE_SIZE}", formatBytes(this.maxFileSize)))) : null, index.h("span", { slot: "info" }, "(", formatBytes(item.file.size), ")"))))))) : null));
184
189
  }
185
190
  onRemoveFileHandler(file) {
186
191
  const index = this.files.findIndex(item => item.id === file.id);
@@ -1 +1 @@
1
- {"file":"gov-form-file.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;AAAO,MAAM,aAAa,GAAG;IAC5B,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EAAE,4BAA4B;CACzC;;SCLe,WAAW,CAAC,KAAU;IACrC,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;IAC/E,IAAI,CAAC,GAAG,CAAC,EACR,CAAC,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,CAAA;IAE7B,OAAO,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,EAAE;QACxB,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;KACZ;IAED,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;AAC3D,CAAC;SAEe,oBAAoB,CAAC,IAAU,EAAE,MAAc;IAC9D,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE;QAChD,QACC,MAAM;aACJ,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;aAClB,KAAK,CAAC,GAAG,CAAC;aACV,MAAM,CAAC,MAAM;YACb,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;SAC5D,CAAC,CAAC,MAAM,GAAG,CAAC,EACd;KACD;SAAM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AC/B,CAAC,CAAC,eAAe,EAAE,CAAA;KACnB;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,CAAA;KACpB;;;;IAMD,MAAM,UAAU;QACf,OAAO,IAAI,CAAC,OAAO,CAAA;KACnB;;;;IAMD,MAAM,KAAK;QACV,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;QACf,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;KACzB;;;;;;;;;;","names":["createID","govHost","govForm","toBoolAttr","AttributeObserver","ariaAttributes","inheritAriaAttributes","h","Host","toBoolAttrIfDefined"],"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\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() 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 * Description of the list of attachments\n\t */\n\t@Prop({attribute: \"attachments-label\"}) readonly attachmentsLabel: string = \"Přílohy\"\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\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\", \"drop\", \"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\n\t\t\tthis.areaRef.addEventListener(\"drop\", this.handleDrop.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\"></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\"></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"],"version":3}
1
+ {"file":"gov-form-file.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;AAAO,MAAM,aAAa,GAAG;IAC5B,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EAAE,4BAA4B;CACzC;;SCLe,WAAW,CAAC,KAAU;IACrC,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;IAC/E,IAAI,CAAC,GAAG,CAAC,EACR,CAAC,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,CAAA;IAE7B,OAAO,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,EAAE;QACxB,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;KACZ;IAED,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;AAC3D,CAAC;SAEe,oBAAoB,CAAC,IAAU,EAAE,MAAc;IAC9D,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE;QAChD,QACC,MAAM;aACJ,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;aAClB,KAAK,CAAC,GAAG,CAAC;aACV,MAAM,CAAC,MAAM;YACb,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;SAC5D,CAAC,CAAC,MAAM,GAAG,CAAC,EACd;KACD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CAAC,OAAO,CAAC,IAAI,CAAC;YACjB,SAAS,EAAE,aAAa,CAAC,IAAI;YAC7B,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;IAEO,eAAe,CAAC,CAAQ;QAC/B,CAAC,CAAC,eAAe,EAAE,CAAA;KACnB;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,CAAA;KACpB;;;;IAMD,MAAM,UAAU;QACf,OAAO,IAAI,CAAC,OAAO,CAAA;KACnB;;;;IAMD,MAAM,KAAK;QACV,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;QACf,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;KACzB;;;;;;;;;;","names":["createID","govHost","govForm","toBoolAttr","AttributeObserver","ariaAttributes","inheritAriaAttributes","h","Host","toBoolAttrIfDefined"],"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() 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 * Description of the list of attachments\n\t */\n\t@Prop({attribute: \"attachments-label\"}) readonly attachmentsLabel: string = \"Přílohy\"\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\", \"drop\", \"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\n\t\t\tthis.areaRef.addEventListener(\"drop\", this.handleDrop.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\"></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\"></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"],"version":3}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1af4880c.js');
5
+ const index = require('./index-7ff4447c.js');
6
6
  const constants = require('./constants-02aec493.js');
7
7
  const template = require('./template-b070338f.js');
8
8
  const props = require('./props-b8a955b2.js');
@@ -33,7 +33,7 @@ const GovFormGroup = class {
33
33
  this.validateOrientation(this.orientation);
34
34
  }
35
35
  render() {
36
- return (index.h(index.Host, { key: 'b7a379997ac1f4080471c42c23cad6f0ed055fd7', gap: this.gap, class: this.h.classes(constants.FormGroupClass.root) }, index.h("slot", { key: 'a36809822e81913ec6c8cabdee9eaf64c9f9f471' })));
36
+ return (index.h(index.Host, { key: '6fd3c85b2114ff4eb9176cb12dd4ea60db5d205c', gap: this.gap, class: this.h.classes(constants.FormGroupClass.root) }, index.h("slot", { key: 'f55fd159742c7b988fed38a8e425ec850443c0da' })));
37
37
  }
38
38
  get host() { return index.getElement(this); }
39
39
  static get watchers() { return {
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1af4880c.js');
5
+ const index = require('./index-7ff4447c.js');
6
6
  const form = require('./form-c1aec07a.js');
7
7
  const template = require('./template-b070338f.js');
8
8
  const props = require('./props-b8a955b2.js');
9
- const string_utils = require('./string.utils-2335838f.js');
9
+ const string_utils = require('./string.utils-b84c81cf.js');
10
10
  const attribute = require('./attribute-06dc5228.js');
11
11
  const accessibility = require('./accessibility-c475826b.js');
12
12
  const utils = require('./utils-d263c5c6.js');
@@ -102,9 +102,9 @@ const GovFormInput = class {
102
102
  }
103
103
  render() {
104
104
  const Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT;
105
- return (index.h(index.Host, { key: '8b60864f0792fe1946d4b7cb6489cff0ffc767e1', class: form.FormInputClass.root, size: this.size, type: this.type }, this.h.hasSlot("prefix") && index.h("slot", { key: '4d5d0bb755acbb42033f572633e4969c8e6e8b36', name: "prefix" }), index.h("span", { key: 'eaac4a690052077ca631ae1e9c69a65518a1902f', class: "element" }, this.h.hasSlot("left-icon") && index.h("slot", { key: '75c58db96fdda7395ee77c9a71b5b01f2fe92503', name: "left-icon" }), this.h.hasSlot("right-icon") && this.inputType !== 'password' && index.h("slot", { key: 'a3fb32c7d9103fed20f769c5220ebe8d0254efac', name: "right-icon" }), this.success && !this.multiline &&
106
- index.h("gov-icon", { key: 'ef85a7526e0542007cf6978e1dd9f9f872a529f7', slot: "validation-icon", class: "icon-validation", name: "check-lg" }), this.invalid && !this.multiline &&
107
- index.h("gov-icon", { key: '0869b21bce101fde9b5beb169e042ca72f2d2c52', slot: "validation-icon", class: "icon-validation", name: "exclamation-lg" }), index.h(Tag, Object.assign({ key: '51a15f6e77ab64f16b168d392fbe9d68b77c5821', type: this.inputType === 'password' && this.showPassword ? 'text' : this.inputType, disabled: this.disabled, id: this.identifier || this.inputId, name: this.name, onFocus: this.onFocusHandler.bind(this), onInput: this.onInputHandler.bind(this), onBlur: this.onBlurHandler.bind(this), onKeyUp: this.onKeyUpHandler.bind(this), onKeyDown: this.onKeyDownHandler.bind(this), ref: el => (this.inputRef = el), placeholder: this.placeholder, spellcheck: template.toBoolAttrIfDefined(this.spellcheck), lang: this.inputLang, readonly: template.toBoolAttrIfDefined(this.readonly), autocomplete: template.toOnOffAttrIfDefined(this.autocomplete), autocorrect: template.toOnOffAttrIfDefined(this.autocorrect), minlength: this.minlength, maxlength: this.maxlength, min: this.min, max: this.max, required: this.required, rows: this.rows, cols: this.cols, role: this.role, value: this.value }, this.inheritedAttributes, { "aria-required": template.toBoolAttrIfDefined(this.required), "aria-invalid": template.toBoolAttrIfDefined(this.invalid), "aria-disabled": template.toBoolAttrIfDefined(this.disabled) })), this.inputType === 'password' ? (index.h("gov-button", { color: 'primary', type: 'base', size: this.size, "aria-label": this.showPassword ? this.accessibleHidePasswordLabel : this.accessibleShowPasswordLabel, "on-gov-click": () => this.showPassword = !this.showPassword }, index.h("gov-icon", { slot: "left-icon", name: "eye", type: "basic" }))) : null), this.h.hasSlot("sufix") && index.h("slot", { key: '2cec0cab2e419776e89506a47f93936249b47fe9', name: "sufix" })));
105
+ return (index.h(index.Host, { key: '940cdf78dbeff2e66654d5b79ebe6c88cca4d767', class: form.FormInputClass.root, size: this.size, type: this.type }, this.h.hasSlot("prefix") && index.h("slot", { key: '68158bacaf2d4a63c9c5b87ab734b1aed58bc5c7', name: "prefix" }), index.h("span", { key: '9677512f5d6c3410443d2a9f958bdfda78ee590c', class: "element" }, this.h.hasSlot("left-icon") && index.h("slot", { key: 'ff9434b0680ba90e27578db2f2ffecdfd6e1a511', name: "left-icon" }), this.h.hasSlot("right-icon") && this.inputType !== 'password' && index.h("slot", { key: '92a3d61e8f92c0218e93a8e97ad15d0c532c9cd2', name: "right-icon" }), this.success && !this.multiline &&
106
+ index.h("gov-icon", { key: '822e179c3c97491ad64d95d54dc366e66f557ff1', slot: "validation-icon", class: "icon-validation", name: "check-lg" }), this.invalid && !this.multiline &&
107
+ index.h("gov-icon", { key: '7583571aef50ff442c529a882a9518b41e4d11b9', slot: "validation-icon", class: "icon-validation", name: "exclamation-lg" }), index.h(Tag, Object.assign({ key: 'bf1826c520a0f3032b51e8d069cdf3fe953c700e', type: this.inputType === 'password' && this.showPassword ? 'text' : this.inputType, disabled: this.disabled, id: this.identifier || this.inputId, name: this.name, onFocus: this.onFocusHandler.bind(this), onInput: this.onInputHandler.bind(this), onBlur: this.onBlurHandler.bind(this), onKeyUp: this.onKeyUpHandler.bind(this), onKeyDown: this.onKeyDownHandler.bind(this), ref: el => (this.inputRef = el), placeholder: this.placeholder, spellcheck: template.toBoolAttrIfDefined(this.spellcheck), lang: this.inputLang, readonly: template.toBoolAttrIfDefined(this.readonly), autocomplete: template.toOnOffAttrIfDefined(this.autocomplete), autocorrect: template.toOnOffAttrIfDefined(this.autocorrect), minlength: this.minlength, maxlength: this.maxlength, min: this.min, max: this.max, required: this.required, rows: this.rows, cols: this.cols, role: this.role, value: this.value }, this.inheritedAttributes, { "aria-required": template.toBoolAttrIfDefined(this.required), "aria-invalid": template.toBoolAttrIfDefined(this.invalid), "aria-disabled": template.toBoolAttrIfDefined(this.disabled) })), this.inputType === 'password' ? (index.h("gov-button", { color: 'primary', type: 'base', size: this.size, "aria-label": this.showPassword ? this.accessibleHidePasswordLabel : this.accessibleShowPasswordLabel, "on-gov-click": () => this.showPassword = !this.showPassword }, index.h("gov-icon", { slot: "left-icon", name: "eye", type: "basic" }))) : null), this.h.hasSlot("sufix") && index.h("slot", { key: '33b38abd971a46a31177035da5f8b42df16c09c2', name: "sufix" })));
108
108
  }
109
109
  onFocusHandler(e) {
110
110
  e.stopPropagation();
@@ -262,7 +262,7 @@ const GovSkeleton = class {
262
262
  return Object.assign({}, dimenssionsStyles);
263
263
  }
264
264
  render() {
265
- return (index.h(index.Host, Object.assign({ key: '053d9b648feb39168da5063d1ce8329489172b46', size: this.size, color: this.color, class: {
265
+ return (index.h(index.Host, Object.assign({ key: '6927d3fcc9546be5b4934f4f04d41049847d04f2', size: this.size, color: this.color, class: {
266
266
  [SkeletonClass.root]: true,
267
267
  circle: this.shape === "circle",
268
268
  line: this.shape === "line",
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1af4880c.js');
5
+ const index = require('./index-7ff4447c.js');
6
6
  const constants = require('./constants-87bab1ed.js');
7
7
  require('./utils-d263c5c6.js');
8
8
  require('./sizes-89f8d3b2.js');
@@ -18,7 +18,7 @@ const GovFormLabel = class {
18
18
  }
19
19
  render() {
20
20
  const Tag = this.legend ? 'legend' : 'label';
21
- return (index.h(index.Host, { key: '9f1487b736715086b83a452d499bf9742cf24672', class: constants.FormLabelClass.root, size: this.size }, index.h(Tag, { key: '61802424b0836bd8baed52f7972dcee2921b15fd', class: constants.FormLabelClass.label, htmlFor: this.identifier, onClick: () => this.govClick.emit() }, index.h("slot", { key: 'b0dc6eda00c0d76bc5c6f1455bb250224e76365d' }), this.required ? index.h("span", { class: "gov-color--error-500" }, "\u00A0*") : null)));
21
+ return (index.h(index.Host, { key: 'ac9d7c5fec0d4f4f84ee47eec6e0582db69c97b7', class: constants.FormLabelClass.root, size: this.size }, index.h(Tag, { key: '65875d3fdf94ec2ec6d668f2c710754924e88a05', class: constants.FormLabelClass.label, htmlFor: this.identifier, onClick: () => this.govClick.emit() }, index.h("slot", { key: 'f9c9b17037b93b01e2510fbf0bae1764660f20cc' }), this.required ? index.h("span", { class: "gov-color--error-500" }, "\u00A0*") : null)));
22
22
  }
23
23
  };
24
24
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1af4880c.js');
5
+ const index = require('./index-7ff4447c.js');
6
6
  const form = require('./form-c1aec07a.js');
7
7
  const template = require('./template-b070338f.js');
8
8
  const props = require('./props-b8a955b2.js');
9
- const string_utils = require('./string.utils-2335838f.js');
9
+ const string_utils = require('./string.utils-b84c81cf.js');
10
10
  const array_utils = require('./array.utils-96eadde3.js');
11
11
  const stencil_utils = require('./stencil.utils-182382ee.js');
12
12
  const attribute = require('./attribute-06dc5228.js');
@@ -60,15 +60,6 @@ const GovFormMultiSelect = class {
60
60
  watchValue(newValue) {
61
61
  this.selectedOptionsState = array_utils.propsValueToArray(newValue);
62
62
  }
63
- watchControlAttrs() {
64
- this.passControlAttrs();
65
- }
66
- passControlAttrs() {
67
- this.f.passAttrToControl('size', this.size);
68
- this.f.passAttrToControl('invalid', template.toBoolAttr(this.invalid));
69
- this.f.passAttrToControl('disabled', template.toBoolAttr(this.disabled));
70
- this.f.passAttrToControl('success', template.toBoolAttr(this.success));
71
- }
72
63
  componentDidLoad() {
73
64
  this.attributeObserver = new attribute.AttributeObserver(this.host, (attributeName, newValue) => {
74
65
  this.onAriaAttributeChange(attributeName, newValue);
@@ -182,7 +173,6 @@ const GovFormMultiSelect = class {
182
173
  }
183
174
  }
184
175
  async componentDidRender() {
185
- this.passControlAttrs();
186
176
  this.f.passAttrToLabel('required', String(this.required));
187
177
  stencil_utils.tick(() => {
188
178
  this.selectRef.querySelectorAll('option').forEach((option) => {
@@ -193,18 +183,16 @@ const GovFormMultiSelect = class {
193
183
  });
194
184
  }
195
185
  render() {
196
- return (index.h(index.Host, { key: '0e2bf90516a05a8e0c27c7532efe5da224c03465', class: form.FormMultiSelectClass.root, size: this.size }, index.h("div", { key: 'f11641f89fe42687883fe53fe948087a27193071', class: form.FormMultiSelectClass.wrap }, this.h.hasSlot('prefix') && index.h("slot", { key: '6cd9f9136c071a6378402289894fdabc507ebff2', name: "prefix" }), index.h("gov-form-autocomplete", { key: '955f58e159a530a5b533c6460547ae709735256e', value: this.valueState, disabled: this.disabled, identifier: this.identifier || this.selectId, required: false, size: this.size, placeholder: this.placeholder, "message-empty": this.messageEmpty, "message-loading": this.messageLoading, ref: el => (this.autocompleteRef = el), minlength: 0, "aria-owns": this.listId }, index.h("gov-icon", { key: 'b378d8bde11321d2dc578f99c8158056f1253164', slot: "right-icon", class: "icon-arrow", name: "chevron-down" }), this.h.hasSlot('right-icon') && !(this.success || this.invalid) && index.h("slot", { key: '6de4b89ef556f1eaaec97836eac78d10831b28c2', name: "right-icon" }), this.success &&
197
- index.h("gov-icon", { key: '19756d99d19cba8cecdc9a0adb0c35e1a5d8c024', slot: "validation-icon", class: "icon-validation", name: "check-lg" }), this.invalid &&
198
- index.h("gov-icon", { key: 'cb21e4f8d4b932602b3409f1c8e4a627c1591bd3', slot: "validation-icon", class: "icon-validation", name: "exclamation-lg" })), index.h("select", Object.assign({ key: '40b56eba1078e476fcc782c2ffbfbcbee503434a', hidden: true, class: 'hidden-select-list', "aria-hidden": template.toBoolAttr(true), multiple: true, required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el) }, this.inheritedAttributes, { "aria-disabled": template.toBoolAttrIfDefined(this.disabled), "aria-required": template.toBoolAttrIfDefined(this.required), "aria-invalid": template.toBoolAttrIfDefined(this.invalid) }), index.h("slot", { key: '6c970c5fb7d8188a6135e5df2652a48d72ce7a05' }), Array.isArray(this.optionsState) && this.optionsState.map((option) => {
186
+ return (index.h(index.Host, { key: '8cb5cbe79c9378e32f5537960096c384e6cb643a', class: form.FormMultiSelectClass.root, size: this.size }, index.h("div", { key: '193d2d861e2ecafea9b52b047a7a5de8c1046bad', class: form.FormMultiSelectClass.wrap }, this.h.hasSlot('prefix') && index.h("slot", { key: 'db33f0b629d8facae56c6715eaaa0409495c897e', name: "prefix" }), index.h("gov-form-autocomplete", { key: 'a983456f11895fc88dee9a94704335fe9e9cbf4b', 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: el => (this.autocompleteRef = el), minlength: 0, "aria-owns": this.listId }, index.h("gov-icon", { key: '52be0800564d9bb479235bcfd43bb13305aa7ac9', slot: "right-icon", class: "icon-arrow", name: "chevron-down" }), this.h.hasSlot('right-icon') && !(this.success || this.invalid) && index.h("slot", { key: '719e0ea5e79f92f956a79590143e2016ff0b06bb', name: "right-icon" })), index.h("select", Object.assign({ key: '2f720548567ab1e69b4338f67b720831dba1279a', hidden: true, class: 'hidden-select-list', "aria-hidden": template.toBoolAttr(true), multiple: true, required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el) }, this.inheritedAttributes, { "aria-disabled": template.toBoolAttrIfDefined(this.disabled), "aria-required": template.toBoolAttrIfDefined(this.required), "aria-invalid": template.toBoolAttrIfDefined(this.invalid) }), index.h("slot", { key: 'd8706ed9c91bc3b503d510d6fba9f735dc701201' }), Array.isArray(this.optionsState) && this.optionsState.map((option) => {
199
187
  var _a;
200
188
  const selectedOption = this.selectedValueIndex(option.value);
201
189
  return (index.h("option", { value: option.value, selected: selectedOption > -1, disabled: option === null || option === void 0 ? void 0 : option.disabled }, (_a = option.label) !== null && _a !== void 0 ? _a : option.value));
202
- })), this.h.hasSlot('sufix') && index.h("slot", { key: '46c5c8ab89561433a6c6d51eb9097149f3dc4155', name: "sufix" })), this.hideSelectedList === false ? (index.h("ul", { role: "listbox", id: this.listId, class: form.FormMultiSelectClass.list }, Array.isArray(this.selectedOptionsState) && this.selectedOptionsState.map(selected => {
190
+ })), this.h.hasSlot('sufix') && index.h("slot", { key: 'e7f7095a074c94cc914507b297c3438b92e61109', name: "sufix" })), this.hideSelectedList === false ? (index.h("ul", { role: "listbox", id: this.listId, class: form.FormMultiSelectClass.list }, Array.isArray(this.selectedOptionsState) && this.selectedOptionsState.map(selected => {
203
191
  var _a, _b;
204
192
  const option = this.getOption(selected);
205
193
  if (!option)
206
194
  return null;
207
- return (index.h("li", { class: form.FormMultiSelectClass.item, role: "option" }, (_a = option.label) !== null && _a !== void 0 ? _a : option.value, index.h("gov-button", { "accessible-label": (_b = 'Odebrat vybranou položku ' + option.label) !== null && _b !== void 0 ? _b : option.value, color: "primary", type: "base", size: this.size, "on-gov-click": () => this.onTagRemove(selected) }, index.h("gov-icon", { name: "x-lg" }))));
195
+ return (index.h("li", { class: form.FormMultiSelectClass.item, role: "option" }, (_a = option.label) !== null && _a !== void 0 ? _a : option.value, index.h("gov-button", { "aria-label": (_b = 'Odebrat vybranou položku ' + option.label) !== null && _b !== void 0 ? _b : option.value, color: "primary", type: "base", size: this.size, "on-gov-click": () => this.onTagRemove(selected) }, index.h("gov-icon", { name: "x-lg" }))));
208
196
  }))) : null));
209
197
  }
210
198
  onFocusHandler(e) {
@@ -261,12 +249,9 @@ const GovFormMultiSelect = class {
261
249
  }
262
250
  get host() { return index.getElement(this); }
263
251
  static get watchers() { return {
264
- "size": ["validateSize", "watchControlAttrs"],
252
+ "size": ["validateSize"],
265
253
  "options": ["watchOptions"],
266
- "value": ["watchValue"],
267
- "disabled": ["watchControlAttrs"],
268
- "invalid": ["watchControlAttrs"],
269
- "success": ["watchControlAttrs"]
254
+ "value": ["watchValue"]
270
255
  }; }
271
256
  };
272
257