@gov-design-system-ce/components 0.0.58 → 0.0.59

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 (302) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/gov-app.cjs.entry.js +96 -37
  3. package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
  4. package/dist/cjs/gov-backdrop.cjs.entry.js.map +1 -1
  5. package/dist/cjs/gov-badge.cjs.entry.js +1 -1
  6. package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
  7. package/dist/cjs/gov-button.cjs.entry.js +1 -1
  8. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  9. package/dist/cjs/gov-form-label.cjs.entry.js +1 -1
  10. package/dist/cjs/gov-form-label.cjs.entry.js.map +1 -1
  11. package/dist/cjs/gov-icon.cjs.entry.js +1 -1
  12. package/dist/cjs/gov-infobar.cjs.entry.js +90 -0
  13. package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -0
  14. package/dist/cjs/gov-toast.cjs.entry.js +1 -1
  15. package/dist/cjs/gov-tooltip-content.cjs.entry.js +16 -4
  16. package/dist/cjs/gov-tooltip-content.cjs.entry.js.map +1 -1
  17. package/dist/cjs/gov-tooltip.cjs.entry.js +73 -46
  18. package/dist/cjs/gov-tooltip.cjs.entry.js.map +1 -1
  19. package/dist/cjs/index-83edd4fe.js +4 -4
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/collection/collection-manifest.json +1 -1
  22. package/dist/collection/components/gov-accordion/gov-accordion-item.css +1 -1
  23. package/dist/collection/components/gov-accordion/gov-accordion.css +1 -1
  24. package/dist/collection/components/gov-app/gov-app.css +1 -1
  25. package/dist/collection/components/gov-app/gov-app.js +2 -2
  26. package/dist/collection/components/gov-app/gov-app.js.map +1 -1
  27. package/dist/collection/components/gov-attachments/gov-attachments-item.css +1 -1
  28. package/dist/collection/components/gov-attachments/gov-attachments.css +1 -1
  29. package/dist/collection/components/gov-backdrop/gov-backdrop.css +1 -1
  30. package/dist/collection/components/gov-backdrop/gov-backdrop.js.map +1 -1
  31. package/dist/collection/components/gov-badge/gov-badge.css +41 -11
  32. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.css +1 -1
  33. package/dist/collection/components/gov-button/default/gov-button.css +10 -1
  34. package/dist/collection/components/gov-button/dropdown/gov-dropdown.css +1 -1
  35. package/dist/collection/components/gov-card/gov-card.css +1 -1
  36. package/dist/collection/components/gov-container/gov-container.css +1 -1
  37. package/dist/collection/components/gov-control-group/gov-control-group.css +1 -1
  38. package/dist/collection/components/gov-cookiebar/gov-cookiebar.css +1 -1
  39. package/dist/collection/components/gov-empty/gov-empty.css +1 -1
  40. package/dist/collection/components/gov-error-code/gov-error-code.css +1 -1
  41. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.css +1 -1
  42. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.css +1 -1
  43. package/dist/collection/components/gov-form/control/gov-form-control.css +1 -1
  44. package/dist/collection/components/gov-form/file/gov-form-file.css +1 -1
  45. package/dist/collection/components/gov-form/group/gov-form-group.css +1 -1
  46. package/dist/collection/components/gov-form/input/gov-form-input.css +1 -1
  47. package/dist/collection/components/gov-form/label/gov-form-label.css +5 -1
  48. package/dist/collection/components/gov-form/message/gov-form-message.css +1 -1
  49. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +1 -1
  50. package/dist/collection/components/gov-form/password-power/gov-form-password-power.css +1 -1
  51. package/dist/collection/components/gov-form/radio/gov-form-radio.css +1 -1
  52. package/dist/collection/components/gov-form/search/gov-form-search.css +1 -1
  53. package/dist/collection/components/gov-form/select/gov-form-select.css +1 -1
  54. package/dist/collection/components/gov-form/switch/gov-form-switch.css +1 -1
  55. package/dist/collection/components/gov-grid/gov-grid-item.css +1 -1
  56. package/dist/collection/components/gov-grid/gov-grid.css +1 -1
  57. package/dist/collection/components/gov-icon/gov-icon.css +1 -1
  58. package/dist/collection/components/gov-infobar/default/constants.js +12 -0
  59. package/dist/collection/components/gov-infobar/default/constants.js.map +1 -0
  60. package/dist/collection/components/gov-infobar/default/gov-infobar.css +384 -0
  61. package/dist/collection/components/{gov-alert/gov-alert.js → gov-infobar/default/gov-infobar.js} +27 -27
  62. package/dist/collection/components/gov-infobar/default/gov-infobar.js.map +1 -0
  63. package/dist/collection/components/gov-infobar/default/gov-infobar.types.js +2 -0
  64. package/dist/collection/components/gov-infobar/default/gov-infobar.types.js.map +1 -0
  65. package/dist/collection/components/gov-layout/gov-layout-column.css +1 -1
  66. package/dist/collection/components/gov-layout/gov-layout.css +1 -1
  67. package/dist/collection/components/gov-loading/loading/gov-loading.css +1 -1
  68. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.css +1 -1
  69. package/dist/collection/components/gov-message/gov-message.css +1 -1
  70. package/dist/collection/components/gov-modal/gov-modal.css +1 -1
  71. package/dist/collection/components/gov-nav/gov-nav-item.css +1 -1
  72. package/dist/collection/components/gov-nav/gov-nav.css +1 -1
  73. package/dist/collection/components/gov-pagination/gov-pagination.css +1 -1
  74. package/dist/collection/components/gov-promp/gov-prompt.css +1 -1
  75. package/dist/collection/components/gov-side-nav/gov-side-nav-item.css +1 -1
  76. package/dist/collection/components/gov-side-nav/gov-side-nav.css +1 -1
  77. package/dist/collection/components/gov-spacer/gov-spacer.css +1 -1
  78. package/dist/collection/components/gov-statsbar/gov-statsbar-item.css +1 -1
  79. package/dist/collection/components/gov-statsbar/gov-statsbar.css +1 -1
  80. package/dist/collection/components/gov-stepper/gov-stepper-item.css +1 -1
  81. package/dist/collection/components/gov-stepper/gov-stepper.css +1 -1
  82. package/dist/collection/components/gov-tabs/gov-tabs-item.css +1 -1
  83. package/dist/collection/components/gov-tabs/gov-tabs.css +1 -1
  84. package/dist/collection/components/gov-tile/container/gov-tiles.css +1 -1
  85. package/dist/collection/components/gov-tile/gov-tile.css +1 -1
  86. package/dist/collection/components/gov-toast/gov-toast.css +2 -2
  87. package/dist/collection/components/gov-tooltip/gov-tooltip-content.css +32 -27
  88. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +101 -5
  89. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js.map +1 -1
  90. package/dist/collection/components/gov-tooltip/gov-tooltip.css +1 -17
  91. package/dist/collection/components/gov-tooltip/gov-tooltip.js +83 -51
  92. package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
  93. package/dist/collection/components/gov-wizard/gov-wizard-item.css +1 -1
  94. package/dist/collection/components/gov-wizard/gov-wizard.css +1 -1
  95. package/dist/collection/pages/Card.js +11 -9
  96. package/dist/collection/pages/Card.js.map +1 -1
  97. package/dist/collection/pages/Home.js +43 -1
  98. package/dist/collection/pages/Home.js.map +1 -1
  99. package/dist/collection/pages/{Alert.js → Infobar.js} +42 -27
  100. package/dist/collection/pages/Infobar.js.map +1 -0
  101. package/dist/components/gov-accordion-item.js +1 -1
  102. package/dist/components/gov-app.js +1 -1
  103. package/dist/components/gov-app.js.map +1 -1
  104. package/dist/components/gov-attachments-item.js +1 -1
  105. package/dist/components/gov-badge.js +1 -1
  106. package/dist/components/gov-button.js +1 -1
  107. package/dist/components/gov-card.js +1 -1
  108. package/dist/components/gov-form-autocomplete.js +1 -1
  109. package/dist/components/gov-form-checkbox.js +1 -1
  110. package/dist/components/gov-form-file.js +1 -1
  111. package/dist/components/gov-form-input.js +1 -1
  112. package/dist/components/gov-form-label.js +1 -1
  113. package/dist/components/gov-form-label.js.map +1 -1
  114. package/dist/components/gov-form-multi-select.js +1 -1
  115. package/dist/components/gov-form-select.js +1 -1
  116. package/dist/components/gov-icon.js +1 -1
  117. package/dist/components/{gov-alert.d.ts → gov-infobar.d.ts} +4 -4
  118. package/dist/components/gov-infobar.js +2 -0
  119. package/dist/components/gov-infobar.js.map +1 -0
  120. package/dist/components/gov-loading.js +1 -1
  121. package/dist/components/gov-modal.js +1 -1
  122. package/dist/components/gov-pagination.js +1 -1
  123. package/dist/components/gov-prompt.js +1 -1
  124. package/dist/components/gov-side-nav-item.js +1 -1
  125. package/dist/components/gov-tabs.js +1 -1
  126. package/dist/components/gov-tile.js +1 -1
  127. package/dist/components/gov-toast.js +1 -1
  128. package/dist/components/gov-tooltip-content.js +1 -1
  129. package/dist/components/gov-tooltip-content.js.map +1 -1
  130. package/dist/components/gov-tooltip.js +1 -1
  131. package/dist/components/gov-tooltip.js.map +1 -1
  132. package/dist/components/gov-wizard-item.js +1 -1
  133. package/dist/components/{p-da3b225f.js → p-30af8d08.js} +2 -2
  134. package/dist/components/p-3e8a9e92.js.map +1 -1
  135. package/dist/components/{p-a6915747.js → p-5d8154f9.js} +2 -2
  136. package/dist/components/{p-0378da4d.js → p-8d44ca3c.js} +2 -2
  137. package/dist/components/p-8d44ca3c.js.map +1 -0
  138. package/dist/components/{p-404f469e.js → p-9a4c910d.js} +2 -2
  139. package/dist/components/{p-70d9d879.js → p-ae179d8a.js} +2 -2
  140. package/dist/components/p-ae179d8a.js.map +1 -0
  141. package/dist/components/{p-35f6490a.js → p-afb7fc88.js} +2 -2
  142. package/dist/components/{p-ee60cdd1.js → p-b430ee05.js} +2 -2
  143. package/dist/components/{p-9cba3cd3.js → p-e24896b9.js} +2 -2
  144. package/dist/core/core.css +1 -1
  145. package/dist/core/core.esm.js +1 -1
  146. package/dist/core/core.esm.js.map +1 -1
  147. package/dist/core/{p-3d0ab343.entry.js → p-0c57e410.entry.js} +2 -2
  148. package/dist/core/{p-42c1935f.entry.js → p-243a61bf.entry.js} +2 -2
  149. package/dist/core/{p-18ef9623.entry.js → p-2bf0c1c5.entry.js} +2 -2
  150. package/dist/core/p-2c0ac7ab.entry.js +2 -0
  151. package/dist/core/{p-85258200.entry.js.map → p-2c0ac7ab.entry.js.map} +1 -1
  152. package/dist/core/p-307d4c56.entry.js +2 -0
  153. package/dist/core/p-307d4c56.entry.js.map +1 -0
  154. package/dist/core/{p-6a65af35.entry.js → p-32a4b7e3.entry.js} +2 -2
  155. package/dist/core/p-32a4b7e3.entry.js.map +1 -0
  156. package/dist/core/{p-bd1cb5bd.entry.js → p-4452c278.entry.js} +2 -2
  157. package/dist/core/{p-a85f4a62.entry.js → p-49729bd4.entry.js} +2 -2
  158. package/dist/core/{p-ae894a40.js → p-570ef4e5.js} +2 -2
  159. package/dist/core/p-5cc3e768.entry.js +2 -0
  160. package/dist/core/p-5cc3e768.entry.js.map +1 -0
  161. package/dist/core/{p-33bf5974.entry.js → p-7372b066.entry.js} +2 -2
  162. package/dist/core/{p-69f944d1.entry.js → p-73fb7ac7.entry.js} +2 -2
  163. package/dist/core/{p-87aca157.entry.js → p-7702c8c2.entry.js} +2 -2
  164. package/dist/core/{p-9d72d80b.entry.js → p-7e8d2066.entry.js} +2 -2
  165. package/dist/core/{p-a5d00433.entry.js → p-7fa1290e.entry.js} +2 -2
  166. package/dist/core/{p-fb99f144.entry.js → p-8033916b.entry.js} +2 -2
  167. package/dist/core/p-82b4b522.entry.js +2 -0
  168. package/dist/core/p-82b4b522.entry.js.map +1 -0
  169. package/dist/core/{p-8fce08d1.entry.js → p-8667d5df.entry.js} +2 -2
  170. package/dist/core/{p-41e88980.entry.js → p-93897e60.entry.js} +2 -2
  171. package/dist/core/{p-41e88980.entry.js.map → p-93897e60.entry.js.map} +1 -1
  172. package/dist/core/{p-cacd0fed.entry.js → p-998c3336.entry.js} +2 -2
  173. package/dist/core/{p-404f469e.js → p-9a4c910d.js} +2 -2
  174. package/dist/core/{p-667dc3de.entry.js → p-afa12399.entry.js} +2 -2
  175. package/dist/core/{p-70140f70.entry.js → p-b0c97376.entry.js} +2 -2
  176. package/dist/core/p-bcf71ab5.entry.js +2 -0
  177. package/dist/core/p-bcf71ab5.entry.js.map +1 -0
  178. package/dist/core/{p-0c1697ce.entry.js → p-c4c9ff83.entry.js} +2 -2
  179. package/dist/core/{p-af646ce2.entry.js → p-c61444f7.entry.js} +2 -2
  180. package/dist/core/p-c61444f7.entry.js.map +1 -0
  181. package/dist/core/{p-d4cfa93a.entry.js → p-cb37644f.entry.js} +2 -2
  182. package/dist/core/{p-9bfab069.entry.js → p-ce262a72.entry.js} +2 -2
  183. package/dist/core/p-f9dfaff1.entry.js +2 -0
  184. package/dist/core/p-f9dfaff1.entry.js.map +1 -0
  185. package/dist/core/{p-13624a77.entry.js → p-fea58abc.entry.js} +2 -2
  186. package/dist/core/{p-dd39ede4.entry.js → p-ff97a688.entry.js} +2 -2
  187. package/dist/esm/{constants-f7b618c2.js → constants-887c5391.js} +2 -2
  188. package/dist/esm/{constants-f7b618c2.js.map → constants-887c5391.js.map} +1 -1
  189. package/dist/esm/core.js +1 -1
  190. package/dist/esm/gov-accordion.entry.js +1 -1
  191. package/dist/esm/gov-app.entry.js +96 -37
  192. package/dist/esm/gov-app.entry.js.map +1 -1
  193. package/dist/esm/gov-attachments_3.entry.js +1 -1
  194. package/dist/esm/gov-backdrop.entry.js +1 -1
  195. package/dist/esm/gov-backdrop.entry.js.map +1 -1
  196. package/dist/esm/gov-badge.entry.js +1 -1
  197. package/dist/esm/gov-badge.entry.js.map +1 -1
  198. package/dist/esm/gov-breadcrumbs.entry.js +1 -1
  199. package/dist/esm/gov-button.entry.js +2 -2
  200. package/dist/esm/gov-button.entry.js.map +1 -1
  201. package/dist/esm/gov-card.entry.js +1 -1
  202. package/dist/esm/gov-form-checkbox.entry.js +1 -1
  203. package/dist/esm/gov-form-file.entry.js +1 -1
  204. package/dist/esm/gov-form-input.entry.js +1 -1
  205. package/dist/esm/gov-form-label.entry.js +1 -1
  206. package/dist/esm/gov-form-label.entry.js.map +1 -1
  207. package/dist/esm/gov-form-multi-select.entry.js +1 -1
  208. package/dist/esm/gov-form-radio.entry.js +1 -1
  209. package/dist/esm/gov-form-select.entry.js +1 -1
  210. package/dist/esm/gov-form-switch.entry.js +1 -1
  211. package/dist/esm/gov-icon.entry.js +1 -1
  212. package/dist/esm/gov-infobar.entry.js +86 -0
  213. package/dist/esm/gov-infobar.entry.js.map +1 -0
  214. package/dist/esm/gov-modal.entry.js +1 -1
  215. package/dist/esm/gov-nav.entry.js +1 -1
  216. package/dist/esm/gov-pagination.entry.js +1 -1
  217. package/dist/esm/gov-prompt.entry.js +1 -1
  218. package/dist/esm/gov-side-nav.entry.js +1 -1
  219. package/dist/esm/gov-skeleton.entry.js +1 -1
  220. package/dist/esm/gov-tabs.entry.js +1 -1
  221. package/dist/esm/gov-toast.entry.js +1 -1
  222. package/dist/esm/gov-tooltip-content.entry.js +17 -5
  223. package/dist/esm/gov-tooltip-content.entry.js.map +1 -1
  224. package/dist/esm/gov-tooltip.entry.js +74 -47
  225. package/dist/esm/gov-tooltip.entry.js.map +1 -1
  226. package/dist/esm/gov-wizard.entry.js +1 -1
  227. package/dist/esm/index-ae3c50f1.js +4 -4
  228. package/dist/esm/loader.js +1 -1
  229. package/dist/esm/{wcag-062e7ca9.js → wcag-06bd4d01.js} +2 -2
  230. package/dist/esm/{wcag-062e7ca9.js.map → wcag-06bd4d01.js.map} +1 -1
  231. package/dist/globals.d.ts +2 -0
  232. package/dist/hydrate/index.js +287 -184
  233. package/dist/types/components/gov-app/gov-app.d.ts +1 -1
  234. package/dist/types/components/gov-backdrop/gov-backdrop.d.ts +1 -1
  235. package/dist/types/components/gov-infobar/default/constants.d.ts +12 -0
  236. package/dist/types/components/{gov-alert/gov-alert.d.ts → gov-infobar/default/gov-infobar.d.ts} +9 -9
  237. package/dist/types/components/gov-infobar/default/gov-infobar.types.d.ts +4 -0
  238. package/dist/types/components/gov-tooltip/gov-tooltip-content.d.ts +19 -1
  239. package/dist/types/components/gov-tooltip/gov-tooltip.d.ts +7 -3
  240. package/dist/types/components.d.ts +116 -84
  241. package/dist/types/pages/Infobar.d.ts +3 -0
  242. package/dist/types/types/typings.d.ts +6 -0
  243. package/package.json +2 -2
  244. package/dist/cjs/gov-alert.cjs.entry.js +0 -90
  245. package/dist/cjs/gov-alert.cjs.entry.js.map +0 -1
  246. package/dist/collection/components/gov-alert/constants.js +0 -12
  247. package/dist/collection/components/gov-alert/constants.js.map +0 -1
  248. package/dist/collection/components/gov-alert/gov-alert.css +0 -398
  249. package/dist/collection/components/gov-alert/gov-alert.js.map +0 -1
  250. package/dist/collection/components/gov-alert/gov-alert.types.js +0 -2
  251. package/dist/collection/components/gov-alert/gov-alert.types.js.map +0 -1
  252. package/dist/collection/pages/Alert.js.map +0 -1
  253. package/dist/components/gov-alert.js +0 -2
  254. package/dist/components/gov-alert.js.map +0 -1
  255. package/dist/components/p-0378da4d.js.map +0 -1
  256. package/dist/components/p-70d9d879.js.map +0 -1
  257. package/dist/core/p-3b9df792.entry.js +0 -2
  258. package/dist/core/p-3b9df792.entry.js.map +0 -1
  259. package/dist/core/p-3e5432d7.entry.js +0 -2
  260. package/dist/core/p-3e5432d7.entry.js.map +0 -1
  261. package/dist/core/p-4c79a97a.entry.js +0 -2
  262. package/dist/core/p-4c79a97a.entry.js.map +0 -1
  263. package/dist/core/p-6a65af35.entry.js.map +0 -1
  264. package/dist/core/p-85258200.entry.js +0 -2
  265. package/dist/core/p-af646ce2.entry.js.map +0 -1
  266. package/dist/core/p-bbcbe1cc.entry.js +0 -2
  267. package/dist/core/p-bbcbe1cc.entry.js.map +0 -1
  268. package/dist/core/p-dfc080f2.entry.js +0 -2
  269. package/dist/core/p-dfc080f2.entry.js.map +0 -1
  270. package/dist/esm/gov-alert.entry.js +0 -86
  271. package/dist/esm/gov-alert.entry.js.map +0 -1
  272. package/dist/types/components/gov-alert/constants.d.ts +0 -12
  273. package/dist/types/components/gov-alert/gov-alert.types.d.ts +0 -4
  274. package/dist/types/pages/Alert.d.ts +0 -3
  275. /package/dist/components/{p-da3b225f.js.map → p-30af8d08.js.map} +0 -0
  276. /package/dist/components/{p-a6915747.js.map → p-5d8154f9.js.map} +0 -0
  277. /package/dist/components/{p-404f469e.js.map → p-9a4c910d.js.map} +0 -0
  278. /package/dist/components/{p-35f6490a.js.map → p-afb7fc88.js.map} +0 -0
  279. /package/dist/components/{p-ee60cdd1.js.map → p-b430ee05.js.map} +0 -0
  280. /package/dist/components/{p-9cba3cd3.js.map → p-e24896b9.js.map} +0 -0
  281. /package/dist/core/{p-3d0ab343.entry.js.map → p-0c57e410.entry.js.map} +0 -0
  282. /package/dist/core/{p-42c1935f.entry.js.map → p-243a61bf.entry.js.map} +0 -0
  283. /package/dist/core/{p-18ef9623.entry.js.map → p-2bf0c1c5.entry.js.map} +0 -0
  284. /package/dist/core/{p-bd1cb5bd.entry.js.map → p-4452c278.entry.js.map} +0 -0
  285. /package/dist/core/{p-a85f4a62.entry.js.map → p-49729bd4.entry.js.map} +0 -0
  286. /package/dist/core/{p-ae894a40.js.map → p-570ef4e5.js.map} +0 -0
  287. /package/dist/core/{p-33bf5974.entry.js.map → p-7372b066.entry.js.map} +0 -0
  288. /package/dist/core/{p-69f944d1.entry.js.map → p-73fb7ac7.entry.js.map} +0 -0
  289. /package/dist/core/{p-87aca157.entry.js.map → p-7702c8c2.entry.js.map} +0 -0
  290. /package/dist/core/{p-9d72d80b.entry.js.map → p-7e8d2066.entry.js.map} +0 -0
  291. /package/dist/core/{p-a5d00433.entry.js.map → p-7fa1290e.entry.js.map} +0 -0
  292. /package/dist/core/{p-fb99f144.entry.js.map → p-8033916b.entry.js.map} +0 -0
  293. /package/dist/core/{p-8fce08d1.entry.js.map → p-8667d5df.entry.js.map} +0 -0
  294. /package/dist/core/{p-cacd0fed.entry.js.map → p-998c3336.entry.js.map} +0 -0
  295. /package/dist/core/{p-404f469e.js.map → p-9a4c910d.js.map} +0 -0
  296. /package/dist/core/{p-667dc3de.entry.js.map → p-afa12399.entry.js.map} +0 -0
  297. /package/dist/core/{p-70140f70.entry.js.map → p-b0c97376.entry.js.map} +0 -0
  298. /package/dist/core/{p-0c1697ce.entry.js.map → p-c4c9ff83.entry.js.map} +0 -0
  299. /package/dist/core/{p-d4cfa93a.entry.js.map → p-cb37644f.entry.js.map} +0 -0
  300. /package/dist/core/{p-9bfab069.entry.js.map → p-ce262a72.entry.js.map} +0 -0
  301. /package/dist/core/{p-13624a77.entry.js.map → p-fea58abc.entry.js.map} +0 -0
  302. /package/dist/core/{p-dd39ede4.entry.js.map → p-ff97a688.entry.js.map} +0 -0
@@ -0,0 +1,90 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-83edd4fe.js');
6
+ const props = require('./props-5f82e4c0.js');
7
+ const variants = require('./variants-f5ffeef3.js');
8
+ const utils = require('./utils-c9b1bba3.js');
9
+ const template = require('./template-e1c4ff78.js');
10
+ const Fragment = require('./Fragment-52846f79.js');
11
+ const wcag = require('./wcag-d7912060.js');
12
+ const win = require('./win-0427c131.js');
13
+ require('./gov.log-0c9dca27.js');
14
+ require('./string.utils-0f08c48c.js');
15
+
16
+ const InfobarVariants = utils.pick(variants.Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS']);
17
+ const InfobarClass = {
18
+ root: 'gov-infobar',
19
+ section: 'gov-infobar__section',
20
+ icon: 'gov-infobar__icon',
21
+ content: 'gov-infobar__content',
22
+ headline: 'gov-infobar__headline',
23
+ close: 'gov-infobar__close',
24
+ };
25
+
26
+ const govInfobarCss = ".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-infobar{position:relative;display:block;width:100%}.gov-infobar__section{display:flex;gap:1rem;padding:1rem}.gov-infobar__icon{flex:0 0 auto}.gov-infobar__icon>*{width:1.25rem;height:1.25rem}.gov-infobar__headline{display:flex;gap:1rem}.gov-infobar__headline+div{margin-top:0.5rem}.gov-infobar__headline p{margin-bottom:0}.gov-infobar__headline gov-button{margin-top:-0.25rem}.gov-infobar__content{padding-right:3.5rem}.gov-infobar__content>*:last-child{margin-bottom:0}.gov-infobar__content p{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}.gov-infobar__content a{color:inherit}@media not all and (pointer: coarse){.gov-infobar__content a:hover{color:inherit}}.gov-infobar__close{position:absolute;top:0.625rem;right:1rem}.gov-infobar[variant=warning]{background-color:var(--gov-infobar-warning-bg-color, var(--gov-color-warning))}.gov-infobar[variant=warning] .gov-infobar__icon{color:var(--gov-infobar-warning-icon-color, var(--gov-color-secondary))}.gov-infobar[variant=warning] .gov-infobar__content{color:var(--gov-infobar-warning-text-color, var(--gov-color-secondary))}.gov-infobar[variant=warning][inverse=\"\"],.gov-infobar[variant=warning][inverse=true i],.gov-infobar[variant=warning][inverse=\"1\"]{border-bottom:var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white))}.gov-infobar[variant=warning][inverse=\"\"] .gov-infobar__icon,.gov-infobar[variant=warning][inverse=true i] .gov-infobar__icon,.gov-infobar[variant=warning][inverse=\"1\"] .gov-infobar__icon{color:var(--gov-infobar-warning-bg-color, var(--gov-color-warning))}.gov-infobar[variant=warning][inverse=\"\"] .gov-infobar__content,.gov-infobar[variant=warning][inverse=true i] .gov-infobar__content,.gov-infobar[variant=warning][inverse=\"1\"] .gov-infobar__content{color:var(--gov-infobar-inverse-color, var(--gov-color-secondary-800))}.gov-infobar[variant=error]{background-color:var(--gov-infobar-error-bg-color, var(--gov-color-error))}.gov-infobar[variant=error] .gov-infobar__icon{color:var(--gov-infobar-error-icon-color, var(--gov-color-neutral-white))}.gov-infobar[variant=error] .gov-infobar__content{color:var(--gov-infobar-error-text-color, var(--gov-color-neutral-white))}.gov-infobar[variant=error][inverse=\"\"],.gov-infobar[variant=error][inverse=true i],.gov-infobar[variant=error][inverse=\"1\"]{border-bottom:var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white))}.gov-infobar[variant=error][inverse=\"\"] .gov-infobar__icon,.gov-infobar[variant=error][inverse=true i] .gov-infobar__icon,.gov-infobar[variant=error][inverse=\"1\"] .gov-infobar__icon{color:var(--gov-infobar-error-bg-color, var(--gov-color-error))}.gov-infobar[variant=error][inverse=\"\"] .gov-infobar__content,.gov-infobar[variant=error][inverse=true i] .gov-infobar__content,.gov-infobar[variant=error][inverse=\"1\"] .gov-infobar__content{color:var(--gov-infobar-inverse-color, var(--gov-color-secondary-800))}.gov-infobar[variant=secondary]{background-color:var(--gov-infobar-secondary-bg-color, var(--gov-color-secondary))}.gov-infobar[variant=secondary] .gov-infobar__icon{color:var(--gov-infobar-secondary-icon-color, var(--gov-color-neutral-white))}.gov-infobar[variant=secondary] .gov-infobar__content{color:var(--gov-infobar-secondary-text-color, var(--gov-color-neutral-white))}.gov-infobar[variant=secondary][inverse=\"\"],.gov-infobar[variant=secondary][inverse=true i],.gov-infobar[variant=secondary][inverse=\"1\"]{border-bottom:var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white))}.gov-infobar[variant=secondary][inverse=\"\"] .gov-infobar__icon,.gov-infobar[variant=secondary][inverse=true i] .gov-infobar__icon,.gov-infobar[variant=secondary][inverse=\"1\"] .gov-infobar__icon{color:var(--gov-infobar-secondary-bg-color, var(--gov-color-secondary))}.gov-infobar[variant=secondary][inverse=\"\"] .gov-infobar__content,.gov-infobar[variant=secondary][inverse=true i] .gov-infobar__content,.gov-infobar[variant=secondary][inverse=\"1\"] .gov-infobar__content{color:var(--gov-infobar-inverse-color, var(--gov-color-secondary-800))}.gov-infobar[variant=success]{background-color:var(--gov-infobar-success-bg-color, var(--gov-color-success-500))}.gov-infobar[variant=success] .gov-infobar__icon{color:var(--gov-infobar-success-icon-color, var(--gov-color-neutral-white))}.gov-infobar[variant=success] .gov-infobar__content{color:var(--gov-infobar-success-text-color, var(--gov-color-neutral-white))}.gov-infobar[variant=success][inverse=\"\"],.gov-infobar[variant=success][inverse=true i],.gov-infobar[variant=success][inverse=\"1\"]{border-bottom:var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white))}.gov-infobar[variant=success][inverse=\"\"] .gov-infobar__icon,.gov-infobar[variant=success][inverse=true i] .gov-infobar__icon,.gov-infobar[variant=success][inverse=\"1\"] .gov-infobar__icon{color:var(--gov-infobar-success-bg-color, var(--gov-color-success-500))}.gov-infobar[variant=success][inverse=\"\"] .gov-infobar__content,.gov-infobar[variant=success][inverse=true i] .gov-infobar__content,.gov-infobar[variant=success][inverse=\"1\"] .gov-infobar__content{color:var(--gov-infobar-inverse-color, var(--gov-color-secondary-800))}.gov-infobar[variant=primary]{background-color:var(--gov-infobar-primary-bg-color, var(--gov-color-primary))}.gov-infobar[variant=primary] .gov-infobar__icon{color:var(--gov-infobar-primary-icon-color, var(--gov-color-neutral-white))}.gov-infobar[variant=primary] .gov-infobar__content{color:var(--gov-infobar-primary-text-color, var(--gov-color-neutral-white))}.gov-infobar[variant=primary][inverse=\"\"],.gov-infobar[variant=primary][inverse=true i],.gov-infobar[variant=primary][inverse=\"1\"]{border-bottom:var(--gov-infobar-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-infobar-inverse-bg, var(--gov-color-neutral-white))}.gov-infobar[variant=primary][inverse=\"\"] .gov-infobar__icon,.gov-infobar[variant=primary][inverse=true i] .gov-infobar__icon,.gov-infobar[variant=primary][inverse=\"1\"] .gov-infobar__icon{color:var(--gov-infobar-primary-bg-color, var(--gov-color-primary))}.gov-infobar[variant=primary][inverse=\"\"] .gov-infobar__content,.gov-infobar[variant=primary][inverse=true i] .gov-infobar__content,.gov-infobar[variant=primary][inverse=\"1\"] .gov-infobar__content{color:var(--gov-infobar-inverse-color, var(--gov-color-secondary-800))}@media (min-width: 75em){.gov-infobar__content{padding-right:2rem}}";
27
+
28
+ const GovInfobar = class {
29
+ constructor(hostRef) {
30
+ index.registerInstance(this, hostRef);
31
+ this.govClose = index.createEvent(this, "gov-close", 7);
32
+ this.headline = undefined;
33
+ this.variant = "primary";
34
+ this.inverse = false;
35
+ this.wcagCloseLabel = undefined;
36
+ this.wcagToggleLabel = undefined;
37
+ this.closable = false;
38
+ this.toggleContent = false;
39
+ this.h = template.govHost(this.host);
40
+ }
41
+ validateVariant(newValue) {
42
+ props.validateProp(InfobarVariants, newValue, InfobarClass.root);
43
+ }
44
+ componentWillLoad() {
45
+ this.validateVariant(this.variant);
46
+ }
47
+ async componentDidRender() {
48
+ if (win.canValidateWcagOnRender()) {
49
+ await utils.delay(500);
50
+ await this.validateWcag();
51
+ }
52
+ }
53
+ render() {
54
+ let inverse = !this.inverse;
55
+ let variant = this.inverse ? "secondary" : this.variant;
56
+ if (this.variant == "warning") {
57
+ inverse = false;
58
+ variant = "secondary";
59
+ }
60
+ const closeButton = (index.h("div", { class: InfobarClass.close }, index.h("gov-button", { size: "s", "aria-label": this.wcagCloseLabel, type: "base", variant: variant, inverse: inverse, "on-gov-click": this.onCloseHandler.bind(this) }, index.h("gov-icon", { name: "x-lg" }))));
61
+ return (index.h(index.Host, { class: this.h.classes(InfobarClass.root), variant: this.variant }, index.h("section", { class: InfobarClass.section, role: "infobar" }, this.h.hasSlot("icon") && (index.h("div", { class: InfobarClass.icon }, index.h("slot", { name: "icon" }))), index.h("div", { class: InfobarClass.content }, this.headline ? (index.h(Fragment.Fragment, null, index.h("div", { class: InfobarClass.headline }, index.h("p", null, this.headline), index.h("gov-button", { size: "s", "aria-label": this.wcagToggleLabel, type: "base", variant: variant, inverse: inverse, "on-gov-click": () => this.toggleContent = !this.toggleContent }, index.h("gov-icon", { name: this.toggleContent ? 'chevron-up' : 'chevron-down' }))), index.h("div", { hidden: !this.toggleContent, "aria-hidden": template.toBoolAttr(this.toggleContent) }, index.h("slot", null)))) : (index.h("slot", null)))), this.closable && closeButton));
62
+ }
63
+ onCloseHandler(e) {
64
+ this.govClose.emit({
65
+ component: InfobarClass.root,
66
+ ref: this.host,
67
+ originalEvent: e,
68
+ });
69
+ }
70
+ /**
71
+ * Validate the WCAG attributes of the component
72
+ */
73
+ async validateWcag() {
74
+ if (this.closable) {
75
+ wcag.validateWcagProp(this.wcagCloseLabel, 'wcag-close-label', InfobarClass.root);
76
+ }
77
+ if (this.headline) {
78
+ wcag.validateWcagProp(this.wcagToggleLabel, 'wcag-toggle-label', InfobarClass.root);
79
+ }
80
+ }
81
+ get host() { return index.getElement(this); }
82
+ static get watchers() { return {
83
+ "variant": ["validateVariant"]
84
+ }; }
85
+ };
86
+ GovInfobar.style = govInfobarCss;
87
+
88
+ exports.gov_infobar = GovInfobar;
89
+
90
+ //# sourceMappingURL=gov-infobar.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"gov-infobar.entry.cjs.js","mappings":";;;;;;;;;;;;;;;AAIO,MAAM,eAAe,GAAGA,UAAI,CAACC,iBAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA;AAG/F,MAAM,YAAY,GAAG;EAC3B,IAAI,EAAE,aAAa;EACnB,OAAO,EAAE,sBAAsB;EAC/B,IAAI,EAAE,mBAAmB;EACzB,OAAO,EAAE,sBAAsB;EAC/B,QAAQ,EAAE,uBAAuB;EACjC,KAAK,EAAE,oBAAoB;CAC3B;;ACdD,MAAM,aAAa,GAAG,0kOAA0kO;;MCgBnlO,UAAU;EAGtB;;;;mBAawC,SAAS;mBAIb,KAAK;;;oBAgBH,KAAK;yBAElB,KAAK;IAlC7B,IAAI,CAAC,CAAC,GAAGC,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAoCD,eAAe,CAAC,QAAgB;IAC/BC,kBAAY,CAAC,eAAe,EAAE,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;GAC1D;EAED,iBAAiB;IAChB,IAAI,CAAC,eAAe,CAAC,IAAI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QAAQ,IAChCA,mBAAI,IAAI,CAAC,QAAQ,CAAK,EACtBA,wBACC,IAAI,EAAC,GAAG,gBACI,IAAI,CAAC,eAAe,EAChC,IAAI,EAAC,MAAM,EACX,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,kBACF,MAAM,IAAI,CAAC,aAAa,GAAG,CAAC,IAAI,CAAC,aAAa,IAE5DA,sBAAU,IAAI,EAAE,IAAI,CAAC,aAAa,GAAG,YAAY,GAAG,cAAc,GAAa,CACnE,CACR,EACNA,iBAAK,MAAM,EAAE,CAAC,IAAI,CAAC,aAAa,iBAAeG,mBAAU,CAAC,IAAI,CAAC,aAAa,CAAC,IAC5EH,qBAAQ,CACH,CACI,KAEXA,qBAAQ,CACR,CACI,CACG,EACT,IAAI,CAAC,QAAQ,IAAI,WAAW,CACvB,EACP;GACD;EAED,cAAc,CAAC,CAA2B;IACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;MAClB,SAAS,EAAE,YAAY,CAAC,IAAI;MAC5B,GAAG,EAAE,IAAI,CAAC,IAAI;MACd,aAAa,EAAE,CAAC;KAChB,CAAC,CAAA;GACF;;;;EAMD,MAAM,YAAY;IACjB,IAAI,IAAI,CAAC,QAAQ,EAAE;MAClBI,qBAAgB,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;KAC5E;IACD,IAAI,IAAI,CAAC,QAAQ,EAAE;MAClBA,qBAAgB,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;KAC9E;GACD;;;;;;;;;;","names":["pick","Variants","govHost","validateProp","canValidateWcagOnRender","delay","h","Host","Fragment","toBoolAttr","validateWcagProp"],"sources":["../../../packages/core/src/components/gov-infobar/default/constants.ts","../../../packages/core/src/components/gov-infobar/default/gov-infobar.scss?tag=gov-infobar","../../../packages/core/src/components/gov-infobar/default/gov-infobar.tsx"],"sourcesContent":["import { Variants } from '../../../core/constants/variants'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const InfobarVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS'])\nexport type VariantType = `${ValueOf<typeof InfobarVariants>}`\n\nexport const InfobarClass = {\n\troot: 'gov-infobar',\n\tsection: 'gov-infobar__section',\n\ticon: 'gov-infobar__icon',\n\tcontent: 'gov-infobar__content',\n\theadline: 'gov-infobar__headline',\n\tclose: 'gov-infobar__close',\n}\n","/*\n * Infobar\n */\n\n$class: \".gov-infobar\";\n\n#{$class} {\n\t@include base();\n\n\t&__section {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\tpadding: rem-calc(16);\n\t}\n\n\t&__icon {\n\t\tflex: 0 0 auto;\n\n\t\t& > * {\n\t\t\twidth: rem-calc(20);\n\t\t\theight: rem-calc(20);\n\t\t}\n\t}\n\n\t&__headline {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\n\t\t+ div {\n\t\t\tmargin-top: rem-calc(8);\n\t\t}\n\n\t\tp {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\tgov-button {\n\t\t\tmargin-top: rem-calc(-4);\n\t\t}\n\t}\n\n\t&__content {\n\t\t@include reset-last-margin();\n\t\tpadding-right: rem-calc(56);\n\n\t\tp {\n\t\t\t@include typography($font-size-m);\n\t\t}\n\n\t\ta {\n\t\t\tcolor: inherit;\n\t\t\t@include hover() {\n\t\t\t\tcolor: inherit;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__close {\n\t\tposition: absolute;\n\t\ttop: rem-calc(10);\n\t\tright: rem-calc(16);\n\t}\n\n\t// VARIANTS\n\t@each $variant, $definitions in $infobar-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\tbackground-color: get(\"bg-color\", $definitions);\n\n\t\t\t#{$class} {\n\t\t\t\t&__icon {\n\t\t\t\t\tcolor: get(\"icon-color\", $definitions);\n\t\t\t\t}\n\n\t\t\t\t&__content {\n\t\t\t\t\tcolor: get(\"text-color\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@if deep-map-check($definitions, \"border\") {\n\t\t\t\tborder-bottom: $infobar-border;\n\t\t\t}\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\tborder-bottom: $infobar-border;\n\t\t\t\tbackground-color: $infobar-inverse-bg;\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__icon {\n\t\t\t\t\t\tcolor: get(\"bg-color\", $definitions);\n\t\t\t\t\t}\n\n\t\t\t\t\t&__content {\n\t\t\t\t\t\tcolor: $infobar-inverse-color;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: xl) {\n\t\t&__content {\n\t\t\tpadding-right: rem-calc(32);\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../../helpers/Validate/props\"\nimport { InfobarClass, InfobarVariants, VariantType } from \"./constants\"\nimport { govHost, toBoolAttr } from \"../../../helpers/Dom/template\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { InfobarEvent } from \"./gov-infobar.types\"\nimport { ButtonEvent } from \"../../gov-button/default/gov-button.types\"\nimport Fragment from \"../../../helpers/Fragment\"\nimport { validateWcagProp } from \"../../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\nimport { delay } from \"../../../utils/utils\"\n\n@Component({\n\ttag: \"gov-infobar\",\n\tstyleUrl: \"gov-infobar.scss\",\n})\nexport class GovInfobar {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovInfobarElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly headline: string\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant: VariantType = \"primary\"\n\t/**\n\t * Determine if component should have inverse colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Aria label for the closing button. It is mandatory if the infobar is closable\n\t */\n\t@Prop({ attribute: \"wcag-close-label\" }) readonly wcagCloseLabel: string\n\t/**\n\t * Aria label for the toggle button. It is mandatory if the infobar has headline\n\t */\n\t@Prop({ attribute: \"wcag-toggle-label\" }) readonly wcagToggleLabel: string\n\t/**\n\t * Called when the close button is clicked\n\t */\n\t@Event({ eventName: \"gov-close\" }) govClose: EventEmitter<InfobarEvent>\n\t/**\n\t * Displays the option to close the infobar\n\t */\n\t@Prop() readonly closable?: boolean = false\n\n\t@State() toggleContent = false\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(InfobarVariants, newValue, InfobarClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tlet inverse = !this.inverse\n\t\tlet variant = this.inverse ? \"secondary\" : this.variant\n\n\t\tif (this.variant == \"warning\") {\n\t\t\tinverse = false\n\t\t\tvariant = \"secondary\"\n\t\t}\n\n\t\tconst closeButton = (\n\t\t\t<div class={InfobarClass.close}>\n\t\t\t\t<gov-button\n\t\t\t\t\tsize=\"s\"\n\t\t\t\t\taria-label={this.wcagCloseLabel}\n\t\t\t\t\ttype=\"base\"\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\tinverse={inverse}\n\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t>\n\t\t\t\t\t<gov-icon name=\"x-lg\"></gov-icon>\n\t\t\t\t</gov-button>\n\t\t\t</div>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(InfobarClass.root)} variant={this.variant}>\n\t\t\t\t<section class={InfobarClass.section} role=\"infobar\">\n\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t<div class={InfobarClass.icon}>\n\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div class={InfobarClass.content}>\n\t\t\t\t\t\t{this.headline ? (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<div class={InfobarClass.headline}>\n\t\t\t\t\t\t\t\t\t<p>{this.headline}</p>\n\t\t\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\t\t\t\t\taria-label={this.wcagToggleLabel}\n\t\t\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\t\t\tvariant={variant}\n\t\t\t\t\t\t\t\t\t\tinverse={inverse}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.toggleContent = !this.toggleContent}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<gov-icon name={this.toggleContent ? 'chevron-up' : 'chevron-down'}></gov-icon>\n\t\t\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div hidden={!this.toggleContent} aria-hidden={toBoolAttr(this.toggleContent)}>\n\t\t\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t\t{this.closable && closeButton}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tonCloseHandler(e: CustomEvent<ButtonEvent>) {\n\t\tthis.govClose.emit({\n\t\t\tcomponent: InfobarClass.root,\n\t\t\tref: this.host,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tif (this.closable) {\n\t\t\tvalidateWcagProp(this.wcagCloseLabel, 'wcag-close-label', InfobarClass.root)\n\t\t}\n\t\tif (this.headline) {\n\t\t\tvalidateWcagProp(this.wcagToggleLabel, 'wcag-toggle-label', InfobarClass.root)\n\t\t}\n\t}\n}\n"],"version":3}
@@ -21,7 +21,7 @@ const ToastClass = {
21
21
  timer: 'gov-toast__timer',
22
22
  };
23
23
 
24
- const govToastCss = ".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-toast{position:relative;display:flex;gap:1rem;flex-direction:column;padding:0.75rem 1rem;border-left:0.25rem solid transparent;background:var(--gov-toast-message-bg, var(--gov-color-neutral-white));z-index:201;position:relative;position:fixed;max-width:23.4375rem;padding-right:3.125rem;opacity:1;transition:opacity 300ms ease-in-out}.gov-toast__icon{flex:0 0 1.25rem;width:1.25rem;height:1.25rem}.gov-toast__content{flex:1 1 auto}.gov-toast__content>*:last-child{margin-bottom:0}.gov-toast__content p{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}@media (min-width: 30em){.gov-toast{flex-direction:row}}.gov-toast__content{padding-right:0}.gov-toast__close{position:absolute;top:0.5rem;right:0.75rem}.gov-toast__timer{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.gov-toast--hidden{opacity:0}.gov-toast[gravity=top i]{top:1rem}.gov-toast[gravity=bottom i]{bottom:1rem}.gov-toast[position=left i]{left:1rem}.gov-toast[position=center i]{left:50%;transform:translateX(-50%)}.gov-toast[position=right i]{right:1rem}.gov-toast[type=solid i]{border:none;border-radius:0.25rem;overflow:hidden;box-shadow:none}.gov-toast[type=solid i].is-initialized .gov-toast__timer{transform-origin:left;animation:countdown linear forwards var(--toast-duration, 0)}.gov-toast[variant=warning]{border-left-color:var(--gov-toast-warning-codecor-lor, var(--gov-color-warning))}.gov-toast[variant=warning] .gov-toast__icon{color:var(--gov-toast-warning-codecor-lor, var(--gov-color-warning))}.gov-toast[variant=warning][type=solid i]{background-color:var(--gov-toast-warning-background, var(--gov-color-warning));color:var(--gov-toast-warning-color, var(--gov-color-secondary))}.gov-toast[variant=warning][type=solid i] .gov-toast__icon{color:var(--gov-toast-warning-color, var(--gov-color-secondary))}.gov-toast[variant=warning][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-warning-timer-background, rgba(var(--gov-color-warning-500-rgb), 0.3))}.gov-toast[variant=error]{border-left-color:var(--gov-toast-error-colodecor-r, var(--gov-color-error))}.gov-toast[variant=error] .gov-toast__icon{color:var(--gov-toast-error-colodecor-r, var(--gov-color-error))}.gov-toast[variant=error][type=solid i]{background-color:var(--gov-toast-error-background, var(--gov-color-error));color:var(--gov-toast-error-color, var(--gov-color-neutral-white))}.gov-toast[variant=error][type=solid i] .gov-toast__icon{color:var(--gov-toast-error-color, var(--gov-color-neutral-white))}.gov-toast[variant=error][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-error-timer-background, rgba(var(--gov-color-error-500-rgb), 0.5))}.gov-toast[variant=success]{border-left-color:var(--gov-toast-success-codecor-lor, var(--gov-color-success))}.gov-toast[variant=success] .gov-toast__icon{color:var(--gov-toast-success-codecor-lor, var(--gov-color-success))}.gov-toast[variant=success][type=solid i]{background-color:var(--gov-toast-success-background, var(--gov-color-success-500));color:var(--gov-toast-success-color, var(--gov-color-neutral-white))}.gov-toast[variant=success][type=solid i] .gov-toast__icon{color:var(--gov-toast-success-color, var(--gov-color-neutral-white))}.gov-toast[variant=success][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-success-timer-background, rgba(var(--gov-color-success-600-rgb), 0.5))}.gov-toast[variant=primary]{border-left-color:var(--gov-toast-primary-codecor-lor, var(--gov-color-primary))}.gov-toast[variant=primary] .gov-toast__icon{color:var(--gov-toast-primary-codecor-lor, var(--gov-color-primary))}.gov-toast[variant=primary][type=solid i]{background-color:var(--gov-toast-primary-background, var(--gov-color-primary));color:var(--gov-toast-primary-color, var(--gov-color-neutral-white))}.gov-toast[variant=primary][type=solid i] .gov-toast__icon{color:var(--gov-toast-primary-color, var(--gov-color-neutral-white))}.gov-toast[variant=primary][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-primary-timer-background, rgba(var(--gov-color-primary-700-rgb), 0.5))}.gov-toast[variant=secondary]{border-left-color:var(--gov-toast-secondary-decor-color, var(--gov-color-secondary))}.gov-toast[variant=secondary] .gov-toast__icon{color:var(--gov-toast-secondary-decor-color, var(--gov-color-secondary))}.gov-toast[variant=secondary][type=solid i]{background-color:var(--gov-toast-secondary-background, var(--gov-color-secondary));color:var(--gov-toast-secondary-color, var(--gov-color-neutral-white))}.gov-toast[variant=secondary][type=solid i] .gov-toast__icon{color:var(--gov-toast-secondary-color, var(--gov-color-neutral-white))}.gov-toast[variant=secondary][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-secondary-timer-background, rgba(var(--gov-color-secondary-900-rgb), 0.5))}@media (min-width: 30em){.gov-toast__content{padding-right:2rem}}";
24
+ const govToastCss = ".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-toast{position:relative;display:flex;gap:1rem;flex-direction:column;padding:0.75rem 1rem;border-left:0.25rem solid transparent;background:var(--gov-toast-message-bg, var(--gov-color-neutral-white));z-index:301;position:relative;position:fixed;max-width:23.4375rem;padding-right:3.125rem;opacity:1;transition:opacity 300ms ease-in-out}.gov-toast__icon{flex:0 0 1.25rem;width:1.25rem;height:1.25rem}.gov-toast__content{flex:1 1 auto}.gov-toast__content>*:last-child{margin-bottom:0}.gov-toast__content p{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}@media (min-width: 30em){.gov-toast{flex-direction:row}}.gov-toast__content{padding-right:0}.gov-toast__close{position:absolute;top:0.5rem;right:0.75rem}.gov-toast__timer{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.gov-toast--hidden{opacity:0}.gov-toast[gravity=top i]{top:1rem}.gov-toast[gravity=bottom i]{bottom:1rem}.gov-toast[position=left i]{left:1rem}.gov-toast[position=center i]{left:50%;transform:translateX(-50%)}.gov-toast[position=right i]{right:1rem}.gov-toast[type=solid i]{border:none;border-radius:0.25rem;overflow:hidden;box-shadow:none}.gov-toast[type=solid i].is-initialized .gov-toast__timer{transform-origin:left;animation:countdown linear forwards var(--toast-duration, 0)}.gov-toast[variant=warning]{border-left-color:var(--gov-toast-warning-codecor-lor, var(--gov-color-warning))}.gov-toast[variant=warning] .gov-toast__icon{color:var(--gov-toast-warning-codecor-lor, var(--gov-color-warning))}.gov-toast[variant=warning][type=solid i]{background-color:var(--gov-toast-warning-background, var(--gov-color-warning));color:var(--gov-toast-warning-color, var(--gov-color-secondary))}.gov-toast[variant=warning][type=solid i] .gov-toast__icon{color:var(--gov-toast-warning-color, var(--gov-color-secondary))}.gov-toast[variant=warning][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-warning-timer-background, rgba(var(--gov-color-warning-500-rgb), 0.3))}.gov-toast[variant=error]{border-left-color:var(--gov-toast-error-colodecor-r, var(--gov-color-error))}.gov-toast[variant=error] .gov-toast__icon{color:var(--gov-toast-error-colodecor-r, var(--gov-color-error))}.gov-toast[variant=error][type=solid i]{background-color:var(--gov-toast-error-background, var(--gov-color-error));color:var(--gov-toast-error-color, var(--gov-color-neutral-white))}.gov-toast[variant=error][type=solid i] .gov-toast__icon{color:var(--gov-toast-error-color, var(--gov-color-neutral-white))}.gov-toast[variant=error][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-error-timer-background, rgba(var(--gov-color-error-500-rgb), 0.5))}.gov-toast[variant=success]{border-left-color:var(--gov-toast-success-codecor-lor, var(--gov-color-success))}.gov-toast[variant=success] .gov-toast__icon{color:var(--gov-toast-success-codecor-lor, var(--gov-color-success))}.gov-toast[variant=success][type=solid i]{background-color:var(--gov-toast-success-background, var(--gov-color-success-500));color:var(--gov-toast-success-color, var(--gov-color-neutral-white))}.gov-toast[variant=success][type=solid i] .gov-toast__icon{color:var(--gov-toast-success-color, var(--gov-color-neutral-white))}.gov-toast[variant=success][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-success-timer-background, rgba(var(--gov-color-success-600-rgb), 0.5))}.gov-toast[variant=primary]{border-left-color:var(--gov-toast-primary-codecor-lor, var(--gov-color-primary))}.gov-toast[variant=primary] .gov-toast__icon{color:var(--gov-toast-primary-codecor-lor, var(--gov-color-primary))}.gov-toast[variant=primary][type=solid i]{background-color:var(--gov-toast-primary-background, var(--gov-color-primary));color:var(--gov-toast-primary-color, var(--gov-color-neutral-white))}.gov-toast[variant=primary][type=solid i] .gov-toast__icon{color:var(--gov-toast-primary-color, var(--gov-color-neutral-white))}.gov-toast[variant=primary][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-primary-timer-background, rgba(var(--gov-color-primary-700-rgb), 0.5))}.gov-toast[variant=secondary]{border-left-color:var(--gov-toast-secondary-decor-color, var(--gov-color-secondary))}.gov-toast[variant=secondary] .gov-toast__icon{color:var(--gov-toast-secondary-decor-color, var(--gov-color-secondary))}.gov-toast[variant=secondary][type=solid i]{background-color:var(--gov-toast-secondary-background, var(--gov-color-secondary));color:var(--gov-toast-secondary-color, var(--gov-color-neutral-white))}.gov-toast[variant=secondary][type=solid i] .gov-toast__icon{color:var(--gov-toast-secondary-color, var(--gov-color-neutral-white))}.gov-toast[variant=secondary][type=solid i] .gov-toast__timer{background-color:var(--gov-toast-secondary-timer-background, rgba(var(--gov-color-secondary-900-rgb), 0.5))}@media (min-width: 30em){.gov-toast__content{padding-right:2rem}}";
25
25
 
26
26
  const GovToast = class {
27
27
  constructor(hostRef) {
@@ -9,26 +9,38 @@ require('./variants-f5ffeef3.js');
9
9
  require('./sizes-79872c2a.js');
10
10
  require('./utils-c9b1bba3.js');
11
11
 
12
- const govTooltipContentCss = ".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-content{z-index:51;font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);position:absolute;display:block;width:-moz-max-content;width:max-content;max-width:var(--gov-tooltip-content-max-width, 21rem);padding:1rem;border-radius:0.1875rem;background-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300));color:var(--gov-tooltip-content-text-color, var(--gov-color-secondary));letter-spacing:0.0125rem;visibility:hidden;opacity:0;transition:opacity 0.2s ease-in}.gov-tooltip-content::before{content:\"\";position:absolute;display:block;width:0;height:0;border:0.625rem solid transparent}.gov-tooltip-content[is-visible=\"\"],.gov-tooltip-content[is-visible=true i],.gov-tooltip-content[is-visible=\"1\"]{opacity:1}.gov-tooltip[size=s] .gov-tooltip-content{--gov-tooltip-content-padding:var(--gov-tooltip-s-padding, 0.5rem);--gov-tooltip-content-arrow-size:var(--gov-tooltip-s-arrow-size, 0.4375rem);--gov-tooltip-content-letter-spacing:var(--gov-tooltip-s-letter-spacing, 0.0125rem);font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing)}.gov-tooltip[size=l] .gov-tooltip-content{--gov-tooltip-content-padding:var(--gov-tooltip-l-padding, 1rem);--gov-tooltip-content-arrow-size:var(--gov-tooltip-l-arrow-size, 0.875rem);--gov-tooltip-content-letter-spacing:var(--gov-tooltip-l-letter-spacing, 0.002rem);font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing)}.gov-tooltip[position=top] .gov-tooltip-content{bottom:100%;margin-bottom:0.625rem}.gov-tooltip[position=top] .gov-tooltip-content,.gov-tooltip[position=top] .gov-tooltip-content::before{left:50%;transform:translateX(-50%)}.gov-tooltip[position=top] .gov-tooltip-content::before{top:100%;border-bottom-width:0;border-top-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}.gov-tooltip[position=bottom] .gov-tooltip-content{top:100%;margin-top:0.625rem}.gov-tooltip[position=bottom] .gov-tooltip-content,.gov-tooltip[position=bottom] .gov-tooltip-content::before{left:50%;transform:translateX(-50%)}.gov-tooltip[position=bottom] .gov-tooltip-content::before{bottom:100%;border-top-width:0;border-bottom-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}.gov-tooltip[position=left] .gov-tooltip-content{right:100%;margin-right:0.625rem}.gov-tooltip[position=left] .gov-tooltip-content,.gov-tooltip[position=left] .gov-tooltip-content::before{top:50%;transform:translateY(-50%)}.gov-tooltip[position=left] .gov-tooltip-content::before{left:100%;border-right-width:0;border-left-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}.gov-tooltip[position=right] .gov-tooltip-content{left:100%;margin-left:0.625rem}.gov-tooltip[position=right] .gov-tooltip-content,.gov-tooltip[position=right] .gov-tooltip-content::before{top:50%;transform:translateY(-50%)}.gov-tooltip[position=right] .gov-tooltip-content::before{right:100%;border-left-width:0;border-right-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}";
12
+ const govTooltipContentCss = ".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-content{z-index:51;font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);position:absolute;display:block;width:-moz-max-content;width:max-content;max-width:var(--gov-tooltip-content-max-width, 21rem);padding:1rem;border-radius:0.1875rem;background-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300));color:var(--gov-tooltip-content-text-color, var(--gov-color-secondary));letter-spacing:0.0125rem;visibility:hidden;opacity:0;transition:opacity 0.2s ease-in}.gov-tooltip-content::before{content:\"\";position:absolute;display:block;width:0;height:0;border:0.625rem solid transparent}.gov-tooltip-content gov-button{position:absolute;right:0;top:0}.gov-tooltip-content[is-visible=\"\"],.gov-tooltip-content[is-visible=true i],.gov-tooltip-content[is-visible=\"1\"]{opacity:1}.gov-tooltip-content[variant=secondary]{--gov-tooltip-content-bg-color:var(--gov-tooltip-secondary-bg-color, var(--gov-color-secondary));--gov-tooltip-content-text-color:var(--gov-tooltip-secondary-text-color, var(--gov-color-neutral-white))}.gov-tooltip-content[variant=secondary][inverse=\"\"],.gov-tooltip-content[variant=secondary][inverse=true i],.gov-tooltip-content[variant=secondary][inverse=\"1\"]{--gov-tooltip-content-bg-color:var(--gov-color-neutral-white);--gov-tooltip-content-text-color:var(--gov-tooltip-secondary-text-color-inverse, var(--gov-color-secondary))}.gov-tooltip-content[variant=primary]{--gov-tooltip-content-bg-color:var(--gov-tooltip-primary-bg-color, var(--gov-color-primary-300));--gov-tooltip-content-text-color:var(--gov-tooltip-primary-text-color, var(--gov-color-secondary))}.gov-tooltip-content[variant=primary][inverse=\"\"],.gov-tooltip-content[variant=primary][inverse=true i],.gov-tooltip-content[variant=primary][inverse=\"1\"]{--gov-tooltip-content-bg-color:var(--gov-color-neutral-white);--gov-tooltip-content-text-color:var(--gov-tooltip-primary-text-color-inverse, var(--gov-color-primary))}.gov-tooltip-content[size=s]{--gov-tooltip-content-padding:var(--gov-tooltip-s-padding, 0.5rem);--gov-tooltip-content-arrow-size:var(--gov-tooltip-s-arrow-size, 0.4375rem);--gov-tooltip-content-letter-spacing:var(--gov-tooltip-s-letter-spacing, 0.0125rem);font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing)}.gov-tooltip-content[size=l]{--gov-tooltip-content-padding:var(--gov-tooltip-l-padding, 1rem);--gov-tooltip-content-arrow-size:var(--gov-tooltip-l-arrow-size, 0.875rem);--gov-tooltip-content-letter-spacing:var(--gov-tooltip-l-letter-spacing, 0.002rem);font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing)}.gov-tooltip-content[position=top]::before{left:50%;transform:translateX(-50%)}.gov-tooltip-content[position=top]::before{top:100%;border-bottom-width:0;border-top-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}.gov-tooltip-content[position=bottom]::before{left:50%;transform:translateX(-50%)}.gov-tooltip-content[position=bottom]::before{bottom:100%;border-top-width:0;border-bottom-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}.gov-tooltip-content[position=left]::before{top:50%;transform:translateY(-50%)}.gov-tooltip-content[position=left]::before{left:100%;border-right-width:0;border-left-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}.gov-tooltip-content[position=right]::before{top:50%;transform:translateY(-50%)}.gov-tooltip-content[position=right]::before{right:100%;border-left-width:0;border-right-color:var(--gov-tooltip-content-bg-color, var(--gov-color-primary-300))}";
13
13
 
14
14
  const GovTooltipContent = class {
15
15
  constructor(hostRef) {
16
16
  index.registerInstance(this, hostRef);
17
+ this.variant = constants.TooltipVariant.PRIMARY;
18
+ this.size = constants.TooltipSize._M;
19
+ this.persist = false;
17
20
  this.isVisible = false;
21
+ this.parentId = null;
18
22
  }
19
23
  visibleContent(newValue) {
20
24
  clearTimeout(this.timeout);
21
25
  if (newValue === false) {
22
26
  this.timeout = setTimeout(() => {
23
- this.host.style.visibility = 'hidden';
27
+ this.host.style.visibility = "hidden";
24
28
  }, 250);
25
29
  }
26
30
  else {
27
- this.host.style.visibility = 'visible';
31
+ this.host.style.visibility = "visible";
32
+ }
33
+ }
34
+ hideContent() {
35
+ this.isVisible = false;
36
+ this.persist = false;
37
+ const parentEl = document.getElementById(this.parentId);
38
+ if (parentEl) {
39
+ parentEl.hide().catch();
28
40
  }
29
41
  }
30
42
  render() {
31
- return (index.h(index.Host, { class: constants.TooltipContentClass.root, role: 'tooltip', hidden: !this.isVisible, "aria-hidden": !template.toBoolAttr(this.isVisible), "is-visible": this.isVisible }, index.h("slot", null)));
43
+ return (index.h(index.Host, { class: constants.TooltipContentClass.root, role: "tooltip", hidden: !this.isVisible, "aria-hidden": !template.toBoolAttr(this.isVisible), "is-visible": this.isVisible }, index.h("slot", null), this.persist ? (index.h("gov-button", { "on-gov-click": this.hideContent.bind(this), variant: this.variant, size: this.size, type: "base", inverse: this.variant === constants.TooltipVariant.SECONDARY }, index.h("gov-icon", { slot: "left-icon", name: "x-lg", type: "basic" }))) : null));
32
44
  }
33
45
  get host() { return index.getElement(this); }
34
46
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"gov-tooltip-content.entry.cjs.js","mappings":";;;;;;;;;;;AAAA,MAAM,oBAAoB,GAAG,olHAAolH;;MCQpmH,iBAAiB;;;qBAOoC,KAAK;;EAGtE,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,MAAM;IACL,QACCA,QAACC,UAAI,IAAC,KAAK,EAAEC,6BAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,SAAS,iBAAe,CAACC,mBAAU,CAAC,IAAI,CAAC,SAAS,CAAC,gBAAc,IAAI,CAAC,SAAS,IACpJH,qBAAa,CACP,EACP;GACD;;;;;;;;;;","names":["h","Host","TooltipContentClass","toBoolAttr"],"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// STATES\n\t@include parameter(\"is-visible\") {\n\t\topacity: 1;\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $tooltip-content-sizes {\n\t\t.gov-tooltip[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.gov-tooltip[position=\"#{$position}\"] & {\n\t\t\t#{$oppositeProperty}: 100%;\n\t\t\tmargin-#{$oppositeProperty}: rem-calc(10);\n\t\t\t&,\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 } 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 * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: 'is-visible' }) readonly isVisible: boolean = false\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\trender() {\n\t\treturn (\n\t\t\t<Host class={TooltipContentClass.root} role={'tooltip'} hidden={!this.isVisible} aria-hidden={!toBoolAttr(this.isVisible)} is-visible={this.isVisible}>\n\t\t\t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AI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,IAAI,CAAC,OAAO,KAAKF,wBAAc,CAAC,SAAS,IAClDE,sBAAU,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAa,CACzD,IACV,IAAI,CACF,EACP;GACD;;;;;;;;;;","names":["TooltipVariant","TooltipSize","h","Host","TooltipContentClass","toBoolAttr"],"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}
@@ -12,19 +12,23 @@ require('./variants-f5ffeef3.js');
12
12
  require('./sizes-79872c2a.js');
13
13
  require('./utils-c9b1bba3.js');
14
14
 
15
- 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}.gov-tooltip[variant=secondary]{--gov-tooltip-content-bg-color:var(--gov-tooltip-secondary-bg-color, var(--gov-color-secondary));--gov-tooltip-content-text-color:var(--gov-tooltip-secondary-text-color, var(--gov-color-neutral-white))}.gov-tooltip[variant=secondary][inverse=\"\"],.gov-tooltip[variant=secondary][inverse=true i],.gov-tooltip[variant=secondary][inverse=\"1\"]{--gov-tooltip-content-bg-color:var(--gov-color-neutral-white);--gov-tooltip-content-text-color:var(--gov-tooltip-secondary-text-color-inverse, var(--gov-color-secondary))}.gov-tooltip[variant=primary]{--gov-tooltip-content-bg-color:var(--gov-tooltip-primary-bg-color, var(--gov-color-primary-300));--gov-tooltip-content-text-color:var(--gov-tooltip-primary-text-color, var(--gov-color-secondary))}.gov-tooltip[variant=primary][inverse=\"\"],.gov-tooltip[variant=primary][inverse=true i],.gov-tooltip[variant=primary][inverse=\"1\"]{--gov-tooltip-content-bg-color:var(--gov-color-neutral-white);--gov-tooltip-content-text-color:var(--gov-tooltip-primary-text-color-inverse, var(--gov-color-primary))}";
15
+ 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}";
16
16
 
17
17
  const GovTooltip = class {
18
18
  constructor(hostRef) {
19
19
  index.registerInstance(this, hostRef);
20
- this.variant = 'primary';
21
- this.size = 'm';
22
- this.position = 'right';
20
+ this.tooltipContentId = undefined;
21
+ this.tooltipId = undefined;
22
+ this.variant = constants.TooltipVariant.PRIMARY;
23
+ this.size = constants.TooltipSize._M;
24
+ this.position = "right";
23
25
  this.message = undefined;
24
26
  this.identifier = undefined;
25
27
  this.icon = undefined;
28
+ this.persist = false;
26
29
  this.h = template.govHost(this.host);
27
- this.tooltipId = string_utils.createID('GovTooltip');
30
+ this.tooltipId = string_utils.createID("GovTooltip");
31
+ this.tooltipContentId = string_utils.createID("GovContentTooltip");
28
32
  }
29
33
  validateVariant(newValue) {
30
34
  props.validateProp(constants.TooltipVariant, newValue, constants.TooltipClass.root);
@@ -42,6 +46,9 @@ const GovTooltip = class {
42
46
  this.createContentWrapper();
43
47
  this.registerListeners();
44
48
  }
49
+ disconnectedCallback() {
50
+ this.removeContent();
51
+ }
45
52
  createContentWrapper() {
46
53
  var _a;
47
54
  const hasContentInside = this.host.querySelector(constants.TooltipContentClass.root);
@@ -53,84 +60,103 @@ const GovTooltip = class {
53
60
  this.content.innerHTML = this.message;
54
61
  this.host.appendChild(this.content);
55
62
  }
56
- this.content.setAttribute('id', (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipId);
63
+ this.content.setAttribute("id", (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipContentId);
64
+ this.content.setAttribute("parent-id", this.tooltipId);
65
+ this.content.setAttribute("variant", this.variant);
66
+ this.content.setAttribute("size", this.size);
67
+ document.body.appendChild(this.content);
57
68
  }
58
69
  registerListeners() {
59
- this.host.addEventListener('focus', e => {
70
+ this.host.addEventListener("click", e => {
60
71
  e.preventDefault();
72
+ this.persist = true;
61
73
  this.showTooltip();
62
74
  });
63
- this.host.addEventListener('blur', e => {
75
+ this.host.addEventListener("focus", e => {
64
76
  e.preventDefault();
65
- this.hideTooltip();
77
+ this.showTooltip();
78
+ });
79
+ this.host.addEventListener("blur", e => {
80
+ e.preventDefault();
81
+ if (this.persist === false) {
82
+ this.hideTooltip();
83
+ }
66
84
  });
67
- this.host.addEventListener('mouseenter', e => {
85
+ this.host.addEventListener("mouseenter", e => {
68
86
  e.preventDefault();
69
87
  this.showTooltip();
70
88
  });
71
- this.host.addEventListener('mouseleave', e => {
89
+ this.host.addEventListener("mouseleave", e => {
72
90
  e.preventDefault();
73
- this.hideTooltip();
91
+ if (this.persist === false) {
92
+ this.hideTooltip();
93
+ }
74
94
  });
75
95
  }
76
96
  verifyPositionSpace() {
77
- // @TODO Improve positioning of broken lines
78
97
  const offset = 12;
79
- const windowWidth = window.innerWidth;
80
98
  const trigger = this.host.getBoundingClientRect();
81
99
  const trgWidth = this.host.offsetWidth;
100
+ const trgHeight = this.host.offsetHeight;
101
+ const contentWidth = this.content.offsetWidth;
102
+ const contentHeight = this.content.offsetHeight;
82
103
  const triggerPos = {
83
104
  left: trigger.left + document.documentElement.scrollLeft,
84
105
  top: trigger.top + document.documentElement.scrollTop,
85
106
  };
86
- const tltWidth = this.content.offsetWidth;
87
- if (this.position === constants.TooltipPosition.LEFT) {
88
- if (offset + triggerPos.left < tltWidth) {
89
- this.position = constants.TooltipPosition.TOP;
90
- this.content.style.left = '0px';
91
- this.content.style.width = window.innerWidth - triggerPos.left - offset + 'px';
92
- this.content.style.transform = 'none';
93
- }
107
+ // @TODO check space for displaying tooltip
108
+ if (this.position === constants.TooltipPosition.LEFT || this.position === constants.TooltipPosition.RIGHT) {
109
+ this.content.style.top = (triggerPos.top - ((contentHeight - trgHeight) / 2)) + "px";
94
110
  }
95
- else if (this.position === constants.TooltipPosition.RIGHT) {
96
- if (windowWidth - (triggerPos.left + trgWidth) < tltWidth) {
97
- this.position = constants.TooltipPosition.TOP;
98
- this.content.style.right = '0px';
99
- this.content.style.left = 'auto';
100
- this.content.style.width = trgWidth + triggerPos.left + offset + 'px';
101
- this.content.style.transform = 'none';
102
- }
111
+ if (this.position === constants.TooltipPosition.RIGHT) {
112
+ this.content.setAttribute("position", constants.TooltipPosition.RIGHT);
113
+ this.content.style.left = (triggerPos.left + offset + trigger.width) + "px";
103
114
  }
104
- else {
105
- // doesn't fit from the left
106
- if (tltWidth / 2 > triggerPos.left) {
107
- this.content.style.left = '0px';
108
- this.content.style.width = window.innerWidth - triggerPos.left - offset + 'px';
109
- this.content.style.transform = 'none';
115
+ if (this.position === constants.TooltipPosition.LEFT) {
116
+ this.content.setAttribute("position", constants.TooltipPosition.LEFT);
117
+ this.content.style.left = (triggerPos.left - (contentWidth + offset)) + "px";
118
+ }
119
+ if (this.position === constants.TooltipPosition.TOP || this.position === constants.TooltipPosition.BOTTOM) {
120
+ if (contentWidth > trgWidth) {
121
+ this.content.style.left = (triggerPos.left - ((contentWidth - trgWidth) / 2)) + "px";
110
122
  }
111
- // doesn't fit from the right
112
- else if (tltWidth / 2 > windowWidth - (triggerPos.left + tltWidth)) {
113
- this.content.style.right = '0px';
114
- this.content.style.left = 'auto';
115
- this.content.style.width = trgWidth + triggerPos.left + offset + 'px';
116
- this.content.style.transform = 'none';
123
+ else {
124
+ this.content.style.left = (triggerPos.left + ((trgWidth - contentWidth) / 2)) + "px";
117
125
  }
118
126
  }
127
+ if (this.position === constants.TooltipPosition.TOP) {
128
+ this.content.setAttribute("position", constants.TooltipPosition.TOP);
129
+ this.content.style.top = (triggerPos.top - (contentHeight + offset)) + "px";
130
+ }
131
+ if (this.position === constants.TooltipPosition.BOTTOM) {
132
+ this.content.setAttribute("position", constants.TooltipPosition.BOTTOM);
133
+ this.content.style.top = (triggerPos.top + (trgHeight + offset)) + "px";
134
+ }
119
135
  }
120
136
  showTooltip() {
121
137
  if (this.content) {
122
138
  this.verifyPositionSpace();
123
- this.content.setAttribute('is-visible', 'true');
139
+ this.content.setAttribute("is-visible", "true");
140
+ if (this.persist) {
141
+ this.content.setAttribute("persist", "true");
142
+ }
124
143
  }
125
144
  }
126
145
  hideTooltip() {
127
146
  if (this.content) {
128
- this.content.setAttribute('is-visible', 'false');
147
+ this.content.setAttribute("is-visible", "false");
148
+ this.content.setAttribute("persist", "false");
149
+ }
150
+ }
151
+ removeContent() {
152
+ const contentEl = document.getElementById(this.tooltipContentId);
153
+ if (contentEl) {
154
+ contentEl.remove();
129
155
  }
130
156
  }
131
157
  render() {
132
158
  var _a;
133
- return (index.h(index.Host, { class: this.h.classes(constants.TooltipClass.root), position: this.position, size: this.size, tabindex: 0, "aria-describedby": (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipId, variant: this.variant }, index.h("slot", null)));
159
+ return (index.h(index.Host, { id: this.tooltipId, class: this.h.classes(constants.TooltipClass.root), position: this.position, tabindex: 0, "aria-describedby": (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipContentId }, index.h("slot", null)));
134
160
  }
135
161
  /**
136
162
  * Showing the modal
@@ -139,9 +165,10 @@ const GovTooltip = class {
139
165
  this.showTooltip();
140
166
  }
141
167
  /**
142
- * Hidding the modal
168
+ * Hiding the modal
143
169
  */
144
170
  async hide() {
171
+ this.persist = false;
145
172
  this.hideTooltip();
146
173
  }
147
174
  get host() { return index.getElement(this); }
@@ -1 +1 @@
1
- {"file":"gov-tooltip.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,aAAa,GAAG,wnDAAwnD;;MCoBjoD,UAAU;EAKtB;;mBASgD,SAAS;gBAIf,GAAG;oBAIL,OAAO;mBAIZ,SAAS;;gBAQU,SAAS;IA5B9D,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,SAAS,GAAGC,qBAAQ,CAAC,YAAY,CAAC,CAAA;GACvC;EA6BD,eAAe,CAAC,QAAgB;IAC/BC,kBAAY,CAACC,wBAAc,EAAE,QAAQ,EAAEC,sBAAY,CAAC,IAAI,CAAC,CAAA;GACzD;EAGD,YAA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A;QAChC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,GAAG,UAAU,CAAC,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;QACrE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,MAAM,CAAA;OACrC;KACD;GACD;EAEO,WAAW;IAClB,IAAI,IAAI,CAAC,OAAO,EAAE;MACjB,IAAI,CAAC,mBAAmB,EAAE,CAAA;MAC1B,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;KAC/C;GACD;EAEO,WAAW;IAClB,IAAI,IAAI,CAAC,OAAO,EAAE;MACjB,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;KAChD;GACD;EAED,MAAM;;IACL,QACCE,QAACC,UAAI,IACJ,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAACL,sBAAY,CAAC,IAAI,CAAC,EACxC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,CAAC,sBACO,MAAA,IAAI,CAAC,UAAU,mCAAI,IAAI,CAAC,SAAS,EACnD,OAAO,EAAE,IAAI,CAAC,OAAO,IAErBI,qBAAQ,CACF,EACP;GACD;;;;EAMD,MAAM,IAAI;IACT,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMD,MAAM,IAAI;IACT,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;;;;;;;;;","names":["govHost","createID","validateProp","TooltipVariant","TooltipClass","TooltipSize","TooltipPosition","TooltipContentClass","h","Host"],"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// VARIANTS\n\t@include parameter(\"icon\") {\n\t\tdisplay: inline-flex;\n\t\tborder-bottom: 0;\n\t}\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}\n","import { Component, Element, h, Host, Method, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport {\n\tTooltipPosition,\n\tTooltipPositionType,\n\tTooltipSize,\n\tTooltipSizeType,\n\tTooltipClass,\n\tTooltipContentClass,\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 tooltipId\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.tooltipId = createID('GovTooltip')\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 = 'primary'\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = 'm'\n\t/**\n\t * Tooltip display position\n\t */\n\t@Prop() position: TooltipPositionType = 'right'\n\t/**\n\t * Information contained in the tolltip\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@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\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.tooltipId)\n\t}\n\n\tprivate registerListeners() {\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\tthis.hideTooltip()\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\tthis.hideTooltip()\n\t\t})\n\t}\n\n\tprivate verifyPositionSpace() {\n\t\t// @TODO Improve positioning of broken lines\n\t\tconst offset = 12\n\t\tconst windowWidth = window.innerWidth\n\t\tconst trigger = this.host.getBoundingClientRect()\n\t\tconst trgWidth = this.host.offsetWidth\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\tconst tltWidth = this.content.offsetWidth\n\t\tif (this.position === TooltipPosition.LEFT) {\n\t\t\tif (offset + triggerPos.left < tltWidth) {\n\t\t\t\tthis.position = TooltipPosition.TOP\n\t\t\t\tthis.content.style.left = '0px'\n\t\t\t\tthis.content.style.width = window.innerWidth - triggerPos.left - offset + 'px'\n\t\t\t\tthis.content.style.transform = 'none'\n\t\t\t}\n\t\t} else if (this.position === TooltipPosition.RIGHT) {\n\t\t\tif (windowWidth - (triggerPos.left + trgWidth) < tltWidth) {\n\t\t\t\tthis.position = TooltipPosition.TOP\n\t\t\t\tthis.content.style.right = '0px'\n\t\t\t\tthis.content.style.left = 'auto'\n\t\t\t\tthis.content.style.width = trgWidth + triggerPos.left + offset + 'px'\n\t\t\t\tthis.content.style.transform = 'none'\n\t\t\t}\n\t\t} else {\n\t\t\t// doesn't fit from the left\n\t\t\tif (tltWidth / 2 > triggerPos.left) {\n\t\t\t\tthis.content.style.left = '0px'\n\t\t\t\tthis.content.style.width = window.innerWidth - triggerPos.left - offset + 'px'\n\t\t\t\tthis.content.style.transform = 'none'\n\t\t\t}\n\t\t\t// doesn't fit from the right\n\t\t\telse if (tltWidth / 2 > windowWidth - (triggerPos.left + tltWidth)) {\n\t\t\t\tthis.content.style.right = '0px'\n\t\t\t\tthis.content.style.left = 'auto'\n\t\t\t\tthis.content.style.width = trgWidth + triggerPos.left + offset + 'px'\n\t\t\t\tthis.content.style.transform = 'none'\n\t\t\t}\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}\n\t}\n\n\tprivate hideTooltip() {\n\t\tif (this.content) {\n\t\t\tthis.content.setAttribute('is-visible', 'false')\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TooltipClass.root)}\n\t\t\t\tposition={this.position}\n\t\t\t\tsize={this.size}\n\t\t\t\ttabindex={0}\n\t\t\t\taria-describedby={this.identifier ?? this.tooltipId}\n\t\t\t\tvariant={this.variant}\n\t\t\t>\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 * Hidding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.hideTooltip()\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-tooltip.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,aAAa,GAAG,skBAAskB;;MCoB/kB,UAAU;EAMtB;;IAHiB,qBAAgB,GAAG,SAAS,CAAA;IAC5B,cAAS,GAAG,SAAS,CAAA;mBAYUA,wBAAc,CAAC,OAAO;gBAI5BC,qBAAW,CAAC,EAAE;oBAIhB,OAAO;mBAIZ,SAAS;;gBAQU,SAAS;mBAE5C,KAAK;IA/BvB,IAAI,CAAC,CAAC,GAAGC,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,SAAS,GAAGC,qBAAQ,CAAC,YAAY,CAAC,CAAA;IACvC,IAAI,CAAC,gBAAgB,GAAGA,qBAAQ,CAAC,mBAAmB,CAAC,CAAA;GACrD;EA+BD,eAAe,CAAC,QAAgB;IAC/BC,kBAAY,CAACJ,wBAAc,EAAE,QAAQ,EAAEK,sBAAY,CAAC,IAAI,CAAC,CAAA;GACzD;EAGD,YAAY,CAAC,QAAgB;IAC5BD,kBAAY,CAACH,qBAAW,EAAE,QAAQ,EAAEI,s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jB,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,SAAS,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,QACCE,QAACC,UAAI,IACJ,EAAE,EAAE,IAAI,CAAC,SAAS,EAClB,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAACJ,sBAAY,CAAC,IAAI,CAAC,EACxC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,CAAC,sBACO,MAAA,IAAI,CAAC,UAAU,mCAAI,IAAI,CAAC,gBAAgB,IAC1DG,qBAAQ,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":["TooltipVariant","TooltipSize","govHost","createID","validateProp","TooltipClass","TooltipPosition","TooltipContentClass","h","Host"],"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}
@@ -2260,10 +2260,6 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2260
2260
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2261
2261
  /* webpackMode: "lazy" */
2262
2262
  './gov-accordion-item.cjs.entry.js')); }).then(processMod, consoleError);
2263
- case 'gov-alert.cjs':
2264
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2265
- /* webpackMode: "lazy" */
2266
- './gov-alert.cjs.entry.js')); }).then(processMod, consoleError);
2267
2263
  case 'gov-breadcrumbs.cjs':
2268
2264
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2269
2265
  /* webpackMode: "lazy" */
@@ -2344,6 +2340,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2344
2340
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2345
2341
  /* webpackMode: "lazy" */
2346
2342
  './gov-grid-item.cjs.entry.js')); }).then(processMod, consoleError);
2343
+ case 'gov-infobar.cjs':
2344
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2345
+ /* webpackMode: "lazy" */
2346
+ './gov-infobar.cjs.entry.js')); }).then(processMod, consoleError);
2347
2347
  case 'gov-layout.cjs':
2348
2348
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2349
2349
  /* webpackMode: "lazy" */