@oslokommune/punkt-elements 13.19.2 → 13.20.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 (43) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{alert-BXbmjri0.cjs → alert-CCjoJo11.cjs} +1 -1
  3. package/dist/{alert-BD1H1Rxn.js → alert-CPY1IhxY.js} +1 -1
  4. package/dist/{button-lDOnZON6.js → button-D99MF5nV.js} +29 -15
  5. package/dist/{button-1jYzMALk.cjs → button-abD9URn0.cjs} +13 -5
  6. package/dist/{combobox-QVZxhNxy.js → combobox-D-VZRCHk.js} +1 -1
  7. package/dist/{combobox-CLpXQ4Ch.cjs → combobox-DYYCdlex.cjs} +1 -1
  8. package/dist/{consent-Cgc6nuiP.cjs → consent-B1N02CuT.cjs} +1 -1
  9. package/dist/{consent-CYFXjOXF.js → consent-BSNqH1LX.js} +1 -1
  10. package/dist/{datepicker-uc2MWqo0.cjs → datepicker-CnCOXI2x.cjs} +1 -1
  11. package/dist/{datepicker-BqH2FC8k.js → datepicker-DsqM01iU.js} +1 -1
  12. package/dist/index.d.ts +4 -0
  13. package/dist/{input-wrapper-KGnsd9qY.js → input-wrapper-CnYj-xNE.js} +1 -1
  14. package/dist/{input-wrapper-CmNmnpWV.cjs → input-wrapper-WEGSbIA6.cjs} +1 -1
  15. package/dist/pkt-alert.cjs +1 -1
  16. package/dist/pkt-alert.js +1 -1
  17. package/dist/pkt-button.cjs +1 -1
  18. package/dist/pkt-button.js +1 -1
  19. package/dist/pkt-combobox.cjs +1 -1
  20. package/dist/pkt-combobox.js +1 -1
  21. package/dist/pkt-consent.cjs +1 -1
  22. package/dist/pkt-consent.js +1 -1
  23. package/dist/pkt-datepicker.cjs +1 -1
  24. package/dist/pkt-datepicker.js +2 -2
  25. package/dist/pkt-index.cjs +1 -1
  26. package/dist/pkt-index.js +9 -9
  27. package/dist/pkt-input-wrapper.cjs +1 -1
  28. package/dist/pkt-input-wrapper.js +1 -1
  29. package/dist/pkt-select.cjs +1 -1
  30. package/dist/pkt-select.js +1 -1
  31. package/dist/pkt-textarea.cjs +1 -1
  32. package/dist/pkt-textarea.js +1 -1
  33. package/dist/pkt-textinput.cjs +1 -1
  34. package/dist/pkt-textinput.js +1 -1
  35. package/dist/{select-BG4_G4yb.cjs → select-BSnylWof.cjs} +1 -1
  36. package/dist/{select-BjvRKbG6.js → select-CtgQkH86.js} +1 -1
  37. package/dist/{textarea-CaA50rm5.js → textarea-BJGCHy37.js} +1 -1
  38. package/dist/{textarea-Bfur28Bd.cjs → textarea-CcIQXCmC.cjs} +1 -1
  39. package/dist/{textinput-C6y83XoU.js → textinput-B3Q13J8H.js} +1 -1
  40. package/dist/{textinput-D2uHsUDp.cjs → textinput-Dn704gQw.cjs} +1 -1
  41. package/package.json +2 -2
  42. package/src/components/button/button.test.ts +74 -0
  43. package/src/components/button/button.ts +14 -2
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
+ ## [13.20.0](https://github.com/oslokommune/punkt/compare/13.19.2...13.20.0) (2026-01-23)
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
  ## [13.19.2](https://github.com/oslokommune/punkt/compare/13.19.1...13.19.2) (2026-01-22)
9
26
 
10
27
  ### ⚠ BREAKING CHANGES
@@ -1,4 +1,4 @@
1
- "use strict";const c=require("./class-map-C_erArZz.cjs"),t=require("./element-CJ_QKaki.cjs"),d=require("./state-DSjcvzDN.cjs"),h=require("./pkt-slot-controller-BzddBp7z.cjs"),u=require("./ref-BFa5Utho.cjs"),k=require("./classutils-BwNK82ZQ.cjs");require("./icon-BGuizDwk.cjs");require("./button-1jYzMALk.cjs");const v={skin:{default:"info"},ariaLive:{default:"polite"},compact:{default:!1},closeAlert:{default:!1}},a={props:v};var f=Object.defineProperty,_=Object.getOwnPropertyDescriptor,i=(o,e,s,l)=>{for(var r=l>1?void 0:l?_(e,s):e,p=o.length-1,n;p>=0;p--)(n=o[p])&&(r=(l?n(e,s,r):n(r))||r);return l&&r&&f(e,s,r),r};exports.PktAlert=class extends t.PktElement{constructor(){super(),this.defaultSlot=u.e(),this.compact=a.props.compact.default,this.title="",this.skin=a.props.skin.default,this.ariaLive=a.props.ariaLive.default,this["aria-live"]=null,this.closeAlert=a.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.slotController=new h.PktSlotController(this,this.defaultSlot),this._isClosed=!1}connectedCallback(){super.connectedCallback(),this["aria-live"]=this.getAttribute("aria-live")||this.ariaLive}attributeChangedCallback(e,s,l){e==="ariaLive"&&(this["aria-live"]=l),super.attributeChangedCallback(e,s,l)}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},s={"pkt-alert__grid":!0,"pkt-alert__noTitle":!this.title,"pkt-alert__noDate":!this.date};return t.x`
1
+ "use strict";const c=require("./class-map-C_erArZz.cjs"),t=require("./element-CJ_QKaki.cjs"),d=require("./state-DSjcvzDN.cjs"),h=require("./pkt-slot-controller-BzddBp7z.cjs"),u=require("./ref-BFa5Utho.cjs"),k=require("./classutils-BwNK82ZQ.cjs");require("./icon-BGuizDwk.cjs");require("./button-abD9URn0.cjs");const v={skin:{default:"info"},ariaLive:{default:"polite"},compact:{default:!1},closeAlert:{default:!1}},a={props:v};var f=Object.defineProperty,_=Object.getOwnPropertyDescriptor,i=(o,e,s,l)=>{for(var r=l>1?void 0:l?_(e,s):e,p=o.length-1,n;p>=0;p--)(n=o[p])&&(r=(l?n(e,s,r):n(r))||r);return l&&r&&f(e,s,r),r};exports.PktAlert=class extends t.PktElement{constructor(){super(),this.defaultSlot=u.e(),this.compact=a.props.compact.default,this.title="",this.skin=a.props.skin.default,this.ariaLive=a.props.ariaLive.default,this["aria-live"]=null,this.closeAlert=a.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.slotController=new h.PktSlotController(this,this.defaultSlot),this._isClosed=!1}connectedCallback(){super.connectedCallback(),this["aria-live"]=this.getAttribute("aria-live")||this.ariaLive}attributeChangedCallback(e,s,l){e==="ariaLive"&&(this["aria-live"]=l),super.attributeChangedCallback(e,s,l)}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},s={"pkt-alert__grid":!0,"pkt-alert__noTitle":!this.title,"pkt-alert__noDate":!this.date};return t.x`
2
2
  <div class=${c.e(e)} aria-live=${this["aria-live"]}>
3
3
  <div class=${c.e(s)}>
4
4
  <pkt-icon
@@ -5,7 +5,7 @@ import { P as m } from "./pkt-slot-controller-BPGj-LC5.js";
5
5
  import { e as _, n as b } from "./ref-Xa5dbh--.js";
6
6
  import { u as y } from "./classutils-RQs1k6D9.js";
7
7
  import "./icon-1dy7UZcu.js";
8
- import "./button-lDOnZON6.js";
8
+ import "./button-D99MF5nV.js";
9
9
  const C = { skin: { default: "info" }, ariaLive: { default: "polite" }, compact: { default: !1 }, closeAlert: { default: !1 } }, c = {
10
10
  props: C
11
11
  };
@@ -1,16 +1,16 @@
1
- import { P as b, E as f, x as l, n as s, a as c } from "./element-CRDRygXu.js";
1
+ import { P as f, E as c, x as l, n as s, a as b } from "./element-CRDRygXu.js";
2
2
  import { P as u } from "./pkt-slot-controller-BPGj-LC5.js";
3
3
  import { e as m } from "./class-map-wy7PUk0P.js";
4
- import { o as p } from "./if-defined-BWZGb3bh.js";
4
+ import { o as r } from "./if-defined-BWZGb3bh.js";
5
5
  import { e as y, n as k } from "./ref-Xa5dbh--.js";
6
6
  import "./icon-1dy7UZcu.js";
7
- var g = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, e = (t, o, n, r) => {
8
- for (var a = r > 1 ? void 0 : r ? $(o, n) : o, d = t.length - 1, h; d >= 0; d--)
9
- (h = t[d]) && (a = (r ? h(o, n, a) : h(a)) || a);
10
- return r && a && g(o, n, a), a;
7
+ var g = Object.defineProperty, P = Object.getOwnPropertyDescriptor, e = (t, o, n, p) => {
8
+ for (var a = p > 1 ? void 0 : p ? P(o, n) : o, d = t.length - 1, h; d >= 0; d--)
9
+ (h = t[d]) && (a = (p ? h(o, n, a) : h(a)) || a);
10
+ return p && a && g(o, n, a), a;
11
11
  };
12
12
  window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/latest/animations/";
13
- let i = class extends b {
13
+ let i = class extends f {
14
14
  constructor() {
15
15
  super(), this.defaultSlot = y(), 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, this.slotController = new u(this, this.defaultSlot);
16
16
  }
@@ -55,18 +55,26 @@ let i = class extends b {
55
55
  class=${m(o)}
56
56
  type=${this.type}
57
57
  ?disabled=${!!this.disabled}
58
- aria-busy=${p(this.isLoading ? "true" : void 0)}
59
- aria-disabled=${p(this.disabled || this.isLoading ? "true" : void 0)}
60
- form=${p(t)}
58
+ aria-busy=${r(this.isLoading ? "true" : void 0)}
59
+ aria-disabled=${r(this.disabled || this.isLoading ? "true" : void 0)}
60
+ form=${r(t)}
61
61
  >
62
62
  ${this.isLoading ? l`<pkt-icon
63
63
  class="pkt-btn__icon pkt-btn__spinner"
64
64
  name="spinner-blue"
65
- path=${p(this.loadingAnimationPath)}
66
- ></pkt-icon>` : f}
67
- ${this.variant !== "label-only" ? l`<pkt-icon class="pkt-btn__icon pkt-icon" name=${this.iconName}></pkt-icon>` : f}
65
+ path=${r(this.loadingAnimationPath)}
66
+ ></pkt-icon>` : c}
67
+ ${this.variant !== "label-only" ? l`<pkt-icon
68
+ class="pkt-btn__icon pkt-icon"
69
+ name=${this.iconName}
70
+ path=${r(this.iconPath)}
71
+ ></pkt-icon>` : c}
68
72
  <span class="pkt-btn__text" ${k(this.defaultSlot)}></span>
69
- ${this.variant === "icons-right-and-left" ? l`<pkt-icon class="pkt-btn__icon" name=${this.secondIconName}></pkt-icon>` : f}
73
+ ${this.variant === "icons-right-and-left" ? l`<pkt-icon
74
+ class="pkt-btn__icon"
75
+ name=${this.secondIconName}
76
+ path=${r(this.secondIconPath)}
77
+ ></pkt-icon>` : c}
70
78
  </button>
71
79
  `;
72
80
  }
@@ -77,6 +85,12 @@ e([
77
85
  e([
78
86
  s({ type: String })
79
87
  ], i.prototype, "secondIconName", 2);
88
+ e([
89
+ s({ type: String })
90
+ ], i.prototype, "iconPath", 2);
91
+ e([
92
+ s({ type: String })
93
+ ], i.prototype, "secondIconPath", 2);
80
94
  e([
81
95
  s({ type: String })
82
96
  ], i.prototype, "mode", 2);
@@ -117,7 +131,7 @@ e([
117
131
  s({ type: String })
118
132
  ], i.prototype, "loadingAnimationPath", 2);
119
133
  i = e([
120
- c("pkt-button")
134
+ b("pkt-button")
121
135
  ], i);
122
136
  export {
123
137
  i as P
@@ -1,6 +1,6 @@
1
- "use strict";const t=require("./element-CJ_QKaki.cjs"),h=require("./pkt-slot-controller-BzddBp7z.cjs"),u=require("./class-map-C_erArZz.cjs"),a=require("./if-defined-Bc9-_I01.cjs"),d=require("./ref-BFa5Utho.cjs");require("./icon-BGuizDwk.cjs");var c=Object.defineProperty,k=Object.getOwnPropertyDescriptor,e=(r,i,s,n)=>{for(var o=n>1?void 0:n?k(i,s):i,l=r.length-1,p;l>=0;l--)(p=r[l])&&(o=(n?p(i,s,o):p(o))||o);return n&&o&&c(i,s,o),o};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/latest/animations/";exports.PktButton=class extends t.PktElement{constructor(){super(),this.defaultSlot=d.e(),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,this.slotController=new h.PktSlotController(this,this.defaultSlot)}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,n){super.attributeChangedCallback(i,s,n),i==="disabled"&&n==="false"&&(this.disabled=!1),(i==="isloading"||i==="isLoading")&&n==="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.x`
1
+ "use strict";const t=require("./element-CJ_QKaki.cjs"),h=require("./pkt-slot-controller-BzddBp7z.cjs"),u=require("./class-map-C_erArZz.cjs"),a=require("./if-defined-Bc9-_I01.cjs"),d=require("./ref-BFa5Utho.cjs");require("./icon-BGuizDwk.cjs");var c=Object.defineProperty,k=Object.getOwnPropertyDescriptor,e=(r,i,o,n)=>{for(var s=n>1?void 0:n?k(i,o):i,l=r.length-1,p;l>=0;l--)(p=r[l])&&(s=(n?p(i,o,s):p(s))||s);return n&&s&&c(i,o,s),s};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/latest/animations/";exports.PktButton=class extends t.PktElement{constructor(){super(),this.defaultSlot=d.e(),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,this.slotController=new h.PktSlotController(this,this.defaultSlot)}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,o,n){super.attributeChangedCallback(i,o,n),i==="disabled"&&n==="false"&&(this.disabled=!1),(i==="isloading"||i==="isLoading")&&n==="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,o={"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.x`
2
2
  <button
3
- class=${u.e(s)}
3
+ class=${u.e(o)}
4
4
  type=${this.type}
5
5
  ?disabled=${!!this.disabled}
6
6
  aria-busy=${a.o(this.isLoading?"true":void 0)}
@@ -12,8 +12,16 @@
12
12
  name="spinner-blue"
13
13
  path=${a.o(this.loadingAnimationPath)}
14
14
  ></pkt-icon>`:t.E}
15
- ${this.variant!=="label-only"?t.x`<pkt-icon class="pkt-btn__icon pkt-icon" name=${this.iconName}></pkt-icon>`:t.E}
15
+ ${this.variant!=="label-only"?t.x`<pkt-icon
16
+ class="pkt-btn__icon pkt-icon"
17
+ name=${this.iconName}
18
+ path=${a.o(this.iconPath)}
19
+ ></pkt-icon>`:t.E}
16
20
  <span class="pkt-btn__text" ${d.n(this.defaultSlot)}></span>
17
- ${this.variant==="icons-right-and-left"?t.x`<pkt-icon class="pkt-btn__icon" name=${this.secondIconName}></pkt-icon>`:t.E}
21
+ ${this.variant==="icons-right-and-left"?t.x`<pkt-icon
22
+ class="pkt-btn__icon"
23
+ name=${this.secondIconName}
24
+ path=${a.o(this.secondIconPath)}
25
+ ></pkt-icon>`:t.E}
18
26
  </button>
19
- `}};e([t.n({type:String})],exports.PktButton.prototype,"iconName",2);e([t.n({type:String})],exports.PktButton.prototype,"secondIconName",2);e([t.n({type:String})],exports.PktButton.prototype,"mode",2);e([t.n({type:String})],exports.PktButton.prototype,"size",2);e([t.n({type:Boolean,attribute:"full-width"})],exports.PktButton.prototype,"fullWidth",2);e([t.n({type:Boolean,attribute:"full-width-on-mobile"})],exports.PktButton.prototype,"fullWidthOnMobile",2);e([t.n({type:String})],exports.PktButton.prototype,"color",2);e([t.n({type:String})],exports.PktButton.prototype,"skin",2);e([t.n({type:String})],exports.PktButton.prototype,"variant",2);e([t.n({type:String,reflect:!0})],exports.PktButton.prototype,"state",2);e([t.n({type:String,reflect:!0})],exports.PktButton.prototype,"type",2);e([t.n({type:String})],exports.PktButton.prototype,"form",2);e([t.n({type:Boolean,reflect:!0})],exports.PktButton.prototype,"isLoading",2);e([t.n({type:Boolean,reflect:!0})],exports.PktButton.prototype,"disabled",2);e([t.n({type:String})],exports.PktButton.prototype,"loadingAnimationPath",2);exports.PktButton=e([t.t("pkt-button")],exports.PktButton);
27
+ `}};e([t.n({type:String})],exports.PktButton.prototype,"iconName",2);e([t.n({type:String})],exports.PktButton.prototype,"secondIconName",2);e([t.n({type:String})],exports.PktButton.prototype,"iconPath",2);e([t.n({type:String})],exports.PktButton.prototype,"secondIconPath",2);e([t.n({type:String})],exports.PktButton.prototype,"mode",2);e([t.n({type:String})],exports.PktButton.prototype,"size",2);e([t.n({type:Boolean,attribute:"full-width"})],exports.PktButton.prototype,"fullWidth",2);e([t.n({type:Boolean,attribute:"full-width-on-mobile"})],exports.PktButton.prototype,"fullWidthOnMobile",2);e([t.n({type:String})],exports.PktButton.prototype,"color",2);e([t.n({type:String})],exports.PktButton.prototype,"skin",2);e([t.n({type:String})],exports.PktButton.prototype,"variant",2);e([t.n({type:String,reflect:!0})],exports.PktButton.prototype,"state",2);e([t.n({type:String,reflect:!0})],exports.PktButton.prototype,"type",2);e([t.n({type:String})],exports.PktButton.prototype,"form",2);e([t.n({type:Boolean,reflect:!0})],exports.PktButton.prototype,"isLoading",2);e([t.n({type:Boolean,reflect:!0})],exports.PktButton.prototype,"disabled",2);e([t.n({type:String})],exports.PktButton.prototype,"loadingAnimationPath",2);exports.PktButton=e([t.t("pkt-button")],exports.PktButton);
@@ -7,7 +7,7 @@ import { c as R } from "./repeat-CJ79egkN.js";
7
7
  import { P as V } from "./input-element-B0VPRK_E.js";
8
8
  import { P as A } from "./pkt-options-controller-CZO1nxZ8.js";
9
9
  import { P as C } from "./pkt-slot-controller-BPGj-LC5.js";
10
- import "./input-wrapper-KGnsd9qY.js";
10
+ import "./input-wrapper-CnYj-xNE.js";
11
11
  import "./icon-1dy7UZcu.js";
12
12
  import "./tag-BpCdJuei.js";
13
13
  import "./listbox-mvKKzH-v.js";
@@ -1,4 +1,4 @@
1
- "use strict";const a=require("./element-CJ_QKaki.cjs"),c=require("./if-defined-Bc9-_I01.cjs"),d=require("./state-DSjcvzDN.cjs"),r=require("./ref-BFa5Utho.cjs"),y=require("./class-map-C_erArZz.cjs"),O=require("./repeat-BZb41H64.cjs"),$=require("./input-element-BmXkhljw.cjs"),I=require("./pkt-options-controller-CiuBG6Lt.cjs"),w=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-CmNmnpWV.cjs");require("./icon-BGuizDwk.cjs");require("./tag-BkuJjOy7.cjs");require("./listbox-DnoqOo5u.cjs");const C={displayValueAs:{default:"label"}},R={props:C};var V=Object.defineProperty,A=Object.getOwnPropertyDescriptor,h=(v,t,e,i)=>{for(var s=i>1?void 0:i?A(t,e):t,n=v.length-1,l;n>=0;n--)(l=v[n])&&(s=(i?l(t,e,s):l(s))||s);return i&&s&&V(t,e,s),s};exports.PktCombobox=class extends $.PktInputElement{constructor(){super(),this.helptextSlot=r.e(),this.value="",this.options=[],this.defaultOptions=[],this.allowUserInput=!1,this.typeahead=!1,this.includeSearch=!1,this.searchPlaceholder="",this.multiple=!1,this.maxlength=null,this.displayValueAs=R.props.displayValueAs.default,this.tagPlacement=null,this._options=[],this._isOptionsOpen=!1,this._value=[],this._userInfoMessage="",this._addValueText=null,this._maxIsReached=!1,this._search="",this._inputFocus=!1,this._editingSingleValue=!1,this.inputRef=r.e(),this.arrowRef=r.e(),this.listboxRef=r.e(),this.focusRef=r.e(),this.optionTagRef=r.e(),this.optionsController=new I.PktOptionsSlotController(this),this.slotController=new w.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}connectedCallback(){var t;if(super.connectedCallback(),document&&document.body.addEventListener("click",e=>{this._isOptionsOpen&&!this.contains(e.target)&&this.handleFocusOut(e)}),this._options=[],this.defaultOptions&&this.defaultOptions.length){const e=((t=this.options)==null?void 0:t.filter(i=>i.userAdded))||[];this.options=[...e,...JSON.parse(JSON.stringify(this.defaultOptions))],this._options=Array.isArray(this.options)?[...this.options]:[]}if(this.optionsController.nodes.length){const e=[];this.optionsController.nodes.forEach(i=>{if(!i.textContent&&!i.getAttribute("value"))return null;const s={value:i.getAttribute("value")||i.textContent||"",label:i.textContent||i.getAttribute("value")||""};i.getAttribute("data-prefix")&&(s.prefix=i.getAttribute("data-prefix")||void 0),i.getAttribute("tagskincolor")&&(s.tagSkinColor=i.getAttribute("tagskincolor")),i.getAttribute("description")&&(s.description=i.getAttribute("description")||void 0),s.fulltext=s.value+s.label+(s.prefix||""),e.push(s)}),e.length&&(this.options=[...e],this._options=[...e])}}updated(t){if(t.has("_value")&&this.valueChanged(this._value,t.get("_value")),t.has("value")&&(Array.isArray(this.value)?this._value=this.value:this.value&&this.multiple?this._value=this.value.split(","):this.value?this._value=[this.value]:this._value=[],!this.multiple&&this._value.length>1&&(this._value=[this._value[0]]),this.isMaxItemsReached()),t.has("defaultOptions")&&this.defaultOptions.length){const e=(Array.isArray(this.options)?this.options:[]).filter(i=>i.userAdded)||[];this.options=[...e,...JSON.parse(JSON.stringify(this.defaultOptions))],this._options=Array.isArray(this.options)?[...this.options]:[]}if(t.has("options")){const s=(t.get("options")||this._options||[]).filter(l=>l&&l.userAdded).filter(l=>!(Array.isArray(this.options)?this.options:[]).some(o=>o.value===l.value)),n=[...s,...this.options];this._options=n,s.length>0&&(this.options=n),this._options.forEach(l=>{if(l.value&&!l.label&&(l.label=l.value),l.selected&&!this._value.includes(l.value)){const o=[...this._value];this._value=[...this._value,l.value],this.valueChanged(this._value,o)}l.fulltext=l.value+l.label+(l.prefix||""),l.selected=l.selected||this._value.includes(l.value)})}t.has("_search")&&this.dispatchEvent(new CustomEvent("search",{detail:this._search,bubbles:!1})),super.updated(t)}attributeChangedCallback(t,e,i){t==="value"&&(Array.isArray(this.value)?this._value=this.value:this.value&&this.multiple?this._value=this.value.split(","):this.value?this._value=[this.value]:this._value=[],!this.multiple&&this._value.length>1&&(this._value=[this._value[0]])),t==="options"&&(this._options=Array.isArray(this.options)?[...this.options]:[],this._options.forEach(s=>{s.value&&!s.label&&(s.label=s.value),s.selected&&!this._value.includes(s.value)&&(this._value=[...this._value,s.value]),s.fulltext=s.value+s.label+(s.prefix||"")}),this._search=""),super.attributeChangedCallback(t,e,i)}render(){return a.x`
1
+ "use strict";const a=require("./element-CJ_QKaki.cjs"),c=require("./if-defined-Bc9-_I01.cjs"),d=require("./state-DSjcvzDN.cjs"),r=require("./ref-BFa5Utho.cjs"),y=require("./class-map-C_erArZz.cjs"),O=require("./repeat-BZb41H64.cjs"),$=require("./input-element-BmXkhljw.cjs"),I=require("./pkt-options-controller-CiuBG6Lt.cjs"),w=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-WEGSbIA6.cjs");require("./icon-BGuizDwk.cjs");require("./tag-BkuJjOy7.cjs");require("./listbox-DnoqOo5u.cjs");const C={displayValueAs:{default:"label"}},R={props:C};var V=Object.defineProperty,A=Object.getOwnPropertyDescriptor,h=(v,t,e,i)=>{for(var s=i>1?void 0:i?A(t,e):t,n=v.length-1,l;n>=0;n--)(l=v[n])&&(s=(i?l(t,e,s):l(s))||s);return i&&s&&V(t,e,s),s};exports.PktCombobox=class extends $.PktInputElement{constructor(){super(),this.helptextSlot=r.e(),this.value="",this.options=[],this.defaultOptions=[],this.allowUserInput=!1,this.typeahead=!1,this.includeSearch=!1,this.searchPlaceholder="",this.multiple=!1,this.maxlength=null,this.displayValueAs=R.props.displayValueAs.default,this.tagPlacement=null,this._options=[],this._isOptionsOpen=!1,this._value=[],this._userInfoMessage="",this._addValueText=null,this._maxIsReached=!1,this._search="",this._inputFocus=!1,this._editingSingleValue=!1,this.inputRef=r.e(),this.arrowRef=r.e(),this.listboxRef=r.e(),this.focusRef=r.e(),this.optionTagRef=r.e(),this.optionsController=new I.PktOptionsSlotController(this),this.slotController=new w.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}connectedCallback(){var t;if(super.connectedCallback(),document&&document.body.addEventListener("click",e=>{this._isOptionsOpen&&!this.contains(e.target)&&this.handleFocusOut(e)}),this._options=[],this.defaultOptions&&this.defaultOptions.length){const e=((t=this.options)==null?void 0:t.filter(i=>i.userAdded))||[];this.options=[...e,...JSON.parse(JSON.stringify(this.defaultOptions))],this._options=Array.isArray(this.options)?[...this.options]:[]}if(this.optionsController.nodes.length){const e=[];this.optionsController.nodes.forEach(i=>{if(!i.textContent&&!i.getAttribute("value"))return null;const s={value:i.getAttribute("value")||i.textContent||"",label:i.textContent||i.getAttribute("value")||""};i.getAttribute("data-prefix")&&(s.prefix=i.getAttribute("data-prefix")||void 0),i.getAttribute("tagskincolor")&&(s.tagSkinColor=i.getAttribute("tagskincolor")),i.getAttribute("description")&&(s.description=i.getAttribute("description")||void 0),s.fulltext=s.value+s.label+(s.prefix||""),e.push(s)}),e.length&&(this.options=[...e],this._options=[...e])}}updated(t){if(t.has("_value")&&this.valueChanged(this._value,t.get("_value")),t.has("value")&&(Array.isArray(this.value)?this._value=this.value:this.value&&this.multiple?this._value=this.value.split(","):this.value?this._value=[this.value]:this._value=[],!this.multiple&&this._value.length>1&&(this._value=[this._value[0]]),this.isMaxItemsReached()),t.has("defaultOptions")&&this.defaultOptions.length){const e=(Array.isArray(this.options)?this.options:[]).filter(i=>i.userAdded)||[];this.options=[...e,...JSON.parse(JSON.stringify(this.defaultOptions))],this._options=Array.isArray(this.options)?[...this.options]:[]}if(t.has("options")){const s=(t.get("options")||this._options||[]).filter(l=>l&&l.userAdded).filter(l=>!(Array.isArray(this.options)?this.options:[]).some(o=>o.value===l.value)),n=[...s,...this.options];this._options=n,s.length>0&&(this.options=n),this._options.forEach(l=>{if(l.value&&!l.label&&(l.label=l.value),l.selected&&!this._value.includes(l.value)){const o=[...this._value];this._value=[...this._value,l.value],this.valueChanged(this._value,o)}l.fulltext=l.value+l.label+(l.prefix||""),l.selected=l.selected||this._value.includes(l.value)})}t.has("_search")&&this.dispatchEvent(new CustomEvent("search",{detail:this._search,bubbles:!1})),super.updated(t)}attributeChangedCallback(t,e,i){t==="value"&&(Array.isArray(this.value)?this._value=this.value:this.value&&this.multiple?this._value=this.value.split(","):this.value?this._value=[this.value]:this._value=[],!this.multiple&&this._value.length>1&&(this._value=[this._value[0]])),t==="options"&&(this._options=Array.isArray(this.options)?[...this.options]:[],this._options.forEach(s=>{s.value&&!s.label&&(s.label=s.value),s.selected&&!this._value.includes(s.value)&&(this._value=[...this._value,s.value]),s.fulltext=s.value+s.label+(s.prefix||"")}),this._search=""),super.attributeChangedCallback(t,e,i)}render(){return a.x`
2
2
  <pkt-input-wrapper
3
3
  .label=${this.label}
4
4
  .helptext=${this.helptext}
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("./element-CJ_QKaki.cjs");require("./button-1jYzMALk.cjs");require("./icon-BGuizDwk.cjs");const k={i18n:{nb:{contentPresentation:{title:"Oslo kommune bruker informasjonskapsler",description:["For at nettstedet skal fungere og være trygt, bruker Oslo kommune informasjonskapsler. Noen er teknisk nødvendige, mens andre sikrer ulik funksjonalitet.","Godtar du alle informasjonskapsler, tillater du også at vi samler inn data om statistikk og brukeradferd. Da hjelper du oss med å lage et bedre nettsted uten at du trenger å dele noe personlig informasjon med oss."],buttons:{accept:"Godta alle",reject:"Kun nødvendige",settings:"Innstillinger for informasjonskapsler"}},contentSettings:{title:"Innstillinger for informasjonskapsler",description:["Her kan du velge hvilke typer informasjonskapsler du vil tillate. Tillatelsen gjelder i 90 dager. Husk at nødvendige informasjonskapsler ikke kan velges bort.","Du kan når som helst endre innstillingene og finne mer informasjon nederst på nettstedet under «Innstillinger for informasjonskapsler» og «Personvern og informasjonskapsler»."],buttons:{back:"Tilbake",save:"Lagre innstillinger"}}},en:{contentPresentation:{title:"Before you visit Oslo kommune ...",description:["This website uses cookies to make improvements. In this context, we need your consent to measure the traffic on the website in relation to statistics and feedback.","To read more about what we use cookies for, go to our privacy declaration which you will find at the bottom of our websites."],buttons:{accept:"Yes, I accept",reject:"Only necessary",settings:"Go to settings"}},contentSettings:{title:"Her kan du aktivt velge mellom ulike informasjonskapsler",description:["For å lese mer om hva vi bruker informasjonskapsler til gå til vår personvernserklering som du finner på våre nettsider"],buttons:{back:"Back",save:"Save settings"}}}}};var d=Object.defineProperty,p=Object.getOwnPropertyDescriptor,s=(r,e,t,n)=>{for(var i=n>1?void 0:n?p(e,t):e,a=r.length-1,l;a>=0;a--)(l=r[a])&&(i=(n?l(e,t,i):l(i))||i);return n&&i&&d(e,t,i),i};let c=null;function u(){return c||(c=new Promise((r,e)=>{if(document.querySelector("#oslo-consent-script")){r();return}const t=document.createElement("script");t.src="https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.js",t.id="oslo-consent-script",t.onload=()=>r(),t.onerror=e,document.head.appendChild(t);const n=document.createElement("link");n.href="https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.css",n.type="text/css",n.rel="stylesheet",n.id="oslo-consent-styles",document.head.appendChild(n)}),c)}exports.PktConsent=class extends o.PktElement{constructor(){super(),this.devMode=!1,this.hotjarId=null,this.googleAnalyticsId=null,this.cookieDomain=null,this.cookieSecure=null,this.cookieExpiryDays=null,this.triggerType="button",this.triggerText=null,this.i18nLanguage="nb"}connectedCallback(){super.connectedCallback(),this.triggerText=this.triggerText||k.i18n[this.i18nLanguage].contentPresentation.buttons.settings}disconnectedCallback(){var e;super.disconnectedCallback(),this._cookieEventHandler&&((e=window.__cookieEvents)==null||e.off("CookieManager.setCookie",this._cookieEventHandler))}returnJsonOrObject(e){let t;try{t=JSON.parse(e)}catch{t=e}return t}emitCookieConsents(e){const n=this.returnJsonOrObject(e.value).items.reduce((i,a)=>(i[a.name]=a.consent,i),{});this.dispatchEvent(new CustomEvent("toggle-consent",{detail:n,bubbles:!0,cancelable:!1}))}async firstUpdated(e){window.cookieBanner_googleAnalyticsId=this.googleAnalyticsId,window.cookieBanner_hotjarId=this.hotjarId,this.cookieDomain&&(window.cookieBanner_cookieDomain=this.cookieDomain),this.cookieSecure&&(window.cookieBanner_cookieSecure=this.cookieSecure),this.cookieExpiryDays&&(window.cookieBanner_cookieExpiryDays=this.cookieExpiryDays),this.devMode&&(window.cookieBanner_devMode=this.devMode),await u(),this.triggerInit()}triggerInit(){window.document.dispatchEvent(new Event("CookieBannerReady",{bubbles:!0,cancelable:!0})),window.cookieBanner.cookieConsent.validateConsentCookie().then(e=>{if(e){const n={value:window.cookieBanner.cookieConsent.getConsentCookie()};window.setTimeout(()=>this.emitCookieConsents(n),0),this._cookieEventHandler&&window.__cookieEvents.off("CookieManager.setCookie",this._cookieEventHandler),this._cookieEventHandler=i=>{this.emitCookieConsents(i)},window.__cookieEvents.on("CookieManager.setCookie",this._cookieEventHandler)}})}openModal(e){var t;e.preventDefault(),(t=window.cookieBanner)!=null&&t.cookieConsent||this.triggerInit(),setTimeout(()=>window.cookieBanner.openCookieModal())}render(){return this.triggerType==="link"?o.x`<a href="#" class="pkt-link" @click=${this.openModal}>${this.triggerText}</a>`:this.triggerType==="footerlink"?o.x`<a href="#" class="pkt-footer__link" @click=${this.openModal}>
1
+ "use strict";const o=require("./element-CJ_QKaki.cjs");require("./button-abD9URn0.cjs");require("./icon-BGuizDwk.cjs");const k={i18n:{nb:{contentPresentation:{title:"Oslo kommune bruker informasjonskapsler",description:["For at nettstedet skal fungere og være trygt, bruker Oslo kommune informasjonskapsler. Noen er teknisk nødvendige, mens andre sikrer ulik funksjonalitet.","Godtar du alle informasjonskapsler, tillater du også at vi samler inn data om statistikk og brukeradferd. Da hjelper du oss med å lage et bedre nettsted uten at du trenger å dele noe personlig informasjon med oss."],buttons:{accept:"Godta alle",reject:"Kun nødvendige",settings:"Innstillinger for informasjonskapsler"}},contentSettings:{title:"Innstillinger for informasjonskapsler",description:["Her kan du velge hvilke typer informasjonskapsler du vil tillate. Tillatelsen gjelder i 90 dager. Husk at nødvendige informasjonskapsler ikke kan velges bort.","Du kan når som helst endre innstillingene og finne mer informasjon nederst på nettstedet under «Innstillinger for informasjonskapsler» og «Personvern og informasjonskapsler»."],buttons:{back:"Tilbake",save:"Lagre innstillinger"}}},en:{contentPresentation:{title:"Before you visit Oslo kommune ...",description:["This website uses cookies to make improvements. In this context, we need your consent to measure the traffic on the website in relation to statistics and feedback.","To read more about what we use cookies for, go to our privacy declaration which you will find at the bottom of our websites."],buttons:{accept:"Yes, I accept",reject:"Only necessary",settings:"Go to settings"}},contentSettings:{title:"Her kan du aktivt velge mellom ulike informasjonskapsler",description:["For å lese mer om hva vi bruker informasjonskapsler til gå til vår personvernserklering som du finner på våre nettsider"],buttons:{back:"Back",save:"Save settings"}}}}};var d=Object.defineProperty,p=Object.getOwnPropertyDescriptor,s=(r,e,t,n)=>{for(var i=n>1?void 0:n?p(e,t):e,a=r.length-1,l;a>=0;a--)(l=r[a])&&(i=(n?l(e,t,i):l(i))||i);return n&&i&&d(e,t,i),i};let c=null;function u(){return c||(c=new Promise((r,e)=>{if(document.querySelector("#oslo-consent-script")){r();return}const t=document.createElement("script");t.src="https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.js",t.id="oslo-consent-script",t.onload=()=>r(),t.onerror=e,document.head.appendChild(t);const n=document.createElement("link");n.href="https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.css",n.type="text/css",n.rel="stylesheet",n.id="oslo-consent-styles",document.head.appendChild(n)}),c)}exports.PktConsent=class extends o.PktElement{constructor(){super(),this.devMode=!1,this.hotjarId=null,this.googleAnalyticsId=null,this.cookieDomain=null,this.cookieSecure=null,this.cookieExpiryDays=null,this.triggerType="button",this.triggerText=null,this.i18nLanguage="nb"}connectedCallback(){super.connectedCallback(),this.triggerText=this.triggerText||k.i18n[this.i18nLanguage].contentPresentation.buttons.settings}disconnectedCallback(){var e;super.disconnectedCallback(),this._cookieEventHandler&&((e=window.__cookieEvents)==null||e.off("CookieManager.setCookie",this._cookieEventHandler))}returnJsonOrObject(e){let t;try{t=JSON.parse(e)}catch{t=e}return t}emitCookieConsents(e){const n=this.returnJsonOrObject(e.value).items.reduce((i,a)=>(i[a.name]=a.consent,i),{});this.dispatchEvent(new CustomEvent("toggle-consent",{detail:n,bubbles:!0,cancelable:!1}))}async firstUpdated(e){window.cookieBanner_googleAnalyticsId=this.googleAnalyticsId,window.cookieBanner_hotjarId=this.hotjarId,this.cookieDomain&&(window.cookieBanner_cookieDomain=this.cookieDomain),this.cookieSecure&&(window.cookieBanner_cookieSecure=this.cookieSecure),this.cookieExpiryDays&&(window.cookieBanner_cookieExpiryDays=this.cookieExpiryDays),this.devMode&&(window.cookieBanner_devMode=this.devMode),await u(),this.triggerInit()}triggerInit(){window.document.dispatchEvent(new Event("CookieBannerReady",{bubbles:!0,cancelable:!0})),window.cookieBanner.cookieConsent.validateConsentCookie().then(e=>{if(e){const n={value:window.cookieBanner.cookieConsent.getConsentCookie()};window.setTimeout(()=>this.emitCookieConsents(n),0),this._cookieEventHandler&&window.__cookieEvents.off("CookieManager.setCookie",this._cookieEventHandler),this._cookieEventHandler=i=>{this.emitCookieConsents(i)},window.__cookieEvents.on("CookieManager.setCookie",this._cookieEventHandler)}})}openModal(e){var t;e.preventDefault(),(t=window.cookieBanner)!=null&&t.cookieConsent||this.triggerInit(),setTimeout(()=>window.cookieBanner.openCookieModal())}render(){return this.triggerType==="link"?o.x`<a href="#" class="pkt-link" @click=${this.openModal}>${this.triggerText}</a>`:this.triggerType==="footerlink"?o.x`<a href="#" class="pkt-footer__link" @click=${this.openModal}>
2
2
  <pkt-icon name="chevron-right" class="pkt-footer__link-icon"></pkt-icon>
3
3
  ${this.triggerText}
4
4
  </a>`:this.triggerType==="icon"?o.x`<pkt-button
@@ -1,5 +1,5 @@
1
1
  import { P as p, x as c, n as a, a as g } from "./element-CRDRygXu.js";
2
- import "./button-lDOnZON6.js";
2
+ import "./button-D99MF5nV.js";
3
3
  import "./icon-1dy7UZcu.js";
4
4
  const u = {
5
5
  i18n: {
@@ -1,4 +1,4 @@
1
- "use strict";const a=require("./element-CJ_QKaki.cjs"),_=require("./state-DSjcvzDN.cjs"),u=require("./calendar-Dz1Cnzx5.cjs"),I=require("./input-element-BmXkhljw.cjs"),p=require("./ref-BFa5Utho.cjs");require("./icon-BGuizDwk.cjs");require("./input-wrapper-CmNmnpWV.cjs");const f=require("./class-map-C_erArZz.cjs"),O=require("./repeat-BZb41H64.cjs");require("./tag-BkuJjOy7.cjs");const S=require("./utils-byXsEz1u.cjs"),y=require("./if-defined-Bc9-_I01.cjs"),B=require("./pkt-slot-controller-BzddBp7z.cjs");var A=Object.defineProperty,M=Object.getOwnPropertyDescriptor,w=(i,e,t,s)=>{for(var n=s>1?void 0:s?M(e,t):e,l=i.length-1,r;l>=0;l--)(r=i[l])&&(n=(s?r(e,t,n):r(n))||n);return s&&n&&A(e,t,n),n};exports.PktDateTags=class extends a.PktElement{constructor(){super(...arguments),this.dates=[],this.dateformat="dd.MM.yyyy",this.className="pkt-datepicker__tags",this.idBase=S.uuidish()}render(){return this.classes={"pkt-date-tags":!0,[this.className]:!0},a.x`
1
+ "use strict";const a=require("./element-CJ_QKaki.cjs"),_=require("./state-DSjcvzDN.cjs"),u=require("./calendar-Dz1Cnzx5.cjs"),I=require("./input-element-BmXkhljw.cjs"),p=require("./ref-BFa5Utho.cjs");require("./icon-BGuizDwk.cjs");require("./input-wrapper-WEGSbIA6.cjs");const f=require("./class-map-C_erArZz.cjs"),O=require("./repeat-BZb41H64.cjs");require("./tag-BkuJjOy7.cjs");const S=require("./utils-byXsEz1u.cjs"),y=require("./if-defined-Bc9-_I01.cjs"),B=require("./pkt-slot-controller-BzddBp7z.cjs");var A=Object.defineProperty,M=Object.getOwnPropertyDescriptor,w=(i,e,t,s)=>{for(var n=s>1?void 0:s?M(e,t):e,l=i.length-1,r;l>=0;l--)(r=i[l])&&(n=(s?r(e,t,n):r(n))||n);return s&&n&&A(e,t,n),n};exports.PktDateTags=class extends a.PktElement{constructor(){super(...arguments),this.dates=[],this.dateformat="dd.MM.yyyy",this.className="pkt-datepicker__tags",this.idBase=S.uuidish()}render(){return this.classes={"pkt-date-tags":!0,[this.className]:!0},a.x`
2
2
  <div class=${f.e(this.classes)} aria-live="polite">
3
3
  ${Array.isArray(this.dates)&&this.dates[0]?O.c(u.sortDateStrings((this.dates??[]).filter(Boolean)),e=>e,e=>{var t;return a.x` <pkt-tag
4
4
  id=${this.idBase+e+"-tag"}
@@ -4,7 +4,7 @@ import { s as U, f as N, n as j, a as W, i as H, b as L, v as O, d as G, e as J,
4
4
  import { P as X } from "./input-element-B0VPRK_E.js";
5
5
  import { e as u, n as c } from "./ref-Xa5dbh--.js";
6
6
  import "./icon-1dy7UZcu.js";
7
- import "./input-wrapper-KGnsd9qY.js";
7
+ import "./input-wrapper-CnYj-xNE.js";
8
8
  import { e as k } from "./class-map-wy7PUk0P.js";
9
9
  import { c as Y } from "./repeat-CJ79egkN.js";
10
10
  import "./tag-BpCdJuei.js";
package/dist/index.d.ts CHANGED
@@ -112,6 +112,8 @@ export declare interface IPktBackLink {
112
112
  export declare interface IPktButton {
113
113
  iconName?: PktIconName;
114
114
  secondIconName?: PktIconName;
115
+ iconPath?: string;
116
+ secondIconPath?: string;
115
117
  mode?: TPktButtonMode;
116
118
  size?: TPktButtonSize;
117
119
  fullWidth?: Booleanish;
@@ -395,6 +397,8 @@ export declare class PktButton extends PktElement<IPktButton> implements IPktBut
395
397
  constructor();
396
398
  iconName: string;
397
399
  secondIconName: string;
400
+ iconPath: string | undefined;
401
+ secondIconPath: string | undefined;
398
402
  mode?: TPktButtonMode;
399
403
  size: TPktButtonSize;
400
404
  fullWidth: Booleanish;
@@ -7,7 +7,7 @@ import { e as E } from "./class-map-wy7PUk0P.js";
7
7
  import { u as S } from "./utils-DznhwRXm.js";
8
8
  import { s } from "./input-wrapper-CDgenrYA.js";
9
9
  import "./helptext-Cs3QHeEy.js";
10
- import "./alert-BD1H1Rxn.js";
10
+ import "./alert-CPY1IhxY.js";
11
11
  var v = Object.defineProperty, D = Object.getOwnPropertyDescriptor, e = (o, a, n, h) => {
12
12
  for (var l = h > 1 ? void 0 : h ? D(a, n) : a, d = o.length - 1, u; d >= 0; d--)
13
13
  (u = o[d]) && (l = (h ? u(a, n, l) : u(l)) || l);
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("./element-CJ_QKaki.cjs"),g=require("./pkt-slot-controller-BzddBp7z.cjs"),u=require("./ref-BFa5Utho.cjs"),k=require("./if-defined-Bc9-_I01.cjs"),x=require("./icon-BGuizDwk.cjs"),y=require("./class-map-C_erArZz.cjs"),$=require("./utils-byXsEz1u.cjs"),p=require("./input-wrapper-EoSAbU-U.cjs");require("./helptext-EPTR9AIl.cjs");require("./alert-BXbmjri0.cjs");var I=Object.defineProperty,P=Object.getOwnPropertyDescriptor,e=(r,s,i,n)=>{for(var o=n>1?void 0:n?P(s,i):s,l=r.length-1,a;l>=0;l--)(a=r[l])&&(o=(n?a(s,i,o):a(o))||o);return n&&o&&I(s,i,o),o};const W={fromAttribute(r){return r==null?!1:r===""||r==="true"||r===!0?!0:r==="false"||r===!1?!1:!!r},toAttribute(r){return r?"true":"false"}};exports.PktInputWrapper=class extends t.PktElement{constructor(){super(),this.defaultSlot=u.e(),this.helptextSlot=u.e(),this.forId=$.uuidish(),this.label="",this.helptext=null,this.helptextDropdown=null,this.helptextDropdownButton=null,this.counter=p.specs.props.counter.default,this.counterCurrent=0,this.counterMaxLength=0,this.counterError=null,this.counterPosition="bottom",this.optionalTag=p.specs.props.optionalTag.default,this.optionalText=p.specs.props.optionalText.default,this.requiredTag=p.specs.props.requiredTag.default,this.requiredText=p.specs.props.requiredText.default,this.tagText=null,this.hasError=p.specs.props.hasError.default,this.errorMessage="",this.disabled=p.specs.props.disabled.default,this.inline=p.specs.props.inline.default,this.ariaDescribedby=void 0,this.hasFieldset=p.specs.props.hasFieldset.default,this.role="group",this.useWrapper=p.specs.props.useWrapper.default,this.slotController=new g.PktSlotController(this,this.defaultSlot,this.helptextSlot)}updated(s){super.updated(s)}render(){const s={"pkt-inputwrapper":!0,"pkt-inputwrapper--error":this.hasError,"pkt-inputwrapper--disabled":this.disabled,"pkt-inputwrapper--inline":this.inline},i="pkt-tag pkt-tag--small pkt-tag--thin-text",n=this.ariaDescribedby?this.ariaDescribedby:this.helptext?`${this.forId}-helptext`:t.E,o=()=>t.x`
1
+ "use strict";const t=require("./element-CJ_QKaki.cjs"),g=require("./pkt-slot-controller-BzddBp7z.cjs"),u=require("./ref-BFa5Utho.cjs"),k=require("./if-defined-Bc9-_I01.cjs"),x=require("./icon-BGuizDwk.cjs"),y=require("./class-map-C_erArZz.cjs"),$=require("./utils-byXsEz1u.cjs"),p=require("./input-wrapper-EoSAbU-U.cjs");require("./helptext-EPTR9AIl.cjs");require("./alert-CCjoJo11.cjs");var I=Object.defineProperty,P=Object.getOwnPropertyDescriptor,e=(r,s,i,n)=>{for(var o=n>1?void 0:n?P(s,i):s,l=r.length-1,a;l>=0;l--)(a=r[l])&&(o=(n?a(s,i,o):a(o))||o);return n&&o&&I(s,i,o),o};const W={fromAttribute(r){return r==null?!1:r===""||r==="true"||r===!0?!0:r==="false"||r===!1?!1:!!r},toAttribute(r){return r?"true":"false"}};exports.PktInputWrapper=class extends t.PktElement{constructor(){super(),this.defaultSlot=u.e(),this.helptextSlot=u.e(),this.forId=$.uuidish(),this.label="",this.helptext=null,this.helptextDropdown=null,this.helptextDropdownButton=null,this.counter=p.specs.props.counter.default,this.counterCurrent=0,this.counterMaxLength=0,this.counterError=null,this.counterPosition="bottom",this.optionalTag=p.specs.props.optionalTag.default,this.optionalText=p.specs.props.optionalText.default,this.requiredTag=p.specs.props.requiredTag.default,this.requiredText=p.specs.props.requiredText.default,this.tagText=null,this.hasError=p.specs.props.hasError.default,this.errorMessage="",this.disabled=p.specs.props.disabled.default,this.inline=p.specs.props.inline.default,this.ariaDescribedby=void 0,this.hasFieldset=p.specs.props.hasFieldset.default,this.role="group",this.useWrapper=p.specs.props.useWrapper.default,this.slotController=new g.PktSlotController(this,this.defaultSlot,this.helptextSlot)}updated(s){super.updated(s)}render(){const s={"pkt-inputwrapper":!0,"pkt-inputwrapper--error":this.hasError,"pkt-inputwrapper--disabled":this.disabled,"pkt-inputwrapper--inline":this.inline},i="pkt-tag pkt-tag--small pkt-tag--thin-text",n=this.ariaDescribedby?this.ariaDescribedby:this.helptext?`${this.forId}-helptext`:t.E,o=()=>t.x`
2
2
  ${this.tagText?t.x`<span class=${i+" pkt-tag--gray"}>${this.tagText}</span>`:t.E}
3
3
  ${this.optionalTag?t.x`<span class=${i+" pkt-tag--blue-light"}>${this.optionalText}</span>`:t.E}
4
4
  ${this.requiredTag?t.x`<span class=${i+" pkt-tag--beige"}>${this.requiredText}</span>`:t.E}
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./alert-BXbmjri0.cjs"),t=e.PktAlert;Object.defineProperty(exports,"PktAlert",{enumerable:!0,get:()=>e.PktAlert});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./alert-CCjoJo11.cjs"),t=e.PktAlert;Object.defineProperty(exports,"PktAlert",{enumerable:!0,get:()=>e.PktAlert});exports.default=t;
package/dist/pkt-alert.js CHANGED
@@ -1,4 +1,4 @@
1
- import { P as t } from "./alert-BD1H1Rxn.js";
1
+ import { P as t } from "./alert-CPY1IhxY.js";
2
2
  const e = t;
3
3
  export {
4
4
  t as PktAlert,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./button-1jYzMALk.cjs"),e=t.PktButton;Object.defineProperty(exports,"PktButton",{enumerable:!0,get:()=>t.PktButton});exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./button-abD9URn0.cjs"),e=t.PktButton;Object.defineProperty(exports,"PktButton",{enumerable:!0,get:()=>t.PktButton});exports.default=e;
@@ -1,4 +1,4 @@
1
- import { P as t } from "./button-lDOnZON6.js";
1
+ import { P as t } from "./button-D99MF5nV.js";
2
2
  const a = t;
3
3
  export {
4
4
  t as PktButton,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./combobox-CLpXQ4Ch.cjs"),o=e.PktCombobox;Object.defineProperty(exports,"PktCombobox",{enumerable:!0,get:()=>e.PktCombobox});exports.default=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./combobox-DYYCdlex.cjs"),o=e.PktCombobox;Object.defineProperty(exports,"PktCombobox",{enumerable:!0,get:()=>e.PktCombobox});exports.default=o;
@@ -1,4 +1,4 @@
1
- import { P as o } from "./combobox-QVZxhNxy.js";
1
+ import { P as o } from "./combobox-D-VZRCHk.js";
2
2
  const b = o;
3
3
  export {
4
4
  o as PktCombobox,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./consent-Cgc6nuiP.cjs"),t=e.PktConsent;Object.defineProperty(exports,"PktConsent",{enumerable:!0,get:()=>e.PktConsent});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./consent-B1N02CuT.cjs"),t=e.PktConsent;Object.defineProperty(exports,"PktConsent",{enumerable:!0,get:()=>e.PktConsent});exports.default=t;
@@ -1,4 +1,4 @@
1
- import { P as t } from "./consent-CYFXjOXF.js";
1
+ import { P as t } from "./consent-BSNqH1LX.js";
2
2
  const o = t;
3
3
  export {
4
4
  t as PktConsent,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./datepicker-uc2MWqo0.cjs"),t=e.PktDatepicker;Object.defineProperty(exports,"PktDatepicker",{enumerable:!0,get:()=>e.PktDatepicker});Object.defineProperty(exports,"PktDatepickerMultiple",{enumerable:!0,get:()=>e.PktDatepickerMultiple});Object.defineProperty(exports,"PktDatepickerRange",{enumerable:!0,get:()=>e.PktDatepickerRange});Object.defineProperty(exports,"PktDatepickerSingle",{enumerable:!0,get:()=>e.PktDatepickerSingle});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./datepicker-CnCOXI2x.cjs"),t=e.PktDatepicker;Object.defineProperty(exports,"PktDatepicker",{enumerable:!0,get:()=>e.PktDatepicker});Object.defineProperty(exports,"PktDatepickerMultiple",{enumerable:!0,get:()=>e.PktDatepickerMultiple});Object.defineProperty(exports,"PktDatepickerRange",{enumerable:!0,get:()=>e.PktDatepickerRange});Object.defineProperty(exports,"PktDatepickerSingle",{enumerable:!0,get:()=>e.PktDatepickerSingle});exports.default=t;
@@ -1,5 +1,5 @@
1
- import { a as e } from "./datepicker-BqH2FC8k.js";
2
- import { d as p, c as i, b as c } from "./datepicker-BqH2FC8k.js";
1
+ import { a as e } from "./datepicker-DsqM01iU.js";
2
+ import { d as p, c as i, b as c } from "./datepicker-DsqM01iU.js";
3
3
  const a = e;
4
4
  export {
5
5
  e as PktDatepicker,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./alert-BXbmjri0.cjs"),l=require("./accordionitem-DCZrHVNR.cjs"),m=require("./backlink-BzEvli8m.cjs"),g=require("./button-1jYzMALk.cjs"),P=require("./calendar-Dz1Cnzx5.cjs"),h=require("./card-CIJD8Ezs.cjs"),f=require("./combobox-CLpXQ4Ch.cjs"),y=require("./consent-Cgc6nuiP.cjs"),O=require("./checkbox-BP5zOlPy.cjs"),t=require("./element-CJ_QKaki.cjs"),j=require("./pkt-slot-controller-BzddBp7z.cjs"),s=require("./ref-BFa5Utho.cjs"),q=require("./class-map-C_erArZz.cjs"),k=require("./datepicker-uc2MWqo0.cjs"),x=require("./helptext-EPTR9AIl.cjs"),C=require("./heading--JKFppLS.cjs"),v=require("./icon-BGuizDwk.cjs"),S=require("./input-wrapper-CmNmnpWV.cjs"),T=require("./link-Da3pZ_CW.cjs"),$=require("./linkcard-BM23gzhS.cjs"),L=require("./loader-Bo8RCbCJ.cjs"),_=require("./messagebox-C76IcXTl.cjs"),I=require("./modal-Cdz9JcCX.cjs"),A=require("./progressbar-8gzOtJyh.cjs"),p=require("./radiobutton-BuKXgQm_.cjs"),B=require("./tag-BkuJjOy7.cjs"),d=require("./tabitem-D5zyipN1.cjs"),D=require("./textarea-Bfur28Bd.cjs"),M=require("./textinput-D2uHsUDp.cjs"),R=require("./select-BG4_G4yb.cjs");var H=Object.defineProperty,w=Object.getOwnPropertyDescriptor,o=(a,e,r,i)=>{for(var n=i>1?void 0:i?w(e,r):e,u=a.length-1,c;u>=0;u--)(c=a[u])&&(n=(i?c(e,r,n):c(n))||n);return i&&n&&H(e,r,n),n};exports.PktComponent=class extends t.PktElement{constructor(){super(),this.string="",this.strings=[],this.darkmode=!1,this._list=[],this.defaultSlot=s.e(),this.namedSlot=s.e(),this.slotController=new j.PktSlotController(this,this.defaultSlot,this.namedSlot)}connectedCallback(){this.strings.length&&this.strings.forEach(e=>{this._list.push(e.toUpperCase())}),super.connectedCallback()}render(){const e={"pkt-component":!0,"pkt-component--has-list":this.strings.length>0,"pkt-darkmode":this.darkmode};return t.x`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./alert-CCjoJo11.cjs"),l=require("./accordionitem-DCZrHVNR.cjs"),m=require("./backlink-BzEvli8m.cjs"),g=require("./button-abD9URn0.cjs"),P=require("./calendar-Dz1Cnzx5.cjs"),h=require("./card-CIJD8Ezs.cjs"),f=require("./combobox-DYYCdlex.cjs"),y=require("./consent-B1N02CuT.cjs"),O=require("./checkbox-BP5zOlPy.cjs"),t=require("./element-CJ_QKaki.cjs"),j=require("./pkt-slot-controller-BzddBp7z.cjs"),s=require("./ref-BFa5Utho.cjs"),q=require("./class-map-C_erArZz.cjs"),k=require("./datepicker-CnCOXI2x.cjs"),x=require("./helptext-EPTR9AIl.cjs"),C=require("./heading--JKFppLS.cjs"),v=require("./icon-BGuizDwk.cjs"),S=require("./input-wrapper-WEGSbIA6.cjs"),T=require("./link-Da3pZ_CW.cjs"),$=require("./linkcard-BM23gzhS.cjs"),L=require("./loader-Bo8RCbCJ.cjs"),_=require("./messagebox-C76IcXTl.cjs"),I=require("./modal-Cdz9JcCX.cjs"),A=require("./progressbar-8gzOtJyh.cjs"),p=require("./radiobutton-BuKXgQm_.cjs"),B=require("./tag-BkuJjOy7.cjs"),d=require("./tabitem-D5zyipN1.cjs"),D=require("./textarea-CcIQXCmC.cjs"),M=require("./textinput-Dn704gQw.cjs"),R=require("./select-BSnylWof.cjs");var H=Object.defineProperty,w=Object.getOwnPropertyDescriptor,o=(a,e,r,i)=>{for(var n=i>1?void 0:i?w(e,r):e,u=a.length-1,c;u>=0;u--)(c=a[u])&&(n=(i?c(e,r,n):c(n))||n);return i&&n&&H(e,r,n),n};exports.PktComponent=class extends t.PktElement{constructor(){super(),this.string="",this.strings=[],this.darkmode=!1,this._list=[],this.defaultSlot=s.e(),this.namedSlot=s.e(),this.slotController=new j.PktSlotController(this,this.defaultSlot,this.namedSlot)}connectedCallback(){this.strings.length&&this.strings.forEach(e=>{this._list.push(e.toUpperCase())}),super.connectedCallback()}render(){const e={"pkt-component":!0,"pkt-component--has-list":this.strings.length>0,"pkt-darkmode":this.darkmode};return t.x`
2
2
  <div class="${q.e(e)}">
3
3
  <h1 class="pkt-txt-28">${this.string}</h1>
4
4
 
package/dist/pkt-index.js CHANGED
@@ -1,22 +1,22 @@
1
- import { P as T } from "./alert-BD1H1Rxn.js";
1
+ import { P as T } from "./alert-CPY1IhxY.js";
2
2
  import { P as I, a as w } from "./accordionitem-C_URrDjP.js";
3
3
  import { P as D } from "./backlink-CI_jMGzZ.js";
4
- import { P as O } from "./button-lDOnZON6.js";
4
+ import { P as O } from "./button-D99MF5nV.js";
5
5
  import { c as f } from "./calendar-Bz27nuTP.js";
6
6
  import { P as j } from "./calendar-Bz27nuTP.js";
7
7
  import { P as G } from "./card-u_TMZLDj.js";
8
- import { P as K } from "./combobox-QVZxhNxy.js";
9
- import { P as U } from "./consent-CYFXjOXF.js";
8
+ import { P as K } from "./combobox-D-VZRCHk.js";
9
+ import { P as U } from "./consent-BSNqH1LX.js";
10
10
  import { P as q } from "./checkbox-CfXOh6Lw.js";
11
11
  import { P as d, t as h, x as P, n, a as c } from "./element-CRDRygXu.js";
12
12
  import { P as x } from "./pkt-slot-controller-BPGj-LC5.js";
13
13
  import { e as m, n as k } from "./ref-Xa5dbh--.js";
14
14
  import { e as u } from "./class-map-wy7PUk0P.js";
15
- import { P as F, a as J } from "./datepicker-BqH2FC8k.js";
15
+ import { P as F, a as J } from "./datepicker-DsqM01iU.js";
16
16
  import { P as V } from "./helptext-Cs3QHeEy.js";
17
17
  import { P as Y } from "./heading-Cs5yGnJg.js";
18
18
  import { P as tt } from "./icon-1dy7UZcu.js";
19
- import { P as rt } from "./input-wrapper-KGnsd9qY.js";
19
+ import { P as rt } from "./input-wrapper-CnYj-xNE.js";
20
20
  import { P as st } from "./link-DzZCw8j2.js";
21
21
  import { P as nt } from "./linkcard-RIK5xqbd.js";
22
22
  import { P as pt } from "./loader-BVvBzaPI.js";
@@ -26,9 +26,9 @@ import { P as dt } from "./progressbar-kxcBEspG.js";
26
26
  import { P as ct, P as xt } from "./radiobutton-C_MzK8dE.js";
27
27
  import { P as gt } from "./tag-BpCdJuei.js";
28
28
  import { a as bt, P as St } from "./tabitem-NV2fzs_-.js";
29
- import { P as $t } from "./textarea-CaA50rm5.js";
30
- import { P as _t } from "./textinput-C6y83XoU.js";
31
- import { P as Tt } from "./select-BjvRKbG6.js";
29
+ import { P as $t } from "./textarea-BJGCHy37.js";
30
+ import { P as _t } from "./textinput-B3Q13J8H.js";
31
+ import { P as Tt } from "./select-CtgQkH86.js";
32
32
  var g = Object.defineProperty, v = Object.getOwnPropertyDescriptor, s = (t, e, i, a) => {
33
33
  for (var r = a > 1 ? void 0 : a ? v(e, i) : e, p = t.length - 1, l; p >= 0; p--)
34
34
  (l = t[p]) && (r = (a ? l(e, i, r) : l(r)) || r);
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./input-wrapper-CmNmnpWV.cjs"),t=e.PktInputWrapper;Object.defineProperty(exports,"PktInputWrapper",{enumerable:!0,get:()=>e.PktInputWrapper});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./input-wrapper-WEGSbIA6.cjs"),t=e.PktInputWrapper;Object.defineProperty(exports,"PktInputWrapper",{enumerable:!0,get:()=>e.PktInputWrapper});exports.default=t;
@@ -1,4 +1,4 @@
1
- import { P as p } from "./input-wrapper-KGnsd9qY.js";
1
+ import { P as p } from "./input-wrapper-CnYj-xNE.js";
2
2
  const r = p;
3
3
  export {
4
4
  p as PktInputWrapper,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./select-BG4_G4yb.cjs"),t=e.PktSelect;Object.defineProperty(exports,"PktSelect",{enumerable:!0,get:()=>e.PktSelect});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./select-BSnylWof.cjs"),t=e.PktSelect;Object.defineProperty(exports,"PktSelect",{enumerable:!0,get:()=>e.PktSelect});exports.default=t;
@@ -1,4 +1,4 @@
1
- import { P as t } from "./select-BjvRKbG6.js";
1
+ import { P as t } from "./select-CtgQkH86.js";
2
2
  const a = t;
3
3
  export {
4
4
  t as PktSelect,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textarea-Bfur28Bd.cjs"),t=e.PktTextarea;Object.defineProperty(exports,"PktTextarea",{enumerable:!0,get:()=>e.PktTextarea});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textarea-CcIQXCmC.cjs"),t=e.PktTextarea;Object.defineProperty(exports,"PktTextarea",{enumerable:!0,get:()=>e.PktTextarea});exports.default=t;
@@ -1,4 +1,4 @@
1
- import { P as a } from "./textarea-CaA50rm5.js";
1
+ import { P as a } from "./textarea-BJGCHy37.js";
2
2
  const e = a;
3
3
  export {
4
4
  a as PktTextarea,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textinput-D2uHsUDp.cjs"),t=e.PktTextinput;Object.defineProperty(exports,"PktTextinput",{enumerable:!0,get:()=>e.PktTextinput});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textinput-Dn704gQw.cjs"),t=e.PktTextinput;Object.defineProperty(exports,"PktTextinput",{enumerable:!0,get:()=>e.PktTextinput});exports.default=t;
@@ -1,4 +1,4 @@
1
- import { P as t } from "./textinput-C6y83XoU.js";
1
+ import { P as t } from "./textinput-B3Q13J8H.js";
2
2
  const p = t;
3
3
  export {
4
4
  t as PktTextinput,
@@ -1,4 +1,4 @@
1
- "use strict";const h=require("./element-CJ_QKaki.cjs"),u=require("./state-DSjcvzDN.cjs"),r=require("./ref-BFa5Utho.cjs"),o=require("./if-defined-Bc9-_I01.cjs"),d=require("./input-element-BmXkhljw.cjs"),c=require("./pkt-options-controller-CiuBG6Lt.cjs"),v=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-CmNmnpWV.cjs");var f=Object.defineProperty,_=Object.getOwnPropertyDescriptor,a=(p,t,e,s)=>{for(var i=s>1?void 0:s?_(t,e):t,l=p.length-1,n;l>=0;l--)(n=p[l])&&(i=(s?n(t,e,i):n(i))||i);return s&&i&&f(t,e,i),i};exports.PktSelect=class extends d.PktInputElement{constructor(){super(),this.inputRef=r.e(),this.helptextSlot=r.e(),this._optionsProp=[],this.value="",this._options=[],this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new c.PktOptionsSlotController(this),this.slotController=new v.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}get options(){return this._options.map(t=>({...t,selected:t.value===this.value}))}set options(t){this._optionsProp=t,this.requestUpdate("_optionsProp",this._options)}connectedCallback(){super.connectedCallback();const t=this._optionsProp.length>0,e=this.optionsController.nodes.length&&this.optionsController.nodes.length>0;!t&&e?this.optionsController.nodes.forEach(s=>{const i={value:s.hasAttribute("value")?s.getAttribute("value")??"":s.textContent??"",label:s.textContent||s.getAttribute("value")||"",disabled:s.hasAttribute("disabled"),selected:s.hasAttribute("selected"),hidden:s.hasAttribute("data-hidden")};s.getAttribute("selected")&&!this.value&&(this.value=i.value),this._options.push(i)}):(this._options=this._optionsProp,this._options.forEach(s=>{s.selected&&!this.value&&(this.value=s.value)}))}add(t,e){const s={value:t.value||t.text,label:t.text||t.value,selected:t.selected,disabled:t.disabled};if(e===void 0)this._options.push(s);else if(typeof e=="number")this._options.splice(e,0,s);else{const i=e.value||e.text,l=this._options.findIndex(n=>n.value===i);l>=0?this._options.splice(l,0,s):this._options.push(s)}t.selected&&(this.value=t.value||t.text,this.selectedIndex=this._options.findIndex(i=>i.value===this.value)),this.requestUpdate()}remove(t){var e;typeof t=="number"&&(this.selectedIndex===t&&(this.value=((e=this._options[0])==null?void 0:e.value)||""),this._options.splice(t,1),this.requestUpdate())}item(t){var e;return(e=this.inputRef.value)==null?void 0:e.item(t)}namedItem(t){var e;return(e=this.inputRef.value)==null?void 0:e.namedItem(t)}showPicker(){this.inputRef.value&&"showPicker"in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(t,e,s){var i,l;t==="options"&&(this._options=s?JSON.parse(s):[]),t==="value"&&this.value!==e&&(this.selectedIndex=this.touched?this.returnNumberOrNull((i=this.inputRef.value)==null?void 0:i.selectedIndex):this._options.findIndex(n=>n.value===s),this.selectedOptions=(l=this.inputRef.value)==null?void 0:l.selectedOptions,this.valueChanged(s,e)),super.attributeChangedCallback(t,e,s)}update(t){var e,s;super.update(t),t.has("_optionsProp")&&this._optionsProp.length>0&&(this._options=this._optionsProp,this.requestUpdate("_options"),!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),t.has("value")&&this.value!==t.get("value")&&(this.selectedIndex=this.touched?this.returnNumberOrNull((e=this.inputRef.value)==null?void 0:e.selectedIndex):this._options.findIndex(i=>i.value===this.value),this.selectedOptions=(s=this.inputRef.value)==null?void 0:s.selectedOptions,this.valueChanged(this.value,t.get("value"))),t.has("id")&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(t){var e;super.firstUpdated(t),this._optionsProp.length&&(this._options=this._optionsProp),!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0):this.selectedIndex=this._options.findIndex(s=>s.value===this.value),this.selectedOptions=(e=this.inputRef.value)==null?void 0:e.selectedOptions}render(){const t=`pkt-input ${this.fullwidth?"pkt-input--fullwidth":""}`;return h.x`
1
+ "use strict";const h=require("./element-CJ_QKaki.cjs"),u=require("./state-DSjcvzDN.cjs"),r=require("./ref-BFa5Utho.cjs"),o=require("./if-defined-Bc9-_I01.cjs"),d=require("./input-element-BmXkhljw.cjs"),c=require("./pkt-options-controller-CiuBG6Lt.cjs"),v=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-WEGSbIA6.cjs");var f=Object.defineProperty,_=Object.getOwnPropertyDescriptor,a=(p,t,e,s)=>{for(var i=s>1?void 0:s?_(t,e):t,l=p.length-1,n;l>=0;l--)(n=p[l])&&(i=(s?n(t,e,i):n(i))||i);return s&&i&&f(t,e,i),i};exports.PktSelect=class extends d.PktInputElement{constructor(){super(),this.inputRef=r.e(),this.helptextSlot=r.e(),this._optionsProp=[],this.value="",this._options=[],this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new c.PktOptionsSlotController(this),this.slotController=new v.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}get options(){return this._options.map(t=>({...t,selected:t.value===this.value}))}set options(t){this._optionsProp=t,this.requestUpdate("_optionsProp",this._options)}connectedCallback(){super.connectedCallback();const t=this._optionsProp.length>0,e=this.optionsController.nodes.length&&this.optionsController.nodes.length>0;!t&&e?this.optionsController.nodes.forEach(s=>{const i={value:s.hasAttribute("value")?s.getAttribute("value")??"":s.textContent??"",label:s.textContent||s.getAttribute("value")||"",disabled:s.hasAttribute("disabled"),selected:s.hasAttribute("selected"),hidden:s.hasAttribute("data-hidden")};s.getAttribute("selected")&&!this.value&&(this.value=i.value),this._options.push(i)}):(this._options=this._optionsProp,this._options.forEach(s=>{s.selected&&!this.value&&(this.value=s.value)}))}add(t,e){const s={value:t.value||t.text,label:t.text||t.value,selected:t.selected,disabled:t.disabled};if(e===void 0)this._options.push(s);else if(typeof e=="number")this._options.splice(e,0,s);else{const i=e.value||e.text,l=this._options.findIndex(n=>n.value===i);l>=0?this._options.splice(l,0,s):this._options.push(s)}t.selected&&(this.value=t.value||t.text,this.selectedIndex=this._options.findIndex(i=>i.value===this.value)),this.requestUpdate()}remove(t){var e;typeof t=="number"&&(this.selectedIndex===t&&(this.value=((e=this._options[0])==null?void 0:e.value)||""),this._options.splice(t,1),this.requestUpdate())}item(t){var e;return(e=this.inputRef.value)==null?void 0:e.item(t)}namedItem(t){var e;return(e=this.inputRef.value)==null?void 0:e.namedItem(t)}showPicker(){this.inputRef.value&&"showPicker"in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(t,e,s){var i,l;t==="options"&&(this._options=s?JSON.parse(s):[]),t==="value"&&this.value!==e&&(this.selectedIndex=this.touched?this.returnNumberOrNull((i=this.inputRef.value)==null?void 0:i.selectedIndex):this._options.findIndex(n=>n.value===s),this.selectedOptions=(l=this.inputRef.value)==null?void 0:l.selectedOptions,this.valueChanged(s,e)),super.attributeChangedCallback(t,e,s)}update(t){var e,s;super.update(t),t.has("_optionsProp")&&this._optionsProp.length>0&&(this._options=this._optionsProp,this.requestUpdate("_options"),!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),t.has("value")&&this.value!==t.get("value")&&(this.selectedIndex=this.touched?this.returnNumberOrNull((e=this.inputRef.value)==null?void 0:e.selectedIndex):this._options.findIndex(i=>i.value===this.value),this.selectedOptions=(s=this.inputRef.value)==null?void 0:s.selectedOptions,this.valueChanged(this.value,t.get("value"))),t.has("id")&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(t){var e;super.firstUpdated(t),this._optionsProp.length&&(this._options=this._optionsProp),!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0):this.selectedIndex=this._options.findIndex(s=>s.value===this.value),this.selectedOptions=(e=this.inputRef.value)==null?void 0:e.selectedOptions}render(){const t=`pkt-input ${this.fullwidth?"pkt-input--fullwidth":""}`;return h.x`
2
2
  <pkt-input-wrapper
3
3
  ?counter=${this.counter}
4
4
  ?disabled=${this.disabled}
@@ -5,7 +5,7 @@ import { o as l } from "./if-defined-BWZGb3bh.js";
5
5
  import { P as _ } from "./input-element-B0VPRK_E.js";
6
6
  import { P as x } from "./pkt-options-controller-CZO1nxZ8.js";
7
7
  import { P as b } from "./pkt-slot-controller-BPGj-LC5.js";
8
- import "./input-wrapper-KGnsd9qY.js";
8
+ import "./input-wrapper-CnYj-xNE.js";
9
9
  var $ = Object.defineProperty, m = Object.getOwnPropertyDescriptor, a = (t, e, s, i) => {
10
10
  for (var o = i > 1 ? void 0 : i ? m(e, s) : e, n = t.length - 1, p; n >= 0; n--)
11
11
  (p = t[n]) && (o = (i ? p(e, s, o) : p(o)) || o);
@@ -7,7 +7,7 @@ import { e as T, i as b, t as a } from "./directive-oAbCiebi.js";
7
7
  import { f as y, m as w } from "./directive-helpers-BzAtj9by.js";
8
8
  import { P as C } from "./input-element-B0VPRK_E.js";
9
9
  import { P as E } from "./pkt-slot-controller-BPGj-LC5.js";
10
- import "./input-wrapper-KGnsd9qY.js";
10
+ import "./input-wrapper-CnYj-xNE.js";
11
11
  import "./icon-1dy7UZcu.js";
12
12
  /**
13
13
  * @license
@@ -1,4 +1,4 @@
1
- "use strict";const s=require("./element-CJ_QKaki.cjs"),p=require("./if-defined-Bc9-_I01.cjs"),c=require("./state-DSjcvzDN.cjs"),l=require("./ref-BFa5Utho.cjs"),$=require("./class-map-C_erArZz.cjs"),a=require("./directive-C7oCP5Bh.cjs"),d=require("./directive-helpers-4oOjKnGY.cjs"),x=require("./input-element-BmXkhljw.cjs"),T=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-CmNmnpWV.cjs");require("./icon-BGuizDwk.cjs");/**
1
+ "use strict";const s=require("./element-CJ_QKaki.cjs"),p=require("./if-defined-Bc9-_I01.cjs"),c=require("./state-DSjcvzDN.cjs"),l=require("./ref-BFa5Utho.cjs"),$=require("./class-map-C_erArZz.cjs"),a=require("./directive-C7oCP5Bh.cjs"),d=require("./directive-helpers-4oOjKnGY.cjs"),x=require("./input-element-BmXkhljw.cjs"),T=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-WEGSbIA6.cjs");require("./icon-BGuizDwk.cjs");/**
2
2
  * @license
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -5,7 +5,7 @@ import { e as d, n as m } from "./ref-Xa5dbh--.js";
5
5
  import { e as g } from "./class-map-wy7PUk0P.js";
6
6
  import { P as x } from "./input-element-B0VPRK_E.js";
7
7
  import { P as v } from "./pkt-slot-controller-BPGj-LC5.js";
8
- import "./input-wrapper-KGnsd9qY.js";
8
+ import "./input-wrapper-CnYj-xNE.js";
9
9
  import "./icon-1dy7UZcu.js";
10
10
  var y = Object.defineProperty, b = Object.getOwnPropertyDescriptor, o = (i, e, r, t) => {
11
11
  for (var n = t > 1 ? void 0 : t ? b(e, r) : e, l = i.length - 1, c; l >= 0; l--)
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("./element-CJ_QKaki.cjs"),a=require("./if-defined-Bc9-_I01.cjs"),l=require("./state-DSjcvzDN.cjs"),h=require("./ref-BFa5Utho.cjs"),c=require("./class-map-C_erArZz.cjs"),d=require("./input-element-BmXkhljw.cjs"),x=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-CmNmnpWV.cjs");require("./icon-BGuizDwk.cjs");var $=Object.defineProperty,f=Object.getOwnPropertyDescriptor,r=(u,i,s,n)=>{for(var e=n>1?void 0:n?f(i,s):i,o=u.length-1,p;o>=0;o--)(p=u[o])&&(e=(n?p(i,s,e):p(e))||e);return n&&e&&$(i,s,e),e};exports.PktTextinput=class extends d.PktInputElement{constructor(){super(),this.inputRef=h.e(),this.helptextSlot=h.e(),this.value="",this.type="text",this.size=null,this.autocomplete=null,this.iconNameRight=null,this.prefix=null,this.suffix=null,this.omitSearchIcon=!1,this.counterCurrent=0,this.slotController=new x.PktSlotController(this,this.helptextSlot)}attributeChangedCallback(i,s,n){i==="value"&&this.value!==s&&(this.counterCurrent=n?n.length:0,this.valueChanged(n,s)),super.attributeChangedCallback(i,s,n)}updated(i){var s;super.updated(i),i.has("value")&&(this.counterCurrent=((s=this.value)==null?void 0:s.length)||0,this.valueChanged(this.value,i.get("value"))),i.has("id")&&!this.name&&this.id&&(this.name=this.id)}render(){const i=this.type==="search"&&!this.iconNameRight&&!this.omitSearchIcon,s=c.e({"pkt-input":!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":this.counter&&this.counterMaxLength&&this.value.length&&this.value.length>this.counterMaxLength}),n=this.ariaLabelledby||`${this.id}-input-label`;return t.x`
1
+ "use strict";const t=require("./element-CJ_QKaki.cjs"),a=require("./if-defined-Bc9-_I01.cjs"),l=require("./state-DSjcvzDN.cjs"),h=require("./ref-BFa5Utho.cjs"),c=require("./class-map-C_erArZz.cjs"),d=require("./input-element-BmXkhljw.cjs"),x=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-WEGSbIA6.cjs");require("./icon-BGuizDwk.cjs");var $=Object.defineProperty,f=Object.getOwnPropertyDescriptor,r=(u,i,s,n)=>{for(var e=n>1?void 0:n?f(i,s):i,o=u.length-1,p;o>=0;o--)(p=u[o])&&(e=(n?p(i,s,e):p(e))||e);return n&&e&&$(i,s,e),e};exports.PktTextinput=class extends d.PktInputElement{constructor(){super(),this.inputRef=h.e(),this.helptextSlot=h.e(),this.value="",this.type="text",this.size=null,this.autocomplete=null,this.iconNameRight=null,this.prefix=null,this.suffix=null,this.omitSearchIcon=!1,this.counterCurrent=0,this.slotController=new x.PktSlotController(this,this.helptextSlot)}attributeChangedCallback(i,s,n){i==="value"&&this.value!==s&&(this.counterCurrent=n?n.length:0,this.valueChanged(n,s)),super.attributeChangedCallback(i,s,n)}updated(i){var s;super.updated(i),i.has("value")&&(this.counterCurrent=((s=this.value)==null?void 0:s.length)||0,this.valueChanged(this.value,i.get("value"))),i.has("id")&&!this.name&&this.id&&(this.name=this.id)}render(){const i=this.type==="search"&&!this.iconNameRight&&!this.omitSearchIcon,s=c.e({"pkt-input":!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":this.counter&&this.counterMaxLength&&this.value.length&&this.value.length>this.counterMaxLength}),n=this.ariaLabelledby||`${this.id}-input-label`;return t.x`
2
2
  <pkt-input-wrapper
3
3
  label="${this.label}"
4
4
  ?counter=${this.counter}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-elements",
3
- "version": "13.19.2",
3
+ "version": "13.20.0",
4
4
  "description": "Komponentbiblioteket til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -79,5 +79,5 @@
79
79
  "url": "https://github.com/oslokommune/punkt/issues"
80
80
  },
81
81
  "license": "MIT",
82
- "gitHead": "5288eb3b3820c776ffbc2e9dc264664fa4d465ea"
82
+ "gitHead": "fa8d8103ac24cb2da42e47d09cf04c73f765cfd0"
83
83
  }
@@ -18,6 +18,8 @@ export interface ButtonTestConfig extends BaseTestConfig {
18
18
  isLoading?: boolean
19
19
  iconName?: string
20
20
  iconNameSecond?: string
21
+ iconPath?: string
22
+ secondIconPath?: string
21
23
  iconPosition?: string
22
24
  mode?: string
23
25
  form?: string
@@ -225,6 +227,78 @@ describe('PktButton', () => {
225
227
  expect(icons[0]?.getAttribute('name')).toBe('home')
226
228
  expect(icons[1]?.getAttribute('name')).toBe('star')
227
229
  })
230
+
231
+ test('handles iconPath property correctly', async () => {
232
+ const customPath = 'https://custom-cdn.example.com/icons/'
233
+ const { button } = await createButtonTest({
234
+ variant: 'icon-left',
235
+ iconName: 'user',
236
+ iconPath: customPath,
237
+ content: 'Test Button',
238
+ })
239
+ await button.updateComplete
240
+
241
+ expect(button.iconPath).toBe(customPath)
242
+
243
+ const icon = button.querySelector('pkt-icon:not(.pkt-btn__spinner)')
244
+ expect(icon?.getAttribute('path')).toBe(customPath)
245
+ })
246
+
247
+ test('does not set path attribute when iconPath is not provided', async () => {
248
+ const { button } = await createButtonTest({
249
+ variant: 'icon-left',
250
+ iconName: 'user',
251
+ content: 'Test Button',
252
+ })
253
+ await button.updateComplete
254
+
255
+ expect(button.iconPath).toBeUndefined()
256
+
257
+ const icon = button.querySelector('pkt-icon:not(.pkt-btn__spinner)')
258
+ expect(icon?.hasAttribute('path')).toBe(false)
259
+ })
260
+
261
+ test('handles secondIconPath property correctly', async () => {
262
+ const customPath = 'https://custom-cdn.example.com/icons/'
263
+ const { button } = await createButtonTest({
264
+ variant: 'icons-right-and-left',
265
+ iconName: 'home',
266
+ secondIconPath: customPath,
267
+ content: 'Test Button',
268
+ })
269
+
270
+ button.secondIconName = 'star'
271
+ await button.updateComplete
272
+
273
+ expect(button.secondIconPath).toBe(customPath)
274
+
275
+ const icons = button.querySelectorAll('pkt-icon:not(.pkt-btn__spinner)')
276
+ expect(icons).toHaveLength(2)
277
+ expect(icons[1]?.getAttribute('path')).toBe(customPath)
278
+ })
279
+
280
+ test('handles both iconPath and secondIconPath independently', async () => {
281
+ const iconPath = 'https://custom-cdn.example.com/icons/'
282
+ const secondIconPath = 'https://another-cdn.example.com/icons/'
283
+ const { button } = await createButtonTest({
284
+ variant: 'icons-right-and-left',
285
+ iconName: 'home',
286
+ iconPath: iconPath,
287
+ secondIconPath: secondIconPath,
288
+ content: 'Test Button',
289
+ })
290
+
291
+ button.secondIconName = 'star'
292
+ await button.updateComplete
293
+
294
+ expect(button.iconPath).toBe(iconPath)
295
+ expect(button.secondIconPath).toBe(secondIconPath)
296
+
297
+ const icons = button.querySelectorAll('pkt-icon:not(.pkt-btn__spinner)')
298
+ expect(icons).toHaveLength(2)
299
+ expect(icons[0]?.getAttribute('path')).toBe(iconPath)
300
+ expect(icons[1]?.getAttribute('path')).toBe(secondIconPath)
301
+ })
228
302
  })
229
303
 
230
304
  describe('Disabled state', () => {
@@ -42,6 +42,8 @@ export type TPktButtonType = 'button' | 'submit' | 'reset'
42
42
  export interface IPktButton {
43
43
  iconName?: PktIconName
44
44
  secondIconName?: PktIconName
45
+ iconPath?: string
46
+ secondIconPath?: string
45
47
  mode?: TPktButtonMode
46
48
  size?: TPktButtonSize
47
49
  fullWidth?: Booleanish
@@ -68,6 +70,8 @@ export class PktButton extends PktElement<IPktButton> implements IPktButton {
68
70
  // Properties
69
71
  @property({ type: String }) iconName: string = 'user'
70
72
  @property({ type: String }) secondIconName: string = 'user'
73
+ @property({ type: String }) iconPath: string | undefined
74
+ @property({ type: String }) secondIconPath: string | undefined
71
75
  @property({ type: String }) mode?: TPktButtonMode = 'light'
72
76
  @property({ type: String }) size: TPktButtonSize = 'medium'
73
77
  @property({ type: Boolean, attribute: 'full-width' }) fullWidth: Booleanish = false
@@ -168,11 +172,19 @@ export class PktButton extends PktElement<IPktButton> implements IPktButton {
168
172
  ></pkt-icon>`
169
173
  : nothing}
170
174
  ${this.variant !== 'label-only'
171
- ? html`<pkt-icon class="pkt-btn__icon pkt-icon" name=${this.iconName}></pkt-icon>`
175
+ ? html`<pkt-icon
176
+ class="pkt-btn__icon pkt-icon"
177
+ name=${this.iconName}
178
+ path=${ifDefined(this.iconPath)}
179
+ ></pkt-icon>`
172
180
  : nothing}
173
181
  <span class="pkt-btn__text" ${ref(this.defaultSlot)}></span>
174
182
  ${this.variant === 'icons-right-and-left'
175
- ? html`<pkt-icon class="pkt-btn__icon" name=${this.secondIconName}></pkt-icon>`
183
+ ? html`<pkt-icon
184
+ class="pkt-btn__icon"
185
+ name=${this.secondIconName}
186
+ path=${ifDefined(this.secondIconPath)}
187
+ ></pkt-icon>`
176
188
  : nothing}
177
189
  </button>
178
190
  `