@oslokommune/punkt-elements 16.25.2 → 16.26.2

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 (257) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/{accordion-BjYsEbSM.js → accordion-CBdIk9gw.js} +5 -5
  3. package/dist/{accordion-DaeWPWod.cjs → accordion-FISAiAbX.cjs} +2 -2
  4. package/dist/{alert-C8OpU_Un.cjs → alert-B8dLsiTz.cjs} +2 -2
  5. package/dist/{alert-B5Y841vH.js → alert-HHTGY0sp.js} +6 -6
  6. package/dist/{async-directive-Cz6tcqge.js → async-directive-Cw_7VW_-.js} +3 -3
  7. package/dist/{async-directive-DO1QtVmf.cjs → async-directive-HLXOyE4A.cjs} +1 -1
  8. package/dist/{backlink-C42-3OG3.cjs → backlink-DDGlLzk9.cjs} +2 -2
  9. package/dist/{backlink-BXAdgAte.js → backlink-wMNLuQ0X.js} +3 -3
  10. package/dist/{booleanish-jJLlnr6-.cjs → booleanish-B9Kf0nES.cjs} +1 -1
  11. package/dist/{breadcrumbs-Dkb9TxMp.js → breadcrumbs-CVTLNNsL.js} +2 -2
  12. package/dist/{breadcrumbs-CkjeLh3U.cjs → breadcrumbs-D3tfWqvC.cjs} +2 -2
  13. package/dist/{button-Bqk9wjme.cjs → button-B5tQpKeG.cjs} +2 -2
  14. package/dist/{button-CAZEaEW9.js → button-C_YzTSuU.js} +5 -5
  15. package/dist/{calendar-CRIp36hn.js → calendar-CjlUA-Lb.js} +4 -4
  16. package/dist/{calendar-64LmbIdR.cjs → calendar-DIzGBdbh.cjs} +2 -2
  17. package/dist/{card-C__IlsUa.cjs → card-BSZs5lRF.cjs} +2 -2
  18. package/dist/{card-5PydU247.js → card-D3jVkwxJ.js} +7 -7
  19. package/dist/{checkbox-CC1X7fw4.js → checkbox-DB_ZAuJJ.js} +12 -12
  20. package/dist/{checkbox-DzMc0AJX.cjs → checkbox-HKXLLpXq.cjs} +9 -9
  21. package/dist/{class-map-DH9hlJny.js → class-map-CAQCRB1W.js} +2 -2
  22. package/dist/{class-map-B8Ja0q7n.cjs → class-map-CCZN5uS3.cjs} +1 -1
  23. package/dist/{classutils-CVTzKF0J.cjs → classutils-CbklAJDe.cjs} +1 -1
  24. package/dist/{combobox-DJITmrnM.cjs → combobox-DsqvSokZ.cjs} +2 -2
  25. package/dist/{combobox-BuBvoK-N.js → combobox-vaCanZCq.js} +27 -17
  26. package/dist/components/accordion/accordion.d.ts +1 -1
  27. package/dist/components/accordion/accordionitem.d.ts +1 -1
  28. package/dist/components/alert/alert.d.ts +1 -1
  29. package/dist/components/backlink/backlink.d.ts +1 -1
  30. package/dist/components/breadcrumbs/breadcrumbs.d.ts +1 -1
  31. package/dist/components/button/button.d.ts +1 -1
  32. package/dist/components/card/card.d.ts +9 -9
  33. package/dist/components/checkbox/checkbox.d.ts +1 -1
  34. package/dist/components/combobox/combobox.d.ts +1 -1
  35. package/dist/components/consent/consent.d.ts +1 -1
  36. package/dist/components/datepicker/date-tags.d.ts +1 -1
  37. package/dist/components/datepicker/datepicker-multiple.d.ts +1 -1
  38. package/dist/components/datepicker/datepicker-popup.d.ts +1 -1
  39. package/dist/components/datepicker/datepicker-range.d.ts +1 -1
  40. package/dist/components/datepicker/datepicker-single.d.ts +1 -1
  41. package/dist/components/datepicker/datepicker.d.ts +5 -5
  42. package/dist/components/fileupload/fileupload-renderers.d.ts +2 -2
  43. package/dist/components/fileupload/fileupload.d.ts +1 -1
  44. package/dist/components/header/header-user-menu.d.ts +1 -1
  45. package/dist/components/header/header.d.ts +1 -1
  46. package/dist/components/helptext/helptext.d.ts +1 -1
  47. package/dist/components/icon/icon.d.ts +1 -1
  48. package/dist/components/input-wrapper/input-wrapper.d.ts +1 -1
  49. package/dist/components/link/link.d.ts +1 -1
  50. package/dist/components/linkcard/linkcard.d.ts +1 -1
  51. package/dist/components/listbox/listbox.d.ts +1 -1
  52. package/dist/components/loader/loader.d.ts +1 -1
  53. package/dist/components/messagebox/messagebox.d.ts +1 -1
  54. package/dist/components/modal/modal.d.ts +1 -1
  55. package/dist/components/progressbar/progressbar.d.ts +1 -1
  56. package/dist/components/radiobutton/radiobutton.d.ts +1 -1
  57. package/dist/components/searchinput/searchinput.d.ts +1 -1
  58. package/dist/components/select/select.d.ts +1 -1
  59. package/dist/components/tabs/tabitem.d.ts +1 -1
  60. package/dist/components/tabs/tabs.d.ts +1 -1
  61. package/dist/components/tag/tag.d.ts +1 -1
  62. package/dist/components/textarea/textarea.d.ts +1 -1
  63. package/dist/components/textinput/textinput.d.ts +1 -1
  64. package/dist/components/timepicker/timepicker.d.ts +1 -1
  65. package/dist/{consent-CCesjQ_e.js → consent-D5sY6JK3.js} +3 -3
  66. package/dist/{consent-DkCihETp.cjs → consent-X3wvhteO.cjs} +2 -2
  67. package/dist/converters-9jHlXDyy.cjs +1 -0
  68. package/dist/{converters-BQnj7OJE.js → converters-BKGBRBpS.js} +191 -176
  69. package/dist/{datepicker-zOOhs9JK.js → datepicker-CKghFMu2.js} +13 -13
  70. package/dist/{datepicker-ChEi_INm.cjs → datepicker-DNEUkbB0.cjs} +2 -2
  71. package/dist/{dialog-polyfill.esm-CYs2AHP1.cjs → dialog-polyfill.esm-J-GKtwrS.cjs} +1 -1
  72. package/dist/{directive-helpers-f36YZFOG.cjs → directive-helpers-BshFvt7A.cjs} +1 -1
  73. package/dist/{directive-helpers-Cep_4cpj.js → directive-helpers-DIF5DwN4.js} +2 -2
  74. package/dist/directives/slot-content.d.ts +1 -1
  75. package/dist/docs/backlink.d.ts +1 -1
  76. package/dist/docs/components/accordion.d.ts +1 -1
  77. package/dist/docs/components/alert.d.ts +1 -1
  78. package/dist/docs/components/backlink.d.ts +1 -1
  79. package/dist/docs/components/breadcrumbs.d.ts +1 -1
  80. package/dist/docs/components/button.d.ts +1 -1
  81. package/dist/docs/components/calendar.d.ts +1 -1
  82. package/dist/docs/components/card.d.ts +1 -1
  83. package/dist/docs/components/checkbox.d.ts +1 -1
  84. package/dist/docs/components/combobox.d.ts +1 -1
  85. package/dist/docs/components/comboboxdemo.d.ts +1 -1
  86. package/dist/docs/components/consent.d.ts +1 -1
  87. package/dist/docs/components/datepicker.d.ts +1 -1
  88. package/dist/docs/components/datepickermultiple.d.ts +1 -1
  89. package/dist/docs/components/fileupload.d.ts +1 -1
  90. package/dist/docs/components/form.d.ts +1 -1
  91. package/dist/docs/components/header-full.d.ts +1 -1
  92. package/dist/docs/components/header-menu.d.ts +1 -1
  93. package/dist/docs/components/header.d.ts +1 -1
  94. package/dist/docs/components/heading.d.ts +1 -1
  95. package/dist/docs/components/icon.d.ts +1 -1
  96. package/dist/docs/components/input-wrapper.d.ts +1 -1
  97. package/dist/docs/components/link.d.ts +1 -1
  98. package/dist/docs/components/linkcard.d.ts +1 -1
  99. package/dist/docs/components/loader.d.ts +1 -1
  100. package/dist/docs/components/messagebox.d.ts +1 -1
  101. package/dist/docs/components/modal.d.ts +1 -1
  102. package/dist/docs/components/progressbar.d.ts +1 -1
  103. package/dist/docs/components/radiobutton.d.ts +1 -1
  104. package/dist/docs/components/searchinput.d.ts +1 -1
  105. package/dist/docs/components/select.d.ts +1 -1
  106. package/dist/docs/components/slots.d.ts +1 -1
  107. package/dist/docs/components/tabs.d.ts +1 -1
  108. package/dist/docs/components/tag.d.ts +1 -1
  109. package/dist/docs/components/textarea.d.ts +1 -1
  110. package/dist/docs/components/textinput.d.ts +1 -1
  111. package/dist/docs/components/timepicker.d.ts +1 -1
  112. package/dist/docs/header.d.ts +1 -1
  113. package/dist/docs/punkt-docs.d.ts +1 -1
  114. package/dist/{element-CduG0XyF.js → element-BoJrqauR.js} +6 -6
  115. package/dist/{element-CXAtr6Gu.cjs → element-DJzurxgt.cjs} +1 -1
  116. package/dist/{element-with-slot-Cmxb9h4H.cjs → element-with-slot-BY7Jc-q8.cjs} +1 -1
  117. package/dist/{element-with-slot-BVj9MXzi.js → element-with-slot-mXLg8gg8.js} +2 -2
  118. package/dist/{fileupload-CGaJlMG9.cjs → fileupload-BMHJaAKR.cjs} +2 -2
  119. package/dist/{fileupload-BBph8gH3.js → fileupload-DpvQ3e_T.js} +10 -10
  120. package/dist/{focus-modality-controller-wI5SR8wH.cjs → focus-modality-controller-C1ocyv2J.cjs} +1 -1
  121. package/dist/{header-C8dCoJpr.js → header-C7kSI9zP.js} +10 -10
  122. package/dist/{header-C6z1KhOR.cjs → header-VfLyhEYL.cjs} +2 -2
  123. package/dist/{header-menu-BU-ylGrJ.js → header-menu-C8b5vd3n.js} +5 -5
  124. package/dist/{header-menu-CnW7nzmF.cjs → header-menu-DMdP_c6X.cjs} +2 -2
  125. package/dist/{heading-3o4Dk0Wn.js → heading-CD0PhL8g.js} +2 -2
  126. package/dist/{heading-C40-NX0r.cjs → heading-DyJpBFT2.cjs} +1 -1
  127. package/dist/{helptext-C2aQBBo_.js → helptext-OfqH5npD.js} +6 -6
  128. package/dist/{helptext-DNLg43eI.cjs → helptext-eckq4JEX.cjs} +2 -2
  129. package/dist/{icon-Dw6I0HDV.cjs → icon-B8PVq2O6.cjs} +1 -1
  130. package/dist/{icon-LaKyBKON.js → icon-DGFEIlco.js} +2 -2
  131. package/dist/if-defined-D0bnetLJ.js +5 -0
  132. package/dist/if-defined-DrwbxQOj.cjs +1 -0
  133. package/dist/index.d.ts +2 -2
  134. package/dist/input-element-C_zP_x4a.js +656 -0
  135. package/dist/input-element-Df9FHnfn.cjs +1 -0
  136. package/dist/{input-wrapper-CvtU-Ksb.cjs → input-wrapper-BRjQB4zM.cjs} +21 -21
  137. package/dist/{input-wrapper-C93MmOIg.js → input-wrapper-DaA98B5l.js} +32 -32
  138. package/dist/{input-wrapper-CYCCx8MP.cjs → input-wrapper-LcZjpt0L.cjs} +1 -1
  139. package/dist/{link-DauiNRMq.js → link-FmkQvSQL.js} +4 -4
  140. package/dist/{link-EZ0-lS3W.cjs → link-Geze7498.cjs} +2 -2
  141. package/dist/{linkcard-BIcCW-qw.cjs → linkcard-6LCXRTR-.cjs} +2 -2
  142. package/dist/{linkcard-DNJm5FvA.js → linkcard-BKdT0zU_.js} +4 -4
  143. package/dist/{listbox-DbEobJNx.cjs → listbox-89wMuQVK.cjs} +2 -2
  144. package/dist/{listbox-DXMIBv3y.js → listbox-LdyWPu7W.js} +5 -5
  145. package/dist/{loader-B3ToraVk.js → loader-BA-i8CaQ.js} +4 -4
  146. package/dist/{loader-CLf_Phfg.cjs → loader-CgW4Vst3.cjs} +2 -2
  147. package/dist/{messagebox-BqBxXK8c.cjs → messagebox-VD5oEZ19.cjs} +2 -2
  148. package/dist/{messagebox-XRFecqyS.js → messagebox-fiaAyHLG.js} +5 -5
  149. package/dist/{modal-CWgeT-RP.js → modal-C6pScpdG.js} +6 -6
  150. package/dist/{modal-CrYHKOmr.cjs → modal-DKU7PnjJ.cjs} +2 -2
  151. package/dist/pkt-accordion.cjs +1 -1
  152. package/dist/pkt-accordion.js +1 -1
  153. package/dist/pkt-alert.cjs +1 -1
  154. package/dist/pkt-alert.js +1 -1
  155. package/dist/pkt-backlink.cjs +1 -1
  156. package/dist/pkt-backlink.js +1 -1
  157. package/dist/pkt-breadcrumbs.cjs +1 -1
  158. package/dist/pkt-breadcrumbs.js +1 -1
  159. package/dist/pkt-button.cjs +1 -1
  160. package/dist/pkt-button.js +1 -1
  161. package/dist/pkt-calendar.cjs +1 -1
  162. package/dist/pkt-calendar.js +1 -1
  163. package/dist/pkt-card.cjs +1 -1
  164. package/dist/pkt-card.js +1 -1
  165. package/dist/pkt-checkbox.cjs +1 -1
  166. package/dist/pkt-checkbox.js +1 -1
  167. package/dist/pkt-combobox.cjs +1 -1
  168. package/dist/pkt-combobox.js +1 -1
  169. package/dist/pkt-consent.cjs +1 -1
  170. package/dist/pkt-consent.js +1 -1
  171. package/dist/pkt-datepicker.cjs +1 -1
  172. package/dist/pkt-datepicker.js +1 -1
  173. package/dist/pkt-fileupload.cjs +1 -1
  174. package/dist/pkt-fileupload.js +1 -1
  175. package/dist/pkt-header-menu.cjs +1 -1
  176. package/dist/pkt-header-menu.js +1 -1
  177. package/dist/pkt-header.cjs +1 -1
  178. package/dist/pkt-header.js +1 -1
  179. package/dist/pkt-heading.cjs +1 -1
  180. package/dist/pkt-heading.js +1 -1
  181. package/dist/pkt-helptext.cjs +1 -1
  182. package/dist/pkt-helptext.js +1 -1
  183. package/dist/pkt-icon.cjs +1 -1
  184. package/dist/pkt-icon.js +1 -1
  185. package/dist/pkt-index.cjs +1 -1
  186. package/dist/pkt-index.js +32 -32
  187. package/dist/pkt-input-wrapper.cjs +1 -1
  188. package/dist/pkt-input-wrapper.js +1 -1
  189. package/dist/pkt-link.cjs +1 -1
  190. package/dist/pkt-link.js +1 -1
  191. package/dist/pkt-linkcard.cjs +1 -1
  192. package/dist/pkt-linkcard.js +1 -1
  193. package/dist/pkt-listbox.cjs +1 -1
  194. package/dist/pkt-listbox.js +1 -1
  195. package/dist/pkt-loader.cjs +1 -1
  196. package/dist/pkt-loader.js +1 -1
  197. package/dist/pkt-messagebox.cjs +1 -1
  198. package/dist/pkt-messagebox.js +1 -1
  199. package/dist/pkt-modal.cjs +1 -1
  200. package/dist/pkt-modal.js +1 -1
  201. package/dist/{pkt-options-controller-BTNtjEIS.js → pkt-options-controller-Cis62vGe.js} +1 -1
  202. package/dist/{pkt-options-controller-CBM8xHwR.cjs → pkt-options-controller-DHKHMyXM.cjs} +1 -1
  203. package/dist/pkt-progressbar.cjs +1 -1
  204. package/dist/pkt-progressbar.js +1 -1
  205. package/dist/pkt-radiobutton.cjs +1 -1
  206. package/dist/pkt-radiobutton.js +1 -1
  207. package/dist/pkt-searchinput.cjs +1 -1
  208. package/dist/pkt-searchinput.js +1 -1
  209. package/dist/pkt-select.cjs +1 -1
  210. package/dist/pkt-select.js +1 -1
  211. package/dist/pkt-tabs.cjs +1 -1
  212. package/dist/pkt-tabs.js +1 -1
  213. package/dist/pkt-tag.cjs +1 -1
  214. package/dist/pkt-tag.js +1 -1
  215. package/dist/pkt-textarea.cjs +1 -1
  216. package/dist/pkt-textarea.js +1 -1
  217. package/dist/pkt-textinput.cjs +1 -1
  218. package/dist/pkt-textinput.js +1 -1
  219. package/dist/pkt-timepicker.cjs +1 -1
  220. package/dist/pkt-timepicker.js +1 -1
  221. package/dist/progressbar-BN5y20CC.cjs +17 -0
  222. package/dist/{progressbar-B0P_vmGD.js → progressbar-mtjtbpCO.js} +7 -7
  223. package/dist/{radiobutton-C6zERHoy.js → radiobutton-CKhWm7CI.js} +8 -8
  224. package/dist/{radiobutton-BfURufrZ.cjs → radiobutton-DbezjeDT.cjs} +5 -5
  225. package/dist/ref-DO7TzO4O.cjs +1 -0
  226. package/dist/{ref-BgoHEsEt.js → ref-WGS0u7i2.js} +5 -5
  227. package/dist/{repeat-CKIii8Mi.js → repeat-BH0cL82q.js} +3 -3
  228. package/dist/{repeat-CRRgmzVn.cjs → repeat-DRnLAg0O.cjs} +1 -1
  229. package/dist/{searchinput-fPvXHu2O.js → searchinput-CyO5k4Q4.js} +7 -6
  230. package/dist/{searchinput-BrxfRzez.cjs → searchinput-DG6YetL1.cjs} +2 -2
  231. package/dist/{select-z3hBSk02.cjs → select-3689MFnH.cjs} +2 -2
  232. package/dist/{select-Dz3YiN7b.js → select-CrTmkOw0.js} +7 -7
  233. package/dist/{tabs-DxQy8U-0.cjs → tabs-CGo0ODPa.cjs} +2 -2
  234. package/dist/{tabs-BJx6wwXD.js → tabs-ChdR0D1C.js} +9 -9
  235. package/dist/{tag-CBFz0R9N.cjs → tag-C4fEuT-r.cjs} +2 -2
  236. package/dist/{tag-CzlnHhho.js → tag-DBNga0hg.js} +5 -5
  237. package/dist/{textarea-rHlURXh5.cjs → textarea-BWOuU6m6.cjs} +2 -2
  238. package/dist/{textarea-BxBfLk3N.js → textarea-tKZakgjC.js} +10 -10
  239. package/dist/{textinput-DSYABvB6.cjs → textinput-CqvE701N.cjs} +2 -2
  240. package/dist/{textinput-Bs8DwHwR.js → textinput-D-gsl53I.js} +8 -8
  241. package/dist/{timepicker-Cb9pxkJa.js → timepicker-D2KJmxrZ.js} +8 -8
  242. package/dist/{timepicker-DVisPbGX.cjs → timepicker-DTI6LY0j.cjs} +2 -2
  243. package/dist/{utils-CjAbIttF.cjs → utils-63cRpWut.cjs} +1 -1
  244. package/package.json +28 -27
  245. package/dist/converters-CkqZ02TI.cjs +0 -1
  246. package/dist/if-defined-LTjAScFG.cjs +0 -1
  247. package/dist/if-defined-VShASPdu.js +0 -5
  248. package/dist/input-element-BHQVt4Q9.cjs +0 -1
  249. package/dist/input-element-BrmkXIXi.js +0 -643
  250. package/dist/progressbar-DADdvDl5.cjs +0 -17
  251. package/dist/ref-CBdWMlde.cjs +0 -1
  252. /package/dist/{booleanish-BmcOU-43.js → booleanish-MfutDT_4.js} +0 -0
  253. /package/dist/{classutils-lVbGcvjN.js → classutils-DcYnSgfc.js} +0 -0
  254. /package/dist/{dialog-polyfill.esm-0dVT8G1o.js → dialog-polyfill.esm-ChZRzCVh.js} +0 -0
  255. /package/dist/{focus-modality-controller-CaUqYdk0.js → focus-modality-controller-Dc2S-KqR.js} +0 -0
  256. /package/dist/{input-wrapper-kw2y6Jp_.js → input-wrapper-DwwE0JcO.js} +0 -0
  257. /package/dist/{utils-CUqCKGvp.js → utils-BwF4QSrq.js} +0 -0
@@ -0,0 +1,656 @@
1
+ import { n as e, o as t, r as n } from "./element-BoJrqauR.js";
2
+ import { t as r } from "./element-with-slot-mXLg8gg8.js";
3
+ import { n as i } from "./utils-BwF4QSrq.js";
4
+ import { t as a } from "./booleanish-MfutDT_4.js";
5
+ import { t as o } from "./input-wrapper-DwwE0JcO.js";
6
+ //#region ../../node_modules/element-internals-polyfill/dist/maps.js
7
+ var s = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), x = (e, t, n) => {
8
+ e.getAttribute(t) !== n && e.setAttribute(t, n);
9
+ }, S = (e, t) => {
10
+ e.toggleAttribute("internals-disabled", t), t ? x(e, "aria-disabled", "true") : e.removeAttribute("aria-disabled"), e.formDisabledCallback && e.formDisabledCallback.apply(e, [t]);
11
+ }, C = (e) => {
12
+ l.get(e).forEach((e) => {
13
+ e.remove();
14
+ }), l.set(e, []);
15
+ }, w = (e, t) => {
16
+ let n = document.createElement("input");
17
+ return n.type = "hidden", n.name = e.getAttribute("name"), e.after(n), l.get(t).push(n), n;
18
+ }, T = (e, t) => {
19
+ if (t.length) {
20
+ let n = Array.from(t);
21
+ n.forEach((t) => t.addEventListener("click", e.click.bind(e)));
22
+ let [r] = n, i = r.id;
23
+ r.id ||= (i = `${r.htmlFor}_Label`, i), x(e, "aria-labelledby", i);
24
+ }
25
+ }, E = (e) => {
26
+ let t = Array.from(e.elements).filter((e) => !e.tagName.includes("-") && e.validity).map((e) => e.validity.valid), n = p.get(e) || [], r = Array.from(n).filter((e) => e.isConnected).map((e) => u.get(e).validity.valid), i = [...t, ...r].includes(!1);
27
+ e.toggleAttribute("internals-invalid", i), e.toggleAttribute("internals-valid", !i);
28
+ }, te = (e) => {
29
+ E(O(e.target));
30
+ }, ne = (e) => {
31
+ E(O(e.target));
32
+ }, re = (e) => {
33
+ let t = [
34
+ "button[type=submit]",
35
+ "input[type=submit]",
36
+ "button:not([type])"
37
+ ].map((e) => `${e}:not([disabled])`).map((t) => `${t}:not([form])${e.id ? `,${t}[form='${e.id}']` : ""}`).join(",");
38
+ e.addEventListener("click", (n) => {
39
+ if (n.target.closest(t)) {
40
+ let t = p.get(e);
41
+ if (e.noValidate) return;
42
+ t.size && Array.from(t).reverse().map((e) => u.get(e).reportValidity()).includes(!1) && n.preventDefault();
43
+ }
44
+ });
45
+ }, ie = (e) => {
46
+ let t = p.get(e.target);
47
+ t && t.size && t.forEach((e) => {
48
+ e.constructor.formAssociated && e.formResetCallback && e.formResetCallback.apply(e);
49
+ });
50
+ }, D = (e, t, n) => {
51
+ if (t) {
52
+ let r = p.get(t);
53
+ if (r) r.add(e);
54
+ else {
55
+ let n = /* @__PURE__ */ new Set();
56
+ n.add(e), p.set(t, n), re(t), t.addEventListener("reset", ie), t.addEventListener("input", te), t.addEventListener("change", ne);
57
+ }
58
+ ee.set(t, {
59
+ ref: e,
60
+ internals: n
61
+ }), e.constructor.formAssociated && e.formAssociatedCallback && setTimeout(() => {
62
+ e.formAssociatedCallback.apply(e, [t]);
63
+ }, 0), E(t);
64
+ }
65
+ }, O = (e) => {
66
+ let t = e.parentNode;
67
+ return t && t.tagName !== "FORM" && (t = O(t)), t;
68
+ }, k = (e, t, n = DOMException) => {
69
+ if (!e.constructor.formAssociated) throw new n(t);
70
+ }, A = (e, t, n) => {
71
+ let r = p.get(e);
72
+ return r && r.size && r.forEach((e) => {
73
+ u.get(e)[n]() || (t = !1);
74
+ }), t;
75
+ }, j = (e) => {
76
+ let t = !1;
77
+ if (e.constructor.formAssociated) {
78
+ let n = u.get(e);
79
+ n === void 0 && (e.attachInternals(), n = u.get(e), t = !0);
80
+ let { labels: r, form: i } = n;
81
+ T(e, r), D(e, i, n);
82
+ }
83
+ return t;
84
+ };
85
+ function M() {
86
+ return typeof MutationObserver < "u";
87
+ }
88
+ //#endregion
89
+ //#region ../../node_modules/element-internals-polyfill/dist/aom.js
90
+ var N = {
91
+ ariaAtomic: "aria-atomic",
92
+ ariaAutoComplete: "aria-autocomplete",
93
+ ariaBrailleLabel: "aria-braillelabel",
94
+ ariaBrailleRoleDescription: "aria-brailleroledescription",
95
+ ariaBusy: "aria-busy",
96
+ ariaChecked: "aria-checked",
97
+ ariaColCount: "aria-colcount",
98
+ ariaColIndex: "aria-colindex",
99
+ ariaColIndexText: "aria-colindextext",
100
+ ariaColSpan: "aria-colspan",
101
+ ariaCurrent: "aria-current",
102
+ ariaDescription: "aria-description",
103
+ ariaDisabled: "aria-disabled",
104
+ ariaExpanded: "aria-expanded",
105
+ ariaHasPopup: "aria-haspopup",
106
+ ariaHidden: "aria-hidden",
107
+ ariaInvalid: "aria-invalid",
108
+ ariaKeyShortcuts: "aria-keyshortcuts",
109
+ ariaLabel: "aria-label",
110
+ ariaLevel: "aria-level",
111
+ ariaLive: "aria-live",
112
+ ariaModal: "aria-modal",
113
+ ariaMultiLine: "aria-multiline",
114
+ ariaMultiSelectable: "aria-multiselectable",
115
+ ariaOrientation: "aria-orientation",
116
+ ariaPlaceholder: "aria-placeholder",
117
+ ariaPosInSet: "aria-posinset",
118
+ ariaPressed: "aria-pressed",
119
+ ariaReadOnly: "aria-readonly",
120
+ ariaRelevant: "aria-relevant",
121
+ ariaRequired: "aria-required",
122
+ ariaRoleDescription: "aria-roledescription",
123
+ ariaRowCount: "aria-rowcount",
124
+ ariaRowIndex: "aria-rowindex",
125
+ ariaRowIndexText: "aria-rowindextext",
126
+ ariaRowSpan: "aria-rowspan",
127
+ ariaSelected: "aria-selected",
128
+ ariaSetSize: "aria-setsize",
129
+ ariaSort: "aria-sort",
130
+ ariaValueMax: "aria-valuemax",
131
+ ariaValueMin: "aria-valuemin",
132
+ ariaValueNow: "aria-valuenow",
133
+ ariaValueText: "aria-valuetext",
134
+ role: "role"
135
+ }, ae = (e, t) => {
136
+ for (let n in N) {
137
+ t[n] = null;
138
+ let r = null, i = N[n];
139
+ Object.defineProperty(t, n, {
140
+ get() {
141
+ return r;
142
+ },
143
+ set(n) {
144
+ r = n, e.isConnected ? x(e, i, n) : h.set(e, t);
145
+ }
146
+ });
147
+ }
148
+ }, oe = (e, t) => {
149
+ l.set(t, []), L.observe?.(e, I);
150
+ };
151
+ function P(e) {
152
+ let t = u.get(e), { form: n } = t;
153
+ D(e, n, t), T(e, t.labels);
154
+ }
155
+ var F = (e, t = !1) => {
156
+ let n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode(e) {
157
+ return u.has(e) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
158
+ } }), r = n.nextNode(), i = !t || e.disabled;
159
+ for (; r;) r.formDisabledCallback && i && S(r, e.disabled), r = n.nextNode();
160
+ }, I = {
161
+ attributes: !0,
162
+ attributeFilter: ["disabled", "name"]
163
+ }, L = M() ? new MutationObserver((e) => {
164
+ for (let t of e) {
165
+ let e = t.target;
166
+ if (t.attributeName === "disabled" && (e.constructor.formAssociated ? S(e, e.hasAttribute("disabled")) : e.localName === "fieldset" && F(e)), t.attributeName === "name" && e.constructor.formAssociated) {
167
+ let t = u.get(e), n = m.get(e);
168
+ t.setFormValue(n);
169
+ }
170
+ }
171
+ }) : {};
172
+ function R(e) {
173
+ e.forEach((e) => {
174
+ let { addedNodes: t, removedNodes: n } = e, r = Array.from(t), i = Array.from(n);
175
+ r.forEach((e) => {
176
+ if (u.has(e) && e.constructor.formAssociated && P(e), h.has(e)) {
177
+ let t = h.get(e);
178
+ Object.keys(N).filter((e) => t[e] !== null).forEach((n) => {
179
+ x(e, N[n], t[n]);
180
+ }), h.delete(e);
181
+ }
182
+ if (b.has(e)) {
183
+ let t = b.get(e);
184
+ x(e, "internals-valid", t.validity.valid.toString()), x(e, "internals-invalid", (!t.validity.valid).toString()), x(e, "aria-invalid", (!t.validity.valid).toString()), b.delete(e);
185
+ }
186
+ if (e.localName === "form") {
187
+ let t = p.get(e), n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode(e) {
188
+ return u.has(e) && e.constructor.formAssociated && !(t && t.has(e)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
189
+ } }), r = n.nextNode();
190
+ for (; r;) P(r), r = n.nextNode();
191
+ }
192
+ e.localName === "fieldset" && (L.observe?.(e, I), F(e, !0));
193
+ }), i.forEach((e) => {
194
+ let t = u.get(e);
195
+ t && l.get(t) && C(t), f.has(e) && f.get(e).disconnect();
196
+ });
197
+ });
198
+ }
199
+ function se(e) {
200
+ e.forEach((e) => {
201
+ let { removedNodes: t } = e;
202
+ t.forEach((t) => {
203
+ let n = v.get(e.target);
204
+ u.has(t) && j(t), n.disconnect();
205
+ });
206
+ });
207
+ }
208
+ var ce = (e) => {
209
+ let t = new MutationObserver(se);
210
+ window?.ShadyDOM?.inUse && e.mode && e.host && (e = e.host), t.observe?.(e, { childList: !0 }), v.set(e, t);
211
+ };
212
+ M() && new MutationObserver(R);
213
+ var z = {
214
+ childList: !0,
215
+ subtree: !0
216
+ }, le = class {
217
+ constructor() {
218
+ this.badInput = !1, this.customError = !1, this.patternMismatch = !1, this.rangeOverflow = !1, this.rangeUnderflow = !1, this.stepMismatch = !1, this.tooLong = !1, this.tooShort = !1, this.typeMismatch = !1, this.valid = !0, this.valueMissing = !1, Object.seal(this);
219
+ }
220
+ }, ue = (e) => (e.badInput = !1, e.customError = !1, e.patternMismatch = !1, e.rangeOverflow = !1, e.rangeUnderflow = !1, e.stepMismatch = !1, e.tooLong = !1, e.tooShort = !1, e.typeMismatch = !1, e.valid = !0, e.valueMissing = !1, e), B = (e, t, n) => (e.valid = de(t), Object.keys(t).forEach((n) => e[n] = t[n]), n && E(n), e), de = (e) => {
221
+ let t = !0;
222
+ for (let n in e) n !== "valid" && e[n] !== !1 && (t = !1);
223
+ return t;
224
+ }, V = /* @__PURE__ */ new WeakMap();
225
+ function H(e, t) {
226
+ e.toggleAttribute(t, !0), e.part && e.part.add(t);
227
+ }
228
+ var U = class extends Set {
229
+ static get isPolyfilled() {
230
+ return !0;
231
+ }
232
+ constructor(e) {
233
+ if (super(), !e || !e.tagName || e.tagName.indexOf("-") === -1) throw TypeError("Illegal constructor");
234
+ V.set(this, e);
235
+ }
236
+ add(e) {
237
+ if (!/^--/.test(e) || typeof e != "string") throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${e} must start with '--'.`);
238
+ let t = super.add(e), n = V.get(this), r = `state${e}`;
239
+ return n.isConnected ? H(n, r) : setTimeout(() => {
240
+ H(n, r);
241
+ }), t;
242
+ }
243
+ clear() {
244
+ for (let [e] of this.entries()) this.delete(e);
245
+ super.clear();
246
+ }
247
+ delete(e) {
248
+ let t = super.delete(e), n = V.get(this);
249
+ return n.isConnected ? (n.toggleAttribute(`state${e}`, !1), n.part && n.part.remove(`state${e}`)) : setTimeout(() => {
250
+ n.toggleAttribute(`state${e}`, !1), n.part && n.part.remove(`state${e}`);
251
+ }), t;
252
+ }
253
+ }, fe = function(e, t, n, r, i) {
254
+ if (r === "m") throw TypeError("Private method is not writable");
255
+ if (r === "a" && !i) throw TypeError("Private accessor was defined without a setter");
256
+ if (typeof t == "function" ? e !== t || !i : !t.has(e)) throw TypeError("Cannot write private member to an object whose class did not declare it");
257
+ return r === "a" ? i.call(e, n) : i ? i.value = n : t.set(e, n), n;
258
+ }, W = function(e, t, n, r) {
259
+ if (n === "a" && !r) throw TypeError("Private accessor was defined without a getter");
260
+ if (typeof t == "function" ? e !== t || !r : !t.has(e)) throw TypeError("Cannot read private member from an object whose class did not declare it");
261
+ return n === "m" ? r : n === "a" ? r.call(e) : r ? r.value : t.get(e);
262
+ }, G, pe = class {
263
+ constructor(e) {
264
+ G.set(this, void 0), fe(this, G, e, "f");
265
+ for (let t = 0; t < e.length; t++) {
266
+ let n = e[t];
267
+ this[t] = n, n.hasAttribute("name") && (this[n.getAttribute("name")] = n);
268
+ }
269
+ Object.freeze(this);
270
+ }
271
+ get length() {
272
+ return W(this, G, "f").length;
273
+ }
274
+ [(G = /* @__PURE__ */ new WeakMap(), Symbol.iterator)]() {
275
+ return W(this, G, "f")[Symbol.iterator]();
276
+ }
277
+ item(e) {
278
+ return this[e] == null ? null : this[e];
279
+ }
280
+ namedItem(e) {
281
+ return this[e] == null ? null : this[e];
282
+ }
283
+ };
284
+ //#endregion
285
+ //#region ../../node_modules/element-internals-polyfill/dist/patch-form-prototype.js
286
+ function me() {
287
+ let e = HTMLFormElement.prototype.checkValidity;
288
+ HTMLFormElement.prototype.checkValidity = n;
289
+ let t = HTMLFormElement.prototype.reportValidity;
290
+ HTMLFormElement.prototype.reportValidity = r;
291
+ function n(...t) {
292
+ let n = e.apply(this, t);
293
+ return A(this, n, "checkValidity");
294
+ }
295
+ function r(...e) {
296
+ let n = t.apply(this, e);
297
+ return A(this, n, "reportValidity");
298
+ }
299
+ let { get: i } = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, "elements");
300
+ Object.defineProperty(HTMLFormElement.prototype, "elements", { get(...e) {
301
+ let t = i.call(this, ...e), n = Array.from(p.get(this) || []);
302
+ return n.length === 0 ? t : new pe(Array.from(t).concat(n).sort((e, t) => e.compareDocumentPosition ? e.compareDocumentPosition(t) & 2 ? 1 : -1 : 0));
303
+ } });
304
+ }
305
+ //#endregion
306
+ //#region ../../node_modules/element-internals-polyfill/dist/element-internals.js
307
+ var K = class {
308
+ static get isPolyfilled() {
309
+ return !0;
310
+ }
311
+ constructor(e) {
312
+ if (!e || !e.tagName || e.tagName.indexOf("-") === -1) throw TypeError("Illegal constructor");
313
+ let t = e.getRootNode(), n = new le();
314
+ this.states = new U(e), s.set(this, e), c.set(this, n), u.set(e, this), ae(e, this), oe(e, this), Object.seal(this), t instanceof DocumentFragment && ce(t);
315
+ }
316
+ checkValidity() {
317
+ let e = s.get(this);
318
+ if (k(e, "Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."), !this.willValidate) return !0;
319
+ let t = c.get(this);
320
+ if (!t.valid) {
321
+ let t = new Event("invalid", {
322
+ bubbles: !1,
323
+ cancelable: !0,
324
+ composed: !1
325
+ });
326
+ e.dispatchEvent(t);
327
+ }
328
+ return t.valid;
329
+ }
330
+ get form() {
331
+ let e = s.get(this);
332
+ k(e, "Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");
333
+ let t;
334
+ return e.constructor.formAssociated === !0 && (t = O(e)), t;
335
+ }
336
+ get labels() {
337
+ let e = s.get(this);
338
+ k(e, "Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");
339
+ let t = e.getAttribute("id"), n = e.getRootNode();
340
+ return n && t ? n.querySelectorAll(`[for="${t}"]`) : [];
341
+ }
342
+ reportValidity() {
343
+ let e = s.get(this);
344
+ if (k(e, "Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."), !this.willValidate) return !0;
345
+ let t = this.checkValidity(), n = _.get(this);
346
+ if (n && !e.constructor.formAssociated) throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");
347
+ return !t && n && (e.focus(), n.focus()), t;
348
+ }
349
+ setFormValue(e) {
350
+ let t = s.get(this);
351
+ if (k(t, "Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."), C(this), e != null && !(e instanceof FormData)) {
352
+ if (t.getAttribute("name")) {
353
+ let n = w(t, this);
354
+ n.value = e;
355
+ }
356
+ } else e != null && e instanceof FormData && Array.from(e).reverse().forEach(([e, n]) => {
357
+ if (typeof n == "string") {
358
+ let r = w(t, this);
359
+ r.name = e, r.value = n;
360
+ }
361
+ });
362
+ m.set(t, e);
363
+ }
364
+ setValidity(e, t, n) {
365
+ let r = s.get(this);
366
+ if (k(r, "Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."), !e) throw TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");
367
+ _.set(this, n);
368
+ let i = c.get(this), a = {};
369
+ for (let t in e) a[t] = e[t];
370
+ Object.keys(a).length === 0 && ue(i);
371
+ let o = {
372
+ ...i,
373
+ ...a
374
+ };
375
+ delete o.valid;
376
+ let { valid: l } = B(i, o, this.form);
377
+ if (!l && !t) throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");
378
+ d.set(this, l ? "" : t), r.isConnected ? (r.toggleAttribute("internals-invalid", !l), r.toggleAttribute("internals-valid", l), x(r, "aria-invalid", `${!l}`)) : b.set(r, this);
379
+ }
380
+ get shadowRoot() {
381
+ let e = s.get(this);
382
+ return g.get(e) || null;
383
+ }
384
+ get validationMessage() {
385
+ return k(s.get(this), "Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."), d.get(this);
386
+ }
387
+ get validity() {
388
+ return k(s.get(this), "Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."), c.get(this);
389
+ }
390
+ get willValidate() {
391
+ let e = s.get(this);
392
+ return k(e, "Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."), !(e.matches(":disabled") || e.disabled || e.hasAttribute("disabled") || e.hasAttribute("readonly"));
393
+ }
394
+ };
395
+ function he() {
396
+ if (typeof window > "u" || !window.ElementInternals || !HTMLElement.prototype.attachInternals) return !1;
397
+ class e extends HTMLElement {
398
+ constructor() {
399
+ super(), this.internals = this.attachInternals();
400
+ }
401
+ }
402
+ let t = `element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g, "")}`;
403
+ customElements.define(t, e);
404
+ let n = new e();
405
+ return [
406
+ "shadowRoot",
407
+ "form",
408
+ "willValidate",
409
+ "validity",
410
+ "validationMessage",
411
+ "labels",
412
+ "setFormValue",
413
+ "setValidity",
414
+ "checkValidity",
415
+ "reportValidity"
416
+ ].every((e) => e in n.internals);
417
+ }
418
+ var q = !1, J = !1;
419
+ function Y(e) {
420
+ J || (J = !0, window.CustomStateSet = U, e && (HTMLElement.prototype.attachInternals = function(...t) {
421
+ let n = e.call(this, t);
422
+ return n.states = new U(this), n;
423
+ }));
424
+ }
425
+ function ge(e = !0) {
426
+ let t = !1;
427
+ if (!q) {
428
+ if (q = !0, typeof window < "u" && (window.ElementInternals = K), typeof CustomElementRegistry < "u") {
429
+ let e = CustomElementRegistry.prototype.define;
430
+ CustomElementRegistry.prototype.define = function(n, r, i) {
431
+ if (r.formAssociated) {
432
+ let e = r.prototype.connectedCallback;
433
+ r.prototype.connectedCallback = function() {
434
+ y.has(this) || (y.set(this, !0), this.hasAttribute("disabled") && S(this, !0)), e?.apply(this), t = j(this);
435
+ };
436
+ }
437
+ e.call(this, n, r, i);
438
+ };
439
+ }
440
+ if (typeof HTMLElement < "u" && (HTMLElement.prototype.attachInternals = function() {
441
+ if (!this.tagName) return {};
442
+ if (this.tagName.indexOf("-") === -1) throw Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.");
443
+ if (u.has(this) && !t) throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");
444
+ return new K(this);
445
+ }), typeof Element < "u") {
446
+ function e(...e) {
447
+ let n = t.apply(this, e);
448
+ if (g.set(this, n), M()) {
449
+ let e = new MutationObserver(R);
450
+ window.ShadyDOM ? e.observe(this, z) : e.observe(n, z), f.set(this, e);
451
+ }
452
+ return n;
453
+ }
454
+ let t = Element.prototype.attachShadow;
455
+ Element.prototype.attachShadow = e;
456
+ }
457
+ M() && typeof document < "u" && new MutationObserver(R).observe(document.documentElement, z), typeof HTMLFormElement < "u" && me(), (e || typeof window < "u" && !window.CustomStateSet) && Y();
458
+ }
459
+ }
460
+ //#endregion
461
+ //#region ../../node_modules/element-internals-polyfill/dist/index.js
462
+ customElements.polyfillWrapFlushCallback || (he() ? typeof window < "u" && !window.CustomStateSet && Y(HTMLElement.prototype.attachInternals) : ge(!1));
463
+ //#endregion
464
+ //#region src/base-elements/input-element.ts
465
+ var X = "on", Z = "--checked", Q = ",", $ = class extends r {
466
+ static get formAssociated() {
467
+ return !0;
468
+ }
469
+ constructor() {
470
+ super(), this.defaultValue = null, this.disabled = !1, this.readonly = !1, this.required = !1, this.max = null, this.maxlength = null, this.min = null, this.minlength = null, this.step = null, this.ariaDescribedBy = null, this.ariaLabelledby = null, this.name = "", this.pattern = null, this.placeholder = null, this.id = i(), this.counter = !1, this.hasError = !1, this.inline = !1, this.hasFieldset = !1, this.optionalTag = !1, this.requiredTag = !1, this.skipForwardTestid = !1, this.useWrapper = !0, this.fullwidth = !1, this.counterMaxLength = 0, this.errorMessage = "", this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = o.props.helptextDropdownButton.default, this.label = null, this.optionalText = n.forms.labels.optional, this.requiredText = n.forms.labels.required, this.tagText = null, this.dataTestid = "", this.touched = !1, this.internals = this.attachInternals();
471
+ }
472
+ manageValidity(e) {
473
+ if (!e) {
474
+ console.warn("manageValidity called without valid input element");
475
+ return;
476
+ }
477
+ this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 }, n.forms.messages.required, e) : e.validity?.typeMismatch || e.validity?.badInput ? this.internals.setValidity({ typeMismatch: !0 }, n.forms.messages.invalid, e) : e.validity?.patternMismatch ? this.internals.setValidity({ patternMismatch: !0 }, n.forms.messages.invalidPattern, e) : e.validity?.tooShort || this.minlength && this.minlength > 0 && this.value.length < this.minlength ? this.internals.setValidity({ tooShort: !0 }, n.forms.messages.tooShort, e) : e.validity?.tooLong || this.maxlength && this.maxlength > 0 && this.value.length > this.maxlength ? this.internals.setValidity({ tooLong: !0 }, n.forms.messages.tooLong, e) : e.validity?.rangeUnderflow ? this.internals.setValidity({ rangeUnderflow: !0 }, this.min ? n.forms.messages.rangeUnderflowMin.replace("{min}", this.min?.toString()) : n.forms.messages.rangeUnderflow, e) : e.validity?.stepMismatch ? this.internals.setValidity({ stepMismatch: !0 }, n.forms.messages.invalid, e) : e.validity?.rangeOverflow ? this.internals.setValidity({ rangeOverflow: !0 }, this.max ? n.forms.messages.rangeOverflowMax.replace("{max}", this.max?.toString()) : n.forms.messages.rangeOverflow, e) : e.validity?.customError ? this.internals.setValidity({ customError: !0 }, e.validationMessage, e) : this.internals.setValidity({});
478
+ }
479
+ setFormValue(e) {
480
+ if (this.internals) if (Array.isArray(e)) {
481
+ let t = new FormData();
482
+ e.forEach((e) => {
483
+ t.append(this.name, e);
484
+ }), this.internals.setFormValue(t);
485
+ } else this.internals.setFormValue(e);
486
+ }
487
+ coordinateRadioGroup() {
488
+ if (!this.form || !this.name || this.type !== "radio") return;
489
+ let e = `pkt-radiobutton[name="${this.name}"], input[type=radio][name="${this.name}"]`;
490
+ this.form.querySelectorAll(e).forEach((e) => {
491
+ if (e !== this && e.getAttribute("name") === this.name && e.getAttribute("value") !== this.value) {
492
+ let t = e;
493
+ t.checked && (t.checked = !1, t.internals && (t.internals.setFormValue(null), t.internals.states?.delete(Z)));
494
+ }
495
+ });
496
+ }
497
+ valueChecked(e) {
498
+ if (!this.touched) return;
499
+ let t = this.internals.form || this.closest("form"), n = t ? new FormData(t) : null;
500
+ if (this.type === "radio" && this.coordinateRadioGroup(), typeof e == "string" ? (this.checked = e === "true", this.internals.ariaChecked = String(e === "true")) : typeof e == "boolean" && (this.checked = e, this.internals.ariaChecked = String(e)), this.checked) {
501
+ let e = (typeof this.value == "string" ? this.value : "") || X;
502
+ this.internals.setFormValue(e), n && n.append(this.name, e), this.internals.states.add(Z);
503
+ } else this.internals.setFormValue(null), n && n.delete(this.name), this.internals.states.delete(Z);
504
+ this.dispatchChangeEvents(this.checked), this.internals.reportValidity();
505
+ }
506
+ valueChanged(e, t) {
507
+ (t !== this.value || t !== this._value) && (typeof e == "string" ? ((this.multiple || this.range) && e.includes(Q) && (e = e.split(Q)), this.value = e, this._value = Array.isArray(e) ? e : [e]) : Array.isArray(e) ? (this.value = this.multiple || this.range ? e : e[0], this._value = e) : (this.value = "", this._value = []), (!this.value || this.value.length === 0) && t && t.length !== 0 ? this.clearInputValue() : this.value && this.value.toString() !== t?.toString() && this.onChange(this.value));
508
+ }
509
+ dispatchChangeEvents(e) {
510
+ this.dispatchEvent(new Event("change", {
511
+ bubbles: !0,
512
+ composed: !0
513
+ })), this.dispatchEvent(new CustomEvent("value-change", {
514
+ detail: e,
515
+ bubbles: !0,
516
+ composed: !0
517
+ }));
518
+ }
519
+ clearInputValue() {
520
+ let e = this.multiple || this.range ? [] : "";
521
+ this.value = e, this.setFormValue(e), this.dispatchChangeEvents(e);
522
+ }
523
+ onFocus() {
524
+ this.dispatchEvent(new FocusEvent("focus", {
525
+ bubbles: !0,
526
+ composed: !0
527
+ }));
528
+ }
529
+ onBlur() {
530
+ this.dispatchEvent(new FocusEvent("blur", {
531
+ bubbles: !0,
532
+ composed: !0
533
+ }));
534
+ }
535
+ onInput() {
536
+ this.dispatchEvent(new InputEvent("input", {
537
+ bubbles: !0,
538
+ composed: !0
539
+ }));
540
+ }
541
+ normalizeValue(e) {
542
+ return (this.range || this.multiple) && typeof e == "string" && e.includes(Q) ? e.split(Q) : !this.multiple && !this.range && Array.isArray(e) ? e[0] || "" : e;
543
+ }
544
+ validate() {
545
+ this.inputRef?.value && this.manageValidity(this.inputRef.value), this.inputRefTo?.value && this.manageValidity(this.inputRefTo.value);
546
+ }
547
+ onChange(e) {
548
+ if (!this.touched) {
549
+ this.touched = !0, e && this.setFormValue(e), this.validate();
550
+ return;
551
+ }
552
+ if (typeof e != "string" && !Array.isArray(e)) return;
553
+ let t = this.normalizeValue(e);
554
+ this.setFormValue(t), this.validate(), this.dispatchChangeEvents(t);
555
+ }
556
+ formResetCallback() {
557
+ if (this.touched = !1, this._options && this._options.length && this._options.forEach((e) => {
558
+ "selected" in e && (e.selected = !1);
559
+ }), this.checked !== void 0) this.checked = !1, this.internals.ariaChecked = "false", this.internals.setFormValue(""), this.inputRef?.value && "checked" in this.inputRef.value && (this.inputRef.value.checked = !1), this.valueChecked(this.checked);
560
+ else {
561
+ this.internals.setFormValue("");
562
+ let e = this.defaultValue || (this.multiple || this.range ? [] : "");
563
+ this.value = e, this._value = Array.isArray(e) ? e : [e], this.valueChanged(this.value, null);
564
+ }
565
+ this.internals.ariaInvalid = "false";
566
+ }
567
+ updated(e) {
568
+ super.updated(e), e.has("dataTestid") && this.dataTestid && this.inputRef.value && (this.skipForwardTestid ? this.hasAttribute("data-testid") || this.setAttribute("data-testid", this.dataTestid) : (this.inputRef.value.dataset.testid = this.dataTestid, this.removeAttribute("data-testid")));
569
+ }
570
+ firstUpdated(e) {
571
+ if (super.firstUpdated(e), !this.form) {
572
+ let e = this.internals.form || this.closest("form");
573
+ this.form = e;
574
+ }
575
+ if (this.value && this.defaultValue === null && (this.defaultValue = this.value), this.defaultValue !== null && !this.value && this.valueChanged(this.defaultValue, null), this.defaultChecked && (this.internals.ariaChecked = "true", this.checked = !0), this.required && (this.internals.ariaRequired = "true"), this.disabled && (this.internals.ariaDisabled = "true"), this.id && !this.name && (this.name = this.id), this.checked !== void 0) {
576
+ let e = this.checked === "" || this.checked === "true" || this.checked === !0;
577
+ this.internals.ariaChecked = String(e);
578
+ let t = e ? (typeof this.value == "string" ? this.value : "") || X : null;
579
+ this.internals.setFormValue(t);
580
+ } else this.setFormValue(this.value);
581
+ this.inputRef && this.inputRef.value && (this.inputRef.value.setAttribute("form", ""), this.manageValidity(this.inputRef.value)), this.inputRefTo && this.inputRefTo.value && (this.inputRefTo.value.setAttribute("form", ""), this.manageValidity(this.inputRefTo.value));
582
+ }
583
+ };
584
+ e([t({
585
+ type: Boolean,
586
+ reflect: !0
587
+ })], $.prototype, "checked", void 0), e([t({ type: Boolean })], $.prototype, "defaultChecked", void 0), e([t({ type: Boolean })], $.prototype, "multiple", void 0), e([t({ type: Boolean })], $.prototype, "range", void 0), e([t({
588
+ type: String,
589
+ reflect: !0
590
+ })], $.prototype, "type", void 0), e([t()], $.prototype, "defaultValue", void 0), e([t({
591
+ type: Boolean,
592
+ reflect: !0
593
+ })], $.prototype, "disabled", void 0), e([t({
594
+ type: Boolean,
595
+ reflect: !0
596
+ })], $.prototype, "readonly", void 0), e([t({
597
+ type: Boolean,
598
+ reflect: !0
599
+ })], $.prototype, "required", void 0), e([t({
600
+ reflect: !0,
601
+ converter: {
602
+ fromAttribute: (e) => e,
603
+ toAttribute: (e) => e?.toString() ?? null
604
+ }
605
+ })], $.prototype, "max", void 0), e([t({
606
+ type: Number,
607
+ reflect: !0
608
+ })], $.prototype, "maxlength", void 0), e([t({
609
+ reflect: !0,
610
+ converter: {
611
+ fromAttribute: (e) => e,
612
+ toAttribute: (e) => e?.toString() ?? null
613
+ }
614
+ })], $.prototype, "min", void 0), e([t({
615
+ type: Number,
616
+ reflect: !0
617
+ })], $.prototype, "minlength", void 0), e([t({
618
+ type: Number,
619
+ reflect: !0
620
+ })], $.prototype, "step", void 0), e([t({ type: String })], $.prototype, "ariaDescribedBy", void 0), e([t({ type: String })], $.prototype, "ariaLabelledby", void 0), e([t({
621
+ type: String,
622
+ reflect: !0
623
+ })], $.prototype, "name", void 0), e([t({
624
+ type: String,
625
+ reflect: !0
626
+ })], $.prototype, "pattern", void 0), e([t({
627
+ type: String,
628
+ reflect: !0
629
+ })], $.prototype, "placeholder", void 0), e([t({
630
+ type: String,
631
+ reflect: !0
632
+ })], $.prototype, "id", void 0), e([t({ type: Boolean })], $.prototype, "counter", void 0), e([t({ type: Boolean })], $.prototype, "hasError", void 0), e([t({ type: Boolean })], $.prototype, "inline", void 0), e([t({ type: Boolean })], $.prototype, "hasFieldset", void 0), e([t({ type: Boolean })], $.prototype, "optionalTag", void 0), e([t({ type: Boolean })], $.prototype, "requiredTag", void 0), e([t({ type: Boolean })], $.prototype, "skipForwardTestid", void 0), e([t({
633
+ type: Boolean,
634
+ reflect: !0,
635
+ converter: a
636
+ })], $.prototype, "useWrapper", void 0), e([t({
637
+ type: Boolean,
638
+ reflect: !0
639
+ })], $.prototype, "fullwidth", void 0), e([t({ type: Number })], $.prototype, "counterMaxLength", void 0), e([t({ type: String })], $.prototype, "errorMessage", void 0), e([t({ type: String })], $.prototype, "helptext", void 0), e([t({ type: String })], $.prototype, "helptextDropdown", void 0), e([t({
640
+ type: String,
641
+ reflect: !1
642
+ })], $.prototype, "helptextDropdownButton", void 0), e([t({ type: String })], $.prototype, "label", void 0), e([t({
643
+ type: String,
644
+ reflect: !1
645
+ })], $.prototype, "optionalText", void 0), e([t({
646
+ type: String,
647
+ reflect: !1
648
+ })], $.prototype, "requiredText", void 0), e([t({
649
+ type: String,
650
+ reflect: !1
651
+ })], $.prototype, "tagText", void 0), e([t({
652
+ type: String,
653
+ attribute: "data-testid"
654
+ })], $.prototype, "dataTestid", void 0);
655
+ //#endregion
656
+ export { $ as t };