@gov-design-system-ce/components 4.0.6 → 4.0.8-rc01

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 (504) hide show
  1. package/dist/cjs/array.utils-5a024b3a.js +46 -0
  2. package/dist/cjs/array.utils-5a024b3a.js.map +1 -0
  3. package/dist/cjs/core.cjs.js +1 -1
  4. package/dist/cjs/{form-74063d50.js → form-47b5ef29.js} +2 -2
  5. package/dist/cjs/form-47b5ef29.js.map +1 -0
  6. package/dist/cjs/gov-accordion-item.cjs.entry.js +1 -1
  7. package/dist/cjs/gov-accordion.cjs.entry.js +1 -1
  8. package/dist/cjs/gov-attachments_3.cjs.entry.js +1 -1
  9. package/dist/cjs/gov-backdrop.cjs.entry.js +1 -1
  10. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +26 -3
  11. package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
  12. package/dist/cjs/gov-button.cjs.entry.js +7 -4
  13. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  14. package/dist/cjs/gov-card.cjs.entry.js +1 -1
  15. package/dist/cjs/gov-chip.cjs.entry.js +2 -2
  16. package/dist/cjs/gov-chip.cjs.entry.js.map +1 -1
  17. package/dist/cjs/gov-container.cjs.entry.js +1 -1
  18. package/dist/cjs/gov-control-group.cjs.entry.js +1 -1
  19. package/dist/cjs/gov-cookiebar.cjs.entry.js +1 -1
  20. package/dist/cjs/gov-dropdown.cjs.entry.js +1 -1
  21. package/dist/cjs/gov-empty.cjs.entry.js +1 -1
  22. package/dist/cjs/gov-error-code.cjs.entry.js +1 -1
  23. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +1 -1
  24. package/dist/cjs/gov-form-checkbox.cjs.entry.js +2 -2
  25. package/dist/cjs/gov-form-control.cjs.entry.js +2 -2
  26. package/dist/cjs/gov-form-file.cjs.entry.js +17 -5
  27. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  28. package/dist/cjs/gov-form-group.cjs.entry.js +1 -1
  29. package/dist/cjs/gov-form-input.cjs.entry.js +6 -2
  30. package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
  31. package/dist/cjs/gov-form-multi-select.cjs.entry.js +83 -102
  32. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  33. package/dist/cjs/gov-form-radio.cjs.entry.js +2 -2
  34. package/dist/cjs/gov-form-search.cjs.entry.js +1 -1
  35. package/dist/cjs/gov-form-search.cjs.entry.js.map +1 -1
  36. package/dist/cjs/gov-form-select.cjs.entry.js +15 -19
  37. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  38. package/dist/cjs/gov-form-switch.cjs.entry.js +2 -2
  39. package/dist/cjs/gov-grid-item.cjs.entry.js +1 -1
  40. package/dist/cjs/gov-grid.cjs.entry.js +1 -1
  41. package/dist/cjs/gov-icon.cjs.entry.js +2 -2
  42. package/dist/cjs/gov-infobar.cjs.entry.js +3 -2
  43. package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -1
  44. package/dist/cjs/gov-layout-column.cjs.entry.js +1 -1
  45. package/dist/cjs/gov-layout.cjs.entry.js +1 -1
  46. package/dist/cjs/gov-loading.cjs.entry.js +1 -1
  47. package/dist/cjs/gov-message.cjs.entry.js +1 -1
  48. package/dist/cjs/gov-modal.cjs.entry.js +5 -2
  49. package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
  50. package/dist/cjs/gov-pagination.cjs.entry.js +9 -11
  51. package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
  52. package/dist/cjs/gov-prompt.cjs.entry.js +5 -2
  53. package/dist/cjs/gov-prompt.cjs.entry.js.map +1 -1
  54. package/dist/cjs/gov-side-nav-item.cjs.entry.js +1 -1
  55. package/dist/cjs/gov-side-nav.cjs.entry.js +1 -1
  56. package/dist/cjs/gov-skeleton.cjs.entry.js +1 -1
  57. package/dist/cjs/gov-spacer.cjs.entry.js +1 -1
  58. package/dist/cjs/gov-statsbar-item.cjs.entry.js +1 -1
  59. package/dist/cjs/gov-statsbar.cjs.entry.js +1 -1
  60. package/dist/cjs/gov-stepper-item.cjs.entry.js +1 -1
  61. package/dist/cjs/gov-stepper.cjs.entry.js +1 -1
  62. package/dist/cjs/gov-tabs-item.cjs.entry.js +1 -1
  63. package/dist/cjs/gov-tabs.cjs.entry.js +1 -1
  64. package/dist/cjs/gov-tag.cjs.entry.js +2 -2
  65. package/dist/cjs/gov-tag.cjs.entry.js.map +1 -1
  66. package/dist/cjs/gov-tile.cjs.entry.js +3 -3
  67. package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
  68. package/dist/cjs/gov-tiles.cjs.entry.js +1 -1
  69. package/dist/cjs/gov-toast.cjs.entry.js +1 -1
  70. package/dist/cjs/gov-tooltip-content.cjs.entry.js +2 -2
  71. package/dist/cjs/gov-tooltip-content.cjs.entry.js.map +1 -1
  72. package/dist/cjs/gov-tooltip.cjs.entry.js +8 -9
  73. package/dist/cjs/gov-tooltip.cjs.entry.js.map +1 -1
  74. package/dist/cjs/gov-wizard-item.cjs.entry.js +1 -1
  75. package/dist/cjs/gov-wizard.cjs.entry.js +1 -1
  76. package/dist/cjs/loader.cjs.js +1 -1
  77. package/dist/cjs/stencil.utils-22814956.js +11 -0
  78. package/dist/cjs/stencil.utils-22814956.js.map +1 -0
  79. package/dist/cjs/{template-4b951d1d.js → template-9534c584.js} +5 -1
  80. package/dist/cjs/template-9534c584.js.map +1 -0
  81. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.css +58 -16
  82. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +48 -1
  83. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js.map +1 -1
  84. package/dist/collection/components/gov-button/button/gov-button.css +1 -1
  85. package/dist/collection/components/gov-button/button/gov-button.js +13 -16
  86. package/dist/collection/components/gov-button/button/gov-button.js.map +1 -1
  87. package/dist/collection/components/gov-chip/gov-chip.css +2 -6
  88. package/dist/collection/components/gov-form/file/gov-form-file.js +51 -3
  89. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  90. package/dist/collection/components/gov-form/input/gov-form-input.js +18 -0
  91. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  92. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +134 -253
  93. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
  94. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.types.js.map +1 -1
  95. package/dist/collection/components/gov-form/search/gov-form-search.css +1 -1
  96. package/dist/collection/components/gov-form/select/constants.js +1 -1
  97. package/dist/collection/components/gov-form/select/constants.js.map +1 -1
  98. package/dist/collection/components/gov-form/select/gov-form-select.js +40 -64
  99. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  100. package/dist/collection/components/gov-form/select/gov-form-select.types.js.map +1 -1
  101. package/dist/collection/components/gov-infobar/gov-infobar.js +25 -1
  102. package/dist/collection/components/gov-infobar/gov-infobar.js.map +1 -1
  103. package/dist/collection/components/gov-modal/gov-modal.js +6 -3
  104. package/dist/collection/components/gov-modal/gov-modal.js.map +1 -1
  105. package/dist/collection/components/gov-pagination/gov-pagination.js +80 -5
  106. package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
  107. package/dist/collection/components/gov-promp/gov-prompt.js +4 -1
  108. package/dist/collection/components/gov-promp/gov-prompt.js.map +1 -1
  109. package/dist/collection/components/gov-tag/gov-tag.css +5 -100
  110. package/dist/collection/components/gov-tile/gov-tile.css +3 -5
  111. package/dist/collection/components/gov-tile/gov-tile.js +1 -1
  112. package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
  113. package/dist/collection/components/gov-tooltip/gov-tooltip-content.css +2 -1
  114. package/dist/collection/components/gov-tooltip/gov-tooltip.js +7 -8
  115. package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
  116. package/dist/collection/helpers/Dom/template.js +3 -0
  117. package/dist/collection/helpers/Dom/template.js.map +1 -1
  118. package/dist/collection/pages/Breadcrumbs.js +3 -2
  119. package/dist/collection/pages/Breadcrumbs.js.map +1 -1
  120. package/dist/collection/pages/Button.js +101 -101
  121. package/dist/collection/pages/Button.js.map +1 -1
  122. package/dist/collection/pages/Chip.js +50 -50
  123. package/dist/collection/pages/Chip.js.map +1 -1
  124. package/dist/collection/pages/Forms.js +27 -17
  125. package/dist/collection/pages/Forms.js.map +1 -1
  126. package/dist/collection/pages/Tag.js +27 -27
  127. package/dist/collection/pages/Tag.js.map +1 -1
  128. package/dist/collection/pages/Tooltip.js +13 -16
  129. package/dist/collection/pages/Tooltip.js.map +1 -1
  130. package/dist/collection/utils/array.utils.js +14 -0
  131. package/dist/collection/utils/array.utils.js.map +1 -1
  132. package/dist/collection/utils/object.utils.js +18 -0
  133. package/dist/collection/utils/object.utils.js.map +1 -0
  134. package/dist/collection/utils/stencil.utils.js +6 -0
  135. package/dist/collection/utils/stencil.utils.js.map +1 -0
  136. package/dist/components/gov-accordion-item.js +1 -1
  137. package/dist/components/gov-accordion.js +1 -1
  138. package/dist/components/gov-attachments-item.js +1 -1
  139. package/dist/components/gov-attachments.js +1 -1
  140. package/dist/components/gov-backdrop.js +1 -1
  141. package/dist/components/gov-breadcrumbs.js +1 -1
  142. package/dist/components/gov-breadcrumbs.js.map +1 -1
  143. package/dist/components/gov-button.js +1 -1
  144. package/dist/components/gov-card.js +1 -1
  145. package/dist/components/gov-chip.js +1 -1
  146. package/dist/components/gov-container.js +1 -1
  147. package/dist/components/gov-control-group.js +1 -1
  148. package/dist/components/gov-cookiebar.js +1 -1
  149. package/dist/components/gov-dropdown.js +1 -1
  150. package/dist/components/gov-empty.js +1 -1
  151. package/dist/components/gov-error-code.js +1 -1
  152. package/dist/components/gov-form-autocomplete.js +1 -1
  153. package/dist/components/gov-form-checkbox.js +1 -1
  154. package/dist/components/gov-form-control.js +1 -1
  155. package/dist/components/gov-form-file.js +1 -1
  156. package/dist/components/gov-form-file.js.map +1 -1
  157. package/dist/components/gov-form-group.js +1 -1
  158. package/dist/components/gov-form-input.js +1 -1
  159. package/dist/components/gov-form-message.js +1 -1
  160. package/dist/components/gov-form-multi-select.js +1 -1
  161. package/dist/components/gov-form-multi-select.js.map +1 -1
  162. package/dist/components/gov-form-radio.js +1 -1
  163. package/dist/components/gov-form-search.js +1 -1
  164. package/dist/components/gov-form-search.js.map +1 -1
  165. package/dist/components/gov-form-select.js +1 -1
  166. package/dist/components/gov-form-switch.js +1 -1
  167. package/dist/components/gov-grid-item.js +1 -1
  168. package/dist/components/gov-grid.js +1 -1
  169. package/dist/components/gov-icon.js +1 -1
  170. package/dist/components/gov-infobar.js +1 -1
  171. package/dist/components/gov-infobar.js.map +1 -1
  172. package/dist/components/gov-layout-column.js +1 -1
  173. package/dist/components/gov-layout.js +1 -1
  174. package/dist/components/gov-loading.js +1 -1
  175. package/dist/components/gov-message.js +1 -1
  176. package/dist/components/gov-modal.js +1 -1
  177. package/dist/components/gov-modal.js.map +1 -1
  178. package/dist/components/gov-pagination.js +1 -1
  179. package/dist/components/gov-pagination.js.map +1 -1
  180. package/dist/components/gov-prompt.js +1 -1
  181. package/dist/components/gov-prompt.js.map +1 -1
  182. package/dist/components/gov-side-nav-item.js +1 -1
  183. package/dist/components/gov-side-nav.js +1 -1
  184. package/dist/components/gov-side-nav.js.map +1 -1
  185. package/dist/components/gov-skeleton.js +1 -1
  186. package/dist/components/gov-skeleton.js.map +1 -1
  187. package/dist/components/gov-spacer.js +1 -1
  188. package/dist/components/gov-statsbar-item.js +1 -1
  189. package/dist/components/gov-statsbar.js +1 -1
  190. package/dist/components/gov-stepper-item.js +1 -1
  191. package/dist/components/gov-stepper.js +1 -1
  192. package/dist/components/gov-tabs-item.js +1 -1
  193. package/dist/components/gov-tabs.js +1 -1
  194. package/dist/components/gov-tag.js +1 -1
  195. package/dist/components/gov-tag.js.map +1 -1
  196. package/dist/components/gov-tile.js +1 -1
  197. package/dist/components/gov-tile.js.map +1 -1
  198. package/dist/components/gov-tiles.js +1 -1
  199. package/dist/components/gov-toast.js +1 -1
  200. package/dist/components/gov-tooltip-content.js +1 -1
  201. package/dist/components/gov-tooltip-content.js.map +1 -1
  202. package/dist/components/gov-tooltip.js +1 -1
  203. package/dist/components/gov-tooltip.js.map +1 -1
  204. package/dist/components/gov-wizard-item.js +1 -1
  205. package/dist/components/gov-wizard.js +1 -1
  206. package/dist/components/{p-b526e440.js → p-033f8bda.js} +2 -2
  207. package/dist/components/{p-ec6c2272.js → p-23990b41.js} +2 -2
  208. package/dist/components/{p-62074db5.js → p-26805569.js} +2 -2
  209. package/dist/components/p-2dee9951.js.map +1 -1
  210. package/dist/components/p-6c1d0f47.js +2 -0
  211. package/dist/components/p-6c1d0f47.js.map +1 -0
  212. package/dist/components/p-a6a15eb1.js +2 -0
  213. package/dist/components/p-a6a15eb1.js.map +1 -0
  214. package/dist/components/p-b48d3aae.js +2 -0
  215. package/dist/components/p-b48d3aae.js.map +1 -0
  216. package/dist/components/{p-990d2990.js → p-b5a06a0a.js} +2 -2
  217. package/dist/components/p-b5a06a0a.js.map +1 -0
  218. package/dist/components/{p-9795ad94.js → p-b9ee51d6.js} +2 -2
  219. package/dist/components/{p-28e59384.js → p-c353678b.js} +2 -2
  220. package/dist/components/p-c353678b.js.map +1 -0
  221. package/dist/components/p-c9baa62f.js +2 -0
  222. package/dist/components/p-c9baa62f.js.map +1 -0
  223. package/dist/components/{p-d29431c0.js → p-e2bee1ef.js} +2 -2
  224. package/dist/components/p-e2bee1ef.js.map +1 -0
  225. package/dist/components/{p-570803ab.js → p-f8b7ea69.js} +2 -2
  226. package/dist/components/p-f9f8e529.js +2 -0
  227. package/dist/components/{p-6f391c4a.js.map → p-f9f8e529.js.map} +1 -1
  228. package/dist/core/core.css +1 -1
  229. package/dist/core/core.esm.js +1 -1
  230. package/dist/core/core.esm.js.map +1 -1
  231. package/dist/core/{p-96d141a3.entry.js → p-0028fadc.entry.js} +2 -2
  232. package/dist/core/{p-2969eb69.entry.js → p-0ab12526.entry.js} +2 -2
  233. package/dist/core/{p-22abe742.entry.js → p-0c5c6dee.entry.js} +2 -2
  234. package/dist/core/{p-1116fec6.entry.js → p-127af1b4.entry.js} +2 -2
  235. package/dist/core/{p-fb51d693.entry.js → p-151f1b89.entry.js} +2 -2
  236. package/dist/core/{p-fd4b0f54.entry.js → p-191e9b0c.entry.js} +2 -2
  237. package/dist/core/p-1cbd2c7c.entry.js +2 -0
  238. package/dist/core/p-1cbd2c7c.entry.js.map +1 -0
  239. package/dist/core/{p-fc8a29e9.entry.js → p-2a13c39c.entry.js} +2 -2
  240. package/dist/core/{p-6dc942b8.entry.js → p-2d1f3d62.entry.js} +2 -2
  241. package/dist/core/p-2d1f3d62.entry.js.map +1 -0
  242. package/dist/core/p-30673e46.entry.js +2 -0
  243. package/dist/core/p-30673e46.entry.js.map +1 -0
  244. package/dist/core/{p-de3429ab.entry.js → p-3975851f.entry.js} +2 -2
  245. package/dist/core/{p-141d9af4.entry.js → p-4988c0bb.entry.js} +2 -2
  246. package/dist/core/p-4b4a270d.entry.js +2 -0
  247. package/dist/core/p-4b4a270d.entry.js.map +1 -0
  248. package/dist/core/{p-83e998d8.entry.js → p-529ce9a4.entry.js} +2 -2
  249. package/dist/core/{p-fc2a1e14.entry.js → p-53e0ad52.entry.js} +2 -2
  250. package/dist/core/{p-81593c86.entry.js → p-54fa7af5.entry.js} +2 -2
  251. package/dist/core/{p-41c18f64.entry.js → p-555eaa93.entry.js} +2 -2
  252. package/dist/core/{p-e24236b0.entry.js → p-55cb727e.entry.js} +2 -2
  253. package/dist/core/p-575d0c94.entry.js +2 -0
  254. package/dist/core/p-575d0c94.entry.js.map +1 -0
  255. package/dist/core/p-5bc604a3.js.map +1 -1
  256. package/dist/core/{p-28e59384.js → p-5de606f8.js} +2 -2
  257. package/dist/core/p-5de606f8.js.map +1 -0
  258. package/dist/core/{p-3c12c766.entry.js → p-60d681a6.entry.js} +2 -2
  259. package/dist/core/{p-b4a59c79.entry.js → p-64c5748e.entry.js} +2 -2
  260. package/dist/core/p-64c5748e.entry.js.map +1 -0
  261. package/dist/core/p-67096d72.entry.js +2 -0
  262. package/dist/core/p-67096d72.entry.js.map +1 -0
  263. package/dist/core/{p-b49293dc.entry.js → p-6bf8e7bf.entry.js} +2 -2
  264. package/dist/core/{p-89b3e4d4.entry.js → p-72c5997f.entry.js} +2 -2
  265. package/dist/core/p-7f158b6f.entry.js +2 -0
  266. package/dist/core/p-7f158b6f.entry.js.map +1 -0
  267. package/dist/core/p-831edc90.entry.js +2 -0
  268. package/dist/core/p-831edc90.entry.js.map +1 -0
  269. package/dist/core/{p-bb7f0a66.entry.js → p-8f121cad.entry.js} +2 -2
  270. package/dist/core/p-8fcc8483.js +2 -0
  271. package/dist/core/p-8fcc8483.js.map +1 -0
  272. package/dist/core/{p-01d928c5.entry.js → p-90c068ff.entry.js} +2 -2
  273. package/dist/core/{p-cf86a858.entry.js → p-927880d6.entry.js} +2 -2
  274. package/dist/core/p-927880d6.entry.js.map +1 -0
  275. package/dist/core/{p-b4ab0d15.entry.js → p-9469ecc2.entry.js} +2 -2
  276. package/dist/core/{p-f29b0193.entry.js → p-984b36f7.entry.js} +2 -2
  277. package/dist/core/p-9c04470d.entry.js +2 -0
  278. package/dist/core/p-9c04470d.entry.js.map +1 -0
  279. package/dist/core/{p-ccf73a1a.entry.js → p-a35484ed.entry.js} +2 -2
  280. package/dist/core/p-a49391e5.entry.js +2 -0
  281. package/dist/core/p-a49391e5.entry.js.map +1 -0
  282. package/dist/core/{p-b127c8a8.entry.js → p-aaf2510a.entry.js} +2 -2
  283. package/dist/core/p-aaf2510a.entry.js.map +1 -0
  284. package/dist/core/p-ab5a13ea.js +2 -0
  285. package/dist/core/p-ab5a13ea.js.map +1 -0
  286. package/dist/core/{p-b580666b.entry.js → p-adf276b0.entry.js} +2 -2
  287. package/dist/core/{p-b1184db4.entry.js → p-af9a14e3.entry.js} +2 -2
  288. package/dist/core/{p-e5c2f601.entry.js → p-b7e0b030.entry.js} +2 -2
  289. package/dist/core/{p-78942f76.entry.js → p-be8eec3f.entry.js} +2 -2
  290. package/dist/core/{p-9c6699d6.entry.js → p-c0e8802d.entry.js} +2 -2
  291. package/dist/core/p-c0e8802d.entry.js.map +1 -0
  292. package/dist/core/{p-f1227928.entry.js → p-c6a4ca41.entry.js} +2 -2
  293. package/dist/core/{p-67138ae9.entry.js → p-ce1486b8.entry.js} +2 -2
  294. package/dist/core/{p-ee4c58e3.entry.js → p-d2c370d6.entry.js} +2 -2
  295. package/dist/core/p-d513468a.entry.js +2 -0
  296. package/dist/core/p-d513468a.entry.js.map +1 -0
  297. package/dist/core/p-d784c44d.js +2 -0
  298. package/dist/core/p-d784c44d.js.map +1 -0
  299. package/dist/core/{p-ac5e5b2c.entry.js → p-dd4445ee.entry.js} +2 -2
  300. package/dist/core/{p-b7d23697.entry.js → p-dd8816aa.entry.js} +2 -2
  301. package/dist/core/p-dd8816aa.entry.js.map +1 -0
  302. package/dist/core/{p-92af05f2.entry.js → p-e4f11ddf.entry.js} +2 -2
  303. package/dist/core/{p-6675a0f0.entry.js → p-eaedc9e3.entry.js} +2 -2
  304. package/dist/core/{p-b5e1ee46.entry.js → p-ed580ac7.entry.js} +2 -2
  305. package/dist/core/p-ef387ab2.entry.js +2 -0
  306. package/dist/core/{p-f76f0a67.entry.js.map → p-ef387ab2.entry.js.map} +1 -1
  307. package/dist/core/{p-f636a1ca.entry.js → p-f2206bbb.entry.js} +2 -2
  308. package/dist/core/{p-497c90ea.entry.js → p-f4f969d0.entry.js} +2 -2
  309. package/dist/core/p-f4f969d0.entry.js.map +1 -0
  310. package/dist/core/{p-4a235ef5.entry.js → p-f59b858f.entry.js} +2 -2
  311. package/dist/core/{p-7757e4a1.entry.js → p-fc710edb.entry.js} +2 -2
  312. package/dist/esm/array.utils-b27436ea.js +43 -0
  313. package/dist/esm/array.utils-b27436ea.js.map +1 -0
  314. package/dist/esm/core.js +1 -1
  315. package/dist/esm/{form-39dc6896.js → form-e3424b70.js} +2 -2
  316. package/dist/esm/form-e3424b70.js.map +1 -0
  317. package/dist/esm/gov-accordion-item.entry.js +1 -1
  318. package/dist/esm/gov-accordion.entry.js +1 -1
  319. package/dist/esm/gov-attachments_3.entry.js +1 -1
  320. package/dist/esm/gov-backdrop.entry.js +1 -1
  321. package/dist/esm/gov-breadcrumbs.entry.js +26 -3
  322. package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
  323. package/dist/esm/gov-button.entry.js +7 -4
  324. package/dist/esm/gov-button.entry.js.map +1 -1
  325. package/dist/esm/gov-card.entry.js +1 -1
  326. package/dist/esm/gov-chip.entry.js +2 -2
  327. package/dist/esm/gov-chip.entry.js.map +1 -1
  328. package/dist/esm/gov-container.entry.js +1 -1
  329. package/dist/esm/gov-control-group.entry.js +1 -1
  330. package/dist/esm/gov-cookiebar.entry.js +1 -1
  331. package/dist/esm/gov-dropdown.entry.js +1 -1
  332. package/dist/esm/gov-empty.entry.js +1 -1
  333. package/dist/esm/gov-error-code.entry.js +1 -1
  334. package/dist/esm/gov-form-autocomplete.entry.js +1 -1
  335. package/dist/esm/gov-form-checkbox.entry.js +2 -2
  336. package/dist/esm/gov-form-control.entry.js +2 -2
  337. package/dist/esm/gov-form-file.entry.js +17 -5
  338. package/dist/esm/gov-form-file.entry.js.map +1 -1
  339. package/dist/esm/gov-form-group.entry.js +1 -1
  340. package/dist/esm/gov-form-input.entry.js +6 -2
  341. package/dist/esm/gov-form-input.entry.js.map +1 -1
  342. package/dist/esm/gov-form-multi-select.entry.js +83 -102
  343. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  344. package/dist/esm/gov-form-radio.entry.js +2 -2
  345. package/dist/esm/gov-form-search.entry.js +1 -1
  346. package/dist/esm/gov-form-search.entry.js.map +1 -1
  347. package/dist/esm/gov-form-select.entry.js +15 -19
  348. package/dist/esm/gov-form-select.entry.js.map +1 -1
  349. package/dist/esm/gov-form-switch.entry.js +2 -2
  350. package/dist/esm/gov-grid-item.entry.js +1 -1
  351. package/dist/esm/gov-grid.entry.js +1 -1
  352. package/dist/esm/gov-icon.entry.js +2 -2
  353. package/dist/esm/gov-infobar.entry.js +3 -2
  354. package/dist/esm/gov-infobar.entry.js.map +1 -1
  355. package/dist/esm/gov-layout-column.entry.js +1 -1
  356. package/dist/esm/gov-layout.entry.js +1 -1
  357. package/dist/esm/gov-loading.entry.js +1 -1
  358. package/dist/esm/gov-message.entry.js +1 -1
  359. package/dist/esm/gov-modal.entry.js +5 -2
  360. package/dist/esm/gov-modal.entry.js.map +1 -1
  361. package/dist/esm/gov-pagination.entry.js +9 -11
  362. package/dist/esm/gov-pagination.entry.js.map +1 -1
  363. package/dist/esm/gov-prompt.entry.js +5 -2
  364. package/dist/esm/gov-prompt.entry.js.map +1 -1
  365. package/dist/esm/gov-side-nav-item.entry.js +1 -1
  366. package/dist/esm/gov-side-nav.entry.js +1 -1
  367. package/dist/esm/gov-skeleton.entry.js +1 -1
  368. package/dist/esm/gov-spacer.entry.js +1 -1
  369. package/dist/esm/gov-statsbar-item.entry.js +1 -1
  370. package/dist/esm/gov-statsbar.entry.js +1 -1
  371. package/dist/esm/gov-stepper-item.entry.js +1 -1
  372. package/dist/esm/gov-stepper.entry.js +1 -1
  373. package/dist/esm/gov-tabs-item.entry.js +1 -1
  374. package/dist/esm/gov-tabs.entry.js +1 -1
  375. package/dist/esm/gov-tag.entry.js +2 -2
  376. package/dist/esm/gov-tag.entry.js.map +1 -1
  377. package/dist/esm/gov-tile.entry.js +3 -3
  378. package/dist/esm/gov-tile.entry.js.map +1 -1
  379. package/dist/esm/gov-tiles.entry.js +1 -1
  380. package/dist/esm/gov-toast.entry.js +1 -1
  381. package/dist/esm/gov-tooltip-content.entry.js +2 -2
  382. package/dist/esm/gov-tooltip-content.entry.js.map +1 -1
  383. package/dist/esm/gov-tooltip.entry.js +8 -9
  384. package/dist/esm/gov-tooltip.entry.js.map +1 -1
  385. package/dist/esm/gov-wizard-item.entry.js +1 -1
  386. package/dist/esm/gov-wizard.entry.js +1 -1
  387. package/dist/esm/loader.js +1 -1
  388. package/dist/esm/stencil.utils-7cb5b075.js +9 -0
  389. package/dist/esm/stencil.utils-7cb5b075.js.map +1 -0
  390. package/dist/esm/{template-df429738.js → template-a0067bb6.js} +5 -2
  391. package/dist/esm/template-a0067bb6.js.map +1 -0
  392. package/dist/hydrate/index.js +238 -167
  393. package/dist/stencil.config.js +23 -1
  394. package/dist/stencil.config.js.map +1 -1
  395. package/dist/types/Users/iwory/iWork/asseco/mv/gov-design-system-ce/packages/core/.stencil/packages/core/stencil.config.d.ts +2 -0
  396. package/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.ts +9 -0
  397. package/dist/types/components/gov-button/button/gov-button.d.ts +5 -4
  398. package/dist/types/components/gov-form/file/gov-form-file.d.ts +9 -0
  399. package/dist/types/components/gov-form/input/gov-form-input.d.ts +5 -0
  400. package/dist/types/components/gov-form/multiselect/gov-form-multi-select.d.ts +17 -29
  401. package/dist/types/components/gov-form/multiselect/gov-form-multi-select.types.d.ts +3 -2
  402. package/dist/types/components/gov-form/select/constants.d.ts +1 -1
  403. package/dist/types/components/gov-form/select/gov-form-select.d.ts +6 -9
  404. package/dist/types/components/gov-form/select/gov-form-select.types.d.ts +1 -1
  405. package/dist/types/components/gov-infobar/gov-infobar.d.ts +4 -0
  406. package/dist/types/components/gov-modal/gov-modal.d.ts +1 -0
  407. package/dist/types/components/gov-pagination/gov-pagination.d.ts +17 -1
  408. package/dist/types/components/gov-promp/gov-prompt.d.ts +1 -0
  409. package/dist/types/components/gov-tile/gov-tile.d.ts +3 -3
  410. package/dist/types/components.d.ts +100 -40
  411. package/dist/types/helpers/Dom/template.d.ts +1 -0
  412. package/dist/types/utils/array.utils.d.ts +1 -0
  413. package/dist/types/utils/object.utils.d.ts +1 -0
  414. package/dist/types/utils/stencil.utils.d.ts +1 -0
  415. package/package.json +2 -2
  416. package/dist/cjs/form-74063d50.js.map +0 -1
  417. package/dist/cjs/template-4b951d1d.js.map +0 -1
  418. package/dist/components/p-28e59384.js.map +0 -1
  419. package/dist/components/p-43554d2d.js +0 -2
  420. package/dist/components/p-43554d2d.js.map +0 -1
  421. package/dist/components/p-53e02bee.js +0 -2
  422. package/dist/components/p-53e02bee.js.map +0 -1
  423. package/dist/components/p-6f391c4a.js +0 -2
  424. package/dist/components/p-990d2990.js.map +0 -1
  425. package/dist/components/p-a3d5a7e3.js +0 -2
  426. package/dist/components/p-a3d5a7e3.js.map +0 -1
  427. package/dist/components/p-d29431c0.js.map +0 -1
  428. package/dist/core/p-044f4c35.entry.js +0 -2
  429. package/dist/core/p-044f4c35.entry.js.map +0 -1
  430. package/dist/core/p-09966eaa.entry.js +0 -2
  431. package/dist/core/p-09966eaa.entry.js.map +0 -1
  432. package/dist/core/p-0e5fa8bf.js +0 -2
  433. package/dist/core/p-0e5fa8bf.js.map +0 -1
  434. package/dist/core/p-2712444e.entry.js +0 -2
  435. package/dist/core/p-2712444e.entry.js.map +0 -1
  436. package/dist/core/p-28e59384.js.map +0 -1
  437. package/dist/core/p-2f858bf5.entry.js +0 -2
  438. package/dist/core/p-2f858bf5.entry.js.map +0 -1
  439. package/dist/core/p-3b42950e.entry.js +0 -2
  440. package/dist/core/p-3b42950e.entry.js.map +0 -1
  441. package/dist/core/p-497c90ea.entry.js.map +0 -1
  442. package/dist/core/p-6dc942b8.entry.js.map +0 -1
  443. package/dist/core/p-73b7585b.entry.js +0 -2
  444. package/dist/core/p-73b7585b.entry.js.map +0 -1
  445. package/dist/core/p-9c6699d6.entry.js.map +0 -1
  446. package/dist/core/p-a63bb91e.entry.js +0 -2
  447. package/dist/core/p-a63bb91e.entry.js.map +0 -1
  448. package/dist/core/p-a6b6dc73.entry.js +0 -2
  449. package/dist/core/p-a6b6dc73.entry.js.map +0 -1
  450. package/dist/core/p-b127c8a8.entry.js.map +0 -1
  451. package/dist/core/p-b4a59c79.entry.js.map +0 -1
  452. package/dist/core/p-b7d23697.entry.js.map +0 -1
  453. package/dist/core/p-c574ecc8.entry.js +0 -2
  454. package/dist/core/p-c574ecc8.entry.js.map +0 -1
  455. package/dist/core/p-cf86a858.entry.js.map +0 -1
  456. package/dist/core/p-d69599bc.entry.js +0 -2
  457. package/dist/core/p-d69599bc.entry.js.map +0 -1
  458. package/dist/core/p-f76f0a67.entry.js +0 -2
  459. package/dist/esm/form-39dc6896.js.map +0 -1
  460. package/dist/esm/template-df429738.js.map +0 -1
  461. package/dist/globals.d.ts +0 -2
  462. package/dist/types/Users/leo/Projects/repos/asseco/design-system/gov-design-system-ce/packages/core/.stencil/packages/core/stencil.config.d.ts +0 -2
  463. package/dist/types/types/typings.d.ts +0 -6
  464. /package/dist/components/{p-b526e440.js.map → p-033f8bda.js.map} +0 -0
  465. /package/dist/components/{p-ec6c2272.js.map → p-23990b41.js.map} +0 -0
  466. /package/dist/components/{p-62074db5.js.map → p-26805569.js.map} +0 -0
  467. /package/dist/components/{p-9795ad94.js.map → p-b9ee51d6.js.map} +0 -0
  468. /package/dist/components/{p-570803ab.js.map → p-f8b7ea69.js.map} +0 -0
  469. /package/dist/core/{p-96d141a3.entry.js.map → p-0028fadc.entry.js.map} +0 -0
  470. /package/dist/core/{p-2969eb69.entry.js.map → p-0ab12526.entry.js.map} +0 -0
  471. /package/dist/core/{p-22abe742.entry.js.map → p-0c5c6dee.entry.js.map} +0 -0
  472. /package/dist/core/{p-1116fec6.entry.js.map → p-127af1b4.entry.js.map} +0 -0
  473. /package/dist/core/{p-fb51d693.entry.js.map → p-151f1b89.entry.js.map} +0 -0
  474. /package/dist/core/{p-fd4b0f54.entry.js.map → p-191e9b0c.entry.js.map} +0 -0
  475. /package/dist/core/{p-fc8a29e9.entry.js.map → p-2a13c39c.entry.js.map} +0 -0
  476. /package/dist/core/{p-de3429ab.entry.js.map → p-3975851f.entry.js.map} +0 -0
  477. /package/dist/core/{p-141d9af4.entry.js.map → p-4988c0bb.entry.js.map} +0 -0
  478. /package/dist/core/{p-83e998d8.entry.js.map → p-529ce9a4.entry.js.map} +0 -0
  479. /package/dist/core/{p-fc2a1e14.entry.js.map → p-53e0ad52.entry.js.map} +0 -0
  480. /package/dist/core/{p-81593c86.entry.js.map → p-54fa7af5.entry.js.map} +0 -0
  481. /package/dist/core/{p-41c18f64.entry.js.map → p-555eaa93.entry.js.map} +0 -0
  482. /package/dist/core/{p-e24236b0.entry.js.map → p-55cb727e.entry.js.map} +0 -0
  483. /package/dist/core/{p-3c12c766.entry.js.map → p-60d681a6.entry.js.map} +0 -0
  484. /package/dist/core/{p-b49293dc.entry.js.map → p-6bf8e7bf.entry.js.map} +0 -0
  485. /package/dist/core/{p-89b3e4d4.entry.js.map → p-72c5997f.entry.js.map} +0 -0
  486. /package/dist/core/{p-bb7f0a66.entry.js.map → p-8f121cad.entry.js.map} +0 -0
  487. /package/dist/core/{p-01d928c5.entry.js.map → p-90c068ff.entry.js.map} +0 -0
  488. /package/dist/core/{p-b4ab0d15.entry.js.map → p-9469ecc2.entry.js.map} +0 -0
  489. /package/dist/core/{p-f29b0193.entry.js.map → p-984b36f7.entry.js.map} +0 -0
  490. /package/dist/core/{p-ccf73a1a.entry.js.map → p-a35484ed.entry.js.map} +0 -0
  491. /package/dist/core/{p-b580666b.entry.js.map → p-adf276b0.entry.js.map} +0 -0
  492. /package/dist/core/{p-b1184db4.entry.js.map → p-af9a14e3.entry.js.map} +0 -0
  493. /package/dist/core/{p-e5c2f601.entry.js.map → p-b7e0b030.entry.js.map} +0 -0
  494. /package/dist/core/{p-78942f76.entry.js.map → p-be8eec3f.entry.js.map} +0 -0
  495. /package/dist/core/{p-f1227928.entry.js.map → p-c6a4ca41.entry.js.map} +0 -0
  496. /package/dist/core/{p-67138ae9.entry.js.map → p-ce1486b8.entry.js.map} +0 -0
  497. /package/dist/core/{p-ee4c58e3.entry.js.map → p-d2c370d6.entry.js.map} +0 -0
  498. /package/dist/core/{p-ac5e5b2c.entry.js.map → p-dd4445ee.entry.js.map} +0 -0
  499. /package/dist/core/{p-92af05f2.entry.js.map → p-e4f11ddf.entry.js.map} +0 -0
  500. /package/dist/core/{p-6675a0f0.entry.js.map → p-eaedc9e3.entry.js.map} +0 -0
  501. /package/dist/core/{p-b5e1ee46.entry.js.map → p-ed580ac7.entry.js.map} +0 -0
  502. /package/dist/core/{p-f636a1ca.entry.js.map → p-f2206bbb.entry.js.map} +0 -0
  503. /package/dist/core/{p-4a235ef5.entry.js.map → p-f59b858f.entry.js.map} +0 -0
  504. /package/dist/core/{p-7757e4a1.entry.js.map → p-fc710edb.entry.js.map} +0 -0
@@ -1,11 +1,13 @@
1
1
  import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-eb59f132.js';
2
- import { g as govForm, n as FormSelectClass, o as FormSelectVariants, p as FormSelectSizes } from './form-39dc6896.js';
3
- import { g as govHost, a as toBoolAttr, t as toBoolAttrIfDefined } from './template-df429738.js';
2
+ import { g as govForm, n as FormSelectClass, o as FormSelectVariants, p as FormSelectSizes } from './form-e3424b70.js';
3
+ import { g as govHost, a as toBoolAttr, t as toBoolAttrIfDefined } from './template-a0067bb6.js';
4
4
  import { c as canValidateWcagOnRender } from './win-1dbd3f5c.js';
5
5
  import { v as validateProp } from './props-a85d9c89.js';
6
6
  import { a as validateWcagRef, b as validateWcagLabelFor } from './wcag-7d25e12b.js';
7
7
  import { c as createID } from './string.utils-f268fc6b.js';
8
8
  import { d as delay } from './utils-c057a3fa.js';
9
+ import { p as propsValueToArray } from './array.utils-b27436ea.js';
10
+ import { t as tick } from './stencil.utils-7cb5b075.js';
9
11
  import './sizes-6c5943b4.js';
10
12
  import './variants-2b936d58.js';
11
13
  import './constants-3df712e2.js';
@@ -22,6 +24,7 @@ const GovFormSelect = class {
22
24
  this.govBlur = createEvent(this, "gov-blur", 7);
23
25
  this.govChange = createEvent(this, "gov-change", 7);
24
26
  this.value = undefined;
27
+ this.options = undefined;
25
28
  this.identifier = undefined;
26
29
  this.variant = 'secondary';
27
30
  this.size = 'm';
@@ -36,7 +39,7 @@ const GovFormSelect = class {
36
39
  this.wcagLabelledBy = undefined;
37
40
  this.wcagOwns = undefined;
38
41
  this.focused = undefined;
39
- this.options = [];
42
+ this.optionsState = [];
40
43
  this.h = govHost(this.host);
41
44
  this.f = govForm(this.h);
42
45
  this.selectId = createID('GovSelect');
@@ -47,6 +50,9 @@ const GovFormSelect = class {
47
50
  validateSize(newValue) {
48
51
  validateProp(FormSelectSizes, newValue, FormSelectClass.root);
49
52
  }
53
+ watchOptions(newValue) {
54
+ this.optionsState = propsValueToArray(newValue);
55
+ }
50
56
  watchDisabled() {
51
57
  this.passControlAttrs();
52
58
  }
@@ -64,12 +70,14 @@ const GovFormSelect = class {
64
70
  this.markSelectedValue();
65
71
  this.passControlAttrs();
66
72
  this.f.passAttrToLabel('required', String(this.required));
73
+ this.optionsState = propsValueToArray(this.options);
67
74
  }
68
75
  async componentDidRender() {
69
76
  if (canValidateWcagOnRender()) {
70
77
  await delay(500);
71
78
  await this.validateWcag();
72
79
  }
80
+ tick(() => this.markSelectedValue());
73
81
  }
74
82
  markSelectedValue() {
75
83
  this.host.querySelectorAll('option').forEach((option) => {
@@ -82,8 +90,9 @@ const GovFormSelect = class {
82
90
  });
83
91
  }
84
92
  render() {
85
- return (h(Host, { class: FormSelectClass.root, size: this.size, variant: this.variant }, this.h.hasSlot('prefix') && h("slot", { name: "prefix" }), h("span", { class: "element" }, h("gov-icon", { slot: "right-icon", name: "chevron-down", class: "icon-arrow" }), this.h.hasSlot('right-icon') && !(this.success || this.invalid) && h("slot", { name: "right-icon" }), this.success && h("gov-icon", { slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && h("gov-icon", { slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), h("select", { id: this.identifier || this.selectId, onFocus: this.onFocusHandler.bind(this), onChange: this.onChangeHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el), "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-activedescendant": this.wcagActiveDescendant, "aria-controls": this.wcagControls, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns }, h("slot", null), this.options.map((option) => {
86
- return (h("option", { value: option.value, selected: option.value === this.value, disabled: option === null || option === void 0 ? void 0 : option.disabled }, option.label));
93
+ return (h(Host, { class: FormSelectClass.root, size: this.size, variant: this.variant }, this.h.hasSlot('prefix') && h("slot", { name: "prefix" }), h("span", { class: "element" }, h("gov-icon", { slot: "right-icon", name: "chevron-down", class: "icon-arrow" }), this.h.hasSlot('right-icon') && !(this.success || this.invalid) && h("slot", { name: "right-icon" }), this.success && h("gov-icon", { slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && h("gov-icon", { slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), h("select", { id: this.identifier || this.selectId, onFocus: this.onFocusHandler.bind(this), onChange: this.onChangeHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el), "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-activedescendant": this.wcagActiveDescendant, "aria-controls": this.wcagControls, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns }, h("slot", null), Array.isArray(this.optionsState) && this.optionsState.map((option) => {
94
+ var _a;
95
+ return (h("option", { value: option.value, selected: option.value === this.value, disabled: option === null || option === void 0 ? void 0 : option.disabled }, (_a = option.label) !== null && _a !== void 0 ? _a : option.value));
87
96
  }))), this.h.hasSlot('sufix') && h("slot", { name: "sufix" })));
88
97
  }
89
98
  onFocusHandler(e) {
@@ -117,26 +126,12 @@ const GovFormSelect = class {
117
126
  async setFocus(options) {
118
127
  return this.selectRef.focus(options);
119
128
  }
120
- /**
121
- * Sets the ordered value of the element
122
- */
123
- async setValue(value) {
124
- this.value = value;
125
- }
126
129
  /**
127
130
  * Returns an instance of the native html select element
128
131
  */
129
132
  async getRef() {
130
133
  return this.selectRef;
131
134
  }
132
- /**
133
- * Sets the selection options
134
- */
135
- async setOptions(options) {
136
- if (Array.isArray(options)) {
137
- this.options = options;
138
- }
139
- }
140
135
  /**
141
136
  * Validate the WCAG attributes of the component
142
137
  */
@@ -151,6 +146,7 @@ const GovFormSelect = class {
151
146
  static get watchers() { return {
152
147
  "variant": ["validateVariant"],
153
148
  "size": ["validateSize", "watchDisabled"],
149
+ "options": ["watchOptions"],
154
150
  "disabled": ["watchDisabled"],
155
151
  "invalid": ["watchDisabled"],
156
152
  "value": ["watchValue"]
@@ -1 +1 @@
1
- {"file":"gov-form-select.entry.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,28lBAA28lB;;MCuBv9lB,aAAa;EAOzB;;;;;;;mBAkBmD,WAAW;gBAIhB,GAAG;;oBASZ,KAAK;;oBASL,KAAK;;;;;;;;mBAsCH,EAAE;IA7ExC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAA;GACrC;EA6ED,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,kBAAkB,EAAE,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;GAChE;EAGD,YAAY,CAAC,QAAgB;IAC5B,YAAY,CAAC,eAAe,EAAE,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;GAC7D;EAKD,aAAa;IACZ,IAAI,CAAC,gBAAgB,EAAE,CAAA;GACvB;EAGD,UAAU;IACT,IAAI,CAAC,iBAAiB,EAAE,CAAA;GACxB;EAEO,gBAAgB;IACvB,IAAI,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,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;GACpC;;;;EAMD,MAAM,QAAQ,CAAC,KAAa;IAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;GAClB;;;;EAMD,MAAM,MAAM;IACX,OAAO,IAAI,CAAC,SAAS,CAAA;GACrB;;;;EAMD,MAAM,UAAU,CAAC,OAA2B;IAC3C,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;MAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;KACtB;GACD;;;;EAMD,MAAM,YAAY;IACjB,eAAe,CAAC,IAAI,CAAC,oBAAoB,EAAE,wBAAwB,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IAC1F,eAAe,CAAC,IAAI,CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IACzE,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IAChF,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IACjE,oBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;GACjG;;;;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.scss?tag=gov-form-select","../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["/*\n * Select\n */\n\n@import \"../select/gov-form-select-core.scss\";\n\n$class: \".gov-form-select\";\n\n#{$class} {\n\t@extend %form-select-core;\n}\n","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 {canValidateWcagOnRender} from '../../../helpers/Dom/win'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {validateWcagLabelFor, validateWcagRef} from '../../../helpers/Validate/wcag'\nimport {createID} from '../../../utils/string.utils'\nimport {delay} from '../../../utils/utils'\nimport {\n\tFormSelectClass,\n\tFormSelectSizes,\n\tFormSelectSizesType,\n\tFormSelectVariants,\n\tFormSelectVariantType\n} from './constants'\nimport {FormSelectEvent, FormSelectOption} from './gov-form-select.types'\n\n@Component({\n\ttag: 'gov-form-select',\n\tstyleUrl: 'gov-form-select.scss',\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID('GovSelect')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Style variation of the form select.\n\t */\n\t@Prop() readonly variant?: FormSelectVariantType = 'secondary'\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a related component’s visually focused element.\n\t */\n\t@Prop({attribute: 'wcag-active-descendant'}) readonly wcagActiveDescendant: string\n\t/**\n\t * Use this prop to add an aria-controls attribute. Use the attribute to indicate the id of a component controlled by this component.\n\t */\n\t@Prop({attribute: 'wcag-controls'}) readonly wcagControls: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({attribute: 'wcag-described-by'}) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({attribute: 'wcag-labelled-by'}) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({attribute: 'wcag-owns'}) readonly wcagOwns: string\n\t/**\n\t * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\t@State() options: FormSelectOption[] = []\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormSelectVariants, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('disabled')\n\t@Watch('invalid')\n\t@Watch('size')\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch('value')\n\twatchValue(): void {\n\t\tthis.markSelectedValue()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl('size', this.size)\n\t\tthis.f.passAttrToControl('invalid', toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('type', 'select')\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\n\t\tthis.markSelectedValue()\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\tprivate markSelectedValue() {\n\t\tthis.host.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.value === this.value) {\n\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t} else {\n\t\t\t\toption.removeAttribute('selected')\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size} variant={this.variant}>\n\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<gov-icon slot=\"right-icon\" name=\"chevron-down\" class=\"icon-arrow\"></gov-icon>\n\t\t\t\t\t{this.h.hasSlot('right-icon') && !(this.success || this.invalid) && <slot name=\"right-icon\"/>}\n\t\t\t\t\t{this.success && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-activedescendant={this.wcagActiveDescendant}\n\t\t\t\t\t\taria-controls={this.wcagControls}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t{this.options.map((option) => {\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={option.value === this.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={option?.disabled}>{option.label}</option>)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</select>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = 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\t/**\n\t * Sets the selection options\n\t */\n\t@Method()\n\tasync setOptions(options: FormSelectOption[]): Promise<void> {\n\t\tif (Array.isArray(options)) {\n\t\t\tthis.options = options\n\t\t}\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagActiveDescendant, 'wcag-active-descendant', FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagControls, 'wcag-controls', FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagDescribedBy, 'wcag-described-by', FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, 'wcag-owns', FormSelectClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.selectId, this.wcagLabelledBy, FormSelectClass.root)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-form-select.entry.js","mappings":";;;;;;;;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,28lBAA28lB;;MCyBv9lB,aAAa;EAOzB;;;;;;;;mBAsBmD,WAAW;gBAIhB,GAAG;;oBASZ,KAAK;;oBASL,KAAK;;;;;;;;wBAsCE,EAAE;IAjF7C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAA;GACrC;EAiFD,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,kBAAkB,EAAE,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;GAChE;EAGD,YAAY,CAAC,QAAgB;IAC5B,YAAY,C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OAAO,GAAG,KAAK,CAAA;IACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;MACjB,SAAS,EAAE,eAAe,CAAC,IAAI;MAC/B,aAAa,EAAE,CAAC;MAChB,KAAK,EAAE,IAAI,CAAC,KAAK;KACjB,CAAC,CAAA;GACF;EAEO,eAAe,CAAC,CAAQ;IAC/B,IAAI,CAAC,KAAK,GAAI,CAAC,CAAC,MAA4B,CAAC,KAAK,CAAA;IAClD,CAAC,CAAC,eAAe,EAAE,CAAA;IACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;MACnB,SAAS,EAAE,eAAe,CAAC,IAAI;MAC/B,aAAa,EAAE,CAAC;MAChB,KAAK,EAAE,IAAI,CAAC,KAAK;KACjB,CAAC,CAAA;GACF;;;;EAMD,MAAM,QAAQ,CAAC,OAAsB;IACpC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;GACpC;;;;EAMD,MAAM,MAAM;IACX,OAAO,IAAI,CAAC,SAAS,CAAA;GACrB;;;;EAMD,MAAM,YAAY;IACjB,eAAe,CAAC,IAAI,CAAC,oBAAoB,EAAE,wBAAwB,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IAC1F,eAAe,CAAC,IAAI,CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IACzE,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IAChF,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IACjE,oBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;GACjG;;;;;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.scss?tag=gov-form-select","../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["/*\n * Select\n */\n\n@import \"../select/gov-form-select-core.scss\";\n\n$class: \".gov-form-select\";\n\n#{$class} {\n\t@extend %form-select-core;\n}\n","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 {canValidateWcagOnRender} from '../../../helpers/Dom/win'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {validateWcagLabelFor, validateWcagRef} from '../../../helpers/Validate/wcag'\nimport {createID} from '../../../utils/string.utils'\nimport {delay} from '../../../utils/utils'\nimport {\n\tFormSelectClass,\n\tFormSelectSizes,\n\tFormSelectSizesType,\n\tFormSelectVariants,\n\tFormSelectVariantType\n} from './constants'\nimport {FormSelectEvent, FormSelectOption} from './gov-form-select.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {tick} from \"../../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-form-select',\n\tstyleUrl: 'gov-form-select.scss',\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID('GovSelect')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Options of select\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | FormSelectOption[]\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Style variation of the form select.\n\t */\n\t@Prop() readonly variant?: FormSelectVariantType = 'secondary'\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a related component’s visually focused element.\n\t */\n\t@Prop({attribute: 'wcag-active-descendant'}) readonly wcagActiveDescendant: string\n\t/**\n\t * Use this prop to add an aria-controls attribute. Use the attribute to indicate the id of a component controlled by this component.\n\t */\n\t@Prop({attribute: 'wcag-controls'}) readonly wcagControls: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({attribute: 'wcag-described-by'}) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({attribute: 'wcag-labelled-by'}) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({attribute: 'wcag-owns'}) readonly wcagOwns: string\n\t/**\n\t * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\t@State() optionsState: FormSelectOption[] = []\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormSelectVariants, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | FormSelectOption[]): void {\n\t\tthis.optionsState = propsValueToArray(newValue)\n\t}\n\n\t@Watch('disabled')\n\t@Watch('invalid')\n\t@Watch('size')\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch('value')\n\twatchValue(): void {\n\t\tthis.markSelectedValue()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl('size', this.size)\n\t\tthis.f.passAttrToControl('invalid', toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('type', 'select')\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\n\t\tthis.markSelectedValue()\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t\tthis.optionsState = propsValueToArray(this.options)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t\ttick(() => this.markSelectedValue())\n\t}\n\n\tprivate markSelectedValue() {\n\t\tthis.host.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.value === this.value) {\n\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t} else {\n\t\t\t\toption.removeAttribute('selected')\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size} variant={this.variant}>\n\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<gov-icon slot=\"right-icon\" name=\"chevron-down\" class=\"icon-arrow\"></gov-icon>\n\t\t\t\t\t{this.h.hasSlot('right-icon') && !(this.success || this.invalid) && <slot name=\"right-icon\"/>}\n\t\t\t\t\t{this.success && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-activedescendant={this.wcagActiveDescendant}\n\t\t\t\t\t\taria-controls={this.wcagControls}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t{Array.isArray(this.optionsState) && this.optionsState.map((option) => {\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={option.value === this.value}\n\t\t\t\t\t\t\t\t\t\t\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</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectElement> {\n\t\treturn this.selectRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagActiveDescendant, 'wcag-active-descendant', FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagControls, 'wcag-controls', FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagDescribedBy, 'wcag-described-by', FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, 'wcag-owns', FormSelectClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.selectId, this.wcagLabelledBy, FormSelectClass.root)\n\t}\n}\n"],"version":3}
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-eb59f132.js';
2
2
  import { c as createID } from './string.utils-f268fc6b.js';
3
3
  import { v as validateProp } from './props-a85d9c89.js';
4
- import { g as govForm, i as FormSwitchClass, j as FormSwitchSizes } from './form-39dc6896.js';
5
- import { g as govHost, a as toBoolAttr, t as toBoolAttrIfDefined } from './template-df429738.js';
4
+ import { g as govForm, i as FormSwitchClass, j as FormSwitchSizes } from './form-e3424b70.js';
5
+ import { g as govHost, a as toBoolAttr, t as toBoolAttrIfDefined } from './template-a0067bb6.js';
6
6
  import { a as validateWcagRef, b as validateWcagLabelFor } from './wcag-7d25e12b.js';
7
7
  import { c as canValidateWcagOnRender } from './win-1dbd3f5c.js';
8
8
  import { d as delay } from './utils-c057a3fa.js';
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, a as Host, g as getElement } from './index-eb59f132.js';
2
2
  import { a as GridItemClass } from './constants-2b14bb01.js';
3
- import { g as govHost } from './template-df429738.js';
3
+ import { g as govHost } from './template-a0067bb6.js';
4
4
 
5
5
  const govGridItemCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-grid-item{border:0 solid transparent;-o-border-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3C/svg%3E\");border-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3C/svg%3E\")}.gov-grid-item[size=\"1/12\"]{width:8.3333333333%}.gov-grid-item[size=\"2/12\"]{width:16.6666666667%}.gov-grid-item[size=\"3/12\"]{width:25%}.gov-grid-item[size=\"4/12\"]{width:33.3333333333%}.gov-grid-item[size=\"5/12\"]{width:41.6666666667%}.gov-grid-item[size=\"6/12\"]{width:50%}.gov-grid-item[size=\"7/12\"]{width:58.3333333333%}.gov-grid-item[size=\"8/12\"]{width:66.6666666667%}.gov-grid-item[size=\"9/12\"]{width:75%}.gov-grid-item[size=\"10/12\"]{width:83.3333333333%}.gov-grid-item[size=\"11/12\"]{width:91.6666666667%}.gov-grid-item[size=\"12/12\"]{width:100%}@media (min-width: 30em){.gov-grid-item[size-sm=\"1/12\"]{width:8.3333333333%}.gov-grid-item[size-sm=\"2/12\"]{width:16.6666666667%}.gov-grid-item[size-sm=\"3/12\"]{width:25%}.gov-grid-item[size-sm=\"4/12\"]{width:33.3333333333%}.gov-grid-item[size-sm=\"5/12\"]{width:41.6666666667%}.gov-grid-item[size-sm=\"6/12\"]{width:50%}.gov-grid-item[size-sm=\"7/12\"]{width:58.3333333333%}.gov-grid-item[size-sm=\"8/12\"]{width:66.6666666667%}.gov-grid-item[size-sm=\"9/12\"]{width:75%}.gov-grid-item[size-sm=\"10/12\"]{width:83.3333333333%}.gov-grid-item[size-sm=\"11/12\"]{width:91.6666666667%}.gov-grid-item[size-sm=\"12/12\"]{width:100%}}@media (min-width: 48em){.gov-grid-item[size-md=\"1/12\"]{width:8.3333333333%}.gov-grid-item[size-md=\"2/12\"]{width:16.6666666667%}.gov-grid-item[size-md=\"3/12\"]{width:25%}.gov-grid-item[size-md=\"4/12\"]{width:33.3333333333%}.gov-grid-item[size-md=\"5/12\"]{width:41.6666666667%}.gov-grid-item[size-md=\"6/12\"]{width:50%}.gov-grid-item[size-md=\"7/12\"]{width:58.3333333333%}.gov-grid-item[size-md=\"8/12\"]{width:66.6666666667%}.gov-grid-item[size-md=\"9/12\"]{width:75%}.gov-grid-item[size-md=\"10/12\"]{width:83.3333333333%}.gov-grid-item[size-md=\"11/12\"]{width:91.6666666667%}.gov-grid-item[size-md=\"12/12\"]{width:100%}}@media (min-width: 64em){.gov-grid-item[size-lg=\"1/12\"]{width:8.3333333333%}.gov-grid-item[size-lg=\"2/12\"]{width:16.6666666667%}.gov-grid-item[size-lg=\"3/12\"]{width:25%}.gov-grid-item[size-lg=\"4/12\"]{width:33.3333333333%}.gov-grid-item[size-lg=\"5/12\"]{width:41.6666666667%}.gov-grid-item[size-lg=\"6/12\"]{width:50%}.gov-grid-item[size-lg=\"7/12\"]{width:58.3333333333%}.gov-grid-item[size-lg=\"8/12\"]{width:66.6666666667%}.gov-grid-item[size-lg=\"9/12\"]{width:75%}.gov-grid-item[size-lg=\"10/12\"]{width:83.3333333333%}.gov-grid-item[size-lg=\"11/12\"]{width:91.6666666667%}.gov-grid-item[size-lg=\"12/12\"]{width:100%}}@media (min-width: 75em){.gov-grid-item[size-xl=\"1/12\"]{width:8.3333333333%}.gov-grid-item[size-xl=\"2/12\"]{width:16.6666666667%}.gov-grid-item[size-xl=\"3/12\"]{width:25%}.gov-grid-item[size-xl=\"4/12\"]{width:33.3333333333%}.gov-grid-item[size-xl=\"5/12\"]{width:41.6666666667%}.gov-grid-item[size-xl=\"6/12\"]{width:50%}.gov-grid-item[size-xl=\"7/12\"]{width:58.3333333333%}.gov-grid-item[size-xl=\"8/12\"]{width:66.6666666667%}.gov-grid-item[size-xl=\"9/12\"]{width:75%}.gov-grid-item[size-xl=\"10/12\"]{width:83.3333333333%}.gov-grid-item[size-xl=\"11/12\"]{width:91.6666666667%}.gov-grid-item[size-xl=\"12/12\"]{width:100%}}";
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, a as Host, g as getElement } from './index-eb59f132.js';
2
2
  import { G as GridClass } from './constants-2b14bb01.js';
3
- import { g as govHost } from './template-df429738.js';
3
+ import { g as govHost } from './template-a0067bb6.js';
4
4
 
5
5
  const govGridCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-grid{position:relative;display:flex;width:100%;flex-wrap:wrap}.gov-grid[align-x=middle]{align-items:center}.gov-grid[align-x=bottom]{align-items:flex-end}.gov-grid[align-y=center]{justify-content:center}.gov-grid[align-y=right]{justify-content:flex-end}.gov-grid[align-y=space-between]{justify-content:space-between}.gov-grid[align-y=space-around]{justify-content:space-around}";
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { d as getAssetPath, r as registerInstance, h, a as Host, g as getElement } from './index-eb59f132.js';
2
2
  import { i as iconsPath, e as iconsLazyLoad } from './win-1dbd3f5c.js';
3
- import { g as govHost } from './template-df429738.js';
3
+ import { g as govHost } from './template-a0067bb6.js';
4
4
  import './utils-c057a3fa.js';
5
5
 
6
6
  var Types;
@@ -14,7 +14,7 @@ const IconClass = {
14
14
  holder: 'gov-icon__holder',
15
15
  };
16
16
 
17
- const version = "4.0.6";
17
+ const version = "4.0.8-rc01";
18
18
 
19
19
  const dsVersion = () => {
20
20
  return version;
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-eb59f132.js';
2
- import { g as govHost, a as toBoolAttr } from './template-df429738.js';
2
+ import { g as govHost, a as toBoolAttr } from './template-a0067bb6.js';
3
3
  import { c as canValidateWcagOnRender } from './win-1dbd3f5c.js';
4
4
  import { F as Fragment } from './Fragment-8d8d54fb.js';
5
5
  import { v as validateProp } from './props-a85d9c89.js';
@@ -28,6 +28,7 @@ const GovInfobar = class {
28
28
  this.govClose = createEvent(this, "gov-close", 7);
29
29
  this.headline = undefined;
30
30
  this.variant = 'primary';
31
+ this.role = undefined;
31
32
  this.inverse = false;
32
33
  this.wcagCloseLabel = 'Zavřít informační lištu';
33
34
  this.wcagToggleLabel = 'Zobrazit více informací';
@@ -55,7 +56,7 @@ const GovInfobar = class {
55
56
  variant = 'secondary';
56
57
  }
57
58
  const closeButton = (h("div", { class: InfobarClass.close }, h("gov-button", { size: "s", wcagLabel: this.wcagCloseLabel, type: "base", variant: variant, inverse: inverse, "on-gov-click": this.onCloseHandler.bind(this) }, h("gov-icon", { name: "x-lg" }))));
58
- return (h(Host, { class: this.h.classes(InfobarClass.root), variant: this.variant }, h("section", { class: InfobarClass.section, role: "infobar" }, this.h.hasSlot('icon') && (h("div", { class: InfobarClass.icon }, h("slot", { name: "icon" }))), h("div", { class: InfobarClass.content + (this.closable ? ' ' + InfobarClass.closable : '') }, this.headline ? (h(Fragment, null, h("div", { class: InfobarClass.headline }, h("p", null, this.headline), h("gov-button", { size: "s", wcagLabel: this.wcagToggleLabel, type: "base", variant: variant, inverse: inverse, "on-gov-click": () => (this.toggleContent = !this.toggleContent) }, h("gov-icon", { name: this.toggleContent ? 'chevron-up' : 'chevron-down' }))), h("div", { hidden: !this.toggleContent, "aria-hidden": toBoolAttr(this.toggleContent) }, h("slot", null)))) : (h("slot", null)))), this.closable && closeButton));
59
+ return (h(Host, { class: this.h.classes(InfobarClass.root), variant: this.variant }, h("section", { class: InfobarClass.section, role: this.role }, this.h.hasSlot('icon') && (h("div", { class: InfobarClass.icon }, h("slot", { name: "icon" }))), h("div", { class: InfobarClass.content + (this.closable ? ' ' + InfobarClass.closable : '') }, this.headline ? (h(Fragment, null, h("div", { class: InfobarClass.headline }, h("p", null, this.headline), h("gov-button", { size: "s", wcagLabel: this.wcagToggleLabel, type: "base", variant: variant, inverse: inverse, "on-gov-click": () => (this.toggleContent = !this.toggleContent) }, h("gov-icon", { name: this.toggleContent ? 'chevron-up' : 'chevron-down' }))), h("div", { hidden: !this.toggleContent, "aria-hidden": toBoolAttr(this.toggleContent) }, h("slot", null)))) : (h("slot", null)))), this.closable && closeButton));
59
60
  }
60
61
  onCloseHandler(e) {
61
62
  this.govClose.emit({
@@ -1 +1 @@
1
- {"file":"gov-infobar.entry.js","mappings":";;;;;;;;;;;AAIO,MAAM,eAAe,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA;AAG/F,MAAM,YAAY,GAAG;EAC3B,IAAI,EAAE,aAAa;EACnB,OAAO,EAAE,sBAAsB;EAC/B,IAAI,EAAE,mBAAmB;EACzB,OAAO,EAAE,sBAAsB;EAC/B,QAAQ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KAChB,CAAC,CAAA;GACF;;;;EAMD,MAAM,YAAY;IACjB,IAAI,IAAI,CAAC,QAAQ,EAAE;MAClB,gBAAgB,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;KAC5E;IACD,IAAI,IAAI,CAAC,QAAQ,EAAE;MAClB,gBAAgB,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;KAC9E;GACD;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-infobar/constants.ts","../../../packages/core/src/components/gov-infobar/gov-infobar.scss?tag=gov-infobar","../../../packages/core/src/components/gov-infobar/gov-infobar.tsx"],"sourcesContent":["import { Variants } from '../../core/constants/variants'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const InfobarVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS'])\nexport type VariantType = `${ValueOf<typeof InfobarVariants>}`\n\nexport const InfobarClass = {\n\troot: 'gov-infobar',\n\tsection: 'gov-infobar__section',\n\ticon: 'gov-infobar__icon',\n\tcontent: 'gov-infobar__content',\n\tclosable: 'gov-infobar__content--closable',\n\theadline: 'gov-infobar__headline',\n\tclose: 'gov-infobar__close',\n}\n","/*\n * Infobar\n */\n\n$class: \".gov-infobar\";\n\n#{$class} {\n\t@include base();\n\n\t&__section {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\tpadding: rem-calc(16);\n\t}\n\n\t&__icon {\n\t\tflex: 0 0 auto;\n\n\t\t& > * {\n\t\t\twidth: rem-calc(20);\n\t\t\theight: rem-calc(20);\n\t\t}\n\t}\n\n\t&__headline {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\n\t\t+ div {\n\t\t\tmargin-top: rem-calc(8);\n\t\t}\n\n\t\tp {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\tgov-button {\n\t\t\tmargin-top: rem-calc(-4);\n\t\t}\n\t}\n\n\t&__content {\n\t\t@include reset-last-margin();\n\t\twidth: 100%;\n\n\t\t&--closable {\n\t\t\tpadding-right: rem-calc(56);\n\t\t}\n\n\t\tp {\n\t\t\t@include typography($font-size-m);\n\t\t}\n\n\t\ta {\n\t\t\tcolor: inherit;\n\t\t\t@include hover() {\n\t\t\t\tcolor: inherit;\n\t\t\t}\n\t\t\t.gov-icon {\n\t\t\t\tcolor: inherit;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__close {\n\t\tposition: absolute;\n\t\ttop: rem-calc(14);\n\t\tright: rem-calc(16);\n\t}\n\n\t// VARIANTS\n\t@each $variant, $definitions in $infobar-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\tbackground-color: get(\"bg-color\", $definitions);\n\n\t\t\t#{$class} {\n\t\t\t\t&__icon {\n\t\t\t\t\tcolor: get(\"icon-color\", $definitions);\n\t\t\t\t}\n\n\t\t\t\t&__content {\n\t\t\t\t\tcolor: get(\"text-color\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@if deep-map-check($definitions, \"border\") {\n\t\t\t\tborder-bottom: $infobar-border;\n\t\t\t}\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\tborder-bottom: $infobar-border;\n\t\t\t\tbackground-color: $infobar-inverse-bg;\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__icon {\n\t\t\t\t\t\tcolor: get(\"bg-color\", $definitions);\n\t\t\t\t\t}\n\n\t\t\t\t\t&__content {\n\t\t\t\t\t\tcolor: $infobar-inverse-color;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core'\nimport { govHost, toBoolAttr } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport Fragment from '../../helpers/Fragment'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { validateWcagProp } from '../../helpers/Validate/wcag'\nimport { delay } from '../../utils/utils'\nimport { ButtonEvent } from '../gov-button/button/gov-button.types'\nimport { InfobarClass, InfobarVariants, VariantType } from './constants'\nimport { InfobarEvent } from './gov-infobar.types'\n\n@Component({\n\ttag: 'gov-infobar',\n\tstyleUrl: 'gov-infobar.scss',\n})\nexport class GovInfobar {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovInfobarElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly headline: string\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant: VariantType = 'primary'\n\t/**\n\t * Determine if component should have inverse colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Aria label for the closing button. It is mandatory if the infobar is closable\n\t */\n\t@Prop({ attribute: 'wcag-close-label' }) readonly wcagCloseLabel: string = 'Zavřít informační lištu'\n\t/**\n\t * Aria label for the toggle button. It is mandatory if the infobar has headline\n\t */\n\t@Prop({ attribute: 'wcag-toggle-label' }) readonly wcagToggleLabel: string = 'Zobrazit více informací'\n\t/**\n\t * Called when the close button is clicked\n\t */\n\t@Event({ eventName: 'gov-close' }) govClose: EventEmitter<InfobarEvent>\n\t/**\n\t * Displays the option to close the infobar\n\t */\n\t@Prop() readonly closable?: boolean = false\n\n\t@State() toggleContent = false\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(InfobarVariants, newValue, InfobarClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tlet inverse = !this.inverse\n\t\tlet variant = this.inverse ? 'secondary' : this.variant\n\n\t\tif (this.variant == 'warning') {\n\t\t\tinverse = false\n\t\t\tvariant = 'secondary'\n\t\t}\n\n\t\tconst closeButton = (\n\t\t\t<div class={InfobarClass.close}>\n\t\t\t\t<gov-button size=\"s\" wcagLabel={this.wcagCloseLabel} type=\"base\" variant={variant} inverse={inverse} on-gov-click={this.onCloseHandler.bind(this)}>\n\t\t\t\t\t<gov-icon name=\"x-lg\"></gov-icon>\n\t\t\t\t</gov-button>\n\t\t\t</div>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(InfobarClass.root)} variant={this.variant}>\n\t\t\t\t<section class={InfobarClass.section} role=\"infobar\">\n\t\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t\t<div class={InfobarClass.icon}>\n\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div class={InfobarClass.content + (this.closable ? ' ' + InfobarClass.closable : '')}>\n\t\t\t\t\t\t{this.headline ? (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<div class={InfobarClass.headline}>\n\t\t\t\t\t\t\t\t\t<p>{this.headline}</p>\n\t\t\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\t\t\t\t\twcagLabel={this.wcagToggleLabel}\n\t\t\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\t\t\tvariant={variant}\n\t\t\t\t\t\t\t\t\t\tinverse={inverse}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => (this.toggleContent = !this.toggleContent)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<gov-icon name={this.toggleContent ? 'chevron-up' : 'chevron-down'}></gov-icon>\n\t\t\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div hidden={!this.toggleContent} aria-hidden={toBoolAttr(this.toggleContent)}>\n\t\t\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t\t{this.closable && closeButton}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tonCloseHandler(e: CustomEvent<ButtonEvent>) {\n\t\tthis.govClose.emit({\n\t\t\tcomponent: InfobarClass.root,\n\t\t\tref: this.host,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tif (this.closable) {\n\t\t\tvalidateWcagProp(this.wcagCloseLabel, 'wcag-close-label', InfobarClass.root)\n\t\t}\n\t\tif (this.headline) {\n\t\t\tvalidateWcagProp(this.wcagToggleLabel, 'wcag-toggle-label', InfobarClass.root)\n\t\t}\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-infobar.entry.js","mappings":";;;;;;;;;;;AAIO,MAAM,eAAe,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA;AAG/F,MAAM,YAAY,GAAG;EAC3B,IAAI,EAAE,aAAa;EACnB,OAAO,EAAE,sBAAsB;EAC/B,IAAI,EAAE,mBAAmB;EACzB,OAAO,EAAE,sBAAsB;EAC/B,QAAQ,EAAE,gCAAgC;EAC1C,QAAQ,EAAE,uBAAuB;EACjC,KAAK,EAAE,oBAAoB;CAC3B;;ACfD,MAAM,aAAa,GAAG,kmOAAkmO;;MCgB3mO,UAAU;EAGtB;;;;mBAawC,SAAS;gBAIJ,SAAS;mBAIlB,KAAK;0BAIgC,yBAAyB;2BAIvB,yBAAyB;oBAQ9D,KAAK;yBAElB,KAAK;IAtC7B,IAAI,CAA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,CAAC,eAAe,EAAE,mBAAmB,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;KAC9E;GACD;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-infobar/constants.ts","../../../packages/core/src/components/gov-infobar/gov-infobar.scss?tag=gov-infobar","../../../packages/core/src/components/gov-infobar/gov-infobar.tsx"],"sourcesContent":["import { Variants } from '../../core/constants/variants'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const InfobarVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS'])\nexport type VariantType = `${ValueOf<typeof InfobarVariants>}`\n\nexport const InfobarClass = {\n\troot: 'gov-infobar',\n\tsection: 'gov-infobar__section',\n\ticon: 'gov-infobar__icon',\n\tcontent: 'gov-infobar__content',\n\tclosable: 'gov-infobar__content--closable',\n\theadline: 'gov-infobar__headline',\n\tclose: 'gov-infobar__close',\n}\n","/*\n * Infobar\n */\n\n$class: \".gov-infobar\";\n\n#{$class} {\n\t@include base();\n\n\t&__section {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\tpadding: rem-calc(16);\n\t}\n\n\t&__icon {\n\t\tflex: 0 0 auto;\n\n\t\t& > * {\n\t\t\twidth: rem-calc(20);\n\t\t\theight: rem-calc(20);\n\t\t}\n\t}\n\n\t&__headline {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\n\t\t+ div {\n\t\t\tmargin-top: rem-calc(8);\n\t\t}\n\n\t\tp {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\tgov-button {\n\t\t\tmargin-top: rem-calc(-4);\n\t\t}\n\t}\n\n\t&__content {\n\t\t@include reset-last-margin();\n\t\twidth: 100%;\n\n\t\t&--closable {\n\t\t\tpadding-right: rem-calc(56);\n\t\t}\n\n\t\tp {\n\t\t\t@include typography($font-size-m);\n\t\t}\n\n\t\ta {\n\t\t\tcolor: inherit;\n\t\t\t@include hover() {\n\t\t\t\tcolor: inherit;\n\t\t\t}\n\t\t\t.gov-icon {\n\t\t\t\tcolor: inherit;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__close {\n\t\tposition: absolute;\n\t\ttop: rem-calc(14);\n\t\tright: rem-calc(16);\n\t}\n\n\t// VARIANTS\n\t@each $variant, $definitions in $infobar-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\tbackground-color: get(\"bg-color\", $definitions);\n\n\t\t\t#{$class} {\n\t\t\t\t&__icon {\n\t\t\t\t\tcolor: get(\"icon-color\", $definitions);\n\t\t\t\t}\n\n\t\t\t\t&__content {\n\t\t\t\t\tcolor: get(\"text-color\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@if deep-map-check($definitions, \"border\") {\n\t\t\t\tborder-bottom: $infobar-border;\n\t\t\t}\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\tborder-bottom: $infobar-border;\n\t\t\t\tbackground-color: $infobar-inverse-bg;\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__icon {\n\t\t\t\t\t\tcolor: get(\"bg-color\", $definitions);\n\t\t\t\t\t}\n\n\t\t\t\t\t&__content {\n\t\t\t\t\t\tcolor: $infobar-inverse-color;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {govHost, toBoolAttr} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport Fragment from '../../helpers/Fragment'\nimport {validateProp} from '../../helpers/Validate/props'\nimport {validateWcagProp} from '../../helpers/Validate/wcag'\nimport {delay} from '../../utils/utils'\nimport {ButtonEvent} from '../gov-button/button/gov-button.types'\nimport {InfobarClass, InfobarVariants, VariantType} from './constants'\nimport {InfobarEvent} from './gov-infobar.types'\n\n@Component({\n\ttag: 'gov-infobar',\n\tstyleUrl: 'gov-infobar.scss',\n})\nexport class GovInfobar {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovInfobarElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly headline: string\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant: VariantType = 'primary'\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly role: HTMLElement['role'] = undefined\n\t/**\n\t * Determine if component should have inverse colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Aria label for the closing button. It is mandatory if the infobar is closable\n\t */\n\t@Prop({attribute: 'wcag-close-label'}) readonly wcagCloseLabel: string = 'Zavřít informační lištu'\n\t/**\n\t * Aria label for the toggle button. It is mandatory if the infobar has headline\n\t */\n\t@Prop({attribute: 'wcag-toggle-label'}) readonly wcagToggleLabel: string = 'Zobrazit více informací'\n\t/**\n\t * Called when the close button is clicked\n\t */\n\t@Event({eventName: 'gov-close'}) govClose: EventEmitter<InfobarEvent>\n\t/**\n\t * Displays the option to close the infobar\n\t */\n\t@Prop() readonly closable?: boolean = false\n\n\t@State() toggleContent = false\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(InfobarVariants, newValue, InfobarClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tlet inverse = !this.inverse\n\t\tlet variant = this.inverse ? 'secondary' : this.variant\n\n\t\tif (this.variant == 'warning') {\n\t\t\tinverse = false\n\t\t\tvariant = 'secondary'\n\t\t}\n\n\t\tconst closeButton = (\n\t\t\t<div class={InfobarClass.close}>\n\t\t\t\t<gov-button size=\"s\" wcagLabel={this.wcagCloseLabel} type=\"base\" variant={variant} inverse={inverse}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}>\n\t\t\t\t\t<gov-icon name=\"x-lg\"></gov-icon>\n\t\t\t\t</gov-button>\n\t\t\t</div>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(InfobarClass.root)} variant={this.variant}>\n\t\t\t\t<section class={InfobarClass.section} role={this.role}>\n\t\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t\t<div class={InfobarClass.icon}>\n\t\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div class={InfobarClass.content + (this.closable ? ' ' + InfobarClass.closable : '')}>\n\t\t\t\t\t\t{this.headline ? (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<div class={InfobarClass.headline}>\n\t\t\t\t\t\t\t\t\t<p>{this.headline}</p>\n\t\t\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\t\t\t\t\twcagLabel={this.wcagToggleLabel}\n\t\t\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\t\t\tvariant={variant}\n\t\t\t\t\t\t\t\t\t\tinverse={inverse}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => (this.toggleContent = !this.toggleContent)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<gov-icon name={this.toggleContent ? 'chevron-up' : 'chevron-down'}></gov-icon>\n\t\t\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div hidden={!this.toggleContent} aria-hidden={toBoolAttr(this.toggleContent)}>\n\t\t\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t\t{this.closable && closeButton}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tonCloseHandler(e: CustomEvent<ButtonEvent>) {\n\t\tthis.govClose.emit({\n\t\t\tcomponent: InfobarClass.root,\n\t\t\tref: this.host,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tif (this.closable) {\n\t\t\tvalidateWcagProp(this.wcagCloseLabel, 'wcag-close-label', InfobarClass.root)\n\t\t}\n\t\tif (this.headline) {\n\t\t\tvalidateWcagProp(this.wcagToggleLabel, 'wcag-toggle-label', InfobarClass.root)\n\t\t}\n\t}\n}\n"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, a as Host, g as getElement } from './index-eb59f132.js';
2
2
  import { a as LayoutColumnClass } from './constants-3786b01b.js';
3
- import { g as govHost } from './template-df429738.js';
3
+ import { g as govHost } from './template-a0067bb6.js';
4
4
 
5
5
  const govLayoutColumnCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-layout-column{position:relative;display:block;width:100%}";
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, a as Host, g as getElement } from './index-eb59f132.js';
2
2
  import { L as LayoutClass } from './constants-3786b01b.js';
3
- import { g as govHost } from './template-df429738.js';
3
+ import { g as govHost } from './template-a0067bb6.js';
4
4
 
5
5
  const govLayoutCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-layout{position:relative;display:block;width:100%}.gov-layout__section{display:flex;gap:var(--gov-layout-gap, 1.375rem);flex-direction:column}@media (min-width: 64em){.gov-layout__section{flex-direction:row}.gov-layout__section-aside-right .gov-layout-column:first-child,.gov-layout__section-aside .gov-layout-column:first-child{flex:1 1 auto;width:auto}.gov-layout__section-aside-right .gov-layout-column:last-child,.gov-layout__section-aside .gov-layout-column:last-child{flex:0 0 auto;width:calc(var(--gov-container-width, 73.75rem) / 3 - var(--gov-layout-gap, 1.375rem))}.gov-layout__section-aside-left .gov-layout-column:first-child{flex:0 0 auto;width:calc(var(--gov-container-width, 73.75rem) / 3 - var(--gov-layout-gap, 1.375rem))}.gov-layout__section-aside-left .gov-layout-column:last-child{flex:1 1 auto;width:auto}.gov-layout__section-aside-right-inverse .gov-layout-column:first-child{order:1}.gov-layout__section-aside-left-inverse .gov-layout-column:first-child{order:2}.gov-layout__section-text{width:var(--gov-layout-content-width, 48.75rem);margin-right:auto;margin-left:auto}.gov-layout__section-text-left{width:var(--gov-layout-content-width, 48.75rem);margin-right:auto}.gov-layout__section-text-right{width:var(--gov-layout-content-width, 48.75rem);margin-left:auto}}";
6
6
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, a as Host, g as getElement } from './index-eb59f132.js';
2
- import { g as govHost, p as prepareClasses } from './template-df429738.js';
2
+ import { g as govHost, p as prepareClasses } from './template-a0067bb6.js';
3
3
 
4
4
  const LoadingClass = {
5
5
  root: 'gov-loading',
@@ -2,7 +2,7 @@ import { r as registerInstance, h, a as Host, g as getElement } from './index-eb
2
2
  import { v as validateProp } from './props-a85d9c89.js';
3
3
  import { V as Variants } from './variants-2b936d58.js';
4
4
  import { p as pick } from './utils-c057a3fa.js';
5
- import { g as govHost } from './template-df429738.js';
5
+ import { g as govHost } from './template-a0067bb6.js';
6
6
  import './gov.log-49da0221.js';
7
7
  import './win-1dbd3f5c.js';
8
8
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-eb59f132.js';
2
- import { g as govHost, a as toBoolAttr } from './template-df429738.js';
2
+ import { g as govHost, c as boolToFocusValue, a as toBoolAttr } from './template-a0067bb6.js';
3
3
  import { c as canValidateWcagOnRender } from './win-1dbd3f5c.js';
4
4
  import { a as govErrorLog } from './gov.log-49da0221.js';
5
5
  import { a as validateWcagRef } from './wcag-7d25e12b.js';
@@ -36,6 +36,9 @@ const GovModal = class {
36
36
  }
37
37
  watchOpen(newValue) {
38
38
  this.open = newValue;
39
+ if (newValue && this.closeCtaRef) {
40
+ this.closeCtaRef.setFocus().catch();
41
+ }
39
42
  }
40
43
  showModal() {
41
44
  this.open = true;
@@ -61,7 +64,7 @@ const GovModal = class {
61
64
  }
62
65
  render() {
63
66
  const LabelTag = this.labelTag;
64
- return (h(Host, { class: this.h.classes(ModalClass.root), open: this.open }, h("dialog", { class: ModalClass.dialog, hidden: !this.open, tabindex: "-1", open: this.open, "aria-modal": "true", "aria-hidden": toBoolAttr(!this.open), "aria-labelledby": this.wcagLabelledBy || this.labelId, "aria-describedby": this.wcagDescribedBy || this.contentId, role: this.role }, h("div", { class: ModalClass.inner }, h("div", { class: ModalClass.header }, this.h.hasSlot('icon') && (h("div", { class: ModalClass.icon }, h("slot", { name: "icon" }))), this.label && (h(LabelTag, { class: ModalClass.title, id: this.labelId }, this.label)), h("gov-button", { disabled: this.blockClose, class: ModalClass.close, variant: "primary", wcagLabel: this.wcagCloseLabel, wcagLabelledBy: this.wcagCloseLabelledBy, type: "base", "on-gov-click": this.onCloseHandler.bind(this) }, h("gov-icon", { name: "x-lg" }))), h("div", { class: ModalClass.content, id: this.contentId }, h("slot", null)), this.h.hasSlot('footer') && (h("div", { class: ModalClass.footer }, h("slot", { name: "footer" }))))), this.open ? (h("gov-backdrop", { "wcag-label": this.wcagCloseLabel, "wcag-labelled-by": this.wcagCloseLabelledBy, "on-gov-click": this.onCloseHandler.bind(this) })) : null));
67
+ return (h(Host, { class: this.h.classes(ModalClass.root), open: this.open }, h("dialog", { class: ModalClass.dialog, hidden: !this.open, tabindex: boolToFocusValue(this.open), open: this.open, "aria-modal": "true", "aria-hidden": toBoolAttr(!this.open), "aria-labelledby": this.wcagLabelledBy || this.labelId, "aria-describedby": this.wcagDescribedBy || this.contentId, role: this.role }, h("div", { class: ModalClass.inner }, h("div", { class: ModalClass.header }, this.h.hasSlot('icon') && (h("div", { class: ModalClass.icon }, h("slot", { name: "icon" }))), this.label && (h(LabelTag, { class: ModalClass.title, id: this.labelId }, this.label)), h("gov-button", { ref: el => (this.closeCtaRef = el), disabled: this.blockClose, class: ModalClass.close, variant: "primary", wcagLabel: this.wcagCloseLabel, wcagLabelledBy: this.wcagCloseLabelledBy, type: "base", "on-gov-click": this.onCloseHandler.bind(this) }, h("gov-icon", { name: "x-lg" }))), h("div", { class: ModalClass.content, id: this.contentId }, h("slot", null)), this.h.hasSlot('footer') && (h("div", { class: ModalClass.footer }, h("slot", { name: "footer" }))))), this.open ? (h("gov-backdrop", { "wcag-label": this.wcagCloseLabel, "wcag-labelled-by": this.wcagCloseLabelledBy, "on-gov-click": this.onCloseHandler.bind(this) })) : null));
65
68
  }
66
69
  onCloseHandler(e) {
67
70
  e.stopPropagation();
@@ -1 +1 @@
1
- {"file":"gov-modal.entry.js","mappings":";;;;;;;;;AAAA,MAAM,WAAW,GAAG,2yFAA2yF;;MCelzF,QAAQ;EAKpB;;;gBAWgC,KAAK;sBAIhB,KAAK;;gBAQ4B,QAAQ;oBAIA,IAAI;;;0BAYS,aAAa;;IAtCvF,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAA;IACxC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,iBAAiB,CAA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ACE,EAER,IAAI,CAAC,IAAI,IACT,kCAA0B,IAAI,CAAC,cAAc,sBAAoB,IAAI,CAAC,mBAAmB,kBAAgB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAI,IACxI,IAAI,CACF,EACP;GACD;EAEO,cAAc,CAAC,CAAe;IACrC,CAAC,CAAC,eAAe,EAAE,CAAA;IACnB,IAAI,IAAI,CAAC,UAAU,KAAK,KAAK,EAAE;MAC9B,IAAI,CAAC,SAAS,EAAE,CAAA;MAChB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KACrB;GACD;;;;EAMD,MAAM,IAAI;IACT,IAAI,CAAC,SAAS,EAAE,CAAA;GAChB;;;;EAMD,MAAM,IAAI;IACT,IAAI,CAAC,SAAS,EAAE,CAAA;GAChB;;;;EAMD,MAAM,YAAY;IACjB,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;IACzE,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;GAC3E;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-modal/gov-modal.scss?tag=gov-modal","../../../packages/core/src/components/gov-modal/gov-modal.tsx"],"sourcesContent":["/*\n * Modal\n */\n\n$class: \".gov-modal\";\n\n#{$class} {\n\tdisplay: none;\n\n\t&__dialog {\n\t\t@include z-index(\"modal\", 1);\n\t\tposition: fixed;\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\twidth: 100%;\n\t\tmax-width: $modal-max-width;\n\t\theight: 100%;\n\t\tpadding: rem-calc(8);\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\ttransform: translate(-50%, -50%);\n\t\tpointer-events: none;\n\t}\n\n\t&__inner {\n\t\tposition: relative;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\twidth: 100%;\n\t\tmax-height: 100%;\n\t\tborder-radius: $border-radius;\n\t\tbackground: $modal-bg;\n\t\toverflow: hidden;\n\t\tpointer-events: auto;\n\t\tbox-shadow: get($shadow-l, $shadows);\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\talign-items: flex-start;\n\t\tpadding: rem-calc(24 16);\n\t\tborder-bottom: $modal-border;\n\t}\n\n\t&__icon {\n\t\tflex: 0 0 auto;\n\t\tpadding-top: calc(((var(--gov-text-#{$font-size-3xl}-font-size) * 1.5) - rem-calc(24)) / 2);\n\n\t\t& > * {\n\t\t\twidth: rem-calc(24);\n\t\t\theight: rem-calc(24);\n\t\t}\n\t}\n\n\t&__title {\n\t\t@include typography($font-size-3xl);\n\t\tmargin: 0;\n\t}\n\n\t&__close {\n\t\tflex: 0 0 auto;\n\t\tmargin-left: auto;\n\t}\n\n\t&__content {\n\t\t@include reset-last-margin();\n\t\theight: 100%;\n\t\tpadding: rem-calc(24 16);\n\t\tcolor: $modal-text-color;\n\t\toverflow: auto;\n\t}\n\n\t&__footer,\n\t&__actions {\n\t\tpadding: rem-calc(24 16);\n\t\tborder-top: $modal-border;\n\t}\n\n\t&__actions {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(8 16);\n\t\tflex-wrap: wrap;\n\t\tjustify-content: flex-end;\n\t}\n\n\t// STATES\n\t&__dialog:focus &__inner {\n\t\toutline: $outline;\n\t}\n\n\t@include parameter(\"open\") {\n\t\tdisplay: block;\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&__dialog {\n\t\t\tmax-width: calc($modal-max-width + 2 * rem-calc(24));\n\t\t\tpadding: rem-calc(24);\n\n\t\t\t&:focus {\n\t\t\t\toutline-offset: rem-calc(-24);\n\t\t\t}\n\t\t}\n\t\t&__inner {\n\t\t\tbox-shadow: get($shadow-xl, $shadows);\n\t\t}\n\n\t\t// VARIANTS\n\t\t&--prompt &__dialog {\n\t\t\tmax-width: calc($modal-prompt-max-width + 2 * rem-calc(24));\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\t&__header {\n\t\t\tgap: rem-calc(20);\n\t\t\tpadding: rem-calc(32 40 32 48);\n\t\t}\n\t\t&__content {\n\t\t\tpadding: rem-calc(32 48);\n\t\t}\n\t\t&__footer {\n\t\t\tpadding: rem-calc(16 48);\n\t\t}\n\n\t\t// VARIANTS\n\t\t&--prompt {\n\t\t\t#{$class} {\n\t\t\t\t&__header,\n\t\t\t\t&__content,\n\t\t\t\t&__footer,\n\t\t\t\t&__actions {\n\t\t\t\t\tpadding: rem-calc(24);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, Host, Method, Prop, Watch, h } from '@stencil/core'\nimport { govHost, toBoolAttr } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\nimport { validateWcagRef } from '../../helpers/Validate/wcag'\nimport { Nullable } from '../../types/interfaces'\nimport { createID } from '../../utils/string.utils'\nimport { delay } from '../../utils/utils'\nimport { ModalClass } from './constants'\n\n@Component({\n\ttag: 'gov-modal',\n\tstyleUrl: 'gov-modal.scss',\n})\nexport class GovModal {\n\tprivate h: GovHost\n\tprivate readonly labelId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.labelId = createID('GovModalLabel')\n\t\tthis.contentId = createID('GovModalContent')\n\t}\n\n\t@Element() host: HTMLGovModalElement\n\n\t/**\n\t * Attribute for modal window display\n\t */\n\t@Prop({ mutable: true }) open = false\n\t/**\n\t * Attribute allowing blocking the modal closing\n\t */\n\t@Prop() blockClose = false\n\t/**\n\t * Title of modal window\n\t */\n\t@Prop() label: string\n\t/**\n\t * Role of modal\n\t */\n\t@Prop({ attribute: 'role' }) role: Nullable<string> = 'dialog'\n\t/**\n\t * Used to change the HTML tag in the modal label for correct semantic structure\n\t */\n\t@Prop({ attribute: 'label-tag' }) readonly labelTag: string = 'h2'\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the modal.\n\t */\n\t@Prop({ attribute: 'wcag-described-by' }) wcagDescribedBy: string\n\t/**\n\t * Adds accessible label for the modal close button that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-close-label' }) readonly wcagCloseLabel: string = 'Zavřít okno'\n\t/**\n\t * A string of identifiers that indicate alternative label elements for closing the modal window\n\t */\n\t@Prop({ attribute: 'wcag-close-labelled-by' }) wcagCloseLabelledBy: string\n\t/**\n\t * Emitted when modal window closes.\n\t */\n\t@Event({ eventName: 'gov-close' }) govClose: EventEmitter<PointerEvent>\n\n\t@Watch('labelTag')\n\tvalidateLabelTag(newValue: string): void {\n\t\tconst validTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${ModalClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch('open')\n\twatchOpen(newValue: boolean): void {\n\t\tthis.open = newValue\n\t}\n\n\tprivate showModal() {\n\t\tthis.open = true\n\t\tdocument.body.classList.add(ModalClass.bodyFix)\n\t}\n\n\tprivate hideModal() {\n\t\tthis.open = false\n\t\tdocument.body.classList.remove(ModalClass.bodyFix)\n\t}\n\n\tasync componentWillRender() {\n\t\tif (this.open) {\n\t\t\tthis.showModal()\n\t\t} else {\n\t\t\tthis.hideModal()\n\t\t}\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst LabelTag = this.labelTag\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ModalClass.root)} open={this.open}>\n\t\t\t\t<dialog\n\t\t\t\t\tclass={ModalClass.dialog}\n\t\t\t\t\thidden={!this.open}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\topen={this.open}\n\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\taria-hidden={toBoolAttr(!this.open)}\n\t\t\t\t\taria-labelledby={this.wcagLabelledBy || this.labelId}\n\t\t\t\t\taria-describedby={this.wcagDescribedBy || this.contentId}\n\t\t\t\t\trole={this.role}\n\t\t\t\t>\n\t\t\t\t\t<div class={ModalClass.inner}>\n\t\t\t\t\t\t<div class={ModalClass.header}>\n\t\t\t\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t\t\t\t<div class={ModalClass.icon}>\n\t\t\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{this.label && (\n\t\t\t\t\t\t\t\t<LabelTag class={ModalClass.title} id={this.labelId}>\n\t\t\t\t\t\t\t\t\t{this.label}\n\t\t\t\t\t\t\t\t</LabelTag>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\tdisabled={this.blockClose}\n\t\t\t\t\t\t\t\tclass={ModalClass.close}\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\twcagLabel={this.wcagCloseLabel}\n\t\t\t\t\t\t\t\twcagLabelledBy={this.wcagCloseLabelledBy}\n\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<gov-icon name=\"x-lg\" />\n\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={ModalClass.content} id={this.contentId}>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{this.h.hasSlot('footer') && (\n\t\t\t\t\t\t\t<div class={ModalClass.footer}>\n\t\t\t\t\t\t\t\t<slot name=\"footer\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</dialog>\n\n\t\t\t\t{this.open ? (\n\t\t\t\t\t<gov-backdrop wcag-label={this.wcagCloseLabel} wcag-labelled-by={this.wcagCloseLabelledBy} on-gov-click={this.onCloseHandler.bind(this)} />\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t\tif (this.blockClose === false) {\n\t\t\tthis.hideModal()\n\t\t\tthis.govClose.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showModal()\n\t}\n\n\t/**\n\t * Hiding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.hideModal()\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagLabelledBy, 'wcag-labelled-by', ModalClass.root)\n\t\tvalidateWcagRef(this.wcagDescribedBy, 'wcag-described-by', ModalClass.root)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-modal.entry.js","mappings":";;;;;;;;;AAAA,MAAM,WAAW,GAAG,2yFAA2yF;;MCelzF,QAAQ;EAMpB;;;gBAW8B,KAAK;sBAId,KAAK;;gBAQ0B,QAAQ;oBAIA,IAAI;;;0BAYS,aAAa;;IAtCrF,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAA;IACxC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAA;GAC5C;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AAE,EAAE,EAAE,IAAI,CAAC,SAAS,IACjD,eAAO,CACF,EACL,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,KACxB,WAAK,KAAK,EAAE,UAAU,CAAC,MAAM,IAC5B,YAAM,IAAI,EAAC,QAAQ,GAAE,CAChB,CACN,CACI,CACE,EAER,IAAI,CAAC,IAAI,IACT,kCAA0B,IAAI,CAAC,cAAc,sBAAoB,IAAI,CAAC,mBAAmB,kBACpE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IACnD,IAAI,CACF,EACP;GACD;EAEO,cAAc,CAAC,CAAe;IACrC,CAAC,CAAC,eAAe,EAAE,CAAA;IACnB,IAAI,IAAI,CAAC,UAAU,KAAK,KAAK,EAAE;MAC9B,IAAI,CAAC,SAAS,EAAE,CAAA;MAChB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KACrB;GACD;;;;EAMD,MAAM,IAAI;IACT,IAAI,CAAC,SAAS,EAAE,CAAA;GAChB;;;;EAMD,MAAM,IAAI;IACT,IAAI,CAAC,SAAS,EAAE,CAAA;GAChB;;;;EAMD,MAAM,YAAY;IACjB,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;IACzE,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;GAC3E;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-modal/gov-modal.scss?tag=gov-modal","../../../packages/core/src/components/gov-modal/gov-modal.tsx"],"sourcesContent":["/*\n * Modal\n */\n\n$class: \".gov-modal\";\n\n#{$class} {\n\tdisplay: none;\n\n\t&__dialog {\n\t\t@include z-index(\"modal\", 1);\n\t\tposition: fixed;\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\twidth: 100%;\n\t\tmax-width: $modal-max-width;\n\t\theight: 100%;\n\t\tpadding: rem-calc(8);\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\ttransform: translate(-50%, -50%);\n\t\tpointer-events: none;\n\t}\n\n\t&__inner {\n\t\tposition: relative;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\twidth: 100%;\n\t\tmax-height: 100%;\n\t\tborder-radius: $border-radius;\n\t\tbackground: $modal-bg;\n\t\toverflow: hidden;\n\t\tpointer-events: auto;\n\t\tbox-shadow: get($shadow-l, $shadows);\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\talign-items: flex-start;\n\t\tpadding: rem-calc(24 16);\n\t\tborder-bottom: $modal-border;\n\t}\n\n\t&__icon {\n\t\tflex: 0 0 auto;\n\t\tpadding-top: calc(((var(--gov-text-#{$font-size-3xl}-font-size) * 1.5) - rem-calc(24)) / 2);\n\n\t\t& > * {\n\t\t\twidth: rem-calc(24);\n\t\t\theight: rem-calc(24);\n\t\t}\n\t}\n\n\t&__title {\n\t\t@include typography($font-size-3xl);\n\t\tmargin: 0;\n\t}\n\n\t&__close {\n\t\tflex: 0 0 auto;\n\t\tmargin-left: auto;\n\t}\n\n\t&__content {\n\t\t@include reset-last-margin();\n\t\theight: 100%;\n\t\tpadding: rem-calc(24 16);\n\t\tcolor: $modal-text-color;\n\t\toverflow: auto;\n\t}\n\n\t&__footer,\n\t&__actions {\n\t\tpadding: rem-calc(24 16);\n\t\tborder-top: $modal-border;\n\t}\n\n\t&__actions {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(8 16);\n\t\tflex-wrap: wrap;\n\t\tjustify-content: flex-end;\n\t}\n\n\t// STATES\n\t&__dialog:focus &__inner {\n\t\toutline: $outline;\n\t}\n\n\t@include parameter(\"open\") {\n\t\tdisplay: block;\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&__dialog {\n\t\t\tmax-width: calc($modal-max-width + 2 * rem-calc(24));\n\t\t\tpadding: rem-calc(24);\n\n\t\t\t&:focus {\n\t\t\t\toutline-offset: rem-calc(-24);\n\t\t\t}\n\t\t}\n\t\t&__inner {\n\t\t\tbox-shadow: get($shadow-xl, $shadows);\n\t\t}\n\n\t\t// VARIANTS\n\t\t&--prompt &__dialog {\n\t\t\tmax-width: calc($modal-prompt-max-width + 2 * rem-calc(24));\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\t&__header {\n\t\t\tgap: rem-calc(20);\n\t\t\tpadding: rem-calc(32 40 32 48);\n\t\t}\n\t\t&__content {\n\t\t\tpadding: rem-calc(32 48);\n\t\t}\n\t\t&__footer {\n\t\t\tpadding: rem-calc(16 48);\n\t\t}\n\n\t\t// VARIANTS\n\t\t&--prompt {\n\t\t\t#{$class} {\n\t\t\t\t&__header,\n\t\t\t\t&__content,\n\t\t\t\t&__footer,\n\t\t\t\t&__actions {\n\t\t\t\t\tpadding: rem-calc(24);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch} from '@stencil/core'\nimport {boolToFocusValue, govHost, toBoolAttr} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {govErrorLog} from '../../helpers/Log/gov.log'\nimport {validateWcagRef} from '../../helpers/Validate/wcag'\nimport {Nullable} from '../../types/interfaces'\nimport {createID} from '../../utils/string.utils'\nimport {delay} from '../../utils/utils'\nimport {ModalClass} from './constants'\n\n@Component({\n\ttag: 'gov-modal',\n\tstyleUrl: 'gov-modal.scss',\n})\nexport class GovModal {\n\tprivate h: GovHost\n\tprivate readonly labelId: string\n\tprivate readonly contentId: string\n\tprivate closeCtaRef?: HTMLGovButtonElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.labelId = createID('GovModalLabel')\n\t\tthis.contentId = createID('GovModalContent')\n\t}\n\n\t@Element() host: HTMLGovModalElement\n\n\t/**\n\t * Attribute for modal window display\n\t */\n\t@Prop({mutable: true}) open = false\n\t/**\n\t * Attribute allowing blocking the modal closing\n\t */\n\t@Prop() blockClose = false\n\t/**\n\t * Title of modal window\n\t */\n\t@Prop() label: string\n\t/**\n\t * Role of modal\n\t */\n\t@Prop({attribute: 'role'}) role: Nullable<string> = 'dialog'\n\t/**\n\t * Used to change the HTML tag in the modal label for correct semantic structure\n\t */\n\t@Prop({attribute: 'label-tag'}) readonly labelTag: string = 'h2'\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({attribute: 'wcag-labelled-by'}) wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the modal.\n\t */\n\t@Prop({attribute: 'wcag-described-by'}) wcagDescribedBy: string\n\t/**\n\t * Adds accessible label for the modal close button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'wcag-close-label'}) readonly wcagCloseLabel: string = 'Zavřít okno'\n\t/**\n\t * A string of identifiers that indicate alternative label elements for closing the modal window\n\t */\n\t@Prop({attribute: 'wcag-close-labelled-by'}) wcagCloseLabelledBy: string\n\t/**\n\t * Emitted when modal window closes.\n\t */\n\t@Event({eventName: 'gov-close'}) govClose: EventEmitter<PointerEvent>\n\n\t@Watch('labelTag')\n\tvalidateLabelTag(newValue: string): void {\n\t\tconst validTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${ModalClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch('open')\n\twatchOpen(newValue: boolean): void {\n\t\tthis.open = newValue\n\t\tif (newValue && this.closeCtaRef) {\n\t\t\tthis.closeCtaRef.setFocus().catch()\n\t\t}\n\t}\n\n\tprivate showModal() {\n\t\tthis.open = true\n\t\tdocument.body.classList.add(ModalClass.bodyFix)\n\t}\n\n\tprivate hideModal() {\n\t\tthis.open = false\n\t\tdocument.body.classList.remove(ModalClass.bodyFix)\n\t}\n\n\tasync componentWillRender() {\n\t\tif (this.open) {\n\t\t\tthis.showModal()\n\t\t} else {\n\t\t\tthis.hideModal()\n\t\t}\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst LabelTag = this.labelTag\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ModalClass.root)} open={this.open}>\n\t\t\t\t<dialog\n\t\t\t\t\tclass={ModalClass.dialog}\n\t\t\t\t\thidden={!this.open}\n\t\t\t\t\ttabindex={boolToFocusValue(this.open)}\n\t\t\t\t\topen={this.open}\n\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\taria-hidden={toBoolAttr(!this.open)}\n\t\t\t\t\taria-labelledby={this.wcagLabelledBy || this.labelId}\n\t\t\t\t\taria-describedby={this.wcagDescribedBy || this.contentId}\n\t\t\t\t\trole={this.role}\n\t\t\t\t>\n\t\t\t\t\t<div class={ModalClass.inner}>\n\t\t\t\t\t\t<div class={ModalClass.header}>\n\t\t\t\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t\t\t\t<div class={ModalClass.icon}>\n\t\t\t\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{this.label && (\n\t\t\t\t\t\t\t\t<LabelTag class={ModalClass.title} id={this.labelId}>\n\t\t\t\t\t\t\t\t\t{this.label}\n\t\t\t\t\t\t\t\t</LabelTag>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\tref={el => (this.closeCtaRef = el)}\n\t\t\t\t\t\t\t\tdisabled={this.blockClose}\n\t\t\t\t\t\t\t\tclass={ModalClass.close}\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\twcagLabel={this.wcagCloseLabel}\n\t\t\t\t\t\t\t\twcagLabelledBy={this.wcagCloseLabelledBy}\n\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<gov-icon name=\"x-lg\"/>\n\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={ModalClass.content} id={this.contentId}>\n\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{this.h.hasSlot('footer') && (\n\t\t\t\t\t\t\t<div class={ModalClass.footer}>\n\t\t\t\t\t\t\t\t<slot name=\"footer\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</dialog>\n\n\t\t\t\t{this.open ? (\n\t\t\t\t\t<gov-backdrop wcag-label={this.wcagCloseLabel} wcag-labelled-by={this.wcagCloseLabelledBy}\n\t\t\t\t\t\t\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}/>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t\tif (this.blockClose === false) {\n\t\t\tthis.hideModal()\n\t\t\tthis.govClose.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showModal()\n\t}\n\n\t/**\n\t * Hiding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.hideModal()\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagLabelledBy, 'wcag-labelled-by', ModalClass.root)\n\t\tvalidateWcagRef(this.wcagDescribedBy, 'wcag-described-by', ModalClass.root)\n\t}\n}\n"],"version":3}
@@ -4,10 +4,11 @@ import { v as validateProp } from './props-a85d9c89.js';
4
4
  import { S as Sizes } from './sizes-6c5943b4.js';
5
5
  import { V as Variants } from './variants-2b936d58.js';
6
6
  import { p as pick, d as delay } from './utils-c057a3fa.js';
7
- import { g as govHost, p as prepareClasses, t as toBoolAttrIfDefined } from './template-df429738.js';
7
+ import { g as govHost, p as prepareClasses, t as toBoolAttrIfDefined } from './template-a0067bb6.js';
8
8
  import { c as validateWcagProp, v as validateWcagLabel } from './wcag-7d25e12b.js';
9
9
  import { c as canValidateWcagOnRender } from './win-1dbd3f5c.js';
10
10
  import { c as createID } from './string.utils-f268fc6b.js';
11
+ import { c as createArrayRange } from './array.utils-b27436ea.js';
11
12
  import './gov.log-49da0221.js';
12
13
 
13
14
  const PaginationSizes = pick(Sizes, ['_S', '_M']);
@@ -83,13 +84,6 @@ function paginate(totalItems, currentPage = 1, pageSize = 10, maxPages = 10) {
83
84
  };
84
85
  }
85
86
 
86
- const createArrayRange = (from, to) => {
87
- if (Number.isInteger(from) && Number.isInteger(to)) {
88
- return [...Array(to + 1).keys()].slice(from);
89
- }
90
- return [];
91
- };
92
-
93
87
  const govPaginationCss = ".gov-pagination__list{margin:0;padding:0}.gov-pagination__list .gov-pagination__item{margin:0;padding:0;background:none}.gov-pagination__list .gov-pagination__item::before{display:none}.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-pagination{position:relative;display:block;width:100%}.gov-pagination__list{display:flex;align-items:center;flex-wrap:wrap;font-weight:bold;text-align:center}.gov-pagination__list .gov-pagination__item{display:flex;justify-content:center;align-items:center;margin:0;padding:0.125rem;border-radius:var(--gov-border-radius, 0.1875rem);overflow:hidden}.gov-pagination__list .gov-pagination__item--arrow{display:flex}.gov-pagination__list .gov-pagination__item--select{z-index:1;display:flex;overflow:visible;padding:0rem 1rem}.gov-pagination__arrow{margin:0}.gov-pagination__item--more .gov-form-select select{border:none !important;padding-right:0.75rem !important}.gov-pagination__item--more .gov-form-select .gov-icon{display:none}.gov-pagination__inner{display:flex;justify-content:center;align-items:center;align-self:stretch;width:100%;text-decoration:none}.gov-pagination__inner[wcag-current=true][type=solid][variant=primary] .element{background-color:var(--gov-button-primary-solid-hover-bg, var(--gov-color-primary-700));color:var(--gov-button-primary-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=primary] .element{background-color:var(--gov-button-primary-outlined-hover-bg, var(--gov-color-primary-100));color:var(--gov-button-primary-outlined-hover-color, var(--gov-color-primary))}.gov-pagination__inner[wcag-current=true][type=base][variant=primary] .element{background-color:var(--gov-button-primary-base-hover-bg, var(--gov-color-primary-100));color:var(--gov-button-primary-base-hover-color, var(--gov-color-primary))}.gov-pagination__inner[wcag-current=true][type=link][variant=primary] .element{background-color:var(--gov-button-primary-link-hover-bg, transparent);color:var(--gov-button-primary-link-hover-color, var(--gov-color-primary))}.gov-pagination__inner[wcag-current=true][type=solid][variant=secondary] .element{background-color:var(--gov-button-secondary-solid-hover-bg, var(--gov-color-secondary-900));color:var(--gov-button-secondary-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=secondary] .element{background-color:var(--gov-button-secondary-outlined-hover-bg, var(--gov-color-secondary-300));color:var(--gov-button-secondary-outlined-hover-color, var(--gov-color-secondary))}.gov-pagination__inner[wcag-current=true][type=base][variant=secondary] .element{background-color:var(--gov-button-secondary-base-hover-bg, var(--gov-color-secondary-300));color:var(--gov-button-secondary-base-hover-color, var(--gov-color-secondary))}.gov-pagination__inner[wcag-current=true][type=link][variant=secondary] .element{background-color:var(--gov-button-secondary-link-hover-bg, transparent);color:var(--gov-button-secondary-link-hover-color, var(--gov-color-secondary))}.gov-pagination__inner[wcag-current=true][type=solid][variant=error] .element{background-color:var(--gov-button-error-solid-hover-bg, var(--gov-color-error-500));color:var(--gov-button-error-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=error] .element{background-color:var(--gov-button-error-outlined-hover-bg, var(--gov-color-error-100));color:var(--gov-button-error-outlined-hover-color, var(--gov-color-error))}.gov-pagination__inner[wcag-current=true][type=base][variant=error] .element{background-color:var(--gov-button-error-base-hover-bg, var(--gov-color-error-100));color:var(--gov-button-error-base-hover-color, var(--gov-color-error))}.gov-pagination__inner[wcag-current=true][type=link][variant=error] .element{background-color:var(--gov-button-error-link-hover-bg, transparent);color:var(--gov-button-error-link-hover-color, var(--gov-color-error))}.gov-pagination__inner[wcag-current=true][type=solid][variant=success] .element{background-color:var(--gov-button-success-solid-hover-bg, var(--gov-color-success-600));color:var(--gov-button-success-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=success] .element{background-color:var(--gov-button-success-outlined-hover-bg, var(--gov-color-success-100));color:var(--gov-button-success-outlined-hover-color, var(--gov-color-success-500))}.gov-pagination__inner[wcag-current=true][type=base][variant=success] .element{background-color:var(--gov-button-success-base-hover-bg, var(--gov-color-success-100));color:var(--gov-button-success-base-hover-color, var(--gov-color-success-500))}.gov-pagination__inner[wcag-current=true][type=link][variant=success] .element{background-color:var(--gov-button-success-link-hover-bg, transparent);color:var(--gov-button-success-link-hover-color, var(--gov-color-success-500))}.gov-pagination__inner[wcag-current=true][type=solid][variant=warning] .element{background-color:var(--gov-button-warning-solid-hover-bg, var(--gov-color-warning-600));color:var(--gov-button-warning-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=warning] .element{background-color:var(--gov-button-warning-outlined-hover-bg, var(--gov-color-warning-200));color:var(--gov-button-warning-outlined-hover-color, var(--gov-color-warning-500))}.gov-pagination__inner[wcag-current=true][type=base][variant=warning] .element{background-color:var(--gov-button-warning-base-hover-bg, var(--gov-color-warning-200));color:var(--gov-button-warning-base-hover-color, var(--gov-color-warning-500))}.gov-pagination__inner[wcag-current=true][type=link][variant=warning] .element{background-color:var(--gov-button-warning-link-hover-bg, transparent);color:var(--gov-button-warning-link-hover-color, var(--gov-color-warning-500))}.gov-pagination[size=s] .gov-pagination__inner{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);font-weight:inherit}.gov-pagination[size=s] .gov-pagination__inner .element{min-width:var(--gov-pagination-s-button-size, 2rem)}.gov-pagination[size=m] .gov-pagination__inner{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);font-weight:inherit}.gov-pagination[size=m] .gov-pagination__inner .element{min-width:var(--gov-pagination-m-button-size, 2.5rem)}";
94
88
 
95
89
  const GovPagination = class {
@@ -109,6 +103,10 @@ const GovPagination = class {
109
103
  this.wcagLabelledBy = undefined;
110
104
  this.wcagSelectLabel = "Vybrat stranu";
111
105
  this.wcagPageLabel = "Strana";
106
+ this.labelPrev = 'Přejít o stranu zpět';
107
+ this.labelStart = 'Přejít na začátek';
108
+ this.labelNext = 'Přejít na další stranu';
109
+ this.labelEnd = 'Přejít na konec';
112
110
  this.pagination = undefined;
113
111
  this.h = govHost(this.host);
114
112
  this.pageSelectId = createID("GovPageSelect");
@@ -162,12 +160,12 @@ const GovPagination = class {
162
160
  }
163
161
  }
164
162
  render() {
165
- const pageResolver = (page, content) => {
163
+ const pageResolver = (page, content, description) => {
166
164
  const isDisabled = page === -1;
167
165
  const ariaCurrent = toBoolAttrIfDefined(this.pagination.currentPage === page ? true : undefined);
168
- return (h("gov-button", { href: this.prepareLinkUrl(page), variant: this.variant, size: this.size, type: "base", disabled: isDisabled, "on-gov-click": (e) => this.onClickHandler(e, page), "wcag-label": page > -1 ? this.wcagPageLabel + " " + page : undefined, "wcag-current": ariaCurrent, class: PaginationClass.inner }, content));
166
+ return (h("gov-button", { href: this.prepareLinkUrl(page), variant: this.variant, size: this.size, type: "base", disabled: isDisabled, "on-gov-click": (e) => this.onClickHandler(e, page), "wcag-label": description ? description : page > -1 ? this.wcagPageLabel + " " + page : undefined, "wcag-current": ariaCurrent, class: PaginationClass.inner }, content));
169
167
  };
170
- return (h(Host, { class: this.h.classes(PaginationClass.root), type: this.type, variant: this.variant, size: this.size }, h("nav", { "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy }, h("ul", { class: PaginationClass.list }, h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.currentPage > 1 ? 1 : -1, h("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-left" }))), h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1, h("gov-icon", { class: PaginationClass.arrow, name: "chevron-left" }))), this.type == "select" ? (h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemSelect]) }, h("span", { class: PaginationClass.inner }, h("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), h("gov-form-select", { size: "m", variant: this.variant, "wcag-labelled-by": this.pageSelectId, "on-gov-change": this.onSelectHandler.bind(this) }, createArrayRange(1, this.pagination.totalPages).map(page => (h("option", { value: page, selected: this.pagination.currentPage === page }, page))))))) : (h(Fragment, null, this.pagination.pages.map(page => (h("li", { class: this.isActivePageClass(PaginationClass.item, page) }, pageResolver(page, page)))), this.pagination.totalPages ? (h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemMore]) }, h("span", { class: PaginationClass.inner }, h("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), h("gov-form-select", { size: "m", variant: this.variant, "wcag-labelled-by": this.pageSelectId, ref: el => (this.spreadSelectRef = el), "on-gov-change": this.onSelectHandler.bind(this) }, h("option", { selected: true, hidden: true }, "..."), createArrayRange(1, this.pagination.totalPages).map(page => (h("option", { value: page, selected: false }, page))))))) : null)), h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1, h("gov-icon", { class: PaginationClass.arrow, name: "chevron-right" }))), h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1, h("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-right" })))))));
168
+ return (h(Host, { class: this.h.classes(PaginationClass.root), type: this.type, variant: this.variant, size: this.size }, h("nav", { "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy }, h("ul", { class: PaginationClass.list }, h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.currentPage > 1 ? 1 : -1, h("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-left" }), this.labelStart)), h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1, h("gov-icon", { class: PaginationClass.arrow, name: "chevron-left" }), this.labelPrev)), this.type == "select" ? (h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemSelect]) }, h("span", { class: PaginationClass.inner }, h("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), h("gov-form-select", { size: this.size, variant: this.variant, "wcag-labelled-by": this.pageSelectId, "on-gov-change": this.onSelectHandler.bind(this) }, createArrayRange(1, this.pagination.totalPages).map(page => (h("option", { value: page, selected: this.pagination.currentPage === page }, page))))))) : (h(Fragment, null, this.pagination.pages.map(page => (h("li", { class: this.isActivePageClass(PaginationClass.item, page) }, pageResolver(page, page, '')))), this.pagination.totalPages ? (h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemMore]) }, h("span", { class: PaginationClass.inner }, h("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), h("gov-form-select", { size: this.size, variant: this.variant, "wcag-labelled-by": this.pageSelectId, ref: el => (this.spreadSelectRef = el), "on-gov-change": this.onSelectHandler.bind(this) }, h("option", { selected: true, hidden: true }, "..."), createArrayRange(1, this.pagination.totalPages).map(page => (h("option", { value: page, selected: false }, page))))))) : null)), h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1, h("gov-icon", { class: PaginationClass.arrow, name: "chevron-right" }), this.labelNext)), h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1, h("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-right" }), this.labelEnd))))));
171
169
  }
172
170
  onClickHandler(e, page) {
173
171
  e.stopPropagation();