@gov-design-system-ce/components 4.1.0-rc04 → 4.1.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 (830) hide show
  1. package/dist/cjs/{colors-976f6dff.js → colors-f7c8eadd.js} +7 -9
  2. package/dist/cjs/colors-f7c8eadd.js.map +1 -0
  3. package/dist/cjs/{constants-e2807da6.js → constants-49f0efa6.js} +2 -2
  4. package/dist/cjs/{constants-e2807da6.js.map → constants-49f0efa6.js.map} +1 -1
  5. package/dist/cjs/{constants-43c0c51b.js → constants-4dfa23e3.js} +2 -2
  6. package/dist/cjs/{constants-43c0c51b.js.map → constants-4dfa23e3.js.map} +1 -1
  7. package/dist/cjs/{constants-441d1af4.js → constants-82929d01.js} +2 -2
  8. package/dist/cjs/{constants-441d1af4.js.map → constants-82929d01.js.map} +1 -1
  9. package/dist/cjs/{constants-bd0d66ac.js → constants-b9fece07.js} +2 -2
  10. package/dist/cjs/{constants-bd0d66ac.js.map → constants-b9fece07.js.map} +1 -1
  11. package/dist/cjs/{constants-5037cdc9.js → constants-c0886404.js} +2 -2
  12. package/dist/cjs/{constants-5037cdc9.js.map → constants-c0886404.js.map} +1 -1
  13. package/dist/cjs/{constants-861428a4.js → constants-f464dc4c.js} +2 -2
  14. package/dist/cjs/{constants-861428a4.js.map → constants-f464dc4c.js.map} +1 -1
  15. package/dist/cjs/core.cjs.js +1 -1
  16. package/dist/cjs/{form-c1aec07a.js → form-4e66039a.js} +4 -3
  17. package/dist/cjs/form-4e66039a.js.map +1 -0
  18. package/dist/cjs/gov-accordion-item.cjs.entry.js +4 -5
  19. package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
  20. package/dist/cjs/gov-accordion.cjs.entry.js +3 -4
  21. package/dist/cjs/gov-accordion.cjs.entry.js.map +1 -1
  22. package/dist/cjs/gov-attachments_3.cjs.entry.js +11 -12
  23. package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
  24. package/dist/cjs/gov-backdrop.cjs.entry.js +4 -5
  25. package/dist/cjs/gov-backdrop.cjs.entry.js.map +1 -1
  26. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +5 -6
  27. package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
  28. package/dist/cjs/gov-button.cjs.entry.js +10 -11
  29. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  30. package/dist/cjs/gov-card.cjs.entry.js +5 -6
  31. package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
  32. package/dist/cjs/gov-chip.cjs.entry.js +11 -12
  33. package/dist/cjs/gov-chip.cjs.entry.js.map +1 -1
  34. package/dist/cjs/gov-container.cjs.entry.js +2 -10
  35. package/dist/cjs/gov-container.cjs.entry.js.map +1 -1
  36. package/dist/cjs/gov-control-group.cjs.entry.js +4 -5
  37. package/dist/cjs/gov-control-group.cjs.entry.js.map +1 -1
  38. package/dist/cjs/gov-cookiebar.cjs.entry.js +1 -1
  39. package/dist/cjs/gov-dialog.cjs.entry.js +5 -6
  40. package/dist/cjs/gov-dialog.cjs.entry.js.map +1 -1
  41. package/dist/cjs/gov-dropdown.cjs.entry.js +3 -3
  42. package/dist/cjs/gov-empty.cjs.entry.js +3 -4
  43. package/dist/cjs/gov-empty.cjs.entry.js.map +1 -1
  44. package/dist/cjs/gov-error-code.cjs.entry.js +1 -1
  45. package/dist/cjs/gov-flex_4.cjs.entry.js +322 -0
  46. package/dist/cjs/gov-flex_4.cjs.entry.js.map +1 -0
  47. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +4 -6
  48. package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
  49. package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +5 -6
  50. package/dist/cjs/gov-form-checkbox-group.cjs.entry.js.map +1 -1
  51. package/dist/cjs/gov-form-checkbox.cjs.entry.js +7 -8
  52. package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
  53. package/dist/cjs/gov-form-control.cjs.entry.js +5 -5
  54. package/dist/cjs/gov-form-file.cjs.entry.js +5 -6
  55. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  56. package/dist/cjs/gov-form-group.cjs.entry.js +4 -5
  57. package/dist/cjs/gov-form-group.cjs.entry.js.map +1 -1
  58. package/dist/cjs/gov-form-input_2.cjs.entry.js +12 -11
  59. package/dist/cjs/gov-form-input_2.cjs.entry.js.map +1 -1
  60. package/dist/cjs/gov-form-multi-select.cjs.entry.js +9 -10
  61. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  62. package/dist/cjs/gov-form-password-power.cjs.entry.js +1 -1
  63. package/dist/cjs/gov-form-radio-group.cjs.entry.js +5 -6
  64. package/dist/cjs/gov-form-radio-group.cjs.entry.js.map +1 -1
  65. package/dist/cjs/gov-form-radio.cjs.entry.js +6 -7
  66. package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
  67. package/dist/cjs/gov-form-search.cjs.entry.js +2 -2
  68. package/dist/cjs/gov-form-select.cjs.entry.js +8 -9
  69. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  70. package/dist/cjs/gov-form-switch.cjs.entry.js +7 -8
  71. package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
  72. package/dist/cjs/gov-grid-item.cjs.entry.js +2 -2
  73. package/dist/cjs/gov-grid.cjs.entry.js +2 -2
  74. package/dist/cjs/gov-infobar.cjs.entry.js +6 -7
  75. package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -1
  76. package/dist/cjs/gov-layout-column.cjs.entry.js +2 -2
  77. package/dist/cjs/gov-layout.cjs.entry.js +2 -2
  78. package/dist/cjs/gov-lifecycle.cjs.entry.js +1 -1
  79. package/dist/cjs/gov-link.cjs.entry.js +51 -0
  80. package/dist/cjs/gov-link.cjs.entry.js.map +1 -0
  81. package/dist/cjs/gov-loading.cjs.entry.js +4 -5
  82. package/dist/cjs/gov-loading.cjs.entry.js.map +1 -1
  83. package/dist/cjs/gov-message.cjs.entry.js +5 -6
  84. package/dist/cjs/gov-message.cjs.entry.js.map +1 -1
  85. package/dist/cjs/gov-pagination.cjs.entry.js +5 -6
  86. package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
  87. package/dist/cjs/gov-spacer.cjs.entry.js +4 -5
  88. package/dist/cjs/gov-spacer.cjs.entry.js.map +1 -1
  89. package/dist/cjs/gov-stepper-item.cjs.entry.js +6 -7
  90. package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
  91. package/dist/cjs/gov-stepper.cjs.entry.js +6 -7
  92. package/dist/cjs/gov-stepper.cjs.entry.js.map +1 -1
  93. package/dist/cjs/gov-tabs-item.cjs.entry.js +4 -4
  94. package/dist/cjs/gov-tabs.cjs.entry.js +6 -7
  95. package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
  96. package/dist/cjs/gov-tag.cjs.entry.js +10 -11
  97. package/dist/cjs/gov-tag.cjs.entry.js.map +1 -1
  98. package/dist/cjs/gov-tile.cjs.entry.js +2 -2
  99. package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
  100. package/dist/cjs/gov-tiles.cjs.entry.js +2 -2
  101. package/dist/cjs/gov-toast.cjs.entry.js +6 -6
  102. package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
  103. package/dist/cjs/gov-tooltip-content.cjs.entry.js +4 -4
  104. package/dist/cjs/gov-tooltip-content.cjs.entry.js.map +1 -1
  105. package/dist/cjs/gov-tooltip.cjs.entry.js +10 -11
  106. package/dist/cjs/gov-tooltip.cjs.entry.js.map +1 -1
  107. package/dist/cjs/gov-wizard-item.cjs.entry.js +8 -9
  108. package/dist/cjs/gov-wizard-item.cjs.entry.js.map +1 -1
  109. package/dist/cjs/gov-wizard.cjs.entry.js +8 -9
  110. package/dist/cjs/gov-wizard.cjs.entry.js.map +1 -1
  111. package/dist/cjs/{win-587f4614.js → gov.log-bfea3151.js} +16 -4
  112. package/dist/cjs/gov.log-bfea3151.js.map +1 -0
  113. package/dist/cjs/index-7ff4447c.js +6 -14
  114. package/dist/cjs/loader.cjs.js +1 -1
  115. package/dist/cjs/{props-b8a955b2.js → props-d189860c.js} +2 -2
  116. package/dist/cjs/{props-b8a955b2.js.map → props-d189860c.js.map} +1 -1
  117. package/dist/cjs/{template-b070338f.js → template-39939fd6.js} +1 -20
  118. package/dist/cjs/template-39939fd6.js.map +1 -0
  119. package/dist/cjs/{wcag-b8d80c7d.js → wcag-2927ff73.js} +4 -5
  120. package/dist/cjs/wcag-2927ff73.js.map +1 -0
  121. package/dist/collection/collection-manifest.json +1 -0
  122. package/dist/collection/components/gov-accordion/gov-accordion-item.js +1 -1
  123. package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
  124. package/dist/collection/components/gov-attachments/gov-attachments-item.css +6 -35
  125. package/dist/collection/components/gov-attachments/gov-attachments-item.js +1 -1
  126. package/dist/collection/components/gov-attachments/gov-attachments-item.js.map +1 -1
  127. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +1 -1
  128. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js.map +1 -1
  129. package/dist/collection/components/gov-button/button/gov-button.js +9 -9
  130. package/dist/collection/components/gov-button/button/gov-button.js.map +1 -1
  131. package/dist/collection/components/gov-card/gov-card.js +1 -1
  132. package/dist/collection/components/gov-card/gov-card.js.map +1 -1
  133. package/dist/collection/components/gov-chip/gov-chip.js +16 -16
  134. package/dist/collection/components/gov-chip/gov-chip.js.map +1 -1
  135. package/dist/collection/components/gov-container/gov-container.js +2 -38
  136. package/dist/collection/components/gov-container/gov-container.js.map +1 -1
  137. package/dist/collection/components/gov-dialog/gov-dialog.js +1 -1
  138. package/dist/collection/components/gov-dialog/gov-dialog.js.map +1 -1
  139. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +1 -20
  140. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
  141. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +1 -1
  142. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
  143. package/dist/collection/components/gov-form/control/gov-form-control.js +1 -1
  144. package/dist/collection/components/gov-form/file/gov-form-file.js +1 -20
  145. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  146. package/dist/collection/components/gov-form/group/gov-form-checkbox-group.js +1 -1
  147. package/dist/collection/components/gov-form/group/gov-form-group.css +7 -36
  148. package/dist/collection/components/gov-form/group/gov-form-group.js +1 -1
  149. package/dist/collection/components/gov-form/group/gov-form-radio-group.js +1 -1
  150. package/dist/collection/components/gov-form/input/constants.js +1 -0
  151. package/dist/collection/components/gov-form/input/constants.js.map +1 -1
  152. package/dist/collection/components/gov-form/input/gov-form-input.js +5 -3
  153. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  154. package/dist/collection/components/gov-form/label/gov-form-label.js +1 -1
  155. package/dist/collection/components/gov-form/message/gov-form-message.js +1 -1
  156. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +4 -4
  157. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
  158. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +1 -1
  159. package/dist/collection/components/gov-form/search/gov-form-search.js +1 -1
  160. package/dist/collection/components/gov-form/select/gov-form-select.js +2 -2
  161. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  162. package/dist/collection/components/gov-form/switch/constants.js +1 -1
  163. package/dist/collection/components/gov-form/switch/constants.js.map +1 -1
  164. package/dist/collection/components/gov-form/switch/gov-form-switch.js +2 -2
  165. package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
  166. package/dist/collection/components/gov-grid/gov-grid-item.js +1 -1
  167. package/dist/collection/components/gov-grid/gov-grid.js +1 -1
  168. package/dist/collection/components/gov-icon/constants.js +8 -7
  169. package/dist/collection/components/gov-icon/constants.js.map +1 -1
  170. package/dist/collection/components/gov-icon/gov-icon.js +38 -6
  171. package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
  172. package/dist/collection/components/gov-icon/list.js +37 -151
  173. package/dist/collection/components/gov-icon/list.js.map +1 -1
  174. package/dist/collection/components/gov-infobar/gov-infobar.js +2 -2
  175. package/dist/collection/components/gov-infobar/gov-infobar.js.map +1 -1
  176. package/dist/collection/components/gov-layout/gov-layout-column.js +1 -1
  177. package/dist/collection/components/gov-layout/gov-layout.js +1 -1
  178. package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js +1 -1
  179. package/dist/collection/components/gov-link/constants.js +7 -0
  180. package/dist/collection/components/gov-link/constants.js.map +1 -0
  181. package/dist/collection/components/gov-link/gov-link.js +129 -0
  182. package/dist/collection/components/gov-link/gov-link.js.map +1 -0
  183. package/dist/collection/components/gov-loading/loading/gov-loading.js +1 -1
  184. package/dist/collection/components/gov-loading/loading/gov-loading.js.map +1 -1
  185. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +1 -1
  186. package/dist/collection/components/gov-message/gov-message.js +1 -1
  187. package/dist/collection/components/gov-pagination/gov-pagination.js +1 -1
  188. package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
  189. package/dist/collection/components/gov-spacer/gov-spacer.js +1 -1
  190. package/dist/collection/components/gov-stepper/gov-stepper-item.js +1 -1
  191. package/dist/collection/components/gov-stepper/gov-stepper.js +1 -1
  192. package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
  193. package/dist/collection/components/gov-tabs/gov-tabs.js +1 -1
  194. package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
  195. package/dist/collection/components/gov-tag/gov-tag.js +9 -9
  196. package/dist/collection/components/gov-tag/gov-tag.js.map +1 -1
  197. package/dist/collection/components/gov-theme-switch/constants.js +9 -1
  198. package/dist/collection/components/gov-theme-switch/constants.js.map +1 -1
  199. package/dist/collection/components/gov-theme-switch/gov-theme-switch.js +134 -10
  200. package/dist/collection/components/gov-theme-switch/gov-theme-switch.js.map +1 -1
  201. package/dist/collection/components/gov-tile/container/gov-tiles.js +1 -1
  202. package/dist/collection/components/gov-tile/gov-tile.js +7 -7
  203. package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
  204. package/dist/collection/components/gov-toast/constants.js +1 -0
  205. package/dist/collection/components/gov-toast/constants.js.map +1 -1
  206. package/dist/collection/components/gov-toast/gov-toast.js +1 -1
  207. package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
  208. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +1 -1
  209. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js.map +1 -1
  210. package/dist/collection/components/gov-tooltip/gov-tooltip.js +2 -2
  211. package/dist/collection/components/gov-wizard/gov-wizard-item.js +3 -3
  212. package/dist/collection/components/gov-wizard/gov-wizard-item.js.map +1 -1
  213. package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
  214. package/dist/collection/core/constants/colors.js +6 -8
  215. package/dist/collection/core/constants/colors.js.map +1 -1
  216. package/dist/collection/data/color-definitions.js +359 -172
  217. package/dist/collection/helpers/Dom/document.js +28 -0
  218. package/dist/collection/helpers/Dom/document.js.map +1 -0
  219. package/dist/collection/helpers/Dom/template.js +0 -18
  220. package/dist/collection/helpers/Dom/template.js.map +1 -1
  221. package/dist/collection/helpers/Dom/template.types.js.map +1 -1
  222. package/dist/collection/pages/Accordion.js +30 -30
  223. package/dist/collection/pages/Accordion.js.map +1 -1
  224. package/dist/collection/pages/Button.js +383 -383
  225. package/dist/collection/pages/Button.js.map +1 -1
  226. package/dist/collection/pages/Chip.js +53 -53
  227. package/dist/collection/pages/Chip.js.map +1 -1
  228. package/dist/collection/pages/ControlGroup.js +18 -18
  229. package/dist/collection/pages/ControlGroup.js.map +1 -1
  230. package/dist/collection/pages/Dialog.js +1 -1
  231. package/dist/collection/pages/Dialog.js.map +1 -1
  232. package/dist/collection/pages/Forms.js +47 -37
  233. package/dist/collection/pages/Forms.js.map +1 -1
  234. package/dist/collection/pages/Icon.js +10 -0
  235. package/dist/collection/pages/Icon.js.map +1 -1
  236. package/dist/collection/pages/Infobar.js +16 -16
  237. package/dist/collection/pages/Infobar.js.map +1 -1
  238. package/dist/collection/pages/Message.js +20 -20
  239. package/dist/collection/pages/Message.js.map +1 -1
  240. package/dist/collection/pages/Stepper.js +15 -15
  241. package/dist/collection/pages/Stepper.js.map +1 -1
  242. package/dist/collection/pages/Tag.js +23 -23
  243. package/dist/collection/pages/Tag.js.map +1 -1
  244. package/dist/collection/pages/ToastMessage.js +4 -4
  245. package/dist/collection/pages/ToastMessage.js.map +1 -1
  246. package/dist/collection/pages/ToastMessageCountdown.js +4 -4
  247. package/dist/collection/pages/ToastMessageCountdown.js.map +1 -1
  248. package/dist/collection/pages/Tooltip.js +2 -2
  249. package/dist/collection/pages/Tooltip.js.map +1 -1
  250. package/dist/collection/pages/Typography.js +20 -0
  251. package/dist/collection/pages/Typography.js.map +1 -1
  252. package/dist/collection/pages/Wizard.js +1 -1
  253. package/dist/collection/pages/Wizard.js.map +1 -1
  254. package/dist/components/gov-accordion-item.js +1 -1
  255. package/dist/components/gov-accordion-item.js.map +1 -1
  256. package/dist/components/gov-accordion.js +1 -1
  257. package/dist/components/gov-attachments-item.js +1 -1
  258. package/dist/components/gov-attachments.js +1 -1
  259. package/dist/components/gov-backdrop.js +1 -1
  260. package/dist/components/gov-breadcrumbs.js +1 -1
  261. package/dist/components/gov-breadcrumbs.js.map +1 -1
  262. package/dist/components/gov-button.js +1 -1
  263. package/dist/components/gov-card.js +1 -1
  264. package/dist/components/gov-card.js.map +1 -1
  265. package/dist/components/gov-chip.js +1 -1
  266. package/dist/components/gov-container.js +1 -1
  267. package/dist/components/gov-container.js.map +1 -1
  268. package/dist/components/gov-control-group.js +1 -1
  269. package/dist/components/gov-cookiebar.js +1 -1
  270. package/dist/components/gov-dialog.js +1 -1
  271. package/dist/components/gov-dialog.js.map +1 -1
  272. package/dist/components/gov-dropdown.js +1 -1
  273. package/dist/components/gov-empty.js +1 -1
  274. package/dist/components/gov-error-code.js +1 -1
  275. package/dist/components/gov-flex.js +1 -1
  276. package/dist/components/gov-form-autocomplete.js +1 -1
  277. package/dist/components/gov-form-checkbox-group.js +1 -1
  278. package/dist/components/gov-form-checkbox-group.js.map +1 -1
  279. package/dist/components/gov-form-checkbox.js +1 -1
  280. package/dist/components/gov-form-checkbox.js.map +1 -1
  281. package/dist/components/gov-form-control.js +1 -1
  282. package/dist/components/gov-form-file.js +1 -1
  283. package/dist/components/gov-form-file.js.map +1 -1
  284. package/dist/components/gov-form-group.js +1 -1
  285. package/dist/components/gov-form-input.js +1 -1
  286. package/dist/components/gov-form-label.js +1 -1
  287. package/dist/components/gov-form-label.js.map +1 -1
  288. package/dist/components/gov-form-message.js +1 -1
  289. package/dist/components/gov-form-multi-select.js +1 -1
  290. package/dist/components/gov-form-multi-select.js.map +1 -1
  291. package/dist/components/gov-form-password-power.js +1 -1
  292. package/dist/components/gov-form-password-power.js.map +1 -1
  293. package/dist/components/gov-form-radio-group.js +1 -1
  294. package/dist/components/gov-form-radio-group.js.map +1 -1
  295. package/dist/components/gov-form-radio.js +1 -1
  296. package/dist/components/gov-form-radio.js.map +1 -1
  297. package/dist/components/gov-form-search.js +1 -1
  298. package/dist/components/gov-form-select.js +1 -1
  299. package/dist/components/gov-form-switch.js +1 -1
  300. package/dist/components/gov-form-switch.js.map +1 -1
  301. package/dist/components/gov-grid-item.js +1 -1
  302. package/dist/components/gov-grid.js +1 -1
  303. package/dist/components/gov-icon.js +1 -1
  304. package/dist/components/gov-infobar.js +1 -1
  305. package/dist/components/gov-infobar.js.map +1 -1
  306. package/dist/components/gov-layout-column.js +1 -1
  307. package/dist/components/gov-layout.js +1 -1
  308. package/dist/components/gov-lifecycle.js +1 -1
  309. package/dist/components/gov-link.d.ts +11 -0
  310. package/dist/components/gov-link.js +2 -0
  311. package/dist/components/gov-link.js.map +1 -0
  312. package/dist/components/gov-loading.js +1 -1
  313. package/dist/components/gov-loading.js.map +1 -1
  314. package/dist/components/gov-message.js +1 -1
  315. package/dist/components/gov-pagination.js +1 -1
  316. package/dist/components/gov-pagination.js.map +1 -1
  317. package/dist/components/gov-skeleton.js +1 -1
  318. package/dist/components/gov-spacer.js +1 -1
  319. package/dist/components/gov-stepper-item.js +1 -1
  320. package/dist/components/gov-stepper.js +1 -1
  321. package/dist/components/gov-tabs-item.js +1 -1
  322. package/dist/components/gov-tabs.js +1 -1
  323. package/dist/components/gov-tabs.js.map +1 -1
  324. package/dist/components/gov-tag.js +1 -1
  325. package/dist/components/gov-tag.js.map +1 -1
  326. package/dist/components/gov-theme-switch.js +1 -1
  327. package/dist/components/gov-theme-switch.js.map +1 -1
  328. package/dist/components/gov-tile.js +1 -1
  329. package/dist/components/gov-tile.js.map +1 -1
  330. package/dist/components/gov-tiles.js +1 -1
  331. package/dist/components/gov-toast.js +1 -1
  332. package/dist/components/gov-toast.js.map +1 -1
  333. package/dist/components/gov-tooltip-content.js +1 -1
  334. package/dist/components/gov-tooltip-content.js.map +1 -1
  335. package/dist/components/gov-tooltip.js +1 -1
  336. package/dist/components/gov-tooltip.js.map +1 -1
  337. package/dist/components/gov-wizard-item.js +1 -1
  338. package/dist/components/gov-wizard-item.js.map +1 -1
  339. package/dist/components/gov-wizard.js +1 -1
  340. package/dist/components/p-20c2203a.js +2 -0
  341. package/dist/components/p-20c2203a.js.map +1 -0
  342. package/dist/components/p-227eb30d.js +2 -0
  343. package/dist/components/{p-dcee21ca.js.map → p-227eb30d.js.map} +1 -1
  344. package/dist/components/p-2b87c27b.js +2 -0
  345. package/dist/components/{p-3b807239.js.map → p-2b87c27b.js.map} +1 -1
  346. package/dist/components/p-31a99bfc.js +2 -0
  347. package/dist/components/{p-bd22e21d.js → p-4149f195.js} +2 -2
  348. package/dist/components/p-44a8a668.js +2 -0
  349. package/dist/components/p-45097b4c.js +2 -0
  350. package/dist/components/p-45097b4c.js.map +1 -0
  351. package/dist/components/{p-1f3bb41d.js → p-5952a5d0.js} +2 -2
  352. package/dist/components/p-5aad3497.js +2 -0
  353. package/dist/components/p-5aad3497.js.map +1 -0
  354. package/dist/components/p-68a1aaec.js +2 -0
  355. package/dist/components/p-68a1aaec.js.map +1 -0
  356. package/dist/components/p-76d604c6.js +2 -0
  357. package/dist/components/p-7d4f2214.js +2 -0
  358. package/dist/components/{p-6ea84137.js.map → p-7d4f2214.js.map} +1 -1
  359. package/dist/components/p-7f3becc5.js +2 -0
  360. package/dist/components/p-859a4f0d.js +2 -0
  361. package/dist/components/{p-820b66c0.js.map → p-859a4f0d.js.map} +1 -1
  362. package/dist/components/{p-7f8a24a7.js → p-860520b0.js} +2 -2
  363. package/dist/components/p-929ebfb5.js +2 -0
  364. package/dist/components/p-929ebfb5.js.map +1 -0
  365. package/dist/components/p-9908b9f0.js +2 -0
  366. package/dist/components/p-9908b9f0.js.map +1 -0
  367. package/dist/components/{p-19c681a3.js → p-a2435993.js} +2 -2
  368. package/dist/components/{p-59737af9.js → p-a521c59a.js} +2 -2
  369. package/dist/components/{p-0c93dd39.js → p-c61a5830.js} +2 -2
  370. package/dist/components/p-dc952cc2.js +2 -0
  371. package/dist/components/p-dc952cc2.js.map +1 -0
  372. package/dist/components/{p-23b7e680.js → p-dfb5794a.js} +2 -2
  373. package/dist/components/p-ea7fdd2e.js +2 -0
  374. package/dist/components/p-ea7fdd2e.js.map +1 -0
  375. package/dist/components/p-f44899e1.js +2 -0
  376. package/dist/components/p-f44899e1.js.map +1 -0
  377. package/dist/core/core.css +7985 -7198
  378. package/dist/core/core.esm.js +1 -1
  379. package/dist/core/core.esm.js.map +1 -1
  380. package/dist/core/p-00d153bf.entry.js +2 -0
  381. package/dist/core/p-019e967c.entry.js +2 -0
  382. package/dist/core/{p-83aa4327.entry.js.map → p-019e967c.entry.js.map} +1 -1
  383. package/dist/core/p-0be19b89.entry.js +2 -0
  384. package/dist/core/p-1abdcb62.entry.js +2 -0
  385. package/dist/core/p-1abdcb62.entry.js.map +1 -0
  386. package/dist/core/p-1ac9544f.entry.js +2 -0
  387. package/dist/core/{p-f963bb2f.entry.js.map → p-1ac9544f.entry.js.map} +1 -1
  388. package/dist/core/p-1b3c808d.entry.js +2 -0
  389. package/dist/core/p-1b3c808d.entry.js.map +1 -0
  390. package/dist/core/p-20c2203a.js +2 -0
  391. package/dist/core/p-20c2203a.js.map +1 -0
  392. package/dist/core/p-22fa411d.entry.js +2 -0
  393. package/dist/core/p-2c290fe5.entry.js +2 -0
  394. package/dist/core/p-2c290fe5.entry.js.map +1 -0
  395. package/dist/core/p-2c59483f.entry.js +2 -0
  396. package/dist/core/p-2c59483f.entry.js.map +1 -0
  397. package/dist/core/p-30eaeeec.entry.js +2 -0
  398. package/dist/core/p-3bbb77a0.js +2 -0
  399. package/dist/core/p-3fc3c26b.entry.js +2 -0
  400. package/dist/core/{p-212759be.entry.js.map → p-3fc3c26b.entry.js.map} +1 -1
  401. package/dist/core/p-40d764ac.entry.js +2 -0
  402. package/dist/core/{p-0d2c4d31.entry.js.map → p-40d764ac.entry.js.map} +1 -1
  403. package/dist/core/p-410ec0dd.entry.js +2 -0
  404. package/dist/core/{p-10f9bf55.entry.js.map → p-410ec0dd.entry.js.map} +1 -1
  405. package/dist/core/p-439b66a5.entry.js +2 -0
  406. package/dist/core/{p-92e13f9d.entry.js.map → p-439b66a5.entry.js.map} +1 -1
  407. package/dist/core/p-443a813a.entry.js +2 -0
  408. package/dist/core/{p-eebf7ad8.entry.js.map → p-443a813a.entry.js.map} +1 -1
  409. package/dist/core/p-48c93ac0.entry.js +2 -0
  410. package/dist/core/p-48c93ac0.entry.js.map +1 -0
  411. package/dist/core/p-52ca31be.entry.js +2 -0
  412. package/dist/core/{p-378e0723.entry.js.map → p-52ca31be.entry.js.map} +1 -1
  413. package/dist/core/p-535316b4.entry.js +2 -0
  414. package/dist/core/{p-b822b9ff.entry.js → p-5396935e.entry.js} +2 -2
  415. package/dist/core/{p-42d9924c.js → p-56efd4a2.js} +2 -2
  416. package/dist/core/p-5aad3497.js +2 -0
  417. package/dist/core/p-5aad3497.js.map +1 -0
  418. package/dist/core/p-5b2131c1.entry.js +2 -0
  419. package/dist/core/p-5ed63e9c.entry.js +2 -0
  420. package/dist/core/{p-1fdc2457.entry.js.map → p-5ed63e9c.entry.js.map} +1 -1
  421. package/dist/core/{p-60658ae9.js → p-5f1000da.js} +2 -2
  422. package/dist/core/p-6454af62.entry.js +2 -0
  423. package/dist/core/{p-56f9e026.entry.js.map → p-6454af62.entry.js.map} +1 -1
  424. package/dist/core/p-74458da3.entry.js +2 -0
  425. package/dist/core/p-74458da3.entry.js.map +1 -0
  426. package/dist/core/p-76d604c6.js +2 -0
  427. package/dist/core/{p-a21dc94f.js.map → p-76d604c6.js.map} +1 -1
  428. package/dist/core/p-773f71f6.entry.js +2 -0
  429. package/dist/core/{p-67200095.entry.js.map → p-773f71f6.entry.js.map} +1 -1
  430. package/dist/core/p-783a6b5b.entry.js +2 -0
  431. package/dist/core/{p-0a24806a.entry.js.map → p-783a6b5b.entry.js.map} +1 -1
  432. package/dist/core/p-7b7e502b.entry.js +2 -0
  433. package/dist/core/p-7ba4daf4.js +2 -0
  434. package/dist/core/p-7bf52eb9.entry.js +2 -0
  435. package/dist/core/p-7bf52eb9.entry.js.map +1 -0
  436. package/dist/core/p-7d6073aa.entry.js +2 -0
  437. package/dist/core/{p-fb0df3a5.entry.js.map → p-7d6073aa.entry.js.map} +1 -1
  438. package/dist/core/p-7f3becc5.js +2 -0
  439. package/dist/core/{p-e9a6cd71.js → p-860520b0.js} +2 -2
  440. package/dist/core/p-8701c28e.entry.js +2 -0
  441. package/dist/core/p-8701c28e.entry.js.map +1 -0
  442. package/dist/core/p-951823cb.entry.js +2 -0
  443. package/dist/core/{p-75ea368b.entry.js.map → p-951823cb.entry.js.map} +1 -1
  444. package/dist/core/p-9da91318.entry.js +2 -0
  445. package/dist/core/{p-1f1895c0.entry.js.map → p-9da91318.entry.js.map} +1 -1
  446. package/dist/core/p-a218e2eb.entry.js +2 -0
  447. package/dist/core/{p-d3963396.entry.js.map → p-a218e2eb.entry.js.map} +1 -1
  448. package/dist/core/{p-169b67af.js → p-a2435993.js} +2 -2
  449. package/dist/core/p-a521c59a.js +2 -0
  450. package/dist/core/p-b1efeb41.entry.js +2 -0
  451. package/dist/core/p-b1efeb41.entry.js.map +1 -0
  452. package/dist/core/p-b4af0bec.entry.js +2 -0
  453. package/dist/core/p-b4af0bec.entry.js.map +1 -0
  454. package/dist/core/p-bc966c46.entry.js +2 -0
  455. package/dist/core/p-bdc51179.entry.js +2 -0
  456. package/dist/core/p-bdc51179.entry.js.map +1 -0
  457. package/dist/core/p-c20fe3da.entry.js +2 -0
  458. package/dist/core/{p-8f10919c.entry.js.map → p-c20fe3da.entry.js.map} +1 -1
  459. package/dist/core/p-c4ffcc37.entry.js +2 -0
  460. package/dist/core/p-c4ffcc37.entry.js.map +1 -0
  461. package/dist/core/p-c52afdfc.js +2 -0
  462. package/dist/core/{p-842cb87f.js.map → p-c52afdfc.js.map} +1 -1
  463. package/dist/core/{p-c990d746.js → p-c61a5830.js} +2 -2
  464. package/dist/core/p-cb557873.entry.js +2 -0
  465. package/dist/core/{p-3844a27d.entry.js.map → p-cb557873.entry.js.map} +1 -1
  466. package/dist/core/p-d24710ff.entry.js +2 -0
  467. package/dist/core/p-d24710ff.entry.js.map +1 -0
  468. package/dist/core/p-d65cef62.entry.js +2 -0
  469. package/dist/core/{p-4cb4de7b.entry.js.map → p-d65cef62.entry.js.map} +1 -1
  470. package/dist/core/p-da1db6fd.js +2 -0
  471. package/dist/core/p-da1db6fd.js.map +1 -0
  472. package/dist/core/p-db22d51c.entry.js +2 -0
  473. package/dist/core/{p-f1c8a96b.entry.js.map → p-db22d51c.entry.js.map} +1 -1
  474. package/dist/core/p-dec3f948.entry.js +2 -0
  475. package/dist/core/{p-7b48b1b8.entry.js.map → p-dec3f948.entry.js.map} +1 -1
  476. package/dist/core/{p-45a30859.js → p-e0e2e9c1.js} +2 -2
  477. package/dist/core/p-e2517a72.entry.js +2 -0
  478. package/dist/core/{p-57b0e670.entry.js.map → p-e2517a72.entry.js.map} +1 -1
  479. package/dist/core/p-e44a0fee.js +2 -0
  480. package/dist/core/{p-58dc3ec3.entry.js → p-e834ee73.entry.js} +2 -2
  481. package/dist/core/p-ea7fdd2e.js +2 -0
  482. package/dist/core/p-ea7fdd2e.js.map +1 -0
  483. package/dist/core/p-ed1131cb.entry.js +2 -0
  484. package/dist/core/{p-c5b5fd69.entry.js.map → p-ed1131cb.entry.js.map} +1 -1
  485. package/dist/core/p-f1056a83.entry.js +2 -0
  486. package/dist/core/{p-32bba4e7.entry.js.map → p-f1056a83.entry.js.map} +1 -1
  487. package/dist/core/p-f1fa5e1e.entry.js +2 -0
  488. package/dist/core/{p-1600c1fb.entry.js.map → p-f1fa5e1e.entry.js.map} +1 -1
  489. package/dist/core/p-f4bcf817.entry.js +2 -0
  490. package/dist/core/p-f4bcf817.entry.js.map +1 -0
  491. package/dist/core/p-f6709826.entry.js +2 -0
  492. package/dist/core/p-f6709826.entry.js.map +1 -0
  493. package/dist/core/{p-5ad3097c.entry.js → p-f7a4da9d.entry.js} +2 -2
  494. package/dist/core/p-fca60e04.entry.js +2 -0
  495. package/dist/core/{p-8fe36a5b.entry.js.map → p-fca60e04.entry.js.map} +1 -1
  496. package/dist/core/p-fe6fed11.entry.js +2 -0
  497. package/dist/core/p-fe6fed11.entry.js.map +1 -0
  498. package/dist/esm/{colors-02c1ea96.js → colors-4cf64720.js} +7 -9
  499. package/dist/esm/colors-4cf64720.js.map +1 -0
  500. package/dist/esm/{constants-6d727976.js → constants-085f9943.js} +2 -2
  501. package/dist/esm/{constants-6d727976.js.map → constants-085f9943.js.map} +1 -1
  502. package/dist/esm/{constants-990365f1.js → constants-372455eb.js} +3 -3
  503. package/dist/esm/{constants-990365f1.js.map → constants-372455eb.js.map} +1 -1
  504. package/dist/esm/{constants-d6418889.js → constants-3ab65c42.js} +2 -2
  505. package/dist/esm/{constants-d6418889.js.map → constants-3ab65c42.js.map} +1 -1
  506. package/dist/esm/{constants-48177684.js → constants-3b914c35.js} +3 -3
  507. package/dist/esm/{constants-48177684.js.map → constants-3b914c35.js.map} +1 -1
  508. package/dist/esm/{constants-d42abf99.js → constants-43f10674.js} +2 -2
  509. package/dist/esm/{constants-d42abf99.js.map → constants-43f10674.js.map} +1 -1
  510. package/dist/esm/{constants-501eb756.js → constants-4da2b3c0.js} +2 -2
  511. package/dist/esm/{constants-501eb756.js.map → constants-4da2b3c0.js.map} +1 -1
  512. package/dist/esm/{constants-c716fa44.js → constants-51f51588.js} +3 -3
  513. package/dist/esm/{constants-c716fa44.js.map → constants-51f51588.js.map} +1 -1
  514. package/dist/esm/{constants-f4e4ede6.js → constants-8429b68f.js} +3 -3
  515. package/dist/esm/{constants-f4e4ede6.js.map → constants-8429b68f.js.map} +1 -1
  516. package/dist/esm/{constants-47e20524.js → constants-9177ea52.js} +3 -3
  517. package/dist/esm/{constants-47e20524.js.map → constants-9177ea52.js.map} +1 -1
  518. package/dist/esm/{constants-7307438d.js → constants-bc210662.js} +3 -3
  519. package/dist/esm/{constants-7307438d.js.map → constants-bc210662.js.map} +1 -1
  520. package/dist/esm/core.js +1 -1
  521. package/dist/esm/{form-472e078d.js → form-713f26fd.js} +7 -6
  522. package/dist/esm/form-713f26fd.js.map +1 -0
  523. package/dist/esm/gov-accordion-item.entry.js +6 -7
  524. package/dist/esm/gov-accordion-item.entry.js.map +1 -1
  525. package/dist/esm/gov-accordion.entry.js +5 -6
  526. package/dist/esm/gov-accordion.entry.js.map +1 -1
  527. package/dist/esm/gov-attachments_3.entry.js +10 -11
  528. package/dist/esm/gov-attachments_3.entry.js.map +1 -1
  529. package/dist/esm/gov-backdrop.entry.js +4 -5
  530. package/dist/esm/gov-backdrop.entry.js.map +1 -1
  531. package/dist/esm/gov-breadcrumbs.entry.js +5 -6
  532. package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
  533. package/dist/esm/gov-button.entry.js +10 -11
  534. package/dist/esm/gov-button.entry.js.map +1 -1
  535. package/dist/esm/gov-card.entry.js +5 -6
  536. package/dist/esm/gov-card.entry.js.map +1 -1
  537. package/dist/esm/gov-chip.entry.js +12 -13
  538. package/dist/esm/gov-chip.entry.js.map +1 -1
  539. package/dist/esm/gov-container.entry.js +2 -10
  540. package/dist/esm/gov-container.entry.js.map +1 -1
  541. package/dist/esm/gov-control-group.entry.js +5 -6
  542. package/dist/esm/gov-control-group.entry.js.map +1 -1
  543. package/dist/esm/gov-cookiebar.entry.js +1 -1
  544. package/dist/esm/gov-dialog.entry.js +5 -6
  545. package/dist/esm/gov-dialog.entry.js.map +1 -1
  546. package/dist/esm/gov-dropdown.entry.js +4 -4
  547. package/dist/esm/gov-empty.entry.js +5 -6
  548. package/dist/esm/gov-empty.entry.js.map +1 -1
  549. package/dist/esm/gov-error-code.entry.js +1 -1
  550. package/dist/esm/gov-flex_4.entry.js +315 -0
  551. package/dist/esm/gov-flex_4.entry.js.map +1 -0
  552. package/dist/esm/gov-form-autocomplete.entry.js +6 -8
  553. package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
  554. package/dist/esm/gov-form-checkbox-group.entry.js +7 -8
  555. package/dist/esm/gov-form-checkbox-group.entry.js.map +1 -1
  556. package/dist/esm/gov-form-checkbox.entry.js +10 -11
  557. package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
  558. package/dist/esm/gov-form-control.entry.js +8 -8
  559. package/dist/esm/gov-form-file.entry.js +8 -9
  560. package/dist/esm/gov-form-file.entry.js.map +1 -1
  561. package/dist/esm/gov-form-group.entry.js +6 -7
  562. package/dist/esm/gov-form-group.entry.js.map +1 -1
  563. package/dist/esm/gov-form-input_2.entry.js +15 -14
  564. package/dist/esm/gov-form-input_2.entry.js.map +1 -1
  565. package/dist/esm/gov-form-multi-select.entry.js +12 -13
  566. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  567. package/dist/esm/gov-form-password-power.entry.js +1 -1
  568. package/dist/esm/gov-form-radio-group.entry.js +7 -8
  569. package/dist/esm/gov-form-radio-group.entry.js.map +1 -1
  570. package/dist/esm/gov-form-radio.entry.js +9 -10
  571. package/dist/esm/gov-form-radio.entry.js.map +1 -1
  572. package/dist/esm/gov-form-search.entry.js +3 -3
  573. package/dist/esm/gov-form-select.entry.js +11 -12
  574. package/dist/esm/gov-form-select.entry.js.map +1 -1
  575. package/dist/esm/gov-form-switch.entry.js +10 -11
  576. package/dist/esm/gov-form-switch.entry.js.map +1 -1
  577. package/dist/esm/gov-grid-item.entry.js +2 -2
  578. package/dist/esm/gov-grid.entry.js +2 -2
  579. package/dist/esm/gov-infobar.entry.js +7 -8
  580. package/dist/esm/gov-infobar.entry.js.map +1 -1
  581. package/dist/esm/gov-layout-column.entry.js +2 -2
  582. package/dist/esm/gov-layout.entry.js +2 -2
  583. package/dist/esm/gov-lifecycle.entry.js +1 -1
  584. package/dist/esm/gov-link.entry.js +47 -0
  585. package/dist/esm/gov-link.entry.js.map +1 -0
  586. package/dist/esm/gov-loading.entry.js +5 -6
  587. package/dist/esm/gov-loading.entry.js.map +1 -1
  588. package/dist/esm/gov-message.entry.js +6 -7
  589. package/dist/esm/gov-message.entry.js.map +1 -1
  590. package/dist/esm/gov-pagination.entry.js +6 -7
  591. package/dist/esm/gov-pagination.entry.js.map +1 -1
  592. package/dist/esm/gov-spacer.entry.js +5 -6
  593. package/dist/esm/gov-spacer.entry.js.map +1 -1
  594. package/dist/esm/gov-stepper-item.entry.js +7 -8
  595. package/dist/esm/gov-stepper-item.entry.js.map +1 -1
  596. package/dist/esm/gov-stepper.entry.js +7 -8
  597. package/dist/esm/gov-stepper.entry.js.map +1 -1
  598. package/dist/esm/gov-tabs-item.entry.js +5 -5
  599. package/dist/esm/gov-tabs.entry.js +7 -8
  600. package/dist/esm/gov-tabs.entry.js.map +1 -1
  601. package/dist/esm/gov-tag.entry.js +11 -12
  602. package/dist/esm/gov-tag.entry.js.map +1 -1
  603. package/dist/esm/gov-tile.entry.js +3 -3
  604. package/dist/esm/gov-tile.entry.js.map +1 -1
  605. package/dist/esm/gov-tiles.entry.js +2 -2
  606. package/dist/esm/gov-toast.entry.js +7 -7
  607. package/dist/esm/gov-toast.entry.js.map +1 -1
  608. package/dist/esm/gov-tooltip-content.entry.js +5 -5
  609. package/dist/esm/gov-tooltip-content.entry.js.map +1 -1
  610. package/dist/esm/gov-tooltip.entry.js +8 -9
  611. package/dist/esm/gov-tooltip.entry.js.map +1 -1
  612. package/dist/esm/gov-wizard-item.entry.js +9 -10
  613. package/dist/esm/gov-wizard-item.entry.js.map +1 -1
  614. package/dist/esm/gov-wizard.entry.js +8 -9
  615. package/dist/esm/gov-wizard.entry.js.map +1 -1
  616. package/dist/esm/{win-cec370ad.js → gov.log-066c3139.js} +17 -3
  617. package/dist/esm/gov.log-066c3139.js.map +1 -0
  618. package/dist/esm/index-c263e031.js +6 -14
  619. package/dist/esm/loader.js +1 -1
  620. package/dist/esm/{props-c82e1abf.js → props-fb6587c3.js} +2 -2
  621. package/dist/esm/{props-c82e1abf.js.map → props-fb6587c3.js.map} +1 -1
  622. package/dist/esm/{template-3d84d705.js → template-7ecee4d1.js} +2 -20
  623. package/dist/esm/template-7ecee4d1.js.map +1 -0
  624. package/dist/esm/{utils-2b4ef320.js → utils-e10e994d.js} +2 -2
  625. package/dist/esm/{utils-2b4ef320.js.map → utils-e10e994d.js.map} +1 -1
  626. package/dist/esm/{wcag-d7c6c252.js → wcag-de9a3dc6.js} +2 -3
  627. package/dist/esm/wcag-de9a3dc6.js.map +1 -0
  628. package/dist/hydrate/index.js +224 -138
  629. package/dist/hydrate/index.mjs +224 -138
  630. package/dist/stencil.config.js +6 -4
  631. package/dist/stencil.config.js.map +1 -1
  632. package/dist/types/components/gov-button/button/gov-button.d.ts +1 -1
  633. package/dist/types/components/gov-chip/gov-chip.d.ts +3 -3
  634. package/dist/types/components/gov-container/gov-container.d.ts +0 -6
  635. package/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +0 -4
  636. package/dist/types/components/gov-form/file/gov-form-file.d.ts +0 -4
  637. package/dist/types/components/gov-form/input/constants.d.ts +1 -0
  638. package/dist/types/components/gov-form/switch/constants.d.ts +1 -1
  639. package/dist/types/components/gov-icon/constants.d.ts +4 -1
  640. package/dist/types/components/gov-icon/gov-icon.d.ts +8 -2
  641. package/dist/types/components/gov-icon/list.d.ts +1 -1
  642. package/dist/types/components/gov-link/constants.d.ts +7 -0
  643. package/dist/types/components/gov-link/gov-link.d.ts +30 -0
  644. package/dist/types/components/gov-tag/gov-tag.d.ts +2 -2
  645. package/dist/types/components/gov-theme-switch/constants.d.ts +9 -0
  646. package/dist/types/components/gov-theme-switch/gov-theme-switch.d.ts +26 -2
  647. package/dist/types/components/gov-tile/gov-tile.d.ts +1 -1
  648. package/dist/types/components/gov-toast/constants.d.ts +1 -0
  649. package/dist/types/components.d.ts +117 -37
  650. package/dist/types/core/constants/colors.d.ts +6 -8
  651. package/dist/types/helpers/Dom/document.d.ts +3 -0
  652. package/dist/types/helpers/Dom/template.d.ts +0 -1
  653. package/dist/types/helpers/Dom/template.types.d.ts +0 -1
  654. package/package.json +3 -3
  655. package/dist/cjs/colors-976f6dff.js.map +0 -1
  656. package/dist/cjs/form-c1aec07a.js.map +0 -1
  657. package/dist/cjs/gov-flex.cjs.entry.js +0 -31
  658. package/dist/cjs/gov-flex.cjs.entry.js.map +0 -1
  659. package/dist/cjs/gov-form-label.cjs.entry.js +0 -27
  660. package/dist/cjs/gov-form-label.cjs.entry.js.map +0 -1
  661. package/dist/cjs/gov-icon.cjs.entry.js +0 -161
  662. package/dist/cjs/gov-icon.cjs.entry.js.map +0 -1
  663. package/dist/cjs/gov-theme-switch.cjs.entry.js +0 -73
  664. package/dist/cjs/gov-theme-switch.cjs.entry.js.map +0 -1
  665. package/dist/cjs/gov.log-1e8bab6e.js +0 -21
  666. package/dist/cjs/gov.log-1e8bab6e.js.map +0 -1
  667. package/dist/cjs/template-b070338f.js.map +0 -1
  668. package/dist/cjs/wcag-b8d80c7d.js.map +0 -1
  669. package/dist/cjs/win-587f4614.js.map +0 -1
  670. package/dist/components/p-0075138f.js +0 -2
  671. package/dist/components/p-0075138f.js.map +0 -1
  672. package/dist/components/p-02da2aee.js +0 -2
  673. package/dist/components/p-02da2aee.js.map +0 -1
  674. package/dist/components/p-08621bdf.js +0 -2
  675. package/dist/components/p-1a0b3b4f.js +0 -2
  676. package/dist/components/p-1a0b3b4f.js.map +0 -1
  677. package/dist/components/p-1d3019f3.js +0 -2
  678. package/dist/components/p-255d0471.js +0 -2
  679. package/dist/components/p-255d0471.js.map +0 -1
  680. package/dist/components/p-387052e1.js +0 -2
  681. package/dist/components/p-387052e1.js.map +0 -1
  682. package/dist/components/p-3b807239.js +0 -2
  683. package/dist/components/p-565120d5.js +0 -2
  684. package/dist/components/p-5cc316bc.js +0 -2
  685. package/dist/components/p-5cc316bc.js.map +0 -1
  686. package/dist/components/p-6ea84137.js +0 -2
  687. package/dist/components/p-7501abe8.js +0 -2
  688. package/dist/components/p-7501abe8.js.map +0 -1
  689. package/dist/components/p-820b66c0.js +0 -2
  690. package/dist/components/p-c211c3e1.js +0 -2
  691. package/dist/components/p-c211c3e1.js.map +0 -1
  692. package/dist/components/p-dcee21ca.js +0 -2
  693. package/dist/components/p-e3aeaca0.js +0 -2
  694. package/dist/components/p-e3aeaca0.js.map +0 -1
  695. package/dist/components/p-edd1417b.js +0 -2
  696. package/dist/core/p-0075138f.js +0 -2
  697. package/dist/core/p-0075138f.js.map +0 -1
  698. package/dist/core/p-052cc573.js +0 -2
  699. package/dist/core/p-0a24806a.entry.js +0 -2
  700. package/dist/core/p-0d2c4d31.entry.js +0 -2
  701. package/dist/core/p-10f9bf55.entry.js +0 -2
  702. package/dist/core/p-12680890.entry.js +0 -2
  703. package/dist/core/p-12680890.entry.js.map +0 -1
  704. package/dist/core/p-1600c1fb.entry.js +0 -2
  705. package/dist/core/p-18025823.entry.js +0 -2
  706. package/dist/core/p-18025823.entry.js.map +0 -1
  707. package/dist/core/p-18dbe177.entry.js +0 -2
  708. package/dist/core/p-18dbe177.entry.js.map +0 -1
  709. package/dist/core/p-1a550eee.entry.js +0 -2
  710. package/dist/core/p-1a550eee.entry.js.map +0 -1
  711. package/dist/core/p-1f1895c0.entry.js +0 -2
  712. package/dist/core/p-1fdc2457.entry.js +0 -2
  713. package/dist/core/p-212759be.entry.js +0 -2
  714. package/dist/core/p-215504c1.entry.js +0 -2
  715. package/dist/core/p-2614044c.js +0 -2
  716. package/dist/core/p-2c3ddc57.entry.js +0 -2
  717. package/dist/core/p-31e7d262.entry.js +0 -2
  718. package/dist/core/p-31e7d262.entry.js.map +0 -1
  719. package/dist/core/p-32bba4e7.entry.js +0 -2
  720. package/dist/core/p-378e0723.entry.js +0 -2
  721. package/dist/core/p-3844a27d.entry.js +0 -2
  722. package/dist/core/p-4bce896c.js +0 -2
  723. package/dist/core/p-4cb4de7b.entry.js +0 -2
  724. package/dist/core/p-56f9e026.entry.js +0 -2
  725. package/dist/core/p-57b0e670.entry.js +0 -2
  726. package/dist/core/p-668ca722.entry.js +0 -2
  727. package/dist/core/p-67200095.entry.js +0 -2
  728. package/dist/core/p-69d56f17.js +0 -2
  729. package/dist/core/p-6aa40794.js +0 -2
  730. package/dist/core/p-731fe7d8.entry.js +0 -2
  731. package/dist/core/p-731fe7d8.entry.js.map +0 -1
  732. package/dist/core/p-7591976a.entry.js +0 -2
  733. package/dist/core/p-75ea368b.entry.js +0 -2
  734. package/dist/core/p-7b48b1b8.entry.js +0 -2
  735. package/dist/core/p-7de47344.entry.js +0 -2
  736. package/dist/core/p-7de47344.entry.js.map +0 -1
  737. package/dist/core/p-83aa4327.entry.js +0 -2
  738. package/dist/core/p-842cb87f.js +0 -2
  739. package/dist/core/p-89b69743.entry.js +0 -2
  740. package/dist/core/p-89b69743.entry.js.map +0 -1
  741. package/dist/core/p-8a796fbe.entry.js +0 -2
  742. package/dist/core/p-8f10919c.entry.js +0 -2
  743. package/dist/core/p-8fe36a5b.entry.js +0 -2
  744. package/dist/core/p-915e53ac.entry.js +0 -2
  745. package/dist/core/p-915e53ac.entry.js.map +0 -1
  746. package/dist/core/p-92e13f9d.entry.js +0 -2
  747. package/dist/core/p-a21dc94f.js +0 -2
  748. package/dist/core/p-a274cdaa.entry.js +0 -2
  749. package/dist/core/p-a274cdaa.entry.js.map +0 -1
  750. package/dist/core/p-a693ffbf.js +0 -2
  751. package/dist/core/p-a693ffbf.js.map +0 -1
  752. package/dist/core/p-a9a095c2.entry.js +0 -2
  753. package/dist/core/p-a9a095c2.entry.js.map +0 -1
  754. package/dist/core/p-ab68c0b7.entry.js +0 -2
  755. package/dist/core/p-ab68c0b7.entry.js.map +0 -1
  756. package/dist/core/p-b48a4aa0.js +0 -2
  757. package/dist/core/p-b48a4aa0.js.map +0 -1
  758. package/dist/core/p-b50ffab3.entry.js +0 -2
  759. package/dist/core/p-b70cc248.entry.js +0 -2
  760. package/dist/core/p-c0a5a3f7.entry.js +0 -2
  761. package/dist/core/p-c0a5a3f7.entry.js.map +0 -1
  762. package/dist/core/p-c5b5fd69.entry.js +0 -2
  763. package/dist/core/p-d1c4eb91.entry.js +0 -2
  764. package/dist/core/p-d3963396.entry.js +0 -2
  765. package/dist/core/p-d4fbc249.entry.js +0 -2
  766. package/dist/core/p-d4fbc249.entry.js.map +0 -1
  767. package/dist/core/p-d949aac7.entry.js +0 -2
  768. package/dist/core/p-d949aac7.entry.js.map +0 -1
  769. package/dist/core/p-e0d428c9.js +0 -2
  770. package/dist/core/p-e0d428c9.js.map +0 -1
  771. package/dist/core/p-e3aeaca0.js +0 -2
  772. package/dist/core/p-e3aeaca0.js.map +0 -1
  773. package/dist/core/p-e6af4c58.entry.js +0 -2
  774. package/dist/core/p-e6af4c58.entry.js.map +0 -1
  775. package/dist/core/p-ede7af0a.entry.js +0 -2
  776. package/dist/core/p-ede7af0a.entry.js.map +0 -1
  777. package/dist/core/p-eebc9e71.entry.js +0 -2
  778. package/dist/core/p-eebc9e71.entry.js.map +0 -1
  779. package/dist/core/p-eebf7ad8.entry.js +0 -2
  780. package/dist/core/p-f1c8a96b.entry.js +0 -2
  781. package/dist/core/p-f963bb2f.entry.js +0 -2
  782. package/dist/core/p-fb0df3a5.entry.js +0 -2
  783. package/dist/esm/colors-02c1ea96.js.map +0 -1
  784. package/dist/esm/form-472e078d.js.map +0 -1
  785. package/dist/esm/gov-flex.entry.js +0 -27
  786. package/dist/esm/gov-flex.entry.js.map +0 -1
  787. package/dist/esm/gov-form-label.entry.js +0 -23
  788. package/dist/esm/gov-form-label.entry.js.map +0 -1
  789. package/dist/esm/gov-icon.entry.js +0 -157
  790. package/dist/esm/gov-icon.entry.js.map +0 -1
  791. package/dist/esm/gov-theme-switch.entry.js +0 -69
  792. package/dist/esm/gov-theme-switch.entry.js.map +0 -1
  793. package/dist/esm/gov.log-6e9faad2.js +0 -19
  794. package/dist/esm/gov.log-6e9faad2.js.map +0 -1
  795. package/dist/esm/template-3d84d705.js.map +0 -1
  796. package/dist/esm/wcag-d7c6c252.js.map +0 -1
  797. package/dist/esm/win-cec370ad.js.map +0 -1
  798. /package/dist/components/{p-1d3019f3.js.map → p-31a99bfc.js.map} +0 -0
  799. /package/dist/components/{p-bd22e21d.js.map → p-4149f195.js.map} +0 -0
  800. /package/dist/components/{p-08621bdf.js.map → p-44a8a668.js.map} +0 -0
  801. /package/dist/components/{p-1f3bb41d.js.map → p-5952a5d0.js.map} +0 -0
  802. /package/dist/components/{p-565120d5.js.map → p-76d604c6.js.map} +0 -0
  803. /package/dist/components/{p-edd1417b.js.map → p-7f3becc5.js.map} +0 -0
  804. /package/dist/components/{p-7f8a24a7.js.map → p-860520b0.js.map} +0 -0
  805. /package/dist/components/{p-19c681a3.js.map → p-a2435993.js.map} +0 -0
  806. /package/dist/components/{p-59737af9.js.map → p-a521c59a.js.map} +0 -0
  807. /package/dist/components/{p-0c93dd39.js.map → p-c61a5830.js.map} +0 -0
  808. /package/dist/components/{p-23b7e680.js.map → p-dfb5794a.js.map} +0 -0
  809. /package/dist/core/{p-b50ffab3.entry.js.map → p-00d153bf.entry.js.map} +0 -0
  810. /package/dist/core/{p-d1c4eb91.entry.js.map → p-0be19b89.entry.js.map} +0 -0
  811. /package/dist/core/{p-215504c1.entry.js.map → p-22fa411d.entry.js.map} +0 -0
  812. /package/dist/core/{p-668ca722.entry.js.map → p-30eaeeec.entry.js.map} +0 -0
  813. /package/dist/core/{p-69d56f17.js.map → p-3bbb77a0.js.map} +0 -0
  814. /package/dist/core/{p-7591976a.entry.js.map → p-535316b4.entry.js.map} +0 -0
  815. /package/dist/core/{p-b822b9ff.entry.js.map → p-5396935e.entry.js.map} +0 -0
  816. /package/dist/core/{p-42d9924c.js.map → p-56efd4a2.js.map} +0 -0
  817. /package/dist/core/{p-8a796fbe.entry.js.map → p-5b2131c1.entry.js.map} +0 -0
  818. /package/dist/core/{p-60658ae9.js.map → p-5f1000da.js.map} +0 -0
  819. /package/dist/core/{p-b70cc248.entry.js.map → p-7b7e502b.entry.js.map} +0 -0
  820. /package/dist/core/{p-2614044c.js.map → p-7ba4daf4.js.map} +0 -0
  821. /package/dist/core/{p-6aa40794.js.map → p-7f3becc5.js.map} +0 -0
  822. /package/dist/core/{p-e9a6cd71.js.map → p-860520b0.js.map} +0 -0
  823. /package/dist/core/{p-169b67af.js.map → p-a2435993.js.map} +0 -0
  824. /package/dist/core/{p-4bce896c.js.map → p-a521c59a.js.map} +0 -0
  825. /package/dist/core/{p-2c3ddc57.entry.js.map → p-bc966c46.entry.js.map} +0 -0
  826. /package/dist/core/{p-c990d746.js.map → p-c61a5830.js.map} +0 -0
  827. /package/dist/core/{p-45a30859.js.map → p-e0e2e9c1.js.map} +0 -0
  828. /package/dist/core/{p-052cc573.js.map → p-e44a0fee.js.map} +0 -0
  829. /package/dist/core/{p-58dc3ec3.entry.js.map → p-e834ee73.entry.js.map} +0 -0
  830. /package/dist/core/{p-5ad3097c.entry.js.map → p-f7a4da9d.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"gov-attachments.gov-attachments-item.gov-form-message.entry.cjs.js","mappings":";;;;;;;;;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AAE,QAAQ,EAAEC,0BAAgB,CAAC,IAAI,CAAC,CAAA;KAChE;IAED,iBAAiB;QAChB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;KAC9B;IAED,MAAM;QACL,QACCP,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAACM,0BAAgB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,IACpF,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KACtBP,mEAAM,IAAI,EAAC,MAAM,GAAG,CACpB,EACDA,mEAAM,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAEO,0BAAgB,CAAC,OAAO,IACxDP,oEAAQ,CACF,CACD,EACP;KACD;;;;IAMD,MAAM,UAAU;QACf,OAAO,IAAI,CAAC,SAAS,CAAA;KACrB;;;;;;;;;;;","names":["govHost","canValidateWcagOnRender","delay","h","Host","validateWcagProp","validateAccessibleLabel","createID","validateProp","FormMessageColors","FormMessageClass"],"sources":["../../../packages/core/src/components/gov-attachments/constants.ts","../../../packages/core/src/components/gov-attachments/gov-attachments.tsx","../../../packages/core/src/components/gov-attachments/gov-attachments-item.scss?tag=gov-attachments-item","../../../packages/core/src/components/gov-attachments/gov-attachments-item.tsx","../../../packages/core/src/components/gov-form/message/gov-form-message.tsx"],"sourcesContent":["export const AttachmentsClass = {\n\troot: 'gov-attachments',\n\tlabel: 'gov-attachments__label',\n\tlist: 'gov-attachments__list',\n}\n\nexport const AttachmentsItemClass = {\n\troot: 'gov-attachments-item',\n\tname: 'gov-attachments-item__name',\n\tfile: 'gov-attachments-item__file',\n\tmessages: 'gov-attachments-item__messages',\n}\n","import { Component, Element, h, Host, Method, Prop } from '@stencil/core'\nimport { AttachmentsClass } from './constants'\nimport { validateWcagProp } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-attachments',\n})\nexport class GovAttachments {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovAttachmentsElement\n\t/**\n\t * Label of attachments section\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Adds accessible label for the attachment section that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AttachmentsClass.root)}>\n\t\t\t\t{this.label ? <p class={AttachmentsClass.label}>{this.label}</p> : null}\n\t\t\t\t<div class={AttachmentsClass.list} role=\"list\" aria-label={this.wcagLabel}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagProp(this.wcagLabel, 'wcag-label', AttachmentsClass.root)\n\t}\n}\n","/* Attachments - Item */\n\n\ngov-attachments-item, .gov-attachments-item {\n\t// VARIABLES\n\t@import \"gov-attachments-variables\";\n\n\t@include base($display: flex);\n\tgap: var(--spacing-s);\n\t&__messages {\n\t\t@include reset-last-margin();\n\t}\n\t&__file {\n\t\tdisplay: flex;\n\t\tgap: var(--spacing-s);\n\t}\n\t&__name {\n\t\tdisplay: flex;\n\t\tgap: var(--spacing-s);\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\tmargin: 0;\n\t\tcolor: $attachments-name-color;\n\t\tspan {\n\t\t\t@include typography(\"xs\");\n\t\t\tcolor: $attachments-decor-color;\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop} from '@stencil/core'\nimport {AttachmentsItemClass} from './constants'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {delay} from '../../utils/utils'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-attachments-item',\n\tstyleUrl: 'gov-attachments-item.scss',\n})\nexport class GovAttachmentsItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovAttachmentsItemElement\n\n\t/**\n\t * Adds accessible label for the remove button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-remove-label'}) readonly accessibleRemoveLabel: string\n\t/**\n\t * Indicates the id of a component that labels the remove button.\n\t */\n\t@Prop({attribute: 'accessible-remove-labelledby'}) readonly accessibleRemoveLabelledBy: string\n\t/**\n\t * Emitted when the file is removed\n\t */\n\t@Event({eventName: 'gov-remove'}) govRemove: EventEmitter<PointerEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AttachmentsItemClass.root)} role=\"listitem\">\n\t\t\t\t<div class={AttachmentsItemClass.file}>\n\t\t\t\t\t<p class={AttachmentsItemClass.name}>\n\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t<slot name=\"info\"/>\n\t\t\t\t\t</p>\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\taria-label={this.accessibleRemoveLabel}\n\t\t\t\t\t\taria-labelledby={this.accessibleRemoveLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.govRemove.emit}\n\t\t\t\t\t>\n\t\t\t\t\t\t<gov-icon slot=\"left-icon\" name=\"x-lg\"></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot('message') && (\n\t\t\t\t\t<div class={AttachmentsItemClass.messages}>\n\t\t\t\t\t\t<slot name=\"message\"/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the accessible attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateAccessibleLabel(this.accessibleRemoveLabel, this.accessibleRemoveLabelledBy, AttachmentsItemClass.root, this.host)\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop, Watch } from '@stencil/core'\nimport {FormMessageClass, FormMessageSizesTypes, FormMessageColors, FormMessageColorType} from './constants'\nimport { govHost } from '../../../helpers/Dom/template'\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { createID } from '../../../utils/string.utils'\n\n@Component({\n\ttag: 'gov-form-message',\n})\nexport class GovFormMessage {\n\th: GovHost\n\tprivate readonly messageId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.messageId = createID('GovFormMessage')\n\t}\n\n\t@Element() host: HTMLGovFormMessageElement\n\t/**\n\t * Style variation of the message.\n\t */\n\t@Prop({ attribute: 'color' }) readonly color?: FormMessageColorType = 'neutral'\n\t/**\n\t * Message's size.\n\t */\n\t@Prop() readonly size?: FormMessageSizesTypes = 'm'\n\n\t@Watch('color')\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(FormMessageColors, newValue, FormMessageClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FormMessageClass.root)} color={this.color} size={this.size}>\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t)}\n\t\t\t\t<span id={this.messageId} class={FormMessageClass.content}>\n\t\t\t\t\t<slot />\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns unique identifier of message\n\t */\n\t@Method()\n\tasync identifier(): Promise<string> {\n\t\treturn this.messageId\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-attachments.gov-attachments-item.gov-form-message.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;AAAO,MAAM,gBAAgB,GAAG;IAC/B,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,wBAAwB;IAC/B,IAAI,EAAE,uBAAuB;CAC7B,CAAA;AAEM,MAAM,oBAAoB,GAAG;IACnC,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE,4BAA4B;IAClC,QAAQ,EAAE,gCAAgC;CAC1C;;MCAY,cAAc;IAG1B;;;;QACC,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAYD,MAAM,kBAAkB;QACvB,IAAIC,+BAAuB,EAAE,EAAE;YAC9B,MAAMC,WAAK,CAAC,GAAG,CAAC,CAAA;YAChB,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;SACzB;KACD;IAED,MAAM;QACL,QACCC,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAChD,IAAI,CAAC,KAAK,GAAGD,eAAG,KAAK,EAAE,gBAAgB,CAAC,KAAK,IAAG,IAAI,CAAC,KAAK,CAAK,GAAG,IAAI,EACvEA,kEAAK,KAAK,EAAE,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAC,MAAM,gBAAa,IAAI,CAAC,SAAS,IACxEA,oEAAQ,CACH,CACA,EACP;KACD;;;;IAMD,MAAM,YAAY;QACjBE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0BAA0B,EAAE,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;KAC1H;;;;;MClEW,cAAc;IAI1B;;qBASsE,SAAS;oBAI/B,GAAG;QAZlD,IAAI,CAAC,CAAC,GAAGN,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,SAAS,GAAGO,qBAAQ,CAAC,gBAAgB,CAAC,CAAA;KAC3C;IAaD,aAAa,CAAC,QAAgB;QAC7BC,kBAAY,CAACC,2BAAiB,EAAE,QAAQ,EAAEC,0BAAgB,CAAC,IAAI,CAAC,CAAA;KAChE;IAED,iBAAiB;QAChB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;KAC9B;IAED,MAAM;QACL,QACCP,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAACM,0BAAgB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,IACpF,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KACtBP,mEAAM,IAAI,EAAC,MAAM,GAAG,CACpB,EACDA,mEAAM,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAEO,0BAAgB,CAAC,OAAO,IACxDP,oEAAQ,CACF,CACD,EACP;KACD;;;;IAMD,MAAM,UAAU;QACf,OAAO,IAAI,CAAC,SAAS,CAAA;KACrB;;;;;;;;;;;","names":["govHost","canValidateWcagOnRender","delay","h","Host","validateWcagProp","validateAccessibleLabel","createID","validateProp","FormMessageColors","FormMessageClass"],"sources":["../../../packages/core/src/components/gov-attachments/constants.ts","../../../packages/core/src/components/gov-attachments/gov-attachments.tsx","../../../packages/core/src/components/gov-attachments/gov-attachments-item.scss?tag=gov-attachments-item","../../../packages/core/src/components/gov-attachments/gov-attachments-item.tsx","../../../packages/core/src/components/gov-form/message/gov-form-message.tsx"],"sourcesContent":["export const AttachmentsClass = {\n\troot: 'gov-attachments',\n\tlabel: 'gov-attachments__label',\n\tlist: 'gov-attachments__list',\n}\n\nexport const AttachmentsItemClass = {\n\troot: 'gov-attachments-item',\n\tname: 'gov-attachments-item__name',\n\tfile: 'gov-attachments-item__file',\n\tmessages: 'gov-attachments-item__messages',\n}\n","import { Component, Element, h, Host, Method, Prop } from '@stencil/core'\nimport { AttachmentsClass } from './constants'\nimport { validateWcagProp } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-attachments',\n})\nexport class GovAttachments {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovAttachmentsElement\n\t/**\n\t * Label of attachments section\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Adds accessible label for the attachment section that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AttachmentsClass.root)}>\n\t\t\t\t{this.label ? <p class={AttachmentsClass.label}>{this.label}</p> : null}\n\t\t\t\t<div class={AttachmentsClass.list} role=\"list\" aria-label={this.wcagLabel}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagProp(this.wcagLabel, 'wcag-label', AttachmentsClass.root)\n\t}\n}\n","/* Attachments - Item */\n\n\ngov-attachments-item, .gov-attachments-item {\n\t// VARIABLES\n\t@import \"gov-attachments-variables\";\n\n\t@include base($display: flex);\n\tgap: var(--spacing-s);\n\t&__messages {\n\t\t@include reset-last-margin();\n\t}\n\t&__file {\n\t\tdisplay: flex;\n\t\tgap: var(--spacing-s);\n\t}\n\t&__name {\n\t\tdisplay: flex;\n\t\tgap: var(--spacing-s);\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\tmargin: 0;\n\t\tcolor: $attachments-name-color;\n\t\tspan {\n\t\t\t@include typography(\"xs\");\n\t\t\tcolor: $attachments-decor-color;\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop} from '@stencil/core'\nimport {AttachmentsItemClass} from './constants'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {delay} from '../../utils/utils'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-attachments-item',\n\tstyleUrl: 'gov-attachments-item.scss',\n})\nexport class GovAttachmentsItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovAttachmentsItemElement\n\n\t/**\n\t * Adds accessible label for the remove button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-remove-label'}) readonly accessibleRemoveLabel: string\n\t/**\n\t * Indicates the id of a component that labels the remove button.\n\t */\n\t@Prop({attribute: 'accessible-remove-labelledby'}) readonly accessibleRemoveLabelledBy: string\n\t/**\n\t * Emitted when the file is removed\n\t */\n\t@Event({eventName: 'gov-remove'}) govRemove: EventEmitter<PointerEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AttachmentsItemClass.root)} role=\"listitem\">\n\t\t\t\t<div class={AttachmentsItemClass.file}>\n\t\t\t\t\t<p class={AttachmentsItemClass.name}>\n\t\t\t\t\t\t<slot/>\n\t\t\t\t\t\t<slot name=\"info\"/>\n\t\t\t\t\t</p>\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\taria-label={this.accessibleRemoveLabel}\n\t\t\t\t\t\taria-labelledby={this.accessibleRemoveLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.govRemove.emit}\n\t\t\t\t\t>\n\t\t\t\t\t\t<gov-icon slot=\"icon-start\" name=\"x-lg\" type=\"components\"></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot('message') && (\n\t\t\t\t\t<div class={AttachmentsItemClass.messages}>\n\t\t\t\t\t\t<slot name=\"message\"/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the accessible attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateAccessibleLabel(this.accessibleRemoveLabel, this.accessibleRemoveLabelledBy, AttachmentsItemClass.root, this.host)\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop, Watch } from '@stencil/core'\nimport {FormMessageClass, FormMessageSizesTypes, FormMessageColors, FormMessageColorType} from './constants'\nimport { govHost } from '../../../helpers/Dom/template'\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { createID } from '../../../utils/string.utils'\n\n@Component({\n\ttag: 'gov-form-message',\n})\nexport class GovFormMessage {\n\th: GovHost\n\tprivate readonly messageId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.messageId = createID('GovFormMessage')\n\t}\n\n\t@Element() host: HTMLGovFormMessageElement\n\t/**\n\t * Style variation of the message.\n\t */\n\t@Prop({ attribute: 'color' }) readonly color?: FormMessageColorType = 'neutral'\n\t/**\n\t * Message's size.\n\t */\n\t@Prop() readonly size?: FormMessageSizesTypes = 'm'\n\n\t@Watch('color')\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(FormMessageColors, newValue, FormMessageClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FormMessageClass.root)} color={this.color} size={this.size}>\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t)}\n\t\t\t\t<span id={this.messageId} class={FormMessageClass.content}>\n\t\t\t\t\t<slot />\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns unique identifier of message\n\t */\n\t@Method()\n\tasync identifier(): Promise<string> {\n\t\treturn this.messageId\n\t}\n}\n"],"version":3}
@@ -3,11 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-7ff4447c.js');
6
- const wcag = require('./wcag-b8d80c7d.js');
7
- const win = require('./win-587f4614.js');
8
- const template = require('./template-b070338f.js');
6
+ const wcag = require('./wcag-2927ff73.js');
7
+ const gov_log = require('./gov.log-bfea3151.js');
8
+ const template = require('./template-39939fd6.js');
9
9
  const stencil_utils = require('./stencil.utils-182382ee.js');
10
- require('./gov.log-1e8bab6e.js');
11
10
  require('./string.utils-b84c81cf.js');
12
11
  require('./helpers.types-ff60c9bd.js');
13
12
  require('./utils-d263c5c6.js');
@@ -28,7 +27,7 @@ const GovBackdrop = class {
28
27
  this.h = template.govHost(this.host);
29
28
  }
30
29
  async componentDidRender() {
31
- if (win.canValidateWcagOnRender()) {
30
+ if (gov_log.canValidateWcagOnRender()) {
32
31
  stencil_utils.tick(() => this.validateAccessibility());
33
32
  }
34
33
  }
@@ -1 +1 @@
1
- {"file":"gov-backdrop.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAO,MAAM,aAAa,GAAG;IAC5B,IAAI,EAAE,cAAc;IACpB,EAAE,EAAE,0BAA0B;CAC9B;;MCQY,WAAW;IAGvB;;;uBAQoC,KAAK;wBAI0B,KAAK;;;QAXvE,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAwBD,MAAM,kBAAkB;QACvB,IAAIC,2BAAuB,EAAE,EAAE;YAC9BC,kBAAI,CAAC,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAA;SACxC;KACD;IAED,MAAM;QACL,QACCC,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IACrED,kEACC,IAAI,EAAE,QAAQ,mBACC,IAAI,CAAC,QAAQ,gBAChB,IAAI,CAAC,eAAe,qBACf,IAAI,CAAC,oBAAoB,EAC1C,OAAO,EAAE,CAAC;gBACT,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;oBACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;iBACrB;aACD,EACD,KAAK,EAAE,aAAa,CAAC,EAAE,GACjB,CACD,EACP;KACD;;;;IAMD,MAAM,qBAAqB;QAC1BE,4BAAuB,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,oBAAoB,EAAE,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;KACvG;;;;;;","names":["govHost","canValidateWcagOnRender","tick","h","Host","validateAccessibleLabel"],"sources":["../../../packages/core/src/components/gov-backdrop/constants.ts","../../../packages/core/src/components/gov-backdrop/gov-backdrop.tsx"],"sourcesContent":["export const BackdropClass = {\n\troot: 'gov-backdrop',\n\tbg: 'gov-backdrop__background',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop} from '@stencil/core'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {BackdropClass} from './constants'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-backdrop',\n})\nexport class GovBackdrop {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovBackdropElement\n\t/**\n\t * Determine if component should have inverse colors to be used on dark background.\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Makes the backdrop component disabled.\n\t */\n\t@Prop({reflect: true, mutable: true}) readonly disabled: boolean = false\n\t/**\n\t * Adds accessible label for the backdrop that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-label'}) readonly accessibleLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({attribute: 'accessible-labelledby'}) readonly accessibleLabelledBy: string\n\t/**\n\t * Emitted when button clicks.\n\t */\n\t@Event({eventName: 'gov-click'}) govClick: EventEmitter<MouseEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\ttick(() => this.validateAccessibility())\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BackdropClass.root)} inverse={this.inverse}>\n\t\t\t\t<div\n\t\t\t\t\trole={'button'}\n\t\t\t\t\taria-disabled={this.disabled}\n\t\t\t\t\taria-label={this.accessibleLabel}\n\t\t\t\t\taria-labelledby={this.accessibleLabelledBy}\n\t\t\t\t\tonClick={e => {\n\t\t\t\t\t\tif (!this.disabled) {\n\t\t\t\t\t\t\tthis.govClick.emit(e)\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tclass={BackdropClass.bg}\n\t\t\t\t></div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the accessibility attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateAccessibleLabel(this.accessibleLabel, this.accessibleLabelledBy, BackdropClass.root, this.host)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-backdrop.entry.cjs.js","mappings":";;;;;;;;;;;;;AAAO,MAAM,aAAa,GAAG;IAC5B,IAAI,EAAE,cAAc;IACpB,EAAE,EAAE,0BAA0B;CAC9B;;MCQY,WAAW;IAGvB;;;uBAQoC,KAAK;wBAI0B,KAAK;;;QAXvE,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAwBD,MAAM,kBAAkB;QACvB,IAAIC,+BAAuB,EAAE,EAAE;YAC9BC,kBAAI,CAAC,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAA;SACxC;KACD;IAED,MAAM;QACL,QACCC,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IACrED,kEACC,IAAI,EAAE,QAAQ,mBACC,IAAI,CAAC,QAAQ,gBAChB,IAAI,CAAC,eAAe,qBACf,IAAI,CAAC,oBAAoB,EAC1C,OAAO,EAAE,CAAC;gBACT,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;oBACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;iBACrB;aACD,EACD,KAAK,EAAE,aAAa,CAAC,EAAE,GACjB,CACD,EACP;KACD;;;;IAMD,MAAM,qBAAqB;QAC1BE,4BAAuB,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,oBAAoB,EAAE,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;KACvG;;;;;;","names":["govHost","canValidateWcagOnRender","tick","h","Host","validateAccessibleLabel"],"sources":["../../../packages/core/src/components/gov-backdrop/constants.ts","../../../packages/core/src/components/gov-backdrop/gov-backdrop.tsx"],"sourcesContent":["export const BackdropClass = {\n\troot: 'gov-backdrop',\n\tbg: 'gov-backdrop__background',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop} from '@stencil/core'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {BackdropClass} from './constants'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-backdrop',\n})\nexport class GovBackdrop {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovBackdropElement\n\t/**\n\t * Determine if component should have inverse colors to be used on dark background.\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Makes the backdrop component disabled.\n\t */\n\t@Prop({reflect: true, mutable: true}) readonly disabled: boolean = false\n\t/**\n\t * Adds accessible label for the backdrop that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-label'}) readonly accessibleLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({attribute: 'accessible-labelledby'}) readonly accessibleLabelledBy: string\n\t/**\n\t * Emitted when button clicks.\n\t */\n\t@Event({eventName: 'gov-click'}) govClick: EventEmitter<MouseEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\ttick(() => this.validateAccessibility())\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BackdropClass.root)} inverse={this.inverse}>\n\t\t\t\t<div\n\t\t\t\t\trole={'button'}\n\t\t\t\t\taria-disabled={this.disabled}\n\t\t\t\t\taria-label={this.accessibleLabel}\n\t\t\t\t\taria-labelledby={this.accessibleLabelledBy}\n\t\t\t\t\tonClick={e => {\n\t\t\t\t\t\tif (!this.disabled) {\n\t\t\t\t\t\t\tthis.govClick.emit(e)\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tclass={BackdropClass.bg}\n\t\t\t\t></div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the accessibility attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateAccessibleLabel(this.accessibleLabel, this.accessibleLabelledBy, BackdropClass.root, this.host)\n\t}\n}\n"],"version":3}
@@ -3,11 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-7ff4447c.js');
6
- const wcag = require('./wcag-b8d80c7d.js');
7
- const win = require('./win-587f4614.js');
8
- const template = require('./template-b070338f.js');
6
+ const wcag = require('./wcag-2927ff73.js');
7
+ const gov_log = require('./gov.log-bfea3151.js');
8
+ const template = require('./template-39939fd6.js');
9
9
  const stencil_utils = require('./stencil.utils-182382ee.js');
10
- require('./gov.log-1e8bab6e.js');
11
10
  require('./string.utils-b84c81cf.js');
12
11
  require('./helpers.types-ff60c9bd.js');
13
12
  require('./utils-d263c5c6.js');
@@ -32,7 +31,7 @@ const GovBreadcrumbs = class {
32
31
  }
33
32
  async componentDidRender() {
34
33
  this.scheduleContentVerification();
35
- if (win.canValidateWcagOnRender()) {
34
+ if (gov_log.canValidateWcagOnRender()) {
36
35
  stencil_utils.tick(() => this.validateAccessibility());
37
36
  }
38
37
  }
@@ -54,7 +53,7 @@ const GovBreadcrumbs = class {
54
53
  this.toggleOption = sumOfWidths > hostWidth;
55
54
  }
56
55
  render() {
57
- return (index.h(index.Host, { key: '81d7a8e273e1ce4740ee35ebe4a570ee8c5e73a4', class: this.h.classes(BreadcrumbsClass.root), expanded: this.expanded }, index.h("nav", { key: 'dc37fa314f5d84c6c517f64229ef601b256f3ad5', "aria-label": this.accessibleLabel, "aria-labelledby": this.accessibleLabelledBy }, index.h("slot", { key: '4ead548352e642c0994360d74a98123782790a04' })), this.toggleOption ? (index.h("gov-button", { size: 'xs', color: 'primary', type: 'base', "aria-label": this.accessibleToggleLabel, "aria-pressed": this.expanded, "aria-expanded": this.expanded, "on-gov-click": () => this.expanded = !this.expanded }, index.h("gov-icon", { name: this.expanded ? 'chevron-up' : 'chevron-down' }))) : null));
56
+ return (index.h(index.Host, { key: '81d7a8e273e1ce4740ee35ebe4a570ee8c5e73a4', class: this.h.classes(BreadcrumbsClass.root), expanded: this.expanded }, index.h("nav", { key: 'dc37fa314f5d84c6c517f64229ef601b256f3ad5', "aria-label": this.accessibleLabel, "aria-labelledby": this.accessibleLabelledBy }, index.h("slot", { key: '4ead548352e642c0994360d74a98123782790a04' })), this.toggleOption ? (index.h("gov-button", { size: 'xs', color: 'primary', type: 'base', "aria-label": this.accessibleToggleLabel, "aria-pressed": this.expanded, "aria-expanded": this.expanded, "on-gov-click": () => this.expanded = !this.expanded }, index.h("gov-icon", { name: this.expanded ? 'chevron-up' : 'chevron-down', type: "components" }))) : null));
58
57
  }
59
58
  /**
60
59
  * Validate the WCAG attributes of the component
@@ -1 +1 @@
1
- {"file":"gov-breadcrumbs.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAO,MAAM,gBAAgB,GAAG;IAC/B,IAAI,EAAE,iBAAiB;CACvB;;MCUY,cAAc;IAI1B;;;QAHQ,WAAM,GAAG,KAAK,CAAC;2BAWiB,KAAK;0BAIoB,KAAK;;;qCAYiB,4BAA4B;wBAM/F,KAAK;4BACD,KAAK;QA9B5B,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IA+BD,MAAM,kBAAkB;QACvB,IAAI,CAAC,2BAA2B,EAAE,CAAA;QAClC,IAAIC,2BAAuB,EAAE,EAAE;YAC9BC,kBAAI,CAAC,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAA;SACxC;KACD;IAEO,2BAA2B;QAClC,IAAI,IAAI,CAAC,MAAM;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AgB,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;QAC1GA,4BAAuB,CAAC,IAAI,CAAC,qBAAqB,EAAE,SAAS,EAAE,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;KAChG;;;;;;","names":["govHost","canValidateWcagOnRender","tick","h","Host","validateAccessibleLabel"],"sources":["../../../packages/core/src/components/gov-breadcrumbs/constants.ts","../../../packages/core/src/components/gov-breadcrumbs/gov-breadcrumbs.tsx"],"sourcesContent":["export const BreadcrumbsClass = {\n\troot: 'gov-breadcrumbs',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State} from '@stencil/core'\nimport {BreadcrumbsClass} from './constants'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {GovBreadcrumbsChangeEvent} from './gov-breadcrumbs.d'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-breadcrumbs',\n})\nexport class GovBreadcrumbs {\n\tprivate inited = false;\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovBreadcrumbsElement\n\t/**\n\t * Defines whether the components can be collapsible when element doesn't fit in one row.\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Defines whether the breadcrumbs are open or closed by button\n\t */\n\t@Prop({attribute: 'is-expanded'}) readonly isExpanded: boolean = false\n\t/**\n\t * Adds accessible label for the pagination that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-label'}) readonly accessibleLabel: string\n\t/**\n\t * Indicates the id of a component that labels the pagination.\n\t */\n\t@Prop({attribute: 'accessible-labelledby'}) readonly accessibleLabelledBy: string\n\t/**\n\t * Adds an accessible label to display the full breadcrumb navigation that only screen readers can see.\n\t */\n\t@Prop({attribute: 'accessible-toggle-label'}) readonly accessibleToggleLabel: string = 'Zobrazit či skrýt navigaci'\n\t/**\n\t * Called when the Breadcrumbs state changes\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<GovBreadcrumbsChangeEvent>\n\n\t@State() expanded = false;\n\t@State() toggleOption = false;\n\n\tasync componentDidRender() {\n\t\tthis.scheduleContentVerification()\n\t\tif (canValidateWcagOnRender()) {\n\t\t\ttick(() => this.validateAccessibility())\n\t\t}\n\t}\n\n\tprivate scheduleContentVerification() {\n\t\tif (this.inited) return;\n\t\tthis.inited = true;\n\t\ttick(() => {\n\t\t\tthis.calculateWidthOfItems();\n\t\t\tthis.inited = false;\n\t\t});\n\t}\n\n\tprivate calculateWidthOfItems() {\n\t\tconst hostWidth = this.host.getBoundingClientRect().width;\n\t\tlet sumOfWidths = 0;\n\t\tthis.host.querySelectorAll('li').forEach((li) => {\n\t\t\tsumOfWidths += li.getBoundingClientRect().width\n\t\t})\n\t\tthis.toggleOption = sumOfWidths > hostWidth;\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BreadcrumbsClass.root)} expanded={this.expanded}>\n\t\t\t\t<nav aria-label={this.accessibleLabel} aria-labelledby={this.accessibleLabelledBy}>\n\t\t\t\t\t<slot/>\n\t\t\t\t</nav>\n\t\t\t\t{this.toggleOption ? (\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\tsize={'xs'}\n\t\t\t\t\t\tcolor={'primary'}\n\t\t\t\t\t\ttype={'base'}\n\t\t\t\t\t\taria-label={this.accessibleToggleLabel}\n\t\t\t\t\t\taria-pressed={this.expanded}\n\t\t\t\t\t\taria-expanded={this.expanded}\n\t\t\t\t\t\ton-gov-click={() => this.expanded = !this.expanded}\n\t\t\t\t\t>\n\t\t\t\t\t\t<gov-icon name={this.expanded ? 'chevron-up' : 'chevron-down'}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateAccessibleLabel(this.accessibleLabel, this.accessibleLabelledBy, BreadcrumbsClass.root, this.host)\n\t\tvalidateAccessibleLabel(this.accessibleToggleLabel, undefined, BreadcrumbsClass.root, this.host)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-breadcrumbs.entry.cjs.js","mappings":";;;;;;;;;;;;;AAAO,MAAM,gBAAgB,GAAG;IAC/B,IAAI,EAAE,iBAAiB;CACvB;;MCUY,cAAc;IAI1B;;;QAHQ,WAAM,GAAG,KAAK,CAAC;2BAWiB,KAAK;0BAIoB,KAAK;;;qCAYiB,4BAA4B;wBAM/F,KAAK;4BACD,KAAK;QA9B5B,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IA+BD,MAAM,kBAAkB;QACvB,IAAI,CAAC,2BAA2B,EAAE,CAAA;QAClC,IAAIC,+BAAuB,EAAE,EAAE;YAC9BC,kBAAI,CAAC,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAA;SACxC;KACD;IAEO,2BAA2B;QAClC,IAAI,IAAI,CAAC,MAAM;YAAE,OAAO;QACxB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnBA,kBAAI,CAAC;YACJ,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAC7B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;SACpB,CAAC,CAAC;KACH;IAEO,qBAAqB;QAC5B,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAC;QAC1D,IAAI,WAAW,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE;YAC3C,WAAW,IAAI,EAAE,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAA;SAC/C,CAAC,CAAA;QACF,IAAI,CAAC,YAAY,GAAG,WAAW,GAAG,SAAS,CAAC;KAC5C;IAED,MAAM;QACL,QACCC,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAC1ED,gFAAiB,IAAI,CAAC,eAAe,qBAAmB,IAAI,CAAC,oBAAoB,IAChFA,oEAAO,CACF,EACL,IAAI,CAAC,YAAY,IACjBA,wBACC,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,MAAM,gBACA,IAAI,CAAC,qBAAqB,kBACxB,IAAI,CAAC,QAAQ,mBACZ,IAAI,CAAC,QAAQ,kBACd,MAAM,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,IAElDA,sBAAU,IAAI,EAAE,IAAI,CAAC,QAAQ,GAAG,YAAY,GAAG,cAAc,EAAE,IAAI,EAAC,YAAY,GAAY,CAChF,IACV,IAAI,CACF,EACP;KACD;;;;IAOD,MAAM,qBAAqB;QAC1BE,4BAAuB,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;QAC1GA,4BAAuB,CAAC,IAAI,CAAC,qBAAqB,EAAE,SAAS,EAAE,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;KAChG;;;;;;","names":["govHost","canValidateWcagOnRender","tick","h","Host","validateAccessibleLabel"],"sources":["../../../packages/core/src/components/gov-breadcrumbs/constants.ts","../../../packages/core/src/components/gov-breadcrumbs/gov-breadcrumbs.tsx"],"sourcesContent":["export const BreadcrumbsClass = {\n\troot: 'gov-breadcrumbs',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State} from '@stencil/core'\nimport {BreadcrumbsClass} from './constants'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {GovBreadcrumbsChangeEvent} from './gov-breadcrumbs.d'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-breadcrumbs',\n})\nexport class GovBreadcrumbs {\n\tprivate inited = false;\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovBreadcrumbsElement\n\t/**\n\t * Defines whether the components can be collapsible when element doesn't fit in one row.\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Defines whether the breadcrumbs are open or closed by button\n\t */\n\t@Prop({attribute: 'is-expanded'}) readonly isExpanded: boolean = false\n\t/**\n\t * Adds accessible label for the pagination that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-label'}) readonly accessibleLabel: string\n\t/**\n\t * Indicates the id of a component that labels the pagination.\n\t */\n\t@Prop({attribute: 'accessible-labelledby'}) readonly accessibleLabelledBy: string\n\t/**\n\t * Adds an accessible label to display the full breadcrumb navigation that only screen readers can see.\n\t */\n\t@Prop({attribute: 'accessible-toggle-label'}) readonly accessibleToggleLabel: string = 'Zobrazit či skrýt navigaci'\n\t/**\n\t * Called when the Breadcrumbs state changes\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<GovBreadcrumbsChangeEvent>\n\n\t@State() expanded = false;\n\t@State() toggleOption = false;\n\n\tasync componentDidRender() {\n\t\tthis.scheduleContentVerification()\n\t\tif (canValidateWcagOnRender()) {\n\t\t\ttick(() => this.validateAccessibility())\n\t\t}\n\t}\n\n\tprivate scheduleContentVerification() {\n\t\tif (this.inited) return;\n\t\tthis.inited = true;\n\t\ttick(() => {\n\t\t\tthis.calculateWidthOfItems();\n\t\t\tthis.inited = false;\n\t\t});\n\t}\n\n\tprivate calculateWidthOfItems() {\n\t\tconst hostWidth = this.host.getBoundingClientRect().width;\n\t\tlet sumOfWidths = 0;\n\t\tthis.host.querySelectorAll('li').forEach((li) => {\n\t\t\tsumOfWidths += li.getBoundingClientRect().width\n\t\t})\n\t\tthis.toggleOption = sumOfWidths > hostWidth;\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BreadcrumbsClass.root)} expanded={this.expanded}>\n\t\t\t\t<nav aria-label={this.accessibleLabel} aria-labelledby={this.accessibleLabelledBy}>\n\t\t\t\t\t<slot/>\n\t\t\t\t</nav>\n\t\t\t\t{this.toggleOption ? (\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\tsize={'xs'}\n\t\t\t\t\t\tcolor={'primary'}\n\t\t\t\t\t\ttype={'base'}\n\t\t\t\t\t\taria-label={this.accessibleToggleLabel}\n\t\t\t\t\t\taria-pressed={this.expanded}\n\t\t\t\t\t\taria-expanded={this.expanded}\n\t\t\t\t\t\ton-gov-click={() => this.expanded = !this.expanded}\n\t\t\t\t\t>\n\t\t\t\t\t\t<gov-icon name={this.expanded ? 'chevron-up' : 'chevron-down'} type=\"components\"></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tvalidateAccessibleLabel(this.accessibleLabel, this.accessibleLabelledBy, BreadcrumbsClass.root, this.host)\n\t\tvalidateAccessibleLabel(this.accessibleToggleLabel, undefined, BreadcrumbsClass.root, this.host)\n\t}\n}\n"],"version":3}
@@ -3,17 +3,16 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-7ff4447c.js');
6
- const props = require('./props-b8a955b2.js');
7
- const constants = require('./constants-861428a4.js');
8
- const template = require('./template-b070338f.js');
6
+ const props = require('./props-d189860c.js');
7
+ const constants = require('./constants-f464dc4c.js');
8
+ const template = require('./template-39939fd6.js');
9
9
  const sizes = require('./sizes-89f8d3b2.js');
10
- const wcag = require('./wcag-b8d80c7d.js');
11
- const win = require('./win-587f4614.js');
10
+ const wcag = require('./wcag-2927ff73.js');
11
+ const gov_log = require('./gov.log-bfea3151.js');
12
12
  const utils = require('./utils-d263c5c6.js');
13
13
  const accessibility = require('./accessibility-c475826b.js');
14
14
  const attribute = require('./attribute-06dc5228.js');
15
- require('./gov.log-1e8bab6e.js');
16
- require('./colors-976f6dff.js');
15
+ require('./colors-f7c8eadd.js');
17
16
  require('./string.utils-b84c81cf.js');
18
17
  require('./helpers.types-ff60c9bd.js');
19
18
 
@@ -96,7 +95,7 @@ const GovButton = class {
96
95
  this.inheritedAttributes = accessibility.inheritAriaAttributes(this.host);
97
96
  }
98
97
  async componentDidRender() {
99
- if (win.canValidateWcagOnRender()) {
98
+ if (gov_log.canValidateWcagOnRender()) {
100
99
  await utils.delay(500);
101
100
  await this.validateAccessibility();
102
101
  }
@@ -107,9 +106,9 @@ const GovButton = class {
107
106
  render() {
108
107
  const Tag = this.href ? Tags.A : Tags.BUTTON;
109
108
  const nativeType = Tag === Tags.A ? undefined : this.nativeType;
110
- return (index.h(index.Host, { key: '4e5ef3fbf897b81b07452a9383985353d673fdd6', size: this.size, hydrated: this.hydrated, color: this.color, class: this.h.classes(constants.ButtonClass.root), type: this.type }, index.h(Tag, Object.assign({ key: 'd0689b6c773257059fa9334d4bb1d003a0ec58c3', class: "element", ref: el => (this.triggerRef = el), onClick: this.onClickHandler.bind(this), onFocus: this.onFocusHandler.bind(this), onBlur: this.onBlurHandler.bind(this), disabled: this.disabled, id: this.identifier, href: this.href, target: this.target, download: this.download, hreflang: this.hreflang, rel: this.rel, name: this.name, type: nativeType, tabindex: this.disabled ? "-1" : "0" }, this.inheritedAttributes, { "aria-disabled": template.toBoolAttrIfDefined(this.disabled) }), toBool(this.loading) && !this.h.hasSlot("right-icon") &&
111
- index.h("gov-icon", { key: 'be89312696bdc6842d2717df100d5b790e20694f', name: "loader", class: "gov-spin-animation" }), this.h.hasSlot("left-icon") && index.h("slot", { key: '6ccce190fa47027c603e008e37717c927dabd0b6', name: "left-icon" }), index.h("slot", { key: 'd6eb7343fc7ad6f389743d7bbae3b0ab8d2f8e93' }), this.h.hasSlot("right-icon") && index.h("slot", { key: '74736acdc5bec2f315c9cea45009b1d1b6ab6c8b', name: "right-icon" }), toBool(this.loading) && this.h.hasSlot("right-icon") &&
112
- index.h("gov-icon", { key: '885f29b2d141823731e56ca50c6c89661c014322', name: "loader", class: "gov-spin-animation" }))));
109
+ return (index.h(index.Host, { key: '4e5ef3fbf897b81b07452a9383985353d673fdd6', size: this.size, hydrated: this.hydrated, color: this.color, class: this.h.classes(constants.ButtonClass.root), type: this.type }, index.h(Tag, Object.assign({ key: 'd0689b6c773257059fa9334d4bb1d003a0ec58c3', class: "element", ref: el => (this.triggerRef = el), onClick: this.onClickHandler.bind(this), onFocus: this.onFocusHandler.bind(this), onBlur: this.onBlurHandler.bind(this), disabled: this.disabled, id: this.identifier, href: this.href, target: this.target, download: this.download, hreflang: this.hreflang, rel: this.rel, name: this.name, type: nativeType, tabindex: this.disabled ? "-1" : "0" }, this.inheritedAttributes, { "aria-disabled": template.toBoolAttrIfDefined(this.disabled) }), toBool(this.loading) && !this.h.hasSlot("icon-end") &&
110
+ index.h("gov-icon", { key: '16a969ee29897508924e61d70b40589d0410f649', name: "loader", class: "gov-spin-animation", type: "components" }), this.h.hasSlot("icon-start") && index.h("slot", { key: '7d208cc950fedd5b6bbf376152a0c641d8885846', name: "icon-start" }), index.h("slot", { key: '7c43309c657363dbcc1df14ae3c21d977ec3eb20' }), this.h.hasSlot("icon-end") && index.h("slot", { key: 'd90b7831900331fe8482757f33847295207f73d2', name: "icon-end" }), toBool(this.loading) && this.h.hasSlot("icon-end") &&
111
+ index.h("gov-icon", { key: 'd23e2000e5bf5b78a81e78d6c3e30aa0e1f3f42c', name: "loader", class: "gov-spin-animation", type: "components" }))));
113
112
  }
114
113
  onClickHandler(e) {
115
114
  e.stopPropagation();
@@ -1 +1 @@
1
- {"file":"gov-button.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;SAAgB,MAAM,CAAC,KAAU;IAChC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC9B,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;KAC1D;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QACrC,OAAO,KAAK,GAAG,CAAC,CAAA;KAChB;SAAM,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE;QACtC,OAAO,KAAK,CAAA;KACZ;SAAM;QACN,OAAO,KAAK,GAAG,IAAI,GAAG,KAAK,CAAA;KAC3B;AACF;;ACeA,IAAK,IAGJ;AAHD,WAAK,IAAI;IACR,eAAO,CAAA;IACP,yBAAiB,CAAA;AAClB,CAAC,EAHI,IAAI,KAAJ,IAAI,QAGR;MAKY,SAAS;IAMrB;;;;;QAFQ,aAAQ,GAAG,KAAK,CAAA;;oBAeiC,GAAG;;wBAQR,KAAK;;wBASL,KAAK;0BAKT,QAAQ;;;;;;;;yBAuClB,IAAI;;mCAsCC,EAAE;QA/G5C,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IA2FD,aAAa,CAAC,QAAgB;QAC7BC,kBAAY,CAACC,sBAAY,EAAE,QAAQ,EAAEC,qBAAW,CAAC,IAAI,CAAC,CAAA;KACtD;IAGD,YAAY,CAAC,QAAgB;QAC5BF,kBAAY,CAACG,oBAAU,EAAE,QAAQ,EAAED,qBAAW,CAAC,IAAI,CAAC,CAAA;KACpD;IAGD,YAAY,CAAC,QAAgB;QAC5BF,kBAAY,CAACI,WAAK,EAAE,QAAQ,EAAEF,qBAAW,CAAC,IAAI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AAE,IAAI,CAAC,IAAI;SACd,CAAC,CAAA;KACF;;;;IAMD,MAAM,QAAQ;QACb,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;KACvB;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,UAAU,CAAA;KACtB;;;;IAMD,MAAM,qBAAqB;QAC1B,IAAI,IAAI,CAAC,SAAS,EAAE;YACnBY,4BAAuB,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAEZ,qBAAW,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;SACjJ;KACD;;;;;;;;;;;;","names":["govHost","validateProp","ButtonColors","ButtonClass","ButtonType","Sizes","NativeType","AttributeObserver","ariaAttributes","inheritAriaAttributes","canValidateWcagOnRender","delay","h","Host","toBoolAttrIfDefined","validateAccessibleLabel"],"sources":["../../../packages/core/src/utils/bool.utils.ts","../../../packages/core/src/components/gov-button/button/gov-button.tsx"],"sourcesContent":["export function toBool(value: any): boolean {\n\tif (typeof value === 'string') {\n\t\treturn ['true', 'True', 'TRUE', '1'].indexOf(value) !== -1\n\t} else if (typeof value === 'number') {\n\t\treturn value > 0\n\t} else if (typeof value === 'boolean') {\n\t\treturn value\n\t} else {\n\t\treturn value ? true : false\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {\n\tButtonClass,\n\tButtonColors,\n\tButtonColorType,\n\tButtonSizesType,\n\tButtonTargetType,\n\tButtonType,\n\tButtonTypesType,\n\tNativeType,\n\tNativeTypesType,\n} from \"./constants\"\nimport {govHost, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {toBool} from \"../../../utils/bool.utils\"\nimport {Sizes} from \"../../../core/constants/sizes\"\nimport {validateAccessibleLabel} from \"../../../helpers/Validate/wcag\"\nimport {canValidateWcagOnRender} from \"../../../helpers/Dom/win\"\nimport {delay} from \"../../../utils/utils\"\nimport {ButtonEvent} from \"./gov-button.types\"\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\n\nenum Tags {\n\tA = \"a\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-button\",\n})\nexport class GovButton {\n\tprivate h: GovHost\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement\n\tprivate attributeObserver: AttributeObserver\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovButtonElement\n\n\t/**\n\t * Style variation of the button\n\t */\n\t@Prop({reflect: true}) readonly color: ButtonColorType\n\t/**\n\t * Button’s size\n\t */\n\t@Prop({reflect: true}) readonly size?: ButtonSizesType = \"m\"\n\t/**\n\t * Button's type\n\t */\n\t@Prop({reflect: true}) readonly type: ButtonTypesType\n\t/**\n\t * Expands the button to fill 100% of the container width\n\t */\n\t@Prop({reflect: true}) readonly expanded: boolean = false\n\t/**\n\t * The name of the button, which gets paired with the button's value when submitted as part of a form. Corresponds with the native HTML name attribute\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n\t */\n\t@Prop() readonly nativeType?: NativeTypesType = \"button\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target?: ButtonTargetType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n\t */\n\t@Prop() readonly download: boolean\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-hreflang\n\t */\n\t@Prop() readonly hreflang: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-referrerpolicy\n\t */\n\t@Prop() readonly referrerpolicy: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-rel\n\t */\n\t@Prop() readonly rel: string\n\t/**\n\t * Indicates whether an asynchronous process is running\n\t */\n\t@Prop() readonly loading: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom button identifier\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Emitted when the button click\n\t */\n\t@Event({eventName: \"gov-click\"}) govClick: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button has focus\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button loses focus\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<ButtonEvent>\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ButtonColors, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(ButtonType, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"nativeType\")\n\tvalidateNativeType(newValue: string): void {\n\t\tvalidateProp(NativeType, newValue, ButtonClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateType(this.type)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateNativeType(this.nativeType)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? Tags.A : Tags.BUTTON\n\t\tconst nativeType = Tag === Tags.A ? undefined : this.nativeType\n\n\t\treturn (\n\t\t\t<Host size={this.size}\n\t\t\t\t hydrated={this.hydrated}\n\t\t\t\t color={this.color}\n\t\t\t\t class={this.h.classes(ButtonClass.root)}\n\t\t\t\t type={this.type}>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLButtonElement | HTMLLinkElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tid={this.identifier}\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tdownload={this.download}\n\t\t\t\t\threflang={this.hreflang}\n\t\t\t\t\trel={this.rel}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\ttabindex={this.disabled ? \"-1\" : \"0\"}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t>\n\t\t\t\t\t{toBool(this.loading) && !this.h.hasSlot(\"right-icon\") &&\n\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\"></gov-icon>}\n\t\t\t\t\t{this.h.hasSlot(\"left-icon\") && <slot name=\"left-icon\"></slot>}\n\t\t\t\t\t<slot/>\n\t\t\t\t\t{this.h.hasSlot(\"right-icon\") && <slot name=\"right-icon\"></slot>}\n\t\t\t\t\t{toBool(this.loading) && this.h.hasSlot(\"right-icon\") &&\n\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\"></gov-icon>}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false) {\n\t\t\tthis.govClick.emit({\n\t\t\t\tcomponent: ButtonClass.root,\n\t\t\t\toriginalEvent: e,\n\t\t\t\tref: this.host,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.triggerRef.focus()\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync getRef() {\n\t\treturn this.triggerRef\n\t}\n\n\t/**\n\t * Validate the Accessibility attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tif (this.focusable) {\n\t\t\tvalidateAccessibleLabel(this.triggerRef.getAttribute('aria-label'), this.triggerRef.getAttribute('aria-labelledby'), ButtonClass.root, this.host)\n\t\t}\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-button.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;SAAgB,MAAM,CAAC,KAAU;IAChC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC9B,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;KAC1D;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QACrC,OAAO,KAAK,GAAG,CAAC,CAAA;KAChB;SAAM,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE;QACtC,OAAO,KAAK,CAAA;KACZ;SAAM;QACN,OAAO,KAAK,GAAG,IAAI,GAAG,KAAK,CAAA;KAC3B;AACF;;ACeA,IAAK,IAGJ;AAHD,WAAK,IAAI;IACR,eAAO,CAAA;IACP,yBAAiB,CAAA;AAClB,CAAC,EAHI,IAAI,KAAJ,IAAI,QAGR;MAKY,SAAS;IAMrB;;;;;QAFQ,aAAQ,GAAG,KAAK,CAAA;;oBAeiC,GAAG;;wBAQR,KAAK;;wBASL,KAAK;0BAKT,QAAQ;;;;;;;;yBAuClB,IAAI;;mCAsCC,EAAE;QA/G5C,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IA2FD,aAAa,CAAC,QAAgB;QAC7BC,kBAAY,CAACC,sBAAY,E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AC;YAClB,SAAS,EAAEA,qBAAW,CAAC,IAAI;YAC3B,aAAa,EAAE,CAAC;YAChB,GAAG,EAAE,IAAI,CAAC,IAAI;SACd,CAAC,CAAA;KACF;IAEO,aAAa,CAAC,CAAa;QAClC,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;YACjB,SAAS,EAAEA,qBAAW,CAAC,IAAI;YAC3B,aAAa,EAAE,CAAC;YAChB,GAAG,EAAE,IAAI,CAAC,IAAI;SACd,CAAC,CAAA;KACF;;;;IAMD,MAAM,QAAQ;QACb,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;KACvB;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,UAAU,CAAA;KACtB;;;;IAMD,MAAM,qBAAqB;QAC1B,IAAI,IAAI,CAAC,SAAS,EAAE;YACnBY,4BAAuB,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAEZ,qBAAW,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;SACjJ;KACD;;;;;;;;;;;;","names":["govHost","validateProp","ButtonColors","ButtonClass","ButtonType","Sizes","NativeType","AttributeObserver","ariaAttributes","inheritAriaAttributes","canValidateWcagOnRender","delay","h","Host","toBoolAttrIfDefined","validateAccessibleLabel"],"sources":["../../../packages/core/src/utils/bool.utils.ts","../../../packages/core/src/components/gov-button/button/gov-button.tsx"],"sourcesContent":["export function toBool(value: any): boolean {\n\tif (typeof value === 'string') {\n\t\treturn ['true', 'True', 'TRUE', '1'].indexOf(value) !== -1\n\t} else if (typeof value === 'number') {\n\t\treturn value > 0\n\t} else if (typeof value === 'boolean') {\n\t\treturn value\n\t} else {\n\t\treturn value ? true : false\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {\n\tButtonClass,\n\tButtonColors,\n\tButtonColorType,\n\tButtonSizesType,\n\tButtonTargetType,\n\tButtonType,\n\tButtonTypesType,\n\tNativeType,\n\tNativeTypesType,\n} from \"./constants\"\nimport {govHost, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {toBool} from \"../../../utils/bool.utils\"\nimport {Sizes} from \"../../../core/constants/sizes\"\nimport {validateAccessibleLabel} from \"../../../helpers/Validate/wcag\"\nimport {canValidateWcagOnRender} from \"../../../helpers/Dom/win\"\nimport {delay} from \"../../../utils/utils\"\nimport {ButtonEvent} from \"./gov-button.types\"\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\n\nenum Tags {\n\tA = \"a\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-button\",\n})\nexport class GovButton {\n\tprivate h: GovHost\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement\n\tprivate attributeObserver: AttributeObserver\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovButtonElement\n\n\t/**\n\t * Style variation of the button\n\t */\n\t@Prop({reflect: true}) readonly color: ButtonColorType\n\t/**\n\t * Button’s size\n\t */\n\t@Prop({reflect: true}) readonly size?: ButtonSizesType = \"m\"\n\t/**\n\t * Button's type\n\t */\n\t@Prop({reflect: true}) readonly type: ButtonTypesType\n\t/**\n\t * Expands the button to fill 100% of the container width\n\t */\n\t@Prop({reflect: true}) readonly expanded: boolean = false\n\t/**\n\t * The name of the button, which gets paired with the button's value when submitted as part of a form. Corresponds with the native HTML name attribute\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n\t */\n\t@Prop() readonly nativeType?: NativeTypesType = \"button\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target?: ButtonTargetType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n\t */\n\t@Prop() readonly download: boolean\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-hreflang\n\t */\n\t@Prop() readonly hreflang: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-referrerpolicy\n\t */\n\t@Prop() readonly referrerpolicy: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-rel\n\t */\n\t@Prop() readonly rel: string\n\t/**\n\t * Indicates whether an asynchronous process is running\n\t */\n\t@Prop() readonly loading: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom button identifier\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Emitted when the button click\n\t */\n\t@Event({eventName: \"gov-click\"}) govClick: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button has focus\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button loses focus\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<ButtonEvent>\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ButtonColors, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(ButtonType, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"nativeType\")\n\tvalidateNativeType(newValue: string): void {\n\t\tvalidateProp(NativeType, newValue, ButtonClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateType(this.type)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateNativeType(this.nativeType)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? Tags.A : Tags.BUTTON\n\t\tconst nativeType = Tag === Tags.A ? undefined : this.nativeType\n\n\t\treturn (\n\t\t\t<Host size={this.size}\n\t\t\t\t hydrated={this.hydrated}\n\t\t\t\t color={this.color}\n\t\t\t\t class={this.h.classes(ButtonClass.root)}\n\t\t\t\t type={this.type}>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLButtonElement | HTMLLinkElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tid={this.identifier}\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tdownload={this.download}\n\t\t\t\t\threflang={this.hreflang}\n\t\t\t\t\trel={this.rel}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\ttabindex={this.disabled ? \"-1\" : \"0\"}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t>\n\t\t\t\t\t{toBool(this.loading) && !this.h.hasSlot(\"icon-end\") &&\n\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\" type=\"components\"></gov-icon>}\n\t\t\t\t\t{this.h.hasSlot(\"icon-start\") && <slot name=\"icon-start\"></slot>}\n\t\t\t\t\t<slot/>\n\t\t\t\t\t{this.h.hasSlot(\"icon-end\") && <slot name=\"icon-end\"></slot>}\n\t\t\t\t\t{toBool(this.loading) && this.h.hasSlot(\"icon-end\") &&\n\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\" type=\"components\"></gov-icon>}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false) {\n\t\t\tthis.govClick.emit({\n\t\t\t\tcomponent: ButtonClass.root,\n\t\t\t\toriginalEvent: e,\n\t\t\t\tref: this.host,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.triggerRef.focus()\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync getRef() {\n\t\treturn this.triggerRef\n\t}\n\n\t/**\n\t * Validate the Accessibility attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tif (this.focusable) {\n\t\t\tvalidateAccessibleLabel(this.triggerRef.getAttribute('aria-label'), this.triggerRef.getAttribute('aria-labelledby'), ButtonClass.root, this.host)\n\t\t}\n\t}\n}\n"],"version":3}
@@ -3,12 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-7ff4447c.js');
6
- const template = require('./template-b070338f.js');
6
+ const template = require('./template-39939fd6.js');
7
7
  const string_utils = require('./string.utils-b84c81cf.js');
8
- const wcag = require('./wcag-b8d80c7d.js');
9
- const win = require('./win-587f4614.js');
8
+ const wcag = require('./wcag-2927ff73.js');
9
+ const gov_log = require('./gov.log-bfea3151.js');
10
10
  const utils = require('./utils-d263c5c6.js');
11
- require('./gov.log-1e8bab6e.js');
12
11
  require('./helpers.types-ff60c9bd.js');
13
12
 
14
13
  const CardClass = {
@@ -39,7 +38,7 @@ const GovCard = class {
39
38
  this.contentId = string_utils.createID('GovCardContent');
40
39
  }
41
40
  async componentDidRender() {
42
- if (win.canValidateWcagOnRender()) {
41
+ if (gov_log.canValidateWcagOnRender()) {
43
42
  await utils.delay(500);
44
43
  await this.validateAccessibility();
45
44
  }
@@ -48,7 +47,7 @@ const GovCard = class {
48
47
  this.hydrated = true;
49
48
  }
50
49
  render() {
51
- return (index.h(index.Host, { key: 'c7dd00e1eee01b7005b98b39ddfccf784dc2808e', class: this.h.classes(CardClass.root), open: this.open, collapsible: template.booleanString(this.collapsible), promotion: this.promotion, 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" }))) : this.h.hasSlot("headline") ? (index.h("div", { class: CardClass.header }, index.h("slot", { name: "headline" }))) : null, index.h("div", { key: 'dae87fe02926ed1772c4164c19e7e6f540510bec', 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("p", { key: '7ef4bcc939fa3d84fb1a6dedc0e62c0d2612f8ec', class: CardClass.img }, index.h("slot", { key: '4f05366b5bc0c2e6117ed8cfcb17cf107fec6499', name: "img" }))), index.h("div", { key: '4a25ad0d3002079fa4a35b5f7af10a05e3f5b45f', class: CardClass.main }, this.h.hasSlot('icon') && this.promotion && (index.h("div", { key: '6b16961ed892fed347a69d18d5482bccf0247f12', class: CardClass.icon }, index.h("slot", { key: '5720427d2bbea01f6d24911d4d208e743ec453ce', name: "icon" }))), index.h("slot", { key: '6f2efa36533f9d06365ad828766cb7956daf7e90' }), this.h.hasSlot('btn') && this.promotion && (index.h("div", { key: '5b79f8832d6cc39f709fb0d656eec383261971ce', class: CardClass.btns }, index.h("slot", { key: '93486120fcc840a0812325c881538d4174bedd84', name: "btn" })))), this.h.hasSlot('footer') && (index.h("div", { key: 'efaa342aa2d43418b33492296c8b6c2928004af9', class: CardClass.footer }, index.h("slot", { key: '502c7c7609d28290e601ef6c71eb050f12380f8b', name: "footer" }))))));
50
+ return (index.h(index.Host, { key: 'c7dd00e1eee01b7005b98b39ddfccf784dc2808e', class: this.h.classes(CardClass.root), open: this.open, collapsible: template.booleanString(this.collapsible), promotion: this.promotion, 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: '369364ba24e3d93c1ac78a584dd1fd48c44b892b', 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("p", { key: '813afe326da050fc90039355853617f267505fab', class: CardClass.img }, index.h("slot", { key: '5817f673e65eeb32c5740c7524518d726a98364c', name: "img" }))), index.h("div", { key: 'd47df9920b2ce96f2c535bb0bfd3723c2a7b7a9e', class: CardClass.main }, this.h.hasSlot('icon') && this.promotion && (index.h("div", { key: 'c2649f05b9e7c25b7d77a02f692d45f0e30caa60', class: CardClass.icon }, index.h("slot", { key: '9c5c54d2bf6c4a83bd6490b2ad7ef7a1ca9d53d5', name: "icon" }))), index.h("slot", { key: '49608def955a9fa5f5c1ed957ca63bc698b9aeab' }), this.h.hasSlot('btn') && this.promotion && (index.h("div", { key: '2bfc4a6c551fe33c4da625f800a796eb619746d3', class: CardClass.btns }, index.h("slot", { key: '050552b970e6d16586f57ed3dab46e6fcff9d95b', name: "btn" })))), this.h.hasSlot('footer') && (index.h("div", { key: '364cdbd90941b2e93cecc9742ff08479f82d0c14', class: CardClass.footer }, index.h("slot", { key: '0352680a92293ddfe93c055b1d7e5555967f870b', name: "footer" }))))));
52
51
  }
53
52
  onClickHandler(e) {
54
53
  e.stopPropagation();
@@ -1 +1 @@
1
- {"file":"gov-card.entry.cjs.js","mappings":";;;;;;;;;;;;;AAAO,MAAM,SAAS,GAAG;IACxB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,kBAAkB;IAC1B,KAAK,EAAE,iBAAiB;IACxB,KAAK,EAAE,iBAAiB;IACxB,GAAG,EAAE,eAAe;IACpB,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,kBAAkB;IAC1B,KAAK,EAAE,iBAAiB;CACxB;;MCEY,OAAO;IAMnB;;;QAFQ,aAAQ,GAAG,KAAK,CAAA;yBAac,KAAK;2BAIH,KAAK;oBAIA,IAAI;;;QAlBhD,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,UAAU,GAAGC,qBAAQ,CAAC,iBAAiB,CAAC,CAAA;QAC7C,IAAI,CAAC,SAAS,GAAGA,qBAAQ,CAAC,gBAAgB,CAAC,CAAA;KAC3C;IA6BD,MAAM,kBAAkB;QACvB,IAAIC,2BAAuB,EAAE,EAAE;YAC9B,MAAMC,WAAK,CAAC,GAAG,CAAC,CAAA;YAChB,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAA;SAClC;KACD;IAED,iBAAiB;QAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;KACpB;IAED,MAAM;QACL,QACCC,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EACzD,WAAW,EAAEC,sBAAa,CAAC,IAAI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AC,SAAS,KACxCA,kEAAK,KAAK,EAAE,SAAS,CAAC,IAAI,IACzBA,mEAAM,IAAI,EAAC,MAAM,GAAE,CACd,CACN,EAEDA,oEAAO,EAEN,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,SAAS,KACvCA,kEAAK,KAAK,EAAE,SAAS,CAAC,IAAI,IACzBA,mEAAM,IAAI,EAAC,KAAK,GAAE,CACb,CACN,CACI,EAEL,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,KACxBA,kEAAK,KAAK,EAAE,SAAS,CAAC,MAAM,IAC3BA,mEAAM,IAAI,EAAC,QAAQ,GAAE,CAChB,CACN,CACI,CACA,EACP;KACD;IAEO,cAAc,CAAC,CAAC;QACvB,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,IAAI,CAAC,WAAW,EAAE;YACrB,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAA;YACtB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAC,CAAC,CAAA;SAC1D;KACD;;;;IAMD,MAAM,qBAAqB;QAC1B,IAAI,IAAI,CAAC,WAAW,EAAE;YACrBG,4BAAuB,CAAC,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAAC,2BAA2B,EAAE,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;SACjH;KACD;;;;;;","names":["govHost","createID","canValidateWcagOnRender","delay","h","Host","booleanString","validateAccessibleLabel"],"sources":["../../../packages/core/src/components/gov-card/constants.ts","../../../packages/core/src/components/gov-card/gov-card.tsx"],"sourcesContent":["export const CardClass = {\n\troot: 'gov-card',\n\theader: 'gov-card__header',\n\ttitle: 'gov-card__title',\n\tinner: 'gov-card__inner',\n\timg: 'gov-card__img',\n\tmain: 'gov-card__main',\n\ticon: 'gov-card__icon',\n\tbtns: 'gov-card__btns',\n\tfooter: 'gov-card__footer',\n\tarrow: 'gov-card__arrow',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop} from '@stencil/core'\nimport {CardClass} from './constants'\nimport {booleanString, govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {createID} from '../../utils/string.utils'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {delay} from '../../utils/utils'\nimport {GovCardChangeEvent} from './interfaces'\n\n@Component({\n\ttag: 'gov-card',\n})\nexport class GovCard {\n\tprivate h: GovHost\n\tprivate readonly headlineId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.headlineId = createID('GovCardHeadline')\n\t\tthis.contentId = createID('GovCardContent')\n\t}\n\n\t@Element() host: HTMLGovCardElement\n\n\t/**\n\t * Style variation of the card.\n\t */\n\t@Prop() readonly promotion: boolean = false\n\t/**\n\t * Defines weather the card can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Defines whether the card is open or closed\n\t */\n\t@Prop({reflect: true, mutable: true}) open = true\n\t/**\n\t * Adds accessible label for the collapsible button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-label'}) accessibleTriggerLabel: string\n\t/**\n\t * A string of identifiers that indicate alternative label elements for collapsible card\n\t */\n\t@Prop({attribute: 'accessible-labelledby'}) accessibleTriggerLabelledBy: string\n\t/**\n\t * Called when the card toggle state changes\n\t */\n\t@Event({eventName: 'gov-toggle'}) govToggle: EventEmitter<GovCardChangeEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(CardClass.root)} open={this.open}\n\t\t\t\t collapsible={booleanString(this.collapsible)} promotion={this.promotion} hydrated={this.hydrated}>\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<button\n\t\t\t\t\t\tid={this.headlineId}\n\t\t\t\t\t\tclass={CardClass.header}\n\t\t\t\t\t\taria-label={this.accessibleTriggerLabel}\n\t\t\t\t\t\taria-labelledby={this.accessibleTriggerLabelledBy}\n\t\t\t\t\t\taria-expanded={booleanString(this.open)}\n\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot name=\"headline\"/>\n\t\t\t\t\t\t<gov-icon class={CardClass.arrow} name=\"chevron-down\"></gov-icon>\n\t\t\t\t\t</button>\n\t\t\t\t) : this.h.hasSlot(\"headline\") ? (\n\t\t\t\t\t<div class={CardClass.header}>\n\t\t\t\t\t\t<slot name=\"headline\"/>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\n\t\t\t\t<div\n\t\t\t\t\tclass={CardClass.inner}\n\t\t\t\t\tid={this.contentId}\n\t\t\t\t\taria-hidden={this.collapsible ? booleanString(!this.open) : undefined}\n\t\t\t\t\thidden={this.collapsible ? !this.open : undefined}\n\t\t\t\t\taria-labelledby={this.collapsible ? this.headlineId : undefined}\n\t\t\t\t>\n\t\t\t\t\t{this.h.hasSlot('img') && (\n\t\t\t\t\t\t<p class={CardClass.img}>\n\t\t\t\t\t\t\t<slot name=\"img\"/>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div class={CardClass.main}>\n\t\t\t\t\t\t{this.h.hasSlot('icon') && this.promotion && (\n\t\t\t\t\t\t\t<div class={CardClass.icon}>\n\t\t\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<slot/>\n\n\t\t\t\t\t\t{this.h.hasSlot('btn') && this.promotion && (\n\t\t\t\t\t\t\t<div class={CardClass.btns}>\n\t\t\t\t\t\t\t\t<slot name=\"btn\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{this.h.hasSlot('footer') && (\n\t\t\t\t\t\t<div class={CardClass.footer}>\n\t\t\t\t\t\t\t<slot name=\"footer\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e) {\n\t\te.stopPropagation()\n\t\tif (this.collapsible) {\n\t\t\tthis.open = !this.open\n\t\t\tthis.govToggle.emit({open: this.open, element: this.host})\n\t\t}\n\t}\n\n\t/**\n\t * Validate the accessible attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tif (this.collapsible) {\n\t\t\tvalidateAccessibleLabel(this.accessibleTriggerLabel, this.accessibleTriggerLabelledBy, CardClass.root, this.host)\n\t\t}\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-card.entry.cjs.js","mappings":";;;;;;;;;;;;AAAO,MAAM,SAAS,GAAG;IACxB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,kBAAkB;IAC1B,KAAK,EAAE,iBAAiB;IACxB,KAAK,EAAE,iBAAiB;IACxB,GAAG,EAAE,eAAe;IACpB,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,kBAAkB;IAC1B,KAAK,EAAE,iBAAiB;CACxB;;MCEY,OAAO;IAMnB;;;QAFQ,aAAQ,GAAG,KAAK,CAAA;yBAac,KAAK;2BAIH,KAAK;oBAIA,IAAI;;;QAlBhD,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,UAAU,GAAGC,qBAAQ,CAA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AAO,EAAE,IAAI,CAAC,IAAI,EAAC,CAAC,CAAA;SAC1D;KACD;;;;IAMD,MAAM,qBAAqB;QAC1B,IAAI,IAAI,CAAC,WAAW,EAAE;YACrBG,4BAAuB,CAAC,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAAC,2BAA2B,EAAE,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;SACjH;KACD;;;;;;","names":["govHost","createID","canValidateWcagOnRender","delay","h","Host","booleanString","validateAccessibleLabel"],"sources":["../../../packages/core/src/components/gov-card/constants.ts","../../../packages/core/src/components/gov-card/gov-card.tsx"],"sourcesContent":["export const CardClass = {\n\troot: 'gov-card',\n\theader: 'gov-card__header',\n\ttitle: 'gov-card__title',\n\tinner: 'gov-card__inner',\n\timg: 'gov-card__img',\n\tmain: 'gov-card__main',\n\ticon: 'gov-card__icon',\n\tbtns: 'gov-card__btns',\n\tfooter: 'gov-card__footer',\n\tarrow: 'gov-card__arrow',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop} from '@stencil/core'\nimport {CardClass} from './constants'\nimport {booleanString, govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {createID} from '../../utils/string.utils'\nimport {validateAccessibleLabel} from '../../helpers/Validate/wcag'\nimport {canValidateWcagOnRender} from '../../helpers/Dom/win'\nimport {delay} from '../../utils/utils'\nimport {GovCardChangeEvent} from './interfaces'\n\n@Component({\n\ttag: 'gov-card',\n})\nexport class GovCard {\n\tprivate h: GovHost\n\tprivate readonly headlineId: string\n\tprivate readonly contentId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.headlineId = createID('GovCardHeadline')\n\t\tthis.contentId = createID('GovCardContent')\n\t}\n\n\t@Element() host: HTMLGovCardElement\n\n\t/**\n\t * Style variation of the card.\n\t */\n\t@Prop() readonly promotion: boolean = false\n\t/**\n\t * Defines weather the card can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Defines whether the card is open or closed\n\t */\n\t@Prop({reflect: true, mutable: true}) open = true\n\t/**\n\t * Adds accessible label for the collapsible button that is only shown for screen readers.\n\t */\n\t@Prop({attribute: 'accessible-label'}) accessibleTriggerLabel: string\n\t/**\n\t * A string of identifiers that indicate alternative label elements for collapsible card\n\t */\n\t@Prop({attribute: 'accessible-labelledby'}) accessibleTriggerLabelledBy: string\n\t/**\n\t * Called when the card toggle state changes\n\t */\n\t@Event({eventName: 'gov-toggle'}) govToggle: EventEmitter<GovCardChangeEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(CardClass.root)} open={this.open}\n\t\t\t\t collapsible={booleanString(this.collapsible)} promotion={this.promotion} hydrated={this.hydrated}>\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<button\n\t\t\t\t\t\tid={this.headlineId}\n\t\t\t\t\t\tclass={CardClass.header}\n\t\t\t\t\t\taria-label={this.accessibleTriggerLabel}\n\t\t\t\t\t\taria-labelledby={this.accessibleTriggerLabelledBy}\n\t\t\t\t\t\taria-expanded={booleanString(this.open)}\n\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot name=\"headline\"/>\n\t\t\t\t\t\t<gov-icon class={CardClass.arrow} name=\"chevron-down\" type=\"components\"></gov-icon>\n\t\t\t\t\t</button>\n\t\t\t\t) : this.h.hasSlot(\"headline\") ? (\n\t\t\t\t\t<div class={CardClass.header}>\n\t\t\t\t\t\t<slot name=\"headline\"/>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\n\t\t\t\t<div\n\t\t\t\t\tclass={CardClass.inner}\n\t\t\t\t\tid={this.contentId}\n\t\t\t\t\taria-hidden={this.collapsible ? booleanString(!this.open) : undefined}\n\t\t\t\t\thidden={this.collapsible ? !this.open : undefined}\n\t\t\t\t\taria-labelledby={this.collapsible ? this.headlineId : undefined}\n\t\t\t\t>\n\t\t\t\t\t{this.h.hasSlot('img') && (\n\t\t\t\t\t\t<p class={CardClass.img}>\n\t\t\t\t\t\t\t<slot name=\"img\"/>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div class={CardClass.main}>\n\t\t\t\t\t\t{this.h.hasSlot('icon') && this.promotion && (\n\t\t\t\t\t\t\t<div class={CardClass.icon}>\n\t\t\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<slot/>\n\n\t\t\t\t\t\t{this.h.hasSlot('btn') && this.promotion && (\n\t\t\t\t\t\t\t<div class={CardClass.btns}>\n\t\t\t\t\t\t\t\t<slot name=\"btn\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{this.h.hasSlot('footer') && (\n\t\t\t\t\t\t<div class={CardClass.footer}>\n\t\t\t\t\t\t\t<slot name=\"footer\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e) {\n\t\te.stopPropagation()\n\t\tif (this.collapsible) {\n\t\t\tthis.open = !this.open\n\t\t\tthis.govToggle.emit({open: this.open, element: this.host})\n\t\t}\n\t}\n\n\t/**\n\t * Validate the accessible attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tif (this.collapsible) {\n\t\t\tvalidateAccessibleLabel(this.accessibleTriggerLabel, this.accessibleTriggerLabelledBy, CardClass.root, this.host)\n\t\t}\n\t}\n}\n"],"version":3}
@@ -3,18 +3,17 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-7ff4447c.js');
6
- const props = require('./props-b8a955b2.js');
7
- const template = require('./template-b070338f.js');
6
+ const props = require('./props-d189860c.js');
7
+ const template = require('./template-39939fd6.js');
8
8
  const utils = require('./utils-d263c5c6.js');
9
9
  const sizes = require('./sizes-89f8d3b2.js');
10
- const constants = require('./constants-861428a4.js');
10
+ const constants = require('./constants-f464dc4c.js');
11
11
  const string_utils = require('./string.utils-b84c81cf.js');
12
12
  const helpers = require('./helpers-2ee3c9e6.js');
13
13
  const accessibility = require('./accessibility-c475826b.js');
14
14
  const attribute = require('./attribute-06dc5228.js');
15
- require('./gov.log-1e8bab6e.js');
16
- require('./win-587f4614.js');
17
- require('./colors-976f6dff.js');
15
+ require('./gov.log-bfea3151.js');
16
+ require('./colors-f7c8eadd.js');
18
17
 
19
18
  const ChipSizes = utils.pick(sizes.Sizes, ['_XS', '_S', '_M']);
20
19
  var ChipType;
@@ -43,8 +42,8 @@ const GovChip = class {
43
42
  this.disabled = false;
44
43
  this.href = undefined;
45
44
  this.target = undefined;
46
- this.iconLeft = undefined;
47
- this.iconRight = undefined;
45
+ this.iconStart = undefined;
46
+ this.iconEnd = undefined;
48
47
  this.size = ChipSizes._M;
49
48
  this.tag = "span";
50
49
  this.color = constants.ButtonColors.PRIMARY;
@@ -85,13 +84,13 @@ const GovChip = class {
85
84
  render() {
86
85
  const Tag = this.href ? NativeType.A : this.tag;
87
86
  const nativeType = Tag == NativeType.BUTTON ? NativeType.BUTTON : undefined;
88
- const iconLeft = helpers.prepareIconFormat(this.iconLeft);
89
- const iconRight = helpers.prepareIconFormat(this.iconRight);
90
- return (index.h(index.Host, { key: '6d7c550b0c74460712d632060727626489abe3c0', class: this.h.classes([
87
+ const iconStart = helpers.prepareIconFormat(this.iconStart);
88
+ const iconEnd = helpers.prepareIconFormat(this.iconEnd);
89
+ return (index.h(index.Host, { key: 'cb016dddaaadd7de70e72707d7ad44e87a597a34', class: this.h.classes([
91
90
  ChipClass.root,
92
91
  this.h.hasSlot("right") ? ChipClass.hasRight : undefined,
93
92
  this.h.hasSlot("left") ? ChipClass.hasLeft : undefined,
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: '9dc30627e2111c76067c6f2da2427e81c05413e3', 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: '67cc0b4cfaf3b45e8fb333231681f9b5cfa90996', name: "left" }), index.h("slot", { key: '83eeb5cb5194903b8139ff8443bf5d024b1cb00d', name: "left-icon" }, iconLeft && index.h("gov-icon", { key: '7f90ee50fc4fce6375dc77a01980116cfd6136d0', type: iconLeft.type, name: iconLeft.name })), index.h("slot", { key: '4a089b176703b5c600d2a519f90be655397d5f27' }), index.h("slot", { key: 'ace71d5eae682f25c3ce4fd9dd825ae919286b35', name: "right-icon" }, iconRight && index.h("gov-icon", { key: '5baaf84b70cb4bbb8e70ef35aa81d893ca7cc143', type: iconRight.type, name: iconRight.name })), index.h("slot", { key: '7c51003d4890f14c0af817614fcbbb24446f4ef5', name: "right" }))));
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: 'd34d8a67eeb4b6d3f1b79118224a50f394e31003', 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: '1927da9845f36a47d30d7aef2e5292b0fd14a9e9', name: "left" }), index.h("slot", { key: 'c8334498b94e4d3caa6f7db5e7ec638bbce52cbc', name: "icon-start" }, iconStart && index.h("gov-icon", { key: '310fb65c135105ee26cc6d58f810768843700b0a', type: iconStart.type, name: iconStart.name })), index.h("slot", { key: '4a089b176703b5c600d2a519f90be655397d5f27' }), index.h("slot", { key: '0dfede9f85605499bdbd09f43b642a1cee68fcf2', name: "icon-end" }, iconEnd && index.h("gov-icon", { key: 'beb20c5691f2ed1a6cb556d440d72a86de280a73', type: iconEnd.type, name: iconEnd.name })), index.h("slot", { key: '92e05b922fe474e259e18301eba6c13586794a1e', name: "right" }))));
95
94
  }
96
95
  onClickHandler(e) {
97
96
  e.stopPropagation();
@@ -1 +1 @@
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,EA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AC,IAAI,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,GAAG,EAC9G,EAAE,EAAE,IAAI,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,WAAW,IACpB,QAAQ,IAAIA,uEAAU,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAa,CACtE,EACPA,oEAAO,EACPA,mEAAM,IAAI,EAAC,YAAY,IACrB,SAAS,IAAIA,uEAAU,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,GAAa,CACzE,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-left\"}) readonly iconLeft?: 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-right\"}) readonly iconRight?: 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 iconLeft = prepareIconFormat(this.iconLeft)\n\t\tconst iconRight = prepareIconFormat(this.iconRight)\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=\"left-icon\">\n\t\t\t\t\t\t{iconLeft && <gov-icon type={iconLeft.type} name={iconLeft.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=\"right-icon\">\n\t\t\t\t\t\t{iconRight && <gov-icon type={iconRight.type} name={iconRight.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,U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AAQ;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}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-7ff4447c.js');
6
- const template = require('./template-b070338f.js');
6
+ const template = require('./template-39939fd6.js');
7
7
 
8
8
  const ContainerClass = {
9
9
  root: 'gov-container',
@@ -15,15 +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: '0c61adb532c5810dedd0b43f21b5843bfc3d9c53', class: this.h.classes(ContainerClass.root) }, index.h("slot", { key: 'df9ee5f718d72be4a2e1bbc4dd8ae6e9883c922f' })));
19
- }
20
- /**
21
- * Returns slotted children
22
- *
23
- * @return {Promise<Node[]>}
24
- */
25
- async slottedChildren() {
26
- return Promise.resolve(template.slottedChildren(this.host));
18
+ return (index.h(index.Host, { key: '72c32b930fe5a024a469c2d8170a7597e990e659', class: this.h.classes(ContainerClass.root) }, index.h("slot", { key: 'a4ad5247d403cd17ba46529cc204c936b82dd97d' })));
27
19
  }
28
20
  get host() { return index.getElement(this); }
29
21
  };
@@ -1 +1 @@
1
- {"file":"gov-container.entry.cjs.js","mappings":";;;;;;;AAAO,MAAM,cAAc,GAAG;IAC7B,IAAI,EAAE,eAAe;CACrB;;MCMY,YAAY;IAGxB;;QACC,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAID,MAAM;QACL,QACCC,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,IAC/CD,oEAAQ,CACF,EACP;KACD;;;;;;IAQD,MAAM,eAAe;QACpB,OAAO,OAAO,CAAC,OAAO,CAACE,wBAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;KAClD;;;;;;","names":["govHost","h","Host","slottedChildren"],"sources":["../../../packages/core/src/components/gov-container/constants.tsx","../../../packages/core/src/components/gov-container/gov-container.tsx"],"sourcesContent":["export const ContainerClass = {\n\troot: 'gov-container',\n}\n","import { Component, Element, h, Host, Method } from '@stencil/core'\nimport { govHost, slottedChildren } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { ContainerClass } from './constants'\n\n@Component({\n\ttag: 'gov-container',\n})\nexport class GovContainer {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovContainerElement\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ContainerClass.root)}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns slotted children\n\t *\n\t * @return {Promise<Node[]>}\n\t */\n\t@Method()\n\tasync slottedChildren(): Promise<Node[]> {\n\t\treturn Promise.resolve(slottedChildren(this.host))\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-container.entry.cjs.js","mappings":";;;;;;;AAAO,MAAM,cAAc,GAAG;IAC7B,IAAI,EAAE,eAAe;CACrB;;MCMY,YAAY;IAGxB;;QACC,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAID,MAAM;QACL,QACCC,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,IAC/CD,oEAAQ,CACF,EACP;KACD;;;;;;","names":["govHost","h","Host"],"sources":["../../../packages/core/src/components/gov-container/constants.tsx","../../../packages/core/src/components/gov-container/gov-container.tsx"],"sourcesContent":["export const ContainerClass = {\n\troot: 'gov-container',\n}\n","import { Component, Element, h, Host } from '@stencil/core'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { ContainerClass } from './constants'\n\n@Component({\n\ttag: 'gov-container',\n})\nexport class GovContainer {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovContainerElement\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ContainerClass.root)}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
@@ -3,12 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-7ff4447c.js');
6
- const colors = require('./colors-976f6dff.js');
7
- const template = require('./template-b070338f.js');
8
- const props = require('./props-b8a955b2.js');
6
+ const colors = require('./colors-f7c8eadd.js');
7
+ const template = require('./template-39939fd6.js');
8
+ const props = require('./props-d189860c.js');
9
9
  const utils = require('./utils-d263c5c6.js');
10
- require('./gov.log-1e8bab6e.js');
11
- require('./win-587f4614.js');
10
+ require('./gov.log-bfea3151.js');
12
11
 
13
12
  utils.pick(colors.Colors, ['PRIMARY', 'SECONDARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING']);
14
13
  const ControlGroupClass = {
@@ -1 +1 @@
1
- {"file":"gov-control-group.entry.cjs.js","mappings":";;;;;;;;;;;;AAIkCA,UAAI,CAACC,aAAM,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,EAAC;AAG3G,MAAM,iBAAiB,GAAG;IAChC,IAAI,EAAE,mBAAmB;CACzB;;MCCY,eAAe;IAG3B;;qBAQgDA,aAAM,CAAC,OAAO;wBAIC,KAAK;0BAID,KAAK;QAfvE,IAAI,CAAC,CAAC,GAAGC,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAiBD,aAAa,CAAC,QAAgB;QAC7BC,kBAAY,CAACF,aAAM,EAAE,QAAQ,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAA;KACtD;IAED,MAAM;QACL,QACCG,QAACC,UAAI,qDACJ,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAC7C,KAAK,EAAE,IAAI,CAAC,KAAK,IACjBD,oEAAQ,CACF,EACP;KACD;;;;;;;;;","names":["pick","Colors","govHost","validateProp","h","Host"],"sources":["../../../packages/core/src/components/gov-control-group/constants.ts","../../../packages/core/src/components/gov-control-group/gov-control-group.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils'\n\nexport const ControlGroupColors = pick(Colors, ['PRIMARY', 'SECONDARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING'])\nexport type ControlGroupColorType = `${ValueOf<typeof ControlGroupColors>}`\n\nexport const ControlGroupClass = {\n\troot: 'gov-control-group',\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { Colors } from \"../../core/constants/colors\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { ControlGroupClass, ControlGroupColorType } from \"./constants\"\n\n@Component({\n\ttag: \"gov-control-group\",\n})\nexport class GovControlGroup {\n\tprivate readonly h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovControlGroupElement\n\t/**\n\t * Style variation of the content message.\n\t */\n\t@Prop() readonly color: ControlGroupColorType = Colors.PRIMARY\n\t/**\n\t * Specifies the display of the border between elements\n\t */\n\t@Prop({ attribute: \"no-border\" }) readonly noBorder: boolean = false\n\t/**\n\t * Specifies the display of elements to full width\n\t */\n\t@Prop({ attribute: \"fit-content\" }) readonly fitContent: boolean = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(Colors, newValue, ControlGroupClass.root)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(ControlGroupClass.root)}\n\t\t\t\tcolor={this.color}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-control-group.entry.cjs.js","mappings":";;;;;;;;;;;AAIkCA,UAAI,CAACC,aAAM,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,EAAC;AAG3G,MAAM,iBAAiB,GAAG;IAChC,IAAI,EAAE,mBAAmB;CACzB;;MCCY,eAAe;IAG3B;;qBAQgDA,aAAM,CAAC,OAAO;wBAIC,KAAK;0BAID,KAAK;QAfvE,IAAI,CAAC,CAAC,GAAGC,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAiBD,aAAa,CAAC,QAAgB;QAC7BC,kBAAY,CAACF,aAAM,EAAE,QAAQ,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAA;KACtD;IAED,MAAM;QACL,QACCG,QAACC,UAAI,qDACJ,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAC7C,KAAK,EAAE,IAAI,CAAC,KAAK,IACjBD,oEAAQ,CACF,EACP;KACD;;;;;;;;;","names":["pick","Colors","govHost","validateProp","h","Host"],"sources":["../../../packages/core/src/components/gov-control-group/constants.ts","../../../packages/core/src/components/gov-control-group/gov-control-group.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils'\n\nexport const ControlGroupColors = pick(Colors, ['PRIMARY', 'SECONDARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING'])\nexport type ControlGroupColorType = `${ValueOf<typeof ControlGroupColors>}`\n\nexport const ControlGroupClass = {\n\troot: 'gov-control-group',\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { Colors } from \"../../core/constants/colors\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { ControlGroupClass, ControlGroupColorType } from \"./constants\"\n\n@Component({\n\ttag: \"gov-control-group\",\n})\nexport class GovControlGroup {\n\tprivate readonly h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovControlGroupElement\n\t/**\n\t * Style variation of the content message.\n\t */\n\t@Prop() readonly color: ControlGroupColorType = Colors.PRIMARY\n\t/**\n\t * Specifies the display of the border between elements\n\t */\n\t@Prop({ attribute: \"no-border\" }) readonly noBorder: boolean = false\n\t/**\n\t * Specifies the display of elements to full width\n\t */\n\t@Prop({ attribute: \"fit-content\" }) readonly fitContent: boolean = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(Colors, newValue, ControlGroupClass.root)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(ControlGroupClass.root)}\n\t\t\t\tcolor={this.color}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-7ff4447c.js');
6
- const template = require('./template-b070338f.js');
6
+ const template = require('./template-39939fd6.js');
7
7
 
8
8
  const CookieConsentClass = {
9
9
  root: 'gov-cookiebar',