@oslokommune/punkt-elements 18.9.3 → 18.9.7

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 (179) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/{accordion-CsrLQXEA.cjs → accordion-BLMbI8SQ.cjs} +1 -1
  3. package/dist/{accordion-DoxhiwK-.js → accordion-Bwka5Mxo.js} +5 -5
  4. package/dist/{alert-DH3VqNqh.cjs → alert-Cfr6t5uz.cjs} +1 -1
  5. package/dist/{alert-DxAGxSX_.js → alert-DaXpwnzT.js} +6 -6
  6. package/dist/{async-directive-BSwJ8-GL.js → async-directive-C8UAk8Mv.js} +2 -2
  7. package/dist/{async-directive-CfPXShXu.cjs → async-directive-U0EE5r36.cjs} +1 -1
  8. package/dist/{backlink-CGc7r9CS.js → backlink-BjJwDjuP.js} +3 -3
  9. package/dist/{backlink-CDH824db.cjs → backlink-DM220m4q.cjs} +1 -1
  10. package/dist/{breadcrumbs-DRGhIXmN.js → breadcrumbs-B1pDtQy8.js} +2 -2
  11. package/dist/{breadcrumbs-B37tsIoh.cjs → breadcrumbs-BUmbj-hP.cjs} +1 -1
  12. package/dist/{button-D6QhHPWH.js → button-BUl8uWWh.js} +5 -5
  13. package/dist/{button-Cx6Xdp6t.cjs → button-CCR4eyt_.cjs} +1 -1
  14. package/dist/{calendar-CAwIY7x_.cjs → calendar-BuSfyUR9.cjs} +1 -1
  15. package/dist/{calendar-42o_q-jI.js → calendar-KUQ1dFeX.js} +3 -3
  16. package/dist/{card-cyZE94EO.js → card-27RxxKxW.js} +6 -6
  17. package/dist/{card-CB72gwBC.cjs → card-B-RKnu_C.cjs} +1 -1
  18. package/dist/{checkbox-BhyUp6l6.js → checkbox-CTf4GatI.js} +4 -4
  19. package/dist/{checkbox-DJfH-vTj.cjs → checkbox-DlzVGBum.cjs} +1 -1
  20. package/dist/{class-map-DupQbnhE.cjs → class-map-B0FX3YsK.cjs} +1 -1
  21. package/dist/{class-map-DSoj1J68.js → class-map-D5GHsely.js} +1 -1
  22. package/dist/combobox-CNCM-Psm.cjs +139 -0
  23. package/dist/{combobox-fzSaCPok.js → combobox-Dym_phvv.js} +67 -58
  24. package/dist/components/combobox/combobox.d.ts +1 -0
  25. package/dist/components/header/header-service.d.ts +1 -1
  26. package/dist/components/header/types.d.ts +1 -1
  27. package/dist/components/helptext/helptext-association.test.d.ts +0 -0
  28. package/dist/components/timepicker/timepicker.d.ts +1 -0
  29. package/dist/{consent-CsgKWDsR.js → consent-BeoP4rOa.js} +2 -2
  30. package/dist/{consent-DnE6IPEj.cjs → consent-Cle1hkPg.cjs} +1 -1
  31. package/dist/{datepicker-D6os8IVu.cjs → datepicker-BtEZMsWH.cjs} +1 -1
  32. package/dist/{datepicker-DMiZ3BBw.js → datepicker-Ct4dbs4e.js} +11 -11
  33. package/dist/{directive-helpers-2mcpDDv5.cjs → directive-helpers-BushnrQQ.cjs} +1 -1
  34. package/dist/{directive-helpers-ChEduoup.js → directive-helpers-DpyLJPJm.js} +1 -1
  35. package/dist/{element-D_mCyFeX.cjs → element-CewjrA4g.cjs} +1 -1
  36. package/dist/{element-J8nynuVk.js → element-CqC-sGuC.js} +11 -1
  37. package/dist/{element-with-slot-BOuXlWSY.js → element-with-slot-D_OKDlYo.js} +2 -2
  38. package/dist/{element-with-slot-C66Jck5e.cjs → element-with-slot-MCvSBwUv.cjs} +1 -1
  39. package/dist/{fileupload-Y4bDkaD9.cjs → fileupload-BVAgrofy.cjs} +3 -3
  40. package/dist/{fileupload-C5lxuood.js → fileupload-Dqf_94m2.js} +11 -11
  41. package/dist/{footer-ByAxlj9_.js → footer-Bf6RFuia.js} +4 -4
  42. package/dist/{footer-Ca3DM544.cjs → footer-XrX6LFHY.cjs} +1 -1
  43. package/dist/{header-CP332MCg.cjs → header-DMMt5FtF.cjs} +64 -50
  44. package/dist/{header-CCJeadiL.js → header-fkKhLsyE.js} +182 -167
  45. package/dist/{header-menu-CIuu8_UC.js → header-menu-CUHrJCvx.js} +4 -4
  46. package/dist/{header-menu-B9ABa0WW.cjs → header-menu-DYZsigfH.cjs} +1 -1
  47. package/dist/{heading-4ZHACOeL.cjs → heading-BDdX4JiM.cjs} +1 -1
  48. package/dist/{heading-BHWdVbvN.js → heading-ELXWxyTv.js} +2 -2
  49. package/dist/{helptext-BESB9Vlq.js → helptext-BQkrYsoV.js} +4 -4
  50. package/dist/{helptext-6HsH-I6a.cjs → helptext-DQe6GO75.cjs} +1 -1
  51. package/dist/{icon-DkVqRWbC.js → icon-B2v30QUk.js} +1 -1
  52. package/dist/{icon-BzxBkRyE.cjs → icon-Clz68-Kz.cjs} +1 -1
  53. package/dist/{if-defined-BILLSM7i.js → if-defined-BNXGXCwT.js} +1 -1
  54. package/dist/if-defined-CjRKmMQs.cjs +1 -0
  55. package/dist/{input-element-BWxgs8L-.js → input-element-BTzuDh4h.js} +2 -2
  56. package/dist/{input-element-PN5nWd1A.cjs → input-element-BdIWsDl-.cjs} +1 -1
  57. package/dist/{input-wrapper-D64Qn-QH.cjs → input-wrapper-BIrQijWT.cjs} +1 -1
  58. package/dist/{input-wrapper-Bg06k-cj.js → input-wrapper-CvFMiqIt.js} +6 -6
  59. package/dist/{link-Bk7aDZCC.cjs → link-1JEWpEDG.cjs} +1 -1
  60. package/dist/{link-C7fOEv66.js → link-BxKWhYsn.js} +4 -4
  61. package/dist/{linkcard-Bguo9oCv.js → linkcard-CICSZ7pK.js} +4 -4
  62. package/dist/{linkcard-rZpQuO1Z.cjs → linkcard-DXOkeQUy.cjs} +1 -1
  63. package/dist/{listbox-CrQboPG6.js → listbox-DcCrI15L.js} +4 -4
  64. package/dist/{listbox-kV4OO1Qa.cjs → listbox-DsYaWvLu.cjs} +1 -1
  65. package/dist/{loader-BAn68gBb.cjs → loader-BA__N62k.cjs} +1 -1
  66. package/dist/{loader-C3gwO0i3.js → loader-nIl61aTv.js} +4 -4
  67. package/dist/{messagebox-WH2HjT5I.cjs → messagebox-CdNMgTz4.cjs} +1 -1
  68. package/dist/{messagebox-DAE59dMX.js → messagebox-D0qxveug.js} +4 -4
  69. package/dist/{modal-DdC1_qT3.js → modal-D5tGq-nN.js} +5 -5
  70. package/dist/{modal-DZm_fn3K.cjs → modal-i3Qxv38H.cjs} +1 -1
  71. package/dist/pkt-accordion.cjs +1 -1
  72. package/dist/pkt-accordion.js +1 -1
  73. package/dist/pkt-alert.cjs +1 -1
  74. package/dist/pkt-alert.js +1 -1
  75. package/dist/pkt-backlink.cjs +1 -1
  76. package/dist/pkt-backlink.js +1 -1
  77. package/dist/pkt-breadcrumbs.cjs +1 -1
  78. package/dist/pkt-breadcrumbs.js +1 -1
  79. package/dist/pkt-button.cjs +1 -1
  80. package/dist/pkt-button.js +1 -1
  81. package/dist/pkt-calendar.cjs +1 -1
  82. package/dist/pkt-calendar.js +1 -1
  83. package/dist/pkt-card.cjs +1 -1
  84. package/dist/pkt-card.js +1 -1
  85. package/dist/pkt-checkbox.cjs +1 -1
  86. package/dist/pkt-checkbox.js +1 -1
  87. package/dist/pkt-combobox.cjs +1 -1
  88. package/dist/pkt-combobox.js +1 -1
  89. package/dist/pkt-consent.cjs +1 -1
  90. package/dist/pkt-consent.js +1 -1
  91. package/dist/pkt-datepicker.cjs +1 -1
  92. package/dist/pkt-datepicker.js +1 -1
  93. package/dist/pkt-fileupload.cjs +1 -1
  94. package/dist/pkt-fileupload.js +1 -1
  95. package/dist/pkt-footer.cjs +1 -1
  96. package/dist/pkt-footer.js +1 -1
  97. package/dist/pkt-header-menu.cjs +1 -1
  98. package/dist/pkt-header-menu.js +1 -1
  99. package/dist/pkt-header.cjs +1 -1
  100. package/dist/pkt-header.js +1 -1
  101. package/dist/pkt-heading.cjs +1 -1
  102. package/dist/pkt-heading.js +1 -1
  103. package/dist/pkt-helptext.cjs +1 -1
  104. package/dist/pkt-helptext.js +1 -1
  105. package/dist/pkt-icon.cjs +1 -1
  106. package/dist/pkt-icon.js +1 -1
  107. package/dist/pkt-index.cjs +1 -1
  108. package/dist/pkt-index.js +34 -34
  109. package/dist/pkt-input-wrapper.cjs +1 -1
  110. package/dist/pkt-input-wrapper.js +1 -1
  111. package/dist/pkt-link.cjs +1 -1
  112. package/dist/pkt-link.js +1 -1
  113. package/dist/pkt-linkcard.cjs +1 -1
  114. package/dist/pkt-linkcard.js +1 -1
  115. package/dist/pkt-listbox.cjs +1 -1
  116. package/dist/pkt-listbox.js +1 -1
  117. package/dist/pkt-loader.cjs +1 -1
  118. package/dist/pkt-loader.js +1 -1
  119. package/dist/pkt-messagebox.cjs +1 -1
  120. package/dist/pkt-messagebox.js +1 -1
  121. package/dist/pkt-modal.cjs +1 -1
  122. package/dist/pkt-modal.js +1 -1
  123. package/dist/{pkt-options-controller-DXAAVcBJ.cjs → pkt-options-controller-BClk341e.cjs} +1 -1
  124. package/dist/{pkt-options-controller-XcIgx_v1.js → pkt-options-controller-v2bPM9iU.js} +1 -1
  125. package/dist/pkt-progressbar.cjs +1 -1
  126. package/dist/pkt-progressbar.js +1 -1
  127. package/dist/pkt-radiobutton.cjs +1 -1
  128. package/dist/pkt-radiobutton.js +1 -1
  129. package/dist/pkt-searchinput.cjs +1 -1
  130. package/dist/pkt-searchinput.js +1 -1
  131. package/dist/pkt-select.cjs +1 -1
  132. package/dist/pkt-select.js +1 -1
  133. package/dist/pkt-tabs.cjs +1 -1
  134. package/dist/pkt-tabs.js +1 -1
  135. package/dist/pkt-tag.cjs +1 -1
  136. package/dist/pkt-tag.js +1 -1
  137. package/dist/pkt-textarea.cjs +1 -1
  138. package/dist/pkt-textarea.js +1 -1
  139. package/dist/pkt-textinput.cjs +1 -1
  140. package/dist/pkt-textinput.js +1 -1
  141. package/dist/pkt-timepicker.cjs +1 -1
  142. package/dist/pkt-timepicker.js +1 -1
  143. package/dist/{progressbar-D1x6MwdY.js → progressbar-4WyR4T72.js} +5 -5
  144. package/dist/{progressbar-DsE4-qaW.cjs → progressbar-CJFGbev-.cjs} +1 -1
  145. package/dist/{radiobutton-CnGhAnjp.cjs → radiobutton-BQRtv7PK.cjs} +1 -1
  146. package/dist/{radiobutton-DWdn1O48.js → radiobutton-D7308uCY.js} +4 -4
  147. package/dist/{ref-DNowxdYH.js → ref-37-yxmc4.js} +2 -2
  148. package/dist/{ref-AuNEkS5a.cjs → ref-HT6KRjxp.cjs} +1 -1
  149. package/dist/{repeat-B3ksuY2F.cjs → repeat-Ddge5HTp.cjs} +1 -1
  150. package/dist/{repeat-CZ1oMXnW.js → repeat-DntD73oB.js} +2 -2
  151. package/dist/{searchinput-vi7twt5b.cjs → searchinput-D1cJ73Ki.cjs} +1 -1
  152. package/dist/{searchinput-CmyWnNr6.js → searchinput-j4IvYRzj.js} +4 -4
  153. package/dist/{select-CM-CcWab.js → select-B4gbFOil.js} +7 -7
  154. package/dist/{select-D761TXmv.cjs → select-oIF7UVvV.cjs} +1 -1
  155. package/dist/shared-strings/nb.d.ts +10 -0
  156. package/dist/{tabs-hiTrWsXq.cjs → tabs-95BpwB6j.cjs} +1 -1
  157. package/dist/{tabs-kxsX1ZEf.js → tabs-DexV26qJ.js} +4 -4
  158. package/dist/{tag-CGlxtBOH.cjs → tag-CQEyjF32.cjs} +1 -1
  159. package/dist/{tag-bztxjcF0.js → tag-DoUC99hn.js} +5 -5
  160. package/dist/{textarea-D3SeDZ1r.js → textarea-DGSMKcqK.js} +9 -9
  161. package/dist/{textarea-4s_SiG0_.cjs → textarea-DNFX958g.cjs} +1 -1
  162. package/dist/{textinput-uDRbleIa.cjs → textinput-Bzkdo2mN.cjs} +1 -1
  163. package/dist/{textinput-Dje0Zcsa.js → textinput-DpLeElI_.js} +8 -8
  164. package/dist/{timepicker--CrfIU_7.js → timepicker-CCNQeX5Q.js} +36 -27
  165. package/dist/timepicker-DCzhlRuc.cjs +198 -0
  166. package/package.json +2 -2
  167. package/src/components/combobox/combobox.ts +12 -0
  168. package/src/components/fileupload/fileupload.ts +1 -3
  169. package/src/components/header/header-global.test.ts +8 -0
  170. package/src/components/header/header-global.ts +13 -2
  171. package/src/components/header/header-service.test.ts +54 -0
  172. package/src/components/header/header-service.ts +20 -7
  173. package/src/components/header/header-user-menu.ts +10 -8
  174. package/src/components/header/types.ts +3 -2
  175. package/src/components/helptext/helptext-association.test.ts +108 -0
  176. package/src/components/timepicker/timepicker.ts +11 -0
  177. package/dist/combobox-B9Qo7hbt.cjs +0 -137
  178. package/dist/if-defined-BbUZeoaQ.cjs +0 -1
  179. package/dist/timepicker-auQ5Y6Et.cjs +0 -196
@@ -1,20 +1,21 @@
1
- import { _ as e, d as t, h as n, l as r, n as i, t as a, u as o } from "./element-J8nynuVk.js";
2
- import { t as s } from "./class-map-DSoj1J68.js";
3
- import { t as c } from "./if-defined-BILLSM7i.js";
4
- import { r as l, t as u } from "./element-with-slot-BOuXlWSY.js";
5
- import "./icon-DkVqRWbC.js";
6
- import "./button-D6QhHPWH.js";
7
- import { n as d, t as f } from "./ref-DNowxdYH.js";
8
- import { t as p } from "./booleanish-OQJTYSrw.js";
9
- import { n as m, o as h, t as g } from "./fetch-header-footer-data-Pc32etrk.js";
10
- import { n as _, t as v } from "./focus-trap-DG3pEuyJ.js";
11
- import { n as y, t as b } from "./scroll-lock-DAbNKAUy.js";
12
- import "./link-C7fOEv66.js";
13
- import "./textinput-Dje0Zcsa.js";
14
- import "./searchinput-CmyWnNr6.js";
15
- import "./header-menu-CIuu8_UC.js";
1
+ import { _ as e, d as t, h as n, l as r, n as i, t as a, u as o } from "./element-CqC-sGuC.js";
2
+ import { t as s } from "./class-map-D5GHsely.js";
3
+ import { t as c } from "./if-defined-BNXGXCwT.js";
4
+ import { t as l } from "./format-BTeSVkED.js";
5
+ import { r as u, t as d } from "./element-with-slot-D_OKDlYo.js";
6
+ import "./icon-B2v30QUk.js";
7
+ import "./button-BUl8uWWh.js";
8
+ import { n as f, t as p } from "./ref-37-yxmc4.js";
9
+ import { t as m } from "./booleanish-OQJTYSrw.js";
10
+ import { n as h, o as g, t as _ } from "./fetch-header-footer-data-Pc32etrk.js";
11
+ import { n as v, t as y } from "./focus-trap-DG3pEuyJ.js";
12
+ import { n as b, t as x } from "./scroll-lock-DAbNKAUy.js";
13
+ import "./link-BxKWhYsn.js";
14
+ import "./textinput-DpLeElI_.js";
15
+ import "./searchinput-j4IvYRzj.js";
16
+ import "./header-menu-CUHrJCvx.js";
16
17
  //#region ../../shared-types/header.ts
17
- var x = (e) => typeof e.target == "string" ? {
18
+ var S = (e) => typeof e.target == "string" ? {
18
19
  title: e.title,
19
20
  iconName: e.iconName,
20
21
  href: e.target
@@ -22,7 +23,7 @@ var x = (e) => typeof e.target == "string" ? {
22
23
  title: e.title,
23
24
  iconName: e.iconName,
24
25
  onClick: e.target
25
- }, S = (e) => x(e), C = (e) => {
26
+ }, C = (e) => S(e), w = (e) => {
26
27
  if (!e) return;
27
28
  let t = typeof e == "string" ? new Date(e) : e;
28
29
  if (!isNaN(t.getTime())) return t.toLocaleDateString("nb-NO", {
@@ -32,9 +33,9 @@ var x = (e) => typeof e.target == "string" ? {
32
33
  hour: "2-digit",
33
34
  minute: "2-digit"
34
35
  });
35
- }, w = class {
36
+ }, T = class {
36
37
  constructor(e, t) {
37
- this.isMobile = !1, this.isTablet = !1, this.isHidden = !1, this.pauseScrollHide = !1, this.componentWidth = typeof window < "u" ? window.innerWidth : 0, this.lastScrollPosition = 0, this.scrollLockToken = b(), this.lastFocusedElement = null, this.shouldRestoreFocus = !1, this.handleScroll = () => {
38
+ this.isMobile = !1, this.isTablet = !1, this.isHidden = !1, this.pauseScrollHide = !1, this.componentWidth = typeof window < "u" ? window.innerWidth : 0, this.lastScrollPosition = 0, this.scrollLockToken = x(), this.lastFocusedElement = null, this.shouldRestoreFocus = !1, this.handleScroll = () => {
38
39
  if (this.getOptions().scrollBehavior !== "hide" || this.pauseScrollHide) return;
39
40
  let e = window.pageYOffset || document.documentElement.scrollTop;
40
41
  if (e < 0 || Math.abs(e - this.lastScrollPosition) < 60) return;
@@ -46,7 +47,7 @@ var x = (e) => typeof e.target == "string" ? {
46
47
  window.addEventListener("scroll", this.handleScroll);
47
48
  }
48
49
  hostDisconnected() {
49
- this.resizeObserver?.disconnect(), window.removeEventListener("scroll", this.handleScroll), y(this.scrollLockToken, !1);
50
+ this.resizeObserver?.disconnect(), window.removeEventListener("scroll", this.handleScroll), b(this.scrollLockToken, !1);
50
51
  }
51
52
  observe(e) {
52
53
  e && (this.componentWidth = e.offsetWidth, this.refreshBreakpoints(), this.resizeObserver = new ResizeObserver((e) => {
@@ -58,7 +59,7 @@ var x = (e) => typeof e.target == "string" ? {
58
59
  (n !== this.isMobile || r !== this.isTablet) && (this.isMobile = n, this.isTablet = r, this.host.requestUpdate());
59
60
  }
60
61
  setScrollLock(e) {
61
- y(this.scrollLockToken, e);
62
+ b(this.scrollLockToken, e);
62
63
  }
63
64
  captureFocus() {
64
65
  this.lastFocusedElement = document.activeElement;
@@ -69,7 +70,7 @@ var x = (e) => typeof e.target == "string" ? {
69
70
  restoreFocus() {
70
71
  this.shouldRestoreFocus && this.lastFocusedElement && document.contains(this.lastFocusedElement) && this.lastFocusedElement.focus(), this.lastFocusedElement = null, this.shouldRestoreFocus = !1;
71
72
  }
72
- }, T = class extends a {
73
+ }, E = class extends a {
73
74
  constructor(...e) {
74
75
  super(...e), this.canChangeRepresentation = !1, this.logoutOnClick = !1;
75
76
  }
@@ -125,18 +126,18 @@ var x = (e) => typeof e.target == "string" ? {
125
126
  `;
126
127
  }
127
128
  render() {
128
- let t = this.userMenu?.map(S);
129
+ let t = this.userMenu?.map(C), r = this.pktStrings.get("header");
129
130
  return e`
130
- <nav class="pkt-user-menu" aria-label="Meny for innlogget bruker">
131
+ <nav class="pkt-user-menu" aria-label=${r.userMenuLabel}>
131
132
  <ul class="pkt-user-menu__list">
132
133
  <!-- User section -->
133
134
  ${this.user ? e`
134
135
  <li class="pkt-user-menu__item">
135
- <div class="pkt-user-menu__label">Pålogget som</div>
136
+ <div class="pkt-user-menu__label">${r.loggedInAs}</div>
136
137
  <div class="pkt-user-menu__name" translate="no">${this.user.name}</div>
137
138
  ${this.formattedLastLoggedIn ? e`
138
139
  <div class="pkt-user-menu__last-logged-in">
139
- Sist pålogget: <time>${this.formattedLastLoggedIn}</time>
140
+ ${r.lastLoggedIn} <time>${this.formattedLastLoggedIn}</time>
140
141
  </div>
141
142
  ` : n}
142
143
  </li>
@@ -150,16 +151,16 @@ var x = (e) => typeof e.target == "string" ? {
150
151
  <!-- Representing section -->
151
152
  ${this.representing ? e`
152
153
  <li class="pkt-user-menu__item">
153
- <div class="pkt-user-menu__label">Representerer</div>
154
+ <div class="pkt-user-menu__label">${r.representing}</div>
154
155
  <div class="pkt-user-menu__name" translate="no">${this.representing.name}</div>
155
156
  ${this.representing.orgNumber ? e`<div class="pkt-user-menu__org-number">
156
- Org.nr. ${this.representing.orgNumber}
157
+ ${l(r.orgNumber, { number: this.representing.orgNumber })}
157
158
  </div>` : n}
158
159
  ${this.canChangeRepresentation ? e`
159
160
  <ul class="pkt-user-menu__sublist mt-size-16">
160
161
  <li class="pkt-user-menu__subitem">
161
162
  ${this.renderLinkOrButton({
162
- title: "Endre organisasjon",
163
+ title: r.changeRepresentation,
163
164
  iconName: "cogwheel",
164
165
  onClick: () => this.handleChangeRepresentation()
165
166
  })}
@@ -175,7 +176,7 @@ var x = (e) => typeof e.target == "string" ? {
175
176
  <ul class="pkt-user-menu__sublist">
176
177
  <li class="pkt-user-menu__subitem">
177
178
  ${this.renderLinkOrButton({
178
- title: "Endre organisasjon",
179
+ title: r.changeRepresentation,
179
180
  iconName: "cogwheel",
180
181
  onClick: () => this.handleChangeRepresentation()
181
182
  })}
@@ -188,7 +189,7 @@ var x = (e) => typeof e.target == "string" ? {
188
189
  ${this.logoutOnClick ? e`
189
190
  <li class="pkt-user-menu__item">
190
191
  ${this.renderLinkOrButton({
191
- title: "Logg ut",
192
+ title: r.logOut,
192
193
  iconName: "exit",
193
194
  onClick: () => this.handleLogout()
194
195
  })}
@@ -199,33 +200,33 @@ var x = (e) => typeof e.target == "string" ? {
199
200
  `;
200
201
  }
201
202
  };
202
- i([o({ type: Object })], T.prototype, "user", void 0), i([o({
203
+ i([o({ type: Object })], E.prototype, "user", void 0), i([o({
203
204
  type: String,
204
205
  attribute: "formatted-last-logged-in"
205
- })], T.prototype, "formattedLastLoggedIn", void 0), i([o({ type: Object })], T.prototype, "representing", void 0), i([o({
206
+ })], E.prototype, "formattedLastLoggedIn", void 0), i([o({ type: Object })], E.prototype, "representing", void 0), i([o({
206
207
  type: Array,
207
208
  attribute: "user-menu"
208
- })], T.prototype, "userMenu", void 0), i([o({
209
+ })], E.prototype, "userMenu", void 0), i([o({
209
210
  type: Boolean,
210
211
  attribute: "can-change-representation",
211
- converter: p
212
- })], T.prototype, "canChangeRepresentation", void 0), i([o({
212
+ converter: m
213
+ })], E.prototype, "canChangeRepresentation", void 0), i([o({
213
214
  type: Boolean,
214
215
  attribute: "logout-on-click",
215
- converter: p
216
- })], T.prototype, "logoutOnClick", void 0);
216
+ converter: m
217
+ })], E.prototype, "logoutOnClick", void 0);
217
218
  try {
218
- t("pkt-header-user-menu")(T);
219
+ t("pkt-header-user-menu")(E);
219
220
  } catch {
220
221
  console.warn("Forsøker å definere <pkt-header-user-menu>, men den er allerede definert");
221
222
  }
222
223
  //#endregion
223
224
  //#region src/components/header/header-service.ts
224
- var E = "https://punkt-cdn.oslo.kommune.no/latest/logos/";
225
- typeof window < "u" && (window.pktLogoPath = window.pktLogoPath || E);
226
- var D = class extends u {
225
+ var D = "https://punkt-cdn.oslo.kommune.no/latest/logos/";
226
+ typeof window < "u" && (window.pktLogoPath = window.pktLogoPath || D);
227
+ var O = class extends d {
227
228
  constructor(...e) {
228
- super(...e), this.logoLink = h, this.logoPath = typeof window < "u" ? window.pktLogoPath : E, this.searchValue = "", this.mobileBreakpoint = 768, this.tabletBreakpoint = 1280, this.openedMenu = "none", this.logOutButtonPlacement = "none", this.position = "fixed", this.scrollBehavior = "hide", this.slotMenuVariant = "icon-only", this.slotMenuText = "Meny", this.hideLogo = !1, this.compact = !1, this.showSearch = !1, this.canChangeRepresentation = !1, this.hasLogOut = !1, this.openMenu = "none", this.alignSlotRight = !1, this.alignSearchRight = !1, this.headerRef = f(), this.userContainerRef = f(), this.slotContainerRef = f(), this.searchContainerRef = f(), this.slotContentRef = f(), this.searchMenuRef = f(), this.chrome = new w(this, () => ({
229
+ super(...e), this.logoLink = g, this.logoPath = typeof window < "u" ? window.pktLogoPath : D, this.searchValue = "", this.mobileBreakpoint = 768, this.tabletBreakpoint = 1280, this.openedMenu = "none", this.logOutButtonPlacement = "none", this.position = "fixed", this.scrollBehavior = "hide", this.slotMenuVariant = "icon-only", this.hideLogo = !1, this.compact = !1, this.showSearch = !1, this.canChangeRepresentation = !1, this.hasLogOut = !1, this.openMenu = "none", this.alignSlotRight = !1, this.alignSearchRight = !1, this.headerRef = p(), this.userContainerRef = p(), this.slotContainerRef = p(), this.searchContainerRef = p(), this.slotContentRef = p(), this.searchMenuRef = p(), this.chrome = new T(this, () => ({
229
230
  mobileBreakpoint: this.mobileBreakpoint,
230
231
  tabletBreakpoint: this.tabletBreakpoint,
231
232
  position: this.position,
@@ -329,7 +330,7 @@ var D = class extends u {
329
330
  e.key === "Enter" && this.handleSearch(e.target.value);
330
331
  }
331
332
  get formattedLastLoggedIn() {
332
- return C(this.user?.lastLoggedIn);
333
+ return w(this.user?.lastLoggedIn);
333
334
  }
334
335
  get isFixed() {
335
336
  return this.position === "fixed";
@@ -354,13 +355,21 @@ var D = class extends u {
354
355
  let t = e`
355
356
  <pkt-icon name="oslologo" aria-hidden="true" path=${this.logoPath}></pkt-icon>
356
357
  `;
357
- return e`
358
+ return this.logoLink ? e`
358
359
  <span class="pkt-header-service__logo">
359
- <a href=${this.logoLink} aria-label="Tilbake til forside" @click=${this.handleLogoClick}>
360
+ <a
361
+ href=${this.logoLink}
362
+ aria-label=${this.headerStrings.logoLabel}
363
+ @click=${this.handleLogoClick}
364
+ >
360
365
  ${t}
361
366
  </a>
362
367
  </span>
363
- `;
368
+ ` : e`
369
+ <span class="pkt-header-service__logo" role="img" aria-label=${this.headerStrings.logoAlt}>
370
+ ${t}
371
+ </span>
372
+ `;
364
373
  }
365
374
  renderServiceName() {
366
375
  return this.serviceName ? this.serviceLink && typeof this.serviceLink == "string" ? e`
@@ -405,7 +414,7 @@ var D = class extends u {
405
414
  <div
406
415
  class=${t}
407
416
  @focusout=${(e) => this.handleFocusOut(e, "slot")}
408
- ${d(this.slotContainerRef)}
417
+ ${f(this.slotContainerRef)}
409
418
  >
410
419
  ${this.isTablet && this.hasSlotContent() ? e`
411
420
  <pkt-button
@@ -419,18 +428,18 @@ var D = class extends u {
419
428
  aria-controls="mobile-slot-menu"
420
429
  aria-label=${this.headerStrings.openMenu}
421
430
  >
422
- ${this.slotMenuText}
431
+ ${this.slotMenuText ?? this.headerStrings.menu}
423
432
  </pkt-button>
424
433
  ` : n}
425
434
  <div
426
435
  class=${r}
427
436
  id="mobile-slot-menu"
428
437
  role=${this.isTablet ? "group" : n}
429
- aria-label=${this.isTablet ? "Meny" : n}
438
+ aria-label=${this.isTablet ? this.headerStrings.menu : n}
430
439
  @click=${this.handleSlotContentClick}
431
- ${d(this.slotContentRef)}
440
+ ${f(this.slotContentRef)}
432
441
  >
433
- ${l(this)}
442
+ ${u(this)}
434
443
  </div>
435
444
  </div>
436
445
  `;
@@ -450,7 +459,7 @@ var D = class extends u {
450
459
  <div
451
460
  class=${t}
452
461
  @focusout=${(e) => this.handleFocusOut(e, "search")}
453
- ${d(this.searchContainerRef)}
462
+ ${f(this.searchContainerRef)}
454
463
  >
455
464
  <pkt-button
456
465
  skin="secondary"
@@ -465,7 +474,7 @@ var D = class extends u {
465
474
  >
466
475
  ${this.headerStrings.search}
467
476
  </pkt-button>
468
- <div class=${r} ${d(this.searchMenuRef)}>
477
+ <div class=${r} ${f(this.searchMenuRef)}>
469
478
  ${this.openMenu === "search" ? e`
470
479
  <pkt-textinput
471
480
  id="mobile-search-menu"
@@ -512,7 +521,7 @@ var D = class extends u {
512
521
  <div
513
522
  class="pkt-header-service__user-container"
514
523
  @focusout=${(e) => this.handleFocusOut(e, "user")}
515
- ${d(this.userContainerRef)}
524
+ ${f(this.userContainerRef)}
516
525
  >
517
526
  <pkt-button
518
527
  class=${s({
@@ -527,12 +536,13 @@ var D = class extends u {
527
536
  secondIconName=${this.openMenu === "user" ? "chevron-thin-up" : "chevron-thin-down"}
528
537
  @click=${() => this.handleMenuToggle("user")}
529
538
  >
530
- <span class="pkt-sr-only">Brukermeny: </span>
539
+ <span class="pkt-sr-only">${this.headerStrings.userMenuButton} </span>
531
540
  <span translate="no">${this.representing?.name || this.user.name}</span>
532
541
  </pkt-button>
533
542
  ${this.openMenu === "user" && this.user ? e`
534
543
  <div class=${t}>
535
544
  <pkt-header-user-menu
545
+ .strings=${this.strings}
536
546
  .user=${this.user}
537
547
  formatted-last-logged-in=${this.formattedLastLoggedIn || n}
538
548
  .representing=${this.representing}
@@ -565,7 +575,7 @@ var D = class extends u {
565
575
  "pkt-header-service__logo-area--without-service": !this.serviceName
566
576
  });
567
577
  return e`
568
- <header class=${t} ${d(this.headerRef)}>
578
+ <header class=${t} ${f(this.headerRef)}>
569
579
  <div class=${r}>${this.renderLogo()} ${this.renderServiceName()}</div>
570
580
 
571
581
  ${this.hasSlotContent() || this.showSearch || this.showLogoutInHeader ? e`<div class="pkt-header-service__content">
@@ -578,7 +588,7 @@ var D = class extends u {
578
588
  iconName="exit"
579
589
  @click=${this.handleLogout}
580
590
  >
581
- Logg ut
591
+ ${this.headerStrings.logOut}
582
592
  </pkt-button>
583
593
  ` : n}
584
594
  </div>` : n}
@@ -592,7 +602,7 @@ var D = class extends u {
592
602
  iconName="exit"
593
603
  @click=${this.handleLogout}
594
604
  >
595
- Logg ut
605
+ ${this.headerStrings.logOut}
596
606
  </pkt-button>
597
607
  ` : n}
598
608
  </div>` : n}
@@ -622,95 +632,95 @@ var D = class extends u {
622
632
  i([o({
623
633
  type: String,
624
634
  attribute: "service-name"
625
- })], D.prototype, "serviceName", void 0), i([o({
635
+ })], O.prototype, "serviceName", void 0), i([o({
626
636
  type: String,
627
637
  attribute: "service-link"
628
- })], D.prototype, "serviceLink", void 0), i([o({
638
+ })], O.prototype, "serviceLink", void 0), i([o({
629
639
  type: String,
630
640
  attribute: "logo-link"
631
- })], D.prototype, "logoLink", void 0), i([o({
641
+ })], O.prototype, "logoLink", void 0), i([o({
632
642
  type: String,
633
643
  attribute: "logo-path"
634
- })], D.prototype, "logoPath", void 0), i([o({
644
+ })], O.prototype, "logoPath", void 0), i([o({
635
645
  type: String,
636
646
  attribute: "search-placeholder"
637
- })], D.prototype, "searchPlaceholder", void 0), i([o({
647
+ })], O.prototype, "searchPlaceholder", void 0), i([o({
638
648
  type: String,
639
649
  attribute: "search-value"
640
- })], D.prototype, "searchValue", void 0), i([o({
650
+ })], O.prototype, "searchValue", void 0), i([o({
641
651
  type: Number,
642
652
  attribute: "mobile-breakpoint"
643
- })], D.prototype, "mobileBreakpoint", void 0), i([o({
653
+ })], O.prototype, "mobileBreakpoint", void 0), i([o({
644
654
  type: Number,
645
655
  attribute: "tablet-breakpoint"
646
- })], D.prototype, "tabletBreakpoint", void 0), i([o({
656
+ })], O.prototype, "tabletBreakpoint", void 0), i([o({
647
657
  type: String,
648
658
  attribute: "opened-menu"
649
- })], D.prototype, "openedMenu", void 0), i([o({
659
+ })], O.prototype, "openedMenu", void 0), i([o({
650
660
  type: String,
651
661
  attribute: "log-out-button-placement"
652
- })], D.prototype, "logOutButtonPlacement", void 0), i([o({ type: String })], D.prototype, "position", void 0), i([o({
662
+ })], O.prototype, "logOutButtonPlacement", void 0), i([o({ type: String })], O.prototype, "position", void 0), i([o({
653
663
  type: String,
654
664
  attribute: "scroll-behavior"
655
- })], D.prototype, "scrollBehavior", void 0), i([o({
665
+ })], O.prototype, "scrollBehavior", void 0), i([o({
656
666
  type: String,
657
667
  attribute: "slot-menu-variant"
658
- })], D.prototype, "slotMenuVariant", void 0), i([o({
668
+ })], O.prototype, "slotMenuVariant", void 0), i([o({
659
669
  type: String,
660
670
  attribute: "slot-menu-text"
661
- })], D.prototype, "slotMenuText", void 0), i([o({
671
+ })], O.prototype, "slotMenuText", void 0), i([o({
662
672
  type: Boolean,
663
673
  attribute: "hide-logo",
664
- converter: p
665
- })], D.prototype, "hideLogo", void 0), i([o({
674
+ converter: m
675
+ })], O.prototype, "hideLogo", void 0), i([o({
666
676
  type: Boolean,
667
- converter: p
668
- })], D.prototype, "compact", void 0), i([o({
677
+ converter: m
678
+ })], O.prototype, "compact", void 0), i([o({
669
679
  type: Boolean,
670
680
  attribute: "show-search",
671
- converter: p
672
- })], D.prototype, "showSearch", void 0), i([o({
681
+ converter: m
682
+ })], O.prototype, "showSearch", void 0), i([o({
673
683
  type: Boolean,
674
684
  attribute: "can-change-representation",
675
- converter: p
676
- })], D.prototype, "canChangeRepresentation", void 0), i([o({
685
+ converter: m
686
+ })], O.prototype, "canChangeRepresentation", void 0), i([o({
677
687
  type: Boolean,
678
688
  attribute: "has-log-out",
679
- converter: p
680
- })], D.prototype, "hasLogOut", void 0), i([o({ type: Object })], D.prototype, "user", void 0), i([o({
689
+ converter: m
690
+ })], O.prototype, "hasLogOut", void 0), i([o({ type: Object })], O.prototype, "user", void 0), i([o({
681
691
  type: Array,
682
692
  attribute: "user-menu"
683
- })], D.prototype, "userMenu", void 0), i([o({ type: Object })], D.prototype, "representing", void 0), i([r()], D.prototype, "openMenu", void 0), i([r()], D.prototype, "alignSlotRight", void 0), i([r()], D.prototype, "alignSearchRight", void 0);
693
+ })], O.prototype, "userMenu", void 0), i([o({ type: Object })], O.prototype, "representing", void 0), i([r()], O.prototype, "openMenu", void 0), i([r()], O.prototype, "alignSlotRight", void 0), i([r()], O.prototype, "alignSearchRight", void 0);
684
694
  try {
685
- t("pkt-header-service")(D);
695
+ t("pkt-header-service")(O);
686
696
  } catch {
687
697
  console.warn("Forsøker å definere <pkt-header-service>, men den er allerede definert");
688
698
  }
689
699
  //#endregion
690
700
  //#region src/components/header/header-global.ts
691
- var O = "https://punkt-cdn.oslo.kommune.no/latest/logos/";
692
- typeof window < "u" && (window.pktLogoPath = window.pktLogoPath || O);
693
- var k = "pkt-header-global-menu", A = "pkt-header-global-menu-toggle", j = "pkt-header-global-search-panel", M = "pkt-header-global-search-toggle", N = class extends a {
701
+ var k = "https://punkt-cdn.oslo.kommune.no/latest/logos/";
702
+ typeof window < "u" && (window.pktLogoPath = window.pktLogoPath || k);
703
+ var A = "pkt-header-global-menu", j = "pkt-header-global-menu-toggle", M = "pkt-header-global-search-panel", N = "pkt-header-global-search-toggle", P = class extends a {
694
704
  constructor(...e) {
695
- super(...e), this.locale = "nb-NO", this.logoLink = h, this.logoPath = typeof window < "u" ? window.pktLogoPath : O, this.position = "fixed", this.scrollBehavior = "hide", this.mobileBreakpoint = 768, this.tabletBreakpoint = 1024, this.logOutButtonPlacement = "none", this.showSearch = !0, this.showContact = !0, this.canChangeRepresentation = !1, this.hasLogOut = !1, this.openMenu = "none", this.loadError = !1, this.headerAnchor = {
705
+ super(...e), this.locale = "nb-NO", this.logoLink = g, this.logoPath = typeof window < "u" ? window.pktLogoPath : k, this.position = "fixed", this.scrollBehavior = "hide", this.mobileBreakpoint = 768, this.tabletBreakpoint = 1024, this.logOutButtonPlacement = "none", this.showSearch = !0, this.showContact = !0, this.canChangeRepresentation = !1, this.hasLogOut = !1, this.openMenu = "none", this.loadError = !1, this.headerAnchor = {
696
706
  top: 0,
697
707
  left: 0,
698
708
  width: 0
699
- }, this.headerRef = f(), this.menuContainerRef = f(), this.userContainerRef = f(), this.chrome = new w(this, () => ({
709
+ }, this.headerRef = p(), this.menuContainerRef = p(), this.userContainerRef = p(), this.chrome = new T(this, () => ({
700
710
  mobileBreakpoint: this.mobileBreakpoint,
701
711
  tabletBreakpoint: this.tabletBreakpoint,
702
712
  position: this.position,
703
713
  scrollBehavior: this.scrollBehavior
704
714
  })), this.handleClickOutside = (e) => {
705
715
  let t = e.target;
706
- this.openMenu === "user" && !t.closest(".pkt-header-global__user-container") && !t.closest(".pkt-header-global__user-menu") && (this.openMenu = "none"), this.openMenu === "menu" && !t.closest(".pkt-header-menu") && !t.closest(`#${A}`) && (this.openMenu = "none"), this.openMenu === "search" && !t.closest(".pkt-header-global__search-panel-inner") && !t.closest(`#${M}`) && (this.openMenu = "none");
716
+ this.openMenu === "user" && !t.closest(".pkt-header-global__user-container") && !t.closest(".pkt-header-global__user-menu") && (this.openMenu = "none"), this.openMenu === "menu" && !t.closest(".pkt-header-menu") && !t.closest(`#${j}`) && (this.openMenu = "none"), this.openMenu === "search" && !t.closest(".pkt-header-global__search-panel-inner") && !t.closest(`#${N}`) && (this.openMenu = "none");
707
717
  }, this.handleEscapeKey = (e) => {
708
718
  e.key === "Escape" && this.openMenu !== "none" && (e.preventDefault(), this.chrome.flagRestoreFocus(), this.openMenu = "none");
709
719
  }, this.handleOverlayKeydown = (e) => {
710
720
  if (e.key !== "Tab") return;
711
721
  let t = this.activeOverlay;
712
722
  if (!t || !t.panel || !t.toggle) return;
713
- let { panel: n, toggle: r } = t, i = _(n), a = v();
723
+ let { panel: n, toggle: r } = t, i = v(n), a = y();
714
724
  if (a && r.contains(a)) {
715
725
  !e.shiftKey && i.length > 0 && (e.preventDefault(), i[0].focus());
716
726
  return;
@@ -763,14 +773,14 @@ var k = "pkt-header-global-menu", A = "pkt-header-global-menu-toggle", j = "pkt-
763
773
  this.openMenu !== "none" && (t === "none" || t === void 0) ? (document.addEventListener("mousedown", this.handleClickOutside), document.addEventListener("keydown", this.handleEscapeKey)) : this.openMenu === "none" && t && t !== "none" && (document.removeEventListener("mousedown", this.handleClickOutside), document.removeEventListener("keydown", this.handleEscapeKey), this.chrome.restoreFocus());
764
774
  let n = t === "menu" || t === "search", r = this.openMenu === "menu" || this.openMenu === "search";
765
775
  r && !n ? (document.addEventListener("keydown", this.handleOverlayKeydown), document.addEventListener("focusin", this.handleOverlayFocusIn)) : !r && n && (document.removeEventListener("keydown", this.handleOverlayKeydown), document.removeEventListener("focusin", this.handleOverlayFocusIn)), this.openMenu === "search" && t !== "search" && requestAnimationFrame(() => {
766
- this.querySelector(`#${j} input`)?.focus();
776
+ this.querySelector(`#${M} input`)?.focus();
767
777
  }), this.chrome.pauseScrollHide = this.openMenu !== "none", this.chrome.setScrollLock(this.openMenu === "menu" || this.openMenu === "search");
768
778
  }
769
779
  }
770
780
  async loadData() {
771
781
  this.abortController?.abort(), this.abortController = new AbortController(), this.loadError = !1;
772
782
  try {
773
- let e = await g(this.dataUrl, this.abortController.signal);
783
+ let e = await _(this.dataUrl, this.abortController.signal);
774
784
  this.fetchedData = e, this.emitDataLoaded(e);
775
785
  } catch (e) {
776
786
  if (e.name === "AbortError") return;
@@ -792,7 +802,7 @@ var k = "pkt-header-global-menu", A = "pkt-header-global-menu-toggle", j = "pkt-
792
802
  return this.data ?? this.fetchedData;
793
803
  }
794
804
  get localeData() {
795
- return m(this.effectiveData, this.locale);
805
+ return h(this.effectiveData, this.locale);
796
806
  }
797
807
  get shouldHideOnScroll() {
798
808
  return this.scrollBehavior === "hide";
@@ -809,10 +819,10 @@ var k = "pkt-header-global-menu", A = "pkt-header-global-menu-toggle", j = "pkt-
809
819
  get activeOverlay() {
810
820
  return this.openMenu === "menu" ? {
811
821
  panel: this.menuContainerRef.value ?? null,
812
- toggle: this.querySelector(`#${A}`)
822
+ toggle: this.querySelector(`#${j}`)
813
823
  } : this.openMenu === "search" ? {
814
- panel: this.querySelector(`#${j}`),
815
- toggle: this.querySelector(`#${M}`)
824
+ panel: this.querySelector(`#${M}`),
825
+ toggle: this.querySelector(`#${N}`)
816
826
  } : null;
817
827
  }
818
828
  focusToggle(e) {
@@ -838,7 +848,7 @@ var k = "pkt-header-global-menu", A = "pkt-header-global-menu-toggle", j = "pkt-
838
848
  }));
839
849
  }
840
850
  get formattedLastLoggedIn() {
841
- return C(this.user?.lastLoggedIn);
851
+ return w(this.user?.lastLoggedIn);
842
852
  }
843
853
  get showLogoutInUserMenu() {
844
854
  return this.hasLogOut && (this.logOutButtonPlacement === "userMenu" || this.logOutButtonPlacement === "both");
@@ -851,16 +861,20 @@ var k = "pkt-header-global-menu", A = "pkt-header-global-menu-toggle", j = "pkt-
851
861
  }));
852
862
  }
853
863
  renderLogo() {
854
- let t = e`
864
+ let t = this.pktStrings.get("header"), n = e`
855
865
  <pkt-icon name="oslologo" aria-hidden="true" path=${c(this.logoPath)}></pkt-icon>
856
866
  `;
857
- return e`
867
+ return this.logoLink ? e`
858
868
  <span class="pkt-header-global__logo">
859
- <a href=${this.logoLink} aria-label="Til hovedsiden" @click=${this.handleLogoClick}>
860
- ${t}
869
+ <a href=${this.logoLink} aria-label=${t.logoLabel} @click=${this.handleLogoClick}>
870
+ ${n}
861
871
  </a>
862
872
  </span>
863
- `;
873
+ ` : e`
874
+ <span class="pkt-header-global__logo" role="img" aria-label=${t.logoAlt}>
875
+ ${n}
876
+ </span>
877
+ `;
864
878
  }
865
879
  renderSearch(t) {
866
880
  if (!this.showSearch) return n;
@@ -907,7 +921,7 @@ var k = "pkt-header-global-menu", A = "pkt-header-global-menu-toggle", j = "pkt-
907
921
  let n = t?.i18n?.menu || this.pktStrings.get("header").menu, r = this.openMenu === "menu";
908
922
  return e`
909
923
  <pkt-button
910
- id=${A}
924
+ id=${j}
911
925
  class="pkt-header-global__menu-toggle"
912
926
  skin=${this.isMobile ? "tertiary" : "secondary"}
913
927
  variant=${this.isMobile ? "icon-only" : "icon-right"}
@@ -915,7 +929,7 @@ var k = "pkt-header-global-menu", A = "pkt-header-global-menu-toggle", j = "pkt-
915
929
  size=${this.isTablet ? "small" : "medium"}
916
930
  state=${r ? "active" : "normal"}
917
931
  aria-expanded=${r}
918
- aria-controls=${k}
932
+ aria-controls=${A}
919
933
  ?disabled=${this.isLoading}
920
934
  @click=${() => this.toggleMenu("menu")}
921
935
  >
@@ -928,7 +942,7 @@ var k = "pkt-header-global-menu", A = "pkt-header-global-menu-toggle", j = "pkt-
928
942
  let r = this.openMenu === "search";
929
943
  return e`
930
944
  <pkt-button
931
- id=${M}
945
+ id=${N}
932
946
  class="pkt-header-global__search-toggle"
933
947
  skin="primary"
934
948
  color=${c(r ? void 0 : "yellow")}
@@ -937,7 +951,7 @@ var k = "pkt-header-global-menu", A = "pkt-header-global-menu-toggle", j = "pkt-
937
951
  size=${this.isMobile ? "small" : "medium"}
938
952
  state=${r ? "active" : "normal"}
939
953
  aria-expanded=${r}
940
- aria-controls=${j}
954
+ aria-controls=${M}
941
955
  @click=${() => this.toggleMenu("search")}
942
956
  >
943
957
  ${t.i18n?.search || this.pktStrings.get("header").search}
@@ -952,7 +966,7 @@ var k = "pkt-header-global-menu", A = "pkt-header-global-menu-toggle", j = "pkt-
952
966
  [`pkt-header-global__search-panel--${this.overlayBreakpointClass}`]: !!this.overlayBreakpointClass
953
967
  });
954
968
  return e`
955
- <div class=${a} id=${j} style=${this.overlayAnchorStyle}>
969
+ <div class=${a} id=${M} style=${this.overlayAnchorStyle}>
956
970
  <div class="pkt-header-global__search-panel-inner">
957
971
  <pkt-searchinput
958
972
  appearance="global"
@@ -979,7 +993,7 @@ var k = "pkt-header-global-menu", A = "pkt-header-global-menu-toggle", j = "pkt-
979
993
  <div class="pkt-header-global__user">
980
994
  <div
981
995
  class="pkt-header-global__user-container ${t ? "is-open" : ""}"
982
- ${d(this.userContainerRef)}
996
+ ${f(this.userContainerRef)}
983
997
  >
984
998
  <pkt-button
985
999
  class="pkt-header-global__user-button"
@@ -991,12 +1005,13 @@ var k = "pkt-header-global-menu", A = "pkt-header-global-menu-toggle", j = "pkt-
991
1005
  secondIconName=${t ? "chevron-thin-up" : "chevron-thin-down"}
992
1006
  @click=${() => this.toggleMenu("user")}
993
1007
  >
994
- <span class="pkt-sr-only">Brukermeny: </span>
1008
+ <span class="pkt-sr-only">${this.pktStrings.get("header").userMenuButton} </span>
995
1009
  <span translate="no">${this.representing?.name || this.user.name}</span>
996
1010
  </pkt-button>
997
1011
  ${t ? e`
998
1012
  <div class=${r}>
999
1013
  <pkt-header-user-menu
1014
+ .strings=${this.strings}
1000
1015
  .user=${this.user}
1001
1016
  formatted-last-logged-in=${this.formattedLastLoggedIn || n}
1002
1017
  .representing=${this.representing}
@@ -1024,9 +1039,9 @@ var k = "pkt-header-global-menu", A = "pkt-header-global-menu-toggle", j = "pkt-
1024
1039
  return e`
1025
1040
  <div
1026
1041
  class=${t}
1027
- id=${k}
1042
+ id=${A}
1028
1043
  style=${this.overlayAnchorStyle}
1029
- ${d(this.menuContainerRef)}
1044
+ ${f(this.menuContainerRef)}
1030
1045
  >
1031
1046
  ${this.localeData ? e`
1032
1047
  <pkt-header-menu
@@ -1054,7 +1069,7 @@ var k = "pkt-header-global-menu", A = "pkt-header-global-menu-toggle", j = "pkt-
1054
1069
  "pkt-header-global--hidden": this.isHidden
1055
1070
  }), r = this.localeData, i = this.isMobile;
1056
1071
  return e`
1057
- <header class=${t} ${d(this.headerRef)}>
1072
+ <header class=${t} ${f(this.headerRef)}>
1058
1073
  <div class="pkt-header-global__logo-area">${this.renderLogo()}</div>
1059
1074
  <div class="pkt-header-global__content">
1060
1075
  ${!i && r ? this.renderSearch(r) : n}
@@ -1089,58 +1104,58 @@ var k = "pkt-header-global-menu", A = "pkt-header-global-menu-toggle", j = "pkt-
1089
1104
  i([o({
1090
1105
  type: String,
1091
1106
  attribute: "data-url"
1092
- })], N.prototype, "dataUrl", void 0), i([o({
1107
+ })], P.prototype, "dataUrl", void 0), i([o({
1093
1108
  type: Object,
1094
1109
  attribute: !1
1095
- })], N.prototype, "data", void 0), i([o({ type: String })], N.prototype, "locale", void 0), i([o({
1110
+ })], P.prototype, "data", void 0), i([o({ type: String })], P.prototype, "locale", void 0), i([o({
1096
1111
  type: String,
1097
1112
  attribute: "logo-link"
1098
- })], N.prototype, "logoLink", void 0), i([o({
1113
+ })], P.prototype, "logoLink", void 0), i([o({
1099
1114
  type: String,
1100
1115
  attribute: "logo-path"
1101
- })], N.prototype, "logoPath", void 0), i([o({
1116
+ })], P.prototype, "logoPath", void 0), i([o({
1102
1117
  type: String,
1103
1118
  attribute: "search-placeholder"
1104
- })], N.prototype, "searchPlaceholder", void 0), i([o({ type: String })], N.prototype, "position", void 0), i([o({
1119
+ })], P.prototype, "searchPlaceholder", void 0), i([o({ type: String })], P.prototype, "position", void 0), i([o({
1105
1120
  type: String,
1106
1121
  attribute: "scroll-behavior"
1107
- })], N.prototype, "scrollBehavior", void 0), i([o({
1122
+ })], P.prototype, "scrollBehavior", void 0), i([o({
1108
1123
  type: Number,
1109
1124
  attribute: "mobile-breakpoint"
1110
- })], N.prototype, "mobileBreakpoint", void 0), i([o({
1125
+ })], P.prototype, "mobileBreakpoint", void 0), i([o({
1111
1126
  type: Number,
1112
1127
  attribute: "tablet-breakpoint"
1113
- })], N.prototype, "tabletBreakpoint", void 0), i([o({
1128
+ })], P.prototype, "tabletBreakpoint", void 0), i([o({
1114
1129
  type: String,
1115
1130
  attribute: "log-out-button-placement"
1116
- })], N.prototype, "logOutButtonPlacement", void 0), i([o({
1131
+ })], P.prototype, "logOutButtonPlacement", void 0), i([o({
1117
1132
  type: Boolean,
1118
1133
  attribute: "show-search",
1119
- converter: p
1120
- })], N.prototype, "showSearch", void 0), i([o({
1134
+ converter: m
1135
+ })], P.prototype, "showSearch", void 0), i([o({
1121
1136
  type: Boolean,
1122
1137
  attribute: "show-contact",
1123
- converter: p
1124
- })], N.prototype, "showContact", void 0), i([o({
1138
+ converter: m
1139
+ })], P.prototype, "showContact", void 0), i([o({
1125
1140
  type: Boolean,
1126
1141
  attribute: "can-change-representation",
1127
- converter: p
1128
- })], N.prototype, "canChangeRepresentation", void 0), i([o({
1142
+ converter: m
1143
+ })], P.prototype, "canChangeRepresentation", void 0), i([o({
1129
1144
  type: Boolean,
1130
1145
  attribute: "has-log-out",
1131
- converter: p
1132
- })], N.prototype, "hasLogOut", void 0), i([o({ type: Object })], N.prototype, "user", void 0), i([o({
1146
+ converter: m
1147
+ })], P.prototype, "hasLogOut", void 0), i([o({ type: Object })], P.prototype, "user", void 0), i([o({
1133
1148
  type: Array,
1134
1149
  attribute: "user-menu"
1135
- })], N.prototype, "userMenu", void 0), i([o({ type: Object })], N.prototype, "representing", void 0), i([r()], N.prototype, "openMenu", void 0), i([r()], N.prototype, "fetchedData", void 0), i([r()], N.prototype, "loadError", void 0), i([r()], N.prototype, "headerAnchor", void 0);
1150
+ })], P.prototype, "userMenu", void 0), i([o({ type: Object })], P.prototype, "representing", void 0), i([r()], P.prototype, "openMenu", void 0), i([r()], P.prototype, "fetchedData", void 0), i([r()], P.prototype, "loadError", void 0), i([r()], P.prototype, "headerAnchor", void 0);
1136
1151
  try {
1137
- t("pkt-header-global")(N);
1152
+ t("pkt-header-global")(P);
1138
1153
  } catch {
1139
1154
  console.warn("Forsøker å definere <pkt-header-global>, men den er allerede definert");
1140
1155
  }
1141
1156
  //#endregion
1142
1157
  //#region src/components/header/header.ts
1143
- var P = class extends u {
1158
+ var F = class extends d {
1144
1159
  constructor(...e) {
1145
1160
  super(...e), this.type = "service", this.searchValue = "", this.mobileBreakpoint = 768, this.tabletBreakpoint = 1280, this.openedMenu = "none", this.logOutButtonPlacement = "none", this.position = "fixed", this.scrollBehavior = "hide", this.slotMenuVariant = "icon-only", this.slotMenuText = "Meny", this.hideLogo = !1, this.compact = !1, this.canChangeRepresentation = !1, this.hasLogOut = !1, this.showContact = !0;
1146
1161
  }
@@ -1208,93 +1223,93 @@ var P = class extends u {
1208
1223
  .userMenu=${this.effectiveUserMenu}
1209
1224
  .representing=${this.representing}
1210
1225
  >
1211
- ${this.hasSlotContent() ? e`<div class="pkt-contents">${l(this)}</div>` : n}
1226
+ ${this.hasSlotContent() ? e`<div class="pkt-contents">${u(this)}</div>` : n}
1212
1227
  </pkt-header-service>
1213
1228
  `;
1214
1229
  }
1215
1230
  };
1216
- i([o({ type: String })], P.prototype, "type", void 0), i([o({
1231
+ i([o({ type: String })], F.prototype, "type", void 0), i([o({
1217
1232
  type: String,
1218
1233
  attribute: "service-name"
1219
- })], P.prototype, "serviceName", void 0), i([o({
1234
+ })], F.prototype, "serviceName", void 0), i([o({
1220
1235
  type: String,
1221
1236
  attribute: "service-link"
1222
- })], P.prototype, "serviceLink", void 0), i([o({
1237
+ })], F.prototype, "serviceLink", void 0), i([o({
1223
1238
  type: String,
1224
1239
  attribute: "logo-link"
1225
- })], P.prototype, "logoLink", void 0), i([o({
1240
+ })], F.prototype, "logoLink", void 0), i([o({
1226
1241
  type: String,
1227
1242
  attribute: "logo-path"
1228
- })], P.prototype, "logoPath", void 0), i([o({
1243
+ })], F.prototype, "logoPath", void 0), i([o({
1229
1244
  type: String,
1230
1245
  attribute: "search-placeholder"
1231
- })], P.prototype, "searchPlaceholder", void 0), i([o({
1246
+ })], F.prototype, "searchPlaceholder", void 0), i([o({
1232
1247
  type: String,
1233
1248
  attribute: "search-value"
1234
- })], P.prototype, "searchValue", void 0), i([o({
1249
+ })], F.prototype, "searchValue", void 0), i([o({
1235
1250
  type: Number,
1236
1251
  attribute: "mobile-breakpoint"
1237
- })], P.prototype, "mobileBreakpoint", void 0), i([o({
1252
+ })], F.prototype, "mobileBreakpoint", void 0), i([o({
1238
1253
  type: Number,
1239
1254
  attribute: "tablet-breakpoint"
1240
- })], P.prototype, "tabletBreakpoint", void 0), i([o({
1255
+ })], F.prototype, "tabletBreakpoint", void 0), i([o({
1241
1256
  type: String,
1242
1257
  attribute: "opened-menu"
1243
- })], P.prototype, "openedMenu", void 0), i([o({
1258
+ })], F.prototype, "openedMenu", void 0), i([o({
1244
1259
  type: String,
1245
1260
  attribute: "log-out-button-placement"
1246
- })], P.prototype, "logOutButtonPlacement", void 0), i([o({ type: String })], P.prototype, "position", void 0), i([o({
1261
+ })], F.prototype, "logOutButtonPlacement", void 0), i([o({ type: String })], F.prototype, "position", void 0), i([o({
1247
1262
  type: String,
1248
1263
  attribute: "scroll-behavior"
1249
- })], P.prototype, "scrollBehavior", void 0), i([o({
1264
+ })], F.prototype, "scrollBehavior", void 0), i([o({
1250
1265
  type: String,
1251
1266
  attribute: "slot-menu-variant"
1252
- })], P.prototype, "slotMenuVariant", void 0), i([o({
1267
+ })], F.prototype, "slotMenuVariant", void 0), i([o({
1253
1268
  type: String,
1254
1269
  attribute: "slot-menu-text"
1255
- })], P.prototype, "slotMenuText", void 0), i([o({
1270
+ })], F.prototype, "slotMenuText", void 0), i([o({
1256
1271
  type: Boolean,
1257
1272
  attribute: "hide-logo",
1258
- converter: p
1259
- })], P.prototype, "hideLogo", void 0), i([o({
1273
+ converter: m
1274
+ })], F.prototype, "hideLogo", void 0), i([o({
1260
1275
  type: Boolean,
1261
- converter: p
1262
- })], P.prototype, "compact", void 0), i([o({
1276
+ converter: m
1277
+ })], F.prototype, "compact", void 0), i([o({
1263
1278
  type: Boolean,
1264
1279
  attribute: "show-search",
1265
- converter: p
1266
- })], P.prototype, "showSearch", void 0), i([o({
1280
+ converter: m
1281
+ })], F.prototype, "showSearch", void 0), i([o({
1267
1282
  type: Boolean,
1268
1283
  attribute: "can-change-representation",
1269
- converter: p
1270
- })], P.prototype, "canChangeRepresentation", void 0), i([o({
1284
+ converter: m
1285
+ })], F.prototype, "canChangeRepresentation", void 0), i([o({
1271
1286
  type: Boolean,
1272
1287
  attribute: "has-log-out",
1273
- converter: p
1274
- })], P.prototype, "hasLogOut", void 0), i([o({ type: Object })], P.prototype, "user", void 0), i([o({
1288
+ converter: m
1289
+ })], F.prototype, "hasLogOut", void 0), i([o({ type: Object })], F.prototype, "user", void 0), i([o({
1275
1290
  type: Array,
1276
1291
  attribute: "user-menu"
1277
- })], P.prototype, "userMenu", void 0), i([o({ type: Object })], P.prototype, "representing", void 0), i([o({
1292
+ })], F.prototype, "userMenu", void 0), i([o({ type: Object })], F.prototype, "representing", void 0), i([o({
1278
1293
  type: String,
1279
1294
  attribute: "data-url"
1280
- })], P.prototype, "dataUrl", void 0), i([o({
1295
+ })], F.prototype, "dataUrl", void 0), i([o({
1281
1296
  type: Object,
1282
1297
  attribute: !1
1283
- })], P.prototype, "data", void 0), i([o({ type: String })], P.prototype, "locale", void 0), i([o({
1298
+ })], F.prototype, "data", void 0), i([o({ type: String })], F.prototype, "locale", void 0), i([o({
1284
1299
  type: Boolean,
1285
1300
  attribute: "show-contact",
1286
- converter: p
1287
- })], P.prototype, "showContact", void 0), i([o({
1301
+ converter: m
1302
+ })], F.prototype, "showContact", void 0), i([o({
1288
1303
  type: Array,
1289
1304
  attribute: "user-menu-footer"
1290
- })], P.prototype, "userMenuFooter", void 0), i([o({
1305
+ })], F.prototype, "userMenuFooter", void 0), i([o({
1291
1306
  type: Array,
1292
1307
  attribute: "user-options"
1293
- })], P.prototype, "userOptions", void 0);
1308
+ })], F.prototype, "userOptions", void 0);
1294
1309
  try {
1295
- t("pkt-header")(P);
1310
+ t("pkt-header")(F);
1296
1311
  } catch {
1297
1312
  console.warn("Forsøker å definere <pkt-header>, men den er allerede definert");
1298
1313
  }
1299
1314
  //#endregion
1300
- export { C as a, T as i, N as n, D as r, P as t };
1315
+ export { w as a, E as i, P as n, O as r, F as t };