@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
@@ -3,9 +3,10 @@ import { customElement, property, state } from 'lit/decorators.js'
3
3
  import { html, nothing, PropertyValues } from 'lit'
4
4
  import { PktElementWithSlot } from '@/base-elements/element-with-slot'
5
5
  import { slotContent } from '@/directives/slot-content'
6
- import type { TAriaLive, TAlertSkin } from 'shared-types'
6
+ import type { TAriaLive, TAlertSkin, TAlertSize } from 'shared-types'
7
7
  import { updateClassAttribute } from '@/utils/classutils'
8
- import specs from 'componentSpecs/alert.json'
8
+ import { formatString } from 'shared-strings'
9
+ import specs from 'componentSpecs/alert.spec'
9
10
 
10
11
  import '@/components/icon'
11
12
  import '@/components/button'
@@ -23,7 +24,7 @@ export interface IPktAlert {
23
24
  */
24
25
  compact?: boolean
25
26
  role?: string
26
- size?: 'medium' | 'small' | 'xsmall'
27
+ size?: TAlertSize
27
28
  }
28
29
  export class PktAlert extends PktElementWithSlot implements IPktAlert {
29
30
  constructor() {
@@ -33,14 +34,20 @@ export class PktAlert extends PktElementWithSlot implements IPktAlert {
33
34
 
34
35
  // Properties
35
36
 
36
- @property({ type: Boolean, reflect: false }) compact = specs.deprecated.compact.default
37
+ @property({ type: Boolean, reflect: false })
38
+ compact = specs.deprecated!.compact.default as boolean
37
39
  @property({ type: String, reflect: true }) title: string = ''
38
- @property({ type: String, reflect: true }) skin: TAlertSkin = specs.props.skin
39
- .default as TAlertSkin
40
- @property({ type: String }) ariaLive: TAriaLive = specs.props.ariaLive.default as TAriaLive
40
+ @property({ type: String, reflect: true }) skin: TAlertSkin = (
41
+ specs.props!.skin as { default: TAlertSkin }
42
+ ).default
43
+ @property({ type: String }) ariaLive: TAriaLive = (
44
+ specs.props!.ariaLive as { default: TAriaLive }
45
+ ).default
41
46
  @property({ type: String, reflect: true, attribute: 'aria-live' })
42
47
  ariaLiveAttr: TAriaLive | null = null
43
- @property({ type: Boolean, reflect: true }) closeAlert = specs.props.closeAlert.default
48
+ @property({ type: Boolean, reflect: true }) closeAlert = (
49
+ specs.props!.closeAlert as { default: boolean }
50
+ ).default
44
51
  @property({ type: String, reflect: true }) date: string | null = null
45
52
  @property({ type: String, reflect: true }) role: string = 'status'
46
53
  @property({ type: String, attribute: 'size' })
@@ -110,7 +117,7 @@ export class PktAlert extends PktElementWithSlot implements IPktAlert {
110
117
  variant="icon-only"
111
118
  @click=${this.close}
112
119
  >
113
- <span class="sr-only">Lukk</span>
120
+ <span class="sr-only">${this.pktStrings.get('generic').close}</span>
114
121
  </pkt-button>
115
122
  </div>
116
123
  `
@@ -120,7 +127,9 @@ export class PktAlert extends PktElementWithSlot implements IPktAlert {
120
127
  <div class="pkt-alert__text">${slotContent(this)}</div>
121
128
 
122
129
  ${this.date
123
- ? html`<div class="pkt-alert__date">Sist oppdatert: ${this.date}</div>`
130
+ ? html`<div class="pkt-alert__date">
131
+ ${formatString(this.pktStrings.get('alert').lastUpdated, { date: this.date })}
132
+ </div>`
124
133
  : nothing}
125
134
  </div>
126
135
  </div>
@@ -9,7 +9,7 @@ expect.extend(toHaveNoViolations)
9
9
  export interface BacklinkTestConfig extends BaseTestConfig {
10
10
  href?: string
11
11
  text?: string
12
- ariaLabel?: string
12
+ ariaLabel?: string | null
13
13
  }
14
14
 
15
15
  // Use shared framework
@@ -70,7 +70,7 @@ describe('PktBackLink', () => {
70
70
 
71
71
  expect(backlink.href).toBe('')
72
72
  expect(backlink.text).toBe('Forsiden')
73
- expect(backlink.ariaLabel).toBe('')
73
+ expect(backlink.ariaLabel).toBe(null)
74
74
 
75
75
  const nav = backlink.querySelector('nav')
76
76
  const link = nav?.querySelector('a')
@@ -133,7 +133,7 @@ describe('PktBackLink', () => {
133
133
  test('uses default aria-label when none provided', async () => {
134
134
  const { backlink } = await createBacklinkTest()
135
135
 
136
- expect(backlink.ariaLabel).toBe('')
136
+ expect(backlink.ariaLabel).toBe(null)
137
137
 
138
138
  const nav = backlink.querySelector('nav')
139
139
  expect(nav?.getAttribute('aria-label')).toBe('Gå tilbake til forrige side')
@@ -2,21 +2,19 @@ import { PktElement } from '@/base-elements/element'
2
2
  import { html } from 'lit'
3
3
  import { property, customElement } from 'lit/decorators.js'
4
4
  import { ifDefined } from 'lit/directives/if-defined.js'
5
+ import type { IPktBackLinkBase } from 'shared-types'
5
6
 
6
7
  import '@/components/icon'
7
8
 
8
- export interface IPktBackLink {
9
- href?: string
10
- text?: string
11
- ariaLabel?: string
12
- }
9
+ export interface IPktBackLink extends IPktBackLinkBase {}
13
10
 
14
11
  export class PktBackLink extends PktElement<IPktBackLink> implements IPktBackLink {
15
12
  // Properties
16
13
 
17
14
  @property({ type: String }) href: string = ''
18
15
  @property({ type: String }) text: string = 'Forsiden'
19
- @property({ type: String }) ariaLabel: string = ''
16
+ /** @deprecated Bruk `strings={{ backlink: { label: '…' } }}` eller `setPktStrings()`. */
17
+ @property({ type: String }) ariaLabel: string | null = null
20
18
 
21
19
  // Lifecycle
22
20
 
@@ -36,7 +34,7 @@ export class PktBackLink extends PktElement<IPktBackLink> implements IPktBackLin
36
34
  render() {
37
35
  return html`<nav
38
36
  class="pkt-back-link"
39
- aria-label=${this.ariaLabel || 'Gå tilbake til forrige side'}
37
+ aria-label=${this.ariaLabel || this.pktStrings.get('backlink').label}
40
38
  >
41
39
  <a href=${ifDefined(this.href || '/')} class="pkt-link pkt-link--icon-left"
42
40
  ><pkt-icon
@@ -1,22 +1,21 @@
1
1
  import { customElement, property } from 'lit/decorators.js'
2
2
  import { html, nothing } from 'lit'
3
3
  import { PktElement } from '@/base-elements/element'
4
+ import type { IBreadcrumb, IPktBreadcrumbsBase } from 'shared-types'
4
5
 
5
6
  import '@/components/icon'
6
7
 
7
- export interface IBreadcrumbItem {
8
- text: string
9
- href: string
10
- }
8
+ export type { IBreadcrumb }
11
9
 
12
- export interface IPktBreadcrumbs {
13
- breadcrumbs: IBreadcrumbItem[]
14
- }
10
+ /** @deprecated Use `IBreadcrumb`. */
11
+ export type IBreadcrumbItem = IBreadcrumb
12
+
13
+ export interface IPktBreadcrumbs extends IPktBreadcrumbsBase {}
15
14
 
16
15
  export class PktBreadcrumbs extends PktElement implements IPktBreadcrumbs {
17
- @property({ type: Array }) breadcrumbs: IBreadcrumbItem[] = []
16
+ @property({ type: Array }) breadcrumbs: IBreadcrumb[] = []
18
17
 
19
- private handleLinkClick(event: MouseEvent, item: IBreadcrumbItem, index: number) {
18
+ private handleLinkClick(event: MouseEvent, item: IBreadcrumb, index: number) {
20
19
  const navigateEvent = new CustomEvent('navigate', {
21
20
  detail: { item, index, originalEvent: event },
22
21
  bubbles: true,
@@ -39,7 +38,7 @@ export class PktBreadcrumbs extends PktElement implements IPktBreadcrumbs {
39
38
  const backLink = this.breadcrumbs[this.breadcrumbs.length - 2]
40
39
 
41
40
  return html`
42
- <nav class="pkt-breadcrumbs" aria-label="brødsmulemeny">
41
+ <nav class="pkt-breadcrumbs" aria-label=${this.pktStrings.get('breadcrumbs').ariaLabel}>
43
42
  <ol class="pkt-breadcrumbs__list pkt-breadcrumbs--desktop">
44
43
  ${this.breadcrumbs.map((item, index) =>
45
44
  index === this.breadcrumbs.length - 1
@@ -1,2 +1,2 @@
1
1
  export { PktBreadcrumbs } from './breadcrumbs'
2
- export type { IBreadcrumbItem, IPktBreadcrumbs } from './breadcrumbs'
2
+ export type { IBreadcrumb, IBreadcrumbItem, IPktBreadcrumbs } from './breadcrumbs'
@@ -95,12 +95,32 @@ export class PktCalendar extends PktElement {
95
95
  today: string | null = null
96
96
 
97
97
  // Localization strings
98
- @property({ type: Array, attribute: 'day-strings' }) dayStrings: string[] = this.strings.dates.daysShort
99
- @property({ type: Array, attribute: 'day-strings-long' }) dayStringsLong: string[] = this.strings.dates.days
100
- @property({ type: Array, attribute: 'month-strings' }) monthStrings: string[] = this.strings.dates.months
101
- @property({ type: String, attribute: 'week-string' }) weekString: string = this.strings.dates.week
102
- @property({ type: String, attribute: 'prev-month-string' }) prevMonthString: string = this.strings.dates.prevMonth
103
- @property({ type: String, attribute: 'next-month-string' }) nextMonthString: string = this.strings.dates.nextMonth
98
+ /** @deprecated Bruk `strings={{ dates: { daysShort: [...] } }}` eller `setPktStrings()`. */
99
+ @property({ type: Array, attribute: 'day-strings' }) dayStrings?: string[]
100
+ /** @deprecated Bruk `strings={{ dates: { days: [...] } }}` eller `setPktStrings()`. */
101
+ @property({ type: Array, attribute: 'day-strings-long' }) dayStringsLong?: string[]
102
+ /** @deprecated Bruk `strings={{ dates: { months: [...] } }}` eller `setPktStrings()`. */
103
+ @property({ type: Array, attribute: 'month-strings' }) monthStrings?: string[]
104
+ /** @deprecated Bruk `strings={{ dates: { week: '...' } }}` eller `setPktStrings()`. */
105
+ @property({ type: String, attribute: 'week-string' }) weekString?: string
106
+ /** @deprecated Bruk `strings={{ calendar: { prevMonth: '...' } }}` eller `setPktStrings()`. */
107
+ @property({ type: String, attribute: 'prev-month-string' }) prevMonthString?: string
108
+ /** @deprecated Bruk `strings={{ calendar: { nextMonth: '...' } }}` eller `setPktStrings()`. */
109
+ @property({ type: String, attribute: 'next-month-string' }) nextMonthString?: string
110
+
111
+ /** Datonavn og navigasjonstekster, med de utfasede enkeltpropene lagt oppå. */
112
+ protected get calendarStrings() {
113
+ const dates = this.pktStrings.get('dates')
114
+ const calendar = this.pktStrings.get('calendar')
115
+ return {
116
+ daysShort: this.dayStrings ?? dates.daysShort,
117
+ days: this.dayStringsLong ?? dates.days,
118
+ months: this.monthStrings ?? dates.months,
119
+ week: this.weekString ?? dates.week,
120
+ prevMonth: this.prevMonthString ?? calendar.prevMonth,
121
+ nextMonth: this.nextMonthString ?? calendar.nextMonth,
122
+ }
123
+ }
104
124
 
105
125
  // Internal state - selection tracking
106
126
  @property({ type: Array }) private _selected: Date[] = []
@@ -230,8 +250,7 @@ export class PktCalendar extends PktElement {
230
250
  }}
231
251
  >
232
252
  <nav class="pkt-cal-month-nav">
233
- ${this.renderMonthNavButton('prev')}
234
- ${this.renderMonthNav()}
253
+ ${this.renderMonthNavButton('prev')} ${this.renderMonthNav()}
235
254
  ${this.renderMonthNavButton('next')}
236
255
  </nav>
237
256
  <table
@@ -253,7 +272,8 @@ export class PktCalendar extends PktElement {
253
272
  private renderMonthNavButton(direction: 'prev' | 'next'): TemplateResult {
254
273
  const isPrev = direction === 'prev'
255
274
  const isAllowed = isPrev ? this.isPrevMonthAllowed() : this.isNextMonthAllowed()
256
- const label = isPrev ? this.prevMonthString : this.nextMonthString
275
+ const { prevMonth, nextMonth } = this.calendarStrings
276
+ const label = isPrev ? prevMonth : nextMonth
257
277
  const iconName = isPrev ? 'chevron-thin-left' : 'chevron-thin-right'
258
278
  const className = isPrev ? 'pkt-calendar__prev-month' : 'pkt-calendar__next-month'
259
279
  const onClick = isPrev ? () => this.prevMonth() : () => this.nextMonth()
@@ -284,28 +304,32 @@ export class PktCalendar extends PktElement {
284
304
  const days: TemplateResult[] = []
285
305
 
286
306
  if (this.weeknumbers) {
287
- days.push(html`<th><div class="pkt-calendar__week-number">${this.weekString}</div></th>`)
307
+ days.push(
308
+ html`<th><div class="pkt-calendar__week-number">${this.calendarStrings.week}</div></th>`,
309
+ )
288
310
  }
289
311
 
290
- for (let i = 0; i < this.dayStrings.length; i++) {
312
+ const { days: dayNames, daysShort } = this.calendarStrings
313
+ for (let i = 0; i < daysShort.length; i++) {
291
314
  days.push(
292
315
  html`<th>
293
- <div class="pkt-calendar__day-name" aria-label="${this.dayStringsLong[i]}">
294
- ${this.dayStrings[i]}
295
- </div>
316
+ <div class="pkt-calendar__day-name" aria-label="${dayNames[i]}">${daysShort[i]}</div>
296
317
  </th>`,
297
318
  )
298
319
  }
299
320
 
300
- return html`<tr class="pkt-cal-week-row">${days}</tr>`
321
+ return html`<tr class="pkt-cal-week-row">
322
+ ${days}
323
+ </tr>`
301
324
  }
302
325
 
303
326
  private renderMonthNav(): TemplateResult {
327
+ const dates = this.pktStrings.get('dates')
304
328
  if (this.withcontrols) {
305
329
  return html`<div class="pkt-cal-month-picker">
306
- <label for="${this.id}-monthnav" class="pkt-hide">${this.strings.dates.month}</label>
330
+ <label for="${this.id}-monthnav" class="pkt-hide">${dates.month}</label>
307
331
  <select
308
- aria-label="${this.strings.dates.month}"
332
+ aria-label="${dates.month}"
309
333
  class="pkt-input pkt-input-compact"
310
334
  id="${this.id}-monthnav"
311
335
  @change=${(e: Event) => {
@@ -314,14 +338,14 @@ export class PktCalendar extends PktElement {
314
338
  this.changeMonth(this.year, parseInt(target.value))
315
339
  }}
316
340
  >
317
- ${this.monthStrings.map(
341
+ ${this.calendarStrings.months.map(
318
342
  (month, index) =>
319
343
  html`<option value=${index} ?selected=${this.month === index}>${month}</option>`,
320
344
  )}
321
345
  </select>
322
- <label for="${this.id}-yearnav" class="pkt-hide">${this.strings.dates.year}</label>
346
+ <label for="${this.id}-yearnav" class="pkt-hide">${dates.year}</label>
323
347
  <input
324
- aria-label="${this.strings.dates.year}"
348
+ aria-label="${dates.year}"
325
349
  class="pkt-input pkt-cal-input-year pkt-input-compact"
326
350
  id="${this.id}-yearnav"
327
351
  type="number"
@@ -338,7 +362,7 @@ export class PktCalendar extends PktElement {
338
362
  }
339
363
 
340
364
  return html`<div class="pkt-txt-16-medium pkt-calendar__month-title" aria-live="polite">
341
- ${this.monthStrings[this.month]} ${this.year}
365
+ ${this.calendarStrings.months[this.month]} ${this.year}
342
366
  </div>`
343
367
  }
344
368
 
@@ -393,10 +417,12 @@ export class PktCalendar extends PktElement {
393
417
 
394
418
  private getDayCellClasses(data: TDayViewData) {
395
419
  const { currentDateISO, isToday, isSelected } = data
396
- const isRangeStart = this.range &&
420
+ const isRangeStart =
421
+ this.range &&
397
422
  (this.selected.length === 2 || this.rangeHovered !== null) &&
398
423
  currentDateISO === this.selected[0]
399
- const isRangeEnd = this.range && this.selected.length === 2 && currentDateISO === this.selected[1]
424
+ const isRangeEnd =
425
+ this.range && this.selected.length === 2 && currentDateISO === this.selected[1]
400
426
 
401
427
  return {
402
428
  'pkt-cal-today': isToday,
@@ -412,10 +438,12 @@ export class PktCalendar extends PktElement {
412
438
 
413
439
  private getDayButtonClasses(data: TDayViewData) {
414
440
  const { currentDateISO, isToday, isSelected, isDisabled } = data
415
- const isRangeStart = this.range &&
441
+ const isRangeStart =
442
+ this.range &&
416
443
  (this.selected.length === 2 || this.rangeHovered !== null) &&
417
444
  currentDateISO === this.selected[0]
418
- const isRangeEnd = this.range && this.selected.length === 2 && currentDateISO === this.selected[1]
445
+ const isRangeEnd =
446
+ this.range && this.selected.length === 2 && currentDateISO === this.selected[1]
419
447
 
420
448
  return {
421
449
  'pkt-calendar__date': true,
@@ -489,7 +517,9 @@ export class PktCalendar extends PktElement {
489
517
  }
490
518
 
491
519
  private renderWeekRow(cells: TemplateResult[]): TemplateResult {
492
- return html`<tr class="pkt-cal-week-row" role="row">${cells}</tr>`
520
+ return html`<tr class="pkt-cal-week-row" role="row">
521
+ ${cells}
522
+ </tr>`
493
523
  }
494
524
 
495
525
  private renderCalendarBody() {
@@ -406,7 +406,6 @@ describe('PktCheckbox', () => {
406
406
  await checkbox.updateComplete
407
407
 
408
408
  expect(checkbox.optionalTag).toBe(true)
409
- expect(checkbox.optionalText).toBe('Valgfritt')
410
409
 
411
410
  const optionalTag = checkbox.querySelector('.pkt-tag--blue-light')
412
411
  expect(optionalTag).toBeInTheDocument()
@@ -423,7 +422,6 @@ describe('PktCheckbox', () => {
423
422
  await checkbox.updateComplete
424
423
 
425
424
  expect(checkbox.requiredTag).toBe(true)
426
- expect(checkbox.requiredText).toBe('Må fylles ut')
427
425
 
428
426
  const requiredTag = checkbox.querySelector('.pkt-tag--beige')
429
427
  expect(requiredTag).toBeInTheDocument()
@@ -36,9 +36,11 @@ export class PktCheckbox extends PktInputElement<Props> {
36
36
  @property({ type: String, reflect: true }) type: string = 'checkbox'
37
37
  @property({ type: String }) tagText: string | null = null
38
38
  @property({ type: Boolean }) optionalTag: boolean = false
39
- @property({ type: String }) optionalText: string = 'Valgfritt'
39
+ /** @deprecated Bruk `strings={{ forms: { optional: '…' } }}` eller `setPktStrings()`. */
40
+ @property({ type: String }) optionalText?: string
40
41
  @property({ type: Boolean }) requiredTag: boolean = false
41
- @property({ type: String }) requiredText: string = 'Må fylles ut'
42
+ /** @deprecated Bruk `strings={{ forms: { required: '…' } }}` eller `setPktStrings()`. */
43
+ @property({ type: String }) requiredText?: string
42
44
 
43
45
  connectedCallback() {
44
46
  super.connectedCallback()
@@ -108,16 +110,18 @@ export class PktCheckbox extends PktInputElement<Props> {
108
110
 
109
111
  const tagClasses = 'pkt-tag pkt-tag--small pkt-tag--thin-text'
110
112
 
113
+ const formStrings = this.pktStrings.get('forms')
114
+
111
115
  const tags = () => {
112
116
  return html`
113
117
  ${this.tagText
114
118
  ? html`<span class=${tagClasses + ' pkt-tag--gray'}>${this.tagText}</span>`
115
119
  : nothing}
116
120
  ${this.optionalTag
117
- ? html`<span class=${tagClasses + ' pkt-tag--blue-light'}>${this.optionalText}</span>`
121
+ ? html`<span class=${tagClasses + ' pkt-tag--blue-light'}>${this.optionalText ?? formStrings.optional}</span>`
118
122
  : nothing}
119
123
  ${this.requiredTag
120
- ? html`<span class=${tagClasses + ' pkt-tag--beige'}>${this.requiredText}</span>`
124
+ ? html`<span class=${tagClasses + ' pkt-tag--beige'}>${this.requiredText ?? formStrings.required}</span>`
121
125
  : nothing}
122
126
  `
123
127
  }
@@ -7,6 +7,7 @@ import specs from 'componentSpecs/combobox.json'
7
7
 
8
8
  import type { IPktComboboxOption, TPktComboboxTagPlacement } from './combobox-types'
9
9
  import PktListbox from '../listbox'
10
+ import type { TComboboxMessageKey } from 'shared-utils/combobox'
10
11
 
11
12
  /**
12
13
  * Base class for PktCombobox.
@@ -42,7 +43,7 @@ export class ComboboxBase extends PktInputElement {
42
43
  @state() override _options: IPktComboboxOption[] = []
43
44
  @state() protected _value: string[] = []
44
45
  @state() protected _isOptionsOpen = false
45
- @state() protected _userInfoMessage: string = ''
46
+ @state() protected _userInfoMessage: TComboboxMessageKey = ''
46
47
  @state() protected _addValueText: string | null = null
47
48
  @state() protected _maxIsReached: boolean = false
48
49
  @state() protected _search: string = ''
@@ -3,6 +3,7 @@ import { findOptionByValue, isMaxSelectionReached } from 'shared-utils/combobox/
3
3
  import { getSingleValueForInput } from 'shared-utils/combobox/input-utils'
4
4
  import { selectionMutators } from './combobox-utils'
5
5
  import { ComboboxBase } from './combobox-base'
6
+ import type { TComboboxMessageKey } from 'shared-utils/combobox'
6
7
 
7
8
  /**
8
9
  * Value management layer for PktCombobox.
@@ -27,7 +28,7 @@ export class ComboboxValue extends ComboboxBase {
27
28
 
28
29
  let shouldOptionsBeOpen: boolean = false
29
30
  let shouldResetInput: boolean = true
30
- let userInfoMessage: string | null = ''
31
+ let userInfoMessage: TComboboxMessageKey = ''
31
32
  let searchValue: string | null = ''
32
33
 
33
34
  if (isDisabled) return
@@ -35,7 +36,7 @@ export class ComboboxValue extends ComboboxBase {
35
36
  // Not in option list and allowUserInput is true
36
37
  if (!isInOption && this.allowUserInput && !isEmpty) {
37
38
  this.addNewUserValue(value)
38
- userInfoMessage = 'Ny verdi lagt til'
39
+ userInfoMessage = 'valueAdded'
39
40
  shouldOptionsBeOpen = isMultiple
40
41
  }
41
42
 
@@ -46,7 +47,7 @@ export class ComboboxValue extends ComboboxBase {
46
47
  }
47
48
  shouldResetInput = false
48
49
  shouldOptionsBeOpen = true
49
- userInfoMessage = 'Ingen treff i søket'
50
+ userInfoMessage = 'noResults'
50
51
  }
51
52
 
52
53
  // Value is already selected — deselect it
@@ -85,7 +86,7 @@ export class ComboboxValue extends ComboboxBase {
85
86
 
86
87
  // Multi-select with max selections reached
87
88
  else if (isMultiple && isMaxItemsReached) {
88
- userInfoMessage = 'Maks antall valg nådd'
89
+ userInfoMessage = 'maxSelected'
89
90
  shouldResetInput = false
90
91
  searchValue = value
91
92
  }
@@ -93,7 +94,7 @@ export class ComboboxValue extends ComboboxBase {
93
94
  // No matching condition — fallback
94
95
  else {
95
96
  isSingle && this.removeAllSelected()
96
- userInfoMessage = 'Ingen gyldig verdi valgt'
97
+ userInfoMessage = 'noValidValue'
97
98
  shouldResetInput = false
98
99
  shouldOptionsBeOpen = true
99
100
  searchValue = value
@@ -121,7 +122,7 @@ export class ComboboxValue extends ComboboxBase {
121
122
  if (this._value.includes(value as string)) return
122
123
 
123
124
  if (this.multiple && isMaxSelectionReached(this._value.length, this.maxlength)) {
124
- this._userInfoMessage = 'Maks antall valg nådd'
125
+ this._userInfoMessage = 'maxSelected'
125
126
  return
126
127
  }
127
128
 
@@ -152,7 +153,7 @@ export class ComboboxValue extends ComboboxBase {
152
153
  protected addAllOptions(): void {
153
154
  if (!this.multiple) return
154
155
  if (this.maxlength && this._options.length > this.maxlength) {
155
- this._userInfoMessage = 'For mange valgt'
156
+ this._userInfoMessage = 'tooManySelected'
156
157
  return
157
158
  }
158
159
 
@@ -173,10 +174,10 @@ export class ComboboxValue extends ComboboxBase {
173
174
  this._search = input
174
175
 
175
176
  // If the typed value is already selected, don't toggle (which would deselect).
176
- // Just reset the input and keep the "Verdien er allerede valgt" message.
177
+ // Just reset the input and keep the "alreadySelected" message.
177
178
  if (input && this._value.includes(input)) {
178
179
  this.resetComboboxInput(true)
179
- this._userInfoMessage = 'Verdien er allerede valgt'
180
+ this._userInfoMessage = 'alreadySelected'
180
181
  return
181
182
  }
182
183
 
@@ -269,7 +269,11 @@ describe('PktCombobox', () => {
269
269
  ;(combobox as any).toggleValue('cherry')
270
270
  await combobox.updateComplete
271
271
 
272
- expect(combobox['_userInfoMessage']).toBe('Maks antall valg nådd')
272
+ expect(combobox['_userInfoMessage']).toBe('maxSelected')
273
+ const listbox = container.querySelector('pkt-listbox') as HTMLElement & {
274
+ userMessage: string
275
+ }
276
+ expect(listbox.userMessage).toBe('Maks antall valg nådd')
273
277
  })
274
278
 
275
279
  test('allows deselection when at maxlength', async () => {
@@ -281,6 +281,7 @@ export class PktCombobox extends ComboboxHandlers implements IPktCombobox {
281
281
  render() {
282
282
  return html`
283
283
  <pkt-input-wrapper
284
+ .strings=${this.strings}
284
285
  .size=${this.inputSize}
285
286
  .label=${this.label}
286
287
  .helptext=${this.helptext}
@@ -371,7 +372,9 @@ export class PktCombobox extends ComboboxHandlers implements IPktCombobox {
371
372
  ?allow-user-input=${this.allowUserInput && !this._maxIsReached}
372
373
  ?max-is-reached=${this._maxIsReached}
373
374
  .customUserInput=${ifDefined(this._addValueText)}
374
- .userMessage=${this._userInfoMessage}
375
+ .userMessage=${this._userInfoMessage
376
+ ? this.pktStrings.get('combobox')[this._userInfoMessage]
377
+ : ''}
375
378
  @search=${this.handleSearch}
376
379
  @option-toggle=${this.handleOptionToggled}
377
380
  @select-all=${this.addAllOptions}
@@ -1,125 +1 @@
1
- export const consentStrings = {
2
- i18n: {
3
- nb: {
4
- contentPresentation: {
5
- title: 'Oslo kommune bruker informasjonskapsler',
6
- description: [
7
- 'For at nettstedet skal fungere og være trygt, bruker Oslo kommune informasjonskapsler. Noen er teknisk nødvendige, mens andre sikrer ulik funksjonalitet.',
8
- 'Godtar du alle informasjonskapsler, tillater du også at vi samler inn data om statistikk og brukeradferd. Da hjelper du oss med å lage et bedre nettsted uten at du trenger å dele noe personlig informasjon med oss.',
9
- ],
10
- buttons: {
11
- accept: 'Godta alle',
12
- reject: 'Kun nødvendige',
13
- settings: 'Innstillinger for informasjonskapsler',
14
- },
15
- },
16
- contentSettings: {
17
- title: 'Innstillinger for informasjonskapsler',
18
- description: [
19
- 'Her kan du velge hvilke typer informasjonskapsler du vil tillate. Tillatelsen gjelder i 90 dager. Husk at nødvendige informasjonskapsler ikke kan velges bort.',
20
- 'Du kan når som helst endre innstillingene og finne mer informasjon nederst på nettstedet under «Innstillinger for informasjonskapsler» og «Personvern og informasjonskapsler».',
21
- ],
22
- buttons: {
23
- back: 'Tilbake',
24
- save: 'Lagre innstillinger',
25
- },
26
- },
27
- },
28
- en: {
29
- contentPresentation: {
30
- title: 'Before you visit Oslo kommune ...',
31
- description: [
32
- 'This website uses cookies to make improvements. In this context, we need your consent to measure the traffic on the website in relation to statistics and feedback.',
33
- 'To read more about what we use cookies for, go to our privacy declaration which you will find at the bottom of our websites.',
34
- ],
35
- buttons: {
36
- accept: 'Yes, I accept',
37
- reject: 'Only necessary',
38
- settings: 'Go to settings',
39
- },
40
- },
41
- contentSettings: {
42
- title: 'Her kan du aktivt velge mellom ulike informasjonskapsler',
43
- description: [
44
- 'For å lese mer om hva vi bruker informasjonskapsler til gå til vår personvernserklering som du finner på våre nettsider',
45
- ],
46
- buttons: {
47
- back: 'Back',
48
- save: 'Save settings',
49
- },
50
- },
51
- },
52
- },
53
- cookies: [
54
- {
55
- name: 'statistics',
56
- defaultValue: null,
57
- i18n: {
58
- nb: {
59
- title: 'Statistikk og analyse',
60
- description:
61
- 'Jeg godtar at Oslo kommune bruker informasjonskapsler til å innhente data om statistikk og brukeradferd.',
62
- buttons: {
63
- yes: 'Ja',
64
- no: 'Nei',
65
- },
66
- },
67
- en: {
68
- title: 'Statistics and analytics',
69
- description: 'Select your preference for statistics and analytics',
70
- buttons: {
71
- yes: 'Yes',
72
- no: 'No',
73
- },
74
- },
75
- },
76
- },
77
- {
78
- name: 'survey',
79
- defaultValue: null,
80
- i18n: {
81
- nb: {
82
- title: 'Skriftlige tilbakemeldinger',
83
- description:
84
- 'Jeg godtar at Oslo kommune bruker informasjonskapsler til å vise responsfelt og registrere tilbakemeldinger.',
85
- buttons: {
86
- yes: 'Ja',
87
- no: 'Nei',
88
- },
89
- },
90
- en: {
91
- title: 'Survey',
92
- description: 'Select your preference for survey',
93
- buttons: {
94
- yes: 'Yes',
95
- no: 'No',
96
- },
97
- },
98
- },
99
- },
100
- {
101
- name: 'functional',
102
- defaultValue: true,
103
- i18n: {
104
- nb: {
105
- title: 'Funksjonelle informasjonskapsler',
106
- description:
107
- 'Jeg godtar at Oslo kommune bruker informasjonskapsler for å gjøre ulike funksjoner på nettstedet mulige (for eksempel skjemaer og barnehagevelger).',
108
- buttons: {
109
- yes: 'Ja',
110
- no: 'Nei',
111
- },
112
- },
113
- en: {
114
- title: 'Functional cookies',
115
- description:
116
- 'For the website to function optimally, we recommend that you accept these cookies',
117
- buttons: {
118
- yes: 'Yes',
119
- no: 'No',
120
- },
121
- },
122
- },
123
- },
124
- ],
125
- }
1
+ export { consentStrings } from 'shared-strings/consent'