@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-e2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AAC,CAAC,OAAO,CAAC,CAAC,OAAO;YAC5D,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,EAAE;gBAC/C,OAAO,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,CAAA;aACzD;YACD,OAAO,CAAC,YAAY,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAA;YACjD,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC;SAC/C,CAAC,CAAA;KACF;IAED,MAAM;QACL,QACCC,QAACC,UAAI,qDAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAACJ,wBAAc,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,IACjFG,oEAAa,CACP,EACP;KACD;;;;;;;;;;;","names":["FormRadioGroupClass","govHost","validateProp","FormGroupSizes","FormGroupClass","FormGroupOrientation","tick","h","Host"],"sources":["../../../packages/core/src/components/gov-form/group/gov-form-group.scss?tag=gov-form-radio-group","../../../packages/core/src/components/gov-form/group/gov-form-radio-group.tsx"],"sourcesContent":["/* Form Control */\n\n\ngov-form-group, .gov-form-group,\ngov-form-radio-group, .gov-form-radio-group,\ngov-form-checkbox-group, .gov-form-checkbox-group {\n\t// VARIABLES\n\t@import \"./gov-form-group-variables\";\n\n\t@include reset-margin();\n\t@include base(flex);\n\tflex-direction: column;\n\talign-items: flex-start;\n\t.gov-form-label__label {\n\t\tmargin: 0;\n\t}\n\n\t&[orientation=\"horizontal\"] {\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\t.gov-form-label__label {\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n\n\t// SIZES\n\t@each $size, $definitions in $form-group-gaps {\n\t\t&[gap=\"#{$size}\"] {\n\t\t\tgap: map-get($definitions, \"gap\");\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, Watch} from \"@stencil/core\"\nimport {\n\tFormGroupClass,\n\tFormGroupOrientation,\n\tFormGroupOrientationType,\n\tFormGroupSizes,\n\tFormGroupSizesType,\n\tFormRadioGroupClass\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormRadioEvent} from \"../radio/gov-form-radio.types\"\nimport {FormRadioGroupEvent} from \"./gov-form-group.types\"\nimport {tick} from \"../../../utils/stencil.utils\"\n\n@Component({\n\ttag: \"gov-form-radio-group\",\n\tstyleUrl: \"gov-form-group.scss\",\n})\nexport class GovFormRadioGroup {\n\tprivate readonly h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovFormGroupElement\n\t/**\n\t * Gap's size.\n\t */\n\t@Prop() readonly gap?: FormGroupSizesType = undefined\n\t/**\n\t * Elements orientation\n\t */\n\t@Prop() readonly orientation?: FormGroupOrientationType = 'vertical'\n\t/**\n\t * Group's value\n\t */\n\t@Prop({attribute: \"value\", mutable: true}) value?: string = undefined\n\t/**\n\t * Emitted when the checkbox change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormRadioGroupEvent>\n\n\t@Watch(\"gap\")\n\tvalidateGap(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupSizes, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\t@Watch(\"orientation\")\n\tvalidateOrientation(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupOrientation, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\thandleChange = (event: CustomEvent<FormRadioEvent>) => {\n\t\tevent.stopPropagation()\n\t\tthis.value = event.detail.value\n\t\tthis.govChange.emit({\n\t\t\tvalue: this.value,\n\t\t\tcomponent: FormRadioGroupClass.root,\n\t\t})\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateGap(this.gap)\n\t\tthis.validateOrientation(this.orientation)\n\t}\n\n\tcomponentDidRender(): void {\n\t\ttick(() => this.rerenderComponent())\n\t}\n\n\trerenderComponent(): void {\n\t\tthis.host.querySelectorAll('gov-form-radio').forEach((element) => {\n\t\t\tif (!element.hasAttribute('listener-attached')) {\n\t\t\t\telement.addEventListener('gov-change', this.handleChange)\n\t\t\t}\n\t\t\telement.setAttribute('listener-attached', 'true')\n\t\t\telement.checked = element.value === this.value;\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host gap={this.gap} class={this.h.classes(FormGroupClass.root)} value={this.value}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-form-radio-group.entry.cjs.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,ssEAAssE,CAAC;AAC/tE,gCAAe,eAAe;;MCmBjB,iBAAiB;IAG7B;;;QAoCA,iBAAY,GAAG,CAAC,KAAkC;YACjD,KAAK,CAAC,eAAe,EAAE,CAAA;YACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAA;YAC/B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;gBACnB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,SAAS,EAAEA,6BAAmB,CAAC,IAAI;aACnC,CAAC,CAAA;SACF,CAAA;mBAnC2C,SAAS;2BAIK,UAAU;qBAIR,SAAS;QAfpE,IAAI,CAAC,CAAC,GAAGC,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAqBD,WAAW,CAAC,QAAgB;QAC3B,IAAI,QAAQ,EAAE;YACbC,kBAAY,CAACC,wBAAc,EAAE,QAAQ,EAAEC,wBAAc,CAAC,IAAI,CAAC,CAAA;SAC3D;KACD;IAGD,mBAAmB,CAAC,QAAgB;QACnC,IAAI,QAAQ,EAAE;YACbF,kBAAY,CAACG,8BAAoB,EAAE,QAAQ,EAAED,wBAAc,CAAC,IAAI,CAAC,CAAA;SACjE;KACD;IAWD,iBAAiB;QAChB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAC1B,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;KAC1C;IAED,kBAAkB;QACjBE,kBAAI,CAAC,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAA;KACpC;IAED,iBAAiB;QAChB,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO;YAC5D,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,EAAE;gBAC/C,OAAO,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,CAAA;aACzD;YACD,OAAO,CAAC,YAAY,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAA;YACjD,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC;SAC/C,CAAC,CAAA;KACF;IAED,MAAM;QACL,QACCC,QAACC,UAAI,qDAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAACJ,wBAAc,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,IACjFG,oEAAa,CACP,EACP;KACD;;;;;;;;;;;","names":["FormRadioGroupClass","govHost","validateProp","FormGroupSizes","FormGroupClass","FormGroupOrientation","tick","h","Host"],"sources":["../../../packages/core/src/components/gov-form/group/gov-form-group.scss?tag=gov-form-radio-group","../../../packages/core/src/components/gov-form/group/gov-form-radio-group.tsx"],"sourcesContent":["/* Form Control */\n\n\ngov-form-group, .gov-form-group,\ngov-form-radio-group, .gov-form-radio-group,\ngov-form-checkbox-group, .gov-form-checkbox-group {\n\t// VARIABLES\n\t@import \"./gov-form-group-variables\";\n\n\t@include reset-margin();\n\t@include base(flex);\n\tflex-direction: column;\n\talign-items: flex-start;\n\t.gov-form-label__label {\n\t\tmargin: 0;\n\t}\n\n\t&[orientation=\"horizontal\"] {\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\t.gov-form-label__label {\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n\n\t// SIZES\n\t@each $size, $definitions in $form-group-gaps {\n\t\t&[gap=\"#{$size}\"] {\n\t\t\tgap: map-get($definitions, \"gap\");\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Prop, Watch} from \"@stencil/core\"\nimport {\n\tFormGroupClass,\n\tFormGroupOrientation,\n\tFormGroupOrientationType,\n\tFormGroupSizes,\n\tFormGroupSizesType,\n\tFormRadioGroupClass\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormRadioEvent} from \"../radio/gov-form-radio.types\"\nimport {FormRadioGroupEvent} from \"./gov-form-group.types\"\nimport {tick} from \"../../../utils/stencil.utils\"\n\n@Component({\n\ttag: \"gov-form-radio-group\",\n\tstyleUrl: \"gov-form-group.scss\",\n})\nexport class GovFormRadioGroup {\n\tprivate readonly h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovFormGroupElement\n\t/**\n\t * Gap's size.\n\t */\n\t@Prop() readonly gap?: FormGroupSizesType = undefined\n\t/**\n\t * Elements orientation\n\t */\n\t@Prop() readonly orientation?: FormGroupOrientationType = 'vertical'\n\t/**\n\t * Group's value\n\t */\n\t@Prop({attribute: \"value\", mutable: true}) value?: string = undefined\n\t/**\n\t * Emitted when the checkbox change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormRadioGroupEvent>\n\n\t@Watch(\"gap\")\n\tvalidateGap(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupSizes, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\t@Watch(\"orientation\")\n\tvalidateOrientation(newValue: string): void {\n\t\tif (newValue) {\n\t\t\tvalidateProp(FormGroupOrientation, newValue, FormGroupClass.root)\n\t\t}\n\t}\n\n\thandleChange = (event: CustomEvent<FormRadioEvent>) => {\n\t\tevent.stopPropagation()\n\t\tthis.value = event.detail.value\n\t\tthis.govChange.emit({\n\t\t\tvalue: this.value,\n\t\t\tcomponent: FormRadioGroupClass.root,\n\t\t})\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateGap(this.gap)\n\t\tthis.validateOrientation(this.orientation)\n\t}\n\n\tcomponentDidRender(): void {\n\t\ttick(() => this.rerenderComponent())\n\t}\n\n\trerenderComponent(): void {\n\t\tthis.host.querySelectorAll('gov-form-radio').forEach((element) => {\n\t\t\tif (!element.hasAttribute('listener-attached')) {\n\t\t\t\telement.addEventListener('gov-change', this.handleChange)\n\t\t\t}\n\t\t\telement.setAttribute('listener-attached', 'true')\n\t\t\telement.checked = element.value === this.value;\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host gap={this.gap} class={this.h.classes(FormGroupClass.root)} value={this.value}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
@@ -69,7 +69,8 @@ const GovFormRadio = class {
69
69
  this.hydrated = true;
70
70
  }
71
71
  disconnectedCallback() {
72
- this.attributeObserver.stopObserving();
72
+ var _a;
73
+ (_a = this.attributeObserver) === null || _a === void 0 ? void 0 : _a.stopObserving();
73
74
  }
74
75
  onAriaAttributeChange(attributeName, newValue) {
75
76
  this.host.removeAttribute(attributeName);
@@ -1 +1 @@
1
- {"file":"gov-form-radio.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;MAiBa,YAAY;IASxB;;;;;QAFQ,aAAQ,GAAG,KAAK,CA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B,SAAS,EAAEA,mBAAc,CAAC,IAAI;YAC9B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;IAEO,eAAe,CAAC,CAAQ;QAC/B,IAAI,CAAC,OAAO,GAAI,CAAC,CAAC,MAA2B,CAAC,OAAO,CAAA;QACrD,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YACnB,SAAS,EAAEA,mBAAc,CAAC,IAAI;YAC9B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,CAAA;KACpB;;;;;;;;;;;","names":["createID","govHost","govForm","validateProp","FormRadioSizes","FormRadioClass","toBoolAttr","inheritAriaAttributes","AttributeObserver","ariaAttributes","h","Host","toBoolAttrIfDefined","Fragment"],"sources":["../../../packages/core/src/components/gov-form/radio/gov-form-radio.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormRadioClass, FormRadioSizes, FormRadioSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport {FormRadioEvent} from \"./gov-form-radio.types\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\n\n@Component({\n\ttag: \"gov-form-radio\",\n})\nexport class GovFormRadio {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly radioId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.radioId = createID(\"GovRadio\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormRadioElement\n\t/**\n\t * Value of radio\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Radio button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the radio component disabled.\n\t * This prevents users from being able to interact with the radio, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Name of the radio.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Radio's size.\n\t */\n\t@Prop() readonly size?: FormRadioSizesType = \"m\"\n\t/**\n\t * Custom radio identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the radio has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormRadioEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormRadioSizes, newValue, FormRadioClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"radio\")\n\t}\n\n\n\tcomponentWillLoad() {\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\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.radioId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\tconst wrapRadio = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn <label class={FormRadioClass.label}>{children}</label>\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormRadioClass.root} hydrated={this.hydrated} checked={this.checked} size={this.size}\n\t\t\t\t invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapRadio(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={FormRadioClass.input}\n\t\t\t\t\t\t\tid={this.identifier || this.radioId}\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\"/>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-form-radio.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;MAiBa,YAAY;IASxB;;;;;QAFQ,aAAQ,GAAG,KAAK,CAAA;;uBAiBmC,KAAK;uBAIhB,KAAK;wBAKhB,KAAK;wBAKU,KAAK;;oBAQZ,GAAG;;;mCAkCL,EAAE;QAtE5C,IAAI,CAAC,OAAO,GAAGA,qBAAQ,CAAC,UAAU,CAAC,CAAA;QAEnC,IAAI,CAAC,CAAC,GAAGC,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,CAAC,GAAGC,YAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KACxB;IAuDD,YAAY,CAAC,QAAgB;QAC5BC,kBAAY,CAACC,mBAAc,EAAE,QAAQ,EAAEC,mBAAc,CAAC,IAAI,CAAC,CAAA;KAC3D;IAKD,iBAAiB;QAChB,IAAI,CAAC,gBAAgB,EAAE,CAAA;KACvB;IAIO,gBAAgB;QACvB,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3C,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,SAAS,EAAEC,mBAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAA;QAC7D,IAAI,CAAC,CA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AAC,IAChD,EACFF,sBACCA,kBAAM,IAAI,EAAC,OAAO,GAAE,CACd,CACG,CACX,CACK,EACP;KACD;IAEO,cAAc,CAAC,CAAe;QACrC,CAAC,CAAC,eAAe,EAAE,CAAA;KACnB;IAEO,cAAc,CAAC,CAAa;QACnC,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;YAClB,SAAS,EAAEL,mBAAc,CAAC,IAAI;YAC9B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;IAEO,aAAa,CAAC,CAAa;QAClC,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;YACjB,SAAS,EAAEA,mBAAc,CAAC,IAAI;YAC9B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;IAEO,eAAe,CAAC,CAAQ;QAC/B,IAAI,CAAC,OAAO,GAAI,CAAC,CAAC,MAA2B,CAAC,OAAO,CAAA;QACrD,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YACnB,SAAS,EAAEA,mBAAc,CAAC,IAAI;YAC9B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,CAAA;KACpB;;;;;;;;;;;","names":["createID","govHost","govForm","validateProp","FormRadioSizes","FormRadioClass","toBoolAttr","inheritAriaAttributes","AttributeObserver","ariaAttributes","h","Host","toBoolAttrIfDefined","Fragment"],"sources":["../../../packages/core/src/components/gov-form/radio/gov-form-radio.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormRadioClass, FormRadioSizes, FormRadioSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport {FormRadioEvent} from \"./gov-form-radio.types\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\n\n@Component({\n\ttag: \"gov-form-radio\",\n})\nexport class GovFormRadio {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly radioId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.radioId = createID(\"GovRadio\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormRadioElement\n\t/**\n\t * Value of radio\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Radio button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the radio component disabled.\n\t * This prevents users from being able to interact with the radio, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Name of the radio.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Radio's size.\n\t */\n\t@Prop() readonly size?: FormRadioSizesType = \"m\"\n\t/**\n\t * Custom radio identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the radio has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormRadioEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormRadioSizes, newValue, FormRadioClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"radio\")\n\t}\n\n\n\tcomponentWillLoad() {\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\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.radioId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\tconst wrapRadio = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn <label class={FormRadioClass.label}>{children}</label>\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormRadioClass.root} hydrated={this.hydrated} checked={this.checked} size={this.size}\n\t\t\t\t invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapRadio(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={FormRadioClass.input}\n\t\t\t\t\t\t\tid={this.identifier || this.radioId}\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\"/>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n"],"version":3}
@@ -0,0 +1,207 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-0e4f24f9.js');
6
+ const utils = require('./utils-d263c5c6.js');
7
+ const sizes = require('./sizes-89f8d3b2.js');
8
+ const template = require('./template-39939fd6.js');
9
+ const props = require('./props-d189860c.js');
10
+ const attribute = require('./attribute-06dc5228.js');
11
+ const form = require('./form-4e66039a.js');
12
+ const stencil_utils = require('./stencil.utils-182382ee.js');
13
+ const helpers_types = require('./helpers.types-9066e4a4.js');
14
+ const string_utils = require('./string.utils-b84c81cf.js');
15
+ const accessibility = require('./accessibility-c475826b.js');
16
+ require('./gov.log-bfea3151.js');
17
+ require('./constants-b9fece07.js');
18
+ require('./colors-f7c8eadd.js');
19
+ require('./constants-47ba678b.js');
20
+ require('./constants-87bab1ed.js');
21
+
22
+ const FormRangeSizes = utils.pick(sizes.Sizes, ['_S', '_M', '_L']);
23
+ const FormRangeClass = {
24
+ root: 'gov-form-range',
25
+ fill: 'gov-form-range--fill',
26
+ input: 'gov-form-range--input',
27
+ };
28
+
29
+ const GovFormRange = class {
30
+ constructor(hostRef) {
31
+ index.registerInstance(this, hostRef);
32
+ this.govFocus = index.createEvent(this, "gov-focus", 7);
33
+ this.govBlur = index.createEvent(this, "gov-blur", 7);
34
+ this.govInput = index.createEvent(this, "gov-input", 7);
35
+ this.size = "m";
36
+ this.value = undefined;
37
+ this.identifier = undefined;
38
+ this.name = undefined;
39
+ this.min = undefined;
40
+ this.max = undefined;
41
+ this.step = undefined;
42
+ this.tooltip = false;
43
+ this.input = false;
44
+ this.listIdentifier = undefined;
45
+ this.required = false;
46
+ this.success = undefined;
47
+ this.invalid = undefined;
48
+ this.disabled = false;
49
+ this.inheritedAttributes = {};
50
+ this.h = template.govHost(this.host);
51
+ this.f = form.govForm(this.h);
52
+ this.inputId = string_utils.createID("GovInput");
53
+ }
54
+ validateSize(newValue) {
55
+ props.validateProp(FormRangeSizes, newValue, FormRangeClass.root);
56
+ }
57
+ watchValue() {
58
+ this.controlOutputPosition();
59
+ }
60
+ watchControlAttrs() {
61
+ this.passControlAttrs();
62
+ }
63
+ passControlAttrs() {
64
+ this.f.passAttrToControl("size", this.size);
65
+ this.f.passAttrToControl("success", template.toBoolAttr(this.success));
66
+ this.f.passAttrToControl("disabled", template.toBoolAttr(this.disabled));
67
+ this.f.passAttrToControl("invalid", template.toBoolAttr(this.invalid));
68
+ }
69
+ get getThumbWidth() {
70
+ const styles = window.getComputedStyle(this.inputRef);
71
+ return parseFloat(styles.getPropertyValue('--thumb-size')) || 1;
72
+ }
73
+ controlOutputPosition() {
74
+ const valueInt = +this.value;
75
+ const min = +this.inputRef.min;
76
+ const max = +this.inputRef.max;
77
+ const thumbWidth = (this.getThumbWidth * 16);
78
+ const rangeWidth = this.inputRef.offsetWidth;
79
+ const percentage = ((valueInt - min) / (max - min)) * 100;
80
+ let tooltipOffset = ((percentage / 100) * (rangeWidth - thumbWidth)) + (thumbWidth / 2);
81
+ if (this.outputRef) {
82
+ this.outputRef.textContent = this.value;
83
+ const outputWidth = this.outputRef.offsetWidth / 2;
84
+ this.outputRef.style.left = `${tooltipOffset - outputWidth}px`;
85
+ }
86
+ if (this.fillRef) {
87
+ this.fillRef.style.width = `${tooltipOffset}px`;
88
+ }
89
+ }
90
+ componentDidLoad() {
91
+ this.attributeObserver = new attribute.AttributeObserver(this.host, (attributeName, newValue) => {
92
+ this.onAriaAttributeChange(attributeName, newValue);
93
+ });
94
+ this.attributeObserver.startObserving(attribute.ariaAttributes);
95
+ }
96
+ componentWillLoad() {
97
+ this.validateSize(this.size);
98
+ this.inheritedAttributes = accessibility.inheritAriaAttributes(this.host);
99
+ }
100
+ componentDidRender() {
101
+ this.passControlAttrs();
102
+ this.f.passAttrToLabel("required", String(this.required));
103
+ stencil_utils.tick(this.controlOutputPosition.bind(this));
104
+ }
105
+ onAriaAttributeChange(attributeName, newValue) {
106
+ this.host.removeAttribute(attributeName);
107
+ this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { [attributeName]: newValue });
108
+ }
109
+ disconnectedCallback() {
110
+ var _a;
111
+ (_a = this.attributeObserver) === null || _a === void 0 ? void 0 : _a.stopObserving();
112
+ }
113
+ render() {
114
+ return (index.h(index.Host, { key: '87236e8cdb0534dbefc72286517c353d41860260', class: FormRangeClass.root, size: this.size }, this.h.hasSlot("prefix") && index.h("slot", { key: '83f2b5ff50d7638d1e13de9e0f4774d747a8e374', name: "prefix" }), index.h("span", { key: '7cef4eac6144ee71dd6b3ffcdc2e992f33f97740', class: "element" }, index.h("input", Object.assign({ key: '1c2fda25454dc11bdfab17065f07bb38959a2941', type: "range", ref: el => (this.inputRef = el), onInput: this.onInputHandler.bind(this), onFocus: this.onFocusHandler.bind(this), onBlur: this.onBlurHandler.bind(this), id: this.identifier || this.inputId, name: this.name, min: this.min, max: this.max, step: this.step, list: this.listIdentifier, value: this.value, required: this.required, disabled: this.disabled }, this.inheritedAttributes, { "aria-required": template.toBoolAttrIfDefined(this.required), "aria-invalid": template.toBoolAttrIfDefined(this.invalid), "aria-disabled": template.toBoolAttrIfDefined(this.disabled) })), index.h("div", { key: 'bdece1cc0cad1614eb090e9183d9dd96389b7568', class: FormRangeClass.fill, ref: el => (this.fillRef = el) }), this.tooltip ?
115
+ index.h("output", { htmlFor: this.name, ref: el => (this.outputRef = el) }, this.value)
116
+ : null, index.h("slot", { key: '4e346163e119d7508942a31bc35b28acd807bdb3', name: "datalist" })), this.h.hasSlot("sufix") && index.h("slot", { key: '3faaf9ba94069c9a7f3a147e9a6ecfec7a38edc7', name: "sufix" }), this.input ?
117
+ index.h("gov-form-input", Object.assign({ "on-gov-input": this.onCustomInputHandler.bind(this), class: FormRangeClass.input, size: this.size, value: this.value, disabled: this.disabled }, this.inheritedAttributes))
118
+ : null));
119
+ }
120
+ onCustomInputHandler(e) {
121
+ const value = e.target.value;
122
+ if (this.step && helpers_types.isNumber(+this.step)) {
123
+ const numValue = +value;
124
+ const numMin = +this.min;
125
+ const numMax = +this.max;
126
+ const numStep = +this.step;
127
+ if (isNaN(numValue)) {
128
+ return false;
129
+ }
130
+ if (numValue < numMin || numValue > numMax) {
131
+ return false;
132
+ }
133
+ const diff = numValue - numMin;
134
+ if (diff % numStep !== 0) {
135
+ return false;
136
+ }
137
+ this.value = value;
138
+ this.govInput.emit({
139
+ component: FormRangeClass.root,
140
+ value: this.value,
141
+ originalEvent: e,
142
+ });
143
+ }
144
+ }
145
+ onInputHandler(e) {
146
+ this.value = e.target.value;
147
+ e.stopPropagation();
148
+ this.govInput.emit({
149
+ component: FormRangeClass.root,
150
+ value: this.value,
151
+ originalEvent: e,
152
+ });
153
+ }
154
+ onFocusHandler(e) {
155
+ e.stopPropagation();
156
+ this.govFocus.emit({
157
+ component: FormRangeClass.root,
158
+ value: this.value,
159
+ originalEvent: e,
160
+ });
161
+ }
162
+ onBlurHandler(e) {
163
+ e.stopPropagation();
164
+ this.govBlur.emit({
165
+ component: FormRangeClass.root,
166
+ value: this.value,
167
+ originalEvent: e,
168
+ });
169
+ }
170
+ /**
171
+ * Returns the current state of the component
172
+ */
173
+ async setFocus(options) {
174
+ return this.inputRef.focus(options);
175
+ }
176
+ /**
177
+ * Sets the ordered value of the element
178
+ */
179
+ async setValue(value) {
180
+ this.value = value;
181
+ }
182
+ /**
183
+ * Clears input value
184
+ */
185
+ async clearValue() {
186
+ this.value = "";
187
+ this.inputRef.value = "";
188
+ }
189
+ /**
190
+ * Returns an instance of the native html input element
191
+ */
192
+ async getRef() {
193
+ return this.inputRef;
194
+ }
195
+ get host() { return index.getElement(this); }
196
+ static get watchers() { return {
197
+ "size": ["validateSize", "watchControlAttrs"],
198
+ "value": ["watchValue"],
199
+ "disabled": ["watchControlAttrs"],
200
+ "invalid": ["watchControlAttrs"],
201
+ "success": ["watchControlAttrs"]
202
+ }; }
203
+ };
204
+
205
+ exports.gov_form_range = GovFormRange;
206
+
207
+ //# sourceMappingURL=gov-form-range.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"gov-form-range.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;AAIO,MAAM,cAAc,GAAGA,UAAI,CAACC,WAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAGtD,MAAM,cAAc,GAAG;IAC7B,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,uBAAuB;CAC9B;;MCQY,YAAY;IASxB;;;;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AE,cAAc,CAAC,IAAI;YAC9B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;IAEO,aAAa,CAAC,CAAa;QAClC,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;YACjB,SAAS,EAAE,cAAc,CAAC,IAAI;YAC9B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;;;;IAMD,MAAM,QAAQ,CAAC,OAAsB;QACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;KACnC;;;;IAMD,MAAM,QAAQ,CAAC,KAAa;QAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;KAClB;;;;IAMD,MAAM,UAAU;QACf,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;QACf,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAA;KACxB;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,CAAA;KACpB;;;;;;;;;;;;;","names":["pick","Sizes","govHost","govForm","createID","validateProp","toBoolAttr","AttributeObserver","ariaAttributes","inheritAriaAttributes","tick","h","Host","toBoolAttrIfDefined","isNumber"],"sources":["../../../packages/core/src/components/gov-form/range/constants.ts","../../../packages/core/src/components/gov-form/range/gov-form-range.tsx"],"sourcesContent":["import {pick} from \"../../../utils/utils\";\nimport {Sizes} from \"../../../core/constants/sizes\";\nimport {ValueOf} from \"../../../types/interfaces\";\n\nexport const FormRangeSizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type FormRangeSizesType = `${ValueOf<typeof FormRangeSizes>}`\n\nexport const FormRangeClass = {\n\troot: 'gov-form-range',\n\tfill: 'gov-form-range--fill',\n\tinput: 'gov-form-range--input',\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {FormRangeClass, FormRangeSizes, FormRangeSizesType} from './constants'\nimport {GovHost} from \"../../../helpers/Dom/template.types\";\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\";\nimport {validateProp} from \"../../../helpers/Validate/props\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {GovForm} from \"../../../helpers/Dom/form.types\";\nimport {govForm} from \"../../../helpers/Dom/form\";\nimport {tick} from \"../../../utils/stencil.utils\";\nimport {isNumber} from \"../../../utils/helpers.types\";\nimport {createID} from \"../../../utils/string.utils\";\nimport {FormInputEvent} from \"../input/gov-form-input.types\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n\n@Component({\n\ttag: 'gov-form-range',\n})\nexport class GovFormRange {\n\tprivate inputRef?: HTMLInputElement\n\tprivate outputRef?: HTMLOutputElement\n\tprivate fillRef?: HTMLDivElement\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate readonly inputId: string\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.inputId = createID(\"GovInput\")\n\t}\n\n\t@Element() host: HTMLGovFormRangeElement\n\t/**\n\t * Range’s size\n\t */\n\t@Prop() readonly size?: FormRangeSizesType = \"m\"\n\t/**\n\t * Value of range\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Custom range identifier\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Name of the range\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Minimum value that is acceptable\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Defines size of each step\n\t */\n\t@Prop() readonly step?: string | number\n\t/**\n\t * Show tooltip with current value\n\t */\n\t@Prop() readonly tooltip?: boolean = false\n\t/**\n\t * Show input with current value\n\t */\n\t@Prop() readonly input?: boolean = false\n\t/**\n\t * Links a <datalist/> element to a <input type=\"range\">, providing value markers as guidance for the user\n\t */\n\t@Prop() readonly listIdentifier?: string\n\t/**\n\t * Set whether the range is required or not\n\t */\n\t@Prop({reflect: true}) readonly required: boolean = false\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application\n\t */\n\t@Prop({reflect: true}) readonly success: boolean\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application\n\t */\n\t@Prop({reflect: true}) readonly invalid: boolean\n\t/**\n\t * Makes the range component disabled\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-input\"}) govInput: EventEmitter<FormInputEvent>\n\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormRangeSizes, newValue, FormRangeClass.root)\n\t}\n\n\t@Watch(\"value\")\n\twatchValue(): void {\n\t\tthis.controlOutputPosition();\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"success\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"success\", toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t}\n\n\tprivate get getThumbWidth() {\n\t\tconst styles = window.getComputedStyle(this.inputRef);\n\t\treturn parseFloat(styles.getPropertyValue('--thumb-size')) || 1;\n\t}\n\n\tprivate controlOutputPosition() {\n\t\tconst valueInt = +this.value;\n\t\tconst min = +this.inputRef.min;\n\t\tconst max = +this.inputRef.max;\n\n\t\tconst thumbWidth = (this.getThumbWidth * 16);\n\t\tconst rangeWidth = this.inputRef.offsetWidth;\n\t\tconst percentage = ((valueInt - min) / (max - min)) * 100;\n\n\t\tlet tooltipOffset = ((percentage / 100) * (rangeWidth - thumbWidth)) + (thumbWidth / 2);\n\n\t\tif (this.outputRef) {\n\t\t\tthis.outputRef.textContent = this.value;\n\t\t\tconst outputWidth = this.outputRef.offsetWidth / 2;\n\t\t\tthis.outputRef.style.left = `${tooltipOffset - outputWidth}px`;\n\t\t}\n\t\tif (this.fillRef) {\n\t\t\tthis.fillRef.style.width = `${tooltipOffset}px`\n\t\t}\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\ttick(this.controlOutputPosition.bind(this))\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\trender() {\n\t\treturn (\n\t\t\t<Host class={FormRangeClass.root} size={this.size}>\n\t\t\t\t{this.h.hasSlot(\"prefix\") && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<input type=\"range\"\n\t\t\t\t\t\t ref={el => (this.inputRef = el)}\n\t\t\t\t\t\t onInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\t onFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t onBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t id={this.identifier || this.inputId}\n\t\t\t\t\t\t name={this.name}\n\t\t\t\t\t\t min={this.min}\n\t\t\t\t\t\t max={this.max}\n\t\t\t\t\t\t step={this.step}\n\t\t\t\t\t\t list={this.listIdentifier}\n\t\t\t\t\t\t value={this.value}\n\t\t\t\t\t\t required={this.required}\n\t\t\t\t\t\t disabled={this.disabled}\n\t\t\t\t\t\t {...this.inheritedAttributes}\n\t\t\t\t\t\t aria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t aria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t aria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t/>\n\t\t\t\t\t<div class={FormRangeClass.fill} ref={el => (this.fillRef = el)}></div>\n\t\t\t\t\t{this.tooltip ?\n\t\t\t\t\t\t<output htmlFor={this.name} ref={el => (this.outputRef = el)}>\n\t\t\t\t\t\t\t{this.value}\n\t\t\t\t\t\t</output>\n\t\t\t\t\t\t: null}\n\t\t\t\t\t<slot name=\"datalist\"></slot>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot(\"sufix\") && <slot name=\"sufix\"></slot>}\n\t\t\t\t{this.input ?\n\t\t\t\t\t<gov-form-input\n\t\t\t\t\t\ton-gov-input={this.onCustomInputHandler.bind(this)}\n\t\t\t\t\t\tclass={FormRangeClass.input}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t{...this.inheritedAttributes}>\n\t\t\t\t\t</gov-form-input>\n\t\t\t\t\t: null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tonCustomInputHandler(e: InputEvent) {\n\t\tconst value = (e.target as HTMLInputElement).value;\n\t\tif (this.step && isNumber(+this.step)) {\n\t\t\tconst numValue = +value;\n\t\t\tconst numMin = +this.min;\n\t\t\tconst numMax = +this.max;\n\t\t\tconst numStep = +this.step;\n\n\t\t\tif (isNaN(numValue)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (numValue < numMin || numValue > numMax) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst diff = numValue - numMin;\n\t\t\tif (diff % numStep !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis.value = value;\n\t\t\tthis.govInput.emit({\n\t\t\t\tcomponent: FormRangeClass.root,\n\t\t\t\tvalue: this.value,\n\t\t\t\toriginalEvent: e,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLInputElement).value;\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\tcomponent: FormRangeClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormRangeClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormRangeClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Clears input value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = \"\"\n\t\tthis.inputRef.value = \"\"\n\t}\n\n\t/**\n\t * Returns an instance of the native html input element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n"],"version":3}
@@ -20,7 +20,7 @@ const GovFormSearch = class {
20
20
  this.color = 'neutral';
21
21
  }
22
22
  render() {
23
- return (index.h(index.Host, { key: '05f033c30dffd615b36b181535329704d46665ae', class: FormSearchClass.root, color: this.color, size: this.size }, index.h("slot", { key: '7c7fb4e2d90ace38aef4b63454e1f9513903977c', name: "input" }), index.h("slot", { key: '92484cbbbae29ba45bb963f80da8237d9406a91b', name: "button-erase" }), index.h("slot", { key: '92ebb818ee922d790534ffb7816be400ff4a1f98', name: "button" })));
23
+ return (index.h(index.Host, { key: 'aac69369eafa76eee7e1117601008ac8d34b5417', class: FormSearchClass.root, color: this.color, size: this.size }, index.h("slot", { key: '7f20815a61d662cbfde7f85f40e45277c5494315', name: "input" }), index.h("slot", { key: 'd2db24dda8aad0577f8d84ea39377df3dd1b9b19', name: "button-erase" }), index.h("slot", { key: 'd7f38530eb623e1f230e0ec42db0a68f775eec8e', name: "button" })));
24
24
  }
25
25
  get host() { return index.getElement(this); }
26
26
  };
@@ -7,7 +7,7 @@ const form = require('./form-4e66039a.js');
7
7
  const template = require('./template-39939fd6.js');
8
8
  const props = require('./props-d189860c.js');
9
9
  const string_utils = require('./string.utils-b84c81cf.js');
10
- const array_utils = require('./array.utils-96eadde3.js');
10
+ const array_utils = require('./array.utils-211fffc0.js');
11
11
  const stencil_utils = require('./stencil.utils-182382ee.js');
12
12
  const attribute = require('./attribute-06dc5228.js');
13
13
  const accessibility = require('./accessibility-c475826b.js');
@@ -18,7 +18,7 @@ require('./colors-f7c8eadd.js');
18
18
  require('./constants-47ba678b.js');
19
19
  require('./constants-87bab1ed.js');
20
20
  require('./gov.log-bfea3151.js');
21
- require('./helpers.types-ff60c9bd.js');
21
+ require('./helpers.types-9066e4a4.js');
22
22
 
23
23
  const GovFormSelect = class {
24
24
  constructor(hostRef) {
@@ -68,7 +68,8 @@ const GovFormSelect = class {
68
68
  this.attributeObserver.startObserving(attribute.ariaAttributes);
69
69
  }
70
70
  disconnectedCallback() {
71
- this.attributeObserver.stopObserving();
71
+ var _a;
72
+ (_a = this.attributeObserver) === null || _a === void 0 ? void 0 : _a.stopObserving();
72
73
  }
73
74
  componentWillLoad() {
74
75
  this.validateSize(this.size);
@@ -96,10 +97,10 @@ const GovFormSelect = class {
96
97
  });
97
98
  }
98
99
  render() {
99
- return (index.h(index.Host, { key: '1c2fb05a5cff0e1b1208130cc11568423f5a78a0', class: form.FormSelectClass.root, size: this.size }, this.h.hasSlot('prefix') && index.h("slot", { key: '3dadb5773f1a2abe0c54f6ee45bb3a404fc99a5b', name: "prefix" }), index.h("span", { key: '82bc3345147debd858c5f0eb4dd9c58faf168d5d', class: "element" }, index.h("select", Object.assign({ key: 'ee77d1768a549faa0e94025eb5b08390c49d2d32', id: this.identifier || this.selectId, onFocus: this.onFocusHandler.bind(this), onChange: this.onChangeHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el) }, this.inheritedAttributes, { "aria-disabled": template.toBoolAttrIfDefined(this.disabled), "aria-required": template.toBoolAttrIfDefined(this.required), "aria-invalid": template.toBoolAttrIfDefined(this.invalid) }), index.h("slot", { key: '2c6e5a91381a7a9819b92aa7844a8d512aed9577' }), Array.isArray(this.optionsState) && this.optionsState.map((option) => {
100
+ return (index.h(index.Host, { key: 'ece22604354a3bc7b27aebb52b767e720c470fb2', class: form.FormSelectClass.root, size: this.size }, this.h.hasSlot('prefix') && index.h("slot", { key: 'fdff42c0ad6111e691b8246a8cbe3d77cbb9ab94', name: "prefix" }), index.h("span", { key: '726341bdd8a76bb6dde8af330505d97273007bb3', class: "element" }, index.h("select", Object.assign({ key: 'cb51afcb898b91f87236cdfd416cd26013e01fc7', id: this.identifier || this.selectId, onFocus: this.onFocusHandler.bind(this), onChange: this.onChangeHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el) }, this.inheritedAttributes, { "aria-disabled": template.toBoolAttrIfDefined(this.disabled), "aria-required": template.toBoolAttrIfDefined(this.required), "aria-invalid": template.toBoolAttrIfDefined(this.invalid) }), index.h("slot", { key: '8a81f952601ac949f68047eca18cd7aab61f5ffa' }), Array.isArray(this.optionsState) && this.optionsState.map((option) => {
100
101
  var _a;
101
102
  return (index.h("option", { value: option.value, selected: option.value === this.value, disabled: option === null || option === void 0 ? void 0 : option.disabled }, (_a = option.label) !== null && _a !== void 0 ? _a : option.value));
102
- })), this.success && index.h("gov-icon", { key: 'b08abba818740a7250956bf03962fb86eade55c2', class: "validation-icon", name: "check-lg", type: "components" }), this.invalid && index.h("gov-icon", { key: '5b9c0a3e7f7b6b678880b2e17e43ae702fff023b', class: "validation-icon", name: "exclamation-lg", type: "components" }), index.h("gov-icon", { key: '8b9afa5ebf08b1dd680aac751f8a0559b83132fc', class: "arrow-icon", name: "chevron-down", type: "components" })), this.h.hasSlot('sufix') && index.h("slot", { key: '9178ca16301992f32c30f3609a388a2251d3bf85', name: "sufix" })));
103
+ })), this.success && index.h("gov-icon", { key: '4567f0e75b9f9b9eba7a2a624107699ee531c580', class: "validation-icon", name: "check-lg", type: "components" }), this.invalid && index.h("gov-icon", { key: '818e5fe59f78b86280abdf117cb9b786e9ac103a', class: "validation-icon", name: "exclamation-lg", type: "components" }), index.h("gov-icon", { key: '9705a3e034da03543a074eb206224f3e63236b7c', class: "arrow-icon", name: "chevron-down", type: "components" })), this.h.hasSlot('sufix') && index.h("slot", { key: 'dd8fcce83d933ce39a8195d288472d013f708870', name: "sufix" })));
103
104
  }
104
105
  onFocusHandler(e) {
105
106
  this.focused = true;
@@ -1 +1 @@
1
- {"file":"gov-form-select.entry.cjs.js","mappings":";;;;;;;;;;;;;;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CAAC,KAAK;SACjB,CAAC,CAAA;KACF;;;;IAMD,MAAM,QAAQ,CAAC,OAAsB;QACpC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;KACpC;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,SAAS,CAAA;KACrB;;;;;;;;;;;;;;","names":["govHost","govForm","createID","validateProp","FormSelectSizes","FormSelectClass","propsValueToArray","toBoolAttr","AttributeObserver","ariaAttributes","inheritAriaAttributes","tick","h","Host","toBoolAttrIfDefined"],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {govForm} from '../../../helpers/Dom/form'\nimport {GovForm} from '../../../helpers/Dom/form.types'\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from '../../../helpers/Dom/template'\nimport {GovHost} from '../../../helpers/Dom/template.types'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {createID} from '../../../utils/string.utils'\nimport {FormSelectClass, FormSelectSizes, FormSelectSizesType,} from './constants'\nimport {FormSelectEvent, FormSelectOption} from './gov-form-select.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {tick} from \"../../../utils/stencil.utils\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-form-select',\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID('GovSelect')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Options of select\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | FormSelectOption[]\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop({reflect: true}) readonly success: boolean\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\t@State() optionsState: FormSelectOption[] = []\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | FormSelectOption[]): void {\n\t\tthis.optionsState = propsValueToArray(newValue)\n\t}\n\n\t@Watch('disabled')\n\t@Watch('invalid')\n\t@Watch('success')\n\t@Watch('size')\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch('value')\n\twatchValue(): void {\n\t\tthis.markSelectedValue()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl('size', this.size)\n\t\tthis.f.passAttrToControl('invalid', toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('success', toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl('disabled', toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl('type', 'select')\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\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\n\t\tthis.markSelectedValue()\n\n\t\tthis.optionsState = propsValueToArray(this.options)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t\ttick(() => this.markSelectedValue())\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate markSelectedValue() {\n\t\tthis.host.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.value === this.value) {\n\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t} else {\n\t\t\t\toption.removeAttribute('selected')\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size}>\n\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t{Array.isArray(this.optionsState) && this.optionsState.map((option) => {\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={option.value === this.value}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={option?.disabled}>{option.label ?? option.value}</option>)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</select>\n\t\t\t\t\t{this.success && <gov-icon class=\"validation-icon\" name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t{this.invalid && <gov-icon class=\"validation-icon\" name=\"exclamation-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t<gov-icon class=\"arrow-icon\" name=\"chevron-down\" type=\"components\"></gov-icon>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectElement> {\n\t\treturn this.selectRef\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-form-select.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;MAkBa,aAAa;IAQzB;;;;;;;;oBAsB8C,GAAG;;wBASZ,KAAK;;wBASU,KAAK;;;4BAkBb,EAAE;mCAyBH,EAAE;QAlF5C,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,CAAC,GAAGC,YAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAGC,qBAAQ,CAAC,WAAW,CAAC,CAAA;KACrC;IAyDD,YAAY,CAAC,QAAgB;QAC5BC,kBAAY,CAACC,oBAAe,EAAE,QAAQ,EAAEC,oBAAe,CAAC,IAAI,CAAC,CAAA;KAC7D;IAGD,YAAY,CAAC,QAAqC;QACjD,IAAI,CAAC,YAAY,GAAGC,6BAAiB,CAAC,QAAQ,CAAC,CAAA;KAC/C;IAMD,iBAAiB;QAChB,IAAI,CAAC,gBAAgB,EAAE,CAAA;KACvB;IAGD,UAAU;QACT,IAAI,CAAC,iBAAiB,EAAE,CAAA;KACxB;IAIO,gBAAgB;QACvB,IAAI,CAAC,CAAC,CAAC,iBAA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AI,CAAC,KAAK;SACjB,CAAC,CAAA;KACF;IAEO,aAAa,CAAC,CAAa;QAClC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;QACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;YACjB,SAAS,EAAEA,oBAAe,CAAC,IAAI;YAC/B,aAAa,EAAE,CAAC;YAChB,KAAK,EAAE,IAAI,CAAC,KAAK;SACjB,CAAC,CAAA;KACF;IAEO,eAAe,CAAC,CAAQ;QAC/B,IAAI,CAAC,KAAK,GAAI,CAAC,CAAC,MAA4B,CAAC,KAAK,CAAA;QAClD,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YACnB,SAAS,EAAEA,oBAAe,CAAC,IAAI;YAC/B,aAAa,EAAE,CAAC;YAChB,KAAK,EAAE,IAAI,CAAC,KAAK;SACjB,CAAC,CAAA;KACF;;;;IAMD,MAAM,QAAQ,CAAC,OAAsB;QACpC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;KACpC;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,SAAS,CAAA;KACrB;;;;;;;;;;;;;;","names":["govHost","govForm","createID","validateProp","FormSelectSizes","FormSelectClass","propsValueToArray","toBoolAttr","AttributeObserver","ariaAttributes","inheritAriaAttributes","tick","h","Host","toBoolAttrIfDefined"],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {govForm} from '../../../helpers/Dom/form'\nimport {GovForm} from '../../../helpers/Dom/form.types'\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from '../../../helpers/Dom/template'\nimport {GovHost} from '../../../helpers/Dom/template.types'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {createID} from '../../../utils/string.utils'\nimport {FormSelectClass, FormSelectSizes, FormSelectSizesType,} from './constants'\nimport {FormSelectEvent, FormSelectOption} from './gov-form-select.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {tick} from \"../../../utils/stencil.utils\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-form-select',\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID('GovSelect')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Options of select\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | FormSelectOption[]\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop({reflect: true}) readonly success: boolean\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\t@State() optionsState: FormSelectOption[] = []\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | FormSelectOption[]): void {\n\t\tthis.optionsState = propsValueToArray(newValue)\n\t}\n\n\t@Watch('disabled')\n\t@Watch('invalid')\n\t@Watch('success')\n\t@Watch('size')\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch('value')\n\twatchValue(): void {\n\t\tthis.markSelectedValue()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl('size', this.size)\n\t\tthis.f.passAttrToControl('invalid', toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('success', toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl('disabled', toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl('type', 'select')\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\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\n\t\tthis.markSelectedValue()\n\n\t\tthis.optionsState = propsValueToArray(this.options)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t\ttick(() => this.markSelectedValue())\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate markSelectedValue() {\n\t\tthis.host.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.value === this.value) {\n\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t} else {\n\t\t\t\toption.removeAttribute('selected')\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size}>\n\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t{Array.isArray(this.optionsState) && this.optionsState.map((option) => {\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={option.value === this.value}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={option?.disabled}>{option.label ?? option.value}</option>)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</select>\n\t\t\t\t\t{this.success && <gov-icon class=\"validation-icon\" name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t{this.invalid && <gov-icon class=\"validation-icon\" name=\"exclamation-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t<gov-icon class=\"arrow-icon\" name=\"chevron-down\" type=\"components\"></gov-icon>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectElement> {\n\t\treturn this.selectRef\n\t}\n}\n"],"version":3}
@@ -62,7 +62,8 @@ const GovFormSwitch = class {
62
62
  this.inheritedAttributes = accessibility.inheritAriaAttributes(this.host);
63
63
  }
64
64
  disconnectedCallback() {
65
- this.attributeObserver.stopObserving();
65
+ var _a;
66
+ (_a = this.attributeObserver) === null || _a === void 0 ? void 0 : _a.stopObserving();
66
67
  }
67
68
  async componentDidRender() {
68
69
  this.f.pass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nB;IAEO,cAAc,CAAC,CAAa;QACnC,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;YAClB,SAAS,EAAEL,oBAAe,CAAC,IAAI;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;IAEO,aAAa,CAAC,CAAa;QAClC,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;YACjB,SAAS,EAAEA,oBAAe,CAAC,IAAI;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;IAEO,eAAe,CAAC,CAAQ;QAC/B,IAAI,CAAC,OAAO,GAAI,CAAC,CAAC,MAA2B,CAAC,OAAO,CAAA;QACrD,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YACnB,SAAS,EAAEA,oBAAe,CAAC,IAAI;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,CAAA;KACpB;;;;;;;;;;;","names":["createID","govHost","govForm","validateProp","FormSwitchSizes","FormSwitchClass","toBoolAttr","AttributeObserver","ariaAttributes","inheritAriaAttributes","h","Host","toBoolAttrIfDefined","Fragment"],"sources":["../../../packages/core/src/components/gov-form/switch/gov-form-switch.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormSwitchClass, FormSwitchSizes, FormSwitchSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport {FormSwitchEvent} from \"./gov-form-switch.types\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-form-switch\",\n})\nexport class GovFormSwitch {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly checkboxId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.checkboxId = createID(\"GovCheckbox\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormSwitchElement\n\t/**\n\t * Value of switch\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Switch button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the switch component disabled.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Name of the switch.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Switch's size.\n\t */\n\t@Prop({reflect: true}) readonly size?: FormSwitchSizesType = \"m\"\n\t/**\n\t * Custom switch identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the switch has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormSwitchEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSwitchSizes, newValue, FormSwitchClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"switch\")\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.passControlAttrs()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver.stopObserving();\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.checkboxId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\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 wrapCheckbox = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn (\n\t\t\t\t\t<label class={FormSwitchClass.label}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</label>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FormSwitchClass.root)} hydrated={this.hydrated} checked={this.checked}\n\t\t\t\t size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapCheckbox(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={FormSwitchClass.input}\n\t\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<span class={FormSwitchClass.indicator}>\n\t\t\t\t\t\t\t\t{this.checked && <gov-icon name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: Event) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-form-switch.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;MAiBa,aAAa;IASzB;;;;;QAFQ,aAAQ,GAAG,KAAK,CAAA;;uBAiBmC,KAAK;uBAIhB,KAAK;wBAIhB,KAAK;wBAIU,KAAK;;oBAQI,GAAG;;;mCAkCrB,EAAE;QApE5C,IAAI,CAAC,UAAU,GAAGA,qBAAQ,CAAC,aAAa,CAAC,CAAA;QAEzC,IAAI,CAAC,CAAC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AI,CAAC,OAAO,CAAC,IAAI,CAAC;YACjB,SAAS,EAAEA,oBAAe,CAAC,IAAI;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;IAEO,eAAe,CAAC,CAAQ;QAC/B,IAAI,CAAC,OAAO,GAAI,CAAC,CAAC,MAA2B,CAAC,OAAO,CAAA;QACrD,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YACnB,SAAS,EAAEA,oBAAe,CAAC,IAAI;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,CAAA;KACpB;;;;;;;;;;;","names":["createID","govHost","govForm","validateProp","FormSwitchSizes","FormSwitchClass","toBoolAttr","AttributeObserver","ariaAttributes","inheritAriaAttributes","h","Host","toBoolAttrIfDefined","Fragment"],"sources":["../../../packages/core/src/components/gov-form/switch/gov-form-switch.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormSwitchClass, FormSwitchSizes, FormSwitchSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport {FormSwitchEvent} from \"./gov-form-switch.types\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-form-switch\",\n})\nexport class GovFormSwitch {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly checkboxId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.checkboxId = createID(\"GovCheckbox\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormSwitchElement\n\t/**\n\t * Value of switch\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Switch button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the switch component disabled.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Name of the switch.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Switch's size.\n\t */\n\t@Prop({reflect: true}) readonly size?: FormSwitchSizesType = \"m\"\n\t/**\n\t * Custom switch identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the switch has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormSwitchEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSwitchSizes, newValue, FormSwitchClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"switch\")\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.passControlAttrs()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.checkboxId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\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 wrapCheckbox = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn (\n\t\t\t\t\t<label class={FormSwitchClass.label}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</label>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FormSwitchClass.root)} hydrated={this.hydrated} checked={this.checked}\n\t\t\t\t size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t{wrapCheckbox(\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={FormSwitchClass.input}\n\t\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<span class={FormSwitchClass.indicator}>\n\t\t\t\t\t\t\t\t{this.checked && <gov-icon name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Fragment>,\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: Event) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n"],"version":3}
@@ -3,21 +3,27 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-0e4f24f9.js');
6
- const constants = require('./constants-52053f2d.js');
6
+ const constants = require('./constants-c84c60d6.js');
7
7
  const template = require('./template-39939fd6.js');
8
+ require('./sizes-89f8d3b2.js');
8
9
 
9
10
  const GovGridItem = class {
10
11
  constructor(hostRef) {
11
12
  index.registerInstance(this, hostRef);
12
- this.size = '12/12';
13
- this.sizeSm = undefined;
14
- this.sizeMd = undefined;
15
- this.sizeLg = undefined;
16
- this.sizeXl = undefined;
13
+ this.column = "12";
14
+ this.columnSm = undefined;
15
+ this.columnMd = undefined;
16
+ this.columnLg = undefined;
17
+ this.columnXl = undefined;
18
+ this.row = "1";
19
+ this.rowSm = undefined;
20
+ this.rowMd = undefined;
21
+ this.rowLg = undefined;
22
+ this.rowXl = undefined;
17
23
  this.h = template.govHost(this.host);
18
24
  }
19
25
  render() {
20
- return (index.h(index.Host, { key: 'e1dc6e3517618361ab3b5e3ad499a5bbbaae3d6a', class: this.h.classes(constants.GridItemClass.root), role: "listitem", size: this.size, "size-sm": this.sizeSm, "size-md": this.sizeMd, "size-lg": this.sizeLg, "size-xl": this.sizeXl }, index.h("slot", { key: '53780db95fa728f252302cb86923ad9e9fcd9b66' })));
26
+ return (index.h(index.Host, { key: '30f35aa2a7d4c2456164b6f0001a915796a07b9c', class: this.h.classes(constants.GridItemClass.root), role: "listitem" }, index.h("slot", { key: '25e3d4f401f56697a3f90abd01b9add8fa1d238b' })));
21
27
  }
22
28
  get host() { return index.getElement(this); }
23
29
  };
@@ -1 +1 @@
1
- {"file":"gov-grid-item.entry.cjs.js","mappings":";;;;;;;;MAQa,WAAW;IAGvB;;oBAQgC,OAAO;;;;;QAPtC,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IAwBD,MAAM;QACL,QACCC,QAACC,UAAI,qDACJ,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAACC,uBAAa,CAAC,IAAI,CAAC,EACzC,IAAI,EAAC,UAAU,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,aACN,IAAI,CAAC,MAAM,aACX,IAAI,CAAC,MAAM,aACX,IAAI,CAAC,MAAM,aACX,IAAI,CAAC,MAAM,IAEpBF,oEAAQ,CACF,EACP;KACD;;;;;;","names":["govHost","h","Host","GridItemClass"],"sources":["../../../packages/core/src/components/gov-grid/gov-grid-item.tsx"],"sourcesContent":["import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { GridItemClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-grid-item',\n})\nexport class GovGridItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovGridItemElement\n\t/**\n\t * Cell size as a fraction of 1/12 of the grid size\n\t */\n\t@Prop() readonly size: string = '12/12'\n\t/**\n\t * Cell size for SM media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'size-sm' }) readonly sizeSm: string\n\t/**\n\t * Cell size for MD media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'size-md' }) readonly sizeMd: string\n\t/**\n\t * Cell size for LG media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'size-lg' }) readonly sizeLg: string\n\t/**\n\t * Cell size for XL media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'size-xl' }) readonly sizeXl: string\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(GridItemClass.root)}\n\t\t\t\trole=\"listitem\"\n\t\t\t\tsize={this.size}\n\t\t\t\tsize-sm={this.sizeSm}\n\t\t\t\tsize-md={this.sizeMd}\n\t\t\t\tsize-lg={this.sizeLg}\n\t\t\t\tsize-xl={this.sizeXl}\n\t\t\t>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-grid-item.entry.cjs.js","mappings":";;;;;;;;;MAQa,WAAW;IAGvB;;sBAQ2D,IAAI;;;;;mBAoBP,GAAG;;;;;QA3B1D,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;IA6CD,MAAM;QACL,QACCC,QAACC,UAAI,qDACJ,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAACC,uBAAa,CAAC,IAAI,CAAC,EACzC,IAAI,EAAC,UAAU,IAEfF,oEAAQ,CACF,EACP;KACD;;;;;;","names":["govHost","h","Host","GridItemClass"],"sources":["../../../packages/core/src/components/gov-grid/gov-grid-item.tsx"],"sourcesContent":["import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { GridItemClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-grid-item',\n})\nexport class GovGridItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovGridItemElement\n\t/**\n\t * Cell size as a fraction of 1/12 of the grid size\n\t */\n\t@Prop({ attribute: 'col-span' }) readonly column: string = \"12\";\n\t/**\n\t * Cell size for SM media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'col-span-sm' }) readonly columnSm?: string\n\t/**\n\t * Cell size for MD media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'col-span-md' }) readonly columnMd?: string\n\t/**\n\t * Cell size for LG media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'col-span-lg' }) readonly columnLg?: string\n\t/**\n\t * Cell size for XL media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'col-span-xl' }) readonly columnXl?: string\n\t/**\n\t * Connects rows in the grid\n\t */\n\t@Prop({ attribute: 'row-span' }) readonly row: string = \"1\";\n\t/**\n\t * Cell size for SM media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'row-span-sm' }) readonly rowSm?: string\n\t/**\n\t * Cell size for MD media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'row-span-md' }) readonly rowMd?: string\n\t/**\n\t * Cell size for LG media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'row-span-lg' }) readonly rowLg?: string\n\t/**\n\t * Cell size for XL media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'row-span-xl' }) readonly rowXl?: string\n\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(GridItemClass.root)}\n\t\t\t\trole=\"listitem\"\n\t\t\t>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}