@oslokommune/punkt-elements 17.1.3 → 18.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/{accordion-BeLvLPrB.js → accordion-CcUosZjL.js} +27 -27
  3. package/dist/{accordion-B3GBlvUC.cjs → accordion-k0pWTG1X.cjs} +5 -5
  4. package/dist/alert-BD8YVKia.cjs +35 -0
  5. package/dist/{alert-DKK_Tb9J.js → alert-Bmaly2Yo.js} +57 -52
  6. package/dist/{async-directive-BPf6K-V2.js → async-directive-COqx0IYj.js} +5 -5
  7. package/dist/{async-directive-Da7TJpnq.cjs → async-directive-DN2eg9gA.cjs} +1 -1
  8. package/dist/{backlink-D1y26pj3.js → backlink-C_ZO-ZbR.js} +9 -9
  9. package/dist/{backlink-CMmrKTe4.cjs → backlink-Ch64Pivx.cjs} +3 -3
  10. package/dist/base-elements/element.d.ts +13 -1
  11. package/dist/base-elements/input-element.d.ts +4 -2
  12. package/dist/{breadcrumbs-CcTQ3Grm.js → breadcrumbs-CF_gAbUk.js} +16 -16
  13. package/dist/{breadcrumbs-B6JGhJgC.cjs → breadcrumbs-CzzbardP.cjs} +7 -7
  14. package/dist/{button-2-OSPJkj.js → button-C1CQSASU.js} +28 -28
  15. package/dist/{button-CE97NQIk.cjs → button-CF3dNKeI.cjs} +7 -7
  16. package/dist/{calendar-kn4SrtJy.cjs → calendar-BxF81kB9.cjs} +28 -27
  17. package/dist/{calendar-pOW3R5Pw.js → calendar-DRmxORMc.js} +82 -68
  18. package/dist/{card-CETDFkxR.cjs → card-Cg1daj05.cjs} +26 -26
  19. package/dist/{card-zQ0eKRMV.js → card-W_Jb0Tlo.js} +44 -44
  20. package/dist/{checkbox-CQNr_sEg.cjs → checkbox-BHQv8lHq.cjs} +11 -11
  21. package/dist/{checkbox-CH7NpINF.js → checkbox-BQw2dMSX.js} +23 -23
  22. package/dist/{class-map-BeimMvPv.cjs → class-map-C33ixq7O.cjs} +1 -1
  23. package/dist/{class-map-CnWCnBSX.js → class-map-wh4Yi3oj.js} +3 -3
  24. package/dist/{combobox-Bvg0UO9w.cjs → combobox-BpZow9OU.cjs} +19 -18
  25. package/dist/{combobox-CRdYYlxu.js → combobox-C9wwnUfM.js} +55 -54
  26. package/dist/components/accordion/accordion.d.ts +2 -6
  27. package/dist/components/accordion/accordionitem.d.ts +2 -8
  28. package/dist/components/alert/alert.d.ts +2 -2
  29. package/dist/components/backlink/backlink.d.ts +4 -5
  30. package/dist/components/backlink/backlink.test.d.ts +1 -1
  31. package/dist/components/breadcrumbs/breadcrumbs.d.ts +6 -7
  32. package/dist/components/breadcrumbs/index.d.ts +1 -1
  33. package/dist/components/calendar/calendar.d.ts +21 -6
  34. package/dist/components/checkbox/checkbox.d.ts +4 -2
  35. package/dist/components/combobox/combobox-base.d.ts +2 -1
  36. package/dist/components/consent/strings.d.ts +1 -85
  37. package/dist/components/datepicker/datepicker-base.d.ts +0 -3
  38. package/dist/components/datepicker/datepicker-multiple.d.ts +0 -2
  39. package/dist/components/datepicker/datepicker-range.d.ts +0 -2
  40. package/dist/components/datepicker/datepicker-single.d.ts +0 -2
  41. package/dist/components/datepicker/datepicker-utils.d.ts +2 -1
  42. package/dist/components/fileupload/fileupload-base.d.ts +7 -4
  43. package/dist/components/fileupload/fileupload-types.d.ts +5 -43
  44. package/dist/components/header/header-service.d.ts +3 -1
  45. package/dist/components/header/header.d.ts +2 -1
  46. package/dist/components/helptext/helptext.d.ts +2 -1
  47. package/dist/components/index.d.ts +3 -1
  48. package/dist/components/input-wrapper/input-wrapper.d.ts +4 -2
  49. package/dist/components/radiobutton/radiobutton.d.ts +4 -2
  50. package/dist/components/searchinput/searchinput.d.ts +2 -1
  51. package/dist/{consent-CyY3RyoC.cjs → consent-CPtr7cBw.cjs} +5 -5
  52. package/dist/{consent-DZEkhgJ1.js → consent-D8MrqGKk.js} +10 -10
  53. package/dist/controllers/strings-controller.d.ts +27 -0
  54. package/dist/{datepicker-ButIas85.js → datepicker-D4YnAtWG.js} +104 -104
  55. package/dist/{datepicker-VTqSDQk5.cjs → datepicker-DaoumZT9.cjs} +38 -37
  56. package/dist/define-component-spec-BYOSeplU.js +6 -0
  57. package/dist/define-component-spec-DBNd2FJY.cjs +1 -0
  58. package/dist/{directive-helpers-CI8YZqku.js → directive-helpers-BWSAVe00.js} +1 -1
  59. package/dist/{directive-helpers-BlAV5EQD.cjs → directive-helpers-C6J4AkFk.cjs} +1 -1
  60. package/dist/docs/components/alert.d.ts +2 -3
  61. package/dist/docs/components/fileupload.d.ts +1 -0
  62. package/dist/element-DiFhBcIl.cjs +2 -0
  63. package/dist/{element-ChsFgr_B.js → element-WEzISABa.js} +241 -100
  64. package/dist/{element-with-slot-BvG9ctC-.js → element-with-slot-BKYUx4gb.js} +4 -4
  65. package/dist/{element-with-slot-Bj7nm7fO.cjs → element-with-slot-CBK4zrdN.cjs} +1 -1
  66. package/dist/{fileupload-D5IQ9HDe.js → fileupload-DEHSETw0.js} +340 -652
  67. package/dist/fileupload-DWu6FIMv.cjs +402 -0
  68. package/dist/{footer-DrR64HiK.js → footer-BJLEw6Ab.js} +91 -91
  69. package/dist/{footer-DbYQUYNR.cjs → footer-D_yYWkQ6.cjs} +32 -32
  70. package/dist/format-B8meU8Tm.cjs +1 -0
  71. package/dist/format-BTeSVkED.js +18 -0
  72. package/dist/{header-ClgIac6n.cjs → header-B7_4Cwaq.cjs} +84 -84
  73. package/dist/{header-KvJ1mGwA.js → header-DLVq7-dM.js} +267 -264
  74. package/dist/{header-menu-hVPXsb8g.js → header-menu-BsrrTjpT.js} +75 -75
  75. package/dist/{header-menu-BAsUNKSx.cjs → header-menu-m7nOOC1g.cjs} +24 -24
  76. package/dist/{heading-g-_IUB5T.js → heading-DSArgrDK.js} +16 -16
  77. package/dist/{heading-CFmiSuCQ.cjs → heading-_RPw2UW9.cjs} +1 -1
  78. package/dist/helptext-QMVsW5g6.cjs +27 -0
  79. package/dist/{helptext-DZng1D5i.js → helptext-dtVVufNH.js} +18 -19
  80. package/dist/{icon-D-LA22xD.js → icon-DEtOSWRK.js} +17 -17
  81. package/dist/{icon-9iwd2F2l.cjs → icon-DIavy2cB.cjs} +1 -1
  82. package/dist/{if-defined-CGzIlZ9-.js → if-defined-BmnvvxtR.js} +1 -1
  83. package/dist/if-defined-Dc3xFDaM.cjs +1 -0
  84. package/dist/input-element-DQY1Rpbp.cjs +1 -0
  85. package/dist/{input-element-DBMNBplu.js → input-element-IBypGOaV.js} +121 -120
  86. package/dist/input-wrapper-CQgAL1Br.js +308 -0
  87. package/dist/input-wrapper-mJZLVXy_.cjs +58 -0
  88. package/dist/link-DwLeY37f.js +131 -0
  89. package/dist/link-yk4IXDWm.cjs +7 -0
  90. package/dist/linkcard-BinKnxQF.cjs +13 -0
  91. package/dist/{linkcard-zqbg7Oqm.js → linkcard-D5DXpmXI.js} +16 -16
  92. package/dist/{listbox-Dc4rGdPi.cjs → listbox-C5zTRNAO.cjs} +15 -15
  93. package/dist/{listbox-va_E8afs.js → listbox-C8ooO8qZ.js} +100 -99
  94. package/dist/{loader-D_RDICnw.js → loader-C3HyayzL.js} +14 -14
  95. package/dist/{loader-CMUkVJmE.cjs → loader-DHF7M5Vn.cjs} +5 -5
  96. package/dist/{messagebox-Cv8LaSxv.cjs → messagebox-DqYf6VmQ.cjs} +5 -5
  97. package/dist/{messagebox-Cw-OWDya.js → messagebox-u8i3R5QA.js} +15 -15
  98. package/dist/{modal-BtInv031.cjs → modal-CnJ9y2TQ.cjs} +8 -8
  99. package/dist/{modal-D0t_X2dX.js → modal-V-jEe0aY.js} +20 -20
  100. package/dist/pkt-accordion.cjs +1 -1
  101. package/dist/pkt-accordion.js +1 -1
  102. package/dist/pkt-alert.cjs +1 -1
  103. package/dist/pkt-alert.js +1 -1
  104. package/dist/pkt-backlink.cjs +1 -1
  105. package/dist/pkt-backlink.js +1 -1
  106. package/dist/pkt-breadcrumbs.cjs +1 -1
  107. package/dist/pkt-breadcrumbs.js +1 -1
  108. package/dist/pkt-button.cjs +1 -1
  109. package/dist/pkt-button.js +1 -1
  110. package/dist/pkt-calendar.cjs +1 -1
  111. package/dist/pkt-calendar.js +1 -1
  112. package/dist/pkt-card.cjs +1 -1
  113. package/dist/pkt-card.js +1 -1
  114. package/dist/pkt-checkbox.cjs +1 -1
  115. package/dist/pkt-checkbox.js +1 -1
  116. package/dist/pkt-combobox.cjs +1 -1
  117. package/dist/pkt-combobox.js +1 -1
  118. package/dist/pkt-consent.cjs +1 -1
  119. package/dist/pkt-consent.js +1 -1
  120. package/dist/pkt-datepicker.cjs +1 -1
  121. package/dist/pkt-datepicker.js +1 -1
  122. package/dist/pkt-fileupload.cjs +1 -1
  123. package/dist/pkt-fileupload.js +1 -1
  124. package/dist/pkt-footer.cjs +1 -1
  125. package/dist/pkt-footer.js +1 -1
  126. package/dist/pkt-header-menu.cjs +1 -1
  127. package/dist/pkt-header-menu.js +1 -1
  128. package/dist/pkt-header.cjs +1 -1
  129. package/dist/pkt-header.js +1 -1
  130. package/dist/pkt-heading.cjs +1 -1
  131. package/dist/pkt-heading.js +1 -1
  132. package/dist/pkt-helptext.cjs +1 -1
  133. package/dist/pkt-helptext.js +1 -1
  134. package/dist/pkt-icon.cjs +1 -1
  135. package/dist/pkt-icon.js +1 -1
  136. package/dist/pkt-index.cjs +1 -1
  137. package/dist/pkt-index.js +35 -34
  138. package/dist/pkt-input-wrapper.cjs +1 -1
  139. package/dist/pkt-input-wrapper.js +1 -1
  140. package/dist/pkt-link.cjs +1 -1
  141. package/dist/pkt-link.js +1 -1
  142. package/dist/pkt-linkcard.cjs +1 -1
  143. package/dist/pkt-linkcard.js +1 -1
  144. package/dist/pkt-listbox.cjs +1 -1
  145. package/dist/pkt-listbox.js +1 -1
  146. package/dist/pkt-loader.cjs +1 -1
  147. package/dist/pkt-loader.js +1 -1
  148. package/dist/pkt-messagebox.cjs +1 -1
  149. package/dist/pkt-messagebox.js +1 -1
  150. package/dist/pkt-modal.cjs +1 -1
  151. package/dist/pkt-modal.js +1 -1
  152. package/dist/{pkt-options-controller-C5EBX2T0.cjs → pkt-options-controller-BhMNCWcc.cjs} +1 -1
  153. package/dist/{pkt-options-controller-B77vH3PE.js → pkt-options-controller-CuQ6SClv.js} +1 -1
  154. package/dist/pkt-progressbar.cjs +1 -1
  155. package/dist/pkt-progressbar.js +1 -1
  156. package/dist/pkt-radiobutton.cjs +1 -1
  157. package/dist/pkt-radiobutton.js +1 -1
  158. package/dist/pkt-searchinput.cjs +1 -1
  159. package/dist/pkt-searchinput.js +1 -1
  160. package/dist/pkt-select.cjs +1 -1
  161. package/dist/pkt-select.js +1 -1
  162. package/dist/pkt-tabs.cjs +1 -1
  163. package/dist/pkt-tabs.js +1 -1
  164. package/dist/pkt-tag.cjs +1 -1
  165. package/dist/pkt-tag.js +1 -1
  166. package/dist/pkt-textarea.cjs +1 -1
  167. package/dist/pkt-textarea.js +1 -1
  168. package/dist/pkt-textinput.cjs +1 -1
  169. package/dist/pkt-textinput.js +1 -1
  170. package/dist/pkt-timepicker.cjs +1 -1
  171. package/dist/pkt-timepicker.js +1 -1
  172. package/dist/{progressbar-CbcfLerF.js → progressbar-DS4i8IWq.js} +21 -21
  173. package/dist/{progressbar-D5MmnQId.cjs → progressbar-DY5hxImR.cjs} +5 -5
  174. package/dist/{radiobutton-BUnf3EPi.js → radiobutton-BhvZztMZ.js} +24 -24
  175. package/dist/{radiobutton-DpsO1F-8.cjs → radiobutton-BswqwRnA.cjs} +8 -8
  176. package/dist/{ref-CQoEIIp0.cjs → ref-DZmN5Qgj.cjs} +1 -1
  177. package/dist/{ref-CWD6PjVd.js → ref-OU8ryfP6.js} +2 -2
  178. package/dist/{repeat-sY6B7fAT.cjs → repeat-DIa_g6WL.cjs} +1 -1
  179. package/dist/{repeat-C02g7d5S.js → repeat-Dx2H127b.js} +4 -4
  180. package/dist/{searchinput-DwnjsvJ1.js → searchinput-CJo1PpM7.js} +43 -43
  181. package/dist/searchinput-Cl46nW0r.cjs +60 -0
  182. package/dist/{select-DMre80qs.js → select-CBrjauXT.js} +21 -20
  183. package/dist/{select-BOJi6H6T.cjs → select-Dman8Skr.cjs} +4 -3
  184. package/dist/shared-strings/consent.d.ts +71 -0
  185. package/dist/shared-strings/format.d.ts +21 -0
  186. package/dist/shared-strings/index.d.ts +14 -0
  187. package/dist/shared-strings/nb.d.ts +121 -0
  188. package/dist/shared-strings/resolve.d.ts +12 -0
  189. package/dist/shared-strings/store.d.ts +27 -0
  190. package/dist/shared-strings/types.d.ts +40 -0
  191. package/dist/shared-types/accordion.d.ts +58 -0
  192. package/dist/shared-types/alert.d.ts +20 -0
  193. package/dist/shared-types/aria.d.ts +2 -1
  194. package/dist/shared-types/backlink.d.ts +23 -0
  195. package/dist/shared-types/breadcrumbs.d.ts +33 -0
  196. package/dist/shared-types/fileupload.d.ts +55 -28
  197. package/dist/shared-types/footer.d.ts +10 -0
  198. package/dist/shared-types/form-field.d.ts +45 -0
  199. package/dist/shared-types/header-footer.d.ts +2 -0
  200. package/dist/shared-types/index.d.ts +15 -6
  201. package/dist/shared-types/render-link.d.ts +22 -0
  202. package/dist/shared-types/skin.d.ts +2 -9
  203. package/dist/shared-utils/combobox/index.d.ts +1 -0
  204. package/dist/shared-utils/combobox/input-utils.d.ts +2 -1
  205. package/dist/shared-utils/combobox/messages.d.ts +7 -0
  206. package/dist/shared-utils/combobox/option-utils.d.ts +2 -1
  207. package/dist/shared-utils/combobox/selection-manager.d.ts +3 -2
  208. package/dist/{tabs-Cf9ai0FD.cjs → tabs-C1m5rSrR.cjs} +7 -7
  209. package/dist/{tabs-TvxgbrCF.js → tabs-Xu3mIedh.js} +32 -32
  210. package/dist/{tag-Ds6n1LIs.js → tag-Azkjhkeu.js} +33 -32
  211. package/dist/tag-BS6dDPxY.cjs +27 -0
  212. package/dist/tests/strings-override.test.d.ts +0 -0
  213. package/dist/{textarea-vfzIcXhX.js → textarea-D4qXcVGD.js} +30 -29
  214. package/dist/{textarea-BydiLM9Z.cjs → textarea-DftUkR6w.cjs} +3 -2
  215. package/dist/{textinput-DGdicNSx.cjs → textinput-Ar-1Sbqy.cjs} +13 -12
  216. package/dist/{textinput-CMP2jPP_.js → textinput-iCgwwNPU.js} +28 -27
  217. package/dist/{timepicker-ClwgYywH.js → timepicker-W6HVWtmA.js} +67 -64
  218. package/dist/timepicker-dpAF7h49.cjs +196 -0
  219. package/package.json +3 -3
  220. package/src/components/accordion/accordion.ts +2 -10
  221. package/src/components/accordion/accordionitem.ts +2 -9
  222. package/src/components/alert/alert.ts +19 -10
  223. package/src/components/backlink/backlink.test.ts +3 -3
  224. package/src/components/backlink/backlink.ts +5 -7
  225. package/src/components/breadcrumbs/breadcrumbs.ts +9 -10
  226. package/src/components/breadcrumbs/index.ts +1 -1
  227. package/src/components/calendar/calendar.ts +56 -26
  228. package/src/components/checkbox/checkbox.test.ts +0 -2
  229. package/src/components/checkbox/checkbox.ts +8 -4
  230. package/src/components/combobox/combobox-base.ts +2 -1
  231. package/src/components/combobox/combobox-value.ts +10 -9
  232. package/src/components/combobox/combobox.selection.test.ts +5 -1
  233. package/src/components/combobox/combobox.ts +4 -1
  234. package/src/components/consent/strings.ts +1 -125
  235. package/src/components/datepicker/date-tags.ts +4 -1
  236. package/src/components/datepicker/datepicker-base.ts +2 -6
  237. package/src/components/datepicker/datepicker-multiple.ts +0 -3
  238. package/src/components/datepicker/datepicker-range.ts +4 -7
  239. package/src/components/datepicker/datepicker-single.ts +0 -3
  240. package/src/components/datepicker/datepicker-utils.test.ts +5 -5
  241. package/src/components/datepicker/datepicker-utils.ts +6 -11
  242. package/src/components/datepicker/datepicker.ts +8 -1
  243. package/src/components/fileupload/fileupload-base.ts +29 -19
  244. package/src/components/fileupload/fileupload-renderers.ts +2 -1
  245. package/src/components/fileupload/fileupload-types.ts +5 -42
  246. package/src/components/fileupload/fileupload.test.ts +16 -0
  247. package/src/components/fileupload/fileupload.ts +19 -15
  248. package/src/components/header/header-global.ts +3 -3
  249. package/src/components/header/header-service.ts +13 -8
  250. package/src/components/header/header.ts +2 -1
  251. package/src/components/helptext/helptext.test.ts +1 -1
  252. package/src/components/helptext/helptext.ts +3 -3
  253. package/src/components/index.ts +10 -1
  254. package/src/components/input-wrapper/input-wrapper.ts +18 -10
  255. package/src/components/link/link.ts +8 -3
  256. package/src/components/listbox/listbox.ts +3 -3
  257. package/src/components/radiobutton/radiobutton.ts +8 -4
  258. package/src/components/searchinput/searchinput.ts +5 -3
  259. package/src/components/select/select.ts +1 -0
  260. package/src/components/tag/tag.ts +2 -1
  261. package/src/components/textarea/textarea.ts +1 -0
  262. package/src/components/textinput/textinput.ts +1 -0
  263. package/src/components/timepicker/timepicker.ts +23 -21
  264. package/dist/alert-Cs4Rmq_J.cjs +0 -33
  265. package/dist/element-BA8v6S7z.cjs +0 -2
  266. package/dist/fileupload-BeWiTAoW.cjs +0 -401
  267. package/dist/helptext-CTtKJcML.cjs +0 -27
  268. package/dist/if-defined-B89_ZeCj.cjs +0 -1
  269. package/dist/input-element-DYmQw-fH.cjs +0 -1
  270. package/dist/input-wrapper-BmxNvznr.js +0 -128
  271. package/dist/input-wrapper-D-fPaTbY.js +0 -176
  272. package/dist/input-wrapper-D5PR0rJn.cjs +0 -1
  273. package/dist/input-wrapper-Q-B-aBeb.cjs +0 -54
  274. package/dist/link-D-Eqm5KH.js +0 -98
  275. package/dist/link-DK7gvmnj.cjs +0 -7
  276. package/dist/linkcard-B29cmZqh.cjs +0 -13
  277. package/dist/searchinput-Bh975rjX.cjs +0 -60
  278. package/dist/tag-CzojNU7z.cjs +0 -27
  279. package/dist/timepicker-DYrnLHqN.cjs +0 -195
  280. package/dist/translations/no.json.d.ts +0 -94
package/CHANGELOG.md CHANGED
@@ -5,6 +5,41 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [18.1.0](https://github.com/oslokommune/punkt/compare/18.0.0...18.1.0) (2026-08-31)
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+ Ingen
12
+
13
+ ### Features
14
+ Ingen
15
+
16
+ ### Bug Fixes
17
+ Ingen
18
+
19
+ ### Chores
20
+ Ingen
21
+
22
+ ---
23
+
24
+
25
+ ## [18.0.0](https://github.com/oslokommune/punkt/compare/17.1.3...18.0.0) (2026-08-27)
26
+
27
+ ### ⚠ BREAKING CHANGES
28
+ * Ny `shared-strings` og metoder for å overstyre strenger i komponenter (#3610). BREAKING CHANGE: **`strings`-propertyen på Elements** betyr nå "delvis overstyring" i stedet for "hele no.json".
29
+
30
+
31
+ ### Features
32
+ Ingen
33
+
34
+ ### Bug Fixes
35
+ Ingen
36
+
37
+ ### Chores
38
+ Ingen
39
+
40
+ ---
41
+
42
+
8
43
  ## [17.1.3](https://github.com/oslokommune/punkt/compare/17.1.2...17.1.3) (2026-08-25)
9
44
 
10
45
  ### ⚠ BREAKING CHANGES
@@ -1,9 +1,9 @@
1
- import { a as e, i as t, n, o as r, p as i, s as a } from "./element-ChsFgr_B.js";
2
- import { t as o } from "./class-map-CnWCnBSX.js";
3
- import { n as s, t as c } from "./element-with-slot-BvG9ctC-.js";
4
- import { t as l } from "./if-defined-CGzIlZ9-.js";
1
+ import { _ as e, c as t, d as n, l as r, n as i, u as a } from "./element-WEzISABa.js";
2
+ import { t as o } from "./class-map-wh4Yi3oj.js";
3
+ import { n as s, t as c } from "./element-with-slot-BKYUx4gb.js";
4
+ import { t as l } from "./if-defined-BmnvvxtR.js";
5
5
  import { n as u, r as d, t as f } from "./consume-BDnMAp2g.js";
6
- import { n as p, t as m } from "./ref-CWD6PjVd.js";
6
+ import { n as p, t as m } from "./ref-OU8ryfP6.js";
7
7
  //#region src/components/accordion/accordion-context.ts
8
8
  var h = d(Symbol("pkt-accordion-context")), g = class extends t {
9
9
  constructor(...e) {
@@ -33,15 +33,15 @@ var h = d(Symbol("pkt-accordion-context")), g = class extends t {
33
33
  });
34
34
  }
35
35
  render() {
36
- let e = {
36
+ let t = {
37
37
  "pkt-accordion": !0,
38
38
  "pkt-accordion--compact": this.compact,
39
39
  [`pkt-accordion--${this.skin}`]: this.skin
40
40
  };
41
- return i`
41
+ return e`
42
42
  <div
43
43
  part="container"
44
- class=${o(e)}
44
+ class=${o(t)}
45
45
  data-testid="pkt-accordion"
46
46
  aria-labelledby=${this.ariaLabelledBy}
47
47
  >
@@ -50,25 +50,25 @@ var h = d(Symbol("pkt-accordion-context")), g = class extends t {
50
50
  `;
51
51
  }
52
52
  };
53
- n([r({
53
+ i([a({
54
54
  type: String,
55
55
  reflect: !0,
56
56
  attribute: "aria-labelledby"
57
- })], g.prototype, "ariaLabelledBy", void 0), n([r({
57
+ })], g.prototype, "ariaLabelledBy", void 0), i([a({
58
58
  type: Boolean,
59
59
  reflect: !0,
60
60
  attribute: "compact"
61
- })], g.prototype, "compact", void 0), n([r({
61
+ })], g.prototype, "compact", void 0), i([a({
62
62
  type: String,
63
63
  reflect: !0,
64
64
  attribute: "skin"
65
- })], g.prototype, "skin", void 0), n([r({
65
+ })], g.prototype, "skin", void 0), i([a({
66
66
  type: String,
67
67
  reflect: !0,
68
68
  attribute: "name"
69
- })], g.prototype, "name", void 0), n([u({ context: h }), e()], g.prototype, "context", void 0);
69
+ })], g.prototype, "name", void 0), i([u({ context: h }), r()], g.prototype, "context", void 0);
70
70
  try {
71
- a("pkt-accordion")(g);
71
+ n("pkt-accordion")(g);
72
72
  } catch {
73
73
  console.warn("Forsøker å definere <pkt-accordion>, men den er allerede definert");
74
74
  }
@@ -82,14 +82,14 @@ var _ = class extends c {
82
82
  this.defaultOpen && (this.isOpen = !0);
83
83
  }
84
84
  render() {
85
- let e = {
85
+ let t = {
86
86
  "pkt-accordion-item": !0,
87
87
  "pkt-accordion-item--compact": this.compact,
88
88
  [`pkt-accordion-item--${this.skin}`]: !!this.skin
89
- }, t = (this.skin ?? this.context?.skin) === "plus-minus";
90
- return i`
89
+ }, n = (this.skin ?? this.context?.skin) === "plus-minus";
90
+ return e`
91
91
  <details
92
- class=${o(e)}
92
+ class=${o(t)}
93
93
  id=${this.id}
94
94
  ?open=${this.isOpen}
95
95
  ${p(this.accordionItemRef)}
@@ -97,7 +97,7 @@ var _ = class extends c {
97
97
  >
98
98
  <summary class="pkt-accordion-item__title" id=${`pkt-accordion-item-summary-${this.id}`}>
99
99
  ${this.title}
100
- ${t ? i`
100
+ ${n ? e`
101
101
  <pkt-icon
102
102
  name="plus-sign"
103
103
  class="pkt-accordion-item__icon pkt-accordion-item__icon--plus"
@@ -108,7 +108,7 @@ var _ = class extends c {
108
108
  class="pkt-accordion-item__icon pkt-accordion-item__icon--minus"
109
109
  aria-hidden="true"
110
110
  ></pkt-icon>
111
- ` : i`
111
+ ` : e`
112
112
  <pkt-icon
113
113
  name="chevron-thin-down"
114
114
  class="pkt-accordion-item__icon"
@@ -127,24 +127,24 @@ var _ = class extends c {
127
127
  `;
128
128
  }
129
129
  };
130
- n([r({ type: Boolean })], _.prototype, "defaultOpen", void 0), n([r({ type: String })], _.prototype, "title", void 0), n([r({
130
+ i([a({ type: Boolean })], _.prototype, "defaultOpen", void 0), i([a({ type: String })], _.prototype, "title", void 0), i([a({
131
131
  type: String,
132
132
  reflect: !0
133
- })], _.prototype, "skin", void 0), n([r({
133
+ })], _.prototype, "skin", void 0), i([a({
134
134
  type: Boolean,
135
135
  reflect: !0
136
- })], _.prototype, "compact", void 0), n([r({
136
+ })], _.prototype, "compact", void 0), i([a({
137
137
  type: Boolean,
138
138
  reflect: !0
139
- })], _.prototype, "isOpen", void 0), n([r({
139
+ })], _.prototype, "isOpen", void 0), i([a({
140
140
  type: String,
141
141
  reflect: !0
142
- })], _.prototype, "name", void 0), n([f({
142
+ })], _.prototype, "name", void 0), i([f({
143
143
  context: h,
144
144
  subscribe: !0
145
- }), r({ attribute: !1 })], _.prototype, "context", void 0);
145
+ }), a({ attribute: !1 })], _.prototype, "context", void 0);
146
146
  try {
147
- a("pkt-accordion-item")(_);
147
+ n("pkt-accordion-item")(_);
148
148
  } catch {
149
149
  console.warn("Forsøker å definere <pkt-accordion-item>, men den er allerede definert");
150
150
  }
@@ -1,4 +1,4 @@
1
- const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs"),n=require("./element-with-slot-Bj7nm7fO.cjs"),r=require("./if-defined-B89_ZeCj.cjs"),i=require("./consume-Le4HztPo.cjs"),a=require("./ref-CQoEIIp0.cjs");var o=i.r(Symbol(`pkt-accordion-context`)),s=class extends e.i{constructor(...e){super(...e),this.ariaLabelledBy=``,this.compact=!1,this.skin=`borderless`,this.name=``,this.context={skin:this.skin}}willUpdate(e){e.has(`skin`)&&(this.context={...this.context,skin:this.skin})}updated(e){e.has(`name`)&&this.updateAccordionItemNames()}updateAccordionItemNames(){if(this.name){let e=this.renderRoot?.querySelector(`slot`);e&&e.assignedElements().forEach(e=>{e.tagName.toLowerCase()===`pkt-accordion-item`&&(e.hasAttribute(`name`)||e.setAttribute(`name`,this.name))})}}firstUpdated(){let e=this.renderRoot?.querySelector(`slot`);e&&e.addEventListener(`slotchange`,()=>{this.updateAccordionItemNames()})}render(){let n={"pkt-accordion":!0,"pkt-accordion--compact":this.compact,[`pkt-accordion--${this.skin}`]:this.skin};return e.p`
1
+ const e=require("./element-DiFhBcIl.cjs"),t=require("./class-map-C33ixq7O.cjs"),n=require("./element-with-slot-CBK4zrdN.cjs"),r=require("./if-defined-Dc3xFDaM.cjs"),i=require("./consume-Le4HztPo.cjs"),a=require("./ref-DZmN5Qgj.cjs");var o=i.r(Symbol(`pkt-accordion-context`)),s=class extends e.c{constructor(...e){super(...e),this.ariaLabelledBy=``,this.compact=!1,this.skin=`borderless`,this.name=``,this.context={skin:this.skin}}willUpdate(e){e.has(`skin`)&&(this.context={...this.context,skin:this.skin})}updated(e){e.has(`name`)&&this.updateAccordionItemNames()}updateAccordionItemNames(){if(this.name){let e=this.renderRoot?.querySelector(`slot`);e&&e.assignedElements().forEach(e=>{e.tagName.toLowerCase()===`pkt-accordion-item`&&(e.hasAttribute(`name`)||e.setAttribute(`name`,this.name))})}}firstUpdated(){let e=this.renderRoot?.querySelector(`slot`);e&&e.addEventListener(`slotchange`,()=>{this.updateAccordionItemNames()})}render(){let n={"pkt-accordion":!0,"pkt-accordion--compact":this.compact,[`pkt-accordion--${this.skin}`]:this.skin};return e._`
2
2
  <div
3
3
  part="container"
4
4
  class=${t.t(n)}
@@ -7,7 +7,7 @@ const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs"),
7
7
  >
8
8
  <slot></slot>
9
9
  </div>
10
- `}};e.n([e.o({type:String,reflect:!0,attribute:`aria-labelledby`})],s.prototype,`ariaLabelledBy`,void 0),e.n([e.o({type:Boolean,reflect:!0,attribute:`compact`})],s.prototype,`compact`,void 0),e.n([e.o({type:String,reflect:!0,attribute:`skin`})],s.prototype,`skin`,void 0),e.n([e.o({type:String,reflect:!0,attribute:`name`})],s.prototype,`name`,void 0),e.n([i.n({context:o}),e.a()],s.prototype,`context`,void 0);try{e.s(`pkt-accordion`)(s)}catch{console.warn(`Forsøker å definere <pkt-accordion>, men den er allerede definert`)}var c=class extends n.t{constructor(){super(),this.defaultOpen=!1,this.title=``,this.skin=void 0,this.compact=!1,this.isOpen=!1,this.name=void 0,this.accordionItemRef=a.t()}firstUpdated(e){this.defaultOpen&&(this.isOpen=!0)}render(){let i={"pkt-accordion-item":!0,"pkt-accordion-item--compact":this.compact,[`pkt-accordion-item--${this.skin}`]:!!this.skin},o=(this.skin??this.context?.skin)===`plus-minus`;return e.p`
10
+ `}};e.n([e.u({type:String,reflect:!0,attribute:`aria-labelledby`})],s.prototype,`ariaLabelledBy`,void 0),e.n([e.u({type:Boolean,reflect:!0,attribute:`compact`})],s.prototype,`compact`,void 0),e.n([e.u({type:String,reflect:!0,attribute:`skin`})],s.prototype,`skin`,void 0),e.n([e.u({type:String,reflect:!0,attribute:`name`})],s.prototype,`name`,void 0),e.n([i.n({context:o}),e.l()],s.prototype,`context`,void 0);try{e.d(`pkt-accordion`)(s)}catch{console.warn(`Forsøker å definere <pkt-accordion>, men den er allerede definert`)}var c=class extends n.t{constructor(){super(),this.defaultOpen=!1,this.title=``,this.skin=void 0,this.compact=!1,this.isOpen=!1,this.name=void 0,this.accordionItemRef=a.t()}firstUpdated(e){this.defaultOpen&&(this.isOpen=!0)}render(){let i={"pkt-accordion-item":!0,"pkt-accordion-item--compact":this.compact,[`pkt-accordion-item--${this.skin}`]:!!this.skin},o=(this.skin??this.context?.skin)===`plus-minus`;return e._`
11
11
  <details
12
12
  class=${t.t(i)}
13
13
  id=${this.id}
@@ -17,7 +17,7 @@ const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs"),
17
17
  >
18
18
  <summary class="pkt-accordion-item__title" id=${`pkt-accordion-item-summary-${this.id}`}>
19
19
  ${this.title}
20
- ${o?e.p`
20
+ ${o?e._`
21
21
  <pkt-icon
22
22
  name="plus-sign"
23
23
  class="pkt-accordion-item__icon pkt-accordion-item__icon--plus"
@@ -28,7 +28,7 @@ const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs"),
28
28
  class="pkt-accordion-item__icon pkt-accordion-item__icon--minus"
29
29
  aria-hidden="true"
30
30
  ></pkt-icon>
31
- `:e.p`
31
+ `:e._`
32
32
  <pkt-icon
33
33
  name="chevron-thin-down"
34
34
  class="pkt-accordion-item__icon"
@@ -44,4 +44,4 @@ const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs"),
44
44
  <div class="pkt-accordion-item__content-inner">${n.n(this)}</div>
45
45
  </div>
46
46
  </details>
47
- `}};e.n([e.o({type:Boolean})],c.prototype,`defaultOpen`,void 0),e.n([e.o({type:String})],c.prototype,`title`,void 0),e.n([e.o({type:String,reflect:!0})],c.prototype,`skin`,void 0),e.n([e.o({type:Boolean,reflect:!0})],c.prototype,`compact`,void 0),e.n([e.o({type:Boolean,reflect:!0})],c.prototype,`isOpen`,void 0),e.n([e.o({type:String,reflect:!0})],c.prototype,`name`,void 0),e.n([i.t({context:o,subscribe:!0}),e.o({attribute:!1})],c.prototype,`context`,void 0);try{e.s(`pkt-accordion-item`)(c)}catch{console.warn(`Forsøker å definere <pkt-accordion-item>, men den er allerede definert`)}var l=s;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});
47
+ `}};e.n([e.u({type:Boolean})],c.prototype,`defaultOpen`,void 0),e.n([e.u({type:String})],c.prototype,`title`,void 0),e.n([e.u({type:String,reflect:!0})],c.prototype,`skin`,void 0),e.n([e.u({type:Boolean,reflect:!0})],c.prototype,`compact`,void 0),e.n([e.u({type:Boolean,reflect:!0})],c.prototype,`isOpen`,void 0),e.n([e.u({type:String,reflect:!0})],c.prototype,`name`,void 0),e.n([i.t({context:o,subscribe:!0}),e.u({attribute:!1})],c.prototype,`context`,void 0);try{e.d(`pkt-accordion-item`)(c)}catch{console.warn(`Forsøker å definere <pkt-accordion-item>, men den er allerede definert`)}var l=s;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});
@@ -0,0 +1,35 @@
1
+ const e=require("./element-DiFhBcIl.cjs"),t=require("./class-map-C33ixq7O.cjs"),n=require("./format-B8meU8Tm.cjs"),r=require("./element-with-slot-CBK4zrdN.cjs"),i=require("./classutils-CbklAJDe.cjs"),a=require("./define-component-spec-DBNd2FJY.cjs");require("./icon-DIavy2cB.cjs"),require("./button-CF3dNKeI.cjs");var o=[`off`,`polite`,`assertive`],s=[`info`,`success`,`warning`,`error`],c=[`medium`,`small`,`xsmall`],l=a.t({name:`pkt-alert`,react:`PktAlert`,"css-class":`pkt-alert`,"dark-mode":!0,isElement:!0,isPureReact:!0,events:{onClose:{description:`React: Klikk-event for 'Lukk'-knappen`},close:{description:`Vue: Klikk-event for 'Lukk'-knappen`}},props:{title:{name:`Tittel`,description:`Tittelen som vises øverst i på meldingen`,type:`string`,category:`contents`},skin:{name:`Utseende`,description:`Hvordan type melding er dette?`,type:[...s],default:`info`,category:`ui`},date:{name:`Sist oppdatert`,description:`Dato som vises nederst i på meldingen`,type:`string`,category:`contents`},ariaLive:{name:`aria-live`,description:`Hvordan skal skjermleseren lese opp meldingen?`,type:[...o],default:`polite`,category:`accessibility`},size:{name:`Størrelse`,description:`Endrer størrelsen på ulike elementer i alerten.`,type:[...c],default:`medium`,category:`ui`},closeAlert:{name:`Vis 'Lukk'-knapp`,description:`Viser 'Lukk'-knappen`,type:`boolean`,default:!1,category:`ui`}},slots:{default:{description:`Innholdet i meldingen`}},deprecated:{compact:{name:`Kompakt (deprecated)`,description:"Bruk `size` i stedet; uten eksplisitt `size` gir compact størrelsen 'small'.",type:`boolean`,category:`ui`,default:!1}}}),u=class extends r.t{constructor(){super(),this.compact=l.deprecated.compact.default,this.title=``,this.skin=l.props.skin.default,this.ariaLive=l.props.ariaLive.default,this.ariaLiveAttr=null,this.closeAlert=l.props.closeAlert.default,this.date=null,this.role=`status`,this._isClosed=!1,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent(`close`,{detail:{origin:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`on-close`,{detail:{origin:e},bubbles:!0,composed:!0}))},this._isClosed=!1}connectedCallback(){super.connectedCallback(),this.ariaLiveAttr=this.getAttribute(`aria-live`)||this.ariaLive}attributeChangedCallback(e,t,n){e===`ariaLive`&&(this.ariaLiveAttr=n),super.attributeChangedCallback(e,t,n)}updated(e){super.updated(e),e.has(`ariaLive`)&&(this.ariaLiveAttr=this.ariaLive),e.has(`_isClosed`)&&i.t(this,`pkt-hide`,this._isClosed)}render(){let i=this.size??(this.compact?`small`:`medium`),a={"pkt-alert":!0,[`pkt-alert--${i}`]:!0,[`pkt-alert--${this.skin}`]:!0,"pkt-hide":this._isClosed},o={"pkt-alert__grid":!0,"pkt-alert__noTitle":!this.title,"pkt-alert__noDate":!this.date};return e._`
2
+ <div class=${t.t(a)} aria-live=${this.ariaLiveAttr}>
3
+ <div class=${t.t(o)}>
4
+ <pkt-icon
5
+ class="pkt-alert__icon"
6
+ aria-hidden="true"
7
+ name=${this.skin===`info`?`alert-information`:`alert-${this.skin}`}
8
+ ></pkt-icon>
9
+
10
+ ${this.closeAlert?e._`
11
+ <div class="pkt-alert__close">
12
+ <pkt-button
13
+ tabindex="0"
14
+ aria-label="close"
15
+ size=${i}
16
+ type="button"
17
+ skin="tertiary"
18
+ iconName="close"
19
+ variant="icon-only"
20
+ @click=${this.close}
21
+ >
22
+ <span class="sr-only">${this.pktStrings.get(`generic`).close}</span>
23
+ </pkt-button>
24
+ </div>
25
+ `:e.h}
26
+ ${this.title?e._`<div class="pkt-alert__title">${this.title}</div>`:e.h}
27
+
28
+ <div class="pkt-alert__text">${r.n(this)}</div>
29
+
30
+ ${this.date?e._`<div class="pkt-alert__date">
31
+ ${n.t(this.pktStrings.get(`alert`).lastUpdated,{date:this.date})}
32
+ </div>`:e.h}
33
+ </div>
34
+ </div>
35
+ `}};e.n([e.u({type:Boolean,reflect:!1})],u.prototype,`compact`,void 0),e.n([e.u({type:String,reflect:!0})],u.prototype,`title`,void 0),e.n([e.u({type:String,reflect:!0})],u.prototype,`skin`,void 0),e.n([e.u({type:String})],u.prototype,`ariaLive`,void 0),e.n([e.u({type:String,reflect:!0,attribute:`aria-live`})],u.prototype,`ariaLiveAttr`,void 0),e.n([e.u({type:Boolean,reflect:!0})],u.prototype,`closeAlert`,void 0),e.n([e.u({type:String,reflect:!0})],u.prototype,`date`,void 0),e.n([e.u({type:String,reflect:!0})],u.prototype,`role`,void 0),e.n([e.u({type:String,attribute:`size`})],u.prototype,`size`,void 0),e.n([e.l()],u.prototype,`_isClosed`,void 0);try{e.d(`pkt-alert`)(u)}catch{console.warn(`Forsøker å definere <pkt-alert>, men den er allerede definert`)}var d=u;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return d}});
@@ -1,10 +1,26 @@
1
- import { a as e, d as t, n, o as r, p as i, s as a } from "./element-ChsFgr_B.js";
2
- import { t as o } from "./class-map-CnWCnBSX.js";
3
- import { n as s, t as c } from "./element-with-slot-BvG9ctC-.js";
4
- import { t as l } from "./classutils-DcYnSgfc.js";
5
- import "./icon-D-LA22xD.js";
6
- import "./button-2-OSPJkj.js";
7
- var u = {
1
+ import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-WEzISABa.js";
2
+ import { t as o } from "./class-map-wh4Yi3oj.js";
3
+ import { t as s } from "./format-BTeSVkED.js";
4
+ import { n as c, t as l } from "./element-with-slot-BKYUx4gb.js";
5
+ import { t as u } from "./classutils-DcYnSgfc.js";
6
+ import { t as d } from "./define-component-spec-BYOSeplU.js";
7
+ import "./icon-DEtOSWRK.js";
8
+ import "./button-C1CQSASU.js";
9
+ //#region ../../shared-types/aria.ts
10
+ var f = [
11
+ "off",
12
+ "polite",
13
+ "assertive"
14
+ ], p = [
15
+ "info",
16
+ "success",
17
+ "warning",
18
+ "error"
19
+ ], m = [
20
+ "medium",
21
+ "small",
22
+ "xsmall"
23
+ ], h = d({
8
24
  name: "pkt-alert",
9
25
  react: "PktAlert",
10
26
  "css-class": "pkt-alert",
@@ -25,12 +41,7 @@ var u = {
25
41
  skin: {
26
42
  name: "Utseende",
27
43
  description: "Hvordan type melding er dette?",
28
- type: [
29
- "info",
30
- "success",
31
- "warning",
32
- "error"
33
- ],
44
+ type: [...p],
34
45
  default: "info",
35
46
  category: "ui"
36
47
  },
@@ -43,22 +54,14 @@ var u = {
43
54
  ariaLive: {
44
55
  name: "aria-live",
45
56
  description: "Hvordan skal skjermleseren lese opp meldingen?",
46
- type: [
47
- "off",
48
- "polite",
49
- "assertive"
50
- ],
57
+ type: [...f],
51
58
  default: "polite",
52
59
  category: "accessibility"
53
60
  },
54
61
  size: {
55
62
  name: "Størrelse",
56
63
  description: "Endrer størrelsen på ulike elementer i alerten.",
57
- type: [
58
- "medium",
59
- "small",
60
- "xsmall"
61
- ],
64
+ type: [...m],
62
65
  default: "medium",
63
66
  category: "ui"
64
67
  },
@@ -73,14 +76,14 @@ var u = {
73
76
  slots: { default: { description: "Innholdet i meldingen" } },
74
77
  deprecated: { compact: {
75
78
  name: "Kompakt (deprecated)",
76
- description: "Bruk size i stedet; uten eksplisitt size gir compact størrelsen 'small'.",
79
+ description: "Bruk `size` i stedet; uten eksplisitt `size` gir compact størrelsen 'small'.",
77
80
  type: "boolean",
78
81
  category: "ui",
79
82
  default: !1
80
83
  } }
81
- }, d = class extends c {
84
+ }), g = class extends l {
82
85
  constructor() {
83
- super(), this.compact = u.deprecated.compact.default, this.title = "", this.skin = u.props.skin.default, this.ariaLive = u.props.ariaLive.default, this.ariaLiveAttr = null, this.closeAlert = u.props.closeAlert.default, this.date = null, this.role = "status", this._isClosed = !1, this.close = (e) => {
86
+ super(), this.compact = h.deprecated.compact.default, this.title = "", this.skin = h.props.skin.default, this.ariaLive = h.props.ariaLive.default, this.ariaLiveAttr = null, this.closeAlert = h.props.closeAlert.default, this.date = null, this.role = "status", this._isClosed = !1, this.close = (e) => {
84
87
  this._isClosed = !0, this.dispatchEvent(new CustomEvent("close", {
85
88
  detail: { origin: e },
86
89
  bubbles: !0,
@@ -99,87 +102,89 @@ var u = {
99
102
  e === "ariaLive" && (this.ariaLiveAttr = n), super.attributeChangedCallback(e, t, n);
100
103
  }
101
104
  updated(e) {
102
- super.updated(e), e.has("ariaLive") && (this.ariaLiveAttr = this.ariaLive), e.has("_isClosed") && l(this, "pkt-hide", this._isClosed);
105
+ super.updated(e), e.has("ariaLive") && (this.ariaLiveAttr = this.ariaLive), e.has("_isClosed") && u(this, "pkt-hide", this._isClosed);
103
106
  }
104
107
  render() {
105
- let e = this.size ?? (this.compact ? "small" : "medium"), n = {
108
+ let t = this.size ?? (this.compact ? "small" : "medium"), r = {
106
109
  "pkt-alert": !0,
107
- [`pkt-alert--${e}`]: !0,
110
+ [`pkt-alert--${t}`]: !0,
108
111
  [`pkt-alert--${this.skin}`]: !0,
109
112
  "pkt-hide": this._isClosed
110
- }, r = {
113
+ }, i = {
111
114
  "pkt-alert__grid": !0,
112
115
  "pkt-alert__noTitle": !this.title,
113
116
  "pkt-alert__noDate": !this.date
114
117
  };
115
- return i`
116
- <div class=${o(n)} aria-live=${this.ariaLiveAttr}>
117
- <div class=${o(r)}>
118
+ return e`
119
+ <div class=${o(r)} aria-live=${this.ariaLiveAttr}>
120
+ <div class=${o(i)}>
118
121
  <pkt-icon
119
122
  class="pkt-alert__icon"
120
123
  aria-hidden="true"
121
124
  name=${this.skin === "info" ? "alert-information" : `alert-${this.skin}`}
122
125
  ></pkt-icon>
123
126
 
124
- ${this.closeAlert ? i`
127
+ ${this.closeAlert ? e`
125
128
  <div class="pkt-alert__close">
126
129
  <pkt-button
127
130
  tabindex="0"
128
131
  aria-label="close"
129
- size=${e}
132
+ size=${t}
130
133
  type="button"
131
134
  skin="tertiary"
132
135
  iconName="close"
133
136
  variant="icon-only"
134
137
  @click=${this.close}
135
138
  >
136
- <span class="sr-only">Lukk</span>
139
+ <span class="sr-only">${this.pktStrings.get("generic").close}</span>
137
140
  </pkt-button>
138
141
  </div>
139
- ` : t}
140
- ${this.title ? i`<div class="pkt-alert__title">${this.title}</div>` : t}
142
+ ` : n}
143
+ ${this.title ? e`<div class="pkt-alert__title">${this.title}</div>` : n}
141
144
 
142
- <div class="pkt-alert__text">${s(this)}</div>
145
+ <div class="pkt-alert__text">${c(this)}</div>
143
146
 
144
- ${this.date ? i`<div class="pkt-alert__date">Sist oppdatert: ${this.date}</div>` : t}
147
+ ${this.date ? e`<div class="pkt-alert__date">
148
+ ${s(this.pktStrings.get("alert").lastUpdated, { date: this.date })}
149
+ </div>` : n}
145
150
  </div>
146
151
  </div>
147
152
  `;
148
153
  }
149
154
  };
150
- n([r({
155
+ i([a({
151
156
  type: Boolean,
152
157
  reflect: !1
153
- })], d.prototype, "compact", void 0), n([r({
158
+ })], g.prototype, "compact", void 0), i([a({
154
159
  type: String,
155
160
  reflect: !0
156
- })], d.prototype, "title", void 0), n([r({
161
+ })], g.prototype, "title", void 0), i([a({
157
162
  type: String,
158
163
  reflect: !0
159
- })], d.prototype, "skin", void 0), n([r({ type: String })], d.prototype, "ariaLive", void 0), n([r({
164
+ })], g.prototype, "skin", void 0), i([a({ type: String })], g.prototype, "ariaLive", void 0), i([a({
160
165
  type: String,
161
166
  reflect: !0,
162
167
  attribute: "aria-live"
163
- })], d.prototype, "ariaLiveAttr", void 0), n([r({
168
+ })], g.prototype, "ariaLiveAttr", void 0), i([a({
164
169
  type: Boolean,
165
170
  reflect: !0
166
- })], d.prototype, "closeAlert", void 0), n([r({
171
+ })], g.prototype, "closeAlert", void 0), i([a({
167
172
  type: String,
168
173
  reflect: !0
169
- })], d.prototype, "date", void 0), n([r({
174
+ })], g.prototype, "date", void 0), i([a({
170
175
  type: String,
171
176
  reflect: !0
172
- })], d.prototype, "role", void 0), n([r({
177
+ })], g.prototype, "role", void 0), i([a({
173
178
  type: String,
174
179
  attribute: "size"
175
- })], d.prototype, "size", void 0), n([e()], d.prototype, "_isClosed", void 0);
180
+ })], g.prototype, "size", void 0), i([r()], g.prototype, "_isClosed", void 0);
176
181
  try {
177
- a("pkt-alert")(d);
182
+ t("pkt-alert")(g);
178
183
  } catch {
179
184
  console.warn("Forsøker å definere <pkt-alert>, men den er allerede definert");
180
185
  }
181
186
  //#endregion
182
187
  //#region src/components/alert/index.ts
183
- var f = d;
188
+ var _ = g;
184
189
  //#endregion
185
- export { d as n, f as t };
190
+ export { g as n, _ as t };
@@ -1,5 +1,5 @@
1
- import { l as e, u as t } from "./element-ChsFgr_B.js";
2
- import { i as n } from "./directive-helpers-CI8YZqku.js";
1
+ import { m as e, p as t } from "./element-WEzISABa.js";
2
+ import { i as n } from "./directive-helpers-BWSAVe00.js";
3
3
  //#region ../../node_modules/lit-html/async-directive.js
4
4
  var r = (e, t) => {
5
5
  let n = e._$AN;
@@ -32,9 +32,9 @@ function s(e, t = !1, n = 0) {
32
32
  } else r(this, e);
33
33
  }
34
34
  }
35
- var c = (e) => {
36
- e.type == t.CHILD && (e._$AP ??= s, e._$AQ ??= o);
37
- }, l = class extends e {
35
+ var c = (t) => {
36
+ t.type == e.CHILD && (t._$AP ??= s, t._$AQ ??= o);
37
+ }, l = class extends t {
38
38
  constructor() {
39
39
  super(...arguments), this._$AN = void 0;
40
40
  }
@@ -1 +1 @@
1
- const e=require("./element-BA8v6S7z.cjs"),t=require("./directive-helpers-BlAV5EQD.cjs");var n=(e,t)=>{let r=e._$AN;if(r===void 0)return!1;for(let e of r)e._$AO?.(t,!1),n(e,t);return!0},r=e=>{let t,n;do{if((t=e._$AM)===void 0)break;n=t._$AN,n.delete(e),e=t}while(n?.size===0)},i=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(n===void 0)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),s(t)}};function a(e){this._$AN===void 0?this._$AM=e:(r(this),this._$AM=e,i(this))}function o(e,t=!1,i=0){let a=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0){if(t){if(Array.isArray(a))for(let e=i;e<a.length;e++)n(a[e],!1),r(a[e]);else a!=null&&(n(a,!1),r(a))}else n(this,e)}}var s=t=>{t.type==e.u.CHILD&&(t._$AP??=o,t._$AQ??=a)},c=class extends e.l{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),i(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(n(this,e),r(this))}setValue(e){if(t.i(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
1
+ const e=require("./element-DiFhBcIl.cjs"),t=require("./directive-helpers-C6J4AkFk.cjs");var n=(e,t)=>{let r=e._$AN;if(r===void 0)return!1;for(let e of r)e._$AO?.(t,!1),n(e,t);return!0},r=e=>{let t,n;do{if((t=e._$AM)===void 0)break;n=t._$AN,n.delete(e),e=t}while(n?.size===0)},i=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(n===void 0)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),s(t)}};function a(e){this._$AN===void 0?this._$AM=e:(r(this),this._$AM=e,i(this))}function o(e,t=!1,i=0){let a=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0){if(t){if(Array.isArray(a))for(let e=i;e<a.length;e++)n(a[e],!1),r(a[e]);else a!=null&&(n(a,!1),r(a))}else n(this,e)}}var s=t=>{t.type==e.m.CHILD&&(t._$AP??=o,t._$AQ??=a)},c=class extends e.p{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),i(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(n(this,e),r(this))}setValue(e){if(t.i(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
@@ -1,18 +1,18 @@
1
- import { n as e, o as t, p as n, s as r, t as i } from "./element-ChsFgr_B.js";
2
- import "./icon-D-LA22xD.js";
3
- import { t as a } from "./if-defined-CGzIlZ9-.js";
1
+ import { _ as e, d as t, n, t as r, u as i } from "./element-WEzISABa.js";
2
+ import "./icon-DEtOSWRK.js";
3
+ import { t as a } from "./if-defined-BmnvvxtR.js";
4
4
  //#region src/components/backlink/backlink.ts
5
- var o = class extends i {
5
+ var o = class extends r {
6
6
  constructor(...e) {
7
- super(...e), this.href = "", this.text = "Forsiden", this.ariaLabel = "";
7
+ super(...e), this.href = "", this.text = "Forsiden", this.ariaLabel = null;
8
8
  }
9
9
  attributeChangedCallback(e, t, n) {
10
10
  e === "arialabel" && this.removeAttribute("arialabel"), e === "href" && this.removeAttribute("href"), e === "text" && this.removeAttribute("text"), super.attributeChangedCallback(e, t, n);
11
11
  }
12
12
  render() {
13
- return n`<nav
13
+ return e`<nav
14
14
  class="pkt-back-link"
15
- aria-label=${this.ariaLabel || "Gå tilbake til forrige side"}
15
+ aria-label=${this.ariaLabel || this.pktStrings.get("backlink").label}
16
16
  >
17
17
  <a href=${a(this.href || "/")} class="pkt-link pkt-link--icon-left"
18
18
  ><pkt-icon
@@ -25,9 +25,9 @@ var o = class extends i {
25
25
  </nav>`;
26
26
  }
27
27
  };
28
- e([t({ type: String })], o.prototype, "href", void 0), e([t({ type: String })], o.prototype, "text", void 0), e([t({ type: String })], o.prototype, "ariaLabel", void 0);
28
+ n([i({ type: String })], o.prototype, "href", void 0), n([i({ type: String })], o.prototype, "text", void 0), n([i({ type: String })], o.prototype, "ariaLabel", void 0);
29
29
  try {
30
- r("pkt-backlink")(o);
30
+ t("pkt-backlink")(o);
31
31
  } catch {
32
32
  console.warn("Forsøker å definere <pkt-backlink>, men den er allerede definert");
33
33
  }
@@ -1,6 +1,6 @@
1
- const e=require("./element-BA8v6S7z.cjs");require("./icon-9iwd2F2l.cjs");const t=require("./if-defined-B89_ZeCj.cjs");var n=class extends e.t{constructor(...e){super(...e),this.href=``,this.text=`Forsiden`,this.ariaLabel=``}attributeChangedCallback(e,t,n){e===`arialabel`&&this.removeAttribute(`arialabel`),e===`href`&&this.removeAttribute(`href`),e===`text`&&this.removeAttribute(`text`),super.attributeChangedCallback(e,t,n)}render(){return e.p`<nav
1
+ const e=require("./element-DiFhBcIl.cjs");require("./icon-DIavy2cB.cjs");const t=require("./if-defined-Dc3xFDaM.cjs");var n=class extends e.t{constructor(...e){super(...e),this.href=``,this.text=`Forsiden`,this.ariaLabel=null}attributeChangedCallback(e,t,n){e===`arialabel`&&this.removeAttribute(`arialabel`),e===`href`&&this.removeAttribute(`href`),e===`text`&&this.removeAttribute(`text`),super.attributeChangedCallback(e,t,n)}render(){return e._`<nav
2
2
  class="pkt-back-link"
3
- aria-label=${this.ariaLabel||`Gå tilbake til forrige side`}
3
+ aria-label=${this.ariaLabel||this.pktStrings.get(`backlink`).label}
4
4
  >
5
5
  <a href=${t.t(this.href||`/`)} class="pkt-link pkt-link--icon-left"
6
6
  ><pkt-icon
@@ -10,4 +10,4 @@ const e=require("./element-BA8v6S7z.cjs");require("./icon-9iwd2F2l.cjs");const t
10
10
  ></pkt-icon
11
11
  ><span class="pkt-back-link__text">${this.text}</span></a
12
12
  >
13
- </nav>`}};e.n([e.o({type:String})],n.prototype,`href`,void 0),e.n([e.o({type:String})],n.prototype,`text`,void 0),e.n([e.o({type:String})],n.prototype,`ariaLabel`,void 0);try{e.s(`pkt-backlink`)(n)}catch{console.warn(`Forsøker å definere <pkt-backlink>, men den er allerede definert`)}var r=n;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
13
+ </nav>`}};e.n([e.u({type:String})],n.prototype,`href`,void 0),e.n([e.u({type:String})],n.prototype,`text`,void 0),e.n([e.u({type:String})],n.prototype,`ariaLabel`,void 0);try{e.d(`pkt-backlink`)(n)}catch{console.warn(`Forsøker å definere <pkt-backlink>, men den er allerede definert`)}var r=n;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
@@ -1,5 +1,7 @@
1
1
  import { LitElement } from 'lit';
2
2
  import { ElementProps } from '../types/typeUtils';
3
+ import { PktStringsController } from '../controllers/strings-controller';
4
+ import { TPktStringsOverride } from '../shared-strings';
3
5
  type Props = ElementProps<PktElement, 'strings' | 'role'>;
4
6
  /**
5
7
  * Base class for Punkt shadow DOM elements
@@ -7,7 +9,17 @@ type Props = ElementProps<PktElement, 'strings' | 'role'>;
7
9
  */
8
10
  export declare class PktShadowElement<T = {}> extends LitElement {
9
11
  [key: string]: any;
10
- strings: any;
12
+ /**
13
+ * Overstyrer tekster for denne komponenten. Delvis — det som ikke settes
14
+ * hentes fra `setPktStrings()` eller den innebygde katalogen.
15
+ *
16
+ * Kan settes som JavaScript-property eller som JSON i attributtet:
17
+ *
18
+ * <pkt-searchinput strings='{"searchinput":{"placeholder":"Finn ansatt…"}}'>
19
+ */
20
+ strings?: TPktStringsOverride;
21
+ /** Oppslag mot tekstkatalogen. Rendrer komponenten på nytt ved `setPktStrings()`. */
22
+ protected pktStrings: PktStringsController;
11
23
  role: string | null;
12
24
  /**
13
25
  * Here to support prop typing in Vue
@@ -62,8 +62,10 @@ export declare class PktInputElement<T = {}, TOption extends PktInputOption = Pk
62
62
  helptextDropdown: string;
63
63
  helptextDropdownButton: string | null;
64
64
  label: string | null;
65
- optionalText: string;
66
- requiredText: string;
65
+ /** @deprecated Bruk `strings={{ forms: { optional: '…' } }}` eller `setPktStrings()`. */
66
+ optionalText?: string;
67
+ /** @deprecated Bruk `strings={{ forms: { required: '…' } }}` eller `setPktStrings()`. */
68
+ requiredText?: string;
67
69
  tagText: string | null;
68
70
  inputSize: 'small' | 'medium' | 'xsmall';
69
71
  dataTestid: string;