@oslokommune/punkt-elements 19.18.1 → 19.18.3

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 (301) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/{accordion-GheghzDV.js → accordion-D-mcyw_S.js} +2 -1
  3. package/dist/{accordion-XX12Iouj.cjs → accordion-t9p3qgCp.cjs} +1 -1
  4. package/dist/alert-CBW94-ku.cjs +39 -0
  5. package/dist/{alert-gty76GoA.js → alert-CdfTJcT2.js} +4 -3
  6. package/dist/{backlink-HF3DMgLc.js → backlink-D3rkJWkd.js} +1 -1
  7. package/dist/{backlink-CNRyH73A.cjs → backlink-GIyyoDoi.cjs} +1 -1
  8. package/dist/{breadcrumbs-qyZMkJtA.js → breadcrumbs-B4WdX4QR.js} +1 -1
  9. package/dist/{breadcrumbs-YQ1orAK_.cjs → breadcrumbs-B7U57Zey.cjs} +1 -1
  10. package/dist/{button-DMytp-Jt.cjs → button-DdR_XzMY.cjs} +1 -1
  11. package/dist/{button-Cf5ReNPj.js → button-DwcFG7bU.js} +2 -2
  12. package/dist/{calendar-D5xCL3xC.js → calendar-DGOwyX3o.js} +13 -15
  13. package/dist/{calendar-xmCeJYlb.cjs → calendar-DcenMWOQ.cjs} +2 -2
  14. package/dist/{card-Dc9p91TY.cjs → card-CizBnD59.cjs} +1 -1
  15. package/dist/{card-k-3UP5NP.js → card-D4rpTD_e.js} +4 -3
  16. package/dist/{checkbox-CbogvdEA.cjs → checkbox-B6BVu9BZ.cjs} +1 -1
  17. package/dist/{checkbox-C4faOikK.js → checkbox-BTD7bz3U.js} +2 -1
  18. package/dist/{checkbox-group-6vOqwCRi.js → checkbox-group-4dLJ_HTY.js} +2 -2
  19. package/dist/{checkbox-group-YyhtneCi.cjs → checkbox-group-CREaHr24.cjs} +1 -1
  20. package/dist/{combobox-hbHEJIxp.cjs → combobox-B-bdCNiE.cjs} +1 -1
  21. package/dist/{combobox-D0J03ikb.js → combobox-CVg5vs-l.js} +6 -6
  22. package/dist/components/accordion/accordion.d.ts +3 -3
  23. package/dist/components/calendar/calendar.d.ts +1 -2
  24. package/dist/components/datepicker/datepicker-utils.d.ts +9 -3
  25. package/dist/components/loader/loader.d.ts +3 -3
  26. package/dist/components/modal/modal.d.ts +2 -2
  27. package/dist/components/tag/tag.d.ts +3 -4
  28. package/dist/{consent-hhwIP8m5.js → consent-Chtz1yL0.js} +2 -1
  29. package/dist/consent-Dhh207Zz.cjs +18 -0
  30. package/dist/{datepicker-ChGCD7Gf.js → datepicker-DeTZy8NM.js} +6 -6
  31. package/dist/{datepicker-BSQV2yhB.cjs → datepicker-DvI7BT4S.cjs} +1 -1
  32. package/dist/directives/slot-content.d.ts +7 -1
  33. package/dist/{element-with-slot-gdQbNteD.cjs → element-with-slot-B0Vp_OuR.cjs} +1 -1
  34. package/dist/{element-with-slot-BP-IBGq0.js → element-with-slot-Dp2Gzv-Q.js} +8 -2
  35. package/dist/{fileupload-CAZrdubx.js → fileupload-iGE2WK9e.js} +5 -5
  36. package/dist/{fileupload-BKae4SiP.cjs → fileupload-pGOXdyL0.cjs} +1 -1
  37. package/dist/{footer-JAQGiWJh.js → footer-D4R-9si6.js} +3 -2
  38. package/dist/{footer-wmH_UXCd.cjs → footer-QGnujLm9.cjs} +1 -1
  39. package/dist/{header-bvY1RA0W.js → header-A70TKzPE.js} +8 -7
  40. package/dist/{header-CB-CiwsK.cjs → header-B3TDAMMX.cjs} +1 -1
  41. package/dist/{header-menu-BJNxDdhj.js → header-menu-BK36mG6a.js} +3 -2
  42. package/dist/{header-menu-BlvU5Y1U.cjs → header-menu-CWrw01rm.cjs} +1 -1
  43. package/dist/{heading-CBxJ3UCj.cjs → heading--hGRDNX9.cjs} +1 -1
  44. package/dist/{heading-Br5s4zO0.js → heading-B1Ey3XzB.js} +1 -1
  45. package/dist/{helptext-B6xxUfvv.js → helptext-BXryqHy5.js} +2 -2
  46. package/dist/{helptext-5_uOsEMN.cjs → helptext-KrtUyA7H.cjs} +1 -1
  47. package/dist/{icon-D3XT49vM.js → icon-BVSiUQSL.js} +1 -0
  48. package/dist/icon-BsRlhXU2.cjs +1 -0
  49. package/dist/{input-element-DhNSPDnG.js → input-element-8mrCxToc.js} +2 -1
  50. package/dist/input-element-a5dcxOzs.cjs +1 -0
  51. package/dist/{input-wrapper-D-w6uRXZ.js → input-wrapper-7RSISZu6.js} +5 -4
  52. package/dist/{input-wrapper-D1RqTzm4.cjs → input-wrapper-DT9h0n2i.cjs} +1 -1
  53. package/dist/{link-DzWPIXm1.js → link-DL4dZoI5.js} +2 -2
  54. package/dist/{link-DW6O3Ko1.cjs → link-u69d_-Zh.cjs} +1 -1
  55. package/dist/{linkcard-EOwwQZeY.cjs → linkcard-B6N7xChn.cjs} +2 -2
  56. package/dist/{linkcard-Dda2K5te.js → linkcard-C_9NCgkD.js} +3 -3
  57. package/dist/{loader-DXKGCBqh.js → loader-DJGAd8c-.js} +9 -9
  58. package/dist/{loader-CnsELZFa.cjs → loader-l7CLjzgI.cjs} +8 -8
  59. package/dist/{messagebox-DPVRQ3PY.js → messagebox-V1Kszdop.js} +3 -2
  60. package/dist/{messagebox-CIgUgKhu.cjs → messagebox-YkknrtEM.cjs} +1 -1
  61. package/dist/{modal-Cp10a22a.cjs → modal--k988mEb.cjs} +19 -21
  62. package/dist/{modal-BWaMErv7.js → modal-EjPYLhS-.js} +20 -22
  63. package/dist/option-group-element-BEGRouXw.cjs +23 -0
  64. package/dist/{option-group-element-d9TouZ2M.js → option-group-element-CQViBzca.js} +3 -2
  65. package/dist/pkt-accordion.cjs +1 -1
  66. package/dist/pkt-accordion.js +1 -1
  67. package/dist/pkt-alert.cjs +1 -1
  68. package/dist/pkt-alert.js +1 -1
  69. package/dist/pkt-backlink.cjs +1 -1
  70. package/dist/pkt-backlink.js +1 -1
  71. package/dist/pkt-breadcrumbs.cjs +1 -1
  72. package/dist/pkt-breadcrumbs.js +1 -1
  73. package/dist/pkt-button.cjs +1 -1
  74. package/dist/pkt-button.js +1 -1
  75. package/dist/pkt-calendar.cjs +1 -1
  76. package/dist/pkt-calendar.js +1 -1
  77. package/dist/pkt-card.cjs +1 -1
  78. package/dist/pkt-card.js +1 -1
  79. package/dist/pkt-checkbox-group.cjs +1 -1
  80. package/dist/pkt-checkbox-group.js +1 -1
  81. package/dist/pkt-checkbox.cjs +1 -1
  82. package/dist/pkt-checkbox.js +1 -1
  83. package/dist/pkt-combobox.cjs +1 -1
  84. package/dist/pkt-combobox.js +1 -1
  85. package/dist/pkt-consent.cjs +1 -1
  86. package/dist/pkt-consent.js +1 -1
  87. package/dist/pkt-datepicker.cjs +1 -1
  88. package/dist/pkt-datepicker.js +1 -1
  89. package/dist/pkt-fileupload.cjs +1 -1
  90. package/dist/pkt-fileupload.js +1 -1
  91. package/dist/pkt-footer.cjs +1 -1
  92. package/dist/pkt-footer.js +1 -1
  93. package/dist/pkt-header-menu.cjs +1 -1
  94. package/dist/pkt-header-menu.js +1 -1
  95. package/dist/pkt-header.cjs +1 -1
  96. package/dist/pkt-header.js +1 -1
  97. package/dist/pkt-heading.cjs +1 -1
  98. package/dist/pkt-heading.js +1 -1
  99. package/dist/pkt-helptext.cjs +1 -1
  100. package/dist/pkt-helptext.js +1 -1
  101. package/dist/pkt-icon.cjs +1 -1
  102. package/dist/pkt-icon.js +1 -1
  103. package/dist/pkt-index.cjs +1 -1
  104. package/dist/pkt-index.js +35 -35
  105. package/dist/pkt-input-wrapper.cjs +1 -1
  106. package/dist/pkt-input-wrapper.js +1 -1
  107. package/dist/pkt-link.cjs +1 -1
  108. package/dist/pkt-link.js +1 -1
  109. package/dist/pkt-linkcard.cjs +1 -1
  110. package/dist/pkt-linkcard.js +1 -1
  111. package/dist/pkt-loader.cjs +1 -1
  112. package/dist/pkt-loader.js +1 -1
  113. package/dist/pkt-messagebox.cjs +1 -1
  114. package/dist/pkt-messagebox.js +1 -1
  115. package/dist/pkt-modal.cjs +1 -1
  116. package/dist/pkt-modal.js +1 -1
  117. package/dist/{pkt-options-controller-DcwERZzm.cjs → pkt-options-controller-C193xcN4.cjs} +1 -1
  118. package/dist/{pkt-options-controller-LiApNBoZ.js → pkt-options-controller-CH8U6zlw.js} +1 -1
  119. package/dist/pkt-progressbar.cjs +1 -1
  120. package/dist/pkt-progressbar.js +1 -1
  121. package/dist/pkt-radio-group.cjs +1 -1
  122. package/dist/pkt-radio-group.js +1 -1
  123. package/dist/pkt-radiobutton.cjs +1 -1
  124. package/dist/pkt-radiobutton.js +1 -1
  125. package/dist/pkt-searchinput.cjs +1 -1
  126. package/dist/pkt-searchinput.js +1 -1
  127. package/dist/pkt-select.cjs +1 -1
  128. package/dist/pkt-select.js +1 -1
  129. package/dist/pkt-tabs.cjs +1 -1
  130. package/dist/pkt-tabs.js +1 -1
  131. package/dist/pkt-tag.cjs +1 -1
  132. package/dist/pkt-tag.js +1 -1
  133. package/dist/pkt-textarea.cjs +1 -1
  134. package/dist/pkt-textarea.js +1 -1
  135. package/dist/pkt-textinput.cjs +1 -1
  136. package/dist/pkt-textinput.js +1 -1
  137. package/dist/pkt-timepicker.cjs +1 -1
  138. package/dist/pkt-timepicker.js +1 -1
  139. package/dist/{progressbar-CMwFXEMB.js → progressbar-BJswle17.js} +1 -1
  140. package/dist/{progressbar-eRJU41Uc.cjs → progressbar-BVeWeSLq.cjs} +1 -1
  141. package/dist/{radio-group-B_NEwwP7.js → radio-group-CYEnKuIM.js} +2 -2
  142. package/dist/{radio-group-dQrEQ1pX.cjs → radio-group-DI_5eAL4.cjs} +1 -1
  143. package/dist/{radiobutton-mXqSvSQE.cjs → radiobutton-Cf3ROHzB.cjs} +1 -1
  144. package/dist/{radiobutton-DWZ4VgYg.js → radiobutton-DY3tXJ8Z.js} +2 -1
  145. package/dist/{searchinput-CVpPmZAJ.cjs → searchinput-B1m241pF.cjs} +1 -1
  146. package/dist/{searchinput-Ca6zFqH5.js → searchinput-zxHqZ-jG.js} +1 -1
  147. package/dist/{select-DkO-UPUY.cjs → select-B2W70m_k.cjs} +1 -1
  148. package/dist/{select-DhQk3S6t.js → select-CeFVfjM-.js} +4 -4
  149. package/dist/shared-types/heading.d.ts +2 -1
  150. package/dist/shared-types/index.d.ts +2 -2
  151. package/dist/shared-types/size.d.ts +4 -12
  152. package/dist/shared-types-A6iGIX-f.js +1 -0
  153. package/dist/{tabs-Y2-2pD42.js → tabs-ZhYxE5fX.js} +2 -2
  154. package/dist/{tabs-DvVYDYVh.cjs → tabs-fXlMzPFJ.cjs} +1 -1
  155. package/dist/{tag-BEFxzKsm.cjs → tag-B2EEjkjD.cjs} +9 -9
  156. package/dist/{tag-B9GawuIf.js → tag-Bv5JRS69.js} +10 -10
  157. package/dist/{textarea-CEHqACey.cjs → textarea-BBo8oZA-.cjs} +1 -1
  158. package/dist/{textarea-S0pRMEnT.js → textarea-BOOFnUFu.js} +5 -4
  159. package/dist/{textinput-BdQ3FZ8R.cjs → textinput-GRYgsT0X.cjs} +1 -1
  160. package/dist/{textinput-DkfjnDvX.js → textinput-wzBD3Tk1.js} +4 -4
  161. package/dist/{timepicker-BssDur6k.cjs → timepicker-DLF0UN3M.cjs} +1 -1
  162. package/dist/{timepicker-DI3oiK4L.js → timepicker-x0PuqU-M.js} +4 -4
  163. package/dist/types/size.d.ts +2 -1
  164. package/package.json +5 -9
  165. package/src/components/accordion/accordion.ts +3 -3
  166. package/src/components/calendar/calendar.selection.test.ts +40 -0
  167. package/src/components/calendar/calendar.ts +5 -6
  168. package/src/components/consent/consent.test.ts +2 -0
  169. package/src/components/datepicker/datepicker-popup.ts +1 -1
  170. package/src/components/datepicker/datepicker-utils.ts +7 -5
  171. package/src/components/header/types.ts +0 -1
  172. package/src/components/linkcard/linkcard.ts +1 -1
  173. package/src/components/loader/loader.ts +15 -13
  174. package/src/components/modal/modal.ts +33 -29
  175. package/src/components/tag/tag.ts +21 -25
  176. package/dist/alert-SQdshv-F.cjs +0 -39
  177. package/dist/base-elements/form-attribute.test.d.ts +0 -0
  178. package/dist/base-elements/form-disabled.test.d.ts +0 -0
  179. package/dist/base-elements/polyfill-form-value.test.d.ts +0 -0
  180. package/dist/components/accordion/accordion.test.d.ts +0 -0
  181. package/dist/components/alert/alert.test.d.ts +0 -14
  182. package/dist/components/backlink/backlink.test.d.ts +0 -10
  183. package/dist/components/breadcrumbs/breadcrumbs.test.d.ts +0 -0
  184. package/dist/components/button/button.test.d.ts +0 -22
  185. package/dist/components/calendar/calendar.accessibility.test.d.ts +0 -16
  186. package/dist/components/calendar/calendar.constraints.test.d.ts +0 -0
  187. package/dist/components/calendar/calendar.core.test.d.ts +0 -0
  188. package/dist/components/calendar/calendar.interaction.test.d.ts +0 -0
  189. package/dist/components/calendar/calendar.selection.test.d.ts +0 -0
  190. package/dist/components/card/card.test.d.ts +0 -22
  191. package/dist/components/checkbox/checkbox.test.d.ts +0 -24
  192. package/dist/components/checkbox-group/checkbox-group.test.d.ts +0 -0
  193. package/dist/components/combobox/combobox.accessibility.test.d.ts +0 -0
  194. package/dist/components/combobox/combobox.attributes.test.d.ts +0 -0
  195. package/dist/components/combobox/combobox.core.test.d.ts +0 -0
  196. package/dist/components/combobox/combobox.interaction.test.d.ts +0 -0
  197. package/dist/components/combobox/combobox.preselection.test.d.ts +0 -0
  198. package/dist/components/combobox/combobox.selection.test.d.ts +0 -0
  199. package/dist/components/consent/consent.test.d.ts +0 -16
  200. package/dist/components/datepicker/date-tags.test.d.ts +0 -12
  201. package/dist/components/datepicker/datepicker-popup.test.d.ts +0 -4
  202. package/dist/components/datepicker/datepicker-utils.test.d.ts +0 -1
  203. package/dist/components/datepicker/datepicker.accessibility.test.d.ts +0 -0
  204. package/dist/components/datepicker/datepicker.core.test.d.ts +0 -0
  205. package/dist/components/datepicker/datepicker.input.test.d.ts +0 -0
  206. package/dist/components/datepicker/datepicker.selection.test.d.ts +0 -0
  207. package/dist/components/datepicker/datepicker.validation.test.d.ts +0 -0
  208. package/dist/components/fileupload/fileupload.test.d.ts +0 -0
  209. package/dist/components/footer/footer.accessibility.test.d.ts +0 -0
  210. package/dist/components/footer/footer.test.d.ts +0 -0
  211. package/dist/components/header/header-global.accessibility.test.d.ts +0 -0
  212. package/dist/components/header/header-global.test.d.ts +0 -0
  213. package/dist/components/header/header-service.accessibility.test.d.ts +0 -0
  214. package/dist/components/header/header-service.test.d.ts +0 -18
  215. package/dist/components/header/header.test.d.ts +0 -0
  216. package/dist/components/header-menu/header-menu.test.d.ts +0 -0
  217. package/dist/components/heading/heading.test.d.ts +0 -0
  218. package/dist/components/helptext/helptext-association.test.d.ts +0 -0
  219. package/dist/components/helptext/helptext.test.d.ts +0 -0
  220. package/dist/components/icon/icon.test.d.ts +0 -12
  221. package/dist/components/input-wrapper/input-wrapper.test.d.ts +0 -32
  222. package/dist/components/input-wrapper/tri-state.test.d.ts +0 -0
  223. package/dist/components/input-wrapper/wrapper-parity.test.d.ts +0 -1
  224. package/dist/components/link/link.test.d.ts +0 -15
  225. package/dist/components/linkcard/linkcard.test.d.ts +0 -9
  226. package/dist/components/listbox/listbox.interaction.test.d.ts +0 -10
  227. package/dist/components/listbox/listbox.test.d.ts +0 -10
  228. package/dist/components/loader/loader.test.d.ts +0 -8
  229. package/dist/components/messagebox/messagebox.test.d.ts +0 -8
  230. package/dist/components/modal/modal.test.d.ts +0 -9
  231. package/dist/components/progressbar/progressbar.test.d.ts +0 -8
  232. package/dist/components/radio-group/radio-group.test.d.ts +0 -0
  233. package/dist/components/radiobutton/radiobutton.test.d.ts +0 -28
  234. package/dist/components/searchinput/searchinput.test.d.ts +0 -0
  235. package/dist/components/select/select.test.d.ts +0 -23
  236. package/dist/components/tabs/tabs.test.d.ts +0 -0
  237. package/dist/components/tag/tag.test.d.ts +0 -8
  238. package/dist/components/textarea/textarea.test.d.ts +0 -29
  239. package/dist/components/textinput/textinput.test.d.ts +0 -33
  240. package/dist/components/timepicker/timepicker.test.d.ts +0 -25
  241. package/dist/consent-BCrPGLXe.cjs +0 -18
  242. package/dist/directives/slot-content.test.d.ts +0 -0
  243. package/dist/docs/backlink.d.ts +0 -4
  244. package/dist/docs/components/accordion.d.ts +0 -5
  245. package/dist/docs/components/alert.d.ts +0 -9
  246. package/dist/docs/components/backlink.d.ts +0 -4
  247. package/dist/docs/components/breadcrumbs.d.ts +0 -8
  248. package/dist/docs/components/button.d.ts +0 -10
  249. package/dist/docs/components/calendar.d.ts +0 -4
  250. package/dist/docs/components/card.d.ts +0 -27
  251. package/dist/docs/components/checkbox-group.d.ts +0 -13
  252. package/dist/docs/components/checkbox.d.ts +0 -8
  253. package/dist/docs/components/combobox.d.ts +0 -11
  254. package/dist/docs/components/comboboxdemo.d.ts +0 -4
  255. package/dist/docs/components/consent.d.ts +0 -4
  256. package/dist/docs/components/datepicker.d.ts +0 -4
  257. package/dist/docs/components/datepickermultiple.d.ts +0 -4
  258. package/dist/docs/components/event-log.d.ts +0 -20
  259. package/dist/docs/components/fileupload.d.ts +0 -28
  260. package/dist/docs/components/footer.d.ts +0 -9
  261. package/dist/docs/components/form-sizes.d.ts +0 -10
  262. package/dist/docs/components/form.d.ts +0 -9
  263. package/dist/docs/components/header-full.d.ts +0 -36
  264. package/dist/docs/components/header-global-full.d.ts +0 -20
  265. package/dist/docs/components/header-global.d.ts +0 -14
  266. package/dist/docs/components/header-menu.d.ts +0 -8
  267. package/dist/docs/components/header.d.ts +0 -18
  268. package/dist/docs/components/heading.d.ts +0 -12
  269. package/dist/docs/components/icon.d.ts +0 -4
  270. package/dist/docs/components/input-wrapper.d.ts +0 -4
  271. package/dist/docs/components/link.d.ts +0 -4
  272. package/dist/docs/components/linkcard.d.ts +0 -4
  273. package/dist/docs/components/loader.d.ts +0 -10
  274. package/dist/docs/components/messagebox.d.ts +0 -4
  275. package/dist/docs/components/modal.d.ts +0 -24
  276. package/dist/docs/components/progressbar.d.ts +0 -9
  277. package/dist/docs/components/radio-checkbox-sizes.d.ts +0 -10
  278. package/dist/docs/components/radio-group.d.ts +0 -13
  279. package/dist/docs/components/radiobutton.d.ts +0 -12
  280. package/dist/docs/components/searchinput.d.ts +0 -17
  281. package/dist/docs/components/select.d.ts +0 -13
  282. package/dist/docs/components/slot-internals.d.ts +0 -14
  283. package/dist/docs/components/slots.d.ts +0 -37
  284. package/dist/docs/components/switch.d.ts +0 -4
  285. package/dist/docs/components/tabs.d.ts +0 -35
  286. package/dist/docs/components/tag.d.ts +0 -4
  287. package/dist/docs/components/textarea.d.ts +0 -4
  288. package/dist/docs/components/textinput.d.ts +0 -5
  289. package/dist/docs/components/timepicker.d.ts +0 -4
  290. package/dist/docs/components/verifisering.d.ts +0 -15
  291. package/dist/docs/header.d.ts +0 -14
  292. package/dist/docs/punkt-docs.d.ts +0 -15
  293. package/dist/docs/tableOfContents.d.ts +0 -15
  294. package/dist/icon-Dk8y6odR.cjs +0 -1
  295. package/dist/input-element-CCV_e85v.cjs +0 -1
  296. package/dist/option-group-element-D_UW097C.cjs +0 -23
  297. package/dist/tests/component-registry.d.ts +0 -72
  298. package/dist/tests/option-contexts.d.ts +0 -7
  299. package/dist/tests/strings-override.test.d.ts +0 -0
  300. package/dist/tests/test-framework.d.ts +0 -29
  301. /package/dist/{base-elements/checkable-native-parity.test.d.ts → shared-types-BvRk9kiK.cjs} +0 -0
@@ -1,4 +0,0 @@
1
- import { PktElement } from '../../base-elements/element';
2
- export declare class Switch extends PktElement {
3
- render(): import('lit-html').TemplateResult<1>;
4
- }
@@ -1,35 +0,0 @@
1
- import { PktElement } from '../../base-elements/element';
2
- export declare class Tabs extends PktElement {
3
- darkMode: boolean;
4
- private activeTab1;
5
- private activeTab2;
6
- private activeTab3;
7
- private activeTab4;
8
- private activeTab5;
9
- private activeTab6;
10
- private activeTab7;
11
- private activeStepperTab;
12
- private stepperTitles;
13
- private stepperCompleted;
14
- private stepperUnlocked;
15
- private stepperSeparatorIconName;
16
- private stepperRenderKey;
17
- private activeTabTest;
18
- private tabTitles;
19
- private disabledTabs;
20
- private skins;
21
- private tabNames;
22
- private content;
23
- private handleTabSelected;
24
- private handleTabTestSelected;
25
- private handleStepperTabSelected;
26
- private completeActiveStepperTab;
27
- private resetStepperFlow;
28
- private handleSeparatorIconNameChange;
29
- private updateTabTitle;
30
- private toggleDisabledTab;
31
- private addDynamicDisabledTab;
32
- private removeLastDynamicTab;
33
- render(): import('lit-html').TemplateResult<1>;
34
- }
35
- export default Tabs;
@@ -1,4 +0,0 @@
1
- import { PktElement } from '../../base-elements/element';
2
- export declare class Tag extends PktElement {
3
- render(): import('lit-html').TemplateResult<1>;
4
- }
@@ -1,4 +0,0 @@
1
- import { PktElement } from '../../base-elements/element';
2
- export declare class Textarea extends PktElement {
3
- render(): import('lit-html').TemplateResult<1>;
4
- }
@@ -1,5 +0,0 @@
1
- import { PktElement } from '../../base-elements/element';
2
- export declare class Textinput extends PktElement {
3
- private _renderEventTest;
4
- render(): import('lit-html').TemplateResult<1>;
5
- }
@@ -1,4 +0,0 @@
1
- import { PktElement } from '../../base-elements/element';
2
- export declare class DocsTimepicker extends PktElement {
3
- render(): import('lit-html').TemplateResult<1>;
4
- }
@@ -1,15 +0,0 @@
1
- import { PktElement } from '../../base-elements/element';
2
- export declare class Verifisering extends PktElement {
3
- private _options;
4
- private _wrapper;
5
- private _bredder;
6
- private _kontekst;
7
- private _textarea;
8
- private _fokus;
9
- private _datepicker;
10
- private _timepicker;
11
- private _combobox;
12
- private _fileupload;
13
- private _knapper;
14
- render(): import('lit-html').TemplateResult<1>;
15
- }
@@ -1,14 +0,0 @@
1
- import { PktElement } from '../base-elements/element';
2
- interface NavItem {
3
- path: string;
4
- name: string;
5
- render: () => void;
6
- }
7
- export declare class Header extends PktElement {
8
- routes: NavItem[];
9
- darkMode: boolean;
10
- connectedCallback(): void;
11
- render(): import('lit-html').TemplateResult<1>;
12
- private changeRoute;
13
- }
14
- export {};
@@ -1,15 +0,0 @@
1
- import { PktElement } from '../base-elements/element';
2
- export declare class PunktDocs extends PktElement {
3
- private darkMode;
4
- private readonly storageKey;
5
- private router;
6
- private toc?;
7
- private tocPage;
8
- connectedCallback(): void;
9
- private get isHeaderFullPage();
10
- render(): import('lit-html').TemplateResult<1>;
11
- updated(): void;
12
- private goto;
13
- private getInitialDarkMode;
14
- private applyDarkMode;
15
- }
@@ -1,15 +0,0 @@
1
- import { PktElement } from '../base-elements/element';
2
- export declare class TableOfContents extends PktElement {
3
- private headings;
4
- private activeId;
5
- private open;
6
- private toggle?;
7
- private watcher?;
8
- refresh(page: Element | null): Promise<void>;
9
- connectedCallback(): void;
10
- disconnectedCallback(): void;
11
- private onOutsideClick;
12
- private onClick;
13
- private onKeyDown;
14
- render(): import('lit-html').TemplateResult<1>;
15
- }
@@ -1 +0,0 @@
1
- const e=require("./element-C6WTyJFE.cjs");var t={name:``,path:`https://punkt-cdn.oslo.kommune.no/latest/icons/`},n=class extends e.p{constructor(t){if(super(t),this.it=e.h,t.type!==e.m.CHILD)throw Error(this.constructor.directiveName+`() can only be used in child bindings`)}render(t){if(t===e.h||t==null)return this._t=void 0,this.it=t;if(t===e.g)return t;if(typeof t!=`string`)throw Error(this.constructor.directiveName+`() called with a non-string value`);if(t===this.it)return this._t;this.it=t;let n=[t];return n.raw=n,this._t={_$litType$:this.constructor.resultType,strings:n,values:[]}}};n.directiveName=`unsafeHTML`,n.resultType=1;var r=e.f(n),i=class extends n{};i.directiveName=`unsafeSVG`,i.resultType=2;var a=e.f(i);typeof window<`u`&&(window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||t.path);var o=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>`,s={},c=2,l=1500,u=(()=>{try{return typeof Storage<`u`&&typeof sessionStorage<`u`}catch{return!1}})(),d=e=>window.pktFetch(e).then(t=>{if(!t.ok)throw Error(`Missing icon: `+e);return t.text()}),f=async(e,t=c)=>{try{return await d(e)}catch{return t>0?(await new Promise(e=>setTimeout(e,l)),f(e,t-1)):(console.error(`Failed to fetch icon: `+e),o)}},p=async(e,t)=>{let n=t+e+`.svg`;return u&&sessionStorage.getItem(n)?sessionStorage.getItem(n):n in s?s[n]:typeof window<`u`&&typeof window.pktFetch==`function`?(s[n]=f(n).then(e=>(e!==o&&u&&sessionStorage.setItem(n,e),delete s[n],e)),s[n]):o},m=class extends e.t{constructor(...e){super(...e),this.path=typeof window<`u`?window.pktIconPath:t.path,this.name=t.name,this.ariaHidden=null,this.ariaLabel=null,this.icon=a(o),this._updatedProps=[]}get effectiveAriaHidden(){return this.ariaHidden!==null&&this.ariaHidden!==void 0?this.ariaHidden===``||this.ariaHidden===`true`:!this.ariaLabel}get effectiveAriaLabel(){return this.effectiveAriaHidden?null:this.ariaLabel||this.name||null}connectedCallback(){super.connectedCallback(),this.classList.add(`pkt-icon`)}async attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),(e===`name`||e===`path`)&&this.getIcon(this.name)}async updated(e){super.updated(e),(e.has(`name`)||e.has(`path`))&&this.getIcon(this.name),this.applyAriaToSvg()}applyAriaToSvg(){let e=this.querySelector(`svg`);if(!e)return;e.setAttribute(`aria-hidden`,String(this.effectiveAriaHidden));let t=this.effectiveAriaLabel;t?e.setAttribute(`aria-label`,t):e.removeAttribute(`aria-label`)}async getIcon(e=``){if(this._updatedProps.length>0){this.path||=typeof window<`u`?window.pktIconPath:t.path;try{this.icon=a(await p(this.name||``,this.path))}catch{this.icon=a(o)}this._updatedProps=[]}else this._updatedProps.includes(e)||this._updatedProps.push(e)}render(){return e._`${this.name&&this.icon}`}};e.n([e.u({type:String,reflect:!1})],m.prototype,`path`,void 0),e.n([e.u({type:String,reflect:!0})],m.prototype,`name`,void 0),e.n([e.u({type:String,attribute:`aria-hidden`,reflect:!0})],m.prototype,`ariaHidden`,void 0),e.n([e.u({type:String,attribute:`aria-label`,reflect:!0})],m.prototype,`ariaLabel`,void 0),e.n([e.u({type:SVGElement})],m.prototype,`icon`,void 0),e.n([e.u({type:Array,noAccessor:!0})],m.prototype,`_updatedProps`,void 0);try{e.d(`pkt-icon`)(m)}catch{console.warn(`Forsøker å definere <pkt-icon>, men den er allerede definert`)}var h=m;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return h}});
@@ -1 +0,0 @@
1
- const e=require("./element-C6WTyJFE.cjs"),t=require("./format-B8meU8Tm.cjs"),n=require("./element-with-slot-gdQbNteD.cjs"),r=require("./booleanish-BF8l4scU.cjs"),i=require("./utils-63cRpWut.cjs");var a=new WeakMap,o=new WeakMap,s=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,h=new WeakMap,g=new WeakMap,_=new WeakMap,v=new WeakMap,y=new WeakMap,b=(e,t,n)=>{e.getAttribute(t)!==n&&e.setAttribute(t,n)},x=(e,t)=>{e.toggleAttribute(`internals-disabled`,t),t?b(e,`aria-disabled`,`true`):e.removeAttribute(`aria-disabled`),e.formDisabledCallback&&e.formDisabledCallback.apply(e,[t])},S=e=>{s.get(e).forEach(e=>{e.remove()}),s.set(e,[])},C=(e,t)=>{let n=document.createElement(`input`);return n.type=`hidden`,n.name=e.getAttribute(`name`),e.after(n),s.get(t).push(n),n},w=(e,t)=>{if(t.length){let n=Array.from(t);n.forEach(t=>t.addEventListener(`click`,e.click.bind(e)));let[r]=n,i=r.id;r.id||=(i=`${r.htmlFor}_Label`,i),b(e,`aria-labelledby`,i)}},T=e=>{let t=Array.from(e.elements).filter(e=>!e.tagName.includes(`-`)&&e.validity).map(e=>e.validity.valid),n=f.get(e)||[],r=Array.from(n).filter(e=>e.isConnected).map(e=>c.get(e).validity.valid),i=[...t,...r].includes(!1);e.toggleAttribute(`internals-invalid`,i),e.toggleAttribute(`internals-valid`,!i)},ee=e=>{T(E(e.target))},te=e=>{T(E(e.target))},ne=e=>{let t=[`button[type=submit]`,`input[type=submit]`,`button:not([type])`].map(e=>`${e}:not([disabled])`).map(t=>`${t}:not([form])${e.id?`,${t}[form='${e.id}']`:``}`).join(`,`);e.addEventListener(`click`,n=>{if(n.target.closest(t)){let t=f.get(e);if(e.noValidate)return;t.size&&Array.from(t).reverse().map(e=>c.get(e).reportValidity()).includes(!1)&&n.preventDefault()}})},re=e=>{let t=f.get(e.target);t&&t.size&&t.forEach(e=>{e.constructor.formAssociated&&e.formResetCallback&&e.formResetCallback.apply(e)})},ie=(e,t,n)=>{if(t){let r=f.get(t);if(r)r.add(e);else{let n=new Set;n.add(e),f.set(t,n),ne(t),t.addEventListener(`reset`,re),t.addEventListener(`input`,ee),t.addEventListener(`change`,te)}u.set(t,{ref:e,internals:n}),e.constructor.formAssociated&&e.formAssociatedCallback&&setTimeout(()=>{e.formAssociatedCallback.apply(e,[t])},0),T(t)}},E=e=>{let t=e.parentNode;return t&&t.tagName!==`FORM`&&(t=E(t)),t},D=(e,t,n=DOMException)=>{if(!e.constructor.formAssociated)throw new n(t)},O=(e,t,n)=>{let r=f.get(e);return r&&r.size&&r.forEach(e=>{c.get(e)[n]()||(t=!1)}),t},k=e=>{let t=!1;if(e.constructor.formAssociated){let n=c.get(e);n===void 0&&(e.attachInternals(),n=c.get(e),t=!0);let{labels:r,form:i}=n;w(e,r),ie(e,i,n)}return t};function A(){return typeof MutationObserver<`u`}var j={ariaAtomic:`aria-atomic`,ariaAutoComplete:`aria-autocomplete`,ariaBrailleLabel:`aria-braillelabel`,ariaBrailleRoleDescription:`aria-brailleroledescription`,ariaBusy:`aria-busy`,ariaChecked:`aria-checked`,ariaColCount:`aria-colcount`,ariaColIndex:`aria-colindex`,ariaColIndexText:`aria-colindextext`,ariaColSpan:`aria-colspan`,ariaCurrent:`aria-current`,ariaDescription:`aria-description`,ariaDisabled:`aria-disabled`,ariaExpanded:`aria-expanded`,ariaHasPopup:`aria-haspopup`,ariaHidden:`aria-hidden`,ariaInvalid:`aria-invalid`,ariaKeyShortcuts:`aria-keyshortcuts`,ariaLabel:`aria-label`,ariaLevel:`aria-level`,ariaLive:`aria-live`,ariaModal:`aria-modal`,ariaMultiLine:`aria-multiline`,ariaMultiSelectable:`aria-multiselectable`,ariaOrientation:`aria-orientation`,ariaPlaceholder:`aria-placeholder`,ariaPosInSet:`aria-posinset`,ariaPressed:`aria-pressed`,ariaReadOnly:`aria-readonly`,ariaRelevant:`aria-relevant`,ariaRequired:`aria-required`,ariaRoleDescription:`aria-roledescription`,ariaRowCount:`aria-rowcount`,ariaRowIndex:`aria-rowindex`,ariaRowIndexText:`aria-rowindextext`,ariaRowSpan:`aria-rowspan`,ariaSelected:`aria-selected`,ariaSetSize:`aria-setsize`,ariaSort:`aria-sort`,ariaValueMax:`aria-valuemax`,ariaValueMin:`aria-valuemin`,ariaValueNow:`aria-valuenow`,ariaValueText:`aria-valuetext`,role:`role`},ae=(e,t)=>{for(let n in j){t[n]=null;let r=null,i=j[n];Object.defineProperty(t,n,{get(){return r},set(n){r=n,e.isConnected?b(e,i,n):m.set(e,t)}})}},oe=(e,t)=>{s.set(t,[]),F.observe?.(e,P)};function M(e){let t=c.get(e),{form:n}=t;ie(e,n,t),w(e,t.labels)}var N=(e,t=!1)=>{let n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return c.has(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),r=n.nextNode(),i=!t||e.disabled;for(;r;)r.formDisabledCallback&&i&&x(r,e.disabled),r=n.nextNode()},P={attributes:!0,attributeFilter:[`disabled`,`name`]},F=A()?new MutationObserver(e=>{for(let t of e){let e=t.target;if(t.attributeName===`disabled`&&(e.constructor.formAssociated?x(e,e.hasAttribute(`disabled`)):e.localName===`fieldset`&&N(e)),t.attributeName===`name`&&e.constructor.formAssociated){let t=c.get(e),n=p.get(e);t.setFormValue(n)}}}):{};function I(e){e.forEach(e=>{let{addedNodes:t,removedNodes:n}=e,r=Array.from(t),i=Array.from(n);r.forEach(e=>{if(c.has(e)&&e.constructor.formAssociated&&M(e),m.has(e)){let t=m.get(e);Object.keys(j).filter(e=>t[e]!==null).forEach(n=>{b(e,j[n],t[n])}),m.delete(e)}if(y.has(e)){let t=y.get(e);b(e,`internals-valid`,t.validity.valid.toString()),b(e,`internals-invalid`,(!t.validity.valid).toString()),b(e,`aria-invalid`,(!t.validity.valid).toString()),y.delete(e)}if(e.localName===`form`){let t=f.get(e),n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return c.has(e)&&e.constructor.formAssociated&&!(t&&t.has(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),r=n.nextNode();for(;r;)M(r),r=n.nextNode()}e.localName===`fieldset`&&(F.observe?.(e,P),N(e,!0))}),i.forEach(e=>{let t=c.get(e);t&&s.get(t)&&S(t),d.has(e)&&d.get(e).disconnect()})})}function se(e){e.forEach(e=>{let{removedNodes:t}=e;t.forEach(t=>{let n=_.get(e.target);c.has(t)&&k(t),n.disconnect()})})}var ce=e=>{let t=new MutationObserver(se);window?.ShadyDOM?.inUse&&e.mode&&e.host&&(e=e.host),t.observe?.(e,{childList:!0}),_.set(e,t)};A()&&new MutationObserver(I);var L={childList:!0,subtree:!0},le=class{constructor(){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)}},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),de=(e,t,n)=>(e.valid=fe(t),Object.keys(t).forEach(n=>e[n]=t[n]),n&&T(n),e),fe=e=>{let t=!0;for(let n in e)n!==`valid`&&e[n]!==!1&&(t=!1);return t},R=new WeakMap;function z(e,t){e.toggleAttribute(t,!0),e.part&&e.part.add(t)}var B=class extends Set{static get isPolyfilled(){return!0}constructor(e){if(super(),!e||!e.tagName||e.tagName.indexOf(`-`)===-1)throw TypeError(`Illegal constructor`);R.set(this,e)}add(e){if(!/^--/.test(e)||typeof e!=`string`)throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${e} must start with '--'.`);let t=super.add(e),n=R.get(this),r=`state${e}`;return n.isConnected?z(n,r):setTimeout(()=>{z(n,r)}),t}clear(){for(let[e]of this.entries())this.delete(e);super.clear()}delete(e){let t=super.delete(e),n=R.get(this);return n.isConnected?(n.toggleAttribute(`state${e}`,!1),n.part&&n.part.remove(`state${e}`)):setTimeout(()=>{n.toggleAttribute(`state${e}`,!1),n.part&&n.part.remove(`state${e}`)}),t}},pe=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);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`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},V=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);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`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},H,me=class{constructor(e){H.set(this,void 0),pe(this,H,e,`f`);for(let t=0;t<e.length;t++){let n=e[t];this[t]=n,n.hasAttribute(`name`)&&(this[n.getAttribute(`name`)]=n)}Object.freeze(this)}get length(){return V(this,H,`f`).length}[(H=new WeakMap,Symbol.iterator)](){return V(this,H,`f`)[Symbol.iterator]()}item(e){return this[e]==null?null:this[e]}namedItem(e){return this[e]==null?null:this[e]}};function he(){let e=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=n;let t=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=r;function n(...t){let n=e.apply(this,t);return O(this,n,`checkValidity`)}function r(...e){let n=t.apply(this,e);return O(this,n,`reportValidity`)}let{get:i}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,`elements`);Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...e){let t=i.call(this,...e),n=Array.from(f.get(this)||[]);return n.length===0?t:new me(Array.from(t).concat(n).sort((e,t)=>e.compareDocumentPosition?e.compareDocumentPosition(t)&2?1:-1:0))}})}var U=class{static get isPolyfilled(){return!0}constructor(e){if(!e||!e.tagName||e.tagName.indexOf(`-`)===-1)throw TypeError(`Illegal constructor`);let t=e.getRootNode(),n=new le;this.states=new B(e),a.set(this,e),o.set(this,n),c.set(e,this),ae(e,this),oe(e,this),Object.seal(this),t instanceof DocumentFragment&&ce(t)}checkValidity(){let e=a.get(this);if(D(e,`Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element.`),!this.willValidate)return!0;let t=o.get(this);if(!t.valid){let t=new Event(`invalid`,{bubbles:!1,cancelable:!0,composed:!1});e.dispatchEvent(t)}return t.valid}get form(){let e=a.get(this);D(e,`Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.`);let t;return e.constructor.formAssociated===!0&&(t=E(e)),t}get labels(){let e=a.get(this);D(e,`Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.`);let t=e.getAttribute(`id`),n=e.getRootNode();return n&&t?n.querySelectorAll(`[for="${t}"]`):[]}reportValidity(){let e=a.get(this);if(D(e,`Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.`),!this.willValidate)return!0;let t=this.checkValidity(),n=g.get(this);if(n&&!e.constructor.formAssociated)throw new DOMException(`Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.`);return!t&&n&&(e.focus(),n.focus()),t}setFormValue(e){let t=a.get(this);if(D(t,`Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element.`),S(this),e!=null&&!(e instanceof FormData)){if(t.getAttribute(`name`)){let n=C(t,this);n.value=e}}else e!=null&&e instanceof FormData&&Array.from(e).reverse().forEach(([e,n])=>{if(typeof n==`string`){let r=C(t,this);r.name=e,r.value=n}});p.set(t,e)}setValidity(e,t,n){let r=a.get(this);if(D(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.`);g.set(this,n);let i=o.get(this),s={};for(let t in e)s[t]=e[t];Object.keys(s).length===0&&ue(i);let c={...i,...s};delete c.valid;let{valid:u}=de(i,c,this.form);if(!u&&!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.`);l.set(this,u?``:t),r.isConnected?(r.toggleAttribute(`internals-invalid`,!u),r.toggleAttribute(`internals-valid`,u),b(r,`aria-invalid`,`${!u}`)):y.set(r,this)}get shadowRoot(){let e=a.get(this);return h.get(e)||null}get validationMessage(){return D(a.get(this),`Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element.`),l.get(this)}get validity(){return D(a.get(this),`Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element.`),o.get(this)}get willValidate(){let e=a.get(this);return D(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`))}};function ge(){if(typeof window>`u`||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class e extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}let t=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,``)}`;customElements.define(t,e);let n=new e;return[`shadowRoot`,`form`,`willValidate`,`validity`,`validationMessage`,`labels`,`setFormValue`,`setValidity`,`checkValidity`,`reportValidity`].every(e=>e in n.internals)}var W=!1,G=!1;function K(e){G||(G=!0,window.CustomStateSet=B,e&&(HTMLElement.prototype.attachInternals=function(...t){let n=e.call(this,t);return n.states=new B(this),n}))}function _e(e=!0){let t=!1;if(!W){if(W=!0,typeof window<`u`&&(window.ElementInternals=U),typeof CustomElementRegistry<`u`){let e=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(n,r,i){if(r.formAssociated){let e=r.prototype.connectedCallback;r.prototype.connectedCallback=function(){v.has(this)||(v.set(this,!0),this.hasAttribute(`disabled`)&&x(this,!0)),e?.apply(this),t=k(this)}}e.call(this,n,r,i)}}if(typeof HTMLElement<`u`&&(HTMLElement.prototype.attachInternals=function(){if(!this.tagName)return{};if(this.tagName.indexOf(`-`)===-1)throw Error(`Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.`);if(c.has(this)&&!t)throw new DOMException(`DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.`);return new U(this)}),typeof Element<`u`){function n(...t){let n=e.apply(this,t);if(h.set(this,n),A()){let e=new MutationObserver(I);window.ShadyDOM?e.observe(this,L):e.observe(n,L),d.set(this,e)}return n}let e=Element.prototype.attachShadow;Element.prototype.attachShadow=n}A()&&typeof document<`u`&&new MutationObserver(I).observe(document.documentElement,L),typeof HTMLFormElement<`u`&&he(),(e||typeof window<`u`&&!window.CustomStateSet)&&K()}}customElements.polyfillWrapFlushCallback||(ge()?typeof window<`u`&&!window.CustomStateSet&&K(HTMLElement.prototype.attachInternals):_e(!1));var q=`on`,J=`--checked`,Y=`,`,X=e=>e===!0||e===``||e===`true`,Z=new WeakMap,ve=0,ye=e=>{let t=Z.get(e);return t||(t=e.id||`form${++ve}`,Z.set(e,t)),t},Q=()=>!!globalThis.ElementInternals?.isPolyfilled,$=class e extends n.t{static get formAssociated(){return!0}get form(){let e=this.getAttribute(`form`);if(e!==null){if(!e)return null;let t=this.getRootNode(),n=typeof t.getElementById==`function`?t.getElementById(e):this.ownerDocument?.getElementById(e);return n instanceof HTMLFormElement?n:null}return this.internals?.form??this.closest(`form`)}get ariaDescribedBy(){return this.ariaDescribedby}set ariaDescribedBy(e){this.ariaDescribedby=e}formDisabledCallback(e){this.formDisabled=e}get isDisabled(){return this.disabled||this.formDisabled}get optionGroup(){return this.groupContext}setGroupValidity(e){this.groupValidityMessage!==e&&(this.groupValidityMessage=e,this.inputRef?.value&&this.manageValidity(this.inputRef.value))}syncGroupName(){let e=this.optionGroup?.name;if(!e)return;let t=!this.name||this.name===this.derivedName;t&&this.name!==e&&(this.name=e),t&&(this.derivedName=e)}effectiveCounter(e){return this.counter??e}effectiveHasFieldset(e){return this.hasFieldset??e}constructor(){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.n(),this.counter=null,this.hasError=!1,this.inline=!1,this.hasFieldset=null,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=null,this.label=null,this.tagText=null,this.inputSize=`medium`,this.dataTestid=``,this.formDisabled=!1,this.derivedName=null,this.groupValidityMessage=``,this.touched=!1,this._initialized=!1,this.polyfillFormValue=null,this._didInitDerivedState=!1,this._defaultCheckedState=!1,this.internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),Q()&&queueMicrotask(()=>{this.isConnected&&this.polyfillFormValue&&this.internals.setFormValue(this.polyfillFormValue.value)})}get internalName(){let e=this.form;return e?`${this.name}-internal-${ye(e)}`:`${this.name}-internal`}formAssociatedCallback(){this.requestUpdate()}writeFormValue(e){this.internals.setFormValue(e),Q()&&(this.polyfillFormValue={value:e})}manageValidity(e,n){if(!e){console.warn(`manageValidity called without valid input element`);return}let r=this.pktStrings.get(`validation`);(this.isCheckable?this.checkableValueMissing(n??this.checkableGroup()):this.required&&!this.value)?this.internals.setValidity(this.groupValidityMessage?{valueMissing:!0,customError:!0}:{valueMissing:!0},this.groupValidityMessage||r.valueMissing,e):e.validity?.typeMismatch||e.validity?.badInput?this.internals.setValidity({typeMismatch:!0},r.typeMismatch,e):e.validity?.patternMismatch?this.internals.setValidity({patternMismatch:!0},r.patternMismatch,e):e.validity?.tooShort||this.minlength&&this.minlength>0&&this.valueLength<this.minlength?this.internals.setValidity({tooShort:!0},r.tooShort,e):e.validity?.tooLong||this.maxlength&&this.maxlength>0&&this.valueLength>this.maxlength?this.internals.setValidity({tooLong:!0},r.tooLong,e):e.validity?.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},this.min?t.t(r.rangeUnderflowMin,{min:this.min.toString()}):r.rangeUnderflow,e):e.validity?.stepMismatch?this.internals.setValidity({stepMismatch:!0},r.typeMismatch,e):e.validity?.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},this.max?t.t(r.rangeOverflowMax,{max:this.max.toString()}):r.rangeOverflow,e):e.validity?.customError?this.internals.setValidity({customError:!0},e.validationMessage,e):this.groupValidityMessage?this.internals.setValidity({customError:!0},this.groupValidityMessage,e):this.internals.setValidity({})}setFormValue(e){if(this.internals){if(Array.isArray(e)){let t=new FormData;e.forEach(e=>{t.append(this.name,e)}),this.writeFormValue(t)}else this.writeFormValue(e)}}radioGroupMembers(){let e=this.getRootNode();if(typeof e.querySelectorAll!=`function`)return[];let t=this.form;return Array.from(e.querySelectorAll(`pkt-radiobutton, input[type="radio"]`)).filter(e=>e!==this&&e.getAttribute(`name`)===this.name&&e.form===t)}get valueLength(){return!this.multiple||Array.isArray(this.value)?this.value.length:this.value?this.value.split(Y).length:0}get isCheckable(){return this.type===`checkbox`||this.type===`radio`}checkableGroup(){return this.type===`radio`?[this,...this.radioGroupMembers()]:[this]}get isRequired(){return this.required||this.type===`radio`&&!!this.optionGroup?.required}checkableValueMissing(t){return this.type===`radio`?t.some(t=>t instanceof e?t.isRequired:t.required)&&!t.some(e=>X(e.checked)):this.required&&!X(this.checked)}syncCheckedState(){if(!this.internals)return;let e=X(this.checked);this.internals.ariaChecked=String(e),e?(this.writeFormValue((typeof this.value==`string`?this.value:``)||q),this.internals.states?.add(J)):(this.writeFormValue(null),this.internals.states?.delete(J)),this.inputRef?.value&&this.inputRef.value.checked!==e&&(this.inputRef.value.checked=e)}validateCheckable(){let t=this.checkableGroup();t.forEach(n=>{if(!(n instanceof e))return;let r=n;r.inputRef?.value&&r.manageValidity(r.inputRef.value,t)})}coordinateRadioGroup(){this.name&&this.type===`radio`&&this.radioGroupMembers().forEach(t=>{t instanceof e?X(t.checked)&&(t.checked=!1,t.syncCheckedState()):t.checked&&=!1})}valueChecked(e){this.touched&&(this.type===`radio`&&this.coordinateRadioGroup(),typeof e==`string`?this.checked=e===`true`:typeof e==`boolean`&&(this.checked=e),this.syncCheckedState(),this.validateCheckable(),this.onInput(),this.dispatchChangeEvents(this.checked))}valueChanged(e,t){let n=e;if(typeof n==`number`||typeof n==`boolean`)e=String(n);else if(n!=null&&typeof n!=`string`&&!Array.isArray(n)){let e=typeof n==`object`?n?.constructor?.name??`object`:typeof n;console.warn(`${this.localName}: value må være en streng eller et tall, men fikk ${e}. Verdien ignoreres. For dato-/tidsfelt, send en ISO-formatert streng (f.eks. "2026-07-09" eller "13:45").`)}(t!==this.value||t!==this._value)&&(typeof e==`string`?((this.multiple||this.range)&&e.includes(Y)&&(e=e.split(Y)),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))}dispatchChangeEvents(e){this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`value-change`,{detail:e,bubbles:!0,composed:!0}))}clearInputValue(){let e=this.multiple||this.range?[]:``;this.value=e,this.setFormValue(e),this.dispatchChangeEvents(e)}onFocus(){this.dispatchEvent(new FocusEvent(`focus`,{bubbles:!0,composed:!0}))}onBlur(){this.dispatchEvent(new FocusEvent(`blur`,{bubbles:!0,composed:!0}))}onInput(){this.dispatchEvent(new InputEvent(`input`,{bubbles:!0,composed:!0}))}normalizeValue(e){return(this.range||this.multiple)&&typeof e==`string`&&e.includes(Y)?e.split(Y):!this.multiple&&!this.range&&Array.isArray(e)?e[0]||``:e}validate(){this.inputRef?.value&&this.manageValidity(this.inputRef.value),this.inputRefTo?.value&&this.manageValidity(this.inputRefTo.value)}onChange(e){if(this.touched=!0,typeof e!=`string`&&!Array.isArray(e))return;let t=this.normalizeValue(e);this.setFormValue(t),this.validate(),this._initialized&&this.dispatchChangeEvents(t)}formResetCallback(){if(this.touched=!1,this._options&&this._options.length&&this._options.forEach(e=>{`selected`in e&&(e.selected=!1)}),this.checked!==void 0)this.checked=this._defaultCheckedState,this.syncCheckedState(),this.validateCheckable();else{this.writeFormValue(``);let e=this.defaultValue||(this.multiple||this.range?[]:``);this.value=e,this._value=Array.isArray(e)?e:[e],this.valueChanged(this.value,null)}this.internals.ariaInvalid=`false`}updated(e){super.updated(e),this.isCheckable&&this._initialized&&(e.has(`defaultChecked`)&&e.get(`defaultChecked`)!==void 0&&(this._defaultCheckedState=!!this.defaultChecked),e.has(`groupContext`)&&this.isRequired&&(this.internals.ariaRequired=`true`),[`checked`,`value`,`required`,`name`,`groupContext`].some(t=>e.has(t))&&(this.syncCheckedState(),this.validateCheckable())),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`)))}willUpdate(e){super.willUpdate(e),e.has(`disabled`)&&this.toggleAttribute(`disabled`,this.disabled),this.syncGroupName(),!this._didInitDerivedState&&(this._didInitDerivedState=!0,this.defaultChecked&&(this.checked=!0),this.id&&!this.name&&(this.name=this.id,this.derivedName=this.id),this.value&&this.defaultValue===null&&(this.defaultValue=this.value),this.defaultValue!==null&&!this.value&&this.valueChanged(this.defaultValue,null))}firstUpdated(e){if(super.firstUpdated(e),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.isRequired&&(this.internals.ariaRequired=`true`),this.disabled&&(this.internals.ariaDisabled=`true`),this.checked!==void 0){let e=X(this.checked);this._defaultCheckedState=e,this.internals.ariaChecked=String(e);let t=e?(typeof this.value==`string`?this.value:``)||q:null;this.writeFormValue(t)}else this.setFormValue(this.value);this.inputRef&&this.inputRef.value&&(this.inputRef.value.setAttribute(`form`,``),this.isCheckable?this.validateCheckable():this.manageValidity(this.inputRef.value)),this.inputRefTo&&this.inputRefTo.value&&(this.inputRefTo.value.setAttribute(`form`,``),this.manageValidity(this.inputRefTo.value)),this.updateComplete.then(()=>{this._initialized=!0})}};e.n([e.u({type:Boolean,reflect:!0})],$.prototype,`checked`,void 0),e.n([e.u({type:Boolean})],$.prototype,`defaultChecked`,void 0),e.n([e.u({type:Boolean})],$.prototype,`multiple`,void 0),e.n([e.u({type:Boolean})],$.prototype,`range`,void 0),e.n([e.u({type:String,reflect:!0})],$.prototype,`type`,void 0),e.n([e.u()],$.prototype,`defaultValue`,void 0),e.n([e.u({type:Boolean,reflect:!0})],$.prototype,`disabled`,void 0),e.n([e.u({type:Boolean,reflect:!0})],$.prototype,`readonly`,void 0),e.n([e.u({type:Boolean,reflect:!0})],$.prototype,`required`,void 0),e.n([e.u({reflect:!0,converter:{fromAttribute:e=>e,toAttribute:e=>e?.toString()??null}})],$.prototype,`max`,void 0),e.n([e.u({type:Number,reflect:!0})],$.prototype,`maxlength`,void 0),e.n([e.u({reflect:!0,converter:{fromAttribute:e=>e,toAttribute:e=>e?.toString()??null}})],$.prototype,`min`,void 0),e.n([e.u({type:Number,reflect:!0})],$.prototype,`minlength`,void 0),e.n([e.u({type:Number,reflect:!0})],$.prototype,`step`,void 0),e.n([e.u({type:String,attribute:`aria-describedby`})],$.prototype,`ariaDescribedby`,void 0),e.n([e.u({type:String,attribute:`aria-labelledby`})],$.prototype,`ariaLabelledby`,void 0),e.n([e.u({type:String,reflect:!0})],$.prototype,`name`,void 0),e.n([e.u({type:String,reflect:!0})],$.prototype,`pattern`,void 0),e.n([e.u({type:String,reflect:!0})],$.prototype,`placeholder`,void 0),e.n([e.u({type:String,reflect:!0})],$.prototype,`id`,void 0),e.n([e.u({type:Boolean,converter:r.n})],$.prototype,`counter`,void 0),e.n([e.u({type:Boolean})],$.prototype,`hasError`,void 0),e.n([e.u({type:Boolean})],$.prototype,`inline`,void 0),e.n([e.u({type:Boolean,converter:r.n})],$.prototype,`hasFieldset`,void 0),e.n([e.u({type:Boolean})],$.prototype,`optionalTag`,void 0),e.n([e.u({type:Boolean})],$.prototype,`requiredTag`,void 0),e.n([e.u({type:Boolean})],$.prototype,`skipForwardTestid`,void 0),e.n([e.u({type:Boolean,reflect:!0,converter:r.t})],$.prototype,`useWrapper`,void 0),e.n([e.u({type:Boolean,reflect:!0})],$.prototype,`fullwidth`,void 0),e.n([e.u({type:Number})],$.prototype,`counterMaxLength`,void 0),e.n([e.u({type:String})],$.prototype,`errorMessage`,void 0),e.n([e.u({type:String})],$.prototype,`helptext`,void 0),e.n([e.u({type:String})],$.prototype,`helptextDropdown`,void 0),e.n([e.u({type:String,reflect:!1})],$.prototype,`helptextDropdownButton`,void 0),e.n([e.u({type:String})],$.prototype,`label`,void 0),e.n([e.u({type:String,reflect:!1})],$.prototype,`optionalText`,void 0),e.n([e.u({type:String,reflect:!1})],$.prototype,`requiredText`,void 0),e.n([e.u({type:String,reflect:!1})],$.prototype,`tagText`,void 0),e.n([e.u({type:String,attribute:`input-size`})],$.prototype,`inputSize`,void 0),e.n([e.u({type:String,attribute:`data-testid`})],$.prototype,`dataTestid`,void 0),e.n([e.l()],$.prototype,`formDisabled`,void 0),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return $}});
@@ -1,23 +0,0 @@
1
- const e=require("./element-C6WTyJFE.cjs"),t=require("./element-with-slot-gdQbNteD.cjs"),n=require("./booleanish-BF8l4scU.cjs");require("./input-wrapper-D1RqTzm4.cjs");const r=require("./utils-63cRpWut.cjs");var i={layout:`vertical`,inputSize:`medium`,hasTile:!1,required:!1,disabled:!1,hasError:!1,useWrapper:!0,requiredTag:!1,optionalTag:!1},a=[`change`,`input`,`value-change`,`focus`,`blur`];function o(e){return e.checked===void 0?e.hasAttribute(`checked`):e.checked===!0||e.checked===``||e.checked===`true`}function s(e){return(typeof e.value==`string`?e.value:e.getAttribute(`value`))||`on`}function c(e){return e.hasAttribute(`disabled`)||e.matches(`:disabled`)}var l=class extends t.t{get groupName(){return this.name||this.id||this.generatedId}options(){return Array.from(this.querySelectorAll(this.optionSelector))}createGroupContext(){return{name:this.groupName,hasTile:this.hasTile,hasError:this.hasError}}syncValidity(){}constructor(){super(),this.name=``,this.label=``,this.helptext=``,this.helptextDropdown=``,this.helptextDropdownButton=null,this.hasError=i.hasError,this.errorMessage=``,this.disabled=i.disabled,this.required=i.required,this.hasTile=i.hasTile,this.layout=i.layout,this.inputSize=i.inputSize,this.useWrapper=i.useWrapper,this.optionalTag=i.optionalTag,this.requiredTag=i.requiredTag,this.tagText=null,this.generatedId=r.n(),this.knownOptions=new Set,this.resetForm=null,this.handleFormReset=()=>{setTimeout(()=>{this.hasStoredValue&&this.storeCurrentValue(),this.syncValidity()})},this.relayOptionEvent=e=>{let t=e.target;if(!t||t===this||!t.matches(this.optionSelector))return;e.stopImmediatePropagation();let n={bubbles:!0,composed:!0};e.type===`change`?(this.storeCurrentValue(),this.syncValidity(),this.dispatchEvent(new Event(`change`,n))):e.type===`input`?this.dispatchEvent(new InputEvent(`input`,n)):e.type===`value-change`&&this.dispatchEvent(new CustomEvent(`value-change`,{...n,detail:this.value}))},this.handleFocusIn=e=>{this.contains(e.relatedTarget)||this.dispatchEvent(new FocusEvent(`focus`,{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget}))},this.handleFocusOut=e=>{this.contains(e.relatedTarget)||this.dispatchEvent(new FocusEvent(`blur`,{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget}))};for(let e of a)this.addEventListener(e,this.relayOptionEvent);this.addEventListener(`focusin`,this.handleFocusIn),this.addEventListener(`focusout`,this.handleFocusOut)}disconnectedCallback(){super.disconnectedCallback(),this.watchFormReset(null)}focus(e){let t=this.options();(t.find(e=>o(e)&&!c(e))??t.find(e=>!c(e)))?.querySelector(`input`)?.focus(e)}willUpdate(e){super.willUpdate(e);let t=this.createGroupContext(),n=this.groupContext;(!n||Object.keys(t).some(e=>t[e]!==n[e]))&&(this.groupContext=t)}updated(e){super.updated(e);let t=this.options(),n=t.filter(e=>!this.knownOptions.has(e));this.knownOptions=new Set(t),this.hasStoredValue&&n.length&&this.applyStoredValue(n),this.syncValidity(),this.watchFormReset(t[0]?.form??null)}watchFormReset(e){e!==this.resetForm&&(this.resetForm?.removeEventListener(`reset`,this.handleFormReset),this.resetForm=e,this.resetForm?.addEventListener(`reset`,this.handleFormReset))}render(){return e._`
2
- <pkt-input-wrapper
3
- ${t.n(this,[null,`helptext`])}
4
- .strings=${this.strings}
5
- label=${this.label}
6
- hasFieldset
7
- ?disabled=${this.disabled}
8
- ?hasError=${this.hasError}
9
- ?optionalTag=${this.optionalTag}
10
- ?requiredTag=${this.requiredTag}
11
- useWrapper=${this.useWrapper}
12
- .errorMessage=${this.errorMessage}
13
- .forId=${this.id||this.generatedId}
14
- .helptext=${this.helptext}
15
- .helptextDropdown=${this.helptextDropdown}
16
- .helptextDropdownButton=${this.helptextDropdownButton}
17
- .layout=${this.layout}
18
- .optionalText=${this.optionalText}
19
- .requiredText=${this.requiredText}
20
- .tagText=${this.tagText}
21
- .size=${this.inputSize}
22
- ></pkt-input-wrapper>
23
- `}};e.n([e.u({type:String})],l.prototype,`name`,void 0),e.n([e.u({type:String})],l.prototype,`label`,void 0),e.n([e.u({type:String})],l.prototype,`helptext`,void 0),e.n([e.u({type:String})],l.prototype,`helptextDropdown`,void 0),e.n([e.u({type:String})],l.prototype,`helptextDropdownButton`,void 0),e.n([e.u({type:Boolean})],l.prototype,`hasError`,void 0),e.n([e.u({type:String})],l.prototype,`errorMessage`,void 0),e.n([e.u({type:Boolean})],l.prototype,`disabled`,void 0),e.n([e.u({type:Boolean})],l.prototype,`required`,void 0),e.n([e.u({type:Boolean})],l.prototype,`hasTile`,void 0),e.n([e.u({type:String})],l.prototype,`layout`,void 0),e.n([e.u({type:String,attribute:`input-size`})],l.prototype,`inputSize`,void 0),e.n([e.u({type:Boolean,converter:n.t})],l.prototype,`useWrapper`,void 0),e.n([e.u({type:Boolean})],l.prototype,`optionalTag`,void 0),e.n([e.u({type:String})],l.prototype,`optionalText`,void 0),e.n([e.u({type:Boolean})],l.prototype,`requiredTag`,void 0),e.n([e.u({type:String})],l.prototype,`requiredText`,void 0),e.n([e.u({type:String})],l.prototype,`tagText`,void 0),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});
@@ -1,72 +0,0 @@
1
- import { PktAlert } from '../components/alert/alert';
2
- import { PktBackLink } from '../components/backlink/backlink';
3
- import { PktBreadcrumbs } from '../components/breadcrumbs/breadcrumbs';
4
- import { PktButton } from '../components/button/button';
5
- import { PktCard } from '../components/card/card';
6
- import { PktAccordion } from '../components/accordion/accordion';
7
- import { PktAccordionItem } from '../components/accordion/accordionitem';
8
- import { PktCalendar } from '../components/calendar/calendar';
9
- import { PktCheckbox } from '../components/checkbox/checkbox';
10
- import { PktCheckboxGroup } from '../components/checkbox-group/checkbox-group';
11
- import { PktCombobox } from '../components/combobox/combobox';
12
- import { PktConsent } from '../components/consent/consent';
13
- import { PktFileUpload } from '../components/fileupload/fileupload';
14
- import { PktDatepicker } from '../components/datepicker/datepicker';
15
- import { PktHeading } from '../components/heading/heading';
16
- import { PktHelptext } from '../components/helptext/helptext';
17
- import { PktIcon } from '../components/icon/icon';
18
- import { PktInputWrapper } from '../components/input-wrapper/input-wrapper';
19
- import { PktLink } from '../components/link/link';
20
- import { PktLinkCard } from '../components/linkcard/linkcard';
21
- import { PktListbox } from '../components/listbox/listbox';
22
- import { PktLoader } from '../components/loader/loader';
23
- import { PktMessagebox } from '../components/messagebox/messagebox';
24
- import { PktModal } from '../components/modal/modal';
25
- import { PktProgressbar } from '../components/progressbar/progressbar';
26
- import { PktRadioButton } from '../components/radiobutton/radiobutton';
27
- import { PktRadioGroup } from '../components/radio-group/radio-group';
28
- import { PktSelect } from '../components/select/select';
29
- import { PktSearchInput } from '../components/searchinput/searchinput';
30
- import { PktTag } from '../components/tag/tag';
31
- import { PktTextarea } from '../components/textarea/textarea';
32
- import { PktTextinput } from '../components/textinput/textinput';
33
- import { PktTimepicker } from '../components/timepicker/timepicker';
34
- import { PktHeaderService } from '../components';
35
- export declare const customElementComponentRegistry: {
36
- readonly 'pkt-alert': typeof PktAlert;
37
- readonly 'pkt-accordion': typeof PktAccordion;
38
- readonly 'pkt-accordion-item': typeof PktAccordionItem;
39
- readonly 'pkt-backlink': typeof PktBackLink;
40
- readonly 'pkt-breadcrumbs': typeof PktBreadcrumbs;
41
- readonly 'pkt-button': typeof PktButton;
42
- readonly 'pkt-card': typeof PktCard;
43
- readonly 'pkt-calendar': typeof PktCalendar;
44
- readonly 'pkt-checkbox': typeof PktCheckbox;
45
- readonly 'pkt-checkbox-group': typeof PktCheckboxGroup;
46
- readonly 'pkt-combobox': typeof PktCombobox;
47
- readonly 'pkt-consent': typeof PktConsent;
48
- readonly 'pkt-fileupload': typeof PktFileUpload;
49
- readonly 'pkt-datepicker': typeof PktDatepicker;
50
- readonly 'pkt-header-service': typeof PktHeaderService;
51
- readonly 'pkt-heading': typeof PktHeading;
52
- readonly 'pkt-helptext': typeof PktHelptext;
53
- readonly 'pkt-icon': typeof PktIcon;
54
- readonly 'pkt-input-wrapper': typeof PktInputWrapper;
55
- readonly 'pkt-link': typeof PktLink;
56
- readonly 'pkt-linkcard': typeof PktLinkCard;
57
- readonly 'pkt-listbox': typeof PktListbox;
58
- readonly 'pkt-loader': typeof PktLoader;
59
- readonly 'pkt-messagebox': typeof PktMessagebox;
60
- readonly 'pkt-modal': typeof PktModal;
61
- readonly 'pkt-progressbar': typeof PktProgressbar;
62
- readonly 'pkt-radiobutton': typeof PktRadioButton;
63
- readonly 'pkt-radio-group': typeof PktRadioGroup;
64
- readonly 'pkt-select': typeof PktSelect;
65
- readonly 'pkt-searchinput': typeof PktSearchInput;
66
- readonly 'pkt-tag': typeof PktTag;
67
- readonly 'pkt-textarea': typeof PktTextarea;
68
- readonly 'pkt-textinput': typeof PktTextinput;
69
- readonly 'pkt-timepicker': typeof PktTimepicker;
70
- };
71
- export type CustomElementName = keyof typeof customElementComponentRegistry;
72
- export type CustomElementFor<T extends CustomElementName> = InstanceType<(typeof customElementComponentRegistry)[T]>;
@@ -1,7 +0,0 @@
1
- export type TOptionContext = {
2
- name: string;
3
- wrap: (option: string) => string;
4
- };
5
- export declare const radioContexts: TOptionContext[];
6
- export declare const checkboxContexts: TOptionContext[];
7
- export declare const mountOption: (markup: string) => Promise<void>;
File without changes
@@ -1,29 +0,0 @@
1
- import { PktElement } from '../base-elements/element';
2
- import { CustomElementName } from './component-registry';
3
- import { vi } from 'vitest';
4
- export declare const setupConsoleMocking: (options?: {
5
- mockError?: boolean;
6
- mockWarn?: boolean;
7
- mockLog?: boolean;
8
- }) => void;
9
- export declare const restoreConsoleMocking: () => void;
10
- export declare const getConsoleErrorMock: () => ReturnType<typeof vi.fn>;
11
- export declare const getConsoleWarnMock: () => ReturnType<typeof vi.fn>;
12
- export declare const getConsoleLogMock: () => ReturnType<typeof vi.fn>;
13
- export interface BaseTestConfig {
14
- content?: string;
15
- }
16
- /**
17
- * Generic test factory for any PktElement
18
- *
19
- * Creates type-safe, escaped HTML with proper lifecycle management.
20
- * Replaces manual string concatenation with structured config objects.
21
- *
22
- * @param customElementName - Tag name (e.g., 'pkt-linkcard')
23
- * @param config - Component properties + test options
24
- * @returns Rendered element ready for testing
25
- */
26
- export declare const createElementTest: <T extends PktElement, C extends BaseTestConfig>(customElementName: CustomElementName, config?: C) => Promise<{
27
- container: HTMLElement;
28
- element: T;
29
- }>;