@gov-design-system-ce/components 4.1.3-BETA-9 → 4.2.0

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 (686) hide show
  1. package/dist/cjs/{constants-02aec493.js → constants-7f713d6c.js} +2 -2
  2. package/dist/cjs/{constants-02aec493.js.map → constants-7f713d6c.js.map} +1 -1
  3. package/dist/cjs/{constants-4dfa23e3.js → constants-c7447ffd.js} +3 -1
  4. package/dist/cjs/constants-c7447ffd.js.map +1 -0
  5. package/dist/cjs/{constants-52053f2d.js → constants-c84c60d6.js} +3 -1
  6. package/dist/cjs/constants-c84c60d6.js.map +1 -0
  7. package/dist/cjs/core.cjs.js +2 -2
  8. package/dist/cjs/gov-accordion-item.cjs.entry.js +1 -1
  9. package/dist/cjs/gov-accordion.cjs.entry.js +1 -1
  10. package/dist/cjs/gov-attachments_3.cjs.entry.js +3 -3
  11. package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
  12. package/dist/cjs/gov-backdrop.cjs.entry.js +1 -1
  13. package/dist/cjs/gov-banner.cjs.entry.js +79 -0
  14. package/dist/cjs/gov-banner.cjs.entry.js.map +1 -0
  15. package/dist/cjs/gov-blockquote.cjs.entry.js +33 -0
  16. package/dist/cjs/gov-blockquote.cjs.entry.js.map +1 -0
  17. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +2 -2
  18. package/dist/cjs/gov-button.cjs.entry.js +6 -5
  19. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  20. package/dist/cjs/gov-card.cjs.entry.js +2 -2
  21. package/dist/cjs/gov-chip.cjs.entry.js +5 -4
  22. package/dist/cjs/gov-chip.cjs.entry.js.map +1 -1
  23. package/dist/cjs/gov-container.cjs.entry.js +2 -2
  24. package/dist/cjs/gov-control-group.cjs.entry.js +2 -2
  25. package/dist/cjs/gov-cookiebar.cjs.entry.js +2 -2
  26. package/dist/cjs/gov-dialog.cjs.entry.js +2 -2
  27. package/dist/cjs/gov-dialog.cjs.entry.js.map +1 -1
  28. package/dist/cjs/gov-dropdown.cjs.entry.js +2 -2
  29. package/dist/cjs/gov-empty.cjs.entry.js +2 -2
  30. package/dist/cjs/gov-error-code.cjs.entry.js +2 -2
  31. package/dist/cjs/gov-flex_3.cjs.entry.js +7 -26
  32. package/dist/cjs/gov-flex_3.cjs.entry.js.map +1 -1
  33. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +4 -3
  34. package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
  35. package/dist/cjs/gov-form-checkbox-group.cjs.entry.js +4 -4
  36. package/dist/cjs/gov-form-checkbox-group.cjs.entry.js.map +1 -1
  37. package/dist/cjs/gov-form-checkbox.cjs.entry.js +3 -2
  38. package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
  39. package/dist/cjs/gov-form-control.cjs.entry.js +2 -2
  40. package/dist/cjs/gov-form-file.cjs.entry.js +4 -3
  41. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  42. package/dist/cjs/gov-form-group.cjs.entry.js +3 -3
  43. package/dist/cjs/gov-form-input_2.cjs.entry.js +11 -9
  44. package/dist/cjs/gov-form-input_2.cjs.entry.js.map +1 -1
  45. package/dist/cjs/gov-form-label.cjs.entry.js +2 -2
  46. package/dist/cjs/gov-form-multi-select.cjs.entry.js +5 -4
  47. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  48. package/dist/cjs/gov-form-password-power.cjs.entry.js +2 -2
  49. package/dist/cjs/gov-form-radio-group.cjs.entry.js +4 -4
  50. package/dist/cjs/gov-form-radio-group.cjs.entry.js.map +1 -1
  51. package/dist/cjs/gov-form-radio.cjs.entry.js +3 -2
  52. package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
  53. package/dist/cjs/gov-form-search.cjs.entry.js +2 -2
  54. package/dist/cjs/gov-form-select.cjs.entry.js +5 -4
  55. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  56. package/dist/cjs/gov-form-switch.cjs.entry.js +3 -2
  57. package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
  58. package/dist/cjs/gov-grid-item.cjs.entry.js +14 -8
  59. package/dist/cjs/gov-grid-item.cjs.entry.js.map +1 -1
  60. package/dist/cjs/gov-grid.cjs.entry.js +8 -6
  61. package/dist/cjs/gov-grid.cjs.entry.js.map +1 -1
  62. package/dist/cjs/gov-infobar.cjs.entry.js +5 -4
  63. package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -1
  64. package/dist/cjs/gov-layout-column.cjs.entry.js +2 -2
  65. package/dist/cjs/gov-layout.cjs.entry.js +2 -2
  66. package/dist/cjs/gov-lifecycle.cjs.entry.js +2 -2
  67. package/dist/cjs/gov-link.cjs.entry.js +3 -2
  68. package/dist/cjs/gov-link.cjs.entry.js.map +1 -1
  69. package/dist/cjs/gov-loading.cjs.entry.js +2 -2
  70. package/dist/cjs/gov-message.cjs.entry.js +2 -2
  71. package/dist/cjs/gov-message.cjs.entry.js.map +1 -1
  72. package/dist/cjs/gov-pagination.cjs.entry.js +3 -2
  73. package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
  74. package/dist/cjs/gov-spacer.cjs.entry.js +2 -2
  75. package/dist/cjs/gov-stepper-item.cjs.entry.js +3 -3
  76. package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
  77. package/dist/cjs/gov-stepper.cjs.entry.js +3 -3
  78. package/dist/cjs/gov-tabs-item.cjs.entry.js +2 -2
  79. package/dist/cjs/gov-tabs.cjs.entry.js +4 -3
  80. package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
  81. package/dist/cjs/gov-tag.cjs.entry.js +2 -2
  82. package/dist/cjs/gov-tile.cjs.entry.js +2 -2
  83. package/dist/cjs/gov-toast.cjs.entry.js +4 -3
  84. package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
  85. package/dist/cjs/gov-tooltip-content.cjs.entry.js +2 -2
  86. package/dist/cjs/gov-tooltip.cjs.entry.js +3 -3
  87. package/dist/cjs/gov-wizard-item.cjs.entry.js +3 -3
  88. package/dist/cjs/gov-wizard.cjs.entry.js +2 -2
  89. package/dist/cjs/{index-67e87c27.js → index-0e4f24f9.js} +9 -19
  90. package/dist/cjs/index-0e4f24f9.js.map +1 -0
  91. package/dist/cjs/loader.cjs.js +2 -2
  92. package/dist/collection/collection-manifest.json +2 -1
  93. package/dist/collection/components/gov-attachments/gov-attachments-item.css +3 -4
  94. package/dist/collection/components/gov-banner/constants.js +26 -0
  95. package/dist/collection/components/gov-banner/constants.js.map +1 -0
  96. package/dist/collection/components/gov-banner/gov-banner.js +202 -0
  97. package/dist/collection/components/gov-banner/gov-banner.js.map +1 -0
  98. package/dist/collection/components/gov-blocquote/constants.js +10 -0
  99. package/dist/collection/components/gov-blocquote/constants.js.map +1 -0
  100. package/dist/collection/components/gov-blocquote/gov-blockquote.js +61 -0
  101. package/dist/collection/components/gov-blocquote/gov-blockquote.js.map +1 -0
  102. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +1 -1
  103. package/dist/collection/components/gov-button/button/gov-button.js +5 -4
  104. package/dist/collection/components/gov-button/button/gov-button.js.map +1 -1
  105. package/dist/collection/components/gov-button/dropdown/gov-dropdown.js +1 -1
  106. package/dist/collection/components/gov-card/gov-card.js +1 -1
  107. package/dist/collection/components/gov-chip/gov-chip.js +4 -3
  108. package/dist/collection/components/gov-chip/gov-chip.js.map +1 -1
  109. package/dist/collection/components/gov-container/gov-container.js +1 -1
  110. package/dist/collection/components/gov-control-group/gov-control-group.js +1 -1
  111. package/dist/collection/components/gov-cookiebar/gov-cookiebar.js +1 -1
  112. package/dist/collection/components/gov-dialog/gov-dialog.js +1 -1
  113. package/dist/collection/components/gov-dialog/gov-dialog.js.map +1 -1
  114. package/dist/collection/components/gov-empty/gov-empty.js +1 -1
  115. package/dist/collection/components/gov-error-code/gov-error-code.js +1 -1
  116. package/dist/collection/components/gov-flex/gov-flex.js +22 -3
  117. package/dist/collection/components/gov-flex/gov-flex.js.map +1 -1
  118. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +3 -2
  119. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
  120. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +2 -1
  121. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
  122. package/dist/collection/components/gov-form/control/gov-form-control.js +1 -1
  123. package/dist/collection/components/gov-form/file/gov-form-file.js +3 -2
  124. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  125. package/dist/collection/components/gov-form/group/constants.js +1 -1
  126. package/dist/collection/components/gov-form/group/constants.js.map +1 -1
  127. package/dist/collection/components/gov-form/group/gov-form-checkbox-group.js +2 -2
  128. package/dist/collection/components/gov-form/group/gov-form-group.css +4 -4
  129. package/dist/collection/components/gov-form/group/gov-form-group.js +2 -2
  130. package/dist/collection/components/gov-form/group/gov-form-radio-group.js +2 -2
  131. package/dist/collection/components/gov-form/input/gov-form-input.js +7 -6
  132. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  133. package/dist/collection/components/gov-form/label/gov-form-label.js +1 -1
  134. package/dist/collection/components/gov-form/message/gov-form-message.js +1 -1
  135. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +4 -3
  136. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
  137. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +1 -1
  138. package/dist/collection/components/gov-form/radio/gov-form-radio.js +2 -1
  139. package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
  140. package/dist/collection/components/gov-form/search/gov-form-search.js +1 -1
  141. package/dist/collection/components/gov-form/select/gov-form-select.js +4 -3
  142. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  143. package/dist/collection/components/gov-form/switch/gov-form-switch.js +2 -1
  144. package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
  145. package/dist/collection/components/gov-grid/constants.js +2 -0
  146. package/dist/collection/components/gov-grid/constants.js.map +1 -1
  147. package/dist/collection/components/gov-grid/gov-grid-item.js +111 -20
  148. package/dist/collection/components/gov-grid/gov-grid-item.js.map +1 -1
  149. package/dist/collection/components/gov-grid/gov-grid.js +56 -14
  150. package/dist/collection/components/gov-grid/gov-grid.js.map +1 -1
  151. package/dist/collection/components/gov-icon/gov-icon.js +0 -17
  152. package/dist/collection/components/gov-icon/gov-icon.js.map +1 -1
  153. package/dist/collection/components/gov-infobar/gov-infobar.js +4 -3
  154. package/dist/collection/components/gov-infobar/gov-infobar.js.map +1 -1
  155. package/dist/collection/components/gov-layout/gov-layout-column.js +1 -1
  156. package/dist/collection/components/gov-layout/gov-layout.js +1 -1
  157. package/dist/collection/components/gov-lifecycle-tester/gov-lifecycle-tester.js +1 -1
  158. package/dist/collection/components/gov-link/constants.js +1 -0
  159. package/dist/collection/components/gov-link/constants.js.map +1 -1
  160. package/dist/collection/components/gov-link/gov-link.js +1 -1
  161. package/dist/collection/components/gov-link/gov-link.js.map +1 -1
  162. package/dist/collection/components/gov-loading/loading/gov-loading.js +1 -1
  163. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +3 -2
  164. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js.map +1 -1
  165. package/dist/collection/components/gov-message/gov-message.js +1 -1
  166. package/dist/collection/components/gov-message/gov-message.js.map +1 -1
  167. package/dist/collection/components/gov-pagination/gov-pagination.js +2 -1
  168. package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
  169. package/dist/collection/components/gov-spacer/gov-spacer.js +1 -1
  170. package/dist/collection/components/gov-stepper/constants.js +2 -0
  171. package/dist/collection/components/gov-stepper/constants.js.map +1 -1
  172. package/dist/collection/components/gov-stepper/gov-stepper-item.js +1 -1
  173. package/dist/collection/components/gov-stepper/gov-stepper-item.js.map +1 -1
  174. package/dist/collection/components/gov-stepper/gov-stepper.js +1 -1
  175. package/dist/collection/components/gov-tabs/gov-tabs-item.js +1 -1
  176. package/dist/collection/components/gov-tabs/gov-tabs.js +3 -2
  177. package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
  178. package/dist/collection/components/gov-tag/gov-tag.js +1 -1
  179. package/dist/collection/components/gov-theme-switch/constants.js +1 -0
  180. package/dist/collection/components/gov-theme-switch/constants.js.map +1 -1
  181. package/dist/collection/components/gov-theme-switch/gov-theme-switch.js +1 -1
  182. package/dist/collection/components/gov-theme-switch/gov-theme-switch.js.map +1 -1
  183. package/dist/collection/components/gov-tile/gov-tile.js +1 -1
  184. package/dist/collection/components/gov-toast/gov-toast.js +3 -2
  185. package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
  186. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +1 -1
  187. package/dist/collection/components/gov-tooltip/gov-tooltip.js +2 -2
  188. package/dist/collection/components/gov-wizard/gov-wizard-item.js +2 -2
  189. package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
  190. package/dist/collection/pages/Banner.js +268 -0
  191. package/dist/collection/pages/Banner.js.map +1 -0
  192. package/dist/collection/pages/Blockquote.js +25 -0
  193. package/dist/collection/pages/Blockquote.js.map +1 -0
  194. package/dist/collection/pages/Breadcrumbs.js +2 -2
  195. package/dist/collection/pages/Breadcrumbs.js.map +1 -1
  196. package/dist/collection/pages/Card.js +2 -2
  197. package/dist/collection/pages/Card.js.map +1 -1
  198. package/dist/collection/pages/Flex.js +1 -1
  199. package/dist/collection/pages/Flex.js.map +1 -1
  200. package/dist/collection/pages/Grid.js +61 -40
  201. package/dist/collection/pages/Grid.js.map +1 -1
  202. package/dist/collection/pages/Home.js +57 -0
  203. package/dist/collection/pages/Home.js.map +1 -1
  204. package/dist/collection/pages/Infobar.js +36 -56
  205. package/dist/collection/pages/Infobar.js.map +1 -1
  206. package/dist/collection/pages/Layout.js +10 -10
  207. package/dist/collection/pages/Layout.js.map +1 -1
  208. package/dist/collection/pages/Tag.js +14 -0
  209. package/dist/collection/pages/Tag.js.map +1 -1
  210. package/dist/collection/pages/Tiles.js +8 -235
  211. package/dist/collection/pages/Tiles.js.map +1 -1
  212. package/dist/collection/pages/Typography.js +110 -51
  213. package/dist/collection/pages/Typography.js.map +1 -1
  214. package/dist/collection/utils/icon.utils.js +1 -8
  215. package/dist/collection/utils/icon.utils.js.map +1 -1
  216. package/dist/components/gov-accordion-item.js +1 -1
  217. package/dist/components/gov-accordion.js +1 -1
  218. package/dist/components/gov-attachments-item.js +1 -1
  219. package/dist/components/gov-attachments.js +1 -1
  220. package/dist/components/gov-backdrop.js +1 -1
  221. package/dist/components/{gov-tiles.d.ts → gov-banner.d.ts} +4 -4
  222. package/dist/components/gov-banner.js +2 -0
  223. package/dist/components/gov-banner.js.map +1 -0
  224. package/dist/components/gov-blockquote.d.ts +11 -0
  225. package/dist/components/gov-blockquote.js +2 -0
  226. package/dist/components/gov-blockquote.js.map +1 -0
  227. package/dist/components/gov-breadcrumbs.js +1 -1
  228. package/dist/components/gov-breadcrumbs.js.map +1 -1
  229. package/dist/components/gov-button.js +1 -1
  230. package/dist/components/gov-card.js +1 -1
  231. package/dist/components/gov-chip.js +1 -1
  232. package/dist/components/gov-container.js +1 -1
  233. package/dist/components/gov-control-group.js +1 -1
  234. package/dist/components/gov-cookiebar.js +1 -1
  235. package/dist/components/gov-dialog.js +1 -1
  236. package/dist/components/gov-dialog.js.map +1 -1
  237. package/dist/components/gov-dropdown.js +1 -1
  238. package/dist/components/gov-dropdown.js.map +1 -1
  239. package/dist/components/gov-empty.js +1 -1
  240. package/dist/components/gov-error-code.js +1 -1
  241. package/dist/components/gov-flex.js +1 -1
  242. package/dist/components/gov-flex.js.map +1 -1
  243. package/dist/components/gov-form-autocomplete.js +1 -1
  244. package/dist/components/gov-form-checkbox-group.js +1 -1
  245. package/dist/components/gov-form-checkbox-group.js.map +1 -1
  246. package/dist/components/gov-form-checkbox.js +1 -1
  247. package/dist/components/gov-form-checkbox.js.map +1 -1
  248. package/dist/components/gov-form-control.js +1 -1
  249. package/dist/components/gov-form-file.js +1 -1
  250. package/dist/components/gov-form-file.js.map +1 -1
  251. package/dist/components/gov-form-group.js +1 -1
  252. package/dist/components/gov-form-input.js +1 -1
  253. package/dist/components/gov-form-label.js +1 -1
  254. package/dist/components/gov-form-message.js +1 -1
  255. package/dist/components/gov-form-multi-select.js +1 -1
  256. package/dist/components/gov-form-multi-select.js.map +1 -1
  257. package/dist/components/gov-form-password-power.js +1 -1
  258. package/dist/components/gov-form-radio-group.js +1 -1
  259. package/dist/components/gov-form-radio-group.js.map +1 -1
  260. package/dist/components/gov-form-radio.js +1 -1
  261. package/dist/components/gov-form-radio.js.map +1 -1
  262. package/dist/components/gov-form-search.js +1 -1
  263. package/dist/components/gov-form-select.js +1 -1
  264. package/dist/components/gov-form-switch.js +1 -1
  265. package/dist/components/gov-form-switch.js.map +1 -1
  266. package/dist/components/gov-grid-item.js +1 -1
  267. package/dist/components/gov-grid-item.js.map +1 -1
  268. package/dist/components/gov-grid.js +1 -1
  269. package/dist/components/gov-grid.js.map +1 -1
  270. package/dist/components/gov-icon.js +1 -1
  271. package/dist/components/gov-infobar.js +1 -1
  272. package/dist/components/gov-infobar.js.map +1 -1
  273. package/dist/components/gov-layout-column.js +1 -1
  274. package/dist/components/gov-layout.js +1 -1
  275. package/dist/components/gov-lifecycle.js +1 -1
  276. package/dist/components/gov-link.js +1 -1
  277. package/dist/components/gov-link.js.map +1 -1
  278. package/dist/components/gov-loading.js +1 -1
  279. package/dist/components/gov-loading.js.map +1 -1
  280. package/dist/components/gov-message.js +1 -1
  281. package/dist/components/gov-message.js.map +1 -1
  282. package/dist/components/gov-pagination.js +1 -1
  283. package/dist/components/gov-pagination.js.map +1 -1
  284. package/dist/components/gov-skeleton.js +1 -1
  285. package/dist/components/gov-spacer.js +1 -1
  286. package/dist/components/gov-stepper-item.js +1 -1
  287. package/dist/components/gov-stepper-item.js.map +1 -1
  288. package/dist/components/gov-stepper.js +1 -1
  289. package/dist/components/gov-tabs-item.js +1 -1
  290. package/dist/components/gov-tabs.js +1 -1
  291. package/dist/components/gov-tabs.js.map +1 -1
  292. package/dist/components/gov-tag.js +1 -1
  293. package/dist/components/gov-theme-switch.js +1 -1
  294. package/dist/components/gov-theme-switch.js.map +1 -1
  295. package/dist/components/gov-tile.js +1 -1
  296. package/dist/components/gov-toast.js +1 -1
  297. package/dist/components/gov-toast.js.map +1 -1
  298. package/dist/components/gov-tooltip-content.js +1 -1
  299. package/dist/components/gov-tooltip.js +1 -1
  300. package/dist/components/gov-tooltip.js.map +1 -1
  301. package/dist/components/gov-wizard-item.js +1 -1
  302. package/dist/components/gov-wizard.js +1 -1
  303. package/dist/components/index.js +1 -1
  304. package/dist/components/p-0327a469.js +2 -0
  305. package/dist/components/p-0327a469.js.map +1 -0
  306. package/dist/components/p-2ca5423c.js +2 -0
  307. package/dist/components/p-2ca5423c.js.map +1 -0
  308. package/dist/components/p-2fc08a71.js +2 -0
  309. package/dist/components/p-2fc08a71.js.map +1 -0
  310. package/dist/components/p-3c90521b.js +2 -0
  311. package/dist/components/p-3c90521b.js.map +1 -0
  312. package/dist/components/p-3fead64a.js +2 -0
  313. package/dist/components/p-3fead64a.js.map +1 -0
  314. package/dist/components/p-42200001.js +3 -0
  315. package/dist/components/p-42200001.js.map +1 -0
  316. package/dist/components/p-4fba9df0.js +2 -0
  317. package/dist/components/p-4fba9df0.js.map +1 -0
  318. package/dist/components/p-69a31c96.js +2 -0
  319. package/dist/components/p-69a31c96.js.map +1 -0
  320. package/dist/components/{p-03ad4e0f.js → p-73938936.js} +2 -2
  321. package/dist/components/{p-384c7f2a.js → p-7be2301a.js} +2 -2
  322. package/dist/components/p-b533871a.js +2 -0
  323. package/dist/components/p-b533871a.js.map +1 -0
  324. package/dist/components/p-b5dc6bae.js +2 -0
  325. package/dist/components/p-b5dc6bae.js.map +1 -0
  326. package/dist/components/p-ea128b8b.js +2 -0
  327. package/dist/components/p-ea128b8b.js.map +1 -0
  328. package/dist/components/p-f9a1ff6e.js +2 -0
  329. package/dist/components/{p-e44a0fee.js → p-fc2afe61.js} +2 -2
  330. package/dist/components/{p-e44a0fee.js.map → p-fc2afe61.js.map} +1 -1
  331. package/dist/core/core.css +2711 -1506
  332. package/dist/core/core.esm.js +1 -1
  333. package/dist/core/core.esm.js.map +1 -1
  334. package/dist/core/p-005214d1.entry.js +2 -0
  335. package/dist/core/p-0ef1f684.entry.js +2 -0
  336. package/dist/core/p-0ef1f684.entry.js.map +1 -0
  337. package/dist/core/p-0fc9ea97.entry.js +2 -0
  338. package/dist/core/p-0fc9ea97.entry.js.map +1 -0
  339. package/dist/core/p-132c9a87.entry.js +2 -0
  340. package/dist/core/p-132c9a87.entry.js.map +1 -0
  341. package/dist/core/p-16d3a79a.entry.js +2 -0
  342. package/dist/core/{p-967a1094.entry.js.map → p-16d3a79a.entry.js.map} +1 -1
  343. package/dist/core/p-16f44a0b.entry.js +2 -0
  344. package/dist/core/p-16f44a0b.entry.js.map +1 -0
  345. package/dist/core/p-1c7c9144.entry.js +2 -0
  346. package/dist/core/p-1cf1dd10.entry.js +2 -0
  347. package/dist/core/{p-f7f60f91.entry.js.map → p-1cf1dd10.entry.js.map} +1 -1
  348. package/dist/core/p-23b4dcd3.entry.js +2 -0
  349. package/dist/core/{p-45b759f4.entry.js.map → p-23b4dcd3.entry.js.map} +1 -1
  350. package/dist/core/p-2536a8ff.entry.js +2 -0
  351. package/dist/core/p-2536a8ff.entry.js.map +1 -0
  352. package/dist/core/p-28d1bc01.entry.js +2 -0
  353. package/dist/core/p-28d1bc01.entry.js.map +1 -0
  354. package/dist/core/p-2ca5423c.js +2 -0
  355. package/dist/core/p-2ca5423c.js.map +1 -0
  356. package/dist/core/p-3acaa012.entry.js +2 -0
  357. package/dist/core/{p-1aa7450e.entry.js.map → p-3acaa012.entry.js.map} +1 -1
  358. package/dist/core/p-3d7fb8f8.entry.js +2 -0
  359. package/dist/core/p-3d7fb8f8.entry.js.map +1 -0
  360. package/dist/core/{p-927c31dd.entry.js → p-46ecf09e.entry.js} +2 -2
  361. package/dist/core/p-49cd4d0d.entry.js +2 -0
  362. package/dist/core/{p-ee55932a.entry.js.map → p-49cd4d0d.entry.js.map} +1 -1
  363. package/dist/core/p-5108eb37.entry.js +2 -0
  364. package/dist/core/{p-237a5b91.entry.js.map → p-5108eb37.entry.js.map} +1 -1
  365. package/dist/core/{p-0f0f7302.entry.js → p-52042c7e.entry.js} +2 -2
  366. package/dist/core/p-52103c05.entry.js +2 -0
  367. package/dist/core/p-52103c05.entry.js.map +1 -0
  368. package/dist/core/{p-c0800e6d.entry.js → p-5242b51b.entry.js} +2 -2
  369. package/dist/core/p-564555e6.entry.js +2 -0
  370. package/dist/core/p-59fe6cbc.entry.js +2 -0
  371. package/dist/core/p-59fe6cbc.entry.js.map +1 -0
  372. package/dist/core/p-650fe9e8.entry.js +2 -0
  373. package/dist/core/{p-ed02945f.entry.js.map → p-650fe9e8.entry.js.map} +1 -1
  374. package/dist/core/p-6e41cf69.entry.js +2 -0
  375. package/dist/core/{p-77daba72.entry.js → p-6f1ea21d.entry.js} +2 -2
  376. package/dist/core/p-7399ad59.entry.js +2 -0
  377. package/dist/core/p-7399ad59.entry.js.map +1 -0
  378. package/dist/core/{p-7dfb7e36.entry.js → p-79ec86da.entry.js} +2 -2
  379. package/dist/core/p-80bebb7f.entry.js +2 -0
  380. package/dist/core/p-80bebb7f.entry.js.map +1 -0
  381. package/dist/core/p-8cbe8add.entry.js +2 -0
  382. package/dist/core/p-8f73f8e0.entry.js +2 -0
  383. package/dist/core/p-94119ad4.entry.js +2 -0
  384. package/dist/core/p-94119ad4.entry.js.map +1 -0
  385. package/dist/core/p-952ab9e5.entry.js +2 -0
  386. package/dist/core/{p-14d66f26.entry.js.map → p-952ab9e5.entry.js.map} +1 -1
  387. package/dist/core/{p-7baee44f.entry.js → p-99f192c1.entry.js} +2 -2
  388. package/dist/core/p-9ae280b2.entry.js +2 -0
  389. package/dist/core/p-9ae280b2.entry.js.map +1 -0
  390. package/dist/core/p-9c1601b3.entry.js +2 -0
  391. package/dist/core/p-9c1601b3.entry.js.map +1 -0
  392. package/dist/core/p-9dea2efa.js +3 -0
  393. package/dist/core/p-9dea2efa.js.map +1 -0
  394. package/dist/core/p-a02f2547.entry.js +2 -0
  395. package/dist/core/p-ab11081d.entry.js +2 -0
  396. package/dist/core/p-ab11081d.entry.js.map +1 -0
  397. package/dist/core/p-ab868410.entry.js +2 -0
  398. package/dist/core/{p-f2bb8c29.entry.js.map → p-ab868410.entry.js.map} +1 -1
  399. package/dist/core/{p-a6a9de9a.entry.js → p-ae88fe6b.entry.js} +2 -2
  400. package/dist/core/p-c07f6bb4.entry.js +2 -0
  401. package/dist/core/p-c07f6bb4.entry.js.map +1 -0
  402. package/dist/core/{p-063b70a2.entry.js → p-c2abc031.entry.js} +2 -2
  403. package/dist/core/p-c688349d.entry.js +2 -0
  404. package/dist/core/p-c6fdc0a9.entry.js +2 -0
  405. package/dist/core/p-c6fdc0a9.entry.js.map +1 -0
  406. package/dist/core/p-c91512dd.entry.js +2 -0
  407. package/dist/core/p-cf9d5c2f.entry.js +2 -0
  408. package/dist/core/p-cf9d5c2f.entry.js.map +1 -0
  409. package/dist/core/p-d1270d72.entry.js +2 -0
  410. package/dist/core/{p-8cc5ad01.entry.js.map → p-d1270d72.entry.js.map} +1 -1
  411. package/dist/core/p-d141e9ca.entry.js +2 -0
  412. package/dist/core/p-d141e9ca.entry.js.map +1 -0
  413. package/dist/core/p-de852480.entry.js +2 -0
  414. package/dist/core/p-e89471ef.entry.js +2 -0
  415. package/dist/core/p-ea128b8b.js +2 -0
  416. package/dist/core/p-ea128b8b.js.map +1 -0
  417. package/dist/core/p-eb8a9705.entry.js +2 -0
  418. package/dist/core/p-eb8a9705.entry.js.map +1 -0
  419. package/dist/core/p-ee950038.entry.js +2 -0
  420. package/dist/core/p-ee950038.entry.js.map +1 -0
  421. package/dist/core/p-f0e001c7.entry.js +2 -0
  422. package/dist/core/{p-269071f5.entry.js.map → p-f0e001c7.entry.js.map} +1 -1
  423. package/dist/core/{p-3849ca02.entry.js → p-f120ba66.entry.js} +2 -2
  424. package/dist/core/p-f120ba66.entry.js.map +1 -0
  425. package/dist/core/p-f333c673.entry.js +2 -0
  426. package/dist/core/p-f7e47c0a.entry.js +2 -0
  427. package/dist/core/p-f7e47c0a.entry.js.map +1 -0
  428. package/dist/core/p-f98f19f6.entry.js +2 -0
  429. package/dist/core/{p-906865d0.entry.js.map → p-f98f19f6.entry.js.map} +1 -1
  430. package/dist/core/{p-e44a0fee.js → p-fc2afe61.js} +2 -2
  431. package/dist/core/{p-e44a0fee.js.map → p-fc2afe61.js.map} +1 -1
  432. package/dist/esm/{constants-4da2b3c0.js → constants-1548499a.js} +2 -2
  433. package/dist/esm/{constants-4da2b3c0.js.map → constants-1548499a.js.map} +1 -1
  434. package/dist/esm/{constants-372455eb.js → constants-7b1ce2ec.js} +3 -1
  435. package/dist/esm/constants-7b1ce2ec.js.map +1 -0
  436. package/dist/esm/{constants-2d5a0e18.js → constants-dc2115cb.js} +3 -1
  437. package/dist/esm/constants-dc2115cb.js.map +1 -0
  438. package/dist/esm/core.js +3 -3
  439. package/dist/esm/gov-accordion-item.entry.js +1 -1
  440. package/dist/esm/gov-accordion.entry.js +1 -1
  441. package/dist/esm/gov-attachments_3.entry.js +3 -3
  442. package/dist/esm/gov-attachments_3.entry.js.map +1 -1
  443. package/dist/esm/gov-backdrop.entry.js +1 -1
  444. package/dist/esm/gov-banner.entry.js +75 -0
  445. package/dist/esm/gov-banner.entry.js.map +1 -0
  446. package/dist/esm/gov-blockquote.entry.js +29 -0
  447. package/dist/esm/gov-blockquote.entry.js.map +1 -0
  448. package/dist/esm/gov-breadcrumbs.entry.js +2 -2
  449. package/dist/esm/gov-button.entry.js +6 -5
  450. package/dist/esm/gov-button.entry.js.map +1 -1
  451. package/dist/esm/gov-card.entry.js +2 -2
  452. package/dist/esm/gov-chip.entry.js +5 -4
  453. package/dist/esm/gov-chip.entry.js.map +1 -1
  454. package/dist/esm/gov-container.entry.js +2 -2
  455. package/dist/esm/gov-control-group.entry.js +2 -2
  456. package/dist/esm/gov-cookiebar.entry.js +2 -2
  457. package/dist/esm/gov-dialog.entry.js +2 -2
  458. package/dist/esm/gov-dialog.entry.js.map +1 -1
  459. package/dist/esm/gov-dropdown.entry.js +2 -2
  460. package/dist/esm/gov-empty.entry.js +2 -2
  461. package/dist/esm/gov-error-code.entry.js +2 -2
  462. package/dist/esm/gov-flex_3.entry.js +7 -26
  463. package/dist/esm/gov-flex_3.entry.js.map +1 -1
  464. package/dist/esm/gov-form-autocomplete.entry.js +4 -3
  465. package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
  466. package/dist/esm/gov-form-checkbox-group.entry.js +4 -4
  467. package/dist/esm/gov-form-checkbox-group.entry.js.map +1 -1
  468. package/dist/esm/gov-form-checkbox.entry.js +3 -2
  469. package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
  470. package/dist/esm/gov-form-control.entry.js +2 -2
  471. package/dist/esm/gov-form-file.entry.js +4 -3
  472. package/dist/esm/gov-form-file.entry.js.map +1 -1
  473. package/dist/esm/gov-form-group.entry.js +3 -3
  474. package/dist/esm/gov-form-input_2.entry.js +11 -9
  475. package/dist/esm/gov-form-input_2.entry.js.map +1 -1
  476. package/dist/esm/gov-form-label.entry.js +2 -2
  477. package/dist/esm/gov-form-multi-select.entry.js +5 -4
  478. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  479. package/dist/esm/gov-form-password-power.entry.js +2 -2
  480. package/dist/esm/gov-form-radio-group.entry.js +4 -4
  481. package/dist/esm/gov-form-radio-group.entry.js.map +1 -1
  482. package/dist/esm/gov-form-radio.entry.js +3 -2
  483. package/dist/esm/gov-form-radio.entry.js.map +1 -1
  484. package/dist/esm/gov-form-search.entry.js +2 -2
  485. package/dist/esm/gov-form-select.entry.js +5 -4
  486. package/dist/esm/gov-form-select.entry.js.map +1 -1
  487. package/dist/esm/gov-form-switch.entry.js +3 -2
  488. package/dist/esm/gov-form-switch.entry.js.map +1 -1
  489. package/dist/esm/gov-grid-item.entry.js +14 -8
  490. package/dist/esm/gov-grid-item.entry.js.map +1 -1
  491. package/dist/esm/gov-grid.entry.js +8 -6
  492. package/dist/esm/gov-grid.entry.js.map +1 -1
  493. package/dist/esm/gov-infobar.entry.js +5 -4
  494. package/dist/esm/gov-infobar.entry.js.map +1 -1
  495. package/dist/esm/gov-layout-column.entry.js +2 -2
  496. package/dist/esm/gov-layout.entry.js +2 -2
  497. package/dist/esm/gov-lifecycle.entry.js +2 -2
  498. package/dist/esm/gov-link.entry.js +3 -2
  499. package/dist/esm/gov-link.entry.js.map +1 -1
  500. package/dist/esm/gov-loading.entry.js +2 -2
  501. package/dist/esm/gov-message.entry.js +2 -2
  502. package/dist/esm/gov-message.entry.js.map +1 -1
  503. package/dist/esm/gov-pagination.entry.js +3 -2
  504. package/dist/esm/gov-pagination.entry.js.map +1 -1
  505. package/dist/esm/gov-spacer.entry.js +2 -2
  506. package/dist/esm/gov-stepper-item.entry.js +3 -3
  507. package/dist/esm/gov-stepper-item.entry.js.map +1 -1
  508. package/dist/esm/gov-stepper.entry.js +3 -3
  509. package/dist/esm/gov-tabs-item.entry.js +2 -2
  510. package/dist/esm/gov-tabs.entry.js +4 -3
  511. package/dist/esm/gov-tabs.entry.js.map +1 -1
  512. package/dist/esm/gov-tag.entry.js +2 -2
  513. package/dist/esm/gov-tile.entry.js +2 -2
  514. package/dist/esm/gov-toast.entry.js +4 -3
  515. package/dist/esm/gov-toast.entry.js.map +1 -1
  516. package/dist/esm/gov-tooltip-content.entry.js +2 -2
  517. package/dist/esm/gov-tooltip.entry.js +3 -3
  518. package/dist/esm/gov-wizard-item.entry.js +3 -3
  519. package/dist/esm/gov-wizard.entry.js +2 -2
  520. package/dist/esm/{index-087b155c.js → index-bf8a6f64.js} +10 -18
  521. package/dist/esm/index-bf8a6f64.js.map +1 -0
  522. package/dist/esm/loader.js +3 -3
  523. package/dist/hydrate/index.js +247 -161
  524. package/dist/hydrate/index.mjs +247 -161
  525. package/dist/stencil.config.js +2 -1
  526. package/dist/stencil.config.js.map +1 -1
  527. package/dist/types/components/gov-banner/constants.d.ts +26 -0
  528. package/dist/types/components/gov-banner/gov-banner.d.ts +38 -0
  529. package/dist/types/components/gov-blocquote/constants.d.ts +10 -0
  530. package/dist/types/components/gov-blocquote/gov-blockquote.d.ts +15 -0
  531. package/dist/types/components/gov-button/button/constants.d.ts +1 -1
  532. package/dist/types/components/gov-control-group/constants.d.ts +1 -1
  533. package/dist/types/components/gov-flex/gov-flex.d.ts +5 -1
  534. package/dist/types/components/gov-form/group/constants.d.ts +1 -1
  535. package/dist/types/components/gov-grid/constants.d.ts +4 -0
  536. package/dist/types/components/gov-grid/gov-grid-item.d.ts +25 -5
  537. package/dist/types/components/gov-grid/gov-grid.d.ts +11 -2
  538. package/dist/types/components/gov-icon/constants.d.ts +1 -1
  539. package/dist/types/components/gov-icon/gov-icon.d.ts +0 -1
  540. package/dist/types/components/gov-infobar/constants.d.ts +1 -1
  541. package/dist/types/components/gov-link/constants.d.ts +1 -0
  542. package/dist/types/components/gov-stepper/constants.d.ts +2 -0
  543. package/dist/types/components/gov-theme-switch/constants.d.ts +1 -0
  544. package/dist/types/components.d.ts +179 -36
  545. package/dist/types/pages/Banner.d.ts +3 -0
  546. package/dist/types/pages/Blockquote.d.ts +3 -0
  547. package/package.json +3 -3
  548. package/dist/cjs/constants-4dfa23e3.js.map +0 -1
  549. package/dist/cjs/constants-52053f2d.js.map +0 -1
  550. package/dist/cjs/gov-tiles.cjs.entry.js +0 -26
  551. package/dist/cjs/gov-tiles.cjs.entry.js.map +0 -1
  552. package/dist/cjs/index-67e87c27.js.map +0 -1
  553. package/dist/collection/components/gov-tile/container/constants.js +0 -4
  554. package/dist/collection/components/gov-tile/container/constants.js.map +0 -1
  555. package/dist/collection/components/gov-tile/container/gov-tiles.js +0 -37
  556. package/dist/collection/components/gov-tile/container/gov-tiles.js.map +0 -1
  557. package/dist/components/gov-tiles.js +0 -2
  558. package/dist/components/gov-tiles.js.map +0 -1
  559. package/dist/components/p-115b9cf3.js +0 -3
  560. package/dist/components/p-115b9cf3.js.map +0 -1
  561. package/dist/components/p-350e060c.js +0 -2
  562. package/dist/components/p-350e060c.js.map +0 -1
  563. package/dist/components/p-792c5352.js +0 -2
  564. package/dist/components/p-792c5352.js.map +0 -1
  565. package/dist/components/p-880743a5.js +0 -2
  566. package/dist/components/p-880743a5.js.map +0 -1
  567. package/dist/components/p-8e8a3300.js +0 -2
  568. package/dist/components/p-8e8a3300.js.map +0 -1
  569. package/dist/components/p-8ee6f2f3.js +0 -2
  570. package/dist/components/p-92406c6d.js +0 -2
  571. package/dist/components/p-92406c6d.js.map +0 -1
  572. package/dist/components/p-939638b2.js +0 -2
  573. package/dist/components/p-939638b2.js.map +0 -1
  574. package/dist/components/p-95bd5f39.js +0 -2
  575. package/dist/components/p-95bd5f39.js.map +0 -1
  576. package/dist/components/p-a521c59a.js +0 -2
  577. package/dist/components/p-a521c59a.js.map +0 -1
  578. package/dist/components/p-ba61e648.js +0 -2
  579. package/dist/components/p-ba61e648.js.map +0 -1
  580. package/dist/components/p-bfce6f99.js +0 -2
  581. package/dist/components/p-bfce6f99.js.map +0 -1
  582. package/dist/components/p-f9161803.js +0 -2
  583. package/dist/components/p-f9161803.js.map +0 -1
  584. package/dist/core/p-017ff5a5.entry.js +0 -2
  585. package/dist/core/p-017ff5a5.entry.js.map +0 -1
  586. package/dist/core/p-032accfb.entry.js +0 -2
  587. package/dist/core/p-032accfb.entry.js.map +0 -1
  588. package/dist/core/p-054aa25e.entry.js +0 -2
  589. package/dist/core/p-054aa25e.entry.js.map +0 -1
  590. package/dist/core/p-058e6fe2.entry.js +0 -2
  591. package/dist/core/p-058e6fe2.entry.js.map +0 -1
  592. package/dist/core/p-0724cb6a.entry.js +0 -2
  593. package/dist/core/p-0724cb6a.entry.js.map +0 -1
  594. package/dist/core/p-09c9eba6.entry.js +0 -2
  595. package/dist/core/p-09c9eba6.entry.js.map +0 -1
  596. package/dist/core/p-0c076b21.entry.js +0 -2
  597. package/dist/core/p-10f773c2.entry.js +0 -2
  598. package/dist/core/p-10f773c2.entry.js.map +0 -1
  599. package/dist/core/p-14d66f26.entry.js +0 -2
  600. package/dist/core/p-1aa7450e.entry.js +0 -2
  601. package/dist/core/p-237a5b91.entry.js +0 -2
  602. package/dist/core/p-269071f5.entry.js +0 -2
  603. package/dist/core/p-2ee042d4.js +0 -3
  604. package/dist/core/p-2ee042d4.js.map +0 -1
  605. package/dist/core/p-33310735.entry.js +0 -2
  606. package/dist/core/p-33310735.entry.js.map +0 -1
  607. package/dist/core/p-347d15d5.entry.js +0 -2
  608. package/dist/core/p-37473c34.entry.js +0 -2
  609. package/dist/core/p-3849ca02.entry.js.map +0 -1
  610. package/dist/core/p-3a7381e7.entry.js +0 -2
  611. package/dist/core/p-43d3dbc0.entry.js +0 -2
  612. package/dist/core/p-45b759f4.entry.js +0 -2
  613. package/dist/core/p-4c60e125.entry.js +0 -2
  614. package/dist/core/p-4e29744a.entry.js +0 -2
  615. package/dist/core/p-4e29744a.entry.js.map +0 -1
  616. package/dist/core/p-4fa0320d.entry.js +0 -2
  617. package/dist/core/p-50af9ae8.entry.js +0 -2
  618. package/dist/core/p-5c3f4cfe.entry.js +0 -2
  619. package/dist/core/p-5c3f4cfe.entry.js.map +0 -1
  620. package/dist/core/p-6b7c3a96.entry.js +0 -2
  621. package/dist/core/p-6b7c3a96.entry.js.map +0 -1
  622. package/dist/core/p-71f5d4ff.entry.js +0 -2
  623. package/dist/core/p-7a21fb90.entry.js +0 -2
  624. package/dist/core/p-7a21fb90.entry.js.map +0 -1
  625. package/dist/core/p-880743a5.js +0 -2
  626. package/dist/core/p-880743a5.js.map +0 -1
  627. package/dist/core/p-8bb6c816.entry.js +0 -2
  628. package/dist/core/p-8bb6c816.entry.js.map +0 -1
  629. package/dist/core/p-8cc5ad01.entry.js +0 -2
  630. package/dist/core/p-906865d0.entry.js +0 -2
  631. package/dist/core/p-967a1094.entry.js +0 -2
  632. package/dist/core/p-9846fd13.entry.js +0 -2
  633. package/dist/core/p-9846fd13.entry.js.map +0 -1
  634. package/dist/core/p-994385ca.entry.js +0 -2
  635. package/dist/core/p-994385ca.entry.js.map +0 -1
  636. package/dist/core/p-9f8d69a9.entry.js +0 -2
  637. package/dist/core/p-a521c59a.js +0 -2
  638. package/dist/core/p-a521c59a.js.map +0 -1
  639. package/dist/core/p-b62e49ee.entry.js +0 -2
  640. package/dist/core/p-cecbe73f.entry.js +0 -2
  641. package/dist/core/p-cecbe73f.entry.js.map +0 -1
  642. package/dist/core/p-d795a421.entry.js +0 -2
  643. package/dist/core/p-d795a421.entry.js.map +0 -1
  644. package/dist/core/p-d9b42773.entry.js +0 -2
  645. package/dist/core/p-d9b42773.entry.js.map +0 -1
  646. package/dist/core/p-e0a199ff.entry.js +0 -2
  647. package/dist/core/p-e0a199ff.entry.js.map +0 -1
  648. package/dist/core/p-e215f3ee.entry.js +0 -2
  649. package/dist/core/p-ed02945f.entry.js +0 -2
  650. package/dist/core/p-ee55932a.entry.js +0 -2
  651. package/dist/core/p-f2bb8c29.entry.js +0 -2
  652. package/dist/core/p-f54edd6c.entry.js +0 -2
  653. package/dist/core/p-f54edd6c.entry.js.map +0 -1
  654. package/dist/core/p-f7f60f91.entry.js +0 -2
  655. package/dist/core/p-fcac8531.entry.js +0 -2
  656. package/dist/core/p-fcac8531.entry.js.map +0 -1
  657. package/dist/esm/constants-2d5a0e18.js.map +0 -1
  658. package/dist/esm/constants-372455eb.js.map +0 -1
  659. package/dist/esm/gov-tiles.entry.js +0 -22
  660. package/dist/esm/gov-tiles.entry.js.map +0 -1
  661. package/dist/esm/index-087b155c.js.map +0 -1
  662. package/dist/types/components/gov-tile/container/constants.d.ts +0 -3
  663. package/dist/types/components/gov-tile/container/gov-tiles.d.ts +0 -10
  664. /package/dist/components/{p-03ad4e0f.js.map → p-73938936.js.map} +0 -0
  665. /package/dist/components/{p-384c7f2a.js.map → p-7be2301a.js.map} +0 -0
  666. /package/dist/components/{p-8ee6f2f3.js.map → p-f9a1ff6e.js.map} +0 -0
  667. /package/dist/core/{p-37473c34.entry.js.map → p-005214d1.entry.js.map} +0 -0
  668. /package/dist/core/{p-43d3dbc0.entry.js.map → p-1c7c9144.entry.js.map} +0 -0
  669. /package/dist/core/{p-927c31dd.entry.js.map → p-46ecf09e.entry.js.map} +0 -0
  670. /package/dist/core/{p-0f0f7302.entry.js.map → p-52042c7e.entry.js.map} +0 -0
  671. /package/dist/core/{p-c0800e6d.entry.js.map → p-5242b51b.entry.js.map} +0 -0
  672. /package/dist/core/{p-9f8d69a9.entry.js.map → p-564555e6.entry.js.map} +0 -0
  673. /package/dist/core/{p-0c076b21.entry.js.map → p-6e41cf69.entry.js.map} +0 -0
  674. /package/dist/core/{p-77daba72.entry.js.map → p-6f1ea21d.entry.js.map} +0 -0
  675. /package/dist/core/{p-7dfb7e36.entry.js.map → p-79ec86da.entry.js.map} +0 -0
  676. /package/dist/core/{p-3a7381e7.entry.js.map → p-8cbe8add.entry.js.map} +0 -0
  677. /package/dist/core/{p-4fa0320d.entry.js.map → p-8f73f8e0.entry.js.map} +0 -0
  678. /package/dist/core/{p-7baee44f.entry.js.map → p-99f192c1.entry.js.map} +0 -0
  679. /package/dist/core/{p-e215f3ee.entry.js.map → p-a02f2547.entry.js.map} +0 -0
  680. /package/dist/core/{p-a6a9de9a.entry.js.map → p-ae88fe6b.entry.js.map} +0 -0
  681. /package/dist/core/{p-063b70a2.entry.js.map → p-c2abc031.entry.js.map} +0 -0
  682. /package/dist/core/{p-b62e49ee.entry.js.map → p-c688349d.entry.js.map} +0 -0
  683. /package/dist/core/{p-50af9ae8.entry.js.map → p-c91512dd.entry.js.map} +0 -0
  684. /package/dist/core/{p-71f5d4ff.entry.js.map → p-de852480.entry.js.map} +0 -0
  685. /package/dist/core/{p-4c60e125.entry.js.map → p-e89471ef.entry.js.map} +0 -0
  686. /package/dist/core/{p-347d15d5.entry.js.map → p-f333c673.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{p as t,H as i,h as s,d as e}from"./p-115b9cf3.js";import{v as o}from"./p-0b3574c2.js";import{T as h,a as n,b as a,c as r,d as c}from"./p-76d604c6.js";import{c as f}from"./p-cd6c2938.js";import{g as l}from"./p-ea7fdd2e.js";import{d}from"./p-e8ec030e.js";import{t as p}from"./p-26618322.js";const u=t(class t extends i{constructor(){super();this.__registerHost();this.tooltipContentId=undefined;this.tooltipId=undefined;this.color=h.PRIMARY;this.size=n._M;this.position="right";this.message=undefined;this.identifier=undefined;this.icon=undefined;this.persist=false;this.h=l(this.host);this.tooltipId=f("GovTooltip");this.tooltipContentId=f("GovContentTooltip")}validateColor(t){o(h,t,c.root)}validateSize(t){o(n,t,c.root)}validatePosition(t){o(r,t,c.root)}rerenderMessage(){this.createContentWrapper()}connectedCallback(){this.createContentWrapper();this.registerListeners()}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size);this.validatePosition(this.position)}componentDidUpdate(){this.createContentWrapper()}disconnectedCallback(){this.removeContent()}createContentWrapper(){var t;if(this.tooltipContent){if(this.message){this.tooltipContent.innerHTML=this.message}else if(this.insideContent){this.tooltipContent.innerHTML=this.insideContent.innerHTML}return}let i;if(this.insideContent){i=this.insideContent}else{i=d().createElement(a.root);i.innerHTML=this.message}i.setAttribute("id",(t=this.identifier)!==null&&t!==void 0?t:this.tooltipContentId);i.setAttribute("parent-id",this.tooltipId);i.setAttribute("color",this.color);i.setAttribute("size",this.size);d().body.appendChild(i)}get tooltipContent(){var t;return d().body.querySelector(`#${(t=this.identifier)!==null&&t!==void 0?t:this.tooltipContentId}`)}get insideContent(){return this.host.querySelector(a.root)}registerListeners(){this.host.addEventListener("click",(t=>{t.preventDefault();this.persist=true;if(this.tooltipContent){this.tooltipContent.setAttribute("persist","true")}this.showTooltip()}));this.host.addEventListener("mouseenter",(t=>{t.preventDefault();this.showTooltip()}));this.host.addEventListener("mouseleave",(t=>{t.preventDefault();if(this.persist===false){this.hideTooltip()}}))}verifyPositionSpace(){const t=12;const i=window.innerWidth-(window.innerWidth-document.documentElement.clientWidth);const s=this.host.getBoundingClientRect();const e=this.host.offsetWidth;const o=this.host.offsetHeight;const h=this.tooltipContent.offsetWidth;const n=this.tooltipContent.offsetHeight;const a={left:s.left+document.documentElement.scrollLeft,top:s.top+document.documentElement.scrollTop};const c=a.left+t+s.width+h<=i;const f=a.left>h;if(this.position===r.LEFT||this.position===r.RIGHT){this.tooltipContent.style.top=a.top-(n-o)/2+"px";if(c===false&&f===false){this.position=r.TOP;this.tooltipContent.setAttribute("position",r.TOP)}if(f&&c===false&&this.position===r.RIGHT){this.position=r.LEFT}if(c&&f===false&&this.position===r.LEFT){this.position=r.RIGHT}}if(this.position===r.RIGHT){this.tooltipContent.setAttribute("position",r.RIGHT);this.tooltipContent.style.left=a.left+t+s.width+"px"}if(this.position===r.LEFT){this.tooltipContent.setAttribute("position",r.LEFT);this.tooltipContent.style.left=a.left-(h+t)+"px"}if(this.position===r.TOP||this.position===r.BOTTOM){if(h>e){let s=a.left-(h-e)/2;const o=s<0;const n=s+h>i;if(o&&n){this.tooltipContent.style.width="auto";this.tooltipContent.style.left=t+"px";this.tooltipContent.style.right=t+"px"}else{if(o){s=t}if(n){s=s-(i-(s+h+t))*-1}this.tooltipContent.style.left=s+"px"}}else{const t=a.left+(e-h)/2;this.tooltipContent.style.left=t+"px"}}if(this.position===r.TOP){this.tooltipContent.setAttribute("position",r.TOP);this.tooltipContent.style.top=a.top-(n+t)+"px"}if(this.position===r.BOTTOM){this.tooltipContent.setAttribute("position",r.BOTTOM);this.tooltipContent.style.top=a.top+(o+t)+"px"}this.tooltipContent.style.opacity="1"}showTooltip(){if(this.tooltipContent){this.tooltipContent.style.opacity="0";this.tooltipContent.hidden=false;this.tooltipContent.setAttribute("is-visible","true");p((()=>{this.verifyPositionSpace()}))}}hideTooltip(){if(this.tooltipContent){this.tooltipContent.setAttribute("is-visible","false");this.tooltipContent.setAttribute("persist","false");this.tooltipContent.removeAttribute("style")}}removeContent(){const t=document.getElementById(this.tooltipContentId);if(t){t.remove()}}render(){var t;return s(e,{key:"2e96da1a9d7afd70abb4ffd2e979210cc179680e",id:this.tooltipId,class:this.h.classes(c.root),position:this.position},s("span",{key:"9c9c06d716556faa56f5ba9a952ea867c5533b2b",role:"button",tabindex:0,onKeyPress:()=>this.showTooltip(),onBlur:()=>{if(this.persist===false){this.hideTooltip()}},"aria-describedby":(t=this.identifier)!==null&&t!==void 0?t:this.tooltipContentId},s("slot",{key:"29549049c0bfbe311980aa6a630ff9eff8e35f40"})))}async show(){this.showTooltip()}async hide(){this.persist=false;this.hideTooltip()}get host(){return this}static get watchers(){return{color:["validateColor"],size:["validateSize"],position:["validatePosition"],message:["rerenderMessage"]}}},[4,"gov-tooltip",{color:[1],size:[1],position:[1025],message:[1],identifier:[1],icon:[516],persist:[32],show:[64],hide:[64]},undefined,{color:["validateColor"],size:["validateSize"],position:["validatePosition"],message:["rerenderMessage"]}]);function m(){if(typeof customElements==="undefined"){return}const t=["gov-tooltip"];t.forEach((t=>{switch(t){case"gov-tooltip":if(!customElements.get(t)){customElements.define(t,u)}break}}))}m();const v=u;const b=m;export{v as GovTooltip,b as defineCustomElement};
1
+ import{p as t,H as i,h as s,d as e}from"./p-42200001.js";import{v as o}from"./p-0b3574c2.js";import{T as h,a as n,b as a,c as r,d as c}from"./p-76d604c6.js";import{c as l}from"./p-cd6c2938.js";import{g as d}from"./p-ea7fdd2e.js";import{d as f}from"./p-e8ec030e.js";import{t as p}from"./p-26618322.js";const u=t(class t extends i{constructor(){super();this.__registerHost();this.tooltipContentId=undefined;this.tooltipId=undefined;this.color=h.PRIMARY;this.size=n._M;this.position="right";this.message=undefined;this.identifier=undefined;this.icon=undefined;this.persist=false;this.h=d(this.host);this.tooltipId=l("GovTooltip");this.tooltipContentId=l("GovContentTooltip")}validateColor(t){o(h,t,c.root)}validateSize(t){o(n,t,c.root)}validatePosition(t){o(r,t,c.root)}rerenderMessage(){this.createContentWrapper()}connectedCallback(){this.createContentWrapper();this.registerListeners()}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size);this.validatePosition(this.position)}componentDidUpdate(){this.createContentWrapper()}disconnectedCallback(){this.removeContent()}createContentWrapper(){var t;if(this.tooltipContent){if(this.message){this.tooltipContent.innerHTML=this.message}else if(this.insideContent){this.tooltipContent.innerHTML=this.insideContent.innerHTML}return}let i;if(this.insideContent){i=this.insideContent}else{i=f().createElement(a.root);i.innerHTML=this.message}i.setAttribute("id",(t=this.identifier)!==null&&t!==void 0?t:this.tooltipContentId);i.setAttribute("parent-id",this.tooltipId);i.setAttribute("color",this.color);i.setAttribute("size",this.size);f().body.appendChild(i)}get tooltipContent(){var t;return f().body.querySelector(`#${(t=this.identifier)!==null&&t!==void 0?t:this.tooltipContentId}`)}get insideContent(){return this.host.querySelector(a.root)}registerListeners(){this.host.addEventListener("click",(t=>{t.preventDefault();this.persist=true;if(this.tooltipContent){this.tooltipContent.setAttribute("persist","true")}this.showTooltip()}));this.host.addEventListener("mouseenter",(t=>{t.preventDefault();this.showTooltip()}));this.host.addEventListener("mouseleave",(t=>{t.preventDefault();if(this.persist===false){this.hideTooltip()}}))}verifyPositionSpace(){const t=12;const i=window.innerWidth-(window.innerWidth-document.documentElement.clientWidth);const s=this.host.getBoundingClientRect();const e=this.host.offsetWidth;const o=this.host.offsetHeight;const h=this.tooltipContent.offsetWidth;const n=this.tooltipContent.offsetHeight;const a={left:s.left+document.documentElement.scrollLeft,top:s.top+document.documentElement.scrollTop};const c=a.left+t+s.width+h<=i;const l=a.left>h;if(this.position===r.LEFT||this.position===r.RIGHT){this.tooltipContent.style.top=a.top-(n-o)/2+"px";if(c===false&&l===false){this.position=r.TOP;this.tooltipContent.setAttribute("position",r.TOP)}if(l&&c===false&&this.position===r.RIGHT){this.position=r.LEFT}if(c&&l===false&&this.position===r.LEFT){this.position=r.RIGHT}}if(this.position===r.RIGHT){this.tooltipContent.setAttribute("position",r.RIGHT);this.tooltipContent.style.left=a.left+t+s.width+"px"}if(this.position===r.LEFT){this.tooltipContent.setAttribute("position",r.LEFT);this.tooltipContent.style.left=a.left-(h+t)+"px"}if(this.position===r.TOP||this.position===r.BOTTOM){if(h>e){let s=a.left-(h-e)/2;const o=s<0;const n=s+h>i;if(o&&n){this.tooltipContent.style.width="auto";this.tooltipContent.style.left=t+"px";this.tooltipContent.style.right=t+"px"}else{if(o){s=t}if(n){s=s-(i-(s+h+t))*-1}this.tooltipContent.style.left=s+"px"}}else{const t=a.left+(e-h)/2;this.tooltipContent.style.left=t+"px"}}if(this.position===r.TOP){this.tooltipContent.setAttribute("position",r.TOP);this.tooltipContent.style.top=a.top-(n+t)+"px"}if(this.position===r.BOTTOM){this.tooltipContent.setAttribute("position",r.BOTTOM);this.tooltipContent.style.top=a.top+(o+t)+"px"}this.tooltipContent.style.opacity="1"}showTooltip(){if(this.tooltipContent){this.tooltipContent.style.opacity="0";this.tooltipContent.hidden=false;this.tooltipContent.setAttribute("is-visible","true");p((()=>{this.verifyPositionSpace()}))}}hideTooltip(){if(this.tooltipContent){this.tooltipContent.setAttribute("is-visible","false");this.tooltipContent.setAttribute("persist","false");this.tooltipContent.removeAttribute("style")}}removeContent(){const t=document.getElementById(this.tooltipContentId);if(t){t.remove()}}render(){var t;return s(e,{key:"07a76faeb64a6487ab5d2fe50caf2af04be01365",id:this.tooltipId,class:this.h.classes(c.root),position:this.position},s("span",{key:"c38c8e9eef234298a424a5d3e55664e1fe9ebbbe",role:"button",tabindex:0,onKeyPress:()=>this.showTooltip(),onBlur:()=>{if(this.persist===false){this.hideTooltip()}},"aria-describedby":(t=this.identifier)!==null&&t!==void 0?t:this.tooltipContentId},s("slot",{key:"0ec9ab85c4242040aedfc1369946de4f1bea3e3a"})))}async show(){this.showTooltip()}async hide(){this.persist=false;this.hideTooltip()}get host(){return this}static get watchers(){return{color:["validateColor"],size:["validateSize"],position:["validatePosition"],message:["rerenderMessage"]}}},[4,"gov-tooltip",{color:[1],size:[1],position:[1025],message:[1],identifier:[1],icon:[516],persist:[32],show:[64],hide:[64]},undefined,{color:["validateColor"],size:["validateSize"],position:["validatePosition"],message:["rerenderMessage"]}]);function m(){if(typeof customElements==="undefined"){return}const t=["gov-tooltip"];t.forEach((t=>{switch(t){case"gov-tooltip":if(!customElements.get(t)){customElements.define(t,u)}break}}))}m();const v=u;const b=m;export{v as GovTooltip,b as defineCustomElement};
2
2
  //# sourceMappingURL=gov-tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["GovTooltip","proxyCustomElement","H","constructor","this","tooltipContentId","undefined","tooltipId","TooltipColors","PRIMARY","TooltipSize","_M","h","govHost","host","createID","validateColor","newValue","validateProp","TooltipClass","root","validateSize","validatePosition","TooltipPosition","rerenderMessage","createContentWrapper","connectedCallback","registerListeners","componentWillLoad","color","size","position","componentDidUpdate","disconnectedCallback","removeContent","tooltipContent","message","innerHTML","insideContent","content","documentNode","createElement","TooltipContentClass","setAttribute","_a","identifier","body","appendChild","querySelector","addEventListener","e","preventDefault","persist","showTooltip","hideTooltip","verifyPositionSpace","offset","windowWidth","window","innerWidth","document","documentElement","clientWidth","trigger","getBoundingClientRect","trgWidth","offsetWidth","trgHeight","offsetHeight","contentWidth","contentHeight","triggerPos","left","scrollLeft","top","scrollTop","isRightSpace","width","isLeftSpace","LEFT","RIGHT","style","TOP","BOTTOM","leftPosition","isNotLeftSpace","isNotRightSpace","right","opacity","hidden","tick","removeAttribute","contentEl","getElementById","remove","render","Host","key","id","class","classes","role","tabindex","onKeyPress","onBlur","show","hide"],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip.tsx"],"sourcesContent":["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\tTooltipColors,\n\tTooltipColorType,\n} from \"./constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {documentNode} from \"../../helpers/Dom/win\";\nimport {Nullable} from \"../../utils/helpers.types\";\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: \"gov-tooltip\",\n})\nexport class GovTooltip {\n\tprivate h: GovHost\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 color?: TooltipColorType = TooltipColors.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({mutable: true}) 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({reflect: true}) readonly icon: boolean = undefined\n\n\t@State() persist = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TooltipColors, 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\t@Watch(\"message\")\n\trerenderMessage(): void {\n\t\tthis.createContentWrapper();\n\t}\n\n\tconnectedCallback() {\n\t\tthis.createContentWrapper()\n\t\tthis.registerListeners()\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\n\t\tthis.validatePosition(this.position)\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.createContentWrapper()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.removeContent()\n\t}\n\n\tprivate createContentWrapper() {\n\t\tif (this.tooltipContent) {\n\t\t\tif (this.message) {\n\t\t\t\tthis.tooltipContent.innerHTML = this.message\n\t\t\t} else if (this.insideContent) {\n\t\t\t\tthis.tooltipContent.innerHTML = this.insideContent.innerHTML\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tlet content: HTMLGovTooltipContentElement;\n\t\tif (this.insideContent) {\n\t\t\tcontent = this.insideContent\n\t\t} else {\n\t\t\tcontent = documentNode().createElement(TooltipContentClass.root) as HTMLGovTooltipContentElement\n\t\t\tcontent.innerHTML = this.message\n\t\t}\n\n\t\tcontent.setAttribute(\"id\", this.identifier ?? this.tooltipContentId)\n\t\tcontent.setAttribute(\"parent-id\", this.tooltipId)\n\t\tcontent.setAttribute(\"color\", this.color)\n\t\tcontent.setAttribute(\"size\", this.size)\n\t\tdocumentNode().body.appendChild(content)\n\t}\n\n\tprivate get tooltipContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn documentNode().body.querySelector(`#${this.identifier ?? this.tooltipContentId}`);\n\t}\n\n\tprivate get insideContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn this.host.querySelector(TooltipContentClass.root)\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\tif (this.tooltipContent) {\n\t\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"true\")\n\t\t\t}\n\t\t\tthis.showTooltip()\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 windowWidth = window.innerWidth - (window.innerWidth - document.documentElement.clientWidth);\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.tooltipContent.offsetWidth\n\t\tconst contentHeight = this.tooltipContent.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\n\t\tconst isRightSpace = ((triggerPos.left + offset + trigger.width) + contentWidth) <= windowWidth;\n\t\tconst isLeftSpace = triggerPos.left > contentWidth;\n\n\t\t// LEFT/RIGHT\n\t\tif (this.position === TooltipPosition.LEFT || this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - ((contentHeight - trgHeight) / 2)) + \"px\";\n\t\t\tif (isRightSpace === false && isLeftSpace === false) {\n\t\t\t\tthis.position = TooltipPosition.TOP\n\t\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\t}\n\t\t\tif (isLeftSpace && isRightSpace === false && this.position === TooltipPosition.RIGHT) {\n\t\t\t\tthis.position = TooltipPosition.LEFT\n\t\t\t}\n\t\t\tif (isRightSpace && isLeftSpace === false && this.position === TooltipPosition.LEFT) {\n\t\t\t\tthis.position = TooltipPosition.RIGHT\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.RIGHT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left + offset + trigger.width) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.LEFT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.LEFT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left - (contentWidth + offset)) + \"px\"\n\t\t}\n\n\t\t// LEFT/RIGHT FOR TOP/BOTTOM\n\t\tif (this.position === TooltipPosition.TOP || this.position === TooltipPosition.BOTTOM) {\n\t\t\tif (contentWidth > trgWidth) {\n\t\t\t\tlet leftPosition = (triggerPos.left - ((contentWidth - trgWidth) / 2));\n\t\t\t\tconst isNotLeftSpace = leftPosition < 0;\n\t\t\t\tconst isNotRightSpace = (leftPosition + contentWidth) > windowWidth;\n\t\t\t\tif (isNotLeftSpace && isNotRightSpace) {\n\t\t\t\t\tthis.tooltipContent.style.width = \"auto\";\n\t\t\t\t\tthis.tooltipContent.style.left = offset + \"px\";\n\t\t\t\t\tthis.tooltipContent.style.right = offset + \"px\";\n\t\t\t\t} else {\n\t\t\t\t\tif (isNotLeftSpace) {\n\t\t\t\t\t\tleftPosition = offset\n\t\t\t\t\t}\n\t\t\t\t\tif (isNotRightSpace) {\n\t\t\t\t\t\tleftPosition = leftPosition - ((windowWidth - (leftPosition + contentWidth + offset)) * -1)\n\t\t\t\t\t}\n\t\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst leftPosition = (triggerPos.left + ((trgWidth - contentWidth) / 2))\n\n\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.TOP) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - (contentHeight + offset)) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.BOTTOM) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.BOTTOM)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top + (trgHeight + offset)) + \"px\"\n\t\t}\n\n\t\tthis.tooltipContent.style.opacity = '1'\n\n\t}\n\n\tprivate showTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.style.opacity = '0'\n\t\t\tthis.tooltipContent.hidden = false\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"true\")\n\t\t\ttick(() => {\n\t\t\t\tthis.verifyPositionSpace()\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate hideTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"false\")\n\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"false\")\n\t\t\tthis.tooltipContent.removeAttribute('style')\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\t<span role={'button'}\n\t\t\t\t\t\t\ttabindex={0}\n\t\t\t\t\t\t\tonKeyPress={() => this.showTooltip()}\n\t\t\t\t\t\t\tonBlur={() => {\n\t\t\t\t\t\t\t\tif (this.persist === false) {\n\t\t\t\t\t\t\t\t\tthis.hideTooltip()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\taria-describedby={this.identifier ?? this.tooltipContentId}><slot/></span>\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"],"mappings":"8SAsBaA,EAAUC,EAAA,MAAAD,UAAAE,EAKtB,WAAAC,G,8BAHiBC,KAAAC,iBAAmBC,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AKkD,a,GAEN,oBACiBV,EAAAxC,KAAKyC,cAAU,MAAAD,SAAA,EAAAA,EAAIxC,KAAKC,kBAAkBO,EAAA,QAAAqF,IAAA,8C,CASlE,UAAMQ,GACLrG,KAAKiD,a,CAON,UAAMqD,GACLtG,KAAKgD,QAAU,MACfhD,KAAKkD,a","ignoreList":[]}
1
+ {"version":3,"names":["GovTooltip","proxyCustomElement","H","constructor","this","tooltipContentId","undefined","tooltipId","TooltipColors","PRIMARY","TooltipSize","_M","h","govHost","host","createID","validateColor","newValue","validateProp","TooltipClass","root","validateSize","validatePosition","TooltipPosition","rerenderMessage","createContentWrapper","connectedCallback","registerListeners","componentWillLoad","color","size","position","componentDidUpdate","disconnectedCallback","removeContent","tooltipContent","message","innerHTML","insideContent","content","documentNode","createElement","TooltipContentClass","setAttribute","_a","identifier","body","appendChild","querySelector","addEventListener","e","preventDefault","persist","showTooltip","hideTooltip","verifyPositionSpace","offset","windowWidth","window","innerWidth","document","documentElement","clientWidth","trigger","getBoundingClientRect","trgWidth","offsetWidth","trgHeight","offsetHeight","contentWidth","contentHeight","triggerPos","left","scrollLeft","top","scrollTop","isRightSpace","width","isLeftSpace","LEFT","RIGHT","style","TOP","BOTTOM","leftPosition","isNotLeftSpace","isNotRightSpace","right","opacity","hidden","tick","removeAttribute","contentEl","getElementById","remove","render","Host","key","id","class","classes","role","tabindex","onKeyPress","onBlur","show","hide"],"sources":["../../../packages/core/src/components/gov-tooltip/gov-tooltip.tsx"],"sourcesContent":["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\tTooltipColors,\n\tTooltipColorType,\n} from \"./constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {documentNode} from \"../../helpers/Dom/win\";\nimport {Nullable} from \"../../utils/helpers.types\";\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: \"gov-tooltip\",\n})\nexport class GovTooltip {\n\tprivate h: GovHost\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 color?: TooltipColorType = TooltipColors.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({mutable: true}) 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({reflect: true}) readonly icon: boolean = undefined\n\n\t@State() persist = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TooltipColors, 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\t@Watch(\"message\")\n\trerenderMessage(): void {\n\t\tthis.createContentWrapper();\n\t}\n\n\tconnectedCallback() {\n\t\tthis.createContentWrapper()\n\t\tthis.registerListeners()\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\n\t\tthis.validatePosition(this.position)\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.createContentWrapper()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.removeContent()\n\t}\n\n\tprivate createContentWrapper() {\n\t\tif (this.tooltipContent) {\n\t\t\tif (this.message) {\n\t\t\t\tthis.tooltipContent.innerHTML = this.message\n\t\t\t} else if (this.insideContent) {\n\t\t\t\tthis.tooltipContent.innerHTML = this.insideContent.innerHTML\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tlet content: HTMLGovTooltipContentElement;\n\t\tif (this.insideContent) {\n\t\t\tcontent = this.insideContent\n\t\t} else {\n\t\t\tcontent = documentNode().createElement(TooltipContentClass.root) as HTMLGovTooltipContentElement\n\t\t\tcontent.innerHTML = this.message\n\t\t}\n\n\t\tcontent.setAttribute(\"id\", this.identifier ?? this.tooltipContentId)\n\t\tcontent.setAttribute(\"parent-id\", this.tooltipId)\n\t\tcontent.setAttribute(\"color\", this.color)\n\t\tcontent.setAttribute(\"size\", this.size)\n\t\tdocumentNode().body.appendChild(content)\n\t}\n\n\tprivate get tooltipContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn documentNode().body.querySelector(`#${this.identifier ?? this.tooltipContentId}`);\n\t}\n\n\tprivate get insideContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn this.host.querySelector(TooltipContentClass.root)\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\tif (this.tooltipContent) {\n\t\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"true\")\n\t\t\t}\n\t\t\tthis.showTooltip()\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 windowWidth = window.innerWidth - (window.innerWidth - document.documentElement.clientWidth);\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.tooltipContent.offsetWidth\n\t\tconst contentHeight = this.tooltipContent.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\n\t\tconst isRightSpace = ((triggerPos.left + offset + trigger.width) + contentWidth) <= windowWidth;\n\t\tconst isLeftSpace = triggerPos.left > contentWidth;\n\n\t\t// LEFT/RIGHT\n\t\tif (this.position === TooltipPosition.LEFT || this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - ((contentHeight - trgHeight) / 2)) + \"px\";\n\t\t\tif (isRightSpace === false && isLeftSpace === false) {\n\t\t\t\tthis.position = TooltipPosition.TOP\n\t\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\t}\n\t\t\tif (isLeftSpace && isRightSpace === false && this.position === TooltipPosition.RIGHT) {\n\t\t\t\tthis.position = TooltipPosition.LEFT\n\t\t\t}\n\t\t\tif (isRightSpace && isLeftSpace === false && this.position === TooltipPosition.LEFT) {\n\t\t\t\tthis.position = TooltipPosition.RIGHT\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.RIGHT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left + offset + trigger.width) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.LEFT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.LEFT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left - (contentWidth + offset)) + \"px\"\n\t\t}\n\n\t\t// LEFT/RIGHT FOR TOP/BOTTOM\n\t\tif (this.position === TooltipPosition.TOP || this.position === TooltipPosition.BOTTOM) {\n\t\t\tif (contentWidth > trgWidth) {\n\t\t\t\tlet leftPosition = (triggerPos.left - ((contentWidth - trgWidth) / 2));\n\t\t\t\tconst isNotLeftSpace = leftPosition < 0;\n\t\t\t\tconst isNotRightSpace = (leftPosition + contentWidth) > windowWidth;\n\t\t\t\tif (isNotLeftSpace && isNotRightSpace) {\n\t\t\t\t\tthis.tooltipContent.style.width = \"auto\";\n\t\t\t\t\tthis.tooltipContent.style.left = offset + \"px\";\n\t\t\t\t\tthis.tooltipContent.style.right = offset + \"px\";\n\t\t\t\t} else {\n\t\t\t\t\tif (isNotLeftSpace) {\n\t\t\t\t\t\tleftPosition = offset\n\t\t\t\t\t}\n\t\t\t\t\tif (isNotRightSpace) {\n\t\t\t\t\t\tleftPosition = leftPosition - ((windowWidth - (leftPosition + contentWidth + offset)) * -1)\n\t\t\t\t\t}\n\t\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst leftPosition = (triggerPos.left + ((trgWidth - contentWidth) / 2))\n\n\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.TOP) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - (contentHeight + offset)) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.BOTTOM) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.BOTTOM)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top + (trgHeight + offset)) + \"px\"\n\t\t}\n\n\t\tthis.tooltipContent.style.opacity = '1'\n\n\t}\n\n\tprivate showTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.style.opacity = '0'\n\t\t\tthis.tooltipContent.hidden = false\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"true\")\n\t\t\ttick(() => {\n\t\t\t\tthis.verifyPositionSpace()\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate hideTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"false\")\n\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"false\")\n\t\t\tthis.tooltipContent.removeAttribute('style')\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\t<span role={'button'}\n\t\t\t\t\t\t\ttabindex={0}\n\t\t\t\t\t\t\tonKeyPress={() => this.showTooltip()}\n\t\t\t\t\t\t\tonBlur={() => {\n\t\t\t\t\t\t\t\tif (this.persist === false) {\n\t\t\t\t\t\t\t\t\tthis.hideTooltip()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\taria-describedby={this.identifier ?? this.tooltipContentId}><slot/></span>\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"],"mappings":"mTAsBaA,EAAUC,EAAA,MAAAD,UAAAE,EAKtB,WAAAC,G,8BAHiBC,KAAAC,iBAAmBC,UACnBF,KAAAG,UAAYD,U,WAYeE,EAAcC,Q,UAIhBC,EAAYC,G,cAIC,Q,aAIpBL,U,oCAQaA,U,aAE7B,MA/Bl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,IAAA,8C,CASlE,UAAMQ,GACLrG,KAAKiD,a,CAON,UAAMqD,GACLtG,KAAKgD,QAAU,MACfhD,KAAKkD,a","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as s,H as t,c as i,h as e,d as a}from"./p-115b9cf3.js";import{v as o}from"./p-0b3574c2.js";import{W as n,c}from"./p-c61a5830.js";import{c as d}from"./p-cd6c2938.js";import{g as h,b as l,t as r}from"./p-ea7fdd2e.js";import{d as f}from"./p-95bd5f39.js";var m;(function(s){s["DIV"]="div";s["BUTTON"]="button"})(m||(m={}));const p=s(class s extends t{constructor(){super();this.__registerHost();this.govChange=i(this,"gov-change",7);this.hydrated=false;this.color="primary";this.size="m";this.identifier=undefined;this.collapsible=false;this.disabled=false;this.isExpanded=false;this.h=h(this.host);this.triggerId=d("GovWizardItem");this.contentId=d("GovWizardContent")}validateColor(s){o(c,s,n.root)}emmitChange(){this.govChange.emit({expanded:this.isExpanded,component:n.root})}componentWillLoad(){this.validateColor(this.color)}connectedCallback(){this.hydrated=true}render(){const s=this.identifier||this.triggerId;const t=this.collapsible?m.BUTTON:m.DIV;const i=this.h.hasSlot("prefix")&&e("span",{key:"abdd15cfa834f393b29335ea2bda28cd1dfeef46",class:n.prefix},e("slot",{key:"123c495809091879ab3d985b9bcb4a22005e4b75",name:"prefix"}));return e(a,{key:"463384ea408a20992bf6f30f142fce7146fabf53",class:this.h.classes(n.root),"is-expanded":this.isExpanded,color:this.color,size:this.size,role:"listitem",collapsible:this.collapsible,hydrated:this.hydrated},e("div",{key:"0b60621607cd8c48fe05fd1755f9f7b8514d425d",class:n.header},i,this.collapsible?e(t,{id:s,class:this.h.classes(n.label),"aria-expanded":l(this.isExpanded),"aria-controls":this.contentId,disabled:this.disabled,"aria-disabled":r(this.disabled),onClick:s=>{s.preventDefault();s.stopPropagation();this.toggle()}},e("span",{class:n.headline},e("slot",{name:"headline"}),this.collapsible&&e("gov-icon",{class:n.chevron,name:"chevron-down",type:"components"})),e("slot",{name:"annotation"})):e(t,{class:this.h.classes(n.label)},e("span",{class:n.headline},e("slot",{name:"headline"}),this.collapsible&&e("gov-icon",{class:n.chevron,name:"chevron-down",type:"components"})),e("slot",{name:"annotation"}))),this.collapsible?e("div",{class:n.content,id:this.contentId,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded,"aria-labelledby":s},e("slot",null)):e("div",{class:n.content,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded},e("slot",null)))}async open(){this.isExpanded=true;this.emmitChange()}async close(){this.isExpanded=false;this.emmitChange()}async toggle(){this.isExpanded=!this.isExpanded;this.emmitChange()}async currentState(){return this.isExpanded}get host(){return this}static get watchers(){return{color:["validateColor"]}}},[4,"gov-wizard-item",{color:[1],size:[1],identifier:[1],collapsible:[4],disabled:[4],isExpanded:[1028,"is-expanded"],open:[64],close:[64],toggle:[64],currentState:[64]},undefined,{color:["validateColor"]}]);function b(){if(typeof customElements==="undefined"){return}const s=["gov-wizard-item","gov-icon"];s.forEach((s=>{switch(s){case"gov-wizard-item":if(!customElements.get(s)){customElements.define(s,p)}break;case"gov-icon":if(!customElements.get(s)){f()}break}}))}b();const u=p;const v=b;export{u as GovWizardItem,v as defineCustomElement};
1
+ import{p as s,H as t,c as e,h as i,d as a}from"./p-42200001.js";import{v as o}from"./p-0b3574c2.js";import{W as n,c}from"./p-c61a5830.js";import{c as d}from"./p-cd6c2938.js";import{g as h,b as l,t as r}from"./p-ea7fdd2e.js";import{d as m}from"./p-3c90521b.js";var p;(function(s){s["DIV"]="div";s["BUTTON"]="button"})(p||(p={}));const f=s(class s extends t{constructor(){super();this.__registerHost();this.govChange=e(this,"gov-change",7);this.hydrated=false;this.color="primary";this.size="m";this.identifier=undefined;this.collapsible=false;this.disabled=false;this.isExpanded=false;this.h=h(this.host);this.triggerId=d("GovWizardItem");this.contentId=d("GovWizardContent")}validateColor(s){o(c,s,n.root)}emmitChange(){this.govChange.emit({expanded:this.isExpanded,component:n.root})}componentWillLoad(){this.validateColor(this.color)}connectedCallback(){this.hydrated=true}render(){const s=this.identifier||this.triggerId;const t=this.collapsible?p.BUTTON:p.DIV;const e=this.h.hasSlot("prefix")&&i("span",{key:"3557f69ef4f08fa89200283444c12b36051ef5cd",class:n.prefix},i("slot",{key:"0847a8d5c4dbb458d712162842dc06ebb643ded4",name:"prefix"}));return i(a,{key:"df368a1f27a0ed3b6cd0291cd8aeed3defbccdb8",class:this.h.classes(n.root),"is-expanded":this.isExpanded,color:this.color,size:this.size,role:"listitem",collapsible:this.collapsible,hydrated:this.hydrated},i("div",{key:"72e83e2b44b458055a82e874e47078197e797db9",class:n.header},e,this.collapsible?i(t,{id:s,class:this.h.classes(n.label),"aria-expanded":l(this.isExpanded),"aria-controls":this.contentId,disabled:this.disabled,"aria-disabled":r(this.disabled),onClick:s=>{s.preventDefault();s.stopPropagation();this.toggle()}},i("span",{class:n.headline},i("slot",{name:"headline"}),this.collapsible&&i("gov-icon",{class:n.chevron,name:"chevron-down",type:"components"})),i("slot",{name:"annotation"})):i(t,{class:this.h.classes(n.label)},i("span",{class:n.headline},i("slot",{name:"headline"}),this.collapsible&&i("gov-icon",{class:n.chevron,name:"chevron-down",type:"components"})),i("slot",{name:"annotation"}))),this.collapsible?i("div",{class:n.content,id:this.contentId,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded,"aria-labelledby":s},i("slot",null)):i("div",{class:n.content,"aria-hidden":l(!this.isExpanded),hidden:!this.isExpanded},i("slot",null)))}async open(){this.isExpanded=true;this.emmitChange()}async close(){this.isExpanded=false;this.emmitChange()}async toggle(){this.isExpanded=!this.isExpanded;this.emmitChange()}async currentState(){return this.isExpanded}get host(){return this}static get watchers(){return{color:["validateColor"]}}},[4,"gov-wizard-item",{color:[1],size:[1],identifier:[1],collapsible:[4],disabled:[4],isExpanded:[1028,"is-expanded"],open:[64],close:[64],toggle:[64],currentState:[64]},undefined,{color:["validateColor"]}]);function b(){if(typeof customElements==="undefined"){return}const s=["gov-wizard-item","gov-icon"];s.forEach((s=>{switch(s){case"gov-wizard-item":if(!customElements.get(s)){customElements.define(s,f)}break;case"gov-icon":if(!customElements.get(s)){m()}break}}))}b();const u=f;const v=b;export{u as GovWizardItem,v as defineCustomElement};
2
2
  //# sourceMappingURL=gov-wizard-item.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as s,c as t,h as a,d as i}from"./p-115b9cf3.js";import{v as c}from"./p-0b3574c2.js";import{W as o,a as d,b as r}from"./p-c61a5830.js";import{g as n}from"./p-ea7fdd2e.js";import{a as h}from"./p-80dad64b.js";import{c as l}from"./p-e8ec030e.js";import{d as m}from"./p-e0e2e9c1.js";const f=e(class e extends s{constructor(){super();this.__registerHost();this.govChange=t(this,"gov-change",7);this.hydrated=false;this.size="m";this.wcagLabel=undefined;this.wcagLabelledBy=undefined;this.h=n(this.host)}validateSize(e){c(r,e,d.root)}componentWillLoad(){this.validateSize(this.size)}componentDidLoad(){this.host.querySelectorAll(o.root).forEach((e=>{e.setAttribute("size",this.size)}))}async componentDidRender(){if(l()){await m(500);await this.validateWcag()}}connectedCallback(){this.hydrated=true}render(){return a(i,{key:"d75ce2d5499cef41ac6b316f313b0c5c446d0b55",class:this.h.classes(d.root),role:"list",size:this.size,hydrated:this.hydrated},a("slot",{key:"ea151639d058fa4e50427a893fa167969a453d39"}))}async validateWcag(){h(this.wcagLabel,this.wcagLabelledBy,d.root)}get host(){return this}static get watchers(){return{size:["validateSize"]}}},[4,"gov-wizard",{size:[1],wcagLabel:[1,"wcag-label"],wcagLabelledBy:[1,"wcag-labelled-by"],validateWcag:[64]},undefined,{size:["validateSize"]}]);function p(){if(typeof customElements==="undefined"){return}const e=["gov-wizard"];e.forEach((e=>{switch(e){case"gov-wizard":if(!customElements.get(e)){customElements.define(e,f)}break}}))}p();const u=f;const b=p;export{u as GovWizard,b as defineCustomElement};
1
+ import{p as e,H as s,c as t,h as a,d as i}from"./p-42200001.js";import{v as c}from"./p-0b3574c2.js";import{W as o,a as d,b as r}from"./p-c61a5830.js";import{g as n}from"./p-ea7fdd2e.js";import{a as h}from"./p-80dad64b.js";import{c as l}from"./p-e8ec030e.js";import{d as f}from"./p-e0e2e9c1.js";const m=e(class e extends s{constructor(){super();this.__registerHost();this.govChange=t(this,"gov-change",7);this.hydrated=false;this.size="m";this.wcagLabel=undefined;this.wcagLabelledBy=undefined;this.h=n(this.host)}validateSize(e){c(r,e,d.root)}componentWillLoad(){this.validateSize(this.size)}componentDidLoad(){this.host.querySelectorAll(o.root).forEach((e=>{e.setAttribute("size",this.size)}))}async componentDidRender(){if(l()){await f(500);await this.validateWcag()}}connectedCallback(){this.hydrated=true}render(){return a(i,{key:"1b9c171c02a8fc7526742f8270bc6459dd717621",class:this.h.classes(d.root),role:"list",size:this.size,hydrated:this.hydrated},a("slot",{key:"b2f89e63d7572f9e0df90a326f8cb50598dca1cb"}))}async validateWcag(){h(this.wcagLabel,this.wcagLabelledBy,d.root)}get host(){return this}static get watchers(){return{size:["validateSize"]}}},[4,"gov-wizard",{size:[1],wcagLabel:[1,"wcag-label"],wcagLabelledBy:[1,"wcag-labelled-by"],validateWcag:[64]},undefined,{size:["validateSize"]}]);function p(){if(typeof customElements==="undefined"){return}const e=["gov-wizard"];e.forEach((e=>{switch(e){case"gov-wizard":if(!customElements.get(e)){customElements.define(e,m)}break}}))}p();const b=m;const u=p;export{b as GovWizard,u as defineCustomElement};
2
2
  //# sourceMappingURL=gov-wizard.js.map
@@ -1,2 +1,2 @@
1
- export{g as getAssetPath,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-115b9cf3.js";
1
+ export{g as getAssetPath,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-42200001.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ import{p as t,H as s,c as e,h as i,d as a}from"./p-42200001.js";import{g as o,l as n,m as c}from"./p-9908b9f0.js";import{g as h,c as d,t as r}from"./p-ea7fdd2e.js";import{v as l}from"./p-0b3574c2.js";import{c as u}from"./p-cd6c2938.js";import{p as f}from"./p-ded281e6.js";import{t as m}from"./p-26618322.js";import{A as p,a as v,i as b}from"./p-33d5d1ed.js";import{d as g}from"./p-3c90521b.js";const w=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=e(this,"gov-focus",7);this.govBlur=e(this,"gov-blur",7);this.govChange=e(this,"gov-change",7);this.value=undefined;this.options=undefined;this.identifier=undefined;this.size="m";this.name=undefined;this.required=false;this.success=undefined;this.disabled=false;this.invalid=undefined;this.focused=undefined;this.optionsState=[];this.inheritedAttributes={};this.h=h(this.host);this.f=o(this.h);this.selectId=u("GovSelect")}validateSize(t){l(c,t,n.root)}watchOptions(t){this.optionsState=f(t)}watchControlAttrs(){this.passControlAttrs()}watchValue(){this.markSelectedValue()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",d(this.invalid));this.f.passAttrToControl("success",d(this.success));this.f.passAttrToControl("disabled",d(this.disabled));this.f.passAttrToControl("type","select")}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(v)}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}componentWillLoad(){this.validateSize(this.size);this.markSelectedValue();this.optionsState=f(this.options);this.inheritedAttributes=b(this.host)}async componentDidRender(){this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required));m((()=>this.markSelectedValue()))}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}markSelectedValue(){this.host.querySelectorAll("option").forEach((t=>{if(t.value===this.value){t.setAttribute("selected","selected")}else{t.removeAttribute("selected")}}))}render(){return i(a,{key:"4273e7ee3d753e85da24fb9902f8943bc6ce958a",class:n.root,size:this.size},this.h.hasSlot("prefix")&&i("slot",{key:"1d3da6186b0c3860ea253282386a327f10717d67",name:"prefix"}),i("span",{key:"3a202fd20029deaa2757886cc8657355948c01a5",class:"element"},i("select",Object.assign({key:"96804aaaa39be0d91160547ceeb9dde8246cdde6",id:this.identifier||this.selectId,onFocus:this.onFocusHandler.bind(this),onChange:this.onChangeHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,name:this.name,disabled:this.disabled,ref:t=>this.selectRef=t},this.inheritedAttributes,{"aria-disabled":r(this.disabled),"aria-required":r(this.required),"aria-invalid":r(this.invalid)}),i("slot",{key:"e16cf3fc5c639387be6a1b855a9481d91fdcae20"}),Array.isArray(this.optionsState)&&this.optionsState.map((t=>{var s;return i("option",{value:t.value,selected:t.value===this.value,disabled:t===null||t===void 0?void 0:t.disabled},(s=t.label)!==null&&s!==void 0?s:t.value)}))),this.success&&i("gov-icon",{key:"9f8ef18d02c3ecdf5b6db8c337aadd976de35694",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&i("gov-icon",{key:"6c08e6df7892ab26493d90be19ad7d7bf3370d8d",class:"validation-icon",name:"exclamation-lg",type:"components"}),i("gov-icon",{key:"54eae87e6c99c56a2c553db77567fdadc7eb25e5",class:"arrow-icon",name:"chevron-down",type:"components"})),this.h.hasSlot("sufix")&&i("slot",{key:"7657a8a108e9239ed697e7323d895fafd29cf19c",name:"sufix"}))}onFocusHandler(t){this.focused=true;this.govFocus.emit({component:n.root,originalEvent:t,value:this.value})}onBlurHandler(t){this.focused=false;this.govBlur.emit({component:n.root,originalEvent:t,value:this.value})}onChangeHandler(t){this.value=t.target.value;t.stopPropagation();this.govChange.emit({component:n.root,originalEvent:t,value:this.value})}async setFocus(t){return this.selectRef.focus(t)}async getRef(){return this.selectRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],options:["watchOptions"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"],value:["watchValue"]}}},[4,"gov-form-select",{value:[1537],options:[1537],identifier:[1],size:[1],name:[1],required:[4],success:[516],disabled:[516],invalid:[4],focused:[32],optionsState:[32],inheritedAttributes:[32],setFocus:[64],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],options:["watchOptions"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"],value:["watchValue"]}]);function y(){if(typeof customElements==="undefined"){return}const t=["gov-form-select","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-select":if(!customElements.get(t)){customElements.define(t,w)}break;case"gov-icon":if(!customElements.get(t)){g()}break}}))}y();export{w as G,y as d};
2
+ //# sourceMappingURL=p-0327a469.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GovFormSelect","proxyCustomElement","H","constructor","this","h","govHost","host","f","govForm","selectId","createID","validateSize","newValue","validateProp","FormSelectSizes","FormSelectClass","root","watchOptions","optionsState","propsValueToArray","watchControlAttrs","passControlAttrs","watchValue","markSelectedValue","passAttrToControl","size","toBoolAttr","invalid","success","disabled","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","disconnectedCallback","_a","stopObserving","componentWillLoad","options","inheritedAttributes","inheritAriaAttributes","componentDidRender","passAttrToLabel","String","required","tick","removeAttribute","Object","assign","querySelectorAll","forEach","option","value","setAttribute","render","Host","key","class","hasSlot","name","id","identifier","onFocus","onFocusHandler","bind","onChange","onChangeHandler","onBlur","onBlurHandler","ref","el","selectRef","toBoolAttrIfDefined","Array","isArray","map","selected","label","type","e","focused","govFocus","emit","component","originalEvent","govBlur","target","stopPropagation","govChange","setFocus","focus","getRef"],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {govForm} from '../../../helpers/Dom/form'\nimport {GovForm} from '../../../helpers/Dom/form.types'\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from '../../../helpers/Dom/template'\nimport {GovHost} from '../../../helpers/Dom/template.types'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {createID} from '../../../utils/string.utils'\nimport {FormSelectClass, FormSelectSizes, FormSelectSizesType,} from './constants'\nimport {FormSelectEvent, FormSelectOption} from './gov-form-select.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {tick} from \"../../../utils/stencil.utils\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-form-select',\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\tprivate attributeObserver: AttributeObserver\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID('GovSelect')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Options of select\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | FormSelectOption[]\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop({reflect: true}) readonly success: boolean\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\t@State() optionsState: FormSelectOption[] = []\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | FormSelectOption[]): void {\n\t\tthis.optionsState = propsValueToArray(newValue)\n\t}\n\n\t@Watch('disabled')\n\t@Watch('invalid')\n\t@Watch('success')\n\t@Watch('size')\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch('value')\n\twatchValue(): void {\n\t\tthis.markSelectedValue()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl('size', this.size)\n\t\tthis.f.passAttrToControl('invalid', toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('success', toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl('disabled', toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl('type', 'select')\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\n\t\tthis.markSelectedValue()\n\n\t\tthis.optionsState = propsValueToArray(this.options)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t\ttick(() => this.markSelectedValue())\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tprivate markSelectedValue() {\n\t\tthis.host.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.value === this.value) {\n\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t} else {\n\t\t\t\toption.removeAttribute('selected')\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size}>\n\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t{Array.isArray(this.optionsState) && this.optionsState.map((option) => {\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={option.value === this.value}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={option?.disabled}>{option.label ?? option.value}</option>)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</select>\n\t\t\t\t\t{this.success && <gov-icon class=\"validation-icon\" name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t{this.invalid && <gov-icon class=\"validation-icon\" name=\"exclamation-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t<gov-icon class=\"arrow-icon\" name=\"chevron-down\" type=\"components\"></gov-icon>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectElement> {\n\t\treturn this.selectRef\n\t}\n}\n"],"mappings":"gZAkBaA,EAAaC,EAAA,MAAAD,UAAAE,EAQzB,WAAAC,G,0NAsB8C,I,kCAST,M,qCASe,M,gEAkBR,G,yBAyBD,GAlF1CC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,EAAIC,EAAQL,KAAKC,GACtBD,KAAKM,SAAWC,EAAS,Y,CA0D1B,Y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7E,EAAA,YAAAuD,IAAA,2CAAUC,MAAM,aAAaE,KAAK,eAAemB,KAAK,gBAEtD9E,KAAKC,EAAEyD,QAAQ,UAAYzD,EAAA,QAAAuD,IAAA,2CAAMG,KAAK,U,CAKlC,cAAAI,CAAegB,GACtB/E,KAAKgF,QAAU,KACfhF,KAAKiF,SAASC,KAAK,CAClBC,UAAWvE,EAAgBC,KAC3BuE,cAAeL,EACf3B,MAAOpD,KAAKoD,O,CAIN,aAAAgB,CAAcW,GACrB/E,KAAKgF,QAAU,MACfhF,KAAKqF,QAAQH,KAAK,CACjBC,UAAWvE,EAAgBC,KAC3BuE,cAAeL,EACf3B,MAAOpD,KAAKoD,O,CAIN,eAAAc,CAAgBa,GACvB/E,KAAKoD,MAAS2B,EAAEO,OAA6BlC,MAC7C2B,EAAEQ,kBACFvF,KAAKwF,UAAUN,KAAK,CACnBC,UAAWvE,EAAgBC,KAC3BuE,cAAeL,EACf3B,MAAOpD,KAAKoD,O,CAQd,cAAMqC,CAASnD,GACd,OAAOtC,KAAKuE,UAAUmB,MAAMpD,E,CAO7B,YAAMqD,GACL,OAAO3F,KAAKuE,S","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{C as e}from"./p-5aad3497.js";import{S as t}from"./p-92f420cb.js";import{p}from"./p-e0e2e9c1.js";const o=p(e,["PRIMARY","NEUTRAL","ERROR","SUCCESS","WARNING"]);const s=p(t,["_S","_M","_L"]);const r={root:"gov-stepper"};const a={root:"gov-stepper-item",header:"gov-stepper-item__header",label:"gov-stepper-item__label",steps:"gov-stepper-item__steps",prefix:"gov-stepper-item__prefix",main:"gov-stepper-item__main",headline:"gov-stepper-item__headline",annotation:"gov-stepper-item__annotation",content:"gov-stepper-item__content"};export{a as S,r as a,s as b,o as c};
2
+ //# sourceMappingURL=p-2ca5423c.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StepperColors","pick","Colors","StepperSizes","Sizes","StepperClass","root","StepperItemClass","header","label","steps","prefix","main","headline","annotation","content"],"sources":["../../../packages/core/src/components/gov-stepper/constants.ts"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { Sizes } from '../../core/constants/sizes'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const StepperColors = pick(Colors, ['PRIMARY', 'NEUTRAL', 'ERROR', 'SUCCESS', 'WARNING'])\nexport type StepperColorType = `${ValueOf<typeof StepperColors>}`\n\nexport const StepperSizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type StepperSizesType = `${ValueOf<typeof StepperSizes>}`\n\nexport const StepperClass = {\n\troot: 'gov-stepper',\n}\n\nexport const StepperItemClass = {\n\troot: 'gov-stepper-item',\n\theader: 'gov-stepper-item__header',\n\tlabel: 'gov-stepper-item__label',\n\tsteps: 'gov-stepper-item__steps',\n\tprefix: 'gov-stepper-item__prefix',\n\tmain: 'gov-stepper-item__main',\n\theadline: 'gov-stepper-item__headline',\n\tannotation: 'gov-stepper-item__annotation',\n\tcontent: 'gov-stepper-item__content',\n}\n"],"mappings":"6GAKaA,EAAgBC,EAAKC,EAAQ,CAAC,UAAW,UAAW,QAAS,UAAW,Y,MAGxEC,EAAeF,EAAKG,EAAO,CAAC,KAAM,KAAM,O,MAGxCC,EAAe,CAC3BC,KAAM,e,MAGMC,EAAmB,CAC/BD,KAAM,mBACNE,OAAQ,2BACRC,MAAO,0BACPC,MAAO,0BACPC,OAAQ,2BACRC,KAAM,yBACNC,SAAU,6BACVC,WAAY,+BACZC,QAAS,oC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{p as t,H as s,c as i,h as e,d as h}from"./p-42200001.js";import{c as o,b as n}from"./p-ea7fdd2e.js";import{v as a}from"./p-0b3574c2.js";import{c as l}from"./p-cd6c2938.js";import{d as r,t as c,h as d}from"./p-e0e2e9c1.js";import{F as u,a as f}from"./p-9908b9f0.js";import{p as m}from"./p-ded281e6.js";import{A as p,a as v,i as g}from"./p-33d5d1ed.js";import{d as b}from"./p-4fba9df0.js";import{d as y}from"./p-3fead64a.js";import{d as k}from"./p-3c90521b.js";import{d as w}from"./p-b533871a.js";const j=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.govSelect=i(this,"gov-select",7);this.templateResolver=t=>t[this.nameKey];this.value="";this.options=undefined;this.identifier=undefined;this.success=undefined;this.size="m";this.nameKey="name";this.name=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.invalid=undefined;this.minlength=3;this.maxlength=undefined;this.throttleTime=200;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.focused=undefined;this.processing=false;this.arrowCounter=-1;this.list=[];this.inheritedAttributes={};this.listBoxId=l("GovListBox")}validateSize(t){a(f,t,u.root)}watchOptions(t){this.setOptions(m(t)).catch()}onArrowUp(){if(this.arrowCounter>0){this.arrowCounter=this.arrowCounter-1;this.moveToView().finally()}}onArrowDown(){if(this.arrowCounter<this.list.length-1){this.arrowCounter=this.arrowCounter+1;this.moveToView().finally()}}async moveToView(){await r(200);const t=this.listRef.offsetHeight;const s=this.listRef.querySelector('li[aria-selected="true"]');if(s&&t){const t=s.offsetTop;this.listRef.scrollTo({top:t,behavior:"smooth"})}}doSearch(){if(Number.isInteger(this.minlength)&&this.isValueAccepted===false&&this.minlength){this.list=[];this.arrowCounter=-1;this.processing=false;return}if(this.searchCallback){this.processing=true;this.searchCallback(this.value).then((t=>this.list=t)).catch((()=>this.list=[])).finally((()=>{this.arrowCounter=-1;this.processing=false}))}}clearList(){const t=m(this.options);if(t.length===0){this.list=[]}}get isValueAccepted(){if(typeof this.value==="string"){return this.value.length>=this.minlength}else{return false}}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(v)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=g(this.host)}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){return e(h,{key:"9aab109be9dc6f21e88a2da79223866b1b39732a",class:u.root,size:this.size},e("gov-form-input",Object.assign({key:"62828ff7629c39a283925c24113f0db2c7558ca5",placeholder:this.placeholder,name:this.name,disabled:this.disabled,readonly:this.readonly,autocomplete:false,size:this.size,required:this.required,invalid:this.invalid,success:this.success,role:"searchbox",value:this.value,minlength:this.minlength,maxlength:this.maxlength,"on-gov-input":c(this.onInputHandler.bind(this),this.throttleTime),"on-gov-keyup":this.onKeyUpHandler.bind(this),"on-gov-keydown":this.onKeyDownHandler.bind(this),"on-gov-focus":this.onFocusHandler.bind(this),"on-gov-blur":this.onBlurHandler.bind(this)},this.inheritedAttributes,{"aria-autocomplete":"list","aria-owns":[this.listBoxId,this.inheritedAttributes["aria-owns"]].join(" "),"aria-expanded":n(this.list.length&&this.focused?true:false),ref:t=>this.inputRef=t}),e("slot",{key:"d722dd5d3241853d45a5153f0197403a42872c4a",name:"validation-icon"}),e("slot",{key:"bb003098d072de7c33cb1f538470b2ba6a79d920",name:"icon-end"})),e("ul",{key:"4d54077583a9eed5682501372cd75f655e635203",class:u.list,role:"listbox","aria-hidden":o(!this.focused),hidden:!this.focused,id:this.listBoxId,ref:t=>this.listRef=t},this.focused&&this.list.length===0&&this.processing===false&&this.isValueAccepted&&this.messageEmpty?e("li",{class:u.empty},this.messageEmpty):null,this.focused&&this.processing===true&&this.isValueAccepted?e("li",{class:u.loading},e("gov-skeleton",{size:"m"})):null,this.focused?this.list.map(((t,s)=>{const i=this.arrowCounter===s;return e("li",{class:u.item,innerHTML:this.templateResolver(t,i),role:"option","aria-posinset":s,tabindex:i?0:-1,"aria-setsize":this.list.length,onTouchStart:t=>this.onSelectHandler(t,s),onMouseDown:t=>this.onSelectHandler(t,s),"aria-selected":o(i)},e("slot",{name:"list-item-left"}),e("slot",{name:"list-item-right"}))})):null))}onFocusHandler(t){this.focused=true;this.arrowCounter=-1;if(this.isValueAccepted&&this.searchCallback){this.doSearch()}t.stopPropagation();this.govFocus.emit({originalEvent:t,component:u.root,value:this.value,selected:null})}onBlurHandler(t){this.focused=false;this.clearList();this.arrowCounter=-1;t.stopPropagation();this.govBlur.emit({originalEvent:t,component:u.root,value:this.value,selected:null})}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit({originalEvent:t,component:u.root,value:this.value,selected:null});this.doSearch()}onSelectHandler(t,s=-1){let i=null;if(s>-1){i=this.list[s]}else if(d(this.arrowCounter,this.list)){i=this.list[this.arrowCounter]}if(i){this.govSelect.emit({component:u.root,value:this.value,selected:i,originalEvent:t});this.clearList();if(d(this.nameKey,i)&&typeof i[this.nameKey]==="string"){this.value=i[this.nameKey]}}}onKeyUpHandler(t){const s=t.detail.originalEvent;t.stopPropagation();s.stopPropagation();if(s.keyCode===38)this.onArrowUp();else if(s.keyCode===40)this.onArrowDown();else if(s.keyCode===13){t.preventDefault();s.preventDefault();this.onSelectHandler(t)}}onKeyDownHandler(t){const s=t.detail.originalEvent;t.stopPropagation();s.stopPropagation();if(s.keyCode===13){t.preventDefault();s.preventDefault()}}async setFocus(t){return this.inputRef.focus(t)}async setBlur(){return this.inputRef.blur()}async setOptions(t){this.list=Array.isArray(t)?t:[];this.arrowCounter=-1}async clearValue(){this.value="";this.inputRef.value="";await this.inputRef.clearValue()}async setProcessing(t){this.processing=t}async setSearchCallback(t){this.searchCallback=t}async setTemplateResolver(t){this.templateResolver=t}get host(){return this}static get watchers(){return{size:["validateSize"],options:["watchOptions"]}}},[4,"gov-form-autocomplete",{value:[1537],options:[1537],identifier:[1],success:[4],size:[1],nameKey:[1,"name-key"],name:[1],required:[4],disabled:[516],placeholder:[1],readonly:[4],invalid:[4],minlength:[2],maxlength:[2],throttleTime:[2,"throttle-time"],messageEmpty:[1,"message-empty"],focused:[32],processing:[32],arrowCounter:[32],list:[32],inheritedAttributes:[32],setFocus:[64],setBlur:[64],setOptions:[64],clearValue:[64],setProcessing:[64],setSearchCallback:[64],setTemplateResolver:[64]},undefined,{size:["validateSize"],options:["watchOptions"]}]);function E(){if(typeof customElements==="undefined"){return}const t=["gov-form-autocomplete","gov-button","gov-form-input","gov-icon","gov-skeleton"];t.forEach((t=>{switch(t){case"gov-form-autocomplete":if(!customElements.get(t)){customElements.define(t,j)}break;case"gov-button":if(!customElements.get(t)){b()}break;case"gov-form-input":if(!customElements.get(t)){y()}break;case"gov-icon":if(!customElements.get(t)){k()}break;case"gov-skeleton":if(!customElements.get(t)){w()}break}}))}E();export{j as G,E as d};
2
+ //# sourceMappingURL=p-2fc08a71.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GovFormAutocomplete","proxyCustomElement","H","constructor","this","templateResolver","item","nameKey","listBoxId","createID","validateSize","newValue","validateProp","FormAutocompleteSizes","FormAutocompleteClass","root","watchOptions","setOptions","propsValueToArray","catch","onArrowUp","arrowCounter","moveToView","finally","onArrowDown","list","length","delay","heightOfList","listRef","offsetHeight","selected","querySelector","offsetTop","scrollTo","top","behavior","doSearch","Number","isInteger","minlength","isValueAccepted","processing","searchCallback","value","then","response","clearList","areOptions","options","componentDidLoad","attributeObserver","AttributeObserver","host","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","size","inheritedAttributes","inheritAriaAttributes","disconnectedCallback","_a","stopObserving","removeAttribute","Object","assign","render","h","Host","key","class","placeholder","name","disabled","readonly","autocomplete","required","invalid","success","role","maxlength","throttle","onInputHandler","bind","throttleTime","onKeyUpHandler","onKeyDownHandler","onFocusHandler","onBlurHandler","join","booleanString","focused","ref","el","inputRef","toBoolAttr","hidden","id","messageEmpty","empty","loading","map","index","isSelected","innerHTML","tabindex","onTouchStart","e","onSelectHandler","onMouseDown","stopPropagation","govFocus","emit","originalEvent","component","govBlur","target","govInput","has","govSelect","event","detail","keyCode","preventDefault","setFocus","focus","setBlur","blur","Array","isArray","clearValue","setProcessing","status","setSearchCallback","callback","setTemplateResolver"],"sources":["../../../packages/core/src/components/gov-form/autocomplete/gov-form-autocomplete.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {booleanString, toBoolAttr} from '../../../helpers/Dom/template'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {Nullable} from '../../../types/interfaces'\nimport {createID} from '../../../utils/string.utils'\nimport {delay, has, throttle} from '../../../utils/utils'\nimport {FormInputEvent} from '../input/gov-form-input.types'\nimport {FormAutocompleteClass, FormAutocompleteSizes, SizesType,} from './constants'\nimport {FormAutocompleteEvent, GovFormAutocompleteItem} from './gov-form-autocomplete.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: 'gov-form-autocomplete',\n})\nexport class GovFormAutocomplete {\n\tprivate inputRef?: HTMLGovFormInputElement\n\tprivate listRef?: HTMLUListElement\n\tprivate readonly listBoxId: string\n\tprivate searchCallback: (value: string) => Promise<GovFormAutocompleteItem[]>\n\tprivate templateResolver: (item: GovFormAutocompleteItem, selected: boolean) => string = item => item[this.nameKey]\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.listBoxId = createID('GovListBox')\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({reflect: true, mutable: true}) value = ''\n\t/**\n\t * Options of autocomplete\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | GovFormAutocompleteItem[]\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: SizesType = 'm'\n\t/**\n\t * Main key name in the object\n\t */\n\t@Prop({attribute: 'name-key'}) readonly nameKey: string = 'name'\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number = 3\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Input throttle in milliseconds\n\t */\n\t@Prop() readonly throttleTime: number = 200\n\t/**\n\t * Custom message for when there is a blank sheet\n\t */\n\t@Prop({attribute: 'message-empty'}) readonly messageEmpty: string = 'Nebyly nalezeny žádné výsledky'\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: 'gov-input'}) govInput: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: 'gov-select'}) govSelect: EventEmitter<FormAutocompleteEvent>\n\n\t@State() focused: boolean\n\t@State() processing = false\n\t@State() arrowCounter = -1\n\t@State() list: GovFormAutocompleteItem[] = []\n\t@State() inheritedAttributes: Attributes = {}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormAutocompleteSizes, newValue, FormAutocompleteClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | GovFormAutocompleteItem[]): void {\n\t\tthis.setOptions(propsValueToArray(newValue)).catch()\n\t}\n\n\tprivate onArrowUp() {\n\t\tif (this.arrowCounter > 0) {\n\t\t\tthis.arrowCounter = this.arrowCounter - 1\n\t\t\tthis.moveToView().finally()\n\t\t}\n\t}\n\n\tprivate onArrowDown() {\n\t\tif (this.arrowCounter < this.list.length - 1) {\n\t\t\tthis.arrowCounter = this.arrowCounter + 1\n\t\t\tthis.moveToView().finally()\n\t\t}\n\t}\n\n\tprivate async moveToView() {\n\t\tawait delay(200)\n\t\tconst heightOfList = this.listRef.offsetHeight\n\t\tconst selected = this.listRef.querySelector('li[aria-selected=\"true\"]') as HTMLUListElement\n\t\tif (selected && heightOfList) {\n\t\t\tconst offsetTop = selected.offsetTop\n\t\t\tthis.listRef.scrollTo({top: offsetTop, behavior: 'smooth'})\n\t\t}\n\t}\n\n\tprivate doSearch() {\n\t\tif (Number.isInteger(this.minlength) && this.isValueAccepted === false && this.minlength) {\n\t\t\tthis.list = []\n\t\t\tthis.arrowCounter = -1\n\t\t\tthis.processing = false\n\t\t\treturn\n\t\t}\n\t\tif (this.searchCallback) {\n\t\t\tthis.processing = true\n\t\t\tthis.searchCallback(this.value)\n\t\t\t\t.then(response => (this.list = response))\n\t\t\t\t.catch(() => (this.list = []))\n\t\t\t\t.finally(() => {\n\t\t\t\t\tthis.arrowCounter = -1\n\t\t\t\t\tthis.processing = false\n\t\t\t\t})\n\t\t}\n\t}\n\n\tprivate clearList() {\n\t\tconst areOptions = propsValueToArray<GovFormAutocompleteItem[]>(this.options)\n\t\tif (areOptions.length === 0) {\n\t\t\tthis.list = []\n\t\t}\n\t}\n\n\tget isValueAccepted() {\n\t\tif (typeof this.value === 'string') {\n\t\t\treturn this.value.length >= this.minlength\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormAutocompleteClass.root} size={this.size}>\n\t\t\t\t<gov-form-input\n\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\treadonly={this.readonly}\n\t\t\t\t\tautocomplete={false}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tinvalid={this.invalid}\n\t\t\t\t\tsuccess={this.success}\n\t\t\t\t\trole={'searchbox'}\n\t\t\t\t\tvalue={this.value}\n\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\ton-gov-input={throttle(this.onInputHandler.bind(this), this.throttleTime)}\n\t\t\t\t\ton-gov-keyup={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\ton-gov-keydown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\ton-gov-focus={this.onFocusHandler.bind(this)}\n\t\t\t\t\ton-gov-blur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-autocomplete={'list'}\n\t\t\t\t\taria-owns={[this.listBoxId, this.inheritedAttributes['aria-owns']].join(' ')}\n\t\t\t\t\taria-expanded={booleanString(this.list.length && this.focused ? true : false)}\n\t\t\t\t\tref={el => (this.inputRef = el as HTMLGovFormInputElement)}\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"validation-icon\" />\n\t\t\t\t\t<slot name=\"icon-end\" />\n\t\t\t\t</gov-form-input>\n\t\t\t\t<ul class={FormAutocompleteClass.list}\n\t\t\t\t\trole={'listbox'}\n\t\t\t\t\taria-hidden={toBoolAttr(!this.focused)}\n\t\t\t\t\thidden={!this.focused}\n\t\t\t\t\tid={this.listBoxId}\n\t\t\t\t\tref={el => (this.listRef = el as HTMLUListElement)}>\n\t\t\t\t\t{this.focused && this.list.length === 0 && this.processing === false && this.isValueAccepted && this.messageEmpty ? (\n\t\t\t\t\t\t<li class={FormAutocompleteClass.empty}>{this.messageEmpty}</li>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{this.focused && this.processing === true && this.isValueAccepted ? (\n\t\t\t\t\t\t<li class={FormAutocompleteClass.loading}>\n\t\t\t\t\t\t\t<gov-skeleton size=\"m\"></gov-skeleton>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{this.focused ? this.list.map((item, index) => {\n\t\t\t\t\t\tconst isSelected = this.arrowCounter === index\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\tclass={FormAutocompleteClass.item}\n\t\t\t\t\t\t\t\tinnerHTML={this.templateResolver(item, isSelected)}\n\t\t\t\t\t\t\t\trole={'option'}\n\t\t\t\t\t\t\t\taria-posinset={index}\n\t\t\t\t\t\t\t\ttabindex={isSelected ? 0 : -1}\n\t\t\t\t\t\t\t\taria-setsize={this.list.length}\n\t\t\t\t\t\t\t\tonTouchStart={(e: TouchEvent) => this.onSelectHandler(e, index)}\n\t\t\t\t\t\t\t\tonMouseDown={(e: PointerEvent) => this.onSelectHandler(e, index)}\n\t\t\t\t\t\t\t\taria-selected={toBoolAttr(isSelected)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<slot name=\"list-item-left\"/>\n\t\t\t\t\t\t\t\t<slot name=\"list-item-right\"/>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t)\n\t\t\t\t\t}) : null}\n\t\t\t\t</ul>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.arrowCounter = -1\n\t\tif (this.isValueAccepted && this.searchCallback) {\n\t\t\tthis.doSearch()\n\t\t}\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.clearList();\n\t\tthis.arrowCounter = -1\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLGovFormInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t\tthis.doSearch()\n\t}\n\n\tprivate onSelectHandler(e: PointerEvent | CustomEvent | TouchEvent, index = -1) {\n\t\tlet selected: Nullable<GovFormAutocompleteItem> = null\n\t\tif (index > -1) {\n\t\t\tselected = this.list[index]\n\t\t} else if (has(this.arrowCounter, this.list)) {\n\t\t\tselected = this.list[this.arrowCounter]\n\t\t}\n\t\tif (selected) {\n\t\t\tthis.govSelect.emit({\n\t\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\t\tvalue: this.value,\n\t\t\t\tselected: selected,\n\t\t\t\toriginalEvent: e,\n\t\t\t})\n\t\t\tthis.clearList();\n\t\t\tif (has(this.nameKey, selected) && typeof selected[this.nameKey] === 'string') {\n\t\t\t\tthis.value = selected[this.nameKey]\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate onKeyUpHandler(e: CustomEvent) {\n\t\tconst event = (e.detail as FormInputEvent).originalEvent as KeyboardEvent\n\t\te.stopPropagation()\n\t\tevent.stopPropagation()\n\t\tif (event.keyCode === 38) this.onArrowUp()\n\t\telse if (event.keyCode === 40) this.onArrowDown()\n\t\telse if (event.keyCode === 13) {\n\t\t\te.preventDefault()\n\t\t\tevent.preventDefault()\n\t\t\tthis.onSelectHandler(e)\n\t\t}\n\t}\n\n\tprivate onKeyDownHandler(e: CustomEvent) {\n\t\tconst event = (e.detail as FormInputEvent).originalEvent as KeyboardEvent\n\t\te.stopPropagation()\n\t\tevent.stopPropagation()\n\t\tif (event.keyCode === 13) {\n\t\t\te.preventDefault()\n\t\t\tevent.preventDefault()\n\t\t}\n\t}\n\n\t/**\n\t * Focus main input element\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Blur main input element\n\t */\n\t@Method()\n\tasync setBlur(): Promise<void> {\n\t\treturn this.inputRef.blur()\n\t}\n\n\t/**\n\t * Set options for list\n\t */\n\t@Method()\n\tasync setOptions(options: GovFormAutocompleteItem[]): Promise<void> {\n\t\tthis.list = Array.isArray(options) ? options : []\n\t\tthis.arrowCounter = -1\n\t}\n\n\t/**\n\t * Clears whisperer value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = ''\n\t\tthis.inputRef.value = ''\n\n\t\tawait this.inputRef.clearValue()\n\t}\n\n\t/**\n\t * Clears whisperer value\n\t */\n\t@Method()\n\tasync setProcessing(status: boolean): Promise<void> {\n\t\tthis.processing = status\n\t}\n\n\t/**\n\t * Set a custom asynchronous function for the whisperer\n\t */\n\t@Method()\n\tasync setSearchCallback(callback: (value: string) => Promise<any>) {\n\t\tthis.searchCallback = callback\n\t}\n\n\t/**\n\t * Setting a custom whisper result template\n\t * @param callback\n\t */\n\t@Method()\n\tasync setTemplateResolver(callback: (item: GovFormAutocompleteItem) => string) {\n\t\tthis.templateResolver = callback\n\t}\n}\n"],"mappings":"4fAiBaA,EAAmBC,EAAA,MAAAD,UAAAE,EAQ/B,WAAAC,G,8KAHQC,KAAAC,iBAAiFC,GAAQA,EAAKF,KAAKG,S,WAW7D,G,kFAgBV,I,aAIsB,O,kCASrB,M,cAKe,M,yFAgBf,E,2CAQG,I,kBAI4B,iC,uCAmB9C,M,mBACG,E,UACkB,G,yBACA,GA3F1CH,KAAKI,UAAYC,EAAS,a,CA8F3B,YAAAC,CAAaC,GACZC,EAAaC,EAAuBF,EAAUG,EAAsBC,K,CAIrE,YAAAC,CAAaL,GACZP,KAAKa,WAAWC,EAAkBP,IAAWQ,O,CAGtC,SAAAC,GACP,GAAIhB,KAAKiB,aAAe,EAAG,CAC1BjB,KAAKiB,aAAejB,KAAKiB,aAAe,EACxCjB,KAAKkB,aAAaC,S,EAIZ,WAAAC,GACP,GAAIpB,KAAKiB,aAAejB,KAAKqB,KAAKC,OAAS,EAAG,CAC7CtB,KAAKiB,aAAejB,KAAKiB,aAAe,EACxCjB,KAAKkB,aAAaC,S,EAIZ,gBAAMD,SACPK,EAAM,KACZ,MAAMC,EAAexB,KAAKyB,QAAQC,aAClC,MAAMC,EAAW3B,KAAKyB,QAAQG,cAAc,4BAC5C,GAAID,GAAYH,EAAc,CAC7B,MAAMK,EAAYF,EAASE,UAC3B7B,KAAKyB,QAAQK,SAAS,CAACC,IAAKF,EAAWG,SAAU,U,EAI3C,QAAAC,GACP,GAAIC,OAAOC,UAAUnC,KAAKoC,YAAcpC,KAAKqC,kBAAoB,OAASrC,KAAKoC,UAAW,CACzFpC,KAAKqB,KAAO,GACZrB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,iBAAmBmI,C","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{p as t,H as s,h as e,d as n}from"./p-42200001.js";import{p as i}from"./p-e0e2e9c1.js";import{C as o}from"./p-5aad3497.js";import{S as r}from"./p-92f420cb.js";import{i as a,a as c,b as l}from"./p-e8ec030e.js";import{g as h}from"./p-ea7fdd2e.js";import{v as u}from"./p-0b3574c2.js";i(r,["_XS","_S","_M","_L","_XL","_2XL","_3XL","_4XL","_5XL"]);const f=i(o,["DEFAULT","PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING","DISABLED","WHITE","BLACK"]);var d;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(d||(d={}));const m={root:"gov-icon",holder:"gov-icon__holder"};const p="4.2.0";const v=()=>p;const w={};const g={};const y=t=>t.startsWith("http://")||t.startsWith("https://");const C=(t,s,e)=>{if(y(t)){return`${t}/${e}/${s}.svg?v=${v()}`}return`${t}/${e}/${s}.svg`+`?v=${v()}`};async function I({name:t,type:s}){const e=s+"-"+t;if(w[e]){return w[e]}if(!g[e]){g[e]=fetch(C(a(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const n=await g[e];w[e]=n;return n}const b=(t,s,e)=>{if(!c){return}let n="";if(e){const t=new Date;t.setTime(t.getTime()+e*24*60*60*1e3);n="; expires="+t.toUTCString()}document.cookie=`${t}=${encodeURIComponent(s)}${n}; path=/`};const E=t=>{if(!c){return null}const s=t+"=";const e=document.cookie.split(";");for(let t=0;t<e.length;t++){let n=e[t].trim();if(n.startsWith(s)){return decodeURIComponent(n.substring(s.length))}}return null};const L=t=>{try{const s=new DOMParser;const e=s.parseFromString(t,"image/svg+xml");const n=e.querySelector("parsererror");if(n){return false}const i=e.documentElement;if(i.tagName.toLowerCase()!=="svg"){return false}return true}catch(t){return false}};const S=t(class t extends s{constructor(){super();this.__registerHost();this.size=undefined;this.color=undefined;this.name=null;this.type="components";this.visible=false;this.error=false;this.h=h(this.host)}validateSize(t){u(r,t,m.root)}validateColor(t){u(f,t,m.root)}async loadIconPathData(){const{name:t,visible:s}=this;if(!t||!s){return}await this.loadIcon()}connectedCallback(){if(l()){this.visible=true;this.loadIconPathData().finally()}else{this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){this.validateSize(this.size);this.validateColor(this.color);await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((s=>{s.forEach((s=>{if(s.isIntersecting){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}async loadIcon(){try{const{name:t,type:s}=this;const e=await I({name:t,type:s});const n=L(e);this.host.innerHTML=n?e:null}catch(t){this.host.innerHTML="";this.error=true}}render(){if(this.error){return null}return e(n,{class:this.h.classes(m.root),size:this.size,color:this.color})}static get assetsDirs(){return["assets"]}get host(){return this}static get watchers(){return{size:["validateSize"],color:["validateColor"],name:["loadIconPathData"]}}},[0,"gov-icon",{size:[513],color:[513],name:[513],type:[513],visible:[32],error:[32]},undefined,{size:["validateSize"],color:["validateColor"],name:["loadIconPathData"]}]);function $(){if(typeof customElements==="undefined"){return}const t=["gov-icon"];t.forEach((t=>{switch(t){case"gov-icon":if(!customElements.get(t)){customElements.define(t,S)}break}}))}$();export{S as G,$ as d,E as g,b as s};
2
+ //# sourceMappingURL=p-3c90521b.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["pick","Sizes","IconColors","Colors","Types","IconClass","root","holder","dsVersion","version","iconCache","requestCache","isExternalUrl","path","startsWith","iconUrl","name","type","async","fetchIcon","cacheKey","fetch","iconsPath","then","resp","status","text","Error","setCookie","value","days","isWindow","expires","date","Date","setTime","getTime","toUTCString","document","cookie","encodeURIComponent","getCookie","nameEQ","cookies","split","i","length","trim","decodeURIComponent","substring","isValidSVG","svgContent","parser","DOMParser","doc","parseFromString","parseError","querySelector","svgElement","documentElement","tagName","toLowerCase","error","GovIcon","proxyCustomElement","H","constructor","this","h","govHost","host","validateSize","newValue","validateProp","validateColor","loadIconPathData","visible","loadIcon","connectedCallback","iconsLazyLoad","finally","waitUntilVisible","disconnectedCallback","intersectionObserver","disconnect","componentWillLoad","size","color","callback","window","IntersectionObserver","entries","forEach","entry","isIntersecting","rootMargin","observe","data","isValid","innerHTML","e","render","Host","class","classes"],"sources":["../../../packages/core/src/components/gov-icon/constants.ts","../../../packages/core/src/utils/ds.utils.ts","../../../packages/core/src/utils/icon.utils.ts","../../../packages/core/src/helpers/Dom/document.ts","../../../packages/core/src/components/gov-icon/gov-icon.tsx"],"sourcesContent":["import { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils';\nimport { Colors } from '../../core/constants/colors';\nimport {Sizes} from \"../../core/constants/sizes\";\n\nexport const IconSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL', '_2XL', '_3XL', '_4XL', '_5XL'])\nexport type IconSizesType = `${ValueOf<typeof IconSizes>}`\n\nexport const IconColors = pick(Colors, [\n\t'DEFAULT',\n\t'PRIMARY',\n\t'SECONDARY',\n\t'NEUTRAL',\n\t'ERROR',\n\t'SUCCESS',\n\t'WARNING',\n\t'DISABLED',\n\t'WHITE',\n\t'BLACK',\n])\nexport type IconColorType = `${ValueOf<typeof IconColors>}`\n\nenum Types {\n\tBASIC = 'basic',\n\tCOMPLEX = 'complex',\n\tCOLORED = 'colored',\n}\nexport type Type = `${ValueOf<typeof Types>}`\n\nexport const IconClass = {\n\troot: 'gov-icon',\n\tholder: 'gov-icon__holder',\n}\n","import { version } from '../../package.json'\n\nexport const dsVersion = (): string => {\n\treturn version\n}\n","import {dsVersion} from \"./ds.utils\"\nimport {iconsPath} from \"../helpers/Dom/win\"\n\nconst iconCache: { [key: string]: string } = {}\nconst requestCache: { [key: string]: Promise<string> } = {}\n\nconst isExternalUrl = (path: string) => path.startsWith(\"http://\") || path.startsWith(\"https://\")\nconst iconUrl = (path: string, name: string, type: string) => {\n if (isExternalUrl(path)) {\n return `${path}/${type}/${name}.svg?v=${dsVersion()}`\n }\n return `${path}/${type}/${name}.svg` + `?v=${dsVersion()}`\n}\n\nexport async function fetchIcon({name, type}: { name: string; type: string }): Promise<string> {\n const cacheKey = type + \"-\" + name\n if (iconCache[cacheKey]) {\n return iconCache[cacheKey]\n }\n\n if (!requestCache[cacheKey]) {\n requestCache[cacheKey] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {\n if (resp.status === 200) {\n return resp.text()\n } else {\n throw new Error(\"Gov Icon doesn't exists\")\n }\n })\n }\n const path = await requestCache[cacheKey]\n iconCache[cacheKey] = path\n return path\n}\n","import {Nullable} from \"../../utils/helpers.types\";\nimport {isWindow} from \"./win\";\n\nexport const setCookie = (name: string, value: string, days?: number) => {\n\tif (!isWindow) {\n\t\treturn\n\t}\n\tlet expires = \"\";\n\tif (days) {\n\t\tconst date = new Date();\n\t\tdate.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\n\t\texpires = \"; expires=\" + date.toUTCString();\n\t}\n\tdocument.cookie = `${name}=${encodeURIComponent(value)}${expires}; path=/`;\n}\n\nexport const getCookie = (name: string): Nullable<string> => {\n\tif (!isWindow) {\n\t\treturn null\n\t}\n\tconst nameEQ = name + \"=\";\n\tconst cookies = document.cookie.split(';');\n\tfor (let i = 0; i < cookies.length; i++) {\n\t\tlet cookie = cookies[i].trim();\n\t\tif (cookie.startsWith(nameEQ)) {\n\t\t\treturn decodeURIComponent(cookie.substring(nameEQ.length));\n\t\t}\n\t}\n\treturn null;\n}\n\nexport const isValidSVG = (svgContent: string): boolean => {\n\ttry {\n\t\tconst parser = new DOMParser();\n\t\tconst doc = parser.parseFromString(svgContent, \"image/svg+xml\");\n\t\tconst parseError = doc.querySelector(\"parsererror\");\n\t\tif (parseError) {\n\t\t\treturn false;\n\t\t}\n\t\tconst svgElement = doc.documentElement;\n\t\tif (svgElement.tagName.toLowerCase() !== \"svg\") {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t} catch (error) {\n\t\treturn false;\n\t}\n}\n","import {Build, Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {IconClass, IconColors, type IconColorType, IconSizesType} from \"./constants\"\nimport {fetchIcon} from \"../../utils/icon.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {iconsLazyLoad} from \"../../helpers/Dom/win\"\nimport {validateProp} from \"../../helpers/Validate/props\";\nimport {Sizes} from \"../../core/constants/sizes\";\nimport {isValidSVG} from \"../../helpers/Dom/document\";\n\n@Component({\n\tassetsDirs: [\"assets\"],\n\ttag: \"gov-icon\",\n})\nexport class GovIcon {\n\tprivate h: GovHost\n\tprivate intersectionObserver: IntersectionObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovIconElement\n\t/**\n\t * Icon size\n\t */\n\t@Prop({reflect: true}) readonly size?: IconSizesType\n\t/**\n\t * Icon color\n\t */\n\t@Prop({reflect: true}) readonly color?: IconColorType\n\t/**\n\t * Name of icon in folder\n\t */\n\t@Prop({reflect: true}) name: string = null\n\t/**\n\t * Type (folder) of icon\n\t */\n\t@Prop({reflect: true}) type = \"components\"\n\n\t@State() private visible = false\n\t@State() private error = false\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(IconColors, newValue, IconClass.root)\n\t}\n\n\t@Watch(\"name\")\n\tprivate async loadIconPathData(): Promise<void> {\n\t\tconst {name, visible} = this\n\t\tif (!Build.isBrowser || !name || !visible) {\n\t\t\treturn\n\t\t}\n\t\tawait this.loadIcon()\n\t}\n\n\tconnectedCallback(): void {\n\t\tif (iconsLazyLoad()) {\n\t\t\tthis.visible = true\n\t\t\tthis.loadIconPathData().finally()\n\t\t} else {\n\t\t\tthis.waitUntilVisible(async () => {\n\t\t\t\tthis.visible = true\n\t\t\t\tawait this.loadIconPathData()\n\t\t\t})\n\t\t}\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tif (this.intersectionObserver) {\n\t\t\tthis.intersectionObserver.disconnect()\n\t\t\tthis.intersectionObserver = null\n\t\t}\n\t}\n\n\tasync componentWillLoad(): Promise<void> {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateColor(this.color)\n\t\tawait this.loadIconPathData()\n\t}\n\n\tprivate waitUntilVisible(callback: () => void): void {\n\t\tif (!Build.isBrowser || typeof window === \"undefined\" || !(window as any).IntersectionObserver) {\n\t\t\tcallback()\n\t\t\treturn\n\t\t}\n\t\tthis.intersectionObserver = new IntersectionObserver(\n\t\t\tentries => {\n\t\t\t\tentries.forEach(entry => {\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tif (this.intersectionObserver) {\n\t\t\t\t\t\t\tthis.intersectionObserver.disconnect()\n\t\t\t\t\t\t\tthis.intersectionObserver = null\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcallback()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t{rootMargin: \"50px\"},\n\t\t)\n\t\tthis.intersectionObserver.observe(this.host)\n\t}\n\n\tprivate async loadIcon() {\n\t\ttry {\n\t\t\tconst {name, type} = this\n\t\t\tconst data = await fetchIcon({name, type})\n\t\t\tconst isValid = isValidSVG(data)\n\t\t\tthis.host.innerHTML = isValid ? data : null;\n\t\t} catch (e) {\n\t\t\tthis.host.innerHTML = ''\n\t\t\tthis.error = true\n\t\t}\n\t}\n\n\trender() {\n\t\tif (this.error) {\n\t\t\treturn null\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(IconClass.root)} size={this.size} color={this.color}/>\n\t\t)\n\t}\n}\n"],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C,aAC1BjB,KAAKgB,qBAAuB,I,EAI9B,uBAAME,GACLlB,KAAKI,aAAaJ,KAAKmB,MACvBnB,KAAKO,cAAcP,KAAKoB,aAClBpB,KAAKQ,kB,CAGJ,gBAAAM,CAAiBO,GACxB,UAA+BC,SAAW,cAAiBA,OAAeC,qBAAsB,CAC/FF,IACA,M,CAEDrB,KAAKgB,qBAAuB,IAAIO,sBAC/BC,IACCA,EAAQC,SAAQC,IACf,GAAIA,EAAMC,eAAgB,CACzB,GAAI3B,KAAKgB,qBAAsB,CAC9BhB,KAAKgB,qBAAqBC,aAC1BjB,KAAKgB,qBAAuB,I,CAE7BK,G,IAEA,GAEH,CAACO,WAAY,SAEd5B,KAAKgB,qBAAqBa,QAAQ7B,KAAKG,K,CAGhC,cAAMO,GACb,IACC,MAAM7D,KAACA,EAAIC,KAAEA,GAAQkD,KACrB,MAAM8B,QAAa9E,EAAU,CAACH,OAAMC,SACpC,MAAMiF,EAAUhD,EAAW+C,GAC3B9B,KAAKG,KAAK6B,UAAYD,EAAUD,EAAO,I,CACtC,MAAOG,GACRjC,KAAKG,KAAK6B,UAAY,GACtBhC,KAAKL,MAAQ,I,EAIf,MAAAuC,GACC,GAAIlC,KAAKL,MAAO,CACf,OAAO,I,CAER,OACCM,EAACkC,EAAI,CAACC,MAAOpC,KAAKC,EAAEoC,QAAQnG,EAAUC,MAAOgF,KAAMnB,KAAKmB,KAAMC,MAAOpB,KAAKoB,O","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{p as t,H as s,c as i,h as e,d as n}from"./p-42200001.js";import{g as a,b as h,c as o}from"./p-9908b9f0.js";import{g as d,c,t as r,d as l}from"./p-ea7fdd2e.js";import{v as u}from"./p-0b3574c2.js";import{c as f}from"./p-cd6c2938.js";import{A as p,a as m,i as b}from"./p-33d5d1ed.js";import{d as v}from"./p-4fba9df0.js";import{d as g}from"./p-3c90521b.js";var y;(function(t){t["INPUT"]="input";t["TEXTAREA"]="textarea"})(y||(y={}));const w=t(class t extends s{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.govKeyUp=i(this,"gov-keyup",7);this.govHydrated=i(this,"gov-hydrated",7);this.govKeyDown=i(this,"gov-keydown",7);this.value=undefined;this.identifier=undefined;this.success=undefined;this.size="m";this.name=undefined;this.multiline=undefined;this.rows=undefined;this.cols=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.minlength=undefined;this.maxlength=undefined;this.min=undefined;this.max=undefined;this.autocomplete=undefined;this.autocorrect=undefined;this.spellcheck=undefined;this.inputLang=undefined;this.type=undefined;this.inputType="text";this.role=undefined;this.invalid=undefined;this.accessibleShowPasswordLabel="Zobrazit heslo";this.accessibleHidePasswordLabel="Skrýt heslo";this.focused=undefined;this.showPassword=false;this.inheritedAttributes={};this.h=d(this.host);this.inputId=f("GovInput");this.f=a(this.h)}validateSize(t){u(o,t,h.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("success",c(this.success));this.f.passAttrToControl("disabled",c(this.disabled));this.f.passAttrToControl("invalid",c(this.invalid));this.f.passAttrToControl("type",this.multiline?y.TEXTAREA:y.INPUT)}componentDidLoad(){this.attributeObserver=new p(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(m);this.govHydrated.emit()}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=b(this.host)}componentDidRender(){this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required))}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}render(){const t=this.multiline?y.TEXTAREA:y.INPUT;return e(n,{key:"bdbab2105ea328155d7a023e2070c4ca22a5afba",class:h.root,size:this.size,type:this.type},this.h.hasSlot("prefix")&&e("slot",{key:"71be98f4ba1933c8a5affd3f41b496633528bcc8",name:"prefix"}),e("span",{key:"820a6cc14d90fb52b3fa809858c9b7223d7dec21",class:"element"},this.h.hasSlot("icon-start")&&!this.multiline&&e("div",{key:"6c001fb96074d4f5b7779a14cbceee9169b4a70a",class:h.icons,onClick:()=>this.inputRef.focus()},e("slot",{key:"15da634518db7ac788de51911296d1a0ca87c993",name:"icon-start"})),e(t,Object.assign({key:"f43777146426ddbe5d37408a734ca61aa51e0e69",type:this.inputType==="password"&&this.showPassword?"text":this.inputType,disabled:this.disabled,id:this.identifier||this.inputId,name:this.name,onFocus:this.onFocusHandler.bind(this),onInput:this.onInputHandler.bind(this),onBlur:this.onBlurHandler.bind(this),onKeyUp:this.onKeyUpHandler.bind(this),onKeyDown:this.onKeyDownHandler.bind(this),ref:t=>this.inputRef=t,placeholder:this.placeholder,spellcheck:r(this.spellcheck),lang:this.inputLang,readonly:r(this.readonly),autocomplete:l(this.autocomplete),autocorrect:l(this.autocorrect),minlength:this.minlength,maxlength:this.maxlength,min:this.min,max:this.max,required:this.required,rows:this.rows,cols:this.cols,role:this.role,value:this.value},this.inheritedAttributes,{"aria-required":r(this.required),"aria-invalid":r(this.invalid),"aria-disabled":r(this.disabled)})),(this.success||this.invalid||this.h.hasSlot("icon-end")||this.inputType==="password")&&!this.multiline&&e("div",{key:"716e004caf2077ce8d5ee5101bcb541fbdb45d38",class:h.icons,onClick:()=>this.inputRef.focus()},this.success&&!this.multiline&&e("gov-icon",{key:"96c5fcdad8332c08d3eaf9a5a6af573962a96744",class:"validation-icon",name:"check-lg",type:"components"}),this.invalid&&!this.multiline&&e("gov-icon",{key:"4883e137f51052a2659f46a09270c656bc3347f7",class:"validation-icon",name:"exclamation-lg",type:"components"}),this.h.hasSlot("icon-end")&&this.inputType!=="password"&&e("slot",{key:"a74b2df0932087834fc33de45aa341444c61042a",name:"icon-end"}),this.inputType==="password"?e("gov-button",{color:"primary",type:"base",size:this.size,"aria-label":this.showPassword?this.accessibleHidePasswordLabel:this.accessibleShowPasswordLabel,"on-gov-click":()=>this.showPassword=!this.showPassword},e("gov-icon",{slot:"icon-start",name:"eye",type:"components"})):null)),this.h.hasSlot("sufix")&&e("slot",{key:"9d15adccc023a5501114982c4417df6db9a4d8c1",name:"sufix"}))}onFocusHandler(t){t.stopPropagation();this.focused=true;this.govFocus.emit({component:h.root,value:this.value,originalEvent:t})}onBlurHandler(t){t.stopPropagation();this.focused=false;this.govBlur.emit({component:h.root,value:this.value,originalEvent:t})}onKeyUpHandler(t){t.stopPropagation();this.govKeyUp.emit({component:h.root,value:this.value,originalEvent:t})}onKeyDownHandler(t){t.stopPropagation();this.govKeyDown.emit({component:h.root,value:this.value,originalEvent:t})}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit({component:h.root,value:this.value,originalEvent:t})}async setFocus(t){return this.inputRef.focus(t)}async setValue(t){this.value=t}async clearValue(){this.value="";this.inputRef.value=""}async getRef(){return this.inputRef}get host(){return this}static get watchers(){return{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}}},[4,"gov-form-input",{value:[1537],identifier:[1],success:[516],size:[1],name:[1],multiline:[4],rows:[2],cols:[2],required:[516],disabled:[516],placeholder:[1],readonly:[4],minlength:[2],maxlength:[2],min:[8],max:[8],autocomplete:[4],autocorrect:[4],spellcheck:[4],inputLang:[1,"input-lang"],type:[1],inputType:[1,"input-type"],role:[1],invalid:[516],accessibleShowPasswordLabel:[1,"accessible-show-password-label"],accessibleHidePasswordLabel:[1,"accessible-hide-password-label"],focused:[32],showPassword:[32],inheritedAttributes:[32],setFocus:[64],setValue:[64],clearValue:[64],getRef:[64]},undefined,{size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}]);function k(){if(typeof customElements==="undefined"){return}const t=["gov-form-input","gov-button","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-input":if(!customElements.get(t)){customElements.define(t,w)}break;case"gov-button":if(!customElements.get(t)){v()}break;case"gov-icon":if(!customElements.get(t)){g()}break}}))}k();export{w as G,k as d};
2
+ //# sourceMappingURL=p-3fead64a.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Tags","GovFormInput","proxyCustomElement","H","constructor","this","h","govHost","host","inputId","createID","f","govForm","validateSize","newValue","validateProp","FormInputSizes","FormInputClass","root","watchControlAttrs","passControlAttrs","passAttrToControl","size","toBoolAttr","success","disabled","invalid","multiline","TEXTAREA","INPUT","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","govHydrated","emit","componentWillLoad","inheritedAttributes","inheritAriaAttributes","componentDidRender","passAttrToLabel","String","required","removeAttribute","Object","assign","disconnectedCallback","_a","stopObserving","render","Tag","Host","key","class","type","hasSlot","name","icons","onClick","inputRef","focus","inputType","showPassword","id","identifier","onFocus","onFocusHandler","bind","onInput","onInputHandler","onBlur","onBlurHandler","onKeyUp","onKeyUpHandler","onKeyDown","onKeyDownHandler","ref","el","placeholder","spellcheck","toBoolAttrIfDefined","lang","inputLang","readonly","autocomplete","toOnOffAttrIfDefined","autocorrect","minlength","maxlength","min","max","rows","cols","role","value","color","accessibleHidePasswordLabel","accessibleShowPasswordLabel","slot","e","stopPropagation","focused","govFocus","component","originalEvent","govBlur","govKeyUp","govKeyDown","target","govInput","setFocus","options","setValue","clearValue","getRef"],"sources":["../../../packages/core/src/components/gov-form/input/gov-form-input.tsx"],"sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined, toOnOffAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {FormInputClass, FormInputSizes, FormInputSizesType, InputType, Type,} from \"./constants\"\nimport {FormInputEvent} from \"./gov-form-input.types\"\nimport {Nullable} from \"../../../types/interfaces\"\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\nenum Tags {\n\tINPUT = \"input\",\n\tTEXTAREA = \"textarea\",\n}\n\n@Component({\n\ttag: \"gov-form-input\",\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.inputId = createID(\"GovInput\")\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop({reflect:true}) readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Generates a texarea for the possibility of multiple lines\n\t */\n\t@Prop() readonly multiline: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n\t */\n\t@Prop() readonly rows: number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols\n\t */\n\t@Prop() readonly cols: number\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop({reflect:true}) readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t */\n\t@Prop({reflect:true}) readonly disabled: boolean = false\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Minimum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete\n\t */\n\t@Prop() readonly autocomplete: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect\n\t */\n\t@Prop() readonly autocorrect: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck\n\t */\n\t@Prop() readonly spellcheck: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang\n\t */\n\t@Prop({attribute: \"input-lang\"}) readonly inputLang: string\n\t/**\n\t * Defined the visual style of input\n\t */\n\t@Prop() readonly type?: Type\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n\t */\n\t@Prop({attribute: \"input-type\"}) readonly inputType: InputType = \"text\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role\n\t */\n\t@Prop() readonly role: Nullable<string>\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop({reflect:true}) readonly invalid: boolean\n\t/**\n\t * Accessible text for password display\n\t */\n\t@Prop({attribute: \"accessible-show-password-label\"}) readonly accessibleShowPasswordLabel = 'Zobrazit heslo'\n\t/**\n\t * Accessible text to hide the password\n\t */\n\t@Prop({attribute: \"accessible-hide-password-label\"}) readonly accessibleHidePasswordLabel = 'Skrýt heslo'\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-input\"}) govInput: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-keyup\"}) govKeyUp: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-hydrated\"}) govHydrated: EventEmitter<void>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-keydown\"}) govKeyDown: EventEmitter<FormInputEvent>\n\t@State() focused: boolean\n\t@State() showPassword: boolean = false\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormInputSizes, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"success\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"success\", toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", this.multiline ? Tags.TEXTAREA : Tags.INPUT)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t\tthis.govHydrated.emit();\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentDidRender() {\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\trender() {\n\t\tconst Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT\n\n\t\treturn (\n\t\t\t<Host class={FormInputClass.root} size={this.size} type={this.type}>\n\t\t\t\t{this.h.hasSlot(\"prefix\") && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t{(this.h.hasSlot(\"icon-start\") && !this.multiline) &&\n\t\t\t\t\t\t<div class={FormInputClass.icons} onClick={() => this.inputRef.focus()}>\n\t\t\t\t\t\t\t<slot name=\"icon-start\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttype={this.inputType === 'password' && this.showPassword ? 'text' : this.inputType}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tid={this.identifier || this.inputId}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\tonKeyUp={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\t\tonKeyDown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tspellcheck={toBoolAttrIfDefined(this.spellcheck)}\n\t\t\t\t\t\tlang={this.inputLang}\n\t\t\t\t\t\treadonly={toBoolAttrIfDefined(this.readonly)}\n\t\t\t\t\t\tautocomplete={toOnOffAttrIfDefined(this.autocomplete)}\n\t\t\t\t\t\tautocorrect={toOnOffAttrIfDefined(this.autocorrect)}\n\t\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\trows={this.rows}\n\t\t\t\t\t\tcols={this.cols}\n\t\t\t\t\t\trole={this.role}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t/>\n\t\t\t\t\t{((this.success || this.invalid || this.h.hasSlot(\"icon-end\") || this.inputType === 'password') && !this.multiline) &&\n\t\t\t\t\t\t<div class={FormInputClass.icons} onClick={() => this.inputRef.focus()}>\n\t\t\t\t\t\t\t{this.success && !this.multiline &&\n\t\t\t\t\t\t\t\t<gov-icon class=\"validation-icon\" name=\"check-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t{this.invalid && !this.multiline &&\n\t\t\t\t\t\t\t\t<gov-icon class=\"validation-icon\" name=\"exclamation-lg\" type=\"components\"></gov-icon>}\n\t\t\t\t\t\t\t{this.h.hasSlot(\"icon-end\") && this.inputType !== 'password' && <slot name=\"icon-end\"/>}\n\t\t\t\t\t\t\t{this.inputType === 'password' ? (\n\t\t\t\t\t\t\t\t<gov-button color={'primary'}\n\t\t\t\t\t\t\t\t\t\t\ttype={'base'}\n\t\t\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\t\t\taria-label={this.showPassword ? this.accessibleHidePasswordLabel : this.accessibleShowPasswordLabel}\n\t\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.showPassword = !this.showPassword}>\n\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon-start\" name=\"eye\" type=\"components\"></gov-icon>\n\t\t\t\t\t\t\t\t</gov-button>) : null}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot(\"sufix\") && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyUpHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyUp.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyDownHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyDown.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Clears input value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = \"\"\n\t\tthis.inputRef.value = \"\"\n\t}\n\n\t/**\n\t * Returns an instance of the native html input element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n}\n"],"mappings":"wWAcA,IAAKA,GAAL,SAAKA,GACJA,EAAA,iBACAA,EAAA,sBACA,EAHD,CAAKA,MAAI,K,MAQIC,EAAYC,EAAA,MAAAD,UAAAE,EAOxB,WAAAC,G,8UAsB6C,I,mGAqBM,M,cAIA,M,wRAiDc,O,4EAa2B,iB,iCAIA,c,yCA0B3D,M,yBAeU,GAzJ1CC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,QAAUC,EAAS,YACxBL,KAAKM,EAAIC,EAAQP,KAAKC,E,CA2IvB,YAAAO,CAAaC,GACZC,EAAaC,EAAgBF,EAAUG,EAAeC,K,CAOvD,iBAAAC,GACCd,KAAKe,kB,CAKE,gBAAAA,GACPf,KAAKM,EAAEU,kBAAkB,OAAQhB,KAAKiB,MACtCjB,KAAKM,EAAEU,kBAAkB,UAAWE,EAAWlB,KAAKmB,UACpDnB,KAAKM,EAAEU,kBAAkB,WAAYE,EAAWlB,KAAKoB,WACrDpB,KAAKM,EAAEU,kBAAkB,UAAWE,EAAWlB,KAAKqB,UACpDrB,KAAKM,EAAEU,kBAAkB,OAAQhB,K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O5F,KAAK4F,MACZU,cAAeL,G,CAQjB,cAAMW,CAASC,GACd,OAAO7G,KAAKyD,SAASC,MAAMmD,E,CAO5B,cAAMC,CAASlB,GACd5F,KAAK4F,MAAQA,C,CAOd,gBAAMmB,GACL/G,KAAK4F,MAAQ,GACb5F,KAAKyD,SAASmC,MAAQ,E,CAOvB,YAAMoB,GACL,OAAOhH,KAAKyD,Q","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ const e="core";const t={allRenderFn:true,appendChildSlotFix:true,asyncLoading:true,asyncQueue:false,attachStyles:true,cloneNodeFix:true,cmpDidLoad:true,cmpDidRender:true,cmpDidUnload:false,cmpDidUpdate:true,cmpShouldUpdate:true,cmpWillLoad:true,cmpWillRender:true,cmpWillUpdate:true,connectedCallback:true,constructableCSS:true,cssAnnotations:true,devTools:false,disconnectedCallback:true,element:false,event:true,experimentalScopedSlotChanges:false,experimentalSlotFixes:true,formAssociated:false,hasRenderFn:true,hostListener:false,hostListenerTarget:false,hostListenerTargetBody:false,hostListenerTargetDocument:false,hostListenerTargetParent:false,hostListenerTargetWindow:false,hotModuleReplacement:false,hydrateClientSide:true,hydrateServerSide:false,hydratedAttribute:false,hydratedClass:true,hydratedSelectorName:"hydrated",invisiblePrehydration:false,isDebug:false,isDev:false,isTesting:false,lazyLoad:false,lifecycle:true,lifecycleDOMEvents:false,member:true,method:true,mode:false,observeAttribute:true,profile:false,prop:true,propBoolean:true,propMutable:true,propNumber:true,propString:true,reflect:true,scoped:false,scopedSlotTextContentFix:true,scriptDataOpts:false,shadowDelegatesFocus:false,shadowDom:false,slot:true,slotChildNodesFix:true,slotRelocation:true,state:true,style:true,svg:false,taskQueue:true,updatable:true,vdomAttribute:true,vdomClass:true,vdomFunctional:true,vdomKey:true,vdomListener:true,vdomPropOrAttr:true,vdomRef:true,vdomRender:true,vdomStyle:true,vdomText:true,vdomXlink:true,watchCallback:true};var r=Object.defineProperty;var l=(e,t)=>{for(var l in t)r(e,l,{get:t[l],enumerable:true})};var n=new WeakMap;var s=e=>n.get(e);var i=(e,t)=>{const r={t:0,$hostElement$:e,l:t,i:new Map};{r.o=new Promise((e=>r.u=e));e["s-p"]=[];e["s-rc"]=[]}return n.set(e,r)};var o=(e,t)=>t in e;var a=(e,t)=>(0,console.error)(e,t);var f=new Map;var u=(e,t,r)=>{const l=e.v.replace(/-/g,"_");const n=e.p;if(!n){return void 0}const s=f.get(n);if(s){return s[l]}
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${n}.entry.js${""}`).then((e=>{{f.set(n,e)}return e[l]}),a)};var c=new Map;var v="r";var d="o";var p="s";var $="t";var h="s-id";var m="sty-id";var y="c-id";var b="slot-fb{display:contents}slot-fb[hidden]{display:none}";var w="http://www.w3.org/1999/xlink";var g=typeof window!=="undefined"?window:{};var S=g.document||{head:{}};var k=g.HTMLElement||class{};var C={t:0,$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,r,l)=>e.addEventListener(t,r,l),rel:(e,t,r,l)=>e.removeEventListener(t,r,l),ce:(e,t)=>new CustomEvent(e,t)};var x=t.shadowDom;var j=e=>Promise.resolve(e);var O=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false})();var R=false;var D=[];var L=[];var A=(e,t)=>r=>{e.push(r);if(!R){R=true;if(t&&C.t&4){M(E)}else{C.raf(E)}}};var F=e=>{for(let t=0;t<e.length;t++){try{e[t](performance.now())}catch(e){a(e)}}e.length=0};var E=()=>{F(D);{F(L);if(R=D.length>0){C.raf(E)}}};var M=e=>j().then(e);var T=A(L,true);var U=e=>{const t=new URL(e,C.$);return t.origin!==g.location.origin?t.href:t.pathname};var P=e=>C.$=e;var W={};var N=e=>e!=null;var I=e=>{e=typeof e;return e==="object"||e==="function"};function _(e){var t,r,l;return(l=(r=(t=e.head)==null?void 0:t.querySelector('meta[name="csp-nonce"]'))==null?void 0:r.getAttribute("content"))!=null?l:void 0}var B={};l(B,{err:()=>Q,map:()=>q,ok:()=>H,unwrap:()=>z,unwrapErr:()=>K});var H=e=>({isOk:true,isErr:false,value:e});var Q=e=>({isOk:false,isErr:true,value:e});function q(e,t){if(e.isOk){const r=t(e.value);if(r instanceof Promise){return r.then((e=>H(e)))}else{return H(r)}}if(e.isErr){const t=e.value;return Q(t)}throw"should never get here"}var z=e=>{if(e.isOk){return e.value}else{throw e.value}};var K=e=>{if(e.isErr){return e.value}else{throw e.value}};var V=(e,t="")=>{{return()=>{}}};var X=(e,t)=>{{return()=>{}}};var G=(e,t,...r)=>{let l=null;let n=null;let s=null;let i=false;let o=false;const a=[];const f=t=>{for(let r=0;r<t.length;r++){l=t[r];if(Array.isArray(l)){f(l)}else if(l!=null&&typeof l!=="boolean"){if(i=typeof e!=="function"&&!I(l)){l=String(l)}if(i&&o){a[a.length-1].h+=l}else{a.push(i?J(null,l):l)}o=i}}};f(r);if(t){if(t.key){n=t.key}if(t.name){s=t.name}{const e=t.className||t.class;if(e){t.class=typeof e!=="object"?e:Object.keys(e).filter((t=>e[t])).join(" ")}}}if(typeof e==="function"){return e(t===null?{}:t,a,ee)}const u=J(e,null);u.m=t;if(a.length>0){u.S=a}{u.k=n}{u.C=s}return u};var J=(e,t)=>{const r={t:0,j:e,h:t,O:null,S:null};{r.m=null}{r.k=null}{r.C=null}return r};var Y={};var Z=e=>e&&e.j===Y;var ee={forEach:(e,t)=>e.map(te).forEach(t),map:(e,t)=>e.map(te).map(t).map(re)};var te=e=>({vattrs:e.m,vchildren:e.S,vkey:e.k,vname:e.C,vtag:e.j,vtext:e.h});var re=e=>{if(typeof e.vtag==="function"){const t={...e.vattrs};if(e.vkey){t.key=e.vkey}if(e.vname){t.name=e.vname}return G(e.vtag,t,...e.vchildren||[])}const t=J(e.vtag,e.vtext);t.m=e.vattrs;t.S=e.vchildren;t.k=e.vkey;t.C=e.vname;return t};var le=(e,t,r,l)=>{const n=V("hydrateClient",t);const s=e.shadowRoot;const i=[];const o=[];const a=null;const f=l.R=J(t,null);if(!C.D){se(S.body,C.D=new Map)}e[h]=r;e.removeAttribute(h);ne(f,i,o,a,e,e,r);i.map((e=>{const r=e.L+"."+e.A;const l=C.D.get(r);const n=e.O;if(l&&x&&l["s-en"]===""){l.parentNode.insertBefore(n,l.nextSibling)}if(!s){n["s-hn"]=t;if(l){n["s-ol"]=l;n["s-ol"]["s-nr"]=n}}C.D.delete(r)}));n()};var ne=(e,t,r,l,n,s,i)=>{let o;let a;let f;let u;if(s.nodeType===1){o=s.getAttribute(y);if(o){a=o.split(".");if(a[0]===i||a[0]==="0"){f={t:0,L:a[0],A:a[1],F:a[2],M:a[3],j:s.tagName.toLowerCase(),O:s,m:null,S:null,k:null,C:null,h:null};t.push(f);s.removeAttribute(y);if(!e.S){e.S=[]}e.S[f.M]=f;e=f;if(l&&f.F==="0"){l[f.M]=f.O}}}if(s.shadowRoot){for(u=s.shadowRoot.childNodes.length-1;u>=0;u--){ne(e,t,r,l,n,s.shadowRoot.childNodes[u],i)}}for(u=s.childNodes.length-1;u>=0;u--){ne(e,t,r,l,n,s.childNodes[u],i)}}else if(s.nodeType===8){a=s.nodeValue.split(".");if(a[1]===i||a[1]==="0"){o=a[0];f={t:0,L:a[1],A:a[2],F:a[3],M:a[4],O:s,m:null,S:null,k:null,C:null,j:null,h:null};if(o===$){f.O=s.nextSibling;if(f.O&&f.O.nodeType===3){f.h=f.O.textContent;t.push(f);s.remove();if(!e.S){e.S=[]}e.S[f.M]=f;if(l&&f.F==="0"){l[f.M]=f.O}}}else if(f.L===i){if(o===p){f.j="slot";if(a[5]){s["s-sn"]=f.C=a[5]}else{s["s-sn"]=""}s["s-sr"]=true;r.push(f);if(!e.S){e.S=[]}e.S[f.M]=f}else if(o===v){{n["s-cr"]=s;s["s-cn"]=true}}}}}else if(e&&e.j==="style"){const t=J(null,s.textContent);t.O=s;t.M="0";e.S=[t]}};var se=(e,t)=>{if(e.nodeType===1){let r=0;if(e.shadowRoot){for(;r<e.shadowRoot.childNodes.length;r++){se(e.shadowRoot.childNodes[r],t)}}for(r=0;r<e.childNodes.length;r++){se(e.childNodes[r],t)}}else if(e.nodeType===8){const r=e.nodeValue.split(".");if(r[0]===d){t.set(r[1]+"."+r[2],e);e.nodeValue="";e["s-en"]=r[3]}}};var ie=(e,t)=>{if(e!=null&&!I(e)){if(t&4){return e==="false"?false:e===""||!!e}if(t&2){return parseFloat(e)}if(t&1){return String(e)}return e}return e};var oe=e=>e;var ae=(e,t,r)=>{const l=oe(e);return{emit:e=>fe(l,t,{bubbles:!!(r&4),composed:!!(r&2),cancelable:!!(r&1),detail:e})}};var fe=(e,t,r)=>{const l=C.ce(t,r);e.dispatchEvent(l);return l};var ue=new WeakMap;var ce=(e,t,r)=>{let l=c.get(e);if(O&&r){l=l||new CSSStyleSheet;if(typeof l==="string"){l=t}else{l.replaceSync(t)}}else{l=t}c.set(e,l)};var ve=(e,t,r)=>{var l;const n=pe(t);const s=c.get(n);e=e.nodeType===11?e:S;if(s){if(typeof s==="string"){e=e.head||e;let r=ue.get(e);let i;if(!r){ue.set(e,r=new Set)}if(!r.has(n)){if(e.host&&(i=e.querySelector(`[${m}="${n}"]`))){i.innerHTML=s}else{i=S.createElement("style");i.innerHTML=s;const r=(l=C.T)!=null?l:_(S);if(r!=null){i.setAttribute("nonce",r)}const n=!(t.t&1)||t.t&1&&e.nodeName!=="HEAD";if(n){e.insertBefore(i,e.querySelector("link"))}}if(t.t&4){i.innerHTML+=b}if(r){r.add(n)}}}else if(!e.adoptedStyleSheets.includes(s)){e.adoptedStyleSheets=[...e.adoptedStyleSheets,s]}}return n};var de=e=>{const t=e.l;const r=e.$hostElement$;const l=V("attachStyles",t.v);ve(r.getRootNode(),t);l()};var pe=(e,t)=>"sc-"+e.v;var $e=(e,t,r,l,n,s)=>{if(r!==l){let i=o(e,t);let a=t.toLowerCase();if(t==="class"){const t=e.classList;const n=me(r);const s=me(l);t.remove(...n.filter((e=>e&&!s.includes(e))));t.add(...s.filter((e=>e&&!n.includes(e))))}else if(t==="style"){{for(const t in r){if(!l||l[t]==null){if(t.includes("-")){e.style.removeProperty(t)}else{e.style[t]=""}}}}for(const t in l){if(!r||l[t]!==r[t]){if(t.includes("-")){e.style.setProperty(t,l[t])}else{e.style[t]=l[t]}}}}else if(t==="key");else if(t==="ref"){if(l){l(e)}}else if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"){t=t.slice(3)}else if(o(g,a)){t=a.slice(2)}else{t=a[2]+t.slice(3)}if(r||l){const n=t.endsWith(ye);t=t.replace(be,"");if(r){C.rel(e,t,r,n)}if(l){C.ael(e,t,l,n)}}}else{const o=I(l);if((i||o&&l!==null)&&!n){try{if(!e.tagName.includes("-")){const n=l==null?"":l;if(t==="list"){i=false}else if(r==null||e[t]!=n){e[t]=n}}else{e[t]=l}}catch(e){}}let f=false;{if(a!==(a=a.replace(/^xlink\:?/,""))){t=a;f=true}}if(l==null||l===false){if(l!==false||e.getAttribute(t)===""){if(f){e.removeAttributeNS(w,t)}else{e.removeAttribute(t)}}}else if((!i||s&4||n)&&!o){l=l===true?"":l;if(f){e.setAttributeNS(w,t,l)}else{e.setAttribute(t,l)}}}}};var he=/\s/;var me=e=>!e?[]:e.split(he);var ye="Capture";var be=new RegExp(ye+"$");var we=(e,t,r)=>{const l=t.O.nodeType===11&&t.O.host?t.O.host:t.O;const n=e&&e.m||W;const s=t.m||W;{for(const e of ge(Object.keys(n))){if(!(e in s)){$e(l,e,n[e],void 0,r,t.t)}}}for(const e of ge(Object.keys(s))){$e(l,e,n[e],s[e],r,t.t)}};function ge(e){return e.includes("ref")?[...e.filter((e=>e!=="ref")),"ref"]:e}var Se;var ke;var Ce;var xe=false;var je=false;var Oe=false;var Re=false;var De=(e,r,l,n)=>{var s;const i=r.S[l];let o=0;let a;let f;let u;if(!xe){Oe=true;if(i.j==="slot"){i.t|=i.S?2:1}}if(i.h!==null){a=i.O=S.createTextNode(i.h)}else if(i.t&1){a=i.O=S.createTextNode("")}else{a=i.O=S.createElement(!xe&&t.slotRelocation&&i.t&2?"slot-fb":i.j);{we(null,i,Re)}const r=a.getRootNode();const l=!r.querySelector("body");if(!l&&t.scoped&&N(Se)&&a["s-si"]!==Se){a.classList.add(a["s-si"]=Se)}if(i.S){for(o=0;o<i.S.length;++o){f=De(e,i,o);if(f){a.appendChild(f)}}}}a["s-hn"]=Ce;{if(i.t&(2|1)){a["s-sr"]=true;a["s-cr"]=ke;a["s-sn"]=i.C||"";a["s-rf"]=(s=i.m)==null?void 0:s.ref;u=e&&e.S&&e.S[l];if(u&&u.j===i.j&&e.O){{Le(e.O)}}}}return a};var Le=e=>{C.t|=1;const t=e.closest(Ce.toLowerCase());if(t!=null){const r=Array.from(t.childNodes).find((e=>e["s-cr"]));const l=Array.from(e.childNodes);for(const e of r?l.reverse():l){if(e["s-sh"]!=null){Qe(t,e,r!=null?r:null);e["s-sh"]=void 0;Oe=true}}}C.t&=~1};var Ae=(e,r)=>{C.t|=1;const l=Array.from(e.childNodes);if(e["s-sr"]&&t.experimentalSlotFixes){let t=e;while(t=t.nextSibling){if(t&&t["s-sn"]===e["s-sn"]&&t["s-sh"]===Ce){l.push(t)}}}for(let e=l.length-1;e>=0;e--){const t=l[e];if(t["s-hn"]!==Ce&&t["s-ol"]){Qe(Pe(t),t,Ue(t));t["s-ol"].remove();t["s-ol"]=void 0;t["s-sh"]=void 0;Oe=true}if(r){Ae(t,r)}}C.t&=~1};var Fe=(e,t,r,l,n,s)=>{let i=e["s-cr"]&&e["s-cr"].parentNode||e;let o;for(;n<=s;++n){if(l[n]){o=De(null,r,n);if(o){l[n].O=o;Qe(i,o,Ue(t))}}}};var Ee=(e,t,r)=>{for(let l=t;l<=r;++l){const t=e[l];if(t){const e=t.O;He(t);if(e){{je=true;if(e["s-ol"]){e["s-ol"].remove()}else{Ae(e,true)}}e.remove()}}}};var Me=(e,t,r,l,n=false)=>{let s=0;let i=0;let o=0;let a=0;let f=t.length-1;let u=t[0];let c=t[f];let v=l.length-1;let d=l[0];let p=l[v];let $;let h;while(s<=f&&i<=v){if(u==null){u=t[++s]}else if(c==null){c=t[--f]}else if(d==null){d=l[++i]}else if(p==null){p=l[--v]}else if(Te(u,d,n)){We(u,d,n);u=t[++s];d=l[++i]}else if(Te(c,p,n)){We(c,p,n);c=t[--f];p=l[--v]}else if(Te(u,p,n)){if(u.j==="slot"||p.j==="slot"){Ae(u.O.parentNode,false)}We(u,p,n);Qe(e,u.O,c.O.nextSibling);u=t[++s];p=l[--v]}else if(Te(c,d,n)){if(u.j==="slot"||p.j==="slot"){Ae(c.O.parentNode,false)}We(c,d,n);Qe(e,c.O,u.O);c=t[--f];d=l[++i]}else{o=-1;{for(a=s;a<=f;++a){if(t[a]&&t[a].k!==null&&t[a].k===d.k){o=a;break}}}if(o>=0){h=t[o];if(h.j!==d.j){$=De(t&&t[i],r,o)}else{We(h,d,n);t[o]=void 0;$=h.O}d=l[++i]}else{$=De(t&&t[i],r,i);d=l[++i]}if($){{Qe(Pe(u.O),$,Ue(u.O))}}}}if(s>f){Fe(e,l[v+1]==null?null:l[v+1].O,r,l,i,v)}else if(i>v){Ee(t,s,f)}};var Te=(e,t,r=false)=>{if(e.j===t.j){if(e.j==="slot"){if("A"in e&&r&&e.O.nodeType!==8){return false}return e.C===t.C}if(!r){return e.k===t.k}return true}return false};var Ue=e=>e&&e["s-ol"]||e;var Pe=e=>(e["s-ol"]?e["s-ol"]:e).parentNode;var We=(e,r,l=false)=>{const n=r.O=e.O;const s=e.S;const i=r.S;const o=r.j;const a=r.h;let f;if(a===null){{if(o==="slot"&&!xe){if(e.C!==r.C){r.O["s-sn"]=r.C||"";Le(r.O.parentElement)}}else{we(e,r,Re)}}if(s!==null&&i!==null){Me(n,s,r,i,l)}else if(i!==null){if(e.h!==null){n.textContent=""}Fe(n,null,r,i,0,i.length-1)}else if(!l&&t.updatable&&s!==null){Ee(s,0,s.length-1)}}else if(f=n["s-cr"]){f.parentNode.textContent=a}else if(e.h!==a){n.data=a}};var Ne=e=>{const t=e.childNodes;for(const e of t){if(e.nodeType===1){if(e["s-sr"]){const r=e["s-sn"];e.hidden=false;for(const l of t){if(l!==e){if(l["s-hn"]!==e["s-hn"]||r!==""){if(l.nodeType===1&&(r===l.getAttribute("slot")||r===l["s-sn"])||l.nodeType===3&&r===l["s-sn"]){e.hidden=true;break}}else{if(l.nodeType===1||l.nodeType===3&&l.textContent.trim()!==""){e.hidden=true;break}}}}}Ne(e)}}};var Ie=[];var _e=e=>{let t;let r;let l;for(const n of e.childNodes){if(n["s-sr"]&&(t=n["s-cr"])&&t.parentNode){r=t.parentNode.childNodes;const e=n["s-sn"];for(l=r.length-1;l>=0;l--){t=r[l];if(!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==n["s-hn"]&&(!t["s-sh"]||t["s-sh"]!==n["s-hn"])){if(Be(t,e)){let r=Ie.find((e=>e.U===t));je=true;t["s-sn"]=t["s-sn"]||e;if(r){r.U["s-sh"]=n["s-hn"];r.P=n}else{t["s-sh"]=n["s-hn"];Ie.push({P:n,U:t})}if(t["s-sr"]){Ie.map((e=>{if(Be(e.U,t["s-sn"])){r=Ie.find((e=>e.U===t));if(r&&!e.P){e.P=r.P}}}))}}else if(!Ie.some((e=>e.U===t))){Ie.push({U:t})}}}}if(n.nodeType===1){_e(n)}}};var Be=(e,t)=>{if(e.nodeType===1){if(e.getAttribute("slot")===null&&t===""){return true}if(e.getAttribute("slot")===t){return true}return false}if(e["s-sn"]===t){return true}return t===""};var He=e=>{{e.m&&e.m.ref&&e.m.ref(null);e.S&&e.S.map(He)}};var Qe=(e,t,r)=>{const l=e==null?void 0:e.insertBefore(t,r);return l};var qe=(e,t,r=false)=>{var l,n,s,i;const o=e.$hostElement$;const a=e.l;const f=e.R||J(null,null);const u=Z(t)?t:G(null,null,t);Ce=o.tagName;if(a.W){u.m=u.m||{};a.W.map((([e,t])=>u.m[t]=o[e]))}if(r&&u.m){for(const e of Object.keys(u.m)){if(o.hasAttribute(e)&&!["key","ref","style","class"].includes(e)){u.m[e]=o[e]}}}u.j=null;u.t|=4;e.R=u;u.O=f.O=o;xe=x;{ke=o["s-cr"];je=false}We(f,u,r);{C.t|=1;if(Oe){_e(u.O);for(const e of Ie){const t=e.U;if(!t["s-ol"]){const e=S.createTextNode("");e["s-nr"]=t;Qe(t.parentNode,t["s-ol"]=e,t)}}for(const e of Ie){const t=e.U;const o=e.P;if(o){const e=o.parentNode;let r=o.nextSibling;if(r&&r.nodeType===1){let s=(l=t["s-ol"])==null?void 0:l.previousSibling;while(s){let l=(n=s["s-nr"])!=null?n:null;if(l&&l["s-sn"]===t["s-sn"]&&e===l.parentNode){l=l.nextSibling;while(l===t||(l==null?void 0:l["s-sr"])){l=l==null?void 0:l.nextSibling}if(!l||!l["s-nr"]){r=l;break}}s=s.previousSibling}}if(!r&&e!==t.parentNode||t.nextSibling!==r){if(t!==r){Qe(e,t,r);if(t.nodeType===1){t.hidden=(s=t["s-ih"])!=null?s:false}}}t&&typeof o["s-rf"]==="function"&&o["s-rf"](t)}else{if(t.nodeType===1){if(r){t["s-ih"]=(i=t.hidden)!=null?i:false}t.hidden=true}}}}if(je){Ne(u.O)}C.t&=~1;Ie.length=0}ke=void 0};var ze=(e,t)=>{if(t&&!e.N&&t["s-p"]){t["s-p"].push(new Promise((t=>e.N=t)))}};var Ke=(e,t)=>{{e.t|=16}if(e.t&4){e.t|=512;return}ze(e,e.I);const r=()=>Ve(e,t);return T(r)};var Ve=(e,t)=>{const r=e.$hostElement$;const l=V("scheduleUpdate",e.l.v);const n=r;if(!n){throw new Error(`Can't render component <${r.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`)}let s;if(t){{s=tt(n,"componentWillLoad")}}else{{s=tt(n,"componentWillUpdate")}}{s=Xe(s,(()=>tt(n,"componentWillRender")))}l();return Xe(s,(()=>Je(e,n,t)))};var Xe=(e,t)=>Ge(e)?e.then(t).catch((e=>{console.error(e);t()})):t();var Ge=e=>e instanceof Promise||e&&e.then&&typeof e.then==="function";var Je=async(e,t,r)=>{var l;const n=e.$hostElement$;const s=V("update",e.l.v);const i=n["s-rc"];if(r){de(e)}const o=V("render",e.l.v);{Ye(e,t,n,r)}if(i){i.map((e=>e()));n["s-rc"]=void 0}o();s();{const t=(l=n["s-p"])!=null?l:[];const r=()=>Ze(e);if(t.length===0){r()}else{Promise.all(t).then(r);e.t|=4;t.length=0}}};var Ye=(e,t,r,l)=>{try{t=t.render();{e.t&=~16}{e.t|=2}{{{qe(e,t,l)}}}}catch(t){a(t,e.$hostElement$)}return null};var Ze=e=>{const t=e.l.v;const r=e.$hostElement$;const l=V("postUpdate",t);const n=r;const s=e.I;{tt(n,"componentDidRender")}if(!(e.t&64)){e.t|=64;{rt(r)}{tt(n,"componentDidLoad")}l();{e.u(r);if(!s){et()}}}else{{tt(n,"componentDidUpdate")}l()}{if(e.N){e.N();e.N=void 0}if(e.t&512){M((()=>Ke(e,false)))}e.t&=~(4|512)}};var et=t=>{{rt(S.documentElement)}M((()=>fe(g,"appload",{detail:{namespace:e}})))};var tt=(e,t,r)=>{if(e&&e[t]){try{return e[t](r)}catch(e){a(e)}}return void 0};var rt=e=>{var r;return e.classList.add((r=t.hydratedSelectorName)!=null?r:"hydrated")};var lt=(e,t)=>s(e).i.get(t);var nt=(e,t,r,l)=>{const n=s(e);const i=e;const o=n.i.get(t);const f=n.t;const u=i;r=ie(r,l._[t][0]);const c=Number.isNaN(o)&&Number.isNaN(r);const v=r!==o&&!c;if(v){n.i.set(t,r);{if(l.B&&f&128){const e=l.B[t];if(e){e.map((e=>{try{u[e](r,o,t)}catch(e){a(e,i)}}))}}if((f&(2|16))===2){if(u.componentShouldUpdate){if(u.componentShouldUpdate(r,o,t)===false){return}}Ke(n,false)}}}};var st=(e,t,r)=>{var l,n;const i=e.prototype;if(t._||(t.B||e.watchers)){if(e.watchers&&!t.B){t.B=e.watchers}const r=Object.entries((l=t._)!=null?l:{});r.map((([e,[r]])=>{if(r&31||r&32){Object.defineProperty(i,e,{get(){return lt(this,e)},set(r){nt(this,e,r,t)},configurable:true,enumerable:true})}}));{const l=new Map;i.attributeChangedCallback=function(e,r,n){C.jmp((()=>{var o;const a=l.get(e);if(this.hasOwnProperty(a)){n=this[a];delete this[a]}else if(i.hasOwnProperty(a)&&typeof this[a]==="number"&&this[a]==n){return}else if(a==null){const l=s(this);const i=l==null?void 0:l.t;if(i&&!(i&8)&&i&128&&n!==r){const l=this;const s=l;const i=(o=t.B)==null?void 0:o[e];i==null?void 0:i.forEach((t=>{if(s[t]!=null){s[t].call(s,n,r,e)}}))}return}this[a]=n===null&&typeof this[a]==="boolean"?false:n}))};e.observedAttributes=Array.from(new Set([...Object.keys((n=t.B)!=null?n:{}),...r.filter((([e,t])=>t[0]&15)).map((([e,r])=>{var n;const s=r[1]||e;l.set(s,e);if(r[0]&512){(n=t.W)==null?void 0:n.push([e,s])}return s}))]))}}return e};var it=async(e,t,r,l)=>{let n;if((t.t&32)===0){t.t|=32;const l=r.p;if(l){const e=u(r);if(e&&"then"in e){const t=X();n=await e;t()}else{n=e}if(!n){throw new Error(`Constructor for "${r.v}#${t.H}" was not found`)}if(!n.isProxied){{r.B=n.watchers}st(n,r);n.isProxied=true}const l=V("createInstance",r.v);{t.t|=8}try{new n(t)}catch(e){a(e)}{t.t&=~8}{t.t|=128}l()}else{n=e.constructor;const r=e.localName;customElements.whenDefined(r).then((()=>t.t|=128))}if(n&&n.style){let e;if(typeof n.style==="string"){e=n.style}const t=pe(r);if(!c.has(t)){const l=V("registerStyles",r.v);ce(t,e,!!(r.t&1));l()}}}const s=t.I;const i=()=>Ke(t,true);if(s&&s["s-rc"]){s["s-rc"].push(i)}else{i()}};var ot=e=>{};var at=e=>{if((C.t&1)===0){const t=s(e);const r=t.l;const l=V("connectedCallback",r.v);if(!(t.t&1)){t.t|=1;let l;{l=e.getAttribute(h);if(l){le(e,r.v,l,t)}}if(!l){if(r.t&(4|8)){ft(e)}}{let r=e;while(r=r.parentNode||r.host){if(r.nodeType===1&&r.hasAttribute("s-id")&&r["s-p"]||r["s-p"]){ze(t,t.I=r);break}}}if(r._){Object.entries(r._).map((([t,[r]])=>{if(r&31&&e.hasOwnProperty(t)){const r=e[t];delete e[t];e[t]=r}}))}{it(e,t,r)}}else{if(t==null?void 0:t.q);else if(t==null?void 0:t.o){t.o.then((()=>ot()))}}l()}};var ft=e=>{const t=e["s-cr"]=S.createComment("");t["s-cn"]=true;Qe(e,t,e.firstChild)};var ut=async e=>{if((C.t&1)===0){s(e)}};var ct=(e,t)=>{const r={t:t[0],v:t[1]};{r._=t[2]}{r.B=e.B}{r.W=[]}const l=e.prototype.connectedCallback;const n=e.prototype.disconnectedCallback;Object.assign(e.prototype,{__registerHost(){i(this,r)},connectedCallback(){s(this);at(this);if(l){l.call(this)}},disconnectedCallback(){ut(this);if(n){n.call(this)}},__attachShadow(){{this.shadowRoot=this}}});e.is=r.v;return st(e,r)};var vt=(e,t)=>t;var dt=e=>C.T=e;var pt=e=>Object.assign(C,e);export{vt as F,k as H,dt as a,pt as b,ae as c,Y as d,U as g,G as h,ct as p,P as s};
3
+ //# sourceMappingURL=p-42200001.js.map