@gov-design-system-ce/components 0.0.6 → 0.0.8

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 (566) hide show
  1. package/dist/cjs/Fragment-52846f79.js +7 -0
  2. package/dist/cjs/Fragment-52846f79.js.map +1 -0
  3. package/dist/cjs/{constants-5f6bbc50.js → constants-245999e7.js} +3 -2
  4. package/dist/cjs/constants-245999e7.js.map +1 -0
  5. package/dist/cjs/{constants-dc2ba6bd.js → constants-61f8be34.js} +3 -3
  6. package/dist/cjs/constants-61f8be34.js.map +1 -0
  7. package/dist/cjs/core.cjs.js +1 -1
  8. package/dist/cjs/gov-accordion-item.cjs.entry.js +2 -2
  9. package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
  10. package/dist/cjs/gov-accordion.cjs.entry.js +2 -1
  11. package/dist/cjs/gov-accordion.cjs.entry.js.map +1 -1
  12. package/dist/cjs/gov-alert.cjs.entry.js +1 -1
  13. package/dist/cjs/gov-alert.cjs.entry.js.map +1 -1
  14. package/dist/cjs/gov-app.cjs.entry.js +673 -165
  15. package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
  16. package/dist/cjs/gov-attachments_3.cjs.entry.js +1 -1
  17. package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
  18. package/dist/cjs/gov-backdrop.cjs.entry.js +4 -3
  19. package/dist/cjs/gov-backdrop.cjs.entry.js.map +1 -1
  20. package/dist/cjs/gov-badge.cjs.entry.js +17 -17
  21. package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
  22. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +1 -1
  23. package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
  24. package/dist/cjs/gov-button.cjs.entry.js +14 -3
  25. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  26. package/dist/cjs/gov-card.cjs.entry.js +1 -1
  27. package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
  28. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +4 -0
  29. package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
  30. package/dist/cjs/gov-form-checkbox.cjs.entry.js +23 -7
  31. package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
  32. package/dist/cjs/gov-form-file.cjs.entry.js +7 -1
  33. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  34. package/dist/cjs/gov-form-input.cjs.entry.js +8 -2
  35. package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
  36. package/dist/cjs/gov-form-multi-select.cjs.entry.js +11 -3
  37. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  38. package/dist/cjs/gov-form-password-power.cjs.entry.js +28 -0
  39. package/dist/cjs/gov-form-password-power.cjs.entry.js.map +1 -0
  40. package/dist/cjs/gov-form-radio.cjs.entry.js +17 -1
  41. package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
  42. package/dist/cjs/gov-form-search.cjs.entry.js +1 -1
  43. package/dist/cjs/gov-form-search.cjs.entry.js.map +1 -1
  44. package/dist/cjs/gov-form-select.cjs.entry.js +3 -3
  45. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  46. package/dist/cjs/gov-form-switch.cjs.entry.js +23 -7
  47. package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
  48. package/dist/cjs/gov-icon.cjs.entry.js +1 -1
  49. package/dist/cjs/gov-modal.cjs.entry.js +19 -13
  50. package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
  51. package/dist/cjs/gov-pagination.cjs.entry.js +50 -16
  52. package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
  53. package/dist/cjs/gov-prompt.cjs.entry.js +12 -6
  54. package/dist/cjs/gov-prompt.cjs.entry.js.map +1 -1
  55. package/dist/cjs/gov-side-nav-item.cjs.entry.js +1 -1
  56. package/dist/cjs/gov-side-nav-item.cjs.entry.js.map +1 -1
  57. package/dist/cjs/gov-spacer.cjs.entry.js +1 -1
  58. package/dist/cjs/gov-spacer.cjs.entry.js.map +1 -1
  59. package/dist/cjs/gov-statsbar-item.cjs.entry.js +1 -1
  60. package/dist/cjs/gov-statsbar.cjs.entry.js +2 -2
  61. package/dist/cjs/gov-statsbar.cjs.entry.js.map +1 -1
  62. package/dist/cjs/gov-tabs.cjs.entry.js +1 -1
  63. package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
  64. package/dist/cjs/gov-tile.cjs.entry.js +3 -2
  65. package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
  66. package/dist/cjs/gov-tiles.cjs.entry.js +2 -1
  67. package/dist/cjs/gov-tiles.cjs.entry.js.map +1 -1
  68. package/dist/cjs/gov-toast.cjs.entry.js +1 -1
  69. package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
  70. package/dist/cjs/gov-wizzard-item.cjs.entry.js +1 -1
  71. package/dist/cjs/gov-wizzard-item.cjs.entry.js.map +1 -1
  72. package/dist/cjs/index-356717ae.js +4 -0
  73. package/dist/cjs/loader.cjs.js +1 -1
  74. package/dist/collection/collection-manifest.json +1 -0
  75. package/dist/collection/components/gov-accordion/gov-accordion-item.css +37 -5
  76. package/dist/collection/components/gov-accordion/gov-accordion-item.js +1 -1
  77. package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
  78. package/dist/collection/components/gov-accordion/gov-accordion.css +6 -0
  79. package/dist/collection/components/gov-accordion/gov-accordion.js +19 -0
  80. package/dist/collection/components/gov-accordion/gov-accordion.js.map +1 -1
  81. package/dist/collection/components/gov-alert/gov-alert.css +3 -0
  82. package/dist/collection/components/gov-alert/gov-alert.js +1 -1
  83. package/dist/collection/components/gov-alert/gov-alert.js.map +1 -1
  84. package/dist/collection/components/gov-app/gov-app.css +3 -0
  85. package/dist/collection/components/gov-attachments/gov-attachments-item.css +3 -0
  86. package/dist/collection/components/gov-attachments/gov-attachments-item.js +1 -1
  87. package/dist/collection/components/gov-attachments/gov-attachments-item.js.map +1 -1
  88. package/dist/collection/components/gov-attachments/gov-attachments.css +3 -0
  89. package/dist/collection/components/gov-backdrop/gov-backdrop.css +3 -0
  90. package/dist/collection/components/gov-backdrop/gov-backdrop.js +5 -4
  91. package/dist/collection/components/gov-backdrop/gov-backdrop.js.map +1 -1
  92. package/dist/collection/components/gov-badge/constants.js +4 -1
  93. package/dist/collection/components/gov-badge/constants.js.map +1 -1
  94. package/dist/collection/components/gov-badge/gov-badge.css +204 -96
  95. package/dist/collection/components/gov-badge/gov-badge.js +26 -47
  96. package/dist/collection/components/gov-badge/gov-badge.js.map +1 -1
  97. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.css +3 -0
  98. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +1 -1
  99. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js.map +1 -1
  100. package/dist/collection/components/gov-button/constants.js +2 -1
  101. package/dist/collection/components/gov-button/constants.js.map +1 -1
  102. package/dist/collection/components/gov-button/gov-button.css +210 -131
  103. package/dist/collection/components/gov-button/gov-button.js +18 -7
  104. package/dist/collection/components/gov-button/gov-button.js.map +1 -1
  105. package/dist/collection/components/gov-card/gov-card.css +3 -0
  106. package/dist/collection/components/gov-card/gov-card.js +1 -1
  107. package/dist/collection/components/gov-card/gov-card.js.map +1 -1
  108. package/dist/collection/components/gov-container/gov-container.css +3 -0
  109. package/dist/collection/components/gov-cookiebar/gov-cookiebar.css +3 -0
  110. package/dist/collection/components/gov-empty/gov-empty.css +3 -0
  111. package/dist/collection/components/gov-error-code/gov-error-code.css +3 -0
  112. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.css +3 -0
  113. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +4 -0
  114. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
  115. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.css +3 -0
  116. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +53 -19
  117. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
  118. package/dist/collection/components/gov-form/control/gov-form-control.css +3 -0
  119. package/dist/collection/components/gov-form/file/gov-form-file.css +3 -0
  120. package/dist/collection/components/gov-form/file/gov-form-file.js +7 -1
  121. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  122. package/dist/collection/components/gov-form/group/gov-form-group.css +3 -0
  123. package/dist/collection/components/gov-form/input/gov-form-input.css +6 -3
  124. package/dist/collection/components/gov-form/input/gov-form-input.js +7 -1
  125. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  126. package/dist/collection/components/gov-form/label/gov-form-label.css +3 -0
  127. package/dist/collection/components/gov-form/message/gov-form-message.css +3 -0
  128. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +3 -3
  129. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +10 -2
  130. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
  131. package/dist/collection/components/gov-form/password-power/constants.js +6 -0
  132. package/dist/collection/components/gov-form/password-power/constants.js.map +1 -0
  133. package/dist/collection/components/gov-form/password-power/gov-form-password-power.css +246 -0
  134. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +43 -0
  135. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js.map +1 -0
  136. package/dist/collection/components/gov-form/radio/gov-form-radio.css +3 -0
  137. package/dist/collection/components/gov-form/radio/gov-form-radio.js +35 -1
  138. package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
  139. package/dist/collection/components/gov-form/search/gov-form-search.css +7 -0
  140. package/dist/collection/components/gov-form/select/gov-form-select.css +3 -3
  141. package/dist/collection/components/gov-form/select/gov-form-select.js +2 -2
  142. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  143. package/dist/collection/components/gov-form/switch/gov-form-switch.css +3 -0
  144. package/dist/collection/components/gov-form/switch/gov-form-switch.js +52 -18
  145. package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
  146. package/dist/collection/components/gov-grid/gov-grid-item.css +3 -0
  147. package/dist/collection/components/gov-grid/gov-grid.css +3 -0
  148. package/dist/collection/components/gov-icon/gov-icon.css +3 -0
  149. package/dist/collection/components/gov-icon/list.js +148 -5
  150. package/dist/collection/components/gov-icon/list.js.map +1 -1
  151. package/dist/collection/components/gov-layout/gov-layout-column.css +3 -0
  152. package/dist/collection/components/gov-layout/gov-layout.css +3 -0
  153. package/dist/collection/components/gov-loading/gov-loading.css +3 -0
  154. package/dist/collection/components/gov-message/gov-message.css +3 -0
  155. package/dist/collection/components/gov-modal/gov-modal.css +6 -3
  156. package/dist/collection/components/gov-modal/gov-modal.js +35 -22
  157. package/dist/collection/components/gov-modal/gov-modal.js.map +1 -1
  158. package/dist/collection/components/gov-nav/gov-nav-item.css +3 -0
  159. package/dist/collection/components/gov-nav/gov-nav.css +3 -0
  160. package/dist/collection/components/gov-pagination/gov-pagination.css +88 -39
  161. package/dist/collection/components/gov-pagination/gov-pagination.js +63 -29
  162. package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
  163. package/dist/collection/components/gov-promp/gov-prompt.css +6 -3
  164. package/dist/collection/components/gov-promp/gov-prompt.js +18 -5
  165. package/dist/collection/components/gov-promp/gov-prompt.js.map +1 -1
  166. package/dist/collection/components/gov-side-nav/gov-side-nav-item.css +3 -0
  167. package/dist/collection/components/gov-side-nav/gov-side-nav-item.js +1 -1
  168. package/dist/collection/components/gov-side-nav/gov-side-nav-item.js.map +1 -1
  169. package/dist/collection/components/gov-side-nav/gov-side-nav.css +3 -0
  170. package/dist/collection/components/gov-spacer/gov-spacer.css +3 -0
  171. package/dist/collection/components/gov-spacer/gov-spacer.js +3 -2
  172. package/dist/collection/components/gov-spacer/gov-spacer.js.map +1 -1
  173. package/dist/collection/components/gov-statsbar/constants.js +1 -1
  174. package/dist/collection/components/gov-statsbar/constants.js.map +1 -1
  175. package/dist/collection/components/gov-statsbar/gov-statsbar-item.css +3 -0
  176. package/dist/collection/components/gov-statsbar/gov-statsbar.css +3 -0
  177. package/dist/collection/components/gov-statsbar/gov-statsbar.js +2 -2
  178. package/dist/collection/components/gov-statsbar/gov-statsbar.js.map +1 -1
  179. package/dist/collection/components/gov-stepper/gov-stepper-item.css +3 -0
  180. package/dist/collection/components/gov-stepper/gov-stepper.css +3 -0
  181. package/dist/collection/components/gov-tabs/gov-tabs-item.css +3 -0
  182. package/dist/collection/components/gov-tabs/gov-tabs.css +3 -0
  183. package/dist/collection/components/gov-tabs/gov-tabs.js +1 -1
  184. package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
  185. package/dist/collection/components/gov-tile/constants.js +1 -0
  186. package/dist/collection/components/gov-tile/constants.js.map +1 -1
  187. package/dist/collection/components/gov-tile/gov-tile.css +11 -4
  188. package/dist/collection/components/gov-tile/gov-tile.js +3 -6
  189. package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
  190. package/dist/collection/components/gov-tiles/gov-tiles.css +6 -0
  191. package/dist/collection/components/gov-tiles/gov-tiles.js +19 -0
  192. package/dist/collection/components/gov-tiles/gov-tiles.js.map +1 -1
  193. package/dist/collection/components/gov-toast/gov-toast.css +3 -0
  194. package/dist/collection/components/gov-toast/gov-toast.js +1 -1
  195. package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
  196. package/dist/collection/components/gov-tooltip/gov-tooltip-content.css +3 -0
  197. package/dist/collection/components/gov-tooltip/gov-tooltip.css +3 -0
  198. package/dist/collection/components/gov-wizzard/gov-wizzard-item.css +3 -0
  199. package/dist/collection/components/gov-wizzard/gov-wizzard-item.js +1 -1
  200. package/dist/collection/components/gov-wizzard/gov-wizzard-item.js.map +1 -1
  201. package/dist/collection/components/gov-wizzard/gov-wizzard.css +3 -0
  202. package/dist/collection/pages/Accordion.js +97 -2
  203. package/dist/collection/pages/Accordion.js.map +1 -1
  204. package/dist/collection/pages/Badge.js +27 -0
  205. package/dist/collection/pages/Badge.js.map +1 -1
  206. package/dist/collection/pages/Button.js +440 -120
  207. package/dist/collection/pages/Button.js.map +1 -1
  208. package/dist/collection/pages/Error.js +1 -1
  209. package/dist/collection/pages/Error.js.map +1 -1
  210. package/dist/collection/pages/Forms.js +46 -29
  211. package/dist/collection/pages/Forms.js.map +1 -1
  212. package/dist/collection/pages/Pagination.js +12 -2
  213. package/dist/collection/pages/Pagination.js.map +1 -1
  214. package/dist/collection/pages/Stepper.js +6 -6
  215. package/dist/collection/pages/Stepper.js.map +1 -1
  216. package/dist/collection/pages/Tiles.js +39 -0
  217. package/dist/collection/pages/Tiles.js.map +1 -1
  218. package/dist/collection/pages/ToastMessage.js +1 -1
  219. package/dist/collection/pages/ToastMessage.js.map +1 -1
  220. package/dist/collection/pages/ToastMessageCountdown.js +1 -1
  221. package/dist/collection/pages/ToastMessageCountdown.js.map +1 -1
  222. package/dist/collection/pages/Wizzard.js +3 -3
  223. package/dist/collection/pages/Wizzard.js.map +1 -1
  224. package/dist/collection/utils/array.utils.js +2 -0
  225. package/dist/collection/utils/array.utils.js.map +1 -0
  226. package/dist/components/Fragment.js +5 -0
  227. package/dist/components/Fragment.js.map +1 -0
  228. package/dist/components/constants11.js +2 -2
  229. package/dist/components/constants11.js.map +1 -1
  230. package/dist/components/constants3.js +2 -1
  231. package/dist/components/constants3.js.map +1 -1
  232. package/dist/components/gov-accordion-item.js +2 -3
  233. package/dist/components/gov-accordion-item.js.map +1 -1
  234. package/dist/components/gov-accordion.js +3 -2
  235. package/dist/components/gov-accordion.js.map +1 -1
  236. package/dist/components/gov-alert.js +1 -2
  237. package/dist/components/gov-alert.js.map +1 -1
  238. package/dist/components/gov-app.js +673 -166
  239. package/dist/components/gov-app.js.map +1 -1
  240. package/dist/components/gov-attachments-item2.js +1 -2
  241. package/dist/components/gov-attachments-item2.js.map +1 -1
  242. package/dist/components/gov-attachments2.js +0 -1
  243. package/dist/components/gov-attachments2.js.map +1 -1
  244. package/dist/components/gov-backdrop2.js +5 -5
  245. package/dist/components/gov-backdrop2.js.map +1 -1
  246. package/dist/components/gov-badge2.js +16 -18
  247. package/dist/components/gov-badge2.js.map +1 -1
  248. package/dist/components/gov-breadcrumbs.js +1 -2
  249. package/dist/components/gov-breadcrumbs.js.map +1 -1
  250. package/dist/components/gov-button2.js +17 -7
  251. package/dist/components/gov-button2.js.map +1 -1
  252. package/dist/components/gov-card.js +1 -2
  253. package/dist/components/gov-card.js.map +1 -1
  254. package/dist/components/gov-container.js +0 -1
  255. package/dist/components/gov-container.js.map +1 -1
  256. package/dist/components/gov-cookiebar.js +0 -1
  257. package/dist/components/gov-cookiebar.js.map +1 -1
  258. package/dist/components/gov-empty.js +0 -1
  259. package/dist/components/gov-empty.js.map +1 -1
  260. package/dist/components/gov-error-code.js +0 -1
  261. package/dist/components/gov-error-code.js.map +1 -1
  262. package/dist/components/gov-form-autocomplete2.js +4 -1
  263. package/dist/components/gov-form-autocomplete2.js.map +1 -1
  264. package/dist/components/gov-form-checkbox.js +24 -8
  265. package/dist/components/gov-form-checkbox.js.map +1 -1
  266. package/dist/components/gov-form-control.js +0 -1
  267. package/dist/components/gov-form-control.js.map +1 -1
  268. package/dist/components/gov-form-file.js +7 -2
  269. package/dist/components/gov-form-file.js.map +1 -1
  270. package/dist/components/gov-form-group.js +0 -1
  271. package/dist/components/gov-form-group.js.map +1 -1
  272. package/dist/components/gov-form-input2.js +8 -3
  273. package/dist/components/gov-form-input2.js.map +1 -1
  274. package/dist/components/gov-form-label.js +0 -1
  275. package/dist/components/gov-form-label.js.map +1 -1
  276. package/dist/components/gov-form-message2.js +0 -1
  277. package/dist/components/gov-form-message2.js.map +1 -1
  278. package/dist/components/gov-form-multi-select.js +11 -4
  279. package/dist/components/gov-form-multi-select.js.map +1 -1
  280. package/dist/components/gov-form-password-power.d.ts +11 -0
  281. package/dist/components/gov-form-password-power.js +43 -0
  282. package/dist/components/gov-form-password-power.js.map +1 -0
  283. package/dist/components/gov-form-radio.js +18 -2
  284. package/dist/components/gov-form-radio.js.map +1 -1
  285. package/dist/components/gov-form-search.js +1 -2
  286. package/dist/components/gov-form-search.js.map +1 -1
  287. package/dist/components/gov-form-select2.js +3 -4
  288. package/dist/components/gov-form-select2.js.map +1 -1
  289. package/dist/components/gov-form-switch.js +24 -8
  290. package/dist/components/gov-form-switch.js.map +1 -1
  291. package/dist/components/gov-grid-item.js +0 -1
  292. package/dist/components/gov-grid-item.js.map +1 -1
  293. package/dist/components/gov-grid.js +0 -1
  294. package/dist/components/gov-grid.js.map +1 -1
  295. package/dist/components/gov-icon2.js +1 -2
  296. package/dist/components/gov-icon2.js.map +1 -1
  297. package/dist/components/gov-layout-column.js +0 -1
  298. package/dist/components/gov-layout-column.js.map +1 -1
  299. package/dist/components/gov-layout.js +0 -1
  300. package/dist/components/gov-layout.js.map +1 -1
  301. package/dist/components/gov-loading.js +0 -1
  302. package/dist/components/gov-loading.js.map +1 -1
  303. package/dist/components/gov-message.js +0 -1
  304. package/dist/components/gov-message.js.map +1 -1
  305. package/dist/components/gov-modal.js +20 -14
  306. package/dist/components/gov-modal.js.map +1 -1
  307. package/dist/components/gov-nav-item.js +0 -1
  308. package/dist/components/gov-nav-item.js.map +1 -1
  309. package/dist/components/gov-nav.js +0 -1
  310. package/dist/components/gov-nav.js.map +1 -1
  311. package/dist/components/gov-pagination.js +50 -17
  312. package/dist/components/gov-pagination.js.map +1 -1
  313. package/dist/components/gov-prompt.js +13 -7
  314. package/dist/components/gov-prompt.js.map +1 -1
  315. package/dist/components/gov-side-nav-item.js +1 -2
  316. package/dist/components/gov-side-nav-item.js.map +1 -1
  317. package/dist/components/gov-side-nav.js +0 -1
  318. package/dist/components/gov-side-nav.js.map +1 -1
  319. package/dist/components/gov-spacer.js +1 -2
  320. package/dist/components/gov-spacer.js.map +1 -1
  321. package/dist/components/gov-statsbar-item.js +0 -1
  322. package/dist/components/gov-statsbar-item.js.map +1 -1
  323. package/dist/components/gov-statsbar.js +2 -3
  324. package/dist/components/gov-statsbar.js.map +1 -1
  325. package/dist/components/gov-stepper-item.js +0 -1
  326. package/dist/components/gov-stepper-item.js.map +1 -1
  327. package/dist/components/gov-stepper.js +0 -1
  328. package/dist/components/gov-stepper.js.map +1 -1
  329. package/dist/components/gov-tabs-item.js +0 -1
  330. package/dist/components/gov-tabs-item.js.map +1 -1
  331. package/dist/components/gov-tabs.js +1 -2
  332. package/dist/components/gov-tabs.js.map +1 -1
  333. package/dist/components/gov-tile.js +3 -3
  334. package/dist/components/gov-tile.js.map +1 -1
  335. package/dist/components/gov-tiles.js +4 -3
  336. package/dist/components/gov-tiles.js.map +1 -1
  337. package/dist/components/gov-toast.js +1 -2
  338. package/dist/components/gov-toast.js.map +1 -1
  339. package/dist/components/gov-tooltip-content.js +0 -1
  340. package/dist/components/gov-tooltip-content.js.map +1 -1
  341. package/dist/components/gov-tooltip.js +0 -1
  342. package/dist/components/gov-tooltip.js.map +1 -1
  343. package/dist/components/gov-wizzard-item.js +1 -2
  344. package/dist/components/gov-wizzard-item.js.map +1 -1
  345. package/dist/components/gov-wizzard.js +0 -1
  346. package/dist/components/gov-wizzard.js.map +1 -1
  347. package/dist/components/index.d.ts +1 -0
  348. package/dist/components/index.js +1 -0
  349. package/dist/components/index.js.map +1 -1
  350. package/dist/core/core.css +1 -1
  351. package/dist/core/core.esm.js +1 -1
  352. package/dist/core/core.esm.js.map +1 -1
  353. package/dist/core/{p-e7dd2002.entry.js → p-00e1e600.entry.js} +2 -2
  354. package/dist/core/p-00e1e600.entry.js.map +1 -0
  355. package/dist/core/{p-ae3e2d60.entry.js → p-04fc18ab.entry.js} +2 -2
  356. package/dist/core/p-04fc18ab.entry.js.map +1 -0
  357. package/dist/core/p-0950ba85.entry.js +2 -0
  358. package/dist/core/p-0950ba85.entry.js.map +1 -0
  359. package/dist/core/{p-5fa41af9.js → p-1020a160.js} +1 -1
  360. package/dist/core/p-1020a160.js.map +1 -0
  361. package/dist/core/{p-9e6a41cc.entry.js → p-16608a87.entry.js} +2 -2
  362. package/dist/core/p-16608a87.entry.js.map +1 -0
  363. package/dist/core/{p-f5ee7634.entry.js → p-1bb5184f.entry.js} +2 -2
  364. package/dist/core/{p-f5ee7634.entry.js.map → p-1bb5184f.entry.js.map} +1 -1
  365. package/dist/core/p-1c06fb0b.entry.js +2 -0
  366. package/dist/core/p-1c06fb0b.entry.js.map +1 -0
  367. package/dist/core/p-1c1d0bbe.js +2 -0
  368. package/dist/core/p-1c1d0bbe.js.map +1 -0
  369. package/dist/core/{p-b48a3112.entry.js → p-4b375a4d.entry.js} +2 -2
  370. package/dist/core/{p-b48a3112.entry.js.map → p-4b375a4d.entry.js.map} +1 -1
  371. package/dist/core/p-5b4e3bdf.entry.js +2 -0
  372. package/dist/core/p-5b4e3bdf.entry.js.map +1 -0
  373. package/dist/core/p-613d8ed8.entry.js +2 -0
  374. package/dist/core/p-613d8ed8.entry.js.map +1 -0
  375. package/dist/core/{p-6d40721b.entry.js → p-63d2e8ec.entry.js} +2 -2
  376. package/dist/core/{p-6d40721b.entry.js.map → p-63d2e8ec.entry.js.map} +1 -1
  377. package/dist/core/{p-f5ffcb3d.entry.js → p-72b9e63a.entry.js} +2 -2
  378. package/dist/core/{p-5cecdaaf.entry.js → p-72f16a95.entry.js} +2 -2
  379. package/dist/core/p-7ac5f119.entry.js +2 -0
  380. package/dist/core/{p-63079b80.entry.js.map → p-7ac5f119.entry.js.map} +1 -1
  381. package/dist/core/{p-03d40bf4.entry.js → p-833ab414.entry.js} +2 -2
  382. package/dist/core/{p-03d40bf4.entry.js.map → p-833ab414.entry.js.map} +1 -1
  383. package/dist/core/{p-34360f92.entry.js → p-84fda9dd.entry.js} +2 -2
  384. package/dist/core/{p-34360f92.entry.js.map → p-84fda9dd.entry.js.map} +1 -1
  385. package/dist/core/p-851939ff.entry.js +2 -0
  386. package/dist/core/p-851939ff.entry.js.map +1 -0
  387. package/dist/core/p-8dacc8dc.entry.js +2 -0
  388. package/dist/core/p-8dacc8dc.entry.js.map +1 -0
  389. package/dist/core/p-8dbad4a2.entry.js +2 -0
  390. package/dist/core/p-8dbad4a2.entry.js.map +1 -0
  391. package/dist/core/p-902002e9.entry.js +2 -0
  392. package/dist/core/p-902002e9.entry.js.map +1 -0
  393. package/dist/core/p-95f21fbf.entry.js +2 -0
  394. package/dist/core/p-95f21fbf.entry.js.map +1 -0
  395. package/dist/core/p-99155ec0.entry.js +2 -0
  396. package/dist/core/p-99155ec0.entry.js.map +1 -0
  397. package/dist/core/{p-7591ecd4.entry.js → p-9ca0a11c.entry.js} +2 -2
  398. package/dist/core/{p-7591ecd4.entry.js.map → p-9ca0a11c.entry.js.map} +1 -1
  399. package/dist/core/p-9ceeba49.entry.js +2 -0
  400. package/dist/core/p-9ceeba49.entry.js.map +1 -0
  401. package/dist/core/{p-ec617f18.entry.js → p-9d30e79e.entry.js} +2 -2
  402. package/dist/core/{p-ec617f18.entry.js.map → p-9d30e79e.entry.js.map} +1 -1
  403. package/dist/core/{p-38fb2d42.entry.js → p-a36234bb.entry.js} +2 -2
  404. package/dist/core/p-a36234bb.entry.js.map +1 -0
  405. package/dist/core/p-ac33c5ef.entry.js +2 -0
  406. package/dist/core/p-ac33c5ef.entry.js.map +1 -0
  407. package/dist/core/p-b966062a.entry.js +2 -0
  408. package/dist/core/p-b966062a.entry.js.map +1 -0
  409. package/dist/core/{p-fc1581f9.entry.js → p-bd560ffc.entry.js} +2 -2
  410. package/dist/core/{p-fc1581f9.entry.js.map → p-bd560ffc.entry.js.map} +1 -1
  411. package/dist/core/{p-93facb4a.entry.js → p-c0430e75.entry.js} +2 -2
  412. package/dist/core/p-c0430e75.entry.js.map +1 -0
  413. package/dist/core/p-c9948e57.entry.js +2 -0
  414. package/dist/core/p-c9948e57.entry.js.map +1 -0
  415. package/dist/core/p-cd869237.js +2 -0
  416. package/dist/core/p-cd869237.js.map +1 -0
  417. package/dist/core/{p-9cc6ed83.entry.js → p-e57d250f.entry.js} +2 -2
  418. package/dist/core/p-e57d250f.entry.js.map +1 -0
  419. package/dist/core/p-ecdfb046.entry.js +2 -0
  420. package/dist/core/p-ecdfb046.entry.js.map +1 -0
  421. package/dist/core/p-fac1c202.entry.js +2 -0
  422. package/dist/core/p-fac1c202.entry.js.map +1 -0
  423. package/dist/custom-elements/index.d.ts +6 -0
  424. package/dist/custom-elements/index.js +1 -1
  425. package/dist/custom-elements/index.js.map +1 -1
  426. package/dist/esm/Fragment-8d8d54fb.js +5 -0
  427. package/dist/esm/Fragment-8d8d54fb.js.map +1 -0
  428. package/dist/esm/{constants-d550c816.js → constants-037c35bc.js} +3 -3
  429. package/dist/esm/constants-037c35bc.js.map +1 -0
  430. package/dist/esm/{constants-1a2146b2.js → constants-45f6db4c.js} +3 -2
  431. package/dist/esm/constants-45f6db4c.js.map +1 -0
  432. package/dist/esm/core.js +1 -1
  433. package/dist/esm/gov-accordion-item.entry.js +2 -2
  434. package/dist/esm/gov-accordion-item.entry.js.map +1 -1
  435. package/dist/esm/gov-accordion.entry.js +2 -1
  436. package/dist/esm/gov-accordion.entry.js.map +1 -1
  437. package/dist/esm/gov-alert.entry.js +1 -1
  438. package/dist/esm/gov-alert.entry.js.map +1 -1
  439. package/dist/esm/gov-app.entry.js +673 -165
  440. package/dist/esm/gov-app.entry.js.map +1 -1
  441. package/dist/esm/gov-attachments_3.entry.js +1 -1
  442. package/dist/esm/gov-attachments_3.entry.js.map +1 -1
  443. package/dist/esm/gov-backdrop.entry.js +5 -4
  444. package/dist/esm/gov-backdrop.entry.js.map +1 -1
  445. package/dist/esm/gov-badge.entry.js +17 -17
  446. package/dist/esm/gov-badge.entry.js.map +1 -1
  447. package/dist/esm/gov-breadcrumbs.entry.js +1 -1
  448. package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
  449. package/dist/esm/gov-button.entry.js +14 -3
  450. package/dist/esm/gov-button.entry.js.map +1 -1
  451. package/dist/esm/gov-card.entry.js +1 -1
  452. package/dist/esm/gov-card.entry.js.map +1 -1
  453. package/dist/esm/gov-form-autocomplete.entry.js +4 -0
  454. package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
  455. package/dist/esm/gov-form-checkbox.entry.js +23 -7
  456. package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
  457. package/dist/esm/gov-form-file.entry.js +7 -1
  458. package/dist/esm/gov-form-file.entry.js.map +1 -1
  459. package/dist/esm/gov-form-input.entry.js +8 -2
  460. package/dist/esm/gov-form-input.entry.js.map +1 -1
  461. package/dist/esm/gov-form-multi-select.entry.js +11 -3
  462. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  463. package/dist/esm/gov-form-password-power.entry.js +24 -0
  464. package/dist/esm/gov-form-password-power.entry.js.map +1 -0
  465. package/dist/esm/gov-form-radio.entry.js +17 -1
  466. package/dist/esm/gov-form-radio.entry.js.map +1 -1
  467. package/dist/esm/gov-form-search.entry.js +1 -1
  468. package/dist/esm/gov-form-search.entry.js.map +1 -1
  469. package/dist/esm/gov-form-select.entry.js +3 -3
  470. package/dist/esm/gov-form-select.entry.js.map +1 -1
  471. package/dist/esm/gov-form-switch.entry.js +23 -7
  472. package/dist/esm/gov-form-switch.entry.js.map +1 -1
  473. package/dist/esm/gov-icon.entry.js +1 -1
  474. package/dist/esm/gov-modal.entry.js +19 -13
  475. package/dist/esm/gov-modal.entry.js.map +1 -1
  476. package/dist/esm/gov-pagination.entry.js +50 -16
  477. package/dist/esm/gov-pagination.entry.js.map +1 -1
  478. package/dist/esm/gov-prompt.entry.js +12 -6
  479. package/dist/esm/gov-prompt.entry.js.map +1 -1
  480. package/dist/esm/gov-side-nav-item.entry.js +1 -1
  481. package/dist/esm/gov-side-nav-item.entry.js.map +1 -1
  482. package/dist/esm/gov-spacer.entry.js +1 -1
  483. package/dist/esm/gov-spacer.entry.js.map +1 -1
  484. package/dist/esm/gov-statsbar-item.entry.js +1 -1
  485. package/dist/esm/gov-statsbar.entry.js +2 -2
  486. package/dist/esm/gov-statsbar.entry.js.map +1 -1
  487. package/dist/esm/gov-tabs.entry.js +1 -1
  488. package/dist/esm/gov-tabs.entry.js.map +1 -1
  489. package/dist/esm/gov-tile.entry.js +3 -2
  490. package/dist/esm/gov-tile.entry.js.map +1 -1
  491. package/dist/esm/gov-tiles.entry.js +2 -1
  492. package/dist/esm/gov-tiles.entry.js.map +1 -1
  493. package/dist/esm/gov-toast.entry.js +1 -1
  494. package/dist/esm/gov-toast.entry.js.map +1 -1
  495. package/dist/esm/gov-wizzard-item.entry.js +1 -1
  496. package/dist/esm/gov-wizzard-item.entry.js.map +1 -1
  497. package/dist/esm/index-00e9a0d5.js +4 -0
  498. package/dist/esm/loader.js +1 -1
  499. package/dist/hydrate/index.js +946 -271
  500. package/dist/types/components/gov-accordion/gov-accordion.d.ts +4 -0
  501. package/dist/types/components/gov-badge/constants.d.ts +4 -2
  502. package/dist/types/components/gov-badge/gov-badge.d.ts +4 -9
  503. package/dist/types/components/gov-button/constants.d.ts +3 -2
  504. package/dist/types/components/gov-button/gov-button.d.ts +2 -0
  505. package/dist/types/components/gov-form/checkbox/gov-form-checkbox.d.ts +8 -3
  506. package/dist/types/components/gov-form/file/gov-form-file.d.ts +1 -0
  507. package/dist/types/components/gov-form/password-power/constants.d.ts +5 -0
  508. package/dist/types/components/gov-form/password-power/gov-form-password-power.d.ts +7 -0
  509. package/dist/types/components/gov-form/radio/gov-form-radio.d.ts +5 -0
  510. package/dist/types/components/gov-form/switch/gov-form-switch.d.ts +8 -3
  511. package/dist/types/components/gov-modal/gov-modal.d.ts +3 -1
  512. package/dist/types/components/gov-pagination/gov-pagination.d.ts +7 -3
  513. package/dist/types/components/gov-promp/gov-prompt.d.ts +3 -1
  514. package/dist/types/components/gov-statsbar/constants.d.ts +2 -2
  515. package/dist/types/components/gov-tile/constants.d.ts +1 -0
  516. package/dist/types/components/gov-tile/gov-tile.d.ts +1 -2
  517. package/dist/types/components/gov-tiles/gov-tiles.d.ts +4 -0
  518. package/dist/types/components.d.ts +65 -14
  519. package/dist/types/utils/array.utils.d.ts +1 -0
  520. package/package.json +1 -1
  521. package/dist/cjs/constants-5f6bbc50.js.map +0 -1
  522. package/dist/cjs/constants-dc2ba6bd.js.map +0 -1
  523. package/dist/core/p-00182e76.entry.js +0 -2
  524. package/dist/core/p-00182e76.entry.js.map +0 -1
  525. package/dist/core/p-0278fcb3.entry.js +0 -2
  526. package/dist/core/p-0278fcb3.entry.js.map +0 -1
  527. package/dist/core/p-08f14c8b.entry.js +0 -2
  528. package/dist/core/p-08f14c8b.entry.js.map +0 -1
  529. package/dist/core/p-0a152bb7.entry.js +0 -2
  530. package/dist/core/p-0a152bb7.entry.js.map +0 -1
  531. package/dist/core/p-14f8f2fb.js +0 -2
  532. package/dist/core/p-14f8f2fb.js.map +0 -1
  533. package/dist/core/p-2128abe1.entry.js +0 -2
  534. package/dist/core/p-2128abe1.entry.js.map +0 -1
  535. package/dist/core/p-22722ff3.entry.js +0 -2
  536. package/dist/core/p-22722ff3.entry.js.map +0 -1
  537. package/dist/core/p-2419f4cd.entry.js +0 -2
  538. package/dist/core/p-2419f4cd.entry.js.map +0 -1
  539. package/dist/core/p-38fb2d42.entry.js.map +0 -1
  540. package/dist/core/p-4681cb3a.entry.js +0 -2
  541. package/dist/core/p-4681cb3a.entry.js.map +0 -1
  542. package/dist/core/p-469273be.entry.js +0 -2
  543. package/dist/core/p-469273be.entry.js.map +0 -1
  544. package/dist/core/p-5547dbb0.entry.js +0 -2
  545. package/dist/core/p-5547dbb0.entry.js.map +0 -1
  546. package/dist/core/p-5fa41af9.js.map +0 -1
  547. package/dist/core/p-63079b80.entry.js +0 -2
  548. package/dist/core/p-8965f84a.entry.js +0 -2
  549. package/dist/core/p-8965f84a.entry.js.map +0 -1
  550. package/dist/core/p-93facb4a.entry.js.map +0 -1
  551. package/dist/core/p-9cc6ed83.entry.js.map +0 -1
  552. package/dist/core/p-9e6a41cc.entry.js.map +0 -1
  553. package/dist/core/p-ad0cc981.entry.js +0 -2
  554. package/dist/core/p-ad0cc981.entry.js.map +0 -1
  555. package/dist/core/p-ae3e2d60.entry.js.map +0 -1
  556. package/dist/core/p-e52a042f.entry.js +0 -2
  557. package/dist/core/p-e52a042f.entry.js.map +0 -1
  558. package/dist/core/p-e7dd2002.entry.js.map +0 -1
  559. package/dist/core/p-f2dc8ce3.entry.js +0 -2
  560. package/dist/core/p-f2dc8ce3.entry.js.map +0 -1
  561. package/dist/core/p-fc91591d.entry.js +0 -2
  562. package/dist/core/p-fc91591d.entry.js.map +0 -1
  563. package/dist/esm/constants-1a2146b2.js.map +0 -1
  564. package/dist/esm/constants-d550c816.js.map +0 -1
  565. /package/dist/core/{p-f5ffcb3d.entry.js.map → p-72b9e63a.entry.js.map} +0 -0
  566. /package/dist/core/{p-5cecdaaf.entry.js.map → p-72f16a95.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{r as e,c as o,h as t,H as r,g as n}from"./p-682c7cc6.js";import{v as a}from"./p-26acf964.js";import{b as i,B as v,T as s,N as l}from"./p-14f8f2fb.js";import{g,p as b,t as u,a as d}from"./p-3f37ddb6.js";import{S as c}from"./p-55500e5a.js";import{a as m,v as p}from"./p-364b4792.js";import{c as y}from"./p-c20102ff.js";import{d as h}from"./p-03990da5.js";import"./p-561fa17b.js";import"./p-ff7365ae.js";import"./p-24636c53.js";function w(e){if(typeof e==="string"){return["true","True","TRUE","1"].indexOf(e)!==-1}else if(typeof e==="number"){return e>0}else if(typeof e==="boolean"){return e}else{return e?true:false}}const x='.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)}}.gov-button{display:inline-flex}.gov-button .element{margin:0;padding:0;font-family:var(--gov-font-family, "Roboto", sans-serif);font-weight:400;box-sizing:border-box;display:inline-flex;vertical-align:middle;justify-content:center;align-items:center;border:0;background-color:transparent;text-align:center;text-decoration:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:var(--gov-button-border-width, 0.0625rem) solid transparent;transition:background-color 150ms ease-in-out, border-color 150ms ease-in-out, color 150ms ease-in-out;cursor:inherit;will-change:background-color, border-color}.gov-button .element:focus{outline:none}.gov-button .element .gov-icon{flex:0 0 auto;color:inherit}.gov-button .element>*{display:flex}[hoverable].gov-button .element{cursor:pointer}[hoverable].gov-button .element:focus{outline:none}[hoverable].gov-button .element:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0.0625rem}[hoverable][type=outlined].gov-button .element:focus-visible,[hoverable][type=base].gov-button .element:focus-visible{outline-offset:0}[hoverable][disabled=""].gov-button,[hoverable][disabled=true i].gov-button,[hoverable][disabled="1"].gov-button{cursor:not-allowed}[hoverable][disabled=""].gov-button .element,[hoverable][disabled=true i].gov-button .element,[hoverable][disabled="1"].gov-button .element{pointer-events:none}[expanded=""].gov-button,[expanded=true i].gov-button,[expanded="1"].gov-button{display:block}[expanded=""].gov-button .element,[expanded=true i].gov-button .element,[expanded="1"].gov-button .element{display:flex;width:100%;margin-right:0;margin-left:0}[type=solid][variant=primary].gov-button .element{background-color:var(--gov-button-primary-solid-bg, var(--gov-color-primary));color:var(--gov-button-primary-solid-color, var(--gov-color-neutral-white));border-width:0}[type=solid][variant=primary][inverse=""].gov-button .element,[type=solid][variant=primary][inverse=true i].gov-button .element,[type=solid][variant=primary][inverse="1"].gov-button .element{color:var(--gov-button-primary-solid-inverse-color, var(--gov-color-primary));background-color:var(--gov-button-primary-solid-inverse-bg, var(--gov-color-primary-200))}[type=solid][variant=primary][inverse=""].gov-button .element:focus-visible,[type=solid][variant=primary][inverse=true i].gov-button .element:focus-visible,[type=solid][variant=primary][inverse="1"].gov-button .element:focus-visible{background-color:var(--gov-button-primary-solid-inverse-focus-bg, var(--gov-color-neutral-white))}[type=solid][variant=primary][disabled=""].gov-button .element,[type=solid][variant=primary][disabled=true i].gov-button .element,[type=solid][variant=primary][disabled="1"].gov-button .element{background-color:var(--gov-button-primary-solid-disabled-bg, var(--gov-color-primary-300));color:var(--gov-button-primary-solid-disabled-color, var(--gov-color-neutral-white))}[type=solid][variant=primary][disabled=""][inverse=""].gov-button .element,[type=solid][variant=primary][disabled=""][inverse=true i].gov-button .element,[type=solid][variant=primary][disabled=""][inverse="1"].gov-button .element,[type=solid][variant=primary][disabled=true i][inverse=""].gov-button .element,[type=solid][variant=primary][disabled=true i][inverse=true i].gov-button .element,[type=solid][variant=primary][disabled=true i][inverse="1"].gov-button .element,[type=solid][variant=primary][disabled="1"][inverse=""].gov-button .element,[type=solid][variant=primary][disabled="1"][inverse=true i].gov-button .element,[type=solid][variant=primary][disabled="1"][inverse="1"].gov-button .element{background-color:var(--gov-button-primary-solid-inverse-disabled-bg, var(--gov-color-primary-300));color:var(--gov-button-primary-solid-inverse-disabled-color, var(--gov-color-primary-400))}@media not all and (pointer: coarse){[type=solid][variant=primary][hoverable].gov-button .element:hover{background-color:var(--gov-button-primary-solid-hover-bg, var(--gov-color-primary-700));color:var(--gov-button-primary-solid-hover-color, var(--gov-color-neutral-white))}[type=solid][variant=primary][hoverable].gov-button .element:hover:active{background-color:var(--gov-button-primary-solid-active-bg, var(--gov-color-primary-800))}}@media not all and (pointer: coarse){[type=solid][variant=primary][hoverable][inverse=""].gov-button .element:hover,[type=solid][variant=primary][hoverable][inverse=true i].gov-button .element:hover,[type=solid][variant=primary][hoverable][inverse="1"].gov-button .element:hover{background-color:var(--gov-button-primary-solid-inverse-hover-bg, var(--gov-color-primary-700));color:var(--gov-button-primary-solid-inverse-hover-color, var(--gov-color-neutral-white))}[type=solid][variant=primary][hoverable][inverse=""].gov-button .element:hover:active,[type=solid][variant=primary][hoverable][inverse=true i].gov-button .element:hover:active,[type=solid][variant=primary][hoverable][inverse="1"].gov-button .element:hover:active{background-color:var(--gov-button-primary-solid-inverse-active-bg, var(--gov-color-primary-800))}}[type=outlined][variant=primary].gov-button .element{color:var(--gov-button-primary-outlined-color, var(--gov-color-primary));border-color:var(--gov-button-primary-outlined-border, var(--gov-color-primary))}[type=outlined][variant=primary][inverse=""].gov-button .element,[type=outlined][variant=primary][inverse=true i].gov-button .element,[type=outlined][variant=primary][inverse="1"].gov-button .element{color:var(--gov-button-primary-outlined-inverse-color, var(--gov-color-neutral-white));background-color:var(--gov-button-primary-outlined-inverse-bg, transparent);border-color:var(--gov-button-primary-outlined-inverse-border, var(--gov-color-neutral-white))}[type=outlined][variant=primary][inverse=""].gov-button .element:focus-visible,[type=outlined][variant=primary][inverse=true i].gov-button .element:focus-visible,[type=outlined][variant=primary][inverse="1"].gov-button .element:focus-visible{background-color:var(--gov-button-primary-outlined-inverse-focus-bg, transparent)}[type=outlined][variant=primary][disabled=""].gov-button .element,[type=outlined][variant=primary][disabled=true i].gov-button .element,[type=outlined][variant=primary][disabled="1"].gov-button .element{background-color:var(--gov-button-primary-outlined-disabled-bg, transparent);color:var(--gov-button-primary-outlined-disabled-color, var(--gov-color-primary-400));border-color:var(--gov-button-primary-outlined-disabled-border, var(--gov-color-primary-300))}[type=outlined][variant=primary][disabled=""][inverse=""].gov-button .element,[type=outlined][variant=primary][disabled=""][inverse=true i].gov-button .element,[type=outlined][variant=primary][disabled=""][inverse="1"].gov-button .element,[type=outlined][variant=primary][disabled=true i][inverse=""].gov-button .element,[type=outlined][variant=primary][disabled=true i][inverse=true i].gov-button .element,[type=outlined][variant=primary][disabled=true i][inverse="1"].gov-button .element,[type=outlined][variant=primary][disabled="1"][inverse=""].gov-button .element,[type=outlined][variant=primary][disabled="1"][inverse=true i].gov-button .element,[type=outlined][variant=primary][disabled="1"][inverse="1"].gov-button .element{background-color:var(--gov-button-primary-outlined-inverse-disabled-bg, var(--gov-color-primary-300));color:var(--gov-button-primary-outlined-inverse-disabled-color, var(--gov-color-primary-400));border-color:var(--gov-button-primary-outlined-inverse-disabled-border-color, var(--gov-color-primary-400))}@media not all and (pointer: coarse){[type=outlined][variant=primary][hoverable].gov-button .element:hover{background-color:var(--gov-button-primary-outlined-hover-bg, var(--gov-color-primary-100));color:var(--gov-button-primary-outlined-hover-color, var(--gov-color-primary))}[type=outlined][variant=primary][hoverable].gov-button .element:hover:active{background-color:var(--gov-button-primary-outlined-active-bg, var(--gov-color-primary-300))}}@media not all and (pointer: coarse){[type=outlined][variant=primary][hoverable][inverse=""].gov-button .element:hover,[type=outlined][variant=primary][hoverable][inverse=true i].gov-button .element:hover,[type=outlined][variant=primary][hoverable][inverse="1"].gov-button .element:hover{background-color:var(--gov-button-primary-outlined-inverse-hover-bg, var(--gov-color-primary-500));color:var(--gov-button-primary-outlined-inverse-hover-color, var(--gov-color-neutral-white))}[type=outlined][variant=primary][hoverable][inverse=""].gov-button .element:hover:active,[type=outlined][variant=primary][hoverable][inverse=true i].gov-button .element:hover:active,[type=outlined][variant=primary][hoverable][inverse="1"].gov-button .element:hover:active{background-color:var(--gov-button-primary-outlined-inverse-active-bg, var(--gov-color-primary-400))}}[type=base][variant=primary].gov-button .element{color:var(--gov-button-primary-base-color, var(--gov-color-primary));border-width:0}[type=base][variant=primary][inverse=""].gov-button .element,[type=base][variant=primary][inverse=true i].gov-button .element,[type=base][variant=primary][inverse="1"].gov-button .element{color:var(--gov-button-primary-base-inverse-color, var(--gov-color-neutral-white));background-color:var(--gov-button-primary-base-inverse-bg, transparent)}[type=base][variant=primary][disabled=""].gov-button .element,[type=base][variant=primary][disabled=true i].gov-button .element,[type=base][variant=primary][disabled="1"].gov-button .element{color:var(--gov-button-primary-base-disabled-color, var(--gov-color-primary-400))}[type=base][variant=primary][disabled=""][inverse=""].gov-button .element,[type=base][variant=primary][disabled=""][inverse=true i].gov-button .element,[type=base][variant=primary][disabled=""][inverse="1"].gov-button .element,[type=base][variant=primary][disabled=true i][inverse=""].gov-button .element,[type=base][variant=primary][disabled=true i][inverse=true i].gov-button .element,[type=base][variant=primary][disabled=true i][inverse="1"].gov-button .element,[type=base][variant=primary][disabled="1"][inverse=""].gov-button .element,[type=base][variant=primary][disabled="1"][inverse=true i].gov-button .element,[type=base][variant=primary][disabled="1"][inverse="1"].gov-button .element{background-color:var(--gov-button-primary-base-inverse-disabled-bg, var(--gov-color-primary-300));color:var(--gov-button-primary-base-inverse-disabled-color, var(--gov-color-primary-400))}@media not all and (pointer: coarse){[type=base][variant=primary][hoverable].gov-button .element:hover{background-color:var(--gov-button-primary-base-hover-bg, var(--gov-color-primary-100));color:var(--gov-button-primary-base-hover-color, var(--gov-color-primary))}[type=base][variant=primary][hoverable].gov-button .element:hover:active{background-color:var(--gov-button-primary-base-active-bg, var(--gov-color-primary-300))}}@media not all and (pointer: coarse){[type=base][variant=primary][hoverable][inverse=""].gov-button .element:hover,[type=base][variant=primary][hoverable][inverse=true i].gov-button .element:hover,[type=base][variant=primary][hoverable][inverse="1"].gov-button .element:hover{background-color:var(--gov-button-primary-base-inverse-hover-bg, var(--gov-color-primary-500));color:var(--gov-button-primary-base-inverse-hover-color, var(--gov-color-neutral-white))}[type=base][variant=primary][hoverable][inverse=""].gov-button .element:hover:active,[type=base][variant=primary][hoverable][inverse=true i].gov-button .element:hover:active,[type=base][variant=primary][hoverable][inverse="1"].gov-button .element:hover:active{background-color:var(--gov-button-primary-base-inverse-active-bg, var(--gov-color-primary-400));color:var(--gov-button-primary-base-inverse-active-color, var(--gov-color-neutral-white))}}[type=solid][variant=secondary].gov-button .element{background-color:var(--gov-button-secondary-solid-bg, var(--gov-color-secondary));color:var(--gov-button-secondary-solid-color, var(--gov-color-neutral-white));border-width:0}[type=solid][variant=secondary][inverse=""].gov-button .element,[type=solid][variant=secondary][inverse=true i].gov-button .element,[type=solid][variant=secondary][inverse="1"].gov-button .element{color:var(--gov-button-secondary-solid-inverse-color, var(--gov-color-secondary));background-color:var(--gov-button-secondary-solid-inverse-bg, var(--gov-color-neutral-white))}[type=solid][variant=secondary][inverse=""].gov-button .element:focus-visible,[type=solid][variant=secondary][inverse=true i].gov-button .element:focus-visible,[type=solid][variant=secondary][inverse="1"].gov-button .element:focus-visible{background-color:var(--gov-button-secondary-solid-inverse-focus-bg, var(--gov-color-neutral-white))}[type=solid][variant=secondary][disabled=""].gov-button .element,[type=solid][variant=secondary][disabled=true i].gov-button .element,[type=solid][variant=secondary][disabled="1"].gov-button .element{background-color:var(--gov-button-secondary-solid-disabled-bg, var(--gov-color-secondary-300));color:var(--gov-button-secondary-solid-disabled-color, var(--gov-color-secondary-600))}[type=solid][variant=secondary][disabled=""][inverse=""].gov-button .element,[type=solid][variant=secondary][disabled=""][inverse=true i].gov-button .element,[type=solid][variant=secondary][disabled=""][inverse="1"].gov-button .element,[type=solid][variant=secondary][disabled=true i][inverse=""].gov-button .element,[type=solid][variant=secondary][disabled=true i][inverse=true i].gov-button .element,[type=solid][variant=secondary][disabled=true i][inverse="1"].gov-button .element,[type=solid][variant=secondary][disabled="1"][inverse=""].gov-button .element,[type=solid][variant=secondary][disabled="1"][inverse=true i].gov-button .element,[type=solid][variant=secondary][disabled="1"][inverse="1"].gov-button .element{background-color:var(--gov-button-secondary-solid-inverse-disabled-bg, var(--gov-color-neutral-white));color:var(--gov-button-secondary-solid-inverse-disabled-color, var(--gov-color-secondary-600))}@media not all and (pointer: coarse){[type=solid][variant=secondary][hoverable].gov-button .element:hover{background-color:var(--gov-button-secondary-solid-hover-bg, var(--gov-color-secondary-900));color:var(--gov-button-secondary-solid-hover-color, var(--gov-color-neutral-white))}[type=solid][variant=secondary][hoverable].gov-button .element:hover:active{background-color:var(--gov-button-secondary-solid-active-bg, var(--gov-color-secondary))}}@media not all and (pointer: coarse){[type=solid][variant=secondary][hoverable][inverse=""].gov-button .element:hover,[type=solid][variant=secondary][hoverable][inverse=true i].gov-button .element:hover,[type=solid][variant=secondary][hoverable][inverse="1"].gov-button .element:hover{background-color:var(--gov-button-secondary-solid-inverse-hover-bg, var(--gov-color-secondary-600));color:var(--gov-button-secondary-solid-inverse-hover-color, var(--gov-color-neutral-white))}[type=solid][variant=secondary][hoverable][inverse=""].gov-button .element:hover:active,[type=solid][variant=secondary][hoverable][inverse=true i].gov-button .element:hover:active,[type=solid][variant=secondary][hoverable][inverse="1"].gov-button .element:hover:active{background-color:var(--gov-button-secondary-solid-inverse-active-bg, var(--gov-color-secondary-700));color:var(--gov-button-secondary-solid-inverse-active-color, var(--gov-color-neutral-white))}}[type=outlined][variant=secondary].gov-button .element{color:var(--gov-button-secondary-outlined-color, var(--gov-color-secondary));border-color:var(--gov-button-secondary-outlined-border, var(--gov-color-secondary))}[type=outlined][variant=secondary][inverse=""].gov-button .element,[type=outlined][variant=secondary][inverse=true i].gov-button .element,[type=outlined][variant=secondary][inverse="1"].gov-button .element{color:var(--gov-button-secondary-outlined-inverse-color, var(--gov-color-neutral-white));background-color:var(--gov-button-secondary-outlined-inverse-bg, transparent);border-color:var(--gov-button-secondary-outlined-inverse-border, var(--gov-color-neutral-white))}[type=outlined][variant=secondary][inverse=""].gov-button .element:focus-visible,[type=outlined][variant=secondary][inverse=true i].gov-button .element:focus-visible,[type=outlined][variant=secondary][inverse="1"].gov-button .element:focus-visible{background-color:var(--gov-button-secondary-outlined-inverse-focus-bg, transparent)}[type=outlined][variant=secondary][disabled=""].gov-button .element,[type=outlined][variant=secondary][disabled=true i].gov-button .element,[type=outlined][variant=secondary][disabled="1"].gov-button .element{background-color:var(--gov-button-secondary-outlined-disabled-bg, transparent);color:var(--gov-button-secondary-outlined-disabled-color, var(--gov-color-secondary-500));border-color:var(--gov-button-secondary-outlined-disabled-border, var(--gov-color-secondary-500))}[type=outlined][variant=secondary][disabled=""][inverse=""].gov-button .element,[type=outlined][variant=secondary][disabled=""][inverse=true i].gov-button .element,[type=outlined][variant=secondary][disabled=""][inverse="1"].gov-button .element,[type=outlined][variant=secondary][disabled=true i][inverse=""].gov-button .element,[type=outlined][variant=secondary][disabled=true i][inverse=true i].gov-button .element,[type=outlined][variant=secondary][disabled=true i][inverse="1"].gov-button .element,[type=outlined][variant=secondary][disabled="1"][inverse=""].gov-button .element,[type=outlined][variant=secondary][disabled="1"][inverse=true i].gov-button .element,[type=outlined][variant=secondary][disabled="1"][inverse="1"].gov-button .element{background-color:var(--gov-button-secondary-outlined-inverse-disabled-bg, var(--gov-color-secondary-700));color:var(--gov-button-secondary-outlined-inverse-disabled-color, var(--gov-color-secondary-600));border-color:var(--gov-button-secondary-outlined-inverse-disabled-border-color, var(--gov-color-secondary-600))}@media not all and (pointer: coarse){[type=outlined][variant=secondary][hoverable].gov-button .element:hover{background-color:var(--gov-button-secondary-outlined-hover-bg, var(--gov-color-secondary-300));color:var(--gov-button-secondary-outlined-hover-color, var(--gov-color-secondary))}[type=outlined][variant=secondary][hoverable].gov-button .element:hover:active{background-color:var(--gov-button-secondary-outlined-active-bg, var(--gov-color-secondary-400))}}@media not all and (pointer: coarse){[type=outlined][variant=secondary][hoverable][inverse=""].gov-button .element:hover,[type=outlined][variant=secondary][hoverable][inverse=true i].gov-button .element:hover,[type=outlined][variant=secondary][hoverable][inverse="1"].gov-button .element:hover{background-color:var(--gov-button-secondary-outlined-inverse-hover-bg, var(--gov-color-secondary-700));color:var(--gov-button-secondary-outlined-inverse-hover-color, var(--gov-color-neutral-white))}[type=outlined][variant=secondary][hoverable][inverse=""].gov-button .element:hover:active,[type=outlined][variant=secondary][hoverable][inverse=true i].gov-button .element:hover:active,[type=outlined][variant=secondary][hoverable][inverse="1"].gov-button .element:hover:active{background-color:var(--gov-button-secondary-outlined-inverse-active-bg, var(--gov-color-secondary-600));color:var(--gov-button-secondary-outlined-inverse-active-color, var(--gov-color-secondary))}}[type=base][variant=secondary].gov-button .element{color:var(--gov-button-secondary-base-color, var(--gov-color-secondary));border-width:0}[type=base][variant=secondary][inverse=""].gov-button .element,[type=base][variant=secondary][inverse=true i].gov-button .element,[type=base][variant=secondary][inverse="1"].gov-button .element{color:var(--gov-button-secondary-base-inverse-color, var(--gov-color-neutral-white));background-color:var(--gov-button-secondary-base-inverse-bg, transparent)}[type=base][variant=secondary][disabled=""].gov-button .element,[type=base][variant=secondary][disabled=true i].gov-button .element,[type=base][variant=secondary][disabled="1"].gov-button .element{color:var(--gov-button-secondary-base-disabled-color, var(--gov-color-secondary-600))}[type=base][variant=secondary][disabled=""][inverse=""].gov-button .element,[type=base][variant=secondary][disabled=""][inverse=true i].gov-button .element,[type=base][variant=secondary][disabled=""][inverse="1"].gov-button .element,[type=base][variant=secondary][disabled=true i][inverse=""].gov-button .element,[type=base][variant=secondary][disabled=true i][inverse=true i].gov-button .element,[type=base][variant=secondary][disabled=true i][inverse="1"].gov-button .element,[type=base][variant=secondary][disabled="1"][inverse=""].gov-button .element,[type=base][variant=secondary][disabled="1"][inverse=true i].gov-button .element,[type=base][variant=secondary][disabled="1"][inverse="1"].gov-button .element{background-color:var(--gov-button-secondary-base-inverse-disabled-bg, var(--gov-color-secondary-700));color:var(--gov-button-secondary-base-inverse-disabled-color, var(--gov-color-secondary-600))}@media not all and (pointer: coarse){[type=base][variant=secondary][hoverable].gov-button .element:hover{background-color:var(--gov-button-secondary-base-hover-bg, var(--gov-color-secondary-300));color:var(--gov-button-secondary-base-hover-color, var(--gov-color-secondary))}[type=base][variant=secondary][hoverable].gov-button .element:hover:active{background-color:var(--gov-button-secondary-base-active-bg, var(--gov-color-secondary-400))}}@media not all and (pointer: coarse){[type=base][variant=secondary][hoverable][inverse=""].gov-button .element:hover,[type=base][variant=secondary][hoverable][inverse=true i].gov-button .element:hover,[type=base][variant=secondary][hoverable][inverse="1"].gov-button .element:hover{background-color:var(--gov-button-secondary-base-inverse-hover-bg, var(--gov-color-secondary-700));color:var(--gov-button-secondary-base-inverse-hover-color, var(--gov-color-neutral-white))}[type=base][variant=secondary][hoverable][inverse=""].gov-button .element:hover:active,[type=base][variant=secondary][hoverable][inverse=true i].gov-button .element:hover:active,[type=base][variant=secondary][hoverable][inverse="1"].gov-button .element:hover:active{background-color:var(--gov-button-secondary-base-inverse-active-bg, var(--gov-color-secondary-600));color:var(--gov-button-secondary-base-inverse-active-color, var(--gov-color-secondary))}}[type=solid][variant=error].gov-button .element{background-color:var(--gov-button-error-solid-bg, var(--gov-color-error));color:var(--gov-button-error-solid-color, var(--gov-color-neutral-white));border-width:0}[type=solid][variant=error][inverse=""].gov-button .element,[type=solid][variant=error][inverse=true i].gov-button .element,[type=solid][variant=error][inverse="1"].gov-button .element{color:var(--gov-button-error-solid-inverse-color, var(--gov-color-error));background-color:var(--gov-button-error-solid-inverse-bg, var(--gov-color-error-200))}[type=solid][variant=error][inverse=""].gov-button .element:focus-visible,[type=solid][variant=error][inverse=true i].gov-button .element:focus-visible,[type=solid][variant=error][inverse="1"].gov-button .element:focus-visible{background-color:var(--gov-button-error-solid-inverse-focus-bg, var(--gov-color-neutral-white))}[type=solid][variant=error][disabled=""].gov-button .element,[type=solid][variant=error][disabled=true i].gov-button .element,[type=solid][variant=error][disabled="1"].gov-button .element{background-color:var(--gov-button-error-solid-disabled-bg, var(--gov-color-error-200));color:var(--gov-button-error-solid-disabled-color, var(--gov-color-neutral-white))}[type=solid][variant=error][disabled=""][inverse=""].gov-button .element,[type=solid][variant=error][disabled=""][inverse=true i].gov-button .element,[type=solid][variant=error][disabled=""][inverse="1"].gov-button .element,[type=solid][variant=error][disabled=true i][inverse=""].gov-button .element,[type=solid][variant=error][disabled=true i][inverse=true i].gov-button .element,[type=solid][variant=error][disabled=true i][inverse="1"].gov-button .element,[type=solid][variant=error][disabled="1"][inverse=""].gov-button .element,[type=solid][variant=error][disabled="1"][inverse=true i].gov-button .element,[type=solid][variant=error][disabled="1"][inverse="1"].gov-button .element{background-color:var(--gov-button-error-solid-inverse-disabled-bg, var(--gov-color-error-300));color:var(--gov-button-error-solid-inverse-disabled-color, var(--gov-color-error-400))}@media not all and (pointer: coarse){[type=solid][variant=error][hoverable].gov-button .element:hover{background-color:var(--gov-button-error-solid-hover-bg, var(--gov-color-error-500));color:var(--gov-button-error-solid-hover-color, var(--gov-color-neutral-white))}[type=solid][variant=error][hoverable].gov-button .element:hover:active{background-color:var(--gov-button-error-solid-active-bg, var(--gov-color-error-600))}}@media not all and (pointer: coarse){[type=solid][variant=error][hoverable][inverse=""].gov-button .element:hover,[type=solid][variant=error][hoverable][inverse=true i].gov-button .element:hover,[type=solid][variant=error][hoverable][inverse="1"].gov-button .element:hover{background-color:var(--gov-button-error-solid-inverse-hover-bg, var(--gov-color-error-700));color:var(--gov-button-error-solid-inverse-hover-color, var(--gov-color-neutral-white))}[type=solid][variant=error][hoverable][inverse=""].gov-button .element:hover:active,[type=solid][variant=error][hoverable][inverse=true i].gov-button .element:hover:active,[type=solid][variant=error][hoverable][inverse="1"].gov-button .element:hover:active{background-color:var(--gov-button-error-solid-inverse-active-bg, var(--gov-color-error-800))}}[type=outlined][variant=error].gov-button .element{color:var(--gov-button-error-outlined-color, var(--gov-color-error));border-color:var(--gov-button-error-outlined-border, var(--gov-color-error))}[type=outlined][variant=error][inverse=""].gov-button .element,[type=outlined][variant=error][inverse=true i].gov-button .element,[type=outlined][variant=error][inverse="1"].gov-button .element{color:var(--gov-button-error-outlined-inverse-color, var(--gov-color-neutral-white));background-color:var(--gov-button-error-outlined-inverse-bg, transparent);border-color:var(--gov-button-error-outlined-inverse-border, var(--gov-color-neutral-white))}[type=outlined][variant=error][inverse=""].gov-button .element:focus-visible,[type=outlined][variant=error][inverse=true i].gov-button .element:focus-visible,[type=outlined][variant=error][inverse="1"].gov-button .element:focus-visible{background-color:var(--gov-button-error-outlined-inverse-focus-bg, transparent)}[type=outlined][variant=error][disabled=""].gov-button .element,[type=outlined][variant=error][disabled=true i].gov-button .element,[type=outlined][variant=error][disabled="1"].gov-button .element{background-color:var(--gov-button-error-outlined-disabled-bg, transparent);color:var(--gov-button-error-outlined-disabled-color, var(--gov-color-error-200));border-color:var(--gov-button-error-outlined-disabled-border, var(--gov-color-error-200))}[type=outlined][variant=error][disabled=""][inverse=""].gov-button .element,[type=outlined][variant=error][disabled=""][inverse=true i].gov-button .element,[type=outlined][variant=error][disabled=""][inverse="1"].gov-button .element,[type=outlined][variant=error][disabled=true i][inverse=""].gov-button .element,[type=outlined][variant=error][disabled=true i][inverse=true i].gov-button .element,[type=outlined][variant=error][disabled=true i][inverse="1"].gov-button .element,[type=outlined][variant=error][disabled="1"][inverse=""].gov-button .element,[type=outlined][variant=error][disabled="1"][inverse=true i].gov-button .element,[type=outlined][variant=error][disabled="1"][inverse="1"].gov-button .element{background-color:var(--gov-button-error-outlined-inverse-disabled-bg, var(--gov-color-error-300));color:var(--gov-button-error-outlined-inverse-disabled-color, var(--gov-color-error-400));border-color:var(--gov-button-error-outlined-inverse-disabled-border-color, var(--gov-color-error-400))}@media not all and (pointer: coarse){[type=outlined][variant=error][hoverable].gov-button .element:hover{background-color:var(--gov-button-error-outlined-hover-bg, var(--gov-color-error-100));color:var(--gov-button-error-outlined-hover-color, var(--gov-color-error))}[type=outlined][variant=error][hoverable].gov-button .element:hover:active{background-color:var(--gov-button-error-outlined-active-bg, var(--gov-color-error-200))}}@media not all and (pointer: coarse){[type=outlined][variant=error][hoverable][inverse=""].gov-button .element:hover,[type=outlined][variant=error][hoverable][inverse=true i].gov-button .element:hover,[type=outlined][variant=error][hoverable][inverse="1"].gov-button .element:hover{background-color:var(--gov-button-error-outlined-inverse-hover-bg, var(--gov-color-error-500));color:var(--gov-button-error-outlined-inverse-hover-color, var(--gov-color-neutral-white))}[type=outlined][variant=error][hoverable][inverse=""].gov-button .element:hover:active,[type=outlined][variant=error][hoverable][inverse=true i].gov-button .element:hover:active,[type=outlined][variant=error][hoverable][inverse="1"].gov-button .element:hover:active{background-color:var(--gov-button-error-outlined-inverse-active-bg, var(--gov-color-error-400))}}[type=base][variant=error].gov-button .element{color:var(--gov-button-error-base-color, var(--gov-color-error));border-width:0}[type=base][variant=error][inverse=""].gov-button .element,[type=base][variant=error][inverse=true i].gov-button .element,[type=base][variant=error][inverse="1"].gov-button .element{color:var(--gov-button-error-base-inverse-color, var(--gov-color-neutral-white));background-color:var(--gov-button-error-base-inverse-bg, transparent)}[type=base][variant=error][disabled=""].gov-button .element,[type=base][variant=error][disabled=true i].gov-button .element,[type=base][variant=error][disabled="1"].gov-button .element{color:var(--gov-button-error-base-disabled-color, var(--gov-color-error-200))}[type=base][variant=error][disabled=""][inverse=""].gov-button .element,[type=base][variant=error][disabled=""][inverse=true i].gov-button .element,[type=base][variant=error][disabled=""][inverse="1"].gov-button .element,[type=base][variant=error][disabled=true i][inverse=""].gov-button .element,[type=base][variant=error][disabled=true i][inverse=true i].gov-button .element,[type=base][variant=error][disabled=true i][inverse="1"].gov-button .element,[type=base][variant=error][disabled="1"][inverse=""].gov-button .element,[type=base][variant=error][disabled="1"][inverse=true i].gov-button .element,[type=base][variant=error][disabled="1"][inverse="1"].gov-button .element{background-color:var(--gov-button-error-base-inverse-disabled-bg, var(--gov-color-error-300));color:var(--gov-button-error-base-inverse-disabled-color, var(--gov-color-error-400))}@media not all and (pointer: coarse){[type=base][variant=error][hoverable].gov-button .element:hover{background-color:var(--gov-button-error-base-hover-bg, var(--gov-color-error-100));color:var(--gov-button-error-base-hover-color, var(--gov-color-error))}[type=base][variant=error][hoverable].gov-button .element:hover:active{background-color:var(--gov-button-error-base-active-bg, var(--gov-color-error-200))}}@media not all and (pointer: coarse){[type=base][variant=error][hoverable][inverse=""].gov-button .element:hover,[type=base][variant=error][hoverable][inverse=true i].gov-button .element:hover,[type=base][variant=error][hoverable][inverse="1"].gov-button .element:hover{background-color:var(--gov-button-error-base-inverse-hover-bg, var(--gov-color-error-500));color:var(--gov-button-error-base-inverse-hover-color, var(--gov-color-neutral-white))}[type=base][variant=error][hoverable][inverse=""].gov-button .element:hover:active,[type=base][variant=error][hoverable][inverse=true i].gov-button .element:hover:active,[type=base][variant=error][hoverable][inverse="1"].gov-button .element:hover:active{background-color:var(--gov-button-error-base-inverse-active-bg, var(--gov-color-error-400));color:var(--gov-button-error-base-inverse-active-color, var(--gov-color-neutral-white))}}[type=solid][variant=success].gov-button .element{background-color:var(--gov-button-success-solid-bg, var(--gov-color-success-500));color:var(--gov-button-success-solid-color, var(--gov-color-neutral-white));border-width:0}[type=solid][variant=success][inverse=""].gov-button .element,[type=solid][variant=success][inverse=true i].gov-button .element,[type=solid][variant=success][inverse="1"].gov-button .element{color:var(--gov-button-success-solid-inverse-color, var(--gov-color-success));background-color:var(--gov-button-success-solid-inverse-bg, var(--gov-color-success-200))}[type=solid][variant=success][inverse=""].gov-button .element:focus-visible,[type=solid][variant=success][inverse=true i].gov-button .element:focus-visible,[type=solid][variant=success][inverse="1"].gov-button .element:focus-visible{background-color:var(--gov-button-success-solid-inverse-focus-bg, var(--gov-color-neutral-white))}[type=solid][variant=success][disabled=""].gov-button .element,[type=solid][variant=success][disabled=true i].gov-button .element,[type=solid][variant=success][disabled="1"].gov-button .element{background-color:var(--gov-button-success-solid-disabled-bg, var(--gov-color-success-200));color:var(--gov-button-success-solid-disabled-color, var(--gov-color-neutral-white))}[type=solid][variant=success][disabled=""][inverse=""].gov-button .element,[type=solid][variant=success][disabled=""][inverse=true i].gov-button .element,[type=solid][variant=success][disabled=""][inverse="1"].gov-button .element,[type=solid][variant=success][disabled=true i][inverse=""].gov-button .element,[type=solid][variant=success][disabled=true i][inverse=true i].gov-button .element,[type=solid][variant=success][disabled=true i][inverse="1"].gov-button .element,[type=solid][variant=success][disabled="1"][inverse=""].gov-button .element,[type=solid][variant=success][disabled="1"][inverse=true i].gov-button .element,[type=solid][variant=success][disabled="1"][inverse="1"].gov-button .element{background-color:var(--gov-button-success-solid-inverse-disabled-bg, var(--gov-color-success-300));color:var(--gov-button-success-solid-inverse-disabled-color, var(--gov-color-success-400))}@media not all and (pointer: coarse){[type=solid][variant=success][hoverable].gov-button .element:hover{background-color:var(--gov-button-success-solid-hover-bg, var(--gov-color-success-600));color:var(--gov-button-success-solid-hover-color, var(--gov-color-neutral-white))}[type=solid][variant=success][hoverable].gov-button .element:hover:active{background-color:var(--gov-button-success-solid-active-bg, var(--gov-color-success-700))}}@media not all and (pointer: coarse){[type=solid][variant=success][hoverable][inverse=""].gov-button .element:hover,[type=solid][variant=success][hoverable][inverse=true i].gov-button .element:hover,[type=solid][variant=success][hoverable][inverse="1"].gov-button .element:hover{background-color:var(--gov-button-success-solid-inverse-hover-bg, var(--gov-color-success-700));color:var(--gov-button-success-solid-inverse-hover-color, var(--gov-color-neutral-white))}[type=solid][variant=success][hoverable][inverse=""].gov-button .element:hover:active,[type=solid][variant=success][hoverable][inverse=true i].gov-button .element:hover:active,[type=solid][variant=success][hoverable][inverse="1"].gov-button .element:hover:active{background-color:var(--gov-button-success-solid-inverse-active-bg, var(--gov-color-success-800))}}[type=outlined][variant=success].gov-button .element{color:var(--gov-button-success-outlined-color, var(--gov-color-success-500));border-color:var(--gov-button-success-outlined-border, var(--gov-color-success-500))}[type=outlined][variant=success][inverse=""].gov-button .element,[type=outlined][variant=success][inverse=true i].gov-button .element,[type=outlined][variant=success][inverse="1"].gov-button .element{color:var(--gov-button-success-outlined-inverse-color, var(--gov-color-neutral-white));background-color:var(--gov-button-success-outlined-inverse-bg, transparent);border-color:var(--gov-button-success-outlined-inverse-border, var(--gov-color-neutral-white))}[type=outlined][variant=success][inverse=""].gov-button .element:focus-visible,[type=outlined][variant=success][inverse=true i].gov-button .element:focus-visible,[type=outlined][variant=success][inverse="1"].gov-button .element:focus-visible{background-color:var(--gov-button-success-outlined-inverse-focus-bg, transparent)}[type=outlined][variant=success][disabled=""].gov-button .element,[type=outlined][variant=success][disabled=true i].gov-button .element,[type=outlined][variant=success][disabled="1"].gov-button .element{background-color:var(--gov-button-success-outlined-disabled-bg, transparent);color:var(--gov-button-success-outlined-disabled-color, var(--gov-color-success-300));border-color:var(--gov-button-success-outlined-disabled-border, var(--gov-color-success-300))}[type=outlined][variant=success][disabled=""][inverse=""].gov-button .element,[type=outlined][variant=success][disabled=""][inverse=true i].gov-button .element,[type=outlined][variant=success][disabled=""][inverse="1"].gov-button .element,[type=outlined][variant=success][disabled=true i][inverse=""].gov-button .element,[type=outlined][variant=success][disabled=true i][inverse=true i].gov-button .element,[type=outlined][variant=success][disabled=true i][inverse="1"].gov-button .element,[type=outlined][variant=success][disabled="1"][inverse=""].gov-button .element,[type=outlined][variant=success][disabled="1"][inverse=true i].gov-button .element,[type=outlined][variant=success][disabled="1"][inverse="1"].gov-button .element{background-color:var(--gov-button-success-outlined-inverse-disabled-bg, var(--gov-color-success-300));color:var(--gov-button-success-outlined-inverse-disabled-color, var(--gov-color-success-400));border-color:var(--gov-button-success-outlined-inverse-disabled-border-color, var(--gov-color-success-400))}@media not all and (pointer: coarse){[type=outlined][variant=success][hoverable].gov-button .element:hover{background-color:var(--gov-button-success-outlined-hover-bg, var(--gov-color-success-100));color:var(--gov-button-success-outlined-hover-color, var(--gov-color-success-500))}[type=outlined][variant=success][hoverable].gov-button .element:hover:active{background-color:var(--gov-button-success-outlined-active-bg, var(--gov-color-success-200))}}@media not all and (pointer: coarse){[type=outlined][variant=success][hoverable][inverse=""].gov-button .element:hover,[type=outlined][variant=success][hoverable][inverse=true i].gov-button .element:hover,[type=outlined][variant=success][hoverable][inverse="1"].gov-button .element:hover{background-color:var(--gov-button-success-outlined-inverse-hover-bg, var(--gov-color-success-500));color:var(--gov-button-success-outlined-inverse-hover-color, var(--gov-color-neutral-white))}[type=outlined][variant=success][hoverable][inverse=""].gov-button .element:hover:active,[type=outlined][variant=success][hoverable][inverse=true i].gov-button .element:hover:active,[type=outlined][variant=success][hoverable][inverse="1"].gov-button .element:hover:active{background-color:var(--gov-button-success-outlined-inverse-active-bg, var(--gov-color-success-400))}}[type=base][variant=success].gov-button .element{color:var(--gov-button-success-base-color, var(--gov-color-success-500));border-width:0}[type=base][variant=success][inverse=""].gov-button .element,[type=base][variant=success][inverse=true i].gov-button .element,[type=base][variant=success][inverse="1"].gov-button .element{color:var(--gov-button-success-base-inverse-color, var(--gov-color-neutral-white));background-color:var(--gov-button-success-base-inverse-bg, transparent)}[type=base][variant=success][disabled=""].gov-button .element,[type=base][variant=success][disabled=true i].gov-button .element,[type=base][variant=success][disabled="1"].gov-button .element{color:var(--gov-button-success-base-disabled-color, var(--gov-color-success-300))}[type=base][variant=success][disabled=""][inverse=""].gov-button .element,[type=base][variant=success][disabled=""][inverse=true i].gov-button .element,[type=base][variant=success][disabled=""][inverse="1"].gov-button .element,[type=base][variant=success][disabled=true i][inverse=""].gov-button .element,[type=base][variant=success][disabled=true i][inverse=true i].gov-button .element,[type=base][variant=success][disabled=true i][inverse="1"].gov-button .element,[type=base][variant=success][disabled="1"][inverse=""].gov-button .element,[type=base][variant=success][disabled="1"][inverse=true i].gov-button .element,[type=base][variant=success][disabled="1"][inverse="1"].gov-button .element{background-color:var(--gov-button-success-base-inverse-disabled-bg, var(--gov-color-success-300));color:var(--gov-button-success-base-inverse-disabled-color, var(--gov-color-success-400))}@media not all and (pointer: coarse){[type=base][variant=success][hoverable].gov-button .element:hover{background-color:var(--gov-button-success-base-hover-bg, var(--gov-color-success-100));color:var(--gov-button-success-base-hover-color, var(--gov-color-success-500))}[type=base][variant=success][hoverable].gov-button .element:hover:active{background-color:var(--gov-button-success-base-active-bg, var(--gov-color-success-200))}}@media not all and (pointer: coarse){[type=base][variant=success][hoverable][inverse=""].gov-button .element:hover,[type=base][variant=success][hoverable][inverse=true i].gov-button .element:hover,[type=base][variant=success][hoverable][inverse="1"].gov-button .element:hover{background-color:var(--gov-button-success-base-inverse-hover-bg, var(--gov-color-success-600));color:var(--gov-button-success-base-inverse-hover-color, var(--gov-color-neutral-white))}[type=base][variant=success][hoverable][inverse=""].gov-button .element:hover:active,[type=base][variant=success][hoverable][inverse=true i].gov-button .element:hover:active,[type=base][variant=success][hoverable][inverse="1"].gov-button .element:hover:active{background-color:var(--gov-button-success-base-inverse-active-bg, var(--gov-color-success-500));color:var(--gov-button-success-base-inverse-active-color, var(--gov-color-neutral-white))}}[type=solid][variant=warning].gov-button .element{background-color:var(--gov-button-warning-solid-bg, var(--gov-color-warning-500));color:var(--gov-button-warning-solid-color, var(--gov-color-neutral-white));border-width:0}[type=solid][variant=warning][inverse=""].gov-button .element,[type=solid][variant=warning][inverse=true i].gov-button .element,[type=solid][variant=warning][inverse="1"].gov-button .element{color:var(--gov-button-warning-solid-inverse-color, var(--gov-color-warning));background-color:var(--gov-button-warning-solid-inverse-bg, var(--gov-color-warning-200))}[type=solid][variant=warning][inverse=""].gov-button .element:focus-visible,[type=solid][variant=warning][inverse=true i].gov-button .element:focus-visible,[type=solid][variant=warning][inverse="1"].gov-button .element:focus-visible{background-color:var(--gov-button-warning-solid-inverse-focus-bg, var(--gov-color-neutral-white))}[type=solid][variant=warning][disabled=""].gov-button .element,[type=solid][variant=warning][disabled=true i].gov-button .element,[type=solid][variant=warning][disabled="1"].gov-button .element{background-color:var(--gov-button-warning-solid-disabled-bg, var(--gov-color-warning-200));color:var(--gov-button-warning-solid-disabled-color, var(--gov-color-neutral-white))}[type=solid][variant=warning][disabled=""][inverse=""].gov-button .element,[type=solid][variant=warning][disabled=""][inverse=true i].gov-button .element,[type=solid][variant=warning][disabled=""][inverse="1"].gov-button .element,[type=solid][variant=warning][disabled=true i][inverse=""].gov-button .element,[type=solid][variant=warning][disabled=true i][inverse=true i].gov-button .element,[type=solid][variant=warning][disabled=true i][inverse="1"].gov-button .element,[type=solid][variant=warning][disabled="1"][inverse=""].gov-button .element,[type=solid][variant=warning][disabled="1"][inverse=true i].gov-button .element,[type=solid][variant=warning][disabled="1"][inverse="1"].gov-button .element{background-color:var(--gov-button-warning-solid-inverse-disabled-bg, var(--gov-color-warning-300));color:var(--gov-button-warning-solid-inverse-disabled-color, var(--gov-color-warning-400))}@media not all and (pointer: coarse){[type=solid][variant=warning][hoverable].gov-button .element:hover{background-color:var(--gov-button-warning-solid-hover-bg, var(--gov-color-warning-600));color:var(--gov-button-warning-solid-hover-color, var(--gov-color-neutral-white))}[type=solid][variant=warning][hoverable].gov-button .element:hover:active{background-color:var(--gov-button-warning-solid-active-bg, var(--gov-color-warning-700))}}@media not all and (pointer: coarse){[type=solid][variant=warning][hoverable][inverse=""].gov-button .element:hover,[type=solid][variant=warning][hoverable][inverse=true i].gov-button .element:hover,[type=solid][variant=warning][hoverable][inverse="1"].gov-button .element:hover{background-color:var(--gov-button-warning-solid-inverse-hover-bg, var(--gov-color-warning-700));color:var(--gov-button-warning-solid-inverse-hover-color, var(--gov-color-neutral-white))}[type=solid][variant=warning][hoverable][inverse=""].gov-button .element:hover:active,[type=solid][variant=warning][hoverable][inverse=true i].gov-button .element:hover:active,[type=solid][variant=warning][hoverable][inverse="1"].gov-button .element:hover:active{background-color:var(--gov-button-warning-solid-inverse-active-bg, var(--gov-color-warning-800))}}[type=outlined][variant=warning].gov-button .element{color:var(--gov-button-warning-outlined-color, var(--gov-color-warning-500));border-color:var(--gov-button-warning-outlined-border, var(--gov-color-warning-500))}[type=outlined][variant=warning][inverse=""].gov-button .element,[type=outlined][variant=warning][inverse=true i].gov-button .element,[type=outlined][variant=warning][inverse="1"].gov-button .element{color:var(--gov-button-warning-outlined-inverse-color, var(--gov-color-neutral-white));background-color:var(--gov-button-warning-outlined-inverse-bg, transparent);border-color:var(--gov-button-warning-outlined-inverse-border, var(--gov-color-neutral-white))}[type=outlined][variant=warning][inverse=""].gov-button .element:focus-visible,[type=outlined][variant=warning][inverse=true i].gov-button .element:focus-visible,[type=outlined][variant=warning][inverse="1"].gov-button .element:focus-visible{background-color:var(--gov-button-warning-outlined-inverse-focus-bg, transparent)}[type=outlined][variant=warning][disabled=""].gov-button .element,[type=outlined][variant=warning][disabled=true i].gov-button .element,[type=outlined][variant=warning][disabled="1"].gov-button .element{background-color:var(--gov-button-warning-outlined-disabled-bg, transparent);color:var(--gov-button-warning-outlined-disabled-color, var(--gov-color-warning));border-color:var(--gov-button-warning-outlined-disabled-border, var(--gov-color-warning))}[type=outlined][variant=warning][disabled=""][inverse=""].gov-button .element,[type=outlined][variant=warning][disabled=""][inverse=true i].gov-button .element,[type=outlined][variant=warning][disabled=""][inverse="1"].gov-button .element,[type=outlined][variant=warning][disabled=true i][inverse=""].gov-button .element,[type=outlined][variant=warning][disabled=true i][inverse=true i].gov-button .element,[type=outlined][variant=warning][disabled=true i][inverse="1"].gov-button .element,[type=outlined][variant=warning][disabled="1"][inverse=""].gov-button .element,[type=outlined][variant=warning][disabled="1"][inverse=true i].gov-button .element,[type=outlined][variant=warning][disabled="1"][inverse="1"].gov-button .element{background-color:var(--gov-button-warning-outlined-inverse-disabled-bg, var(--gov-color-warning-300));color:var(--gov-button-warning-outlined-inverse-disabled-color, var(--gov-color-warning-400));border-color:var(--gov-button-warning-outlined-inverse-disabled-border-color, var(--gov-color-warning-400))}@media not all and (pointer: coarse){[type=outlined][variant=warning][hoverable].gov-button .element:hover{background-color:var(--gov-button-warning-outlined-hover-bg, var(--gov-color-warning-200));color:var(--gov-button-warning-outlined-hover-color, var(--gov-color-warning-500))}[type=outlined][variant=warning][hoverable].gov-button .element:hover:active{background-color:var(--gov-button-warning-outlined-active-bg, var(--gov-color-warning-300))}}@media not all and (pointer: coarse){[type=outlined][variant=warning][hoverable][inverse=""].gov-button .element:hover,[type=outlined][variant=warning][hoverable][inverse=true i].gov-button .element:hover,[type=outlined][variant=warning][hoverable][inverse="1"].gov-button .element:hover{background-color:var(--gov-button-warning-outlined-inverse-hover-bg, var(--gov-color-warning-500));color:var(--gov-button-warning-outlined-inverse-hover-color, var(--gov-color-neutral-white))}[type=outlined][variant=warning][hoverable][inverse=""].gov-button .element:hover:active,[type=outlined][variant=warning][hoverable][inverse=true i].gov-button .element:hover:active,[type=outlined][variant=warning][hoverable][inverse="1"].gov-button .element:hover:active{background-color:var(--gov-button-warning-outlined-inverse-active-bg, var(--gov-color-warning-400))}}[type=base][variant=warning].gov-button .element{color:var(--gov-button-warning-base-color, var(--gov-color-warning-500));border-width:0}[type=base][variant=warning][inverse=""].gov-button .element,[type=base][variant=warning][inverse=true i].gov-button .element,[type=base][variant=warning][inverse="1"].gov-button .element{color:var(--gov-button-warning-base-inverse-color, var(--gov-color-neutral-white));background-color:var(--gov-button-warning-base-inverse-bg, transparent)}[type=base][variant=warning][disabled=""].gov-button .element,[type=base][variant=warning][disabled=true i].gov-button .element,[type=base][variant=warning][disabled="1"].gov-button .element{color:var(--gov-button-warning-base-disabled-color, var(--gov-color-warning))}[type=base][variant=warning][disabled=""][inverse=""].gov-button .element,[type=base][variant=warning][disabled=""][inverse=true i].gov-button .element,[type=base][variant=warning][disabled=""][inverse="1"].gov-button .element,[type=base][variant=warning][disabled=true i][inverse=""].gov-button .element,[type=base][variant=warning][disabled=true i][inverse=true i].gov-button .element,[type=base][variant=warning][disabled=true i][inverse="1"].gov-button .element,[type=base][variant=warning][disabled="1"][inverse=""].gov-button .element,[type=base][variant=warning][disabled="1"][inverse=true i].gov-button .element,[type=base][variant=warning][disabled="1"][inverse="1"].gov-button .element{background-color:var(--gov-button-warning-base-inverse-disabled-bg, var(--gov-color-warning-300));color:var(--gov-button-warning-base-inverse-disabled-color, var(--gov-color-warning-400))}@media not all and (pointer: coarse){[type=base][variant=warning][hoverable].gov-button .element:hover{background-color:var(--gov-button-warning-base-hover-bg, var(--gov-color-warning-200));color:var(--gov-button-warning-base-hover-color, var(--gov-color-warning-500))}[type=base][variant=warning][hoverable].gov-button .element:hover:active{background-color:var(--gov-button-warning-base-active-bg, var(--gov-color-warning-300))}}@media not all and (pointer: coarse){[type=base][variant=warning][hoverable][inverse=""].gov-button .element:hover,[type=base][variant=warning][hoverable][inverse=true i].gov-button .element:hover,[type=base][variant=warning][hoverable][inverse="1"].gov-button .element:hover{background-color:var(--gov-button-warning-base-inverse-hover-bg, var(--gov-color-warning-500));color:var(--gov-button-warning-base-inverse-hover-color, var(--gov-color-neutral-white))}[type=base][variant=warning][hoverable][inverse=""].gov-button .element:hover:active,[type=base][variant=warning][hoverable][inverse=true i].gov-button .element:hover:active,[type=base][variant=warning][hoverable][inverse="1"].gov-button .element:hover:active{background-color:var(--gov-button-warning-base-inverse-active-bg, var(--gov-color-warning-400));color:var(--gov-button-warning-base-inverse-active-color, var(--gov-color-neutral-white))}}[size=xs].gov-button .element{font-weight:var(--gov-button-text-xs-font-weight, var(--gov-text-xs-font-weight));font-size:var(--gov-button-text-xs-font-size, var(--gov-text-xs-font-size));line-height:var(--gov-button-text-xs-line-height, var(--gov-text-xs-line-height));letter-spacing:var(--gov-button-text-xs-letter-spacing, var(--gov-text-xs-letter-spacing));-moz-column-gap:var(--gov-button-xs-padding-x, 0.625rem);column-gap:var(--gov-button-xs-padding-x, 0.625rem);min-height:var(--gov-button-xs-min-height, 1.5rem);padding:var(--gov-button-xs-padding-y, 0.125rem) var(--gov-button-xs-padding-x, 0.625rem)}[size=xs].gov-button .element .gov-icon{width:var(--gov-button-xs-icon-size, 1rem);height:var(--gov-button-xs-icon-size, 1rem)}@media (min-width: 48em){[size=xs].gov-button .element{font-weight:var(--gov-button-text-xs-font-weight, var(--gov-text-xs-font-weight));font-size:var(--gov-button-text-xs-font-size, var(--gov-text-xs-font-size));line-height:var(--gov-button-text-xs-line-height, var(--gov-text-xs-line-height));letter-spacing:var(--gov-button-text-xs-letter-spacing, var(--gov-text-xs-letter-spacing));-moz-column-gap:var(--gov-button-xs-padding-x, 0.625rem);column-gap:var(--gov-button-xs-padding-x, 0.625rem);min-height:var(--gov-button-xs-min-height, 1.5rem);padding:var(--gov-button-xs-padding-y, 0.125rem) var(--gov-button-xs-padding-x, 0.625rem)}[size=xs].gov-button .element .gov-icon{width:var(--gov-button-xs-icon-size, 1rem);height:var(--gov-button-xs-icon-size, 1rem)}}[size=s].gov-button .element{font-weight:var(--gov-button-text-s-font-weight, var(--gov-text-s-font-weight));font-size:var(--gov-button-text-s-font-size, var(--gov-text-s-font-size));line-height:var(--gov-button-text-s-line-height, var(--gov-text-s-line-height));letter-spacing:var(--gov-button-text-s-letter-spacing, var(--gov-text-s-letter-spacing));-moz-column-gap:var(--gov-button-s-padding-x, 0.75rem);column-gap:var(--gov-button-s-padding-x, 0.75rem);min-height:var(--gov-button-s-min-height, 2rem);padding:var(--gov-button-s-padding-y, 0.25rem) var(--gov-button-s-padding-x, 0.75rem)}[size=s].gov-button .element .gov-icon{width:var(--gov-button-s-icon-size, 1rem);height:var(--gov-button-s-icon-size, 1rem)}@media (min-width: 48em){[size=s].gov-button .element{font-weight:var(--gov-button-text-s-font-weight, var(--gov-text-s-font-weight));font-size:var(--gov-button-text-s-font-size, var(--gov-text-s-font-size));line-height:var(--gov-button-text-s-line-height, var(--gov-text-s-line-height));letter-spacing:var(--gov-button-text-s-letter-spacing, var(--gov-text-s-letter-spacing));-moz-column-gap:var(--gov-button-s-padding-x, 0.75rem);column-gap:var(--gov-button-s-padding-x, 0.75rem);min-height:var(--gov-button-s-min-height, 2rem);padding:var(--gov-button-s-padding-y, 0.25rem) var(--gov-button-s-padding-x, 0.75rem)}[size=s].gov-button .element .gov-icon{width:var(--gov-button-s-icon-size, 1rem);height:var(--gov-button-s-icon-size, 1rem)}}[size=m].gov-button .element{font-weight:var(--gov-button-text-s-font-weight, var(--gov-text-s-font-weight));font-size:var(--gov-button-text-s-font-size, var(--gov-text-s-font-size));line-height:var(--gov-button-text-s-line-height, var(--gov-text-s-line-height));letter-spacing:var(--gov-button-text-s-letter-spacing, var(--gov-text-s-letter-spacing));-moz-column-gap:var(--gov-button-s-padding-x, 0.75rem);column-gap:var(--gov-button-s-padding-x, 0.75rem);min-height:var(--gov-button-s-min-height, 2rem);padding:var(--gov-button-s-padding-y, 0.25rem) var(--gov-button-s-padding-x, 0.75rem)}[size=m].gov-button .element .gov-icon{width:var(--gov-button-s-icon-size, 1rem);height:var(--gov-button-s-icon-size, 1rem)}@media (min-width: 48em){[size=m].gov-button .element{font-weight:var(--gov-button-text-m-font-weight, var(--gov-text-m-font-weight));font-size:var(--gov-button-text-m-font-size, var(--gov-text-m-font-size));line-height:var(--gov-button-text-m-line-height, var(--gov-text-m-line-height));letter-spacing:var(--gov-button-text-m-letter-spacing, var(--gov-text-m-letter-spacing));-moz-column-gap:var(--gov-button-m-padding-x, 0.75rem);column-gap:var(--gov-button-m-padding-x, 0.75rem);min-height:var(--gov-button-m-min-height, 2.5rem);padding:var(--gov-button-m-padding-y, 0.375rem) var(--gov-button-m-padding-x, 0.75rem)}[size=m].gov-button .element .gov-icon{width:var(--gov-button-m-icon-size, 1.25rem);height:var(--gov-button-m-icon-size, 1.25rem)}}[size=l].gov-button .element{font-weight:var(--gov-button-text-m-font-weight, var(--gov-text-m-font-weight));font-size:var(--gov-button-text-m-font-size, var(--gov-text-m-font-size));line-height:var(--gov-button-text-m-line-height, var(--gov-text-m-line-height));letter-spacing:var(--gov-button-text-m-letter-spacing, var(--gov-text-m-letter-spacing));-moz-column-gap:var(--gov-button-m-padding-x, 0.75rem);column-gap:var(--gov-button-m-padding-x, 0.75rem);min-height:var(--gov-button-m-min-height, 2.5rem);padding:var(--gov-button-m-padding-y, 0.375rem) var(--gov-button-m-padding-x, 0.75rem)}[size=l].gov-button .element .gov-icon{width:var(--gov-button-m-icon-size, 1.25rem);height:var(--gov-button-m-icon-size, 1.25rem)}@media (min-width: 48em){[size=l].gov-button .element{font-weight:var(--gov-button-text-l-font-weight, var(--gov-text-l-font-weight));font-size:var(--gov-button-text-l-font-size, var(--gov-text-l-font-size));line-height:var(--gov-button-text-l-line-height, var(--gov-text-l-line-height));letter-spacing:var(--gov-button-text-l-letter-spacing, var(--gov-text-l-letter-spacing));-moz-column-gap:var(--gov-button-l-padding-x, 1rem);column-gap:var(--gov-button-l-padding-x, 1rem);min-height:var(--gov-button-l-min-height, 3rem);padding:var(--gov-button-l-padding-y, 0.5rem) var(--gov-button-l-padding-x, 1rem)}[size=l].gov-button .element .gov-icon{width:var(--gov-button-l-icon-size, 1.5rem);height:var(--gov-button-l-icon-size, 1.5rem)}}[size=xl].gov-button .element{font-weight:var(--gov-button-text-l-font-weight, var(--gov-text-l-font-weight));font-size:var(--gov-button-text-l-font-size, var(--gov-text-l-font-size));line-height:var(--gov-button-text-l-line-height, var(--gov-text-l-line-height));letter-spacing:var(--gov-button-text-l-letter-spacing, var(--gov-text-l-letter-spacing));-moz-column-gap:var(--gov-button-l-padding-x, 1rem);column-gap:var(--gov-button-l-padding-x, 1rem);min-height:var(--gov-button-l-min-height, 3rem);padding:var(--gov-button-l-padding-y, 0.5rem) var(--gov-button-l-padding-x, 1rem)}[size=xl].gov-button .element .gov-icon{width:var(--gov-button-l-icon-size, 1.5rem);height:var(--gov-button-l-icon-size, 1.5rem)}@media (min-width: 48em){[size=xl].gov-button .element{font-weight:var(--gov-button-text-xl-font-weight, var(--gov-text-xl-font-weight));font-size:var(--gov-button-text-xl-font-size, var(--gov-text-xl-font-size));line-height:var(--gov-button-text-xl-line-height, var(--gov-text-xl-line-height));letter-spacing:var(--gov-button-text-xl-letter-spacing, var(--gov-text-xl-letter-spacing));-moz-column-gap:var(--gov-button-xl-padding-x, 1.25rem);column-gap:var(--gov-button-xl-padding-x, 1.25rem);min-height:var(--gov-button-xl-min-height, 3.5rem);padding:var(--gov-button-xl-padding-y, 0.75rem) var(--gov-button-xl-padding-x, 1.25rem)}[size=xl].gov-button .element .gov-icon{width:var(--gov-button-xl-icon-size, 1.75rem);height:var(--gov-button-xl-icon-size, 1.75rem)}}.gov-button{display:inline-block}.gov-button .element{border-radius:var(--gov-border-radius, 0.1875rem)}.gov-button[loading=true] .element>.gov-icon:not(.gov-spin-animation),.gov-button[loading=true] .element>gov-icon:not(.gov-spin-animation),.gov-button[loading="1"] .element>.gov-icon:not(.gov-spin-animation),.gov-button[loading="1"] .element>gov-icon:not(.gov-spin-animation){display:none}.gov-button:not(.gov-button--w-icon)[loading="0"][size=xs] .element,.gov-button:not(.gov-button--w-icon)[loading=false][size=xs] .element,.gov-button:not(.gov-button--w-icon)[loading=""][size=xs] .element{padding:var(--gov-button-xs-padding-y, 0.125rem) calc(var(--gov-button-xs-padding-x, 0.625rem) + var(--gov-button-xs-padding-x, 0.625rem) / 2 + var(--gov-button-xs-icon-size, 1rem) / 2)}.gov-button:not(.gov-button--w-icon)[loading="0"][size=s] .element,.gov-button:not(.gov-button--w-icon)[loading=false][size=s] .element,.gov-button:not(.gov-button--w-icon)[loading=""][size=s] .element{padding:var(--gov-button-s-padding-y, 0.25rem) calc(var(--gov-button-s-padding-x, 0.75rem) + var(--gov-button-s-padding-x, 0.75rem) / 2 + var(--gov-button-s-icon-size, 1rem) / 2)}.gov-button:not(.gov-button--w-icon)[loading="0"][size=m] .element,.gov-button:not(.gov-button--w-icon)[loading=false][size=m] .element,.gov-button:not(.gov-button--w-icon)[loading=""][size=m] .element{padding:var(--gov-button-m-padding-y, 0.375rem) calc(var(--gov-button-m-padding-x, 0.75rem) + var(--gov-button-m-padding-x, 0.75rem) / 2 + var(--gov-button-m-icon-size, 1.25rem) / 2)}.gov-button:not(.gov-button--w-icon)[loading="0"][size=l] .element,.gov-button:not(.gov-button--w-icon)[loading=false][size=l] .element,.gov-button:not(.gov-button--w-icon)[loading=""][size=l] .element{padding:var(--gov-button-l-padding-y, 0.5rem) calc(var(--gov-button-l-padding-x, 1rem) + var(--gov-button-l-padding-x, 1rem) / 2 + var(--gov-button-l-icon-size, 1.5rem) / 2)}.gov-button:not(.gov-button--w-icon)[loading="0"][size=xl] .element,.gov-button:not(.gov-button--w-icon)[loading=false][size=xl] .element,.gov-button:not(.gov-button--w-icon)[loading=""][size=xl] .element{padding:var(--gov-button-xl-padding-y, 0.75rem) calc(var(--gov-button-xl-padding-x, 1.25rem) + var(--gov-button-xl-padding-x, 1.25rem) / 2 + var(--gov-button-xl-icon-size, 1.75rem) / 2)}.gov-button[type=outlined][variant=primary] .gov-spin-animation,.gov-button[type=base][variant=primary] .gov-spin-animation{color:var(--gov-button-primary-outlined-color, var(--gov-color-primary))}.gov-button[type=outlined][variant=primary][inverse=""] .gov-spin-animation,.gov-button[type=outlined][variant=primary][inverse=true i] .gov-spin-animation,.gov-button[type=outlined][variant=primary][inverse="1"] .gov-spin-animation,.gov-button[type=base][variant=primary][inverse=""] .gov-spin-animation,.gov-button[type=base][variant=primary][inverse=true i] .gov-spin-animation,.gov-button[type=base][variant=primary][inverse="1"] .gov-spin-animation{color:inherit}.gov-button[type=outlined][variant=secondary] .gov-spin-animation,.gov-button[type=base][variant=secondary] .gov-spin-animation{color:var(--gov-button-secondary-outlined-color, var(--gov-color-secondary))}.gov-button[type=outlined][variant=secondary][inverse=""] .gov-spin-animation,.gov-button[type=outlined][variant=secondary][inverse=true i] .gov-spin-animation,.gov-button[type=outlined][variant=secondary][inverse="1"] .gov-spin-animation,.gov-button[type=base][variant=secondary][inverse=""] .gov-spin-animation,.gov-button[type=base][variant=secondary][inverse=true i] .gov-spin-animation,.gov-button[type=base][variant=secondary][inverse="1"] .gov-spin-animation{color:inherit}.gov-button[type=outlined][variant=error] .gov-spin-animation,.gov-button[type=base][variant=error] .gov-spin-animation{color:var(--gov-button-error-outlined-color, var(--gov-color-error))}.gov-button[type=outlined][variant=error][inverse=""] .gov-spin-animation,.gov-button[type=outlined][variant=error][inverse=true i] .gov-spin-animation,.gov-button[type=outlined][variant=error][inverse="1"] .gov-spin-animation,.gov-button[type=base][variant=error][inverse=""] .gov-spin-animation,.gov-button[type=base][variant=error][inverse=true i] .gov-spin-animation,.gov-button[type=base][variant=error][inverse="1"] .gov-spin-animation{color:inherit}.gov-button[type=outlined][variant=success] .gov-spin-animation,.gov-button[type=base][variant=success] .gov-spin-animation{color:var(--gov-button-success-outlined-color, var(--gov-color-success-500))}.gov-button[type=outlined][variant=success][inverse=""] .gov-spin-animation,.gov-button[type=outlined][variant=success][inverse=true i] .gov-spin-animation,.gov-button[type=outlined][variant=success][inverse="1"] .gov-spin-animation,.gov-button[type=base][variant=success][inverse=""] .gov-spin-animation,.gov-button[type=base][variant=success][inverse=true i] .gov-spin-animation,.gov-button[type=base][variant=success][inverse="1"] .gov-spin-animation{color:inherit}.gov-button[type=outlined][variant=warning] .gov-spin-animation,.gov-button[type=base][variant=warning] .gov-spin-animation{color:var(--gov-button-warning-outlined-color, var(--gov-color-warning-500))}.gov-button[type=outlined][variant=warning][inverse=""] .gov-spin-animation,.gov-button[type=outlined][variant=warning][inverse=true i] .gov-spin-animation,.gov-button[type=outlined][variant=warning][inverse="1"] .gov-spin-animation,.gov-button[type=base][variant=warning][inverse=""] .gov-spin-animation,.gov-button[type=base][variant=warning][inverse=true i] .gov-spin-animation,.gov-button[type=base][variant=warning][inverse="1"] .gov-spin-animation{color:inherit}';var f;(function(e){e["A"]="a";e["BUTTON"]="button"})(f||(f={}));const k=class{constructor(t){e(this,t);this.govClick=o(this,"gov-click",7);this.govFocus=o(this,"gov-focus",7);this.govBlur=o(this,"gov-blur",7);this.variant=undefined;this.size="m";this.type="solid";this.expanded=false;this.inverse=false;this.name=undefined;this.disabled=false;this.nativeType="button";this.href=undefined;this.target=undefined;this.download=undefined;this.hreflang=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.loading=undefined;this.focusable=true;this.identifier=undefined;this.wcagActiveDescendant=undefined;this.wcagControls=undefined;this.wcagDescribedBy=undefined;this.wcagDescription=undefined;this.wcagDetails=undefined;this.wcagExpanded=undefined;this.wcagLabel=undefined;this.wcagLabelledBy=undefined;this.wcagOwns=undefined;this.wcagHasPopup=undefined;this.wcagPressed=undefined;this.wcagCurrent=undefined;this.isPressed=false;this.h=g(this.host)}validateVariant(e){a(v,e,i.root)}validateType(e){a(s,e,i.root)}validateSize(e){a(c,e,i.root)}validateNativeType(e){a(l,e,i.root)}componentWillLoad(){this.validateVariant(this.variant);this.validateType(this.type);this.validateSize(this.size);this.validateNativeType(this.nativeType)}async componentDidRender(){if(y()){await h(500);await this.validateWcag()}}get classNames(){const{h:e}=this;return b([i.root,e.hasSlot("left-icon")&&i.rootWithIcon,e.hasSlot("right-icon")&&i.rootWithIcon])}render(){const e=this.href?f.A:f.BUTTON;const o=e===f.A?undefined:this.nativeType;return t(r,{hoverable:true,size:this.size,variant:this.variant,class:this.h.classes(this.classNames),type:this.type,inverse:this.inverse},t(e,{class:"element",ref:e=>this.buttonRef=e,onClick:this.onClickHandler.bind(this),onFocus:()=>this.govFocus.emit(),onBlur:()=>this.govBlur.emit(),onMouseDown:()=>this.isPressed=true,onMouseUp:()=>this.isPressed=false,disabled:this.disabled,id:this.identifier,href:this.href,target:this.target,download:this.download,hreflang:this.hreflang,rel:this.rel,name:this.name,type:o,tabindex:this.focusable?"0":"-1","aria-activedescendant":this.wcagActiveDescendant,"aria-describedby":this.wcagActiveDescendant,"aria-description":this.wcagDescription,"aria-controls":this.wcagControls,"aria-details":this.wcagDetails,"aria-expanded":u(this.wcagExpanded),"aria-label":this.wcagLabel,"aria-labelledby":this.wcagLabelledBy,"aria-owns":this.wcagOwns,"aria-haspopup":u(this.wcagHasPopup),"aria-pressed":d(this.isPressed),"aria-disabled":u(this.disabled),"aria-current":this.wcagCurrent},w(this.loading)&&!this.h.hasSlot("right-icon")&&t("gov-icon",{name:"loader",class:"gov-spin-animation"}),this.h.hasSlot("left-icon")&&t("slot",{name:"left-icon"}),t("slot",null),this.h.hasSlot("right-icon")&&t("slot",{name:"right-icon"}),w(this.loading)&&this.h.hasSlot("right-icon")&&t("gov-icon",{name:"loader",class:"gov-spin-animation"})))}onClickHandler(e){e.stopPropagation();if(this.disabled===false){this.govClick.emit(e)}}async setFocus(){this.buttonRef.focus()}async validateWcag(){if(this.focusable){m(this.wcagActiveDescendant,"aria-activedescendant",i.root);m(this.wcagControls,"aria-controls",i.root);m(this.wcagDetails,"aria-details",i.root);m(this.wcagOwns,"aria-owns",i.root);m(this.wcagHasPopup,"aria-haspopup",i.root);p(this.wcagLabel,this.wcagLabelledBy,i.root)}}get host(){return n(this)}static get watchers(){return{variant:["validateVariant"],type:["validateType"],size:["validateSize"],nativeType:["validateNativeType"]}}};k.style=x;export{k as gov_button};
2
- //# sourceMappingURL=p-4681cb3a.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../packages/core/src/utils/bool.utils.ts","../../../packages/core/src/components/gov-button/gov-button.scss?tag=gov-button","../../../packages/core/src/components/gov-button/gov-button.tsx"],"names":["toBool","value","indexOf","govButtonCss","Tags","GovButton","[object Object]","hostRef","this","h","govHost","host","newValue","validateProp","ButtonVariants","ButtonClass","root","Type","Sizes","NativeType","validateVariant","variant","validateType","type","validateSize","size","validateNativeType","nativeType","canValidateWcagOnRender","delay","validateWcag","classNames","prepareClasses","hasSlot","rootWithIcon","Tag","href","A","BUTTON","undefined","Host","hoverable","class","classes","inverse","ref","el","buttonRef","onClick","onClickHandler","bind","onFocus","govFocus","emit","onBlur","govBlur","onMouseDown","isPressed","onMouseUp","disabled","id","identifier","target","download","hreflang","rel","name","tabindex","focusable","aria-activedescendant","wcagActiveDescendant","aria-describedby","aria-description","wcagDescription","aria-controls","wcagControls","aria-details","wcagDetails","aria-expanded","toBoolAttrIfDefined","wcagExpanded","aria-label","wcagLabel","aria-labelledby","wcagLabelledBy","aria-owns","wcagOwns","aria-haspopup","wcagHasPopup","aria-pressed","toBoolAttr","aria-disabled","aria-current","wcagCurrent","loading","e","stopPropagation","govClick","focus","validateWcagRef","validateWcagLabel"],"mappings":"ybAAgBA,EAAOC,GACtB,UAAWA,IAAU,SAAU,CAC9B,MAAO,CAAC,OAAQ,OAAQ,OAAQ,KAAKC,QAAQD,MAAY,OACnD,UAAWA,IAAU,SAAU,CACrC,OAAOA,EAAQ,OACT,UAAWA,IAAU,UAAW,CACtC,OAAOA,MACD,CACN,OAAOA,EAAQ,KAAO,OCRxB,MAAME,EAAe,ojhECWrB,IAAKC,GAAL,SAAKA,GACJA,EAAA,KAAA,IACAA,EAAA,UAAA,UAFD,CAAKA,IAAAA,EAAI,WASIC,EAAS,MAIrBC,YAAAC,wJAa0C,cAIN,sBAIC,mBAID,wCASC,sBAKW,0LAuCV,oYAwFjB,MArKpBC,KAAKC,EAAIC,EAAQF,KAAKG,MAkJvBL,gBAAgBM,GACfC,EAAaC,EAAgBF,EAAUG,EAAYC,MAIpDV,aAAaM,GACZC,EAAaI,EAAML,EAAUG,EAAYC,MAI1CV,aAAaM,GACZC,EAAaK,EAAON,EAAUG,EAAYC,MAI3CV,mBAAmBM,GAClBC,EAAaM,EAAYP,EAAUG,EAAYC,MAKhDV,oBACCE,KAAKY,gBAAgBZ,KAAKa,SAC1Bb,KAAKc,aAAad,KAAKe,MACvBf,KAAKgB,aAAahB,KAAKiB,MACvBjB,KAAKkB,mBAAmBlB,KAAKmB,YAG9BrB,2BACC,GAAIsB,IAA2B,OACxBC,EAAM,WACNrB,KAAKsB,gBAIbC,iBACC,MAAMtB,EAAEA,GAAMD,KAEd,OAAOwB,EAAe,CAACjB,EAAYC,KAAMP,EAAEwB,QAAQ,cAAgBlB,EAAYmB,aAAczB,EAAEwB,QAAQ,eAAiBlB,EAAYmB,eAGrI5B,SACC,MAAM6B,EAAM3B,KAAK4B,KAAOhC,EAAKiC,EAAIjC,EAAKkC,OACtC,MAAMX,EAAaQ,IAAQ/B,EAAKiC,EAAIE,UAAY/B,KAAKmB,WAErD,OACClB,EAAC+B,EAAI,CAACC,UAAW,KAAMhB,KAAMjB,KAAKiB,KAAMJ,QAASb,KAAKa,QAASqB,MAAOlC,KAAKC,EAAEkC,QAAQnC,KAAKuB,YAAaR,KAAMf,KAAKe,KAAMqB,QAASpC,KAAKoC,SACrInC,EAAC0B,EAAG,CACHO,MAAM,UACNG,IAAKC,GAAOtC,KAAKuC,UAAYD,EAC7BE,QAASxC,KAAKyC,eAAeC,KAAK1C,MAClC2C,QAAS,IAAM3C,KAAK4C,SAASC,OAC7BC,OAAQ,IAAM9C,KAAK+C,QAAQF,OAC3BG,YAAa,IAAOhD,KAAKiD,UAAY,KACrCC,UAAW,IAAOlD,KAAKiD,UAAY,MACnCE,SAAUnD,KAAKmD,SACfC,GAAIpD,KAAKqD,WACTzB,KAAM5B,KAAK4B,KACX0B,OAAQtD,KAAKsD,OACbC,SAAUvD,KAAKuD,SACfC,SAAUxD,KAAKwD,SACfC,IAAKzD,KAAKyD,IACVC,KAAM1D,KAAK0D,KACX3C,KAAMI,EACNwC,SAAU3D,KAAK4D,UAAY,IAAM,KAAIC,wBACd7D,KAAK8D,qBAAoBC,mBAC9B/D,KAAK8D,qBAAoBE,mBACzBhE,KAAKiE,gBAAeC,gBACvBlE,KAAKmE,aAAYC,eAClBpE,KAAKqE,YAAWC,gBACfC,EAAoBvE,KAAKwE,cAAaC,aACzCzE,KAAK0E,UAASC,kBACT3E,KAAK4E,eAAcC,YACzB7E,KAAK8E,SAAQC,gBACTR,EAAoBvE,KAAKgF,cAAaC,eACvCC,EAAWlF,KAAKiD,WAAUkC,gBACzBZ,EAAoBvE,KAAKmD,UAASiC,eACnCpF,KAAKqF,aAElB7F,EAAOQ,KAAKsF,WAAatF,KAAKC,EAAEwB,QAAQ,eAAiBxB,EAAA,WAAA,CAAUyD,KAAK,SAASxB,MAAM,uBACvFlC,KAAKC,EAAEwB,QAAQ,cAAgBxB,EAAA,OAAA,CAAMyD,KAAK,cAC3CzD,EAAA,OAAA,MACCD,KAAKC,EAAEwB,QAAQ,eAAiBxB,EAAA,OAAA,CAAMyD,KAAK,eAC3ClE,EAAOQ,KAAKsF,UAAYtF,KAAKC,EAAEwB,QAAQ,eAAiBxB,EAAA,WAAA,CAAUyD,KAAK,SAASxB,MAAM,yBAMnFpC,eAAeyF,GACtBA,EAAEC,kBACF,GAAIxF,KAAKmD,WAAa,MAAO,CAC5BnD,KAAKyF,SAAS5C,KAAK0C,IAQrBzF,iBACCE,KAAKuC,UAAUmD,QAOhB5F,qBACC,GAAIE,KAAK4D,UAAW,CACnB+B,EAAgB3F,KAAK8D,qBAAsB,wBAAyBvD,EAAYC,MAChFmF,EAAgB3F,KAAKmE,aAAc,gBAAiB5D,EAAYC,MAChEmF,EAAgB3F,KAAKqE,YAAa,eAAgB9D,EAAYC,MAC9DmF,EAAgB3F,KAAK8E,SAAU,YAAavE,EAAYC,MACxDmF,EAAgB3F,KAAKgF,aAAc,gBAAiBzE,EAAYC,MAChEoF,EAAkB5F,KAAK0E,UAAW1E,KAAK4E,eAAgBrE,EAAYC","sourcesContent":["export function toBool(value: any): boolean {\n\tif (typeof value === 'string') {\n\t\treturn ['true', 'True', 'TRUE', '1'].indexOf(value) !== -1\n\t} else if (typeof value === 'number') {\n\t\treturn value > 0\n\t} else if (typeof value === 'boolean') {\n\t\treturn value\n\t} else {\n\t\treturn value ? true : false\n\t}\n}\n","/*\n * Button\n */\n\n// Shared definitions - BUTTON & badge\n@import \"./gov-button-core.scss\";\n\n.gov-button {\n\t@extend %button-core;\n\tdisplay: inline-block;\n\t.element {\n\t\tborder-radius: #{$border-radius};\n\t}\n\n\t// STATES\n\t&[loading=\"true\"],\n\t&[loading=\"1\"] {\n\t\t.element {\n\t\t\t> .gov-icon:not(.gov-spin-animation),\n\t\t\t> gov-icon:not(.gov-spin-animation) {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $button-sizes {\n\t\t// Loading state\n\t\t&:not(&--w-icon)[loading=\"0\"][size=\"#{$size}\"],\n\t\t&:not(&--w-icon)[loading=\"false\"][size=\"#{$size}\"],\n\t\t&:not(&--w-icon)[loading=\"\"][size=\"#{$size}\"] {\n\t\t\t.element {\n\t\t\t\tpadding: get(\"padding-y\", $definitions)\n\t\t\t\t\tcalc(get(\"padding-x\", $definitions) + (get(\"padding-x\", $definitions) / 2) + (get(\"icon-size\", $definitions) / 2));\n\t\t\t}\n\t\t}\n\t}\n\t// Loading icon color\n\t@each $variant, $types in $button-variants {\n\t\t&[type=\"outlined\"][variant=\"#{$variant}\"],\n\t\t&[type=\"base\"][variant=\"#{$variant}\"] {\n\t\t\t.gov-spin-animation {\n\t\t\t\tcolor: deep-map-get($button-variants, $variant, \"outlined\", \"color\");\n\t\t\t}\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\t.gov-spin-animation {\n\t\t\t\t\tcolor: inherit;\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, State, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { ButtonSizesType, NativeTypesType, TypesType, ButtonVariants, ButtonVariantType, ButtonClass, Type, NativeType, ButtonTargetType } from './constants'\nimport { govHost, toBoolAttr, toBoolAttrIfDefined, prepareClasses } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { toBool } from '../../utils/bool.utils'\nimport { Sizes } from '../../core/constants/sizes'\nimport { validateWcagLabel, validateWcagRef } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\n\nenum Tags {\n\tA = 'a',\n\tBUTTON = 'button',\n}\n\n@Component({\n\ttag: 'gov-button',\n\tstyleUrl: 'gov-button.scss',\n})\nexport class GovButton {\n\tprivate h: GovHost\n\tprivate buttonRef?: HTMLButtonElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovButtonElement\n\n\t/**\n\t * Style variation of the button\n\t */\n\t@Prop() readonly variant?: ButtonVariantType\n\t/**\n\t * Button’s size\n\t */\n\t@Prop() readonly size?: ButtonSizesType = 'm'\n\t/**\n\t * Button's type\n\t */\n\t@Prop() readonly type?: TypesType = 'solid'\n\t/**\n\t * Expands the button to fill 100% of the container width\n\t */\n\t@Prop() readonly expanded: boolean = false\n\t/**\n\t * Determine if component should have inversed colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * The name of the button, which gets paired with the button's value when submitted as part of a form. Corresponds with the native HTML name attribute\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n\t */\n\t@Prop() readonly nativeType?: NativeTypesType = 'button'\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target?: ButtonTargetType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n\t */\n\t@Prop() readonly download: boolean\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-hreflang\n\t */\n\t@Prop() readonly hreflang: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-referrerpolicy\n\t */\n\t@Prop() readonly referrerpolicy: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-rel\n\t */\n\t@Prop() readonly rel: string\n\t/**\n\t * Indicates whether an asynchronous process is running\n\t */\n\t@Prop() readonly loading: string\n\t/**\n\t * Same as original parametr\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom button identifier\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\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 property to add an aria-controls attribute to the button. Use the attribute to point to the unique id of the content that the button manages\n\t */\n\t@Prop({ attribute: 'wcag-controls' }) readonly wcagControls: string\n\t/**\n\t * Indicates the id of a component that describes the button\n\t */\n\t@Prop({ attribute: 'wcag-described-by' }) readonly wcagDescribedBy: string\n\t/**\n\t * Aria description the button\n\t */\n\t@Prop({ attribute: 'wcag-description' }) readonly wcagDescription: string\n\t/**\n\t * Details of the component\n\t */\n\t@Prop({ attribute: 'wcag-details' }) readonly wcagDetails: string\n\t/**\n\t * If a button expands or collapses adjacent content, then use the ariaExpanded prop to add the aria-expanded attribute to the button\n\t * Set the value to convey the current expanded (true) or collapsed (false) state of the content\n\t */\n\t@Prop({ attribute: 'wcag-expanded' }) readonly wcagExpanded: boolean\n\t/**\n\t * Adds accessible label for the button that is only shown for screen readers\n\t * Typically, this label text replaces the visible text on the button for users who use assistive technology\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component owned by the button\n\t */\n\t@Prop({ attribute: 'wcag-owns' }) readonly wcagOwns: string\n\t/**\n\t * \tUse this property to add an aria-haspopup attribute to a button, if you are using it as a menu button\n\t */\n\t@Prop({ attribute: 'wcag-has-popup' }) readonly wcagHasPopup: string\n\t/**\n\t * Tells screen reader the element is pressed\n\t */\n\t@Prop({ attribute: 'wcag-pressed' }) readonly wcagPressed: string\n\t/**\n\t * Indicates the current item within a container or set of related elements\n\t */\n\t@Prop({ attribute: 'wcag-current' }) readonly wcagCurrent: string\n\t/**\n\t * Emitted when the button click\n\t */\n\t@Event({ eventName: 'gov-click' }) govClick: EventEmitter<PointerEvent>\n\t/**\n\t * Emitted when the button has focus\n\t */\n\t@Event({ eventName: 'gov-focus' }) govFocus: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the button loses focus\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FocusEvent>\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(ButtonVariants, newValue, ButtonClass.root)\n\t}\n\n\t@Watch('type')\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(Type, newValue, ButtonClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, ButtonClass.root)\n\t}\n\n\t@Watch('nativeType')\n\tvalidateNativeType(newValue: string): void {\n\t\tvalidateProp(NativeType, newValue, ButtonClass.root)\n\t}\n\n\t@State() isPressed = false\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateType(this.type)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateNativeType(this.nativeType)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\tget classNames(): string {\n\t\tconst { h } = this\n\n\t\treturn prepareClasses([ButtonClass.root, h.hasSlot('left-icon') && ButtonClass.rootWithIcon, h.hasSlot('right-icon') && ButtonClass.rootWithIcon])\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? Tags.A : Tags.BUTTON\n\t\tconst nativeType = Tag === Tags.A ? undefined : this.nativeType\n\n\t\treturn (\n\t\t\t<Host hoverable={true} size={this.size} variant={this.variant} class={this.h.classes(this.classNames)} type={this.type} inverse={this.inverse}>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\tref={el => (this.buttonRef = el as HTMLButtonElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\tonFocus={() => this.govFocus.emit()}\n\t\t\t\t\tonBlur={() => this.govBlur.emit()}\n\t\t\t\t\tonMouseDown={() => (this.isPressed = true)}\n\t\t\t\t\tonMouseUp={() => (this.isPressed = false)}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tid={this.identifier}\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tdownload={this.download}\n\t\t\t\t\threflang={this.hreflang}\n\t\t\t\t\trel={this.rel}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\ttabindex={this.focusable ? '0' : '-1'}\n\t\t\t\t\taria-activedescendant={this.wcagActiveDescendant}\n\t\t\t\t\taria-describedby={this.wcagActiveDescendant}\n\t\t\t\t\taria-description={this.wcagDescription}\n\t\t\t\t\taria-controls={this.wcagControls}\n\t\t\t\t\taria-details={this.wcagDetails}\n\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\taria-haspopup={toBoolAttrIfDefined(this.wcagHasPopup)}\n\t\t\t\t\taria-pressed={toBoolAttr(this.isPressed)}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\taria-current={this.wcagCurrent}\n\t\t\t\t>\n\t\t\t\t\t{toBool(this.loading) && !this.h.hasSlot('right-icon') && <gov-icon name=\"loader\" class=\"gov-spin-animation\"></gov-icon>}\n\t\t\t\t\t{this.h.hasSlot('left-icon') && <slot name=\"left-icon\"></slot>}\n\t\t\t\t\t<slot />\n\t\t\t\t\t{this.h.hasSlot('right-icon') && <slot name=\"right-icon\"></slot>}\n\t\t\t\t\t{toBool(this.loading) && this.h.hasSlot('right-icon') && <gov-icon name=\"loader\" class=\"gov-spin-animation\"></gov-icon>}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false) {\n\t\t\tthis.govClick.emit(e)\n\t\t}\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.buttonRef.focus()\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\tif (this.focusable) {\n\t\t\tvalidateWcagRef(this.wcagActiveDescendant, 'aria-activedescendant', ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagControls, 'aria-controls', ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagDetails, 'aria-details', ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagOwns, 'aria-owns', ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagHasPopup, 'aria-haspopup', ButtonClass.root)\n\t\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, ButtonClass.root)\n\t\t}\n\t}\n}\n"]}
@@ -1,2 +0,0 @@
1
- import{r as e,c as o,h as t,H as r,g as i}from"./p-682c7cc6.js";import{g as s,t as l}from"./p-3f37ddb6.js";import{g as a,k as c,l as n,m as v}from"./p-76542f4f.js";import{v as g}from"./p-26acf964.js";import{a as m,b as f}from"./p-364b4792.js";import{c as d}from"./p-c20102ff.js";import{c as h}from"./p-24636c53.js";import{d as p}from"./p-03990da5.js";import"./p-55500e5a.js";import"./p-ff7365ae.js";import"./p-ef79904e.js";import"./p-6278531b.js";import"./p-f687452c.js";import"./p-561fa17b.js";const u='.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)}}.gov-form-select{position:relative;display:flex;width:100%;align-items:center}.gov-form-select .element{position:relative;flex:1 1 auto}.gov-form-select input,.gov-form-select select,.gov-form-select textarea{width:100%;border:var(--gov-form-input-border-width, 0.0625rem solid var(--gov-color-secondary-700));border-radius:var(--gov-border-radius, 0.1875rem);background-color:var(--gov-form-bg-color, var(--gov-color-neutral-white));color:var(--gov-form-input-color, var(--gov-color-secondary-700));font-family:var(--gov-font-family, "Roboto", sans-serif)}.gov-form-select input:focus,.gov-form-select select:focus,.gov-form-select textarea:focus{outline:none}.gov-form-select input:focus-visible,.gov-form-select select:focus-visible,.gov-form-select textarea:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-form-select input::-moz-placeholder,.gov-form-select select::-moz-placeholder,.gov-form-select textarea::-moz-placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-select input::placeholder,.gov-form-select select::placeholder,.gov-form-select textarea::placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-select textarea{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);padding:0.5rem 0.75rem;resize:none}.gov-form-select *[slot=left-icon],.gov-form-select *[slot=right-icon]{position:absolute;top:50%;display:flex;justify-content:center;color:var(--gov-form-input-icon-color, var(--gov-color-primary));transform:translateY(-50%);pointer-events:none}.gov-form-select *[slot=left-icon]{left:0}.gov-form-select *[slot=right-icon]{right:0}[disabled=""].gov-form-select,[disabled=true i].gov-form-select,[disabled="1"].gov-form-select{pointer-events:none}[disabled=""].gov-form-select input,[disabled=""].gov-form-select select,[disabled=""].gov-form-select textarea,[disabled=true i].gov-form-select input,[disabled=true i].gov-form-select select,[disabled=true i].gov-form-select textarea,[disabled="1"].gov-form-select input,[disabled="1"].gov-form-select select,[disabled="1"].gov-form-select textarea{border-color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));background:var(--gov-form-input-disabled-bg, var(--gov-color-secondary-300));color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600))}[disabled=""].gov-form-select *[slot=left-icon],[disabled=""].gov-form-select *[slot=right-icon],[disabled=true i].gov-form-select *[slot=left-icon],[disabled=true i].gov-form-select *[slot=right-icon],[disabled="1"].gov-form-select *[slot=left-icon],[disabled="1"].gov-form-select *[slot=right-icon]{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600))}[invalid=""].gov-form-select input,[invalid=""].gov-form-select select,[invalid=""].gov-form-select textarea,[invalid=true i].gov-form-select input,[invalid=true i].gov-form-select select,[invalid=true i].gov-form-select textarea,[invalid="1"].gov-form-select input,[invalid="1"].gov-form-select select,[invalid="1"].gov-form-select textarea{border-color:var(--gov-form-state-color-error, var(--gov-color-error));color:var(--gov-form-state-color-error, var(--gov-color-error))}[invalid=""].gov-form-select input::-moz-placeholder,[invalid=""].gov-form-select select::-moz-placeholder,[invalid=""].gov-form-select textarea::-moz-placeholder,[invalid=true i].gov-form-select input::-moz-placeholder,[invalid=true i].gov-form-select select::-moz-placeholder,[invalid=true i].gov-form-select textarea::-moz-placeholder,[invalid="1"].gov-form-select input::-moz-placeholder,[invalid="1"].gov-form-select select::-moz-placeholder,[invalid="1"].gov-form-select textarea::-moz-placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-select input::placeholder,[invalid=""].gov-form-select select::placeholder,[invalid=""].gov-form-select textarea::placeholder,[invalid=true i].gov-form-select input::placeholder,[invalid=true i].gov-form-select select::placeholder,[invalid=true i].gov-form-select textarea::placeholder,[invalid="1"].gov-form-select input::placeholder,[invalid="1"].gov-form-select select::placeholder,[invalid="1"].gov-form-select textarea::placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-select *[slot=left-icon],[invalid=""].gov-form-select *[slot=right-icon],[invalid=true i].gov-form-select *[slot=left-icon],[invalid=true i].gov-form-select *[slot=right-icon],[invalid="1"].gov-form-select *[slot=left-icon],[invalid="1"].gov-form-select *[slot=right-icon]{color:var(--gov-form-state-color-error, var(--gov-color-error))}[invalid=""].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid=true i].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid="1"].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[success=""].gov-form-select *[slot=right-icon],[success=true i].gov-form-select *[slot=right-icon],[success="1"].gov-form-select *[slot=right-icon]{color:var(--gov-form-state-color-success, var(--gov-color-success))}[success=""].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success=true i].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success="1"].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[size=m].gov-form-select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);gap:0.5rem var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-select input,[size=m].gov-form-select select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);height:var(--gov-form-input-core-m-height, 2.5rem);padding:var(--gov-form-input-core-m-padding, 0.4375rem 0.75rem)}[size=m].gov-form-select *[slot=left-icon],[size=m].gov-form-select *[slot=right-icon]{width:var(--gov-form-input-core-m-icon-size, 1rem);height:var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=m].gov-form-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-select *[slot=right-icon]~input,[size=m].gov-form-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=l].gov-form-select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);gap:0.5rem var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-select input,[size=l].gov-form-select select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);height:var(--gov-form-input-core-l-height, 3rem);padding:var(--gov-form-input-core-l-padding, 0.6875rem 0.75rem)}[size=l].gov-form-select *[slot=left-icon],[size=l].gov-form-select *[slot=right-icon]{width:var(--gov-form-input-core-l-icon-size, 1rem);height:var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=l].gov-form-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-select *[slot=right-icon]~input,[size=l].gov-form-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=xl].gov-form-select{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing);gap:0.5rem var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-select input,[size=xl].gov-form-select select{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing);height:var(--gov-form-input-core-xl-height, 3.5rem);padding:var(--gov-form-input-core-xl-padding, 0.9375rem 1rem 0.875rem)}[size=xl].gov-form-select *[slot=left-icon],[size=xl].gov-form-select *[slot=right-icon]{width:var(--gov-form-input-core-xl-icon-size, 1.25rem);height:var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-xl-icon-padding, 3rem)}[size=xl].gov-form-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-select *[slot=right-icon]~input,[size=xl].gov-form-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-xl-icon-padding, 3rem)}.gov-form-select{background:none}.gov-form-select select{-webkit-appearance:none;-moz-appearance:none}.gov-form-select select::-ms-expand{display:none}[size=m].gov-form-select *[slot=right-icon]{right:var(--gov-form-select-m-arrow-right-position, 1rem);width:var(--gov-form-select-m-arrow-size, 0.5rem);height:var(--gov-form-select-m-arrow-size, 0.5rem)}[size=l].gov-form-select *[slot=right-icon]{right:var(--gov-form-select-l-arrow-right-position, 1rem);width:var(--gov-form-select-l-arrow-size, 0.5rem);height:var(--gov-form-select-l-arrow-size, 0.5rem)}[size=xl].gov-form-select *[slot=right-icon]{right:var(--gov-form-select-xl-arrow-right-position, 1.3125rem);width:var(--gov-form-select-xl-arrow-size, 0.625rem);height:var(--gov-form-select-xl-arrow-size, 0.625rem)}';const z=class{constructor(t){e(this,t);this.govFocus=o(this,"gov-focus",7);this.govBlur=o(this,"gov-blur",7);this.govChange=o(this,"gov-change",7);this.value=undefined;this.identifier=undefined;this.variant=undefined;this.size="m";this.name=undefined;this.required=false;this.disabled=undefined;this.invalid=undefined;this.wcagActiveDescendant=undefined;this.wcagControls=undefined;this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagOwns=undefined;this.focused=undefined;this.h=s(this.host);this.selectId=h("GovSelect");this.f=a(s(this.host))}validateVariant(e){g(n,e,c.root)}validateSize(e){g(v,e,c.root)}componentWillLoad(){this.validateVariant(this.variant);this.validateSize(this.size);this.host.querySelectorAll("option").forEach((e=>{if(e.value===this.value){e.setAttribute("selected","true")}}));this.f.passAttrToControl("type","select")}async componentDidRender(){if(d()){await p(500);await this.validateWcag()}}render(){return t(r,{class:c.root,size:this.size,variant:this.variant},this.h.hasSlot("prefix")&&t("slot",{name:"prefix"}),t("span",{class:"element"},t("gov-icon",{slot:"right-icon",name:"arrow-down"}),t("select",{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:e=>this.selectRef=e,"aria-disabled":l(this.disabled),"aria-activedescendant":this.wcagActiveDescendant,"aria-controls":this.wcagControls,"aria-required":l(this.required),"aria-invalid":l(this.invalid),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-owns":this.wcagOwns},t("slot",null))),this.h.hasSlot("sufix")&&t("slot",{name:"sufix"}))}onFocusHandler(e){this.focused=true;this.govFocus.emit(e)}onBlurHandler(e){this.focused=false;this.govBlur.emit(e)}onChangeHandler(e){this.value=e.target.value;e.stopPropagation();this.govChange.emit(e)}async setFocus(e){return this.selectRef.focus(e)}async setValue(e){this.value=e}async getInstance(){return this.selectRef}async validateWcag(){m(this.wcagActiveDescendant,"wcag-active-descendant",c.root);m(this.wcagControls,"wcag-controls",c.root);m(this.wcagDescribedBy,"wcag-described-by",c.root);m(this.wcagOwns,"wcag-owns",c.root);f(this.identifier||this.selectId,this.wcagLabelledBy,c.root)}get host(){return i(this)}static get watchers(){return{variant:["validateVariant"],size:["validateSize"]}}};z.style=u;export{z as gov_form_select};
2
- //# sourceMappingURL=p-469273be.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"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"],"names":["govFormSelectCss","GovFormSelect","[object Object]","hostRef","this","h","govHost","host","selectId","createID","f","govForm","newValue","validateProp","FormSelectVariants","FormSelectClass","root","FormSelectSizes","validateVariant","variant","validateSize","size","querySelectorAll","forEach","option","value","setAttribute","passAttrToControl","canValidateWcagOnRender","delay","validateWcag","Host","class","hasSlot","name","slot","id","identifier","onFocus","onFocusHandler","bind","onChange","onChangeHandler","onBlur","onBlurHandler","required","disabled","ref","el","selectRef","aria-disabled","toBoolAttrIfDefined","aria-activedescendant","wcagActiveDescendant","aria-controls","wcagControls","aria-required","aria-invalid","invalid","aria-describedby","wcagDescribedBy","aria-labelledby","wcagLabelledBy","aria-owns","wcagOwns","e","focused","govFocus","emit","govBlur","target","stopPropagation","govChange","options","focus","validateWcagRef","validateWcagLabelFor"],"mappings":"+eAAA,MAAMA,EAAmB,wiVCgBZC,EAAa,MAOzBC,YAAAC,yMAsB8C,sCAST,iOA9BpCC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,SAAWC,EAAS,aACzBL,KAAKM,EAAIC,EAAQL,EAAQF,KAAKG,OAyE/BL,gBAAgBU,GACfC,EAAaC,EAAoBF,EAAUG,EAAgBC,MAI5Dd,aAAaU,GACZC,EAAaI,EAAiBL,EAAUG,EAAgBC,MAGzDd,oBACCE,KAAKc,gBAAgBd,KAAKe,SAC1Bf,KAAKgB,aAAahB,KAAKiB,MAEvBjB,KAAKG,KAAKe,iBAAiB,UAAUC,SAASC,IAC7C,GAAIA,EAAOC,QAAUrB,KAAKqB,MAAO,CAChCD,EAAOE,aAAa,WAAY,YAIlCtB,KAAKM,EAAEiB,kBAAkB,OAAQ,UAGlCzB,2BACC,GAAI0B,IAA2B,OACxBC,EAAM,WACNzB,KAAK0B,gBAIb5B,SACC,OACCG,EAAC0B,EAAI,CAACC,MAAOjB,EAAgBC,KAAMK,KAAMjB,KAAKiB,KAAMF,QAASf,KAAKe,SAChEf,KAAKC,EAAE4B,QAAQ,WAAa5B,EAAA,OAAA,CAAM6B,KAAK,WACxC7B,EAAA,OAAA,CAAM2B,MAAM,WACX3B,EAAA,WAAA,CAAU8B,KAAK,aAAaD,KAAK,eACjC7B,EAAA,SAAA,CACC+B,GAAIhC,KAAKiC,YAAcjC,KAAKI,SAC5B8B,QAASlC,KAAKmC,eAAeC,KAAKpC,MAClCqC,SAAUrC,KAAKsC,gBAAgBF,KAAKpC,MACpCuC,OAAQvC,KAAKwC,cAAcJ,KAAKpC,MAChCyC,SAAUzC,KAAKyC,SACfX,KAAM9B,KAAK8B,KACXY,SAAU1C,KAAK0C,SACfC,IAAKC,GAAO5C,KAAK6C,UAAYD,EAAwBE,gBACtCC,EAAoB/C,KAAK0C,UAASM,wBAC1BhD,KAAKiD,qBAAoBC,gBACjClD,KAAKmD,aAAYC,gBACjBL,EAAoB/C,KAAKyC,UAASY,eACnCN,EAAoB/C,KAAKsD,SAAQC,mBAC7BvD,KAAKwD,gBAAeC,kBACrBzD,KAAK0D,eAAcC,YACzB3D,KAAK4D,UAEhB3D,EAAA,OAAA,QAGDD,KAAKC,EAAE4B,QAAQ,UAAY5B,EAAA,OAAA,CAAM6B,KAAK,WAKlChC,eAAe+D,GACtB7D,KAAK8D,QAAU,KACf9D,KAAK+D,SAASC,KAAKH,GAGZ/D,cAAc+D,GACrB7D,KAAK8D,QAAU,MACf9D,KAAKiE,QAAQD,KAAKH,GAGX/D,gBAAgB+D,GACvB7D,KAAKqB,MAASwC,EAAEK,OAA6B7C,MAC7CwC,EAAEM,kBACFnE,KAAKoE,UAAUJ,KAAKH,GAOrB/D,eAAeuE,GACd,OAAOrE,KAAK6C,UAAUyB,MAAMD,GAO7BvE,eAAeuB,GACdrB,KAAKqB,MAAQA,EAOdvB,oBACC,OAAOE,KAAK6C,UAOb/C,qBACCyE,EAAgBvE,KAAKiD,qBAAsB,yBAA0BtC,EAAgBC,MACrF2D,EAAgBvE,KAAKmD,aAAc,gBAAiBxC,EAAgBC,MACpE2D,EAAgBvE,KAAKwD,gBAAiB,oBAAqB7C,EAAgBC,MAC3E2D,EAAgBvE,KAAK4D,SAAU,YAAajD,EAAgBC,MAC5D4D,EAAqBxE,KAAKiC,YAAcjC,KAAKI,SAAUJ,KAAK0D,eAAgB/C,EAAgBC","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, h, State, Prop, Event, EventEmitter, Watch, Host, Method } from '@stencil/core'\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { toBoolAttrIfDefined, govHost } from '../../../helpers/Dom/template'\nimport { FormSelectSizesType, FormSelectVariants, FormSelectVariantType, FormSelectClass, FormSelectSizes } from './constants'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { validateWcagLabelFor, validateWcagRef } from '../../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../../helpers/Dom/win'\nimport { createID } from '../../../utils/string.utils'\nimport { delay } from '../../../utils/utils'\nimport { GovForm } from '../../../helpers/Dom/form.types'\nimport { govForm } from '../../../helpers/Dom/form'\n\n@Component({\n\ttag: 'gov-form-select',\n\tstyleUrl: 'gov-form-select.scss',\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate 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.selectId = createID('GovSelect')\n\t\tthis.f = govForm(govHost(this.host))\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 * 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\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 * 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\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<FocusEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter\n\t@State() focused: boolean\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\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\n\t\tthis.host.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.value === this.value) {\n\t\t\t\toption.setAttribute('selected', 'true')\n\t\t\t}\n\t\t})\n\n\t\tthis.f.passAttrToControl('type', 'select')\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\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=\"arrow-down\"></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</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(e)\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit(e)\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(e)\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 * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getInstance(): 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"]}
@@ -1,2 +0,0 @@
1
- import{r as o,c as a,h as r,H as i,g as s}from"./p-682c7cc6.js";import{v as t}from"./p-364b4792.js";import{c as e}from"./p-c20102ff.js";import{d as c}from"./p-03990da5.js";import{g as n,b as p}from"./p-3f37ddb6.js";import"./p-561fa17b.js";import"./p-24636c53.js";const d={root:"gov-backdrop",bg:"gov-backdrop__bg"};const g='.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)}}.gov-backdrop__bg{z-index:100;position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--gov-backdrop-bg, var(--gov-color-secondary));opacity:var(--gov-backdrop-opacity, 0.45)}.gov-backdrop[inverse=""] .gov-backdrop__bg,.gov-backdrop[inverse=true i] .gov-backdrop__bg,.gov-backdrop[inverse="1"] .gov-backdrop__bg{background-color:var(--gov-backdrop-bg-inverse, var(--gov-color-neutral-white));opacity:var(--gov-backdrop-opacity, 0.8)}';const b=class{constructor(r){o(this,r);this.govClick=a(this,"gov-click",7);this.inverse=false;this.visible=false;this.wcagLabel=undefined;this.wcagLabelledBy=undefined;this.h=n(this.host)}async componentDidRender(){if(e()){await c(500);await this.validateWcag()}}render(){if(!this.visible)return null;return r(i,{class:this.h.classes(d.root),inverse:p(this.inverse)},r("div",{role:"button","aria-label":this.wcagLabel,"aria-labelledby":this.wcagLabelledBy,onClick:o=>this.govClick.emit(o),class:d.bg}))}async validateWcag(){t(this.wcagLabel,this.wcagLabelledBy,d.root)}get host(){return s(this)}};b.style=g;export{b as gov_backdrop};
2
- //# sourceMappingURL=p-5547dbb0.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../packages/core/src/components/gov-backdrop/constants.ts","../../../packages/core/src/components/gov-backdrop/gov-backdrop.scss?tag=gov-backdrop","../../../packages/core/src/components/gov-backdrop/gov-backdrop.tsx"],"names":["BackdropClass","root","bg","govBackdropCss","GovBackdrop","[object Object]","hostRef","this","h","govHost","host","canValidateWcagOnRender","delay","validateWcag","visible","Host","class","classes","inverse","booleanString","role","aria-label","wcagLabel","aria-labelledby","wcagLabelledBy","onClick","e","govClick","emit","validateWcagLabel"],"mappings":"uQAAO,MAAMA,EAAgB,CAC5BC,KAAM,eACNC,GAAI,oBCFL,MAAMC,EAAiB,ynBCYVC,EAAW,MAGvBC,YAAAC,8DAQoC,mBAIlB,6DAXjBC,KAAKC,EAAIC,EAAQF,KAAKG,MAyBvBL,2BACC,GAAIM,IAA2B,OACxBC,EAAM,WACNL,KAAKM,gBAIbR,SACC,IAAKE,KAAKO,QAAS,OAAO,KAC1B,OACCN,EAACO,EAAI,CAACC,MAAOT,KAAKC,EAAES,QAAQjB,EAAcC,MAAOiB,QAASC,EAAcZ,KAAKW,UAC5EV,EAAA,MAAA,CACCY,KAAM,SAAQC,aACFd,KAAKe,UAASC,kBACThB,KAAKiB,eACtBC,QAASC,GAAKnB,KAAKoB,SAASC,KAAKF,GACjCV,MAAOhB,EAAcE,MAUzBG,qBACCwB,EAAkBtB,KAAKe,UAAWf,KAAKiB,eAAgBxB,EAAcC","sourcesContent":["export const BackdropClass = {\n\troot: 'gov-backdrop',\n\tbg: 'gov-backdrop__bg',\n}\n","/*\n * Backdrop\n */\n\n$class: \".gov-backdrop\";\n\n#{$class} {\n\t&__bg {\n\t\t@include z-index(\"modal\", 0);\n\t\tposition: fixed;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tbackground-color: $backdrop-bg;\n\t\topacity: $backdrop-opacity;\n\t}\n\n\t// VARIANTS\n\t@include parameter(\"inverse\") {\n\t\t#{$class} {\n\t\t\t&__bg {\n\t\t\t\tbackground-color: $backdrop-bg-inverse;\n\t\t\t\topacity: $backdrop-opacity-inverse;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Event, EventEmitter, h, Method, Prop, Host, Element } from '@stencil/core'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { BackdropClass } from './constants'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { booleanString, govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-backdrop',\n\tstyleUrl: 'gov-backdrop.scss',\n})\nexport class GovBackdrop {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovAlertElement\n\t/**\n\t * Determide if component should have inversed colors to be used on dark background.\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Default attribute for backdrop display\n\t */\n\t@Prop() visible = false\n\t/**\n\t * Adds accessible label for the backdrop that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when button clicks.\n\t */\n\t@Event({ eventName: 'gov-click' }) govClick: EventEmitter<MouseEvent>\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tif (!this.visible) return null\n\t\treturn (\n\t\t\t<Host class={this.h.classes(BackdropClass.root)} inverse={booleanString(this.inverse)}>\n\t\t\t\t<div\n\t\t\t\t\trole={'button'}\n\t\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\tonClick={e => this.govClick.emit(e)}\n\t\t\t\t\tclass={BackdropClass.bg}\n\t\t\t\t></div>\n\t\t\t</Host>\n\t\t)\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\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, BackdropClass.root)\n\t}\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../packages/core/src/components/gov-statsbar/constants.tsx"],"names":["StatsBarIconPosition","StatsBarVariant","pick","Variants","StatsBarClass","root","section","StatsBarItemClass","icon","number","text"],"mappings":"4EAIYA,GAAZ,SAAYA,GACXA,EAAA,QAAA,QADD,CAAYA,IAAAA,EAAoB,WAKnBC,EAAkBC,EAAKC,EAAU,CAAC,UAAW,oBAG7CC,EAAgB,CAC5BC,KAAM,eACNC,QAAS,+BAGGC,EAAoB,CAChCF,KAAM,oBACNG,KAAM,0BACNC,OAAQ,4BACRC,KAAM","sourcesContent":["import { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils'\nimport { Variants } from '../../core/constants/variants'\n\nexport enum StatsBarIconPosition {\n\tLEFT = 'left',\n}\nexport type StatsBarIconPositionType = `${ValueOf<typeof StatsBarIconPosition>}`\n\nexport const StatsBarVariant = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type StatsBarVariantType = `${ValueOf<typeof StatsBarVariant>}`\n\nexport const StatsBarClass = {\n\troot: 'gov-statsbar',\n\tsection: 'gov-statsbar__section',\n}\n\nexport const StatsBarItemClass = {\n\troot: 'gov-statsbar-item',\n\ticon: 'gov-statsbar-item__icon',\n\tnumber: 'gov-statsbar-item__number',\n\ttext: 'gov-statsbar-item__text',\n}\n"]}
@@ -1,2 +0,0 @@
1
- import{r as o,c as i,h as a,H as e,g as r}from"./p-682c7cc6.js";import{a as t}from"./p-561fa17b.js";import{v as n}from"./p-26acf964.js";import{A as c,b as d,c as s}from"./p-0284b5e2.js";import{c as v}from"./p-24636c53.js";import{g,b as l,t as m}from"./p-3f37ddb6.js";import"./p-55500e5a.js";import"./p-ff7365ae.js";import"./p-03990da5.js";const h='.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)}}.gov-accordion-item{position:relative;display:block;width:100%}.gov-accordion-item__header{display:inline-flex;vertical-align:middle;justify-content:center;align-items:center;border:0;background-color:transparent;text-align:center;text-decoration:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;display:flex;justify-content:space-between;align-items:center;width:100%;border-radius:0;text-align:left;text-transform:none;transition:background-color 150ms ease-in-out}.gov-accordion-item__header:focus{outline:none}.gov-accordion-item__header:focus{outline:none}.gov-accordion-item__header:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-accordion-item__header::before{content:"";position:absolute;display:block;right:0;bottom:-1px;left:0;height:1px}.gov-accordion-item__header:focus-visible::before{display:none}.gov-accordion-item__header[aria-expanded=""] .gov-accordion-item__arrow,.gov-accordion-item__header[aria-expanded=true i] .gov-accordion-item__arrow,.gov-accordion-item__header[aria-expanded="1"] .gov-accordion-item__arrow{transform:scale(-1)}.gov-accordion-item__arrow{flex:0 0 auto;align-self:center}.gov-accordion-item__icon{display:inline-flex;vertical-align:middle;flex:0 0 auto}.gov-accordion-item__suffix{display:inline-flex;vertical-align:middle;flex:0 0 auto;align-self:start;margin-left:auto;line-height:initial}.gov-accordion-item__title{margin:0;padding:0;font-family:var(--gov-font-family, "Roboto", sans-serif);font-weight:400;box-sizing:border-box;display:flex;flex:1 1 auto;align-items:flex-start}.gov-accordion-item__name{display:flex;flex-direction:column}.gov-accordion-item__annot{color:var(--gov-color-secondary)}.gov-accordion-item__content>*:last-child{margin-bottom:0}.gov-accordion-item[size=s] .gov-accordion-item__header{gap:var(--gov-accordion-s-headline-gap, 0.5rem);min-height:var(--gov-accordion-s-min-height, 3rem);padding:var(--gov-accordion-s-padding-y, 0.75rem) var(--gov-accordion-s-padding-x, 0.5rem)}.gov-accordion-item[size=s] .gov-accordion-item__arrow{width:var(--gov-accordion-s-icon-size, 0.75rem);height:var(--gov-accordion-s-icon-size, 0.75rem)}.gov-accordion-item[size=s] .gov-accordion-item__icon{width:calc(var(--gov-text-m-font-size) * 1.2);height:calc(var(--gov-text-m-font-size) * 1.2);transform:translateY(var(--gov-accordion-s-icon-position, 0.0625rem))}.gov-accordion-item[size=s] .gov-accordion-item__title{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);gap:var(--gov-accordion-s-headline-gap, 0.5rem)}.gov-accordion-item[size=s] .gov-accordion-item__annot{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}.gov-accordion-item[size=s] .gov-accordion-item__content{padding:var(--gov-accordion-s-padding-inner, 1rem 0.5rem)}.gov-accordion-item[size=m] .gov-accordion-item__header{gap:var(--gov-accordion-m-headline-gap, 1rem);min-height:var(--gov-accordion-m-min-height, 4.5rem);padding:var(--gov-accordion-m-padding-y, 1.25rem) var(--gov-accordion-m-padding-x, 0.5rem)}.gov-accordion-item[size=m] .gov-accordion-item__arrow{width:var(--gov-accordion-m-icon-size, 1rem);height:var(--gov-accordion-m-icon-size, 1rem)}.gov-accordion-item[size=m] .gov-accordion-item__icon{width:calc(var(--gov-text-2xl-font-size) * 1.2);height:calc(var(--gov-text-2xl-font-size) * 1.2);transform:translateY(var(--gov-accordion-m-icon-position, 0.125rem))}.gov-accordion-item[size=m] .gov-accordion-item__title{font-weight:var(--gov-text-2xl-font-weight);font-size:var(--gov-text-2xl-font-size);line-height:var(--gov-text-2xl-line-height);letter-spacing:var(--gov-text-2xl-letter-spacing);gap:var(--gov-accordion-m-headline-gap, 1rem)}.gov-accordion-item[size=m] .gov-accordion-item__annot{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}.gov-accordion-item[size=m] .gov-accordion-item__content{padding:var(--gov-accordion-m-padding-inner, 1.25rem 0.5rem)}.gov-accordion-item[size=l] .gov-accordion-item__header{gap:var(--gov-accordion-l-headline-gap, 1rem);min-height:var(--gov-accordion-l-min-height, 5.5rem);padding:var(--gov-accordion-l-padding-y, 1.375rem) var(--gov-accordion-l-padding-x, 0.5rem)}.gov-accordion-item[size=l] .gov-accordion-item__arrow{width:var(--gov-accordion-l-icon-size, 1.25rem);height:var(--gov-accordion-l-icon-size, 1.25rem)}.gov-accordion-item[size=l] .gov-accordion-item__icon{width:calc(var(--gov-text-3xl-font-size) * 1.2);height:calc(var(--gov-text-3xl-font-size) * 1.2);transform:translateY(var(--gov-accordion-l-icon-position, 0.125rem))}.gov-accordion-item[size=l] .gov-accordion-item__title{font-weight:var(--gov-text-3xl-font-weight);font-size:var(--gov-text-3xl-font-size);line-height:var(--gov-text-3xl-line-height);letter-spacing:var(--gov-text-3xl-letter-spacing);gap:var(--gov-accordion-l-headline-gap, 1rem)}.gov-accordion-item[size=l] .gov-accordion-item__annot{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}.gov-accordion-item[size=l] .gov-accordion-item__content{padding:var(--gov-accordion-l-padding-inner, 1.25rem 0.5rem)}.gov-accordion-item[variant=primary] .gov-accordion-item__header{background-color:var(--gov-accordion-primary-background, transparent);color:var(--gov-accordion-primary-color, var(--gov-color-primary))}.gov-accordion-item[variant=primary] .gov-accordion-item__header::before{background-color:var(--gov-accordion-primary-separator, var(--gov-color-secondary-500))}@media not all and (pointer: coarse){.gov-accordion-item[variant=primary] .gov-accordion-item__header:hover{background-color:var(--gov-accordion-primary-background-hover, var(--gov-color-primary-200))}}.gov-accordion-item[variant=primary][disabled=""] .gov-accordion-item__header,.gov-accordion-item[variant=primary][disabled=true i] .gov-accordion-item__header,.gov-accordion-item[variant=primary][disabled="1"] .gov-accordion-item__header{color:var(--gov-accordion-primary-disabled-color, var(--gov-color-primary-400))}@media not all and (pointer: coarse){.gov-accordion-item[variant=primary][disabled=""] .gov-accordion-item__header:hover,.gov-accordion-item[variant=primary][disabled=true i] .gov-accordion-item__header:hover,.gov-accordion-item[variant=primary][disabled="1"] .gov-accordion-item__header:hover{background:transparent;cursor:not-allowed}}.gov-accordion-item[variant=secondary] .gov-accordion-item__header{background-color:var(--gov-accordion-secondary-background, transparent);color:var(--gov-accordion-secondary-color, var(--gov-color-secondary))}.gov-accordion-item[variant=secondary] .gov-accordion-item__header::before{background-color:var(--gov-accordion-secondary-separator, var(--gov-color-secondary-500))}@media not all and (pointer: coarse){.gov-accordion-item[variant=secondary] .gov-accordion-item__header:hover{background-color:var(--gov-accordion-secondary-background-hover, var(--gov-color-secondary-200))}}.gov-accordion-item[variant=secondary][disabled=""] .gov-accordion-item__header,.gov-accordion-item[variant=secondary][disabled=true i] .gov-accordion-item__header,.gov-accordion-item[variant=secondary][disabled="1"] .gov-accordion-item__header{color:var(--gov-accordion-secondary-disabled-color, var(--gov-color-secondary-600))}@media not all and (pointer: coarse){.gov-accordion-item[variant=secondary][disabled=""] .gov-accordion-item__header:hover,.gov-accordion-item[variant=secondary][disabled=true i] .gov-accordion-item__header:hover,.gov-accordion-item[variant=secondary][disabled="1"] .gov-accordion-item__header:hover{background:transparent;cursor:not-allowed}}@media (max-width: 47.99em){.gov-accordion-item__title{flex-wrap:wrap}.gov-accordion-item__label{flex:0 0 auto;max-width:calc(100% - 50px)}}';const p=class{constructor(a){o(this,a);this.govChange=i(this,"gov-change",7);this.isExpandedState=undefined;this.variant="primary";this.identifier=undefined;this.size=undefined;this.label=undefined;this.annotation=undefined;this.disabled=false;this.isExpanded=false;this.triggerTag="h3";this.h=g(this.host);this.triggerId=v("GovAccordionItem");this.contentId=v("GovAccordionContent")}validateLabel(o){if(!o){t(`[${c.root}]: Parameter label is required.`)}}validateTriggerTag(o){const i=["h1","h2","h3","h4","h5","h6","span"];if(o){if(!i.includes(o)){t(`[${c.root}]: Tag ${o} is not allowed.`)}}}validateSize(o){n(d,o,c.root)}validateVariant(o){n(s,o,c.root)}emmitChange(){this.govChange.emit({open:this.isExpandedState,element:this.host})}componentWillLoad(){this.isExpandedState=this.isExpanded;this.validateSize(this.size);this.validateLabel(this.label);this.validateVariant(this.variant);this.validateTriggerTag(this.triggerTag)}render(){const o=this.identifier||this.triggerId;const i=this.contentId;const{isExpandedState:r,label:t}=this;const n=this.triggerTag;return a(e,{class:this.h.classes(c.root),role:"listitem"},a("button",{id:o,class:c.header,"aria-expanded":l(r),"aria-controls":i,disabled:this.disabled,"aria-disabled":m(this.disabled),onClick:()=>this.toggle()},a(n,{class:c.title},this.h.hasSlot("icon")&&a("span",{class:c.icon},a("slot",{name:"icon"})),a("span",{class:c.name},a("span",{class:c.label},t),this.annotation&&a("span",{class:c.annot},this.annotation)),this.h.hasSlot("suffix")&&a("span",{class:c.suffix},a("slot",{name:"suffix"}))),a("gov-icon",{class:c.arrow,name:"arrow-down"})),a("div",{class:c.content,id:i,"aria-hidden":l(!r),hidden:!r,"aria-labelledby":o},a("slot",null)))}async open(){this.isExpandedState=true;this.emmitChange()}async close(){this.isExpandedState=false;this.emmitChange()}async toggle(){this.isExpandedState=!this.isExpandedState;this.emmitChange()}async currentState(){return this.isExpandedState}get host(){return r(this)}static get watchers(){return{label:["validateLabel"],triggerTag:["validateTriggerTag"],size:["validateSize"],variant:["validateVariant"]}}};p.style=h;export{p as gov_accordion_item};
2
- //# sourceMappingURL=p-63079b80.entry.js.map
@@ -1,2 +0,0 @@
1
- import{r as o,c as i,h as r,H as t,g as e}from"./p-682c7cc6.js";import{c as s}from"./p-24636c53.js";import{v as a}from"./p-26acf964.js";import{g as c,e as h,f as g}from"./p-76542f4f.js";import{g as v,t as m}from"./p-3f37ddb6.js";import{a as f,b as l}from"./p-364b4792.js";import{c as n}from"./p-c20102ff.js";import{d}from"./p-03990da5.js";import"./p-561fa17b.js";import"./p-55500e5a.js";import"./p-ff7365ae.js";import"./p-ef79904e.js";import"./p-6278531b.js";import"./p-f687452c.js";const w='.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)}}.gov-form-switch{position:relative;display:flex}.gov-form-switch__holder{display:inline-flex}.gov-form-switch__input{position:absolute;top:0;left:0;z-index:1;margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gov-form-switch .gov-form-label__label{position:relative;z-index:1;margin-bottom:0;color:var(--gov-form-switch-color, var(--gov-color-secondary-800))}.gov-form-switch__indicator{position:relative;flex:0 0 auto;border:var(--gov-form-switch-indicator-border, 0.0625rem solid var(--gov-color-secondary-500));background-color:var(--gov-form-switch-indicator-bg, var(--gov-color-secondary-300));transition:150ms linear background-color}.gov-form-switch__indicator::before{content:"";position:absolute;display:block;border-radius:50%;background-color:var(--gov-form-switch-indicator-circle-bg, var(--gov-color-neutral-white));transition:150ms linear left;box-shadow:var(--gov-form-switch-indicator-circle-box-shadow, 0 0.125rem 0.25rem rgba(0, 0, 0, 0.35))}.gov-form-switch__input:focus-visible~.gov-form-switch__indicator{outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base)}.gov-form-switch__input:checked+.gov-form-switch__indicator{border-color:var(--gov-form-switch-indicator-bg-checked, var(--gov-color-primary));background-color:var(--gov-form-switch-indicator-bg-checked, var(--gov-color-primary))}.gov-form-switch[disabled=""],.gov-form-switch[disabled=true i],.gov-form-switch[disabled="1"]{pointer-events:none}.gov-form-switch[disabled=""] .gov-form-label__label,.gov-form-switch[disabled=true i] .gov-form-label__label,.gov-form-switch[disabled="1"] .gov-form-label__label{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600))}.gov-form-switch[disabled=""] .gov-form-switch__indicator::before,.gov-form-switch[disabled=true i] .gov-form-switch__indicator::before,.gov-form-switch[disabled="1"] .gov-form-switch__indicator::before{background:var(--gov-form-input-disabled-bg, var(--gov-color-secondary-300))}.gov-form-switch[disabled=""] .gov-form-switch__input:checked+.gov-form-switch__indicator,.gov-form-switch[disabled=true i] .gov-form-switch__input:checked+.gov-form-switch__indicator,.gov-form-switch[disabled="1"] .gov-form-switch__input:checked+.gov-form-switch__indicator{border-color:var(--gov-form-input-disabled-bg, var(--gov-color-primary-400));background-color:var(--gov-form-input-disabled-bg, var(--gov-color-primary-400))}.gov-form-switch[invalid=""] .gov-form-label__label,.gov-form-switch[invalid=true i] .gov-form-label__label,.gov-form-switch[invalid="1"] .gov-form-label__label{color:var(--gov-form-state-color-error, var(--gov-color-error))}.gov-form-switch[invalid=""] .gov-form-switch__indicator,.gov-form-switch[invalid=true i] .gov-form-switch__indicator,.gov-form-switch[invalid="1"] .gov-form-switch__indicator{border-color:var(--gov-form-state-color-error, var(--gov-color-error))}.gov-form-switch[invalid=""] .gov-form-switch__input:checked+.gov-form-switch__indicator,.gov-form-switch[invalid=true i] .gov-form-switch__input:checked+.gov-form-switch__indicator,.gov-form-switch[invalid="1"] .gov-form-switch__input:checked+.gov-form-switch__indicator{background-color:var(--gov-form-state-color-error, var(--gov-color-error))}.gov-form-switch[size=xs] .gov-form-label__label{font-weight:var(--gov-text-xs-font-weight);font-size:var(--gov-text-xs-font-size);line-height:var(--gov-text-xs-line-height);letter-spacing:var(--gov-text-xs-letter-spacing);margin-bottom:0;margin-left:calc((var(--gov-form-switch-xs-indicator-height, 1.25rem) * 1.6666666667 + var(--gov-form-switch-xs-gap, 0.75rem)) * -1);padding-top:calc((var(--gov-form-switch-xs-indicator-height, 1.25rem) - var(--gov-text-xs-font-size) * 1.5) / 2);padding-left:calc(var(--gov-form-switch-xs-indicator-height, 1.25rem) * 1.6666666667 + var(--gov-form-switch-xs-gap, 0.75rem))}.gov-form-switch[size=xs] .gov-form-switch__holder{gap:var(--gov-form-switch-xs-gap, 0.75rem)}.gov-form-switch[size=xs] .gov-form-switch__indicator{width:calc(var(--gov-form-switch-xs-indicator-height, 1.25rem) * 1.6666666667);height:var(--gov-form-switch-xs-indicator-height, 1.25rem);border-radius:calc(var(--gov-form-switch-xs-indicator-height, 1.25rem) * 0.5)}.gov-form-switch[size=xs] .gov-form-switch__indicator::before{top:calc(var(--gov-form-switch-xs-toggle-offset, 0.051875rem) - 0.0625rem);left:calc(var(--gov-form-switch-xs-toggle-offset, 0.051875rem) - 0.0625rem);width:calc(var(--gov-form-switch-xs-indicator-height, 1.25rem) - 2 * var(--gov-form-switch-xs-toggle-offset, 0.051875rem));height:calc(var(--gov-form-switch-xs-indicator-height, 1.25rem) - 2 * var(--gov-form-switch-xs-toggle-offset, 0.051875rem))}.gov-form-switch[size=xs] .gov-form-switch__input[aria-checked]+.gov-form-switch__indicator::before{left:calc(var(--gov-form-switch-xs-indicator-height, 1.25rem) * 1.6666666667 - var(--gov-form-switch-xs-indicator-height, 1.25rem) + var(--gov-form-switch-xs-toggle-offset, 0.051875rem) - 0.0625rem)}.gov-form-switch[size=s] .gov-form-label__label{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);margin-bottom:0;margin-left:calc((var(--gov-form-switch-s-indicator-height, 1.375rem) * 1.6666666667 + var(--gov-form-switch-s-gap, 0.75rem)) * -1);padding-top:calc((var(--gov-form-switch-s-indicator-height, 1.375rem) - var(--gov-text-s-font-size) * 1.5) / 2);padding-left:calc(var(--gov-form-switch-s-indicator-height, 1.375rem) * 1.6666666667 + var(--gov-form-switch-s-gap, 0.75rem))}.gov-form-switch[size=s] .gov-form-switch__holder{gap:var(--gov-form-switch-s-gap, 0.75rem)}.gov-form-switch[size=s] .gov-form-switch__indicator{width:calc(var(--gov-form-switch-s-indicator-height, 1.375rem) * 1.6666666667);height:var(--gov-form-switch-s-indicator-height, 1.375rem);border-radius:calc(var(--gov-form-switch-s-indicator-height, 1.375rem) * 0.5)}.gov-form-switch[size=s] .gov-form-switch__indicator::before{top:calc(var(--gov-form-switch-s-toggle-offset, 0.0575rem) - 0.0625rem);left:calc(var(--gov-form-switch-s-toggle-offset, 0.0575rem) - 0.0625rem);width:calc(var(--gov-form-switch-s-indicator-height, 1.375rem) - 2 * var(--gov-form-switch-s-toggle-offset, 0.0575rem));height:calc(var(--gov-form-switch-s-indicator-height, 1.375rem) - 2 * var(--gov-form-switch-s-toggle-offset, 0.0575rem))}.gov-form-switch[size=s] .gov-form-switch__input[aria-checked]+.gov-form-switch__indicator::before{left:calc(var(--gov-form-switch-s-indicator-height, 1.375rem) * 1.6666666667 - var(--gov-form-switch-s-indicator-height, 1.375rem) + var(--gov-form-switch-s-toggle-offset, 0.0575rem) - 0.0625rem)}.gov-form-switch[size=m] .gov-form-label__label{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);margin-bottom:0;margin-left:calc((var(--gov-form-switch-m-indicator-height, 1.5rem) * 1.6666666667 + var(--gov-form-switch-m-gap, 1rem)) * -1);padding-top:calc((var(--gov-form-switch-m-indicator-height, 1.5rem) - var(--gov-text-m-font-size) * 1.5) / 2);padding-left:calc(var(--gov-form-switch-m-indicator-height, 1.5rem) * 1.6666666667 + var(--gov-form-switch-m-gap, 1rem))}.gov-form-switch[size=m] .gov-form-switch__holder{gap:var(--gov-form-switch-m-gap, 1rem)}.gov-form-switch[size=m] .gov-form-switch__indicator{width:calc(var(--gov-form-switch-m-indicator-height, 1.5rem) * 1.6666666667);height:var(--gov-form-switch-m-indicator-height, 1.5rem);border-radius:calc(var(--gov-form-switch-m-indicator-height, 1.5rem) * 0.5)}.gov-form-switch[size=m] .gov-form-switch__indicator::before{top:calc(var(--gov-form-switch-m-toggle-offset, 0.0625rem) - 0.0625rem);left:calc(var(--gov-form-switch-m-toggle-offset, 0.0625rem) - 0.0625rem);width:calc(var(--gov-form-switch-m-indicator-height, 1.5rem) - 2 * var(--gov-form-switch-m-toggle-offset, 0.0625rem));height:calc(var(--gov-form-switch-m-indicator-height, 1.5rem) - 2 * var(--gov-form-switch-m-toggle-offset, 0.0625rem))}.gov-form-switch[size=m] .gov-form-switch__input[aria-checked]+.gov-form-switch__indicator::before{left:calc(var(--gov-form-switch-m-indicator-height, 1.5rem) * 1.6666666667 - var(--gov-form-switch-m-indicator-height, 1.5rem) + var(--gov-form-switch-m-toggle-offset, 0.0625rem) - 0.0625rem)}.gov-form-switch[size=l] .gov-form-label__label{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing);margin-bottom:0;margin-left:calc((var(--gov-form-switch-l-indicator-height, 2rem) * 1.6666666667 + var(--gov-form-switch-l-gap, 1rem)) * -1);padding-top:calc((var(--gov-form-switch-l-indicator-height, 2rem) - var(--gov-text-l-font-size) * 1.5) / 2);padding-left:calc(var(--gov-form-switch-l-indicator-height, 2rem) * 1.6666666667 + var(--gov-form-switch-l-gap, 1rem))}.gov-form-switch[size=l] .gov-form-switch__holder{gap:var(--gov-form-switch-l-gap, 1rem)}.gov-form-switch[size=l] .gov-form-switch__indicator{width:calc(var(--gov-form-switch-l-indicator-height, 2rem) * 1.6666666667);height:var(--gov-form-switch-l-indicator-height, 2rem);border-radius:calc(var(--gov-form-switch-l-indicator-height, 2rem) * 0.5)}.gov-form-switch[size=l] .gov-form-switch__indicator::before{top:calc(var(--gov-form-switch-l-toggle-offset, 0.083125rem) - 0.0625rem);left:calc(var(--gov-form-switch-l-toggle-offset, 0.083125rem) - 0.0625rem);width:calc(var(--gov-form-switch-l-indicator-height, 2rem) - 2 * var(--gov-form-switch-l-toggle-offset, 0.083125rem));height:calc(var(--gov-form-switch-l-indicator-height, 2rem) - 2 * var(--gov-form-switch-l-toggle-offset, 0.083125rem))}.gov-form-switch[size=l] .gov-form-switch__input[aria-checked]+.gov-form-switch__indicator::before{left:calc(var(--gov-form-switch-l-indicator-height, 2rem) * 1.6666666667 - var(--gov-form-switch-l-indicator-height, 2rem) + var(--gov-form-switch-l-toggle-offset, 0.083125rem) - 0.0625rem)}';const p=class{constructor(r){o(this,r);this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govChange=i(this,"gov-change",7);this.value=undefined;this.checked=false;this.required=false;this.disabled=undefined;this.name=undefined;this.size="m";this.identifier=undefined;this.invalid=undefined;this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.isChecked=undefined;this.checkboxId=s("GovCheckbox");this.h=v(this.host);this.f=c(this.h)}updateCheckedState(o){this.isChecked=o;this.govChange.emit({checked:this.isChecked,value:this.value})}validateSize(o){a(g,o,h.root)}componentWillLoad(){this.isChecked=this.checked;this.f.passAttrToControl("type","switch");this.h.passChildAttr(h.root,"identifier",this.identifier||this.checkboxId)}async componentDidRender(){if(n()){await d(500);await this.validateWcag()}}render(){const{isChecked:o}=this;return r(t,{class:h.root,"is-checked":o,size:this.size,invalid:m(this.invalid)},r("div",{class:h.holder},r("input",{class:h.input,id:this.identifier||this.checkboxId,type:"checkbox",value:this.value,name:this.name,checked:this.isChecked,onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,"aria-checked":this.isChecked,"aria-required":m(this.required),"aria-invalid":m(this.invalid),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-disabled":m(this.disabled)}),r("span",{class:h.indicator}),r("slot",{name:"label"})))}onFocusHandler(o){this.govFocus.emit(o)}onBlurHandler(o){this.govBlur.emit(o)}onChangeHandler(o){this.isChecked=o.target.checked;o.stopPropagation();this.govChange.emit({checked:this.isChecked,value:this.value})}async validateWcag(){f(this.wcagDescribedBy,"wcag-described-by",h.root);f(this.wcagLabelledBy,"wcag-labelled-by",h.root);l(this.identifier||this.checkboxId,this.wcagLabelledBy,h.root)}get host(){return e(this)}static get watchers(){return{checked:["updateCheckedState"],size:["validateSize"]}}};p.style=w;export{p as gov_form_switch};
2
- //# sourceMappingURL=p-8965f84a.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"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"],"names":["govFormSwitchCss","GovFormSwitch","[object Object]","hostRef","this","checkboxId","createID","h","govHost","host","f","govForm","newValue","isChecked","govChange","emit","checked","value","validateProp","FormSwitchSizes","FormSwitchClass","root","passAttrToControl","passChildAttr","identifier","canValidateWcagOnRender","delay","validateWcag","Host","class","is-checked","size","invalid","toBoolAttrIfDefined","holder","input","id","type","name","onChange","onChangeHandler","bind","onFocus","onFocusHandler","onBlur","onBlurHandler","required","aria-checked","aria-required","aria-invalid","aria-describedby","wcagDescribedBy","aria-labelledby","wcagLabelledBy","aria-disabled","disabled","indicator","e","govFocus","govBlur","target","stopPropagation","validateWcagRef","validateWcagLabelFor"],"mappings":"meAAA,MAAMA,EAAmB,y+TCkBZC,EAAa,MAMzBC,YAAAC,2JAeqD,oBAKhB,4DAaS,2IAhC7CC,KAAKC,WAAaC,EAAS,eAE3BF,KAAKG,EAAIC,EAAQJ,KAAKK,MACtBL,KAAKM,EAAIC,EAAQP,KAAKG,GA8DvBL,mBAAmBU,GAClBR,KAAKS,UAAYD,EACjBR,KAAKU,UAAUC,KAAK,CACnBC,QAASZ,KAAKS,UACdI,MAAOb,KAAKa,QAKdf,aAAaU,GACZM,EAAaC,EAAiBP,EAAUQ,EAAgBC,MAGzDnB,oBACCE,KAAKS,UAAYT,KAAKY,QAEtBZ,KAAKM,EAAEY,kBAAkB,OAAQ,UACjClB,KAAKG,EAAEgB,cAAcH,EAAgBC,KAAM,aAAcjB,KAAKoB,YAAcpB,KAAKC,YAGlFH,2BACC,GAAIuB,IAA2B,OACxBC,EAAM,WACNtB,KAAKuB,gBAIbzB,SACC,MAAMW,UAAEA,GAAcT,KAEtB,OACCG,EAACqB,EAAI,CAACC,MAAOT,EAAgBC,KAAIS,aAAcjB,EAAWkB,KAAM3B,KAAK2B,KAAMC,QAASC,EAAoB7B,KAAK4B,UAC5GzB,EAAA,MAAA,CAAKsB,MAAOT,EAAgBc,QAC3B3B,EAAA,QAAA,CACCsB,MAAOT,EAAgBe,MACvBC,GAAIhC,KAAKoB,YAAcpB,KAAKC,WAC5BgC,KAAK,WACLpB,MAAOb,KAAKa,MACZqB,KAAMlC,KAAKkC,KACXtB,QAASZ,KAAKS,UACd0B,SAAUnC,KAAKoC,gBAAgBC,KAAKrC,MACpCsC,QAAStC,KAAKuC,eAAeF,KAAKrC,MAClCwC,OAAQxC,KAAKyC,cAAcJ,KAAKrC,MAChC0C,SAAU1C,KAAK0C,SAAQC,eACT3C,KAAKS,UAASmC,gBACbf,EAAoB7B,KAAK0C,UAASG,eACnChB,EAAoB7B,KAAK4B,SAAQkB,mBAC7B9C,KAAK+C,gBAAeC,kBACrBhD,KAAKiD,eAAcC,gBACrBrB,EAAoB7B,KAAKmD,YAEzChD,EAAA,OAAA,CAAMsB,MAAOT,EAAgBoC,YAC7BjD,EAAA,OAAA,CAAM+B,KAAK,YAMPpC,eAAeuD,GACtBrD,KAAKsD,SAAS3C,KAAK0C,GAGZvD,cAAcuD,GACrBrD,KAAKuD,QAAQ5C,KAAK0C,GAGXvD,gBAAgBuD,GACvBrD,KAAKS,UAAa4C,EAAEG,OAA4B5C,QAChDyC,EAAEI,kBACFzD,KAAKU,UAAUC,KAAK,CACnBC,QAASZ,KAAKS,UACdI,MAAOb,KAAKa,QAQdf,qBACC4D,EAAgB1D,KAAK+C,gBAAiB,oBAAqB/B,EAAgBC,MAC3EyC,EAAgB1D,KAAKiD,eAAgB,mBAAoBjC,EAAgBC,MACzE0C,EAAqB3D,KAAKoB,YAAcpB,KAAKC,WAAYD,KAAKiD,eAAgBjC,EAAgBC","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: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tz-index: 1;\n\t\tmargin: 0;\n\t\tappearance: none;\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: relative;\n\t\tflex: 0 0 auto;\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\tmargin-left: calc(($indicator-width + get(\"gap\", $definitions)) * -1);\n\t\t\t\tpadding-top: calc(($indicator-height - (var(--gov-text-#{$size}-font-size) * 1.5)) / 2);\n\t\t\t\tpadding-left: calc($indicator-width + get(\"gap\", $definitions));\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&__indicator {\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}\n\t}\n}\n","import { Component, Host, h, Prop, State, Event, EventEmitter, Element, Watch, Method } from '@stencil/core'\nimport { createID } from '../../../utils/string.utils'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { FormSwitchClass, FormSwitchSizes, FormSwitchSizesType } from './constants'\nimport { 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'\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { govForm } from '../../../helpers/Dom/form'\nimport { GovFormSwitchChangeEvent } from './interfaces'\n\n@Component({\n\ttag: 'gov-form-switch',\n\tstyleUrl: 'gov-form-switch.scss',\n})\nexport class GovFormSwitch {\n\tprivate h: GovHost\n\tprivate f: GovForm\n\n\tprivate readonly checkboxId: string\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 * Switch default state\n\t */\n\t@Prop({ reflect: true }) readonly checked: boolean = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the 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\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<FocusEvent>\n\t/**\n\t * Emitted when the switch loses focus.\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the switch change value.\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovFormSwitchChangeEvent>\n\n\t@State() isChecked: boolean\n\n\t@Watch('checked')\n\tupdateCheckedState(newValue: boolean): void {\n\t\tthis.isChecked = newValue\n\t\tthis.govChange.emit({\n\t\t\tchecked: this.isChecked,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSwitchSizes, newValue, FormSwitchClass.root)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.isChecked = this.checked\n\n\t\tthis.f.passAttrToControl('type', 'switch')\n\t\tthis.h.passChildAttr(FormSwitchClass.root, 'identifier', this.identifier || this.checkboxId)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { isChecked } = this\n\n\t\treturn (\n\t\t\t<Host class={FormSwitchClass.root} is-checked={isChecked} size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t<div class={FormSwitchClass.holder}>\n\t\t\t\t\t<input\n\t\t\t\t\t\tclass={FormSwitchClass.input}\n\t\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tchecked={this.isChecked}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\taria-checked={this.isChecked}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t/>\n\t\t\t\t\t<span class={FormSwitchClass.indicator}></span>\n\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.govFocus.emit(e)\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.govBlur.emit(e)\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.isChecked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tchecked: this.isChecked,\n\t\t\tvalue: this.value,\n\t\t})\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"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../packages/core/src/components/gov-form/file/constants.ts","../../../packages/core/src/utils/file.utils.ts","../../../packages/core/src/components/gov-form/file/gov-form-file.scss?tag=gov-form-file","../../../packages/core/src/components/gov-form/file/gov-form-file.tsx"],"names":["FormFileClass","root","area","label","input","list","item","attachments","formatBytes","bytes","units","l","n","parseInt","toFixed","fileAcceptValidation","file","accept","length","replace","split","filter","RegExp","test","type","fileSizeValidation","maxSize","fileSize","Math","round","size","govFormFileCss","GovFormFile","[object Object]","hostRef","this","fileId","createID","h","govHost","host","f","govForm","highlight","areaRef","classList","add","unhighlight","remove","inputRef","addEventListener","e","preventDefault","stopPropagation","files","target","validateFiles","expanded","events","inEvents","outEvents","map","eventName","preventDefaults","bind","forEach","handleDrop","dataTransfer","Array","from","isFile","find","name","isSizeValid","maxFileSize","isAcceptValid","newFile","id","acceptValid","sizeValid","govAddFile","emit","govFiles","passAttrToControl","canValidateWcagOnRender","delay","validateWcag","registerListeners","Host","class","classes","invalid","toBoolAttrIfDefined","ref","el","identifier","onFocus","onFocusHandler","onBlur","onBlurHandler","required","disabled","aria-required","aria-invalid","aria-describedby","wcagDescribedBy","aria-labelledby","wcagLabelledBy","aria-disabled","hasSlot","displayAttachments","wcagAttachmentsLabel","wcag-label","wcag-remove-labelled-by","on-gov-remove","onRemoveFileHandler","wcagRemoveLabel","slot","variant","errorAccept","errorSize","index","findIndex","removeFile","splice","govRemovFile","govFocus","govBlur","validateWcagRef","validateWcagLabelFor"],"mappings":"sbAAO,MAAMA,EAAgB,CAC5BC,KAAM,gBACNC,KAAM,sBACNC,MAAO,uBACPC,MAAO,uBACPC,KAAM,sBACNC,KAAM,sBACNC,YAAa,uCCPEC,EAAYC,GAC3B,MAAMC,EAAQ,CAAC,QAAS,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,OACzE,IAAIC,EAAI,EACPC,EAAIC,SAASJ,EAAO,KAAO,EAE5B,MAAOG,GAAK,QAAUD,EAAG,CACxBC,EAAIA,EAAI,KAGT,OAAOA,EAAEE,QAAQF,EAAI,IAAMD,EAAI,EAAI,EAAI,GAAK,IAAMD,EAAMC,YAGzCI,EAAqBC,EAAYC,GAChD,UAAWA,IAAW,UAAYA,EAAOC,OAAQ,CAChD,OACCD,EACEE,QAAQ,MAAO,IACfC,MAAM,KACNC,QAAOJ,GACA,IAAIK,OAAOL,EAAOE,QAAQ,IAAK,OAAOI,KAAKP,EAAKQ,QACrDN,OAAS,MAER,CACN,OAAO,eAIOO,EAAmBT,EAAYU,GAC9C,MAAMC,EAAWC,KAAKC,MAAMb,EAAKc,KAAO,MACxC,OAAOH,GAAYD,EC7BpB,MAAMK,EAAiB,80GCkBVC,EAAW,MAQvBC,YAAAC,4NAWqC,oBAKA,sDAS8C,iEAab,kEAYN,qEAII,wDAIU,4FAYD,uDAIU,qBAsBnD,GA/FnCC,KAAKC,OAASC,EAAS,gBAEvBF,KAAKG,EAAIC,EAAQJ,KAAKK,MACtBL,KAAKM,EAAIC,EAAQP,KAAKG,GA8FfL,oBACP,SAASU,IACRR,KAAKS,QAAQC,UAAUC,IAAI,aAE5B,SAASC,IACRZ,KAAKS,QAAQC,UAAUG,OAAO,aAG/Bb,KAAKc,SAASC,iBACb,UACAC,IACCA,EAAEC,iBACFD,EAAEE,kBACF,MAAMC,EAASH,EAAEI,OAA4BD,MAC7CnB,KAAKqB,cAAcF,KAEpB,OAID,GAAInB,KAAKsB,SAAU,CAClB,MAAMC,EAAS,CAAC,WAAY,aAC5B,MAAMC,EAAW,CAAC,YAAa,WAAY,cAC3C,MAAMC,EAAY,CAAC,YAAa,OAAQ,cAExCF,EAAOG,KAAIC,GAAa3B,KAAKc,SAASC,iBAAiBY,EAAW3B,KAAK4B,gBAAgBC,KAAK7B,MAAO,SACnGwB,EAASE,KAAIC,GAAa3B,KAAKc,SAASC,iBAAiBY,EAAWnB,EAAUqB,KAAK7B,MAAO,SAC1FyB,EAAUK,SAAQH,GAAa3B,KAAKc,SAASC,iBAAiBY,EAAWf,EAAYiB,KAAK7B,MAAO,SAEjGA,KAAKS,QAAQM,iBAAiB,OAAQf,KAAK+B,WAAWF,KAAK7B,MAAO,QAIpEF,gBAAgBkB,GACfA,EAAEC,iBACFD,EAAEE,kBAGHpB,WAAWkB,GACV,MAAMgB,EAAehB,EAAEgB,aACvBhC,KAAKqB,cAAcW,EAAab,OAGzBrB,cAAcqB,GACrBc,MAAMC,KAAKf,GAAOO,KAAI7C,IACrB,MAAMsD,EAASnC,KAAKmB,MAAMiB,MAAKjE,GAAQA,EAAKU,KAAKwD,OAASxD,EAAKwD,MAAQlE,EAAKU,KAAKc,OAASd,EAAKc,QAAS,KACxG,GAAIwC,IAAW,KAAM,CACpB,MAAMG,SAAqBtC,KAAKuC,cAAgB,UAAYvC,KAAKuC,YAAc,EAAIjD,EAAmBT,EAAMmB,KAAKuC,aAAe,KAChI,MAAMC,EAAgB5D,EAAqBC,EAAMmB,KAAKlB,QACtD,MAAM2D,EAAU,CACfC,GAAIxC,EAAS,eACbrB,KAAAA,EACA8D,YAAaH,EACbI,UAAWN,GAEZtC,KAAKmB,MAAQ,IAAInB,KAAKmB,MAAOsB,GAC7BzC,KAAK6C,WAAWC,KAAKL,OAIvBzC,KAAK+C,SAASD,KAAK9C,KAAKmB,OAGzBrB,oBACCE,KAAKM,EAAE0C,kBAAkB,OAAQ,QAGlClD,2BACC,GAAImD,IAA2B,OACxBC,EAAM,WACNlD,KAAKmD,eAGZnD,KAAKoD,oBAGNtD,SACC,OACCK,EAACkD,EAAI,CAACC,MAAOtD,KAAKG,EAAEoD,QAAQ,CAAC1F,EAAcC,OAAQ0F,QAASC,EAAoBzD,KAAKwD,SAAUlC,SAAUmC,EAAoBzD,KAAKsB,WACjInB,EAAA,MAAA,CAAKmD,MAAOzF,EAAcE,KAAM2F,IAAKC,GAAO3D,KAAKS,QAAUkD,GAC1DxD,EAAA,OAAA,MACAA,EAAA,QAAA,CACCmD,MAAOzF,EAAcI,MACrByF,IAAKC,GAAO3D,KAAKc,SAAW6C,EAC5BjB,GAAI1C,KAAK4D,YAAc5D,KAAKC,OAC5BZ,KAAK,OACLgD,KAAMrC,KAAKqC,KACXvD,OAAQkB,KAAKlB,OACb+E,QAAS7D,KAAK8D,eAAejC,KAAK7B,MAClC+D,OAAQ/D,KAAKgE,cAAcnC,KAAK7B,MAChCiE,SAAUjE,KAAKiE,SACfC,SAAUlE,KAAKkE,SAAQC,gBACRV,EAAoBzD,KAAKiE,UAASG,eACnCX,EAAoBzD,KAAKwD,SAAQa,mBAC7BrE,KAAKsE,gBAAeC,kBACrBvE,KAAKwE,eAAcC,gBACrBhB,EAAoBzD,KAAKkE,aAIzClE,KAAKG,EAAEuE,QAAQ,eACfvE,EAAA,MAAA,CAAKmD,MAAOzF,EAAcO,aACzB+B,EAAA,OAAA,CAAMkC,KAAM,iBAEV,KAEHrC,KAAKmB,MAAMpC,QAAUiB,KAAK2E,mBAC1BxE,EAAA,MAAA,CAAKmD,MAAOzF,EAAcO,aACzB+B,EAAA,kBAAA,CAAiBnC,MAAOgC,KAAK4E,qBAAoBC,aAAc7E,KAAK4E,sBAClE5E,KAAKmB,MAAMO,KAAIvD,GACfgC,EAAA,uBAAA,CAAA2E,0BAA+C3G,EAAKuE,GAAEqC,gBAAiB,IAAM/E,KAAKgF,oBAAoB7G,IACrGgC,EAAA,OAAA,CAAMmD,MAAO,UAAWZ,GAAIvE,EAAKuE,IAC/B1C,KAAKiF,gBAAgBjG,QAAQ,cAAeb,EAAKU,KAAKwD,OAEvDlE,EAAKU,KAAKwD,KACVlE,EAAKwE,cAAgB,MACrBxC,EAAA,mBAAA,CAAkB+E,KAAK,UAAUC,QAAQ,SACxChF,EAAA,WAAA,CAAU+E,KAAK,OAAO7C,KAAK,YAC1BlE,EAAKwE,cAAgB,MAAQ3C,KAAKoF,YAAc,MAE/C,KACHjH,EAAKyE,YAAc,MACnBzC,EAAA,mBAAA,CAAkB+E,KAAK,UAAUC,QAAQ,SACxChF,EAAA,WAAA,CAAU+E,KAAK,OAAO7C,KAAK,YAC1BrC,KAAKqF,UAAUrG,QAAQ,cAAeX,EAAY2B,KAAKuC,YAAc,QAEpE,KACJpC,EAAA,OAAA,CAAM+E,KAAK,QAAM,IAAG7G,EAAYF,EAAKU,KAAKc,MAAK,UAKhD,MAKCG,oBAAoBjB,GAC3B,MAAMyG,EAAQtF,KAAKmB,MAAMoE,WAAUpH,GAAQA,EAAKuE,KAAO7D,EAAK6D,KAC5D,GAAI4C,KAAW,EAAG,CACjB,MAAMnE,EAAQnB,KAAKmB,MACnB,MAAMqE,EAAaxF,KAAKmB,MAAMmE,GAC9BnE,EAAMsE,OAAOH,EAAO,GACpBtF,KAAKmB,MAAQ,IAAIA,GACjBnB,KAAK0F,aAAa5C,KAAK0C,GACvBxF,KAAK+C,SAASD,KAAK9C,KAAKmB,QAIlBrB,eAAekB,GACtBA,EAAEC,iBACFjB,KAAK2F,SAAS7C,KAAK9B,GAGZlB,cAAckB,GACrBA,EAAEC,iBACFjB,KAAK4F,QAAQ9C,KAAK9B,GAOnBlB,qBACC+F,EAAgB7F,KAAKsE,gBAAiB,oBAAqBzG,EAAcC,MACzE+H,EAAgB7F,KAAKwE,eAAgB,mBAAoB3G,EAAcC,MACvEgI,EAAqB9F,KAAK4D,YAAc5D,KAAKC,OAAQD,KAAKwE,eAAgB3G,EAAcC","sourcesContent":["export const FormFileClass = {\n\troot: 'gov-form-file',\n\tarea: 'gov-form-file__area',\n\tlabel: 'gov-form-file__label',\n\tinput: 'gov-form-file__input',\n\tlist: 'gov-form-file__list',\n\titem: 'gov-form-file__item',\n\tattachments: 'gov-form-file__attachments',\n}\n","export function formatBytes(bytes: any): string {\n\tconst units = ['bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']\n\tlet l = 0,\n\t\tn = parseInt(bytes, 10) || 0\n\n\twhile (n >= 1024 && ++l) {\n\t\tn = n / 1024\n\t}\n\n\treturn n.toFixed(n < 10 && l > 0 ? 1 : 0) + ' ' + units[l]\n}\n\nexport function fileAcceptValidation(file: File, accept: string): boolean {\n\tif (typeof accept === 'string' && accept.length) {\n\t\treturn (\n\t\t\taccept\n\t\t\t\t.replace(/\\s/g, '')\n\t\t\t\t.split(',')\n\t\t\t\t.filter(accept => {\n\t\t\t\t\treturn new RegExp(accept.replace('*', '.*')).test(file.type)\n\t\t\t\t}).length > 0\n\t\t)\n\t} else {\n\t\treturn true\n\t}\n}\n\nexport function fileSizeValidation(file: File, maxSize: number): boolean {\n\tconst fileSize = Math.round(file.size / 1024)\n\treturn fileSize <= maxSize\n}\n","/*\n * File\n */\n\n$class: \".gov-form-file\";\n\n#{$class} {\n\t@include base();\n\t&__label .gov-form-label__label {\n\t\t@include reset-last-margin();\n\t}\n\t&__input {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\topacity: 0.0001;\n\t\tcursor: pointer;\n\t}\n\t&__attachments {\n\t\tmargin-top: rem-calc(16 0 0);\n\t}\n\t&__item {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\talign-items: center;\n\t}\n\n\t// STATES\n\t@include parameter(\"disabled\") {\n\t\t#{$class} {\n\t\t\t&__label .gov-form-label__label {\n\t\t\t\tpointer-events: none;\n\t\t\t\t* {\n\t\t\t\t\tcolor: $form-file-disabled-color;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@include parameter(\"expanded\") {\n\t\t#{$class} {\n\t\t\t&__area {\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\tpadding: rem-calc(32) rem-calc(22) rem-calc(22);\n\t\t\t\tborder: $form-file-border;\n\t\t\t\ttext-align: center;\n\t\t\t\ttransition: background-color $t ease-in-out;\n\t\t\t\twill-change: background-color;\n\t\t\t\t&.highlight {\n\t\t\t\t\tbackground-color: color(\"primary.200\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&__label .gov-form-label__label {\n\t\t\t\twidth: 100%;\n\t\t\t\tpadding: rem-calc(22);\n\t\t\t\tborder: $form-file-border;\n\t\t\t\ttext-align: center;\n\t\t\t}\n\t\t\t&__attachments {\n\t\t\t\tmargin: rem-calc(24 0 0);\n\t\t\t}\n\t\t}\n\n\t\t// STATES\n\t\t@include parameter(\"invalid\") {\n\t\t\t#{$class} {\n\t\t\t\t&__label .gov-form-label__label {\n\t\t\t\t\tborder-color: $form-state-color-error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t@include parameter(\"expanded\") {\n\t\t\t#{$class} {\n\t\t\t\t&__label .gov-form-label__label {\n\t\t\t\t\tpadding: rem-calc(32);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Host, h, Prop, Event, EventEmitter, Element, Method, State } from '@stencil/core'\nimport { createID } from '../../../utils/string.utils'\nimport { FormFileClass } from './constants'\nimport { toBoolAttrIfDefined } from '../../../helpers/Dom/template'\nimport { validateWcagLabelFor, validateWcagRef } from '../../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../../helpers/Dom/win'\nimport { fileAcceptValidation, fileSizeValidation, formatBytes } from '../../../utils/file.utils'\nimport { delay } from '../../../utils/utils'\nimport { GovForm } from '../../../helpers/Dom/form.types'\nimport { govHost } from '../../../helpers/Dom/template'\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { govForm } from '../../../helpers/Dom/form'\nimport { GovFormFileItem } from './gov-form-file.types'\n\n@Component({\n\ttag: 'gov-form-file',\n\tstyleUrl: 'gov-form-file.scss',\n})\nexport class GovFormFile {\n\tprivate f: GovForm\n\tprivate h: GovHost\n\n\tprivate areaRef?: HTMLDivElement\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly fileId: string\n\n\tconstructor() {\n\t\tthis.fileId = createID('GovInputFile')\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormFileElement\n\t/**\n\t * Expands the file input to fill 100% of the container width.\n\t */\n\t@Prop() readonly expanded: boolean = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the File component disabled.\n\t * This prevents users from being able to interact with the File, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean\n\t/**\n\t * Show list of attachments\n\t */\n\t@Prop({ attribute: 'display-attachments' }) readonly displayAttachments: boolean = true\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept\n\t */\n\t@Prop() readonly accept: string\n\t/**\n\t * Maximum embedded file size\n\t */\n\t@Prop({ attribute: 'max-file-size' }) readonly maxFileSize: number = -1\n\t/**\n\t * Custom File identifier.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Error message when the maximum file size is exceeded\n\t */\n\t@Prop({ attribute: 'error-size' }) readonly errorSize: string = 'Soubor je větší než povolená velikost {FILE_SIZE}'\n\t/**\n\t * Insert unsupported file error message\n\t */\n\t@Prop({ attribute: 'error-accept' }) readonly errorAccept: string = 'Soubor tohoto typu není povolen'\n\t/**\n\t * Description of the list of attachments\n\t */\n\t@Prop({ attribute: 'attachments-label' }) readonly attachmentsLabel: string = 'Přílohy'\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: 'wcag-described-by' }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Adds accessible label for the remove button that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-remove-label' }) readonly wcagRemoveLabel: string = 'Odebrat soubor {FILE_NAME}'\n\t/**\n\t * Adds accessible label for the list of attachments.\n\t */\n\t@Prop({ attribute: 'wcag-attachments-label' }) readonly wcagAttachmentsLabel: string = 'Přílohy'\n\t/**\n\t * Emitted when the File has focus.\n\t */\n\t@Event({ eventName: 'gov-focus' }) govFocus: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the File loses focus.\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FocusEvent>\n\t/**\n\t * Called when the list of inserted files is changed\n\t */\n\t@Event({ eventName: 'gov-files' }) govFiles: EventEmitter<GovFormFileItem[]>\n\t/**\n\t * Called when a new file is added\n\t */\n\t@Event({ eventName: 'gov-add-file' }) govAddFile: EventEmitter<GovFormFileItem>\n\t/**\n\t * Called when a file is removed from the list\n\t */\n\t@Event({ eventName: 'gov-remove-file' }) govRemovFile: EventEmitter<GovFormFileItem>\n\n\t@State() files: GovFormFileItem[] = []\n\n\tprivate registerListeners() {\n\t\tfunction highlight() {\n\t\t\tthis.areaRef.classList.add('highlight')\n\t\t}\n\t\tfunction unhighlight() {\n\t\t\tthis.areaRef.classList.remove('highlight')\n\t\t}\n\n\t\tthis.inputRef.addEventListener(\n\t\t\t'change',\n\t\t\te => {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopPropagation()\n\t\t\t\tconst files = (e.target as HTMLInputElement).files\n\t\t\t\tthis.validateFiles(files)\n\t\t\t},\n\t\t\tfalse\n\t\t)\n\t\t//this.inputRef.addEventListener('focus')\n\n\t\tif (this.expanded) {\n\t\t\tconst events = ['dragover', 'dragleave']\n\t\t\tconst inEvents = ['dragenter', 'dragover', 'mouseenter']\n\t\t\tconst outEvents = ['dragleave', 'drop', 'mouseleave']\n\n\t\t\tevents.map(eventName => this.inputRef.addEventListener(eventName, this.preventDefaults.bind(this), false))\n\t\t\tinEvents.map(eventName => this.inputRef.addEventListener(eventName, highlight.bind(this), false))\n\t\t\toutEvents.forEach(eventName => this.inputRef.addEventListener(eventName, unhighlight.bind(this), false))\n\n\t\t\tthis.areaRef.addEventListener('drop', this.handleDrop.bind(this), false)\n\t\t}\n\t}\n\n\tpreventDefaults(e) {\n\t\te.preventDefault()\n\t\te.stopPropagation()\n\t}\n\n\thandleDrop(e: DragEvent) {\n\t\tconst dataTransfer = e.dataTransfer\n\t\tthis.validateFiles(dataTransfer.files)\n\t}\n\n\tprivate validateFiles(files: FileList) {\n\t\tArray.from(files).map(file => {\n\t\t\tconst isFile = this.files.find(item => item.file.name === file.name && item.file.size === file.size) || null\n\t\t\tif (isFile === null) {\n\t\t\t\tconst isSizeValid = typeof this.maxFileSize === 'number' && this.maxFileSize > 0 ? fileSizeValidation(file, this.maxFileSize) : true\n\t\t\t\tconst isAcceptValid = fileAcceptValidation(file, this.accept)\n\t\t\t\tconst newFile = {\n\t\t\t\t\tid: createID('GovFormFile'),\n\t\t\t\t\tfile,\n\t\t\t\t\tacceptValid: isAcceptValid,\n\t\t\t\t\tsizeValid: isSizeValid,\n\t\t\t\t}\n\t\t\t\tthis.files = [...this.files, newFile]\n\t\t\t\tthis.govAddFile.emit(newFile)\n\t\t\t}\n\t\t})\n\n\t\tthis.govFiles.emit(this.files)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.f.passAttrToControl('type', 'File')\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\n\t\tthis.registerListeners()\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes([FormFileClass.root])} invalid={toBoolAttrIfDefined(this.invalid)} expanded={toBoolAttrIfDefined(this.expanded)}>\n\t\t\t\t<div class={FormFileClass.area} ref={el => (this.areaRef = el as HTMLDivElement)}>\n\t\t\t\t\t<slot />\n\t\t\t\t\t<input\n\t\t\t\t\t\tclass={FormFileClass.input}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tid={this.identifier || this.fileId}\n\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\taccept={this.accept}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot('attachments') ? (\n\t\t\t\t\t<div class={FormFileClass.attachments}>\n\t\t\t\t\t\t<slot name={'attachments'} />\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\n\t\t\t\t{this.files.length && this.displayAttachments ? (\n\t\t\t\t\t<div class={FormFileClass.attachments}>\n\t\t\t\t\t\t<gov-attachments label={this.wcagAttachmentsLabel} wcag-label={this.wcagAttachmentsLabel}>\n\t\t\t\t\t\t\t{this.files.map(item => (\n\t\t\t\t\t\t\t\t<gov-attachments-item wcag-remove-labelled-by={item.id} on-gov-remove={() => this.onRemoveFileHandler(item)}>\n\t\t\t\t\t\t\t\t\t<span class={'sr-only'} id={item.id}>\n\t\t\t\t\t\t\t\t\t\t{this.wcagRemoveLabel.replace('{FILE_NAME}', item.file.name)}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{item.file.name}\n\t\t\t\t\t\t\t\t\t{item.acceptValid === false ? (\n\t\t\t\t\t\t\t\t\t\t<gov-form-message slot=\"message\" variant=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon\" name=\"warning\"></gov-icon>\n\t\t\t\t\t\t\t\t\t\t\t{item.acceptValid === false ? this.errorAccept : null}\n\t\t\t\t\t\t\t\t\t\t</gov-form-message>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t{item.sizeValid === false ? (\n\t\t\t\t\t\t\t\t\t\t<gov-form-message slot=\"message\" variant=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon\" name=\"warning\"></gov-icon>\n\t\t\t\t\t\t\t\t\t\t\t{this.errorSize.replace('{FILE_SIZE}', formatBytes(this.maxFileSize * 1024))}\n\t\t\t\t\t\t\t\t\t\t</gov-form-message>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t<span slot=\"info\">({formatBytes(item.file.size)})</span>\n\t\t\t\t\t\t\t\t</gov-attachments-item>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</gov-attachments>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onRemoveFileHandler(file: GovFormFileItem) {\n\t\tconst index = this.files.findIndex(item => item.id === file.id)\n\t\tif (index !== -1) {\n\t\t\tconst files = this.files\n\t\t\tconst removeFile = this.files[index]\n\t\t\tfiles.splice(index, 1)\n\t\t\tthis.files = [...files]\n\t\t\tthis.govRemovFile.emit(removeFile)\n\t\t\tthis.govFiles.emit(this.files)\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.preventDefault()\n\t\tthis.govFocus.emit(e)\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.preventDefault()\n\t\tthis.govBlur.emit(e)\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, 'wcag-described-by', FormFileClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, 'wcag-labelled-by', FormFileClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.fileId, this.wcagLabelledBy, FormFileClass.root)\n\t}\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../packages/core/src/components/gov-spacer/constants.tsx","../../../packages/core/src/components/gov-spacer/gov-spacer.scss?tag=gov-spacer","../../../packages/core/src/components/gov-spacer/gov-spacer.tsx"],"names":["SpacerSize","pick","Sizes","SpacerBreakpoints","SpacerClass","root","govSpacerCss","GovSpacer","[object Object]","hostRef","this","h","govHost","host","newValue","validateProp","validateSize","size","validateBreakpoint","breakpoint","Host","class","classes"],"mappings":"iOAIO,MAAMA,EAAaC,EAAKC,EAAO,CAAC,OAAQ,MAAO,KAAM,KAAM,KAAM,MAAO,OAAQ,OAAQ,SAG/F,IAAYC,GAAZ,SAAYA,GACXA,EAAA,QAAA,OACAA,EAAA,MAAA,KACAA,EAAA,MAAA,KACAA,EAAA,MAAA,KACAA,EAAA,MAAA,MALD,CAAYA,IAAAA,EAAiB,KAStB,MAAMC,EAAc,CAC1BC,KAAM,cCjBP,MAAMC,EAAe,8iCCURC,EAAS,MAErBC,YAAAC,2DACCC,KAAKC,EAAIC,EAAQF,KAAKG,MAavBL,aAAaM,GACZC,EAAaf,EAAYc,EAAUV,EAAYC,MAIhDG,mBAAmBM,GAClBC,EAAaZ,EAAmBW,EAAUV,EAAYC,MAGvDG,oBACCE,KAAKM,aAAaN,KAAKO,MACvBP,KAAKQ,mBAAmBR,KAAKS,YAG9BX,SACC,OAAOG,EAACS,EAAI,CAACC,MAAOX,KAAKC,EAAEW,QAAQlB,EAAYC,MAAOY,KAAMP,KAAKO,KAAME,WAAYT,KAAKS","sourcesContent":["import { Sizes } from '../../core/constants/sizes'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const SpacerSize = pick(Sizes, ['_2XS', '_XS', '_S', '_M', '_L', '_XL', '_2XL', '_3XL', '_5XL'])\nexport type SpacerSizeType = `${ValueOf<typeof SpacerSize>}`\n\nexport enum SpacerBreakpoints {\n\tNONE = 'none',\n\tSM = 'sm',\n\tMD = 'md',\n\tLG = 'lg',\n\tXL = 'xl',\n}\nexport type SpacerBreakpointsType = `${ValueOf<typeof SpacerBreakpoints>}`\n\nexport const SpacerClass = {\n\troot: 'gov-spacer',\n}\n","/*\n * Spacer\n */\n\n$class: \".gov-spacer\";\n\n#{$class} {\n\t@include base();\n\n\t// VARIANTS\n\t@each $name, $value in $sizes {\n\t\t&[size=\"#{$name}\"] {\n\t\t\theight: #{$value};\n\t\t}\n\t}\n\t@each $name, $value in $mq-breakpoints {\n\t\t&[breakpoint=\"#{$name}\"] {\n\t\t\tdisplay: none;\n\n\t\t\t@if #{$value} != \"0\" {\n\t\t\t\t@include mq($from: #{$name}) {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { SpacerBreakpoints, SpacerBreakpointsType, SpacerClass, SpacerSize, SpacerSizeType } from './constants'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govHost } from '../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-spacer',\n\tstyleUrl: 'gov-spacer.scss',\n})\nexport class GovSpacer {\n\tprivate h: GovHost\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\t@Element() host: HTMLGovSpacerElement\n\t/**\n\t * Spacer’s size\n\t */\n\t@Prop() readonly size?: SpacerSizeType\n\t/**\n\t * Breakpoint\n\t */\n\t@Prop() readonly breakpoint?: SpacerBreakpointsType\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(SpacerSize, newValue, SpacerClass.root)\n\t}\n\n\t@Watch('breakpoint')\n\tvalidateBreakpoint(newValue: string): void {\n\t\tvalidateProp(SpacerBreakpoints, newValue, SpacerClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateBreakpoint(this.breakpoint)\n\t}\n\n\trender() {\n\t\treturn <Host class={this.h.classes(SpacerClass.root)} size={this.size} breakpoint={this.breakpoint}></Host>\n\t}\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../packages/core/src/components/gov-statsbar/gov-statsbar.scss?tag=gov-statsbar","../../../packages/core/src/components/gov-statsbar/gov-statsbar.tsx"],"names":["govStatsbarCss","GovStatsbar","[object Object]","hostRef","this","h","govHost","host","newValue","validateProp","StatsBarIconPosition","StatsBarClass","root","StatsBarVariant","validateIconPosition","iconPosition","validateVariant","variant","querySelectorAll","StatsBarItemClass","forEach","node","setAttribute","Host","class","classes","section"],"mappings":"kQAAA,MAAMA,EAAiB,muDCUVC,EAAW,MAGvBC,YAAAC,sDAayE,UAZxEC,KAAKC,EAAIC,EAAQF,KAAKG,MAevBL,qBAAqBM,GACpBC,EAAaC,EAAsBF,EAAUG,EAAcC,MAI5DV,gBAAgBM,GACfC,EAAaI,EAAiBL,EAAUG,EAAcC,MAGvDV,oBACCE,KAAKU,qBAAqBV,KAAKW,cAC/BX,KAAKY,gBAAgBZ,KAAKa,SAG3Bf,mBACCE,KAAKG,KAAKW,iBAAiBC,EAAkBP,MAAMQ,SAASC,IAC3D,GAAIjB,KAAKW,eAAiB,OAAQ,CACjCM,EAAKC,aAAa,gBAAiB,YAKtCpB,SACC,OACCG,EAACkB,EAAI,CAACC,MAAOpB,KAAKC,EAAEoB,QAAQd,EAAcC,MAAOK,QAASb,KAAKa,SAC9DZ,EAAA,UAAA,CAASmB,MAAOb,EAAce,SAC7BrB,EAAA,OAAA","sourcesContent":["/*\n * Statsbar\n */\n\n$class: \".gov-statsbar\";\n\n#{$class} {\n\t@include base();\n\tpadding: rem-calc(20) 0;\n\t&__section {\n\t\t@include container();\n\t}\n\n\t// VARIANTS\n\t@each $variant, $definitions in $statsbar-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\tbackground-color: #{get(\"bg-color\", $definitions)};\n\t\t\tcolor: #{get(\"text-color\", $definitions)};\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\tbackground: color(\"neutral.white\");\n\t\t\t\tcolor: #{get(\"text-color-inverse\", $definitions)};\n\t\t\t}\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&__section {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tjustify-content: center;\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\tpadding: 0;\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { StatsBarClass, StatsBarVariant, StatsBarVariantType, StatsBarItemClass, StatsBarIconPosition, StatsBarIconPositionType } from './constants'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govHost } from '../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-statsbar',\n\tstyleUrl: 'gov-statsbar.scss',\n})\nexport class GovStatsbar {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovStatsbarElement\n\n\t/**\n\t * Icon’s position\n\t */\n\t@Prop() readonly iconPosition?: StatsBarIconPositionType\n\t/**\n\t * Style variation\n\t */\n\t@Prop({ attribute: 'variant' }) readonly variant?: StatsBarVariantType = 'primary'\n\n\t@Watch('iconPosition')\n\tvalidateIconPosition(newValue: string): void {\n\t\tvalidateProp(StatsBarIconPosition, newValue, StatsBarClass.root)\n\t}\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(StatsBarVariant, newValue, StatsBarClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateIconPosition(this.iconPosition)\n\t\tthis.validateVariant(this.variant)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.host.querySelectorAll(StatsBarItemClass.root).forEach((node: any) => {\n\t\t\tif (this.iconPosition === 'left') {\n\t\t\t\tnode.setAttribute('icon-position', 'left')\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(StatsBarClass.root)} variant={this.variant}>\n\t\t\t\t<section class={StatsBarClass.section}>\n\t\t\t\t\t<slot />\n\t\t\t\t</section>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
@@ -1,2 +0,0 @@
1
- import{r as o,c as e,h as r,H as c,g as i}from"./p-682c7cc6.js";import{c as a}from"./p-24636c53.js";import{v as t}from"./p-26acf964.js";import{g as s,F as h,a as v}from"./p-76542f4f.js";import{g as m,a as n,t as g}from"./p-3f37ddb6.js";import{a as f,b as l}from"./p-364b4792.js";import{c as b}from"./p-c20102ff.js";import{d}from"./p-03990da5.js";import{F as k}from"./p-27977727.js";import"./p-561fa17b.js";import"./p-55500e5a.js";import"./p-ff7365ae.js";import"./p-ef79904e.js";import"./p-6278531b.js";import"./p-f687452c.js";const x='.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)}}.gov-form-checkbox{cursor:pointer}.gov-form-checkbox input{position:absolute;top:0;left:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gov-form-checkbox input+span{position:relative;display:block}.gov-form-checkbox input+span::before{content:"";position:absolute;display:block;top:0;left:0;border:var(--gov-form-checkbox-border-size, 0.125rem solid var(--gov-color-primary));transition:150ms linear border-color, 150ms linear background-color, 150ms linear outline-color}.gov-form-checkbox .gov-form-label__label{position:relative;z-index:1;width:100%}.gov-form-checkbox input:focus-visible+span::before{outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base)}[invalid=""].gov-form-checkbox .gov-form-label__label,[invalid=true i].gov-form-checkbox .gov-form-label__label,[invalid="1"].gov-form-checkbox .gov-form-label__label{color:var(--gov-form-state-color-error, var(--gov-color-error))}[invalid=""].gov-form-checkbox input+span::before,[invalid=true i].gov-form-checkbox input+span::before,[invalid="1"].gov-form-checkbox input+span::before{border-color:var(--gov-form-state-color-error, var(--gov-color-error))}[disabled=""].gov-form-checkbox,[disabled=true i].gov-form-checkbox,[disabled="1"].gov-form-checkbox{pointer-events:none}[disabled=""].gov-form-checkbox .gov-form-label__label,[disabled=true i].gov-form-checkbox .gov-form-label__label,[disabled="1"].gov-form-checkbox .gov-form-label__label{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600))}[disabled=""].gov-form-checkbox input+span::before,[disabled=true i].gov-form-checkbox input+span::before,[disabled="1"].gov-form-checkbox input+span::before{border-color:var(--gov-form-input-disabled-bg, var(--gov-color-primary-400))}[size=xs].gov-form-checkbox{font-weight:var(--gov-text-xs-font-weight);font-size:var(--gov-text-xs-font-size);line-height:var(--gov-text-xs-line-height);letter-spacing:var(--gov-text-xs-letter-spacing);min-width:var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem);min-height:var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem)}[size=xs].gov-form-checkbox .gov-form-label__label{padding-top:calc((var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem) - var(--gov-text-xs-font-size) * 1.5) / 2);padding-left:calc(var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem) + var(--gov-form-checkbox-core-xs-gap, 0.75rem))}[size=xs].gov-form-checkbox input+span::before{width:var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem);height:var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem)}[size=s].gov-form-checkbox{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);min-width:var(--gov-form-checkbox-core-s-indicator-size, 1.375rem);min-height:var(--gov-form-checkbox-core-s-indicator-size, 1.375rem)}[size=s].gov-form-checkbox .gov-form-label__label{padding-top:calc((var(--gov-form-checkbox-core-s-indicator-size, 1.375rem) - var(--gov-text-s-font-size) * 1.5) / 2);padding-left:calc(var(--gov-form-checkbox-core-s-indicator-size, 1.375rem) + var(--gov-form-checkbox-core-s-gap, 0.75rem))}[size=s].gov-form-checkbox input+span::before{width:var(--gov-form-checkbox-core-s-indicator-size, 1.375rem);height:var(--gov-form-checkbox-core-s-indicator-size, 1.375rem)}[size=m].gov-form-checkbox{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);min-width:var(--gov-form-checkbox-core-m-indicator-size, 1.5rem);min-height:var(--gov-form-checkbox-core-m-indicator-size, 1.5rem)}[size=m].gov-form-checkbox .gov-form-label__label{padding-top:calc((var(--gov-form-checkbox-core-m-indicator-size, 1.5rem) - var(--gov-text-m-font-size) * 1.5) / 2);padding-left:calc(var(--gov-form-checkbox-core-m-indicator-size, 1.5rem) + var(--gov-form-checkbox-core-m-gap, 1rem))}[size=m].gov-form-checkbox input+span::before{width:var(--gov-form-checkbox-core-m-indicator-size, 1.5rem);height:var(--gov-form-checkbox-core-m-indicator-size, 1.5rem)}[size=l].gov-form-checkbox{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing);min-width:var(--gov-form-checkbox-core-l-indicator-size, 2rem);min-height:var(--gov-form-checkbox-core-l-indicator-size, 2rem)}[size=l].gov-form-checkbox .gov-form-label__label{padding-top:calc((var(--gov-form-checkbox-core-l-indicator-size, 2rem) - var(--gov-text-l-font-size) * 1.5) / 2);padding-left:calc(var(--gov-form-checkbox-core-l-indicator-size, 2rem) + var(--gov-form-checkbox-core-l-gap, 1rem))}[size=l].gov-form-checkbox input+span::before{width:var(--gov-form-checkbox-core-l-indicator-size, 2rem);height:var(--gov-form-checkbox-core-l-indicator-size, 2rem)}.gov-form-checkbox input+span::before{border-radius:var(--gov-border-radius, 0.1875rem)}.gov-form-checkbox__check{position:absolute;color:var(--gov-form-checkbox-check-color, var(--gov-color-neutral-white));opacity:0;transition:150ms linear opacity}.gov-form-checkbox input:checked+span::before{background:var(--gov-form-checkbox-indicator-bg, var(--gov-color-primary))}input:checked+span .gov-form-checkbox__check{opacity:1}.gov-form-checkbox[invalid=""] input:checked+span::before,.gov-form-checkbox[invalid=true i] input:checked+span::before,.gov-form-checkbox[invalid="1"] input:checked+span::before{background:var(--gov-form-state-color-error, var(--gov-color-error))}.gov-form-checkbox[disabled=""] input:checked+span::before,.gov-form-checkbox[disabled=true i] input:checked+span::before,.gov-form-checkbox[disabled="1"] input:checked+span::before{border-color:var(--gov-form-input-disabled-bg, var(--gov-color-primary-400));background-color:var(--gov-form-input-disabled-bg, var(--gov-color-primary-400))}.gov-form-checkbox[size=xs] .gov-form-checkbox__check{top:calc((var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem) - var(--gov-form-checkbox-core-xs-check-size, 0.75rem)) / 2);left:calc((var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem) - var(--gov-form-checkbox-core-xs-check-size, 0.75rem)) / 2);width:var(--gov-form-checkbox-core-xs-check-size, 0.75rem);height:var(--gov-form-checkbox-core-xs-check-size, 0.75rem)}.gov-form-checkbox[size=s] .gov-form-checkbox__check{top:calc((var(--gov-form-checkbox-core-s-indicator-size, 1.375rem) - var(--gov-form-checkbox-core-s-check-size, 0.825rem)) / 2);left:calc((var(--gov-form-checkbox-core-s-indicator-size, 1.375rem) - var(--gov-form-checkbox-core-s-check-size, 0.825rem)) / 2);width:var(--gov-form-checkbox-core-s-check-size, 0.825rem);height:var(--gov-form-checkbox-core-s-check-size, 0.825rem)}.gov-form-checkbox[size=m] .gov-form-checkbox__check{top:calc((var(--gov-form-checkbox-core-m-indicator-size, 1.5rem) - var(--gov-form-checkbox-core-m-check-size, 0.9rem)) / 2);left:calc((var(--gov-form-checkbox-core-m-indicator-size, 1.5rem) - var(--gov-form-checkbox-core-m-check-size, 0.9rem)) / 2);width:var(--gov-form-checkbox-core-m-check-size, 0.9rem);height:var(--gov-form-checkbox-core-m-check-size, 0.9rem)}.gov-form-checkbox[size=l] .gov-form-checkbox__check{top:calc((var(--gov-form-checkbox-core-l-indicator-size, 2rem) - var(--gov-form-checkbox-core-l-check-size, 1.2rem)) / 2);left:calc((var(--gov-form-checkbox-core-l-indicator-size, 2rem) - var(--gov-form-checkbox-core-l-check-size, 1.2rem)) / 2);width:var(--gov-form-checkbox-core-l-check-size, 1.2rem);height:var(--gov-form-checkbox-core-l-check-size, 1.2rem)}';const p=class{constructor(r){o(this,r);this.govFocus=e(this,"gov-focus",7);this.govBlur=e(this,"gov-blur",7);this.govChange=e(this,"gov-change",7);this.value=undefined;this.checked=false;this.required=false;this.disabled=undefined;this.name=undefined;this.size="m";this.identifier=undefined;this.invalid=undefined;this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.isChecked=undefined;this.checkboxId=a("GovCheckbox");this.h=m(this.host);this.f=s(this.h)}updateCheckedState(o){this.isChecked=o;this.govChange.emit({checked:this.isChecked,value:this.value})}validateSize(o){t(v,o,h.root)}componentWillLoad(){this.isChecked=this.checked;this.f.passAttrToControl("type","checkbox");this.h.passChildAttr(k.root,"identifier",this.identifier||this.checkboxId)}async componentDidRender(){if(b()){await d(500);await this.validateWcag()}}render(){const{isChecked:o}=this;return r(c,{class:h.root,"is-checked":o,size:this.size,invalid:g(this.invalid)},r("input",{id:this.identifier||this.checkboxId,type:"checkbox",value:this.value,name:this.name,checked:this.isChecked,onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,"aria-checked":n(this.isChecked),"aria-required":g(this.required),"aria-invalid":g(this.invalid),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-disabled":g(this.disabled)}),r("span",null,r("slot",{name:"label"}),r("gov-icon",{class:h.check,name:"check"})))}onFocusHandler(o){this.govFocus.emit(o)}onBlurHandler(o){this.govBlur.emit(o)}onChangeHandler(o){this.isChecked=o.target.checked;o.stopPropagation();this.govChange.emit({checked:this.isChecked,value:this.value})}async validateWcag(){f(this.wcagDescribedBy,"wcag-described-by",h.root);f(this.wcagLabelledBy,"wcag-labelled-by",h.root);l(this.identifier||this.checkboxId,this.wcagLabelledBy,h.root)}get host(){return i(this)}static get watchers(){return{checked:["updateCheckedState"],size:["validateSize"]}}};p.style=x;export{p as gov_form_checkbox};
2
- //# sourceMappingURL=p-ad0cc981.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../packages/core/src/components/gov-form/checkbox/gov-form-checkbox.scss?tag=gov-form-checkbox","../../../packages/core/src/components/gov-form/checkbox/gov-form-checkbox.tsx"],"names":["govFormCheckboxCss","GovFormCheckbox","[object Object]","hostRef","this","checkboxId","createID","h","govHost","host","f","govForm","newValue","isChecked","govChange","emit","checked","value","validateProp","FormCheckboxSizes","FormCheckboxClass","root","passAttrToControl","passChildAttr","FormLabelClass","identifier","canValidateWcagOnRender","delay","validateWcag","Host","class","is-checked","size","invalid","toBoolAttrIfDefined","id","type","name","onChange","onChangeHandler","bind","onFocus","onFocusHandler","onBlur","onBlurHandler","required","aria-checked","toBoolAttr","aria-required","aria-invalid","aria-describedby","wcagDescribedBy","aria-labelledby","wcagLabelledBy","aria-disabled","disabled","check","e","govFocus","govBlur","target","stopPropagation","validateWcagRef","validateWcagLabelFor"],"mappings":"8gBAAA,MAAMA,EAAqB,mnPCmBdC,EAAe,MAM3BC,YAAAC,2JAeqD,oBAKhB,4DAaW,2IAhC/CC,KAAKC,WAAaC,EAAS,eAE3BF,KAAKG,EAAIC,EAAQJ,KAAKK,MACtBL,KAAKM,EAAIC,EAAQP,KAAKG,GA8DvBL,mBAAmBU,GAClBR,KAAKS,UAAYD,EACjBR,KAAKU,UAAUC,KAAK,CACnBC,QAASZ,KAAKS,UACdI,MAAOb,KAAKa,QAKdf,aAAaU,GACZM,EAAaC,EAAmBP,EAAUQ,EAAkBC,MAG7DnB,oBACCE,KAAKS,UAAYT,KAAKY,QAEtBZ,KAAKM,EAAEY,kBAAkB,OAAQ,YACjClB,KAAKG,EAAEgB,cAAcC,EAAeH,KAAM,aAAcjB,KAAKqB,YAAcrB,KAAKC,YAGjFH,2BACC,GAAIwB,IAA2B,OACxBC,EAAM,WACNvB,KAAKwB,gBAIb1B,SACC,MAAMW,UAAEA,GAAcT,KAEtB,OACCG,EAACsB,EAAI,CAACC,MAAOV,EAAkBC,KAAIU,aAAclB,EAAWmB,KAAM5B,KAAK4B,KAAMC,QAASC,EAAoB9B,KAAK6B,UAC9G1B,EAAA,QAAA,CACC4B,GAAI/B,KAAKqB,YAAcrB,KAAKC,WAC5B+B,KAAK,WACLnB,MAAOb,KAAKa,MACZoB,KAAMjC,KAAKiC,KACXrB,QAASZ,KAAKS,UACdyB,SAAUlC,KAAKmC,gBAAgBC,KAAKpC,MACpCqC,QAASrC,KAAKsC,eAAeF,KAAKpC,MAClCuC,OAAQvC,KAAKwC,cAAcJ,KAAKpC,MAChCyC,SAAUzC,KAAKyC,SAAQC,eACTC,EAAW3C,KAAKS,WAAUmC,gBACzBd,EAAoB9B,KAAKyC,UAASI,eACnCf,EAAoB9B,KAAK6B,SAAQiB,mBAC7B9C,KAAK+C,gBAAeC,kBACrBhD,KAAKiD,eAAcC,gBACrBpB,EAAoB9B,KAAKmD,YAEzChD,EAAA,OAAA,KACCA,EAAA,OAAA,CAAM8B,KAAK,UACX9B,EAAA,WAAA,CAAUuB,MAAOV,EAAkBoC,MAAOnB,KAAK,YAM3CnC,eAAeuD,GACtBrD,KAAKsD,SAAS3C,KAAK0C,GAGZvD,cAAcuD,GACrBrD,KAAKuD,QAAQ5C,KAAK0C,GAGXvD,gBAAgBuD,GACvBrD,KAAKS,UAAa4C,EAAEG,OAA4B5C,QAChDyC,EAAEI,kBACFzD,KAAKU,UAAUC,KAAK,CACnBC,QAASZ,KAAKS,UACdI,MAAOb,KAAKa,QAQdf,qBACC4D,EAAgB1D,KAAK+C,gBAAiB,oBAAqB/B,EAAkBC,MAC7EyC,EAAgB1D,KAAKiD,eAAgB,mBAAoBjC,EAAkBC,MAC3E0C,EAAqB3D,KAAKqB,YAAcrB,KAAKC,WAAYD,KAAKiD,eAAgBjC,EAAkBC","sourcesContent":["/*\n * Checkbox\n */\n\n@import \"../checkbox/gov-form-checkbox-core.scss\";\n$class: \".gov-form-checkbox\";\n\n#{$class} {\n\t@extend %form-checkbox-core;\n\tinput + span {\n\t\t&::before {\n\t\t\tborder-radius: $border-radius;\n\t\t}\n\t}\n\t&__check {\n\t\tposition: absolute;\n\t\tcolor: $form-checkbox-check-color;\n\t\topacity: 0;\n\t\ttransition: $t linear opacity;\n\t}\n\n\t// STATES\n\tinput:checked + span::before {\n\t\tbackground: $form-checkbox-indicator-bg;\n\t}\n\tinput:checked + span &__check {\n\t\topacity: 1;\n\t}\n\t@include parameter(\"invalid\") {\n\t\tinput:checked + span::before {\n\t\t\tbackground: $form-state-color-error;\n\t\t}\n\t}\n\t@include parameter(\"disabled\") {\n\t\tinput:checked + span::before {\n\t\t\tborder-color: $form-state-bg-disabled;\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\t#{$class} {\n\t\t\t\t&__check {\n\t\t\t\t\ttop: calc((get(\"indicator-size\", $definitions) - get(\"check-size\", $definitions)) / 2);\n\t\t\t\t\tleft: calc((get(\"indicator-size\", $definitions) - get(\"check-size\", $definitions)) / 2);\n\t\t\t\t\twidth: get(\"check-size\", $definitions);\n\t\t\t\t\theight: get(\"check-size\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Host, h, Prop, State, Event, EventEmitter, Element, Watch, Method } from '@stencil/core'\nimport { createID } from '../../../utils/string.utils'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { FormCheckboxClass, FormCheckboxSizes, FormCheckboxSizesType } from './constants'\nimport { 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, toBoolAttr } from '../../../helpers/Dom/template'\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { govForm } from '../../../helpers/Dom/form'\nimport { FormLabelClass } from '../label/constants'\nimport { GovFormCheckboxChangeEvent } from './interfaces'\n\n@Component({\n\ttag: 'gov-form-checkbox',\n\tstyleUrl: 'gov-form-checkbox.scss',\n})\nexport class GovFormCheckbox {\n\tprivate h: GovHost\n\tprivate f: GovForm\n\n\tprivate readonly checkboxId: string\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: HTMLGovFormCheckboxElement\n\t/**\n\t * Value of checkbox\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * Checkbox default state\n\t */\n\t@Prop({ reflect: true }) readonly checked: boolean = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the checkbox component disabled.\n\t * This prevents users from being able to interact with the checkbox, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean\n\t/**\n\t * Name of the checkbox.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Checkbox's size.\n\t */\n\t@Prop() readonly size?: FormCheckboxSizesType = 'm'\n\t/**\n\t * Custom checkbox 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 checkbox has focus.\n\t */\n\t@Event({ eventName: 'gov-focus' }) govFocus: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the checkbox loses focus.\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the checkbox change value.\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovFormCheckboxChangeEvent>\n\n\t@State() isChecked: boolean\n\n\t@Watch('checked')\n\tupdateCheckedState(newValue: boolean): void {\n\t\tthis.isChecked = newValue\n\t\tthis.govChange.emit({\n\t\t\tchecked: this.isChecked,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormCheckboxSizes, newValue, FormCheckboxClass.root)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.isChecked = this.checked\n\n\t\tthis.f.passAttrToControl('type', 'checkbox')\n\t\tthis.h.passChildAttr(FormLabelClass.root, 'identifier', this.identifier || this.checkboxId)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { isChecked } = this\n\n\t\treturn (\n\t\t\t<Host class={FormCheckboxClass.root} is-checked={isChecked} size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t<input\n\t\t\t\t\tid={this.identifier || this.checkboxId}\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\tvalue={this.value}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\tchecked={this.isChecked}\n\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\taria-checked={toBoolAttr(this.isChecked)}\n\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t/>\n\t\t\t\t<span>\n\t\t\t\t\t<slot name=\"label\" />\n\t\t\t\t\t<gov-icon class={FormCheckboxClass.check} name=\"check\"></gov-icon>\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.govFocus.emit(e)\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.govBlur.emit(e)\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.isChecked = (e.target as HTMLInputElement).checked\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tchecked: this.isChecked,\n\t\t\tvalue: this.value,\n\t\t})\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', FormCheckboxClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, 'wcag-labelled-by', FormCheckboxClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.checkboxId, this.wcagLabelledBy, FormCheckboxClass.root)\n\t}\n}\n"]}