@gov-design-system-ce/components 4.1.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/gov-flex_4.cjs.entry.js +47 -30
  3. package/dist/cjs/gov-flex_4.cjs.entry.js.map +1 -1
  4. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +1 -1
  5. package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
  6. package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
  7. package/dist/cjs/gov-form-file.cjs.entry.js +2 -3
  8. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  9. package/dist/cjs/gov-form-multi-select.cjs.entry.js +2 -2
  10. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  11. package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
  12. package/dist/cjs/gov-form-select.cjs.entry.js +2 -2
  13. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  14. package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
  15. package/dist/cjs/loader.cjs.js +1 -1
  16. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +2 -2
  17. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
  18. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +2 -2
  19. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
  20. package/dist/collection/components/gov-form/file/gov-form-file.js +3 -4
  21. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  22. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +3 -3
  23. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
  24. package/dist/collection/components/gov-form/radio/gov-form-radio.js +1 -1
  25. package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
  26. package/dist/collection/components/gov-form/select/gov-form-select.js +4 -4
  27. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  28. package/dist/collection/components/gov-form/switch/gov-form-switch.js +2 -2
  29. package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
  30. package/dist/collection/components/gov-icon/gov-icon.js +3 -4
  31. package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
  32. package/dist/collection/components/gov-icon/list.js +6 -0
  33. package/dist/collection/components/gov-icon/list.js.map +1 -1
  34. package/dist/collection/helpers/Dom/document.js +18 -0
  35. package/dist/collection/helpers/Dom/document.js.map +1 -1
  36. package/dist/components/gov-accordion-item.js +1 -1
  37. package/dist/components/gov-accordion.js +1 -1
  38. package/dist/components/gov-attachments-item.js +1 -1
  39. package/dist/components/gov-attachments.js +1 -1
  40. package/dist/components/gov-backdrop.js +1 -1
  41. package/dist/components/gov-breadcrumbs.js +1 -1
  42. package/dist/components/gov-button.js +1 -1
  43. package/dist/components/gov-card.js +1 -1
  44. package/dist/components/gov-chip.js +1 -1
  45. package/dist/components/gov-control-group.js +1 -1
  46. package/dist/components/gov-dialog.js +1 -1
  47. package/dist/components/gov-empty.js +1 -1
  48. package/dist/components/gov-form-autocomplete.js +1 -1
  49. package/dist/components/gov-form-checkbox-group.js +1 -1
  50. package/dist/components/gov-form-checkbox.js +1 -1
  51. package/dist/components/gov-form-checkbox.js.map +1 -1
  52. package/dist/components/gov-form-file.js +1 -1
  53. package/dist/components/gov-form-file.js.map +1 -1
  54. package/dist/components/gov-form-group.js +1 -1
  55. package/dist/components/gov-form-input.js +1 -1
  56. package/dist/components/gov-form-message.js +1 -1
  57. package/dist/components/gov-form-multi-select.js +1 -1
  58. package/dist/components/gov-form-multi-select.js.map +1 -1
  59. package/dist/components/gov-form-radio-group.js +1 -1
  60. package/dist/components/gov-form-radio.js +1 -1
  61. package/dist/components/gov-form-radio.js.map +1 -1
  62. package/dist/components/gov-form-select.js +1 -1
  63. package/dist/components/gov-form-switch.js +1 -1
  64. package/dist/components/gov-form-switch.js.map +1 -1
  65. package/dist/components/gov-icon.js +1 -1
  66. package/dist/components/gov-infobar.js +1 -1
  67. package/dist/components/gov-link.js +1 -1
  68. package/dist/components/gov-link.js.map +1 -1
  69. package/dist/components/gov-loading.js +1 -1
  70. package/dist/components/gov-message.js +1 -1
  71. package/dist/components/gov-pagination.js +1 -1
  72. package/dist/components/gov-skeleton.js +1 -1
  73. package/dist/components/gov-spacer.js +1 -1
  74. package/dist/components/gov-stepper-item.js +1 -1
  75. package/dist/components/gov-stepper.js +1 -1
  76. package/dist/components/gov-tabs.js +1 -1
  77. package/dist/components/gov-tag.js +1 -1
  78. package/dist/components/gov-theme-switch.js +1 -1
  79. package/dist/components/gov-theme-switch.js.map +1 -1
  80. package/dist/components/gov-tile.js +1 -1
  81. package/dist/components/gov-toast.js +1 -1
  82. package/dist/components/gov-tooltip-content.js +1 -1
  83. package/dist/components/gov-tooltip.js +1 -1
  84. package/dist/components/gov-tooltip.js.map +1 -1
  85. package/dist/components/gov-wizard-item.js +1 -1
  86. package/dist/components/gov-wizard.js +1 -1
  87. package/dist/components/p-0b3574c2.js +2 -0
  88. package/dist/components/{p-dc952cc2.js → p-1eb9c053.js} +2 -2
  89. package/dist/components/{p-2b87c27b.js → p-283b66c3.js} +2 -2
  90. package/dist/components/p-283b66c3.js.map +1 -0
  91. package/dist/components/{p-7d4f2214.js → p-318d89bd.js} +2 -2
  92. package/dist/components/{p-929ebfb5.js → p-3d7a21b5.js} +2 -2
  93. package/dist/components/p-46c567fd.js +2 -0
  94. package/dist/components/p-46c567fd.js.map +1 -0
  95. package/dist/components/{p-4149f195.js → p-73938936.js} +2 -2
  96. package/dist/components/{p-5952a5d0.js → p-7be2301a.js} +2 -2
  97. package/dist/components/{p-227eb30d.js → p-80dad64b.js} +2 -2
  98. package/dist/components/{p-31a99bfc.js → p-a6b7a6c2.js} +2 -2
  99. package/dist/components/{p-45097b4c.js → p-a6be4769.js} +2 -2
  100. package/dist/components/p-a6be4769.js.map +1 -0
  101. package/dist/components/{p-dfb5794a.js → p-ac359044.js} +2 -2
  102. package/dist/components/{p-859a4f0d.js → p-b95ebe8c.js} +2 -2
  103. package/dist/components/{p-20c2203a.js → p-e8ec030e.js} +2 -2
  104. package/dist/core/core.esm.js +1 -1
  105. package/dist/core/core.esm.js.map +1 -1
  106. package/dist/core/{p-3fc3c26b.entry.js → p-04fa0ab5.entry.js} +2 -2
  107. package/dist/core/p-0b3574c2.js +2 -0
  108. package/dist/core/{p-7d6073aa.entry.js → p-0fdd8929.entry.js} +2 -2
  109. package/dist/core/{p-783a6b5b.entry.js → p-1200a32d.entry.js} +2 -2
  110. package/dist/core/p-1200a32d.entry.js.map +1 -0
  111. package/dist/core/{p-8701c28e.entry.js → p-2739fa61.entry.js} +2 -2
  112. package/dist/core/{p-c52afdfc.js → p-29ac15d2.js} +2 -2
  113. package/dist/core/{p-1ac9544f.entry.js → p-3cb36bae.entry.js} +2 -2
  114. package/dist/core/p-3cb36bae.entry.js.map +1 -0
  115. package/dist/core/p-3d6edb09.entry.js +2 -0
  116. package/dist/core/p-3d6edb09.entry.js.map +1 -0
  117. package/dist/core/p-3f6a2d20.entry.js +2 -0
  118. package/dist/core/p-3f6a2d20.entry.js.map +1 -0
  119. package/dist/core/{p-f1fa5e1e.entry.js → p-41c6b262.entry.js} +2 -2
  120. package/dist/core/p-432c3875.entry.js +2 -0
  121. package/dist/core/p-432c3875.entry.js.map +1 -0
  122. package/dist/core/p-4b90fbc4.entry.js +2 -0
  123. package/dist/core/{p-2c59483f.entry.js → p-4c5f6299.entry.js} +2 -2
  124. package/dist/core/{p-db22d51c.entry.js → p-561718cd.entry.js} +2 -2
  125. package/dist/core/{p-ed1131cb.entry.js → p-56dc370d.entry.js} +2 -2
  126. package/dist/core/{p-c20fe3da.entry.js → p-5c9e6275.entry.js} +2 -2
  127. package/dist/core/p-65e67731.entry.js +2 -0
  128. package/dist/core/{p-773f71f6.entry.js → p-6bb37fe2.entry.js} +2 -2
  129. package/dist/core/p-6e457b3d.entry.js +2 -0
  130. package/dist/core/{p-1abdcb62.entry.js → p-72130a8f.entry.js} +2 -2
  131. package/dist/core/{p-6454af62.entry.js → p-7e04730a.entry.js} +2 -2
  132. package/dist/core/p-97a9725d.entry.js +2 -0
  133. package/dist/core/{p-9da91318.entry.js.map → p-97a9725d.entry.js.map} +1 -1
  134. package/dist/core/{p-b4af0bec.entry.js → p-9c2c5447.entry.js} +2 -2
  135. package/dist/core/{p-7bf52eb9.entry.js → p-9fe35463.entry.js} +2 -2
  136. package/dist/core/{p-951823cb.entry.js → p-b7cfe254.entry.js} +2 -2
  137. package/dist/core/p-b923a8d9.entry.js +2 -0
  138. package/dist/core/{p-d24710ff.entry.js.map → p-b923a8d9.entry.js.map} +1 -1
  139. package/dist/core/p-bcb45a18.entry.js +2 -0
  140. package/dist/core/{p-443a813a.entry.js.map → p-bcb45a18.entry.js.map} +1 -1
  141. package/dist/core/{p-fca60e04.entry.js → p-c054f955.entry.js} +2 -2
  142. package/dist/core/{p-74458da3.entry.js → p-c916d0d2.entry.js} +2 -2
  143. package/dist/core/p-c916d0d2.entry.js.map +1 -0
  144. package/dist/core/{p-c4ffcc37.entry.js → p-ccec8019.entry.js} +2 -2
  145. package/dist/core/p-cd2d335d.entry.js +2 -0
  146. package/dist/core/{p-f1056a83.entry.js.map → p-cd2d335d.entry.js.map} +1 -1
  147. package/dist/core/{p-e2517a72.entry.js → p-d836fcde.entry.js} +2 -2
  148. package/dist/core/{p-b1efeb41.entry.js → p-da7f1e11.entry.js} +2 -2
  149. package/dist/core/{p-dec3f948.entry.js → p-dea64896.entry.js} +2 -2
  150. package/dist/core/{p-a218e2eb.entry.js → p-e61aa53b.entry.js} +2 -2
  151. package/dist/core/{p-20c2203a.js → p-e8ec030e.js} +2 -2
  152. package/dist/core/p-ea44d447.entry.js +2 -0
  153. package/dist/core/{p-cb557873.entry.js → p-ed833334.entry.js} +2 -2
  154. package/dist/core/p-ed833334.entry.js.map +1 -0
  155. package/dist/core/{p-fe6fed11.entry.js → p-ed8fc183.entry.js} +2 -2
  156. package/dist/{components/p-45097b4c.js.map → core/p-ed8fc183.entry.js.map} +1 -1
  157. package/dist/core/p-f4dac942.entry.js +2 -0
  158. package/dist/esm/core.js +1 -1
  159. package/dist/esm/gov-accordion-item.entry.js +2 -2
  160. package/dist/esm/gov-accordion.entry.js +2 -2
  161. package/dist/esm/gov-attachments_3.entry.js +3 -3
  162. package/dist/esm/gov-backdrop.entry.js +2 -2
  163. package/dist/esm/gov-breadcrumbs.entry.js +2 -2
  164. package/dist/esm/gov-button.entry.js +3 -3
  165. package/dist/esm/gov-card.entry.js +2 -2
  166. package/dist/esm/gov-chip.entry.js +2 -2
  167. package/dist/esm/gov-control-group.entry.js +2 -2
  168. package/dist/esm/gov-dialog.entry.js +2 -2
  169. package/dist/esm/gov-empty.entry.js +2 -2
  170. package/dist/esm/gov-flex_4.entry.js +49 -32
  171. package/dist/esm/gov-flex_4.entry.js.map +1 -1
  172. package/dist/esm/gov-form-autocomplete.entry.js +3 -3
  173. package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
  174. package/dist/esm/gov-form-checkbox-group.entry.js +2 -2
  175. package/dist/esm/gov-form-checkbox.entry.js +2 -2
  176. package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
  177. package/dist/esm/gov-form-file.entry.js +2 -3
  178. package/dist/esm/gov-form-file.entry.js.map +1 -1
  179. package/dist/esm/gov-form-group.entry.js +2 -2
  180. package/dist/esm/gov-form-input_2.entry.js +2 -2
  181. package/dist/esm/gov-form-multi-select.entry.js +4 -4
  182. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  183. package/dist/esm/gov-form-radio-group.entry.js +2 -2
  184. package/dist/esm/gov-form-radio.entry.js +2 -2
  185. package/dist/esm/gov-form-radio.entry.js.map +1 -1
  186. package/dist/esm/gov-form-select.entry.js +4 -4
  187. package/dist/esm/gov-form-select.entry.js.map +1 -1
  188. package/dist/esm/gov-form-switch.entry.js +2 -2
  189. package/dist/esm/gov-form-switch.entry.js.map +1 -1
  190. package/dist/esm/gov-infobar.entry.js +2 -2
  191. package/dist/esm/gov-link.entry.js +2 -2
  192. package/dist/esm/gov-loading.entry.js +2 -2
  193. package/dist/esm/gov-message.entry.js +2 -2
  194. package/dist/esm/gov-pagination.entry.js +2 -2
  195. package/dist/esm/gov-spacer.entry.js +2 -2
  196. package/dist/esm/gov-stepper-item.entry.js +2 -2
  197. package/dist/esm/gov-stepper.entry.js +2 -2
  198. package/dist/esm/gov-tabs.entry.js +2 -2
  199. package/dist/esm/gov-tag.entry.js +2 -2
  200. package/dist/esm/gov-toast.entry.js +2 -2
  201. package/dist/esm/gov-tooltip.entry.js +2 -2
  202. package/dist/esm/gov-wizard-item.entry.js +2 -2
  203. package/dist/esm/gov-wizard.entry.js +3 -3
  204. package/dist/esm/{gov.log-066c3139.js → gov.log-6b64cda6.js} +2 -2
  205. package/dist/esm/{gov.log-066c3139.js.map → gov.log-6b64cda6.js.map} +1 -1
  206. package/dist/esm/loader.js +1 -1
  207. package/dist/esm/{props-fb6587c3.js → props-9d3c7ac1.js} +2 -2
  208. package/dist/esm/{props-fb6587c3.js.map → props-9d3c7ac1.js.map} +1 -1
  209. package/dist/esm/{wcag-de9a3dc6.js → wcag-253a4421.js} +2 -2
  210. package/dist/esm/{wcag-de9a3dc6.js.map → wcag-253a4421.js.map} +1 -1
  211. package/dist/hydrate/index.js +71 -54
  212. package/dist/hydrate/index.mjs +71 -54
  213. package/dist/types/components/gov-icon/gov-icon.d.ts +1 -2
  214. package/dist/types/helpers/Dom/document.d.ts +1 -0
  215. package/package.json +4 -4
  216. package/dist/components/p-2b87c27b.js.map +0 -1
  217. package/dist/components/p-a2435993.js +0 -2
  218. package/dist/components/p-f44899e1.js +0 -2
  219. package/dist/components/p-f44899e1.js.map +0 -1
  220. package/dist/core/p-1ac9544f.entry.js.map +0 -1
  221. package/dist/core/p-1b3c808d.entry.js +0 -2
  222. package/dist/core/p-1b3c808d.entry.js.map +0 -1
  223. package/dist/core/p-2c290fe5.entry.js +0 -2
  224. package/dist/core/p-40d764ac.entry.js +0 -2
  225. package/dist/core/p-410ec0dd.entry.js +0 -2
  226. package/dist/core/p-443a813a.entry.js +0 -2
  227. package/dist/core/p-48c93ac0.entry.js +0 -2
  228. package/dist/core/p-48c93ac0.entry.js.map +0 -1
  229. package/dist/core/p-52ca31be.entry.js +0 -2
  230. package/dist/core/p-52ca31be.entry.js.map +0 -1
  231. package/dist/core/p-5ed63e9c.entry.js +0 -2
  232. package/dist/core/p-74458da3.entry.js.map +0 -1
  233. package/dist/core/p-783a6b5b.entry.js.map +0 -1
  234. package/dist/core/p-9da91318.entry.js +0 -2
  235. package/dist/core/p-a2435993.js +0 -2
  236. package/dist/core/p-cb557873.entry.js.map +0 -1
  237. package/dist/core/p-d24710ff.entry.js +0 -2
  238. package/dist/core/p-f1056a83.entry.js +0 -2
  239. package/dist/core/p-f6709826.entry.js +0 -2
  240. package/dist/core/p-fe6fed11.entry.js.map +0 -1
  241. /package/dist/components/{p-a2435993.js.map → p-0b3574c2.js.map} +0 -0
  242. /package/dist/components/{p-dc952cc2.js.map → p-1eb9c053.js.map} +0 -0
  243. /package/dist/components/{p-7d4f2214.js.map → p-318d89bd.js.map} +0 -0
  244. /package/dist/components/{p-929ebfb5.js.map → p-3d7a21b5.js.map} +0 -0
  245. /package/dist/components/{p-4149f195.js.map → p-73938936.js.map} +0 -0
  246. /package/dist/components/{p-5952a5d0.js.map → p-7be2301a.js.map} +0 -0
  247. /package/dist/components/{p-227eb30d.js.map → p-80dad64b.js.map} +0 -0
  248. /package/dist/components/{p-31a99bfc.js.map → p-a6b7a6c2.js.map} +0 -0
  249. /package/dist/components/{p-dfb5794a.js.map → p-ac359044.js.map} +0 -0
  250. /package/dist/components/{p-859a4f0d.js.map → p-b95ebe8c.js.map} +0 -0
  251. /package/dist/components/{p-20c2203a.js.map → p-e8ec030e.js.map} +0 -0
  252. /package/dist/core/{p-3fc3c26b.entry.js.map → p-04fa0ab5.entry.js.map} +0 -0
  253. /package/dist/core/{p-a2435993.js.map → p-0b3574c2.js.map} +0 -0
  254. /package/dist/core/{p-7d6073aa.entry.js.map → p-0fdd8929.entry.js.map} +0 -0
  255. /package/dist/core/{p-8701c28e.entry.js.map → p-2739fa61.entry.js.map} +0 -0
  256. /package/dist/core/{p-c52afdfc.js.map → p-29ac15d2.js.map} +0 -0
  257. /package/dist/core/{p-f1fa5e1e.entry.js.map → p-41c6b262.entry.js.map} +0 -0
  258. /package/dist/core/{p-410ec0dd.entry.js.map → p-4b90fbc4.entry.js.map} +0 -0
  259. /package/dist/core/{p-2c59483f.entry.js.map → p-4c5f6299.entry.js.map} +0 -0
  260. /package/dist/core/{p-db22d51c.entry.js.map → p-561718cd.entry.js.map} +0 -0
  261. /package/dist/core/{p-ed1131cb.entry.js.map → p-56dc370d.entry.js.map} +0 -0
  262. /package/dist/core/{p-c20fe3da.entry.js.map → p-5c9e6275.entry.js.map} +0 -0
  263. /package/dist/core/{p-2c290fe5.entry.js.map → p-65e67731.entry.js.map} +0 -0
  264. /package/dist/core/{p-773f71f6.entry.js.map → p-6bb37fe2.entry.js.map} +0 -0
  265. /package/dist/core/{p-5ed63e9c.entry.js.map → p-6e457b3d.entry.js.map} +0 -0
  266. /package/dist/core/{p-1abdcb62.entry.js.map → p-72130a8f.entry.js.map} +0 -0
  267. /package/dist/core/{p-6454af62.entry.js.map → p-7e04730a.entry.js.map} +0 -0
  268. /package/dist/core/{p-b4af0bec.entry.js.map → p-9c2c5447.entry.js.map} +0 -0
  269. /package/dist/core/{p-7bf52eb9.entry.js.map → p-9fe35463.entry.js.map} +0 -0
  270. /package/dist/core/{p-951823cb.entry.js.map → p-b7cfe254.entry.js.map} +0 -0
  271. /package/dist/core/{p-fca60e04.entry.js.map → p-c054f955.entry.js.map} +0 -0
  272. /package/dist/core/{p-c4ffcc37.entry.js.map → p-ccec8019.entry.js.map} +0 -0
  273. /package/dist/core/{p-e2517a72.entry.js.map → p-d836fcde.entry.js.map} +0 -0
  274. /package/dist/core/{p-b1efeb41.entry.js.map → p-da7f1e11.entry.js.map} +0 -0
  275. /package/dist/core/{p-dec3f948.entry.js.map → p-dea64896.entry.js.map} +0 -0
  276. /package/dist/core/{p-a218e2eb.entry.js.map → p-e61aa53b.entry.js.map} +0 -0
  277. /package/dist/core/{p-20c2203a.js.map → p-e8ec030e.js.map} +0 -0
  278. /package/dist/core/{p-f6709826.entry.js.map → p-ea44d447.entry.js.map} +0 -0
  279. /package/dist/core/{p-40d764ac.entry.js.map → p-f4dac942.entry.js.map} +0 -0
@@ -3956,7 +3956,7 @@ class GovFormAutocomplete {
3956
3956
  this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { [attributeName]: newValue });
3957
3957
  }
3958
3958
  render() {
3959
- return (hAsync(Host, { key: 'd5ddd1d65a70f4a9839262831b6207a0fe8ae726', class: FormAutocompleteClass.root, size: this.size }, hAsync("gov-form-input", Object.assign({ key: 'd656134c3a756de2c4178dcfcdd703f301d6c890', 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": 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": booleanString(this.list.length && this.focused ? true : false), ref: el => (this.inputRef = el) }), hAsync("slot", { key: '1d697820c14669a9e6c81f844f15e20743593f97', name: "validation-icon" }), hAsync("slot", { key: '297ccc852764688a34102363beb428ab81d6de26', name: "icon-end" })), hAsync("ul", { key: '3ed420a696852fad4183d16ef31a2db1dcb8f572', class: FormAutocompleteClass.list, role: 'listbox', "aria-hidden": 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 ? (hAsync("li", { class: FormAutocompleteClass.empty }, this.messageEmpty)) : null, this.focused && this.processing === true && this.isValueAccepted ? (hAsync("li", { class: FormAutocompleteClass.loading }, hAsync("gov-skeleton", { size: "m" }))) : null, this.focused ? this.list.map((item, index) => {
3959
+ return (hAsync(Host, { key: '1914bf635c1c0bf169d6f45fe4dab9a2738d390a', class: FormAutocompleteClass.root, size: this.size }, hAsync("gov-form-input", Object.assign({ key: '75926414421d120acb5deea317d6d9afe11ddd11', 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": 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": booleanString(this.list.length && this.focused ? true : false), ref: el => (this.inputRef = el) }), hAsync("slot", { key: '1870810c9a7d6a258da3ec6d26e19cceef9da425', name: "validation-icon" }), hAsync("slot", { key: 'f6753deca157766fe66424d148a4416b1500e79e', name: "icon-end" })), hAsync("ul", { key: '4a63a2c01d13870b6e49392118f291f2e43e3a34', class: FormAutocompleteClass.list, role: 'listbox', "aria-hidden": 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 ? (hAsync("li", { class: FormAutocompleteClass.empty }, this.messageEmpty)) : null, this.focused && this.processing === true && this.isValueAccepted ? (hAsync("li", { class: FormAutocompleteClass.loading }, hAsync("gov-skeleton", { size: "m" }))) : null, this.focused ? this.list.map((item, index) => {
3960
3960
  const isSelected = this.arrowCounter === index;
3961
3961
  return (hAsync("li", { class: FormAutocompleteClass.item, innerHTML: this.templateResolver(item, isSelected), role: 'option', "aria-posinset": index, tabindex: isSelected ? 0 : -1, "aria-setsize": this.list.length, onTouchStart: (e) => this.onSelectHandler(e, index), onMouseDown: (e) => this.onSelectHandler(e, index), "aria-selected": toBoolAttr(isSelected) }, hAsync("slot", { name: "list-item-left" }), hAsync("slot", { name: "list-item-right" })));
3962
3962
  }) : null)));
@@ -4105,7 +4105,7 @@ class GovFormAutocomplete {
4105
4105
  "nameKey": [1, "name-key"],
4106
4106
  "name": [1],
4107
4107
  "required": [4],
4108
- "disabled": [4],
4108
+ "disabled": [516],
4109
4109
  "placeholder": [1],
4110
4110
  "readonly": [4],
4111
4111
  "invalid": [4],
@@ -4128,7 +4128,7 @@ class GovFormAutocomplete {
4128
4128
  },
4129
4129
  "$listeners$": undefined,
4130
4130
  "$lazyBundleId$": "-",
4131
- "$attrsToReflect$": [["value", "value"], ["options", "options"]]
4131
+ "$attrsToReflect$": [["value", "value"], ["options", "options"], ["disabled", "disabled"]]
4132
4132
  }; }
4133
4133
  }
4134
4134
 
@@ -4399,10 +4399,10 @@ class GovFormCheckbox {
4399
4399
  "value": [1],
4400
4400
  "checked": [1540],
4401
4401
  "required": [4],
4402
- "disabled": [4],
4402
+ "disabled": [516],
4403
4403
  "indeterminate": [516],
4404
4404
  "name": [1],
4405
- "size": [1],
4405
+ "size": [513],
4406
4406
  "identifier": [1],
4407
4407
  "noLabel": [4, "no-label"],
4408
4408
  "invalid": [4],
@@ -4411,7 +4411,7 @@ class GovFormCheckbox {
4411
4411
  },
4412
4412
  "$listeners$": undefined,
4413
4413
  "$lazyBundleId$": "-",
4414
- "$attrsToReflect$": [["checked", "checked"], ["indeterminate", "indeterminate"]]
4414
+ "$attrsToReflect$": [["checked", "checked"], ["disabled", "disabled"], ["indeterminate", "indeterminate"], ["size", "size"]]
4415
4415
  }; }
4416
4416
  }
4417
4417
 
@@ -4674,11 +4674,10 @@ class GovFormFile {
4674
4674
  if (this.expanded) {
4675
4675
  const events = ["dragover", "dragleave"];
4676
4676
  const inEvents = ["dragenter", "dragover", "mouseenter"];
4677
- const outEvents = ["dragleave", "drop", "mouseleave"];
4677
+ const outEvents = ["dragleave", "mouseleave"];
4678
4678
  events.map(eventName => this.inputRef.addEventListener(eventName, this.preventDefaults.bind(this), false));
4679
4679
  inEvents.map(eventName => this.inputRef.addEventListener(eventName, highlight.bind(this), false));
4680
4680
  outEvents.forEach(eventName => this.inputRef.addEventListener(eventName, unhighlight.bind(this), false));
4681
- this.areaRef.addEventListener("drop", this.handleDrop.bind(this), false);
4682
4681
  }
4683
4682
  }
4684
4683
  preventDefaults(e) {
@@ -4744,7 +4743,7 @@ class GovFormFile {
4744
4743
  this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { [attributeName]: newValue });
4745
4744
  }
4746
4745
  render() {
4747
- return (hAsync(Host, { key: 'fda855fd13b98ed5ec1cfca65467a076a88a5fa0', class: this.h.classes([FormFileClass.root]), invalid: toBoolAttrIfDefined(this.invalid), expanded: toBoolAttrIfDefined(this.expanded) }, hAsync("div", { key: 'b1045cecb8e17259cd01b8856987da468e0e9396', class: FormFileClass.area, ref: el => (this.areaRef = el) }, hAsync("slot", { key: '0d06955bac8c995f95078f706988058a50b72e55' }), hAsync("input", Object.assign({ key: 'ec52abcad54909f6c0af0b7957765b8cadb26a10', 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": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-disabled": toBoolAttrIfDefined(this.disabled) }))), this.h.hasSlot("attachments") ? (hAsync("div", { class: FormFileClass.attachments }, hAsync("slot", { name: "attachments" }))) : null, this.files.length && this.displayAttachments ? (hAsync("div", { class: FormFileClass.attachments }, hAsync("gov-attachments", { label: this.accessibleAttachmentsLabel, "accessible-label": this.accessibleAttachmentsLabel }, this.files.map(item => (hAsync("gov-attachments-item", { "accessible-remove-labelledby": item.id, "on-gov-remove": () => this.onRemoveFileHandler(item) }, hAsync("span", { class: "sr-only", id: item.id }, this.accessibleRemoveLabel.replace("{FILE_NAME}", item.file.name)), item.file.name, item.acceptValid === false ? (hAsync("gov-form-message", { slot: "message", color: "error" }, hAsync("gov-icon", { slot: "icon", name: "exclamation-triangle-fill", type: "components" }), item.acceptValid === false ? this.errorAccept : null)) : null, item.sizeValid === false ? (hAsync("gov-form-message", { slot: "message", color: "error" }, hAsync("gov-icon", { slot: "icon", name: "exclamation-triangle-fill", type: "components" }), this.errorSize.replace("{FILE_SIZE}", formatBytes(this.maxFileSize)))) : null, hAsync("span", { slot: "info" }, "(", formatBytes(item.file.size), ")"))))))) : null));
4746
+ return (hAsync(Host, { key: '30047bbc26c5d51b5e24a6e8ce33690b31fe3b1d', class: this.h.classes([FormFileClass.root]), invalid: toBoolAttrIfDefined(this.invalid), expanded: toBoolAttrIfDefined(this.expanded) }, hAsync("div", { key: 'f99d4ee71f9126f9fc72acb6adf2ea964410d738', class: FormFileClass.area, ref: el => (this.areaRef = el) }, hAsync("slot", { key: 'a280d44c9b649aa8ccdc48356a0173e183dbd3ee' }), hAsync("input", Object.assign({ key: '2abf8d4c1f0d9086fbe63d86f71c9cdc3e0867c3', 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": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-disabled": toBoolAttrIfDefined(this.disabled) }))), this.h.hasSlot("attachments") ? (hAsync("div", { class: FormFileClass.attachments }, hAsync("slot", { name: "attachments" }))) : null, this.files.length && this.displayAttachments ? (hAsync("div", { class: FormFileClass.attachments }, hAsync("gov-attachments", { label: this.accessibleAttachmentsLabel, "accessible-label": this.accessibleAttachmentsLabel }, this.files.map(item => (hAsync("gov-attachments-item", { "accessible-remove-labelledby": item.id, "on-gov-remove": () => this.onRemoveFileHandler(item) }, hAsync("span", { class: "sr-only", id: item.id }, this.accessibleRemoveLabel.replace("{FILE_NAME}", item.file.name)), item.file.name, item.acceptValid === false ? (hAsync("gov-form-message", { slot: "message", color: "error" }, hAsync("gov-icon", { slot: "icon", name: "exclamation-triangle-fill", type: "components" }), item.acceptValid === false ? this.errorAccept : null)) : null, item.sizeValid === false ? (hAsync("gov-form-message", { slot: "message", color: "error" }, hAsync("gov-icon", { slot: "icon", name: "exclamation-triangle-fill", type: "components" }), this.errorSize.replace("{FILE_SIZE}", formatBytes(this.maxFileSize)))) : null, hAsync("span", { slot: "info" }, "(", formatBytes(item.file.size), ")"))))))) : null));
4748
4747
  }
4749
4748
  onRemoveFileHandler(file) {
4750
4749
  const index = this.files.findIndex(item => item.id === file.id);
@@ -4810,7 +4809,7 @@ class GovFormFile {
4810
4809
  "$members$": {
4811
4810
  "expanded": [4],
4812
4811
  "required": [4],
4813
- "disabled": [4],
4812
+ "disabled": [516],
4814
4813
  "resetAfterPick": [4, "reset-after-pick"],
4815
4814
  "ignoreFileDuplicationCheck": [4, "ignore-file-duplication-check"],
4816
4815
  "displayAttachments": [4, "display-attachments"],
@@ -4832,7 +4831,7 @@ class GovFormFile {
4832
4831
  },
4833
4832
  "$listeners$": undefined,
4834
4833
  "$lazyBundleId$": "-",
4835
- "$attrsToReflect$": []
4834
+ "$attrsToReflect$": [["disabled", "disabled"]]
4836
4835
  }; }
4837
4836
  }
4838
4837
 
@@ -5319,11 +5318,11 @@ class GovFormMultiSelect {
5319
5318
  });
5320
5319
  }
5321
5320
  render() {
5322
- return (hAsync(Host, { key: '8c36a19951ed5931adea3e023209e8c6b271a98f', class: FormMultiSelectClass.root, size: this.size }, hAsync("div", { key: '97ed4682166e9f9261bdde9f8e9261eb350f2a85', class: FormMultiSelectClass.wrap }, this.h.hasSlot('prefix') && hAsync("slot", { key: 'e49357d489985785acb2fd4917ec0eea02e420e4', name: "prefix" }), hAsync("gov-form-autocomplete", { key: '9aba6a6e6208107e62e916505e30f56a03707cf1', 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 }, this.success && hAsync("gov-icon", { key: '0ecf17afa6bef85ac0666e206b0d84bc63cdde2f', slot: "validation-icon", class: "validation-icon", name: "check-lg", type: "components" }), this.invalid && hAsync("gov-icon", { key: '7573420027300e8951adb1bafe934dbafe5be4a4', slot: "validation-icon", class: "validation-icon", name: "exclamation-lg", type: "components" }), hAsync("gov-icon", { key: '461f2108ddd524153d5f684b0fea218913410737', slot: "icon-end", class: "arrow-icon", name: "chevron-down", type: "components" })), hAsync("select", Object.assign({ key: '61aad9d04d5ce5778f66c794d447e45f8d605492', hidden: true, class: 'hidden-select-list', "aria-hidden": toBoolAttr(true), multiple: true, required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el) }, this.inheritedAttributes, { "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid) }), hAsync("slot", { key: '6dda21eb97bab4a943d51f3f4d0593f7580740ed' }), Array.isArray(this.optionsState) && this.optionsState.map((option) => {
5321
+ return (hAsync(Host, { key: '11352c6950674badb00870e18c17a031c81235df', class: FormMultiSelectClass.root, size: this.size }, hAsync("div", { key: 'edd74cbfbbf116700dfdcd7d33307c6416e2ad8c', class: FormMultiSelectClass.wrap }, this.h.hasSlot('prefix') && hAsync("slot", { key: '6aa65aa9875527890bfecb2a1e6c56b2eb9ce827', name: "prefix" }), hAsync("gov-form-autocomplete", { key: '60c5065ccb09073c2e1ca17c329f980cda52761f', value: this.valueState, disabled: this.disabled, identifier: this.identifier || this.selectId, required: false, invalid: this.invalid, success: this.success, size: this.size, placeholder: this.placeholder, "message-empty": this.messageEmpty, "message-loading": this.messageLoading, ref: el => (this.autocompleteRef = el), minlength: 0, "aria-owns": this.listId }, this.success && hAsync("gov-icon", { key: '907aac2768a9bd5384326377fcad9e90795ff170', slot: "validation-icon", class: "validation-icon", name: "check-lg", type: "components" }), this.invalid && hAsync("gov-icon", { key: '7294050c2910097d6a316b37fdc1f571f3450f8a', slot: "validation-icon", class: "validation-icon", name: "exclamation-lg", type: "components" }), hAsync("gov-icon", { key: 'ac4474f517f8124831c22055e69d0eb45e6e2d4f', slot: "icon-end", class: "arrow-icon", name: "chevron-down", type: "components" })), hAsync("select", Object.assign({ key: '9437199c079132409bdbf0f932605474b885781e', hidden: true, class: 'hidden-select-list', "aria-hidden": toBoolAttr(true), multiple: true, required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el) }, this.inheritedAttributes, { "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid) }), hAsync("slot", { key: '59f4071b90b40ed6291b9180b5caa29101b5e95a' }), Array.isArray(this.optionsState) && this.optionsState.map((option) => {
5323
5322
  var _a;
5324
5323
  const selectedOption = this.selectedValueIndex(option.value);
5325
5324
  return (hAsync("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));
5326
- })), this.h.hasSlot('sufix') && hAsync("slot", { key: '91c91489ce3167f9e0e9eda66e1fab3553750472', name: "sufix" })), this.hideSelectedList === false ? (hAsync("ul", { role: "listbox", id: this.listId, class: FormMultiSelectClass.list }, Array.isArray(this.selectedOptionsState) && this.selectedOptionsState.map(selected => {
5325
+ })), this.h.hasSlot('sufix') && hAsync("slot", { key: '0620c4ab3b9d9d122456f91cc3dd5cefd85e8bba', name: "sufix" })), this.hideSelectedList === false ? (hAsync("ul", { role: "listbox", id: this.listId, class: FormMultiSelectClass.list }, Array.isArray(this.selectedOptionsState) && this.selectedOptionsState.map(selected => {
5327
5326
  var _a, _b;
5328
5327
  const option = this.getOption(selected);
5329
5328
  if (!option)
@@ -5401,7 +5400,7 @@ class GovFormMultiSelect {
5401
5400
  "name": [1],
5402
5401
  "hideSelectedList": [4, "hide-selected-list"],
5403
5402
  "required": [4],
5404
- "disabled": [4],
5403
+ "disabled": [516],
5405
5404
  "invalid": [516],
5406
5405
  "success": [4],
5407
5406
  "messageEmpty": [1, "message-empty"],
@@ -5417,7 +5416,7 @@ class GovFormMultiSelect {
5417
5416
  },
5418
5417
  "$listeners$": undefined,
5419
5418
  "$lazyBundleId$": "-",
5420
- "$attrsToReflect$": [["value", "value"], ["options", "options"], ["invalid", "invalid"]]
5419
+ "$attrsToReflect$": [["value", "value"], ["options", "options"], ["disabled", "disabled"], ["invalid", "invalid"]]
5421
5420
  }; }
5422
5421
  }
5423
5422
 
@@ -5564,7 +5563,7 @@ class GovFormRadio {
5564
5563
  "noLabel": [4, "no-label"],
5565
5564
  "checked": [1540],
5566
5565
  "required": [4],
5567
- "disabled": [4],
5566
+ "disabled": [516],
5568
5567
  "name": [1],
5569
5568
  "size": [1],
5570
5569
  "identifier": [1],
@@ -5574,7 +5573,7 @@ class GovFormRadio {
5574
5573
  },
5575
5574
  "$listeners$": undefined,
5576
5575
  "$lazyBundleId$": "-",
5577
- "$attrsToReflect$": [["checked", "checked"]]
5576
+ "$attrsToReflect$": [["checked", "checked"], ["disabled", "disabled"]]
5578
5577
  }; }
5579
5578
  }
5580
5579
 
@@ -5752,10 +5751,10 @@ class GovFormSelect {
5752
5751
  });
5753
5752
  }
5754
5753
  render() {
5755
- return (hAsync(Host, { key: '2eaa50cdab69d7ea87e86b33a69728b735f24e89', class: FormSelectClass.root, size: this.size }, this.h.hasSlot('prefix') && hAsync("slot", { key: 'ef57fa4df7417a583738b7863af7b8903dc92ced', name: "prefix" }), hAsync("span", { key: 'f7c8e78bab4ddfe8315ec641b99077d963c3023f', class: "element" }, hAsync("select", Object.assign({ key: '1e7502585fc0c59ad024ad6607ae8f8b4461e1ea', id: this.identifier || this.selectId, onFocus: this.onFocusHandler.bind(this), onChange: this.onChangeHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el) }, this.inheritedAttributes, { "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid) }), hAsync("slot", { key: '2d657c57207d93d0054f410f274a6b9e163c6a79' }), Array.isArray(this.optionsState) && this.optionsState.map((option) => {
5754
+ return (hAsync(Host, { key: 'b403868aaf854a9dc40f68cf093a8867cd20c4c4', class: FormSelectClass.root, size: this.size }, this.h.hasSlot('prefix') && hAsync("slot", { key: 'de3d0cb80bd3b33a9b23b60f91739f0e23fdab4a', name: "prefix" }), hAsync("span", { key: 'c501806b949bc6e1314922fce0ce088180fdebba', class: "element" }, hAsync("select", Object.assign({ key: '7c1a04a65e69edda672d70b101b430d3c6105543', id: this.identifier || this.selectId, onFocus: this.onFocusHandler.bind(this), onChange: this.onChangeHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el) }, this.inheritedAttributes, { "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid) }), hAsync("slot", { key: '0bd46e42f5e5267366088b9902a5ef8c6aa99064' }), Array.isArray(this.optionsState) && this.optionsState.map((option) => {
5756
5755
  var _a;
5757
5756
  return (hAsync("option", { value: option.value, selected: option.value === this.value, disabled: option === null || option === void 0 ? void 0 : option.disabled }, (_a = option.label) !== null && _a !== void 0 ? _a : option.value));
5758
- })), this.success && hAsync("gov-icon", { key: 'cec630f5f88b883d6873d3f8fd4157d56af540ca', class: "validation-icon", name: "check-lg", type: "components" }), this.invalid && hAsync("gov-icon", { key: 'd079d76edc2e8db801d8ff840af595a67c9db8e5', class: "validation-icon", name: "exclamation-lg", type: "components" }), hAsync("gov-icon", { key: '349bc31354f24d96a279ea9f0967b416b8357af9', class: "arrow-icon", name: "chevron-down", type: "components" })), this.h.hasSlot('sufix') && hAsync("slot", { key: '3d45a1c71ce49f8a207144b8d72401d593f7d712', name: "sufix" })));
5757
+ })), this.success && hAsync("gov-icon", { key: '8e919bd8dd122618b2b0233c7b14c8def277540f', class: "validation-icon", name: "check-lg", type: "components" }), this.invalid && hAsync("gov-icon", { key: '78610616be9cdf65e9bbc1359e27bc9003c8fc34', class: "validation-icon", name: "exclamation-lg", type: "components" }), hAsync("gov-icon", { key: '56c1ca03e5b23154a93056bba8758553a5c93f30', class: "arrow-icon", name: "chevron-down", type: "components" })), this.h.hasSlot('sufix') && hAsync("slot", { key: 'f3e3f1416d15a34402d446e6a72d0607cc8d90fc', name: "sufix" })));
5759
5758
  }
5760
5759
  onFocusHandler(e) {
5761
5760
  this.focused = true;
@@ -5813,8 +5812,8 @@ class GovFormSelect {
5813
5812
  "size": [1],
5814
5813
  "name": [1],
5815
5814
  "required": [4],
5816
- "success": [4],
5817
- "disabled": [4],
5815
+ "success": [516],
5816
+ "disabled": [516],
5818
5817
  "invalid": [4],
5819
5818
  "focused": [32],
5820
5819
  "optionsState": [32],
@@ -5824,7 +5823,7 @@ class GovFormSelect {
5824
5823
  },
5825
5824
  "$listeners$": undefined,
5826
5825
  "$lazyBundleId$": "-",
5827
- "$attrsToReflect$": [["value", "value"], ["options", "options"]]
5826
+ "$attrsToReflect$": [["value", "value"], ["options", "options"], ["success", "success"], ["disabled", "disabled"]]
5828
5827
  }; }
5829
5828
  }
5830
5829
 
@@ -5946,9 +5945,9 @@ class GovFormSwitch {
5946
5945
  "noLabel": [4, "no-label"],
5947
5946
  "checked": [1540],
5948
5947
  "required": [4],
5949
- "disabled": [4],
5948
+ "disabled": [516],
5950
5949
  "name": [1],
5951
- "size": [1],
5950
+ "size": [513],
5952
5951
  "identifier": [1],
5953
5952
  "invalid": [4],
5954
5953
  "inheritedAttributes": [32],
@@ -5956,7 +5955,7 @@ class GovFormSwitch {
5956
5955
  },
5957
5956
  "$listeners$": undefined,
5958
5957
  "$lazyBundleId$": "-",
5959
- "$attrsToReflect$": [["checked", "checked"]]
5958
+ "$attrsToReflect$": [["checked", "checked"], ["disabled", "disabled"], ["size", "size"]]
5960
5959
  }; }
5961
5960
  }
5962
5961
 
@@ -6046,7 +6045,7 @@ const IconClass = {
6046
6045
  holder: 'gov-icon__holder',
6047
6046
  };
6048
6047
 
6049
- const version = "4.1.0";
6048
+ const version = "4.1.1";
6050
6049
 
6051
6050
  const dsVersion = () => {
6052
6051
  return version;
@@ -6081,6 +6080,51 @@ async function fetchIcon({ name, type }) {
6081
6080
  return path;
6082
6081
  }
6083
6082
 
6083
+ const setCookie = (name, value, days) => {
6084
+ if (!isWindow) {
6085
+ return;
6086
+ }
6087
+ let expires = "";
6088
+ if (days) {
6089
+ const date = new Date();
6090
+ date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
6091
+ expires = "; expires=" + date.toUTCString();
6092
+ }
6093
+ document.cookie = `${name}=${encodeURIComponent(value)}${expires}; path=/`;
6094
+ };
6095
+ const getCookie = (name) => {
6096
+ if (!isWindow) {
6097
+ return null;
6098
+ }
6099
+ const nameEQ = name + "=";
6100
+ const cookies = document.cookie.split(';');
6101
+ for (let i = 0; i < cookies.length; i++) {
6102
+ let cookie = cookies[i].trim();
6103
+ if (cookie.startsWith(nameEQ)) {
6104
+ return decodeURIComponent(cookie.substring(nameEQ.length));
6105
+ }
6106
+ }
6107
+ return null;
6108
+ };
6109
+ const isValidSVG = (svgContent) => {
6110
+ try {
6111
+ const parser = new DOMParser();
6112
+ const doc = parser.parseFromString(svgContent, "image/svg+xml");
6113
+ const parseError = doc.querySelector("parsererror");
6114
+ if (parseError) {
6115
+ return false;
6116
+ }
6117
+ const svgElement = doc.documentElement;
6118
+ if (svgElement.tagName.toLowerCase() !== "svg") {
6119
+ return false;
6120
+ }
6121
+ return true;
6122
+ }
6123
+ catch (error) {
6124
+ return false;
6125
+ }
6126
+ };
6127
+
6084
6128
  class GovIcon {
6085
6129
  constructor(hostRef) {
6086
6130
  registerInstance(this, hostRef);
@@ -6136,7 +6180,7 @@ class GovIcon {
6136
6180
  try {
6137
6181
  const { name, type } = this;
6138
6182
  const data = await fetchIcon({ name, type });
6139
- const isValid = isString(data) && data.indexOf('svg') > -1;
6183
+ const isValid = isValidSVG(data);
6140
6184
  this.host.innerHTML = isValid ? data : null;
6141
6185
  }
6142
6186
  catch (e) {
@@ -7386,33 +7430,6 @@ var ThemeList;
7386
7430
  ThemeList["dark"] = "dark";
7387
7431
  })(ThemeList || (ThemeList = {}));
7388
7432
 
7389
- const setCookie = (name, value, days) => {
7390
- if (!isWindow) {
7391
- return;
7392
- }
7393
- let expires = "";
7394
- if (days) {
7395
- const date = new Date();
7396
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
7397
- expires = "; expires=" + date.toUTCString();
7398
- }
7399
- document.cookie = `${name}=${encodeURIComponent(value)}${expires}; path=/`;
7400
- };
7401
- const getCookie = (name) => {
7402
- if (!isWindow) {
7403
- return null;
7404
- }
7405
- const nameEQ = name + "=";
7406
- const cookies = document.cookie.split(';');
7407
- for (let i = 0; i < cookies.length; i++) {
7408
- let cookie = cookies[i].trim();
7409
- if (cookie.startsWith(nameEQ)) {
7410
- return decodeURIComponent(cookie.substring(nameEQ.length));
7411
- }
7412
- }
7413
- return null;
7414
- };
7415
-
7416
7433
  class GovThemeSwitch {
7417
7434
  constructor(hostRef) {
7418
7435
  registerInstance(this, hostRef);
@@ -1,5 +1,4 @@
1
- import { IconSizesType } from "./constants";
2
- import { type IconColorType } from "./constants";
1
+ import { type IconColorType, IconSizesType } from "./constants";
3
2
  export declare class GovIcon {
4
3
  private h;
5
4
  private intersectionObserver;
@@ -1,3 +1,4 @@
1
1
  import { Nullable } from "../../utils/helpers.types";
2
2
  export declare const setCookie: (name: string, value: string, days?: number) => void;
3
3
  export declare const getCookie: (name: string) => Nullable<string>;
4
+ export declare const isValidSVG: (svgContent: string) => boolean;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@gov-design-system-ce/components",
3
3
  "description": "This package includes Gov Design System Web Components and related utilities.",
4
4
  "author": "Zdeněk Vítek",
5
- "version": "4.1.0",
5
+ "version": "4.1.1",
6
6
  "license": "EUPL v1.2 Licensed",
7
7
  "main": "./dist/index.cjs.js",
8
8
  "unpkg": "./dist/core/core.esm.js",
@@ -22,8 +22,8 @@
22
22
  "test": "echo \"Error: no test specified\" && exit 1"
23
23
  },
24
24
  "dependencies": {
25
- "@gov-design-system-ce/icons": "0.1.0",
26
- "@gov-design-system-ce/fonts": "0.0.2",
27
- "@gov-design-system-ce/styles": "4.1.0"
25
+ "@gov-design-system-ce/icons": "^0.1.0",
26
+ "@gov-design-system-ce/fonts": "^0.0.2",
27
+ "@gov-design-system-ce/styles": "^4.1.0"
28
28
  }
29
29
  }
@@ -1 +0,0 @@
1
- {"version":3,"names":["GovFormSelect","proxyCustomElement","H","constructor","this","h","govHost","host","f","govForm","selectId","createID","validateSize","newValue","validateProp","FormSelectSizes","FormSelectClass","root","watchOptions","optionsState","propsValueToArray","watchControlAttrs","passControlAttrs","watchValue","markSelectedValue","passAttrToControl","size","toBoolAttr","invalid","success","disabled","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","disconnectedCallback","stopObserving","componentWillLoad","options","inheritedAttributes","inheritAriaAttributes","componentDidRender","passAttrToLabel","String","required","tick","removeAttribute","Object","assign","querySelectorAll","forEach","option","value","setAttribute","render","Host","key","class","hasSlot","name","id","identifier","onFocus","onFocusHandler","bind","onChange","onChangeHandler","onBlur","onBlurHandler","ref","el","selectRef","toBoolAttrIfDefined","Array","isArray","map","selected","_a","label","type","e","focused","govFocus","emit","component","originalEvent","govBlur","target","stopPropagation","govChange","setFocus","focus","getRef"],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {govForm} from '../../../helpers/Dom/form'\nimport {GovForm} from '../../../helpers/Dom/form.types'\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from '../../../helpers/Dom/template'\nimport {GovHost} from '../../../helpers/Dom/template.types'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {createID} from '../../../utils/string.utils'\nimport {FormSelectClass, FormSelectSizes, FormSelectSizesType,} from './constants'\nimport {FormSelectEvent, FormSelectOption} from './gov-form-select.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {tick} from \"../../../utils/stencil.utils\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-form-select',\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID('GovSelect')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Options of select\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | FormSelectOption[]\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\t@State() optionsState: FormSelectOption[] = []\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | FormSelectOption[]): void {\n\t\tthis.optionsState = propsValueToArray(newValue)\n\t}\n\n\t@Watch('disabled')\n\t@Watch('invalid')\n\t@Watch('success')\n\t@Watch('size')\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch('value')\n\twatchValue(): void {\n\t\tthis.markSelectedValue()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl('size', this.size)\n\t\tthis.f.passAttrToControl('invalid', toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('success', toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl('disabled', toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl('type', 'select')\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\n\t\tthis.markSelectedValue()\n\n\t\tthis.optionsState = propsValueToArray(this.options)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t\ttick(() => this.markSelectedValue())\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate markSelectedValue() {\n\t\tthis.host.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.value === this.value) {\n\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t} else {\n\t\t\t\toption.removeAttribute('selected')\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size}>\n\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t{Array.isArray(this.optionsState) && this.optionsState.map((option) => {\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={option.value === this.value}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={option?.disabled}>{option.label ?? option.value}</option>)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</select>\n\t\t\t\t\t{this.success && <gov-icon class=\"validation-icon\" name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t{this.invalid && <gov-icon class=\"validation-icon\" name=\"exclamation-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t<gov-icon class=\"arrow-icon\" name=\"chevron-down\" type=\"components\"></gov-icon>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectElement> {\n\t\treturn this.selectRef\n\t}\n}\n"],"mappings":"gZAkBaA,EAAaC,EAAA,MAAAD,UAAAE,EAQzB,WAAAC,G,0NAsB8C,I,kCAST,M,qCASA,M,gEAkBO,G,yBAyBD,GAlF1CC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,EAAIC,EAAQL,KAAKC,GACtBD,KAAKM,SAAWC,EAAS,Y,CA0D1B,YAAAC,CAAaC,GACZC,EAAaC,EAAiBF,EAAUG,EAAgBC,K,CAIzD,YAAAC,CAAaL,GACZT,KAAKe,aAAeC,EAAkBP,E,CAOvC,iBAAAQ,GACCjB,KAAKkB,kB,CAIN,UAAAC,GACCnB,KAAKoB,mB,CAKE,gBAAAF,GACPlB,KAAKI,EAAEiB,kBAAkB,OAAQrB,KAAKsB,MACtCtB,KAAKI,EAAEiB,kBAAkB,UAAWE,EAAWvB,KAAKwB,UACpDxB,KAAKI,EAAEiB,kBAAkB,UAAWE,EAAWvB,KAAKyB,UACpDzB,KAAKI,EAAEiB,kBAAkB,WAAYE,EAAWvB,KAAK0B,WACrD1B,KAAKI,EAAEiB,kBAAkB,OAAQ,S,CAGlC,gBAAAM,GACC3B,KAAK4B,kBAAoB,IAAIC,EAAkB7B,KAAKG,MAAM,CAAC2B,EAAerB,KACzET,KAAK+B,sBAAsBD,EAAerB,EAAS,IAGpDT,KAAK4B,k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GACd,OAAOrC,KAAKsE,UAAUoB,MAAMrD,E,CAO7B,YAAMsD,GACL,OAAO3F,KAAKsE,S","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{g as a}from"./p-20c2203a.js";const e=(e,t,r)=>{const s=Object.values(e);const o=s.indexOf(t)>-1;if(!o){a(`[${r}]: Bad parameter with value (${t}). Available parameters are (${s.join(", ")}).`)}};export{e as v};
2
- //# sourceMappingURL=p-a2435993.js.map
@@ -1,2 +0,0 @@
1
- import{p as t,H as s,h as i,d as e}from"./p-42200001.js";import{p as o}from"./p-e0e2e9c1.js";import{C as n}from"./p-5aad3497.js";import{S as a}from"./p-92f420cb.js";import{g as r}from"./p-bfce6f99.js";import{i as c,a as h}from"./p-20c2203a.js";import{g as l}from"./p-ea7fdd2e.js";import{i as f}from"./p-2aedc81e.js";import{v as d}from"./p-a2435993.js";o(a,["_XS","_S","_M","_L","_XL","_2XL","_3XL","_4XL","_5XL"]);const m=o(n,["DEFAULT","PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING","DISABLED","WHITE","BLACK"]);var p;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(p||(p={}));const u={root:"gov-icon",holder:"gov-icon__holder"};const v="4.1.0";const w=()=>v;const g={};const y={};const E=t=>t.startsWith("http://")||t.startsWith("https://");const L=(t,s,i)=>{if(E(t)){return`${t}/${i}/${s}.svg?v=${w()}`}return r(`${t}/${i}/${s}.svg`)+`?v=${w()}`};async function S({name:t,type:s}){const i=s+"-"+t;if(g[i]){return g[i]}if(!y[i]){y[i]=fetch(L(c(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const e=await y[i];g[i]=e;return e}const _=t(class t extends s{constructor(){super();this.__registerHost();this.size=undefined;this.color=undefined;this.name=null;this.type="components";this.visible=false;this.error=false;this.h=l(this.host)}validateSize(t){d(a,t,u.root)}validateColor(t){d(m,t,u.root)}async loadIconPathData(){const{name:t,visible:s}=this;if(!t||!s){return}await this.loadIcon()}connectedCallback(){if(h()){this.visible=true;this.loadIconPathData().finally()}else{this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){this.validateSize(this.size);this.validateColor(this.color);await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((s=>{s.forEach((s=>{if(s.isIntersecting){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}async loadIcon(){try{const{name:t,type:s}=this;const i=await S({name:t,type:s});const e=f(i)&&i.indexOf("svg")>-1;this.host.innerHTML=e?i:null}catch(t){this.host.innerHTML="";this.error=true}}render(){if(this.error){return null}return i(e,{class:this.h.classes(u.root),size:this.size,color:this.color})}static get assetsDirs(){return["assets"]}get host(){return this}static get watchers(){return{size:["validateSize"],color:["validateColor"],name:["loadIconPathData"]}}},[0,"gov-icon",{size:[513],color:[513],name:[513],type:[513],visible:[32],error:[32]},undefined,{size:["validateSize"],color:["validateColor"],name:["loadIconPathData"]}]);function b(){if(typeof customElements==="undefined"){return}const t=["gov-icon"];t.forEach((t=>{switch(t){case"gov-icon":if(!customElements.get(t)){customElements.define(t,_)}break}}))}b();export{_ as G,b as d};
2
- //# sourceMappingURL=p-f44899e1.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["pick","Sizes","IconColors","Colors","Types","IconClass","root","holder","dsVersion","version","iconCache","requestCache","isExternalUrl","path","startsWith","iconUrl","name","type","getAssetPath","async","fetchIcon","cacheKey","fetch","iconsPath","then","resp","status","text","Error","GovIcon","proxyCustomElement","H","constructor","this","h","govHost","host","validateSize","newValue","validateProp","validateColor","loadIconPathData","visible","loadIcon","connectedCallback","iconsLazyLoad","finally","waitUntilVisible","disconnectedCallback","intersectionObserver","disconnect","componentWillLoad","size","color","callback","window","IntersectionObserver","entries","forEach","entry","isIntersecting","rootMargin","observe","data","isValid","isString","indexOf","innerHTML","e","error","render","Host","class","classes"],"sources":["../../../packages/core/src/components/gov-icon/constants.ts","../../../packages/core/src/utils/ds.utils.ts","../../../packages/core/src/utils/icon.utils.ts","../../../packages/core/src/components/gov-icon/gov-icon.tsx"],"sourcesContent":["import { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils';\nimport { Colors } from '../../core/constants/colors';\nimport {Sizes} from \"../../core/constants/sizes\";\n\nexport const IconSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL', '_2XL', '_3XL', '_4XL', '_5XL'])\nexport type IconSizesType = `${ValueOf<typeof IconSizes>}`\n\nexport const IconColors = pick(Colors, [\n\t'DEFAULT',\n\t'PRIMARY',\n\t'SECONDARY',\n\t'NEUTRAL',\n\t'ERROR',\n\t'SUCCESS',\n\t'WARNING',\n\t'DISABLED',\n\t'WHITE',\n\t'BLACK',\n])\nexport type IconColorType = `${ValueOf<typeof IconColors>}`\n\nenum Types {\n\tBASIC = 'basic',\n\tCOMPLEX = 'complex',\n\tCOLORED = 'colored',\n}\nexport type Type = `${ValueOf<typeof Types>}`\n\nexport const IconClass = {\n\troot: 'gov-icon',\n\tholder: 'gov-icon__holder',\n}\n","import { version } from '../../package.json'\n\nexport const dsVersion = (): string => {\n\treturn version\n}\n","import { getAssetPath } from \"@stencil/core\"\nimport { dsVersion } from \"./ds.utils\"\nimport { iconsPath } from \"../helpers/Dom/win\"\n\nconst iconCache: { [key: string]: string } = {}\nconst requestCache: { [key: string]: Promise<string> } = {}\n\nconst isExternalUrl = (path: string) => path.startsWith(\"http://\") || path.startsWith(\"https://\")\nconst iconUrl = (path: string, name: string, type: string) => {\n\tif (isExternalUrl(path)) {\n\t\treturn `${path}/${type}/${name}.svg?v=${dsVersion()}`\n\t}\n\treturn getAssetPath(`${path}/${type}/${name}.svg`) + `?v=${dsVersion()}`\n}\n\nexport async function fetchIcon({ name, type }: { name: string; type: string }): Promise<string> {\n\tconst cacheKey = type + \"-\" + name\n\tif (iconCache[cacheKey]) {\n\t\treturn iconCache[cacheKey]\n\t}\n\tif (!requestCache[cacheKey]) {\n\t\trequestCache[cacheKey] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {\n\t\t\tif (resp.status === 200) {\n\t\t\t\treturn resp.text()\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Gov Icon doesn't exists\")\n\t\t\t}\n\t\t})\n\t}\n\tconst path = await requestCache[cacheKey]\n\ticonCache[cacheKey] = path\n\treturn path\n}\n","import {Build, Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {IconClass, IconSizesType} from \"./constants\"\nimport {fetchIcon} from \"../../utils/icon.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {iconsLazyLoad} from \"../../helpers/Dom/win\"\nimport {isString} from \"../../utils/helpers.types\";\nimport { type IconColorType, IconColors } from \"./constants\";\nimport { validateProp } from \"../../helpers/Validate/props\";\nimport {Sizes} from \"../../core/constants/sizes\";\n\n@Component({\n\tassetsDirs: [\"assets\"],\n\ttag: \"gov-icon\",\n})\nexport class GovIcon {\n\tprivate h: GovHost\n\tprivate intersectionObserver: IntersectionObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovIconElement\n\t/**\n\t * Icon size\n\t */\n\t@Prop({reflect: true}) readonly size?: IconSizesType\n\t/**\n\t * Icon color\n\t */\n\t@Prop({reflect: true}) readonly color?: IconColorType\n\t/**\n\t * Name of icon in folder\n\t */\n\t@Prop({reflect: true}) name: string = null\n\t/**\n\t * Type (folder) of icon\n\t */\n\t@Prop({reflect: true}) type = \"components\"\n\n\t@State() private visible = false\n\t@State() private error = false\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(IconColors, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"name\")\n\tprivate async loadIconPathData(): Promise<void> {\n\t\tconst {name, visible} = this\n\t\tif (!Build.isBrowser || !name || !visible) {\n\t\t\treturn\n\t\t}\n\t\tawait this.loadIcon()\n\t}\n\n\tconnectedCallback(): void {\n\t\tif (iconsLazyLoad()) {\n\t\t\tthis.visible = true\n\t\t\tthis.loadIconPathData().finally()\n\t\t} else {\n\t\t\tthis.waitUntilVisible(async () => {\n\t\t\t\tthis.visible = true\n\t\t\t\tawait this.loadIconPathData()\n\t\t\t})\n\t\t}\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tif (this.intersectionObserver) {\n\t\t\tthis.intersectionObserver.disconnect()\n\t\t\tthis.intersectionObserver = null\n\t\t}\n\t}\n\n\tasync componentWillLoad(): Promise<void> {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateColor(this.color)\n\t\tawait this.loadIconPathData()\n\t}\n\n\tprivate waitUntilVisible(callback: () => void): void {\n\t\tif (!Build.isBrowser || typeof window === \"undefined\" || !(window as any).IntersectionObserver) {\n\t\t\tcallback()\n\t\t\treturn\n\t\t}\n\t\tthis.intersectionObserver = new IntersectionObserver(\n\t\t\tentries => {\n\t\t\t\tentries.forEach(entry => {\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tif (this.intersectionObserver) {\n\t\t\t\t\t\t\tthis.intersectionObserver.disconnect()\n\t\t\t\t\t\t\tthis.intersectionObserver = null\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcallback()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t{rootMargin: \"50px\"},\n\t\t)\n\t\tthis.intersectionObserver.observe(this.host)\n\t}\n\n\tprivate async loadIcon() {\n\t\ttry {\n\t\t\tconst {name, type} = this\n\t\t\tconst data = await fetchIcon({name, type})\n\t\t\tconst isValid = isString(data) && data.indexOf('svg') > -1\n\t\t\tthis.host.innerHTML = isValid ? data : null;\n\t\t} catch (e) {\n\t\t\tthis.host.innerHTML = ''\n\t\t\tthis.error = true\n\t\t}\n\t}\n\n\trender() {\n\t\tif (this.error) {\n\t\t\treturn null\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(IconClass.root)} size={this.size} color={this.color}/>\n\t\t)\n\t}\n}\n"],"mappings":"gWAKyBA,EAAKC,EAAO,CAAC,MAAO,KAAM,KAAM,KAAM,MAAO,OAAQ,OAAQ,OAAQ,SAGvF,MAAMC,EAAaF,EAAKG,EAAQ,CACtC,UACA,UACA,YACA,UACA,QACA,UACA,UACA,WACA,QACA,UAID,IAAKC,GAAL,SAAKA,GACJA,EAAA,iBACAA,EAAA,qBACAA,EAAA,oBACA,EAJD,CAAKA,MAAK,KAOH,MAAMC,EAAY,CACxBC,KAAM,WACNC,OAAQ,oB,gBC7BF,MAAMC,EAAY,IACjBC,ECCR,MAAMC,EAAuC,GAC7C,MAAMC,EAAmD,GAEzD,MAAMC,EAAiBC,GAAiBA,EAAKC,WAAW,YAAcD,EAAKC,WAAW,YACtF,MAAMC,EAAU,CAACF,EAAcG,EAAcC,KAC5C,GAAIL,EAAcC,GAAO,CACxB,MAAO,GAAGA,KAAQI,KAAQD,WAAcR,K,CAEzC,OAAOU,EAAa,GAAGL,KAAQI,KAAQD,SAAc,MAAMR,KAAa,EAGlEW,eAAeC,GAAUJ,KAAEA,EAAIC,KAAEA,IACvC,MAAMI,EAAWJ,EAAO,IAAMD,EAC9B,GAAIN,EAAUW,GAAW,CACxB,OAAOX,EAAUW,E,CAElB,IAAKV,EAAaU,GAAW,CAC5BV,EAAaU,GAAYC,MAAMP,EAAQQ,IAAaP,EAAMC,IAAOO,MAAKC,IACrE,GAAIA,EAAKC,SAAW,IAAK,CACxB,OAAOD,EAAKE,M,KACN,CACN,MAAM,IAAIC,MAAM,0B,KAInB,MAAMf,QAAaF,EAAaU,GAChCX,EAAUW,GAAYR,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AAQ,QAAU,EACzDjC,KAAKG,KAAK+B,UAAYH,EAAUD,EAAO,I,CACtC,MAAOK,GACRnC,KAAKG,KAAK+B,UAAY,GACtBlC,KAAKoC,MAAQ,I,EAIf,MAAAC,GACC,GAAIrC,KAAKoC,MAAO,CACf,OAAO,I,CAER,OACCnC,EAACqC,EAAI,CAACC,MAAOvC,KAAKC,EAAEuC,QAAQpE,EAAUC,MAAO8C,KAAMnB,KAAKmB,KAAMC,MAAOpB,KAAKoB,O","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["GovFormSwitch","constructor","hostRef","this","hydrated","checkboxId","createID","h","govHost","host","f","govForm","validateSize","newValue","validateProp","FormSwitchSizes","FormSwitchClass","root","watchDisabled","passControlAttrs","passAttrToControl","size","toBoolAttr","invalid","disabled","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","inheritedAttributes","inheritAriaAttributes","disconnectedCallback","stopObserving","componentDidRender","passAttrToLabel","identifier","String","required","connectedCallback","removeAttribute","Object","assign","render","wrapCheckbox","children","noLabel","class","label","Host","classes","checked","toBoolAttrIfDefined","Fragment","input","id","type","value","name","onClick","onClickHandler","bind","onChange","onChangeHandler","onFocus","onFocusHandler","onBlur","onBlurHandler","ref","el","inputRef","indicator","e","stopPropagation","govFocus","emit","component","originalEvent","govBlur","target","govChange","getRef"],"sources":["../../../packages/core/src/components/gov-form/switch/gov-form-switch.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormSwitchClass, FormSwitchSizes, FormSwitchSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport {FormSwitchEvent} from \"./gov-form-switch.types\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-form-switch\",\n})\nexport class GovFormSwitch {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly checkboxId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.checkboxId = createID(\"GovCheckbox\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormSwitchElement\n\t/**\n\t * Value of switch\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Switch button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the switch component disabled.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Name of the switch.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Switch's size.\n\t */\n\t@Prop() readonly size?: FormSwitchSizesType = \"m\"\n\t/**\n\t * Custom switch identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the switch has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormSwitchEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSwitchSizes, newValue, FormSwitchClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"switch\")\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.passControlAttrs()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.checkboxId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\tconst wrapCheckbox = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn (\n\t\t\t\t\t<label class={FormSwitchClass.label}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</label>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FormSwitchClass.root)} hydrated={this.hydrated} checked={this.checked}\n\t\t\t\t size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapCheckbox(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={FormSwitchClass.input}\n\t\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<span class={FormSwitchClass.indicator}>\n\t\t\t\t\t\t\t\t{this.checked && <gov-icon name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: Event) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\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: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n"],"mappings":"6gBAiBaA,EAAa,MASzB,WAAAC,CAAAC,G,sHAFQC,KAAAC,SAAW,M,kCAiBwC,M,aAIX,M,cAIX,M,cAIA,M,8BAQS,I,0EAkCH,GApE1CD,KAAKE,WAAaC,EAAS,eAE3BH,KAAKI,EAAIC,EAAQL,KAAKM,MACtBN,KAAKO,EAAIC,EAAQR,KAAKI,E,CAsDvB,YAAAK,CAAaC,GACZC,EAAaC,EAAiBF,EAAUG,EAAgBC,K,CAMzD,aAAAC,GACCf,KAAKgB,kB,CAKE,gBAAAA,GACPhB,KAAKO,EAAEU,kBAAkB,OAAQjB,KAAKkB,MACtClB,KAAKO,EAAEU,kBAAkB,UAAWE,EAAWnB,KAAKoB,UACpDpB,KAAKO,EAAEU,kBAAkB,WAAYE,EAAWnB,KAAKqB,WACrDrB,KA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js";import{p as h}from"./p-e0e2e9c1.js";import{C as r}from"./p-5aad3497.js";import{S as l}from"./p-92f420cb.js";import{i as f,a as d,b as u}from"./p-20c2203a.js";import{i as m}from"./p-2aedc81e.js";import{v as b}from"./p-a2435993.js";const p={root:"gov-flex"};const g=class{constructor(s){t(this,s);this.direction="row";this.justifyContent=undefined;this.alignItems=undefined;this.wrap=undefined;this.alignContent=undefined;this.alignSelf=undefined;this.h=n(this.host)}render(){return s(e,{key:"77d5eb1db594698f6fde4bf497209912de71173f",class:this.h.classes(p.root)},s("slot",{key:"6c01ff6ec88c53dbf9e83d492f660c96e9e7fc2a"}))}get host(){return i(this)}};const v=class{constructor(s){t(this,s);this.govClick=a(this,"gov-click",7);this.identifier=undefined;this.size="m";this.required=false;this.legend=false}render(){const t=this.legend?"legend":"label";return s(e,{key:"3e02eaa899126807c31fac8d3b6f352a07a73a9d",class:c.root,size:this.size},s(t,{key:"a1213cf879e26565c4c84d31ab6a46dac2a9ee4e",class:c.label,htmlFor:this.identifier,onClick:()=>this.govClick.emit()},s("slot",{key:"46a6a39821d6f3f786b843c037b0b423ba2445ae"}),this.required?s("span",{class:"gov-color--error-500"}," *"):null))}};h(l,["_XS","_S","_M","_L","_XL","_2XL","_3XL","_4XL","_5XL"]);const _=h(r,["DEFAULT","PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING","DISABLED","WHITE","BLACK"]);var w;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(w||(w={}));const y={root:"gov-icon",holder:"gov-icon__holder"};const k="4.1.0";const L=()=>k;const S={};const C={};const D=t=>t.startsWith("http://")||t.startsWith("https://");const j=(t,s,e)=>{if(D(t)){return`${t}/${e}/${s}.svg?v=${L()}`}return o(`${t}/${e}/${s}.svg`)+`?v=${L()}`};async function z({name:t,type:s}){const e=s+"-"+t;if(S[e]){return S[e]}if(!C[e]){C[e]=fetch(j(f(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const i=await C[e];S[e]=i;return i}const I=class{constructor(s){t(this,s);this.size=undefined;this.color=undefined;this.name=null;this.type="components";this.visible=false;this.error=false;this.h=n(this.host)}validateSize(t){b(l,t,y.root)}validateColor(t){b(_,t,y.root)}async loadIconPathData(){const{name:t,visible:s}=this;if(!t||!s){return}await this.loadIcon()}connectedCallback(){if(d()){this.visible=true;this.loadIconPathData().finally()}else{this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){this.validateSize(this.size);this.validateColor(this.color);await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((s=>{s.forEach((s=>{if(s.isIntersecting){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}async loadIcon(){try{const{name:t,type:s}=this;const e=await z({name:t,type:s});const i=m(e)&&e.indexOf("svg")>-1;this.host.innerHTML=i?e:null}catch(t){this.host.innerHTML="";this.error=true}}render(){if(this.error){return null}return s(e,{class:this.h.classes(y.root),size:this.size,color:this.color})}static get assetsDirs(){return["assets"]}get host(){return i(this)}static get watchers(){return{size:["validateSize"],color:["validateColor"],name:["loadIconPathData"]}}};const $=h(l,["_XS","_S","_M","_L","_XL"]);const R={root:"gov-theme-switch",indicator:"gov-theme-switch__indicator",iconLight:"gov-theme-switch__icon-light",iconDark:"gov-theme-switch__icon-dark",labelLight:"gov-theme-switch__label-light",labelDark:"gov-theme-switch__label-dark"};const E="data-theme";var X;(function(t){t["auto"]="auto";t["light"]="light";t["dark"]="dark"})(X||(X={}));const x=(t,s,e)=>{if(!u){return}let i="";if(e){const t=new Date;t.setTime(t.getTime()+e*24*60*60*1e3);i="; expires="+t.toUTCString()}document.cookie=`${t}=${encodeURIComponent(s)}${i}; path=/`};const A=t=>{if(!u){return null}const s=t+"=";const e=document.cookie.split(";");for(let t=0;t<e.length;t++){let i=e[t].trim();if(i.startsWith(s)){return decodeURIComponent(i.substring(s.length))}}return null};const U=class{constructor(s){t(this,s);this.govChange=a(this,"gov-change",7);this.setThemeState=t=>{this.theme=t;this.govChange.emit({component:R.root,state:this.theme,ref:this.host})};this.size="m";this.ariaLabelLight=undefined;this.ariaLabelDark=undefined;this.labelLight=undefined;this.labelDark=undefined;this.theme=X.auto;this.h=n(this.host)}validateSize(t){b($,t,R.root)}watchTheme(t){this.htmlElement.setAttribute(E,t);this.htmlElement.classList.remove(...Object.keys(X));this.htmlElement.classList.add(t);x(E,t)}get storageValue(){return A(E)}get htmlElement(){return document.documentElement}get isSystemPrefersColorDark(){return u&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}componentWillLoad(){this.initDefaultState();this.validateSize(this.size)}initDefaultState(){const t=Object.keys(X);let s=this.storageValue;const e=this.htmlElement.getAttribute(E);if(s&&t.includes(s)){this.theme=s}else if(e&&t.includes(e)){this.theme=e}else{this.theme=X.auto}}render(){let t=this.theme===X.dark;if(this.theme===X.auto){t=this.isSystemPrefersColorDark}return s(e,{key:"a83f030f54527f8e8a2d23c3769f3f1b41c4af4f",class:this.h.classes(R.root),theme:t?X.dark:X.light,size:this.size},s("button",{key:"54f8337d911cf64f24c8db089b9092b806c3a926",onClick:()=>this.setThemeState(t?X.light:X.dark),"aria-label":t?this.ariaLabelLight:this.ariaLabelDark},s("span",{key:"483310b54df8e8de42c087f04b7e0758067c22b8"},s("span",{key:"88b822cac4b5dc3897fa19252b5b1e1a559b8d6d",class:R.indicator},X.light&&s("gov-icon",{key:"f6f162cda66facba8940ba55f7f3283e7796d157",name:"sun",class:R.iconLight,type:"components"}),X.dark&&s("gov-icon",{key:"b36b009c1787e37a3fd5108618c6bb5993f97a23",name:"moon",class:R.iconDark,type:"components"})),s("gov-form-label",{key:"dff2b2b454a87faa1d7e471d2a271c333c983aad",class:R.labelLight,size:this.size},this.labelLight),s("gov-form-label",{key:"1b682ccaff92cc4cfe8462ff2a59507fd61b114b",class:R.labelDark,size:this.size},this.labelDark))))}get host(){return i(this)}static get watchers(){return{size:["validateSize"],theme:["watchTheme"]}}};export{g as gov_flex,v as gov_form_label,I as gov_icon,U as gov_theme_switch};
2
- //# sourceMappingURL=p-1b3c808d.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["FlexClass","root","GovFlex","constructor","hostRef","this","h","govHost","host","render","Host","key","class","classes","GovFormLabel","Tag","legend","FormLabelClass","size","label","htmlFor","identifier","onClick","govClick","emit","required","pick","Sizes","IconColors","Colors","Types","IconClass","holder","dsVersion","version","iconCache","requestCache","isExternalUrl","path","startsWith","iconUrl","name","type","getAssetPath","async","fetchIcon","cacheKey","fetch","iconsPath","then","resp","status","text","Error","GovIcon","validateSize","newValue","validateProp","validateColor","loadIconPathData","visible","loadIcon","connectedCallback","iconsLazyLoad","finally","waitUntilVisible","disconnectedCallback","intersectionObserver","disconnect","componentWillLoad","color","callback","window","IntersectionObserver","entries","forEach","entry","isIntersecting","rootMargin","observe","data","isValid","isString","indexOf","innerHTML","e","error","ThemeSwitchSizes","ThemeSwitchClass","indicator","iconLight","iconDark","labelLight","labelDark","ATTRIBUTE_THEME_NAME","ThemeList","setCookie","value","days","isWindow","expires","date","Date","setTime","getTime","toUTCString","document","cookie","encodeURIComponent","getCookie","nameEQ","cookies","split","i","length","trim","decodeURIComponent","substring","GovThemeSwitch","setThemeState","state","theme","govChange","component","ref","auto","watchTheme","htmlElement","setAttribute","classList","remove","Object","keys","add","storageValue","documentElement","isSystemPrefersColorDark","matchMedia","matches","initDefaultState","options","currentState","htmlState","getAttribute","includes","isDark","dark","light","ariaLabelLight","ariaLabelDark"],"sources":["../../../packages/core/src/components/gov-flex/constants.ts","../../../packages/core/src/components/gov-flex/gov-flex.tsx","../../../packages/core/src/components/gov-form/label/gov-form-label.tsx","../../../packages/core/src/components/gov-icon/constants.ts","../../../packages/core/src/utils/ds.utils.ts","../../../packages/core/src/utils/icon.utils.ts","../../../packages/core/src/components/gov-icon/gov-icon.tsx","../../../packages/core/src/components/gov-theme-switch/constants.ts","../../../packages/core/src/components/gov-theme-switch/gov-theme-switch.types.ts","../../../packages/core/src/helpers/Dom/document.ts","../../../packages/core/src/components/gov-theme-switch/gov-theme-switch.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","import { Component, Event, EventEmitter, h, Prop, Host } from '@stencil/core'\nimport { FormLabelClass, FormLabelSizesTypes } from './constants'\n\n@Component({\n\ttag: 'gov-form-label',\n})\nexport class GovFormLabel {\n\t/**\n\t * Identifier for label.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Label's size.\n\t */\n\t@Prop() readonly size?: FormLabelSizesTypes = 'm'\n\t/**\n\t * Set whether the input is required or not.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Use label as a legend for better accessibility.\n\t * Note: Don't forget to set the fieldset attribute of the gov-form-control component\n\t */\n\t@Prop() readonly legend: boolean = false\n\t/**\n\t * Emitted when the label click.\n\t */\n\t@Event({ eventName: 'gov-click' }) govClick: EventEmitter<PointerEvent>\n\n\trender() {\n\t\tconst Tag = this.legend ? 'legend' : 'label'\n\t\treturn (\n\t\t\t<Host class={FormLabelClass.root} size={this.size}>\n\t\t\t\t<Tag class={FormLabelClass.label} htmlFor={this.identifier} onClick={() => this.govClick.emit()}>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t\t{this.required ? <span class=\"gov-color--error-500\">&nbsp;*</span> : null}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n","import { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils';\nimport { Colors } from '../../core/constants/colors';\nimport {Sizes} from \"../../core/constants/sizes\";\n\nexport const IconSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL', '_2XL', '_3XL', '_4XL', '_5XL'])\nexport type IconSizesType = `${ValueOf<typeof IconSizes>}`\n\nexport const IconColors = pick(Colors, [\n\t'DEFAULT',\n\t'PRIMARY',\n\t'SECONDARY',\n\t'NEUTRAL',\n\t'ERROR',\n\t'SUCCESS',\n\t'WARNING',\n\t'DISABLED',\n\t'WHITE',\n\t'BLACK',\n])\nexport type IconColorType = `${ValueOf<typeof IconColors>}`\n\nenum Types {\n\tBASIC = 'basic',\n\tCOMPLEX = 'complex',\n\tCOLORED = 'colored',\n}\nexport type Type = `${ValueOf<typeof Types>}`\n\nexport const IconClass = {\n\troot: 'gov-icon',\n\tholder: 'gov-icon__holder',\n}\n","import { version } from '../../package.json'\n\nexport const dsVersion = (): string => {\n\treturn version\n}\n","import { getAssetPath } from \"@stencil/core\"\nimport { dsVersion } from \"./ds.utils\"\nimport { iconsPath } from \"../helpers/Dom/win\"\n\nconst iconCache: { [key: string]: string } = {}\nconst requestCache: { [key: string]: Promise<string> } = {}\n\nconst isExternalUrl = (path: string) => path.startsWith(\"http://\") || path.startsWith(\"https://\")\nconst iconUrl = (path: string, name: string, type: string) => {\n\tif (isExternalUrl(path)) {\n\t\treturn `${path}/${type}/${name}.svg?v=${dsVersion()}`\n\t}\n\treturn getAssetPath(`${path}/${type}/${name}.svg`) + `?v=${dsVersion()}`\n}\n\nexport async function fetchIcon({ name, type }: { name: string; type: string }): Promise<string> {\n\tconst cacheKey = type + \"-\" + name\n\tif (iconCache[cacheKey]) {\n\t\treturn iconCache[cacheKey]\n\t}\n\tif (!requestCache[cacheKey]) {\n\t\trequestCache[cacheKey] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {\n\t\t\tif (resp.status === 200) {\n\t\t\t\treturn resp.text()\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Gov Icon doesn't exists\")\n\t\t\t}\n\t\t})\n\t}\n\tconst path = await requestCache[cacheKey]\n\ticonCache[cacheKey] = path\n\treturn path\n}\n","import {Build, Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {IconClass, IconSizesType} from \"./constants\"\nimport {fetchIcon} from \"../../utils/icon.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {iconsLazyLoad} from \"../../helpers/Dom/win\"\nimport {isString} from \"../../utils/helpers.types\";\nimport { type IconColorType, IconColors } from \"./constants\";\nimport { validateProp } from \"../../helpers/Validate/props\";\nimport {Sizes} from \"../../core/constants/sizes\";\n\n@Component({\n\tassetsDirs: [\"assets\"],\n\ttag: \"gov-icon\",\n})\nexport class GovIcon {\n\tprivate h: GovHost\n\tprivate intersectionObserver: IntersectionObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovIconElement\n\t/**\n\t * Icon size\n\t */\n\t@Prop({reflect: true}) readonly size?: IconSizesType\n\t/**\n\t * Icon color\n\t */\n\t@Prop({reflect: true}) readonly color?: IconColorType\n\t/**\n\t * Name of icon in folder\n\t */\n\t@Prop({reflect: true}) name: string = null\n\t/**\n\t * Type (folder) of icon\n\t */\n\t@Prop({reflect: true}) type = \"components\"\n\n\t@State() private visible = false\n\t@State() private error = false\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(IconColors, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"name\")\n\tprivate async loadIconPathData(): Promise<void> {\n\t\tconst {name, visible} = this\n\t\tif (!Build.isBrowser || !name || !visible) {\n\t\t\treturn\n\t\t}\n\t\tawait this.loadIcon()\n\t}\n\n\tconnectedCallback(): void {\n\t\tif (iconsLazyLoad()) {\n\t\t\tthis.visible = true\n\t\t\tthis.loadIconPathData().finally()\n\t\t} else {\n\t\t\tthis.waitUntilVisible(async () => {\n\t\t\t\tthis.visible = true\n\t\t\t\tawait this.loadIconPathData()\n\t\t\t})\n\t\t}\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tif (this.intersectionObserver) {\n\t\t\tthis.intersectionObserver.disconnect()\n\t\t\tthis.intersectionObserver = null\n\t\t}\n\t}\n\n\tasync componentWillLoad(): Promise<void> {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateColor(this.color)\n\t\tawait this.loadIconPathData()\n\t}\n\n\tprivate waitUntilVisible(callback: () => void): void {\n\t\tif (!Build.isBrowser || typeof window === \"undefined\" || !(window as any).IntersectionObserver) {\n\t\t\tcallback()\n\t\t\treturn\n\t\t}\n\t\tthis.intersectionObserver = new IntersectionObserver(\n\t\t\tentries => {\n\t\t\t\tentries.forEach(entry => {\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tif (this.intersectionObserver) {\n\t\t\t\t\t\t\tthis.intersectionObserver.disconnect()\n\t\t\t\t\t\t\tthis.intersectionObserver = null\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcallback()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t{rootMargin: \"50px\"},\n\t\t)\n\t\tthis.intersectionObserver.observe(this.host)\n\t}\n\n\tprivate async loadIcon() {\n\t\ttry {\n\t\t\tconst {name, type} = this\n\t\t\tconst data = await fetchIcon({name, type})\n\t\t\tconst isValid = isString(data) && data.indexOf('svg') > -1\n\t\t\tthis.host.innerHTML = isValid ? data : null;\n\t\t} catch (e) {\n\t\t\tthis.host.innerHTML = ''\n\t\t\tthis.error = true\n\t\t}\n\t}\n\n\trender() {\n\t\tif (this.error) {\n\t\t\treturn null\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(IconClass.root)} size={this.size} color={this.color}/>\n\t\t)\n\t}\n}\n","import {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const ThemeSwitchSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL'])\nexport type ThemeSwitchSizesType = `${ValueOf<typeof ThemeSwitchSizes>}`\n\nexport const ThemeSwitchClass = {\n\troot: 'gov-theme-switch',\n\tindicator: 'gov-theme-switch__indicator',\n\ticonLight: 'gov-theme-switch__icon-light',\n\ticonDark: 'gov-theme-switch__icon-dark',\n\tlabelLight: 'gov-theme-switch__label-light',\n\tlabelDark: 'gov-theme-switch__label-dark',\n}\n\nexport const ATTRIBUTE_THEME_NAME = 'data-theme'\n","import {GovBaseEvent} from \"../../types/event.types\";\n\nexport enum ThemeList {\n\tauto = 'auto',\n\tlight = 'light',\n\tdark = 'dark'\n}\n\nexport interface ThemeSwitchEvent extends GovBaseEvent {\n\tref: HTMLGovThemeSwitchElement;\n\tstate: ThemeList\n}\n\n","import {Nullable} from \"../../utils/helpers.types\";\nimport {isWindow} from \"./win\";\n\nexport const setCookie = (name: string, value: string, days?: number) => {\n\tif (!isWindow) {\n\t\treturn\n\t}\n\tlet expires = \"\";\n\tif (days) {\n\t\tconst date = new Date();\n\t\tdate.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\n\t\texpires = \"; expires=\" + date.toUTCString();\n\t}\n\tdocument.cookie = `${name}=${encodeURIComponent(value)}${expires}; path=/`;\n}\n\nexport const getCookie = (name: string): Nullable<string> => {\n\tif (!isWindow) {\n\t\treturn null\n\t}\n\tconst nameEQ = name + \"=\";\n\tconst cookies = document.cookie.split(';');\n\tfor (let i = 0; i < cookies.length; i++) {\n\t\tlet cookie = cookies[i].trim();\n\t\tif (cookie.startsWith(nameEQ)) {\n\t\t\treturn decodeURIComponent(cookie.substring(nameEQ.length));\n\t\t}\n\t}\n\treturn null;\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {GovHost} from \"../../helpers/Dom/template.types\";\nimport {govHost} from \"../../helpers/Dom/template\";\nimport {ATTRIBUTE_THEME_NAME, ThemeSwitchClass, ThemeSwitchSizes, ThemeSwitchSizesType} from \"./constants\";\nimport {isWindow} from \"../../helpers/Dom/win\";\nimport {ThemeList, ThemeSwitchEvent} from \"./gov-theme-switch.types\";\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {getCookie, setCookie} from \"../../helpers/Dom/document\";\n\n@Component({\n\ttag: \"gov-theme-switch\",\n})\nexport class GovThemeSwitch {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovThemeSwitchElement\n\n\t/**\n\t * Switch's size.\n\t */\n\t@Prop() readonly size?: ThemeSwitchSizesType = \"m\"\n\t/**\n\t * Label in light mode\n\t */\n\t@Prop({attribute: \"aria-label-light\"}) readonly ariaLabelLight?: \"Přenout na tmavý mód\"\n\t/**\n\t * Label in dark mode\n\t */\n\t@Prop({attribute: \"aria-label-dark\"}) readonly ariaLabelDark?: \"Přepnout na světlý mód\"\n\t/**\n\t * Label in light mode\n\t */\n\t@Prop({attribute: \"label-light\"}) readonly labelLight?: \"Světlý mód\"\n\t/**\n\t * Label in dark mode\n\t */\n\t@Prop({attribute: \"label-dark\"}) readonly labelDark?: \"Tmavý mód\"\n\t/**\n\t * Called when the theme is changed by the user\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<ThemeSwitchEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ThemeSwitchSizes, newValue, ThemeSwitchClass.root)\n\t}\n\n\t@Watch(\"theme\")\n\twatchTheme(newValue: ThemeList): void {\n\t\tthis.htmlElement.setAttribute(ATTRIBUTE_THEME_NAME, newValue);\n\t\tthis.htmlElement.classList.remove(...Object.keys(ThemeList));\n\t\tthis.htmlElement.classList.add(newValue);\n\t\tsetCookie(ATTRIBUTE_THEME_NAME, newValue);\n\t}\n\n\t@State() theme: ThemeList = ThemeList.auto\n\n\tprivate get storageValue() {\n\t\treturn getCookie(ATTRIBUTE_THEME_NAME)\n\t}\n\n\tprivate get htmlElement(): HTMLElement {\n\t\treturn document.documentElement\n\t}\n\n\tprivate get isSystemPrefersColorDark(): boolean {\n\t\treturn isWindow && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.initDefaultState()\n\t\tthis.validateSize(this.size)\n\t}\n\n\tprivate initDefaultState() {\n\t\tconst options = Object.keys(ThemeList);\n\t\tlet currentState = this.storageValue;\n\t\tconst htmlState = this.htmlElement.getAttribute(ATTRIBUTE_THEME_NAME)\n\n\t\tif (currentState && options.includes(currentState)) {\n\t\t\tthis.theme = currentState as ThemeList;\n\t\t} else if (htmlState && options.includes(htmlState)) {\n\t\t\tthis.theme = htmlState as ThemeList;\n\t\t} else {\n\t\t\tthis.theme = ThemeList.auto;\n\t\t}\n\t}\n\n\tprivate setThemeState = (state: ThemeList) => {\n\t\tthis.theme = state;\n\n\t\tthis.govChange.emit({\n\t\t\tcomponent: ThemeSwitchClass.root,\n\t\t\tstate: this.theme,\n\t\t\tref: this.host\n\t\t})\n\t}\n\n\trender() {\n\t\tlet isDark = this.theme === ThemeList.dark;\n\t\tif (this.theme === ThemeList.auto) {\n\t\t\tisDark = this.isSystemPrefersColorDark;\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ThemeSwitchClass.root)}\n\t\t\t\t theme={isDark ? ThemeList.dark : ThemeList.light}\n\t\t\t\t size={this.size}>\n\t\t\t\t<button onClick={() => this.setThemeState(isDark ? ThemeList.light : ThemeList.dark)}\n\t\t\t\t\t\taria-label={isDark ? this.ariaLabelLight : this.ariaLabelDark}>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<span class={ThemeSwitchClass.indicator}>\n\t\t\t\t\t\t\t{ThemeList.light && <gov-icon name=\"sun\" class={ThemeSwitchClass.iconLight} type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t{ThemeList.dark && <gov-icon name=\"moon\" class={ThemeSwitchClass.iconDark} type=\"components\"></gov-icon>}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<gov-form-label class={ThemeSwitchClass.labelLight} size={this.size}>\n\t\t\t\t\t\t\t{this.labelLight}\n\t\t\t\t\t\t</gov-form-label>\n\t\t\t\t\t\t<gov-form-label class={ThemeSwitchClass.labelDark} size={this.size}>\n\t\t\t\t\t\t\t{this.labelDark}\n\t\t\t\t\t\t</gov-form-label>\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"qXAAO,MAAMA,EAAY,CACxBC,KAAM,Y,MCOMC,EAAO,MAGnB,WAAAC,CAAAC,G,yBASyE,M,iIARxEC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAiDvB,MAAAC,GACC,OACCH,EAACI,EAAI,CAAAC,IAAA,2CAACC,MAAOP,KAAKC,EAAEO,QAAQb,EAAUC,OACrCK,EAAA,QAAAK,IAAA,6C,mCC1DSG,EAAY,M,iGAQsB,I,cAIT,M,YAKF,K,CAMnC,MAAAL,GACC,MAAMM,EAAMV,KAAKW,OAAS,SAAW,QACrC,OACCV,EAACI,EAAI,CAAAC,IAAA,2CAACC,MAAOK,EAAehB,KAAMiB,KAAMb,KAAKa,MAC5CZ,EAACS,EAAG,CAAAJ,IAAA,2CAACC,MAAOK,EAAeE,MAAOC,QAASf,KAAKgB,WAAYC,QAAS,IAAMjB,KAAKkB,SAASC,QACxFlB,EAAA,QAAAK,IAAA,6CACCN,KAAKoB,SAAWnB,EAAA,QAAMM,MAAM,wBAAsB,MAAkB,M,GC9BjDc,EAAKC,EAAO,CAAC,MAAO,KAAM,KAAM,KAAM,MAAO,OAAQ,OAAQ,OAAQ,SAGvF,MAAMC,EAAaF,EAAKG,EAAQ,CACtC,UACA,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,MAAO4E,EAAiBE,UAAWhD,KAAK,eAChFqD,EAAUmD,MAAQ5I,EAAA,YAAAK,IAAA,2CAAU8B,KAAK,OAAO7B,MAAO4E,EAAiBG,SAAUjD,KAAK,gBAEjFpC,EAAA,kBAAAK,IAAA,2CAAgBC,MAAO4E,EAAiBI,WAAY1E,KAAMb,KAAKa,MAC7Db,KAAKuF,YAEPtF,EAAA,kBAAAK,IAAA,2CAAgBC,MAAO4E,EAAiBK,UAAW3E,KAAMb,KAAKa,MAC5Db,KAAKwF,a","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as t,h as s,a as e,g as i}from"./p-8506b611.js";import{p as a}from"./p-e0e2e9c1.js";import{S as o}from"./p-92f420cb.js";import{g as r}from"./p-ea7fdd2e.js";import{v as c}from"./p-a2435993.js";import{i as h}from"./p-d9a299a4.js";import"./p-20c2203a.js";import"./p-9ac55bd1.js";const n=a(o,["_S","_M","_L"]);const f={root:"gov-link"};const d=class{constructor(s){t(this,s);this.size="m";this.external=false;this.href=undefined;this.target=undefined;this.inheritedAttributes={};this.h=r(this.host)}validateSize(t){c(n,t,f.root)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=h(this.host)}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){return s(e,{key:"8723fc6fc0cf3faf4a0fb48b38ad2f0d0a21704b",class:this.h.classes(f.root),size:this.size,href:this.href,external:this.external},s("a",Object.assign({key:"1bfe7837dab38690789ec818f6134a50a93d1e4e",class:"element",href:this.href,target:this.target},this.inheritedAttributes),s("slot",{key:"96d6ce9e164a8fa5b6d5c115d52988bdfff3eceb",name:"icon-start"}),s("slot",{key:"bcc373fec9e7e159c6b31a2ad846dd929d189d1e"}),this.external?s("gov-icon",{name:"box-arrow-up-right",type:"components"}):s("slot",{name:"icon-end"})))}get host(){return i(this)}static get watchers(){return{size:["validateSize"]}}};export{d as gov_link};
2
- //# sourceMappingURL=p-2c290fe5.entry.js.map
@@ -1,2 +0,0 @@
1
- import{r as t,h as a,a as s,g as i}from"./p-8506b611.js";import{a as e,b as r,c as o}from"./p-e44a0fee.js";import{g as p}from"./p-ea7fdd2e.js";import{v as c}from"./p-a2435993.js";import"./p-e0e2e9c1.js";import"./p-92f420cb.js";import"./p-20c2203a.js";const f=class{constructor(a){t(this,a);this.gap=undefined;this.orientation="vertical";this.h=p(this.host)}validateGap(t){if(t){c(r,t,e.root)}}validateOrientation(t){if(t){c(o,t,e.root)}}componentWillLoad(){this.validateGap(this.gap);this.validateOrientation(this.orientation)}render(){return a(s,{key:"a6b2a022f3c8573fb1bb7424d6a5ac2dc54b101b",gap:this.gap,class:this.h.classes(e.root)},a("slot",{key:"e1b5f38d87e9f46f555e2fc3d247a9c3c10b5872"}))}get host(){return i(this)}static get watchers(){return{gap:["validateGap"],orientation:["validateOrientation"]}}};export{f as gov_form_group};
2
- //# sourceMappingURL=p-40d764ac.entry.js.map
@@ -1,2 +0,0 @@
1
- import{r as a,h as e,a as t,g as s}from"./p-8506b611.js";import{p as o}from"./p-e0e2e9c1.js";import{S as c}from"./p-92f420cb.js";import{g as i}from"./p-ea7fdd2e.js";import{v as r}from"./p-a2435993.js";import{a as f,b as m}from"./p-5f1000da.js";import"./p-20c2203a.js";o(c,["_S","_M","_L"]);const p={root:"gov-empty",content:"gov-empty__content"};const d=class{constructor(e){a(this,e);this.size="m";this.h=i(this.host)}validateSize(a){r(m,a,f.root)}componentWillLoad(){this.validateSize(this.size)}render(){return e(t,{key:"25d3813acc796b96c6e51aec4a55fc2efa725aa6",class:this.h.classes(p.root),size:this.size},this.h.hasSlot("icon")&&e("slot",{key:"7fccad0fe25b57219f06cfbcf18a2f2bff19c905",name:"icon"}),e("div",{key:"a4cffd5e7175ba9273a5ea74ba622e2a577ba0fe",class:p.content},e("slot",{key:"53fd435d43baa4841ecb5e3d5817efcb57433eab",name:"headline"}),e("slot",{key:"314e7a0fd7a381dbc4a85da4df2082ce4946b7b5"})))}get host(){return s(this)}static get watchers(){return{size:["validateSize"]}}};export{d as gov_empty};
2
- //# sourceMappingURL=p-410ec0dd.entry.js.map
@@ -1,2 +0,0 @@
1
- import{r as s,c as t,h as a,a as e,g as i}from"./p-8506b611.js";import{v as o}from"./p-a2435993.js";import{S as r,a as c,b as h}from"./p-a521c59a.js";import{g as p}from"./p-ea7fdd2e.js";import"./p-20c2203a.js";import"./p-e0e2e9c1.js";import"./p-5aad3497.js";import"./p-92f420cb.js";const d=class{constructor(a){s(this,a);this.govChange=t(this,"gov-change",7);this.hydrated=false;this.size="m";this.h=p(this.host)}validateSize(s){o(h,s,c.root)}componentWillLoad(){this.validateSize(this.size)}componentDidLoad(){this.host.querySelectorAll(r.root).forEach((s=>{s.setAttribute("size",this.size);s.addEventListener("gov-change",(s=>{s.stopPropagation();this.govChange.emit(s.detail)}))}))}connectedCallback(){this.hydrated=true}render(){return a(e,{key:"208bca5b06fce13b8f87f0cc4497860c01d2d56b",class:this.h.classes(c.root),role:"list",size:this.size,hydrated:this.hydrated},a("slot",{key:"a0ec9b8b5e03062e4b9547cb9fbfc73fddaa0519"}))}get host(){return i(this)}static get watchers(){return{size:["validateSize"]}}};export{d as gov_stepper};
2
- //# sourceMappingURL=p-443a813a.entry.js.map
@@ -1,2 +0,0 @@
1
- import{r as t,c as s,h as i,a as e,g as o}from"./p-8506b611.js";import{c as h}from"./p-cd6c2938.js";import{g as a,c as n,t as r}from"./p-ea7fdd2e.js";import{g as l}from"./p-da1db6fd.js";import{i as c}from"./p-d9a299a4.js";import{A as f,a as d}from"./p-9ac55bd1.js";import"./p-92f420cb.js";import"./p-e0e2e9c1.js";import"./p-7f3becc5.js";import"./p-5aad3497.js";import"./p-56efd4a2.js";import"./p-7ba4daf4.js";const m={root:"gov-form-file",area:"gov-form-file__area",input:"gov-form-file__input",attachments:"gov-form-file__attachments"};function p(t){const s=["bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let i=0,e=parseInt(t,10)||0;while(e>=1024&&++i){e=e/1024}return e.toFixed(e<10&&i>0?1:0)+" "+s[i]}function u(t,s){if(typeof s==="string"&&s.length){return s.replace(/\s/g,"").split(",").filter((s=>new RegExp(s.replace("*",".*")).test(t.type))).length>0}else{return true}}function g(t,s){const i=Math.round(t.size);return i<=s}const v=class{constructor(i){t(this,i);this.govFocus=s(this,"gov-focus",7);this.govBlur=s(this,"gov-blur",7);this.govFiles=s(this,"gov-files",7);this.govAddFile=s(this,"gov-add-file",7);this.govRemoveFile=s(this,"gov-remove-file",7);this.eventsRegistered=false;this.expanded=false;this.required=false;this.disabled=false;this.resetAfterPick=false;this.ignoreFileDuplicationCheck=false;this.displayAttachments=true;this.name=undefined;this.accept=undefined;this.multiple=false;this.maxFileSize=-1;this.identifier=undefined;this.invalid=undefined;this.errorSize="Soubor je větší než povolená velikost {FILE_SIZE}";this.errorAccept="Soubor tohoto typu není povolen";this.accessibleRemoveLabel="Odebrat soubor {FILE_NAME}";this.accessibleAttachmentsLabel="Přílohy";this.files=[];this.inheritedAttributes={};this.fileId=h("GovInputFile");this.h=a(this.host);this.f=l(this.h)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("invalid",n(this.invalid));this.f.passAttrToControl("disabled",n(this.disabled));this.f.passAttrToControl("type","File")}registerListeners(){if(this.eventsRegistered){return}this.eventsRegistered=true;function t(){this.areaRef.classList.add("highlight")}function s(){this.areaRef.classList.remove("highlight")}this.inputRef.addEventListener("change",(t=>{t.preventDefault();t.stopPropagation();const s=t.target.files;if(this.resetAfterPick){if(s.length){this.validateFiles(s)}}else{this.validateFiles(s)}}),false);if(this.expanded){const i=["dragover","dragleave"];const e=["dragenter","dragover","mouseenter"];const o=["dragleave","drop","mouseleave"];i.map((t=>this.inputRef.addEventListener(t,this.preventDefaults.bind(this),false)));e.map((s=>this.inputRef.addEventListener(s,t.bind(this),false)));o.forEach((t=>this.inputRef.addEventListener(t,s.bind(this),false)));this.areaRef.addEventListener("drop",this.handleDrop.bind(this),false)}}preventDefaults(t){t.preventDefault();t.stopPropagation()}handleDrop(t){const s=t.dataTransfer;this.validateFiles(s.files)}validateFiles(t){let s=[];Array.from(t).map((t=>{const i=this.files.find((s=>s.file.name===t.name&&s.file.size===t.size))||null;if(i===null||this.ignoreFileDuplicationCheck){const i=typeof this.maxFileSize==="number"&&this.maxFileSize>0?g(t,this.maxFileSize):true;const e=u(t,this.accept);const o={id:h("GovFormFile"),file:t,acceptValid:e,sizeValid:i};if(this.displayAttachments){this.files=[...this.files,o]}else{s=[...s,o]}this.govAddFile.emit({component:m.root,file:o})}}));this.govFiles.emit({component:m.root,files:s.length?s:this.files});if(this.resetAfterPick){this.reset().finally()}}componentDidLoad(){this.attributeObserver=new f(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(d)}componentWillLoad(){this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs();this.inheritedAttributes=c(this.host)}async componentDidRender(){this.registerListeners()}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){return i(e,{key:"fda855fd13b98ed5ec1cfca65467a076a88a5fa0",class:this.h.classes([m.root]),invalid:r(this.invalid),expanded:r(this.expanded)},i("div",{key:"b1045cecb8e17259cd01b8856987da468e0e9396",class:m.area,ref:t=>this.areaRef=t},i("slot",{key:"0d06955bac8c995f95078f706988058a50b72e55"}),i("input",Object.assign({key:"ec52abcad54909f6c0af0b7957765b8cadb26a10",class:m.input,ref:t=>this.inputRef=t,id:this.identifier||this.fileId,type:"file",name:this.name,accept:this.accept,multiple:this.multiple,onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled},this.inheritedAttributes,{"aria-required":r(this.required),"aria-invalid":r(this.invalid),"aria-disabled":r(this.disabled)}))),this.h.hasSlot("attachments")?i("div",{class:m.attachments},i("slot",{name:"attachments"})):null,this.files.length&&this.displayAttachments?i("div",{class:m.attachments},i("gov-attachments",{label:this.accessibleAttachmentsLabel,"accessible-label":this.accessibleAttachmentsLabel},this.files.map((t=>i("gov-attachments-item",{"accessible-remove-labelledby":t.id,"on-gov-remove":()=>this.onRemoveFileHandler(t)},i("span",{class:"sr-only",id:t.id},this.accessibleRemoveLabel.replace("{FILE_NAME}",t.file.name)),t.file.name,t.acceptValid===false?i("gov-form-message",{slot:"message",color:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill",type:"components"}),t.acceptValid===false?this.errorAccept:null):null,t.sizeValid===false?i("gov-form-message",{slot:"message",color:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill",type:"components"}),this.errorSize.replace("{FILE_SIZE}",p(this.maxFileSize))):null,i("span",{slot:"info"},"(",p(t.file.size),")")))))):null)}onRemoveFileHandler(t){const s=this.files.findIndex((s=>s.id===t.id));if(s!==-1){const t=this.files;const i=this.files[s];t.splice(s,1);this.files=[...t];this.govRemoveFile.emit({component:m.root,file:i});this.govFiles.emit({component:m.root,files:t})}}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:m.root,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:m.root,originalEvent:t})}onChangeHandler(t){t.stopPropagation()}async getRef(){return this.inputRef}async getAreaRef(){return this.areaRef}async reset(){this.files=[];this.inputRef.value=""}get host(){return o(this)}static get watchers(){return{disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}};export{v as gov_form_file};
2
- //# sourceMappingURL=p-48c93ac0.entry.js.map