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

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 (407) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/gov-attachments_3.cjs.entry.js +3 -3
  3. package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
  4. package/dist/cjs/gov-backdrop.cjs.entry.js +1 -1
  5. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +1 -1
  6. package/dist/cjs/gov-button.cjs.entry.js +3 -3
  7. package/dist/cjs/gov-card.cjs.entry.js +1 -1
  8. package/dist/cjs/gov-chip.cjs.entry.js +2 -2
  9. package/dist/cjs/gov-container.cjs.entry.js +1 -1
  10. package/dist/cjs/gov-control-group.cjs.entry.js +1 -1
  11. package/dist/cjs/gov-cookiebar.cjs.entry.js +1 -1
  12. package/dist/cjs/gov-dialog.cjs.entry.js +1 -1
  13. package/dist/cjs/gov-dialog.cjs.entry.js.map +1 -1
  14. package/dist/cjs/gov-dropdown.cjs.entry.js +1 -1
  15. package/dist/cjs/gov-empty.cjs.entry.js +1 -1
  16. package/dist/cjs/gov-error-code.cjs.entry.js +1 -1
  17. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +1 -1
  18. package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +1 -1
  19. package/dist/cjs/gov-form-control.cjs.entry.js +1 -1
  20. package/dist/cjs/gov-form-file.cjs.entry.js +1 -1
  21. package/dist/cjs/gov-form-group.cjs.entry.js +1 -1
  22. package/dist/cjs/gov-form-input_2.cjs.entry.js +4 -4
  23. package/dist/cjs/gov-form-label.cjs.entry.js +1 -1
  24. package/dist/cjs/gov-form-multi-select.cjs.entry.js +5 -5
  25. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  26. package/dist/cjs/gov-form-password-power.cjs.entry.js +1 -1
  27. package/dist/cjs/gov-form-radio-group.cjs.entry.js +1 -1
  28. package/dist/cjs/gov-form-search.cjs.entry.js +1 -1
  29. package/dist/cjs/gov-form-select.cjs.entry.js +2 -2
  30. package/dist/cjs/gov-grid-item.cjs.entry.js +1 -1
  31. package/dist/cjs/gov-grid.cjs.entry.js +1 -1
  32. package/dist/cjs/gov-icon.cjs.entry.js +1 -1
  33. package/dist/cjs/gov-infobar.cjs.entry.js +2 -2
  34. package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -1
  35. package/dist/cjs/gov-layout-column.cjs.entry.js +1 -1
  36. package/dist/cjs/gov-layout.cjs.entry.js +1 -1
  37. package/dist/cjs/gov-loading.cjs.entry.js +1 -1
  38. package/dist/cjs/gov-message.cjs.entry.js +1 -1
  39. package/dist/cjs/gov-pagination.cjs.entry.js +1 -1
  40. package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
  41. package/dist/cjs/gov-spacer.cjs.entry.js +1 -1
  42. package/dist/cjs/gov-stepper-item.cjs.entry.js +1 -1
  43. package/dist/cjs/gov-stepper.cjs.entry.js +1 -1
  44. package/dist/cjs/gov-tabs-item.cjs.entry.js +1 -1
  45. package/dist/cjs/gov-tabs.cjs.entry.js +1 -1
  46. package/dist/cjs/gov-tag.cjs.entry.js +1 -1
  47. package/dist/cjs/gov-theme-switch.cjs.entry.js +73 -0
  48. package/dist/cjs/gov-theme-switch.cjs.entry.js.map +1 -0
  49. package/dist/cjs/gov-tile.cjs.entry.js +1 -1
  50. package/dist/cjs/gov-tiles.cjs.entry.js +1 -1
  51. package/dist/cjs/gov-toast.cjs.entry.js +1 -1
  52. package/dist/cjs/gov-tooltip-content.cjs.entry.js +1 -1
  53. package/dist/cjs/gov-tooltip.cjs.entry.js +2 -2
  54. package/dist/cjs/gov-wizard-item.cjs.entry.js +2 -2
  55. package/dist/cjs/gov-wizard.cjs.entry.js +1 -1
  56. package/dist/cjs/index-1af4880c.js +2 -2
  57. package/dist/cjs/loader.cjs.js +1 -1
  58. package/dist/collection/collection-manifest.json +0 -1
  59. package/dist/collection/components/gov-attachments/gov-attachments-item.js +1 -1
  60. package/dist/collection/components/gov-attachments/gov-attachments-item.js.map +1 -1
  61. package/dist/collection/components/gov-attachments/gov-attachments.js +1 -1
  62. package/dist/collection/components/gov-backdrop/gov-backdrop.js +1 -1
  63. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +1 -1
  64. package/dist/collection/components/gov-button/button/gov-button.js +3 -3
  65. package/dist/collection/components/gov-button/dropdown/gov-dropdown.js +1 -1
  66. package/dist/collection/components/gov-card/gov-card.js +1 -1
  67. package/dist/collection/components/gov-chip/gov-chip.js +2 -2
  68. package/dist/collection/components/gov-container/gov-container.js +1 -1
  69. package/dist/collection/components/gov-control-group/gov-control-group.js +1 -1
  70. package/dist/collection/components/gov-cookiebar/gov-cookiebar.js +1 -1
  71. package/dist/collection/components/gov-dialog/gov-dialog.js +1 -1
  72. package/dist/collection/components/gov-dialog/gov-dialog.js.map +1 -1
  73. package/dist/collection/components/gov-empty/gov-empty.js +1 -1
  74. package/dist/collection/components/gov-error-code/gov-error-code.js +1 -1
  75. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +1 -1
  76. package/dist/collection/components/gov-form/control/gov-form-control.js +1 -1
  77. package/dist/collection/components/gov-form/file/gov-form-file.js +1 -1
  78. package/dist/collection/components/gov-form/group/gov-form-checkbox-group.js +1 -1
  79. package/dist/collection/components/gov-form/group/gov-form-group.js +1 -1
  80. package/dist/collection/components/gov-form/group/gov-form-radio-group.js +1 -1
  81. package/dist/collection/components/gov-form/input/gov-form-input.js +3 -3
  82. package/dist/collection/components/gov-form/label/gov-form-label.js +1 -1
  83. package/dist/collection/components/gov-form/message/gov-form-message.js +1 -1
  84. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +5 -5
  85. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
  86. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +1 -1
  87. package/dist/collection/components/gov-form/search/gov-form-search.js +1 -1
  88. package/dist/collection/components/gov-form/select/gov-form-select.js +2 -2
  89. package/dist/collection/components/gov-grid/gov-grid-item.js +1 -1
  90. package/dist/collection/components/gov-grid/gov-grid.js +1 -1
  91. package/dist/collection/components/gov-infobar/gov-infobar.js +2 -2
  92. package/dist/collection/components/gov-infobar/gov-infobar.js.map +1 -1
  93. package/dist/collection/components/gov-layout/gov-layout-column.js +1 -1
  94. package/dist/collection/components/gov-layout/gov-layout.js +1 -1
  95. package/dist/collection/components/gov-loading/loading/gov-loading.js +1 -1
  96. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +1 -1
  97. package/dist/collection/components/gov-message/gov-message.js +1 -1
  98. package/dist/collection/components/gov-pagination/gov-pagination.js +1 -1
  99. package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
  100. package/dist/collection/components/gov-spacer/gov-spacer.js +1 -1
  101. package/dist/collection/components/gov-stepper/gov-stepper-item.js +1 -1
  102. package/dist/collection/components/gov-stepper/gov-stepper.js +1 -1
  103. package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
  104. package/dist/collection/components/gov-tabs/gov-tabs.js +1 -1
  105. package/dist/collection/components/gov-tag/gov-tag.js +1 -1
  106. package/dist/collection/components/gov-theme-switch/gov-theme-switch.js +1 -1
  107. package/dist/collection/components/gov-tile/container/gov-tiles.js +1 -1
  108. package/dist/collection/components/gov-tile/gov-tile.js +1 -1
  109. package/dist/collection/components/gov-toast/gov-toast.js +1 -1
  110. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +1 -1
  111. package/dist/collection/components/gov-tooltip/gov-tooltip.js +2 -2
  112. package/dist/collection/components/gov-wizard/gov-wizard-item.js +2 -2
  113. package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
  114. package/dist/components/gov-accordion-item.js +1 -1
  115. package/dist/components/gov-attachments-item.js +1 -1
  116. package/dist/components/gov-attachments.js +1 -1
  117. package/dist/components/gov-backdrop.js +1 -1
  118. package/dist/components/gov-breadcrumbs.js +1 -1
  119. package/dist/components/gov-breadcrumbs.js.map +1 -1
  120. package/dist/components/gov-button.js +1 -1
  121. package/dist/components/gov-card.js +1 -1
  122. package/dist/components/gov-chip.js +1 -1
  123. package/dist/components/gov-container.js +1 -1
  124. package/dist/components/gov-control-group.js +1 -1
  125. package/dist/components/gov-cookiebar.js +1 -1
  126. package/dist/components/gov-dialog.js +1 -1
  127. package/dist/components/gov-dialog.js.map +1 -1
  128. package/dist/components/gov-dropdown.js +1 -1
  129. package/dist/components/gov-dropdown.js.map +1 -1
  130. package/dist/components/gov-empty.js +1 -1
  131. package/dist/components/gov-error-code.js +1 -1
  132. package/dist/components/gov-form-autocomplete.js +1 -1
  133. package/dist/components/gov-form-checkbox-group.js +1 -1
  134. package/dist/components/gov-form-checkbox.js +1 -1
  135. package/dist/components/gov-form-control.js +1 -1
  136. package/dist/components/gov-form-file.js +1 -1
  137. package/dist/components/gov-form-file.js.map +1 -1
  138. package/dist/components/gov-form-group.js +1 -1
  139. package/dist/components/gov-form-input.js +1 -1
  140. package/dist/components/gov-form-label.js +1 -1
  141. package/dist/components/gov-form-message.js +1 -1
  142. package/dist/components/gov-form-multi-select.js +1 -1
  143. package/dist/components/gov-form-multi-select.js.map +1 -1
  144. package/dist/components/gov-form-password-power.js +1 -1
  145. package/dist/components/gov-form-password-power.js.map +1 -1
  146. package/dist/components/gov-form-radio-group.js +1 -1
  147. package/dist/components/gov-form-search.js +1 -1
  148. package/dist/components/gov-form-select.js +1 -1
  149. package/dist/components/gov-form-switch.js +1 -1
  150. package/dist/components/gov-grid-item.js +1 -1
  151. package/dist/components/gov-grid.js +1 -1
  152. package/dist/components/gov-icon.js +1 -1
  153. package/dist/components/gov-infobar.js +1 -1
  154. package/dist/components/gov-infobar.js.map +1 -1
  155. package/dist/components/gov-layout-column.js +1 -1
  156. package/dist/components/gov-layout.js +1 -1
  157. package/dist/components/gov-loading.js +1 -1
  158. package/dist/components/gov-loading.js.map +1 -1
  159. package/dist/components/gov-message.js +1 -1
  160. package/dist/components/gov-pagination.js +1 -1
  161. package/dist/components/gov-pagination.js.map +1 -1
  162. package/dist/components/gov-skeleton.js +1 -1
  163. package/dist/components/gov-spacer.js +1 -1
  164. package/dist/components/gov-stepper-item.js +1 -1
  165. package/dist/components/gov-stepper.js +1 -1
  166. package/dist/components/gov-tabs-item.js +1 -1
  167. package/dist/components/gov-tabs.js +1 -1
  168. package/dist/components/gov-tag.js +1 -1
  169. package/dist/components/gov-theme-switch.js +1 -1
  170. package/dist/components/gov-tile.js +1 -1
  171. package/dist/components/gov-tiles.js +1 -1
  172. package/dist/components/gov-toast.js +1 -1
  173. package/dist/components/gov-tooltip-content.js +1 -1
  174. package/dist/components/gov-tooltip-content.js.map +1 -1
  175. package/dist/components/gov-tooltip.js +1 -1
  176. package/dist/components/gov-wizard-item.js +1 -1
  177. package/dist/components/gov-wizard.js +1 -1
  178. package/dist/components/{p-736e4917.js → p-1e82b99e.js} +2 -2
  179. package/dist/components/{p-c9a15c52.js → p-3dece5f7.js} +2 -2
  180. package/dist/components/p-4a92317f.js +2 -0
  181. package/dist/components/{p-e9b35956.js.map → p-4a92317f.js.map} +1 -1
  182. package/dist/components/{p-ff0cf148.js → p-4ffeb83f.js} +2 -2
  183. package/dist/components/{p-5caf1fe1.js → p-a14f8877.js} +2 -2
  184. package/dist/components/p-a5975d22.js +2 -0
  185. package/dist/components/{p-6e19816b.js → p-a99d125a.js} +2 -2
  186. package/dist/components/{p-2da35aa8.js → p-c0bb26c2.js} +2 -2
  187. package/dist/components/{p-e20bb5dc.js → p-dd8d3279.js} +2 -2
  188. package/dist/components/p-de3103e8.js +2 -0
  189. package/dist/components/{p-fe1842da.js.map → p-de3103e8.js.map} +1 -1
  190. package/dist/components/p-de8656dd.js +2 -0
  191. package/dist/core/core.esm.js +1 -1
  192. package/dist/core/core.esm.js.map +1 -1
  193. package/dist/core/{p-0a952b3c.entry.js → p-0225a96a.entry.js} +2 -2
  194. package/dist/core/p-033bbbaa.entry.js +2 -0
  195. package/dist/core/{p-f456bd71.entry.js.map → p-033bbbaa.entry.js.map} +1 -1
  196. package/dist/core/p-0d7b9167.entry.js +2 -0
  197. package/dist/core/{p-aa8adc45.entry.js.map → p-0d7b9167.entry.js.map} +1 -1
  198. package/dist/core/p-111e1a63.entry.js +2 -0
  199. package/dist/core/{p-5dcbfca3.entry.js.map → p-111e1a63.entry.js.map} +1 -1
  200. package/dist/core/p-1638b12b.entry.js +2 -0
  201. package/dist/core/{p-f1be099b.entry.js → p-1bbc10c9.entry.js} +2 -2
  202. package/dist/core/{p-fc90bf06.entry.js → p-21bdd725.entry.js} +2 -2
  203. package/dist/core/p-235869e6.entry.js +2 -0
  204. package/dist/core/p-2ee0d589.entry.js +2 -0
  205. package/dist/core/{p-2ed3afef.entry.js → p-33ecbb38.entry.js} +2 -2
  206. package/dist/core/p-378e5294.entry.js +2 -0
  207. package/dist/core/{p-dc3fab19.entry.js.map → p-378e5294.entry.js.map} +1 -1
  208. package/dist/core/p-393a281e.entry.js +2 -0
  209. package/dist/core/{p-7cf554e6.entry.js.map → p-393a281e.entry.js.map} +1 -1
  210. package/dist/core/p-39d8e408.entry.js +2 -0
  211. package/dist/core/p-3a519b02.entry.js +2 -0
  212. package/dist/core/p-3db35bee.entry.js +2 -0
  213. package/dist/core/{p-17015e36.entry.js.map → p-3db35bee.entry.js.map} +1 -1
  214. package/dist/core/p-3ddfbc05.entry.js +2 -0
  215. package/dist/core/{p-fa7caad6.entry.js → p-3e8b94c2.entry.js} +2 -2
  216. package/dist/core/p-3f5f36e4.entry.js +2 -0
  217. package/dist/core/{p-83039b10.entry.js.map → p-3f5f36e4.entry.js.map} +1 -1
  218. package/dist/core/p-4898c95f.entry.js +2 -0
  219. package/dist/core/p-4e98412a.entry.js +2 -0
  220. package/dist/core/{p-db940455.entry.js.map → p-4e98412a.entry.js.map} +1 -1
  221. package/dist/core/p-59c4574a.entry.js +2 -0
  222. package/dist/core/{p-5dc0af54.entry.js.map → p-59c4574a.entry.js.map} +1 -1
  223. package/dist/core/p-5f776da7.entry.js +2 -0
  224. package/dist/core/{p-663d3db2.entry.js.map → p-5f776da7.entry.js.map} +1 -1
  225. package/dist/core/p-74e20474.entry.js +2 -0
  226. package/dist/core/{p-b838bb27.entry.js.map → p-74e20474.entry.js.map} +1 -1
  227. package/dist/core/{p-c214c202.entry.js → p-7cd2c877.entry.js} +2 -2
  228. package/dist/core/{p-3f2b803c.entry.js → p-8321da17.entry.js} +2 -2
  229. package/dist/core/{p-81b0848c.entry.js → p-899e504a.entry.js} +2 -2
  230. package/dist/core/p-9100d24f.entry.js +2 -0
  231. package/dist/core/p-964f1729.entry.js +2 -0
  232. package/dist/core/p-97927e2a.entry.js +2 -0
  233. package/dist/core/{p-5c88f415.entry.js.map → p-97927e2a.entry.js.map} +1 -1
  234. package/dist/core/p-98091397.entry.js +2 -0
  235. package/dist/core/{p-74e9ad9d.entry.js → p-987388fd.entry.js} +2 -2
  236. package/dist/core/p-9d0c3dee.entry.js +2 -0
  237. package/dist/core/{p-a5489b0e.entry.js → p-a42514f9.entry.js} +2 -2
  238. package/dist/core/{p-ab9ae7ba.entry.js → p-a4886f2d.entry.js} +2 -2
  239. package/dist/core/p-acff78c5.entry.js +2 -0
  240. package/dist/core/{p-b55fc943.entry.js.map → p-acff78c5.entry.js.map} +1 -1
  241. package/dist/core/{p-d2351924.entry.js → p-b215f99f.entry.js} +2 -2
  242. package/dist/core/p-bdf1864e.entry.js +2 -0
  243. package/dist/core/{p-6d772ff9.entry.js.map → p-bdf1864e.entry.js.map} +1 -1
  244. package/dist/core/p-c5375a8a.entry.js +2 -0
  245. package/dist/core/p-c5375a8a.entry.js.map +1 -0
  246. package/dist/core/{p-6b42a387.entry.js → p-c6431085.entry.js} +2 -2
  247. package/dist/core/p-ca093025.entry.js +2 -0
  248. package/dist/core/p-d56632e1.entry.js +2 -0
  249. package/dist/core/{p-6ed147a6.entry.js → p-e49b1737.entry.js} +2 -2
  250. package/dist/core/{p-6ed147a6.entry.js.map → p-e49b1737.entry.js.map} +1 -1
  251. package/dist/core/p-e5b95316.entry.js +2 -0
  252. package/dist/core/p-ea6cb030.entry.js +2 -0
  253. package/dist/core/{p-eeb9cb73.entry.js.map → p-ea6cb030.entry.js.map} +1 -1
  254. package/dist/core/{p-edc05eff.entry.js → p-eb2af67a.entry.js} +2 -2
  255. package/dist/core/p-f0781e29.entry.js +2 -0
  256. package/dist/core/{p-47e364bb.entry.js.map → p-f0781e29.entry.js.map} +1 -1
  257. package/dist/core/p-f4e04e98.entry.js +2 -0
  258. package/dist/core/p-fe147dbf.entry.js +2 -0
  259. package/dist/esm/core.js +1 -1
  260. package/dist/esm/gov-attachments_3.entry.js +3 -3
  261. package/dist/esm/gov-attachments_3.entry.js.map +1 -1
  262. package/dist/esm/gov-backdrop.entry.js +1 -1
  263. package/dist/esm/gov-breadcrumbs.entry.js +1 -1
  264. package/dist/esm/gov-button.entry.js +3 -3
  265. package/dist/esm/gov-card.entry.js +1 -1
  266. package/dist/esm/gov-chip.entry.js +2 -2
  267. package/dist/esm/gov-container.entry.js +1 -1
  268. package/dist/esm/gov-control-group.entry.js +1 -1
  269. package/dist/esm/gov-cookiebar.entry.js +1 -1
  270. package/dist/esm/gov-dialog.entry.js +1 -1
  271. package/dist/esm/gov-dialog.entry.js.map +1 -1
  272. package/dist/esm/gov-dropdown.entry.js +1 -1
  273. package/dist/esm/gov-empty.entry.js +1 -1
  274. package/dist/esm/gov-error-code.entry.js +1 -1
  275. package/dist/esm/gov-form-autocomplete.entry.js +1 -1
  276. package/dist/esm/gov-form-checkbox-group.entry.js +1 -1
  277. package/dist/esm/gov-form-control.entry.js +1 -1
  278. package/dist/esm/gov-form-file.entry.js +1 -1
  279. package/dist/esm/gov-form-group.entry.js +1 -1
  280. package/dist/esm/gov-form-input_2.entry.js +4 -4
  281. package/dist/esm/gov-form-label.entry.js +1 -1
  282. package/dist/esm/gov-form-multi-select.entry.js +5 -5
  283. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  284. package/dist/esm/gov-form-password-power.entry.js +1 -1
  285. package/dist/esm/gov-form-radio-group.entry.js +1 -1
  286. package/dist/esm/gov-form-search.entry.js +1 -1
  287. package/dist/esm/gov-form-select.entry.js +2 -2
  288. package/dist/esm/gov-grid-item.entry.js +1 -1
  289. package/dist/esm/gov-grid.entry.js +1 -1
  290. package/dist/esm/gov-icon.entry.js +1 -1
  291. package/dist/esm/gov-infobar.entry.js +2 -2
  292. package/dist/esm/gov-infobar.entry.js.map +1 -1
  293. package/dist/esm/gov-layout-column.entry.js +1 -1
  294. package/dist/esm/gov-layout.entry.js +1 -1
  295. package/dist/esm/gov-loading.entry.js +1 -1
  296. package/dist/esm/gov-message.entry.js +1 -1
  297. package/dist/esm/gov-pagination.entry.js +1 -1
  298. package/dist/esm/gov-pagination.entry.js.map +1 -1
  299. package/dist/esm/gov-spacer.entry.js +1 -1
  300. package/dist/esm/gov-stepper-item.entry.js +1 -1
  301. package/dist/esm/gov-stepper.entry.js +1 -1
  302. package/dist/esm/gov-tabs-item.entry.js +1 -1
  303. package/dist/esm/gov-tabs.entry.js +1 -1
  304. package/dist/esm/gov-tag.entry.js +1 -1
  305. package/dist/esm/gov-theme-switch.entry.js +69 -0
  306. package/dist/esm/gov-theme-switch.entry.js.map +1 -0
  307. package/dist/esm/gov-tile.entry.js +1 -1
  308. package/dist/esm/gov-tiles.entry.js +1 -1
  309. package/dist/esm/gov-toast.entry.js +1 -1
  310. package/dist/esm/gov-tooltip-content.entry.js +1 -1
  311. package/dist/esm/gov-tooltip.entry.js +2 -2
  312. package/dist/esm/gov-wizard-item.entry.js +2 -2
  313. package/dist/esm/gov-wizard.entry.js +1 -1
  314. package/dist/esm/index-d8b4eb6c.js +2 -2
  315. package/dist/esm/loader.js +1 -1
  316. package/dist/hydrate/index.js +64 -9890
  317. package/dist/hydrate/index.mjs +64 -9890
  318. package/dist/types/components.d.ts +0 -13
  319. package/package.json +1 -1
  320. package/dist/cjs/gov-app_2.cjs.entry.js +0 -9891
  321. package/dist/cjs/gov-app_2.cjs.entry.js.map +0 -1
  322. package/dist/collection/components/gov-app/gov-app.css +0 -68
  323. package/dist/collection/components/gov-app/gov-app.js +0 -93
  324. package/dist/collection/components/gov-app/gov-app.js.map +0 -1
  325. package/dist/components/gov-app.d.ts +0 -11
  326. package/dist/components/gov-app.js +0 -2
  327. package/dist/components/gov-app.js.map +0 -1
  328. package/dist/components/p-ae7e6127.js +0 -2
  329. package/dist/components/p-e183a7c7.js +0 -2
  330. package/dist/components/p-e9b35956.js +0 -2
  331. package/dist/components/p-fe1842da.js +0 -2
  332. package/dist/core/p-006e52f1.entry.js +0 -2
  333. package/dist/core/p-17015e36.entry.js +0 -2
  334. package/dist/core/p-182189d2.entry.js +0 -2
  335. package/dist/core/p-2effdd60.entry.js +0 -2
  336. package/dist/core/p-477a5027.entry.js +0 -2
  337. package/dist/core/p-477a5027.entry.js.map +0 -1
  338. package/dist/core/p-47e364bb.entry.js +0 -2
  339. package/dist/core/p-5c88f415.entry.js +0 -2
  340. package/dist/core/p-5dc0af54.entry.js +0 -2
  341. package/dist/core/p-5dcbfca3.entry.js +0 -2
  342. package/dist/core/p-663d3db2.entry.js +0 -2
  343. package/dist/core/p-6d772ff9.entry.js +0 -2
  344. package/dist/core/p-7cf554e6.entry.js +0 -2
  345. package/dist/core/p-83039b10.entry.js +0 -2
  346. package/dist/core/p-904de5e6.entry.js +0 -2
  347. package/dist/core/p-91a9cd24.entry.js +0 -2
  348. package/dist/core/p-963f9fcd.entry.js +0 -2
  349. package/dist/core/p-9dde00d8.entry.js +0 -2
  350. package/dist/core/p-9ff8f059.entry.js +0 -2
  351. package/dist/core/p-a1ebb4da.entry.js +0 -2
  352. package/dist/core/p-a53a277a.entry.js +0 -2
  353. package/dist/core/p-a54f1db9.entry.js +0 -2
  354. package/dist/core/p-aa8adc45.entry.js +0 -2
  355. package/dist/core/p-b3acb156.entry.js +0 -2
  356. package/dist/core/p-b55fc943.entry.js +0 -2
  357. package/dist/core/p-b838bb27.entry.js +0 -2
  358. package/dist/core/p-c4c7cb24.entry.js +0 -2
  359. package/dist/core/p-db940455.entry.js +0 -2
  360. package/dist/core/p-dc3fab19.entry.js +0 -2
  361. package/dist/core/p-e134b123.entry.js +0 -2
  362. package/dist/core/p-e4978aab.entry.js +0 -2
  363. package/dist/core/p-eeb9cb73.entry.js +0 -2
  364. package/dist/core/p-f141ad5e.entry.js +0 -2
  365. package/dist/core/p-f456bd71.entry.js +0 -2
  366. package/dist/esm/gov-app_2.entry.js +0 -9886
  367. package/dist/esm/gov-app_2.entry.js.map +0 -1
  368. package/dist/types/components/gov-app/gov-app.d.ts +0 -37
  369. /package/dist/components/{p-736e4917.js.map → p-1e82b99e.js.map} +0 -0
  370. /package/dist/components/{p-c9a15c52.js.map → p-3dece5f7.js.map} +0 -0
  371. /package/dist/components/{p-ff0cf148.js.map → p-4ffeb83f.js.map} +0 -0
  372. /package/dist/components/{p-5caf1fe1.js.map → p-a14f8877.js.map} +0 -0
  373. /package/dist/components/{p-ae7e6127.js.map → p-a5975d22.js.map} +0 -0
  374. /package/dist/components/{p-6e19816b.js.map → p-a99d125a.js.map} +0 -0
  375. /package/dist/components/{p-2da35aa8.js.map → p-c0bb26c2.js.map} +0 -0
  376. /package/dist/components/{p-e20bb5dc.js.map → p-dd8d3279.js.map} +0 -0
  377. /package/dist/components/{p-e183a7c7.js.map → p-de8656dd.js.map} +0 -0
  378. /package/dist/core/{p-0a952b3c.entry.js.map → p-0225a96a.entry.js.map} +0 -0
  379. /package/dist/core/{p-a54f1db9.entry.js.map → p-1638b12b.entry.js.map} +0 -0
  380. /package/dist/core/{p-f1be099b.entry.js.map → p-1bbc10c9.entry.js.map} +0 -0
  381. /package/dist/core/{p-fc90bf06.entry.js.map → p-21bdd725.entry.js.map} +0 -0
  382. /package/dist/core/{p-b3acb156.entry.js.map → p-235869e6.entry.js.map} +0 -0
  383. /package/dist/core/{p-006e52f1.entry.js.map → p-2ee0d589.entry.js.map} +0 -0
  384. /package/dist/core/{p-2ed3afef.entry.js.map → p-33ecbb38.entry.js.map} +0 -0
  385. /package/dist/core/{p-f141ad5e.entry.js.map → p-39d8e408.entry.js.map} +0 -0
  386. /package/dist/core/{p-2effdd60.entry.js.map → p-3a519b02.entry.js.map} +0 -0
  387. /package/dist/core/{p-c4c7cb24.entry.js.map → p-3ddfbc05.entry.js.map} +0 -0
  388. /package/dist/core/{p-fa7caad6.entry.js.map → p-3e8b94c2.entry.js.map} +0 -0
  389. /package/dist/core/{p-904de5e6.entry.js.map → p-4898c95f.entry.js.map} +0 -0
  390. /package/dist/core/{p-c214c202.entry.js.map → p-7cd2c877.entry.js.map} +0 -0
  391. /package/dist/core/{p-3f2b803c.entry.js.map → p-8321da17.entry.js.map} +0 -0
  392. /package/dist/core/{p-81b0848c.entry.js.map → p-899e504a.entry.js.map} +0 -0
  393. /package/dist/core/{p-a1ebb4da.entry.js.map → p-9100d24f.entry.js.map} +0 -0
  394. /package/dist/core/{p-91a9cd24.entry.js.map → p-964f1729.entry.js.map} +0 -0
  395. /package/dist/core/{p-a53a277a.entry.js.map → p-98091397.entry.js.map} +0 -0
  396. /package/dist/core/{p-74e9ad9d.entry.js.map → p-987388fd.entry.js.map} +0 -0
  397. /package/dist/core/{p-963f9fcd.entry.js.map → p-9d0c3dee.entry.js.map} +0 -0
  398. /package/dist/core/{p-a5489b0e.entry.js.map → p-a42514f9.entry.js.map} +0 -0
  399. /package/dist/core/{p-ab9ae7ba.entry.js.map → p-a4886f2d.entry.js.map} +0 -0
  400. /package/dist/core/{p-d2351924.entry.js.map → p-b215f99f.entry.js.map} +0 -0
  401. /package/dist/core/{p-6b42a387.entry.js.map → p-c6431085.entry.js.map} +0 -0
  402. /package/dist/core/{p-9dde00d8.entry.js.map → p-ca093025.entry.js.map} +0 -0
  403. /package/dist/core/{p-e134b123.entry.js.map → p-d56632e1.entry.js.map} +0 -0
  404. /package/dist/core/{p-9ff8f059.entry.js.map → p-e5b95316.entry.js.map} +0 -0
  405. /package/dist/core/{p-edc05eff.entry.js.map → p-eb2af67a.entry.js.map} +0 -0
  406. /package/dist/core/{p-182189d2.entry.js.map → p-f4e04e98.entry.js.map} +0 -0
  407. /package/dist/core/{p-e4978aab.entry.js.map → p-fe147dbf.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"gov-pagination.js","sourceRoot":"","sources":["../../../../../../src/components/gov-pagination/gov-pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,eAAe,CAAA;AAClG,OAAO,EAAC,YAAY,EAAC,MAAM,8BAA8B,CAAA;AACzD,OAAO,EACN,eAAe,EACf,gBAAgB,EAEhB,eAAe,EAGf,eAAe,GACf,MAAM,aAAa,CAAA;AACpB,OAAO,EAAC,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAC,MAAM,4BAA4B,CAAA;AACvF,OAAO,EAAC,QAAQ,EAAa,MAAM,cAAc,CAAA;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAA;AAEjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAA;AAGxD,OAAO,EAAC,iBAAiB,EAAa,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAC,cAAc,EAAC,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAC,qBAAqB,EAAC,MAAM,2CAA2C,CAAC;AAKhF,MAAM,OAAO,aAAa;IAQzB;oBAUwC,QAAQ;uBAIb,CAAC;qBAIH,CAAC;;oBAQW,GAAG;qBAID,SAAS;wBAII,EAAE;wBAIF,CAAC;;qCAU0B,eAAe;mCAInB,QAAQ;yBAIrC,sBAAsB;0BAIpB,mBAAmB;yBAIrB,wBAAwB;wBAI1B,iBAAiB;;mCAO1B,EAAE;QA1E5C,IAA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KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC;YAC3B,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAA;YAChC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;gBACf,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA;YACjD,CAAC;iBAAM,CAAC;gBACP,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;oBACjB,SAAS,EAAE,eAAe,CAAC,IAAI;oBAC/B,UAAU,EAAE,IAAI,CAAC,UAAU;iBAC3B,CAAC,CAAA;YACH,CAAC;QACF,CAAC;IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import Fragment from \"../../helpers/Fragment\"\nimport {Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tPaginationClass,\n\tPaginationColors,\n\tPaginationColorType,\n\tPaginationSizes,\n\tPaginationSizeType,\n\tPaginationType,\n\tPaginationTypes,\n} from \"./constants\"\nimport {govHost, prepareClasses, toBoolAttrIfDefined} from \"../../helpers/Dom/template\"\nimport {paginate, Pagination} from \"./pagination\"\nimport {createID} from \"../../utils/string.utils\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {createArrayRange} from \"../../utils/array.utils\"\nimport {FormSelectEvent} from \"../gov-form/select/gov-form-select.types\"\nimport {PaginationEvent} from \"./gov-pagination.types\"\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-pagination\",\n})\nexport class GovPagination {\n\tprivate h: GovHost\n\tprivate readonly pageSelectId: string\n\tprivate readonly selectId: string\n\n\tprivate spreadSelectRef?: HTMLGovFormSelectElement\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.pageSelectId = createID(\"GovPageSelect\")\n\t\tthis.selectId = createID(\"GovSelect\")\n\t}\n\n\t@Element() readonly host: HTMLGovPaginationElement\n\t/**\n\t * Pagination type\n\t */\n\t@Prop() readonly type: PaginationType = \"button\"\n\t/**\n\t * Currently displayed page\n\t */\n\t@Prop() readonly current: number = 1\n\t/**\n\t * Total count of entries\n\t */\n\t@Prop() readonly total: number = 0\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'select-identifier'}) readonly selectIdentifier: string\n\t/**\n\t * Pagination's size\n\t */\n\t@Prop() readonly size?: PaginationSizeType = \"m\"\n\t/**\n\t * Style variation of the pagination.\n\t */\n\t@Prop() readonly color?: PaginationColorType = \"primary\"\n\t/**\n\t * Maximum number of entries per page\n\t */\n\t@Prop({attribute: \"page-size\"}) readonly pageSize: number = 10\n\t/**\n\t * Maximum pages displayed for selection\n\t */\n\t@Prop({attribute: \"max-pages\"}) readonly maxPages: number = 5\n\t/**\n\t * Setting a link to redirect to a given page.\n\t * The {PAGE} wildcard can be used in the link to replace the page number.\n\t * Note that in the case of paging through a link, it is always necessary to send to the component the current page where the user is.\n\t */\n\t@Prop() readonly link: string\n\t/**\n\t * Adds accessible label for the page select\n\t */\n\t@Prop({attribute: \"accessible-select-label\"}) readonly accessibleSelectLabel: string = \"Vybrat stranu\"\n\t/**\n\t * Adds accessible label for the page item\n\t */\n\t@Prop({attribute: \"accessible-page-label\"}) readonly accessiblePageLabel: string = \"Strana\"\n\t/**\n\t * Description of the possibility to go back one page\n\t */\n\t@Prop({attribute: \"label-prev\"}) readonly labelPrev = 'Přejít o stranu zpět'\n\t/**\n\t * Description of the option to go to the top of paging\n\t */\n\t@Prop({attribute: \"label-start\"}) readonly labelStart = 'Přejít na začátek'\n\t/**\n\t * Description of the option to go to the end of paging\n\t */\n\t@Prop({attribute: \"label-next\"}) readonly labelNext = 'Přejít na další stranu'\n\t/**\n\t * Description of the option to move one page forward\n\t */\n\t@Prop({attribute: \"label-end\"}) readonly labelEnd = 'Přejít na konec'\n\t/**\n\t * Event called when changing the page with the current setting of the whole paging\n\t */\n\t@Event({eventName: \"gov-page\"}) govPage: EventEmitter<PaginationEvent>\n\n\t@State() pagination: Pagination\n\t@State() inheritedAttributes: Attributes = {}\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(PaginationTypes, newValue, PaginationClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(PaginationSizes, newValue, PaginationClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(PaginationColors, newValue, PaginationClass.root)\n\t}\n\n\t@Watch(\"current\")\n\t@Watch(\"total\")\n\t@Watch(\"pageSize\")\n\t@Watch(\"maxPages\")\n\trecalculate(): void {\n\t\tthis.recalculatePagination(this.current)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.recalculatePagination(this.current)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateColor(this.color)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate recalculatePagination(currentPage: number) {\n\t\tthis.pagination = paginate(this.total, currentPage, this.pageSize, this.maxPages)\n\t}\n\n\tprivate isActivePageClass(originalClass: string, page: number) {\n\t\tif (this.pagination.currentPage === page) {\n\t\t\treturn originalClass + \" is-active\"\n\t\t} else {\n\t\t\treturn originalClass\n\t\t}\n\t}\n\n\tprivate prepareLinkUrl(page: number) {\n\t\tif (this.link) {\n\t\t\treturn String(this.link).replace(\"{PAGE}\", String(page))\n\t\t}\n\t\treturn undefined\n\t}\n\n\tprivate resetSelectValue() {\n\t\tif (this.spreadSelectRef) {\n\t\t\tthis.spreadSelectRef.getRef()\n\t\t\t\t.then((el: HTMLSelectElement) => {\n\t\t\t\t\tel.value = '...'\n\t\t\t\t})\n\t\t}\n\t}\n\n\trender() {\n\t\tconst pageResolver = (page: number, content: any, description: string) => {\n\t\t\tconst isDisabled = page === -1\n\t\t\tconst ariaCurrent = toBoolAttrIfDefined(this.pagination.currentPage === page ? true : undefined)\n\t\t\treturn (\n\t\t\t\t<gov-button\n\t\t\t\t\thref={this.prepareLinkUrl(page)}\n\t\t\t\t\tcolor={this.color}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\ttype=\"base\"\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\ton-gov-click={(e) => this.onClickHandler(e, page)}\n\t\t\t\t\twcag-label={description ? description : page > -1 ? this.accessiblePageLabel + \" \" + page : undefined}\n\t\t\t\t\twcag-current={ariaCurrent}\n\t\t\t\t\tclass={PaginationClass.inner}\n\t\t\t\t\tfocusable={true}>\n\t\t\t\t\t{content}\n\t\t\t\t</gov-button>\n\t\t\t)\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(PaginationClass.root)} type={this.type} color={this.color} size={this.size}>\n\t\t\t\t<nav {...this.inheritedAttributes}>\n\t\t\t\t\t<ul class={PaginationClass.list}>\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.currentPage > 1 ? 1 : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-double-left\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelStart\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-left\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelPrev\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t{this.type == \"select\" ? (\n\t\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemSelect])}>\n\t\t\t\t\t\t\t\t<span class={PaginationClass.inner}>\n\t\t\t\t\t\t\t\t\t<span id={this.pageSelectId} hidden>\n\t\t\t\t\t\t\t\t\t\t{this.accessibleSelectLabel}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<gov-form-select\n\t\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\t\t\t\t\tidentifier={this.selectIdentifier || this.selectId}\n\t\t\t\t\t\t\t\t\t\taria-labelledby={this.pageSelectId}\n\t\t\t\t\t\t\t\t\t\ton-gov-change={this.onSelectHandler.bind(this)}>\n\t\t\t\t\t\t\t\t\t\t{createArrayRange(1, this.pagination.totalPages).map(page => (\n\t\t\t\t\t\t\t\t\t\t\t<option value={page} selected={this.pagination.currentPage === page}>\n\t\t\t\t\t\t\t\t\t\t\t\t{page}\n\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</gov-form-select>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t{this.pagination.pages.map(page => (\n\t\t\t\t\t\t\t\t\t<li class={this.isActivePageClass(PaginationClass.item, page)}>{pageResolver(page, page, '')}</li>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t{this.pagination.totalPages ? (\n\t\t\t\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemMore])}>\n\t\t\t\t\t\t\t\t\t<span class={PaginationClass.inner}>\n\t\t\t\t\t\t\t\t\t\t<span id={this.pageSelectId} hidden>\n\t\t\t\t\t\t\t\t\t\t\t{this.accessibleSelectLabel}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<gov-form-select\n\t\t\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\t\t\t\t\t\tidentifier={this.selectIdentifier || this.selectId}\n\t\t\t\t\t\t\t\t\t\t\taria-labelledby={this.pageSelectId}\n\t\t\t\t\t\t\t\t\t\t\tref={el => (this.spreadSelectRef = el as HTMLGovFormSelectElement)}\n\t\t\t\t\t\t\t\t\t\t\ton-gov-change={this.onSelectHandler.bind(this)}>\n\t\t\t\t\t\t\t\t\t\t\t<option selected hidden>...</option>\n\t\t\t\t\t\t\t\t\t\t\t{createArrayRange(1, this.pagination.totalPages).map(page => (\n\t\t\t\t\t\t\t\t\t\t\t\t<option value={page} selected={false}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{page}\n\t\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</gov-form-select>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-right\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelNext\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-double-right\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelEnd\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</nav>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: CustomEvent, page: number): void {\n\t\te.stopPropagation()\n\t\tthis.recalculatePagination(page)\n\t\tthis.govPage.emit({\n\t\t\tcomponent: PaginationClass.root,\n\t\t\tpagination: this.pagination\n\t\t})\n\t}\n\n\tprivate onSelectHandler(e: CustomEvent<FormSelectEvent>): void {\n\t\te.stopPropagation()\n\t\tconst value = e.detail.value\n\t\tconst page = parseInt(value)\n\t\tthis.resetSelectValue()\n\t\tif (isNaN(page) === false) {\n\t\t\tthis.recalculatePagination(page)\n\t\t\tif (this.link) {\n\t\t\t\twindow.location.href = this.prepareLinkUrl(page)\n\t\t\t} else {\n\t\t\t\tthis.govPage.emit({\n\t\t\t\t\tcomponent: PaginationClass.root,\n\t\t\t\t\tpagination: this.pagination\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"gov-pagination.js","sourceRoot":"","sources":["../../../../../../src/components/gov-pagination/gov-pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,eAAe,CAAA;AAClG,OAAO,EAAC,YAAY,EAAC,MAAM,8BAA8B,CAAA;AACzD,OAAO,EACN,eAAe,EACf,gBAAgB,EAEhB,eAAe,EAGf,eAAe,GACf,MAAM,aAAa,CAAA;AACpB,OAAO,EAAC,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAC,MAAM,4BAA4B,CAAA;AACvF,OAAO,EAAC,QAAQ,EAAa,MAAM,cAAc,CAAA;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAA;AAEjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAA;AAGxD,OAAO,EAAC,iBAAiB,EAAa,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAC,cAAc,EAAC,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAC,qBAAqB,EAAC,MAAM,2CAA2C,CAAC;AAKhF,MAAM,OAAO,aAAa;IAQzB;oBAUwC,QAAQ;uBAIb,CAAC;qBAIH,CAAC;;oBAQW,GAAG;qBAID,SAAS;wBAII,EAAE;wBAIF,CAAC;;qCAU0B,eAAe;mCAInB,QAAQ;yBAIrC,sBAAsB;0BAIpB,mBAAmB;yBAIrB,wBAAwB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,IAAI,CAAC,gBAAgB,EAAE,CAAA;QACvB,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC;YAC3B,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAA;YAChC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;gBACf,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA;YACjD,CAAC;iBAAM,CAAC;gBACP,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;oBACjB,SAAS,EAAE,eAAe,CAAC,IAAI;oBAC/B,UAAU,EAAE,IAAI,CAAC,UAAU;iBAC3B,CAAC,CAAA;YACH,CAAC;QACF,CAAC;IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import Fragment from \"../../helpers/Fragment\"\nimport {Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tPaginationClass,\n\tPaginationColors,\n\tPaginationColorType,\n\tPaginationSizes,\n\tPaginationSizeType,\n\tPaginationType,\n\tPaginationTypes,\n} from \"./constants\"\nimport {govHost, prepareClasses, toBoolAttrIfDefined} from \"../../helpers/Dom/template\"\nimport {paginate, Pagination} from \"./pagination\"\nimport {createID} from \"../../utils/string.utils\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {createArrayRange} from \"../../utils/array.utils\"\nimport {FormSelectEvent} from \"../gov-form/select/gov-form-select.types\"\nimport {PaginationEvent} from \"./gov-pagination.types\"\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-pagination\",\n})\nexport class GovPagination {\n\tprivate h: GovHost\n\tprivate readonly pageSelectId: string\n\tprivate readonly selectId: string\n\n\tprivate spreadSelectRef?: HTMLGovFormSelectElement\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.pageSelectId = createID(\"GovPageSelect\")\n\t\tthis.selectId = createID(\"GovSelect\")\n\t}\n\n\t@Element() readonly host: HTMLGovPaginationElement\n\t/**\n\t * Pagination type\n\t */\n\t@Prop() readonly type: PaginationType = \"button\"\n\t/**\n\t * Currently displayed page\n\t */\n\t@Prop() readonly current: number = 1\n\t/**\n\t * Total count of entries\n\t */\n\t@Prop() readonly total: number = 0\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'select-identifier'}) readonly selectIdentifier: string\n\t/**\n\t * Pagination's size\n\t */\n\t@Prop() readonly size?: PaginationSizeType = \"m\"\n\t/**\n\t * Style variation of the pagination.\n\t */\n\t@Prop() readonly color?: PaginationColorType = \"primary\"\n\t/**\n\t * Maximum number of entries per page\n\t */\n\t@Prop({attribute: \"page-size\"}) readonly pageSize: number = 10\n\t/**\n\t * Maximum pages displayed for selection\n\t */\n\t@Prop({attribute: \"max-pages\"}) readonly maxPages: number = 5\n\t/**\n\t * Setting a link to redirect to a given page.\n\t * The {PAGE} wildcard can be used in the link to replace the page number.\n\t * Note that in the case of paging through a link, it is always necessary to send to the component the current page where the user is.\n\t */\n\t@Prop() readonly link: string\n\t/**\n\t * Adds accessible label for the page select\n\t */\n\t@Prop({attribute: \"accessible-select-label\"}) readonly accessibleSelectLabel: string = \"Vybrat stranu\"\n\t/**\n\t * Adds accessible label for the page item\n\t */\n\t@Prop({attribute: \"accessible-page-label\"}) readonly accessiblePageLabel: string = \"Strana\"\n\t/**\n\t * Description of the possibility to go back one page\n\t */\n\t@Prop({attribute: \"label-prev\"}) readonly labelPrev = 'Přejít o stranu zpět'\n\t/**\n\t * Description of the option to go to the top of paging\n\t */\n\t@Prop({attribute: \"label-start\"}) readonly labelStart = 'Přejít na začátek'\n\t/**\n\t * Description of the option to go to the end of paging\n\t */\n\t@Prop({attribute: \"label-next\"}) readonly labelNext = 'Přejít na další stranu'\n\t/**\n\t * Description of the option to move one page forward\n\t */\n\t@Prop({attribute: \"label-end\"}) readonly labelEnd = 'Přejít na konec'\n\t/**\n\t * Event called when changing the page with the current setting of the whole paging\n\t */\n\t@Event({eventName: \"gov-page\"}) govPage: EventEmitter<PaginationEvent>\n\n\t@State() pagination: Pagination\n\t@State() inheritedAttributes: Attributes = {}\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(PaginationTypes, newValue, PaginationClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(PaginationSizes, newValue, PaginationClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(PaginationColors, newValue, PaginationClass.root)\n\t}\n\n\t@Watch(\"current\")\n\t@Watch(\"total\")\n\t@Watch(\"pageSize\")\n\t@Watch(\"maxPages\")\n\trecalculate(): void {\n\t\tthis.recalculatePagination(this.current)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.recalculatePagination(this.current)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateColor(this.color)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate recalculatePagination(currentPage: number) {\n\t\tthis.pagination = paginate(this.total, currentPage, this.pageSize, this.maxPages)\n\t}\n\n\tprivate isActivePageClass(originalClass: string, page: number) {\n\t\tif (this.pagination.currentPage === page) {\n\t\t\treturn originalClass + \" is-active\"\n\t\t} else {\n\t\t\treturn originalClass\n\t\t}\n\t}\n\n\tprivate prepareLinkUrl(page: number) {\n\t\tif (this.link) {\n\t\t\treturn String(this.link).replace(\"{PAGE}\", String(page))\n\t\t}\n\t\treturn undefined\n\t}\n\n\tprivate resetSelectValue() {\n\t\tif (this.spreadSelectRef) {\n\t\t\tthis.spreadSelectRef.getRef()\n\t\t\t\t.then((el: HTMLSelectElement) => {\n\t\t\t\t\tel.value = '...'\n\t\t\t\t})\n\t\t}\n\t}\n\n\trender() {\n\t\tconst pageResolver = (page: number, content: any, description: string) => {\n\t\t\tconst isDisabled = page === -1\n\t\t\tconst ariaCurrent = toBoolAttrIfDefined(this.pagination.currentPage === page ? true : undefined)\n\t\t\treturn (\n\t\t\t\t<gov-button\n\t\t\t\t\thref={this.prepareLinkUrl(page)}\n\t\t\t\t\tcolor={this.color}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\ttype=\"base\"\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\ton-gov-click={(e) => this.onClickHandler(e, page)}\n\t\t\t\t\taria-label={description ? description : page > -1 ? `${this.accessiblePageLabel} ${page}` : undefined}\n\t\t\t\t\taria-current={ariaCurrent}\n\t\t\t\t\tclass={PaginationClass.inner}\n\t\t\t\t\tfocusable={true}>\n\t\t\t\t\t{content}\n\t\t\t\t</gov-button>\n\t\t\t)\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(PaginationClass.root)} type={this.type} color={this.color} size={this.size}>\n\t\t\t\t<nav {...this.inheritedAttributes}>\n\t\t\t\t\t<ul class={PaginationClass.list}>\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.currentPage > 1 ? 1 : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-double-left\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelStart\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-left\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelPrev\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t{this.type == \"select\" ? (\n\t\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemSelect])}>\n\t\t\t\t\t\t\t\t<span class={PaginationClass.inner}>\n\t\t\t\t\t\t\t\t\t<span id={this.pageSelectId} hidden>\n\t\t\t\t\t\t\t\t\t\t{this.accessibleSelectLabel}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<gov-form-select\n\t\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\t\t\t\t\tidentifier={this.selectIdentifier || this.selectId}\n\t\t\t\t\t\t\t\t\t\taria-labelledby={this.pageSelectId}\n\t\t\t\t\t\t\t\t\t\ton-gov-change={this.onSelectHandler.bind(this)}>\n\t\t\t\t\t\t\t\t\t\t{createArrayRange(1, this.pagination.totalPages).map(page => (\n\t\t\t\t\t\t\t\t\t\t\t<option value={page} selected={this.pagination.currentPage === page}>\n\t\t\t\t\t\t\t\t\t\t\t\t{page}\n\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</gov-form-select>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t{this.pagination.pages.map(page => (\n\t\t\t\t\t\t\t\t\t<li class={this.isActivePageClass(PaginationClass.item, page)}>{pageResolver(page, page, '')}</li>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t{this.pagination.totalPages ? (\n\t\t\t\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemMore])}>\n\t\t\t\t\t\t\t\t\t<span class={PaginationClass.inner}>\n\t\t\t\t\t\t\t\t\t\t<span id={this.pageSelectId} hidden>\n\t\t\t\t\t\t\t\t\t\t\t{this.accessibleSelectLabel}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<gov-form-select\n\t\t\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\t\t\t\t\t\tidentifier={this.selectIdentifier || this.selectId}\n\t\t\t\t\t\t\t\t\t\t\taria-labelledby={this.pageSelectId}\n\t\t\t\t\t\t\t\t\t\t\tref={el => (this.spreadSelectRef = el as HTMLGovFormSelectElement)}\n\t\t\t\t\t\t\t\t\t\t\ton-gov-change={this.onSelectHandler.bind(this)}>\n\t\t\t\t\t\t\t\t\t\t\t<option selected hidden>...</option>\n\t\t\t\t\t\t\t\t\t\t\t{createArrayRange(1, this.pagination.totalPages).map(page => (\n\t\t\t\t\t\t\t\t\t\t\t\t<option value={page} selected={false}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{page}\n\t\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</gov-form-select>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-right\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelNext\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-double-right\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelEnd\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</nav>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: CustomEvent, page: number): void {\n\t\te.stopPropagation()\n\t\tthis.recalculatePagination(page)\n\t\tthis.govPage.emit({\n\t\t\tcomponent: PaginationClass.root,\n\t\t\tpagination: this.pagination\n\t\t})\n\t}\n\n\tprivate onSelectHandler(e: CustomEvent<FormSelectEvent>): void {\n\t\te.stopPropagation()\n\t\tconst value = e.detail.value\n\t\tconst page = parseInt(value)\n\t\tthis.resetSelectValue()\n\t\tif (isNaN(page) === false) {\n\t\t\tthis.recalculatePagination(page)\n\t\t\tif (this.link) {\n\t\t\t\twindow.location.href = this.prepareLinkUrl(page)\n\t\t\t} else {\n\t\t\t\tthis.govPage.emit({\n\t\t\t\t\tcomponent: PaginationClass.root,\n\t\t\t\t\tpagination: this.pagination\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
@@ -19,7 +19,7 @@ export class GovSpacer {
19
19
  this.validateBreakpoint(this.breakpoint);
20
20
  }
21
21
  render() {
22
- return h(Host, { key: '57fc29956be744a9eaec0361e4175b7e29dbef13', class: this.h.classes(SpacerClass.root), size: this.size, breakpoint: this.breakpoint });
22
+ return h(Host, { key: '5c33ab63dd70ecfe5700638a36eaacfa4f69da23', class: this.h.classes(SpacerClass.root), size: this.size, breakpoint: this.breakpoint });
23
23
  }
24
24
  static get is() { return "gov-spacer"; }
25
25
  static get properties() {
@@ -25,7 +25,7 @@ export class GovStepperItem {
25
25
  render() {
26
26
  const triggerId = this.identifier || this.triggerId;
27
27
  const contentId = this.contentId;
28
- return (h(Host, { key: 'fe5a23be1c8e2dea7794420155d95e8096e53a90', id: triggerId, class: this.h.classes(StepperItemClass.root), color: this.color, role: "listitem", hydrated: this.hydrated }, this.h.hasSlot('prefix') && (h("span", { key: '1c74503c6c9b56bfb11efd87a2ad354444fc9e82', class: StepperItemClass.prefix }, h("slot", { key: 'eeb00dec4c4ad1d6f1a6abf57de77fe3b9a621a8', name: "prefix" }))), h("div", { key: 'f92fa51133c7e8c68be8d276cf85dbbd421b72c0' }, h("span", { key: '926cea6da5632f3830507f6208ac68445d2f6ec3', class: StepperItemClass.headline }, h("slot", { key: '13cdd8dc084e58e56564b6f90bf29a825ce5b139', name: "headline" })), h("slot", { key: '5dfc2f7d62aea9c422022a41c6c9b7f1755ed837', name: "annotation" }), this.h.hasSlot('content') && (h("div", { key: 'db6097ae5f61b0cc73f0115c68f45d187fb9dc65', class: StepperItemClass.content, id: contentId, "aria-labelledby": triggerId, role: "tabpanel" }, h("slot", { key: '275ca8b1bb64e8c02551b0b874db8c2c865d0e3a', name: "content" }))))));
28
+ return (h(Host, { key: '216ff66fa6c9f0f93c28ff788cc7dee3b6e78e06', id: triggerId, class: this.h.classes(StepperItemClass.root), color: this.color, role: "listitem", hydrated: this.hydrated }, this.h.hasSlot('prefix') && (h("span", { key: 'de160e780103d36dd1de36c21cde914c4b5e4ca2', class: StepperItemClass.prefix }, h("slot", { key: 'eb213aedab80baa3b32dda86ce891e8b63a0ea4e', name: "prefix" }))), h("div", { key: '3942515da8a0d60cf810d70e876aff0cf399ff85' }, h("span", { key: 'f3688c58fa20024189143e3794799c49e1c1949a', class: StepperItemClass.headline }, h("slot", { key: '7e9923b83f646b7cd6122fc1c37d2e03030225fd', name: "headline" })), h("slot", { key: 'f392c3e0912dc58351443b7bf3afe9bfc0aeb27a', name: "annotation" }), this.h.hasSlot('content') && (h("div", { key: '353d996b1e925f32e0d1a9bafe9c43f41a922fb8', class: StepperItemClass.content, id: contentId, "aria-labelledby": triggerId, role: "tabpanel" }, h("slot", { key: 'e68f39ab638fea9ca1d1bfa2daa7fedeb04749ce', name: "content" }))))));
29
29
  }
30
30
  static get is() { return "gov-stepper-item"; }
31
31
  static get properties() {
@@ -27,7 +27,7 @@ export class GovStepper {
27
27
  this.hydrated = true;
28
28
  }
29
29
  render() {
30
- return (h(Host, { key: 'a77086e0c93fa0073676207ca73d61a323d7765e', class: this.h.classes(StepperClass.root), role: "list", size: this.size, hydrated: this.hydrated }, h("slot", { key: '6b092ae2e03444afe4cf13d848bf7eb08f15845e' })));
30
+ return (h(Host, { key: 'db42f2efac9bc19ff71bfa7e473f6a030837cbbf', class: this.h.classes(StepperClass.root), role: "list", size: this.size, hydrated: this.hydrated }, h("slot", { key: '20342c294f2393b68ecf3ea0ee44e95a14397628' })));
31
31
  }
32
32
  static get is() { return "gov-stepper"; }
33
33
  static get properties() {
@@ -23,7 +23,7 @@ export class GovTabsItem {
23
23
  }
24
24
  }
25
25
  render() {
26
- return (h(Host, { key: '3d080973fda9ffe029ac3837711c221eaf880843', class: this.h.classes(TabsItemClass.root), default: this.default }, h("div", { key: 'c92a076a96938e033b3586a765c80c06b2cc80ba', class: TabsItemClass.inner, role: "tabpanel", id: this.identifier || this.contentId, hidden: !this.isActive, "aria-labelledby": this.triggerIdentifier || this.triggerId, "aria-hidden": toBoolAttrIfDefined(!this.isActive) }, h("slot", { key: 'ac0f79bce4bc4d6d8947bfd935592c88711e5059' }))));
26
+ return (h(Host, { key: '344cb35a06343ed15258f5f0f499382090b80a74', class: this.h.classes(TabsItemClass.root), default: this.default }, h("div", { key: 'e35a63aefab82f073a7fd93b5e2947d9f39c0a5b', class: TabsItemClass.inner, role: "tabpanel", id: this.identifier || this.contentId, hidden: !this.isActive, "aria-labelledby": this.triggerIdentifier || this.triggerId, "aria-hidden": toBoolAttrIfDefined(!this.isActive) }, h("slot", { key: 'b2e81509d48e7407add8d96c848008664dcc796f' }))));
27
27
  }
28
28
  /**
29
29
  * Returns a unique tab content identifier
@@ -112,7 +112,7 @@ export class GovTabs {
112
112
  });
113
113
  }
114
114
  render() {
115
- return (h(Host, { key: 'bc7d4a5046998b050c1ca29aef432e27d7a420a1', class: this.h.classes(TabsClass.root), size: this.size, color: this.color, type: this.type, direction: this.direction, onKeyDown: this.onKeydownHandler.bind(this) }, h("div", Object.assign({ key: '560b7509d6219931dc2c60eac48d0038c751bd0c', class: TabsClass.tabs, role: "tablist" }, this.inheritedAttributes), h("ul", { key: '3fb683c97ede9bb6f8dd795b4e45ea439e611283', class: TabsClass.list }, this.controllers.map(control => (h("li", { class: TabsClass.item }, this.type == "text" ? (h("button", { class: TabsClass.btn, id: control.triggerIdentifier, role: "tab", onClick: () => this.onSelectHandler(control), disabled: control.disabled, "aria-disabled": toBoolAttr(control.disabled), "aria-selected": toBoolAttr(control.active), "aria-controls": control.contentIdentifier, tabindex: control.active && !control.disabled ? 0 : -1, ref: el => (this.triggerRefs[control.triggerIdentifier] = el) }, control.iconStart ? (h("gov-icon", { name: control.iconStart.name, type: control.iconStart.type })) : null, control.label, control.iconEnd ? (h("gov-icon", { name: control.iconEnd.name, type: control.iconEnd.type })) : null)) : (h("gov-chip", { role: "tab", tag: 'button', identifier: control.triggerIdentifier, "aria-selected": booleanString(control.active), "aria-controls": control.contentIdentifier, focusable: control.active, disabled: control.disabled, color: this.color, size: this.size === "xs" ? "xs" : (this.size === "s" ? "s" : "m"), type: control.active ? "solid" : "outlined", ref: el => (this.triggerRefs[control.triggerIdentifier] = el), "on-gov-click": () => this.onSelectHandler(control) }, control.iconStart ? (h("gov-icon", { name: control.iconStart.name, type: control.iconStart.type, slot: "left-icon" })) : null, control.label, control.iconEnd ? (h("gov-icon", { name: control.iconEnd.name, type: control.iconEnd.type, slot: "right-icon" })) : null))))))), h("slot", { key: '90cbf1a2c703360a182b754e79a6ff7f5c7823e1' })));
115
+ return (h(Host, { key: 'a4c4e26fd0c60aa0f6aa1371fe26593d16542710', class: this.h.classes(TabsClass.root), size: this.size, color: this.color, type: this.type, direction: this.direction, onKeyDown: this.onKeydownHandler.bind(this) }, h("div", Object.assign({ key: '4769b453636b1e0533b55b8f167ee468f1cbde38', class: TabsClass.tabs, role: "tablist" }, this.inheritedAttributes), h("ul", { key: '6d895b40f2b702f7f0bdf87cbee190121ca1d247', class: TabsClass.list }, this.controllers.map(control => (h("li", { class: TabsClass.item }, this.type == "text" ? (h("button", { class: TabsClass.btn, id: control.triggerIdentifier, role: "tab", onClick: () => this.onSelectHandler(control), disabled: control.disabled, "aria-disabled": toBoolAttr(control.disabled), "aria-selected": toBoolAttr(control.active), "aria-controls": control.contentIdentifier, tabindex: control.active && !control.disabled ? 0 : -1, ref: el => (this.triggerRefs[control.triggerIdentifier] = el) }, control.iconStart ? (h("gov-icon", { name: control.iconStart.name, type: control.iconStart.type })) : null, control.label, control.iconEnd ? (h("gov-icon", { name: control.iconEnd.name, type: control.iconEnd.type })) : null)) : (h("gov-chip", { role: "tab", tag: 'button', identifier: control.triggerIdentifier, "aria-selected": booleanString(control.active), "aria-controls": control.contentIdentifier, focusable: control.active, disabled: control.disabled, color: this.color, size: this.size === "xs" ? "xs" : (this.size === "s" ? "s" : "m"), type: control.active ? "solid" : "outlined", ref: el => (this.triggerRefs[control.triggerIdentifier] = el), "on-gov-click": () => this.onSelectHandler(control) }, control.iconStart ? (h("gov-icon", { name: control.iconStart.name, type: control.iconStart.type, slot: "left-icon" })) : null, control.label, control.iconEnd ? (h("gov-icon", { name: control.iconEnd.name, type: control.iconEnd.type, slot: "right-icon" })) : null))))))), h("slot", { key: 'd039c143c940ec3dc16ce7d33476f37562a35668' })));
116
116
  }
117
117
  getCurrentTab() {
118
118
  return this.controllers.find(control => control.active) || null;
@@ -26,7 +26,7 @@ export class GovTag {
26
26
  render() {
27
27
  const iconLeft = prepareIconFormat(this.iconLeft);
28
28
  const iconRight = prepareIconFormat(this.iconRight);
29
- return (h(Host, { key: '836c745e82121e969d096f83fd799593de02a52b', class: this.h.classes(TagClass.root), color: this.color, size: this.size, type: this.type }, h("span", { key: '03084f10265357de1e4f136d2da12390ada68701', class: "element" }, this.h.hasSlot('left-icon') && h("slot", { key: '6014fd042c92e618af0bfa08cf27c56f42091034', name: "left-icon" }), iconLeft && h("gov-icon", { key: '86b2616d3e6d26b73c65cf6f0f602a87e2f60e11', type: iconLeft.type, name: iconLeft.name }), h("slot", { key: '6e8a6587e99230060dba6e803e79d301c6bb206c' }), iconRight && h("gov-icon", { key: '7e89a01d59ce60b16af9ad1a4b7e4f31373ffa13', type: iconRight.type, name: iconRight.name }), this.h.hasSlot('right-icon') && h("slot", { key: '530777fa0fd108080debaecb412b486bc17e3153', name: "right-icon" }))));
29
+ return (h(Host, { key: '9a2ca38a6a7e36c17de39532950d1ee0c8033c53', class: this.h.classes(TagClass.root), color: this.color, size: this.size, type: this.type }, h("span", { key: '07a79627767e9f805ca755c157f8ba844157efe5', class: "element" }, this.h.hasSlot('left-icon') && h("slot", { key: '781c3f1b81ddc56173c3993d20aba35ee51fc341', name: "left-icon" }), iconLeft && h("gov-icon", { key: '2cd1fa5991c697ae999706ce4854354eec352af0', type: iconLeft.type, name: iconLeft.name }), h("slot", { key: 'bfb0f8c8825426de6b0c782ea9e141bad312ecfa' }), iconRight && h("gov-icon", { key: '11f0e49dd28674d708887632b06a7e2db29a3387', type: iconRight.type, name: iconRight.name }), this.h.hasSlot('right-icon') && h("slot", { key: '6317a5cf9a8b420000cfb043f2a7adaefec797bc', name: "right-icon" }))));
30
30
  }
31
31
  static get is() { return "gov-tag"; }
32
32
  static get properties() {
@@ -45,7 +45,7 @@ export class GovThemeSwitch {
45
45
  }
46
46
  }
47
47
  render() {
48
- return (h(Host, { key: '8266a00be44f1fbd8df375dee4fbfe65dd35a619', class: this.h.classes(ThemeSwitchClass.root) }, h("button", { key: '0158d6d7f6c1d5237d1514c2500a0ed08af330a3', onClick: () => this.setThemeState(ThemeList.light) }, "light"), h("button", { key: 'afbc26f2a9ddb1fe7635c5c1b8ab747924fc5e5b', onClick: () => this.setThemeState(ThemeList.dark) }, "dark")));
48
+ return (h(Host, { key: 'f9b28a39d5f9fd9203c259e608d8e69c41db8c19', class: this.h.classes(ThemeSwitchClass.root) }, h("button", { key: 'b87bf9c3ba487448670fae63a147d80da5e4569c', onClick: () => this.setThemeState(ThemeList.light) }, "light"), h("button", { key: '66ae97a5db832ed283e54b0bafda672105507de2', onClick: () => this.setThemeState(ThemeList.dark) }, "dark")));
49
49
  }
50
50
  static get is() { return "gov-theme-switch"; }
51
51
  static get states() {
@@ -7,7 +7,7 @@ export class GovTiles {
7
7
  this.h = govHost(this.host);
8
8
  }
9
9
  render() {
10
- return (h(Host, { key: '9d2c26d6717e7d3e5780e322823f94773e515f97', class: this.h.classes(TilesClass.root) }, h("slot", { key: '7b4557531dcabfae72d123a578d43764cc3f03b5' })));
10
+ return (h(Host, { key: '399eec38039bf1adddcd9683caa695c3a26f2183', class: this.h.classes(TilesClass.root) }, h("slot", { key: '269633bd89e6e0534cc776c782481ebfa3e6b0d2' })));
11
11
  }
12
12
  static get is() { return "gov-tiles"; }
13
13
  static get properties() {
@@ -11,7 +11,7 @@ export class GovTile {
11
11
  this.h = govHost(this.host);
12
12
  }
13
13
  render() {
14
- return (h(Host, { key: '64992b51709754e4b094dffaacb32439800e878f', class: this.h.classes(TileClass.root), size: this.size, orientation: this.orientation, clickable: this.href ? true : null }, h("slot", { key: '807706674b6d398a41a25bcbb100742a8bc8cebc', name: "icon" }), h("div", { key: 'b46011ea1ced783cf69187e18739b67c45137074', class: TileClass.content }, h("div", { key: '9e491d7ddc78c02290102623db5c2d639e19bb3e', class: TileClass.text }, h("div", { key: '12ec2a5d7988d7772f3228f79f1473378e5fe97d', class: TileClass.title }, this.href ? (h(Fragment, null, h("a", { href: this.href, target: this.target, class: TileClass.link, ref: el => (this.triggerRef = el) }, h("slot", { name: "title" })), h("span", { class: TileClass.icon }, h("gov-icon", { name: "chevron-right" })))) : (h("slot", { name: "title" }))), h("div", { key: '6ef9ba50fcd48facb2afea70d3881141e3c6e54a', class: `${TileClass.annotation} ${this.href ? `${TileClass.annotation}--padding` : ''}` }, h("slot", { key: 'c7d77b3642179b42a3b54423e53197385c0970e4' }))), h("slot", { key: 'efe6564689ed24e259985fddfe53ddf70ac76238', name: "button" }))));
14
+ return (h(Host, { key: 'd973b7627ac8ac88a772f9f934e47a2c877ed0e8', class: this.h.classes(TileClass.root), size: this.size, orientation: this.orientation, clickable: this.href ? true : null }, h("slot", { key: 'b59cb3c851ea8d4bcf8a4e16289cc47705a3c341', name: "icon" }), h("div", { key: 'c73b83b66280e5b977e72713364293e033bea775', class: TileClass.content }, h("div", { key: '2301b8814fb4dd910414aae3860f64c1e6f67bba', class: TileClass.text }, h("div", { key: '2018bc4f239ca82169396312de4d927353ee4611', class: TileClass.title }, this.href ? (h(Fragment, null, h("a", { href: this.href, target: this.target, class: TileClass.link, ref: el => (this.triggerRef = el) }, h("slot", { name: "title" })), h("span", { class: TileClass.icon }, h("gov-icon", { name: "chevron-right" })))) : (h("slot", { name: "title" }))), h("div", { key: '5ed46117f4a99de506c9c26d825e11ffb28ce33a', class: `${TileClass.annotation} ${this.href ? `${TileClass.annotation}--padding` : ''}` }, h("slot", { key: '6989e7cff2077a60f3171bb025b646e28c259609' }))), h("slot", { key: '876b46000cb7bd154d1b3552d13f8472f722c374', name: "button" }))));
15
15
  }
16
16
  /**
17
17
  * Returns a clickable element instance
@@ -53,7 +53,7 @@ export class GovToast {
53
53
  }
54
54
  }
55
55
  render() {
56
- return (h(Host, { key: '940d040e89e39a45d89398d0b1bf7df0ad541132', class: this.h.classes(ToastClass.root), "data-toast-id": this.toastId, gravity: this.gravity, position: this.position, color: this.color, type: this.type, style: { "--toast-duration": this.time + "ms" } }, this.h.hasSlot("icon") && (h("slot", { key: '83468790661861781f8c1a0cbbb3b9a81f4a3120', name: "icon" })), h("div", Object.assign({ key: 'ae1ade607226894dfa26a0a5d9cd8dc727d23ea7', class: ToastClass.content }, this.inheritedAttributes, { "aria-live": "polite", role: "status" }), h("slot", { key: 'a53e4ec532d32417cd64950cc174c63c83e1a7eb' })), h("gov-button", { key: '5e8ff6bc372ff702e883386e0968a61a297afdf5', size: "s", "aria-label": this.accessibleCloseLabel, color: this.isBold ? this.color : "neutral", type: "base", "on-gov-click": this.onCloseHandler.bind(this), class: ToastClass.close }, this.closeLabel ? this.closeLabel : h("gov-icon", { name: "x-lg" })), h("div", { key: 'bf031915e9731e8f34a922651948f5a2efd8e95c', class: ToastClass.timer })));
56
+ return (h(Host, { key: 'd87a4c76a4a941e1c1bafdb5bc6cb1f820b89d4f', class: this.h.classes(ToastClass.root), "data-toast-id": this.toastId, gravity: this.gravity, position: this.position, color: this.color, type: this.type, style: { "--toast-duration": this.time + "ms" } }, this.h.hasSlot("icon") && (h("slot", { key: '246d9cb44a3d036f7fc7eb4a57330331fac398dd', name: "icon" })), h("div", Object.assign({ key: '0913d1290cb3238e976c043a776194d0e11182c7', class: ToastClass.content }, this.inheritedAttributes, { "aria-live": "polite", role: "status" }), h("slot", { key: 'a0cc6ae04ca14ab258552ce1c5a79835f4ffb9f1' })), h("gov-button", { key: '0c59c1b09ce13f98e3574fd499e88183f01b7664', size: "s", "aria-label": this.accessibleCloseLabel, color: this.isBold ? this.color : "neutral", type: "base", "on-gov-click": this.onCloseHandler.bind(this), class: ToastClass.close }, this.closeLabel ? this.closeLabel : h("gov-icon", { name: "x-lg" })), h("div", { key: '6b99258b523211dfdbf6b2e16cda957e19e8fb9d', class: ToastClass.timer })));
57
57
  }
58
58
  onCloseHandler() {
59
59
  this.destroy()
@@ -29,7 +29,7 @@ export class GovTooltipContent {
29
29
  }
30
30
  }
31
31
  render() {
32
- return (h(Host, { key: '53f6685cde44dc337600773140715671884c8d1f', class: TooltipContentClass.root, role: "tooltip", hidden: !this.isVisible, "aria-hidden": !toBoolAttr(this.isVisible), "is-visible": this.isVisible }, h("slot", { key: '5f552ef5d7b650ae3bca48a41a244d058f9812a7' }), this.persist ? (h("gov-button", { "on-gov-click": this.hideContent.bind(this), color: this.color, size: this.size, type: "base" }, h("gov-icon", { slot: "left-icon", name: "x-lg", type: "basic" }))) : null));
32
+ return (h(Host, { key: 'd49864e98a9f2dedf08a16a6bb2ca9efdf197474', class: TooltipContentClass.root, role: "tooltip", hidden: !this.isVisible, "aria-hidden": !toBoolAttr(this.isVisible), "is-visible": this.isVisible }, h("slot", { key: '82e18c8a1a8816501ede9d1463dc494098c1a5f1' }), this.persist ? (h("gov-button", { "on-gov-click": this.hideContent.bind(this), color: this.color, size: this.size, type: "base" }, h("gov-icon", { slot: "left-icon", name: "x-lg", type: "basic" }))) : null));
33
33
  }
34
34
  static get is() { return "gov-tooltip-content"; }
35
35
  static get properties() {
@@ -196,11 +196,11 @@ export class GovTooltip {
196
196
  }
197
197
  render() {
198
198
  var _a;
199
- return (h(Host, { key: 'f6273f5b0285855de2678de6cf9e56b3a538d1a2', id: this.tooltipId, class: this.h.classes(TooltipClass.root), position: this.position }, h("span", { key: '1625bc58fec8bde766c69a072d4c8a3968271ab8', role: 'button', tabindex: 0, onKeyPress: () => this.showTooltip(), onBlur: () => {
199
+ return (h(Host, { key: '586688b720383614f664372d3e2ee78e7ffd1839', id: this.tooltipId, class: this.h.classes(TooltipClass.root), position: this.position }, h("span", { key: 'f92e924b5ebac06826819ed54e6b72107b3361c6', role: 'button', tabindex: 0, onKeyPress: () => this.showTooltip(), onBlur: () => {
200
200
  if (this.persist === false) {
201
201
  this.hideTooltip();
202
202
  }
203
- }, "aria-describedby": (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipContentId }, h("slot", { key: '54fccbe8a9f1e53affd40fe026739cb5c278c902' }))));
203
+ }, "aria-describedby": (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipContentId }, h("slot", { key: 'be127806aff769f381809e21142a2f7aa79ca5b1' }))));
204
204
  }
205
205
  /**
206
206
  * Showing the modal
@@ -36,8 +36,8 @@ export class GovWizardItem {
36
36
  render() {
37
37
  const triggerId = this.identifier || this.triggerId;
38
38
  const Tag = this.collapsible ? Tags.BUTTON : Tags.DIV;
39
- const prefixSlot = this.h.hasSlot("prefix") && (h("span", { key: '3f59956339df074998165a5224c9df58054b3f34', class: WizardItemClass.prefix }, h("slot", { key: '6c9b2007a4480ea06d9c1968c9c9f90b1d03fe12', name: "prefix" })));
40
- return (h(Host, { key: '7c6523696e4ee074c82047d453355a46460e5f29', class: this.h.classes(WizardItemClass.root), "is-expanded": this.isExpanded, color: this.color, size: this.size, role: "listitem", collapsible: this.collapsible, hydrated: this.hydrated }, h("div", { key: '1881b5a37ce7b3587295ed8a38a5923afbf2ffdb', class: WizardItemClass.header }, prefixSlot, this.collapsible ? (h(Tag, { id: triggerId, class: this.h.classes(WizardItemClass.label), "aria-expanded": booleanString(this.isExpanded), "aria-controls": this.contentId, disabled: this.disabled, "aria-disabled": toBoolAttrIfDefined(this.disabled), onClick: (e) => {
39
+ const prefixSlot = this.h.hasSlot("prefix") && (h("span", { key: 'a90c41a00e83403e088c5080b690ba8a1ba8b153', class: WizardItemClass.prefix }, h("slot", { key: 'a73bf28d1b1d70d3eb987fa158fc3f350fdc18ed', name: "prefix" })));
40
+ return (h(Host, { key: '85bdb5aaf2996e25399e733123c622cb3f2aa181', class: this.h.classes(WizardItemClass.root), "is-expanded": this.isExpanded, color: this.color, size: this.size, role: "listitem", collapsible: this.collapsible, hydrated: this.hydrated }, h("div", { key: '5e36bc2ba8a1d3ffa802b91d5c972cf64d6e92b1', class: WizardItemClass.header }, prefixSlot, this.collapsible ? (h(Tag, { id: triggerId, class: this.h.classes(WizardItemClass.label), "aria-expanded": booleanString(this.isExpanded), "aria-controls": this.contentId, disabled: this.disabled, "aria-disabled": toBoolAttrIfDefined(this.disabled), onClick: (e) => {
41
41
  e.preventDefault();
42
42
  e.stopPropagation();
43
43
  this.toggle();
@@ -40,7 +40,7 @@ export class GovWizard {
40
40
  this.hydrated = true;
41
41
  }
42
42
  render() {
43
- return (h(Host, { key: '5dd1ff1d4239f078562f4fbda12e37e6d3586b50', class: this.h.classes(WizardClass.root), role: "list", size: this.size, hydrated: this.hydrated }, h("slot", { key: 'eefabfef3f6ff5367a440df275cce51b179b24b4' })));
43
+ return (h(Host, { key: '561329ca0aab784816ee33a24f323b931b4ef730', class: this.h.classes(WizardClass.root), role: "list", size: this.size, hydrated: this.hydrated }, h("slot", { key: '362c9affa822094d8b2d56185ccfb7d63f69cb1e' })));
44
44
  }
45
45
  /**
46
46
  * Validate the WCAG attributes of the component
@@ -1,2 +1,2 @@
1
- import{p as e,H as s,c as t,h as a,d as i}from"./p-ae3dada7.js";import{v as c}from"./p-19c681a3.js";import{A as d,b as o,a as n}from"./p-d4509899.js";import{g as f,t as b,b as r}from"./p-0075138f.js";import{i as h}from"./p-33d5d1ed.js";import{d as l}from"./p-5caf1fe1.js";const m=e(class e extends s{constructor(){super();this.__registerHost();this.govChange=t(this,"gov-change",7);this.inheritedAttributes={};this.openState=undefined;this.identifier=undefined;this.size=undefined;this.disabled=false;this.open=false;this.h=f(this.host)}validateSize(e){c(n,e,o.root)}componentWillLoad(){this.getPropsFromParents();this.validateSize(this.size);this.inheritedAttributes=h(this.host)}getPropsFromParents(){const e=this.h.getParent(d.root);if(e){this.size=e.getAttribute("size")}}render(){return a(i,{key:"cd78429326c306d9ab9fdc15954cd7029aa3ee35",class:this.h.classes([o.root,this.disabled&&o.disabled]),size:this.size,role:"listitem"},a("details",{key:"5372c71057418b93711f7d2c6065a6cc669105ff",class:o.details,id:this.identifier,"aria-disabled":b(this.disabled),open:this.open},a("summary",Object.assign({key:"a2e06472048b79b206dc4421e43f0afd877b9be6",onClick:e=>{e.stopPropagation();e.preventDefault();!this.disabled&&this.toggle().finally()},class:o.summary,tabIndex:this.disabled?-1:0,"aria-expanded":r(this.open)},this.inheritedAttributes),this.h.hasSlot("icon")&&a("span",{key:"a2e6529d090c59ef45c8f7dbfd452165eebdf6e5",class:o.icon},a("slot",{key:"ec572df22db3551aeb1baa31077d2bb368db88ca",name:"icon"})),a("span",{key:"44451f5e8df2550217af485162015a0810b2735e",class:o.title},a("slot",{key:"7f1c09f9537fe337a95e67b6f0c90c9c00ca00c1",name:"label"}),a("slot",{key:"84d426afff5847ffe57a96c12c163219a8720872",name:"annotation"})),a("span",{key:"c4e37d6e8726486a043dd1def487d14e9678585b",class:o.right},a("slot",{key:"b29e5714737ce05b8d194ce693dc4729e6b0e8a0",name:"suffix"}),a("span",{key:"1bd99c3f807ebc20ba4545d1c09325ce5b940d1a",class:o.arrow},a("slot",{key:"ec2f902bccb6f21701238b822d72e7b2819c20c3",name:"toggle-icon"},a("gov-icon",{key:"ab143aace36d062bfb6e78c2f3544a0efb52cb49",name:"chevron-down"}))))),a("div",{key:"253f1a692a13698306d2f2f1b050252b7a798886",class:o.content},a("slot",{key:"f51877b9d3f58f29bced6949b170529ddbf45864"}))))}async toggle(){this.open=!this.open;this.govChange.emit({open:this.open,component:o.root,ref:this.host})}async currentState(){return this.open}get host(){return this}static get watchers(){return{size:["validateSize"]}}},[4,"gov-accordion-item",{identifier:[1],size:[1],disabled:[4],open:[1028],openState:[32],toggle:[64],currentState:[64]},undefined,{size:["validateSize"]}]);function p(){if(typeof customElements==="undefined"){return}const e=["gov-accordion-item","gov-icon"];e.forEach((e=>{switch(e){case"gov-accordion-item":if(!customElements.get(e)){customElements.define(e,m)}break;case"gov-icon":if(!customElements.get(e)){l()}break}}))}p();const u=m;const y=p;export{u as GovAccordionItem,y as defineCustomElement};
1
+ import{p as e,H as s,c as t,h as a,d as i}from"./p-ae3dada7.js";import{v as c}from"./p-19c681a3.js";import{A as d,b as o,a as n}from"./p-d4509899.js";import{g as f,t as b,b as r}from"./p-0075138f.js";import{i as h}from"./p-33d5d1ed.js";import{d as l}from"./p-a14f8877.js";const m=e(class e extends s{constructor(){super();this.__registerHost();this.govChange=t(this,"gov-change",7);this.inheritedAttributes={};this.openState=undefined;this.identifier=undefined;this.size=undefined;this.disabled=false;this.open=false;this.h=f(this.host)}validateSize(e){c(n,e,o.root)}componentWillLoad(){this.getPropsFromParents();this.validateSize(this.size);this.inheritedAttributes=h(this.host)}getPropsFromParents(){const e=this.h.getParent(d.root);if(e){this.size=e.getAttribute("size")}}render(){return a(i,{key:"cd78429326c306d9ab9fdc15954cd7029aa3ee35",class:this.h.classes([o.root,this.disabled&&o.disabled]),size:this.size,role:"listitem"},a("details",{key:"5372c71057418b93711f7d2c6065a6cc669105ff",class:o.details,id:this.identifier,"aria-disabled":b(this.disabled),open:this.open},a("summary",Object.assign({key:"a2e06472048b79b206dc4421e43f0afd877b9be6",onClick:e=>{e.stopPropagation();e.preventDefault();!this.disabled&&this.toggle().finally()},class:o.summary,tabIndex:this.disabled?-1:0,"aria-expanded":r(this.open)},this.inheritedAttributes),this.h.hasSlot("icon")&&a("span",{key:"a2e6529d090c59ef45c8f7dbfd452165eebdf6e5",class:o.icon},a("slot",{key:"ec572df22db3551aeb1baa31077d2bb368db88ca",name:"icon"})),a("span",{key:"44451f5e8df2550217af485162015a0810b2735e",class:o.title},a("slot",{key:"7f1c09f9537fe337a95e67b6f0c90c9c00ca00c1",name:"label"}),a("slot",{key:"84d426afff5847ffe57a96c12c163219a8720872",name:"annotation"})),a("span",{key:"c4e37d6e8726486a043dd1def487d14e9678585b",class:o.right},a("slot",{key:"b29e5714737ce05b8d194ce693dc4729e6b0e8a0",name:"suffix"}),a("span",{key:"1bd99c3f807ebc20ba4545d1c09325ce5b940d1a",class:o.arrow},a("slot",{key:"ec2f902bccb6f21701238b822d72e7b2819c20c3",name:"toggle-icon"},a("gov-icon",{key:"ab143aace36d062bfb6e78c2f3544a0efb52cb49",name:"chevron-down"}))))),a("div",{key:"253f1a692a13698306d2f2f1b050252b7a798886",class:o.content},a("slot",{key:"f51877b9d3f58f29bced6949b170529ddbf45864"}))))}async toggle(){this.open=!this.open;this.govChange.emit({open:this.open,component:o.root,ref:this.host})}async currentState(){return this.open}get host(){return this}static get watchers(){return{size:["validateSize"]}}},[4,"gov-accordion-item",{identifier:[1],size:[1],disabled:[4],open:[1028],openState:[32],toggle:[64],currentState:[64]},undefined,{size:["validateSize"]}]);function p(){if(typeof customElements==="undefined"){return}const e=["gov-accordion-item","gov-icon"];e.forEach((e=>{switch(e){case"gov-accordion-item":if(!customElements.get(e)){customElements.define(e,m)}break;case"gov-icon":if(!customElements.get(e)){l()}break}}))}p();const u=m;const y=p;export{u as GovAccordionItem,y as defineCustomElement};
2
2
  //# sourceMappingURL=gov-accordion-item.js.map
@@ -1,2 +1,2 @@
1
- import{G as o,d as s}from"./p-fe1842da.js";const t=o;const a=s;export{t as GovAttachmentsItem,a as defineCustomElement};
1
+ import{G as o,d as s}from"./p-de3103e8.js";const t=o;const e=s;export{t as GovAttachmentsItem,e as defineCustomElement};
2
2
  //# sourceMappingURL=gov-attachments-item.js.map
@@ -1,2 +1,2 @@
1
- import{G as o,d as s}from"./p-736e4917.js";const t=o;const p=s;export{t as GovAttachments,p as defineCustomElement};
1
+ import{G as o,d as s}from"./p-1e82b99e.js";const t=o;const e=s;export{t as GovAttachments,e as defineCustomElement};
2
2
  //# sourceMappingURL=gov-attachments.js.map
@@ -1,2 +1,2 @@
1
- import{G as o,d as s}from"./p-e183a7c7.js";const t=o;const a=s;export{t as GovBackdrop,a as defineCustomElement};
1
+ import{G as o,d as s}from"./p-de8656dd.js";const d=o;const t=s;export{d as GovBackdrop,t as defineCustomElement};
2
2
  //# sourceMappingURL=gov-backdrop.js.map
@@ -1,2 +1,2 @@
1
- import{p as s,H as e,c as t,h as i,d as a}from"./p-ae3dada7.js";import{a as o}from"./p-9a93146e.js";import{d as c}from"./p-7501abe8.js";import{g as l}from"./p-0075138f.js";import{t as n}from"./p-26618322.js";import{d as r}from"./p-e20bb5dc.js";import{d as b}from"./p-5caf1fe1.js";const h={root:"gov-breadcrumbs"};const d=s(class s extends e{constructor(){super();this.__registerHost();this.govChange=t(this,"gov-change",7);this.inited=false;this.collapsible=false;this.isExpanded=false;this.accessibleLabel=undefined;this.accessibleLabelledBy=undefined;this.accessibleToggleLabel="Zobrazit či skrýt navigaci";this.expanded=false;this.toggleOption=false;this.h=l(this.host)}async componentDidRender(){this.scheduleContentVerification();if(c()){n((()=>this.validateAccessibility()))}}scheduleContentVerification(){if(this.inited)return;this.inited=true;n((()=>{this.calculateWidthOfItems();this.inited=false}))}calculateWidthOfItems(){const s=this.host.getBoundingClientRect().width;let e=0;this.host.querySelectorAll("li").forEach((s=>{e+=s.getBoundingClientRect().width}));this.toggleOption=e>s}render(){return i(a,{key:"645442a9bf54f216c22b40eab292987d7a5c4229",class:this.h.classes(h.root),expanded:this.expanded},i("nav",{key:"3404e135545ad9ab7895522f0db318fff722ff33","aria-label":this.accessibleLabel,"aria-labelledby":this.accessibleLabelledBy},i("slot",{key:"b9b33750baeece46453a810cb60c3f267029ea30"})),this.toggleOption?i("gov-button",{size:"xs",color:"primary",type:"base","aria-label":this.accessibleToggleLabel,"aria-pressed":this.expanded,"aria-expanded":this.expanded,"on-gov-click":()=>this.expanded=!this.expanded},i("gov-icon",{name:this.expanded?"chevron-up":"chevron-down"})):null)}async validateAccessibility(){o(this.accessibleLabel,this.accessibleLabelledBy,h.root,this.host);o(this.accessibleToggleLabel,undefined,h.root,this.host)}get host(){return this}},[4,"gov-breadcrumbs",{collapsible:[4],isExpanded:[4,"is-expanded"],accessibleLabel:[1,"accessible-label"],accessibleLabelledBy:[1,"accessible-labelledby"],accessibleToggleLabel:[1,"accessible-toggle-label"],expanded:[32],toggleOption:[32],validateAccessibility:[64]}]);function f(){if(typeof customElements==="undefined"){return}const s=["gov-breadcrumbs","gov-button","gov-icon"];s.forEach((s=>{switch(s){case"gov-breadcrumbs":if(!customElements.get(s)){customElements.define(s,d)}break;case"gov-button":if(!customElements.get(s)){r()}break;case"gov-icon":if(!customElements.get(s)){b()}break}}))}f();const m=d;const p=f;export{m as GovBreadcrumbs,p as defineCustomElement};
1
+ import{p as e,H as s,c as t,h as i,d as a}from"./p-ae3dada7.js";import{a as o}from"./p-9a93146e.js";import{d as c}from"./p-7501abe8.js";import{g as l}from"./p-0075138f.js";import{t as n}from"./p-26618322.js";import{d as r}from"./p-dd8d3279.js";import{d}from"./p-a14f8877.js";const h={root:"gov-breadcrumbs"};const b=e(class e extends s{constructor(){super();this.__registerHost();this.govChange=t(this,"gov-change",7);this.inited=false;this.collapsible=false;this.isExpanded=false;this.accessibleLabel=undefined;this.accessibleLabelledBy=undefined;this.accessibleToggleLabel="Zobrazit či skrýt navigaci";this.expanded=false;this.toggleOption=false;this.h=l(this.host)}async componentDidRender(){this.scheduleContentVerification();if(c()){n((()=>this.validateAccessibility()))}}scheduleContentVerification(){if(this.inited)return;this.inited=true;n((()=>{this.calculateWidthOfItems();this.inited=false}))}calculateWidthOfItems(){const e=this.host.getBoundingClientRect().width;let s=0;this.host.querySelectorAll("li").forEach((e=>{s+=e.getBoundingClientRect().width}));this.toggleOption=s>e}render(){return i(a,{key:"81d7a8e273e1ce4740ee35ebe4a570ee8c5e73a4",class:this.h.classes(h.root),expanded:this.expanded},i("nav",{key:"dc37fa314f5d84c6c517f64229ef601b256f3ad5","aria-label":this.accessibleLabel,"aria-labelledby":this.accessibleLabelledBy},i("slot",{key:"4ead548352e642c0994360d74a98123782790a04"})),this.toggleOption?i("gov-button",{size:"xs",color:"primary",type:"base","aria-label":this.accessibleToggleLabel,"aria-pressed":this.expanded,"aria-expanded":this.expanded,"on-gov-click":()=>this.expanded=!this.expanded},i("gov-icon",{name:this.expanded?"chevron-up":"chevron-down"})):null)}async validateAccessibility(){o(this.accessibleLabel,this.accessibleLabelledBy,h.root,this.host);o(this.accessibleToggleLabel,undefined,h.root,this.host)}get host(){return this}},[4,"gov-breadcrumbs",{collapsible:[4],isExpanded:[4,"is-expanded"],accessibleLabel:[1,"accessible-label"],accessibleLabelledBy:[1,"accessible-labelledby"],accessibleToggleLabel:[1,"accessible-toggle-label"],expanded:[32],toggleOption:[32],validateAccessibility:[64]}]);function f(){if(typeof customElements==="undefined"){return}const e=["gov-breadcrumbs","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-breadcrumbs":if(!customElements.get(e)){customElements.define(e,b)}break;case"gov-button":if(!customElements.get(e)){r()}break;case"gov-icon":if(!customElements.get(e)){d()}break}}))}f();const m=b;const p=f;export{m as GovBreadcrumbs,p as defineCustomElement};
2
2
  //# sourceMappingURL=gov-breadcrumbs.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BreadcrumbsClass","root","GovBreadcrumbs","proxyCustomElement","H","constructor","this","inited","h","govHost","host","componentDidRender","scheduleContentVerification","canValidateWcagOnRender","tick","validateAccessibility","calculateWidthOfItems","hostWidth","getBoundingClientRect","width","sumOfWidths","querySelectorAll","forEach","li","toggleOption","render","Host","key","class","classes","expanded","accessibleLabel","accessibleLabelledBy","size","color","type","accessibleToggleLabel","name","validateAccessibleLabel","undefined"],"sources":["../../../packages/core/src/components/gov-breadcrumbs/constants.ts","../../../packages/core/src/components/gov-breadcrumbs/gov-breadcrumbs.tsx"],"sourcesContent":["export const BreadcrumbsClass = {\n\troot: 'gov-breadcrumbs',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State} from '@stencil/core'\nimport {BreadcrumbsClass} from './constants'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {GovBreadcrumbsChangeEvent} from './gov-breadcrumbs.d'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-breadcrumbs',\n})\nexport class GovBreadcrumbs {\n\tprivate inited = false;\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovBreadcrumbsElement\n\t/**\n\t * Defines whether the components can be collapsible when element doesn't fit in one row.\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Defines whether the breadcrumbs are open or closed by button\n\t */\n\t@Prop({attribute: 'is-expanded'}) readonly isExpanded: boolean = false\n\t/**\n\t * Adds accessible label for the pagination that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-label'}) readonly accessibleLabel: string\n\t/**\n\t * Indicates the id of a component that labels the pagination.\n\t */\n\t@Prop({attribute: 'accessible-labelledby'}) readonly accessibleLabelledBy: string\n\t/**\n\t * Adds an accessible label to display the full breadcrumb navigation that only screen readers can see.\n\t */\n\t@Prop({attribute: 'accessible-toggle-label'}) readonly accessibleToggleLabel: string = 'Zobrazit či skrýt navigaci'\n\t/**\n\t * Called when the Breadcrumbs state changes\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<GovBreadcrumbsChangeEvent>\n\n\t@State() expanded = false;\n\t@State() toggleOption = false;\n\n\tasync componentDidRender() {\n\t\tthis.scheduleContentVerification()\n\t\tif (canValidateWcagOnRender()) {\n\t\t\ttick(() => this.validateAccessibility())\n\t\t}\n\t}\n\n\tprivate scheduleContentVerification() {\n\t\tif (this.inited) return;\n\t\tthis.inited = true;\n\t\ttick(() => {\n\t\t\tthis.calculateWidthOfItems();\n\t\t\tthis.inited = false;\n\t\t});\n\t}\n\n\tprivate calculateWidthOfItems() {\n\t\tconst hostWidth = this.host.getBoundingClientRect().width;\n\t\tlet sumOfWidths = 0;\n\t\tthis.host.querySelectorAll('li').forEach((li) => {\n\t\t\tsumOfWidths += li.getBoundingClientRect().width\n\t\t})\n\t\tthis.toggleOption = sumOfWidths > hostWidth;\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BreadcrumbsClass.root)} expanded={this.expanded}>\n\t\t\t\t<nav aria-label={this.accessibleLabel} aria-labelledby={this.accessibleLabelledBy}>\n\t\t\t\t\t<slot/>\n\t\t\t\t</nav>\n\t\t\t\t{this.toggleOption ? (\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\tsize={'xs'}\n\t\t\t\t\t\tcolor={'primary'}\n\t\t\t\t\t\ttype={'base'}\n\t\t\t\t\t\taria-label={this.accessibleToggleLabel}\n\t\t\t\t\t\taria-pressed={this.expanded}\n\t\t\t\t\t\taria-expanded={this.expanded}\n\t\t\t\t\t\ton-gov-click={() => this.expanded = !this.expanded}\n\t\t\t\t\t>\n\t\t\t\t\t\t<gov-icon name={this.expanded ? 'chevron-up' : 'chevron-down'}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateAccessibleLabel(this.accessibleLabel, this.accessibleLabelledBy, BreadcrumbsClass.root, this.host)\n\t\tvalidateAccessibleLabel(this.accessibleToggleLabel, undefined, BreadcrumbsClass.root, this.host)\n\t}\n}\n"],"mappings":"wRAAO,MAAMA,EAAmB,CAC/BC,KAAM,mB,MCWMC,EAAcC,EAAA,MAA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umbs","proxyCustomElement","H","constructor","this","inited","h","govHost","host","componentDidRender","scheduleContentVerification","canValidateWcagOnRender","tick","validateAccessibility","calculateWidthOfItems","hostWidth","getBoundingClientRect","width","sumOfWidths","querySelectorAll","forEach","li","toggleOption","render","Host","key","class","classes","expanded","accessibleLabel","accessibleLabelledBy","size","color","type","accessibleToggleLabel","name","validateAccessibleLabel","undefined"],"sources":["../../../packages/core/src/components/gov-breadcrumbs/constants.ts","../../../packages/core/src/components/gov-breadcrumbs/gov-breadcrumbs.tsx"],"sourcesContent":["export const BreadcrumbsClass = {\n\troot: 'gov-breadcrumbs',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State} from '@stencil/core'\nimport {BreadcrumbsClass} from './constants'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {GovBreadcrumbsChangeEvent} from './gov-breadcrumbs.d'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-breadcrumbs',\n})\nexport class GovBreadcrumbs {\n\tprivate inited = false;\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovBreadcrumbsElement\n\t/**\n\t * Defines whether the components can be collapsible when element doesn't fit in one row.\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Defines whether the breadcrumbs are open or closed by button\n\t */\n\t@Prop({attribute: 'is-expanded'}) readonly isExpanded: boolean = false\n\t/**\n\t * Adds accessible label for the pagination that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-label'}) readonly accessibleLabel: string\n\t/**\n\t * Indicates the id of a component that labels the pagination.\n\t */\n\t@Prop({attribute: 'accessible-labelledby'}) readonly accessibleLabelledBy: string\n\t/**\n\t * Adds an accessible label to display the full breadcrumb navigation that only screen readers can see.\n\t */\n\t@Prop({attribute: 'accessible-toggle-label'}) readonly accessibleToggleLabel: string = 'Zobrazit či skrýt navigaci'\n\t/**\n\t * Called when the Breadcrumbs state changes\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<GovBreadcrumbsChangeEvent>\n\n\t@State() expanded = false;\n\t@State() toggleOption = false;\n\n\tasync componentDidRender() {\n\t\tthis.scheduleContentVerification()\n\t\tif (canValidateWcagOnRender()) {\n\t\t\ttick(() => this.validateAccessibility())\n\t\t}\n\t}\n\n\tprivate scheduleContentVerification() {\n\t\tif (this.inited) return;\n\t\tthis.inited = true;\n\t\ttick(() => {\n\t\t\tthis.calculateWidthOfItems();\n\t\t\tthis.inited = false;\n\t\t});\n\t}\n\n\tprivate calculateWidthOfItems() {\n\t\tconst hostWidth = this.host.getBoundingClientRect().width;\n\t\tlet sumOfWidths = 0;\n\t\tthis.host.querySelectorAll('li').forEach((li) => {\n\t\t\tsumOfWidths += li.getBoundingClientRect().width\n\t\t})\n\t\tthis.toggleOption = sumOfWidths > hostWidth;\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BreadcrumbsClass.root)} expanded={this.expanded}>\n\t\t\t\t<nav aria-label={this.accessibleLabel} aria-labelledby={this.accessibleLabelledBy}>\n\t\t\t\t\t<slot/>\n\t\t\t\t</nav>\n\t\t\t\t{this.toggleOption ? (\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\tsize={'xs'}\n\t\t\t\t\t\tcolor={'primary'}\n\t\t\t\t\t\ttype={'base'}\n\t\t\t\t\t\taria-label={this.accessibleToggleLabel}\n\t\t\t\t\t\taria-pressed={this.expanded}\n\t\t\t\t\t\taria-expanded={this.expanded}\n\t\t\t\t\t\ton-gov-click={() => this.expanded = !this.expanded}\n\t\t\t\t\t>\n\t\t\t\t\t\t<gov-icon name={this.expanded ? 'chevron-up' : 'chevron-down'}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateAccessibleLabel(this.accessibleLabel, this.accessibleLabelledBy, BreadcrumbsClass.root, this.host)\n\t\tvalidateAccessibleLabel(this.accessibleToggleLabel, undefined, BreadcrumbsClass.root, this.host)\n\t}\n}\n"],"mappings":"mRAAO,MAAMA,EAAmB,CAC/BC,KAAM,mB,MCWMC,EAAcC,EAAA,MAAAD,UAAAE,EAI1B,WAAAC,G,oEAHQC,KAAAC,OAAS,M,iBAWuB,M,gBAIyB,M,8FAYsB,6B,cAMnE,M,kBACI,MA9BvBD,KAAKE,EAAIC,EAAQH,KAAKI,K,CAgCvB,wBAAMC,GACLL,KAAKM,8BACL,GAAIC,IAA2B,CAC9BC,GAAK,IAAMR,KAAKS,yB,EAIV,2BAAAH,GACP,GAAIN,KAAKC,OAAQ,OACjBD,KAAKC,OAAS,KACdO,GAAK,KACJR,KAAKU,wBACLV,KAAKC,OAAS,KAAK,G,CAIb,qBAAAS,GACP,MAAMC,EAAYX,KAAKI,KAAKQ,wBAAwBC,MACpD,IAAIC,EAAc,EAClBd,KAAKI,KAAKW,iBAAiB,MAAMC,SAASC,IACzCH,GAAeG,EAAGL,wBAAwBC,KAAK,IAEhDb,KAAKkB,aAAeJ,EAAcH,C,CAGnC,MAAAQ,GACC,OACCjB,EAACkB,EAAI,CAAAC,IAAA,2CAACC,MAAOtB,KAAKE,EAAEqB,QAAQ7B,EAAiBC,MAAO6B,SAAUxB,KAAKwB,UAClEtB,EAAA,OAAAmB,IAAA,wDAAiBrB,KAAKyB,gBAAe,kBAAmBzB,KAAK0B,sBAC5DxB,EAAA,QAAAmB,IAAA,8CAEArB,KAAKkB,aACLhB,EAAA,cACCyB,KAAM,KACNC,MAAO,UACPC,KAAM,OAAM,aACA7B,KAAK8B,sBAAqB,eACxB9B,KAAKwB,SAAQ,gBACZxB,KAAKwB,SAAQ,eACd,IAAMxB,KAAKwB,UAAYxB,KAAKwB,UAE1CtB,EAAA,YAAU6B,KAAM/B,KAAKwB,SAAW,aAAe,kBAE7C,K,CAUP,2BAAMf,GACLuB,EAAwBhC,KAAKyB,gBAAiBzB,KAAK0B,qBAAsBhC,EAAiBC,KAAMK,KAAKI,MACrG4B,EAAwBhC,KAAK8B,sBAAuBG,UAAWvC,EAAiBC,KAAMK,KAAKI,K","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{G as o,d as s}from"./p-e20bb5dc.js";const t=o;const c=s;export{t as GovButton,c as defineCustomElement};
1
+ import{G as o,d as s}from"./p-dd8d3279.js";const d=o;const t=s;export{d as GovButton,t as defineCustomElement};
2
2
  //# sourceMappingURL=gov-button.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as s,c as a,h as i,d as t}from"./p-ae3dada7.js";import{g as d,b as c}from"./p-0075138f.js";import{c as o}from"./p-95d41a3b.js";import{a as n}from"./p-9a93146e.js";import{d as r}from"./p-7501abe8.js";import{d as l}from"./p-e0e2e9c1.js";import{d as b}from"./p-5caf1fe1.js";const f={root:"gov-card",header:"gov-card__header",title:"gov-card__title",inner:"gov-card__inner",img:"gov-card__img",main:"gov-card__main",icon:"gov-card__icon",btns:"gov-card__btns",footer:"gov-card__footer",arrow:"gov-card__arrow"};const h=e(class e extends s{constructor(){super();this.__registerHost();this.govToggle=a(this,"gov-toggle",7);this.hydrated=false;this.promotion=false;this.collapsible=false;this.open=true;this.accessibleTriggerLabel=undefined;this.accessibleTriggerLabelledBy=undefined;this.h=d(this.host);this.headlineId=o("GovCardHeadline");this.contentId=o("GovCardContent")}async componentDidRender(){if(r()){await l(500);await this.validateAccessibility()}}connectedCallback(){this.hydrated=true}render(){return i(t,{key:"7ae6cc86b82b3f87aff07e5d9e950b2e53151a18",class:this.h.classes(f.root),open:this.open,collapsible:c(this.collapsible),promotion:this.promotion,hydrated:this.hydrated},this.collapsible?i("button",{id:this.headlineId,class:f.header,"aria-label":this.accessibleTriggerLabel,"aria-labelledby":this.accessibleTriggerLabelledBy,"aria-expanded":c(this.open),"aria-controls":this.contentId,onClick:this.onClickHandler.bind(this)},i("slot",{name:"headline"}),i("gov-icon",{class:f.arrow,name:"chevron-down"})):this.h.hasSlot("headline")?i("div",{class:f.header},i("slot",{name:"headline"})):null,i("div",{key:"ddb3e93eeb27258896a44ba3bbef6d8d03a10a2f",class:f.inner,id:this.contentId,"aria-hidden":this.collapsible?c(!this.open):undefined,hidden:this.collapsible?!this.open:undefined,"aria-labelledby":this.collapsible?this.headlineId:undefined},this.h.hasSlot("img")&&i("p",{key:"ec427ac10e1a8810a10fda0e7b0cfd479ccc7446",class:f.img},i("slot",{key:"70f4afe1cc9189987af1e213b83bfd3358da2e69",name:"img"})),i("div",{key:"52b0c40a1fd194b0f4fe097deeabf4f66621bc7b",class:f.main},this.h.hasSlot("icon")&&this.promotion&&i("div",{key:"665e99d2773408b2b99503aee1df61851ca6ef79",class:f.icon},i("slot",{key:"3d9ab0e47f8bd219fbe697182788dbc9f86755f4",name:"icon"})),i("slot",{key:"e7cb0ac6a735e53d183f0f376afc420cec0ecbd9"}),this.h.hasSlot("btn")&&this.promotion&&i("div",{key:"30f0d797b741e1304d7500f89da4d86b13d8470d",class:f.btns},i("slot",{key:"b8f6a9296c8c88922d31e80552d4eaf29cda4ad7",name:"btn"}))),this.h.hasSlot("footer")&&i("div",{key:"d2eeed664123d020bacb1bfba680940d349f9ab8",class:f.footer},i("slot",{key:"f4207f3e99a4230858177d97ec0880b9bba62145",name:"footer"}))))}onClickHandler(e){e.stopPropagation();if(this.collapsible){this.open=!this.open;this.govToggle.emit({open:this.open,element:this.host})}}async validateAccessibility(){if(this.collapsible){n(this.accessibleTriggerLabel,this.accessibleTriggerLabelledBy,f.root,this.host)}}get host(){return this}},[4,"gov-card",{promotion:[4],collapsible:[4],open:[1540],accessibleTriggerLabel:[1,"accessible-label"],accessibleTriggerLabelledBy:[1,"accessible-labelledby"],validateAccessibility:[64]}]);function m(){if(typeof customElements==="undefined"){return}const e=["gov-card","gov-icon"];e.forEach((e=>{switch(e){case"gov-card":if(!customElements.get(e)){customElements.define(e,h)}break;case"gov-icon":if(!customElements.get(e)){b()}break}}))}m();const g=h;const p=m;export{g as GovCard,p as defineCustomElement};
1
+ import{p as e,H as s,c as i,h as a,d as t}from"./p-ae3dada7.js";import{g as c,b as d}from"./p-0075138f.js";import{c as o}from"./p-95d41a3b.js";import{a as n}from"./p-9a93146e.js";import{d as r}from"./p-7501abe8.js";import{d as l}from"./p-e0e2e9c1.js";import{d as f}from"./p-a14f8877.js";const h={root:"gov-card",header:"gov-card__header",title:"gov-card__title",inner:"gov-card__inner",img:"gov-card__img",main:"gov-card__main",icon:"gov-card__icon",btns:"gov-card__btns",footer:"gov-card__footer",arrow:"gov-card__arrow"};const b=e(class e extends s{constructor(){super();this.__registerHost();this.govToggle=i(this,"gov-toggle",7);this.hydrated=false;this.promotion=false;this.collapsible=false;this.open=true;this.accessibleTriggerLabel=undefined;this.accessibleTriggerLabelledBy=undefined;this.h=c(this.host);this.headlineId=o("GovCardHeadline");this.contentId=o("GovCardContent")}async componentDidRender(){if(r()){await l(500);await this.validateAccessibility()}}connectedCallback(){this.hydrated=true}render(){return a(t,{key:"c7dd00e1eee01b7005b98b39ddfccf784dc2808e",class:this.h.classes(h.root),open:this.open,collapsible:d(this.collapsible),promotion:this.promotion,hydrated:this.hydrated},this.collapsible?a("button",{id:this.headlineId,class:h.header,"aria-label":this.accessibleTriggerLabel,"aria-labelledby":this.accessibleTriggerLabelledBy,"aria-expanded":d(this.open),"aria-controls":this.contentId,onClick:this.onClickHandler.bind(this)},a("slot",{name:"headline"}),a("gov-icon",{class:h.arrow,name:"chevron-down"})):this.h.hasSlot("headline")?a("div",{class:h.header},a("slot",{name:"headline"})):null,a("div",{key:"dae87fe02926ed1772c4164c19e7e6f540510bec",class:h.inner,id:this.contentId,"aria-hidden":this.collapsible?d(!this.open):undefined,hidden:this.collapsible?!this.open:undefined,"aria-labelledby":this.collapsible?this.headlineId:undefined},this.h.hasSlot("img")&&a("p",{key:"7ef4bcc939fa3d84fb1a6dedc0e62c0d2612f8ec",class:h.img},a("slot",{key:"4f05366b5bc0c2e6117ed8cfcb17cf107fec6499",name:"img"})),a("div",{key:"4a25ad0d3002079fa4a35b5f7af10a05e3f5b45f",class:h.main},this.h.hasSlot("icon")&&this.promotion&&a("div",{key:"6b16961ed892fed347a69d18d5482bccf0247f12",class:h.icon},a("slot",{key:"5720427d2bbea01f6d24911d4d208e743ec453ce",name:"icon"})),a("slot",{key:"6f2efa36533f9d06365ad828766cb7956daf7e90"}),this.h.hasSlot("btn")&&this.promotion&&a("div",{key:"5b79f8832d6cc39f709fb0d656eec383261971ce",class:h.btns},a("slot",{key:"93486120fcc840a0812325c881538d4174bedd84",name:"btn"}))),this.h.hasSlot("footer")&&a("div",{key:"efaa342aa2d43418b33492296c8b6c2928004af9",class:h.footer},a("slot",{key:"502c7c7609d28290e601ef6c71eb050f12380f8b",name:"footer"}))))}onClickHandler(e){e.stopPropagation();if(this.collapsible){this.open=!this.open;this.govToggle.emit({open:this.open,element:this.host})}}async validateAccessibility(){if(this.collapsible){n(this.accessibleTriggerLabel,this.accessibleTriggerLabelledBy,h.root,this.host)}}get host(){return this}},[4,"gov-card",{promotion:[4],collapsible:[4],open:[1540],accessibleTriggerLabel:[1,"accessible-label"],accessibleTriggerLabelledBy:[1,"accessible-labelledby"],validateAccessibility:[64]}]);function m(){if(typeof customElements==="undefined"){return}const e=["gov-card","gov-icon"];e.forEach((e=>{switch(e){case"gov-card":if(!customElements.get(e)){customElements.define(e,b)}break;case"gov-icon":if(!customElements.get(e)){f()}break}}))}m();const g=b;const p=m;export{g as GovCard,p as defineCustomElement};
2
2
  //# sourceMappingURL=gov-card.js.map
@@ -1,2 +1,2 @@
1
- import{G as o,d as s}from"./p-ff0cf148.js";const f=o;const t=s;export{f as GovChip,t as defineCustomElement};
1
+ import{G as o,d as s}from"./p-4ffeb83f.js";const f=o;const t=s;export{f as GovChip,t as defineCustomElement};
2
2
  //# sourceMappingURL=gov-chip.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,h as s,d as o}from"./p-ae3dada7.js";import{g as n,s as r}from"./p-0075138f.js";const c={root:"gov-container"};const d=t(class t extends e{constructor(){super();this.__registerHost();this.h=n(this.host)}render(){return s(o,{key:"f1a8dda159411bb7eed4db33d408ddd70a2327be",class:this.h.classes(c.root)},s("slot",{key:"afe117ecdcb7bb6225e4612400e1627dcc80bff9"}))}async slottedChildren(){return Promise.resolve(r(this.host))}get host(){return this}},[4,"gov-container",{slottedChildren:[64]}]);function a(){if(typeof customElements==="undefined"){return}const t=["gov-container"];t.forEach((t=>{switch(t){case"gov-container":if(!customElements.get(t)){customElements.define(t,d)}break}}))}a();const i=d;const f=a;export{i as GovContainer,f as defineCustomElement};
1
+ import{p as t,H as e,h as s,d as o}from"./p-ae3dada7.js";import{g as n,s as r}from"./p-0075138f.js";const c={root:"gov-container"};const d=t(class t extends e{constructor(){super();this.__registerHost();this.h=n(this.host)}render(){return s(o,{key:"0c61adb532c5810dedd0b43f21b5843bfc3d9c53",class:this.h.classes(c.root)},s("slot",{key:"df9ee5f718d72be4a2e1bbc4dd8ae6e9883c922f"}))}async slottedChildren(){return Promise.resolve(r(this.host))}get host(){return this}},[4,"gov-container",{slottedChildren:[64]}]);function i(){if(typeof customElements==="undefined"){return}const t=["gov-container"];t.forEach((t=>{switch(t){case"gov-container":if(!customElements.get(t)){customElements.define(t,d)}break}}))}i();const a=d;const f=i;export{a as GovContainer,f as defineCustomElement};
2
2
  //# sourceMappingURL=gov-container.js.map
@@ -1,2 +1,2 @@
1
- import{p as o,H as t,h as e,d as r}from"./p-ae3dada7.js";import{C as s}from"./p-e3aeaca0.js";import{g as c}from"./p-0075138f.js";import{v as n}from"./p-19c681a3.js";import{p as a}from"./p-e0e2e9c1.js";a(s,["PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);const i={root:"gov-control-group"};const l=o(class o extends t{constructor(){super();this.__registerHost();this.color=s.PRIMARY;this.noBorder=false;this.fitContent=false;this.h=c(this.host)}validateColor(o){n(s,o,i.root)}render(){return e(r,{key:"41426d0763507d60dcf24a6f0fe3d69b54d5131f",class:this.h.classes(i.root),color:this.color},e("slot",{key:"0c67c4137be61b821e008779210543af73d7984c"}))}get host(){return this}static get watchers(){return{color:["validateColor"]}}},[4,"gov-control-group",{color:[1],noBorder:[4,"no-border"],fitContent:[4,"fit-content"]},undefined,{color:["validateColor"]}]);function f(){if(typeof customElements==="undefined"){return}const o=["gov-control-group"];o.forEach((o=>{switch(o){case"gov-control-group":if(!customElements.get(o)){customElements.define(o,l)}break}}))}f();const d=l;const p=f;export{d as GovControlGroup,p as defineCustomElement};
1
+ import{p as o,H as t,h as e,d as r}from"./p-ae3dada7.js";import{C as s}from"./p-e3aeaca0.js";import{g as a}from"./p-0075138f.js";import{v as c}from"./p-19c681a3.js";import{p as n}from"./p-e0e2e9c1.js";n(s,["PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);const i={root:"gov-control-group"};const l=o(class o extends t{constructor(){super();this.__registerHost();this.color=s.PRIMARY;this.noBorder=false;this.fitContent=false;this.h=a(this.host)}validateColor(o){c(s,o,i.root)}render(){return e(r,{key:"e2a56a633370dd4172c9d0895b51b7138d0a19a0",class:this.h.classes(i.root),color:this.color},e("slot",{key:"76d02cd85f4207a4e2f5a198e36d6ff53ee77e28"}))}get host(){return this}static get watchers(){return{color:["validateColor"]}}},[4,"gov-control-group",{color:[1],noBorder:[4,"no-border"],fitContent:[4,"fit-content"]},undefined,{color:["validateColor"]}]);function d(){if(typeof customElements==="undefined"){return}const o=["gov-control-group"];o.forEach((o=>{switch(o){case"gov-control-group":if(!customElements.get(o)){customElements.define(o,l)}break}}))}d();const f=l;const p=d;export{f as GovControlGroup,p as defineCustomElement};
2
2
  //# sourceMappingURL=gov-control-group.js.map
@@ -1,2 +1,2 @@
1
- import{p as a,H as e,h as o,d as c}from"./p-ae3dada7.js";import{g as s}from"./p-0075138f.js";const t={root:"gov-cookiebar",content:"gov-cookiebar__content",actions:"gov-cookiebar__actions",actionsPrimary:"gov-cookiebar__actions--primary",actionsSecondary:"gov-cookiebar__actions--secondary"};const i=a(class a extends e{constructor(){super();this.__registerHost();this.h=s(this.host)}render(){return o(c,{key:"ac6045b566122680c12a0cdf5068d81d53f4f4a9",class:this.h.classes(t.root)},o("div",{key:"f03a1401b65a6a90430dcad642bbceb8e843143b",class:t.content},o("slot",{key:"a373d6a55d299c240cc5aa596090dccb2a071e64",name:"headline"}),o("slot",{key:"c5e9b1c6a1ec0daf9959fae074983fd2d5131320"})),(this.h.hasSlot("actions-primary")||this.h.hasSlot("actions-secondary"))&&o("div",{key:"21d6131b451e16abff7270a521b7aa18b8e8c340",class:t.actions},this.h.hasSlot("actions-primary")&&o("div",{key:"8b3d07e54492d9374f1398b4c48afa9df5bf9052",class:t.actionsPrimary},o("slot",{key:"15d29f653408e2910c64f11847307ab9e8394951",name:"actions-primary"})),this.h.hasSlot("actions-secondary")&&o("div",{key:"ef629c9a63af59cb5cf127127c2b04d8524091a1",class:t.actionsSecondary},o("slot",{key:"e9b571f11d5b5077d3862376e5588db2e4e37f66",name:"actions-secondary"}))))}get host(){return this}},[4,"gov-cookiebar"]);function n(){if(typeof customElements==="undefined"){return}const a=["gov-cookiebar"];a.forEach((a=>{switch(a){case"gov-cookiebar":if(!customElements.get(a)){customElements.define(a,i)}break}}))}n();const r=i;const d=n;export{r as GovCookiebar,d as defineCustomElement};
1
+ import{p as e,H as c,h as o,d as a}from"./p-ae3dada7.js";import{g as s}from"./p-0075138f.js";const t={root:"gov-cookiebar",content:"gov-cookiebar__content",actions:"gov-cookiebar__actions",actionsPrimary:"gov-cookiebar__actions--primary",actionsSecondary:"gov-cookiebar__actions--secondary"};const i=e(class e extends c{constructor(){super();this.__registerHost();this.h=s(this.host)}render(){return o(a,{key:"1955ae868b0e5255aea8ebc8e26146c4d973a75b",class:this.h.classes(t.root)},o("div",{key:"cec7976304269a18f2fd71ffb0e398c60e17c4d5",class:t.content},o("slot",{key:"f311694262ff0297c86ae435874f2108621bb7dc",name:"headline"}),o("slot",{key:"7ea9f4b7e848bf3afa2039f5ec4ab14ce2573243"})),(this.h.hasSlot("actions-primary")||this.h.hasSlot("actions-secondary"))&&o("div",{key:"9230c752f5fa798d7784406dc6d114c159c8aa6e",class:t.actions},this.h.hasSlot("actions-primary")&&o("div",{key:"324e807bcc4e867f6561723edbe4028bb484297f",class:t.actionsPrimary},o("slot",{key:"bf945e0d01c7497cd8575b01fd9be172968179cd",name:"actions-primary"})),this.h.hasSlot("actions-secondary")&&o("div",{key:"8d836b11f057ec6840aa7ba62900dde267e9bdad",class:t.actionsSecondary},o("slot",{key:"8b9144381a5e6b54017bd6fb6ffc9c56437b62d0",name:"actions-secondary"}))))}get host(){return this}},[4,"gov-cookiebar"]);function n(){if(typeof customElements==="undefined"){return}const e=["gov-cookiebar"];e.forEach((e=>{switch(e){case"gov-cookiebar":if(!customElements.get(e)){customElements.define(e,i)}break}}))}n();const r=i;const d=n;export{r as GovCookiebar,d as defineCustomElement};
2
2
  //# sourceMappingURL=gov-cookiebar.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as s,c as a,h as i,d as t}from"./p-ae3dada7.js";import{g as c,a as o,c as l}from"./p-0075138f.js";import{d}from"./p-7501abe8.js";import{b}from"./p-9a93146e.js";import{c as n}from"./p-95d41a3b.js";import{t as h}from"./p-26618322.js";import{d as f}from"./p-e183a7c7.js";import{d as r}from"./p-e20bb5dc.js";import{d as g}from"./p-5caf1fe1.js";const m={root:"gov-dialog",dialog:"gov-dialog__dialog",inner:"gov-dialog__inner",header:"gov-dialog__header",title:"gov-dialog__title",content:"gov-dialog__content",close:"gov-dialog__close",footer:"gov-dialog__footer",bodyFix:"body-fixed"};const p=e(class e extends s{constructor(){super();this.__registerHost();this.govClose=a(this,"gov-close",7);this.hydrated=false;this.open=false;this.blockClose=false;this.blockBackdropClose=false;this.role="dialog";this.labelTag="h2";this.accessibleLabelledBy=undefined;this.accessibleDescribedBy=undefined;this.accessibleCloseLabel="Zavřít okno";this.accessibleCloseLabelledBy=undefined;this.h=c(this.host);this.labelId=n("GovDialogLabel");this.contentId=n("GovDialogContent")}watchOpen(e){this.open=e;this.setFocus().finally()}showDialog(){this.open=true;document.body.classList.add(m.bodyFix)}hideDialog(){this.open=false;document.body.classList.remove(m.bodyFix)}async componentDidRender(){if(d()){h((()=>this.validateAccessibility()))}if(this.open){this.showDialog()}else{this.hideDialog()}}connectedCallback(){this.hydrated=true}disconnectedCallback(){document.body.classList.remove(m.bodyFix)}render(){return i(t,{key:"c9c05262cbe6a644f4e89fea848dccc9dea0fe21",class:this.h.classes(m.root),open:this.open,hydrated:this.hydrated},i("dialog",{key:"fc6a9ca72044ef912c324cb037e954e7ae8b7caf",class:m.dialog,hidden:!this.open,tabindex:o(this.open),open:this.open,"aria-modal":"true","aria-hidden":l(!this.open),"aria-labelledby":this.accessibleLabelledBy||this.labelId,"aria-describedby":this.accessibleDescribedBy||this.contentId,role:this.role},i("div",{key:"228a0abc31b73533418dcce1224dd9b42fd1e6cc",class:m.inner},i("div",{key:"1e9b3d475ff385b25c46540ddfd2217cba174b3a",class:m.header},i("slot",{key:"e300fed969e9156d856f9f0b1b8caf6e5dc2d6af",name:"icon"}),this.h.hasSlot("title")&&i("span",{key:"e156b2daa9c47ca45a5cc8437850d1b7ae9b4dfe",class:m.title,id:this.labelId},i("slot",{key:"afcf49f1829ded6b4d2ad99b0ee4256d3d5ed85c",name:"title"})),i("gov-button",{key:"1b07b5ba700ae96704bf16ba620e88cf8a87b4b0",ref:e=>this.closeCtaRef=e,disabled:this.blockClose,class:m.close,color:"primary","accessible-label":this.accessibleCloseLabel,"accessible-labelledby":this.accessibleCloseLabelledBy,type:"base","on-gov-click":this.onCloseHandler.bind(this)},i("gov-icon",{key:"cf7ee3fa0123ddd188d82640f3964d35b47ae9c7",slot:"left-icon",name:"x-lg"}))),i("div",{key:"1487b7df9acf942fa351fb236d29e0208416387a",class:m.content,id:this.contentId},i("slot",{key:"8b811c1cab346ae2a482e5297b53f5ffaeb9e92a"})),this.h.hasSlot("footer")&&i("div",{key:"e958768f856cec2de8a2e6c1fe1aab0c4694f0cd",class:m.footer},i("slot",{key:"bc9da8073722bb9c94a7ec295cc354b46ee09685",name:"footer"})))),this.open?i("gov-backdrop",{disabled:this.blockBackdropClose,"accessible-label":this.accessibleCloseLabel,"accessible-labelled-by":this.accessibleCloseLabelledBy,"on-gov-click":this.onCloseHandler.bind(this)}):null)}onCloseHandler(e){e.stopPropagation();e.preventDefault();if(this.blockClose===false){this.hideDialog();this.govClose.emit(e)}}async setFocus(){if(this.open&&this.closeCtaRef){this.closeCtaRef.setFocus().catch()}}async validateAccessibility(){b(this.accessibleLabelledBy,"accessible-labelled-by",m.root);b(this.accessibleDescribedBy,"accessible-described-by",m.root)}get host(){return this}static get watchers(){return{open:["watchOpen"]}}},[4,"gov-dialog",{open:[1540],blockClose:[4,"block-close"],blockBackdropClose:[4,"block-backdrop-close"],role:[1],labelTag:[1,"label-tag"],accessibleLabelledBy:[1,"accessible-labelled-by"],accessibleDescribedBy:[1,"accessible-described-by"],accessibleCloseLabel:[1,"accessible-close-label"],accessibleCloseLabelledBy:[1,"accessible-close-labelled-by"],setFocus:[64],validateAccessibility:[64]},undefined,{open:["watchOpen"]}]);function y(){if(typeof customElements==="undefined"){return}const e=["gov-dialog","gov-backdrop","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-dialog":if(!customElements.get(e)){customElements.define(e,p)}break;case"gov-backdrop":if(!customElements.get(e)){f()}break;case"gov-button":if(!customElements.get(e)){r()}break;case"gov-icon":if(!customElements.get(e)){g()}break}}))}y();const v=p;const k=y;export{v as GovDialog,k as defineCustomElement};
1
+ import{p as e,H as s,c as i,h as a,d as t}from"./p-ae3dada7.js";import{g as o,a as c,c as d}from"./p-0075138f.js";import{d as l}from"./p-7501abe8.js";import{b}from"./p-9a93146e.js";import{c as n}from"./p-95d41a3b.js";import{t as h}from"./p-26618322.js";import{d as r}from"./p-de8656dd.js";import{d as f}from"./p-dd8d3279.js";import{d as g}from"./p-a14f8877.js";const m={root:"gov-dialog",dialog:"gov-dialog__dialog",inner:"gov-dialog__inner",header:"gov-dialog__header",title:"gov-dialog__title",content:"gov-dialog__content",close:"gov-dialog__close",footer:"gov-dialog__footer",bodyFix:"body-fixed"};const p=e(class e extends s{constructor(){super();this.__registerHost();this.govClose=i(this,"gov-close",7);this.hydrated=false;this.open=false;this.blockClose=false;this.blockBackdropClose=false;this.role="dialog";this.labelTag="h2";this.accessibleLabelledBy=undefined;this.accessibleDescribedBy=undefined;this.accessibleCloseLabel="Zavřít okno";this.accessibleCloseLabelledBy=undefined;this.h=o(this.host);this.labelId=n("GovDialogLabel");this.contentId=n("GovDialogContent")}watchOpen(e){this.open=e;this.setFocus().finally()}showDialog(){this.open=true;document.body.classList.add(m.bodyFix)}hideDialog(){this.open=false;document.body.classList.remove(m.bodyFix)}async componentDidRender(){if(l()){h((()=>this.validateAccessibility()))}if(this.open){this.showDialog()}else{this.hideDialog()}}connectedCallback(){this.hydrated=true}disconnectedCallback(){document.body.classList.remove(m.bodyFix)}render(){return a(t,{key:"fe34cd83c969ab539a47c4f851231085f34b21f6",class:this.h.classes(m.root),open:this.open,hydrated:this.hydrated},a("dialog",{key:"d013f87f499635ed0d0f1cc016cc1e84410154b4",class:m.dialog,hidden:!this.open,tabindex:c(this.open),open:this.open,"aria-modal":"true","aria-hidden":d(!this.open),"aria-labelledby":this.accessibleLabelledBy||this.labelId,"aria-describedby":this.accessibleDescribedBy||this.contentId,role:this.role},a("div",{key:"6018f61d5a335583dc05a0f8cdef6c4562977558",class:m.inner},a("div",{key:"9ab56eb94d92f67291b783ec8310fec2c3da9d33",class:m.header},a("slot",{key:"b2248113ca181acbd9e0c960c4e7b13c3e114ae3",name:"icon"}),this.h.hasSlot("title")&&a("span",{key:"fce7d93f476553e3cc53c8dc987d65cb64538552",class:m.title,id:this.labelId},a("slot",{key:"b151367fda2f5f87d6de3cabbf46cacc9d427f0f",name:"title"})),a("gov-button",{key:"e3622dc8601452c2d52a5d17a611d27cd0d17e97",ref:e=>this.closeCtaRef=e,disabled:this.blockClose,class:m.close,color:"primary","aria-label":this.accessibleCloseLabel,"aria-labelledby":this.accessibleCloseLabelledBy,type:"base","on-gov-click":this.onCloseHandler.bind(this)},a("gov-icon",{key:"0e69007580b5780ccd5a85984149a21218845ef1",slot:"left-icon",name:"x-lg"}))),a("div",{key:"7183e62b1d751e8aa8101c8665470ae4677d16f9",class:m.content,id:this.contentId},a("slot",{key:"9adebaeb5be26f67d1d8078636a5bfc7d29ba4db"})),this.h.hasSlot("footer")&&a("div",{key:"37332d00f9951e5f14dad617e49167d5429d9572",class:m.footer},a("slot",{key:"d56ee64f624b01e30345c44f0bbe932fb59624f6",name:"footer"})))),this.open?a("gov-backdrop",{disabled:this.blockBackdropClose,"aria-label":this.accessibleCloseLabel,"aria-labelled-by":this.accessibleCloseLabelledBy,"on-gov-click":this.onCloseHandler.bind(this)}):null)}onCloseHandler(e){e.stopPropagation();e.preventDefault();if(this.blockClose===false){this.hideDialog();this.govClose.emit(e)}}async setFocus(){if(this.open&&this.closeCtaRef){this.closeCtaRef.setFocus().catch()}}async validateAccessibility(){b(this.accessibleLabelledBy,"accessible-labelled-by",m.root);b(this.accessibleDescribedBy,"accessible-described-by",m.root)}get host(){return this}static get watchers(){return{open:["watchOpen"]}}},[4,"gov-dialog",{open:[1540],blockClose:[4,"block-close"],blockBackdropClose:[4,"block-backdrop-close"],role:[1],labelTag:[1,"label-tag"],accessibleLabelledBy:[1,"accessible-labelled-by"],accessibleDescribedBy:[1,"accessible-described-by"],accessibleCloseLabel:[1,"accessible-close-label"],accessibleCloseLabelledBy:[1,"accessible-close-labelled-by"],setFocus:[64],validateAccessibility:[64]},undefined,{open:["watchOpen"]}]);function y(){if(typeof customElements==="undefined"){return}const e=["gov-dialog","gov-backdrop","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-dialog":if(!customElements.get(e)){customElements.define(e,p)}break;case"gov-backdrop":if(!customElements.get(e)){r()}break;case"gov-button":if(!customElements.get(e)){f()}break;case"gov-icon":if(!customElements.get(e)){g()}break}}))}y();const v=p;const k=y;export{v as GovDialog,k as defineCustomElement};
2
2
  //# sourceMappingURL=gov-dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["DialogClass","root","dialog","inner","header","title","content","close","footer","bodyFix","GovDialog","proxyCustomElement","H","constructor","this","hydrated","h","govHost","host","labelId","createID","contentId","watchOpen","newValue","open","setFocus","finally","showDialog","document","body","classList","add","hideDialog","remove","componentDidRender","canValidateWcagOnRender","tick","validateAccessibility","connectedCallback","disconnectedCallback","render","Host","key","class","classes","hidden","tabindex","boolToFocusValue","toBoolAttr","accessibleLabelledBy","accessibleDescribedBy","role","name","hasSlot","id","ref","el","closeCtaRef","disabled","blockClose","color","accessibleCloseLabel","accessibleCloseLabelledBy","type","onCloseHandler","bind","slot","blockBackdropClose","e","stopPropagation","preventDefault","govClose","emit","catch","validateWcagRef"],"sources":["../../../packages/core/src/components/gov-dialog/constants.ts","../../../packages/core/src/components/gov-dialog/gov-dialog.tsx"],"sourcesContent":["export const DialogClass = {\n\troot: 'gov-dialog',\n\tdialog: 'gov-dialog__dialog',\n\tinner: 'gov-dialog__inner',\n\theader: 'gov-dialog__header',\n\ttitle: 'gov-dialog__title',\n\tcontent: 'gov-dialog__content',\n\tclose: 'gov-dialog__close',\n\tfooter: 'gov-dialog__footer',\n\tbodyFix: 'body-fixed',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch} from '@stencil/core'\nimport {boolToFocusValue, govHost, toBoolAttr} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {validateWcagRef} from '../../helpers/Validate/wcag'\nimport {Nullable} from '../../types/interfaces'\nimport {createID} from '../../utils/string.utils'\nimport {DialogClass} from './constants'\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-dialog',\n})\nexport class GovDialog {\n\tprivate h: GovHost\n\tprivate readonly labelId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false;\n\tprivate closeCtaRef?: HTMLGovButtonElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.labelId = createID('GovDialogLabel')\n\t\tthis.contentId = createID('GovDialogContent')\n\t}\n\n\t@Element() host: HTMLGovDialogElement\n\n\t/**\n\t * Attribute for dialog window display\n\t */\n\t@Prop({mutable: true, reflect: true}) open = false\n\t/**\n\t * Attribute allowing blocking the dialog closing\n\t */\n\t@Prop({attribute: 'block-close'}) blockClose = false\n\t/**\n\t * Attribute allowing blocking the backdrop dialog closing\n\t */\n\t@Prop({attribute: 'block-backdrop-close'}) blockBackdropClose = false\n\t/**\n\t * Role of dialog\n\t */\n\t@Prop({attribute: 'role'}) role: Nullable<string> = 'dialog'\n\t/**\n\t * Used to change the HTML tag in the dialog label for correct semantic structure\n\t */\n\t@Prop({attribute: 'label-tag'}) readonly labelTag: string = 'h2'\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({attribute: 'accessible-labelled-by'}) accessibleLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the dialog.\n\t */\n\t@Prop({attribute: 'accessible-described-by'}) accessibleDescribedBy: string\n\t/**\n\t * Adds accessible label for the dialog close button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-close-label'}) readonly accessibleCloseLabel: string = 'Zavřít okno'\n\t/**\n\t * A string of identifiers that indicate alternative label elements for closing the dialog window\n\t */\n\t@Prop({attribute: 'accessible-close-labelled-by'}) accessibleCloseLabelledBy: string\n\t/**\n\t * Emitted when dialog window closes.\n\t */\n\t@Event({eventName: 'gov-close'}) govClose: EventEmitter<PointerEvent>\n\n\t@Watch('open')\n\twatchOpen(newValue: boolean): void {\n\t\tthis.open = newValue\n\t\tthis.setFocus().finally()\n\t}\n\n\tprivate showDialog() {\n\t\tthis.open = true\n\t\tdocument.body.classList.add(DialogClass.bodyFix)\n\t}\n\n\tprivate hideDialog() {\n\t\tthis.open = false\n\t\tdocument.body.classList.remove(DialogClass.bodyFix)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\ttick(() => this.validateAccessibility())\n\t\t}\n\n\t\tif (this.open) {\n\t\t\tthis.showDialog()\n\t\t} else {\n\t\t\tthis.hideDialog()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tdocument.body.classList.remove(DialogClass.bodyFix)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(DialogClass.root)} open={this.open} hydrated={this.hydrated}>\n\t\t\t\t<dialog\n\t\t\t\t\tclass={DialogClass.dialog}\n\t\t\t\t\thidden={!this.open}\n\t\t\t\t\ttabindex={boolToFocusValue(this.open)}\n\t\t\t\t\topen={this.open}\n\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\taria-hidden={toBoolAttr(!this.open)}\n\t\t\t\t\taria-labelledby={this.accessibleLabelledBy || this.labelId}\n\t\t\t\t\taria-describedby={this.accessibleDescribedBy || this.contentId}\n\t\t\t\t\trole={this.role}\n\t\t\t\t>\n\t\t\t\t\t<div class={DialogClass.inner}>\n\t\t\t\t\t\t<div class={DialogClass.header}>\n\t\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t\t\t{this.h.hasSlot('title') && (\n\t\t\t\t\t\t\t\t<span class={DialogClass.title} id={this.labelId}>\n\t\t\t\t\t\t\t\t\t<slot name=\"title\"/>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\tref={el => (this.closeCtaRef = el)}\n\t\t\t\t\t\t\t\tdisabled={this.blockClose}\n\t\t\t\t\t\t\t\tclass={DialogClass.close}\n\t\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t\taccessible-label={this.accessibleCloseLabel}\n\t\t\t\t\t\t\t\taccessible-labelledby={this.accessibleCloseLabelledBy}\n\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<gov-icon slot=\"left-icon\" name=\"x-lg\"/>\n\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={DialogClass.content} id={this.contentId}>\n\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{this.h.hasSlot('footer') && (\n\t\t\t\t\t\t\t<div class={DialogClass.footer}>\n\t\t\t\t\t\t\t\t<slot name=\"footer\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</dialog>\n\n\t\t\t\t{this.open ? (\n\t\t\t\t\t<gov-backdrop\n\t\t\t\t\t\tdisabled={this.blockBackdropClose}\n\t\t\t\t\t\taccessible-label={this.accessibleCloseLabel}\n\t\t\t\t\t\taccessible-labelled-by={this.accessibleCloseLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t\te.preventDefault()\n\t\tif (this.blockClose === false) {\n\t\t\tthis.hideDialog()\n\t\t\tthis.govClose.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Sets the close button to focus\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tif (this.open && this.closeCtaRef) {\n\t\t\tthis.closeCtaRef.setFocus().catch()\n\t\t}\n\t}\n\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateWcagRef(this.accessibleLabelledBy, 'accessible-labelled-by', DialogClass.root)\n\t\tvalidateWcagRef(this.accessibleDescribedBy, 'accessible-described-by', DialogClass.root)\n\t}\n}\n"],"mappings":"oWAAO,MAAMA,EAAc,CAC1BC,KAAM,aACNC,OAAQ,qBACRC,MAAO,oBACPC,OAAQ,qBACRC,MAAO,oBACPC,QAAS,sBACTC,MAAO,oBACPC,OAAQ,qBACRC,QAAS,c,MCIGC,EAASC,EAAA,MAAAD,UAAAE,EAOrB,WAAAC,G,kEAHQC,KAAAC,SAAW,M,UAc0B,M,gBAIE,M,wBAIiB,M,UAIZ,S,cAIQ,K,mGAYyB,c,yCAtCpFD,KAAKE,EAAIC,EAAQH,KAAKI,MACtBJ,KAAKK,QAAUC,EAAS,kBACxBN,KAAKO,UAAYD,EAAS,mB,CA+C3B,SAAAE,CAAUC,GACTT,KAAKU,KAAOD,EACZT,KAAKW,WAAWC,S,CAGT,UAAAC,GACPb,KAAKU,KAAO,KACZI,SAASC,KAAKC,UAAUC,IAAI/B,EAAYS,Q,CAGjC,UAAAuB,GACPlB,KAAKU,KAAO,MACZI,SAASC,KAAKC,UAAUG,OAAOjC,EAAYS,Q,CAG5C,wBAAMyB,GACL,GAAIC,IAA2B,CAC9BC,GAAK,IAAMtB,KAAKuB,yB,CAGjB,GAAIvB,KAAKU,KAAM,CACdV,KAAKa,Y,KACC,CACNb,KAAKkB,Y,EAIP,iBAAAM,GACCxB,KAAKC,SAAW,I,CAGjB,oBAAAwB,GACCX,SAASC,KAAKC,UAAUG,OAAOjC,EAAYS,Q,CAG5C,MAAA+B,GACC,OACCxB,EAACyB,EAAI,CAAAC,IAAA,2CAACC,MAAO7B,KAAKE,EAAE4B,QAAQ5C,EAAYC,MAAOuB,KAAMV,KAAKU,KAAMT,SAAUD,KAAKC,UAC9EC,EAAA,UAAA0B,IAAA,2CACCC,MAAO3C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,EAAEC,kBACFD,EAAEE,iBACF,GAAIxD,KAAK6C,aAAe,MAAO,CAC9B7C,KAAKkB,aACLlB,KAAKyD,SAASC,KAAKJ,E,EAQrB,cAAM3C,GACL,GAAIX,KAAKU,MAAQV,KAAK2C,YAAa,CAClC3C,KAAK2C,YAAYhC,WAAWgD,O,EAS9B,2BAAMpC,GACLqC,EAAgB5D,KAAKmC,qBAAsB,yBAA0BjD,EAAYC,MACjFyE,EAAgB5D,KAAKoC,sBAAuB,0BAA2BlD,EAAYC,K","ignoreList":[]}
1
+ {"version":3,"names":["DialogClass","root","dialog","inner","header","title","content","close","footer","bodyFix","GovDialog","proxyCustomElement","H","constructor","this","hydrated","h","govHost","host","labelId","createID","contentId","watchOpen","newValue","open","setFocus","finally","showDialog","document","body","classList","add","hideDialog","remove","componentDidRender","canValidateWcagOnRender","tick","validateAccessibility","connectedCallback","disconnectedCallback","render","Host","key","class","classes","hidden","tabindex","boolToFocusValue","toBoolAttr","accessibleLabelledBy","accessibleDescribedBy","role","name","hasSlot","id","ref","el","closeCtaRef","disabled","blockClose","color","accessibleCloseLabel","accessibleCloseLabelledBy","type","onCloseHandler","bind","slot","blockBackdropClose","e","stopPropagation","preventDefault","govClose","emit","catch","validateWcagRef"],"sources":["../../../packages/core/src/components/gov-dialog/constants.ts","../../../packages/core/src/components/gov-dialog/gov-dialog.tsx"],"sourcesContent":["export const DialogClass = {\n\troot: 'gov-dialog',\n\tdialog: 'gov-dialog__dialog',\n\tinner: 'gov-dialog__inner',\n\theader: 'gov-dialog__header',\n\ttitle: 'gov-dialog__title',\n\tcontent: 'gov-dialog__content',\n\tclose: 'gov-dialog__close',\n\tfooter: 'gov-dialog__footer',\n\tbodyFix: 'body-fixed',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch} from '@stencil/core'\nimport {boolToFocusValue, govHost, toBoolAttr} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {validateWcagRef} from '../../helpers/Validate/wcag'\nimport {Nullable} from '../../types/interfaces'\nimport {createID} from '../../utils/string.utils'\nimport {DialogClass} from './constants'\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-dialog',\n})\nexport class GovDialog {\n\tprivate h: GovHost\n\tprivate readonly labelId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false;\n\tprivate closeCtaRef?: HTMLGovButtonElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.labelId = createID('GovDialogLabel')\n\t\tthis.contentId = createID('GovDialogContent')\n\t}\n\n\t@Element() host: HTMLGovDialogElement\n\n\t/**\n\t * Attribute for dialog window display\n\t */\n\t@Prop({mutable: true, reflect: true}) open = false\n\t/**\n\t * Attribute allowing blocking the dialog closing\n\t */\n\t@Prop({attribute: 'block-close'}) blockClose = false\n\t/**\n\t * Attribute allowing blocking the backdrop dialog closing\n\t */\n\t@Prop({attribute: 'block-backdrop-close'}) blockBackdropClose = false\n\t/**\n\t * Role of dialog\n\t */\n\t@Prop({attribute: 'role'}) role: Nullable<string> = 'dialog'\n\t/**\n\t * Used to change the HTML tag in the dialog label for correct semantic structure\n\t */\n\t@Prop({attribute: 'label-tag'}) readonly labelTag: string = 'h2'\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({attribute: 'accessible-labelled-by'}) accessibleLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the dialog.\n\t */\n\t@Prop({attribute: 'accessible-described-by'}) accessibleDescribedBy: string\n\t/**\n\t * Adds accessible label for the dialog close button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-close-label'}) readonly accessibleCloseLabel: string = 'Zavřít okno'\n\t/**\n\t * A string of identifiers that indicate alternative label elements for closing the dialog window\n\t */\n\t@Prop({attribute: 'accessible-close-labelled-by'}) accessibleCloseLabelledBy: string\n\t/**\n\t * Emitted when dialog window closes.\n\t */\n\t@Event({eventName: 'gov-close'}) govClose: EventEmitter<PointerEvent>\n\n\t@Watch('open')\n\twatchOpen(newValue: boolean): void {\n\t\tthis.open = newValue\n\t\tthis.setFocus().finally()\n\t}\n\n\tprivate showDialog() {\n\t\tthis.open = true\n\t\tdocument.body.classList.add(DialogClass.bodyFix)\n\t}\n\n\tprivate hideDialog() {\n\t\tthis.open = false\n\t\tdocument.body.classList.remove(DialogClass.bodyFix)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\ttick(() => this.validateAccessibility())\n\t\t}\n\n\t\tif (this.open) {\n\t\t\tthis.showDialog()\n\t\t} else {\n\t\t\tthis.hideDialog()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tdocument.body.classList.remove(DialogClass.bodyFix)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(DialogClass.root)} open={this.open} hydrated={this.hydrated}>\n\t\t\t\t<dialog\n\t\t\t\t\tclass={DialogClass.dialog}\n\t\t\t\t\thidden={!this.open}\n\t\t\t\t\ttabindex={boolToFocusValue(this.open)}\n\t\t\t\t\topen={this.open}\n\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\taria-hidden={toBoolAttr(!this.open)}\n\t\t\t\t\taria-labelledby={this.accessibleLabelledBy || this.labelId}\n\t\t\t\t\taria-describedby={this.accessibleDescribedBy || this.contentId}\n\t\t\t\t\trole={this.role}\n\t\t\t\t>\n\t\t\t\t\t<div class={DialogClass.inner}>\n\t\t\t\t\t\t<div class={DialogClass.header}>\n\t\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t\t\t{this.h.hasSlot('title') && (\n\t\t\t\t\t\t\t\t<span class={DialogClass.title} id={this.labelId}>\n\t\t\t\t\t\t\t\t\t<slot name=\"title\"/>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\tref={el => (this.closeCtaRef = el)}\n\t\t\t\t\t\t\t\tdisabled={this.blockClose}\n\t\t\t\t\t\t\t\tclass={DialogClass.close}\n\t\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t\taria-label={this.accessibleCloseLabel}\n\t\t\t\t\t\t\t\taria-labelledby={this.accessibleCloseLabelledBy}\n\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<gov-icon slot=\"left-icon\" name=\"x-lg\"/>\n\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={DialogClass.content} id={this.contentId}>\n\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{this.h.hasSlot('footer') && (\n\t\t\t\t\t\t\t<div class={DialogClass.footer}>\n\t\t\t\t\t\t\t\t<slot name=\"footer\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</dialog>\n\n\t\t\t\t{this.open ? (\n\t\t\t\t\t<gov-backdrop\n\t\t\t\t\t\tdisabled={this.blockBackdropClose}\n\t\t\t\t\t\taria-label={this.accessibleCloseLabel}\n\t\t\t\t\t\taria-labelled-by={this.accessibleCloseLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t\te.preventDefault()\n\t\tif (this.blockClose === false) {\n\t\t\tthis.hideDialog()\n\t\t\tthis.govClose.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Sets the close button to focus\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tif (this.open && this.closeCtaRef) {\n\t\t\tthis.closeCtaRef.setFocus().catch()\n\t\t}\n\t}\n\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateWcagRef(this.accessibleLabelledBy, 'accessible-labelled-by', DialogClass.root)\n\t\tvalidateWcagRef(this.accessibleDescribedBy, 'accessible-described-by', DialogClass.root)\n\t}\n}\n"],"mappings":"yWAAO,MAAMA,EAAc,CAC1BC,KAAM,aACNC,OAAQ,qBACRC,MAAO,oBACPC,OAAQ,qBACRC,MAAO,oBACPC,QAAS,sBACTC,MAAO,oBACPC,OAAQ,qBACRC,QAAS,c,MCIGC,EAASC,EAAA,MAAAD,UAAAE,EAOrB,WAAAC,G,kEAHQC,KAAAC,SAAW,M,UAc0B,M,gBAIE,M,wBAIiB,M,UAIZ,S,cAIQ,K,mGAYyB,c,yCAtCpFD,KAAKE,EAAIC,EAAQH,KAAKI,MACtBJ,KAAKK,QAAUC,EAAS,kBACxBN,KAAKO,UAAYD,EAAS,mB,CA+C3B,SAAAE,CAAUC,GACTT,KAAKU,KAAOD,EACZT,KAAKW,WAAWC,S,CAGT,UAAAC,GACPb,KAAKU,KAAO,KACZI,SAASC,KAAKC,UAAUC,IAAI/B,EAAYS,Q,CAGjC,UAAAuB,GACPlB,KAAKU,KAAO,MACZI,SAASC,KAAKC,UAAUG,OAAOjC,EAAYS,Q,CAG5C,wBAAMyB,GACL,GAAIC,IAA2B,CAC9BC,GAAK,IAAMtB,KAAKuB,yB,CAGjB,GAAIvB,KAAKU,KAAM,CACdV,KAAKa,Y,KACC,CACNb,KAAKkB,Y,EAIP,iBAAAM,GACCxB,KAAKC,SAAW,I,CAGjB,oBAAAwB,GACCX,SAASC,KAAKC,UAAUG,OAAOjC,EAAYS,Q,CAG5C,MAAA+B,GACC,OACCxB,EAACyB,EAAI,CAAAC,IAAA,2CAACC,MAAO7B,KAAKE,EAAE4B,QAAQ5C,EAAYC,MAAOuB,KAAMV,KAAKU,KA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KAAKkD,eAAeC,KAAKnD,QAErC,K,CAKC,cAAAkD,CAAeI,GACtBA,EAAEC,kBACFD,EAAEE,iBACF,GAAIxD,KAAK6C,aAAe,MAAO,CAC9B7C,KAAKkB,aACLlB,KAAKyD,SAASC,KAAKJ,E,EAQrB,cAAM3C,GACL,GAAIX,KAAKU,MAAQV,KAAK2C,YAAa,CAClC3C,KAAK2C,YAAYhC,WAAWgD,O,EAS9B,2BAAMpC,GACLqC,EAAgB5D,KAAKmC,qBAAsB,yBAA0BjD,EAAYC,MACjFyE,EAAgB5D,KAAKoC,sBAAuB,0BAA2BlD,EAAYC,K","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,c as i,h as s,d as o}from"./p-ae3dada7.js";import"./p-bfce6f99.js";import{g as n,c as r}from"./p-0075138f.js";import{c as a}from"./p-95d41a3b.js";import{B as c}from"./p-08621bdf.js";const h={triggerEvents:"click",exclude:""};function d(t,e,i,s=h){const o=u(s);l(s).forEach((s=>{window.addEventListener(s,(s=>{f(s,t,e,i,o)}),false)}))}function f(t,e,i,s,o){const n=t.target;if(!i.contains(n)&&!p(n,o)){s.call(e)}}function l(t){if(t.triggerEvents){return t.triggerEvents.split(",").map((t=>t.trim()))}return["click"]}function u(t){if(t.exclude){try{return Array.from(document.querySelectorAll(t.exclude))}catch(e){console.warn(`@ClickOutside: Exclude: '${t.exclude}' will not be evaluated. Check your exclude selector syntax.`,e)}}return}function p(t,e){if(t&&e){for(let i of e){if(i.contains(t)){return true}}}return false}var g;(function(t){t["LEFT"]="left";t["RIGHT"]="right"})(g||(g={}));const m={root:"gov-dropdown",list:"gov-dropdown__list"};const v=t(class t extends e{constructor(){super();this.__registerHost();this.govChange=i(this,"gov-change",7);this.identifier=undefined;this.open=false;this.position=g.LEFT;this.h=n(this.host);this.listId=a("GovDropdownList");this.controlId=a("GovDropdownControl")}watchOpen(){var t;(t=this.trigger)===null||t===void 0?void 0:t.setAttribute("aria-expanded",r(this.open))}get trigger(){return this.host.querySelector(`* > ${c.root}`)}get list(){return this.h.getSlot("list")}componentWillLoad(){var t;if(!this.trigger)return;this.trigger.setAttribute("aria-controls",this.listId);this.trigger.setAttribute("aria-haspopup",r(!!this.list));this.trigger.setAttribute("aria-expanded",r(this.open));this.trigger.setAttribute("identifier",(t=this.identifier)!==null&&t!==void 0?t:this.controlId);this.trigger.addEventListener("gov-click",(t=>{t.preventDefault();t.stopPropagation();this.open=!this.open;this.govChange.emit({component:m.root,originalEvent:t,open:this.open})}))}render(){return s(o,{key:"ee6eaf511c26f189e161ac9d13c26e8dbc5a3ac7",class:this.h.classes([m.root]),open:this.open,position:this.position},s("slot",{key:"964f39a16b89cebb8fdaab7025ff63a0298f1a8c"}),s("div",{key:"344a7f2b55a7e4fa9ee92777276e65057bcf025d",ref:t=>d(this,t,(()=>this.open=false)),class:m.list,id:this.listId,"aria-labelledby":this.controlId,"aria-hidden":r(!this.open),hidden:!this.open},s("slot",{key:"54ee18b9f2ec257708d21fe7fa1c3b2ff1827824",name:"list"})))}async getState(){return this.open}async toggle(){this.open=!this.open}get host(){return this}static get watchers(){return{open:["watchOpen"]}}},[4,"gov-dropdown",{identifier:[1],open:[1028],position:[1],getState:[64],toggle:[64]},undefined,{open:["watchOpen"]}]);function b(){if(typeof customElements==="undefined"){return}const t=["gov-dropdown"];t.forEach((t=>{switch(t){case"gov-dropdown":if(!customElements.get(t)){customElements.define(t,v)}break}}))}b();const w=v;const y=b;export{w as GovDropdown,y as defineCustomElement};
1
+ import{p as t,H as e,c as i,h as s,d as o}from"./p-ae3dada7.js";import"./p-bfce6f99.js";import{g as n,c as r}from"./p-0075138f.js";import{c}from"./p-95d41a3b.js";import{B as a}from"./p-08621bdf.js";const d={triggerEvents:"click",exclude:""};function h(t,e,i,s=d){const o=u(s);l(s).forEach((s=>{window.addEventListener(s,(s=>{f(s,t,e,i,o)}),false)}))}function f(t,e,i,s,o){const n=t.target;if(!i.contains(n)&&!p(n,o)){s.call(e)}}function l(t){if(t.triggerEvents){return t.triggerEvents.split(",").map((t=>t.trim()))}return["click"]}function u(t){if(t.exclude){try{return Array.from(document.querySelectorAll(t.exclude))}catch(e){console.warn(`@ClickOutside: Exclude: '${t.exclude}' will not be evaluated. Check your exclude selector syntax.`,e)}}return}function p(t,e){if(t&&e){for(let i of e){if(i.contains(t)){return true}}}return false}var g;(function(t){t["LEFT"]="left";t["RIGHT"]="right"})(g||(g={}));const m={root:"gov-dropdown",list:"gov-dropdown__list"};const v=t(class t extends e{constructor(){super();this.__registerHost();this.govChange=i(this,"gov-change",7);this.identifier=undefined;this.open=false;this.position=g.LEFT;this.h=n(this.host);this.listId=c("GovDropdownList");this.controlId=c("GovDropdownControl")}watchOpen(){var t;(t=this.trigger)===null||t===void 0?void 0:t.setAttribute("aria-expanded",r(this.open))}get trigger(){return this.host.querySelector(`* > ${a.root}`)}get list(){return this.h.getSlot("list")}componentWillLoad(){var t;if(!this.trigger)return;this.trigger.setAttribute("aria-controls",this.listId);this.trigger.setAttribute("aria-haspopup",r(!!this.list));this.trigger.setAttribute("aria-expanded",r(this.open));this.trigger.setAttribute("identifier",(t=this.identifier)!==null&&t!==void 0?t:this.controlId);this.trigger.addEventListener("gov-click",(t=>{t.preventDefault();t.stopPropagation();this.open=!this.open;this.govChange.emit({component:m.root,originalEvent:t,open:this.open})}))}render(){return s(o,{key:"43c2a03dcb27ebe54f8dd00ca1120b848cac957c",class:this.h.classes([m.root]),open:this.open,position:this.position},s("slot",{key:"732c956fe37283578a95c843cf94ad590cd16402"}),s("div",{key:"c3934a0f7c8303950a5c7898574fcea2e14e1890",ref:t=>h(this,t,(()=>this.open=false)),class:m.list,id:this.listId,"aria-labelledby":this.controlId,"aria-hidden":r(!this.open),hidden:!this.open},s("slot",{key:"cb685039c57f9d32ae7c238fcb7457fe72b4c9c4",name:"list"})))}async getState(){return this.open}async toggle(){this.open=!this.open}get host(){return this}static get watchers(){return{open:["watchOpen"]}}},[4,"gov-dropdown",{identifier:[1],open:[1028],position:[1],getState:[64],toggle:[64]},undefined,{open:["watchOpen"]}]);function w(){if(typeof customElements==="undefined"){return}const t=["gov-dropdown"];t.forEach((t=>{switch(t){case"gov-dropdown":if(!customElements.get(t)){customElements.define(t,v)}break}}))}w();const b=v;const y=w;export{b as GovDropdown,y as defineCustomElement};
2
2
  //# sourceMappingURL=gov-dropdown.js.map