@gov-design-system-ce/components 4.1.3-BETA-9 → 4.2.0

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 (686) hide show
  1. package/dist/cjs/{constants-02aec493.js → constants-7f713d6c.js} +2 -2
  2. package/dist/cjs/{constants-02aec493.js.map → constants-7f713d6c.js.map} +1 -1
  3. package/dist/cjs/{constants-4dfa23e3.js → constants-c7447ffd.js} +3 -1
  4. package/dist/cjs/constants-c7447ffd.js.map +1 -0
  5. package/dist/cjs/{constants-52053f2d.js → constants-c84c60d6.js} +3 -1
  6. package/dist/cjs/constants-c84c60d6.js.map +1 -0
  7. package/dist/cjs/core.cjs.js +2 -2
  8. package/dist/cjs/gov-accordion-item.cjs.entry.js +1 -1
  9. package/dist/cjs/gov-accordion.cjs.entry.js +1 -1
  10. package/dist/cjs/gov-attachments_3.cjs.entry.js +3 -3
  11. package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
  12. package/dist/cjs/gov-backdrop.cjs.entry.js +1 -1
  13. package/dist/cjs/gov-banner.cjs.entry.js +79 -0
  14. package/dist/cjs/gov-banner.cjs.entry.js.map +1 -0
  15. package/dist/cjs/gov-blockquote.cjs.entry.js +33 -0
  16. package/dist/cjs/gov-blockquote.cjs.entry.js.map +1 -0
  17. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +2 -2
  18. package/dist/cjs/gov-button.cjs.entry.js +6 -5
  19. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  20. package/dist/cjs/gov-card.cjs.entry.js +2 -2
  21. package/dist/cjs/gov-chip.cjs.entry.js +5 -4
  22. package/dist/cjs/gov-chip.cjs.entry.js.map +1 -1
  23. package/dist/cjs/gov-container.cjs.entry.js +2 -2
  24. package/dist/cjs/gov-control-group.cjs.entry.js +2 -2
  25. package/dist/cjs/gov-cookiebar.cjs.entry.js +2 -2
  26. package/dist/cjs/gov-dialog.cjs.entry.js +2 -2
  27. package/dist/cjs/gov-dialog.cjs.entry.js.map +1 -1
  28. package/dist/cjs/gov-dropdown.cjs.entry.js +2 -2
  29. package/dist/cjs/gov-empty.cjs.entry.js +2 -2
  30. package/dist/cjs/gov-error-code.cjs.entry.js +2 -2
  31. package/dist/cjs/gov-flex_3.cjs.entry.js +7 -26
  32. package/dist/cjs/gov-flex_3.cjs.entry.js.map +1 -1
  33. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +4 -3
  34. package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
  35. package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +4 -4
  36. package/dist/cjs/gov-form-checkbox-group.cjs.entry.js.map +1 -1
  37. package/dist/cjs/gov-form-checkbox.cjs.entry.js +3 -2
  38. package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
  39. package/dist/cjs/gov-form-control.cjs.entry.js +2 -2
  40. package/dist/cjs/gov-form-file.cjs.entry.js +4 -3
  41. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  42. package/dist/cjs/gov-form-group.cjs.entry.js +3 -3
  43. package/dist/cjs/gov-form-input_2.cjs.entry.js +11 -9
  44. package/dist/cjs/gov-form-input_2.cjs.entry.js.map +1 -1
  45. package/dist/cjs/gov-form-label.cjs.entry.js +2 -2
  46. package/dist/cjs/gov-form-multi-select.cjs.entry.js +5 -4
  47. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  48. package/dist/cjs/gov-form-password-power.cjs.entry.js +2 -2
  49. package/dist/cjs/gov-form-radio-group.cjs.entry.js +4 -4
  50. package/dist/cjs/gov-form-radio-group.cjs.entry.js.map +1 -1
  51. package/dist/cjs/gov-form-radio.cjs.entry.js +3 -2
  52. package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
  53. package/dist/cjs/gov-form-search.cjs.entry.js +2 -2
  54. package/dist/cjs/gov-form-select.cjs.entry.js +5 -4
  55. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  56. package/dist/cjs/gov-form-switch.cjs.entry.js +3 -2
  57. package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
  58. package/dist/cjs/gov-grid-item.cjs.entry.js +14 -8
  59. package/dist/cjs/gov-grid-item.cjs.entry.js.map +1 -1
  60. package/dist/cjs/gov-grid.cjs.entry.js +8 -6
  61. package/dist/cjs/gov-grid.cjs.entry.js.map +1 -1
  62. package/dist/cjs/gov-infobar.cjs.entry.js +5 -4
  63. package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -1
  64. package/dist/cjs/gov-layout-column.cjs.entry.js +2 -2
  65. package/dist/cjs/gov-layout.cjs.entry.js +2 -2
  66. package/dist/cjs/gov-lifecycle.cjs.entry.js +2 -2
  67. package/dist/cjs/gov-link.cjs.entry.js +3 -2
  68. package/dist/cjs/gov-link.cjs.entry.js.map +1 -1
  69. package/dist/cjs/gov-loading.cjs.entry.js +2 -2
  70. package/dist/cjs/gov-message.cjs.entry.js +2 -2
  71. package/dist/cjs/gov-message.cjs.entry.js.map +1 -1
  72. package/dist/cjs/gov-pagination.cjs.entry.js +3 -2
  73. package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
  74. package/dist/cjs/gov-spacer.cjs.entry.js +2 -2
  75. package/dist/cjs/gov-stepper-item.cjs.entry.js +3 -3
  76. package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
  77. package/dist/cjs/gov-stepper.cjs.entry.js +3 -3
  78. package/dist/cjs/gov-tabs-item.cjs.entry.js +2 -2
  79. package/dist/cjs/gov-tabs.cjs.entry.js +4 -3
  80. package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
  81. package/dist/cjs/gov-tag.cjs.entry.js +2 -2
  82. package/dist/cjs/gov-tile.cjs.entry.js +2 -2
  83. package/dist/cjs/gov-toast.cjs.entry.js +4 -3
  84. package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
  85. package/dist/cjs/gov-tooltip-content.cjs.entry.js +2 -2
  86. package/dist/cjs/gov-tooltip.cjs.entry.js +3 -3
  87. package/dist/cjs/gov-wizard-item.cjs.entry.js +3 -3
  88. package/dist/cjs/gov-wizard.cjs.entry.js +2 -2
  89. package/dist/cjs/{index-67e87c27.js → index-0e4f24f9.js} +9 -19
  90. package/dist/cjs/index-0e4f24f9.js.map +1 -0
  91. package/dist/cjs/loader.cjs.js +2 -2
  92. package/dist/collection/collection-manifest.json +2 -1
  93. package/dist/collection/components/gov-attachments/gov-attachments-item.css +3 -4
  94. package/dist/collection/components/gov-banner/constants.js +26 -0
  95. package/dist/collection/components/gov-banner/constants.js.map +1 -0
  96. package/dist/collection/components/gov-banner/gov-banner.js +202 -0
  97. package/dist/collection/components/gov-banner/gov-banner.js.map +1 -0
  98. package/dist/collection/components/gov-blocquote/constants.js +10 -0
  99. package/dist/collection/components/gov-blocquote/constants.js.map +1 -0
  100. package/dist/collection/components/gov-blocquote/gov-blockquote.js +61 -0
  101. package/dist/collection/components/gov-blocquote/gov-blockquote.js.map +1 -0
  102. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +1 -1
  103. package/dist/collection/components/gov-button/button/gov-button.js +5 -4
  104. package/dist/collection/components/gov-button/button/gov-button.js.map +1 -1
  105. package/dist/collection/components/gov-button/dropdown/gov-dropdown.js +1 -1
  106. package/dist/collection/components/gov-card/gov-card.js +1 -1
  107. package/dist/collection/components/gov-chip/gov-chip.js +4 -3
  108. package/dist/collection/components/gov-chip/gov-chip.js.map +1 -1
  109. package/dist/collection/components/gov-container/gov-container.js +1 -1
  110. package/dist/collection/components/gov-control-group/gov-control-group.js +1 -1
  111. package/dist/collection/components/gov-cookiebar/gov-cookiebar.js +1 -1
  112. package/dist/collection/components/gov-dialog/gov-dialog.js +1 -1
  113. package/dist/collection/components/gov-dialog/gov-dialog.js.map +1 -1
  114. package/dist/collection/components/gov-empty/gov-empty.js +1 -1
  115. package/dist/collection/components/gov-error-code/gov-error-code.js +1 -1
  116. package/dist/collection/components/gov-flex/gov-flex.js +22 -3
  117. package/dist/collection/components/gov-flex/gov-flex.js.map +1 -1
  118. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +3 -2
  119. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
  120. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +2 -1
  121. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
  122. package/dist/collection/components/gov-form/control/gov-form-control.js +1 -1
  123. package/dist/collection/components/gov-form/file/gov-form-file.js +3 -2
  124. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  125. package/dist/collection/components/gov-form/group/constants.js +1 -1
  126. package/dist/collection/components/gov-form/group/constants.js.map +1 -1
  127. package/dist/collection/components/gov-form/group/gov-form-checkbox-group.js +2 -2
  128. package/dist/collection/components/gov-form/group/gov-form-group.css +4 -4
  129. package/dist/collection/components/gov-form/group/gov-form-group.js +2 -2
  130. package/dist/collection/components/gov-form/group/gov-form-radio-group.js +2 -2
  131. package/dist/collection/components/gov-form/input/gov-form-input.js +7 -6
  132. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  133. package/dist/collection/components/gov-form/label/gov-form-label.js +1 -1
  134. package/dist/collection/components/gov-form/message/gov-form-message.js +1 -1
  135. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +4 -3
  136. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
  137. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +1 -1
  138. package/dist/collection/components/gov-form/radio/gov-form-radio.js +2 -1
  139. package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
  140. package/dist/collection/components/gov-form/search/gov-form-search.js +1 -1
  141. package/dist/collection/components/gov-form/select/gov-form-select.js +4 -3
  142. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  143. package/dist/collection/components/gov-form/switch/gov-form-switch.js +2 -1
  144. package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
  145. package/dist/collection/components/gov-grid/constants.js +2 -0
  146. package/dist/collection/components/gov-grid/constants.js.map +1 -1
  147. package/dist/collection/components/gov-grid/gov-grid-item.js +111 -20
  148. package/dist/collection/components/gov-grid/gov-grid-item.js.map +1 -1
  149. package/dist/collection/components/gov-grid/gov-grid.js +56 -14
  150. package/dist/collection/components/gov-grid/gov-grid.js.map +1 -1
  151. package/dist/collection/components/gov-icon/gov-icon.js +0 -17
  152. package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
  153. package/dist/collection/components/gov-infobar/gov-infobar.js +4 -3
  154. package/dist/collection/components/gov-infobar/gov-infobar.js.map +1 -1
  155. package/dist/collection/components/gov-layout/gov-layout-column.js +1 -1
  156. package/dist/collection/components/gov-layout/gov-layout.js +1 -1
  157. package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js +1 -1
  158. package/dist/collection/components/gov-link/constants.js +1 -0
  159. package/dist/collection/components/gov-link/constants.js.map +1 -1
  160. package/dist/collection/components/gov-link/gov-link.js +1 -1
  161. package/dist/collection/components/gov-link/gov-link.js.map +1 -1
  162. package/dist/collection/components/gov-loading/loading/gov-loading.js +1 -1
  163. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +3 -2
  164. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js.map +1 -1
  165. package/dist/collection/components/gov-message/gov-message.js +1 -1
  166. package/dist/collection/components/gov-message/gov-message.js.map +1 -1
  167. package/dist/collection/components/gov-pagination/gov-pagination.js +2 -1
  168. package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
  169. package/dist/collection/components/gov-spacer/gov-spacer.js +1 -1
  170. package/dist/collection/components/gov-stepper/constants.js +2 -0
  171. package/dist/collection/components/gov-stepper/constants.js.map +1 -1
  172. package/dist/collection/components/gov-stepper/gov-stepper-item.js +1 -1
  173. package/dist/collection/components/gov-stepper/gov-stepper-item.js.map +1 -1
  174. package/dist/collection/components/gov-stepper/gov-stepper.js +1 -1
  175. package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
  176. package/dist/collection/components/gov-tabs/gov-tabs.js +3 -2
  177. package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
  178. package/dist/collection/components/gov-tag/gov-tag.js +1 -1
  179. package/dist/collection/components/gov-theme-switch/constants.js +1 -0
  180. package/dist/collection/components/gov-theme-switch/constants.js.map +1 -1
  181. package/dist/collection/components/gov-theme-switch/gov-theme-switch.js +1 -1
  182. package/dist/collection/components/gov-theme-switch/gov-theme-switch.js.map +1 -1
  183. package/dist/collection/components/gov-tile/gov-tile.js +1 -1
  184. package/dist/collection/components/gov-toast/gov-toast.js +3 -2
  185. package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
  186. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +1 -1
  187. package/dist/collection/components/gov-tooltip/gov-tooltip.js +2 -2
  188. package/dist/collection/components/gov-wizard/gov-wizard-item.js +2 -2
  189. package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
  190. package/dist/collection/pages/Banner.js +268 -0
  191. package/dist/collection/pages/Banner.js.map +1 -0
  192. package/dist/collection/pages/Blockquote.js +25 -0
  193. package/dist/collection/pages/Blockquote.js.map +1 -0
  194. package/dist/collection/pages/Breadcrumbs.js +2 -2
  195. package/dist/collection/pages/Breadcrumbs.js.map +1 -1
  196. package/dist/collection/pages/Card.js +2 -2
  197. package/dist/collection/pages/Card.js.map +1 -1
  198. package/dist/collection/pages/Flex.js +1 -1
  199. package/dist/collection/pages/Flex.js.map +1 -1
  200. package/dist/collection/pages/Grid.js +61 -40
  201. package/dist/collection/pages/Grid.js.map +1 -1
  202. package/dist/collection/pages/Home.js +57 -0
  203. package/dist/collection/pages/Home.js.map +1 -1
  204. package/dist/collection/pages/Infobar.js +36 -56
  205. package/dist/collection/pages/Infobar.js.map +1 -1
  206. package/dist/collection/pages/Layout.js +10 -10
  207. package/dist/collection/pages/Layout.js.map +1 -1
  208. package/dist/collection/pages/Tag.js +14 -0
  209. package/dist/collection/pages/Tag.js.map +1 -1
  210. package/dist/collection/pages/Tiles.js +8 -235
  211. package/dist/collection/pages/Tiles.js.map +1 -1
  212. package/dist/collection/pages/Typography.js +110 -51
  213. package/dist/collection/pages/Typography.js.map +1 -1
  214. package/dist/collection/utils/icon.utils.js +1 -8
  215. package/dist/collection/utils/icon.utils.js.map +1 -1
  216. package/dist/components/gov-accordion-item.js +1 -1
  217. package/dist/components/gov-accordion.js +1 -1
  218. package/dist/components/gov-attachments-item.js +1 -1
  219. package/dist/components/gov-attachments.js +1 -1
  220. package/dist/components/gov-backdrop.js +1 -1
  221. package/dist/components/{gov-tiles.d.ts → gov-banner.d.ts} +4 -4
  222. package/dist/components/gov-banner.js +2 -0
  223. package/dist/components/gov-banner.js.map +1 -0
  224. package/dist/components/gov-blockquote.d.ts +11 -0
  225. package/dist/components/gov-blockquote.js +2 -0
  226. package/dist/components/gov-blockquote.js.map +1 -0
  227. package/dist/components/gov-breadcrumbs.js +1 -1
  228. package/dist/components/gov-breadcrumbs.js.map +1 -1
  229. package/dist/components/gov-button.js +1 -1
  230. package/dist/components/gov-card.js +1 -1
  231. package/dist/components/gov-chip.js +1 -1
  232. package/dist/components/gov-container.js +1 -1
  233. package/dist/components/gov-control-group.js +1 -1
  234. package/dist/components/gov-cookiebar.js +1 -1
  235. package/dist/components/gov-dialog.js +1 -1
  236. package/dist/components/gov-dialog.js.map +1 -1
  237. package/dist/components/gov-dropdown.js +1 -1
  238. package/dist/components/gov-dropdown.js.map +1 -1
  239. package/dist/components/gov-empty.js +1 -1
  240. package/dist/components/gov-error-code.js +1 -1
  241. package/dist/components/gov-flex.js +1 -1
  242. package/dist/components/gov-flex.js.map +1 -1
  243. package/dist/components/gov-form-autocomplete.js +1 -1
  244. package/dist/components/gov-form-checkbox-group.js +1 -1
  245. package/dist/components/gov-form-checkbox-group.js.map +1 -1
  246. package/dist/components/gov-form-checkbox.js +1 -1
  247. package/dist/components/gov-form-checkbox.js.map +1 -1
  248. package/dist/components/gov-form-control.js +1 -1
  249. package/dist/components/gov-form-file.js +1 -1
  250. package/dist/components/gov-form-file.js.map +1 -1
  251. package/dist/components/gov-form-group.js +1 -1
  252. package/dist/components/gov-form-input.js +1 -1
  253. package/dist/components/gov-form-label.js +1 -1
  254. package/dist/components/gov-form-message.js +1 -1
  255. package/dist/components/gov-form-multi-select.js +1 -1
  256. package/dist/components/gov-form-multi-select.js.map +1 -1
  257. package/dist/components/gov-form-password-power.js +1 -1
  258. package/dist/components/gov-form-radio-group.js +1 -1
  259. package/dist/components/gov-form-radio-group.js.map +1 -1
  260. package/dist/components/gov-form-radio.js +1 -1
  261. package/dist/components/gov-form-radio.js.map +1 -1
  262. package/dist/components/gov-form-search.js +1 -1
  263. package/dist/components/gov-form-select.js +1 -1
  264. package/dist/components/gov-form-switch.js +1 -1
  265. package/dist/components/gov-form-switch.js.map +1 -1
  266. package/dist/components/gov-grid-item.js +1 -1
  267. package/dist/components/gov-grid-item.js.map +1 -1
  268. package/dist/components/gov-grid.js +1 -1
  269. package/dist/components/gov-grid.js.map +1 -1
  270. package/dist/components/gov-icon.js +1 -1
  271. package/dist/components/gov-infobar.js +1 -1
  272. package/dist/components/gov-infobar.js.map +1 -1
  273. package/dist/components/gov-layout-column.js +1 -1
  274. package/dist/components/gov-layout.js +1 -1
  275. package/dist/components/gov-lifecycle.js +1 -1
  276. package/dist/components/gov-link.js +1 -1
  277. package/dist/components/gov-link.js.map +1 -1
  278. package/dist/components/gov-loading.js +1 -1
  279. package/dist/components/gov-loading.js.map +1 -1
  280. package/dist/components/gov-message.js +1 -1
  281. package/dist/components/gov-message.js.map +1 -1
  282. package/dist/components/gov-pagination.js +1 -1
  283. package/dist/components/gov-pagination.js.map +1 -1
  284. package/dist/components/gov-skeleton.js +1 -1
  285. package/dist/components/gov-spacer.js +1 -1
  286. package/dist/components/gov-stepper-item.js +1 -1
  287. package/dist/components/gov-stepper-item.js.map +1 -1
  288. package/dist/components/gov-stepper.js +1 -1
  289. package/dist/components/gov-tabs-item.js +1 -1
  290. package/dist/components/gov-tabs.js +1 -1
  291. package/dist/components/gov-tabs.js.map +1 -1
  292. package/dist/components/gov-tag.js +1 -1
  293. package/dist/components/gov-theme-switch.js +1 -1
  294. package/dist/components/gov-theme-switch.js.map +1 -1
  295. package/dist/components/gov-tile.js +1 -1
  296. package/dist/components/gov-toast.js +1 -1
  297. package/dist/components/gov-toast.js.map +1 -1
  298. package/dist/components/gov-tooltip-content.js +1 -1
  299. package/dist/components/gov-tooltip.js +1 -1
  300. package/dist/components/gov-tooltip.js.map +1 -1
  301. package/dist/components/gov-wizard-item.js +1 -1
  302. package/dist/components/gov-wizard.js +1 -1
  303. package/dist/components/index.js +1 -1
  304. package/dist/components/p-0327a469.js +2 -0
  305. package/dist/components/p-0327a469.js.map +1 -0
  306. package/dist/components/p-2ca5423c.js +2 -0
  307. package/dist/components/p-2ca5423c.js.map +1 -0
  308. package/dist/components/p-2fc08a71.js +2 -0
  309. package/dist/components/p-2fc08a71.js.map +1 -0
  310. package/dist/components/p-3c90521b.js +2 -0
  311. package/dist/components/p-3c90521b.js.map +1 -0
  312. package/dist/components/p-3fead64a.js +2 -0
  313. package/dist/components/p-3fead64a.js.map +1 -0
  314. package/dist/components/p-42200001.js +3 -0
  315. package/dist/components/p-42200001.js.map +1 -0
  316. package/dist/components/p-4fba9df0.js +2 -0
  317. package/dist/components/p-4fba9df0.js.map +1 -0
  318. package/dist/components/p-69a31c96.js +2 -0
  319. package/dist/components/p-69a31c96.js.map +1 -0
  320. package/dist/components/{p-03ad4e0f.js → p-73938936.js} +2 -2
  321. package/dist/components/{p-384c7f2a.js → p-7be2301a.js} +2 -2
  322. package/dist/components/p-b533871a.js +2 -0
  323. package/dist/components/p-b533871a.js.map +1 -0
  324. package/dist/components/p-b5dc6bae.js +2 -0
  325. package/dist/components/p-b5dc6bae.js.map +1 -0
  326. package/dist/components/p-ea128b8b.js +2 -0
  327. package/dist/components/p-ea128b8b.js.map +1 -0
  328. package/dist/components/p-f9a1ff6e.js +2 -0
  329. package/dist/components/{p-e44a0fee.js → p-fc2afe61.js} +2 -2
  330. package/dist/components/{p-e44a0fee.js.map → p-fc2afe61.js.map} +1 -1
  331. package/dist/core/core.css +2711 -1506
  332. package/dist/core/core.esm.js +1 -1
  333. package/dist/core/core.esm.js.map +1 -1
  334. package/dist/core/p-005214d1.entry.js +2 -0
  335. package/dist/core/p-0ef1f684.entry.js +2 -0
  336. package/dist/core/p-0ef1f684.entry.js.map +1 -0
  337. package/dist/core/p-0fc9ea97.entry.js +2 -0
  338. package/dist/core/p-0fc9ea97.entry.js.map +1 -0
  339. package/dist/core/p-132c9a87.entry.js +2 -0
  340. package/dist/core/p-132c9a87.entry.js.map +1 -0
  341. package/dist/core/p-16d3a79a.entry.js +2 -0
  342. package/dist/core/{p-967a1094.entry.js.map → p-16d3a79a.entry.js.map} +1 -1
  343. package/dist/core/p-16f44a0b.entry.js +2 -0
  344. package/dist/core/p-16f44a0b.entry.js.map +1 -0
  345. package/dist/core/p-1c7c9144.entry.js +2 -0
  346. package/dist/core/p-1cf1dd10.entry.js +2 -0
  347. package/dist/core/{p-f7f60f91.entry.js.map → p-1cf1dd10.entry.js.map} +1 -1
  348. package/dist/core/p-23b4dcd3.entry.js +2 -0
  349. package/dist/core/{p-45b759f4.entry.js.map → p-23b4dcd3.entry.js.map} +1 -1
  350. package/dist/core/p-2536a8ff.entry.js +2 -0
  351. package/dist/core/p-2536a8ff.entry.js.map +1 -0
  352. package/dist/core/p-28d1bc01.entry.js +2 -0
  353. package/dist/core/p-28d1bc01.entry.js.map +1 -0
  354. package/dist/core/p-2ca5423c.js +2 -0
  355. package/dist/core/p-2ca5423c.js.map +1 -0
  356. package/dist/core/p-3acaa012.entry.js +2 -0
  357. package/dist/core/{p-1aa7450e.entry.js.map → p-3acaa012.entry.js.map} +1 -1
  358. package/dist/core/p-3d7fb8f8.entry.js +2 -0
  359. package/dist/core/p-3d7fb8f8.entry.js.map +1 -0
  360. package/dist/core/{p-927c31dd.entry.js → p-46ecf09e.entry.js} +2 -2
  361. package/dist/core/p-49cd4d0d.entry.js +2 -0
  362. package/dist/core/{p-ee55932a.entry.js.map → p-49cd4d0d.entry.js.map} +1 -1
  363. package/dist/core/p-5108eb37.entry.js +2 -0
  364. package/dist/core/{p-237a5b91.entry.js.map → p-5108eb37.entry.js.map} +1 -1
  365. package/dist/core/{p-0f0f7302.entry.js → p-52042c7e.entry.js} +2 -2
  366. package/dist/core/p-52103c05.entry.js +2 -0
  367. package/dist/core/p-52103c05.entry.js.map +1 -0
  368. package/dist/core/{p-c0800e6d.entry.js → p-5242b51b.entry.js} +2 -2
  369. package/dist/core/p-564555e6.entry.js +2 -0
  370. package/dist/core/p-59fe6cbc.entry.js +2 -0
  371. package/dist/core/p-59fe6cbc.entry.js.map +1 -0
  372. package/dist/core/p-650fe9e8.entry.js +2 -0
  373. package/dist/core/{p-ed02945f.entry.js.map → p-650fe9e8.entry.js.map} +1 -1
  374. package/dist/core/p-6e41cf69.entry.js +2 -0
  375. package/dist/core/{p-77daba72.entry.js → p-6f1ea21d.entry.js} +2 -2
  376. package/dist/core/p-7399ad59.entry.js +2 -0
  377. package/dist/core/p-7399ad59.entry.js.map +1 -0
  378. package/dist/core/{p-7dfb7e36.entry.js → p-79ec86da.entry.js} +2 -2
  379. package/dist/core/p-80bebb7f.entry.js +2 -0
  380. package/dist/core/p-80bebb7f.entry.js.map +1 -0
  381. package/dist/core/p-8cbe8add.entry.js +2 -0
  382. package/dist/core/p-8f73f8e0.entry.js +2 -0
  383. package/dist/core/p-94119ad4.entry.js +2 -0
  384. package/dist/core/p-94119ad4.entry.js.map +1 -0
  385. package/dist/core/p-952ab9e5.entry.js +2 -0
  386. package/dist/core/{p-14d66f26.entry.js.map → p-952ab9e5.entry.js.map} +1 -1
  387. package/dist/core/{p-7baee44f.entry.js → p-99f192c1.entry.js} +2 -2
  388. package/dist/core/p-9ae280b2.entry.js +2 -0
  389. package/dist/core/p-9ae280b2.entry.js.map +1 -0
  390. package/dist/core/p-9c1601b3.entry.js +2 -0
  391. package/dist/core/p-9c1601b3.entry.js.map +1 -0
  392. package/dist/core/p-9dea2efa.js +3 -0
  393. package/dist/core/p-9dea2efa.js.map +1 -0
  394. package/dist/core/p-a02f2547.entry.js +2 -0
  395. package/dist/core/p-ab11081d.entry.js +2 -0
  396. package/dist/core/p-ab11081d.entry.js.map +1 -0
  397. package/dist/core/p-ab868410.entry.js +2 -0
  398. package/dist/core/{p-f2bb8c29.entry.js.map → p-ab868410.entry.js.map} +1 -1
  399. package/dist/core/{p-a6a9de9a.entry.js → p-ae88fe6b.entry.js} +2 -2
  400. package/dist/core/p-c07f6bb4.entry.js +2 -0
  401. package/dist/core/p-c07f6bb4.entry.js.map +1 -0
  402. package/dist/core/{p-063b70a2.entry.js → p-c2abc031.entry.js} +2 -2
  403. package/dist/core/p-c688349d.entry.js +2 -0
  404. package/dist/core/p-c6fdc0a9.entry.js +2 -0
  405. package/dist/core/p-c6fdc0a9.entry.js.map +1 -0
  406. package/dist/core/p-c91512dd.entry.js +2 -0
  407. package/dist/core/p-cf9d5c2f.entry.js +2 -0
  408. package/dist/core/p-cf9d5c2f.entry.js.map +1 -0
  409. package/dist/core/p-d1270d72.entry.js +2 -0
  410. package/dist/core/{p-8cc5ad01.entry.js.map → p-d1270d72.entry.js.map} +1 -1
  411. package/dist/core/p-d141e9ca.entry.js +2 -0
  412. package/dist/core/p-d141e9ca.entry.js.map +1 -0
  413. package/dist/core/p-de852480.entry.js +2 -0
  414. package/dist/core/p-e89471ef.entry.js +2 -0
  415. package/dist/core/p-ea128b8b.js +2 -0
  416. package/dist/core/p-ea128b8b.js.map +1 -0
  417. package/dist/core/p-eb8a9705.entry.js +2 -0
  418. package/dist/core/p-eb8a9705.entry.js.map +1 -0
  419. package/dist/core/p-ee950038.entry.js +2 -0
  420. package/dist/core/p-ee950038.entry.js.map +1 -0
  421. package/dist/core/p-f0e001c7.entry.js +2 -0
  422. package/dist/core/{p-269071f5.entry.js.map → p-f0e001c7.entry.js.map} +1 -1
  423. package/dist/core/{p-3849ca02.entry.js → p-f120ba66.entry.js} +2 -2
  424. package/dist/core/p-f120ba66.entry.js.map +1 -0
  425. package/dist/core/p-f333c673.entry.js +2 -0
  426. package/dist/core/p-f7e47c0a.entry.js +2 -0
  427. package/dist/core/p-f7e47c0a.entry.js.map +1 -0
  428. package/dist/core/p-f98f19f6.entry.js +2 -0
  429. package/dist/core/{p-906865d0.entry.js.map → p-f98f19f6.entry.js.map} +1 -1
  430. package/dist/core/{p-e44a0fee.js → p-fc2afe61.js} +2 -2
  431. package/dist/core/{p-e44a0fee.js.map → p-fc2afe61.js.map} +1 -1
  432. package/dist/esm/{constants-4da2b3c0.js → constants-1548499a.js} +2 -2
  433. package/dist/esm/{constants-4da2b3c0.js.map → constants-1548499a.js.map} +1 -1
  434. package/dist/esm/{constants-372455eb.js → constants-7b1ce2ec.js} +3 -1
  435. package/dist/esm/constants-7b1ce2ec.js.map +1 -0
  436. package/dist/esm/{constants-2d5a0e18.js → constants-dc2115cb.js} +3 -1
  437. package/dist/esm/constants-dc2115cb.js.map +1 -0
  438. package/dist/esm/core.js +3 -3
  439. package/dist/esm/gov-accordion-item.entry.js +1 -1
  440. package/dist/esm/gov-accordion.entry.js +1 -1
  441. package/dist/esm/gov-attachments_3.entry.js +3 -3
  442. package/dist/esm/gov-attachments_3.entry.js.map +1 -1
  443. package/dist/esm/gov-backdrop.entry.js +1 -1
  444. package/dist/esm/gov-banner.entry.js +75 -0
  445. package/dist/esm/gov-banner.entry.js.map +1 -0
  446. package/dist/esm/gov-blockquote.entry.js +29 -0
  447. package/dist/esm/gov-blockquote.entry.js.map +1 -0
  448. package/dist/esm/gov-breadcrumbs.entry.js +2 -2
  449. package/dist/esm/gov-button.entry.js +6 -5
  450. package/dist/esm/gov-button.entry.js.map +1 -1
  451. package/dist/esm/gov-card.entry.js +2 -2
  452. package/dist/esm/gov-chip.entry.js +5 -4
  453. package/dist/esm/gov-chip.entry.js.map +1 -1
  454. package/dist/esm/gov-container.entry.js +2 -2
  455. package/dist/esm/gov-control-group.entry.js +2 -2
  456. package/dist/esm/gov-cookiebar.entry.js +2 -2
  457. package/dist/esm/gov-dialog.entry.js +2 -2
  458. package/dist/esm/gov-dialog.entry.js.map +1 -1
  459. package/dist/esm/gov-dropdown.entry.js +2 -2
  460. package/dist/esm/gov-empty.entry.js +2 -2
  461. package/dist/esm/gov-error-code.entry.js +2 -2
  462. package/dist/esm/gov-flex_3.entry.js +7 -26
  463. package/dist/esm/gov-flex_3.entry.js.map +1 -1
  464. package/dist/esm/gov-form-autocomplete.entry.js +4 -3
  465. package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
  466. package/dist/esm/gov-form-checkbox-group.entry.js +4 -4
  467. package/dist/esm/gov-form-checkbox-group.entry.js.map +1 -1
  468. package/dist/esm/gov-form-checkbox.entry.js +3 -2
  469. package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
  470. package/dist/esm/gov-form-control.entry.js +2 -2
  471. package/dist/esm/gov-form-file.entry.js +4 -3
  472. package/dist/esm/gov-form-file.entry.js.map +1 -1
  473. package/dist/esm/gov-form-group.entry.js +3 -3
  474. package/dist/esm/gov-form-input_2.entry.js +11 -9
  475. package/dist/esm/gov-form-input_2.entry.js.map +1 -1
  476. package/dist/esm/gov-form-label.entry.js +2 -2
  477. package/dist/esm/gov-form-multi-select.entry.js +5 -4
  478. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  479. package/dist/esm/gov-form-password-power.entry.js +2 -2
  480. package/dist/esm/gov-form-radio-group.entry.js +4 -4
  481. package/dist/esm/gov-form-radio-group.entry.js.map +1 -1
  482. package/dist/esm/gov-form-radio.entry.js +3 -2
  483. package/dist/esm/gov-form-radio.entry.js.map +1 -1
  484. package/dist/esm/gov-form-search.entry.js +2 -2
  485. package/dist/esm/gov-form-select.entry.js +5 -4
  486. package/dist/esm/gov-form-select.entry.js.map +1 -1
  487. package/dist/esm/gov-form-switch.entry.js +3 -2
  488. package/dist/esm/gov-form-switch.entry.js.map +1 -1
  489. package/dist/esm/gov-grid-item.entry.js +14 -8
  490. package/dist/esm/gov-grid-item.entry.js.map +1 -1
  491. package/dist/esm/gov-grid.entry.js +8 -6
  492. package/dist/esm/gov-grid.entry.js.map +1 -1
  493. package/dist/esm/gov-infobar.entry.js +5 -4
  494. package/dist/esm/gov-infobar.entry.js.map +1 -1
  495. package/dist/esm/gov-layout-column.entry.js +2 -2
  496. package/dist/esm/gov-layout.entry.js +2 -2
  497. package/dist/esm/gov-lifecycle.entry.js +2 -2
  498. package/dist/esm/gov-link.entry.js +3 -2
  499. package/dist/esm/gov-link.entry.js.map +1 -1
  500. package/dist/esm/gov-loading.entry.js +2 -2
  501. package/dist/esm/gov-message.entry.js +2 -2
  502. package/dist/esm/gov-message.entry.js.map +1 -1
  503. package/dist/esm/gov-pagination.entry.js +3 -2
  504. package/dist/esm/gov-pagination.entry.js.map +1 -1
  505. package/dist/esm/gov-spacer.entry.js +2 -2
  506. package/dist/esm/gov-stepper-item.entry.js +3 -3
  507. package/dist/esm/gov-stepper-item.entry.js.map +1 -1
  508. package/dist/esm/gov-stepper.entry.js +3 -3
  509. package/dist/esm/gov-tabs-item.entry.js +2 -2
  510. package/dist/esm/gov-tabs.entry.js +4 -3
  511. package/dist/esm/gov-tabs.entry.js.map +1 -1
  512. package/dist/esm/gov-tag.entry.js +2 -2
  513. package/dist/esm/gov-tile.entry.js +2 -2
  514. package/dist/esm/gov-toast.entry.js +4 -3
  515. package/dist/esm/gov-toast.entry.js.map +1 -1
  516. package/dist/esm/gov-tooltip-content.entry.js +2 -2
  517. package/dist/esm/gov-tooltip.entry.js +3 -3
  518. package/dist/esm/gov-wizard-item.entry.js +3 -3
  519. package/dist/esm/gov-wizard.entry.js +2 -2
  520. package/dist/esm/{index-087b155c.js → index-bf8a6f64.js} +10 -18
  521. package/dist/esm/index-bf8a6f64.js.map +1 -0
  522. package/dist/esm/loader.js +3 -3
  523. package/dist/hydrate/index.js +247 -161
  524. package/dist/hydrate/index.mjs +247 -161
  525. package/dist/stencil.config.js +2 -1
  526. package/dist/stencil.config.js.map +1 -1
  527. package/dist/types/components/gov-banner/constants.d.ts +26 -0
  528. package/dist/types/components/gov-banner/gov-banner.d.ts +38 -0
  529. package/dist/types/components/gov-blocquote/constants.d.ts +10 -0
  530. package/dist/types/components/gov-blocquote/gov-blockquote.d.ts +15 -0
  531. package/dist/types/components/gov-button/button/constants.d.ts +1 -1
  532. package/dist/types/components/gov-control-group/constants.d.ts +1 -1
  533. package/dist/types/components/gov-flex/gov-flex.d.ts +5 -1
  534. package/dist/types/components/gov-form/group/constants.d.ts +1 -1
  535. package/dist/types/components/gov-grid/constants.d.ts +4 -0
  536. package/dist/types/components/gov-grid/gov-grid-item.d.ts +25 -5
  537. package/dist/types/components/gov-grid/gov-grid.d.ts +11 -2
  538. package/dist/types/components/gov-icon/constants.d.ts +1 -1
  539. package/dist/types/components/gov-icon/gov-icon.d.ts +0 -1
  540. package/dist/types/components/gov-infobar/constants.d.ts +1 -1
  541. package/dist/types/components/gov-link/constants.d.ts +1 -0
  542. package/dist/types/components/gov-stepper/constants.d.ts +2 -0
  543. package/dist/types/components/gov-theme-switch/constants.d.ts +1 -0
  544. package/dist/types/components.d.ts +179 -36
  545. package/dist/types/pages/Banner.d.ts +3 -0
  546. package/dist/types/pages/Blockquote.d.ts +3 -0
  547. package/package.json +3 -3
  548. package/dist/cjs/constants-4dfa23e3.js.map +0 -1
  549. package/dist/cjs/constants-52053f2d.js.map +0 -1
  550. package/dist/cjs/gov-tiles.cjs.entry.js +0 -26
  551. package/dist/cjs/gov-tiles.cjs.entry.js.map +0 -1
  552. package/dist/cjs/index-67e87c27.js.map +0 -1
  553. package/dist/collection/components/gov-tile/container/constants.js +0 -4
  554. package/dist/collection/components/gov-tile/container/constants.js.map +0 -1
  555. package/dist/collection/components/gov-tile/container/gov-tiles.js +0 -37
  556. package/dist/collection/components/gov-tile/container/gov-tiles.js.map +0 -1
  557. package/dist/components/gov-tiles.js +0 -2
  558. package/dist/components/gov-tiles.js.map +0 -1
  559. package/dist/components/p-115b9cf3.js +0 -3
  560. package/dist/components/p-115b9cf3.js.map +0 -1
  561. package/dist/components/p-350e060c.js +0 -2
  562. package/dist/components/p-350e060c.js.map +0 -1
  563. package/dist/components/p-792c5352.js +0 -2
  564. package/dist/components/p-792c5352.js.map +0 -1
  565. package/dist/components/p-880743a5.js +0 -2
  566. package/dist/components/p-880743a5.js.map +0 -1
  567. package/dist/components/p-8e8a3300.js +0 -2
  568. package/dist/components/p-8e8a3300.js.map +0 -1
  569. package/dist/components/p-8ee6f2f3.js +0 -2
  570. package/dist/components/p-92406c6d.js +0 -2
  571. package/dist/components/p-92406c6d.js.map +0 -1
  572. package/dist/components/p-939638b2.js +0 -2
  573. package/dist/components/p-939638b2.js.map +0 -1
  574. package/dist/components/p-95bd5f39.js +0 -2
  575. package/dist/components/p-95bd5f39.js.map +0 -1
  576. package/dist/components/p-a521c59a.js +0 -2
  577. package/dist/components/p-a521c59a.js.map +0 -1
  578. package/dist/components/p-ba61e648.js +0 -2
  579. package/dist/components/p-ba61e648.js.map +0 -1
  580. package/dist/components/p-bfce6f99.js +0 -2
  581. package/dist/components/p-bfce6f99.js.map +0 -1
  582. package/dist/components/p-f9161803.js +0 -2
  583. package/dist/components/p-f9161803.js.map +0 -1
  584. package/dist/core/p-017ff5a5.entry.js +0 -2
  585. package/dist/core/p-017ff5a5.entry.js.map +0 -1
  586. package/dist/core/p-032accfb.entry.js +0 -2
  587. package/dist/core/p-032accfb.entry.js.map +0 -1
  588. package/dist/core/p-054aa25e.entry.js +0 -2
  589. package/dist/core/p-054aa25e.entry.js.map +0 -1
  590. package/dist/core/p-058e6fe2.entry.js +0 -2
  591. package/dist/core/p-058e6fe2.entry.js.map +0 -1
  592. package/dist/core/p-0724cb6a.entry.js +0 -2
  593. package/dist/core/p-0724cb6a.entry.js.map +0 -1
  594. package/dist/core/p-09c9eba6.entry.js +0 -2
  595. package/dist/core/p-09c9eba6.entry.js.map +0 -1
  596. package/dist/core/p-0c076b21.entry.js +0 -2
  597. package/dist/core/p-10f773c2.entry.js +0 -2
  598. package/dist/core/p-10f773c2.entry.js.map +0 -1
  599. package/dist/core/p-14d66f26.entry.js +0 -2
  600. package/dist/core/p-1aa7450e.entry.js +0 -2
  601. package/dist/core/p-237a5b91.entry.js +0 -2
  602. package/dist/core/p-269071f5.entry.js +0 -2
  603. package/dist/core/p-2ee042d4.js +0 -3
  604. package/dist/core/p-2ee042d4.js.map +0 -1
  605. package/dist/core/p-33310735.entry.js +0 -2
  606. package/dist/core/p-33310735.entry.js.map +0 -1
  607. package/dist/core/p-347d15d5.entry.js +0 -2
  608. package/dist/core/p-37473c34.entry.js +0 -2
  609. package/dist/core/p-3849ca02.entry.js.map +0 -1
  610. package/dist/core/p-3a7381e7.entry.js +0 -2
  611. package/dist/core/p-43d3dbc0.entry.js +0 -2
  612. package/dist/core/p-45b759f4.entry.js +0 -2
  613. package/dist/core/p-4c60e125.entry.js +0 -2
  614. package/dist/core/p-4e29744a.entry.js +0 -2
  615. package/dist/core/p-4e29744a.entry.js.map +0 -1
  616. package/dist/core/p-4fa0320d.entry.js +0 -2
  617. package/dist/core/p-50af9ae8.entry.js +0 -2
  618. package/dist/core/p-5c3f4cfe.entry.js +0 -2
  619. package/dist/core/p-5c3f4cfe.entry.js.map +0 -1
  620. package/dist/core/p-6b7c3a96.entry.js +0 -2
  621. package/dist/core/p-6b7c3a96.entry.js.map +0 -1
  622. package/dist/core/p-71f5d4ff.entry.js +0 -2
  623. package/dist/core/p-7a21fb90.entry.js +0 -2
  624. package/dist/core/p-7a21fb90.entry.js.map +0 -1
  625. package/dist/core/p-880743a5.js +0 -2
  626. package/dist/core/p-880743a5.js.map +0 -1
  627. package/dist/core/p-8bb6c816.entry.js +0 -2
  628. package/dist/core/p-8bb6c816.entry.js.map +0 -1
  629. package/dist/core/p-8cc5ad01.entry.js +0 -2
  630. package/dist/core/p-906865d0.entry.js +0 -2
  631. package/dist/core/p-967a1094.entry.js +0 -2
  632. package/dist/core/p-9846fd13.entry.js +0 -2
  633. package/dist/core/p-9846fd13.entry.js.map +0 -1
  634. package/dist/core/p-994385ca.entry.js +0 -2
  635. package/dist/core/p-994385ca.entry.js.map +0 -1
  636. package/dist/core/p-9f8d69a9.entry.js +0 -2
  637. package/dist/core/p-a521c59a.js +0 -2
  638. package/dist/core/p-a521c59a.js.map +0 -1
  639. package/dist/core/p-b62e49ee.entry.js +0 -2
  640. package/dist/core/p-cecbe73f.entry.js +0 -2
  641. package/dist/core/p-cecbe73f.entry.js.map +0 -1
  642. package/dist/core/p-d795a421.entry.js +0 -2
  643. package/dist/core/p-d795a421.entry.js.map +0 -1
  644. package/dist/core/p-d9b42773.entry.js +0 -2
  645. package/dist/core/p-d9b42773.entry.js.map +0 -1
  646. package/dist/core/p-e0a199ff.entry.js +0 -2
  647. package/dist/core/p-e0a199ff.entry.js.map +0 -1
  648. package/dist/core/p-e215f3ee.entry.js +0 -2
  649. package/dist/core/p-ed02945f.entry.js +0 -2
  650. package/dist/core/p-ee55932a.entry.js +0 -2
  651. package/dist/core/p-f2bb8c29.entry.js +0 -2
  652. package/dist/core/p-f54edd6c.entry.js +0 -2
  653. package/dist/core/p-f54edd6c.entry.js.map +0 -1
  654. package/dist/core/p-f7f60f91.entry.js +0 -2
  655. package/dist/core/p-fcac8531.entry.js +0 -2
  656. package/dist/core/p-fcac8531.entry.js.map +0 -1
  657. package/dist/esm/constants-2d5a0e18.js.map +0 -1
  658. package/dist/esm/constants-372455eb.js.map +0 -1
  659. package/dist/esm/gov-tiles.entry.js +0 -22
  660. package/dist/esm/gov-tiles.entry.js.map +0 -1
  661. package/dist/esm/index-087b155c.js.map +0 -1
  662. package/dist/types/components/gov-tile/container/constants.d.ts +0 -3
  663. package/dist/types/components/gov-tile/container/gov-tiles.d.ts +0 -10
  664. /package/dist/components/{p-03ad4e0f.js.map → p-73938936.js.map} +0 -0
  665. /package/dist/components/{p-384c7f2a.js.map → p-7be2301a.js.map} +0 -0
  666. /package/dist/components/{p-8ee6f2f3.js.map → p-f9a1ff6e.js.map} +0 -0
  667. /package/dist/core/{p-37473c34.entry.js.map → p-005214d1.entry.js.map} +0 -0
  668. /package/dist/core/{p-43d3dbc0.entry.js.map → p-1c7c9144.entry.js.map} +0 -0
  669. /package/dist/core/{p-927c31dd.entry.js.map → p-46ecf09e.entry.js.map} +0 -0
  670. /package/dist/core/{p-0f0f7302.entry.js.map → p-52042c7e.entry.js.map} +0 -0
  671. /package/dist/core/{p-c0800e6d.entry.js.map → p-5242b51b.entry.js.map} +0 -0
  672. /package/dist/core/{p-9f8d69a9.entry.js.map → p-564555e6.entry.js.map} +0 -0
  673. /package/dist/core/{p-0c076b21.entry.js.map → p-6e41cf69.entry.js.map} +0 -0
  674. /package/dist/core/{p-77daba72.entry.js.map → p-6f1ea21d.entry.js.map} +0 -0
  675. /package/dist/core/{p-7dfb7e36.entry.js.map → p-79ec86da.entry.js.map} +0 -0
  676. /package/dist/core/{p-3a7381e7.entry.js.map → p-8cbe8add.entry.js.map} +0 -0
  677. /package/dist/core/{p-4fa0320d.entry.js.map → p-8f73f8e0.entry.js.map} +0 -0
  678. /package/dist/core/{p-7baee44f.entry.js.map → p-99f192c1.entry.js.map} +0 -0
  679. /package/dist/core/{p-e215f3ee.entry.js.map → p-a02f2547.entry.js.map} +0 -0
  680. /package/dist/core/{p-a6a9de9a.entry.js.map → p-ae88fe6b.entry.js.map} +0 -0
  681. /package/dist/core/{p-063b70a2.entry.js.map → p-c2abc031.entry.js.map} +0 -0
  682. /package/dist/core/{p-b62e49ee.entry.js.map → p-c688349d.entry.js.map} +0 -0
  683. /package/dist/core/{p-50af9ae8.entry.js.map → p-c91512dd.entry.js.map} +0 -0
  684. /package/dist/core/{p-71f5d4ff.entry.js.map → p-de852480.entry.js.map} +0 -0
  685. /package/dist/core/{p-4c60e125.entry.js.map → p-e89471ef.entry.js.map} +0 -0
  686. /package/dist/core/{p-347d15d5.entry.js.map → p-f333c673.entry.js.map} +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-67e87c27.js');
5
+ const index = require('./index-0e4f24f9.js');
6
6
  const template = require('./template-39939fd6.js');
7
7
  const string_utils = require('./string.utils-b84c81cf.js');
8
8
  const wcag = require('./wcag-2927ff73.js');
@@ -50,7 +50,7 @@ const GovCard = class {
50
50
  this.hydrated = true;
51
51
  }
52
52
  render() {
53
- return (index.h(index.Host, { key: '16ef4ffbb0a84bb231008f4f52a4ffe1f2f809d8', class: this.h.classes(CardClass.root), open: this.open, collapsible: template.booleanString(this.collapsible), direction: this.direction, hydrated: this.hydrated }, this.collapsible ? (index.h("button", { id: this.headlineId, class: CardClass.header, "aria-label": this.accessibleTriggerLabel, "aria-labelledby": this.accessibleTriggerLabelledBy, "aria-expanded": template.booleanString(this.open), "aria-controls": this.contentId, onClick: this.onClickHandler.bind(this) }, index.h("slot", { name: "headline" }), index.h("gov-icon", { class: CardClass.arrow, name: "chevron-down", type: "components" }))) : this.h.hasSlot("headline") ? (index.h("div", { class: CardClass.header }, index.h("slot", { name: "headline" }))) : null, index.h("div", { key: '749f6e4b624f4cdda53d2e3433b451d56c742667', class: CardClass.inner, id: this.contentId, "aria-hidden": this.collapsible ? template.booleanString(!this.open) : undefined, hidden: this.collapsible ? !this.open : undefined, "aria-labelledby": this.collapsible ? this.headlineId : undefined }, this.h.hasSlot('img') && (index.h("div", { key: 'f4b953ddf9b4f59bc111b512bb3de3510b28af7f', class: CardClass.img }, index.h("slot", { key: '2867a29e49e67aff041ac0705527c5f76f4a019e', name: "img" }))), this.h.hasSlot('icon') && (index.h("div", { key: '8c8e55d3faff7cfbd6abe698cd8801f7fc41dbad', class: CardClass.icon }, index.h("slot", { key: '4d9eaeb0b3af65e4bf5de75090f9346942069e86', name: "icon" }))), index.h("div", { key: '77a9a065fb2803b5f39f1b5716d9810c04b6971b', class: CardClass.content }, index.h("slot", { key: 'acec7d3d4b6ac5533e5df218fe38e26147c440d8' })), this.h.hasSlot('footer') && (index.h("div", { key: '1e63a0811f487e18cbbef8b045651c0e5b745f37', class: CardClass.footer }, index.h("slot", { key: '4bffc12bffb3e29527aad38b6edbe8c00527a843', name: "footer" }))))));
53
+ return (index.h(index.Host, { key: '734cecdc36d379c1d2d8c14ef136780eabff9d32', class: this.h.classes(CardClass.root), open: this.open, collapsible: template.booleanString(this.collapsible), direction: this.direction, hydrated: this.hydrated }, this.collapsible ? (index.h("button", { id: this.headlineId, class: CardClass.header, "aria-label": this.accessibleTriggerLabel, "aria-labelledby": this.accessibleTriggerLabelledBy, "aria-expanded": template.booleanString(this.open), "aria-controls": this.contentId, onClick: this.onClickHandler.bind(this) }, index.h("slot", { name: "headline" }), index.h("gov-icon", { class: CardClass.arrow, name: "chevron-down", type: "components" }))) : this.h.hasSlot("headline") ? (index.h("div", { class: CardClass.header }, index.h("slot", { name: "headline" }))) : null, index.h("div", { key: '35fbd43458f8895ac32a49b2fb26301ef6c2f4cc', class: CardClass.inner, id: this.contentId, "aria-hidden": this.collapsible ? template.booleanString(!this.open) : undefined, hidden: this.collapsible ? !this.open : undefined, "aria-labelledby": this.collapsible ? this.headlineId : undefined }, this.h.hasSlot('img') && (index.h("div", { key: '1d1d26a7d45bc7453cdfbb2ce2530e277ea7f1d6', class: CardClass.img }, index.h("slot", { key: '43d62fec8982ac856afedfe30a4062253ab072d7', name: "img" }))), this.h.hasSlot('icon') && (index.h("div", { key: 'ea26e422318e6a8753c47c5af2bcbfafe44bd053', class: CardClass.icon }, index.h("slot", { key: '40cad4f8356f6ff1e640436f4b548581cb4b4bcf', name: "icon" }))), index.h("div", { key: '17d86c58f5d4d1fec9af1b111a69e73629188b4a', class: CardClass.content }, index.h("slot", { key: '34b718783966bda56624c883b85d965ba74041a5' })), this.h.hasSlot('footer') && (index.h("div", { key: 'bdac20b7db8adabdba069df573e117ef1c9a79fc', class: CardClass.footer }, index.h("slot", { key: 'e57ade83302bd2a7537236aff716d02a5a47ea0f', name: "footer" }))))));
54
54
  }
55
55
  onClickHandler(e) {
56
56
  e.stopPropagation();
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-67e87c27.js');
5
+ const index = require('./index-0e4f24f9.js');
6
6
  const props = require('./props-d189860c.js');
7
7
  const template = require('./template-39939fd6.js');
8
8
  const utils = require('./utils-d263c5c6.js');
@@ -72,7 +72,8 @@ const GovChip = class {
72
72
  this.attributeObserver.startObserving(attribute.ariaAttributes);
73
73
  }
74
74
  disconnectedCallback() {
75
- this.attributeObserver.stopObserving();
75
+ var _a;
76
+ (_a = this.attributeObserver) === null || _a === void 0 ? void 0 : _a.stopObserving();
76
77
  }
77
78
  connectedCallback() {
78
79
  this.hydrated = true;
@@ -86,11 +87,11 @@ const GovChip = class {
86
87
  const nativeType = Tag == NativeType.BUTTON ? NativeType.BUTTON : undefined;
87
88
  const iconStart = helpers.prepareIconFormat(this.iconStart);
88
89
  const iconEnd = helpers.prepareIconFormat(this.iconEnd);
89
- return (index.h(index.Host, { key: '35148b293a6ae608eb1c4e0db06bbfff8b9fdca7', class: this.h.classes([
90
+ return (index.h(index.Host, { key: '3873d567f8dd31d62e259751a9800bc2302380f8', class: this.h.classes([
90
91
  ChipClass.root,
91
92
  this.h.hasSlot("right") ? ChipClass.hasRight : undefined,
92
93
  this.h.hasSlot("left") ? ChipClass.hasLeft : undefined,
93
- ]), disabled: this.disabled, href: this.href, color: this.color, type: this.type, size: this.size, hoverable: Tag == NativeType.A || Tag == NativeType.BUTTON, hydrated: this.hydrated }, index.h(Tag, Object.assign({ key: '01ba70f91c8be428f91ca4744d093e408dd5acbe', class: "element", href: this.href, target: this.target, ref: el => (this.triggerRef = el), onClick: this.onClickHandler.bind(this), tabindex: (this.h.hasSlot("left") || this.h.hasSlot("right") || this.disabled) && !this.focusable ? "-1" : "0", id: this.identifier || this.chipId, type: nativeType }, this.inheritedAttributes, { "aria-disabled": this.disabled }), index.h("slot", { key: '28acde76889a8b529dae69b1e55f5f3db51b8e25', name: "left" }), index.h("slot", { key: '1c8fc171656757933a0bb0568a335ee11c09ce6f', name: "icon-start" }, iconStart && index.h("gov-icon", { key: 'b2e91ec6724f3ad50433c10597c44f50826dfcfe', type: iconStart.type, name: iconStart.name })), index.h("slot", { key: '0a37763084f9a0b7269efe6cc6ebd71161890861' }), index.h("slot", { key: '5b37c8b8350ed2ead0a85d81ed0ba22295b3679e', name: "icon-end" }, iconEnd && index.h("gov-icon", { key: '22dfae0ca565fddaa10e6179dc7d0ef38839764f', type: iconEnd.type, name: iconEnd.name })), index.h("slot", { key: 'fe177d273f38e81cc9ffc686c62e05bd466c1fe8', name: "right" }))));
94
+ ]), disabled: this.disabled, href: this.href, color: this.color, type: this.type, size: this.size, hoverable: Tag == NativeType.A || Tag == NativeType.BUTTON, hydrated: this.hydrated }, index.h(Tag, Object.assign({ key: '6635ce7184fba0374e7f8035c3df38156ac69b24', class: "element", href: this.href, target: this.target, ref: el => (this.triggerRef = el), onClick: this.onClickHandler.bind(this), tabindex: (this.h.hasSlot("left") || this.h.hasSlot("right") || this.disabled) && !this.focusable ? "-1" : "0", id: this.identifier || this.chipId, type: nativeType }, this.inheritedAttributes, { "aria-disabled": this.disabled }), index.h("slot", { key: '3677ece9c89d8e9d59fb5d87fced0cdf4936342b', name: "left" }), index.h("slot", { key: '0acc75cb17c45740380ceb6681d21b29475c6419', name: "icon-start" }, iconStart && index.h("gov-icon", { key: 'f95b1e5fc9e460177a98deb1a7cd324dcac5e57f', type: iconStart.type, name: iconStart.name })), index.h("slot", { key: 'f0354863b6c661b99c26f5e94193b85a12affab9' }), index.h("slot", { key: 'ee35b12933b95d96932890ede60fa5b91f51d6b5', name: "icon-end" }, iconEnd && index.h("gov-icon", { key: '50cd0f12c868cb1e674a3df0609c2c8ba5664556', type: iconEnd.type, name: iconEnd.name })), index.h("slot", { key: '39ca7870c9423cd0a3f8ca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AAS,CAAC,IAAI,GAAa,CACzE,EACPA,oEAAO,EACPA,mEAAM,IAAI,EAAC,UAAU,IACnB,OAAO,IAAIA,uEAAU,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,GAAa,CACnE,EACPA,mEAAM,IAAI,EAAC,OAAO,GAAQ,CACrB,CACA,EACP;KACD;IAEO,cAAc,CAAC,CAAe;QACrC,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,IAAI,IAAI,CAAC,GAAG,KAAK,UAAU,CAAC,MAAM,EAAE;YAC9D,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;SACrB;KACD;;;;IAMD,MAAM,KAAK;QACV,OAAO,IAAI,CAAC,UAAU,CAAA;KACtB;;;;IAMD,MAAM,QAAQ;QACb,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;KACvB;;;;;;;;;;","names":["pick","Sizes","ButtonColors","govHost","createID","validateProp","ButtonSizes","inheritAriaAttributes","AttributeObserver","ariaAttributes","prepareIconFormat","h","Host"],"sources":["../../../packages/core/src/components/gov-chip/constants.ts","../../../packages/core/src/components/gov-chip/gov-chip.tsx"],"sourcesContent":["import { ValueOf } from '../../types/interfaces'\nimport {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\n\nexport const ChipSizes = pick(Sizes, ['_XS', '_S', '_M'])\nexport type ChipSizesType = `${ValueOf<typeof ChipSizes>}`\n\nexport enum ChipType {\n\tSOLID = 'solid',\n\tOUTLINED = 'outlined',\n}\nexport type ChipTypesType = `${ValueOf<typeof ChipType>}`\n\nexport enum NativeType {\n\tA = 'a',\n\tSPAN = 'span',\n\tBUTTON = 'button',\n}\nexport type NativeTypesType = `${ValueOf<typeof NativeType>}`\n\nexport const ChipClass = {\n\troot: 'gov-chip',\n\tinner: 'gov-chip__inner',\n\thasRight: 'gov-chip--has-right',\n\thasLeft: 'gov-chip--has-left',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {ChipClass, ChipSizes, ChipSizesType, ChipTypesType, NativeType, NativeTypesType} from \"./constants\"\nimport {ButtonColors, ButtonColorType, ButtonSizes} from \"../gov-button/button/constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {prepareIconFormat} from \"../gov-icon/helpers\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\n\n@Component({\n\ttag: \"gov-chip\",\n})\nexport class GovChip {\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement | HTMLSpanElement\n\tprivate h: GovHost\n\tprivate readonly chipId: string\n\tprivate hydrated = false\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.chipId = createID('GovChip')\n\t}\n\n\t@Element() host: HTMLGovChipElement\n\n\t/**\n\t * Makes the chip component disabled.\n\t */\n\t@Prop({reflect: true}) readonly disabled: 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 * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target: string\n\t/**\n\t * Definition of the button icon on the left. The icon must be defined in the form \"type/name\".\n\t */\n\t@Prop({attribute: \"icon-start\"}) readonly iconStart?: string\n\t/**\n\t * Definition of the button icon on the left. The icon must be defined in the form \"type/name\".\n\t */\n\t@Prop({attribute: \"icon-end\"}) readonly iconEnd?: string\n\t/**\n\t * Chip’s size.\n\t */\n\t@Prop() readonly size: ChipSizesType = ChipSizes._M\n\t/**\n\t * Used to change the HTML tag in the chip\n\t */\n\t@Prop() readonly tag: NativeTypesType = \"span\"\n\t/**\n\t * Style variation of the chip.\n\t */\n\t@Prop() readonly color: ButtonColorType = ButtonColors.PRIMARY\n\t/**\n\t * Chip’s type\n\t */\n\t@Prop({reflect: true}) readonly type: ChipTypesType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom chip identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Emitted when the button click.\n\t */\n\t@Event({eventName: \"gov-click\"}) govClick: EventEmitter<PointerEvent>\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ButtonColors, newValue, ChipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ButtonSizes, newValue, ChipClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? NativeType.A : this.tag\n\t\tconst nativeType = Tag == NativeType.BUTTON ? NativeType.BUTTON : undefined\n\n\t\tconst iconStart = prepareIconFormat(this.iconStart)\n\t\tconst iconEnd = prepareIconFormat(this.iconEnd)\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes([\n\t\t\t\t\tChipClass.root,\n\t\t\t\t\tthis.h.hasSlot(\"right\") ? ChipClass.hasRight : undefined,\n\t\t\t\t\tthis.h.hasSlot(\"left\") ? ChipClass.hasLeft : undefined,\n\t\t\t\t])}\n\t\t\t\tdisabled={this.disabled}\n\t\t\t\thref={this.href}\n\t\t\t\tcolor={this.color}\n\t\t\t\ttype={this.type}\n\t\t\t\tsize={this.size}\n\t\t\t\thoverable={Tag == NativeType.A || Tag == NativeType.BUTTON}\n\t\t\t\thydrated={this.hydrated}\n\t\t\t>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLLinkElement | HTMLButtonElement | HTMLSpanElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\ttabindex={(this.h.hasSlot(\"left\") || this.h.hasSlot(\"right\") || this.disabled) && !this.focusable ? \"-1\" : \"0\"}\n\t\t\t\t\tid={this.identifier || this.chipId}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-disabled={this.disabled}>\n\t\t\t\t\t<slot name=\"left\"></slot>\n\t\t\t\t\t<slot name=\"icon-start\">\n\t\t\t\t\t\t{iconStart && <gov-icon type={iconStart.type} name={iconStart.name}></gov-icon>}\n\t\t\t\t\t</slot>\n\t\t\t\t\t<slot/>\n\t\t\t\t\t<slot name=\"icon-end\">\n\t\t\t\t\t\t{iconEnd && <gov-icon type={iconEnd.type} name={iconEnd.name}></gov-icon>}\n\t\t\t\t\t</slot>\n\t\t\t\t\t<slot name=\"right\"></slot>\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false && this.tag === NativeType.BUTTON) {\n\t\t\tthis.govClick.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync geRef() {\n\t\treturn this.triggerRef\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.triggerRef.focus()\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-chip.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;AAIO,MAAM,SAAS,GAAGA,UAAI,CAACC,WAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAGzD,IAAY,QAGX;AAHD,WAAY,QAAQ;IACnB,2BAAe,CAAA;IACf,iCAAqB,CAAA;AACtB,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB;AAGD,IAAY,UAIX;AAJD,WAAY,UAAU;IACrB,qBAAO,CAAA;IACP,2BAAa,CAAA;IACb,+BAAiB,CAAA;AAClB,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AAGM,MAAM,SAAS,GAAG;IACxB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,iBAAiB;IACxB,QAAQ,EAAE,qBAAqB;IAC/B,OAAO,EAAE,oBAAoB;CAC7B;;MCVY,OAAO;IAOnB;;;QAHQ,aAAQ,GAAG,KAAK,CAAA;wBAa4B,KAAK;;;;;oBAsBlB,SAAS,CAAC,EAAE;mBAIX,MAAM;qBAIJC,sBAAY,CAAC,OAAO;;yBASxB,IAAI;;mCAoBC,EAAE;QApE5C,IAAI,CAAC,CAAC,GAAGC,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,MAAM,GAAGC,qBAAQ,CAAC,SAAS,CAAC,CAAA;KACjC;IAyDD,aAAa,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AAI,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,EAClC,IAAI,EAAE,UAAU,IACZ,IAAI,CAAC,mBAAmB,qBACb,IAAI,CAAC,QAAQ,KAC5BA,mEAAM,IAAI,EAAC,MAAM,GAAQ,EACzBA,mEAAM,IAAI,EAAC,YAAY,IACrB,SAAS,IAAIA,uEAAU,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,GAAa,CACzE,EACPA,oEAAO,EACPA,mEAAM,IAAI,EAAC,UAAU,IACnB,OAAO,IAAIA,uEAAU,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,GAAa,CACnE,EACPA,mEAAM,IAAI,EAAC,OAAO,GAAQ,CACrB,CACA,EACP;KACD;IAEO,cAAc,CAAC,CAAe;QACrC,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,IAAI,IAAI,CAAC,GAAG,KAAK,UAAU,CAAC,MAAM,EAAE;YAC9D,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;SACrB;KACD;;;;IAMD,MAAM,KAAK;QACV,OAAO,IAAI,CAAC,UAAU,CAAA;KACtB;;;;IAMD,MAAM,QAAQ;QACb,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;KACvB;;;;;;;;;;","names":["pick","Sizes","ButtonColors","govHost","createID","validateProp","ButtonSizes","inheritAriaAttributes","AttributeObserver","ariaAttributes","prepareIconFormat","h","Host"],"sources":["../../../packages/core/src/components/gov-chip/constants.ts","../../../packages/core/src/components/gov-chip/gov-chip.tsx"],"sourcesContent":["import { ValueOf } from '../../types/interfaces'\nimport {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\n\nexport const ChipSizes = pick(Sizes, ['_XS', '_S', '_M'])\nexport type ChipSizesType = `${ValueOf<typeof ChipSizes>}`\n\nexport enum ChipType {\n\tSOLID = 'solid',\n\tOUTLINED = 'outlined',\n}\nexport type ChipTypesType = `${ValueOf<typeof ChipType>}`\n\nexport enum NativeType {\n\tA = 'a',\n\tSPAN = 'span',\n\tBUTTON = 'button',\n}\nexport type NativeTypesType = `${ValueOf<typeof NativeType>}`\n\nexport const ChipClass = {\n\troot: 'gov-chip',\n\tinner: 'gov-chip__inner',\n\thasRight: 'gov-chip--has-right',\n\thasLeft: 'gov-chip--has-left',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {ChipClass, ChipSizes, ChipSizesType, ChipTypesType, NativeType, NativeTypesType} from \"./constants\"\nimport {ButtonColors, ButtonColorType, ButtonSizes} from \"../gov-button/button/constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {prepareIconFormat} from \"../gov-icon/helpers\";\nimport {inheritAriaAttributes} from \"../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../helpers/Accessibility/attributes\";\nimport {AttributeObserver, Attributes} from \"../../helpers/Dom/attribute\";\n\n@Component({\n\ttag: \"gov-chip\",\n})\nexport class GovChip {\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement | HTMLSpanElement\n\tprivate h: GovHost\n\tprivate readonly chipId: string\n\tprivate hydrated = false\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.chipId = createID('GovChip')\n\t}\n\n\t@Element() host: HTMLGovChipElement\n\n\t/**\n\t * Makes the chip component disabled.\n\t */\n\t@Prop({reflect: true}) readonly disabled: 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 * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target: string\n\t/**\n\t * Definition of the button icon on the left. The icon must be defined in the form \"type/name\".\n\t */\n\t@Prop({attribute: \"icon-start\"}) readonly iconStart?: string\n\t/**\n\t * Definition of the button icon on the left. The icon must be defined in the form \"type/name\".\n\t */\n\t@Prop({attribute: \"icon-end\"}) readonly iconEnd?: string\n\t/**\n\t * Chip’s size.\n\t */\n\t@Prop() readonly size: ChipSizesType = ChipSizes._M\n\t/**\n\t * Used to change the HTML tag in the chip\n\t */\n\t@Prop() readonly tag: NativeTypesType = \"span\"\n\t/**\n\t * Style variation of the chip.\n\t */\n\t@Prop() readonly color: ButtonColorType = ButtonColors.PRIMARY\n\t/**\n\t * Chip’s type\n\t */\n\t@Prop({reflect: true}) readonly type: ChipTypesType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom chip identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Emitted when the button click.\n\t */\n\t@Event({eventName: \"gov-click\"}) govClick: EventEmitter<PointerEvent>\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ButtonColors, newValue, ChipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ButtonSizes, newValue, ChipClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? NativeType.A : this.tag\n\t\tconst nativeType = Tag == NativeType.BUTTON ? NativeType.BUTTON : undefined\n\n\t\tconst iconStart = prepareIconFormat(this.iconStart)\n\t\tconst iconEnd = prepareIconFormat(this.iconEnd)\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes([\n\t\t\t\t\tChipClass.root,\n\t\t\t\t\tthis.h.hasSlot(\"right\") ? ChipClass.hasRight : undefined,\n\t\t\t\t\tthis.h.hasSlot(\"left\") ? ChipClass.hasLeft : undefined,\n\t\t\t\t])}\n\t\t\t\tdisabled={this.disabled}\n\t\t\t\thref={this.href}\n\t\t\t\tcolor={this.color}\n\t\t\t\ttype={this.type}\n\t\t\t\tsize={this.size}\n\t\t\t\thoverable={Tag == NativeType.A || Tag == NativeType.BUTTON}\n\t\t\t\thydrated={this.hydrated}\n\t\t\t>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLLinkElement | HTMLButtonElement | HTMLSpanElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\ttabindex={(this.h.hasSlot(\"left\") || this.h.hasSlot(\"right\") || this.disabled) && !this.focusable ? \"-1\" : \"0\"}\n\t\t\t\t\tid={this.identifier || this.chipId}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-disabled={this.disabled}>\n\t\t\t\t\t<slot name=\"left\"></slot>\n\t\t\t\t\t<slot name=\"icon-start\">\n\t\t\t\t\t\t{iconStart && <gov-icon type={iconStart.type} name={iconStart.name}></gov-icon>}\n\t\t\t\t\t</slot>\n\t\t\t\t\t<slot/>\n\t\t\t\t\t<slot name=\"icon-end\">\n\t\t\t\t\t\t{iconEnd && <gov-icon type={iconEnd.type} name={iconEnd.name}></gov-icon>}\n\t\t\t\t\t</slot>\n\t\t\t\t\t<slot name=\"right\"></slot>\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false && this.tag === NativeType.BUTTON) {\n\t\t\tthis.govClick.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync geRef() {\n\t\treturn this.triggerRef\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.triggerRef.focus()\n\t}\n}\n"],"version":3}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-67e87c27.js');
5
+ const index = require('./index-0e4f24f9.js');
6
6
  const template = require('./template-39939fd6.js');
7
7
 
8
8
  const ContainerClass = {
@@ -15,7 +15,7 @@ const GovContainer = class {
15
15
  this.h = template.govHost(this.host);
16
16
  }
17
17
  render() {
18
- return (index.h(index.Host, { key: '0844c86e0eacd5f89bcfcad2b60e56da0097b506', class: this.h.classes(ContainerClass.root) }, index.h("slot", { key: '5cd801a016968be5968a3598d3efa3b222953120' })));
18
+ return (index.h(index.Host, { key: 'ad1f0a234ba94b59c7214c2ddba4208234355a47', class: this.h.classes(ContainerClass.root) }, index.h("slot", { key: 'a7b877a4cf5d2f5ec1aa5908a2faf9976fa5591e' })));
19
19
  }
20
20
  get host() { return index.getElement(this); }
21
21
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-67e87c27.js');
5
+ const index = require('./index-0e4f24f9.js');
6
6
  const colors = require('./colors-f7c8eadd.js');
7
7
  const template = require('./template-39939fd6.js');
8
8
  const props = require('./props-d189860c.js');
@@ -26,7 +26,7 @@ const GovControlGroup = class {
26
26
  props.validateProp(colors.Colors, newValue, ControlGroupClass.root);
27
27
  }
28
28
  render() {
29
- return (index.h(index.Host, { key: 'bee513bb064b3a276eaede7f93ed12b97edb7adb', class: this.h.classes(ControlGroupClass.root), color: this.color }, index.h("slot", { key: 'adba55ccd38d432ae11fa4967996d8bcaf552427' })));
29
+ return (index.h(index.Host, { key: 'c52a55a92fd473dcec8806a693fa820a9557a8f3', class: this.h.classes(ControlGroupClass.root), color: this.color }, index.h("slot", { key: '2c39e206b7a295212f4bda2a0552b1d10d19828b' })));
30
30
  }
31
31
  get host() { return index.getElement(this); }
32
32
  static get watchers() { return {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-67e87c27.js');
5
+ const index = require('./index-0e4f24f9.js');
6
6
  const template = require('./template-39939fd6.js');
7
7
 
8
8
  const CookieConsentClass = {
@@ -19,7 +19,7 @@ const GovCookiebar = class {
19
19
  this.h = template.govHost(this.host);
20
20
  }
21
21
  render() {
22
- return (index.h(index.Host, { key: '311f0da16d86ab548e90e8f7be69d23d88a71ae4', class: this.h.classes(CookieConsentClass.root) }, index.h("div", { key: 'f371e0bfa5ad8b2195aec2fd0c02f86fb81d58ff', class: CookieConsentClass.content }, index.h("slot", { key: '96433ca7228d4bf61bfc6dc041bc519c83f56109', name: "headline" }), index.h("slot", { key: '4fa8e397eba029f55329d0ca6d24044ae7c9a513' })), (this.h.hasSlot('actions-primary') || this.h.hasSlot('actions-secondary')) && (index.h("div", { key: 'a1d5e5d03d8d89bceb65f45f75d7dc3d446d1b62', class: CookieConsentClass.actions }, this.h.hasSlot('actions-primary') && (index.h("div", { key: '4ee2b3b82b91bdfb3d87a7bc34e9b0d4e2fc4f33', class: CookieConsentClass.actionsPrimary }, index.h("slot", { key: '7c0cbf9c5f334cffa4a4eb3f2af9a05bfc8af208', name: "actions-primary" }))), this.h.hasSlot('actions-secondary') && (index.h("div", { key: 'e40a9f403e994584f53df9e0d84e27aa08c849e2', class: CookieConsentClass.actionsSecondary }, index.h("slot", { key: '5a2bc741413334a0f08bf2d17b94d1c51b5c3f69', name: "actions-secondary" })))))));
22
+ return (index.h(index.Host, { key: '10c57cd4a06fe46e504309598788a95fc832493c', class: this.h.classes(CookieConsentClass.root) }, index.h("div", { key: '877d252bf4889abadd06e50c125ec27e114353e5', class: CookieConsentClass.content }, index.h("slot", { key: '817560e69ede6d998c27db262346e889167830fc', name: "headline" }), index.h("slot", { key: '27395c4c03746c73eec66e75e16c7c6209a41298' })), (this.h.hasSlot('actions-primary') || this.h.hasSlot('actions-secondary')) && (index.h("div", { key: '5d1395aa7039f6dc0bd84b47387b2d2b54c2359e', class: CookieConsentClass.actions }, this.h.hasSlot('actions-primary') && (index.h("div", { key: '79e2932462ff78a186b3de70d5a7bab0ff9cdc7f', class: CookieConsentClass.actionsPrimary }, index.h("slot", { key: '85cc159d24a21c8b8f4148a339038e2bdce5f246', name: "actions-primary" }))), this.h.hasSlot('actions-secondary') && (index.h("div", { key: 'af86c4ad358e36356f1d4be9409c2f642faf7035', class: CookieConsentClass.actionsSecondary }, index.h("slot", { key: '5495b26b5c31112a4c4bcd8dcbd21d54993bb6e1', name: "actions-secondary" })))))));
23
23
  }
24
24
  get host() { return index.getElement(this); }
25
25
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-67e87c27.js');
5
+ const index = require('./index-0e4f24f9.js');
6
6
  const template = require('./template-39939fd6.js');
7
7
  const gov_log = require('./gov.log-bfea3151.js');
8
8
  const wcag = require('./wcag-2927ff73.js');
@@ -71,7 +71,7 @@ const GovDialog = class {
71
71
  document.body.classList.remove(DialogClass.bodyFix);
72
72
  }
73
73
  render() {
74
- return (index.h(index.Host, { key: 'c3b65521da7837b81972262ecf614d3c12f14bb3', class: this.h.classes(DialogClass.root), open: this.open, hydrated: this.hydrated }, index.h("dialog", { key: '98b6d6db6fc9bd35760c03586548cc8a2470752a', class: DialogClass.dialog, hidden: !this.open, tabindex: template.boolToFocusValue(this.open), open: this.open, "aria-modal": "true", "aria-hidden": template.toBoolAttr(!this.open), "aria-labelledby": this.accessibleLabelledBy || this.labelId, "aria-describedby": this.accessibleDescribedBy || this.contentId, role: this.role }, index.h("div", { key: 'a8517c656ef3d3e3cf17bc9914e268a20b0e0e4b', class: DialogClass.inner }, index.h("div", { key: '3ba16e3bafe7936f0c0a999d45d5efdd64291ec3', class: DialogClass.header }, index.h("slot", { key: '736a0a11d601e9f522e69369ffa0f276c9673803', name: "icon" }), this.h.hasSlot('title') && (index.h("span", { key: '5505a53174c82c1faf73ed500c5672f2dc8ea83b', class: DialogClass.title, id: this.labelId }, index.h("slot", { key: '391dd6236c23c14e62c8c97a94c5733409939c32', name: "title" }))), index.h("gov-button", { key: '867505a691e69da09808350fc7eefb51974005ba', ref: el => (this.closeCtaRef = el), disabled: this.blockClose, class: DialogClass.close, color: "primary", "aria-label": this.accessibleCloseLabel, "aria-labelledby": this.accessibleCloseLabelledBy, type: "base", "on-gov-click": this.onCloseHandler.bind(this) }, index.h("gov-icon", { key: '6fe742ccf5aca7f27cac627373a338d46bbccfda', slot: "icon-start", name: "x-lg", type: "components" }))), index.h("div", { key: '9d9d6a45d79215ba5415512405ce7577d6a1dc26', class: DialogClass.content, id: this.contentId }, index.h("slot", { key: 'f9b32ee565586b3741c166a0aa14ca1d1c55f032' })), this.h.hasSlot('footer') && (index.h("div", { key: '8628b46f0196f38f7d2f273f0860a7c6cee62655', class: DialogClass.footer }, index.h("slot", { key: '0742967012eab82c36f9dfe0f3b43213be8bcd47', name: "footer" }))))), this.open ? (index.h("gov-backdrop", { disabled: this.blockBackdropClose, "aria-label": this.accessibleCloseLabel, "aria-labelled-by": this.accessibleCloseLabelledBy, "on-gov-click": this.onCloseHandler.bind(this) })) : null));
74
+ return (index.h(index.Host, { key: '697a938c343fff3af9cb37c377ac9784e0728e0e', class: this.h.classes(DialogClass.root), open: this.open, hydrated: this.hydrated }, index.h("dialog", { key: '9b641ef551f5f4eeb00890e822b6f5434421c38d', class: DialogClass.dialog, hidden: !this.open, tabindex: template.boolToFocusValue(this.open), open: this.open, "aria-modal": "true", "aria-hidden": template.toBoolAttr(!this.open), "aria-labelledby": this.accessibleLabelledBy || this.labelId, "aria-describedby": this.accessibleDescribedBy || this.contentId, role: this.role }, index.h("div", { key: '08da7bb9a7d3b942132410dc4dbf57c2b9d85363', class: DialogClass.inner }, index.h("div", { key: '389a42468a93951f461024950ea84a80443bd366', class: DialogClass.header }, this.h.hasSlot("icon") && (index.h("span", { key: '920649b3b276589a254cc8f47c777406d2adfdaf' }, index.h("slot", { key: '7a6b86f61009015d5dbfa3aaa7aee9aad42185dd', name: "icon" }))), this.h.hasSlot('title') && (index.h("span", { key: '8aa87028f1ed4c524291c3e0fed0a393fbb46db2', class: DialogClass.title, id: this.labelId }, index.h("slot", { key: '70b360d2748edde6ea2f762c72cc3acfa67cde97', name: "title" }))), index.h("gov-button", { key: '946ab0088d52affe4a31ecef5bdef84c1b231093', ref: el => (this.closeCtaRef = el), disabled: this.blockClose, class: DialogClass.close, color: "primary", "aria-label": this.accessibleCloseLabel, "aria-labelledby": this.accessibleCloseLabelledBy, type: "base", size: "m", "on-gov-click": this.onCloseHandler.bind(this) }, index.h("gov-icon", { key: 'b9874c2494a8b46c7b9f94f6989527b0acefc465', slot: "icon-start", name: "x-lg", type: "components" }))), index.h("div", { key: '4f4b1815de42427edeb5bd9a7b88c96e27530472', class: DialogClass.content, id: this.contentId }, index.h("slot", { key: '94ccdf29a3578f1ee8e52e505eed109cc6128f67' })), this.h.hasSlot('footer') && (index.h("div", { key: '8b7f85195264f4045c1d7ab8dd6db9f6abfe4f9f', class: DialogClass.footer }, index.h("slot", { key: '373cda2bd8b1cccf34acbbf859b4b8f608bc4a19', name: "footer" }))))), this.open ? (index.h("gov-backdrop", { disabled: this.blockBackdropClose, "aria-label": this.accessibleCloseLabel, "aria-labelled-by": this.accessibleCloseLabelledBy, "on-gov-click": this.onCloseHandler.bind(this) })) : null));
75
75
  }
76
76
  onCloseHandler(e) {
77
77
  e.stopPropagation();
@@ -1 +1 @@
1
- {"file":"gov-dialog.entry.cjs.js","mappings":";;;;;;;;;;;;;AAAO,MAAM,WAAW,GAAG;IAC1B,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,oBAAoB;IAC5B,KAAK,EAAE,mBAAmB;IAC1B,MAAM,EAAE,oBAAoB;IAC5B,KAAK,EAAE,mBAAmB;IAC1B,OAAO,EAAE,qBAAqB;IAC9B,KAAK,EAAE,mBAAmB;IAC1B,MAAM,EAAE,oBAAoB;IAC5B,OAAO,EAAE,YAAY;CACrB;;MCGY,SAAS;IAOrB;;;QAHQ,aAAQ,GAAG,KAAK,CAAC;oBAcoB,KAAK;0BAIH,KAAK;kCAIY,KAAK;oBAIjB,QAAQ;wBAIA,IAAI;;;oCAYqB,aAAa;;QAtCjG,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,OAAO,GAAGC,qBAAQ,CAAC,gBAAgB,CAAC,CAAA;QACzC,IAAI,CAAC,SAAS,GAAGA,qBAAQ,CAAC,kBAAkB,CAAC,CAAA;KAC7C;IA8CD,SAAS,CAAC,QAAiB;QAC1B,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;QACpB,IAAI,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAA;KACzB;IAEO,UAAU;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;KAChD;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AAE;YAC9B,IAAI,CAAC,UAAU,EAAE,CAAA;YACjB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;SACrB;KACD;;;;IAMD,MAAM,QAAQ;QACb,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE;YAClC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAA;SACnC;KACD;;;;IAOD,MAAM,qBAAqB;QAC1BI,oBAAe,CAAC,IAAI,CAAC,oBAAoB,EAAE,wBAAwB,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;QACtFA,oBAAe,CAAC,IAAI,CAAC,qBAAqB,EAAE,yBAAyB,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;KACxF;;;;;;;;;","names":["govHost","createID","canValidateWcagOnRender","tick","h","Host","boolToFocusValue","toBoolAttr","validateWcagRef"],"sources":["../../../packages/core/src/components/gov-dialog/constants.ts","../../../packages/core/src/components/gov-dialog/gov-dialog.tsx"],"sourcesContent":["export const DialogClass = {\n\troot: 'gov-dialog',\n\tdialog: 'gov-dialog__dialog',\n\tinner: 'gov-dialog__inner',\n\theader: 'gov-dialog__header',\n\ttitle: 'gov-dialog__title',\n\tcontent: 'gov-dialog__content',\n\tclose: 'gov-dialog__close',\n\tfooter: 'gov-dialog__footer',\n\tbodyFix: 'body-fixed',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch} from '@stencil/core'\nimport {boolToFocusValue, govHost, toBoolAttr} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {validateWcagRef} from '../../helpers/Validate/wcag'\nimport {Nullable} from '../../types/interfaces'\nimport {createID} from '../../utils/string.utils'\nimport {DialogClass} from './constants'\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-dialog',\n})\nexport class GovDialog {\n\tprivate h: GovHost\n\tprivate readonly labelId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false;\n\tprivate closeCtaRef?: HTMLGovButtonElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.labelId = createID('GovDialogLabel')\n\t\tthis.contentId = createID('GovDialogContent')\n\t}\n\n\t@Element() host: HTMLGovDialogElement\n\n\t/**\n\t * Attribute for dialog window display\n\t */\n\t@Prop({mutable: true, reflect: true}) open = false\n\t/**\n\t * Attribute allowing blocking the dialog closing\n\t */\n\t@Prop({attribute: 'block-close'}) blockClose = false\n\t/**\n\t * Attribute allowing blocking the backdrop dialog closing\n\t */\n\t@Prop({attribute: 'block-backdrop-close'}) blockBackdropClose = false\n\t/**\n\t * Role of dialog\n\t */\n\t@Prop({attribute: 'role'}) role: Nullable<string> = 'dialog'\n\t/**\n\t * Used to change the HTML tag in the dialog label for correct semantic structure\n\t */\n\t@Prop({attribute: 'label-tag'}) readonly labelTag: string = 'h2'\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({attribute: 'accessible-labelled-by'}) accessibleLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the dialog.\n\t */\n\t@Prop({attribute: 'accessible-described-by'}) accessibleDescribedBy: string\n\t/**\n\t * Adds accessible label for the dialog close button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-close-label'}) readonly accessibleCloseLabel: string = 'Zavřít okno'\n\t/**\n\t * A string of identifiers that indicate alternative label elements for closing the dialog window\n\t */\n\t@Prop({attribute: 'accessible-close-labelled-by'}) accessibleCloseLabelledBy: string\n\t/**\n\t * Emitted when dialog window closes.\n\t */\n\t@Event({eventName: 'gov-close'}) govClose: EventEmitter<PointerEvent>\n\n\t@Watch('open')\n\twatchOpen(newValue: boolean): void {\n\t\tthis.open = newValue\n\t\tthis.setFocus().finally()\n\t}\n\n\tprivate showDialog() {\n\t\tthis.open = true\n\t\tdocument.body.classList.add(DialogClass.bodyFix)\n\t}\n\n\tprivate hideDialog() {\n\t\tthis.open = false\n\t\tdocument.body.classList.remove(DialogClass.bodyFix)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\ttick(() => this.validateAccessibility())\n\t\t}\n\n\t\tif (this.open) {\n\t\t\tthis.showDialog()\n\t\t} else {\n\t\t\tthis.hideDialog()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tdocument.body.classList.remove(DialogClass.bodyFix)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(DialogClass.root)} open={this.open} hydrated={this.hydrated}>\n\t\t\t\t<dialog\n\t\t\t\t\tclass={DialogClass.dialog}\n\t\t\t\t\thidden={!this.open}\n\t\t\t\t\ttabindex={boolToFocusValue(this.open)}\n\t\t\t\t\topen={this.open}\n\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\taria-hidden={toBoolAttr(!this.open)}\n\t\t\t\t\taria-labelledby={this.accessibleLabelledBy || this.labelId}\n\t\t\t\t\taria-describedby={this.accessibleDescribedBy || this.contentId}\n\t\t\t\t\trole={this.role}\n\t\t\t\t>\n\t\t\t\t\t<div class={DialogClass.inner}>\n\t\t\t\t\t\t<div class={DialogClass.header}>\n\t\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t\t\t{this.h.hasSlot('title') && (\n\t\t\t\t\t\t\t\t<span class={DialogClass.title} id={this.labelId}>\n\t\t\t\t\t\t\t\t\t<slot name=\"title\"/>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\tref={el => (this.closeCtaRef = el)}\n\t\t\t\t\t\t\t\tdisabled={this.blockClose}\n\t\t\t\t\t\t\t\tclass={DialogClass.close}\n\t\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t\taria-label={this.accessibleCloseLabel}\n\t\t\t\t\t\t\t\taria-labelledby={this.accessibleCloseLabelledBy}\n\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<gov-icon slot=\"icon-start\" name=\"x-lg\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={DialogClass.content} id={this.contentId}>\n\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{this.h.hasSlot('footer') && (\n\t\t\t\t\t\t\t<div class={DialogClass.footer}>\n\t\t\t\t\t\t\t\t<slot name=\"footer\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</dialog>\n\n\t\t\t\t{this.open ? (\n\t\t\t\t\t<gov-backdrop\n\t\t\t\t\t\tdisabled={this.blockBackdropClose}\n\t\t\t\t\t\taria-label={this.accessibleCloseLabel}\n\t\t\t\t\t\taria-labelled-by={this.accessibleCloseLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t\te.preventDefault()\n\t\tif (this.blockClose === false) {\n\t\t\tthis.hideDialog()\n\t\t\tthis.govClose.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Sets the close button to focus\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tif (this.open && this.closeCtaRef) {\n\t\t\tthis.closeCtaRef.setFocus().catch()\n\t\t}\n\t}\n\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateWcagRef(this.accessibleLabelledBy, 'accessible-labelled-by', DialogClass.root)\n\t\tvalidate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ACD;;;;IAMD,MAAM,QAAQ;QACb,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE;YAClC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAA;SACnC;KACD;;;;IAOD,MAAM,qBAAqB;QAC1BI,oBAAe,CAAC,IAAI,CAAC,oBAAoB,EAAE,wBAAwB,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;QACtFA,oBAAe,CAAC,IAAI,CAAC,qBAAqB,EAAE,yBAAyB,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;KACxF;;;;;;;;;","names":["govHost","createID","canValidateWcagOnRender","tick","h","Host","boolToFocusValue","toBoolAttr","validateWcagRef"],"sources":["../../../packages/core/src/components/gov-dialog/constants.ts","../../../packages/core/src/components/gov-dialog/gov-dialog.tsx"],"sourcesContent":["export const DialogClass = {\n\troot: 'gov-dialog',\n\tdialog: 'gov-dialog__dialog',\n\tinner: 'gov-dialog__inner',\n\theader: 'gov-dialog__header',\n\ttitle: 'gov-dialog__title',\n\tcontent: 'gov-dialog__content',\n\tclose: 'gov-dialog__close',\n\tfooter: 'gov-dialog__footer',\n\tbodyFix: 'body-fixed',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch} from '@stencil/core'\nimport {boolToFocusValue, govHost, toBoolAttr} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {validateWcagRef} from '../../helpers/Validate/wcag'\nimport {Nullable} from '../../types/interfaces'\nimport {createID} from '../../utils/string.utils'\nimport {DialogClass} from './constants'\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-dialog',\n})\nexport class GovDialog {\n\tprivate h: GovHost\n\tprivate readonly labelId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false;\n\tprivate closeCtaRef?: HTMLGovButtonElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.labelId = createID('GovDialogLabel')\n\t\tthis.contentId = createID('GovDialogContent')\n\t}\n\n\t@Element() host: HTMLGovDialogElement\n\n\t/**\n\t * Attribute for dialog window display\n\t */\n\t@Prop({mutable: true, reflect: true}) open = false\n\t/**\n\t * Attribute allowing blocking the dialog closing\n\t */\n\t@Prop({attribute: 'block-close'}) blockClose = false\n\t/**\n\t * Attribute allowing blocking the backdrop dialog closing\n\t */\n\t@Prop({attribute: 'block-backdrop-close'}) blockBackdropClose = false\n\t/**\n\t * Role of dialog\n\t */\n\t@Prop({attribute: 'role'}) role: Nullable<string> = 'dialog'\n\t/**\n\t * Used to change the HTML tag in the dialog label for correct semantic structure\n\t */\n\t@Prop({attribute: 'label-tag'}) readonly labelTag: string = 'h2'\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({attribute: 'accessible-labelled-by'}) accessibleLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the dialog.\n\t */\n\t@Prop({attribute: 'accessible-described-by'}) accessibleDescribedBy: string\n\t/**\n\t * Adds accessible label for the dialog close button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-close-label'}) readonly accessibleCloseLabel: string = 'Zavřít okno'\n\t/**\n\t * A string of identifiers that indicate alternative label elements for closing the dialog window\n\t */\n\t@Prop({attribute: 'accessible-close-labelled-by'}) accessibleCloseLabelledBy: string\n\t/**\n\t * Emitted when dialog window closes.\n\t */\n\t@Event({eventName: 'gov-close'}) govClose: EventEmitter<PointerEvent>\n\n\t@Watch('open')\n\twatchOpen(newValue: boolean): void {\n\t\tthis.open = newValue\n\t\tthis.setFocus().finally()\n\t}\n\n\tprivate showDialog() {\n\t\tthis.open = true\n\t\tdocument.body.classList.add(DialogClass.bodyFix)\n\t}\n\n\tprivate hideDialog() {\n\t\tthis.open = false\n\t\tdocument.body.classList.remove(DialogClass.bodyFix)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\ttick(() => this.validateAccessibility())\n\t\t}\n\n\t\tif (this.open) {\n\t\t\tthis.showDialog()\n\t\t} else {\n\t\t\tthis.hideDialog()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tdocument.body.classList.remove(DialogClass.bodyFix)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(DialogClass.root)} open={this.open} hydrated={this.hydrated}>\n\t\t\t\t<dialog\n\t\t\t\t\tclass={DialogClass.dialog}\n\t\t\t\t\thidden={!this.open}\n\t\t\t\t\ttabindex={boolToFocusValue(this.open)}\n\t\t\t\t\topen={this.open}\n\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\taria-hidden={toBoolAttr(!this.open)}\n\t\t\t\t\taria-labelledby={this.accessibleLabelledBy || this.labelId}\n\t\t\t\t\taria-describedby={this.accessibleDescribedBy || this.contentId}\n\t\t\t\t\trole={this.role}\n\t\t\t\t>\n\t\t\t\t\t<div class={DialogClass.inner}>\n\t\t\t\t\t\t<div class={DialogClass.header}>\n\t\t\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{this.h.hasSlot('title') && (\n\t\t\t\t\t\t\t\t<span class={DialogClass.title} id={this.labelId}>\n\t\t\t\t\t\t\t\t\t<slot name=\"title\"/>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\tref={el => (this.closeCtaRef = el)}\n\t\t\t\t\t\t\t\tdisabled={this.blockClose}\n\t\t\t\t\t\t\t\tclass={DialogClass.close}\n\t\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t\taria-label={this.accessibleCloseLabel}\n\t\t\t\t\t\t\t\taria-labelledby={this.accessibleCloseLabelledBy}\n\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\tsize=\"m\"\n\t\t\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<gov-icon slot=\"icon-start\" name=\"x-lg\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={DialogClass.content} id={this.contentId}>\n\t\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{this.h.hasSlot('footer') && (\n\t\t\t\t\t\t\t<div class={DialogClass.footer}>\n\t\t\t\t\t\t\t\t<slot name=\"footer\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</dialog>\n\n\t\t\t\t{this.open ? (\n\t\t\t\t\t<gov-backdrop\n\t\t\t\t\t\tdisabled={this.blockBackdropClose}\n\t\t\t\t\t\taria-label={this.accessibleCloseLabel}\n\t\t\t\t\t\taria-labelled-by={this.accessibleCloseLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t\te.preventDefault()\n\t\tif (this.blockClose === false) {\n\t\t\tthis.hideDialog()\n\t\t\tthis.govClose.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Sets the close button to focus\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tif (this.open && this.closeCtaRef) {\n\t\t\tthis.closeCtaRef.setFocus().catch()\n\t\t}\n\t}\n\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateWcagRef(this.accessibleLabelledBy, 'accessible-labelled-by', DialogClass.root)\n\t\tvalidateWcagRef(this.accessibleDescribedBy, 'accessible-described-by', DialogClass.root)\n\t}\n}\n"],"version":3}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-67e87c27.js');
5
+ const index = require('./index-0e4f24f9.js');
6
6
  const template = require('./template-39939fd6.js');
7
7
  const string_utils = require('./string.utils-b84c81cf.js');
8
8
  const constants = require('./constants-f464dc4c.js');
@@ -117,7 +117,7 @@ const GovDropdown = class {
117
117
  });
118
118
  }
119
119
  render() {
120
- return (index.h(index.Host, { key: '43c2a03dcb27ebe54f8dd00ca1120b848cac957c', class: this.h.classes([DropdownClass.root]), open: this.open, position: this.position }, index.h("slot", { key: '732c956fe37283578a95c843cf94ad590cd16402' }), index.h("div", { key: 'c3934a0f7c8303950a5c7898574fcea2e14e1890', ref: el => registerClickOutside(this, el, () => this.open = false), class: DropdownClass.list, id: this.listId, "aria-labelledby": this.controlId, "aria-hidden": template.toBoolAttr(!this.open), hidden: !this.open }, index.h("slot", { key: 'cb685039c57f9d32ae7c238fcb7457fe72b4c9c4', name: "list" }))));
120
+ return (index.h(index.Host, { key: '82ddf678be9e128e899f136598d923a9c62858b4', class: this.h.classes([DropdownClass.root]), open: this.open, position: this.position }, index.h("slot", { key: '5de32c9654140fb67fff7f55ce8fba4fa7ef282f' }), index.h("div", { key: '19bda970452623c7ddef45ff96b843698bb8cd1a', ref: el => registerClickOutside(this, el, () => this.open = false), class: DropdownClass.list, id: this.listId, "aria-labelledby": this.controlId, "aria-hidden": template.toBoolAttr(!this.open), hidden: !this.open }, index.h("slot", { key: 'd1429110f4e4bd054bf38d4a038946475d791323', name: "list" }))));
121
121
  }
122
122
  /**
123
123
  * Returns the current state of the dropdown
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-67e87c27.js');
5
+ const index = require('./index-0e4f24f9.js');
6
6
  const utils = require('./utils-d263c5c6.js');
7
7
  const sizes = require('./sizes-89f8d3b2.js');
8
8
  const template = require('./template-39939fd6.js');
@@ -29,7 +29,7 @@ const GovEmpty = class {
29
29
  this.validateSize(this.size);
30
30
  }
31
31
  render() {
32
- return (index.h(index.Host, { key: '3346bc91e4af67ca885ec89364d3caed0553f87c', class: this.h.classes(EmptyClass.root), size: this.size }, this.h.hasSlot('icon') && (index.h("slot", { key: '6ae5bf19e792bc94fedaa9fe3a56cafa103356f4', name: "icon" })), index.h("div", { key: '3cb5595ef6de22c590844902d5fe59a2066b0bf7', class: EmptyClass.content }, index.h("slot", { key: 'dedf42aac4d7a4304a0eeeae7e5a7e1be8e4aac5', name: "headline" }), index.h("slot", { key: '0d061d5b70d90c3bf6446ff78618e6506446bde2' }))));
32
+ return (index.h(index.Host, { key: '536c14b44e86e71ded94980cce96cfcef26c13d5', class: this.h.classes(EmptyClass.root), size: this.size }, this.h.hasSlot('icon') && (index.h("slot", { key: '11e8a26c901809dc67cc2db2ff1aff47257a8014', name: "icon" })), index.h("div", { key: '4aac9fffa417df01fb668dab89aa19ed29469cc0', class: EmptyClass.content }, index.h("slot", { key: '1b663ce7931eaf8cccd00342e0f1f9fec7abe2d3', name: "headline" }), index.h("slot", { key: 'f1b1ad8a80fe12d01008da1efd335e14cee0a16d' }))));
33
33
  }
34
34
  get host() { return index.getElement(this); }
35
35
  static get watchers() { return {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-67e87c27.js');
5
+ const index = require('./index-0e4f24f9.js');
6
6
  const template = require('./template-39939fd6.js');
7
7
 
8
8
  const ErrorCodeClass = {
@@ -16,7 +16,7 @@ const GovErrorCode = class {
16
16
  this.h = template.govHost(this.host);
17
17
  }
18
18
  render() {
19
- return (index.h(index.Host, { key: 'c47e051194598ee060955a36959d11340b66dadc', class: this.h.classes(ErrorCodeClass.root), align: "center" }, this.h.hasSlot('icon') && (index.h("slot", { key: '510cdd27231b580403e76154d263af37877bd7b3', name: "icon" })), index.h("div", { key: '1b65726c29093652b1f2b6470669cedb5b951c7b', class: ErrorCodeClass.content }, index.h("slot", { key: 'd5fb45bfdfd4cc096e9f4ed213f0b50baaf225e6', name: "headline" }), index.h("slot", { key: '1950c6c8b034319c3d499b3470b4a2e0e1c7855a' }))));
19
+ return (index.h(index.Host, { key: '3355f2c43f55001d6b12bae918220f858721279b', class: this.h.classes(ErrorCodeClass.root), align: "center" }, this.h.hasSlot('icon') && (index.h("slot", { key: '721e74886d890b048bc268cadf9fb05979234ad6', name: "icon" })), index.h("div", { key: '9a1e0ce9d1aa43eacd4967a2688123fcd9164d8f', class: ErrorCodeClass.content }, index.h("slot", { key: '5193304f9720b28d12176e805436e7ebbee2f704', name: "headline" }), index.h("slot", { key: '12d538e92472745e3613149a7c824e6cd345e776' }))));
20
20
  }
21
21
  get host() { return index.getElement(this); }
22
22
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-67e87c27.js');
5
+ const index = require('./index-0e4f24f9.js');
6
6
  const sizes = require('./sizes-89f8d3b2.js');
7
7
  const template = require('./template-39939fd6.js');
8
8
  const utils = require('./utils-d263c5c6.js');
@@ -24,10 +24,11 @@ const GovFlex = class {
24
24
  this.alignContent = undefined;
25
25
  this.alignSelf = undefined;
26
26
  this.gap = undefined;
27
+ this.responsive = "true";
27
28
  this.h = template.govHost(this.host);
28
29
  }
29
30
  render() {
30
- return (index.h(index.Host, { key: '08c1591134f0b5c95a18ac9e1d3723c12d9bc47b', class: this.h.classes(FlexClass.root) }, index.h("slot", { key: 'b66fb8ffa35b0fb98eed3440a55a92a1bd97eb76' })));
31
+ return (index.h(index.Host, { key: '082daf61e75a8b30f7faa2cbd6a44ad8a74b0442', class: this.h.classes(FlexClass.root) }, index.h("slot", { key: '120882be8540480b11df18d006414dabbb00e1d0' })));
31
32
  }
32
33
  get host() { return index.getElement(this); }
33
34
  };
@@ -56,7 +57,7 @@ const IconClass = {
56
57
  holder: 'gov-icon__holder',
57
58
  };
58
59
 
59
- const version = "4.1.3-BETA-9";
60
+ const version = "4.2.0";
60
61
 
61
62
  const dsVersion = () => {
62
63
  return version;
@@ -69,20 +70,14 @@ const iconUrl = (path, name, type) => {
69
70
  if (isExternalUrl(path)) {
70
71
  return `${path}/${type}/${name}.svg?v=${dsVersion()}`;
71
72
  }
72
- return index.getAssetPath(`${path}/${type}/${name}.svg`) + `?v=${dsVersion()}`;
73
+ return `${path}/${type}/${name}.svg` + `?v=${dsVersion()}`;
73
74
  };
74
75
  async function fetchIcon({ name, type }) {
75
76
  const cacheKey = type + "-" + name;
76
- console.log('cacheKey', cacheKey);
77
- console.log('iconCache[cacheKey]', iconCache, iconCache[cacheKey]);
78
77
  if (iconCache[cacheKey]) {
79
78
  return iconCache[cacheKey];
80
79
  }
81
- console.log('requestCache[cacheKey]', requestCache, requestCache[cacheKey]);
82
80
  if (!requestCache[cacheKey]) {
83
- console.log('iconsPath()', gov_log.iconsPath());
84
- console.log('name, type', name, type);
85
- console.log('iconUrl(iconsPath(), name, type)', iconUrl(gov_log.iconsPath(), name, type));
86
81
  requestCache[cacheKey] = fetch(iconUrl(gov_log.iconsPath(), name, type)).then(resp => {
87
82
  if (resp.status === 200) {
88
83
  return resp.text();
@@ -151,7 +146,6 @@ const GovIcon = class {
151
146
  this.type = "components";
152
147
  this.visible = false;
153
148
  this.error = false;
154
- console.log('GovIcon');
155
149
  this.h = template.govHost(this.host);
156
150
  }
157
151
  validateSize(newValue) {
@@ -160,22 +154,14 @@ const GovIcon = class {
160
154
  validateColor(newValue) {
161
155
  props.validateProp(IconColors, newValue, IconClass.root);
162
156
  }
163
- watchError(newValue) {
164
- console.log('error', newValue);
165
- }
166
157
  async loadIconPathData() {
167
158
  const { name, visible } = this;
168
- console.log('name, visible', name, visible);
169
- console.log('Build.isBrowser', index.Build.isBrowser);
170
159
  if (!name || !visible) {
171
- console.log('return');
172
160
  return;
173
161
  }
174
162
  await this.loadIcon();
175
163
  }
176
164
  connectedCallback() {
177
- console.log('connectedCallback icon', this.name);
178
- console.log('iconsLazyLoad()', gov_log.iconsLazyLoad());
179
165
  if (gov_log.iconsLazyLoad()) {
180
166
  this.visible = true;
181
167
  this.loadIconPathData().finally();
@@ -188,14 +174,12 @@ const GovIcon = class {
188
174
  }
189
175
  }
190
176
  disconnectedCallback() {
191
- console.log('disconnectedCallback');
192
177
  if (this.intersectionObserver) {
193
178
  this.intersectionObserver.disconnect();
194
179
  this.intersectionObserver = null;
195
180
  }
196
181
  }
197
182
  async componentWillLoad() {
198
- console.log('componentWillLoad');
199
183
  this.validateSize(this.size);
200
184
  this.validateColor(this.color);
201
185
  await this.loadIconPathData();
@@ -221,14 +205,11 @@ const GovIcon = class {
221
205
  async loadIcon() {
222
206
  try {
223
207
  const { name, type } = this;
224
- console.log('loadIcon -> name, type', name, type);
225
208
  const data = await fetchIcon({ name, type });
226
209
  const isValid = isValidSVG(data);
227
210
  this.host.innerHTML = isValid ? data : null;
228
211
  }
229
212
  catch (e) {
230
- console.log(e);
231
- console.log(JSON.stringify(e));
232
213
  this.host.innerHTML = '';
233
214
  this.error = true;
234
215
  }
@@ -244,7 +225,6 @@ const GovIcon = class {
244
225
  static get watchers() { return {
245
226
  "size": ["validateSize"],
246
227
  "color": ["validateColor"],
247
- "error": ["watchError"],
248
228
  "name": ["loadIconPathData"]
249
229
  }; }
250
230
  };
@@ -253,6 +233,7 @@ const ThemeSwitchSizes = utils.pick(sizes.Sizes, ['_XS', '_S', '_M', '_L', '_XL'
253
233
  const ThemeSwitchClass = {
254
234
  root: 'gov-theme-switch',
255
235
  indicator: 'gov-theme-switch__indicator',
236
+ label: 'gov-theme-switch__label',
256
237
  iconLight: 'gov-theme-switch__icon-light',
257
238
  iconDark: 'gov-theme-switch__icon-dark',
258
239
  };
@@ -327,7 +308,7 @@ const GovThemeSwitch = class {
327
308
  if (this.theme === ThemeList.auto) {
328
309
  isDark = this.isSystemPrefersColorDark;
329
310
  }
330
- return (index.h(index.Host, { key: '784ed0513ea1436bb754dc82691646422789783b', class: this.h.classes(ThemeSwitchClass.root), theme: isDark ? ThemeList.dark : ThemeList.light, size: this.size }, index.h("button", { key: 'd4abc155a8ae8f07d0a49c378e295c3ab57318d4', onClick: () => this.setThemeState(isDark ? ThemeList.light : ThemeList.dark), "aria-current": this.theme, "aria-label": isDark ? this.ariaLabelDark : this.ariaLabelLight }, index.h("span", { key: '7f713875d5618acc919702cdc60e9db58dfb9db5' }, index.h("span", { key: '0b57c0153047ef292b6bdc43b49e5a1a9cdc17e1', class: ThemeSwitchClass.indicator }, ThemeList.light && index.h("gov-icon", { key: 'ae2c751435a2bc9c1e9f8dfa4ca52e13943ada9b', name: "sun", class: ThemeSwitchClass.iconLight, type: "components" }), ThemeList.dark && index.h("gov-icon", { key: '7a4ee602a37742ab94dcee47a7c4970d5dce5bb6', name: "moon", class: ThemeSwitchClass.iconDark, type: "components" })), this.displayLabel && (isDark ? this.labelDark : this.labelLight)))));
311
+ return (index.h(index.Host, { key: '7c9fc2abd555e5254c86ff58fe3e70be5a30b83c', class: this.h.classes(ThemeSwitchClass.root), theme: isDark ? ThemeList.dark : ThemeList.light, size: this.size }, index.h("button", { key: '1dc6ac1588fc2f2b48089400953c44e04d59e213', onClick: () => this.setThemeState(isDark ? ThemeList.light : ThemeList.dark), "aria-current": this.theme, "aria-label": isDark ? this.ariaLabelDark : this.ariaLabelLight }, index.h("span", { key: '59e19f4450ea2043edf7c037538bab5a0d605569' }, index.h("span", { key: '34640deb4ff3215653f47d54b59ae6763a793333', class: ThemeSwitchClass.indicator }, ThemeList.light && index.h("gov-icon", { key: 'e1583fe54eae0ab7eeb2eb4919b5dd144bb43aa3', name: "sun", class: ThemeSwitchClass.iconLight, type: "components" }), ThemeList.dark && index.h("gov-icon", { key: 'cb63ce2aa41321bcb7c59d0c02f47f62b80fd104', name: "moon", class: ThemeSwitchClass.iconDark, type: "components" })), this.displayLabel ? (index.h("span", { class: ThemeSwitchClass.label }, isDark ? this.labelDark : this.labelLight)) : null))));
331
312
  }
332
313
  get host() { return index.getElement(this); }
333
314
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"gov-flex.gov-icon.gov-theme-switch.entry.cjs.js","mappings":";;;;;;;;;;;;AAMO,MAAM,SAAS,GAAG;IACxB,IAAI,EAAE,UAAU;CAChB;;MCAY,OAAO;IAGnB;;yBASyE,KAAK;;;;;;;QAR7E,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAsDD,MAAM;QACL,QACCC,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAC1CD,oEAAa,CACP,EACP;KACD;;;;ACpEuBE,UAAI,CAACC,WAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAC;AAG/F,MAAM,UAAU,GAAGD,UAAI,CAACE,aAAM,EAAE;IACtC,SAAS;IACT,SAAS;IACT,WAAW;IACX,SAAS;IACT,OAAO;IACP,SAAS;IACT,SAAS;IACT,UAAU;IACV,OAAO;IACP,OAAO;CACP,CAAC,CAAA;AAGF,IAAK,KAIJ;AAJD,WAAK,KAAK;IACT,wBAAe,CAAA;IACf,4BAAmB,CAAA;IACnB,4BAAmB,CAAA;AACpB,CAAC,EAJI,KAAK,KAAL,KAAK,QAIT;AAGM,MAAM,SAAS,GAAG;IACxB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,kBAAkB;CAC1B;;;;AC9BM,MAAM,SAAS,GAAG;IACxB,OAAO,OAAO,CAAA;AACf,CAAC;;ACAD,MAAM,SAAS,GAA8B,EAAE,CAAA;AAC/C,MAAM,YAAY,GAAuC,EAAE,C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AAI,EAAC,YAAY,GAAY,CAClG,EACN,IAAI,CAAC,YAAY,KAAK,MAAM,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,CAC3D,CACC,CACH,EACP;KACD;;;;;;;;;;;;","names":["govHost","h","Host","pick","Sizes","Colors","getAssetPath","iconsPath","isWindow","validateProp","Build","iconsLazyLoad"],"sources":["../../../packages/core/src/components/gov-flex/constants.ts","../../../packages/core/src/components/gov-flex/gov-flex.tsx","../../../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/helpers/Dom/document.ts","../../../packages/core/src/components/gov-icon/gov-icon.tsx","../../../packages/core/src/components/gov-theme-switch/constants.ts","../../../packages/core/src/components/gov-theme-switch/gov-theme-switch.types.ts","../../../packages/core/src/components/gov-theme-switch/gov-theme-switch.tsx"],"sourcesContent":["import {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const FlexSizes = Sizes\nexport type FlexSizesType = `${ValueOf<typeof FlexSizes>}`\n\nexport const FlexClass = {\n\troot: 'gov-flex',\n}\n\n","import {Component, Element, h, Host, Prop} from '@stencil/core'\nimport {FlexClass, FlexSizesType} from './constants'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-flex',\n})\nexport class GovFlex {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovGridElement\n\n\t/**\n\t * Controls the flex direction of the container.\n\t */\n\t@Prop() direction: 'row' | 'row-reverse' | 'column' | 'column-reverse' = 'row';\n\n\t/**\n\t * Defines how the browser distributes space between and around content items along the main axis.\n\t */\n\t@Prop({\n\t\tattribute: 'justify-content',\n\t\treflect: true\n\t}) justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';\n\n\t/**\n\t * Aligns flex items along the cross axis.\n\t */\n\t@Prop({\n\t\tattribute: 'align-items',\n\t\treflect: true\n\t}) alignItems?: 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'baseline';\n\n\t/**\n\t * Controls whether the flex container is a single-line or multi-line flex container.\n\t */\n\t@Prop({reflect: true}) wrap?: 'nowrap' | 'wrap' | 'wrap-reverse';\n\n\t/**\n\t * Aligns the flex container's lines within when there is extra space in the cross-axis.\n\t */\n\t@Prop({\n\t\tattribute: 'align-content',\n\t\treflect: true\n\t}) alignContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'stretch';\n\n\t/**\n\t * Sets the alignment of the flex container’s children along the flex container’s cross axis, overriding the `align-items` property for individual flex items.\n\t */\n\t@Prop({\n\t\tattribute: 'align-self',\n\t\treflect: true\n\t}) alignSelf?: 'auto' | 'normal' | 'self-start' | 'self-end' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch' | 'anchor-center';\n\n\t/**\n\t * The gap property creates consistent spacing between flex items in the container.\n\t */\n\t@Prop({\n\t\tattribute: 'gap',\n\t\treflect: true\n\t}) gap?: FlexSizesType;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FlexClass.root)}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n","import { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils';\nimport { Colors } from '../../core/constants/colors';\nimport {Sizes} from \"../../core/constants/sizes\";\n\nexport const IconSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL', '_2XL', '_3XL', '_4XL', '_5XL'])\nexport type IconSizesType = `${ValueOf<typeof IconSizes>}`\n\nexport const IconColors = pick(Colors, [\n\t'DEFAULT',\n\t'PRIMARY',\n\t'SECONDARY',\n\t'NEUTRAL',\n\t'ERROR',\n\t'SUCCESS',\n\t'WARNING',\n\t'DISABLED',\n\t'WHITE',\n\t'BLACK',\n])\nexport type IconColorType = `${ValueOf<typeof IconColors>}`\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\tconst cacheKey = type + \"-\" + name\n\tconsole.log('cacheKey', cacheKey);\n\tconsole.log('iconCache[cacheKey]', iconCache, iconCache[cacheKey]);\n\tif (iconCache[cacheKey]) {\n\t\treturn iconCache[cacheKey]\n\t}\n\tconsole.log('requestCache[cacheKey]', requestCache, requestCache[cacheKey]);\n\n\tif (!requestCache[cacheKey]) {\n\t\tconsole.log('iconsPath()', iconsPath());\n\t\tconsole.log('name, type', name, type);\n\t\tconsole.log('iconUrl(iconsPath(), name, type)', iconUrl(iconsPath(), name, type));\n\t\trequestCache[cacheKey] = 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[cacheKey]\n\ticonCache[cacheKey] = path\n\treturn path\n}\n","import {Nullable} from \"../../utils/helpers.types\";\nimport {isWindow} from \"./win\";\n\nexport const setCookie = (name: string, value: string, days?: number) => {\n\tif (!isWindow) {\n\t\treturn\n\t}\n\tlet expires = \"\";\n\tif (days) {\n\t\tconst date = new Date();\n\t\tdate.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\n\t\texpires = \"; expires=\" + date.toUTCString();\n\t}\n\tdocument.cookie = `${name}=${encodeURIComponent(value)}${expires}; path=/`;\n}\n\nexport const getCookie = (name: string): Nullable<string> => {\n\tif (!isWindow) {\n\t\treturn null\n\t}\n\tconst nameEQ = name + \"=\";\n\tconst cookies = document.cookie.split(';');\n\tfor (let i = 0; i < cookies.length; i++) {\n\t\tlet cookie = cookies[i].trim();\n\t\tif (cookie.startsWith(nameEQ)) {\n\t\t\treturn decodeURIComponent(cookie.substring(nameEQ.length));\n\t\t}\n\t}\n\treturn null;\n}\n\nexport const isValidSVG = (svgContent: string): boolean => {\n\ttry {\n\t\tconst parser = new DOMParser();\n\t\tconst doc = parser.parseFromString(svgContent, \"image/svg+xml\");\n\t\tconst parseError = doc.querySelector(\"parsererror\");\n\t\tif (parseError) {\n\t\t\treturn false;\n\t\t}\n\t\tconst svgElement = doc.documentElement;\n\t\tif (svgElement.tagName.toLowerCase() !== \"svg\") {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t} catch (error) {\n\t\treturn false;\n\t}\n}\n","import {Build, Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {IconClass, IconColors, type IconColorType, IconSizesType} from \"./constants\"\nimport {fetchIcon} from \"../../utils/icon.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {iconsLazyLoad} from \"../../helpers/Dom/win\"\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {isValidSVG} from \"../../helpers/Dom/document\";\n\n@Component({\n\tassetsDirs: [\"assets\"],\n\ttag: \"gov-icon\",\n})\nexport class GovIcon {\n\tprivate h: GovHost\n\tprivate intersectionObserver: IntersectionObserver\n\n\tconstructor() {\n\t\tconsole.log('GovIcon');\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovIconElement\n\t/**\n\t * Icon size\n\t */\n\t@Prop({reflect: true}) readonly size?: IconSizesType\n\t/**\n\t * Icon color\n\t */\n\t@Prop({reflect: true}) readonly color?: IconColorType\n\t/**\n\t * Name of icon in folder\n\t */\n\t@Prop({reflect: true}) name: string = null\n\t/**\n\t * Type (folder) of icon\n\t */\n\t@Prop({reflect: true}) type = \"components\"\n\n\t@State() private visible = false\n\t@State() private error = false\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(IconColors, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"error\")\n\twatchError(newValue: string): void {\n\t\tconsole.log('error', newValue);\n\t}\n\n\t@Watch(\"name\")\n\tprivate async loadIconPathData(): Promise<void> {\n\t\tconst {name, visible} = this\n\t\tconsole.log('name, visible', name, visible);\n\t\tconsole.log('Build.isBrowser', Build.isBrowser);\n\t\tif (!Build.isBrowser || !name || !visible) {\n\t\t\tconsole.log('return');\n\t\t\treturn\n\t\t}\n\t\tawait this.loadIcon()\n\t}\n\n\tconnectedCallback(): void {\n\t\tconsole.log('connectedCallback icon', this.name);\n\t\tconsole.log('iconsLazyLoad()', iconsLazyLoad());\n\t\tif (iconsLazyLoad()) {\n\t\t\tthis.visible = true\n\t\t\tthis.loadIconPathData().finally()\n\t\t} else {\n\t\t\tthis.waitUntilVisible(async () => {\n\t\t\t\tthis.visible = true\n\t\t\t\tawait this.loadIconPathData()\n\t\t\t})\n\t\t}\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tconsole.log('disconnectedCallback');\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\tconsole.log('componentWillLoad');\n\t\tthis.validateSize(this.size)\n\t\tthis.validateColor(this.color)\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\tif (this.intersectionObserver) {\n\t\t\t\t\t\t\tthis.intersectionObserver.disconnect()\n\t\t\t\t\t\t\tthis.intersectionObserver = null\n\t\t\t\t\t\t}\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\tprivate async loadIcon() {\n\t\ttry {\n\t\t\tconst {name, type} = this\n\t\t\tconsole.log('loadIcon -> name, type', name, type);\n\t\t\tconst data = await fetchIcon({name, type})\n\t\t\tconst isValid = isValidSVG(data)\n\t\t\tthis.host.innerHTML = isValid ? data : null;\n\t\t} catch (e) {\n\t\t\tconsole.log(e);\n\t\t\tconsole.log(JSON.stringify(e));\n\t\t\tthis.host.innerHTML = ''\n\t\t\tthis.error = true\n\t\t}\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)} size={this.size} color={this.color}/>\n\t\t)\n\t}\n}\n","import {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const ThemeSwitchSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL'])\nexport type ThemeSwitchSizesType = `${ValueOf<typeof ThemeSwitchSizes>}`\n\nexport const ThemeSwitchClass = {\n\troot: 'gov-theme-switch',\n\tindicator: 'gov-theme-switch__indicator',\n\ticonLight: 'gov-theme-switch__icon-light',\n\ticonDark: 'gov-theme-switch__icon-dark',\n}\n\nexport const ATTRIBUTE_THEME_NAME = 'data-theme'\n","import {GovBaseEvent} from \"../../types/event.types\";\n\nexport enum ThemeList {\n\tauto = 'auto',\n\tlight = 'light',\n\tdark = 'dark'\n}\n\nexport interface ThemeSwitchEvent extends GovBaseEvent {\n\tref: HTMLGovThemeSwitchElement;\n\tstate: ThemeList\n}\n\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {GovHost} from \"../../helpers/Dom/template.types\";\nimport {govHost} from \"../../helpers/Dom/template\";\nimport {ATTRIBUTE_THEME_NAME, ThemeSwitchClass, ThemeSwitchSizes, ThemeSwitchSizesType} from \"./constants\";\nimport {isWindow} from \"../../helpers/Dom/win\";\nimport {ThemeList, ThemeSwitchEvent} from \"./gov-theme-switch.types\";\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {getCookie, setCookie} from \"../../helpers/Dom/document\";\n\n@Component({\n\ttag: \"gov-theme-switch\",\n})\nexport class GovThemeSwitch {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovThemeSwitchElement\n\n\t/**\n\t * Switch's size.\n\t */\n\t@Prop() readonly size?: ThemeSwitchSizesType = \"m\"\n\t/**\n\t * Display switch label\n\t */\n\t@Prop({attribute: \"display-label\"}) readonly displayLabel? = false\n\t/**\n\t * Label in light mode\n\t */\n\t@Prop({attribute: \"aria-label-light\"}) readonly ariaLabelLight? = \"Přenout na tmavý mód\"\n\t/**\n\t * Label in dark mode\n\t */\n\t@Prop({attribute: \"aria-label-dark\"}) readonly ariaLabelDark? = \"Přepnout na světlý mód\"\n\t/**\n\t * Label in light mode\n\t */\n\t@Prop({attribute: \"label-light\"}) readonly labelLight? = \"Světlý mód\"\n\t/**\n\t * Label in dark mode\n\t */\n\t@Prop({attribute: \"label-dark\"}) readonly labelDark? = \"Tmavý mód\"\n\t/**\n\t * Called when the theme is changed by the user\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<ThemeSwitchEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ThemeSwitchSizes, newValue, ThemeSwitchClass.root)\n\t}\n\n\t@Watch(\"theme\")\n\twatchTheme(newValue: ThemeList): void {\n\t\tthis.htmlElement.setAttribute(ATTRIBUTE_THEME_NAME, newValue);\n\t\tthis.htmlElement.classList.remove(...Object.keys(ThemeList));\n\t\tthis.htmlElement.classList.add(newValue);\n\t\tsetCookie(ATTRIBUTE_THEME_NAME, newValue);\n\t}\n\n\t@State() theme: ThemeList = ThemeList.auto\n\n\tprivate get storageValue() {\n\t\treturn getCookie(ATTRIBUTE_THEME_NAME)\n\t}\n\n\tprivate get htmlElement(): HTMLElement {\n\t\treturn document.documentElement\n\t}\n\n\tprivate get isSystemPrefersColorDark(): boolean {\n\t\treturn isWindow && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.initDefaultState()\n\t\tthis.validateSize(this.size)\n\t}\n\n\tprivate initDefaultState() {\n\t\tconst options = Object.keys(ThemeList);\n\t\tlet currentState = this.storageValue;\n\t\tconst htmlState = this.htmlElement.getAttribute(ATTRIBUTE_THEME_NAME)\n\n\t\tif (currentState && options.includes(currentState)) {\n\t\t\tthis.theme = currentState as ThemeList;\n\t\t} else if (htmlState && options.includes(htmlState)) {\n\t\t\tthis.theme = htmlState as ThemeList;\n\t\t} else {\n\t\t\tthis.theme = ThemeList.auto;\n\t\t}\n\t}\n\n\tprivate setThemeState = (state: ThemeList) => {\n\t\tthis.theme = state;\n\n\t\tthis.govChange.emit({\n\t\t\tcomponent: ThemeSwitchClass.root,\n\t\t\tstate: this.theme,\n\t\t\tref: this.host\n\t\t})\n\t}\n\n\trender() {\n\t\tlet isDark = this.theme === ThemeList.dark;\n\t\tif (this.theme === ThemeList.auto) {\n\t\t\tisDark = this.isSystemPrefersColorDark;\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ThemeSwitchClass.root)}\n\t\t\t\t theme={isDark ? ThemeList.dark : ThemeList.light}\n\t\t\t\t size={this.size}>\n\t\t\t\t<button onClick={() => this.setThemeState(isDark ? ThemeList.light : ThemeList.dark)}\n\t\t\t\t\t\taria-current={this.theme}\n\t\t\t\t\t\taria-label={isDark ? this.ariaLabelDark : this.ariaLabelLight}>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<span class={ThemeSwitchClass.indicator}>\n\t\t\t\t\t\t\t{ThemeList.light && <gov-icon name=\"sun\" class={ThemeSwitchClass.iconLight} type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t{ThemeList.dark && <gov-icon name=\"moon\" class={ThemeSwitchClass.iconDark} type=\"components\"></gov-icon>}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t{this.displayLabel && (isDark ? this.labelDark : this.labelLight)}\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-flex.gov-icon.gov-theme-switch.entry.cjs.js","mappings":";;;;;;;;;;;;AAMO,MAAM,SAAS,GAAG;IACxB,IAAI,EAAE,UAAU;CAChB;;MCAY,OAAO;IAGnB;;yBASyF,KAAK;;;;;;;0BAkDzC,MAAM;QA1D1D,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IA2DD,MAAM;QACL,QACCC,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAC1CD,oEAAa,CACP,EACP;KACD;;;;ACzEuBE,UAAI,CAACC,WAAK,EAAE,CAAC,K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,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,KAAK,EAChD,IAAI,EAAE,IAAI,CAAC,IAAI,IACjBD,qEAAQ,OAAO,EAAE,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,kBACpE,IAAI,CAAC,KAAK,gBACZ,MAAM,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,IAC9DA,qEACCA,mEAAM,KAAK,EAAE,gBAAgB,CAAC,SAAS,IACrC,SAAS,CAAC,KAAK,IAAIA,uEAAU,IAAI,EAAC,KAAK,EAAC,KAAK,EAAE,gBAAgB,CAAC,SAAS,EAAE,IAAI,EAAC,YAAY,GAAY,EACxG,SAAS,CAAC,IAAI,IAAIA,uEAAU,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,gBAAgB,CAAC,QAAQ,EAAE,IAAI,EAAC,YAAY,GAAY,CAClG,EACN,IAAI,CAAC,YAAY,IACjBA,kBAAM,KAAK,EAAE,gBAAgB,CAAC,KAAK,IACjC,MAAM,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,CACpC,IACH,IAAI,CAEH,CACC,CACH,EACP;KACD;;;;;;;;;;;;","names":["govHost","h","Host","pick","Sizes","Colors","iconsPath","isWindow","validateProp","iconsLazyLoad"],"sources":["../../../packages/core/src/components/gov-flex/constants.ts","../../../packages/core/src/components/gov-flex/gov-flex.tsx","../../../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/helpers/Dom/document.ts","../../../packages/core/src/components/gov-icon/gov-icon.tsx","../../../packages/core/src/components/gov-theme-switch/constants.ts","../../../packages/core/src/components/gov-theme-switch/gov-theme-switch.types.ts","../../../packages/core/src/components/gov-theme-switch/gov-theme-switch.tsx"],"sourcesContent":["import {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const FlexSizes = Sizes\nexport type FlexSizesType = `${ValueOf<typeof FlexSizes>}`\n\nexport const FlexClass = {\n\troot: 'gov-flex',\n}\n\n","import {Component, Element, h, Host, Prop} from '@stencil/core'\nimport {FlexClass, FlexSizesType} from './constants'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-flex',\n})\nexport class GovFlex {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovGridElement\n\n\t/**\n\t * Controls the flex direction of the container.\n\t */\n\t@Prop({reflect: true}) direction?: 'row' | 'row-reverse' | 'column' | 'column-reverse' = 'row';\n\n\t/**\n\t * Defines how the browser distributes space between and around content items along the main axis.\n\t */\n\t@Prop({\n\t\tattribute: 'justify-content',\n\t\treflect: true\n\t}) justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';\n\n\t/**\n\t * Aligns flex items along the cross axis.\n\t */\n\t@Prop({\n\t\tattribute: 'align-items',\n\t\treflect: true\n\t}) alignItems?: 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'baseline';\n\n\t/**\n\t * Controls whether the flex container is a single-line or multi-line flex container.\n\t */\n\t@Prop({reflect: true}) wrap?: 'nowrap' | 'wrap' | 'wrap-reverse';\n\n\t/**\n\t * Aligns the flex container's lines within when there is extra space in the cross-axis.\n\t */\n\t@Prop({\n\t\tattribute: 'align-content',\n\t\treflect: true\n\t}) alignContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'stretch';\n\n\t/**\n\t * Sets the alignment of the flex container’s children along the flex container’s cross axis, overriding the `align-items` property for individual flex items.\n\t */\n\t@Prop({\n\t\tattribute: 'align-self',\n\t\treflect: true\n\t}) alignSelf?: 'auto' | 'normal' | 'self-start' | 'self-end' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch' | 'anchor-center';\n\n\t/**\n\t * The gap property creates consistent spacing between flex items in the container.\n\t */\n\t@Prop({\n\t\tattribute: 'gap',\n\t\treflect: true\n\t}) gap?: FlexSizesType;\n\n\t/**\n\t * Option to turn off responsive\n\t */\n\t@Prop({reflect: true}) readonly responsive: string = \"true\"\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FlexClass.root)}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n","import { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils';\nimport { Colors } from '../../core/constants/colors';\nimport {Sizes} from \"../../core/constants/sizes\";\n\nexport const IconSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL', '_2XL', '_3XL', '_4XL', '_5XL'])\nexport type IconSizesType = `${ValueOf<typeof IconSizes>}`\n\nexport const IconColors = pick(Colors, [\n\t'DEFAULT',\n\t'PRIMARY',\n\t'SECONDARY',\n\t'NEUTRAL',\n\t'ERROR',\n\t'SUCCESS',\n\t'WARNING',\n\t'DISABLED',\n\t'WHITE',\n\t'BLACK',\n])\nexport type IconColorType = `${ValueOf<typeof IconColors>}`\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 {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 if (isExternalUrl(path)) {\n return `${path}/${type}/${name}.svg?v=${dsVersion()}`\n }\n return `${path}/${type}/${name}.svg` + `?v=${dsVersion()}`\n}\n\nexport async function fetchIcon({name, type}: { name: string; type: string }): Promise<string> {\n const cacheKey = type + \"-\" + name\n if (iconCache[cacheKey]) {\n return iconCache[cacheKey]\n }\n\n if (!requestCache[cacheKey]) {\n requestCache[cacheKey] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {\n if (resp.status === 200) {\n return resp.text()\n } else {\n throw new Error(\"Gov Icon doesn't exists\")\n }\n })\n }\n const path = await requestCache[cacheKey]\n iconCache[cacheKey] = path\n return path\n}\n","import {Nullable} from \"../../utils/helpers.types\";\nimport {isWindow} from \"./win\";\n\nexport const setCookie = (name: string, value: string, days?: number) => {\n\tif (!isWindow) {\n\t\treturn\n\t}\n\tlet expires = \"\";\n\tif (days) {\n\t\tconst date = new Date();\n\t\tdate.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\n\t\texpires = \"; expires=\" + date.toUTCString();\n\t}\n\tdocument.cookie = `${name}=${encodeURIComponent(value)}${expires}; path=/`;\n}\n\nexport const getCookie = (name: string): Nullable<string> => {\n\tif (!isWindow) {\n\t\treturn null\n\t}\n\tconst nameEQ = name + \"=\";\n\tconst cookies = document.cookie.split(';');\n\tfor (let i = 0; i < cookies.length; i++) {\n\t\tlet cookie = cookies[i].trim();\n\t\tif (cookie.startsWith(nameEQ)) {\n\t\t\treturn decodeURIComponent(cookie.substring(nameEQ.length));\n\t\t}\n\t}\n\treturn null;\n}\n\nexport const isValidSVG = (svgContent: string): boolean => {\n\ttry {\n\t\tconst parser = new DOMParser();\n\t\tconst doc = parser.parseFromString(svgContent, \"image/svg+xml\");\n\t\tconst parseError = doc.querySelector(\"parsererror\");\n\t\tif (parseError) {\n\t\t\treturn false;\n\t\t}\n\t\tconst svgElement = doc.documentElement;\n\t\tif (svgElement.tagName.toLowerCase() !== \"svg\") {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t} catch (error) {\n\t\treturn false;\n\t}\n}\n","import {Build, Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {IconClass, IconColors, type IconColorType, IconSizesType} from \"./constants\"\nimport {fetchIcon} from \"../../utils/icon.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {iconsLazyLoad} from \"../../helpers/Dom/win\"\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {isValidSVG} from \"../../helpers/Dom/document\";\n\n@Component({\n\tassetsDirs: [\"assets\"],\n\ttag: \"gov-icon\",\n})\nexport class GovIcon {\n\tprivate h: GovHost\n\tprivate intersectionObserver: IntersectionObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovIconElement\n\t/**\n\t * Icon size\n\t */\n\t@Prop({reflect: true}) readonly size?: IconSizesType\n\t/**\n\t * Icon color\n\t */\n\t@Prop({reflect: true}) readonly color?: IconColorType\n\t/**\n\t * Name of icon in folder\n\t */\n\t@Prop({reflect: true}) name: string = null\n\t/**\n\t * Type (folder) of icon\n\t */\n\t@Prop({reflect: true}) type = \"components\"\n\n\t@State() private visible = false\n\t@State() private error = false\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(IconColors, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"name\")\n\tprivate async loadIconPathData(): Promise<void> {\n\t\tconst {name, visible} = this\n\t\tif (!Build.isBrowser || !name || !visible) {\n\t\t\treturn\n\t\t}\n\t\tawait this.loadIcon()\n\t}\n\n\tconnectedCallback(): void {\n\t\tif (iconsLazyLoad()) {\n\t\t\tthis.visible = true\n\t\t\tthis.loadIconPathData().finally()\n\t\t} else {\n\t\t\tthis.waitUntilVisible(async () => {\n\t\t\t\tthis.visible = true\n\t\t\t\tawait this.loadIconPathData()\n\t\t\t})\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\tthis.validateSize(this.size)\n\t\tthis.validateColor(this.color)\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\tif (this.intersectionObserver) {\n\t\t\t\t\t\t\tthis.intersectionObserver.disconnect()\n\t\t\t\t\t\t\tthis.intersectionObserver = null\n\t\t\t\t\t\t}\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\tprivate async loadIcon() {\n\t\ttry {\n\t\t\tconst {name, type} = this\n\t\t\tconst data = await fetchIcon({name, type})\n\t\t\tconst isValid = isValidSVG(data)\n\t\t\tthis.host.innerHTML = isValid ? data : null;\n\t\t} catch (e) {\n\t\t\tthis.host.innerHTML = ''\n\t\t\tthis.error = true\n\t\t}\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)} size={this.size} color={this.color}/>\n\t\t)\n\t}\n}\n","import {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {ValueOf} from \"../../types/interfaces\";\n\nexport const ThemeSwitchSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL'])\nexport type ThemeSwitchSizesType = `${ValueOf<typeof ThemeSwitchSizes>}`\n\nexport const ThemeSwitchClass = {\n\troot: 'gov-theme-switch',\n\tindicator: 'gov-theme-switch__indicator',\n\tlabel: 'gov-theme-switch__label',\n\ticonLight: 'gov-theme-switch__icon-light',\n\ticonDark: 'gov-theme-switch__icon-dark',\n}\n\nexport const ATTRIBUTE_THEME_NAME = 'data-theme'\n","import {GovBaseEvent} from \"../../types/event.types\";\n\nexport enum ThemeList {\n\tauto = 'auto',\n\tlight = 'light',\n\tdark = 'dark'\n}\n\nexport interface ThemeSwitchEvent extends GovBaseEvent {\n\tref: HTMLGovThemeSwitchElement;\n\tstate: ThemeList\n}\n\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {GovHost} from \"../../helpers/Dom/template.types\";\nimport {govHost} from \"../../helpers/Dom/template\";\nimport {ATTRIBUTE_THEME_NAME, ThemeSwitchClass, ThemeSwitchSizes, ThemeSwitchSizesType} from \"./constants\";\nimport {isWindow} from \"../../helpers/Dom/win\";\nimport {ThemeList, ThemeSwitchEvent} from \"./gov-theme-switch.types\";\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {getCookie, setCookie} from \"../../helpers/Dom/document\";\n\n@Component({\n\ttag: \"gov-theme-switch\",\n})\nexport class GovThemeSwitch {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovThemeSwitchElement\n\n\t/**\n\t * Switch's size.\n\t */\n\t@Prop() readonly size?: ThemeSwitchSizesType = \"m\"\n\t/**\n\t * Display switch label\n\t */\n\t@Prop({attribute: \"display-label\"}) readonly displayLabel? = false\n\t/**\n\t * Label in light mode\n\t */\n\t@Prop({attribute: \"aria-label-light\"}) readonly ariaLabelLight? = \"Přenout na tmavý mód\"\n\t/**\n\t * Label in dark mode\n\t */\n\t@Prop({attribute: \"aria-label-dark\"}) readonly ariaLabelDark? = \"Přepnout na světlý mód\"\n\t/**\n\t * Label in light mode\n\t */\n\t@Prop({attribute: \"label-light\"}) readonly labelLight? = \"Světlý mód\"\n\t/**\n\t * Label in dark mode\n\t */\n\t@Prop({attribute: \"label-dark\"}) readonly labelDark? = \"Tmavý mód\"\n\t/**\n\t * Called when the theme is changed by the user\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<ThemeSwitchEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ThemeSwitchSizes, newValue, ThemeSwitchClass.root)\n\t}\n\n\t@Watch(\"theme\")\n\twatchTheme(newValue: ThemeList): void {\n\t\tthis.htmlElement.setAttribute(ATTRIBUTE_THEME_NAME, newValue);\n\t\tthis.htmlElement.classList.remove(...Object.keys(ThemeList));\n\t\tthis.htmlElement.classList.add(newValue);\n\t\tsetCookie(ATTRIBUTE_THEME_NAME, newValue);\n\t}\n\n\t@State() theme: ThemeList = ThemeList.auto\n\n\tprivate get storageValue() {\n\t\treturn getCookie(ATTRIBUTE_THEME_NAME)\n\t}\n\n\tprivate get htmlElement(): HTMLElement {\n\t\treturn document.documentElement\n\t}\n\n\tprivate get isSystemPrefersColorDark(): boolean {\n\t\treturn isWindow && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.initDefaultState()\n\t\tthis.validateSize(this.size)\n\t}\n\n\tprivate initDefaultState() {\n\t\tconst options = Object.keys(ThemeList);\n\t\tlet currentState = this.storageValue;\n\t\tconst htmlState = this.htmlElement.getAttribute(ATTRIBUTE_THEME_NAME)\n\n\t\tif (currentState && options.includes(currentState)) {\n\t\t\tthis.theme = currentState as ThemeList;\n\t\t} else if (htmlState && options.includes(htmlState)) {\n\t\t\tthis.theme = htmlState as ThemeList;\n\t\t} else {\n\t\t\tthis.theme = ThemeList.auto;\n\t\t}\n\t}\n\n\tprivate setThemeState = (state: ThemeList) => {\n\t\tthis.theme = state;\n\n\t\tthis.govChange.emit({\n\t\t\tcomponent: ThemeSwitchClass.root,\n\t\t\tstate: this.theme,\n\t\t\tref: this.host\n\t\t})\n\t}\n\n\trender() {\n\t\tlet isDark = this.theme === ThemeList.dark;\n\t\tif (this.theme === ThemeList.auto) {\n\t\t\tisDark = this.isSystemPrefersColorDark;\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ThemeSwitchClass.root)}\n\t\t\t\t theme={isDark ? ThemeList.dark : ThemeList.light}\n\t\t\t\t size={this.size}>\n\t\t\t\t<button onClick={() => this.setThemeState(isDark ? ThemeList.light : ThemeList.dark)}\n\t\t\t\t\t\taria-current={this.theme}\n\t\t\t\t\t\taria-label={isDark ? this.ariaLabelDark : this.ariaLabelLight}>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<span class={ThemeSwitchClass.indicator}>\n\t\t\t\t\t\t\t{ThemeList.light && <gov-icon name=\"sun\" class={ThemeSwitchClass.iconLight} type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t{ThemeList.dark && <gov-icon name=\"moon\" class={ThemeSwitchClass.iconDark} type=\"components\"></gov-icon>}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t{this.displayLabel ? (\n\t\t\t\t\t\t\t<span class={ThemeSwitchClass.label}>\n\t\t\t\t\t\t\t\t{isDark ? this.labelDark : this.labelLight}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) : null\n\t\t\t\t\t\t}\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}