@gov-design-system-ce/components 4.6.3 → 4.6.5-b

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 (406) hide show
  1. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -1
  2. package/dist/cjs/core.cjs.js +1 -1
  3. package/dist/cjs/gov-banner.cjs.entry.js +3 -3
  4. package/dist/cjs/gov-banner.cjs.entry.js.map +1 -1
  5. package/dist/cjs/gov-banner.entry.cjs.js.map +1 -1
  6. package/dist/cjs/gov-flex_3.cjs.entry.js +1 -1
  7. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +67 -23
  8. package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
  9. package/dist/cjs/gov-form-autocomplete.entry.cjs.js.map +1 -1
  10. package/dist/cjs/gov-form-file.cjs.entry.js +65 -12
  11. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  12. package/dist/cjs/gov-form-file.entry.cjs.js.map +1 -1
  13. package/dist/cjs/gov-form-search.cjs.entry.js +1 -1
  14. package/dist/cjs/gov-form-search.cjs.entry.js.map +1 -1
  15. package/dist/cjs/gov-form-search.entry.cjs.js.map +1 -1
  16. package/dist/cjs/gov-form-select.cjs.entry.js +8 -15
  17. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  18. package/dist/cjs/gov-form-select.entry.cjs.js.map +1 -1
  19. package/dist/cjs/gov-tooltip.gov-tooltip-content.entry.cjs.js.map +1 -1
  20. package/dist/cjs/gov-tooltip_2.cjs.entry.js +34 -9
  21. package/dist/cjs/gov-tooltip_2.cjs.entry.js.map +1 -1
  22. package/dist/cjs/gov-wizard-item.cjs.entry.js +2 -2
  23. package/dist/cjs/gov-wizard.cjs.entry.js +1 -1
  24. package/dist/cjs/index-BEF5cZxd.js +4 -4
  25. package/dist/cjs/loader.cjs.js +1 -1
  26. package/dist/collection/components/gov-banner/gov-banner.js +4 -4
  27. package/dist/collection/components/gov-banner/gov-banner.js.map +1 -1
  28. package/dist/collection/components/gov-form/autocomplete/autocomplete.utils.js +14 -0
  29. package/dist/collection/components/gov-form/autocomplete/autocomplete.utils.js.map +1 -0
  30. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +76 -22
  31. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
  32. package/dist/collection/components/gov-form/file/gov-form-file.js +39 -3
  33. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  34. package/dist/collection/components/gov-form/search/gov-form-search.js +2 -2
  35. package/dist/collection/components/gov-form/search/gov-form-search.js.map +1 -1
  36. package/dist/collection/components/gov-form/select/gov-form-select.js +8 -15
  37. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  38. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +22 -1
  39. package/dist/collection/components/gov-tooltip/gov-tooltip-content.js.map +1 -1
  40. package/dist/collection/components/gov-tooltip/gov-tooltip.js +31 -8
  41. package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
  42. package/dist/collection/components/gov-wizard/gov-wizard-item.js +2 -2
  43. package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
  44. package/dist/collection/utils/file.utils.js +28 -9
  45. package/dist/collection/utils/file.utils.js.map +1 -1
  46. package/dist/components/gov-accordion-item.js +1 -1
  47. package/dist/components/gov-accordion.js +1 -1
  48. package/dist/components/gov-attachments-item.js +1 -1
  49. package/dist/components/gov-attachments.js +1 -1
  50. package/dist/components/gov-backdrop.js +1 -1
  51. package/dist/components/gov-banner.js +1 -1
  52. package/dist/components/gov-banner.js.map +1 -1
  53. package/dist/components/gov-blockquote.js +1 -1
  54. package/dist/components/gov-breadcrumbs.js +1 -1
  55. package/dist/components/gov-button.js +1 -1
  56. package/dist/components/gov-card.js +1 -1
  57. package/dist/components/gov-chip.js +1 -1
  58. package/dist/components/gov-collapsible.js +1 -1
  59. package/dist/components/gov-collapsible.js.map +1 -1
  60. package/dist/components/gov-container.js +1 -1
  61. package/dist/components/gov-control-group.js +1 -1
  62. package/dist/components/gov-cookiebar.js +1 -1
  63. package/dist/components/gov-dialog.js +1 -1
  64. package/dist/components/gov-dropdown.js +1 -1
  65. package/dist/components/gov-empty.js +1 -1
  66. package/dist/components/gov-error-code.js +1 -1
  67. package/dist/components/gov-flex.js +1 -1
  68. package/dist/components/gov-form-autocomplete.js +1 -1
  69. package/dist/components/gov-form-checkbox-group.js +1 -1
  70. package/dist/components/gov-form-checkbox.js +1 -1
  71. package/dist/components/gov-form-control.js +1 -1
  72. package/dist/components/gov-form-file.js +1 -1
  73. package/dist/components/gov-form-file.js.map +1 -1
  74. package/dist/components/gov-form-group.js +1 -1
  75. package/dist/components/gov-form-input.js +1 -1
  76. package/dist/components/gov-form-message.js +1 -1
  77. package/dist/components/gov-form-multi-select.js +1 -1
  78. package/dist/components/gov-form-multi-select.js.map +1 -1
  79. package/dist/components/gov-form-radio-group.js +1 -1
  80. package/dist/components/gov-form-radio.js +1 -1
  81. package/dist/components/gov-form-range.js +1 -1
  82. package/dist/components/gov-form-range.js.map +1 -1
  83. package/dist/components/gov-form-search.js +1 -1
  84. package/dist/components/gov-form-search.js.map +1 -1
  85. package/dist/components/gov-form-select.js +1 -1
  86. package/dist/components/gov-form-switch.js +1 -1
  87. package/dist/components/gov-grid-item.js +1 -1
  88. package/dist/components/gov-grid.js +1 -1
  89. package/dist/components/gov-icon.js +1 -1
  90. package/dist/components/gov-infobar.js +1 -1
  91. package/dist/components/gov-layout-column.js +1 -1
  92. package/dist/components/gov-layout.js +1 -1
  93. package/dist/components/gov-link.js +1 -1
  94. package/dist/components/gov-loading.js +1 -1
  95. package/dist/components/gov-message.js +1 -1
  96. package/dist/components/gov-pagination.js +1 -1
  97. package/dist/components/gov-skeleton.js +1 -1
  98. package/dist/components/gov-spacer.js +1 -1
  99. package/dist/components/gov-stepper-item.js +1 -1
  100. package/dist/components/gov-stepper.js +1 -1
  101. package/dist/components/gov-tabs-item.js +1 -1
  102. package/dist/components/gov-tabs.js +1 -1
  103. package/dist/components/gov-tag.js +1 -1
  104. package/dist/components/gov-theme-switch.js +1 -1
  105. package/dist/components/gov-tile.js +1 -1
  106. package/dist/components/gov-toast.js +1 -1
  107. package/dist/components/gov-tooltip-content.js +1 -1
  108. package/dist/components/gov-tooltip.js +1 -1
  109. package/dist/components/gov-wizard-item.js +1 -1
  110. package/dist/components/gov-wizard.js +1 -1
  111. package/dist/components/{p-BZTY3MxF.js → p-BGK46VRO.js} +2 -2
  112. package/dist/components/{p-DKo9A5gq.js → p-BHRF-5cf.js} +2 -2
  113. package/dist/components/{p-DesycS6d.js → p-BICk4EuO.js} +2 -2
  114. package/dist/components/{p-Bv5L0j6n.js → p-BNoNH6m-.js} +2 -2
  115. package/dist/components/{p-9imLQpxb.js → p-BSr8e18S.js} +2 -2
  116. package/dist/components/{p-BNnuBQvo.js → p-BxS4InzB.js} +2 -2
  117. package/dist/components/{p-CfaJM4SA.js → p-CMmyR4-k.js} +2 -2
  118. package/dist/components/{p-B0KFtEn3.js → p-CU0plGZP.js} +2 -2
  119. package/dist/components/{p-djqfSbq-.js → p-ClDhNt_H.js} +2 -2
  120. package/dist/components/{p-yqJEurSE.js → p-CnKqUwf9.js} +2 -2
  121. package/dist/components/p-DRXiDAHW.js +2 -0
  122. package/dist/components/{p-BrdXh0mI.js.map → p-DRXiDAHW.js.map} +1 -1
  123. package/dist/components/p-DjGO_trZ.js +2 -0
  124. package/dist/components/p-DjGO_trZ.js.map +1 -0
  125. package/dist/components/p-DmK9qaKH.js +2 -0
  126. package/dist/components/p-DmK9qaKH.js.map +1 -0
  127. package/dist/components/p-isPjiQbr.js +2 -0
  128. package/dist/components/p-isPjiQbr.js.map +1 -0
  129. package/dist/components/p-keC6luw7.js +2 -0
  130. package/dist/components/p-keC6luw7.js.map +1 -0
  131. package/dist/core/core.esm.js +1 -1
  132. package/dist/core/core.esm.js.map +1 -1
  133. package/dist/core/{p-3314505d.entry.js → p-00ab0454.entry.js} +2 -2
  134. package/dist/core/{p-3314505d.entry.js.map → p-00ab0454.entry.js.map} +1 -1
  135. package/dist/core/{p-9d9e9401.entry.js → p-05bb35e1.entry.js} +2 -2
  136. package/dist/core/{p-9d9e9401.entry.js.map → p-05bb35e1.entry.js.map} +1 -1
  137. package/dist/core/{p-e30968b3.entry.js → p-06497d64.entry.js} +2 -2
  138. package/dist/core/{p-e30968b3.entry.js.map → p-06497d64.entry.js.map} +1 -1
  139. package/dist/core/p-0675617d.entry.js +2 -0
  140. package/dist/core/{p-fca7a0d6.entry.js.map → p-0675617d.entry.js.map} +1 -1
  141. package/dist/core/{p-4d36cd18.entry.js → p-2493a7f3.entry.js} +2 -2
  142. package/dist/core/{p-4d36cd18.entry.js.map → p-2493a7f3.entry.js.map} +1 -1
  143. package/dist/core/p-2e15a654.entry.js +2 -0
  144. package/dist/core/{p-bd2df430.entry.js.map → p-2e15a654.entry.js.map} +1 -1
  145. package/dist/core/{p-1626cc67.entry.js → p-30ad7514.entry.js} +2 -2
  146. package/dist/core/{p-1626cc67.entry.js.map → p-30ad7514.entry.js.map} +1 -1
  147. package/dist/core/{p-558e75a6.entry.js → p-378cf8de.entry.js} +2 -2
  148. package/dist/core/{p-558e75a6.entry.js.map → p-378cf8de.entry.js.map} +1 -1
  149. package/dist/core/{p-be9af807.entry.js → p-3a4799b3.entry.js} +2 -2
  150. package/dist/core/{p-be9af807.entry.js.map → p-3a4799b3.entry.js.map} +1 -1
  151. package/dist/core/{p-f7bdb44a.entry.js → p-3ebbe75a.entry.js} +2 -2
  152. package/dist/core/{p-f7bdb44a.entry.js.map → p-3ebbe75a.entry.js.map} +1 -1
  153. package/dist/core/p-41bef63a.entry.js +2 -0
  154. package/dist/core/{p-469f14db.entry.js.map → p-41bef63a.entry.js.map} +1 -1
  155. package/dist/core/p-4342c252.entry.js +2 -0
  156. package/dist/core/p-4342c252.entry.js.map +1 -0
  157. package/dist/core/{p-c1b9f1ab.entry.js → p-473afd7d.entry.js} +2 -2
  158. package/dist/core/{p-c1b9f1ab.entry.js.map → p-473afd7d.entry.js.map} +1 -1
  159. package/dist/core/{p-5721cf9b.entry.js → p-48b74272.entry.js} +2 -2
  160. package/dist/core/{p-5721cf9b.entry.js.map → p-48b74272.entry.js.map} +1 -1
  161. package/dist/core/{p-04ec45ab.entry.js → p-49b67f59.entry.js} +2 -2
  162. package/dist/core/{p-04ec45ab.entry.js.map → p-49b67f59.entry.js.map} +1 -1
  163. package/dist/core/{p-6b44890d.entry.js → p-4bd3f101.entry.js} +2 -2
  164. package/dist/core/{p-6b44890d.entry.js.map → p-4bd3f101.entry.js.map} +1 -1
  165. package/dist/core/{p-157a1636.entry.js → p-4e534d68.entry.js} +2 -2
  166. package/dist/core/{p-157a1636.entry.js.map → p-4e534d68.entry.js.map} +1 -1
  167. package/dist/core/p-6638d034.entry.js +2 -0
  168. package/dist/core/{p-73bd93f9.entry.js.map → p-6638d034.entry.js.map} +1 -1
  169. package/dist/core/{p-46824842.entry.js → p-68a5d225.entry.js} +2 -2
  170. package/dist/core/{p-46824842.entry.js.map → p-68a5d225.entry.js.map} +1 -1
  171. package/dist/core/p-6ac9b0f2.entry.js +2 -0
  172. package/dist/core/p-6ac9b0f2.entry.js.map +1 -0
  173. package/dist/core/{p-0af96cc0.entry.js → p-6b0625ee.entry.js} +2 -2
  174. package/dist/core/{p-0af96cc0.entry.js.map → p-6b0625ee.entry.js.map} +1 -1
  175. package/dist/core/{p-4d365881.entry.js → p-78202a44.entry.js} +2 -2
  176. package/dist/core/{p-4d365881.entry.js.map → p-78202a44.entry.js.map} +1 -1
  177. package/dist/core/{p-eb766437.entry.js → p-80052953.entry.js} +2 -2
  178. package/dist/core/{p-eb766437.entry.js.map → p-80052953.entry.js.map} +1 -1
  179. package/dist/core/{p-d43959a0.entry.js → p-8ddb6dc6.entry.js} +2 -2
  180. package/dist/core/{p-d43959a0.entry.js.map → p-8ddb6dc6.entry.js.map} +1 -1
  181. package/dist/core/{p-d9c574f0.entry.js → p-90cc2ddb.entry.js} +2 -2
  182. package/dist/core/{p-d9c574f0.entry.js.map → p-90cc2ddb.entry.js.map} +1 -1
  183. package/dist/core/{p-f3887d6d.entry.js → p-91d5df66.entry.js} +2 -2
  184. package/dist/core/{p-f3887d6d.entry.js.map → p-91d5df66.entry.js.map} +1 -1
  185. package/dist/core/{p-187c0eda.entry.js → p-9321fb9d.entry.js} +2 -2
  186. package/dist/core/{p-187c0eda.entry.js.map → p-9321fb9d.entry.js.map} +1 -1
  187. package/dist/core/p-943a58b2.entry.js +2 -0
  188. package/dist/core/{p-33209782.entry.js.map → p-943a58b2.entry.js.map} +1 -1
  189. package/dist/core/p-B6CqPcY_.js.map +1 -1
  190. package/dist/core/p-B8TR1oqt.js +3 -0
  191. package/dist/core/p-B8TR1oqt.js.map +1 -0
  192. package/dist/core/p-BUmDydor.js.map +1 -1
  193. package/dist/core/p-BcQO4NH2.js.map +1 -1
  194. package/dist/core/p-BjcqOprh.js.map +1 -1
  195. package/dist/core/p-Bo1ROm5Q.js.map +1 -1
  196. package/dist/core/p-Bz_RzYFb.js.map +1 -1
  197. package/dist/core/p-C3R1T_pg.js.map +1 -1
  198. package/dist/core/p-C6JN9gdb.js.map +1 -1
  199. package/dist/core/p-CDIRBJsi.js.map +1 -1
  200. package/dist/core/p-CQvUntGY.js.map +1 -1
  201. package/dist/core/p-Ccwpa1ck.js.map +1 -1
  202. package/dist/core/p-CgDnDrq5.js.map +1 -1
  203. package/dist/core/p-Cjg0wpDG.js.map +1 -1
  204. package/dist/core/p-CoD1xawt.js.map +1 -1
  205. package/dist/core/p-Cx3bEC5v.js.map +1 -1
  206. package/dist/core/p-D4TGB274.js.map +1 -1
  207. package/dist/core/p-DBXGhafv.js.map +1 -1
  208. package/dist/core/p-DNztiAH0.js.map +1 -1
  209. package/dist/core/p-DQuL1Twl.js.map +1 -1
  210. package/dist/core/p-DYcNEwSZ.js.map +1 -1
  211. package/dist/core/p-EeKNA85D.js.map +1 -1
  212. package/dist/core/p-GYov8gU1.js.map +1 -1
  213. package/dist/core/p-NOJjz9dT.js.map +1 -1
  214. package/dist/core/p-Q99QrOoi.js.map +1 -1
  215. package/dist/core/p-U40vKHrs.js.map +1 -1
  216. package/dist/core/p-a4fa2ffc.entry.js +2 -0
  217. package/dist/core/{p-c4734357.entry.js.map → p-a4fa2ffc.entry.js.map} +1 -1
  218. package/dist/core/{p-511eed88.entry.js → p-a6f27583.entry.js} +2 -2
  219. package/dist/core/{p-511eed88.entry.js.map → p-a6f27583.entry.js.map} +1 -1
  220. package/dist/core/p-a7c322a7.entry.js +2 -0
  221. package/dist/core/{p-abb7780e.entry.js.map → p-a7c322a7.entry.js.map} +1 -1
  222. package/dist/core/{p-6d2ce4c7.entry.js → p-ab367b0c.entry.js} +2 -2
  223. package/dist/core/{p-6d2ce4c7.entry.js.map → p-ab367b0c.entry.js.map} +1 -1
  224. package/dist/core/{p-c6b55c0a.entry.js → p-ac81cdf6.entry.js} +2 -2
  225. package/dist/core/{p-c6b55c0a.entry.js.map → p-ac81cdf6.entry.js.map} +1 -1
  226. package/dist/core/{p-a2c61d50.entry.js → p-ad9227b3.entry.js} +2 -2
  227. package/dist/core/{p-a2c61d50.entry.js.map → p-ad9227b3.entry.js.map} +1 -1
  228. package/dist/core/p-af2bd9d3.entry.js +2 -0
  229. package/dist/core/p-af2bd9d3.entry.js.map +1 -0
  230. package/dist/core/{p-70b5555f.entry.js → p-b0d4d6bd.entry.js} +2 -2
  231. package/dist/core/{p-70b5555f.entry.js.map → p-b0d4d6bd.entry.js.map} +1 -1
  232. package/dist/core/p-b181f85f.entry.js +2 -0
  233. package/dist/core/{p-57ca8ac7.entry.js.map → p-b181f85f.entry.js.map} +1 -1
  234. package/dist/core/{p-5305e82e.entry.js → p-b2648255.entry.js} +2 -2
  235. package/dist/core/{p-5305e82e.entry.js.map → p-b2648255.entry.js.map} +1 -1
  236. package/dist/core/{p-65a09763.entry.js → p-b37bd421.entry.js} +2 -2
  237. package/dist/core/{p-65a09763.entry.js.map → p-b37bd421.entry.js.map} +1 -1
  238. package/dist/core/{p-91cbee1b.entry.js → p-b5e40f40.entry.js} +2 -2
  239. package/dist/core/{p-91cbee1b.entry.js.map → p-b5e40f40.entry.js.map} +1 -1
  240. package/dist/core/p-b77c283e.entry.js +2 -0
  241. package/dist/core/{p-bd389bfd.entry.js.map → p-b77c283e.entry.js.map} +1 -1
  242. package/dist/core/p-bb5b9ccd.entry.js +2 -0
  243. package/dist/core/p-bb5b9ccd.entry.js.map +1 -0
  244. package/dist/core/{p-4c02094d.entry.js → p-c9b2f97c.entry.js} +2 -2
  245. package/dist/core/{p-4c02094d.entry.js.map → p-c9b2f97c.entry.js.map} +1 -1
  246. package/dist/core/{p-eb3f6808.entry.js → p-caf817d4.entry.js} +2 -2
  247. package/dist/core/{p-eb3f6808.entry.js.map → p-caf817d4.entry.js.map} +1 -1
  248. package/dist/core/p-dc0bd1e5.entry.js +2 -0
  249. package/dist/core/{p-3e07bf07.entry.js.map → p-dc0bd1e5.entry.js.map} +1 -1
  250. package/dist/core/{p-db860031.entry.js → p-dd390459.entry.js} +2 -2
  251. package/dist/core/{p-db860031.entry.js.map → p-dd390459.entry.js.map} +1 -1
  252. package/dist/core/p-de5dfd70.entry.js +2 -0
  253. package/dist/core/{p-4da8ac1d.entry.js.map → p-de5dfd70.entry.js.map} +1 -1
  254. package/dist/core/p-dfb76a14.entry.js +2 -0
  255. package/dist/core/p-dfb76a14.entry.js.map +1 -0
  256. package/dist/core/{p-cd163299.entry.js → p-e17def2b.entry.js} +2 -2
  257. package/dist/core/{p-cd163299.entry.js.map → p-e17def2b.entry.js.map} +1 -1
  258. package/dist/core/{p-e39e5dc7.entry.js → p-e1d58751.entry.js} +2 -2
  259. package/dist/core/{p-e39e5dc7.entry.js.map → p-e1d58751.entry.js.map} +1 -1
  260. package/dist/core/{p-3e07bf07.entry.js → p-e913cfc8.entry.js} +2 -2
  261. package/dist/core/{p-90ab65b4.entry.js.map → p-e913cfc8.entry.js.map} +1 -1
  262. package/dist/core/{p-da997fb3.entry.js → p-ea299832.entry.js} +2 -2
  263. package/dist/core/{p-da997fb3.entry.js.map → p-ea299832.entry.js.map} +1 -1
  264. package/dist/core/{p-852310d9.entry.js → p-eff8ffff.entry.js} +2 -2
  265. package/dist/core/{p-852310d9.entry.js.map → p-eff8ffff.entry.js.map} +1 -1
  266. package/dist/core/{p-4d902f20.entry.js → p-f2d24551.entry.js} +2 -2
  267. package/dist/core/{p-4d902f20.entry.js.map → p-f2d24551.entry.js.map} +1 -1
  268. package/dist/core/{p-5c872d64.entry.js → p-f515d912.entry.js} +2 -2
  269. package/dist/core/{p-bf573a56.entry.js → p-febff4d1.entry.js} +2 -2
  270. package/dist/core/{p-bf573a56.entry.js.map → p-febff4d1.entry.js.map} +1 -1
  271. package/dist/core/p-vN03FcXN.js.map +1 -1
  272. package/dist/esm/app-globals-DQuL1Twl.js.map +1 -1
  273. package/dist/esm/core.js +1 -1
  274. package/dist/esm/gov-banner.entry.js +3 -3
  275. package/dist/esm/gov-banner.entry.js.map +1 -1
  276. package/dist/esm/gov-flex_3.entry.js +1 -1
  277. package/dist/esm/gov-form-autocomplete.entry.js +68 -24
  278. package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
  279. package/dist/esm/gov-form-file.entry.js +65 -12
  280. package/dist/esm/gov-form-file.entry.js.map +1 -1
  281. package/dist/esm/gov-form-search.entry.js +1 -1
  282. package/dist/esm/gov-form-search.entry.js.map +1 -1
  283. package/dist/esm/gov-form-select.entry.js +8 -15
  284. package/dist/esm/gov-form-select.entry.js.map +1 -1
  285. package/dist/esm/gov-tooltip.gov-tooltip-content.entry.js.map +1 -1
  286. package/dist/esm/gov-tooltip_2.entry.js +34 -9
  287. package/dist/esm/gov-tooltip_2.entry.js.map +1 -1
  288. package/dist/esm/gov-wizard-item.entry.js +2 -2
  289. package/dist/esm/gov-wizard.entry.js +1 -1
  290. package/dist/esm/index-ClISz4NF.js +4 -4
  291. package/dist/esm/loader.js +1 -1
  292. package/dist/hydrate/index.js +187 -69
  293. package/dist/hydrate/index.mjs +187 -69
  294. package/dist/types/Users/jf/dev/designSystem/gov-design-system/packages/core/.stencil/packages/core/stencil.config.d.ts +2 -0
  295. package/dist/types/components/gov-form/autocomplete/autocomplete.utils.d.ts +2 -0
  296. package/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +9 -0
  297. package/dist/types/components/gov-form/file/gov-form-file.d.ts +1 -0
  298. package/dist/types/components/gov-form/select/gov-form-select.d.ts +1 -1
  299. package/dist/types/components/gov-tooltip/gov-tooltip-content.d.ts +4 -0
  300. package/dist/types/components/gov-tooltip/gov-tooltip.d.ts +3 -0
  301. package/dist/types/components.d.ts +612 -121
  302. package/dist/types/stencil-public-runtime.d.ts +170 -11
  303. package/package.json +32 -28
  304. package/readme.md +8 -0
  305. package/dist/components/p-BrdXh0mI.js +0 -2
  306. package/dist/components/p-DFu5UVoP.js +0 -2
  307. package/dist/components/p-DFu5UVoP.js.map +0 -1
  308. package/dist/components/p-DMVQRz4f.js +0 -2
  309. package/dist/components/p-DMVQRz4f.js.map +0 -1
  310. package/dist/components/p-UDT3DloZ.js +0 -2
  311. package/dist/components/p-UDT3DloZ.js.map +0 -1
  312. package/dist/components/p-x3w8Mun_.js +0 -2
  313. package/dist/components/p-x3w8Mun_.js.map +0 -1
  314. package/dist/core/core.css +0 -14776
  315. package/dist/core/gov-accordion-item.entry.esm.js.map +0 -1
  316. package/dist/core/gov-accordion.entry.esm.js.map +0 -1
  317. package/dist/core/gov-attachments.gov-attachments-item.gov-form-message.entry.esm.js.map +0 -1
  318. package/dist/core/gov-backdrop.entry.esm.js.map +0 -1
  319. package/dist/core/gov-banner.entry.esm.js.map +0 -1
  320. package/dist/core/gov-blockquote.entry.esm.js.map +0 -1
  321. package/dist/core/gov-breadcrumbs.entry.esm.js.map +0 -1
  322. package/dist/core/gov-button.entry.esm.js.map +0 -1
  323. package/dist/core/gov-card.entry.esm.js.map +0 -1
  324. package/dist/core/gov-chip.entry.esm.js.map +0 -1
  325. package/dist/core/gov-collapsible.entry.esm.js.map +0 -1
  326. package/dist/core/gov-container.entry.esm.js.map +0 -1
  327. package/dist/core/gov-control-group.entry.esm.js.map +0 -1
  328. package/dist/core/gov-cookiebar.entry.esm.js.map +0 -1
  329. package/dist/core/gov-dialog.entry.esm.js.map +0 -1
  330. package/dist/core/gov-dropdown.entry.esm.js.map +0 -1
  331. package/dist/core/gov-empty.entry.esm.js.map +0 -1
  332. package/dist/core/gov-error-code.entry.esm.js.map +0 -1
  333. package/dist/core/gov-flex.gov-icon.gov-theme-switch.entry.esm.js.map +0 -1
  334. package/dist/core/gov-form-autocomplete.entry.esm.js.map +0 -1
  335. package/dist/core/gov-form-checkbox-group.entry.esm.js.map +0 -1
  336. package/dist/core/gov-form-checkbox.entry.esm.js.map +0 -1
  337. package/dist/core/gov-form-control.entry.esm.js.map +0 -1
  338. package/dist/core/gov-form-file.entry.esm.js.map +0 -1
  339. package/dist/core/gov-form-group.entry.esm.js.map +0 -1
  340. package/dist/core/gov-form-input.gov-skeleton.entry.esm.js.map +0 -1
  341. package/dist/core/gov-form-label.entry.esm.js.map +0 -1
  342. package/dist/core/gov-form-multi-select.entry.esm.js.map +0 -1
  343. package/dist/core/gov-form-password-power.entry.esm.js.map +0 -1
  344. package/dist/core/gov-form-radio-group.entry.esm.js.map +0 -1
  345. package/dist/core/gov-form-radio.entry.esm.js.map +0 -1
  346. package/dist/core/gov-form-range.entry.esm.js.map +0 -1
  347. package/dist/core/gov-form-search.entry.esm.js.map +0 -1
  348. package/dist/core/gov-form-select.entry.esm.js.map +0 -1
  349. package/dist/core/gov-form-switch.entry.esm.js.map +0 -1
  350. package/dist/core/gov-grid-item.entry.esm.js.map +0 -1
  351. package/dist/core/gov-grid.entry.esm.js.map +0 -1
  352. package/dist/core/gov-infobar.entry.esm.js.map +0 -1
  353. package/dist/core/gov-layout-column.entry.esm.js.map +0 -1
  354. package/dist/core/gov-layout.entry.esm.js.map +0 -1
  355. package/dist/core/gov-lifecycle.entry.esm.js.map +0 -1
  356. package/dist/core/gov-link.entry.esm.js.map +0 -1
  357. package/dist/core/gov-loading.entry.esm.js.map +0 -1
  358. package/dist/core/gov-message.entry.esm.js.map +0 -1
  359. package/dist/core/gov-pagination.entry.esm.js.map +0 -1
  360. package/dist/core/gov-spacer.entry.esm.js.map +0 -1
  361. package/dist/core/gov-stepper-item.entry.esm.js.map +0 -1
  362. package/dist/core/gov-stepper.entry.esm.js.map +0 -1
  363. package/dist/core/gov-tabs-item.entry.esm.js.map +0 -1
  364. package/dist/core/gov-tabs.entry.esm.js.map +0 -1
  365. package/dist/core/gov-tag.entry.esm.js.map +0 -1
  366. package/dist/core/gov-tile.entry.esm.js.map +0 -1
  367. package/dist/core/gov-toast.entry.esm.js.map +0 -1
  368. package/dist/core/gov-tooltip.gov-tooltip-content.entry.esm.js.map +0 -1
  369. package/dist/core/gov-wizard-item.entry.esm.js.map +0 -1
  370. package/dist/core/gov-wizard.entry.esm.js.map +0 -1
  371. package/dist/core/loader.esm.js.map +0 -1
  372. package/dist/core/p-11fc3899.entry.js +0 -2
  373. package/dist/core/p-11fc3899.entry.js.map +0 -1
  374. package/dist/core/p-33209782.entry.js +0 -2
  375. package/dist/core/p-33b462c9.entry.js +0 -2
  376. package/dist/core/p-33b462c9.entry.js.map +0 -1
  377. package/dist/core/p-3e5ae012.entry.js +0 -2
  378. package/dist/core/p-3e5ae012.entry.js.map +0 -1
  379. package/dist/core/p-469f14db.entry.js +0 -2
  380. package/dist/core/p-4da8ac1d.entry.js +0 -2
  381. package/dist/core/p-57ca8ac7.entry.js +0 -2
  382. package/dist/core/p-73bd93f9.entry.js +0 -2
  383. package/dist/core/p-90ab65b4.entry.js +0 -2
  384. package/dist/core/p-ClISz4NF.js +0 -3
  385. package/dist/core/p-ClISz4NF.js.map +0 -1
  386. package/dist/core/p-abb7780e.entry.js +0 -2
  387. package/dist/core/p-bd2df430.entry.js +0 -2
  388. package/dist/core/p-bd389bfd.entry.js +0 -2
  389. package/dist/core/p-c21bc8f9.entry.js +0 -2
  390. package/dist/core/p-c21bc8f9.entry.js.map +0 -1
  391. package/dist/core/p-c4734357.entry.js +0 -2
  392. package/dist/core/p-def34832.entry.js +0 -2
  393. package/dist/core/p-def34832.entry.js.map +0 -1
  394. package/dist/core/p-fca7a0d6.entry.js +0 -2
  395. package/dist/types/work/packages/core/.stencil/packages/core/stencil.config.d.ts +0 -2
  396. /package/dist/components/{p-BZTY3MxF.js.map → p-BGK46VRO.js.map} +0 -0
  397. /package/dist/components/{p-DKo9A5gq.js.map → p-BHRF-5cf.js.map} +0 -0
  398. /package/dist/components/{p-DesycS6d.js.map → p-BICk4EuO.js.map} +0 -0
  399. /package/dist/components/{p-Bv5L0j6n.js.map → p-BNoNH6m-.js.map} +0 -0
  400. /package/dist/components/{p-9imLQpxb.js.map → p-BSr8e18S.js.map} +0 -0
  401. /package/dist/components/{p-BNnuBQvo.js.map → p-BxS4InzB.js.map} +0 -0
  402. /package/dist/components/{p-CfaJM4SA.js.map → p-CMmyR4-k.js.map} +0 -0
  403. /package/dist/components/{p-B0KFtEn3.js.map → p-CU0plGZP.js.map} +0 -0
  404. /package/dist/components/{p-djqfSbq-.js.map → p-ClDhNt_H.js.map} +0 -0
  405. /package/dist/components/{p-yqJEurSE.js.map → p-CnKqUwf9.js.map} +0 -0
  406. /package/dist/core/{p-5c872d64.entry.js.map → p-f515d912.entry.js.map} +0 -0
@@ -6,7 +6,7 @@ var appGlobals = require('./app-globals-V2Kpy_OQ.js');
6
6
  const defineCustomElements = async (win, options) => {
7
7
  if (typeof window === 'undefined') return undefined;
8
8
  await appGlobals.globalScripts();
9
- return index.bootstrapLazy(JSON.parse("[[\"gov-form-file.cjs\",[[4,\"gov-form-file\",{\"expanded\":[4],\"required\":[4],\"disabled\":[516],\"resetAfterPick\":[4,\"reset-after-pick\"],\"ignoreFileDuplicationCheck\":[4,\"ignore-file-duplication-check\"],\"displayAttachments\":[4,\"display-attachments\"],\"name\":[1],\"accept\":[1],\"multiple\":[4],\"maxFileSize\":[2,\"max-file-size\"],\"identifier\":[1],\"invalid\":[4],\"errorSize\":[1,\"error-size\"],\"errorAccept\":[1,\"error-accept\"],\"accessibleAttachmentsLabel\":[1,\"accessible-attachments-label\"],\"files\":[32],\"inheritedAttributes\":[32],\"getRef\":[64],\"getAreaRef\":[64],\"reset\":[64]},null,{\"disabled\":[\"watchControlAttrs\"],\"invalid\":[\"watchControlAttrs\"]}]]],[\"gov-form-multi-select.cjs\",[[4,\"gov-form-multi-select\",{\"value\":[1537],\"options\":[1537],\"identifier\":[1],\"placeholder\":[1],\"size\":[1],\"name\":[1],\"hideSelectedList\":[4,\"hide-selected-list\"],\"required\":[4],\"disabled\":[516],\"invalid\":[516],\"success\":[4],\"messageEmpty\":[1,\"message-empty\"],\"messageLoading\":[1,\"message-loading\"],\"focused\":[32],\"valueState\":[32],\"selectedOptionsState\":[32],\"optionsState\":[32],\"inheritedAttributes\":[32],\"setFocus\":[64],\"setValue\":[64],\"getRef\":[64]},null,{\"size\":[\"validateSize\"],\"options\":[\"watchOptions\"],\"value\":[\"watchValue\"]}]]],[\"gov-dialog.cjs\",[[4,\"gov-dialog\",{\"open\":[1540],\"blockClose\":[4,\"block-close\"],\"blockBackdropClose\":[4,\"block-backdrop-close\"],\"role\":[1],\"labelTag\":[1,\"label-tag\"],\"accessibleLabelledBy\":[1,\"accessible-labelled-by\"],\"accessibleDescribedBy\":[1,\"accessible-described-by\"],\"accessibleCloseLabel\":[1,\"accessible-close-label\"],\"accessibleCloseLabelledBy\":[1,\"accessible-close-labelled-by\"],\"setFocus\":[64],\"validateAccessibility\":[64]},null,{\"open\":[\"watchOpen\"]}]]],[\"gov-form-range.cjs\",[[4,\"gov-form-range\",{\"size\":[1],\"value\":[1537],\"identifier\":[1],\"name\":[1],\"min\":[8],\"max\":[8],\"step\":[8],\"tooltip\":[4],\"input\":[4],\"listIdentifier\":[1,\"list-identifier\"],\"required\":[516],\"success\":[516],\"invalid\":[516],\"disabled\":[516],\"inheritedAttributes\":[32],\"setFocus\":[64],\"setValue\":[64],\"clearValue\":[64],\"getRef\":[64]},null,{\"size\":[\"validateSize\",\"watchControlAttrs\"],\"value\":[\"watchValue\"],\"disabled\":[\"watchControlAttrs\"],\"invalid\":[\"watchControlAttrs\"],\"success\":[\"watchControlAttrs\"]}]]],[\"gov-pagination.cjs\",[[0,\"gov-pagination\",{\"type\":[1],\"current\":[2],\"total\":[2],\"selectIdentifier\":[1,\"select-identifier\"],\"size\":[1],\"color\":[1],\"pageSize\":[2,\"page-size\"],\"maxPages\":[2,\"max-pages\"],\"link\":[1],\"accessibleSelectLabel\":[1,\"accessible-select-label\"],\"accessiblePageLabel\":[1,\"accessible-page-label\"],\"labelPrev\":[1,\"label-prev\"],\"labelStart\":[1,\"label-start\"],\"labelNext\":[1,\"label-next\"],\"labelEnd\":[1,\"label-end\"],\"pagination\":[32],\"inheritedAttributes\":[32]},null,{\"type\":[\"validateType\"],\"size\":[\"validateSize\"],\"color\":[\"validateColor\"],\"current\":[\"recalculate\"],\"total\":[\"recalculate\"],\"pageSize\":[\"recalculate\"],\"maxPages\":[\"recalculate\"]}]]],[\"gov-breadcrumbs.cjs\",[[4,\"gov-breadcrumbs\",{\"collapsible\":[4],\"isExpanded\":[4,\"is-expanded\"],\"accessibleLabel\":[1,\"accessible-label\"],\"accessibleLabelledBy\":[1,\"accessible-labelledby\"],\"accessibleToggleLabel\":[1,\"accessible-toggle-label\"],\"expanded\":[32],\"toggleOption\":[32],\"validateAccessibility\":[64]}]]],[\"gov-collapsible.cjs\",[[4,\"gov-collapsible\",{\"size\":[1],\"identifier\":[1],\"label\":[1],\"disabled\":[4],\"open\":[1028],\"inheritedAttributes\":[32]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-infobar.cjs\",[[4,\"gov-infobar\",{\"color\":[1],\"type\":[1],\"role\":[1],\"accessibleCloseLabel\":[1,\"accessible-close-label\"],\"accessibleToggleLabel\":[1,\"accessible-toggle-label\"],\"closable\":[4],\"toggleContent\":[32],\"inheritedAttributes\":[32]},null,{\"color\":[\"validateColor\"]}]]],[\"gov-loading.cjs\",[[4,\"gov-loading\",{\"size\":[1]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-tabs.cjs\",[[4,\"gov-tabs\",{\"type\":[1],\"size\":[1],\"color\":[1],\"orientation\":[1],\"direction\":[513],\"controllers\":[32],\"focusIndex\":[32],\"inheritedAttributes\":[32],\"refresh\":[64],\"currentTab\":[64],\"setActiveTab\":[64],\"rerender\":[64]},null,{\"type\":[\"validateType\"],\"color\":[\"validateColor\"],\"size\":[\"validateSize\"]}]]],[\"gov-toast.cjs\",[[4,\"gov-toast\",{\"color\":[1],\"gravity\":[1],\"position\":[1],\"type\":[1],\"time\":[2],\"closeLabel\":[1,\"close-label\"],\"accessibleCloseLabel\":[1,\"accessible-close-label\"],\"inheritedAttributes\":[32],\"destroy\":[64]},null,{\"color\":[\"validateColor\"]}]]],[\"gov-accordion-item.cjs\",[[4,\"gov-accordion-item\",{\"identifier\":[1],\"size\":[1025],\"disabled\":[4],\"open\":[1028],\"openState\":[32],\"toggle\":[64],\"currentState\":[64]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-blockquote.cjs\",[[4,\"gov-blockquote\",{\"type\":[513],\"cite\":[1]}]]],[\"gov-card.cjs\",[[4,\"gov-card\",{\"direction\":[1],\"collapsible\":[4],\"clickable\":[4],\"open\":[1540],\"href\":[513],\"target\":[1],\"accessibleTriggerLabel\":[1,\"accessible-label\"],\"accessibleTriggerLabelledBy\":[1,\"accessible-labelledby\"],\"validateAccessibility\":[64]}]]],[\"gov-form-checkbox.cjs\",[[4,\"gov-form-checkbox\",{\"value\":[1],\"checked\":[1540],\"required\":[4],\"disabled\":[516],\"indeterminate\":[516],\"name\":[1],\"size\":[513],\"identifier\":[1],\"noLabel\":[4,\"no-label\"],\"invalid\":[4],\"inheritedAttributes\":[32],\"getRef\":[64]},null,{\"size\":[\"validateSize\",\"watchControlAttrs\"],\"disabled\":[\"watchControlAttrs\"],\"invalid\":[\"watchControlAttrs\"]}]]],[\"gov-form-switch.cjs\",[[4,\"gov-form-switch\",{\"value\":[1],\"noLabel\":[4,\"no-label\"],\"checked\":[1540],\"required\":[4],\"disabled\":[516],\"name\":[1],\"size\":[513],\"identifier\":[1],\"invalid\":[4],\"inheritedAttributes\":[32],\"getRef\":[64]},null,{\"size\":[\"validateSize\",\"watchDisabled\"],\"disabled\":[\"watchDisabled\"],\"invalid\":[\"watchDisabled\"]}]]],[\"gov-link.cjs\",[[4,\"gov-link\",{\"size\":[1],\"external\":[4],\"truncate\":[4],\"href\":[1],\"target\":[1],\"inheritedAttributes\":[32]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-tag.cjs\",[[4,\"gov-tag\",{\"iconStart\":[1,\"icon-start\"],\"iconEnd\":[1,\"icon-end\"],\"size\":[513],\"color\":[513],\"type\":[513],\"expanded\":[516]},null,{\"color\":[\"validateColor\"],\"size\":[\"validateSize\"]}]]],[\"gov-tile.cjs\",[[4,\"gov-tile\",{\"size\":[513],\"orientation\":[1],\"noBorder\":[4,\"no-border\"],\"href\":[513],\"target\":[1],\"getTriggerRef\":[64]}]]],[\"gov-wizard-item.cjs\",[[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]},null,{\"color\":[\"validateColor\"]}]]],[\"gov-accordion.cjs\",[[4,\"gov-accordion\",{\"size\":[1],\"noBorder\":[4,\"no-border\"]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-banner.cjs\",[[4,\"gov-banner\",{\"size\":[513],\"background\":[1],\"foreground\":[1],\"textColor\":[1,\"text-color\"]},null,{\"size\":[\"validateSize\"],\"background\":[\"validateBackground\"],\"foreground\":[\"validateForeground\"],\"text-color\":[\"validateTextColor\"]}]]],[\"gov-container.cjs\",[[4,\"gov-container\"]]],[\"gov-control-group.cjs\",[[4,\"gov-control-group\",{\"color\":[1],\"noBorder\":[4,\"no-border\"],\"noInnerBorder\":[4,\"no-inner-border\"],\"fitContent\":[4,\"fit-content\"]},null,{\"color\":[\"validateColor\"]}]]],[\"gov-cookiebar.cjs\",[[4,\"gov-cookiebar\"]]],[\"gov-dropdown.cjs\",[[4,\"gov-dropdown\",{\"identifier\":[1],\"open\":[1028],\"position\":[1],\"getState\":[64],\"toggle\":[64]},null,{\"open\":[\"watchOpen\"]}]]],[\"gov-empty.cjs\",[[4,\"gov-empty\",{\"size\":[1],\"direction\":[1],\"align\":[1]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-error-code.cjs\",[[4,\"gov-error-code\"]]],[\"gov-form-checkbox-group.cjs\",[[4,\"gov-form-checkbox-group\",{\"gap\":[1],\"orientation\":[1],\"value\":[1025]},null,{\"gap\":[\"validateGap\"],\"orientation\":[\"validateOrientation\"]}]]],[\"gov-form-control.cjs\",[[4,\"gov-form-control\",{\"identifier\":[1],\"invalid\":[516],\"disabled\":[516],\"success\":[516],\"fieldset\":[4],\"size\":[1]}]]],[\"gov-form-group.cjs\",[[4,\"gov-form-group\",{\"gap\":[1],\"orientation\":[1]},null,{\"gap\":[\"validateGap\"],\"orientation\":[\"validateOrientation\"]}]]],[\"gov-form-label.cjs\",[[4,\"gov-form-label\",{\"identifier\":[1],\"size\":[1],\"required\":[4],\"legend\":[4]}]]],[\"gov-form-password-power.cjs\",[[4,\"gov-form-password-power\",{\"power\":[514]}]]],[\"gov-form-radio.cjs\",[[4,\"gov-form-radio\",{\"value\":[1],\"noLabel\":[4,\"no-label\"],\"checked\":[1540],\"required\":[4],\"disabled\":[516],\"name\":[1],\"size\":[1],\"identifier\":[1],\"invalid\":[4],\"inheritedAttributes\":[32],\"getRef\":[64]},null,{\"size\":[\"validateSize\",\"watchControlAttrs\"],\"disabled\":[\"watchControlAttrs\"],\"invalid\":[\"watchControlAttrs\"]}]]],[\"gov-form-radio-group.cjs\",[[4,\"gov-form-radio-group\",{\"gap\":[1],\"orientation\":[1],\"value\":[1025]},null,{\"gap\":[\"validateGap\"],\"orientation\":[\"validateOrientation\"]}]]],[\"gov-form-search.cjs\",[[4,\"gov-form-search\",{\"size\":[1],\"color\":[513]}]]],[\"gov-grid.cjs\",[[4,\"gov-grid\",{\"alignItems\":[513,\"align-items\"],\"justifyItems\":[513,\"justify-items\"],\"gap\":[513]}]]],[\"gov-grid-item.cjs\",[[4,\"gov-grid-item\",{\"column\":[1,\"col-span\"],\"columnSm\":[1,\"col-span-sm\"],\"columnMd\":[1,\"col-span-md\"],\"columnLg\":[1,\"col-span-lg\"],\"columnXl\":[1,\"col-span-xl\"],\"row\":[1,\"row-span\"],\"rowSm\":[1,\"row-span-sm\"],\"rowMd\":[1,\"row-span-md\"],\"rowLg\":[1,\"row-span-lg\"],\"rowXl\":[1,\"row-span-xl\"]}]]],[\"gov-layout.cjs\",[[4,\"gov-layout\",{\"type\":[1],\"variant\":[1],\"inverse\":[4]}]]],[\"gov-layout-column.cjs\",[[4,\"gov-layout-column\"]]],[\"gov-lifecycle.cjs\",[[0,\"gov-lifecycle\"]]],[\"gov-message.cjs\",[[4,\"gov-message\",{\"color\":[1],\"type\":[1]},null,{\"color\":[\"validateColor\"]}]]],[\"gov-spacer.cjs\",[[0,\"gov-spacer\",{\"size\":[1],\"breakpoint\":[1]},null,{\"size\":[\"validateSize\"],\"breakpoint\":[\"validateBreakpoint\"]}]]],[\"gov-stepper.cjs\",[[4,\"gov-stepper\",{\"size\":[1]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-stepper-item.cjs\",[[4,\"gov-stepper-item\",{\"color\":[1],\"size\":[1],\"identifier\":[1]},null,{\"color\":[\"validateColor\"]}]]],[\"gov-tabs-item.cjs\",[[4,\"gov-tabs-item\",{\"identifier\":[1],\"triggerIdentifier\":[1,\"trigger-identifier\"],\"label\":[513],\"disabled\":[516],\"iconStart\":[513,\"icon-start\"],\"iconEnd\":[513,\"icon-end\"],\"default\":[4],\"isActive\":[32],\"getIdentifier\":[64],\"getTriggerIdentifier\":[64],\"getDisableState\":[64],\"setActiveStatus\":[64]},null,{\"label\":[\"rerenderParent\"],\"disabled\":[\"rerenderParent\"]}]]],[\"gov-wizard.cjs\",[[4,\"gov-wizard\",{\"size\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-flex_3.cjs\",[[0,\"gov-theme-switch\",{\"size\":[1],\"displayLabel\":[4,\"display-label\"],\"ariaLabelLight\":[1,\"aria-label-light\"],\"ariaLabelDark\":[1,\"aria-label-dark\"],\"labelLight\":[1,\"label-light\"],\"labelDark\":[1,\"label-dark\"],\"theme\":[32]},null,{\"size\":[\"validateSize\"],\"theme\":[\"watchTheme\"]}],[4,\"gov-flex\",{\"direction\":[513],\"justifyContent\":[513,\"justify-content\"],\"alignItems\":[513,\"align-items\"],\"wrap\":[513],\"alignContent\":[513,\"align-content\"],\"alignSelf\":[513,\"align-self\"],\"gap\":[513],\"responsive\":[513]}],[0,\"gov-icon\",{\"size\":[513],\"color\":[513],\"name\":[513],\"type\":[513],\"visible\":[32],\"error\":[32]},null,{\"size\":[\"validateSize\"],\"color\":[\"validateColor\"],\"name\":[\"loadIconPathData\"]}]]],[\"gov-form-autocomplete.cjs\",[[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]},null,{\"size\":[\"validateSize\"],\"options\":[\"watchOptions\"]}]]],[\"gov-chip.cjs\",[[4,\"gov-chip\",{\"disabled\":[516],\"href\":[1],\"target\":[1],\"iconStart\":[1,\"icon-start\"],\"iconEnd\":[1,\"icon-end\"],\"size\":[1],\"tag\":[1],\"color\":[1],\"type\":[513],\"focusable\":[4],\"identifier\":[1],\"inheritedAttributes\":[32],\"geRef\":[64],\"setFocus\":[64]},null,{\"color\":[\"validateColor\"],\"size\":[\"validateSize\"]}]]],[\"gov-form-select.cjs\",[[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]},null,{\"size\":[\"validateSize\",\"watchControlAttrs\"],\"options\":[\"watchOptions\"],\"disabled\":[\"watchControlAttrs\"],\"invalid\":[\"watchControlAttrs\"],\"success\":[\"watchControlAttrs\"],\"value\":[\"watchValue\"]}]]],[\"gov-backdrop.cjs\",[[0,\"gov-backdrop\",{\"inverse\":[4],\"disabled\":[1540],\"accessibleLabel\":[1,\"accessible-label\"],\"accessibleLabelledBy\":[1,\"accessible-labelledby\"],\"validateAccessibility\":[64]}]]],[\"gov-button.cjs\",[[4,\"gov-button\",{\"color\":[513],\"size\":[513],\"type\":[513],\"expanded\":[516],\"expandedMobile\":[516,\"expanded-mobile\"],\"name\":[1],\"disabled\":[516],\"nativeType\":[1,\"native-type\"],\"href\":[1],\"target\":[1],\"download\":[4],\"tab\":[2],\"hreflang\":[1],\"referrerpolicy\":[1],\"rel\":[1],\"loading\":[1],\"focusable\":[4],\"identifier\":[1],\"inheritedAttributes\":[32],\"setFocus\":[64],\"getRef\":[64],\"validateAccessibility\":[64]},null,{\"color\":[\"validateColor\"],\"type\":[\"validateType\"],\"size\":[\"validateSize\"],\"nativeType\":[\"validateNativeType\"]}]]],[\"gov-tooltip_2.cjs\",[[4,\"gov-tooltip-content\",{\"color\":[1],\"size\":[1],\"persist\":[4],\"isVisible\":[1028,\"is-visible\"],\"parentId\":[1,\"parent-id\"]},null,{\"isVisible\":[\"visibleContent\"]}],[4,\"gov-tooltip\",{\"color\":[1],\"size\":[1],\"position\":[1025],\"message\":[1],\"identifier\":[1],\"icon\":[516],\"persist\":[32],\"show\":[64],\"hide\":[64]},null,{\"color\":[\"validateColor\"],\"size\":[\"validateSize\"],\"position\":[\"validatePosition\"],\"message\":[\"rerenderMessage\"]}]]],[\"gov-attachments_3.cjs\",[[4,\"gov-attachments-item\",{\"accessibleRemoveLabel\":[1,\"accessible-remove-label\"],\"accessibleRemoveLabelledBy\":[1,\"accessible-remove-labelledby\"],\"validateAccessibility\":[64]}],[4,\"gov-attachments\",{\"label\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"validateWcag\":[64]}],[4,\"gov-form-message\",{\"color\":[1],\"size\":[1],\"identifier\":[64]},null,{\"color\":[\"validateColor\"]}]]],[\"gov-form-input_2.cjs\",[[0,\"gov-skeleton\",{\"size\":[513],\"color\":[1],\"shape\":[1],\"width\":[513],\"height\":[513],\"animation\":[1],\"inheritedAttributes\":[32]},null,{\"size\":[\"validateSize\"],\"shape\":[\"validateShape\"],\"animation\":[\"validateAnimation\"]}],[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]},null,{\"size\":[\"validateSize\",\"watchControlAttrs\"],\"disabled\":[\"watchControlAttrs\"],\"invalid\":[\"watchControlAttrs\"],\"success\":[\"watchControlAttrs\"]}]]]]"), options);
9
+ return index.bootstrapLazy(JSON.parse("[[\"gov-form-file.cjs\",[[4,\"gov-form-file\",{\"expanded\":[4],\"required\":[4],\"disabled\":[516],\"resetAfterPick\":[4,\"reset-after-pick\"],\"ignoreFileDuplicationCheck\":[4,\"ignore-file-duplication-check\"],\"displayAttachments\":[4,\"display-attachments\"],\"name\":[1],\"accept\":[1],\"multiple\":[4],\"maxFileSize\":[2,\"max-file-size\"],\"identifier\":[1],\"invalid\":[4],\"errorSize\":[1,\"error-size\"],\"errorAccept\":[1,\"error-accept\"],\"accessibleAttachmentsLabel\":[1,\"accessible-attachments-label\"],\"files\":[32],\"inheritedAttributes\":[32],\"getRef\":[64],\"getAreaRef\":[64],\"reset\":[64]},null,{\"disabled\":[\"watchControlAttrs\"],\"invalid\":[\"watchControlAttrs\"]}]]],[\"gov-form-multi-select.cjs\",[[4,\"gov-form-multi-select\",{\"value\":[1537],\"options\":[1537],\"identifier\":[1],\"placeholder\":[1],\"size\":[1],\"name\":[1],\"hideSelectedList\":[4,\"hide-selected-list\"],\"required\":[4],\"disabled\":[516],\"invalid\":[516],\"success\":[4],\"messageEmpty\":[1,\"message-empty\"],\"messageLoading\":[1,\"message-loading\"],\"focused\":[32],\"valueState\":[32],\"selectedOptionsState\":[32],\"optionsState\":[32],\"inheritedAttributes\":[32],\"setFocus\":[64],\"setValue\":[64],\"getRef\":[64]},null,{\"size\":[\"validateSize\"],\"options\":[\"watchOptions\"],\"value\":[\"watchValue\"]}]]],[\"gov-dialog.cjs\",[[4,\"gov-dialog\",{\"open\":[1540],\"blockClose\":[4,\"block-close\"],\"blockBackdropClose\":[4,\"block-backdrop-close\"],\"role\":[1],\"labelTag\":[1,\"label-tag\"],\"accessibleLabelledBy\":[1,\"accessible-labelled-by\"],\"accessibleDescribedBy\":[1,\"accessible-described-by\"],\"accessibleCloseLabel\":[1,\"accessible-close-label\"],\"accessibleCloseLabelledBy\":[1,\"accessible-close-labelled-by\"],\"setFocus\":[64],\"validateAccessibility\":[64]},null,{\"open\":[\"watchOpen\"]}]]],[\"gov-form-range.cjs\",[[4,\"gov-form-range\",{\"size\":[1],\"value\":[1537],\"identifier\":[1],\"name\":[1],\"min\":[8],\"max\":[8],\"step\":[8],\"tooltip\":[4],\"input\":[4],\"listIdentifier\":[1,\"list-identifier\"],\"required\":[516],\"success\":[516],\"invalid\":[516],\"disabled\":[516],\"inheritedAttributes\":[32],\"setFocus\":[64],\"setValue\":[64],\"clearValue\":[64],\"getRef\":[64]},null,{\"size\":[\"validateSize\",\"watchControlAttrs\"],\"value\":[\"watchValue\"],\"disabled\":[\"watchControlAttrs\"],\"invalid\":[\"watchControlAttrs\"],\"success\":[\"watchControlAttrs\"]}]]],[\"gov-pagination.cjs\",[[0,\"gov-pagination\",{\"type\":[1],\"current\":[2],\"total\":[2],\"selectIdentifier\":[1,\"select-identifier\"],\"size\":[1],\"color\":[1],\"pageSize\":[2,\"page-size\"],\"maxPages\":[2,\"max-pages\"],\"link\":[1],\"accessibleSelectLabel\":[1,\"accessible-select-label\"],\"accessiblePageLabel\":[1,\"accessible-page-label\"],\"labelPrev\":[1,\"label-prev\"],\"labelStart\":[1,\"label-start\"],\"labelNext\":[1,\"label-next\"],\"labelEnd\":[1,\"label-end\"],\"pagination\":[32],\"inheritedAttributes\":[32]},null,{\"type\":[\"validateType\"],\"size\":[\"validateSize\"],\"color\":[\"validateColor\"],\"current\":[\"recalculate\"],\"total\":[\"recalculate\"],\"pageSize\":[\"recalculate\"],\"maxPages\":[\"recalculate\"]}]]],[\"gov-breadcrumbs.cjs\",[[4,\"gov-breadcrumbs\",{\"collapsible\":[4],\"isExpanded\":[4,\"is-expanded\"],\"accessibleLabel\":[1,\"accessible-label\"],\"accessibleLabelledBy\":[1,\"accessible-labelledby\"],\"accessibleToggleLabel\":[1,\"accessible-toggle-label\"],\"expanded\":[32],\"toggleOption\":[32],\"validateAccessibility\":[64]}]]],[\"gov-collapsible.cjs\",[[4,\"gov-collapsible\",{\"size\":[1],\"identifier\":[1],\"label\":[1],\"disabled\":[4],\"open\":[1028],\"inheritedAttributes\":[32]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-infobar.cjs\",[[4,\"gov-infobar\",{\"color\":[1],\"type\":[1],\"role\":[1],\"accessibleCloseLabel\":[1,\"accessible-close-label\"],\"accessibleToggleLabel\":[1,\"accessible-toggle-label\"],\"closable\":[4],\"toggleContent\":[32],\"inheritedAttributes\":[32]},null,{\"color\":[\"validateColor\"]}]]],[\"gov-loading.cjs\",[[4,\"gov-loading\",{\"size\":[1]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-tabs.cjs\",[[4,\"gov-tabs\",{\"type\":[1],\"size\":[1],\"color\":[1],\"orientation\":[1],\"direction\":[513],\"controllers\":[32],\"focusIndex\":[32],\"inheritedAttributes\":[32],\"refresh\":[64],\"currentTab\":[64],\"setActiveTab\":[64],\"rerender\":[64]},null,{\"type\":[\"validateType\"],\"color\":[\"validateColor\"],\"size\":[\"validateSize\"]}]]],[\"gov-toast.cjs\",[[4,\"gov-toast\",{\"color\":[1],\"gravity\":[1],\"position\":[1],\"type\":[1],\"time\":[2],\"closeLabel\":[1,\"close-label\"],\"accessibleCloseLabel\":[1,\"accessible-close-label\"],\"inheritedAttributes\":[32],\"destroy\":[64]},null,{\"color\":[\"validateColor\"]}]]],[\"gov-accordion-item.cjs\",[[4,\"gov-accordion-item\",{\"identifier\":[1],\"size\":[1025],\"disabled\":[4],\"open\":[1028],\"openState\":[32],\"toggle\":[64],\"currentState\":[64]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-blockquote.cjs\",[[4,\"gov-blockquote\",{\"type\":[513],\"cite\":[1]}]]],[\"gov-card.cjs\",[[4,\"gov-card\",{\"direction\":[1],\"collapsible\":[4],\"clickable\":[4],\"open\":[1540],\"href\":[513],\"target\":[1],\"accessibleTriggerLabel\":[1,\"accessible-label\"],\"accessibleTriggerLabelledBy\":[1,\"accessible-labelledby\"],\"validateAccessibility\":[64]}]]],[\"gov-form-checkbox.cjs\",[[4,\"gov-form-checkbox\",{\"value\":[1],\"checked\":[1540],\"required\":[4],\"disabled\":[516],\"indeterminate\":[516],\"name\":[1],\"size\":[513],\"identifier\":[1],\"noLabel\":[4,\"no-label\"],\"invalid\":[4],\"inheritedAttributes\":[32],\"getRef\":[64]},null,{\"size\":[\"validateSize\",\"watchControlAttrs\"],\"disabled\":[\"watchControlAttrs\"],\"invalid\":[\"watchControlAttrs\"]}]]],[\"gov-form-switch.cjs\",[[4,\"gov-form-switch\",{\"value\":[1],\"noLabel\":[4,\"no-label\"],\"checked\":[1540],\"required\":[4],\"disabled\":[516],\"name\":[1],\"size\":[513],\"identifier\":[1],\"invalid\":[4],\"inheritedAttributes\":[32],\"getRef\":[64]},null,{\"size\":[\"validateSize\",\"watchDisabled\"],\"disabled\":[\"watchDisabled\"],\"invalid\":[\"watchDisabled\"]}]]],[\"gov-link.cjs\",[[4,\"gov-link\",{\"size\":[1],\"external\":[4],\"truncate\":[4],\"href\":[1],\"target\":[1],\"inheritedAttributes\":[32]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-tag.cjs\",[[4,\"gov-tag\",{\"iconStart\":[1,\"icon-start\"],\"iconEnd\":[1,\"icon-end\"],\"size\":[513],\"color\":[513],\"type\":[513],\"expanded\":[516]},null,{\"color\":[\"validateColor\"],\"size\":[\"validateSize\"]}]]],[\"gov-tile.cjs\",[[4,\"gov-tile\",{\"size\":[513],\"orientation\":[1],\"noBorder\":[4,\"no-border\"],\"href\":[513],\"target\":[1],\"getTriggerRef\":[64]}]]],[\"gov-wizard-item.cjs\",[[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]},null,{\"color\":[\"validateColor\"]}]]],[\"gov-accordion.cjs\",[[4,\"gov-accordion\",{\"size\":[1],\"noBorder\":[4,\"no-border\"]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-banner.cjs\",[[4,\"gov-banner\",{\"size\":[513],\"background\":[1],\"foreground\":[1],\"textColor\":[1,\"text-color\"]},null,{\"size\":[\"validateSize\"],\"background\":[\"validateBackground\"],\"foreground\":[\"validateForeground\"],\"text-color\":[\"validateTextColor\"]}]]],[\"gov-container.cjs\",[[4,\"gov-container\"]]],[\"gov-control-group.cjs\",[[4,\"gov-control-group\",{\"color\":[1],\"noBorder\":[4,\"no-border\"],\"noInnerBorder\":[4,\"no-inner-border\"],\"fitContent\":[4,\"fit-content\"]},null,{\"color\":[\"validateColor\"]}]]],[\"gov-cookiebar.cjs\",[[4,\"gov-cookiebar\"]]],[\"gov-dropdown.cjs\",[[4,\"gov-dropdown\",{\"identifier\":[1],\"open\":[1028],\"position\":[1],\"getState\":[64],\"toggle\":[64]},null,{\"open\":[\"watchOpen\"]}]]],[\"gov-empty.cjs\",[[4,\"gov-empty\",{\"size\":[1],\"direction\":[1],\"align\":[1]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-error-code.cjs\",[[4,\"gov-error-code\"]]],[\"gov-form-checkbox-group.cjs\",[[4,\"gov-form-checkbox-group\",{\"gap\":[1],\"orientation\":[1],\"value\":[1025]},null,{\"gap\":[\"validateGap\"],\"orientation\":[\"validateOrientation\"]}]]],[\"gov-form-control.cjs\",[[4,\"gov-form-control\",{\"identifier\":[1],\"invalid\":[516],\"disabled\":[516],\"success\":[516],\"fieldset\":[4],\"size\":[1]}]]],[\"gov-form-group.cjs\",[[4,\"gov-form-group\",{\"gap\":[1],\"orientation\":[1]},null,{\"gap\":[\"validateGap\"],\"orientation\":[\"validateOrientation\"]}]]],[\"gov-form-label.cjs\",[[4,\"gov-form-label\",{\"identifier\":[1],\"size\":[1],\"required\":[4],\"legend\":[4]}]]],[\"gov-form-password-power.cjs\",[[4,\"gov-form-password-power\",{\"power\":[514]}]]],[\"gov-form-radio.cjs\",[[4,\"gov-form-radio\",{\"value\":[1],\"noLabel\":[4,\"no-label\"],\"checked\":[1540],\"required\":[4],\"disabled\":[516],\"name\":[1],\"size\":[1],\"identifier\":[1],\"invalid\":[4],\"inheritedAttributes\":[32],\"getRef\":[64]},null,{\"size\":[\"validateSize\",\"watchControlAttrs\"],\"disabled\":[\"watchControlAttrs\"],\"invalid\":[\"watchControlAttrs\"]}]]],[\"gov-form-radio-group.cjs\",[[4,\"gov-form-radio-group\",{\"gap\":[1],\"orientation\":[1],\"value\":[1025]},null,{\"gap\":[\"validateGap\"],\"orientation\":[\"validateOrientation\"]}]]],[\"gov-form-search.cjs\",[[4,\"gov-form-search\",{\"size\":[513],\"color\":[513]}]]],[\"gov-grid.cjs\",[[4,\"gov-grid\",{\"alignItems\":[513,\"align-items\"],\"justifyItems\":[513,\"justify-items\"],\"gap\":[513]}]]],[\"gov-grid-item.cjs\",[[4,\"gov-grid-item\",{\"column\":[1,\"col-span\"],\"columnSm\":[1,\"col-span-sm\"],\"columnMd\":[1,\"col-span-md\"],\"columnLg\":[1,\"col-span-lg\"],\"columnXl\":[1,\"col-span-xl\"],\"row\":[1,\"row-span\"],\"rowSm\":[1,\"row-span-sm\"],\"rowMd\":[1,\"row-span-md\"],\"rowLg\":[1,\"row-span-lg\"],\"rowXl\":[1,\"row-span-xl\"]}]]],[\"gov-layout.cjs\",[[4,\"gov-layout\",{\"type\":[1],\"variant\":[1],\"inverse\":[4]}]]],[\"gov-layout-column.cjs\",[[4,\"gov-layout-column\"]]],[\"gov-lifecycle.cjs\",[[0,\"gov-lifecycle\"]]],[\"gov-message.cjs\",[[4,\"gov-message\",{\"color\":[1],\"type\":[1]},null,{\"color\":[\"validateColor\"]}]]],[\"gov-spacer.cjs\",[[0,\"gov-spacer\",{\"size\":[1],\"breakpoint\":[1]},null,{\"size\":[\"validateSize\"],\"breakpoint\":[\"validateBreakpoint\"]}]]],[\"gov-stepper.cjs\",[[4,\"gov-stepper\",{\"size\":[1]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-stepper-item.cjs\",[[4,\"gov-stepper-item\",{\"color\":[1],\"size\":[1],\"identifier\":[1]},null,{\"color\":[\"validateColor\"]}]]],[\"gov-tabs-item.cjs\",[[4,\"gov-tabs-item\",{\"identifier\":[1],\"triggerIdentifier\":[1,\"trigger-identifier\"],\"label\":[513],\"disabled\":[516],\"iconStart\":[513,\"icon-start\"],\"iconEnd\":[513,\"icon-end\"],\"default\":[4],\"isActive\":[32],\"getIdentifier\":[64],\"getTriggerIdentifier\":[64],\"getDisableState\":[64],\"setActiveStatus\":[64]},null,{\"label\":[\"rerenderParent\"],\"disabled\":[\"rerenderParent\"]}]]],[\"gov-wizard.cjs\",[[4,\"gov-wizard\",{\"size\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-flex_3.cjs\",[[0,\"gov-theme-switch\",{\"size\":[1],\"displayLabel\":[4,\"display-label\"],\"ariaLabelLight\":[1,\"aria-label-light\"],\"ariaLabelDark\":[1,\"aria-label-dark\"],\"labelLight\":[1,\"label-light\"],\"labelDark\":[1,\"label-dark\"],\"theme\":[32]},null,{\"size\":[\"validateSize\"],\"theme\":[\"watchTheme\"]}],[4,\"gov-flex\",{\"direction\":[513],\"justifyContent\":[513,\"justify-content\"],\"alignItems\":[513,\"align-items\"],\"wrap\":[513],\"alignContent\":[513,\"align-content\"],\"alignSelf\":[513,\"align-self\"],\"gap\":[513],\"responsive\":[513]}],[0,\"gov-icon\",{\"size\":[513],\"color\":[513],\"name\":[513],\"type\":[513],\"visible\":[32],\"error\":[32]},null,{\"size\":[\"validateSize\"],\"color\":[\"validateColor\"],\"name\":[\"loadIconPathData\"]}]]],[\"gov-form-autocomplete.cjs\",[[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],\"maxOptions\":[2,\"max-options\"],\"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]},null,{\"size\":[\"validateSize\"],\"options\":[\"watchOptions\"],\"throttleTime\":[\"watchThrottleTime\"]}]]],[\"gov-chip.cjs\",[[4,\"gov-chip\",{\"disabled\":[516],\"href\":[1],\"target\":[1],\"iconStart\":[1,\"icon-start\"],\"iconEnd\":[1,\"icon-end\"],\"size\":[1],\"tag\":[1],\"color\":[1],\"type\":[513],\"focusable\":[4],\"identifier\":[1],\"inheritedAttributes\":[32],\"geRef\":[64],\"setFocus\":[64]},null,{\"color\":[\"validateColor\"],\"size\":[\"validateSize\"]}]]],[\"gov-form-select.cjs\",[[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]},null,{\"size\":[\"validateSize\",\"watchControlAttrs\"],\"options\":[\"watchOptions\"],\"disabled\":[\"watchControlAttrs\"],\"invalid\":[\"watchControlAttrs\"],\"success\":[\"watchControlAttrs\"],\"value\":[\"watchValue\"]}]]],[\"gov-backdrop.cjs\",[[0,\"gov-backdrop\",{\"inverse\":[4],\"disabled\":[1540],\"accessibleLabel\":[1,\"accessible-label\"],\"accessibleLabelledBy\":[1,\"accessible-labelledby\"],\"validateAccessibility\":[64]}]]],[\"gov-button.cjs\",[[4,\"gov-button\",{\"color\":[513],\"size\":[513],\"type\":[513],\"expanded\":[516],\"expandedMobile\":[516,\"expanded-mobile\"],\"name\":[1],\"disabled\":[516],\"nativeType\":[1,\"native-type\"],\"href\":[1],\"target\":[1],\"download\":[4],\"tab\":[2],\"hreflang\":[1],\"referrerpolicy\":[1],\"rel\":[1],\"loading\":[1],\"focusable\":[4],\"identifier\":[1],\"inheritedAttributes\":[32],\"setFocus\":[64],\"getRef\":[64],\"validateAccessibility\":[64]},null,{\"color\":[\"validateColor\"],\"type\":[\"validateType\"],\"size\":[\"validateSize\"],\"nativeType\":[\"validateNativeType\"]}]]],[\"gov-tooltip_2.cjs\",[[4,\"gov-tooltip-content\",{\"color\":[1],\"size\":[1],\"persist\":[4],\"isVisible\":[1028,\"is-visible\"],\"parentId\":[1,\"parent-id\"],\"message\":[1025]},null,{\"isVisible\":[\"visibleContent\"]}],[4,\"gov-tooltip\",{\"color\":[1],\"size\":[1],\"position\":[1025],\"message\":[1],\"identifier\":[1],\"icon\":[516],\"persist\":[32],\"show\":[64],\"hide\":[64]},null,{\"color\":[\"validateColor\"],\"size\":[\"validateSize\"],\"position\":[\"validatePosition\"],\"message\":[\"rerenderMessage\"]}]]],[\"gov-attachments_3.cjs\",[[4,\"gov-attachments-item\",{\"accessibleRemoveLabel\":[1,\"accessible-remove-label\"],\"accessibleRemoveLabelledBy\":[1,\"accessible-remove-labelledby\"],\"validateAccessibility\":[64]}],[4,\"gov-attachments\",{\"label\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"validateWcag\":[64]}],[4,\"gov-form-message\",{\"color\":[1],\"size\":[1],\"identifier\":[64]},null,{\"color\":[\"validateColor\"]}]]],[\"gov-form-input_2.cjs\",[[0,\"gov-skeleton\",{\"size\":[513],\"color\":[1],\"shape\":[1],\"width\":[513],\"height\":[513],\"animation\":[1],\"inheritedAttributes\":[32]},null,{\"size\":[\"validateSize\"],\"shape\":[\"validateShape\"],\"animation\":[\"validateAnimation\"]}],[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]},null,{\"size\":[\"validateSize\",\"watchControlAttrs\"],\"disabled\":[\"watchControlAttrs\"],\"invalid\":[\"watchControlAttrs\"],\"success\":[\"watchControlAttrs\"]}]]]]"), options);
10
10
  };
11
11
 
12
12
  exports.setNonce = index.setNonce;
@@ -15,7 +15,7 @@ export class GovBanner {
15
15
  /**
16
16
  * Banner’s foreground
17
17
  */
18
- this.foreground = BannerForeground.LOGO;
18
+ this.foreground = BannerForeground.IMAGE;
19
19
  /**
20
20
  * XL Banner’s text color
21
21
  */
@@ -41,10 +41,10 @@ export class GovBanner {
41
41
  this.validateTextColor(this.textColor);
42
42
  }
43
43
  render() {
44
- return (h(Host, Object.assign({ key: '3e20f606dab5e32411afc2dbf2bc94add284bed4', class: this.h.classes(BannerClass.root), role: "region", size: this.size }, (this.size !== "xl" ? {
44
+ return (h(Host, Object.assign({ key: '142c906194083f6c186d1f1d9033c4f2c9be9bff', class: this.h.classes(BannerClass.root), role: "region", size: this.size }, (this.size !== "xl" ? {
45
45
  background: this.background,
46
46
  foreground: this.foreground
47
- } : { 'text-color': this.textColor })), h("div", { key: '334c429dac2fcde8b9bbaa223ec5111ba2ea062f' }, h("div", { key: '900e59f605db3ddb9a0999ee6d802aa73d0f4cb3', class: BannerClass.content }, h("slot", { key: 'b5bbcc66a5d7154e22c73c78001c1e2609c034cc', name: "headline" }), h("slot", { key: '3bc1675de3e41360eebd57fcc0880ede40053c3f' })), this.h.hasSlot('button') && (h("slot", { key: '9b85a1240ae9a28c8297085f88674006a729cc72', name: "button" }))), h("slot", { key: 'e2b1423f67a81d8188d68b1fbfdad1a88b3893cd', name: "image" })));
47
+ } : { 'text-color': this.textColor })), h("div", { key: '0b52a8859b6cdcd92d0f5e97b460a3e0a899bd44' }, h("div", { key: 'a36ed5ad57c878d70770ccfeccd172749a555b22', class: BannerClass.content }, h("slot", { key: '57f52bfb0189450e77c00f4d9904712e555a3125', name: "headline" }), h("slot", { key: '91629f1bf0605ae28d694d044d19bbef9ebb69da' })), this.h.hasSlot('button') && (h("slot", { key: '458a59c73e9bdf02d6cdb1e8c5caea0dcfec526a', name: "button" }))), h("slot", { key: 'f1d60077313455ed78c78b56c7741b4b593cf7cc', name: "image" })));
48
48
  }
49
49
  static get is() { return "gov-banner"; }
50
50
  static get properties() {
@@ -125,7 +125,7 @@ export class GovBanner {
125
125
  "getter": false,
126
126
  "setter": false,
127
127
  "reflect": false,
128
- "defaultValue": "BannerForeground.LOGO"
128
+ "defaultValue": "BannerForeground.IMAGE"
129
129
  },
130
130
  "textColor": {
131
131
  "type": "string",
@@ -1 +1 @@
1
- {"version":3,"file":"gov-banner.js","sourceRoot":"","sources":["../../../../../../src/components/gov-banner/gov-banner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,MAAM,eAAe,CAAA;AACtE,OAAO,EAAC,OAA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,SAAS,CAAC,CAAA;IAC1C,CAAC;IAED,MAAM;QACF,OAAO,CACH,EAAC,IAAI,mEAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EACvC,IAAI,EAAC,QAAQ,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,IACX,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC;YACtB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,UAAU,EAAE,IAAI,CAAC,UAAU;SAC9B,CAAC,CAAC,CAAC,EAAC,YAAY,EAAE,IAAI,CAAC,SAAS,EAAC,CAAC;YACrC;gBACI,4DAAK,KAAK,EAAE,WAAW,CAAC,OAAO;oBAC3B,6DAAM,IAAI,EAAC,UAAU,GAAE;oBACvB,8DAAO,CACL;gBACL,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CACzB,6DAAM,IAAI,EAAC,QAAQ,GAAE,CACxB,CACC;YACN,6DAAM,IAAI,EAAC,OAAO,GAAE,CACjB,CACV,CAAA;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import {Component, Element, h, Host, Prop, Watch} from '@stencil/core'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {\n BannerBackground,\n BannerBackgroundsType,\n BannerClass,\n BannerForeground,\n BannerForegroundsType,\n BannerSizes,\n BannerSizesType,\n BannerTextColor,\n BannerTextColorsType\n} from \"./constants\";\nimport {validateProp} from \"../../helpers/Validate/props\";\n\n@Component({\n tag: 'gov-banner',\n})\nexport class GovBanner {\n private h: GovHost\n\n constructor() {\n this.h = govHost(this.host)\n }\n\n @Element() host: HTMLGovBannerElement\n /**\n * Banner’s size.\n */\n @Prop({reflect: true}) readonly size: BannerSizesType = BannerSizes._M\n /**\n * Banner’s background\n */\n @Prop() readonly background: BannerBackgroundsType = BannerBackground.SIMPLE\n /**\n * Banner’s foreground\n */\n @Prop() readonly foreground: BannerForegroundsType = BannerForeground.LOGO\n /**\n * XL Banner’s text color\n */\n @Prop({attribute: 'text-color'}) readonly textColor: BannerTextColorsType = BannerTextColor.LIGHT\n\n @Watch('size')\n validateSize(newValue: string): void {\n validateProp(BannerSizes, newValue, BannerClass.root)\n }\n\n @Watch('background')\n validateBackground(newValue: string): void {\n validateProp(BannerBackground, newValue, BannerClass.root)\n }\n\n @Watch('foreground')\n validateForeground(newValue: string): void {\n validateProp(BannerForeground, newValue, BannerClass.root)\n }\n\n @Watch('text-color')\n validateTextColor(newValue: string): void {\n validateProp(BannerTextColor, newValue, BannerClass.root)\n }\n\n componentWillLoad(): void {\n this.validateSize(this.size)\n this.validateBackground(this.background)\n this.validateForeground(this.foreground)\n this.validateTextColor(this.textColor)\n }\n\n render() {\n return (\n <Host class={this.h.classes(BannerClass.root)}\n role=\"region\"\n size={this.size}\n {...(this.size !== \"xl\" ? {\n background: this.background,\n foreground: this.foreground\n } : {'text-color': this.textColor})}>\n <div>\n <div class={BannerClass.content}>\n <slot name=\"headline\"/>\n <slot/>\n </div>\n {this.h.hasSlot('button') && (\n <slot name=\"button\"/>\n )}\n </div>\n <slot name=\"image\"/>\n </Host>\n )\n }\n}\n"]}
1
+ {"version":3,"file":"gov-banner.js","sourceRoot":"","sources":["../../../../../../src/components/gov-banner/gov-banner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,MAAM,eAAe,CAAA;AACtE,OAAO,EAAC,OAAO,EAAC,MAAM,4BAA4B,CAAA;AAElD,OAAO,EACH,gBAAgB,EAEhB,WAAW,EACX,gBAAgB,EAEhB,WAAW,EAEX,eAAe,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C,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EACvC,IAAI,EAAC,QAAQ,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,IACX,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC;YACtB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,UAAU,EAAE,IAAI,CAAC,UAAU;SAC9B,CAAC,CAAC,CAAC,EAAC,YAAY,EAAE,IAAI,CAAC,SAAS,EAAC,CAAC;YACrC;gBACI,4DAAK,KAAK,EAAE,WAAW,CAAC,OAAO;oBAC3B,6DAAM,IAAI,EAAC,UAAU,GAAE;oBACvB,8DAAO,CACL;gBACL,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CACzB,6DAAM,IAAI,EAAC,QAAQ,GAAE,CACxB,CACC;YACN,6DAAM,IAAI,EAAC,OAAO,GAAE,CACjB,CACV,CAAA;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import {Component, Element, h, Host, Prop, Watch} from '@stencil/core'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {\n BannerBackground,\n BannerBackgroundsType,\n BannerClass,\n BannerForeground,\n BannerForegroundsType,\n BannerSizes,\n BannerSizesType,\n BannerTextColor,\n BannerTextColorsType\n} from \"./constants\";\nimport {validateProp} from \"../../helpers/Validate/props\";\n\n@Component({\n tag: 'gov-banner',\n})\nexport class GovBanner {\n private h: GovHost\n\n constructor() {\n this.h = govHost(this.host)\n }\n\n @Element() host: HTMLGovBannerElement\n /**\n * Banner’s size.\n */\n @Prop({reflect: true}) readonly size: BannerSizesType = BannerSizes._M\n /**\n * Banner’s background\n */\n @Prop() readonly background: BannerBackgroundsType = BannerBackground.SIMPLE\n /**\n * Banner’s foreground\n */\n @Prop() readonly foreground: BannerForegroundsType = BannerForeground.IMAGE\n /**\n * XL Banner’s text color\n */\n @Prop({attribute: 'text-color'}) readonly textColor: BannerTextColorsType = BannerTextColor.LIGHT\n\n @Watch('size')\n validateSize(newValue: string): void {\n validateProp(BannerSizes, newValue, BannerClass.root)\n }\n\n @Watch('background')\n validateBackground(newValue: string): void {\n validateProp(BannerBackground, newValue, BannerClass.root)\n }\n\n @Watch('foreground')\n validateForeground(newValue: string): void {\n validateProp(BannerForeground, newValue, BannerClass.root)\n }\n\n @Watch('text-color')\n validateTextColor(newValue: string): void {\n validateProp(BannerTextColor, newValue, BannerClass.root)\n }\n\n componentWillLoad(): void {\n this.validateSize(this.size)\n this.validateBackground(this.background)\n this.validateForeground(this.foreground)\n this.validateTextColor(this.textColor)\n }\n\n render() {\n return (\n <Host class={this.h.classes(BannerClass.root)}\n role=\"region\"\n size={this.size}\n {...(this.size !== \"xl\" ? {\n background: this.background,\n foreground: this.foreground\n } : {'text-color': this.textColor})}>\n <div>\n <div class={BannerClass.content}>\n <slot name=\"headline\"/>\n <slot/>\n </div>\n {this.h.hasSlot('button') && (\n <slot name=\"button\"/>\n )}\n </div>\n <slot name=\"image\"/>\n </Host>\n )\n }\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import { removeDiacritics } from "../../../utils/string.utils";
2
+ const normalize = (value) => typeof value === 'string' ? removeDiacritics(value).toLowerCase() : '';
3
+ export const filterAutocompleteOptions = (options, query, nameKey, maxOptions) => {
4
+ const source = Array.isArray(options) ? options : [];
5
+ const normalizedQuery = normalize(query);
6
+ const matches = normalizedQuery.length === 0
7
+ ? source
8
+ : source.filter(item => {
9
+ const text = item === null || item === void 0 ? void 0 : item[nameKey];
10
+ return typeof text === 'string' && normalize(text).includes(normalizedQuery);
11
+ });
12
+ return Number.isInteger(maxOptions) && maxOptions > 0 ? matches.slice(0, maxOptions) : matches;
13
+ };
14
+ //# sourceMappingURL=autocomplete.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autocomplete.utils.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/autocomplete/autocomplete.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAG9D,MAAM,SAAS,GAAG,CAAC,KAAc,EAAU,EAAE,CAC5C,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;AAEvE,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACxC,OAAkC,EAClC,KAAa,EACb,OAAe,EACf,UAAkB,EACU,EAAE;IAC9B,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAA;IACpD,MAAM,eAAe,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;IACxC,MAAM,OAAO,GACZ,eAAe,CAAC,MAAM,KAAK,CAAC;QAC3B,CAAC,CAAC,MAAM;QACR,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;YACrB,MAAM,IAAI,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAG,OAAO,CAAC,CAAA;YAC5B,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAA;QAC7E,CAAC,CAAC,CAAA;IACL,OAAO,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;AAC/F,CAAC,CAAA","sourcesContent":["import { removeDiacritics } from '../../../utils/string.utils'\nimport { GovFormAutocompleteItem } from './gov-form-autocomplete.types'\n\nconst normalize = (value: unknown): string =>\n\ttypeof value === 'string' ? removeDiacritics(value).toLowerCase() : ''\n\nexport const filterAutocompleteOptions = (\n\toptions: GovFormAutocompleteItem[],\n\tquery: string,\n\tnameKey: string,\n\tmaxOptions: number,\n): GovFormAutocompleteItem[] => {\n\tconst source = Array.isArray(options) ? options : []\n\tconst normalizedQuery = normalize(query)\n\tconst matches =\n\t\tnormalizedQuery.length === 0\n\t\t\t? source\n\t\t\t: source.filter(item => {\n\t\t\t\t\tconst text = item?.[nameKey]\n\t\t\t\t\treturn typeof text === 'string' && normalize(text).includes(normalizedQuery)\n\t\t\t\t})\n\treturn Number.isInteger(maxOptions) && maxOptions > 0 ? matches.slice(0, maxOptions) : matches\n}\n"]}
@@ -5,11 +5,13 @@ import { createID } from "../../../utils/string.utils";
5
5
  import { delay, has, throttle } from "../../../utils/utils";
6
6
  import { FormAutocompleteClass, FormAutocompleteSizes, } from "./constants";
7
7
  import { propsValueToArray } from "../../../utils/array.utils";
8
+ import { filterAutocompleteOptions } from "./autocomplete.utils";
8
9
  import { AttributeObserver } from "../../../helpers/Dom/attribute";
9
10
  import { ariaAttributes } from "../../../helpers/Accessibility/attributes";
10
11
  import { inheritAriaAttributes } from "../../../helpers/Accessibility/accessibility";
11
12
  export class GovFormAutocomplete {
12
13
  constructor() {
14
+ this.fullOptions = [];
13
15
  this.templateResolver = item => item[this.nameKey];
14
16
  /**
15
17
  * Value of input
@@ -37,6 +39,11 @@ export class GovFormAutocomplete {
37
39
  * Minimum length (number of characters) of value
38
40
  */
39
41
  this.minlength = 3;
42
+ /**
43
+ * Maximum number of items shown from a static `options` list (0 = unlimited).
44
+ * Applies only when no async search callback is set.
45
+ */
46
+ this.maxOptions = 10;
40
47
  /**
41
48
  * Input throttle in milliseconds
42
49
  */
@@ -49,13 +56,33 @@ export class GovFormAutocomplete {
49
56
  this.arrowCounter = -1;
50
57
  this.list = [];
51
58
  this.inheritedAttributes = {};
59
+ this.emitAndSearch = (e) => {
60
+ this.govInput.emit({
61
+ originalEvent: e,
62
+ component: FormAutocompleteClass.root,
63
+ value: this.value,
64
+ selected: null,
65
+ });
66
+ this.doSearch();
67
+ };
68
+ this.onInputHandler = (e) => {
69
+ e.stopPropagation();
70
+ this.value = e.detail.value;
71
+ this.debouncedSearch(e);
72
+ };
52
73
  this.listBoxId = createID('GovListBox');
53
74
  }
54
75
  validateSize(newValue) {
55
76
  validateProp(FormAutocompleteSizes, newValue, FormAutocompleteClass.root);
56
77
  }
57
78
  watchOptions(newValue) {
58
- this.setOptions(propsValueToArray(newValue)).catch();
79
+ this.fullOptions = propsValueToArray(newValue);
80
+ if (this.searchCallback) {
81
+ this.setOptions(this.fullOptions).catch();
82
+ }
83
+ else {
84
+ this.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions);
85
+ }
59
86
  }
60
87
  onArrowUp() {
61
88
  if (this.arrowCounter > 0) {
@@ -79,13 +106,13 @@ export class GovFormAutocomplete {
79
106
  }
80
107
  }
81
108
  doSearch() {
82
- if (Number.isInteger(this.minlength) && this.isValueAccepted === false && this.minlength) {
83
- this.list = [];
84
- this.arrowCounter = -1;
85
- this.processing = false;
86
- return;
87
- }
88
109
  if (this.searchCallback) {
110
+ if (Number.isInteger(this.minlength) && this.isValueAccepted === false && this.minlength) {
111
+ this.list = [];
112
+ this.arrowCounter = -1;
113
+ this.processing = false;
114
+ return;
115
+ }
89
116
  this.processing = true;
90
117
  this.searchCallback(this.value)
91
118
  .then(response => (this.list = response))
@@ -94,11 +121,13 @@ export class GovFormAutocomplete {
94
121
  this.arrowCounter = -1;
95
122
  this.processing = false;
96
123
  });
124
+ return;
97
125
  }
126
+ this.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions);
127
+ this.arrowCounter = -1;
98
128
  }
99
129
  clearList() {
100
- const areOptions = propsValueToArray(this.options);
101
- if (areOptions.length === 0) {
130
+ if (this.fullOptions.length === 0) {
102
131
  this.list = [];
103
132
  }
104
133
  }
@@ -119,6 +148,14 @@ export class GovFormAutocomplete {
119
148
  componentWillLoad() {
120
149
  this.validateSize(this.size);
121
150
  this.inheritedAttributes = inheritAriaAttributes(this.host);
151
+ this.debouncedSearch = throttle(this.emitAndSearch, this.throttleTime);
152
+ this.fullOptions = propsValueToArray(this.options);
153
+ if (!this.searchCallback) {
154
+ this.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions);
155
+ }
156
+ }
157
+ watchThrottleTime() {
158
+ this.debouncedSearch = throttle(this.emitAndSearch, this.throttleTime);
122
159
  }
123
160
  disconnectedCallback() {
124
161
  var _a;
@@ -129,7 +166,7 @@ export class GovFormAutocomplete {
129
166
  this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { [attributeName]: newValue });
130
167
  }
131
168
  render() {
132
- return (h(Host, { key: '531610863e3752a4e07f0b6c3b946c475a6420c6', class: FormAutocompleteClass.root, size: this.size }, h("gov-form-input", Object.assign({ key: '82f74fc8139c85cddb4e206c5d82286107135fff', 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": throttle(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": booleanString(this.list.length && this.focused ? true : false), ref: el => (this.inputRef = el) }), h("slot", { key: 'd27f897ff5c405adc14640a7e8508319df7b5ff9', name: "validation-icon" }), h("slot", { key: 'da5ec2879f9c6ba7c57a68cc2515539016a6ec43', name: "icon-end" })), h("ul", { key: 'cbb3514f12fe3c506d7bcf2c3aa86b78303ac398', class: FormAutocompleteClass.list, role: 'listbox', "aria-hidden": toBoolAttr(!this.focused), hidden: !this.focused, id: this.listBoxId, ref: el => (this.listRef = el) }, this.focused && this.list.length === 0 && this.processing === false && this.isValueAccepted && this.messageEmpty ? (h("li", { class: FormAutocompleteClass.empty }, this.messageEmpty)) : null, this.focused && this.processing === true && this.isValueAccepted ? (h("li", { class: FormAutocompleteClass.loading }, h("gov-skeleton", { size: "m" }))) : null, this.focused ? this.list.map((item, index) => {
169
+ return (h(Host, { key: '0cdbf770359115b24432e9d533b4e17ab2c65e18', class: FormAutocompleteClass.root, size: this.size }, h("gov-form-input", Object.assign({ key: '5724ed153e3f2384725badbafdb0c19e67b69538', 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": this.onInputHandler, "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": booleanString(this.list.length && this.focused ? true : false), ref: el => (this.inputRef = el) }), h("slot", { key: 'ab6f37982f3d13adc2473a744b5697ac8bc651f5', name: "validation-icon" }), h("slot", { key: '1961a029eceee169b5be12fa4ba8c2e9072bb9de', name: "icon-end" })), h("ul", { key: '61b9b6929be4816e93e1b5fb778c3861b4f8631b', class: FormAutocompleteClass.list, role: 'listbox', "aria-hidden": toBoolAttr(!this.focused), hidden: !this.focused, id: this.listBoxId, ref: el => (this.listRef = el) }, this.focused && this.list.length === 0 && this.processing === false && (this.isValueAccepted || (!this.searchCallback && this.fullOptions.length > 0)) && this.messageEmpty ? (h("li", { class: FormAutocompleteClass.empty }, this.messageEmpty)) : null, this.focused && this.processing === true && this.isValueAccepted ? (h("li", { class: FormAutocompleteClass.loading }, h("gov-skeleton", { size: "m" }))) : null, this.focused ? this.list.map((item, index) => {
133
170
  const isSelected = this.arrowCounter === index;
134
171
  return (h("li", { class: FormAutocompleteClass.item, innerHTML: this.templateResolver(item, isSelected), role: 'option', "aria-posinset": index, tabindex: isSelected ? 0 : -1, "aria-setsize": this.list.length, onTouchStart: (e) => this.onSelectHandler(e, index), onMouseDown: (e) => this.onSelectHandler(e, index), "aria-selected": toBoolAttr(isSelected) }, h("slot", { name: "list-item-left" }), h("slot", { name: "list-item-right" })));
135
172
  }) : null)));
@@ -137,7 +174,12 @@ export class GovFormAutocomplete {
137
174
  onFocusHandler(e) {
138
175
  this.focused = true;
139
176
  this.arrowCounter = -1;
140
- if (this.isValueAccepted && this.searchCallback) {
177
+ if (this.searchCallback) {
178
+ if (this.isValueAccepted) {
179
+ this.doSearch();
180
+ }
181
+ }
182
+ else {
141
183
  this.doSearch();
142
184
  }
143
185
  e.stopPropagation();
@@ -160,17 +202,6 @@ export class GovFormAutocomplete {
160
202
  selected: null,
161
203
  });
162
204
  }
163
- onInputHandler(e) {
164
- this.value = e.target.value;
165
- e.stopPropagation();
166
- this.govInput.emit({
167
- originalEvent: e,
168
- component: FormAutocompleteClass.root,
169
- value: this.value,
170
- selected: null,
171
- });
172
- this.doSearch();
173
- }
174
205
  onSelectHandler(e, index = -1) {
175
206
  let selected = null;
176
207
  if (index > -1) {
@@ -548,6 +579,26 @@ export class GovFormAutocomplete {
548
579
  "setter": false,
549
580
  "reflect": false
550
581
  },
582
+ "maxOptions": {
583
+ "type": "number",
584
+ "attribute": "max-options",
585
+ "mutable": false,
586
+ "complexType": {
587
+ "original": "number",
588
+ "resolved": "number",
589
+ "references": {}
590
+ },
591
+ "required": false,
592
+ "optional": false,
593
+ "docs": {
594
+ "tags": [],
595
+ "text": "Maximum number of items shown from a static `options` list (0 = unlimited).\nApplies only when no async search callback is set."
596
+ },
597
+ "getter": false,
598
+ "setter": false,
599
+ "reflect": false,
600
+ "defaultValue": "10"
601
+ },
551
602
  "throttleTime": {
552
603
  "type": "number",
553
604
  "attribute": "throttle-time",
@@ -854,6 +905,9 @@ export class GovFormAutocomplete {
854
905
  }, {
855
906
  "propName": "options",
856
907
  "methodName": "watchOptions"
908
+ }, {
909
+ "propName": "throttleTime",
910
+ "methodName": "watchThrottleTime"
857
911
  }];
858
912
  }
859
913
  }
@@ -1 +1 @@
1
- {"version":3,"file":"gov-form-autocomplete.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/autocomplete/gov-form-autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,eAAe,CAAA;AAC1G,OAAO,EAAC,aAAa,EAAE,UAAU,EAAC,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAA;AAE5D,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAA;AACpD,OAAO,EAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAC,MAAM,sBAAsB,CAAA;AAEzD,OAAO,EAAC,qBAAqB,EAAE,qBAAqB,GAAa,MAAM,aAAa,CAAA;AAEpF,OAAO,EAAC,iBAAiB,EAAC,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAC,iBAAiB,EAAa,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAC,cAAc,EAAC,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAC,qBAAqB,EAAC,MAAM,8CAA8C,CAAC;AAKnF,MAAM,OAAO,mBAAmB;IAQ/B;QAHQ,qBAAgB,GAAiE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAQnH;;WAEG;QACmC,UAAK,GAAG,EAAE,CAAA;QAah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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","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"]}
1
+ {"version":3,"file":"gov-form-autocomplete.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/autocomplete/gov-form-autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,eAAe,CAAA;AAC1G,OAAO,EAAC,aAAa,EAAE,UAAU,EAAC,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAA;AAE5D,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAA;AACpD,OAAO,EAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAC,MAAM,sBAAsB,CAAA;AAEzD,OAAO,EAAC,qBAAqB,EAAE,qBAAqB,GAAa,MAAM,aAAa,CAAA;AAEpF,OAAO,EAAC,iBAAiB,EAAC,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAC,iBAAiB,EAAa,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAC,cAAc,EAAC,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAC,qBAAqB,EAAC,MAAM,8CAA8C,CAAC;AAKnF,MAAM,OAAO,mBAAmB;IAU/B;QALQ,gBAAW,GAA8B,EAAE,CAAA;QAC3C,qBAAgB,GAAiE,IAAI,CAAC,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","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 { filterAutocompleteOptions } from './autocomplete.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 fullOptions: GovFormAutocompleteItem[] = []\n\tprivate templateResolver: (item: GovFormAutocompleteItem, selected: boolean) => string = item => item[this.nameKey]\n\tprivate attributeObserver: AttributeObserver\n\tprivate debouncedSearch: (e: CustomEvent<FormInputEvent>) => void\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 * Maximum number of items shown from a static `options` list (0 = unlimited).\n\t * Applies only when no async search callback is set.\n\t */\n\t@Prop({attribute: 'max-options'}) readonly maxOptions: number = 10\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.fullOptions = propsValueToArray<GovFormAutocompleteItem[]>(newValue)\n\t\tif (this.searchCallback) {\n\t\t\tthis.setOptions(this.fullOptions).catch()\n\t\t} else {\n\t\t\tthis.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions)\n\t\t}\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 (this.searchCallback) {\n\t\t\tif (Number.isInteger(this.minlength) && this.isValueAccepted === false && this.minlength) {\n\t\t\t\tthis.list = []\n\t\t\t\tthis.arrowCounter = -1\n\t\t\t\tthis.processing = false\n\t\t\t\treturn\n\t\t\t}\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\treturn\n\t\t}\n\t\tthis.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions)\n\t\tthis.arrowCounter = -1\n\t}\n\n\tprivate clearList() {\n\t\tif (this.fullOptions.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\tthis.debouncedSearch = throttle(this.emitAndSearch, this.throttleTime)\n\t\tthis.fullOptions = propsValueToArray<GovFormAutocompleteItem[]>(this.options)\n\t\tif (!this.searchCallback) {\n\t\t\tthis.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions)\n\t\t}\n\t}\n\n\t@Watch('throttleTime')\n\twatchThrottleTime() {\n\t\tthis.debouncedSearch = throttle(this.emitAndSearch, this.throttleTime)\n\t}\n\n\tprivate emitAndSearch = (e: CustomEvent<FormInputEvent>) => {\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\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={this.onInputHandler}\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.searchCallback && this.fullOptions.length > 0)) && 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.searchCallback) {\n\t\t\tif (this.isValueAccepted) {\n\t\t\t\tthis.doSearch()\n\t\t\t}\n\t\t} else {\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: CustomEvent<FormInputEvent>) => {\n\t\te.stopPropagation()\n\t\tthis.value = e.detail.value\n\t\tthis.debouncedSearch(e)\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"]}
@@ -115,7 +115,15 @@ export class GovFormFile {
115
115
  }
116
116
  validateFiles(files) {
117
117
  let filesBuffer = [];
118
- Array.from(files).map(file => {
118
+ // Without `multiple`, only a single file is allowed. An incoming batch
119
+ // (drag-drop, framework wrapper, programmatic assignment) can still carry
120
+ // several files, so cap it to the last one — consistent with the
121
+ // "second pick replaces the first" semantics. (Bug #30570313)
122
+ const incoming = this.multiple ? Array.from(files) : Array.from(files).slice(-1);
123
+ if (!this.multiple && this.displayAttachments) {
124
+ this.files = [];
125
+ }
126
+ incoming.forEach(file => {
119
127
  const isFile = this.files.find(item => item.file.name === file.name && item.file.size === file.size) || null;
120
128
  if (isFile === null || this.ignoreFileDuplicationCheck) {
121
129
  const isSizeValid = typeof this.maxFileSize === "number" && this.maxFileSize > 0 ? fileSizeValidation(file, this.maxFileSize) : true;
@@ -138,6 +146,9 @@ export class GovFormFile {
138
146
  });
139
147
  }
140
148
  });
149
+ if (this.displayAttachments) {
150
+ this.syncNativeInputFiles();
151
+ }
141
152
  this.govFiles.emit({
142
153
  component: FormFileClass.root,
143
154
  files: filesBuffer.length ? filesBuffer : this.files,
@@ -146,6 +157,27 @@ export class GovFormFile {
146
157
  this.reset().finally();
147
158
  }
148
159
  }
160
+ // Keep native <input type="file"> in sync with the visible attachments list so
161
+ // that a native form submit / FormData carries exactly the files shown in the UI.
162
+ // Invalid items (wrong type or oversize) are intentionally excluded.
163
+ syncNativeInputFiles() {
164
+ if (!this.inputRef || typeof DataTransfer === "undefined") {
165
+ return;
166
+ }
167
+ try {
168
+ const dt = new DataTransfer();
169
+ this.files
170
+ .filter(item => item.acceptValid === true && item.sizeValid === true)
171
+ .forEach(item => dt.items.add(item.file));
172
+ this.inputRef.files = dt.files;
173
+ }
174
+ catch (e) {
175
+ // Safari < 14.1 / older browsers may reject assigning to .files; nothing safe to fall back to.
176
+ if (typeof process !== "undefined" && process.env && process.env.NODE_ENV !== "production") {
177
+ console.warn("[gov-form-file] Could not sync native input.files:", e);
178
+ }
179
+ }
180
+ }
149
181
  componentDidLoad() {
150
182
  this.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {
151
183
  this.onAriaAttributeChange(attributeName, newValue);
@@ -169,7 +201,7 @@ export class GovFormFile {
169
201
  this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { [attributeName]: newValue });
170
202
  }
171
203
  render() {
172
- return (h(Host, { key: '0f005cd699699df5d67c1ae5a1ce69bcbe14df08', class: this.h.classes([FormFileClass.root]), invalid: toBoolAttrIfDefined(this.invalid), expanded: toBoolAttrIfDefined(this.expanded) }, h("div", { key: '85de8e3bbbed08f63a93b874799b2e76311320dd', class: FormFileClass.area, ref: el => (this.areaRef = el) }, h("slot", { key: 'd67d074f20d899d81c37118eeb872eace16be983' }), h("input", Object.assign({ key: 'b0be06c28155cd0bfd13aa6926f05718fe58ca2d', class: FormFileClass.input, ref: el => (this.inputRef = el), id: this.identifier || this.fileId, type: "file", name: this.name, accept: this.accept, multiple: this.multiple, onChange: this.onChangeHandler.bind(this), onFocus: this.onFocusHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, disabled: this.disabled }, this.inheritedAttributes, { "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-disabled": toBoolAttrIfDefined(this.disabled) })), h("div", { key: 'bf27e1a3806a4334ec9476171c64a5dfe96a1040', class: FormFileClass.inputFocus })), this.h.hasSlot("attachments") ? (h("div", { class: FormFileClass.attachments }, h("slot", { name: "attachments" }))) : null, this.files.length && this.displayAttachments ? (h("div", { class: FormFileClass.attachments }, h("gov-attachments", { label: this.accessibleAttachmentsLabel, "accessible-label": this.accessibleAttachmentsLabel }, this.files.map(item => (h("gov-attachments-item", { "accessible-remove-labelledby": item.id, "on-gov-remove": () => this.onRemoveFileHandler(item) }, item.file.name, h("span", { slot: "name" }, item.file.name), item.acceptValid === false ? (h("gov-form-message", { slot: "message", color: "error" }, h("gov-icon", { slot: "icon", name: "exclamation-triangle-fill", type: "components" }), item.acceptValid === false ? this.errorAccept : null)) : null, item.sizeValid === false ? (h("gov-form-message", { slot: "message", color: "error" }, h("gov-icon", { slot: "icon", name: "exclamation-triangle-fill", type: "components" }), this.errorSize.replace("{FILE_SIZE}", formatBytes(this.maxFileSize)))) : null, h("span", { slot: "info" }, "(", formatBytes(item.file.size), ")"))))))) : null));
204
+ return (h(Host, { key: '2d89af24db1447bba2c7987946b5c63bff65a58a', class: this.h.classes([FormFileClass.root]), invalid: toBoolAttrIfDefined(this.invalid), expanded: toBoolAttrIfDefined(this.expanded) }, h("div", { key: '7a37869f8ef203b0f1d6b07cfee8e4f325fe9ecc', class: FormFileClass.area, ref: el => (this.areaRef = el) }, h("slot", { key: '10344be7bedf53a4754c8e79bb069c57291b7663' }), h("input", Object.assign({ key: '52dc1692d0eaa6310c0166faceb5906627aac73c', class: FormFileClass.input, ref: el => (this.inputRef = el), id: this.identifier || this.fileId, type: "file", name: this.name, accept: this.accept, multiple: this.multiple, onChange: this.onChangeHandler.bind(this), onFocus: this.onFocusHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, disabled: this.disabled }, this.inheritedAttributes, { "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-disabled": toBoolAttrIfDefined(this.disabled) })), h("div", { key: '1193c6ef7a57894baab2f14619827c2f51441d08', class: FormFileClass.inputFocus })), this.h.hasSlot("attachments") ? (h("div", { class: FormFileClass.attachments }, h("slot", { name: "attachments" }))) : null, this.files.length && this.displayAttachments ? (h("div", { class: FormFileClass.attachments }, h("gov-attachments", { label: this.accessibleAttachmentsLabel, "accessible-label": this.accessibleAttachmentsLabel }, this.files.map(item => (h("gov-attachments-item", { "accessible-remove-labelledby": item.id, "on-gov-remove": () => this.onRemoveFileHandler(item) }, item.file.name, h("span", { slot: "name" }, item.file.name), item.acceptValid === false ? (h("gov-form-message", { slot: "message", color: "error" }, h("gov-icon", { slot: "icon", name: "exclamation-triangle-fill", type: "components" }), item.acceptValid === false ? this.errorAccept : null)) : null, item.sizeValid === false ? (h("gov-form-message", { slot: "message", color: "error" }, h("gov-icon", { slot: "icon", name: "exclamation-triangle-fill", type: "components" }), this.errorSize.replace("{FILE_SIZE}", formatBytes(this.maxFileSize)))) : null, h("span", { slot: "info" }, "(", formatBytes(item.file.size), ")"))))))) : null));
173
205
  }
174
206
  onRemoveFileHandler(file) {
175
207
  const index = this.files.findIndex(item => item.id === file.id);
@@ -178,6 +210,7 @@ export class GovFormFile {
178
210
  const removeFile = this.files[index];
179
211
  files.splice(index, 1);
180
212
  this.files = [...files];
213
+ this.syncNativeInputFiles();
181
214
  this.govRemoveFile.emit({
182
215
  component: FormFileClass.root,
183
216
  file: removeFile,
@@ -222,7 +255,10 @@ export class GovFormFile {
222
255
  */
223
256
  async reset() {
224
257
  this.files = [];
225
- this.inputRef.value = '';
258
+ if (this.inputRef) {
259
+ this.inputRef.value = '';
260
+ this.syncNativeInputFiles();
261
+ }
226
262
  }
227
263
  static get is() { return "gov-form-file"; }
228
264
  static get properties() {