@gov-design-system-ce/components 0.0.52 → 0.0.54

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 (523) hide show
  1. package/dist/cjs/{constants-0883e74c.js → constants-393e915a.js} +2 -2
  2. package/dist/cjs/{constants-0883e74c.js.map → constants-393e915a.js.map} +1 -1
  3. package/dist/cjs/constants-440cd5c8.js +29 -0
  4. package/dist/cjs/constants-440cd5c8.js.map +1 -0
  5. package/dist/cjs/core.cjs.js +1 -1
  6. package/dist/cjs/gov-accordion-item.cjs.entry.js +13 -37
  7. package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
  8. package/dist/cjs/gov-accordion.cjs.entry.js +5 -5
  9. package/dist/cjs/gov-accordion.cjs.entry.js.map +1 -1
  10. package/dist/cjs/gov-alert.cjs.entry.js +2 -2
  11. package/dist/cjs/gov-app.cjs.entry.js +205 -367
  12. package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
  13. package/dist/cjs/gov-attachments_3.cjs.entry.js +2 -2
  14. package/dist/cjs/gov-backdrop.cjs.entry.js +2 -2
  15. package/dist/cjs/gov-backdrop.cjs.entry.js.map +1 -1
  16. package/dist/cjs/gov-badge.cjs.entry.js +5 -11
  17. package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
  18. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +2 -2
  19. package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
  20. package/dist/cjs/gov-button.cjs.entry.js +2 -2
  21. package/dist/cjs/gov-card.cjs.entry.js +2 -2
  22. package/dist/cjs/gov-control-group.cjs.entry.js.map +1 -1
  23. package/dist/cjs/gov-form-checkbox.cjs.entry.js +2 -2
  24. package/dist/cjs/gov-form-control.cjs.entry.js +1 -1
  25. package/dist/cjs/gov-form-control.cjs.entry.js.map +1 -1
  26. package/dist/cjs/gov-form-file.cjs.entry.js +2 -2
  27. package/dist/cjs/gov-form-group.cjs.entry.js +7 -1
  28. package/dist/cjs/gov-form-group.cjs.entry.js.map +1 -1
  29. package/dist/cjs/gov-form-input.cjs.entry.js +16 -14
  30. package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
  31. package/dist/cjs/gov-form-multi-select.cjs.entry.js +2 -2
  32. package/dist/cjs/gov-form-radio.cjs.entry.js +2 -2
  33. package/dist/cjs/gov-form-select.cjs.entry.js +2 -2
  34. package/dist/cjs/gov-form-switch.cjs.entry.js +2 -2
  35. package/dist/cjs/gov-icon.cjs.entry.js +26 -17
  36. package/dist/cjs/gov-icon.cjs.entry.js.map +1 -1
  37. package/dist/cjs/gov-modal.cjs.entry.js +2 -2
  38. package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
  39. package/dist/cjs/gov-nav.cjs.entry.js +2 -2
  40. package/dist/cjs/gov-pagination.cjs.entry.js +2 -2
  41. package/dist/cjs/gov-prompt.cjs.entry.js +2 -2
  42. package/dist/cjs/gov-prompt.cjs.entry.js.map +1 -1
  43. package/dist/cjs/gov-side-nav.cjs.entry.js +2 -2
  44. package/dist/cjs/gov-skeleton.cjs.entry.js +2 -2
  45. package/dist/cjs/gov-spacer.cjs.entry.js +2 -2
  46. package/dist/cjs/gov-spacer.cjs.entry.js.map +1 -1
  47. package/dist/cjs/gov-statsbar.cjs.entry.js +3 -3
  48. package/dist/cjs/gov-statsbar.cjs.entry.js.map +1 -1
  49. package/dist/cjs/gov-stepper-item.cjs.entry.js +1 -1
  50. package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
  51. package/dist/cjs/gov-tabs.cjs.entry.js +3 -3
  52. package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
  53. package/dist/cjs/gov-wizard-item.cjs.entry.js +114 -0
  54. package/dist/cjs/gov-wizard-item.cjs.entry.js.map +1 -0
  55. package/dist/cjs/{gov-wizzard.cjs.entry.js → gov-wizard.cjs.entry.js} +13 -13
  56. package/dist/cjs/gov-wizard.cjs.entry.js.map +1 -0
  57. package/dist/cjs/index-83edd4fe.js +4 -4
  58. package/dist/cjs/loader.cjs.js +1 -1
  59. package/dist/cjs/{wcag-b0321f09.js → wcag-d7912060.js} +2 -2
  60. package/dist/cjs/{wcag-b0321f09.js.map → wcag-d7912060.js.map} +1 -1
  61. package/dist/cjs/{win-53f637d4.js → win-0427c131.js} +4 -1
  62. package/dist/cjs/win-0427c131.js.map +1 -0
  63. package/dist/collection/collection-manifest.json +2 -2
  64. package/dist/collection/components/gov-accordion/constants.js +1 -1
  65. package/dist/collection/components/gov-accordion/constants.js.map +1 -1
  66. package/dist/collection/components/gov-accordion/gov-accordion-item.css +91 -90
  67. package/dist/collection/components/gov-accordion/gov-accordion-item.js +16 -117
  68. package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
  69. package/dist/collection/components/gov-accordion/gov-accordion.css +2 -2
  70. package/dist/collection/components/gov-accordion/gov-accordion.js +1 -1
  71. package/dist/collection/components/gov-accordion/gov-accordion.js.map +1 -1
  72. package/dist/collection/components/gov-alert/gov-alert.css +1 -1
  73. package/dist/collection/components/gov-app/gov-app.css +1 -1
  74. package/dist/collection/components/gov-app/gov-app.js +2 -2
  75. package/dist/collection/components/gov-app/gov-app.js.map +1 -1
  76. package/dist/collection/components/gov-attachments/gov-attachments-item.css +1 -1
  77. package/dist/collection/components/gov-attachments/gov-attachments.css +1 -1
  78. package/dist/collection/components/gov-backdrop/gov-backdrop.css +1 -1
  79. package/dist/collection/components/gov-backdrop/gov-backdrop.js +1 -1
  80. package/dist/collection/components/gov-backdrop/gov-backdrop.js.map +1 -1
  81. package/dist/collection/components/gov-badge/gov-badge.css +21 -21
  82. package/dist/collection/components/gov-badge/gov-badge.js +8 -40
  83. package/dist/collection/components/gov-badge/gov-badge.js.map +1 -1
  84. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.css +1 -1
  85. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +3 -3
  86. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js.map +1 -1
  87. package/dist/collection/components/gov-button/default/gov-button.css +1 -1
  88. package/dist/collection/components/gov-button/dropdown/gov-dropdown.css +1 -1
  89. package/dist/collection/components/gov-card/gov-card.css +1 -1
  90. package/dist/collection/components/gov-container/gov-container.css +1 -1
  91. package/dist/collection/components/gov-control-group/constants.js +1 -1
  92. package/dist/collection/components/gov-control-group/constants.js.map +1 -1
  93. package/dist/collection/components/gov-control-group/gov-control-group.css +1 -1
  94. package/dist/collection/components/gov-control-group/gov-control-group.js +3 -3
  95. package/dist/collection/components/gov-control-group/gov-control-group.js.map +1 -1
  96. package/dist/collection/components/gov-cookiebar/gov-cookiebar.css +1 -1
  97. package/dist/collection/components/gov-empty/gov-empty.css +1 -1
  98. package/dist/collection/components/gov-error-code/gov-error-code.css +1 -1
  99. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.css +1 -1
  100. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.css +1 -1
  101. package/dist/collection/components/gov-form/control/gov-form-control.css +5 -5
  102. package/dist/collection/components/gov-form/file/gov-form-file.css +1 -1
  103. package/dist/collection/components/gov-form/group/constants.js +5 -0
  104. package/dist/collection/components/gov-form/group/constants.js.map +1 -1
  105. package/dist/collection/components/gov-form/group/gov-form-group.css +9 -2
  106. package/dist/collection/components/gov-form/group/gov-form-group.js +25 -0
  107. package/dist/collection/components/gov-form/group/gov-form-group.js.map +1 -1
  108. package/dist/collection/components/gov-form/input/gov-form-input.css +1 -1
  109. package/dist/collection/components/gov-form/input/gov-form-input.js +27 -19
  110. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  111. package/dist/collection/components/gov-form/label/gov-form-label.css +1 -1
  112. package/dist/collection/components/gov-form/message/gov-form-message.css +1 -1
  113. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +1 -1
  114. package/dist/collection/components/gov-form/password-power/gov-form-password-power.css +1 -1
  115. package/dist/collection/components/gov-form/radio/gov-form-radio.css +1 -1
  116. package/dist/collection/components/gov-form/search/gov-form-search.css +1 -1
  117. package/dist/collection/components/gov-form/select/gov-form-select.css +1 -1
  118. package/dist/collection/components/gov-form/switch/gov-form-switch.css +1 -1
  119. package/dist/collection/components/gov-grid/gov-grid-item.css +1 -1
  120. package/dist/collection/components/gov-grid/gov-grid.css +1 -1
  121. package/dist/collection/components/gov-icon/gov-icon.css +1 -1
  122. package/dist/collection/components/gov-icon/gov-icon.js +18 -9
  123. package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
  124. package/dist/collection/components/gov-layout/gov-layout-column.css +1 -1
  125. package/dist/collection/components/gov-layout/gov-layout.css +1 -1
  126. package/dist/collection/components/gov-loading/loading/gov-loading.css +1 -1
  127. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.css +1 -1
  128. package/dist/collection/components/gov-message/gov-message.css +1 -1
  129. package/dist/collection/components/gov-modal/gov-modal.css +1 -1
  130. package/dist/collection/components/gov-modal/gov-modal.js +8 -2
  131. package/dist/collection/components/gov-modal/gov-modal.js.map +1 -1
  132. package/dist/collection/components/gov-nav/gov-nav-item.css +1 -1
  133. package/dist/collection/components/gov-nav/gov-nav.css +1 -1
  134. package/dist/collection/components/gov-pagination/gov-pagination.css +1 -1
  135. package/dist/collection/components/gov-promp/gov-prompt.css +1 -1
  136. package/dist/collection/components/gov-promp/gov-prompt.js +9 -4
  137. package/dist/collection/components/gov-promp/gov-prompt.js.map +1 -1
  138. package/dist/collection/components/gov-side-nav/gov-side-nav-item.css +1 -1
  139. package/dist/collection/components/gov-side-nav/gov-side-nav.css +1 -1
  140. package/dist/collection/components/gov-spacer/constants.js +1 -1
  141. package/dist/collection/components/gov-spacer/constants.js.map +1 -1
  142. package/dist/collection/components/gov-spacer/gov-spacer.css +1 -1
  143. package/dist/collection/components/gov-spacer/gov-spacer.js +3 -3
  144. package/dist/collection/components/gov-spacer/gov-spacer.js.map +1 -1
  145. package/dist/collection/components/gov-statsbar/gov-statsbar-item.css +1 -1
  146. package/dist/collection/components/gov-statsbar/gov-statsbar.css +1 -1
  147. package/dist/collection/components/gov-statsbar/gov-statsbar.js +5 -5
  148. package/dist/collection/components/gov-statsbar/gov-statsbar.js.map +1 -1
  149. package/dist/collection/components/gov-stepper/gov-stepper-item.css +23 -23
  150. package/dist/collection/components/gov-stepper/gov-stepper.css +1 -1
  151. package/dist/collection/components/gov-tabs/gov-tabs-item.css +1 -1
  152. package/dist/collection/components/gov-tabs/gov-tabs.css +1 -1
  153. package/dist/collection/components/gov-tabs/gov-tabs.js +1 -1
  154. package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
  155. package/dist/collection/components/gov-tile/container/gov-tiles.css +1 -1
  156. package/dist/collection/components/gov-tile/gov-tile.css +1 -1
  157. package/dist/collection/components/gov-toast/gov-toast.css +1 -1
  158. package/dist/collection/components/gov-tooltip/gov-tooltip-content.css +1 -1
  159. package/dist/collection/components/gov-tooltip/gov-tooltip.css +1 -1
  160. package/dist/collection/components/gov-wizard/constants.js +20 -0
  161. package/dist/collection/components/gov-wizard/constants.js.map +1 -0
  162. package/dist/collection/components/gov-wizard/gov-wizard-item.css +471 -0
  163. package/dist/collection/components/gov-wizard/gov-wizard-item.d.js +2 -0
  164. package/dist/collection/components/gov-wizard/gov-wizard-item.d.js.map +1 -0
  165. package/dist/collection/components/{gov-wizzard/gov-wizzard-item.js → gov-wizard/gov-wizard-item.js} +35 -35
  166. package/dist/collection/components/gov-wizard/gov-wizard-item.js.map +1 -0
  167. package/dist/collection/components/gov-wizard/gov-wizard-item.types.js +2 -0
  168. package/dist/collection/components/gov-wizard/gov-wizard-item.types.js.map +1 -0
  169. package/dist/collection/components/{gov-wizzard/gov-wizzard.css → gov-wizard/gov-wizard.css} +4 -4
  170. package/dist/collection/components/{gov-wizzard/gov-wizzard.js → gov-wizard/gov-wizard.js} +20 -20
  171. package/dist/collection/components/gov-wizard/gov-wizard.js.map +1 -0
  172. package/dist/collection/core/constants/tokens.js +17 -0
  173. package/dist/collection/core/constants/tokens.js.map +1 -0
  174. package/dist/collection/helpers/Dom/win.js +2 -0
  175. package/dist/collection/helpers/Dom/win.js.map +1 -1
  176. package/dist/collection/pages/Accordion.js +158 -326
  177. package/dist/collection/pages/Accordion.js.map +1 -1
  178. package/dist/collection/pages/Badge.js +6 -0
  179. package/dist/collection/pages/Badge.js.map +1 -1
  180. package/dist/collection/pages/{Wizzard.js → Wizard.js} +41 -41
  181. package/dist/collection/pages/Wizard.js.map +1 -0
  182. package/dist/collection/utils/icon.utils.js +8 -7
  183. package/dist/collection/utils/icon.utils.js.map +1 -1
  184. package/dist/components/gov-accordion-item.js +1 -1
  185. package/dist/components/gov-accordion-item.js.map +1 -1
  186. package/dist/components/gov-accordion.js +1 -1
  187. package/dist/components/gov-accordion.js.map +1 -1
  188. package/dist/components/gov-alert.js +1 -1
  189. package/dist/components/gov-alert.js.map +1 -1
  190. package/dist/components/gov-app.js +1 -1
  191. package/dist/components/gov-app.js.map +1 -1
  192. package/dist/components/gov-attachments-item.js +1 -1
  193. package/dist/components/gov-attachments.js +1 -1
  194. package/dist/components/gov-backdrop.js +1 -1
  195. package/dist/components/gov-badge.js +1 -1
  196. package/dist/components/gov-breadcrumbs.js +1 -1
  197. package/dist/components/gov-breadcrumbs.js.map +1 -1
  198. package/dist/components/gov-button.js +1 -1
  199. package/dist/components/gov-card.js +1 -1
  200. package/dist/components/gov-control-group.js.map +1 -1
  201. package/dist/components/gov-form-autocomplete.js +1 -1
  202. package/dist/components/gov-form-checkbox.js +1 -1
  203. package/dist/components/gov-form-control.js +1 -1
  204. package/dist/components/gov-form-control.js.map +1 -1
  205. package/dist/components/gov-form-file.js +1 -1
  206. package/dist/components/gov-form-group.js +1 -1
  207. package/dist/components/gov-form-group.js.map +1 -1
  208. package/dist/components/gov-form-input.js +1 -1
  209. package/dist/components/gov-form-multi-select.js +1 -1
  210. package/dist/components/gov-form-radio.js +1 -1
  211. package/dist/components/gov-form-select.js +1 -1
  212. package/dist/components/gov-form-switch.js +1 -1
  213. package/dist/components/gov-icon.js +1 -1
  214. package/dist/components/gov-loading.js +1 -1
  215. package/dist/components/gov-modal.js +1 -1
  216. package/dist/components/gov-modal.js.map +1 -1
  217. package/dist/components/gov-nav.js +1 -1
  218. package/dist/components/gov-pagination.js +1 -1
  219. package/dist/components/gov-prompt.js +1 -1
  220. package/dist/components/gov-prompt.js.map +1 -1
  221. package/dist/components/gov-side-nav-item.js +1 -1
  222. package/dist/components/gov-side-nav.js +1 -1
  223. package/dist/components/gov-side-nav.js.map +1 -1
  224. package/dist/components/gov-skeleton.js +1 -1
  225. package/dist/components/gov-skeleton.js.map +1 -1
  226. package/dist/components/gov-spacer.js +1 -1
  227. package/dist/components/gov-spacer.js.map +1 -1
  228. package/dist/components/gov-statsbar-item.js +1 -1
  229. package/dist/components/gov-statsbar.js +1 -1
  230. package/dist/components/gov-statsbar.js.map +1 -1
  231. package/dist/components/gov-stepper-item.js +1 -1
  232. package/dist/components/gov-stepper-item.js.map +1 -1
  233. package/dist/components/gov-tabs.js +1 -1
  234. package/dist/components/gov-tabs.js.map +1 -1
  235. package/dist/components/gov-tile.js +1 -1
  236. package/dist/components/gov-toast.js +1 -1
  237. package/dist/components/{gov-wizzard-item.d.ts → gov-wizard-item.d.ts} +4 -4
  238. package/dist/components/gov-wizard-item.js +2 -0
  239. package/dist/components/gov-wizard-item.js.map +1 -0
  240. package/dist/components/{gov-wizzard.d.ts → gov-wizard.d.ts} +4 -4
  241. package/dist/components/gov-wizard.js +2 -0
  242. package/dist/components/gov-wizard.js.map +1 -0
  243. package/dist/components/{p-1020a160.js → p-17ebfe85.js} +2 -2
  244. package/dist/components/p-37a7409e.js +2 -0
  245. package/dist/components/p-37a7409e.js.map +1 -0
  246. package/dist/components/{p-80b2c231.js → p-3a46b683.js} +2 -2
  247. package/dist/components/{p-386409dc.js → p-3e8a9e92.js} +2 -2
  248. package/dist/components/{p-386409dc.js.map → p-3e8a9e92.js.map} +1 -1
  249. package/dist/components/{p-ec26407a.js → p-560846c7.js} +2 -2
  250. package/dist/components/p-6834d779.js +2 -0
  251. package/dist/components/p-6834d779.js.map +1 -0
  252. package/dist/components/{p-ccc44ac1.js → p-8da17139.js} +2 -2
  253. package/dist/components/p-a2e601c5.js +2 -0
  254. package/dist/components/p-a2e601c5.js.map +1 -0
  255. package/dist/components/p-ae894a40.js +2 -0
  256. package/dist/components/{p-cd440c95.js → p-b9388dc1.js} +2 -2
  257. package/dist/components/p-b9388dc1.js.map +1 -0
  258. package/dist/components/p-c055eb68.js +2 -0
  259. package/dist/components/p-c055eb68.js.map +1 -0
  260. package/dist/components/p-cac3881f.js +2 -0
  261. package/dist/components/p-cac3881f.js.map +1 -0
  262. package/dist/components/{p-1026d931.js → p-d6ab5b8a.js} +2 -2
  263. package/dist/components/{p-d305407a.js → p-e9a01d67.js} +2 -2
  264. package/dist/core/core.esm.js +1 -1
  265. package/dist/core/core.esm.js.map +1 -1
  266. package/dist/core/p-06699657.entry.js +2 -0
  267. package/dist/core/p-06699657.entry.js.map +1 -0
  268. package/dist/core/{p-f969eec7.entry.js → p-0c1697ce.entry.js} +2 -2
  269. package/dist/core/p-0c1697ce.entry.js.map +1 -0
  270. package/dist/core/{p-a857915f.entry.js → p-0c769f1a.entry.js} +2 -2
  271. package/dist/core/{p-1020a160.js → p-17ebfe85.js} +2 -2
  272. package/dist/core/{p-9a3e3ace.entry.js → p-18ef9623.entry.js} +2 -2
  273. package/dist/core/{p-9a3e3ace.entry.js.map → p-18ef9623.entry.js.map} +1 -1
  274. package/dist/core/{p-eda868dc.entry.js → p-22a86871.entry.js} +2 -2
  275. package/dist/core/p-22a86871.entry.js.map +1 -0
  276. package/dist/core/{p-722218fd.entry.js → p-23385300.entry.js} +2 -2
  277. package/dist/core/p-23385300.entry.js.map +1 -0
  278. package/dist/core/{p-48349167.entry.js → p-33bf5974.entry.js} +2 -2
  279. package/dist/core/p-37a7409e.js +2 -0
  280. package/dist/core/p-37a7409e.js.map +1 -0
  281. package/dist/core/p-3b236ac2.entry.js +2 -0
  282. package/dist/core/p-3b236ac2.entry.js.map +1 -0
  283. package/dist/core/{p-3dbf7f49.js → p-3bacd021.js} +2 -2
  284. package/dist/core/{p-9f541022.entry.js → p-3d0ab343.entry.js} +2 -2
  285. package/dist/core/{p-e0c04c5f.entry.js → p-41e88980.entry.js} +2 -2
  286. package/dist/core/{p-e0c04c5f.entry.js.map → p-41e88980.entry.js.map} +1 -1
  287. package/dist/core/{p-5a855a15.entry.js → p-42c1935f.entry.js} +2 -2
  288. package/dist/core/p-44af4bc9.entry.js +2 -0
  289. package/dist/core/p-44af4bc9.entry.js.map +1 -0
  290. package/dist/core/{p-de3dc437.entry.js → p-48cfc1c6.entry.js} +2 -2
  291. package/dist/core/p-64f7e661.entry.js +2 -0
  292. package/dist/core/p-64f7e661.entry.js.map +1 -0
  293. package/dist/core/p-6834d779.js +2 -0
  294. package/dist/core/p-6834d779.js.map +1 -0
  295. package/dist/core/{p-9ad54c30.entry.js → p-70140f70.entry.js} +2 -2
  296. package/dist/core/{p-a68547b1.entry.js → p-81643870.entry.js} +2 -2
  297. package/dist/core/{p-11be550d.entry.js → p-82f64673.entry.js} +2 -2
  298. package/dist/core/p-82f64673.entry.js.map +1 -0
  299. package/dist/core/{p-6dacb8d3.entry.js → p-88010439.entry.js} +2 -2
  300. package/dist/core/p-88010439.entry.js.map +1 -0
  301. package/dist/core/p-89921159.entry.js.map +1 -1
  302. package/dist/core/{p-fa71fb92.entry.js → p-9d72d80b.entry.js} +2 -2
  303. package/dist/core/{p-1ae47d62.entry.js → p-a5d00433.entry.js} +2 -2
  304. package/dist/core/p-ab426e50.entry.js +2 -0
  305. package/dist/core/p-ab426e50.entry.js.map +1 -0
  306. package/dist/core/p-accf8575.entry.js +2 -0
  307. package/dist/core/p-accf8575.entry.js.map +1 -0
  308. package/dist/core/p-ae894a40.js +2 -0
  309. package/dist/core/p-b9b57928.entry.js +2 -0
  310. package/dist/core/p-b9b57928.entry.js.map +1 -0
  311. package/dist/core/p-bd1cb5bd.entry.js +2 -0
  312. package/dist/core/p-bd1cb5bd.entry.js.map +1 -0
  313. package/dist/core/{p-02c3a3fd.entry.js → p-bfb4d904.entry.js} +2 -2
  314. package/dist/core/{p-1e3cad4b.entry.js → p-c81d62db.entry.js} +2 -2
  315. package/dist/core/p-cac3881f.js +2 -0
  316. package/dist/core/p-cac3881f.js.map +1 -0
  317. package/dist/core/p-d1b7d8a6.entry.js +2 -0
  318. package/dist/core/p-d1b7d8a6.entry.js.map +1 -0
  319. package/dist/core/{p-3d720d54.entry.js → p-dbb46457.entry.js} +2 -2
  320. package/dist/core/{p-b5a560d2.entry.js → p-dfc080f2.entry.js} +2 -2
  321. package/dist/core/{p-2790d89e.entry.js → p-e1780dba.entry.js} +2 -2
  322. package/dist/core/p-e1780dba.entry.js.map +1 -0
  323. package/dist/core/{p-e1b3c361.entry.js → p-e769f3ee.entry.js} +2 -2
  324. package/dist/core/p-ea4459ae.entry.js +2 -0
  325. package/dist/core/p-ea4459ae.entry.js.map +1 -0
  326. package/dist/core/{p-d921bd4b.entry.js → p-f0a5847a.entry.js} +2 -2
  327. package/dist/core/{p-5150efee.entry.js → p-fc853777.entry.js} +2 -2
  328. package/dist/esm/constants-2499979c.js +24 -0
  329. package/dist/esm/constants-2499979c.js.map +1 -0
  330. package/dist/esm/{constants-037c35bc.js → constants-27b48cd1.js} +2 -2
  331. package/dist/esm/{constants-037c35bc.js.map → constants-27b48cd1.js.map} +1 -1
  332. package/dist/esm/{constants-ab132d9c.js → constants-858966b9.js} +2 -2
  333. package/dist/esm/{constants-ab132d9c.js.map → constants-858966b9.js.map} +1 -1
  334. package/dist/esm/{constants-5708696f.js → constants-ba92640d.js} +2 -2
  335. package/dist/esm/{constants-5708696f.js.map → constants-ba92640d.js.map} +1 -1
  336. package/dist/esm/core.js +1 -1
  337. package/dist/esm/gov-accordion-item.entry.js +13 -37
  338. package/dist/esm/gov-accordion-item.entry.js.map +1 -1
  339. package/dist/esm/gov-accordion.entry.js +5 -5
  340. package/dist/esm/gov-accordion.entry.js.map +1 -1
  341. package/dist/esm/gov-alert.entry.js +2 -2
  342. package/dist/esm/gov-app.entry.js +205 -367
  343. package/dist/esm/gov-app.entry.js.map +1 -1
  344. package/dist/esm/gov-attachments_3.entry.js +2 -2
  345. package/dist/esm/gov-backdrop.entry.js +2 -2
  346. package/dist/esm/gov-backdrop.entry.js.map +1 -1
  347. package/dist/esm/gov-badge.entry.js +6 -12
  348. package/dist/esm/gov-badge.entry.js.map +1 -1
  349. package/dist/esm/gov-breadcrumbs.entry.js +2 -2
  350. package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
  351. package/dist/esm/gov-button.entry.js +3 -3
  352. package/dist/esm/gov-card.entry.js +2 -2
  353. package/dist/esm/gov-control-group.entry.js.map +1 -1
  354. package/dist/esm/gov-dropdown.entry.js +1 -1
  355. package/dist/esm/gov-form-checkbox.entry.js +2 -2
  356. package/dist/esm/gov-form-control.entry.js +1 -1
  357. package/dist/esm/gov-form-control.entry.js.map +1 -1
  358. package/dist/esm/gov-form-file.entry.js +2 -2
  359. package/dist/esm/gov-form-group.entry.js +7 -1
  360. package/dist/esm/gov-form-group.entry.js.map +1 -1
  361. package/dist/esm/gov-form-input.entry.js +16 -14
  362. package/dist/esm/gov-form-input.entry.js.map +1 -1
  363. package/dist/esm/gov-form-multi-select.entry.js +2 -2
  364. package/dist/esm/gov-form-radio.entry.js +2 -2
  365. package/dist/esm/gov-form-select.entry.js +2 -2
  366. package/dist/esm/gov-form-switch.entry.js +2 -2
  367. package/dist/esm/gov-icon.entry.js +26 -17
  368. package/dist/esm/gov-icon.entry.js.map +1 -1
  369. package/dist/esm/gov-modal.entry.js +2 -2
  370. package/dist/esm/gov-modal.entry.js.map +1 -1
  371. package/dist/esm/gov-nav.entry.js +2 -2
  372. package/dist/esm/gov-pagination.entry.js +2 -2
  373. package/dist/esm/gov-prompt.entry.js +2 -2
  374. package/dist/esm/gov-prompt.entry.js.map +1 -1
  375. package/dist/esm/gov-side-nav.entry.js +2 -2
  376. package/dist/esm/gov-skeleton.entry.js +2 -2
  377. package/dist/esm/gov-spacer.entry.js +2 -2
  378. package/dist/esm/gov-spacer.entry.js.map +1 -1
  379. package/dist/esm/gov-statsbar-item.entry.js +1 -1
  380. package/dist/esm/gov-statsbar.entry.js +4 -4
  381. package/dist/esm/gov-statsbar.entry.js.map +1 -1
  382. package/dist/esm/gov-stepper-item.entry.js +1 -1
  383. package/dist/esm/gov-stepper-item.entry.js.map +1 -1
  384. package/dist/esm/gov-tabs.entry.js +3 -3
  385. package/dist/esm/gov-tabs.entry.js.map +1 -1
  386. package/dist/esm/gov-wizard-item.entry.js +110 -0
  387. package/dist/esm/gov-wizard-item.entry.js.map +1 -0
  388. package/dist/esm/{gov-wizzard.entry.js → gov-wizard.entry.js} +13 -13
  389. package/dist/esm/gov-wizard.entry.js.map +1 -0
  390. package/dist/esm/index-ae3c50f1.js +4 -4
  391. package/dist/esm/loader.js +1 -1
  392. package/dist/esm/{wcag-afdfdddb.js → wcag-062e7ca9.js} +2 -2
  393. package/dist/esm/{wcag-afdfdddb.js.map → wcag-062e7ca9.js.map} +1 -1
  394. package/dist/esm/{win-7a1a8ac8.js → win-0a50f66e.js} +4 -2
  395. package/dist/esm/win-0a50f66e.js.map +1 -0
  396. package/dist/hydrate/index.js +311 -491
  397. package/dist/stencil.config.js +4 -5
  398. package/dist/stencil.config.js.map +1 -1
  399. package/dist/types/components/gov-accordion/constants.d.ts +1 -1
  400. package/dist/types/components/gov-accordion/gov-accordion-item.d.ts +1 -19
  401. package/dist/types/components/gov-app/gov-app.d.ts +1 -1
  402. package/dist/types/components/gov-backdrop/gov-backdrop.d.ts +1 -1
  403. package/dist/types/components/gov-badge/gov-badge.d.ts +3 -8
  404. package/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.ts +2 -2
  405. package/dist/types/components/gov-control-group/constants.d.ts +2 -2
  406. package/dist/types/components/gov-control-group/gov-control-group.d.ts +2 -2
  407. package/dist/types/components/gov-form/group/constants.d.ts +5 -0
  408. package/dist/types/components/gov-form/group/gov-form-group.d.ts +5 -1
  409. package/dist/types/components/gov-form/input/gov-form-input.d.ts +5 -4
  410. package/dist/types/components/gov-icon/gov-icon.d.ts +1 -1
  411. package/dist/types/components/gov-modal/gov-modal.d.ts +2 -1
  412. package/dist/types/components/gov-promp/gov-prompt.d.ts +2 -1
  413. package/dist/types/components/gov-spacer/constants.d.ts +1 -1
  414. package/dist/types/components/gov-statsbar/gov-statsbar.d.ts +1 -1
  415. package/dist/types/components/{gov-wizzard → gov-wizard}/constants.d.ts +2 -2
  416. package/dist/types/components/gov-wizard/gov-wizard-item.d.d.ts +4 -0
  417. package/dist/types/components/{gov-wizzard/gov-wizzard-item.d.ts → gov-wizard/gov-wizard-item.d.ts} +13 -13
  418. package/dist/types/components/{gov-wizzard/gov-wizzard-item.types.d.ts → gov-wizard/gov-wizard-item.types.d.ts} +1 -1
  419. package/dist/types/components/{gov-wizzard/gov-wizzard.d.ts → gov-wizard/gov-wizard.d.ts} +7 -7
  420. package/dist/types/components.d.ts +81 -113
  421. package/dist/types/core/constants/tokens.d.ts +1 -0
  422. package/dist/types/helpers/Dom/win.d.ts +2 -0
  423. package/dist/types/pages/Wizard.d.ts +3 -0
  424. package/package.json +2 -2
  425. package/dist/cjs/constants-21559414.js +0 -29
  426. package/dist/cjs/constants-21559414.js.map +0 -1
  427. package/dist/cjs/gov-wizzard-item.cjs.entry.js +0 -114
  428. package/dist/cjs/gov-wizzard-item.cjs.entry.js.map +0 -1
  429. package/dist/cjs/gov-wizzard.cjs.entry.js.map +0 -1
  430. package/dist/cjs/win-53f637d4.js.map +0 -1
  431. package/dist/collection/components/gov-wizzard/constants.js +0 -20
  432. package/dist/collection/components/gov-wizzard/constants.js.map +0 -1
  433. package/dist/collection/components/gov-wizzard/gov-wizzard-item.css +0 -471
  434. package/dist/collection/components/gov-wizzard/gov-wizzard-item.d.js +0 -2
  435. package/dist/collection/components/gov-wizzard/gov-wizzard-item.d.js.map +0 -1
  436. package/dist/collection/components/gov-wizzard/gov-wizzard-item.js.map +0 -1
  437. package/dist/collection/components/gov-wizzard/gov-wizzard-item.types.js +0 -2
  438. package/dist/collection/components/gov-wizzard/gov-wizzard-item.types.js.map +0 -1
  439. package/dist/collection/components/gov-wizzard/gov-wizzard.js.map +0 -1
  440. package/dist/collection/pages/Wizzard.js.map +0 -1
  441. package/dist/components/gov-wizzard-item.js +0 -2
  442. package/dist/components/gov-wizzard-item.js.map +0 -1
  443. package/dist/components/gov-wizzard.js +0 -2
  444. package/dist/components/gov-wizzard.js.map +0 -1
  445. package/dist/components/p-0f5e2b0a.js +0 -2
  446. package/dist/components/p-34152b51.js +0 -2
  447. package/dist/components/p-34152b51.js.map +0 -1
  448. package/dist/components/p-5bf5a42e.js +0 -2
  449. package/dist/components/p-5bf5a42e.js.map +0 -1
  450. package/dist/components/p-64ced668.js +0 -2
  451. package/dist/components/p-64ced668.js.map +0 -1
  452. package/dist/components/p-9da782bf.js +0 -2
  453. package/dist/components/p-9da782bf.js.map +0 -1
  454. package/dist/components/p-a5d69694.js +0 -2
  455. package/dist/components/p-a5d69694.js.map +0 -1
  456. package/dist/components/p-cd440c95.js.map +0 -1
  457. package/dist/core/p-0eadfb3e.entry.js +0 -2
  458. package/dist/core/p-0eadfb3e.entry.js.map +0 -1
  459. package/dist/core/p-0f5e2b0a.js +0 -2
  460. package/dist/core/p-11be550d.entry.js.map +0 -1
  461. package/dist/core/p-2790d89e.entry.js.map +0 -1
  462. package/dist/core/p-34152b51.js +0 -2
  463. package/dist/core/p-34152b51.js.map +0 -1
  464. package/dist/core/p-42cd2cc4.entry.js +0 -2
  465. package/dist/core/p-42cd2cc4.entry.js.map +0 -1
  466. package/dist/core/p-64ced668.js +0 -2
  467. package/dist/core/p-64ced668.js.map +0 -1
  468. package/dist/core/p-6dacb8d3.entry.js.map +0 -1
  469. package/dist/core/p-722218fd.entry.js.map +0 -1
  470. package/dist/core/p-7ab82a55.entry.js +0 -2
  471. package/dist/core/p-7ab82a55.entry.js.map +0 -1
  472. package/dist/core/p-9751af2e.entry.js +0 -2
  473. package/dist/core/p-9751af2e.entry.js.map +0 -1
  474. package/dist/core/p-9e208f40.entry.js +0 -2
  475. package/dist/core/p-9e208f40.entry.js.map +0 -1
  476. package/dist/core/p-a5d69694.js +0 -2
  477. package/dist/core/p-a5d69694.js.map +0 -1
  478. package/dist/core/p-abfa0beb.entry.js +0 -2
  479. package/dist/core/p-abfa0beb.entry.js.map +0 -1
  480. package/dist/core/p-ac94d242.entry.js +0 -2
  481. package/dist/core/p-ac94d242.entry.js.map +0 -1
  482. package/dist/core/p-d2729599.entry.js +0 -2
  483. package/dist/core/p-d2729599.entry.js.map +0 -1
  484. package/dist/core/p-e86db39c.entry.js +0 -2
  485. package/dist/core/p-e86db39c.entry.js.map +0 -1
  486. package/dist/core/p-eda868dc.entry.js.map +0 -1
  487. package/dist/core/p-f95bca5f.entry.js +0 -2
  488. package/dist/core/p-f95bca5f.entry.js.map +0 -1
  489. package/dist/core/p-f969eec7.entry.js.map +0 -1
  490. package/dist/esm/constants-bf5a583f.js +0 -24
  491. package/dist/esm/constants-bf5a583f.js.map +0 -1
  492. package/dist/esm/gov-wizzard-item.entry.js +0 -110
  493. package/dist/esm/gov-wizzard-item.entry.js.map +0 -1
  494. package/dist/esm/gov-wizzard.entry.js.map +0 -1
  495. package/dist/esm/win-7a1a8ac8.js.map +0 -1
  496. package/dist/types/components/gov-wizzard/gov-wizzard-item.d.d.ts +0 -4
  497. package/dist/types/pages/Wizzard.d.ts +0 -3
  498. /package/dist/components/{p-1020a160.js.map → p-17ebfe85.js.map} +0 -0
  499. /package/dist/components/{p-80b2c231.js.map → p-3a46b683.js.map} +0 -0
  500. /package/dist/components/{p-ec26407a.js.map → p-560846c7.js.map} +0 -0
  501. /package/dist/components/{p-ccc44ac1.js.map → p-8da17139.js.map} +0 -0
  502. /package/dist/components/{p-0f5e2b0a.js.map → p-ae894a40.js.map} +0 -0
  503. /package/dist/components/{p-1026d931.js.map → p-d6ab5b8a.js.map} +0 -0
  504. /package/dist/components/{p-d305407a.js.map → p-e9a01d67.js.map} +0 -0
  505. /package/dist/core/{p-a857915f.entry.js.map → p-0c769f1a.entry.js.map} +0 -0
  506. /package/dist/core/{p-1020a160.js.map → p-17ebfe85.js.map} +0 -0
  507. /package/dist/core/{p-48349167.entry.js.map → p-33bf5974.entry.js.map} +0 -0
  508. /package/dist/core/{p-3dbf7f49.js.map → p-3bacd021.js.map} +0 -0
  509. /package/dist/core/{p-9f541022.entry.js.map → p-3d0ab343.entry.js.map} +0 -0
  510. /package/dist/core/{p-5a855a15.entry.js.map → p-42c1935f.entry.js.map} +0 -0
  511. /package/dist/core/{p-de3dc437.entry.js.map → p-48cfc1c6.entry.js.map} +0 -0
  512. /package/dist/core/{p-9ad54c30.entry.js.map → p-70140f70.entry.js.map} +0 -0
  513. /package/dist/core/{p-a68547b1.entry.js.map → p-81643870.entry.js.map} +0 -0
  514. /package/dist/core/{p-fa71fb92.entry.js.map → p-9d72d80b.entry.js.map} +0 -0
  515. /package/dist/core/{p-1ae47d62.entry.js.map → p-a5d00433.entry.js.map} +0 -0
  516. /package/dist/core/{p-0f5e2b0a.js.map → p-ae894a40.js.map} +0 -0
  517. /package/dist/core/{p-02c3a3fd.entry.js.map → p-bfb4d904.entry.js.map} +0 -0
  518. /package/dist/core/{p-1e3cad4b.entry.js.map → p-c81d62db.entry.js.map} +0 -0
  519. /package/dist/core/{p-3d720d54.entry.js.map → p-dbb46457.entry.js.map} +0 -0
  520. /package/dist/core/{p-b5a560d2.entry.js.map → p-dfc080f2.entry.js.map} +0 -0
  521. /package/dist/core/{p-e1b3c361.entry.js.map → p-e769f3ee.entry.js.map} +0 -0
  522. /package/dist/core/{p-d921bd4b.entry.js.map → p-f0a5847a.entry.js.map} +0 -0
  523. /package/dist/core/{p-5150efee.entry.js.map → p-fc853777.entry.js.map} +0 -0
@@ -170,7 +170,7 @@
170
170
  - Variables - Toast Message
171
171
  */
172
172
  /*
173
- - Variables - Wizzard
173
+ - Variables - Wizard
174
174
  */
175
175
  /*
176
176
  - Variables - Stepper
@@ -184,7 +184,7 @@
184
184
  - Variables - Toast Message
185
185
  */
186
186
  /*
187
- - Variables - Wizzard
187
+ - Variables - Wizard
188
188
  */
189
189
  /*
190
190
  - Variables - Stepper
@@ -170,7 +170,7 @@
170
170
  - Variables - Toast Message
171
171
  */
172
172
  /*
173
- - Variables - Wizzard
173
+ - Variables - Wizard
174
174
  */
175
175
  /*
176
176
  - Variables - Stepper
@@ -170,7 +170,7 @@
170
170
  - Variables - Toast Message
171
171
  */
172
172
  /*
173
- - Variables - Wizzard
173
+ - Variables - Wizard
174
174
  */
175
175
  /*
176
176
  - Variables - Stepper
@@ -248,19 +248,19 @@
248
248
  .gov-form-control[type=file] .gov-form-control__bottom {
249
249
  margin: 0.5rem 0rem 0rem;
250
250
  }
251
- .gov-form-control[size=xs][type=checkbox] .gov-form-control__bottom, .gov-form-control[size=xs][type=radio] .gov-form-control__bottom {
251
+ .gov-form-control[size=xs][type=checkbox] .gov-form-control__holder > .gov-form-control__bottom, .gov-form-control[size=xs][type=radio] .gov-form-control__holder > .gov-form-control__bottom {
252
252
  margin-top: var(--gov-form-checkbox-core-xs-message-gap, 0.5rem);
253
253
  margin-left: calc(var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem) + var(--gov-form-checkbox-core-xs-gap, 0.75rem));
254
254
  }
255
- .gov-form-control[size=s][type=checkbox] .gov-form-control__bottom, .gov-form-control[size=s][type=radio] .gov-form-control__bottom {
255
+ .gov-form-control[size=s][type=checkbox] .gov-form-control__holder > .gov-form-control__bottom, .gov-form-control[size=s][type=radio] .gov-form-control__holder > .gov-form-control__bottom {
256
256
  margin-top: var(--gov-form-checkbox-core-s-message-gap, 0.5rem);
257
257
  margin-left: calc(var(--gov-form-checkbox-core-s-indicator-size, 1.375rem) + var(--gov-form-checkbox-core-s-gap, 0.75rem));
258
258
  }
259
- .gov-form-control[size=m][type=checkbox] .gov-form-control__bottom, .gov-form-control[size=m][type=radio] .gov-form-control__bottom {
259
+ .gov-form-control[size=m][type=checkbox] .gov-form-control__holder > .gov-form-control__bottom, .gov-form-control[size=m][type=radio] .gov-form-control__holder > .gov-form-control__bottom {
260
260
  margin-top: var(--gov-form-checkbox-core-m-message-gap, 0.75rem);
261
261
  margin-left: calc(var(--gov-form-checkbox-core-m-indicator-size, 1.5rem) + var(--gov-form-checkbox-core-m-gap, 1rem));
262
262
  }
263
- .gov-form-control[size=l][type=checkbox] .gov-form-control__bottom, .gov-form-control[size=l][type=radio] .gov-form-control__bottom {
263
+ .gov-form-control[size=l][type=checkbox] .gov-form-control__holder > .gov-form-control__bottom, .gov-form-control[size=l][type=radio] .gov-form-control__holder > .gov-form-control__bottom {
264
264
  margin-top: var(--gov-form-checkbox-core-l-message-gap, 0.75rem);
265
265
  margin-left: calc(var(--gov-form-checkbox-core-l-indicator-size, 2rem) + var(--gov-form-checkbox-core-l-gap, 1rem));
266
266
  }
@@ -170,7 +170,7 @@
170
170
  - Variables - Toast Message
171
171
  */
172
172
  /*
173
- - Variables - Wizzard
173
+ - Variables - Wizard
174
174
  */
175
175
  /*
176
176
  - Variables - Stepper
@@ -1,6 +1,11 @@
1
1
  import { pick } from "../../../utils/utils";
2
2
  import { Sizes } from "../../../core/constants/sizes";
3
3
  export const FormGroupSizes = pick(Sizes, ['_2XS', '_XS', '_S', '_M', '_L']);
4
+ export var FormGroupOrientation;
5
+ (function (FormGroupOrientation) {
6
+ FormGroupOrientation["HORIZONTAL"] = "horizontal";
7
+ FormGroupOrientation["VERTICAL"] = "vertical";
8
+ })(FormGroupOrientation || (FormGroupOrientation = {}));
4
9
  export const FormGroupClass = {
5
10
  root: 'gov-form-group',
6
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/group/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AAGrD,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAG5E,MAAM,CAAC,MAAM,cAAc,GAAG;EAC7B,IAAI,EAAE,gBAAgB;CACtB,CAAA","sourcesContent":["import { pick } from \"../../../utils/utils\"\nimport { Sizes } from \"../../../core/constants/sizes\"\nimport { ValueOf } from \"../../../types/interfaces\"\n\nexport const FormGroupSizes = pick(Sizes, ['_2XS', '_XS', '_S', '_M', '_L'])\nexport type FormGroupSizesType = `${ValueOf<typeof FormGroupSizes>}`\n\nexport const FormGroupClass = {\n\troot: 'gov-form-group',\n}\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/group/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AAGrD,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAG5E,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;EAC/B,iDAAyB,CAAA;EACzB,6CAAqB,CAAA;AACtB,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B;AAGD,MAAM,CAAC,MAAM,cAAc,GAAG;EAC7B,IAAI,EAAE,gBAAgB;CACtB,CAAA","sourcesContent":["import { pick } from \"../../../utils/utils\"\nimport { Sizes } from \"../../../core/constants/sizes\"\nimport { ValueOf } from \"../../../types/interfaces\"\n\nexport const FormGroupSizes = pick(Sizes, ['_2XS', '_XS', '_S', '_M', '_L'])\nexport type FormGroupSizesType = `${ValueOf<typeof FormGroupSizes>}`\n\nexport enum FormGroupOrientation {\n\tHORIZONTAL = 'horizontal',\n\tVERTICAL = 'vertical',\n}\nexport type FormGroupOrientationType = `${ValueOf<typeof FormGroupOrientation>}`\n\nexport const FormGroupClass = {\n\troot: 'gov-form-group',\n}\n"]}
@@ -170,7 +170,7 @@
170
170
  - Variables - Toast Message
171
171
  */
172
172
  /*
173
- - Variables - Wizzard
173
+ - Variables - Wizard
174
174
  */
175
175
  /*
176
176
  - Variables - Stepper
@@ -231,9 +231,16 @@
231
231
  flex-direction: column;
232
232
  align-items: flex-start;
233
233
  }
234
- .gov-form-group .gov-form-label .gov-form-label__label {
234
+ .gov-form-group .gov-form-label__label {
235
235
  margin: 0;
236
236
  }
237
+ .gov-form-group[orientation=horizontal] {
238
+ flex-direction: row;
239
+ flex-wrap: wrap;
240
+ }
241
+ .gov-form-group[orientation=horizontal] .gov-form-label__label {
242
+ white-space: nowrap;
243
+ }
237
244
  .gov-form-group[gap="2xs"] {
238
245
  gap: 0.25rem;
239
246
  }
@@ -5,6 +5,7 @@ import { validateProp } from "../../../helpers/Validate/props";
5
5
  export class GovFormGroup {
6
6
  constructor() {
7
7
  this.gap = undefined;
8
+ this.orientation = 'vertical';
8
9
  this.h = govHost(this.host);
9
10
  }
10
11
  validateGap(newValue) {
@@ -52,6 +53,30 @@ export class GovFormGroup {
52
53
  "attribute": "gap",
53
54
  "reflect": false,
54
55
  "defaultValue": "undefined"
56
+ },
57
+ "orientation": {
58
+ "type": "string",
59
+ "mutable": false,
60
+ "complexType": {
61
+ "original": "FormGroupOrientationType",
62
+ "resolved": "\"horizontal\" | \"vertical\"",
63
+ "references": {
64
+ "FormGroupOrientationType": {
65
+ "location": "import",
66
+ "path": "./constants",
67
+ "id": "../../../packages/core/src/components/gov-form/group/constants.ts::FormGroupOrientationType"
68
+ }
69
+ }
70
+ },
71
+ "required": false,
72
+ "optional": true,
73
+ "docs": {
74
+ "tags": [],
75
+ "text": "Elements orientation"
76
+ },
77
+ "attribute": "orientation",
78
+ "reflect": false,
79
+ "defaultValue": "'vertical'"
55
80
  }
56
81
  };
57
82
  }
@@ -1 +1 @@
1
- {"version":3,"file":"gov-form-group.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/group/gov-form-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACxE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAA;AAEhF,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAA;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAM9D,MAAM,OAAO,YAAY;EAGxB;eAQ4C,SAAS;IAPpD,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EASD,WAAW,CAAC,QAAgB;IAC3B,YAAY,CAAC,cAAc,EAAE,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;EAC5D,CAAC;EAED,iBAAiB;IAChB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;EAC3B,CAAC;EAED,MAAM;IACL,OAAO,CACN,EAAC,IAAI,IAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC;MAC9D,eAAa,CACP,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { FormGroupClass, FormGroupSizes, FormGroupSizesType } from \"./constants\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { govHost } from \"../../../helpers/Dom/template\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\n\n@Component({\n\ttag: \"gov-form-group\",\n\tstyleUrl: \"gov-form-group.scss\",\n})\nexport class GovFormGroup {\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\n\t@Watch(\"gap\")\n\tvalidateGap(newValue: string): void {\n\t\tvalidateProp(FormGroupSizes, newValue, FormGroupClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateGap(this.gap)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host gap={this.gap} class={this.h.classes(FormGroupClass.root)}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
1
+ {"version":3,"file":"gov-form-group.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/group/gov-form-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACxE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAgD,MAAM,aAAa,CAAA;AAE1G,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAA;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAM9D,MAAM,OAAO,YAAY;EAGxB;eAQ4C,SAAS;uBAIK,UAAU;IAXnE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAaD,WAAW,CAAC,QAAgB;IAC3B,YAAY,CAAC,cAAc,EAAE,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;EAC5D,CAAC;EAED,iBAAiB;IAChB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;EAC3B,CAAC;EAED,MAAM;IACL,OAAO,CACN,EAAC,IAAI,IAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC;MAC9D,eAAa,CACP,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { FormGroupClass, FormGroupSizes, FormGroupSizesType, FormGroupOrientationType } from \"./constants\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { govHost } from \"../../../helpers/Dom/template\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\n\n@Component({\n\ttag: \"gov-form-group\",\n\tstyleUrl: \"gov-form-group.scss\",\n})\nexport class GovFormGroup {\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\n\t@Watch(\"gap\")\n\tvalidateGap(newValue: string): void {\n\t\tvalidateProp(FormGroupSizes, newValue, FormGroupClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateGap(this.gap)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host gap={this.gap} class={this.h.classes(FormGroupClass.root)}>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
@@ -170,7 +170,7 @@
170
170
  - Variables - Toast Message
171
171
  */
172
172
  /*
173
- - Variables - Wizzard
173
+ - Variables - Wizard
174
174
  */
175
175
  /*
176
176
  - Variables - Stepper
@@ -1,4 +1,4 @@
1
- import { Host, h } from "@stencil/core";
1
+ import { h, Host } from "@stencil/core";
2
2
  import { govForm } from "../../../helpers/Dom/form";
3
3
  import { govHost, toBoolAttr, toBoolAttrIfDefined, toOnOffAttrIfDefined } from "../../../helpers/Dom/template";
4
4
  import { canValidateWcagOnRender } from "../../../helpers/Dom/win";
@@ -6,7 +6,7 @@ import { validateProp } from "../../../helpers/Validate/props";
6
6
  import { validateWcagLabelFor, validateWcagRef } from "../../../helpers/Validate/wcag";
7
7
  import { createID } from "../../../utils/string.utils";
8
8
  import { delay } from "../../../utils/utils";
9
- import { FormInputClass, FormInputSizes, FormInputVariants } from "./constants";
9
+ import { FormInputClass, FormInputSizes, FormInputVariants, } from "./constants";
10
10
  var Tags;
11
11
  (function (Tags) {
12
12
  Tags["INPUT"] = "input";
@@ -16,9 +16,9 @@ export class GovFormInput {
16
16
  constructor() {
17
17
  this.value = undefined;
18
18
  this.identifier = undefined;
19
- this.variant = 'secondary';
19
+ this.variant = "secondary";
20
20
  this.success = undefined;
21
- this.size = 'm';
21
+ this.size = "m";
22
22
  this.name = undefined;
23
23
  this.multiline = undefined;
24
24
  this.rows = undefined;
@@ -34,7 +34,7 @@ export class GovFormInput {
34
34
  this.autocomplete = undefined;
35
35
  this.autocorrect = undefined;
36
36
  this.type = undefined;
37
- this.inputType = 'text';
37
+ this.inputType = "text";
38
38
  this.role = undefined;
39
39
  this.invalid = undefined;
40
40
  this.wcagDescribedBy = undefined;
@@ -44,7 +44,7 @@ export class GovFormInput {
44
44
  this.wcagExpanded = undefined;
45
45
  this.focused = undefined;
46
46
  this.h = govHost(this.host);
47
- this.inputId = createID('GovInput');
47
+ this.inputId = createID("GovInput");
48
48
  this.f = govForm(this.h);
49
49
  }
50
50
  validateVariant(newValue) {
@@ -60,13 +60,13 @@ export class GovFormInput {
60
60
  this.f.passAttrToControl("size", this.size);
61
61
  this.f.passAttrToControl("disabled", toBoolAttr(this.disabled));
62
62
  this.f.passAttrToControl("invalid", toBoolAttr(this.invalid));
63
- this.f.passAttrToControl('type', this.multiline ? Tags.TEXTAREA : Tags.INPUT);
63
+ this.f.passAttrToControl("type", this.multiline ? Tags.TEXTAREA : Tags.INPUT);
64
64
  }
65
65
  componentWillLoad() {
66
66
  this.validateVariant(this.variant);
67
67
  this.validateSize(this.size);
68
68
  this.passControlAttrs();
69
- this.f.passAttrToLabel('required', String(this.required));
69
+ this.f.passAttrToLabel("required", String(this.required));
70
70
  }
71
71
  async componentDidRender() {
72
72
  if (canValidateWcagOnRender()) {
@@ -76,7 +76,9 @@ export class GovFormInput {
76
76
  }
77
77
  render() {
78
78
  const Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT;
79
- return (h(Host, { class: FormInputClass.root, size: this.size, variant: this.variant, type: this.type }, this.h.hasSlot('prefix') && h("slot", { name: "prefix" }), h("span", { class: "element" }, this.h.hasSlot('left-icon') && h("slot", { name: "left-icon" }), this.h.hasSlot('right-icon') && !(this.success || this.invalid) && h("slot", { name: "right-icon" }), this.success && !this.multiline && h("gov-icon", { slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && !this.multiline && h("gov-icon", { slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), h(Tag, { type: this.inputType, disabled: this.disabled, id: this.identifier || this.inputId, name: this.name, onFocus: this.onFocusHandler.bind(this), onInput: this.onInputHandler.bind(this), onBlur: this.onBlurHandler.bind(this), onKeyUp: this.onKeyUpHandler.bind(this), onKeyDown: this.onKeyDownHandler.bind(this), ref: el => (this.inputRef = el), placeholder: this.placeholder, value: this.value, readonly: toBoolAttrIfDefined(this.readonly), autocomplete: toOnOffAttrIfDefined(this.autocomplete), autocorrect: toOnOffAttrIfDefined(this.autocorrect), minlength: this.minlength, maxlength: this.maxlength, min: this.min, max: this.max, required: this.required, rows: this.rows, cols: this.cols, role: this.role, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns, "aria-expanded": toBoolAttrIfDefined(this.wcagExpanded), "aria-autocomplete": this.wcagAutocomplete })), this.h.hasSlot('sufix') && h("slot", { name: "sufix" })));
79
+ return (h(Host, { class: FormInputClass.root, size: this.size, variant: this.variant, type: this.type }, this.h.hasSlot("prefix") && h("slot", { name: "prefix" }), h("span", { class: "element" }, this.h.hasSlot("left-icon") && h("slot", { name: "left-icon" }), this.h.hasSlot("right-icon") && !(this.success || this.invalid) && h("slot", { name: "right-icon" }), this.success && !this.multiline &&
80
+ h("gov-icon", { slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && !this.multiline &&
81
+ h("gov-icon", { slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), h(Tag, { type: this.inputType, disabled: this.disabled, id: this.identifier || this.inputId, name: this.name, onFocus: this.onFocusHandler.bind(this), onInput: this.onInputHandler.bind(this), onBlur: this.onBlurHandler.bind(this), onKeyUp: this.onKeyUpHandler.bind(this), onKeyDown: this.onKeyDownHandler.bind(this), ref: el => (this.inputRef = el), placeholder: this.placeholder, value: this.value, readonly: toBoolAttrIfDefined(this.readonly), autocomplete: toOnOffAttrIfDefined(this.autocomplete), autocorrect: toOnOffAttrIfDefined(this.autocorrect), minlength: this.minlength, maxlength: this.maxlength, min: this.min, max: this.max, required: this.required, rows: this.rows, cols: this.cols, role: this.role, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns, "aria-expanded": toBoolAttrIfDefined(this.wcagExpanded), "aria-autocomplete": this.wcagAutocomplete })), this.h.hasSlot("sufix") && h("slot", { name: "sufix" })));
80
82
  }
81
83
  onFocusHandler(e) {
82
84
  e.stopPropagation();
@@ -137,8 +139,8 @@ export class GovFormInput {
137
139
  * Clears input value
138
140
  */
139
141
  async clearValue() {
140
- this.value = '';
141
- this.inputRef.value = '';
142
+ this.value = "";
143
+ this.inputRef.value = "";
142
144
  }
143
145
  /**
144
146
  * Returns an instance of the native html input element
@@ -150,9 +152,9 @@ export class GovFormInput {
150
152
  * Validate the WCAG attributes of the component
151
153
  */
152
154
  async validateWcag() {
153
- validateWcagRef(this.wcagDescribedBy, 'wcag-described-by', FormInputClass.root);
154
- validateWcagRef(this.wcagLabelledBy, 'wcag-labelled-by', FormInputClass.root);
155
- validateWcagRef(this.wcagOwns, 'wcag-owns', FormInputClass.root);
155
+ validateWcagRef(this.wcagDescribedBy, "wcag-described-by", FormInputClass.root);
156
+ validateWcagRef(this.wcagLabelledBy, "wcag-labelled-by", FormInputClass.root);
157
+ validateWcagRef(this.wcagOwns, "wcag-owns", FormInputClass.root);
156
158
  validateWcagLabelFor(this.identifier || this.inputId, this.wcagLabelledBy, FormInputClass.root);
157
159
  }
158
160
  static get is() { return "gov-form-input"; }
@@ -224,7 +226,7 @@ export class GovFormInput {
224
226
  },
225
227
  "attribute": "variant",
226
228
  "reflect": false,
227
- "defaultValue": "'secondary'"
229
+ "defaultValue": "\"secondary\""
228
230
  },
229
231
  "success": {
230
232
  "type": "boolean",
@@ -265,7 +267,7 @@ export class GovFormInput {
265
267
  },
266
268
  "attribute": "size",
267
269
  "reflect": false,
268
- "defaultValue": "'m'"
270
+ "defaultValue": "\"m\""
269
271
  },
270
272
  "name": {
271
273
  "type": "string",
@@ -554,15 +556,21 @@ export class GovFormInput {
554
556
  },
555
557
  "attribute": "input-type",
556
558
  "reflect": false,
557
- "defaultValue": "'text'"
559
+ "defaultValue": "\"text\""
558
560
  },
559
561
  "role": {
560
562
  "type": "string",
561
563
  "mutable": false,
562
564
  "complexType": {
563
- "original": "string",
565
+ "original": "Nullable<string>",
564
566
  "resolved": "string",
565
- "references": {}
567
+ "references": {
568
+ "Nullable": {
569
+ "location": "import",
570
+ "path": "../../../types/interfaces",
571
+ "id": "../../../packages/core/src/types/interfaces.ts::Nullable"
572
+ }
573
+ }
566
574
  },
567
575
  "required": false,
568
576
  "optional": false,
@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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, Method, Prop, State, Watch, h } from '@stencil/core'\nimport { govForm } from '../../../helpers/Dom/form'\nimport { GovForm } from '../../../helpers/Dom/form.types'\nimport { govHost, toBoolAttr, toBoolAttrIfDefined, toOnOffAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { canValidateWcagOnRender } from '../../../helpers/Dom/win'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { validateWcagLabelFor, validateWcagRef } from '../../../helpers/Validate/wcag'\nimport { createID } from '../../../utils/string.utils'\nimport { delay } from '../../../utils/utils'\nimport { FormInputClass, FormInputSizes, FormInputSizesType, FormInputVariantType, FormInputVariants, InputType, Type } from './constants'\nimport { FormInputEvent } from './gov-form-input.types'\n\nenum Tags {\n\tINPUT = 'input',\n\tTEXTAREA = 'textarea',\n}\n\n@Component({\n\ttag: 'gov-form-input',\n\tstyleUrl: 'gov-form-input.scss',\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.inputId = createID('GovInput')\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({ reflect: true, mutable: true }) value: string\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop() readonly variant?: FormInputVariantType = 'secondary'\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() readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = 'm'\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Generates a texarea for the possibility of multiple lines\n\t */\n\t@Prop() readonly multiline: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n\t */\n\t@Prop() readonly rows: number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols\n\t */\n\t@Prop() readonly cols: number\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 input 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() readonly disabled: boolean\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Minimum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete\n\t */\n\t@Prop() readonly autocomplete: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect\n\t */\n\t@Prop() readonly autocorrect: boolean\n\t/**\n\t * Defineds the visual style of input\n\t */\n\t@Prop() readonly type?: Type\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n\t */\n\t@Prop() readonly inputType: InputType = 'text'\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role\n\t */\n\t@Prop() readonly role: 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 * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: 'wcag-described-by' }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: 'wcag-owns' }) readonly wcagOwns: string\n\t/**\n\t * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value.\n\t */\n\t@Prop({ attribute: 'wcag-autocomplete' }) readonly wcagAutocomplete: string\n\t/**\n\t * Attribute is set on an element to indicate if a control is expanded or collapsed\n\t */\n\t@Prop({ attribute: 'wcag-expanded' }) readonly wcagExpanded: boolean\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\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-keyup' }) govKeyUp: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-keydown' }) govKeyDown: EventEmitter<FormInputEvent>\n\t@State() focused: boolean\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormInputVariants, newValue, FormInputClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormInputSizes, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"type\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('type', this.multiline ? Tags.TEXTAREA : Tags.INPUT)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t\tthis.passControlAttrs()\n\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT\n\n\t\treturn (\n\t\t\t<Host class={FormInputClass.root} size={this.size} variant={this.variant} type={this.type}>\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{this.h.hasSlot('left-icon') && <slot name=\"left-icon\" />}\n\n\t\t\t\t\t{this.h.hasSlot('right-icon') && !(this.success || this.invalid) && <slot name=\"right-icon\" />}\n\n\t\t\t\t\t{this.success && !this.multiline && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && !this.multiline && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttype={this.inputType}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tid={this.identifier || this.inputId}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\tonKeyUp={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\t\tonKeyDown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\treadonly={toBoolAttrIfDefined(this.readonly)}\n\t\t\t\t\t\tautocomplete={toOnOffAttrIfDefined(this.autocomplete)}\n\t\t\t\t\t\tautocorrect={toOnOffAttrIfDefined(this.autocorrect)}\n\t\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\trows={this.rows}\n\t\t\t\t\t\tcols={this.cols}\n\t\t\t\t\t\trole={this.role}\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\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\t\taria-autocomplete={this.wcagAutocomplete}\n\t\t\t\t\t/>\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\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormInputClass.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.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyUpHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyUp.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyDownHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyDown.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\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: FormInputClass.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\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, 'wcag-described-by', FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, 'wcag-labelled-by', FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, 'wcag-owns', FormInputClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.inputId, this.wcagLabelledBy, FormInputClass.root)\n\t}\n}\n"]}
1
+ {"version":3,"file":"gov-form-input.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/input/gov-form-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC5G,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AAE9G,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","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, toOnOffAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\nimport { validateWcagLabelFor, validateWcagRef } from \"../../../helpers/Validate/wcag\"\nimport { createID } from \"../../../utils/string.utils\"\nimport { delay } from \"../../../utils/utils\"\nimport {\n\tFormInputClass,\n\tFormInputSizes,\n\tFormInputSizesType,\n\tFormInputVariants,\n\tFormInputVariantType,\n\tInputType,\n\tType,\n} from \"./constants\"\nimport { FormInputEvent } from \"./gov-form-input.types\"\nimport { Nullable } from \"../../../types/interfaces\"\n\nenum Tags {\n\tINPUT = \"input\",\n\tTEXTAREA = \"textarea\",\n}\n\n@Component({\n\ttag: \"gov-form-input\",\n\tstyleUrl: \"gov-form-input.scss\",\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.inputId = createID(\"GovInput\")\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({ reflect: true, mutable: true }) value: string\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop() readonly variant?: FormInputVariantType = \"secondary\"\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() readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Generates a texarea for the possibility of multiple lines\n\t */\n\t@Prop() readonly multiline: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n\t */\n\t@Prop() readonly rows: number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols\n\t */\n\t@Prop() readonly cols: number\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 input 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() readonly disabled: boolean\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Minimum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete\n\t */\n\t@Prop() readonly autocomplete: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect\n\t */\n\t@Prop() readonly autocorrect: boolean\n\t/**\n\t * Defineds the visual style of input\n\t */\n\t@Prop() readonly type?: Type\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n\t */\n\t@Prop() readonly inputType: InputType = \"text\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role\n\t */\n\t@Prop() readonly role: Nullable<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 * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-described-by\" }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-owns\" }) readonly wcagOwns: string\n\t/**\n\t * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value.\n\t */\n\t@Prop({ attribute: \"wcag-autocomplete\" }) readonly wcagAutocomplete: string\n\t/**\n\t * Attribute is set on an element to indicate if a control is expanded or collapsed\n\t */\n\t@Prop({ attribute: \"wcag-expanded\" }) readonly wcagExpanded: boolean\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\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: \"gov-keyup\" }) govKeyUp: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: \"gov-keydown\" }) govKeyDown: EventEmitter<FormInputEvent>\n\t@State() focused: boolean\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormInputVariants, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormInputSizes, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"type\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", this.multiline ? Tags.TEXTAREA : Tags.INPUT)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t\tthis.passControlAttrs()\n\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT\n\n\t\treturn (\n\t\t\t<Host class={FormInputClass.root} size={this.size} variant={this.variant} type={this.type}>\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{this.h.hasSlot(\"left-icon\") && <slot name=\"left-icon\" />}\n\n\t\t\t\t\t{this.h.hasSlot(\"right-icon\") && !(this.success || this.invalid) && <slot name=\"right-icon\" />}\n\n\t\t\t\t\t{this.success && !this.multiline &&\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && !this.multiline &&\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttype={this.inputType}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tid={this.identifier || this.inputId}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\tonKeyUp={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\t\tonKeyDown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\treadonly={toBoolAttrIfDefined(this.readonly)}\n\t\t\t\t\t\tautocomplete={toOnOffAttrIfDefined(this.autocomplete)}\n\t\t\t\t\t\tautocorrect={toOnOffAttrIfDefined(this.autocorrect)}\n\t\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\trows={this.rows}\n\t\t\t\t\t\tcols={this.cols}\n\t\t\t\t\t\trole={this.role}\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\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\t\taria-autocomplete={this.wcagAutocomplete}\n\t\t\t\t\t/>\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\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormInputClass.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.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyUpHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyUp.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyDownHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyDown.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\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: FormInputClass.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\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"wcag-described-by\", FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, \"wcag-owns\", FormInputClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.inputId, this.wcagLabelledBy, FormInputClass.root)\n\t}\n}\n"]}
@@ -170,7 +170,7 @@
170
170
  - Variables - Toast Message
171
171
  */
172
172
  /*
173
- - Variables - Wizzard
173
+ - Variables - Wizard
174
174
  */
175
175
  /*
176
176
  - Variables - Stepper
@@ -170,7 +170,7 @@
170
170
  - Variables - Toast Message
171
171
  */
172
172
  /*
173
- - Variables - Wizzard
173
+ - Variables - Wizard
174
174
  */
175
175
  /*
176
176
  - Variables - Stepper
@@ -184,7 +184,7 @@
184
184
  - Variables - Toast Message
185
185
  */
186
186
  /*
187
- - Variables - Wizzard
187
+ - Variables - Wizard
188
188
  */
189
189
  /*
190
190
  - Variables - Stepper
@@ -170,7 +170,7 @@
170
170
  - Variables - Toast Message
171
171
  */
172
172
  /*
173
- - Variables - Wizzard
173
+ - Variables - Wizard
174
174
  */
175
175
  /*
176
176
  - Variables - Stepper
@@ -170,7 +170,7 @@
170
170
  - Variables - Toast Message
171
171
  */
172
172
  /*
173
- - Variables - Wizzard
173
+ - Variables - Wizard
174
174
  */
175
175
  /*
176
176
  - Variables - Stepper
@@ -170,7 +170,7 @@
170
170
  - Variables - Toast Message
171
171
  */
172
172
  /*
173
- - Variables - Wizzard
173
+ - Variables - Wizard
174
174
  */
175
175
  /*
176
176
  - Variables - Stepper
@@ -170,7 +170,7 @@
170
170
  - Variables - Toast Message
171
171
  */
172
172
  /*
173
- - Variables - Wizzard
173
+ - Variables - Wizard
174
174
  */
175
175
  /*
176
176
  - Variables - Stepper
@@ -170,7 +170,7 @@
170
170
  - Variables - Toast Message
171
171
  */
172
172
  /*
173
- - Variables - Wizzard
173
+ - Variables - Wizard
174
174
  */
175
175
  /*
176
176
  - Variables - Stepper
@@ -170,7 +170,7 @@
170
170
  - Variables - Toast Message
171
171
  */
172
172
  /*
173
- - Variables - Wizzard
173
+ - Variables - Wizard
174
174
  */
175
175
  /*
176
176
  - Variables - Stepper
@@ -170,7 +170,7 @@
170
170
  - Variables - Toast Message
171
171
  */
172
172
  /*
173
- - Variables - Wizzard
173
+ - Variables - Wizard
174
174
  */
175
175
  /*
176
176
  - Variables - Stepper
@@ -170,7 +170,7 @@
170
170
  - Variables - Toast Message
171
171
  */
172
172
  /*
173
- - Variables - Wizzard
173
+ - Variables - Wizard
174
174
  */
175
175
  /*
176
176
  - Variables - Stepper
@@ -2,10 +2,11 @@ import { Build, h, Host } from "@stencil/core";
2
2
  import { IconClass } from "./constants";
3
3
  import { fetchIcon } from "../../utils/icon.utils";
4
4
  import { govHost } from "../../helpers/Dom/template";
5
+ import { iconsLazyLoad } from "../../helpers/Dom/win";
5
6
  export class GovIcon {
6
7
  constructor() {
7
8
  this.name = null;
8
- this.type = 'basic';
9
+ this.type = "basic";
9
10
  this.iconData = undefined;
10
11
  this.visible = false;
11
12
  this.error = false;
@@ -24,10 +25,16 @@ export class GovIcon {
24
25
  }
25
26
  }
26
27
  connectedCallback() {
27
- this.waitUntilVisible(async () => {
28
+ if (iconsLazyLoad()) {
28
29
  this.visible = true;
29
- await this.loadIconPathData();
30
- });
30
+ this.loadIconPathData().finally();
31
+ }
32
+ else {
33
+ this.waitUntilVisible(async () => {
34
+ this.visible = true;
35
+ await this.loadIconPathData();
36
+ });
37
+ }
31
38
  }
32
39
  disconnectedCallback() {
33
40
  if (this.intersectionObserver) {
@@ -39,19 +46,21 @@ export class GovIcon {
39
46
  await this.loadIconPathData();
40
47
  }
41
48
  waitUntilVisible(callback) {
42
- if (!Build.isBrowser || typeof window === 'undefined' || !window.IntersectionObserver) {
49
+ if (!Build.isBrowser || typeof window === "undefined" || !window.IntersectionObserver) {
43
50
  callback();
44
51
  return;
45
52
  }
46
53
  this.intersectionObserver = new IntersectionObserver(entries => {
47
54
  entries.forEach(entry => {
48
55
  if (entry.isIntersecting) {
49
- this.intersectionObserver.disconnect();
50
- this.intersectionObserver = null;
56
+ if (this.intersectionObserver) {
57
+ this.intersectionObserver.disconnect();
58
+ this.intersectionObserver = null;
59
+ }
51
60
  callback();
52
61
  }
53
62
  });
54
- }, { rootMargin: '50px' });
63
+ }, { rootMargin: "50px" });
55
64
  this.intersectionObserver.observe(this.host);
56
65
  }
57
66
  render() {
@@ -114,7 +123,7 @@ export class GovIcon {
114
123
  },
115
124
  "attribute": "type",
116
125
  "reflect": false,
117
- "defaultValue": "'basic'"
126
+ "defaultValue": "\"basic\""
118
127
  }
119
128
  };
120
129
  }
@@ -1 +1 @@
1
- {"version":3,"file":"gov-icon.js","sourceRoot":"","sources":["../../../../../../src/components/gov-icon/gov-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACtF,OAAO,EAAE,SAAS,EAAQ,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAQpD,MAAM,OAAO,OAAO;EAGnB;gBAOuB,IAAI;gBAIN,OAAO;;mBAED,KAAK;iBACP,KA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E;UACzB,IAAI,CAAC,oBAAoB,CAAC,UAAU,EAAE,CAAA;UACtC,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAA;UAChC,QAAQ,EAAE,CAAA;SACV;MACF,CAAC,CAAC,CAAA;IACH,CAAC,EACD,EAAE,UAAU,EAAE,MAAM,EAAE,CACtB,CAAA;IACD,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;EAC7C,CAAC;EAED,MAAM;IACL,IAAI,IAAI,CAAC,KAAK,EAAE;MACf,OAAO,IAAI,CAAA;KACX;IACD,OAAO,CACN,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC;MAC1C,YAAM,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,GAAS,CAC1D,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Build, Component, Element, h, Prop, State, Watch, Host } from '@stencil/core'\nimport { IconClass, Type } from './constants'\nimport { fetchIcon } from '../../utils/icon.utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\tassetsDirs: ['assets'],\n\tstyleUrl: 'gov-icon.scss',\n\ttag: 'gov-icon',\n})\nexport class GovIcon {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\t@Element() host: HTMLGovIconElement\n\t/**\n\t * Name of icon\n\t */\n\t@Prop() name: string = null\n\t/**\n\t * Type of icon\n\t */\n\t@Prop() type: Type = 'basic'\n\t@State() private iconData: string\n\t@State() private visible = false\n\t@State() private error = false\n\tprivate intersectionObserver: IntersectionObserver\n\n\t@Watch('name')\n\tprivate async loadIconPathData(): Promise<void> {\n\t\tconst { name, visible, type } = this\n\t\tif (!Build.isBrowser || !name || !visible) {\n\t\t\treturn\n\t\t}\n\t\ttry {\n\t\t\tthis.iconData = await fetchIcon({ name, type })\n\t\t} catch (e) {\n\t\t\tthis.error = true\n\t\t}\n\t}\n\n\tconnectedCallback(): void {\n\t\tthis.waitUntilVisible(async () => {\n\t\t\tthis.visible = true\n\t\t\tawait this.loadIconPathData()\n\t\t})\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tif (this.intersectionObserver) {\n\t\t\tthis.intersectionObserver.disconnect()\n\t\t\tthis.intersectionObserver = null\n\t\t}\n\t}\n\n\tasync componentWillLoad(): Promise<void> {\n\t\tawait this.loadIconPathData()\n\t}\n\n\tprivate waitUntilVisible(callback: () => void): void {\n\t\tif (!Build.isBrowser || typeof window === 'undefined' || !(window as any).IntersectionObserver) {\n\t\t\tcallback()\n\t\t\treturn\n\t\t}\n\t\tthis.intersectionObserver = new IntersectionObserver(\n\t\t\tentries => {\n\t\t\t\tentries.forEach(entry => {\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tthis.intersectionObserver.disconnect()\n\t\t\t\t\t\tthis.intersectionObserver = null\n\t\t\t\t\t\tcallback()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t{ rootMargin: '50px' }\n\t\t)\n\t\tthis.intersectionObserver.observe(this.host)\n\t}\n\n\trender() {\n\t\tif (this.error) {\n\t\t\treturn null\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(IconClass.root)}>\n\t\t\t\t<span class={IconClass.holder} innerHTML={this.iconData}></span>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
1
+ {"version":3,"file":"gov-icon.js","sourceRoot":"","sources":["../../../../../../src/components/gov-icon/gov-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,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AI,CAAA;KAChC;EACF,CAAC;EAED,KAAK,CAAC,iBAAiB;IACtB,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAA;EAC9B,CAAC;EAEO,gBAAgB,CAAC,QAAoB;IAC5C,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,CAAE,MAAc,CAAC,oBAAoB,EAAE;MAC/F,QAAQ,EAAE,CAAA;MACV,OAAM;KACN;IACD,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CACnD,OAAO,CAAC,EAAE;MACT,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACvB,IAAI,KAAK,CAAC,cAAc,EAAE;UACzB,IAAI,IAAI,CAAC,oBAAoB,EAAE;YAC9B,IAAI,CAAC,oBAAoB,CAAC,UAAU,EAAE,CAAA;YACtC,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAA;WAChC;UACD,QAAQ,EAAE,CAAA;SACV;MACF,CAAC,CAAC,CAAA;IACH,CAAC,EACD,EAAE,UAAU,EAAE,MAAM,EAAE,CACtB,CAAA;IACD,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;EAC7C,CAAC;EAED,MAAM;IACL,IAAI,IAAI,CAAC,KAAK,EAAE;MACf,OAAO,IAAI,CAAA;KACX;IACD,OAAO,CACN,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC;MAC1C,YAAM,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,GAAS,CAC1D,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Build, Component, Element, h, Host, Prop, State, Watch } from \"@stencil/core\"\nimport { IconClass, Type } from \"./constants\"\nimport { fetchIcon } from \"../../utils/icon.utils\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { iconsLazyLoad } from \"../../helpers/Dom/win\"\n\n@Component({\n\tassetsDirs: [\"assets\"],\n\tstyleUrl: \"gov-icon.scss\",\n\ttag: \"gov-icon\",\n})\nexport class GovIcon {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovIconElement\n\t/**\n\t * Name of icon\n\t */\n\t@Prop() name: string = null\n\t/**\n\t * Type of icon\n\t */\n\t@Prop() type: Type = \"basic\"\n\t@State() private iconData: string\n\t@State() private visible = false\n\t@State() private error = false\n\tprivate intersectionObserver: IntersectionObserver\n\n\t@Watch(\"name\")\n\tprivate async loadIconPathData(): Promise<void> {\n\t\tconst { name, visible, type } = this\n\t\tif (!Build.isBrowser || !name || !visible) {\n\t\t\treturn\n\t\t}\n\t\ttry {\n\t\t\tthis.iconData = await fetchIcon({ name, type })\n\t\t} catch (e) {\n\t\t\tthis.error = true\n\t\t}\n\t}\n\n\tconnectedCallback(): void {\n\t\tif (iconsLazyLoad()) {\n\t\t\tthis.visible = true\n\t\t\tthis.loadIconPathData().finally()\n\t\t} else {\n\t\t\tthis.waitUntilVisible(async () => {\n\t\t\t\tthis.visible = true\n\t\t\t\tawait this.loadIconPathData()\n\t\t\t})\n\t\t}\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tif (this.intersectionObserver) {\n\t\t\tthis.intersectionObserver.disconnect()\n\t\t\tthis.intersectionObserver = null\n\t\t}\n\t}\n\n\tasync componentWillLoad(): Promise<void> {\n\t\tawait this.loadIconPathData()\n\t}\n\n\tprivate waitUntilVisible(callback: () => void): void {\n\t\tif (!Build.isBrowser || typeof window === \"undefined\" || !(window as any).IntersectionObserver) {\n\t\t\tcallback()\n\t\t\treturn\n\t\t}\n\t\tthis.intersectionObserver = new IntersectionObserver(\n\t\t\tentries => {\n\t\t\t\tentries.forEach(entry => {\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tif (this.intersectionObserver) {\n\t\t\t\t\t\t\tthis.intersectionObserver.disconnect()\n\t\t\t\t\t\t\tthis.intersectionObserver = null\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcallback()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t{ rootMargin: \"50px\" },\n\t\t)\n\t\tthis.intersectionObserver.observe(this.host)\n\t}\n\n\trender() {\n\t\tif (this.error) {\n\t\t\treturn null\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(IconClass.root)}>\n\t\t\t\t<span class={IconClass.holder} innerHTML={this.iconData}></span>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}