@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
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as s,a as e,g as o}from"./p-8506b611.js";import{g as a,c as n,d as h}from"./p-da1db6fd.js";import{g as r,c as l,t as d}from"./p-ea7fdd2e.js";import{v as c}from"./p-a2435993.js";import{c as u,r as f}from"./p-cd6c2938.js";import{p}from"./p-ded281e6.js";import{t as v}from"./p-26618322.js";import{A as m,a as b}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";import"./p-20c2203a.js";import"./p-2aedc81e.js";const g=class{constructor(s){t(this,s);this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govChange=i(this,"gov-change",7);this.govSelect=i(this,"gov-select",7);this.govRemove=i(this,"gov-remove",7);this.value=undefined;this.options=undefined;this.identifier=undefined;this.placeholder=undefined;this.size="m";this.name=undefined;this.hideSelectedList=false;this.required=false;this.disabled=false;this.invalid=undefined;this.success=undefined;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.messageLoading="Načítám...";this.focused=undefined;this.valueState=undefined;this.selectedOptionsState=[];this.optionsState=[];this.inheritedAttributes={};this.selectId=u("GovSelect");this.listId=u("GovMultiList");this.h=r(this.host);this.f=a(this.h)}validateSize(t){c(h,t,n.root)}watchOptions(t){this.optionsState=p(t)}watchValue(t){this.selectedOptionsState=p(t)}componentDidLoad(){this.attributeObserver=new m(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(b);this.initAutocomplete()}componentWillLoad(){this.validateSize(this.size);this.optionsState=p(this.options);this.selectedOptionsState=p(this.value)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,i){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:i})}getAvailableOptions(t=false){if(Array.isArray(this.optionsState)&&this.optionsState.length){if(t){return this.optionsState}return this.optionsState.filter((t=>{const i=this.selectedValueIndex(t.value);return i!==-1||(t===null||t===void 0?void 0:t.disabled)?false:true})).map((t=>{var i;return{name:(i=t.label)!==null&&i!==void 0?i:t.value,value:t.value}}))}return Array.from(this.selectRef.querySelectorAll("option")).filter((i=>{if(t){return true}const s=this.selectedValueIndex(i.value);return!(i.disabled||i.selected||s>-1)})).map((t=>({name:t.textContent,value:t.value})))}initAutocomplete(){var t,i,s,e,o;(t=this.autocompleteRef)===null||t===void 0?void 0:t.addEventListener("gov-select",this.onSelectHandler.bind(this));(i=this.autocompleteRef)===null||i===void 0?void 0:i.addEventListener("gov-input",this.onInputHandler.bind(this));(s=this.autocompleteRef)===null||s===void 0?void 0:s.addEventListener("gov-focus",this.onFocusHandler.bind(this));(e=this.autocompleteRef)===null||e===void 0?void 0:e.addEventListener("gov-blur",this.onBlurHandler.bind(this));(o=this.autocompleteRef)===null||o===void 0?void 0:o.setSearchCallback((t=>new Promise((i=>{const s=this.getAvailableOptions();if(String(t).length===0){return i(s)}i(s.filter((({label:i,value:s})=>{if(!i)i=s;return f(i).toLowerCase().indexOf(f(t).toLowerCase())>-1})))})))).finally()}selectedValueIndex(t){return this.selectedOptionsState.findIndex((i=>i===t))}getOptionElement(t){return this.selectRef.querySelector('option[value="'+t+'"]')}getOption(t){var i;return(i=this.getAvailableOptions(true).find((i=>i.value===t)))!==null&&i!==void 0?i:null}selectOption(t,i=true){const s=this.selectedValueIndex(t);if(s===-1){this.selectedOptionsState=[...this.selectedOptionsState,t];this.value=this.selectedOptionsState;if(i){this.govChange.emit({component:n.root,value:this.selectedOptionsState});this.govSelect.emit({component:n.root,value:this.selectedOptionsState})}const s=this.getOptionElement(t);if(s){s.selected=true}}}removeOption(t,i=true){const s=this.selectedValueIndex(t);if(s!==-1){this.selectedOptionsState.splice(s,1);this.selectedOptionsState=[...this.selectedOptionsState];this.value=this.selectedOptionsState;if(i){this.govChange.emit({component:n.root,value:this.selectedOptionsState});this.govRemove.emit({component:n.root,value:this.selectedOptionsState})}const e=this.getOptionElement(t);if(e){e.selected=false}}}async componentDidRender(){this.f.passAttrToLabel("required",String(this.required));v((()=>{this.selectRef.querySelectorAll("option").forEach((t=>{if(t.selected){this.selectOption(t.value,false)}}))}))}render(){return s(e,{key:"8c36a19951ed5931adea3e023209e8c6b271a98f",class:n.root,size:this.size},s("div",{key:"97ed4682166e9f9261bdde9f8e9261eb350f2a85",class:n.wrap},this.h.hasSlot("prefix")&&s("slot",{key:"e49357d489985785acb2fd4917ec0eea02e420e4",name:"prefix"}),s("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:t=>this.autocompleteRef=t,minlength:0,"aria-owns":this.listId},this.success&&s("gov-icon",{key:"0ecf17afa6bef85ac0666e206b0d84bc63cdde2f",slot:"validation-icon",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&s("gov-icon",{key:"7573420027300e8951adb1bafe934dbafe5be4a4",slot:"validation-icon",class:"validation-icon",name:"exclamation-lg",type:"components"}),s("gov-icon",{key:"461f2108ddd524153d5f684b0fea218913410737",slot:"icon-end",class:"arrow-icon",name:"chevron-down",type:"components"})),s("select",Object.assign({key:"61aad9d04d5ce5778f66c794d447e45f8d605492",hidden:true,class:"hidden-select-list","aria-hidden":l(true),multiple:true,required:this.required,name:this.name,disabled:this.disabled,ref:t=>this.selectRef=t},this.inheritedAttributes,{"aria-disabled":d(this.disabled),"aria-required":d(this.required),"aria-invalid":d(this.invalid)}),s("slot",{key:"6dda21eb97bab4a943d51f3f4d0593f7580740ed"}),Array.isArray(this.optionsState)&&this.optionsState.map((t=>{var i;const e=this.selectedValueIndex(t.value);return s("option",{value:t.value,selected:e>-1,disabled:t===null||t===void 0?void 0:t.disabled},(i=t.label)!==null&&i!==void 0?i:t.value)}))),this.h.hasSlot("sufix")&&s("slot",{key:"91c91489ce3167f9e0e9eda66e1fab3553750472",name:"sufix"})),this.hideSelectedList===false?s("ul",{role:"listbox",id:this.listId,class:n.list},Array.isArray(this.selectedOptionsState)&&this.selectedOptionsState.map((t=>{var i,e;const o=this.getOption(t);if(!o)return null;return s("li",{class:n.item,role:"option"},(i=o.label)!==null&&i!==void 0?i:o.value,s("gov-button",{"aria-label":(e="Odebrat vybranou položku "+o.label)!==null&&e!==void 0?e:o.value,color:"primary",type:"base",size:this.size,"on-gov-click":()=>this.onTagRemove(t)},s("gov-icon",{name:"x-lg",type:"components"})))}))):null)}onFocusHandler(t){t.stopPropagation();this.focused=true;this.govFocus.emit({component:n.root,originalEvent:t,value:this.selectedOptionsState})}onBlurHandler(t){t.stopPropagation();t.stopPropagation();this.focused=false;this.govBlur.emit({component:n.root,originalEvent:t,value:this.selectedOptionsState})}onInputHandler(t){this.valueState=t.detail.value;t.stopPropagation()}onSelectHandler(t){t.stopPropagation();const i=t.detail.selected;this.selectOption(i.value);this.valueState="";this.autocompleteRef.clearValue().finally();this.autocompleteRef.focus()}onTagRemove(t){this.removeOption(t)}async setFocus(t){return this.selectRef.focus(t)}async setValue(t){this.valueState=t}async getRef(){return this.selectRef}get host(){return o(this)}static get watchers(){return{size:["validateSize"],options:["watchOptions"],value:["watchValue"]}}};export{g as gov_form_multi_select};
2
- //# sourceMappingURL=p-74458da3.entry.js.map
1
+ import{r as t,c as i,h as s,a as e,g as o}from"./p-8506b611.js";import{g as n,c as a,d as h}from"./p-da1db6fd.js";import{g as r,c as l,t as c}from"./p-ea7fdd2e.js";import{v as d}from"./p-0b3574c2.js";import{c as u,r as f}from"./p-cd6c2938.js";import{p}from"./p-ded281e6.js";import{t as v}from"./p-26618322.js";import{A as m,a as b}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";import"./p-e8ec030e.js";import"./p-2aedc81e.js";const g=class{constructor(s){t(this,s);this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govChange=i(this,"gov-change",7);this.govSelect=i(this,"gov-select",7);this.govRemove=i(this,"gov-remove",7);this.value=undefined;this.options=undefined;this.identifier=undefined;this.placeholder=undefined;this.size="m";this.name=undefined;this.hideSelectedList=false;this.required=false;this.disabled=false;this.invalid=undefined;this.success=undefined;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.messageLoading="Načítám...";this.focused=undefined;this.valueState=undefined;this.selectedOptionsState=[];this.optionsState=[];this.inheritedAttributes={};this.selectId=u("GovSelect");this.listId=u("GovMultiList");this.h=r(this.host);this.f=n(this.h)}validateSize(t){d(h,t,a.root)}watchOptions(t){this.optionsState=p(t)}watchValue(t){this.selectedOptionsState=p(t)}componentDidLoad(){this.attributeObserver=new m(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(b);this.initAutocomplete()}componentWillLoad(){this.validateSize(this.size);this.optionsState=p(this.options);this.selectedOptionsState=p(this.value)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,i){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:i})}getAvailableOptions(t=false){if(Array.isArray(this.optionsState)&&this.optionsState.length){if(t){return this.optionsState}return this.optionsState.filter((t=>{const i=this.selectedValueIndex(t.value);return i!==-1||(t===null||t===void 0?void 0:t.disabled)?false:true})).map((t=>{var i;return{name:(i=t.label)!==null&&i!==void 0?i:t.value,value:t.value}}))}return Array.from(this.selectRef.querySelectorAll("option")).filter((i=>{if(t){return true}const s=this.selectedValueIndex(i.value);return!(i.disabled||i.selected||s>-1)})).map((t=>({name:t.textContent,value:t.value})))}initAutocomplete(){var t,i,s,e,o;(t=this.autocompleteRef)===null||t===void 0?void 0:t.addEventListener("gov-select",this.onSelectHandler.bind(this));(i=this.autocompleteRef)===null||i===void 0?void 0:i.addEventListener("gov-input",this.onInputHandler.bind(this));(s=this.autocompleteRef)===null||s===void 0?void 0:s.addEventListener("gov-focus",this.onFocusHandler.bind(this));(e=this.autocompleteRef)===null||e===void 0?void 0:e.addEventListener("gov-blur",this.onBlurHandler.bind(this));(o=this.autocompleteRef)===null||o===void 0?void 0:o.setSearchCallback((t=>new Promise((i=>{const s=this.getAvailableOptions();if(String(t).length===0){return i(s)}i(s.filter((({label:i,value:s})=>{if(!i)i=s;return f(i).toLowerCase().indexOf(f(t).toLowerCase())>-1})))})))).finally()}selectedValueIndex(t){return this.selectedOptionsState.findIndex((i=>i===t))}getOptionElement(t){return this.selectRef.querySelector('option[value="'+t+'"]')}getOption(t){var i;return(i=this.getAvailableOptions(true).find((i=>i.value===t)))!==null&&i!==void 0?i:null}selectOption(t,i=true){const s=this.selectedValueIndex(t);if(s===-1){this.selectedOptionsState=[...this.selectedOptionsState,t];this.value=this.selectedOptionsState;if(i){this.govChange.emit({component:a.root,value:this.selectedOptionsState});this.govSelect.emit({component:a.root,value:this.selectedOptionsState})}const s=this.getOptionElement(t);if(s){s.selected=true}}}removeOption(t,i=true){const s=this.selectedValueIndex(t);if(s!==-1){this.selectedOptionsState.splice(s,1);this.selectedOptionsState=[...this.selectedOptionsState];this.value=this.selectedOptionsState;if(i){this.govChange.emit({component:a.root,value:this.selectedOptionsState});this.govRemove.emit({component:a.root,value:this.selectedOptionsState})}const e=this.getOptionElement(t);if(e){e.selected=false}}}async componentDidRender(){this.f.passAttrToLabel("required",String(this.required));v((()=>{this.selectRef.querySelectorAll("option").forEach((t=>{if(t.selected){this.selectOption(t.value,false)}}))}))}render(){return s(e,{key:"11352c6950674badb00870e18c17a031c81235df",class:a.root,size:this.size},s("div",{key:"edd74cbfbbf116700dfdcd7d33307c6416e2ad8c",class:a.wrap},this.h.hasSlot("prefix")&&s("slot",{key:"6aa65aa9875527890bfecb2a1e6c56b2eb9ce827",name:"prefix"}),s("gov-form-autocomplete",{key:"60c5065ccb09073c2e1ca17c329f980cda52761f",value:this.valueState,disabled:this.disabled,identifier:this.identifier||this.selectId,required:false,invalid:this.invalid,success:this.success,size:this.size,placeholder:this.placeholder,"message-empty":this.messageEmpty,"message-loading":this.messageLoading,ref:t=>this.autocompleteRef=t,minlength:0,"aria-owns":this.listId},this.success&&s("gov-icon",{key:"907aac2768a9bd5384326377fcad9e90795ff170",slot:"validation-icon",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&s("gov-icon",{key:"7294050c2910097d6a316b37fdc1f571f3450f8a",slot:"validation-icon",class:"validation-icon",name:"exclamation-lg",type:"components"}),s("gov-icon",{key:"ac4474f517f8124831c22055e69d0eb45e6e2d4f",slot:"icon-end",class:"arrow-icon",name:"chevron-down",type:"components"})),s("select",Object.assign({key:"9437199c079132409bdbf0f932605474b885781e",hidden:true,class:"hidden-select-list","aria-hidden":l(true),multiple:true,required:this.required,name:this.name,disabled:this.disabled,ref:t=>this.selectRef=t},this.inheritedAttributes,{"aria-disabled":c(this.disabled),"aria-required":c(this.required),"aria-invalid":c(this.invalid)}),s("slot",{key:"59f4071b90b40ed6291b9180b5caa29101b5e95a"}),Array.isArray(this.optionsState)&&this.optionsState.map((t=>{var i;const e=this.selectedValueIndex(t.value);return s("option",{value:t.value,selected:e>-1,disabled:t===null||t===void 0?void 0:t.disabled},(i=t.label)!==null&&i!==void 0?i:t.value)}))),this.h.hasSlot("sufix")&&s("slot",{key:"0620c4ab3b9d9d122456f91cc3dd5cefd85e8bba",name:"sufix"})),this.hideSelectedList===false?s("ul",{role:"listbox",id:this.listId,class:a.list},Array.isArray(this.selectedOptionsState)&&this.selectedOptionsState.map((t=>{var i,e;const o=this.getOption(t);if(!o)return null;return s("li",{class:a.item,role:"option"},(i=o.label)!==null&&i!==void 0?i:o.value,s("gov-button",{"aria-label":(e="Odebrat vybranou položku "+o.label)!==null&&e!==void 0?e:o.value,color:"primary",type:"base",size:this.size,"on-gov-click":()=>this.onTagRemove(t)},s("gov-icon",{name:"x-lg",type:"components"})))}))):null)}onFocusHandler(t){t.stopPropagation();this.focused=true;this.govFocus.emit({component:a.root,originalEvent:t,value:this.selectedOptionsState})}onBlurHandler(t){t.stopPropagation();t.stopPropagation();this.focused=false;this.govBlur.emit({component:a.root,originalEvent:t,value:this.selectedOptionsState})}onInputHandler(t){this.valueState=t.detail.value;t.stopPropagation()}onSelectHandler(t){t.stopPropagation();const i=t.detail.selected;this.selectOption(i.value);this.valueState="";this.autocompleteRef.clearValue().finally();this.autocompleteRef.focus()}onTagRemove(t){this.removeOption(t)}async setFocus(t){return this.selectRef.focus(t)}async setValue(t){this.valueState=t}async getRef(){return this.selectRef}get host(){return o(this)}static get watchers(){return{size:["validateSize"],options:["watchOptions"],value:["watchValue"]}}};export{g as gov_form_multi_select};
2
+ //# sourceMappingURL=p-c916d0d2.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GovFormMultiSelect","constructor","hostRef","this","selectId","createID","listId","h","govHost","host","f","govForm","validateSize","newValue","validateProp","FormMultiselectSizes","FormMultiSelectClass","root","watchOptions","optionsState","propsValueToArray","watchValue","selectedOptionsState","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","initAutocomplete","componentWillLoad","size","options","value","disconnectedCallback","stopObserving","removeAttribute","inheritedAttributes","Object","assign","getAvailableOptions","ignoreFilter","Array","isArray","length","filter","option","selectedIndex","selectedValueIndex","disabled","map","_a","name","label","from","selectRef","querySelectorAll","selected","textContent","autocompleteRef","addEventListener","onSelectHandler","bind","_b","onInputHandler","_c","onFocusHandler","_d","onBlurHandler","_e","setSearchCallback","searchString","Promise","resolve","data","String","removeDiacritics","toLowerCase","indexOf","finally","findIndex","getOptionElement","querySelector","getOption","find","selectOption","newOption","notify","index","govChange","emit","component","govSelect","removeOption","splice","govRemove","componentDidRender","passAttrToLabel","required","tick","forEach","render","Host","key","class","wrap","hasSlot","valueState","identifier","invalid","success","placeholder","messageEmpty","messageLoading","ref","el","minlength","slot","type","hidden","toBoolAttr","multiple","toBoolAttrIfDefined","selectedOption","hideSelectedList","role","id","list","item","color","onTagRemove","e","stopPropagation","focused","govFocus","originalEvent","govBlur","detail","clearValue","focus","setFocus","setValue","getRef"],"sources":["../../../packages/core/src/components/gov-form/multiselect/gov-form-multi-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 {Nullable} from '../../../types/interfaces'\nimport {createID, removeDiacritics} from '../../../utils/string.utils'\nimport {FormAutocompleteEvent} from '../autocomplete/gov-form-autocomplete.types'\nimport {FormMultiSelectClass, FormMultiselectSizes, FormMultiselectSizesType} from './constants'\nimport {\n\tFormMultiselectEvent,\n\tGovFormMultiSelectItem,\n\tGovFormMultiSelectSelectedItem\n} from './gov-form-multi-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\";\n\n@Component({\n\ttag: 'gov-form-multi-select',\n})\nexport class GovFormMultiSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\n\tprivate selectRef?: HTMLSelectElement\n\tprivate autocompleteRef?: HTMLGovFormAutocompleteElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly selectId: string\n\tprivate readonly listId: string\n\n\tconstructor() {\n\t\tthis.selectId = createID('GovSelect')\n\t\tthis.listId = createID('GovMultiList')\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of multi-select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string | GovFormMultiSelectSelectedItem[]\n\t/**\n\t * Options of multi-select\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | GovFormMultiSelectItem[]\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Custom select placeholder.\n\t */\n\t@Prop({attribute: 'placeholder'}) readonly placeholder: string\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormMultiselectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Option to hide the list of selected items\n\t */\n\t@Prop({attribute: 'hide-selected-list'}) readonly hideSelectedList: boolean = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop({reflect:true}) readonly invalid: boolean\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 * Custom message for when there is a blank sheet\n\t */\n\t@Prop({attribute: 'message-empty'}) readonly messageEmpty: string = 'Nebyly nalezeny žádné výsledky'\n\t/**\n\t * Custom message for when data is loaded\n\t */\n\t@Prop({attribute: 'message-loading'}) readonly messageLoading: string = 'Načítám...'\n\t/**\n\t * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormMultiselectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormMultiselectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormMultiselectEvent>\n\t/**\n\t * Emitted when an item is selected\n\t */\n\t@Event({eventName: 'gov-select'}) govSelect: EventEmitter<FormMultiselectEvent>\n\t/**\n\t * Emitted when an item is removed\n\t */\n\t@Event({eventName: 'gov-remove'}) govRemove: EventEmitter<FormMultiselectEvent>\n\n\t@State() focused: boolean\n\t@State() valueState: string\n\t@State() selectedOptionsState: GovFormMultiSelectSelectedItem[] = []\n\t@State() optionsState: GovFormMultiSelectItem[] = []\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormMultiselectSizes, newValue, FormMultiSelectClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | GovFormMultiSelectItem[]): void {\n\t\tthis.optionsState = propsValueToArray(newValue)\n\t}\n\n\t@Watch('value')\n\twatchValue(newValue: string | GovFormMultiSelectItem[]): void {\n\t\tthis.selectedOptionsState = propsValueToArray(newValue)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\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\tthis.initAutocomplete()\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\t\tthis.optionsState = propsValueToArray(this.options)\n\t\tthis.selectedOptionsState = propsValueToArray(this.value)\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate getAvailableOptions(ignoreFilter = false): GovFormMultiSelectItem[] {\n\t\tif (Array.isArray(this.optionsState) && this.optionsState.length) {\n\t\t\tif (ignoreFilter) {\n\t\t\t\treturn this.optionsState;\n\t\t\t}\n\t\t\treturn this.optionsState.filter((option) => {\n\t\t\t\tconst selectedIndex = this.selectedValueIndex(option.value)\n\t\t\t\treturn (selectedIndex !== -1 || option?.disabled) ? false : true\n\t\t\t}).map((option) => ({name: option.label ?? option.value, value: option.value}))\n\t\t}\n\t\treturn Array.from(this.selectRef.querySelectorAll('option'))\n\t\t\t.filter((option: HTMLOptionElement) => {\n\t\t\t\tif (ignoreFilter) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\tconst selectedIndex = this.selectedValueIndex(option.value)\n\t\t\t\treturn !(option.disabled || option.selected || selectedIndex > -1)\n\t\t\t})\n\t\t\t.map((option: HTMLOptionElement) => ({name: option.textContent, value: option.value}))\n\t}\n\n\tprivate initAutocomplete() {\n\t\tthis.autocompleteRef?.addEventListener('gov-select', this.onSelectHandler.bind(this))\n\t\tthis.autocompleteRef?.addEventListener('gov-input', this.onInputHandler.bind(this))\n\t\tthis.autocompleteRef?.addEventListener('gov-focus', this.onFocusHandler.bind(this))\n\t\tthis.autocompleteRef?.addEventListener('gov-blur', this.onBlurHandler.bind(this))\n\t\tthis.autocompleteRef\n\t\t\t?.setSearchCallback(searchString => {\n\t\t\t\treturn new Promise(resolve => {\n\t\t\t\t\tconst data = this.getAvailableOptions()\n\t\t\t\t\tif (String(searchString).length === 0) {\n\t\t\t\t\t\treturn resolve(data)\n\t\t\t\t\t}\n\t\t\t\t\tresolve(\n\t\t\t\t\t\tdata.filter(({label, value}) => {\n\t\t\t\t\t\t\tif (!label) label = value;\n\t\t\t\t\t\t\treturn removeDiacritics(label).toLowerCase().indexOf(removeDiacritics(searchString).toLowerCase()) > -1\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t})\n\t\t\t})\n\t\t\t.finally()\n\t}\n\n\tprivate selectedValueIndex(value: GovFormMultiSelectSelectedItem) {\n\t\treturn this.selectedOptionsState.findIndex((selected) => selected === value)\n\t}\n\n\tprivate getOptionElement(value: GovFormMultiSelectSelectedItem): Nullable<HTMLOptionElement> {\n\t\treturn this.selectRef.querySelector('option[value=\"' + value + '\"]') as HTMLOptionElement\n\t}\n\n\tprivate getOption(value: GovFormMultiSelectSelectedItem): GovFormMultiSelectItem | null {\n\t\treturn this.getAvailableOptions(true).find((option) => option.value === value) ?? null;\n\t}\n\n\tprivate selectOption(newOption: GovFormMultiSelectSelectedItem, notify = true) {\n\t\tconst index = this.selectedValueIndex(newOption)\n\t\tif (index === -1) {\n\t\t\tthis.selectedOptionsState = [...this.selectedOptionsState, newOption]\n\t\t\tthis.value = this.selectedOptionsState;\n\t\t\tif (notify) {\n\t\t\t\tthis.govChange.emit({\n\t\t\t\t\tcomponent: FormMultiSelectClass.root,\n\t\t\t\t\tvalue: this.selectedOptionsState,\n\t\t\t\t})\n\t\t\t\tthis.govSelect.emit({\n\t\t\t\t\tcomponent: FormMultiSelectClass.root,\n\t\t\t\t\tvalue: this.selectedOptionsState,\n\t\t\t\t})\n\t\t\t}\n\t\t\tconst option = this.getOptionElement(newOption)\n\t\t\tif (option) {\n\t\t\t\toption.selected = true\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate removeOption(removeOption: GovFormMultiSelectSelectedItem, notify = true) {\n\t\tconst index = this.selectedValueIndex(removeOption)\n\t\tif (index !== -1) {\n\t\t\tthis.selectedOptionsState.splice(index, 1)\n\t\t\tthis.selectedOptionsState = [...this.selectedOptionsState]\n\t\t\tthis.value = this.selectedOptionsState;\n\t\t\tif (notify) {\n\t\t\t\tthis.govChange.emit({\n\t\t\t\t\tcomponent: FormMultiSelectClass.root,\n\t\t\t\t\tvalue: this.selectedOptionsState,\n\t\t\t\t})\n\t\t\t\tthis.govRemove.emit({\n\t\t\t\t\tcomponent: FormMultiSelectClass.root,\n\t\t\t\t\tvalue: this.selectedOptionsState,\n\t\t\t\t})\n\t\t\t}\n\t\t\tconst option = this.getOptionElement(removeOption)\n\t\t\tif (option) {\n\t\t\t\toption.selected = false\n\t\t\t}\n\t\t}\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\n\t\ttick(() => {\n\t\t\tthis.selectRef.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\t\tif (option.selected) {\n\t\t\t\t\tthis.selectOption(option.value, false)\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormMultiSelectClass.root} size={this.size}>\n\t\t\t\t<div class={FormMultiSelectClass.wrap}>\n\t\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t\t<gov-form-autocomplete\n\t\t\t\t\t\tvalue={this.valueState}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tidentifier={this.identifier || this.selectId}\n\t\t\t\t\t\trequired={false}\n\t\t\t\t\t\tinvalid={this.invalid}\n\t\t\t\t\t\tsuccess={this.success}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tmessage-empty={this.messageEmpty}\n\t\t\t\t\t\tmessage-loading={this.messageLoading}\n\t\t\t\t\t\tref={el => (this.autocompleteRef = el as HTMLGovFormAutocompleteElement)}\n\t\t\t\t\t\tminlength={0}\n\t\t\t\t\t\taria-owns={this.listId}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.success && <gov-icon slot=\"validation-icon\" class=\"validation-icon\" name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t{this.invalid && <gov-icon slot=\"validation-icon\" class=\"validation-icon\" name=\"exclamation-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t<gov-icon slot=\"icon-end\" class=\"arrow-icon\" name=\"chevron-down\" type=\"components\"></gov-icon>\n\t\t\t\t\t</gov-form-autocomplete>\n\t\t\t\t\t<select\n\t\t\t\t\t\thidden\n\t\t\t\t\t\tclass={'hidden-select-list'}\n\t\t\t\t\t\taria-hidden={toBoolAttr(true)}\n\t\t\t\t\t\tmultiple\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\tconst selectedOption = this.selectedValueIndex(option.value);\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={selectedOption > -1}\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.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t\t</div>\n\t\t\t\t{this.hideSelectedList === false ? (\n\t\t\t\t\t<ul role=\"listbox\" id={this.listId} class={FormMultiSelectClass.list}>\n\t\t\t\t\t\t{Array.isArray(this.selectedOptionsState) && this.selectedOptionsState.map(selected => {\n\t\t\t\t\t\t\tconst option = this.getOption(selected);\n\t\t\t\t\t\t\tif (!option) return null\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<li class={FormMultiSelectClass.item} role=\"option\">\n\t\t\t\t\t\t\t\t\t{option.label ?? option.value}\n\t\t\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\t\t\taria-label={'Odebrat vybranou položku ' + option.label ?? option.value}\n\t\t\t\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onTagRemove(selected)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<gov-icon name=\"x-lg\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</ul>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormMultiSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.selectedOptionsState,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\te.stopPropagation()\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormMultiSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.selectedOptionsState,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: CustomEvent<FormAutocompleteEvent>) {\n\t\tthis.valueState = e.detail.value\n\t\te.stopPropagation()\n\t}\n\n\tprivate onSelectHandler(e: CustomEvent<FormAutocompleteEvent>) {\n\t\te.stopPropagation()\n\t\tconst value = e.detail.selected\n\t\tthis.selectOption(value.value)\n\t\tthis.valueState = ''\n\t\tthis.autocompleteRef.clearValue().finally()\n\t\tthis.autocompleteRef.focus()\n\t}\n\n\tprivate onTagRemove(removeOption: GovFormMultiSelectSelectedItem) {\n\t\tthis.removeOption(removeOption)\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 * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.valueState = value\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":"uiBAuBaA,EAAkB,MAW9B,WAAAC,CAAAC,G,6SA4BmD,I,0CAQ2B,M,cAKzC,M,cAKe,M,gEAYgB,iC,oBAII,a,2EAwBN,G,kBAChB,G,yBAiBP,GAvG1CC,KAAKC,SAAWC,EAAS,aACzBF,KAAKG,OAASD,EAAS,gBAEvBF,KAAKI,EAAIC,EAAQL,KAAKM,MACtBN,KAAKO,EAAIC,EAAQR,KAAKI,E,CAqFvB,YAAAK,CAAaC,GACZC,EAAaC,EAAsBF,EAAUG,EAAqBC,K,CAInE,YAAAC,CAAaL,GACZV,KAAKgB,aAAeC,EAAkBP,E,CAIvC,UAAAQ,CAAWR,GACVV,KAAKmB,qBAAuBF,EAAkBP,E,CAK/C,gBAAAU,GACCpB,KAAKqB,kBAAoB,IAAIC,EAAkBtB,KAAKM,MAAM,CAACiB,EAAeb,KACzEV,KAAKwB,sBAAsBD,EAAeb,EAAS,IAGpDV,KAAKqB,kBAAkBI,eAAeC,GACtC1B,KAAK2B,kB,CAGN,iBAAAC,GACC5B,KAAKS,aAAaT,KAAK6B,MACvB7B,KAAKgB,aAAeC,EAAkBjB,KAAK8B,SAC3C9B,KAAKmB,qBAAuBF,EAAkBjB,KAAK+B,M,CAGpD,oBAAAC,GACChC,K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/B,KAAKyG,WAAa1E,C,CAOnB,YAAM6G,GACL,OAAO5I,KAAKqD,S","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as t,c as s,h as i,a as o,g as e}from"./p-8506b611.js";import{v as a}from"./p-a2435993.js";import{C as c}from"./p-5aad3497.js";import{p as h}from"./p-e0e2e9c1.js";import{g as r}from"./p-ea7fdd2e.js";import{c as d}from"./p-cd6c2938.js";import{A as n,a as l}from"./p-9ac55bd1.js";import{i as f}from"./p-d9a299a4.js";import"./p-20c2203a.js";const m=h(c,["PRIMARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);var p;(function(t){t["BOLD"]="bold";t["SUBTLE"]="subtle"})(p||(p={}));const b={root:"gov-toast",hidden:"gov-toast--hidden",content:"gov-toast__content",icon:"gov-toast__icon",close:"gov-toast__close",timer:"gov-toast__timer"};const u=class{constructor(i){t(this,i);this.govClose=s(this,"gov-close",7);this.color="primary";this.gravity="top";this.position="right";this.type="bold";this.time=0;this.closeLabel=undefined;this.accessibleCloseLabel=undefined;this.inheritedAttributes={};this.h=r(this.host);this.toastId=d("GovToast")}validateColor(t){a(m,t,b.root)}componentDidLoad(){this.attributeObserver=new n(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(l)}componentWillLoad(){this.validateColor(this.color);this.runTimer();this.inheritedAttributes=f(this.host)}disconnectedCallback(){clearTimeout(this.timeout);this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}runTimer(){if(this.isTimer){this.timeout=setTimeout((()=>{this.host.classList.add(b.hidden);setTimeout((()=>{this.destroy().catch();this.govClose.emit(this.toastId)}),600)}),this.time)}}render(){return i(o,{key:"897da92a579e5854078657783d54c4fcca1f0311",class:this.h.classes(b.root),"data-toast-id":this.toastId,gravity:this.gravity,position:this.position,color:this.color,type:this.type,style:{"--toast-duration":this.time+"ms"}},this.h.hasSlot("icon")&&i("span",{key:"50b2dde54f6e566f95c81bbd5dd6c27870338a70",class:b.icon},i("slot",{key:"f47d01268f3098f56b064fc41dc18bab64771073",name:"icon"})),i("div",Object.assign({key:"4e508603bd41bc5375ecf2d84e5a1df239fcc6c4",class:b.content},this.inheritedAttributes,{"aria-live":"polite",role:"status"}),i("slot",{key:"ff7e107c1486319621a1832bdcc0387f56dc56db"})),i("gov-button",{key:"dfe2964f40d66df0335219b9bc66f5a316ecf8ca",size:"s","aria-label":this.accessibleCloseLabel,color:this.isBold?this.color:"neutral",type:"base","on-gov-click":this.onCloseHandler.bind(this),class:b.close},this.closeLabel?this.closeLabel:i("gov-icon",{name:"x-lg",type:"components"})),i("div",{key:"5f0c872a74f8cac07431903519ecc191322d4397",class:b.timer}))}onCloseHandler(){this.govClose.emit(this.toastId);this.destroy().catch()}get isBold(){return this.type==="bold"}get isTimer(){return Number.isInteger(this.time)&&this.time>0}async destroy(){clearTimeout(this.timeout);const t=document.querySelector(`[data-toast-id="${this.toastId}"]`);if(t){t.classList.add(b.hidden);if(typeof t.remove==="function"){t.remove()}}}get host(){return e(this)}static get watchers(){return{color:["validateColor"]}}};export{u as gov_toast};
2
- //# sourceMappingURL=p-c4ffcc37.entry.js.map
1
+ import{r as t,c as s,h as i,a as o,g as e}from"./p-8506b611.js";import{v as a}from"./p-0b3574c2.js";import{C as c}from"./p-5aad3497.js";import{p as h}from"./p-e0e2e9c1.js";import{g as r}from"./p-ea7fdd2e.js";import{c as d}from"./p-cd6c2938.js";import{A as n,a as l}from"./p-9ac55bd1.js";import{i as f}from"./p-d9a299a4.js";import"./p-e8ec030e.js";const m=h(c,["PRIMARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);var p;(function(t){t["BOLD"]="bold";t["SUBTLE"]="subtle"})(p||(p={}));const b={root:"gov-toast",hidden:"gov-toast--hidden",content:"gov-toast__content",icon:"gov-toast__icon",close:"gov-toast__close",timer:"gov-toast__timer"};const u=class{constructor(i){t(this,i);this.govClose=s(this,"gov-close",7);this.color="primary";this.gravity="top";this.position="right";this.type="bold";this.time=0;this.closeLabel=undefined;this.accessibleCloseLabel=undefined;this.inheritedAttributes={};this.h=r(this.host);this.toastId=d("GovToast")}validateColor(t){a(m,t,b.root)}componentDidLoad(){this.attributeObserver=new n(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(l)}componentWillLoad(){this.validateColor(this.color);this.runTimer();this.inheritedAttributes=f(this.host)}disconnectedCallback(){clearTimeout(this.timeout);this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}runTimer(){if(this.isTimer){this.timeout=setTimeout((()=>{this.host.classList.add(b.hidden);setTimeout((()=>{this.destroy().catch();this.govClose.emit(this.toastId)}),600)}),this.time)}}render(){return i(o,{key:"897da92a579e5854078657783d54c4fcca1f0311",class:this.h.classes(b.root),"data-toast-id":this.toastId,gravity:this.gravity,position:this.position,color:this.color,type:this.type,style:{"--toast-duration":this.time+"ms"}},this.h.hasSlot("icon")&&i("span",{key:"50b2dde54f6e566f95c81bbd5dd6c27870338a70",class:b.icon},i("slot",{key:"f47d01268f3098f56b064fc41dc18bab64771073",name:"icon"})),i("div",Object.assign({key:"4e508603bd41bc5375ecf2d84e5a1df239fcc6c4",class:b.content},this.inheritedAttributes,{"aria-live":"polite",role:"status"}),i("slot",{key:"ff7e107c1486319621a1832bdcc0387f56dc56db"})),i("gov-button",{key:"dfe2964f40d66df0335219b9bc66f5a316ecf8ca",size:"s","aria-label":this.accessibleCloseLabel,color:this.isBold?this.color:"neutral",type:"base","on-gov-click":this.onCloseHandler.bind(this),class:b.close},this.closeLabel?this.closeLabel:i("gov-icon",{name:"x-lg",type:"components"})),i("div",{key:"5f0c872a74f8cac07431903519ecc191322d4397",class:b.timer}))}onCloseHandler(){this.govClose.emit(this.toastId);this.destroy().catch()}get isBold(){return this.type==="bold"}get isTimer(){return Number.isInteger(this.time)&&this.time>0}async destroy(){clearTimeout(this.timeout);const t=document.querySelector(`[data-toast-id="${this.toastId}"]`);if(t){t.classList.add(b.hidden);if(typeof t.remove==="function"){t.remove()}}}get host(){return e(this)}static get watchers(){return{color:["validateColor"]}}};export{u as gov_toast};
2
+ //# sourceMappingURL=p-ccec8019.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as s,h as t,a as e,g as o}from"./p-8506b611.js";import{v as a}from"./p-0b3574c2.js";import{C as r}from"./p-5aad3497.js";import{p as c}from"./p-e0e2e9c1.js";import{g as i}from"./p-ea7fdd2e.js";import"./p-e8ec030e.js";c(r,["PRIMARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);var f;(function(s){s["BOLD"]="bold";s["SUBTLE"]="subtle"})(f||(f={}));const d={root:"gov-message",content:"gov-message__content"};const n=class{constructor(t){s(this,t);this.color=r.PRIMARY;this.type="subtle";this.h=i(this.host)}validateColor(s){a(r,s,d.root)}render(){return t(e,{key:"e9250a61d94bf14a9d32eef5a69a9347df89a1e2",class:this.h.classes(d.root),color:this.color,type:this.type,role:"status"},this.h.hasSlot("icon")&&t("slot",{key:"00a69ab91656245790d88c02cbaa14d365f48140",name:"icon"}),t("div",{key:"c95cb839c2f24f744aff2a9580c44c18102d1fc9",class:d.content},t("slot",{key:"71d8d21cff90b5498940d99947d62fec1f400f1e"})))}get host(){return o(this)}static get watchers(){return{color:["validateColor"]}}};export{n as gov_message};
2
+ //# sourceMappingURL=p-cd2d335d.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["pick","Colors","MessageType","MessageClass","root","content","GovMessage","constructor","hostRef","PRIMARY","this","h","govHost","host","validateColor","newValue","validateProp","render","Host","key","class","classes","color","type","role","hasSlot","name"],"sources":["../../../packages/core/src/components/gov-message/constants.ts","../../../packages/core/src/components/gov-message/gov-message.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const MessageColors = pick(Colors, ['PRIMARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING'])\nexport type MessageColorType = `${ValueOf<typeof MessageColors>}`\n\nexport enum MessageType {\n\tBOLD = 'bold',\n\tSUBTLE = 'subtle',\n}\nexport type MessageTypesType = `${ValueOf<typeof MessageType>}`\n\nexport const MessageClass = {\n\troot: 'gov-message',\n\tcontent: 'gov-message__content',\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { MessageTypesType, MessageClass, MessageColorType} from \"./constants\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { Colors } from \"../../core/constants/colors\"\n\n@Component({\n\ttag: \"gov-message\",\n})\nexport class GovMessage {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovMessageElement\n\n\t/**\n\t * Style variation of the content message.\n\t */\n\t@Prop() readonly color: MessageColorType = Colors.PRIMARY\n\t/**\n\t * Message type\n\t */\n\t@Prop() readonly type?: MessageTypesType = \"subtle\"\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(Colors, newValue, MessageClass.root)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(MessageClass.root)} color={this.color} type={this.type} role=\"status\">\n\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t)}\n\n\t\t\t\t<div class={MessageClass.content}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"4NAI6BA,EAAKC,EAAQ,CAAC,UAAW,UAAW,QAAS,UAAW,YAGrF,IAAYC,GAAZ,SAAYA,GACXA,EAAA,eACAA,EAAA,kBACA,EAHD,CAAYA,MAAW,KAMhB,MAAMC,EAAe,CAC3BC,KAAM,cACNC,QAAS,wB,MCLGC,EAAU,MAGtB,WAAAC,CAAAC,G,qBAS2CP,EAAOQ,Q,UAIP,SAZ1CC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAevB,aAAAC,CAAcC,GACbC,EAAaf,EAAQc,EAAUZ,EAAaC,K,CAG7C,MAAAa,GACC,OACCN,EAACO,EAAI,CAAAC,IAAA,2CAACC,MAAOV,KAAKC,EAAEU,QAAQlB,EAAaC,MAAOkB,MAAOZ,KAAKY,MAAOC,KAAMb,KAAKa,KAAMC,KAAK,UACvFd,KAAKC,EAAEc,QAAQ,SACfd,EAAA,QAAAQ,IAAA,2CAAMO,KAAK,SAGZf,EAAA,OAAAQ,IAAA,2CAAKC,MAAOjB,EAAaE,SACxBM,EAAA,QAAAQ,IAAA,8C","ignoreList":[]}
1
+ {"version":3,"names":["pick","Colors","MessageType","MessageClass","root","content","GovMessage","constructor","hostRef","PRIMARY","this","h","govHost","host","validateColor","newValue","validateProp","render","Host","key","class","classes","color","type","role","hasSlot","name"],"sources":["../../../packages/core/src/components/gov-message/constants.ts","../../../packages/core/src/components/gov-message/gov-message.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const MessageColors = pick(Colors, ['PRIMARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING'])\nexport type MessageColorType = `${ValueOf<typeof MessageColors>}`\n\nexport enum MessageType {\n\tBOLD = 'bold',\n\tSUBTLE = 'subtle',\n}\nexport type MessageTypesType = `${ValueOf<typeof MessageType>}`\n\nexport const MessageClass = {\n\troot: 'gov-message',\n\tcontent: 'gov-message__content',\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { MessageTypesType, MessageClass, MessageColorType} from \"./constants\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { Colors } from \"../../core/constants/colors\"\n\n@Component({\n\ttag: \"gov-message\",\n})\nexport class GovMessage {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovMessageElement\n\n\t/**\n\t * Style variation of the content message.\n\t */\n\t@Prop() readonly color: MessageColorType = Colors.PRIMARY\n\t/**\n\t * Message type\n\t */\n\t@Prop() readonly type?: MessageTypesType = \"subtle\"\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(Colors, newValue, MessageClass.root)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(MessageClass.root)} color={this.color} type={this.type} role=\"status\">\n\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t)}\n\n\t\t\t\t<div class={MessageClass.content}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"iOAI6BA,EAAKC,EAAQ,CAAC,UAAW,UAAW,QAAS,UAAW,YAGrF,IAAYC,GAAZ,SAAYA,GACXA,EAAA,eACAA,EAAA,kBACA,EAHD,CAAYA,MAAW,KAMhB,MAAMC,EAAe,CAC3BC,KAAM,cACNC,QAAS,wB,MCLGC,EAAU,MAGtB,WAAAC,CAAAC,G,qBAS2CP,EAAOQ,Q,UAIP,SAZ1CC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAevB,aAAAC,CAAcC,GACbC,EAAaf,EAAQc,EAAUZ,EAAaC,K,CAG7C,MAAAa,GACC,OACCN,EAACO,EAAI,CAAAC,IAAA,2CAACC,MAAOV,KAAKC,EAAEU,QAAQlB,EAAaC,MAAOkB,MAAOZ,KAAKY,MAAOC,KAAMb,KAAKa,KAAMC,KAAK,UACvFd,KAAKC,EAAEc,QAAQ,SACfd,EAAA,QAAAQ,IAAA,2CAAMO,KAAK,SAGZf,EAAA,OAAAQ,IAAA,2CAAKC,MAAOjB,EAAaE,SACxBM,EAAA,QAAAQ,IAAA,8C","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as s,c as t,h as e,a as i,g as a}from"./p-8506b611.js";import{v as r}from"./p-c52afdfc.js";import{c as h}from"./p-20c2203a.js";import{g as o}from"./p-ea7fdd2e.js";import{t as c}from"./p-26618322.js";import"./p-cd6c2938.js";import"./p-2aedc81e.js";import"./p-e0e2e9c1.js";const n={root:"gov-breadcrumbs"};const d=class{constructor(e){s(this,e);this.govChange=t(this,"gov-change",7);this.inited=false;this.collapsible=false;this.isExpanded=false;this.accessibleLabel=undefined;this.accessibleLabelledBy=undefined;this.accessibleToggleLabel="Zobrazit či skrýt navigaci";this.expanded=false;this.toggleOption=false;this.h=o(this.host)}async componentDidRender(){this.scheduleContentVerification();if(h()){c((()=>this.validateAccessibility()))}}scheduleContentVerification(){if(this.inited)return;this.inited=true;c((()=>{this.calculateWidthOfItems();this.inited=false}))}calculateWidthOfItems(){const s=this.host.getBoundingClientRect().width;let t=0;this.host.querySelectorAll("li").forEach((s=>{t+=s.getBoundingClientRect().width}));this.toggleOption=t>s}render(){return e(i,{key:"81d7a8e273e1ce4740ee35ebe4a570ee8c5e73a4",class:this.h.classes(n.root),expanded:this.expanded},e("nav",{key:"dc37fa314f5d84c6c517f64229ef601b256f3ad5","aria-label":this.accessibleLabel,"aria-labelledby":this.accessibleLabelledBy},e("slot",{key:"4ead548352e642c0994360d74a98123782790a04"})),this.toggleOption?e("gov-button",{size:"xs",color:"primary",type:"base","aria-label":this.accessibleToggleLabel,"aria-pressed":this.expanded,"aria-expanded":this.expanded,"on-gov-click":()=>this.expanded=!this.expanded},e("gov-icon",{name:this.expanded?"chevron-up":"chevron-down",type:"components"})):null)}async validateAccessibility(){r(this.accessibleLabel,this.accessibleLabelledBy,n.root,this.host);r(this.accessibleToggleLabel,undefined,n.root,this.host)}get host(){return a(this)}};export{d as gov_breadcrumbs};
2
- //# sourceMappingURL=p-e2517a72.entry.js.map
1
+ import{r as s,c as e,h as t,a as i,g as a}from"./p-8506b611.js";import{v as r}from"./p-29ac15d2.js";import{c as h}from"./p-e8ec030e.js";import{g as o}from"./p-ea7fdd2e.js";import{t as c}from"./p-26618322.js";import"./p-cd6c2938.js";import"./p-2aedc81e.js";import"./p-e0e2e9c1.js";const n={root:"gov-breadcrumbs"};const d=class{constructor(t){s(this,t);this.govChange=e(this,"gov-change",7);this.inited=false;this.collapsible=false;this.isExpanded=false;this.accessibleLabel=undefined;this.accessibleLabelledBy=undefined;this.accessibleToggleLabel="Zobrazit či skrýt navigaci";this.expanded=false;this.toggleOption=false;this.h=o(this.host)}async componentDidRender(){this.scheduleContentVerification();if(h()){c((()=>this.validateAccessibility()))}}scheduleContentVerification(){if(this.inited)return;this.inited=true;c((()=>{this.calculateWidthOfItems();this.inited=false}))}calculateWidthOfItems(){const s=this.host.getBoundingClientRect().width;let e=0;this.host.querySelectorAll("li").forEach((s=>{e+=s.getBoundingClientRect().width}));this.toggleOption=e>s}render(){return t(i,{key:"81d7a8e273e1ce4740ee35ebe4a570ee8c5e73a4",class:this.h.classes(n.root),expanded:this.expanded},t("nav",{key:"dc37fa314f5d84c6c517f64229ef601b256f3ad5","aria-label":this.accessibleLabel,"aria-labelledby":this.accessibleLabelledBy},t("slot",{key:"4ead548352e642c0994360d74a98123782790a04"})),this.toggleOption?t("gov-button",{size:"xs",color:"primary",type:"base","aria-label":this.accessibleToggleLabel,"aria-pressed":this.expanded,"aria-expanded":this.expanded,"on-gov-click":()=>this.expanded=!this.expanded},t("gov-icon",{name:this.expanded?"chevron-up":"chevron-down",type:"components"})):null)}async validateAccessibility(){r(this.accessibleLabel,this.accessibleLabelledBy,n.root,this.host);r(this.accessibleToggleLabel,undefined,n.root,this.host)}get host(){return a(this)}};export{d as gov_breadcrumbs};
2
+ //# sourceMappingURL=p-d836fcde.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,h as t,a as s,g as a}from"./p-8506b611.js";import{g as o}from"./p-ea7fdd2e.js";import{v as i}from"./p-a2435993.js";import{a as c,b as r}from"./p-3bbb77a0.js";import{p as n}from"./p-e0e2e9c1.js";import{S as d}from"./p-92f420cb.js";import{p as f}from"./p-016bbea6.js";import"./p-20c2203a.js";import"./p-5aad3497.js";const p=n(d,["_XS","_S","_M"]);var b;(function(e){e["BOLD"]="bold";e["SUBTLE"]="subtle"})(b||(b={}));const m={root:"gov-tag"};const h=class{constructor(t){e(this,t);this.iconStart=undefined;this.iconEnd=undefined;this.size=p._S;this.color=c.PRIMARY;this.type=undefined;this.h=o(this.host)}validateColor(e){i(c,e,m.root)}validateSize(e){i(r,e,m.root)}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size)}render(){const e=f(this.iconStart);const a=f(this.iconEnd);return t(s,{key:"c883cf9721b32aa8c06609bf09272ef196456e18",class:this.h.classes(m.root),color:this.color,size:this.size,type:this.type},t("span",{key:"614f39f6f1004d6c3ee1d0f13990a4e52dee66bc",class:"element"},t("slot",{key:"f7d4dc9576768e917a363bc7cafa86567213ea82",name:"icon-start"},e&&t("gov-icon",{key:"8d57b52a0314e8d76461872116b4ce04e546c180",type:e.type,name:e.name})),t("slot",{key:"4cd134377c3ea7843aa899b0a2962aa19f5d569e"}),t("slot",{key:"4dc1cccaced24ef26bb15e648788590a4b7d1838",name:"icon-end"},a&&t("gov-icon",{key:"7946e18900c98bdff4c610813b2422bf75b30049",type:a.type,name:a.name}))))}get host(){return a(this)}static get watchers(){return{color:["validateColor"],size:["validateSize"]}}};export{h as gov_tag};
2
- //# sourceMappingURL=p-b1efeb41.entry.js.map
1
+ import{r as e,h as t,a as s,g as a}from"./p-8506b611.js";import{g as o}from"./p-ea7fdd2e.js";import{v as i}from"./p-0b3574c2.js";import{a as c,b as r}from"./p-3bbb77a0.js";import{p as n}from"./p-e0e2e9c1.js";import{S as d}from"./p-92f420cb.js";import{p as f}from"./p-016bbea6.js";import"./p-e8ec030e.js";import"./p-5aad3497.js";const p=n(d,["_XS","_S","_M"]);var b;(function(e){e["BOLD"]="bold";e["SUBTLE"]="subtle"})(b||(b={}));const m={root:"gov-tag"};const h=class{constructor(t){e(this,t);this.iconStart=undefined;this.iconEnd=undefined;this.size=p._S;this.color=c.PRIMARY;this.type=undefined;this.h=o(this.host)}validateColor(e){i(c,e,m.root)}validateSize(e){i(r,e,m.root)}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size)}render(){const e=f(this.iconStart);const a=f(this.iconEnd);return t(s,{key:"c883cf9721b32aa8c06609bf09272ef196456e18",class:this.h.classes(m.root),color:this.color,size:this.size,type:this.type},t("span",{key:"614f39f6f1004d6c3ee1d0f13990a4e52dee66bc",class:"element"},t("slot",{key:"f7d4dc9576768e917a363bc7cafa86567213ea82",name:"icon-start"},e&&t("gov-icon",{key:"8d57b52a0314e8d76461872116b4ce04e546c180",type:e.type,name:e.name})),t("slot",{key:"4cd134377c3ea7843aa899b0a2962aa19f5d569e"}),t("slot",{key:"4dc1cccaced24ef26bb15e648788590a4b7d1838",name:"icon-end"},a&&t("gov-icon",{key:"7946e18900c98bdff4c610813b2422bf75b30049",type:a.type,name:a.name}))))}get host(){return a(this)}static get watchers(){return{color:["validateColor"],size:["validateSize"]}}};export{h as gov_tag};
2
+ //# sourceMappingURL=p-da7f1e11.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as s,a as e,g as a}from"./p-8506b611.js";import{v as n}from"./p-a2435993.js";import{B as o,a as h,c as d,N as r}from"./p-3bbb77a0.js";import{g as c,t as f}from"./p-ea7fdd2e.js";import{S as l}from"./p-92f420cb.js";import{v as p}from"./p-c52afdfc.js";import{c as m}from"./p-20c2203a.js";import{d as b}from"./p-e0e2e9c1.js";import{i as u}from"./p-d9a299a4.js";import{A as y,a as v}from"./p-9ac55bd1.js";import"./p-5aad3497.js";import"./p-cd6c2938.js";import"./p-2aedc81e.js";function g(t){if(typeof t==="string"){return["true","True","TRUE","1"].indexOf(t)!==-1}else if(typeof t==="number"){return t>0}else if(typeof t==="boolean"){return t}else{return t?true:false}}var j;(function(t){t["A"]="a";t["BUTTON"]="button"})(j||(j={}));const k=class{constructor(s){t(this,s);this.govClick=i(this,"gov-click",7);this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.hydrated=false;this.color=undefined;this.size="m";this.type=undefined;this.expanded=false;this.name=undefined;this.disabled=false;this.nativeType="button";this.href=undefined;this.target=undefined;this.download=undefined;this.hreflang=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.loading=undefined;this.focusable=true;this.identifier=undefined;this.inheritedAttributes={};this.h=c(this.host)}validateColor(t){n(h,t,o.root)}validateType(t){n(d,t,o.root)}validateSize(t){n(l,t,o.root)}validateNativeType(t){n(r,t,o.root)}componentDidLoad(){this.attributeObserver=new y(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(v)}onAriaAttributeChange(t,i){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:i})}disconnectedCallback(){this.attributeObserver.stopObserving()}componentWillLoad(){this.validateColor(this.color);this.validateType(this.type);this.validateSize(this.size);this.validateNativeType(this.nativeType);this.inheritedAttributes=u(this.host)}async componentDidRender(){if(m()){await b(500);await this.validateAccessibility()}}connectedCallback(){this.hydrated=true}render(){const t=this.href?j.A:j.BUTTON;const i=t===j.A?undefined:this.nativeType;return s(e,{key:"4e5ef3fbf897b81b07452a9383985353d673fdd6",size:this.size,hydrated:this.hydrated,color:this.color,class:this.h.classes(o.root),type:this.type},s(t,Object.assign({key:"d0689b6c773257059fa9334d4bb1d003a0ec58c3",class:"element",ref:t=>this.triggerRef=t,onClick:this.onClickHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),disabled:this.disabled,id:this.identifier,href:this.href,target:this.target,download:this.download,hreflang:this.hreflang,rel:this.rel,name:this.name,type:i,tabindex:this.disabled?"-1":"0"},this.inheritedAttributes,{"aria-disabled":f(this.disabled)}),g(this.loading)&&!this.h.hasSlot("icon-end")&&s("gov-icon",{key:"16a969ee29897508924e61d70b40589d0410f649",name:"loader",class:"gov-spin-animation",type:"components"}),this.h.hasSlot("icon-start")&&s("slot",{key:"7d208cc950fedd5b6bbf376152a0c641d8885846",name:"icon-start"}),s("slot",{key:"7c43309c657363dbcc1df14ae3c21d977ec3eb20"}),this.h.hasSlot("icon-end")&&s("slot",{key:"d90b7831900331fe8482757f33847295207f73d2",name:"icon-end"}),g(this.loading)&&this.h.hasSlot("icon-end")&&s("gov-icon",{key:"d23e2000e5bf5b78a81e78d6c3e30aa0e1f3f42c",name:"loader",class:"gov-spin-animation",type:"components"})))}onClickHandler(t){t.stopPropagation();if(this.disabled===false){this.govClick.emit({component:o.root,originalEvent:t,ref:this.host})}}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:o.root,originalEvent:t,ref:this.host})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:o.root,originalEvent:t,ref:this.host})}async setFocus(){this.triggerRef.focus()}async getRef(){return this.triggerRef}async validateAccessibility(){if(this.focusable){p(this.triggerRef.getAttribute("aria-label"),this.triggerRef.getAttribute("aria-labelledby"),o.root,this.host)}}get host(){return a(this)}static get watchers(){return{color:["validateColor"],type:["validateType"],size:["validateSize"],nativeType:["validateNativeType"]}}};export{k as gov_button};
2
- //# sourceMappingURL=p-dec3f948.entry.js.map
1
+ import{r as t,c as i,h as e,a as s,g as a}from"./p-8506b611.js";import{v as n}from"./p-0b3574c2.js";import{B as o,a as h,c as d,N as r}from"./p-3bbb77a0.js";import{g as c,t as f}from"./p-ea7fdd2e.js";import{S as l}from"./p-92f420cb.js";import{v as p}from"./p-29ac15d2.js";import{c as b}from"./p-e8ec030e.js";import{d as m}from"./p-e0e2e9c1.js";import{i as u}from"./p-d9a299a4.js";import{A as y,a as v}from"./p-9ac55bd1.js";import"./p-5aad3497.js";import"./p-cd6c2938.js";import"./p-2aedc81e.js";function g(t){if(typeof t==="string"){return["true","True","TRUE","1"].indexOf(t)!==-1}else if(typeof t==="number"){return t>0}else if(typeof t==="boolean"){return t}else{return t?true:false}}var j;(function(t){t["A"]="a";t["BUTTON"]="button"})(j||(j={}));const k=class{constructor(e){t(this,e);this.govClick=i(this,"gov-click",7);this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.hydrated=false;this.color=undefined;this.size="m";this.type=undefined;this.expanded=false;this.name=undefined;this.disabled=false;this.nativeType="button";this.href=undefined;this.target=undefined;this.download=undefined;this.hreflang=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.loading=undefined;this.focusable=true;this.identifier=undefined;this.inheritedAttributes={};this.h=c(this.host)}validateColor(t){n(h,t,o.root)}validateType(t){n(d,t,o.root)}validateSize(t){n(l,t,o.root)}validateNativeType(t){n(r,t,o.root)}componentDidLoad(){this.attributeObserver=new y(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(v)}onAriaAttributeChange(t,i){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:i})}disconnectedCallback(){this.attributeObserver.stopObserving()}componentWillLoad(){this.validateColor(this.color);this.validateType(this.type);this.validateSize(this.size);this.validateNativeType(this.nativeType);this.inheritedAttributes=u(this.host)}async componentDidRender(){if(b()){await m(500);await this.validateAccessibility()}}connectedCallback(){this.hydrated=true}render(){const t=this.href?j.A:j.BUTTON;const i=t===j.A?undefined:this.nativeType;return e(s,{key:"4e5ef3fbf897b81b07452a9383985353d673fdd6",size:this.size,hydrated:this.hydrated,color:this.color,class:this.h.classes(o.root),type:this.type},e(t,Object.assign({key:"d0689b6c773257059fa9334d4bb1d003a0ec58c3",class:"element",ref:t=>this.triggerRef=t,onClick:this.onClickHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),disabled:this.disabled,id:this.identifier,href:this.href,target:this.target,download:this.download,hreflang:this.hreflang,rel:this.rel,name:this.name,type:i,tabindex:this.disabled?"-1":"0"},this.inheritedAttributes,{"aria-disabled":f(this.disabled)}),g(this.loading)&&!this.h.hasSlot("icon-end")&&e("gov-icon",{key:"16a969ee29897508924e61d70b40589d0410f649",name:"loader",class:"gov-spin-animation",type:"components"}),this.h.hasSlot("icon-start")&&e("slot",{key:"7d208cc950fedd5b6bbf376152a0c641d8885846",name:"icon-start"}),e("slot",{key:"7c43309c657363dbcc1df14ae3c21d977ec3eb20"}),this.h.hasSlot("icon-end")&&e("slot",{key:"d90b7831900331fe8482757f33847295207f73d2",name:"icon-end"}),g(this.loading)&&this.h.hasSlot("icon-end")&&e("gov-icon",{key:"d23e2000e5bf5b78a81e78d6c3e30aa0e1f3f42c",name:"loader",class:"gov-spin-animation",type:"components"})))}onClickHandler(t){t.stopPropagation();if(this.disabled===false){this.govClick.emit({component:o.root,originalEvent:t,ref:this.host})}}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:o.root,originalEvent:t,ref:this.host})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:o.root,originalEvent:t,ref:this.host})}async setFocus(){this.triggerRef.focus()}async getRef(){return this.triggerRef}async validateAccessibility(){if(this.focusable){p(this.triggerRef.getAttribute("aria-label"),this.triggerRef.getAttribute("aria-labelledby"),o.root,this.host)}}get host(){return a(this)}static get watchers(){return{color:["validateColor"],type:["validateType"],size:["validateSize"],nativeType:["validateNativeType"]}}};export{k as gov_button};
2
+ //# sourceMappingURL=p-dea64896.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as o,c as r,h as a,a as g,g as p}from"./p-8506b611.js";import{d as i,a as t,b as e,c as m}from"./p-e44a0fee.js";import{g as l}from"./p-ea7fdd2e.js";import{v as f}from"./p-a2435993.js";import{t as v}from"./p-26618322.js";import"./p-e0e2e9c1.js";import"./p-92f420cb.js";import"./p-20c2203a.js";const n=":root{--roboto:Roboto, sans-serif}gov-form-group,.gov-form-group,gov-form-radio-group,.gov-form-radio-group,gov-form-checkbox-group,.gov-form-checkbox-group{margin-top:0 !important;margin-bottom:0 !important;position:relative;display:flex;width:100%;flex-direction:column;align-items:flex-start}gov-form-group .gov-form-label__label,.gov-form-group .gov-form-label__label,gov-form-radio-group .gov-form-label__label,.gov-form-radio-group .gov-form-label__label,gov-form-checkbox-group .gov-form-label__label,.gov-form-checkbox-group .gov-form-label__label{margin:0}gov-form-group[orientation=horizontal],.gov-form-group[orientation=horizontal],gov-form-radio-group[orientation=horizontal],.gov-form-radio-group[orientation=horizontal],gov-form-checkbox-group[orientation=horizontal],.gov-form-checkbox-group[orientation=horizontal]{flex-direction:row;flex-wrap:wrap}gov-form-group[orientation=horizontal] .gov-form-label__label,.gov-form-group[orientation=horizontal] .gov-form-label__label,gov-form-radio-group[orientation=horizontal] .gov-form-label__label,.gov-form-radio-group[orientation=horizontal] .gov-form-label__label,gov-form-checkbox-group[orientation=horizontal] .gov-form-label__label,.gov-form-checkbox-group[orientation=horizontal] .gov-form-label__label{white-space:nowrap}gov-form-group[gap=xs],.gov-form-group[gap=xs],gov-form-radio-group[gap=xs],.gov-form-radio-group[gap=xs],gov-form-checkbox-group[gap=xs],.gov-form-checkbox-group[gap=xs]{gap:var(--gap, var(--spacing-xs-nudge))}gov-form-group[gap=s],.gov-form-group[gap=s],gov-form-radio-group[gap=s],.gov-form-radio-group[gap=s],gov-form-checkbox-group[gap=s],.gov-form-checkbox-group[gap=s]{gap:var(--gap, var(--spacing-s))}gov-form-group[gap=m],.gov-form-group[gap=m],gov-form-radio-group[gap=m],.gov-form-radio-group[gap=m],gov-form-checkbox-group[gap=m],.gov-form-checkbox-group[gap=m]{gap:var(--gap, var(--spacing-s-nudge))}gov-form-group[gap=l],.gov-form-group[gap=l],gov-form-radio-group[gap=l],.gov-form-radio-group[gap=l],gov-form-checkbox-group[gap=l],.gov-form-checkbox-group[gap=l]{gap:var(--gap, var(--spacing-m))}gov-form-group[gap=xl],.gov-form-group[gap=xl],gov-form-radio-group[gap=xl],.gov-form-radio-group[gap=xl],gov-form-checkbox-group[gap=xl],.gov-form-checkbox-group[gap=xl]{gap:var(--gap, var(--spacing-m-nudge))}";const s=n;const c=class{constructor(a){o(this,a);this.govChange=r(this,"gov-change",7);this.handleChange=o=>{o.stopPropagation();this.value=o.detail.value;this.govChange.emit({value:this.value,component:i.root})};this.gap=undefined;this.orientation="vertical";this.value=undefined;this.h=l(this.host)}validateGap(o){if(o){f(e,o,t.root)}}validateOrientation(o){if(o){f(m,o,t.root)}}componentWillLoad(){this.validateGap(this.gap);this.validateOrientation(this.orientation)}componentDidRender(){v((()=>this.rerenderComponent()))}rerenderComponent(){this.host.querySelectorAll("gov-form-radio").forEach((o=>{if(!o.hasAttribute("listener-attached")){o.addEventListener("gov-change",this.handleChange)}o.setAttribute("listener-attached","true");o.checked=o.value===this.value}))}render(){return a(g,{key:"5a9b1bd507ef9c0a57cdb25fb200ab6c9fb46604",gap:this.gap,class:this.h.classes(t.root),value:this.value},a("slot",{key:"34b587d61d716b51729431c52879b6fcd0285fee"}))}get host(){return p(this)}static get watchers(){return{gap:["validateGap"],orientation:["validateOrientation"]}}};c.style=s;export{c as gov_form_radio_group};
2
- //# sourceMappingURL=p-a218e2eb.entry.js.map
1
+ import{r as o,c as r,h as a,a as g,g as p}from"./p-8506b611.js";import{d as i,a as e,b as t,c as m}from"./p-e44a0fee.js";import{g as l}from"./p-ea7fdd2e.js";import{v as f}from"./p-0b3574c2.js";import{t as v}from"./p-26618322.js";import"./p-e0e2e9c1.js";import"./p-92f420cb.js";import"./p-e8ec030e.js";const n=":root{--roboto:Roboto, sans-serif}gov-form-group,.gov-form-group,gov-form-radio-group,.gov-form-radio-group,gov-form-checkbox-group,.gov-form-checkbox-group{margin-top:0 !important;margin-bottom:0 !important;position:relative;display:flex;width:100%;flex-direction:column;align-items:flex-start}gov-form-group .gov-form-label__label,.gov-form-group .gov-form-label__label,gov-form-radio-group .gov-form-label__label,.gov-form-radio-group .gov-form-label__label,gov-form-checkbox-group .gov-form-label__label,.gov-form-checkbox-group .gov-form-label__label{margin:0}gov-form-group[orientation=horizontal],.gov-form-group[orientation=horizontal],gov-form-radio-group[orientation=horizontal],.gov-form-radio-group[orientation=horizontal],gov-form-checkbox-group[orientation=horizontal],.gov-form-checkbox-group[orientation=horizontal]{flex-direction:row;flex-wrap:wrap}gov-form-group[orientation=horizontal] .gov-form-label__label,.gov-form-group[orientation=horizontal] .gov-form-label__label,gov-form-radio-group[orientation=horizontal] .gov-form-label__label,.gov-form-radio-group[orientation=horizontal] .gov-form-label__label,gov-form-checkbox-group[orientation=horizontal] .gov-form-label__label,.gov-form-checkbox-group[orientation=horizontal] .gov-form-label__label{white-space:nowrap}gov-form-group[gap=xs],.gov-form-group[gap=xs],gov-form-radio-group[gap=xs],.gov-form-radio-group[gap=xs],gov-form-checkbox-group[gap=xs],.gov-form-checkbox-group[gap=xs]{gap:var(--gap, var(--spacing-xs-nudge))}gov-form-group[gap=s],.gov-form-group[gap=s],gov-form-radio-group[gap=s],.gov-form-radio-group[gap=s],gov-form-checkbox-group[gap=s],.gov-form-checkbox-group[gap=s]{gap:var(--gap, var(--spacing-s))}gov-form-group[gap=m],.gov-form-group[gap=m],gov-form-radio-group[gap=m],.gov-form-radio-group[gap=m],gov-form-checkbox-group[gap=m],.gov-form-checkbox-group[gap=m]{gap:var(--gap, var(--spacing-s-nudge))}gov-form-group[gap=l],.gov-form-group[gap=l],gov-form-radio-group[gap=l],.gov-form-radio-group[gap=l],gov-form-checkbox-group[gap=l],.gov-form-checkbox-group[gap=l]{gap:var(--gap, var(--spacing-m))}gov-form-group[gap=xl],.gov-form-group[gap=xl],gov-form-radio-group[gap=xl],.gov-form-radio-group[gap=xl],gov-form-checkbox-group[gap=xl],.gov-form-checkbox-group[gap=xl]{gap:var(--gap, var(--spacing-m-nudge))}";const s=n;const c=class{constructor(a){o(this,a);this.govChange=r(this,"gov-change",7);this.handleChange=o=>{o.stopPropagation();this.value=o.detail.value;this.govChange.emit({value:this.value,component:i.root})};this.gap=undefined;this.orientation="vertical";this.value=undefined;this.h=l(this.host)}validateGap(o){if(o){f(t,o,e.root)}}validateOrientation(o){if(o){f(m,o,e.root)}}componentWillLoad(){this.validateGap(this.gap);this.validateOrientation(this.orientation)}componentDidRender(){v((()=>this.rerenderComponent()))}rerenderComponent(){this.host.querySelectorAll("gov-form-radio").forEach((o=>{if(!o.hasAttribute("listener-attached")){o.addEventListener("gov-change",this.handleChange)}o.setAttribute("listener-attached","true");o.checked=o.value===this.value}))}render(){return a(g,{key:"5a9b1bd507ef9c0a57cdb25fb200ab6c9fb46604",gap:this.gap,class:this.h.classes(e.root),value:this.value},a("slot",{key:"34b587d61d716b51729431c52879b6fcd0285fee"}))}get host(){return p(this)}static get watchers(){return{gap:["validateGap"],orientation:["validateOrientation"]}}};c.style=s;export{c as gov_form_radio_group};
2
+ //# sourceMappingURL=p-e61aa53b.entry.js.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./p-e0e2e9c1.js";const n=typeof window!=="undefined";const s=s=>n&&window&&o(s,window);const t=()=>{const o={canValidateWcagOnRender:false,warningLog:false,errorLog:false,log:false,iconsPath:"/assets/icons",iconsLazyLoad:true,documentNode:document?document:null};const n=s("GOV_DS_CONFIG");if(n){return Object.assign(Object.assign({},o),n)}return o};const c=()=>t().canValidateWcagOnRender;const e=()=>t().warningLog;const a=()=>t().errorLog;const d=()=>t().log;const i=()=>t().iconsPath;const r=()=>t().iconsLazyLoad;const f=()=>t().documentNode;const g={bg:"#ecae1a",text:"#3b3b3b"};const b={bg:"#2362a2",text:"#fff"};const l=(o,n=b,s)=>{const t=["color: "+n.text,"background: "+n.bg,"font-size: 11px","padding: 2px 4px","border-radius: 3px","font-weight: 600"].join(";");if(d()||e()||a()){console.log("%cgov",t,o,s)}};const u=(o,n)=>{if(e()){l(o,g,n)}};export{r as a,n as b,c,f as d,u as g,i};
2
- //# sourceMappingURL=p-20c2203a.js.map
1
+ import{a as o}from"./p-e0e2e9c1.js";const n=typeof window!=="undefined";const s=s=>n&&window&&o(s,window);const t=()=>{const o={canValidateWcagOnRender:false,warningLog:false,errorLog:false,log:false,iconsPath:"/assets/icons",iconsLazyLoad:true,documentNode:document?document:null};const n=s("GOV_DS_CONFIG");if(n){return Object.assign(Object.assign({},o),n)}return o};const c=()=>t().canValidateWcagOnRender;const e=()=>t().warningLog;const a=()=>t().errorLog;const d=()=>t().log;const i=()=>t().iconsPath;const r=()=>t().iconsLazyLoad;const f=()=>t().documentNode;const g={bg:"#ecae1a",text:"#3b3b3b"};const b={bg:"#2362a2",text:"#fff"};const l=(o,n=b,s)=>{const t=["color: "+n.text,"background: "+n.bg,"font-size: 11px","padding: 2px 4px","border-radius: 3px","font-weight: 600"].join(";");if(d()||e()||a()){console.log("%cgov",t,o,s)}};const u=(o,n)=>{if(e()){l(o,g,n)}};export{n as a,r as b,c,f as d,u as g,i};
2
+ //# sourceMappingURL=p-e8ec030e.js.map
@@ -0,0 +1,2 @@
1
+ import{r as e,h as o,a as s,g as a}from"./p-8506b611.js";import{p as t}from"./p-e0e2e9c1.js";import{S as c}from"./p-92f420cb.js";import{g as i,p as r}from"./p-ea7fdd2e.js";import{v as n}from"./p-0b3574c2.js";import"./p-e8ec030e.js";const d=t(c,["_S","_M","_L"]);const p={root:"gov-loading",content:"gov-loading__content",icon:"gov-loading__icon"};const f=class{constructor(o){e(this,o);this.size="m";this.h=i(this.host)}validateSize(e){n(d,e,p.root)}componentWillLoad(){this.validateSize(this.size)}render(){return o(s,{key:"3f7cec1f98aa0c68f42eb3049ae8d34270e17258",class:this.h.classes(p.root),size:this.size},o("div",{key:"9ad1ca86b0221f2668f47eb72c080e9ecd05ed68",class:p.content},o("gov-icon",{key:"5d75c634386c8226c553b787355b29b0581601c5",class:r([p.icon,"gov-spin-animation"]),name:"loader",type:"components"}),o("slot",{key:"99ff7f6f1c8bd8135959ea36bc484eab6c9a4b6b"})),o("gov-backdrop",{key:"dcaa2ab6dbcca347d5934df52e0f4989701c0259",inverse:true}))}get host(){return a(this)}static get watchers(){return{size:["validateSize"]}}};export{f as gov_loading};
2
+ //# sourceMappingURL=p-ea44d447.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as s,h as i,a as e,g as h}from"./p-8506b611.js";import{c as a}from"./p-cd6c2938.js";import{v as o}from"./p-a2435993.js";import{g as n,F as r,a as c}from"./p-da1db6fd.js";import{g as d,c as l,t as p}from"./p-ea7fdd2e.js";import{F as m}from"./p-1c1d0bbe.js";import{A as f,a as u}from"./p-9ac55bd1.js";import{i as b}from"./p-d9a299a4.js";import"./p-20c2203a.js";import"./p-e0e2e9c1.js";import"./p-92f420cb.js";import"./p-7f3becc5.js";import"./p-5aad3497.js";import"./p-56efd4a2.js";import"./p-7ba4daf4.js";const g=class{constructor(i){t(this,i);this.govFocus=s(this,"gov-focus",7);this.govBlur=s(this,"gov-blur",7);this.govChange=s(this,"gov-change",7);this.hydrated=false;this.value=undefined;this.checked=false;this.required=false;this.disabled=false;this.indeterminate=false;this.name=undefined;this.size="m";this.identifier=undefined;this.noLabel=false;this.invalid=undefined;this.inheritedAttributes={};this.checkboxId=a("GovCheckbox");this.h=d(this.host);this.f=n(this.h)}validateSize(t){o(c,t,r.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("disabled",l(this.disabled));this.f.passAttrToControl("invalid",l(this.invalid));this.f.passAttrToControl("type","checkbox")}componentWillLoad(){this.passControlAttrs();this.inheritedAttributes=b(this.host)}componentDidLoad(){this.attributeObserver=new f(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(u)}async componentDidRender(){this.f.passAttrToLabel("identifier",this.identifier||this.checkboxId);this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs()}connectedCallback(){this.hydrated=true}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){const t=t=>{if(this.noLabel){return i("label",{class:r.label},t)}return t};return i(e,{class:r.root,hydrated:this.hydrated,checked:this.checked,size:this.size,invalid:p(this.invalid)},t(i(m,null,i("input",Object.assign({id:this.identifier||this.checkboxId,type:"checkbox",value:this.value,name:this.name,checked:this.checked,onClick:this.onClickHandler.bind(this),onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled,indeterminate:this.indeterminate,ref:t=>this.inputRef=t},this.inheritedAttributes,{"aria-checked":l(this.checked),"aria-required":p(this.required),"aria-invalid":p(this.invalid),"aria-disabled":p(this.disabled)})),i("span",null,i("slot",{name:"label"}),i("gov-icon",{class:r.check,name:"check-lg",type:"components"}),i("gov-icon",{class:r.indeterminate,name:"dash-lg",type:"components"})))))}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}onClickHandler(t){t.stopPropagation()}onChangeHandler(t){this.checked=t.target.checked;t.stopPropagation();this.govChange.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}async getRef(){return this.inputRef}get host(){return h(this)}static get watchers(){return{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}};export{g as gov_form_checkbox};
2
- //# sourceMappingURL=p-cb557873.entry.js.map
1
+ import{r as t,c as s,h as i,a as e,g as h}from"./p-8506b611.js";import{c as a}from"./p-cd6c2938.js";import{v as o}from"./p-0b3574c2.js";import{g as n,F as r,a as c}from"./p-da1db6fd.js";import{g as d,c as l,t as p}from"./p-ea7fdd2e.js";import{F as m}from"./p-1c1d0bbe.js";import{A as f,a as u}from"./p-9ac55bd1.js";import{i as b}from"./p-d9a299a4.js";import"./p-e8ec030e.js";import"./p-e0e2e9c1.js";import"./p-92f420cb.js";import"./p-7f3becc5.js";import"./p-5aad3497.js";import"./p-56efd4a2.js";import"./p-7ba4daf4.js";const g=class{constructor(i){t(this,i);this.govFocus=s(this,"gov-focus",7);this.govBlur=s(this,"gov-blur",7);this.govChange=s(this,"gov-change",7);this.hydrated=false;this.value=undefined;this.checked=false;this.required=false;this.disabled=false;this.indeterminate=false;this.name=undefined;this.size="m";this.identifier=undefined;this.noLabel=false;this.invalid=undefined;this.inheritedAttributes={};this.checkboxId=a("GovCheckbox");this.h=d(this.host);this.f=n(this.h)}validateSize(t){o(c,t,r.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("disabled",l(this.disabled));this.f.passAttrToControl("invalid",l(this.invalid));this.f.passAttrToControl("type","checkbox")}componentWillLoad(){this.passControlAttrs();this.inheritedAttributes=b(this.host)}componentDidLoad(){this.attributeObserver=new f(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(u)}async componentDidRender(){this.f.passAttrToLabel("identifier",this.identifier||this.checkboxId);this.f.passAttrToLabel("required",String(this.required));this.passControlAttrs()}connectedCallback(){this.hydrated=true}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){const t=t=>{if(this.noLabel){return i("label",{class:r.label},t)}return t};return i(e,{class:r.root,hydrated:this.hydrated,checked:this.checked,size:this.size,invalid:p(this.invalid)},t(i(m,null,i("input",Object.assign({id:this.identifier||this.checkboxId,type:"checkbox",value:this.value,name:this.name,checked:this.checked,onClick:this.onClickHandler.bind(this),onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled,indeterminate:this.indeterminate,ref:t=>this.inputRef=t},this.inheritedAttributes,{"aria-checked":l(this.checked),"aria-required":p(this.required),"aria-invalid":p(this.invalid),"aria-disabled":p(this.disabled)})),i("span",null,i("slot",{name:"label"}),i("gov-icon",{class:r.check,name:"check-lg",type:"components"}),i("gov-icon",{class:r.indeterminate,name:"dash-lg",type:"components"})))))}onFocusHandler(t){t.stopPropagation();this.govFocus.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.govBlur.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}onClickHandler(t){t.stopPropagation()}onChangeHandler(t){this.checked=t.target.checked;t.stopPropagation();this.govChange.emit({component:r.root,value:this.value,checked:this.checked,originalEvent:t})}async getRef(){return this.inputRef}get host(){return h(this)}static get watchers(){return{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"]}}};export{g as gov_form_checkbox};
2
+ //# sourceMappingURL=p-ed833334.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GovFormCheckbox","constructor","hostRef","this","hydrated","checkboxId","createID","h","govHost","host","f","govForm","validateSize","newValue","validateProp","FormCheckboxSizes","FormCheckboxClass","root","watchControlAttrs","passControlAttrs","passAttrToControl","size","toBoolAttr","disabled","invalid","componentWillLoad","inheritedAttributes","inheritAriaAttributes","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentDidRender","passAttrToLabel","identifier","String","required","connectedCallback","disconnectedCallback","stopObserving","removeAttribute","Object","assign","render","wrapCheckbox","children","noLabel","class","label","Host","checked","toBoolAttrIfDefined","Fragment","id","type","value","name","onClick","onClickHandler","bind","onChange","onChangeHandler","onFocus","onFocusHandler","onBlur","onBlurHandler","indeterminate","ref","el","inputRef","check","e","stopPropagation","govFocus","emit","component","originalEvent","govBlur","target","govChange","getRef"],"sources":["../../../packages/core/src/components/gov-form/checkbox/gov-form-checkbox.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 {FormCheckboxClass, FormCheckboxSizes, FormCheckboxSizesType} 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 {FormCheckboxEvent} from \"./gov-form-checkbox.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-checkbox\",\n})\nexport class GovFormCheckbox {\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: HTMLGovFormCheckboxElement\n\t/**\n\t * Value of checkbox\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * Checkbox button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the checkbox component disabled.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter (https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate)\n\t */\n\t@Prop({reflect: true}) readonly indeterminate: boolean = false\n\t/**\n\t * Name of the checkbox.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Checkboxes size.\n\t */\n\t@Prop({reflect: true}) readonly size?: FormCheckboxSizesType = \"m\"\n\t/**\n\t * Custom checkbox identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: 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 * 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 checkbox has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormCheckboxEvent>\n\t/**\n\t * Emitted when the checkbox loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormCheckboxEvent>\n\t/**\n\t * Emitted when the checkbox change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormCheckboxEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormCheckboxSizes, newValue, FormCheckboxClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", \"checkbox\")\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.passControlAttrs()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.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\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\tconst wrapCheckbox = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn (\n\t\t\t\t\t<label class={FormCheckboxClass.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={FormCheckboxClass.root}\n\t\t\t\t\t\thydrated={this.hydrated}\n\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\tinvalid={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\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\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\trequired={this.required}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tindeterminate={this.indeterminate}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\t\taria-checked={toBoolAttr(this.checked)}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\"/>\n\t\t\t\t\t\t\t<gov-icon class={FormCheckboxClass.check} name=\"check-lg\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t<gov-icon class={FormCheckboxClass.indeterminate} name=\"dash-lg\" type=\"components\"></gov-icon>\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 onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\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: FormCheckboxClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n"],"mappings":"6gBAiBaA,EAAe,MAS3B,WAAAC,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AQH,KAAK,CACjBC,UAAW9D,EAAkBC,KAC7ByC,MAAOvD,KAAKuD,MACZL,QAASlD,KAAKkD,QACd0B,cAAeL,G,CAIT,cAAAb,CAAea,GACtBA,EAAEC,iB,CAGK,eAAAX,CAAgBU,GACvBvE,KAAKkD,QAAWqB,EAAEO,OAA4B5B,QAC9CqB,EAAEC,kBACFxE,KAAK+E,UAAUL,KAAK,CACnBC,UAAW9D,EAAkBC,KAC7ByC,MAAOvD,KAAKuD,MACZL,QAASlD,KAAKkD,QACd0B,cAAeL,G,CAQjB,YAAMS,GACL,OAAOhF,KAAKqE,Q","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as s,c as t,h as i,a as e,g as h}from"./p-8506b611.js";import{c as a,b as n}from"./p-ea7fdd2e.js";import{v as o}from"./p-a2435993.js";import{c as l}from"./p-cd6c2938.js";import{d as r,t as c,h as d}from"./p-e0e2e9c1.js";import{F as f,a as u}from"./p-56efd4a2.js";import{p}from"./p-ded281e6.js";import{A as m,a as v}from"./p-9ac55bd1.js";import{i as g}from"./p-d9a299a4.js";import"./p-20c2203a.js";import"./p-92f420cb.js";import"./p-2aedc81e.js";const b=class{constructor(i){s(this,i);this.govFocus=t(this,"gov-focus",7);this.govBlur=t(this,"gov-blur",7);this.govInput=t(this,"gov-input",7);this.govSelect=t(this,"gov-select",7);this.templateResolver=s=>s[this.nameKey];this.value="";this.options=undefined;this.identifier=undefined;this.success=undefined;this.size="m";this.nameKey="name";this.name=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.invalid=undefined;this.minlength=3;this.maxlength=undefined;this.throttleTime=200;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.focused=undefined;this.processing=false;this.arrowCounter=-1;this.list=[];this.inheritedAttributes={};this.listBoxId=l("GovListBox")}validateSize(s){o(u,s,f.root)}watchOptions(s){this.setOptions(p(s)).catch()}onArrowUp(){if(this.arrowCounter>0){this.arrowCounter=this.arrowCounter-1;this.moveToView().finally()}}onArrowDown(){if(this.arrowCounter<this.list.length-1){this.arrowCounter=this.arrowCounter+1;this.moveToView().finally()}}async moveToView(){await r(200);const s=this.listRef.offsetHeight;const t=this.listRef.querySelector('li[aria-selected="true"]');if(t&&s){const s=t.offsetTop;this.listRef.scrollTo({top:s,behavior:"smooth"})}}doSearch(){if(Number.isInteger(this.minlength)&&this.isValueAccepted===false&&this.minlength){this.list=[];this.arrowCounter=-1;this.processing=false;return}if(this.searchCallback){this.processing=true;this.searchCallback(this.value).then((s=>this.list=s)).catch((()=>this.list=[])).finally((()=>{this.arrowCounter=-1;this.processing=false}))}}clearList(){const s=p(this.options);if(s.length===0){this.list=[]}}get isValueAccepted(){if(typeof this.value==="string"){return this.value.length>=this.minlength}else{return false}}componentDidLoad(){this.attributeObserver=new m(this.host,((s,t)=>{this.onAriaAttributeChange(s,t)}));this.attributeObserver.startObserving(v)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=g(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(s,t){this.host.removeAttribute(s);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[s]:t})}render(){return i(e,{key:"d5ddd1d65a70f4a9839262831b6207a0fe8ae726",class:f.root,size:this.size},i("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":c(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":n(this.list.length&&this.focused?true:false),ref:s=>this.inputRef=s}),i("slot",{key:"1d697820c14669a9e6c81f844f15e20743593f97",name:"validation-icon"}),i("slot",{key:"297ccc852764688a34102363beb428ab81d6de26",name:"icon-end"})),i("ul",{key:"3ed420a696852fad4183d16ef31a2db1dcb8f572",class:f.list,role:"listbox","aria-hidden":a(!this.focused),hidden:!this.focused,id:this.listBoxId,ref:s=>this.listRef=s},this.focused&&this.list.length===0&&this.processing===false&&this.isValueAccepted&&this.messageEmpty?i("li",{class:f.empty},this.messageEmpty):null,this.focused&&this.processing===true&&this.isValueAccepted?i("li",{class:f.loading},i("gov-skeleton",{size:"m"})):null,this.focused?this.list.map(((s,t)=>{const e=this.arrowCounter===t;return i("li",{class:f.item,innerHTML:this.templateResolver(s,e),role:"option","aria-posinset":t,tabindex:e?0:-1,"aria-setsize":this.list.length,onTouchStart:s=>this.onSelectHandler(s,t),onMouseDown:s=>this.onSelectHandler(s,t),"aria-selected":a(e)},i("slot",{name:"list-item-left"}),i("slot",{name:"list-item-right"}))})):null))}onFocusHandler(s){this.focused=true;this.arrowCounter=-1;if(this.isValueAccepted&&this.searchCallback){this.doSearch()}s.stopPropagation();this.govFocus.emit({originalEvent:s,component:f.root,value:this.value,selected:null})}onBlurHandler(s){this.focused=false;this.clearList();this.arrowCounter=-1;s.stopPropagation();this.govBlur.emit({originalEvent:s,component:f.root,value:this.value,selected:null})}onInputHandler(s){this.value=s.target.value;s.stopPropagation();this.govInput.emit({originalEvent:s,component:f.root,value:this.value,selected:null});this.doSearch()}onSelectHandler(s,t=-1){let i=null;if(t>-1){i=this.list[t]}else if(d(this.arrowCounter,this.list)){i=this.list[this.arrowCounter]}if(i){this.govSelect.emit({component:f.root,value:this.value,selected:i,originalEvent:s});this.clearList();if(d(this.nameKey,i)&&typeof i[this.nameKey]==="string"){this.value=i[this.nameKey]}}}onKeyUpHandler(s){const t=s.detail.originalEvent;s.stopPropagation();t.stopPropagation();if(t.keyCode===38)this.onArrowUp();else if(t.keyCode===40)this.onArrowDown();else if(t.keyCode===13){s.preventDefault();t.preventDefault();this.onSelectHandler(s)}}onKeyDownHandler(s){const t=s.detail.originalEvent;s.stopPropagation();t.stopPropagation();if(t.keyCode===13){s.preventDefault();t.preventDefault()}}async setFocus(s){return this.inputRef.focus(s)}async setBlur(){return this.inputRef.blur()}async setOptions(s){this.list=Array.isArray(s)?s:[];this.arrowCounter=-1}async clearValue(){this.value="";this.inputRef.value="";await this.inputRef.clearValue()}async setProcessing(s){this.processing=s}async setSearchCallback(s){this.searchCallback=s}async setTemplateResolver(s){this.templateResolver=s}get host(){return h(this)}static get watchers(){return{size:["validateSize"],options:["watchOptions"]}}};export{b as gov_form_autocomplete};
2
- //# sourceMappingURL=p-fe6fed11.entry.js.map
1
+ import{r as s,c as t,h as i,a as e,g as h}from"./p-8506b611.js";import{c as a,b as n}from"./p-ea7fdd2e.js";import{v as o}from"./p-0b3574c2.js";import{c as l}from"./p-cd6c2938.js";import{d as r,t as c,h as d}from"./p-e0e2e9c1.js";import{F as f,a as u}from"./p-56efd4a2.js";import{p}from"./p-ded281e6.js";import{A as m,a as v}from"./p-9ac55bd1.js";import{i as g}from"./p-d9a299a4.js";import"./p-e8ec030e.js";import"./p-92f420cb.js";import"./p-2aedc81e.js";const b=class{constructor(i){s(this,i);this.govFocus=t(this,"gov-focus",7);this.govBlur=t(this,"gov-blur",7);this.govInput=t(this,"gov-input",7);this.govSelect=t(this,"gov-select",7);this.templateResolver=s=>s[this.nameKey];this.value="";this.options=undefined;this.identifier=undefined;this.success=undefined;this.size="m";this.nameKey="name";this.name=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.invalid=undefined;this.minlength=3;this.maxlength=undefined;this.throttleTime=200;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.focused=undefined;this.processing=false;this.arrowCounter=-1;this.list=[];this.inheritedAttributes={};this.listBoxId=l("GovListBox")}validateSize(s){o(u,s,f.root)}watchOptions(s){this.setOptions(p(s)).catch()}onArrowUp(){if(this.arrowCounter>0){this.arrowCounter=this.arrowCounter-1;this.moveToView().finally()}}onArrowDown(){if(this.arrowCounter<this.list.length-1){this.arrowCounter=this.arrowCounter+1;this.moveToView().finally()}}async moveToView(){await r(200);const s=this.listRef.offsetHeight;const t=this.listRef.querySelector('li[aria-selected="true"]');if(t&&s){const s=t.offsetTop;this.listRef.scrollTo({top:s,behavior:"smooth"})}}doSearch(){if(Number.isInteger(this.minlength)&&this.isValueAccepted===false&&this.minlength){this.list=[];this.arrowCounter=-1;this.processing=false;return}if(this.searchCallback){this.processing=true;this.searchCallback(this.value).then((s=>this.list=s)).catch((()=>this.list=[])).finally((()=>{this.arrowCounter=-1;this.processing=false}))}}clearList(){const s=p(this.options);if(s.length===0){this.list=[]}}get isValueAccepted(){if(typeof this.value==="string"){return this.value.length>=this.minlength}else{return false}}componentDidLoad(){this.attributeObserver=new m(this.host,((s,t)=>{this.onAriaAttributeChange(s,t)}));this.attributeObserver.startObserving(v)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=g(this.host)}disconnectedCallback(){this.attributeObserver.stopObserving()}onAriaAttributeChange(s,t){this.host.removeAttribute(s);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[s]:t})}render(){return i(e,{key:"1914bf635c1c0bf169d6f45fe4dab9a2738d390a",class:f.root,size:this.size},i("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":c(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":n(this.list.length&&this.focused?true:false),ref:s=>this.inputRef=s}),i("slot",{key:"1870810c9a7d6a258da3ec6d26e19cceef9da425",name:"validation-icon"}),i("slot",{key:"f6753deca157766fe66424d148a4416b1500e79e",name:"icon-end"})),i("ul",{key:"4a63a2c01d13870b6e49392118f291f2e43e3a34",class:f.list,role:"listbox","aria-hidden":a(!this.focused),hidden:!this.focused,id:this.listBoxId,ref:s=>this.listRef=s},this.focused&&this.list.length===0&&this.processing===false&&this.isValueAccepted&&this.messageEmpty?i("li",{class:f.empty},this.messageEmpty):null,this.focused&&this.processing===true&&this.isValueAccepted?i("li",{class:f.loading},i("gov-skeleton",{size:"m"})):null,this.focused?this.list.map(((s,t)=>{const e=this.arrowCounter===t;return i("li",{class:f.item,innerHTML:this.templateResolver(s,e),role:"option","aria-posinset":t,tabindex:e?0:-1,"aria-setsize":this.list.length,onTouchStart:s=>this.onSelectHandler(s,t),onMouseDown:s=>this.onSelectHandler(s,t),"aria-selected":a(e)},i("slot",{name:"list-item-left"}),i("slot",{name:"list-item-right"}))})):null))}onFocusHandler(s){this.focused=true;this.arrowCounter=-1;if(this.isValueAccepted&&this.searchCallback){this.doSearch()}s.stopPropagation();this.govFocus.emit({originalEvent:s,component:f.root,value:this.value,selected:null})}onBlurHandler(s){this.focused=false;this.clearList();this.arrowCounter=-1;s.stopPropagation();this.govBlur.emit({originalEvent:s,component:f.root,value:this.value,selected:null})}onInputHandler(s){this.value=s.target.value;s.stopPropagation();this.govInput.emit({originalEvent:s,component:f.root,value:this.value,selected:null});this.doSearch()}onSelectHandler(s,t=-1){let i=null;if(t>-1){i=this.list[t]}else if(d(this.arrowCounter,this.list)){i=this.list[this.arrowCounter]}if(i){this.govSelect.emit({component:f.root,value:this.value,selected:i,originalEvent:s});this.clearList();if(d(this.nameKey,i)&&typeof i[this.nameKey]==="string"){this.value=i[this.nameKey]}}}onKeyUpHandler(s){const t=s.detail.originalEvent;s.stopPropagation();t.stopPropagation();if(t.keyCode===38)this.onArrowUp();else if(t.keyCode===40)this.onArrowDown();else if(t.keyCode===13){s.preventDefault();t.preventDefault();this.onSelectHandler(s)}}onKeyDownHandler(s){const t=s.detail.originalEvent;s.stopPropagation();t.stopPropagation();if(t.keyCode===13){s.preventDefault();t.preventDefault()}}async setFocus(s){return this.inputRef.focus(s)}async setBlur(){return this.inputRef.blur()}async setOptions(s){this.list=Array.isArray(s)?s:[];this.arrowCounter=-1}async clearValue(){this.value="";this.inputRef.value="";await this.inputRef.clearValue()}async setProcessing(s){this.processing=s}async setSearchCallback(s){this.searchCallback=s}async setTemplateResolver(s){this.templateResolver=s}get host(){return h(this)}static get watchers(){return{size:["validateSize"],options:["watchOptions"]}}};export{b as gov_form_autocomplete};
2
+ //# sourceMappingURL=p-ed8fc183.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["GovFormAutocomplete","proxyCustomElement","H","constructor","this","templateResolver","item","nameKey","listBoxId","createID","validateSize","newValue","validateProp","FormAutocompleteSizes","FormAutocompleteClass","root","watchOptions","setOptions","propsValueToArray","catch","onArrowUp","arrowCounter","moveToView","finally","onArrowDown","list","length","delay","heightOfList","listRef","offsetHeight","selected","querySelector","offsetTop","scrollTo","top","behavior","doSearch","Number","isInteger","minlength","isValueAccepted","processing","searchCallback","value","then","response","clearList","areOptions","options","componentDidLoad","attributeObserver","AttributeObserver","host","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","size","inheritedAttributes","inheritAriaAttributes","disconnectedCallback","stopObserving","removeAttribute","Object","assign","render","h","Host","key","class","placeholder","name","disabled","readonly","autocomplete","required","invalid","success","role","maxlength","throttle","onInputHandler","bind","throttleTime","onKeyUpHandler","onKeyDownHandler","onFocusHandler","onBlurHandler","join","booleanString","focused","ref","el","inputRef","toBoolAttr","hidden","id","messageEmpty","empty","loading","map","index","isSelected","innerHTML","tabindex","onTouchStart","e","onSelectHandler","onMouseDown","stopPropagation","govFocus","emit","originalEvent","component","govBlur","target","govInput","has","govSelect","event","detail","keyCode","preventDefault","setFocus","focus","setBlur","blur","Array","isArray","clearValue","setProcessing","status","setSearchCallback","callback","setTemplateResolver"],"sources":["../../../packages/core/src/components/gov-form/autocomplete/gov-form-autocomplete.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {booleanString, toBoolAttr} from '../../../helpers/Dom/template'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {Nullable} from '../../../types/interfaces'\nimport {createID} from '../../../utils/string.utils'\nimport {delay, has, throttle} from '../../../utils/utils'\nimport {FormInputEvent} from '../input/gov-form-input.types'\nimport {FormAutocompleteClass, FormAutocompleteSizes, SizesType,} from './constants'\nimport {FormAutocompleteEvent, GovFormAutocompleteItem} from './gov-form-autocomplete.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-form-autocomplete',\n})\nexport class GovFormAutocomplete {\n\tprivate inputRef?: HTMLGovFormInputElement\n\tprivate listRef?: HTMLUListElement\n\tprivate readonly listBoxId: string\n\tprivate searchCallback: (value: string) => Promise<GovFormAutocompleteItem[]>\n\tprivate templateResolver: (item: GovFormAutocompleteItem, selected: boolean) => string = item => item[this.nameKey]\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.listBoxId = createID('GovListBox')\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({reflect: true, mutable: true}) value = ''\n\t/**\n\t * Options of autocomplete\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | GovFormAutocompleteItem[]\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: SizesType = 'm'\n\t/**\n\t * Main key name in the object\n\t */\n\t@Prop({attribute: 'name-key'}) readonly nameKey: string = 'name'\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number = 3\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Input throttle in milliseconds\n\t */\n\t@Prop() readonly throttleTime: number = 200\n\t/**\n\t * Custom message for when there is a blank sheet\n\t */\n\t@Prop({attribute: 'message-empty'}) readonly messageEmpty: string = 'Nebyly nalezeny žádné výsledky'\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: 'gov-input'}) govInput: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: 'gov-select'}) govSelect: EventEmitter<FormAutocompleteEvent>\n\n\t@State() focused: boolean\n\t@State() processing = false\n\t@State() arrowCounter = -1\n\t@State() list: GovFormAutocompleteItem[] = []\n\t@State() inheritedAttributes: Attributes = {}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormAutocompleteSizes, newValue, FormAutocompleteClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | GovFormAutocompleteItem[]): void {\n\t\tthis.setOptions(propsValueToArray(newValue)).catch()\n\t}\n\n\tprivate onArrowUp() {\n\t\tif (this.arrowCounter > 0) {\n\t\t\tthis.arrowCounter = this.arrowCounter - 1\n\t\t\tthis.moveToView().finally()\n\t\t}\n\t}\n\n\tprivate onArrowDown() {\n\t\tif (this.arrowCounter < this.list.length - 1) {\n\t\t\tthis.arrowCounter = this.arrowCounter + 1\n\t\t\tthis.moveToView().finally()\n\t\t}\n\t}\n\n\tprivate async moveToView() {\n\t\tawait delay(200)\n\t\tconst heightOfList = this.listRef.offsetHeight\n\t\tconst selected = this.listRef.querySelector('li[aria-selected=\"true\"]') as HTMLUListElement\n\t\tif (selected && heightOfList) {\n\t\t\tconst offsetTop = selected.offsetTop\n\t\t\tthis.listRef.scrollTo({top: offsetTop, behavior: 'smooth'})\n\t\t}\n\t}\n\n\tprivate doSearch() {\n\t\tif (Number.isInteger(this.minlength) && this.isValueAccepted === false && this.minlength) {\n\t\t\tthis.list = []\n\t\t\tthis.arrowCounter = -1\n\t\t\tthis.processing = false\n\t\t\treturn\n\t\t}\n\t\tif (this.searchCallback) {\n\t\t\tthis.processing = true\n\t\t\tthis.searchCallback(this.value)\n\t\t\t\t.then(response => (this.list = response))\n\t\t\t\t.catch(() => (this.list = []))\n\t\t\t\t.finally(() => {\n\t\t\t\t\tthis.arrowCounter = -1\n\t\t\t\t\tthis.processing = false\n\t\t\t\t})\n\t\t}\n\t}\n\n\tprivate clearList() {\n\t\tconst areOptions = propsValueToArray<GovFormAutocompleteItem[]>(this.options)\n\t\tif (areOptions.length === 0) {\n\t\t\tthis.list = []\n\t\t}\n\t}\n\n\tget isValueAccepted() {\n\t\tif (typeof this.value === 'string') {\n\t\t\treturn this.value.length >= this.minlength\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormAutocompleteClass.root} size={this.size}>\n\t\t\t\t<gov-form-input\n\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\treadonly={this.readonly}\n\t\t\t\t\tautocomplete={false}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tinvalid={this.invalid}\n\t\t\t\t\tsuccess={this.success}\n\t\t\t\t\trole={'searchbox'}\n\t\t\t\t\tvalue={this.value}\n\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\ton-gov-input={throttle(this.onInputHandler.bind(this), this.throttleTime)}\n\t\t\t\t\ton-gov-keyup={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\ton-gov-keydown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\ton-gov-focus={this.onFocusHandler.bind(this)}\n\t\t\t\t\ton-gov-blur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-autocomplete={'list'}\n\t\t\t\t\taria-owns={[this.listBoxId, this.inheritedAttributes['aria-owns']].join(' ')}\n\t\t\t\t\taria-expanded={booleanString(this.list.length && this.focused ? true : false)}\n\t\t\t\t\tref={el => (this.inputRef = el as HTMLGovFormInputElement)}\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"validation-icon\" />\n\t\t\t\t\t<slot name=\"icon-end\" />\n\t\t\t\t</gov-form-input>\n\t\t\t\t<ul class={FormAutocompleteClass.list}\n\t\t\t\t\trole={'listbox'}\n\t\t\t\t\taria-hidden={toBoolAttr(!this.focused)}\n\t\t\t\t\thidden={!this.focused}\n\t\t\t\t\tid={this.listBoxId}\n\t\t\t\t\tref={el => (this.listRef = el as HTMLUListElement)}>\n\t\t\t\t\t{this.focused && this.list.length === 0 && this.processing === false && this.isValueAccepted && this.messageEmpty ? (\n\t\t\t\t\t\t<li class={FormAutocompleteClass.empty}>{this.messageEmpty}</li>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{this.focused && this.processing === true && this.isValueAccepted ? (\n\t\t\t\t\t\t<li class={FormAutocompleteClass.loading}>\n\t\t\t\t\t\t\t<gov-skeleton size=\"m\"></gov-skeleton>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{this.focused ? this.list.map((item, index) => {\n\t\t\t\t\t\tconst isSelected = this.arrowCounter === index\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\tclass={FormAutocompleteClass.item}\n\t\t\t\t\t\t\t\tinnerHTML={this.templateResolver(item, isSelected)}\n\t\t\t\t\t\t\t\trole={'option'}\n\t\t\t\t\t\t\t\taria-posinset={index}\n\t\t\t\t\t\t\t\ttabindex={isSelected ? 0 : -1}\n\t\t\t\t\t\t\t\taria-setsize={this.list.length}\n\t\t\t\t\t\t\t\tonTouchStart={(e: TouchEvent) => this.onSelectHandler(e, index)}\n\t\t\t\t\t\t\t\tonMouseDown={(e: PointerEvent) => this.onSelectHandler(e, index)}\n\t\t\t\t\t\t\t\taria-selected={toBoolAttr(isSelected)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<slot name=\"list-item-left\"/>\n\t\t\t\t\t\t\t\t<slot name=\"list-item-right\"/>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t)\n\t\t\t\t\t}) : null}\n\t\t\t\t</ul>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.arrowCounter = -1\n\t\tif (this.isValueAccepted && this.searchCallback) {\n\t\t\tthis.doSearch()\n\t\t}\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.clearList();\n\t\tthis.arrowCounter = -1\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLGovFormInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t\tthis.doSearch()\n\t}\n\n\tprivate onSelectHandler(e: PointerEvent | CustomEvent | TouchEvent, index = -1) {\n\t\tlet selected: Nullable<GovFormAutocompleteItem> = null\n\t\tif (index > -1) {\n\t\t\tselected = this.list[index]\n\t\t} else if (has(this.arrowCounter, this.list)) {\n\t\t\tselected = this.list[this.arrowCounter]\n\t\t}\n\t\tif (selected) {\n\t\t\tthis.govSelect.emit({\n\t\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\t\tvalue: this.value,\n\t\t\t\tselected: selected,\n\t\t\t\toriginalEvent: e,\n\t\t\t})\n\t\t\tthis.clearList();\n\t\t\tif (has(this.nameKey, selected) && typeof selected[this.nameKey] === 'string') {\n\t\t\t\tthis.value = selected[this.nameKey]\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate onKeyUpHandler(e: CustomEvent) {\n\t\tconst event = (e.detail as FormInputEvent).originalEvent as KeyboardEvent\n\t\te.stopPropagation()\n\t\tevent.stopPropagation()\n\t\tif (event.keyCode === 38) this.onArrowUp()\n\t\telse if (event.keyCode === 40) this.onArrowDown()\n\t\telse if (event.keyCode === 13) {\n\t\t\te.preventDefault()\n\t\t\tevent.preventDefault()\n\t\t\tthis.onSelectHandler(e)\n\t\t}\n\t}\n\n\tprivate onKeyDownHandler(e: CustomEvent) {\n\t\tconst event = (e.detail as FormInputEvent).originalEvent as KeyboardEvent\n\t\te.stopPropagation()\n\t\tevent.stopPropagation()\n\t\tif (event.keyCode === 13) {\n\t\t\te.preventDefault()\n\t\t\tevent.preventDefault()\n\t\t}\n\t}\n\n\t/**\n\t * Focus main input element\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Blur main input element\n\t */\n\t@Method()\n\tasync setBlur(): Promise<void> {\n\t\treturn this.inputRef.blur()\n\t}\n\n\t/**\n\t * Set options for list\n\t */\n\t@Method()\n\tasync setOptions(options: GovFormAutocompleteItem[]): Promise<void> {\n\t\tthis.list = Array.isArray(options) ? options : []\n\t\tthis.arrowCounter = -1\n\t}\n\n\t/**\n\t * Clears whisperer value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = ''\n\t\tthis.inputRef.value = ''\n\n\t\tawait this.inputRef.clearValue()\n\t}\n\n\t/**\n\t * Clears whisperer value\n\t */\n\t@Method()\n\tasync setProcessing(status: boolean): Promise<void> {\n\t\tthis.processing = status\n\t}\n\n\t/**\n\t * Set a custom asynchronous function for the whisperer\n\t */\n\t@Method()\n\tasync setSearchCallback(callback: (value: string) => Promise<any>) {\n\t\tthis.searchCallback = callback\n\t}\n\n\t/**\n\t * Setting a custom whisper result template\n\t * @param callback\n\t */\n\t@Method()\n\tasync setTemplateResolver(callback: (item: GovFormAutocompleteItem) => string) {\n\t\tthis.templateResolver = callback\n\t}\n}\n"],"mappings":"4fAiBaA,EAAmBC,EAAA,MAAAD,UAAAE,EAQ/B,WAAAC,G,8KAHQC,KAAAC,iBAAiFC,GAAQA,EAAKF,KAAKG,S,WAW7D,G,kFAgBV,I,aAIsB,O,kCASrB,M,cAKA,M,yFAgBA,E,2CAQG,I,kBAI4B,iC,uCAmB9C,M,mBACG,E,UACkB,G,yBACA,GA3F1CH,KAAKI,UAAYC,EAAS,a,CA8F3B,YAAAC,CAAaC,GACZC,EAAaC,EAAuBF,EAAUG,EAAsBC,K,CAIrE,YAAAC,CAAaL,GACZP,KAAKa,WAAWC,EAAkBP,IAAWQ,O,CAGtC,SAAAC,GACP,GAAIhB,KAAKiB,aAAe,EAAG,CAC1BjB,KAAKiB,aAAejB,KAAKiB,aAAe,EACxCjB,KAAKkB,aAAaC,S,EAIZ,WAAAC,GACP,GAAIpB,KAAKiB,aAAejB,KAAKqB,KAAKC,OAAS,EAAG,CAC7CtB,KAAKiB,aAAejB,KAAKiB,aAAe,EACxCjB,KAAKkB,aAAaC,S,EAIZ,gBAAMD,SACPK,EAAM,KACZ,MAAMC,EAAexB,KAAKyB,QAAQC,aAClC,MAAMC,EAAW3B,KAAKyB,QAAQG,cAAc,4BAC5C,GAAID,GAAYH,EAAc,CAC7B,MAAMK,EAAYF,EAASE,UAC3B7B,KAAKyB,QAAQK,SAAS,CAACC,IAAKF,EAAWG,SAAU,U,EAI3C,QAAAC,GACP,GAAIC,OAAOC,UAAUnC,KAAKoC,YAAcpC,KAAKqC,k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BD,GACzBnI,KAAKC,iBAAmBkI,C","ignoreList":[]}
1
+ {"version":3,"names":["GovFormAutocomplete","constructor","hostRef","this","templateResolver","item","nameKey","listBoxId","createID","validateSize","newValue","validateProp","FormAutocompleteSizes","FormAutocompleteClass","root","watchOptions","setOptions","propsValueToArray","catch","onArrowUp","arrowCounter","moveToView","finally","onArrowDown","list","length","delay","heightOfList","listRef","offsetHeight","selected","querySelector","offsetTop","scrollTo","top","behavior","doSearch","Number","isInteger","minlength","isValueAccepted","processing","searchCallback","value","then","response","clearList","areOptions","options","componentDidLoad","attributeObserver","AttributeObserver","host","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","size","inheritedAttributes","inheritAriaAttributes","disconnectedCallback","stopObserving","removeAttribute","Object","assign","render","h","Host","key","class","placeholder","name","disabled","readonly","autocomplete","required","invalid","success","role","maxlength","throttle","onInputHandler","bind","throttleTime","onKeyUpHandler","onKeyDownHandler","onFocusHandler","onBlurHandler","join","booleanString","focused","ref","el","inputRef","toBoolAttr","hidden","id","messageEmpty","empty","loading","map","index","isSelected","innerHTML","tabindex","onTouchStart","e","onSelectHandler","onMouseDown","stopPropagation","govFocus","emit","originalEvent","component","govBlur","target","govInput","has","govSelect","event","detail","keyCode","preventDefault","setFocus","focus","setBlur","blur","Array","isArray","clearValue","setProcessing","status","setSearchCallback","callback","setTemplateResolver"],"sources":["../../../packages/core/src/components/gov-form/autocomplete/gov-form-autocomplete.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {booleanString, toBoolAttr} from '../../../helpers/Dom/template'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {Nullable} from '../../../types/interfaces'\nimport {createID} from '../../../utils/string.utils'\nimport {delay, has, throttle} from '../../../utils/utils'\nimport {FormInputEvent} from '../input/gov-form-input.types'\nimport {FormAutocompleteClass, FormAutocompleteSizes, SizesType,} from './constants'\nimport {FormAutocompleteEvent, GovFormAutocompleteItem} from './gov-form-autocomplete.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-form-autocomplete',\n})\nexport class GovFormAutocomplete {\n\tprivate inputRef?: HTMLGovFormInputElement\n\tprivate listRef?: HTMLUListElement\n\tprivate readonly listBoxId: string\n\tprivate searchCallback: (value: string) => Promise<GovFormAutocompleteItem[]>\n\tprivate templateResolver: (item: GovFormAutocompleteItem, selected: boolean) => string = item => item[this.nameKey]\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.listBoxId = createID('GovListBox')\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({reflect: true, mutable: true}) value = ''\n\t/**\n\t * Options of autocomplete\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | GovFormAutocompleteItem[]\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: SizesType = 'm'\n\t/**\n\t * Main key name in the object\n\t */\n\t@Prop({attribute: 'name-key'}) readonly nameKey: string = 'name'\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number = 3\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Input throttle in milliseconds\n\t */\n\t@Prop() readonly throttleTime: number = 200\n\t/**\n\t * Custom message for when there is a blank sheet\n\t */\n\t@Prop({attribute: 'message-empty'}) readonly messageEmpty: string = 'Nebyly nalezeny žádné výsledky'\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: 'gov-input'}) govInput: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: 'gov-select'}) govSelect: EventEmitter<FormAutocompleteEvent>\n\n\t@State() focused: boolean\n\t@State() processing = false\n\t@State() arrowCounter = -1\n\t@State() list: GovFormAutocompleteItem[] = []\n\t@State() inheritedAttributes: Attributes = {}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormAutocompleteSizes, newValue, FormAutocompleteClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | GovFormAutocompleteItem[]): void {\n\t\tthis.setOptions(propsValueToArray(newValue)).catch()\n\t}\n\n\tprivate onArrowUp() {\n\t\tif (this.arrowCounter > 0) {\n\t\t\tthis.arrowCounter = this.arrowCounter - 1\n\t\t\tthis.moveToView().finally()\n\t\t}\n\t}\n\n\tprivate onArrowDown() {\n\t\tif (this.arrowCounter < this.list.length - 1) {\n\t\t\tthis.arrowCounter = this.arrowCounter + 1\n\t\t\tthis.moveToView().finally()\n\t\t}\n\t}\n\n\tprivate async moveToView() {\n\t\tawait delay(200)\n\t\tconst heightOfList = this.listRef.offsetHeight\n\t\tconst selected = this.listRef.querySelector('li[aria-selected=\"true\"]') as HTMLUListElement\n\t\tif (selected && heightOfList) {\n\t\t\tconst offsetTop = selected.offsetTop\n\t\t\tthis.listRef.scrollTo({top: offsetTop, behavior: 'smooth'})\n\t\t}\n\t}\n\n\tprivate doSearch() {\n\t\tif (Number.isInteger(this.minlength) && this.isValueAccepted === false && this.minlength) {\n\t\t\tthis.list = []\n\t\t\tthis.arrowCounter = -1\n\t\t\tthis.processing = false\n\t\t\treturn\n\t\t}\n\t\tif (this.searchCallback) {\n\t\t\tthis.processing = true\n\t\t\tthis.searchCallback(this.value)\n\t\t\t\t.then(response => (this.list = response))\n\t\t\t\t.catch(() => (this.list = []))\n\t\t\t\t.finally(() => {\n\t\t\t\t\tthis.arrowCounter = -1\n\t\t\t\t\tthis.processing = false\n\t\t\t\t})\n\t\t}\n\t}\n\n\tprivate clearList() {\n\t\tconst areOptions = propsValueToArray<GovFormAutocompleteItem[]>(this.options)\n\t\tif (areOptions.length === 0) {\n\t\t\tthis.list = []\n\t\t}\n\t}\n\n\tget isValueAccepted() {\n\t\tif (typeof this.value === 'string') {\n\t\t\treturn this.value.length >= this.minlength\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormAutocompleteClass.root} size={this.size}>\n\t\t\t\t<gov-form-input\n\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\treadonly={this.readonly}\n\t\t\t\t\tautocomplete={false}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tinvalid={this.invalid}\n\t\t\t\t\tsuccess={this.success}\n\t\t\t\t\trole={'searchbox'}\n\t\t\t\t\tvalue={this.value}\n\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\ton-gov-input={throttle(this.onInputHandler.bind(this), this.throttleTime)}\n\t\t\t\t\ton-gov-keyup={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\ton-gov-keydown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\ton-gov-focus={this.onFocusHandler.bind(this)}\n\t\t\t\t\ton-gov-blur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-autocomplete={'list'}\n\t\t\t\t\taria-owns={[this.listBoxId, this.inheritedAttributes['aria-owns']].join(' ')}\n\t\t\t\t\taria-expanded={booleanString(this.list.length && this.focused ? true : false)}\n\t\t\t\t\tref={el => (this.inputRef = el as HTMLGovFormInputElement)}\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"validation-icon\" />\n\t\t\t\t\t<slot name=\"icon-end\" />\n\t\t\t\t</gov-form-input>\n\t\t\t\t<ul class={FormAutocompleteClass.list}\n\t\t\t\t\trole={'listbox'}\n\t\t\t\t\taria-hidden={toBoolAttr(!this.focused)}\n\t\t\t\t\thidden={!this.focused}\n\t\t\t\t\tid={this.listBoxId}\n\t\t\t\t\tref={el => (this.listRef = el as HTMLUListElement)}>\n\t\t\t\t\t{this.focused && this.list.length === 0 && this.processing === false && this.isValueAccepted && this.messageEmpty ? (\n\t\t\t\t\t\t<li class={FormAutocompleteClass.empty}>{this.messageEmpty}</li>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{this.focused && this.processing === true && this.isValueAccepted ? (\n\t\t\t\t\t\t<li class={FormAutocompleteClass.loading}>\n\t\t\t\t\t\t\t<gov-skeleton size=\"m\"></gov-skeleton>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{this.focused ? this.list.map((item, index) => {\n\t\t\t\t\t\tconst isSelected = this.arrowCounter === index\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\tclass={FormAutocompleteClass.item}\n\t\t\t\t\t\t\t\tinnerHTML={this.templateResolver(item, isSelected)}\n\t\t\t\t\t\t\t\trole={'option'}\n\t\t\t\t\t\t\t\taria-posinset={index}\n\t\t\t\t\t\t\t\ttabindex={isSelected ? 0 : -1}\n\t\t\t\t\t\t\t\taria-setsize={this.list.length}\n\t\t\t\t\t\t\t\tonTouchStart={(e: TouchEvent) => this.onSelectHandler(e, index)}\n\t\t\t\t\t\t\t\tonMouseDown={(e: PointerEvent) => this.onSelectHandler(e, index)}\n\t\t\t\t\t\t\t\taria-selected={toBoolAttr(isSelected)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<slot name=\"list-item-left\"/>\n\t\t\t\t\t\t\t\t<slot name=\"list-item-right\"/>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t)\n\t\t\t\t\t}) : null}\n\t\t\t\t</ul>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.arrowCounter = -1\n\t\tif (this.isValueAccepted && this.searchCallback) {\n\t\t\tthis.doSearch()\n\t\t}\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.clearList();\n\t\tthis.arrowCounter = -1\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLGovFormInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t\tthis.doSearch()\n\t}\n\n\tprivate onSelectHandler(e: PointerEvent | CustomEvent | TouchEvent, index = -1) {\n\t\tlet selected: Nullable<GovFormAutocompleteItem> = null\n\t\tif (index > -1) {\n\t\t\tselected = this.list[index]\n\t\t} else if (has(this.arrowCounter, this.list)) {\n\t\t\tselected = this.list[this.arrowCounter]\n\t\t}\n\t\tif (selected) {\n\t\t\tthis.govSelect.emit({\n\t\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\t\tvalue: this.value,\n\t\t\t\tselected: selected,\n\t\t\t\toriginalEvent: e,\n\t\t\t})\n\t\t\tthis.clearList();\n\t\t\tif (has(this.nameKey, selected) && typeof selected[this.nameKey] === 'string') {\n\t\t\t\tthis.value = selected[this.nameKey]\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate onKeyUpHandler(e: CustomEvent) {\n\t\tconst event = (e.detail as FormInputEvent).originalEvent as KeyboardEvent\n\t\te.stopPropagation()\n\t\tevent.stopPropagation()\n\t\tif (event.keyCode === 38) this.onArrowUp()\n\t\telse if (event.keyCode === 40) this.onArrowDown()\n\t\telse if (event.keyCode === 13) {\n\t\t\te.preventDefault()\n\t\t\tevent.preventDefault()\n\t\t\tthis.onSelectHandler(e)\n\t\t}\n\t}\n\n\tprivate onKeyDownHandler(e: CustomEvent) {\n\t\tconst event = (e.detail as FormInputEvent).originalEvent as KeyboardEvent\n\t\te.stopPropagation()\n\t\tevent.stopPropagation()\n\t\tif (event.keyCode === 13) {\n\t\t\te.preventDefault()\n\t\t\tevent.preventDefault()\n\t\t}\n\t}\n\n\t/**\n\t * Focus main input element\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Blur main input element\n\t */\n\t@Method()\n\tasync setBlur(): Promise<void> {\n\t\treturn this.inputRef.blur()\n\t}\n\n\t/**\n\t * Set options for list\n\t */\n\t@Method()\n\tasync setOptions(options: GovFormAutocompleteItem[]): Promise<void> {\n\t\tthis.list = Array.isArray(options) ? options : []\n\t\tthis.arrowCounter = -1\n\t}\n\n\t/**\n\t * Clears whisperer value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = ''\n\t\tthis.inputRef.value = ''\n\n\t\tawait this.inputRef.clearValue()\n\t}\n\n\t/**\n\t * Clears whisperer value\n\t */\n\t@Method()\n\tasync setProcessing(status: boolean): Promise<void> {\n\t\tthis.processing = status\n\t}\n\n\t/**\n\t * Set a custom asynchronous function for the whisperer\n\t */\n\t@Method()\n\tasync setSearchCallback(callback: (value: string) => Promise<any>) {\n\t\tthis.searchCallback = callback\n\t}\n\n\t/**\n\t * Setting a custom whisper result template\n\t * @param callback\n\t */\n\t@Method()\n\tasync setTemplateResolver(callback: (item: GovFormAutocompleteItem) => string) {\n\t\tthis.templateResolver = callback\n\t}\n}\n"],"mappings":"4cAiBaA,EAAmB,MAQ/B,WAAAC,CAAAC,G,0JAHQC,KAAAC,iBAAiFC,GAAQA,EAAKF,KAAKG,S,WAW7D,G,kFAgBV,I,aAIsB,O,kCASrB,M,cAKe,M,yFAgBf,E,2CA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GAAIvH,KAAKgB,iBAC1B,GAAIqG,EAAME,UAAY,GAAIvH,KAAKoB,mBAC/B,GAAIiG,EAAME,UAAY,GAAI,CAC9Bf,EAAEgB,iBACFH,EAAMG,iBACNxH,KAAKyG,gBAAgBD,E,EAIf,gBAAArB,CAAiBqB,GACxB,MAAMa,EAASb,EAAEc,OAA0BR,cAC3CN,EAAEG,kBACFU,EAAMV,kBACN,GAAIU,EAAME,UAAY,GAAI,CACzBf,EAAEgB,iBACFH,EAAMG,gB,EAQR,cAAMC,CAAS5E,GACd,OAAO7C,KAAK2F,SAAS+B,MAAM7E,E,CAO5B,aAAM8E,GACL,OAAO3H,KAAK2F,SAASiC,M,CAOtB,gBAAM/G,CAAWgC,GAChB7C,KAAKqB,KAAOwG,MAAMC,QAAQjF,GAAWA,EAAU,GAC/C7C,KAAKiB,cAAgB,C,CAOtB,gBAAM8G,GACL/H,KAAKwC,MAAQ,GACbxC,KAAK2F,SAASnD,MAAQ,SAEhBxC,KAAK2F,SAASoC,Y,CAOrB,mBAAMC,CAAcC,GACnBjI,KAAKsC,WAAa2F,C,CAOnB,uBAAMC,CAAkBC,GACvBnI,KAAKuC,eAAiB4F,C,CAQvB,yBAAMC,CAAoBD,GACzBnI,KAAKC,iBAAmBkI,C","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as t,h as a,a as s,g as e}from"./p-8506b611.js";import{a as i,b as r,c as o}from"./p-e44a0fee.js";import{g as p}from"./p-ea7fdd2e.js";import{v as c}from"./p-0b3574c2.js";import"./p-e0e2e9c1.js";import"./p-92f420cb.js";import"./p-e8ec030e.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,i.root)}}validateOrientation(t){if(t){c(o,t,i.root)}}componentWillLoad(){this.validateGap(this.gap);this.validateOrientation(this.orientation)}render(){return a(s,{key:"a6b2a022f3c8573fb1bb7424d6a5ac2dc54b101b",gap:this.gap,class:this.h.classes(i.root)},a("slot",{key:"e1b5f38d87e9f46f555e2fc3d247a9c3c10b5872"}))}get host(){return e(this)}static get watchers(){return{gap:["validateGap"],orientation:["validateOrientation"]}}};export{f as gov_form_group};
2
+ //# sourceMappingURL=p-f4dac942.entry.js.map