@oslokommune/punkt-elements 16.7.3 → 16.7.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 (248) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/accordion-BB1JrONI.cjs +34 -0
  3. package/dist/accordion-nNH87Y60.js +130 -0
  4. package/dist/alert-BEEnTiCb.cjs +33 -0
  5. package/dist/alert-ePJuDtmm.js +171 -0
  6. package/dist/async-directive-B9P1Qa0k.cjs +1 -0
  7. package/dist/async-directive-CaQiqjyV.js +55 -0
  8. package/dist/backlink-Ba03LlbB.cjs +13 -0
  9. package/dist/backlink-CiwXrQYD.js +38 -0
  10. package/dist/booleanish-BmcOU-43.js +11 -0
  11. package/dist/booleanish-jJLlnr6-.cjs +1 -0
  12. package/dist/breadcrumbs-CD1zib3s.cjs +43 -0
  13. package/dist/breadcrumbs-CpuVqWhF.js +76 -0
  14. package/dist/button-BIpd1xJh.js +95 -0
  15. package/dist/button-D-TOBaJB.cjs +27 -0
  16. package/dist/calendar-BzEtOJla.js +2031 -0
  17. package/dist/calendar-E5jJLt8D.cjs +90 -0
  18. package/dist/card-BYJu1MYm.js +339 -0
  19. package/dist/card-CUFhMVim.cjs +87 -0
  20. package/dist/checkbox-BARDb9iV.cjs +31 -0
  21. package/dist/checkbox-Cspxcvt_.js +111 -0
  22. package/dist/class-map-C8HuhNzZ.js +27 -0
  23. package/dist/class-map-CJ-msbHs.cjs +1 -0
  24. package/dist/classutils-DEL164Ur.js +7 -0
  25. package/dist/classutils-z8YsPlOf.cjs +1 -0
  26. package/dist/combobox-BcdLZRDU.js +984 -0
  27. package/dist/combobox-CGbFTWq_.cjs +135 -0
  28. package/dist/consent-DeB_5sWH.js +197 -0
  29. package/dist/consent-hwu7pp3S.cjs +11 -0
  30. package/dist/datepicker-DpmlsnH_.cjs +273 -0
  31. package/dist/datepicker-OVd8pmnZ.js +1125 -0
  32. package/dist/dialog-polyfill.esm-1hPr0gl9.js +280 -0
  33. package/dist/dialog-polyfill.esm-D3Oinvk0.cjs +1 -0
  34. package/dist/directive-3THFsVew.js +28 -0
  35. package/dist/directive-CJ2giQBZ.cjs +1 -0
  36. package/dist/directive-helpers-D1QSxY17.cjs +1 -0
  37. package/dist/directive-helpers-Dkv2gKgs.js +25 -0
  38. package/dist/element-DjtxO-1r.cjs +2 -0
  39. package/dist/element-cZ85T_aa.js +693 -0
  40. package/dist/element-with-slot-4J2o3SeU.js +166 -0
  41. package/dist/element-with-slot-CWoTGA1B.cjs +1 -0
  42. package/dist/header-DWgPgGfS.cjs +304 -0
  43. package/dist/header-a6ztVNp3.js +782 -0
  44. package/dist/heading-BgSWIRii.cjs +1 -0
  45. package/dist/heading-DiQLPxdf.js +73 -0
  46. package/dist/helptext-CCBKKLus.js +65 -0
  47. package/dist/helptext-D-3QfZv5.cjs +24 -0
  48. package/dist/icon-Co72KtgF.js +86 -0
  49. package/dist/icon-Dr8sfT2X.cjs +1 -0
  50. package/dist/if-defined-Cjj8qN-Z.js +5 -0
  51. package/dist/if-defined-XKOD_t_V.cjs +1 -0
  52. package/dist/index.d.ts +1 -2
  53. package/dist/input-element-B1yxcfz4.cjs +1 -0
  54. package/dist/input-element-Bw1s6NlF.js +643 -0
  55. package/dist/input-wrapper-BRuVELpK.cjs +54 -0
  56. package/dist/input-wrapper-CDyHTR1V.js +164 -0
  57. package/dist/input-wrapper-Dwd-_sKm.cjs +1 -0
  58. package/dist/input-wrapper-YfTmpSSY.js +117 -0
  59. package/dist/link-CKAFMz9j.js +89 -0
  60. package/dist/link-CyTCpI0k.cjs +7 -0
  61. package/dist/linkcard-B0KOGaGj.js +55 -0
  62. package/dist/linkcard-BE4-FewK.cjs +13 -0
  63. package/dist/listbox-DCA2JoPV.cjs +106 -0
  64. package/dist/listbox-DuBgTFvH.js +397 -0
  65. package/dist/loader-6kFZUErT.js +66 -0
  66. package/dist/loader-CX2rsC01.cjs +16 -0
  67. package/dist/messagebox-Cwlg5sOr.js +110 -0
  68. package/dist/messagebox-Din9X53b.cjs +13 -0
  69. package/dist/modal-C_wtsh9m.js +209 -0
  70. package/dist/modal-DS_wUOIv.cjs +36 -0
  71. package/dist/pkt-accordion.cjs +1 -1
  72. package/dist/pkt-accordion.js +2 -7
  73. package/dist/pkt-alert.cjs +1 -1
  74. package/dist/pkt-alert.js +2 -5
  75. package/dist/pkt-backlink.cjs +1 -1
  76. package/dist/pkt-backlink.js +2 -5
  77. package/dist/pkt-breadcrumbs.cjs +1 -43
  78. package/dist/pkt-breadcrumbs.js +2 -81
  79. package/dist/pkt-button.cjs +1 -1
  80. package/dist/pkt-button.js +2 -5
  81. package/dist/pkt-calendar.cjs +1 -1
  82. package/dist/pkt-calendar.js +2 -5
  83. package/dist/pkt-card.cjs +1 -1
  84. package/dist/pkt-card.js +2 -5
  85. package/dist/pkt-checkbox.cjs +1 -1
  86. package/dist/pkt-checkbox.js +2 -5
  87. package/dist/pkt-combobox.cjs +1 -1
  88. package/dist/pkt-combobox.js +2 -5
  89. package/dist/pkt-consent.cjs +1 -1
  90. package/dist/pkt-consent.js +2 -5
  91. package/dist/pkt-datepicker.cjs +1 -1
  92. package/dist/pkt-datepicker.js +5 -9
  93. package/dist/pkt-header.cjs +1 -304
  94. package/dist/pkt-header.js +2 -861
  95. package/dist/pkt-heading.cjs +1 -1
  96. package/dist/pkt-heading.js +2 -5
  97. package/dist/pkt-helptext.cjs +1 -1
  98. package/dist/pkt-helptext.js +2 -5
  99. package/dist/pkt-icon.cjs +1 -1
  100. package/dist/pkt-icon.js +2 -5
  101. package/dist/pkt-index.cjs +1 -1
  102. package/dist/pkt-index.js +30 -66
  103. package/dist/pkt-input-wrapper.cjs +1 -1
  104. package/dist/pkt-input-wrapper.js +2 -5
  105. package/dist/pkt-link.cjs +1 -1
  106. package/dist/pkt-link.js +2 -5
  107. package/dist/pkt-linkcard.cjs +1 -1
  108. package/dist/pkt-linkcard.js +2 -5
  109. package/dist/pkt-listbox.cjs +1 -1
  110. package/dist/pkt-listbox.js +2 -5
  111. package/dist/pkt-loader.cjs +1 -1
  112. package/dist/pkt-loader.js +2 -5
  113. package/dist/pkt-messagebox.cjs +1 -1
  114. package/dist/pkt-messagebox.js +2 -5
  115. package/dist/pkt-modal.cjs +1 -1
  116. package/dist/pkt-modal.js +2 -5
  117. package/dist/pkt-options-controller-CRrI6WMk.js +43 -0
  118. package/dist/pkt-options-controller-CXUGx134.cjs +1 -0
  119. package/dist/pkt-progressbar.cjs +1 -1
  120. package/dist/pkt-progressbar.js +2 -5
  121. package/dist/pkt-radiobutton.cjs +1 -1
  122. package/dist/pkt-radiobutton.js +2 -5
  123. package/dist/pkt-select.cjs +1 -1
  124. package/dist/pkt-select.js +2 -5
  125. package/dist/pkt-tabs.cjs +1 -1
  126. package/dist/pkt-tabs.js +2 -7
  127. package/dist/pkt-tag.cjs +1 -1
  128. package/dist/pkt-tag.js +2 -5
  129. package/dist/pkt-textarea.cjs +1 -1
  130. package/dist/pkt-textarea.js +2 -5
  131. package/dist/pkt-textinput.cjs +1 -1
  132. package/dist/pkt-textinput.js +2 -5
  133. package/dist/pkt-timepicker.cjs +1 -191
  134. package/dist/pkt-timepicker.js +2 -560
  135. package/dist/progressbar-CdXtmOBb.cjs +17 -0
  136. package/dist/progressbar-Dy9AiYQz.js +113 -0
  137. package/dist/radiobutton-GOnpUbCW.cjs +31 -0
  138. package/dist/radiobutton-V_KPbup_.js +84 -0
  139. package/dist/ref-BaJ0mBT_.cjs +1 -0
  140. package/dist/ref-RS8Uv6uC.js +30 -0
  141. package/dist/repeat-Cepr3469.js +57 -0
  142. package/dist/repeat-CqcDYBxr.cjs +1 -0
  143. package/dist/select-BSAFd8Wa.js +164 -0
  144. package/dist/select-C2i8sOk5.cjs +49 -0
  145. package/dist/tabs-D8nL9rWx.cjs +37 -0
  146. package/dist/tabs-Y7utmJi9.js +318 -0
  147. package/dist/tag-DLthw5b4.cjs +27 -0
  148. package/dist/tag-VwykmuQR.js +179 -0
  149. package/dist/textarea-D7aGOyDf.cjs +46 -0
  150. package/dist/textarea-DYOBhJrN.js +115 -0
  151. package/dist/textinput-BUgntXnM.js +124 -0
  152. package/dist/textinput-DFh8_9cx.cjs +70 -0
  153. package/dist/timepicker-BIfE7KKJ.cjs +191 -0
  154. package/dist/timepicker-DaSwn1FA.js +503 -0
  155. package/dist/utils-CUqCKGvp.js +7 -0
  156. package/dist/utils-CjAbIttF.cjs +1 -0
  157. package/package.json +6 -6
  158. package/src/components/alert/alert.test.ts +1 -1
  159. package/src/components/alert/alert.ts +6 -6
  160. package/src/components/datepicker/datepicker-utils.test.ts +16 -23
  161. package/dist/accordionitem-_9AiCIvd.cjs +0 -34
  162. package/dist/accordionitem-dCfSrxh5.js +0 -140
  163. package/dist/alert-BtOk8yRH.cjs +0 -33
  164. package/dist/alert-DlY2_grU.js +0 -117
  165. package/dist/async-directive-CMzWMlZ5.js +0 -65
  166. package/dist/async-directive-DoMuclel.cjs +0 -5
  167. package/dist/backlink-Ce5Vldop.js +0 -49
  168. package/dist/backlink-y3dwjKPC.cjs +0 -13
  169. package/dist/booleanish-BKVonob4.cjs +0 -1
  170. package/dist/booleanish-C9R0tdXH.js +0 -11
  171. package/dist/button-B_TXwNzt.cjs +0 -27
  172. package/dist/button-BiY-wlKF.js +0 -139
  173. package/dist/calendar-B2pji2zn.cjs +0 -90
  174. package/dist/calendar-DhjQDC4C.js +0 -2140
  175. package/dist/card-BwMNB5Bb.cjs +0 -87
  176. package/dist/card-CGlmcMSR.js +0 -233
  177. package/dist/checkbox-BsJZYA26.js +0 -147
  178. package/dist/checkbox-CTY8f_qn.cjs +0 -31
  179. package/dist/class-map-CEnykyO_.js +0 -34
  180. package/dist/class-map-CsENJXf1.cjs +0 -5
  181. package/dist/classutils-BwNK82ZQ.cjs +0 -1
  182. package/dist/classutils-RQs1k6D9.js +0 -7
  183. package/dist/combobox-DSB5WOxg.js +0 -815
  184. package/dist/combobox-DbICIgKG.cjs +0 -135
  185. package/dist/consent-DkOQpbsg.cjs +0 -11
  186. package/dist/consent-SNWV_mMU.js +0 -175
  187. package/dist/datepicker-BEWl9iz3.cjs +0 -273
  188. package/dist/datepicker-euHyzXnb.js +0 -1170
  189. package/dist/dialog-polyfill.esm-CPKZe7AL.cjs +0 -1
  190. package/dist/dialog-polyfill.esm-CbjBMXAG.js +0 -395
  191. package/dist/directive-C7oCP5Bh.cjs +0 -5
  192. package/dist/directive-helpers-BP2WOx60.cjs +0 -5
  193. package/dist/directive-helpers-rm-28gIj.js +0 -38
  194. package/dist/directive-oAbCiebi.js +0 -27
  195. package/dist/element-CPpT3rFQ.js +0 -638
  196. package/dist/element-gR_VtSiD.cjs +0 -27
  197. package/dist/element-with-slot-Dqk6-TRR.js +0 -240
  198. package/dist/element-with-slot-ZX-up7jO.cjs +0 -1
  199. package/dist/heading-D2tVS6lS.js +0 -103
  200. package/dist/heading-DrzbgDb6.cjs +0 -1
  201. package/dist/helptext-BKtU4mas.js +0 -82
  202. package/dist/helptext-DcRC7wW2.cjs +0 -24
  203. package/dist/icon-CxQcIa5F.js +0 -105
  204. package/dist/icon-q81vqPK_.cjs +0 -9
  205. package/dist/if-defined-B0krMLad.js +0 -10
  206. package/dist/if-defined-BOW3ODSj.cjs +0 -5
  207. package/dist/input-element-8nLwuQS4.js +0 -837
  208. package/dist/input-element-DdVhUvva.cjs +0 -1
  209. package/dist/input-wrapper-Bs4CRNst.js +0 -181
  210. package/dist/input-wrapper-Bv9aqqVq.cjs +0 -54
  211. package/dist/input-wrapper-CDgenrYA.js +0 -6
  212. package/dist/input-wrapper-EoSAbU-U.cjs +0 -1
  213. package/dist/link-C0rl-86s.cjs +0 -7
  214. package/dist/link-Cdqgl60z.js +0 -55
  215. package/dist/linkcard-Dimu7Rlx.cjs +0 -13
  216. package/dist/linkcard-Lbq_UhjZ.js +0 -56
  217. package/dist/listbox-Bia4_tvN.js +0 -440
  218. package/dist/listbox-La2GZQei.cjs +0 -106
  219. package/dist/loader-D1ugDXGV.cjs +0 -16
  220. package/dist/loader-DyN6RGC5.js +0 -95
  221. package/dist/messagebox-BGMVm2t9.js +0 -71
  222. package/dist/messagebox-M0yIgCz9.cjs +0 -13
  223. package/dist/modal-CMO1RtIi.cjs +0 -36
  224. package/dist/modal-DjPQDE-Z.js +0 -156
  225. package/dist/pkt-options-controller-5LXbEzuk.cjs +0 -1
  226. package/dist/pkt-options-controller-B5YalfCb.js +0 -39
  227. package/dist/progressbar-BqlMzkM_.cjs +0 -21
  228. package/dist/progressbar-sbHDFC12.js +0 -162
  229. package/dist/radiobutton-5ZqVVtTT.cjs +0 -31
  230. package/dist/radiobutton-D8Ai8ETa.js +0 -113
  231. package/dist/ref-Bg_Swj5w.js +0 -42
  232. package/dist/ref-CL-Xk9Xm.cjs +0 -5
  233. package/dist/repeat-BD8TKgJb.js +0 -61
  234. package/dist/repeat-Cfq8CDlf.cjs +0 -5
  235. package/dist/select-De-n8on9.js +0 -230
  236. package/dist/select-dTWibR6_.cjs +0 -49
  237. package/dist/state-C_1EOo3D.js +0 -12
  238. package/dist/state-Dg-53wQ8.cjs +0 -5
  239. package/dist/tabitem-B9-jeV97.js +0 -334
  240. package/dist/tabitem-BnhzqfW3.cjs +0 -65
  241. package/dist/tag-CbwO8yvD.cjs +0 -27
  242. package/dist/tag-D4FI5t3y.js +0 -117
  243. package/dist/textarea-BmLaKzsc.cjs +0 -50
  244. package/dist/textarea-CMiSJaYL.js +0 -133
  245. package/dist/textinput-em9y4yrL.cjs +0 -70
  246. package/dist/textinput-r8udK0IX.js +0 -152
  247. package/dist/utils-DznhwRXm.js +0 -8
  248. package/dist/utils-byXsEz1u.cjs +0 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,41 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [16.7.7](https://github.com/oslokommune/punkt/compare/16.7.6...16.7.7) (2026-04-16)
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+ Ingen
12
+
13
+ ### Features
14
+ Ingen
15
+
16
+ ### Bug Fixes
17
+ Ingen
18
+
19
+ ### Chores
20
+ Ingen
21
+
22
+ ---
23
+
24
+
25
+ ## [16.7.4](https://github.com/oslokommune/punkt/compare/16.7.3...16.7.4) (2026-04-14)
26
+
27
+ ### ⚠ BREAKING CHANGES
28
+ Ingen
29
+
30
+ ### Features
31
+ Ingen
32
+
33
+ ### Bug Fixes
34
+ * Vite => 8.0.8 & Vitest => 4.1.4 & TypeScript => 6.0.2 (#3418).
35
+
36
+
37
+ ### Chores
38
+ Ingen
39
+
40
+ ---
41
+
42
+
8
43
  ## [16.7.3](https://github.com/oslokommune/punkt/compare/16.7.2...16.7.3) (2026-04-14)
9
44
 
10
45
  ### ⚠ BREAKING CHANGES
@@ -0,0 +1,34 @@
1
+ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),n=require(`./element-with-slot-CWoTGA1B.cjs`),r=require(`./if-defined-XKOD_t_V.cjs`),i=require(`./ref-BaJ0mBT_.cjs`);var a=class extends e.a{constructor(...e){super(...e),this.ariaLabelledBy=``,this.compact=!1,this.skin=`borderless`,this.name=``}updated(e){e.has(`skin`)&&this.requestUpdate(),e.has(`name`)&&this.updateAccordionItemNames()}updateAccordionItemNames(){if(this.name){let e=this.renderRoot?.querySelector(`slot`);e&&e.assignedElements().forEach(e=>{e.tagName.toLowerCase()===`pkt-accordion-item`&&(e.hasAttribute(`name`)||e.setAttribute(`name`,this.name))})}}firstUpdated(){let e=this.renderRoot?.querySelector(`slot`);e&&e.addEventListener(`slotchange`,()=>{this.updateAccordionItemNames()})}render(){return e.d`
2
+ <div
3
+ part="container"
4
+ class=${t.t({"pkt-accordion":!0,"pkt-accordion--compact":this.compact,[`pkt-accordion--${this.skin}`]:this.skin})}
5
+ data-testid="pkt-accordion"
6
+ aria-labelledby=${this.ariaLabelledBy}
7
+ >
8
+ <slot></slot>
9
+ </div>
10
+ `}};e.r([e.s({type:String,reflect:!0,attribute:`aria-labelledby`})],a.prototype,`ariaLabelledBy`,void 0),e.r([e.s({type:Boolean,reflect:!0,attribute:`compact`})],a.prototype,`compact`,void 0),e.r([e.s({type:String,reflect:!0,attribute:`skin`})],a.prototype,`skin`,void 0),e.r([e.s({type:String,reflect:!0,attribute:`name`})],a.prototype,`name`,void 0);try{e.c(`pkt-accordion`)(a)}catch{console.warn(`Forsøker å definere <pkt-accordion>, men den er allerede definert`)}var o=class extends n.t{constructor(){super(),this.defaultOpen=!1,this.title=``,this.skin=void 0,this.compact=!1,this.isOpen=!1,this.name=void 0,this.accordionItemRef=i.t()}firstUpdated(e){this.defaultOpen&&(this.isOpen=!0)}render(){return e.d`
11
+ <details
12
+ class=${t.t({"pkt-accordion-item":!0,"pkt-accordion-item--compact":this.compact,[`pkt-accordion-item--${this.skin}`]:!!this.skin})}
13
+ id=${this.id}
14
+ ?open=${this.isOpen}
15
+ ${i.n(this.accordionItemRef)}
16
+ name=${r.t(this.name)}
17
+ >
18
+ <summary class="pkt-accordion-item__title" id=${`pkt-accordion-item-summary-${this.id}`}>
19
+ ${this.title}
20
+ <pkt-icon
21
+ name="chevron-thin-down"
22
+ class="pkt-accordion-item__icon"
23
+ aria-hidden="true"
24
+ ></pkt-icon>
25
+ </summary>
26
+ <div
27
+ class="pkt-accordion-item__content"
28
+ id="pkt-accordion-item__content-${this.id}"
29
+ role="region"
30
+ >
31
+ <div class="pkt-accordion-item__content-inner">${n.n(this)}</div>
32
+ </div>
33
+ </details>
34
+ `}};e.r([e.s({type:Boolean})],o.prototype,`defaultOpen`,void 0),e.r([e.s({type:String})],o.prototype,`title`,void 0),e.r([e.s({type:String,reflect:!0})],o.prototype,`skin`,void 0),e.r([e.s({type:Boolean,reflect:!0})],o.prototype,`compact`,void 0),e.r([e.s({type:Boolean,reflect:!0})],o.prototype,`isOpen`,void 0),e.r([e.s({type:String,reflect:!0})],o.prototype,`name`,void 0);try{e.c(`pkt-accordion-item`)(o)}catch{console.warn(`Forsøker å definere <pkt-accordion-item>, men den er allerede definert`)}var s=a;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
@@ -0,0 +1,130 @@
1
+ import { a as e, c as t, d as n, r, s as i } from "./element-cZ85T_aa.js";
2
+ import { t as a } from "./class-map-C8HuhNzZ.js";
3
+ import { n as o, t as s } from "./element-with-slot-4J2o3SeU.js";
4
+ import { t as c } from "./if-defined-Cjj8qN-Z.js";
5
+ import { n as l, t as u } from "./ref-RS8Uv6uC.js";
6
+ //#region src/components/accordion/accordion.ts
7
+ var d = class extends e {
8
+ constructor(...e) {
9
+ super(...e), this.ariaLabelledBy = "", this.compact = !1, this.skin = "borderless", this.name = "";
10
+ }
11
+ updated(e) {
12
+ e.has("skin") && this.requestUpdate(), e.has("name") && this.updateAccordionItemNames();
13
+ }
14
+ updateAccordionItemNames() {
15
+ if (this.name) {
16
+ let e = this.renderRoot?.querySelector("slot");
17
+ e && e.assignedElements().forEach((e) => {
18
+ e.tagName.toLowerCase() === "pkt-accordion-item" && (e.hasAttribute("name") || e.setAttribute("name", this.name));
19
+ });
20
+ }
21
+ }
22
+ firstUpdated() {
23
+ let e = this.renderRoot?.querySelector("slot");
24
+ e && e.addEventListener("slotchange", () => {
25
+ this.updateAccordionItemNames();
26
+ });
27
+ }
28
+ render() {
29
+ return n`
30
+ <div
31
+ part="container"
32
+ class=${a({
33
+ "pkt-accordion": !0,
34
+ "pkt-accordion--compact": this.compact,
35
+ [`pkt-accordion--${this.skin}`]: this.skin
36
+ })}
37
+ data-testid="pkt-accordion"
38
+ aria-labelledby=${this.ariaLabelledBy}
39
+ >
40
+ <slot></slot>
41
+ </div>
42
+ `;
43
+ }
44
+ };
45
+ r([i({
46
+ type: String,
47
+ reflect: !0,
48
+ attribute: "aria-labelledby"
49
+ })], d.prototype, "ariaLabelledBy", void 0), r([i({
50
+ type: Boolean,
51
+ reflect: !0,
52
+ attribute: "compact"
53
+ })], d.prototype, "compact", void 0), r([i({
54
+ type: String,
55
+ reflect: !0,
56
+ attribute: "skin"
57
+ })], d.prototype, "skin", void 0), r([i({
58
+ type: String,
59
+ reflect: !0,
60
+ attribute: "name"
61
+ })], d.prototype, "name", void 0);
62
+ try {
63
+ t("pkt-accordion")(d);
64
+ } catch {
65
+ console.warn("Forsøker å definere <pkt-accordion>, men den er allerede definert");
66
+ }
67
+ //#endregion
68
+ //#region src/components/accordion/accordionitem.ts
69
+ var f = class extends s {
70
+ constructor() {
71
+ super(), this.defaultOpen = !1, this.title = "", this.skin = void 0, this.compact = !1, this.isOpen = !1, this.name = void 0, this.accordionItemRef = u();
72
+ }
73
+ firstUpdated(e) {
74
+ this.defaultOpen && (this.isOpen = !0);
75
+ }
76
+ render() {
77
+ return n`
78
+ <details
79
+ class=${a({
80
+ "pkt-accordion-item": !0,
81
+ "pkt-accordion-item--compact": this.compact,
82
+ [`pkt-accordion-item--${this.skin}`]: !!this.skin
83
+ })}
84
+ id=${this.id}
85
+ ?open=${this.isOpen}
86
+ ${l(this.accordionItemRef)}
87
+ name=${c(this.name)}
88
+ >
89
+ <summary class="pkt-accordion-item__title" id=${`pkt-accordion-item-summary-${this.id}`}>
90
+ ${this.title}
91
+ <pkt-icon
92
+ name="chevron-thin-down"
93
+ class="pkt-accordion-item__icon"
94
+ aria-hidden="true"
95
+ ></pkt-icon>
96
+ </summary>
97
+ <div
98
+ class="pkt-accordion-item__content"
99
+ id="pkt-accordion-item__content-${this.id}"
100
+ role="region"
101
+ >
102
+ <div class="pkt-accordion-item__content-inner">${o(this)}</div>
103
+ </div>
104
+ </details>
105
+ `;
106
+ }
107
+ };
108
+ r([i({ type: Boolean })], f.prototype, "defaultOpen", void 0), r([i({ type: String })], f.prototype, "title", void 0), r([i({
109
+ type: String,
110
+ reflect: !0
111
+ })], f.prototype, "skin", void 0), r([i({
112
+ type: Boolean,
113
+ reflect: !0
114
+ })], f.prototype, "compact", void 0), r([i({
115
+ type: Boolean,
116
+ reflect: !0
117
+ })], f.prototype, "isOpen", void 0), r([i({
118
+ type: String,
119
+ reflect: !0
120
+ })], f.prototype, "name", void 0);
121
+ try {
122
+ t("pkt-accordion-item")(f);
123
+ } catch {
124
+ console.warn("Forsøker å definere <pkt-accordion-item>, men den er allerede definert");
125
+ }
126
+ //#endregion
127
+ //#region src/components/accordion/index.ts
128
+ var p = d;
129
+ //#endregion
130
+ export { f as n, d as r, p as t };
@@ -0,0 +1,33 @@
1
+ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),n=require(`./element-with-slot-CWoTGA1B.cjs`),r=require(`./classutils-z8YsPlOf.cjs`);require(`./icon-Dr8sfT2X.cjs`),require(`./button-D-TOBaJB.cjs`);var i={name:`pkt-alert`,react:`PktAlert`,"css-class":`pkt-alert`,"dark-mode":!0,isElement:!0,isPureReact:!0,events:{onClose:{description:`React: Klikk-event for 'Lukk'-knappen`},close:{description:`Vue: Klikk-event for 'Lukk'-knappen`}},props:{title:{name:`Tittel`,description:`Tittelen som vises øverst i på meldingen`,type:`string`,category:`contents`},skin:{name:`Utseende`,description:`Hvordan type melding er dette?`,type:[`info`,`success`,`warning`,`error`],default:`info`,category:`ui`},date:{name:`Sist oppdatert`,description:`Dato som vises nederst i på meldingen`,type:`string`,category:`contents`},ariaLive:{name:`aria-live`,description:`Hvordan skal skjermleseren lese opp meldingen?`,type:[`off`,`polite`,`assertive`],default:`polite`,category:`accessibility`},compact:{name:`Kompakt`,description:`Gjør meldingen mindre`,type:`boolean`,category:`ui`,default:!1},closeAlert:{name:`Vis 'Lukk'-knapp`,description:`Viser 'Lukk'-knappen`,type:`boolean`,default:!1,category:`ui`}},slots:{default:{description:`Innholdet i meldingen`}}},a=class extends n.t{constructor(){super(),this.compact=i.props.compact.default,this.title=``,this.skin=i.props.skin.default,this.ariaLive=i.props.ariaLive.default,this.ariaLiveAttr=null,this.closeAlert=i.props.closeAlert.default,this.date=null,this.role=`status`,this._isClosed=!1,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent(`close`,{detail:{origin:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`on-close`,{detail:{origin:e},bubbles:!0,composed:!0}))},this._isClosed=!1}connectedCallback(){super.connectedCallback(),this.ariaLiveAttr=this.getAttribute(`aria-live`)||this.ariaLive}attributeChangedCallback(e,t,n){e===`ariaLive`&&(this.ariaLiveAttr=n),super.attributeChangedCallback(e,t,n)}updated(e){super.updated(e),e.has(`ariaLive`)&&(this.ariaLiveAttr=this.ariaLive),e.has(`_isClosed`)&&r.t(this,`pkt-hide`,this._isClosed)}render(){let r={"pkt-alert":!0,"pkt-alert--compact":this.compact,[`pkt-alert--${this.skin}`]:this.skin,"pkt-hide":this._isClosed},i={"pkt-alert__grid":!0,"pkt-alert__noTitle":!this.title,"pkt-alert__noDate":!this.date};return e.d`
2
+ <div class=${t.t(r)} aria-live=${this.ariaLiveAttr}>
3
+ <div class=${t.t(i)}>
4
+ <pkt-icon
5
+ class="pkt-alert__icon"
6
+ aria-hidden="true"
7
+ name=${this.skin===`info`?`alert-information`:`alert-${this.skin}`}
8
+ ></pkt-icon>
9
+
10
+ ${this.closeAlert?e.d`
11
+ <div class="pkt-alert__close">
12
+ <pkt-button
13
+ tabindex="0"
14
+ aria-label="close"
15
+ size=${this.compact?`small`:`medium`}
16
+ type="button"
17
+ skin="tertiary"
18
+ iconName="close"
19
+ variant="icon-only"
20
+ @click=${this.close}
21
+ >
22
+ <span class="sr-only">Lukk</span>
23
+ </pkt-button>
24
+ </div>
25
+ `:e.l}
26
+ ${this.title?e.d`<div class="pkt-alert__title">${this.title}</div>`:e.l}
27
+
28
+ <div class="pkt-alert__text">${n.n(this)}</div>
29
+
30
+ ${this.date?e.d`<div class="pkt-alert__date">Sist oppdatert: ${this.date}</div>`:e.l}
31
+ </div>
32
+ </div>
33
+ `}};e.r([e.s({type:Boolean,reflect:!1})],a.prototype,`compact`,void 0),e.r([e.s({type:String,reflect:!0})],a.prototype,`title`,void 0),e.r([e.s({type:String,reflect:!0})],a.prototype,`skin`,void 0),e.r([e.s({type:String})],a.prototype,`ariaLive`,void 0),e.r([e.s({type:String,reflect:!0,attribute:`aria-live`})],a.prototype,`ariaLiveAttr`,void 0),e.r([e.s({type:Boolean,reflect:!0})],a.prototype,`closeAlert`,void 0),e.r([e.s({type:String,reflect:!0})],a.prototype,`date`,void 0),e.r([e.s({type:String,reflect:!0})],a.prototype,`role`,void 0),e.r([e.o()],a.prototype,`_isClosed`,void 0);try{e.c(`pkt-alert`)(a)}catch{console.warn(`Forsøker å definere <pkt-alert>, men den er allerede definert`)}var o=a;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
@@ -0,0 +1,171 @@
1
+ import { c as e, d as t, l as n, o as r, r as i, s as a } from "./element-cZ85T_aa.js";
2
+ import { t as o } from "./class-map-C8HuhNzZ.js";
3
+ import { n as s, t as c } from "./element-with-slot-4J2o3SeU.js";
4
+ import { t as l } from "./classutils-DEL164Ur.js";
5
+ import "./icon-Co72KtgF.js";
6
+ import "./button-BIpd1xJh.js";
7
+ var u = {
8
+ name: "pkt-alert",
9
+ react: "PktAlert",
10
+ "css-class": "pkt-alert",
11
+ "dark-mode": !0,
12
+ isElement: !0,
13
+ isPureReact: !0,
14
+ events: {
15
+ onClose: { description: "React: Klikk-event for 'Lukk'-knappen" },
16
+ close: { description: "Vue: Klikk-event for 'Lukk'-knappen" }
17
+ },
18
+ props: {
19
+ title: {
20
+ name: "Tittel",
21
+ description: "Tittelen som vises øverst i på meldingen",
22
+ type: "string",
23
+ category: "contents"
24
+ },
25
+ skin: {
26
+ name: "Utseende",
27
+ description: "Hvordan type melding er dette?",
28
+ type: [
29
+ "info",
30
+ "success",
31
+ "warning",
32
+ "error"
33
+ ],
34
+ default: "info",
35
+ category: "ui"
36
+ },
37
+ date: {
38
+ name: "Sist oppdatert",
39
+ description: "Dato som vises nederst i på meldingen",
40
+ type: "string",
41
+ category: "contents"
42
+ },
43
+ ariaLive: {
44
+ name: "aria-live",
45
+ description: "Hvordan skal skjermleseren lese opp meldingen?",
46
+ type: [
47
+ "off",
48
+ "polite",
49
+ "assertive"
50
+ ],
51
+ default: "polite",
52
+ category: "accessibility"
53
+ },
54
+ compact: {
55
+ name: "Kompakt",
56
+ description: "Gjør meldingen mindre",
57
+ type: "boolean",
58
+ category: "ui",
59
+ default: !1
60
+ },
61
+ closeAlert: {
62
+ name: "Vis 'Lukk'-knapp",
63
+ description: "Viser 'Lukk'-knappen",
64
+ type: "boolean",
65
+ default: !1,
66
+ category: "ui"
67
+ }
68
+ },
69
+ slots: { default: { description: "Innholdet i meldingen" } }
70
+ }, d = class extends c {
71
+ constructor() {
72
+ super(), this.compact = u.props.compact.default, this.title = "", this.skin = u.props.skin.default, this.ariaLive = u.props.ariaLive.default, this.ariaLiveAttr = null, this.closeAlert = u.props.closeAlert.default, this.date = null, this.role = "status", this._isClosed = !1, this.close = (e) => {
73
+ this._isClosed = !0, this.dispatchEvent(new CustomEvent("close", {
74
+ detail: { origin: e },
75
+ bubbles: !0,
76
+ composed: !0
77
+ })), this.dispatchEvent(new CustomEvent("on-close", {
78
+ detail: { origin: e },
79
+ bubbles: !0,
80
+ composed: !0
81
+ }));
82
+ }, this._isClosed = !1;
83
+ }
84
+ connectedCallback() {
85
+ super.connectedCallback(), this.ariaLiveAttr = this.getAttribute("aria-live") || this.ariaLive;
86
+ }
87
+ attributeChangedCallback(e, t, n) {
88
+ e === "ariaLive" && (this.ariaLiveAttr = n), super.attributeChangedCallback(e, t, n);
89
+ }
90
+ updated(e) {
91
+ super.updated(e), e.has("ariaLive") && (this.ariaLiveAttr = this.ariaLive), e.has("_isClosed") && l(this, "pkt-hide", this._isClosed);
92
+ }
93
+ render() {
94
+ let e = {
95
+ "pkt-alert": !0,
96
+ "pkt-alert--compact": this.compact,
97
+ [`pkt-alert--${this.skin}`]: this.skin,
98
+ "pkt-hide": this._isClosed
99
+ }, r = {
100
+ "pkt-alert__grid": !0,
101
+ "pkt-alert__noTitle": !this.title,
102
+ "pkt-alert__noDate": !this.date
103
+ };
104
+ return t`
105
+ <div class=${o(e)} aria-live=${this.ariaLiveAttr}>
106
+ <div class=${o(r)}>
107
+ <pkt-icon
108
+ class="pkt-alert__icon"
109
+ aria-hidden="true"
110
+ name=${this.skin === "info" ? "alert-information" : `alert-${this.skin}`}
111
+ ></pkt-icon>
112
+
113
+ ${this.closeAlert ? t`
114
+ <div class="pkt-alert__close">
115
+ <pkt-button
116
+ tabindex="0"
117
+ aria-label="close"
118
+ size=${this.compact ? "small" : "medium"}
119
+ type="button"
120
+ skin="tertiary"
121
+ iconName="close"
122
+ variant="icon-only"
123
+ @click=${this.close}
124
+ >
125
+ <span class="sr-only">Lukk</span>
126
+ </pkt-button>
127
+ </div>
128
+ ` : n}
129
+ ${this.title ? t`<div class="pkt-alert__title">${this.title}</div>` : n}
130
+
131
+ <div class="pkt-alert__text">${s(this)}</div>
132
+
133
+ ${this.date ? t`<div class="pkt-alert__date">Sist oppdatert: ${this.date}</div>` : n}
134
+ </div>
135
+ </div>
136
+ `;
137
+ }
138
+ };
139
+ i([a({
140
+ type: Boolean,
141
+ reflect: !1
142
+ })], d.prototype, "compact", void 0), i([a({
143
+ type: String,
144
+ reflect: !0
145
+ })], d.prototype, "title", void 0), i([a({
146
+ type: String,
147
+ reflect: !0
148
+ })], d.prototype, "skin", void 0), i([a({ type: String })], d.prototype, "ariaLive", void 0), i([a({
149
+ type: String,
150
+ reflect: !0,
151
+ attribute: "aria-live"
152
+ })], d.prototype, "ariaLiveAttr", void 0), i([a({
153
+ type: Boolean,
154
+ reflect: !0
155
+ })], d.prototype, "closeAlert", void 0), i([a({
156
+ type: String,
157
+ reflect: !0
158
+ })], d.prototype, "date", void 0), i([a({
159
+ type: String,
160
+ reflect: !0
161
+ })], d.prototype, "role", void 0), i([r()], d.prototype, "_isClosed", void 0);
162
+ try {
163
+ e("pkt-alert")(d);
164
+ } catch {
165
+ console.warn("Forsøker å definere <pkt-alert>, men den er allerede definert");
166
+ }
167
+ //#endregion
168
+ //#region src/components/alert/index.ts
169
+ var f = d;
170
+ //#endregion
171
+ export { d as n, f as t };
@@ -0,0 +1 @@
1
+ const e=require(`./directive-CJ2giQBZ.cjs`),t=require(`./directive-helpers-D1QSxY17.cjs`);var n=(e,t)=>{let r=e._$AN;if(r===void 0)return!1;for(let e of r)e._$AO?.(t,!1),n(e,t);return!0},r=e=>{let t,n;do{if((t=e._$AM)===void 0)break;n=t._$AN,n.delete(e),e=t}while(n?.size===0)},i=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(n===void 0)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),s(t)}};function a(e){this._$AN===void 0?this._$AM=e:(r(this),this._$AM=e,i(this))}function o(e,t=!1,i=0){let a=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(a))for(let e=i;e<a.length;e++)n(a[e],!1),r(a[e]);else a!=null&&(n(a,!1),r(a));else n(this,e)}var s=t=>{t.type==e.r.CHILD&&(t._$AP??=o,t._$AQ??=a)},c=class extends e.n{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),i(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(n(this,e),r(this))}setValue(e){if(t.i(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
@@ -0,0 +1,55 @@
1
+ import { n as e, r as t } from "./directive-3THFsVew.js";
2
+ import { i as n } from "./directive-helpers-Dkv2gKgs.js";
3
+ //#region ../../node_modules/lit-html/async-directive.js
4
+ var r = (e, t) => {
5
+ let n = e._$AN;
6
+ if (n === void 0) return !1;
7
+ for (let e of n) e._$AO?.(t, !1), r(e, t);
8
+ return !0;
9
+ }, i = (e) => {
10
+ let t, n;
11
+ do {
12
+ if ((t = e._$AM) === void 0) break;
13
+ n = t._$AN, n.delete(e), e = t;
14
+ } while (n?.size === 0);
15
+ }, a = (e) => {
16
+ for (let t; t = e._$AM; e = t) {
17
+ let n = t._$AN;
18
+ if (n === void 0) t._$AN = n = /* @__PURE__ */ new Set();
19
+ else if (n.has(e)) break;
20
+ n.add(e), c(t);
21
+ }
22
+ };
23
+ function o(e) {
24
+ this._$AN === void 0 ? this._$AM = e : (i(this), this._$AM = e, a(this));
25
+ }
26
+ function s(e, t = !1, n = 0) {
27
+ let a = this._$AH, o = this._$AN;
28
+ if (o !== void 0 && o.size !== 0) if (t) if (Array.isArray(a)) for (let e = n; e < a.length; e++) r(a[e], !1), i(a[e]);
29
+ else a != null && (r(a, !1), i(a));
30
+ else r(this, e);
31
+ }
32
+ var c = (e) => {
33
+ e.type == t.CHILD && (e._$AP ??= s, e._$AQ ??= o);
34
+ }, l = class extends e {
35
+ constructor() {
36
+ super(...arguments), this._$AN = void 0;
37
+ }
38
+ _$AT(e, t, n) {
39
+ super._$AT(e, t, n), a(this), this.isConnected = e._$AU;
40
+ }
41
+ _$AO(e, t = !0) {
42
+ e !== this.isConnected && (this.isConnected = e, e ? this.reconnected?.() : this.disconnected?.()), t && (r(this, e), i(this));
43
+ }
44
+ setValue(e) {
45
+ if (n(this._$Ct)) this._$Ct._$AI(e, this);
46
+ else {
47
+ let t = [...this._$Ct._$AH];
48
+ t[this._$Ci] = e, this._$Ct._$AI(t, this, 0);
49
+ }
50
+ }
51
+ disconnected() {}
52
+ reconnected() {}
53
+ };
54
+ //#endregion
55
+ export { l as t };
@@ -0,0 +1,13 @@
1
+ const e=require(`./element-DjtxO-1r.cjs`);require(`./icon-Dr8sfT2X.cjs`);const t=require(`./if-defined-XKOD_t_V.cjs`);var n=class extends e.t{constructor(...e){super(...e),this.href=``,this.text=`Forsiden`,this.ariaLabel=``}attributeChangedCallback(e,t,n){e===`arialabel`&&this.removeAttribute(`arialabel`),e===`href`&&this.removeAttribute(`href`),e===`text`&&this.removeAttribute(`text`),super.attributeChangedCallback(e,t,n)}render(){return e.d`<nav
2
+ class="pkt-back-link"
3
+ aria-label=${this.ariaLabel||`Gå tilbake til forrige side`}
4
+ >
5
+ <a href=${t.t(this.href||`/`)} class="pkt-link pkt-link--icon-left"
6
+ ><pkt-icon
7
+ class="pkt-back-link__icon pkt-icon pkt-link__icon"
8
+ name="chevron-thin-left"
9
+ aria-hidden="true"
10
+ ></pkt-icon
11
+ ><span class="pkt-back-link__text">${this.text}</span></a
12
+ >
13
+ </nav>`}};e.r([e.s({type:String})],n.prototype,`href`,void 0),e.r([e.s({type:String})],n.prototype,`text`,void 0),e.r([e.s({type:String})],n.prototype,`ariaLabel`,void 0);try{e.c(`pkt-backlink`)(n)}catch{console.warn(`Forsøker å definere <pkt-backlink>, men den er allerede definert`)}var r=n;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
@@ -0,0 +1,38 @@
1
+ import { c as e, d as t, r as n, s as r, t as i } from "./element-cZ85T_aa.js";
2
+ import "./icon-Co72KtgF.js";
3
+ import { t as a } from "./if-defined-Cjj8qN-Z.js";
4
+ //#region src/components/backlink/backlink.ts
5
+ var o = class extends i {
6
+ constructor(...e) {
7
+ super(...e), this.href = "", this.text = "Forsiden", this.ariaLabel = "";
8
+ }
9
+ attributeChangedCallback(e, t, n) {
10
+ e === "arialabel" && this.removeAttribute("arialabel"), e === "href" && this.removeAttribute("href"), e === "text" && this.removeAttribute("text"), super.attributeChangedCallback(e, t, n);
11
+ }
12
+ render() {
13
+ return t`<nav
14
+ class="pkt-back-link"
15
+ aria-label=${this.ariaLabel || "Gå tilbake til forrige side"}
16
+ >
17
+ <a href=${a(this.href || "/")} class="pkt-link pkt-link--icon-left"
18
+ ><pkt-icon
19
+ class="pkt-back-link__icon pkt-icon pkt-link__icon"
20
+ name="chevron-thin-left"
21
+ aria-hidden="true"
22
+ ></pkt-icon
23
+ ><span class="pkt-back-link__text">${this.text}</span></a
24
+ >
25
+ </nav>`;
26
+ }
27
+ };
28
+ n([r({ type: String })], o.prototype, "href", void 0), n([r({ type: String })], o.prototype, "text", void 0), n([r({ type: String })], o.prototype, "ariaLabel", void 0);
29
+ try {
30
+ e("pkt-backlink")(o);
31
+ } catch {
32
+ console.warn("Forsøker å definere <pkt-backlink>, men den er allerede definert");
33
+ }
34
+ //#endregion
35
+ //#region src/components/backlink/index.ts
36
+ var s = o;
37
+ //#endregion
38
+ export { o as n, s as t };
@@ -0,0 +1,11 @@
1
+ //#region ../../shared-types/booleanish.ts
2
+ var e = {
3
+ fromAttribute(e) {
4
+ return e == null ? !1 : e === "" || e === "true" || e === !0 ? !0 : e === "false" || e === !1 ? !1 : !!e;
5
+ },
6
+ toAttribute(e) {
7
+ return e ? "true" : "false";
8
+ }
9
+ };
10
+ //#endregion
11
+ export { e as t };
@@ -0,0 +1 @@
1
+ var e={fromAttribute(e){return e==null?!1:e===``||e===`true`||e===!0?!0:e===`false`||e===!1?!1:!!e},toAttribute(e){return e?`true`:`false`}};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
@@ -0,0 +1,43 @@
1
+ const e=require(`./element-DjtxO-1r.cjs`);require(`./icon-Dr8sfT2X.cjs`);var t=class extends e.t{constructor(...e){super(...e),this.breadcrumbs=[]}handleLinkClick(e,t,n){let r=new CustomEvent(`navigate`,{detail:{item:t,index:n,originalEvent:e},bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(r)||e.preventDefault()}render(){if(!this.breadcrumbs||this.breadcrumbs.length===0)return e.l;let t=this.breadcrumbs[this.breadcrumbs.length-2];return e.d`
2
+ <nav class="pkt-breadcrumbs" aria-label="brødsmulemeny">
3
+ <ol class="pkt-breadcrumbs__list pkt-breadcrumbs--desktop">
4
+ ${this.breadcrumbs.map((t,n)=>n===this.breadcrumbs.length-1?e.d`
5
+ <li class="pkt-breadcrumbs__item">
6
+ <span class="pkt-breadcrumbs__label" aria-current="true">
7
+ <span class="pkt-breadcrumbs__text">${t.text}</span>
8
+ </span>
9
+ </li>
10
+ `:e.d`
11
+ <li class="pkt-breadcrumbs__item">
12
+ <a
13
+ class="pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link"
14
+ href=${t.href}
15
+ @click=${e=>this.handleLinkClick(e,t,n)}
16
+ >
17
+ <pkt-icon
18
+ class="pkt-icon pkt-breadcrumbs__icon pkt-link__icon"
19
+ name="chevron-thin-right"
20
+ aria-hidden="true"
21
+ ></pkt-icon>
22
+ <span class="pkt-breadcrumbs__text">${t.text}</span>
23
+ </a>
24
+ </li>
25
+ `)}
26
+ </ol>
27
+
28
+ ${t?e.d`
29
+ <a
30
+ class="pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile"
31
+ href=${t.href}
32
+ @click=${e=>this.handleLinkClick(e,t,this.breadcrumbs.length-2)}
33
+ >
34
+ <pkt-icon
35
+ class="pkt-back-link__icon pkt-icon pkt-link__icon"
36
+ name="chevron-thin-left"
37
+ aria-hidden="true"
38
+ ></pkt-icon>
39
+ <span class="pkt-breadcrumbs__text">${t.text}</span>
40
+ </a>
41
+ `:e.l}
42
+ </nav>
43
+ `}};e.r([e.s({type:Array})],t.prototype,`breadcrumbs`,void 0);try{e.c(`pkt-breadcrumbs`)(t)}catch{console.warn(`Forsøker å definere <pkt-breadcrumbs>, men den er allerede definert`)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
@@ -0,0 +1,76 @@
1
+ import { c as e, d as t, l as n, r, s as i, t as a } from "./element-cZ85T_aa.js";
2
+ import "./icon-Co72KtgF.js";
3
+ //#region src/components/breadcrumbs/breadcrumbs.ts
4
+ var o = class extends a {
5
+ constructor(...e) {
6
+ super(...e), this.breadcrumbs = [];
7
+ }
8
+ handleLinkClick(e, t, n) {
9
+ let r = new CustomEvent("navigate", {
10
+ detail: {
11
+ item: t,
12
+ index: n,
13
+ originalEvent: e
14
+ },
15
+ bubbles: !0,
16
+ composed: !0,
17
+ cancelable: !0
18
+ });
19
+ this.dispatchEvent(r) || e.preventDefault();
20
+ }
21
+ render() {
22
+ if (!this.breadcrumbs || this.breadcrumbs.length === 0) return n;
23
+ let e = this.breadcrumbs[this.breadcrumbs.length - 2];
24
+ return t`
25
+ <nav class="pkt-breadcrumbs" aria-label="brødsmulemeny">
26
+ <ol class="pkt-breadcrumbs__list pkt-breadcrumbs--desktop">
27
+ ${this.breadcrumbs.map((e, n) => n === this.breadcrumbs.length - 1 ? t`
28
+ <li class="pkt-breadcrumbs__item">
29
+ <span class="pkt-breadcrumbs__label" aria-current="true">
30
+ <span class="pkt-breadcrumbs__text">${e.text}</span>
31
+ </span>
32
+ </li>
33
+ ` : t`
34
+ <li class="pkt-breadcrumbs__item">
35
+ <a
36
+ class="pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link"
37
+ href=${e.href}
38
+ @click=${(t) => this.handleLinkClick(t, e, n)}
39
+ >
40
+ <pkt-icon
41
+ class="pkt-icon pkt-breadcrumbs__icon pkt-link__icon"
42
+ name="chevron-thin-right"
43
+ aria-hidden="true"
44
+ ></pkt-icon>
45
+ <span class="pkt-breadcrumbs__text">${e.text}</span>
46
+ </a>
47
+ </li>
48
+ `)}
49
+ </ol>
50
+
51
+ ${e ? t`
52
+ <a
53
+ class="pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile"
54
+ href=${e.href}
55
+ @click=${(t) => this.handleLinkClick(t, e, this.breadcrumbs.length - 2)}
56
+ >
57
+ <pkt-icon
58
+ class="pkt-back-link__icon pkt-icon pkt-link__icon"
59
+ name="chevron-thin-left"
60
+ aria-hidden="true"
61
+ ></pkt-icon>
62
+ <span class="pkt-breadcrumbs__text">${e.text}</span>
63
+ </a>
64
+ ` : n}
65
+ </nav>
66
+ `;
67
+ }
68
+ };
69
+ r([i({ type: Array })], o.prototype, "breadcrumbs", void 0);
70
+ try {
71
+ e("pkt-breadcrumbs")(o);
72
+ } catch {
73
+ console.warn("Forsøker å definere <pkt-breadcrumbs>, men den er allerede definert");
74
+ }
75
+ //#endregion
76
+ export { o as t };