@oslokommune/punkt-elements 16.18.0 → 16.19.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 (189) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{accordion-CU2tJ5vn.js → accordion-BjYsEbSM.js} +19 -19
  3. package/dist/{accordion-DDZkjXFb.cjs → accordion-DaeWPWod.cjs} +5 -5
  4. package/dist/{alert-D_eXGOez.js → alert-BkzC5mVu.js} +22 -22
  5. package/dist/{alert-NyLr62jZ.cjs → alert-D_45dWPn.cjs} +6 -6
  6. package/dist/{async-directive-CaQiqjyV.js → async-directive-Cz6tcqge.js} +2 -2
  7. package/dist/async-directive-DO1QtVmf.cjs +1 -0
  8. package/dist/{backlink-CTu44BHn.js → backlink-BXAdgAte.js} +6 -6
  9. package/dist/{backlink-BsQ0Rmxj.cjs → backlink-C42-3OG3.cjs} +2 -2
  10. package/dist/{breadcrumbs-BNZ1L-0q.cjs → breadcrumbs-CkjeLh3U.cjs} +6 -6
  11. package/dist/{breadcrumbs-DPnoURvl.js → breadcrumbs-Dkb9TxMp.js} +15 -15
  12. package/dist/{button-ZYlrRRfu.js → button-CR-KWhTT.js} +21 -21
  13. package/dist/{button-DsGvcLIn.cjs → button-Dwv11n6R.cjs} +7 -7
  14. package/dist/{calendar-CDDVoUby.cjs → calendar-Buvxe4l_.cjs} +11 -11
  15. package/dist/{calendar-VOqO5um6.js → calendar-DAq6iJdx.js} +50 -50
  16. package/dist/{card-B4oDGIRP.js → card-5PydU247.js} +43 -43
  17. package/dist/{card-DZuZy0ay.cjs → card-C__IlsUa.cjs} +26 -26
  18. package/dist/{checkbox-CF5mSBR5.js → checkbox-CC1X7fw4.js} +23 -23
  19. package/dist/{checkbox-BerAYcfK.cjs → checkbox-DzMc0AJX.cjs} +10 -10
  20. package/dist/class-map-B8Ja0q7n.cjs +1 -0
  21. package/dist/{class-map-C8HuhNzZ.js → class-map-DH9hlJny.js} +7 -8
  22. package/dist/{combobox-BDYoPZmg.js → combobox-D-DY7YcW.js} +42 -42
  23. package/dist/{combobox-Ct9gCFa1.cjs → combobox-x4tBGP3F.cjs} +17 -17
  24. package/dist/components/heading/heading.d.ts +5 -8
  25. package/dist/{consent-BME_rQ2w.cjs → consent-BB3g_ByO.cjs} +3 -3
  26. package/dist/{consent-1IUuWZAh.js → consent-Y14WZ0JS.js} +8 -8
  27. package/dist/{datepicker-ByqXCpCd.cjs → datepicker-BFI-3stE.cjs} +20 -20
  28. package/dist/{datepicker-BGpoabCM.js → datepicker-CRk7aiwH.js} +57 -57
  29. package/dist/{directive-helpers-Dkv2gKgs.js → directive-helpers-Cep_4cpj.js} +1 -1
  30. package/dist/{directive-helpers-D1QSxY17.cjs → directive-helpers-f36YZFOG.cjs} +1 -1
  31. package/dist/element-CXAtr6Gu.cjs +2 -0
  32. package/dist/{element-cZ85T_aa.js → element-CduG0XyF.js} +47 -23
  33. package/dist/{element-with-slot-4J2o3SeU.js → element-with-slot-BVj9MXzi.js} +5 -6
  34. package/dist/element-with-slot-Cmxb9h4H.cjs +1 -0
  35. package/dist/{fileupload-B6W7qOQT.js → fileupload-C8muj8qd.js} +149 -149
  36. package/dist/{fileupload-a2OL3dzG.cjs → fileupload-YtsrgQTY.cjs} +40 -40
  37. package/dist/{header-BZFSan0_.cjs → header-CjBip0zj.cjs} +57 -57
  38. package/dist/{header-BgVpJMHQ.js → header-DONTGbD9.js} +130 -130
  39. package/dist/{header-menu-BXzVVOHq.js → header-menu-BU-ylGrJ.js} +45 -45
  40. package/dist/{header-menu-BLngov1D.cjs → header-menu-CnW7nzmF.cjs} +24 -24
  41. package/dist/heading-3o4Dk0Wn.js +80 -0
  42. package/dist/heading-C40-NX0r.cjs +1 -0
  43. package/dist/{helptext-BeU-enix.js → helptext-C2aQBBo_.js} +12 -12
  44. package/dist/{helptext-DWMFqMnV.cjs → helptext-DNLg43eI.cjs} +4 -4
  45. package/dist/icon-Dw6I0HDV.cjs +1 -0
  46. package/dist/{icon-CZQkrK6B.js → icon-LaKyBKON.js} +18 -19
  47. package/dist/if-defined-LTjAScFG.cjs +1 -0
  48. package/dist/{if-defined-Cjj8qN-Z.js → if-defined-VShASPdu.js} +1 -1
  49. package/dist/{input-element-D0egtEnr.cjs → input-element-BHQVt4Q9.cjs} +1 -1
  50. package/dist/{input-element-B1ciW1N2.js → input-element-BrmkXIXi.js} +30 -30
  51. package/dist/{input-wrapper-oYcbCFow.js → input-wrapper-B6WowlWG.js} +33 -33
  52. package/dist/{input-wrapper-Y98KV-sy.cjs → input-wrapper-Dhkt20WW.cjs} +17 -17
  53. package/dist/{link-BMMIjg50.cjs → link-B5ur0Rym.cjs} +4 -4
  54. package/dist/{link-CT0LB3S7.js → link-ClUNY__5.js} +13 -13
  55. package/dist/linkcard-BIcCW-qw.cjs +13 -0
  56. package/dist/{linkcard-Bz5zb69P.js → linkcard-DNJm5FvA.js} +15 -15
  57. package/dist/{listbox-0NHJvNjz.js → listbox-DXMIBv3y.js} +35 -35
  58. package/dist/{listbox-CcThiNBY.cjs → listbox-DbEobJNx.cjs} +14 -14
  59. package/dist/{loader-8T6M0FCQ.cjs → loader-Uap9qDsV.cjs} +5 -5
  60. package/dist/{loader-Cbrc4FFx.js → loader-gKdQpOOQ.js} +12 -12
  61. package/dist/{messagebox-C6LHT78_.cjs → messagebox-BqBxXK8c.cjs} +5 -5
  62. package/dist/{messagebox-TKKUVTo4.js → messagebox-XRFecqyS.js} +15 -15
  63. package/dist/{modal-BVHH8koz.js → modal-CWgeT-RP.js} +19 -19
  64. package/dist/{modal-CRzbtqL3.cjs → modal-CrYHKOmr.cjs} +8 -8
  65. package/dist/pkt-accordion.cjs +1 -1
  66. package/dist/pkt-accordion.js +1 -1
  67. package/dist/pkt-alert.cjs +1 -1
  68. package/dist/pkt-alert.js +1 -1
  69. package/dist/pkt-backlink.cjs +1 -1
  70. package/dist/pkt-backlink.js +1 -1
  71. package/dist/pkt-breadcrumbs.cjs +1 -1
  72. package/dist/pkt-breadcrumbs.js +1 -1
  73. package/dist/pkt-button.cjs +1 -1
  74. package/dist/pkt-button.js +1 -1
  75. package/dist/pkt-calendar.cjs +1 -1
  76. package/dist/pkt-calendar.js +1 -1
  77. package/dist/pkt-card.cjs +1 -1
  78. package/dist/pkt-card.js +1 -1
  79. package/dist/pkt-checkbox.cjs +1 -1
  80. package/dist/pkt-checkbox.js +1 -1
  81. package/dist/pkt-combobox.cjs +1 -1
  82. package/dist/pkt-combobox.js +1 -1
  83. package/dist/pkt-consent.cjs +1 -1
  84. package/dist/pkt-consent.js +1 -1
  85. package/dist/pkt-datepicker.cjs +1 -1
  86. package/dist/pkt-datepicker.js +1 -1
  87. package/dist/pkt-fileupload.cjs +1 -1
  88. package/dist/pkt-fileupload.js +1 -1
  89. package/dist/pkt-header-menu.cjs +1 -1
  90. package/dist/pkt-header-menu.js +1 -1
  91. package/dist/pkt-header.cjs +1 -1
  92. package/dist/pkt-header.js +1 -1
  93. package/dist/pkt-heading.cjs +1 -1
  94. package/dist/pkt-heading.js +1 -1
  95. package/dist/pkt-helptext.cjs +1 -1
  96. package/dist/pkt-helptext.js +1 -1
  97. package/dist/pkt-icon.cjs +1 -1
  98. package/dist/pkt-icon.js +1 -1
  99. package/dist/pkt-index.cjs +1 -1
  100. package/dist/pkt-index.js +32 -32
  101. package/dist/pkt-input-wrapper.cjs +1 -1
  102. package/dist/pkt-input-wrapper.js +1 -1
  103. package/dist/pkt-link.cjs +1 -1
  104. package/dist/pkt-link.js +1 -1
  105. package/dist/pkt-linkcard.cjs +1 -1
  106. package/dist/pkt-linkcard.js +1 -1
  107. package/dist/pkt-listbox.cjs +1 -1
  108. package/dist/pkt-listbox.js +1 -1
  109. package/dist/pkt-loader.cjs +1 -1
  110. package/dist/pkt-loader.js +1 -1
  111. package/dist/pkt-messagebox.cjs +1 -1
  112. package/dist/pkt-messagebox.js +1 -1
  113. package/dist/pkt-modal.cjs +1 -1
  114. package/dist/pkt-modal.js +1 -1
  115. package/dist/{pkt-options-controller-CCB15L_G.js → pkt-options-controller-BTNtjEIS.js} +1 -1
  116. package/dist/{pkt-options-controller-CeAQ-D-i.cjs → pkt-options-controller-CBM8xHwR.cjs} +1 -1
  117. package/dist/pkt-progressbar.cjs +1 -1
  118. package/dist/pkt-progressbar.js +1 -1
  119. package/dist/pkt-radiobutton.cjs +1 -1
  120. package/dist/pkt-radiobutton.js +1 -1
  121. package/dist/pkt-searchinput.cjs +1 -1
  122. package/dist/pkt-searchinput.js +1 -1
  123. package/dist/pkt-select.cjs +1 -1
  124. package/dist/pkt-select.js +1 -1
  125. package/dist/pkt-tabs.cjs +1 -1
  126. package/dist/pkt-tabs.js +1 -1
  127. package/dist/pkt-tag.cjs +1 -1
  128. package/dist/pkt-tag.js +1 -1
  129. package/dist/pkt-textarea.cjs +1 -1
  130. package/dist/pkt-textarea.js +1 -1
  131. package/dist/pkt-textinput.cjs +1 -1
  132. package/dist/pkt-textinput.js +1 -1
  133. package/dist/pkt-timepicker.cjs +1 -1
  134. package/dist/pkt-timepicker.js +1 -1
  135. package/dist/{progressbar-C-5oESiB.js → progressbar-B0P_vmGD.js} +23 -24
  136. package/dist/progressbar-DADdvDl5.cjs +17 -0
  137. package/dist/{radiobutton-B1Xg6XzP.cjs → radiobutton-BfURufrZ.cjs} +8 -8
  138. package/dist/{radiobutton-BAn1V_mQ.js → radiobutton-C6zERHoy.js} +20 -20
  139. package/dist/{ref-RS8Uv6uC.js → ref-BgoHEsEt.js} +7 -8
  140. package/dist/ref-CBdWMlde.cjs +1 -0
  141. package/dist/{repeat-DV1O43YU.js → repeat-CKIii8Mi.js} +15 -16
  142. package/dist/repeat-CRRgmzVn.cjs +1 -0
  143. package/dist/{searchinput-DUgZb_zm.cjs → searchinput-BrxfRzez.cjs} +13 -13
  144. package/dist/{searchinput-C9FP89qD.js → searchinput-fPvXHu2O.js} +31 -31
  145. package/dist/{select-DkKIW7zD.js → select-BIgFPp42.js} +13 -13
  146. package/dist/{select-DAs8kzN4.cjs → select-DzZHv6Bz.cjs} +3 -3
  147. package/dist/{tabs-ClI1XQDt.js → tabs-BJx6wwXD.js} +29 -29
  148. package/dist/{tabs-CN_RIMWg.cjs → tabs-DxQy8U-0.cjs} +7 -7
  149. package/dist/{tag-vgKH9B4k.cjs → tag-CBFz0R9N.cjs} +5 -5
  150. package/dist/{tag-DSZ-czu-.js → tag-CzlnHhho.js} +19 -19
  151. package/dist/textarea-M_S9WK7s.cjs +46 -0
  152. package/dist/{textarea-BfjI6d7Q.js → textarea-qHtkhelz.js} +24 -25
  153. package/dist/{textinput-DhoupEyI.js → textinput-CZrBM-Fj.js} +26 -26
  154. package/dist/{textinput-BM66vo5e.cjs → textinput-C_6kvf87.cjs} +12 -12
  155. package/dist/{timepicker-CtRGbypF.js → timepicker-O0iCeJyW.js} +51 -51
  156. package/dist/{timepicker-C4oRmmRd.cjs → timepicker-WiYLAncb.cjs} +20 -20
  157. package/package.json +2 -2
  158. package/src/components/card/card.ts +1 -1
  159. package/src/components/heading/heading.test.ts +79 -70
  160. package/src/components/heading/heading.ts +40 -78
  161. package/dist/async-directive-B9P1Qa0k.cjs +0 -1
  162. package/dist/class-map-CJ-msbHs.cjs +0 -1
  163. package/dist/directive-3THFsVew.js +0 -28
  164. package/dist/directive-CJ2giQBZ.cjs +0 -1
  165. package/dist/element-DjtxO-1r.cjs +0 -2
  166. package/dist/element-with-slot-CWoTGA1B.cjs +0 -1
  167. package/dist/heading-BxvE80bb.js +0 -73
  168. package/dist/heading-DRJTS27k.cjs +0 -1
  169. package/dist/icon-PbaC9uUg.cjs +0 -1
  170. package/dist/if-defined-XKOD_t_V.cjs +0 -1
  171. package/dist/linkcard-CupEMkvj.cjs +0 -13
  172. package/dist/progressbar-C0g830Tk.cjs +0 -17
  173. package/dist/ref-BaJ0mBT_.cjs +0 -1
  174. package/dist/repeat-DaDFvx86.cjs +0 -1
  175. package/dist/textarea-C7YiheLo.cjs +0 -46
  176. /package/dist/{booleanish-CRaKZ75t.js → booleanish-BmcOU-43.js} +0 -0
  177. /package/dist/{booleanish-B5EFqFpJ.cjs → booleanish-jJLlnr6-.cjs} +0 -0
  178. /package/dist/{classutils-z8YsPlOf.cjs → classutils-CVTzKF0J.cjs} +0 -0
  179. /package/dist/{classutils-DEL164Ur.js → classutils-lVbGcvjN.js} +0 -0
  180. /package/dist/{converters-Bffq_YDm.cjs → converters-C_66kHUN.cjs} +0 -0
  181. /package/dist/{converters-jauYkvNh.js → converters-DSQXaDQ_.js} +0 -0
  182. /package/dist/{dialog-polyfill.esm-B7W3teD0.js → dialog-polyfill.esm-0dVT8G1o.js} +0 -0
  183. /package/dist/{dialog-polyfill.esm-BnAQvMQO.cjs → dialog-polyfill.esm-CYs2AHP1.cjs} +0 -0
  184. /package/dist/{focus-modality-controller-pzSZkDkH.js → focus-modality-controller-CaUqYdk0.js} +0 -0
  185. /package/dist/{focus-modality-controller-BSZAQk8y.cjs → focus-modality-controller-wI5SR8wH.cjs} +0 -0
  186. /package/dist/{input-wrapper-CQGoyLdZ.cjs → input-wrapper-CYCCx8MP.cjs} +0 -0
  187. /package/dist/{input-wrapper-DwSsP39J.js → input-wrapper-kw2y6Jp_.js} +0 -0
  188. /package/dist/{utils-BOOZ0ppt.js → utils-CUqCKGvp.js} +0 -0
  189. /package/dist/{utils-CM67Oudc.cjs → utils-CjAbIttF.cjs} +0 -0
@@ -1,68 +1,68 @@
1
- const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),n=require(`./element-with-slot-CWoTGA1B.cjs`);require(`./icon-PbaC9uUg.cjs`);const r=require(`./if-defined-XKOD_t_V.cjs`);require(`./button-DsGvcLIn.cjs`);const i=require(`./ref-BaJ0mBT_.cjs`),a=require(`./booleanish-B5EFqFpJ.cjs`);require(`./link-BMMIjg50.cjs`),require(`./textinput-BM66vo5e.cjs`);var o=e=>typeof e.target==`string`?{title:e.title,iconName:e.iconName,href:e.target}:{title:e.title,iconName:e.iconName,onClick:e.target},s=e=>o(e),c=e=>{if(!e)return;let t=typeof e==`string`?new Date(e):e;if(!isNaN(t.getTime()))return t.toLocaleDateString(`nb-NO`,{day:`numeric`,month:`long`,year:`numeric`,hour:`2-digit`,minute:`2-digit`})},l=class extends e.t{constructor(...e){super(...e),this.canChangeRepresentation=!1,this.logoutOnClick=!1}handleChangeRepresentation(){this.dispatchEvent(new CustomEvent(`change-representation`,{bubbles:!0,composed:!0}))}handleLogout(){this.dispatchEvent(new CustomEvent(`log-out`,{bubbles:!0,composed:!0}))}handleMenuItemClick(e){`onClick`in e&&typeof e.onClick==`function`&&e.onClick()}renderLinkOrButton(n,r){let i=`href`in n,a=t.t({"pkt-user-menu__link":!0,"pkt-link-button":!i,"pkt-link":!i,"pkt-link--icon-left":!i,[r||``]:!!r});return i?e.d`
1
+ const e=require(`./element-CXAtr6Gu.cjs`),t=require(`./class-map-B8Ja0q7n.cjs`),n=require(`./element-with-slot-Cmxb9h4H.cjs`);require(`./icon-Dw6I0HDV.cjs`);const r=require(`./if-defined-LTjAScFG.cjs`);require(`./button-Dwv11n6R.cjs`);const i=require(`./ref-CBdWMlde.cjs`),a=require(`./booleanish-jJLlnr6-.cjs`);require(`./link-B5ur0Rym.cjs`),require(`./textinput-C_6kvf87.cjs`);var o=e=>typeof e.target==`string`?{title:e.title,iconName:e.iconName,href:e.target}:{title:e.title,iconName:e.iconName,onClick:e.target},s=e=>o(e),c=e=>{if(!e)return;let t=typeof e==`string`?new Date(e):e;if(!isNaN(t.getTime()))return t.toLocaleDateString(`nb-NO`,{day:`numeric`,month:`long`,year:`numeric`,hour:`2-digit`,minute:`2-digit`})},l=class extends e.t{constructor(...e){super(...e),this.canChangeRepresentation=!1,this.logoutOnClick=!1}handleChangeRepresentation(){this.dispatchEvent(new CustomEvent(`change-representation`,{bubbles:!0,composed:!0}))}handleLogout(){this.dispatchEvent(new CustomEvent(`log-out`,{bubbles:!0,composed:!0}))}handleMenuItemClick(e){`onClick`in e&&typeof e.onClick==`function`&&e.onClick()}renderLinkOrButton(n,r){let i=`href`in n,a=t.t({"pkt-user-menu__link":!0,"pkt-link-button":!i,"pkt-link":!i,"pkt-link--icon-left":!i,[r||``]:!!r});return i?e.p`
2
2
  <pkt-link
3
- icon-name=${n.iconName||e.l}
3
+ icon-name=${n.iconName||e.d}
4
4
  href=${n.href}
5
5
  aria-hidden="true"
6
6
  class="pkt-user-menu__link ${r||``}"
7
7
  >
8
8
  ${n.title}
9
9
  </pkt-link>
10
- `:e.d`
10
+ `:e.p`
11
11
  <button class=${a} type="button" @click=${()=>this.handleMenuItemClick(n)}>
12
- ${n.iconName?e.d`<pkt-icon
12
+ ${n.iconName?e.p`<pkt-icon
13
13
  name=${n.iconName}
14
14
  class="pkt-link__icon"
15
15
  aria-hidden="true"
16
- ></pkt-icon>`:e.l}
16
+ ></pkt-icon>`:e.d}
17
17
  ${n.title}
18
18
  </button>
19
- `}renderLinkSection(t){return e.d`
19
+ `}renderLinkSection(t){return e.p`
20
20
  <ul class="pkt-user-menu__sublist">
21
- ${t.map(t=>e.d`
21
+ ${t.map(t=>e.p`
22
22
  <li class="pkt-user-menu__subitem">${this.renderLinkOrButton(t)}</li>
23
23
  `)}
24
24
  </ul>
25
- `}render(){let t=this.userMenu?.map(s);return e.d`
25
+ `}render(){let t=this.userMenu?.map(s);return e.p`
26
26
  <nav class="pkt-user-menu" aria-label="Meny for innlogget bruker">
27
27
  <ul class="pkt-user-menu__list">
28
28
  <!-- User section -->
29
- ${this.user?e.d`
29
+ ${this.user?e.p`
30
30
  <li class="pkt-user-menu__item">
31
31
  <div class="pkt-user-menu__label">Pålogget som</div>
32
32
  <div class="pkt-user-menu__name" translate="no">${this.user.name}</div>
33
- ${this.formattedLastLoggedIn?e.d`
33
+ ${this.formattedLastLoggedIn?e.p`
34
34
  <div class="pkt-user-menu__last-logged-in">
35
35
  Sist pålogget: <time>${this.formattedLastLoggedIn}</time>
36
36
  </div>
37
- `:e.l}
37
+ `:e.d}
38
38
  </li>
39
- `:e.l}
39
+ `:e.d}
40
40
 
41
41
  <!-- User menu items -->
42
- ${t&&t.length>0?e.d`
42
+ ${t&&t.length>0?e.p`
43
43
  <li class="pkt-user-menu__item">${this.renderLinkSection(t)}</li>
44
- `:e.l}
44
+ `:e.d}
45
45
 
46
46
  <!-- Representing section -->
47
- ${this.representing?e.d`
47
+ ${this.representing?e.p`
48
48
  <li class="pkt-user-menu__item">
49
49
  <div class="pkt-user-menu__label">Representerer</div>
50
50
  <div class="pkt-user-menu__name" translate="no">${this.representing.name}</div>
51
- ${this.representing.orgNumber?e.d`<div class="pkt-user-menu__org-number">
51
+ ${this.representing.orgNumber?e.p`<div class="pkt-user-menu__org-number">
52
52
  Org.nr. ${this.representing.orgNumber}
53
- </div>`:e.l}
54
- ${this.canChangeRepresentation?e.d`
53
+ </div>`:e.d}
54
+ ${this.canChangeRepresentation?e.p`
55
55
  <ul class="pkt-user-menu__sublist mt-size-16">
56
56
  <li class="pkt-user-menu__subitem">
57
57
  ${this.renderLinkOrButton({title:`Endre organisasjon`,iconName:`cogwheel`,onClick:()=>this.handleChangeRepresentation()})}
58
58
  </li>
59
59
  </ul>
60
- `:e.l}
60
+ `:e.d}
61
61
  </li>
62
- `:e.l}
62
+ `:e.d}
63
63
 
64
64
  <!-- Change representation without representing object -->
65
- ${!this.representing&&this.canChangeRepresentation?e.d`
65
+ ${!this.representing&&this.canChangeRepresentation?e.p`
66
66
  <li class="pkt-user-menu__item">
67
67
  <ul class="pkt-user-menu__sublist">
68
68
  <li class="pkt-user-menu__subitem">
@@ -70,25 +70,25 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
70
70
  </li>
71
71
  </ul>
72
72
  </li>
73
- `:e.l}
73
+ `:e.d}
74
74
 
75
75
  <!-- Logout -->
76
- ${this.logoutOnClick?e.d`
76
+ ${this.logoutOnClick?e.p`
77
77
  <li class="pkt-user-menu__item">
78
78
  ${this.renderLinkOrButton({title:`Logg ut`,iconName:`exit`,onClick:()=>this.handleLogout()})}
79
79
  </li>
80
- `:e.l}
80
+ `:e.d}
81
81
  </ul>
82
82
  </nav>
83
- `}};e.r([e.s({type:Object})],l.prototype,`user`,void 0),e.r([e.s({type:String,attribute:`formatted-last-logged-in`})],l.prototype,`formattedLastLoggedIn`,void 0),e.r([e.s({type:Object})],l.prototype,`representing`,void 0),e.r([e.s({type:Array,attribute:`user-menu`})],l.prototype,`userMenu`,void 0),e.r([e.s({type:Boolean,attribute:`can-change-representation`,converter:a.t})],l.prototype,`canChangeRepresentation`,void 0),e.r([e.s({type:Boolean,attribute:`logout-on-click`,converter:a.t})],l.prototype,`logoutOnClick`,void 0);try{e.c(`pkt-header-user-menu`)(l)}catch{console.warn(`Forsøker å definere <pkt-header-user-menu>, men den er allerede definert`)}var u=`https://punkt-cdn.oslo.kommune.no/latest/logos/`,d=class extends n.t{constructor(...e){super(...e),this.searchPlaceholder=`Søk`,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.isMobile=!1,this.isTablet=!1,this.openMenu=`none`,this.isHidden=!1,this.componentWidth=typeof window<`u`?window.innerWidth:0,this.alignSlotRight=!1,this.alignSearchRight=!1,this.headerRef=i.t(),this.userContainerRef=i.t(),this.slotContainerRef=i.t(),this.searchContainerRef=i.t(),this.slotContentRef=i.t(),this.searchMenuRef=i.t(),this.lastScrollPosition=0,this.savedScrollY=0,this.lastFocusedElement=null,this.shouldRestoreFocus=!1,this.handleScroll=()=>{if(!this.shouldHideOnScroll)return;let e=window.pageYOffset||document.documentElement.scrollTop;e<0||Math.abs(e-this.lastScrollPosition)<60||(this.isHidden=e>this.lastScrollPosition,this.lastScrollPosition=e)},this.handleClickOutside=e=>{let t=e.target;this.user&&this.openMenu===`user`&&!t.closest(`.pkt-header-service__user-container`)&&(this.openMenu=`none`),this.openMenu===`slot`&&!t.closest(`.pkt-header-service__slot-container`)&&(this.openMenu=`none`),this.openMenu===`search`&&!t.closest(`.pkt-header-service__search-container`)&&!t.closest(`.pkt-header-service__search-input`)&&(this.openMenu=`none`)},this.handleFocusOut=(e,t)=>{let n=e.relatedTarget,r;switch(t){case`user`:r=this.userContainerRef;break;case`slot`:r=this.slotContainerRef;break;case`search`:r=this.searchContainerRef;break;default:return}let i=r.value;i&&(!n||!i.contains(n))&&(this.openMenu=`none`)},this.handleEscapeKey=e=>{e.key===`Escape`&&this.openMenu!==`none`&&(e.preventDefault(),this.shouldRestoreFocus=!0,this.openMenu=`none`)}}connectedCallback(){super.connectedCallback(),this.setupScrollListener()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),window.removeEventListener(`scroll`,this.handleScroll),this.unlockScroll()}firstUpdated(){this.setupResizeObserver()}updated(e){if(super.updated(e),e.has(`openedMenu`)&&this.openedMenu!==this.openMenu&&(this.openMenu=this.openedMenu),(e.has(`mobileBreakpoint`)||e.has(`tabletBreakpoint`))&&(this.updateIsMobile(),this.updateIsTablet()),e.has(`openMenu`)){let t=e.get(`openMenu`);this.openMenu!==`none`&&(t===`none`||t===void 0)?(document.addEventListener(`mousedown`,this.handleClickOutside),document.addEventListener(`keydown`,this.handleEscapeKey),(this.openMenu===`slot`||this.openMenu===`search`)&&requestAnimationFrame(()=>{this.checkDropdownAlignment(this.openMenu)})):this.openMenu===`none`&&t!==`none`&&(document.removeEventListener(`mousedown`,this.handleClickOutside),document.removeEventListener(`keydown`,this.handleEscapeKey),this.restoreFocus())}(e.has(`openMenu`)||e.has(`isMobile`))&&this.updateScrollLock()}setupResizeObserver(){let e=this.headerRef.value;e&&(this.componentWidth=e.offsetWidth,this.updateIsMobile(),this.updateIsTablet(),this.resizeObserver=new ResizeObserver(e=>{for(let t of e)t.borderBoxSize&&t.borderBoxSize.length>0?this.componentWidth=t.borderBoxSize[0].inlineSize:this.componentWidth=t.contentRect.width,this.updateIsMobile(),this.updateIsTablet()}),this.resizeObserver.observe(e))}updateIsMobile(){this.isMobile=this.componentWidth<this.mobileBreakpoint}updateIsTablet(){this.isTablet=this.componentWidth<this.tabletBreakpoint}updateScrollLock(){this.position===`fixed`&&this.isMobile&&this.openMenu!==`none`?this.lockScroll():this.unlockScroll()}lockScroll(){let e=document.body,t=document.documentElement;this.savedScrollY=window.scrollY||window.pageYOffset;let n=window.innerWidth-t.clientWidth;n>0&&(e.style.paddingRight=`${n}px`),e.style.position=`fixed`,e.style.top=`-${this.savedScrollY}px`,e.style.left=`0`,e.style.right=`0`,e.style.width=`100%`,e.style.overflow=`hidden`,t.classList.add(`is-scroll-locked`)}unlockScroll(){let e=document.body,t=document.documentElement;t.classList.contains(`is-scroll-locked`)&&(e.style.removeProperty(`position`),e.style.removeProperty(`top`),e.style.removeProperty(`left`),e.style.removeProperty(`right`),e.style.removeProperty(`width`),e.style.removeProperty(`overflow`),e.style.removeProperty(`padding-right`),t.classList.remove(`is-scroll-locked`),window.scrollTo({top:this.savedScrollY}))}setupScrollListener(){window.addEventListener(`scroll`,this.handleScroll)}restoreFocus(){this.shouldRestoreFocus&&this.lastFocusedElement&&document.contains(this.lastFocusedElement)&&this.lastFocusedElement.focus(),this.lastFocusedElement=null,this.shouldRestoreFocus=!1}checkDropdownAlignment(e){let t=e===`slot`?this.slotContainerRef:this.searchContainerRef,n=e===`slot`?this.slotContentRef:this.searchMenuRef;if(!t.value||!n.value||!this.isTablet||this.isMobile)return;let r=t.value.getBoundingClientRect(),i=n.value.offsetWidth,a=r.left+i>window.innerWidth;e===`slot`?this.alignSlotRight=a:this.alignSearchRight=a}handleMenuToggle(e){this.openMenu===`none`?(this.lastFocusedElement=document.activeElement,this.openMenu=e):this.openMenu=`none`}handleLogoClick(e){this.dispatchEvent(new CustomEvent(`logo-click`,{bubbles:!0,composed:!0,detail:{originalEvent:e}}))}handleServiceClick(e){this.dispatchEvent(new CustomEvent(`service-click`,{bubbles:!0,composed:!0,detail:{originalEvent:e}}))}handleLogout(){this.dispatchEvent(new CustomEvent(`log-out`,{bubbles:!0,composed:!0}))}handleSearch(e){this.dispatchEvent(new CustomEvent(`search`,{detail:{query:e},bubbles:!0,composed:!0}))}handleSearchChange(e){this.dispatchEvent(new CustomEvent(`search-change`,{detail:{query:e},bubbles:!0,composed:!0}))}handleSearchInputChange(e){let t=e.target.value;this.handleSearchChange(t)}handleSearchKeyDown(e){e.key===`Enter`&&this.handleSearch(e.target.value)}get formattedLastLoggedIn(){return c(this.user?.lastLoggedIn)}get isFixed(){return this.position===`fixed`}get shouldHideOnScroll(){return this.scrollBehavior===`hide`}get showLogoutInHeader(){return this.hasLogOut&&(this.logOutButtonPlacement===`header`||this.logOutButtonPlacement===`both`)}get showLogoutInUserMenu(){return this.hasLogOut&&(this.logOutButtonPlacement===`userMenu`||this.logOutButtonPlacement===`both`)}renderLogo(){if(this.hideLogo)return e.l;let t=e.d`
83
+ `}};e.n([e.o({type:Object})],l.prototype,`user`,void 0),e.n([e.o({type:String,attribute:`formatted-last-logged-in`})],l.prototype,`formattedLastLoggedIn`,void 0),e.n([e.o({type:Object})],l.prototype,`representing`,void 0),e.n([e.o({type:Array,attribute:`user-menu`})],l.prototype,`userMenu`,void 0),e.n([e.o({type:Boolean,attribute:`can-change-representation`,converter:a.t})],l.prototype,`canChangeRepresentation`,void 0),e.n([e.o({type:Boolean,attribute:`logout-on-click`,converter:a.t})],l.prototype,`logoutOnClick`,void 0);try{e.s(`pkt-header-user-menu`)(l)}catch{console.warn(`Forsøker å definere <pkt-header-user-menu>, men den er allerede definert`)}var u=`https://punkt-cdn.oslo.kommune.no/latest/logos/`,d=class extends n.t{constructor(...e){super(...e),this.searchPlaceholder=`Søk`,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.isMobile=!1,this.isTablet=!1,this.openMenu=`none`,this.isHidden=!1,this.componentWidth=typeof window<`u`?window.innerWidth:0,this.alignSlotRight=!1,this.alignSearchRight=!1,this.headerRef=i.t(),this.userContainerRef=i.t(),this.slotContainerRef=i.t(),this.searchContainerRef=i.t(),this.slotContentRef=i.t(),this.searchMenuRef=i.t(),this.lastScrollPosition=0,this.savedScrollY=0,this.lastFocusedElement=null,this.shouldRestoreFocus=!1,this.handleScroll=()=>{if(!this.shouldHideOnScroll)return;let e=window.pageYOffset||document.documentElement.scrollTop;e<0||Math.abs(e-this.lastScrollPosition)<60||(this.isHidden=e>this.lastScrollPosition,this.lastScrollPosition=e)},this.handleClickOutside=e=>{let t=e.target;this.user&&this.openMenu===`user`&&!t.closest(`.pkt-header-service__user-container`)&&(this.openMenu=`none`),this.openMenu===`slot`&&!t.closest(`.pkt-header-service__slot-container`)&&(this.openMenu=`none`),this.openMenu===`search`&&!t.closest(`.pkt-header-service__search-container`)&&!t.closest(`.pkt-header-service__search-input`)&&(this.openMenu=`none`)},this.handleFocusOut=(e,t)=>{let n=e.relatedTarget,r;switch(t){case`user`:r=this.userContainerRef;break;case`slot`:r=this.slotContainerRef;break;case`search`:r=this.searchContainerRef;break;default:return}let i=r.value;i&&(!n||!i.contains(n))&&(this.openMenu=`none`)},this.handleEscapeKey=e=>{e.key===`Escape`&&this.openMenu!==`none`&&(e.preventDefault(),this.shouldRestoreFocus=!0,this.openMenu=`none`)}}connectedCallback(){super.connectedCallback(),this.setupScrollListener()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),window.removeEventListener(`scroll`,this.handleScroll),this.unlockScroll()}firstUpdated(){this.setupResizeObserver()}updated(e){if(super.updated(e),e.has(`openedMenu`)&&this.openedMenu!==this.openMenu&&(this.openMenu=this.openedMenu),(e.has(`mobileBreakpoint`)||e.has(`tabletBreakpoint`))&&(this.updateIsMobile(),this.updateIsTablet()),e.has(`openMenu`)){let t=e.get(`openMenu`);this.openMenu!==`none`&&(t===`none`||t===void 0)?(document.addEventListener(`mousedown`,this.handleClickOutside),document.addEventListener(`keydown`,this.handleEscapeKey),(this.openMenu===`slot`||this.openMenu===`search`)&&requestAnimationFrame(()=>{this.checkDropdownAlignment(this.openMenu)})):this.openMenu===`none`&&t!==`none`&&(document.removeEventListener(`mousedown`,this.handleClickOutside),document.removeEventListener(`keydown`,this.handleEscapeKey),this.restoreFocus())}(e.has(`openMenu`)||e.has(`isMobile`))&&this.updateScrollLock()}setupResizeObserver(){let e=this.headerRef.value;e&&(this.componentWidth=e.offsetWidth,this.updateIsMobile(),this.updateIsTablet(),this.resizeObserver=new ResizeObserver(e=>{for(let t of e)t.borderBoxSize&&t.borderBoxSize.length>0?this.componentWidth=t.borderBoxSize[0].inlineSize:this.componentWidth=t.contentRect.width,this.updateIsMobile(),this.updateIsTablet()}),this.resizeObserver.observe(e))}updateIsMobile(){this.isMobile=this.componentWidth<this.mobileBreakpoint}updateIsTablet(){this.isTablet=this.componentWidth<this.tabletBreakpoint}updateScrollLock(){this.position===`fixed`&&this.isMobile&&this.openMenu!==`none`?this.lockScroll():this.unlockScroll()}lockScroll(){let e=document.body,t=document.documentElement;this.savedScrollY=window.scrollY||window.pageYOffset;let n=window.innerWidth-t.clientWidth;n>0&&(e.style.paddingRight=`${n}px`),e.style.position=`fixed`,e.style.top=`-${this.savedScrollY}px`,e.style.left=`0`,e.style.right=`0`,e.style.width=`100%`,e.style.overflow=`hidden`,t.classList.add(`is-scroll-locked`)}unlockScroll(){let e=document.body,t=document.documentElement;t.classList.contains(`is-scroll-locked`)&&(e.style.removeProperty(`position`),e.style.removeProperty(`top`),e.style.removeProperty(`left`),e.style.removeProperty(`right`),e.style.removeProperty(`width`),e.style.removeProperty(`overflow`),e.style.removeProperty(`padding-right`),t.classList.remove(`is-scroll-locked`),window.scrollTo({top:this.savedScrollY}))}setupScrollListener(){window.addEventListener(`scroll`,this.handleScroll)}restoreFocus(){this.shouldRestoreFocus&&this.lastFocusedElement&&document.contains(this.lastFocusedElement)&&this.lastFocusedElement.focus(),this.lastFocusedElement=null,this.shouldRestoreFocus=!1}checkDropdownAlignment(e){let t=e===`slot`?this.slotContainerRef:this.searchContainerRef,n=e===`slot`?this.slotContentRef:this.searchMenuRef;if(!t.value||!n.value||!this.isTablet||this.isMobile)return;let r=t.value.getBoundingClientRect(),i=n.value.offsetWidth,a=r.left+i>window.innerWidth;e===`slot`?this.alignSlotRight=a:this.alignSearchRight=a}handleMenuToggle(e){this.openMenu===`none`?(this.lastFocusedElement=document.activeElement,this.openMenu=e):this.openMenu=`none`}handleLogoClick(e){this.dispatchEvent(new CustomEvent(`logo-click`,{bubbles:!0,composed:!0,detail:{originalEvent:e}}))}handleServiceClick(e){this.dispatchEvent(new CustomEvent(`service-click`,{bubbles:!0,composed:!0,detail:{originalEvent:e}}))}handleLogout(){this.dispatchEvent(new CustomEvent(`log-out`,{bubbles:!0,composed:!0}))}handleSearch(e){this.dispatchEvent(new CustomEvent(`search`,{detail:{query:e},bubbles:!0,composed:!0}))}handleSearchChange(e){this.dispatchEvent(new CustomEvent(`search-change`,{detail:{query:e},bubbles:!0,composed:!0}))}handleSearchInputChange(e){let t=e.target.value;this.handleSearchChange(t)}handleSearchKeyDown(e){e.key===`Enter`&&this.handleSearch(e.target.value)}get formattedLastLoggedIn(){return c(this.user?.lastLoggedIn)}get isFixed(){return this.position===`fixed`}get shouldHideOnScroll(){return this.scrollBehavior===`hide`}get showLogoutInHeader(){return this.hasLogOut&&(this.logOutButtonPlacement===`header`||this.logOutButtonPlacement===`both`)}get showLogoutInUserMenu(){return this.hasLogOut&&(this.logOutButtonPlacement===`userMenu`||this.logOutButtonPlacement===`both`)}renderLogo(){if(this.hideLogo)return e.d;let t=e.p`
84
84
  <pkt-icon name="oslologo" aria-hidden="true" path=${u}></pkt-icon>
85
- `;return this.logoLink&&typeof this.logoLink==`string`?e.d`
85
+ `;return this.logoLink&&typeof this.logoLink==`string`?e.p`
86
86
  <span class="pkt-header-service__logo">
87
87
  <a href=${this.logoLink} aria-label="Tilbake til forside" @click=${this.handleLogoClick}>
88
88
  ${t}
89
89
  </a>
90
90
  </span>
91
- `:this.hasAttribute(`logo-link`)?e.d`
91
+ `:this.hasAttribute(`logo-link`)?e.p`
92
92
  <span class="pkt-header-service__logo">
93
93
  <button
94
94
  aria-label="Tilbake til forside"
@@ -98,9 +98,9 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
98
98
  ${t}
99
99
  </button>
100
100
  </span>
101
- `:e.d`
101
+ `:e.p`
102
102
  <span class="pkt-header-service__logo" @click=${this.handleLogoClick}>${t}</span>
103
- `}renderServiceName(){return this.serviceName?this.serviceLink&&typeof this.serviceLink==`string`?e.d`
103
+ `}renderServiceName(){return this.serviceName?this.serviceLink&&typeof this.serviceLink==`string`?e.p`
104
104
  <span class="pkt-header-service__service-name" translate="no">
105
105
  <pkt-link
106
106
  href=${this.serviceLink}
@@ -110,7 +110,7 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
110
110
  ${this.serviceName}
111
111
  </pkt-link>
112
112
  </span>
113
- `:this.hasAttribute(`service-link`)?e.d`
113
+ `:this.hasAttribute(`service-link`)?e.p`
114
114
  <span class="pkt-header-service__service-name" translate="no">
115
115
  <button
116
116
  class="pkt-link-button pkt-link pkt-header-service__service-link"
@@ -119,17 +119,17 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
119
119
  ${this.serviceName}
120
120
  </button>
121
121
  </span>
122
- `:e.d`
122
+ `:e.p`
123
123
  <span class="pkt-header-service__service-name" translate="no" @click=${this.handleServiceClick}>
124
124
  <span class="pkt-header-service__service-link">${this.serviceName}</span>
125
125
  </span>
126
- `:e.l}renderSlotContainer(){if(!this.hasSlotContent())return e.l;let r=t.t({"pkt-header-service__slot-container":!0,"is-open":this.openMenu===`slot`}),a=t.t({"pkt-header-service__slot-content":!0,"align-right":this.alignSlotRight});return e.d`
126
+ `:e.d}renderSlotContainer(){if(!this.hasSlotContent())return e.d;let r=t.t({"pkt-header-service__slot-container":!0,"is-open":this.openMenu===`slot`}),a=t.t({"pkt-header-service__slot-content":!0,"align-right":this.alignSlotRight});return e.p`
127
127
  <div
128
128
  class=${r}
129
129
  @focusout=${e=>this.handleFocusOut(e,`slot`)}
130
130
  ${i.n(this.slotContainerRef)}
131
131
  >
132
- ${this.isTablet&&this.hasSlotContent()?e.d`
132
+ ${this.isTablet&&this.hasSlotContent()?e.p`
133
133
  <pkt-button
134
134
  skin="secondary"
135
135
  variant=${this.slotMenuVariant}
@@ -143,18 +143,18 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
143
143
  >
144
144
  ${this.slotMenuText}
145
145
  </pkt-button>
146
- `:e.l}
146
+ `:e.d}
147
147
  <div
148
148
  class=${a}
149
149
  id="mobile-slot-menu"
150
- role=${this.isTablet?`menu`:e.l}
151
- aria-label=${this.isTablet?`Meny`:e.l}
150
+ role=${this.isTablet?`menu`:e.d}
151
+ aria-label=${this.isTablet?`Meny`:e.d}
152
152
  ${i.n(this.slotContentRef)}
153
153
  >
154
154
  ${n.n(this)}
155
155
  </div>
156
156
  </div>
157
- `}renderSearch(){if(!this.showSearch)return e.l;if(this.isTablet){let n=t.t({"pkt-header-service__search-container":!0,"is-open":this.openMenu===`search`}),r=t.t({"pkt-header-service__mobile-menu":!0,"is-open":this.openMenu===`search`,"align-right":this.alignSearchRight});return e.d`
157
+ `}renderSearch(){if(!this.showSearch)return e.d;if(this.isTablet){let n=t.t({"pkt-header-service__search-container":!0,"is-open":this.openMenu===`search`}),r=t.t({"pkt-header-service__mobile-menu":!0,"is-open":this.openMenu===`search`,"align-right":this.alignSearchRight});return e.p`
158
158
  <div
159
159
  class=${n}
160
160
  @focusout=${e=>this.handleFocusOut(e,`search`)}
@@ -174,7 +174,7 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
174
174
  Søk
175
175
  </pkt-button>
176
176
  <div class=${r} ${i.n(this.searchMenuRef)}>
177
- ${this.openMenu===`search`?e.d`
177
+ ${this.openMenu===`search`?e.p`
178
178
  <pkt-textinput
179
179
  id="mobile-search-menu"
180
180
  class="pkt-header-service__search-input"
@@ -188,10 +188,10 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
188
188
  @input=${this.handleSearchInputChange}
189
189
  @keydown=${e=>{e.key===`Enter`&&this.handleSearch(e.target.value)}}
190
190
  ></pkt-textinput>
191
- `:e.l}
191
+ `:e.d}
192
192
  </div>
193
193
  </div>
194
- `}return e.d`
194
+ `}return e.p`
195
195
  <pkt-textinput
196
196
  id="header-service-search"
197
197
  class="pkt-header-service__search-input"
@@ -203,7 +203,7 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
203
203
  @input=${this.handleSearchInputChange}
204
204
  @keydown=${this.handleSearchKeyDown}
205
205
  ></pkt-textinput>
206
- `}renderUserButton(){if(!this.user)return e.l;let n=t.t({"pkt-header-service__user-menu":this.isMobile===!1,"pkt-header-service__mobile-menu":this.isMobile===!0,"is-open":this.openMenu===`user`});return e.d`
206
+ `}renderUserButton(){if(!this.user)return e.d;let n=t.t({"pkt-header-service__user-menu":this.isMobile===!1,"pkt-header-service__mobile-menu":this.isMobile===!0,"is-open":this.openMenu===`user`});return e.p`
207
207
  <div
208
208
  class="pkt-header-service__user-container"
209
209
  @focusout=${e=>this.handleFocusOut(e,`user`)}
@@ -222,11 +222,11 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
222
222
  <span class="pkt-sr-only">Brukermeny: </span>
223
223
  <span translate="no">${this.representing?.name||this.user.name}</span>
224
224
  </pkt-button>
225
- ${this.openMenu===`user`&&this.user?e.d`
225
+ ${this.openMenu===`user`&&this.user?e.p`
226
226
  <div class=${n}>
227
227
  <pkt-header-user-menu
228
228
  .user=${this.user}
229
- formatted-last-logged-in=${this.formattedLastLoggedIn||e.l}
229
+ formatted-last-logged-in=${this.formattedLastLoggedIn||e.d}
230
230
  .representing=${this.representing}
231
231
  .userMenu=${this.userMenu}
232
232
  ?can-change-representation=${this.canChangeRepresentation}
@@ -235,15 +235,15 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
235
235
  @log-out=${this.handleLogout}
236
236
  ></pkt-header-user-menu>
237
237
  </div>
238
- `:e.l}
238
+ `:e.d}
239
239
  </div>
240
- `}renderHeader(){let n=t.t({"pkt-header-service":!0,"pkt-header-service--compact":this.compact,"pkt-header-service--mobile":this.isMobile,"pkt-header-service--tablet":this.isTablet,"pkt-header-service--fixed":this.isFixed,"pkt-header-service--scroll-to-hide":this.shouldHideOnScroll,"pkt-header-service--hidden":this.isHidden}),r=t.t({"pkt-header-service__logo-area":!0,"pkt-header-service__logo-area--without-service":!this.serviceName});return e.d`
240
+ `}renderHeader(){let n=t.t({"pkt-header-service":!0,"pkt-header-service--compact":this.compact,"pkt-header-service--mobile":this.isMobile,"pkt-header-service--tablet":this.isTablet,"pkt-header-service--fixed":this.isFixed,"pkt-header-service--scroll-to-hide":this.shouldHideOnScroll,"pkt-header-service--hidden":this.isHidden}),r=t.t({"pkt-header-service__logo-area":!0,"pkt-header-service__logo-area--without-service":!this.serviceName});return e.p`
241
241
  <header class=${n} ${i.n(this.headerRef)}>
242
242
  <div class=${r}>${this.renderLogo()} ${this.renderServiceName()}</div>
243
243
 
244
- ${this.hasSlotContent()||this.showSearch||this.showLogoutInHeader?e.d`<div class="pkt-header-service__content">
244
+ ${this.hasSlotContent()||this.showSearch||this.showLogoutInHeader?e.p`<div class="pkt-header-service__content">
245
245
  ${this.renderSlotContainer()} ${this.renderSearch()}
246
- ${this.isTablet&&this.showLogoutInHeader?e.d`
246
+ ${this.isTablet&&this.showLogoutInHeader?e.p`
247
247
  <pkt-button
248
248
  skin="secondary"
249
249
  size=${this.isMobile?`small`:`medium`}
@@ -253,11 +253,11 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
253
253
  >
254
254
  Logg ut
255
255
  </pkt-button>
256
- `:e.l}
257
- </div>`:e.l}
258
- ${this.user||!this.isTablet&&this.showLogoutInHeader?e.d`<div class="pkt-header-service__user">
256
+ `:e.d}
257
+ </div>`:e.d}
258
+ ${this.user||!this.isTablet&&this.showLogoutInHeader?e.p`<div class="pkt-header-service__user">
259
259
  ${this.renderUserButton()}
260
- ${!this.isTablet&&this.showLogoutInHeader?e.d`
260
+ ${!this.isTablet&&this.showLogoutInHeader?e.p`
261
261
  <pkt-button
262
262
  skin="tertiary"
263
263
  size="medium"
@@ -267,15 +267,15 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
267
267
  >
268
268
  Logg ut
269
269
  </pkt-button>
270
- `:e.l}
271
- </div>`:e.l}
270
+ `:e.d}
271
+ </div>`:e.d}
272
272
  </header>
273
- `}render(){let n=this.renderHeader();return this.isFixed?e.d`
273
+ `}render(){let n=this.renderHeader();return this.isFixed?e.p`
274
274
  <div class="pkt-header-service-wrapper">
275
275
  ${n}
276
276
  <div class=${t.t({"pkt-header-service-spacer":!0,"pkt-header-service-spacer--compact":this.compact,"pkt-header-service-spacer--has-user":!!this.user,"pkt-header-service-spacer--mobile":this.isMobile,"pkt-header-service-spacer--tablet":this.isTablet})}></div>
277
277
  </div>
278
- `:n}};e.r([e.s({type:String,attribute:`service-name`})],d.prototype,`serviceName`,void 0),e.r([e.s({type:String,attribute:`service-link`})],d.prototype,`serviceLink`,void 0),e.r([e.s({type:String,attribute:`logo-link`})],d.prototype,`logoLink`,void 0),e.r([e.s({type:String,attribute:`search-placeholder`})],d.prototype,`searchPlaceholder`,void 0),e.r([e.s({type:String,attribute:`search-value`})],d.prototype,`searchValue`,void 0),e.r([e.s({type:Number,attribute:`mobile-breakpoint`})],d.prototype,`mobileBreakpoint`,void 0),e.r([e.s({type:Number,attribute:`tablet-breakpoint`})],d.prototype,`tabletBreakpoint`,void 0),e.r([e.s({type:String,attribute:`opened-menu`})],d.prototype,`openedMenu`,void 0),e.r([e.s({type:String,attribute:`log-out-button-placement`})],d.prototype,`logOutButtonPlacement`,void 0),e.r([e.s({type:String})],d.prototype,`position`,void 0),e.r([e.s({type:String,attribute:`scroll-behavior`})],d.prototype,`scrollBehavior`,void 0),e.r([e.s({type:String,attribute:`slot-menu-variant`})],d.prototype,`slotMenuVariant`,void 0),e.r([e.s({type:String,attribute:`slot-menu-text`})],d.prototype,`slotMenuText`,void 0),e.r([e.s({type:Boolean,attribute:`hide-logo`,converter:a.t})],d.prototype,`hideLogo`,void 0),e.r([e.s({type:Boolean,converter:a.t})],d.prototype,`compact`,void 0),e.r([e.s({type:Boolean,attribute:`show-search`,converter:a.t})],d.prototype,`showSearch`,void 0),e.r([e.s({type:Boolean,attribute:`can-change-representation`,converter:a.t})],d.prototype,`canChangeRepresentation`,void 0),e.r([e.s({type:Boolean,attribute:`has-log-out`,converter:a.t})],d.prototype,`hasLogOut`,void 0),e.r([e.s({type:Object})],d.prototype,`user`,void 0),e.r([e.s({type:Array,attribute:`user-menu`})],d.prototype,`userMenu`,void 0),e.r([e.s({type:Object})],d.prototype,`representing`,void 0),e.r([e.o()],d.prototype,`isMobile`,void 0),e.r([e.o()],d.prototype,`isTablet`,void 0),e.r([e.o()],d.prototype,`openMenu`,void 0),e.r([e.o()],d.prototype,`isHidden`,void 0),e.r([e.o()],d.prototype,`componentWidth`,void 0),e.r([e.o()],d.prototype,`alignSlotRight`,void 0),e.r([e.o()],d.prototype,`alignSearchRight`,void 0);try{e.c(`pkt-header-service`)(d)}catch{console.warn(`Forsøker å definere <pkt-header-service>, men den er allerede definert`)}var f=class extends n.t{constructor(...e){super(...e),this.searchPlaceholder=`Søk`,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}firstUpdated(e){super.firstUpdated(e),this.emitDeprecationWarnings()}emitDeprecationWarnings(){this.userMenuFooter!==void 0&&console.warn(`[PktHeader] userMenuFooter is deprecated. Use userMenu instead.`),this.userOptions!==void 0&&console.warn(`[PktHeader] userOptions is deprecated. Use userMenu instead.`)}get effectiveUserMenu(){let e=this.userMenu||[],t=this.userMenuFooter||[],n=this.userOptions||[];return t.length||n.length?[...e,...n,...t]:this.userMenu}render(){return e.d`
278
+ `:n}};e.n([e.o({type:String,attribute:`service-name`})],d.prototype,`serviceName`,void 0),e.n([e.o({type:String,attribute:`service-link`})],d.prototype,`serviceLink`,void 0),e.n([e.o({type:String,attribute:`logo-link`})],d.prototype,`logoLink`,void 0),e.n([e.o({type:String,attribute:`search-placeholder`})],d.prototype,`searchPlaceholder`,void 0),e.n([e.o({type:String,attribute:`search-value`})],d.prototype,`searchValue`,void 0),e.n([e.o({type:Number,attribute:`mobile-breakpoint`})],d.prototype,`mobileBreakpoint`,void 0),e.n([e.o({type:Number,attribute:`tablet-breakpoint`})],d.prototype,`tabletBreakpoint`,void 0),e.n([e.o({type:String,attribute:`opened-menu`})],d.prototype,`openedMenu`,void 0),e.n([e.o({type:String,attribute:`log-out-button-placement`})],d.prototype,`logOutButtonPlacement`,void 0),e.n([e.o({type:String})],d.prototype,`position`,void 0),e.n([e.o({type:String,attribute:`scroll-behavior`})],d.prototype,`scrollBehavior`,void 0),e.n([e.o({type:String,attribute:`slot-menu-variant`})],d.prototype,`slotMenuVariant`,void 0),e.n([e.o({type:String,attribute:`slot-menu-text`})],d.prototype,`slotMenuText`,void 0),e.n([e.o({type:Boolean,attribute:`hide-logo`,converter:a.t})],d.prototype,`hideLogo`,void 0),e.n([e.o({type:Boolean,converter:a.t})],d.prototype,`compact`,void 0),e.n([e.o({type:Boolean,attribute:`show-search`,converter:a.t})],d.prototype,`showSearch`,void 0),e.n([e.o({type:Boolean,attribute:`can-change-representation`,converter:a.t})],d.prototype,`canChangeRepresentation`,void 0),e.n([e.o({type:Boolean,attribute:`has-log-out`,converter:a.t})],d.prototype,`hasLogOut`,void 0),e.n([e.o({type:Object})],d.prototype,`user`,void 0),e.n([e.o({type:Array,attribute:`user-menu`})],d.prototype,`userMenu`,void 0),e.n([e.o({type:Object})],d.prototype,`representing`,void 0),e.n([e.a()],d.prototype,`isMobile`,void 0),e.n([e.a()],d.prototype,`isTablet`,void 0),e.n([e.a()],d.prototype,`openMenu`,void 0),e.n([e.a()],d.prototype,`isHidden`,void 0),e.n([e.a()],d.prototype,`componentWidth`,void 0),e.n([e.a()],d.prototype,`alignSlotRight`,void 0),e.n([e.a()],d.prototype,`alignSearchRight`,void 0);try{e.s(`pkt-header-service`)(d)}catch{console.warn(`Forsøker å definere <pkt-header-service>, men den er allerede definert`)}var f=class extends n.t{constructor(...e){super(...e),this.searchPlaceholder=`Søk`,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}firstUpdated(e){super.firstUpdated(e),this.emitDeprecationWarnings()}emitDeprecationWarnings(){this.userMenuFooter!==void 0&&console.warn(`[PktHeader] userMenuFooter is deprecated. Use userMenu instead.`),this.userOptions!==void 0&&console.warn(`[PktHeader] userOptions is deprecated. Use userMenu instead.`)}get effectiveUserMenu(){let e=this.userMenu||[],t=this.userMenuFooter||[],n=this.userOptions||[];return t.length||n.length?[...e,...n,...t]:this.userMenu}render(){return e.p`
279
279
  <pkt-header-service
280
280
  service-name=${r.t(this.serviceName)}
281
281
  service-link=${r.t(this.serviceLink)}
@@ -299,6 +299,6 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
299
299
  .userMenu=${this.effectiveUserMenu}
300
300
  .representing=${this.representing}
301
301
  >
302
- ${this.hasSlotContent()?e.d`<div class="pkt-contents">${n.n(this)}</div>`:e.l}
302
+ ${this.hasSlotContent()?e.p`<div class="pkt-contents">${n.n(this)}</div>`:e.d}
303
303
  </pkt-header-service>
304
- `}};e.r([e.s({type:String,attribute:`service-name`})],f.prototype,`serviceName`,void 0),e.r([e.s({type:String,attribute:`service-link`})],f.prototype,`serviceLink`,void 0),e.r([e.s({type:String,attribute:`logo-link`})],f.prototype,`logoLink`,void 0),e.r([e.s({type:String,attribute:`search-placeholder`})],f.prototype,`searchPlaceholder`,void 0),e.r([e.s({type:String,attribute:`search-value`})],f.prototype,`searchValue`,void 0),e.r([e.s({type:Number,attribute:`mobile-breakpoint`})],f.prototype,`mobileBreakpoint`,void 0),e.r([e.s({type:Number,attribute:`tablet-breakpoint`})],f.prototype,`tabletBreakpoint`,void 0),e.r([e.s({type:String,attribute:`opened-menu`})],f.prototype,`openedMenu`,void 0),e.r([e.s({type:String,attribute:`log-out-button-placement`})],f.prototype,`logOutButtonPlacement`,void 0),e.r([e.s({type:String})],f.prototype,`position`,void 0),e.r([e.s({type:String,attribute:`scroll-behavior`})],f.prototype,`scrollBehavior`,void 0),e.r([e.s({type:String,attribute:`slot-menu-variant`})],f.prototype,`slotMenuVariant`,void 0),e.r([e.s({type:String,attribute:`slot-menu-text`})],f.prototype,`slotMenuText`,void 0),e.r([e.s({type:Boolean,attribute:`hide-logo`,converter:a.t})],f.prototype,`hideLogo`,void 0),e.r([e.s({type:Boolean,converter:a.t})],f.prototype,`compact`,void 0),e.r([e.s({type:Boolean,attribute:`show-search`,converter:a.t})],f.prototype,`showSearch`,void 0),e.r([e.s({type:Boolean,attribute:`can-change-representation`,converter:a.t})],f.prototype,`canChangeRepresentation`,void 0),e.r([e.s({type:Boolean,attribute:`has-log-out`,converter:a.t})],f.prototype,`hasLogOut`,void 0),e.r([e.s({type:Object})],f.prototype,`user`,void 0),e.r([e.s({type:Array,attribute:`user-menu`})],f.prototype,`userMenu`,void 0),e.r([e.s({type:Object})],f.prototype,`representing`,void 0),e.r([e.s({type:Array,attribute:`user-menu-footer`})],f.prototype,`userMenuFooter`,void 0),e.r([e.s({type:Array,attribute:`user-options`})],f.prototype,`userOptions`,void 0);try{e.c(`pkt-header`)(f)}catch{console.warn(`Forsøker å definere <pkt-header>, men den er allerede definert`)}Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
304
+ `}};e.n([e.o({type:String,attribute:`service-name`})],f.prototype,`serviceName`,void 0),e.n([e.o({type:String,attribute:`service-link`})],f.prototype,`serviceLink`,void 0),e.n([e.o({type:String,attribute:`logo-link`})],f.prototype,`logoLink`,void 0),e.n([e.o({type:String,attribute:`search-placeholder`})],f.prototype,`searchPlaceholder`,void 0),e.n([e.o({type:String,attribute:`search-value`})],f.prototype,`searchValue`,void 0),e.n([e.o({type:Number,attribute:`mobile-breakpoint`})],f.prototype,`mobileBreakpoint`,void 0),e.n([e.o({type:Number,attribute:`tablet-breakpoint`})],f.prototype,`tabletBreakpoint`,void 0),e.n([e.o({type:String,attribute:`opened-menu`})],f.prototype,`openedMenu`,void 0),e.n([e.o({type:String,attribute:`log-out-button-placement`})],f.prototype,`logOutButtonPlacement`,void 0),e.n([e.o({type:String})],f.prototype,`position`,void 0),e.n([e.o({type:String,attribute:`scroll-behavior`})],f.prototype,`scrollBehavior`,void 0),e.n([e.o({type:String,attribute:`slot-menu-variant`})],f.prototype,`slotMenuVariant`,void 0),e.n([e.o({type:String,attribute:`slot-menu-text`})],f.prototype,`slotMenuText`,void 0),e.n([e.o({type:Boolean,attribute:`hide-logo`,converter:a.t})],f.prototype,`hideLogo`,void 0),e.n([e.o({type:Boolean,converter:a.t})],f.prototype,`compact`,void 0),e.n([e.o({type:Boolean,attribute:`show-search`,converter:a.t})],f.prototype,`showSearch`,void 0),e.n([e.o({type:Boolean,attribute:`can-change-representation`,converter:a.t})],f.prototype,`canChangeRepresentation`,void 0),e.n([e.o({type:Boolean,attribute:`has-log-out`,converter:a.t})],f.prototype,`hasLogOut`,void 0),e.n([e.o({type:Object})],f.prototype,`user`,void 0),e.n([e.o({type:Array,attribute:`user-menu`})],f.prototype,`userMenu`,void 0),e.n([e.o({type:Object})],f.prototype,`representing`,void 0),e.n([e.o({type:Array,attribute:`user-menu-footer`})],f.prototype,`userMenuFooter`,void 0),e.n([e.o({type:Array,attribute:`user-options`})],f.prototype,`userOptions`,void 0);try{e.s(`pkt-header`)(f)}catch{console.warn(`Forsøker å definere <pkt-header>, men den er allerede definert`)}Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});