@gov-design-system-ce/components 4.2.0 → 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 (477) 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/core.cjs.js +1 -1
  4. package/dist/cjs/gov-attachments_3.cjs.entry.js +3 -3
  5. package/dist/cjs/gov-backdrop.cjs.entry.js +2 -2
  6. package/dist/cjs/gov-banner.cjs.entry.js +21 -20
  7. package/dist/cjs/gov-banner.cjs.entry.js.map +1 -1
  8. package/dist/cjs/gov-blockquote.cjs.entry.js +1 -1
  9. package/dist/cjs/gov-blockquote.cjs.entry.js.map +1 -1
  10. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +3 -3
  11. package/dist/cjs/gov-button.cjs.entry.js +5 -5
  12. package/dist/cjs/gov-card.cjs.entry.js +11 -3
  13. package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
  14. package/dist/cjs/gov-chip.cjs.entry.js +2 -2
  15. package/dist/cjs/gov-container.cjs.entry.js +1 -1
  16. package/dist/cjs/gov-control-group.cjs.entry.js +1 -1
  17. package/dist/cjs/gov-cookiebar.cjs.entry.js +1 -1
  18. package/dist/cjs/gov-dialog.cjs.entry.js +3 -3
  19. package/dist/cjs/gov-dropdown.cjs.entry.js +1 -1
  20. package/dist/cjs/gov-empty.cjs.entry.js +1 -1
  21. package/dist/cjs/gov-error-code.cjs.entry.js +1 -1
  22. package/dist/cjs/gov-flex_3.cjs.entry.js +3 -3
  23. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +3 -3
  24. package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +3 -3
  25. package/dist/cjs/gov-form-control.cjs.entry.js +1 -1
  26. package/dist/cjs/gov-form-file.cjs.entry.js +1 -1
  27. package/dist/cjs/gov-form-group.cjs.entry.js +1 -1
  28. package/dist/cjs/gov-form-input_2.cjs.entry.js +6 -6
  29. package/dist/cjs/gov-form-label.cjs.entry.js +1 -1
  30. package/dist/cjs/gov-form-multi-select.cjs.entry.js +4 -4
  31. package/dist/cjs/gov-form-password-power.cjs.entry.js +1 -1
  32. package/dist/cjs/gov-form-radio-group.cjs.entry.js +1 -1
  33. package/dist/cjs/gov-form-range.cjs.entry.js +207 -0
  34. package/dist/cjs/gov-form-range.cjs.entry.js.map +1 -0
  35. package/dist/cjs/gov-form-search.cjs.entry.js +1 -1
  36. package/dist/cjs/gov-form-select.cjs.entry.js +4 -4
  37. package/dist/cjs/gov-grid-item.cjs.entry.js +1 -1
  38. package/dist/cjs/gov-grid.cjs.entry.js +1 -1
  39. package/dist/cjs/gov-infobar.cjs.entry.js +2 -2
  40. package/dist/cjs/gov-layout-column.cjs.entry.js +1 -1
  41. package/dist/cjs/gov-layout.cjs.entry.js +1 -1
  42. package/dist/cjs/gov-lifecycle.cjs.entry.js +1 -1
  43. package/dist/cjs/gov-link.cjs.entry.js +2 -1
  44. package/dist/cjs/gov-link.cjs.entry.js.map +1 -1
  45. package/dist/cjs/gov-loading.cjs.entry.js +1 -1
  46. package/dist/cjs/gov-message.cjs.entry.js +1 -1
  47. package/dist/cjs/gov-pagination.cjs.entry.js +2 -2
  48. package/dist/cjs/gov-spacer.cjs.entry.js +1 -1
  49. package/dist/cjs/gov-stepper-item.cjs.entry.js +1 -1
  50. package/dist/cjs/gov-stepper.cjs.entry.js +1 -1
  51. package/dist/cjs/gov-tabs-item.cjs.entry.js +1 -1
  52. package/dist/cjs/gov-tabs.cjs.entry.js +2 -2
  53. package/dist/cjs/gov-tag.cjs.entry.js +1 -1
  54. package/dist/cjs/gov-tile.cjs.entry.js +1 -1
  55. package/dist/cjs/gov-toast.cjs.entry.js +1 -1
  56. package/dist/cjs/gov-tooltip-content.cjs.entry.js +1 -1
  57. package/dist/cjs/gov-tooltip.cjs.entry.js +2 -2
  58. package/dist/cjs/gov-wizard-item.cjs.entry.js +2 -2
  59. package/dist/cjs/gov-wizard.cjs.entry.js +3 -3
  60. package/dist/cjs/{helpers.types-ff60c9bd.js → helpers.types-9066e4a4.js} +3 -1
  61. package/dist/cjs/helpers.types-9066e4a4.js.map +1 -0
  62. package/dist/cjs/index-0e4f24f9.js +4 -0
  63. package/dist/cjs/loader.cjs.js +1 -1
  64. package/dist/cjs/{wcag-2927ff73.js → wcag-f8da82da.js} +2 -2
  65. package/dist/cjs/{wcag-2927ff73.js.map → wcag-f8da82da.js.map} +1 -1
  66. package/dist/collection/collection-manifest.json +2 -1
  67. package/dist/collection/components/gov-banner/gov-banner.js +26 -73
  68. package/dist/collection/components/gov-banner/gov-banner.js.map +1 -1
  69. package/dist/collection/components/gov-blockquote/constants.js.map +1 -0
  70. package/dist/collection/components/{gov-blocquote → gov-blockquote}/gov-blockquote.js +2 -2
  71. package/dist/collection/components/gov-blockquote/gov-blockquote.js.map +1 -0
  72. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +1 -1
  73. package/dist/collection/components/gov-button/button/gov-button.js +3 -3
  74. package/dist/collection/components/gov-button/dropdown/gov-dropdown.js +1 -1
  75. package/dist/collection/components/gov-card/gov-card.js +52 -1
  76. package/dist/collection/components/gov-card/gov-card.js.map +1 -1
  77. package/dist/collection/components/gov-chip/gov-chip.js +2 -2
  78. package/dist/collection/components/gov-container/gov-container.js +1 -1
  79. package/dist/collection/components/gov-control-group/gov-control-group.js +1 -1
  80. package/dist/collection/components/gov-cookiebar/gov-cookiebar.js +1 -1
  81. package/dist/collection/components/gov-dialog/gov-dialog.js +1 -1
  82. package/dist/collection/components/gov-empty/gov-empty.js +1 -1
  83. package/dist/collection/components/gov-error-code/gov-error-code.js +1 -1
  84. package/dist/collection/components/gov-flex/gov-flex.js +1 -1
  85. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +1 -1
  86. package/dist/collection/components/gov-form/control/gov-form-control.js +1 -1
  87. package/dist/collection/components/gov-form/file/gov-form-file.js +1 -1
  88. package/dist/collection/components/gov-form/group/gov-form-checkbox-group.js +1 -1
  89. package/dist/collection/components/gov-form/group/gov-form-group.js +1 -1
  90. package/dist/collection/components/gov-form/group/gov-form-radio-group.js +1 -1
  91. package/dist/collection/components/gov-form/input/gov-form-input.js +5 -5
  92. package/dist/collection/components/gov-form/label/gov-form-label.js +1 -1
  93. package/dist/collection/components/gov-form/message/gov-form-message.js +1 -1
  94. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +2 -2
  95. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +1 -1
  96. package/dist/collection/components/gov-form/range/constants.js +9 -0
  97. package/dist/collection/components/gov-form/range/constants.js.map +1 -0
  98. package/dist/collection/components/gov-form/range/gov-form-range.js +610 -0
  99. package/dist/collection/components/gov-form/range/gov-form-range.js.map +1 -0
  100. package/dist/collection/components/gov-form/search/gov-form-search.js +1 -1
  101. package/dist/collection/components/gov-form/select/gov-form-select.js +2 -2
  102. package/dist/collection/components/gov-grid/gov-grid-item.js +1 -1
  103. package/dist/collection/components/gov-grid/gov-grid.js +1 -1
  104. package/dist/collection/components/gov-infobar/gov-infobar.js +2 -2
  105. package/dist/collection/components/gov-layout/gov-layout-column.js +1 -1
  106. package/dist/collection/components/gov-layout/gov-layout.js +1 -1
  107. package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js +1 -1
  108. package/dist/collection/components/gov-link/gov-link.js +20 -1
  109. package/dist/collection/components/gov-link/gov-link.js.map +1 -1
  110. package/dist/collection/components/gov-loading/loading/gov-loading.js +1 -1
  111. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +1 -1
  112. package/dist/collection/components/gov-message/gov-message.js +1 -1
  113. package/dist/collection/components/gov-spacer/gov-spacer.js +1 -1
  114. package/dist/collection/components/gov-stepper/gov-stepper-item.js +1 -1
  115. package/dist/collection/components/gov-stepper/gov-stepper.js +1 -1
  116. package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
  117. package/dist/collection/components/gov-tabs/gov-tabs.js +1 -1
  118. package/dist/collection/components/gov-tag/gov-tag.js +1 -1
  119. package/dist/collection/components/gov-theme-switch/gov-theme-switch.js +1 -1
  120. package/dist/collection/components/gov-tile/gov-tile.js +1 -1
  121. package/dist/collection/components/gov-toast/gov-toast.js +1 -1
  122. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +1 -1
  123. package/dist/collection/components/gov-tooltip/gov-tooltip.js +2 -2
  124. package/dist/collection/components/gov-wizard/gov-wizard-item.js +2 -2
  125. package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
  126. package/dist/collection/data/color-definitions.js +13 -13
  127. package/dist/collection/data/font-definitions.js +86 -48
  128. package/dist/collection/pages/Banner.js +112 -112
  129. package/dist/collection/pages/Banner.js.map +1 -1
  130. package/dist/collection/pages/Blockquote.js +3 -3
  131. package/dist/collection/pages/Blockquote.js.map +1 -1
  132. package/dist/collection/pages/Card.js +27 -17
  133. package/dist/collection/pages/Card.js.map +1 -1
  134. package/dist/collection/pages/Forms.js +209 -4
  135. package/dist/collection/pages/Forms.js.map +1 -1
  136. package/dist/collection/pages/Message.js +10 -10
  137. package/dist/collection/pages/Message.js.map +1 -1
  138. package/dist/collection/pages/Typography.js +7 -0
  139. package/dist/collection/pages/Typography.js.map +1 -1
  140. package/dist/components/gov-accordion-item.js +1 -1
  141. package/dist/components/gov-attachments-item.js +1 -1
  142. package/dist/components/gov-attachments.js +1 -1
  143. package/dist/components/gov-backdrop.js +1 -1
  144. package/dist/components/gov-banner.js +1 -1
  145. package/dist/components/gov-banner.js.map +1 -1
  146. package/dist/components/gov-blockquote.js +1 -1
  147. package/dist/components/gov-blockquote.js.map +1 -1
  148. package/dist/components/gov-breadcrumbs.js +1 -1
  149. package/dist/components/gov-breadcrumbs.js.map +1 -1
  150. package/dist/components/gov-button.js +1 -1
  151. package/dist/components/gov-card.js +1 -1
  152. package/dist/components/gov-card.js.map +1 -1
  153. package/dist/components/gov-chip.js +1 -1
  154. package/dist/components/gov-container.js +1 -1
  155. package/dist/components/gov-control-group.js +1 -1
  156. package/dist/components/gov-cookiebar.js +1 -1
  157. package/dist/components/gov-dialog.js +1 -1
  158. package/dist/components/gov-dropdown.js +1 -1
  159. package/dist/components/gov-empty.js +1 -1
  160. package/dist/components/gov-error-code.js +1 -1
  161. package/dist/components/gov-flex.js +1 -1
  162. package/dist/components/gov-form-autocomplete.js +1 -1
  163. package/dist/components/gov-form-checkbox-group.js +1 -1
  164. package/dist/components/gov-form-checkbox.js +1 -1
  165. package/dist/components/gov-form-control.js +1 -1
  166. package/dist/components/gov-form-file.js +1 -1
  167. package/dist/components/gov-form-group.js +1 -1
  168. package/dist/components/gov-form-input.js +1 -1
  169. package/dist/components/gov-form-label.js +1 -1
  170. package/dist/components/gov-form-message.js +1 -1
  171. package/dist/components/gov-form-multi-select.js +1 -1
  172. package/dist/components/gov-form-password-power.js +1 -1
  173. package/dist/components/gov-form-radio-group.js +1 -1
  174. package/dist/components/gov-form-range.d.ts +11 -0
  175. package/dist/components/gov-form-range.js +2 -0
  176. package/dist/components/gov-form-range.js.map +1 -0
  177. package/dist/components/gov-form-search.js +1 -1
  178. package/dist/components/gov-form-select.js +1 -1
  179. package/dist/components/gov-form-switch.js +1 -1
  180. package/dist/components/gov-grid-item.js +1 -1
  181. package/dist/components/gov-grid.js +1 -1
  182. package/dist/components/gov-icon.js +1 -1
  183. package/dist/components/gov-infobar.js +1 -1
  184. package/dist/components/gov-infobar.js.map +1 -1
  185. package/dist/components/gov-layout-column.js +1 -1
  186. package/dist/components/gov-layout-column.js.map +1 -1
  187. package/dist/components/gov-layout.js +1 -1
  188. package/dist/components/gov-lifecycle.js +1 -1
  189. package/dist/components/gov-link.js +1 -1
  190. package/dist/components/gov-link.js.map +1 -1
  191. package/dist/components/gov-loading.js +1 -1
  192. package/dist/components/gov-loading.js.map +1 -1
  193. package/dist/components/gov-message.js +1 -1
  194. package/dist/components/gov-pagination.js +1 -1
  195. package/dist/components/gov-skeleton.js +1 -1
  196. package/dist/components/gov-spacer.js +1 -1
  197. package/dist/components/gov-stepper-item.js +1 -1
  198. package/dist/components/gov-stepper.js +1 -1
  199. package/dist/components/gov-tabs-item.js +1 -1
  200. package/dist/components/gov-tabs.js +1 -1
  201. package/dist/components/gov-tag.js +1 -1
  202. package/dist/components/gov-theme-switch.js +1 -1
  203. package/dist/components/gov-tile.js +1 -1
  204. package/dist/components/gov-toast.js +1 -1
  205. package/dist/components/gov-tooltip-content.js +1 -1
  206. package/dist/components/gov-tooltip.js +1 -1
  207. package/dist/components/gov-tooltip.js.map +1 -1
  208. package/dist/components/gov-wizard-item.js +1 -1
  209. package/dist/components/gov-wizard.js +1 -1
  210. package/dist/components/{p-73938936.js → p-022e49cf.js} +2 -2
  211. package/dist/components/p-10cad7f1.js +2 -0
  212. package/dist/components/p-2fe7d728.js +2 -0
  213. package/dist/components/p-2fe7d728.js.map +1 -0
  214. package/dist/components/{p-b533871a.js → p-313b4611.js} +2 -2
  215. package/dist/components/{p-3fead64a.js → p-5a861cd2.js} +2 -2
  216. package/dist/components/{p-0327a469.js → p-5b0934a8.js} +2 -2
  217. package/dist/components/{p-3c90521b.js → p-5d60b866.js} +2 -2
  218. package/dist/components/{p-69a31c96.js → p-6ce6e14f.js} +2 -2
  219. package/dist/components/{p-2fc08a71.js → p-7fb16042.js} +2 -2
  220. package/dist/components/p-be086357.js +2 -0
  221. package/dist/components/{p-4fba9df0.js → p-d3435179.js} +2 -2
  222. package/dist/components/p-de989dfe.js +2 -0
  223. package/dist/components/{p-7be2301a.js → p-e0c3b1a7.js} +2 -2
  224. package/dist/components/{p-b5dc6bae.js → p-f9b1a12b.js} +2 -2
  225. package/dist/core/core.css +708 -733
  226. package/dist/core/core.esm.js +1 -1
  227. package/dist/core/core.esm.js.map +1 -1
  228. package/dist/core/p-07590d84.entry.js +2 -0
  229. package/dist/core/p-07590d84.entry.js.map +1 -0
  230. package/dist/core/p-08552a0e.entry.js +2 -0
  231. package/dist/core/{p-16f44a0b.entry.js.map → p-08552a0e.entry.js.map} +1 -1
  232. package/dist/core/p-0abc38e8.entry.js +2 -0
  233. package/dist/core/{p-28d1bc01.entry.js.map → p-0abc38e8.entry.js.map} +1 -1
  234. package/dist/core/p-0c393d2f.entry.js +2 -0
  235. package/dist/core/p-16ece889.entry.js +2 -0
  236. package/dist/core/p-171e2a2f.entry.js +2 -0
  237. package/dist/core/p-25615325.entry.js +2 -0
  238. package/dist/core/{p-132c9a87.entry.js → p-2a7bcce0.entry.js} +2 -2
  239. package/dist/core/{p-f120ba66.entry.js → p-2f966102.entry.js} +2 -2
  240. package/dist/core/p-2fe7d728.js +2 -0
  241. package/dist/core/p-2fe7d728.js.map +1 -0
  242. package/dist/core/{p-9ae280b2.entry.js → p-3583dcf7.entry.js} +2 -2
  243. package/dist/core/p-3b2267a1.entry.js +2 -0
  244. package/dist/core/p-4216d8f3.entry.js +2 -0
  245. package/dist/core/p-44c912e2.entry.js +2 -0
  246. package/dist/core/p-4d5f768f.entry.js +2 -0
  247. package/dist/core/p-52bb8e4f.entry.js +2 -0
  248. package/dist/core/{p-f7e47c0a.entry.js.map → p-52bb8e4f.entry.js.map} +1 -1
  249. package/dist/core/p-52c74fc5.entry.js +2 -0
  250. package/dist/core/p-548806cb.entry.js +2 -0
  251. package/dist/core/{p-ab868410.entry.js → p-5fa4965e.entry.js} +2 -2
  252. package/dist/core/p-6d54ce5f.js +2 -0
  253. package/dist/core/p-6f74eb08.entry.js +2 -0
  254. package/dist/core/{p-5108eb37.entry.js → p-75dae924.entry.js} +2 -2
  255. package/dist/core/p-774ea182.entry.js +2 -0
  256. package/dist/core/p-843f980a.entry.js +2 -0
  257. package/dist/core/p-8a72ebcd.entry.js +2 -0
  258. package/dist/core/{p-94119ad4.entry.js → p-8cd7a120.entry.js} +2 -2
  259. package/dist/core/{p-99f192c1.entry.js → p-8f469270.entry.js} +2 -2
  260. package/dist/core/{p-564555e6.entry.js → p-947804a8.entry.js} +2 -2
  261. package/dist/core/p-979ff58c.entry.js +2 -0
  262. package/dist/core/p-979ff58c.entry.js.map +1 -0
  263. package/dist/core/{p-5242b51b.entry.js → p-981f217e.entry.js} +2 -2
  264. package/dist/core/p-9c1f3e9e.entry.js +2 -0
  265. package/dist/core/p-9c1f3e9e.entry.js.map +1 -0
  266. package/dist/core/{p-ab11081d.entry.js → p-a1c825f3.entry.js} +2 -2
  267. package/dist/core/p-a440365f.entry.js +2 -0
  268. package/dist/core/p-a440365f.entry.js.map +1 -0
  269. package/dist/core/p-a70c7959.entry.js +2 -0
  270. package/dist/core/{p-1cf1dd10.entry.js.map → p-a70c7959.entry.js.map} +1 -1
  271. package/dist/core/{p-59fe6cbc.entry.js → p-a8a7ae96.entry.js} +2 -2
  272. package/dist/core/p-aacafa40.entry.js +2 -0
  273. package/dist/core/{p-e89471ef.entry.js.map → p-aacafa40.entry.js.map} +1 -1
  274. package/dist/core/{p-a02f2547.entry.js → p-aeaba3ef.entry.js} +2 -2
  275. package/dist/core/p-b87e5429.entry.js +2 -0
  276. package/dist/core/p-b87e5429.entry.js.map +1 -0
  277. package/dist/core/p-b9f1c2ef.entry.js +2 -0
  278. package/dist/core/{p-3d7fb8f8.entry.js.map → p-b9f1c2ef.entry.js.map} +1 -1
  279. package/dist/core/p-bca478fd.entry.js +2 -0
  280. package/dist/core/{p-f98f19f6.entry.js.map → p-bca478fd.entry.js.map} +1 -1
  281. package/dist/core/p-be086357.js +2 -0
  282. package/dist/core/p-bea685cb.entry.js +2 -0
  283. package/dist/core/{p-49cd4d0d.entry.js.map → p-bea685cb.entry.js.map} +1 -1
  284. package/dist/core/{p-c07f6bb4.entry.js → p-c1584cfe.entry.js} +2 -2
  285. package/dist/core/p-c5a49469.entry.js +2 -0
  286. package/dist/core/{p-650fe9e8.entry.js.map → p-c5a49469.entry.js.map} +1 -1
  287. package/dist/core/{p-eb8a9705.entry.js → p-c88d8659.entry.js} +2 -2
  288. package/dist/core/p-cba1ebca.entry.js +2 -0
  289. package/dist/core/{p-16d3a79a.entry.js.map → p-cba1ebca.entry.js.map} +1 -1
  290. package/dist/core/p-ccb64e4e.entry.js +2 -0
  291. package/dist/core/p-d383f977.entry.js +2 -0
  292. package/dist/core/p-d990aae8.entry.js +2 -0
  293. package/dist/core/p-ddb3772f.entry.js +2 -0
  294. package/dist/core/{p-46ecf09e.entry.js.map → p-ddb3772f.entry.js.map} +1 -1
  295. package/dist/core/{p-ae88fe6b.entry.js → p-e2655cb7.entry.js} +2 -2
  296. package/dist/core/{p-3acaa012.entry.js → p-e29c9924.entry.js} +2 -2
  297. package/dist/core/p-ead1f58d.entry.js +2 -0
  298. package/dist/core/{p-f0e001c7.entry.js.map → p-ead1f58d.entry.js.map} +1 -1
  299. package/dist/core/{p-ee950038.entry.js → p-f83b3b08.entry.js} +2 -2
  300. package/dist/esm/{array.utils-85696abd.js → array.utils-3b213795.js} +2 -2
  301. package/dist/esm/{array.utils-85696abd.js.map → array.utils-3b213795.js.map} +1 -1
  302. package/dist/esm/core.js +1 -1
  303. package/dist/esm/gov-attachments_3.entry.js +3 -3
  304. package/dist/esm/gov-backdrop.entry.js +2 -2
  305. package/dist/esm/gov-banner.entry.js +21 -20
  306. package/dist/esm/gov-banner.entry.js.map +1 -1
  307. package/dist/esm/gov-blockquote.entry.js +1 -1
  308. package/dist/esm/gov-blockquote.entry.js.map +1 -1
  309. package/dist/esm/gov-breadcrumbs.entry.js +3 -3
  310. package/dist/esm/gov-button.entry.js +5 -5
  311. package/dist/esm/gov-card.entry.js +11 -3
  312. package/dist/esm/gov-card.entry.js.map +1 -1
  313. package/dist/esm/gov-chip.entry.js +2 -2
  314. package/dist/esm/gov-container.entry.js +1 -1
  315. package/dist/esm/gov-control-group.entry.js +1 -1
  316. package/dist/esm/gov-cookiebar.entry.js +1 -1
  317. package/dist/esm/gov-dialog.entry.js +3 -3
  318. package/dist/esm/gov-dropdown.entry.js +1 -1
  319. package/dist/esm/gov-empty.entry.js +1 -1
  320. package/dist/esm/gov-error-code.entry.js +1 -1
  321. package/dist/esm/gov-flex_3.entry.js +3 -3
  322. package/dist/esm/gov-form-autocomplete.entry.js +3 -3
  323. package/dist/esm/gov-form-checkbox-group.entry.js +3 -3
  324. package/dist/esm/gov-form-control.entry.js +1 -1
  325. package/dist/esm/gov-form-file.entry.js +1 -1
  326. package/dist/esm/gov-form-group.entry.js +1 -1
  327. package/dist/esm/gov-form-input_2.entry.js +6 -6
  328. package/dist/esm/gov-form-label.entry.js +1 -1
  329. package/dist/esm/gov-form-multi-select.entry.js +4 -4
  330. package/dist/esm/gov-form-password-power.entry.js +1 -1
  331. package/dist/esm/gov-form-radio-group.entry.js +1 -1
  332. package/dist/esm/gov-form-range.entry.js +203 -0
  333. package/dist/esm/gov-form-range.entry.js.map +1 -0
  334. package/dist/esm/gov-form-search.entry.js +1 -1
  335. package/dist/esm/gov-form-select.entry.js +4 -4
  336. package/dist/esm/gov-grid-item.entry.js +1 -1
  337. package/dist/esm/gov-grid.entry.js +1 -1
  338. package/dist/esm/gov-infobar.entry.js +2 -2
  339. package/dist/esm/gov-layout-column.entry.js +1 -1
  340. package/dist/esm/gov-layout.entry.js +1 -1
  341. package/dist/esm/gov-lifecycle.entry.js +1 -1
  342. package/dist/esm/gov-link.entry.js +2 -1
  343. package/dist/esm/gov-link.entry.js.map +1 -1
  344. package/dist/esm/gov-loading.entry.js +1 -1
  345. package/dist/esm/gov-message.entry.js +1 -1
  346. package/dist/esm/gov-pagination.entry.js +2 -2
  347. package/dist/esm/gov-spacer.entry.js +1 -1
  348. package/dist/esm/gov-stepper-item.entry.js +1 -1
  349. package/dist/esm/gov-stepper.entry.js +1 -1
  350. package/dist/esm/gov-tabs-item.entry.js +1 -1
  351. package/dist/esm/gov-tabs.entry.js +2 -2
  352. package/dist/esm/gov-tag.entry.js +1 -1
  353. package/dist/esm/gov-tile.entry.js +1 -1
  354. package/dist/esm/gov-toast.entry.js +1 -1
  355. package/dist/esm/gov-tooltip-content.entry.js +1 -1
  356. package/dist/esm/gov-tooltip.entry.js +2 -2
  357. package/dist/esm/gov-wizard-item.entry.js +2 -2
  358. package/dist/esm/gov-wizard.entry.js +3 -3
  359. package/dist/esm/{helpers.types-43ddbdb8.js → helpers.types-fe2f0447.js} +3 -2
  360. package/dist/esm/helpers.types-fe2f0447.js.map +1 -0
  361. package/dist/esm/index-bf8a6f64.js +4 -0
  362. package/dist/esm/loader.js +1 -1
  363. package/dist/esm/{wcag-253a4421.js → wcag-bd11d341.js} +2 -2
  364. package/dist/esm/{wcag-253a4421.js.map → wcag-bd11d341.js.map} +1 -1
  365. package/dist/hydrate/index.js +313 -86
  366. package/dist/hydrate/index.mjs +313 -86
  367. package/dist/stencil.config.js +1 -1
  368. package/dist/stencil.config.js.map +1 -1
  369. package/dist/types/components/gov-banner/gov-banner.d.ts +4 -14
  370. package/dist/types/components/gov-card/gov-card.d.ts +10 -0
  371. package/dist/types/components/gov-form/range/constants.d.ts +9 -0
  372. package/dist/types/components/gov-form/range/gov-form-range.d.ts +116 -0
  373. package/dist/types/components/gov-link/gov-link.d.ts +4 -0
  374. package/dist/types/components.d.ts +200 -22
  375. package/package.json +1 -1
  376. package/dist/cjs/helpers.types-ff60c9bd.js.map +0 -1
  377. package/dist/collection/components/gov-blocquote/constants.js.map +0 -1
  378. package/dist/collection/components/gov-blocquote/gov-blockquote.js.map +0 -1
  379. package/dist/components/p-2aedc81e.js +0 -2
  380. package/dist/components/p-2aedc81e.js.map +0 -1
  381. package/dist/components/p-80dad64b.js +0 -2
  382. package/dist/components/p-ded281e6.js +0 -2
  383. package/dist/components/p-f9a1ff6e.js +0 -2
  384. package/dist/core/p-005214d1.entry.js +0 -2
  385. package/dist/core/p-0fc9ea97.entry.js +0 -2
  386. package/dist/core/p-16d3a79a.entry.js +0 -2
  387. package/dist/core/p-16f44a0b.entry.js +0 -2
  388. package/dist/core/p-1c7c9144.entry.js +0 -2
  389. package/dist/core/p-1cf1dd10.entry.js +0 -2
  390. package/dist/core/p-23b4dcd3.entry.js +0 -2
  391. package/dist/core/p-28d1bc01.entry.js +0 -2
  392. package/dist/core/p-29ac15d2.js +0 -2
  393. package/dist/core/p-2aedc81e.js +0 -2
  394. package/dist/core/p-2aedc81e.js.map +0 -1
  395. package/dist/core/p-3d7fb8f8.entry.js +0 -2
  396. package/dist/core/p-46ecf09e.entry.js +0 -2
  397. package/dist/core/p-49cd4d0d.entry.js +0 -2
  398. package/dist/core/p-650fe9e8.entry.js +0 -2
  399. package/dist/core/p-6e41cf69.entry.js +0 -2
  400. package/dist/core/p-7399ad59.entry.js +0 -2
  401. package/dist/core/p-79ec86da.entry.js +0 -2
  402. package/dist/core/p-80bebb7f.entry.js +0 -2
  403. package/dist/core/p-8cbe8add.entry.js +0 -2
  404. package/dist/core/p-8f73f8e0.entry.js +0 -2
  405. package/dist/core/p-952ab9e5.entry.js +0 -2
  406. package/dist/core/p-9c1601b3.entry.js +0 -2
  407. package/dist/core/p-c2abc031.entry.js +0 -2
  408. package/dist/core/p-c688349d.entry.js +0 -2
  409. package/dist/core/p-c6fdc0a9.entry.js +0 -2
  410. package/dist/core/p-c6fdc0a9.entry.js.map +0 -1
  411. package/dist/core/p-c91512dd.entry.js +0 -2
  412. package/dist/core/p-cf9d5c2f.entry.js +0 -2
  413. package/dist/core/p-cf9d5c2f.entry.js.map +0 -1
  414. package/dist/core/p-d1270d72.entry.js +0 -2
  415. package/dist/core/p-d1270d72.entry.js.map +0 -1
  416. package/dist/core/p-d141e9ca.entry.js +0 -2
  417. package/dist/core/p-d141e9ca.entry.js.map +0 -1
  418. package/dist/core/p-de852480.entry.js +0 -2
  419. package/dist/core/p-ded281e6.js +0 -2
  420. package/dist/core/p-e89471ef.entry.js +0 -2
  421. package/dist/core/p-f0e001c7.entry.js +0 -2
  422. package/dist/core/p-f333c673.entry.js +0 -2
  423. package/dist/core/p-f7e47c0a.entry.js +0 -2
  424. package/dist/core/p-f98f19f6.entry.js +0 -2
  425. package/dist/esm/helpers.types-43ddbdb8.js.map +0 -1
  426. /package/dist/collection/components/{gov-blocquote → gov-blockquote}/constants.js +0 -0
  427. /package/dist/components/{p-73938936.js.map → p-022e49cf.js.map} +0 -0
  428. /package/dist/components/{p-80dad64b.js.map → p-10cad7f1.js.map} +0 -0
  429. /package/dist/components/{p-b533871a.js.map → p-313b4611.js.map} +0 -0
  430. /package/dist/components/{p-3fead64a.js.map → p-5a861cd2.js.map} +0 -0
  431. /package/dist/components/{p-0327a469.js.map → p-5b0934a8.js.map} +0 -0
  432. /package/dist/components/{p-3c90521b.js.map → p-5d60b866.js.map} +0 -0
  433. /package/dist/components/{p-69a31c96.js.map → p-6ce6e14f.js.map} +0 -0
  434. /package/dist/components/{p-2fc08a71.js.map → p-7fb16042.js.map} +0 -0
  435. /package/dist/components/{p-ded281e6.js.map → p-be086357.js.map} +0 -0
  436. /package/dist/components/{p-4fba9df0.js.map → p-d3435179.js.map} +0 -0
  437. /package/dist/components/{p-f9a1ff6e.js.map → p-de989dfe.js.map} +0 -0
  438. /package/dist/components/{p-7be2301a.js.map → p-e0c3b1a7.js.map} +0 -0
  439. /package/dist/components/{p-b5dc6bae.js.map → p-f9b1a12b.js.map} +0 -0
  440. /package/dist/core/{p-7399ad59.entry.js.map → p-0c393d2f.entry.js.map} +0 -0
  441. /package/dist/core/{p-9c1601b3.entry.js.map → p-16ece889.entry.js.map} +0 -0
  442. /package/dist/core/{p-1c7c9144.entry.js.map → p-171e2a2f.entry.js.map} +0 -0
  443. /package/dist/core/{p-23b4dcd3.entry.js.map → p-25615325.entry.js.map} +0 -0
  444. /package/dist/core/{p-132c9a87.entry.js.map → p-2a7bcce0.entry.js.map} +0 -0
  445. /package/dist/core/{p-f120ba66.entry.js.map → p-2f966102.entry.js.map} +0 -0
  446. /package/dist/core/{p-9ae280b2.entry.js.map → p-3583dcf7.entry.js.map} +0 -0
  447. /package/dist/core/{p-8cbe8add.entry.js.map → p-3b2267a1.entry.js.map} +0 -0
  448. /package/dist/core/{p-de852480.entry.js.map → p-4216d8f3.entry.js.map} +0 -0
  449. /package/dist/core/{p-80bebb7f.entry.js.map → p-44c912e2.entry.js.map} +0 -0
  450. /package/dist/core/{p-952ab9e5.entry.js.map → p-4d5f768f.entry.js.map} +0 -0
  451. /package/dist/core/{p-f333c673.entry.js.map → p-52c74fc5.entry.js.map} +0 -0
  452. /package/dist/core/{p-0fc9ea97.entry.js.map → p-548806cb.entry.js.map} +0 -0
  453. /package/dist/core/{p-ab868410.entry.js.map → p-5fa4965e.entry.js.map} +0 -0
  454. /package/dist/core/{p-29ac15d2.js.map → p-6d54ce5f.js.map} +0 -0
  455. /package/dist/core/{p-c688349d.entry.js.map → p-6f74eb08.entry.js.map} +0 -0
  456. /package/dist/core/{p-5108eb37.entry.js.map → p-75dae924.entry.js.map} +0 -0
  457. /package/dist/core/{p-005214d1.entry.js.map → p-774ea182.entry.js.map} +0 -0
  458. /package/dist/core/{p-79ec86da.entry.js.map → p-843f980a.entry.js.map} +0 -0
  459. /package/dist/core/{p-c91512dd.entry.js.map → p-8a72ebcd.entry.js.map} +0 -0
  460. /package/dist/core/{p-94119ad4.entry.js.map → p-8cd7a120.entry.js.map} +0 -0
  461. /package/dist/core/{p-99f192c1.entry.js.map → p-8f469270.entry.js.map} +0 -0
  462. /package/dist/core/{p-564555e6.entry.js.map → p-947804a8.entry.js.map} +0 -0
  463. /package/dist/core/{p-5242b51b.entry.js.map → p-981f217e.entry.js.map} +0 -0
  464. /package/dist/core/{p-ab11081d.entry.js.map → p-a1c825f3.entry.js.map} +0 -0
  465. /package/dist/core/{p-59fe6cbc.entry.js.map → p-a8a7ae96.entry.js.map} +0 -0
  466. /package/dist/core/{p-a02f2547.entry.js.map → p-aeaba3ef.entry.js.map} +0 -0
  467. /package/dist/core/{p-ded281e6.js.map → p-be086357.js.map} +0 -0
  468. /package/dist/core/{p-c07f6bb4.entry.js.map → p-c1584cfe.entry.js.map} +0 -0
  469. /package/dist/core/{p-eb8a9705.entry.js.map → p-c88d8659.entry.js.map} +0 -0
  470. /package/dist/core/{p-6e41cf69.entry.js.map → p-ccb64e4e.entry.js.map} +0 -0
  471. /package/dist/core/{p-c2abc031.entry.js.map → p-d383f977.entry.js.map} +0 -0
  472. /package/dist/core/{p-8f73f8e0.entry.js.map → p-d990aae8.entry.js.map} +0 -0
  473. /package/dist/core/{p-ae88fe6b.entry.js.map → p-e2655cb7.entry.js.map} +0 -0
  474. /package/dist/core/{p-3acaa012.entry.js.map → p-e29c9924.entry.js.map} +0 -0
  475. /package/dist/core/{p-ee950038.entry.js.map → p-f83b3b08.entry.js.map} +0 -0
  476. /package/dist/types/components/{gov-blocquote → gov-blockquote}/constants.d.ts +0 -0
  477. /package/dist/types/components/{gov-blocquote → gov-blockquote}/gov-blockquote.d.ts +0 -0
@@ -0,0 +1,610 @@
1
+ import { h, Host } from "@stencil/core";
2
+ import { FormRangeClass, FormRangeSizes } from "./constants";
3
+ import { govHost, toBoolAttr, toBoolAttrIfDefined } from "../../../helpers/Dom/template";
4
+ import { validateProp } from "../../../helpers/Validate/props";
5
+ import { AttributeObserver } from "../../../helpers/Dom/attribute";
6
+ import { govForm } from "../../../helpers/Dom/form";
7
+ import { tick } from "../../../utils/stencil.utils";
8
+ import { isNumber } from "../../../utils/helpers.types";
9
+ import { createID } from "../../../utils/string.utils";
10
+ import { ariaAttributes } from "../../../helpers/Accessibility/attributes";
11
+ import { inheritAriaAttributes } from "../../../helpers/Accessibility/accessibility";
12
+ export class GovFormRange {
13
+ constructor() {
14
+ this.size = "m";
15
+ this.value = undefined;
16
+ this.identifier = undefined;
17
+ this.name = undefined;
18
+ this.min = undefined;
19
+ this.max = undefined;
20
+ this.step = undefined;
21
+ this.tooltip = false;
22
+ this.input = false;
23
+ this.listIdentifier = undefined;
24
+ this.required = false;
25
+ this.success = undefined;
26
+ this.invalid = undefined;
27
+ this.disabled = false;
28
+ this.inheritedAttributes = {};
29
+ this.h = govHost(this.host);
30
+ this.f = govForm(this.h);
31
+ this.inputId = createID("GovInput");
32
+ }
33
+ validateSize(newValue) {
34
+ validateProp(FormRangeSizes, newValue, FormRangeClass.root);
35
+ }
36
+ watchValue() {
37
+ this.controlOutputPosition();
38
+ }
39
+ watchControlAttrs() {
40
+ this.passControlAttrs();
41
+ }
42
+ passControlAttrs() {
43
+ this.f.passAttrToControl("size", this.size);
44
+ this.f.passAttrToControl("success", toBoolAttr(this.success));
45
+ this.f.passAttrToControl("disabled", toBoolAttr(this.disabled));
46
+ this.f.passAttrToControl("invalid", toBoolAttr(this.invalid));
47
+ }
48
+ get getThumbWidth() {
49
+ const styles = window.getComputedStyle(this.inputRef);
50
+ return parseFloat(styles.getPropertyValue('--thumb-size')) || 1;
51
+ }
52
+ controlOutputPosition() {
53
+ const valueInt = +this.value;
54
+ const min = +this.inputRef.min;
55
+ const max = +this.inputRef.max;
56
+ const thumbWidth = (this.getThumbWidth * 16);
57
+ const rangeWidth = this.inputRef.offsetWidth;
58
+ const percentage = ((valueInt - min) / (max - min)) * 100;
59
+ let tooltipOffset = ((percentage / 100) * (rangeWidth - thumbWidth)) + (thumbWidth / 2);
60
+ if (this.outputRef) {
61
+ this.outputRef.textContent = this.value;
62
+ const outputWidth = this.outputRef.offsetWidth / 2;
63
+ this.outputRef.style.left = `${tooltipOffset - outputWidth}px`;
64
+ }
65
+ if (this.fillRef) {
66
+ this.fillRef.style.width = `${tooltipOffset}px`;
67
+ }
68
+ }
69
+ componentDidLoad() {
70
+ this.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {
71
+ this.onAriaAttributeChange(attributeName, newValue);
72
+ });
73
+ this.attributeObserver.startObserving(ariaAttributes);
74
+ }
75
+ componentWillLoad() {
76
+ this.validateSize(this.size);
77
+ this.inheritedAttributes = inheritAriaAttributes(this.host);
78
+ }
79
+ componentDidRender() {
80
+ this.passControlAttrs();
81
+ this.f.passAttrToLabel("required", String(this.required));
82
+ tick(this.controlOutputPosition.bind(this));
83
+ }
84
+ onAriaAttributeChange(attributeName, newValue) {
85
+ this.host.removeAttribute(attributeName);
86
+ this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { [attributeName]: newValue });
87
+ }
88
+ disconnectedCallback() {
89
+ var _a;
90
+ (_a = this.attributeObserver) === null || _a === void 0 ? void 0 : _a.stopObserving();
91
+ }
92
+ render() {
93
+ return (h(Host, { key: '87236e8cdb0534dbefc72286517c353d41860260', class: FormRangeClass.root, size: this.size }, this.h.hasSlot("prefix") && h("slot", { key: '83f2b5ff50d7638d1e13de9e0f4774d747a8e374', name: "prefix" }), h("span", { key: '7cef4eac6144ee71dd6b3ffcdc2e992f33f97740', class: "element" }, 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": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-disabled": toBoolAttrIfDefined(this.disabled) })), h("div", { key: 'bdece1cc0cad1614eb090e9183d9dd96389b7568', class: FormRangeClass.fill, ref: el => (this.fillRef = el) }), this.tooltip ?
94
+ h("output", { htmlFor: this.name, ref: el => (this.outputRef = el) }, this.value)
95
+ : null, h("slot", { key: '4e346163e119d7508942a31bc35b28acd807bdb3', name: "datalist" })), this.h.hasSlot("sufix") && h("slot", { key: '3faaf9ba94069c9a7f3a147e9a6ecfec7a38edc7', name: "sufix" }), this.input ?
96
+ 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))
97
+ : null));
98
+ }
99
+ onCustomInputHandler(e) {
100
+ const value = e.target.value;
101
+ if (this.step && isNumber(+this.step)) {
102
+ const numValue = +value;
103
+ const numMin = +this.min;
104
+ const numMax = +this.max;
105
+ const numStep = +this.step;
106
+ if (isNaN(numValue)) {
107
+ return false;
108
+ }
109
+ if (numValue < numMin || numValue > numMax) {
110
+ return false;
111
+ }
112
+ const diff = numValue - numMin;
113
+ if (diff % numStep !== 0) {
114
+ return false;
115
+ }
116
+ this.value = value;
117
+ this.govInput.emit({
118
+ component: FormRangeClass.root,
119
+ value: this.value,
120
+ originalEvent: e,
121
+ });
122
+ }
123
+ }
124
+ onInputHandler(e) {
125
+ this.value = e.target.value;
126
+ e.stopPropagation();
127
+ this.govInput.emit({
128
+ component: FormRangeClass.root,
129
+ value: this.value,
130
+ originalEvent: e,
131
+ });
132
+ }
133
+ onFocusHandler(e) {
134
+ e.stopPropagation();
135
+ this.govFocus.emit({
136
+ component: FormRangeClass.root,
137
+ value: this.value,
138
+ originalEvent: e,
139
+ });
140
+ }
141
+ onBlurHandler(e) {
142
+ e.stopPropagation();
143
+ this.govBlur.emit({
144
+ component: FormRangeClass.root,
145
+ value: this.value,
146
+ originalEvent: e,
147
+ });
148
+ }
149
+ /**
150
+ * Returns the current state of the component
151
+ */
152
+ async setFocus(options) {
153
+ return this.inputRef.focus(options);
154
+ }
155
+ /**
156
+ * Sets the ordered value of the element
157
+ */
158
+ async setValue(value) {
159
+ this.value = value;
160
+ }
161
+ /**
162
+ * Clears input value
163
+ */
164
+ async clearValue() {
165
+ this.value = "";
166
+ this.inputRef.value = "";
167
+ }
168
+ /**
169
+ * Returns an instance of the native html input element
170
+ */
171
+ async getRef() {
172
+ return this.inputRef;
173
+ }
174
+ static get is() { return "gov-form-range"; }
175
+ static get properties() {
176
+ return {
177
+ "size": {
178
+ "type": "string",
179
+ "mutable": false,
180
+ "complexType": {
181
+ "original": "FormRangeSizesType",
182
+ "resolved": "\"l\" | \"m\" | \"s\"",
183
+ "references": {
184
+ "FormRangeSizesType": {
185
+ "location": "import",
186
+ "path": "./constants",
187
+ "id": "../../../packages/core/src/components/gov-form/range/constants.ts::FormRangeSizesType"
188
+ }
189
+ }
190
+ },
191
+ "required": false,
192
+ "optional": true,
193
+ "docs": {
194
+ "tags": [],
195
+ "text": "Range\u2019s size"
196
+ },
197
+ "attribute": "size",
198
+ "reflect": false,
199
+ "defaultValue": "\"m\""
200
+ },
201
+ "value": {
202
+ "type": "string",
203
+ "mutable": true,
204
+ "complexType": {
205
+ "original": "string",
206
+ "resolved": "string",
207
+ "references": {}
208
+ },
209
+ "required": false,
210
+ "optional": false,
211
+ "docs": {
212
+ "tags": [],
213
+ "text": "Value of range"
214
+ },
215
+ "attribute": "value",
216
+ "reflect": true
217
+ },
218
+ "identifier": {
219
+ "type": "string",
220
+ "mutable": false,
221
+ "complexType": {
222
+ "original": "string",
223
+ "resolved": "string",
224
+ "references": {}
225
+ },
226
+ "required": false,
227
+ "optional": false,
228
+ "docs": {
229
+ "tags": [],
230
+ "text": "Custom range identifier"
231
+ },
232
+ "attribute": "identifier",
233
+ "reflect": false
234
+ },
235
+ "name": {
236
+ "type": "string",
237
+ "mutable": false,
238
+ "complexType": {
239
+ "original": "string",
240
+ "resolved": "string",
241
+ "references": {}
242
+ },
243
+ "required": false,
244
+ "optional": false,
245
+ "docs": {
246
+ "tags": [],
247
+ "text": "Name of the range"
248
+ },
249
+ "attribute": "name",
250
+ "reflect": false
251
+ },
252
+ "min": {
253
+ "type": "any",
254
+ "mutable": false,
255
+ "complexType": {
256
+ "original": "string | number",
257
+ "resolved": "number | string",
258
+ "references": {}
259
+ },
260
+ "required": false,
261
+ "optional": true,
262
+ "docs": {
263
+ "tags": [],
264
+ "text": "Minimum value that is acceptable"
265
+ },
266
+ "attribute": "min",
267
+ "reflect": false
268
+ },
269
+ "max": {
270
+ "type": "any",
271
+ "mutable": false,
272
+ "complexType": {
273
+ "original": "string | number",
274
+ "resolved": "number | string",
275
+ "references": {}
276
+ },
277
+ "required": false,
278
+ "optional": true,
279
+ "docs": {
280
+ "tags": [],
281
+ "text": "Maximum value that is acceptable"
282
+ },
283
+ "attribute": "max",
284
+ "reflect": false
285
+ },
286
+ "step": {
287
+ "type": "any",
288
+ "mutable": false,
289
+ "complexType": {
290
+ "original": "string | number",
291
+ "resolved": "number | string",
292
+ "references": {}
293
+ },
294
+ "required": false,
295
+ "optional": true,
296
+ "docs": {
297
+ "tags": [],
298
+ "text": "Defines size of each step"
299
+ },
300
+ "attribute": "step",
301
+ "reflect": false
302
+ },
303
+ "tooltip": {
304
+ "type": "boolean",
305
+ "mutable": false,
306
+ "complexType": {
307
+ "original": "boolean",
308
+ "resolved": "boolean",
309
+ "references": {}
310
+ },
311
+ "required": false,
312
+ "optional": true,
313
+ "docs": {
314
+ "tags": [],
315
+ "text": "Show tooltip with current value"
316
+ },
317
+ "attribute": "tooltip",
318
+ "reflect": false,
319
+ "defaultValue": "false"
320
+ },
321
+ "input": {
322
+ "type": "boolean",
323
+ "mutable": false,
324
+ "complexType": {
325
+ "original": "boolean",
326
+ "resolved": "boolean",
327
+ "references": {}
328
+ },
329
+ "required": false,
330
+ "optional": true,
331
+ "docs": {
332
+ "tags": [],
333
+ "text": "Show input with current value"
334
+ },
335
+ "attribute": "input",
336
+ "reflect": false,
337
+ "defaultValue": "false"
338
+ },
339
+ "listIdentifier": {
340
+ "type": "string",
341
+ "mutable": false,
342
+ "complexType": {
343
+ "original": "string",
344
+ "resolved": "string",
345
+ "references": {}
346
+ },
347
+ "required": false,
348
+ "optional": true,
349
+ "docs": {
350
+ "tags": [],
351
+ "text": "Links a <datalist/> element to a <input type=\"range\">, providing value markers as guidance for the user"
352
+ },
353
+ "attribute": "list-identifier",
354
+ "reflect": false
355
+ },
356
+ "required": {
357
+ "type": "boolean",
358
+ "mutable": false,
359
+ "complexType": {
360
+ "original": "boolean",
361
+ "resolved": "boolean",
362
+ "references": {}
363
+ },
364
+ "required": false,
365
+ "optional": false,
366
+ "docs": {
367
+ "tags": [],
368
+ "text": "Set whether the range is required or not"
369
+ },
370
+ "attribute": "required",
371
+ "reflect": true,
372
+ "defaultValue": "false"
373
+ },
374
+ "success": {
375
+ "type": "boolean",
376
+ "mutable": false,
377
+ "complexType": {
378
+ "original": "boolean",
379
+ "resolved": "boolean",
380
+ "references": {}
381
+ },
382
+ "required": false,
383
+ "optional": false,
384
+ "docs": {
385
+ "tags": [],
386
+ "text": "Indicates the entered value of child form element does conform to the format expected by the application"
387
+ },
388
+ "attribute": "success",
389
+ "reflect": true
390
+ },
391
+ "invalid": {
392
+ "type": "boolean",
393
+ "mutable": false,
394
+ "complexType": {
395
+ "original": "boolean",
396
+ "resolved": "boolean",
397
+ "references": {}
398
+ },
399
+ "required": false,
400
+ "optional": false,
401
+ "docs": {
402
+ "tags": [],
403
+ "text": "Indicates the entered value does not conform to the format expected by the application"
404
+ },
405
+ "attribute": "invalid",
406
+ "reflect": true
407
+ },
408
+ "disabled": {
409
+ "type": "boolean",
410
+ "mutable": false,
411
+ "complexType": {
412
+ "original": "boolean",
413
+ "resolved": "boolean",
414
+ "references": {}
415
+ },
416
+ "required": false,
417
+ "optional": false,
418
+ "docs": {
419
+ "tags": [],
420
+ "text": "Makes the range component disabled"
421
+ },
422
+ "attribute": "disabled",
423
+ "reflect": true,
424
+ "defaultValue": "false"
425
+ }
426
+ };
427
+ }
428
+ static get states() {
429
+ return {
430
+ "inheritedAttributes": {}
431
+ };
432
+ }
433
+ static get events() {
434
+ return [{
435
+ "method": "govFocus",
436
+ "name": "gov-focus",
437
+ "bubbles": true,
438
+ "cancelable": true,
439
+ "composed": true,
440
+ "docs": {
441
+ "tags": [],
442
+ "text": "Emitted when the input has focus."
443
+ },
444
+ "complexType": {
445
+ "original": "FormInputEvent",
446
+ "resolved": "FormInputEvent",
447
+ "references": {
448
+ "FormInputEvent": {
449
+ "location": "import",
450
+ "path": "../input/gov-form-input.types",
451
+ "id": "../../../packages/core/src/components/gov-form/input/gov-form-input.types.ts::FormInputEvent"
452
+ }
453
+ }
454
+ }
455
+ }, {
456
+ "method": "govBlur",
457
+ "name": "gov-blur",
458
+ "bubbles": true,
459
+ "cancelable": true,
460
+ "composed": true,
461
+ "docs": {
462
+ "tags": [],
463
+ "text": "Emitted when the input loses focus."
464
+ },
465
+ "complexType": {
466
+ "original": "FormInputEvent",
467
+ "resolved": "FormInputEvent",
468
+ "references": {
469
+ "FormInputEvent": {
470
+ "location": "import",
471
+ "path": "../input/gov-form-input.types",
472
+ "id": "../../../packages/core/src/components/gov-form/input/gov-form-input.types.ts::FormInputEvent"
473
+ }
474
+ }
475
+ }
476
+ }, {
477
+ "method": "govInput",
478
+ "name": "gov-input",
479
+ "bubbles": true,
480
+ "cancelable": true,
481
+ "composed": true,
482
+ "docs": {
483
+ "tags": [],
484
+ "text": "Emitted when the input change value."
485
+ },
486
+ "complexType": {
487
+ "original": "FormInputEvent",
488
+ "resolved": "FormInputEvent",
489
+ "references": {
490
+ "FormInputEvent": {
491
+ "location": "import",
492
+ "path": "../input/gov-form-input.types",
493
+ "id": "../../../packages/core/src/components/gov-form/input/gov-form-input.types.ts::FormInputEvent"
494
+ }
495
+ }
496
+ }
497
+ }];
498
+ }
499
+ static get methods() {
500
+ return {
501
+ "setFocus": {
502
+ "complexType": {
503
+ "signature": "(options?: FocusOptions) => Promise<void>",
504
+ "parameters": [{
505
+ "name": "options",
506
+ "type": "FocusOptions",
507
+ "docs": ""
508
+ }],
509
+ "references": {
510
+ "Promise": {
511
+ "location": "global",
512
+ "id": "global::Promise"
513
+ },
514
+ "FocusOptions": {
515
+ "location": "global",
516
+ "id": "global::FocusOptions"
517
+ }
518
+ },
519
+ "return": "Promise<void>"
520
+ },
521
+ "docs": {
522
+ "text": "Returns the current state of the component",
523
+ "tags": []
524
+ }
525
+ },
526
+ "setValue": {
527
+ "complexType": {
528
+ "signature": "(value: string) => Promise<void>",
529
+ "parameters": [{
530
+ "name": "value",
531
+ "type": "string",
532
+ "docs": ""
533
+ }],
534
+ "references": {
535
+ "Promise": {
536
+ "location": "global",
537
+ "id": "global::Promise"
538
+ }
539
+ },
540
+ "return": "Promise<void>"
541
+ },
542
+ "docs": {
543
+ "text": "Sets the ordered value of the element",
544
+ "tags": []
545
+ }
546
+ },
547
+ "clearValue": {
548
+ "complexType": {
549
+ "signature": "() => Promise<void>",
550
+ "parameters": [],
551
+ "references": {
552
+ "Promise": {
553
+ "location": "global",
554
+ "id": "global::Promise"
555
+ }
556
+ },
557
+ "return": "Promise<void>"
558
+ },
559
+ "docs": {
560
+ "text": "Clears input value",
561
+ "tags": []
562
+ }
563
+ },
564
+ "getRef": {
565
+ "complexType": {
566
+ "signature": "() => Promise<HTMLInputElement>",
567
+ "parameters": [],
568
+ "references": {
569
+ "Promise": {
570
+ "location": "global",
571
+ "id": "global::Promise"
572
+ },
573
+ "HTMLInputElement": {
574
+ "location": "global",
575
+ "id": "global::HTMLInputElement"
576
+ }
577
+ },
578
+ "return": "Promise<HTMLInputElement>"
579
+ },
580
+ "docs": {
581
+ "text": "Returns an instance of the native html input element",
582
+ "tags": []
583
+ }
584
+ }
585
+ };
586
+ }
587
+ static get elementRef() { return "host"; }
588
+ static get watchers() {
589
+ return [{
590
+ "propName": "size",
591
+ "methodName": "validateSize"
592
+ }, {
593
+ "propName": "value",
594
+ "methodName": "watchValue"
595
+ }, {
596
+ "propName": "disabled",
597
+ "methodName": "watchControlAttrs"
598
+ }, {
599
+ "propName": "invalid",
600
+ "methodName": "watchControlAttrs"
601
+ }, {
602
+ "propName": "success",
603
+ "methodName": "watchControlAttrs"
604
+ }, {
605
+ "propName": "size",
606
+ "methodName": "watchControlAttrs"
607
+ }];
608
+ }
609
+ }
610
+ //# sourceMappingURL=gov-form-range.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gov-form-range.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/range/gov-form-range.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,eAAe,CAAA;AAC1G,OAAO,EAAC,cAAc,EAAE,cAAc,EA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AAQ,CAAC,OAAsB;QACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IACpC,CAAC;IAED;;OAEG;IAEH,KAAK,CAAC,QAAQ,CAAC,KAAa;QAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACnB,CAAC;IAED;;OAEG;IAEH,KAAK,CAAC,UAAU;QACf,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;QACf,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAA;IACzB,CAAC;IAED;;OAEG;IAEH,KAAK,CAAC,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,CAAA;IACrB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["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"]}
@@ -6,7 +6,7 @@ export class GovFormSearch {
6
6
  this.color = 'neutral';
7
7
  }
8
8
  render() {
9
- return (h(Host, { key: '2a4e3dd63dd15981e25c952e3a6f1f5eabdae12a', class: FormSearchClass.root, color: this.color, size: this.size }, h("slot", { key: '393fefd7c775341c8be8067900a29c36776d767c', name: "input" }), h("slot", { key: 'bcb202961db1564bcd4a30ae58a6a686895ea6d4', name: "button-erase" }), h("slot", { key: 'd82551286246b38fa1276bd181c18807e6fb4da8', name: "button" })));
9
+ return (h(Host, { key: 'aac69369eafa76eee7e1117601008ac8d34b5417', class: FormSearchClass.root, color: this.color, size: this.size }, h("slot", { key: '7f20815a61d662cbfde7f85f40e45277c5494315', name: "input" }), h("slot", { key: 'd2db24dda8aad0577f8d84ea39377df3dd1b9b19', name: "button-erase" }), h("slot", { key: 'd7f38530eb623e1f230e0ec42db0a68f775eec8e', name: "button" })));
10
10
  }
11
11
  static get is() { return "gov-form-search"; }
12
12
  static get properties() {