@gov-design-system-ce/components 0.0.62 → 0.0.63

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 (693) hide show
  1. package/dist/cjs/{constants-0488d137.js → constants-25f7a6be.js} +2 -2
  2. package/dist/cjs/{constants-0488d137.js.map → constants-25f7a6be.js.map} +1 -1
  3. package/dist/cjs/{constants-23b7a283.js → constants-427a2843.js} +2 -2
  4. package/dist/cjs/constants-427a2843.js.map +1 -0
  5. package/dist/cjs/{constants-ff12205f.js → constants-a31344ad.js} +1 -1
  6. package/dist/{collection/components/gov-button/default/constants.js.map → cjs/constants-a31344ad.js.map} +1 -1
  7. package/dist/cjs/core.cjs.js +1 -1
  8. package/dist/cjs/{form-f68d13c6.js → form-74063d50.js} +3 -1
  9. package/dist/cjs/form-74063d50.js.map +1 -0
  10. package/dist/cjs/gov-accordion-item.cjs.entry.js +1 -1
  11. package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
  12. package/dist/cjs/gov-accordion.cjs.entry.js +1 -1
  13. package/dist/cjs/gov-app.cjs.entry.js +791 -514
  14. package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
  15. package/dist/cjs/gov-attachments_3.cjs.entry.js +1 -1
  16. package/dist/cjs/gov-backdrop.cjs.entry.js +1 -1
  17. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +1 -1
  18. package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
  19. package/dist/cjs/gov-button.cjs.entry.js +2 -2
  20. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  21. package/dist/cjs/gov-card.cjs.entry.js +1 -1
  22. package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
  23. package/dist/cjs/gov-chip.cjs.entry.js +102 -0
  24. package/dist/cjs/gov-chip.cjs.entry.js.map +1 -0
  25. package/dist/cjs/gov-container.cjs.entry.js +1 -1
  26. package/dist/cjs/gov-control-group.cjs.entry.js +1 -1
  27. package/dist/cjs/gov-cookiebar.cjs.entry.js +1 -1
  28. package/dist/cjs/gov-dropdown.cjs.entry.js +2 -2
  29. package/dist/cjs/gov-dropdown.cjs.entry.js.map +1 -1
  30. package/dist/cjs/gov-empty.cjs.entry.js +1 -1
  31. package/dist/cjs/gov-error-code.cjs.entry.js +1 -1
  32. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +1 -1
  33. package/dist/cjs/gov-form-checkbox.cjs.entry.js +4 -4
  34. package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
  35. package/dist/cjs/gov-form-control.cjs.entry.js +3 -3
  36. package/dist/cjs/gov-form-control.cjs.entry.js.map +1 -1
  37. package/dist/cjs/gov-form-file.cjs.entry.js +2 -2
  38. package/dist/cjs/gov-form-group.cjs.entry.js +12 -3
  39. package/dist/cjs/gov-form-group.cjs.entry.js.map +1 -1
  40. package/dist/cjs/gov-form-input.cjs.entry.js +2 -2
  41. package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
  42. package/dist/cjs/gov-form-multi-select.cjs.entry.js +2 -2
  43. package/dist/cjs/gov-form-password-power.cjs.entry.js +1 -1
  44. package/dist/cjs/gov-form-password-power.cjs.entry.js.map +1 -1
  45. package/dist/cjs/gov-form-radio.cjs.entry.js +6 -6
  46. package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
  47. package/dist/cjs/gov-form-search.cjs.entry.js.map +1 -1
  48. package/dist/cjs/gov-form-select.cjs.entry.js +14 -3
  49. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  50. package/dist/cjs/gov-form-switch.cjs.entry.js +3 -3
  51. package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
  52. package/dist/cjs/gov-grid-item.cjs.entry.js +1 -1
  53. package/dist/cjs/gov-grid.cjs.entry.js +1 -1
  54. package/dist/cjs/gov-icon.cjs.entry.js +2 -2
  55. package/dist/cjs/gov-icon.cjs.entry.js.map +1 -1
  56. package/dist/cjs/gov-infobar.cjs.entry.js +5 -4
  57. package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -1
  58. package/dist/cjs/gov-layout-column.cjs.entry.js +1 -1
  59. package/dist/cjs/gov-layout.cjs.entry.js +1 -1
  60. package/dist/cjs/gov-loading.cjs.entry.js +1 -1
  61. package/dist/cjs/gov-message.cjs.entry.js +1 -1
  62. package/dist/cjs/gov-modal.cjs.entry.js +7 -4
  63. package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
  64. package/dist/cjs/gov-pagination.cjs.entry.js +1 -1
  65. package/dist/cjs/gov-prompt.cjs.entry.js +1 -1
  66. package/dist/cjs/gov-side-nav-item.cjs.entry.js +4 -4
  67. package/dist/cjs/gov-side-nav-item.cjs.entry.js.map +1 -1
  68. package/dist/cjs/gov-side-nav.cjs.entry.js +2 -2
  69. package/dist/cjs/gov-skeleton.cjs.entry.js +1 -1
  70. package/dist/cjs/gov-spacer.cjs.entry.js +1 -1
  71. package/dist/cjs/gov-statsbar-item.cjs.entry.js +1 -1
  72. package/dist/cjs/gov-statsbar.cjs.entry.js +1 -1
  73. package/dist/cjs/gov-stepper-item.cjs.entry.js +1 -1
  74. package/dist/cjs/gov-stepper.cjs.entry.js +1 -1
  75. package/dist/cjs/gov-tabs-item.cjs.entry.js +5 -5
  76. package/dist/cjs/gov-tabs-item.cjs.entry.js.map +1 -1
  77. package/dist/cjs/gov-tabs.cjs.entry.js +25 -16
  78. package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
  79. package/dist/cjs/gov-tag.cjs.entry.js +51 -0
  80. package/dist/cjs/gov-tag.cjs.entry.js.map +1 -0
  81. package/dist/cjs/gov-tile.cjs.entry.js +1 -1
  82. package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
  83. package/dist/cjs/gov-tiles.cjs.entry.js +1 -1
  84. package/dist/cjs/gov-toast.cjs.entry.js +1 -1
  85. package/dist/cjs/gov-tooltip-content.cjs.entry.js +2 -2
  86. package/dist/cjs/gov-tooltip-content.cjs.entry.js.map +1 -1
  87. package/dist/cjs/gov-tooltip.cjs.entry.js +40 -5
  88. package/dist/cjs/gov-tooltip.cjs.entry.js.map +1 -1
  89. package/dist/cjs/gov-wizard-item.cjs.entry.js +1 -1
  90. package/dist/cjs/gov-wizard-item.cjs.entry.js.map +1 -1
  91. package/dist/cjs/gov-wizard.cjs.entry.js +1 -1
  92. package/dist/cjs/index-83edd4fe.js +6 -2
  93. package/dist/cjs/loader.cjs.js +1 -1
  94. package/dist/cjs/{template-e1c4ff78.js → template-4b951d1d.js} +8 -1
  95. package/dist/cjs/template-4b951d1d.js.map +1 -0
  96. package/dist/collection/collection-manifest.json +4 -3
  97. package/dist/collection/components/gov-accordion/gov-accordion-item.css +5 -2
  98. package/dist/collection/components/gov-accordion/gov-accordion-item.js +1 -1
  99. package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
  100. package/dist/collection/components/gov-accordion/gov-accordion.css +5 -2
  101. package/dist/collection/components/gov-app/gov-app.css +5 -2
  102. package/dist/collection/components/gov-app/gov-app.js +5 -3
  103. package/dist/collection/components/gov-app/gov-app.js.map +1 -1
  104. package/dist/collection/components/gov-attachments/gov-attachments-item.css +5 -2
  105. package/dist/collection/components/gov-attachments/gov-attachments.css +5 -2
  106. package/dist/collection/components/gov-backdrop/gov-backdrop.css +5 -2
  107. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.css +5 -2
  108. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +1 -1
  109. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js.map +1 -1
  110. package/dist/collection/components/gov-button/button/constants.js.map +1 -0
  111. package/dist/collection/components/gov-button/{default → button}/gov-button.css +6 -3
  112. package/dist/collection/components/gov-button/{default → button}/gov-button.js +9 -9
  113. package/dist/collection/components/gov-button/button/gov-button.js.map +1 -0
  114. package/dist/collection/components/gov-button/button/gov-button.types.js.map +1 -0
  115. package/dist/collection/components/gov-button/dropdown/gov-dropdown.css +5 -2
  116. package/dist/collection/components/gov-button/dropdown/gov-dropdown.js +1 -1
  117. package/dist/collection/components/gov-button/dropdown/gov-dropdown.js.map +1 -1
  118. package/dist/collection/components/gov-card/gov-card.css +5 -2
  119. package/dist/collection/components/gov-card/gov-card.js +1 -1
  120. package/dist/collection/components/gov-card/gov-card.js.map +1 -1
  121. package/dist/collection/components/{gov-badge → gov-chip}/constants.js +5 -5
  122. package/dist/collection/components/gov-chip/constants.js.map +1 -0
  123. package/dist/collection/components/gov-chip/gov-chip.css +1270 -0
  124. package/dist/collection/components/{gov-badge/gov-badge.js → gov-chip/gov-chip.js} +150 -23
  125. package/dist/collection/components/gov-chip/gov-chip.js.map +1 -0
  126. package/dist/collection/components/gov-container/gov-container.css +5 -2
  127. package/dist/collection/components/gov-control-group/gov-control-group.css +5 -2
  128. package/dist/collection/components/gov-cookiebar/gov-cookiebar.css +5 -2
  129. package/dist/collection/components/gov-empty/gov-empty.css +5 -2
  130. package/dist/collection/components/gov-error-code/gov-error-code.css +5 -2
  131. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.css +5 -2
  132. package/dist/collection/components/gov-form/checkbox/constants.js +1 -0
  133. package/dist/collection/components/gov-form/checkbox/constants.js.map +1 -1
  134. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.css +8 -2
  135. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +2 -2
  136. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
  137. package/dist/collection/components/gov-form/control/gov-form-control.css +5 -2
  138. package/dist/collection/components/gov-form/control/gov-form-control.js +1 -1
  139. package/dist/collection/components/gov-form/control/gov-form-control.js.map +1 -1
  140. package/dist/collection/components/gov-form/file/gov-form-file.css +5 -2
  141. package/dist/collection/components/gov-form/group/gov-form-group.css +5 -2
  142. package/dist/collection/components/gov-form/group/gov-form-group.js +13 -2
  143. package/dist/collection/components/gov-form/group/gov-form-group.js.map +1 -1
  144. package/dist/collection/components/gov-form/input/gov-form-input.css +5 -2
  145. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  146. package/dist/collection/components/gov-form/label/gov-form-label.css +5 -2
  147. package/dist/collection/components/gov-form/message/gov-form-message.css +5 -2
  148. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +5 -2
  149. package/dist/collection/components/gov-form/password-power/gov-form-password-power.css +8 -4
  150. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +1 -1
  151. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js.map +1 -1
  152. package/dist/collection/components/gov-form/radio/constants.js +1 -0
  153. package/dist/collection/components/gov-form/radio/constants.js.map +1 -1
  154. package/dist/collection/components/gov-form/radio/gov-form-radio.css +8 -2
  155. package/dist/collection/components/gov-form/radio/gov-form-radio.js +4 -4
  156. package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
  157. package/dist/collection/components/gov-form/search/gov-form-search.css +5 -2
  158. package/dist/collection/components/gov-form/search/gov-form-search.js +1 -1
  159. package/dist/collection/components/gov-form/search/gov-form-search.js.map +1 -1
  160. package/dist/collection/components/gov-form/select/gov-form-select.css +5 -2
  161. package/dist/collection/components/gov-form/select/gov-form-select.js +39 -2
  162. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  163. package/dist/collection/components/gov-form/select/gov-form-select.types.js.map +1 -1
  164. package/dist/collection/components/gov-form/switch/gov-form-switch.css +7 -2
  165. package/dist/collection/components/gov-form/switch/gov-form-switch.js +1 -1
  166. package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
  167. package/dist/collection/components/gov-grid/gov-grid-item.css +5 -2
  168. package/dist/collection/components/gov-grid/gov-grid.css +5 -2
  169. package/dist/collection/components/gov-icon/gov-icon.css +5 -2
  170. package/dist/collection/components/gov-icon/gov-icon.js +4 -10
  171. package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
  172. package/dist/collection/components/gov-icon/list.js +17 -11
  173. package/dist/collection/components/gov-icon/list.js.map +1 -1
  174. package/dist/collection/components/gov-infobar/{default/constants.js → constants.js} +3 -2
  175. package/dist/collection/components/gov-infobar/constants.js.map +1 -0
  176. package/dist/collection/components/gov-infobar/{default/gov-infobar.css → gov-infobar.css} +9 -3
  177. package/dist/collection/components/gov-infobar/{default/gov-infobar.js → gov-infobar.js} +12 -11
  178. package/dist/collection/components/gov-infobar/gov-infobar.js.map +1 -0
  179. package/dist/collection/components/gov-infobar/gov-infobar.types.js.map +1 -0
  180. package/dist/collection/components/gov-layout/gov-layout-column.css +5 -2
  181. package/dist/collection/components/gov-layout/gov-layout.css +5 -2
  182. package/dist/collection/components/gov-loading/loading/gov-loading.css +5 -2
  183. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.css +5 -2
  184. package/dist/collection/components/gov-message/gov-message.css +5 -2
  185. package/dist/collection/components/gov-modal/gov-modal.css +5 -2
  186. package/dist/collection/components/gov-modal/gov-modal.js +24 -3
  187. package/dist/collection/components/gov-modal/gov-modal.js.map +1 -1
  188. package/dist/collection/components/gov-nav/gov-nav-item.css +5 -2
  189. package/dist/collection/components/gov-nav/gov-nav.css +5 -2
  190. package/dist/collection/components/gov-pagination/gov-pagination.css +5 -2
  191. package/dist/collection/components/gov-promp/gov-prompt.css +5 -2
  192. package/dist/collection/components/gov-side-nav/constants.js +1 -1
  193. package/dist/collection/components/gov-side-nav/constants.js.map +1 -1
  194. package/dist/collection/components/gov-side-nav/gov-side-nav-item.css +6 -3
  195. package/dist/collection/components/gov-side-nav/gov-side-nav-item.js +2 -2
  196. package/dist/collection/components/gov-side-nav/gov-side-nav-item.js.map +1 -1
  197. package/dist/collection/components/gov-side-nav/gov-side-nav.css +5 -2
  198. package/dist/collection/components/gov-spacer/gov-spacer.css +5 -2
  199. package/dist/collection/components/gov-statsbar/gov-statsbar-item.css +5 -2
  200. package/dist/collection/components/gov-statsbar/gov-statsbar.css +5 -2
  201. package/dist/collection/components/gov-stepper/gov-stepper-item.css +5 -2
  202. package/dist/collection/components/gov-stepper/gov-stepper.css +5 -2
  203. package/dist/collection/components/gov-tabs/constants.js +1 -1
  204. package/dist/collection/components/gov-tabs/constants.js.map +1 -1
  205. package/dist/collection/components/gov-tabs/gov-tabs-item.css +5 -2
  206. package/dist/collection/components/gov-tabs/gov-tabs-item.js +4 -4
  207. package/dist/collection/components/gov-tabs/gov-tabs-item.js.map +1 -1
  208. package/dist/collection/components/gov-tabs/gov-tabs.css +16 -14
  209. package/dist/collection/components/gov-tabs/gov-tabs.js +29 -21
  210. package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
  211. package/dist/collection/components/gov-tag/constants.js +4 -0
  212. package/dist/collection/components/gov-tag/constants.js.map +1 -0
  213. package/dist/collection/components/gov-tag/gov-tag.css +1274 -0
  214. package/dist/collection/components/gov-tag/gov-tag.js +118 -0
  215. package/dist/collection/components/gov-tag/gov-tag.js.map +1 -0
  216. package/dist/collection/components/gov-tile/container/gov-tiles.css +5 -2
  217. package/dist/collection/components/gov-tile/gov-tile.css +5 -2
  218. package/dist/collection/components/gov-tile/gov-tile.js +3 -3
  219. package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
  220. package/dist/collection/components/gov-toast/gov-toast.css +5 -2
  221. package/dist/collection/components/gov-tooltip/gov-tooltip-content.css +14 -2
  222. package/dist/collection/components/gov-tooltip/gov-tooltip.css +6 -3
  223. package/dist/collection/components/gov-tooltip/gov-tooltip.js +40 -5
  224. package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
  225. package/dist/collection/components/gov-wizard/gov-wizard-item.css +5 -2
  226. package/dist/collection/components/gov-wizard/gov-wizard-item.js +1 -1
  227. package/dist/collection/components/gov-wizard/gov-wizard-item.js.map +1 -1
  228. package/dist/collection/components/gov-wizard/gov-wizard.css +5 -2
  229. package/dist/collection/data/font-definitions.js +6 -6
  230. package/dist/collection/helpers/Dom/template.js +7 -0
  231. package/dist/collection/helpers/Dom/template.js.map +1 -1
  232. package/dist/collection/helpers/Dom/template.types.js.map +1 -1
  233. package/dist/collection/pages/Accordion.js +15 -15
  234. package/dist/collection/pages/Accordion.js.map +1 -1
  235. package/dist/collection/pages/{Badge.js → Chip.js} +181 -181
  236. package/dist/collection/pages/Chip.js.map +1 -0
  237. package/dist/collection/pages/Forms.js +23 -0
  238. package/dist/collection/pages/Forms.js.map +1 -1
  239. package/dist/collection/pages/Infobar.js +5 -5
  240. package/dist/collection/pages/Infobar.js.map +1 -1
  241. package/dist/collection/pages/Tabs.js +7 -7
  242. package/dist/collection/pages/Tabs.js.map +1 -1
  243. package/dist/collection/pages/Tag.js +253 -0
  244. package/dist/collection/pages/Tag.js.map +1 -0
  245. package/dist/collection/pages/Tooltip.js +3 -3
  246. package/dist/collection/pages/Tooltip.js.map +1 -1
  247. package/dist/components/gov-accordion-item.js +1 -1
  248. package/dist/components/gov-accordion-item.js.map +1 -1
  249. package/dist/components/gov-accordion.js +1 -1
  250. package/dist/components/gov-app.js +1 -1
  251. package/dist/components/gov-app.js.map +1 -1
  252. package/dist/components/gov-attachments-item.js +1 -1
  253. package/dist/components/gov-attachments.js +1 -1
  254. package/dist/components/gov-backdrop.js +1 -1
  255. package/dist/components/gov-breadcrumbs.js +1 -1
  256. package/dist/components/gov-breadcrumbs.js.map +1 -1
  257. package/dist/components/gov-button.js +1 -1
  258. package/dist/components/gov-card.js +1 -1
  259. package/dist/components/gov-card.js.map +1 -1
  260. package/dist/components/{gov-badge.d.ts → gov-chip.d.ts} +4 -4
  261. package/dist/components/gov-chip.js +2 -0
  262. package/dist/components/gov-container.js +1 -1
  263. package/dist/components/gov-control-group.js +1 -1
  264. package/dist/components/gov-cookiebar.js +1 -1
  265. package/dist/components/gov-dropdown.js +1 -1
  266. package/dist/components/gov-dropdown.js.map +1 -1
  267. package/dist/components/gov-empty.js +1 -1
  268. package/dist/components/gov-error-code.js +1 -1
  269. package/dist/components/gov-form-autocomplete.js +1 -1
  270. package/dist/components/gov-form-checkbox.js +1 -1
  271. package/dist/components/gov-form-checkbox.js.map +1 -1
  272. package/dist/components/gov-form-control.js +1 -1
  273. package/dist/components/gov-form-control.js.map +1 -1
  274. package/dist/components/gov-form-file.js +1 -1
  275. package/dist/components/gov-form-group.js +1 -1
  276. package/dist/components/gov-form-group.js.map +1 -1
  277. package/dist/components/gov-form-input.js +1 -1
  278. package/dist/components/gov-form-message.js +1 -1
  279. package/dist/components/gov-form-multi-select.js +1 -1
  280. package/dist/components/gov-form-password-power.js +1 -1
  281. package/dist/components/gov-form-password-power.js.map +1 -1
  282. package/dist/components/gov-form-radio.js +1 -1
  283. package/dist/components/gov-form-radio.js.map +1 -1
  284. package/dist/components/gov-form-search.js +1 -1
  285. package/dist/components/gov-form-search.js.map +1 -1
  286. package/dist/components/gov-form-select.js +1 -1
  287. package/dist/components/gov-form-switch.js +1 -1
  288. package/dist/components/gov-form-switch.js.map +1 -1
  289. package/dist/components/gov-grid-item.js +1 -1
  290. package/dist/components/gov-grid.js +1 -1
  291. package/dist/components/gov-icon.js +1 -1
  292. package/dist/components/gov-infobar.js +1 -1
  293. package/dist/components/gov-infobar.js.map +1 -1
  294. package/dist/components/gov-layout-column.js +1 -1
  295. package/dist/components/gov-layout.js +1 -1
  296. package/dist/components/gov-loading.js +1 -1
  297. package/dist/components/gov-message.js +1 -1
  298. package/dist/components/gov-modal.js +1 -1
  299. package/dist/components/gov-modal.js.map +1 -1
  300. package/dist/components/gov-pagination.js +1 -1
  301. package/dist/components/gov-prompt.js +1 -1
  302. package/dist/components/gov-side-nav-item.js +1 -1
  303. package/dist/components/gov-side-nav-item.js.map +1 -1
  304. package/dist/components/gov-side-nav.js +1 -1
  305. package/dist/components/gov-skeleton.js +1 -1
  306. package/dist/components/gov-spacer.js +1 -1
  307. package/dist/components/gov-statsbar-item.js +1 -1
  308. package/dist/components/gov-statsbar.js +1 -1
  309. package/dist/components/gov-stepper-item.js +1 -1
  310. package/dist/components/gov-stepper.js +1 -1
  311. package/dist/components/gov-tabs-item.js +1 -1
  312. package/dist/components/gov-tabs-item.js.map +1 -1
  313. package/dist/components/gov-tabs.js +1 -1
  314. package/dist/components/gov-tabs.js.map +1 -1
  315. package/dist/components/gov-tag.d.ts +11 -0
  316. package/dist/components/gov-tag.js +2 -0
  317. package/dist/components/gov-tag.js.map +1 -0
  318. package/dist/components/gov-tile.js +1 -1
  319. package/dist/components/gov-tile.js.map +1 -1
  320. package/dist/components/gov-tiles.js +1 -1
  321. package/dist/components/gov-toast.js +1 -1
  322. package/dist/components/gov-tooltip-content.js +1 -1
  323. package/dist/components/gov-tooltip-content.js.map +1 -1
  324. package/dist/components/gov-tooltip.js +1 -1
  325. package/dist/components/gov-tooltip.js.map +1 -1
  326. package/dist/components/gov-wizard-item.js +1 -1
  327. package/dist/components/gov-wizard-item.js.map +1 -1
  328. package/dist/components/gov-wizard.js +1 -1
  329. package/dist/components/{p-1b4f2520.js → p-25b64ce2.js} +2 -2
  330. package/dist/components/p-28e59384.js +2 -0
  331. package/dist/components/p-28e59384.js.map +1 -0
  332. package/dist/components/{p-3dbf7f49.js → p-3c71d697.js} +1 -1
  333. package/dist/{cjs/constants-ff12205f.js.map → components/p-3c71d697.js.map} +1 -1
  334. package/dist/components/p-53e02bee.js +2 -0
  335. package/dist/components/p-53e02bee.js.map +1 -0
  336. package/dist/components/{p-3e8a9e92.js → p-6b256c8e.js} +2 -2
  337. package/dist/components/{p-f72ecbef.js → p-7ad6b936.js} +2 -2
  338. package/dist/components/p-7ad6b936.js.map +1 -0
  339. package/dist/components/{p-9ba6e755.js → p-a29d84e4.js} +2 -2
  340. package/dist/components/p-a29d84e4.js.map +1 -0
  341. package/dist/components/p-b0d4961a.js +2 -0
  342. package/dist/components/p-b0d4961a.js.map +1 -0
  343. package/dist/components/{p-522dd298.js → p-b47d953a.js} +2 -2
  344. package/dist/components/{p-522dd298.js.map → p-b47d953a.js.map} +1 -1
  345. package/dist/components/{p-8da17139.js → p-b60b159d.js} +2 -2
  346. package/dist/components/p-db1f0452.js +2 -0
  347. package/dist/components/p-db1f0452.js.map +1 -0
  348. package/dist/components/{p-b3cb7945.js → p-dde10734.js} +2 -2
  349. package/dist/components/{p-94542a50.js → p-e2d7dc71.js} +2 -2
  350. package/dist/components/p-e2d7dc71.js.map +1 -0
  351. package/dist/components/{p-bc5d5903.js → p-ee3a01c0.js} +2 -2
  352. package/dist/components/p-fa1e4aea.js +2 -0
  353. package/dist/components/p-fa1e4aea.js.map +1 -0
  354. package/dist/core/core.esm.js +1 -1
  355. package/dist/core/core.esm.js.map +1 -1
  356. package/dist/core/p-002c922c.entry.js +2 -0
  357. package/dist/core/p-002c922c.entry.js.map +1 -0
  358. package/dist/core/{p-7702c8c2.entry.js → p-046613ca.entry.js} +2 -2
  359. package/dist/core/p-0a84ab6c.entry.js +2 -0
  360. package/dist/core/p-0a84ab6c.entry.js.map +1 -0
  361. package/dist/core/{p-0c57e410.entry.js → p-0db95d0a.entry.js} +2 -2
  362. package/dist/core/p-0db95d0a.entry.js.map +1 -0
  363. package/dist/core/p-0e5fa8bf.js +2 -0
  364. package/dist/core/p-0e5fa8bf.js.map +1 -0
  365. package/dist/core/{p-f62efc34.entry.js → p-1da19326.entry.js} +2 -2
  366. package/dist/core/p-1da19326.entry.js.map +1 -0
  367. package/dist/core/{p-1c62f175.entry.js → p-1e41751e.entry.js} +2 -2
  368. package/dist/core/{p-e5227e40.entry.js → p-21a02f11.entry.js} +2 -2
  369. package/dist/core/{p-acd6a9f4.entry.js → p-2370e823.entry.js} +2 -2
  370. package/dist/core/p-2370e823.entry.js.map +1 -0
  371. package/dist/core/{p-06699657.entry.js → p-25620fed.entry.js} +2 -2
  372. package/dist/core/p-25620fed.entry.js.map +1 -0
  373. package/dist/core/{p-6f43bd00.entry.js → p-28d98a7d.entry.js} +2 -2
  374. package/dist/core/p-28e59384.js +2 -0
  375. package/dist/core/p-28e59384.js.map +1 -0
  376. package/dist/core/{p-e2d6efaf.entry.js → p-2c5b8f32.entry.js} +2 -2
  377. package/dist/core/{p-1da9f871.entry.js → p-3191317e.entry.js} +2 -2
  378. package/dist/core/{p-32a4b7e3.entry.js → p-32a4bac2.entry.js} +2 -2
  379. package/dist/core/p-32a4bac2.entry.js.map +1 -0
  380. package/dist/core/{p-7372b066.entry.js → p-34613499.entry.js} +2 -2
  381. package/dist/core/{p-88010439.entry.js → p-3d11d9a0.entry.js} +2 -2
  382. package/dist/core/{p-7fa1290e.entry.js → p-409f054b.entry.js} +2 -2
  383. package/dist/core/{p-afa12399.entry.js → p-4281eecd.entry.js} +2 -2
  384. package/dist/core/p-4281eecd.entry.js.map +1 -0
  385. package/dist/core/p-475e46be.entry.js +2 -0
  386. package/dist/core/p-475e46be.entry.js.map +1 -0
  387. package/dist/core/{p-3bacd021.js → p-4c55142b.js} +1 -1
  388. package/dist/core/p-4c55142b.js.map +1 -0
  389. package/dist/core/p-4df6aec4.entry.js +2 -0
  390. package/dist/core/p-4df6aec4.entry.js.map +1 -0
  391. package/dist/core/{p-bc6f1479.entry.js → p-4f34cea7.entry.js} +2 -2
  392. package/dist/core/p-4f34cea7.entry.js.map +1 -0
  393. package/dist/core/{p-35c1c12c.entry.js → p-52d767a8.entry.js} +2 -2
  394. package/dist/core/p-52d767a8.entry.js.map +1 -0
  395. package/dist/core/p-5e23a6ba.entry.js.map +1 -1
  396. package/dist/core/{p-2bb9f781.entry.js → p-679625c1.entry.js} +2 -2
  397. package/dist/core/{p-19b897c0.entry.js → p-7632b949.entry.js} +2 -2
  398. package/dist/core/{p-80f5140b.entry.js → p-7b01e961.entry.js} +2 -2
  399. package/dist/core/{p-93897e60.entry.js → p-7c38556b.entry.js} +2 -2
  400. package/dist/core/p-7d756211.entry.js +2 -0
  401. package/dist/core/p-7d756211.entry.js.map +1 -0
  402. package/dist/core/{p-7e8d2066.entry.js → p-7e11320f.entry.js} +2 -2
  403. package/dist/core/{p-c81d62db.entry.js → p-80ebaaf5.entry.js} +2 -2
  404. package/dist/core/{p-93042b25.entry.js → p-83512243.entry.js} +2 -2
  405. package/dist/core/{p-739dd451.entry.js → p-84e61610.entry.js} +2 -2
  406. package/dist/core/p-87700ea3.entry.js +2 -0
  407. package/dist/core/p-87700ea3.entry.js.map +1 -0
  408. package/dist/core/{p-998c3336.entry.js → p-87a91e77.entry.js} +2 -2
  409. package/dist/core/{p-4452c278.entry.js → p-8a931ff2.entry.js} +2 -2
  410. package/dist/core/{p-041d30b1.entry.js → p-8e5599d1.entry.js} +2 -2
  411. package/dist/core/{p-84f6b11a.entry.js → p-8f3d9099.entry.js} +2 -2
  412. package/dist/core/{p-84f6b11a.entry.js.map → p-8f3d9099.entry.js.map} +1 -1
  413. package/dist/core/{p-19a54ee9.entry.js → p-92ce6f87.entry.js} +2 -2
  414. package/dist/core/p-92ce6f87.entry.js.map +1 -0
  415. package/dist/core/{p-e1780dba.entry.js → p-96354948.entry.js} +2 -2
  416. package/dist/core/{p-2fe9d3ea.entry.js → p-a8b5ac68.entry.js} +2 -2
  417. package/dist/core/{p-2bf0c1c5.entry.js → p-aec21036.entry.js} +2 -2
  418. package/dist/core/{p-2bf0c1c5.entry.js.map → p-aec21036.entry.js.map} +1 -1
  419. package/dist/core/{p-228da18e.entry.js → p-af42ea63.entry.js} +2 -2
  420. package/dist/core/p-b21a3c79.entry.js +2 -0
  421. package/dist/core/p-b21a3c79.entry.js.map +1 -0
  422. package/dist/core/{p-9633e7b5.entry.js → p-baae15b9.entry.js} +2 -2
  423. package/dist/core/p-baae15b9.entry.js.map +1 -0
  424. package/dist/core/{p-88a78167.entry.js → p-c13ad31c.entry.js} +2 -2
  425. package/dist/core/{p-c5d3efc2.entry.js → p-c91daf1e.entry.js} +2 -2
  426. package/dist/core/{p-c5d3efc2.entry.js.map → p-c91daf1e.entry.js.map} +1 -1
  427. package/dist/core/p-c9ac8361.entry.js +2 -0
  428. package/dist/core/p-c9ac8361.entry.js.map +1 -0
  429. package/dist/core/p-cb3ac3f5.entry.js +2 -0
  430. package/dist/core/{p-5316e768.entry.js.map → p-cb3ac3f5.entry.js.map} +1 -1
  431. package/dist/core/{p-de5c9181.entry.js → p-cc48e49d.entry.js} +2 -2
  432. package/dist/core/{p-de5c9181.entry.js.map → p-cc48e49d.entry.js.map} +1 -1
  433. package/dist/core/{p-28f39f69.entry.js → p-d6e6d683.entry.js} +2 -2
  434. package/dist/core/p-db1f0452.js +2 -0
  435. package/dist/core/p-db1f0452.js.map +1 -0
  436. package/dist/core/{p-a7719b55.entry.js → p-e4ae862e.entry.js} +2 -2
  437. package/dist/core/{p-74ce7780.entry.js → p-e4e4ae20.entry.js} +2 -2
  438. package/dist/core/p-e4e4ae20.entry.js.map +1 -0
  439. package/dist/core/{p-1c40fdd5.entry.js → p-e6af7eb5.entry.js} +2 -2
  440. package/dist/core/p-e6af7eb5.entry.js.map +1 -0
  441. package/dist/core/p-ef2895f8.entry.js +2 -0
  442. package/dist/core/p-ef2895f8.entry.js.map +1 -0
  443. package/dist/core/{p-89921159.entry.js → p-f069df4a.entry.js} +2 -2
  444. package/dist/core/p-f8407153.entry.js +2 -0
  445. package/dist/core/p-f8407153.entry.js.map +1 -0
  446. package/dist/core/p-fa1e4aea.js +2 -0
  447. package/dist/core/p-fa1e4aea.js.map +1 -0
  448. package/dist/core/{p-0eb11cfc.entry.js → p-ff061e6b.entry.js} +2 -2
  449. package/dist/esm/{constants-ba92640d.js → constants-34a29ae2.js} +1 -1
  450. package/dist/{components/p-3dbf7f49.js.map → esm/constants-34a29ae2.js.map} +1 -1
  451. package/dist/esm/{constants-24dad929.js → constants-6df4edc4.js} +2 -2
  452. package/dist/esm/constants-6df4edc4.js.map +1 -0
  453. package/dist/esm/{constants-f5c21493.js → constants-867ac6e2.js} +2 -2
  454. package/dist/esm/{constants-f5c21493.js.map → constants-867ac6e2.js.map} +1 -1
  455. package/dist/esm/core.js +1 -1
  456. package/dist/esm/{form-2d9f68d9.js → form-39dc6896.js} +3 -1
  457. package/dist/esm/form-39dc6896.js.map +1 -0
  458. package/dist/esm/gov-accordion-item.entry.js +1 -1
  459. package/dist/esm/gov-accordion-item.entry.js.map +1 -1
  460. package/dist/esm/gov-accordion.entry.js +1 -1
  461. package/dist/esm/gov-app.entry.js +791 -514
  462. package/dist/esm/gov-app.entry.js.map +1 -1
  463. package/dist/esm/gov-attachments_3.entry.js +1 -1
  464. package/dist/esm/gov-backdrop.entry.js +1 -1
  465. package/dist/esm/gov-breadcrumbs.entry.js +1 -1
  466. package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
  467. package/dist/esm/gov-button.entry.js +2 -2
  468. package/dist/esm/gov-button.entry.js.map +1 -1
  469. package/dist/esm/gov-card.entry.js +1 -1
  470. package/dist/esm/gov-card.entry.js.map +1 -1
  471. package/dist/esm/gov-chip.entry.js +98 -0
  472. package/dist/esm/gov-chip.entry.js.map +1 -0
  473. package/dist/esm/gov-container.entry.js +1 -1
  474. package/dist/esm/gov-control-group.entry.js +1 -1
  475. package/dist/esm/gov-cookiebar.entry.js +1 -1
  476. package/dist/esm/gov-dropdown.entry.js +2 -2
  477. package/dist/esm/gov-dropdown.entry.js.map +1 -1
  478. package/dist/esm/gov-empty.entry.js +1 -1
  479. package/dist/esm/gov-error-code.entry.js +1 -1
  480. package/dist/esm/gov-form-autocomplete.entry.js +1 -1
  481. package/dist/esm/gov-form-checkbox.entry.js +4 -4
  482. package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
  483. package/dist/esm/gov-form-control.entry.js +3 -3
  484. package/dist/esm/gov-form-control.entry.js.map +1 -1
  485. package/dist/esm/gov-form-file.entry.js +2 -2
  486. package/dist/esm/gov-form-group.entry.js +12 -3
  487. package/dist/esm/gov-form-group.entry.js.map +1 -1
  488. package/dist/esm/gov-form-input.entry.js +2 -2
  489. package/dist/esm/gov-form-input.entry.js.map +1 -1
  490. package/dist/esm/gov-form-multi-select.entry.js +2 -2
  491. package/dist/esm/gov-form-password-power.entry.js +1 -1
  492. package/dist/esm/gov-form-password-power.entry.js.map +1 -1
  493. package/dist/esm/gov-form-radio.entry.js +6 -6
  494. package/dist/esm/gov-form-radio.entry.js.map +1 -1
  495. package/dist/esm/gov-form-search.entry.js.map +1 -1
  496. package/dist/esm/gov-form-select.entry.js +14 -3
  497. package/dist/esm/gov-form-select.entry.js.map +1 -1
  498. package/dist/esm/gov-form-switch.entry.js +3 -3
  499. package/dist/esm/gov-form-switch.entry.js.map +1 -1
  500. package/dist/esm/gov-grid-item.entry.js +1 -1
  501. package/dist/esm/gov-grid.entry.js +1 -1
  502. package/dist/esm/gov-icon.entry.js +2 -2
  503. package/dist/esm/gov-icon.entry.js.map +1 -1
  504. package/dist/esm/gov-infobar.entry.js +5 -4
  505. package/dist/esm/gov-infobar.entry.js.map +1 -1
  506. package/dist/esm/gov-layout-column.entry.js +1 -1
  507. package/dist/esm/gov-layout.entry.js +1 -1
  508. package/dist/esm/gov-loading.entry.js +1 -1
  509. package/dist/esm/gov-message.entry.js +1 -1
  510. package/dist/esm/gov-modal.entry.js +7 -4
  511. package/dist/esm/gov-modal.entry.js.map +1 -1
  512. package/dist/esm/gov-pagination.entry.js +1 -1
  513. package/dist/esm/gov-prompt.entry.js +1 -1
  514. package/dist/esm/gov-side-nav-item.entry.js +4 -4
  515. package/dist/esm/gov-side-nav-item.entry.js.map +1 -1
  516. package/dist/esm/gov-side-nav.entry.js +2 -2
  517. package/dist/esm/gov-skeleton.entry.js +1 -1
  518. package/dist/esm/gov-spacer.entry.js +1 -1
  519. package/dist/esm/gov-statsbar-item.entry.js +1 -1
  520. package/dist/esm/gov-statsbar.entry.js +1 -1
  521. package/dist/esm/gov-stepper-item.entry.js +1 -1
  522. package/dist/esm/gov-stepper.entry.js +1 -1
  523. package/dist/esm/gov-tabs-item.entry.js +5 -5
  524. package/dist/esm/gov-tabs-item.entry.js.map +1 -1
  525. package/dist/esm/gov-tabs.entry.js +25 -16
  526. package/dist/esm/gov-tabs.entry.js.map +1 -1
  527. package/dist/esm/gov-tag.entry.js +47 -0
  528. package/dist/esm/gov-tag.entry.js.map +1 -0
  529. package/dist/esm/gov-tile.entry.js +1 -1
  530. package/dist/esm/gov-tile.entry.js.map +1 -1
  531. package/dist/esm/gov-tiles.entry.js +1 -1
  532. package/dist/esm/gov-toast.entry.js +1 -1
  533. package/dist/esm/gov-tooltip-content.entry.js +2 -2
  534. package/dist/esm/gov-tooltip-content.entry.js.map +1 -1
  535. package/dist/esm/gov-tooltip.entry.js +40 -5
  536. package/dist/esm/gov-tooltip.entry.js.map +1 -1
  537. package/dist/esm/gov-wizard-item.entry.js +1 -1
  538. package/dist/esm/gov-wizard-item.entry.js.map +1 -1
  539. package/dist/esm/gov-wizard.entry.js +1 -1
  540. package/dist/esm/index-ae3c50f1.js +6 -2
  541. package/dist/esm/loader.js +1 -1
  542. package/dist/esm/{template-10332292.js → template-df429738.js} +8 -1
  543. package/dist/esm/template-df429738.js.map +1 -0
  544. package/dist/hydrate/index.js +1400 -972
  545. package/dist/types/components/gov-accordion/gov-accordion-item.d.ts +1 -1
  546. package/dist/types/components/gov-app/gov-app.d.ts +3 -2
  547. package/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.ts +1 -1
  548. package/dist/types/components/gov-button/{default → button}/gov-button.d.ts +1 -1
  549. package/dist/types/components/gov-card/gov-card.d.ts +1 -1
  550. package/dist/types/components/{gov-badge → gov-chip}/constants.d.ts +1 -1
  551. package/dist/types/components/{gov-badge/gov-badge.d.ts → gov-chip/gov-chip.d.ts} +34 -7
  552. package/dist/types/components/gov-form/checkbox/constants.d.ts +1 -0
  553. package/dist/types/components/gov-form/checkbox/gov-form-checkbox.d.ts +1 -1
  554. package/dist/types/components/gov-form/group/gov-form-group.d.ts +2 -1
  555. package/dist/types/components/gov-form/password-power/gov-form-password-power.d.ts +2 -2
  556. package/dist/types/components/gov-form/radio/constants.d.ts +1 -0
  557. package/dist/types/components/gov-form/radio/gov-form-radio.d.ts +1 -1
  558. package/dist/types/components/gov-form/select/gov-form-select.d.ts +6 -1
  559. package/dist/types/components/gov-form/select/gov-form-select.types.d.ts +5 -0
  560. package/dist/types/components/gov-form/switch/gov-form-switch.d.ts +1 -1
  561. package/dist/types/components/gov-icon/gov-icon.d.ts +2 -3
  562. package/dist/types/components/gov-infobar/{default/constants.d.ts → constants.d.ts} +3 -2
  563. package/dist/types/components/gov-infobar/{default/gov-infobar.d.ts → gov-infobar.d.ts} +2 -2
  564. package/dist/types/components/gov-infobar/{default/gov-infobar.types.d.ts → gov-infobar.types.d.ts} +1 -1
  565. package/dist/types/components/gov-modal/gov-modal.d.ts +4 -0
  566. package/dist/types/components/gov-side-nav/constants.d.ts +1 -1
  567. package/dist/types/components/gov-side-nav/gov-side-nav-item.d.ts +1 -1
  568. package/dist/types/components/gov-tabs/constants.d.ts +1 -1
  569. package/dist/types/components/gov-tabs/gov-tabs-item.d.ts +1 -1
  570. package/dist/types/components/gov-tabs/gov-tabs.d.ts +5 -6
  571. package/dist/types/components/gov-tag/constants.d.ts +3 -0
  572. package/dist/types/components/gov-tag/gov-tag.d.ts +22 -0
  573. package/dist/types/components/gov-tile/gov-tile.d.ts +1 -1
  574. package/dist/types/components/gov-wizard/gov-wizard-item.d.ts +1 -1
  575. package/dist/types/components.d.ts +224 -133
  576. package/dist/types/helpers/Dom/template.types.d.ts +1 -0
  577. package/dist/types/pages/Chip.d.ts +3 -0
  578. package/dist/types/pages/Tag.d.ts +3 -0
  579. package/package.json +3 -3
  580. package/dist/cjs/constants-23b7a283.js.map +0 -1
  581. package/dist/cjs/form-f68d13c6.js.map +0 -1
  582. package/dist/cjs/gov-badge.cjs.entry.js +0 -84
  583. package/dist/cjs/gov-badge.cjs.entry.js.map +0 -1
  584. package/dist/cjs/template-e1c4ff78.js.map +0 -1
  585. package/dist/collection/components/gov-badge/constants.js.map +0 -1
  586. package/dist/collection/components/gov-badge/gov-badge.css +0 -1267
  587. package/dist/collection/components/gov-badge/gov-badge.js.map +0 -1
  588. package/dist/collection/components/gov-button/default/gov-button.js.map +0 -1
  589. package/dist/collection/components/gov-button/default/gov-button.types.js.map +0 -1
  590. package/dist/collection/components/gov-infobar/default/constants.js.map +0 -1
  591. package/dist/collection/components/gov-infobar/default/gov-infobar.js.map +0 -1
  592. package/dist/collection/components/gov-infobar/default/gov-infobar.types.js.map +0 -1
  593. package/dist/collection/pages/Badge.js.map +0 -1
  594. package/dist/components/gov-badge.js +0 -2
  595. package/dist/components/p-17c1ffc1.js +0 -2
  596. package/dist/components/p-17c1ffc1.js.map +0 -1
  597. package/dist/components/p-36be8f6e.js +0 -2
  598. package/dist/components/p-36be8f6e.js.map +0 -1
  599. package/dist/components/p-3f37ddb6.js +0 -2
  600. package/dist/components/p-3f37ddb6.js.map +0 -1
  601. package/dist/components/p-80e30702.js +0 -2
  602. package/dist/components/p-80e30702.js.map +0 -1
  603. package/dist/components/p-8d44ca3c.js +0 -2
  604. package/dist/components/p-8d44ca3c.js.map +0 -1
  605. package/dist/components/p-94542a50.js.map +0 -1
  606. package/dist/components/p-9ba6e755.js.map +0 -1
  607. package/dist/components/p-f72ecbef.js.map +0 -1
  608. package/dist/core/p-0553eb92.entry.js +0 -2
  609. package/dist/core/p-0553eb92.entry.js.map +0 -1
  610. package/dist/core/p-06699657.entry.js.map +0 -1
  611. package/dist/core/p-0c57e410.entry.js.map +0 -1
  612. package/dist/core/p-19a54ee9.entry.js.map +0 -1
  613. package/dist/core/p-1c40fdd5.entry.js.map +0 -1
  614. package/dist/core/p-32a4b7e3.entry.js.map +0 -1
  615. package/dist/core/p-34ed07f6.js +0 -2
  616. package/dist/core/p-34ed07f6.js.map +0 -1
  617. package/dist/core/p-35c1c12c.entry.js.map +0 -1
  618. package/dist/core/p-36be8f6e.js +0 -2
  619. package/dist/core/p-36be8f6e.js.map +0 -1
  620. package/dist/core/p-3bacd021.js.map +0 -1
  621. package/dist/core/p-3f37ddb6.js +0 -2
  622. package/dist/core/p-3f37ddb6.js.map +0 -1
  623. package/dist/core/p-49926f53.entry.js +0 -2
  624. package/dist/core/p-49926f53.entry.js.map +0 -1
  625. package/dist/core/p-5316e768.entry.js +0 -2
  626. package/dist/core/p-5cc3e768.entry.js +0 -2
  627. package/dist/core/p-5cc3e768.entry.js.map +0 -1
  628. package/dist/core/p-74ce7780.entry.js.map +0 -1
  629. package/dist/core/p-80e30702.js +0 -2
  630. package/dist/core/p-80e30702.js.map +0 -1
  631. package/dist/core/p-9633e7b5.entry.js.map +0 -1
  632. package/dist/core/p-acd6a9f4.entry.js.map +0 -1
  633. package/dist/core/p-afa12399.entry.js.map +0 -1
  634. package/dist/core/p-bc6f1479.entry.js.map +0 -1
  635. package/dist/core/p-bcf71ab5.entry.js +0 -2
  636. package/dist/core/p-bcf71ab5.entry.js.map +0 -1
  637. package/dist/core/p-c4c9ff83.entry.js +0 -2
  638. package/dist/core/p-c4c9ff83.entry.js.map +0 -1
  639. package/dist/core/p-c61444f7.entry.js +0 -2
  640. package/dist/core/p-c61444f7.entry.js.map +0 -1
  641. package/dist/core/p-d84b290e.entry.js +0 -2
  642. package/dist/core/p-d84b290e.entry.js.map +0 -1
  643. package/dist/core/p-da762184.entry.js +0 -2
  644. package/dist/core/p-da762184.entry.js.map +0 -1
  645. package/dist/core/p-f62efc34.entry.js.map +0 -1
  646. package/dist/core/p-fab698a7.entry.js +0 -2
  647. package/dist/core/p-fab698a7.entry.js.map +0 -1
  648. package/dist/esm/constants-24dad929.js.map +0 -1
  649. package/dist/esm/constants-ba92640d.js.map +0 -1
  650. package/dist/esm/form-2d9f68d9.js.map +0 -1
  651. package/dist/esm/gov-badge.entry.js +0 -80
  652. package/dist/esm/gov-badge.entry.js.map +0 -1
  653. package/dist/esm/template-10332292.js.map +0 -1
  654. package/dist/types/pages/Badge.d.ts +0 -3
  655. /package/dist/collection/components/gov-button/{default → button}/constants.js +0 -0
  656. /package/dist/collection/components/gov-button/{default → button}/gov-button.types.js +0 -0
  657. /package/dist/collection/components/gov-infobar/{default/gov-infobar.types.js → gov-infobar.types.js} +0 -0
  658. /package/dist/components/{gov-badge.js.map → gov-chip.js.map} +0 -0
  659. /package/dist/components/{p-1b4f2520.js.map → p-25b64ce2.js.map} +0 -0
  660. /package/dist/components/{p-3e8a9e92.js.map → p-6b256c8e.js.map} +0 -0
  661. /package/dist/components/{p-8da17139.js.map → p-b60b159d.js.map} +0 -0
  662. /package/dist/components/{p-b3cb7945.js.map → p-dde10734.js.map} +0 -0
  663. /package/dist/components/{p-bc5d5903.js.map → p-ee3a01c0.js.map} +0 -0
  664. /package/dist/core/{p-7702c8c2.entry.js.map → p-046613ca.entry.js.map} +0 -0
  665. /package/dist/core/{p-1c62f175.entry.js.map → p-1e41751e.entry.js.map} +0 -0
  666. /package/dist/core/{p-e5227e40.entry.js.map → p-21a02f11.entry.js.map} +0 -0
  667. /package/dist/core/{p-6f43bd00.entry.js.map → p-28d98a7d.entry.js.map} +0 -0
  668. /package/dist/core/{p-e2d6efaf.entry.js.map → p-2c5b8f32.entry.js.map} +0 -0
  669. /package/dist/core/{p-1da9f871.entry.js.map → p-3191317e.entry.js.map} +0 -0
  670. /package/dist/core/{p-7372b066.entry.js.map → p-34613499.entry.js.map} +0 -0
  671. /package/dist/core/{p-88010439.entry.js.map → p-3d11d9a0.entry.js.map} +0 -0
  672. /package/dist/core/{p-7fa1290e.entry.js.map → p-409f054b.entry.js.map} +0 -0
  673. /package/dist/core/{p-2bb9f781.entry.js.map → p-679625c1.entry.js.map} +0 -0
  674. /package/dist/core/{p-19b897c0.entry.js.map → p-7632b949.entry.js.map} +0 -0
  675. /package/dist/core/{p-80f5140b.entry.js.map → p-7b01e961.entry.js.map} +0 -0
  676. /package/dist/core/{p-93897e60.entry.js.map → p-7c38556b.entry.js.map} +0 -0
  677. /package/dist/core/{p-7e8d2066.entry.js.map → p-7e11320f.entry.js.map} +0 -0
  678. /package/dist/core/{p-c81d62db.entry.js.map → p-80ebaaf5.entry.js.map} +0 -0
  679. /package/dist/core/{p-93042b25.entry.js.map → p-83512243.entry.js.map} +0 -0
  680. /package/dist/core/{p-739dd451.entry.js.map → p-84e61610.entry.js.map} +0 -0
  681. /package/dist/core/{p-998c3336.entry.js.map → p-87a91e77.entry.js.map} +0 -0
  682. /package/dist/core/{p-4452c278.entry.js.map → p-8a931ff2.entry.js.map} +0 -0
  683. /package/dist/core/{p-041d30b1.entry.js.map → p-8e5599d1.entry.js.map} +0 -0
  684. /package/dist/core/{p-e1780dba.entry.js.map → p-96354948.entry.js.map} +0 -0
  685. /package/dist/core/{p-2fe9d3ea.entry.js.map → p-a8b5ac68.entry.js.map} +0 -0
  686. /package/dist/core/{p-228da18e.entry.js.map → p-af42ea63.entry.js.map} +0 -0
  687. /package/dist/core/{p-88a78167.entry.js.map → p-c13ad31c.entry.js.map} +0 -0
  688. /package/dist/core/{p-28f39f69.entry.js.map → p-d6e6d683.entry.js.map} +0 -0
  689. /package/dist/core/{p-a7719b55.entry.js.map → p-e4ae862e.entry.js.map} +0 -0
  690. /package/dist/core/{p-89921159.entry.js.map → p-f069df4a.entry.js.map} +0 -0
  691. /package/dist/core/{p-0eb11cfc.entry.js.map → p-ff061e6b.entry.js.map} +0 -0
  692. /package/dist/types/components/gov-button/{default → button}/constants.d.ts +0 -0
  693. /package/dist/types/components/gov-button/{default → button}/gov-button.types.d.ts +0 -0
@@ -1 +1 @@
1
- {"file":"gov-tooltip-content.entry.js","mappings":";;;;;;;AAAA,MAAM,oBAAoB,GAAG,wnIAAwnI;;MCQxoI,iBAAiB;;;mBAOmB,cAAc,CAAC,OAAO;gBAI5B,WAAW,CAAC,EAAE;mBAI5B,KAAK;qBAI6B,KAAK;oBAId,IAAI;;EAGzD,cAAc,CAAC,QAAiB;IAC/B,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC1B,IAAI,QAAQ,KAAK,KAAK,EAAE;MACvB,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC;QACzB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAA;OACrC,EAAE,GAAG,CAAC,CAAA;KACP;SAAM;MACN,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,SAAS,CAAA;KACtC;GACD;EAED,WAAW;IACV,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;IACtB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;IACpB,MAAM,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAA0B,CAAA;IAChF,IAAI,QAAQ,EAAE;MACb,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAA;KACvB;GACD;EAED,MAAM;IACL,QACC,EAAC,IAAI,IACJ,KAAK,EAAE,mBAAmB,CAAC,IAAI,EAC/B,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,CAAC,IAAI,CAAC,SAAS,iBACV,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,gBAC5B,IAAI,CAAC,SAAS,IAC1B,eAAa,EACZ,IAAI,CAAC,OAAO,IACZ,kCACe,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EACzC,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,IAAI,CAAC,OAAO,KAAK,cAAc,CAAC,SAAS,IAClD,gBAAU,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAa,CACzD,IACV,IAAI,CACF,EACP;GACD;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip-content.scss?tag=gov-tooltip-content","../../../packages/core/src/components/gov-tooltip/gov-tooltip-content.tsx"],"sourcesContent":["/*\n * Tooltip - Content\n */\n\n$class: \".gov-tooltip-content\";\n\n#{$class} {\n\t@include z-index(\"bar\", 1);\n\t@include typography($font-size-m);\n\tposition: absolute;\n\tdisplay: block;\n\twidth: max-content;\n\tmax-width: $tooltip-content-max-width;\n\tpadding: rem-calc(16);\n\tborder-radius: rem-calc(3);\n\tbackground-color: $tooltip-content-bg-color;\n\tcolor: $tooltip-content-text-color;\n\tletter-spacing: rem-calc(0.2);\n\tvisibility: hidden;\n\topacity: 0;\n\ttransition: opacity 0.2s ease-in;\n\t&::before {\n\t\t@include pseudo();\n\t\twidth: 0;\n\t\theight: 0;\n\t\tborder: rem-calc(10) solid transparent;\n\t}\n\n\t& gov-button {\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\t}\n\n\t// STATES\n\t@include parameter(\"is-visible\") {\n\t\topacity: 1;\n\t}\n\n\t// VARIANTS\n\t@each $variant, $definitions in $tooltip-content-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t--#{$prefix}tooltip-content-bg-color: #{get(\"bg-color\", $definitions)};\n\t\t\t--#{$prefix}tooltip-content-text-color: #{get(\"text-color\", $definitions)};\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\t--#{$prefix}tooltip-content-bg-color: #{color(\"neutral.white\")};\n\t\t\t\t--#{$prefix}tooltip-content-text-color: #{get(\"text-color-inverse\", $definitions)};\n\t\t\t}\n\t\t}\n\t}\n\t@each $size, $definitions in $tooltip-content-sizes {\n\t\t&[size=\"#{$size}\"] {\n\t\t\t--#{$prefix}tooltip-content-padding: #{get(\"padding\", $definitions)};\n\t\t\t--#{$prefix}tooltip-content-arrow-size: #{get(\"arrow-size\", $definitions)};\n\t\t\t--#{$prefix}tooltip-content-letter-spacing: #{get(\"letter-spacing\", $definitions)};\n\t\t\t@include typography(get(\"typography\", $definitions));\n\t\t}\n\t}\n\t@each $position, $definitions in $tooltip-content-positions {\n\t\t$oppositeProperty: get(\"oppositeProperty\", $definitions);\n\n\t\t&[position=\"#{$position}\"] {\n\t\t\t&::before {\n\t\t\t\t#{get(\"directionProperty\", $definitions)}: 50%;\n\t\t\t\ttransform: #{get(\"transformFn\", $definitions) }(-50%);\n\t\t\t}\n\t\t\t&::before {\n\t\t\t\t#{$position}: 100%;\n\t\t\t\tborder-#{$oppositeProperty}-width: 0;\n\t\t\t\tborder-#{$position}-color: $tooltip-content-bg-color;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { TooltipContentClass, TooltipSize, TooltipSizeType, TooltipVariant, TooltipVariantType } from \"./constants\"\nimport { toBoolAttr } from \"../../helpers/Dom/template\"\n\n@Component({\n\ttag: \"gov-tooltip-content\",\n\tstyleUrl: \"gov-tooltip-content.scss\",\n})\nexport class GovTooltipContent {\n\tprivate timeout\n\n\t@Element() host: HTMLGovTooltipContentElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly variant?: TooltipVariantType = TooltipVariant.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip is still visible.\n\t */\n\t@Prop() persist?: boolean = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"is-visible\", mutable: true }) isVisible = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"parent-id\" }) parentId: string = null\n\n\t@Watch(\"isVisible\")\n\tvisibleContent(newValue: boolean): void {\n\t\tclearTimeout(this.timeout)\n\t\tif (newValue === false) {\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.host.style.visibility = \"hidden\"\n\t\t\t}, 250)\n\t\t} else {\n\t\t\tthis.host.style.visibility = \"visible\"\n\t\t}\n\t}\n\n\thideContent() {\n\t\tthis.isVisible = false\n\t\tthis.persist = false\n\t\tconst parentEl = document.getElementById(this.parentId) as HTMLGovTooltipElement\n\t\tif (parentEl) {\n\t\t\tparentEl.hide().catch()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={TooltipContentClass.root}\n\t\t\t\trole={\"tooltip\"}\n\t\t\t\thidden={!this.isVisible}\n\t\t\t\taria-hidden={!toBoolAttr(this.isVisible)}\n\t\t\t\tis-visible={this.isVisible}>\n\t\t\t\t<slot></slot>\n\t\t\t\t{this.persist ? (\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\ton-gov-click={this.hideContent.bind(this)}\n\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\ttype={\"base\"}\n\t\t\t\t\t\tinverse={this.variant === TooltipVariant.SECONDARY}>\n\t\t\t\t\t\t<gov-icon slot={\"left-icon\"} name={\"x-lg\"} type={\"basic\"}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-tooltip-content.entry.js","mappings":";;;;;;;AAAA,MAAM,oBAAoB,GAAG,k8IAAk8I;;MCQl9I,iBAAiB;;;mBAOmB,cAAc,CAAC,OAAO;gBAI5B,WAAW,CAAC,EAAE;mBAI5B,KAAK;qBAI6B,KAAK;oBAId,IAAI;;EAGzD,cAAc,CAAC,QAAiB;IAC/B,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC1B,IAAI,QAAQ,KAAK,KAAK,EAAE;MACvB,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC;QACzB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAA;OACrC,EAAE,GAAG,CAAC,CAAA;KACP;SAAM;MACN,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,SAAS,CAAA;KACtC;GACD;EAED,WAAW;IACV,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;IACtB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;IACpB,MAAM,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAA0B,CAAA;IAChF,IAAI,QAAQ,EAAE;MACb,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAA;KACvB;GACD;EAED,MAAM;IACL,QACC,EAAC,IAAI,IACJ,KAAK,EAAE,mBAAmB,CAAC,IAAI,EAC/B,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,CAAC,IAAI,CAAC,SAAS,iBACV,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,gBAC5B,IAAI,CAAC,SAAS,IAC1B,eAAa,EACZ,IAAI,CAAC,OAAO,IACZ,kCACe,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EACzC,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,IAAI,CAAC,OAAO,KAAK,cAAc,CAAC,SAAS,IAClD,gBAAU,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAa,CACzD,IACV,IAAI,CACF,EACP;GACD;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip-content.scss?tag=gov-tooltip-content","../../../packages/core/src/components/gov-tooltip/gov-tooltip-content.tsx"],"sourcesContent":["/*\n * Tooltip - Content\n */\n\n$class: \".gov-tooltip-content\";\n\n#{$class} {\n @include z-index(\"bar\", 1);\n @include typography($font-size-m);\n position: absolute;\n display: block;\n width: max-content;\n\n max-width: $tooltip-content-max-width;\n padding: rem-calc(16);\n border-radius: rem-calc(3);\n background-color: $tooltip-content-bg-color;\n color: $tooltip-content-text-color;\n letter-spacing: rem-calc(0.2);\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.2s ease-in;\n\n &::before {\n @include pseudo();\n width: 0;\n height: 0;\n border: rem-calc(10) solid transparent;\n }\n\n & gov-button {\n position: absolute;\n right: 0;\n top: 0;\n }\n\n @include parameter(\"persist\") {\n padding-right: rem-calc(52);\n }\n\n // STATES\n @include parameter(\"is-visible\") {\n opacity: 1;\n }\n\n // VARIANTS\n @each $variant, $definitions in $tooltip-content-variants {\n &[variant=\"#{$variant}\"] {\n --#{$prefix}tooltip-content-bg-color: #{get(\"bg-color\", $definitions)};\n --#{$prefix}tooltip-content-text-color: #{get(\"text-color\", $definitions)};\n\n // STATES\n @include parameter(\"inverse\") {\n --#{$prefix}tooltip-content-bg-color: #{color(\"neutral.white\")};\n --#{$prefix}tooltip-content-text-color: #{get(\"text-color-inverse\", $definitions)};\n }\n }\n }\n @each $size, $definitions in $tooltip-content-sizes {\n &[size=\"#{$size}\"] {\n --#{$prefix}tooltip-content-padding: #{get(\"padding\", $definitions)};\n --#{$prefix}tooltip-content-arrow-size: #{get(\"arrow-size\", $definitions)};\n --#{$prefix}tooltip-content-letter-spacing: #{get(\"letter-spacing\", $definitions)};\n @include typography(get(\"typography\", $definitions));\n\n &[persist=\"true\" i] {\n padding-right: #{get(\"persist-space\", $definitions)};\n }\n }\n }\n @each $position, $definitions in $tooltip-content-positions {\n $oppositeProperty: get(\"oppositeProperty\", $definitions);\n\n &[position=\"#{$position}\"] {\n &::before {\n #{get(\"directionProperty\", $definitions)}: 50%;\n transform: #{get(\"transformFn\", $definitions) }(-50%);\n }\n\n &::before {\n #{$position}: 100%;\n border-#{$oppositeProperty}-width: 0;\n border-#{$position}-color: $tooltip-content-bg-color;\n }\n }\n }\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { TooltipContentClass, TooltipSize, TooltipSizeType, TooltipVariant, TooltipVariantType } from \"./constants\"\nimport { toBoolAttr } from \"../../helpers/Dom/template\"\n\n@Component({\n\ttag: \"gov-tooltip-content\",\n\tstyleUrl: \"gov-tooltip-content.scss\",\n})\nexport class GovTooltipContent {\n\tprivate timeout\n\n\t@Element() host: HTMLGovTooltipContentElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly variant?: TooltipVariantType = TooltipVariant.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip is still visible.\n\t */\n\t@Prop() persist?: boolean = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"is-visible\", mutable: true }) isVisible = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"parent-id\" }) parentId: string = null\n\n\t@Watch(\"isVisible\")\n\tvisibleContent(newValue: boolean): void {\n\t\tclearTimeout(this.timeout)\n\t\tif (newValue === false) {\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.host.style.visibility = \"hidden\"\n\t\t\t}, 250)\n\t\t} else {\n\t\t\tthis.host.style.visibility = \"visible\"\n\t\t}\n\t}\n\n\thideContent() {\n\t\tthis.isVisible = false\n\t\tthis.persist = false\n\t\tconst parentEl = document.getElementById(this.parentId) as HTMLGovTooltipElement\n\t\tif (parentEl) {\n\t\t\tparentEl.hide().catch()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={TooltipContentClass.root}\n\t\t\t\trole={\"tooltip\"}\n\t\t\t\thidden={!this.isVisible}\n\t\t\t\taria-hidden={!toBoolAttr(this.isVisible)}\n\t\t\t\tis-visible={this.isVisible}>\n\t\t\t\t<slot></slot>\n\t\t\t\t{this.persist ? (\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\ton-gov-click={this.hideContent.bind(this)}\n\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\ttype={\"base\"}\n\t\t\t\t\t\tinverse={this.variant === TooltipVariant.SECONDARY}>\n\t\t\t\t\t\t<gov-icon slot={\"left-icon\"} name={\"x-lg\"} type={\"basic\"}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
@@ -2,13 +2,13 @@ import { r as registerInstance, h, H as Host, g as getElement } from './index-ae
2
2
  import { v as validateProp } from './props-789f7529.js';
3
3
  import { T as TooltipVariant, a as TooltipSize, b as TooltipContentClass, c as TooltipPosition, d as TooltipClass } from './constants-887c5391.js';
4
4
  import { c as createID } from './string.utils-f268fc6b.js';
5
- import { g as govHost } from './template-10332292.js';
5
+ import { g as govHost } from './template-df429738.js';
6
6
  import './gov.log-af905420.js';
7
7
  import './variants-2b936d58.js';
8
8
  import './sizes-6c5943b4.js';
9
9
  import './utils-c057a3fa.js';
10
10
 
11
- const govTooltipCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-tooltip{position:relative;display:inline;border-bottom:1px dashed currentcolor;color:var(--gov-color-primary);cursor:help}.gov-tooltip[icon=\"\"],.gov-tooltip[icon=true i],.gov-tooltip[icon=\"1\"]{display:inline-flex;border-bottom:0}";
11
+ const govTooltipCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-tooltip{position:relative;display:inline-block;border-bottom:1px dashed currentcolor;color:var(--gov-color-primary);cursor:help}.gov-tooltip[icon=\"\"],.gov-tooltip[icon=true i],.gov-tooltip[icon=\"1\"]{display:inline-flex;border-bottom:0}";
12
12
 
13
13
  const GovTooltip = class {
14
14
  constructor(hostRef) {
@@ -56,6 +56,10 @@ const GovTooltip = class {
56
56
  this.content.innerHTML = this.message;
57
57
  this.host.appendChild(this.content);
58
58
  }
59
+ const trigger = this.host.getBoundingClientRect();
60
+ this.content.style.left = trigger.left + 'px';
61
+ this.content.style.top = trigger.top + 'px';
62
+ this.content.style.visibility = 'hidden';
59
63
  this.content.setAttribute("id", (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipContentId);
60
64
  this.content.setAttribute("parent-id", this.tooltipId);
61
65
  this.content.setAttribute("variant", this.variant);
@@ -91,6 +95,7 @@ const GovTooltip = class {
91
95
  }
92
96
  verifyPositionSpace() {
93
97
  const offset = 12;
98
+ const windowWidth = window.innerWidth;
94
99
  const trigger = this.host.getBoundingClientRect();
95
100
  const trgWidth = this.host.offsetWidth;
96
101
  const trgHeight = this.host.offsetHeight;
@@ -100,9 +105,21 @@ const GovTooltip = class {
100
105
  left: trigger.left + document.documentElement.scrollLeft,
101
106
  top: trigger.top + document.documentElement.scrollTop,
102
107
  };
103
- // @TODO check space for displaying tooltip
108
+ const isRightSpace = ((triggerPos.left + offset + trigger.width) + contentWidth) <= windowWidth;
109
+ const isLeftSpace = triggerPos.left > contentWidth;
110
+ // LEFT/RIGHT
104
111
  if (this.position === TooltipPosition.LEFT || this.position === TooltipPosition.RIGHT) {
105
112
  this.content.style.top = (triggerPos.top - ((contentHeight - trgHeight) / 2)) + "px";
113
+ if (isRightSpace === false && isLeftSpace === false) {
114
+ this.position = TooltipPosition.TOP;
115
+ this.content.setAttribute("position", TooltipPosition.TOP);
116
+ }
117
+ if (isLeftSpace && isRightSpace === false && this.position === TooltipPosition.RIGHT) {
118
+ this.position = TooltipPosition.LEFT;
119
+ }
120
+ if (isRightSpace && isLeftSpace === false && this.position === TooltipPosition.LEFT) {
121
+ this.position = TooltipPosition.RIGHT;
122
+ }
106
123
  }
107
124
  if (this.position === TooltipPosition.RIGHT) {
108
125
  this.content.setAttribute("position", TooltipPosition.RIGHT);
@@ -112,12 +129,30 @@ const GovTooltip = class {
112
129
  this.content.setAttribute("position", TooltipPosition.LEFT);
113
130
  this.content.style.left = (triggerPos.left - (contentWidth + offset)) + "px";
114
131
  }
132
+ // LEFT/RIGHT FOR TOP/BOTTOM
115
133
  if (this.position === TooltipPosition.TOP || this.position === TooltipPosition.BOTTOM) {
116
134
  if (contentWidth > trgWidth) {
117
- this.content.style.left = (triggerPos.left - ((contentWidth - trgWidth) / 2)) + "px";
135
+ let leftPosition = (triggerPos.left - ((contentWidth - trgWidth) / 2));
136
+ const isNotLeftSpace = leftPosition < 0;
137
+ const isNotRightSpace = (leftPosition + contentWidth) > windowWidth;
138
+ if (isNotLeftSpace && isNotRightSpace) {
139
+ this.content.style.width = "auto";
140
+ this.content.style.left = offset + "px";
141
+ this.content.style.right = offset + "px";
142
+ }
143
+ else {
144
+ if (isNotLeftSpace) {
145
+ leftPosition = offset;
146
+ }
147
+ if (isNotRightSpace) {
148
+ leftPosition = leftPosition - ((windowWidth - (leftPosition + contentWidth + offset)) * -1);
149
+ }
150
+ this.content.style.left = leftPosition + "px";
151
+ }
118
152
  }
119
153
  else {
120
- this.content.style.left = (triggerPos.left + ((trgWidth - contentWidth) / 2)) + "px";
154
+ const leftPosition = (triggerPos.left + ((trgWidth - contentWidth) / 2));
155
+ this.content.style.left = leftPosition + "px";
121
156
  }
122
157
  }
123
158
  if (this.position === TooltipPosition.TOP) {
@@ -1 +1 @@
1
- {"file":"gov-tooltip.entry.js","mappings":";;;;;;;;;;AAAA,MAAM,aAAa,GAAG,skBAAskB;;MCoB/kB,UAAU;EAMtB;;IAHiB,qBAAgB,GAAG,SAAS,CAAA;IAC5B,cAAS,GAAG,SAAS,CAAA;mBAYU,cAAc,CAAC,OAAO;gBAI5B,WAAW,CAAC,EAAE;oBAIhB,OAAO;mBAIZ,SAAS;;gBAQU,SAAS;mBAE5C,KAAK;IA/BvB,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAA;IACvC,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAAA;GACrD;EA+BD,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,cAAc,EAAE,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;GACzD;EAGD,YAAY,CAAC,QAAgB;IAC5B,YAAY,CAAC,WAAW,EAAE,QAAQ,EAAE,YAAY,CAAC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,EAAE,MAAM,CAAC,CAAA;OAC5C;KACD;GACD;EAEO,WAAW;IAClB,IAAI,IAAI,CAAC,OAAO,EAAE;MACjB,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;MAChD,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;KAC7C;GACD;EAEO,aAAa;IACpB,MAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;IAChE,IAAI,SAAS,EAAE;MACd,SAAS,CAAC,MAAM,EAAE,CAAA;KAClB;GACD;EAED,MAAM;;IACL,QACC,EAAC,IAAI,IACJ,EAAE,EAAE,IAAI,CAAC,SAAS,EAClB,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EACxC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,CAAC,sBACO,MAAA,IAAI,CAAC,UAAU,mCAAI,IAAI,CAAC,gBAAgB,IAC1D,eAAQ,CACF,EACP;GACD;;;;EAMD,MAAM,IAAI;IACT,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMD,MAAM,IAAI;IACT,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;IACpB,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip.scss?tag=gov-tooltip","../../../packages/core/src/components/gov-tooltip/gov-tooltip.tsx"],"sourcesContent":["/*\n * Tooltip\n */\n\n$class: \".gov-tooltip\";\n\n#{$class} {\n\tposition: relative;\n\tdisplay: inline;\n\tborder-bottom: 1px dashed currentcolor;\n\tcolor: color(\"primary\");\n\tcursor: help;\n\n\t@include parameter(\"icon\") {\n\t\tdisplay: inline-flex;\n\t\tborder-bottom: 0;\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport {\n\tTooltipClass,\n\tTooltipContentClass,\n\tTooltipPosition,\n\tTooltipPositionType,\n\tTooltipSize,\n\tTooltipSizeType,\n\tTooltipVariant,\n\tTooltipVariantType,\n} from \"./constants\"\nimport { createID } from \"../../utils/string.utils\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\n\n@Component({\n\ttag: \"gov-tooltip\",\n\tstyleUrl: \"gov-tooltip.scss\",\n})\nexport class GovTooltip {\n\tprivate h: GovHost\n\tprivate content: HTMLGovTooltipContentElement\n\tprivate readonly tooltipContentId = undefined\n\tprivate readonly tooltipId = undefined\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.tooltipId = createID(\"GovTooltip\")\n\t\tthis.tooltipContentId = createID(\"GovContentTooltip\")\n\t}\n\n\t@Element() host: HTMLGovTooltipElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly variant?: TooltipVariantType = TooltipVariant.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip display position\n\t */\n\t@Prop() position: TooltipPositionType = \"right\"\n\t/**\n\t * Information contained in the tooltip\n\t */\n\t@Prop() readonly message: string = undefined\n\t/**\n\t * Custom tooltip identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Trigger is just an icon\n\t */\n\t@Prop({ attribute: \"icon\" }) readonly icon: boolean = undefined\n\n\t@State() persist = false\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(TooltipVariant, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TooltipSize, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"position\")\n\tvalidatePosition(newValue: string): void {\n\t\tvalidateProp(TooltipPosition, newValue, TooltipClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t\tthis.validatePosition(this.position)\n\n\t\tthis.createContentWrapper()\n\t\tthis.registerListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.removeContent()\n\t}\n\n\tprivate createContentWrapper() {\n\t\tconst hasContentInside = this.host.querySelector(TooltipContentClass.root) as HTMLGovTooltipContentElement\n\t\tif (hasContentInside) {\n\t\t\tthis.content = hasContentInside\n\t\t} else {\n\t\t\tthis.content = document.createElement(TooltipContentClass.root) as HTMLGovTooltipContentElement\n\t\t\tthis.content.innerHTML = this.message\n\t\t\tthis.host.appendChild(this.content)\n\t\t}\n\n\t\tthis.content.setAttribute(\"id\", this.identifier ?? this.tooltipContentId)\n\t\tthis.content.setAttribute(\"parent-id\", this.tooltipId)\n\t\tthis.content.setAttribute(\"variant\", this.variant)\n\t\tthis.content.setAttribute(\"size\", this.size)\n\t\tdocument.body.appendChild(this.content)\n\t}\n\n\tprivate registerListeners() {\n\t\tthis.host.addEventListener(\"click\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.persist = true\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"focus\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"blur\", e => {\n\t\t\te.preventDefault()\n\t\t\tif (this.persist === false) {\n\t\t\t\tthis.hideTooltip()\n\t\t\t}\n\t\t})\n\t\tthis.host.addEventListener(\"mouseenter\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseleave\", e => {\n\t\t\te.preventDefault()\n\t\t\tif (this.persist === false) {\n\t\t\t\tthis.hideTooltip()\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate verifyPositionSpace() {\n\t\tconst offset = 12\n\t\tconst trigger = this.host.getBoundingClientRect()\n\t\tconst trgWidth = this.host.offsetWidth\n\t\tconst trgHeight = this.host.offsetHeight\n\t\tconst contentWidth = this.content.offsetWidth\n\t\tconst contentHeight = this.content.offsetHeight\n\t\tconst triggerPos = {\n\t\t\tleft: trigger.left + document.documentElement.scrollLeft,\n\t\t\ttop: trigger.top + document.documentElement.scrollTop,\n\t\t}\n\t\t// @TODO check space for displaying tooltip\n\t\tif (this.position === TooltipPosition.LEFT || this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.content.style.top = (triggerPos.top - ((contentHeight - trgHeight) / 2)) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.content.setAttribute(\"position\", TooltipPosition.RIGHT)\n\t\t\tthis.content.style.left = (triggerPos.left + offset + trigger.width) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.LEFT) {\n\t\t\tthis.content.setAttribute(\"position\", TooltipPosition.LEFT)\n\t\t\tthis.content.style.left = (triggerPos.left - (contentWidth + offset)) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.TOP || this.position === TooltipPosition.BOTTOM) {\n\t\t\tif (contentWidth > trgWidth) {\n\t\t\t\tthis.content.style.left = (triggerPos.left - ((contentWidth - trgWidth) / 2)) + \"px\"\n\t\t\t} else {\n\t\t\t\tthis.content.style.left = (triggerPos.left + ((trgWidth - contentWidth) / 2)) + \"px\"\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.TOP) {\n\t\t\tthis.content.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\tthis.content.style.top = (triggerPos.top - (contentHeight + offset)) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.BOTTOM) {\n\t\t\tthis.content.setAttribute(\"position\", TooltipPosition.BOTTOM)\n\t\t\tthis.content.style.top = (triggerPos.top + (trgHeight + offset)) + \"px\"\n\t\t}\n\t}\n\n\tprivate showTooltip() {\n\t\tif (this.content) {\n\t\t\tthis.verifyPositionSpace()\n\t\t\tthis.content.setAttribute(\"is-visible\", \"true\")\n\t\t\tif (this.persist) {\n\t\t\t\tthis.content.setAttribute(\"persist\", \"true\")\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate hideTooltip() {\n\t\tif (this.content) {\n\t\t\tthis.content.setAttribute(\"is-visible\", \"false\")\n\t\t\tthis.content.setAttribute(\"persist\", \"false\")\n\t\t}\n\t}\n\n\tprivate removeContent() {\n\t\tconst contentEl = document.getElementById(this.tooltipContentId)\n\t\tif (contentEl) {\n\t\t\tcontentEl.remove()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tid={this.tooltipId}\n\t\t\t\tclass={this.h.classes(TooltipClass.root)}\n\t\t\t\tposition={this.position}\n\t\t\t\ttabindex={0}\n\t\t\t\taria-describedby={this.identifier ?? this.tooltipContentId}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showTooltip()\n\t}\n\n\t/**\n\t * Hiding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.persist = false\n\t\tthis.hideTooltip()\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-tooltip.entry.js","mappings":";;;;;;;;;;AAAA,MAAM,aAAa,GAAG,4kBAA4kB;;MCoBrlB,UAAU;EAMrB;;IAHiB,qBAAgB,GAAG,SAAS,CAAA;IAC5B,cAAS,GAAG,SAAS,CAAA;mBAYU,cAAc,CAAC,OAAO;gBAI5B,WAAW,CAAC,EAAE;oBAID,OAAO;mBAI3B,SAAS;;gBAQI,SAAS;mBAEtC,KAAK;IA/BtB,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAA;IACvC,IAAI,CAAC,gBAAgB,GAAG,QAAQ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CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EACxC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,CAAC,sBACO,MAAA,IAAI,CAAC,UAAU,mCAAI,IAAI,CAAC,gBAAgB,IAC1D,eAAO,CACF,EACR;GACF;;;;EAMD,MAAM,IAAI;IACR,IAAI,CAAC,WAAW,EAAE,CAAA;GACnB;;;;EAMD,MAAM,IAAI;IACR,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;IACpB,IAAI,CAAC,WAAW,EAAE,CAAA;GACnB;;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip.scss?tag=gov-tooltip","../../../packages/core/src/components/gov-tooltip/gov-tooltip.tsx"],"sourcesContent":["/*\n * Tooltip\n */\n\n$class: \".gov-tooltip\";\n\n#{$class} {\n\tposition: relative;\n\tdisplay: inline-block;\n\tborder-bottom: 1px dashed currentcolor;\n\tcolor: color(\"primary\");\n\tcursor: help;\n\n\t@include parameter(\"icon\") {\n\t\tdisplay: inline-flex;\n\t\tborder-bottom: 0;\n\t}\n}\n","import {Component, Element, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n TooltipClass,\n TooltipContentClass,\n TooltipPosition,\n TooltipPositionType,\n TooltipSize,\n TooltipSizeType,\n TooltipVariant,\n TooltipVariantType,\n} from \"./constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\n\n@Component({\n tag: \"gov-tooltip\",\n styleUrl: \"gov-tooltip.scss\",\n})\nexport class GovTooltip {\n private h: GovHost\n private content: HTMLGovTooltipContentElement\n private readonly tooltipContentId = undefined\n private readonly tooltipId = undefined\n\n constructor() {\n this.h = govHost(this.host)\n this.tooltipId = createID(\"GovTooltip\")\n this.tooltipContentId = createID(\"GovContentTooltip\")\n }\n\n @Element() host: HTMLGovTooltipElement\n /**\n * Style variation of the tooltip\n */\n @Prop() readonly variant?: TooltipVariantType = TooltipVariant.PRIMARY\n /**\n * Tooltip’s size.\n */\n @Prop() readonly size?: TooltipSizeType = TooltipSize._M\n /**\n * Tooltip display position\n */\n @Prop({mutable: true}) position: TooltipPositionType = \"right\"\n /**\n * Information contained in the tooltip\n */\n @Prop() readonly message: string = undefined\n /**\n * Custom tooltip identifier.\n */\n @Prop({attribute: \"identifier\"}) readonly identifier: string\n /**\n * Trigger is just an icon\n */\n @Prop({reflect: true}) readonly icon: boolean = undefined\n\n @State() persist = false\n\n @Watch(\"variant\")\n validateVariant(newValue: string): void {\n validateProp(TooltipVariant, newValue, TooltipClass.root)\n }\n\n @Watch(\"size\")\n validateSize(newValue: string): void {\n validateProp(TooltipSize, newValue, TooltipClass.root)\n }\n\n @Watch(\"position\")\n validatePosition(newValue: string): void {\n validateProp(TooltipPosition, newValue, TooltipClass.root)\n }\n\n componentWillLoad(): void {\n this.validateVariant(this.variant)\n this.validateSize(this.size)\n this.validatePosition(this.position)\n\n this.createContentWrapper()\n this.registerListeners()\n }\n\n disconnectedCallback() {\n this.removeContent()\n }\n\n private createContentWrapper() {\n const hasContentInside = this.host.querySelector(TooltipContentClass.root) as HTMLGovTooltipContentElement\n if (hasContentInside) {\n this.content = hasContentInside\n } else {\n this.content = document.createElement(TooltipContentClass.root) as HTMLGovTooltipContentElement\n this.content.innerHTML = this.message\n this.host.appendChild(this.content)\n }\n\n const trigger = this.host.getBoundingClientRect()\n this.content.style.left = trigger.left + 'px'\n this.content.style.top = trigger.top + 'px'\n this.content.style.visibility = 'hidden'\n\n this.content.setAttribute(\"id\", this.identifier ?? this.tooltipContentId)\n this.content.setAttribute(\"parent-id\", this.tooltipId)\n this.content.setAttribute(\"variant\", this.variant)\n this.content.setAttribute(\"size\", this.size)\n document.body.appendChild(this.content)\n }\n\n private registerListeners() {\n this.host.addEventListener(\"click\", e => {\n e.preventDefault()\n this.persist = true\n this.showTooltip()\n })\n this.host.addEventListener(\"focus\", e => {\n e.preventDefault()\n this.showTooltip()\n })\n this.host.addEventListener(\"blur\", e => {\n e.preventDefault()\n if (this.persist === false) {\n this.hideTooltip()\n }\n })\n this.host.addEventListener(\"mouseenter\", e => {\n e.preventDefault()\n this.showTooltip()\n })\n this.host.addEventListener(\"mouseleave\", e => {\n e.preventDefault()\n if (this.persist === false) {\n this.hideTooltip()\n }\n })\n }\n\n private verifyPositionSpace() {\n const offset = 12\n const windowWidth = window.innerWidth\n const trigger = this.host.getBoundingClientRect()\n const trgWidth = this.host.offsetWidth\n const trgHeight = this.host.offsetHeight\n const contentWidth = this.content.offsetWidth\n const contentHeight = this.content.offsetHeight\n const triggerPos = {\n left: trigger.left + document.documentElement.scrollLeft,\n top: trigger.top + document.documentElement.scrollTop,\n }\n\n const isRightSpace = ((triggerPos.left + offset + trigger.width) + contentWidth) <= windowWidth;\n const isLeftSpace = triggerPos.left > contentWidth;\n\n // LEFT/RIGHT\n if (this.position === TooltipPosition.LEFT || this.position === TooltipPosition.RIGHT) {\n this.content.style.top = (triggerPos.top - ((contentHeight - trgHeight) / 2)) + \"px\";\n if (isRightSpace === false && isLeftSpace === false) {\n this.position = TooltipPosition.TOP\n this.content.setAttribute(\"position\", TooltipPosition.TOP)\n }\n if (isLeftSpace && isRightSpace === false && this.position === TooltipPosition.RIGHT) {\n this.position = TooltipPosition.LEFT\n }\n if (isRightSpace && isLeftSpace === false && this.position === TooltipPosition.LEFT) {\n this.position = TooltipPosition.RIGHT\n }\n }\n if (this.position === TooltipPosition.RIGHT) {\n this.content.setAttribute(\"position\", TooltipPosition.RIGHT)\n this.content.style.left = (triggerPos.left + offset + trigger.width) + \"px\"\n }\n if (this.position === TooltipPosition.LEFT) {\n this.content.setAttribute(\"position\", TooltipPosition.LEFT)\n this.content.style.left = (triggerPos.left - (contentWidth + offset)) + \"px\"\n }\n\n // LEFT/RIGHT FOR TOP/BOTTOM\n if (this.position === TooltipPosition.TOP || this.position === TooltipPosition.BOTTOM) {\n if (contentWidth > trgWidth) {\n let leftPosition = (triggerPos.left - ((contentWidth - trgWidth) / 2));\n const isNotLeftSpace = leftPosition < 0;\n const isNotRightSpace = (leftPosition + contentWidth) > windowWidth;\n if (isNotLeftSpace && isNotRightSpace) {\n this.content.style.width = \"auto\";\n this.content.style.left = offset + \"px\";\n this.content.style.right = offset + \"px\";\n } else {\n if (isNotLeftSpace) {\n leftPosition = offset\n }\n if (isNotRightSpace) {\n leftPosition = leftPosition - ((windowWidth - (leftPosition + contentWidth + offset)) * -1)\n }\n this.content.style.left = leftPosition + \"px\"\n }\n } else {\n const leftPosition = (triggerPos.left + ((trgWidth - contentWidth) / 2))\n\n this.content.style.left = leftPosition + \"px\"\n }\n }\n if (this.position === TooltipPosition.TOP) {\n this.content.setAttribute(\"position\", TooltipPosition.TOP)\n this.content.style.top = (triggerPos.top - (contentHeight + offset)) + \"px\"\n }\n if (this.position === TooltipPosition.BOTTOM) {\n this.content.setAttribute(\"position\", TooltipPosition.BOTTOM)\n this.content.style.top = (triggerPos.top + (trgHeight + offset)) + \"px\"\n }\n }\n\n private showTooltip() {\n if (this.content) {\n this.verifyPositionSpace()\n this.content.setAttribute(\"is-visible\", \"true\")\n if (this.persist) {\n this.content.setAttribute(\"persist\", \"true\")\n }\n }\n }\n\n private hideTooltip() {\n if (this.content) {\n this.content.setAttribute(\"is-visible\", \"false\")\n this.content.setAttribute(\"persist\", \"false\")\n }\n }\n\n private removeContent() {\n const contentEl = document.getElementById(this.tooltipContentId)\n if (contentEl) {\n contentEl.remove()\n }\n }\n\n render() {\n return (\n <Host\n id={this.tooltipId}\n class={this.h.classes(TooltipClass.root)}\n position={this.position}\n tabindex={0}\n aria-describedby={this.identifier ?? this.tooltipContentId}>\n <slot/>\n </Host>\n )\n }\n\n /**\n * Showing the modal\n */\n @Method()\n async show(): Promise<void> {\n this.showTooltip()\n }\n\n /**\n * Hiding the modal\n */\n @Method()\n async hide(): Promise<void> {\n this.persist = false\n this.hideTooltip()\n }\n}\n"],"version":3}
@@ -3,7 +3,7 @@ import { a as govErrorLog } from './gov.log-af905420.js';
3
3
  import { v as validateProp } from './props-789f7529.js';
4
4
  import { W as WizardItemClass, c as WizardVariants } from './constants-2499979c.js';
5
5
  import { c as createID } from './string.utils-f268fc6b.js';
6
- import { g as govHost, b as booleanString, t as toBoolAttrIfDefined } from './template-10332292.js';
6
+ import { g as govHost, b as booleanString, t as toBoolAttrIfDefined } from './template-df429738.js';
7
7
  import { F as Fragment } from './Fragment-8d8d54fb.js';
8
8
  import './variants-2b936d58.js';
9
9
  import './sizes-6c5943b4.js';
@@ -1 +1 @@
1
- {"file":"gov-wizard-item.entry.js","mappings":";;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,wrSAAwrS;;ACUjtS,IAAK,IAGJ;AAHD,WAAK,IAAI;EACR,mBAAW,CAAA;EACX,yBAAiB,CAAA;AAClB,CAAC,EAHI,IAAI,KAAJ,IAAI,QAGR;MAMY,aAAa;EAKzB;;;mBAUgD,SAAS;gBAIf,GAAG;;uBAQL,KAAK;;;oBAYR,KAAK;sBAIsB,KAAK;oBAIP,IAAI;IAzCjE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAA;IAC1C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,kBAAkB,CAAC,CAAA;GAC7C;EA6CO,aAAa,CAAC,QAAgB;IACrC,IAAI,CAAC,QAAQ,EAAE;MACd,WAAW,CAAC,IAAI,eAAe,CAAC,IAAI,iCAAiC,CAAC,CAAA;KACtE;GACD;EAGO,kBAAkB,CAAC,QAAgB;IAC1C,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;IAC9D,IAAI,QAAQ,EA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C,UAAU,qBACP,SAAS,IAE1B,eAAQ,CACH,KAEN,WAAK,KAAK,EAAE,eAAe,CAAC,OAAO,iBAAe,aAAa,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,UAAU,IAC1G,eAAQ,CACH,CACN,CACK,EACP;GACD;;;;EAMD,MAAM,IAAI;IACT,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;IACtB,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMM,MAAM,KAAK;IACjB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;IACvB,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMM,MAAM,MAAM;IAClB,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,UAAU,CAAA;IAClC,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMM,MAAM,YAAY;IACxB,OAAO,IAAI,CAAC,UAAU,CAAA;GACtB;;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-wizard/gov-wizard-item.scss?tag=gov-wizard-item","../../../packages/core/src/components/gov-wizard/gov-wizard-item.tsx"],"sourcesContent":["/*\n * Wizard - Item\n */\n\n@import \"../gov-wizard/gov-wizard-item-core.scss\";\n$class: \".gov-wizard-item\";\n\n#{$class} {\n\t@include wizard-item-core;\n\tmargin-bottom: rem-calc(16);\n\tbackground: $wizard-bg-color;\n\t&__header {\n\t\t@include focus-outline();\n\t\tgap: rem-calc(16);\n\t\tpadding: rem-calc(16);\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t\ttransition: $t linear color;\n\t}\n\t&__prefix {\n\t\tposition: absolute;\n\t\tleft: rem-calc(16);\n\t}\n\n\t// STATES\n\t&__header[aria-expanded=\"true\"] {\n\t\t#{$class}__label {\n\t\t\t.gov-icon {\n\t\t\t\ttransform: scale(-1);\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t&[size=\"#{$size-xs}\"],\n\t&[size=\"#{$size-s}\"],\n\t&[size=\"#{$size-m}\"] {\n\t\t#{$class} {\n\t\t\t&__title {\n\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-xs, \"font-size\"));\n\t\t\t}\n\t\t\t&__annot {\n\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-xs, \"font-size-annot\"));\n\t\t\t}\n\t\t\t&__prefix {\n\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-xs, \"font-size-indicator\"));\n\t\t\t\twidth: deep-map-get($wizard-sizes, $size-xs, \"indicator-size\");\n\t\t\t\theight: deep-map-get($wizard-sizes, $size-xs, \"indicator-size\");\n\t\t\t\ttop: deep-map-get($wizard-sizes, $size-xs, \"top\");\n\t\t\t\t+ #{$class}__header {\n\t\t\t\t\tpadding: deep-map-get($wizard-sizes, $size-xs, \"header-padding\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t&__content {\n\t\t\t\tpadding: $wizard-content-padding;\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $definitions in $wizard-core-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t@include parameter(\"collapsible\") {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__header {\n\t\t\t\t\t\t@include hover() {\n\t\t\t\t\t\t\tcolor: get(\"hover-color\", $definitions);\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}\n\t}\n\n\t// HOVERS\n\t@at-root button#{&}__header {\n\t\t@include button-core();\n\t\tjustify-content: flex-start;\n\t\ttext-align: left;\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&[size=\"#{$size-s}\"],\n\t\t&[size=\"#{$size-m}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-s, \"font-size\"));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-s, \"font-size-indicator\"));\n\t\t\t\t\twidth: deep-map-get($wizard-sizes, $size-s, \"indicator-size\");\n\t\t\t\t\theight: deep-map-get($wizard-sizes, $size-s, \"indicator-size\");\n\t\t\t\t\ttop: deep-map-get($wizard-sizes, $size-s, \"top\");\n\t\t\t\t\t+ #{$class}__header {\n\t\t\t\t\t\tpadding: deep-map-get($wizard-sizes, $size-s, \"header-padding\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\t&[size=\"#{$size-m}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-m, \"font-size\"));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-m, \"font-size-indicator\"));\n\t\t\t\t\twidth: deep-map-get($wizard-sizes, $size-m, \"indicator-size\");\n\t\t\t\t\theight: deep-map-get($wizard-sizes, $size-m, \"indicator-size\");\n\t\t\t\t\ttop: deep-map-get($wizard-sizes, $size-m, \"top\");\n\t\t\t\t\t+ #{$class}__header {\n\t\t\t\t\t\tpadding: deep-map-get($wizard-sizes, $size-m, \"header-padding\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t@each $size, $definitions in $wizard-sizes {\n\t\t\t&[size=\"#{$size}\"] {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__content {\n\t\t\t\t\t\tpadding: get(\"content-padding\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { govErrorLog } from \"../../helpers/Log/gov.log\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { WizardSizesType, WizardVariants, WizardVariantsType, WizardItemClass } from \"./constants\"\nimport { createID } from \"../../utils/string.utils\"\nimport { booleanString, govHost, toBoolAttrIfDefined } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { WizardItemEvent } from \"./gov-wizard-item.types\"\nimport Fragment from \"../../helpers/Fragment\"\n\nenum Tags {\n\tDIV = \"div\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-wizard-item\",\n\tstyleUrl: \"gov-wizard-item.scss\",\n})\nexport class GovWizardItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID(\"GovWizardItem\")\n\t\tthis.contentId = createID(\"GovWizardContent\")\n\t}\n\n\t@Element() readonly host: HTMLGovWizardItemElement\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant?: WizardVariantsType = \"primary\"\n\t/**\n\t * Size of wizard\n\t */\n\t@Prop() readonly size?: WizardSizesType = \"m\"\n\t/**\n\t * Custom wizard item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Defines weather the wizard item can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Item annotation of the wizard\n\t */\n\t@Prop() readonly annotation: string\n\t/**\n\t * Item label of the wizard\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Makes the wizard component disabled.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Defines whether the accordion is open or closed by default\n\t */\n\t@Prop({ attribute: \"is-expanded\", mutable: true }) isExpanded = false\n\t/**\n\t * Used to change the HTML tag in the accordion trigger for correct semantic structure\n\t */\n\t@Prop({ attribute: \"label-tag\" }) readonly labelTag: string = \"h3\"\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<WizardItemEvent>\n\n\t@Watch(\"label\")\n\tprivate validateLabel(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${WizardItemClass.root}]: Parameter label is required.`)\n\t\t}\n\t}\n\n\t@Watch(\"labelTag\")\n\tprivate validateTriggerTag(newValue: string): void {\n\t\tconst validTags = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"span\"]\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${WizardItemClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch(\"variant\")\n\tprivate validateVariant(newValue: string): void {\n\t\tvalidateProp(WizardVariants, newValue, WizardItemClass.root)\n\t}\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({ expanded: this.isExpanded, component: WizardItemClass.root })\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateLabel(this.label)\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateTriggerTag(this.labelTag)\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst LabelTag = this.labelTag\n\t\tconst Tag = this.collapsible ? Tags.BUTTON : Tags.DIV\n\t\tconst prefixSlot = this.h.hasSlot(\"prefix\") && (<span class={WizardItemClass.prefix}><slot name=\"prefix\" /></span>)\n\n\t\tconst label = (\n\t\t\t<LabelTag class={WizardItemClass.title}>\n\t\t\t\t<span class={WizardItemClass.name}>\n\t\t\t\t\t<span class={WizardItemClass.label}>\n\t\t\t\t\t\t<span>{this.label}</span>\n\t\t\t\t\t\t{this.collapsible && <gov-icon class={WizardItemClass.arrow} name=\"chevron-down\"></gov-icon>}\n\t\t\t\t\t</span>\n\n\t\t\t\t\t{this.annotation && <span class={WizardItemClass.annot}>{this.annotation}</span>}\n\t\t\t\t</span>\n\t\t\t</LabelTag>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(WizardItemClass.root)} is-expanded={this.isExpanded} variant={this.variant} size={this.size} role=\"listitem\" collapsible={this.collapsible}>\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\tid={triggerId}\n\t\t\t\t\t\t\tclass={WizardItemClass.header}\n\t\t\t\t\t\t\taria-expanded={booleanString(this.isExpanded)}\n\t\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tthis.collapsible ? this.toggle() : false\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t</Fragment>\n\t\t\t\t) : (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t\t<div class={WizardItemClass.header}>{label}</div>\n\t\t\t\t\t</Fragment>\n\t\t\t\t)}\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={WizardItemClass.content}\n\t\t\t\t\t\tid={this.contentId}\n\t\t\t\t\t\taria-hidden={booleanString(!this.isExpanded)}\n\t\t\t\t\t\thidden={!this.isExpanded}\n\t\t\t\t\t\taria-labelledby={triggerId}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div class={WizardItemClass.content} aria-hidden={booleanString(!this.isExpanded)} hidden={!this.isExpanded}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Opening the Wizard\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpanded = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the Wizard\n\t */\n\t@Method()\n\tpublic async close(): Promise<void> {\n\t\tthis.isExpanded = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Wizard switch\n\t */\n\t@Method()\n\tpublic async toggle(): Promise<void> {\n\t\tthis.isExpanded = !this.isExpanded\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tpublic async currentState(): Promise<boolean> {\n\t\treturn this.isExpanded\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-wizard-item.entry.js","mappings":";;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,wrSAAwrS;;ACUjtS,IAAK,IAGJ;AAHD,WAAK,IAAI;EACR,mBAAW,CAAA;EACX,yBAAiB,CAAA;AAClB,CAAC,EAHI,IAAI,KAAJ,IAAI,QAGR;MAMY,aAAa;EAKzB;;;mBAUgD,SAAS;gBAIf,GAAG;;uBAQL,KAAK;;;oBAYR,KAAK;sBAIsB,KAAK;oBAIP,IAAI;IAzCjE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAA;IAC1C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,kBAAkB,CAAC,CAAA;GAC7C;EA6CO,aAAa,CAAC,QAAgB;IACrC,IAAI,CAAC,QAAQ,EAAE;MACd,WAAW,CAAC,IAAI,eAAe,CAAC,IAAI,iCAAiC,CAAC,CAAA;KACtE;GACD;EAGO,kBAAkB,CAAC,QAAgB;IAC1C,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;IAC9D,IAAI,QAAQ,EAAE;MACb,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAClC,WAAW,CAAC,IAAI,eAAe,CAAC,IAAI,UAAU,QAAQ,kBAAkB,CAAC,C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,MAAM,EAAE,CAAC,IAAI,CAAC,UAAU,IAC1G,eAAQ,CACH,CACN,CACK,EACP;GACD;;;;EAMD,MAAM,IAAI;IACT,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;IACtB,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMM,MAAM,KAAK;IACjB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;IACvB,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMM,MAAM,MAAM;IAClB,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,UAAU,CAAA;IAClC,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMM,MAAM,YAAY;IACxB,OAAO,IAAI,CAAC,UAAU,CAAA;GACtB;;;;;;;;;;;;","names":[],"sources":["../../../packages/core/src/components/gov-wizard/gov-wizard-item.scss?tag=gov-wizard-item","../../../packages/core/src/components/gov-wizard/gov-wizard-item.tsx"],"sourcesContent":["/*\n * Wizard - Item\n */\n\n@import \"../gov-wizard/gov-wizard-item-core.scss\";\n$class: \".gov-wizard-item\";\n\n#{$class} {\n\t@include wizard-item-core;\n\tmargin-bottom: rem-calc(16);\n\tbackground: $wizard-bg-color;\n\t&__header {\n\t\t@include focus-outline();\n\t\tgap: rem-calc(16);\n\t\tpadding: rem-calc(16);\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t\ttransition: $t linear color;\n\t}\n\t&__prefix {\n\t\tposition: absolute;\n\t\tleft: rem-calc(16);\n\t}\n\n\t// STATES\n\t&__header[aria-expanded=\"true\"] {\n\t\t#{$class}__label {\n\t\t\t.gov-icon {\n\t\t\t\ttransform: scale(-1);\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t&[size=\"#{$size-xs}\"],\n\t&[size=\"#{$size-s}\"],\n\t&[size=\"#{$size-m}\"] {\n\t\t#{$class} {\n\t\t\t&__title {\n\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-xs, \"font-size\"));\n\t\t\t}\n\t\t\t&__annot {\n\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-xs, \"font-size-annot\"));\n\t\t\t}\n\t\t\t&__prefix {\n\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-xs, \"font-size-indicator\"));\n\t\t\t\twidth: deep-map-get($wizard-sizes, $size-xs, \"indicator-size\");\n\t\t\t\theight: deep-map-get($wizard-sizes, $size-xs, \"indicator-size\");\n\t\t\t\ttop: deep-map-get($wizard-sizes, $size-xs, \"top\");\n\t\t\t\t+ #{$class}__header {\n\t\t\t\t\tpadding: deep-map-get($wizard-sizes, $size-xs, \"header-padding\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t&__content {\n\t\t\t\tpadding: $wizard-content-padding;\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $definitions in $wizard-core-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t@include parameter(\"collapsible\") {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__header {\n\t\t\t\t\t\t@include hover() {\n\t\t\t\t\t\t\tcolor: get(\"hover-color\", $definitions);\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}\n\t}\n\n\t// HOVERS\n\t@at-root button#{&}__header {\n\t\t@include button-core();\n\t\tjustify-content: flex-start;\n\t\ttext-align: left;\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&[size=\"#{$size-s}\"],\n\t\t&[size=\"#{$size-m}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-s, \"font-size\"));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-s, \"font-size-indicator\"));\n\t\t\t\t\twidth: deep-map-get($wizard-sizes, $size-s, \"indicator-size\");\n\t\t\t\t\theight: deep-map-get($wizard-sizes, $size-s, \"indicator-size\");\n\t\t\t\t\ttop: deep-map-get($wizard-sizes, $size-s, \"top\");\n\t\t\t\t\t+ #{$class}__header {\n\t\t\t\t\t\tpadding: deep-map-get($wizard-sizes, $size-s, \"header-padding\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\t&[size=\"#{$size-m}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-m, \"font-size\"));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-m, \"font-size-indicator\"));\n\t\t\t\t\twidth: deep-map-get($wizard-sizes, $size-m, \"indicator-size\");\n\t\t\t\t\theight: deep-map-get($wizard-sizes, $size-m, \"indicator-size\");\n\t\t\t\t\ttop: deep-map-get($wizard-sizes, $size-m, \"top\");\n\t\t\t\t\t+ #{$class}__header {\n\t\t\t\t\t\tpadding: deep-map-get($wizard-sizes, $size-m, \"header-padding\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t@each $size, $definitions in $wizard-sizes {\n\t\t\t&[size=\"#{$size}\"] {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__content {\n\t\t\t\t\t\tpadding: get(\"content-padding\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { govErrorLog } from \"../../helpers/Log/gov.log\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { WizardSizesType, WizardVariants, WizardVariantsType, WizardItemClass } from \"./constants\"\nimport { createID } from \"../../utils/string.utils\"\nimport { booleanString, govHost, toBoolAttrIfDefined } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { WizardItemEvent } from \"./gov-wizard-item.types\"\nimport Fragment from \"../../helpers/Fragment\"\n\nenum Tags {\n\tDIV = \"div\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-wizard-item\",\n\tstyleUrl: \"gov-wizard-item.scss\",\n})\nexport class GovWizardItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID(\"GovWizardItem\")\n\t\tthis.contentId = createID(\"GovWizardContent\")\n\t}\n\n\t@Element() readonly host: HTMLGovWizardItemElement\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant?: WizardVariantsType = \"primary\"\n\t/**\n\t * Size of wizard\n\t */\n\t@Prop() readonly size?: WizardSizesType = \"m\"\n\t/**\n\t * Custom wizard item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Defines weather the wizard item can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Item annotation of the wizard\n\t */\n\t@Prop() readonly annotation: string\n\t/**\n\t * Item label of the wizard\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Makes the wizard component disabled.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Defines whether the accordion is open or closed by button\n\t */\n\t@Prop({ attribute: \"is-expanded\", mutable: true }) isExpanded = false\n\t/**\n\t * Used to change the HTML tag in the accordion trigger for correct semantic structure\n\t */\n\t@Prop({ attribute: \"label-tag\" }) readonly labelTag: string = \"h3\"\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<WizardItemEvent>\n\n\t@Watch(\"label\")\n\tprivate validateLabel(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${WizardItemClass.root}]: Parameter label is required.`)\n\t\t}\n\t}\n\n\t@Watch(\"labelTag\")\n\tprivate validateTriggerTag(newValue: string): void {\n\t\tconst validTags = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"span\"]\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${WizardItemClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch(\"variant\")\n\tprivate validateVariant(newValue: string): void {\n\t\tvalidateProp(WizardVariants, newValue, WizardItemClass.root)\n\t}\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({ expanded: this.isExpanded, component: WizardItemClass.root })\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateLabel(this.label)\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateTriggerTag(this.labelTag)\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst LabelTag = this.labelTag\n\t\tconst Tag = this.collapsible ? Tags.BUTTON : Tags.DIV\n\t\tconst prefixSlot = this.h.hasSlot(\"prefix\") && (<span class={WizardItemClass.prefix}><slot name=\"prefix\" /></span>)\n\n\t\tconst label = (\n\t\t\t<LabelTag class={WizardItemClass.title}>\n\t\t\t\t<span class={WizardItemClass.name}>\n\t\t\t\t\t<span class={WizardItemClass.label}>\n\t\t\t\t\t\t<span>{this.label}</span>\n\t\t\t\t\t\t{this.collapsible && <gov-icon class={WizardItemClass.arrow} name=\"chevron-down\"></gov-icon>}\n\t\t\t\t\t</span>\n\n\t\t\t\t\t{this.annotation && <span class={WizardItemClass.annot}>{this.annotation}</span>}\n\t\t\t\t</span>\n\t\t\t</LabelTag>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(WizardItemClass.root)} is-expanded={this.isExpanded} variant={this.variant} size={this.size} role=\"listitem\" collapsible={this.collapsible}>\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\tid={triggerId}\n\t\t\t\t\t\t\tclass={WizardItemClass.header}\n\t\t\t\t\t\t\taria-expanded={booleanString(this.isExpanded)}\n\t\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tthis.collapsible ? this.toggle() : false\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t</Fragment>\n\t\t\t\t) : (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t\t<div class={WizardItemClass.header}>{label}</div>\n\t\t\t\t\t</Fragment>\n\t\t\t\t)}\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={WizardItemClass.content}\n\t\t\t\t\t\tid={this.contentId}\n\t\t\t\t\t\taria-hidden={booleanString(!this.isExpanded)}\n\t\t\t\t\t\thidden={!this.isExpanded}\n\t\t\t\t\t\taria-labelledby={triggerId}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div class={WizardItemClass.content} aria-hidden={booleanString(!this.isExpanded)} hidden={!this.isExpanded}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Opening the Wizard\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpanded = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the Wizard\n\t */\n\t@Method()\n\tpublic async close(): Promise<void> {\n\t\tthis.isExpanded = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Wizard switch\n\t */\n\t@Method()\n\tpublic async toggle(): Promise<void> {\n\t\tthis.isExpanded = !this.isExpanded\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tpublic async currentState(): Promise<boolean> {\n\t\treturn this.isExpanded\n\t}\n}\n"],"version":3}
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-ae3c50f1.js';
2
2
  import { v as validateProp } from './props-789f7529.js';
3
3
  import { W as WizardItemClass, a as WizardClass, b as WizardSizes } from './constants-2499979c.js';
4
- import { g as govHost } from './template-10332292.js';
4
+ import { g as govHost } from './template-df429738.js';
5
5
  import { v as validateWcagLabel } from './wcag-06bd4d01.js';
6
6
  import { c as canValidateWcagOnRender } from './win-0a50f66e.js';
7
7
  import { d as delay } from './utils-c057a3fa.js';
@@ -2398,6 +2398,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2398
2398
  return import(
2399
2399
  /* webpackMode: "lazy" */
2400
2400
  './gov-tabs-item.entry.js').then(processMod, consoleError);
2401
+ case 'gov-tag':
2402
+ return import(
2403
+ /* webpackMode: "lazy" */
2404
+ './gov-tag.entry.js').then(processMod, consoleError);
2401
2405
  case 'gov-tile':
2402
2406
  return import(
2403
2407
  /* webpackMode: "lazy" */
@@ -2434,10 +2438,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2434
2438
  return import(
2435
2439
  /* webpackMode: "lazy" */
2436
2440
  './gov-form-autocomplete.entry.js').then(processMod, consoleError);
2437
- case 'gov-badge':
2441
+ case 'gov-chip':
2438
2442
  return import(
2439
2443
  /* webpackMode: "lazy" */
2440
- './gov-badge.entry.js').then(processMod, consoleError);
2444
+ './gov-chip.entry.js').then(processMod, consoleError);
2441
2445
  case 'gov-form-input':
2442
2446
  return import(
2443
2447
  /* webpackMode: "lazy" */
@@ -3,7 +3,7 @@ export { s as setNonce } from './index-ae3c50f1.js';
3
3
 
4
4
  const defineCustomElements = (win, options) => {
5
5
  if (typeof window === 'undefined') return undefined;
6
- return bootstrapLazy(JSON.parse("[[\"gov-form-file\",[[4,\"gov-form-file\",{\"expanded\":[4],\"required\":[4],\"disabled\":[4],\"displayAttachments\":[4,\"display-attachments\"],\"name\":[1],\"accept\":[1],\"multiple\":[4],\"maxFileSize\":[2,\"max-file-size\"],\"identifier\":[1],\"invalid\":[4],\"errorSize\":[1,\"error-size\"],\"errorAccept\":[1,\"error-accept\"],\"attachmentsLabel\":[1,\"attachments-label\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagRemoveLabel\":[1,\"wcag-remove-label\"],\"wcagAttachmentsLabel\":[1,\"wcag-attachments-label\"],\"files\":[32],\"getRef\":[64],\"getAreaRef\":[64],\"reset\":[64],\"validateWcag\":[64]}]]],[\"gov-form-multi-select\",[[4,\"gov-form-multi-select\",{\"identifier\":[1],\"placeholder\":[1],\"variant\":[1],\"size\":[1],\"name\":[1],\"required\":[4],\"disabled\":[4],\"invalid\":[4],\"success\":[4],\"messageEmpty\":[1,\"message-empty\"],\"messageLoading\":[1,\"message-loading\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"value\":[32],\"selectedOptions\":[32],\"setFocus\":[64],\"setValue\":[64],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-modal\",[[4,\"gov-modal\",{\"open\":[1028],\"label\":[1],\"role\":[1],\"labelTag\":[1,\"label-tag\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagCloseLabelledBy\":[1,\"wcag-close-labelled-by\"],\"show\":[64],\"hide\":[64],\"validateWcag\":[64]}]]],[\"gov-pagination\",[[0,\"gov-pagination\",{\"type\":[1],\"current\":[2],\"total\":[2],\"inverse\":[4],\"size\":[1],\"variant\":[1],\"pageSize\":[2,\"page-size\"],\"maxPages\":[2,\"max-pages\"],\"link\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagSelectLabel\":[1,\"wcag-select-label\"],\"wcagPageLabel\":[1,\"wcag-page-label\"],\"pagination\":[32],\"validateWcag\":[64]}]]],[\"gov-prompt\",[[4,\"gov-prompt\",{\"open\":[1028],\"label\":[1],\"role\":[1],\"labelTag\":[1,\"label-tag\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagCloseLabelledBy\":[1,\"wcag-close-labelled-by\"],\"show\":[64],\"hide\":[64],\"validateWcag\":[64]}]]],[\"gov-tabs\",[[4,\"gov-tabs\",{\"type\":[1],\"variant\":[1],\"orientation\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagSelectLabel\":[1,\"wcag-select-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"controller\":[32],\"focusIndex\":[32],\"compactControls\":[32],\"refresh\":[64],\"currentTab\":[64],\"setActiveTab\":[64],\"validateWcag\":[64]}]]],[\"gov-infobar\",[[4,\"gov-infobar\",{\"headline\":[1],\"variant\":[1],\"inverse\":[4],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagToggleLabel\":[1,\"wcag-toggle-label\"],\"closable\":[4],\"toggleContent\":[32],\"validateWcag\":[64]}]]],[\"gov-loading\",[[4,\"gov-loading\"]]],[\"gov-side-nav-item\",[[4,\"gov-side-nav-item\",{\"inverse\":[4],\"compact\":[4],\"identifier\":[1],\"count\":[4],\"label\":[1],\"disabled\":[4],\"href\":[1],\"isExpanded\":[4,\"is-expanded\"],\"isExpandedState\":[32],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]}]]],[\"gov-toast\",[[4,\"gov-toast\",{\"variant\":[1],\"gravity\":[1],\"position\":[1],\"type\":[1],\"time\":[2],\"closeLabel\":[1,\"close-label\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"destroy\":[64]}]]],[\"gov-tooltip-content\",[[4,\"gov-tooltip-content\",{\"variant\":[1],\"size\":[1],\"persist\":[4],\"isVisible\":[1028,\"is-visible\"],\"parentId\":[1,\"parent-id\"]}]]],[\"gov-accordion-item\",[[4,\"gov-accordion-item\",{\"variant\":[1],\"identifier\":[1],\"size\":[1],\"disabled\":[4],\"isExpanded\":[1028,\"is-expanded\"],\"isExpandedState\":[32],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]}]]],[\"gov-card\",[[4,\"gov-card\",{\"promotion\":[4],\"label\":[1],\"collapsible\":[4],\"expanded\":[4],\"headlineTag\":[1,\"headline-tag\"],\"wcagTriggerLabel\":[1,\"wcag-trigger-label\"],\"wcagTriggerLabelledBy\":[1,\"wcag-trigger-labelled-by\"],\"isExpanded\":[32],\"open\":[64],\"close\":[64],\"validateWcag\":[64]}]]],[\"gov-form-checkbox\",[[4,\"gov-form-checkbox\",{\"value\":[1],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"noLabel\":[4,\"no-label\"],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-tile\",[[4,\"gov-tile\",{\"href\":[1],\"target\":[1],\"getTriggerRef\":[64]}]]],[\"gov-wizard-item\",[[4,\"gov-wizard-item\",{\"variant\":[1],\"size\":[1],\"identifier\":[1],\"collapsible\":[4],\"annotation\":[1],\"label\":[1],\"disabled\":[4],\"isExpanded\":[1028,\"is-expanded\"],\"labelTag\":[1,\"label-tag\"],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]}]]],[\"gov-accordion\",[[4,\"gov-accordion\",{\"size\":[1],\"variant\":[1],\"noBorder\":[4,\"no-border\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-app\",[[0,\"gov-app\"]]],[\"gov-breadcrumbs\",[[4,\"gov-breadcrumbs\",{\"collapsible\":[4],\"isExpanded\":[4,\"is-expanded\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labeled-by\"],\"validateWcag\":[64]}]]],[\"gov-container\",[[4,\"gov-container\",{\"slottedChildren\":[64]}]]],[\"gov-control-group\",[[4,\"gov-control-group\",{\"variant\":[1],\"noBorder\":[4,\"no-border\"]}]]],[\"gov-cookiebar\",[[4,\"gov-cookiebar\"]]],[\"gov-dropdown\",[[4,\"gov-dropdown\",{\"open\":[1028],\"position\":[1],\"getState\":[64],\"setOpen\":[64]}]]],[\"gov-empty\",[[4,\"gov-empty\"]]],[\"gov-error-code\",[[4,\"gov-error-code\"]]],[\"gov-form-control\",[[4,\"gov-form-control\",{\"gap\":[1],\"identifier\":[1],\"invalid\":[4],\"disabled\":[4],\"success\":[4],\"fieldset\":[4],\"size\":[1]}]]],[\"gov-form-group\",[[4,\"gov-form-group\",{\"gap\":[1],\"orientation\":[1]}]]],[\"gov-form-label\",[[4,\"gov-form-label\",{\"identifier\":[1],\"size\":[1],\"required\":[4],\"legend\":[4]}]]],[\"gov-form-password-power\",[[4,\"gov-form-password-power\",{\"power\":[2]}]]],[\"gov-form-radio\",[[4,\"gov-form-radio\",{\"value\":[1],\"noLabel\":[4,\"no-label\"],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-form-search\",[[4,\"gov-form-search\",{\"variant\":[1]}]]],[\"gov-form-switch\",[[4,\"gov-form-switch\",{\"value\":[1],\"noLabel\":[4,\"no-label\"],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-grid\",[[4,\"gov-grid\",{\"alignX\":[1,\"align-x\"],\"alignY\":[1,\"align-y\"]}]]],[\"gov-grid-item\",[[4,\"gov-grid-item\",{\"size\":[1],\"sizeSm\":[1,\"size-sm\"],\"sizeMd\":[1,\"size-md\"],\"sizeLg\":[1,\"size-lg\"],\"sizeXl\":[1,\"size-xl\"]}]]],[\"gov-layout\",[[4,\"gov-layout\",{\"type\":[1],\"variant\":[1],\"inverse\":[4]}]]],[\"gov-layout-column\",[[4,\"gov-layout-column\"]]],[\"gov-message\",[[4,\"gov-message\",{\"variant\":[1]}]]],[\"gov-nav\",[[4,\"gov-nav\",{\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-nav-item\",[[4,\"gov-nav-item\",{\"href\":[1],\"isExpandedState\":[32]}]]],[\"gov-side-nav\",[[4,\"gov-side-nav\",{\"inverse\":[4],\"compact\":[4],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-skeleton\",[[0,\"gov-skeleton\",{\"variant\":[1],\"count\":[2],\"shape\":[1],\"width\":[1],\"height\":[1],\"animation\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"validateWcag\":[64]}]]],[\"gov-spacer\",[[0,\"gov-spacer\",{\"size\":[1],\"breakpoint\":[1]}]]],[\"gov-statsbar\",[[4,\"gov-statsbar\",{\"iconPosition\":[1,\"icon-position\"],\"variant\":[1]}]]],[\"gov-statsbar-item\",[[4,\"gov-statsbar-item\",{\"iconPosition\":[1,\"icon-position\"]}]]],[\"gov-stepper\",[[4,\"gov-stepper\",{\"size\":[1]}]]],[\"gov-stepper-item\",[[4,\"gov-stepper-item\",{\"variant\":[1],\"size\":[1],\"identifier\":[1],\"label\":[1],\"annotation\":[1],\"triggerTag\":[1,\"trigger-tag\"],\"isExpandedState\":[32],\"currentState\":[64]}]]],[\"gov-tabs-item\",[[4,\"gov-tabs-item\",{\"identifier\":[1],\"triggerIdentifier\":[1,\"trigger-identifier\"],\"label\":[1],\"default\":[4],\"isActive\":[32],\"getIdentifier\":[64],\"getTriggerIdentifier\":[64],\"setActiveStatus\":[64]}]]],[\"gov-tiles\",[[4,\"gov-tiles\",{\"columns\":[2],\"noBorder\":[4,\"no-border\"]}]]],[\"gov-tooltip\",[[4,\"gov-tooltip\",{\"variant\":[1],\"size\":[1],\"position\":[1],\"message\":[1],\"identifier\":[1],\"icon\":[4],\"persist\":[32],\"show\":[64],\"hide\":[64]}]]],[\"gov-wizard\",[[4,\"gov-wizard\",{\"size\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-icon\",[[0,\"gov-icon\",{\"name\":[1],\"type\":[1],\"iconData\":[32],\"visible\":[32],\"error\":[32]}]]],[\"gov-form-input\",[[4,\"gov-form-input\",{\"value\":[1537],\"identifier\":[1],\"variant\":[1],\"success\":[4],\"size\":[1],\"name\":[1],\"multiline\":[4],\"rows\":[2],\"cols\":[2],\"required\":[4],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"minlength\":[2],\"maxlength\":[2],\"min\":[8],\"max\":[8],\"autocomplete\":[4],\"autocorrect\":[4],\"type\":[1],\"inputType\":[1,\"input-type\"],\"role\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"wcagAutocomplete\":[1,\"wcag-autocomplete\"],\"wcagExpanded\":[4,\"wcag-expanded\"],\"focused\":[32],\"setFocus\":[64],\"setValue\":[64],\"clearValue\":[64],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-form-autocomplete\",[[4,\"gov-form-autocomplete\",{\"value\":[1537],\"identifier\":[1],\"variant\":[1],\"success\":[4],\"size\":[1],\"nameKey\":[1,\"name-key\"],\"name\":[1],\"required\":[4],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"invalid\":[4],\"minlength\":[2],\"maxlength\":[2],\"messageEmpty\":[1,\"message-empty\"],\"messageLoading\":[1,\"message-loading\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"processing\":[32],\"arrowCounter\":[32],\"list\":[32],\"setFocus\":[64],\"setOptions\":[64],\"clearValue\":[64],\"setProcessing\":[64],\"setSearchCallback\":[64],\"setTemplateResolver\":[64]}]]],[\"gov-form-select\",[[4,\"gov-form-select\",{\"value\":[1537],\"identifier\":[1],\"variant\":[1],\"size\":[1],\"name\":[1],\"required\":[4],\"success\":[4],\"disabled\":[4],\"invalid\":[4],\"wcagActiveDescendant\":[1,\"wcag-active-descendant\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"setFocus\":[64],\"setValue\":[64],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-badge\",[[4,\"gov-badge\",{\"inverse\":[4],\"disabled\":[4],\"href\":[1],\"target\":[1],\"size\":[1],\"tag\":[1],\"variant\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"getTriggerRef\":[64]}]]],[\"gov-attachments_3\",[[4,\"gov-attachments-item\",{\"wcagRemoveLabel\":[1,\"wcag-remove-label\"],\"wcagRemoveLabelledBy\":[1,\"wcag-remove-labelled-by\"],\"validateWcag\":[64]}],[4,\"gov-attachments\",{\"label\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"validateWcag\":[64]}],[4,\"gov-form-message\",{\"variant\":[1],\"identifier\":[64]}]]],[\"gov-backdrop\",[[0,\"gov-backdrop\",{\"inverse\":[4],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-button\",[[4,\"gov-button\",{\"variant\":[513],\"size\":[513],\"type\":[513],\"expanded\":[4],\"inverse\":[4],\"name\":[1],\"disabled\":[516],\"nativeType\":[1,\"native-type\"],\"href\":[1],\"target\":[1],\"download\":[4],\"hreflang\":[1],\"referrerpolicy\":[1],\"rel\":[1],\"loading\":[1],\"focusable\":[4],\"identifier\":[1],\"wcagActiveDescendant\":[1,\"wcag-active-descendant\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagDescription\":[1,\"wcag-description\"],\"wcagDetails\":[1,\"wcag-details\"],\"wcagExpanded\":[4,\"wcag-expanded\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"wcagHasPopup\":[1,\"wcag-has-popup\"],\"wcagPressed\":[1,\"wcag-pressed\"],\"wcagCurrent\":[1,\"wcag-current\"],\"isPressed\":[32],\"setFocus\":[64],\"getTriggerRef\":[64],\"validateWcag\":[64]}]]]]"), options);
6
+ return bootstrapLazy(JSON.parse("[[\"gov-form-file\",[[4,\"gov-form-file\",{\"expanded\":[4],\"required\":[4],\"disabled\":[4],\"displayAttachments\":[4,\"display-attachments\"],\"name\":[1],\"accept\":[1],\"multiple\":[4],\"maxFileSize\":[2,\"max-file-size\"],\"identifier\":[1],\"invalid\":[4],\"errorSize\":[1,\"error-size\"],\"errorAccept\":[1,\"error-accept\"],\"attachmentsLabel\":[1,\"attachments-label\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagRemoveLabel\":[1,\"wcag-remove-label\"],\"wcagAttachmentsLabel\":[1,\"wcag-attachments-label\"],\"files\":[32],\"getRef\":[64],\"getAreaRef\":[64],\"reset\":[64],\"validateWcag\":[64]}]]],[\"gov-form-multi-select\",[[4,\"gov-form-multi-select\",{\"identifier\":[1],\"placeholder\":[1],\"variant\":[1],\"size\":[1],\"name\":[1],\"required\":[4],\"disabled\":[4],\"invalid\":[4],\"success\":[4],\"messageEmpty\":[1,\"message-empty\"],\"messageLoading\":[1,\"message-loading\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"value\":[32],\"selectedOptions\":[32],\"setFocus\":[64],\"setValue\":[64],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-modal\",[[4,\"gov-modal\",{\"open\":[1028],\"blockClose\":[4,\"block-close\"],\"label\":[1],\"role\":[1],\"labelTag\":[1,\"label-tag\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagCloseLabelledBy\":[1,\"wcag-close-labelled-by\"],\"show\":[64],\"hide\":[64],\"validateWcag\":[64]}]]],[\"gov-pagination\",[[0,\"gov-pagination\",{\"type\":[1],\"current\":[2],\"total\":[2],\"inverse\":[4],\"size\":[1],\"variant\":[1],\"pageSize\":[2,\"page-size\"],\"maxPages\":[2,\"max-pages\"],\"link\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagSelectLabel\":[1,\"wcag-select-label\"],\"wcagPageLabel\":[1,\"wcag-page-label\"],\"pagination\":[32],\"validateWcag\":[64]}]]],[\"gov-prompt\",[[4,\"gov-prompt\",{\"open\":[1028],\"label\":[1],\"role\":[1],\"labelTag\":[1,\"label-tag\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagCloseLabelledBy\":[1,\"wcag-close-labelled-by\"],\"show\":[64],\"hide\":[64],\"validateWcag\":[64]}]]],[\"gov-tabs\",[[4,\"gov-tabs\",{\"type\":[1],\"variant\":[1],\"orientation\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagSelectLabel\":[1,\"wcag-select-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"controller\":[32],\"focusIndex\":[32],\"compactControls\":[32],\"refresh\":[64],\"currentTab\":[64],\"setActiveTab\":[64],\"validateWcag\":[64]}]]],[\"gov-infobar\",[[4,\"gov-infobar\",{\"headline\":[1],\"variant\":[1],\"inverse\":[4],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagToggleLabel\":[1,\"wcag-toggle-label\"],\"closable\":[4],\"toggleContent\":[32],\"validateWcag\":[64]}]]],[\"gov-loading\",[[4,\"gov-loading\"]]],[\"gov-side-nav-item\",[[4,\"gov-side-nav-item\",{\"inverse\":[4],\"compact\":[4],\"identifier\":[1],\"count\":[4],\"label\":[1],\"disabled\":[4],\"href\":[1],\"isExpanded\":[4,\"is-expanded\"],\"isExpandedState\":[32],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]}]]],[\"gov-toast\",[[4,\"gov-toast\",{\"variant\":[1],\"gravity\":[1],\"position\":[1],\"type\":[1],\"time\":[2],\"closeLabel\":[1,\"close-label\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"destroy\":[64]}]]],[\"gov-tooltip-content\",[[4,\"gov-tooltip-content\",{\"variant\":[1],\"size\":[1],\"persist\":[4],\"isVisible\":[1028,\"is-visible\"],\"parentId\":[1,\"parent-id\"]}]]],[\"gov-accordion-item\",[[4,\"gov-accordion-item\",{\"variant\":[1],\"identifier\":[1],\"size\":[1],\"disabled\":[4],\"isExpanded\":[1028,\"is-expanded\"],\"isExpandedState\":[32],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]}]]],[\"gov-card\",[[4,\"gov-card\",{\"promotion\":[4],\"label\":[1],\"collapsible\":[4],\"expanded\":[4],\"headlineTag\":[1,\"headline-tag\"],\"wcagTriggerLabel\":[1,\"wcag-trigger-label\"],\"wcagTriggerLabelledBy\":[1,\"wcag-trigger-labelled-by\"],\"isExpanded\":[32],\"open\":[64],\"close\":[64],\"validateWcag\":[64]}]]],[\"gov-form-checkbox\",[[4,\"gov-form-checkbox\",{\"value\":[1],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"noLabel\":[4,\"no-label\"],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-tile\",[[4,\"gov-tile\",{\"href\":[513],\"target\":[1],\"getTriggerRef\":[64]}]]],[\"gov-wizard-item\",[[4,\"gov-wizard-item\",{\"variant\":[1],\"size\":[1],\"identifier\":[1],\"collapsible\":[4],\"annotation\":[1],\"label\":[1],\"disabled\":[4],\"isExpanded\":[1028,\"is-expanded\"],\"labelTag\":[1,\"label-tag\"],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]}]]],[\"gov-accordion\",[[4,\"gov-accordion\",{\"size\":[1],\"variant\":[1],\"noBorder\":[4,\"no-border\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-app\",[[0,\"gov-app\"]]],[\"gov-breadcrumbs\",[[4,\"gov-breadcrumbs\",{\"collapsible\":[4],\"isExpanded\":[4,\"is-expanded\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labeled-by\"],\"validateWcag\":[64]}]]],[\"gov-container\",[[4,\"gov-container\",{\"slottedChildren\":[64]}]]],[\"gov-control-group\",[[4,\"gov-control-group\",{\"variant\":[1],\"noBorder\":[4,\"no-border\"]}]]],[\"gov-cookiebar\",[[4,\"gov-cookiebar\"]]],[\"gov-dropdown\",[[4,\"gov-dropdown\",{\"open\":[1028],\"position\":[1],\"getState\":[64],\"setOpen\":[64]}]]],[\"gov-empty\",[[4,\"gov-empty\"]]],[\"gov-error-code\",[[4,\"gov-error-code\"]]],[\"gov-form-control\",[[4,\"gov-form-control\",{\"gap\":[1],\"identifier\":[1],\"invalid\":[4],\"disabled\":[4],\"success\":[4],\"fieldset\":[4],\"size\":[1]}]]],[\"gov-form-group\",[[4,\"gov-form-group\",{\"gap\":[1],\"orientation\":[1]}]]],[\"gov-form-label\",[[4,\"gov-form-label\",{\"identifier\":[1],\"size\":[1],\"required\":[4],\"legend\":[4]}]]],[\"gov-form-password-power\",[[4,\"gov-form-password-power\",{\"power\":[514]}]]],[\"gov-form-radio\",[[4,\"gov-form-radio\",{\"value\":[1],\"noLabel\":[4,\"no-label\"],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-form-search\",[[4,\"gov-form-search\",{\"variant\":[513]}]]],[\"gov-form-switch\",[[4,\"gov-form-switch\",{\"value\":[1],\"noLabel\":[4,\"no-label\"],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-grid\",[[4,\"gov-grid\",{\"alignX\":[1,\"align-x\"],\"alignY\":[1,\"align-y\"]}]]],[\"gov-grid-item\",[[4,\"gov-grid-item\",{\"size\":[1],\"sizeSm\":[1,\"size-sm\"],\"sizeMd\":[1,\"size-md\"],\"sizeLg\":[1,\"size-lg\"],\"sizeXl\":[1,\"size-xl\"]}]]],[\"gov-layout\",[[4,\"gov-layout\",{\"type\":[1],\"variant\":[1],\"inverse\":[4]}]]],[\"gov-layout-column\",[[4,\"gov-layout-column\"]]],[\"gov-message\",[[4,\"gov-message\",{\"variant\":[1]}]]],[\"gov-nav\",[[4,\"gov-nav\",{\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-nav-item\",[[4,\"gov-nav-item\",{\"href\":[1],\"isExpandedState\":[32]}]]],[\"gov-side-nav\",[[4,\"gov-side-nav\",{\"inverse\":[4],\"compact\":[4],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-skeleton\",[[0,\"gov-skeleton\",{\"variant\":[1],\"count\":[2],\"shape\":[1],\"width\":[1],\"height\":[1],\"animation\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"validateWcag\":[64]}]]],[\"gov-spacer\",[[0,\"gov-spacer\",{\"size\":[1],\"breakpoint\":[1]}]]],[\"gov-statsbar\",[[4,\"gov-statsbar\",{\"iconPosition\":[1,\"icon-position\"],\"variant\":[1]}]]],[\"gov-statsbar-item\",[[4,\"gov-statsbar-item\",{\"iconPosition\":[1,\"icon-position\"]}]]],[\"gov-stepper\",[[4,\"gov-stepper\",{\"size\":[1]}]]],[\"gov-stepper-item\",[[4,\"gov-stepper-item\",{\"variant\":[1],\"size\":[1],\"identifier\":[1],\"label\":[1],\"annotation\":[1],\"triggerTag\":[1,\"trigger-tag\"],\"isExpandedState\":[32],\"currentState\":[64]}]]],[\"gov-tabs-item\",[[4,\"gov-tabs-item\",{\"identifier\":[1],\"triggerIdentifier\":[1,\"trigger-identifier\"],\"label\":[513],\"default\":[4],\"isActive\":[32],\"getIdentifier\":[64],\"getTriggerIdentifier\":[64],\"setActiveStatus\":[64]}]]],[\"gov-tag\",[[4,\"gov-tag\",{\"inverse\":[4],\"size\":[513],\"variant\":[513]}]]],[\"gov-tiles\",[[4,\"gov-tiles\",{\"columns\":[2],\"noBorder\":[4,\"no-border\"]}]]],[\"gov-tooltip\",[[4,\"gov-tooltip\",{\"variant\":[1],\"size\":[1],\"position\":[1025],\"message\":[1],\"identifier\":[1],\"icon\":[516],\"persist\":[32],\"show\":[64],\"hide\":[64]}]]],[\"gov-wizard\",[[4,\"gov-wizard\",{\"size\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-icon\",[[0,\"gov-icon\",{\"name\":[1],\"type\":[1],\"iconData\":[32],\"visible\":[32],\"error\":[32]}]]],[\"gov-form-input\",[[4,\"gov-form-input\",{\"value\":[1537],\"identifier\":[1],\"variant\":[1],\"success\":[4],\"size\":[1],\"name\":[1],\"multiline\":[4],\"rows\":[2],\"cols\":[2],\"required\":[4],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"minlength\":[2],\"maxlength\":[2],\"min\":[8],\"max\":[8],\"autocomplete\":[4],\"autocorrect\":[4],\"type\":[1],\"inputType\":[1,\"input-type\"],\"role\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"wcagAutocomplete\":[1,\"wcag-autocomplete\"],\"wcagExpanded\":[4,\"wcag-expanded\"],\"focused\":[32],\"setFocus\":[64],\"setValue\":[64],\"clearValue\":[64],\"getRef\":[64],\"validateWcag\":[64]}]]],[\"gov-form-autocomplete\",[[4,\"gov-form-autocomplete\",{\"value\":[1537],\"identifier\":[1],\"variant\":[1],\"success\":[4],\"size\":[1],\"nameKey\":[1,\"name-key\"],\"name\":[1],\"required\":[4],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"invalid\":[4],\"minlength\":[2],\"maxlength\":[2],\"messageEmpty\":[1,\"message-empty\"],\"messageLoading\":[1,\"message-loading\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"processing\":[32],\"arrowCounter\":[32],\"list\":[32],\"setFocus\":[64],\"setOptions\":[64],\"clearValue\":[64],\"setProcessing\":[64],\"setSearchCallback\":[64],\"setTemplateResolver\":[64]}]]],[\"gov-form-select\",[[4,\"gov-form-select\",{\"value\":[1537],\"identifier\":[1],\"variant\":[1],\"size\":[1],\"name\":[1],\"required\":[4],\"success\":[4],\"disabled\":[4],\"invalid\":[4],\"wcagActiveDescendant\":[1,\"wcag-active-descendant\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"options\":[32],\"setFocus\":[64],\"setValue\":[64],\"getRef\":[64],\"setOptions\":[64],\"validateWcag\":[64]}]]],[\"gov-chip\",[[4,\"gov-chip\",{\"inverse\":[4],\"disabled\":[4],\"href\":[1],\"target\":[1],\"size\":[1],\"tag\":[1],\"variant\":[1],\"focusable\":[4],\"identifier\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagSelected\":[4,\"wcag-selected\"],\"getTriggerRef\":[64],\"getTriggerIdentifier\":[64],\"setFocus\":[64]}]]],[\"gov-attachments_3\",[[4,\"gov-attachments-item\",{\"wcagRemoveLabel\":[1,\"wcag-remove-label\"],\"wcagRemoveLabelledBy\":[1,\"wcag-remove-labelled-by\"],\"validateWcag\":[64]}],[4,\"gov-attachments\",{\"label\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"validateWcag\":[64]}],[4,\"gov-form-message\",{\"variant\":[1],\"identifier\":[64]}]]],[\"gov-backdrop\",[[0,\"gov-backdrop\",{\"inverse\":[4],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-button\",[[4,\"gov-button\",{\"variant\":[513],\"size\":[513],\"type\":[513],\"expanded\":[4],\"inverse\":[4],\"name\":[1],\"disabled\":[516],\"nativeType\":[1,\"native-type\"],\"href\":[1],\"target\":[1],\"download\":[4],\"hreflang\":[1],\"referrerpolicy\":[1],\"rel\":[1],\"loading\":[1],\"focusable\":[4],\"identifier\":[1],\"wcagActiveDescendant\":[1,\"wcag-active-descendant\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagDescription\":[1,\"wcag-description\"],\"wcagDetails\":[1,\"wcag-details\"],\"wcagExpanded\":[4,\"wcag-expanded\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"wcagHasPopup\":[1,\"wcag-has-popup\"],\"wcagPressed\":[1,\"wcag-pressed\"],\"wcagCurrent\":[1,\"wcag-current\"],\"isPressed\":[32],\"setFocus\":[64],\"getTriggerRef\":[64],\"validateWcag\":[64]}]]]]"), options);
7
7
  };
8
8
 
9
9
  export { defineCustomElements };
@@ -29,6 +29,13 @@ const govHost = (host) => {
29
29
  hasSlot(name) {
30
30
  return !!this.getSlot(name);
31
31
  },
32
+ isSlotEmpty(name) {
33
+ const slot = this.getSlot(name);
34
+ if (slot) {
35
+ return slot.childNodes.length === 0;
36
+ }
37
+ return false;
38
+ },
32
39
  getSlot(name) {
33
40
  return this.hostElement.querySelector('[slot="' + name + '"]');
34
41
  },
@@ -110,4 +117,4 @@ const toOnOffAttrIfDefined = (value) => {
110
117
 
111
118
  export { toBoolAttr as a, booleanString as b, toOnOffAttrIfDefined as c, govHost as g, prepareClasses as p, slottedChildren as s, toBoolAttrIfDefined as t };
112
119
 
113
- //# sourceMapping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AG,IAAI,GAAG,KAAK,CAAA;GAC3F;OAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;IACrC,OAAO,KAAK,GAAG,CAAC,GAAG,IAAI,GAAG,KAAK,CAAA;GAC/B;OAAM,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE;IACtC,OAAO,KAAK,GAAG,IAAI,GAAG,KAAK,CAAA;GAC3B;OAAM;IACN,OAAO,KAAK,GAAG,IAAI,GAAG,KAAK,CAAA;GAC3B;AACF,CAAC,CAAA;MAEY,mBAAmB,GAAG,CAAC,KAAmD;EACtF,OAAO,OAAO,KAAK,KAAK,WAAW,GAAG,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,CAAA;AACpE,EAAC;MAEY,oBAAoB,GAAG,CAAC,KAAmD;EACvF,OAAO,OAAO,KAAK,KAAK,WAAW,GAAG,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,CAAA;AACrE;;;;","names":[],"sources":["../../../packages/core/src/helpers/Dom/template.ts"],"sourcesContent":["import {HTMLStencilElement} from '@stencil/core/internal'\nimport {GovHost} from './template.types'\nimport {Nullable} from '../../types/interfaces'\n\nexport const prepareClasses = (classes: string[]): string => {\n\tif (Array.isArray(classes) === false) return\n\treturn classes\n\t\t.filter(classname => !!classname)\n\t\t.join(' ')\n\t\t.trim()\n}\n\nexport const slottedChildren = (host: HTMLStencilElement): Node[] => {\n\tconst slotted = host.querySelector('slot') as HTMLSlotElement\n\tif (slotted) {\n\t\treturn slotted.assignedNodes().filter(node => {\n\t\t\treturn node.nodeName !== '#text'\n\t\t})\n\t}\n\treturn []\n}\n\nexport const booleanString = (value: boolean): string => {\n\treturn value ? 'true' : 'false'\n}\n\nexport const govHost = (host: HTMLStencilElement): GovHost => {\n\treturn {\n\t\tget hostElement(): HTMLStencilElement {\n\t\t\treturn host\n\t\t},\n\t\tget name(): string {\n\t\t\treturn this.hostElement.nodeName.toLowerCase()\n\t\t},\n\t\thasSlot(name: string): boolean {\n\t\t\treturn !!this.getSlot(name)\n\t\t},\n\t\tisSlotEmpty(name: string): boolean {\n\t\t\tconst slot = this.getSlot(name)\n\t\t\tif (slot) {\n\t\t\t\treturn slot.childNodes.length === 0\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t\tgetSlot(name: string): HTMLElement {\n\t\t\treturn this.hostElement.querySelector('[slot=\"' + name + '\"]')\n\t\t},\n\t\tgetParent(element): Nullable<HTMLElement> {\n\t\t\treturn this.hostElement.closest(element)\n\t\t},\n\t\tpassChildAttr(selector: string | string[], name: string, value: any): void {\n\t\t\tif (Array.isArray(selector)) {\n\t\t\t\tselector.forEach(selector => {\n\t\t\t\t\tthis.hostElement.querySelectorAll(selector).forEach(child => child.setAttribute(name, value))\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tthis.hostElement.querySelectorAll(selector).forEach(child => child.setAttribute(name, value))\n\t\t\t}\n\t\t},\n\t\tremoveChildAttr(selector: string | string[], name: string): void {\n\t\t\tif (Array.isArray(selector)) {\n\t\t\t\tselector.forEach(selector => {\n\t\t\t\t\tthis.hostElement.querySelectorAll(selector).forEach(child => child.removeAttribute(name))\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tthis.hostElement.querySelectorAll(selector).forEach(child => child.removeAttribute(name))\n\t\t\t}\n\t\t},\n\t\tget slottedChildren(): Node[] {\n\t\t\tconst slotted = this.hostElement.shadowRoot.querySelector('slot') as HTMLSlotElement\n\t\t\tif (slotted) {\n\t\t\t\treturn slotted.assignedNodes().filter(node => {\n\t\t\t\t\treturn node.nodeName !== '#text'\n\t\t\t\t})\n\t\t\t}\n\t\t\treturn []\n\t\t},\n\t\tclasses(classes: string | string[]): string {\n\t\t\tconst clearClasses = Array.isArray(classes) ? classes.join(' ') : classes\n\t\t\tif (this.hostElement) {\n\t\t\t\treturn this.hostElement.classList.toString() + ' ' + clearClasses\n\t\t\t}\n\t\t\treturn clearClasses\n\t\t},\n\t}\n}\n\nexport const toBoolAttr = (value: boolean | string | number): string => {\n\tif (typeof value === 'string') {\n\t\treturn ['true', 'True', 'TRUE', '1'].indexOf(value) !== -1 ? 'true' : 'false'\n\t} else if (typeof value === 'number') {\n\t\treturn value > 0 ? 'true' : 'false'\n\t} else if (typeof value === 'boolean') {\n\t\treturn value ? 'true' : 'false'\n\t} else {\n\t\treturn value ? 'true' : 'false'\n\t}\n}\n\nexport const toOnOffAttr = (value: boolean | string | number): string => {\n\tif (typeof value === 'string') {\n\t\treturn ['true', 'True', 'TRUE', '1', 'On', 'on', 'ON'].indexOf(value) !== -1 ? 'on' : 'off'\n\t} else if (typeof value === 'number') {\n\t\treturn value > 0 ? 'on' : 'off'\n\t} else if (typeof value === 'boolean') {\n\t\treturn value ? 'on' : 'off'\n\t} else {\n\t\treturn value ? 'on' : 'off'\n\t}\n}\n\nexport const toBoolAttrIfDefined = (value: boolean | string | number | undefined | null): undefined | string => {\n\treturn typeof value === 'undefined' ? undefined : toBoolAttr(value)\n}\n\nexport const toOnOffAttrIfDefined = (value: boolean | string | number | undefined | null): undefined | string => {\n\treturn typeof value === 'undefined' ? undefined : toOnOffAttr(value)\n}\n"],"version":3}