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

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 (1001) hide show
  1. package/dist/cjs/{constants-5c8f444a.js → constants-0c6c8e11.js} +8 -3
  2. package/dist/cjs/constants-0c6c8e11.js.map +1 -0
  3. package/dist/cjs/constants-1490a5eb.js +25 -0
  4. package/dist/cjs/constants-1490a5eb.js.map +1 -0
  5. package/dist/cjs/constants-20b3f7ee.js +28 -0
  6. package/dist/cjs/constants-20b3f7ee.js.map +1 -0
  7. package/dist/cjs/{constants-0c6897bc.js → constants-21559414.js} +8 -3
  8. package/dist/cjs/constants-21559414.js.map +1 -0
  9. package/dist/cjs/constants-23b7a283.js +33 -0
  10. package/dist/cjs/constants-23b7a283.js.map +1 -0
  11. package/dist/cjs/constants-5f6bbc50.js +36 -0
  12. package/dist/cjs/constants-5f6bbc50.js.map +1 -0
  13. package/dist/cjs/constants-86fb4eb4.js +19 -0
  14. package/dist/cjs/constants-86fb4eb4.js.map +1 -0
  15. package/dist/cjs/constants-caad94b4.js +16 -0
  16. package/dist/cjs/constants-caad94b4.js.map +1 -0
  17. package/dist/cjs/constants-dc2ba6bd.js +26 -0
  18. package/dist/cjs/constants-dc2ba6bd.js.map +1 -0
  19. package/dist/cjs/{constants-a44c32bc.js → constants-ded92f8a.js} +1 -3
  20. package/dist/cjs/constants-ded92f8a.js.map +1 -0
  21. package/dist/cjs/{constants-477ca85a.js → constants-e175be18.js} +7 -4
  22. package/dist/cjs/constants-e175be18.js.map +1 -0
  23. package/dist/cjs/constants-e8760a84.js +20 -0
  24. package/dist/cjs/constants-e8760a84.js.map +1 -0
  25. package/dist/cjs/core.cjs.js +1 -1
  26. package/dist/cjs/{form-d9f0f50c.js → form-49298257.js} +42 -10
  27. package/dist/cjs/form-49298257.js.map +1 -0
  28. package/dist/cjs/gov-accordion-item.cjs.entry.js +8 -8
  29. package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
  30. package/dist/cjs/gov-accordion.cjs.entry.js +10 -10
  31. package/dist/cjs/gov-accordion.cjs.entry.js.map +1 -1
  32. package/dist/cjs/gov-alert.cjs.entry.js +6 -4
  33. package/dist/cjs/gov-alert.cjs.entry.js.map +1 -1
  34. package/dist/cjs/gov-app.cjs.entry.js +165 -45
  35. package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
  36. package/dist/cjs/gov-attachments_3.cjs.entry.js +9 -9
  37. package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
  38. package/dist/cjs/gov-backdrop.cjs.entry.js +4 -4
  39. package/dist/cjs/gov-backdrop.cjs.entry.js.map +1 -1
  40. package/dist/cjs/gov-badge.cjs.entry.js +11 -10
  41. package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
  42. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +4 -5
  43. package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
  44. package/dist/cjs/gov-button.cjs.entry.js +12 -23
  45. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  46. package/dist/cjs/gov-card.cjs.entry.js +3 -3
  47. package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
  48. package/dist/cjs/gov-container.cjs.entry.js.map +1 -1
  49. package/dist/cjs/gov-cookiebar.cjs.entry.js.map +1 -1
  50. package/dist/cjs/gov-empty.cjs.entry.js.map +1 -1
  51. package/dist/cjs/gov-error-code.cjs.entry.js.map +1 -1
  52. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +8 -8
  53. package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
  54. package/dist/cjs/gov-form-checkbox.cjs.entry.js +13 -22
  55. package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
  56. package/dist/cjs/gov-form-control.cjs.entry.js +30 -29
  57. package/dist/cjs/gov-form-control.cjs.entry.js.map +1 -1
  58. package/dist/cjs/gov-form-file.cjs.entry.js +8 -8
  59. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  60. package/dist/cjs/gov-form-input.cjs.entry.js +13 -19
  61. package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
  62. package/dist/cjs/gov-form-multi-select.cjs.entry.js +10 -10
  63. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  64. package/dist/cjs/gov-form-radio.cjs.entry.js +12 -12
  65. package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
  66. package/dist/cjs/gov-form-search.cjs.entry.js +0 -2
  67. package/dist/cjs/gov-form-search.cjs.entry.js.map +1 -1
  68. package/dist/cjs/gov-form-select.cjs.entry.js +13 -13
  69. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  70. package/dist/cjs/gov-form-switch.cjs.entry.js +12 -12
  71. package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
  72. package/dist/cjs/gov-grid-item.cjs.entry.js +2 -3
  73. package/dist/cjs/gov-grid-item.cjs.entry.js.map +1 -1
  74. package/dist/cjs/gov-grid.cjs.entry.js +1 -2
  75. package/dist/cjs/gov-grid.cjs.entry.js.map +1 -1
  76. package/dist/cjs/gov-icon.cjs.entry.js +10 -5
  77. package/dist/cjs/gov-icon.cjs.entry.js.map +1 -1
  78. package/dist/cjs/gov-layout-column.cjs.entry.js +25 -0
  79. package/dist/cjs/gov-layout-column.cjs.entry.js.map +1 -0
  80. package/dist/cjs/gov-layout.cjs.entry.js +12 -3
  81. package/dist/cjs/gov-layout.cjs.entry.js.map +1 -1
  82. package/dist/cjs/gov-loading.cjs.entry.js +1 -1
  83. package/dist/cjs/gov-loading.cjs.entry.js.map +1 -1
  84. package/dist/cjs/gov-message.cjs.entry.js +4 -2
  85. package/dist/cjs/gov-message.cjs.entry.js.map +1 -1
  86. package/dist/cjs/gov-modal.cjs.entry.js +3 -3
  87. package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
  88. package/dist/cjs/gov-nav.cjs.entry.js +3 -3
  89. package/dist/cjs/gov-pagination.cjs.entry.js +26 -21
  90. package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
  91. package/dist/cjs/gov-prompt.cjs.entry.js +3 -3
  92. package/dist/cjs/gov-prompt.cjs.entry.js.map +1 -1
  93. package/dist/cjs/gov-side-nav-item.cjs.entry.js +1 -1
  94. package/dist/cjs/gov-side-nav-item.cjs.entry.js.map +1 -1
  95. package/dist/cjs/gov-side-nav.cjs.entry.js +3 -3
  96. package/dist/cjs/gov-side-nav.cjs.entry.js.map +1 -1
  97. package/dist/cjs/gov-spacer.cjs.entry.js +11 -13
  98. package/dist/cjs/gov-spacer.cjs.entry.js.map +1 -1
  99. package/dist/cjs/gov-statsbar-item.cjs.entry.js +4 -2
  100. package/dist/cjs/gov-statsbar-item.cjs.entry.js.map +1 -1
  101. package/dist/cjs/gov-statsbar.cjs.entry.js +7 -6
  102. package/dist/cjs/gov-statsbar.cjs.entry.js.map +1 -1
  103. package/dist/cjs/gov-stepper-item.cjs.entry.js +9 -9
  104. package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
  105. package/dist/cjs/gov-stepper.cjs.entry.js +9 -8
  106. package/dist/cjs/gov-stepper.cjs.entry.js.map +1 -1
  107. package/dist/cjs/gov-tabs-item.cjs.entry.js +3 -3
  108. package/dist/cjs/gov-tabs-item.cjs.entry.js.map +1 -1
  109. package/dist/cjs/gov-tabs.cjs.entry.js +11 -11
  110. package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
  111. package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
  112. package/dist/cjs/gov-tiles.cjs.entry.js +1 -1
  113. package/dist/cjs/gov-tiles.cjs.entry.js.map +1 -1
  114. package/dist/cjs/gov-toast.cjs.entry.js +21 -18
  115. package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
  116. package/dist/cjs/gov-tooltip-content.cjs.entry.js +3 -2
  117. package/dist/cjs/gov-tooltip-content.cjs.entry.js.map +1 -1
  118. package/dist/cjs/gov-tooltip.cjs.entry.js +15 -14
  119. package/dist/cjs/gov-tooltip.cjs.entry.js.map +1 -1
  120. package/dist/cjs/gov-wizzard-item.cjs.entry.js +10 -11
  121. package/dist/cjs/gov-wizzard-item.cjs.entry.js.map +1 -1
  122. package/dist/cjs/gov-wizzard.cjs.entry.js +9 -9
  123. package/dist/cjs/gov-wizzard.cjs.entry.js.map +1 -1
  124. package/dist/cjs/index-356717ae.js +2 -6
  125. package/dist/cjs/loader.cjs.js +1 -1
  126. package/dist/cjs/{props-cc21d3d7.js → props-5f82e4c0.js} +4 -4
  127. package/dist/cjs/props-5f82e4c0.js.map +1 -0
  128. package/dist/cjs/template-e1c4ff78.js.map +1 -1
  129. package/dist/cjs/{utils-4ae73637.js → utils-c9b1bba3.js} +3 -1
  130. package/dist/cjs/utils-c9b1bba3.js.map +1 -0
  131. package/dist/cjs/{variants-bacf037a.js → variants-f5ffeef3.js} +3 -3
  132. package/dist/cjs/variants-f5ffeef3.js.map +1 -0
  133. package/dist/cjs/{wcag-eca97102.js → wcag-6efc0ab7.js} +2 -2
  134. package/dist/cjs/wcag-6efc0ab7.js.map +1 -0
  135. package/dist/cjs/{win-ac5c1806.js → win-84bda0aa.js} +3 -3
  136. package/dist/cjs/win-84bda0aa.js.map +1 -0
  137. package/dist/collection/collection-manifest.json +1 -2
  138. package/dist/collection/components/gov-accordion/constants.js +5 -4
  139. package/dist/collection/components/gov-accordion/constants.js.map +1 -1
  140. package/dist/collection/components/gov-accordion/gov-accordion-item.js +17 -20
  141. package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
  142. package/dist/collection/components/gov-accordion/gov-accordion.js +17 -18
  143. package/dist/collection/components/gov-accordion/gov-accordion.js.map +1 -1
  144. package/dist/collection/components/gov-alert/constants.js +3 -9
  145. package/dist/collection/components/gov-alert/constants.js.map +1 -1
  146. package/dist/collection/components/gov-alert/gov-alert.js +6 -7
  147. package/dist/collection/components/gov-alert/gov-alert.js.map +1 -1
  148. package/dist/collection/components/gov-app/gov-app.js +3 -3
  149. package/dist/collection/components/gov-app/gov-app.js.map +1 -1
  150. package/dist/collection/components/gov-attachments/gov-attachments-item.js +5 -5
  151. package/dist/collection/components/gov-attachments/gov-attachments-item.js.map +1 -1
  152. package/dist/collection/components/gov-attachments/gov-attachments.js +7 -7
  153. package/dist/collection/components/gov-attachments/gov-attachments.js.map +1 -1
  154. package/dist/collection/components/gov-backdrop/gov-backdrop.js +7 -7
  155. package/dist/collection/components/gov-backdrop/gov-backdrop.js.map +1 -1
  156. package/dist/collection/components/gov-badge/constants.js +1 -2
  157. package/dist/collection/components/gov-badge/constants.js.map +1 -1
  158. package/dist/collection/components/gov-badge/gov-badge.js +25 -27
  159. package/dist/collection/components/gov-badge/gov-badge.js.map +1 -1
  160. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.d.js.map +1 -1
  161. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +2 -3
  162. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js.map +1 -1
  163. package/dist/collection/components/gov-button/constants.js +17 -13
  164. package/dist/collection/components/gov-button/constants.js.map +1 -1
  165. package/dist/collection/components/gov-button/gov-button.js +37 -44
  166. package/dist/collection/components/gov-button/gov-button.js.map +1 -1
  167. package/dist/collection/components/gov-card/gov-card.js.map +1 -1
  168. package/dist/collection/components/gov-container/gov-container.js +3 -3
  169. package/dist/collection/components/gov-container/gov-container.js.map +1 -1
  170. package/dist/collection/components/gov-cookiebar/gov-cookiebar.js.map +1 -1
  171. package/dist/collection/components/gov-empty/gov-empty.js.map +1 -1
  172. package/dist/collection/components/gov-error-code/gov-error-code.js.map +1 -1
  173. package/dist/collection/components/gov-form/autocomplete/constants.js +5 -4
  174. package/dist/collection/components/gov-form/autocomplete/constants.js.map +1 -1
  175. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +16 -18
  176. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
  177. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.types.js +2 -0
  178. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.types.js.map +1 -0
  179. package/dist/collection/components/gov-form/checkbox/constants.js +3 -2
  180. package/dist/collection/components/gov-form/checkbox/constants.js.map +1 -1
  181. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +11 -21
  182. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
  183. package/dist/collection/components/gov-form/checkbox/interfaces.js.map +1 -1
  184. package/dist/collection/components/gov-form/control/constants.js +3 -2
  185. package/dist/collection/components/gov-form/control/constants.js.map +1 -1
  186. package/dist/collection/components/gov-form/control/gov-form-control.js +40 -42
  187. package/dist/collection/components/gov-form/control/gov-form-control.js.map +1 -1
  188. package/dist/collection/components/gov-form/file/gov-form-file.js +3 -3
  189. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  190. package/dist/collection/components/gov-form/file/gov-form-file.types.js +2 -0
  191. package/dist/collection/components/gov-form/file/gov-form-file.types.js.map +1 -0
  192. package/dist/collection/components/gov-form/input/constants.js +25 -21
  193. package/dist/collection/components/gov-form/input/constants.js.map +1 -1
  194. package/dist/collection/components/gov-form/input/gov-form-input.js +24 -32
  195. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  196. package/dist/collection/components/gov-form/message/constants.js +3 -2
  197. package/dist/collection/components/gov-form/message/constants.js.map +1 -1
  198. package/dist/collection/components/gov-form/message/gov-form-message.js +8 -9
  199. package/dist/collection/components/gov-form/message/gov-form-message.js.map +1 -1
  200. package/dist/collection/components/gov-form/multiselect/constants.js +5 -4
  201. package/dist/collection/components/gov-form/multiselect/constants.js.map +1 -1
  202. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +16 -18
  203. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
  204. package/dist/collection/components/gov-form/radio/constants.js +3 -2
  205. package/dist/collection/components/gov-form/radio/constants.js.map +1 -1
  206. package/dist/collection/components/gov-form/radio/gov-form-radio.js +10 -11
  207. package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
  208. package/dist/collection/components/gov-form/radio/interfaces.js.map +1 -1
  209. package/dist/collection/components/gov-form/search/constants.js +0 -11
  210. package/dist/collection/components/gov-form/search/constants.js.map +1 -1
  211. package/dist/collection/components/gov-form/search/gov-form-search.js.map +1 -1
  212. package/dist/collection/components/gov-form/select/constants.js +5 -4
  213. package/dist/collection/components/gov-form/select/constants.js.map +1 -1
  214. package/dist/collection/components/gov-form/select/gov-form-select.js +16 -18
  215. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  216. package/dist/collection/components/gov-form/switch/constants.js +3 -2
  217. package/dist/collection/components/gov-form/switch/constants.js.map +1 -1
  218. package/dist/collection/components/gov-form/switch/gov-form-switch.js +10 -11
  219. package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
  220. package/dist/collection/components/gov-form/switch/interfaces.js.map +1 -1
  221. package/dist/collection/components/gov-grid/constants.js +0 -12
  222. package/dist/collection/components/gov-grid/constants.js.map +1 -1
  223. package/dist/collection/components/gov-grid/gov-grid-item.js +5 -5
  224. package/dist/collection/components/gov-grid/gov-grid-item.js.map +1 -1
  225. package/dist/collection/components/gov-grid/gov-grid.js +3 -3
  226. package/dist/collection/components/gov-grid/gov-grid.js.map +1 -1
  227. package/dist/collection/components/gov-icon/constants.js +6 -1
  228. package/dist/collection/components/gov-icon/constants.js.map +1 -1
  229. package/dist/collection/components/gov-icon/gov-icon.js +1 -1
  230. package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
  231. package/dist/collection/components/gov-icon/list.js +91 -91
  232. package/dist/collection/components/gov-icon/list.js.map +1 -1
  233. package/dist/collection/components/gov-layout/constants.js +13 -7
  234. package/dist/collection/components/gov-layout/constants.js.map +1 -1
  235. package/dist/collection/components/gov-layout/{gov-layout-aside.css → gov-layout-column.css} +4 -13
  236. package/dist/collection/components/gov-layout/gov-layout-column.js +24 -0
  237. package/dist/collection/components/gov-layout/gov-layout-column.js.map +1 -0
  238. package/dist/collection/components/gov-layout/gov-layout.css +35 -0
  239. package/dist/collection/components/gov-layout/gov-layout.js +80 -4
  240. package/dist/collection/components/gov-layout/gov-layout.js.map +1 -1
  241. package/dist/collection/components/gov-loading/gov-loading.js +4 -4
  242. package/dist/collection/components/gov-loading/gov-loading.js.map +1 -1
  243. package/dist/collection/components/gov-message/constants.js +3 -9
  244. package/dist/collection/components/gov-message/constants.js.map +1 -1
  245. package/dist/collection/components/gov-message/gov-message.js +4 -4
  246. package/dist/collection/components/gov-message/gov-message.js.map +1 -1
  247. package/dist/collection/components/gov-modal/gov-modal.js.map +1 -1
  248. package/dist/collection/components/gov-pagination/constants.js +10 -5
  249. package/dist/collection/components/gov-pagination/constants.js.map +1 -1
  250. package/dist/collection/components/gov-pagination/gov-pagination.css +5 -8
  251. package/dist/collection/components/gov-pagination/gov-pagination.js +42 -44
  252. package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
  253. package/dist/collection/components/gov-promp/gov-prompt.js +1 -1
  254. package/dist/collection/components/gov-promp/gov-prompt.js.map +1 -1
  255. package/dist/collection/components/gov-side-nav/gov-side-nav-item.js +1 -1
  256. package/dist/collection/components/gov-side-nav/gov-side-nav-item.js.map +1 -1
  257. package/dist/collection/components/gov-side-nav/gov-side-nav.js.map +1 -1
  258. package/dist/collection/components/gov-spacer/constants.js +10 -4
  259. package/dist/collection/components/gov-spacer/constants.js.map +1 -1
  260. package/dist/collection/components/gov-spacer/gov-spacer.js +9 -11
  261. package/dist/collection/components/gov-spacer/gov-spacer.js.map +1 -1
  262. package/dist/collection/components/gov-statsbar/constants.js +7 -2
  263. package/dist/collection/components/gov-statsbar/constants.js.map +1 -1
  264. package/dist/collection/components/gov-statsbar/gov-statsbar-item.js +2 -2
  265. package/dist/collection/components/gov-statsbar/gov-statsbar-item.js.map +1 -1
  266. package/dist/collection/components/gov-statsbar/gov-statsbar.js +13 -15
  267. package/dist/collection/components/gov-statsbar/gov-statsbar.js.map +1 -1
  268. package/dist/collection/components/gov-stepper/constants.js +5 -11
  269. package/dist/collection/components/gov-stepper/constants.js.map +1 -1
  270. package/dist/collection/components/gov-stepper/gov-stepper-item.js +17 -20
  271. package/dist/collection/components/gov-stepper/gov-stepper-item.js.map +1 -1
  272. package/dist/collection/components/gov-stepper/gov-stepper.js +14 -15
  273. package/dist/collection/components/gov-stepper/gov-stepper.js.map +1 -1
  274. package/dist/collection/components/gov-tabs/constants.js +13 -12
  275. package/dist/collection/components/gov-tabs/constants.js.map +1 -1
  276. package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
  277. package/dist/collection/components/gov-tabs/gov-tabs-item.js.map +1 -1
  278. package/dist/collection/components/gov-tabs/gov-tabs.css +28 -1
  279. package/dist/collection/components/gov-tabs/gov-tabs.js +38 -15
  280. package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
  281. package/dist/collection/components/gov-tabs/gov-tabs.types.js +2 -0
  282. package/dist/collection/components/gov-tabs/gov-tabs.types.js.map +1 -0
  283. package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
  284. package/dist/collection/components/gov-tiles/gov-tiles.js +5 -5
  285. package/dist/collection/components/gov-tiles/gov-tiles.js.map +1 -1
  286. package/dist/collection/components/gov-toast/constants.js +10 -20
  287. package/dist/collection/components/gov-toast/constants.js.map +1 -1
  288. package/dist/collection/components/gov-toast/gov-toast.js +34 -30
  289. package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
  290. package/dist/collection/components/gov-tooltip/constants.js +12 -12
  291. package/dist/collection/components/gov-tooltip/constants.js.map +1 -1
  292. package/dist/collection/components/gov-tooltip/gov-tooltip.js +27 -29
  293. package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
  294. package/dist/collection/components/gov-wizzard/constants.js +5 -4
  295. package/dist/collection/components/gov-wizzard/constants.js.map +1 -1
  296. package/dist/collection/components/gov-wizzard/gov-wizzard-item.css +8 -17
  297. package/dist/collection/components/gov-wizzard/gov-wizzard-item.js +16 -20
  298. package/dist/collection/components/gov-wizzard/gov-wizzard-item.js.map +1 -1
  299. package/dist/collection/components/gov-wizzard/gov-wizzard.js +9 -10
  300. package/dist/collection/components/gov-wizzard/gov-wizzard.js.map +1 -1
  301. package/dist/collection/core/constants/tags.js.map +1 -1
  302. package/dist/collection/helpers/Dom/form.js.map +1 -1
  303. package/dist/collection/helpers/Dom/form.types.js +2 -0
  304. package/dist/collection/helpers/Dom/form.types.js.map +1 -0
  305. package/dist/collection/helpers/Dom/template.js.map +1 -1
  306. package/dist/collection/helpers/Dom/template.types.js +2 -0
  307. package/dist/collection/helpers/Dom/template.types.js.map +1 -0
  308. package/dist/collection/helpers/Dom/win.js +2 -2
  309. package/dist/collection/helpers/Dom/win.js.map +1 -1
  310. package/dist/collection/helpers/Fragment.js.map +1 -1
  311. package/dist/collection/helpers/StorybookDocsTemplate.js +2 -2
  312. package/dist/collection/helpers/StorybookDocsTemplate.js.map +1 -1
  313. package/dist/collection/helpers/Validate/props.js +3 -3
  314. package/dist/collection/helpers/Validate/props.js.map +1 -1
  315. package/dist/collection/helpers/Validate/wcag.js +1 -1
  316. package/dist/collection/helpers/Validate/wcag.js.map +1 -1
  317. package/dist/collection/pages/Forms.js +1 -1
  318. package/dist/collection/pages/Forms.js.map +1 -1
  319. package/dist/collection/pages/Layout.js +65 -35
  320. package/dist/collection/pages/Layout.js.map +1 -1
  321. package/dist/collection/pages/Loading.js +3 -3
  322. package/dist/collection/pages/Loading.js.map +1 -1
  323. package/dist/collection/pages/Tabs.js +90 -0
  324. package/dist/collection/pages/Tabs.js.map +1 -1
  325. package/dist/collection/pages/Wizzard.js +5 -5
  326. package/dist/collection/pages/Wizzard.js.map +1 -1
  327. package/dist/collection/types/interfaces.js.map +1 -1
  328. package/dist/collection/utils/icon.utils.js +3 -4
  329. package/dist/collection/utils/icon.utils.js.map +1 -1
  330. package/dist/collection/utils/utils.js +1 -0
  331. package/dist/collection/utils/utils.js.map +1 -1
  332. package/dist/components/constants.js +6 -4
  333. package/dist/components/constants.js.map +1 -1
  334. package/dist/components/constants11.js +8 -2
  335. package/dist/components/constants11.js.map +1 -1
  336. package/dist/components/constants12.js +6 -3
  337. package/dist/components/constants12.js.map +1 -1
  338. package/dist/components/constants13.js +14 -4
  339. package/dist/components/constants13.js.map +1 -1
  340. package/dist/components/constants14.js +11 -11
  341. package/dist/components/constants14.js.map +1 -1
  342. package/dist/components/constants15.js +6 -3
  343. package/dist/components/constants15.js.map +1 -1
  344. package/dist/components/constants3.js +18 -13
  345. package/dist/components/constants3.js.map +1 -1
  346. package/dist/components/constants5.js +4 -3
  347. package/dist/components/constants5.js.map +1 -1
  348. package/dist/components/constants6.js +0 -2
  349. package/dist/components/constants6.js.map +1 -1
  350. package/dist/components/constants7.js +14 -8
  351. package/dist/components/constants7.js.map +1 -1
  352. package/dist/components/form.js +36 -8
  353. package/dist/components/form.js.map +1 -1
  354. package/dist/components/gov-accordion-item.js +8 -9
  355. package/dist/components/gov-accordion-item.js.map +1 -1
  356. package/dist/components/gov-accordion.js +9 -8
  357. package/dist/components/gov-accordion.js.map +1 -1
  358. package/dist/components/gov-alert.js +6 -3
  359. package/dist/components/gov-alert.js.map +1 -1
  360. package/dist/components/gov-app.js +166 -45
  361. package/dist/components/gov-app.js.map +1 -1
  362. package/dist/components/gov-attachments-item2.js +3 -1
  363. package/dist/components/gov-attachments-item2.js.map +1 -1
  364. package/dist/components/gov-attachments2.js +4 -2
  365. package/dist/components/gov-attachments2.js.map +1 -1
  366. package/dist/components/gov-backdrop2.js +4 -2
  367. package/dist/components/gov-backdrop2.js.map +1 -1
  368. package/dist/components/gov-badge2.js +12 -13
  369. package/dist/components/gov-badge2.js.map +1 -1
  370. package/dist/components/gov-breadcrumbs.js +4 -3
  371. package/dist/components/gov-breadcrumbs.js.map +1 -1
  372. package/dist/components/gov-button2.js +14 -23
  373. package/dist/components/gov-button2.js.map +1 -1
  374. package/dist/components/gov-card.js +3 -1
  375. package/dist/components/gov-card.js.map +1 -1
  376. package/dist/components/gov-container.js +1 -0
  377. package/dist/components/gov-container.js.map +1 -1
  378. package/dist/components/gov-cookiebar.js +1 -0
  379. package/dist/components/gov-cookiebar.js.map +1 -1
  380. package/dist/components/gov-empty.js +1 -0
  381. package/dist/components/gov-empty.js.map +1 -1
  382. package/dist/components/gov-error-code.js +1 -0
  383. package/dist/components/gov-error-code.js.map +1 -1
  384. package/dist/components/gov-form-autocomplete2.js +8 -8
  385. package/dist/components/gov-form-autocomplete2.js.map +1 -1
  386. package/dist/components/gov-form-checkbox.js +8 -16
  387. package/dist/components/gov-form-checkbox.js.map +1 -1
  388. package/dist/components/gov-form-control.js +27 -27
  389. package/dist/components/gov-form-control.js.map +1 -1
  390. package/dist/components/gov-form-file.js +3 -1
  391. package/dist/components/gov-form-file.js.map +1 -1
  392. package/dist/components/gov-form-group.js +1 -0
  393. package/dist/components/gov-form-group.js.map +1 -1
  394. package/dist/components/gov-form-input2.js +11 -16
  395. package/dist/components/gov-form-input2.js.map +1 -1
  396. package/dist/components/gov-form-label.js +1 -0
  397. package/dist/components/gov-form-label.js.map +1 -1
  398. package/dist/components/gov-form-message2.js +5 -5
  399. package/dist/components/gov-form-message2.js.map +1 -1
  400. package/dist/components/gov-form-multi-select.js +9 -8
  401. package/dist/components/gov-form-multi-select.js.map +1 -1
  402. package/dist/components/gov-form-radio.js +7 -6
  403. package/dist/components/gov-form-radio.js.map +1 -1
  404. package/dist/components/gov-form-search.js +1 -2
  405. package/dist/components/gov-form-search.js.map +1 -1
  406. package/dist/components/gov-form-select2.js +9 -8
  407. package/dist/components/gov-form-select2.js.map +1 -1
  408. package/dist/components/gov-form-switch.js +7 -6
  409. package/dist/components/gov-form-switch.js.map +1 -1
  410. package/dist/components/gov-grid-item.js +2 -1
  411. package/dist/components/gov-grid-item.js.map +1 -1
  412. package/dist/components/gov-grid.js +1 -0
  413. package/dist/components/gov-grid.js.map +1 -1
  414. package/dist/components/gov-icon2.js +9 -3
  415. package/dist/components/gov-icon2.js.map +1 -1
  416. package/dist/components/{gov-layout-aside.d.ts → gov-layout-column.d.ts} +4 -4
  417. package/dist/components/gov-layout-column.js +39 -0
  418. package/dist/components/gov-layout-column.js.map +1 -0
  419. package/dist/components/gov-layout.js +17 -3
  420. package/dist/components/gov-layout.js.map +1 -1
  421. package/dist/components/gov-loading.js +2 -1
  422. package/dist/components/gov-loading.js.map +1 -1
  423. package/dist/components/gov-message.js +4 -1
  424. package/dist/components/gov-message.js.map +1 -1
  425. package/dist/components/gov-modal.js +3 -1
  426. package/dist/components/gov-modal.js.map +1 -1
  427. package/dist/components/gov-nav-item.js +1 -0
  428. package/dist/components/gov-nav-item.js.map +1 -1
  429. package/dist/components/gov-nav.js +3 -1
  430. package/dist/components/gov-nav.js.map +1 -1
  431. package/dist/components/gov-pagination.js +28 -21
  432. package/dist/components/gov-pagination.js.map +1 -1
  433. package/dist/components/gov-prompt.js +3 -1
  434. package/dist/components/gov-prompt.js.map +1 -1
  435. package/dist/components/gov-side-nav-item.js +2 -1
  436. package/dist/components/gov-side-nav-item.js.map +1 -1
  437. package/dist/components/gov-side-nav.js +3 -1
  438. package/dist/components/gov-side-nav.js.map +1 -1
  439. package/dist/components/gov-spacer.js +12 -13
  440. package/dist/components/gov-spacer.js.map +1 -1
  441. package/dist/components/gov-statsbar-item.js +2 -1
  442. package/dist/components/gov-statsbar-item.js.map +1 -1
  443. package/dist/components/gov-statsbar.js +6 -6
  444. package/dist/components/gov-statsbar.js.map +1 -1
  445. package/dist/components/gov-stepper-item.js +8 -10
  446. package/dist/components/gov-stepper-item.js.map +1 -1
  447. package/dist/components/gov-stepper.js +7 -7
  448. package/dist/components/gov-stepper.js.map +1 -1
  449. package/dist/components/gov-tabs-item.js +1 -0
  450. package/dist/components/gov-tabs-item.js.map +1 -1
  451. package/dist/components/gov-tabs.js +12 -9
  452. package/dist/components/gov-tabs.js.map +1 -1
  453. package/dist/components/gov-tile.js +1 -0
  454. package/dist/components/gov-tile.js.map +1 -1
  455. package/dist/components/gov-tiles.js +2 -1
  456. package/dist/components/gov-tiles.js.map +1 -1
  457. package/dist/components/gov-toast.js +22 -18
  458. package/dist/components/gov-toast.js.map +1 -1
  459. package/dist/components/gov-tooltip-content.js +1 -0
  460. package/dist/components/gov-tooltip-content.js.map +1 -1
  461. package/dist/components/gov-tooltip.js +14 -15
  462. package/dist/components/gov-tooltip.js.map +1 -1
  463. package/dist/components/gov-wizzard-item.js +8 -11
  464. package/dist/components/gov-wizzard-item.js.map +1 -1
  465. package/dist/components/gov-wizzard.js +7 -6
  466. package/dist/components/gov-wizzard.js.map +1 -1
  467. package/dist/components/index.d.ts +1 -2
  468. package/dist/components/index.js +1 -2
  469. package/dist/components/index.js.map +1 -1
  470. package/dist/components/props.js +3 -3
  471. package/dist/components/props.js.map +1 -1
  472. package/dist/components/template.js.map +1 -1
  473. package/dist/{esm/utils-3a968bb9.js → components/utils.js} +3 -2
  474. package/dist/components/utils.js.map +1 -0
  475. package/dist/components/variants.js +1 -1
  476. package/dist/components/variants.js.map +1 -1
  477. package/dist/components/wcag.js +1 -1
  478. package/dist/components/wcag.js.map +1 -1
  479. package/dist/components/win.js +3 -32
  480. package/dist/components/win.js.map +1 -1
  481. package/dist/core/core.esm.js +1 -1
  482. package/dist/core/core.esm.js.map +1 -1
  483. package/dist/core/{p-c9f0d988.entry.js → p-00182e76.entry.js} +2 -2
  484. package/dist/core/{p-c9f0d988.entry.js.map → p-00182e76.entry.js.map} +1 -1
  485. package/dist/core/{p-bbd48feb.entry.js → p-01bdd4a4.entry.js} +2 -2
  486. package/dist/core/{p-bbd48feb.entry.js.map → p-01bdd4a4.entry.js.map} +1 -1
  487. package/dist/core/p-0278fcb3.entry.js +2 -0
  488. package/dist/core/p-0278fcb3.entry.js.map +1 -0
  489. package/dist/core/p-0284b5e2.js +2 -0
  490. package/dist/core/p-0284b5e2.js.map +1 -0
  491. package/dist/core/{p-58691740.js → p-03990da5.js} +2 -2
  492. package/dist/core/p-03990da5.js.map +1 -0
  493. package/dist/core/p-03d40bf4.entry.js +2 -0
  494. package/dist/core/p-03d40bf4.entry.js.map +1 -0
  495. package/dist/core/{p-9680b966.entry.js → p-08f14c8b.entry.js} +2 -2
  496. package/dist/core/p-08f14c8b.entry.js.map +1 -0
  497. package/dist/core/p-0a152bb7.entry.js +2 -0
  498. package/dist/core/p-0a152bb7.entry.js.map +1 -0
  499. package/dist/core/p-14f8f2fb.js +2 -0
  500. package/dist/core/p-14f8f2fb.js.map +1 -0
  501. package/dist/core/p-2128abe1.entry.js +2 -0
  502. package/dist/core/p-2128abe1.entry.js.map +1 -0
  503. package/dist/core/p-22722ff3.entry.js +2 -0
  504. package/dist/core/p-22722ff3.entry.js.map +1 -0
  505. package/dist/core/p-2419f4cd.entry.js +2 -0
  506. package/dist/core/p-2419f4cd.entry.js.map +1 -0
  507. package/dist/core/p-24cde59e.entry.js.map +1 -1
  508. package/dist/core/p-25380da6.entry.js +2 -0
  509. package/dist/core/p-25380da6.entry.js.map +1 -0
  510. package/dist/core/p-26acf964.js +2 -0
  511. package/dist/core/p-26acf964.js.map +1 -0
  512. package/dist/core/p-34360f92.entry.js +2 -0
  513. package/dist/core/p-34360f92.entry.js.map +1 -0
  514. package/dist/core/{p-f58b9eec.js → p-364b4792.js} +2 -2
  515. package/dist/core/p-364b4792.js.map +1 -0
  516. package/dist/core/p-38fb2d42.entry.js +2 -0
  517. package/dist/core/p-38fb2d42.entry.js.map +1 -0
  518. package/dist/core/p-3e9ba1c1.entry.js +2 -0
  519. package/dist/core/p-3e9ba1c1.entry.js.map +1 -0
  520. package/dist/core/p-3f37ddb6.js.map +1 -1
  521. package/dist/core/p-404f469e.js +2 -0
  522. package/dist/core/p-404f469e.js.map +1 -0
  523. package/dist/core/p-4681cb3a.entry.js +2 -0
  524. package/dist/core/p-4681cb3a.entry.js.map +1 -0
  525. package/dist/core/p-469273be.entry.js +2 -0
  526. package/dist/core/p-469273be.entry.js.map +1 -0
  527. package/dist/core/p-4d73d70e.entry.js +2 -0
  528. package/dist/core/p-4d73d70e.entry.js.map +1 -0
  529. package/dist/core/{p-2c25aac5.entry.js → p-5547dbb0.entry.js} +2 -2
  530. package/dist/core/p-5547dbb0.entry.js.map +1 -0
  531. package/dist/core/p-5cecdaaf.entry.js +2 -0
  532. package/dist/core/{p-d9ffb84e.entry.js.map → p-5cecdaaf.entry.js.map} +1 -1
  533. package/dist/core/p-5defdc5e.js +2 -0
  534. package/dist/core/p-5defdc5e.js.map +1 -0
  535. package/dist/core/p-5fa41af9.js +2 -0
  536. package/dist/core/p-5fa41af9.js.map +1 -0
  537. package/dist/core/p-6278531b.js +2 -0
  538. package/dist/core/p-6278531b.js.map +1 -0
  539. package/dist/core/p-63079b80.entry.js +2 -0
  540. package/dist/core/p-63079b80.entry.js.map +1 -0
  541. package/dist/core/p-64ced668.js +2 -0
  542. package/dist/core/p-64ced668.js.map +1 -0
  543. package/dist/core/p-68d968ac.entry.js +2 -0
  544. package/dist/core/p-68d968ac.entry.js.map +1 -0
  545. package/dist/core/{p-6e1b9f39.entry.js → p-6d40721b.entry.js} +2 -2
  546. package/dist/core/{p-6e1b9f39.entry.js.map → p-6d40721b.entry.js.map} +1 -1
  547. package/dist/core/p-733bd593.entry.js.map +1 -1
  548. package/dist/core/{p-cbf4ad73.entry.js → p-7591ecd4.entry.js} +2 -2
  549. package/dist/core/{p-cbf4ad73.entry.js.map → p-7591ecd4.entry.js.map} +1 -1
  550. package/dist/core/p-76542f4f.js +2 -0
  551. package/dist/core/p-76542f4f.js.map +1 -0
  552. package/dist/core/p-7be3abb5.entry.js.map +1 -1
  553. package/dist/core/p-80e30702.js +2 -0
  554. package/dist/core/p-80e30702.js.map +1 -0
  555. package/dist/core/p-8965f84a.entry.js +2 -0
  556. package/dist/core/p-8965f84a.entry.js.map +1 -0
  557. package/dist/core/p-8a8d846c.entry.js +2 -0
  558. package/dist/core/{p-8e8340b0.entry.js.map → p-8a8d846c.entry.js.map} +1 -1
  559. package/dist/core/p-9144dde1.js +2 -0
  560. package/dist/core/p-9144dde1.js.map +1 -0
  561. package/dist/core/{p-90f818c0.entry.js → p-93facb4a.entry.js} +2 -2
  562. package/dist/core/p-93facb4a.entry.js.map +1 -0
  563. package/dist/core/p-9c844f4d.entry.js +2 -0
  564. package/dist/core/p-9c844f4d.entry.js.map +1 -0
  565. package/dist/core/p-9cc6ed83.entry.js +2 -0
  566. package/dist/core/p-9cc6ed83.entry.js.map +1 -0
  567. package/dist/core/p-9dd1bbdd.entry.js.map +1 -1
  568. package/dist/core/p-9e6a41cc.entry.js +2 -0
  569. package/dist/core/p-9e6a41cc.entry.js.map +1 -0
  570. package/dist/core/{p-64d3cf79.entry.js → p-a5e34e93.entry.js} +2 -2
  571. package/dist/core/p-a6c8d474.entry.js.map +1 -1
  572. package/dist/core/p-ad0cc981.entry.js +2 -0
  573. package/dist/core/p-ad0cc981.entry.js.map +1 -0
  574. package/dist/core/p-ae3e2d60.entry.js +2 -0
  575. package/dist/core/p-ae3e2d60.entry.js.map +1 -0
  576. package/dist/core/p-b48a3112.entry.js +2 -0
  577. package/dist/core/p-b48a3112.entry.js.map +1 -0
  578. package/dist/core/{p-59581b1b.entry.js → p-c0d3d3e0.entry.js} +2 -2
  579. package/dist/core/{p-59581b1b.entry.js.map → p-c0d3d3e0.entry.js.map} +1 -1
  580. package/dist/core/{p-2b4acb01.js → p-c20102ff.js} +2 -2
  581. package/dist/core/p-c20102ff.js.map +1 -0
  582. package/dist/core/p-cf6576fd.entry.js +2 -0
  583. package/dist/core/p-cf6576fd.entry.js.map +1 -0
  584. package/dist/core/p-e52a042f.entry.js.map +1 -1
  585. package/dist/core/p-e7dd2002.entry.js +2 -0
  586. package/dist/core/p-e7dd2002.entry.js.map +1 -0
  587. package/dist/core/p-eb1214ab.entry.js +2 -0
  588. package/dist/core/p-eb1214ab.entry.js.map +1 -0
  589. package/dist/core/p-ec617f18.entry.js +2 -0
  590. package/dist/core/p-ec617f18.entry.js.map +1 -0
  591. package/dist/core/p-ef79904e.js +2 -0
  592. package/dist/core/p-ef79904e.js.map +1 -0
  593. package/dist/core/p-f1fe9358.entry.js +2 -0
  594. package/dist/core/p-f1fe9358.entry.js.map +1 -0
  595. package/dist/core/p-f2dc8ce3.entry.js.map +1 -1
  596. package/dist/core/p-f531f5c4.entry.js +2 -0
  597. package/dist/core/p-f531f5c4.entry.js.map +1 -0
  598. package/dist/core/p-f5ee7634.entry.js +2 -0
  599. package/dist/core/p-f5ee7634.entry.js.map +1 -0
  600. package/dist/core/p-f5ffcb3d.entry.js +2 -0
  601. package/dist/core/p-f5ffcb3d.entry.js.map +1 -0
  602. package/dist/core/p-f687452c.js +2 -0
  603. package/dist/core/p-f687452c.js.map +1 -0
  604. package/dist/core/{p-08524615.entry.js → p-fc1581f9.entry.js} +2 -2
  605. package/dist/core/{p-08524615.entry.js.map → p-fc1581f9.entry.js.map} +1 -1
  606. package/dist/core/{p-fd62c386.entry.js → p-fc91591d.entry.js} +2 -2
  607. package/dist/core/{p-fd62c386.entry.js.map → p-fc91591d.entry.js.map} +1 -1
  608. package/dist/core/p-fc9d66ae.entry.js +2 -0
  609. package/dist/core/{p-9baa1a0e.entry.js.map → p-fc9d66ae.entry.js.map} +1 -1
  610. package/dist/core/{p-99cc3dba.js → p-ff7365ae.js} +2 -2
  611. package/dist/core/p-ff7365ae.js.map +1 -0
  612. package/dist/core/p-ffb7495c.js +2 -0
  613. package/dist/core/p-ffb7495c.js.map +1 -0
  614. package/dist/custom-elements/index.d.ts +4 -10
  615. package/dist/custom-elements/index.js +1 -1
  616. package/dist/custom-elements/index.js.map +1 -1
  617. package/dist/esm/constants-136d4cd3.js +16 -0
  618. package/dist/esm/constants-136d4cd3.js.map +1 -0
  619. package/dist/esm/{constants-4d4cc5e1.js → constants-14a7ba8e.js} +7 -5
  620. package/dist/esm/constants-14a7ba8e.js.map +1 -0
  621. package/dist/esm/constants-1a2146b2.js +32 -0
  622. package/dist/esm/constants-1a2146b2.js.map +1 -0
  623. package/dist/esm/constants-24dad929.js +29 -0
  624. package/dist/esm/constants-24dad929.js.map +1 -0
  625. package/dist/esm/{constants-2cd89f93.js → constants-2b14bb01.js} +1 -3
  626. package/dist/esm/constants-2b14bb01.js.map +1 -0
  627. package/dist/esm/constants-2e8258cf.js +15 -0
  628. package/dist/esm/constants-2e8258cf.js.map +1 -0
  629. package/dist/esm/constants-3786b01b.js +22 -0
  630. package/dist/esm/constants-3786b01b.js.map +1 -0
  631. package/dist/esm/constants-3df712e2.js +13 -0
  632. package/dist/esm/constants-3df712e2.js.map +1 -0
  633. package/dist/esm/{constants-ec176a77.js → constants-78474786.js} +7 -4
  634. package/dist/esm/constants-78474786.js.map +1 -0
  635. package/dist/esm/constants-bf5a583f.js +24 -0
  636. package/dist/esm/constants-bf5a583f.js.map +1 -0
  637. package/dist/esm/constants-d550c816.js +22 -0
  638. package/dist/esm/constants-d550c816.js.map +1 -0
  639. package/dist/esm/constants-f7b618c2.js +23 -0
  640. package/dist/esm/constants-f7b618c2.js.map +1 -0
  641. package/dist/esm/core.js +1 -1
  642. package/dist/esm/{form-121eab06.js → form-95b9a91b.js} +36 -9
  643. package/dist/esm/form-95b9a91b.js.map +1 -0
  644. package/dist/esm/gov-accordion-item.entry.js +8 -8
  645. package/dist/esm/gov-accordion-item.entry.js.map +1 -1
  646. package/dist/esm/gov-accordion.entry.js +10 -10
  647. package/dist/esm/gov-accordion.entry.js.map +1 -1
  648. package/dist/esm/gov-alert.entry.js +6 -4
  649. package/dist/esm/gov-alert.entry.js.map +1 -1
  650. package/dist/esm/gov-app.entry.js +165 -45
  651. package/dist/esm/gov-app.entry.js.map +1 -1
  652. package/dist/esm/gov-attachments_3.entry.js +9 -9
  653. package/dist/esm/gov-attachments_3.entry.js.map +1 -1
  654. package/dist/esm/gov-backdrop.entry.js +4 -4
  655. package/dist/esm/gov-backdrop.entry.js.map +1 -1
  656. package/dist/esm/gov-badge.entry.js +11 -10
  657. package/dist/esm/gov-badge.entry.js.map +1 -1
  658. package/dist/esm/gov-breadcrumbs.entry.js +4 -5
  659. package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
  660. package/dist/esm/gov-button.entry.js +12 -23
  661. package/dist/esm/gov-button.entry.js.map +1 -1
  662. package/dist/esm/gov-card.entry.js +3 -3
  663. package/dist/esm/gov-card.entry.js.map +1 -1
  664. package/dist/esm/gov-container.entry.js.map +1 -1
  665. package/dist/esm/gov-cookiebar.entry.js.map +1 -1
  666. package/dist/esm/gov-empty.entry.js.map +1 -1
  667. package/dist/esm/gov-error-code.entry.js.map +1 -1
  668. package/dist/esm/gov-form-autocomplete.entry.js +8 -8
  669. package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
  670. package/dist/esm/gov-form-checkbox.entry.js +13 -22
  671. package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
  672. package/dist/esm/gov-form-control.entry.js +30 -29
  673. package/dist/esm/gov-form-control.entry.js.map +1 -1
  674. package/dist/esm/gov-form-file.entry.js +8 -8
  675. package/dist/esm/gov-form-file.entry.js.map +1 -1
  676. package/dist/esm/gov-form-input.entry.js +13 -19
  677. package/dist/esm/gov-form-input.entry.js.map +1 -1
  678. package/dist/esm/gov-form-multi-select.entry.js +10 -10
  679. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  680. package/dist/esm/gov-form-radio.entry.js +12 -12
  681. package/dist/esm/gov-form-radio.entry.js.map +1 -1
  682. package/dist/esm/gov-form-search.entry.js +0 -2
  683. package/dist/esm/gov-form-search.entry.js.map +1 -1
  684. package/dist/esm/gov-form-select.entry.js +13 -13
  685. package/dist/esm/gov-form-select.entry.js.map +1 -1
  686. package/dist/esm/gov-form-switch.entry.js +12 -12
  687. package/dist/esm/gov-form-switch.entry.js.map +1 -1
  688. package/dist/esm/gov-grid-item.entry.js +2 -3
  689. package/dist/esm/gov-grid-item.entry.js.map +1 -1
  690. package/dist/esm/gov-grid.entry.js +1 -2
  691. package/dist/esm/gov-grid.entry.js.map +1 -1
  692. package/dist/esm/gov-icon.entry.js +10 -5
  693. package/dist/esm/gov-icon.entry.js.map +1 -1
  694. package/dist/esm/gov-layout-column.entry.js +21 -0
  695. package/dist/esm/gov-layout-column.entry.js.map +1 -0
  696. package/dist/esm/gov-layout.entry.js +12 -3
  697. package/dist/esm/gov-layout.entry.js.map +1 -1
  698. package/dist/esm/gov-loading.entry.js +1 -1
  699. package/dist/esm/gov-loading.entry.js.map +1 -1
  700. package/dist/esm/gov-message.entry.js +4 -2
  701. package/dist/esm/gov-message.entry.js.map +1 -1
  702. package/dist/esm/gov-modal.entry.js +3 -3
  703. package/dist/esm/gov-modal.entry.js.map +1 -1
  704. package/dist/esm/gov-nav.entry.js +3 -3
  705. package/dist/esm/gov-pagination.entry.js +27 -22
  706. package/dist/esm/gov-pagination.entry.js.map +1 -1
  707. package/dist/esm/gov-prompt.entry.js +3 -3
  708. package/dist/esm/gov-prompt.entry.js.map +1 -1
  709. package/dist/esm/gov-side-nav-item.entry.js +1 -1
  710. package/dist/esm/gov-side-nav-item.entry.js.map +1 -1
  711. package/dist/esm/gov-side-nav.entry.js +3 -3
  712. package/dist/esm/gov-side-nav.entry.js.map +1 -1
  713. package/dist/esm/gov-spacer.entry.js +11 -13
  714. package/dist/esm/gov-spacer.entry.js.map +1 -1
  715. package/dist/esm/gov-statsbar-item.entry.js +4 -2
  716. package/dist/esm/gov-statsbar-item.entry.js.map +1 -1
  717. package/dist/esm/gov-statsbar.entry.js +7 -6
  718. package/dist/esm/gov-statsbar.entry.js.map +1 -1
  719. package/dist/esm/gov-stepper-item.entry.js +9 -9
  720. package/dist/esm/gov-stepper-item.entry.js.map +1 -1
  721. package/dist/esm/gov-stepper.entry.js +9 -8
  722. package/dist/esm/gov-stepper.entry.js.map +1 -1
  723. package/dist/esm/gov-tabs-item.entry.js +3 -3
  724. package/dist/esm/gov-tabs-item.entry.js.map +1 -1
  725. package/dist/esm/gov-tabs.entry.js +11 -11
  726. package/dist/esm/gov-tabs.entry.js.map +1 -1
  727. package/dist/esm/gov-tile.entry.js.map +1 -1
  728. package/dist/esm/gov-tiles.entry.js +1 -1
  729. package/dist/esm/gov-tiles.entry.js.map +1 -1
  730. package/dist/esm/gov-toast.entry.js +21 -18
  731. package/dist/esm/gov-toast.entry.js.map +1 -1
  732. package/dist/esm/gov-tooltip-content.entry.js +3 -2
  733. package/dist/esm/gov-tooltip-content.entry.js.map +1 -1
  734. package/dist/esm/gov-tooltip.entry.js +15 -14
  735. package/dist/esm/gov-tooltip.entry.js.map +1 -1
  736. package/dist/esm/gov-wizzard-item.entry.js +10 -11
  737. package/dist/esm/gov-wizzard-item.entry.js.map +1 -1
  738. package/dist/esm/gov-wizzard.entry.js +9 -9
  739. package/dist/esm/gov-wizzard.entry.js.map +1 -1
  740. package/dist/esm/index-00e9a0d5.js +2 -6
  741. package/dist/esm/loader.js +1 -1
  742. package/dist/esm/{props-cb992af5.js → props-789f7529.js} +4 -4
  743. package/dist/esm/props-789f7529.js.map +1 -0
  744. package/dist/esm/template-10332292.js.map +1 -1
  745. package/dist/esm/utils-c057a3fa.js +35 -0
  746. package/dist/esm/utils-c057a3fa.js.map +1 -0
  747. package/dist/esm/{variants-b5641e3d.js → variants-2b936d58.js} +2 -2
  748. package/dist/esm/variants-2b936d58.js.map +1 -0
  749. package/dist/esm/{wcag-af732bfe.js → wcag-3792d4bb.js} +2 -2
  750. package/dist/esm/wcag-3792d4bb.js.map +1 -0
  751. package/dist/esm/{win-cb090c11.js → win-9c8460bb.js} +3 -3
  752. package/dist/esm/win-9c8460bb.js.map +1 -0
  753. package/dist/hydrate/index.js +532 -390
  754. package/dist/types/components/gov-accordion/constants.d.ts +7 -6
  755. package/dist/types/components/gov-accordion/gov-accordion-item.d.ts +3 -3
  756. package/dist/types/components/gov-accordion/gov-accordion.d.ts +3 -3
  757. package/dist/types/components/gov-alert/constants.d.ts +4 -3
  758. package/dist/types/components/gov-app/gov-app.d.ts +1 -1
  759. package/dist/types/components/gov-attachments/gov-attachments-item.d.ts +1 -1
  760. package/dist/types/components/gov-backdrop/gov-backdrop.d.ts +1 -1
  761. package/dist/types/components/gov-badge/constants.d.ts +4 -3
  762. package/dist/types/components/gov-badge/gov-badge.d.ts +4 -4
  763. package/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.ts +1 -1
  764. package/dist/types/components/gov-button/constants.d.ts +20 -10
  765. package/dist/types/components/gov-button/gov-button.d.ts +6 -8
  766. package/dist/types/components/gov-cookiebar/gov-cookiebar.d.ts +1 -1
  767. package/dist/types/components/gov-form/autocomplete/constants.d.ts +7 -6
  768. package/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +3 -3
  769. package/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.types.d.ts +3 -0
  770. package/dist/types/components/gov-form/checkbox/constants.d.ts +4 -3
  771. package/dist/types/components/gov-form/checkbox/gov-form-checkbox.d.ts +3 -4
  772. package/dist/types/components/gov-form/control/constants.d.ts +4 -3
  773. package/dist/types/components/gov-form/control/gov-form-control.d.ts +3 -3
  774. package/dist/types/components/gov-form/file/gov-form-file.d.ts +1 -1
  775. package/dist/types/components/gov-form/file/gov-form-file.types.d.ts +6 -0
  776. package/dist/types/components/gov-form/input/constants.d.ts +27 -10
  777. package/dist/types/components/gov-form/input/gov-form-input.d.ts +5 -5
  778. package/dist/types/components/gov-form/message/constants.d.ts +4 -3
  779. package/dist/types/components/gov-form/message/gov-form-message.d.ts +3 -3
  780. package/dist/types/components/gov-form/multiselect/constants.d.ts +7 -6
  781. package/dist/types/components/gov-form/multiselect/gov-form-multi-select.d.ts +4 -4
  782. package/dist/types/components/gov-form/radio/constants.d.ts +4 -3
  783. package/dist/types/components/gov-form/radio/gov-form-radio.d.ts +2 -2
  784. package/dist/types/components/gov-form/search/constants.d.ts +0 -6
  785. package/dist/types/components/gov-form/select/constants.d.ts +7 -6
  786. package/dist/types/components/gov-form/select/gov-form-select.d.ts +3 -3
  787. package/dist/types/components/gov-form/switch/constants.d.ts +4 -3
  788. package/dist/types/components/gov-form/switch/gov-form-switch.d.ts +2 -2
  789. package/dist/types/components/gov-grid/constants.d.ts +0 -3
  790. package/dist/types/components/gov-icon/constants.d.ts +8 -2
  791. package/dist/types/components/gov-layout/constants.d.ts +14 -6
  792. package/dist/types/components/gov-layout/gov-layout-column.d.ts +6 -0
  793. package/dist/types/components/gov-layout/gov-layout.d.ts +14 -0
  794. package/dist/types/components/gov-message/constants.d.ts +4 -3
  795. package/dist/types/components/gov-message/gov-message.d.ts +2 -2
  796. package/dist/types/components/gov-pagination/constants.d.ts +12 -8
  797. package/dist/types/components/gov-pagination/gov-pagination.d.ts +6 -6
  798. package/dist/types/components/gov-spacer/constants.d.ts +11 -4
  799. package/dist/types/components/gov-spacer/gov-spacer.d.ts +2 -2
  800. package/dist/types/components/gov-statsbar/constants.d.ts +8 -4
  801. package/dist/types/components/gov-statsbar/gov-statsbar-item.d.ts +1 -1
  802. package/dist/types/components/gov-statsbar/gov-statsbar.d.ts +1 -1
  803. package/dist/types/components/gov-stepper/constants.d.ts +7 -6
  804. package/dist/types/components/gov-stepper/gov-stepper-item.d.ts +3 -3
  805. package/dist/types/components/gov-stepper/gov-stepper.d.ts +4 -4
  806. package/dist/types/components/gov-tabs/constants.d.ts +14 -8
  807. package/dist/types/components/gov-tabs/gov-tabs.d.ts +9 -5
  808. package/dist/types/components/gov-tabs/gov-tabs.types.d.ts +8 -0
  809. package/dist/types/components/gov-toast/constants.d.ts +6 -5
  810. package/dist/types/components/gov-toast/gov-toast.d.ts +7 -6
  811. package/dist/types/components/gov-tooltip/constants.d.ts +9 -9
  812. package/dist/types/components/gov-tooltip/gov-tooltip.d.ts +4 -4
  813. package/dist/types/components/gov-wizzard/constants.d.ts +7 -6
  814. package/dist/types/components/gov-wizzard/gov-wizzard-item.d.ts +3 -3
  815. package/dist/types/components/gov-wizzard/gov-wizzard.d.ts +2 -2
  816. package/dist/types/components.d.ts +157 -153
  817. package/dist/types/helpers/Dom/form.d.ts +2 -2
  818. package/dist/types/helpers/Dom/form.types.d.ts +9 -0
  819. package/dist/types/helpers/Dom/template.d.ts +1 -1
  820. package/dist/types/helpers/Dom/template.types.d.ts +12 -0
  821. package/dist/types/helpers/Validate/props.d.ts +1 -1
  822. package/dist/types/types/interfaces.d.ts +1 -0
  823. package/dist/types/utils/utils.d.ts +1 -0
  824. package/package.json +1 -1
  825. package/dist/cjs/constants-0c6897bc.js.map +0 -1
  826. package/dist/cjs/constants-24f26d54.js +0 -15
  827. package/dist/cjs/constants-24f26d54.js.map +0 -1
  828. package/dist/cjs/constants-404ee283.js +0 -21
  829. package/dist/cjs/constants-404ee283.js.map +0 -1
  830. package/dist/cjs/constants-477ca85a.js.map +0 -1
  831. package/dist/cjs/constants-5c8f444a.js.map +0 -1
  832. package/dist/cjs/constants-5ca7e728.js +0 -18
  833. package/dist/cjs/constants-5ca7e728.js.map +0 -1
  834. package/dist/cjs/constants-8c9eeb15.js +0 -20
  835. package/dist/cjs/constants-8c9eeb15.js.map +0 -1
  836. package/dist/cjs/constants-a44c32bc.js.map +0 -1
  837. package/dist/cjs/constants-a92bbccb.js +0 -17
  838. package/dist/cjs/constants-a92bbccb.js.map +0 -1
  839. package/dist/cjs/constants-b39578d9.js +0 -29
  840. package/dist/cjs/constants-b39578d9.js.map +0 -1
  841. package/dist/cjs/constants-b3c2277b.js +0 -23
  842. package/dist/cjs/constants-b3c2277b.js.map +0 -1
  843. package/dist/cjs/constants-b8ec7b03.js +0 -32
  844. package/dist/cjs/constants-b8ec7b03.js.map +0 -1
  845. package/dist/cjs/form-d9f0f50c.js.map +0 -1
  846. package/dist/cjs/gov-layout-aside.cjs.entry.js +0 -26
  847. package/dist/cjs/gov-layout-aside.cjs.entry.js.map +0 -1
  848. package/dist/cjs/gov-layout-content.cjs.entry.js +0 -26
  849. package/dist/cjs/gov-layout-content.cjs.entry.js.map +0 -1
  850. package/dist/cjs/props-cc21d3d7.js.map +0 -1
  851. package/dist/cjs/utils-4ae73637.js.map +0 -1
  852. package/dist/cjs/variants-bacf037a.js.map +0 -1
  853. package/dist/cjs/wcag-eca97102.js.map +0 -1
  854. package/dist/cjs/win-ac5c1806.js.map +0 -1
  855. package/dist/collection/components/gov-layout/gov-layout-aside.js +0 -47
  856. package/dist/collection/components/gov-layout/gov-layout-aside.js.map +0 -1
  857. package/dist/collection/components/gov-layout/gov-layout-content.css +0 -227
  858. package/dist/collection/components/gov-layout/gov-layout-content.js +0 -47
  859. package/dist/collection/components/gov-layout/gov-layout-content.js.map +0 -1
  860. package/dist/collection/core/constants/breakpoint.js +0 -9
  861. package/dist/collection/core/constants/breakpoint.js.map +0 -1
  862. package/dist/components/gov-layout-aside.js +0 -41
  863. package/dist/components/gov-layout-aside.js.map +0 -1
  864. package/dist/components/gov-layout-content.d.ts +0 -11
  865. package/dist/components/gov-layout-content.js +0 -41
  866. package/dist/components/gov-layout-content.js.map +0 -1
  867. package/dist/core/p-097332b9.entry.js +0 -2
  868. package/dist/core/p-097332b9.entry.js.map +0 -1
  869. package/dist/core/p-09b38102.entry.js +0 -2
  870. package/dist/core/p-09b38102.entry.js.map +0 -1
  871. package/dist/core/p-1525ef03.entry.js +0 -2
  872. package/dist/core/p-1525ef03.entry.js.map +0 -1
  873. package/dist/core/p-1ffe4cac.entry.js +0 -2
  874. package/dist/core/p-1ffe4cac.entry.js.map +0 -1
  875. package/dist/core/p-22c3946b.entry.js +0 -2
  876. package/dist/core/p-22c3946b.entry.js.map +0 -1
  877. package/dist/core/p-28f08f8b.entry.js +0 -2
  878. package/dist/core/p-28f08f8b.entry.js.map +0 -1
  879. package/dist/core/p-2b19bea6.entry.js +0 -2
  880. package/dist/core/p-2b19bea6.entry.js.map +0 -1
  881. package/dist/core/p-2b4acb01.js.map +0 -1
  882. package/dist/core/p-2c25aac5.entry.js.map +0 -1
  883. package/dist/core/p-2c9031ef.entry.js +0 -2
  884. package/dist/core/p-2c9031ef.entry.js.map +0 -1
  885. package/dist/core/p-3426a731.entry.js +0 -2
  886. package/dist/core/p-3426a731.entry.js.map +0 -1
  887. package/dist/core/p-3b8d7a9a.entry.js +0 -2
  888. package/dist/core/p-3b8d7a9a.entry.js.map +0 -1
  889. package/dist/core/p-44f22320.entry.js +0 -2
  890. package/dist/core/p-44f22320.entry.js.map +0 -1
  891. package/dist/core/p-468873ec.entry.js +0 -2
  892. package/dist/core/p-468873ec.entry.js.map +0 -1
  893. package/dist/core/p-48a7c794.entry.js +0 -2
  894. package/dist/core/p-48a7c794.entry.js.map +0 -1
  895. package/dist/core/p-4e21ca0f.entry.js +0 -2
  896. package/dist/core/p-4e21ca0f.entry.js.map +0 -1
  897. package/dist/core/p-58691740.js.map +0 -1
  898. package/dist/core/p-5f7e38b6.entry.js +0 -2
  899. package/dist/core/p-5f7e38b6.entry.js.map +0 -1
  900. package/dist/core/p-64445e87.js +0 -2
  901. package/dist/core/p-64445e87.js.map +0 -1
  902. package/dist/core/p-68d4837b.entry.js +0 -2
  903. package/dist/core/p-68d4837b.entry.js.map +0 -1
  904. package/dist/core/p-6ce1f525.js +0 -2
  905. package/dist/core/p-6ce1f525.js.map +0 -1
  906. package/dist/core/p-708963e6.js +0 -2
  907. package/dist/core/p-708963e6.js.map +0 -1
  908. package/dist/core/p-71134d97.js +0 -2
  909. package/dist/core/p-71134d97.js.map +0 -1
  910. package/dist/core/p-78a4be4b.entry.js +0 -2
  911. package/dist/core/p-78a4be4b.entry.js.map +0 -1
  912. package/dist/core/p-803629e9.entry.js +0 -2
  913. package/dist/core/p-803629e9.entry.js.map +0 -1
  914. package/dist/core/p-808cd4b7.entry.js +0 -2
  915. package/dist/core/p-808cd4b7.entry.js.map +0 -1
  916. package/dist/core/p-8e8340b0.entry.js +0 -2
  917. package/dist/core/p-8ebc3217.js +0 -2
  918. package/dist/core/p-8ebc3217.js.map +0 -1
  919. package/dist/core/p-8eece26f.entry.js +0 -2
  920. package/dist/core/p-8eece26f.entry.js.map +0 -1
  921. package/dist/core/p-90f818c0.entry.js.map +0 -1
  922. package/dist/core/p-951d9c21.js +0 -2
  923. package/dist/core/p-951d9c21.js.map +0 -1
  924. package/dist/core/p-9680b966.entry.js.map +0 -1
  925. package/dist/core/p-9711e4e5.entry.js +0 -2
  926. package/dist/core/p-9711e4e5.entry.js.map +0 -1
  927. package/dist/core/p-99cc3dba.js.map +0 -1
  928. package/dist/core/p-9baa1a0e.entry.js +0 -2
  929. package/dist/core/p-a2f9daba.js +0 -2
  930. package/dist/core/p-a2f9daba.js.map +0 -1
  931. package/dist/core/p-a32723d4.entry.js +0 -2
  932. package/dist/core/p-a32723d4.entry.js.map +0 -1
  933. package/dist/core/p-a5b02584.js +0 -2
  934. package/dist/core/p-a5b02584.js.map +0 -1
  935. package/dist/core/p-b4581984.js +0 -2
  936. package/dist/core/p-b4581984.js.map +0 -1
  937. package/dist/core/p-b5935207.entry.js +0 -2
  938. package/dist/core/p-b5935207.entry.js.map +0 -1
  939. package/dist/core/p-ba500f74.entry.js +0 -2
  940. package/dist/core/p-ba500f74.entry.js.map +0 -1
  941. package/dist/core/p-c9e7a558.entry.js +0 -2
  942. package/dist/core/p-c9e7a558.entry.js.map +0 -1
  943. package/dist/core/p-cbe6523f.entry.js +0 -2
  944. package/dist/core/p-cbe6523f.entry.js.map +0 -1
  945. package/dist/core/p-cd4f034f.js +0 -2
  946. package/dist/core/p-cd4f034f.js.map +0 -1
  947. package/dist/core/p-d4aaff74.js +0 -2
  948. package/dist/core/p-d4aaff74.js.map +0 -1
  949. package/dist/core/p-d65f71e1.js +0 -2
  950. package/dist/core/p-d65f71e1.js.map +0 -1
  951. package/dist/core/p-d9ffb84e.entry.js +0 -2
  952. package/dist/core/p-dc87f017.entry.js +0 -2
  953. package/dist/core/p-dc87f017.entry.js.map +0 -1
  954. package/dist/core/p-eadaa1d1.entry.js +0 -2
  955. package/dist/core/p-eadaa1d1.entry.js.map +0 -1
  956. package/dist/core/p-ef3e7866.js +0 -2
  957. package/dist/core/p-ef3e7866.js.map +0 -1
  958. package/dist/core/p-f1226ef1.entry.js +0 -2
  959. package/dist/core/p-f1226ef1.entry.js.map +0 -1
  960. package/dist/core/p-f4030908.entry.js +0 -2
  961. package/dist/core/p-f4030908.entry.js.map +0 -1
  962. package/dist/core/p-f58b9eec.js.map +0 -1
  963. package/dist/core/p-f82535b7.js +0 -2
  964. package/dist/core/p-f82535b7.js.map +0 -1
  965. package/dist/core/p-fc3c7246.entry.js +0 -2
  966. package/dist/core/p-fc3c7246.entry.js.map +0 -1
  967. package/dist/esm/constants-129909d1.js +0 -14
  968. package/dist/esm/constants-129909d1.js.map +0 -1
  969. package/dist/esm/constants-1f1d1d3e.js +0 -16
  970. package/dist/esm/constants-1f1d1d3e.js.map +0 -1
  971. package/dist/esm/constants-2cd89f93.js.map +0 -1
  972. package/dist/esm/constants-3b157470.js +0 -23
  973. package/dist/esm/constants-3b157470.js.map +0 -1
  974. package/dist/esm/constants-3de0521d.js +0 -27
  975. package/dist/esm/constants-3de0521d.js.map +0 -1
  976. package/dist/esm/constants-4331e6d9.js +0 -12
  977. package/dist/esm/constants-4331e6d9.js.map +0 -1
  978. package/dist/esm/constants-4cdfde31.js +0 -14
  979. package/dist/esm/constants-4cdfde31.js.map +0 -1
  980. package/dist/esm/constants-4d4cc5e1.js.map +0 -1
  981. package/dist/esm/constants-8f0bcad2.js +0 -21
  982. package/dist/esm/constants-8f0bcad2.js.map +0 -1
  983. package/dist/esm/constants-b49812cd.js +0 -16
  984. package/dist/esm/constants-b49812cd.js.map +0 -1
  985. package/dist/esm/constants-c8f57790.js +0 -19
  986. package/dist/esm/constants-c8f57790.js.map +0 -1
  987. package/dist/esm/constants-ec176a77.js.map +0 -1
  988. package/dist/esm/form-121eab06.js.map +0 -1
  989. package/dist/esm/gov-layout-aside.entry.js +0 -22
  990. package/dist/esm/gov-layout-aside.entry.js.map +0 -1
  991. package/dist/esm/gov-layout-content.entry.js +0 -22
  992. package/dist/esm/gov-layout-content.entry.js.map +0 -1
  993. package/dist/esm/props-cb992af5.js.map +0 -1
  994. package/dist/esm/utils-3a968bb9.js.map +0 -1
  995. package/dist/esm/variants-b5641e3d.js.map +0 -1
  996. package/dist/esm/wcag-af732bfe.js.map +0 -1
  997. package/dist/esm/win-cb090c11.js.map +0 -1
  998. package/dist/types/components/gov-layout/gov-layout-aside.d.ts +0 -10
  999. package/dist/types/components/gov-layout/gov-layout-content.d.ts +0 -10
  1000. package/dist/types/core/constants/breakpoint.d.ts +0 -8
  1001. /package/dist/core/{p-64d3cf79.entry.js.map → p-a5e34e93.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"gov-form-multi-select.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,onYAAonY;;MCgBroYA,oBAAkB;EAO9B;;;;;;;;mBAiBwC,SAAS;gBAId,KAAK,CAAC,EAAE;;oBASN,KAAK;;;;;;;;2BAoCW,EAAE;IAjEtD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAA;IACrC,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAA;GACtC;EAkED,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAA;GAC3D;EAGD,YAAY,CAAC,QAAgB;IAC5B,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAA;GACxD;EAGD,UAAU,CAAC,QAAkC;IAC5C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;GAC7B;EAED,iBAAiB;IAChB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAClC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC5B;EAEO,mBAAmB;IAC1B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;OAC1D,MAAM,CAAC,CAAC,MAAyB,KAAK,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovFormMultiSelect"],"sources":["../../../packages/core/src/components/gov-form/multiselect/gov-form-multi-select.scss?tag=gov-form-multi-select","../../../packages/core/src/components/gov-form/multiselect/gov-form-multi-select.tsx"],"sourcesContent":["/*\n * Multiselect\n */\n\n@import \"../select/gov-form-select-core.scss\";\n$class: \".gov-form-multi-select\";\n\n#{$class} {\n\t@extend %form-select-core;\n\tflex-wrap: wrap;\n\t&__wrap {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(8);\n\t\twidth: 100%;\n\t}\n\t&__list {\n\t\t@extend %reset-ul;\n\t\t@include typography($font-size-xs);\n\t\tdisplay: flex;\n\t\tgap: rem-calc(8);\n\t\tflex-wrap: wrap;\n\t}\n\t&__list > &__item {\n\t\t@extend %reset-ul-li;\n\t\tposition: relative;\n\t\tdisplay: flex;\n\t\tflex: 0 0 auto;\n\t\talign-items: center;\n\t\tpadding: rem-calc(0 0 0 8);\n\t\tbackground: $form-multiselect-bg;\n\t\ttransition: $t linear background-color;\n\t}\n}\n","import { Component, Element, h, State, Prop, Event, EventEmitter, Watch, Host, Method } from '@stencil/core'\nimport { toBoolAttrIfDefined } from '../../../helpers/Dom/template'\nimport { SizesType, Variants, VariantType, FormMultiSelectClass } from './constants'\nimport { Sizes } from '../../../core/constants/sizes'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { validateWcagLabelFor, validateWcagRef } from '../../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../../helpers/Dom/win'\nimport { createID, removeDiacritics } from '../../../utils/string.utils'\nimport { delay } from '../../../utils/utils'\nimport { Nullable } from \"../../../types/interfaces\";\nimport { GovFormMultiSelectItem } from \"./interfaces\";\n\n@Component({\n\ttag: 'gov-form-multi-select',\n\tstyleUrl: 'gov-form-multi-select.scss',\n})\nexport class GovFormMultiSelect {\n\tprivate selectRef?: HTMLSelectElement\n\tprivate autocompleteRef?: HTMLGovFormAutocompleteElement\n\n\tprivate readonly selectId: string\n\tprivate readonly listId: string\n\n\tconstructor() {\n\t\tthis.selectId = createID('GovSelect')\n\t\tthis.listId = createID('GovMultiList')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Custom select placeholder.\n\t */\n\t@Prop({ attribute: 'placeholder' }) readonly placeholder: string\n\t/**\n\t * Style variation of the form select.\n\t */\n\t@Prop() readonly variant: VariantType = undefined\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size: SizesType = Sizes._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 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<GovFormMultiSelectItem[]>\n\t@State() focused: boolean\n\t@State() value: string\n\t@State() selectedOptions: GovFormMultiSelectItem[] = []\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(Variants, newValue, FormMultiSelectClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, FormMultiSelectClass.root)\n\t}\n\n\t@Watch('selectedOptions')\n\temitChange(newValue: GovFormMultiSelectItem[]) {\n\t\tthis.govChange.emit(newValue)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t}\n\n\tprivate getAvailableOptions(): GovFormMultiSelectItem[] {\n\t\treturn Array.from(this.selectRef.querySelectorAll('option'))\n\t\t\t.filter((option: HTMLOptionElement) => !(option.disabled || option.selected))\n\t\t\t.map((option: HTMLOptionElement) => ({ name: option.textContent, value: option.value }))\n\t}\n\n\tprivate initAutocomplete() {\n\t\tthis.autocompleteRef.addEventListener('gov-select', this.onSelectHandler.bind(this))\n\t\tthis.autocompleteRef.addEventListener('gov-input', this.onInputHandler.bind(this))\n\t\tthis.autocompleteRef.addEventListener('gov-focus', this.onFocusHandler.bind(this))\n\t\tthis.autocompleteRef.addEventListener('gov-blur', this.onBlurHandler.bind(this))\n\t\tthis.autocompleteRef\n\t\t\t.setSearchCallback(value => {\n\t\t\t\treturn new Promise(resolve => {\n\t\t\t\t\tconst data = this.getAvailableOptions()\n\t\t\t\t\tif (String(value).length === 0) {\n\t\t\t\t\t\treturn resolve(data)\n\t\t\t\t\t}\n\t\t\t\t\tresolve(\n\t\t\t\t\t\tdata.filter(({ name }) => {\n\t\t\t\t\t\t\tif (!name) return false\n\t\t\t\t\t\t\treturn removeDiacritics(name).toLowerCase().indexOf(removeDiacritics(value).toLowerCase()) > -1\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t})\n\t\t\t})\n\t\t\t.then()\n\t}\n\n\tprivate getOptionIndex(value: GovFormMultiSelectItem): number {\n\t\treturn this.selectedOptions.findIndex(option => option.value === value.value && option.name === value.name)\n\t}\n\n\tprivate getOptionElement(value: GovFormMultiSelectItem): Nullable<HTMLOptionElement> {\n\t\treturn this.selectRef.querySelector('option[value=\"' + value.value + '\"]') as HTMLOptionElement\n\t}\n\n\tprivate selectOption(newOption: GovFormMultiSelectItem) {\n\t\tconst index = this.getOptionIndex(newOption)\n\t\tif (index === -1) {\n\t\t\tthis.selectedOptions = [...this.selectedOptions, newOption]\n\t\t\tconst option = this.getOptionElement(newOption)\n\t\t\tif (option) {\n\t\t\t\toption.selected = true\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate removeOption(removeOption: GovFormMultiSelectItem) {\n\t\tconst index = this.getOptionIndex(removeOption)\n\t\tif (index !== -1) {\n\t\t\tthis.selectedOptions.splice(index, 1)\n\t\t\tthis.selectedOptions = [...this.selectedOptions]\n\t\t\tconst option = this.getOptionElement(removeOption)\n\t\t\tif (option) {\n\t\t\t\toption.selected = false\n\t\t\t}\n\t\t}\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.initAutocomplete()\n\t\tawait delay(0)\n\t\tthis.selectRef.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.selected) {\n\t\t\t\tthis.selectOption({\n\t\t\t\t\tname: option.textContent,\n\t\t\t\t\tvalue: option.value,\n\t\t\t\t})\n\t\t\t}\n\t\t})\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={FormMultiSelectClass.root} size={this.size} variant={this.variant}>\n\t\t\t\t<div class={FormMultiSelectClass.wrap}>\n\t\t\t\t\t<div class=\"element\">\n\t\t\t\t\t\t<gov-form-autocomplete\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tidentifier={this.identifier || this.selectId}\n\t\t\t\t\t\t\trequired={false}\n\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\tinvalid={this.invalid}\n\t\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\t\tref={el => (this.autocompleteRef = el as HTMLGovFormAutocompleteElement)}\n\t\t\t\t\t\t\tminlength={0}\n\t\t\t\t\t\t\twcagDescribedBy={this.wcagDescribedBy}\n\t\t\t\t\t\t\twcagLabelledBy={this.wcagLabelledBy}\n\t\t\t\t\t\t\twcagOwns={this.listId}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<gov-icon slot=\"right-icon\" class=\"icon-arrow\" name=\"arrow-down\"></gov-icon>\n\t\t\t\t\t\t<select\n\t\t\t\t\t\t\thidden\n\t\t\t\t\t\t\taria-hidden={true}\n\t\t\t\t\t\t\tmultiple\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<ul role=\"listbox\" id={this.listId} class={FormMultiSelectClass.list}>\n\t\t\t\t\t{this.selectedOptions.map(option => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li class={FormMultiSelectClass.item} role=\"option\">\n\t\t\t\t\t\t\t\t{option.name}\n\t\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\t\twcagLabel={'Odebrat vybranou položku ' + option.name}\n\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onTagRemove(option)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<gov-icon name=\"cross\"></gov-icon>\n\t\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t)\n\t\t\t\t\t})}\n\t\t\t\t</ul>\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 onInputHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t}\n\n\tprivate onSelectHandler(e: CustomEvent) {\n\t\tconst value = e.detail as GovFormMultiSelectItem\n\t\tthis.selectOption(value)\n\t\tthis.value = ''\n\t\tthis.autocompleteRef.clearValue()\n\t\tthis.autocompleteRef.focus()\n\t}\n\n\tprivate onTagRemove(removeOption: GovFormMultiSelectItem) {\n\t\tthis.removeOption(removeOption)\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.wcagDescribedBy, 'wcag-described-by', FormMultiSelectClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, 'wcag-labelled-by', FormMultiSelectClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, 'wcag-owns', FormMultiSelectClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.selectId, this.wcagLabelledBy, FormMultiSelectClass.root)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-form-multi-select.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,onYAAonY;;MCeroYA,oBAAkB;EAO9B;;;;;;;;;gBAqBmD,GAAG;;oBASjB,KAAK;;;;;;;;2BAoCW,EAAE;IAjEtD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAA;IACrC,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAA;GACtC;EAkED,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,uBAAuB,EAAE,QAAQ,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAA;GAC1E;EAGD,YAAY,CAAC,QAAgB;IAC5B,YAAY,CAAC,oBAAoB,EAAE,QAAQ,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAA;GACvE;EAGD,UAAU,CAAC,QAAkC;IAC5C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;GAC7B;EAED,iBAAiB;IAChB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAClC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC5B;EAEO,mBAAmB;IAC1B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;OAC1D,MAAM,CAAC,CAAC,MAAyB,KAAK,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovFormMultiSelect"],"sources":["../../../packages/core/src/components/gov-form/multiselect/gov-form-multi-select.scss?tag=gov-form-multi-select","../../../packages/core/src/components/gov-form/multiselect/gov-form-multi-select.tsx"],"sourcesContent":["/*\n * Multiselect\n */\n\n@import \"../select/gov-form-select-core.scss\";\n$class: \".gov-form-multi-select\";\n\n#{$class} {\n\t@extend %form-select-core;\n\tflex-wrap: wrap;\n\t&__wrap {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(8);\n\t\twidth: 100%;\n\t}\n\t&__list {\n\t\t@extend %reset-ul;\n\t\t@include typography($font-size-xs);\n\t\tdisplay: flex;\n\t\tgap: rem-calc(8);\n\t\tflex-wrap: wrap;\n\t}\n\t&__list > &__item {\n\t\t@extend %reset-ul-li;\n\t\tposition: relative;\n\t\tdisplay: flex;\n\t\tflex: 0 0 auto;\n\t\talign-items: center;\n\t\tpadding: rem-calc(0 0 0 8);\n\t\tbackground: $form-multiselect-bg;\n\t\ttransition: $t linear background-color;\n\t}\n}\n","import { Component, Element, h, State, Prop, Event, EventEmitter, Watch, Host, Method } from '@stencil/core'\nimport { toBoolAttrIfDefined } from '../../../helpers/Dom/template'\nimport { FormMultiselectSizesType, FormMultiselectVariants, FormMultiselectVariantType, FormMultiSelectClass, FormMultiselectSizes } from './constants'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { validateWcagLabelFor, validateWcagRef } from '../../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../../helpers/Dom/win'\nimport { createID, removeDiacritics } from '../../../utils/string.utils'\nimport { delay } from '../../../utils/utils'\nimport { Nullable } from '../../../types/interfaces'\nimport { GovFormMultiSelectItem } from './interfaces'\n\n@Component({\n\ttag: 'gov-form-multi-select',\n\tstyleUrl: 'gov-form-multi-select.scss',\n})\nexport class GovFormMultiSelect {\n\tprivate selectRef?: HTMLSelectElement\n\tprivate autocompleteRef?: HTMLGovFormAutocompleteElement\n\n\tprivate readonly selectId: string\n\tprivate readonly listId: string\n\n\tconstructor() {\n\t\tthis.selectId = createID('GovSelect')\n\t\tthis.listId = createID('GovMultiList')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Custom select placeholder.\n\t */\n\t@Prop({ attribute: 'placeholder' }) readonly placeholder: string\n\t/**\n\t * Style variation of the form select.\n\t */\n\t@Prop() readonly variant?: FormMultiselectVariantType\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormMultiselectSizesType = '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 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<GovFormMultiSelectItem[]>\n\t@State() focused: boolean\n\t@State() value: string\n\t@State() selectedOptions: GovFormMultiSelectItem[] = []\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormMultiselectVariants, newValue, FormMultiSelectClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormMultiselectSizes, newValue, FormMultiSelectClass.root)\n\t}\n\n\t@Watch('selectedOptions')\n\temitChange(newValue: GovFormMultiSelectItem[]) {\n\t\tthis.govChange.emit(newValue)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t}\n\n\tprivate getAvailableOptions(): GovFormMultiSelectItem[] {\n\t\treturn Array.from(this.selectRef.querySelectorAll('option'))\n\t\t\t.filter((option: HTMLOptionElement) => !(option.disabled || option.selected))\n\t\t\t.map((option: HTMLOptionElement) => ({ name: option.textContent, value: option.value }))\n\t}\n\n\tprivate initAutocomplete() {\n\t\tthis.autocompleteRef.addEventListener('gov-select', this.onSelectHandler.bind(this))\n\t\tthis.autocompleteRef.addEventListener('gov-input', this.onInputHandler.bind(this))\n\t\tthis.autocompleteRef.addEventListener('gov-focus', this.onFocusHandler.bind(this))\n\t\tthis.autocompleteRef.addEventListener('gov-blur', this.onBlurHandler.bind(this))\n\t\tthis.autocompleteRef\n\t\t\t.setSearchCallback(value => {\n\t\t\t\treturn new Promise(resolve => {\n\t\t\t\t\tconst data = this.getAvailableOptions()\n\t\t\t\t\tif (String(value).length === 0) {\n\t\t\t\t\t\treturn resolve(data)\n\t\t\t\t\t}\n\t\t\t\t\tresolve(\n\t\t\t\t\t\tdata.filter(({ name }) => {\n\t\t\t\t\t\t\tif (!name) return false\n\t\t\t\t\t\t\treturn removeDiacritics(name).toLowerCase().indexOf(removeDiacritics(value).toLowerCase()) > -1\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t})\n\t\t\t})\n\t\t\t.then()\n\t}\n\n\tprivate getOptionIndex(value: GovFormMultiSelectItem): number {\n\t\treturn this.selectedOptions.findIndex(option => option.value === value.value && option.name === value.name)\n\t}\n\n\tprivate getOptionElement(value: GovFormMultiSelectItem): Nullable<HTMLOptionElement> {\n\t\treturn this.selectRef.querySelector('option[value=\"' + value.value + '\"]') as HTMLOptionElement\n\t}\n\n\tprivate selectOption(newOption: GovFormMultiSelectItem) {\n\t\tconst index = this.getOptionIndex(newOption)\n\t\tif (index === -1) {\n\t\t\tthis.selectedOptions = [...this.selectedOptions, newOption]\n\t\t\tconst option = this.getOptionElement(newOption)\n\t\t\tif (option) {\n\t\t\t\toption.selected = true\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate removeOption(removeOption: GovFormMultiSelectItem) {\n\t\tconst index = this.getOptionIndex(removeOption)\n\t\tif (index !== -1) {\n\t\t\tthis.selectedOptions.splice(index, 1)\n\t\t\tthis.selectedOptions = [...this.selectedOptions]\n\t\t\tconst option = this.getOptionElement(removeOption)\n\t\t\tif (option) {\n\t\t\t\toption.selected = false\n\t\t\t}\n\t\t}\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.initAutocomplete()\n\t\tawait delay(0)\n\t\tthis.selectRef.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.selected) {\n\t\t\t\tthis.selectOption({\n\t\t\t\t\tname: option.textContent,\n\t\t\t\t\tvalue: option.value,\n\t\t\t\t})\n\t\t\t}\n\t\t})\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={FormMultiSelectClass.root} size={this.size} variant={this.variant}>\n\t\t\t\t<div class={FormMultiSelectClass.wrap}>\n\t\t\t\t\t<div class=\"element\">\n\t\t\t\t\t\t<gov-form-autocomplete\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tidentifier={this.identifier || this.selectId}\n\t\t\t\t\t\t\trequired={false}\n\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\tinvalid={this.invalid}\n\t\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\t\tref={el => (this.autocompleteRef = el as HTMLGovFormAutocompleteElement)}\n\t\t\t\t\t\t\tminlength={0}\n\t\t\t\t\t\t\twcagDescribedBy={this.wcagDescribedBy}\n\t\t\t\t\t\t\twcagLabelledBy={this.wcagLabelledBy}\n\t\t\t\t\t\t\twcagOwns={this.listId}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<gov-icon slot=\"right-icon\" class=\"icon-arrow\" name=\"arrow-down\"></gov-icon>\n\t\t\t\t\t\t<select\n\t\t\t\t\t\t\thidden\n\t\t\t\t\t\t\taria-hidden={true}\n\t\t\t\t\t\t\tmultiple\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<ul role=\"listbox\" id={this.listId} class={FormMultiSelectClass.list}>\n\t\t\t\t\t{this.selectedOptions.map(option => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li class={FormMultiSelectClass.item} role=\"option\">\n\t\t\t\t\t\t\t\t{option.name}\n\t\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\t\twcagLabel={'Odebrat vybranou položku ' + option.name}\n\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onTagRemove(option)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<gov-icon name=\"cross\"></gov-icon>\n\t\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t)\n\t\t\t\t\t})}\n\t\t\t\t</ul>\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 onInputHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t}\n\n\tprivate onSelectHandler(e: CustomEvent) {\n\t\tconst value = e.detail as GovFormMultiSelectItem\n\t\tthis.selectOption(value)\n\t\tthis.value = ''\n\t\tthis.autocompleteRef.clearValue()\n\t\tthis.autocompleteRef.focus()\n\t}\n\n\tprivate onTagRemove(removeOption: GovFormMultiSelectItem) {\n\t\tthis.removeOption(removeOption)\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.wcagDescribedBy, 'wcag-described-by', FormMultiSelectClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, 'wcag-labelled-by', FormMultiSelectClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, 'wcag-owns', FormMultiSelectClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.selectId, this.wcagLabelledBy, FormMultiSelectClass.root)\n\t}\n}\n"],"version":3}
@@ -1,11 +1,11 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { c as createID } from './string.utils.js';
3
3
  import { v as validateProp } from './props.js';
4
- import { g as govForm, c as FormRadioClass } from './form.js';
4
+ import { g as govForm, f as FormRadioClass, h as FormRadioSizes } from './form.js';
5
5
  import { g as govHost, t as toBoolAttrIfDefined } from './template.js';
6
6
  import { a as validateWcagRef, b as validateWcagLabelFor } from './wcag.js';
7
- import { c as canValidateWcagOnRender, d as delay } from './win.js';
8
- import { S as Sizes } from './sizes.js';
7
+ import { c as canValidateWcagOnRender } from './win.js';
8
+ import { d as delay } from './utils.js';
9
9
  import { F as FormLabelClass } from './constants4.js';
10
10
 
11
11
  const govFormRadioCss = ".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-radio{cursor:pointer}.gov-form-radio input{position:absolute;top:0;left:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gov-form-radio input+span{position:relative;display:block}.gov-form-radio 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-radio .gov-form-label__label{position:relative;z-index:1;width:100%}.gov-form-radio input:focus-visible+span::before{outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base)}[invalid=\"\"].gov-form-radio .gov-form-label__label,[invalid=true i].gov-form-radio .gov-form-label__label,[invalid=\"1\"].gov-form-radio .gov-form-label__label{color:var(--gov-form-state-color-error, var(--gov-color-error))}[invalid=\"\"].gov-form-radio input+span::before,[invalid=true i].gov-form-radio input+span::before,[invalid=\"1\"].gov-form-radio input+span::before{border-color:var(--gov-form-state-color-error, var(--gov-color-error))}[disabled=\"\"].gov-form-radio,[disabled=true i].gov-form-radio,[disabled=\"1\"].gov-form-radio{pointer-events:none}[disabled=\"\"].gov-form-radio .gov-form-label__label,[disabled=true i].gov-form-radio .gov-form-label__label,[disabled=\"1\"].gov-form-radio .gov-form-label__label{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600))}[disabled=\"\"].gov-form-radio input+span::before,[disabled=true i].gov-form-radio input+span::before,[disabled=\"1\"].gov-form-radio input+span::before{border-color:var(--gov-form-input-disabled-bg, var(--gov-color-primary-400))}[size=xs].gov-form-radio{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-radio .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-radio 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-radio{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-radio .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-radio 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-radio{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-radio .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-radio 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-radio{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-radio .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-radio 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-radio input+span::before{border-radius:50%}.gov-form-radio input+span::after{content:\"\";position:absolute;display:block;border-radius:50%;background:var(--gov-form-radio-indicator-bg, var(--gov-color-primary));opacity:0;transition:150ms linear opacity}.gov-form-radio input:checked+span::after{opacity:1}.gov-form-radio[invalid=\"\"] input+span::after,.gov-form-radio[invalid=true i] input+span::after,.gov-form-radio[invalid=\"1\"] input+span::after{background:var(--gov-form-state-color-error, var(--gov-color-error))}.gov-form-radio[disabled=\"\"] input:checked+span::after,.gov-form-radio[disabled=true i] input:checked+span::after,.gov-form-radio[disabled=\"1\"] input:checked+span::after{background-color:var(--gov-form-input-disabled-bg, var(--gov-color-primary-400))}.gov-form-radio[size=xs] input+span::after{top:calc((var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem) - var(--gov-form-checkbox-core-xs-dot-size, 0.625rem)) / 2);left:calc((var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem) - var(--gov-form-checkbox-core-xs-dot-size, 0.625rem)) / 2);width:var(--gov-form-checkbox-core-xs-dot-size, 0.625rem);height:var(--gov-form-checkbox-core-xs-dot-size, 0.625rem)}.gov-form-radio[size=s] input+span::after{top:calc((var(--gov-form-checkbox-core-s-indicator-size, 1.375rem) - var(--gov-form-checkbox-core-s-dot-size, 0.6875rem)) / 2);left:calc((var(--gov-form-checkbox-core-s-indicator-size, 1.375rem) - var(--gov-form-checkbox-core-s-dot-size, 0.6875rem)) / 2);width:var(--gov-form-checkbox-core-s-dot-size, 0.6875rem);height:var(--gov-form-checkbox-core-s-dot-size, 0.6875rem)}.gov-form-radio[size=m] input+span::after{top:calc((var(--gov-form-checkbox-core-m-indicator-size, 1.5rem) - var(--gov-form-checkbox-core-m-dot-size, 0.75rem)) / 2);left:calc((var(--gov-form-checkbox-core-m-indicator-size, 1.5rem) - var(--gov-form-checkbox-core-m-dot-size, 0.75rem)) / 2);width:var(--gov-form-checkbox-core-m-dot-size, 0.75rem);height:var(--gov-form-checkbox-core-m-dot-size, 0.75rem)}.gov-form-radio[size=l] input+span::after{top:calc((var(--gov-form-checkbox-core-l-indicator-size, 2rem) - var(--gov-form-checkbox-core-l-dot-size, 1rem)) / 2);left:calc((var(--gov-form-checkbox-core-l-indicator-size, 2rem) - var(--gov-form-checkbox-core-l-dot-size, 1rem)) / 2);width:var(--gov-form-checkbox-core-l-dot-size, 1rem);height:var(--gov-form-checkbox-core-l-dot-size, 1rem)}";
@@ -22,7 +22,7 @@ const GovFormRadio$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
22
22
  this.required = false;
23
23
  this.disabled = undefined;
24
24
  this.name = undefined;
25
- this.size = Sizes._M;
25
+ this.size = 'm';
26
26
  this.identifier = undefined;
27
27
  this.invalid = undefined;
28
28
  this.wcagDescribedBy = undefined;
@@ -40,7 +40,7 @@ const GovFormRadio$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
40
40
  });
41
41
  }
42
42
  validateSize(newValue) {
43
- validateProp(Sizes, newValue, FormRadioClass.root);
43
+ validateProp(FormRadioSizes, newValue, FormRadioClass.root);
44
44
  }
45
45
  componentWillLoad() {
46
46
  this.isChecked = this.checked;
@@ -91,7 +91,7 @@ const GovFormRadio$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
91
91
  "required": [4],
92
92
  "disabled": [4],
93
93
  "name": [1],
94
- "size": [8],
94
+ "size": [1],
95
95
  "identifier": [1],
96
96
  "invalid": [4],
97
97
  "wcagDescribedBy": [1, "wcag-described-by"],
@@ -112,6 +112,7 @@ function defineCustomElement$1() {
112
112
  break;
113
113
  } });
114
114
  }
115
+ defineCustomElement$1();
115
116
 
116
117
  const GovFormRadio = GovFormRadio$1;
117
118
  const defineCustomElement = defineCustomElement$1;
@@ -1 +1 @@
1
- {"file":"gov-form-radio.js","mappings":";;;;;;;;;;AAAA,MAAM,eAAe,GAAG,qvOAAqvO;;MCo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MACvB,KAAK,EAAE,IAAI,CAAC,KAAK;KACjB,CAAC,CAAA;GACF;;;;EAMD,MAAM,YAAY;IACjB,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;IAC/E,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;IAC7E,oBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;GAC/F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovFormRadio"],"sources":["../../../packages/core/src/components/gov-form/radio/gov-form-radio.scss?tag=gov-form-radio","../../../packages/core/src/components/gov-form/radio/gov-form-radio.tsx"],"sourcesContent":["/*\n * Radio\n */\n\n@import \"../checkbox/gov-form-checkbox-core.scss\";\n$class: \".gov-form-radio\";\n\n#{$class} {\n\t@extend %form-checkbox-core;\n\tinput + span {\n\t\t&::before {\n\t\t\tborder-radius: 50%;\n\t\t}\n\t\t&::after {\n\t\t\t@include pseudo();\n\t\t\tborder-radius: 50%;\n\t\t\tbackground: $form-radio-indicator-bg;\n\t\t\topacity: 0;\n\t\t\ttransition: $t linear opacity;\n\t\t}\n\t}\n\n\t// STATES\n\tinput:checked + span::after {\n\t\topacity: 1;\n\t}\n\t@include parameter(\"invalid\") {\n\t\tinput + span::after {\n\t\t\tbackground: $form-state-color-error;\n\t\t}\n\t}\n\t@include parameter(\"disabled\") {\n\t\tinput:checked + span::after {\n\t\t\tbackground-color: $form-state-bg-disabled;\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $form-checkbox-core-sizes {\n\t\t&[size=\"#{$size}\"] {\n\t\t\tinput + span::after {\n\t\t\t\ttop: calc((get(\"indicator-size\", $definitions) - get(\"dot-size\", $definitions)) / 2);\n\t\t\t\tleft: calc((get(\"indicator-size\", $definitions) - get(\"dot-size\", $definitions)) / 2);\n\t\t\t\twidth: get(\"dot-size\", $definitions);\n\t\t\t\theight: get(\"dot-size\", $definitions);\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Host, h, Prop, State, Event, EventEmitter, Element, Watch, Method } from '@stencil/core'\nimport { createID } from '../../../../src/utils/string.utils'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { FormRadioClass, SizesType } 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 { Sizes } from '../../../core/constants/sizes'\nimport { GovForm } from '../../../helpers/Dom/form.d'\nimport { govHost } from '../../../helpers/Dom/template'\nimport { GovHost } from '../../../helpers/Dom/template.d'\nimport { govForm } from '../../../helpers/Dom/form'\nimport { FormLabelClass } from '../label/constants'\nimport { GovFormRadioChangeEvent } from './interfaces';\n\n@Component({\n\ttag: 'gov-form-radio',\n\tstyleUrl: 'gov-form-radio.scss',\n})\nexport class GovFormRadio {\n\tprivate h: GovHost\n\tprivate f: GovForm\n\n\tprivate readonly radioId: string\n\n\tconstructor() {\n\t\tthis.radioId = createID('GovRadio')\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormRadioElement\n\t/**\n\t * Value of radio\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * Radio 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 radio component disabled.\n\t * This prevents users from being able to interact with the radio, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean\n\t/**\n\t * Name of the radio.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Radio's size.\n\t */\n\t@Prop() readonly size: SizesType = Sizes._M\n\t/**\n\t * Custom radio identifier.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: 'wcag-described-by' }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when the radio has focus.\n\t */\n\t@Event({ eventName: 'gov-focus' }) govFocus: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the radio loses focus.\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the radio change value.\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovFormRadioChangeEvent>\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(Sizes, newValue, FormRadioClass.root)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.isChecked = this.checked\n\n\t\tthis.f.passAttrToControl('type', 'radio')\n\t\tthis.h.passChildAttr(FormLabelClass.root, 'identifier', this.identifier || this.radioId)\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={FormRadioClass.root} is-checked={isChecked} size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t<div class={FormRadioClass.holder}>\n\t\t\t\t\t<input\n\t\t\t\t\t\tclass={FormRadioClass.input}\n\t\t\t\t\t\tid={this.identifier || this.radioId}\n\t\t\t\t\t\ttype=\"radio\"\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>\n\t\t\t\t\t\t<slot name=\"label\" />\n\t\t\t\t\t</span>\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', FormRadioClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, 'wcag-labelled-by', FormRadioClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.radioId, this.wcagLabelledBy, FormRadioClass.root)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-form-radio.js","mappings":";;;;;;;;;;AAAA,MAAM,eAAe,GAAG,qvOAAqvO;;MCmBhwOA,cAAY;EAMxB;;;;;;;mBAeqD,KAAK;oBAKrB,KAAK;;;gBAaG,GAAG;;;;;;IAhC/C,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAA;IAEnC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;GACxB;EA6DD,kBAAkB,CAAC,QAAiB;IACnC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;IACzB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;MACnB,OAAO,EAAE,IAAI,CAAC,SAAS;MACvB,KAAK,EAAE,IAAI,CAAC,KAAK;KACjB,CAAC,CAAA;GACF;EAGD,YAAY,CAAC,QAAgB;IAC5B,YAAY,CAAC,cAAc,EAAE,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;GAC3D;EAED,iBAAiB;IAChB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAA;IAE7B,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,CAAC,CAAA;GACxF;EAED,MAAM,kBAAkB;IACvB,IAAI,uBAAuB,EAAE,EAAE;MAC9B,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;MAChB,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;K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CAAQ;IAC/B,IAAI,CAAC,SAAS,GAAI,CAAC,CAAC,MAA2B,CAAC,OAAO,CAAA;IACvD,CAAC,CAAC,eAAe,EAAE,CAAA;IACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;MACnB,OAAO,EAAE,IAAI,CAAC,SAAS;MACvB,KAAK,EAAE,IAAI,CAAC,KAAK;KACjB,CAAC,CAAA;GACF;;;;EAMD,MAAM,YAAY;IACjB,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;IAC/E,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;IAC7E,oBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;GAC/F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovFormRadio"],"sources":["../../../packages/core/src/components/gov-form/radio/gov-form-radio.scss?tag=gov-form-radio","../../../packages/core/src/components/gov-form/radio/gov-form-radio.tsx"],"sourcesContent":["/*\n * Radio\n */\n\n@import \"../checkbox/gov-form-checkbox-core.scss\";\n$class: \".gov-form-radio\";\n\n#{$class} {\n\t@extend %form-checkbox-core;\n\tinput + span {\n\t\t&::before {\n\t\t\tborder-radius: 50%;\n\t\t}\n\t\t&::after {\n\t\t\t@include pseudo();\n\t\t\tborder-radius: 50%;\n\t\t\tbackground: $form-radio-indicator-bg;\n\t\t\topacity: 0;\n\t\t\ttransition: $t linear opacity;\n\t\t}\n\t}\n\n\t// STATES\n\tinput:checked + span::after {\n\t\topacity: 1;\n\t}\n\t@include parameter(\"invalid\") {\n\t\tinput + span::after {\n\t\t\tbackground: $form-state-color-error;\n\t\t}\n\t}\n\t@include parameter(\"disabled\") {\n\t\tinput:checked + span::after {\n\t\t\tbackground-color: $form-state-bg-disabled;\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $form-checkbox-core-sizes {\n\t\t&[size=\"#{$size}\"] {\n\t\t\tinput + span::after {\n\t\t\t\ttop: calc((get(\"indicator-size\", $definitions) - get(\"dot-size\", $definitions)) / 2);\n\t\t\t\tleft: calc((get(\"indicator-size\", $definitions) - get(\"dot-size\", $definitions)) / 2);\n\t\t\t\twidth: get(\"dot-size\", $definitions);\n\t\t\t\theight: get(\"dot-size\", $definitions);\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, 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 { FormRadioClass, FormRadioSizes, FormRadioSizesType } 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 { FormLabelClass } from '../label/constants'\nimport { GovFormRadioChangeEvent } from './interfaces'\n\n@Component({\n\ttag: 'gov-form-radio',\n\tstyleUrl: 'gov-form-radio.scss',\n})\nexport class GovFormRadio {\n\tprivate h: GovHost\n\tprivate f: GovForm\n\n\tprivate readonly radioId: string\n\n\tconstructor() {\n\t\tthis.radioId = createID('GovRadio')\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormRadioElement\n\t/**\n\t * Value of radio\n\t */\n\t@Prop() readonly value: string\n\t/**\n\t * Radio 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 radio component disabled.\n\t * This prevents users from being able to interact with the radio, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean\n\t/**\n\t * Name of the radio.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Radio's size.\n\t */\n\t@Prop() readonly size?: FormRadioSizesType = 'm'\n\t/**\n\t * Custom radio identifier.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: 'wcag-described-by' }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when the radio has focus.\n\t */\n\t@Event({ eventName: 'gov-focus' }) govFocus: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the radio loses focus.\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the radio change value.\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovFormRadioChangeEvent>\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(FormRadioSizes, newValue, FormRadioClass.root)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.isChecked = this.checked\n\n\t\tthis.f.passAttrToControl('type', 'radio')\n\t\tthis.h.passChildAttr(FormLabelClass.root, 'identifier', this.identifier || this.radioId)\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={FormRadioClass.root} is-checked={isChecked} size={this.size} invalid={toBoolAttrIfDefined(this.invalid)}>\n\t\t\t\t<div class={FormRadioClass.holder}>\n\t\t\t\t\t<input\n\t\t\t\t\t\tclass={FormRadioClass.input}\n\t\t\t\t\t\tid={this.identifier || this.radioId}\n\t\t\t\t\t\ttype=\"radio\"\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>\n\t\t\t\t\t\t<slot name=\"label\" />\n\t\t\t\t\t</span>\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', FormRadioClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, 'wcag-labelled-by', FormRadioClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.radioId, this.wcagLabelledBy, FormRadioClass.root)\n\t}\n}\n"],"version":3}
@@ -1,6 +1,4 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import './sizes.js';
3
- import './variants.js';
4
2
 
5
3
  const FormSearchClass = {
6
4
  root: 'gov-form-search',
@@ -34,6 +32,7 @@ function defineCustomElement$1() {
34
32
  break;
35
33
  } });
36
34
  }
35
+ defineCustomElement$1();
37
36
 
38
37
  const GovFormSearch = GovFormSearch$1;
39
38
  const defineCustomElement = defineCustomElement$1;
@@ -1 +1 @@
1
- {"file":"gov-form-search.js","mappings":";;;;AAgBO,MAAM,eAAe,GAAG;EAC9B,IAAI,EAAE,iBAAiB;EACvB,KAAK,EAAE,wBAAwB;EAC/B,MAAM,EAAE,yBAAyB;CACjC;;ACpBD,MAAM,gBAAgB,GAAG,qgCAAqgC;;MCOjhCA,eAAa;;;;;EAIzB,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,eAAe,CAAC,IAAI,IAChC,YAAM,KAAK,EAAE,eAAe,CAAC,KAAK,IACjC,YAAM,IAAI,EAAC,OAAO,GAAG,CACf,EACP,YAAM,KAAK,EAAE,eAAe,CAAC,MAAM,IAClC,YAAM,IAAI,EAAC,QAAQ,GAAG,CAChB,CACD,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;","names":["GovFormSearch"],"sources":["../../../packages/core/src/components/gov-form/search/constants.ts","../../../packages/core/src/components/gov-form/search/gov-form-search.scss?tag=gov-form-search","../../../packages/core/src/components/gov-form/search/gov-form-search.tsx"],"sourcesContent":["import { Sizes as GlobalSizes } from '../../../core/constants/sizes'\nimport { Variants as GlobalVariants } from '../../../core/constants/variants'\n\nexport const Variants = [\n\tundefined,\n\tGlobalVariants.PRIMARY,\n\tGlobalVariants.SECONDARY,\n\tGlobalVariants.SUCCESS,\n\tGlobalVariants.ERROR,\n\tGlobalVariants.WARNING,\n] as const\nexport type VariantType = (typeof Variants)[number]\n\nexport const Sizes = [undefined, GlobalSizes._M, GlobalSizes._L, GlobalSizes._XL] as const\nexport type SizesType = (typeof Sizes)[number]\n\nexport const FormSearchClass = {\n\troot: 'gov-form-search',\n\tinput: 'gov-form-search__input',\n\tbutton: 'gov-form-search__button',\n}\n","/*\n * Search\n */\n\n$class: \".gov-form-search\";\n\n#{$class} {\n\t@include base(flex);\n\t@include focus-outline($border-radius, 0, true);\n\tgap: rem-calc(8);\n\talign-items: center;\n\tborder: $form-input-border;\n\tborder-radius: $border-radius;\n\tbackground-color: $form-bg-color;\n\t&__input {\n\t\tflex: 1 1 auto;\n\t\tinput {\n\t\t\theight: auto;\n\t\t}\n\t}\n\t&__button {\n\t\tflex: 0 0 auto;\n\t\tmargin: rem-calc(3) rem-calc(3) rem-calc(3) 0;\n\t}\n}\n","import { Component, Element, h, Host } from '@stencil/core'\nimport { FormSearchClass } from './constants'\n\n@Component({\n\ttag: 'gov-form-search',\n\tstyleUrl: 'gov-form-search.scss',\n})\nexport class GovFormSearch {\n\t\n\t@Element() host: HTMLGovFormSearchElement\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSearchClass.root}>\n\t\t\t\t<span class={FormSearchClass.input}>\n\t\t\t\t\t<slot name=\"input\" />\n\t\t\t\t</span>\n\t\t\t\t<span class={FormSearchClass.button}>\n\t\t\t\t\t<slot name=\"button\" />\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-form-search.js","mappings":";;AAAO,MAAM,eAAe,GAAG;EAC9B,IAAI,EAAE,iBAAiB;EACvB,KAAK,EAAE,wBAAwB;EAC/B,MAAM,EAAE,yBAAyB;CACjC;;ACJD,MAAM,gBAAgB,GAAG,qgCAAqgC;;MCOjhCA,eAAa;;;;;EAGzB,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,eAAe,CAAC,IAAI,IAChC,YAAM,KAAK,EAAE,eAAe,CAAC,KAAK,IACjC,YAAM,IAAI,EAAC,OAAO,GAAG,CACf,EACP,YAAM,KAAK,EAAE,eAAe,CAAC,MAAM,IAClC,YAAM,IAAI,EAAC,QAAQ,GAAG,CAChB,CACD,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovFormSearch"],"sources":["../../../packages/core/src/components/gov-form/search/constants.ts","../../../packages/core/src/components/gov-form/search/gov-form-search.scss?tag=gov-form-search","../../../packages/core/src/components/gov-form/search/gov-form-search.tsx"],"sourcesContent":["export const FormSearchClass = {\n\troot: 'gov-form-search',\n\tinput: 'gov-form-search__input',\n\tbutton: 'gov-form-search__button',\n}\n","/*\n * Search\n */\n\n$class: \".gov-form-search\";\n\n#{$class} {\n\t@include base(flex);\n\t@include focus-outline($border-radius, 0, true);\n\tgap: rem-calc(8);\n\talign-items: center;\n\tborder: $form-input-border;\n\tborder-radius: $border-radius;\n\tbackground-color: $form-bg-color;\n\t&__input {\n\t\tflex: 1 1 auto;\n\t\tinput {\n\t\t\theight: auto;\n\t\t}\n\t}\n\t&__button {\n\t\tflex: 0 0 auto;\n\t\tmargin: rem-calc(3) rem-calc(3) rem-calc(3) 0;\n\t}\n}\n","import { Component, Element, h, Host } from '@stencil/core'\nimport { FormSearchClass } from './constants'\n\n@Component({\n\ttag: 'gov-form-search',\n\tstyleUrl: 'gov-form-search.scss',\n})\nexport class GovFormSearch {\n\t@Element() host: HTMLGovFormSearchElement\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSearchClass.root}>\n\t\t\t\t<span class={FormSearchClass.input}>\n\t\t\t\t\t<slot name=\"input\" />\n\t\t\t\t</span>\n\t\t\t\t<span class={FormSearchClass.button}>\n\t\t\t\t\t<slot name=\"button\" />\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
@@ -1,11 +1,11 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { g as govHost, t as toBoolAttrIfDefined } from './template.js';
3
- import { g as govForm, j as FormSelectClass, k as Variants } from './form.js';
4
- import { S as Sizes } from './sizes.js';
3
+ import { g as govForm, q as FormSelectClass, r as FormSelectVariants, s as FormSelectSizes } from './form.js';
5
4
  import { v as validateProp } from './props.js';
6
5
  import { a as validateWcagRef, b as validateWcagLabelFor } from './wcag.js';
7
- import { c as canValidateWcagOnRender, d as delay } from './win.js';
6
+ import { c as canValidateWcagOnRender } from './win.js';
8
7
  import { c as createID } from './string.utils.js';
8
+ import { d as delay } from './utils.js';
9
9
  import { d as defineCustomElement$1 } from './gov-icon2.js';
10
10
 
11
11
  const govFormSelectCss = ".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)}";
@@ -20,7 +20,7 @@ const GovFormSelect = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
20
20
  this.value = undefined;
21
21
  this.identifier = undefined;
22
22
  this.variant = undefined;
23
- this.size = Sizes._M;
23
+ this.size = 'm';
24
24
  this.name = undefined;
25
25
  this.required = false;
26
26
  this.disabled = undefined;
@@ -36,10 +36,10 @@ const GovFormSelect = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
36
36
  this.f = govForm(govHost(this.host));
37
37
  }
38
38
  validateVariant(newValue) {
39
- validateProp(Variants, newValue, FormSelectClass.root);
39
+ validateProp(FormSelectVariants, newValue, FormSelectClass.root);
40
40
  }
41
41
  validateSize(newValue) {
42
- validateProp(Sizes, newValue, FormSelectClass.root);
42
+ validateProp(FormSelectSizes, newValue, FormSelectClass.root);
43
43
  }
44
44
  componentWillLoad() {
45
45
  this.validateVariant(this.variant);
@@ -110,8 +110,8 @@ const GovFormSelect = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
110
110
  }, [4, "gov-form-select", {
111
111
  "value": [1537],
112
112
  "identifier": [1],
113
- "variant": [8],
114
- "size": [8],
113
+ "variant": [1],
114
+ "size": [1],
115
115
  "name": [1],
116
116
  "required": [4],
117
117
  "disabled": [4],
@@ -145,6 +145,7 @@ function defineCustomElement() {
145
145
  break;
146
146
  } });
147
147
  }
148
+ defineCustomElement();
148
149
 
149
150
  export { GovFormSelect as G, defineCustomElement as d };
150
151
 
@@ -1 +1 @@
1
- {"file":"gov-form-select2.js","mappings":";;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,mnVAAmnV;;MCiB/nV,aAAa;EAOzB;;;;;;;;mBAkBwC,SAAS;gBAId,KAAK,CAAC,EAAE;;oBASN,KAAK;;;;;;;;;IA9BzC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAA;IACrC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;GACpC;EAwED,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;GACtD;EAGD,YAAY,CAAC,QAAgB;IAC5B,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;GACnD;EAED,iBAAiB;IAChB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAClC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAE5B,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,OAAO,CAA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AC,CAAA;IACzE,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IAChF,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IACjE,oBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;GACjG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.scss?tag=gov-form-select","../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["/*\n * Select\n */\n\n@import \"../select/gov-form-select-core.scss\";\n\n$class: \".gov-form-select\";\n\n#{$class} {\n\t@extend %form-select-core;\n}\n","import { Component, Element, h, State, Prop, Event, EventEmitter, Watch, Host, Method } from '@stencil/core'\nimport { GovHost } from '../../../helpers/Dom/template.d'\nimport { toBoolAttrIfDefined, govHost } from '../../../helpers/Dom/template'\nimport { SizesType, Variants, VariantType, FormSelectClass } from './constants'\nimport { Sizes } from '../../../core/constants/sizes'\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.d'\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: VariantType = undefined\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size: SizesType = Sizes._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(Variants, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, 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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;;","names":[],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.scss?tag=gov-form-select","../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["/*\n * Select\n */\n\n@import \"../select/gov-form-select-core.scss\";\n\n$class: \".gov-form-select\";\n\n#{$class} {\n\t@extend %form-select-core;\n}\n","import { Component, Element, 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"],"version":3}
@@ -1,11 +1,11 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { c as createID } from './string.utils.js';
3
3
  import { v as validateProp } from './props.js';
4
- import { g as govForm, d as FormSwitchClass } from './form.js';
4
+ import { g as govForm, i as FormSwitchClass, j as FormSwitchSizes } from './form.js';
5
5
  import { g as govHost, t as toBoolAttrIfDefined } from './template.js';
6
6
  import { a as validateWcagRef, b as validateWcagLabelFor } from './wcag.js';
7
- import { c as canValidateWcagOnRender, d as delay } from './win.js';
8
- import { S as Sizes } from './sizes.js';
7
+ import { c as canValidateWcagOnRender } from './win.js';
8
+ import { d as delay } from './utils.js';
9
9
 
10
10
  const govFormSwitchCss = ".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)}";
11
11
 
@@ -21,7 +21,7 @@ const GovFormSwitch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
21
21
  this.required = false;
22
22
  this.disabled = undefined;
23
23
  this.name = undefined;
24
- this.size = Sizes._M;
24
+ this.size = 'm';
25
25
  this.identifier = undefined;
26
26
  this.invalid = undefined;
27
27
  this.wcagDescribedBy = undefined;
@@ -39,7 +39,7 @@ const GovFormSwitch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
39
39
  });
40
40
  }
41
41
  validateSize(newValue) {
42
- validateProp(Sizes, newValue, FormSwitchClass.root);
42
+ validateProp(FormSwitchSizes, newValue, FormSwitchClass.root);
43
43
  }
44
44
  componentWillLoad() {
45
45
  this.isChecked = this.checked;
@@ -90,7 +90,7 @@ const GovFormSwitch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
90
90
  "required": [4],
91
91
  "disabled": [4],
92
92
  "name": [1],
93
- "size": [8],
93
+ "size": [1],
94
94
  "identifier": [1],
95
95
  "invalid": [4],
96
96
  "wcagDescribedBy": [1, "wcag-described-by"],
@@ -111,6 +111,7 @@ function defineCustomElement$1() {
111
111
  break;
112
112
  } });
113
113
  }
114
+ defineCustomElement$1();
114
115
 
115
116
  const GovFormSwitch = GovFormSwitch$1;
116
117
  const defineCustomElement = defineCustomElement$1;
@@ -1 +1 @@
1
- {"file":"gov-form-switch.js","mappings":";;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,ggUAAggU;;MCmB5gUA,eAAa;EAMzB;;;;;;;mBAeqD,KAAK;oBAKrB,KAAK;;;gBAaP,KAAK,CAAC,EAAE;;;;;;IAhC1C,IAAI,C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EAMD,MAAM,YAAY;IACjB,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IAChF,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IAC9E,oBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;GACnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovFormSwitch"],"sources":["../../../packages/core/src/components/gov-form/switch/gov-form-switch.scss?tag=gov-form-switch","../../../packages/core/src/components/gov-form/switch/gov-form-switch.tsx"],"sourcesContent":["/*\n * Switch\n */\n\n$class: \".gov-form-switch\";\n$indicator-ratio: calc(5 / 3);\n\n#{$class} {\n\tposition: relative;\n\tdisplay: flex;\n\t&__holder {\n\t\tdisplay: inline-flex;\n\t}\n\t&__input {\n\t\tposition: 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 '../../../../src/utils/string.utils'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { FormSwitchClass, SizesType } 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 { Sizes } from '../../../core/constants/sizes'\nimport { GovForm }from '../../../helpers/Dom/form.d'\nimport { govHost }from '../../../helpers/Dom/template'\nimport { GovHost }from '../../../helpers/Dom/template.d'\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: SizesType = Sizes._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(Sizes, 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"],"version":3}
1
+ {"file":"gov-form-switch.js","mappings":";;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,ggUAAggU;;MCkB5gUA,eAAa;EAMzB;;;;;;;mBAeqD,KAAK;oBAKrB,KAAK;;;gBAaI,GAAG;;;;;;IAhChD,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAA;IAEzC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;GACxB;EA6DD,kBAAkB,CAAC,QAAiB;IACnC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;IACzB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;MACnB,OAAO,EAAE,IAAI,CAAC,SAAS;MACvB,KAAK,EAAE,IAAI,CAAC,KAAK;KACjB,CAAC,CAAA;GACF;EAGD,YAAY,CAAC,QAAgB;IAC5B,YAAY,CAAC,eAAe,EAAE,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;GAC7D;EAED,iBAAiB;IAChB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAA;IAE7B,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,MA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AmB,CAAC,IAAI,CAAC,QAAQ,CAAC,GAChD,EACF,YAAM,KAAK,EAAE,eAAe,CAAC,SAAS,GAAS,EAC/C,YAAM,IAAI,EAAC,OAAO,GAAQ,CACrB,CACA,EACP;GACD;EAEO,cAAc,CAAC,CAAa;IACnC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;GACrB;EAEO,aAAa,CAAC,CAAa;IAClC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;GACpB;EAEO,eAAe,CAAC,CAAQ;IAC/B,IAAI,CAAC,SAAS,GAAI,CAAC,CAAC,MAA2B,CAAC,OAAO,CAAA;IACvD,CAAC,CAAC,eAAe,EAAE,CAAA;IACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;MACnB,OAAO,EAAE,IAAI,CAAC,SAAS;MACvB,KAAK,EAAE,IAAI,CAAC,KAAK;KACjB,CAAC,CAAA;GACF;;;;EAMD,MAAM,YAAY;IACjB,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IAChF,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IAC9E,oBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;GACnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovFormSwitch"],"sources":["../../../packages/core/src/components/gov-form/switch/gov-form-switch.scss?tag=gov-form-switch","../../../packages/core/src/components/gov-form/switch/gov-form-switch.tsx"],"sourcesContent":["/*\n * Switch\n */\n\n$class: \".gov-form-switch\";\n$indicator-ratio: calc(5 / 3);\n\n#{$class} {\n\tposition: relative;\n\tdisplay: flex;\n\t&__holder {\n\t\tdisplay: inline-flex;\n\t}\n\t&__input {\n\t\tposition: 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"],"version":3}
@@ -8,7 +8,7 @@ const GovGridItem$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
8
8
  constructor() {
9
9
  super();
10
10
  this.__registerHost();
11
- this.size = "12/12";
11
+ this.size = '12/12';
12
12
  this.sizeSm = undefined;
13
13
  this.sizeMd = undefined;
14
14
  this.sizeLg = undefined;
@@ -40,6 +40,7 @@ function defineCustomElement$1() {
40
40
  break;
41
41
  } });
42
42
  }
43
+ defineCustomElement$1();
43
44
 
44
45
  const GovGridItem = GovGridItem$1;
45
46
  const defineCustomElement = defineCustomElement$1;
@@ -1 +1 @@
1
- {"file":"gov-grid-item.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,m8GAAm8G;;MCS78GA,aAAW;EAGvB;;;gBAQgC,OAAO;;;;;IAPtC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAwBD,MAAM;IACL,QACC,EAAC,IAAI,IACJ,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,EACzC,IAAI,EAAC,UAAU,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,aACN,IAAI,CAAC,MAAM,aACX,IAAI,CAAC,MAAM,aACX,IAAI,CAAC,MAAM,aACX,IAAI,CAAC,MAAM,IACpB,eAAQ,CACF,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovGridItem"],"sources":["../../../packages/core/src/components/gov-grid/gov-grid-item.scss?tag=gov-grid-item","../../../packages/core/src/components/gov-grid/gov-grid-item.tsx"],"sourcesContent":["/*\n * Grid Cell\n */\n\n$class: \".gov-grid-item\";\n\n#{$class} {\n\t@include generateGridSize();\n\tborder: 0 solid transparent;\n\n\t// hide the border in MS high contrast mode\n\tborder-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3C/svg%3E\");\n}\n","import { Component, Element, h, Host, Prop } from \"@stencil/core\"\nimport { GridItemClass } from \"./constants\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.d\"\n\n@Component({\n\ttag: \"gov-grid-item\",\n\tstyleUrl: \"gov-grid-item.scss\",\n})\nexport class GovGridItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovGridItemElement\n\t/**\n\t * Cell size as a fraction of 1/12 of the grid size\n\t */\n\t@Prop() readonly size: string = \"12/12\"\n\t/**\n\t * Cell size for SM media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({attribute: 'size-sm'}) readonly sizeSm: string\n\t/**\n\t * Cell size for MD media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({attribute: 'size-md'}) readonly sizeMd: string\n\t/**\n\t * Cell size for LG media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({attribute: 'size-lg'}) readonly sizeLg: string\n\t/**\n\t * Cell size for XL media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({attribute: 'size-xl'}) readonly sizeXl: string\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(GridItemClass.root)}\n\t\t\t\trole=\"listitem\"\n\t\t\t\tsize={this.size}\n\t\t\t\tsize-sm={this.sizeSm}\n\t\t\t\tsize-md={this.sizeMd}\n\t\t\t\tsize-lg={this.sizeLg}\n\t\t\t\tsize-xl={this.sizeXl}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-grid-item.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,m8GAAm8G;;MCS78GA,aAAW;EAGvB;;;gBAQgC,OAAO;;;;;IAPtC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAwBD,MAAM;IACL,QACC,EAAC,IAAI,IACJ,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,EACzC,IAAI,EAAC,UAAU,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,aACN,IAAI,CAAC,MAAM,aACX,IAAI,CAAC,MAAM,aACX,IAAI,CAAC,MAAM,aACX,IAAI,CAAC,MAAM,IAEpB,eAAQ,CACF,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovGridItem"],"sources":["../../../packages/core/src/components/gov-grid/gov-grid-item.scss?tag=gov-grid-item","../../../packages/core/src/components/gov-grid/gov-grid-item.tsx"],"sourcesContent":["/*\n * Grid Cell\n */\n\n$class: \".gov-grid-item\";\n\n#{$class} {\n\t@include generateGridSize();\n\tborder: 0 solid transparent;\n\n\t// hide the border in MS high contrast mode\n\tborder-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3C/svg%3E\");\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { GridItemClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-grid-item',\n\tstyleUrl: 'gov-grid-item.scss',\n})\nexport class GovGridItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovGridItemElement\n\t/**\n\t * Cell size as a fraction of 1/12 of the grid size\n\t */\n\t@Prop() readonly size: string = '12/12'\n\t/**\n\t * Cell size for SM media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'size-sm' }) readonly sizeSm: string\n\t/**\n\t * Cell size for MD media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'size-md' }) readonly sizeMd: string\n\t/**\n\t * Cell size for LG media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'size-lg' }) readonly sizeLg: string\n\t/**\n\t * Cell size for XL media query and up as a fraction of 12 of the grid size\n\t */\n\t@Prop({ attribute: 'size-xl' }) readonly sizeXl: string\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(GridItemClass.root)}\n\t\t\t\trole=\"listitem\"\n\t\t\t\tsize={this.size}\n\t\t\t\tsize-sm={this.sizeSm}\n\t\t\t\tsize-md={this.sizeMd}\n\t\t\t\tsize-lg={this.sizeLg}\n\t\t\t\tsize-xl={this.sizeXl}\n\t\t\t>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
@@ -35,6 +35,7 @@ function defineCustomElement$1() {
35
35
  break;
36
36
  } });
37
37
  }
38
+ defineCustomElement$1();
38
39
 
39
40
  const GovGrid = GovGrid$1;
40
41
  const defineCustomElement = defineCustomElement$1;
@@ -1 +1 @@
1
- {"file":"gov-grid.js","mappings":";;;;AAAA,MAAM,UAAU,GAAG,qjBAAqjB;;MCS3jBA,SAAO;EAGnB;;;;;IACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;;EAeD,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,aAAW,IAAI,CAAC,MAAM,aAAW,IAAI,CAAC,MAAM,EAAE,IAAI,EAAC,MAAM,IACnG,eAAa,CACP,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovGrid"],"sources":["../../../packages/core/src/components/gov-grid/gov-grid.scss?tag=gov-grid","../../../packages/core/src/components/gov-grid/gov-grid.tsx"],"sourcesContent":["/*\n * Grid\n */\n\n$class: \".gov-grid\";\n\n#{$class} {\n\t@include base(flex);\n\tflex-wrap: wrap;\n\n\t// VARIANTS\n\t&[align-x=\"middle\"] {\n\t\talign-items: center;\n\t}\n\t&[align-x=\"bottom\"] {\n\t\talign-items: flex-end;\n\t}\n\t&[align-y=\"center\"] {\n\t\tjustify-content: center;\n\t}\n\t&[align-y=\"right\"] {\n\t\tjustify-content: flex-end;\n\t}\n\t&[align-y=\"space-between\"] {\n\t\tjustify-content: space-between;\n\t}\n\t&[align-y=\"space-around\"] {\n\t\tjustify-content: space-around;\n\t}\n}\n","import { Component, Element, h, Host, Prop } from \"@stencil/core\"\nimport { GridClass } from \"./constants\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.d\"\n\n@Component({\n\ttag: \"gov-grid\",\n\tstyleUrl: \"gov-grid.scss\",\n})\nexport class GovGrid {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovGridElement\n\t/**\n\t * Horizontal align of cells\n\t */\n\t@Prop({attribute: 'align-x'}) readonly alignX: string\n\n\t/**\n\t * Vertical align of cells\n\t */\n\t@Prop({attribute: 'align-y'}) readonly alignY: string\n\n\t// vertical / horizontal align\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(GridClass.root)} align-x={this.alignX} align-y={this.alignY} role=\"list\">\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-grid.js","mappings":";;;;AAAA,MAAM,UAAU,GAAG,qjBAAqjB;;MCS3jBA,SAAO;EAGnB;;;;;IACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;;EAeD,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,aAAW,IAAI,CAAC,MAAM,aAAW,IAAI,CAAC,MAAM,EAAE,IAAI,EAAC,MAAM,IACnG,eAAa,CACP,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovGrid"],"sources":["../../../packages/core/src/components/gov-grid/gov-grid.scss?tag=gov-grid","../../../packages/core/src/components/gov-grid/gov-grid.tsx"],"sourcesContent":["/*\n * Grid\n */\n\n$class: \".gov-grid\";\n\n#{$class} {\n\t@include base(flex);\n\tflex-wrap: wrap;\n\n\t// VARIANTS\n\t&[align-x=\"middle\"] {\n\t\talign-items: center;\n\t}\n\t&[align-x=\"bottom\"] {\n\t\talign-items: flex-end;\n\t}\n\t&[align-y=\"center\"] {\n\t\tjustify-content: center;\n\t}\n\t&[align-y=\"right\"] {\n\t\tjustify-content: flex-end;\n\t}\n\t&[align-y=\"space-between\"] {\n\t\tjustify-content: space-between;\n\t}\n\t&[align-y=\"space-around\"] {\n\t\tjustify-content: space-around;\n\t}\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { GridClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-grid',\n\tstyleUrl: 'gov-grid.scss',\n})\nexport class GovGrid {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovGridElement\n\t/**\n\t * Horizontal align of cells\n\t */\n\t@Prop({ attribute: 'align-x' }) readonly alignX: string\n\n\t/**\n\t * Vertical align of cells\n\t */\n\t@Prop({ attribute: 'align-y' }) readonly alignY: string\n\n\t// vertical / horizontal align\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(GridClass.root)} align-x={this.alignX} align-y={this.alignY} role=\"list\">\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}