@gov-design-system-ce/components 4.6.5-b → 4.6.5

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 (744) hide show
  1. package/dist/cjs/gov-flex_3.cjs.entry.js +1 -1
  2. package/dist/components/gov-accordion-item.js +1 -1
  3. package/dist/components/gov-attachments-item.js +1 -1
  4. package/dist/components/gov-blockquote.js +1 -1
  5. package/dist/components/gov-breadcrumbs.js +1 -1
  6. package/dist/components/gov-button.js +1 -1
  7. package/dist/components/gov-card.js +1 -1
  8. package/dist/components/gov-chip.js +1 -1
  9. package/dist/components/gov-collapsible.js +1 -1
  10. package/dist/components/gov-dialog.js +1 -1
  11. package/dist/components/gov-form-autocomplete.js +1 -1
  12. package/dist/components/gov-form-checkbox.js +1 -1
  13. package/dist/components/gov-form-file.js +1 -1
  14. package/dist/components/gov-form-input.js +1 -1
  15. package/dist/components/gov-form-multi-select.js +1 -1
  16. package/dist/components/gov-form-range.js +1 -1
  17. package/dist/components/gov-form-select.js +1 -1
  18. package/dist/components/gov-form-switch.js +1 -1
  19. package/dist/components/gov-icon.js +1 -1
  20. package/dist/components/gov-infobar.js +1 -1
  21. package/dist/components/gov-link.js +1 -1
  22. package/dist/components/gov-loading.js +1 -1
  23. package/dist/components/gov-pagination.js +1 -1
  24. package/dist/components/gov-tabs.js +1 -1
  25. package/dist/components/gov-tag.js +1 -1
  26. package/dist/components/gov-theme-switch.js +1 -1
  27. package/dist/components/gov-tile.js +1 -1
  28. package/dist/components/gov-toast.js +1 -1
  29. package/dist/components/gov-tooltip-content.js +1 -1
  30. package/dist/components/gov-wizard-item.js +1 -1
  31. package/dist/components/{p-isPjiQbr.js → p-BIB-JMbL.js} +2 -2
  32. package/dist/components/{p-BICk4EuO.js → p-BVG9PtuQ.js} +2 -2
  33. package/dist/components/{p-DmK9qaKH.js → p-DV0Pdd1S.js} +2 -2
  34. package/dist/components/p-Dj-FiQ37.js +2 -0
  35. package/dist/components/{p-DRXiDAHW.js.map → p-Dj-FiQ37.js.map} +1 -1
  36. package/dist/components/{p-DjGO_trZ.js → p-DlpZtTcv.js} +2 -2
  37. package/dist/components/{p-BNoNH6m-.js → p-Dw1o8KoZ.js} +2 -2
  38. package/dist/components/{p-BGK46VRO.js → p-NU_8kxGz.js} +2 -2
  39. package/dist/components/{p-ClDhNt_H.js → p-o4vVG5sG.js} +2 -2
  40. package/dist/core/core.css +14776 -0
  41. package/dist/core/core.esm.js +1 -1
  42. package/dist/core/core.esm.js.map +1 -1
  43. package/dist/core/gov-accordion-item.entry.esm.js.map +1 -0
  44. package/dist/core/gov-accordion.entry.esm.js.map +1 -0
  45. package/dist/core/gov-attachments.gov-attachments-item.gov-form-message.entry.esm.js.map +1 -0
  46. package/dist/core/gov-backdrop.entry.esm.js.map +1 -0
  47. package/dist/core/gov-banner.entry.esm.js.map +1 -0
  48. package/dist/core/gov-blockquote.entry.esm.js.map +1 -0
  49. package/dist/core/gov-breadcrumbs.entry.esm.js.map +1 -0
  50. package/dist/core/gov-button.entry.esm.js.map +1 -0
  51. package/dist/core/gov-card.entry.esm.js.map +1 -0
  52. package/dist/core/gov-chip.entry.esm.js.map +1 -0
  53. package/dist/core/gov-collapsible.entry.esm.js.map +1 -0
  54. package/dist/core/gov-container.entry.esm.js.map +1 -0
  55. package/dist/core/gov-control-group.entry.esm.js.map +1 -0
  56. package/dist/core/gov-cookiebar.entry.esm.js.map +1 -0
  57. package/dist/core/gov-dialog.entry.esm.js.map +1 -0
  58. package/dist/core/gov-dropdown.entry.esm.js.map +1 -0
  59. package/dist/core/gov-empty.entry.esm.js.map +1 -0
  60. package/dist/core/gov-error-code.entry.esm.js.map +1 -0
  61. package/dist/core/gov-flex.gov-icon.gov-theme-switch.entry.esm.js.map +1 -0
  62. package/dist/core/gov-form-autocomplete.entry.esm.js.map +1 -0
  63. package/dist/core/gov-form-checkbox-group.entry.esm.js.map +1 -0
  64. package/dist/core/gov-form-checkbox.entry.esm.js.map +1 -0
  65. package/dist/core/gov-form-control.entry.esm.js.map +1 -0
  66. package/dist/core/gov-form-file.entry.esm.js.map +1 -0
  67. package/dist/core/gov-form-group.entry.esm.js.map +1 -0
  68. package/dist/core/gov-form-input.gov-skeleton.entry.esm.js.map +1 -0
  69. package/dist/core/gov-form-label.entry.esm.js.map +1 -0
  70. package/dist/core/gov-form-multi-select.entry.esm.js.map +1 -0
  71. package/dist/core/gov-form-password-power.entry.esm.js.map +1 -0
  72. package/dist/core/gov-form-radio-group.entry.esm.js.map +1 -0
  73. package/dist/core/gov-form-radio.entry.esm.js.map +1 -0
  74. package/dist/core/gov-form-range.entry.esm.js.map +1 -0
  75. package/dist/core/gov-form-search.entry.esm.js.map +1 -0
  76. package/dist/core/gov-form-select.entry.esm.js.map +1 -0
  77. package/dist/core/gov-form-switch.entry.esm.js.map +1 -0
  78. package/dist/core/gov-grid-item.entry.esm.js.map +1 -0
  79. package/dist/core/gov-grid.entry.esm.js.map +1 -0
  80. package/dist/core/gov-infobar.entry.esm.js.map +1 -0
  81. package/dist/core/gov-layout-column.entry.esm.js.map +1 -0
  82. package/dist/core/gov-layout.entry.esm.js.map +1 -0
  83. package/dist/core/gov-lifecycle.entry.esm.js.map +1 -0
  84. package/dist/core/gov-link.entry.esm.js.map +1 -0
  85. package/dist/core/gov-loading.entry.esm.js.map +1 -0
  86. package/dist/core/gov-message.entry.esm.js.map +1 -0
  87. package/dist/core/gov-pagination.entry.esm.js.map +1 -0
  88. package/dist/core/gov-spacer.entry.esm.js.map +1 -0
  89. package/dist/core/gov-stepper-item.entry.esm.js.map +1 -0
  90. package/dist/core/gov-stepper.entry.esm.js.map +1 -0
  91. package/dist/core/gov-tabs-item.entry.esm.js.map +1 -0
  92. package/dist/core/gov-tabs.entry.esm.js.map +1 -0
  93. package/dist/core/gov-tag.entry.esm.js.map +1 -0
  94. package/dist/core/gov-tile.entry.esm.js.map +1 -0
  95. package/dist/core/gov-toast.entry.esm.js.map +1 -0
  96. package/dist/core/gov-tooltip.gov-tooltip-content.entry.esm.js.map +1 -0
  97. package/dist/core/gov-wizard-item.entry.esm.js.map +1 -0
  98. package/dist/core/gov-wizard.entry.esm.js.map +1 -0
  99. package/dist/core/loader.esm.js.map +1 -0
  100. package/dist/core/p-002e72bf.entry.js +2 -0
  101. package/dist/core/{p-41bef63a.entry.js.map → p-002e72bf.entry.js.map} +1 -1
  102. package/dist/core/{p-49b67f59.entry.js → p-04ec45ab.entry.js} +2 -2
  103. package/dist/core/{p-49b67f59.entry.js.map → p-04ec45ab.entry.js.map} +1 -1
  104. package/dist/core/{p-6b0625ee.entry.js → p-0af96cc0.entry.js} +2 -2
  105. package/dist/core/{p-6b0625ee.entry.js.map → p-0af96cc0.entry.js.map} +1 -1
  106. package/dist/core/{p-de5dfd70.entry.js → p-10991f00.entry.js} +2 -2
  107. package/dist/core/{p-de5dfd70.entry.js.map → p-10991f00.entry.js.map} +1 -1
  108. package/dist/core/{p-4e534d68.entry.js → p-157a1636.entry.js} +2 -2
  109. package/dist/core/{p-4e534d68.entry.js.map → p-157a1636.entry.js.map} +1 -1
  110. package/dist/core/{p-30ad7514.entry.js → p-1626cc67.entry.js} +2 -2
  111. package/dist/core/{p-30ad7514.entry.js.map → p-1626cc67.entry.js.map} +1 -1
  112. package/dist/core/{p-9321fb9d.entry.js → p-187c0eda.entry.js} +2 -2
  113. package/dist/core/{p-9321fb9d.entry.js.map → p-187c0eda.entry.js.map} +1 -1
  114. package/dist/core/{p-b77c283e.entry.js → p-19300834.entry.js} +2 -2
  115. package/dist/core/{p-b77c283e.entry.js.map → p-19300834.entry.js.map} +1 -1
  116. package/dist/core/{p-00ab0454.entry.js → p-3314505d.entry.js} +2 -2
  117. package/dist/core/{p-00ab0454.entry.js.map → p-3314505d.entry.js.map} +1 -1
  118. package/dist/core/p-33209782.entry.js +2 -0
  119. package/dist/core/{p-943a58b2.entry.js.map → p-33209782.entry.js.map} +1 -1
  120. package/dist/core/{p-e913cfc8.entry.js → p-3e07bf07.entry.js} +2 -2
  121. package/dist/core/{p-dc0bd1e5.entry.js.map → p-3e07bf07.entry.js.map} +1 -1
  122. package/dist/core/{p-dfb76a14.entry.js → p-441e67f6.entry.js} +2 -2
  123. package/dist/core/{p-dfb76a14.entry.js.map → p-441e67f6.entry.js.map} +1 -1
  124. package/dist/core/{p-68a5d225.entry.js → p-46824842.entry.js} +2 -2
  125. package/dist/core/{p-68a5d225.entry.js.map → p-46824842.entry.js.map} +1 -1
  126. package/dist/core/{p-c9b2f97c.entry.js → p-4c02094d.entry.js} +2 -2
  127. package/dist/core/{p-c9b2f97c.entry.js.map → p-4c02094d.entry.js.map} +1 -1
  128. package/dist/core/{p-2493a7f3.entry.js → p-4d36cd18.entry.js} +2 -2
  129. package/dist/core/{p-2493a7f3.entry.js.map → p-4d36cd18.entry.js.map} +1 -1
  130. package/dist/core/{p-f2d24551.entry.js → p-4d902f20.entry.js} +2 -2
  131. package/dist/core/{p-f2d24551.entry.js.map → p-4d902f20.entry.js.map} +1 -1
  132. package/dist/core/{p-4342c252.entry.js → p-4e2faea7.entry.js} +2 -2
  133. package/dist/core/{p-4342c252.entry.js.map → p-4e2faea7.entry.js.map} +1 -1
  134. package/dist/core/{p-a6f27583.entry.js → p-511eed88.entry.js} +2 -2
  135. package/dist/core/{p-a6f27583.entry.js.map → p-511eed88.entry.js.map} +1 -1
  136. package/dist/core/{p-b2648255.entry.js → p-5305e82e.entry.js} +2 -2
  137. package/dist/core/{p-b2648255.entry.js.map → p-5305e82e.entry.js.map} +1 -1
  138. package/dist/core/{p-378cf8de.entry.js → p-558e75a6.entry.js} +2 -2
  139. package/dist/core/{p-378cf8de.entry.js.map → p-558e75a6.entry.js.map} +1 -1
  140. package/dist/core/{p-48b74272.entry.js → p-5721cf9b.entry.js} +2 -2
  141. package/dist/core/{p-48b74272.entry.js.map → p-5721cf9b.entry.js.map} +1 -1
  142. package/dist/core/p-57ca8ac7.entry.js +2 -0
  143. package/dist/core/{p-b181f85f.entry.js.map → p-57ca8ac7.entry.js.map} +1 -1
  144. package/dist/core/{p-f515d912.entry.js → p-5c872d64.entry.js} +2 -2
  145. package/dist/core/{p-b37bd421.entry.js → p-65a09763.entry.js} +2 -2
  146. package/dist/core/{p-b37bd421.entry.js.map → p-65a09763.entry.js.map} +1 -1
  147. package/dist/core/{p-4bd3f101.entry.js → p-6b44890d.entry.js} +2 -2
  148. package/dist/core/{p-4bd3f101.entry.js.map → p-6b44890d.entry.js.map} +1 -1
  149. package/dist/core/{p-ab367b0c.entry.js → p-6d2ce4c7.entry.js} +2 -2
  150. package/dist/core/{p-ab367b0c.entry.js.map → p-6d2ce4c7.entry.js.map} +1 -1
  151. package/dist/core/{p-b0d4d6bd.entry.js → p-70b5555f.entry.js} +2 -2
  152. package/dist/core/{p-b0d4d6bd.entry.js.map → p-70b5555f.entry.js.map} +1 -1
  153. package/dist/core/p-73bd93f9.entry.js +2 -0
  154. package/dist/core/{p-6638d034.entry.js.map → p-73bd93f9.entry.js.map} +1 -1
  155. package/dist/core/{p-bb5b9ccd.entry.js → p-7f513718.entry.js} +2 -2
  156. package/dist/core/{p-bb5b9ccd.entry.js.map → p-7f513718.entry.js.map} +1 -1
  157. package/dist/core/{p-eff8ffff.entry.js → p-852310d9.entry.js} +2 -2
  158. package/dist/core/{p-eff8ffff.entry.js.map → p-852310d9.entry.js.map} +1 -1
  159. package/dist/core/{p-6ac9b0f2.entry.js → p-8d47e346.entry.js} +2 -2
  160. package/dist/core/{p-6ac9b0f2.entry.js.map → p-8d47e346.entry.js.map} +1 -1
  161. package/dist/core/p-90ab65b4.entry.js +2 -0
  162. package/dist/core/{p-e913cfc8.entry.js.map → p-90ab65b4.entry.js.map} +1 -1
  163. package/dist/core/{p-b5e40f40.entry.js → p-91cbee1b.entry.js} +2 -2
  164. package/dist/core/{p-b5e40f40.entry.js.map → p-91cbee1b.entry.js.map} +1 -1
  165. package/dist/core/{p-05bb35e1.entry.js → p-9d9e9401.entry.js} +2 -2
  166. package/dist/core/{p-05bb35e1.entry.js.map → p-9d9e9401.entry.js.map} +1 -1
  167. package/dist/core/p-B6CqPcY_.js.map +1 -1
  168. package/dist/core/p-BUmDydor.js.map +1 -1
  169. package/dist/core/p-BcQO4NH2.js.map +1 -1
  170. package/dist/core/p-BjcqOprh.js.map +1 -1
  171. package/dist/core/p-Bo1ROm5Q.js.map +1 -1
  172. package/dist/core/p-Bz_RzYFb.js.map +1 -1
  173. package/dist/core/p-C3R1T_pg.js.map +1 -1
  174. package/dist/core/p-C6JN9gdb.js.map +1 -1
  175. package/dist/core/p-CDIRBJsi.js.map +1 -1
  176. package/dist/core/p-CQvUntGY.js.map +1 -1
  177. package/dist/core/p-Ccwpa1ck.js.map +1 -1
  178. package/dist/core/p-CgDnDrq5.js.map +1 -1
  179. package/dist/core/p-Cjg0wpDG.js.map +1 -1
  180. package/dist/core/p-ClISz4NF.js +3 -0
  181. package/dist/core/p-ClISz4NF.js.map +1 -0
  182. package/dist/core/p-CoD1xawt.js.map +1 -1
  183. package/dist/core/p-Cx3bEC5v.js.map +1 -1
  184. package/dist/core/p-D4TGB274.js.map +1 -1
  185. package/dist/core/p-DBXGhafv.js.map +1 -1
  186. package/dist/core/p-DNztiAH0.js.map +1 -1
  187. package/dist/core/p-DQuL1Twl.js.map +1 -1
  188. package/dist/core/p-DYcNEwSZ.js.map +1 -1
  189. package/dist/core/p-EeKNA85D.js.map +1 -1
  190. package/dist/core/p-GYov8gU1.js.map +1 -1
  191. package/dist/core/p-NOJjz9dT.js.map +1 -1
  192. package/dist/core/p-Q99QrOoi.js.map +1 -1
  193. package/dist/core/p-U40vKHrs.js.map +1 -1
  194. package/dist/core/{p-ad9227b3.entry.js → p-a2c61d50.entry.js} +2 -2
  195. package/dist/core/{p-ad9227b3.entry.js.map → p-a2c61d50.entry.js.map} +1 -1
  196. package/dist/core/p-abb7780e.entry.js +2 -0
  197. package/dist/core/{p-a7c322a7.entry.js.map → p-abb7780e.entry.js.map} +1 -1
  198. package/dist/core/p-bd2df430.entry.js +2 -0
  199. package/dist/core/{p-2e15a654.entry.js.map → p-bd2df430.entry.js.map} +1 -1
  200. package/dist/core/{p-3a4799b3.entry.js → p-be9af807.entry.js} +2 -2
  201. package/dist/core/{p-3a4799b3.entry.js.map → p-be9af807.entry.js.map} +1 -1
  202. package/dist/core/{p-febff4d1.entry.js → p-bf573a56.entry.js} +2 -2
  203. package/dist/core/{p-febff4d1.entry.js.map → p-bf573a56.entry.js.map} +1 -1
  204. package/dist/core/{p-473afd7d.entry.js → p-c1b9f1ab.entry.js} +2 -2
  205. package/dist/core/{p-473afd7d.entry.js.map → p-c1b9f1ab.entry.js.map} +1 -1
  206. package/dist/core/p-c4734357.entry.js +2 -0
  207. package/dist/core/{p-a4fa2ffc.entry.js.map → p-c4734357.entry.js.map} +1 -1
  208. package/dist/core/{p-ac81cdf6.entry.js → p-c6b55c0a.entry.js} +2 -2
  209. package/dist/core/{p-ac81cdf6.entry.js.map → p-c6b55c0a.entry.js.map} +1 -1
  210. package/dist/core/{p-e17def2b.entry.js → p-cd163299.entry.js} +2 -2
  211. package/dist/core/{p-e17def2b.entry.js.map → p-cd163299.entry.js.map} +1 -1
  212. package/dist/core/{p-8ddb6dc6.entry.js → p-d43959a0.entry.js} +2 -2
  213. package/dist/core/{p-8ddb6dc6.entry.js.map → p-d43959a0.entry.js.map} +1 -1
  214. package/dist/core/{p-90cc2ddb.entry.js → p-d9c574f0.entry.js} +2 -2
  215. package/dist/core/{p-90cc2ddb.entry.js.map → p-d9c574f0.entry.js.map} +1 -1
  216. package/dist/core/{p-af2bd9d3.entry.js → p-d9d29f50.entry.js} +2 -2
  217. package/dist/core/{p-af2bd9d3.entry.js.map → p-d9d29f50.entry.js.map} +1 -1
  218. package/dist/core/{p-ea299832.entry.js → p-da997fb3.entry.js} +2 -2
  219. package/dist/core/{p-ea299832.entry.js.map → p-da997fb3.entry.js.map} +1 -1
  220. package/dist/core/{p-dd390459.entry.js → p-db860031.entry.js} +2 -2
  221. package/dist/core/{p-dd390459.entry.js.map → p-db860031.entry.js.map} +1 -1
  222. package/dist/core/{p-06497d64.entry.js → p-e30968b3.entry.js} +2 -2
  223. package/dist/core/{p-06497d64.entry.js.map → p-e30968b3.entry.js.map} +1 -1
  224. package/dist/core/{p-e1d58751.entry.js → p-e39e5dc7.entry.js} +2 -2
  225. package/dist/core/{p-e1d58751.entry.js.map → p-e39e5dc7.entry.js.map} +1 -1
  226. package/dist/core/{p-caf817d4.entry.js → p-eb3f6808.entry.js} +2 -2
  227. package/dist/core/{p-caf817d4.entry.js.map → p-eb3f6808.entry.js.map} +1 -1
  228. package/dist/core/{p-80052953.entry.js → p-eb766437.entry.js} +2 -2
  229. package/dist/core/{p-80052953.entry.js.map → p-eb766437.entry.js.map} +1 -1
  230. package/dist/core/{p-91d5df66.entry.js → p-f3887d6d.entry.js} +2 -2
  231. package/dist/core/{p-91d5df66.entry.js.map → p-f3887d6d.entry.js.map} +1 -1
  232. package/dist/core/{p-78202a44.entry.js → p-f75ad657.entry.js} +2 -2
  233. package/dist/core/{p-78202a44.entry.js.map → p-f75ad657.entry.js.map} +1 -1
  234. package/dist/core/{p-3ebbe75a.entry.js → p-f7bdb44a.entry.js} +2 -2
  235. package/dist/core/{p-3ebbe75a.entry.js.map → p-f7bdb44a.entry.js.map} +1 -1
  236. package/dist/core/p-fca7a0d6.entry.js +2 -0
  237. package/dist/core/{p-0675617d.entry.js.map → p-fca7a0d6.entry.js.map} +1 -1
  238. package/dist/core/p-vN03FcXN.js.map +1 -1
  239. package/dist/dist/components/gov-accordion-item.d.ts +11 -0
  240. package/dist/dist/components/gov-accordion.d.ts +11 -0
  241. package/dist/dist/components/gov-attachments-item.d.ts +11 -0
  242. package/dist/dist/components/gov-attachments.d.ts +11 -0
  243. package/dist/dist/components/gov-backdrop.d.ts +11 -0
  244. package/dist/dist/components/gov-banner.d.ts +11 -0
  245. package/dist/dist/components/gov-blockquote.d.ts +11 -0
  246. package/dist/dist/components/gov-breadcrumbs.d.ts +11 -0
  247. package/dist/dist/components/gov-button.d.ts +11 -0
  248. package/dist/dist/components/gov-card.d.ts +11 -0
  249. package/dist/dist/components/gov-chip.d.ts +11 -0
  250. package/dist/dist/components/gov-collapsible.d.ts +11 -0
  251. package/dist/dist/components/gov-container.d.ts +11 -0
  252. package/dist/dist/components/gov-control-group.d.ts +11 -0
  253. package/dist/dist/components/gov-cookiebar.d.ts +11 -0
  254. package/dist/dist/components/gov-dialog.d.ts +11 -0
  255. package/dist/dist/components/gov-dropdown.d.ts +11 -0
  256. package/dist/dist/components/gov-empty.d.ts +11 -0
  257. package/dist/dist/components/gov-error-code.d.ts +11 -0
  258. package/dist/dist/components/gov-flex.d.ts +11 -0
  259. package/dist/dist/components/gov-form-autocomplete.d.ts +11 -0
  260. package/dist/dist/components/gov-form-checkbox-group.d.ts +11 -0
  261. package/dist/dist/components/gov-form-checkbox.d.ts +11 -0
  262. package/dist/dist/components/gov-form-control.d.ts +11 -0
  263. package/dist/dist/components/gov-form-file.d.ts +11 -0
  264. package/dist/dist/components/gov-form-group.d.ts +11 -0
  265. package/dist/dist/components/gov-form-input.d.ts +11 -0
  266. package/dist/dist/components/gov-form-label.d.ts +11 -0
  267. package/dist/dist/components/gov-form-message.d.ts +11 -0
  268. package/dist/dist/components/gov-form-multi-select.d.ts +11 -0
  269. package/dist/dist/components/gov-form-password-power.d.ts +11 -0
  270. package/dist/dist/components/gov-form-radio-group.d.ts +11 -0
  271. package/dist/dist/components/gov-form-radio.d.ts +11 -0
  272. package/dist/dist/components/gov-form-range.d.ts +11 -0
  273. package/dist/dist/components/gov-form-search.d.ts +11 -0
  274. package/dist/dist/components/gov-form-select.d.ts +11 -0
  275. package/dist/dist/components/gov-form-switch.d.ts +11 -0
  276. package/dist/dist/components/gov-grid-item.d.ts +11 -0
  277. package/dist/dist/components/gov-grid.d.ts +11 -0
  278. package/dist/dist/components/gov-icon.d.ts +11 -0
  279. package/dist/dist/components/gov-infobar.d.ts +11 -0
  280. package/dist/dist/components/gov-layout-column.d.ts +11 -0
  281. package/dist/dist/components/gov-layout.d.ts +11 -0
  282. package/dist/dist/components/gov-lifecycle.d.ts +11 -0
  283. package/dist/dist/components/gov-link.d.ts +11 -0
  284. package/dist/dist/components/gov-loading.d.ts +11 -0
  285. package/dist/dist/components/gov-message.d.ts +11 -0
  286. package/dist/dist/components/gov-pagination.d.ts +11 -0
  287. package/dist/dist/components/gov-skeleton.d.ts +11 -0
  288. package/dist/dist/components/gov-spacer.d.ts +11 -0
  289. package/dist/dist/components/gov-stepper-item.d.ts +11 -0
  290. package/dist/dist/components/gov-stepper.d.ts +11 -0
  291. package/dist/dist/components/gov-tabs-item.d.ts +11 -0
  292. package/dist/dist/components/gov-tabs.d.ts +11 -0
  293. package/dist/dist/components/gov-tag.d.ts +11 -0
  294. package/dist/dist/components/gov-theme-switch.d.ts +11 -0
  295. package/dist/dist/components/gov-tile.d.ts +11 -0
  296. package/dist/dist/components/gov-toast.d.ts +11 -0
  297. package/dist/dist/components/gov-tooltip-content.d.ts +11 -0
  298. package/dist/dist/components/gov-tooltip.d.ts +11 -0
  299. package/dist/dist/components/gov-wizard-item.d.ts +11 -0
  300. package/dist/dist/components/gov-wizard.d.ts +11 -0
  301. package/dist/dist/components/index.d.ts +35 -0
  302. package/dist/dist/dist/components/gov-accordion-item.d.ts +11 -0
  303. package/dist/dist/dist/components/gov-accordion.d.ts +11 -0
  304. package/dist/dist/dist/components/gov-app.d.ts +11 -0
  305. package/dist/dist/dist/components/gov-attachments-item.d.ts +11 -0
  306. package/dist/dist/dist/components/gov-attachments.d.ts +11 -0
  307. package/dist/dist/dist/components/gov-backdrop.d.ts +11 -0
  308. package/dist/dist/dist/components/gov-banner.d.ts +11 -0
  309. package/dist/dist/dist/components/gov-blockquote.d.ts +11 -0
  310. package/dist/dist/dist/components/gov-breadcrumbs.d.ts +11 -0
  311. package/dist/dist/dist/components/gov-button.d.ts +11 -0
  312. package/dist/dist/dist/components/gov-card.d.ts +11 -0
  313. package/dist/dist/dist/components/gov-chip.d.ts +11 -0
  314. package/dist/dist/dist/components/gov-collapsible.d.ts +11 -0
  315. package/dist/dist/dist/components/gov-container.d.ts +11 -0
  316. package/dist/dist/dist/components/gov-control-group.d.ts +11 -0
  317. package/dist/dist/dist/components/gov-cookiebar.d.ts +11 -0
  318. package/dist/dist/dist/components/gov-dialog.d.ts +11 -0
  319. package/dist/dist/dist/components/gov-dropdown.d.ts +11 -0
  320. package/dist/dist/dist/components/gov-empty.d.ts +11 -0
  321. package/dist/dist/dist/components/gov-error-code.d.ts +11 -0
  322. package/dist/dist/dist/components/gov-flex.d.ts +11 -0
  323. package/dist/dist/dist/components/gov-form-autocomplete.d.ts +11 -0
  324. package/dist/dist/dist/components/gov-form-checkbox-group.d.ts +11 -0
  325. package/dist/dist/dist/components/gov-form-checkbox.d.ts +11 -0
  326. package/dist/dist/dist/components/gov-form-control.d.ts +11 -0
  327. package/dist/dist/dist/components/gov-form-file.d.ts +11 -0
  328. package/dist/dist/dist/components/gov-form-group.d.ts +11 -0
  329. package/dist/dist/dist/components/gov-form-input.d.ts +11 -0
  330. package/dist/dist/dist/components/gov-form-label.d.ts +11 -0
  331. package/dist/dist/dist/components/gov-form-message.d.ts +11 -0
  332. package/dist/dist/dist/components/gov-form-multi-select.d.ts +11 -0
  333. package/dist/dist/dist/components/gov-form-password-power.d.ts +11 -0
  334. package/dist/dist/dist/components/gov-form-radio-group.d.ts +11 -0
  335. package/dist/dist/dist/components/gov-form-radio.d.ts +11 -0
  336. package/dist/dist/dist/components/gov-form-range.d.ts +11 -0
  337. package/dist/dist/dist/components/gov-form-search.d.ts +11 -0
  338. package/dist/dist/dist/components/gov-form-select.d.ts +11 -0
  339. package/dist/dist/dist/components/gov-form-switch.d.ts +11 -0
  340. package/dist/dist/dist/components/gov-grid-item.d.ts +11 -0
  341. package/dist/dist/dist/components/gov-grid.d.ts +11 -0
  342. package/dist/dist/dist/components/gov-icon.d.ts +11 -0
  343. package/dist/dist/dist/components/gov-infobar.d.ts +11 -0
  344. package/dist/dist/dist/components/gov-layout-column.d.ts +11 -0
  345. package/dist/dist/dist/components/gov-layout.d.ts +11 -0
  346. package/dist/dist/dist/components/gov-lifecycle.d.ts +11 -0
  347. package/dist/dist/dist/components/gov-link.d.ts +11 -0
  348. package/dist/dist/dist/components/gov-loading.d.ts +11 -0
  349. package/dist/dist/dist/components/gov-message.d.ts +11 -0
  350. package/dist/dist/dist/components/gov-pagination.d.ts +11 -0
  351. package/dist/dist/dist/components/gov-skeleton.d.ts +11 -0
  352. package/dist/dist/dist/components/gov-spacer.d.ts +11 -0
  353. package/dist/dist/dist/components/gov-stepper-item.d.ts +11 -0
  354. package/dist/dist/dist/components/gov-stepper.d.ts +11 -0
  355. package/dist/dist/dist/components/gov-tabs-item.d.ts +11 -0
  356. package/dist/dist/dist/components/gov-tabs.d.ts +11 -0
  357. package/dist/dist/dist/components/gov-tag.d.ts +11 -0
  358. package/dist/dist/dist/components/gov-theme-switch.d.ts +11 -0
  359. package/dist/dist/dist/components/gov-tile.d.ts +11 -0
  360. package/dist/dist/dist/components/gov-toast.d.ts +11 -0
  361. package/dist/dist/dist/components/gov-tooltip-content.d.ts +11 -0
  362. package/dist/dist/dist/components/gov-tooltip.d.ts +11 -0
  363. package/dist/dist/dist/components/gov-wizard-item.d.ts +11 -0
  364. package/dist/dist/dist/components/gov-wizard.d.ts +11 -0
  365. package/dist/dist/dist/components/index.d.ts +35 -0
  366. package/dist/dist/dist/globals.d.ts +2 -0
  367. package/dist/dist/dist/hydrate/index.d.ts +287 -0
  368. package/dist/dist/dist/types/components/gov-accordion/constants.d.ts +19 -0
  369. package/dist/dist/dist/types/components/gov-accordion/gov-accordion-item.d.ts +43 -0
  370. package/dist/dist/dist/types/components/gov-accordion/gov-accordion.d.ts +26 -0
  371. package/dist/dist/dist/types/components/gov-accordion/gov-accordion.types.d.ts +9 -0
  372. package/dist/dist/dist/types/components/gov-attachments/constants.d.ts +11 -0
  373. package/dist/dist/dist/types/components/gov-attachments/gov-attachments-item.d.d.ts +4 -0
  374. package/dist/dist/dist/types/components/gov-attachments/gov-attachments-item.d.ts +24 -0
  375. package/dist/dist/dist/types/components/gov-attachments/gov-attachments.d.ts +19 -0
  376. package/dist/dist/dist/types/components/gov-backdrop/constants.d.ts +4 -0
  377. package/dist/dist/dist/types/components/gov-backdrop/gov-backdrop.d.ts +32 -0
  378. package/dist/dist/dist/types/components/gov-banner/constants.d.ts +26 -0
  379. package/dist/dist/dist/types/components/gov-banner/gov-banner.d.ts +28 -0
  380. package/dist/dist/dist/types/components/gov-blockquote/constants.d.ts +10 -0
  381. package/dist/dist/dist/types/components/gov-blockquote/gov-blockquote.d.ts +15 -0
  382. package/dist/dist/dist/types/components/gov-breadcrumbs/constants.d.ts +3 -0
  383. package/dist/dist/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.d.ts +4 -0
  384. package/dist/dist/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.ts +42 -0
  385. package/dist/dist/dist/types/components/gov-button/button/constants.d.ts +29 -0
  386. package/dist/dist/dist/types/components/gov-button/button/gov-button.d.ts +133 -0
  387. package/dist/dist/dist/types/components/gov-button/button/gov-button.types.d.ts +4 -0
  388. package/dist/dist/dist/types/components/gov-button/dropdown/constants.d.ts +10 -0
  389. package/dist/dist/dist/types/components/gov-button/dropdown/gov-dropdown.d.ts +40 -0
  390. package/dist/dist/dist/types/components/gov-button/dropdown/gov-dropdown.types.d.ts +4 -0
  391. package/dist/dist/dist/types/components/gov-card/constants.d.ts +16 -0
  392. package/dist/dist/dist/types/components/gov-card/gov-card.d.ts +57 -0
  393. package/dist/dist/dist/types/components/gov-card/interfaces.d.ts +4 -0
  394. package/dist/dist/dist/types/components/gov-chip/constants.d.ts +21 -0
  395. package/dist/dist/dist/types/components/gov-chip/gov-chip.d.ts +82 -0
  396. package/dist/dist/dist/types/components/gov-collapsible/constants.d.ts +18 -0
  397. package/dist/dist/dist/types/components/gov-collapsible/gov-collapsible.d.ts +36 -0
  398. package/dist/dist/dist/types/components/gov-container/constants.d.ts +3 -0
  399. package/dist/dist/dist/types/components/gov-container/gov-container.d.ts +6 -0
  400. package/dist/dist/dist/types/components/gov-control-group/constants.d.ts +7 -0
  401. package/dist/dist/dist/types/components/gov-control-group/gov-control-group.d.ts +24 -0
  402. package/dist/dist/dist/types/components/gov-cookiebar/constants.d.ts +7 -0
  403. package/dist/dist/dist/types/components/gov-cookiebar/gov-cookiebar.d.ts +7 -0
  404. package/dist/dist/dist/types/components/gov-dialog/constants.d.ts +11 -0
  405. package/dist/dist/dist/types/components/gov-dialog/gov-dialog.d.ts +70 -0
  406. package/dist/dist/dist/types/components/gov-empty/constants.d.ts +19 -0
  407. package/dist/dist/dist/types/components/gov-empty/gov-empty.d.ts +21 -0
  408. package/dist/dist/dist/types/components/gov-error-code/constants.d.ts +4 -0
  409. package/dist/dist/dist/types/components/gov-error-code/gov-error-code.d.ts +6 -0
  410. package/dist/dist/dist/types/components/gov-flex/constants.d.ts +7 -0
  411. package/dist/dist/dist/types/components/gov-flex/gov-flex.d.ts +39 -0
  412. package/dist/dist/dist/types/components/gov-form/autocomplete/autocomplete.utils.d.ts +2 -0
  413. package/dist/dist/dist/types/components/gov-form/autocomplete/constants.d.ts +11 -0
  414. package/dist/dist/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +158 -0
  415. package/dist/dist/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.types.d.ts +9 -0
  416. package/dist/dist/dist/types/components/gov-form/checkbox/constants.d.ts +10 -0
  417. package/dist/dist/dist/types/components/gov-form/checkbox/gov-form-checkbox.d.ts +86 -0
  418. package/dist/dist/dist/types/components/gov-form/checkbox/gov-form-checkbox.types.d.ts +5 -0
  419. package/dist/dist/dist/types/components/gov-form/control/constants.d.ts +9 -0
  420. package/dist/dist/dist/types/components/gov-form/control/gov-form-control.d.ts +40 -0
  421. package/dist/dist/dist/types/components/gov-form/file/constants.d.ts +7 -0
  422. package/dist/dist/dist/types/components/gov-form/file/gov-form-file.d.ts +130 -0
  423. package/dist/dist/dist/types/components/gov-form/file/gov-form-file.types.d.ts +11 -0
  424. package/dist/dist/dist/types/components/gov-form/group/constants.d.ts +18 -0
  425. package/dist/dist/dist/types/components/gov-form/group/gov-form-checkbox-group.d.ts +32 -0
  426. package/dist/dist/dist/types/components/gov-form/group/gov-form-group.d.ts +18 -0
  427. package/dist/dist/dist/types/components/gov-form/group/gov-form-group.types.d.ts +7 -0
  428. package/dist/dist/dist/types/components/gov-form/group/gov-form-radio-group.d.ts +32 -0
  429. package/dist/dist/dist/types/components/gov-form/input/constants.d.ts +28 -0
  430. package/dist/dist/dist/types/components/gov-form/input/gov-form-input.d.ts +178 -0
  431. package/dist/dist/dist/types/components/gov-form/input/gov-form-input.types.d.ts +4 -0
  432. package/dist/dist/dist/types/components/gov-form/label/constants.d.ts +8 -0
  433. package/dist/dist/dist/types/components/gov-form/label/gov-form-label.d.ts +26 -0
  434. package/dist/dist/dist/types/components/gov-form/message/constants.d.ts +11 -0
  435. package/dist/dist/dist/types/components/gov-form/message/gov-form-message.d.ts +23 -0
  436. package/dist/dist/dist/types/components/gov-form/multiselect/constants.d.ts +10 -0
  437. package/dist/dist/dist/types/components/gov-form/multiselect/gov-form-multi-select.d.ts +127 -0
  438. package/dist/dist/dist/types/components/gov-form/multiselect/gov-form-multi-select.types.d.ts +10 -0
  439. package/dist/dist/dist/types/components/gov-form/password-power/constants.d.ts +5 -0
  440. package/dist/dist/dist/types/components/gov-form/password-power/gov-form-password-power.d.ts +7 -0
  441. package/dist/dist/dist/types/components/gov-form/radio/constants.d.ts +10 -0
  442. package/dist/dist/dist/types/components/gov-form/radio/gov-form-radio.d.ts +83 -0
  443. package/dist/dist/dist/types/components/gov-form/radio/gov-form-radio.types.d.ts +5 -0
  444. package/dist/dist/dist/types/components/gov-form/range/constants.d.ts +9 -0
  445. package/dist/dist/dist/types/components/gov-form/range/gov-form-range.d.ts +116 -0
  446. package/dist/dist/dist/types/components/gov-form/search/constants.d.ts +10 -0
  447. package/dist/dist/dist/types/components/gov-form/search/gov-form-search.d.ts +13 -0
  448. package/dist/dist/dist/types/components/gov-form/select/constants.d.ts +8 -0
  449. package/dist/dist/dist/types/components/gov-form/select/gov-form-select.d.ts +89 -0
  450. package/dist/dist/dist/types/components/gov-form/select/gov-form-select.types.d.ts +9 -0
  451. package/dist/dist/dist/types/components/gov-form/switch/constants.d.ts +12 -0
  452. package/dist/dist/dist/types/components/gov-form/switch/gov-form-switch.d.ts +81 -0
  453. package/dist/dist/dist/types/components/gov-form/switch/gov-form-switch.types.d.ts +5 -0
  454. package/dist/dist/dist/types/components/gov-grid/constants.d.ts +10 -0
  455. package/dist/dist/dist/types/components/gov-grid/gov-grid-item.d.ts +46 -0
  456. package/dist/dist/dist/types/components/gov-grid/gov-grid.d.ts +19 -0
  457. package/dist/dist/dist/types/components/gov-icon/constants.d.ts +18 -0
  458. package/dist/dist/dist/types/components/gov-icon/gov-icon.d.ts +34 -0
  459. package/dist/dist/dist/types/components/gov-icon/helpers.d.ts +6 -0
  460. package/dist/dist/dist/types/components/gov-icon/list.d.ts +3 -0
  461. package/dist/dist/dist/types/components/gov-infobar/constants.d.ts +16 -0
  462. package/dist/dist/dist/types/components/gov-infobar/gov-infobar.d.ts +51 -0
  463. package/dist/dist/dist/types/components/gov-infobar/gov-infobar.types.d.ts +4 -0
  464. package/dist/dist/dist/types/components/gov-layout/constants.d.ts +20 -0
  465. package/dist/dist/dist/types/components/gov-layout/gov-layout-column.d.ts +6 -0
  466. package/dist/dist/dist/types/components/gov-layout/gov-layout.d.ts +20 -0
  467. package/dist/dist/dist/types/components/gov-lifecycle-tester/gov-lifecycle-tester.d.ts +14 -0
  468. package/dist/dist/dist/types/components/gov-link/constants.d.ts +8 -0
  469. package/dist/dist/dist/types/components/gov-link/gov-link.d.ts +34 -0
  470. package/dist/dist/dist/types/components/gov-loading/loading/constants.d.ts +9 -0
  471. package/dist/dist/dist/types/components/gov-loading/loading/gov-loading.d.ts +13 -0
  472. package/dist/dist/dist/types/components/gov-loading/skeleton/constants.d.ts +21 -0
  473. package/dist/dist/dist/types/components/gov-loading/skeleton/gov-skeleton.d.ts +46 -0
  474. package/dist/dist/dist/types/components/gov-message/constants.d.ts +13 -0
  475. package/dist/dist/dist/types/components/gov-message/gov-message.d.ts +16 -0
  476. package/dist/dist/dist/types/components/gov-pagination/constants.d.ts +22 -0
  477. package/dist/dist/dist/types/components/gov-pagination/gov-pagination.d.ts +97 -0
  478. package/dist/dist/dist/types/components/gov-pagination/gov-pagination.types.d.ts +5 -0
  479. package/dist/dist/dist/types/components/gov-pagination/pagination.d.ts +12 -0
  480. package/dist/dist/dist/types/components/gov-spacer/constants.d.ts +15 -0
  481. package/dist/dist/dist/types/components/gov-spacer/gov-spacer.d.ts +18 -0
  482. package/dist/dist/dist/types/components/gov-stepper/stepper/constants.d.ts +21 -0
  483. package/dist/dist/dist/types/components/gov-stepper/stepper/gov-stepper-item.d.d.ts +4 -0
  484. package/dist/dist/dist/types/components/gov-stepper/stepper/gov-stepper-item.d.ts +31 -0
  485. package/dist/dist/dist/types/components/gov-stepper/stepper/gov-stepper.d.ts +22 -0
  486. package/dist/dist/dist/types/components/gov-tabs/constants.d.ts +28 -0
  487. package/dist/dist/dist/types/components/gov-tabs/gov-tabs-item.d.ts +54 -0
  488. package/dist/dist/dist/types/components/gov-tabs/gov-tabs.d.ts +70 -0
  489. package/dist/dist/dist/types/components/gov-tabs/gov-tabs.types.d.ts +14 -0
  490. package/dist/dist/dist/types/components/gov-tag/constants.d.ts +12 -0
  491. package/dist/dist/dist/types/components/gov-tag/gov-tag.d.ts +35 -0
  492. package/dist/dist/dist/types/components/gov-theme-switch/constants.d.ts +12 -0
  493. package/dist/dist/dist/types/components/gov-theme-switch/gov-theme-switch.d.ts +46 -0
  494. package/dist/dist/dist/types/components/gov-theme-switch/gov-theme-switch.types.d.ts +10 -0
  495. package/dist/dist/dist/types/components/gov-tile/constants.d.ts +13 -0
  496. package/dist/dist/dist/types/components/gov-tile/gov-tile.d.ts +34 -0
  497. package/dist/dist/dist/types/components/gov-toast/constants.d.ts +17 -0
  498. package/dist/dist/dist/types/components/gov-toast/gov-toast.d.ts +58 -0
  499. package/dist/dist/dist/types/components/gov-tooltip/constants.d.ts +20 -0
  500. package/dist/dist/dist/types/components/gov-tooltip/gov-tooltip-content.d.ts +32 -0
  501. package/dist/dist/dist/types/components/gov-tooltip/gov-tooltip.d.ts +61 -0
  502. package/dist/dist/dist/types/components/gov-wizard/constants.d.ts +19 -0
  503. package/dist/dist/dist/types/components/gov-wizard/gov-wizard-item.d.d.ts +4 -0
  504. package/dist/dist/dist/types/components/gov-wizard/gov-wizard-item.d.ts +60 -0
  505. package/dist/dist/dist/types/components/gov-wizard/gov-wizard-item.types.d.ts +4 -0
  506. package/dist/dist/dist/types/components/gov-wizard/gov-wizard.d.ts +35 -0
  507. package/dist/dist/dist/types/core/constants/colors.d.ts +13 -0
  508. package/dist/dist/dist/types/core/constants/sizes.d.ts +13 -0
  509. package/dist/dist/dist/types/core/constants/tags.d.ts +12 -0
  510. package/dist/dist/dist/types/core/constants/tokens.d.ts +1 -0
  511. package/dist/dist/dist/types/helpers/Accessibility/accessibility.d.ts +1 -0
  512. package/dist/dist/dist/types/helpers/Accessibility/attributes.d.ts +1 -0
  513. package/dist/dist/dist/types/helpers/Dom/attribute.d.ts +13 -0
  514. package/dist/dist/dist/types/helpers/Dom/document.d.ts +4 -0
  515. package/dist/dist/dist/types/helpers/Dom/form.d.ts +3 -0
  516. package/dist/dist/dist/types/helpers/Dom/form.types.d.ts +11 -0
  517. package/dist/dist/dist/types/helpers/Dom/template.d.ts +10 -0
  518. package/dist/dist/dist/types/helpers/Dom/template.types.d.ts +14 -0
  519. package/dist/dist/dist/types/helpers/Dom/win.d.ts +18 -0
  520. package/dist/dist/dist/types/helpers/Fragment.d.ts +2 -0
  521. package/dist/dist/dist/types/helpers/Log/gov.log.d.ts +8 -0
  522. package/dist/dist/dist/types/helpers/Validate/props.d.ts +1 -0
  523. package/dist/dist/dist/types/helpers/Validate/wcag.d.ts +4 -0
  524. package/dist/dist/dist/types/index.d.ts +0 -0
  525. package/dist/dist/dist/types/interfaces.d.ts +1 -0
  526. package/dist/dist/dist/types/stencil-public-runtime.d.ts +1861 -0
  527. package/dist/dist/dist/types/types/event.types.d.ts +4 -0
  528. package/dist/dist/dist/types/types/interfaces.d.ts +2 -0
  529. package/dist/dist/dist/types/types/typings.d.ts +6 -0
  530. package/dist/dist/dist/types/utils/array.utils.d.ts +2 -0
  531. package/dist/dist/dist/types/utils/bool.utils.d.ts +1 -0
  532. package/dist/dist/dist/types/utils/dom.utils.d.ts +1 -0
  533. package/dist/dist/dist/types/utils/ds.utils.d.ts +1 -0
  534. package/dist/dist/dist/types/utils/file.utils.d.ts +3 -0
  535. package/dist/dist/dist/types/utils/helpers.types.d.ts +49 -0
  536. package/dist/dist/dist/types/utils/icon.utils.d.ts +4 -0
  537. package/dist/dist/dist/types/utils/number.utils.d.ts +1 -0
  538. package/dist/dist/dist/types/utils/object.utils.d.ts +2 -0
  539. package/dist/dist/dist/types/utils/stencil.utils.d.ts +1 -0
  540. package/dist/dist/dist/types/utils/string.utils.d.ts +4 -0
  541. package/dist/dist/dist/types/utils/utils.d.ts +20 -0
  542. package/dist/dist/globals.d.ts +2 -0
  543. package/dist/dist/hydrate/index.d.ts +287 -0
  544. package/dist/dist/types/components/gov-accordion/constants.d.ts +19 -0
  545. package/dist/dist/types/components/gov-accordion/gov-accordion-item.d.ts +43 -0
  546. package/dist/dist/types/components/gov-accordion/gov-accordion.d.ts +26 -0
  547. package/dist/dist/types/components/gov-accordion/gov-accordion.types.d.ts +9 -0
  548. package/dist/dist/types/components/gov-attachments/constants.d.ts +11 -0
  549. package/dist/dist/types/components/gov-attachments/gov-attachments-item.d.d.ts +4 -0
  550. package/dist/dist/types/components/gov-attachments/gov-attachments-item.d.ts +24 -0
  551. package/dist/dist/types/components/gov-attachments/gov-attachments.d.ts +19 -0
  552. package/dist/dist/types/components/gov-backdrop/constants.d.ts +4 -0
  553. package/dist/dist/types/components/gov-backdrop/gov-backdrop.d.ts +32 -0
  554. package/dist/dist/types/components/gov-banner/constants.d.ts +26 -0
  555. package/dist/dist/types/components/gov-banner/gov-banner.d.ts +28 -0
  556. package/dist/dist/types/components/gov-blockquote/constants.d.ts +10 -0
  557. package/dist/dist/types/components/gov-blockquote/gov-blockquote.d.ts +15 -0
  558. package/dist/dist/types/components/gov-breadcrumbs/constants.d.ts +3 -0
  559. package/dist/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.d.ts +4 -0
  560. package/dist/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.ts +42 -0
  561. package/dist/dist/types/components/gov-button/button/constants.d.ts +29 -0
  562. package/dist/dist/types/components/gov-button/button/gov-button.d.ts +133 -0
  563. package/dist/dist/types/components/gov-button/button/gov-button.types.d.ts +4 -0
  564. package/dist/dist/types/components/gov-button/dropdown/constants.d.ts +10 -0
  565. package/dist/dist/types/components/gov-button/dropdown/gov-dropdown.d.ts +40 -0
  566. package/dist/dist/types/components/gov-button/dropdown/gov-dropdown.types.d.ts +4 -0
  567. package/dist/dist/types/components/gov-card/constants.d.ts +16 -0
  568. package/dist/dist/types/components/gov-card/gov-card.d.ts +57 -0
  569. package/dist/dist/types/components/gov-card/interfaces.d.ts +4 -0
  570. package/dist/dist/types/components/gov-chip/constants.d.ts +21 -0
  571. package/dist/dist/types/components/gov-chip/gov-chip.d.ts +82 -0
  572. package/dist/dist/types/components/gov-collapsible/constants.d.ts +18 -0
  573. package/dist/dist/types/components/gov-collapsible/gov-collapsible.d.ts +36 -0
  574. package/dist/dist/types/components/gov-container/constants.d.ts +3 -0
  575. package/dist/dist/types/components/gov-container/gov-container.d.ts +6 -0
  576. package/dist/dist/types/components/gov-control-group/constants.d.ts +7 -0
  577. package/dist/dist/types/components/gov-control-group/gov-control-group.d.ts +24 -0
  578. package/dist/dist/types/components/gov-cookiebar/constants.d.ts +7 -0
  579. package/dist/dist/types/components/gov-cookiebar/gov-cookiebar.d.ts +7 -0
  580. package/dist/dist/types/components/gov-dialog/constants.d.ts +11 -0
  581. package/dist/dist/types/components/gov-dialog/gov-dialog.d.ts +70 -0
  582. package/dist/dist/types/components/gov-empty/constants.d.ts +19 -0
  583. package/dist/dist/types/components/gov-empty/gov-empty.d.ts +21 -0
  584. package/dist/dist/types/components/gov-error-code/constants.d.ts +4 -0
  585. package/dist/dist/types/components/gov-error-code/gov-error-code.d.ts +6 -0
  586. package/dist/dist/types/components/gov-flex/constants.d.ts +7 -0
  587. package/dist/dist/types/components/gov-flex/gov-flex.d.ts +39 -0
  588. package/dist/dist/types/components/gov-form/autocomplete/autocomplete.utils.d.ts +2 -0
  589. package/dist/dist/types/components/gov-form/autocomplete/constants.d.ts +11 -0
  590. package/dist/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +158 -0
  591. package/dist/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.types.d.ts +9 -0
  592. package/dist/dist/types/components/gov-form/checkbox/constants.d.ts +10 -0
  593. package/dist/dist/types/components/gov-form/checkbox/gov-form-checkbox.d.ts +86 -0
  594. package/dist/dist/types/components/gov-form/checkbox/gov-form-checkbox.types.d.ts +5 -0
  595. package/dist/dist/types/components/gov-form/control/constants.d.ts +9 -0
  596. package/dist/dist/types/components/gov-form/control/gov-form-control.d.ts +40 -0
  597. package/dist/dist/types/components/gov-form/file/constants.d.ts +7 -0
  598. package/dist/dist/types/components/gov-form/file/gov-form-file.d.ts +130 -0
  599. package/dist/dist/types/components/gov-form/file/gov-form-file.types.d.ts +11 -0
  600. package/dist/dist/types/components/gov-form/group/constants.d.ts +18 -0
  601. package/dist/dist/types/components/gov-form/group/gov-form-checkbox-group.d.ts +32 -0
  602. package/dist/dist/types/components/gov-form/group/gov-form-group.d.ts +18 -0
  603. package/dist/dist/types/components/gov-form/group/gov-form-group.types.d.ts +7 -0
  604. package/dist/dist/types/components/gov-form/group/gov-form-radio-group.d.ts +32 -0
  605. package/dist/dist/types/components/gov-form/input/constants.d.ts +28 -0
  606. package/dist/dist/types/components/gov-form/input/gov-form-input.d.ts +178 -0
  607. package/dist/dist/types/components/gov-form/input/gov-form-input.types.d.ts +4 -0
  608. package/dist/dist/types/components/gov-form/label/constants.d.ts +8 -0
  609. package/dist/dist/types/components/gov-form/label/gov-form-label.d.ts +26 -0
  610. package/dist/dist/types/components/gov-form/message/constants.d.ts +11 -0
  611. package/dist/dist/types/components/gov-form/message/gov-form-message.d.ts +23 -0
  612. package/dist/dist/types/components/gov-form/multiselect/constants.d.ts +10 -0
  613. package/dist/dist/types/components/gov-form/multiselect/gov-form-multi-select.d.ts +127 -0
  614. package/dist/dist/types/components/gov-form/multiselect/gov-form-multi-select.types.d.ts +10 -0
  615. package/dist/dist/types/components/gov-form/password-power/constants.d.ts +5 -0
  616. package/dist/dist/types/components/gov-form/password-power/gov-form-password-power.d.ts +7 -0
  617. package/dist/dist/types/components/gov-form/radio/constants.d.ts +10 -0
  618. package/dist/dist/types/components/gov-form/radio/gov-form-radio.d.ts +83 -0
  619. package/dist/dist/types/components/gov-form/radio/gov-form-radio.types.d.ts +5 -0
  620. package/dist/dist/types/components/gov-form/range/constants.d.ts +9 -0
  621. package/dist/dist/types/components/gov-form/range/gov-form-range.d.ts +116 -0
  622. package/dist/dist/types/components/gov-form/search/constants.d.ts +10 -0
  623. package/dist/dist/types/components/gov-form/search/gov-form-search.d.ts +13 -0
  624. package/dist/dist/types/components/gov-form/select/constants.d.ts +8 -0
  625. package/dist/dist/types/components/gov-form/select/gov-form-select.d.ts +89 -0
  626. package/dist/dist/types/components/gov-form/select/gov-form-select.types.d.ts +9 -0
  627. package/dist/dist/types/components/gov-form/switch/constants.d.ts +12 -0
  628. package/dist/dist/types/components/gov-form/switch/gov-form-switch.d.ts +81 -0
  629. package/dist/dist/types/components/gov-form/switch/gov-form-switch.types.d.ts +5 -0
  630. package/dist/dist/types/components/gov-grid/constants.d.ts +10 -0
  631. package/dist/dist/types/components/gov-grid/gov-grid-item.d.ts +46 -0
  632. package/dist/dist/types/components/gov-grid/gov-grid.d.ts +19 -0
  633. package/dist/dist/types/components/gov-icon/constants.d.ts +18 -0
  634. package/dist/dist/types/components/gov-icon/gov-icon.d.ts +34 -0
  635. package/dist/dist/types/components/gov-icon/helpers.d.ts +6 -0
  636. package/dist/dist/types/components/gov-icon/list.d.ts +3 -0
  637. package/dist/dist/types/components/gov-infobar/constants.d.ts +16 -0
  638. package/dist/dist/types/components/gov-infobar/gov-infobar.d.ts +51 -0
  639. package/dist/dist/types/components/gov-infobar/gov-infobar.types.d.ts +4 -0
  640. package/dist/dist/types/components/gov-layout/constants.d.ts +20 -0
  641. package/dist/dist/types/components/gov-layout/gov-layout-column.d.ts +6 -0
  642. package/dist/dist/types/components/gov-layout/gov-layout.d.ts +20 -0
  643. package/dist/dist/types/components/gov-lifecycle-tester/gov-lifecycle-tester.d.ts +14 -0
  644. package/dist/dist/types/components/gov-link/constants.d.ts +8 -0
  645. package/dist/dist/types/components/gov-link/gov-link.d.ts +34 -0
  646. package/dist/dist/types/components/gov-loading/loading/constants.d.ts +9 -0
  647. package/dist/dist/types/components/gov-loading/loading/gov-loading.d.ts +13 -0
  648. package/dist/dist/types/components/gov-loading/skeleton/constants.d.ts +21 -0
  649. package/dist/dist/types/components/gov-loading/skeleton/gov-skeleton.d.ts +46 -0
  650. package/dist/dist/types/components/gov-message/constants.d.ts +13 -0
  651. package/dist/dist/types/components/gov-message/gov-message.d.ts +16 -0
  652. package/dist/dist/types/components/gov-pagination/constants.d.ts +22 -0
  653. package/dist/dist/types/components/gov-pagination/gov-pagination.d.ts +97 -0
  654. package/dist/dist/types/components/gov-pagination/gov-pagination.types.d.ts +5 -0
  655. package/dist/dist/types/components/gov-pagination/pagination.d.ts +12 -0
  656. package/dist/dist/types/components/gov-spacer/constants.d.ts +15 -0
  657. package/dist/dist/types/components/gov-spacer/gov-spacer.d.ts +18 -0
  658. package/dist/dist/types/components/gov-stepper/stepper/constants.d.ts +21 -0
  659. package/dist/dist/types/components/gov-stepper/stepper/gov-stepper-item.d.d.ts +4 -0
  660. package/dist/dist/types/components/gov-stepper/stepper/gov-stepper-item.d.ts +31 -0
  661. package/dist/dist/types/components/gov-stepper/stepper/gov-stepper.d.ts +22 -0
  662. package/dist/dist/types/components/gov-tabs/constants.d.ts +28 -0
  663. package/dist/dist/types/components/gov-tabs/gov-tabs-item.d.ts +54 -0
  664. package/dist/dist/types/components/gov-tabs/gov-tabs.d.ts +70 -0
  665. package/dist/dist/types/components/gov-tabs/gov-tabs.types.d.ts +14 -0
  666. package/dist/dist/types/components/gov-tag/constants.d.ts +12 -0
  667. package/dist/dist/types/components/gov-tag/gov-tag.d.ts +35 -0
  668. package/dist/dist/types/components/gov-theme-switch/constants.d.ts +12 -0
  669. package/dist/dist/types/components/gov-theme-switch/gov-theme-switch.d.ts +46 -0
  670. package/dist/dist/types/components/gov-theme-switch/gov-theme-switch.types.d.ts +10 -0
  671. package/dist/dist/types/components/gov-tile/constants.d.ts +13 -0
  672. package/dist/dist/types/components/gov-tile/gov-tile.d.ts +34 -0
  673. package/dist/dist/types/components/gov-toast/constants.d.ts +17 -0
  674. package/dist/dist/types/components/gov-toast/gov-toast.d.ts +58 -0
  675. package/dist/dist/types/components/gov-tooltip/constants.d.ts +20 -0
  676. package/dist/dist/types/components/gov-tooltip/gov-tooltip-content.d.ts +32 -0
  677. package/dist/dist/types/components/gov-tooltip/gov-tooltip.d.ts +61 -0
  678. package/dist/dist/types/components/gov-wizard/constants.d.ts +19 -0
  679. package/dist/dist/types/components/gov-wizard/gov-wizard-item.d.d.ts +4 -0
  680. package/dist/dist/types/components/gov-wizard/gov-wizard-item.d.ts +60 -0
  681. package/dist/dist/types/components/gov-wizard/gov-wizard-item.types.d.ts +4 -0
  682. package/dist/dist/types/components/gov-wizard/gov-wizard.d.ts +35 -0
  683. package/dist/dist/types/core/constants/colors.d.ts +13 -0
  684. package/dist/dist/types/core/constants/sizes.d.ts +13 -0
  685. package/dist/dist/types/core/constants/tags.d.ts +12 -0
  686. package/dist/dist/types/core/constants/tokens.d.ts +1 -0
  687. package/dist/dist/types/helpers/Accessibility/accessibility.d.ts +1 -0
  688. package/dist/dist/types/helpers/Accessibility/attributes.d.ts +1 -0
  689. package/dist/dist/types/helpers/Dom/attribute.d.ts +13 -0
  690. package/dist/dist/types/helpers/Dom/document.d.ts +4 -0
  691. package/dist/dist/types/helpers/Dom/form.d.ts +3 -0
  692. package/dist/dist/types/helpers/Dom/form.types.d.ts +11 -0
  693. package/dist/dist/types/helpers/Dom/template.d.ts +10 -0
  694. package/dist/dist/types/helpers/Dom/template.types.d.ts +14 -0
  695. package/dist/dist/types/helpers/Dom/win.d.ts +18 -0
  696. package/dist/dist/types/helpers/Fragment.d.ts +2 -0
  697. package/dist/dist/types/helpers/Log/gov.log.d.ts +8 -0
  698. package/dist/dist/types/helpers/Validate/props.d.ts +1 -0
  699. package/dist/dist/types/helpers/Validate/wcag.d.ts +4 -0
  700. package/dist/dist/types/index.d.ts +0 -0
  701. package/dist/dist/types/interfaces.d.ts +1 -0
  702. package/dist/dist/types/stencil-public-runtime.d.ts +1861 -0
  703. package/dist/dist/types/types/event.types.d.ts +4 -0
  704. package/dist/dist/types/types/interfaces.d.ts +2 -0
  705. package/dist/dist/types/types/typings.d.ts +6 -0
  706. package/dist/dist/types/utils/array.utils.d.ts +2 -0
  707. package/dist/dist/types/utils/bool.utils.d.ts +1 -0
  708. package/dist/dist/types/utils/dom.utils.d.ts +1 -0
  709. package/dist/dist/types/utils/ds.utils.d.ts +1 -0
  710. package/dist/dist/types/utils/file.utils.d.ts +3 -0
  711. package/dist/dist/types/utils/helpers.types.d.ts +49 -0
  712. package/dist/dist/types/utils/icon.utils.d.ts +4 -0
  713. package/dist/dist/types/utils/number.utils.d.ts +1 -0
  714. package/dist/dist/types/utils/object.utils.d.ts +2 -0
  715. package/dist/dist/types/utils/stencil.utils.d.ts +1 -0
  716. package/dist/dist/types/utils/string.utils.d.ts +4 -0
  717. package/dist/dist/types/utils/utils.d.ts +20 -0
  718. package/dist/esm/gov-flex_3.entry.js +1 -1
  719. package/dist/hydrate/index.js +1 -1
  720. package/dist/hydrate/index.mjs +1 -1
  721. package/dist/types/components.d.ts +119 -592
  722. package/dist/types/stencil-public-runtime.d.ts +11 -170
  723. package/package.json +28 -32
  724. package/dist/components/p-DRXiDAHW.js +0 -2
  725. package/dist/core/p-0675617d.entry.js +0 -2
  726. package/dist/core/p-2e15a654.entry.js +0 -2
  727. package/dist/core/p-41bef63a.entry.js +0 -2
  728. package/dist/core/p-6638d034.entry.js +0 -2
  729. package/dist/core/p-943a58b2.entry.js +0 -2
  730. package/dist/core/p-B8TR1oqt.js +0 -3
  731. package/dist/core/p-B8TR1oqt.js.map +0 -1
  732. package/dist/core/p-a4fa2ffc.entry.js +0 -2
  733. package/dist/core/p-a7c322a7.entry.js +0 -2
  734. package/dist/core/p-b181f85f.entry.js +0 -2
  735. package/dist/core/p-dc0bd1e5.entry.js +0 -2
  736. package/readme.md +0 -8
  737. /package/dist/components/{p-isPjiQbr.js.map → p-BIB-JMbL.js.map} +0 -0
  738. /package/dist/components/{p-BICk4EuO.js.map → p-BVG9PtuQ.js.map} +0 -0
  739. /package/dist/components/{p-DmK9qaKH.js.map → p-DV0Pdd1S.js.map} +0 -0
  740. /package/dist/components/{p-DjGO_trZ.js.map → p-DlpZtTcv.js.map} +0 -0
  741. /package/dist/components/{p-BNoNH6m-.js.map → p-Dw1o8KoZ.js.map} +0 -0
  742. /package/dist/components/{p-BGK46VRO.js.map → p-NU_8kxGz.js.map} +0 -0
  743. /package/dist/components/{p-ClDhNt_H.js.map → p-o4vVG5sG.js.map} +0 -0
  744. /package/dist/core/{p-f515d912.entry.js.map → p-5c872d64.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["toBool","value","indexOf","Tags","GovButton","constructor","hostRef","this","hydrated","size","expanded","expandedMobile","disabled","nativeType","tab","focusable","inheritedAttributes","h","govHost","host","validateColor","newValue","validateProp","ButtonColors","ButtonClass","root","validateType","ButtonType","validateSize","Sizes","validateNativeType","NativeType","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","removeAttribute","Object","assign","disconnectedCallback","_a","stopObserving","componentWillLoad","color","type","inheritAriaAttributes","componentDidRender","canValidateWcagOnRender","delay","validateAccessibility","connectedCallback","render","Tag","href","A","BUTTON","undefined","Host","key","class","classes","ref","el","triggerRef","onClick","onClickHandler","bind","onFocus","onFocusHandler","onBlur","onBlurHandler","id","identifier","target","download","hreflang","rel","name","tabindex","toBoolAttrIfDefined","loading","hasSlot","e","stopPropagation","govClick","emit","component","originalEvent","govFocus","govBlur","setFocus","focus","getRef","validateAccessibleLabel","getAttribute"],"sources":["../../../packages/core/src/utils/bool.utils.ts","../../../packages/core/src/components/gov-button/button/gov-button.tsx"],"sourcesContent":["export function toBool(value: any): boolean {\n\tif (typeof value === 'string') {\n\t\treturn ['true', 'True', 'TRUE', '1'].indexOf(value) !== -1\n\t} else if (typeof value === 'number') {\n\t\treturn value > 0\n\t} else if (typeof value === 'boolean') {\n\t\treturn value\n\t} else {\n\t\treturn value ? true : false\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {\n\tButtonClass,\n\tButtonColors,\n\tButtonColorType,\n\tButtonSizesType,\n\tButtonTargetType,\n\tButtonType,\n\tButtonTypesType,\n\tNativeType,\n\tNativeTypesType,\n} from \"./constants\"\nimport {govHost, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {toBool} from \"../../../utils/bool.utils\"\nimport {Sizes} from \"../../../core/constants/sizes\"\nimport {validateAccessibleLabel} from \"../../../helpers/Validate/wcag\"\nimport {canValidateWcagOnRender} from \"../../../helpers/Dom/win\"\nimport {delay} from \"../../../utils/utils\"\nimport {ButtonEvent} from \"./gov-button.types\"\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\n\nenum Tags {\n\tA = \"a\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-button\",\n})\nexport class GovButton {\n\tprivate h: GovHost\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement\n\tprivate attributeObserver: AttributeObserver\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovButtonElement\n\n\t/**\n\t * Style variation of the button\n\t */\n\t@Prop({reflect: true}) readonly color: ButtonColorType\n\t/**\n\t * Button’s size\n\t */\n\t@Prop({reflect: true}) readonly size?: ButtonSizesType = \"m\"\n\t/**\n\t * Button's type\n\t */\n\t@Prop({reflect: true}) readonly type: ButtonTypesType\n\t/**\n\t * Expands the button to fill 100% of the container width\n\t */\n\t@Prop({reflect: true}) readonly expanded: boolean = false\n\t/**\n\t * Expands the button to fill 100% of the container width only on mobile\n\t */\n\t@Prop({reflect: true, attribute: \"expanded-mobile\"}) readonly expandedMobile: boolean = false\n\t/**\n\t * The name of the button, which gets paired with the button's value when submitted as part of a form. Corresponds with the native HTML name attribute\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n\t */\n\t@Prop() readonly nativeType?: NativeTypesType = \"button\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target?: ButtonTargetType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n\t */\n\t@Prop() readonly download: boolean\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n\t */\n\t@Prop() readonly tab: number = 0\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-hreflang\n\t */\n\t@Prop() readonly hreflang: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-referrerpolicy\n\t */\n\t@Prop() readonly referrerpolicy: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-rel\n\t */\n\t@Prop() readonly rel: string\n\t/**\n\t * Indicates whether an asynchronous process is running\n\t */\n\t@Prop() readonly loading: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom button identifier\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Emitted when the button click\n\t */\n\t@Event({eventName: \"gov-click\"}) govClick: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button has focus\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button loses focus\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<ButtonEvent>\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ButtonColors, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(ButtonType, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"nativeType\")\n\tvalidateNativeType(newValue: string): void {\n\t\tvalidateProp(NativeType, newValue, ButtonClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\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\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateType(this.type)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateNativeType(this.nativeType)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? Tags.A : Tags.BUTTON\n\t\tconst nativeType = Tag === Tags.A ? undefined : this.nativeType\n\n\t\treturn (\n\t\t\t<Host size={this.size}\n\t\t\t\t hydrated={this.hydrated}\n\t\t\t\t color={this.color}\n\t\t\t\t class={this.h.classes(ButtonClass.root)}\n\t\t\t\t type={this.type}>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLButtonElement | HTMLLinkElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tid={this.identifier}\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tdownload={this.download}\n\t\t\t\t\threflang={this.hreflang}\n\t\t\t\t\trel={this.rel}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\ttabindex={this.disabled ? \"-1\" : this.tab}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t>\n\t\t\t\t\t{toBool(this.loading) && !this.h.hasSlot(\"icon-end\") &&\n\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\" type=\"components\"></gov-icon>}\n\t\t\t\t\t{this.h.hasSlot(\"icon-start\") && <slot name=\"icon-start\"></slot>}\n\t\t\t\t\t<slot/>\n\t\t\t\t\t{this.h.hasSlot(\"icon-end\") && <slot name=\"icon-end\"></slot>}\n\t\t\t\t\t{toBool(this.loading) && this.h.hasSlot(\"icon-end\") &&\n\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\" type=\"components\"></gov-icon>}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false) {\n\t\t\tthis.govClick.emit({\n\t\t\t\tcomponent: ButtonClass.root,\n\t\t\t\toriginalEvent: e,\n\t\t\t\tref: this.host,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.triggerRef.focus()\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync getRef() {\n\t\treturn this.triggerRef\n\t}\n\n\t/**\n\t * Validate the Accessibility attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tif (this.focusable) {\n\t\t\tvalidateAccessibleLabel(this.triggerRef.getAttribute('aria-label'), this.triggerRef.getAttribute('aria-labelledby'), ButtonClass.root, this.host)\n\t\t}\n\t}\n}\n"],"mappings":"+eAAM,SAAUA,EAAOC,GACtB,UAAWA,IAAU,SAAU,CAC9B,MAAO,CAAC,OAAQ,OAAQ,OAAQ,KAAKC,QAAQD,MAAW,C,MAClD,UAAWA,IAAU,SAAU,CACrC,OAAOA,EAAQ,C,MACT,UAAWA,IAAU,UAAW,CACtC,OAAOA,C,KACD,CACN,OAAOA,EAAQ,KAAO,K,CAExB,CCeA,IAAKE,GAAL,SAAKA,GACJA,EAAA,SACAA,EAAA,kBACA,EAHD,CAAKA,MAAI,K,MAQIC,EAAS,MAMrB,WAAAC,CAAAC,G,8GAFQC,KAAAC,SAAW,MAeaD,KAAAE,KAAyB,IAQzBF,KAAAG,SAAoB,MAIUH,KAAAI,eAA0B,MASxDJ,KAAAK,SAAoB,MAKnCL,KAAAM,WAA+B,SAoB/BN,KAAAO,IAAc,EAwBdP,KAAAQ,UAAqB,KAsC7BR,KAAAS,oBAAkC,GAxH1CT,KAAKU,EAAIC,EAAQX,KAAKY,KACtB,CAoGD,aAAAC,CAAcC,GACbC,EAAaC,EAAcF,EAAUG,EAAYC,K,CAIlD,YAAAC,CAAaL,GACZC,EAAaK,EAAYN,EAAUG,EAAYC,K,CAIhD,YAAAG,CAAaP,GACZC,EAAaO,EAAOR,EAAUG,EAAYC,K,CAI3C,k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,cAAM0E,GACLtF,KAAK2D,WAAW4B,O,CAOjB,YAAMC,GACL,OAAOxF,KAAK2D,U,CAOb,2BAAMd,GACL,GAAI7C,KAAKQ,UAAW,CACnBiF,EAAwBzF,KAAK2D,WAAW+B,aAAa,cAAe1F,KAAK2D,WAAW+B,aAAa,mBAAoBzE,EAAYC,KAAMlB,KAAKY,K","ignoreList":[]}
1
+ {"version":3,"names":["toBool","value","indexOf","Tags","GovButton","constructor","hostRef","this","hydrated","size","expanded","expandedMobile","disabled","nativeType","tab","focusable","inheritedAttributes","h","govHost","host","validateColor","newValue","validateProp","ButtonColors","ButtonClass","root","validateType","ButtonType","validateSize","Sizes","validateNativeType","NativeType","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","removeAttribute","Object","assign","disconnectedCallback","_a","stopObserving","componentWillLoad","color","type","inheritAriaAttributes","componentDidRender","canValidateWcagOnRender","delay","validateAccessibility","connectedCallback","render","Tag","href","A","BUTTON","undefined","Host","key","class","classes","ref","el","triggerRef","onClick","onClickHandler","bind","onFocus","onFocusHandler","onBlur","onBlurHandler","id","identifier","target","download","hreflang","rel","name","tabindex","toBoolAttrIfDefined","loading","hasSlot","e","stopPropagation","govClick","emit","component","originalEvent","govFocus","govBlur","setFocus","focus","getRef","validateAccessibleLabel","getAttribute"],"sources":["../../../packages/core/src/utils/bool.utils.ts","../../../packages/core/src/components/gov-button/button/gov-button.tsx"],"sourcesContent":["export function toBool(value: any): boolean {\n\tif (typeof value === 'string') {\n\t\treturn ['true', 'True', 'TRUE', '1'].indexOf(value) !== -1\n\t} else if (typeof value === 'number') {\n\t\treturn value > 0\n\t} else if (typeof value === 'boolean') {\n\t\treturn value\n\t} else {\n\t\treturn value ? true : false\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {\n\tButtonClass,\n\tButtonColors,\n\tButtonColorType,\n\tButtonSizesType,\n\tButtonTargetType,\n\tButtonType,\n\tButtonTypesType,\n\tNativeType,\n\tNativeTypesType,\n} from \"./constants\"\nimport {govHost, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {toBool} from \"../../../utils/bool.utils\"\nimport {Sizes} from \"../../../core/constants/sizes\"\nimport {validateAccessibleLabel} from \"../../../helpers/Validate/wcag\"\nimport {canValidateWcagOnRender} from \"../../../helpers/Dom/win\"\nimport {delay} from \"../../../utils/utils\"\nimport {ButtonEvent} from \"./gov-button.types\"\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\n\nenum Tags {\n\tA = \"a\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-button\",\n})\nexport class GovButton {\n\tprivate h: GovHost\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement\n\tprivate attributeObserver: AttributeObserver\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovButtonElement\n\n\t/**\n\t * Style variation of the button\n\t */\n\t@Prop({reflect: true}) readonly color: ButtonColorType\n\t/**\n\t * Button’s size\n\t */\n\t@Prop({reflect: true}) readonly size?: ButtonSizesType = \"m\"\n\t/**\n\t * Button's type\n\t */\n\t@Prop({reflect: true}) readonly type: ButtonTypesType\n\t/**\n\t * Expands the button to fill 100% of the container width\n\t */\n\t@Prop({reflect: true}) readonly expanded: boolean = false\n\t/**\n\t * Expands the button to fill 100% of the container width only on mobile\n\t */\n\t@Prop({reflect: true, attribute: \"expanded-mobile\"}) readonly expandedMobile: boolean = false\n\t/**\n\t * The name of the button, which gets paired with the button's value when submitted as part of a form. Corresponds with the native HTML name attribute\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n\t */\n\t@Prop() readonly nativeType?: NativeTypesType = \"button\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target?: ButtonTargetType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n\t */\n\t@Prop() readonly download: boolean\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n\t */\n\t@Prop() readonly tab: number = 0\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-hreflang\n\t */\n\t@Prop() readonly hreflang: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-referrerpolicy\n\t */\n\t@Prop() readonly referrerpolicy: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-rel\n\t */\n\t@Prop() readonly rel: string\n\t/**\n\t * Indicates whether an asynchronous process is running\n\t */\n\t@Prop() readonly loading: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom button identifier\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Emitted when the button click\n\t */\n\t@Event({eventName: \"gov-click\"}) govClick: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button has focus\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button loses focus\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<ButtonEvent>\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ButtonColors, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(ButtonType, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"nativeType\")\n\tvalidateNativeType(newValue: string): void {\n\t\tvalidateProp(NativeType, newValue, ButtonClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\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\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateType(this.type)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateNativeType(this.nativeType)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? Tags.A : Tags.BUTTON\n\t\tconst nativeType = Tag === Tags.A ? undefined : this.nativeType\n\n\t\treturn (\n\t\t\t<Host size={this.size}\n\t\t\t\t hydrated={this.hydrated}\n\t\t\t\t color={this.color}\n\t\t\t\t class={this.h.classes(ButtonClass.root)}\n\t\t\t\t type={this.type}>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLButtonElement | HTMLLinkElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tid={this.identifier}\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tdownload={this.download}\n\t\t\t\t\threflang={this.hreflang}\n\t\t\t\t\trel={this.rel}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\ttabindex={this.disabled ? \"-1\" : this.tab}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t>\n\t\t\t\t\t{toBool(this.loading) && !this.h.hasSlot(\"icon-end\") &&\n\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\" type=\"components\"></gov-icon>}\n\t\t\t\t\t{this.h.hasSlot(\"icon-start\") && <slot name=\"icon-start\"></slot>}\n\t\t\t\t\t<slot/>\n\t\t\t\t\t{this.h.hasSlot(\"icon-end\") && <slot name=\"icon-end\"></slot>}\n\t\t\t\t\t{toBool(this.loading) && this.h.hasSlot(\"icon-end\") &&\n\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\" type=\"components\"></gov-icon>}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false) {\n\t\t\tthis.govClick.emit({\n\t\t\t\tcomponent: ButtonClass.root,\n\t\t\t\toriginalEvent: e,\n\t\t\t\tref: this.host,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.triggerRef.focus()\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync getRef() {\n\t\treturn this.triggerRef\n\t}\n\n\t/**\n\t * Validate the Accessibility attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tif (this.focusable) {\n\t\t\tvalidateAccessibleLabel(this.triggerRef.getAttribute('aria-label'), this.triggerRef.getAttribute('aria-labelledby'), ButtonClass.root, this.host)\n\t\t}\n\t}\n}\n"],"mappings":"+eAAM,SAAUA,EAAOC,GACtB,UAAWA,IAAU,SAAU,CAC9B,MAAO,CAAC,OAAQ,OAAQ,OAAQ,KAAKC,QAAQD,MAAW,C,MAClD,UAAWA,IAAU,SAAU,CACrC,OAAOA,EAAQ,C,MACT,UAAWA,IAAU,UAAW,CACtC,OAAOA,C,KACD,CACN,OAAOA,EAAQ,KAAO,K,CAExB,CCeA,IAAKE,GAAL,SAAKA,GACJA,EAAA,SACAA,EAAA,kBACA,EAHD,CAAKA,MAGJ,K,MAKYC,EAAS,MAMrB,WAAAC,CAAAC,G,8GAFQC,KAAQC,SAAG,MAeaD,KAAIE,KAAqB,IAQzBF,KAAQG,SAAY,MAIUH,KAAcI,e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KAAKgF,SAASC,KAAK,CAClBC,UAAWjE,EAAYC,KACvBiE,cAAeL,EACfrB,IAAKzD,KAAKY,M,EAKL,cAAAoD,CAAec,GACtBA,EAAEC,kBACF/E,KAAKoF,SAASH,KAAK,CAClBC,UAAWjE,EAAYC,KACvBiE,cAAeL,EACfrB,IAAKzD,KAAKY,M,CAIJ,aAAAsD,CAAcY,GACrBA,EAAEC,kBACF/E,KAAKqF,QAAQJ,KAAK,CACjBC,UAAWjE,EAAYC,KACvBiE,cAAeL,EACfrB,IAAKzD,KAAKY,M,CAQZ,cAAM0E,GACLtF,KAAK2D,WAAW4B,O,CAOjB,YAAMC,GACL,OAAOxF,KAAK2D,U,CAOb,2BAAMd,GACL,GAAI7C,KAAKQ,UAAW,CACnBiF,EAAwBzF,KAAK2D,WAAW+B,aAAa,cAAe1F,KAAK2D,WAAW+B,aAAa,mBAAoBzE,EAAYC,KAAMlB,KAAKY,K","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as s,c as t,h as i,H as e,g as a}from"./p-B8TR1oqt.js";import{v as r}from"./p-CDIRBJsi.js";import{c as o}from"./p-CgDnDrq5.js";import{g as h}from"./p-CoD1xawt.js";import{t as c}from"./p-Cjg0wpDG.js";import"./p-vN03FcXN.js";import"./p-DNztiAH0.js";import"./p-CQvUntGY.js";const n={root:"gov-breadcrumbs"};const l=class{constructor(i){s(this,i);this.govChange=t(this,"gov-change");this.inited=false;this.collapsible=false;this.isExpanded=false;this.accessibleToggleLabel="Zobrazit či skrýt navigaci";this.expanded=false;this.toggleOption=false;this.h=h(this.host)}async componentDidRender(){this.scheduleContentVerification();if(o()){c((()=>this.validateAccessibility()))}}scheduleContentVerification(){if(this.inited)return;this.inited=true;c((()=>{this.calculateWidthOfItems();this.inited=false}))}calculateWidthOfItems(){const s=this.host.getBoundingClientRect().width;let t=0;this.host.querySelectorAll("li").forEach((s=>{t+=s.getBoundingClientRect().width}));this.toggleOption=t>s}render(){return i(e,{key:"f8d5534c547e913a6ea57caafb588e00244f5c13",class:this.h.classes(n.root),expanded:this.expanded},i("nav",{key:"932e17955c6bdfb53339597b088519e91a5249f6","aria-label":this.accessibleLabel,"aria-labelledby":this.accessibleLabelledBy},i("slot",{key:"618bee35e6a66fad8fb7cf35485d101ce0b62ad4"})),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",type:"components"})):null)}async validateAccessibility(){r(this.accessibleLabel,this.accessibleLabelledBy,n.root,this.host);r(this.accessibleToggleLabel,undefined,n.root,this.host)}get host(){return a(this)}};export{l as gov_breadcrumbs};
2
- //# sourceMappingURL=p-91d5df66.entry.js.map
1
+ import{r as s,c as t,h as i,H as e,g as a}from"./p-ClISz4NF.js";import{v as r}from"./p-CDIRBJsi.js";import{c as o}from"./p-CgDnDrq5.js";import{g as h}from"./p-CoD1xawt.js";import{t as c}from"./p-Cjg0wpDG.js";import"./p-vN03FcXN.js";import"./p-DNztiAH0.js";import"./p-CQvUntGY.js";const n={root:"gov-breadcrumbs"};const l=class{constructor(i){s(this,i);this.govChange=t(this,"gov-change");this.inited=false;this.collapsible=false;this.isExpanded=false;this.accessibleToggleLabel="Zobrazit či skrýt navigaci";this.expanded=false;this.toggleOption=false;this.h=h(this.host)}async componentDidRender(){this.scheduleContentVerification();if(o()){c((()=>this.validateAccessibility()))}}scheduleContentVerification(){if(this.inited)return;this.inited=true;c((()=>{this.calculateWidthOfItems();this.inited=false}))}calculateWidthOfItems(){const s=this.host.getBoundingClientRect().width;let t=0;this.host.querySelectorAll("li").forEach((s=>{t+=s.getBoundingClientRect().width}));this.toggleOption=t>s}render(){return i(e,{key:"f8d5534c547e913a6ea57caafb588e00244f5c13",class:this.h.classes(n.root),expanded:this.expanded},i("nav",{key:"932e17955c6bdfb53339597b088519e91a5249f6","aria-label":this.accessibleLabel,"aria-labelledby":this.accessibleLabelledBy},i("slot",{key:"618bee35e6a66fad8fb7cf35485d101ce0b62ad4"})),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",type:"components"})):null)}async validateAccessibility(){r(this.accessibleLabel,this.accessibleLabelledBy,n.root,this.host);r(this.accessibleToggleLabel,undefined,n.root,this.host)}get host(){return a(this)}};export{l as gov_breadcrumbs};
2
+ //# sourceMappingURL=p-f3887d6d.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BreadcrumbsClass","root","GovBreadcrumbs","constructor","hostRef","this","inited","collapsible","isExpanded","accessibleToggleLabel","expanded","toggleOption","h","govHost","host","componentDidRender","scheduleContentVerification","canValidateWcagOnRender","tick","validateAccessibility","calculateWidthOfItems","hostWidth","getBoundingClientRect","width","sumOfWidths","querySelectorAll","forEach","li","render","Host","key","class","classes","accessibleLabel","accessibleLabelledBy","size","color","type","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'} type=\"components\"></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,EAAc,MAI1B,WAAAC,CAAAC,G,8CAHQC,KAAAC,OAAS,MAWAD,KAAAE,YAAuB,MAIGF,KAAAG,WAAsB,MAYVH,KAAAI,sBAAgC,6BAM9EJ,KAAAK,SAAW,MACXL,KAAAM,aAAe,MA9BvBN,KAAKO,EAAIC,EAAQR,KAAKS,KACtB,CA+BD,wBAAMC,GACLV,KAAKW,8BACL,GAAIC,IAA2B,CAC9BC,GAAK,IAAMb,KAAKc,yB,EAIV,2BAAAH,GACP,GAAIX,KAAKC,OAAQ,OACjBD,KAAKC,OAAS,KACdY,GAAK,KACJb,KAAKe,wBACLf,KAAKC,OAAS,KAAK,G,CAIb,qBAAAc,GACP,MAAMC,EAAYhB,KAAKS,KAAKQ,wBAAwBC,MACpD,IAAIC,EAAc,EAClBnB,KAAKS,KAAKW,iBAAiB,MAAMC,SAASC,IACzCH,GAAeG,EAAGL,wBAAwBC,KAAK,IAEhDlB,KAAKM,aAAea,EAAcH,C,CAGnC,MAAAO,GACC,OACChB,EAACiB,EAAI,CAAAC,IAAA,2CAACC,MAAO1B,KAAKO,EAAEoB,QAAQhC,EAAiBC,MAAOS,SAAUL,KAAKK,UAClEE,EAAA,OAAAkB,IAAA,wDAAiBzB,KAAK4B,gBAAe,kBAAmB5B,KAAK6B,sBAC5DtB,EAAA,QAAAkB,IAAA,8CAEAzB,KAAKM,aACLC,EAAA,cACCuB,KAAM,KACNC,MAAO,UACPC,KAAM,OAAM,aACAhC,KAAKI,sBAAqB,eACxBJ,KAAKK,SAAQ,gBACZL,KAAKK,SAAQ,eACd,IAAML,KAAKK,UAAYL,KAAKK,UAE1CE,EAAA,YAAU0B,KAAMjC,KAAKK,SAAW,aAAe,eAAgB2B,KAAK,gBAElE,K,CAUP,2BAAMlB,GACLoB,EAAwBlC,KAAK4B,gBAAiB5B,KAAK6B,qBAAsBlC,EAAiBC,KAAMI,KAAKS,MACrGyB,EAAwBlC,KAAKI,sBAAuB+B,UAAWxC,EAAiBC,KAAMI,KAAKS,K","ignoreList":[]}
1
+ {"version":3,"names":["BreadcrumbsClass","root","GovBreadcrumbs","constructor","hostRef","this","inited","collapsible","isExpanded","accessibleToggleLabel","expanded","toggleOption","h","govHost","host","componentDidRender","scheduleContentVerification","canValidateWcagOnRender","tick","validateAccessibility","calculateWidthOfItems","hostWidth","getBoundingClientRect","width","sumOfWidths","querySelectorAll","forEach","li","render","Host","key","class","classes","accessibleLabel","accessibleLabelledBy","size","color","type","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'} type=\"components\"></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,EAAc,MAI1B,WAAAC,CAAAC,G,8CAHQC,KAAMC,OAAG,MAWAD,KAAWE,YAAY,MAIGF,KAAUG,WAAY,MAYVH,KAAqBI,s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W as n,c as h}from"./p-BjcqOprh.js";import{c}from"./p-vN03FcXN.js";import{g as r,b as l,t as d}from"./p-CoD1xawt.js";import"./p-CgDnDrq5.js";import"./p-CQvUntGY.js";import"./p-U40vKHrs.js";import"./p-BcQO4NH2.js";var p;(function(s){s["DIV"]="div";s["BUTTON"]="button"})(p||(p={}));const m=class{constructor(i){s(this,i);this.govChange=t(this,"gov-change");this.hydrated=false;this.color="primary";this.size="m";this.collapsible=false;this.disabled=false;this.isExpanded=false;this.h=r(this.host);this.triggerId=c("GovWizardItem");this.contentId=c("GovWizardContent")}validateColor(s){o(h,s,n.root)}emmitChange(){this.govChange.emit({expanded:this.isExpanded,component:n.root})}componentWillLoad(){this.validateColor(this.color)}connectedCallback(){this.hydrated=true}render(){const s=this.identifier||this.triggerId;const t=this.collapsible?p.BUTTON:p.DIV;const e=this.h.hasSlot("prefix")&&i("span",{key:"3f00516020337fc142713c6edb468d0007eba3c5",class:n.prefix},i("slot",{key:"05aa42bc8241f53bb3664dc3d06798cb0344f92f",name:"prefix"}));return i(a,{key:"863700f5087e86d1f8d4e22b40108dfbc0cb96f5",class:this.h.classes(n.root),"is-expanded":this.isExpanded,color:this.color,size:this.size,role:"listitem",collapsible:this.collapsible,hydrated:this.hydrated},i("div",{key:"6d93a5bb12dbe2fc2e308059ffd5d63ed915f16d",class:n.header},e,this.collapsible?i(t,{id:s,class:this.h.classes(n.label),"aria-expanded":l(this.isExpanded),"aria-controls":this.contentId,disabled:this.disabled,"aria-disabled":d(this.disabled),onClick:s=>{s.preventDefault();s.stopPropagation();this.toggle()}},i("span",{class:n.headline},i("slot",{name:"headline"}),this.collapsible&&i("gov-icon",{class:n.chevron,name:"chevron-down",type:"components"})),i("slot",{name:"annotation"})):i(t,{class:this.h.classes(n.label)},i("span",{class:n.headline},i("slot",{name:"headline"}),this.collapsible&&i("gov-icon",{class:n.chevron,name:"chevron-down",type:"components"})),i("slot",{name:"annotation"}))),this.collapsible?i("div",{class:n.content,id:this.contentId,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded,"aria-labelledby":s},i("slot",null)):i("div",{class:n.content,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded},i("slot",null)))}async open(){this.isExpanded=true;this.emmitChange()}async close(){this.isExpanded=false;this.emmitChange()}async toggle(){this.isExpanded=!this.isExpanded;this.emmitChange()}async currentState(){return this.isExpanded}get host(){return e(this)}static get watchers(){return{color:[{validateColor:0}]}}};export{m as gov_wizard_item};
2
- //# sourceMappingURL=p-78202a44.entry.js.map
1
+ import{r as s,c as t,h as i,H as a,g as e}from"./p-ClISz4NF.js";import{v as o}from"./p-NOJjz9dT.js";import{W as n,c as h}from"./p-BjcqOprh.js";import{c}from"./p-vN03FcXN.js";import{g as r,b as l,t as d}from"./p-CoD1xawt.js";import"./p-CgDnDrq5.js";import"./p-CQvUntGY.js";import"./p-U40vKHrs.js";import"./p-BcQO4NH2.js";var p;(function(s){s["DIV"]="div";s["BUTTON"]="button"})(p||(p={}));const m=class{constructor(i){s(this,i);this.govChange=t(this,"gov-change");this.hydrated=false;this.color="primary";this.size="m";this.collapsible=false;this.disabled=false;this.isExpanded=false;this.h=r(this.host);this.triggerId=c("GovWizardItem");this.contentId=c("GovWizardContent")}validateColor(s){o(h,s,n.root)}emmitChange(){this.govChange.emit({expanded:this.isExpanded,component:n.root})}componentWillLoad(){this.validateColor(this.color)}connectedCallback(){this.hydrated=true}render(){const s=this.identifier||this.triggerId;const t=this.collapsible?p.BUTTON:p.DIV;const e=this.h.hasSlot("prefix")&&i("span",{key:"3f00516020337fc142713c6edb468d0007eba3c5",class:n.prefix},i("slot",{key:"05aa42bc8241f53bb3664dc3d06798cb0344f92f",name:"prefix"}));return i(a,{key:"863700f5087e86d1f8d4e22b40108dfbc0cb96f5",class:this.h.classes(n.root),"is-expanded":this.isExpanded,color:this.color,size:this.size,role:"listitem",collapsible:this.collapsible,hydrated:this.hydrated},i("div",{key:"6d93a5bb12dbe2fc2e308059ffd5d63ed915f16d",class:n.header},e,this.collapsible?i(t,{id:s,class:this.h.classes(n.label),"aria-expanded":l(this.isExpanded),"aria-controls":this.contentId,disabled:this.disabled,"aria-disabled":d(this.disabled),onClick:s=>{s.preventDefault();s.stopPropagation();this.toggle()}},i("span",{class:n.headline},i("slot",{name:"headline"}),this.collapsible&&i("gov-icon",{class:n.chevron,name:"chevron-down",type:"components"})),i("slot",{name:"annotation"})):i(t,{class:this.h.classes(n.label)},i("span",{class:n.headline},i("slot",{name:"headline"}),this.collapsible&&i("gov-icon",{class:n.chevron,name:"chevron-down",type:"components"})),i("slot",{name:"annotation"}))),this.collapsible?i("div",{class:n.content,id:this.contentId,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded,"aria-labelledby":s},i("slot",null)):i("div",{class:n.content,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded},i("slot",null)))}async open(){this.isExpanded=true;this.emmitChange()}async close(){this.isExpanded=false;this.emmitChange()}async toggle(){this.isExpanded=!this.isExpanded;this.emmitChange()}async currentState(){return this.isExpanded}get host(){return e(this)}static get watchers(){return{color:["validateColor"]}}};export{m as gov_wizard_item};
2
+ //# sourceMappingURL=p-f75ad657.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Tags","GovWizardItem","constructor","hostRef","this","hydrated","color","size","collapsible","disabled","isExpanded","h","govHost","host","triggerId","createID","contentId","validateColor","newValue","validateProp","WizardColors","WizardItemClass","root","emmitChange","govChange","emit","expanded","component","componentWillLoad","connectedCallback","render","identifier","Tag","BUTTON","DIV","prefixSlot","hasSlot","key","class","prefix","name","Host","classes","role","header","id","label","booleanString","toBoolAttrIfDefined","onClick","e","preventDefault","stopPropagation","toggle","headline","chevron","type","content","hidden","open","close","currentState"],"sources":["../../../packages/core/src/components/gov-wizard/gov-wizard-item.tsx"],"sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { WizardSizesType, WizardColors, WizardColorType, WizardItemClass } from \"./constants\"\nimport { createID } from \"../../utils/string.utils\"\nimport { booleanString, govHost, toBoolAttrIfDefined } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { WizardItemEvent } from \"./gov-wizard-item.types\"\n\nenum Tags {\n\tDIV = \"div\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-wizard-item\",\n})\nexport class GovWizardItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID(\"GovWizardItem\")\n\t\tthis.contentId = createID(\"GovWizardContent\")\n\t}\n\n\t@Element() readonly host: HTMLGovWizardItemElement\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly color?: WizardColorType = \"primary\"\n\t/**\n\t * Size of wizard\n\t */\n\t@Prop() readonly size?: WizardSizesType = \"m\"\n\t/**\n\t * Custom wizard item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Defines weather the wizard item can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Makes the wizard component disabled.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Defines whether the accordion is open or closed by button\n\t */\n\t@Prop({ attribute: \"is-expanded\", mutable: true }) isExpanded = false\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<WizardItemEvent>\n\n\t@Watch(\"color\")\n\tprivate validateColor(newValue: string): void {\n\t\tvalidateProp(WizardColors, newValue, WizardItemClass.root)\n\t}\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({ expanded: this.isExpanded, component: WizardItemClass.root })\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst Tag = this.collapsible ? Tags.BUTTON : Tags.DIV\n\t\tconst prefixSlot = this.h.hasSlot(\"prefix\") && (<span class={WizardItemClass.prefix}><slot name=\"prefix\" /></span>)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(WizardItemClass.root)}\n\t\t\t\t is-expanded={this.isExpanded}\n\t\t\t\t color={this.color}\n\t\t\t\t size={this.size}\n\t\t\t\t role=\"listitem\"\n\t\t\t\t collapsible={this.collapsible}\n\t\t\t\t hydrated={this.hydrated}>\n\t\t\t\t<div class={WizardItemClass.header}>\n\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\tid={triggerId}\n\t\t\t\t\t\t\tclass={this.h.classes(WizardItemClass.label)}\n\t\t\t\t\t\t\taria-expanded={booleanString(this.isExpanded)}\n\t\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tthis.toggle()\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class={WizardItemClass.headline}>\n\t\t\t\t\t\t\t\t<slot name=\"headline\" />\n\t\t\t\t\t\t\t\t{this.collapsible && <gov-icon class={WizardItemClass.chevron} name=\"chevron-down\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<slot name=\"annotation\"/>\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Tag class={this.h.classes(WizardItemClass.label)}>\n\t\t\t\t\t\t\t<span class={WizardItemClass.headline}>\n\t\t\t\t\t\t\t\t<slot name=\"headline\" />\n\t\t\t\t\t\t\t\t{this.collapsible && <gov-icon class={WizardItemClass.chevron} name=\"chevron-down\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<slot name=\"annotation\"/>\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={WizardItemClass.content}\n\t\t\t\t\t\tid={this.contentId}\n\t\t\t\t\t\taria-hidden={booleanString(!this.isExpanded)}\n\t\t\t\t\t\thidden={!this.isExpanded}\n\t\t\t\t\t\taria-labelledby={triggerId}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div class={WizardItemClass.content}\n\t\t\t\t\t\t aria-hidden={booleanString(!this.isExpanded)}\n\t\t\t\t\t\t hidden={!this.isExpanded}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Opening the Wizard\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpanded = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the Wizard\n\t */\n\t@Method()\n\tpublic async close(): Promise<void> {\n\t\tthis.isExpanded = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Wizard switch\n\t */\n\t@Method()\n\tpublic async toggle(): Promise<void> {\n\t\tthis.isExpanded = !this.isExpanded\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tpublic async currentState(): Promise<boolean> {\n\t\treturn this.isExpanded\n\t}\n}\n"],"mappings":"gUAQA,IAAKA,GAAL,SAAKA,GACJA,EAAA,aACAA,EAAA,kBACA,EAHD,CAAKA,MAAI,K,MAQIC,EAAa,MAMzB,WAAAC,CAAAC,G,8CAFQC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,IACTA,EAAEC,iBACFD,EAAEE,kBACFhD,KAAKiD,QAAQ,GAGd1C,EAAA,QAAM2B,MAAOjB,EAAgBiC,UAC5B3C,EAAA,QAAM6B,KAAK,aACVpC,KAAKI,aAAeG,EAAA,YAAU2B,MAAOjB,EAAgBkC,QAASf,KAAK,eAAegB,KAAK,gBAEzF7C,EAAA,QAAM6B,KAAK,gBAGZ7B,EAACqB,EAAG,CAACM,MAAOlC,KAAKO,EAAE+B,QAAQrB,EAAgByB,QAC1CnC,EAAA,QAAM2B,MAAOjB,EAAgBiC,UAC5B3C,EAAA,QAAM6B,KAAK,aACVpC,KAAKI,aAAeG,EAAA,YAAU2B,MAAOjB,EAAgBkC,QAASf,KAAK,eAAegB,KAAK,gBAEzF7C,EAAA,QAAM6B,KAAK,iBAIbpC,KAAKI,YACLG,EAAA,OACC2B,MAAOjB,EAAgBoC,QACvBZ,GAAIzC,KAAKY,UAAS,cACL+B,GAAe3C,KAAKM,YACjCgD,QAAStD,KAAKM,WAAU,kBACPI,GAEjBH,EAAA,cAGDA,EAAA,OAAK2B,MAAOjB,EAAgBoC,QAAO,cACpBV,GAAe3C,KAAKM,YACjCgD,QAAStD,KAAKM,YAEfC,EAAA,c,CAWL,UAAMgD,GACLvD,KAAKM,WAAa,KAClBN,KAAKmB,a,CAOC,WAAMqC,GACZxD,KAAKM,WAAa,MAClBN,KAAKmB,a,CAOC,YAAM8B,GACZjD,KAAKM,YAAcN,KAAKM,WACxBN,KAAKmB,a,CAOC,kBAAMsC,GACZ,OAAOzD,KAAKM,U","ignoreList":[]}
1
+ {"version":3,"names":["Tags","GovWizardItem","constructor","hostRef","this","hydrated","color","size","collapsible","disabled","isExpanded","h","govHost","host","triggerId","createID","contentId","validateColor","newValue","validateProp","WizardColors","WizardItemClass","root","emmitChange","govChange","emit","expanded","component","componentWillLoad","connectedCallback","render","identifier","Tag","BUTTON","DIV","prefixSlot","hasSlot","key","class","prefix","name","Host","classes","role","header","id","label","booleanString","toBoolAttrIfDefined","onClick","e","preventDefault","stopPropagation","toggle","headline","chevron","type","content","hidden","open","close","currentState"],"sources":["../../../packages/core/src/components/gov-wizard/gov-wizard-item.tsx"],"sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { WizardSizesType, WizardColors, WizardColorType, WizardItemClass } from \"./constants\"\nimport { createID } from \"../../utils/string.utils\"\nimport { booleanString, govHost, toBoolAttrIfDefined } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { WizardItemEvent } from \"./gov-wizard-item.types\"\n\nenum Tags {\n\tDIV = \"div\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-wizard-item\",\n})\nexport class GovWizardItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID(\"GovWizardItem\")\n\t\tthis.contentId = createID(\"GovWizardContent\")\n\t}\n\n\t@Element() readonly host: HTMLGovWizardItemElement\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly color?: WizardColorType = \"primary\"\n\t/**\n\t * Size of wizard\n\t */\n\t@Prop() readonly size?: WizardSizesType = \"m\"\n\t/**\n\t * Custom wizard item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Defines weather the wizard item can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Makes the wizard component disabled.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Defines whether the accordion is open or closed by button\n\t */\n\t@Prop({ attribute: \"is-expanded\", mutable: true }) isExpanded = false\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<WizardItemEvent>\n\n\t@Watch(\"color\")\n\tprivate validateColor(newValue: string): void {\n\t\tvalidateProp(WizardColors, newValue, WizardItemClass.root)\n\t}\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({ expanded: this.isExpanded, component: WizardItemClass.root })\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst Tag = this.collapsible ? Tags.BUTTON : Tags.DIV\n\t\tconst prefixSlot = this.h.hasSlot(\"prefix\") && (<span class={WizardItemClass.prefix}><slot name=\"prefix\" /></span>)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(WizardItemClass.root)}\n\t\t\t\t is-expanded={this.isExpanded}\n\t\t\t\t color={this.color}\n\t\t\t\t size={this.size}\n\t\t\t\t role=\"listitem\"\n\t\t\t\t collapsible={this.collapsible}\n\t\t\t\t hydrated={this.hydrated}>\n\t\t\t\t<div class={WizardItemClass.header}>\n\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\tid={triggerId}\n\t\t\t\t\t\t\tclass={this.h.classes(WizardItemClass.label)}\n\t\t\t\t\t\t\taria-expanded={booleanString(this.isExpanded)}\n\t\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tthis.toggle()\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class={WizardItemClass.headline}>\n\t\t\t\t\t\t\t\t<slot name=\"headline\" />\n\t\t\t\t\t\t\t\t{this.collapsible && <gov-icon class={WizardItemClass.chevron} name=\"chevron-down\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<slot name=\"annotation\"/>\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Tag class={this.h.classes(WizardItemClass.label)}>\n\t\t\t\t\t\t\t<span class={WizardItemClass.headline}>\n\t\t\t\t\t\t\t\t<slot name=\"headline\" />\n\t\t\t\t\t\t\t\t{this.collapsible && <gov-icon class={WizardItemClass.chevron} name=\"chevron-down\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<slot name=\"annotation\"/>\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={WizardItemClass.content}\n\t\t\t\t\t\tid={this.contentId}\n\t\t\t\t\t\taria-hidden={booleanString(!this.isExpanded)}\n\t\t\t\t\t\thidden={!this.isExpanded}\n\t\t\t\t\t\taria-labelledby={triggerId}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div class={WizardItemClass.content}\n\t\t\t\t\t\t aria-hidden={booleanString(!this.isExpanded)}\n\t\t\t\t\t\t hidden={!this.isExpanded}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Opening the Wizard\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpanded = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the Wizard\n\t */\n\t@Method()\n\tpublic async close(): Promise<void> {\n\t\tthis.isExpanded = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Wizard switch\n\t */\n\t@Method()\n\tpublic async toggle(): Promise<void> {\n\t\tthis.isExpanded = !this.isExpanded\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tpublic async currentState(): Promise<boolean> {\n\t\treturn this.isExpanded\n\t}\n}\n"],"mappings":"gUAQA,IAAKA,GAAL,SAAKA,GACJA,EAAA,aACAA,EAAA,kBACA,EAHD,CAAKA,MAGJ,K,MAKYC,EAAa,MAMzB,WAAAC,CAAAC,G,8CAFQC,KAAQC,SAAG,MAYFD,KAAKE,MAAqB,UAI1BF,KAAIG,KAAqB,IAQzBH,KAAWI,YAAY,MAIvBJ,KAAQK,SAAY,MAIcL,KAAUM,WAAG,MA7B/DN,KAAKO,EAAIC,EAAQR,KAAKS,MACtBT,KAAKU,UAAYC,EAAS,iBAC1BX,KAAKY,UAAYD,EAAS,mBAC1B,CAiCO,aAAAE,CAAcC,GACrBC,EAAaC,EAAcF,EAAUG,EAAgBC,K,CAG9C,WAAAC,GACPnB,KAAKoB,UAAUC,KAAK,CAAEC,SAAUtB,KAAKM,WAAYiB,UAAWN,EAAgBC,M,CAG7E,iBAAAM,GACCxB,KAAKa,cAAcb,KAAKE,M,CAGzB,iBAAAuB,GACCzB,KAAKC,SAAW,I,CAGjB,MAAAyB,GACC,MAAMhB,EAAYV,KAAK2B,YAAc3B,KAAKU,UAC1C,MAAMkB,EAAM5B,KAAKI,YAAcR,EAAKiC,OAASjC,EAAKkC,IAClD,MAAMC,EAAa/B,KAAKO,EAAEyB,QAAQ,WAAczB,EAAA,QAAA0B,IAAA,2CAAMC,MAAOjB,EAAgBkB,QAAQ5B,EAAA,QAAA0B,IAAA,2CAAMG,KAAK,YAEhG,OACC7B,EAAC8B,EAAI,CAAAJ,IAAA,2CAACC,MAAOlC,KAAKO,EAAE+B,QAAQrB,EAAgBC,MAAK,cACjClB,KAAKM,WAClBJ,MAAOF,KAAKE,MACZC,KAAMH,KAAKG,KACXoC,KAAK,WACLnC,YAAaJ,KAAKI,YAClBH,SAAUD,KAAKC,UACjBM,EAAA,OAAA0B,IAAA,2CAAKC,MAAOjB,EAAgB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c as s,h as i,H as e,g as a}from"./p-B8TR1oqt.js";import{F as o}from"./p-5itQzbON.js";import{v as n}from"./p-NOJjz9dT.js";import{S as r}from"./p-BcQO4NH2.js";import{C as h}from"./p-U40vKHrs.js";import{p as l}from"./p-CQvUntGY.js";import{g as c,p,t as g}from"./p-CoD1xawt.js";import{c as m}from"./p-vN03FcXN.js";import{c as d}from"./p-Ccwpa1ck.js";import{A as u,a as v}from"./p-Bz_RzYFb.js";import{i as f}from"./p-CzXeijOj.js";import"./p-CgDnDrq5.js";import"./p-DNztiAH0.js";const j=l(r,["_S","_M"]);const b=l(h,["PRIMARY","NEUTRAL"]);var _;(function(t){t["BUTTON"]="button";t["SELECT"]="select"})(_||(_={}));const z={root:"gov-pagination",list:"gov-pagination__list",item:"gov-pagination__item",itemArrow:"gov-pagination__item--arrow",itemMore:"gov-pagination__item--more",itemSelect:"gov-pagination__item--select",inner:"gov-pagination__inner",arrow:"gov-pagination__arrow"};function y(t,s=1,i=10,e=10){const a=Math.ceil(t/i);if(s<1){s=1}else if(s>a){s=a}let o,n;if(a<=e){o=1;n=a}else{const t=Math.floor(e/2);const i=Math.ceil(e/2)-1;if(s<=t){o=1;n=e}else if(s+i>=a){o=a-e+1;n=a}else{o=s-t;n=s+i}}const r=(s-1)*i;const h=Math.min(r+i-1,t-1);const l=Array.from(Array(n+1-o).keys()).map((t=>o+t));return{totalItems:t,currentPage:s,pageSize:i,totalPages:a,startPage:o,endPage:n,startIndex:r,endIndex:h,pages:l}}const P=class{constructor(i){t(this,i);this.govPage=s(this,"gov-page");this.type="button";this.current=1;this.total=0;this.size="m";this.color="primary";this.pageSize=10;this.maxPages=5;this.accessibleSelectLabel="Vybrat stranu";this.accessiblePageLabel="Strana";this.labelPrev="Přejít o stranu zpět";this.labelStart="Přejít na začátek";this.labelNext="Přejít na další stranu";this.labelEnd="Přejít na konec";this.inheritedAttributes={};this.h=c(this.host);this.pageSelectId=m("GovPageSelect");this.selectId=m("GovSelect")}validateType(t){n(_,t,z.root)}validateSize(t){n(j,t,z.root)}validateColor(t){n(b,t,z.root)}recalculate(){this.recalculatePagination(this.current)}componentDidLoad(){this.attributeObserver=new u(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(v)}componentWillLoad(){this.recalculatePagination(this.current);this.validateSize(this.size);this.validateColor(this.color);this.inheritedAttributes=f(this.host)}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}recalculatePagination(t){this.pagination=y(this.total,t,this.pageSize,this.maxPages)}isActivePageClass(t,s){if(this.pagination.currentPage===s){return t+" is-active"}else{return t}}prepareLinkUrl(t){if(this.link){return String(this.link).replace("{PAGE}",String(t))}return undefined}resetSelectValue(){if(this.spreadSelectRef){this.spreadSelectRef.getRef().then((t=>{t.value="..."}))}}render(){const t=(t,s,e)=>{const a=t===-1;const o=g(this.pagination.currentPage===t?true:undefined);return i("gov-button",{href:this.prepareLinkUrl(t),color:this.color,size:this.size,type:"base",disabled:a,"on-gov-click":s=>this.onClickHandler(s,t),"aria-label":e?e:t>-1?`${this.accessiblePageLabel} ${t}`:undefined,"aria-current":o,class:z.inner,focusable:true},s)};return i(e,{class:this.h.classes(z.root),type:this.type,color:this.color,size:this.size},i("nav",Object.assign({},this.inheritedAttributes),i("ul",{class:z.list},i("li",{class:p([z.item,z.itemArrow])},t(this.pagination.currentPage>1?1:-1,i("gov-icon",{class:z.arrow,name:"chevron-double-left",type:"components"}),this.labelStart)),i("li",{class:p([z.item,z.itemArrow])},t(this.pagination.startPage<this.pagination.currentPage?this.pagination.currentPage-1:-1,i("gov-icon",{class:z.arrow,name:"chevron-left",type:"components"}),this.labelPrev)),this.type=="select"?i("li",{class:p([z.item,z.itemSelect])},i("span",{class:z.inner},i("span",{id:this.pageSelectId,hidden:true},this.accessibleSelectLabel),i("gov-form-select",{size:this.size,color:this.color,identifier:this.selectIdentifier||this.selectId,"aria-labelledby":this.pageSelectId,"on-gov-change":this.onSelectHandler.bind(this)},d(1,this.pagination.totalPages).map((t=>i("option",{value:t,selected:this.pagination.currentPage===t},t)))))):i(o,null,this.pagination.pages.map((s=>i("li",{class:this.isActivePageClass(z.item,s)},t(s,s,"")))),this.pagination.totalPages?i("li",{class:p([z.item,z.itemMore])},i("span",{class:z.inner},i("span",{id:this.pageSelectId,hidden:true},this.accessibleSelectLabel),i("gov-form-select",{size:this.size,color:this.color,identifier:this.selectIdentifier||this.selectId,"aria-labelledby":this.pageSelectId,ref:t=>this.spreadSelectRef=t,"on-gov-change":this.onSelectHandler.bind(this)},i("option",{selected:true,hidden:true},"..."),d(1,this.pagination.totalPages).map((t=>i("option",{value:t,selected:false},t)))))):null),i("li",{class:p([z.item,z.itemArrow])},t(this.pagination.totalPages>this.pagination.currentPage?this.pagination.currentPage+1:-1,i("gov-icon",{class:z.arrow,name:"chevron-right",type:"components"}),this.labelNext)),i("li",{class:p([z.item,z.itemArrow])},t(this.pagination.totalPages>this.pagination.currentPage?this.pagination.totalPages:-1,i("gov-icon",{class:z.arrow,name:"chevron-double-right",type:"components"}),this.labelEnd)))))}onClickHandler(t,s){t.stopPropagation();this.recalculatePagination(s);this.govPage.emit({component:z.root,pagination:this.pagination})}onSelectHandler(t){t.stopPropagation();const s=t.detail.value;const i=parseInt(s);this.resetSelectValue();if(isNaN(i)===false){this.recalculatePagination(i);if(this.link){window.location.href=this.prepareLinkUrl(i)}else{this.govPage.emit({component:z.root,pagination:this.pagination})}}}get host(){return a(this)}static get watchers(){return{type:[{validateType:0}],size:[{validateSize:0}],color:[{validateColor:0}],current:[{recalculate:0}],total:[{recalculate:0}],pageSize:[{recalculate:0}],maxPages:[{recalculate:0}]}}};export{P as gov_pagination};
2
- //# sourceMappingURL=p-3ebbe75a.entry.js.map
1
+ import{r as t,c as s,h as i,H as e,g as a}from"./p-ClISz4NF.js";import{F as o}from"./p-5itQzbON.js";import{v as n}from"./p-NOJjz9dT.js";import{S as r}from"./p-BcQO4NH2.js";import{C as h}from"./p-U40vKHrs.js";import{p as l}from"./p-CQvUntGY.js";import{g as c,p,t as g}from"./p-CoD1xawt.js";import{c as m}from"./p-vN03FcXN.js";import{c as d}from"./p-Ccwpa1ck.js";import{A as u,a as v}from"./p-Bz_RzYFb.js";import{i as f}from"./p-CzXeijOj.js";import"./p-CgDnDrq5.js";import"./p-DNztiAH0.js";const j=l(r,["_S","_M"]);const b=l(h,["PRIMARY","NEUTRAL"]);var z;(function(t){t["BUTTON"]="button";t["SELECT"]="select"})(z||(z={}));const _={root:"gov-pagination",list:"gov-pagination__list",item:"gov-pagination__item",itemArrow:"gov-pagination__item--arrow",itemMore:"gov-pagination__item--more",itemSelect:"gov-pagination__item--select",inner:"gov-pagination__inner",arrow:"gov-pagination__arrow"};function y(t,s=1,i=10,e=10){const a=Math.ceil(t/i);if(s<1){s=1}else if(s>a){s=a}let o,n;if(a<=e){o=1;n=a}else{const t=Math.floor(e/2);const i=Math.ceil(e/2)-1;if(s<=t){o=1;n=e}else if(s+i>=a){o=a-e+1;n=a}else{o=s-t;n=s+i}}const r=(s-1)*i;const h=Math.min(r+i-1,t-1);const l=Array.from(Array(n+1-o).keys()).map((t=>o+t));return{totalItems:t,currentPage:s,pageSize:i,totalPages:a,startPage:o,endPage:n,startIndex:r,endIndex:h,pages:l}}const S=class{constructor(i){t(this,i);this.govPage=s(this,"gov-page");this.type="button";this.current=1;this.total=0;this.size="m";this.color="primary";this.pageSize=10;this.maxPages=5;this.accessibleSelectLabel="Vybrat stranu";this.accessiblePageLabel="Strana";this.labelPrev="Přejít o stranu zpět";this.labelStart="Přejít na začátek";this.labelNext="Přejít na další stranu";this.labelEnd="Přejít na konec";this.inheritedAttributes={};this.h=c(this.host);this.pageSelectId=m("GovPageSelect");this.selectId=m("GovSelect")}validateType(t){n(z,t,_.root)}validateSize(t){n(j,t,_.root)}validateColor(t){n(b,t,_.root)}recalculate(){this.recalculatePagination(this.current)}componentDidLoad(){this.attributeObserver=new u(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(v)}componentWillLoad(){this.recalculatePagination(this.current);this.validateSize(this.size);this.validateColor(this.color);this.inheritedAttributes=f(this.host)}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}recalculatePagination(t){this.pagination=y(this.total,t,this.pageSize,this.maxPages)}isActivePageClass(t,s){if(this.pagination.currentPage===s){return t+" is-active"}else{return t}}prepareLinkUrl(t){if(this.link){return String(this.link).replace("{PAGE}",String(t))}return undefined}resetSelectValue(){if(this.spreadSelectRef){this.spreadSelectRef.getRef().then((t=>{t.value="..."}))}}render(){const t=(t,s,e)=>{const a=t===-1;const o=g(this.pagination.currentPage===t?true:undefined);return i("gov-button",{href:this.prepareLinkUrl(t),color:this.color,size:this.size,type:"base",disabled:a,"on-gov-click":s=>this.onClickHandler(s,t),"aria-label":e?e:t>-1?`${this.accessiblePageLabel} ${t}`:undefined,"aria-current":o,class:_.inner,focusable:true},s)};return i(e,{class:this.h.classes(_.root),type:this.type,color:this.color,size:this.size},i("nav",Object.assign({},this.inheritedAttributes),i("ul",{class:_.list},i("li",{class:p([_.item,_.itemArrow])},t(this.pagination.currentPage>1?1:-1,i("gov-icon",{class:_.arrow,name:"chevron-double-left",type:"components"}),this.labelStart)),i("li",{class:p([_.item,_.itemArrow])},t(this.pagination.startPage<this.pagination.currentPage?this.pagination.currentPage-1:-1,i("gov-icon",{class:_.arrow,name:"chevron-left",type:"components"}),this.labelPrev)),this.type=="select"?i("li",{class:p([_.item,_.itemSelect])},i("span",{class:_.inner},i("span",{id:this.pageSelectId,hidden:true},this.accessibleSelectLabel),i("gov-form-select",{size:this.size,color:this.color,identifier:this.selectIdentifier||this.selectId,"aria-labelledby":this.pageSelectId,"on-gov-change":this.onSelectHandler.bind(this)},d(1,this.pagination.totalPages).map((t=>i("option",{value:t,selected:this.pagination.currentPage===t},t)))))):i(o,null,this.pagination.pages.map((s=>i("li",{class:this.isActivePageClass(_.item,s)},t(s,s,"")))),this.pagination.totalPages?i("li",{class:p([_.item,_.itemMore])},i("span",{class:_.inner},i("span",{id:this.pageSelectId,hidden:true},this.accessibleSelectLabel),i("gov-form-select",{size:this.size,color:this.color,identifier:this.selectIdentifier||this.selectId,"aria-labelledby":this.pageSelectId,ref:t=>this.spreadSelectRef=t,"on-gov-change":this.onSelectHandler.bind(this)},i("option",{selected:true,hidden:true},"..."),d(1,this.pagination.totalPages).map((t=>i("option",{value:t,selected:false},t)))))):null),i("li",{class:p([_.item,_.itemArrow])},t(this.pagination.totalPages>this.pagination.currentPage?this.pagination.currentPage+1:-1,i("gov-icon",{class:_.arrow,name:"chevron-right",type:"components"}),this.labelNext)),i("li",{class:p([_.item,_.itemArrow])},t(this.pagination.totalPages>this.pagination.currentPage?this.pagination.totalPages:-1,i("gov-icon",{class:_.arrow,name:"chevron-double-right",type:"components"}),this.labelEnd)))))}onClickHandler(t,s){t.stopPropagation();this.recalculatePagination(s);this.govPage.emit({component:_.root,pagination:this.pagination})}onSelectHandler(t){t.stopPropagation();const s=t.detail.value;const i=parseInt(s);this.resetSelectValue();if(isNaN(i)===false){this.recalculatePagination(i);if(this.link){window.location.href=this.prepareLinkUrl(i)}else{this.govPage.emit({component:_.root,pagination:this.pagination})}}}get host(){return a(this)}static get watchers(){return{type:["validateType"],size:["validateSize"],color:["validateColor"],current:["recalculate"],total:["recalculate"],pageSize:["recalculate"],maxPages:["recalculate"]}}};export{S as gov_pagination};
2
+ //# sourceMappingURL=p-f7bdb44a.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["PaginationSizes","pick","Sizes","PaginationColors","Colors","PaginationTypes","PaginationClass","root","list","item","itemArrow","itemMore","itemSelect","inner","arrow","paginate","totalItems","currentPage","pageSize","maxPages","totalPages","Math","ceil","startPage","endPage","maxPagesBeforeCurrentPage","floor","maxPagesAfterCurrentPage","startIndex","endIndex","min","pages","Array","from","keys","map","i","GovPagination","constructor","hostRef","this","type","current","total","size","color","accessibleSelectLabel","accessiblePageLabel","labelPrev","labelStart","labelNext","labelEnd","inheritedAttributes","h","govHost","host","pageSelectId","createID","selectId","validateType","newValue","validateProp","validateSize","validateColor","recalculate","recalculatePagination","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","inheritAriaAttributes","disconnectedCallback","_a","stopObserving","removeAttribute","Object","assign","pagination","isActivePageClass","originalClass","page","prepareLinkUrl","link","String","replace","undefined","resetSelectValue","spreadSelectRef","getRef","then","el","value","render","pageResolver","content","description","isDisabled","ariaCurrent","toBoolAttrIfDefined","href","disabled","e","onClickHandler","class","focusable","Host","classes","prepareClasses","name","id","hidden","identifier","selectIdentifier","onSelectHandler","bind","createArrayRange","selected","Fragment","ref","stopPropagation","govPage","emit","component","detail","parseInt","isNaN","window","location"],"sources":["../../../packages/core/src/components/gov-pagination/constants.ts","../../../packages/core/src/components/gov-pagination/pagination.ts","../../../packages/core/src/components/gov-pagination/gov-pagination.tsx"],"sourcesContent":["import { Sizes } from '../../core/constants/sizes'\nimport { Colors } from '../../core/constants/colors'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const PaginationSizes = pick(Sizes, ['_S', '_M'])\nexport type PaginationSizeType = `${ValueOf<typeof PaginationSizes>}`\n\nexport const PaginationColors = pick(Colors, ['PRIMARY', 'NEUTRAL'])\nexport type PaginationColorType = `${ValueOf<typeof PaginationColors>}`\n\nexport enum PaginationTypes {\n\tBUTTON = 'button',\n\tSELECT = 'select',\n}\nexport type PaginationType = `${ValueOf<typeof PaginationTypes>}`\n\nexport const PaginationClass = {\n\troot: 'gov-pagination',\n\tlist: 'gov-pagination__list',\n\titem: 'gov-pagination__item',\n\titemArrow: 'gov-pagination__item--arrow',\n\titemMore: 'gov-pagination__item--more',\n\titemSelect: 'gov-pagination__item--select',\n\tinner: 'gov-pagination__inner',\n\tarrow: 'gov-pagination__arrow',\n}\n","export interface Pagination {\n\ttotalItems: number\n\tcurrentPage: number\n\tpageSize: number\n\ttotalPages: number\n\tstartPage: number\n\tendPage: number\n\tstartIndex: number\n\tendIndex: number\n\tpages: number[]\n}\n\nexport function paginate(totalItems: number, currentPage = 1, pageSize = 10, maxPages = 10): Pagination {\n\t// calculate total pages\n\tconst totalPages = Math.ceil(totalItems / pageSize)\n\n\t// ensure current page isn't out of range\n\tif (currentPage < 1) {\n\t\tcurrentPage = 1\n\t} else if (currentPage > totalPages) {\n\t\tcurrentPage = totalPages\n\t}\n\n\tlet startPage: number, endPage: number\n\tif (totalPages <= maxPages) {\n\t\t// total pages less than max so show all pages\n\t\tstartPage = 1\n\t\tendPage = totalPages\n\t} else {\n\t\t// total pages more than max so calculate start and end pages\n\t\tconst maxPagesBeforeCurrentPage = Math.floor(maxPages / 2)\n\t\tconst maxPagesAfterCurrentPage = Math.ceil(maxPages / 2) - 1\n\t\tif (currentPage <= maxPagesBeforeCurrentPage) {\n\t\t\t// current page near the start\n\t\t\tstartPage = 1\n\t\t\tendPage = maxPages\n\t\t} else if (currentPage + maxPagesAfterCurrentPage >= totalPages) {\n\t\t\t// current page near the end\n\t\t\tstartPage = totalPages - maxPages + 1\n\t\t\tendPage = totalPages\n\t\t} else {\n\t\t\t// current page somewhere in the middle\n\t\t\tstartPage = currentPage - maxPagesBeforeCurrentPage\n\t\t\tendPage = currentPage + maxPagesAfterCurrentPage\n\t\t}\n\t}\n\n\t// calculate start and end item indexes\n\tconst startIndex = (currentPage - 1) * pageSize\n\tconst endIndex = Math.min(startIndex + pageSize - 1, totalItems - 1)\n\n\t// create an array of pages to ng-repeat in the pager control\n\tconst pages = Array.from(Array(endPage + 1 - startPage).keys()).map(i => startPage + i)\n\n\t// return object with all pager properties required by the view\n\treturn {\n\t\ttotalItems: totalItems,\n\t\tcurrentPage: currentPage,\n\t\tpageSize: pageSize,\n\t\ttotalPages: totalPages,\n\t\tstartPage: startPage,\n\t\tendPage: endPage,\n\t\tstartIndex: startIndex,\n\t\tendIndex: endIndex,\n\t\tpages: pages,\n\t}\n}\n","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\" type=\"components\"></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\" type=\"components\"></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\" type=\"components\"></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\" type=\"components\"></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"],"mappings":"weAKO,MAAMA,EAAkBC,EAAKC,EAAO,CAAC,KAAM,OAG3C,MAAMC,EAAmBF,EAAKG,EAAQ,CAAC,UAAW,YAGzD,IAAYC,GAAZ,SAAYA,GACXA,EAAA,mBACAA,EAAA,kBACA,EAHD,CAAYA,MAAe,KAMpB,MAAMC,EAAkB,CAC9BC,KAAM,iBACNC,KAAM,uBACNC,KAAM,uBACNC,UAAW,8BACXC,SAAU,6BACVC,WAAY,+BACZC,MAAO,wBACPC,MAAO,yBCbF,SAAUC,EAASC,EAAoBC,EAAc,EAAGC,EAAW,GAAIC,EAAW,IAEvF,MAAMC,EAAaC,KAAKC,KAAKN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AAA,MAAIsD,MAAOI,EAAe,CAACzG,EAAgBG,KAAMH,EAAgBI,aAC/DuF,EACAzD,KAAKyC,WAAW7D,WAAaoB,KAAKyC,WAAWhE,YAAcuB,KAAKyC,WAAWhE,YAAc,GAAI,EAC7FoC,EAAA,YAAUsD,MAAOrG,EAAgBQ,MAAOkG,KAAK,gBAAgBvE,KAAK,eAClED,KAAKU,YAIPG,EAAA,MAAIsD,MAAOI,EAAe,CAACzG,EAAgBG,KAAMH,EAAgBI,aAC/DuF,EACAzD,KAAKyC,WAAW7D,WAAaoB,KAAKyC,WAAWhE,YAAcuB,KAAKyC,WAAW7D,YAAa,EACxFiC,EAAA,YAAUsD,MAAOrG,EAAgBQ,MAAOkG,KAAK,uBAAuBvE,KAAK,eACzED,KAAKW,a,CASJ,cAAAuD,CAAeD,EAAgBrB,GACtCqB,EAAEkB,kBACFnF,KAAKyB,sBAAsBmB,GAC3B5C,KAAKoF,QAAQC,KAAK,CACjBC,UAAWxH,EAAgBC,KAC3B0E,WAAYzC,KAAKyC,Y,CAIX,eAAAoC,CAAgBZ,GACvBA,EAAEkB,kBACF,MAAM5B,EAAQU,EAAEsB,OAAOhC,MACvB,MAAMX,EAAO4C,SAASjC,GACtBvD,KAAKkD,mBACL,GAAIuC,MAAM7C,KAAU,MAAO,CAC1B5C,KAAKyB,sBAAsBmB,GAC3B,GAAI5C,KAAK8C,KAAM,CACd4C,OAAOC,SAAS5B,KAAO/D,KAAK6C,eAAeD,E,KACrC,CACN5C,KAAKoF,QAAQC,KAAK,CACjBC,UAAWxH,EAAgBC,KAC3B0E,WAAYzC,KAAKyC,Y","ignoreList":[]}
1
+ {"version":3,"names":["PaginationSizes","pick","Sizes","PaginationColors","Colors","PaginationTypes","PaginationClass","root","list","item","itemArrow","itemMore","itemSelect","inner","arrow","paginate","totalItems","currentPage","pageSize","maxPages","totalPages","Math","ceil","startPage","endPage","maxPagesBeforeCurrentPage","floor","maxPagesAfterCurrentPage","startIndex","endIndex","min","pages","Array","from","keys","map","i","GovPagination","constructor","hostRef","this","type","current","total","size","color","accessibleSelectLabel","accessiblePageLabel","labelPrev","labelStart","labelNext","labelEnd","inheritedAttributes","h","govHost","host","pageSelectId","createID","selectId","validateType","newValue","validateProp","validateSize","validateColor","recalculate","recalculatePagination","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","inheritAriaAttributes","disconnectedCallback","_a","stopObserving","removeAttribute","Object","assign","pagination","isActivePageClass","originalClass","page","prepareLinkUrl","link","String","replace","undefined","resetSelectValue","spreadSelectRef","getRef","then","el","value","render","pageResolver","content","description","isDisabled","ariaCurrent","toBoolAttrIfDefined","href","disabled","e","onClickHandler","class","focusable","Host","classes","prepareClasses","name","id","hidden","identifier","selectIdentifier","onSelectHandler","bind","createArrayRange","selected","Fragment","ref","stopPropagation","govPage","emit","component","detail","parseInt","isNaN","window","location"],"sources":["../../../packages/core/src/components/gov-pagination/constants.ts","../../../packages/core/src/components/gov-pagination/pagination.ts","../../../packages/core/src/components/gov-pagination/gov-pagination.tsx"],"sourcesContent":["import { Sizes } from '../../core/constants/sizes'\nimport { Colors } from '../../core/constants/colors'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const PaginationSizes = pick(Sizes, ['_S', '_M'])\nexport type PaginationSizeType = `${ValueOf<typeof PaginationSizes>}`\n\nexport const PaginationColors = pick(Colors, ['PRIMARY', 'NEUTRAL'])\nexport type PaginationColorType = `${ValueOf<typeof PaginationColors>}`\n\nexport enum PaginationTypes {\n\tBUTTON = 'button',\n\tSELECT = 'select',\n}\nexport type PaginationType = `${ValueOf<typeof PaginationTypes>}`\n\nexport const PaginationClass = {\n\troot: 'gov-pagination',\n\tlist: 'gov-pagination__list',\n\titem: 'gov-pagination__item',\n\titemArrow: 'gov-pagination__item--arrow',\n\titemMore: 'gov-pagination__item--more',\n\titemSelect: 'gov-pagination__item--select',\n\tinner: 'gov-pagination__inner',\n\tarrow: 'gov-pagination__arrow',\n}\n","export interface Pagination {\n\ttotalItems: number\n\tcurrentPage: number\n\tpageSize: number\n\ttotalPages: number\n\tstartPage: number\n\tendPage: number\n\tstartIndex: number\n\tendIndex: number\n\tpages: number[]\n}\n\nexport function paginate(totalItems: number, currentPage = 1, pageSize = 10, maxPages = 10): Pagination {\n\t// calculate total pages\n\tconst totalPages = Math.ceil(totalItems / pageSize)\n\n\t// ensure current page isn't out of range\n\tif (currentPage < 1) {\n\t\tcurrentPage = 1\n\t} else if (currentPage > totalPages) {\n\t\tcurrentPage = totalPages\n\t}\n\n\tlet startPage: number, endPage: number\n\tif (totalPages <= maxPages) {\n\t\t// total pages less than max so show all pages\n\t\tstartPage = 1\n\t\tendPage = totalPages\n\t} else {\n\t\t// total pages more than max so calculate start and end pages\n\t\tconst maxPagesBeforeCurrentPage = Math.floor(maxPages / 2)\n\t\tconst maxPagesAfterCurrentPage = Math.ceil(maxPages / 2) - 1\n\t\tif (currentPage <= maxPagesBeforeCurrentPage) {\n\t\t\t// current page near the start\n\t\t\tstartPage = 1\n\t\t\tendPage = maxPages\n\t\t} else if (currentPage + maxPagesAfterCurrentPage >= totalPages) {\n\t\t\t// current page near the end\n\t\t\tstartPage = totalPages - maxPages + 1\n\t\t\tendPage = totalPages\n\t\t} else {\n\t\t\t// current page somewhere in the middle\n\t\t\tstartPage = currentPage - maxPagesBeforeCurrentPage\n\t\t\tendPage = currentPage + maxPagesAfterCurrentPage\n\t\t}\n\t}\n\n\t// calculate start and end item indexes\n\tconst startIndex = (currentPage - 1) * pageSize\n\tconst endIndex = Math.min(startIndex + pageSize - 1, totalItems - 1)\n\n\t// create an array of pages to ng-repeat in the pager control\n\tconst pages = Array.from(Array(endPage + 1 - startPage).keys()).map(i => startPage + i)\n\n\t// return object with all pager properties required by the view\n\treturn {\n\t\ttotalItems: totalItems,\n\t\tcurrentPage: currentPage,\n\t\tpageSize: pageSize,\n\t\ttotalPages: totalPages,\n\t\tstartPage: startPage,\n\t\tendPage: endPage,\n\t\tstartIndex: startIndex,\n\t\tendIndex: endIndex,\n\t\tpages: pages,\n\t}\n}\n","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\" type=\"components\"></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\" type=\"components\"></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\" type=\"components\"></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\" type=\"components\"></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"],"mappings":"weAKO,MAAMA,EAAkBC,EAAKC,EAAO,CAAC,KAAM,OAG3C,MAAMC,EAAmBF,EAAKG,EAAQ,CAAC,UAAW,YAGzD,IAAYC,GAAZ,SAAYA,GACXA,EAAA,mBACAA,EAAA,kBACA,EAHD,CAAYA,MAGX,KAGM,MAAMC,EAAkB,CAC9BC,KAAM,iBACNC,KAAM,uBACNC,KAAM,uBACNC,UAAW,8BACXC,SAAU,6BACVC,WAAY,+BACZC,MAAO,wBACPC,MAAO,yBCbQ,SAAAC,EAASC,EAAoBC,EAAc,EAAGC,EAAW,GAAIC,EAAW,IAEvF,MAAMC,EAAaC,KAAKC,KAAKN,EAAaE,GAG1C,GAAID,EAAc,EAAG,CACpBA,EAAc,C,MACR,GAAIA,EAAcG,EAAY,CACpCH,EAAcG,C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WAAaoB,KAAKyC,WAAWhE,YAAcuB,KAAKyC,WAAWhE,YAAc,GAAI,EAC7FoC,EAAU,YAAAsD,MAAOrG,EAAgBQ,MAAOkG,KAAK,gBAAgBvE,KAAK,eAClED,KAAKU,YAIPG,EAAA,MAAIsD,MAAOI,EAAe,CAACzG,EAAgBG,KAAMH,EAAgBI,aAC/DuF,EACAzD,KAAKyC,WAAW7D,WAAaoB,KAAKyC,WAAWhE,YAAcuB,KAAKyC,WAAW7D,YAAa,EACxFiC,EAAU,YAAAsD,MAAOrG,EAAgBQ,MAAOkG,KAAK,uBAAuBvE,KAAK,eACzED,KAAKW,a,CASJ,cAAAuD,CAAeD,EAAgBrB,GACtCqB,EAAEkB,kBACFnF,KAAKyB,sBAAsBmB,GAC3B5C,KAAKoF,QAAQC,KAAK,CACjBC,UAAWxH,EAAgBC,KAC3B0E,WAAYzC,KAAKyC,Y,CAIX,eAAAoC,CAAgBZ,GACvBA,EAAEkB,kBACF,MAAM5B,EAAQU,EAAEsB,OAAOhC,MACvB,MAAMX,EAAO4C,SAASjC,GACtBvD,KAAKkD,mBACL,GAAIuC,MAAM7C,KAAU,MAAO,CAC1B5C,KAAKyB,sBAAsBmB,GAC3B,GAAI5C,KAAK8C,KAAM,CACd4C,OAAOC,SAAS5B,KAAO/D,KAAK6C,eAAeD,E,KACrC,CACN5C,KAAKoF,QAAQC,KAAK,CACjBC,UAAWxH,EAAgBC,KAC3B0E,WAAYzC,KAAKyC,Y","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as e,c as a,h as s,H as t,g as c}from"./p-ClISz4NF.js";import{v as d}from"./p-NOJjz9dT.js";import{S as o,c as i}from"./p-C3R1T_pg.js";import{c as r}from"./p-vN03FcXN.js";import{g as b}from"./p-CoD1xawt.js";import"./p-CgDnDrq5.js";import"./p-CQvUntGY.js";import"./p-U40vKHrs.js";import"./p-BcQO4NH2.js";const f=class{constructor(s){e(this,s);this.govChange=a(this,"gov-change");this.hydrated=false;this.color="primary";this.size="m";this.h=b(this.host);this.triggerId=r("GovStepperItem");this.contentId=r("GovStepperContent")}validateColor(e){d(i,e,o.root)}componentWillLoad(){this.validateColor(this.color)}connectedCallback(){this.hydrated=true}render(){const e=this.identifier||this.triggerId;const a=this.contentId;return s(t,{key:"126275cd984137b2c6d6cc5bdd2074adf14cee7b",id:e,class:this.h.classes(o.root),color:this.color,role:"listitem",hydrated:this.hydrated},s("div",{key:"15c1f0a0d533cd5473611b388590a6af94755ab9"},s("div",{key:"85535167b5359d00e773ffac3aa64ae95d9a005a",class:o.steps},s("span",{key:"37558ddd120824a5f234503b8cfb673352f642e1"}),s("span",{key:"647d2862b31d2e6e1c51f90e0cbf8eb76af9f5a8",class:o.prefix},s("slot",{key:"c58b03ec979eafc5db766c0134def19cbe2582d1",name:"prefix"})),s("span",{key:"c294e1f9af11588960c8ccf5d16186eb2e57cc74"})),s("div",{key:"ca82d4d7c0617f0c13de80c5a4247d8f9cd3d2e7",class:o.main},s("span",{key:"6d1cb25eca0517abcb0557579eab240beaff7557",class:o.headline},s("slot",{key:"3ef65e410481935cab120087b9454be9ce16ac1a",name:"headline"})),s("slot",{key:"8b7f8674a3347b2b51987ec7054835a8db203df8",name:"annotation"}),this.h.hasSlot("content")&&s("div",{key:"208b1c3d7f235748a04f4c31d525263aad01c90e",class:o.content,id:a,"aria-labelledby":e,role:"tabpanel"},s("slot",{key:"9b68d8eb8c095fd45b741fe2398d957b589fbd94",name:"content"})))))}get host(){return c(this)}static get watchers(){return{color:["validateColor"]}}};export{f as gov_stepper_item};
2
+ //# sourceMappingURL=p-fca7a0d6.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["GovStepperItem","constructor","hostRef","this","hydrated","color","size","h","govHost","host","triggerId","createID","contentId","validateColor","newValue","validateProp","StepperColors","StepperItemClass","root","componentWillLoad","connectedCallback","render","identifier","Host","key","id","class","classes","role","steps","prefix","name","main","headline","hasSlot","content"],"sources":["../../../packages/core/src/components/gov-stepper/stepper/gov-stepper-item.tsx"],"sourcesContent":["import { Component, Element, h, Prop, Watch, Host, Event, EventEmitter } from '@stencil/core'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { StepperSizesType, StepperItemClass, StepperColorType, StepperColors } from './constants'\nimport { createID } from '../../../utils/string.utils'\nimport { govHost } from '../../../helpers/Dom/template'\nimport { GovStepperItemChangeEvent } from './gov-stepper-item.d'\nimport { GovHost } from '../../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-stepper-item',\n})\nexport class GovStepperItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID('GovStepperItem')\n\t\tthis.contentId = createID('GovStepperContent')\n\t}\n\n\t@Element() readonly host: HTMLGovStepperItemElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly color?: StepperColorType = 'primary'\n\t/**\n\t * Size of stepper\n\t */\n\t@Prop() readonly size?: StepperSizesType = 'm'\n\t/**\n\t * Custom stepper item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovStepperItemChangeEvent>\n\n\t@Watch('color')\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(StepperColors, newValue, StepperItemClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst contentId = this.contentId\n\n\t\treturn (\n\t\t\t<Host id={triggerId} class={this.h.classes(StepperItemClass.root)} color={this.color} role=\"listitem\" hydrated={this.hydrated}>\n\t\t\t\t<div>\n\t\t\t\t\t<div class={StepperItemClass.steps}>\n\t\t\t\t\t\t<span></span>\n\t\t\t\t\t\t<span class={StepperItemClass.prefix}>\n\t\t\t\t\t\t\t<slot name=\"prefix\"/>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class={StepperItemClass.main}>\n\t\t\t\t\t\t<span class={StepperItemClass.headline}>\n\t\t\t\t\t\t\t<slot name=\"headline\"/>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<slot name=\"annotation\"/>\n\n\t\t\t\t\t\t{this.h.hasSlot('content') && (\n\t\t\t\t\t\t\t<div class={StepperItemClass.content} id={contentId} aria-labelledby={triggerId}\n\t\t\t\t\t\t\t\t role=\"tabpanel\">\n\t\t\t\t\t\t\t\t<slot name=\"content\"/>\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</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"6TAWaA,EAAc,MAM1B,WAAAC,CAAAC,G,8CAFQC,KAAAC,SAAW,MAaFD,KAAAE,MAA2B,UAI3BF,KAAAG,KAA0B,IAd1CH,KAAKI,EAAIC,EAAQL,KAAKM,MACtBN,KAAKO,UAAYC,EAAS,kBAC1BR,KAAKS,UAAYD,EAAS,oBAC1B,CAsBD,aAAAE,CAAcC,GACbC,EAAaC,EAAeF,EAAUG,EAAiBC,K,CAGxD,iBAAAC,GACChB,KAAKU,cAAcV,KAAKE,M,CAGzB,iBAAAe,GACCjB,KAAKC,SAAW,I,CAGjB,MAAAiB,GACC,MAAMX,EAAYP,KAAKmB,YAAcnB,KAAKO,UAC1C,MAAME,EAAYT,KAAKS,UAEvB,OACCL,EAACgB,EAAI,CAAAC,IAAA,2CAACC,GAAIf,EAAWgB,MAAOvB,KAAKI,EAAEoB,QAAQV,EAAiBC,MAAOb,MAAOF,KAAKE,MAAOuB,KAAK,WAAWxB,SAAUD,KAAKC,UACpHG,EAAA,OAAAiB,IAAA,4CACCjB,EAAA,OAAAiB,IAAA,2CAAKE,MAAOT,EAAiBY,OAC5BtB,EAAA,QAAAiB,IAAA,6CACAjB,EAAA,QAAAiB,IAAA,2CAAME,MAAOT,EAAiBa,QAC7BvB,EAAA,QAAAiB,IAAA,2CAAMO,KAAK,YAEZxB,EAAA,QAAAiB,IAAA,8CAEDjB,EAAA,OAAAiB,IAAA,2CAAKE,MAAOT,EAAiBe,MAC5BzB,EAAA,QAAAiB,IAAA,2CAAME,MAAOT,EAAiBgB,UAC7B1B,EAAA,QAAAiB,IAAA,2CAAMO,KAAK,cAEZxB,EAAA,QAAAiB,IAAA,2CAAMO,KAAK,eAEV5B,KAAKI,EAAE2B,QAAQ,YACf3B,EAAA,OAAAiB,IAAA,2CAAKE,MAAOT,EAAiBkB,QAASV,GAAIb,EAAS,kBAAmBF,EACpEkB,KAAK,YACNrB,EAAA,QAAAiB,IAAA,2CAAMO,KAAK,e","ignoreList":[]}
1
+ {"version":3,"names":["GovStepperItem","constructor","hostRef","this","hydrated","color","size","h","govHost","host","triggerId","createID","contentId","validateColor","newValue","validateProp","StepperColors","StepperItemClass","root","componentWillLoad","connectedCallback","render","identifier","Host","key","id","class","classes","role","steps","prefix","name","main","headline","hasSlot","content"],"sources":["../../../packages/core/src/components/gov-stepper/stepper/gov-stepper-item.tsx"],"sourcesContent":["import { Component, Element, h, Prop, Watch, Host, Event, EventEmitter } from '@stencil/core'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { StepperSizesType, StepperItemClass, StepperColorType, StepperColors } from './constants'\nimport { createID } from '../../../utils/string.utils'\nimport { govHost } from '../../../helpers/Dom/template'\nimport { GovStepperItemChangeEvent } from './gov-stepper-item.d'\nimport { GovHost } from '../../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-stepper-item',\n})\nexport class GovStepperItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID('GovStepperItem')\n\t\tthis.contentId = createID('GovStepperContent')\n\t}\n\n\t@Element() readonly host: HTMLGovStepperItemElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly color?: StepperColorType = 'primary'\n\t/**\n\t * Size of stepper\n\t */\n\t@Prop() readonly size?: StepperSizesType = 'm'\n\t/**\n\t * Custom stepper item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovStepperItemChangeEvent>\n\n\t@Watch('color')\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(StepperColors, newValue, StepperItemClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst contentId = this.contentId\n\n\t\treturn (\n\t\t\t<Host id={triggerId} class={this.h.classes(StepperItemClass.root)} color={this.color} role=\"listitem\" hydrated={this.hydrated}>\n\t\t\t\t<div>\n\t\t\t\t\t<div class={StepperItemClass.steps}>\n\t\t\t\t\t\t<span></span>\n\t\t\t\t\t\t<span class={StepperItemClass.prefix}>\n\t\t\t\t\t\t\t<slot name=\"prefix\"/>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class={StepperItemClass.main}>\n\t\t\t\t\t\t<span class={StepperItemClass.headline}>\n\t\t\t\t\t\t\t<slot name=\"headline\"/>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<slot name=\"annotation\"/>\n\n\t\t\t\t\t\t{this.h.hasSlot('content') && (\n\t\t\t\t\t\t\t<div class={StepperItemClass.content} id={contentId} aria-labelledby={triggerId}\n\t\t\t\t\t\t\t\t role=\"tabpanel\">\n\t\t\t\t\t\t\t\t<slot name=\"content\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t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B,KAAK,YACNrB,EAAM,QAAAiB,IAAA,2CAAAO,KAAK,e","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"p-vN03FcXN.js","sources":["../../../packages/core/src/utils/string.utils.ts"],"sourcesContent":["export function chr4(): string {\n\treturn Math.random().toString(16).slice(-4)\n}\n\nexport function createID(prefix: string): string {\n\treturn `${prefix}-${chr4()}${chr4()}-${chr4()}-${chr4()}-${chr4()}-${chr4()}${chr4()}${chr4()}`\n}\n\nexport function removeDiacritics(string: any): string | any {\n\tif (typeof string !== 'string') return string\n\treturn string.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '')\n}\n\nexport function splitByWhitespace(string: any): string | any {\n\tif (typeof string !== 'string') return string\n\treturn string.split(/(\\s+)/)\n}\n"],"names":[],"mappings":"SAAgB,IAAI,GAAA;AACnB,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;AAC5C;AAEM,SAAU,QAAQ,CAAC,MAAc,EAAA;IACtC,OAAO,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,IAAI,EAAE,CAAA,EAAG,IAAI,EAAE,CAAA,CAAA,EAAI,IAAI,EAAE,CAAA,CAAA,EAAI,IAAI,EAAE,CAAA,CAAA,EAAI,IAAI,EAAE,CAAA,CAAA,EAAI,IAAI,EAAE,CAAA,EAAG,IAAI,EAAE,CAAA,EAAG,IAAI,EAAE,CAAA,CAAE;AAChG;AAEM,SAAU,gBAAgB,CAAC,MAAW,EAAA;IAC3C,IAAI,OAAO,MAAM,KAAK,QAAQ;AAAE,QAAA,OAAO,MAAM;AAC7C,IAAA,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;AAC/D;AAEM,SAAU,iBAAiB,CAAC,MAAW,EAAA;IAC5C,IAAI,OAAO,MAAM,KAAK,QAAQ;AAAE,QAAA,OAAO,MAAM;AAC7C,IAAA,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;AAC7B;;;;"}
1
+ {"version":3,"file":"p-vN03FcXN.js","sources":["../../../packages/core/src/utils/string.utils.ts"],"sourcesContent":["export function chr4(): string {\n\treturn Math.random().toString(16).slice(-4)\n}\n\nexport function createID(prefix: string): string {\n\treturn `${prefix}-${chr4()}${chr4()}-${chr4()}-${chr4()}-${chr4()}-${chr4()}${chr4()}${chr4()}`\n}\n\nexport function removeDiacritics(string: any): string | any {\n\tif (typeof string !== 'string') return string\n\treturn string.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '')\n}\n\nexport function splitByWhitespace(string: any): string | any {\n\tif (typeof string !== 'string') return string\n\treturn string.split(/(\\s+)/)\n}\n"],"names":[],"mappings":"SAAgB,IAAI,GAAA;AACnB,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;AAC5C;AAEM,SAAU,QAAQ,CAAC,MAAc,EAAA;IACtC,OAAO,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,IAAI,EAAE,CAAG,EAAA,IAAI,EAAE,CAAA,CAAA,EAAI,IAAI,EAAE,CAAI,CAAA,EAAA,IAAI,EAAE,CAAA,CAAA,EAAI,IAAI,EAAE,CAAI,CAAA,EAAA,IAAI,EAAE,CAAA,EAAG,IAAI,EAAE,CAAG,EAAA,IAAI,EAAE,CAAA,CAAE;AAChG;AAEM,SAAU,gBAAgB,CAAC,MAAW,EAAA;IAC3C,IAAI,OAAO,MAAM,KAAK,QAAQ;AAAE,QAAA,OAAO,MAAM;AAC7C,IAAA,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;AAC/D;AAEM,SAAU,iBAAiB,CAAC,MAAW,EAAA;IAC5C,IAAI,OAAO,MAAM,KAAK,QAAQ;AAAE,QAAA,OAAO,MAAM;AAC7C,IAAA,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;AAC7B;;;;"}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GovAccordionItem extends Components.GovAccordionItem, HTMLElement {}
4
+ export const GovAccordionItem: {
5
+ prototype: GovAccordionItem;
6
+ new (): GovAccordionItem;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GovAccordion extends Components.GovAccordion, HTMLElement {}
4
+ export const GovAccordion: {
5
+ prototype: GovAccordion;
6
+ new (): GovAccordion;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GovAttachmentsItem extends Components.GovAttachmentsItem, HTMLElement {}
4
+ export const GovAttachmentsItem: {
5
+ prototype: GovAttachmentsItem;
6
+ new (): GovAttachmentsItem;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GovAttachments extends Components.GovAttachments, HTMLElement {}
4
+ export const GovAttachments: {
5
+ prototype: GovAttachments;
6
+ new (): GovAttachments;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GovBackdrop extends Components.GovBackdrop, HTMLElement {}
4
+ export const GovBackdrop: {
5
+ prototype: GovBackdrop;
6
+ new (): GovBackdrop;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GovBanner extends Components.GovBanner, HTMLElement {}
4
+ export const GovBanner: {
5
+ prototype: GovBanner;
6
+ new (): GovBanner;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GovBlockquote extends Components.GovBlockquote, HTMLElement {}
4
+ export const GovBlockquote: {
5
+ prototype: GovBlockquote;
6
+ new (): GovBlockquote;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GovBreadcrumbs extends Components.GovBreadcrumbs, HTMLElement {}
4
+ export const GovBreadcrumbs: {
5
+ prototype: GovBreadcrumbs;
6
+ new (): GovBreadcrumbs;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GovButton extends Components.GovButton, HTMLElement {}
4
+ export const GovButton: {
5
+ prototype: GovButton;
6
+ new (): GovButton;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GovCard extends Components.GovCard, HTMLElement {}
4
+ export const GovCard: {
5
+ prototype: GovCard;
6
+ new (): GovCard;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GovChip extends Components.GovChip, HTMLElement {}
4
+ export const GovChip: {
5
+ prototype: GovChip;
6
+ new (): GovChip;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GovCollapsible extends Components.GovCollapsible, HTMLElement {}
4
+ export const GovCollapsible: {
5
+ prototype: GovCollapsible;
6
+ new (): GovCollapsible;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GovContainer extends Components.GovContainer, HTMLElement {}
4
+ export const GovContainer: {
5
+ prototype: GovContainer;
6
+ new (): GovContainer;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GovControlGroup extends Components.GovControlGroup, HTMLElement {}
4
+ export const GovControlGroup: {
5
+ prototype: GovControlGroup;
6
+ new (): GovControlGroup;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GovCookiebar extends Components.GovCookiebar, HTMLElement {}
4
+ export const GovCookiebar: {
5
+ prototype: GovCookiebar;
6
+ new (): GovCookiebar;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;