@oslokommune/punkt-elements 17.0.9 → 17.1.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 (305) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/{accordion-CbXDxOho.cjs → accordion-B3GBlvUC.cjs} +2 -2
  3. package/dist/{accordion-DEUHQ4JD.js → accordion-BeLvLPrB.js} +12 -11
  4. package/dist/{alert-CkUnbPdA.cjs → alert-Cs4Rmq_J.cjs} +1 -1
  5. package/dist/{alert-CbtVGrHD.js → alert-DKK_Tb9J.js} +5 -5
  6. package/dist/{async-directive-Cw_7VW_-.js → async-directive-BPf6K-V2.js} +9 -6
  7. package/dist/async-directive-Da7TJpnq.cjs +1 -0
  8. package/dist/{backlink-DDGlLzk9.cjs → backlink-CMmrKTe4.cjs} +1 -1
  9. package/dist/{backlink-wMNLuQ0X.js → backlink-D1y26pj3.js} +3 -3
  10. package/dist/base-elements/input-element.d.ts +9 -4
  11. package/dist/booleanish-BF8l4scU.cjs +1 -0
  12. package/dist/{booleanish-MfutDT_4.js → booleanish-OQJTYSrw.js} +8 -1
  13. package/dist/{breadcrumbs-D3tfWqvC.cjs → breadcrumbs-B6JGhJgC.cjs} +1 -1
  14. package/dist/{breadcrumbs-CVTLNNsL.js → breadcrumbs-CcTQ3Grm.js} +2 -2
  15. package/dist/{button-Cod17rKo.js → button-2-OSPJkj.js} +10 -10
  16. package/dist/{button-gvDXtBMC.cjs → button-CE97NQIk.cjs} +2 -2
  17. package/dist/{calendar-BVXW8DqC.cjs → calendar-kn4SrtJy.cjs} +1 -1
  18. package/dist/{calendar-CjC4qlh6.js → calendar-pOW3R5Pw.js} +4 -4
  19. package/dist/{card-sydjK3Bb.cjs → card-CETDFkxR.cjs} +3 -3
  20. package/dist/{card-sDOe54um.js → card-zQ0eKRMV.js} +9 -8
  21. package/dist/{checkbox-DJDphhqz.js → checkbox-CH7NpINF.js} +12 -12
  22. package/dist/{checkbox-8uxbeU30.cjs → checkbox-CQNr_sEg.cjs} +8 -8
  23. package/dist/{class-map-CCZN5uS3.cjs → class-map-BeimMvPv.cjs} +1 -1
  24. package/dist/{class-map-CAQCRB1W.js → class-map-CnWCnBSX.js} +2 -2
  25. package/dist/combobox-Bvg0UO9w.cjs +139 -0
  26. package/dist/{combobox-CzZIf5hd.js → combobox-CRdYYlxu.js} +68 -37
  27. package/dist/components/accordion/accordion.d.ts +1 -1
  28. package/dist/components/accordion/accordionitem.d.ts +1 -1
  29. package/dist/components/alert/alert.d.ts +1 -1
  30. package/dist/components/backlink/backlink.d.ts +1 -1
  31. package/dist/components/breadcrumbs/breadcrumbs.d.ts +1 -1
  32. package/dist/components/button/button.d.ts +1 -1
  33. package/dist/components/card/card.d.ts +9 -9
  34. package/dist/components/checkbox/checkbox.d.ts +1 -1
  35. package/dist/components/combobox/combobox.d.ts +1 -1
  36. package/dist/components/consent/consent.d.ts +1 -1
  37. package/dist/components/datepicker/date-tags.d.ts +1 -1
  38. package/dist/components/datepicker/datepicker-multiple.d.ts +1 -1
  39. package/dist/components/datepicker/datepicker-popup.d.ts +1 -1
  40. package/dist/components/datepicker/datepicker-range.d.ts +1 -1
  41. package/dist/components/datepicker/datepicker-single.d.ts +1 -1
  42. package/dist/components/datepicker/datepicker-utils.d.ts +2 -2
  43. package/dist/components/datepicker/datepicker.d.ts +5 -5
  44. package/dist/components/fileupload/fileupload-base.d.ts +1 -1
  45. package/dist/components/fileupload/fileupload-renderers.d.ts +2 -2
  46. package/dist/components/fileupload/fileupload.d.ts +3 -1
  47. package/dist/components/header/header-user-menu.d.ts +1 -1
  48. package/dist/components/header/header.d.ts +1 -1
  49. package/dist/components/helptext/helptext.d.ts +1 -1
  50. package/dist/components/icon/icon.d.ts +1 -1
  51. package/dist/components/input-wrapper/input-wrapper.d.ts +1 -1
  52. package/dist/components/input-wrapper/tri-state.test.d.ts +0 -0
  53. package/dist/components/input-wrapper/wrapper-parity.test.d.ts +1 -0
  54. package/dist/components/link/link.d.ts +1 -1
  55. package/dist/components/linkcard/linkcard.d.ts +1 -1
  56. package/dist/components/listbox/listbox.d.ts +1 -1
  57. package/dist/components/loader/loader.d.ts +1 -1
  58. package/dist/components/messagebox/messagebox.d.ts +1 -1
  59. package/dist/components/modal/modal.d.ts +1 -1
  60. package/dist/components/progressbar/progressbar.d.ts +1 -1
  61. package/dist/components/radiobutton/radiobutton.d.ts +1 -1
  62. package/dist/components/searchinput/searchinput.d.ts +1 -1
  63. package/dist/components/select/select.d.ts +1 -1
  64. package/dist/components/select/select.test.d.ts +2 -2
  65. package/dist/components/tabs/tabitem.d.ts +1 -1
  66. package/dist/components/tabs/tabs.d.ts +1 -1
  67. package/dist/components/tag/tag.d.ts +1 -1
  68. package/dist/components/textarea/textarea.d.ts +3 -2
  69. package/dist/components/textarea/textarea.test.d.ts +2 -2
  70. package/dist/components/textinput/textinput.d.ts +1 -1
  71. package/dist/components/textinput/textinput.test.d.ts +2 -2
  72. package/dist/components/timepicker/timepicker.d.ts +1 -1
  73. package/dist/{consent--Nw43WFU.cjs → consent-CyY3RyoC.cjs} +1 -1
  74. package/dist/{consent-B2hSTCGC.js → consent-DZEkhgJ1.js} +2 -2
  75. package/dist/{consume-BiOhrhEy.js → consume-BDnMAp2g.js} +6 -6
  76. package/dist/{consume-DKf5SmP9.cjs → consume-Le4HztPo.cjs} +1 -1
  77. package/dist/converters-BJ9Fe0kW.cjs +1 -0
  78. package/dist/{converters-BBfsEJV5.js → converters-CkjLSYpa.js} +200 -202
  79. package/dist/{datepicker-BMuplkDE.js → datepicker-ButIas85.js} +46 -22
  80. package/dist/{datepicker-DrB54Rhc.cjs → datepicker-VTqSDQk5.cjs} +7 -8
  81. package/dist/dialog-polyfill.esm-B-g35ove.cjs +1 -0
  82. package/dist/{dialog-polyfill.esm-ChZRzCVh.js → dialog-polyfill.esm-DHSvqor8.js} +2 -2
  83. package/dist/{directive-helpers-BshFvt7A.cjs → directive-helpers-BlAV5EQD.cjs} +1 -1
  84. package/dist/{directive-helpers-DIF5DwN4.js → directive-helpers-CI8YZqku.js} +2 -2
  85. package/dist/directives/slot-content.d.ts +1 -1
  86. package/dist/docs/backlink.d.ts +1 -1
  87. package/dist/docs/components/accordion.d.ts +1 -1
  88. package/dist/docs/components/alert.d.ts +1 -1
  89. package/dist/docs/components/backlink.d.ts +1 -1
  90. package/dist/docs/components/breadcrumbs.d.ts +1 -1
  91. package/dist/docs/components/button.d.ts +1 -1
  92. package/dist/docs/components/calendar.d.ts +1 -1
  93. package/dist/docs/components/card.d.ts +1 -1
  94. package/dist/docs/components/checkbox.d.ts +1 -1
  95. package/dist/docs/components/combobox.d.ts +1 -1
  96. package/dist/docs/components/comboboxdemo.d.ts +1 -1
  97. package/dist/docs/components/consent.d.ts +1 -1
  98. package/dist/docs/components/datepicker.d.ts +1 -1
  99. package/dist/docs/components/datepickermultiple.d.ts +1 -1
  100. package/dist/docs/components/event-log.d.ts +1 -1
  101. package/dist/docs/components/fileupload.d.ts +1 -1
  102. package/dist/docs/components/footer.d.ts +1 -1
  103. package/dist/docs/components/form-sizes.d.ts +1 -1
  104. package/dist/docs/components/form.d.ts +1 -1
  105. package/dist/docs/components/header-full.d.ts +1 -1
  106. package/dist/docs/components/header-global-full.d.ts +1 -1
  107. package/dist/docs/components/header-global.d.ts +1 -1
  108. package/dist/docs/components/header-menu.d.ts +1 -1
  109. package/dist/docs/components/header.d.ts +1 -1
  110. package/dist/docs/components/heading.d.ts +1 -1
  111. package/dist/docs/components/icon.d.ts +1 -1
  112. package/dist/docs/components/input-wrapper.d.ts +1 -1
  113. package/dist/docs/components/link.d.ts +1 -1
  114. package/dist/docs/components/linkcard.d.ts +1 -1
  115. package/dist/docs/components/loader.d.ts +1 -1
  116. package/dist/docs/components/messagebox.d.ts +1 -1
  117. package/dist/docs/components/modal.d.ts +1 -1
  118. package/dist/docs/components/progressbar.d.ts +1 -1
  119. package/dist/docs/components/radiobutton.d.ts +1 -1
  120. package/dist/docs/components/searchinput.d.ts +1 -1
  121. package/dist/docs/components/select.d.ts +1 -1
  122. package/dist/docs/components/slots.d.ts +1 -1
  123. package/dist/docs/components/tabs.d.ts +1 -1
  124. package/dist/docs/components/tag.d.ts +1 -1
  125. package/dist/docs/components/textarea.d.ts +1 -1
  126. package/dist/docs/components/textinput.d.ts +1 -1
  127. package/dist/docs/components/timepicker.d.ts +1 -1
  128. package/dist/docs/components/verifisering.d.ts +15 -0
  129. package/dist/docs/header.d.ts +1 -1
  130. package/dist/docs/punkt-docs.d.ts +1 -1
  131. package/dist/element-BA8v6S7z.cjs +2 -0
  132. package/dist/{element-BoJrqauR.js → element-ChsFgr_B.js} +19 -16
  133. package/dist/{element-with-slot-BY7Jc-q8.cjs → element-with-slot-Bj7nm7fO.cjs} +1 -1
  134. package/dist/{element-with-slot-mXLg8gg8.js → element-with-slot-BvG9ctC-.js} +2 -2
  135. package/dist/fetch-header-footer-data-CUKV0biS.cjs +1 -0
  136. package/dist/{fileupload-CGKUJrlj.cjs → fileupload-BeWiTAoW.cjs} +8 -8
  137. package/dist/{fileupload-D4gQN64T.js → fileupload-D5IQ9HDe.js} +25 -20
  138. package/dist/{footer-Ber-jqM1.cjs → footer-DbYQUYNR.cjs} +1 -1
  139. package/dist/{footer-BIrJeRuZ.js → footer-DrR64HiK.js} +6 -6
  140. package/dist/{header-BFk1an4z.cjs → header-ClgIac6n.cjs} +12 -12
  141. package/dist/{header-Deg_LGJo.js → header-KvJ1mGwA.js} +48 -38
  142. package/dist/{header-menu-BHqK4QA6.cjs → header-menu-BAsUNKSx.cjs} +3 -3
  143. package/dist/{header-menu-GFtJKM4j.js → header-menu-hVPXsb8g.js} +10 -8
  144. package/dist/{heading-DyJpBFT2.cjs → heading-CFmiSuCQ.cjs} +1 -1
  145. package/dist/{heading-CD0PhL8g.js → heading-g-_IUB5T.js} +2 -2
  146. package/dist/{helptext-Cq5rNaAC.cjs → helptext-CTtKJcML.cjs} +4 -1
  147. package/dist/{helptext-C_brWCIT.js → helptext-DZng1D5i.js} +18 -14
  148. package/dist/{icon-B8PVq2O6.cjs → icon-9iwd2F2l.cjs} +1 -1
  149. package/dist/{icon-DGFEIlco.js → icon-D-LA22xD.js} +2 -2
  150. package/dist/if-defined-B89_ZeCj.cjs +1 -0
  151. package/dist/if-defined-CGzIlZ9-.js +5 -0
  152. package/dist/{input-element-C0RnXi-J.js → input-element-DBMNBplu.js} +155 -129
  153. package/dist/{input-element-B0qLbEdF.cjs → input-element-DYmQw-fH.cjs} +1 -1
  154. package/dist/input-wrapper-BmxNvznr.js +128 -0
  155. package/dist/{input-wrapper-BweP6t3O.js → input-wrapper-D-fPaTbY.js} +2 -2
  156. package/dist/{input-wrapper-wh3fWIhk.cjs → input-wrapper-D5PR0rJn.cjs} +1 -1
  157. package/dist/input-wrapper-Q-B-aBeb.cjs +54 -0
  158. package/dist/{link-FmkQvSQL.js → link-D-Eqm5KH.js} +8 -7
  159. package/dist/{link-Geze7498.cjs → link-DK7gvmnj.cjs} +2 -2
  160. package/dist/{linkcard-6LCXRTR-.cjs → linkcard-B29cmZqh.cjs} +1 -1
  161. package/dist/{linkcard-BKdT0zU_.js → linkcard-zqbg7Oqm.js} +4 -4
  162. package/dist/{listbox-89wMuQVK.cjs → listbox-Dc4rGdPi.cjs} +2 -2
  163. package/dist/{listbox-LdyWPu7W.js → listbox-va_E8afs.js} +6 -10
  164. package/dist/{loader-CgW4Vst3.cjs → loader-CMUkVJmE.cjs} +1 -1
  165. package/dist/{loader-BA-i8CaQ.js → loader-D_RDICnw.js} +4 -4
  166. package/dist/{messagebox-VD5oEZ19.cjs → messagebox-Cv8LaSxv.cjs} +1 -1
  167. package/dist/{messagebox-fiaAyHLG.js → messagebox-Cw-OWDya.js} +7 -6
  168. package/dist/{modal-CPnFteYS.cjs → modal-BtInv031.cjs} +1 -1
  169. package/dist/{modal-xNK_wpHk.js → modal-D0t_X2dX.js} +6 -6
  170. package/dist/pkt-accordion.cjs +1 -1
  171. package/dist/pkt-accordion.js +1 -1
  172. package/dist/pkt-alert.cjs +1 -1
  173. package/dist/pkt-alert.js +1 -1
  174. package/dist/pkt-backlink.cjs +1 -1
  175. package/dist/pkt-backlink.js +1 -1
  176. package/dist/pkt-breadcrumbs.cjs +1 -1
  177. package/dist/pkt-breadcrumbs.js +1 -1
  178. package/dist/pkt-button.cjs +1 -1
  179. package/dist/pkt-button.js +1 -1
  180. package/dist/pkt-calendar.cjs +1 -1
  181. package/dist/pkt-calendar.js +1 -1
  182. package/dist/pkt-card.cjs +1 -1
  183. package/dist/pkt-card.js +1 -1
  184. package/dist/pkt-checkbox.cjs +1 -1
  185. package/dist/pkt-checkbox.js +1 -1
  186. package/dist/pkt-combobox.cjs +1 -1
  187. package/dist/pkt-combobox.js +1 -1
  188. package/dist/pkt-consent.cjs +1 -1
  189. package/dist/pkt-consent.js +1 -1
  190. package/dist/pkt-datepicker.cjs +1 -1
  191. package/dist/pkt-datepicker.js +1 -1
  192. package/dist/pkt-fileupload.cjs +1 -1
  193. package/dist/pkt-fileupload.js +1 -1
  194. package/dist/pkt-footer.cjs +1 -1
  195. package/dist/pkt-footer.js +1 -1
  196. package/dist/pkt-header-menu.cjs +1 -1
  197. package/dist/pkt-header-menu.js +1 -1
  198. package/dist/pkt-header.cjs +1 -1
  199. package/dist/pkt-header.js +1 -1
  200. package/dist/pkt-heading.cjs +1 -1
  201. package/dist/pkt-heading.js +1 -1
  202. package/dist/pkt-helptext.cjs +1 -1
  203. package/dist/pkt-helptext.js +1 -1
  204. package/dist/pkt-icon.cjs +1 -1
  205. package/dist/pkt-icon.js +1 -1
  206. package/dist/pkt-index.cjs +1 -1
  207. package/dist/pkt-index.js +34 -34
  208. package/dist/pkt-input-wrapper.cjs +1 -1
  209. package/dist/pkt-input-wrapper.js +1 -1
  210. package/dist/pkt-link.cjs +1 -1
  211. package/dist/pkt-link.js +1 -1
  212. package/dist/pkt-linkcard.cjs +1 -1
  213. package/dist/pkt-linkcard.js +1 -1
  214. package/dist/pkt-listbox.cjs +1 -1
  215. package/dist/pkt-listbox.js +1 -1
  216. package/dist/pkt-loader.cjs +1 -1
  217. package/dist/pkt-loader.js +1 -1
  218. package/dist/pkt-messagebox.cjs +1 -1
  219. package/dist/pkt-messagebox.js +1 -1
  220. package/dist/pkt-modal.cjs +1 -1
  221. package/dist/pkt-modal.js +1 -1
  222. package/dist/{pkt-options-controller-DMxYwnnj.js → pkt-options-controller-B77vH3PE.js} +1 -1
  223. package/dist/{pkt-options-controller-CPrfqepu.cjs → pkt-options-controller-C5EBX2T0.cjs} +1 -1
  224. package/dist/pkt-progressbar.cjs +1 -1
  225. package/dist/pkt-progressbar.js +1 -1
  226. package/dist/pkt-radiobutton.cjs +1 -1
  227. package/dist/pkt-radiobutton.js +1 -1
  228. package/dist/pkt-searchinput.cjs +1 -1
  229. package/dist/pkt-searchinput.js +1 -1
  230. package/dist/pkt-select.cjs +1 -1
  231. package/dist/pkt-select.js +1 -1
  232. package/dist/pkt-tabs.cjs +1 -1
  233. package/dist/pkt-tabs.js +1 -1
  234. package/dist/pkt-tag.cjs +1 -1
  235. package/dist/pkt-tag.js +1 -1
  236. package/dist/pkt-textarea.cjs +1 -1
  237. package/dist/pkt-textarea.js +1 -1
  238. package/dist/pkt-textinput.cjs +1 -1
  239. package/dist/pkt-textinput.js +1 -1
  240. package/dist/pkt-timepicker.cjs +1 -1
  241. package/dist/pkt-timepicker.js +1 -1
  242. package/dist/{progressbar-mtjtbpCO.js → progressbar-CbcfLerF.js} +6 -6
  243. package/dist/progressbar-D5MmnQId.cjs +17 -0
  244. package/dist/{radiobutton-C6htwDrT.js → radiobutton-BUnf3EPi.js} +8 -8
  245. package/dist/{radiobutton-DjWBoSHv.cjs → radiobutton-DpsO1F-8.cjs} +4 -4
  246. package/dist/ref-CQoEIIp0.cjs +1 -0
  247. package/dist/{ref-WGS0u7i2.js → ref-CWD6PjVd.js} +9 -7
  248. package/dist/{repeat-BH0cL82q.js → repeat-C02g7d5S.js} +13 -12
  249. package/dist/{repeat-DRnLAg0O.cjs → repeat-sY6B7fAT.cjs} +1 -1
  250. package/dist/{searchinput-DGjeN1YI.cjs → searchinput-Bh975rjX.cjs} +1 -1
  251. package/dist/{searchinput-CfUVfpqL.js → searchinput-DwnjsvJ1.js} +4 -4
  252. package/dist/select-BOJi6H6T.cjs +49 -0
  253. package/dist/{select-CsBXXbLP.js → select-DMre80qs.js} +24 -20
  254. package/dist/shared-types/booleanish.d.ts +11 -0
  255. package/dist/shared-types/index.d.ts +1 -1
  256. package/dist/shared-utils/date-utils.d.ts +16 -16
  257. package/dist/shared-utils/datepicker-utils.d.ts +11 -11
  258. package/dist/shared-utils/device-utils.d.ts +1 -1
  259. package/dist/shared-utils/forms/described-by.d.ts +24 -0
  260. package/dist/shared-utils/utils.d.ts +2 -2
  261. package/dist/shared-utils/value-utils.d.ts +2 -2
  262. package/dist/{tabs-q62MK_-r.cjs → tabs-Cf9ai0FD.cjs} +2 -2
  263. package/dist/{tabs-BqrKLCjd.js → tabs-TvxgbrCF.js} +7 -7
  264. package/dist/{tag-XE-VRxT2.cjs → tag-CzojNU7z.cjs} +1 -1
  265. package/dist/{tag-BTiTXyf5.js → tag-Ds6n1LIs.js} +5 -5
  266. package/dist/textarea-BydiLM9Z.cjs +49 -0
  267. package/dist/{textarea-Cm392CEI.js → textarea-vfzIcXhX.js} +36 -29
  268. package/dist/{textinput-TSPcBcih.js → textinput-CMP2jPP_.js} +30 -25
  269. package/dist/{textinput-DqJbTglM.cjs → textinput-DGdicNSx.cjs} +10 -10
  270. package/dist/{timepicker-DWbgTDKq.js → timepicker-ClwgYywH.js} +19 -14
  271. package/dist/{timepicker-CqFYMV8q.cjs → timepicker-DYrnLHqN.cjs} +5 -2
  272. package/dist/translations/no.json.d.ts +2 -1
  273. package/package.json +7 -4
  274. package/src/components/combobox/combobox.core.test.ts +2 -2
  275. package/src/components/combobox/combobox.ts +7 -1
  276. package/src/components/datepicker/datepicker-single.ts +1 -1
  277. package/src/components/datepicker/datepicker.ts +5 -3
  278. package/src/components/fileupload/fileupload.ts +6 -1
  279. package/src/components/helptext/helptext.ts +3 -0
  280. package/src/components/input-wrapper/input-wrapper.test.ts +3 -3
  281. package/src/components/input-wrapper/input-wrapper.ts +31 -29
  282. package/src/components/input-wrapper/tri-state.test.ts +91 -0
  283. package/src/components/input-wrapper/wrapper-parity.test.ts +141 -0
  284. package/src/components/select/select.test.ts +8 -7
  285. package/src/components/select/select.ts +13 -5
  286. package/src/components/textarea/textarea.test.ts +6 -6
  287. package/src/components/textarea/textarea.ts +20 -11
  288. package/src/components/textinput/textinput.test.ts +6 -6
  289. package/src/components/textinput/textinput.ts +17 -11
  290. package/src/components/timepicker/timepicker.ts +12 -5
  291. package/dist/async-directive-HLXOyE4A.cjs +0 -1
  292. package/dist/booleanish-B9Kf0nES.cjs +0 -1
  293. package/dist/combobox-BH9lym0-.cjs +0 -136
  294. package/dist/converters-Cd0fPEly.cjs +0 -1
  295. package/dist/dialog-polyfill.esm-J-GKtwrS.cjs +0 -1
  296. package/dist/element-DJzurxgt.cjs +0 -2
  297. package/dist/fetch-header-footer-data-xohWFmYC.cjs +0 -1
  298. package/dist/if-defined-D0bnetLJ.js +0 -5
  299. package/dist/if-defined-DrwbxQOj.cjs +0 -1
  300. package/dist/input-wrapper-DPkkiG7S.cjs +0 -57
  301. package/dist/input-wrapper-fWV5P4MN.js +0 -126
  302. package/dist/progressbar-BN5y20CC.cjs +0 -17
  303. package/dist/ref-DO7TzO4O.cjs +0 -1
  304. package/dist/select-CZvAW7W2.cjs +0 -50
  305. package/dist/textarea-sTcZxOIB.cjs +0 -47
@@ -1,4 +1,4 @@
1
- const e=require("./element-DJzurxgt.cjs"),t=require("./class-map-CCZN5uS3.cjs"),n=require("./ref-DO7TzO4O.cjs"),r=require("./input-element-B0qLbEdF.cjs");var i=class extends r.t{constructor(...e){super(...e),this.inputRef=n.t(),this.value=``,this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type=`radio`,this.tagText=null,this.optionalTag=!1,this.optionalText=`Valgfritt`,this.requiredTag=!1,this.requiredText=`Må fylles ut`,this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,t,n){e===`defaultChecked`&&(this._checked=this.defaultChecked),e===`checked`&&(this._checked=this.checked===``||this.checked===`true`||this.checked===!0),super.attributeChangedCallback(e,t,n)}render(){let r=t.t({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),i=t.t({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),a=t.t({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-sr-only":this.hideLabel});return e.p`
1
+ const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs"),n=require("./ref-CQoEIIp0.cjs"),r=require("./input-element-DYmQw-fH.cjs");var i=class extends r.t{constructor(...e){super(...e),this.inputRef=n.t(),this.value=``,this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type=`radio`,this.tagText=null,this.optionalTag=!1,this.optionalText=`Valgfritt`,this.requiredTag=!1,this.requiredText=`Må fylles ut`,this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,t,n){e===`defaultChecked`&&(this._checked=this.defaultChecked),e===`checked`&&(this._checked=this.checked===``||this.checked===`true`||this.checked===!0),super.attributeChangedCallback(e,t,n)}render(){let r=t.t({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),i=t.t({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),a=t.t({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-sr-only":this.hideLabel}),o=`pkt-tag pkt-tag--small pkt-tag--thin-text`;return e.p`
2
2
  <div class="pkt-input-check">
3
3
  <div class=${r}>
4
4
  <input
@@ -19,9 +19,9 @@ const e=require("./element-DJzurxgt.cjs"),t=require("./class-map-CCZN5uS3.cjs"),
19
19
  ${e.p`
20
20
  <label class=${a} for=${this.id+`-internal`}>
21
21
  ${this.label} ${e.p`
22
- ${this.tagText?e.p`<span class=${`pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--gray`}>${this.tagText}</span>`:e.d}
23
- ${this.optionalTag?e.p`<span class=${`pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light`}>${this.optionalText}</span>`:e.d}
24
- ${this.requiredTag?e.p`<span class=${`pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige`}>${this.requiredText}</span>`:e.d}
22
+ ${this.tagText?e.p`<span class=${o+` pkt-tag--gray`}>${this.tagText}</span>`:e.d}
23
+ ${this.optionalTag?e.p`<span class=${o+` pkt-tag--blue-light`}>${this.optionalText}</span>`:e.d}
24
+ ${this.requiredTag?e.p`<span class=${o+` pkt-tag--beige`}>${this.requiredText}</span>`:e.d}
25
25
  `}
26
26
  ${this.checkHelptext?e.p`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>`:e.d}
27
27
  </label>
@@ -0,0 +1 @@
1
+ const e=require("./element-BA8v6S7z.cjs"),t=require("./async-directive-Da7TJpnq.cjs");var n=()=>new r,r=class{},i=new WeakMap,a=e.c(class extends t.t{render(t){return e.d}update(t,[n]){let r=n!==this.G;return r&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=n,this.ht=t.options?.host,this.rt(this.ct=t.element)),e.d}rt(e){if(this.G!==void 0){if(this.isConnected||(e=void 0),typeof this.G==`function`){let t=this.ht??globalThis,n=i.get(t);n===void 0&&(n=new WeakMap,i.set(t,n)),n.get(this.G)!==void 0&&this.G.call(this.ht,void 0),n.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}}get lt(){return typeof this.G==`function`?i.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
@@ -1,6 +1,6 @@
1
- import { c as e, d as t } from "./element-BoJrqauR.js";
2
- import { t as n } from "./async-directive-Cw_7VW_-.js";
3
- //#region node_modules/lit/node_modules/lit-html/directives/ref.js
1
+ import { c as e, d as t } from "./element-ChsFgr_B.js";
2
+ import { t as n } from "./async-directive-BPf6K-V2.js";
3
+ //#region ../../node_modules/lit-html/directives/ref.js
4
4
  var r = () => new i(), i = class {}, a = /* @__PURE__ */ new WeakMap(), o = e(class extends n {
5
5
  render(e) {
6
6
  return t;
@@ -10,10 +10,12 @@ var r = () => new i(), i = class {}, a = /* @__PURE__ */ new WeakMap(), o = e(cl
10
10
  return r && this.rt(void 0), (r || this.lt !== this.ct) && (this.G = n, this.ht = e.options?.host, this.rt(this.ct = e.element)), t;
11
11
  }
12
12
  rt(e) {
13
- if (this.G !== void 0) if (this.isConnected || (e = void 0), typeof this.G == "function") {
14
- let t = this.ht ?? globalThis, n = a.get(t);
15
- n === void 0 && (n = /* @__PURE__ */ new WeakMap(), a.set(t, n)), n.get(this.G) !== void 0 && this.G.call(this.ht, void 0), n.set(this.G, e), e !== void 0 && this.G.call(this.ht, e);
16
- } else this.G.value = e;
13
+ if (this.G !== void 0) {
14
+ if (this.isConnected || (e = void 0), typeof this.G == "function") {
15
+ let t = this.ht ?? globalThis, n = a.get(t);
16
+ n === void 0 && (n = /* @__PURE__ */ new WeakMap(), a.set(t, n)), n.get(this.G) !== void 0 && this.G.call(this.ht, void 0), n.set(this.G, e), e !== void 0 && this.G.call(this.ht, e);
17
+ } else this.G.value = e;
18
+ }
17
19
  }
18
20
  get lt() {
19
21
  return typeof this.G == "function" ? a.get(this.ht ?? globalThis)?.get(this.G) : this.G?.value;
@@ -1,6 +1,6 @@
1
- import { c as e, f as t, l as n, u as r } from "./element-BoJrqauR.js";
2
- import { a as i, n as a, o, r as s, t as c } from "./directive-helpers-DIF5DwN4.js";
3
- //#region node_modules/lit/node_modules/lit-html/directives/repeat.js
1
+ import { c as e, f as t, l as n, u as r } from "./element-ChsFgr_B.js";
2
+ import { a as i, n as a, o, r as s, t as c } from "./directive-helpers-CI8YZqku.js";
3
+ //#region ../../node_modules/lit-html/directives/repeat.js
4
4
  var l = (e, t, n) => {
5
5
  let r = /* @__PURE__ */ new Map();
6
6
  for (let i = t; i <= n; i++) r.set(e[i], i);
@@ -32,15 +32,16 @@ var l = (e, t, n) => {
32
32
  else if (m[y] === p[x]) h[x] = i(d[y], f[x]), y--, x--;
33
33
  else if (m[v] === p[x]) h[x] = i(d[v], f[x]), o(e, h[x + 1], d[v]), v++, x--;
34
34
  else if (m[y] === p[b]) h[b] = i(d[y], f[b]), o(e, d[v], d[y]), y--, b++;
35
- else if (g === void 0 && (g = l(p, b, x), _ = l(m, v, y)), g.has(m[v])) if (g.has(m[y])) {
36
- let t = _.get(p[b]), n = t === void 0 ? null : d[t];
37
- if (n === null) {
38
- let t = o(e, d[v]);
39
- i(t, f[b]), h[b] = t;
40
- } else h[b] = i(n, f[b]), o(e, d[v], n), d[t] = null;
41
- b++;
42
- } else a(d[y]), y--;
43
- else a(d[v]), v++;
35
+ else if (g === void 0 && (g = l(p, b, x), _ = l(m, v, y)), g.has(m[v])) {
36
+ if (g.has(m[y])) {
37
+ let t = _.get(p[b]), n = t === void 0 ? null : d[t];
38
+ if (n === null) {
39
+ let t = o(e, d[v]);
40
+ i(t, f[b]), h[b] = t;
41
+ } else h[b] = i(n, f[b]), o(e, d[v], n), d[t] = null;
42
+ b++;
43
+ } else a(d[y]), y--;
44
+ } else a(d[v]), v++;
44
45
  for (; b <= x;) {
45
46
  let t = o(e, h[x + 1]);
46
47
  i(t, f[b]), h[b++] = t;
@@ -1 +1 @@
1
- const e=require("./element-DJzurxgt.cjs"),t=require("./directive-helpers-BshFvt7A.cjs");var n=(e,t,n)=>{let r=new Map;for(let i=t;i<=n;i++)r.set(e[i],i);return r},r=e.c(class extends e.l{constructor(t){if(super(t),t.type!==e.u.CHILD)throw Error(`repeat() can only be used in text expressions`)}dt(e,t,n){let r;n===void 0?n=t:t!==void 0&&(r=t);let i=[],a=[],o=0;for(let t of e)i[o]=r?r(t,o):o,a[o]=n(t,o),o++;return{values:a,keys:i}}render(e,t,n){return this.dt(e,t,n).values}update(r,[i,a,o]){let s=t.t(r),{values:c,keys:l}=this.dt(i,a,o);if(!Array.isArray(s))return this.ut=l,c;let u=this.ut??=[],d=[],f,p,m=0,h=s.length-1,g=0,_=c.length-1;for(;m<=h&&g<=_;)if(s[m]===null)m++;else if(s[h]===null)h--;else if(u[m]===l[g])d[g]=t.a(s[m],c[g]),m++,g++;else if(u[h]===l[_])d[_]=t.a(s[h],c[_]),h--,_--;else if(u[m]===l[_])d[_]=t.a(s[m],c[_]),t.o(r,d[_+1],s[m]),m++,_--;else if(u[h]===l[g])d[g]=t.a(s[h],c[g]),t.o(r,s[m],s[h]),h--,g++;else if(f===void 0&&(f=n(l,g,_),p=n(u,m,h)),f.has(u[m]))if(f.has(u[h])){let e=p.get(l[g]),n=e===void 0?null:s[e];if(n===null){let e=t.o(r,s[m]);t.a(e,c[g]),d[g]=e}else d[g]=t.a(n,c[g]),t.o(r,s[m],n),s[e]=null;g++}else t.n(s[h]),h--;else t.n(s[m]),m++;for(;g<=_;){let e=t.o(r,d[_+1]);t.a(e,c[g]),d[g++]=e}for(;m<=h;){let e=s[m++];e!==null&&t.n(e)}return this.ut=l,t.r(r,d),e.f}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
1
+ const e=require("./element-BA8v6S7z.cjs"),t=require("./directive-helpers-BlAV5EQD.cjs");var n=(e,t,n)=>{let r=new Map;for(let i=t;i<=n;i++)r.set(e[i],i);return r},r=e.c(class extends e.l{constructor(t){if(super(t),t.type!==e.u.CHILD)throw Error(`repeat() can only be used in text expressions`)}dt(e,t,n){let r;n===void 0?n=t:t!==void 0&&(r=t);let i=[],a=[],o=0;for(let t of e)i[o]=r?r(t,o):o,a[o]=n(t,o),o++;return{values:a,keys:i}}render(e,t,n){return this.dt(e,t,n).values}update(r,[i,a,o]){let s=t.t(r),{values:c,keys:l}=this.dt(i,a,o);if(!Array.isArray(s))return this.ut=l,c;let u=this.ut??=[],d=[],f,p,m=0,h=s.length-1,g=0,_=c.length-1;for(;m<=h&&g<=_;)if(s[m]===null)m++;else if(s[h]===null)h--;else if(u[m]===l[g])d[g]=t.a(s[m],c[g]),m++,g++;else if(u[h]===l[_])d[_]=t.a(s[h],c[_]),h--,_--;else if(u[m]===l[_])d[_]=t.a(s[m],c[_]),t.o(r,d[_+1],s[m]),m++,_--;else if(u[h]===l[g])d[g]=t.a(s[h],c[g]),t.o(r,s[m],s[h]),h--,g++;else if(f===void 0&&(f=n(l,g,_),p=n(u,m,h)),f.has(u[m])){if(f.has(u[h])){let e=p.get(l[g]),n=e===void 0?null:s[e];if(n===null){let e=t.o(r,s[m]);t.a(e,c[g]),d[g]=e}else d[g]=t.a(n,c[g]),t.o(r,s[m],n),s[e]=null;g++}else t.n(s[h]),h--}else t.n(s[m]),m++;for(;g<=_;){let e=t.o(r,d[_+1]);t.a(e,c[g]),d[g++]=e}for(;m<=h;){let e=s[m++];e!==null&&t.n(e)}return this.ut=l,t.r(r,d),e.f}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
@@ -1,4 +1,4 @@
1
- const e=require("./element-DJzurxgt.cjs"),t=require("./class-map-CCZN5uS3.cjs");require("./icon-B8PVq2O6.cjs");const n=require("./if-defined-DrwbxQOj.cjs"),r=require("./focus-modality-controller-C1ocyv2J.cjs");var i=class extends e.t{constructor(...e){super(...e),this.appearance=`local`,this.inputSize=`medium`,this.disabled=!1,this.fullwidth=!1,this.id=``,this.placeholder=`Søk…`,this.value=``,this.focusModality=new r.t(this,`.pkt-searchinput`)}willUpdate(e){super.willUpdate(e);let t=this.getAttribute(`aria-label`);t&&(this.inputAriaLabel=t,this.removeAttribute(`aria-label`))}get suggestionsId(){return`${this.id}-suggestions`}dispatchSearch(){this.dispatchEvent(new CustomEvent(`pkt-search`,{detail:{value:this.value},bubbles:!0,composed:!0}))}onInput(e){let t=e.target;this.value=t.value}onInputKeydown(e){e.key===`Enter`&&(this.action||e.preventDefault(),this.dispatchSearch())}onSearchClick(e){this.action||e.preventDefault(),this.dispatchSearch()}onSuggestionClick(e,t,n){let r=new CustomEvent(`pkt-suggestion-click`,{detail:{index:n,suggestion:t},bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(r)||e.preventDefault()}renderSuggestion(t,n){let r=e.p`
1
+ const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs");require("./icon-9iwd2F2l.cjs");const n=require("./if-defined-B89_ZeCj.cjs"),r=require("./focus-modality-controller-C1ocyv2J.cjs");var i=class extends e.t{constructor(...e){super(...e),this.appearance=`local`,this.inputSize=`medium`,this.disabled=!1,this.fullwidth=!1,this.id=``,this.placeholder=`Søk…`,this.value=``,this.focusModality=new r.t(this,`.pkt-searchinput`)}willUpdate(e){super.willUpdate(e);let t=this.getAttribute(`aria-label`);t&&(this.inputAriaLabel=t,this.removeAttribute(`aria-label`))}get suggestionsId(){return`${this.id}-suggestions`}dispatchSearch(){this.dispatchEvent(new CustomEvent(`pkt-search`,{detail:{value:this.value},bubbles:!0,composed:!0}))}onInput(e){let t=e.target;this.value=t.value}onInputKeydown(e){e.key===`Enter`&&(this.action||e.preventDefault(),this.dispatchSearch())}onSearchClick(e){this.action||e.preventDefault(),this.dispatchSearch()}onSuggestionClick(e,t,n){let r=new CustomEvent(`pkt-suggestion-click`,{detail:{index:n,suggestion:t},bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(r)||e.preventDefault()}renderSuggestion(t,n){let r=e.p`
2
2
  ${t.title?e.p`<h3 class="pkt-searchinput__suggestion-title">${t.title}</h3>`:e.d}
3
3
  ${t.text?e.p`<p class="pkt-searchinput__suggestion-text">${t.text}</p>`:e.d}
4
4
  `;return t.href?e.p`<a
@@ -1,7 +1,7 @@
1
- import { a as e, d as t, n, o as r, p as i, s as a, t as o } from "./element-BoJrqauR.js";
2
- import { t as s } from "./class-map-CAQCRB1W.js";
3
- import "./icon-DGFEIlco.js";
4
- import { t as c } from "./if-defined-D0bnetLJ.js";
1
+ import { a as e, d as t, n, o as r, p as i, s as a, t as o } from "./element-ChsFgr_B.js";
2
+ import { t as s } from "./class-map-CnWCnBSX.js";
3
+ import "./icon-D-LA22xD.js";
4
+ import { t as c } from "./if-defined-CGzIlZ9-.js";
5
5
  import { t as l } from "./focus-modality-controller-Dc2S-KqR.js";
6
6
  //#region src/components/searchinput/searchinput.ts
7
7
  var u = class extends o {
@@ -0,0 +1,49 @@
1
+ const e=require("./element-BA8v6S7z.cjs"),t=require("./element-with-slot-Bj7nm7fO.cjs"),n=require("./if-defined-B89_ZeCj.cjs"),r=require("./ref-CQoEIIp0.cjs"),i=require("./input-element-DYmQw-fH.cjs"),a=require("./pkt-options-controller-C5EBX2T0.cjs"),o=require("./input-wrapper-Q-B-aBeb.cjs");var s=class extends i.t{constructor(...e){super(...e),this._optionsProp=[],this._options=[]}get options(){return this._options.map(e=>({...e,selected:this.isOptionSelected(e)}))}set options(e){this._optionsProp=e,this.requestUpdate(`_optionsProp`,this._options)}isOptionSelected(e){return Array.isArray(this.value)?this.value.includes(e.value):e.value===this.value}findOptionByValue(e){return this._options.find(t=>t.value===e)}getSelectedOptions(){return this._options.filter(e=>this.isOptionSelected(e))}parseOptions(){let e=this._optionsProp.length>0,t=this.optionsController?.nodes?.length&&this.optionsController.nodes.length>0;e?this._options=this._optionsProp:t&&(this._options=this.optionsController.options)}willUpdate(e){super.willUpdate(e),this.parseOptions()}};e.n([e.o({type:Array,attribute:`options`})],s.prototype,`_optionsProp`,void 0),e.n([e.a()],s.prototype,`_options`,void 0);var c=class extends s{constructor(){super(),this.inputRef=r.t(),this.value=``,this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new a.t(this)}connectedCallback(){super.connectedCallback(),this.parseOptions(),this._options.forEach(e=>{e.selected&&!this.value&&(this.value=e.value)})}add(e,t){let n={value:e.value||e.text,label:e.text||e.value,selected:e.selected,disabled:e.disabled};if(t===void 0)this._options.push(n);else if(typeof t==`number`)this._options.splice(t,0,n);else{let e=t.value||t.text,r=this._options.findIndex(t=>t.value===e);r>=0?this._options.splice(r,0,n):this._options.push(n)}e.selected&&(this.value=e.value||e.text,this.selectedIndex=this._options.findIndex(e=>e.value===this.value)),this.requestUpdate()}remove(e){typeof e==`number`&&(this.selectedIndex===e&&(this.value=this._options[0]?.value||``),this._options.splice(e,1),this.requestUpdate())}item(e){return this.inputRef.value?.item(e)}namedItem(e){return this.inputRef.value?.namedItem(e)}showPicker(){this.inputRef.value&&`showPicker`in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(e,t,n){e===`options`&&(this._options=n?JSON.parse(n):[]),e===`value`&&this.value!==t&&(this.selectedIndex=this.touched?this.returnNumberOrNull(this.inputRef.value?.selectedIndex):this._options.findIndex(e=>e.value===n),this.selectedOptions=this.inputRef.value?.selectedOptions,this.valueChanged(n,t)),super.attributeChangedCallback(e,t,n)}update(e){super.update(e),e.has(`_optionsProp`)&&this._optionsProp.length>0&&(this._options=this._optionsProp,this.requestUpdate(`_options`),!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),e.has(`value`)&&this.value!==e.get(`value`)&&(this.selectedIndex=this.touched?this.returnNumberOrNull(this.inputRef.value?.selectedIndex):this._options.findIndex(e=>e.value===this.value),this.selectedOptions=this.inputRef.value?.selectedOptions,this.valueChanged(this.value,e.get(`value`))),e.has(`id`)&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(e){super.firstUpdated(e),this.classList.add(`pkt-select`),this._optionsProp.length&&(this._options=this._optionsProp),!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0):this.selectedIndex=this._options.findIndex(e=>e.value===this.value),this.selectedOptions=this.inputRef.value?.selectedOptions}render(){let i=`pkt-input pkt-input--${this.inputSize} ${this.fullwidth?`pkt-input--fullwidth`:``}`;return e.p`
2
+ <pkt-input-wrapper
3
+ .size=${this.inputSize}
4
+ ?disabled=${this.disabled}
5
+ ?hasError=${this.hasError}
6
+ ?hasFieldset=${this.effectiveHasFieldset(!1)}
7
+ ?inline=${this.inline}
8
+ ?optionalTag=${this.optionalTag}
9
+ ?requiredTag=${this.requiredTag}
10
+ useWrapper=${this.useWrapper}
11
+ .ariaDescribedby=${this.ariaDescribedby}
12
+ errorMessage=${n.t(this.errorMessage)}
13
+ forId=${this.id+`-input`}
14
+ helptext=${n.t(this.helptext)}
15
+ helptextDropdown=${n.t(this.helptextDropdown)}
16
+ helptextDropdownButton=${n.t(this.helptextDropdownButton)}
17
+ label=${n.t(this.label)}
18
+ optionalText=${n.t(this.optionalText)}
19
+ requiredText=${n.t(this.requiredText)}
20
+ tagText=${n.t(this.tagText)}
21
+ >
22
+ <select
23
+ class=${i}
24
+ aria-invalid=${this.hasError}
25
+ aria-errormessage=${n.t(this.hasError?`${this.id}-input-error`:void 0)}
26
+ aria-describedby=${n.t(o.r({id:this.id+`-input`,hasHelptext:!!this.helptext,hasCounter:!1,ariaDescribedby:this.ariaDescribedby}))}
27
+ aria-labelledby=${n.t(this.ariaLabelledby)}
28
+ ?disabled=${this.disabled}
29
+ id=${this.id+`-input`}
30
+ name=${(this.name||this.id)+`-input`}
31
+ value=${this.value}
32
+ @change=${e=>{this.touched=!0,this.value=e.target.value,e.stopImmediatePropagation()}}
33
+ @input=${e=>{this.onInput(),e.stopImmediatePropagation()}}
34
+ @focus=${e=>{this.onFocus(),e.stopImmediatePropagation()}}
35
+ @blur=${e=>{this.onBlur(),e.stopImmediatePropagation()}}
36
+ ${r.n(this.inputRef)}
37
+ >
38
+ ${this._options.length>0?this._options.map(t=>e.p`<option
39
+ value=${t.value}
40
+ ?selected=${this.value==t.value||t.selected}
41
+ ?disabled=${t.disabled}
42
+ ?hidden=${t.hidden}
43
+ >
44
+ ${t.label}
45
+ </option>`):``}
46
+ </select>
47
+ <div class="pkt-contents" slot="helptext">${t.n(this,`helptext`)}</div>
48
+ </pkt-input-wrapper>
49
+ `}returnNumberOrNull(e){return e==null||isNaN(e)?null:e}};e.n([e.o({type:String})],c.prototype,`value`,void 0);try{e.s(`pkt-select`)(c)}catch{console.warn(`Forsøker å definere <pkt-select>, men den er allerede definert`)}var l=c;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});
@@ -1,12 +1,12 @@
1
- import { a as e, n as t, o as n, p as r, s as i } from "./element-BoJrqauR.js";
2
- import { n as a } from "./element-with-slot-mXLg8gg8.js";
3
- import { t as o } from "./if-defined-D0bnetLJ.js";
4
- import { n as s, t as c } from "./ref-WGS0u7i2.js";
5
- import { t as l } from "./input-element-C0RnXi-J.js";
6
- import { t as u } from "./pkt-options-controller-DMxYwnnj.js";
7
- import "./input-wrapper-fWV5P4MN.js";
1
+ import { a as e, n as t, o as n, p as r, s as i } from "./element-ChsFgr_B.js";
2
+ import { n as a } from "./element-with-slot-BvG9ctC-.js";
3
+ import { t as o } from "./if-defined-CGzIlZ9-.js";
4
+ import { n as s, t as c } from "./ref-CWD6PjVd.js";
5
+ import { t as l } from "./input-element-DBMNBplu.js";
6
+ import { t as u } from "./pkt-options-controller-B77vH3PE.js";
7
+ import { r as d } from "./input-wrapper-BmxNvznr.js";
8
8
  //#region src/base-elements/options-input-element.ts
9
- var d = class extends l {
9
+ var f = class extends l {
10
10
  constructor(...e) {
11
11
  super(...e), this._optionsProp = [], this._options = [];
12
12
  }
@@ -39,10 +39,10 @@ var d = class extends l {
39
39
  t([n({
40
40
  type: Array,
41
41
  attribute: "options"
42
- })], d.prototype, "_optionsProp", void 0), t([e()], d.prototype, "_options", void 0);
42
+ })], f.prototype, "_optionsProp", void 0), t([e()], f.prototype, "_options", void 0);
43
43
  //#endregion
44
44
  //#region src/components/select/select.ts
45
- var f = class extends d {
45
+ var p = class extends f {
46
46
  constructor() {
47
47
  super(), this.inputRef = c(), this.value = "", this.selectedIndex = -1, this.selectedOptions = void 0, this.optionsController = new u(this);
48
48
  }
@@ -85,23 +85,21 @@ var f = class extends d {
85
85
  super.update(e), e.has("_optionsProp") && this._optionsProp.length > 0 && (this._options = this._optionsProp, this.requestUpdate("_options"), !this.value && this._options.length > 0 && (this.value = this._options[0].value, this.selectedIndex = 0)), e.has("value") && this.value !== e.get("value") && (this.selectedIndex = this.touched ? this.returnNumberOrNull(this.inputRef.value?.selectedIndex) : this._options.findIndex((e) => e.value === this.value), this.selectedOptions = this.inputRef.value?.selectedOptions, this.valueChanged(this.value, e.get("value"))), e.has("id") && !this.name && this.id && (this.name = this.id);
86
86
  }
87
87
  firstUpdated(e) {
88
- super.firstUpdated(e), this._optionsProp.length && (this._options = this._optionsProp), !this.value && this._options.length > 0 ? (this.value = this._options[0].value, this.selectedIndex = 0) : this.selectedIndex = this._options.findIndex((e) => e.value === this.value), this.selectedOptions = this.inputRef.value?.selectedOptions;
88
+ super.firstUpdated(e), this.classList.add("pkt-select"), this._optionsProp.length && (this._options = this._optionsProp), !this.value && this._options.length > 0 ? (this.value = this._options[0].value, this.selectedIndex = 0) : this.selectedIndex = this._options.findIndex((e) => e.value === this.value), this.selectedOptions = this.inputRef.value?.selectedOptions;
89
89
  }
90
90
  render() {
91
91
  let e = `pkt-input pkt-input--${this.inputSize} ${this.fullwidth ? "pkt-input--fullwidth" : ""}`;
92
92
  return r`
93
93
  <pkt-input-wrapper
94
94
  .size=${this.inputSize}
95
- ?counter=${this.counter}
96
95
  ?disabled=${this.disabled}
97
96
  ?hasError=${this.hasError}
98
- ?hasFieldset=${this.hasFieldset}
97
+ ?hasFieldset=${this.effectiveHasFieldset(!1)}
99
98
  ?inline=${this.inline}
100
99
  ?optionalTag=${this.optionalTag}
101
100
  ?requiredTag=${this.requiredTag}
102
101
  useWrapper=${this.useWrapper}
103
- ariaDescribedBy=${o(this.ariaDescribedBy)}
104
- class="pkt-select"
102
+ .ariaDescribedby=${this.ariaDescribedby}
105
103
  errorMessage=${o(this.errorMessage)}
106
104
  forId=${this.id + "-input"}
107
105
  helptext=${o(this.helptext)}
@@ -115,7 +113,13 @@ var f = class extends d {
115
113
  <select
116
114
  class=${e}
117
115
  aria-invalid=${this.hasError}
118
- aria-errormessage=${`${this.id}-error`}
116
+ aria-errormessage=${o(this.hasError ? `${this.id}-input-error` : void 0)}
117
+ aria-describedby=${o(d({
118
+ id: this.id + "-input",
119
+ hasHelptext: !!this.helptext,
120
+ hasCounter: !1,
121
+ ariaDescribedby: this.ariaDescribedby
122
+ }))}
119
123
  aria-labelledby=${o(this.ariaLabelledby)}
120
124
  ?disabled=${this.disabled}
121
125
  id=${this.id + "-input"}
@@ -152,14 +156,14 @@ var f = class extends d {
152
156
  return e == null || isNaN(e) ? null : e;
153
157
  }
154
158
  };
155
- t([n({ type: String })], f.prototype, "value", void 0);
159
+ t([n({ type: String })], p.prototype, "value", void 0);
156
160
  try {
157
- i("pkt-select")(f);
161
+ i("pkt-select")(p);
158
162
  } catch {
159
163
  console.warn("Forsøker å definere <pkt-select>, men den er allerede definert");
160
164
  }
161
165
  //#endregion
162
166
  //#region src/components/select/index.ts
163
- var p = f;
167
+ var m = p;
164
168
  //#endregion
165
- export { f as n, p as t };
169
+ export { p as n, m as t };
@@ -11,3 +11,14 @@ export declare const booleanishConverter: {
11
11
  fromAttribute(value: string | boolean | null): boolean;
12
12
  toAttribute(value: boolean): string | null;
13
13
  };
14
+ /**
15
+ * Som booleanishConverter, men skiller «ikke satt» fra `false`.
16
+ *
17
+ * Brukes for props der komponenten skal utlede en fornuftig standard når
18
+ * forbrukeren ikke har sagt noe — for eksempel `counter`, som slås på av seg
19
+ * selv når det finnes noe å telle, men skal kunne skrus av eksplisitt.
20
+ */
21
+ export declare const nullableBooleanishConverter: {
22
+ fromAttribute(value: string | boolean | null): boolean | null;
23
+ toAttribute(value: boolean | null): string | null;
24
+ };
@@ -1,5 +1,5 @@
1
1
  export type { Booleanish } from './booleanish';
2
- export { booleanishConverter } from './booleanish';
2
+ export { booleanishConverter, nullableBooleanishConverter } from './booleanish';
3
3
  export type { TAriaBoolean, TAriaBooleanMixed, TAriaCurrent, TAriaHasPopup, TAriaInvalid, TAriaLive, TAriaRelevant, TAriaSort, TAriaAutoComplete, TAriaOrientation, IAriaAttributes, TAlertRole, } from './aria';
4
4
  export type { THeadingLevel, THeadingSize, THeadingWeight } from './heading';
5
5
  export type { User, Representing, UserMenuItem, InternalMenuItemBase, InternalMenuLink, InternalMenuButton, TInternalMenuItem, TSlotMenuVariant, THeaderMenu, TLogOutButtonPlacement, THeaderPosition, THeaderScrollBehavior, } from './header';
@@ -44,7 +44,7 @@ export declare const fromISOtoLocal: (date: string, dateformat: string) => strin
44
44
  * @param timeOfDay - 'start' to set time to 00:00:00, 'end' to set time to 23:59:59
45
45
  * @returns A Date object
46
46
  */
47
- export declare const newDate: (date?: string | Date, timeOfDay?: "start" | "end") => Date;
47
+ export declare const newDate: (date?: string | Date, timeOfDay?: 'start' | 'end') => Date;
48
48
  /**
49
49
  * Creates a new Date object based on the provided year, month, and day.
50
50
  * If the inputs are invalid, returns the current date.
@@ -118,21 +118,21 @@ export declare const sortDateStrings: (dates: string[]) => string[];
118
118
  */
119
119
  export declare const isValidDateRange: (startDate: string, endDate: string) => boolean;
120
120
  declare const _default: {
121
- todayInTz: (tz?: string) => Date;
121
+ todayInTz: typeof todayInTz;
122
122
  parseISODateString: typeof parseISODateString;
123
- formatISODate: (date: Date | TZDate) => string;
124
- fromISOToDate: (date: string | null) => Date | null;
125
- fromISOtoLocal: (date: string, dateformat: string) => string;
126
- newDate: (date?: string | Date, timeOfDay?: "start" | "end") => Date;
127
- newDateYMD: (year: number, month: number, day?: number) => Date;
128
- newDateFromDate: (date: Date | TZDate | number) => Date;
129
- formatReadableDate: (date: Date | TZDate) => string;
130
- isDateInRange: (date: Date, min?: string | null, max?: string | null) => boolean;
131
- isDateExcluded: (date: Date, excludedDates: string[]) => boolean;
132
- isWeekdayExcluded: (date: Date, excludedWeekdays: string[]) => boolean;
133
- isDateSelectable: (date: Date, min?: string | null, max?: string | null, excludedDates?: string[], excludedWeekdays?: string[]) => boolean;
134
- filterSelectableDates: (dates: string[], min?: string | null, max?: string | null, excludedDates?: string[], excludedWeekdays?: string[]) => string[];
135
- sortDateStrings: (dates: string[]) => string[];
136
- isValidDateRange: (startDate: string, endDate: string) => boolean;
123
+ formatISODate: typeof formatISODate;
124
+ fromISOToDate: typeof fromISOToDate;
125
+ fromISOtoLocal: typeof fromISOtoLocal;
126
+ newDate: typeof newDate;
127
+ newDateYMD: typeof newDateYMD;
128
+ newDateFromDate: typeof newDateFromDate;
129
+ formatReadableDate: typeof formatReadableDate;
130
+ isDateInRange: typeof isDateInRange;
131
+ isDateExcluded: typeof isDateExcluded;
132
+ isWeekdayExcluded: typeof isWeekdayExcluded;
133
+ isDateSelectable: typeof isDateSelectable;
134
+ filterSelectableDates: typeof filterSelectableDates;
135
+ sortDateStrings: typeof sortDateStrings;
136
+ isValidDateRange: typeof isValidDateRange;
137
137
  };
138
138
  export default _default;
@@ -59,16 +59,16 @@ export declare const handleDatepickerKeydown: (event: KeyboardEvent, toggleCalen
59
59
  */
60
60
  export declare const handleDatepickerButtonKeydown: (event: KeyboardEvent, toggleCalendar: (e: Event) => void) => void;
61
61
  declare const _default: {
62
- getDatepickerInputType: () => string;
63
- validateRangeOrder: (values: string[]) => boolean;
64
- sortDates: (dates: string[]) => string[];
65
- filterDates: (dates: string[], min?: string | null, max?: string | null, excludedDates?: string[], excludedWeekdays?: string[]) => string[];
66
- getDatepickerInputClasses: (fullwidth: boolean, showRangeLabels: boolean, multiple: boolean, range: boolean, readonly?: boolean, inputType?: string, inputSize?: TPktInputSize) => Record<string, boolean>;
67
- getDatepickerButtonClasses: (inputSize?: TPktInputSize) => Record<string, boolean>;
68
- getRangeLabelClasses: (showRangeLabels: boolean) => Record<string, boolean>;
69
- processDateSelection: (detail: string | string[], multiple: boolean, range: boolean) => string;
70
- handleCalendarPosition: (popup: HTMLElement | null, input: HTMLElement | null, hasCounter?: boolean) => void;
71
- handleDatepickerKeydown: (event: KeyboardEvent, toggleCalendar: (e: Event) => void, submitForm?: () => void, focusNextInput?: () => void, blurInput?: () => void, commaHandler?: (e: KeyboardEvent) => void) => void;
72
- handleDatepickerButtonKeydown: (event: KeyboardEvent, toggleCalendar: (e: Event) => void) => void;
62
+ getDatepickerInputType: typeof getDatepickerInputType;
63
+ validateRangeOrder: typeof validateRangeOrder;
64
+ sortDates: typeof sortDates;
65
+ filterDates: typeof filterDates;
66
+ getDatepickerInputClasses: typeof getDatepickerInputClasses;
67
+ getDatepickerButtonClasses: typeof getDatepickerButtonClasses;
68
+ getRangeLabelClasses: typeof getRangeLabelClasses;
69
+ processDateSelection: typeof processDateSelection;
70
+ handleCalendarPosition: typeof handleCalendarPosition;
71
+ handleDatepickerKeydown: typeof handleDatepickerKeydown;
72
+ handleDatepickerButtonKeydown: typeof handleDatepickerButtonKeydown;
73
73
  };
74
74
  export default _default;
@@ -5,6 +5,6 @@
5
5
  */
6
6
  export declare const isIOS: () => boolean;
7
7
  declare const _default: {
8
- isIOS: () => boolean;
8
+ isIOS: typeof isIOS;
9
9
  };
10
10
  export default _default;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Bygger `aria-describedby` for et skjemafelt.
3
+ *
4
+ * Beskrivelsen må ligge på selve kontrollen — `aria-describedby` på en `<label>`
5
+ * bidrar ikke til feltets tilgjengelige beskrivelse, og hjelpeteksten blir da
6
+ * aldri lest opp når fokus havner i feltet.
7
+ *
8
+ * Feilmeldingen er med vilje ikke med: den kobles gjennom `aria-errormessage`,
9
+ * som er den riktige kanalen, og ville ellers blitt lest opp to ganger.
10
+ */
11
+ export declare const describedByIds: (options: {
12
+ /** Id-en feltet bruker (samme som wrapperens forId). */
13
+ id: string;
14
+ /** Om det finnes en hjelpetekst å beskrive feltet med. */
15
+ hasHelptext?: boolean;
16
+ /** Om telleren er aktiv. Statusregionen leses bare opp når grensa er brutt. */
17
+ hasCounter?: boolean;
18
+ /** Forbrukerens egen `ariaDescribedby`, hvis satt. */
19
+ ariaDescribedby?: string | null;
20
+ }) => string | undefined;
21
+ /** Id-en til den skjulte statusregionen som melder at tellergrensa er brutt. */
22
+ export declare const counterStatusId: (id: string) => string;
23
+ /** Om tellergrensa er brutt. */
24
+ export declare const isCounterExceeded: (current: number | undefined, max: number | undefined) => boolean;
@@ -10,7 +10,7 @@ export declare const sleep: (ms: number) => Promise<void>;
10
10
  */
11
11
  export declare const uuidish: () => string;
12
12
  declare const _default: {
13
- sleep: (ms: number) => Promise<void>;
14
- uuidish: () => string;
13
+ sleep: typeof sleep;
14
+ uuidish: typeof uuidish;
15
15
  };
16
16
  export default _default;
@@ -11,7 +11,7 @@ export declare const valueToArray: (value: string | string[] | null | undefined)
11
11
  */
12
12
  export declare const arrayToCsv: (array: string[]) => string;
13
13
  declare const _default: {
14
- valueToArray: (value: string | string[] | null | undefined) => string[];
15
- arrayToCsv: (array: string[]) => string;
14
+ valueToArray: typeof valueToArray;
15
+ arrayToCsv: typeof arrayToCsv;
16
16
  };
17
17
  export default _default;
@@ -1,5 +1,5 @@
1
- const e=require("./element-DJzurxgt.cjs"),t=require("./element-with-slot-BY7Jc-q8.cjs"),n=require("./if-defined-DrwbxQOj.cjs"),r=require("./consume-DKf5SmP9.cjs"),i=require("./ref-DO7TzO4O.cjs");var a=r.r(Symbol(`pkt-tabs-context`)),o=class extends t.t{constructor(...e){super(...e),this.arrowNav=!0,this.disableArrowNav=!1,this.separatorIconName=``,this.separatorIconPath=``,this.tabRefs=[],this.disabledMap={},this.tabCount=0,this.context={useArrowNav:this.useArrowNav,registerTab:this.registerTab.bind(this),handleClick:this.handleClick.bind(this),handleKeyUp:this.handleKeyUp.bind(this)}}get useArrowNav(){return this.arrowNav&&!this.disableArrowNav}updated(e){(e.has(`arrowNav`)||e.has(`disableArrowNav`))&&(this.context={...this.context,useArrowNav:this.useArrowNav}),this.updateComplete.then(()=>this.syncSeparators())}syncSeparators(){let e=this.querySelector(`.pkt-tabs__list`);if(!e||(e.querySelectorAll(`.pkt-tabs__separator`).forEach(e=>e.remove()),!(this.separatorIconName||this.separatorIconPath)))return;let t=Array.from(e.children).filter(e=>!e.classList.contains(`pkt-tabs__separator`));for(let e=0;e<t.length-1;e++){let n=document.createElement(`span`);if(n.className=`pkt-tabs__separator`,n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`role`,`presentation`),this.separatorIconPath){let e=document.createElement(`img`);e.setAttribute(`src`,this.separatorIconPath),e.setAttribute(`alt`,``),e.setAttribute(`aria-hidden`,`true`),n.appendChild(e)}else if(this.separatorIconName){let e=document.createElement(`pkt-icon`);e.setAttribute(`name`,this.separatorIconName),e.classList.add(`pkt-tabs__separator-icon`),n.appendChild(e)}t[e].after(n)}}registerTab(e,t,n=!1){this.tabRefs[t]=e,this.disabledMap[t]=n,this.tabCount=Math.max(this.tabCount,t+1)}isTabDisabled(e){return!!this.disabledMap[e]}findEnabledIndex(e,t){let n=e+t;for(;n>=0&&n<this.tabCount;){if(!this.isTabDisabled(n))return n;n+=t}return null}handleClick(e){this.isTabDisabled(e)||this.dispatchEvent(new CustomEvent(`tab-selected`,{detail:{index:e},bubbles:!0,composed:!0}))}handleKeyUp(e,t){if(this.useArrowNav){if(e.key===`ArrowLeft`){e.preventDefault();let n=this.findEnabledIndex(t,-1);n!==null&&this.tabRefs[n]?.focus()}if(e.key===`ArrowRight`){e.preventDefault();let n=this.findEnabledIndex(t,1);n!==null&&this.tabRefs[n]?.focus()}(e.key===`Enter`||e.key===` `||e.key===`Spacebar`||e.key===`ArrowDown`)&&(e.preventDefault(),this.handleClick(t))}}render(){let n=this.useArrowNav?`tablist`:`navigation`;return e.p`
2
- <div class=${this.separatorIconName||this.separatorIconPath?`pkt-tabs pkt-tabs--with-separator`:`pkt-tabs`}>
1
+ const e=require("./element-BA8v6S7z.cjs"),t=require("./element-with-slot-Bj7nm7fO.cjs"),n=require("./if-defined-B89_ZeCj.cjs"),r=require("./consume-Le4HztPo.cjs"),i=require("./ref-CQoEIIp0.cjs");var a=r.r(Symbol(`pkt-tabs-context`)),o=class extends t.t{constructor(...e){super(...e),this.arrowNav=!0,this.disableArrowNav=!1,this.separatorIconName=``,this.separatorIconPath=``,this.tabRefs=[],this.disabledMap={},this.tabCount=0,this.context={useArrowNav:this.useArrowNav,registerTab:this.registerTab.bind(this),handleClick:this.handleClick.bind(this),handleKeyUp:this.handleKeyUp.bind(this)}}get useArrowNav(){return this.arrowNav&&!this.disableArrowNav}updated(e){(e.has(`arrowNav`)||e.has(`disableArrowNav`))&&(this.context={...this.context,useArrowNav:this.useArrowNav}),this.updateComplete.then(()=>this.syncSeparators())}syncSeparators(){let e=this.querySelector(`.pkt-tabs__list`);if(!e||(e.querySelectorAll(`.pkt-tabs__separator`).forEach(e=>e.remove()),!(this.separatorIconName||this.separatorIconPath)))return;let t=Array.from(e.children).filter(e=>!e.classList.contains(`pkt-tabs__separator`));for(let e=0;e<t.length-1;e++){let n=document.createElement(`span`);if(n.className=`pkt-tabs__separator`,n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`role`,`presentation`),this.separatorIconPath){let e=document.createElement(`img`);e.setAttribute(`src`,this.separatorIconPath),e.setAttribute(`alt`,``),e.setAttribute(`aria-hidden`,`true`),n.appendChild(e)}else if(this.separatorIconName){let e=document.createElement(`pkt-icon`);e.setAttribute(`name`,this.separatorIconName),e.classList.add(`pkt-tabs__separator-icon`),n.appendChild(e)}t[e].after(n)}}registerTab(e,t,n=!1){this.tabRefs[t]=e,this.disabledMap[t]=n,this.tabCount=Math.max(this.tabCount,t+1)}isTabDisabled(e){return!!this.disabledMap[e]}findEnabledIndex(e,t){let n=e+t;for(;n>=0&&n<this.tabCount;){if(!this.isTabDisabled(n))return n;n+=t}return null}handleClick(e){this.isTabDisabled(e)||this.dispatchEvent(new CustomEvent(`tab-selected`,{detail:{index:e},bubbles:!0,composed:!0}))}handleKeyUp(e,t){if(this.useArrowNav){if(e.key===`ArrowLeft`){e.preventDefault();let n=this.findEnabledIndex(t,-1);n!==null&&this.tabRefs[n]?.focus()}if(e.key===`ArrowRight`){e.preventDefault();let n=this.findEnabledIndex(t,1);n!==null&&this.tabRefs[n]?.focus()}(e.key===`Enter`||e.key===` `||e.key===`Spacebar`||e.key===`ArrowDown`)&&(e.preventDefault(),this.handleClick(t))}}render(){let n=this.useArrowNav?`tablist`:`navigation`,r=this.separatorIconName||this.separatorIconPath?`pkt-tabs pkt-tabs--with-separator`:`pkt-tabs`;return e.p`
2
+ <div class=${r}>
3
3
  <div class="pkt-tabs__list" role=${n}>${t.n(this)}</div>
4
4
  </div>
5
5
  `}};e.n([e.o({type:Boolean,reflect:!0,attribute:`arrow-nav`})],o.prototype,`arrowNav`,void 0),e.n([e.o({type:Boolean,reflect:!0,attribute:`disable-arrow-nav`})],o.prototype,`disableArrowNav`,void 0),e.n([e.o({type:String,reflect:!0,attribute:`separator-icon-name`})],o.prototype,`separatorIconName`,void 0),e.n([e.o({type:String,reflect:!0,attribute:`separator-icon-path`})],o.prototype,`separatorIconPath`,void 0),e.n([e.a()],o.prototype,`tabRefs`,void 0),e.n([e.a()],o.prototype,`disabledMap`,void 0),e.n([e.a()],o.prototype,`tabCount`,void 0),e.n([r.n({context:a}),e.a()],o.prototype,`context`,void 0);try{e.s(`pkt-tabs`)(o)}catch{console.warn(`Forsøker å definere <pkt-tabs>, men den er allerede definert`)}var s=class extends t.t{constructor(){super(),this.active=!1,this.disabled=!1,this.href=``,this.icon=``,this.controls=``,this.tag=``,this.tagSkin=`blue`,this.index=0,this.elementRef=i.t()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.elementRef.value&&this.context&&this.context.registerTab(this.elementRef.value,this.index,this.disabled)})}updated(){this.elementRef.value&&this.context&&this.context.registerTab(this.elementRef.value,this.index,this.disabled)}handleClick(e){if(this.disabled){e.preventDefault(),e.stopPropagation();return}this.context&&this.context.handleClick(this.index)}handleKeyDown(e){if(this.disabled&&(e.key===`Enter`||e.key===` `||e.key===`Spacebar`)){e.preventDefault(),e.stopPropagation();return}this.context&&this.context.handleKeyUp(e,this.index)}render(){let r=this.context?.useArrowNav??!0,a=this.active&&!this.disabled,o=[a?`active`:``,this.disabled?`pkt-tabs__item--disabled`:``].filter(Boolean).join(` `),s=r?`tab`:void 0,c=r?a:void 0,l=this.disabled?-1:a||!r?void 0:-1,u=`pkt-icon--small ${this.icon===`check`?`pkt-tabs__status-icon`:``}`,d=e.p`
@@ -1,8 +1,8 @@
1
- import { a as e, n as t, o as n, p as r, s as i } from "./element-BoJrqauR.js";
2
- import { n as a, t as o } from "./element-with-slot-mXLg8gg8.js";
3
- import { t as s } from "./if-defined-D0bnetLJ.js";
4
- import { n as c, r as l, t as u } from "./consume-BiOhrhEy.js";
5
- import { n as d, t as f } from "./ref-WGS0u7i2.js";
1
+ import { a as e, n as t, o as n, p as r, s as i } from "./element-ChsFgr_B.js";
2
+ import { n as a, t as o } from "./element-with-slot-BvG9ctC-.js";
3
+ import { t as s } from "./if-defined-CGzIlZ9-.js";
4
+ import { n as c, r as l, t as u } from "./consume-BDnMAp2g.js";
5
+ import { n as d, t as f } from "./ref-CWD6PjVd.js";
6
6
  //#region src/components/tabs/tabs-context.ts
7
7
  var p = l(Symbol("pkt-tabs-context")), m = class extends o {
8
8
  constructor(...e) {
@@ -75,9 +75,9 @@ var p = l(Symbol("pkt-tabs-context")), m = class extends o {
75
75
  }
76
76
  }
77
77
  render() {
78
- let e = this.useArrowNav ? "tablist" : "navigation";
78
+ let e = this.useArrowNav ? "tablist" : "navigation", t = this.separatorIconName || this.separatorIconPath ? "pkt-tabs pkt-tabs--with-separator" : "pkt-tabs";
79
79
  return r`
80
- <div class=${this.separatorIconName || this.separatorIconPath ? "pkt-tabs pkt-tabs--with-separator" : "pkt-tabs"}>
80
+ <div class=${t}>
81
81
  <div class="pkt-tabs__list" role=${e}>${a(this)}</div>
82
82
  </div>
83
83
  `;
@@ -1,4 +1,4 @@
1
- const e=require("./element-DJzurxgt.cjs"),t=require("./class-map-CCZN5uS3.cjs"),n=require("./element-with-slot-BY7Jc-q8.cjs");require("./icon-B8PVq2O6.cjs");const r=require("./if-defined-DrwbxQOj.cjs");var i={name:`pkt-tag`,react:`PktTag`,"css-class":`pkt-tag`,isElement:!0,"dark-mode":!0,props:{size:{name:`Størrelse`,description:`Størrelsen på taggen`,required:!1,default:`medium`,type:[`small`,`medium`,`large`],category:`ui`},iconName:{name:`Ikon`,description:`Navnet på ikonet som skal vises i taggen`,type:`icon`,required:!1,category:`ui`},skin:{name:`Utseende`,description:`Utseendet til taggen`,required:!1,default:`blue`,type:[`blue`,`blue-light`,`blue-dark`,`green`,`red`,`beige`,`yellow`,`gray`],category:`ui`},closeTag:{name:`Lukk tag`,description:`Skal taggen ha en lukkeknapp?`,type:`boolean`,required:!1,default:!1,category:`ui`},textStyle:{name:`Tekststil`,description:`Stilen på teksten i taggen`,required:!1,default:`normal-text`,type:[`thin-text`,`normal-text`],category:`ui`},type:{name:`Type, dersom lukkeknapp`,description:`Type tag, brukes for å spesifisere om det er en knapp, submit eller reset`,required:!1,default:`button`,type:[`button`,`submit`,`reset`],category:`tech`},ariaLabel:{name:`aria-label`,description:`aria-label for taggen, brukes for tilgjengelighet`,type:`string`,required:!1,category:`accessibility`}},slots:{default:{description:`Teksten til tag`}}},a=class extends n.t{constructor(){super(),this.closeTag=i.props.closeTag.default,this.size=i.props.size.default,this.skin=i.props.skin.default,this.textStyle=null,this.iconName=void 0,this.type=i.props.type.default,this.ariaLabel=null,this.buttonTabindex=void 0,this._isClosed=!1,this._ariaDescription=null,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent(`close`,{detail:{origin:e},bubbles:!1,composed:!0})),this.dispatchEvent(new CustomEvent(`on-close`,{detail:{origin:e},bubbles:!1,composed:!0}))},this._isClosed=!1}firstUpdated(e){if(super.firstUpdated(e),this.closeTag&&!this.ariaLabel){let e=this.querySelector(`button span, .pkt-tag > span`)?.textContent?.trim();e&&(this._ariaDescription=`Klikk for å fjerne ${e}`)}}render(){let i={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},a={"pkt-tag":!0,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,"pkt-hide":this._isClosed};return this.closeTag?e.p`
1
+ const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs"),n=require("./element-with-slot-Bj7nm7fO.cjs");require("./icon-9iwd2F2l.cjs");const r=require("./if-defined-B89_ZeCj.cjs");var i={name:`pkt-tag`,react:`PktTag`,"css-class":`pkt-tag`,isElement:!0,"dark-mode":!0,props:{size:{name:`Størrelse`,description:`Størrelsen på taggen`,required:!1,default:`medium`,type:[`small`,`medium`,`large`],category:`ui`},iconName:{name:`Ikon`,description:`Navnet på ikonet som skal vises i taggen`,type:`icon`,required:!1,category:`ui`},skin:{name:`Utseende`,description:`Utseendet til taggen`,required:!1,default:`blue`,type:[`blue`,`blue-light`,`blue-dark`,`green`,`red`,`beige`,`yellow`,`gray`],category:`ui`},closeTag:{name:`Lukk tag`,description:`Skal taggen ha en lukkeknapp?`,type:`boolean`,required:!1,default:!1,category:`ui`},textStyle:{name:`Tekststil`,description:`Stilen på teksten i taggen`,required:!1,default:`normal-text`,type:[`thin-text`,`normal-text`],category:`ui`},type:{name:`Type, dersom lukkeknapp`,description:`Type tag, brukes for å spesifisere om det er en knapp, submit eller reset`,required:!1,default:`button`,type:[`button`,`submit`,`reset`],category:`tech`},ariaLabel:{name:`aria-label`,description:`aria-label for taggen, brukes for tilgjengelighet`,type:`string`,required:!1,category:`accessibility`}},slots:{default:{description:`Teksten til tag`}}},a=class extends n.t{constructor(){super(),this.closeTag=i.props.closeTag.default,this.size=i.props.size.default,this.skin=i.props.skin.default,this.textStyle=null,this.iconName=void 0,this.type=i.props.type.default,this.ariaLabel=null,this.buttonTabindex=void 0,this._isClosed=!1,this._ariaDescription=null,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent(`close`,{detail:{origin:e},bubbles:!1,composed:!0})),this.dispatchEvent(new CustomEvent(`on-close`,{detail:{origin:e},bubbles:!1,composed:!0}))},this._isClosed=!1}firstUpdated(e){if(super.firstUpdated(e),this.closeTag&&!this.ariaLabel){let e=this.querySelector(`button span, .pkt-tag > span`)?.textContent?.trim();e&&(this._ariaDescription=`Klikk for å fjerne ${e}`)}}render(){let i={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},a={"pkt-tag":!0,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,"pkt-hide":this._isClosed};return this.closeTag?e.p`
2
2
  <button
3
3
  class=${t.t(a)}
4
4
  type=${this.type}
@@ -1,8 +1,8 @@
1
- import { a as e, n as t, o as n, p as r, s as i } from "./element-BoJrqauR.js";
2
- import { t as a } from "./class-map-CAQCRB1W.js";
3
- import { n as o, t as s } from "./element-with-slot-mXLg8gg8.js";
4
- import "./icon-DGFEIlco.js";
5
- import { t as c } from "./if-defined-D0bnetLJ.js";
1
+ import { a as e, n as t, o as n, p as r, s as i } from "./element-ChsFgr_B.js";
2
+ import { t as a } from "./class-map-CnWCnBSX.js";
3
+ import { n as o, t as s } from "./element-with-slot-BvG9ctC-.js";
4
+ import "./icon-D-LA22xD.js";
5
+ import { t as c } from "./if-defined-CGzIlZ9-.js";
6
6
  var l = {
7
7
  name: "pkt-tag",
8
8
  react: "PktTag",
@@ -0,0 +1,49 @@
1
+ const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs"),n=require("./directive-helpers-BlAV5EQD.cjs"),r=require("./element-with-slot-Bj7nm7fO.cjs");require("./icon-9iwd2F2l.cjs");const i=require("./if-defined-B89_ZeCj.cjs"),a=require("./ref-CQoEIIp0.cjs"),o=require("./input-element-DYmQw-fH.cjs"),s=require("./input-wrapper-Q-B-aBeb.cjs");var c=e.c(class extends e.l{constructor(t){if(super(t),t.type!==e.u.PROPERTY&&t.type!==e.u.ATTRIBUTE&&t.type!==e.u.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!n.i(t))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(t,[r]){if(r===e.f||r===e.d)return r;let i=t.element,a=t.name;if(t.type===e.u.PROPERTY){if(r===i[a])return e.f}else if(t.type===e.u.BOOLEAN_ATTRIBUTE){if(!!r===i.hasAttribute(a))return e.f}else if(t.type===e.u.ATTRIBUTE&&i.getAttribute(a)===r+``)return e.f;return n.r(t),r}}),l=class extends o.t{constructor(...e){super(...e),this.inputRef=a.t(),this.value=``,this.autocomplete=`off`,this.rows=null,this.cols=null,this.counterCurrent=0}attributeChangedCallback(e,t,n){e===`value`&&this.value!==t&&(this.counterCurrent=n?n.length:0),super.attributeChangedCallback(e,t,n)}updated(e){super.updated(e),this.classList.add(`pkt-textinput`,`pkt-textarea`),e.has(`value`)&&(this.counterCurrent=this.value?.length||0,this.valueChanged(this.value,e.get(`value`))),e.has(`id`)&&!this.name&&this.id&&(this.name=this.id)}render(){let n=this.effectiveCounter(this.counterMaxLength>0),o=t.t({"pkt-input":!0,[`pkt-input--${this.inputSize}`]:!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":n&&this.counterMaxLength>0&&this.value.length>this.counterMaxLength}),l=this.ariaLabelledby||`${this.id}-input-label`;return e.p`<pkt-input-wrapper
2
+ label=${this.label}
3
+ ?counter=${n}
4
+ ?hasFieldset=${this.effectiveHasFieldset(!1)}
5
+ ?disabled=${this.disabled}
6
+ ?hasError=${this.hasError}
7
+ ?inline=${this.inline}
8
+ ?optionalTag=${this.optionalTag}
9
+ ?required=${this.required}
10
+ ?requiredTag=${this.requiredTag}
11
+ useWrapper=${this.useWrapper}
12
+ .ariaDescribedby=${this.ariaDescribedby}
13
+ .counterCurrent=${this.value?.length??0}
14
+ .counterMaxLength=${this.counterMaxLength}
15
+ .errorMessage=${this.errorMessage}
16
+ .forId="${this.id+`-input`}"
17
+ .helptext=${this.helptext}
18
+ .helptextDropdown=${this.helptextDropdown}
19
+ .helptextDropdownButton=${this.helptextDropdownButton}
20
+ .optionalText=${this.optionalText}
21
+ .requiredText=${this.requiredText}
22
+ .tagText=${this.tagText}
23
+ .size=${this.inputSize}
24
+ >
25
+ <div class="pkt-contents" slot="helptext">${r.n(this,`helptext`)}</div>
26
+ <textarea
27
+ ${a.n(this.inputRef)}
28
+ class=${o}
29
+ id=${this.id+`-input`}
30
+ name=${(this.name||this.id)+`-input`}
31
+ placeholder=${i.t(this.placeholder)}
32
+ .value=${c(this.value)}
33
+ minlength=${i.t(this.minlength)}
34
+ maxlength=${i.t(this.maxlength)}
35
+ ?readonly=${this.readonly}
36
+ autocomplete=${this.autocomplete}
37
+ aria-labelledby=${l}
38
+ aria-invalid=${this.hasError}
39
+ aria-errormessage=${i.t(this.hasError?`${this.id}-input-error`:void 0)}
40
+ aria-describedby=${i.t(s.r({id:this.id+`-input`,hasHelptext:!!this.helptext,hasCounter:n,ariaDescribedby:this.ariaDescribedby}))}
41
+ rows=${i.t(this.rows??void 0)}
42
+ cols=${i.t(this.cols??void 0)}
43
+ ?disabled=${this.disabled}
44
+ @input=${e=>{this.value=e.target.value,this.onInput(),e.stopImmediatePropagation()}}
45
+ @change=${e=>{e.stopImmediatePropagation()}}
46
+ @focus=${e=>{this.onFocus(),e.stopImmediatePropagation()}}
47
+ @blur=${e=>{this.value=e.target.value,this.onBlur(),e.stopImmediatePropagation()}}
48
+ ></textarea>
49
+ </pkt-input-wrapper>`}};e.n([e.o({type:String,reflect:!0})],l.prototype,`value`,void 0),e.n([e.o({type:String})],l.prototype,`autocomplete`,void 0),e.n([e.o({type:Number})],l.prototype,`rows`,void 0),e.n([e.o({type:Number})],l.prototype,`cols`,void 0),e.n([e.a()],l.prototype,`counterCurrent`,void 0);try{e.s(`pkt-textarea`)(l)}catch{console.warn(`Forsøker å definere <pkt-textarea>, men den er allerede definert`)}var u=l;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return u}});