@gov-design-system-ce/components 0.0.53 → 0.0.55

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 (434) hide show
  1. package/dist/cjs/constants-440cd5c8.js +29 -0
  2. package/dist/cjs/constants-440cd5c8.js.map +1 -0
  3. package/dist/cjs/{constants-393e915a.js → constants-dde21dcf.js} +4 -4
  4. package/dist/cjs/{constants-393e915a.js.map → constants-dde21dcf.js.map} +1 -1
  5. package/dist/cjs/core.cjs.js +1 -1
  6. package/dist/cjs/gov-accordion-item.cjs.entry.js +3 -3
  7. package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
  8. package/dist/cjs/gov-accordion.cjs.entry.js +4 -4
  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 +120 -60
  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-badge.cjs.entry.js +1 -1
  16. package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
  17. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +2 -2
  18. package/dist/cjs/gov-button.cjs.entry.js +2 -2
  19. package/dist/cjs/gov-card.cjs.entry.js +2 -2
  20. package/dist/cjs/gov-form-checkbox.cjs.entry.js +2 -2
  21. package/dist/cjs/gov-form-file.cjs.entry.js +8 -2
  22. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  23. package/dist/cjs/gov-form-group.cjs.entry.js +1 -1
  24. package/dist/cjs/gov-form-group.cjs.entry.js.map +1 -1
  25. package/dist/cjs/gov-form-input.cjs.entry.js +2 -2
  26. package/dist/cjs/gov-form-multi-select.cjs.entry.js +2 -2
  27. package/dist/cjs/gov-form-radio.cjs.entry.js +2 -2
  28. package/dist/cjs/gov-form-select.cjs.entry.js +2 -2
  29. package/dist/cjs/gov-form-switch.cjs.entry.js +2 -2
  30. package/dist/cjs/gov-icon.cjs.entry.js +22 -15
  31. package/dist/cjs/gov-icon.cjs.entry.js.map +1 -1
  32. package/dist/cjs/gov-message.cjs.entry.js +1 -1
  33. package/dist/cjs/gov-message.cjs.entry.js.map +1 -1
  34. package/dist/cjs/gov-modal.cjs.entry.js +2 -2
  35. package/dist/cjs/gov-nav.cjs.entry.js +2 -2
  36. package/dist/cjs/gov-pagination.cjs.entry.js +2 -2
  37. package/dist/cjs/gov-prompt.cjs.entry.js +2 -2
  38. package/dist/cjs/gov-side-nav.cjs.entry.js +2 -2
  39. package/dist/cjs/gov-skeleton.cjs.entry.js +2 -2
  40. package/dist/cjs/gov-stepper-item.cjs.entry.js +1 -1
  41. package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
  42. package/dist/cjs/gov-tabs.cjs.entry.js +2 -2
  43. package/dist/cjs/gov-tile.cjs.entry.js +2 -15
  44. package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
  45. package/dist/cjs/gov-wizard-item.cjs.entry.js +114 -0
  46. package/dist/cjs/gov-wizard-item.cjs.entry.js.map +1 -0
  47. package/dist/cjs/{gov-wizzard.cjs.entry.js → gov-wizard.cjs.entry.js} +13 -13
  48. package/dist/cjs/gov-wizard.cjs.entry.js.map +1 -0
  49. package/dist/cjs/index-83edd4fe.js +4 -4
  50. package/dist/cjs/loader.cjs.js +1 -1
  51. package/dist/cjs/{wcag-b0321f09.js → wcag-d7912060.js} +2 -2
  52. package/dist/cjs/{wcag-b0321f09.js.map → wcag-d7912060.js.map} +1 -1
  53. package/dist/cjs/{win-53f637d4.js → win-0427c131.js} +4 -1
  54. package/dist/cjs/win-0427c131.js.map +1 -0
  55. package/dist/collection/collection-manifest.json +2 -2
  56. package/dist/collection/components/gov-accordion/constants.js +3 -3
  57. package/dist/collection/components/gov-accordion/constants.js.map +1 -1
  58. package/dist/collection/components/gov-accordion/gov-accordion-item.css +102 -71
  59. package/dist/collection/components/gov-accordion/gov-accordion-item.js +1 -1
  60. package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
  61. package/dist/collection/components/gov-accordion/gov-accordion.css +2 -2
  62. package/dist/collection/components/gov-alert/gov-alert.css +1 -1
  63. package/dist/collection/components/gov-app/gov-app.css +1 -1
  64. package/dist/collection/components/gov-app/gov-app.js +2 -2
  65. package/dist/collection/components/gov-app/gov-app.js.map +1 -1
  66. package/dist/collection/components/gov-attachments/gov-attachments-item.css +1 -1
  67. package/dist/collection/components/gov-attachments/gov-attachments.css +1 -1
  68. package/dist/collection/components/gov-backdrop/gov-backdrop.css +1 -1
  69. package/dist/collection/components/gov-badge/gov-badge.css +1 -1
  70. package/dist/collection/components/gov-badge/gov-badge.js +2 -2
  71. package/dist/collection/components/gov-badge/gov-badge.js.map +1 -1
  72. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.css +1 -1
  73. package/dist/collection/components/gov-button/default/gov-button.css +1 -1
  74. package/dist/collection/components/gov-button/dropdown/gov-dropdown.css +1 -1
  75. package/dist/collection/components/gov-card/gov-card.css +1 -1
  76. package/dist/collection/components/gov-container/gov-container.css +1 -1
  77. package/dist/collection/components/gov-control-group/gov-control-group.css +1 -1
  78. package/dist/collection/components/gov-cookiebar/gov-cookiebar.css +1 -1
  79. package/dist/collection/components/gov-empty/gov-empty.css +1 -1
  80. package/dist/collection/components/gov-error-code/gov-error-code.css +1 -1
  81. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.css +1 -1
  82. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.css +1 -1
  83. package/dist/collection/components/gov-form/control/gov-form-control.css +1 -1
  84. package/dist/collection/components/gov-form/file/gov-form-file.css +1 -1
  85. package/dist/collection/components/gov-form/file/gov-form-file.js +23 -0
  86. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  87. package/dist/collection/components/gov-form/group/gov-form-group.css +8 -8
  88. package/dist/collection/components/gov-form/input/gov-form-input.css +1 -1
  89. package/dist/collection/components/gov-form/label/gov-form-label.css +1 -1
  90. package/dist/collection/components/gov-form/message/gov-form-message.css +1 -1
  91. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +1 -1
  92. package/dist/collection/components/gov-form/password-power/gov-form-password-power.css +1 -1
  93. package/dist/collection/components/gov-form/radio/gov-form-radio.css +1 -1
  94. package/dist/collection/components/gov-form/search/gov-form-search.css +1 -1
  95. package/dist/collection/components/gov-form/select/gov-form-select.css +1 -1
  96. package/dist/collection/components/gov-form/switch/gov-form-switch.css +1 -1
  97. package/dist/collection/components/gov-grid/gov-grid-item.css +1 -1
  98. package/dist/collection/components/gov-grid/gov-grid.css +1 -1
  99. package/dist/collection/components/gov-icon/gov-icon.css +1 -1
  100. package/dist/collection/components/gov-icon/gov-icon.js +14 -7
  101. package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
  102. package/dist/collection/components/gov-layout/gov-layout-column.css +1 -1
  103. package/dist/collection/components/gov-layout/gov-layout.css +1 -1
  104. package/dist/collection/components/gov-loading/loading/gov-loading.css +1 -1
  105. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.css +1 -1
  106. package/dist/collection/components/gov-message/gov-message.css +1 -1
  107. package/dist/collection/components/gov-message/gov-message.js +1 -1
  108. package/dist/collection/components/gov-message/gov-message.js.map +1 -1
  109. package/dist/collection/components/gov-modal/gov-modal.css +1 -1
  110. package/dist/collection/components/gov-nav/gov-nav-item.css +1 -1
  111. package/dist/collection/components/gov-nav/gov-nav.css +1 -1
  112. package/dist/collection/components/gov-pagination/gov-pagination.css +1 -1
  113. package/dist/collection/components/gov-promp/gov-prompt.css +1 -1
  114. package/dist/collection/components/gov-side-nav/gov-side-nav-item.css +1 -1
  115. package/dist/collection/components/gov-side-nav/gov-side-nav.css +1 -1
  116. package/dist/collection/components/gov-spacer/gov-spacer.css +1 -1
  117. package/dist/collection/components/gov-statsbar/gov-statsbar-item.css +1 -1
  118. package/dist/collection/components/gov-statsbar/gov-statsbar.css +1 -1
  119. package/dist/collection/components/gov-stepper/gov-stepper-item.css +23 -23
  120. package/dist/collection/components/gov-stepper/gov-stepper.css +1 -1
  121. package/dist/collection/components/gov-tabs/gov-tabs-item.css +1 -1
  122. package/dist/collection/components/gov-tabs/gov-tabs.css +1 -1
  123. package/dist/collection/components/gov-tile/container/gov-tiles.css +1 -1
  124. package/dist/collection/components/gov-tile/gov-tile.css +1 -1
  125. package/dist/collection/components/gov-tile/gov-tile.js +19 -26
  126. package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
  127. package/dist/collection/components/gov-toast/gov-toast.css +1 -1
  128. package/dist/collection/components/gov-tooltip/gov-tooltip-content.css +1 -1
  129. package/dist/collection/components/gov-tooltip/gov-tooltip.css +1 -1
  130. package/dist/collection/components/gov-wizard/constants.js +20 -0
  131. package/dist/collection/components/gov-wizard/constants.js.map +1 -0
  132. package/dist/collection/components/gov-wizard/gov-wizard-item.css +471 -0
  133. package/dist/collection/components/gov-wizard/gov-wizard-item.d.js +2 -0
  134. package/dist/collection/components/gov-wizard/gov-wizard-item.d.js.map +1 -0
  135. package/dist/collection/components/{gov-wizzard/gov-wizzard-item.js → gov-wizard/gov-wizard-item.js} +35 -35
  136. package/dist/collection/components/gov-wizard/gov-wizard-item.js.map +1 -0
  137. package/dist/collection/components/gov-wizard/gov-wizard-item.types.js +2 -0
  138. package/dist/collection/components/gov-wizard/gov-wizard-item.types.js.map +1 -0
  139. package/dist/collection/components/{gov-wizzard/gov-wizzard.css → gov-wizard/gov-wizard.css} +4 -4
  140. package/dist/collection/components/{gov-wizzard/gov-wizzard.js → gov-wizard/gov-wizard.js} +20 -20
  141. package/dist/collection/components/gov-wizard/gov-wizard.js.map +1 -0
  142. package/dist/collection/helpers/Dom/win.js +2 -0
  143. package/dist/collection/helpers/Dom/win.js.map +1 -1
  144. package/dist/collection/pages/Accordion.js +43 -4
  145. package/dist/collection/pages/Accordion.js.map +1 -1
  146. package/dist/collection/pages/Badge.js +6 -0
  147. package/dist/collection/pages/Badge.js.map +1 -1
  148. package/dist/collection/pages/Tiles.js +30 -15
  149. package/dist/collection/pages/Tiles.js.map +1 -1
  150. package/dist/collection/pages/{Wizzard.js → Wizard.js} +41 -41
  151. package/dist/collection/pages/Wizard.js.map +1 -0
  152. package/dist/collection/utils/icon.utils.js +8 -7
  153. package/dist/collection/utils/icon.utils.js.map +1 -1
  154. package/dist/components/gov-accordion-item.js +1 -1
  155. package/dist/components/gov-accordion-item.js.map +1 -1
  156. package/dist/components/gov-accordion.js +1 -1
  157. package/dist/components/gov-accordion.js.map +1 -1
  158. package/dist/components/gov-alert.js +1 -1
  159. package/dist/components/gov-app.js +1 -1
  160. package/dist/components/gov-app.js.map +1 -1
  161. package/dist/components/gov-attachments-item.js +1 -1
  162. package/dist/components/gov-attachments.js +1 -1
  163. package/dist/components/gov-backdrop.js +1 -1
  164. package/dist/components/gov-badge.js +1 -1
  165. package/dist/components/gov-breadcrumbs.js +1 -1
  166. package/dist/components/gov-button.js +1 -1
  167. package/dist/components/gov-card.js +1 -1
  168. package/dist/components/gov-form-autocomplete.js +1 -1
  169. package/dist/components/gov-form-checkbox.js +1 -1
  170. package/dist/components/gov-form-file.js +1 -1
  171. package/dist/components/gov-form-file.js.map +1 -1
  172. package/dist/components/gov-form-group.js +1 -1
  173. package/dist/components/gov-form-group.js.map +1 -1
  174. package/dist/components/gov-form-input.js +1 -1
  175. package/dist/components/gov-form-multi-select.js +1 -1
  176. package/dist/components/gov-form-radio.js +1 -1
  177. package/dist/components/gov-form-select.js +1 -1
  178. package/dist/components/gov-form-switch.js +1 -1
  179. package/dist/components/gov-icon.js +1 -1
  180. package/dist/components/gov-loading.js +1 -1
  181. package/dist/components/gov-message.js.map +1 -1
  182. package/dist/components/gov-modal.js +1 -1
  183. package/dist/components/gov-nav.js +1 -1
  184. package/dist/components/gov-pagination.js +1 -1
  185. package/dist/components/gov-prompt.js +1 -1
  186. package/dist/components/gov-side-nav-item.js +1 -1
  187. package/dist/components/gov-side-nav.js +1 -1
  188. package/dist/components/gov-side-nav.js.map +1 -1
  189. package/dist/components/gov-skeleton.js +1 -1
  190. package/dist/components/gov-skeleton.js.map +1 -1
  191. package/dist/components/gov-stepper-item.js +1 -1
  192. package/dist/components/gov-stepper-item.js.map +1 -1
  193. package/dist/components/gov-tabs.js +1 -1
  194. package/dist/components/gov-tile.js +1 -1
  195. package/dist/components/gov-tile.js.map +1 -1
  196. package/dist/components/gov-toast.js +1 -1
  197. package/dist/components/{gov-wizzard-item.d.ts → gov-wizard-item.d.ts} +4 -4
  198. package/dist/components/gov-wizard-item.js +2 -0
  199. package/dist/components/gov-wizard-item.js.map +1 -0
  200. package/dist/components/{gov-wizzard.d.ts → gov-wizard.d.ts} +4 -4
  201. package/dist/components/gov-wizard.js +2 -0
  202. package/dist/components/gov-wizard.js.map +1 -0
  203. package/dist/components/{p-db22f9ce.js → p-04086571.js} +2 -2
  204. package/dist/components/{p-7bea2390.js → p-3b1801e4.js} +2 -2
  205. package/dist/components/{p-386409dc.js → p-3e8a9e92.js} +2 -2
  206. package/dist/components/{p-103c7bd5.js → p-49620025.js} +2 -2
  207. package/dist/components/p-6834d779.js +2 -0
  208. package/dist/components/p-6834d779.js.map +1 -0
  209. package/dist/components/p-74b2311a.js +2 -0
  210. package/dist/components/p-74b2311a.js.map +1 -0
  211. package/dist/components/{p-a20f1683.js → p-8d128f59.js} +2 -2
  212. package/dist/components/{p-ccc44ac1.js → p-8da17139.js} +2 -2
  213. package/dist/components/{p-cf493ba0.js → p-a2e601c5.js} +2 -2
  214. package/dist/components/p-a2e601c5.js.map +1 -0
  215. package/dist/components/p-ae894a40.js +2 -0
  216. package/dist/components/p-bacc5e05.js +2 -0
  217. package/dist/components/p-bacc5e05.js.map +1 -0
  218. package/dist/components/p-cac3881f.js +2 -0
  219. package/dist/components/p-cac3881f.js.map +1 -0
  220. package/dist/components/{p-c0e49b09.js → p-f33b16d3.js} +2 -2
  221. package/dist/core/core.esm.js +1 -1
  222. package/dist/core/core.esm.js.map +1 -1
  223. package/dist/core/{p-e39cd83c.entry.js → p-06699657.entry.js} +2 -2
  224. package/dist/core/{p-e39cd83c.entry.js.map → p-06699657.entry.js.map} +1 -1
  225. package/dist/core/{p-41f72892.entry.js → p-0c1697ce.entry.js} +2 -2
  226. package/dist/core/{p-9a3e3ace.entry.js → p-18ef9623.entry.js} +2 -2
  227. package/dist/core/{p-eda868dc.entry.js → p-22a86871.entry.js} +2 -2
  228. package/dist/core/{p-722218fd.entry.js → p-23385300.entry.js} +2 -2
  229. package/dist/core/{p-48349167.entry.js → p-33bf5974.entry.js} +2 -2
  230. package/dist/core/{p-9f541022.entry.js → p-3d0ab343.entry.js} +2 -2
  231. package/dist/core/{p-e0c04c5f.entry.js → p-41e88980.entry.js} +2 -2
  232. package/dist/core/{p-5a855a15.entry.js → p-42c1935f.entry.js} +2 -2
  233. package/dist/core/{p-de3dc437.entry.js → p-48cfc1c6.entry.js} +2 -2
  234. package/dist/core/p-4e3d3563.entry.js +2 -0
  235. package/dist/core/p-4e3d3563.entry.js.map +1 -0
  236. package/dist/core/p-5316e768.entry.js.map +1 -1
  237. package/dist/core/p-63839c58.entry.js +2 -0
  238. package/dist/core/p-63839c58.entry.js.map +1 -0
  239. package/dist/core/p-64f7e661.entry.js +2 -0
  240. package/dist/core/p-64f7e661.entry.js.map +1 -0
  241. package/dist/core/p-6834d779.js +2 -0
  242. package/dist/core/p-6834d779.js.map +1 -0
  243. package/dist/core/{p-9ad54c30.entry.js → p-70140f70.entry.js} +2 -2
  244. package/dist/core/p-74b2311a.js +2 -0
  245. package/dist/core/p-74b2311a.js.map +1 -0
  246. package/dist/core/p-74f0be51.entry.js +2 -0
  247. package/dist/core/p-74f0be51.entry.js.map +1 -0
  248. package/dist/core/{p-3d720d54.entry.js → p-7d61b13e.entry.js} +2 -2
  249. package/dist/core/p-7d61b13e.entry.js.map +1 -0
  250. package/dist/core/{p-a68547b1.entry.js → p-81643870.entry.js} +2 -2
  251. package/dist/core/{p-11be550d.entry.js → p-82f64673.entry.js} +2 -2
  252. package/dist/core/p-87aca157.entry.js +2 -0
  253. package/dist/core/p-87aca157.entry.js.map +1 -0
  254. package/dist/core/{p-fa71fb92.entry.js → p-9d72d80b.entry.js} +2 -2
  255. package/dist/core/{p-1ae47d62.entry.js → p-a5d00433.entry.js} +2 -2
  256. package/dist/core/{p-3bc977e2.entry.js → p-accf8575.entry.js} +2 -2
  257. package/dist/core/p-accf8575.entry.js.map +1 -0
  258. package/dist/core/p-ae894a40.js +2 -0
  259. package/dist/core/p-bd1cb5bd.entry.js +2 -0
  260. package/dist/core/p-bd1cb5bd.entry.js.map +1 -0
  261. package/dist/core/{p-7d680665.entry.js → p-bfb4d904.entry.js} +2 -2
  262. package/dist/core/p-cac3881f.js +2 -0
  263. package/dist/core/p-cac3881f.js.map +1 -0
  264. package/dist/core/{p-b5a560d2.entry.js → p-dfc080f2.entry.js} +2 -2
  265. package/dist/core/{p-e1b3c361.entry.js → p-e769f3ee.entry.js} +2 -2
  266. package/dist/core/p-ea4459ae.entry.js +2 -0
  267. package/dist/core/p-ea4459ae.entry.js.map +1 -0
  268. package/dist/core/p-ed724948.entry.js +2 -0
  269. package/dist/core/p-ed724948.entry.js.map +1 -0
  270. package/dist/core/{p-d921bd4b.entry.js → p-f0a5847a.entry.js} +2 -2
  271. package/dist/core/{p-5150efee.entry.js → p-fc853777.entry.js} +2 -2
  272. package/dist/esm/{constants-858966b9.js → constants-09bda759.js} +4 -4
  273. package/dist/esm/{constants-858966b9.js.map → constants-09bda759.js.map} +1 -1
  274. package/dist/esm/constants-2499979c.js +24 -0
  275. package/dist/esm/constants-2499979c.js.map +1 -0
  276. package/dist/esm/core.js +1 -1
  277. package/dist/esm/gov-accordion-item.entry.js +3 -3
  278. package/dist/esm/gov-accordion-item.entry.js.map +1 -1
  279. package/dist/esm/gov-accordion.entry.js +4 -4
  280. package/dist/esm/gov-accordion.entry.js.map +1 -1
  281. package/dist/esm/gov-alert.entry.js +2 -2
  282. package/dist/esm/gov-app.entry.js +120 -60
  283. package/dist/esm/gov-app.entry.js.map +1 -1
  284. package/dist/esm/gov-attachments_3.entry.js +2 -2
  285. package/dist/esm/gov-backdrop.entry.js +2 -2
  286. package/dist/esm/gov-badge.entry.js +1 -1
  287. package/dist/esm/gov-badge.entry.js.map +1 -1
  288. package/dist/esm/gov-breadcrumbs.entry.js +2 -2
  289. package/dist/esm/gov-button.entry.js +2 -2
  290. package/dist/esm/gov-card.entry.js +2 -2
  291. package/dist/esm/gov-form-checkbox.entry.js +2 -2
  292. package/dist/esm/gov-form-file.entry.js +8 -2
  293. package/dist/esm/gov-form-file.entry.js.map +1 -1
  294. package/dist/esm/gov-form-group.entry.js +1 -1
  295. package/dist/esm/gov-form-group.entry.js.map +1 -1
  296. package/dist/esm/gov-form-input.entry.js +2 -2
  297. package/dist/esm/gov-form-multi-select.entry.js +2 -2
  298. package/dist/esm/gov-form-radio.entry.js +2 -2
  299. package/dist/esm/gov-form-select.entry.js +2 -2
  300. package/dist/esm/gov-form-switch.entry.js +2 -2
  301. package/dist/esm/gov-icon.entry.js +22 -15
  302. package/dist/esm/gov-icon.entry.js.map +1 -1
  303. package/dist/esm/gov-message.entry.js +1 -1
  304. package/dist/esm/gov-message.entry.js.map +1 -1
  305. package/dist/esm/gov-modal.entry.js +2 -2
  306. package/dist/esm/gov-nav.entry.js +2 -2
  307. package/dist/esm/gov-pagination.entry.js +2 -2
  308. package/dist/esm/gov-prompt.entry.js +2 -2
  309. package/dist/esm/gov-side-nav.entry.js +2 -2
  310. package/dist/esm/gov-skeleton.entry.js +2 -2
  311. package/dist/esm/gov-stepper-item.entry.js +1 -1
  312. package/dist/esm/gov-stepper-item.entry.js.map +1 -1
  313. package/dist/esm/gov-tabs.entry.js +2 -2
  314. package/dist/esm/gov-tile.entry.js +2 -15
  315. package/dist/esm/gov-tile.entry.js.map +1 -1
  316. package/dist/esm/gov-wizard-item.entry.js +110 -0
  317. package/dist/esm/gov-wizard-item.entry.js.map +1 -0
  318. package/dist/esm/{gov-wizzard.entry.js → gov-wizard.entry.js} +13 -13
  319. package/dist/esm/gov-wizard.entry.js.map +1 -0
  320. package/dist/esm/index-ae3c50f1.js +4 -4
  321. package/dist/esm/loader.js +1 -1
  322. package/dist/esm/{wcag-afdfdddb.js → wcag-062e7ca9.js} +2 -2
  323. package/dist/esm/{wcag-afdfdddb.js.map → wcag-062e7ca9.js.map} +1 -1
  324. package/dist/esm/{win-7a1a8ac8.js → win-0a50f66e.js} +4 -2
  325. package/dist/esm/win-0a50f66e.js.map +1 -0
  326. package/dist/hydrate/index.js +192 -129
  327. package/dist/stencil.config.js +3 -3
  328. package/dist/stencil.config.js.map +1 -1
  329. package/dist/types/components/gov-accordion/constants.d.ts +3 -3
  330. package/dist/types/components/gov-app/gov-app.d.ts +1 -1
  331. package/dist/types/components/gov-form/file/gov-form-file.d.ts +4 -0
  332. package/dist/types/components/gov-icon/gov-icon.d.ts +1 -1
  333. package/dist/types/components/gov-message/gov-message.d.ts +1 -1
  334. package/dist/types/components/gov-tile/gov-tile.d.ts +4 -4
  335. package/dist/types/components/{gov-wizzard → gov-wizard}/constants.d.ts +2 -2
  336. package/dist/types/components/gov-wizard/gov-wizard-item.d.d.ts +4 -0
  337. package/dist/types/components/{gov-wizzard/gov-wizzard-item.d.ts → gov-wizard/gov-wizard-item.d.ts} +13 -13
  338. package/dist/types/components/{gov-wizzard/gov-wizzard-item.types.d.ts → gov-wizard/gov-wizard-item.types.d.ts} +1 -1
  339. package/dist/types/components/{gov-wizzard/gov-wizzard.d.ts → gov-wizard/gov-wizard.d.ts} +7 -7
  340. package/dist/types/components.d.ts +64 -58
  341. package/dist/types/helpers/Dom/win.d.ts +2 -0
  342. package/dist/types/pages/Wizard.d.ts +3 -0
  343. package/package.json +1 -1
  344. package/dist/cjs/constants-21559414.js +0 -29
  345. package/dist/cjs/constants-21559414.js.map +0 -1
  346. package/dist/cjs/gov-wizzard-item.cjs.entry.js +0 -114
  347. package/dist/cjs/gov-wizzard-item.cjs.entry.js.map +0 -1
  348. package/dist/cjs/gov-wizzard.cjs.entry.js.map +0 -1
  349. package/dist/cjs/win-53f637d4.js.map +0 -1
  350. package/dist/collection/components/gov-wizzard/constants.js +0 -20
  351. package/dist/collection/components/gov-wizzard/constants.js.map +0 -1
  352. package/dist/collection/components/gov-wizzard/gov-wizzard-item.css +0 -471
  353. package/dist/collection/components/gov-wizzard/gov-wizzard-item.d.js +0 -2
  354. package/dist/collection/components/gov-wizzard/gov-wizzard-item.d.js.map +0 -1
  355. package/dist/collection/components/gov-wizzard/gov-wizzard-item.js.map +0 -1
  356. package/dist/collection/components/gov-wizzard/gov-wizzard-item.types.js +0 -2
  357. package/dist/collection/components/gov-wizzard/gov-wizzard-item.types.js.map +0 -1
  358. package/dist/collection/components/gov-wizzard/gov-wizzard.js.map +0 -1
  359. package/dist/collection/pages/Wizzard.js.map +0 -1
  360. package/dist/components/gov-wizzard-item.js +0 -2
  361. package/dist/components/gov-wizzard-item.js.map +0 -1
  362. package/dist/components/gov-wizzard.js +0 -2
  363. package/dist/components/gov-wizzard.js.map +0 -1
  364. package/dist/components/p-0f5e2b0a.js +0 -2
  365. package/dist/components/p-34152b51.js +0 -2
  366. package/dist/components/p-34152b51.js.map +0 -1
  367. package/dist/components/p-37a7409e.js +0 -2
  368. package/dist/components/p-37a7409e.js.map +0 -1
  369. package/dist/components/p-64ced668.js +0 -2
  370. package/dist/components/p-64ced668.js.map +0 -1
  371. package/dist/components/p-c3f560b9.js +0 -2
  372. package/dist/components/p-c3f560b9.js.map +0 -1
  373. package/dist/components/p-cf493ba0.js.map +0 -1
  374. package/dist/core/p-05dc3d89.entry.js +0 -2
  375. package/dist/core/p-05dc3d89.entry.js.map +0 -1
  376. package/dist/core/p-0f5e2b0a.js +0 -2
  377. package/dist/core/p-16c3a489.entry.js +0 -2
  378. package/dist/core/p-16c3a489.entry.js.map +0 -1
  379. package/dist/core/p-2c7af892.entry.js +0 -2
  380. package/dist/core/p-2c7af892.entry.js.map +0 -1
  381. package/dist/core/p-34152b51.js +0 -2
  382. package/dist/core/p-34152b51.js.map +0 -1
  383. package/dist/core/p-37a7409e.js +0 -2
  384. package/dist/core/p-37a7409e.js.map +0 -1
  385. package/dist/core/p-3bc977e2.entry.js.map +0 -1
  386. package/dist/core/p-3d720d54.entry.js.map +0 -1
  387. package/dist/core/p-5195fd36.entry.js +0 -2
  388. package/dist/core/p-5195fd36.entry.js.map +0 -1
  389. package/dist/core/p-64ced668.js +0 -2
  390. package/dist/core/p-64ced668.js.map +0 -1
  391. package/dist/core/p-9751af2e.entry.js +0 -2
  392. package/dist/core/p-9751af2e.entry.js.map +0 -1
  393. package/dist/core/p-ac94d242.entry.js +0 -2
  394. package/dist/core/p-ac94d242.entry.js.map +0 -1
  395. package/dist/core/p-af7a89bc.entry.js +0 -2
  396. package/dist/core/p-af7a89bc.entry.js.map +0 -1
  397. package/dist/core/p-d2729599.entry.js +0 -2
  398. package/dist/core/p-d2729599.entry.js.map +0 -1
  399. package/dist/esm/constants-bf5a583f.js +0 -24
  400. package/dist/esm/constants-bf5a583f.js.map +0 -1
  401. package/dist/esm/gov-wizzard-item.entry.js +0 -110
  402. package/dist/esm/gov-wizzard-item.entry.js.map +0 -1
  403. package/dist/esm/gov-wizzard.entry.js.map +0 -1
  404. package/dist/esm/win-7a1a8ac8.js.map +0 -1
  405. package/dist/types/components/gov-wizzard/gov-wizzard-item.d.d.ts +0 -4
  406. package/dist/types/pages/Wizzard.d.ts +0 -3
  407. /package/dist/components/{p-db22f9ce.js.map → p-04086571.js.map} +0 -0
  408. /package/dist/components/{p-7bea2390.js.map → p-3b1801e4.js.map} +0 -0
  409. /package/dist/components/{p-386409dc.js.map → p-3e8a9e92.js.map} +0 -0
  410. /package/dist/components/{p-103c7bd5.js.map → p-49620025.js.map} +0 -0
  411. /package/dist/components/{p-a20f1683.js.map → p-8d128f59.js.map} +0 -0
  412. /package/dist/components/{p-ccc44ac1.js.map → p-8da17139.js.map} +0 -0
  413. /package/dist/components/{p-0f5e2b0a.js.map → p-ae894a40.js.map} +0 -0
  414. /package/dist/components/{p-c0e49b09.js.map → p-f33b16d3.js.map} +0 -0
  415. /package/dist/core/{p-41f72892.entry.js.map → p-0c1697ce.entry.js.map} +0 -0
  416. /package/dist/core/{p-9a3e3ace.entry.js.map → p-18ef9623.entry.js.map} +0 -0
  417. /package/dist/core/{p-eda868dc.entry.js.map → p-22a86871.entry.js.map} +0 -0
  418. /package/dist/core/{p-722218fd.entry.js.map → p-23385300.entry.js.map} +0 -0
  419. /package/dist/core/{p-48349167.entry.js.map → p-33bf5974.entry.js.map} +0 -0
  420. /package/dist/core/{p-9f541022.entry.js.map → p-3d0ab343.entry.js.map} +0 -0
  421. /package/dist/core/{p-e0c04c5f.entry.js.map → p-41e88980.entry.js.map} +0 -0
  422. /package/dist/core/{p-5a855a15.entry.js.map → p-42c1935f.entry.js.map} +0 -0
  423. /package/dist/core/{p-de3dc437.entry.js.map → p-48cfc1c6.entry.js.map} +0 -0
  424. /package/dist/core/{p-9ad54c30.entry.js.map → p-70140f70.entry.js.map} +0 -0
  425. /package/dist/core/{p-a68547b1.entry.js.map → p-81643870.entry.js.map} +0 -0
  426. /package/dist/core/{p-11be550d.entry.js.map → p-82f64673.entry.js.map} +0 -0
  427. /package/dist/core/{p-fa71fb92.entry.js.map → p-9d72d80b.entry.js.map} +0 -0
  428. /package/dist/core/{p-1ae47d62.entry.js.map → p-a5d00433.entry.js.map} +0 -0
  429. /package/dist/core/{p-0f5e2b0a.js.map → p-ae894a40.js.map} +0 -0
  430. /package/dist/core/{p-7d680665.entry.js.map → p-bfb4d904.entry.js.map} +0 -0
  431. /package/dist/core/{p-b5a560d2.entry.js.map → p-dfc080f2.entry.js.map} +0 -0
  432. /package/dist/core/{p-e1b3c361.entry.js.map → p-e769f3ee.entry.js.map} +0 -0
  433. /package/dist/core/{p-d921bd4b.entry.js.map → p-f0a5847a.entry.js.map} +0 -0
  434. /package/dist/core/{p-5150efee.entry.js.map → p-fc853777.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"gov-badge.js","sourceRoot":"","sources":["../../../../../../src/components/gov-badge/gov-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAErG,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAmB,MAAM,aAAa,CAAA;AACrE,OAAO,EACN,WAAW,EAEX,cAAc,GAEd,MAAM,iCAAiC,CAAA;AAMxC,MAAM,OAAO,QAAQ;EAIpB;mBASoC,KAAK;oBAKJ,KAAK;;;gBAcD,WAAW,CAAC,EAAE;eAIf,MAAM;mBAIA,cAAc,CAAC,OAAO;;IAnCnE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EA8CD,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,cAAc,EAAE,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;EACxD,CAAC;EAGD,YAAY,CAAC,QAAgB;IAC5B,YAAY,CAAC,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;EACrD,CAAC;EAED,iBAAiB;IAChB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAClC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;EAC7B,CAAC;EAED,MAAM;IACL,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,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W,GAAQ;QAC9D,eAAQ;QACP,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,YAAM,IAAI,EAAC,YAAY,GAAQ;QAC/D,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,YAAM,IAAI,EAAC,OAAO,GAAQ,CACjD,CACA,CACP,CAAA;EACF,CAAC;EAEO,cAAc,CAAC,CAAe;IACrC,CAAC,CAAC,eAAe,EAAE,CAAA;IACnB,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,IAAI,IAAI,CAAC,GAAG,KAAK,UAAU,CAAC,MAAM,EAAE;MAC9D,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KACrB;EACF,CAAC;EAED;;KAEG;EAEH,KAAK,CAAC,aAAa;IAClB,OAAO,IAAI,CAAC,UAAU,CAAA;EACvB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { BadgeClass, NativeType, NativeTypesType } from \"./constants\"\nimport {\n\tButtonSizes,\n\tButtonSizesType,\n\tButtonVariants,\n\tButtonVariantType,\n} from \"../gov-button/default/constants\"\n\n@Component({\n\ttag: \"gov-badge\",\n\tstyleUrl: \"gov-badge.scss\",\n})\nexport class GovBadge {\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement | HTMLSpanElement\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovBadgeElement\n\n\t/**\n\t * Determine if component should have inverse colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Makes the badge component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target: string\n\t/**\n\t * Badge’s size.\n\t */\n\t@Prop() readonly size: ButtonSizesType = ButtonSizes._M\n\t/**\n\t * Used to change the HTML tag in the badge\n\t */\n\t@Prop() readonly tag: NativeTypesType = \"span\"\n\t/**\n\t * Style variation of the badge.\n\t */\n\t@Prop() readonly variant: ButtonVariantType = ButtonVariants.PRIMARY\n\t/**\n\t * Adds accessible label for the button that is only shown for screen readers.\n\t * Typically, this label text replaces the visible text on the button for users who use assistive technology.\n\t */\n\t@Prop({ attribute: \"wcag-label\" }) readonly wcagLabel: string\n\t/**\n\t * Emitted when the button click.\n\t */\n\t@Event({ eventName: \"gov-click\" }) govClick: EventEmitter<PointerEvent>\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(ButtonVariants, newValue, BadgeClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ButtonSizes, newValue, BadgeClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? NativeType.A : this.tag\n\t\tconst nativeType = Tag == NativeType.BUTTON ? NativeType.BUTTON : undefined\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes([\n\t\t\t\t\tBadgeClass.root,\n\t\t\t\t\tthis.h.hasSlot(\"right\") ? BadgeClass.hasRight : undefined,\n\t\t\t\t\tthis.h.hasSlot(\"left\") ? BadgeClass.hasLeft : undefined,\n\t\t\t\t])}\n\t\t\t\tdisabled={this.disabled}\n\t\t\t\thref={this.href}\n\t\t\t\tvariant={this.variant}\n\t\t\t\tsize={this.size}\n\t\t\t\tinverse={this.inverse}\n\t\t\t\thoverable={Tag == NativeType.A || Tag == NativeType.BUTTON}\n\t\t\t>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLLinkElement | HTMLButtonElement | HTMLSpanElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\ttype={nativeType}>\n\t\t\t\t\t{this.h.hasSlot(\"left\") && <slot name=\"left\"></slot>}\n\t\t\t\t\t{this.h.hasSlot(\"left-icon\") && <slot name=\"left-icon\"></slot>}\n\t\t\t\t\t<slot />\n\t\t\t\t\t{this.h.hasSlot(\"right-icon\") && <slot name=\"right-icon\"></slot>}\n\t\t\t\t\t{this.h.hasSlot(\"right\") && <slot name=\"right\"></slot>}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false && this.tag === NativeType.BUTTON) {\n\t\t\tthis.govClick.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync getTriggerRef() {\n\t\treturn this.triggerRef\n\t}\n}\n"]}
1
+ {"version":3,"file":"gov-badge.js","sourceRoot":"","sources":["../../../../../../src/components/gov-badge/gov-badge.tsx"],"names":[],"m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,YAAM,IAAI,EAAC,YAAY,GAAQ;QAC/D,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,YAAM,IAAI,EAAC,OAAO,GAAQ,CACjD,CACA,CACP,CAAA;EACF,CAAC;EAEO,cAAc,CAAC,CAAe;IACrC,CAAC,CAAC,eAAe,EAAE,CAAA;IACnB,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,IAAI,IAAI,CAAC,GAAG,KAAK,UAAU,CAAC,MAAM,EAAE;MAC9D,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KACrB;EACF,CAAC;EAED;;KAEG;EAEH,KAAK,CAAC,aAAa;IAClB,OAAO,IAAI,CAAC,UAAU,CAAA;EACvB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { BadgeClass, NativeType, NativeTypesType } from \"./constants\"\nimport { ButtonSizes, ButtonSizesType, ButtonVariants, ButtonVariantType } from \"../gov-button/default/constants\"\n\n@Component({\n\ttag: \"gov-badge\",\n\tstyleUrl: \"gov-badge.scss\",\n})\nexport class GovBadge {\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement | HTMLSpanElement\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovBadgeElement\n\n\t/**\n\t * Determine if component should have inverse colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Makes the badge component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target: string\n\t/**\n\t * Badge’s size.\n\t */\n\t@Prop() readonly size: ButtonSizesType = ButtonSizes._M\n\t/**\n\t * Used to change the HTML tag in the badge\n\t */\n\t@Prop() readonly tag: NativeTypesType = \"span\"\n\t/**\n\t * Style variation of the badge.\n\t */\n\t@Prop() readonly variant: ButtonVariantType = ButtonVariants.PRIMARY\n\t/**\n\t * Adds accessible label for the button that is only shown for screen readers.\n\t * Typically, this label text replaces the visible text on the button for users who use assistive technology.\n\t */\n\t@Prop({ attribute: \"wcag-label\" }) readonly wcagLabel: string\n\t/**\n\t * Emitted when the button click.\n\t */\n\t@Event({ eventName: \"gov-click\" }) govClick: EventEmitter<PointerEvent>\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(ButtonVariants, newValue, BadgeClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(ButtonSizes, newValue, BadgeClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? NativeType.A : this.tag\n\t\tconst nativeType = Tag == NativeType.BUTTON ? NativeType.BUTTON : undefined\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes([\n\t\t\t\t\tBadgeClass.root,\n\t\t\t\t\tthis.h.hasSlot(\"right\") ? BadgeClass.hasRight : undefined,\n\t\t\t\t\tthis.h.hasSlot(\"left\") ? BadgeClass.hasLeft : undefined,\n\t\t\t\t])}\n\t\t\t\tdisabled={this.disabled}\n\t\t\t\thref={this.href}\n\t\t\t\tvariant={this.variant}\n\t\t\t\ttype={this.inverse ? undefined : \"solid\"}\n\t\t\t\tsize={this.size}\n\t\t\t\tinverse={this.inverse}\n\t\t\t\thoverable={Tag == NativeType.A || Tag == NativeType.BUTTON}\n\t\t\t>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLLinkElement | HTMLButtonElement | HTMLSpanElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\ttype={nativeType}>\n\t\t\t\t\t{this.h.hasSlot(\"left\") && <slot name=\"left\"></slot>}\n\t\t\t\t\t{this.h.hasSlot(\"left-icon\") && <slot name=\"left-icon\"></slot>}\n\t\t\t\t\t<slot />\n\t\t\t\t\t{this.h.hasSlot(\"right-icon\") && <slot name=\"right-icon\"></slot>}\n\t\t\t\t\t{this.h.hasSlot(\"right\") && <slot name=\"right\"></slot>}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false && this.tag === NativeType.BUTTON) {\n\t\t\tthis.govClick.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync getTriggerRef() {\n\t\treturn this.triggerRef\n\t}\n}\n"]}
@@ -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
@@ -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
@@ -155,6 +155,12 @@ export class GovFormFile {
155
155
  async getAreaRef() {
156
156
  return this.areaRef;
157
157
  }
158
+ /**
159
+ * Remove all files from component state
160
+ */
161
+ async reset() {
162
+ this.files = [];
163
+ }
158
164
  /**
159
165
  * Validate the WCAG attributes of the component
160
166
  */
@@ -640,6 +646,23 @@ export class GovFormFile {
640
646
  "tags": []
641
647
  }
642
648
  },
649
+ "reset": {
650
+ "complexType": {
651
+ "signature": "() => Promise<void>",
652
+ "parameters": [],
653
+ "references": {
654
+ "Promise": {
655
+ "location": "global",
656
+ "id": "global::Promise"
657
+ }
658
+ },
659
+ "return": "Promise<void>"
660
+ },
661
+ "docs": {
662
+ "text": "Remove all files from component state",
663
+ "tags": []
664
+ }
665
+ },
643
666
  "validateWcag": {
644
667
  "complexType": {
645
668
  "signature": "() => Promise<void>",
@@ -1 +1 @@
1
- {"version":3,"file":"gov-form-file.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/file/gov-form-file.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,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AACxF,OAAO,EAAE,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CAAC,cAAc,EAAE,aAAa,CAAC,IAAI,CAAC,CAAA;EAC9F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { createID } from \"../../../utils/string.utils\"\nimport { FormFileClass } from \"./constants\"\nimport { govHost, toBoolAttr, toBoolAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { validateWcagLabelFor, validateWcagRef } from \"../../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\nimport { fileAcceptValidation, fileSizeValidation, formatBytes } from \"../../../utils/file.utils\"\nimport { delay } from \"../../../utils/utils\"\nimport { GovForm } from \"../../../helpers/Dom/form.types\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { govForm } from \"../../../helpers/Dom/form\"\nimport { GovFormFileEvent, GovFormFileItem } from \"./gov-form-file.types\"\n\n@Component({\n\ttag: \"gov-form-file\",\n\tstyleUrl: \"gov-form-file.scss\",\n})\nexport class GovFormFile {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\n\tprivate areaRef?: HTMLDivElement\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly fileId: string\n\n\tconstructor() {\n\t\tthis.fileId = createID(\"GovInputFile\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormFileElement\n\t/**\n\t * Expands the file input to fill 100% of the container width.\n\t */\n\t@Prop() readonly expanded: boolean = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the File component disabled.\n\t * This prevents users from being able to interact with the File, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean\n\t/**\n\t * Show list of attachments\n\t */\n\t@Prop({ attribute: \"display-attachments\" }) readonly displayAttachments: boolean = true\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept\n\t */\n\t@Prop() readonly accept: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/multiple\n\t */\n\t@Prop() readonly multiple: boolean = false\n\t/**\n\t * Maximum embedded file size\n\t */\n\t@Prop({ attribute: \"max-file-size\" }) readonly maxFileSize: number = -1\n\t/**\n\t * Custom File identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Error message when the maximum file size is exceeded\n\t */\n\t@Prop({ attribute: \"error-size\" }) readonly errorSize: string = \"Soubor je větší než povolená velikost {FILE_SIZE}\"\n\t/**\n\t * Insert unsupported file error message\n\t */\n\t@Prop({ attribute: \"error-accept\" }) readonly errorAccept: string = \"Soubor tohoto typu není povolen\"\n\t/**\n\t * Description of the list of attachments\n\t */\n\t@Prop({ attribute: \"attachments-label\" }) readonly attachmentsLabel: string = \"Přílohy\"\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 * Adds accessible label for the remove button that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: \"wcag-remove-label\" }) readonly wcagRemoveLabel: string = \"Odebrat soubor {FILE_NAME}\"\n\t/**\n\t * Adds accessible label for the list of attachments.\n\t */\n\t@Prop({ attribute: \"wcag-attachments-label\" }) readonly wcagAttachmentsLabel: string = \"Přílohy\"\n\t/**\n\t * Emitted when the File has focus.\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Emitted when the File loses focus.\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when the list of inserted files is changed\n\t */\n\t@Event({ eventName: \"gov-files\" }) govFiles: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when a new file is added\n\t */\n\t@Event({ eventName: \"gov-add-file\" }) govAddFile: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when a file is removed from the list\n\t */\n\t@Event({ eventName: \"gov-remove-file\" }) govRemoveFile: EventEmitter<GovFormFileEvent>\n\n\t@State() files: GovFormFileItem[] = []\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", \"File\")\n\t}\n\n\n\tprivate registerListeners() {\n\t\tfunction highlight() {\n\t\t\tthis.areaRef.classList.add(\"highlight\")\n\t\t}\n\n\t\tfunction unhighlight() {\n\t\t\tthis.areaRef.classList.remove(\"highlight\")\n\t\t}\n\n\t\tthis.inputRef.addEventListener(\n\t\t\t\"change\",\n\t\t\te => {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopPropagation()\n\t\t\t\tconst files = (e.target as HTMLInputElement).files\n\t\t\t\tthis.validateFiles(files)\n\t\t\t},\n\t\t\tfalse,\n\t\t)\n\t\t//this.inputRef.addEventListener('focus')\n\n\t\tif (this.expanded) {\n\t\t\tconst events = [\"dragover\", \"dragleave\"]\n\t\t\tconst inEvents = [\"dragenter\", \"dragover\", \"mouseenter\"]\n\t\t\tconst outEvents = [\"dragleave\", \"drop\", \"mouseleave\"]\n\n\t\t\tevents.map(eventName => this.inputRef.addEventListener(eventName, this.preventDefaults.bind(this), false))\n\t\t\tinEvents.map(eventName => this.inputRef.addEventListener(eventName, highlight.bind(this), false))\n\t\t\toutEvents.forEach(eventName => this.inputRef.addEventListener(eventName, unhighlight.bind(this), false))\n\n\t\t\tthis.areaRef.addEventListener(\"drop\", this.handleDrop.bind(this), false)\n\t\t}\n\t}\n\n\tpreventDefaults(e) {\n\t\te.preventDefault()\n\t\te.stopPropagation()\n\t}\n\n\thandleDrop(e: DragEvent) {\n\t\tconst dataTransfer = e.dataTransfer\n\t\tthis.validateFiles(dataTransfer.files)\n\t}\n\n\tprivate validateFiles(files: FileList) {\n\t\tArray.from(files).map(file => {\n\t\t\tconst isFile = this.files.find(item => item.file.name === file.name && item.file.size === file.size) || null\n\t\t\tif (isFile === null) {\n\t\t\t\tconst isSizeValid = typeof this.maxFileSize === \"number\" && this.maxFileSize > 0 ? fileSizeValidation(file, this.maxFileSize) : true\n\t\t\t\tconst isAcceptValid = fileAcceptValidation(file, this.accept)\n\t\t\t\tconst newFile = {\n\t\t\t\t\tid: createID(\"GovFormFile\"),\n\t\t\t\t\tfile,\n\t\t\t\t\tacceptValid: isAcceptValid,\n\t\t\t\t\tsizeValid: isSizeValid,\n\t\t\t\t}\n\t\t\t\tthis.files = [...this.files, newFile]\n\t\t\t\tthis.govAddFile.emit({\n\t\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\t\tfile: newFile,\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\t\tthis.govFiles.emit({\n\t\t\tcomponent: FormFileClass.root,\n\t\t\tfiles: this.files,\n\t\t})\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.watchDisabled()\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\n\t\tthis.registerListeners()\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes([FormFileClass.root])} invalid={toBoolAttrIfDefined(this.invalid)} expanded={toBoolAttrIfDefined(this.expanded)}>\n\t\t\t\t<div class={FormFileClass.area} ref={el => (this.areaRef = el as HTMLDivElement)}>\n\t\t\t\t\t<slot />\n\t\t\t\t\t<input\n\t\t\t\t\t\tclass={FormFileClass.input}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tid={this.identifier || this.fileId}\n\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\taccept={this.accept}\n\t\t\t\t\t\tmultiple={this.multiple}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot(\"attachments\") ? (\n\t\t\t\t\t<div class={FormFileClass.attachments}>\n\t\t\t\t\t\t<slot name={\"attachments\"} />\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\n\t\t\t\t{this.files.length && this.displayAttachments ? (\n\t\t\t\t\t<div class={FormFileClass.attachments}>\n\t\t\t\t\t\t<gov-attachments label={this.wcagAttachmentsLabel} wcag-label={this.wcagAttachmentsLabel}>\n\t\t\t\t\t\t\t{this.files.map(item => (\n\t\t\t\t\t\t\t\t<gov-attachments-item wcag-remove-labelled-by={item.id} on-gov-remove={() => this.onRemoveFileHandler(item)}>\n\t\t\t\t\t\t\t\t\t<span class={\"sr-only\"} id={item.id}>\n\t\t\t\t\t\t\t\t\t\t{this.wcagRemoveLabel.replace(\"{FILE_NAME}\", item.file.name)}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{item.file.name}\n\t\t\t\t\t\t\t\t\t{item.acceptValid === false ? (\n\t\t\t\t\t\t\t\t\t\t<gov-form-message slot=\"message\" variant=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon\" name=\"exclamation-triangle-fill\"></gov-icon>\n\t\t\t\t\t\t\t\t\t\t\t{item.acceptValid === false ? this.errorAccept : null}\n\t\t\t\t\t\t\t\t\t\t</gov-form-message>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t{item.sizeValid === false ? (\n\t\t\t\t\t\t\t\t\t\t<gov-form-message slot=\"message\" variant=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon\" name=\"exclamation-triangle-fill\"></gov-icon>\n\t\t\t\t\t\t\t\t\t\t\t{this.errorSize.replace(\"{FILE_SIZE}\", formatBytes(this.maxFileSize))}\n\t\t\t\t\t\t\t\t\t\t</gov-form-message>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t<span slot=\"info\">({formatBytes(item.file.size)})</span>\n\t\t\t\t\t\t\t\t</gov-attachments-item>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</gov-attachments>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onRemoveFileHandler(file: GovFormFileItem) {\n\t\tconst index = this.files.findIndex(item => item.id === file.id)\n\t\tif (index !== -1) {\n\t\t\tconst files = this.files\n\t\t\tconst removeFile = this.files[index]\n\t\t\tfiles.splice(index, 1)\n\t\t\tthis.files = [...files]\n\t\t\tthis.govRemoveFile.emit({\n\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\tfile: removeFile,\n\t\t\t})\n\t\t\tthis.govFiles.emit({\n\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\tfiles,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormFileClass.root,\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: FormFileClass.root,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\te.stopPropagation()\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Returns the reference of the native area element\n\t */\n\t@Method()\n\tasync getAreaRef(): Promise<HTMLDivElement> {\n\t\treturn this.areaRef\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\", FormFileClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormFileClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.fileId, this.wcagLabelledBy, FormFileClass.root)\n\t}\n}\n"]}
1
+ {"version":3,"file":"gov-form-file.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/file/gov-form-file.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,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AACxF,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACjG,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAG5C,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAOnD,MAAM,OAAO,WAAW;EAQvB;oBAWqC,KAAK;oBAKL,KAAK;;8BASyC,IAAI;;;oBAclD,KAAK;uBAI2B,CAAC,CAAC;;;qBAYP,mDAAmD;uBAI/C,iCAAiC;4BAIvB,SAAS;;;2BAYV,4BAA4B;gCAIlB,SAAS;iBAsB5D,EAAE;IApGrC,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAA;IAEtC,IAAI,CAAC,CAAC,GAAG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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { createID } from \"../../../utils/string.utils\"\nimport { FormFileClass } from \"./constants\"\nimport { govHost, toBoolAttr, toBoolAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { validateWcagLabelFor, validateWcagRef } from \"../../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\nimport { fileAcceptValidation, fileSizeValidation, formatBytes } from \"../../../utils/file.utils\"\nimport { delay } from \"../../../utils/utils\"\nimport { GovForm } from \"../../../helpers/Dom/form.types\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { govForm } from \"../../../helpers/Dom/form\"\nimport { GovFormFileEvent, GovFormFileItem } from \"./gov-form-file.types\"\n\n@Component({\n\ttag: \"gov-form-file\",\n\tstyleUrl: \"gov-form-file.scss\",\n})\nexport class GovFormFile {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\n\tprivate areaRef?: HTMLDivElement\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly fileId: string\n\n\tconstructor() {\n\t\tthis.fileId = createID(\"GovInputFile\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormFileElement\n\t/**\n\t * Expands the file input to fill 100% of the container width.\n\t */\n\t@Prop() readonly expanded: boolean = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the File component disabled.\n\t * This prevents users from being able to interact with the File, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean\n\t/**\n\t * Show list of attachments\n\t */\n\t@Prop({ attribute: \"display-attachments\" }) readonly displayAttachments: boolean = true\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept\n\t */\n\t@Prop() readonly accept: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/multiple\n\t */\n\t@Prop() readonly multiple: boolean = false\n\t/**\n\t * Maximum embedded file size\n\t */\n\t@Prop({ attribute: \"max-file-size\" }) readonly maxFileSize: number = -1\n\t/**\n\t * Custom File identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Error message when the maximum file size is exceeded\n\t */\n\t@Prop({ attribute: \"error-size\" }) readonly errorSize: string = \"Soubor je větší než povolená velikost {FILE_SIZE}\"\n\t/**\n\t * Insert unsupported file error message\n\t */\n\t@Prop({ attribute: \"error-accept\" }) readonly errorAccept: string = \"Soubor tohoto typu není povolen\"\n\t/**\n\t * Description of the list of attachments\n\t */\n\t@Prop({ attribute: \"attachments-label\" }) readonly attachmentsLabel: string = \"Přílohy\"\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 * Adds accessible label for the remove button that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: \"wcag-remove-label\" }) readonly wcagRemoveLabel: string = \"Odebrat soubor {FILE_NAME}\"\n\t/**\n\t * Adds accessible label for the list of attachments.\n\t */\n\t@Prop({ attribute: \"wcag-attachments-label\" }) readonly wcagAttachmentsLabel: string = \"Přílohy\"\n\t/**\n\t * Emitted when the File has focus.\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Emitted when the File loses focus.\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when the list of inserted files is changed\n\t */\n\t@Event({ eventName: \"gov-files\" }) govFiles: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when a new file is added\n\t */\n\t@Event({ eventName: \"gov-add-file\" }) govAddFile: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when a file is removed from the list\n\t */\n\t@Event({ eventName: \"gov-remove-file\" }) govRemoveFile: EventEmitter<GovFormFileEvent>\n\n\t@State() files: GovFormFileItem[] = []\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", \"File\")\n\t}\n\n\n\tprivate registerListeners() {\n\t\tfunction highlight() {\n\t\t\tthis.areaRef.classList.add(\"highlight\")\n\t\t}\n\n\t\tfunction unhighlight() {\n\t\t\tthis.areaRef.classList.remove(\"highlight\")\n\t\t}\n\n\t\tthis.inputRef.addEventListener(\n\t\t\t\"change\",\n\t\t\te => {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopPropagation()\n\t\t\t\tconst files = (e.target as HTMLInputElement).files\n\t\t\t\tthis.validateFiles(files)\n\t\t\t},\n\t\t\tfalse,\n\t\t)\n\t\t//this.inputRef.addEventListener('focus')\n\n\t\tif (this.expanded) {\n\t\t\tconst events = [\"dragover\", \"dragleave\"]\n\t\t\tconst inEvents = [\"dragenter\", \"dragover\", \"mouseenter\"]\n\t\t\tconst outEvents = [\"dragleave\", \"drop\", \"mouseleave\"]\n\n\t\t\tevents.map(eventName => this.inputRef.addEventListener(eventName, this.preventDefaults.bind(this), false))\n\t\t\tinEvents.map(eventName => this.inputRef.addEventListener(eventName, highlight.bind(this), false))\n\t\t\toutEvents.forEach(eventName => this.inputRef.addEventListener(eventName, unhighlight.bind(this), false))\n\n\t\t\tthis.areaRef.addEventListener(\"drop\", this.handleDrop.bind(this), false)\n\t\t}\n\t}\n\n\tpreventDefaults(e) {\n\t\te.preventDefault()\n\t\te.stopPropagation()\n\t}\n\n\thandleDrop(e: DragEvent) {\n\t\tconst dataTransfer = e.dataTransfer\n\t\tthis.validateFiles(dataTransfer.files)\n\t}\n\n\tprivate validateFiles(files: FileList) {\n\t\tArray.from(files).map(file => {\n\t\t\tconst isFile = this.files.find(item => item.file.name === file.name && item.file.size === file.size) || null\n\t\t\tif (isFile === null) {\n\t\t\t\tconst isSizeValid = typeof this.maxFileSize === \"number\" && this.maxFileSize > 0 ? fileSizeValidation(file, this.maxFileSize) : true\n\t\t\t\tconst isAcceptValid = fileAcceptValidation(file, this.accept)\n\t\t\t\tconst newFile = {\n\t\t\t\t\tid: createID(\"GovFormFile\"),\n\t\t\t\t\tfile,\n\t\t\t\t\tacceptValid: isAcceptValid,\n\t\t\t\t\tsizeValid: isSizeValid,\n\t\t\t\t}\n\t\t\t\tthis.files = [...this.files, newFile]\n\t\t\t\tthis.govAddFile.emit({\n\t\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\t\tfile: newFile,\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\t\tthis.govFiles.emit({\n\t\t\tcomponent: FormFileClass.root,\n\t\t\tfiles: this.files,\n\t\t})\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.watchDisabled()\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\n\t\tthis.registerListeners()\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes([FormFileClass.root])} invalid={toBoolAttrIfDefined(this.invalid)} expanded={toBoolAttrIfDefined(this.expanded)}>\n\t\t\t\t<div class={FormFileClass.area} ref={el => (this.areaRef = el as HTMLDivElement)}>\n\t\t\t\t\t<slot />\n\t\t\t\t\t<input\n\t\t\t\t\t\tclass={FormFileClass.input}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tid={this.identifier || this.fileId}\n\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\taccept={this.accept}\n\t\t\t\t\t\tmultiple={this.multiple}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot(\"attachments\") ? (\n\t\t\t\t\t<div class={FormFileClass.attachments}>\n\t\t\t\t\t\t<slot name={\"attachments\"} />\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\n\t\t\t\t{this.files.length && this.displayAttachments ? (\n\t\t\t\t\t<div class={FormFileClass.attachments}>\n\t\t\t\t\t\t<gov-attachments label={this.wcagAttachmentsLabel} wcag-label={this.wcagAttachmentsLabel}>\n\t\t\t\t\t\t\t{this.files.map(item => (\n\t\t\t\t\t\t\t\t<gov-attachments-item wcag-remove-labelled-by={item.id} on-gov-remove={() => this.onRemoveFileHandler(item)}>\n\t\t\t\t\t\t\t\t\t<span class={\"sr-only\"} id={item.id}>\n\t\t\t\t\t\t\t\t\t\t{this.wcagRemoveLabel.replace(\"{FILE_NAME}\", item.file.name)}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{item.file.name}\n\t\t\t\t\t\t\t\t\t{item.acceptValid === false ? (\n\t\t\t\t\t\t\t\t\t\t<gov-form-message slot=\"message\" variant=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon\" name=\"exclamation-triangle-fill\"></gov-icon>\n\t\t\t\t\t\t\t\t\t\t\t{item.acceptValid === false ? this.errorAccept : null}\n\t\t\t\t\t\t\t\t\t\t</gov-form-message>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t{item.sizeValid === false ? (\n\t\t\t\t\t\t\t\t\t\t<gov-form-message slot=\"message\" variant=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon\" name=\"exclamation-triangle-fill\"></gov-icon>\n\t\t\t\t\t\t\t\t\t\t\t{this.errorSize.replace(\"{FILE_SIZE}\", formatBytes(this.maxFileSize))}\n\t\t\t\t\t\t\t\t\t\t</gov-form-message>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t<span slot=\"info\">({formatBytes(item.file.size)})</span>\n\t\t\t\t\t\t\t\t</gov-attachments-item>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</gov-attachments>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onRemoveFileHandler(file: GovFormFileItem) {\n\t\tconst index = this.files.findIndex(item => item.id === file.id)\n\t\tif (index !== -1) {\n\t\t\tconst files = this.files\n\t\t\tconst removeFile = this.files[index]\n\t\t\tfiles.splice(index, 1)\n\t\t\tthis.files = [...files]\n\t\t\tthis.govRemoveFile.emit({\n\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\tfile: removeFile,\n\t\t\t})\n\t\t\tthis.govFiles.emit({\n\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\tfiles,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormFileClass.root,\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: FormFileClass.root,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\te.stopPropagation()\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Returns the reference of the native area element\n\t */\n\t@Method()\n\tasync getAreaRef(): Promise<HTMLDivElement> {\n\t\treturn this.areaRef\n\t}\n\n\t/**\n\t * Remove all files from component state\n\t */\n\t@Method()\n\tasync reset(): Promise<void> {\n\t\tthis.files = []\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\", FormFileClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormFileClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.fileId, this.wcagLabelledBy, FormFileClass.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
@@ -234,6 +234,13 @@
234
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
  }
@@ -248,11 +255,4 @@
248
255
  }
249
256
  .gov-form-group[gap=l] {
250
257
  gap: 1.25rem;
251
- }
252
- .gov-form-group[orientation=horizontal] {
253
- flex-direction: row;
254
- flex-wrap: wrap;
255
- }
256
- .gov-form-group[orientation=horizontal] .gov-form-label__label {
257
- white-space: nowrap;
258
258
  }
@@ -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
@@ -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,7 +46,7 @@ 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
  }
@@ -53,7 +60,7 @@ export class GovIcon {
53
60
  callback();
54
61
  }
55
62
  });
56
- }, { rootMargin: '50px' });
63
+ }, { rootMargin: "50px" });
57
64
  this.intersectionObserver.observe(this.host);
58
65
  }
59
66
  render() {
@@ -116,7 +123,7 @@ export class GovIcon {
116
123
  },
117
124
  "attribute": "type",
118
125
  "reflect": false,
119
- "defaultValue": "'basic'"
126
+ "defaultValue": "\"basic\""
120
127
  }
121
128
  };
122
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,KAAK;IAb7B,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAgBO,KAAK,CAAC,gBAAgB;IAC7B,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;IACpC,IAAI,CAAC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AC,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\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"]}
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,CAAA;AACtF,OAAO,EAAE,SAAS,EAAQ,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,C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,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"]}
@@ -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
@@ -12,7 +12,7 @@ export class GovMessage {
12
12
  validateProp(Variants, newValue, MessageClass.root);
13
13
  }
14
14
  render() {
15
- return (h(Host, { class: this.h.classes(MessageClass.root), variant: this.variant, role: "alert" }, this.h.hasSlot('icon') && (h("span", { class: MessageClass.icon }, h("slot", { name: "icon" }))), h("div", { class: MessageClass.content }, h("slot", null))));
15
+ return (h(Host, { class: this.h.classes(MessageClass.root), variant: this.variant, role: "alert" }, this.h.hasSlot("icon") && (h("span", { class: MessageClass.icon }, h("slot", { name: "icon" }))), h("div", { class: MessageClass.content }, h("slot", null))));
16
16
  }
17
17
  static get is() { return "gov-message"; }
18
18
  static get originalStyleUrls() {