@gov-design-system-ce/components 4.1.3-BETA-10 → 4.2.1

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 (719) hide show
  1. package/dist/cjs/{array.utils-96eadde3.js → array.utils-211fffc0.js} +2 -2
  2. package/dist/cjs/{array.utils-96eadde3.js.map → array.utils-211fffc0.js.map} +1 -1
  3. package/dist/cjs/{constants-02aec493.js → constants-7f713d6c.js} +2 -2
  4. package/dist/cjs/{constants-02aec493.js.map → constants-7f713d6c.js.map} +1 -1
  5. package/dist/cjs/{constants-4dfa23e3.js → constants-c7447ffd.js} +3 -1
  6. package/dist/cjs/constants-c7447ffd.js.map +1 -0
  7. package/dist/cjs/{constants-52053f2d.js → constants-c84c60d6.js} +3 -1
  8. package/dist/cjs/constants-c84c60d6.js.map +1 -0
  9. package/dist/cjs/core.cjs.js +1 -1
  10. package/dist/cjs/gov-attachments_3.cjs.entry.js +4 -4
  11. package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
  12. package/dist/cjs/gov-backdrop.cjs.entry.js +2 -2
  13. package/dist/cjs/gov-banner.cjs.entry.js +80 -0
  14. package/dist/cjs/gov-banner.cjs.entry.js.map +1 -0
  15. package/dist/cjs/gov-blockquote.cjs.entry.js +33 -0
  16. package/dist/cjs/gov-blockquote.cjs.entry.js.map +1 -0
  17. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +3 -3
  18. package/dist/cjs/gov-button.cjs.entry.js +7 -6
  19. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  20. package/dist/cjs/gov-card.cjs.entry.js +11 -3
  21. package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
  22. package/dist/cjs/gov-chip.cjs.entry.js +4 -3
  23. package/dist/cjs/gov-chip.cjs.entry.js.map +1 -1
  24. package/dist/cjs/gov-container.cjs.entry.js +1 -1
  25. package/dist/cjs/gov-control-group.cjs.entry.js +1 -1
  26. package/dist/cjs/gov-cookiebar.cjs.entry.js +1 -1
  27. package/dist/cjs/gov-dialog.cjs.entry.js +3 -3
  28. package/dist/cjs/gov-dialog.cjs.entry.js.map +1 -1
  29. package/dist/cjs/gov-dropdown.cjs.entry.js +1 -1
  30. package/dist/cjs/gov-empty.cjs.entry.js +1 -1
  31. package/dist/cjs/gov-error-code.cjs.entry.js +1 -1
  32. package/dist/cjs/gov-flex_3.cjs.entry.js +5 -5
  33. package/dist/cjs/gov-flex_3.cjs.entry.js.map +1 -1
  34. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +5 -4
  35. package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
  36. package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +5 -5
  37. package/dist/cjs/gov-form-checkbox-group.cjs.entry.js.map +1 -1
  38. package/dist/cjs/gov-form-checkbox.cjs.entry.js +2 -1
  39. package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
  40. package/dist/cjs/gov-form-control.cjs.entry.js +1 -1
  41. package/dist/cjs/gov-form-file.cjs.entry.js +3 -2
  42. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  43. package/dist/cjs/gov-form-group.cjs.entry.js +2 -2
  44. package/dist/cjs/gov-form-input_2.cjs.entry.js +10 -8
  45. package/dist/cjs/gov-form-input_2.cjs.entry.js.map +1 -1
  46. package/dist/cjs/gov-form-label.cjs.entry.js +1 -1
  47. package/dist/cjs/gov-form-multi-select.cjs.entry.js +6 -5
  48. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  49. package/dist/cjs/gov-form-password-power.cjs.entry.js +1 -1
  50. package/dist/cjs/gov-form-radio-group.cjs.entry.js +3 -3
  51. package/dist/cjs/gov-form-radio-group.cjs.entry.js.map +1 -1
  52. package/dist/cjs/gov-form-radio.cjs.entry.js +2 -1
  53. package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
  54. package/dist/cjs/gov-form-range.cjs.entry.js +207 -0
  55. package/dist/cjs/gov-form-range.cjs.entry.js.map +1 -0
  56. package/dist/cjs/gov-form-search.cjs.entry.js +1 -1
  57. package/dist/cjs/gov-form-select.cjs.entry.js +6 -5
  58. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  59. package/dist/cjs/gov-form-switch.cjs.entry.js +2 -1
  60. package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
  61. package/dist/cjs/gov-grid-item.cjs.entry.js +13 -7
  62. package/dist/cjs/gov-grid-item.cjs.entry.js.map +1 -1
  63. package/dist/cjs/gov-grid.cjs.entry.js +7 -5
  64. package/dist/cjs/gov-grid.cjs.entry.js.map +1 -1
  65. package/dist/cjs/gov-infobar.cjs.entry.js +4 -3
  66. package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -1
  67. package/dist/cjs/gov-layout-column.cjs.entry.js +1 -1
  68. package/dist/cjs/gov-layout.cjs.entry.js +1 -1
  69. package/dist/cjs/gov-lifecycle.cjs.entry.js +1 -1
  70. package/dist/cjs/gov-link.cjs.entry.js +3 -1
  71. package/dist/cjs/gov-link.cjs.entry.js.map +1 -1
  72. package/dist/cjs/gov-loading.cjs.entry.js +1 -1
  73. package/dist/cjs/gov-message.cjs.entry.js +1 -1
  74. package/dist/cjs/gov-message.cjs.entry.js.map +1 -1
  75. package/dist/cjs/gov-pagination.cjs.entry.js +4 -3
  76. package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
  77. package/dist/cjs/gov-spacer.cjs.entry.js +1 -1
  78. package/dist/cjs/gov-stepper-item.cjs.entry.js +2 -2
  79. package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
  80. package/dist/cjs/gov-stepper.cjs.entry.js +2 -2
  81. package/dist/cjs/gov-tabs-item.cjs.entry.js +1 -1
  82. package/dist/cjs/gov-tabs.cjs.entry.js +4 -3
  83. package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
  84. package/dist/cjs/gov-tag.cjs.entry.js +1 -1
  85. package/dist/cjs/gov-tile.cjs.entry.js +1 -1
  86. package/dist/cjs/gov-toast.cjs.entry.js +3 -2
  87. package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
  88. package/dist/cjs/gov-tooltip-content.cjs.entry.js +1 -1
  89. package/dist/cjs/gov-tooltip.cjs.entry.js +2 -2
  90. package/dist/cjs/gov-wizard-item.cjs.entry.js +2 -2
  91. package/dist/cjs/gov-wizard.cjs.entry.js +3 -3
  92. package/dist/cjs/{helpers.types-ff60c9bd.js → helpers.types-9066e4a4.js} +3 -1
  93. package/dist/cjs/helpers.types-9066e4a4.js.map +1 -0
  94. package/dist/cjs/index-0e4f24f9.js +12 -4
  95. package/dist/cjs/loader.cjs.js +1 -1
  96. package/dist/cjs/{wcag-2927ff73.js → wcag-f8da82da.js} +2 -2
  97. package/dist/cjs/{wcag-2927ff73.js.map → wcag-f8da82da.js.map} +1 -1
  98. package/dist/collection/collection-manifest.json +3 -1
  99. package/dist/collection/components/gov-attachments/gov-attachments-item.css +3 -4
  100. package/dist/collection/components/gov-banner/constants.js +26 -0
  101. package/dist/collection/components/gov-banner/constants.js.map +1 -0
  102. package/dist/collection/components/gov-banner/gov-banner.js +155 -0
  103. package/dist/collection/components/gov-banner/gov-banner.js.map +1 -0
  104. package/dist/collection/components/gov-blockquote/constants.js +10 -0
  105. package/dist/collection/components/gov-blockquote/constants.js.map +1 -0
  106. package/dist/collection/components/gov-blockquote/gov-blockquote.js +61 -0
  107. package/dist/collection/components/gov-blockquote/gov-blockquote.js.map +1 -0
  108. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +1 -1
  109. package/dist/collection/components/gov-button/button/gov-button.js +5 -4
  110. package/dist/collection/components/gov-button/button/gov-button.js.map +1 -1
  111. package/dist/collection/components/gov-button/dropdown/gov-dropdown.js +1 -1
  112. package/dist/collection/components/gov-card/gov-card.js +52 -1
  113. package/dist/collection/components/gov-card/gov-card.js.map +1 -1
  114. package/dist/collection/components/gov-chip/gov-chip.js +4 -3
  115. package/dist/collection/components/gov-chip/gov-chip.js.map +1 -1
  116. package/dist/collection/components/gov-container/gov-container.js +1 -1
  117. package/dist/collection/components/gov-control-group/gov-control-group.js +1 -1
  118. package/dist/collection/components/gov-cookiebar/gov-cookiebar.js +1 -1
  119. package/dist/collection/components/gov-dialog/gov-dialog.js +1 -1
  120. package/dist/collection/components/gov-dialog/gov-dialog.js.map +1 -1
  121. package/dist/collection/components/gov-empty/gov-empty.js +1 -1
  122. package/dist/collection/components/gov-error-code/gov-error-code.js +1 -1
  123. package/dist/collection/components/gov-flex/gov-flex.js +22 -3
  124. package/dist/collection/components/gov-flex/gov-flex.js.map +1 -1
  125. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +3 -2
  126. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
  127. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +2 -1
  128. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
  129. package/dist/collection/components/gov-form/control/gov-form-control.js +1 -1
  130. package/dist/collection/components/gov-form/file/gov-form-file.js +3 -2
  131. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  132. package/dist/collection/components/gov-form/group/constants.js +1 -1
  133. package/dist/collection/components/gov-form/group/constants.js.map +1 -1
  134. package/dist/collection/components/gov-form/group/gov-form-checkbox-group.js +2 -2
  135. package/dist/collection/components/gov-form/group/gov-form-group.css +4 -4
  136. package/dist/collection/components/gov-form/group/gov-form-group.js +2 -2
  137. package/dist/collection/components/gov-form/group/gov-form-radio-group.js +2 -2
  138. package/dist/collection/components/gov-form/input/gov-form-input.js +7 -6
  139. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  140. package/dist/collection/components/gov-form/label/gov-form-label.js +1 -1
  141. package/dist/collection/components/gov-form/message/gov-form-message.js +1 -1
  142. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +4 -3
  143. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
  144. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +1 -1
  145. package/dist/collection/components/gov-form/radio/gov-form-radio.js +2 -1
  146. package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
  147. package/dist/collection/components/gov-form/range/constants.js +9 -0
  148. package/dist/collection/components/gov-form/range/constants.js.map +1 -0
  149. package/dist/collection/components/gov-form/range/gov-form-range.js +610 -0
  150. package/dist/collection/components/gov-form/range/gov-form-range.js.map +1 -0
  151. package/dist/collection/components/gov-form/search/gov-form-search.js +1 -1
  152. package/dist/collection/components/gov-form/select/gov-form-select.js +4 -3
  153. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  154. package/dist/collection/components/gov-form/switch/gov-form-switch.js +2 -1
  155. package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
  156. package/dist/collection/components/gov-grid/constants.js +2 -0
  157. package/dist/collection/components/gov-grid/constants.js.map +1 -1
  158. package/dist/collection/components/gov-grid/gov-grid-item.js +111 -20
  159. package/dist/collection/components/gov-grid/gov-grid-item.js.map +1 -1
  160. package/dist/collection/components/gov-grid/gov-grid.js +56 -14
  161. package/dist/collection/components/gov-grid/gov-grid.js.map +1 -1
  162. package/dist/collection/components/gov-icon/gov-icon.js +0 -2
  163. package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
  164. package/dist/collection/components/gov-infobar/gov-infobar.js +4 -3
  165. package/dist/collection/components/gov-infobar/gov-infobar.js.map +1 -1
  166. package/dist/collection/components/gov-layout/gov-layout-column.js +1 -1
  167. package/dist/collection/components/gov-layout/gov-layout.js +1 -1
  168. package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js +1 -1
  169. package/dist/collection/components/gov-link/constants.js +1 -0
  170. package/dist/collection/components/gov-link/constants.js.map +1 -1
  171. package/dist/collection/components/gov-link/gov-link.js +20 -1
  172. package/dist/collection/components/gov-link/gov-link.js.map +1 -1
  173. package/dist/collection/components/gov-loading/loading/gov-loading.js +1 -1
  174. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +3 -2
  175. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js.map +1 -1
  176. package/dist/collection/components/gov-message/gov-message.js +1 -1
  177. package/dist/collection/components/gov-message/gov-message.js.map +1 -1
  178. package/dist/collection/components/gov-pagination/gov-pagination.js +2 -1
  179. package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
  180. package/dist/collection/components/gov-spacer/gov-spacer.js +1 -1
  181. package/dist/collection/components/gov-stepper/constants.js +2 -0
  182. package/dist/collection/components/gov-stepper/constants.js.map +1 -1
  183. package/dist/collection/components/gov-stepper/gov-stepper-item.js +1 -1
  184. package/dist/collection/components/gov-stepper/gov-stepper-item.js.map +1 -1
  185. package/dist/collection/components/gov-stepper/gov-stepper.js +1 -1
  186. package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
  187. package/dist/collection/components/gov-tabs/gov-tabs.js +3 -2
  188. package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
  189. package/dist/collection/components/gov-tag/gov-tag.js +1 -1
  190. package/dist/collection/components/gov-theme-switch/constants.js +1 -0
  191. package/dist/collection/components/gov-theme-switch/constants.js.map +1 -1
  192. package/dist/collection/components/gov-theme-switch/gov-theme-switch.js +1 -1
  193. package/dist/collection/components/gov-theme-switch/gov-theme-switch.js.map +1 -1
  194. package/dist/collection/components/gov-tile/gov-tile.js +1 -1
  195. package/dist/collection/components/gov-toast/gov-toast.js +3 -2
  196. package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
  197. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +1 -1
  198. package/dist/collection/components/gov-tooltip/gov-tooltip.js +2 -2
  199. package/dist/collection/components/gov-wizard/gov-wizard-item.js +2 -2
  200. package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
  201. package/dist/collection/data/color-definitions.js +13 -13
  202. package/dist/collection/data/font-definitions.js +86 -48
  203. package/dist/collection/pages/Banner.js +268 -0
  204. package/dist/collection/pages/Banner.js.map +1 -0
  205. package/dist/collection/pages/Blockquote.js +25 -0
  206. package/dist/collection/pages/Blockquote.js.map +1 -0
  207. package/dist/collection/pages/Breadcrumbs.js +2 -2
  208. package/dist/collection/pages/Breadcrumbs.js.map +1 -1
  209. package/dist/collection/pages/Card.js +27 -17
  210. package/dist/collection/pages/Card.js.map +1 -1
  211. package/dist/collection/pages/Flex.js +1 -1
  212. package/dist/collection/pages/Flex.js.map +1 -1
  213. package/dist/collection/pages/Forms.js +209 -4
  214. package/dist/collection/pages/Forms.js.map +1 -1
  215. package/dist/collection/pages/Grid.js +61 -40
  216. package/dist/collection/pages/Grid.js.map +1 -1
  217. package/dist/collection/pages/Home.js +57 -0
  218. package/dist/collection/pages/Home.js.map +1 -1
  219. package/dist/collection/pages/Infobar.js +36 -56
  220. package/dist/collection/pages/Infobar.js.map +1 -1
  221. package/dist/collection/pages/Layout.js +10 -10
  222. package/dist/collection/pages/Layout.js.map +1 -1
  223. package/dist/collection/pages/Message.js +10 -10
  224. package/dist/collection/pages/Message.js.map +1 -1
  225. package/dist/collection/pages/Tag.js +14 -0
  226. package/dist/collection/pages/Tag.js.map +1 -1
  227. package/dist/collection/pages/Tiles.js +8 -235
  228. package/dist/collection/pages/Tiles.js.map +1 -1
  229. package/dist/collection/pages/Typography.js +117 -51
  230. package/dist/collection/pages/Typography.js.map +1 -1
  231. package/dist/components/gov-accordion-item.js +1 -1
  232. package/dist/components/gov-attachments-item.js +1 -1
  233. package/dist/components/gov-attachments.js +1 -1
  234. package/dist/components/gov-backdrop.js +1 -1
  235. package/dist/components/{gov-tiles.d.ts → gov-banner.d.ts} +4 -4
  236. package/dist/components/gov-banner.js +2 -0
  237. package/dist/components/gov-banner.js.map +1 -0
  238. package/dist/components/gov-blockquote.d.ts +11 -0
  239. package/dist/components/gov-blockquote.js +2 -0
  240. package/dist/components/gov-blockquote.js.map +1 -0
  241. package/dist/components/gov-breadcrumbs.js +1 -1
  242. package/dist/components/gov-breadcrumbs.js.map +1 -1
  243. package/dist/components/gov-button.js +1 -1
  244. package/dist/components/gov-card.js +1 -1
  245. package/dist/components/gov-card.js.map +1 -1
  246. package/dist/components/gov-chip.js +1 -1
  247. package/dist/components/gov-container.js +1 -1
  248. package/dist/components/gov-control-group.js +1 -1
  249. package/dist/components/gov-cookiebar.js +1 -1
  250. package/dist/components/gov-dialog.js +1 -1
  251. package/dist/components/gov-dialog.js.map +1 -1
  252. package/dist/components/gov-dropdown.js +1 -1
  253. package/dist/components/gov-empty.js +1 -1
  254. package/dist/components/gov-error-code.js +1 -1
  255. package/dist/components/gov-flex.js +1 -1
  256. package/dist/components/gov-flex.js.map +1 -1
  257. package/dist/components/gov-form-autocomplete.js +1 -1
  258. package/dist/components/gov-form-checkbox-group.js +1 -1
  259. package/dist/components/gov-form-checkbox-group.js.map +1 -1
  260. package/dist/components/gov-form-checkbox.js +1 -1
  261. package/dist/components/gov-form-checkbox.js.map +1 -1
  262. package/dist/components/gov-form-control.js +1 -1
  263. package/dist/components/gov-form-file.js +1 -1
  264. package/dist/components/gov-form-file.js.map +1 -1
  265. package/dist/components/gov-form-group.js +1 -1
  266. package/dist/components/gov-form-input.js +1 -1
  267. package/dist/components/gov-form-label.js +1 -1
  268. package/dist/components/gov-form-message.js +1 -1
  269. package/dist/components/gov-form-multi-select.js +1 -1
  270. package/dist/components/gov-form-multi-select.js.map +1 -1
  271. package/dist/components/gov-form-password-power.js +1 -1
  272. package/dist/components/gov-form-radio-group.js +1 -1
  273. package/dist/components/gov-form-radio-group.js.map +1 -1
  274. package/dist/components/gov-form-radio.js +1 -1
  275. package/dist/components/gov-form-radio.js.map +1 -1
  276. package/dist/components/gov-form-range.d.ts +11 -0
  277. package/dist/components/gov-form-range.js +2 -0
  278. package/dist/components/gov-form-range.js.map +1 -0
  279. package/dist/components/gov-form-search.js +1 -1
  280. package/dist/components/gov-form-select.js +1 -1
  281. package/dist/components/gov-form-switch.js +1 -1
  282. package/dist/components/gov-form-switch.js.map +1 -1
  283. package/dist/components/gov-grid-item.js +1 -1
  284. package/dist/components/gov-grid-item.js.map +1 -1
  285. package/dist/components/gov-grid.js +1 -1
  286. package/dist/components/gov-grid.js.map +1 -1
  287. package/dist/components/gov-icon.js +1 -1
  288. package/dist/components/gov-infobar.js +1 -1
  289. package/dist/components/gov-infobar.js.map +1 -1
  290. package/dist/components/gov-layout-column.js +1 -1
  291. package/dist/components/gov-layout-column.js.map +1 -1
  292. package/dist/components/gov-layout.js +1 -1
  293. package/dist/components/gov-lifecycle.js +1 -1
  294. package/dist/components/gov-link.js +1 -1
  295. package/dist/components/gov-link.js.map +1 -1
  296. package/dist/components/gov-loading.js +1 -1
  297. package/dist/components/gov-message.js +1 -1
  298. package/dist/components/gov-message.js.map +1 -1
  299. package/dist/components/gov-pagination.js +1 -1
  300. package/dist/components/gov-pagination.js.map +1 -1
  301. package/dist/components/gov-skeleton.js +1 -1
  302. package/dist/components/gov-spacer.js +1 -1
  303. package/dist/components/gov-stepper-item.js +1 -1
  304. package/dist/components/gov-stepper-item.js.map +1 -1
  305. package/dist/components/gov-stepper.js +1 -1
  306. package/dist/components/gov-tabs-item.js +1 -1
  307. package/dist/components/gov-tabs.js +1 -1
  308. package/dist/components/gov-tabs.js.map +1 -1
  309. package/dist/components/gov-tag.js +1 -1
  310. package/dist/components/gov-theme-switch.js +1 -1
  311. package/dist/components/gov-theme-switch.js.map +1 -1
  312. package/dist/components/gov-tile.js +1 -1
  313. package/dist/components/gov-toast.js +1 -1
  314. package/dist/components/gov-toast.js.map +1 -1
  315. package/dist/components/gov-tooltip-content.js +1 -1
  316. package/dist/components/gov-tooltip.js +1 -1
  317. package/dist/components/gov-wizard-item.js +1 -1
  318. package/dist/components/gov-wizard.js +1 -1
  319. package/dist/components/{p-73938936.js → p-022e49cf.js} +2 -2
  320. package/dist/components/p-10cad7f1.js +2 -0
  321. package/dist/components/p-2ca5423c.js +2 -0
  322. package/dist/components/p-2ca5423c.js.map +1 -0
  323. package/dist/components/p-2fe7d728.js +2 -0
  324. package/dist/components/p-2fe7d728.js.map +1 -0
  325. package/dist/components/p-313b4611.js +2 -0
  326. package/dist/components/p-313b4611.js.map +1 -0
  327. package/dist/components/p-5a861cd2.js +2 -0
  328. package/dist/components/p-5a861cd2.js.map +1 -0
  329. package/dist/components/p-5b0934a8.js +2 -0
  330. package/dist/components/p-5b0934a8.js.map +1 -0
  331. package/dist/components/p-5d60b866.js +2 -0
  332. package/dist/components/p-5d60b866.js.map +1 -0
  333. package/dist/components/p-6ce6e14f.js +2 -0
  334. package/dist/components/p-6ce6e14f.js.map +1 -0
  335. package/dist/components/p-7fb16042.js +2 -0
  336. package/dist/components/p-7fb16042.js.map +1 -0
  337. package/dist/components/p-be086357.js +2 -0
  338. package/dist/components/p-d3435179.js +2 -0
  339. package/dist/components/p-d3435179.js.map +1 -0
  340. package/dist/components/p-de989dfe.js +2 -0
  341. package/dist/components/{p-7be2301a.js → p-e0c3b1a7.js} +2 -2
  342. package/dist/components/p-ea128b8b.js +2 -0
  343. package/dist/components/p-ea128b8b.js.map +1 -0
  344. package/dist/components/p-f9b1a12b.js +2 -0
  345. package/dist/components/p-f9b1a12b.js.map +1 -0
  346. package/dist/components/{p-e44a0fee.js → p-fc2afe61.js} +2 -2
  347. package/dist/components/{p-e44a0fee.js.map → p-fc2afe61.js.map} +1 -1
  348. package/dist/core/core.css +3541 -2361
  349. package/dist/core/core.esm.js +1 -1
  350. package/dist/core/core.esm.js.map +1 -1
  351. package/dist/core/p-07590d84.entry.js +2 -0
  352. package/dist/core/p-07590d84.entry.js.map +1 -0
  353. package/dist/core/p-08552a0e.entry.js +2 -0
  354. package/dist/core/p-08552a0e.entry.js.map +1 -0
  355. package/dist/core/p-0abc38e8.entry.js +2 -0
  356. package/dist/core/p-0abc38e8.entry.js.map +1 -0
  357. package/dist/core/p-0c393d2f.entry.js +2 -0
  358. package/dist/core/p-0c393d2f.entry.js.map +1 -0
  359. package/dist/core/p-0ef1f684.entry.js +2 -0
  360. package/dist/core/p-0ef1f684.entry.js.map +1 -0
  361. package/dist/core/p-16ece889.entry.js +2 -0
  362. package/dist/core/p-16ece889.entry.js.map +1 -0
  363. package/dist/core/p-171e2a2f.entry.js +2 -0
  364. package/dist/core/p-2536a8ff.entry.js +2 -0
  365. package/dist/core/p-2536a8ff.entry.js.map +1 -0
  366. package/dist/core/p-25615325.entry.js +2 -0
  367. package/dist/core/p-2a7bcce0.entry.js +2 -0
  368. package/dist/core/p-2a7bcce0.entry.js.map +1 -0
  369. package/dist/core/p-2ca5423c.js +2 -0
  370. package/dist/core/p-2ca5423c.js.map +1 -0
  371. package/dist/core/{p-9514520c.entry.js → p-2f966102.entry.js} +2 -2
  372. package/dist/core/p-2f966102.entry.js.map +1 -0
  373. package/dist/core/p-2fe7d728.js +2 -0
  374. package/dist/core/p-2fe7d728.js.map +1 -0
  375. package/dist/core/p-3583dcf7.entry.js +2 -0
  376. package/dist/core/p-3583dcf7.entry.js.map +1 -0
  377. package/dist/core/p-3b2267a1.entry.js +2 -0
  378. package/dist/core/{p-e078dab3.entry.js.map → p-3b2267a1.entry.js.map} +1 -1
  379. package/dist/core/p-4216d8f3.entry.js +2 -0
  380. package/dist/core/p-44c912e2.entry.js +2 -0
  381. package/dist/core/p-44c912e2.entry.js.map +1 -0
  382. package/dist/core/p-4d5f768f.entry.js +2 -0
  383. package/dist/core/{p-a8a5e8ca.entry.js.map → p-4d5f768f.entry.js.map} +1 -1
  384. package/dist/core/p-52103c05.entry.js +2 -0
  385. package/dist/core/p-52103c05.entry.js.map +1 -0
  386. package/dist/core/p-52bb8e4f.entry.js +2 -0
  387. package/dist/core/p-52bb8e4f.entry.js.map +1 -0
  388. package/dist/core/p-52c74fc5.entry.js +2 -0
  389. package/dist/core/{p-07b1fa1c.entry.js.map → p-52c74fc5.entry.js.map} +1 -1
  390. package/dist/core/p-548806cb.entry.js +2 -0
  391. package/dist/core/p-548806cb.entry.js.map +1 -0
  392. package/dist/core/p-5fa4965e.entry.js +2 -0
  393. package/dist/core/{p-f9474bb3.entry.js.map → p-5fa4965e.entry.js.map} +1 -1
  394. package/dist/core/p-6d54ce5f.js +2 -0
  395. package/dist/core/p-6f74eb08.entry.js +2 -0
  396. package/dist/core/{p-eed4e606.entry.js → p-75dae924.entry.js} +2 -2
  397. package/dist/core/{p-eed4e606.entry.js.map → p-75dae924.entry.js.map} +1 -1
  398. package/dist/core/p-774ea182.entry.js +2 -0
  399. package/dist/core/p-843f980a.entry.js +2 -0
  400. package/dist/core/p-8a72ebcd.entry.js +2 -0
  401. package/dist/core/p-8cd7a120.entry.js +2 -0
  402. package/dist/core/p-8cd7a120.entry.js.map +1 -0
  403. package/dist/core/{p-5ff7f0c4.entry.js → p-8f469270.entry.js} +2 -2
  404. package/dist/core/p-947804a8.entry.js +2 -0
  405. package/dist/core/p-979ff58c.entry.js +2 -0
  406. package/dist/core/p-979ff58c.entry.js.map +1 -0
  407. package/dist/core/{p-ab500948.entry.js → p-981f217e.entry.js} +2 -2
  408. package/dist/core/p-9c1f3e9e.entry.js +2 -0
  409. package/dist/core/p-9c1f3e9e.entry.js.map +1 -0
  410. package/dist/core/p-a1c825f3.entry.js +2 -0
  411. package/dist/core/p-a1c825f3.entry.js.map +1 -0
  412. package/dist/core/p-a440365f.entry.js +2 -0
  413. package/dist/core/p-a440365f.entry.js.map +1 -0
  414. package/dist/core/{p-bd667900.entry.js → p-a70c7959.entry.js} +2 -2
  415. package/dist/core/p-a8a7ae96.entry.js +2 -0
  416. package/dist/core/p-a8a7ae96.entry.js.map +1 -0
  417. package/dist/core/p-aacafa40.entry.js +2 -0
  418. package/dist/core/{p-72c4ebcd.entry.js.map → p-aacafa40.entry.js.map} +1 -1
  419. package/dist/core/p-aeaba3ef.entry.js +2 -0
  420. package/dist/core/p-b87e5429.entry.js +2 -0
  421. package/dist/core/p-b87e5429.entry.js.map +1 -0
  422. package/dist/core/p-b9f1c2ef.entry.js +2 -0
  423. package/dist/core/p-b9f1c2ef.entry.js.map +1 -0
  424. package/dist/core/p-bca478fd.entry.js +2 -0
  425. package/dist/core/{p-f98f19f6.entry.js.map → p-bca478fd.entry.js.map} +1 -1
  426. package/dist/core/p-be086357.js +2 -0
  427. package/dist/core/p-bea685cb.entry.js +2 -0
  428. package/dist/core/p-c1584cfe.entry.js +2 -0
  429. package/dist/core/p-c1584cfe.entry.js.map +1 -0
  430. package/dist/core/p-c5a49469.entry.js +2 -0
  431. package/dist/core/p-c88d8659.entry.js +2 -0
  432. package/dist/core/p-c88d8659.entry.js.map +1 -0
  433. package/dist/core/{p-49ebfe10.entry.js → p-cba1ebca.entry.js} +2 -2
  434. package/dist/core/p-ccb64e4e.entry.js +2 -0
  435. package/dist/core/p-d383f977.entry.js +2 -0
  436. package/dist/core/p-d990aae8.entry.js +2 -0
  437. package/dist/core/p-ddb3772f.entry.js +2 -0
  438. package/dist/core/{p-fd7a3951.entry.js.map → p-ddb3772f.entry.js.map} +1 -1
  439. package/dist/core/{p-a58f4e2b.entry.js → p-e2655cb7.entry.js} +2 -2
  440. package/dist/core/p-e29c9924.entry.js +2 -0
  441. package/dist/core/{p-a5648769.entry.js.map → p-e29c9924.entry.js.map} +1 -1
  442. package/dist/core/p-ea128b8b.js +2 -0
  443. package/dist/core/p-ea128b8b.js.map +1 -0
  444. package/dist/core/p-ead1f58d.entry.js +2 -0
  445. package/dist/core/p-f83b3b08.entry.js +2 -0
  446. package/dist/core/p-f83b3b08.entry.js.map +1 -0
  447. package/dist/core/{p-e44a0fee.js → p-fc2afe61.js} +2 -2
  448. package/dist/core/{p-e44a0fee.js.map → p-fc2afe61.js.map} +1 -1
  449. package/dist/esm/{array.utils-85696abd.js → array.utils-3b213795.js} +2 -2
  450. package/dist/esm/{array.utils-85696abd.js.map → array.utils-3b213795.js.map} +1 -1
  451. package/dist/esm/{constants-4da2b3c0.js → constants-1548499a.js} +2 -2
  452. package/dist/esm/{constants-4da2b3c0.js.map → constants-1548499a.js.map} +1 -1
  453. package/dist/esm/{constants-372455eb.js → constants-7b1ce2ec.js} +3 -1
  454. package/dist/esm/constants-7b1ce2ec.js.map +1 -0
  455. package/dist/esm/{constants-2d5a0e18.js → constants-dc2115cb.js} +3 -1
  456. package/dist/esm/constants-dc2115cb.js.map +1 -0
  457. package/dist/esm/core.js +1 -1
  458. package/dist/esm/gov-attachments_3.entry.js +4 -4
  459. package/dist/esm/gov-attachments_3.entry.js.map +1 -1
  460. package/dist/esm/gov-backdrop.entry.js +2 -2
  461. package/dist/esm/gov-banner.entry.js +76 -0
  462. package/dist/esm/gov-banner.entry.js.map +1 -0
  463. package/dist/esm/gov-blockquote.entry.js +29 -0
  464. package/dist/esm/gov-blockquote.entry.js.map +1 -0
  465. package/dist/esm/gov-breadcrumbs.entry.js +3 -3
  466. package/dist/esm/gov-button.entry.js +7 -6
  467. package/dist/esm/gov-button.entry.js.map +1 -1
  468. package/dist/esm/gov-card.entry.js +11 -3
  469. package/dist/esm/gov-card.entry.js.map +1 -1
  470. package/dist/esm/gov-chip.entry.js +4 -3
  471. package/dist/esm/gov-chip.entry.js.map +1 -1
  472. package/dist/esm/gov-container.entry.js +1 -1
  473. package/dist/esm/gov-control-group.entry.js +1 -1
  474. package/dist/esm/gov-cookiebar.entry.js +1 -1
  475. package/dist/esm/gov-dialog.entry.js +3 -3
  476. package/dist/esm/gov-dialog.entry.js.map +1 -1
  477. package/dist/esm/gov-dropdown.entry.js +1 -1
  478. package/dist/esm/gov-empty.entry.js +1 -1
  479. package/dist/esm/gov-error-code.entry.js +1 -1
  480. package/dist/esm/gov-flex_3.entry.js +5 -5
  481. package/dist/esm/gov-flex_3.entry.js.map +1 -1
  482. package/dist/esm/gov-form-autocomplete.entry.js +5 -4
  483. package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
  484. package/dist/esm/gov-form-checkbox-group.entry.js +5 -5
  485. package/dist/esm/gov-form-checkbox-group.entry.js.map +1 -1
  486. package/dist/esm/gov-form-checkbox.entry.js +2 -1
  487. package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
  488. package/dist/esm/gov-form-control.entry.js +1 -1
  489. package/dist/esm/gov-form-file.entry.js +3 -2
  490. package/dist/esm/gov-form-file.entry.js.map +1 -1
  491. package/dist/esm/gov-form-group.entry.js +2 -2
  492. package/dist/esm/gov-form-input_2.entry.js +10 -8
  493. package/dist/esm/gov-form-input_2.entry.js.map +1 -1
  494. package/dist/esm/gov-form-label.entry.js +1 -1
  495. package/dist/esm/gov-form-multi-select.entry.js +6 -5
  496. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  497. package/dist/esm/gov-form-password-power.entry.js +1 -1
  498. package/dist/esm/gov-form-radio-group.entry.js +3 -3
  499. package/dist/esm/gov-form-radio-group.entry.js.map +1 -1
  500. package/dist/esm/gov-form-radio.entry.js +2 -1
  501. package/dist/esm/gov-form-radio.entry.js.map +1 -1
  502. package/dist/esm/gov-form-range.entry.js +203 -0
  503. package/dist/esm/gov-form-range.entry.js.map +1 -0
  504. package/dist/esm/gov-form-search.entry.js +1 -1
  505. package/dist/esm/gov-form-select.entry.js +6 -5
  506. package/dist/esm/gov-form-select.entry.js.map +1 -1
  507. package/dist/esm/gov-form-switch.entry.js +2 -1
  508. package/dist/esm/gov-form-switch.entry.js.map +1 -1
  509. package/dist/esm/gov-grid-item.entry.js +13 -7
  510. package/dist/esm/gov-grid-item.entry.js.map +1 -1
  511. package/dist/esm/gov-grid.entry.js +7 -5
  512. package/dist/esm/gov-grid.entry.js.map +1 -1
  513. package/dist/esm/gov-infobar.entry.js +4 -3
  514. package/dist/esm/gov-infobar.entry.js.map +1 -1
  515. package/dist/esm/gov-layout-column.entry.js +1 -1
  516. package/dist/esm/gov-layout.entry.js +1 -1
  517. package/dist/esm/gov-lifecycle.entry.js +1 -1
  518. package/dist/esm/gov-link.entry.js +3 -1
  519. package/dist/esm/gov-link.entry.js.map +1 -1
  520. package/dist/esm/gov-loading.entry.js +1 -1
  521. package/dist/esm/gov-message.entry.js +1 -1
  522. package/dist/esm/gov-message.entry.js.map +1 -1
  523. package/dist/esm/gov-pagination.entry.js +4 -3
  524. package/dist/esm/gov-pagination.entry.js.map +1 -1
  525. package/dist/esm/gov-spacer.entry.js +1 -1
  526. package/dist/esm/gov-stepper-item.entry.js +2 -2
  527. package/dist/esm/gov-stepper-item.entry.js.map +1 -1
  528. package/dist/esm/gov-stepper.entry.js +2 -2
  529. package/dist/esm/gov-tabs-item.entry.js +1 -1
  530. package/dist/esm/gov-tabs.entry.js +4 -3
  531. package/dist/esm/gov-tabs.entry.js.map +1 -1
  532. package/dist/esm/gov-tag.entry.js +1 -1
  533. package/dist/esm/gov-tile.entry.js +1 -1
  534. package/dist/esm/gov-toast.entry.js +3 -2
  535. package/dist/esm/gov-toast.entry.js.map +1 -1
  536. package/dist/esm/gov-tooltip-content.entry.js +1 -1
  537. package/dist/esm/gov-tooltip.entry.js +2 -2
  538. package/dist/esm/gov-wizard-item.entry.js +2 -2
  539. package/dist/esm/gov-wizard.entry.js +3 -3
  540. package/dist/esm/{helpers.types-43ddbdb8.js → helpers.types-fe2f0447.js} +3 -2
  541. package/dist/esm/helpers.types-fe2f0447.js.map +1 -0
  542. package/dist/esm/index-bf8a6f64.js +12 -4
  543. package/dist/esm/loader.js +1 -1
  544. package/dist/esm/{wcag-253a4421.js → wcag-bd11d341.js} +2 -2
  545. package/dist/esm/{wcag-253a4421.js.map → wcag-bd11d341.js.map} +1 -1
  546. package/dist/hydrate/index.js +478 -133
  547. package/dist/hydrate/index.mjs +478 -133
  548. package/dist/stencil.config.js +3 -2
  549. package/dist/stencil.config.js.map +1 -1
  550. package/dist/types/components/gov-banner/constants.d.ts +26 -0
  551. package/dist/types/components/gov-banner/gov-banner.d.ts +28 -0
  552. package/dist/types/components/gov-blockquote/constants.d.ts +10 -0
  553. package/dist/types/components/gov-blockquote/gov-blockquote.d.ts +15 -0
  554. package/dist/types/components/gov-button/button/constants.d.ts +1 -1
  555. package/dist/types/components/gov-card/gov-card.d.ts +10 -0
  556. package/dist/types/components/gov-control-group/constants.d.ts +1 -1
  557. package/dist/types/components/gov-flex/gov-flex.d.ts +5 -1
  558. package/dist/types/components/gov-form/group/constants.d.ts +1 -1
  559. package/dist/types/components/gov-form/range/constants.d.ts +9 -0
  560. package/dist/types/components/gov-form/range/gov-form-range.d.ts +116 -0
  561. package/dist/types/components/gov-grid/constants.d.ts +4 -0
  562. package/dist/types/components/gov-grid/gov-grid-item.d.ts +25 -5
  563. package/dist/types/components/gov-grid/gov-grid.d.ts +11 -2
  564. package/dist/types/components/gov-icon/constants.d.ts +1 -1
  565. package/dist/types/components/gov-infobar/constants.d.ts +1 -1
  566. package/dist/types/components/gov-link/constants.d.ts +1 -0
  567. package/dist/types/components/gov-link/gov-link.d.ts +4 -0
  568. package/dist/types/components/gov-stepper/constants.d.ts +2 -0
  569. package/dist/types/components/gov-theme-switch/constants.d.ts +1 -0
  570. package/dist/types/components.d.ts +357 -36
  571. package/dist/types/pages/Banner.d.ts +3 -0
  572. package/dist/types/pages/Blockquote.d.ts +3 -0
  573. package/package.json +3 -3
  574. package/dist/cjs/constants-4dfa23e3.js.map +0 -1
  575. package/dist/cjs/constants-52053f2d.js.map +0 -1
  576. package/dist/cjs/gov-tiles.cjs.entry.js +0 -26
  577. package/dist/cjs/gov-tiles.cjs.entry.js.map +0 -1
  578. package/dist/cjs/helpers.types-ff60c9bd.js.map +0 -1
  579. package/dist/collection/components/gov-tile/container/constants.js +0 -4
  580. package/dist/collection/components/gov-tile/container/constants.js.map +0 -1
  581. package/dist/collection/components/gov-tile/container/gov-tiles.js +0 -37
  582. package/dist/collection/components/gov-tile/container/gov-tiles.js.map +0 -1
  583. package/dist/components/gov-tiles.js +0 -2
  584. package/dist/components/gov-tiles.js.map +0 -1
  585. package/dist/components/p-076c8b31.js +0 -2
  586. package/dist/components/p-076c8b31.js.map +0 -1
  587. package/dist/components/p-13a70392.js +0 -2
  588. package/dist/components/p-13a70392.js.map +0 -1
  589. package/dist/components/p-2aedc81e.js +0 -2
  590. package/dist/components/p-2aedc81e.js.map +0 -1
  591. package/dist/components/p-4d513423.js +0 -2
  592. package/dist/components/p-4d513423.js.map +0 -1
  593. package/dist/components/p-4faecdb2.js +0 -2
  594. package/dist/components/p-4faecdb2.js.map +0 -1
  595. package/dist/components/p-558cbab0.js +0 -2
  596. package/dist/components/p-558cbab0.js.map +0 -1
  597. package/dist/components/p-80dad64b.js +0 -2
  598. package/dist/components/p-880743a5.js +0 -2
  599. package/dist/components/p-880743a5.js.map +0 -1
  600. package/dist/components/p-a521c59a.js +0 -2
  601. package/dist/components/p-a521c59a.js.map +0 -1
  602. package/dist/components/p-a877bf8a.js +0 -2
  603. package/dist/components/p-a877bf8a.js.map +0 -1
  604. package/dist/components/p-b97d8edd.js +0 -2
  605. package/dist/components/p-b97d8edd.js.map +0 -1
  606. package/dist/components/p-c438a723.js +0 -2
  607. package/dist/components/p-c5e91e5a.js +0 -2
  608. package/dist/components/p-c5e91e5a.js.map +0 -1
  609. package/dist/components/p-ded281e6.js +0 -2
  610. package/dist/core/p-07b1fa1c.entry.js +0 -2
  611. package/dist/core/p-0932c74d.entry.js +0 -2
  612. package/dist/core/p-13c6da90.entry.js +0 -2
  613. package/dist/core/p-13c6da90.entry.js.map +0 -1
  614. package/dist/core/p-15a7b952.entry.js +0 -2
  615. package/dist/core/p-15a7b952.entry.js.map +0 -1
  616. package/dist/core/p-2470194a.entry.js +0 -2
  617. package/dist/core/p-2470194a.entry.js.map +0 -1
  618. package/dist/core/p-29ac15d2.js +0 -2
  619. package/dist/core/p-2abdce2d.entry.js +0 -2
  620. package/dist/core/p-2abdce2d.entry.js.map +0 -1
  621. package/dist/core/p-2ae8b8d5.entry.js +0 -2
  622. package/dist/core/p-2ae8b8d5.entry.js.map +0 -1
  623. package/dist/core/p-2aedc81e.js +0 -2
  624. package/dist/core/p-2aedc81e.js.map +0 -1
  625. package/dist/core/p-3627773f.entry.js +0 -2
  626. package/dist/core/p-3627773f.entry.js.map +0 -1
  627. package/dist/core/p-36b35592.entry.js +0 -2
  628. package/dist/core/p-36b35592.entry.js.map +0 -1
  629. package/dist/core/p-3974176f.entry.js +0 -2
  630. package/dist/core/p-3974176f.entry.js.map +0 -1
  631. package/dist/core/p-3b8b331f.entry.js +0 -2
  632. package/dist/core/p-41e0ad2e.entry.js +0 -2
  633. package/dist/core/p-41e0ad2e.entry.js.map +0 -1
  634. package/dist/core/p-4aa5db49.entry.js +0 -2
  635. package/dist/core/p-4aa5db49.entry.js.map +0 -1
  636. package/dist/core/p-5e42395f.entry.js +0 -2
  637. package/dist/core/p-5e42395f.entry.js.map +0 -1
  638. package/dist/core/p-72c4ebcd.entry.js +0 -2
  639. package/dist/core/p-72cdac94.entry.js +0 -2
  640. package/dist/core/p-77bf7b01.entry.js +0 -2
  641. package/dist/core/p-77bf7b01.entry.js.map +0 -1
  642. package/dist/core/p-7a44bd0a.entry.js +0 -2
  643. package/dist/core/p-7a44bd0a.entry.js.map +0 -1
  644. package/dist/core/p-7c0be05a.entry.js +0 -2
  645. package/dist/core/p-7c0be05a.entry.js.map +0 -1
  646. package/dist/core/p-80c7db1f.entry.js +0 -2
  647. package/dist/core/p-80c7db1f.entry.js.map +0 -1
  648. package/dist/core/p-880743a5.js +0 -2
  649. package/dist/core/p-880743a5.js.map +0 -1
  650. package/dist/core/p-8e5f45d0.entry.js +0 -2
  651. package/dist/core/p-8ede0622.entry.js +0 -2
  652. package/dist/core/p-9256cf6c.entry.js +0 -2
  653. package/dist/core/p-93179cbf.entry.js +0 -2
  654. package/dist/core/p-93179cbf.entry.js.map +0 -1
  655. package/dist/core/p-93b747c1.entry.js +0 -2
  656. package/dist/core/p-9514520c.entry.js.map +0 -1
  657. package/dist/core/p-9897ac81.entry.js +0 -2
  658. package/dist/core/p-9897ac81.entry.js.map +0 -1
  659. package/dist/core/p-9e77f076.entry.js +0 -2
  660. package/dist/core/p-9fcb2ba7.entry.js +0 -2
  661. package/dist/core/p-a0728f09.entry.js +0 -2
  662. package/dist/core/p-a0728f09.entry.js.map +0 -1
  663. package/dist/core/p-a22517e2.entry.js +0 -2
  664. package/dist/core/p-a22517e2.entry.js.map +0 -1
  665. package/dist/core/p-a521c59a.js +0 -2
  666. package/dist/core/p-a521c59a.js.map +0 -1
  667. package/dist/core/p-a5648769.entry.js +0 -2
  668. package/dist/core/p-a8a5e8ca.entry.js +0 -2
  669. package/dist/core/p-b319674e.entry.js +0 -2
  670. package/dist/core/p-b404f53c.entry.js +0 -2
  671. package/dist/core/p-c34dad75.entry.js +0 -2
  672. package/dist/core/p-c9d70c7a.entry.js +0 -2
  673. package/dist/core/p-d512059d.entry.js +0 -2
  674. package/dist/core/p-ded281e6.js +0 -2
  675. package/dist/core/p-e078dab3.entry.js +0 -2
  676. package/dist/core/p-e4ac787c.entry.js +0 -2
  677. package/dist/core/p-e4ac787c.entry.js.map +0 -1
  678. package/dist/core/p-e7b3b5db.entry.js +0 -2
  679. package/dist/core/p-e7b3b5db.entry.js.map +0 -1
  680. package/dist/core/p-f60265c3.entry.js +0 -2
  681. package/dist/core/p-f6863a64.entry.js +0 -2
  682. package/dist/core/p-f6863a64.entry.js.map +0 -1
  683. package/dist/core/p-f9474bb3.entry.js +0 -2
  684. package/dist/core/p-f98f19f6.entry.js +0 -2
  685. package/dist/core/p-fd7a3951.entry.js +0 -2
  686. package/dist/esm/constants-2d5a0e18.js.map +0 -1
  687. package/dist/esm/constants-372455eb.js.map +0 -1
  688. package/dist/esm/gov-tiles.entry.js +0 -22
  689. package/dist/esm/gov-tiles.entry.js.map +0 -1
  690. package/dist/esm/helpers.types-43ddbdb8.js.map +0 -1
  691. package/dist/types/components/gov-tile/container/constants.d.ts +0 -3
  692. package/dist/types/components/gov-tile/container/gov-tiles.d.ts +0 -10
  693. /package/dist/components/{p-73938936.js.map → p-022e49cf.js.map} +0 -0
  694. /package/dist/components/{p-80dad64b.js.map → p-10cad7f1.js.map} +0 -0
  695. /package/dist/components/{p-ded281e6.js.map → p-be086357.js.map} +0 -0
  696. /package/dist/components/{p-c438a723.js.map → p-de989dfe.js.map} +0 -0
  697. /package/dist/components/{p-7be2301a.js.map → p-e0c3b1a7.js.map} +0 -0
  698. /package/dist/core/{p-93b747c1.entry.js.map → p-171e2a2f.entry.js.map} +0 -0
  699. /package/dist/core/{p-9fcb2ba7.entry.js.map → p-25615325.entry.js.map} +0 -0
  700. /package/dist/core/{p-9256cf6c.entry.js.map → p-4216d8f3.entry.js.map} +0 -0
  701. /package/dist/core/{p-29ac15d2.js.map → p-6d54ce5f.js.map} +0 -0
  702. /package/dist/core/{p-72cdac94.entry.js.map → p-6f74eb08.entry.js.map} +0 -0
  703. /package/dist/core/{p-8e5f45d0.entry.js.map → p-774ea182.entry.js.map} +0 -0
  704. /package/dist/core/{p-f60265c3.entry.js.map → p-843f980a.entry.js.map} +0 -0
  705. /package/dist/core/{p-8ede0622.entry.js.map → p-8a72ebcd.entry.js.map} +0 -0
  706. /package/dist/core/{p-5ff7f0c4.entry.js.map → p-8f469270.entry.js.map} +0 -0
  707. /package/dist/core/{p-b319674e.entry.js.map → p-947804a8.entry.js.map} +0 -0
  708. /package/dist/core/{p-ab500948.entry.js.map → p-981f217e.entry.js.map} +0 -0
  709. /package/dist/core/{p-bd667900.entry.js.map → p-a70c7959.entry.js.map} +0 -0
  710. /package/dist/core/{p-c34dad75.entry.js.map → p-aeaba3ef.entry.js.map} +0 -0
  711. /package/dist/core/{p-ded281e6.js.map → p-be086357.js.map} +0 -0
  712. /package/dist/core/{p-0932c74d.entry.js.map → p-bea685cb.entry.js.map} +0 -0
  713. /package/dist/core/{p-9e77f076.entry.js.map → p-c5a49469.entry.js.map} +0 -0
  714. /package/dist/core/{p-49ebfe10.entry.js.map → p-cba1ebca.entry.js.map} +0 -0
  715. /package/dist/core/{p-b404f53c.entry.js.map → p-ccb64e4e.entry.js.map} +0 -0
  716. /package/dist/core/{p-d512059d.entry.js.map → p-d383f977.entry.js.map} +0 -0
  717. /package/dist/core/{p-3b8b331f.entry.js.map → p-d990aae8.entry.js.map} +0 -0
  718. /package/dist/core/{p-a58f4e2b.entry.js.map → p-e2655cb7.entry.js.map} +0 -0
  719. /package/dist/core/{p-c9d70c7a.entry.js.map → p-ead1f58d.entry.js.map} +0 -0
@@ -0,0 +1,155 @@
1
+ import { h, Host } from "@stencil/core";
2
+ import { govHost } from "../../helpers/Dom/template";
3
+ import { BannerBackground, BannerClass, BannerForeground, BannerSizes, BannerTextColor } from "./constants";
4
+ import { validateProp } from "../../helpers/Validate/props";
5
+ export class GovBanner {
6
+ constructor() {
7
+ this.size = BannerSizes._M;
8
+ this.background = BannerBackground.SIMPLE;
9
+ this.foreground = BannerForeground.LOGO;
10
+ this.textColor = BannerTextColor.LIGHT;
11
+ this.h = govHost(this.host);
12
+ }
13
+ validateSize(newValue) {
14
+ validateProp(BannerSizes, newValue, BannerClass.root);
15
+ }
16
+ validateBackground(newValue) {
17
+ validateProp(BannerBackground, newValue, BannerClass.root);
18
+ }
19
+ validateForeground(newValue) {
20
+ validateProp(BannerForeground, newValue, BannerClass.root);
21
+ }
22
+ validateTextColor(newValue) {
23
+ validateProp(BannerTextColor, newValue, BannerClass.root);
24
+ }
25
+ componentWillLoad() {
26
+ this.validateSize(this.size);
27
+ this.validateBackground(this.background);
28
+ this.validateForeground(this.foreground);
29
+ this.validateTextColor(this.textColor);
30
+ }
31
+ render() {
32
+ return (h(Host, Object.assign({ key: '67c767ffc6ac1912bb691c8bb11158dac573e70f', class: this.h.classes(BannerClass.root), role: "region", size: this.size }, (this.size !== "xl" ? {
33
+ background: this.background,
34
+ foreground: this.foreground
35
+ } : { 'text-color': this.textColor })), h("div", { key: '624b24b1e621ef7f7ad4666b56f48ffec9881aee' }, h("div", { key: '90b322dca74ca90be13489d519534ebff0656593', class: BannerClass.content }, h("slot", { key: '272f89cbe0649af7edfd7230861f6232272c8da4', name: "headline" }), h("slot", { key: '1bfa7690842ba1a023af5b7da4edec5acb6c65fe' })), this.h.hasSlot('button') && (h("slot", { key: '5d9611292a76aee4654b16429a89fd46ad610884', name: "button" }))), h("slot", { key: '00000b185434b0d85112beaa2374c7f7b12c19b0', name: "image" })));
36
+ }
37
+ static get is() { return "gov-banner"; }
38
+ static get properties() {
39
+ return {
40
+ "size": {
41
+ "type": "string",
42
+ "mutable": false,
43
+ "complexType": {
44
+ "original": "BannerSizesType",
45
+ "resolved": "\"l\" | \"m\" | \"s\" | \"xl\"",
46
+ "references": {
47
+ "BannerSizesType": {
48
+ "location": "import",
49
+ "path": "./constants",
50
+ "id": "../../../packages/core/src/components/gov-banner/constants.ts::BannerSizesType"
51
+ }
52
+ }
53
+ },
54
+ "required": false,
55
+ "optional": false,
56
+ "docs": {
57
+ "tags": [],
58
+ "text": "Banner\u2019s size."
59
+ },
60
+ "attribute": "size",
61
+ "reflect": true,
62
+ "defaultValue": "BannerSizes._M"
63
+ },
64
+ "background": {
65
+ "type": "string",
66
+ "mutable": false,
67
+ "complexType": {
68
+ "original": "BannerBackgroundsType",
69
+ "resolved": "\"lines\" | \"simple\" | \"stripes\" | \"waves\"",
70
+ "references": {
71
+ "BannerBackgroundsType": {
72
+ "location": "import",
73
+ "path": "./constants",
74
+ "id": "../../../packages/core/src/components/gov-banner/constants.ts::BannerBackgroundsType"
75
+ }
76
+ }
77
+ },
78
+ "required": false,
79
+ "optional": false,
80
+ "docs": {
81
+ "tags": [],
82
+ "text": "Banner\u2019s background"
83
+ },
84
+ "attribute": "background",
85
+ "reflect": false,
86
+ "defaultValue": "BannerBackground.SIMPLE"
87
+ },
88
+ "foreground": {
89
+ "type": "string",
90
+ "mutable": false,
91
+ "complexType": {
92
+ "original": "BannerForegroundsType",
93
+ "resolved": "\"icon\" | \"image\" | \"logo\"",
94
+ "references": {
95
+ "BannerForegroundsType": {
96
+ "location": "import",
97
+ "path": "./constants",
98
+ "id": "../../../packages/core/src/components/gov-banner/constants.ts::BannerForegroundsType"
99
+ }
100
+ }
101
+ },
102
+ "required": false,
103
+ "optional": false,
104
+ "docs": {
105
+ "tags": [],
106
+ "text": "Banner\u2019s foreground"
107
+ },
108
+ "attribute": "foreground",
109
+ "reflect": false,
110
+ "defaultValue": "BannerForeground.LOGO"
111
+ },
112
+ "textColor": {
113
+ "type": "string",
114
+ "mutable": false,
115
+ "complexType": {
116
+ "original": "BannerTextColorsType",
117
+ "resolved": "\"dark\" | \"light\"",
118
+ "references": {
119
+ "BannerTextColorsType": {
120
+ "location": "import",
121
+ "path": "./constants",
122
+ "id": "../../../packages/core/src/components/gov-banner/constants.ts::BannerTextColorsType"
123
+ }
124
+ }
125
+ },
126
+ "required": false,
127
+ "optional": false,
128
+ "docs": {
129
+ "tags": [],
130
+ "text": "XL Banner\u2019s text color"
131
+ },
132
+ "attribute": "text-color",
133
+ "reflect": false,
134
+ "defaultValue": "BannerTextColor.LIGHT"
135
+ }
136
+ };
137
+ }
138
+ static get elementRef() { return "host"; }
139
+ static get watchers() {
140
+ return [{
141
+ "propName": "size",
142
+ "methodName": "validateSize"
143
+ }, {
144
+ "propName": "background",
145
+ "methodName": "validateBackground"
146
+ }, {
147
+ "propName": "foreground",
148
+ "methodName": "validateForeground"
149
+ }, {
150
+ "propName": "text-color",
151
+ "methodName": "validateTextColor"
152
+ }];
153
+ }
154
+ }
155
+ //# sourceMappingURL=gov-banner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gov-banner.js","sourceRoot":"","sources":["../../../../../../src/components/gov-banner/gov-banner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,MAAM,eAAe,CAAA;AACtE,OAAO,EAAC,OAAO,EAAC,MAAM,4BAA4B,CAAA;AAElD,OAAO,EACH,gBAAgB,EAEhB,WAAW,EACX,gBAAgB,EAEhB,WAAW,EAEX,eAAe,EAElB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAC,YAAY,EAAC,MAAM,8BAA8B,CAAC;AAK1D,MAAM,OAAO,SAAS;IAGlB;oBAQwD,WAAW,CAAC,EAAE;0BAIjB,gBAAgB,CAAC,MAAM;0BAIv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,SAAS,EAAC,CAAC;YACrC;gBACI,4DAAK,KAAK,EAAE,WAAW,CAAC,OAAO;oBAC3B,6DAAM,IAAI,EAAC,UAAU,GAAE;oBACvB,8DAAO,CACL;gBACL,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CACzB,6DAAM,IAAI,EAAC,QAAQ,GAAE,CACxB,CACC;YACN,6DAAM,IAAI,EAAC,OAAO,GAAE,CACjB,CACV,CAAA;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import {Component, Element, h, Host, Prop, Watch} from '@stencil/core'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {\n BannerBackground,\n BannerBackgroundsType,\n BannerClass,\n BannerForeground,\n BannerForegroundsType,\n BannerSizes,\n BannerSizesType,\n BannerTextColor,\n BannerTextColorsType\n} from \"./constants\";\nimport {validateProp} from \"../../helpers/Validate/props\";\n\n@Component({\n tag: 'gov-banner',\n})\nexport class GovBanner {\n private h: GovHost\n\n constructor() {\n this.h = govHost(this.host)\n }\n\n @Element() host: HTMLGovBannerElement\n /**\n * Banner’s size.\n */\n @Prop({reflect: true}) readonly size: BannerSizesType = BannerSizes._M\n /**\n * Banner’s background\n */\n @Prop() readonly background: BannerBackgroundsType = BannerBackground.SIMPLE\n /**\n * Banner’s foreground\n */\n @Prop() readonly foreground: BannerForegroundsType = BannerForeground.LOGO\n /**\n * XL Banner’s text color\n */\n @Prop({attribute: 'text-color'}) readonly textColor: BannerTextColorsType = BannerTextColor.LIGHT\n\n @Watch('size')\n validateSize(newValue: string): void {\n validateProp(BannerSizes, newValue, BannerClass.root)\n }\n\n @Watch('background')\n validateBackground(newValue: string): void {\n validateProp(BannerBackground, newValue, BannerClass.root)\n }\n\n @Watch('foreground')\n validateForeground(newValue: string): void {\n validateProp(BannerForeground, newValue, BannerClass.root)\n }\n\n @Watch('text-color')\n validateTextColor(newValue: string): void {\n validateProp(BannerTextColor, newValue, BannerClass.root)\n }\n\n componentWillLoad(): void {\n this.validateSize(this.size)\n this.validateBackground(this.background)\n this.validateForeground(this.foreground)\n this.validateTextColor(this.textColor)\n }\n\n render() {\n return (\n <Host class={this.h.classes(BannerClass.root)}\n role=\"region\"\n size={this.size}\n {...(this.size !== \"xl\" ? {\n background: this.background,\n foreground: this.foreground\n } : {'text-color': this.textColor})}>\n <div>\n <div class={BannerClass.content}>\n <slot name=\"headline\"/>\n <slot/>\n </div>\n {this.h.hasSlot('button') && (\n <slot name=\"button\"/>\n )}\n </div>\n <slot name=\"image\"/>\n </Host>\n )\n }\n}\n"]}
@@ -0,0 +1,10 @@
1
+ export var BlockquoteType;
2
+ (function (BlockquoteType) {
3
+ BlockquoteType["PRIMARY"] = "primary";
4
+ BlockquoteType["SUBTLE"] = "subtle";
5
+ BlockquoteType["NEUTRAL"] = "neutral";
6
+ })(BlockquoteType || (BlockquoteType = {}));
7
+ export const BlockquoteClass = {
8
+ root: 'gov-blockquote',
9
+ };
10
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../src/components/gov-blockquote/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACzB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;IACjB,qCAAmB,CAAA;AACpB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAGD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B,IAAI,EAAE,gBAAgB;CACtB,CAAA","sourcesContent":["import {ValueOf} from \"../../types/interfaces\";\n\nexport enum BlockquoteType {\n\tPRIMARY = 'primary',\n\tSUBTLE = 'subtle',\n\tNEUTRAL = 'neutral',\n}\nexport type BlockquoteTypesType = `${ValueOf<typeof BlockquoteType>}`\n\nexport const BlockquoteClass = {\n\troot: 'gov-blockquote',\n}\n"]}
@@ -0,0 +1,61 @@
1
+ import { Host, h } from "@stencil/core";
2
+ import { govHost } from "../../helpers/Dom/template";
3
+ import { BlockquoteClass, BlockquoteType } from "./constants";
4
+ export class GovBlockquote {
5
+ constructor() {
6
+ this.type = BlockquoteType.SUBTLE;
7
+ this.cite = undefined;
8
+ this.h = govHost(this.host);
9
+ }
10
+ render() {
11
+ return (h(Host, { key: '0d4b930791ee54ea55552b1a8ab9a2f248b5109e', class: this.h.classes(BlockquoteClass.root), type: this.type }, h("gov-icon", { key: 'f27a6a5059203b000bede13c47aa7e5eb150e4cd', type: "components", name: "quote", size: "3xl" }), h("blockquote", { key: '3206cd993309f5636920e5b552e3cd97be98b334', cite: this.cite }, h("slot", { key: '16ac7ec3098d37e1c5b444fe18e47986a5afa915' })), h("slot", { key: 'ae4f20fbf0820346cc9919014ab6a3fc9f9ef96e', name: "image" }), h("slot", { key: 'f43c96fef744f2d6147f8579fad0c808c064c81a', name: "author" })));
12
+ }
13
+ static get is() { return "gov-blockquote"; }
14
+ static get properties() {
15
+ return {
16
+ "type": {
17
+ "type": "string",
18
+ "mutable": false,
19
+ "complexType": {
20
+ "original": "BlockquoteTypesType",
21
+ "resolved": "\"neutral\" | \"primary\" | \"subtle\"",
22
+ "references": {
23
+ "BlockquoteTypesType": {
24
+ "location": "import",
25
+ "path": "./constants",
26
+ "id": "../../../packages/core/src/components/gov-blockquote/constants.ts::BlockquoteTypesType"
27
+ }
28
+ }
29
+ },
30
+ "required": false,
31
+ "optional": false,
32
+ "docs": {
33
+ "tags": [],
34
+ "text": "Blockquote\u2019s type"
35
+ },
36
+ "attribute": "type",
37
+ "reflect": true,
38
+ "defaultValue": "BlockquoteType.SUBTLE"
39
+ },
40
+ "cite": {
41
+ "type": "string",
42
+ "mutable": false,
43
+ "complexType": {
44
+ "original": "string",
45
+ "resolved": "string",
46
+ "references": {}
47
+ },
48
+ "required": false,
49
+ "optional": false,
50
+ "docs": {
51
+ "tags": [],
52
+ "text": "Blockquote\u2019s cite url"
53
+ },
54
+ "attribute": "cite",
55
+ "reflect": false
56
+ }
57
+ };
58
+ }
59
+ static get elementRef() { return "host"; }
60
+ }
61
+ //# sourceMappingURL=gov-blockquote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gov-blockquote.js","sourceRoot":"","sources":["../../../../../../src/components/gov-blockquote/gov-blockquote.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAC,MAAM,eAAe,CAAA;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAC,eAAe,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AAMjF,MAAM,OAAO,aAAa;IAGzB;oBAQ4D,cAAc,CAAC,MAAM;;QAPhF,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAYD,MAAM;QACL,OAAO,CACN,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI;YACjE,iEAAU,IAAI,EAAC,YAAY,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,KAAK,GAAY;YAC/D,mEAAY,IAAI,EAAE,IAAI,CAAC,IAAI;gBAC1B,8DAAQ,CACI;YACb,6DAAM,IAAI,EAAC,OAAO,GAAG;YACrB,6DAAM,IAAI,EAAC,QAAQ,GAAG,CAChB,CACP,CAAA;IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import {Component, Element, Host, h, Prop} from '@stencil/core'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport {BlockquoteClass, BlockquoteType, BlockquoteTypesType} from \"./constants\";\n\n\n@Component({\n\ttag: 'gov-blockquote',\n})\nexport class GovBlockquote {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovBlockquoteElement\n\t/**\n\t * Blockquote’s type\n\t */\n\t@Prop({reflect: true}) readonly type: BlockquoteTypesType = BlockquoteType.SUBTLE\n\t/**\n\t * Blockquote’s cite url\n\t */\n\t@Prop({attribute: 'cite'}) readonly cite: string\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BlockquoteClass.root)} type={this.type}>\n\t\t\t\t<gov-icon type=\"components\" name=\"quote\" size=\"3xl\"></gov-icon>\n\t\t\t\t<blockquote cite={this.cite}>\n\t\t\t\t\t<slot />\n\t\t\t\t</blockquote>\n\t\t\t\t<slot name=\"image\" />\n\t\t\t\t<slot name=\"author\" />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
@@ -40,7 +40,7 @@ export class GovBreadcrumbs {
40
40
  this.toggleOption = sumOfWidths > hostWidth;
41
41
  }
42
42
  render() {
43
- return (h(Host, { key: '81d7a8e273e1ce4740ee35ebe4a570ee8c5e73a4', class: this.h.classes(BreadcrumbsClass.root), expanded: this.expanded }, h("nav", { key: 'dc37fa314f5d84c6c517f64229ef601b256f3ad5', "aria-label": this.accessibleLabel, "aria-labelledby": this.accessibleLabelledBy }, h("slot", { key: '4ead548352e642c0994360d74a98123782790a04' })), this.toggleOption ? (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 }, h("gov-icon", { name: this.expanded ? 'chevron-up' : 'chevron-down', type: "components" }))) : null));
43
+ return (h(Host, { key: 'dadd8de710050476be68e3f6fa0b317d6ccedfc1', class: this.h.classes(BreadcrumbsClass.root), expanded: this.expanded }, h("nav", { key: '468a3b605408c943421243024733b0381809f931', "aria-label": this.accessibleLabel, "aria-labelledby": this.accessibleLabelledBy }, h("slot", { key: '2c9f85b826c8c54340ab5abba51c1861282c9cb7' })), this.toggleOption ? (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 }, h("gov-icon", { name: this.expanded ? 'chevron-up' : 'chevron-down', type: "components" }))) : null));
44
44
  }
45
45
  /**
46
46
  * Validate the WCAG attributes of the component
@@ -60,7 +60,8 @@ export class GovButton {
60
60
  this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { [attributeName]: newValue });
61
61
  }
62
62
  disconnectedCallback() {
63
- this.attributeObserver.stopObserving();
63
+ var _a;
64
+ (_a = this.attributeObserver) === null || _a === void 0 ? void 0 : _a.stopObserving();
64
65
  }
65
66
  componentWillLoad() {
66
67
  this.validateColor(this.color);
@@ -81,9 +82,9 @@ export class GovButton {
81
82
  render() {
82
83
  const Tag = this.href ? Tags.A : Tags.BUTTON;
83
84
  const nativeType = Tag === Tags.A ? undefined : this.nativeType;
84
- return (h(Host, { key: '4e5ef3fbf897b81b07452a9383985353d673fdd6', size: this.size, hydrated: this.hydrated, color: this.color, class: this.h.classes(ButtonClass.root), type: this.type }, 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": toBoolAttrIfDefined(this.disabled) }), toBool(this.loading) && !this.h.hasSlot("icon-end") &&
85
- h("gov-icon", { key: '16a969ee29897508924e61d70b40589d0410f649', name: "loader", class: "gov-spin-animation", type: "components" }), this.h.hasSlot("icon-start") && h("slot", { key: '7d208cc950fedd5b6bbf376152a0c641d8885846', name: "icon-start" }), h("slot", { key: '7c43309c657363dbcc1df14ae3c21d977ec3eb20' }), this.h.hasSlot("icon-end") && h("slot", { key: 'd90b7831900331fe8482757f33847295207f73d2', name: "icon-end" }), toBool(this.loading) && this.h.hasSlot("icon-end") &&
86
- h("gov-icon", { key: 'd23e2000e5bf5b78a81e78d6c3e30aa0e1f3f42c', name: "loader", class: "gov-spin-animation", type: "components" }))));
85
+ return (h(Host, { key: 'cd3d644c54ac882be5adf1645391a873d426e549', size: this.size, hydrated: this.hydrated, color: this.color, class: this.h.classes(ButtonClass.root), type: this.type }, h(Tag, Object.assign({ key: '39c76efc161144865f6bde8cf50e2808d0566415', 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": toBoolAttrIfDefined(this.disabled) }), toBool(this.loading) && !this.h.hasSlot("icon-end") &&
86
+ h("gov-icon", { key: 'b75ed857aacc2b914810fbdbb3c0d39ede423639', name: "loader", class: "gov-spin-animation", type: "components" }), this.h.hasSlot("icon-start") && h("slot", { key: '838152233ab4f51b36217ae0b4077a3f3efc3ecf', name: "icon-start" }), h("slot", { key: '0dbfd16b6de4ea9c0bb92a97297262f10b9a335c' }), this.h.hasSlot("icon-end") && h("slot", { key: '8854b0bced36cabfe85988e22d10d49f9761a910', name: "icon-end" }), toBool(this.loading) && this.h.hasSlot("icon-end") &&
87
+ h("gov-icon", { key: '607c848e0a9e4abf1c4232658a38922ade4accf9', name: "loader", class: "gov-spin-animation", type: "components" }))));
87
88
  }
88
89
  onClickHandler(e) {
89
90
  e.stopPropagation();
@@ -1 +1 @@
1
-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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["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"]}
1
+ {"version":3,"file":"gov-button.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-button/button/gov-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["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"]}
@@ -43,7 +43,7 @@ export class GovDropdown {
43
43
  });
44
44
  }
45
45
  render() {
46
- return (h(Host, { key: '43c2a03dcb27ebe54f8dd00ca1120b848cac957c', class: this.h.classes([DropdownClass.root]), open: this.open, position: this.position }, h("slot", { key: '732c956fe37283578a95c843cf94ad590cd16402' }), h("div", { key: 'c3934a0f7c8303950a5c7898574fcea2e14e1890', ref: el => registerClickOutside(this, el, () => this.open = false), class: DropdownClass.list, id: this.listId, "aria-labelledby": this.controlId, "aria-hidden": toBoolAttr(!this.open), hidden: !this.open }, h("slot", { key: 'cb685039c57f9d32ae7c238fcb7457fe72b4c9c4', name: "list" }))));
46
+ return (h(Host, { key: 'ed9beb8952cacb4b76fc73ab31345bbe8c5d206d', class: this.h.classes([DropdownClass.root]), open: this.open, position: this.position }, h("slot", { key: '49d4da21a53be27e687622d17e21474c7cedb26d' }), h("div", { key: '941b05aab703a6bfd981d912763f4576899fd617', ref: el => registerClickOutside(this, el, () => this.open = false), class: DropdownClass.list, id: this.listId, "aria-labelledby": this.controlId, "aria-hidden": toBoolAttr(!this.open), hidden: !this.open }, h("slot", { key: 'cd0c1f28b7d717efd0fe8faa964df78dfbeca49f', name: "list" }))));
47
47
  }
48
48
  /**
49
49
  * Returns the current state of the dropdown
@@ -5,12 +5,19 @@ import { createID } from "../../utils/string.utils";
5
5
  import { validateAccessibleLabel } from "../../helpers/Validate/wcag";
6
6
  import { canValidateWcagOnRender } from "../../helpers/Dom/win";
7
7
  import { delay } from "../../utils/utils";
8
+ var Tags;
9
+ (function (Tags) {
10
+ Tags["A"] = "a";
11
+ Tags["DIV"] = "div";
12
+ })(Tags || (Tags = {}));
8
13
  export class GovCard {
9
14
  constructor() {
10
15
  this.hydrated = false;
11
16
  this.direction = "vertical";
12
17
  this.collapsible = false;
13
18
  this.open = true;
19
+ this.href = undefined;
20
+ this.target = undefined;
14
21
  this.accessibleTriggerLabel = undefined;
15
22
  this.accessibleTriggerLabelledBy = undefined;
16
23
  this.h = govHost(this.host);
@@ -27,7 +34,8 @@ export class GovCard {
27
34
  this.hydrated = true;
28
35
  }
29
36
  render() {
30
- return (h(Host, { key: '16ef4ffbb0a84bb231008f4f52a4ffe1f2f809d8', class: this.h.classes(CardClass.root), open: this.open, collapsible: booleanString(this.collapsible), direction: this.direction, hydrated: this.hydrated }, this.collapsible ? (h("button", { id: this.headlineId, class: CardClass.header, "aria-label": this.accessibleTriggerLabel, "aria-labelledby": this.accessibleTriggerLabelledBy, "aria-expanded": booleanString(this.open), "aria-controls": this.contentId, onClick: this.onClickHandler.bind(this) }, h("slot", { name: "headline" }), h("gov-icon", { class: CardClass.arrow, name: "chevron-down", type: "components" }))) : this.h.hasSlot("headline") ? (h("div", { class: CardClass.header }, h("slot", { name: "headline" }))) : null, h("div", { key: '749f6e4b624f4cdda53d2e3433b451d56c742667', class: CardClass.inner, id: this.contentId, "aria-hidden": this.collapsible ? booleanString(!this.open) : undefined, hidden: this.collapsible ? !this.open : undefined, "aria-labelledby": this.collapsible ? this.headlineId : undefined }, this.h.hasSlot('img') && (h("div", { key: 'f4b953ddf9b4f59bc111b512bb3de3510b28af7f', class: CardClass.img }, h("slot", { key: '2867a29e49e67aff041ac0705527c5f76f4a019e', name: "img" }))), this.h.hasSlot('icon') && (h("div", { key: '8c8e55d3faff7cfbd6abe698cd8801f7fc41dbad', class: CardClass.icon }, h("slot", { key: '4d9eaeb0b3af65e4bf5de75090f9346942069e86', name: "icon" }))), h("div", { key: '77a9a065fb2803b5f39f1b5716d9810c04b6971b', class: CardClass.content }, h("slot", { key: 'acec7d3d4b6ac5533e5df218fe38e26147c440d8' })), this.h.hasSlot('footer') && (h("div", { key: '1e63a0811f487e18cbbef8b045651c0e5b745f37', class: CardClass.footer }, h("slot", { key: '4bffc12bffb3e29527aad38b6edbe8c00527a843', name: "footer" }))))));
37
+ const Tag = this.href ? Tags.A : Tags.DIV;
38
+ return (h(Host, { key: '3a11dfeface1fa81d0c27f4ee3644c1c3b3a0191', class: this.h.classes(CardClass.root), open: this.open, collapsible: booleanString(this.collapsible), clickable: this.href ? true : null, direction: this.direction, hydrated: this.hydrated }, this.collapsible ? (h("button", { id: this.headlineId, class: CardClass.header, "aria-label": this.accessibleTriggerLabel, "aria-labelledby": this.accessibleTriggerLabelledBy, "aria-expanded": booleanString(this.open), "aria-controls": this.contentId, onClick: this.onClickHandler.bind(this) }, h("slot", { name: "headline" }), h("gov-icon", { class: CardClass.arrow, name: "chevron-down", type: "components" }))) : this.h.hasSlot("headline") ? (h("div", { class: CardClass.header }, h("slot", { name: "headline" }))) : null, h(Tag, { key: 'bdf47c610db6c937ebe9f6fa45124b5df8e2847f', href: this.href, target: this.target, id: this.contentId, "aria-hidden": this.collapsible ? booleanString(!this.open) : undefined, hidden: this.collapsible ? !this.open : undefined, "aria-labelledby": this.collapsible ? this.headlineId : undefined, class: CardClass.inner }, this.h.hasSlot('img') && (h("div", { key: '11ed1b55fe67d05382d538c903726ffd84fb7d48', class: CardClass.img }, h("slot", { key: 'b1c362609163af2748256ecd1370bd074b8cd396', name: "img" }))), this.h.hasSlot('icon') && (h("div", { key: '70b848927a86419442be3a84ee060c27a87fa12b', class: CardClass.icon }, h("slot", { key: '357b5dffa7c0970495ed167ca9a5db0b8d67c721', name: "icon" }))), h("div", { key: '0bec7d7dc66dda27ba05e9041caeca8f20def8c4', class: CardClass.content }, h("slot", { key: 'e3b08eb1097e0d788df4a45f78711bd0a5f02656' })), this.h.hasSlot('footer') && (h("div", { key: '0f4ef687f88e18a935d8f651bb7d2a9ea2c3df97', class: CardClass.footer }, h("slot", { key: 'd645292f3ee9f007d9aeffdefcf2c26a1e5415b1', name: "footer" }))))));
31
39
  }
32
40
  onClickHandler(e) {
33
41
  e.stopPropagation();
@@ -107,6 +115,49 @@ export class GovCard {
107
115
  "reflect": true,
108
116
  "defaultValue": "true"
109
117
  },
118
+ "href": {
119
+ "type": "string",
120
+ "mutable": false,
121
+ "complexType": {
122
+ "original": "string",
123
+ "resolved": "string",
124
+ "references": {}
125
+ },
126
+ "required": false,
127
+ "optional": false,
128
+ "docs": {
129
+ "tags": [],
130
+ "text": "Link on whole card"
131
+ },
132
+ "attribute": "href",
133
+ "reflect": true
134
+ },
135
+ "target": {
136
+ "type": "string",
137
+ "mutable": false,
138
+ "complexType": {
139
+ "original": "ButtonTargetType",
140
+ "resolved": "\"_blank\" | \"_new\" | \"_self\"",
141
+ "references": {
142
+ "ButtonTargetType": {
143
+ "location": "import",
144
+ "path": "../gov-button/button/constants",
145
+ "id": "../../../packages/core/src/components/gov-button/button/constants.ts::ButtonTargetType"
146
+ }
147
+ }
148
+ },
149
+ "required": false,
150
+ "optional": true,
151
+ "docs": {
152
+ "tags": [{
153
+ "name": "link",
154
+ "text": "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target"
155
+ }],
156
+ "text": "Same as original parameter"
157
+ },
158
+ "attribute": "target",
159
+ "reflect": false
160
+ },
110
161
  "accessibleTriggerLabel": {
111
162
  "type": "string",
112
163
  "mutable": false,
@@ -1 +1 @@
1
- {"version":3,"file":"gov-card.js","sourceRoot":"","sources":["../../../../../../src/components/gov-card/gov-card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,MAAM,eAAe,CAAA;AAC5F,OAAO,EAAC,SAAS,EAAoB,MAAM,aAAa,CAAA;AACxD,OAAO,EAAC,aAAa,EAAE,OAAO,EAAC,MAAM,4BAA4B,CAAA;AAEjE,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAA;AACjD,OAAO,EAAC,uBAAuB,EAAC,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAC,uBAAuB,EAAC,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EAAC,KAAK,EAAC,MAAM,mBAAmB,CAAA;AAMvC,MAAM,OAAO,OAAO;IAMnB;QAFQ,aAAQ,GAAG,KAAK,CAAA;yBAawB,UAAU;2BAIlB,KAAK;oBAIA,IAAI;;;QAlBhD,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAA;QAC7C,IAAI,CAAC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CAAA;QAC3D,CAAC;IACF,CAAC;IAED;;OAEG;IAEH,KAAK,CAAC,qBAAqB;QAC1B,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACtB,uBAAuB,CAAC,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAAC,2BAA2B,EAAE,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;QAClH,CAAC;IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop} from '@stencil/core'\nimport {CardClass, CardDirectionType} 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 * Card direction\n\t */\n\t@Prop() readonly direction: CardDirectionType = \"vertical\"\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)} direction={this.direction} 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<div class={CardClass.img}>\n\t\t\t\t\t\t\t<slot name=\"img\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t\t<div class={CardClass.icon}>\n\t\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div class={CardClass.content}>\n\t\t\t\t\t\t<slot/>\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"]}
1
+ {"version":3,"file":"gov-card.js","sourceRoot":"","sources":["../../../../../../src/components/gov-card/gov-card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,MAAM,eAAe,CAAA;AAC5F,OAAO,EAAC,SAAS,EAAoB,MAAM,aAAa,CAAA;AACxD,OAAO,EAAC,aAAa,EAAE,OAAO,EAAC,MAAM,4BAA4B,CAAA;AAEjE,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop} from '@stencil/core'\nimport {CardClass, CardDirectionType} 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'\nimport {ButtonTargetType} from \"../gov-button/button/constants\";\n\nenum Tags {\n\tA = \"a\",\n\tDIV = \"div\",\n}\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 * Card direction\n\t */\n\t@Prop() readonly direction: CardDirectionType = \"vertical\"\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 * Link on whole card\n\t */\n\t@Prop({reflect: true}) 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 * 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\tconst Tag = this.href ? Tags.A : Tags.DIV\n\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)}\n\t\t\t\t clickable={this.href ? true : null}\n\t\t\t\t direction={this.direction} 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<Tag href={this.href}\n\t\t\t\t\t target={this.target}\n\t\t\t\t\t id={this.contentId}\n\t\t\t\t\t aria-hidden={this.collapsible ? booleanString(!this.open) : undefined}\n\t\t\t\t\t hidden={this.collapsible ? !this.open : undefined}\n\t\t\t\t\t aria-labelledby={this.collapsible ? this.headlineId : undefined}\n\t\t\t\t\t class={CardClass.inner}>\n\n\t\t\t\t\t{this.h.hasSlot('img') && (\n\t\t\t\t\t\t<div class={CardClass.img}>\n\t\t\t\t\t\t\t<slot name=\"img\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t\t<div class={CardClass.icon}>\n\t\t\t\t\t\t\t<slot name=\"icon\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div class={CardClass.content}>\n\t\t\t\t\t\t<slot/>\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</Tag>\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"]}
@@ -44,7 +44,8 @@ export class GovChip {
44
44
  this.attributeObserver.startObserving(ariaAttributes);
45
45
  }
46
46
  disconnectedCallback() {
47
- this.attributeObserver.stopObserving();
47
+ var _a;
48
+ (_a = this.attributeObserver) === null || _a === void 0 ? void 0 : _a.stopObserving();
48
49
  }
49
50
  connectedCallback() {
50
51
  this.hydrated = true;
@@ -58,11 +59,11 @@ export class GovChip {
58
59
  const nativeType = Tag == NativeType.BUTTON ? NativeType.BUTTON : undefined;
59
60
  const iconStart = prepareIconFormat(this.iconStart);
60
61
  const iconEnd = prepareIconFormat(this.iconEnd);
61
- return (h(Host, { key: '35148b293a6ae608eb1c4e0db06bbfff8b9fdca7', class: this.h.classes([
62
+ return (h(Host, { key: '6891a65866779d31691de4842180ae22767c4268', class: this.h.classes([
62
63
  ChipClass.root,
63
64
  this.h.hasSlot("right") ? ChipClass.hasRight : undefined,
64
65
  this.h.hasSlot("left") ? ChipClass.hasLeft : undefined,
65
- ]), 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 }, h(Tag, Object.assign({ key: '01ba70f91c8be428f91ca4744d093e408dd5acbe', class: "element", href: this.href, target: this.target, ref: el => (this.triggerRef = el), onClick: this.onClickHandler.bind(this), tabindex: (this.h.hasSlot("left") || this.h.hasSlot("right") || this.disabled) && !this.focusable ? "-1" : "0", id: this.identifier || this.chipId, type: nativeType }, this.inheritedAttributes, { "aria-disabled": this.disabled }), h("slot", { key: '28acde76889a8b529dae69b1e55f5f3db51b8e25', name: "left" }), h("slot", { key: '1c8fc171656757933a0bb0568a335ee11c09ce6f', name: "icon-start" }, iconStart && h("gov-icon", { key: 'b2e91ec6724f3ad50433c10597c44f50826dfcfe', type: iconStart.type, name: iconStart.name })), h("slot", { key: '0a37763084f9a0b7269efe6cc6ebd71161890861' }), h("slot", { key: '5b37c8b8350ed2ead0a85d81ed0ba22295b3679e', name: "icon-end" }, iconEnd && h("gov-icon", { key: '22dfae0ca565fddaa10e6179dc7d0ef38839764f', type: iconEnd.type, name: iconEnd.name })), h("slot", { key: 'fe177d273f38e81cc9ffc686c62e05bd466c1fe8', name: "right" }))));
66
+ ]), 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 }, h(Tag, Object.assign({ key: '32a2696de42de539438caa0842d0fefa31804b77', 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 }), h("slot", { key: '93a5178477cbd4e0e09789c3ff0941e0972943f3', name: "left" }), h("slot", { key: '7d019aa4f2e543a8cb22e7d694c6994656e92065', name: "icon-start" }, iconStart && h("gov-icon", { key: '6077e90d13e1fe7945c43abf142e308fa88b10b9', type: iconStart.type, name: iconStart.name })), h("slot", { key: '8c2fbc69cade5187c4dc3805e2eb9b2639620687' }), h("slot", { key: 'ba590e6f48cf44ceb293917dbdecf34472db28ad', name: "icon-end" }, iconEnd && h("gov-icon", { key: '030988484d52eb2a47b192888a8e4a1e8773bd74', type: iconEnd.type, name: iconEnd.name })), h("slot", { key: 'b62f2b1359a70b2aba874686d33f3dd5b7d0c8a2', name: "right" }))));
66
67
  }
67
68
  onClickHandler(e) {
68
69
  e.stopPropagation();
@@ -1 +1 @@
1
- {"version":3,"file":"gov-chip.js","sourceRoot":"","sources":["../../../../../../src/components/gov-chip/gov-chip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,eAAe,CAAA;AAE1G,OAAO,EAAC,YAAY,EAAC,MAAM,8BAA8B,CAAA;AACzD,OAAO,EAAC,OAAO,EAAC,MAAM,4BAA4B,CAAA;AAClD,OAAO,EAAC,SAAS,EAAE,SAAS,EAAgC,UAAU,EAAkB,MAAM,aAAa,CAAA;AAC3G,OAAO,EAAC,YAAY,EAAmB,WAAW,EAAC,MAAM,gCAAgC,CAAA;AACzF,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAA;AACjD,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,qBAAqB,EAAC,MAAM,2CAA2C,CAAC;AAChF,OAAO,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AAK,IAAI,IAAI,CAAC,GAAG,KAAK,UAAU,CAAC,MAAM,EAAE,CAAC;YAC/D,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACtB,CAAC;IACF,CAAC;IAED;;OAEG;IAEH,KAAK,CAAC,KAAK;QACV,OAAO,IAAI,CAAC,UAAU,CAAA;IACvB,CAAC;IAED;;OAEG;IAEH,KAAK,CAAC,QAAQ;QACb,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;IACxB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["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"]}
1
+ {"version":3,"file":"gov-chip.js","sourceRoot":"","sources":["../../../../../../src/components/gov-chip/gov-chip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK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DAAM,IAAI,EAAC,YAAY,IACrB,SAAS,IAAI,iEAAU,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,GAAa,CACzE;gBACP,8DAAO;gBACP,6DAAM,IAAI,EAAC,UAAU,IACnB,OAAO,IAAI,iEAAU,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,GAAa,CACnE;gBACP,6DAAM,IAAI,EAAC,OAAO,GAAQ,CACrB,CACA,CACP,CAAA;IACF,CAAC;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,CAAC;YAC/D,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACtB,CAAC;IACF,CAAC;IAED;;OAEG;IAEH,KAAK,CAAC,KAAK;QACV,OAAO,IAAI,CAAC,UAAU,CAAA;IACvB,CAAC;IAED;;OAEG;IAEH,KAAK,CAAC,QAAQ;QACb,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;IACxB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["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"]}
@@ -6,7 +6,7 @@ export class GovContainer {
6
6
  this.h = govHost(this.host);
7
7
  }
8
8
  render() {
9
- return (h(Host, { key: '0844c86e0eacd5f89bcfcad2b60e56da0097b506', class: this.h.classes(ContainerClass.root) }, h("slot", { key: '5cd801a016968be5968a3598d3efa3b222953120' })));
9
+ return (h(Host, { key: '82f7c451b4196138a062e9e807c0b264b5f8e1fe', class: this.h.classes(ContainerClass.root) }, h("slot", { key: '04a40aeafe57c99f4a148d04320bf390e3444ea8' })));
10
10
  }
11
11
  static get is() { return "gov-container"; }
12
12
  static get elementRef() { return "host"; }