@gov-design-system-ce/components 0.0.5 → 0.0.7

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 (1108) hide show
  1. package/dist/cjs/{constants-5c8f444a.js → constants-0c6c8e11.js} +8 -3
  2. package/dist/cjs/constants-0c6c8e11.js.map +1 -0
  3. package/dist/cjs/constants-1490a5eb.js +25 -0
  4. package/dist/cjs/constants-1490a5eb.js.map +1 -0
  5. package/dist/cjs/constants-20b3f7ee.js +28 -0
  6. package/dist/cjs/constants-20b3f7ee.js.map +1 -0
  7. package/dist/cjs/{constants-0c6897bc.js → constants-21559414.js} +8 -3
  8. package/dist/cjs/constants-21559414.js.map +1 -0
  9. package/dist/cjs/constants-23b7a283.js +33 -0
  10. package/dist/cjs/constants-23b7a283.js.map +1 -0
  11. package/dist/cjs/constants-245999e7.js +37 -0
  12. package/dist/cjs/constants-245999e7.js.map +1 -0
  13. package/dist/cjs/constants-61f8be34.js +26 -0
  14. package/dist/cjs/constants-61f8be34.js.map +1 -0
  15. package/dist/cjs/constants-86fb4eb4.js +19 -0
  16. package/dist/cjs/constants-86fb4eb4.js.map +1 -0
  17. package/dist/cjs/constants-caad94b4.js +16 -0
  18. package/dist/cjs/constants-caad94b4.js.map +1 -0
  19. package/dist/cjs/{constants-a44c32bc.js → constants-ded92f8a.js} +1 -3
  20. package/dist/cjs/constants-ded92f8a.js.map +1 -0
  21. package/dist/cjs/{constants-477ca85a.js → constants-e175be18.js} +7 -4
  22. package/dist/cjs/constants-e175be18.js.map +1 -0
  23. package/dist/cjs/constants-e8760a84.js +20 -0
  24. package/dist/cjs/constants-e8760a84.js.map +1 -0
  25. package/dist/cjs/core.cjs.js +1 -1
  26. package/dist/cjs/{form-d9f0f50c.js → form-49298257.js} +42 -10
  27. package/dist/cjs/form-49298257.js.map +1 -0
  28. package/dist/cjs/gov-accordion-item.cjs.entry.js +9 -9
  29. package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
  30. package/dist/cjs/gov-accordion.cjs.entry.js +12 -11
  31. package/dist/cjs/gov-accordion.cjs.entry.js.map +1 -1
  32. package/dist/cjs/gov-alert.cjs.entry.js +7 -5
  33. package/dist/cjs/gov-alert.cjs.entry.js.map +1 -1
  34. package/dist/cjs/gov-app.cjs.entry.js +823 -204
  35. package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
  36. package/dist/cjs/gov-attachments_3.cjs.entry.js +10 -10
  37. package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
  38. package/dist/cjs/gov-backdrop.cjs.entry.js +7 -6
  39. package/dist/cjs/gov-backdrop.cjs.entry.js.map +1 -1
  40. package/dist/cjs/gov-badge.cjs.entry.js +24 -23
  41. package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
  42. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +4 -5
  43. package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
  44. package/dist/cjs/gov-button.cjs.entry.js +13 -24
  45. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  46. package/dist/cjs/gov-card.cjs.entry.js +4 -4
  47. package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
  48. package/dist/cjs/gov-container.cjs.entry.js.map +1 -1
  49. package/dist/cjs/gov-cookiebar.cjs.entry.js.map +1 -1
  50. package/dist/cjs/gov-empty.cjs.entry.js.map +1 -1
  51. package/dist/cjs/gov-error-code.cjs.entry.js.map +1 -1
  52. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +8 -8
  53. package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
  54. package/dist/cjs/gov-form-checkbox.cjs.entry.js +13 -22
  55. package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
  56. package/dist/cjs/gov-form-control.cjs.entry.js +30 -29
  57. package/dist/cjs/gov-form-control.cjs.entry.js.map +1 -1
  58. package/dist/cjs/gov-form-file.cjs.entry.js +9 -9
  59. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  60. package/dist/cjs/gov-form-input.cjs.entry.js +15 -21
  61. package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
  62. package/dist/cjs/gov-form-multi-select.cjs.entry.js +13 -13
  63. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  64. package/dist/cjs/gov-form-password-power.cjs.entry.js +28 -0
  65. package/dist/cjs/gov-form-password-power.cjs.entry.js.map +1 -0
  66. package/dist/cjs/gov-form-radio.cjs.entry.js +12 -12
  67. package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
  68. package/dist/cjs/gov-form-search.cjs.entry.js +0 -2
  69. package/dist/cjs/gov-form-search.cjs.entry.js.map +1 -1
  70. package/dist/cjs/gov-form-select.cjs.entry.js +16 -16
  71. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  72. package/dist/cjs/gov-form-switch.cjs.entry.js +12 -12
  73. package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
  74. package/dist/cjs/gov-grid-item.cjs.entry.js +2 -3
  75. package/dist/cjs/gov-grid-item.cjs.entry.js.map +1 -1
  76. package/dist/cjs/gov-grid.cjs.entry.js +1 -2
  77. package/dist/cjs/gov-grid.cjs.entry.js.map +1 -1
  78. package/dist/cjs/gov-icon.cjs.entry.js +10 -5
  79. package/dist/cjs/gov-icon.cjs.entry.js.map +1 -1
  80. package/dist/cjs/gov-layout-column.cjs.entry.js +25 -0
  81. package/dist/cjs/gov-layout-column.cjs.entry.js.map +1 -0
  82. package/dist/cjs/gov-layout.cjs.entry.js +12 -3
  83. package/dist/cjs/gov-layout.cjs.entry.js.map +1 -1
  84. package/dist/cjs/gov-loading.cjs.entry.js +1 -1
  85. package/dist/cjs/gov-loading.cjs.entry.js.map +1 -1
  86. package/dist/cjs/gov-message.cjs.entry.js +4 -2
  87. package/dist/cjs/gov-message.cjs.entry.js.map +1 -1
  88. package/dist/cjs/gov-modal.cjs.entry.js +22 -16
  89. package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
  90. package/dist/cjs/gov-nav.cjs.entry.js +3 -3
  91. package/dist/cjs/gov-pagination.cjs.entry.js +59 -19
  92. package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
  93. package/dist/cjs/gov-prompt.cjs.entry.js +15 -9
  94. package/dist/cjs/gov-prompt.cjs.entry.js.map +1 -1
  95. package/dist/cjs/gov-side-nav-item.cjs.entry.js +1 -1
  96. package/dist/cjs/gov-side-nav-item.cjs.entry.js.map +1 -1
  97. package/dist/cjs/gov-side-nav.cjs.entry.js +3 -3
  98. package/dist/cjs/gov-side-nav.cjs.entry.js.map +1 -1
  99. package/dist/cjs/gov-spacer.cjs.entry.js +12 -14
  100. package/dist/cjs/gov-spacer.cjs.entry.js.map +1 -1
  101. package/dist/cjs/gov-statsbar-item.cjs.entry.js +4 -2
  102. package/dist/cjs/gov-statsbar-item.cjs.entry.js.map +1 -1
  103. package/dist/cjs/gov-statsbar.cjs.entry.js +8 -7
  104. package/dist/cjs/gov-statsbar.cjs.entry.js.map +1 -1
  105. package/dist/cjs/gov-stepper-item.cjs.entry.js +9 -9
  106. package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
  107. package/dist/cjs/gov-stepper.cjs.entry.js +9 -8
  108. package/dist/cjs/gov-stepper.cjs.entry.js.map +1 -1
  109. package/dist/cjs/gov-tabs-item.cjs.entry.js +3 -3
  110. package/dist/cjs/gov-tabs-item.cjs.entry.js.map +1 -1
  111. package/dist/cjs/gov-tabs.cjs.entry.js +12 -12
  112. package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
  113. package/dist/cjs/gov-tile.cjs.entry.js +2 -2
  114. package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
  115. package/dist/cjs/gov-tiles.cjs.entry.js +3 -2
  116. package/dist/cjs/gov-tiles.cjs.entry.js.map +1 -1
  117. package/dist/cjs/gov-toast.cjs.entry.js +21 -18
  118. package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
  119. package/dist/cjs/gov-tooltip-content.cjs.entry.js +3 -2
  120. package/dist/cjs/gov-tooltip-content.cjs.entry.js.map +1 -1
  121. package/dist/cjs/gov-tooltip.cjs.entry.js +15 -14
  122. package/dist/cjs/gov-tooltip.cjs.entry.js.map +1 -1
  123. package/dist/cjs/gov-wizzard-item.cjs.entry.js +10 -11
  124. package/dist/cjs/gov-wizzard-item.cjs.entry.js.map +1 -1
  125. package/dist/cjs/gov-wizzard.cjs.entry.js +9 -9
  126. package/dist/cjs/gov-wizzard.cjs.entry.js.map +1 -1
  127. package/dist/cjs/index-356717ae.js +6 -6
  128. package/dist/cjs/loader.cjs.js +1 -1
  129. package/dist/cjs/{props-cc21d3d7.js → props-5f82e4c0.js} +4 -4
  130. package/dist/cjs/props-5f82e4c0.js.map +1 -0
  131. package/dist/cjs/template-e1c4ff78.js.map +1 -1
  132. package/dist/cjs/{utils-4ae73637.js → utils-c9b1bba3.js} +3 -1
  133. package/dist/cjs/utils-c9b1bba3.js.map +1 -0
  134. package/dist/cjs/{variants-bacf037a.js → variants-f5ffeef3.js} +3 -3
  135. package/dist/cjs/variants-f5ffeef3.js.map +1 -0
  136. package/dist/cjs/{wcag-eca97102.js → wcag-6efc0ab7.js} +2 -2
  137. package/dist/cjs/wcag-6efc0ab7.js.map +1 -0
  138. package/dist/cjs/{win-ac5c1806.js → win-84bda0aa.js} +3 -3
  139. package/dist/cjs/win-84bda0aa.js.map +1 -0
  140. package/dist/collection/collection-manifest.json +2 -2
  141. package/dist/collection/components/gov-accordion/constants.js +5 -4
  142. package/dist/collection/components/gov-accordion/constants.js.map +1 -1
  143. package/dist/collection/components/gov-accordion/gov-accordion-item.css +37 -5
  144. package/dist/collection/components/gov-accordion/gov-accordion-item.js +17 -20
  145. package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
  146. package/dist/collection/components/gov-accordion/gov-accordion.css +6 -0
  147. package/dist/collection/components/gov-accordion/gov-accordion.js +36 -18
  148. package/dist/collection/components/gov-accordion/gov-accordion.js.map +1 -1
  149. package/dist/collection/components/gov-alert/constants.js +3 -9
  150. package/dist/collection/components/gov-alert/constants.js.map +1 -1
  151. package/dist/collection/components/gov-alert/gov-alert.css +3 -0
  152. package/dist/collection/components/gov-alert/gov-alert.js +7 -8
  153. package/dist/collection/components/gov-alert/gov-alert.js.map +1 -1
  154. package/dist/collection/components/gov-app/gov-app.css +3 -0
  155. package/dist/collection/components/gov-app/gov-app.js +3 -3
  156. package/dist/collection/components/gov-app/gov-app.js.map +1 -1
  157. package/dist/collection/components/gov-attachments/gov-attachments-item.css +3 -0
  158. package/dist/collection/components/gov-attachments/gov-attachments-item.js +6 -6
  159. package/dist/collection/components/gov-attachments/gov-attachments-item.js.map +1 -1
  160. package/dist/collection/components/gov-attachments/gov-attachments.css +3 -0
  161. package/dist/collection/components/gov-attachments/gov-attachments.js +7 -7
  162. package/dist/collection/components/gov-attachments/gov-attachments.js.map +1 -1
  163. package/dist/collection/components/gov-backdrop/gov-backdrop.css +3 -0
  164. package/dist/collection/components/gov-backdrop/gov-backdrop.js +10 -9
  165. package/dist/collection/components/gov-backdrop/gov-backdrop.js.map +1 -1
  166. package/dist/collection/components/gov-badge/constants.js +3 -1
  167. package/dist/collection/components/gov-badge/constants.js.map +1 -1
  168. package/dist/collection/components/gov-badge/gov-badge.css +204 -96
  169. package/dist/collection/components/gov-badge/gov-badge.js +39 -62
  170. package/dist/collection/components/gov-badge/gov-badge.js.map +1 -1
  171. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.css +3 -0
  172. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.d.js.map +1 -1
  173. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +2 -3
  174. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js.map +1 -1
  175. package/dist/collection/components/gov-button/constants.js +18 -13
  176. package/dist/collection/components/gov-button/constants.js.map +1 -1
  177. package/dist/collection/components/gov-button/gov-button.css +210 -131
  178. package/dist/collection/components/gov-button/gov-button.js +40 -47
  179. package/dist/collection/components/gov-button/gov-button.js.map +1 -1
  180. package/dist/collection/components/gov-card/gov-card.css +3 -0
  181. package/dist/collection/components/gov-card/gov-card.js +1 -1
  182. package/dist/collection/components/gov-card/gov-card.js.map +1 -1
  183. package/dist/collection/components/gov-container/gov-container.css +3 -0
  184. package/dist/collection/components/gov-container/gov-container.js +3 -3
  185. package/dist/collection/components/gov-container/gov-container.js.map +1 -1
  186. package/dist/collection/components/gov-cookiebar/gov-cookiebar.css +3 -0
  187. package/dist/collection/components/gov-cookiebar/gov-cookiebar.js.map +1 -1
  188. package/dist/collection/components/gov-empty/gov-empty.css +3 -0
  189. package/dist/collection/components/gov-empty/gov-empty.js.map +1 -1
  190. package/dist/collection/components/gov-error-code/gov-error-code.css +3 -0
  191. package/dist/collection/components/gov-error-code/gov-error-code.js.map +1 -1
  192. package/dist/collection/components/gov-form/autocomplete/constants.js +5 -4
  193. package/dist/collection/components/gov-form/autocomplete/constants.js.map +1 -1
  194. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.css +3 -0
  195. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +16 -18
  196. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
  197. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.types.js +2 -0
  198. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.types.js.map +1 -0
  199. package/dist/collection/components/gov-form/checkbox/constants.js +3 -2
  200. package/dist/collection/components/gov-form/checkbox/constants.js.map +1 -1
  201. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.css +3 -0
  202. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +11 -21
  203. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
  204. package/dist/collection/components/gov-form/checkbox/interfaces.js.map +1 -1
  205. package/dist/collection/components/gov-form/control/constants.js +3 -2
  206. package/dist/collection/components/gov-form/control/constants.js.map +1 -1
  207. package/dist/collection/components/gov-form/control/gov-form-control.css +3 -0
  208. package/dist/collection/components/gov-form/control/gov-form-control.js +40 -42
  209. package/dist/collection/components/gov-form/control/gov-form-control.js.map +1 -1
  210. package/dist/collection/components/gov-form/file/gov-form-file.css +3 -0
  211. package/dist/collection/components/gov-form/file/gov-form-file.js +4 -4
  212. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  213. package/dist/collection/components/gov-form/file/gov-form-file.types.js +2 -0
  214. package/dist/collection/components/gov-form/file/gov-form-file.types.js.map +1 -0
  215. package/dist/collection/components/gov-form/group/gov-form-group.css +3 -0
  216. package/dist/collection/components/gov-form/input/constants.js +25 -21
  217. package/dist/collection/components/gov-form/input/constants.js.map +1 -1
  218. package/dist/collection/components/gov-form/input/gov-form-input.css +6 -3
  219. package/dist/collection/components/gov-form/input/gov-form-input.js +25 -33
  220. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  221. package/dist/collection/components/gov-form/label/gov-form-label.css +3 -0
  222. package/dist/collection/components/gov-form/message/constants.js +3 -2
  223. package/dist/collection/components/gov-form/message/constants.js.map +1 -1
  224. package/dist/collection/components/gov-form/message/gov-form-message.css +3 -0
  225. package/dist/collection/components/gov-form/message/gov-form-message.js +8 -9
  226. package/dist/collection/components/gov-form/message/gov-form-message.js.map +1 -1
  227. package/dist/collection/components/gov-form/multiselect/constants.js +5 -4
  228. package/dist/collection/components/gov-form/multiselect/constants.js.map +1 -1
  229. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +3 -3
  230. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +18 -20
  231. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
  232. package/dist/collection/components/gov-form/password-power/constants.js +6 -0
  233. package/dist/collection/components/gov-form/password-power/constants.js.map +1 -0
  234. package/dist/collection/components/{gov-layout/gov-layout-content.css → gov-form/password-power/gov-form-password-power.css} +46 -27
  235. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +43 -0
  236. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js.map +1 -0
  237. package/dist/collection/components/gov-form/radio/constants.js +3 -2
  238. package/dist/collection/components/gov-form/radio/constants.js.map +1 -1
  239. package/dist/collection/components/gov-form/radio/gov-form-radio.css +3 -0
  240. package/dist/collection/components/gov-form/radio/gov-form-radio.js +10 -11
  241. package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
  242. package/dist/collection/components/gov-form/radio/interfaces.js.map +1 -1
  243. package/dist/collection/components/gov-form/search/constants.js +0 -11
  244. package/dist/collection/components/gov-form/search/constants.js.map +1 -1
  245. package/dist/collection/components/gov-form/search/gov-form-search.css +3 -0
  246. package/dist/collection/components/gov-form/search/gov-form-search.js.map +1 -1
  247. package/dist/collection/components/gov-form/select/constants.js +5 -4
  248. package/dist/collection/components/gov-form/select/constants.js.map +1 -1
  249. package/dist/collection/components/gov-form/select/gov-form-select.css +3 -3
  250. package/dist/collection/components/gov-form/select/gov-form-select.js +18 -20
  251. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  252. package/dist/collection/components/gov-form/switch/constants.js +3 -2
  253. package/dist/collection/components/gov-form/switch/constants.js.map +1 -1
  254. package/dist/collection/components/gov-form/switch/gov-form-switch.css +3 -0
  255. package/dist/collection/components/gov-form/switch/gov-form-switch.js +10 -11
  256. package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
  257. package/dist/collection/components/gov-form/switch/interfaces.js.map +1 -1
  258. package/dist/collection/components/gov-grid/constants.js +0 -12
  259. package/dist/collection/components/gov-grid/constants.js.map +1 -1
  260. package/dist/collection/components/gov-grid/gov-grid-item.css +3 -0
  261. package/dist/collection/components/gov-grid/gov-grid-item.js +5 -5
  262. package/dist/collection/components/gov-grid/gov-grid-item.js.map +1 -1
  263. package/dist/collection/components/gov-grid/gov-grid.css +3 -0
  264. package/dist/collection/components/gov-grid/gov-grid.js +3 -3
  265. package/dist/collection/components/gov-grid/gov-grid.js.map +1 -1
  266. package/dist/collection/components/gov-icon/constants.js +6 -1
  267. package/dist/collection/components/gov-icon/constants.js.map +1 -1
  268. package/dist/collection/components/gov-icon/gov-icon.css +3 -0
  269. package/dist/collection/components/gov-icon/gov-icon.js +1 -1
  270. package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
  271. package/dist/collection/components/gov-icon/list.js +234 -91
  272. package/dist/collection/components/gov-icon/list.js.map +1 -1
  273. package/dist/collection/components/gov-layout/constants.js +13 -7
  274. package/dist/collection/components/gov-layout/constants.js.map +1 -1
  275. package/dist/collection/components/gov-layout/{gov-layout-aside.css → gov-layout-column.css} +7 -13
  276. package/dist/collection/components/gov-layout/gov-layout-column.js +24 -0
  277. package/dist/collection/components/gov-layout/gov-layout-column.js.map +1 -0
  278. package/dist/collection/components/gov-layout/gov-layout.css +38 -0
  279. package/dist/collection/components/gov-layout/gov-layout.js +80 -4
  280. package/dist/collection/components/gov-layout/gov-layout.js.map +1 -1
  281. package/dist/collection/components/gov-loading/gov-loading.css +3 -0
  282. package/dist/collection/components/gov-loading/gov-loading.js +4 -4
  283. package/dist/collection/components/gov-loading/gov-loading.js.map +1 -1
  284. package/dist/collection/components/gov-message/constants.js +3 -9
  285. package/dist/collection/components/gov-message/constants.js.map +1 -1
  286. package/dist/collection/components/gov-message/gov-message.css +3 -0
  287. package/dist/collection/components/gov-message/gov-message.js +4 -4
  288. package/dist/collection/components/gov-message/gov-message.js.map +1 -1
  289. package/dist/collection/components/gov-modal/gov-modal.css +6 -3
  290. package/dist/collection/components/gov-modal/gov-modal.js +35 -22
  291. package/dist/collection/components/gov-modal/gov-modal.js.map +1 -1
  292. package/dist/collection/components/gov-nav/gov-nav-item.css +3 -0
  293. package/dist/collection/components/gov-nav/gov-nav.css +3 -0
  294. package/dist/collection/components/gov-pagination/constants.js +10 -5
  295. package/dist/collection/components/gov-pagination/constants.js.map +1 -1
  296. package/dist/collection/components/gov-pagination/gov-pagination.css +87 -42
  297. package/dist/collection/components/gov-pagination/gov-pagination.js +63 -31
  298. package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
  299. package/dist/collection/components/gov-promp/gov-prompt.css +6 -3
  300. package/dist/collection/components/gov-promp/gov-prompt.js +19 -6
  301. package/dist/collection/components/gov-promp/gov-prompt.js.map +1 -1
  302. package/dist/collection/components/gov-side-nav/gov-side-nav-item.css +3 -0
  303. package/dist/collection/components/gov-side-nav/gov-side-nav-item.js +1 -1
  304. package/dist/collection/components/gov-side-nav/gov-side-nav-item.js.map +1 -1
  305. package/dist/collection/components/gov-side-nav/gov-side-nav.css +3 -0
  306. package/dist/collection/components/gov-side-nav/gov-side-nav.js.map +1 -1
  307. package/dist/collection/components/gov-spacer/constants.js +10 -4
  308. package/dist/collection/components/gov-spacer/constants.js.map +1 -1
  309. package/dist/collection/components/gov-spacer/gov-spacer.css +3 -0
  310. package/dist/collection/components/gov-spacer/gov-spacer.js +10 -11
  311. package/dist/collection/components/gov-spacer/gov-spacer.js.map +1 -1
  312. package/dist/collection/components/gov-statsbar/constants.js +7 -2
  313. package/dist/collection/components/gov-statsbar/constants.js.map +1 -1
  314. package/dist/collection/components/gov-statsbar/gov-statsbar-item.css +3 -0
  315. package/dist/collection/components/gov-statsbar/gov-statsbar-item.js +2 -2
  316. package/dist/collection/components/gov-statsbar/gov-statsbar-item.js.map +1 -1
  317. package/dist/collection/components/gov-statsbar/gov-statsbar.css +3 -0
  318. package/dist/collection/components/gov-statsbar/gov-statsbar.js +14 -16
  319. package/dist/collection/components/gov-statsbar/gov-statsbar.js.map +1 -1
  320. package/dist/collection/components/gov-stepper/constants.js +5 -11
  321. package/dist/collection/components/gov-stepper/constants.js.map +1 -1
  322. package/dist/collection/components/gov-stepper/gov-stepper-item.css +3 -0
  323. package/dist/collection/components/gov-stepper/gov-stepper-item.js +17 -20
  324. package/dist/collection/components/gov-stepper/gov-stepper-item.js.map +1 -1
  325. package/dist/collection/components/gov-stepper/gov-stepper.css +3 -0
  326. package/dist/collection/components/gov-stepper/gov-stepper.js +14 -15
  327. package/dist/collection/components/gov-stepper/gov-stepper.js.map +1 -1
  328. package/dist/collection/components/gov-tabs/constants.js +13 -12
  329. package/dist/collection/components/gov-tabs/constants.js.map +1 -1
  330. package/dist/collection/components/gov-tabs/gov-tabs-item.css +3 -0
  331. package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
  332. package/dist/collection/components/gov-tabs/gov-tabs-item.js.map +1 -1
  333. package/dist/collection/components/gov-tabs/gov-tabs.css +31 -1
  334. package/dist/collection/components/gov-tabs/gov-tabs.js +39 -16
  335. package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
  336. package/dist/collection/components/gov-tabs/gov-tabs.types.js +2 -0
  337. package/dist/collection/components/gov-tabs/gov-tabs.types.js.map +1 -0
  338. package/dist/collection/components/gov-tile/gov-tile.css +4 -1
  339. package/dist/collection/components/gov-tile/gov-tile.js +1 -1
  340. package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
  341. package/dist/collection/components/gov-tiles/gov-tiles.css +6 -0
  342. package/dist/collection/components/gov-tiles/gov-tiles.js +24 -5
  343. package/dist/collection/components/gov-tiles/gov-tiles.js.map +1 -1
  344. package/dist/collection/components/gov-toast/constants.js +10 -20
  345. package/dist/collection/components/gov-toast/constants.js.map +1 -1
  346. package/dist/collection/components/gov-toast/gov-toast.css +3 -0
  347. package/dist/collection/components/gov-toast/gov-toast.js +34 -30
  348. package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
  349. package/dist/collection/components/gov-tooltip/constants.js +12 -12
  350. package/dist/collection/components/gov-tooltip/constants.js.map +1 -1
  351. package/dist/collection/components/gov-tooltip/gov-tooltip-content.css +3 -0
  352. package/dist/collection/components/gov-tooltip/gov-tooltip.css +3 -0
  353. package/dist/collection/components/gov-tooltip/gov-tooltip.js +27 -29
  354. package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
  355. package/dist/collection/components/gov-wizzard/constants.js +5 -4
  356. package/dist/collection/components/gov-wizzard/constants.js.map +1 -1
  357. package/dist/collection/components/gov-wizzard/gov-wizzard-item.css +11 -17
  358. package/dist/collection/components/gov-wizzard/gov-wizzard-item.js +16 -20
  359. package/dist/collection/components/gov-wizzard/gov-wizzard-item.js.map +1 -1
  360. package/dist/collection/components/gov-wizzard/gov-wizzard.css +3 -0
  361. package/dist/collection/components/gov-wizzard/gov-wizzard.js +9 -10
  362. package/dist/collection/components/gov-wizzard/gov-wizzard.js.map +1 -1
  363. package/dist/collection/core/constants/tags.js.map +1 -1
  364. package/dist/collection/helpers/Dom/form.js.map +1 -1
  365. package/dist/collection/helpers/Dom/form.types.js +2 -0
  366. package/dist/collection/helpers/Dom/form.types.js.map +1 -0
  367. package/dist/collection/helpers/Dom/template.js.map +1 -1
  368. package/dist/collection/helpers/Dom/template.types.js +2 -0
  369. package/dist/collection/helpers/Dom/template.types.js.map +1 -0
  370. package/dist/collection/helpers/Dom/win.js +2 -2
  371. package/dist/collection/helpers/Dom/win.js.map +1 -1
  372. package/dist/collection/helpers/Fragment.js.map +1 -1
  373. package/dist/collection/helpers/StorybookDocsTemplate.js +2 -2
  374. package/dist/collection/helpers/StorybookDocsTemplate.js.map +1 -1
  375. package/dist/collection/helpers/Validate/props.js +3 -3
  376. package/dist/collection/helpers/Validate/props.js.map +1 -1
  377. package/dist/collection/helpers/Validate/wcag.js +1 -1
  378. package/dist/collection/helpers/Validate/wcag.js.map +1 -1
  379. package/dist/collection/pages/Accordion.js +97 -2
  380. package/dist/collection/pages/Accordion.js.map +1 -1
  381. package/dist/collection/pages/Badge.js +27 -0
  382. package/dist/collection/pages/Badge.js.map +1 -1
  383. package/dist/collection/pages/Button.js +440 -120
  384. package/dist/collection/pages/Button.js.map +1 -1
  385. package/dist/collection/pages/Error.js +1 -1
  386. package/dist/collection/pages/Error.js.map +1 -1
  387. package/dist/collection/pages/Forms.js +32 -24
  388. package/dist/collection/pages/Forms.js.map +1 -1
  389. package/dist/collection/pages/Layout.js +65 -35
  390. package/dist/collection/pages/Layout.js.map +1 -1
  391. package/dist/collection/pages/Loading.js +3 -3
  392. package/dist/collection/pages/Loading.js.map +1 -1
  393. package/dist/collection/pages/Pagination.js +12 -2
  394. package/dist/collection/pages/Pagination.js.map +1 -1
  395. package/dist/collection/pages/Stepper.js +6 -6
  396. package/dist/collection/pages/Stepper.js.map +1 -1
  397. package/dist/collection/pages/Tabs.js +90 -0
  398. package/dist/collection/pages/Tabs.js.map +1 -1
  399. package/dist/collection/pages/Tiles.js +39 -0
  400. package/dist/collection/pages/Tiles.js.map +1 -1
  401. package/dist/collection/pages/ToastMessage.js +1 -1
  402. package/dist/collection/pages/ToastMessage.js.map +1 -1
  403. package/dist/collection/pages/ToastMessageCountdown.js +1 -1
  404. package/dist/collection/pages/ToastMessageCountdown.js.map +1 -1
  405. package/dist/collection/pages/Wizzard.js +8 -8
  406. package/dist/collection/pages/Wizzard.js.map +1 -1
  407. package/dist/collection/types/interfaces.js.map +1 -1
  408. package/dist/collection/utils/array.utils.js +2 -0
  409. package/dist/collection/utils/array.utils.js.map +1 -0
  410. package/dist/collection/utils/icon.utils.js +3 -4
  411. package/dist/collection/utils/icon.utils.js.map +1 -1
  412. package/dist/collection/utils/utils.js +1 -0
  413. package/dist/collection/utils/utils.js.map +1 -1
  414. package/dist/components/constants.js +6 -4
  415. package/dist/components/constants.js.map +1 -1
  416. package/dist/components/constants11.js +9 -3
  417. package/dist/components/constants11.js.map +1 -1
  418. package/dist/components/constants12.js +6 -3
  419. package/dist/components/constants12.js.map +1 -1
  420. package/dist/components/constants13.js +14 -4
  421. package/dist/components/constants13.js.map +1 -1
  422. package/dist/components/constants14.js +11 -11
  423. package/dist/components/constants14.js.map +1 -1
  424. package/dist/components/constants15.js +6 -3
  425. package/dist/components/constants15.js.map +1 -1
  426. package/dist/components/constants3.js +19 -13
  427. package/dist/components/constants3.js.map +1 -1
  428. package/dist/components/constants5.js +4 -3
  429. package/dist/components/constants5.js.map +1 -1
  430. package/dist/components/constants6.js +0 -2
  431. package/dist/components/constants6.js.map +1 -1
  432. package/dist/components/constants7.js +14 -8
  433. package/dist/components/constants7.js.map +1 -1
  434. package/dist/components/form.js +36 -8
  435. package/dist/components/form.js.map +1 -1
  436. package/dist/components/gov-accordion-item.js +9 -10
  437. package/dist/components/gov-accordion-item.js.map +1 -1
  438. package/dist/components/gov-accordion.js +12 -9
  439. package/dist/components/gov-accordion.js.map +1 -1
  440. package/dist/components/gov-alert.js +7 -4
  441. package/dist/components/gov-alert.js.map +1 -1
  442. package/dist/components/gov-app.js +824 -204
  443. package/dist/components/gov-app.js.map +1 -1
  444. package/dist/components/gov-attachments-item2.js +4 -2
  445. package/dist/components/gov-attachments-item2.js.map +1 -1
  446. package/dist/components/gov-attachments2.js +4 -2
  447. package/dist/components/gov-attachments2.js.map +1 -1
  448. package/dist/components/gov-backdrop2.js +8 -5
  449. package/dist/components/gov-backdrop2.js.map +1 -1
  450. package/dist/components/gov-badge2.js +24 -26
  451. package/dist/components/gov-badge2.js.map +1 -1
  452. package/dist/components/gov-breadcrumbs.js +4 -3
  453. package/dist/components/gov-breadcrumbs.js.map +1 -1
  454. package/dist/components/gov-button2.js +16 -25
  455. package/dist/components/gov-button2.js.map +1 -1
  456. package/dist/components/gov-card.js +4 -2
  457. package/dist/components/gov-card.js.map +1 -1
  458. package/dist/components/gov-container.js +1 -0
  459. package/dist/components/gov-container.js.map +1 -1
  460. package/dist/components/gov-cookiebar.js +1 -0
  461. package/dist/components/gov-cookiebar.js.map +1 -1
  462. package/dist/components/gov-empty.js +1 -0
  463. package/dist/components/gov-empty.js.map +1 -1
  464. package/dist/components/gov-error-code.js +1 -0
  465. package/dist/components/gov-error-code.js.map +1 -1
  466. package/dist/components/gov-form-autocomplete2.js +8 -8
  467. package/dist/components/gov-form-autocomplete2.js.map +1 -1
  468. package/dist/components/gov-form-checkbox.js +8 -16
  469. package/dist/components/gov-form-checkbox.js.map +1 -1
  470. package/dist/components/gov-form-control.js +27 -27
  471. package/dist/components/gov-form-control.js.map +1 -1
  472. package/dist/components/gov-form-file.js +4 -2
  473. package/dist/components/gov-form-file.js.map +1 -1
  474. package/dist/components/gov-form-group.js +1 -0
  475. package/dist/components/gov-form-group.js.map +1 -1
  476. package/dist/components/gov-form-input2.js +13 -18
  477. package/dist/components/gov-form-input2.js.map +1 -1
  478. package/dist/components/gov-form-label.js +1 -0
  479. package/dist/components/gov-form-label.js.map +1 -1
  480. package/dist/components/gov-form-message2.js +5 -5
  481. package/dist/components/gov-form-message2.js.map +1 -1
  482. package/dist/components/gov-form-multi-select.js +12 -11
  483. package/dist/components/gov-form-multi-select.js.map +1 -1
  484. package/dist/components/gov-form-password-power.d.ts +11 -0
  485. package/dist/components/gov-form-password-power.js +44 -0
  486. package/dist/components/gov-form-password-power.js.map +1 -0
  487. package/dist/components/gov-form-radio.js +7 -6
  488. package/dist/components/gov-form-radio.js.map +1 -1
  489. package/dist/components/gov-form-search.js +1 -2
  490. package/dist/components/gov-form-search.js.map +1 -1
  491. package/dist/components/gov-form-select2.js +12 -11
  492. package/dist/components/gov-form-select2.js.map +1 -1
  493. package/dist/components/gov-form-switch.js +7 -6
  494. package/dist/components/gov-form-switch.js.map +1 -1
  495. package/dist/components/gov-grid-item.js +2 -1
  496. package/dist/components/gov-grid-item.js.map +1 -1
  497. package/dist/components/gov-grid.js +1 -0
  498. package/dist/components/gov-grid.js.map +1 -1
  499. package/dist/components/gov-icon2.js +9 -3
  500. package/dist/components/gov-icon2.js.map +1 -1
  501. package/dist/components/{gov-layout-aside.d.ts → gov-layout-column.d.ts} +4 -4
  502. package/dist/components/gov-layout-column.js +39 -0
  503. package/dist/components/gov-layout-column.js.map +1 -0
  504. package/dist/components/gov-layout.js +17 -3
  505. package/dist/components/gov-layout.js.map +1 -1
  506. package/dist/components/gov-loading.js +2 -1
  507. package/dist/components/gov-loading.js.map +1 -1
  508. package/dist/components/gov-message.js +4 -1
  509. package/dist/components/gov-message.js.map +1 -1
  510. package/dist/components/gov-modal.js +23 -14
  511. package/dist/components/gov-modal.js.map +1 -1
  512. package/dist/components/gov-nav-item.js +1 -0
  513. package/dist/components/gov-nav-item.js.map +1 -1
  514. package/dist/components/gov-nav.js +3 -1
  515. package/dist/components/gov-nav.js.map +1 -1
  516. package/dist/components/gov-pagination.js +61 -19
  517. package/dist/components/gov-pagination.js.map +1 -1
  518. package/dist/components/gov-prompt.js +16 -7
  519. package/dist/components/gov-prompt.js.map +1 -1
  520. package/dist/components/gov-side-nav-item.js +2 -1
  521. package/dist/components/gov-side-nav-item.js.map +1 -1
  522. package/dist/components/gov-side-nav.js +3 -1
  523. package/dist/components/gov-side-nav.js.map +1 -1
  524. package/dist/components/gov-spacer.js +13 -14
  525. package/dist/components/gov-spacer.js.map +1 -1
  526. package/dist/components/gov-statsbar-item.js +2 -1
  527. package/dist/components/gov-statsbar-item.js.map +1 -1
  528. package/dist/components/gov-statsbar.js +8 -8
  529. package/dist/components/gov-statsbar.js.map +1 -1
  530. package/dist/components/gov-stepper-item.js +8 -10
  531. package/dist/components/gov-stepper-item.js.map +1 -1
  532. package/dist/components/gov-stepper.js +7 -7
  533. package/dist/components/gov-stepper.js.map +1 -1
  534. package/dist/components/gov-tabs-item.js +1 -0
  535. package/dist/components/gov-tabs-item.js.map +1 -1
  536. package/dist/components/gov-tabs.js +13 -10
  537. package/dist/components/gov-tabs.js.map +1 -1
  538. package/dist/components/gov-tile.js +3 -2
  539. package/dist/components/gov-tile.js.map +1 -1
  540. package/dist/components/gov-tiles.js +6 -3
  541. package/dist/components/gov-tiles.js.map +1 -1
  542. package/dist/components/gov-toast.js +22 -18
  543. package/dist/components/gov-toast.js.map +1 -1
  544. package/dist/components/gov-tooltip-content.js +1 -0
  545. package/dist/components/gov-tooltip-content.js.map +1 -1
  546. package/dist/components/gov-tooltip.js +14 -15
  547. package/dist/components/gov-tooltip.js.map +1 -1
  548. package/dist/components/gov-wizzard-item.js +8 -11
  549. package/dist/components/gov-wizzard-item.js.map +1 -1
  550. package/dist/components/gov-wizzard.js +7 -6
  551. package/dist/components/gov-wizzard.js.map +1 -1
  552. package/dist/components/index.d.ts +2 -2
  553. package/dist/components/index.js +2 -2
  554. package/dist/components/props.js +3 -3
  555. package/dist/components/props.js.map +1 -1
  556. package/dist/components/template.js.map +1 -1
  557. package/dist/{esm/utils-3a968bb9.js → components/utils.js} +3 -2
  558. package/dist/components/utils.js.map +1 -0
  559. package/dist/components/variants.js +1 -1
  560. package/dist/components/variants.js.map +1 -1
  561. package/dist/components/wcag.js +1 -1
  562. package/dist/components/wcag.js.map +1 -1
  563. package/dist/components/win.js +3 -32
  564. package/dist/components/win.js.map +1 -1
  565. package/dist/core/core.esm.js +1 -1
  566. package/dist/core/core.esm.js.map +1 -1
  567. package/dist/core/p-00e1e600.entry.js +2 -0
  568. package/dist/core/p-00e1e600.entry.js.map +1 -0
  569. package/dist/core/{p-bbd48feb.entry.js → p-01bdd4a4.entry.js} +2 -2
  570. package/dist/core/{p-bbd48feb.entry.js.map → p-01bdd4a4.entry.js.map} +1 -1
  571. package/dist/core/p-0284b5e2.js +2 -0
  572. package/dist/core/p-0284b5e2.js.map +1 -0
  573. package/dist/core/{p-58691740.js → p-03990da5.js} +2 -2
  574. package/dist/core/p-03990da5.js.map +1 -0
  575. package/dist/core/p-0950ba85.entry.js +2 -0
  576. package/dist/core/p-0950ba85.entry.js.map +1 -0
  577. package/dist/core/p-1020a160.js +2 -0
  578. package/dist/core/p-1020a160.js.map +1 -0
  579. package/dist/core/p-165fe5f4.entry.js +2 -0
  580. package/dist/core/p-165fe5f4.entry.js.map +1 -0
  581. package/dist/core/p-16608a87.entry.js +2 -0
  582. package/dist/core/p-16608a87.entry.js.map +1 -0
  583. package/dist/core/p-1bb5184f.entry.js +2 -0
  584. package/dist/core/p-1bb5184f.entry.js.map +1 -0
  585. package/dist/core/p-1cc7b8d3.entry.js +2 -0
  586. package/dist/core/p-1cc7b8d3.entry.js.map +1 -0
  587. package/dist/core/p-22722ff3.entry.js +2 -0
  588. package/dist/core/p-22722ff3.entry.js.map +1 -0
  589. package/dist/core/p-24cde59e.entry.js.map +1 -1
  590. package/dist/core/p-25380da6.entry.js +2 -0
  591. package/dist/core/p-25380da6.entry.js.map +1 -0
  592. package/dist/core/p-26acf964.js +2 -0
  593. package/dist/core/p-26acf964.js.map +1 -0
  594. package/dist/core/{p-f58b9eec.js → p-364b4792.js} +2 -2
  595. package/dist/core/p-364b4792.js.map +1 -0
  596. package/dist/core/p-3e9ba1c1.entry.js +2 -0
  597. package/dist/core/p-3e9ba1c1.entry.js.map +1 -0
  598. package/dist/core/p-3f37ddb6.js.map +1 -1
  599. package/dist/core/p-404f469e.js +2 -0
  600. package/dist/core/p-404f469e.js.map +1 -0
  601. package/dist/core/p-4b375a4d.entry.js +2 -0
  602. package/dist/core/p-4b375a4d.entry.js.map +1 -0
  603. package/dist/core/p-4d73d70e.entry.js +2 -0
  604. package/dist/core/p-4d73d70e.entry.js.map +1 -0
  605. package/dist/core/p-54f367db.entry.js +2 -0
  606. package/dist/core/p-54f367db.entry.js.map +1 -0
  607. package/dist/core/p-5b4e3bdf.entry.js +2 -0
  608. package/dist/core/p-5b4e3bdf.entry.js.map +1 -0
  609. package/dist/core/p-5defdc5e.js +2 -0
  610. package/dist/core/p-5defdc5e.js.map +1 -0
  611. package/dist/core/p-613d8ed8.entry.js +2 -0
  612. package/dist/core/p-613d8ed8.entry.js.map +1 -0
  613. package/dist/core/p-6278531b.js +2 -0
  614. package/dist/core/p-6278531b.js.map +1 -0
  615. package/dist/core/{p-6e1b9f39.entry.js → p-63d2e8ec.entry.js} +2 -2
  616. package/dist/core/p-63d2e8ec.entry.js.map +1 -0
  617. package/dist/core/p-64ced668.js +2 -0
  618. package/dist/core/p-64ced668.js.map +1 -0
  619. package/dist/core/p-68d968ac.entry.js +2 -0
  620. package/dist/core/p-68d968ac.entry.js.map +1 -0
  621. package/dist/core/p-692eb701.entry.js +2 -0
  622. package/dist/core/p-692eb701.entry.js.map +1 -0
  623. package/dist/core/p-72f16a95.entry.js +2 -0
  624. package/dist/core/{p-d9ffb84e.entry.js.map → p-72f16a95.entry.js.map} +1 -1
  625. package/dist/core/p-733bd593.entry.js.map +1 -1
  626. package/dist/core/p-76542f4f.js +2 -0
  627. package/dist/core/p-76542f4f.js.map +1 -0
  628. package/dist/core/p-7ac5f119.entry.js +2 -0
  629. package/dist/core/p-7ac5f119.entry.js.map +1 -0
  630. package/dist/core/p-7be3abb5.entry.js.map +1 -1
  631. package/dist/core/p-80e30702.js +2 -0
  632. package/dist/core/p-80e30702.js.map +1 -0
  633. package/dist/core/p-833ab414.entry.js +2 -0
  634. package/dist/core/p-833ab414.entry.js.map +1 -0
  635. package/dist/core/p-84fda9dd.entry.js +2 -0
  636. package/dist/core/p-84fda9dd.entry.js.map +1 -0
  637. package/dist/core/p-86a3c0d5.entry.js +2 -0
  638. package/dist/core/p-86a3c0d5.entry.js.map +1 -0
  639. package/dist/core/p-8965f84a.entry.js +2 -0
  640. package/dist/core/p-8965f84a.entry.js.map +1 -0
  641. package/dist/core/p-8a8d846c.entry.js +2 -0
  642. package/dist/core/{p-8e8340b0.entry.js.map → p-8a8d846c.entry.js.map} +1 -1
  643. package/dist/core/p-8dacc8dc.entry.js +2 -0
  644. package/dist/core/p-8dacc8dc.entry.js.map +1 -0
  645. package/dist/core/p-9144dde1.js +2 -0
  646. package/dist/core/p-9144dde1.js.map +1 -0
  647. package/dist/core/p-99155ec0.entry.js +2 -0
  648. package/dist/core/p-99155ec0.entry.js.map +1 -0
  649. package/dist/core/p-9c844f4d.entry.js +2 -0
  650. package/dist/core/p-9c844f4d.entry.js.map +1 -0
  651. package/dist/core/{p-cbf4ad73.entry.js → p-9ca0a11c.entry.js} +2 -2
  652. package/dist/core/{p-cbf4ad73.entry.js.map → p-9ca0a11c.entry.js.map} +1 -1
  653. package/dist/core/p-9dd1bbdd.entry.js.map +1 -1
  654. package/dist/core/p-a0c491a6.entry.js +2 -0
  655. package/dist/core/p-a0c491a6.entry.js.map +1 -0
  656. package/dist/core/p-a0dd0a95.entry.js +2 -0
  657. package/dist/core/{p-e52a042f.entry.js.map → p-a0dd0a95.entry.js.map} +1 -1
  658. package/dist/core/{p-64d3cf79.entry.js → p-a5e34e93.entry.js} +2 -2
  659. package/dist/core/p-a6c8d474.entry.js.map +1 -1
  660. package/dist/core/p-ae3e2d60.entry.js +2 -0
  661. package/dist/core/p-ae3e2d60.entry.js.map +1 -0
  662. package/dist/core/p-b966062a.entry.js +2 -0
  663. package/dist/core/p-b966062a.entry.js.map +1 -0
  664. package/dist/core/p-bd560ffc.entry.js +2 -0
  665. package/dist/core/{p-08524615.entry.js.map → p-bd560ffc.entry.js.map} +1 -1
  666. package/dist/core/{p-59581b1b.entry.js → p-c0d3d3e0.entry.js} +2 -2
  667. package/dist/core/{p-59581b1b.entry.js.map → p-c0d3d3e0.entry.js.map} +1 -1
  668. package/dist/core/{p-2b4acb01.js → p-c20102ff.js} +2 -2
  669. package/dist/core/p-c20102ff.js.map +1 -0
  670. package/dist/core/p-c9948e57.entry.js +2 -0
  671. package/dist/core/p-c9948e57.entry.js.map +1 -0
  672. package/dist/core/p-cd869237.js +2 -0
  673. package/dist/core/p-cd869237.js.map +1 -0
  674. package/dist/core/p-cf6576fd.entry.js +2 -0
  675. package/dist/core/p-cf6576fd.entry.js.map +1 -0
  676. package/dist/core/{p-90f818c0.entry.js → p-da2b921e.entry.js} +2 -2
  677. package/dist/core/p-da2b921e.entry.js.map +1 -0
  678. package/dist/core/p-e57d250f.entry.js +2 -0
  679. package/dist/core/p-e57d250f.entry.js.map +1 -0
  680. package/dist/core/p-e9c94ef7.entry.js +2 -0
  681. package/dist/core/p-e9c94ef7.entry.js.map +1 -0
  682. package/dist/core/p-eb1214ab.entry.js +2 -0
  683. package/dist/core/p-eb1214ab.entry.js.map +1 -0
  684. package/dist/core/p-ec617f18.entry.js +2 -0
  685. package/dist/core/p-ec617f18.entry.js.map +1 -0
  686. package/dist/core/p-ef79904e.js +2 -0
  687. package/dist/core/p-ef79904e.js.map +1 -0
  688. package/dist/core/p-f1fe9358.entry.js +2 -0
  689. package/dist/core/p-f1fe9358.entry.js.map +1 -0
  690. package/dist/core/p-f531f5c4.entry.js +2 -0
  691. package/dist/core/p-f531f5c4.entry.js.map +1 -0
  692. package/dist/core/p-f687452c.js +2 -0
  693. package/dist/core/p-f687452c.js.map +1 -0
  694. package/dist/core/p-fac1c202.entry.js +2 -0
  695. package/dist/core/p-fac1c202.entry.js.map +1 -0
  696. package/dist/core/p-fc9d66ae.entry.js +2 -0
  697. package/dist/core/{p-9baa1a0e.entry.js.map → p-fc9d66ae.entry.js.map} +1 -1
  698. package/dist/core/{p-99cc3dba.js → p-ff7365ae.js} +2 -2
  699. package/dist/core/p-ff7365ae.js.map +1 -0
  700. package/dist/core/p-ffb7495c.js +2 -0
  701. package/dist/core/p-ffb7495c.js.map +1 -0
  702. package/dist/custom-elements/index.d.ts +10 -10
  703. package/dist/custom-elements/index.js +1 -1
  704. package/dist/custom-elements/index.js.map +1 -1
  705. package/dist/esm/constants-037c35bc.js +22 -0
  706. package/dist/esm/constants-037c35bc.js.map +1 -0
  707. package/dist/esm/constants-136d4cd3.js +16 -0
  708. package/dist/esm/constants-136d4cd3.js.map +1 -0
  709. package/dist/esm/{constants-4d4cc5e1.js → constants-14a7ba8e.js} +7 -5
  710. package/dist/esm/constants-14a7ba8e.js.map +1 -0
  711. package/dist/esm/constants-24dad929.js +29 -0
  712. package/dist/esm/constants-24dad929.js.map +1 -0
  713. package/dist/esm/{constants-2cd89f93.js → constants-2b14bb01.js} +1 -3
  714. package/dist/esm/constants-2b14bb01.js.map +1 -0
  715. package/dist/esm/constants-2e8258cf.js +15 -0
  716. package/dist/esm/constants-2e8258cf.js.map +1 -0
  717. package/dist/esm/constants-3786b01b.js +22 -0
  718. package/dist/esm/constants-3786b01b.js.map +1 -0
  719. package/dist/esm/constants-3df712e2.js +13 -0
  720. package/dist/esm/constants-3df712e2.js.map +1 -0
  721. package/dist/esm/constants-45f6db4c.js +33 -0
  722. package/dist/esm/constants-45f6db4c.js.map +1 -0
  723. package/dist/esm/{constants-ec176a77.js → constants-78474786.js} +7 -4
  724. package/dist/esm/constants-78474786.js.map +1 -0
  725. package/dist/esm/constants-bf5a583f.js +24 -0
  726. package/dist/esm/constants-bf5a583f.js.map +1 -0
  727. package/dist/esm/constants-f7b618c2.js +23 -0
  728. package/dist/esm/constants-f7b618c2.js.map +1 -0
  729. package/dist/esm/core.js +1 -1
  730. package/dist/esm/{form-121eab06.js → form-95b9a91b.js} +36 -9
  731. package/dist/esm/form-95b9a91b.js.map +1 -0
  732. package/dist/esm/gov-accordion-item.entry.js +9 -9
  733. package/dist/esm/gov-accordion-item.entry.js.map +1 -1
  734. package/dist/esm/gov-accordion.entry.js +12 -11
  735. package/dist/esm/gov-accordion.entry.js.map +1 -1
  736. package/dist/esm/gov-alert.entry.js +7 -5
  737. package/dist/esm/gov-alert.entry.js.map +1 -1
  738. package/dist/esm/gov-app.entry.js +823 -204
  739. package/dist/esm/gov-app.entry.js.map +1 -1
  740. package/dist/esm/gov-attachments_3.entry.js +10 -10
  741. package/dist/esm/gov-attachments_3.entry.js.map +1 -1
  742. package/dist/esm/gov-backdrop.entry.js +8 -7
  743. package/dist/esm/gov-backdrop.entry.js.map +1 -1
  744. package/dist/esm/gov-badge.entry.js +24 -23
  745. package/dist/esm/gov-badge.entry.js.map +1 -1
  746. package/dist/esm/gov-breadcrumbs.entry.js +4 -5
  747. package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
  748. package/dist/esm/gov-button.entry.js +13 -24
  749. package/dist/esm/gov-button.entry.js.map +1 -1
  750. package/dist/esm/gov-card.entry.js +4 -4
  751. package/dist/esm/gov-card.entry.js.map +1 -1
  752. package/dist/esm/gov-container.entry.js.map +1 -1
  753. package/dist/esm/gov-cookiebar.entry.js.map +1 -1
  754. package/dist/esm/gov-empty.entry.js.map +1 -1
  755. package/dist/esm/gov-error-code.entry.js.map +1 -1
  756. package/dist/esm/gov-form-autocomplete.entry.js +8 -8
  757. package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
  758. package/dist/esm/gov-form-checkbox.entry.js +13 -22
  759. package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
  760. package/dist/esm/gov-form-control.entry.js +30 -29
  761. package/dist/esm/gov-form-control.entry.js.map +1 -1
  762. package/dist/esm/gov-form-file.entry.js +9 -9
  763. package/dist/esm/gov-form-file.entry.js.map +1 -1
  764. package/dist/esm/gov-form-input.entry.js +15 -21
  765. package/dist/esm/gov-form-input.entry.js.map +1 -1
  766. package/dist/esm/gov-form-multi-select.entry.js +13 -13
  767. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  768. package/dist/esm/gov-form-password-power.entry.js +24 -0
  769. package/dist/esm/gov-form-password-power.entry.js.map +1 -0
  770. package/dist/esm/gov-form-radio.entry.js +12 -12
  771. package/dist/esm/gov-form-radio.entry.js.map +1 -1
  772. package/dist/esm/gov-form-search.entry.js +0 -2
  773. package/dist/esm/gov-form-search.entry.js.map +1 -1
  774. package/dist/esm/gov-form-select.entry.js +16 -16
  775. package/dist/esm/gov-form-select.entry.js.map +1 -1
  776. package/dist/esm/gov-form-switch.entry.js +12 -12
  777. package/dist/esm/gov-form-switch.entry.js.map +1 -1
  778. package/dist/esm/gov-grid-item.entry.js +2 -3
  779. package/dist/esm/gov-grid-item.entry.js.map +1 -1
  780. package/dist/esm/gov-grid.entry.js +1 -2
  781. package/dist/esm/gov-grid.entry.js.map +1 -1
  782. package/dist/esm/gov-icon.entry.js +10 -5
  783. package/dist/esm/gov-icon.entry.js.map +1 -1
  784. package/dist/esm/gov-layout-column.entry.js +21 -0
  785. package/dist/esm/gov-layout-column.entry.js.map +1 -0
  786. package/dist/esm/gov-layout.entry.js +12 -3
  787. package/dist/esm/gov-layout.entry.js.map +1 -1
  788. package/dist/esm/gov-loading.entry.js +1 -1
  789. package/dist/esm/gov-loading.entry.js.map +1 -1
  790. package/dist/esm/gov-message.entry.js +4 -2
  791. package/dist/esm/gov-message.entry.js.map +1 -1
  792. package/dist/esm/gov-modal.entry.js +22 -16
  793. package/dist/esm/gov-modal.entry.js.map +1 -1
  794. package/dist/esm/gov-nav.entry.js +3 -3
  795. package/dist/esm/gov-pagination.entry.js +60 -20
  796. package/dist/esm/gov-pagination.entry.js.map +1 -1
  797. package/dist/esm/gov-prompt.entry.js +15 -9
  798. package/dist/esm/gov-prompt.entry.js.map +1 -1
  799. package/dist/esm/gov-side-nav-item.entry.js +1 -1
  800. package/dist/esm/gov-side-nav-item.entry.js.map +1 -1
  801. package/dist/esm/gov-side-nav.entry.js +3 -3
  802. package/dist/esm/gov-side-nav.entry.js.map +1 -1
  803. package/dist/esm/gov-spacer.entry.js +12 -14
  804. package/dist/esm/gov-spacer.entry.js.map +1 -1
  805. package/dist/esm/gov-statsbar-item.entry.js +4 -2
  806. package/dist/esm/gov-statsbar-item.entry.js.map +1 -1
  807. package/dist/esm/gov-statsbar.entry.js +8 -7
  808. package/dist/esm/gov-statsbar.entry.js.map +1 -1
  809. package/dist/esm/gov-stepper-item.entry.js +9 -9
  810. package/dist/esm/gov-stepper-item.entry.js.map +1 -1
  811. package/dist/esm/gov-stepper.entry.js +9 -8
  812. package/dist/esm/gov-stepper.entry.js.map +1 -1
  813. package/dist/esm/gov-tabs-item.entry.js +3 -3
  814. package/dist/esm/gov-tabs-item.entry.js.map +1 -1
  815. package/dist/esm/gov-tabs.entry.js +12 -12
  816. package/dist/esm/gov-tabs.entry.js.map +1 -1
  817. package/dist/esm/gov-tile.entry.js +2 -2
  818. package/dist/esm/gov-tile.entry.js.map +1 -1
  819. package/dist/esm/gov-tiles.entry.js +3 -2
  820. package/dist/esm/gov-tiles.entry.js.map +1 -1
  821. package/dist/esm/gov-toast.entry.js +21 -18
  822. package/dist/esm/gov-toast.entry.js.map +1 -1
  823. package/dist/esm/gov-tooltip-content.entry.js +3 -2
  824. package/dist/esm/gov-tooltip-content.entry.js.map +1 -1
  825. package/dist/esm/gov-tooltip.entry.js +15 -14
  826. package/dist/esm/gov-tooltip.entry.js.map +1 -1
  827. package/dist/esm/gov-wizzard-item.entry.js +10 -11
  828. package/dist/esm/gov-wizzard-item.entry.js.map +1 -1
  829. package/dist/esm/gov-wizzard.entry.js +9 -9
  830. package/dist/esm/gov-wizzard.entry.js.map +1 -1
  831. package/dist/esm/index-00e9a0d5.js +6 -6
  832. package/dist/esm/loader.js +1 -1
  833. package/dist/esm/{props-cb992af5.js → props-789f7529.js} +4 -4
  834. package/dist/esm/props-789f7529.js.map +1 -0
  835. package/dist/esm/template-10332292.js.map +1 -1
  836. package/dist/esm/utils-c057a3fa.js +35 -0
  837. package/dist/esm/utils-c057a3fa.js.map +1 -0
  838. package/dist/esm/{variants-b5641e3d.js → variants-2b936d58.js} +2 -2
  839. package/dist/esm/variants-2b936d58.js.map +1 -0
  840. package/dist/esm/{wcag-af732bfe.js → wcag-3792d4bb.js} +2 -2
  841. package/dist/esm/wcag-3792d4bb.js.map +1 -0
  842. package/dist/esm/{win-cb090c11.js → win-9c8460bb.js} +3 -3
  843. package/dist/esm/win-9c8460bb.js.map +1 -0
  844. package/dist/hydrate/index.js +1340 -615
  845. package/dist/types/components/gov-accordion/constants.d.ts +7 -6
  846. package/dist/types/components/gov-accordion/gov-accordion-item.d.ts +3 -3
  847. package/dist/types/components/gov-accordion/gov-accordion.d.ts +7 -3
  848. package/dist/types/components/gov-alert/constants.d.ts +4 -3
  849. package/dist/types/components/gov-app/gov-app.d.ts +1 -1
  850. package/dist/types/components/gov-attachments/gov-attachments-item.d.ts +1 -1
  851. package/dist/types/components/gov-backdrop/gov-backdrop.d.ts +1 -1
  852. package/dist/types/components/gov-badge/constants.d.ts +5 -2
  853. package/dist/types/components/gov-badge/gov-badge.d.ts +7 -12
  854. package/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.ts +1 -1
  855. package/dist/types/components/gov-button/constants.d.ts +21 -10
  856. package/dist/types/components/gov-button/gov-button.d.ts +6 -8
  857. package/dist/types/components/gov-cookiebar/gov-cookiebar.d.ts +1 -1
  858. package/dist/types/components/gov-form/autocomplete/constants.d.ts +7 -6
  859. package/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +3 -3
  860. package/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.types.d.ts +3 -0
  861. package/dist/types/components/gov-form/checkbox/constants.d.ts +4 -3
  862. package/dist/types/components/gov-form/checkbox/gov-form-checkbox.d.ts +3 -4
  863. package/dist/types/components/gov-form/control/constants.d.ts +4 -3
  864. package/dist/types/components/gov-form/control/gov-form-control.d.ts +3 -3
  865. package/dist/types/components/gov-form/file/gov-form-file.d.ts +1 -1
  866. package/dist/types/components/gov-form/file/gov-form-file.types.d.ts +6 -0
  867. package/dist/types/components/gov-form/input/constants.d.ts +27 -10
  868. package/dist/types/components/gov-form/input/gov-form-input.d.ts +5 -5
  869. package/dist/types/components/gov-form/message/constants.d.ts +4 -3
  870. package/dist/types/components/gov-form/message/gov-form-message.d.ts +3 -3
  871. package/dist/types/components/gov-form/multiselect/constants.d.ts +7 -6
  872. package/dist/types/components/gov-form/multiselect/gov-form-multi-select.d.ts +4 -4
  873. package/dist/types/components/gov-form/password-power/constants.d.ts +5 -0
  874. package/dist/types/components/gov-form/password-power/gov-form-password-power.d.ts +7 -0
  875. package/dist/types/components/gov-form/radio/constants.d.ts +4 -3
  876. package/dist/types/components/gov-form/radio/gov-form-radio.d.ts +2 -2
  877. package/dist/types/components/gov-form/search/constants.d.ts +0 -6
  878. package/dist/types/components/gov-form/select/constants.d.ts +7 -6
  879. package/dist/types/components/gov-form/select/gov-form-select.d.ts +3 -3
  880. package/dist/types/components/gov-form/switch/constants.d.ts +4 -3
  881. package/dist/types/components/gov-form/switch/gov-form-switch.d.ts +2 -2
  882. package/dist/types/components/gov-grid/constants.d.ts +0 -3
  883. package/dist/types/components/gov-icon/constants.d.ts +8 -2
  884. package/dist/types/components/gov-layout/constants.d.ts +14 -6
  885. package/dist/types/components/gov-layout/gov-layout-column.d.ts +6 -0
  886. package/dist/types/components/gov-layout/gov-layout.d.ts +14 -0
  887. package/dist/types/components/gov-message/constants.d.ts +4 -3
  888. package/dist/types/components/gov-message/gov-message.d.ts +2 -2
  889. package/dist/types/components/gov-modal/gov-modal.d.ts +3 -1
  890. package/dist/types/components/gov-pagination/constants.d.ts +12 -8
  891. package/dist/types/components/gov-pagination/gov-pagination.d.ts +8 -4
  892. package/dist/types/components/gov-promp/gov-prompt.d.ts +3 -1
  893. package/dist/types/components/gov-spacer/constants.d.ts +11 -4
  894. package/dist/types/components/gov-spacer/gov-spacer.d.ts +2 -2
  895. package/dist/types/components/gov-statsbar/constants.d.ts +8 -4
  896. package/dist/types/components/gov-statsbar/gov-statsbar-item.d.ts +1 -1
  897. package/dist/types/components/gov-statsbar/gov-statsbar.d.ts +1 -1
  898. package/dist/types/components/gov-stepper/constants.d.ts +7 -6
  899. package/dist/types/components/gov-stepper/gov-stepper-item.d.ts +3 -3
  900. package/dist/types/components/gov-stepper/gov-stepper.d.ts +4 -4
  901. package/dist/types/components/gov-tabs/constants.d.ts +14 -8
  902. package/dist/types/components/gov-tabs/gov-tabs.d.ts +9 -5
  903. package/dist/types/components/gov-tabs/gov-tabs.types.d.ts +8 -0
  904. package/dist/types/components/gov-tiles/gov-tiles.d.ts +4 -0
  905. package/dist/types/components/gov-toast/constants.d.ts +6 -5
  906. package/dist/types/components/gov-toast/gov-toast.d.ts +7 -6
  907. package/dist/types/components/gov-tooltip/constants.d.ts +9 -9
  908. package/dist/types/components/gov-tooltip/gov-tooltip.d.ts +4 -4
  909. package/dist/types/components/gov-wizzard/constants.d.ts +7 -6
  910. package/dist/types/components/gov-wizzard/gov-wizzard-item.d.ts +3 -3
  911. package/dist/types/components/gov-wizzard/gov-wizzard.d.ts +2 -2
  912. package/dist/types/components.d.ts +196 -163
  913. package/dist/types/helpers/Dom/form.d.ts +2 -2
  914. package/dist/types/helpers/Dom/form.types.d.ts +9 -0
  915. package/dist/types/helpers/Dom/template.d.ts +1 -1
  916. package/dist/types/helpers/Dom/template.types.d.ts +12 -0
  917. package/dist/types/helpers/Validate/props.d.ts +1 -1
  918. package/dist/types/types/interfaces.d.ts +1 -0
  919. package/dist/types/utils/array.utils.d.ts +1 -0
  920. package/dist/types/utils/utils.d.ts +1 -0
  921. package/package.json +1 -1
  922. package/dist/cjs/constants-0c6897bc.js.map +0 -1
  923. package/dist/cjs/constants-24f26d54.js +0 -15
  924. package/dist/cjs/constants-24f26d54.js.map +0 -1
  925. package/dist/cjs/constants-404ee283.js +0 -21
  926. package/dist/cjs/constants-404ee283.js.map +0 -1
  927. package/dist/cjs/constants-477ca85a.js.map +0 -1
  928. package/dist/cjs/constants-5c8f444a.js.map +0 -1
  929. package/dist/cjs/constants-5ca7e728.js +0 -18
  930. package/dist/cjs/constants-5ca7e728.js.map +0 -1
  931. package/dist/cjs/constants-8c9eeb15.js +0 -20
  932. package/dist/cjs/constants-8c9eeb15.js.map +0 -1
  933. package/dist/cjs/constants-a44c32bc.js.map +0 -1
  934. package/dist/cjs/constants-a92bbccb.js +0 -17
  935. package/dist/cjs/constants-a92bbccb.js.map +0 -1
  936. package/dist/cjs/constants-b39578d9.js +0 -29
  937. package/dist/cjs/constants-b39578d9.js.map +0 -1
  938. package/dist/cjs/constants-b3c2277b.js +0 -23
  939. package/dist/cjs/constants-b3c2277b.js.map +0 -1
  940. package/dist/cjs/constants-b8ec7b03.js +0 -32
  941. package/dist/cjs/constants-b8ec7b03.js.map +0 -1
  942. package/dist/cjs/form-d9f0f50c.js.map +0 -1
  943. package/dist/cjs/gov-layout-aside.cjs.entry.js +0 -26
  944. package/dist/cjs/gov-layout-aside.cjs.entry.js.map +0 -1
  945. package/dist/cjs/gov-layout-content.cjs.entry.js +0 -26
  946. package/dist/cjs/gov-layout-content.cjs.entry.js.map +0 -1
  947. package/dist/cjs/props-cc21d3d7.js.map +0 -1
  948. package/dist/cjs/utils-4ae73637.js.map +0 -1
  949. package/dist/cjs/variants-bacf037a.js.map +0 -1
  950. package/dist/cjs/wcag-eca97102.js.map +0 -1
  951. package/dist/cjs/win-ac5c1806.js.map +0 -1
  952. package/dist/collection/components/gov-layout/gov-layout-aside.js +0 -47
  953. package/dist/collection/components/gov-layout/gov-layout-aside.js.map +0 -1
  954. package/dist/collection/components/gov-layout/gov-layout-content.js +0 -47
  955. package/dist/collection/components/gov-layout/gov-layout-content.js.map +0 -1
  956. package/dist/collection/core/constants/breakpoint.js +0 -9
  957. package/dist/collection/core/constants/breakpoint.js.map +0 -1
  958. package/dist/components/gov-layout-aside.js +0 -41
  959. package/dist/components/gov-layout-aside.js.map +0 -1
  960. package/dist/components/gov-layout-content.d.ts +0 -11
  961. package/dist/components/gov-layout-content.js +0 -41
  962. package/dist/components/gov-layout-content.js.map +0 -1
  963. package/dist/core/p-08524615.entry.js +0 -2
  964. package/dist/core/p-097332b9.entry.js +0 -2
  965. package/dist/core/p-097332b9.entry.js.map +0 -1
  966. package/dist/core/p-09b38102.entry.js +0 -2
  967. package/dist/core/p-09b38102.entry.js.map +0 -1
  968. package/dist/core/p-1525ef03.entry.js +0 -2
  969. package/dist/core/p-1525ef03.entry.js.map +0 -1
  970. package/dist/core/p-1ffe4cac.entry.js +0 -2
  971. package/dist/core/p-1ffe4cac.entry.js.map +0 -1
  972. package/dist/core/p-22c3946b.entry.js +0 -2
  973. package/dist/core/p-22c3946b.entry.js.map +0 -1
  974. package/dist/core/p-28f08f8b.entry.js +0 -2
  975. package/dist/core/p-28f08f8b.entry.js.map +0 -1
  976. package/dist/core/p-2b19bea6.entry.js +0 -2
  977. package/dist/core/p-2b19bea6.entry.js.map +0 -1
  978. package/dist/core/p-2b4acb01.js.map +0 -1
  979. package/dist/core/p-2c25aac5.entry.js +0 -2
  980. package/dist/core/p-2c25aac5.entry.js.map +0 -1
  981. package/dist/core/p-2c9031ef.entry.js +0 -2
  982. package/dist/core/p-2c9031ef.entry.js.map +0 -1
  983. package/dist/core/p-3426a731.entry.js +0 -2
  984. package/dist/core/p-3426a731.entry.js.map +0 -1
  985. package/dist/core/p-3b8d7a9a.entry.js +0 -2
  986. package/dist/core/p-3b8d7a9a.entry.js.map +0 -1
  987. package/dist/core/p-44f22320.entry.js +0 -2
  988. package/dist/core/p-44f22320.entry.js.map +0 -1
  989. package/dist/core/p-468873ec.entry.js +0 -2
  990. package/dist/core/p-468873ec.entry.js.map +0 -1
  991. package/dist/core/p-48a7c794.entry.js +0 -2
  992. package/dist/core/p-48a7c794.entry.js.map +0 -1
  993. package/dist/core/p-4e21ca0f.entry.js +0 -2
  994. package/dist/core/p-4e21ca0f.entry.js.map +0 -1
  995. package/dist/core/p-58691740.js.map +0 -1
  996. package/dist/core/p-5f7e38b6.entry.js +0 -2
  997. package/dist/core/p-5f7e38b6.entry.js.map +0 -1
  998. package/dist/core/p-64445e87.js +0 -2
  999. package/dist/core/p-64445e87.js.map +0 -1
  1000. package/dist/core/p-68d4837b.entry.js +0 -2
  1001. package/dist/core/p-68d4837b.entry.js.map +0 -1
  1002. package/dist/core/p-6ce1f525.js +0 -2
  1003. package/dist/core/p-6ce1f525.js.map +0 -1
  1004. package/dist/core/p-6e1b9f39.entry.js.map +0 -1
  1005. package/dist/core/p-708963e6.js +0 -2
  1006. package/dist/core/p-708963e6.js.map +0 -1
  1007. package/dist/core/p-71134d97.js +0 -2
  1008. package/dist/core/p-71134d97.js.map +0 -1
  1009. package/dist/core/p-78a4be4b.entry.js +0 -2
  1010. package/dist/core/p-78a4be4b.entry.js.map +0 -1
  1011. package/dist/core/p-803629e9.entry.js +0 -2
  1012. package/dist/core/p-803629e9.entry.js.map +0 -1
  1013. package/dist/core/p-808cd4b7.entry.js +0 -2
  1014. package/dist/core/p-808cd4b7.entry.js.map +0 -1
  1015. package/dist/core/p-8e8340b0.entry.js +0 -2
  1016. package/dist/core/p-8ebc3217.js +0 -2
  1017. package/dist/core/p-8ebc3217.js.map +0 -1
  1018. package/dist/core/p-8eece26f.entry.js +0 -2
  1019. package/dist/core/p-8eece26f.entry.js.map +0 -1
  1020. package/dist/core/p-90f818c0.entry.js.map +0 -1
  1021. package/dist/core/p-951d9c21.js +0 -2
  1022. package/dist/core/p-951d9c21.js.map +0 -1
  1023. package/dist/core/p-9680b966.entry.js +0 -2
  1024. package/dist/core/p-9680b966.entry.js.map +0 -1
  1025. package/dist/core/p-9711e4e5.entry.js +0 -2
  1026. package/dist/core/p-9711e4e5.entry.js.map +0 -1
  1027. package/dist/core/p-99cc3dba.js.map +0 -1
  1028. package/dist/core/p-9baa1a0e.entry.js +0 -2
  1029. package/dist/core/p-a2f9daba.js +0 -2
  1030. package/dist/core/p-a2f9daba.js.map +0 -1
  1031. package/dist/core/p-a32723d4.entry.js +0 -2
  1032. package/dist/core/p-a32723d4.entry.js.map +0 -1
  1033. package/dist/core/p-a5b02584.js +0 -2
  1034. package/dist/core/p-a5b02584.js.map +0 -1
  1035. package/dist/core/p-b4581984.js +0 -2
  1036. package/dist/core/p-b4581984.js.map +0 -1
  1037. package/dist/core/p-b5935207.entry.js +0 -2
  1038. package/dist/core/p-b5935207.entry.js.map +0 -1
  1039. package/dist/core/p-ba500f74.entry.js +0 -2
  1040. package/dist/core/p-ba500f74.entry.js.map +0 -1
  1041. package/dist/core/p-c9e7a558.entry.js +0 -2
  1042. package/dist/core/p-c9e7a558.entry.js.map +0 -1
  1043. package/dist/core/p-c9f0d988.entry.js +0 -2
  1044. package/dist/core/p-c9f0d988.entry.js.map +0 -1
  1045. package/dist/core/p-cbe6523f.entry.js +0 -2
  1046. package/dist/core/p-cbe6523f.entry.js.map +0 -1
  1047. package/dist/core/p-cd4f034f.js +0 -2
  1048. package/dist/core/p-cd4f034f.js.map +0 -1
  1049. package/dist/core/p-d4aaff74.js +0 -2
  1050. package/dist/core/p-d4aaff74.js.map +0 -1
  1051. package/dist/core/p-d65f71e1.js +0 -2
  1052. package/dist/core/p-d65f71e1.js.map +0 -1
  1053. package/dist/core/p-d9ffb84e.entry.js +0 -2
  1054. package/dist/core/p-dc87f017.entry.js +0 -2
  1055. package/dist/core/p-dc87f017.entry.js.map +0 -1
  1056. package/dist/core/p-e52a042f.entry.js +0 -2
  1057. package/dist/core/p-eadaa1d1.entry.js +0 -2
  1058. package/dist/core/p-eadaa1d1.entry.js.map +0 -1
  1059. package/dist/core/p-ef3e7866.js +0 -2
  1060. package/dist/core/p-ef3e7866.js.map +0 -1
  1061. package/dist/core/p-f1226ef1.entry.js +0 -2
  1062. package/dist/core/p-f1226ef1.entry.js.map +0 -1
  1063. package/dist/core/p-f2dc8ce3.entry.js +0 -2
  1064. package/dist/core/p-f2dc8ce3.entry.js.map +0 -1
  1065. package/dist/core/p-f4030908.entry.js +0 -2
  1066. package/dist/core/p-f4030908.entry.js.map +0 -1
  1067. package/dist/core/p-f58b9eec.js.map +0 -1
  1068. package/dist/core/p-f82535b7.js +0 -2
  1069. package/dist/core/p-f82535b7.js.map +0 -1
  1070. package/dist/core/p-fc3c7246.entry.js +0 -2
  1071. package/dist/core/p-fc3c7246.entry.js.map +0 -1
  1072. package/dist/core/p-fd62c386.entry.js +0 -2
  1073. package/dist/core/p-fd62c386.entry.js.map +0 -1
  1074. package/dist/esm/constants-129909d1.js +0 -14
  1075. package/dist/esm/constants-129909d1.js.map +0 -1
  1076. package/dist/esm/constants-1f1d1d3e.js +0 -16
  1077. package/dist/esm/constants-1f1d1d3e.js.map +0 -1
  1078. package/dist/esm/constants-2cd89f93.js.map +0 -1
  1079. package/dist/esm/constants-3b157470.js +0 -23
  1080. package/dist/esm/constants-3b157470.js.map +0 -1
  1081. package/dist/esm/constants-3de0521d.js +0 -27
  1082. package/dist/esm/constants-3de0521d.js.map +0 -1
  1083. package/dist/esm/constants-4331e6d9.js +0 -12
  1084. package/dist/esm/constants-4331e6d9.js.map +0 -1
  1085. package/dist/esm/constants-4cdfde31.js +0 -14
  1086. package/dist/esm/constants-4cdfde31.js.map +0 -1
  1087. package/dist/esm/constants-4d4cc5e1.js.map +0 -1
  1088. package/dist/esm/constants-8f0bcad2.js +0 -21
  1089. package/dist/esm/constants-8f0bcad2.js.map +0 -1
  1090. package/dist/esm/constants-b49812cd.js +0 -16
  1091. package/dist/esm/constants-b49812cd.js.map +0 -1
  1092. package/dist/esm/constants-c8f57790.js +0 -19
  1093. package/dist/esm/constants-c8f57790.js.map +0 -1
  1094. package/dist/esm/constants-ec176a77.js.map +0 -1
  1095. package/dist/esm/form-121eab06.js.map +0 -1
  1096. package/dist/esm/gov-layout-aside.entry.js +0 -22
  1097. package/dist/esm/gov-layout-aside.entry.js.map +0 -1
  1098. package/dist/esm/gov-layout-content.entry.js +0 -22
  1099. package/dist/esm/gov-layout-content.entry.js.map +0 -1
  1100. package/dist/esm/props-cb992af5.js.map +0 -1
  1101. package/dist/esm/utils-3a968bb9.js.map +0 -1
  1102. package/dist/esm/variants-b5641e3d.js.map +0 -1
  1103. package/dist/esm/wcag-af732bfe.js.map +0 -1
  1104. package/dist/esm/win-cb090c11.js.map +0 -1
  1105. package/dist/types/components/gov-layout/gov-layout-aside.d.ts +0 -10
  1106. package/dist/types/components/gov-layout/gov-layout-content.d.ts +0 -10
  1107. package/dist/types/core/constants/breakpoint.d.ts +0 -8
  1108. /package/dist/core/{p-64d3cf79.entry.js.map → p-a5e34e93.entry.js.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{r as o,h as t,H as i,g as e}from"./p-682c7cc6.js";import{a as r}from"./p-561fa17b.js";import{g as n}from"./p-3f37ddb6.js";const l={root:"gov-tile",icon:"gov-tile__icon",arrow:"gov-tile__arrow",title:"gov-tile__title",link:"gov-tile__link",content:"gov-tile__content"};const a='.gov-tile__link::before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:1}.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-tile{position:relative;display:block;width:100%;padding:0.75rem;transition:background-color 150ms}.gov-tile__icon{display:flex;margin:0rem 0rem 0.75rem;color:var(--gov-tile-main-color, var(--gov-color-primary))}.gov-tile__icon .gov-icon{width:2.5rem;height:2.5rem}.gov-tile__title{font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing);margin:0 0 0.5rem}.gov-tile__link{display:flex;gap:0.5rem;justify-content:space-between;color:var(--gov-tile-main-color, var(--gov-color-primary));text-decoration:none}.gov-tile__arrow{flex:0 0 auto;width:0.75rem;height:2rem;margin:0.5rem;color:inherit}.gov-tile__content{color:var(--gov-tile-text-color, var(--gov-color-secondary-700))}.gov-tile__content>*:last-child{margin-bottom:0}.gov-tile__content a{position:relative;z-index:1}@media not all and (pointer: coarse){.gov-tile[href]:hover{background:var(--gov-tile-hover-bg, var(--gov-color-primary-200))}.gov-tile[href]:hover .gov-tile__link{color:var(--gov-tile-main-color, var(--gov-color-primary))}}@media (min-width: 30em){.gov-tile[promotion=""],.gov-tile[promotion=true i],.gov-tile[promotion="1"]{display:grid;grid-template-columns:auto 1fr;gap:0 0.875rem}.gov-tile[promotion=""] .gov-tile__icon,.gov-tile[promotion=true i] .gov-tile__icon,.gov-tile[promotion="1"] .gov-tile__icon{grid-area:1/1/3/1;margin:0}.gov-tile[promotion=""] .gov-tile__title,.gov-tile[promotion=true i] .gov-tile__title,.gov-tile[promotion="1"] .gov-tile__title{grid-area:1/2/1/2}.gov-tile[promotion=""] .gov-tile__content,.gov-tile[promotion=true i] .gov-tile__content,.gov-tile[promotion="1"] .gov-tile__content{grid-area:2/2/2/2}}@media (min-width: 48em){.gov-tile{padding:1.5rem}.gov-tile__icon{margin:0rem 0rem 1.5rem}.gov-tile__icon .gov-icon{width:3rem;height:3rem}}@media (min-width: 64em){.gov-tile[promotion=""],.gov-tile[promotion=true i],.gov-tile[promotion="1"]{gap:0 1.625rem}}';const g=class{constructor(t){o(this,t);this.promotion=false;this.href=undefined;this.name=undefined;this.h=n(this.host)}validateName(o){if(!o){r(`[${l.root}]: Parameter title is required.`)}}componentWillLoad(){this.validateName(this.name)}render(){return t(i,{class:this.h.classes(l.root),promotion:this.promotion},this.h.hasSlot("icon")&&t("div",{class:l.icon},t("slot",{name:"icon"})),t("h3",{class:l.title},this.href?t("a",{href:this.href,class:l.link},this.name,t("gov-icon",{class:l.arrow,name:"chevron-right"})):t("span",null,this.name)),t("div",{class:l.content},t("slot",null)))}get host(){return e(this)}static get watchers(){return{name:["validateName"]}}};g.style=a;export{g as gov_tile};
2
+ //# sourceMappingURL=p-a0dd0a95.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../packages/core/src/components/gov-tile/constants.ts","../../../packages/core/src/components/gov-tile/gov-tile.scss?tag=gov-tile","../../../packages/core/src/components/gov-tile/gov-tile.tsx"],"names":["TileClass","root","icon","arrow","title","link","content","govTileCss","GovTile","[object Object]","hostRef","this","h","govHost","host","newValue","govErrorLog","validateName","name","Host","class","classes","promotion","hasSlot","href"],"mappings":"iIAAO,MAAMA,EAAY,CACxBC,KAAM,WACNC,KAAM,iBACNC,MAAO,kBACPC,MAAO,kBACPC,KAAM,iBACNC,QAAS,qBCNV,MAAMC,EAAa,guECUNC,EAAO,MAGnBC,YAAAC,4BAQsC,8CAPrCC,KAAKC,EAAIC,EAAQF,KAAKG,MAmBvBL,aAAaM,GACZ,IAAKA,EAAU,CACdC,EAAY,IAAIhB,EAAUC,wCAI5BQ,oBACCE,KAAKM,aAAaN,KAAKO,MAGxBT,SAEC,OACCG,EAACO,EAAI,CAACC,MAAOT,KAAKC,EAAES,QAAQrB,EAAUC,MAAOqB,UAAWX,KAAKW,WAC3DX,KAAKC,EAAEW,QAAQ,SACfX,EAAA,MAAA,CAAKQ,MAAOpB,EAAUE,MACrBU,EAAA,OAAA,CAAMM,KAAK,UAGbN,EAAA,KAAA,CAAIQ,MAAOpB,EAAUI,OACnBO,KAAKa,KACLZ,EAAA,IAAA,CAAGY,KAAMb,KAAKa,KAAMJ,MAAOpB,EAAUK,MACnCM,KAAKO,KACNN,EAAA,WAAA,CAAUQ,MAAOpB,EAAUG,MAAOe,KAAK,iBAGxCN,EAAA,OAAA,KAAOD,KAAKO,OAGdN,EAAA,MAAA,CAAKQ,MAAOpB,EAAUM,SACrBM,EAAA,OAAA","sourcesContent":["export const TileClass = {\n\troot: 'gov-tile',\n\ticon: 'gov-tile__icon',\n\tarrow: 'gov-tile__arrow',\n\ttitle: 'gov-tile__title',\n\tlink: 'gov-tile__link',\n\tcontent: 'gov-tile__content',\n}\n","/*\n * Tile\n */\n\n$class: \".gov-tile\";\n\n#{$class} {\n\t@include base();\n\tpadding: rem-calc(12);\n\ttransition: background-color $t;\n\t&__icon {\n\t\tdisplay: flex;\n\t\tmargin: rem-calc(0 0 12);\n\t\tcolor: $tile-icon-color;\n\t\t.gov-icon {\n\t\t\twidth: rem-calc(40);\n\t\t\theight: rem-calc(40);\n\t\t}\n\t}\n\t&__title {\n\t\t@include typography($font-size-xl);\n\t\tmargin: 0 0 rem-calc(8);\n\t}\n\t&__link {\n\t\t@extend %link-mask;\n\t\tdisplay: flex;\n\t\tgap: rem-calc(8);\n\t\tjustify-content: space-between;\n\t\tcolor: $tile-main-color;\n\t\ttext-decoration: none;\n\t}\n\t&__arrow {\n\t\tflex: 0 0 auto;\n\t\twidth: rem-calc(12);\n\t\theight: rem-calc(32);\n\t\tmargin: rem-calc(8);\n\t\tcolor: inherit;\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t\tcolor: $tile-text-color;\n\t\ta {\n\t\t\tposition: relative;\n\t\t\tz-index: 1;\n\t\t}\n\t}\n\n\t// HOVERS\n\t&[href] {\n\t\t@include hover() {\n\t\t\tbackground: $tile-hover-bg;\n\t\t\t#{$class} {\n\t\t\t\t&__link {\n\t\t\t\t\tcolor: $tile-main-color;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t// VARIANTS\n\t\t@include parameter(\"promotion\") {\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-columns: auto 1fr;\n\t\t\tgap: 0 rem-calc(14);\n\t\t\t#{$class} {\n\t\t\t\t&__icon {\n\t\t\t\t\tgrid-area: 1/1/3/1;\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\t\t\t\t&__title {\n\t\t\t\t\tgrid-area: 1/2/1/2;\n\t\t\t\t}\n\t\t\t\t&__content {\n\t\t\t\t\tgrid-area: 2/2/2/2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\tpadding: rem-calc(24);\n\t\t&__icon {\n\t\t\tmargin: rem-calc(0 0 24);\n\t\t\t.gov-icon {\n\t\t\t\twidth: rem-calc(48);\n\t\t\t\theight: rem-calc(48);\n\t\t\t}\n\t\t}\n\t}\n\t@include mq($from: lg) {\n\t\t// VARIANTS\n\t\t@include parameter(\"promotion\") {\n\t\t\tgap: 0 rem-calc(26);\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\nimport { TileClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.d'\n\n@Component({\n\ttag: 'gov-tile',\n\tstyleUrl: 'gov-tile.scss',\n})\nexport class GovTile {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovTileElement\n\t/**\n\t * Style variation of the card.\n\t */\n\t@Prop() readonly promotion: boolean = false\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 * Item name\n\t */\n\t@Prop() readonly name: string\n\n\t@Watch('name')\n\tvalidateName(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${TileClass.root}]: Parameter title is required.`)\n\t\t}\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateName(this.name)\n\t}\n\n\trender() {\n\t\t// tag type\n\t\treturn (\n\t\t\t<Host class={this.h.classes(TileClass.root)} promotion={this.promotion}>\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<div class={TileClass.icon}>\n\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<h3 class={TileClass.title}>\n\t\t\t\t\t{this.href ? (\n\t\t\t\t\t\t<a href={this.href} class={TileClass.link}>\n\t\t\t\t\t\t\t{this.name}\n\t\t\t\t\t\t\t<gov-icon class={TileClass.arrow} name=\"arrow-right\"></gov-icon>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<span>{this.name}</span>\n\t\t\t\t\t)}\n\t\t\t\t</h3>\n\t\t\t\t<div class={TileClass.content}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
1
+ {"version":3,"sources":["../../../packages/core/src/components/gov-tile/constants.ts","../../../packages/core/src/components/gov-tile/gov-tile.scss?tag=gov-tile","../../../packages/core/src/components/gov-tile/gov-tile.tsx"],"names":["TileClass","root","icon","arrow","title","link","content","govTileCss","GovTile","[object Object]","hostRef","this","h","govHost","host","newValue","govErrorLog","validateName","name","Host","class","classes","promotion","hasSlot","href"],"mappings":"iIAAO,MAAMA,EAAY,CACxBC,KAAM,WACNC,KAAM,iBACNC,MAAO,kBACPC,MAAO,kBACPC,KAAM,iBACNC,QAAS,qBCNV,MAAMC,EAAa,8tECUNC,EAAO,MAGnBC,YAAAC,4BAQsC,8CAPrCC,KAAKC,EAAIC,EAAQF,KAAKG,MAmBvBL,aAAaM,GACZ,IAAKA,EAAU,CACdC,EAAY,IAAIhB,EAAUC,wCAI5BQ,oBACCE,KAAKM,aAAaN,KAAKO,MAGxBT,SAEC,OACCG,EAACO,EAAI,CAACC,MAAOT,KAAKC,EAAES,QAAQrB,EAAUC,MAAOqB,UAAWX,KAAKW,WAC3DX,KAAKC,EAAEW,QAAQ,SACfX,EAAA,MAAA,CAAKQ,MAAOpB,EAAUE,MACrBU,EAAA,OAAA,CAAMM,KAAK,UAGbN,EAAA,KAAA,CAAIQ,MAAOpB,EAAUI,OACnBO,KAAKa,KACLZ,EAAA,IAAA,CAAGY,KAAMb,KAAKa,KAAMJ,MAAOpB,EAAUK,MACnCM,KAAKO,KACNN,EAAA,WAAA,CAAUQ,MAAOpB,EAAUG,MAAOe,KAAK,mBAGxCN,EAAA,OAAA,KAAOD,KAAKO,OAGdN,EAAA,MAAA,CAAKQ,MAAOpB,EAAUM,SACrBM,EAAA,OAAA","sourcesContent":["export const TileClass = {\n\troot: 'gov-tile',\n\ticon: 'gov-tile__icon',\n\tarrow: 'gov-tile__arrow',\n\ttitle: 'gov-tile__title',\n\tlink: 'gov-tile__link',\n\tcontent: 'gov-tile__content',\n}\n","/*\n * Tile\n */\n\n$class: \".gov-tile\";\n\n#{$class} {\n\t@include base();\n\tpadding: rem-calc(12);\n\ttransition: background-color $t;\n\t&__icon {\n\t\tdisplay: flex;\n\t\tmargin: rem-calc(0 0 12);\n\t\tcolor: $tile-main-color;\n\t\t.gov-icon {\n\t\t\twidth: rem-calc(40);\n\t\t\theight: rem-calc(40);\n\t\t}\n\t}\n\t&__title {\n\t\t@include typography($font-size-xl);\n\t\tmargin: 0 0 rem-calc(8);\n\t}\n\t&__link {\n\t\t@extend %link-mask;\n\t\tdisplay: flex;\n\t\tgap: rem-calc(8);\n\t\tjustify-content: space-between;\n\t\tcolor: $tile-main-color;\n\t\ttext-decoration: none;\n\t}\n\t&__arrow {\n\t\tflex: 0 0 auto;\n\t\twidth: rem-calc(12);\n\t\theight: rem-calc(32);\n\t\tmargin: rem-calc(8);\n\t\tcolor: inherit;\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t\tcolor: $tile-text-color;\n\t\ta {\n\t\t\tposition: relative;\n\t\t\tz-index: 1;\n\t\t}\n\t}\n\n\t// HOVERS\n\t&[href] {\n\t\t@include hover() {\n\t\t\tbackground: $tile-hover-bg;\n\t\t\t#{$class} {\n\t\t\t\t&__link {\n\t\t\t\t\tcolor: $tile-main-color;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t// VARIANTS\n\t\t@include parameter(\"promotion\") {\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-columns: auto 1fr;\n\t\t\tgap: 0 rem-calc(14);\n\t\t\t#{$class} {\n\t\t\t\t&__icon {\n\t\t\t\t\tgrid-area: 1/1/3/1;\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\t\t\t\t&__title {\n\t\t\t\t\tgrid-area: 1/2/1/2;\n\t\t\t\t}\n\t\t\t\t&__content {\n\t\t\t\t\tgrid-area: 2/2/2/2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\tpadding: rem-calc(24);\n\t\t&__icon {\n\t\t\tmargin: rem-calc(0 0 24);\n\t\t\t.gov-icon {\n\t\t\t\twidth: rem-calc(48);\n\t\t\t\theight: rem-calc(48);\n\t\t\t}\n\t\t}\n\t}\n\t@include mq($from: lg) {\n\t\t// VARIANTS\n\t\t@include parameter(\"promotion\") {\n\t\t\tgap: 0 rem-calc(26);\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\nimport { TileClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-tile',\n\tstyleUrl: 'gov-tile.scss',\n})\nexport class GovTile {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovTileElement\n\t/**\n\t * Style variation of the card.\n\t */\n\t@Prop() readonly promotion: boolean = false\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 * Item name\n\t */\n\t@Prop() readonly name: string\n\n\t@Watch('name')\n\tvalidateName(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${TileClass.root}]: Parameter title is required.`)\n\t\t}\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateName(this.name)\n\t}\n\n\trender() {\n\t\t// tag type\n\t\treturn (\n\t\t\t<Host class={this.h.classes(TileClass.root)} promotion={this.promotion}>\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<div class={TileClass.icon}>\n\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<h3 class={TileClass.title}>\n\t\t\t\t\t{this.href ? (\n\t\t\t\t\t\t<a href={this.href} class={TileClass.link}>\n\t\t\t\t\t\t\t{this.name}\n\t\t\t\t\t\t\t<gov-icon class={TileClass.arrow} name=\"chevron-right\"></gov-icon>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<span>{this.name}</span>\n\t\t\t\t\t)}\n\t\t\t\t</h3>\n\t\t\t\t<div class={TileClass.content}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as t,h as a,H as e,g as s}from"./p-682c7cc6.js";import{N as i}from"./p-a6d14a47.js";import{v as n}from"./p-f58b9eec.js";import{c as o}from"./p-2b4acb01.js";import{d as r}from"./p-58691740.js";import"./p-561fa17b.js";import"./p-24636c53.js";const l=".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-nav{position:relative;display:block;width:100%;font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);background:var(--gov-nav-bg, var(--gov-color-primary));font-weight:bold;letter-spacing:0.0125em;text-transform:uppercase}@media (min-width: 48em){.gov-nav{text-align:center}.gov-nav__nav{display:flex;justify-content:space-between}}";const p=class{constructor(a){t(this,a);this.wcagLabel=undefined;this.wcagLabelledBy=undefined}async componentDidRender(){if(o()){await r(500);await this.validateWcag()}}render(){return a(e,{class:i.root},a("nav",{class:i.nav,role:"list","arial-label":this.wcagLabel,"arial-labelledby":this.wcagLabelledBy},a("slot",null)))}async validateWcag(){n(this.wcagLabel,this.wcagLabelledBy,i.root)}get host(){return s(this)}};p.style=l;export{p as gov_nav};
2
- //# sourceMappingURL=p-64d3cf79.entry.js.map
1
+ import{r as t,h as a,H as e,g as s}from"./p-682c7cc6.js";import{N as i}from"./p-a6d14a47.js";import{v as n}from"./p-364b4792.js";import{c as o}from"./p-c20102ff.js";import{d as r}from"./p-03990da5.js";import"./p-561fa17b.js";import"./p-24636c53.js";const l=".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-nav{position:relative;display:block;width:100%;font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);background:var(--gov-nav-bg, var(--gov-color-primary));font-weight:bold;letter-spacing:0.0125em;text-transform:uppercase}@media (min-width: 48em){.gov-nav{text-align:center}.gov-nav__nav{display:flex;justify-content:space-between}}";const p=class{constructor(a){t(this,a);this.wcagLabel=undefined;this.wcagLabelledBy=undefined}async componentDidRender(){if(o()){await r(500);await this.validateWcag()}}render(){return a(e,{class:i.root},a("nav",{class:i.nav,role:"list","arial-label":this.wcagLabel,"arial-labelledby":this.wcagLabelledBy},a("slot",null)))}async validateWcag(){n(this.wcagLabel,this.wcagLabelledBy,i.root)}get host(){return s(this)}};p.style=l;export{p as gov_nav};
2
+ //# sourceMappingURL=p-a5e34e93.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../packages/core/src/components/gov-container/constants.tsx","../../../packages/core/src/components/gov-container/gov-container.scss?tag=gov-container","../../../packages/core/src/components/gov-container/gov-container.tsx"],"names":["ContainerClass","root","govContainerCss","GovContainer","[object Object]","hostRef","this","h","govHost","host","Host","class","classes","Promise","resolve","slottedChildren"],"mappings":"oGAAO,MAAMA,EAAiB,CAC7BC,KAAM,iBCDP,MAAMC,EAAkB,4mBCSXC,EAAY,MAGxBC,YAAAC,aACCC,KAAKC,EAAIC,EAAQF,KAAKG,MAKvBL,SACC,OACCG,EAACG,EAAI,CAACC,MAAOL,KAAKC,EAAEK,QAAQZ,EAAeC,OAC1CM,EAAA,OAAA,OAWHH,wBACC,OAAOS,QAAQC,QAAQC,EAAgBT,KAAKG","sourcesContent":["export const ContainerClass = {\n\troot: 'gov-container',\n}\n","/*\n * Container\n */\n\n$class: \".gov-container\";\n\n#{$class} {\n\t@include container();\n}\n","import { Component, Element, h, Host, Method } from \"@stencil/core\"\nimport { govHost, slottedChildren } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.d\"\nimport { ContainerClass } from \"./constants\"\n\n@Component({\n\ttag: \"gov-container\",\n\tstyleUrl: \"gov-container.scss\",\n})\nexport class GovContainer {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovContainerElement\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ContainerClass.root)}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns slotted children\n\t *\n\t * @return {Promise<Node[]>}\n\t */\n\t@Method()\n\tasync slottedChildren(): Promise<Node[]> {\n\t\treturn Promise.resolve(slottedChildren(this.host))\n\t}\n}\n"]}
1
+ {"version":3,"sources":["../../../packages/core/src/components/gov-container/constants.tsx","../../../packages/core/src/components/gov-container/gov-container.scss?tag=gov-container","../../../packages/core/src/components/gov-container/gov-container.tsx"],"names":["ContainerClass","root","govContainerCss","GovContainer","[object Object]","hostRef","this","h","govHost","host","Host","class","classes","Promise","resolve","slottedChildren"],"mappings":"oGAAO,MAAMA,EAAiB,CAC7BC,KAAM,iBCDP,MAAMC,EAAkB,4mBCSXC,EAAY,MAGxBC,YAAAC,aACCC,KAAKC,EAAIC,EAAQF,KAAKG,MAKvBL,SACC,OACCG,EAACG,EAAI,CAACC,MAAOL,KAAKC,EAAEK,QAAQZ,EAAeC,OAC1CM,EAAA,OAAA,OAWHH,wBACC,OAAOS,QAAQC,QAAQC,EAAgBT,KAAKG","sourcesContent":["export const ContainerClass = {\n\troot: 'gov-container',\n}\n","/*\n * Container\n */\n\n$class: \".gov-container\";\n\n#{$class} {\n\t@include container();\n}\n","import { Component, Element, h, Host, Method } from '@stencil/core'\nimport { govHost, slottedChildren } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { ContainerClass } from './constants'\n\n@Component({\n\ttag: 'gov-container',\n\tstyleUrl: 'gov-container.scss',\n})\nexport class GovContainer {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovContainerElement\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ContainerClass.root)}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns slotted children\n\t *\n\t * @return {Promise<Node[]>}\n\t */\n\t@Method()\n\tasync slottedChildren(): Promise<Node[]> {\n\t\treturn Promise.resolve(slottedChildren(this.host))\n\t}\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as i,h as e,H as s,g as o}from"./p-682c7cc6.js";import{c as a}from"./p-24636c53.js";import{F as r,a as h,b as n}from"./p-f687452c.js";import{v as l}from"./p-26acf964.js";import{t as m,h as c}from"./p-03990da5.js";import{a as d}from"./p-3f37ddb6.js";import"./p-55500e5a.js";import"./p-ff7365ae.js";import"./p-561fa17b.js";const f='.gov-form-autocomplete__list{margin:0;padding:0}.gov-form-autocomplete__list>.gov-form-autocomplete__item{margin:0;padding:0;background:none}.gov-form-autocomplete__list>.gov-form-autocomplete__item::before{display:none}.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-form-autocomplete{position:relative;display:block;width:100%}.gov-form-autocomplete__list{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);position:absolute;top:100%;right:0;left:0;z-index:5;max-height:14.0625rem;margin-top:0.5rem;border:var(--gov-autocomplete-item-hover, 0.0625rem solid var(--gov-color-secondary-500));border-radius:var(--gov-border-radius, 0.1875rem);background:var(--gov-autocomplete-bg, var(--gov-color-neutral-white));overflow-x:hidden;overflow-y:auto;overscroll-behavior:none}.gov-form-autocomplete__list>.gov-form-autocomplete__item{padding:0.75rem 0.5rem;cursor:pointer}.gov-form-autocomplete__list:empty{display:none}.gov-form-autocomplete__item[aria-selected=""],.gov-form-autocomplete__item[aria-selected=true i],.gov-form-autocomplete__item[aria-selected="1"]{background:var(--gov-autocomplete-item-select, var(--gov-color-secondary-400))}@media not all and (pointer: coarse){.gov-form-autocomplete__item:hover{background:var(--gov-autocomplete-item-hover, var(--gov-color-primary-100))}}';const p=class{constructor(e){t(this,e);this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.govSelect=i(this,"gov-select",7);this.templateResolver=t=>t[this.nameKey];this.value="";this.identifier=undefined;this.variant=undefined;this.success=undefined;this.size="m";this.nameKey="name";this.name=undefined;this.required=false;this.disabled=undefined;this.placeholder=undefined;this.readonly=undefined;this.invalid=undefined;this.minlength=2;this.maxlength=undefined;this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagOwns=undefined;this.focused=undefined;this.processing=false;this.arrowCounter=-1;this.list=[];this.listBoxId=a("GovListBox")}validateVariant(t){l(h,t,r.root)}validateSize(t){l(n,t,r.root)}onArrowUp(){if(this.arrowCounter>0){this.arrowCounter=this.arrowCounter-1}}onArrowDown(){if(this.arrowCounter<this.list.length-1){this.arrowCounter=this.arrowCounter+1}}doSearch(){if(Number.isInteger(this.minlength)&&String(this.value).length<=this.minlength&&this.minlength){this.list=[];this.arrowCounter=-1;this.processing=false;return}if(this.searchCallback){this.processing=true;this.searchCallback(this.value).then((t=>this.list=t)).catch((()=>this.list=[])).finally((()=>{this.arrowCounter=-1;this.processing=false}))}}componentWillLoad(){this.validateVariant(this.variant);this.validateSize(this.size)}render(){return e(s,{class:r.root,size:this.size,variant:this.variant},e("gov-form-input",{placeholder:this.placeholder,name:this.name,disabled:this.disabled,readonly:this.readonly,autocomplete:false,size:this.size,variant:this.variant,required:this.required,invalid:this.invalid,role:"searchbox",value:this.value,minlength:this.minlength,maxlength:this.maxlength,"on-gov-input":m(this.onInputHandler.bind(this),200),"on-gov-keyup":this.onKeyUpHandler.bind(this),"on-gov-focus":this.onFocusHandler.bind(this),"on-gov-blur":this.onBlurHandler.bind(this),wcagAutocomplete:"list",wcagDescribedBy:this.wcagDescribedBy,wcagLabelledBy:this.wcagLabelledBy,wcagOwns:[this.listBoxId,this.wcagOwns].join(" "),wcagExpanded:this.list.length&&this.focused,ref:t=>this.inputRef=t},e("slot",{slot:"right-icon",name:"right-icon"})),e("ul",{class:r.list,role:"listbox",id:this.listBoxId},this.list.map(((t,i)=>{const s=this.arrowCounter===i;return e("li",{class:r.item,innerHTML:this.templateResolver(t,s),role:"option","aria-posinset":i,tabindex:s?0:-1,"aria-setsize":this.list.length,onClick:()=>this.onSelectHandler(i),"aria-selected":d(s)})}))))}onFocusHandler(t){this.focused=true;this.arrowCounter=-1;if((this.value||this.minlength===0)&&this.searchCallback){this.doSearch()}t.stopPropagation();this.govFocus.emit(t)}onBlurHandler(t){this.focused=false;setTimeout((()=>this.list=[]),200);this.arrowCounter=-1;t.stopPropagation();this.govBlur.emit(t)}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit(t);this.doSearch()}onSelectHandler(t=-1){let i=null;if(t>-1){i=this.list[t]}else if(c(this.arrowCounter,this.list)){i=this.list[this.arrowCounter]}if(i){this.govSelect.emit(i);this.list=[];if(c(this.nameKey,i)&&typeof i[this.nameKey]==="string"){this.value=i[this.nameKey]}}}onKeyUpHandler(t){const i=t.detail;t.stopPropagation();if(i.keyCode===38)this.onArrowUp();else if(i.keyCode===40)this.onArrowDown();else if(i.keyCode===13)this.onSelectHandler()}async setFocus(t){return this.inputRef.focus(t)}async clearValue(){this.value="";this.inputRef.value="";await this.inputRef.clearValue()}async setSearchCallback(t){this.searchCallback=t}async setTemplateResolver(t){this.templateResolver=t}get host(){return o(this)}static get watchers(){return{variant:["validateVariant"],size:["validateSize"]}}};p.style=f;export{p as gov_form_autocomplete};
2
+ //# sourceMappingURL=p-ae3e2d60.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/core/src/components/gov-form/autocomplete/gov-form-autocomplete.scss?tag=gov-form-autocomplete","../../../packages/core/src/components/gov-form/autocomplete/gov-form-autocomplete.tsx"],"names":["govFormAutocompleteCss","GovFormAutocomplete","[object Object]","hostRef","this","templateResolver","item","nameKey","listBoxId","createID","newValue","validateProp","FormAutocompleteVariants","FormAutocompleteClass","root","FormAutocompleteSizes","arrowCounter","list","length","Number","isInteger","minlength","String","value","processing","searchCallback","then","response","catch","finally","validateVariant","variant","validateSize","size","h","Host","class","placeholder","name","disabled","readonly","autocomplete","required","invalid","role","maxlength","on-gov-input","throttle","onInputHandler","bind","on-gov-keyup","onKeyUpHandler","on-gov-focus","onFocusHandler","on-gov-blur","onBlurHandler","wcagAutocomplete","wcagDescribedBy","wcagLabelledBy","wcagOwns","join","wcagExpanded","focused","ref","el","inputRef","slot","id","map","index","isSelected","innerHTML","aria-posinset","tabindex","aria-setsize","onClick","onSelectHandler","aria-selected","toBoolAttr","e","doSearch","stopPropagation","govFocus","emit","setTimeout","govBlur","target","govInput","selected","has","govSelect","event","detail","keyCode","onArrowUp","onArrowDown","options","focus","clearValue","callback"],"mappings":"iVAAA,MAAMA,EAAyB,khDCclBC,EAAmB,MAM/BC,YAAAC,6JAFQC,KAAAC,iBAAiFC,GAAQA,EAAKF,KAAKG,oBAU3D,qFAgBZ,iBAID,yCASE,uHAqBA,uJAmCf,yBACG,YACkB,GA9F1CH,KAAKI,UAAYC,EAAS,cAiG3BP,gBAAgBQ,GACfC,EAAaC,EAA0BF,EAAUG,EAAsBC,MAIxEZ,aAAaQ,GACZC,EAAaI,EAAuBL,EAAUG,EAAsBC,MAG7DZ,YACP,GAAIE,KAAKY,aAAe,EAAG,CAC1BZ,KAAKY,aAAeZ,KAAKY,aAAe,GAIlCd,cACP,GAAIE,KAAKY,aAAeZ,KAAKa,KAAKC,OAAS,EAAG,CAC7Cd,KAAKY,aAAeZ,KAAKY,aAAe,GAIlCd,WACP,GAAIiB,OAAOC,UAAUhB,KAAKiB,YAAcC,OAAOlB,KAAKmB,OAAOL,QAAUd,KAAKiB,WAAajB,KAAKiB,UAAW,CACtGjB,KAAKa,KAAO,GACZb,KAAKY,cAAgB,EACrBZ,KAAKoB,WAAa,MAClB,OAED,GAAIpB,KAAKqB,eAAgB,CACxBrB,KAAKoB,WAAa,KAClBpB,KAAKqB,eAAerB,KAAKmB,OACvBG,MAAKC,GAAavB,KAAKa,KAAOU,IAC9BC,OAAM,IAAOxB,KAAKa,KAAO,KACzBY,SAAQ,KACRzB,KAAKY,cAAgB,EACrBZ,KAAKoB,WAAa,UAKtBtB,oBACCE,KAAK0B,gBAAgB1B,KAAK2B,SAC1B3B,KAAK4B,aAAa5B,KAAK6B,MAGxB/B,SACC,OACCgC,EAACC,EAAI,CAACC,MAAOvB,EAAsBC,KAAMmB,KAAM7B,KAAK6B,KAAMF,QAAS3B,KAAK2B,SACvEG,EAAA,iBAAA,CACCG,YAAajC,KAAKiC,YAClBC,KAAMlC,KAAKkC,KACXC,SAAUnC,KAAKmC,SACfC,SAAUpC,KAAKoC,SACfC,aAAc,MACdR,KAAM7B,KAAK6B,KACXF,QAAS3B,KAAK2B,QACdW,SAAUtC,KAAKsC,SACfC,QAASvC,KAAKuC,QACdC,KAAM,YACNrB,MAAOnB,KAAKmB,MACZF,UAAWjB,KAAKiB,UAChBwB,UAAWzC,KAAKyC,UAASC,eACXC,EAAS3C,KAAK4C,eAAeC,KAAK7C,MAAO,KAAI8C,eAC7C9C,KAAK+C,eAAeF,KAAK7C,MAAKgD,eAC9BhD,KAAKiD,eAAeJ,KAAK7C,MAAKkD,cAC/BlD,KAAKmD,cAAcN,KAAK7C,MACrCoD,iBAAkB,OAClBC,gBAAiBrD,KAAKqD,gBACtBC,eAAgBtD,KAAKsD,eACrBC,SAAU,CAACvD,KAAKI,UAAWJ,KAAKuD,UAAUC,KAAK,KAC/CC,aAAczD,KAAKa,KAAKC,QAAUd,KAAK0D,QACvCC,IAAKC,GAAO5D,KAAK6D,SAAWD,GAE5B9B,EAAA,OAAA,CAAMgC,KAAK,aAAa5B,KAAK,gBAE9BJ,EAAA,KAAA,CAAIE,MAAOvB,EAAsBI,KAAM2B,KAAM,UAAWuB,GAAI/D,KAAKI,WAC/DJ,KAAKa,KAAKmD,KAAI,CAAC9D,EAAM+D,KACrB,MAAMC,EAAalE,KAAKY,eAAiBqD,EACzC,OACCnC,EAAA,KAAA,CACCE,MAAOvB,EAAsBP,KAC7BiE,UAAWnE,KAAKC,iBAAiBC,EAAMgE,GACvC1B,KAAM,SAAQ4B,gBACCH,EACfI,SAAUH,EAAa,GAAK,EAACI,eACftE,KAAKa,KAAKC,OACxByD,QAAS,IAAMvE,KAAKwE,gBAAgBP,GAAMQ,gBAC3BC,EAAWR,UASzBpE,eAAe6E,GACtB3E,KAAK0D,QAAU,KACf1D,KAAKY,cAAgB,EACrB,IAAKZ,KAAKmB,OAASnB,KAAKiB,YAAc,IAAMjB,KAAKqB,eAAgB,CAChErB,KAAK4E,WAEND,EAAEE,kBACF7E,KAAK8E,SAASC,KAAKJ,GAGZ7E,cAAc6E,GACrB3E,KAAK0D,QAAU,MACfsB,YAAW,IAAOhF,KAAKa,KAAO,IAAK,KACnCb,KAAKY,cAAgB,EACrB+D,EAAEE,kBACF7E,KAAKiF,QAAQF,KAAKJ,GAGX7E,eAAe6E,GACtB3E,KAAKmB,MAASwD,EAAEO,OAAmC/D,MACnDwD,EAAEE,kBACF7E,KAAKmF,SAASJ,KAAKJ,GACnB3E,KAAK4E,WAGE9E,gBAAgBmE,GAAS,GAChC,IAAImB,EAA8C,KAClD,GAAInB,GAAS,EAAG,CACfmB,EAAWpF,KAAKa,KAAKoD,QACf,GAAIoB,EAAIrF,KAAKY,aAAcZ,KAAKa,MAAO,CAC7CuE,EAAWpF,KAAKa,KAAKb,KAAKY,cAE3B,GAAIwE,EAAU,CACbpF,KAAKsF,UAAUP,KAAKK,GACpBpF,KAAKa,KAAO,GACZ,GAAIwE,EAAIrF,KAAKG,QAASiF,WAAoBA,EAASpF,KAAKG,WAAa,SAAU,CAC9EH,KAAKmB,MAAQiE,EAASpF,KAAKG,WAKtBL,eAAe6E,GACtB,MAAMY,EAAQZ,EAAEa,OAChBb,EAAEE,kBACF,GAAIU,EAAME,UAAY,GAAIzF,KAAK0F,iBAC1B,GAAIH,EAAME,UAAY,GAAIzF,KAAK2F,mBAC/B,GAAIJ,EAAME,UAAY,GAAIzF,KAAKwE,kBAOrC1E,eAAe8F,GACd,OAAO5F,KAAK6D,SAASgC,MAAMD,GAO5B9F,mBACCE,KAAKmB,MAAQ,GACbnB,KAAK6D,SAAS1C,MAAQ,SAEhBnB,KAAK6D,SAASiC,aAOrBhG,wBAAwBiG,GACvB/F,KAAKqB,eAAiB0E,EAQvBjG,0BAA0BiG,GACzB/F,KAAKC,iBAAmB8F","sourcesContent":["$class: \".gov-form-autocomplete\";\n\n#{$class} {\n\t@include base();\n\t&__list {\n\t\t@include typography($font-size-s);\n\t\t@extend %reset-ul;\n\t\tposition: absolute;\n\t\ttop: 100%;\n\t\tright: 0;\n\t\tleft: 0;\n\t\tz-index: 5;\n\t\tmax-height: rem-calc(225);\n\t\tmargin-top: rem-calc(8);\n\t\tborder: $form-autocomplete-border;\n\t\tborder-radius: $border-radius;\n\t\tbackground: $form-autocomplete-bg;\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\toverscroll-behavior: none;\n\t}\n\t&__list > &__item {\n\t\t@extend %reset-ul-li;\n\t\tpadding: rem-calc(12 8);\n\t\tcursor: pointer;\n\t}\n\n\t// STATES\n\t&__list:empty {\n\t\tdisplay: none;\n\t}\n\n\t// HOVERS\n\t&__item {\n\t\t@include parameter(\"aria-selected\") {\n\t\t\tbackground: $form-autocomplete-item-select-bg;\n\t\t}\n\t\t@include hover() {\n\t\t\tbackground: $form-autocomplete-item-hover-bg;\n\t\t}\n\t}\n}\n","import { Component, Element, Host, h, Prop, Watch, Event, EventEmitter, State, Method } from '@stencil/core'\nimport { SizesType } from './constants'\nimport { createID } from '../../../utils/string.utils'\nimport { FormAutocompleteClass, FormAutocompleteVariants, VariantType, FormAutocompleteSizes } from './constants'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { has, throttle } from '../../../utils/utils'\nimport { GovFormAutocompleteItem } from './gov-form-autocomplete.types'\nimport { toBoolAttr } from '../../../helpers/Dom/template'\nimport { Nullable } from '../../../types/interfaces'\n\n@Component({\n\ttag: 'gov-form-autocomplete',\n\tstyleUrl: 'gov-form-autocomplete.scss',\n})\nexport class GovFormAutocomplete {\n\tprivate inputRef?: HTMLGovFormInputElement\n\tprivate readonly listBoxId: string\n\tprivate searchCallback: (value: string) => Promise<GovFormAutocompleteItem[]>\n\tprivate templateResolver: (item: GovFormAutocompleteItem, selected: boolean) => string = item => item[this.nameKey]\n\n\tconstructor() {\n\t\tthis.listBoxId = createID('GovListBox')\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({ reflect: true, mutable: true }) value = ''\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop() readonly variant?: VariantType\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: SizesType = 'm'\n\t/**\n\t * Main key name in the object\n\t */\n\t@Prop() readonly nameKey: string = 'name'\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number = 2\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: 'wcag-described-by' }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Same as original parameter\n\t * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-owns\n\t */\n\t@Prop({ attribute: 'wcag-owns' }) readonly wcagOwns: string\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({ eventName: 'gov-focus' }) govFocus: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-input' }) govInput: EventEmitter<InputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-select' }) govSelect: EventEmitter<GovFormAutocompleteItem>\n\t@State() focused: boolean\n\t@State() processing = false\n\t@State() arrowCounter = -1\n\t@State() list: GovFormAutocompleteItem[] = []\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormAutocompleteVariants, newValue, FormAutocompleteClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormAutocompleteSizes, newValue, FormAutocompleteClass.root)\n\t}\n\n\tprivate onArrowUp() {\n\t\tif (this.arrowCounter > 0) {\n\t\t\tthis.arrowCounter = this.arrowCounter - 1\n\t\t}\n\t}\n\n\tprivate onArrowDown() {\n\t\tif (this.arrowCounter < this.list.length - 1) {\n\t\t\tthis.arrowCounter = this.arrowCounter + 1\n\t\t}\n\t}\n\n\tprivate doSearch() {\n\t\tif (Number.isInteger(this.minlength) && String(this.value).length <= this.minlength && this.minlength) {\n\t\t\tthis.list = []\n\t\t\tthis.arrowCounter = -1\n\t\t\tthis.processing = false\n\t\t\treturn\n\t\t}\n\t\tif (this.searchCallback) {\n\t\t\tthis.processing = true\n\t\t\tthis.searchCallback(this.value)\n\t\t\t\t.then(response => (this.list = response))\n\t\t\t\t.catch(() => (this.list = []))\n\t\t\t\t.finally(() => {\n\t\t\t\t\tthis.arrowCounter = -1\n\t\t\t\t\tthis.processing = false\n\t\t\t\t})\n\t\t}\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormAutocompleteClass.root} size={this.size} variant={this.variant}>\n\t\t\t\t<gov-form-input\n\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\treadonly={this.readonly}\n\t\t\t\t\tautocomplete={false}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tinvalid={this.invalid}\n\t\t\t\t\trole={'searchbox'}\n\t\t\t\t\tvalue={this.value}\n\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\ton-gov-input={throttle(this.onInputHandler.bind(this), 200)}\n\t\t\t\t\ton-gov-keyup={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\ton-gov-focus={this.onFocusHandler.bind(this)}\n\t\t\t\t\ton-gov-blur={this.onBlurHandler.bind(this)}\n\t\t\t\t\twcagAutocomplete={'list'}\n\t\t\t\t\twcagDescribedBy={this.wcagDescribedBy}\n\t\t\t\t\twcagLabelledBy={this.wcagLabelledBy}\n\t\t\t\t\twcagOwns={[this.listBoxId, this.wcagOwns].join(' ')}\n\t\t\t\t\twcagExpanded={this.list.length && this.focused}\n\t\t\t\t\tref={el => (this.inputRef = el as HTMLGovFormInputElement)}\n\t\t\t\t>\n\t\t\t\t\t<slot slot=\"right-icon\" name=\"right-icon\" />\n\t\t\t\t</gov-form-input>\n\t\t\t\t<ul class={FormAutocompleteClass.list} role={'listbox'} id={this.listBoxId}>\n\t\t\t\t\t{this.list.map((item, index) => {\n\t\t\t\t\t\tconst isSelected = this.arrowCounter === index\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\tclass={FormAutocompleteClass.item}\n\t\t\t\t\t\t\t\tinnerHTML={this.templateResolver(item, isSelected)}\n\t\t\t\t\t\t\t\trole={'option'}\n\t\t\t\t\t\t\t\taria-posinset={index}\n\t\t\t\t\t\t\t\ttabindex={isSelected ? 0 : -1}\n\t\t\t\t\t\t\t\taria-setsize={this.list.length}\n\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(index)}\n\t\t\t\t\t\t\t\taria-selected={toBoolAttr(isSelected)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)\n\t\t\t\t\t})}\n\t\t\t\t</ul>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.arrowCounter = -1\n\t\tif ((this.value || this.minlength === 0) && this.searchCallback) {\n\t\t\tthis.doSearch()\n\t\t}\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit(e)\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tsetTimeout(() => (this.list = []), 200)\n\t\tthis.arrowCounter = -1\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit(e)\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLGovFormInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit(e)\n\t\tthis.doSearch()\n\t}\n\n\tprivate onSelectHandler(index = -1) {\n\t\tlet selected: Nullable<GovFormAutocompleteItem> = null\n\t\tif (index > -1) {\n\t\t\tselected = this.list[index]\n\t\t} else if (has(this.arrowCounter, this.list)) {\n\t\t\tselected = this.list[this.arrowCounter]\n\t\t}\n\t\tif (selected) {\n\t\t\tthis.govSelect.emit(selected)\n\t\t\tthis.list = []\n\t\t\tif (has(this.nameKey, selected) && typeof selected[this.nameKey] === 'string') {\n\t\t\t\tthis.value = selected[this.nameKey]\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate onKeyUpHandler(e: CustomEvent) {\n\t\tconst event = e.detail as KeyboardEvent\n\t\te.stopPropagation()\n\t\tif (event.keyCode === 38) this.onArrowUp()\n\t\telse if (event.keyCode === 40) this.onArrowDown()\n\t\telse if (event.keyCode === 13) this.onSelectHandler()\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Clears whisperer value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = ''\n\t\tthis.inputRef.value = ''\n\n\t\tawait this.inputRef.clearValue()\n\t}\n\n\t/**\n\t * Set a custom asynchronous function for the whisperer\n\t */\n\t@Method()\n\tasync setSearchCallback(callback: (value: string) => Promise<any>) {\n\t\tthis.searchCallback = callback\n\t}\n\n\t/**\n\t * Setting a custom whisper result template\n\t * @param callback\n\t */\n\t@Method()\n\tasync setTemplateResolver(callback: (item: GovFormAutocompleteItem) => string) {\n\t\tthis.templateResolver = callback\n\t}\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{r as o,c as a,h as e,H as t,g as i}from"./p-682c7cc6.js";import{c as r}from"./p-24636c53.js";import{a as s}from"./p-364b4792.js";import{M as d}from"./p-45485d1c.js";import{c as l}from"./p-c20102ff.js";import{d as n}from"./p-03990da5.js";import{g as m,a as g}from"./p-3f37ddb6.js";import{a as c}from"./p-561fa17b.js";const h='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-modal{display:none}.gov-modal__dialog{z-index:101;position:fixed;top:50%;left:50%;display:flex;justify-content:center;align-items:center;width:100%;max-width:var(--gov-modal-max-width, 52.5rem);height:100%;padding:0.5rem;border:none;background:transparent;transform:translate(-50%, -50%);pointer-events:none}.gov-modal__inner{position:relative;display:flex;flex-direction:column;width:100%;max-height:100%;border-radius:var(--gov-border-radius, 0.1875rem);background:var(--gov-modal-bg, var(--gov-color-neutral-white));overflow:hidden;pointer-events:auto;box-shadow:0 0 1.5rem rgba(var(--gov-color-secondary-800-rgb), 0.24)}.gov-modal__header{display:flex;gap:1rem;align-items:flex-start;padding:1.5rem 1rem;border-bottom:var(--gov-modal-border-color, 0.0625rem solid var(--gov-color-secondary-500))}.gov-modal__icon{flex:0 0 auto;padding-top:calc((var(--gov-text-3xl-font-size) * 1.5 - 1.5rem) / 2)}.gov-modal__icon>*{width:1.5rem;height:1.5rem}.gov-modal__title{font-weight:var(--gov-text-3xl-font-weight);font-size:var(--gov-text-3xl-font-size);line-height:var(--gov-text-3xl-line-height);letter-spacing:var(--gov-text-3xl-letter-spacing);margin:0}.gov-modal__close{flex:0 0 auto;margin-left:auto;padding-top:calc((var(--gov-text-3xl-font-size) * 1.5 - 2rem) / 2)}.gov-modal__content{height:100%;padding:1.5rem 1rem;color:var(--gov-modal-text-color, var(--gov-color-secondary-700));overflow:auto}.gov-modal__content>*:last-child{margin-bottom:0}.gov-modal__actions{display:flex;gap:0.5rem 1rem;flex-wrap:wrap;justify-content:flex-end;padding:1.5rem 1rem;border-top:var(--gov-modal-border-color, 0.0625rem solid var(--gov-color-secondary-500))}.gov-modal__dialog:focus .gov-modal__inner{outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base)}.gov-modal[open=""],.gov-modal[open=true i],.gov-modal[open="1"]{display:block}@media (min-width: 30em){.gov-modal__dialog{max-width:calc(var(--gov-modal-max-width, 52.5rem) + 3rem);padding:1.5rem}.gov-modal__dialog:focus{outline-offset:-1.5rem}.gov-modal__inner{box-shadow:0 0 2rem rgba(var(--gov-color-secondary-800-rgb), 0.32)}.gov-modal--prompt .gov-modal__dialog{max-width:calc(var(--gov-modal-prompt-max-width, 33.125rem) + 3rem)}}@media (min-width: 48em){.gov-modal__header{gap:1.25rem;padding:2rem 2.5rem 2rem 3rem}.gov-modal__close{padding-top:calc((var(--gov-text-3xl-font-size) * 1.5 - 2.5rem) / 2)}.gov-modal__content{padding:2rem 3rem}.gov-modal--prompt .gov-modal__header,.gov-modal--prompt .gov-modal__content,.gov-modal--prompt .gov-modal__actions{padding:1.5rem}}';const v=class{constructor(e){o(this,e);this.govClose=a(this,"gov-close",7);this.open=false;this.label=undefined;this.role="dialog";this.labelTag="h2";this.wcaglabelledBy=undefined;this.wcagDescribedBy=undefined;this.wcagCloseLabel=undefined;this.wcagCloseLabelledBy=undefined;this.modalVisible=false;this.h=m(this.host);this.labelId=r("GovPromptLabel");this.contentId=r("GovPromptContent")}validateLabelTag(o){const a=["h1","h2","h3","h4","h5","h6"];if(o){if(!a.includes(o)){c(`[${d.root}]: Tag ${o} is not allowed.`)}}}watchOpen(o){this.modalVisible=o}showModal(){this.modalVisible=true;document.body.classList.add(d.bodyFix)}hideModal(){this.modalVisible=false;document.body.classList.remove(d.bodyFix)}async componentWillRender(){if(this.modalVisible){this.showModal()}else{this.hideModal()}}async componentDidRender(){this.modalVisible=this.open;if(l()){await n(500);await this.validateWcag()}}render(){const o=this.labelTag;return e(t,{class:this.h.classes(d.rootPrompt),open:this.modalVisible},e("dialog",{class:d.dialog,hidden:!this.modalVisible,tabindex:"-1",open:this.modalVisible,"aria-modal":"true","aria-hidden":g(!this.modalVisible),"aria-labelledby":this.wcaglabelledBy||this.labelId,"aria-describedby":this.wcagDescribedBy||this.contentId,role:this.role},e("div",{class:d.inner},e("div",{class:d.header},this.h.hasSlot("icon")&&e("div",{class:d.icon},e("slot",{name:"icon"})),this.label&&e(o,{class:d.title,id:this.labelId},this.label),e("gov-button",{class:d.close,variant:"primary",wcagLabel:this.wcagCloseLabel,wcagLabelledBy:this.wcagCloseLabelledBy,type:"base","on-gov-click":this.onCloseHandler.bind(this)},e("gov-icon",{name:"x-lg"}))),e("div",{class:d.content,id:this.contentId},e("slot",null)),e("div",{class:d.actions},e("slot",{name:"actions"})))),e("gov-backdrop",{visible:this.modalVisible,"wcag-label":this.wcagCloseLabel,"wcag-labelled-by":this.wcagCloseLabelledBy,"on-gov-click":this.onCloseHandler.bind(this)}))}onCloseHandler(o){o.stopPropagation();this.hideModal();this.govClose.emit(o)}async show(){this.showModal()}async hide(){this.hideModal()}async validateWcag(){s(this.wcaglabelledBy,"aria-labelledby",d.root);s(this.wcagDescribedBy,"aria-describedby",d.root)}get host(){return i(this)}static get watchers(){return{labelTag:["validateLabelTag"],open:["watchOpen"]}}};v.style=h;export{v as gov_prompt};
2
+ //# sourceMappingURL=p-b966062a.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/core/src/components/gov-promp/gov-prompt.scss?tag=gov-prompt","../../../packages/core/src/components/gov-promp/gov-prompt.tsx"],"names":["govPromptCss","GovPrompt","[object Object]","hostRef","this","h","govHost","host","labelId","createID","contentId","newValue","validTags","includes","govErrorLog","ModalClass","root","modalVisible","document","body","classList","add","bodyFix","remove","showModal","hideModal","open","canValidateWcagOnRender","delay","validateWcag","LabelTag","labelTag","Host","class","classes","rootPrompt","dialog","hidden","tabindex","aria-modal","aria-hidden","toBoolAttr","aria-labelledby","wcaglabelledBy","aria-describedby","wcagDescribedBy","role","inner","header","hasSlot","icon","name","label","title","id","close","variant","wcagLabel","wcagCloseLabel","wcagLabelledBy","wcagCloseLabelledBy","type","on-gov-click","onCloseHandler","bind","content","actions","visible","wcag-label","wcag-labelled-by","e","stopPropagation","govClose","emit","validateWcagRef"],"mappings":"mUAAA,MAAMA,EAAe,qrFCeRC,EAAS,MAKrBC,YAAAC,2DAUe,qCAQqB,uBAI0B,qJAsBtC,MA3CvBC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,QAAUC,EAAS,kBACxBL,KAAKM,UAAYD,EAAS,oBA4C3BP,iBAAiBS,GAChB,MAAMC,EAAY,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,MACjD,GAAID,EAAU,CACb,IAAKC,EAAUC,SAASF,GAAW,CAClCG,EAAY,IAAIC,EAAWC,cAAcL,uBAM5CT,UAAUS,GACTP,KAAKa,aAAeN,EAGbT,YACPE,KAAKa,aAAe,KACpBC,SAASC,KAAKC,UAAUC,IAAIN,EAAWO,SAGhCpB,YACPE,KAAKa,aAAe,MACpBC,SAASC,KAAKC,UAAUG,OAAOR,EAAWO,SAG3CpB,4BACC,GAAIE,KAAKa,aAAc,CACtBb,KAAKoB,gBACC,CACNpB,KAAKqB,aAIPvB,2BACCE,KAAKa,aAAeb,KAAKsB,KACzB,GAAIC,IAA2B,OACxBC,EAAM,WACNxB,KAAKyB,gBAIb3B,SACC,MAAM4B,EAAW1B,KAAK2B,SACtB,OACC1B,EAAC2B,EAAI,CAACC,MAAO7B,KAAKC,EAAE6B,QAAQnB,EAAWoB,YAAaT,KAAMtB,KAAKa,cAC9DZ,EAAA,SAAA,CACC4B,MAAOlB,EAAWqB,OAClBC,QAASjC,KAAKa,aACdqB,SAAS,KACTZ,KAAMtB,KAAKa,aAAYsB,aACZ,OAAMC,cACJC,GAAYrC,KAAKa,cAAayB,kBAC1BtC,KAAKuC,gBAAkBvC,KAAKI,QAAOoC,mBAClCxC,KAAKyC,iBAAmBzC,KAAKM,UAC/CoC,KAAM1C,KAAK0C,MAEXzC,EAAA,MAAA,CAAK4B,MAAOlB,EAAWgC,OACtB1C,EAAA,MAAA,CAAK4B,MAAOlB,EAAWiC,QACrB5C,KAAKC,EAAE4C,QAAQ,SACf5C,EAAA,MAAA,CAAK4B,MAAOlB,EAAWmC,MACtB7C,EAAA,OAAA,CAAM8C,KAAK,UAGZ/C,KAAKgD,OACL/C,EAACyB,EAAQ,CAACG,MAAOlB,EAAWsC,MAAOC,GAAIlD,KAAKI,SAC1CJ,KAAKgD,OAGR/C,EAAA,aAAA,CACC4B,MAAOlB,EAAWwC,MAClBC,QAAQ,UACRC,UAAWrD,KAAKsD,eAChBC,eAAgBvD,KAAKwD,oBACrBC,KAAK,OAAMC,eACG1D,KAAK2D,eAAeC,KAAK5D,OAEvCC,EAAA,WAAA,CAAU8C,KAAK,WAGjB9C,EAAA,MAAA,CAAK4B,MAAOlB,EAAWkD,QAASX,GAAIlD,KAAKM,WACxCL,EAAA,OAAA,OAEDA,EAAA,MAAA,CAAK4B,MAAOlB,EAAWmD,SACtB7D,EAAA,OAAA,CAAM8C,KAAK,eAKd9C,EAAA,eAAA,CACC8D,QAAS/D,KAAKa,aAAYmD,aACdhE,KAAKsD,eAAcW,mBACbjE,KAAKwD,oBAAmBE,eAC5B1D,KAAK2D,eAAeC,KAAK5D,SAMnCF,eAAeoE,GACtBA,EAAEC,kBACFnE,KAAKqB,YACLrB,KAAKoE,SAASC,KAAKH,GAOpBpE,aACCE,KAAKoB,YAONtB,aACCE,KAAKqB,YAONvB,qBACCwE,EAAgBtE,KAAKuC,eAAgB,kBAAmB5B,EAAWC,MACnE0D,EAAgBtE,KAAKyC,gBAAiB,mBAAoB9B,EAAWC","sourcesContent":["/*\n * Prompt\n */\n\n// $class: \".gov-prompt\";\n@import \"../gov-modal/gov-modal.scss\";\n\n// #{$class} {\n// \t//\n// }\n","import { Component, Event, Element, EventEmitter, h, Host, Method, Prop, Watch, State } from \"@stencil/core\"\nimport { createID } from '../../utils/string.utils'\nimport { validateWcagRef } from '../../helpers/Validate/wcag'\nimport { ModalClass } from '../gov-modal/constants'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { toBoolAttr } from '../../helpers/Dom/template'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\n\n@Component({\n\ttag: 'gov-prompt',\n\tstyleUrl: 'gov-prompt.scss',\n})\nexport class GovPrompt {\n\tprivate h: GovHost\n\tprivate readonly labelId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.labelId = createID('GovPromptLabel')\n\t\tthis.contentId = createID('GovPromptContent')\n\t}\n\n\t@Element() host: HTMLGovPromptElement\n\t/**\n\t * Attribute for modal window display\n\t */\n\t@Prop() open = false\n\t/**\n\t * Title of modal window\n\t */\n\t@Prop() label: string\n\t/**\n\t * Role of modal\n\t */\n\t@Prop({ attribute: 'role' }) role = 'dialog'\n\t/**\n\t * Used to change the HMTL tag in the modal label for correct semantic structure\n\t */\n\t@Prop({ attribute: 'label-tag' }) readonly labelTag: string = 'h2'\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) wcaglabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the modal.\n\t */\n\t@Prop({ attribute: 'wcag-described-by' }) wcagDescribedBy: string\n\t/**\n\t * Adds accessible label for the modal close button that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-close-label' }) wcagCloseLabel: string\n\t/**\n\t * A string of identifiers that indicate alternative label elements for closing the modal window\n\t */\n\t@Prop({ attribute: 'wcag-close-labelled-by' }) wcagCloseLabelledBy: string\n\t/**\n\t * Emitted when modal window closes.\n\t */\n\t@Event({ eventName: 'gov-close' }) govClose: EventEmitter<PointerEvent>\n\n\t@State() modalVisible = false\n\n\t@Watch('labelTag')\n\tvalidateLabelTag(newValue: string): void {\n\t\tconst validTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${ModalClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch(\"open\")\n\twatchOpen(newValue: boolean): void {\n\t\tthis.modalVisible = newValue\n\t}\n\n\tprivate showModal() {\n\t\tthis.modalVisible = true\n\t\tdocument.body.classList.add(ModalClass.bodyFix)\n\t}\n\n\tprivate hideModal() {\n\t\tthis.modalVisible = false\n\t\tdocument.body.classList.remove(ModalClass.bodyFix)\n\t}\n\n\tasync componentWillRender() {\n\t\tif (this.modalVisible) {\n\t\t\tthis.showModal()\n\t\t} else {\n\t\t\tthis.hideModal()\n\t\t}\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.modalVisible = this.open\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst LabelTag = this.labelTag\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ModalClass.rootPrompt)} open={this.modalVisible}>\n\t\t\t\t<dialog\n\t\t\t\t\tclass={ModalClass.dialog}\n\t\t\t\t\thidden={!this.modalVisible}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\topen={this.modalVisible}\n\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\taria-hidden={toBoolAttr(!this.modalVisible)}\n\t\t\t\t\taria-labelledby={this.wcaglabelledBy || this.labelId}\n\t\t\t\t\taria-describedby={this.wcagDescribedBy || this.contentId}\n\t\t\t\t\trole={this.role}\n\t\t\t\t>\n\t\t\t\t\t<div class={ModalClass.inner}>\n\t\t\t\t\t\t<div class={ModalClass.header}>\n\t\t\t\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t\t\t\t<div class={ModalClass.icon}>\n\t\t\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{this.label && (\n\t\t\t\t\t\t\t\t<LabelTag class={ModalClass.title} id={this.labelId}>\n\t\t\t\t\t\t\t\t\t{this.label}\n\t\t\t\t\t\t\t\t</LabelTag>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\tclass={ModalClass.close}\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\twcagLabel={this.wcagCloseLabel}\n\t\t\t\t\t\t\t\twcagLabelledBy={this.wcagCloseLabelledBy}\n\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<gov-icon name=\"x-lg\" />\n\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={ModalClass.content} id={this.contentId}>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={ModalClass.actions}>\n\t\t\t\t\t\t\t<slot name=\"actions\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</dialog>\n\n\t\t\t\t<gov-backdrop\n\t\t\t\t\tvisible={this.modalVisible}\n\t\t\t\t\twcag-label={this.wcagCloseLabel}\n\t\t\t\t\twcag-labelled-by={this.wcagCloseLabelledBy}\n\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t/>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t\tthis.hideModal()\n\t\tthis.govClose.emit(e)\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showModal()\n\t}\n\n\t/**\n\t * Hidding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.hideModal()\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcaglabelledBy, 'aria-labelledby', ModalClass.root)\n\t\tvalidateWcagRef(this.wcagDescribedBy, 'aria-describedby', ModalClass.root)\n\t}\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{r as s,c as a,h as e,H as r,g as i}from"./p-682c7cc6.js";import{v as t}from"./p-364b4792.js";import{c as o}from"./p-c20102ff.js";import{d as n}from"./p-03990da5.js";import{g as c,b as m}from"./p-3f37ddb6.js";import"./p-561fa17b.js";import"./p-24636c53.js";const l={root:"gov-breadcrumbs",arrow:"gov-breadcrumbs__arrow",list:"gov-breadcrumbs__list",item:"gov-breadcrumbs__item",button:"gov-breadcrumbs__button"};const d='.gov-breadcrumbs__list{margin:0;padding:0}.gov-breadcrumbs__list .gov-breadcrumbs__item{margin:0;padding:0;background:none}.gov-breadcrumbs__list .gov-breadcrumbs__item::before{display:none}.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-breadcrumbs{position:relative;display:flex;width:100%;gap:1rem;justify-content:space-between;align-items:flex-start}.gov-breadcrumbs__list .gov-breadcrumbs__item{display:inline}.gov-breadcrumbs__arrow{width:0.625rem;height:0.625rem;margin:0rem 1rem;color:var(--gov-breadcrumbs-arrow-color, var(--gov-color-secondary-600))}.gov-breadcrumbs__button{flex:0 0 auto}.gov-breadcrumbs__button[aria-expanded=""],.gov-breadcrumbs__button[aria-expanded=true i],.gov-breadcrumbs__button[aria-expanded="1"]{transform:scale(-1)}';const b=class{constructor(e){s(this,e);this.govChange=a(this,"gov-change",7);this.isExpandedState=undefined;this.collapsible=false;this.isExpanded=false;this.wcagLabel=undefined;this.wcagLabelledBy=undefined;this.h=c(this.host)}emmitChange(){this.govChange.emit({open:this.isExpandedState,element:this.host})}async componentDidRender(){if(o()){await n(500);await this.validateWcag()}}render(){const{isExpandedState:s}=this;return e(r,{class:this.h.classes(l.root),collapsible:this.collapsible},e("nav",{"aria-label":this.wcagLabel,"aria-labelledby":this.wcagLabelledBy},e("ul",{class:l.list},e("li",{class:l.item},e("a",{href:"#",class:"gov-link"},"Domů"),e("gov-icon",{class:l.arrow,name:"chevron-right"})),e("li",{class:l.item},e("a",{href:"#",class:"gov-link"},"Kam dál"),e("gov-icon",{class:l.arrow,name:"chevron-right"})),e("li",{class:l.item},e("a",{href:"#",class:"gov-link"},"Český eGovernment"),e("gov-icon",{class:l.arrow,name:"chevron-right"})),e("li",{class:l.item},e("strong",null,"Czech POINT")))),this.collapsible&&e("gov-button",{"aria-expanded":m(s),class:l.button,variant:"primary",size:"s",inverse:true},e("gov-icon",{slot:"left-icon",name:"chevron-down",onClick:()=>this.toggle()})))}async open(){this.isExpandedState=true;this.emmitChange()}async close(){this.isExpandedState=false;this.emmitChange()}async toggle(){this.isExpandedState=!this.isExpandedState;this.emmitChange()}async validateWcag(){t(this.wcagLabel,this.wcagLabelledBy,l.root)}get host(){return i(this)}};b.style=d;export{b as gov_breadcrumbs};
2
+ //# sourceMappingURL=p-bd560ffc.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../packages/core/src/components/gov-breadcrumbs/constants.ts","../../../packages/core/src/components/gov-breadcrumbs/gov-breadcrumbs.scss?tag=gov-breadcrumbs","../../../packages/core/src/components/gov-breadcrumbs/gov-breadcrumbs.tsx"],"names":["BreadcrumbsClass","root","arrow","list","item","button","govBreadcrumbsCss","GovBreadcrumbs","[object Object]","hostRef","this","h","govHost","host","govChange","emit","open","isExpandedState","element","canValidateWcagOnRender","delay","validateWcag","Host","class","classes","collapsible","aria-label","wcagLabel","aria-labelledby","wcagLabelledBy","href","name","aria-expanded","booleanString","variant","size","inverse","slot","onClick","toggle","emmitChange","validateWcagLabel"],"mappings":"uQAAO,MAAMA,EAAmB,CAC/BC,KAAM,kBACNC,MAAO,yBACPC,KAAM,wBACNC,KAAM,wBACNC,OAAQ,2BCLT,MAAMC,EAAoB,o4BCabC,EAAc,MAG1BC,YAAAC,mGASwC,sBAI2B,6DAZlEC,KAAKC,EAAIC,EAAQF,KAAKG,MA2BfL,cACPE,KAAKI,UAAUC,KAAK,CAAEC,KAAMN,KAAKO,gBAAiBC,QAASR,KAAKG,OAGjEL,2BACC,GAAIW,IAA2B,OACxBC,EAAM,WACNV,KAAKW,gBAIbb,SACC,MAAMS,gBAAEA,GAAoBP,KAE5B,OACCC,EAACW,EAAI,CAACC,MAAOb,KAAKC,EAAEa,QAAQxB,EAAiBC,MAAOwB,YAAaf,KAAKe,aACrEd,EAAA,MAAA,CAAAe,aAAiBhB,KAAKiB,UAASC,kBAAmBlB,KAAKmB,gBACtDlB,EAAA,KAAA,CAAIY,MAAOvB,EAAiBG,MAC3BQ,EAAA,KAAA,CAAIY,MAAOvB,EAAiBI,MAC3BO,EAAA,IAAA,CAAGmB,KAAK,IAAIP,MAAM,YAAU,QAG5BZ,EAAA,WAAA,CAAUY,MAAOvB,EAAiBE,MAAO6B,KAAK,iBAE/CpB,EAAA,KAAA,CAAIY,MAAOvB,EAAiBI,MAC3BO,EAAA,IAAA,CAAGmB,KAAK,IAAIP,MAAM,YAAU,WAG5BZ,EAAA,WAAA,CAAUY,MAAOvB,EAAiBE,MAAO6B,KAAK,iBAE/CpB,EAAA,KAAA,CAAIY,MAAOvB,EAAiBI,MAC3BO,EAAA,IAAA,CAAGmB,KAAK,IAAIP,MAAM,YAAU,qBAG5BZ,EAAA,WAAA,CAAUY,MAAOvB,EAAiBE,MAAO6B,KAAK,iBAE/CpB,EAAA,KAAA,CAAIY,MAAOvB,EAAiBI,MAC3BO,EAAA,SAAA,KAAA,kBAKFD,KAAKe,aACLd,EAAA,aAAA,CAAAqB,gBAA2BC,EAAchB,GAAkBM,MAAOvB,EAAiBK,OAAQ6B,QAAQ,UAAUC,KAAK,IAAIC,QAAO,MAC5HzB,EAAA,WAAA,CAAU0B,KAAK,YAAYN,KAAK,aAAaO,QAAS,IAAM5B,KAAK6B,aAUtE/B,aACCE,KAAKO,gBAAkB,KACvBP,KAAK8B,cAONhC,cACCE,KAAKO,gBAAkB,MACvBP,KAAK8B,cAONhC,eACCE,KAAKO,iBAAmBP,KAAKO,gBAC7BP,KAAK8B,cAONhC,qBACCiC,EAAkB/B,KAAKiB,UAAWjB,KAAKmB,eAAgB7B,EAAiBC","sourcesContent":["export const BreadcrumbsClass = {\n\troot: 'gov-breadcrumbs',\n\tarrow: 'gov-breadcrumbs__arrow',\n\tlist: 'gov-breadcrumbs__list',\n\titem: 'gov-breadcrumbs__item',\n\tbutton: 'gov-breadcrumbs__button',\n}\n","/*\n * Pagination\n */\n\n$class: \".gov-breadcrumbs\";\n\n#{$class} {\n\t@include base(flex);\n\tgap: rem-calc(16);\n\tjustify-content: space-between;\n\talign-items: flex-start;\n\t&__list {\n\t\t@extend %reset-ul;\n\t}\n\t&__list &__item {\n\t\t@extend %reset-ul-li;\n\t\tdisplay: inline;\n\t}\n\t&__arrow {\n\t\twidth: rem-calc(10);\n\t\theight: rem-calc(10);\n\t\tmargin: rem-calc(0 16px);\n\t\tcolor: $breadcrumbs-arrow-color;\n\t}\n\t&__button {\n\t\tflex: 0 0 auto;\n\n\t\t// STATES\n\t\t@include parameter(\"aria-expanded\") {\n\t\t\ttransform: scale(-1);\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop, State, Event, EventEmitter } from '@stencil/core'\nimport { BreadcrumbsClass } from './constants'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { GovBreadcrumbsChangeEvent } from './gov-breadcrumbs.d'\nimport { booleanString, govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.d\"\n\n@Component({\n\ttag: 'gov-breadcrumbs',\n\tstyleUrl: 'gov-breadcrumbs.scss',\n})\nexport class GovBreadcrumbs {\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@State() isExpandedState: boolean\n\t/**\n\t * Defines wether 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 default\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: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * Indicates the id of a component that labels the pagination.\n\t */\n\t@Prop({ attribute: 'wcag-labelded-by' }) readonly wcagLabelledBy: string\n\n\t/**\n\t * Called when the Breadrumbs state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovBreadcrumbsChangeEvent>\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({ open: this.isExpandedState, element: this.host })\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { isExpandedState } = this\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BreadcrumbsClass.root)} collapsible={this.collapsible}>\n\t\t\t\t<nav aria-label={this.wcagLabel} aria-labelledby={this.wcagLabelledBy}>\n\t\t\t\t\t<ul class={BreadcrumbsClass.list}>\n\t\t\t\t\t\t<li class={BreadcrumbsClass.item}>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"gov-link\">\n\t\t\t\t\t\t\t\tDomů\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<gov-icon class={BreadcrumbsClass.arrow} name=\"arrow-right\"></gov-icon>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li class={BreadcrumbsClass.item}>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"gov-link\">\n\t\t\t\t\t\t\t\tKam dál\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<gov-icon class={BreadcrumbsClass.arrow} name=\"arrow-right\"></gov-icon>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li class={BreadcrumbsClass.item}>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"gov-link\">\n\t\t\t\t\t\t\t\tČeský eGovernment\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<gov-icon class={BreadcrumbsClass.arrow} name=\"arrow-right\"></gov-icon>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li class={BreadcrumbsClass.item}>\n\t\t\t\t\t\t\t<strong>Czech POINT</strong>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</nav>\n\n\t\t\t\t{this.collapsible &&\n\t\t\t\t\t<gov-button aria-expanded={booleanString(isExpandedState)} class={BreadcrumbsClass.button} variant=\"primary\" size=\"s\" inverse>\n\t\t\t\t\t\t<gov-icon slot=\"left-icon\" name=\"arrow-down\" onClick={() => this.toggle()}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t}\n\t\t\t</Host>\n\t\t)\n\t}\n\t/**\n\t * Opening the Breadcrumbs\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpandedState = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the Breadcrumbs\n\t */\n\t@Method()\n\tasync close(): Promise<void> {\n\t\tthis.isExpandedState = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Breadcrumbs switch\n\t */\n\t@Method()\n\tasync toggle(): Promise<void> {\n\t\tthis.isExpandedState = !this.isExpandedState\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, BreadcrumbsClass.root)\n\t}\n}\n"]}
1
+ {"version":3,"sources":["../../../packages/core/src/components/gov-breadcrumbs/constants.ts","../../../packages/core/src/components/gov-breadcrumbs/gov-breadcrumbs.scss?tag=gov-breadcrumbs","../../../packages/core/src/components/gov-breadcrumbs/gov-breadcrumbs.tsx"],"names":["BreadcrumbsClass","root","arrow","list","item","button","govBreadcrumbsCss","GovBreadcrumbs","[object Object]","hostRef","this","h","govHost","host","govChange","emit","open","isExpandedState","element","canValidateWcagOnRender","delay","validateWcag","Host","class","classes","collapsible","aria-label","wcagLabel","aria-labelledby","wcagLabelledBy","href","name","aria-expanded","booleanString","variant","size","inverse","slot","onClick","toggle","emmitChange","validateWcagLabel"],"mappings":"uQAAO,MAAMA,EAAmB,CAC/BC,KAAM,kBACNC,MAAO,yBACPC,KAAM,wBACNC,KAAM,wBACNC,OAAQ,2BCLT,MAAMC,EAAoB,o4BCabC,EAAc,MAG1BC,YAAAC,mGASwC,sBAI2B,6DAZlEC,KAAKC,EAAIC,EAAQF,KAAKG,MA2BfL,cACPE,KAAKI,UAAUC,KAAK,CAAEC,KAAMN,KAAKO,gBAAiBC,QAASR,KAAKG,OAGjEL,2BACC,GAAIW,IAA2B,OACxBC,EAAM,WACNV,KAAKW,gBAIbb,SACC,MAAMS,gBAAEA,GAAoBP,KAE5B,OACCC,EAACW,EAAI,CAACC,MAAOb,KAAKC,EAAEa,QAAQxB,EAAiBC,MAAOwB,YAAaf,KAAKe,aACrEd,EAAA,MAAA,CAAAe,aAAiBhB,KAAKiB,UAASC,kBAAmBlB,KAAKmB,gBACtDlB,EAAA,KAAA,CAAIY,MAAOvB,EAAiBG,MAC3BQ,EAAA,KAAA,CAAIY,MAAOvB,EAAiBI,MAC3BO,EAAA,IAAA,CAAGmB,KAAK,IAAIP,MAAM,YAAU,QAG5BZ,EAAA,WAAA,CAAUY,MAAOvB,EAAiBE,MAAO6B,KAAK,mBAE/CpB,EAAA,KAAA,CAAIY,MAAOvB,EAAiBI,MAC3BO,EAAA,IAAA,CAAGmB,KAAK,IAAIP,MAAM,YAAU,WAG5BZ,EAAA,WAAA,CAAUY,MAAOvB,EAAiBE,MAAO6B,KAAK,mBAE/CpB,EAAA,KAAA,CAAIY,MAAOvB,EAAiBI,MAC3BO,EAAA,IAAA,CAAGmB,KAAK,IAAIP,MAAM,YAAU,qBAG5BZ,EAAA,WAAA,CAAUY,MAAOvB,EAAiBE,MAAO6B,KAAK,mBAE/CpB,EAAA,KAAA,CAAIY,MAAOvB,EAAiBI,MAC3BO,EAAA,SAAA,KAAA,kBAKFD,KAAKe,aACLd,EAAA,aAAA,CAAAqB,gBAA2BC,EAAchB,GAAkBM,MAAOvB,EAAiBK,OAAQ6B,QAAQ,UAAUC,KAAK,IAAIC,QAAO,MAC5HzB,EAAA,WAAA,CAAU0B,KAAK,YAAYN,KAAK,eAAeO,QAAS,IAAM5B,KAAK6B,aAUxE/B,aACCE,KAAKO,gBAAkB,KACvBP,KAAK8B,cAONhC,cACCE,KAAKO,gBAAkB,MACvBP,KAAK8B,cAONhC,eACCE,KAAKO,iBAAmBP,KAAKO,gBAC7BP,KAAK8B,cAONhC,qBACCiC,EAAkB/B,KAAKiB,UAAWjB,KAAKmB,eAAgB7B,EAAiBC","sourcesContent":["export const BreadcrumbsClass = {\n\troot: 'gov-breadcrumbs',\n\tarrow: 'gov-breadcrumbs__arrow',\n\tlist: 'gov-breadcrumbs__list',\n\titem: 'gov-breadcrumbs__item',\n\tbutton: 'gov-breadcrumbs__button',\n}\n","/*\n * Pagination\n */\n\n$class: \".gov-breadcrumbs\";\n\n#{$class} {\n\t@include base(flex);\n\tgap: rem-calc(16);\n\tjustify-content: space-between;\n\talign-items: flex-start;\n\t&__list {\n\t\t@extend %reset-ul;\n\t}\n\t&__list &__item {\n\t\t@extend %reset-ul-li;\n\t\tdisplay: inline;\n\t}\n\t&__arrow {\n\t\twidth: rem-calc(10);\n\t\theight: rem-calc(10);\n\t\tmargin: rem-calc(0 16px);\n\t\tcolor: $breadcrumbs-arrow-color;\n\t}\n\t&__button {\n\t\tflex: 0 0 auto;\n\n\t\t// STATES\n\t\t@include parameter(\"aria-expanded\") {\n\t\t\ttransform: scale(-1);\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop, State, Event, EventEmitter } from '@stencil/core'\nimport { BreadcrumbsClass } from './constants'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { GovBreadcrumbsChangeEvent } from './gov-breadcrumbs.d'\nimport { booleanString, govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-breadcrumbs',\n\tstyleUrl: 'gov-breadcrumbs.scss',\n})\nexport class GovBreadcrumbs {\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@State() isExpandedState: boolean\n\t/**\n\t * Defines wether 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 default\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: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * Indicates the id of a component that labels the pagination.\n\t */\n\t@Prop({ attribute: 'wcag-labelded-by' }) readonly wcagLabelledBy: string\n\n\t/**\n\t * Called when the Breadrumbs state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovBreadcrumbsChangeEvent>\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({ open: this.isExpandedState, element: this.host })\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { isExpandedState } = this\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BreadcrumbsClass.root)} collapsible={this.collapsible}>\n\t\t\t\t<nav aria-label={this.wcagLabel} aria-labelledby={this.wcagLabelledBy}>\n\t\t\t\t\t<ul class={BreadcrumbsClass.list}>\n\t\t\t\t\t\t<li class={BreadcrumbsClass.item}>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"gov-link\">\n\t\t\t\t\t\t\t\tDomů\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<gov-icon class={BreadcrumbsClass.arrow} name=\"chevron-right\"></gov-icon>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li class={BreadcrumbsClass.item}>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"gov-link\">\n\t\t\t\t\t\t\t\tKam dál\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<gov-icon class={BreadcrumbsClass.arrow} name=\"chevron-right\"></gov-icon>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li class={BreadcrumbsClass.item}>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"gov-link\">\n\t\t\t\t\t\t\t\tČeský eGovernment\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<gov-icon class={BreadcrumbsClass.arrow} name=\"chevron-right\"></gov-icon>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li class={BreadcrumbsClass.item}>\n\t\t\t\t\t\t\t<strong>Czech POINT</strong>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</nav>\n\n\t\t\t\t{this.collapsible && (\n\t\t\t\t\t<gov-button aria-expanded={booleanString(isExpandedState)} class={BreadcrumbsClass.button} variant=\"primary\" size=\"s\" inverse>\n\t\t\t\t\t\t<gov-icon slot=\"left-icon\" name=\"chevron-down\" onClick={() => this.toggle()}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\t/**\n\t * Opening the Breadcrumbs\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpandedState = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the Breadcrumbs\n\t */\n\t@Method()\n\tasync close(): Promise<void> {\n\t\tthis.isExpandedState = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Breadcrumbs switch\n\t */\n\t@Method()\n\tasync toggle(): Promise<void> {\n\t\tthis.isExpandedState = !this.isExpandedState\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, BreadcrumbsClass.root)\n\t}\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as t,h as s,H as i,g as e}from"./p-682c7cc6.js";import{c as a}from"./p-24636c53.js";import{g as r,t as o}from"./p-3f37ddb6.js";import{T as n}from"./p-d65f71e1.js";import"./p-55500e5a.js";import"./p-99cc3dba.js";const h=".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-tabs-item{color:var(--gov-tabs-text-color, var(--gov-color-secondary-700))}.gov-tabs-item__inner>*:last-child{margin-bottom:0}";const d=class{constructor(s){t(this,s);this.identifier=undefined;this.triggerIdentifier=undefined;this.label=undefined;this.default=false;this.isActive=false;this.h=r(this.host);this.contentId=a("GovTabContent");this.triggeId=a("GovTabTrigger")}render(){return s(i,{class:this.h.classes(n.root),default:this.default},s("div",{class:n.inner,role:"tabpanel",id:this.identifier||this.contentId,hidden:!this.isActive,"aria-labelledby":this.triggerIdentifier||this.triggeId,"aria-hidden":o(!this.isActive)},s("slot",null)))}async getIdentifier(){return this.identifier||this.contentId}async getTriggerIdentifier(){return this.triggerIdentifier||this.triggeId}async setActiveStatus(t){this.isActive=t}get host(){return e(this)}};d.style=h;export{d as gov_tabs_item};
2
- //# sourceMappingURL=p-59581b1b.entry.js.map
1
+ import{r as t,h as s,H as i,g as e}from"./p-682c7cc6.js";import{c as a}from"./p-24636c53.js";import{g as r,t as o}from"./p-3f37ddb6.js";import{T as n}from"./p-80e30702.js";import"./p-ff7365ae.js";import"./p-03990da5.js";const h=".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-tabs-item{color:var(--gov-tabs-text-color, var(--gov-color-secondary-700))}.gov-tabs-item__inner>*:last-child{margin-bottom:0}";const d=class{constructor(s){t(this,s);this.identifier=undefined;this.triggerIdentifier=undefined;this.label=undefined;this.default=false;this.isActive=false;this.h=r(this.host);this.contentId=a("GovTabContent");this.triggeId=a("GovTabTrigger")}render(){return s(i,{class:this.h.classes(n.root),default:this.default},s("div",{class:n.inner,role:"tabpanel",id:this.identifier||this.contentId,hidden:!this.isActive,"aria-labelledby":this.triggerIdentifier||this.triggeId,"aria-hidden":o(!this.isActive)},s("slot",null)))}async getIdentifier(){return this.identifier||this.contentId}async getTriggerIdentifier(){return this.triggerIdentifier||this.triggeId}async setActiveStatus(t){this.isActive=t}get host(){return e(this)}};d.style=h;export{d as gov_tabs_item};
2
+ //# sourceMappingURL=p-c0d3d3e0.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../packages/core/src/components/gov-tabs/gov-tabs-item.scss?tag=gov-tabs-item","../../../packages/core/src/components/gov-tabs/gov-tabs-item.tsx"],"names":["govTabsItemCss","GovTabsItem","[object Object]","hostRef","this","h","govHost","host","contentId","createID","triggeId","Host","class","classes","TabsItemClass","root","default","inner","role","id","identifier","hidden","isActive","aria-labelledby","triggerIdentifier","aria-hidden","toBoolAttrIfDefined","status"],"mappings":"4NAAA,MAAMA,EAAiB,iUCUVC,EAAW,MAKvBC,YAAAC,0GAsBoC,oBAChB,MAtBnBC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,UAAYC,EAAS,iBAC1BL,KAAKM,SAAWD,EAAS,iBAsB1BP,SACC,OACCG,EAACM,EAAI,CAACC,MAAOR,KAAKC,EAAEQ,QAAQC,EAAcC,MAAOC,QAASZ,KAAKY,SAC9DX,EAAA,MAAA,CACCO,MAAOE,EAAcG,MACrBC,KAAK,WACLC,GAAIf,KAAKgB,YAAchB,KAAKI,UAC5Ba,QAASjB,KAAKkB,SAAQC,kBACLnB,KAAKoB,mBAAqBpB,KAAKM,SAAQe,cAC3CC,GAAqBtB,KAAKkB,WAEvCjB,EAAA,OAAA,QAUJH,sBACC,OAAOE,KAAKgB,YAAchB,KAAKI,UAOhCN,6BACC,OAAOE,KAAKoB,mBAAqBpB,KAAKM,SAOvCR,sBAAsByB,GACrBvB,KAAKkB,SAAWK","sourcesContent":["/*\n * Tabs - Item\n */\n\n$class: \".gov-tabs-item\";\n\n#{$class} {\n\tcolor: $tabs-text-color;\n\t&__inner {\n\t\t@include reset-last-margin();\n\t}\n}\n","import { Component, Element, h, Prop, Method, State, Host } from '@stencil/core'\nimport { createID } from '../../utils/string.utils'\nimport { govHost, toBoolAttrIfDefined } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.d\"\nimport { TabsItemClass } from './constants'\n\n@Component({\n\ttag: 'gov-tabs-item',\n\tstyleUrl: 'gov-tabs-item.scss',\n})\nexport class GovTabsItem {\n\tprivate h: GovHost\n\tprivate readonly contentId: string\n\tprivate readonly triggeId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.contentId = createID('GovTabContent')\n\t\tthis.triggeId = createID('GovTabTrigger')\n\t}\n\n\t@Element() host: HTMLGovTabsItemElement\n\t/**\n\t * Custom tab item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Custom tab trigger item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly triggerIdentifier: string\n\t/**\n\t * Item name of the tab\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Default selected tab\n\t */\n\t@Prop() readonly default: boolean = false\n\t@State() isActive = false\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(TabsItemClass.root)} default={this.default}>\n\t\t\t\t<div\n\t\t\t\t\tclass={TabsItemClass.inner}\n\t\t\t\t\trole=\"tabpanel\"\n\t\t\t\t\tid={this.identifier || this.contentId}\n\t\t\t\t\thidden={!this.isActive}\n\t\t\t\t\taria-labelledby={this.triggerIdentifier || this.triggeId}\n\t\t\t\t\taria-hidden={toBoolAttrIfDefined(!this.isActive)}\n\t\t\t\t>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns a unique tab content identifier\n\t */\n\t@Method()\n\tasync getIdentifier(): Promise<string> {\n\t\treturn this.identifier || this.contentId\n\t}\n\n\t/**\n\t * Returns a unique tab trigger identifier\n\t */\n\t@Method()\n\tasync getTriggerIdentifier(): Promise<string> {\n\t\treturn this.triggerIdentifier || this.triggeId\n\t}\n\n\t/**\n\t * Set status of tab-item\n\t */\n\t@Method()\n\tasync setActiveStatus(status: boolean): Promise<void> {\n\t\tthis.isActive = status\n\t}\n}\n"]}
1
+ {"version":3,"sources":["../../../packages/core/src/components/gov-tabs/gov-tabs-item.scss?tag=gov-tabs-item","../../../packages/core/src/components/gov-tabs/gov-tabs-item.tsx"],"names":["govTabsItemCss","GovTabsItem","[object Object]","hostRef","this","h","govHost","host","contentId","createID","triggeId","Host","class","classes","TabsItemClass","root","default","inner","role","id","identifier","hidden","isActive","aria-labelledby","triggerIdentifier","aria-hidden","toBoolAttrIfDefined","status"],"mappings":"4NAAA,MAAMA,EAAiB,iUCUVC,EAAW,MAKvBC,YAAAC,0GAsBoC,oBAChB,MAtBnBC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,UAAYC,EAAS,iBAC1BL,KAAKM,SAAWD,EAAS,iBAsB1BP,SACC,OACCG,EAACM,EAAI,CAACC,MAAOR,KAAKC,EAAEQ,QAAQC,EAAcC,MAAOC,QAASZ,KAAKY,SAC9DX,EAAA,MAAA,CACCO,MAAOE,EAAcG,MACrBC,KAAK,WACLC,GAAIf,KAAKgB,YAAchB,KAAKI,UAC5Ba,QAASjB,KAAKkB,SAAQC,kBACLnB,KAAKoB,mBAAqBpB,KAAKM,SAAQe,cAC3CC,GAAqBtB,KAAKkB,WAEvCjB,EAAA,OAAA,QAUJH,sBACC,OAAOE,KAAKgB,YAAchB,KAAKI,UAOhCN,6BACC,OAAOE,KAAKoB,mBAAqBpB,KAAKM,SAOvCR,sBAAsByB,GACrBvB,KAAKkB,SAAWK","sourcesContent":["/*\n * Tabs - Item\n */\n\n$class: \".gov-tabs-item\";\n\n#{$class} {\n\tcolor: $tabs-text-color;\n\t&__inner {\n\t\t@include reset-last-margin();\n\t}\n}\n","import { Component, Element, h, Prop, Method, State, Host } from '@stencil/core'\nimport { createID } from '../../utils/string.utils'\nimport { govHost, toBoolAttrIfDefined } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { TabsItemClass } from './constants'\n\n@Component({\n\ttag: 'gov-tabs-item',\n\tstyleUrl: 'gov-tabs-item.scss',\n})\nexport class GovTabsItem {\n\tprivate h: GovHost\n\tprivate readonly contentId: string\n\tprivate readonly triggeId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.contentId = createID('GovTabContent')\n\t\tthis.triggeId = createID('GovTabTrigger')\n\t}\n\n\t@Element() host: HTMLGovTabsItemElement\n\t/**\n\t * Custom tab item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Custom tab trigger item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly triggerIdentifier: string\n\t/**\n\t * Item name of the tab\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Default selected tab\n\t */\n\t@Prop() readonly default: boolean = false\n\t@State() isActive = false\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(TabsItemClass.root)} default={this.default}>\n\t\t\t\t<div\n\t\t\t\t\tclass={TabsItemClass.inner}\n\t\t\t\t\trole=\"tabpanel\"\n\t\t\t\t\tid={this.identifier || this.contentId}\n\t\t\t\t\thidden={!this.isActive}\n\t\t\t\t\taria-labelledby={this.triggerIdentifier || this.triggeId}\n\t\t\t\t\taria-hidden={toBoolAttrIfDefined(!this.isActive)}\n\t\t\t\t>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns a unique tab content identifier\n\t */\n\t@Method()\n\tasync getIdentifier(): Promise<string> {\n\t\treturn this.identifier || this.contentId\n\t}\n\n\t/**\n\t * Returns a unique tab trigger identifier\n\t */\n\t@Method()\n\tasync getTriggerIdentifier(): Promise<string> {\n\t\treturn this.triggerIdentifier || this.triggeId\n\t}\n\n\t/**\n\t * Set status of tab-item\n\t */\n\t@Method()\n\tasync setActiveStatus(status: boolean): Promise<void> {\n\t\tthis.isActive = status\n\t}\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{p as n}from"./p-58691740.js";const t=t=>window&&n(t,window);const o=()=>{const n={canValidateWcagOnRender:false,iconsPath:"./assets/icons",documentNode:document?document:null};const o=t("GOV_DS_CONFIG");if(o){return Object.assign(Object.assign({},n),o)}return n};const s=()=>o().canValidateWcagOnRender;const c=()=>o().iconsPath;const e=()=>o().documentNode;export{s as c,e as d,c as i};
2
- //# sourceMappingURL=p-2b4acb01.js.map
1
+ import{a as n}from"./p-03990da5.js";const t=t=>window&&n(t,window);const o=()=>{const n={canValidateWcagOnRender:false,iconsPath:"./assets/icons",documentNode:document?document:null};const o=t("GOV_DS_CONFIG");if(o){return Object.assign(Object.assign({},n),o)}return n};const s=()=>o().canValidateWcagOnRender;const c=()=>o().iconsPath;const e=()=>o().documentNode;export{s as c,e as d,c as i};
2
+ //# sourceMappingURL=p-c20102ff.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/core/src/helpers/Dom/win.ts"],"names":["getWindowProperty","name","window","property","config","defaultConfig","canValidateWcagOnRender","iconsPath","documentNode","document","windowProperty","Object","assign"],"mappings":"oCAQA,MAAMA,EAAwBC,GAAyCC,QAAUC,EAASF,EAA6BC,QAEvH,MAAME,EAAS,KACd,MAAMC,EAAyB,CAC9BC,wBAAyB,MACzBC,UAAW,iBACXC,aAAcC,SAAWA,SAAW,MAGrC,MAAMC,EAAiBV,EAA2B,iBAClD,GAAIU,EAAgB,CACnB,OAAAC,OAAAC,OAAAD,OAAAC,OAAA,GAAYP,GAAkBK,GAG/B,OAAOL,SAGKC,EAA0B,IAA0CF,IAASE,8BAC7EC,EAAY,IAA4BH,IAASG,gBACjDC,EAAe,IAA+BJ,IAASI","sourcesContent":["import { property } from '../../utils/utils'\n\ninterface IConfig {\n\tcanValidateWcagOnRender: boolean\n\ticonsPath: string\n\tdocumentNode: Document\n}\n\nconst getWindowProperty = <T>(name: string): Partial<T> | undefined => window && property(name as keyof typeof window, window)\n\nconst config = (): IConfig => {\n\tconst defaultConfig: IConfig = {\n\t\tcanValidateWcagOnRender: false,\n\t\ticonsPath: './assets/icons',\n\t\tdocumentNode: document ? document : null,\n\t}\n\n\tconst windowProperty = getWindowProperty<IConfig>('GOV_DS_CONFIG')\n\tif (windowProperty) {\n\t\treturn { ...defaultConfig, ...windowProperty }\n\t}\n\n\treturn defaultConfig\n}\n\nexport const canValidateWcagOnRender = (): IConfig['canValidateWcagOnRender'] => config().canValidateWcagOnRender\nexport const iconsPath = (): IConfig['iconsPath'] => config().iconsPath\nexport const documentNode = (): IConfig['documentNode'] => config().documentNode\n"]}
@@ -0,0 +1,2 @@
1
+ import{r as o,c as a,h as r,H as s,g as i}from"./p-682c7cc6.js";import{v as t}from"./p-364b4792.js";import{c}from"./p-c20102ff.js";import{d as e}from"./p-03990da5.js";import{g as n}from"./p-3f37ddb6.js";import"./p-561fa17b.js";import"./p-24636c53.js";const p={root:"gov-backdrop",bg:"gov-backdrop__bg"};const d='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-backdrop__bg{z-index:100;position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--gov-backdrop-bg, var(--gov-color-secondary));opacity:var(--gov-backdrop-opacity, 0.45)}.gov-backdrop[inverse=""] .gov-backdrop__bg,.gov-backdrop[inverse=true i] .gov-backdrop__bg,.gov-backdrop[inverse="1"] .gov-backdrop__bg{background-color:var(--gov-backdrop-bg-inverse, var(--gov-color-neutral-white));opacity:var(--gov-backdrop-opacity, 0.8)}';const g=class{constructor(r){o(this,r);this.govClick=a(this,"gov-click",7);this.inverse=false;this.visible=false;this.wcagLabel=undefined;this.wcagLabelledBy=undefined;this.h=n(this.host)}async componentDidRender(){if(c()){await e(500);await this.validateWcag()}}render(){if(this.visible===false){return r(s,{class:this.h.classes(p.root)})}return r(s,{class:this.h.classes(p.root)},r("div",{role:"button","aria-label":this.wcagLabel,"aria-labelledby":this.wcagLabelledBy,onClick:o=>this.govClick.emit(o),class:p.bg}))}async validateWcag(){t(this.wcagLabel,this.wcagLabelledBy,p.root)}get host(){return i(this)}};g.style=d;export{g as gov_backdrop};
2
+ //# sourceMappingURL=p-c9948e57.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/core/src/components/gov-backdrop/constants.ts","../../../packages/core/src/components/gov-backdrop/gov-backdrop.scss?tag=gov-backdrop","../../../packages/core/src/components/gov-backdrop/gov-backdrop.tsx"],"names":["BackdropClass","root","bg","govBackdropCss","GovBackdrop","[object Object]","hostRef","this","h","govHost","host","canValidateWcagOnRender","delay","validateWcag","visible","Host","class","classes","role","aria-label","wcagLabel","aria-labelledby","wcagLabelledBy","onClick","e","govClick","emit","validateWcagLabel"],"mappings":"2PAAO,MAAMA,EAAgB,CAC5BC,KAAM,eACNC,GAAI,oBCFL,MAAMC,EAAiB,ynBCYVC,EAAW,MAGvBC,YAAAC,8DAQoC,mBAIlB,6DAXjBC,KAAKC,EAAIC,EAAQF,KAAKG,MAyBvBL,2BACC,GAAIM,IAA2B,OACxBC,EAAM,WACNL,KAAKM,gBAIbR,SACC,GAAIE,KAAKO,UAAY,MAAO,CAC3B,OAAQN,EAACO,EAAI,CAACC,MAAOT,KAAKC,EAAES,QAAQjB,EAAcC,QAEnD,OACCO,EAACO,EAAI,CAACC,MAAOT,KAAKC,EAAES,QAAQjB,EAAcC,OACzCO,EAAA,MAAA,CACCU,KAAM,SAAQC,aACFZ,KAAKa,UAASC,kBACTd,KAAKe,eACtBC,QAASC,GAAKjB,KAAKkB,SAASC,KAAKF,GACjCR,MAAOhB,EAAcE,MAUzBG,qBACCsB,EAAkBpB,KAAKa,UAAWb,KAAKe,eAAgBtB,EAAcC","sourcesContent":["export const BackdropClass = {\n\troot: 'gov-backdrop',\n\tbg: 'gov-backdrop__bg',\n}\n","/*\n * Backdrop\n */\n\n$class: \".gov-backdrop\";\n\n#{$class} {\n\t&__bg {\n\t\t@include z-index(\"modal\", 0);\n\t\tposition: fixed;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tbackground-color: $backdrop-bg;\n\t\topacity: $backdrop-opacity;\n\t}\n\n\t// VARIANTS\n\t@include parameter(\"inverse\") {\n\t\t#{$class} {\n\t\t\t&__bg {\n\t\t\t\tbackground-color: $backdrop-bg-inverse;\n\t\t\t\topacity: $backdrop-opacity-inverse;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Event, EventEmitter, h, Method, Prop, Host, Element } from '@stencil/core'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { BackdropClass } from './constants'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-backdrop',\n\tstyleUrl: 'gov-backdrop.scss',\n})\nexport class GovBackdrop {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovAlertElement\n\t/**\n\t * Determide if component should have inversed colors to be used on dark background.\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Default attribute for backdrop display\n\t */\n\t@Prop() visible = false\n\t/**\n\t * Adds accessible label for the backdrop that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when button clicks.\n\t */\n\t@Event({ eventName: 'gov-click' }) govClick: EventEmitter<MouseEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tif (this.visible === false) {\n\t\t\treturn (<Host class={this.h.classes(BackdropClass.root)} />)\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BackdropClass.root)}>\n\t\t\t\t<div\n\t\t\t\t\trole={'button'}\n\t\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\tonClick={e => this.govClick.emit(e)}\n\t\t\t\t\tclass={BackdropClass.bg}\n\t\t\t\t></div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, BackdropClass.root)\n\t}\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{S as o}from"./p-55500e5a.js";import{V as t}from"./p-ff7365ae.js";import{p as s}from"./p-03990da5.js";const n=s(o,["_XS","_S","_M","_L","_XL"]);const a=s(t,["PRIMARY","SECONDARY","SUCCESS","ERROR","WARNING"]);var r;(function(o){o["SOLID"]="solid";o["OUTLINED"]="outlined";o["BASE"]="base";o["LINK"]="link"})(r||(r={}));var i;(function(o){o["SUBMIT"]="submit";o["BUTTON"]="button";o["RESET"]="reset"})(i||(i={}));var e;(function(o){o["BLANK"]="_blank";o["SELF"]="_self";o["NEW"]="_new"})(e||(e={}));const f={root:"gov-button",rootWithIcon:"gov-button--w-icon"};export{a as B,i as N,r as T,n as a,f as b};
2
+ //# sourceMappingURL=p-cd869237.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/core/src/components/gov-button/constants.ts"],"names":["ButtonSizes","pick","Sizes","ButtonVariants","Variants","Type","NativeType","ButtonTarget","ButtonClass","root","rootWithIcon"],"mappings":"kHAKaA,EAAcC,EAAKC,EAAO,CAAC,MAAO,KAAM,KAAM,KAAM,cAGpDC,EAAiBF,EAAKG,EAAU,CAAC,UAAW,YAAa,UAAW,QAAS,gBAG9EC,GAAZ,SAAYA,GACXA,EAAA,SAAA,QACAA,EAAA,YAAA,WACAA,EAAA,QAAA,OACAA,EAAA,QAAA,QAJD,CAAYA,IAAAA,EAAI,SASJC,GAAZ,SAAYA,GACXA,EAAA,UAAA,SACAA,EAAA,UAAA,SACAA,EAAA,SAAA,SAHD,CAAYA,IAAAA,EAAU,KAQtB,IAAYC,GAAZ,SAAYA,GACXA,EAAA,SAAA,SACAA,EAAA,QAAA,QACAA,EAAA,OAAA,QAHD,CAAYA,IAAAA,EAAY,WAOXC,EAAc,CAC1BC,KAAM,aACNC,aAAc","sourcesContent":["import { Sizes } from '../../core/constants/sizes'\nimport { Variants } from '../../core/constants/variants'\nimport { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils'\n\nexport const ButtonSizes = pick(Sizes, ['_XS' ,'_S', '_M', '_L', '_XL'])\nexport type ButtonSizesType = `${ValueOf<typeof ButtonSizes>}`\n\nexport const ButtonVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'SUCCESS', 'ERROR', 'WARNING'])\nexport type ButtonVariantType = `${ValueOf<typeof ButtonVariants>}`\n\nexport enum Type {\n\tSOLID = 'solid',\n\tOUTLINED = 'outlined',\n\tBASE = 'base',\n\tLINK = 'link',\n}\n\nexport type TypesType = `${ValueOf<typeof Type>}`\n\nexport enum NativeType {\n\tSUBMIT = 'submit',\n\tBUTTON = 'button',\n\tRESET = 'reset',\n}\n\nexport type NativeTypesType = `${ValueOf<typeof NativeType>}`\n\nexport enum ButtonTarget {\n\tBLANK = '_blank',\n\tSELF = '_self',\n\tNEW = '_new',\n}\nexport type ButtonTargetType = `${ValueOf<typeof ButtonTarget>}`\n\nexport const ButtonClass = {\n\troot: 'gov-button',\n\trootWithIcon: 'gov-button--w-icon',\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{r,h as e,H as o,g as a}from"./p-682c7cc6.js";import{v as s}from"./p-26acf964.js";import{V as g}from"./p-ff7365ae.js";import{p as v}from"./p-03990da5.js";import{g as n}from"./p-3f37ddb6.js";import"./p-561fa17b.js";v(g,["PRIMARY","SECONDARY","WARNING","ERROR","SUCCESS"]);const i={root:"gov-message",icon:"gov-message__icon",content:"gov-message__content",close:"gov-message__close"};const t='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-message{position:relative;display:flex;gap:1rem;flex-direction:column;padding:0.75rem 1rem;border-left:0.25rem solid transparent;background:var(--gov-toast-message-bg, var(--gov-color-neutral-white))}.gov-message__icon{flex:0 0 1.25rem;width:1.25rem;height:1.25rem}.gov-message__content{flex:1 1 auto}.gov-message__content>*:last-child{margin-bottom:0}.gov-message__content p{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}@media (min-width: 30em){.gov-message{flex-direction:row}}.gov-message[shadow=""],.gov-message[shadow=true i],.gov-message[shadow="1"]{box-shadow:var(--gov-message-box-shadow, 0 0.25rem 1.25rem rgba(0, 0, 0, 0.1))}.gov-message[variant=warning]{border-left-color:var(--gov-message-warning-color, var(--gov-color-warning));background:var(--gov-message-warning-bg-color, var(--gov-color-warning-100))}.gov-message[variant=warning] .gov-message__icon{color:var(--gov-message-warning-color, var(--gov-color-warning))}.gov-message[variant=warning][inverse=""],.gov-message[variant=warning][inverse=true i],.gov-message[variant=warning][inverse="1"]{background:var(--gov-message-bg-inverse, var(--gov-color-neutral-white))}.gov-message[variant=error]{border-left-color:var(--gov-message-error-color, var(--gov-color-error));background:var(--gov-message-error-bg-color, var(--gov-color-error-100))}.gov-message[variant=error] .gov-message__icon{color:var(--gov-message-error-color, var(--gov-color-error))}.gov-message[variant=error][inverse=""],.gov-message[variant=error][inverse=true i],.gov-message[variant=error][inverse="1"]{background:var(--gov-message-bg-inverse, var(--gov-color-neutral-white))}.gov-message[variant=secondary]{border-left-color:var(--gov-message-secondary-color, var(--gov-color-secondary));background:var(--gov-message-secondary-bg-color, var(--gov-color-secondary-200))}.gov-message[variant=secondary] .gov-message__icon{color:var(--gov-message-secondary-color, var(--gov-color-secondary))}.gov-message[variant=secondary][inverse=""],.gov-message[variant=secondary][inverse=true i],.gov-message[variant=secondary][inverse="1"]{background:var(--gov-message-bg-inverse, var(--gov-color-neutral-white))}.gov-message[variant=success]{border-left-color:var(--gov-message-success-color, var(--gov-color-success));background:var(--gov-message-success-bg-color, var(--gov-color-success-100))}.gov-message[variant=success] .gov-message__icon{color:var(--gov-message-success-color, var(--gov-color-success))}.gov-message[variant=success][inverse=""],.gov-message[variant=success][inverse=true i],.gov-message[variant=success][inverse="1"]{background:var(--gov-message-bg-inverse, var(--gov-color-neutral-white))}.gov-message[variant=primary]{border-left-color:var(--gov-message-primary-color, var(--gov-color-primary));background:var(--gov-message-primary-bg-color, var(--gov-color-primary-100))}.gov-message[variant=primary] .gov-message__icon{color:var(--gov-message-primary-color, var(--gov-color-primary))}.gov-message[variant=primary][inverse=""],.gov-message[variant=primary][inverse=true i],.gov-message[variant=primary][inverse="1"]{background:var(--gov-message-bg-inverse, var(--gov-color-neutral-white))}';const c=class{constructor(e){r(this,e);this.variant=g.PRIMARY;this.h=n(this.host)}validateVariant(r){s(g,r,i.root)}render(){return e(o,{class:this.h.classes(i.root),variant:this.variant,role:"alert"},this.h.hasSlot("icon")&&e("span",{class:i.icon},e("slot",{name:"icon"})),e("div",{class:i.content},e("slot",null)))}get host(){return a(this)}static get watchers(){return{variant:["validateVariant"]}}};c.style=t;export{c as gov_message};
2
+ //# sourceMappingURL=p-cf6576fd.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/core/src/components/gov-message/constants.ts","../../../packages/core/src/components/gov-message/gov-message.scss?tag=gov-message","../../../packages/core/src/components/gov-message/gov-message.tsx"],"names":["pick","Variants","MessageClass","root","icon","content","close","govMessageCss","GovMessage","[object Object]","hostRef","PRIMARY","this","h","govHost","host","newValue","validateProp","Host","class","classes","variant","role","hasSlot","name"],"mappings":"4NAI+BA,EAAKC,EAAU,CAAC,UAAW,YAAa,UAAW,QAAS,YAGpF,MAAMC,EAAe,CAC3BC,KAAM,cACNC,KAAM,oBACNC,QAAS,uBACTC,MAAO,sBCXR,MAAMC,EAAgB,y4GCYTC,EAAU,MAGtBC,YAAAC,0BAS+CT,EAASU,QARvDC,KAAKC,EAAIC,EAAQF,KAAKG,MAWvBN,gBAAgBO,GACfC,EAAahB,EAAUe,EAAUd,EAAaC,MAG/CM,SACC,OACCI,EAACK,EAAI,CAACC,MAAOP,KAAKC,EAAEO,QAAQlB,EAAaC,MAAOkB,QAAST,KAAKS,QAASC,KAAK,SAC1EV,KAAKC,EAAEU,QAAQ,SACfV,EAAA,OAAA,CAAMM,MAAOjB,EAAaE,MACzBS,EAAA,OAAA,CAAMW,KAAK,UAIbX,EAAA,MAAA,CAAKM,MAAOjB,EAAaG,SACxBQ,EAAA,OAAA","sourcesContent":["import { Variants } from '../../core/constants/variants'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const MessageVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS'])\nexport type MessageVariantType = `${ValueOf<typeof MessageVariants>}`\n\nexport const MessageClass = {\n\troot: 'gov-message',\n\ticon: 'gov-message__icon',\n\tcontent: 'gov-message__content',\n\tclose: 'gov-message__close',\n}\n","/*\n * Alert\n */\n\n@import \"../gov-toast/gov-toast-message-core.scss\";\n$class: \".gov-message\";\n\n#{$class} {\n\t@include toast-message-core;\n\n\t// VARIANTS\n\t@include parameter(\"shadow\") {\n\t\tbox-shadow: $message-box-shadow;\n\t}\n\t@each $variant, $definitions in $message-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\tborder-left-color: get(\"color\", $definitions);\n\t\t\tbackground: get(\"bg-color\", $definitions);\n\t\t\t#{$class} {\n\t\t\t\t&__icon {\n\t\t\t\t\tcolor: get(\"color\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\tbackground: $message-bg-inverse;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { MessageClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { Variants } from '../../core/constants/variants'\nimport { MessageVariantType } from './constants'\n\n@Component({\n\ttag: 'gov-message',\n\tstyleUrl: 'gov-message.scss',\n})\nexport class GovMessage {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovMessageElement\n\n\t/**\n\t * Style variation of the content message.\n\t */\n\t@Prop() readonly variant: MessageVariantType = Variants.PRIMARY\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(Variants, newValue, MessageClass.root)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(MessageClass.root)} variant={this.variant} role=\"alert\">\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<span class={MessageClass.icon}>\n\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\n\t\t\t\t<div class={MessageClass.content}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as e,c as o,h as i,H as l,g as a}from"./p-682c7cc6.js";import{c as r}from"./p-24636c53.js";import{g as t,t as s}from"./p-3f37ddb6.js";import{a as f,b as n}from"./p-f58b9eec.js";import{c as m}from"./p-2b4acb01.js";import{d as g}from"./p-58691740.js";import{g as d}from"./p-ef3e7866.js";import"./p-561fa17b.js";import"./p-55500e5a.js";import"./p-99cc3dba.js";import"./p-b4581984.js";import"./p-a2f9daba.js";import"./p-71134d97.js";const v={root:"gov-form-file",area:"gov-form-file__area",label:"gov-form-file__label",input:"gov-form-file__input",list:"gov-form-file__list",item:"gov-form-file__item",attachments:"gov-form-file__attachments"};function h(e){const o=["bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let i=0,l=parseInt(e,10)||0;while(l>=1024&&++i){l=l/1024}return l.toFixed(l<10&&i>0?1:0)+" "+o[i]}function _(e,o){if(typeof o==="string"&&o.length){return o.replace(/\s/g,"").split(",").filter((o=>new RegExp(o.replace("*",".*")).test(e.type))).length>0}else{return true}}function b(e,o){const i=Math.round(e.size/1024);return i<=o}const c='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-form-file{position:relative;display:block;width:100%}.gov-form-file__label .gov-form-label__label>*:last-child{margin-bottom:0}.gov-form-file__input{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0.0001;cursor:pointer}.gov-form-file__attachments{margin-top:1rem 0rem 0rem}.gov-form-file__item{display:flex;gap:1rem;align-items:center}.gov-form-file[disabled=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[disabled=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[disabled="1"] .gov-form-file__label .gov-form-label__label{pointer-events:none}.gov-form-file[disabled=""] .gov-form-file__label .gov-form-label__label *,.gov-form-file[disabled=true i] .gov-form-file__label .gov-form-label__label *,.gov-form-file[disabled="1"] .gov-form-file__label .gov-form-label__label *{color:var(--gov-form-file-disabled-color, var(--gov-color-secondary-600))}.gov-form-file[expanded=""] .gov-form-file__area,.gov-form-file[expanded=true i] .gov-form-file__area,.gov-form-file[expanded="1"] .gov-form-file__area{position:relative;width:100%;padding:2rem 1.375rem 1.375rem;border:var(--gov-form-file-border, 0.0625rem dashed var(--gov-color-secondary-500));text-align:center;transition:background-color 150ms ease-in-out;will-change:background-color}.gov-form-file[expanded=""] .gov-form-file__area.highlight,.gov-form-file[expanded=true i] .gov-form-file__area.highlight,.gov-form-file[expanded="1"] .gov-form-file__area.highlight{background-color:var(--gov-color-primary-200)}.gov-form-file[expanded=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"] .gov-form-file__label .gov-form-label__label{width:100%;padding:1.375rem;border:var(--gov-form-file-border, 0.0625rem dashed var(--gov-color-secondary-500));text-align:center}.gov-form-file[expanded=""] .gov-form-file__attachments,.gov-form-file[expanded=true i] .gov-form-file__attachments,.gov-form-file[expanded="1"] .gov-form-file__attachments{margin:1.5rem 0rem 0rem}.gov-form-file[expanded=""][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=""][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=""][invalid="1"] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid="1"] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid="1"] .gov-form-file__label .gov-form-label__label{border-color:var(--gov-form-state-color-error, var(--gov-color-error))}@media (min-width: 30em){.gov-form-file[expanded=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"] .gov-form-file__label .gov-form-label__label{padding:2rem}}';const p=class{constructor(i){e(this,i);this.govFocus=o(this,"gov-focus",7);this.govBlur=o(this,"gov-blur",7);this.govFiles=o(this,"gov-files",7);this.govAddFile=o(this,"gov-add-file",7);this.govRemovFile=o(this,"gov-remove-file",7);this.expanded=false;this.required=false;this.disabled=undefined;this.displayAttachments=true;this.name=undefined;this.accept=undefined;this.maxFileSize=-1;this.identifier=undefined;this.invalid=undefined;this.errorSize="Soubor je větší než povolená velikost {FILE_SIZE}";this.errorAccept="Soubor tohoto typu není povolen";this.attachmentsLabel="Přílohy";this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagRemoveLabel="Odebrat soubor {FILE_NAME}";this.wcagAttachmentsLabel="Přílohy";this.files=[];this.fileId=r("GovInputFile");this.h=t(this.host);this.f=d(this.h)}registerListeners(){function e(){this.areaRef.classList.add("highlight")}function o(){this.areaRef.classList.remove("highlight")}this.inputRef.addEventListener("change",(e=>{e.preventDefault();e.stopPropagation();const o=e.target.files;this.validateFiles(o)}),false);if(this.expanded){const i=["dragover","dragleave"];const l=["dragenter","dragover","mouseenter"];const a=["dragleave","drop","mouseleave"];i.map((e=>this.inputRef.addEventListener(e,this.preventDefaults.bind(this),false)));l.map((o=>this.inputRef.addEventListener(o,e.bind(this),false)));a.forEach((e=>this.inputRef.addEventListener(e,o.bind(this),false)));this.areaRef.addEventListener("drop",this.handleDrop.bind(this),false)}}preventDefaults(e){e.preventDefault();e.stopPropagation()}handleDrop(e){const o=e.dataTransfer;this.validateFiles(o.files)}validateFiles(e){Array.from(e).map((e=>{const o=this.files.find((o=>o.file.name===e.name&&o.file.size===e.size))||null;if(o===null){const o=typeof this.maxFileSize==="number"&&this.maxFileSize>0?b(e,this.maxFileSize):true;const i=_(e,this.accept);const l={id:r("GovFormFile"),file:e,acceptValid:i,sizeValid:o};this.files=[...this.files,l];this.govAddFile.emit(l)}}));this.govFiles.emit(this.files)}componentWillLoad(){this.f.passAttrToControl("type","File")}async componentDidRender(){if(m()){await g(500);await this.validateWcag()}this.registerListeners()}render(){return i(l,{class:this.h.classes([v.root]),invalid:s(this.invalid),expanded:s(this.expanded)},i("div",{class:v.area,ref:e=>this.areaRef=e},i("slot",null),i("input",{class:v.input,ref:e=>this.inputRef=e,id:this.identifier||this.fileId,type:"file",name:this.name,accept:this.accept,onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled,"aria-required":s(this.required),"aria-invalid":s(this.invalid),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-disabled":s(this.disabled)})),this.h.hasSlot("attachments")?i("div",{class:v.attachments},i("slot",{name:"attachments"})):null,this.files.length&&this.displayAttachments?i("div",{class:v.attachments},i("gov-attachments",{label:this.wcagAttachmentsLabel,"wcag-label":this.wcagAttachmentsLabel},this.files.map((e=>i("gov-attachments-item",{"wcag-remove-labelled-by":e.id,"on-gov-remove":()=>this.onRemoveFileHandler(e)},i("span",{class:"sr-only",id:e.id},this.wcagRemoveLabel.replace("{FILE_NAME}",e.file.name)),e.file.name,e.acceptValid===false?i("gov-form-message",{slot:"message",variant:"error"},i("gov-icon",{slot:"icon",name:"warning"}),e.acceptValid===false?this.errorAccept:null):null,e.sizeValid===false?i("gov-form-message",{slot:"message",variant:"error"},i("gov-icon",{slot:"icon",name:"warning"}),this.errorSize.replace("{FILE_SIZE}",h(this.maxFileSize*1024))):null,i("span",{slot:"info"},"(",h(e.file.size),")")))))):null)}onRemoveFileHandler(e){const o=this.files.findIndex((o=>o.id===e.id));if(o!==-1){const e=this.files;const i=this.files[o];e.splice(o,1);this.files=[...e];this.govRemovFile.emit(i);this.govFiles.emit(this.files)}}onFocusHandler(e){e.preventDefault();this.govFocus.emit(e)}onBlurHandler(e){e.preventDefault();this.govBlur.emit(e)}async validateWcag(){f(this.wcagDescribedBy,"wcag-described-by",v.root);f(this.wcagLabelledBy,"wcag-labelled-by",v.root);n(this.identifier||this.fileId,this.wcagLabelledBy,v.root)}get host(){return a(this)}};p.style=c;export{p as gov_form_file};
2
- //# sourceMappingURL=p-90f818c0.entry.js.map
1
+ import{r as e,c as o,h as i,H as l,g as a}from"./p-682c7cc6.js";import{c as t}from"./p-24636c53.js";import{g as r,t as s}from"./p-3f37ddb6.js";import{a as f,b as n}from"./p-364b4792.js";import{c as m}from"./p-c20102ff.js";import{d as g}from"./p-03990da5.js";import{g as d}from"./p-76542f4f.js";import"./p-561fa17b.js";import"./p-55500e5a.js";import"./p-ff7365ae.js";import"./p-ef79904e.js";import"./p-6278531b.js";import"./p-f687452c.js";const v={root:"gov-form-file",area:"gov-form-file__area",label:"gov-form-file__label",input:"gov-form-file__input",list:"gov-form-file__list",item:"gov-form-file__item",attachments:"gov-form-file__attachments"};function h(e){const o=["bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let i=0,l=parseInt(e,10)||0;while(l>=1024&&++i){l=l/1024}return l.toFixed(l<10&&i>0?1:0)+" "+o[i]}function _(e,o){if(typeof o==="string"&&o.length){return o.replace(/\s/g,"").split(",").filter((o=>new RegExp(o.replace("*",".*")).test(e.type))).length>0}else{return true}}function b(e,o){const i=Math.round(e.size/1024);return i<=o}const c='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-form-file{position:relative;display:block;width:100%}.gov-form-file__label .gov-form-label__label>*:last-child{margin-bottom:0}.gov-form-file__input{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0.0001;cursor:pointer}.gov-form-file__attachments{margin-top:1rem 0rem 0rem}.gov-form-file__item{display:flex;gap:1rem;align-items:center}.gov-form-file[disabled=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[disabled=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[disabled="1"] .gov-form-file__label .gov-form-label__label{pointer-events:none}.gov-form-file[disabled=""] .gov-form-file__label .gov-form-label__label *,.gov-form-file[disabled=true i] .gov-form-file__label .gov-form-label__label *,.gov-form-file[disabled="1"] .gov-form-file__label .gov-form-label__label *{color:var(--gov-form-file-disabled-color, var(--gov-color-secondary-600))}.gov-form-file[expanded=""] .gov-form-file__area,.gov-form-file[expanded=true i] .gov-form-file__area,.gov-form-file[expanded="1"] .gov-form-file__area{position:relative;width:100%;padding:2rem 1.375rem 1.375rem;border:var(--gov-form-file-border, 0.0625rem dashed var(--gov-color-secondary-500));text-align:center;transition:background-color 150ms ease-in-out;will-change:background-color}.gov-form-file[expanded=""] .gov-form-file__area.highlight,.gov-form-file[expanded=true i] .gov-form-file__area.highlight,.gov-form-file[expanded="1"] .gov-form-file__area.highlight{background-color:var(--gov-color-primary-200)}.gov-form-file[expanded=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"] .gov-form-file__label .gov-form-label__label{width:100%;padding:1.375rem;border:var(--gov-form-file-border, 0.0625rem dashed var(--gov-color-secondary-500));text-align:center}.gov-form-file[expanded=""] .gov-form-file__attachments,.gov-form-file[expanded=true i] .gov-form-file__attachments,.gov-form-file[expanded="1"] .gov-form-file__attachments{margin:1.5rem 0rem 0rem}.gov-form-file[expanded=""][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=""][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=""][invalid="1"] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid="1"] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid="1"] .gov-form-file__label .gov-form-label__label{border-color:var(--gov-form-state-color-error, var(--gov-color-error))}@media (min-width: 30em){.gov-form-file[expanded=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"] .gov-form-file__label .gov-form-label__label{padding:2rem}}';const p=class{constructor(i){e(this,i);this.govFocus=o(this,"gov-focus",7);this.govBlur=o(this,"gov-blur",7);this.govFiles=o(this,"gov-files",7);this.govAddFile=o(this,"gov-add-file",7);this.govRemovFile=o(this,"gov-remove-file",7);this.expanded=false;this.required=false;this.disabled=undefined;this.displayAttachments=true;this.name=undefined;this.accept=undefined;this.maxFileSize=-1;this.identifier=undefined;this.invalid=undefined;this.errorSize="Soubor je větší než povolená velikost {FILE_SIZE}";this.errorAccept="Soubor tohoto typu není povolen";this.attachmentsLabel="Přílohy";this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagRemoveLabel="Odebrat soubor {FILE_NAME}";this.wcagAttachmentsLabel="Přílohy";this.files=[];this.fileId=t("GovInputFile");this.h=r(this.host);this.f=d(this.h)}registerListeners(){function e(){this.areaRef.classList.add("highlight")}function o(){this.areaRef.classList.remove("highlight")}this.inputRef.addEventListener("change",(e=>{e.preventDefault();e.stopPropagation();const o=e.target.files;this.validateFiles(o)}),false);if(this.expanded){const i=["dragover","dragleave"];const l=["dragenter","dragover","mouseenter"];const a=["dragleave","drop","mouseleave"];i.map((e=>this.inputRef.addEventListener(e,this.preventDefaults.bind(this),false)));l.map((o=>this.inputRef.addEventListener(o,e.bind(this),false)));a.forEach((e=>this.inputRef.addEventListener(e,o.bind(this),false)));this.areaRef.addEventListener("drop",this.handleDrop.bind(this),false)}}preventDefaults(e){e.preventDefault();e.stopPropagation()}handleDrop(e){const o=e.dataTransfer;this.validateFiles(o.files)}validateFiles(e){Array.from(e).map((e=>{const o=this.files.find((o=>o.file.name===e.name&&o.file.size===e.size))||null;if(o===null){const o=typeof this.maxFileSize==="number"&&this.maxFileSize>0?b(e,this.maxFileSize):true;const i=_(e,this.accept);const l={id:t("GovFormFile"),file:e,acceptValid:i,sizeValid:o};this.files=[...this.files,l];this.govAddFile.emit(l)}}));this.govFiles.emit(this.files)}componentWillLoad(){this.f.passAttrToControl("type","File")}async componentDidRender(){if(m()){await g(500);await this.validateWcag()}this.registerListeners()}render(){return i(l,{class:this.h.classes([v.root]),invalid:s(this.invalid),expanded:s(this.expanded)},i("div",{class:v.area,ref:e=>this.areaRef=e},i("slot",null),i("input",{class:v.input,ref:e=>this.inputRef=e,id:this.identifier||this.fileId,type:"file",name:this.name,accept:this.accept,onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled,"aria-required":s(this.required),"aria-invalid":s(this.invalid),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-disabled":s(this.disabled)})),this.h.hasSlot("attachments")?i("div",{class:v.attachments},i("slot",{name:"attachments"})):null,this.files.length&&this.displayAttachments?i("div",{class:v.attachments},i("gov-attachments",{label:this.wcagAttachmentsLabel,"wcag-label":this.wcagAttachmentsLabel},this.files.map((e=>i("gov-attachments-item",{"wcag-remove-labelled-by":e.id,"on-gov-remove":()=>this.onRemoveFileHandler(e)},i("span",{class:"sr-only",id:e.id},this.wcagRemoveLabel.replace("{FILE_NAME}",e.file.name)),e.file.name,e.acceptValid===false?i("gov-form-message",{slot:"message",variant:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill"}),e.acceptValid===false?this.errorAccept:null):null,e.sizeValid===false?i("gov-form-message",{slot:"message",variant:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill"}),this.errorSize.replace("{FILE_SIZE}",h(this.maxFileSize*1024))):null,i("span",{slot:"info"},"(",h(e.file.size),")")))))):null)}onRemoveFileHandler(e){const o=this.files.findIndex((o=>o.id===e.id));if(o!==-1){const e=this.files;const i=this.files[o];e.splice(o,1);this.files=[...e];this.govRemovFile.emit(i);this.govFiles.emit(this.files)}}onFocusHandler(e){e.preventDefault();this.govFocus.emit(e)}onBlurHandler(e){e.preventDefault();this.govBlur.emit(e)}async validateWcag(){f(this.wcagDescribedBy,"wcag-described-by",v.root);f(this.wcagLabelledBy,"wcag-labelled-by",v.root);n(this.identifier||this.fileId,this.wcagLabelledBy,v.root)}get host(){return a(this)}};p.style=c;export{p as gov_form_file};
2
+ //# sourceMappingURL=p-da2b921e.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/core/src/components/gov-form/file/constants.ts","../../../packages/core/src/utils/file.utils.ts","../../../packages/core/src/components/gov-form/file/gov-form-file.scss?tag=gov-form-file","../../../packages/core/src/components/gov-form/file/gov-form-file.tsx"],"names":["FormFileClass","root","area","label","input","list","item","attachments","formatBytes","bytes","units","l","n","parseInt","toFixed","fileAcceptValidation","file","accept","length","replace","split","filter","RegExp","test","type","fileSizeValidation","maxSize","fileSize","Math","round","size","govFormFileCss","GovFormFile","[object Object]","hostRef","this","fileId","createID","h","govHost","host","f","govForm","highlight","areaRef","classList","add","unhighlight","remove","inputRef","addEventListener","e","preventDefault","stopPropagation","files","target","validateFiles","expanded","events","inEvents","outEvents","map","eventName","preventDefaults","bind","forEach","handleDrop","dataTransfer","Array","from","isFile","find","name","isSizeValid","maxFileSize","isAcceptValid","newFile","id","acceptValid","sizeValid","govAddFile","emit","govFiles","passAttrToControl","canValidateWcagOnRender","delay","validateWcag","registerListeners","Host","class","classes","invalid","toBoolAttrIfDefined","ref","el","identifier","onFocus","onFocusHandler","onBlur","onBlurHandler","required","disabled","aria-required","aria-invalid","aria-describedby","wcagDescribedBy","aria-labelledby","wcagLabelledBy","aria-disabled","hasSlot","displayAttachments","wcagAttachmentsLabel","wcag-label","wcag-remove-labelled-by","on-gov-remove","onRemoveFileHandler","wcagRemoveLabel","slot","variant","errorAccept","errorSize","index","findIndex","removeFile","splice","govRemovFile","govFocus","govBlur","validateWcagRef","validateWcagLabelFor"],"mappings":"sbAAO,MAAMA,EAAgB,CAC5BC,KAAM,gBACNC,KAAM,sBACNC,MAAO,uBACPC,MAAO,uBACPC,KAAM,sBACNC,KAAM,sBACNC,YAAa,uCCPEC,EAAYC,GAC3B,MAAMC,EAAQ,CAAC,QAAS,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,OACzE,IAAIC,EAAI,EACPC,EAAIC,SAASJ,EAAO,KAAO,EAE5B,MAAOG,GAAK,QAAUD,EAAG,CACxBC,EAAIA,EAAI,KAGT,OAAOA,EAAEE,QAAQF,EAAI,IAAMD,EAAI,EAAI,EAAI,GAAK,IAAMD,EAAMC,YAGzCI,EAAqBC,EAAYC,GAChD,UAAWA,IAAW,UAAYA,EAAOC,OAAQ,CAChD,OACCD,EACEE,QAAQ,MAAO,IACfC,MAAM,KACNC,QAAOJ,GACA,IAAIK,OAAOL,EAAOE,QAAQ,IAAK,OAAOI,KAAKP,EAAKQ,QACrDN,OAAS,MAER,CACN,OAAO,eAIOO,EAAmBT,EAAYU,GAC9C,MAAMC,EAAWC,KAAKC,MAAMb,EAAKc,KAAO,MACxC,OAAOH,GAAYD,EC7BpB,MAAMK,EAAiB,80GCkBVC,EAAW,MAQvBC,YAAAC,4NAWqC,oBAKA,sDAS8C,iEAab,kEAYN,qEAII,wDAIU,4FAYD,uDAIU,qBAsBnD,GA/FnCC,KAAKC,OAASC,EAAS,gBAEvBF,KAAKG,EAAIC,EAAQJ,KAAKK,MACtBL,KAAKM,EAAIC,EAAQP,KAAKG,GA8FfL,oBACP,SAASU,IACRR,KAAKS,QAAQC,UAAUC,IAAI,aAE5B,SAASC,IACRZ,KAAKS,QAAQC,UAAUG,OAAO,aAG/Bb,KAAKc,SAASC,iBACb,UACAC,IACCA,EAAEC,iBACFD,EAAEE,kBACF,MAAMC,EAASH,EAAEI,OAA4BD,MAC7CnB,KAAKqB,cAAcF,KAEpB,OAID,GAAInB,KAAKsB,SAAU,CAClB,MAAMC,EAAS,CAAC,WAAY,aAC5B,MAAMC,EAAW,CAAC,YAAa,WAAY,cAC3C,MAAMC,EAAY,CAAC,YAAa,OAAQ,cAExCF,EAAOG,KAAIC,GAAa3B,KAAKc,SAASC,iBAAiBY,EAAW3B,KAAK4B,gBAAgBC,KAAK7B,MAAO,SACnGwB,EAASE,KAAIC,GAAa3B,KAAKc,SAASC,iBAAiBY,EAAWnB,EAAUqB,KAAK7B,MAAO,SAC1FyB,EAAUK,SAAQH,GAAa3B,KAAKc,SAASC,iBAAiBY,EAAWf,EAAYiB,KAAK7B,MAAO,SAEjGA,KAAKS,QAAQM,iBAAiB,OAAQf,KAAK+B,WAAWF,KAAK7B,MAAO,QAIpEF,gBAAgBkB,GACfA,EAAEC,iBACFD,EAAEE,kBAGHpB,WAAWkB,GACV,MAAMgB,EAAehB,EAAEgB,aACvBhC,KAAKqB,cAAcW,EAAab,OAGzBrB,cAAcqB,GACrBc,MAAMC,KAAKf,GAAOO,KAAI7C,IACrB,MAAMsD,EAASnC,KAAKmB,MAAMiB,MAAKjE,GAAQA,EAAKU,KAAKwD,OAASxD,EAAKwD,MAAQlE,EAAKU,KAAKc,OAASd,EAAKc,QAAS,KACxG,GAAIwC,IAAW,KAAM,CACpB,MAAMG,SAAqBtC,KAAKuC,cAAgB,UAAYvC,KAAKuC,YAAc,EAAIjD,EAAmBT,EAAMmB,KAAKuC,aAAe,KAChI,MAAMC,EAAgB5D,EAAqBC,EAAMmB,KAAKlB,QACtD,MAAM2D,EAAU,CACfC,GAAIxC,EAAS,eACbrB,KAAAA,EACA8D,YAAaH,EACbI,UAAWN,GAEZtC,KAAKmB,MAAQ,IAAInB,KAAKmB,MAAOsB,GAC7BzC,KAAK6C,WAAWC,KAAKL,OAIvBzC,KAAK+C,SAASD,KAAK9C,KAAKmB,OAGzBrB,oBACCE,KAAKM,EAAE0C,kBAAkB,OAAQ,QAGlClD,2BACC,GAAImD,IAA2B,OACxBC,EAAM,WACNlD,KAAKmD,eAGZnD,KAAKoD,oBAGNtD,SACC,OACCK,EAACkD,EAAI,CAACC,MAAOtD,KAAKG,EAAEoD,QAAQ,CAAC1F,EAAcC,OAAQ0F,QAASC,EAAoBzD,KAAKwD,SAAUlC,SAAUmC,EAAoBzD,KAAKsB,WACjInB,EAAA,MAAA,CAAKmD,MAAOzF,EAAcE,KAAM2F,IAAKC,GAAO3D,KAAKS,QAAUkD,GAC1DxD,EAAA,OAAA,MACAA,EAAA,QAAA,CACCmD,MAAOzF,EAAcI,MACrByF,IAAKC,GAAO3D,KAAKc,SAAW6C,EAC5BjB,GAAI1C,KAAK4D,YAAc5D,KAAKC,OAC5BZ,KAAK,OACLgD,KAAMrC,KAAKqC,KACXvD,OAAQkB,KAAKlB,OACb+E,QAAS7D,KAAK8D,eAAejC,KAAK7B,MAClC+D,OAAQ/D,KAAKgE,cAAcnC,KAAK7B,MAChCiE,SAAUjE,KAAKiE,SACfC,SAAUlE,KAAKkE,SAAQC,gBACRV,EAAoBzD,KAAKiE,UAASG,eACnCX,EAAoBzD,KAAKwD,SAAQa,mBAC7BrE,KAAKsE,gBAAeC,kBACrBvE,KAAKwE,eAAcC,gBACrBhB,EAAoBzD,KAAKkE,aAIzClE,KAAKG,EAAEuE,QAAQ,eACfvE,EAAA,MAAA,CAAKmD,MAAOzF,EAAcO,aACzB+B,EAAA,OAAA,CAAMkC,KAAM,iBAEV,KAEHrC,KAAKmB,MAAMpC,QAAUiB,KAAK2E,mBAC1BxE,EAAA,MAAA,CAAKmD,MAAOzF,EAAcO,aACzB+B,EAAA,kBAAA,CAAiBnC,MAAOgC,KAAK4E,qBAAoBC,aAAc7E,KAAK4E,sBAClE5E,KAAKmB,MAAMO,KAAIvD,GACfgC,EAAA,uBAAA,CAAA2E,0BAA+C3G,EAAKuE,GAAEqC,gBAAiB,IAAM/E,KAAKgF,oBAAoB7G,IACrGgC,EAAA,OAAA,CAAMmD,MAAO,UAAWZ,GAAIvE,EAAKuE,IAC/B1C,KAAKiF,gBAAgBjG,QAAQ,cAAeb,EAAKU,KAAKwD,OAEvDlE,EAAKU,KAAKwD,KACVlE,EAAKwE,cAAgB,MACrBxC,EAAA,mBAAA,CAAkB+E,KAAK,UAAUC,QAAQ,SACxChF,EAAA,WAAA,CAAU+E,KAAK,OAAO7C,KAAK,8BAC1BlE,EAAKwE,cAAgB,MAAQ3C,KAAKoF,YAAc,MAE/C,KACHjH,EAAKyE,YAAc,MACnBzC,EAAA,mBAAA,CAAkB+E,KAAK,UAAUC,QAAQ,SACxChF,EAAA,WAAA,CAAU+E,KAAK,OAAO7C,KAAK,8BAC1BrC,KAAKqF,UAAUrG,QAAQ,cAAeX,EAAY2B,KAAKuC,YAAc,QAEpE,KACJpC,EAAA,OAAA,CAAM+E,KAAK,QAAM,IAAG7G,EAAYF,EAAKU,KAAKc,MAAK,UAKhD,MAKCG,oBAAoBjB,GAC3B,MAAMyG,EAAQtF,KAAKmB,MAAMoE,WAAUpH,GAAQA,EAAKuE,KAAO7D,EAAK6D,KAC5D,GAAI4C,KAAW,EAAG,CACjB,MAAMnE,EAAQnB,KAAKmB,MACnB,MAAMqE,EAAaxF,KAAKmB,MAAMmE,GAC9BnE,EAAMsE,OAAOH,EAAO,GACpBtF,KAAKmB,MAAQ,IAAIA,GACjBnB,KAAK0F,aAAa5C,KAAK0C,GACvBxF,KAAK+C,SAASD,KAAK9C,KAAKmB,QAIlBrB,eAAekB,GACtBA,EAAEC,iBACFjB,KAAK2F,SAAS7C,KAAK9B,GAGZlB,cAAckB,GACrBA,EAAEC,iBACFjB,KAAK4F,QAAQ9C,KAAK9B,GAOnBlB,qBACC+F,EAAgB7F,KAAKsE,gBAAiB,oBAAqBzG,EAAcC,MACzE+H,EAAgB7F,KAAKwE,eAAgB,mBAAoB3G,EAAcC,MACvEgI,EAAqB9F,KAAK4D,YAAc5D,KAAKC,OAAQD,KAAKwE,eAAgB3G,EAAcC","sourcesContent":["export const FormFileClass = {\n\troot: 'gov-form-file',\n\tarea: 'gov-form-file__area',\n\tlabel: 'gov-form-file__label',\n\tinput: 'gov-form-file__input',\n\tlist: 'gov-form-file__list',\n\titem: 'gov-form-file__item',\n\tattachments: 'gov-form-file__attachments',\n}\n","export function formatBytes(bytes: any): string {\n\tconst units = ['bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']\n\tlet l = 0,\n\t\tn = parseInt(bytes, 10) || 0\n\n\twhile (n >= 1024 && ++l) {\n\t\tn = n / 1024\n\t}\n\n\treturn n.toFixed(n < 10 && l > 0 ? 1 : 0) + ' ' + units[l]\n}\n\nexport function fileAcceptValidation(file: File, accept: string): boolean {\n\tif (typeof accept === 'string' && accept.length) {\n\t\treturn (\n\t\t\taccept\n\t\t\t\t.replace(/\\s/g, '')\n\t\t\t\t.split(',')\n\t\t\t\t.filter(accept => {\n\t\t\t\t\treturn new RegExp(accept.replace('*', '.*')).test(file.type)\n\t\t\t\t}).length > 0\n\t\t)\n\t} else {\n\t\treturn true\n\t}\n}\n\nexport function fileSizeValidation(file: File, maxSize: number): boolean {\n\tconst fileSize = Math.round(file.size / 1024)\n\treturn fileSize <= maxSize\n}\n","/*\n * File\n */\n\n$class: \".gov-form-file\";\n\n#{$class} {\n\t@include base();\n\t&__label .gov-form-label__label {\n\t\t@include reset-last-margin();\n\t}\n\t&__input {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\topacity: 0.0001;\n\t\tcursor: pointer;\n\t}\n\t&__attachments {\n\t\tmargin-top: rem-calc(16 0 0);\n\t}\n\t&__item {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\talign-items: center;\n\t}\n\n\t// STATES\n\t@include parameter(\"disabled\") {\n\t\t#{$class} {\n\t\t\t&__label .gov-form-label__label {\n\t\t\t\tpointer-events: none;\n\t\t\t\t* {\n\t\t\t\t\tcolor: $form-file-disabled-color;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@include parameter(\"expanded\") {\n\t\t#{$class} {\n\t\t\t&__area {\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\tpadding: rem-calc(32) rem-calc(22) rem-calc(22);\n\t\t\t\tborder: $form-file-border;\n\t\t\t\ttext-align: center;\n\t\t\t\ttransition: background-color $t ease-in-out;\n\t\t\t\twill-change: background-color;\n\t\t\t\t&.highlight {\n\t\t\t\t\tbackground-color: color(\"primary.200\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&__label .gov-form-label__label {\n\t\t\t\twidth: 100%;\n\t\t\t\tpadding: rem-calc(22);\n\t\t\t\tborder: $form-file-border;\n\t\t\t\ttext-align: center;\n\t\t\t}\n\t\t\t&__attachments {\n\t\t\t\tmargin: rem-calc(24 0 0);\n\t\t\t}\n\t\t}\n\n\t\t// STATES\n\t\t@include parameter(\"invalid\") {\n\t\t\t#{$class} {\n\t\t\t\t&__label .gov-form-label__label {\n\t\t\t\t\tborder-color: $form-state-color-error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t@include parameter(\"expanded\") {\n\t\t\t#{$class} {\n\t\t\t\t&__label .gov-form-label__label {\n\t\t\t\t\tpadding: rem-calc(32);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Host, h, Prop, Event, EventEmitter, Element, Method, State } from '@stencil/core'\nimport { createID } from '../../../utils/string.utils'\nimport { FormFileClass } from './constants'\nimport { toBoolAttrIfDefined } from '../../../helpers/Dom/template'\nimport { validateWcagLabelFor, validateWcagRef } from '../../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../../helpers/Dom/win'\nimport { fileAcceptValidation, fileSizeValidation, formatBytes } from '../../../utils/file.utils'\nimport { delay } from '../../../utils/utils'\nimport { GovForm } from '../../../helpers/Dom/form.types'\nimport { govHost } from '../../../helpers/Dom/template'\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { govForm } from '../../../helpers/Dom/form'\nimport { GovFormFileItem } from './gov-form-file.types'\n\n@Component({\n\ttag: 'gov-form-file',\n\tstyleUrl: 'gov-form-file.scss',\n})\nexport class GovFormFile {\n\tprivate f: GovForm\n\tprivate h: GovHost\n\n\tprivate areaRef?: HTMLDivElement\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly fileId: string\n\n\tconstructor() {\n\t\tthis.fileId = createID('GovInputFile')\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormFileElement\n\t/**\n\t * Expands the file input to fill 100% of the container width.\n\t */\n\t@Prop() readonly expanded: boolean = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the File component disabled.\n\t * This prevents users from being able to interact with the File, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean\n\t/**\n\t * Show list of attachments\n\t */\n\t@Prop({ attribute: 'display-attachments' }) readonly displayAttachments: boolean = true\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept\n\t */\n\t@Prop() readonly accept: string\n\t/**\n\t * Maximum embedded file size\n\t */\n\t@Prop({ attribute: 'max-file-size' }) readonly maxFileSize: number = -1\n\t/**\n\t * Custom File identifier.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Error message when the maximum file size is exceeded\n\t */\n\t@Prop({ attribute: 'error-size' }) readonly errorSize: string = 'Soubor je větší než povolená velikost {FILE_SIZE}'\n\t/**\n\t * Insert unsupported file error message\n\t */\n\t@Prop({ attribute: 'error-accept' }) readonly errorAccept: string = 'Soubor tohoto typu není povolen'\n\t/**\n\t * Description of the list of attachments\n\t */\n\t@Prop({ attribute: 'attachments-label' }) readonly attachmentsLabel: string = 'Přílohy'\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: 'wcag-described-by' }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Adds accessible label for the remove button that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-remove-label' }) readonly wcagRemoveLabel: string = 'Odebrat soubor {FILE_NAME}'\n\t/**\n\t * Adds accessible label for the list of attachments.\n\t */\n\t@Prop({ attribute: 'wcag-attachments-label' }) readonly wcagAttachmentsLabel: string = 'Přílohy'\n\t/**\n\t * Emitted when the File has focus.\n\t */\n\t@Event({ eventName: 'gov-focus' }) govFocus: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the File loses focus.\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FocusEvent>\n\t/**\n\t * Called when the list of inserted files is changed\n\t */\n\t@Event({ eventName: 'gov-files' }) govFiles: EventEmitter<GovFormFileItem[]>\n\t/**\n\t * Called when a new file is added\n\t */\n\t@Event({ eventName: 'gov-add-file' }) govAddFile: EventEmitter<GovFormFileItem>\n\t/**\n\t * Called when a file is removed from the list\n\t */\n\t@Event({ eventName: 'gov-remove-file' }) govRemovFile: EventEmitter<GovFormFileItem>\n\n\t@State() files: GovFormFileItem[] = []\n\n\tprivate registerListeners() {\n\t\tfunction highlight() {\n\t\t\tthis.areaRef.classList.add('highlight')\n\t\t}\n\t\tfunction unhighlight() {\n\t\t\tthis.areaRef.classList.remove('highlight')\n\t\t}\n\n\t\tthis.inputRef.addEventListener(\n\t\t\t'change',\n\t\t\te => {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopPropagation()\n\t\t\t\tconst files = (e.target as HTMLInputElement).files\n\t\t\t\tthis.validateFiles(files)\n\t\t\t},\n\t\t\tfalse\n\t\t)\n\t\t//this.inputRef.addEventListener('focus')\n\n\t\tif (this.expanded) {\n\t\t\tconst events = ['dragover', 'dragleave']\n\t\t\tconst inEvents = ['dragenter', 'dragover', 'mouseenter']\n\t\t\tconst outEvents = ['dragleave', 'drop', 'mouseleave']\n\n\t\t\tevents.map(eventName => this.inputRef.addEventListener(eventName, this.preventDefaults.bind(this), false))\n\t\t\tinEvents.map(eventName => this.inputRef.addEventListener(eventName, highlight.bind(this), false))\n\t\t\toutEvents.forEach(eventName => this.inputRef.addEventListener(eventName, unhighlight.bind(this), false))\n\n\t\t\tthis.areaRef.addEventListener('drop', this.handleDrop.bind(this), false)\n\t\t}\n\t}\n\n\tpreventDefaults(e) {\n\t\te.preventDefault()\n\t\te.stopPropagation()\n\t}\n\n\thandleDrop(e: DragEvent) {\n\t\tconst dataTransfer = e.dataTransfer\n\t\tthis.validateFiles(dataTransfer.files)\n\t}\n\n\tprivate validateFiles(files: FileList) {\n\t\tArray.from(files).map(file => {\n\t\t\tconst isFile = this.files.find(item => item.file.name === file.name && item.file.size === file.size) || null\n\t\t\tif (isFile === null) {\n\t\t\t\tconst isSizeValid = typeof this.maxFileSize === 'number' && this.maxFileSize > 0 ? fileSizeValidation(file, this.maxFileSize) : true\n\t\t\t\tconst isAcceptValid = fileAcceptValidation(file, this.accept)\n\t\t\t\tconst newFile = {\n\t\t\t\t\tid: createID('GovFormFile'),\n\t\t\t\t\tfile,\n\t\t\t\t\tacceptValid: isAcceptValid,\n\t\t\t\t\tsizeValid: isSizeValid,\n\t\t\t\t}\n\t\t\t\tthis.files = [...this.files, newFile]\n\t\t\t\tthis.govAddFile.emit(newFile)\n\t\t\t}\n\t\t})\n\n\t\tthis.govFiles.emit(this.files)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.f.passAttrToControl('type', 'File')\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\n\t\tthis.registerListeners()\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes([FormFileClass.root])} invalid={toBoolAttrIfDefined(this.invalid)} expanded={toBoolAttrIfDefined(this.expanded)}>\n\t\t\t\t<div class={FormFileClass.area} ref={el => (this.areaRef = el as HTMLDivElement)}>\n\t\t\t\t\t<slot />\n\t\t\t\t\t<input\n\t\t\t\t\t\tclass={FormFileClass.input}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tid={this.identifier || this.fileId}\n\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\taccept={this.accept}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot('attachments') ? (\n\t\t\t\t\t<div class={FormFileClass.attachments}>\n\t\t\t\t\t\t<slot name={'attachments'} />\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\n\t\t\t\t{this.files.length && this.displayAttachments ? (\n\t\t\t\t\t<div class={FormFileClass.attachments}>\n\t\t\t\t\t\t<gov-attachments label={this.wcagAttachmentsLabel} wcag-label={this.wcagAttachmentsLabel}>\n\t\t\t\t\t\t\t{this.files.map(item => (\n\t\t\t\t\t\t\t\t<gov-attachments-item wcag-remove-labelled-by={item.id} on-gov-remove={() => this.onRemoveFileHandler(item)}>\n\t\t\t\t\t\t\t\t\t<span class={'sr-only'} id={item.id}>\n\t\t\t\t\t\t\t\t\t\t{this.wcagRemoveLabel.replace('{FILE_NAME}', item.file.name)}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{item.file.name}\n\t\t\t\t\t\t\t\t\t{item.acceptValid === false ? (\n\t\t\t\t\t\t\t\t\t\t<gov-form-message slot=\"message\" variant=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon\" name=\"exclamation-triangle-fill\"></gov-icon>\n\t\t\t\t\t\t\t\t\t\t\t{item.acceptValid === false ? this.errorAccept : null}\n\t\t\t\t\t\t\t\t\t\t</gov-form-message>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t{item.sizeValid === false ? (\n\t\t\t\t\t\t\t\t\t\t<gov-form-message slot=\"message\" variant=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon\" name=\"exclamation-triangle-fill\"></gov-icon>\n\t\t\t\t\t\t\t\t\t\t\t{this.errorSize.replace('{FILE_SIZE}', formatBytes(this.maxFileSize * 1024))}\n\t\t\t\t\t\t\t\t\t\t</gov-form-message>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t<span slot=\"info\">({formatBytes(item.file.size)})</span>\n\t\t\t\t\t\t\t\t</gov-attachments-item>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</gov-attachments>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onRemoveFileHandler(file: GovFormFileItem) {\n\t\tconst index = this.files.findIndex(item => item.id === file.id)\n\t\tif (index !== -1) {\n\t\t\tconst files = this.files\n\t\t\tconst removeFile = this.files[index]\n\t\t\tfiles.splice(index, 1)\n\t\t\tthis.files = [...files]\n\t\t\tthis.govRemovFile.emit(removeFile)\n\t\t\tthis.govFiles.emit(this.files)\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.preventDefault()\n\t\tthis.govFocus.emit(e)\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.preventDefault()\n\t\tthis.govBlur.emit(e)\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, 'wcag-described-by', FormFileClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, 'wcag-labelled-by', FormFileClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.fileId, this.wcagLabelledBy, FormFileClass.root)\n\t}\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{r as e,h as i,H as s,g as a}from"./p-682c7cc6.js";import{v as o}from"./p-26acf964.js";import{S as t}from"./p-55500e5a.js";import{p as r}from"./p-03990da5.js";import{g as p}from"./p-3f37ddb6.js";import"./p-561fa17b.js";const n=r(t,["_2XS","_XS","_S","_M","_L","_XL","_2XL","_3XL","_5XL"]);var m;(function(e){e["NONE"]="none";e["SM"]="sm";e["MD"]="md";e["LG"]="lg";e["XL"]="xl"})(m||(m={}));const c={root:"gov-spacer"};const g='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-spacer{position:relative;display:block;width:100%}.gov-spacer[size=unset]{height:0}.gov-spacer[size="2xs"]{height:0.25rem}.gov-spacer[size=xs]{height:0.5rem}.gov-spacer[size=s]{height:0.75rem}.gov-spacer[size=m]{height:1rem}.gov-spacer[size=l]{height:1.25rem}.gov-spacer[size=xl]{height:1.75rem}.gov-spacer[size="2xl"]{height:2rem}.gov-spacer[size="3xl"]{height:3rem}.gov-spacer[size="4xl"]{height:4.5rem}.gov-spacer[breakpoint=none]{display:none}.gov-spacer[breakpoint=sm]{display:none}@media (min-width: 30em){.gov-spacer[breakpoint=sm]{display:block}}.gov-spacer[breakpoint=md]{display:none}@media (min-width: 48em){.gov-spacer[breakpoint=md]{display:block}}.gov-spacer[breakpoint=lg]{display:none}@media (min-width: 64em){.gov-spacer[breakpoint=lg]{display:block}}.gov-spacer[breakpoint=xl]{display:none}@media (min-width: 75em){.gov-spacer[breakpoint=xl]{display:block}}';const h=class{constructor(i){e(this,i);this.size=undefined;this.breakpoint=m.NONE;this.h=p(this.host)}validateSize(e){o(n,e,c.root)}validateBreakpoint(e){o(m,e,c.root)}componentWillLoad(){this.validateSize(this.size);this.validateBreakpoint(this.breakpoint)}render(){return i(s,{class:this.h.classes(c.root),size:this.size,breakpoint:this.breakpoint})}get host(){return a(this)}static get watchers(){return{size:["validateSize"],breakpoint:["validateBreakpoint"]}}};h.style=g;export{h as gov_spacer};
2
+ //# sourceMappingURL=p-e57d250f.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/core/src/components/gov-spacer/constants.tsx","../../../packages/core/src/components/gov-spacer/gov-spacer.scss?tag=gov-spacer","../../../packages/core/src/components/gov-spacer/gov-spacer.tsx"],"names":["SpacerSize","pick","Sizes","SpacerBreakpoints","SpacerClass","root","govSpacerCss","GovSpacer","[object Object]","hostRef","NONE","this","h","govHost","host","newValue","validateProp","validateSize","size","validateBreakpoint","breakpoint","Host","class","classes"],"mappings":"iOAIO,MAAMA,EAAaC,EAAKC,EAAO,CAAC,OAAQ,MAAO,KAAM,KAAM,KAAM,MAAO,OAAQ,OAAQ,SAG/F,IAAYC,GAAZ,SAAYA,GACXA,EAAA,QAAA,OACAA,EAAA,MAAA,KACAA,EAAA,MAAA,KACAA,EAAA,MAAA,KACAA,EAAA,MAAA,MALD,CAAYA,IAAAA,EAAiB,KAStB,MAAMC,EAAc,CAC1BC,KAAM,cCjBP,MAAMC,EAAe,8iCCURC,EAAS,MAErBC,YAAAC,iDAWsDN,EAAkBO,KAVvEC,KAAKC,EAAIC,EAAQF,KAAKG,MAavBN,aAAaO,GACZC,EAAahB,EAAYe,EAAUX,EAAYC,MAIhDG,mBAAmBO,GAClBC,EAAab,EAAmBY,EAAUX,EAAYC,MAGvDG,oBACCG,KAAKM,aAAaN,KAAKO,MACvBP,KAAKQ,mBAAmBR,KAAKS,YAG9BZ,SACC,OAAOI,EAACS,EAAI,CAACC,MAAOX,KAAKC,EAAEW,QAAQnB,EAAYC,MAAOa,KAAMP,KAAKO,KAAME,WAAYT,KAAKS","sourcesContent":["import { Sizes } from '../../core/constants/sizes'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const SpacerSize = pick(Sizes, ['_2XS', '_XS', '_S', '_M', '_L', '_XL', '_2XL', '_3XL', '_5XL'])\nexport type SpacerSizeType = `${ValueOf<typeof SpacerSize>}`\n\nexport enum SpacerBreakpoints {\n\tNONE = 'none',\n\tSM = 'sm',\n\tMD = 'md',\n\tLG = 'lg',\n\tXL = 'xl',\n}\nexport type SpacerBreakpointsType = `${ValueOf<typeof SpacerBreakpoints>}`\n\nexport const SpacerClass = {\n\troot: 'gov-spacer',\n}\n","/*\n * Spacer\n */\n\n$class: \".gov-spacer\";\n\n#{$class} {\n\t@include base();\n\n\t// VARIANTS\n\t@each $name, $value in $sizes {\n\t\t&[size=\"#{$name}\"] {\n\t\t\theight: #{$value};\n\t\t}\n\t}\n\t@each $name, $value in $mq-breakpoints {\n\t\t&[breakpoint=\"#{$name}\"] {\n\t\t\tdisplay: none;\n\n\t\t\t@if #{$value} != \"0\" {\n\t\t\t\t@include mq($from: #{$name}) {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { SpacerBreakpoints, SpacerBreakpointsType, SpacerClass, SpacerSize, SpacerSizeType } from './constants'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govHost } from '../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-spacer',\n\tstyleUrl: 'gov-spacer.scss',\n})\nexport class GovSpacer {\n\tprivate h: GovHost\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\t@Element() host: HTMLGovSpacerElement\n\t/**\n\t * Spacer’s size\n\t */\n\t@Prop() readonly size?: SpacerSizeType\n\t/**\n\t * Breakpoint\n\t */\n\t@Prop() readonly breakpoint?: SpacerBreakpointsType = SpacerBreakpoints.NONE\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(SpacerSize, newValue, SpacerClass.root)\n\t}\n\n\t@Watch('breakpoint')\n\tvalidateBreakpoint(newValue: string): void {\n\t\tvalidateProp(SpacerBreakpoints, newValue, SpacerClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateBreakpoint(this.breakpoint)\n\t}\n\n\trender() {\n\t\treturn <Host class={this.h.classes(SpacerClass.root)} size={this.size} breakpoint={this.breakpoint}></Host>\n\t}\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{a as t,r as s,h as i,H as n,g as e}from"./p-682c7cc6.js";import{i as o}from"./p-c20102ff.js";import{g as a}from"./p-3f37ddb6.js";import"./p-03990da5.js";var r;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(r||(r={}));const c={root:"gov-icon",holder:"gov-icon__holder"};const h="0.0.7";const l=()=>h;const f={};const d={};const p=t=>t.startsWith("http://")||t.startsWith("https://");const u=(s,i,n)=>{if(p(s)){return`${s}/${n}/${i}.svg?v=${l()}`}return t(`${s}/${n}/${i}.svg`)+`?v=${l()}`};async function m({name:t,type:s}){if(f[t]){return f[t]}if(!d[t]){d[t]=fetch(u(o(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const i=await d[t];f[t]=i;return i}const g=".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-icon{display:inline-flex}.gov-icon__holder,.gov-icon svg{display:inline-flex;width:100%;height:100%}";const v=class{constructor(t){s(this,t);this.name=null;this.type="basic";this.iconData=undefined;this.visible=false;this.error=false;this.h=a(this.host)}async loadIconPathData(){const{name:t,visible:s,type:i}=this;if(!t||!s){return}try{this.iconData=await m({name:t,type:i})}catch(t){this.error=true}}connectedCallback(){this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((s=>{s.forEach((s=>{if(s.isIntersecting){this.intersectionObserver.disconnect();this.intersectionObserver=null;t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}render(){if(this.error){return null}return i(n,{class:this.h.classes(c.root)},i("span",{class:c.holder,innerHTML:this.iconData}))}static get assetsDirs(){return["assets"]}get host(){return e(this)}static get watchers(){return{name:["loadIconPathData"]}}};v.style=g;export{v as gov_icon};
2
+ //# sourceMappingURL=p-e9c94ef7.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/core/src/components/gov-icon/constants.ts","../../../packages/core/src/utils/ds.utils.ts","../../../packages/core/src/utils/icon.utils.ts","../../../packages/core/src/components/gov-icon/gov-icon.scss?tag=gov-icon","../../../packages/core/src/components/gov-icon/gov-icon.tsx"],"names":["Types","IconClass","root","holder","dsVersion","version","iconCache","requestCache","isExternalUrl","path","startsWith","iconUrl","name","type","getAssetPath","async","fetchIcon","fetch","iconsPath","then","resp","status","text","Error","govIconCss","GovIcon","[object Object]","hostRef","this","h","govHost","host","visible","iconData","e","error","waitUntilVisible","loadIconPathData","intersectionObserver","disconnect","callback","window","IntersectionObserver","entries","forEach","entry","isIntersecting","rootMargin","observe","Host","class","classes","innerHTML"],"mappings":"gKAEA,IAAKA,GAAL,SAAKA,GACJA,EAAA,SAAA,QACAA,EAAA,WAAA,UACAA,EAAA,WAAA,WAHD,CAAKA,IAAAA,EAAK,KAOH,MAAMC,EAAY,CACxBC,KAAM,WACNC,OAAQ,oCCTF,MAAMC,EAAY,IACjBC,ECCR,MAAMC,EAAuC,GAC7C,MAAMC,EAAmD,GAEzD,MAAMC,EAAiBC,GAAiBA,EAAKC,WAAW,YAAcD,EAAKC,WAAW,YACtF,MAAMC,EAAU,CAACF,EAAcG,EAAcC,KAC5C,GAAIL,EAAcC,GAAO,CACxB,MAAO,GAAGA,KAAQI,KAAQD,WAAcR,MAEzC,OAAOU,EAAa,GAAGL,KAAQI,KAAQD,SAAc,MAAMR,OAGrDW,eAAeC,GAAUJ,KAAEA,EAAIC,KAAEA,IACvC,GAAIP,EAAUM,GAAO,CACpB,OAAON,EAAUM,GAElB,IAAKL,EAAaK,GAAO,CACxBL,EAAaK,GAAQK,MAAMN,EAAQO,IAAaN,EAAMC,IAAOM,MAAKC,IACjE,GAAIA,EAAKC,SAAW,IAAK,CACxB,OAAOD,EAAKE,WACN,CACN,MAAM,IAAIC,MAAM,+BAInB,MAAMd,QAAaF,EAAaK,GAChCN,EAAUM,GAAQH,EAClB,OAAOA,EC9BR,MAAMe,EAAa,uSCWNC,EAAO,MAGnBC,YAAAC,uBAOuB,eAIF,6CAEM,iBACF,MAbxBC,KAAKC,EAAIC,EAAQF,KAAKG,MAiBfL,yBACP,MAAMd,KAAEA,EAAIoB,QAAEA,EAAOnB,KAAEA,GAASe,KAChC,IAAyBhB,IAASoB,EAAS,CAC1C,OAED,IACCJ,KAAKK,eAAiBjB,EAAU,CAAEJ,KAAAA,EAAMC,KAAAA,IACvC,MAAOqB,GACRN,KAAKO,MAAQ,MAIfT,oBACCE,KAAKQ,kBAAiBrB,UACrBa,KAAKI,QAAU,WACTJ,KAAKS,sBAIbX,uBACC,GAAIE,KAAKU,qBAAsB,CAC9BV,KAAKU,qBAAqBC,aAC1BX,KAAKU,qBAAuB,MAI9BZ,gCACOE,KAAKS,mBAGJX,iBAAiBc,GACxB,UAA+BC,SAAW,cAAiBA,OAAeC,qBAAsB,CAC/FF,IACA,OAEDZ,KAAKU,qBAAuB,IAAII,sBAC/BC,IACCA,EAAQC,SAAQC,IACf,GAAIA,EAAMC,eAAgB,CACzBlB,KAAKU,qBAAqBC,aAC1BX,KAAKU,qBAAuB,KAC5BE,UAIH,CAAEO,WAAY,SAEfnB,KAAKU,qBAAqBU,QAAQpB,KAAKG,MAGxCL,SACC,GAAIE,KAAKO,MAAO,CACf,OAAO,KAER,OACCN,EAACoB,EAAI,CAACC,MAAOtB,KAAKC,EAAEsB,QAAQlD,EAAUC,OACrC2B,EAAA,OAAA,CAAMqB,MAAOjD,EAAUE,OAAQiD,UAAWxB,KAAKK","sourcesContent":["import { ValueOf } from '../../types/interfaces'\n\nenum Types {\n\tBASIC = 'basic',\n\tCOMPLEX = 'complex',\n\tCOLORED = 'colored',\n}\nexport type Type = `${ValueOf<typeof Types>}`\n\nexport const IconClass = {\n\troot: 'gov-icon',\n\tholder: 'gov-icon__holder',\n}\n","import { version } from '../../package.json'\n\nexport const dsVersion = (): string => {\n\treturn version\n}\n","import { getAssetPath } from '@stencil/core'\nimport { dsVersion } from './ds.utils'\nimport { iconsPath } from '../helpers/Dom/win'\n\nconst iconCache: { [key: string]: string } = {}\nconst requestCache: { [key: string]: Promise<string> } = {}\n\nconst isExternalUrl = (path: string) => path.startsWith('http://') || path.startsWith('https://')\nconst iconUrl = (path: string, name: string, type: string) => {\n\tif (isExternalUrl(path)) {\n\t\treturn `${path}/${type}/${name}.svg?v=${dsVersion()}`\n\t}\n\treturn getAssetPath(`${path}/${type}/${name}.svg`) + `?v=${dsVersion()}`\n}\n\nexport async function fetchIcon({ name, type }: { name: string; type: string }): Promise<string> {\n\tif (iconCache[name]) {\n\t\treturn iconCache[name]\n\t}\n\tif (!requestCache[name]) {\n\t\trequestCache[name] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {\n\t\t\tif (resp.status === 200) {\n\t\t\t\treturn resp.text()\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Gov Icon doesn't exists\")\n\t\t\t}\n\t\t})\n\t}\n\tconst path = await requestCache[name]\n\ticonCache[name] = path\n\treturn path\n}\n","/*\n * Icon\n */\n\n$class: \".gov-icon\";\n\n#{$class} {\n\tdisplay: inline-flex;\n\t&__holder,\n\tsvg {\n\t\tdisplay: inline-flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n}\n","import { Build, Component, Element, h, Prop, State, Watch, Host } from '@stencil/core'\nimport { IconClass, Type } from './constants'\nimport { fetchIcon } from '../../utils/icon.utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\tassetsDirs: ['assets'],\n\tstyleUrl: 'gov-icon.scss',\n\ttag: 'gov-icon',\n})\nexport class GovIcon {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\t@Element() host: HTMLGovIconElement\n\t/**\n\t * Name of icon\n\t */\n\t@Prop() name: string = null\n\t/**\n\t * Type of icon\n\t */\n\t@Prop() type: Type = 'basic'\n\t@State() private iconData: string\n\t@State() private visible = false\n\t@State() private error = false\n\tprivate intersectionObserver: IntersectionObserver\n\n\t@Watch('name')\n\tprivate async loadIconPathData(): Promise<void> {\n\t\tconst { name, visible, type } = this\n\t\tif (!Build.isBrowser || !name || !visible) {\n\t\t\treturn\n\t\t}\n\t\ttry {\n\t\t\tthis.iconData = await fetchIcon({ name, type })\n\t\t} catch (e) {\n\t\t\tthis.error = true\n\t\t}\n\t}\n\n\tconnectedCallback(): void {\n\t\tthis.waitUntilVisible(async () => {\n\t\t\tthis.visible = true\n\t\t\tawait this.loadIconPathData()\n\t\t})\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tif (this.intersectionObserver) {\n\t\t\tthis.intersectionObserver.disconnect()\n\t\t\tthis.intersectionObserver = null\n\t\t}\n\t}\n\n\tasync componentWillLoad(): Promise<void> {\n\t\tawait this.loadIconPathData()\n\t}\n\n\tprivate waitUntilVisible(callback: () => void): void {\n\t\tif (!Build.isBrowser || typeof window === 'undefined' || !(window as any).IntersectionObserver) {\n\t\t\tcallback()\n\t\t\treturn\n\t\t}\n\t\tthis.intersectionObserver = new IntersectionObserver(\n\t\t\tentries => {\n\t\t\t\tentries.forEach(entry => {\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tthis.intersectionObserver.disconnect()\n\t\t\t\t\t\tthis.intersectionObserver = null\n\t\t\t\t\t\tcallback()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t{ rootMargin: '50px' }\n\t\t)\n\t\tthis.intersectionObserver.observe(this.host)\n\t}\n\n\trender() {\n\t\tif (this.error) {\n\t\t\treturn null\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(IconClass.root)}>\n\t\t\t\t<span class={IconClass.holder} innerHTML={this.iconData}></span>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{r as o,h as r,H as t,g as e}from"./p-682c7cc6.js";import{g as m}from"./p-3f37ddb6.js";import{g as i,b as s}from"./p-76542f4f.js";import{c as a,s as c}from"./p-24636c53.js";import"./p-55500e5a.js";import"./p-03990da5.js";import"./p-ff7365ae.js";import"./p-ef79904e.js";import"./p-6278531b.js";import"./p-f687452c.js";const l='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-form-control__holder{display:flex;flex-direction:column;padding:0;border:none}.gov-form-control__bottom>*:last-child{margin-bottom:0}.gov-form-control[type=file] .gov-form-label[slot=top] .gov-form-label__label{margin:0rem 0rem 0.5rem}.gov-form-control[type=file] .gov-form-control__bottom{margin:0.5rem 0rem 0rem}.gov-form-control[type=input] .gov-form-label .gov-form-label__label,.gov-form-control[type=select] .gov-form-label .gov-form-label__label{margin:0rem 0rem 0.25rem}.gov-form-control[type=input] .gov-form-control__bottom,.gov-form-control[type=select] .gov-form-control__bottom{margin:0.25rem 0rem 0rem}.gov-form-control[size=xs][type=checkbox] .gov-form-control__bottom,.gov-form-control[size=xs][type=radio] .gov-form-control__bottom{margin-top:var(--gov-form-checkbox-core-xs-message-gap, 0.5rem);margin-left:calc(var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem) + var(--gov-form-checkbox-core-xs-gap, 0.75rem))}.gov-form-control[size=s][type=checkbox] .gov-form-control__bottom,.gov-form-control[size=s][type=radio] .gov-form-control__bottom{margin-top:var(--gov-form-checkbox-core-s-message-gap, 0.5rem);margin-left:calc(var(--gov-form-checkbox-core-s-indicator-size, 1.375rem) + var(--gov-form-checkbox-core-s-gap, 0.75rem))}.gov-form-control[size=m][type=checkbox] .gov-form-control__bottom,.gov-form-control[size=m][type=radio] .gov-form-control__bottom{margin-top:var(--gov-form-checkbox-core-m-message-gap, 0.75rem);margin-left:calc(var(--gov-form-checkbox-core-m-indicator-size, 1.5rem) + var(--gov-form-checkbox-core-m-gap, 1rem))}.gov-form-control[size=l][type=checkbox] .gov-form-control__bottom,.gov-form-control[size=l][type=radio] .gov-form-control__bottom{margin-top:var(--gov-form-checkbox-core-l-message-gap, 0.75rem);margin-left:calc(var(--gov-form-checkbox-core-l-indicator-size, 2rem) + var(--gov-form-checkbox-core-l-gap, 1rem))}.gov-form-control[size=xs][type=switch] .gov-form-control__bottom{margin-top:var(--gov-form-switch-xs-message-gap, 0.5rem);margin-left:calc(var(--gov-form-switch-xs-indicator-height, 1.25rem) * 1.6666666667 + var(--gov-form-switch-xs-gap, 0.75rem))}.gov-form-control[size=s][type=switch] .gov-form-control__bottom{margin-top:var(--gov-form-switch-s-message-gap, 0.5rem);margin-left:calc(var(--gov-form-switch-s-indicator-height, 1.375rem) * 1.6666666667 + var(--gov-form-switch-s-gap, 0.75rem))}.gov-form-control[size=m][type=switch] .gov-form-control__bottom{margin-top:var(--gov-form-switch-m-message-gap, 0.75rem);margin-left:calc(var(--gov-form-switch-m-indicator-height, 1.5rem) * 1.6666666667 + var(--gov-form-switch-m-gap, 1rem))}.gov-form-control[size=l][type=switch] .gov-form-control__bottom{margin-top:var(--gov-form-switch-l-message-gap, 0.75rem);margin-left:calc(var(--gov-form-switch-l-indicator-height, 2rem) * 1.6666666667 + var(--gov-form-switch-l-gap, 1rem))}.gov-form-control[invalid=""] .gov-form-label[slot=top] .gov-form-label__label,.gov-form-control[invalid=true i] .gov-form-label[slot=top] .gov-form-label__label,.gov-form-control[invalid="1"] .gov-form-label[slot=top] .gov-form-label__label{color:var(--gov-form-state-color-error, var(--gov-color-error))}.gov-form-control[disabled=""] .gov-form-label__label,.gov-form-control[disabled=true i] .gov-form-label__label,.gov-form-control[disabled="1"] .gov-form-label__label{pointer-events:none}';const g=class{constructor(r){o(this,r);this.gap=undefined;this.identifier=undefined;this.invalid=false;this.disabled=false;this.success=false;this.fieldset=false;this.size="m";this.h=m(this.host);this.f=i(this.h);this.controlId=a("GovFormControl")}watchInvalid(){this.passChildAttrs()}componentDidRender(){this.passChildAttrs();this.syncControlMessages();this.formElementDescriptionControl()}disconnectedCallback(){var o;(o=this.observer)===null||o===void 0?void 0:o.disconnect()}passChildAttrs(){const o=["gov-form-select","gov-form-input","gov-form-switch","gov-form-checkbox","gov-form-radio","gov-form-multi-select","gov-form-file","gov-form-search"];this.h.passChildAttr(o,"size",this.size);this.h.passChildAttr(o,"invalid",this.invalid);this.h.passChildAttr(o,"disabled",this.disabled);this.h.passChildAttr(o,"success",this.success);if(this.f.hasGroupChildren===false){this.h.passChildAttr([...o,"gov-form-label"],"identifier",this.identifier||this.controlId)}}formElementDescriptionControl(){const o=this.host.querySelector("."+s.bottom);if(!o)return;this.observer=new MutationObserver(function(){this.syncControlMessages()}.bind(this));this.observer.observe(o,{childList:true})}syncControlMessages(){Promise.all(this.f.messageElements.map((o=>o.identifier()))).then((o=>{this.f.mainElementsInControl.forEach((r=>{const t=c(r.getAttribute("wcag-described-by"));r.removeAttribute("wcag-described-by");if(Array.isArray(t)){t.forEach((r=>r.indexOf("GovFormMessage")===-1?o.push(r):null))}if(o.length){r.setAttribute("wcag-described-by",o.join(" "))}}))}))}render(){const o=this.fieldset?"fieldset":"div";return r(t,{size:this.size,class:this.h.classes(s.root)},r(o,{class:s.holder},this.h.hasSlot("top")&&r("slot",{name:"top"}),r("slot",null),this.h.hasSlot("bottom")&&r("div",{class:s.bottom},r("slot",{name:"bottom"}))))}get host(){return e(this)}static get watchers(){return{invalid:["watchInvalid"]}}};g.style=l;export{g as gov_form_control};
2
+ //# sourceMappingURL=p-eb1214ab.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/core/src/components/gov-form/control/gov-form-control.scss?tag=gov-form-control","../../../packages/core/src/components/gov-form/control/gov-form-control.tsx"],"names":["govFormControlCss","GovFormControl","[object Object]","hostRef","this","h","govHost","host","f","govForm","controlId","createID","passChildAttrs","syncControlMessages","formElementDescriptionControl","_a","observer","disconnect","formElements","passChildAttr","size","invalid","disabled","success","hasGroupChildren","identifier","bottomSlot","querySelector","FormControlClass","bottom","MutationObserver","bind","observe","childList","Promise","all","messageElements","map","message","then","ids","mainElementsInControl","forEach","element","currentValue","splitByWhitespace","getAttribute","removeAttribute","Array","isArray","id","indexOf","push","length","setAttribute","join","Tag","fieldset","Host","class","classes","root","holder","hasSlot","name"],"mappings":"mUAAA,MAAMA,EAAoB,m9GCYbC,EAAc,MAM1BC,YAAAC,uEAiBoC,oBAKC,mBAKD,oBAKC,gBAIU,IAnC9CC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,EAAIC,EAAQL,KAAKC,GACtBD,KAAKM,UAAYC,EAAS,kBAsC3BT,eACCE,KAAKQ,iBAGNV,qBACCE,KAAKQ,iBACLR,KAAKS,sBACLT,KAAKU,gCAGNZ,8BACCa,EAAAX,KAAKY,YAAQ,MAAAD,SAAA,OAAA,EAAAA,EAAEE,aAGRf,iBACP,MAAMgB,EAAe,CACpB,kBACA,iBACA,kBACA,oBACA,iBACA,wBACA,gBACA,mBAEDd,KAAKC,EAAEc,cAAcD,EAAc,OAAQd,KAAKgB,MAChDhB,KAAKC,EAAEc,cAAcD,EAAc,UAAWd,KAAKiB,SACnDjB,KAAKC,EAAEc,cAAcD,EAAc,WAAYd,KAAKkB,UACpDlB,KAAKC,EAAEc,cAAcD,EAAc,UAAWd,KAAKmB,SAEnD,GAAInB,KAAKI,EAAEgB,mBAAqB,MAAO,CACtCpB,KAAKC,EAAEc,cAAc,IAAID,EAAc,kBAAmB,aAAcd,KAAKqB,YAAcrB,KAAKM,YAI1FR,gCACP,MAAMwB,EAAatB,KAAKG,KAAKoB,cAAc,IAAMC,EAAiBC,QAClE,IAAKH,EAAY,OACjBtB,KAAKY,SAAW,IAAIc,iBACnB,WACC1B,KAAKS,uBACJkB,KAAK3B,OAGRA,KAAKY,SAASgB,QAAQN,EAAY,CAAEO,UAAW,OAGxC/B,sBACPgC,QAAQC,IAAI/B,KAAKI,EAAE4B,gBAAgBC,KAAKC,GAAuCA,EAAQb,gBAAec,MAAMC,IAC3GpC,KAAKI,EAAEiC,sBAAsBC,SAASC,IACrC,MAAMC,EAAeC,EAAkBF,EAAQG,aAAa,sBAC5DH,EAAQI,gBAAgB,qBACxB,GAAIC,MAAMC,QAAQL,GAAe,CAChCA,EAAaF,SAAQQ,GAAOA,EAAGC,QAAQ,qBAAuB,EAAIX,EAAIY,KAAKF,GAAM,OAElF,GAAIV,EAAIa,OAAQ,CACfV,EAAQW,aAAa,oBAAqBd,EAAIe,KAAK,aAMvDrD,SACC,MAAMsD,EAAMpD,KAAKqD,SAAW,WAAa,MACzC,OACCpD,EAACqD,EAAI,CAACtC,KAAMhB,KAAKgB,KAAMuC,MAAOvD,KAAKC,EAAEuD,QAAQhC,EAAiBiC,OAC7DxD,EAACmD,EAAG,CAACG,MAAO/B,EAAiBkC,QAC3B1D,KAAKC,EAAE0D,QAAQ,QAAU1D,EAAA,OAAA,CAAM2D,KAAK,QACrC3D,EAAA,OAAA,MACCD,KAAKC,EAAE0D,QAAQ,WACf1D,EAAA,MAAA,CAAKsD,MAAO/B,EAAiBC,QAC5BxB,EAAA,OAAA,CAAM2D,KAAK","sourcesContent":["/*\n * Form Control\n */\n\n$class: \".gov-form-control\";\n\n#{$class} {\n\t&__holder {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tpadding: 0;\n\t\tborder: none;\n\t}\n\t&__bottom {\n\t\t@include reset-last-margin();\n\t}\n\n\t// VARIANTS\n\t&[type=\"file\"] {\n\t\t.gov-form-label[slot=\"top\"] .gov-form-label__label {\n\t\t\tmargin: rem-calc(0 0 8);\n\t\t}\n\t\t#{$class} {\n\t\t\t&__bottom {\n\t\t\t\tmargin: rem-calc(8 0 0);\n\t\t\t}\n\t\t}\n\t}\n\t&[type=\"input\"],\n\t&[type=\"select\"] {\n\t\t.gov-form-label .gov-form-label__label {\n\t\t\tmargin: rem-calc(0 0 4);\n\t\t}\n\t\t#{$class} {\n\t\t\t&__bottom {\n\t\t\t\tmargin: rem-calc(4 0 0);\n\t\t\t}\n\t\t}\n\t}\n\t// Checkbox, radio\n\t@each $size, $definitions in $form-checkbox-core-sizes {\n\t\t&[size=\"#{$size}\"][type=\"checkbox\"],\n\t\t&[size=\"#{$size}\"][type=\"radio\"] {\n\t\t\t#{$class} {\n\t\t\t\t$indicator-width: get(\"indicator-size\", $definitions);\n\t\t\t\t&__bottom {\n\t\t\t\t\tmargin-top: get(\"message-gap\", $definitions);\n\t\t\t\t\tmargin-left: calc($indicator-width + get(\"gap\", $definitions));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Switch\n\t@each $size, $definitions in $form-switch-sizes {\n\t\t&[size=\"#{$size}\"][type=\"switch\"] {\n\t\t\t#{$class} {\n\t\t\t\t$indicator-ratio: calc(5 / 3);\n\t\t\t\t$indicator-width: calc(get(\"indicator-height\", $definitions) * $indicator-ratio);\n\t\t\t\t&__bottom {\n\t\t\t\t\tmargin-top: get(\"message-gap\", $definitions);\n\t\t\t\t\tmargin-left: calc($indicator-width + get(\"gap\", $definitions));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// STATES\n\t@include parameter(\"invalid\") {\n\t\t.gov-form-label[slot=\"top\"] .gov-form-label__label {\n\t\t\tcolor: $form-state-color-error;\n\t\t}\n\t}\n\t@include parameter(\"disabled\") {\n\t\t.gov-form-label__label {\n\t\t\tpointer-events: none;\n\t\t}\n\t}\n}\n","import { Component, Element, Host, h, Prop, Watch } from '@stencil/core'\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { GovForm } from '../../../helpers/Dom/form.types'\nimport { govHost } from '../../../helpers/Dom/template'\nimport { govForm } from '../../../helpers/Dom/form'\nimport { createID, splitByWhitespace } from '../../../utils/string.utils'\nimport { FormControlSizesType, FormControlClass } from './constants'\n\n@Component({\n\ttag: 'gov-form-control',\n\tstyleUrl: 'gov-form-control.scss',\n})\nexport class GovFormControl {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate readonly controlId: string\n\tprivate observer: MutationObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.controlId = createID('GovFormControl')\n\t}\n\n\t/**\n\t * Defines the space between nested components.\n\t */\n\t@Prop() readonly gap?: FormControlSizesType\n\t/**\n\t * Form element identifier\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Indicates the entered value of child form element does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean = false\n\t/**\n\t/**\n\t * Indicates the form element is disabled\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean = false\n\t/**\n\t * Use control as a fieldset for better accessibility.\n\t * Note: Don't forget to set the legend attribute of the gov-form-label component\n\t */\n\t@Prop() readonly fieldset: boolean = false\n\t/**\n\t * Form element size.\n\t */\n\t@Prop() readonly size?: FormControlSizesType = 'm'\n\n\t@Element() host: HTMLGovFormControlElement\n\n\t@Watch('invalid')\n\twatchInvalid(): void {\n\t\tthis.passChildAttrs()\n\t}\n\n\tcomponentDidRender() {\n\t\tthis.passChildAttrs()\n\t\tthis.syncControlMessages()\n\t\tthis.formElementDescriptionControl()\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tthis.observer?.disconnect()\n\t}\n\n\tprivate passChildAttrs() {\n\t\tconst formElements = [\n\t\t\t'gov-form-select',\n\t\t\t'gov-form-input',\n\t\t\t'gov-form-switch',\n\t\t\t'gov-form-checkbox',\n\t\t\t'gov-form-radio',\n\t\t\t'gov-form-multi-select',\n\t\t\t'gov-form-file',\n\t\t\t'gov-form-search',\n\t\t]\n\t\tthis.h.passChildAttr(formElements, 'size', this.size)\n\t\tthis.h.passChildAttr(formElements, 'invalid', this.invalid)\n\t\tthis.h.passChildAttr(formElements, 'disabled', this.disabled)\n\t\tthis.h.passChildAttr(formElements, 'success', this.success)\n\n\t\tif (this.f.hasGroupChildren === false) {\n\t\t\tthis.h.passChildAttr([...formElements, 'gov-form-label'], 'identifier', this.identifier || this.controlId)\n\t\t}\n\t}\n\n\tprivate formElementDescriptionControl() {\n\t\tconst bottomSlot = this.host.querySelector('.' + FormControlClass.bottom)\n\t\tif (!bottomSlot) return\n\t\tthis.observer = new MutationObserver(\n\t\t\tfunction () {\n\t\t\t\tthis.syncControlMessages()\n\t\t\t}.bind(this)\n\t\t)\n\n\t\tthis.observer.observe(bottomSlot, { childList: true })\n\t}\n\n\tprivate syncControlMessages() {\n\t\tPromise.all(this.f.messageElements.map((message: HTMLGovFormMessageElement) => message.identifier())).then((ids: string[]) => {\n\t\t\tthis.f.mainElementsInControl.forEach((element: Element) => {\n\t\t\t\tconst currentValue = splitByWhitespace(element.getAttribute('wcag-described-by'))\n\t\t\t\telement.removeAttribute('wcag-described-by')\n\t\t\t\tif (Array.isArray(currentValue)) {\n\t\t\t\t\tcurrentValue.forEach(id => (id.indexOf('GovFormMessage') === -1 ? ids.push(id) : null))\n\t\t\t\t}\n\t\t\t\tif (ids.length) {\n\t\t\t\t\telement.setAttribute('wcag-described-by', ids.join(' '))\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\t}\n\n\trender() {\n\t\tconst Tag = this.fieldset ? 'fieldset' : 'div'\n\t\treturn (\n\t\t\t<Host size={this.size} class={this.h.classes(FormControlClass.root)}>\n\t\t\t\t<Tag class={FormControlClass.holder}>\n\t\t\t\t\t{this.h.hasSlot('top') && <slot name=\"top\"></slot>}\n\t\t\t\t\t<slot></slot>\n\t\t\t\t\t{this.h.hasSlot('bottom') && (\n\t\t\t\t\t\t<div class={FormControlClass.bottom}>\n\t\t\t\t\t\t\t<slot name=\"bottom\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{r as o,h as r,H as e,g as s}from"./p-682c7cc6.js";const a={root:"gov-form-search",input:"gov-form-search__input",button:"gov-form-search__button"};const t=".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-form-search{position:relative;display:flex;width:100%;gap:0.5rem;align-items:center;border:var(--gov-form-input-border-width, 0.0625rem solid var(--gov-color-secondary-700));border-radius:var(--gov-border-radius, 0.1875rem);background-color:var(--gov-form-bg-color, var(--gov-color-neutral-white))}.gov-form-search:focus{outline:none}.gov-form-search:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-form-search:focus-within{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-form-search__input{flex:1 1 auto}.gov-form-search__input input{height:auto}.gov-form-search__button{flex:0 0 auto;margin:0.1875rem 0.1875rem 0.1875rem 0}";const i=class{constructor(r){o(this,r)}render(){return r(e,{class:a.root},r("span",{class:a.input},r("slot",{name:"input"})),r("span",{class:a.button},r("slot",{name:"button"})))}get host(){return s(this)}};i.style=t;export{i as gov_form_search};
2
+ //# sourceMappingURL=p-ec617f18.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/core/src/components/gov-form/search/constants.ts","../../../packages/core/src/components/gov-form/search/gov-form-search.scss?tag=gov-form-search","../../../packages/core/src/components/gov-form/search/gov-form-search.tsx"],"names":["FormSearchClass","root","input","button","govFormSearchCss","GovFormSearch","[object Object]","h","Host","class","name"],"mappings":"yDAAO,MAAMA,EAAkB,CAC9BC,KAAM,kBACNC,MAAO,yBACPC,OAAQ,2BCHT,MAAMC,EAAmB,4gCCOZC,EAAa,+BAGzBC,SACC,OACCC,EAACC,EAAI,CAACC,MAAOT,EAAgBC,MAC5BM,EAAA,OAAA,CAAME,MAAOT,EAAgBE,OAC5BK,EAAA,OAAA,CAAMG,KAAK,WAEZH,EAAA,OAAA,CAAME,MAAOT,EAAgBG,QAC5BI,EAAA,OAAA,CAAMG,KAAK","sourcesContent":["export const FormSearchClass = {\n\troot: 'gov-form-search',\n\tinput: 'gov-form-search__input',\n\tbutton: 'gov-form-search__button',\n}\n","/*\n * Search\n */\n\n$class: \".gov-form-search\";\n\n#{$class} {\n\t@include base(flex);\n\t@include focus-outline($border-radius, 0, true);\n\tgap: rem-calc(8);\n\talign-items: center;\n\tborder: $form-input-border;\n\tborder-radius: $border-radius;\n\tbackground-color: $form-bg-color;\n\t&__input {\n\t\tflex: 1 1 auto;\n\t\tinput {\n\t\t\theight: auto;\n\t\t}\n\t}\n\t&__button {\n\t\tflex: 0 0 auto;\n\t\tmargin: rem-calc(3) rem-calc(3) rem-calc(3) 0;\n\t}\n}\n","import { Component, Element, h, Host } from '@stencil/core'\nimport { FormSearchClass } from './constants'\n\n@Component({\n\ttag: 'gov-form-search',\n\tstyleUrl: 'gov-form-search.scss',\n})\nexport class GovFormSearch {\n\t@Element() host: HTMLGovFormSearchElement\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSearchClass.root}>\n\t\t\t\t<span class={FormSearchClass.input}>\n\t\t\t\t\t<slot name=\"input\" />\n\t\t\t\t</span>\n\t\t\t\t<span class={FormSearchClass.button}>\n\t\t\t\t\t<slot name=\"button\" />\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{S as o}from"./p-55500e5a.js";import{V as t}from"./p-ff7365ae.js";import{p as s}from"./p-03990da5.js";const m=s(o,["_M","_L","_XL"]);const r=s(t,["PRIMARY","SECONDARY"]);const e={root:"gov-form-multi-select",wrap:"gov-form-multi-select__wrap",list:"gov-form-multi-select__list",item:"gov-form-multi-select__item"};export{e as F,r as a,m as b};
2
+ //# sourceMappingURL=p-ef79904e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/core/src/components/gov-form/multiselect/constants.ts"],"names":["FormMultiselectSizes","pick","Sizes","FormMultiselectVariants","Variants","FormMultiSelectClass","root","wrap","list","item"],"mappings":"kHAKaA,EAAuBC,EAAKC,EAAO,CAAC,KAAM,KAAM,cAGhDC,EAA0BF,EAAKG,EAAU,CAAC,UAAW,oBAGrDC,EAAuB,CACnCC,KAAM,wBACNC,KAAM,8BACNC,KAAM,8BACNC,KAAM","sourcesContent":["import { Sizes } from '../../../core/constants/sizes'\nimport { Variants } from '../../../core/constants/variants'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const FormMultiselectSizes = pick(Sizes, ['_M', '_L', '_XL'])\nexport type FormMultiselectSizesType = `${ValueOf<typeof FormMultiselectSizes>}`\n\nexport const FormMultiselectVariants = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type FormMultiselectVariantType = `${ValueOf<typeof FormMultiselectVariants>}`\n\nexport const FormMultiSelectClass = {\n\troot: 'gov-form-multi-select',\n\twrap: 'gov-form-multi-select__wrap',\n\tlist: 'gov-form-multi-select__list',\n\titem: 'gov-form-multi-select__item',\n}\n"]}