@oslokommune/punkt-elements 16.7.1 → 16.7.3

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 (193) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/accordionitem-_9AiCIvd.cjs +34 -0
  3. package/dist/{accordionitem-ZlaXvjt5.js → accordionitem-dCfSrxh5.js} +57 -55
  4. package/dist/alert-BtOk8yRH.cjs +33 -0
  5. package/dist/{alert-BuAXrnKl.js → alert-DlY2_grU.js} +48 -46
  6. package/dist/backlink-Ce5Vldop.js +49 -0
  7. package/dist/backlink-y3dwjKPC.cjs +13 -0
  8. package/dist/button-B_TXwNzt.cjs +27 -0
  9. package/dist/{button-DEyvt1LI.js → button-BiY-wlKF.js} +79 -77
  10. package/dist/calendar-B2pji2zn.cjs +90 -0
  11. package/dist/{calendar-S63oreVW.js → calendar-DhjQDC4C.js} +689 -687
  12. package/dist/card-BwMNB5Bb.cjs +87 -0
  13. package/dist/{card-DDiLfuO4.js → card-CGlmcMSR.js} +99 -97
  14. package/dist/checkbox-BsJZYA26.js +147 -0
  15. package/dist/checkbox-CTY8f_qn.cjs +31 -0
  16. package/dist/{combobox-BmxSecfE.js → combobox-DSB5WOxg.js} +223 -226
  17. package/dist/{combobox-Hb2V-fPX.cjs → combobox-DbICIgKG.cjs} +4 -4
  18. package/dist/consent-DkOQpbsg.cjs +11 -0
  19. package/dist/{consent-iXyx5v6J.js → consent-SNWV_mMU.js} +48 -46
  20. package/dist/datepicker-BEWl9iz3.cjs +273 -0
  21. package/dist/{datepicker-CZl7b8Na.js → datepicker-euHyzXnb.js} +341 -329
  22. package/dist/{heading-CKt7cVn7.js → heading-D2tVS6lS.js} +30 -28
  23. package/dist/heading-DrzbgDb6.cjs +1 -0
  24. package/dist/helptext-BKtU4mas.js +82 -0
  25. package/dist/helptext-DcRC7wW2.cjs +24 -0
  26. package/dist/icon-CxQcIa5F.js +105 -0
  27. package/dist/icon-q81vqPK_.cjs +9 -0
  28. package/dist/input-wrapper-Bs4CRNst.js +181 -0
  29. package/dist/input-wrapper-Bv9aqqVq.cjs +54 -0
  30. package/dist/link-C0rl-86s.cjs +7 -0
  31. package/dist/link-Cdqgl60z.js +55 -0
  32. package/dist/linkcard-Dimu7Rlx.cjs +13 -0
  33. package/dist/linkcard-Lbq_UhjZ.js +56 -0
  34. package/dist/{listbox-BQKDZvZn.js → listbox-Bia4_tvN.js} +131 -129
  35. package/dist/listbox-La2GZQei.cjs +106 -0
  36. package/dist/loader-D1ugDXGV.cjs +16 -0
  37. package/dist/{loader-Ci3CHU8k.js → loader-DyN6RGC5.js} +51 -49
  38. package/dist/messagebox-BGMVm2t9.js +71 -0
  39. package/dist/messagebox-M0yIgCz9.cjs +13 -0
  40. package/dist/modal-CMO1RtIi.cjs +36 -0
  41. package/dist/{modal-DzGe1g8Z.js → modal-DjPQDE-Z.js} +53 -51
  42. package/dist/pkt-accordion.cjs +1 -1
  43. package/dist/pkt-accordion.js +2 -2
  44. package/dist/pkt-alert.cjs +1 -1
  45. package/dist/pkt-alert.js +3 -4
  46. package/dist/pkt-backlink.cjs +1 -1
  47. package/dist/pkt-backlink.js +2 -3
  48. package/dist/pkt-breadcrumbs.cjs +11 -11
  49. package/dist/pkt-breadcrumbs.js +30 -28
  50. package/dist/pkt-button.cjs +1 -1
  51. package/dist/pkt-button.js +3 -4
  52. package/dist/pkt-calendar.cjs +1 -1
  53. package/dist/pkt-calendar.js +2 -3
  54. package/dist/pkt-card.cjs +1 -1
  55. package/dist/pkt-card.js +2 -3
  56. package/dist/pkt-checkbox.cjs +1 -1
  57. package/dist/pkt-checkbox.js +3 -4
  58. package/dist/pkt-combobox.cjs +1 -1
  59. package/dist/pkt-combobox.js +3 -4
  60. package/dist/pkt-consent.cjs +1 -1
  61. package/dist/pkt-consent.js +2 -3
  62. package/dist/pkt-datepicker.cjs +1 -1
  63. package/dist/pkt-datepicker.js +7 -8
  64. package/dist/pkt-header.cjs +35 -35
  65. package/dist/pkt-header.js +224 -218
  66. package/dist/pkt-heading.cjs +1 -1
  67. package/dist/pkt-heading.js +3 -4
  68. package/dist/pkt-helptext.cjs +1 -1
  69. package/dist/pkt-helptext.js +3 -4
  70. package/dist/pkt-icon.cjs +1 -1
  71. package/dist/pkt-icon.js +3 -4
  72. package/dist/pkt-index.cjs +1 -1
  73. package/dist/pkt-index.js +26 -26
  74. package/dist/pkt-input-wrapper.cjs +1 -1
  75. package/dist/pkt-input-wrapper.js +2 -3
  76. package/dist/pkt-link.cjs +1 -1
  77. package/dist/pkt-link.js +2 -3
  78. package/dist/pkt-linkcard.cjs +1 -1
  79. package/dist/pkt-linkcard.js +3 -4
  80. package/dist/pkt-listbox.cjs +1 -1
  81. package/dist/pkt-listbox.js +3 -4
  82. package/dist/pkt-loader.cjs +1 -1
  83. package/dist/pkt-loader.js +3 -4
  84. package/dist/pkt-messagebox.cjs +1 -1
  85. package/dist/pkt-messagebox.js +3 -4
  86. package/dist/pkt-modal.cjs +1 -1
  87. package/dist/pkt-modal.js +3 -4
  88. package/dist/pkt-progressbar.cjs +1 -1
  89. package/dist/pkt-progressbar.js +2 -3
  90. package/dist/pkt-radiobutton.cjs +1 -1
  91. package/dist/pkt-radiobutton.js +3 -4
  92. package/dist/pkt-select.cjs +1 -1
  93. package/dist/pkt-select.js +3 -4
  94. package/dist/pkt-tabs.cjs +1 -1
  95. package/dist/pkt-tabs.js +2 -2
  96. package/dist/pkt-tag.cjs +1 -1
  97. package/dist/pkt-tag.js +3 -4
  98. package/dist/pkt-textarea.cjs +1 -1
  99. package/dist/pkt-textarea.js +3 -4
  100. package/dist/pkt-textinput.cjs +1 -1
  101. package/dist/pkt-textinput.js +3 -4
  102. package/dist/pkt-timepicker.cjs +16 -16
  103. package/dist/pkt-timepicker.js +91 -89
  104. package/dist/progressbar-BqlMzkM_.cjs +21 -0
  105. package/dist/{progressbar-By7e0lEI.js → progressbar-sbHDFC12.js} +88 -88
  106. package/dist/radiobutton-5ZqVVtTT.cjs +31 -0
  107. package/dist/{radiobutton-6frNG9J_.js → radiobutton-D8Ai8ETa.js} +44 -42
  108. package/dist/select-De-n8on9.js +230 -0
  109. package/dist/select-dTWibR6_.cjs +49 -0
  110. package/dist/tabitem-B9-jeV97.js +334 -0
  111. package/dist/tabitem-BnhzqfW3.cjs +65 -0
  112. package/dist/tag-CbwO8yvD.cjs +27 -0
  113. package/dist/{tag-BuCpqaks.js → tag-D4FI5t3y.js} +42 -40
  114. package/dist/textarea-BmLaKzsc.cjs +50 -0
  115. package/dist/{textarea-Bzuymclz.js → textarea-CMiSJaYL.js} +62 -60
  116. package/dist/textinput-em9y4yrL.cjs +70 -0
  117. package/dist/{textinput-9lHjs4ce.js → textinput-r8udK0IX.js} +57 -55
  118. package/package.json +2 -2
  119. package/src/components/accordion/accordion.ts +6 -1
  120. package/src/components/accordion/accordionitem.ts +6 -1
  121. package/src/components/alert/alert.ts +6 -1
  122. package/src/components/backlink/backlink.ts +6 -1
  123. package/src/components/breadcrumbs/breadcrumbs.ts +6 -1
  124. package/src/components/button/button.ts +6 -1
  125. package/src/components/calendar/calendar.ts +6 -1
  126. package/src/components/card/card.ts +6 -1
  127. package/src/components/checkbox/checkbox.ts +6 -1
  128. package/src/components/combobox/combobox.ts +6 -1
  129. package/src/components/consent/consent.ts +6 -1
  130. package/src/components/datepicker/date-tags.ts +6 -1
  131. package/src/components/datepicker/datepicker-multiple.ts +6 -1
  132. package/src/components/datepicker/datepicker-popup.ts +6 -1
  133. package/src/components/datepicker/datepicker-range.ts +6 -1
  134. package/src/components/datepicker/datepicker-single.ts +6 -1
  135. package/src/components/datepicker/datepicker.ts +6 -1
  136. package/src/components/header/header-service.ts +6 -1
  137. package/src/components/header/header-user-menu.ts +6 -1
  138. package/src/components/header/header.ts +6 -1
  139. package/src/components/heading/heading.ts +6 -1
  140. package/src/components/helptext/helptext.ts +6 -1
  141. package/src/components/icon/icon.ts +6 -1
  142. package/src/components/input-wrapper/input-wrapper.ts +6 -1
  143. package/src/components/link/link.ts +6 -1
  144. package/src/components/linkcard/linkcard.ts +6 -1
  145. package/src/components/listbox/listbox.ts +6 -1
  146. package/src/components/loader/loader.ts +6 -1
  147. package/src/components/messagebox/messagebox.ts +6 -1
  148. package/src/components/modal/modal.ts +6 -1
  149. package/src/components/progressbar/progressbar.ts +6 -1
  150. package/src/components/radiobutton/radiobutton.ts +6 -1
  151. package/src/components/select/select.ts +6 -1
  152. package/src/components/tabs/tabitem.ts +6 -1
  153. package/src/components/tabs/tabs.ts +6 -1
  154. package/src/components/tag/tag.ts +6 -1
  155. package/src/components/textarea/textarea.ts +6 -1
  156. package/src/components/textinput/textinput.ts +6 -1
  157. package/src/components/timepicker/timepicker.ts +6 -1
  158. package/dist/accordionitem-D1Agl1bB.cjs +0 -34
  159. package/dist/alert-DFkFNTxh.cjs +0 -33
  160. package/dist/backlink-EiAXUUZP.cjs +0 -13
  161. package/dist/backlink-V4DAt17e.js +0 -47
  162. package/dist/button-DYv5Dg4M.cjs +0 -27
  163. package/dist/calendar-HIE9nxcc.cjs +0 -90
  164. package/dist/card-CyeH6l1c.cjs +0 -87
  165. package/dist/checkbox-BLlwTABj.cjs +0 -31
  166. package/dist/checkbox-ejBUa5qQ.js +0 -145
  167. package/dist/consent-ruWAEVXW.cjs +0 -11
  168. package/dist/datepicker-D2H7U6MS.cjs +0 -273
  169. package/dist/heading-Cvz8m1xL.cjs +0 -1
  170. package/dist/helptext-5Mzp65-F.cjs +0 -24
  171. package/dist/helptext-jIoWRcCF.js +0 -80
  172. package/dist/icon-BlKA8YuW.js +0 -103
  173. package/dist/icon-Bqj9oBbl.cjs +0 -9
  174. package/dist/input-wrapper-B0MkQ0IZ.cjs +0 -54
  175. package/dist/input-wrapper-B2JpK016.js +0 -179
  176. package/dist/link-R_lNhViF.cjs +0 -7
  177. package/dist/link-Z_GizclR.js +0 -53
  178. package/dist/linkcard-BlQvdB1a.js +0 -54
  179. package/dist/linkcard-C7HbSLlX.cjs +0 -13
  180. package/dist/listbox-CGgV9MAe.cjs +0 -106
  181. package/dist/loader-e2gs_1xz.cjs +0 -16
  182. package/dist/messagebox-Bf-XMlvW.js +0 -69
  183. package/dist/messagebox-D67w71VX.cjs +0 -13
  184. package/dist/modal-CyvEkbfQ.cjs +0 -36
  185. package/dist/progressbar-DsJ2B9Vm.cjs +0 -21
  186. package/dist/radiobutton-Bv-BZ1Hw.cjs +0 -31
  187. package/dist/select-CXZt1nHS.js +0 -228
  188. package/dist/select-WFhS4Vfp.cjs +0 -49
  189. package/dist/tabitem-CB8wkKmv.js +0 -332
  190. package/dist/tabitem-DZpspU4Q.cjs +0 -65
  191. package/dist/tag-X6xdjR0N.cjs +0 -27
  192. package/dist/textarea-DoeHJ7HR.cjs +0 -50
  193. package/dist/textinput-BNsLd26i.cjs +0 -70
package/CHANGELOG.md CHANGED
@@ -5,6 +5,23 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [16.7.3](https://github.com/oslokommune/punkt/compare/16.7.2...16.7.3) (2026-04-14)
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
+
8
25
  ## [16.7.1](https://github.com/oslokommune/punkt/compare/16.7.0...16.7.1) (2026-04-13)
9
26
 
10
27
  ### ⚠ BREAKING CHANGES
@@ -0,0 +1,34 @@
1
+ "use strict";const i=require("./element-gR_VtSiD.cjs"),u=require("./class-map-CsENJXf1.cjs"),m=require("./element-with-slot-ZX-up7jO.cjs"),h=require("./ref-CL-Xk9Xm.cjs"),f=require("./if-defined-BOW3ODSj.cjs");var k=Object.defineProperty,p=(n,t,r,l)=>{for(var e=void 0,s=n.length-1,d;s>=0;s--)(d=n[s])&&(e=d(t,r,e)||e);return e&&k(t,r,e),e};class a extends i.i{constructor(){super(...arguments),this.ariaLabelledBy="",this.compact=!1,this.skin="borderless",this.name=""}updated(t){t.has("skin")&&this.requestUpdate(),t.has("name")&&this.updateAccordionItemNames()}updateAccordionItemNames(){var t;if(this.name){const r=(t=this.renderRoot)==null?void 0:t.querySelector("slot");r&&r.assignedElements().forEach(e=>{e.tagName.toLowerCase()==="pkt-accordion-item"&&(e.hasAttribute("name")||e.setAttribute("name",this.name))})}}firstUpdated(){var r;const t=(r=this.renderRoot)==null?void 0:r.querySelector("slot");t&&t.addEventListener("slotchange",()=>{this.updateAccordionItemNames()})}render(){const t={"pkt-accordion":!0,"pkt-accordion--compact":this.compact,[`pkt-accordion--${this.skin}`]:this.skin};return i.b`
2
+ <div
3
+ part="container"
4
+ class=${u.e(t)}
5
+ data-testid="pkt-accordion"
6
+ aria-labelledby=${this.ariaLabelledBy}
7
+ >
8
+ <slot></slot>
9
+ </div>
10
+ `}}p([i.n({type:String,reflect:!0,attribute:"aria-labelledby"})],a.prototype,"ariaLabelledBy");p([i.n({type:Boolean,reflect:!0,attribute:"compact"})],a.prototype,"compact");p([i.n({type:String,reflect:!0,attribute:"skin"})],a.prototype,"skin");p([i.n({type:String,reflect:!0,attribute:"name"})],a.prototype,"name");try{i.t("pkt-accordion")(a)}catch{console.warn("Forsøker å definere <pkt-accordion>, men den er allerede definert")}var y=Object.defineProperty,c=(n,t,r,l)=>{for(var e=void 0,s=n.length-1,d;s>=0;s--)(d=n[s])&&(e=d(t,r,e)||e);return e&&y(t,r,e),e};class o extends m.PktElementWithSlot{constructor(){super(),this.defaultOpen=!1,this.title="",this.skin=void 0,this.compact=!1,this.isOpen=!1,this.name=void 0,this.accordionItemRef=h.e()}firstUpdated(t){this.defaultOpen&&(this.isOpen=!0)}render(){const t={"pkt-accordion-item":!0,"pkt-accordion-item--compact":this.compact,[`pkt-accordion-item--${this.skin}`]:!!this.skin};return i.b`
11
+ <details
12
+ class=${u.e(t)}
13
+ id=${this.id}
14
+ ?open=${this.isOpen}
15
+ ${h.n(this.accordionItemRef)}
16
+ name=${f.o(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">${m.slotContent(this)}</div>
32
+ </div>
33
+ </details>
34
+ `}}c([i.n({type:Boolean})],o.prototype,"defaultOpen");c([i.n({type:String})],o.prototype,"title");c([i.n({type:String,reflect:!0})],o.prototype,"skin");c([i.n({type:Boolean,reflect:!0})],o.prototype,"compact");c([i.n({type:Boolean,reflect:!0})],o.prototype,"isOpen");c([i.n({type:String,reflect:!0})],o.prototype,"name");try{i.t("pkt-accordion-item")(o)}catch{console.warn("Forsøker å definere <pkt-accordion-item>, men den er allerede definert")}exports.PktAccordion=a;exports.PktAccordionItem=o;
@@ -1,14 +1,14 @@
1
- import { i as u, b as m, n as r, t as h } from "./element-CPpT3rFQ.js";
1
+ import { t as m, i as u, b as h, n as r } from "./element-CPpT3rFQ.js";
2
2
  import { e as f } from "./class-map-CEnykyO_.js";
3
- import { P as y, s as _ } from "./element-with-slot-Dqk6-TRR.js";
4
- import { e as k, n as v } from "./ref-Bg_Swj5w.js";
3
+ import { P as k, s as y } from "./element-with-slot-Dqk6-TRR.js";
4
+ import { e as v, n as _ } from "./ref-Bg_Swj5w.js";
5
5
  import { o as $ } from "./if-defined-B0krMLad.js";
6
- var b = Object.defineProperty, O = Object.getOwnPropertyDescriptor, l = (t, e, a, o) => {
7
- for (var i = o > 1 ? void 0 : o ? O(e, a) : e, n = t.length - 1, c; n >= 0; n--)
8
- (c = t[n]) && (i = (o ? c(e, a, i) : c(i)) || i);
9
- return o && i && b(e, a, i), i;
6
+ var b = Object.defineProperty, p = (o, t, i, l) => {
7
+ for (var e = void 0, s = o.length - 1, c; s >= 0; s--)
8
+ (c = o[s]) && (e = c(t, i, e) || e);
9
+ return e && b(t, i, e), e;
10
10
  };
11
- let p = class extends u {
11
+ class d extends u {
12
12
  constructor() {
13
13
  super(...arguments), this.ariaLabelledBy = "", this.compact = !1, this.skin = "borderless", this.name = "";
14
14
  }
@@ -18,15 +18,15 @@ let p = class extends u {
18
18
  updateAccordionItemNames() {
19
19
  var t;
20
20
  if (this.name) {
21
- const e = (t = this.renderRoot) == null ? void 0 : t.querySelector("slot");
22
- e && e.assignedElements().forEach((o) => {
23
- o.tagName.toLowerCase() === "pkt-accordion-item" && (o.hasAttribute("name") || o.setAttribute("name", this.name));
21
+ const i = (t = this.renderRoot) == null ? void 0 : t.querySelector("slot");
22
+ i && i.assignedElements().forEach((e) => {
23
+ e.tagName.toLowerCase() === "pkt-accordion-item" && (e.hasAttribute("name") || e.setAttribute("name", this.name));
24
24
  });
25
25
  }
26
26
  }
27
27
  firstUpdated() {
28
- var e;
29
- const t = (e = this.renderRoot) == null ? void 0 : e.querySelector("slot");
28
+ var i;
29
+ const t = (i = this.renderRoot) == null ? void 0 : i.querySelector("slot");
30
30
  t && t.addEventListener("slotchange", () => {
31
31
  this.updateAccordionItemNames();
32
32
  });
@@ -37,7 +37,7 @@ let p = class extends u {
37
37
  "pkt-accordion--compact": this.compact,
38
38
  [`pkt-accordion--${this.skin}`]: this.skin
39
39
  };
40
- return m`
40
+ return h`
41
41
  <div
42
42
  part="container"
43
43
  class=${f(t)}
@@ -48,31 +48,32 @@ let p = class extends u {
48
48
  </div>
49
49
  `;
50
50
  }
51
- };
52
- l([
51
+ }
52
+ p([
53
53
  r({ type: String, reflect: !0, attribute: "aria-labelledby" })
54
- ], p.prototype, "ariaLabelledBy", 2);
55
- l([
54
+ ], d.prototype, "ariaLabelledBy");
55
+ p([
56
56
  r({ type: Boolean, reflect: !0, attribute: "compact" })
57
- ], p.prototype, "compact", 2);
58
- l([
57
+ ], d.prototype, "compact");
58
+ p([
59
59
  r({ type: String, reflect: !0, attribute: "skin" })
60
- ], p.prototype, "skin", 2);
61
- l([
60
+ ], d.prototype, "skin");
61
+ p([
62
62
  r({ type: String, reflect: !0, attribute: "name" })
63
- ], p.prototype, "name", 2);
64
- p = l([
65
- h("pkt-accordion")
66
- ], p);
67
- const C = p;
68
- var P = Object.defineProperty, g = Object.getOwnPropertyDescriptor, d = (t, e, a, o) => {
69
- for (var i = o > 1 ? void 0 : o ? g(e, a) : e, n = t.length - 1, c; n >= 0; n--)
70
- (c = t[n]) && (i = (o ? c(e, a, i) : c(i)) || i);
71
- return o && i && P(e, a, i), i;
63
+ ], d.prototype, "name");
64
+ try {
65
+ m("pkt-accordion")(d);
66
+ } catch {
67
+ console.warn("Forsøker å definere <pkt-accordion>, men den er allerede definert");
68
+ }
69
+ var g = Object.defineProperty, n = (o, t, i, l) => {
70
+ for (var e = void 0, s = o.length - 1, c; s >= 0; s--)
71
+ (c = o[s]) && (e = c(t, i, e) || e);
72
+ return e && g(t, i, e), e;
72
73
  };
73
- let s = class extends y {
74
+ class a extends k {
74
75
  constructor() {
75
- super(), this.defaultOpen = !1, this.title = "", this.skin = void 0, this.compact = !1, this.isOpen = !1, this.name = void 0, this.accordionItemRef = k();
76
+ super(), this.defaultOpen = !1, this.title = "", this.skin = void 0, this.compact = !1, this.isOpen = !1, this.name = void 0, this.accordionItemRef = v();
76
77
  }
77
78
  firstUpdated(t) {
78
79
  this.defaultOpen && (this.isOpen = !0);
@@ -83,12 +84,12 @@ let s = class extends y {
83
84
  "pkt-accordion-item--compact": this.compact,
84
85
  [`pkt-accordion-item--${this.skin}`]: !!this.skin
85
86
  };
86
- return m`
87
+ return h`
87
88
  <details
88
89
  class=${f(t)}
89
90
  id=${this.id}
90
91
  ?open=${this.isOpen}
91
- ${v(this.accordionItemRef)}
92
+ ${_(this.accordionItemRef)}
92
93
  name=${$(this.name)}
93
94
  >
94
95
  <summary class="pkt-accordion-item__title" id=${`pkt-accordion-item-summary-${this.id}`}>
@@ -104,35 +105,36 @@ let s = class extends y {
104
105
  id="pkt-accordion-item__content-${this.id}"
105
106
  role="region"
106
107
  >
107
- <div class="pkt-accordion-item__content-inner">${_(this)}</div>
108
+ <div class="pkt-accordion-item__content-inner">${y(this)}</div>
108
109
  </div>
109
110
  </details>
110
111
  `;
111
112
  }
112
- };
113
- d([
113
+ }
114
+ n([
114
115
  r({ type: Boolean })
115
- ], s.prototype, "defaultOpen", 2);
116
- d([
116
+ ], a.prototype, "defaultOpen");
117
+ n([
117
118
  r({ type: String })
118
- ], s.prototype, "title", 2);
119
- d([
119
+ ], a.prototype, "title");
120
+ n([
120
121
  r({ type: String, reflect: !0 })
121
- ], s.prototype, "skin", 2);
122
- d([
122
+ ], a.prototype, "skin");
123
+ n([
123
124
  r({ type: Boolean, reflect: !0 })
124
- ], s.prototype, "compact", 2);
125
- d([
125
+ ], a.prototype, "compact");
126
+ n([
126
127
  r({ type: Boolean, reflect: !0 })
127
- ], s.prototype, "isOpen", 2);
128
- d([
128
+ ], a.prototype, "isOpen");
129
+ n([
129
130
  r({ type: String, reflect: !0 })
130
- ], s.prototype, "name", 2);
131
- s = d([
132
- h("pkt-accordion-item")
133
- ], s);
134
- const E = s;
131
+ ], a.prototype, "name");
132
+ try {
133
+ m("pkt-accordion-item")(a);
134
+ } catch {
135
+ console.warn("Forsøker å definere <pkt-accordion-item>, men den er allerede definert");
136
+ }
135
137
  export {
136
- C as P,
137
- E as a
138
+ d as P,
139
+ a
138
140
  };
@@ -0,0 +1,33 @@
1
+ "use strict";const d=require("./class-map-CsENJXf1.cjs"),t=require("./element-gR_VtSiD.cjs"),h=require("./state-Dg-53wQ8.cjs"),u=require("./element-with-slot-ZX-up7jO.cjs"),k=require("./classutils-BwNK82ZQ.cjs");require("./icon-q81vqPK_.cjs");require("./button-B_TXwNzt.cjs");const v={skin:{default:"info"},ariaLive:{default:"polite"},compact:{default:!1},closeAlert:{default:!1}},o={props:v};var f=Object.defineProperty,s=(l,e,r,n)=>{for(var a=void 0,p=l.length-1,c;p>=0;p--)(c=l[p])&&(a=c(e,r,a)||a);return a&&f(e,r,a),a};class i extends u.PktElementWithSlot{constructor(){super(),this.compact=o.props.compact.default,this.title="",this.skin=o.props.skin.default,this.ariaLive=o.props.ariaLive.default,this["aria-live"]=null,this.closeAlert=o.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["aria-live"]=this.getAttribute("aria-live")||this.ariaLive}attributeChangedCallback(e,r,n){e==="ariaLive"&&(this["aria-live"]=n),super.attributeChangedCallback(e,r,n)}updated(e){super.updated(e),e.has("ariaLive")&&(this["aria-live"]=this.ariaLive),e.has("_isClosed")&&k.updateClassAttribute(this,"pkt-hide",this._isClosed)}render(){const e={"pkt-alert":!0,"pkt-alert--compact":this.compact,[`pkt-alert--${this.skin}`]:this.skin,"pkt-hide":this._isClosed},r={"pkt-alert__grid":!0,"pkt-alert__noTitle":!this.title,"pkt-alert__noDate":!this.date};return t.b`
2
+ <div class=${d.e(e)} aria-live=${this["aria-live"]}>
3
+ <div class=${d.e(r)}>
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?t.b`
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
+ `:t.A}
26
+ ${this.title?t.b`<div class="pkt-alert__title">${this.title}</div>`:t.A}
27
+
28
+ <div class="pkt-alert__text">${u.slotContent(this)}</div>
29
+
30
+ ${this.date?t.b`<div class="pkt-alert__date">Sist oppdatert: ${this.date}</div>`:t.A}
31
+ </div>
32
+ </div>
33
+ `}}s([t.n({type:Boolean,reflect:!1})],i.prototype,"compact");s([t.n({type:String,reflect:!0})],i.prototype,"title");s([t.n({type:String,reflect:!0})],i.prototype,"skin");s([t.n({type:String})],i.prototype,"ariaLive");s([t.n({type:String,reflect:!0})],i.prototype,"aria-live");s([t.n({type:Boolean,reflect:!0})],i.prototype,"closeAlert");s([t.n({type:String,reflect:!0})],i.prototype,"date");s([t.n({type:String,reflect:!0})],i.prototype,"role");s([h.r()],i.prototype,"_isClosed");try{t.t("pkt-alert")(i)}catch{console.warn("Forsøker å definere <pkt-alert>, men den er allerede definert")}exports.PktAlert=i;
@@ -1,21 +1,21 @@
1
- import { e as h } from "./class-map-CEnykyO_.js";
2
- import { A as u, b as p, n as a, t as v } from "./element-CPpT3rFQ.js";
3
- import { r as f } from "./state-C_1EOo3D.js";
4
- import { P as k, s as m } from "./element-with-slot-Dqk6-TRR.js";
1
+ import { e as u } from "./class-map-CEnykyO_.js";
2
+ import { t as f, A as d, b as o, n as s } from "./element-CPpT3rFQ.js";
3
+ import { r as k } from "./state-C_1EOo3D.js";
4
+ import { P as v, s as m } from "./element-with-slot-Dqk6-TRR.js";
5
5
  import { u as _ } from "./classutils-RQs1k6D9.js";
6
- import "./icon-BlKA8YuW.js";
7
- import "./button-DEyvt1LI.js";
8
- const b = { skin: { default: "info" }, ariaLive: { default: "polite" }, compact: { default: !1 }, closeAlert: { default: !1 } }, c = {
9
- props: b
6
+ import "./icon-CxQcIa5F.js";
7
+ import "./button-BiY-wlKF.js";
8
+ const y = { skin: { default: "info" }, ariaLive: { default: "polite" }, compact: { default: !1 }, closeAlert: { default: !1 } }, p = {
9
+ props: y
10
10
  };
11
- var y = Object.defineProperty, C = Object.getOwnPropertyDescriptor, i = (t, s, l, o) => {
12
- for (var r = o > 1 ? void 0 : o ? C(s, l) : s, n = t.length - 1, d; n >= 0; n--)
13
- (d = t[n]) && (r = (o ? d(s, l, r) : d(r)) || r);
14
- return o && r && y(s, l, r), r;
11
+ var b = Object.defineProperty, i = (l, t, a, n) => {
12
+ for (var r = void 0, c = l.length - 1, h; c >= 0; c--)
13
+ (h = l[c]) && (r = h(t, a, r) || r);
14
+ return r && b(t, a, r), r;
15
15
  };
16
- let e = class extends k {
16
+ class e extends v {
17
17
  constructor() {
18
- super(), this.compact = c.props.compact.default, this.title = "", this.skin = c.props.skin.default, this.ariaLive = c.props.ariaLive.default, this["aria-live"] = null, this.closeAlert = c.props.closeAlert.default, this.date = null, this.role = "status", this._isClosed = !1, this.close = (t) => {
18
+ super(), this.compact = p.props.compact.default, this.title = "", this.skin = p.props.skin.default, this.ariaLive = p.props.ariaLive.default, this["aria-live"] = null, this.closeAlert = p.props.closeAlert.default, this.date = null, this.role = "status", this._isClosed = !1, this.close = (t) => {
19
19
  this._isClosed = !0, this.dispatchEvent(
20
20
  new CustomEvent("close", { detail: { origin: t }, bubbles: !0, composed: !0 })
21
21
  ), this.dispatchEvent(
@@ -27,8 +27,8 @@ let e = class extends k {
27
27
  connectedCallback() {
28
28
  super.connectedCallback(), this["aria-live"] = this.getAttribute("aria-live") || this.ariaLive;
29
29
  }
30
- attributeChangedCallback(t, s, l) {
31
- t === "ariaLive" && (this["aria-live"] = l), super.attributeChangedCallback(t, s, l);
30
+ attributeChangedCallback(t, a, n) {
31
+ t === "ariaLive" && (this["aria-live"] = n), super.attributeChangedCallback(t, a, n);
32
32
  }
33
33
  updated(t) {
34
34
  super.updated(t), t.has("ariaLive") && (this["aria-live"] = this.ariaLive), t.has("_isClosed") && _(this, "pkt-hide", this._isClosed);
@@ -40,21 +40,21 @@ let e = class extends k {
40
40
  "pkt-alert--compact": this.compact,
41
41
  [`pkt-alert--${this.skin}`]: this.skin,
42
42
  "pkt-hide": this._isClosed
43
- }, s = {
43
+ }, a = {
44
44
  "pkt-alert__grid": !0,
45
45
  "pkt-alert__noTitle": !this.title,
46
46
  "pkt-alert__noDate": !this.date
47
47
  };
48
- return p`
49
- <div class=${h(t)} aria-live=${this["aria-live"]}>
50
- <div class=${h(s)}>
48
+ return o`
49
+ <div class=${u(t)} aria-live=${this["aria-live"]}>
50
+ <div class=${u(a)}>
51
51
  <pkt-icon
52
52
  class="pkt-alert__icon"
53
53
  aria-hidden="true"
54
54
  name=${this.skin === "info" ? "alert-information" : `alert-${this.skin}`}
55
55
  ></pkt-icon>
56
56
 
57
- ${this.closeAlert ? p`
57
+ ${this.closeAlert ? o`
58
58
  <div class="pkt-alert__close">
59
59
  <pkt-button
60
60
  tabindex="0"
@@ -69,47 +69,49 @@ let e = class extends k {
69
69
  <span class="sr-only">Lukk</span>
70
70
  </pkt-button>
71
71
  </div>
72
- ` : u}
73
- ${this.title ? p`<div class="pkt-alert__title">${this.title}</div>` : u}
72
+ ` : d}
73
+ ${this.title ? o`<div class="pkt-alert__title">${this.title}</div>` : d}
74
74
 
75
75
  <div class="pkt-alert__text">${m(this)}</div>
76
76
 
77
- ${this.date ? p`<div class="pkt-alert__date">Sist oppdatert: ${this.date}</div>` : u}
77
+ ${this.date ? o`<div class="pkt-alert__date">Sist oppdatert: ${this.date}</div>` : d}
78
78
  </div>
79
79
  </div>
80
80
  `;
81
81
  }
82
- };
82
+ }
83
83
  i([
84
- a({ type: Boolean, reflect: !1 })
85
- ], e.prototype, "compact", 2);
84
+ s({ type: Boolean, reflect: !1 })
85
+ ], e.prototype, "compact");
86
86
  i([
87
- a({ type: String, reflect: !0 })
88
- ], e.prototype, "title", 2);
87
+ s({ type: String, reflect: !0 })
88
+ ], e.prototype, "title");
89
89
  i([
90
- a({ type: String, reflect: !0 })
91
- ], e.prototype, "skin", 2);
90
+ s({ type: String, reflect: !0 })
91
+ ], e.prototype, "skin");
92
92
  i([
93
- a({ type: String })
94
- ], e.prototype, "ariaLive", 2);
93
+ s({ type: String })
94
+ ], e.prototype, "ariaLive");
95
95
  i([
96
- a({ type: String, reflect: !0 })
97
- ], e.prototype, "aria-live", 2);
96
+ s({ type: String, reflect: !0 })
97
+ ], e.prototype, "aria-live");
98
98
  i([
99
- a({ type: Boolean, reflect: !0 })
100
- ], e.prototype, "closeAlert", 2);
99
+ s({ type: Boolean, reflect: !0 })
100
+ ], e.prototype, "closeAlert");
101
101
  i([
102
- a({ type: String, reflect: !0 })
103
- ], e.prototype, "date", 2);
102
+ s({ type: String, reflect: !0 })
103
+ ], e.prototype, "date");
104
104
  i([
105
- a({ type: String, reflect: !0 })
106
- ], e.prototype, "role", 2);
105
+ s({ type: String, reflect: !0 })
106
+ ], e.prototype, "role");
107
107
  i([
108
- f()
109
- ], e.prototype, "_isClosed", 2);
110
- e = i([
111
- v("pkt-alert")
112
- ], e);
108
+ k()
109
+ ], e.prototype, "_isClosed");
110
+ try {
111
+ f("pkt-alert")(e);
112
+ } catch {
113
+ console.warn("Forsøker å definere <pkt-alert>, men den er allerede definert");
114
+ }
113
115
  export {
114
116
  e as P
115
117
  };
@@ -0,0 +1,49 @@
1
+ import { t as p, P as c, b as h, n as l } from "./element-CPpT3rFQ.js";
2
+ import { o as b } from "./if-defined-B0krMLad.js";
3
+ import "./icon-CxQcIa5F.js";
4
+ var f = Object.defineProperty, s = (r, t, i, k) => {
5
+ for (var e = void 0, n = r.length - 1, o; n >= 0; n--)
6
+ (o = r[n]) && (e = o(t, i, e) || e);
7
+ return e && f(t, i, e), e;
8
+ };
9
+ class a extends c {
10
+ constructor() {
11
+ super(...arguments), this.href = "", this.text = "Forsiden", this.ariaLabel = "";
12
+ }
13
+ // Lifecycle
14
+ attributeChangedCallback(t, i, k) {
15
+ t === "arialabel" && this.removeAttribute("arialabel"), t === "href" && this.removeAttribute("href"), t === "text" && this.removeAttribute("text"), super.attributeChangedCallback(t, i, k);
16
+ }
17
+ render() {
18
+ return h`<nav
19
+ class="pkt-back-link"
20
+ aria-label=${this.ariaLabel || "Gå tilbake til forrige side"}
21
+ >
22
+ <a href=${b(this.href || "/")} class="pkt-link pkt-link--icon-left"
23
+ ><pkt-icon
24
+ class="pkt-back-link__icon pkt-icon pkt-link__icon"
25
+ name="chevron-thin-left"
26
+ aria-hidden="true"
27
+ ></pkt-icon
28
+ ><span class="pkt-back-link__text">${this.text}</span></a
29
+ >
30
+ </nav>`;
31
+ }
32
+ }
33
+ s([
34
+ l({ type: String })
35
+ ], a.prototype, "href");
36
+ s([
37
+ l({ type: String })
38
+ ], a.prototype, "text");
39
+ s([
40
+ l({ type: String })
41
+ ], a.prototype, "ariaLabel");
42
+ try {
43
+ p("pkt-backlink")(a);
44
+ } catch {
45
+ console.warn("Forsøker å definere <pkt-backlink>, men den er allerede definert");
46
+ }
47
+ export {
48
+ a as P
49
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";const r=require("./element-gR_VtSiD.cjs"),o=require("./if-defined-BOW3ODSj.cjs");require("./icon-q81vqPK_.cjs");var p=Object.defineProperty,s=(a,e,n,k)=>{for(var t=void 0,l=a.length-1,c;l>=0;l--)(c=a[l])&&(t=c(e,n,t)||t);return t&&p(e,n,t),t};class i extends r.PktElement{constructor(){super(...arguments),this.href="",this.text="Forsiden",this.ariaLabel=""}attributeChangedCallback(e,n,k){e==="arialabel"&&this.removeAttribute("arialabel"),e==="href"&&this.removeAttribute("href"),e==="text"&&this.removeAttribute("text"),super.attributeChangedCallback(e,n,k)}render(){return r.b`<nav
2
+ class="pkt-back-link"
3
+ aria-label=${this.ariaLabel||"Gå tilbake til forrige side"}
4
+ >
5
+ <a href=${o.o(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>`}}s([r.n({type:String})],i.prototype,"href");s([r.n({type:String})],i.prototype,"text");s([r.n({type:String})],i.prototype,"ariaLabel");try{r.t("pkt-backlink")(i)}catch{console.warn("Forsøker å definere <pkt-backlink>, men den er allerede definert")}exports.PktBackLink=i;
@@ -0,0 +1,27 @@
1
+ "use strict";const h=require("./element-with-slot-ZX-up7jO.cjs"),t=require("./element-gR_VtSiD.cjs"),c=require("./class-map-CsENJXf1.cjs"),a=require("./if-defined-BOW3ODSj.cjs");require("./icon-q81vqPK_.cjs");var b=Object.defineProperty,n=(r,i,s,l)=>{for(var o=void 0,p=r.length-1,d;p>=0;p--)(d=r[p])&&(o=d(i,s,o)||o);return o&&b(i,s,o),o};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/latest/animations/";class e extends h.PktElementWithSlot{constructor(){super(...arguments),this.iconName="user",this.secondIconName="user",this.mode="light",this.size="medium",this.fullWidth=!1,this.fullWidthOnMobile=!1,this.skin="primary",this.variant="label-only",this.state="normal",this.type="button",this.form=void 0,this.isLoading=!1,this.disabled=!1,this.loadingAnimationPath=window.pktAnimationPath}connectedCallback(){super.connectedCallback(),this.addEventListener("click",i=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(i.preventDefault(),i.stopImmediatePropagation())},!0),this.addEventListener("keydown",i=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),i.stopImmediatePropagation())},!0)}attributeChangedCallback(i,s,l){super.attributeChangedCallback(i,s,l),i==="disabled"&&l==="false"&&(this.disabled=!1),(i==="isloading"||i==="isLoading")&&l==="false"&&(this.isLoading=!1)}firstUpdated(i){super.firstUpdated(i),this.disabled==="false"&&(this.disabled=!1),this.isLoading==="false"&&(this.isLoading=!1)}render(){const i=this.form??this.getAttribute("form")??void 0,s={"pkt-btn":!0,[`pkt-btn--${this.size}`]:!!this.size,[`pkt-btn--${this.skin}`]:!!this.skin,[`pkt-btn--${this.variant}`]:!!this.variant,[`pkt-btn--${this.color}`]:!!this.color,[`pkt-btn--${this.state}`]:!!this.state,"pkt-btn--full":!!this.fullWidth,"pkt-btn--full-small":!!this.fullWidthOnMobile,"pkt-btn--disabled":!!this.disabled,"pkt-btn--isLoading":!!this.isLoading};return t.b`
2
+ <button
3
+ class=${c.e(s)}
4
+ type=${this.type}
5
+ ?disabled=${!!this.disabled}
6
+ aria-busy=${a.o(this.isLoading?"true":void 0)}
7
+ aria-disabled=${a.o(this.disabled||this.isLoading?"true":void 0)}
8
+ form=${a.o(i)}
9
+ >
10
+ ${this.isLoading?t.b`<pkt-icon
11
+ class="pkt-btn__icon pkt-btn__spinner"
12
+ name="spinner-blue"
13
+ path=${a.o(this.loadingAnimationPath)}
14
+ ></pkt-icon>`:t.A}
15
+ ${this.variant!=="label-only"?t.b`<pkt-icon
16
+ class="pkt-btn__icon pkt-icon"
17
+ name=${this.iconName}
18
+ path=${a.o(this.iconPath)}
19
+ ></pkt-icon>`:t.A}
20
+ <span class="pkt-btn__text">${h.slotContent(this)}</span>
21
+ ${this.variant==="icons-right-and-left"?t.b`<pkt-icon
22
+ class="pkt-btn__icon"
23
+ name=${this.secondIconName}
24
+ path=${a.o(this.secondIconPath)}
25
+ ></pkt-icon>`:t.A}
26
+ </button>
27
+ `}}n([t.n({type:String})],e.prototype,"iconName");n([t.n({type:String})],e.prototype,"secondIconName");n([t.n({type:String})],e.prototype,"iconPath");n([t.n({type:String})],e.prototype,"secondIconPath");n([t.n({type:String})],e.prototype,"mode");n([t.n({type:String})],e.prototype,"size");n([t.n({type:Boolean,attribute:"full-width"})],e.prototype,"fullWidth");n([t.n({type:Boolean,attribute:"full-width-on-mobile"})],e.prototype,"fullWidthOnMobile");n([t.n({type:String})],e.prototype,"color");n([t.n({type:String})],e.prototype,"skin");n([t.n({type:String})],e.prototype,"variant");n([t.n({type:String,reflect:!0})],e.prototype,"state");n([t.n({type:String,reflect:!0})],e.prototype,"type");n([t.n({type:String})],e.prototype,"form");n([t.n({type:Boolean,reflect:!0})],e.prototype,"isLoading");n([t.n({type:Boolean,reflect:!0})],e.prototype,"disabled");n([t.n({type:String})],e.prototype,"loadingAnimationPath");try{t.t("pkt-button")(e)}catch{console.warn("Forsøker å definere <pkt-button>, men den er allerede definert")}exports.PktButton=e;