@gov-design-system-ce/components 4.0.8-rc21 → 4.0.8-rc23

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 (468) hide show
  1. package/dist/cjs/core.cjs.js +2 -2
  2. package/dist/cjs/gov-accordion-item.cjs.entry.js +2 -2
  3. package/dist/cjs/gov-accordion.cjs.entry.js +3 -3
  4. package/dist/cjs/gov-attachments_3.cjs.entry.js +3 -3
  5. package/dist/cjs/gov-backdrop.cjs.entry.js +3 -3
  6. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +3 -3
  7. package/dist/cjs/gov-button.cjs.entry.js +3 -3
  8. package/dist/cjs/gov-card.cjs.entry.js +3 -3
  9. package/dist/cjs/gov-chip.cjs.entry.js +2 -2
  10. package/dist/cjs/gov-container.cjs.entry.js +1 -1
  11. package/dist/cjs/gov-control-group.cjs.entry.js +1 -1
  12. package/dist/cjs/gov-cookiebar.cjs.entry.js +1 -1
  13. package/dist/cjs/gov-dropdown.cjs.entry.js +2 -2
  14. package/dist/cjs/gov-empty.cjs.entry.js +1 -1
  15. package/dist/cjs/gov-error-code.cjs.entry.js +1 -1
  16. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +2 -2
  17. package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +1 -1
  18. package/dist/cjs/gov-form-checkbox.cjs.entry.js +4 -6
  19. package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
  20. package/dist/cjs/gov-form-control.cjs.entry.js +2 -2
  21. package/dist/cjs/gov-form-file.cjs.entry.js +6 -8
  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-input.cjs.entry.js +9 -10
  25. package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
  26. package/dist/cjs/gov-form-label.cjs.entry.js +1 -1
  27. package/dist/cjs/gov-form-multi-select.cjs.entry.js +6 -6
  28. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  29. package/dist/cjs/gov-form-password-power.cjs.entry.js +1 -1
  30. package/dist/cjs/gov-form-radio-group.cjs.entry.js +1 -1
  31. package/dist/cjs/gov-form-radio.cjs.entry.js +4 -6
  32. package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
  33. package/dist/cjs/gov-form-search.cjs.entry.js +1 -1
  34. package/dist/cjs/gov-form-select.cjs.entry.js +8 -8
  35. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  36. package/dist/cjs/gov-form-switch.cjs.entry.js +5 -7
  37. package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
  38. package/dist/cjs/gov-grid-item.cjs.entry.js +1 -1
  39. package/dist/cjs/gov-grid.cjs.entry.js +1 -1
  40. package/dist/cjs/gov-icon.cjs.entry.js +2 -2
  41. package/dist/cjs/gov-infobar.cjs.entry.js +3 -3
  42. package/dist/cjs/gov-layout-column.cjs.entry.js +1 -1
  43. package/dist/cjs/gov-layout.cjs.entry.js +1 -1
  44. package/dist/cjs/gov-lifecycle.cjs.entry.js +47 -0
  45. package/dist/cjs/gov-lifecycle.cjs.entry.js.map +1 -0
  46. package/dist/cjs/gov-loading.cjs.entry.js +2 -2
  47. package/dist/cjs/gov-message.cjs.entry.js +2 -2
  48. package/dist/cjs/gov-modal.cjs.entry.js +4 -4
  49. package/dist/cjs/gov-nav-item.cjs.entry.js +2 -2
  50. package/dist/cjs/gov-nav.cjs.entry.js +4 -4
  51. package/dist/cjs/gov-pagination.cjs.entry.js +3 -3
  52. package/dist/cjs/gov-prompt.cjs.entry.js +4 -4
  53. package/dist/cjs/gov-side-nav-item.cjs.entry.js +2 -2
  54. package/dist/cjs/gov-side-nav.cjs.entry.js +4 -4
  55. package/dist/cjs/gov-skeleton.cjs.entry.js +4 -4
  56. package/dist/cjs/gov-spacer.cjs.entry.js +2 -2
  57. package/dist/cjs/gov-statsbar-item.cjs.entry.js +2 -2
  58. package/dist/cjs/gov-statsbar.cjs.entry.js +2 -2
  59. package/dist/cjs/gov-stepper-item.cjs.entry.js +3 -3
  60. package/dist/cjs/gov-stepper.cjs.entry.js +2 -2
  61. package/dist/cjs/gov-tabs-item.cjs.entry.js +3 -3
  62. package/dist/cjs/gov-tabs.cjs.entry.js +4 -4
  63. package/dist/cjs/gov-tag.cjs.entry.js +2 -2
  64. package/dist/cjs/gov-tile.cjs.entry.js +2 -2
  65. package/dist/cjs/gov-tiles.cjs.entry.js +2 -2
  66. package/dist/cjs/gov-toast.cjs.entry.js +3 -3
  67. package/dist/cjs/gov-tooltip-content.cjs.entry.js +2 -2
  68. package/dist/cjs/gov-tooltip.cjs.entry.js +4 -4
  69. package/dist/cjs/gov-wizard-item.cjs.entry.js +5 -5
  70. package/dist/cjs/gov-wizard.cjs.entry.js +4 -4
  71. package/dist/cjs/{index-cfb57f19.js → index-f53beed1.js} +11 -2
  72. package/dist/cjs/index-f53beed1.js.map +1 -0
  73. package/dist/cjs/loader.cjs.js +2 -2
  74. package/dist/cjs/{string.utils-2335838f.js → string.utils-b84c81cf.js} +2 -1
  75. package/dist/cjs/string.utils-b84c81cf.js.map +1 -0
  76. package/dist/cjs/{wcag-53ebeed1.js → wcag-0dfd29b6.js} +2 -2
  77. package/dist/cjs/{wcag-53ebeed1.js.map → wcag-0dfd29b6.js.map} +1 -1
  78. package/dist/collection/collection-manifest.json +1 -0
  79. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +1 -3
  80. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
  81. package/dist/collection/components/gov-form/file/gov-form-file.js +3 -5
  82. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  83. package/dist/collection/components/gov-form/input/gov-form-input.js +6 -7
  84. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  85. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +3 -3
  86. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
  87. package/dist/collection/components/gov-form/radio/gov-form-radio.js +1 -3
  88. package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
  89. package/dist/collection/components/gov-form/select/gov-form-select.js +5 -5
  90. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  91. package/dist/collection/components/gov-form/switch/gov-form-switch.js +2 -4
  92. package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
  93. package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js +39 -0
  94. package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js.map +1 -0
  95. package/dist/collection/components/gov-loading/loading/gov-loading.js +1 -1
  96. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +1 -1
  97. package/dist/collection/components/gov-message/gov-message.js +1 -1
  98. package/dist/collection/components/gov-modal/gov-modal.js +1 -1
  99. package/dist/collection/components/gov-nav/gov-nav-item.js +1 -1
  100. package/dist/collection/components/gov-nav/gov-nav.js +1 -1
  101. package/dist/collection/components/gov-promp/gov-prompt.js +1 -1
  102. package/dist/collection/components/gov-side-nav/gov-side-nav-item.js +1 -1
  103. package/dist/collection/components/gov-side-nav/gov-side-nav.js +1 -1
  104. package/dist/collection/components/gov-spacer/gov-spacer.js +1 -1
  105. package/dist/collection/components/gov-statsbar/gov-statsbar-item.js +1 -1
  106. package/dist/collection/components/gov-statsbar/gov-statsbar.js +1 -1
  107. package/dist/collection/components/gov-stepper/gov-stepper-item.js +1 -1
  108. package/dist/collection/components/gov-stepper/gov-stepper.js +1 -1
  109. package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
  110. package/dist/collection/components/gov-tabs/gov-tabs.js +1 -1
  111. package/dist/collection/components/gov-tag/gov-tag.js +1 -1
  112. package/dist/collection/components/gov-tile/container/gov-tiles.js +1 -1
  113. package/dist/collection/components/gov-tile/gov-tile.js +1 -1
  114. package/dist/collection/components/gov-toast/gov-toast.js +1 -1
  115. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +1 -1
  116. package/dist/collection/components/gov-tooltip/gov-tooltip.js +2 -2
  117. package/dist/collection/components/gov-wizard/gov-wizard-item.js +3 -3
  118. package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
  119. package/dist/collection/utils/string.utils.js +1 -1
  120. package/dist/collection/utils/string.utils.js.map +1 -1
  121. package/dist/components/gov-accordion-item.js +1 -1
  122. package/dist/components/gov-accordion.js +1 -1
  123. package/dist/components/gov-attachments-item.js +1 -1
  124. package/dist/components/gov-attachments.js +1 -1
  125. package/dist/components/gov-backdrop.js +1 -1
  126. package/dist/components/gov-breadcrumbs.js +1 -1
  127. package/dist/components/gov-button.js +1 -1
  128. package/dist/components/gov-card.js +1 -1
  129. package/dist/components/gov-chip.js +1 -1
  130. package/dist/components/gov-container.js +1 -1
  131. package/dist/components/gov-control-group.js +1 -1
  132. package/dist/components/gov-cookiebar.js +1 -1
  133. package/dist/components/gov-dropdown.js +1 -1
  134. package/dist/components/gov-empty.js +1 -1
  135. package/dist/components/gov-error-code.js +1 -1
  136. package/dist/components/gov-form-autocomplete.js +1 -1
  137. package/dist/components/gov-form-checkbox-group.js +1 -1
  138. package/dist/components/gov-form-checkbox.js +1 -1
  139. package/dist/components/gov-form-checkbox.js.map +1 -1
  140. package/dist/components/gov-form-control.js +1 -1
  141. package/dist/components/gov-form-file.js +1 -1
  142. package/dist/components/gov-form-file.js.map +1 -1
  143. package/dist/components/gov-form-group.js +1 -1
  144. package/dist/components/gov-form-input.js +1 -1
  145. package/dist/components/gov-form-label.js +1 -1
  146. package/dist/components/gov-form-message.js +1 -1
  147. package/dist/components/gov-form-multi-select.js +1 -1
  148. package/dist/components/gov-form-multi-select.js.map +1 -1
  149. package/dist/components/gov-form-password-power.js +1 -1
  150. package/dist/components/gov-form-radio-group.js +1 -1
  151. package/dist/components/gov-form-radio.js +1 -1
  152. package/dist/components/gov-form-radio.js.map +1 -1
  153. package/dist/components/gov-form-search.js +1 -1
  154. package/dist/components/gov-form-select.js +1 -1
  155. package/dist/components/gov-form-switch.js +1 -1
  156. package/dist/components/gov-form-switch.js.map +1 -1
  157. package/dist/components/gov-grid-item.js +1 -1
  158. package/dist/components/gov-grid.js +1 -1
  159. package/dist/components/gov-icon.js +1 -1
  160. package/dist/components/gov-infobar.js +1 -1
  161. package/dist/components/gov-layout-column.js +1 -1
  162. package/dist/components/gov-layout.js +1 -1
  163. package/dist/components/gov-lifecycle.d.ts +11 -0
  164. package/dist/components/gov-lifecycle.js +2 -0
  165. package/dist/components/gov-lifecycle.js.map +1 -0
  166. package/dist/components/gov-loading.js +1 -1
  167. package/dist/components/gov-message.js +1 -1
  168. package/dist/components/gov-modal.js +1 -1
  169. package/dist/components/gov-nav-item.js +1 -1
  170. package/dist/components/gov-nav-item.js.map +1 -1
  171. package/dist/components/gov-nav.js +1 -1
  172. package/dist/components/gov-pagination.js +1 -1
  173. package/dist/components/gov-prompt.js +1 -1
  174. package/dist/components/gov-side-nav-item.js +1 -1
  175. package/dist/components/gov-side-nav.js +1 -1
  176. package/dist/components/gov-skeleton.js +1 -1
  177. package/dist/components/gov-skeleton.js.map +1 -1
  178. package/dist/components/gov-spacer.js +1 -1
  179. package/dist/components/gov-statsbar-item.js +1 -1
  180. package/dist/components/gov-statsbar.js +1 -1
  181. package/dist/components/gov-stepper-item.js +1 -1
  182. package/dist/components/gov-stepper.js +1 -1
  183. package/dist/components/gov-tabs-item.js +1 -1
  184. package/dist/components/gov-tabs.js +1 -1
  185. package/dist/components/gov-tag.js +1 -1
  186. package/dist/components/gov-tile.js +1 -1
  187. package/dist/components/gov-tiles.js +1 -1
  188. package/dist/components/gov-toast.js +1 -1
  189. package/dist/components/gov-tooltip-content.js +1 -1
  190. package/dist/components/gov-tooltip.js +1 -1
  191. package/dist/components/gov-tooltip.js.map +1 -1
  192. package/dist/components/gov-wizard-item.js +1 -1
  193. package/dist/components/gov-wizard.js +1 -1
  194. package/dist/components/index.js +1 -1
  195. package/dist/components/{p-bcc76ddd.js → p-11418445.js} +2 -2
  196. package/dist/components/{p-4489a1da.js → p-145d1fa3.js} +2 -2
  197. package/dist/components/{p-2dce8f2c.js → p-2594e525.js} +2 -2
  198. package/dist/components/{p-708dca47.js → p-2f537b87.js} +2 -2
  199. package/dist/components/{p-708dca47.js.map → p-2f537b87.js.map} +1 -1
  200. package/dist/components/{p-d6759ac3.js → p-5262b9ce.js} +3 -3
  201. package/dist/components/p-5262b9ce.js.map +1 -0
  202. package/dist/components/p-71cec4ef.js +2 -0
  203. package/dist/components/{p-f0eb08d6.js → p-74915621.js} +2 -2
  204. package/dist/components/{p-92c6c6aa.js → p-77cdc056.js} +2 -2
  205. package/dist/components/{p-c2e5e893.js → p-8cf6d23c.js} +2 -2
  206. package/dist/components/p-8cf6d23c.js.map +1 -0
  207. package/dist/components/{p-8977b759.js → p-9d5a8ed9.js} +2 -2
  208. package/dist/components/{p-aa4122bd.js → p-b6dd95ba.js} +2 -2
  209. package/dist/components/{p-95d41a3b.js → p-cd6c2938.js} +2 -2
  210. package/dist/components/p-cd6c2938.js.map +1 -0
  211. package/dist/components/{p-8df7c635.js → p-d0fe3cd8.js} +2 -2
  212. package/dist/core/core.esm.js +1 -1
  213. package/dist/core/core.esm.js.map +1 -1
  214. package/dist/core/{p-6c745c3e.entry.js → p-06e9e93b.entry.js} +2 -2
  215. package/dist/core/{p-5d33cb6e.entry.js → p-092b0437.entry.js} +2 -2
  216. package/dist/core/{p-290773da.entry.js → p-1011ca26.entry.js} +2 -2
  217. package/dist/core/{p-212e297e.entry.js → p-107a6a5c.entry.js} +2 -2
  218. package/dist/core/{p-389edb54.entry.js → p-114a4d0b.entry.js} +2 -2
  219. package/dist/core/{p-3483a6e8.entry.js → p-13520b30.entry.js} +2 -2
  220. package/dist/core/{p-4dbaff99.entry.js → p-13ced376.entry.js} +2 -2
  221. package/dist/core/{p-753e4861.entry.js → p-1b3143a8.entry.js} +2 -3
  222. package/dist/core/p-1b3143a8.entry.js.map +1 -0
  223. package/dist/core/{p-ab2f6b4d.entry.js → p-1bdc04bb.entry.js} +2 -2
  224. package/dist/core/{p-92f752e1.entry.js → p-208c99c8.entry.js} +2 -3
  225. package/dist/core/p-208c99c8.entry.js.map +1 -0
  226. package/dist/core/p-20ae3168.entry.js +2 -0
  227. package/dist/core/p-20ae3168.entry.js.map +1 -0
  228. package/dist/core/{p-8ab827a1.entry.js → p-2186fcd5.entry.js} +2 -2
  229. package/dist/core/p-240659bb.js +3 -0
  230. package/dist/core/p-240659bb.js.map +1 -0
  231. package/dist/core/{p-0790a27c.entry.js → p-2c3697cf.entry.js} +2 -2
  232. package/dist/core/{p-2e07619e.entry.js → p-2e881577.entry.js} +2 -2
  233. package/dist/core/p-2e881577.entry.js.map +1 -0
  234. package/dist/core/{p-02745628.entry.js → p-3309aed9.entry.js} +2 -2
  235. package/dist/core/{p-34cf509a.entry.js → p-348165e2.entry.js} +2 -2
  236. package/dist/core/{p-2cdb5670.entry.js → p-34d7c203.entry.js} +2 -3
  237. package/dist/core/p-34d7c203.entry.js.map +1 -0
  238. package/dist/core/{p-2db35d0f.entry.js → p-3832de64.entry.js} +2 -2
  239. package/dist/core/{p-3c0058a4.entry.js → p-3b8fb675.entry.js} +2 -2
  240. package/dist/core/p-3b8fb675.entry.js.map +1 -0
  241. package/dist/core/{p-761c33c7.entry.js → p-3ccab2ba.entry.js} +2 -2
  242. package/dist/core/{p-396ae350.entry.js → p-3e041d63.entry.js} +2 -2
  243. package/dist/core/p-3e041d63.entry.js.map +1 -0
  244. package/dist/core/{p-04e48d5d.entry.js → p-4694b4b6.entry.js} +2 -2
  245. package/dist/core/{p-a50b306f.entry.js → p-4700508c.entry.js} +2 -2
  246. package/dist/core/p-489f5c82.entry.js +2 -0
  247. package/dist/core/{p-2e647c00.entry.js.map → p-489f5c82.entry.js.map} +1 -1
  248. package/dist/core/{p-33b1f5d8.entry.js → p-4ed064db.entry.js} +2 -2
  249. package/dist/core/{p-aa91f33f.entry.js → p-4f77a766.entry.js} +2 -2
  250. package/dist/core/p-4f77a766.entry.js.map +1 -0
  251. package/dist/core/{p-cc3c6319.entry.js → p-551c9f44.entry.js} +2 -2
  252. package/dist/core/{p-650ac6c6.entry.js → p-55abc7bc.entry.js} +2 -2
  253. package/dist/core/p-55cd3fee.entry.js +2 -0
  254. package/dist/core/{p-ab9d9655.entry.js.map → p-55cd3fee.entry.js.map} +1 -1
  255. package/dist/core/{p-5facceb9.entry.js → p-5c3a0b02.entry.js} +2 -2
  256. package/dist/core/{p-5e7e7cb1.entry.js → p-64353313.entry.js} +2 -2
  257. package/dist/core/{p-aba11ab4.entry.js → p-6789b9d0.entry.js} +2 -2
  258. package/dist/core/{p-f11f707f.entry.js → p-6a82c6a1.entry.js} +2 -2
  259. package/dist/core/{p-afd40857.entry.js → p-6c33492a.entry.js} +2 -2
  260. package/dist/core/{p-afd40857.entry.js.map → p-6c33492a.entry.js.map} +1 -1
  261. package/dist/core/{p-3f62cf30.entry.js → p-6d894ec7.entry.js} +2 -2
  262. package/dist/core/{p-6977b168.entry.js → p-6dfde487.entry.js} +2 -2
  263. package/dist/core/{p-d2fc217d.entry.js → p-74233183.entry.js} +2 -2
  264. package/dist/core/{p-eb403270.entry.js → p-77892071.entry.js} +2 -2
  265. package/dist/core/{p-1046221c.entry.js → p-7a896683.entry.js} +2 -2
  266. package/dist/core/{p-185a46b9.entry.js → p-7ba4ae8d.entry.js} +2 -2
  267. package/dist/core/{p-7695610a.entry.js → p-7d011c4b.entry.js} +2 -2
  268. package/dist/core/p-7e43f440.entry.js +2 -0
  269. package/dist/core/p-7e43f440.entry.js.map +1 -0
  270. package/dist/core/{p-b58ed9ce.entry.js → p-802909c5.entry.js} +2 -2
  271. package/dist/core/{p-dbde347f.entry.js → p-810f0d0c.entry.js} +2 -2
  272. package/dist/core/{p-718d0198.entry.js → p-828e8bce.entry.js} +2 -2
  273. package/dist/core/{p-6be9b50d.entry.js → p-87b7b469.entry.js} +2 -3
  274. package/dist/core/p-87b7b469.entry.js.map +1 -0
  275. package/dist/core/{p-cce125de.entry.js → p-8fb45e7c.entry.js} +2 -2
  276. package/dist/core/{p-7c2fa6df.entry.js → p-a3cff495.entry.js} +2 -2
  277. package/dist/core/p-ab9aff3c.js +2 -0
  278. package/dist/core/{p-f9fee460.entry.js → p-ae4321ea.entry.js} +2 -2
  279. package/dist/core/{p-1b212799.entry.js → p-b2b254b6.entry.js} +2 -2
  280. package/dist/core/p-bcdf6cfc.entry.js +2 -0
  281. package/dist/core/{p-3e3a1607.entry.js.map → p-bcdf6cfc.entry.js.map} +1 -1
  282. package/dist/core/p-cc83b8cb.entry.js +2 -0
  283. package/dist/core/p-cc83b8cb.entry.js.map +1 -0
  284. package/dist/core/{p-95d41a3b.js → p-cd6c2938.js} +2 -2
  285. package/dist/core/p-cd6c2938.js.map +1 -0
  286. package/dist/core/{p-fc3d4a73.entry.js → p-cdaeb7d8.entry.js} +2 -3
  287. package/dist/core/p-cdaeb7d8.entry.js.map +1 -0
  288. package/dist/core/{p-7d1dd58a.entry.js → p-d4b50bcd.entry.js} +2 -2
  289. package/dist/core/{p-74627eb2.entry.js → p-d4f2d6f9.entry.js} +2 -2
  290. package/dist/core/p-d4f2d6f9.entry.js.map +1 -0
  291. package/dist/core/{p-2fb0e1cf.entry.js → p-e9bcadf1.entry.js} +2 -2
  292. package/dist/core/{p-13a80dc5.entry.js → p-f16f9116.entry.js} +2 -2
  293. package/dist/core/{p-f54fe20e.entry.js → p-f2edcca7.entry.js} +2 -2
  294. package/dist/core/p-f6a98765.entry.js +2 -0
  295. package/dist/core/{p-31a7316b.entry.js.map → p-f6a98765.entry.js.map} +1 -1
  296. package/dist/core/{p-5462e282.entry.js → p-f9de3c09.entry.js} +2 -2
  297. package/dist/core/{p-5f3721be.entry.js → p-fe8bd4cf.entry.js} +2 -2
  298. package/dist/core/p-fe8bd4cf.entry.js.map +1 -0
  299. package/dist/esm/core.js +3 -3
  300. package/dist/esm/gov-accordion-item.entry.js +2 -2
  301. package/dist/esm/gov-accordion.entry.js +3 -3
  302. package/dist/esm/gov-attachments_3.entry.js +3 -3
  303. package/dist/esm/gov-backdrop.entry.js +3 -3
  304. package/dist/esm/gov-breadcrumbs.entry.js +3 -3
  305. package/dist/esm/gov-button.entry.js +3 -3
  306. package/dist/esm/gov-card.entry.js +3 -3
  307. package/dist/esm/gov-chip.entry.js +2 -2
  308. package/dist/esm/gov-container.entry.js +1 -1
  309. package/dist/esm/gov-control-group.entry.js +1 -1
  310. package/dist/esm/gov-cookiebar.entry.js +1 -1
  311. package/dist/esm/gov-dropdown.entry.js +2 -2
  312. package/dist/esm/gov-empty.entry.js +1 -1
  313. package/dist/esm/gov-error-code.entry.js +1 -1
  314. package/dist/esm/gov-form-autocomplete.entry.js +2 -2
  315. package/dist/esm/gov-form-checkbox-group.entry.js +1 -1
  316. package/dist/esm/gov-form-checkbox.entry.js +4 -6
  317. package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
  318. package/dist/esm/gov-form-control.entry.js +2 -2
  319. package/dist/esm/gov-form-file.entry.js +6 -8
  320. package/dist/esm/gov-form-file.entry.js.map +1 -1
  321. package/dist/esm/gov-form-group.entry.js +1 -1
  322. package/dist/esm/gov-form-input.entry.js +9 -10
  323. package/dist/esm/gov-form-input.entry.js.map +1 -1
  324. package/dist/esm/gov-form-label.entry.js +1 -1
  325. package/dist/esm/gov-form-multi-select.entry.js +6 -6
  326. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  327. package/dist/esm/gov-form-password-power.entry.js +1 -1
  328. package/dist/esm/gov-form-radio-group.entry.js +1 -1
  329. package/dist/esm/gov-form-radio.entry.js +4 -6
  330. package/dist/esm/gov-form-radio.entry.js.map +1 -1
  331. package/dist/esm/gov-form-search.entry.js +1 -1
  332. package/dist/esm/gov-form-select.entry.js +8 -8
  333. package/dist/esm/gov-form-select.entry.js.map +1 -1
  334. package/dist/esm/gov-form-switch.entry.js +5 -7
  335. package/dist/esm/gov-form-switch.entry.js.map +1 -1
  336. package/dist/esm/gov-grid-item.entry.js +1 -1
  337. package/dist/esm/gov-grid.entry.js +1 -1
  338. package/dist/esm/gov-icon.entry.js +2 -2
  339. package/dist/esm/gov-infobar.entry.js +3 -3
  340. package/dist/esm/gov-layout-column.entry.js +1 -1
  341. package/dist/esm/gov-layout.entry.js +1 -1
  342. package/dist/esm/gov-lifecycle.entry.js +43 -0
  343. package/dist/esm/gov-lifecycle.entry.js.map +1 -0
  344. package/dist/esm/gov-loading.entry.js +2 -2
  345. package/dist/esm/gov-message.entry.js +2 -2
  346. package/dist/esm/gov-modal.entry.js +4 -4
  347. package/dist/esm/gov-nav-item.entry.js +2 -2
  348. package/dist/esm/gov-nav.entry.js +4 -4
  349. package/dist/esm/gov-pagination.entry.js +3 -3
  350. package/dist/esm/gov-prompt.entry.js +4 -4
  351. package/dist/esm/gov-side-nav-item.entry.js +2 -2
  352. package/dist/esm/gov-side-nav.entry.js +4 -4
  353. package/dist/esm/gov-skeleton.entry.js +4 -4
  354. package/dist/esm/gov-spacer.entry.js +2 -2
  355. package/dist/esm/gov-statsbar-item.entry.js +2 -2
  356. package/dist/esm/gov-statsbar.entry.js +2 -2
  357. package/dist/esm/gov-stepper-item.entry.js +3 -3
  358. package/dist/esm/gov-stepper.entry.js +2 -2
  359. package/dist/esm/gov-tabs-item.entry.js +3 -3
  360. package/dist/esm/gov-tabs.entry.js +4 -4
  361. package/dist/esm/gov-tag.entry.js +2 -2
  362. package/dist/esm/gov-tile.entry.js +2 -2
  363. package/dist/esm/gov-tiles.entry.js +2 -2
  364. package/dist/esm/gov-toast.entry.js +3 -3
  365. package/dist/esm/gov-tooltip-content.entry.js +2 -2
  366. package/dist/esm/gov-tooltip.entry.js +4 -4
  367. package/dist/esm/gov-wizard-item.entry.js +5 -5
  368. package/dist/esm/gov-wizard.entry.js +4 -4
  369. package/dist/esm/{index-b44c6c92.js → index-c5251f2b.js} +11 -2
  370. package/dist/esm/index-c5251f2b.js.map +1 -0
  371. package/dist/esm/loader.js +3 -3
  372. package/dist/esm/{string.utils-5ce3f551.js → string.utils-1da8f8fb.js} +2 -2
  373. package/dist/esm/string.utils-1da8f8fb.js.map +1 -0
  374. package/dist/esm/{wcag-6ad92279.js → wcag-169f758a.js} +2 -2
  375. package/dist/esm/{wcag-6ad92279.js.map → wcag-169f758a.js.map} +1 -1
  376. package/dist/hydrate/index.js +100 -58
  377. package/dist/hydrate/index.mjs +100 -58
  378. package/dist/types/components/gov-form/checkbox/gov-form-checkbox.d.ts +0 -1
  379. package/dist/types/components/gov-form/file/gov-form-file.d.ts +0 -1
  380. package/dist/types/components/gov-form/radio/gov-form-radio.d.ts +0 -1
  381. package/dist/types/components/gov-form/switch/gov-form-switch.d.ts +0 -1
  382. package/dist/types/components/gov-lifecycle-tester/gov-lifecycle-tester.d.ts +14 -0
  383. package/dist/types/components.d.ts +13 -0
  384. package/dist/types/utils/string.utils.d.ts +1 -0
  385. package/package.json +1 -1
  386. package/dist/cjs/index-cfb57f19.js.map +0 -1
  387. package/dist/cjs/string.utils-2335838f.js.map +0 -1
  388. package/dist/components/p-6b0471a8.js +0 -2
  389. package/dist/components/p-95d41a3b.js.map +0 -1
  390. package/dist/components/p-c2e5e893.js.map +0 -1
  391. package/dist/components/p-d6759ac3.js.map +0 -1
  392. package/dist/core/p-0a5b0f7d.js +0 -3
  393. package/dist/core/p-0a5b0f7d.js.map +0 -1
  394. package/dist/core/p-2cdb5670.entry.js.map +0 -1
  395. package/dist/core/p-2e07619e.entry.js.map +0 -1
  396. package/dist/core/p-2e647c00.entry.js +0 -2
  397. package/dist/core/p-31a7316b.entry.js +0 -2
  398. package/dist/core/p-396ae350.entry.js.map +0 -1
  399. package/dist/core/p-3c0058a4.entry.js.map +0 -1
  400. package/dist/core/p-3e3a1607.entry.js +0 -2
  401. package/dist/core/p-5f3721be.entry.js.map +0 -1
  402. package/dist/core/p-6be9b50d.entry.js.map +0 -1
  403. package/dist/core/p-74627eb2.entry.js.map +0 -1
  404. package/dist/core/p-753e4861.entry.js.map +0 -1
  405. package/dist/core/p-92b7481f.js +0 -2
  406. package/dist/core/p-92f752e1.entry.js.map +0 -1
  407. package/dist/core/p-95d41a3b.js.map +0 -1
  408. package/dist/core/p-aa91f33f.entry.js.map +0 -1
  409. package/dist/core/p-ab9d9655.entry.js +0 -2
  410. package/dist/core/p-e21b402c.entry.js +0 -3
  411. package/dist/core/p-e21b402c.entry.js.map +0 -1
  412. package/dist/core/p-f9e6f776.entry.js +0 -3
  413. package/dist/core/p-f9e6f776.entry.js.map +0 -1
  414. package/dist/core/p-fc3d4a73.entry.js.map +0 -1
  415. package/dist/esm/index-b44c6c92.js.map +0 -1
  416. package/dist/esm/string.utils-5ce3f551.js.map +0 -1
  417. /package/dist/components/{p-bcc76ddd.js.map → p-11418445.js.map} +0 -0
  418. /package/dist/components/{p-4489a1da.js.map → p-145d1fa3.js.map} +0 -0
  419. /package/dist/components/{p-2dce8f2c.js.map → p-2594e525.js.map} +0 -0
  420. /package/dist/components/{p-6b0471a8.js.map → p-71cec4ef.js.map} +0 -0
  421. /package/dist/components/{p-f0eb08d6.js.map → p-74915621.js.map} +0 -0
  422. /package/dist/components/{p-92c6c6aa.js.map → p-77cdc056.js.map} +0 -0
  423. /package/dist/components/{p-8977b759.js.map → p-9d5a8ed9.js.map} +0 -0
  424. /package/dist/components/{p-aa4122bd.js.map → p-b6dd95ba.js.map} +0 -0
  425. /package/dist/components/{p-8df7c635.js.map → p-d0fe3cd8.js.map} +0 -0
  426. /package/dist/core/{p-6c745c3e.entry.js.map → p-06e9e93b.entry.js.map} +0 -0
  427. /package/dist/core/{p-5d33cb6e.entry.js.map → p-092b0437.entry.js.map} +0 -0
  428. /package/dist/core/{p-290773da.entry.js.map → p-1011ca26.entry.js.map} +0 -0
  429. /package/dist/core/{p-212e297e.entry.js.map → p-107a6a5c.entry.js.map} +0 -0
  430. /package/dist/core/{p-389edb54.entry.js.map → p-114a4d0b.entry.js.map} +0 -0
  431. /package/dist/core/{p-3483a6e8.entry.js.map → p-13520b30.entry.js.map} +0 -0
  432. /package/dist/core/{p-4dbaff99.entry.js.map → p-13ced376.entry.js.map} +0 -0
  433. /package/dist/core/{p-ab2f6b4d.entry.js.map → p-1bdc04bb.entry.js.map} +0 -0
  434. /package/dist/core/{p-8ab827a1.entry.js.map → p-2186fcd5.entry.js.map} +0 -0
  435. /package/dist/core/{p-0790a27c.entry.js.map → p-2c3697cf.entry.js.map} +0 -0
  436. /package/dist/core/{p-02745628.entry.js.map → p-3309aed9.entry.js.map} +0 -0
  437. /package/dist/core/{p-34cf509a.entry.js.map → p-348165e2.entry.js.map} +0 -0
  438. /package/dist/core/{p-2db35d0f.entry.js.map → p-3832de64.entry.js.map} +0 -0
  439. /package/dist/core/{p-761c33c7.entry.js.map → p-3ccab2ba.entry.js.map} +0 -0
  440. /package/dist/core/{p-04e48d5d.entry.js.map → p-4694b4b6.entry.js.map} +0 -0
  441. /package/dist/core/{p-a50b306f.entry.js.map → p-4700508c.entry.js.map} +0 -0
  442. /package/dist/core/{p-33b1f5d8.entry.js.map → p-4ed064db.entry.js.map} +0 -0
  443. /package/dist/core/{p-cc3c6319.entry.js.map → p-551c9f44.entry.js.map} +0 -0
  444. /package/dist/core/{p-650ac6c6.entry.js.map → p-55abc7bc.entry.js.map} +0 -0
  445. /package/dist/core/{p-5facceb9.entry.js.map → p-5c3a0b02.entry.js.map} +0 -0
  446. /package/dist/core/{p-5e7e7cb1.entry.js.map → p-64353313.entry.js.map} +0 -0
  447. /package/dist/core/{p-aba11ab4.entry.js.map → p-6789b9d0.entry.js.map} +0 -0
  448. /package/dist/core/{p-f11f707f.entry.js.map → p-6a82c6a1.entry.js.map} +0 -0
  449. /package/dist/core/{p-3f62cf30.entry.js.map → p-6d894ec7.entry.js.map} +0 -0
  450. /package/dist/core/{p-6977b168.entry.js.map → p-6dfde487.entry.js.map} +0 -0
  451. /package/dist/core/{p-d2fc217d.entry.js.map → p-74233183.entry.js.map} +0 -0
  452. /package/dist/core/{p-eb403270.entry.js.map → p-77892071.entry.js.map} +0 -0
  453. /package/dist/core/{p-1046221c.entry.js.map → p-7a896683.entry.js.map} +0 -0
  454. /package/dist/core/{p-185a46b9.entry.js.map → p-7ba4ae8d.entry.js.map} +0 -0
  455. /package/dist/core/{p-7695610a.entry.js.map → p-7d011c4b.entry.js.map} +0 -0
  456. /package/dist/core/{p-b58ed9ce.entry.js.map → p-802909c5.entry.js.map} +0 -0
  457. /package/dist/core/{p-dbde347f.entry.js.map → p-810f0d0c.entry.js.map} +0 -0
  458. /package/dist/core/{p-718d0198.entry.js.map → p-828e8bce.entry.js.map} +0 -0
  459. /package/dist/core/{p-cce125de.entry.js.map → p-8fb45e7c.entry.js.map} +0 -0
  460. /package/dist/core/{p-7c2fa6df.entry.js.map → p-a3cff495.entry.js.map} +0 -0
  461. /package/dist/core/{p-92b7481f.js.map → p-ab9aff3c.js.map} +0 -0
  462. /package/dist/core/{p-f9fee460.entry.js.map → p-ae4321ea.entry.js.map} +0 -0
  463. /package/dist/core/{p-1b212799.entry.js.map → p-b2b254b6.entry.js.map} +0 -0
  464. /package/dist/core/{p-7d1dd58a.entry.js.map → p-d4b50bcd.entry.js.map} +0 -0
  465. /package/dist/core/{p-2fb0e1cf.entry.js.map → p-e9bcadf1.entry.js.map} +0 -0
  466. /package/dist/core/{p-13a80dc5.entry.js.map → p-f16f9116.entry.js.map} +0 -0
  467. /package/dist/core/{p-f54fe20e.entry.js.map → p-f2edcca7.entry.js.map} +0 -0
  468. /package/dist/core/{p-5462e282.entry.js.map → p-f9de3c09.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"gov-form-radio.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,imPAAimP,CAAC;AAC1nP,2BAAe,eAAe;;MCiBjB,YAAY;IAQxB;;;;;QAFQ,aAAQ,GAAG,KAAK,CAAA;;uBAiBmC,KAAK;uBAIhB,KAAK;wBAKhB,KAAK;wBAKL,KAAK;;oBAQG,GAAG;;;;;QApC/C,IAAI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C,QAAQ,CAAA;KACpB;;;;IAMD,MAAM,YAAY;QACjBQ,oBAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAER,mBAAc,CAAC,IAAI,CAAC,CAAA;QAC/EQ,oBAAe,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,EAAER,mBAAc,CAAC,IAAI,CAAC,CAAA;QAC7ES,yBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAET,mBAAc,CAAC,IAAI,CAAC,CAAA;KAC/F;;;;;;;;;;;;","names":["createID","govHost","govForm","validateProp","FormRadioSizes","FormRadioClass","toBoolAttr","canValidateWcagOnRender","delay","h","Host","toBoolAttrIfDefined","Fragment","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/radio/gov-form-radio.scss?tag=gov-form-radio","../../../packages/core/src/components/gov-form/radio/gov-form-radio.tsx"],"sourcesContent":["/*\n * Radio\n */\n\n@import \"../checkbox/gov-form-checkbox-core.scss\";\n$class: \".gov-form-radio\";\n\n#{$class} {\n\t@extend %form-checkbox-core;\n\tinput + span {\n\t\t&::before {\n\t\t\tborder-radius: 50%;\n\t\t}\n\t\t&::after {\n\t\t\t@include pseudo();\n\t\t\tborder-radius: 50%;\n\t\t\tbackground: $form-radio-indicator-bg;\n\t\t\topacity: 0;\n\t\t\ttransition: $t linear opacity;\n\t\t}\n\t}\n\n\t&__label {\n\t\tposition: relative;\n\t}\n\n\t// STATES\n\tinput:checked + span::after {\n\t\topacity: 1;\n\t}\n\t@include parameter(\"invalid\") {\n\t\tinput + span::after {\n\t\t\tbackground: $form-state-color-error;\n\t\t}\n\t}\n\t@include parameter(\"disabled\") {\n\t\tinput:checked + span::after {\n\t\t\tbackground-color: $form-state-bg-disabled;\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $form-checkbox-core-sizes {\n\t\t&[size=\"#{$size}\"] {\n\t\t\tinput + span::after {\n\t\t\t\ttop: calc((get(\"indicator-size\", $definitions) - get(\"dot-size\", $definitions)) / 2);\n\t\t\t\tleft: calc((get(\"indicator-size\", $definitions) - get(\"dot-size\", $definitions)) / 2);\n\t\t\t\twidth: get(\"dot-size\", $definitions);\n\t\t\t\theight: get(\"dot-size\", $definitions);\n\t\t\t}\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormRadioClass, FormRadioSizes, FormRadioSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {validateWcagLabelFor, validateWcagRef} from \"../../../helpers/Validate/wcag\"\nimport {canValidateWcagOnRender} from \"../../../helpers/Dom/win\"\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 Fragment from \"../../../helpers/Fragment\"\nimport {FormRadioEvent} from \"./gov-form-radio.types\"\n\n@Component({\n\ttag: \"gov-form-radio\",\n\tstyleUrl: \"gov-form-radio.scss\",\n})\nexport class GovFormRadio {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\n\tprivate readonly radioId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.radioId = createID(\"GovRadio\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormRadioElement\n\t/**\n\t * Value of radio\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Radio button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the radio component disabled.\n\t * This prevents users from being able to interact with the radio, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Name of the radio.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Radio's size.\n\t */\n\t@Prop() readonly size?: FormRadioSizesType = \"m\"\n\t/**\n\t * Custom radio identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * 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 * Emitted when the radio has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormRadioEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormRadioSizes, newValue, FormRadioClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"radio\")\n\t}\n\n\n\tcomponentWillLoad() {\n\t\tthis.passControlAttrs()\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.radioId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst wrapRadio = children => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn <label class={FormRadioClass.label}>{children}</label>\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormRadioClass.root} hydrated={this.hydrated} checked={this.checked} size={this.size}\n\t\t\t\t\t\tinvalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t<div class={FormRadioClass.holder}>\n\t\t\t\t\t{wrapRadio(\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tclass={FormRadioClass.input}\n\t\t\t\t\t\t\t\tid={this.identifier || this.radioId}\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t<slot name=\"label\"/>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</Fragment>,\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\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\", FormRadioClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormRadioClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.radioId, this.wcagLabelledBy, FormRadioClass.root)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-form-radio.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,imPAAimP,CAAC;AAC1nP,2BAAe,eAAe;;MCiBjB,YAAY;IAQxB;;;;;QAFQ,aAAQ,GAAG,KAAK,CAAA;;uBAiBmC,KAAK;uBAIhB,KAAK;wBAKhB,KAAK;wBAKL,KAAK;;oBAQG,GAAG;;;;;QApC/C,IAAI,CAAC,OAAO,GAAGA,qBAAQ,CAAC,UAAU,CAAC,CAAA;QAEnC,IAAI,CAAC,CAAC,GAAGC,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,CAAC,GAAGC,YAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KACxB;IA+DD,YAAY,CAAC,QAAgB;QAC5BC,kBAAY,CAACC,mBAAc,EAAE,QAAQ,EAAEC,mBAAc,CAAC,IAAI,CAAC,CAAA;KAC3D;IAKD,iBAAiB;QAChB,IAAI,CAAC,gBAAgB,EAAE,CAAA;KACvB;IAEO,gBAAgB;QACvB,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3C,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,SAAS,EAAEC,mBAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAA;QAC7D,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,UAAU,EAAEA,mBAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAA;QAC/D,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KACzC;IAED,MAAM,kBAAkB;QACvB,IAAI,C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SAChB,CAAC,CAAA;KACF;IAEO,eAAe,CAAC,CAAQ;QAC/B,IAAI,CAAC,OAAO,GAAI,CAAC,CAAC,MAA2B,CAAC,OAAO,CAAA;QACrD,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YACnB,SAAS,EAAEA,mBAAc,CAAC,IAAI;YAC9B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,aAAa,EAAE,CAAC;SAChB,CAAC,CAAA;KACF;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,CAAA;KACpB;;;;IAMD,MAAM,YAAY;QACjBQ,oBAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAER,mBAAc,CAAC,IAAI,CAAC,CAAA;QAC/EQ,oBAAe,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,EAAER,mBAAc,CAAC,IAAI,CAAC,CAAA;QAC7ES,yBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAET,mBAAc,CAAC,IAAI,CAAC,CAAA;KAC/F;;;;;;;;;;;;","names":["createID","govHost","govForm","validateProp","FormRadioSizes","FormRadioClass","toBoolAttr","canValidateWcagOnRender","delay","h","Host","toBoolAttrIfDefined","Fragment","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/radio/gov-form-radio.scss?tag=gov-form-radio","../../../packages/core/src/components/gov-form/radio/gov-form-radio.tsx"],"sourcesContent":["/*\n * Radio\n */\n\n@import \"../checkbox/gov-form-checkbox-core.scss\";\n$class: \".gov-form-radio\";\n\n#{$class} {\n\t@extend %form-checkbox-core;\n\tinput + span {\n\t\t&::before {\n\t\t\tborder-radius: 50%;\n\t\t}\n\t\t&::after {\n\t\t\t@include pseudo();\n\t\t\tborder-radius: 50%;\n\t\t\tbackground: $form-radio-indicator-bg;\n\t\t\topacity: 0;\n\t\t\ttransition: $t linear opacity;\n\t\t}\n\t}\n\n\t&__label {\n\t\tposition: relative;\n\t}\n\n\t// STATES\n\tinput:checked + span::after {\n\t\topacity: 1;\n\t}\n\t@include parameter(\"invalid\") {\n\t\tinput + span::after {\n\t\t\tbackground: $form-state-color-error;\n\t\t}\n\t}\n\t@include parameter(\"disabled\") {\n\t\tinput:checked + span::after {\n\t\t\tbackground-color: $form-state-bg-disabled;\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $form-checkbox-core-sizes {\n\t\t&[size=\"#{$size}\"] {\n\t\t\tinput + span::after {\n\t\t\t\ttop: calc((get(\"indicator-size\", $definitions) - get(\"dot-size\", $definitions)) / 2);\n\t\t\t\tleft: calc((get(\"indicator-size\", $definitions) - get(\"dot-size\", $definitions)) / 2);\n\t\t\t\twidth: get(\"dot-size\", $definitions);\n\t\t\t\theight: get(\"dot-size\", $definitions);\n\t\t\t}\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch} from \"@stencil/core\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormRadioClass, FormRadioSizes, FormRadioSizesType} from \"./constants\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {validateWcagLabelFor, validateWcagRef} from \"../../../helpers/Validate/wcag\"\nimport {canValidateWcagOnRender} from \"../../../helpers/Dom/win\"\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 Fragment from \"../../../helpers/Fragment\"\nimport {FormRadioEvent} from \"./gov-form-radio.types\"\n\n@Component({\n\ttag: \"gov-form-radio\",\n\tstyleUrl: \"gov-form-radio.scss\",\n})\nexport class GovFormRadio {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\n\tprivate readonly radioId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.radioId = createID(\"GovRadio\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormRadioElement\n\t/**\n\t * Value of radio\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({attribute: \"no-label\"}) readonly noLabel: boolean = false\n\t/**\n\t * Radio button state\n\t */\n\t@Prop({reflect: true, mutable: true}) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the radio component disabled.\n\t * This prevents users from being able to interact with the radio, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Name of the radio.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Radio's size.\n\t */\n\t@Prop() readonly size?: FormRadioSizesType = \"m\"\n\t/**\n\t * Custom radio identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * 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 * Emitted when the radio has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormRadioEvent>\n\t/**\n\t * Emitted when the radio change value.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<FormRadioEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormRadioSizes, newValue, FormRadioClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"radio\")\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.radioId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst wrapRadio = children => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn <label class={FormRadioClass.label}>{children}</label>\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={FormRadioClass.root} hydrated={this.hydrated} checked={this.checked} size={this.size}\n\t\t\t\t\t\tinvalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t<div class={FormRadioClass.holder}>\n\t\t\t\t\t{wrapRadio(\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tclass={FormRadioClass.input}\n\t\t\t\t\t\t\t\tid={this.identifier || this.radioId}\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t<slot name=\"label\"/>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</Fragment>,\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormRadioClass.root,\n\t\t\tvalue: this.value,\n\t\t\tchecked: this.checked,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\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\", FormRadioClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormRadioClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.radioId, this.wcagLabelledBy, FormRadioClass.root)\n\t}\n}\n"],"version":3}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-cfb57f19.js');
5
+ const index = require('./index-f53beed1.js');
6
6
  const variants = require('./variants-85b514ea.js');
7
7
  const utils = require('./utils-d263c5c6.js');
8
8
 
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-cfb57f19.js');
5
+ const index = require('./index-f53beed1.js');
6
6
  const form = require('./form-f93c3a0a.js');
7
7
  const template = require('./template-431f0737.js');
8
8
  const win = require('./win-03714165.js');
9
9
  const props = require('./props-edd0d46f.js');
10
- const wcag = require('./wcag-53ebeed1.js');
11
- const string_utils = require('./string.utils-2335838f.js');
10
+ const wcag = require('./wcag-0dfd29b6.js');
11
+ const string_utils = require('./string.utils-b84c81cf.js');
12
12
  const utils = require('./utils-d263c5c6.js');
13
13
  const array_utils = require('./array.utils-96eadde3.js');
14
14
  const stencil_utils = require('./stencil.utils-07182a8a.js');
@@ -70,17 +70,17 @@ const GovFormSelect = class {
70
70
  this.f.passAttrToControl('invalid', template.toBoolAttr(this.invalid));
71
71
  this.f.passAttrToControl('success', template.toBoolAttr(this.success));
72
72
  this.f.passAttrToControl('disabled', template.toBoolAttr(this.disabled));
73
+ this.f.passAttrToControl('type', 'select');
73
74
  }
74
75
  componentWillLoad() {
75
76
  this.validateVariant(this.variant);
76
77
  this.validateSize(this.size);
77
78
  this.markSelectedValue();
78
- this.passControlAttrs();
79
- this.f.passAttrToLabel('required', String(this.required));
80
- this.f.passAttrToControl('type', 'select');
81
79
  this.optionsState = array_utils.propsValueToArray(this.options);
82
80
  }
83
81
  async componentDidRender() {
82
+ this.passControlAttrs();
83
+ this.f.passAttrToLabel('required', String(this.required));
84
84
  if (win.canValidateWcagOnRender()) {
85
85
  await utils.delay(500);
86
86
  await this.validateWcag();
@@ -98,10 +98,10 @@ const GovFormSelect = class {
98
98
  });
99
99
  }
100
100
  render() {
101
- return (index.h(index.Host, { key: '0ef3419f4afce93b161ad8b71401a228ae8b9c4a', class: form.FormSelectClass.root, size: this.size, variant: this.variant }, this.h.hasSlot('prefix') && index.h("slot", { key: '828f069b3672d5bb766a44ef37384b9117327eab', name: "prefix" }), index.h("span", { key: '169ac6c9d58c88bbdcc96f36b8208ea05faa8e51', class: "element" }, index.h("gov-icon", { key: 'a2501ad9ecc603d3e52fc0143fef2ee53ae63d4d', slot: "right-icon", name: "chevron-down", class: "icon-arrow" }), this.h.hasSlot('right-icon') && !(this.success || this.invalid) && index.h("slot", { key: '97b2417a96a781620b67a557244c4c0cfa8b3669', name: "right-icon" }), this.success && index.h("gov-icon", { key: 'cebe7eb826cb741bae4afdbd8d9b18948c410f8c', slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && index.h("gov-icon", { key: 'cef9b5715b1c134242f52439f65b88c7d228054f', slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), index.h("select", { key: 'b8374d51d9a66f313db7f851446916e22debeee3', id: this.identifier || this.selectId, onFocus: this.onFocusHandler.bind(this), onChange: this.onChangeHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el), "aria-disabled": template.toBoolAttrIfDefined(this.disabled), "aria-activedescendant": this.wcagActiveDescendant, "aria-controls": this.wcagControls, "aria-required": template.toBoolAttrIfDefined(this.required), "aria-invalid": template.toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns }, index.h("slot", { key: '5ad33b529b013a1e4846aaf3d6a778a0e7652f83' }), Array.isArray(this.optionsState) && this.optionsState.map((option) => {
101
+ return (index.h(index.Host, { key: 'ad730683b3c90c1f843e0b623ccb90620d850f38', class: form.FormSelectClass.root, size: this.size, variant: this.variant }, this.h.hasSlot('prefix') && index.h("slot", { key: 'a502060ea1fe99bdc99c6d41ec724a028e953936', name: "prefix" }), index.h("span", { key: 'c1145ad7d689eedd3364a036cbbc84e2651bf2f3', class: "element" }, index.h("gov-icon", { key: '4064afe2f528385e0488d9b0d4de823468d5291b', slot: "right-icon", name: "chevron-down", class: "icon-arrow" }), this.h.hasSlot('right-icon') && !(this.success || this.invalid) && index.h("slot", { key: '3be3d76095659ad871ad56c301455d845ad2228c', name: "right-icon" }), this.success && index.h("gov-icon", { key: 'fa6b68bbd864c09ba5b5dab1118dab5acba21875', slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && index.h("gov-icon", { key: '956ce3b961a6cce2f815a787bc16daed467a519e', slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), index.h("select", { key: 'f176ad1c96c7b1c2fa080332a82b5c4a0847ceb0', id: this.identifier || this.selectId, onFocus: this.onFocusHandler.bind(this), onChange: this.onChangeHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el), "aria-disabled": template.toBoolAttrIfDefined(this.disabled), "aria-activedescendant": this.wcagActiveDescendant, "aria-controls": this.wcagControls, "aria-required": template.toBoolAttrIfDefined(this.required), "aria-invalid": template.toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns }, index.h("slot", { key: '1021bfce70fc2896c420df6e16e36aa63dfe0b37' }), Array.isArray(this.optionsState) && this.optionsState.map((option) => {
102
102
  var _a;
103
103
  return (index.h("option", { value: option.value, selected: option.value === this.value, disabled: option === null || option === void 0 ? void 0 : option.disabled }, (_a = option.label) !== null && _a !== void 0 ? _a : option.value));
104
- }))), this.h.hasSlot('sufix') && index.h("slot", { key: '257ebbc1fbe845806360efbf491640c2c364d540', name: "sufix" })));
104
+ }))), this.h.hasSlot('sufix') && index.h("slot", { key: 'c1900ebfcba04e86829852c2a164a2c3492f1895', name: "sufix" })));
105
105
  }
106
106
  onFocusHandler(e) {
107
107
  this.focused = true;
@@ -1 +1 @@
1
- {"file":"gov-form-select.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,28lBAA28lB,CAAC;AACr+lB,4BAAe,gBAAgB;;MCwBlB,aAAa;IAOzB;;;;;;;;uBAsBmD,WAAW;oBAIhB,GAAG;;wBASZ,KAAK;;wBASL,KAAK;;;;;;;;4BAsCE,EAAE;QAjF7C,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,CAAC,GAAGC,YAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAGC,qBAAQ,CAAC,WAAW,CAAC,CAAA;KACrC;IAiFD,eAAe,CAAC,QAAgB;QAC/BC,kBAAY,CAACC,uBAAkB,EAAE,QAAQ,EAAEC,oBAAe,CAAC,IAAI,CAAC,CAAA;KAChE;IAGD,YAAY,CAAC,QAAgB;QAC5BF,kBAAY,CAACG,oBAAe,EAAE,QAAQ,EAAED,oBAAe,CAAC,IAAI,CAAC,CAAA;KAC7D;IAGD,YAAY,CAAC,QAAqC;QACjD,IA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AAC,UAAU,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAEX,oBAAe,CAAC,IAAI,CAAC,CAAA;KACjG;;;;;;;;;;;;;;;;","names":["govHost","govForm","createID","validateProp","FormSelectVariants","FormSelectClass","FormSelectSizes","propsValueToArray","toBoolAttr","canValidateWcagOnRender","delay","tick","h","Host","toBoolAttrIfDefined","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.scss?tag=gov-form-select","../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["/*\n * Select\n */\n\n@import \"../select/gov-form-select-core.scss\";\n\n$class: \".gov-form-select\";\n\n#{$class} {\n\t@extend %form-select-core;\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {govForm} from '../../../helpers/Dom/form'\nimport {GovForm} from '../../../helpers/Dom/form.types'\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from '../../../helpers/Dom/template'\nimport {GovHost} from '../../../helpers/Dom/template.types'\nimport {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\tFormSelectClass,\n\tFormSelectSizes,\n\tFormSelectSizesType,\n\tFormSelectVariants,\n\tFormSelectVariantType\n} from './constants'\nimport {FormSelectEvent, FormSelectOption} from './gov-form-select.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {tick} from \"../../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-form-select',\n\tstyleUrl: 'gov-form-select.scss',\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID('GovSelect')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Options of select\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | FormSelectOption[]\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Style variation of the form select.\n\t */\n\t@Prop() readonly variant?: FormSelectVariantType = 'secondary'\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a related component’s visually focused element.\n\t */\n\t@Prop({attribute: 'wcag-active-descendant'}) readonly wcagActiveDescendant: string\n\t/**\n\t * Use this prop to add an aria-controls attribute. Use the attribute to indicate the id of a component controlled by this component.\n\t */\n\t@Prop({attribute: 'wcag-controls'}) readonly wcagControls: string\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 * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\t@State() optionsState: FormSelectOption[] = []\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormSelectVariants, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | FormSelectOption[]): void {\n\t\tthis.optionsState = propsValueToArray(newValue)\n\t}\n\n\t@Watch('disabled')\n\t@Watch('invalid')\n\t@Watch('success')\n\t@Watch('size')\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch('value')\n\twatchValue(): void {\n\t\tthis.markSelectedValue()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl('size', this.size)\n\t\tthis.f.passAttrToControl('invalid', toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('success', toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl('disabled', toBoolAttr(this.disabled))\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\n\t\tthis.markSelectedValue()\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t\tthis.f.passAttrToControl('type', 'select')\n\t\tthis.optionsState = propsValueToArray(this.options)\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\ttick(() => this.markSelectedValue())\n\t}\n\n\tprivate markSelectedValue() {\n\t\tthis.host.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.value === this.value) {\n\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t} else {\n\t\t\t\toption.removeAttribute('selected')\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size} variant={this.variant}>\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<gov-icon slot=\"right-icon\" name=\"chevron-down\" class=\"icon-arrow\"></gov-icon>\n\t\t\t\t\t{this.h.hasSlot('right-icon') && !(this.success || this.invalid) && <slot name=\"right-icon\"/>}\n\t\t\t\t\t{this.success && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-activedescendant={this.wcagActiveDescendant}\n\t\t\t\t\t\taria-controls={this.wcagControls}\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-owns={this.wcagOwns}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t{Array.isArray(this.optionsState) && this.optionsState.map((option) => {\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={option.value === this.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={option?.disabled}>{option.label ?? option.value}</option>)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</select>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectElement> {\n\t\treturn this.selectRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagActiveDescendant, 'wcag-active-descendant', FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagControls, 'wcag-controls', FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagDescribedBy, 'wcag-described-by', FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, 'wcag-owns', FormSelectClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.selectId, this.wcagLabelledBy, FormSelectClass.root)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-form-select.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,28lBAA28lB,CAAC;AACr+lB,4BAAe,gBAAgB;;MCwBlB,aAAa;IAOzB;;;;;;;;uBAsBmD,WAAW;oBAIhB,GAAG;;wBASZ,KAAK;;wBASL,KAAK;;;;;;;;4BAsCE,EAAE;QAjF7C,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,CAAC,GAAGC,YAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAGC,qBAAQ,CAAC,WAAW,CAAC,CAAA;KACrC;IAiFD,eAAe,CAAC,QAAgB;QAC/BC,kBAAY,CAACC,uBAAkB,EAAE,QAAQ,EAAEC,oBAAe,CAAC,IAAI,CAAC,CAAA;KAChE;IAGD,YAAY,CAAC,QAAgB;QAC5BF,kBAAY,CAACG,oBAAe,EAAE,QAAQ,EAAED,oBAAe,CAAC,IAAI,CAAC,CAAA;KAC7D;IAGD,YAAY,CAAC,QAAqC;QACjD,IAAI,CAAC,YAAY,GAAGE,6BAAiB,CAAC,QAAQ,CAAC,CAAA;KAC/C;IAMD,iBAAiB;QAChB,IAAI,CAAC,gBAAgB,EAAE,CAAA;KACvB;IAGD,UAAU;QACT,IAAI,CAAC,iBAAiB,EAAE,CAAA;KACxB;IAEO,gBAAgB;QACvB,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI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;YAC/B,aAAa,EAAE,CAAC;YAChB,KAAK,EAAE,IAAI,CAAC,KAAK;SACjB,CAAC,CAAA;KACF;IAEO,eAAe,CAAC,CAAQ;QAC/B,IAAI,CAAC,KAAK,GAAI,CAAC,CAAC,MAA4B,CAAC,KAAK,CAAA;QAClD,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YACnB,SAAS,EAAEA,oBAAe,CAAC,IAAI;YAC/B,aAAa,EAAE,CAAC;YAChB,KAAK,EAAE,IAAI,CAAC,KAAK;SACjB,CAAC,CAAA;KACF;;;;IAMD,MAAM,QAAQ,CAAC,OAAsB;QACpC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;KACpC;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,SAAS,CAAA;KACrB;;;;IAMD,MAAM,YAAY;QACjBU,oBAAe,CAAC,IAAI,CAAC,oBAAoB,EAAE,wBAAwB,EAAEV,oBAAe,CAAC,IAAI,CAAC,CAAA;QAC1FU,oBAAe,CAAC,IAAI,CAAC,YAAY,EAAE,eAAe,EAAEV,oBAAe,CAAC,IAAI,CAAC,CAAA;QACzEU,oBAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAEV,oBAAe,CAAC,IAAI,CAAC,CAAA;QAChFU,oBAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAEV,oBAAe,CAAC,IAAI,CAAC,CAAA;QACjEW,yBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAEX,oBAAe,CAAC,IAAI,CAAC,CAAA;KACjG;;;;;;;;;;;;;;;;","names":["govHost","govForm","createID","validateProp","FormSelectVariants","FormSelectClass","FormSelectSizes","propsValueToArray","toBoolAttr","canValidateWcagOnRender","delay","tick","h","Host","toBoolAttrIfDefined","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.scss?tag=gov-form-select","../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["/*\n * Select\n */\n\n@import \"../select/gov-form-select-core.scss\";\n\n$class: \".gov-form-select\";\n\n#{$class} {\n\t@extend %form-select-core;\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {govForm} from '../../../helpers/Dom/form'\nimport {GovForm} from '../../../helpers/Dom/form.types'\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from '../../../helpers/Dom/template'\nimport {GovHost} from '../../../helpers/Dom/template.types'\nimport {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\tFormSelectClass,\n\tFormSelectSizes,\n\tFormSelectSizesType,\n\tFormSelectVariants,\n\tFormSelectVariantType\n} from './constants'\nimport {FormSelectEvent, FormSelectOption} from './gov-form-select.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {tick} from \"../../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-form-select',\n\tstyleUrl: 'gov-form-select.scss',\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID('GovSelect')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Options of select\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | FormSelectOption[]\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Style variation of the form select.\n\t */\n\t@Prop() readonly variant?: FormSelectVariantType = 'secondary'\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a related component’s visually focused element.\n\t */\n\t@Prop({attribute: 'wcag-active-descendant'}) readonly wcagActiveDescendant: string\n\t/**\n\t * Use this prop to add an aria-controls attribute. Use the attribute to indicate the id of a component controlled by this component.\n\t */\n\t@Prop({attribute: 'wcag-controls'}) readonly wcagControls: string\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 * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\t@State() optionsState: FormSelectOption[] = []\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormSelectVariants, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | FormSelectOption[]): void {\n\t\tthis.optionsState = propsValueToArray(newValue)\n\t}\n\n\t@Watch('disabled')\n\t@Watch('invalid')\n\t@Watch('success')\n\t@Watch('size')\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch('value')\n\twatchValue(): void {\n\t\tthis.markSelectedValue()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl('size', this.size)\n\t\tthis.f.passAttrToControl('invalid', toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('success', toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl('disabled', toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl('type', 'select')\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\n\t\tthis.markSelectedValue()\n\n\t\tthis.optionsState = propsValueToArray(this.options)\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t\ttick(() => this.markSelectedValue())\n\t}\n\n\tprivate markSelectedValue() {\n\t\tthis.host.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.value === this.value) {\n\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t} else {\n\t\t\t\toption.removeAttribute('selected')\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size} variant={this.variant}>\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<gov-icon slot=\"right-icon\" name=\"chevron-down\" class=\"icon-arrow\"></gov-icon>\n\t\t\t\t\t{this.h.hasSlot('right-icon') && !(this.success || this.invalid) && <slot name=\"right-icon\"/>}\n\t\t\t\t\t{this.success && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-activedescendant={this.wcagActiveDescendant}\n\t\t\t\t\t\taria-controls={this.wcagControls}\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-owns={this.wcagOwns}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t{Array.isArray(this.optionsState) && this.optionsState.map((option) => {\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={option.value === this.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={option?.disabled}>{option.label ?? option.value}</option>)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</select>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectElement> {\n\t\treturn this.selectRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagActiveDescendant, 'wcag-active-descendant', FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagControls, 'wcag-controls', FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagDescribedBy, 'wcag-described-by', FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, 'wcag-owns', FormSelectClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.selectId, this.wcagLabelledBy, FormSelectClass.root)\n\t}\n}\n"],"version":3}
@@ -2,12 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-cfb57f19.js');
6
- const string_utils = require('./string.utils-2335838f.js');
5
+ const index = require('./index-f53beed1.js');
6
+ const string_utils = require('./string.utils-b84c81cf.js');
7
7
  const props = require('./props-edd0d46f.js');
8
8
  const form = require('./form-f93c3a0a.js');
9
9
  const template = require('./template-431f0737.js');
10
- const wcag = require('./wcag-53ebeed1.js');
10
+ const wcag = require('./wcag-0dfd29b6.js');
11
11
  const win = require('./win-03714165.js');
12
12
  const utils = require('./utils-d263c5c6.js');
13
13
  const Fragment = require('./Fragment-52846f79.js');
@@ -53,14 +53,12 @@ const GovFormSwitch = class {
53
53
  this.f.passAttrToControl("size", this.size);
54
54
  this.f.passAttrToControl("invalid", template.toBoolAttr(this.invalid));
55
55
  this.f.passAttrToControl("disabled", template.toBoolAttr(this.disabled));
56
- }
57
- componentWillLoad() {
58
- this.passControlAttrs();
56
+ this.f.passAttrToControl("type", "switch");
59
57
  }
60
58
  async componentDidRender() {
61
59
  this.f.passAttrToLabel("identifier", this.identifier || this.checkboxId);
62
60
  this.f.passAttrToLabel("required", String(this.required));
63
- this.f.passAttrToControl("type", "switch");
61
+ this.passControlAttrs();
64
62
  if (win.canValidateWcagOnRender()) {
65
63
  await utils.delay(500);
66
64
  await this.validateWcag();
@@ -1 +1 @@
1
- {"file":"gov-form-switch.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,mvUAAmvU,CAAC;AAC7wU,4BAAe,gBAAgB;;MCiBlB,aAAa;IAQzB;;;;;QAFQ,aAAQ,GAAG,KAAK,CAAA;;uBAiBqC,KAAK;uBAIhB,KAAK;wBAKlB,KAAK;wBAKL,KAAK;;oBAQI,GAAG;;;;;QApChD,IAAI,CAAC,UAAU,GAAGA,qBAAQ,CAAC,aAAa,CAAC,CAAA;QAEzC,IAAI,CAAC,CAAC,GAAGC,gBAAO,CAAC,IAAI,CAAC,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AAI,CAAC,eAAe,EAAE,mBAAmB,EAAER,oBAAe,CAAC,IAAI,CAAC,CAAA;QAChFQ,oBAAe,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,EAAER,oBAAe,CAAC,IAAI,CAAC,CAAA;QAC9ES,yBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,EAAET,oBAAe,CAAC,IAAI,CAAC,CAAA;KACnG;;;;;;;;;;;;","names":["createID","govHost","govForm","validateProp","FormSwitchSizes","FormSwitchClass","toBoolAttr","canValidateWcagOnRender","delay","h","Host","toBoolAttrIfDefined","Fragment","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/switch/gov-form-switch.scss?tag=gov-form-switch","../../../packages/core/src/components/gov-form/switch/gov-form-switch.tsx"],"sourcesContent":["/*\n * Switch\n */\n\n$class: \".gov-form-switch\";\n$indicator-ratio: calc(5 / 3);\n\n#{$class} {\n\tposition: relative;\n\tdisplay: flex;\n\t&__holder {\n\t\tdisplay: inline-flex;\n\t}\n\t&__input {\n\t\tposition: relative;\n\t\tz-index: 1;\n\t\tappearance: none;\n\t\tcursor: pointer;\n\t\tflex-shrink: 0;\n\t}\n\t.gov-form-label__label {\n\t\tposition: relative;\n\t\tz-index: 1;\n\t\tmargin-bottom: 0;\n\t\tcolor: $form-switch-color;\n\t}\n\t&__indicator {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tborder: $form-switch-indicator-border;\n\t\tbackground-color: $form-switch-indicator-bg;\n\t\ttransition: $t linear background-color;\n\t\t&::before {\n\t\t\t@include pseudo();\n\t\t\tborder-radius: 50%;\n\t\t\tbackground-color: $form-switch-indicator-circle-bg;\n\t\t\ttransition: $t linear left;\n\t\t\tbox-shadow: $form-switch-indicator-circle-box-shadow;\n\t\t}\n\t}\n\n\t// STATES\n\t// focus\n\t&__input:focus-visible ~ &__indicator {\n\t\toutline: $outline;\n\t}\n\t// checked\n\t&__input:checked + &__indicator {\n\t\tborder-color: $form-switch-indicator-bg-checked;\n\t\tbackground-color: $form-switch-indicator-bg-checked;\n\t}\n\n\t// disabled\n\t@include parameter(\"disabled\") {\n\t\tpointer-events: none;\n\t\t.gov-form-label__label {\n\t\t\tcolor: $form-state-color-disabled;\n\t\t}\n\t\t#{$class} {\n\t\t\t&__indicator {\n\t\t\t\t&::before {\n\t\t\t\t\tbackground: $form-state-bg-input-disabled;\n\t\t\t\t}\n\t\t\t}\n\t\t\t&__input:checked + #{$class}__indicator {\n\t\t\t\tborder-color: $form-state-bg-disabled;\n\t\t\t\tbackground-color: $form-state-bg-disabled;\n\t\t\t}\n\t\t}\n\t}\n\n\t// invalid\n\t@include parameter(\"invalid\") {\n\t\t.gov-form-label__label {\n\t\t\tcolor: $form-state-color-error;\n\t\t}\n\t\t#{$class} {\n\t\t\t&__indicator {\n\t\t\t\tborder-color: $form-state-color-error;\n\t\t\t}\n\t\t\t&__input:checked + #{$class}__indicator {\n\t\t\t\tbackground-color: $form-state-color-error;\n\t\t\t}\n\t\t}\n\t}\n\n\t// sizes\n\t@each $size, $definitions in $form-switch-sizes {\n\t\t$indicator-width: calc(get(\"indicator-height\", $definitions) * $indicator-ratio);\n\t\t$indicator-height: get(\"indicator-height\", $definitions);\n\t\t$border-offset: calc(get(\"toggle-offset\", $definitions) - rem-calc(1));\n\n\t\t&[size=\"#{$size}\"] {\n\t\t\t.gov-form-label__label {\n\t\t\t\t@include typography($size);\n\t\t\t\tmargin-bottom: 0;\n\t\t\t}\n\t\t\t#{$class} {\n\t\t\t\t&__holder {\n\t\t\t\t\tgap: get(\"gap\", $definitions);\n\t\t\t\t}\n\t\t\t\t&__input {\n\t\t\t\t\twidth: $indicator-width;\n\t\t\t\t\theight: $indicator-height;\n\t\t\t\t}\n\t\t\t\t&__indicator {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\twidth: $indicator-width;\n\t\t\t\t\theight: $indicator-height;\n\t\t\t\t\tborder-radius: calc($indicator-height * 0.5);\n\t\t\t\t\t&::before {\n\t\t\t\t\t\ttop: $border-offset;\n\t\t\t\t\t\tleft: $border-offset;\n\t\t\t\t\t\twidth: calc($indicator-height - (2 * get(\"toggle-offset\", $definitions)));\n\t\t\t\t\t\theight: calc($indicator-height - (2 * get(\"toggle-offset\", $definitions)));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// STATES\n\t\t\t\t&__input[aria-checked] + #{$class}__indicator {\n\t\t\t\t\t&::before {\n\t\t\t\t\t\tleft: calc($indicator-width - $indicator-height + $border-offset);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlabel {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\t#{$class}__input {\n\t\t\t\t\twidth: $indicator-width;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { createID } from \"../../../utils/string.utils\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\nimport { FormSwitchClass, FormSwitchSizes, FormSwitchSizesType } from \"./constants\"\nimport { govHost, toBoolAttr, toBoolAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { validateWcagLabelFor, validateWcagRef } from \"../../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\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 Fragment from \"../../../helpers/Fragment\"\nimport { FormSwitchEvent } from \"./gov-form-switch.types\"\n\n@Component({\n\ttag: \"gov-form-switch\",\n\tstyleUrl: \"gov-form-switch.scss\",\n})\nexport class GovFormSwitch {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\n\tprivate readonly checkboxId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.checkboxId = createID(\"GovCheckbox\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormSwitchElement\n\t/**\n\t * Value of switch\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({ attribute: \"no-label\" }) readonly noLabel: boolean = false\n\t/**\n\t * Switch button state\n\t */\n\t@Prop({ reflect: true, mutable: true }) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * 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 switch component disabled.\n\t * This prevents users from being able to interact with the switch, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Name of the switch.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Switch's size.\n\t */\n\t@Prop() readonly size?: FormSwitchSizesType = \"m\"\n\t/**\n\t * Custom switch identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * 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 * Emitted when the switch has focus.\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch loses focus.\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch change value.\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<FormSwitchEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSwitchSizes, newValue, FormSwitchClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.passControlAttrs()\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.checkboxId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.f.passAttrToControl(\"type\", \"switch\")\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst wrapCheckbox = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn (\n\t\t\t\t\t<label>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</label>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FormSwitchClass.root)} hydrated={this.hydrated} checked={this.checked} size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t<div class={FormSwitchClass.holder}>\n\t\t\t\t\t{wrapCheckbox(\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tclass={FormSwitchClass.input}\n\t\t\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<span class={FormSwitchClass.indicator}></span>\n\t\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t\t</Fragment>,\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: Event) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\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\", FormSwitchClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormSwitchClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.checkboxId, this.wcagLabelledBy, FormSwitchClass.root)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-form-switch.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,mvUAAmvU,CAAC;AAC7wU,4BAAe,gBAAgB;;MCiBlB,aAAa;IAQzB;;;;;QAFQ,aAAQ,GAAG,KAAK,CAAA;;uBAiBqC,KAAK;uBAIhB,KAAK;wBAKlB,KAAK;wBAKL,KAAK;;oBAQI,GAAG;;;;;QApChD,IAAI,CAAC,UAAU,GAAGA,qBAAQ,CAAC,aAAa,CAAC,CAAA;QAEzC,IAAI,CAAC,CAAC,GAAGC,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,CAAC,GAAGC,YAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KACxB;IA+DD,YAAY,CAAC,QAAgB;QAC5BC,kBAAY,CAACC,oBAAe,EAAE,QAAQ,EAAEC,oBAAe,CAAC,IAAI,CAAC,CAAA;KAC7D;IAKD,aAAa;QACZ,IAAI,CAAC,gBAAgB,EAAE,CAAA;KACvB;IAEO,gBAAgB;QACvB,IAAI,CAAC,CA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validateProp","FormSwitchSizes","FormSwitchClass","toBoolAttr","canValidateWcagOnRender","delay","h","Host","toBoolAttrIfDefined","Fragment","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/switch/gov-form-switch.scss?tag=gov-form-switch","../../../packages/core/src/components/gov-form/switch/gov-form-switch.tsx"],"sourcesContent":["/*\n * Switch\n */\n\n$class: \".gov-form-switch\";\n$indicator-ratio: calc(5 / 3);\n\n#{$class} {\n\tposition: relative;\n\tdisplay: flex;\n\t&__holder {\n\t\tdisplay: inline-flex;\n\t}\n\t&__input {\n\t\tposition: relative;\n\t\tz-index: 1;\n\t\tappearance: none;\n\t\tcursor: pointer;\n\t\tflex-shrink: 0;\n\t}\n\t.gov-form-label__label {\n\t\tposition: relative;\n\t\tz-index: 1;\n\t\tmargin-bottom: 0;\n\t\tcolor: $form-switch-color;\n\t}\n\t&__indicator {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tborder: $form-switch-indicator-border;\n\t\tbackground-color: $form-switch-indicator-bg;\n\t\ttransition: $t linear background-color;\n\t\t&::before {\n\t\t\t@include pseudo();\n\t\t\tborder-radius: 50%;\n\t\t\tbackground-color: $form-switch-indicator-circle-bg;\n\t\t\ttransition: $t linear left;\n\t\t\tbox-shadow: $form-switch-indicator-circle-box-shadow;\n\t\t}\n\t}\n\n\t// STATES\n\t// focus\n\t&__input:focus-visible ~ &__indicator {\n\t\toutline: $outline;\n\t}\n\t// checked\n\t&__input:checked + &__indicator {\n\t\tborder-color: $form-switch-indicator-bg-checked;\n\t\tbackground-color: $form-switch-indicator-bg-checked;\n\t}\n\n\t// disabled\n\t@include parameter(\"disabled\") {\n\t\tpointer-events: none;\n\t\t.gov-form-label__label {\n\t\t\tcolor: $form-state-color-disabled;\n\t\t}\n\t\t#{$class} {\n\t\t\t&__indicator {\n\t\t\t\t&::before {\n\t\t\t\t\tbackground: $form-state-bg-input-disabled;\n\t\t\t\t}\n\t\t\t}\n\t\t\t&__input:checked + #{$class}__indicator {\n\t\t\t\tborder-color: $form-state-bg-disabled;\n\t\t\t\tbackground-color: $form-state-bg-disabled;\n\t\t\t}\n\t\t}\n\t}\n\n\t// invalid\n\t@include parameter(\"invalid\") {\n\t\t.gov-form-label__label {\n\t\t\tcolor: $form-state-color-error;\n\t\t}\n\t\t#{$class} {\n\t\t\t&__indicator {\n\t\t\t\tborder-color: $form-state-color-error;\n\t\t\t}\n\t\t\t&__input:checked + #{$class}__indicator {\n\t\t\t\tbackground-color: $form-state-color-error;\n\t\t\t}\n\t\t}\n\t}\n\n\t// sizes\n\t@each $size, $definitions in $form-switch-sizes {\n\t\t$indicator-width: calc(get(\"indicator-height\", $definitions) * $indicator-ratio);\n\t\t$indicator-height: get(\"indicator-height\", $definitions);\n\t\t$border-offset: calc(get(\"toggle-offset\", $definitions) - rem-calc(1));\n\n\t\t&[size=\"#{$size}\"] {\n\t\t\t.gov-form-label__label {\n\t\t\t\t@include typography($size);\n\t\t\t\tmargin-bottom: 0;\n\t\t\t}\n\t\t\t#{$class} {\n\t\t\t\t&__holder {\n\t\t\t\t\tgap: get(\"gap\", $definitions);\n\t\t\t\t}\n\t\t\t\t&__input {\n\t\t\t\t\twidth: $indicator-width;\n\t\t\t\t\theight: $indicator-height;\n\t\t\t\t}\n\t\t\t\t&__indicator {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\twidth: $indicator-width;\n\t\t\t\t\theight: $indicator-height;\n\t\t\t\t\tborder-radius: calc($indicator-height * 0.5);\n\t\t\t\t\t&::before {\n\t\t\t\t\t\ttop: $border-offset;\n\t\t\t\t\t\tleft: $border-offset;\n\t\t\t\t\t\twidth: calc($indicator-height - (2 * get(\"toggle-offset\", $definitions)));\n\t\t\t\t\t\theight: calc($indicator-height - (2 * get(\"toggle-offset\", $definitions)));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// STATES\n\t\t\t\t&__input[aria-checked] + #{$class}__indicator {\n\t\t\t\t\t&::before {\n\t\t\t\t\t\tleft: calc($indicator-width - $indicator-height + $border-offset);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlabel {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\t#{$class}__input {\n\t\t\t\t\twidth: $indicator-width;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { createID } from \"../../../utils/string.utils\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\nimport { FormSwitchClass, FormSwitchSizes, FormSwitchSizesType } from \"./constants\"\nimport { govHost, toBoolAttr, toBoolAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { validateWcagLabelFor, validateWcagRef } from \"../../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\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 Fragment from \"../../../helpers/Fragment\"\nimport { FormSwitchEvent } from \"./gov-form-switch.types\"\n\n@Component({\n\ttag: \"gov-form-switch\",\n\tstyleUrl: \"gov-form-switch.scss\",\n})\nexport class GovFormSwitch {\n\tprivate readonly h: GovHost\n\tprivate f: GovForm\n\tprivate inputRef?: HTMLInputElement\n\n\tprivate readonly checkboxId: string\n\tprivate hydrated = false\n\n\tconstructor() {\n\t\tthis.checkboxId = createID(\"GovCheckbox\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormSwitchElement\n\t/**\n\t * Value of switch\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * When you can't use the form label.\n\t */\n\t@Prop({ attribute: \"no-label\" }) readonly noLabel: boolean = false\n\t/**\n\t * Switch button state\n\t */\n\t@Prop({ reflect: true, mutable: true }) checked = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * 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 switch component disabled.\n\t * This prevents users from being able to interact with the switch, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Name of the switch.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Switch's size.\n\t */\n\t@Prop() readonly size?: FormSwitchSizesType = \"m\"\n\t/**\n\t * Custom switch identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * 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 * Emitted when the switch has focus.\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch loses focus.\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<FormSwitchEvent>\n\t/**\n\t * Emitted when the switch change value.\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<FormSwitchEvent>\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSwitchSizes, newValue, FormSwitchClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"type\", \"switch\")\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.f.passAttrToLabel(\"identifier\", this.identifier || this.checkboxId)\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.passControlAttrs()\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\n\t}\n\n\trender() {\n\t\tconst wrapCheckbox = (children) => {\n\t\t\tif (this.noLabel) {\n\t\t\t\treturn (\n\t\t\t\t\t<label>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</label>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn children\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(FormSwitchClass.root)} hydrated={this.hydrated} checked={this.checked} size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t<div class={FormSwitchClass.holder}>\n\t\t\t\t\t{wrapCheckbox(\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tclass={FormSwitchClass.input}\n\t\t\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\t\taria-checked={this.checked}\n\t\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<span class={FormSwitchClass.indicator}></span>\n\t\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t\t</Fragment>,\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: Event) {\n\t\te.stopPropagation()\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.checked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSwitchClass.root,\n\t\t\tchecked: this.checked,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\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\", FormSwitchClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormSwitchClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.checkboxId, this.wcagLabelledBy, FormSwitchClass.root)\n\t}\n}\n"],"version":3}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-cfb57f19.js');
5
+ const index = require('./index-f53beed1.js');
6
6
  const constants = require('./constants-52053f2d.js');
7
7
  const template = require('./template-431f0737.js');
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-cfb57f19.js');
5
+ const index = require('./index-f53beed1.js');
6
6
  const constants = require('./constants-52053f2d.js');
7
7
  const template = require('./template-431f0737.js');
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-cfb57f19.js');
5
+ const index = require('./index-f53beed1.js');
6
6
  const win = require('./win-03714165.js');
7
7
  const template = require('./template-431f0737.js');
8
8
  require('./utils-d263c5c6.js');
@@ -18,7 +18,7 @@ const IconClass = {
18
18
  holder: 'gov-icon__holder',
19
19
  };
20
20
 
21
- const version = "4.0.8-rc21";
21
+ const version = "4.0.8-rc23";
22
22
 
23
23
  const dsVersion = () => {
24
24
  return version;
@@ -2,16 +2,16 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-cfb57f19.js');
5
+ const index = require('./index-f53beed1.js');
6
6
  const template = require('./template-431f0737.js');
7
7
  const win = require('./win-03714165.js');
8
8
  const Fragment = require('./Fragment-52846f79.js');
9
9
  const props = require('./props-edd0d46f.js');
10
- const wcag = require('./wcag-53ebeed1.js');
10
+ const wcag = require('./wcag-0dfd29b6.js');
11
11
  const utils = require('./utils-d263c5c6.js');
12
12
  const variants = require('./variants-85b514ea.js');
13
13
  require('./gov.log-8887c6bc.js');
14
- require('./string.utils-2335838f.js');
14
+ require('./string.utils-b84c81cf.js');
15
15
 
16
16
  const InfobarVariants = utils.pick(variants.Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS']);
17
17
  const InfobarClass = {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-cfb57f19.js');
5
+ const index = require('./index-f53beed1.js');
6
6
  const constants = require('./constants-a33f6e99.js');
7
7
  const template = require('./template-431f0737.js');
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-cfb57f19.js');
5
+ const index = require('./index-f53beed1.js');
6
6
  const constants = require('./constants-a33f6e99.js');
7
7
  const template = require('./template-431f0737.js');
8
8
 
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-f53beed1.js');
6
+ const string_utils = require('./string.utils-b84c81cf.js');
7
+
8
+ const GovLifecycle = class {
9
+ constructor(hostRef) {
10
+ index.registerInstance(this, hostRef);
11
+ this.uniqueId = 'lifecycle-' + string_utils.chr4();
12
+ }
13
+ connectedCallback() {
14
+ console.log('connectedCallback', this.uniqueId);
15
+ }
16
+ disconnectedCallback() {
17
+ console.log('disconnectedCallback', this.uniqueId);
18
+ }
19
+ componentWillLoad() {
20
+ console.log('componentWillLoad', this.uniqueId);
21
+ }
22
+ componentDidLoad() {
23
+ console.log('componentDidLoad', this.uniqueId);
24
+ }
25
+ componentShouldUpdate() {
26
+ console.log('componentShouldUpdate', this.uniqueId);
27
+ }
28
+ componentWillRender() {
29
+ console.log('componentWillRender', this.uniqueId);
30
+ }
31
+ componentDidRender() {
32
+ console.log('componentDidRender', this.uniqueId);
33
+ }
34
+ componentWillUpdate() {
35
+ console.log('componentWillUpdate', this.uniqueId);
36
+ }
37
+ componentDidUpdate() {
38
+ console.log('componentDidUpdate', this.uniqueId);
39
+ }
40
+ render() {
41
+ return (index.h(index.Host, { key: '96a0e961547f60b083824345c4fdf95189c01028', identifier: this.uniqueId }, index.h("span", { key: '3334335d1d07eb6d80bd957f288e92b60e7b203a' }, "lifecycle ", this.uniqueId)));
42
+ }
43
+ };
44
+
45
+ exports.gov_lifecycle = GovLifecycle;
46
+
47
+ //# sourceMappingURL=gov-lifecycle.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"gov-lifecycle.entry.cjs.js","mappings":";;;;;;;MAMa,YAAY;IAGxB;;QACC,IAAI,CAAC,QAAQ,GAAG,YAAY,GAAGA,iBAAI,EAAE,CAAC;KACtC;IAED,iBAAiB;QAChB,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KAChD;IAED,oBAAoB;QACnB,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KACnD;IAED,iBAAiB;QAChB,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KAChD;IAED,gBAAgB;QACf,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KAC/C;IAED,qBAAqB;QACpB,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KACpD;IAED,mBAAmB;QAClB,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KAClD;IAED,kBAAkB;QACjB,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KACjD;IAED,mBAAmB;QAClB,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KAClD;IAED,kBAAkB;QACjB,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KACjD;IAED,MAAM;QACL,QACCC,QAACC,UAAI,qDAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,IAC9BD,mFAAiB,IAAI,CAAC,QAAQ,CAAQ,CAChC,EACN;KACF;;;;;","names":["chr4","h","Host"],"sources":["../../../packages/core/src/components/gov-lifecycle-tester/gov-lifecycle-tester.tsx"],"sourcesContent":["import {Component, h, Host} from '@stencil/core';\nimport {chr4} from \"../../utils/string.utils\";\n\n@Component({\n\ttag: 'gov-lifecycle',\n})\nexport class GovLifecycle {\n\tprivate readonly uniqueId: string;\n\n\tconstructor() {\n\t\tthis.uniqueId = 'lifecycle-' + chr4();\n\t}\n\n\tconnectedCallback() {\n\t\tconsole.log('connectedCallback', this.uniqueId);\n\t}\n\n\tdisconnectedCallback() {\n\t\tconsole.log('disconnectedCallback', this.uniqueId);\n\t}\n\n\tcomponentWillLoad() {\n\t\tconsole.log('componentWillLoad', this.uniqueId);\n\t}\n\n\tcomponentDidLoad() {\n\t\tconsole.log('componentDidLoad', this.uniqueId);\n\t}\n\n\tcomponentShouldUpdate() {\n\t\tconsole.log('componentShouldUpdate', this.uniqueId);\n\t}\n\n\tcomponentWillRender() {\n\t\tconsole.log('componentWillRender', this.uniqueId);\n\t}\n\n\tcomponentDidRender() {\n\t\tconsole.log('componentDidRender', this.uniqueId);\n\t}\n\n\tcomponentWillUpdate() {\n\t\tconsole.log('componentWillUpdate', this.uniqueId);\n\t}\n\n\tcomponentDidUpdate() {\n\t\tconsole.log('componentDidUpdate', this.uniqueId);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host identifier={this.uniqueId}>\n\t\t\t\t<span>lifecycle {this.uniqueId}</span>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-cfb57f19.js');
5
+ const index = require('./index-f53beed1.js');
6
6
  const template = require('./template-431f0737.js');
7
7
 
8
8
  const LoadingClass = {
@@ -20,7 +20,7 @@ const GovLoading = class {
20
20
  this.h = template.govHost(this.host);
21
21
  }
22
22
  render() {
23
- return (index.h(index.Host, { key: '07e1abd92428555bc7651af43bb1beed4be6585c', class: this.h.classes(LoadingClass.root) }, index.h("div", { key: '849c10645767b3f3c2e0caa688b57a5454dc4178', class: LoadingClass.content }, index.h("gov-icon", { key: 'c4175ff66bf22dadb3b6779d9efede6dbb6f85e9', class: template.prepareClasses([LoadingClass.icon, "gov-spin-animation"]), name: "loader" }), index.h("slot", { key: '03e90ff98d83cd748e7b541b579df93de2bcf073' })), index.h("gov-backdrop", { key: 'cbc72236c34803588c4ab1cdcb14f8a420d37238', inverse: true })));
23
+ return (index.h(index.Host, { key: '9a38088a7a1d7197352a2efe6f47316d995a6498', class: this.h.classes(LoadingClass.root) }, index.h("div", { key: '322e1a406e5f220b9d843f8fa4804f49d409c352', class: LoadingClass.content }, index.h("gov-icon", { key: '49a5b5f273320576971a1b13239fe61c893f7d89', class: template.prepareClasses([LoadingClass.icon, "gov-spin-animation"]), name: "loader" }), index.h("slot", { key: '5cccab862e42911ff035cf047b687671f2574c0d' })), index.h("gov-backdrop", { key: '6b68544288d966a0a73207b9746e7080f8daae91', inverse: true })));
24
24
  }
25
25
  get host() { return index.getElement(this); }
26
26
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-cfb57f19.js');
5
+ const index = require('./index-f53beed1.js');
6
6
  const props = require('./props-edd0d46f.js');
7
7
  const variants = require('./variants-85b514ea.js');
8
8
  const utils = require('./utils-d263c5c6.js');
@@ -31,7 +31,7 @@ const GovMessage = class {
31
31
  props.validateProp(variants.Variants, newValue, MessageClass.root);
32
32
  }
33
33
  render() {
34
- return (index.h(index.Host, { key: 'a4909dd27c4a47aedcc54f7fb46771c527240f42', class: this.h.classes(MessageClass.root), variant: this.variant, role: "alert" }, this.h.hasSlot("icon") && (index.h("span", { key: '47fb2c74d8e0a8573bde9c6e536fe19260f49f3f', class: MessageClass.icon }, index.h("slot", { key: 'e80a010d7a56662493af5a730c2fddade7eb3cd9', name: "icon" }))), index.h("div", { key: '1df484c7e6c5ae03defe06faa9e9b9e8ff90930c', class: MessageClass.content }, index.h("slot", { key: '7879e3b732d4cfa9ec843781f6ef81509608f56f' }))));
34
+ return (index.h(index.Host, { key: '69edcf03283f701a745c0c63478a3f019291c723', class: this.h.classes(MessageClass.root), variant: this.variant, role: "alert" }, this.h.hasSlot("icon") && (index.h("span", { key: '8d495b32715eabd44ab7a96b035e6af411bd9dfa', class: MessageClass.icon }, index.h("slot", { key: 'ac8739f3d307531a739283cc5992e839e7562311', name: "icon" }))), index.h("div", { key: 'cabd3c7248345080b9c5dae45c708e194d85f69e', class: MessageClass.content }, index.h("slot", { key: 'f76153be97e337b6efccd2f53b67fe4058efc285' }))));
35
35
  }
36
36
  get host() { return index.getElement(this); }
37
37
  static get watchers() { return {
@@ -2,12 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-cfb57f19.js');
5
+ const index = require('./index-f53beed1.js');
6
6
  const template = require('./template-431f0737.js');
7
7
  const win = require('./win-03714165.js');
8
8
  const gov_log = require('./gov.log-8887c6bc.js');
9
- const wcag = require('./wcag-53ebeed1.js');
10
- const string_utils = require('./string.utils-2335838f.js');
9
+ const wcag = require('./wcag-0dfd29b6.js');
10
+ const string_utils = require('./string.utils-b84c81cf.js');
11
11
  const utils = require('./utils-d263c5c6.js');
12
12
  const constants = require('./constants-1b3eeb21.js');
13
13
 
@@ -71,7 +71,7 @@ const GovModal = class {
71
71
  }
72
72
  render() {
73
73
  const LabelTag = this.labelTag;
74
- return (index.h(index.Host, { key: 'e1525cfa3cdd7b0efeb2385b25a04ea8dbd49bc7', class: this.h.classes(constants.ModalClass.root), open: this.open }, index.h("dialog", { key: 'a1116333c938d11049de61a9531109f346297734', class: constants.ModalClass.dialog, hidden: !this.open, tabindex: template.boolToFocusValue(this.open), open: this.open, "aria-modal": "true", "aria-hidden": template.toBoolAttr(!this.open), "aria-labelledby": this.wcagLabelledBy || this.labelId, "aria-describedby": this.wcagDescribedBy || this.contentId, role: this.role }, index.h("div", { key: '952ca6b5e7d1f4dcc59e09c1495f9aa9a96e56fb', class: constants.ModalClass.inner }, index.h("div", { key: 'b00890579ccd683cd171a6200e972e0f02b5b4d3', class: constants.ModalClass.header }, this.h.hasSlot('icon') && (index.h("div", { key: '7bcf03a0f1c475b0c3553854c885b3d0900894db', class: constants.ModalClass.icon }, index.h("slot", { key: '527c8a9e77dbb2568510b6765634db0234039f8f', name: "icon" }))), this.label && (index.h(LabelTag, { key: 'c96b0339fcc61ba3f834d35926f6ef13419a901a', class: constants.ModalClass.title, id: this.labelId }, this.label)), !(this.blockButtonClose || this.blockClose) ? (index.h("gov-button", { ref: el => (this.closeCtaRef = el), disabled: this.blockClose, class: constants.ModalClass.close, variant: "primary", wcagLabel: this.wcagCloseLabel, wcagLabelledBy: this.wcagCloseLabelledBy, type: "base", "on-gov-click": this.onCloseHandler.bind(this) }, index.h("gov-icon", { name: "x-lg" }))) : null), index.h("div", { key: '47e940a5bf64b87ec065f6c0977546603ca9bb11', class: constants.ModalClass.content, id: this.contentId }, index.h("slot", { key: 'bc97ebe004ffb446c71a4bc0c8086af5d63cf3ec' })), this.h.hasSlot('footer') && (index.h("div", { key: 'c48e97d8c9f597cc544d5e567cb0d679186b868e', class: constants.ModalClass.footer }, index.h("slot", { key: '7c9165dca0a9e20eef86e1937704c0f4154fcfb8', name: "footer" }))))), this.open ? (index.h("gov-backdrop", { "wcag-label": this.wcagCloseLabel, "wcag-labelled-by": this.wcagCloseLabelledBy, "on-gov-click": (e) => !this.blockBackdropClose && this.onCloseHandler(e) })) : null));
74
+ return (index.h(index.Host, { key: '96c413d6f0dafb536c14c922e739d3629489ca86', class: this.h.classes(constants.ModalClass.root), open: this.open }, index.h("dialog", { key: '12ea0d33af22ca72d60767b5c1b24df9efc8e4b6', class: constants.ModalClass.dialog, hidden: !this.open, tabindex: template.boolToFocusValue(this.open), open: this.open, "aria-modal": "true", "aria-hidden": template.toBoolAttr(!this.open), "aria-labelledby": this.wcagLabelledBy || this.labelId, "aria-describedby": this.wcagDescribedBy || this.contentId, role: this.role }, index.h("div", { key: 'ad54729d09b1884def4fa221d6c917a7c1ff2def', class: constants.ModalClass.inner }, index.h("div", { key: '22d4402876b44c14b3012a10f342d04fcf5bc6ff', class: constants.ModalClass.header }, this.h.hasSlot('icon') && (index.h("div", { key: '261018dd7febfa53992da14316a48b7235f9fae2', class: constants.ModalClass.icon }, index.h("slot", { key: 'd39e8ad92db3309fb812d7e8e580b3deb4c18b81', name: "icon" }))), this.label && (index.h(LabelTag, { key: '630ec5259cf9001012a221cb269fc56537a65973', class: constants.ModalClass.title, id: this.labelId }, this.label)), !(this.blockButtonClose || this.blockClose) ? (index.h("gov-button", { ref: el => (this.closeCtaRef = el), disabled: this.blockClose, class: constants.ModalClass.close, variant: "primary", wcagLabel: this.wcagCloseLabel, wcagLabelledBy: this.wcagCloseLabelledBy, type: "base", "on-gov-click": this.onCloseHandler.bind(this) }, index.h("gov-icon", { name: "x-lg" }))) : null), index.h("div", { key: '67445c7a52b04b118fb21f84bacc7d80f6e1d47b', class: constants.ModalClass.content, id: this.contentId }, index.h("slot", { key: 'eef23b93fb59d6241716ea28deca2e3d21aac8cd' })), this.h.hasSlot('footer') && (index.h("div", { key: '4522c4fb756230b7c6ea27cd366471906fbeee72', class: constants.ModalClass.footer }, index.h("slot", { key: '4553a53d2f22de79e1dfc1f3977769c035aab1bb', name: "footer" }))))), this.open ? (index.h("gov-backdrop", { "wcag-label": this.wcagCloseLabel, "wcag-labelled-by": this.wcagCloseLabelledBy, "on-gov-click": (e) => !this.blockBackdropClose && this.onCloseHandler(e) })) : null));
75
75
  }
76
76
  onCloseHandler(e) {
77
77
  e.stopPropagation();
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-cfb57f19.js');
5
+ const index = require('./index-f53beed1.js');
6
6
  const gov_log = require('./gov.log-8887c6bc.js');
7
7
  const constants = require('./constants-fdc5268a.js');
8
8
  require('./win-03714165.js');
@@ -26,7 +26,7 @@ const GovNavItem = class {
26
26
  this.validateHref(this.href);
27
27
  }
28
28
  render() {
29
- return (index.h(index.Host, { key: 'dd8ad75d2391f39589dc1c2d52ef40bb2bf4f750', class: constants.NavItemClass.root, role: "listitem" }, index.h("a", { key: 'a193d5088343a4651ca35fa1ea75e28770de7ad1', href: this.href, class: constants.NavItemClass.link }, index.h("slot", { key: 'dca0edca0e9ecbf13aa3c2e0287ea78dba114505' }))));
29
+ return (index.h(index.Host, { key: 'abc774bf18eefbfd4b247ae6107d19b3a1574457', class: constants.NavItemClass.root, role: "listitem" }, index.h("a", { key: 'ca8f1d499123c8fb0bed9e84168d9bb2ed05c456', href: this.href, class: constants.NavItemClass.link }, index.h("slot", { key: '91ec4497a5ac9bbfbf58dea47497a8ba19d19209' }))));
30
30
  }
31
31
  get host() { return index.getElement(this); }
32
32
  static get watchers() { return {
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-cfb57f19.js');
5
+ const index = require('./index-f53beed1.js');
6
6
  const constants = require('./constants-fdc5268a.js');
7
- const wcag = require('./wcag-53ebeed1.js');
7
+ const wcag = require('./wcag-0dfd29b6.js');
8
8
  const win = require('./win-03714165.js');
9
9
  const utils = require('./utils-d263c5c6.js');
10
10
  require('./gov.log-8887c6bc.js');
11
- require('./string.utils-2335838f.js');
11
+ require('./string.utils-b84c81cf.js');
12
12
 
13
13
  const govNavCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-nav{position:relative;display:block;width:100%;font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);background:var(--gov-nav-bg, var(--gov-color-primary));font-weight:bold;letter-spacing:0.0125em;text-transform:uppercase}@media (min-width: 48em){.gov-nav{text-align:center}.gov-nav__nav{display:flex;justify-content:space-between}}";
14
14
  const GovNavStyle0 = govNavCss;
@@ -26,7 +26,7 @@ const GovNav = class {
26
26
  }
27
27
  }
28
28
  render() {
29
- return (index.h(index.Host, { key: '576cf7d5e744e9577a6c203a08de72a3741b88ad', class: constants.NavClass.root }, index.h("nav", { key: '6b82c1a4a1fb21a78325878d9a23871962d14f1c', class: constants.NavClass.nav, role: 'list', "arial-label": this.wcagLabel, "arial-labelledby": this.wcagLabelledBy }, index.h("slot", { key: 'c8c30f1be87334ba420fe0aa7ccbea43f7ca3b7f' }))));
29
+ return (index.h(index.Host, { key: '0b8fdcbd012af6ef80e119b491c1f96ef9a437df', class: constants.NavClass.root }, index.h("nav", { key: '3b5ba4f8e8c83a378ecfef63e43b8381b364ec30', class: constants.NavClass.nav, role: 'list', "arial-label": this.wcagLabel, "arial-labelledby": this.wcagLabelledBy }, index.h("slot", { key: 'fd1314123fbb143da8c590655bcf81a397159e15' }))));
30
30
  }
31
31
  /**
32
32
  * Validate the WCAG attributes of the component
@@ -2,16 +2,16 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-cfb57f19.js');
5
+ const index = require('./index-f53beed1.js');
6
6
  const Fragment = require('./Fragment-52846f79.js');
7
7
  const props = require('./props-edd0d46f.js');
8
8
  const sizes = require('./sizes-89f8d3b2.js');
9
9
  const variants = require('./variants-85b514ea.js');
10
10
  const utils = require('./utils-d263c5c6.js');
11
11
  const template = require('./template-431f0737.js');
12
- const wcag = require('./wcag-53ebeed1.js');
12
+ const wcag = require('./wcag-0dfd29b6.js');
13
13
  const win = require('./win-03714165.js');
14
- const string_utils = require('./string.utils-2335838f.js');
14
+ const string_utils = require('./string.utils-b84c81cf.js');
15
15
  const array_utils = require('./array.utils-96eadde3.js');
16
16
  require('./gov.log-8887c6bc.js');
17
17
  require('./helpers.types-ff60c9bd.js');