@oslokommune/punkt-elements 12.42.10 → 12.42.12
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.
- package/CHANGELOG.md +17 -0
- package/dist/{accordionitem-aQHOrGzf.js → accordionitem-Be6vyX31.js} +8 -7
- package/dist/{accordionitem-C4NQFQHo.cjs → accordionitem-ogt0KNGP.cjs} +5 -5
- package/dist/{alert-sBHt7DSh.js → alert-CZyqekhG.js} +22 -21
- package/dist/alert-DifeONO7.cjs +32 -0
- package/dist/{backlink-BnlrDl9O.js → backlink-C3dfam09.js} +12 -11
- package/dist/backlink-C9qmM67k.cjs +13 -0
- package/dist/{button-B4Oe8Ar0.js → button-OoC1RGJL.js} +8 -7
- package/dist/button-zO41ySZl.cjs +19 -0
- package/dist/calendar-BYYJH15O.cjs +108 -0
- package/dist/{calendar-Df6-FDRW.js → calendar-qEV4u3xs.js} +11 -10
- package/dist/{card-CXhVAeOG.cjs → card-CJue0Esh.cjs} +1 -1
- package/dist/{card-0Kf9L0A_.js → card-p-fcc7Wh.js} +9 -8
- package/dist/{checkbox-B67_cfqW.js → checkbox-BLI7dfpW.js} +4 -4
- package/dist/{checkbox-CiXWukkL.cjs → checkbox-iLywLQwL.cjs} +1 -1
- package/dist/{class-map-m7ZCZ49w.js → class-map-DO0E7GkW.js} +1 -1
- package/dist/{class-map-DWDPOqjO.cjs → class-map-dph2jLEp.cjs} +1 -1
- package/dist/{combobox-Dq7F5v-u.cjs → combobox-BJOVpwAW.cjs} +1 -1
- package/dist/{combobox-CsFDvh8U.js → combobox-C_Zj-ZxE.js} +11 -11
- package/dist/consent-BkgHuZ37.cjs +11 -0
- package/dist/{consent-B17ZIuwm.js → consent-C0pd0E2Q.js} +6 -5
- package/dist/{datepicker-DOf9XK9v.cjs → datepicker--I3DF-Ci.cjs} +1 -1
- package/dist/{datepicker-Cz6seIz1.js → datepicker-Y6-ORa5u.js} +11 -11
- package/dist/{directive-helpers--4ibN__v.js → directive-helpers-D2BEk_ct.js} +1 -1
- package/dist/{directive-helpers-v9b0v7lu.cjs → directive-helpers-lOXMtxMR.cjs} +2 -2
- package/dist/{element-gAd63VwC.js → element-Cfyyg4nF.js} +8658 -9250
- package/dist/element-DUJa1sRq.cjs +212 -0
- package/dist/heading-BWV1JThP.js +58 -0
- package/dist/heading-C6U6xiqH.cjs +1 -0
- package/dist/helptext-BxHMB-XH.cjs +24 -0
- package/dist/{helptext-BG_b6ytC.js → helptext-C7oP6VRp.js} +19 -18
- package/dist/{icon-CO1TLSs5.js → icon-DPnB79MP.js} +12 -11
- package/dist/{icon-B1_BRNqf.cjs → icon-RJ9Op-BB.cjs} +3 -3
- package/dist/if-defined-BQOEcjlp.cjs +5 -0
- package/dist/{if-defined-Cj-3Kdsr.js → if-defined-I-IZkUY2.js} +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/input-element-B2JauW-Y.cjs +1 -0
- package/dist/{input-element-BEvaQK4g.js → input-element-CaCDNzdI.js} +7 -6
- package/dist/{input-wrapper-CC_R5w7V.js → input-wrapper-BDm0DwAW.js} +14 -13
- package/dist/{input-wrapper-Dk0rKRlz.cjs → input-wrapper-DrJgi10C.cjs} +4 -4
- package/dist/{link-C9X0huxP.js → link-BzKHhT3c.js} +12 -11
- package/dist/link-Dhs4dS0S.cjs +7 -0
- package/dist/{linkcard-Bhk2ttou.js → linkcard-CyepaY-g.js} +14 -13
- package/dist/{linkcard-CaBz6i7A.cjs → linkcard-Czsb01sQ.cjs} +1 -1
- package/dist/{listbox-AjDNhDsQ.cjs → listbox-BIcmMiAK.cjs} +7 -7
- package/dist/{listbox-DCWdrjFp.js → listbox-Br7v_BsA.js} +11 -10
- package/dist/lit-element-DHqqtYbj.cjs +27 -0
- package/dist/lit-element-DcUrSbRH.js +595 -0
- package/dist/loader-5lt2W9RX.cjs +11 -0
- package/dist/{loader-DMp859px.js → loader-Co35Rkbv.js} +16 -15
- package/dist/messagebox-BSUbetVQ.cjs +12 -0
- package/dist/{messagebox-_1f12rDq.js → messagebox-CQXmoqzD.js} +18 -17
- package/dist/modal-5PZ-TDkV.cjs +36 -0
- package/dist/{modal-C3kEgTMj.js → modal-DuubDFPT.js} +27 -26
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +2 -2
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +1 -1
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +1 -1
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +1 -1
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +1 -1
- package/dist/pkt-index.cjs +3 -3
- package/dist/pkt-index.js +63 -62
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +1 -1
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +1 -1
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -2
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +1 -1
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/{progressbar-BSO0KWzv.js → progressbar-B75UwwRZ.js} +14 -13
- package/dist/{progressbar-BrXtjUvh.cjs → progressbar-DF8IG5IY.cjs} +7 -7
- package/dist/{radiobutton-BaIDDCwK.js → radiobutton-CDO-HMP_.js} +5 -5
- package/dist/{radiobutton-x10h-JEh.cjs → radiobutton-DUpADoLc.cjs} +1 -1
- package/dist/{ref-B-w1vCo8.cjs → ref-BMQZJJEo.cjs} +1 -1
- package/dist/{ref-DnSbnXsj.js → ref-DX488m2G.js} +2 -2
- package/dist/{repeat-CxQA3AeF.cjs → repeat-B93vZu9q.cjs} +1 -1
- package/dist/{repeat-lUFq9w5d.js → repeat-Dl4RVQIF.js} +2 -2
- package/dist/select-CE5L--Xw.cjs +48 -0
- package/dist/{select-BlL8T2BX.js → select-q7qkLeW4.js} +20 -20
- package/dist/{state-BxrO4zNJ.js → state-P2J1I2ny.js} +1 -1
- package/dist/{state-D-Recv7U.cjs → state-y-GU-VH8.cjs} +1 -1
- package/dist/{tag-m7OTZaCG.js → tag-OSIRLJc0.js} +21 -20
- package/dist/tag-sEPrma2U.cjs +18 -0
- package/dist/{textarea-Dk8hQMD2.js → textarea-BIvwbRBK.js} +22 -22
- package/dist/{textarea-Dc1sUaxx.cjs → textarea-BuhpS5Jj.cjs} +1 -1
- package/dist/{textinput-6Ip-0aVY.js → textinput-BFbenR3I.js} +8 -8
- package/dist/{textinput-DuLZ26DB.cjs → textinput-BUMlqXQC.cjs} +1 -1
- package/package.json +4 -4
- package/src/components/heading/heading.ts +63 -37
- package/dist/alert-DUWuhtFC.cjs +0 -32
- package/dist/backlink-CcAZfB1d.cjs +0 -13
- package/dist/button-BT-FRGMk.cjs +0 -19
- package/dist/calendar-D4qfcRtv.cjs +0 -108
- package/dist/consent-CILYIgC-.cjs +0 -11
- package/dist/element-90YeMNbV.cjs +0 -238
- package/dist/heading-CGGKEZve.js +0 -59
- package/dist/heading-Cmh5bbTl.cjs +0 -1
- package/dist/helptext-CC3qLmEz.cjs +0 -24
- package/dist/if-defined-C8eotHpL.cjs +0 -5
- package/dist/input-element-CInrWeac.cjs +0 -1
- package/dist/link-qTz-qNVI.cjs +0 -7
- package/dist/loader-BqYcg8Di.cjs +0 -11
- package/dist/messagebox-Do_nAUo3.cjs +0 -12
- package/dist/modal-C1inKvts.cjs +0 -36
- package/dist/select-BkVSXR5K.cjs +0 -48
- package/dist/tag-DrbI0ng3.cjs +0 -18
package/dist/pkt-linkcard.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./linkcard-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./linkcard-Czsb01sQ.cjs"),t=e.PktLinkCard;Object.defineProperty(exports,"PktLinkCard",{enumerable:!0,get:()=>e.PktLinkCard});exports.default=t;
|
package/dist/pkt-linkcard.js
CHANGED
package/dist/pkt-listbox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./listbox-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./listbox-BIcmMiAK.cjs"),t=e.PktListbox;Object.defineProperty(exports,"PktListbox",{enumerable:!0,get:()=>e.PktListbox});exports.default=t;
|
package/dist/pkt-listbox.js
CHANGED
package/dist/pkt-loader.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./loader-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./loader-5lt2W9RX.cjs"),t=e.PktLoader;Object.defineProperty(exports,"PktLoader",{enumerable:!0,get:()=>e.PktLoader});exports.default=t;
|
package/dist/pkt-loader.js
CHANGED
package/dist/pkt-messagebox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./messagebox-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./messagebox-BSUbetVQ.cjs"),t=e.PktMessagebox;Object.defineProperty(exports,"PktMessagebox",{enumerable:!0,get:()=>e.PktMessagebox});exports.default=t;
|
package/dist/pkt-messagebox.js
CHANGED
package/dist/pkt-modal.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./modal-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./modal-5PZ-TDkV.cjs"),t=e.PktModal;Object.defineProperty(exports,"PktModal",{enumerable:!0,get:()=>e.PktModal});exports.default=t;
|
package/dist/pkt-modal.js
CHANGED
package/dist/pkt-progressbar.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./progressbar-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./progressbar-DF8IG5IY.cjs");Object.defineProperty(exports,"PktProgressbar",{enumerable:!0,get:()=>e.PktProgressbar});exports.default=e.PktProgressbar$1;
|
package/dist/pkt-progressbar.js
CHANGED
package/dist/pkt-radiobutton.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./radiobutton-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./radiobutton-DUpADoLc.cjs"),e=t.PktRadioButton;Object.defineProperty(exports,"PktRadioButton",{enumerable:!0,get:()=>t.PktRadioButton});exports.default=e;
|
package/dist/pkt-radiobutton.js
CHANGED
package/dist/pkt-select.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./select-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./select-CE5L--Xw.cjs"),t=e.PktSelect;Object.defineProperty(exports,"PktSelect",{enumerable:!0,get:()=>e.PktSelect});exports.default=t;
|
package/dist/pkt-select.js
CHANGED
package/dist/pkt-tag.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./tag-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./tag-sEPrma2U.cjs"),t=e.PktTag;Object.defineProperty(exports,"PktTag",{enumerable:!0,get:()=>e.PktTag});exports.default=t;
|
package/dist/pkt-tag.js
CHANGED
package/dist/pkt-textarea.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textarea-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textarea-BuhpS5Jj.cjs"),t=e.PktTextarea;Object.defineProperty(exports,"PktTextarea",{enumerable:!0,get:()=>e.PktTextarea});exports.default=t;
|
package/dist/pkt-textarea.js
CHANGED
package/dist/pkt-textinput.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textinput-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textinput-BUMlqXQC.cjs"),t=e.PktTextinput;Object.defineProperty(exports,"PktTextinput",{enumerable:!0,get:()=>e.PktTextinput});exports.default=t;
|
package/dist/pkt-textinput.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { e as n } from "./class-map-
|
|
2
|
-
import { T as g,
|
|
3
|
-
import { r as h } from "./state-
|
|
4
|
-
import {
|
|
1
|
+
import { e as n } from "./class-map-DO0E7GkW.js";
|
|
2
|
+
import { T as g, E as c, x as b, n as u, t as _ } from "./lit-element-DcUrSbRH.js";
|
|
3
|
+
import { r as h } from "./state-P2J1I2ny.js";
|
|
4
|
+
import { P as $ } from "./element-Cfyyg4nF.js";
|
|
5
|
+
import { e as y, n as A } from "./ref-DX488m2G.js";
|
|
5
6
|
import { e as x, i as T, t as k } from "./directive-oAbCiebi.js";
|
|
6
7
|
import { u as d } from "./stringutils-DJjRa8dG.js";
|
|
7
|
-
import "./icon-
|
|
8
|
+
import "./icon-DPnB79MP.js";
|
|
8
9
|
/**
|
|
9
10
|
* @license
|
|
10
11
|
* Copyright 2018 Google LLC
|
|
11
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
13
|
*/
|
|
13
|
-
const
|
|
14
|
+
const f = "important", C = " !" + f, M = x(class extends T {
|
|
14
15
|
constructor(t) {
|
|
15
16
|
var e;
|
|
16
17
|
if (super(t), t.type !== k.ATTRIBUTE || t.name !== "style" || ((e = t.strings) == null ? void 0 : e.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
@@ -30,7 +31,7 @@ const v = "important", C = " !" + v, M = x(class extends T {
|
|
|
30
31
|
if (l != null) {
|
|
31
32
|
this.ft.add(s);
|
|
32
33
|
const o = typeof l == "string" && l.endsWith(C);
|
|
33
|
-
s.includes("-") || o ? a.setProperty(s, o ? l.slice(0, -11) : l, o ?
|
|
34
|
+
s.includes("-") || o ? a.setProperty(s, o ? l.slice(0, -11) : l, o ? f : "") : a[s] = l;
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
return g;
|
|
@@ -41,7 +42,7 @@ var L = Object.defineProperty, S = Object.getOwnPropertyDescriptor, i = (t, e, a
|
|
|
41
42
|
(p = t[o]) && (l = (s ? p(e, a, l) : p(l)) || l);
|
|
42
43
|
return s && l && L(e, a, l), l;
|
|
43
44
|
};
|
|
44
|
-
let r = class extends
|
|
45
|
+
let r = class extends $ {
|
|
45
46
|
constructor() {
|
|
46
47
|
super(), this.ariaLabel = null, this.ariaLabelledby = null, this.ariaValueText = null, this.ariaLive = "polite", this.id = d(), this.role = "progressbar", this.skin = "dark-blue", this.statusPlacement = "following", this.statusType = "none", this.title = "", this.titlePosition = "left", this.valueCurrent = 0, this.valueMax = 100, this.valueMin = 0, this.labelWidth = 0, this.progressbarId = this.id, this.computedAriaLabelledby = null, this.computedAriaValueText = "", this.labelRef = y(), this.progressBarRef = y();
|
|
47
48
|
}
|
|
@@ -58,7 +59,7 @@ let r = class extends _ {
|
|
|
58
59
|
}), p = n({
|
|
59
60
|
"pkt-progressbar__title": !0,
|
|
60
61
|
"pkt-progressbar__title-center": this.titlePosition === "center"
|
|
61
|
-
}),
|
|
62
|
+
}), v = n({
|
|
62
63
|
"pkt-progressbar__status": !0,
|
|
63
64
|
"pkt-progressbar__status--center": this.statusPlacement === "center"
|
|
64
65
|
}), m = n({
|
|
@@ -80,7 +81,7 @@ let r = class extends _ {
|
|
|
80
81
|
<div class=${o}></div>
|
|
81
82
|
</div>
|
|
82
83
|
|
|
83
|
-
${t ? b`<div class=${
|
|
84
|
+
${t ? b`<div class=${v}>
|
|
84
85
|
<span class=${m} ${A(this.labelRef)}>
|
|
85
86
|
${this.statusType === "percentage" ? `${s}%` : l}
|
|
86
87
|
</span>
|
|
@@ -153,10 +154,10 @@ i([
|
|
|
153
154
|
h()
|
|
154
155
|
], r.prototype, "computedAriaValueText", 2);
|
|
155
156
|
r = i([
|
|
156
|
-
|
|
157
|
+
_("pkt-progressbar")
|
|
157
158
|
], r);
|
|
158
|
-
const
|
|
159
|
+
const j = r;
|
|
159
160
|
export {
|
|
160
161
|
r as P,
|
|
161
|
-
|
|
162
|
+
j as a
|
|
162
163
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use strict";const n=require("./class-map-
|
|
1
|
+
"use strict";const n=require("./class-map-dph2jLEp.cjs"),r=require("./lit-element-DHqqtYbj.cjs"),p=require("./state-y-GU-VH8.cjs"),v=require("./element-DUJa1sRq.cjs"),h=require("./ref-BMQZJJEo.cjs"),b=require("./directive-C7oCP5Bh.cjs"),d=require("./stringutils-CkVRq4jP.cjs");require("./icon-RJ9Op-BB.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2018 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const c="important",
|
|
5
|
+
*/const c="important",f=" !"+c,k=b.e(class extends b.i{constructor(l){var t;if(super(l),l.type!==b.t.ATTRIBUTE||l.name!=="style"||((t=l.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(l){return Object.keys(l).reduce((t,e)=>{const s=l[e];return s==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`},"")}update(l,[t]){const{style:e}=l.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const s of this.ft)t[s]==null&&(this.ft.delete(s),s.includes("-")?e.removeProperty(s):e[s]=null);for(const s in t){const i=t[s];if(i!=null){this.ft.add(s);const u=typeof i=="string"&&i.endsWith(f);s.includes("-")||u?e.setProperty(s,u?i.slice(0,-11):i,u?c:""):e[s]=i}}return r.T}});var m=Object.defineProperty,_=Object.getOwnPropertyDescriptor,a=(l,t,e,s)=>{for(var i=s>1?void 0:s?_(t,e):t,u=l.length-1,o;u>=0;u--)(o=l[u])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&m(t,e,i),i};exports.PktProgressbar=class extends v.PktElement{constructor(){super(),this.ariaLabel=null,this.ariaLabelledby=null,this.ariaValueText=null,this.ariaLive="polite",this.id=d.uuidish(),this.role="progressbar",this.skin="dark-blue",this.statusPlacement="following",this.statusType="none",this.title="",this.titlePosition="left",this.valueCurrent=0,this.valueMax=100,this.valueMin=0,this.labelWidth=0,this.progressbarId=this.id,this.computedAriaLabelledby=null,this.computedAriaValueText="",this.labelRef=h.e(),this.progressBarRef=h.e()}firstUpdated(t){super.firstUpdated(t),this.setComputedValues(),this.syncAttributes()}updated(t){super.updated(t),t.has("valueCurrent")&&this.labelRef.value&&(this.labelWidth=this.labelRef.value.getBoundingClientRect().width||0),t.has("id")&&this.id&&(this.progressBarId=this.id),(t.has("statusType")||t.has("id")||t.has("ariaLabelledby"))&&(this.progressbarId=this.id||d.uuidish(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`),(t.has("ariaValueText")||t.has("valueCurrent")||t.has("valueMax"))&&(this.computedAriaValueText=this.statusType==="fraction"&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||""),this.syncAttributes()}render(){const t=this.statusType!=="none",e=this.valueMax-this.valueMin,s=this.valueCurrent/e*100,i=this.statusType==="fraction"?Math.round(s):Math.round((this.valueCurrent-this.valueMin)/(this.valueMax-this.valueMin)*100),u=`${this.valueCurrent} av ${e}`,o=n.e({"pkt-progressbar__bar":!0,[`pkt-progressbar__bar--${this.skin}`]:!!this.skin}),g=n.e({"pkt-progressbar__title":!0,"pkt-progressbar__title-center":this.titlePosition==="center"}),y=n.e({"pkt-progressbar__status":!0,"pkt-progressbar__status--center":this.statusPlacement==="center"}),P=n.e({"pkt-progressbar__status-placement--following":this.statusPlacement==="following","pkt-progressbar__status-placement--center":this.statusPlacement==="center","pkt-progressbar__status-placement--left":this.statusPlacement==="left"});return r.x` <div
|
|
6
6
|
class="pkt-progressbar__container"
|
|
7
7
|
.ref=${this.progressBarRef}
|
|
8
|
-
style=${
|
|
8
|
+
style=${k({"--pkt-progress-label-width":`${this.labelWidth}px`,"--pkt-progress-width":`${i}%`})}
|
|
9
9
|
>
|
|
10
|
-
${this.title?
|
|
10
|
+
${this.title?r.x`<p id=${`${this.progressBarId}-title`} class=${g}>${this.title}</p>`:r.E}
|
|
11
11
|
|
|
12
12
|
<div class="pkt-progressbar__bar-wrapper">
|
|
13
13
|
<div class=${o}></div>
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
|
-
${t?
|
|
16
|
+
${t?r.x`<div class=${y}>
|
|
17
17
|
<span class=${P} ${h.n(this.labelRef)}>
|
|
18
18
|
${this.statusType==="percentage"?`${i}%`:u}
|
|
19
19
|
</span>
|
|
20
|
-
</div>`:
|
|
21
|
-
</div>`}setComputedValues(){this.progressbarId=this.id||d.uuidish(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`,this.computedAriaValueText=this.statusType==="fraction"&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||""}syncAttributes(){this._handleAttribute("aria-live",this.ariaLive),this._handleAttribute("aria-valuenow",this.valueCurrent),this._handleAttribute("aria-valuemin",this.valueMin),this._handleAttribute("aria-valuemax",this.valueMax),this._handleAttribute("aria-valuetext",this.computedAriaValueText),this._handleAttribute("aria-label",this.ariaLabel),this._handleAttribute("role",this.role),this._handleAttribute("aria-atomic","true"),this._handleAttribute("id",this.progressbarId),this.ariaLabel||this._handleAttribute("aria-labelledby",this.computedAriaLabelledby)}_handleAttribute(t,
|
|
20
|
+
</div>`:r.E}
|
|
21
|
+
</div>`}setComputedValues(){this.progressbarId=this.id||d.uuidish(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`,this.computedAriaValueText=this.statusType==="fraction"&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||""}syncAttributes(){this._handleAttribute("aria-live",this.ariaLive),this._handleAttribute("aria-valuenow",this.valueCurrent),this._handleAttribute("aria-valuemin",this.valueMin),this._handleAttribute("aria-valuemax",this.valueMax),this._handleAttribute("aria-valuetext",this.computedAriaValueText),this._handleAttribute("aria-label",this.ariaLabel),this._handleAttribute("role",this.role),this._handleAttribute("aria-atomic","true"),this._handleAttribute("id",this.progressbarId),this.ariaLabel||this._handleAttribute("aria-labelledby",this.computedAriaLabelledby)}_handleAttribute(t,e){e==null||e===""?this.removeAttribute(t):this.setAttribute(t,String(e))}};a([r.n({type:String})],exports.PktProgressbar.prototype,"ariaLabel",2);a([r.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"ariaLabelledby",2);a([r.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"ariaValueText",2);a([r.n({type:String})],exports.PktProgressbar.prototype,"ariaLive",2);a([r.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"id",2);a([r.n({type:String})],exports.PktProgressbar.prototype,"role",2);a([r.n({type:String})],exports.PktProgressbar.prototype,"skin",2);a([r.n({type:String})],exports.PktProgressbar.prototype,"statusPlacement",2);a([r.n({type:String})],exports.PktProgressbar.prototype,"statusType",2);a([r.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"title",2);a([r.n({type:String})],exports.PktProgressbar.prototype,"titlePosition",2);a([r.n({type:Number,reflect:!0})],exports.PktProgressbar.prototype,"valueCurrent",2);a([r.n({type:Number})],exports.PktProgressbar.prototype,"valueMax",2);a([r.n({type:Number})],exports.PktProgressbar.prototype,"valueMin",2);a([p.r()],exports.PktProgressbar.prototype,"labelWidth",2);a([p.r()],exports.PktProgressbar.prototype,"progressbarId",2);a([p.r()],exports.PktProgressbar.prototype,"computedAriaLabelledby",2);a([p.r()],exports.PktProgressbar.prototype,"computedAriaValueText",2);exports.PktProgressbar=a([r.t("pkt-progressbar")],exports.PktProgressbar);const $=exports.PktProgressbar;exports.PktProgressbar$1=$;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { x as n, E as u, n as p,
|
|
2
|
-
import { r as k } from "./state-
|
|
3
|
-
import { P as f } from "./input-element-
|
|
4
|
-
import { e as _, n as b } from "./ref-
|
|
5
|
-
import { e as o } from "./class-map-
|
|
1
|
+
import { x as n, E as u, n as p, t as d } from "./lit-element-DcUrSbRH.js";
|
|
2
|
+
import { r as k } from "./state-P2J1I2ny.js";
|
|
3
|
+
import { P as f } from "./input-element-CaCDNzdI.js";
|
|
4
|
+
import { e as _, n as b } from "./ref-DX488m2G.js";
|
|
5
|
+
import { e as o } from "./class-map-DO0E7GkW.js";
|
|
6
6
|
var $ = Object.defineProperty, v = Object.getOwnPropertyDescriptor, c = (e, i, s, l) => {
|
|
7
7
|
for (var h = l > 1 ? void 0 : l ? v(i, s) : i, r = e.length - 1, a; r >= 0; r--)
|
|
8
8
|
(a = e[r]) && (h = (l ? a(i, s, h) : a(h)) || h);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./element-
|
|
1
|
+
"use strict";const e=require("./lit-element-DHqqtYbj.cjs"),p=require("./state-y-GU-VH8.cjs"),r=require("./input-element-B2JauW-Y.cjs"),o=require("./ref-BMQZJJEo.cjs"),u=require("./class-map-dph2jLEp.cjs");var d=Object.defineProperty,k=Object.getOwnPropertyDescriptor,s=(l,t,n,c)=>{for(var i=c>1?void 0:c?k(t,n):t,h=l.length-1,a;h>=0;h--)(a=l[h])&&(i=(c?a(t,n,i):a(i))||i);return c&&i&&d(t,n,i),i};exports.PktRadioButton=class extends r.PktInputElement{constructor(){super(...arguments),this.inputRef=o.e(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type="radio",this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(t,n,c){t==="defaultChecked"&&(this._checked=this.defaultChecked),t==="checked"&&(this._checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(t,n,c)}render(){const t=u.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),n=u.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),c=u.e({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-sr-only":this.hideLabel}),i=()=>e.x`
|
|
2
2
|
<label class=${c} for=${this.id+"-internal"}>
|
|
3
3
|
${this.label}
|
|
4
4
|
${this.checkHelptext?e.x`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>`:e.E}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const d=require("./element-
|
|
1
|
+
"use strict";const d=require("./lit-element-DHqqtYbj.cjs"),a=require("./directive-helpers-lOXMtxMR.cjs"),l=require("./directive-C7oCP5Bh.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as l } from "./element-
|
|
2
|
-
import { f as $ } from "./directive-helpers
|
|
1
|
+
import { E as l } from "./lit-element-DcUrSbRH.js";
|
|
2
|
+
import { f as $ } from "./directive-helpers-D2BEk_ct.js";
|
|
3
3
|
import { i as f, t as a, e as _ } from "./directive-oAbCiebi.js";
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const m=require("./element-
|
|
1
|
+
"use strict";const m=require("./lit-element-DHqqtYbj.cjs"),x=require("./directive-C7oCP5Bh.cjs"),s=require("./directive-helpers-lOXMtxMR.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as $ } from "./element-
|
|
1
|
+
import { T as $ } from "./lit-element-DcUrSbRH.js";
|
|
2
2
|
import { e as A, i as M, t as b } from "./directive-oAbCiebi.js";
|
|
3
|
-
import { p as j, v as h, r as v, M as x, m as C } from "./directive-helpers
|
|
3
|
+
import { p as j, v as h, r as v, M as x, m as C } from "./directive-helpers-D2BEk_ct.js";
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
* Copyright 2017 Google LLC
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";const r=require("./lit-element-DHqqtYbj.cjs"),p=require("./state-y-GU-VH8.cjs"),h=require("./ref-BMQZJJEo.cjs"),o=require("./if-defined-BQOEcjlp.cjs"),d=require("./input-element-B2JauW-Y.cjs"),c=require("./pkt-options-controller-CiuBG6Lt.cjs"),v=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-DrJgi10C.cjs");var f=Object.defineProperty,b=Object.getOwnPropertyDescriptor,a=(u,t,e,s)=>{for(var i=s>1?void 0:s?b(t,e):t,l=u.length-1,n;l>=0;l--)(n=u[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=h.e(),this.helptextSlot=h.e(),this.options=[],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}connectedCallback(){super.connectedCallback();const t=this.options.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"),hidden:s.hasAttribute("data-hidden")};s.getAttribute("selected")&&!this.value&&(this.value=i.value),this._options.push(i)}):(this._options=this.options,this._options.forEach(s=>{s.selected&&!this.value&&(this.value=s.value)}))}add(t,e){var s,i,l;(s=this.inputRef.value)==null||s.add(t,e),this._options.push({value:t.value||t.text,label:t.text||t.value,selected:t.selected,disabled:t.disabled}),t.selected&&(this.value=t.value||t.text,this.selectedIndex=this.returnNumberOrNull((i=this.inputRef.value)==null?void 0:i.selectedIndex),this.selectedOptions=(l=this.inputRef.value)==null?void 0:l.selectedOptions),this.requestUpdate()}remove(t){var e,s;typeof t=="number"&&(this.selectedIndex===t&&(this.value=((e=this._options[0])==null?void 0:e.value)||""),(s=this.inputRef.value)==null||s.remove(t))}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(){var t;(t=this.inputRef.value)==null||t.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("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.options.length&&(this._options=this.options),!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 r.x`
|
|
2
|
+
<pkt-input-wrapper
|
|
3
|
+
?counter=${this.counter}
|
|
4
|
+
?disabled=${this.disabled}
|
|
5
|
+
?hasError=${this.hasError}
|
|
6
|
+
?hasFieldset=${this.hasFieldset}
|
|
7
|
+
?inline=${this.inline}
|
|
8
|
+
?optionalTag=${this.optionalTag}
|
|
9
|
+
?requiredTag=${this.requiredTag}
|
|
10
|
+
?useWrapper=${this.useWrapper}
|
|
11
|
+
ariaDescribedBy=${o.o(this.ariaDescribedBy)}
|
|
12
|
+
class="pkt-select"
|
|
13
|
+
errorMessage=${o.o(this.errorMessage)}
|
|
14
|
+
forId=${this.id+"-input"}
|
|
15
|
+
helptext=${o.o(this.helptext)}
|
|
16
|
+
helptextDropdown=${o.o(this.helptextDropdown)}
|
|
17
|
+
helptextDropdownButton=${o.o(this.helptextDropdownButton)}
|
|
18
|
+
label=${o.o(this.label)}
|
|
19
|
+
optionalText=${o.o(this.optionalText)}
|
|
20
|
+
requiredText=${o.o(this.requiredText)}
|
|
21
|
+
>
|
|
22
|
+
<select
|
|
23
|
+
class=${t}
|
|
24
|
+
aria-invalid=${this.hasError}
|
|
25
|
+
aria-errormessage=${`${this.id}-error`}
|
|
26
|
+
aria-labelledby=${o.o(this.ariaLabelledby)}
|
|
27
|
+
?disabled=${this.disabled}
|
|
28
|
+
id=${this.id+"-input"}
|
|
29
|
+
name=${(this.name||this.id)+"-input"}
|
|
30
|
+
value=${this.value}
|
|
31
|
+
@change=${e=>{this.touched=!0,this.value=e.target.value,e.stopImmediatePropagation()}}
|
|
32
|
+
@input=${e=>{this.onInput(),e.stopImmediatePropagation()}}
|
|
33
|
+
@focus=${e=>{this.onFocus(),e.stopImmediatePropagation()}}
|
|
34
|
+
@blur=${e=>{this.onBlur(),e.stopImmediatePropagation()}}
|
|
35
|
+
${h.n(this.inputRef)}
|
|
36
|
+
>
|
|
37
|
+
${this._options.length>0&&this._options.map(e=>r.x`<option
|
|
38
|
+
value=${e.value}
|
|
39
|
+
?selected=${this.value==e.value||e.selected}
|
|
40
|
+
?disabled=${e.disabled}
|
|
41
|
+
?hidden=${e.hidden}
|
|
42
|
+
>
|
|
43
|
+
${e.label}
|
|
44
|
+
</option>`)}
|
|
45
|
+
</select>
|
|
46
|
+
<div class="pkt-contents" ${h.n(this.helptextSlot)} name="helptext" slot="helptext"></div>
|
|
47
|
+
</pkt-input-wrapper>
|
|
48
|
+
`}returnNumberOrNull(t){return t==null||isNaN(t)?null:t}};a([r.n({type:Array})],exports.PktSelect.prototype,"options",2);a([r.n({type:String})],exports.PktSelect.prototype,"value",2);a([p.r()],exports.PktSelect.prototype,"_options",2);exports.PktSelect=a([r.t("pkt-select")],exports.PktSelect);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { x as p, n as c,
|
|
2
|
-
import { r as f } from "./state-
|
|
3
|
-
import { e as u, n as d } from "./ref-
|
|
4
|
-
import { o } from "./if-defined-
|
|
5
|
-
import { P as b } from "./input-element-
|
|
1
|
+
import { x as p, n as c, t as v } from "./lit-element-DcUrSbRH.js";
|
|
2
|
+
import { r as f } from "./state-P2J1I2ny.js";
|
|
3
|
+
import { e as u, n as d } from "./ref-DX488m2G.js";
|
|
4
|
+
import { o } from "./if-defined-I-IZkUY2.js";
|
|
5
|
+
import { P as b } from "./input-element-CaCDNzdI.js";
|
|
6
6
|
import { P as $ } from "./pkt-options-controller-CZO1nxZ8.js";
|
|
7
7
|
import { P as x } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
8
|
-
import "./input-wrapper-
|
|
9
|
-
var m = Object.defineProperty, g = Object.getOwnPropertyDescriptor,
|
|
10
|
-
for (var l = i > 1 ? void 0 : i ? g(e, s) : e,
|
|
11
|
-
(r = t[
|
|
8
|
+
import "./input-wrapper-BDm0DwAW.js";
|
|
9
|
+
var m = Object.defineProperty, g = Object.getOwnPropertyDescriptor, a = (t, e, s, i) => {
|
|
10
|
+
for (var l = i > 1 ? void 0 : i ? g(e, s) : e, n = t.length - 1, r; n >= 0; n--)
|
|
11
|
+
(r = t[n]) && (l = (i ? r(e, s, l) : r(l)) || l);
|
|
12
12
|
return i && l && m(e, s, l), l;
|
|
13
13
|
};
|
|
14
|
-
let
|
|
14
|
+
let h = class extends b {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(), this.inputRef = u(), this.helptextSlot = u(), this.options = [], this.value = "", this._options = [], this.selectedIndex = -1, this.selectedOptions = void 0, this.optionsController = new $(this), this.slotController = new x(this, this.helptextSlot), this.slotController.skipOptions = !0;
|
|
17
17
|
}
|
|
@@ -63,7 +63,7 @@ let n = class extends b {
|
|
|
63
63
|
}
|
|
64
64
|
attributeChangedCallback(t, e, s) {
|
|
65
65
|
var i, l;
|
|
66
|
-
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((
|
|
66
|
+
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);
|
|
67
67
|
}
|
|
68
68
|
update(t) {
|
|
69
69
|
var e, s;
|
|
@@ -138,18 +138,18 @@ let n = class extends b {
|
|
|
138
138
|
return t == null || isNaN(t) ? null : t;
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
|
-
|
|
141
|
+
a([
|
|
142
142
|
c({ type: Array })
|
|
143
|
-
],
|
|
144
|
-
|
|
143
|
+
], h.prototype, "options", 2);
|
|
144
|
+
a([
|
|
145
145
|
c({ type: String })
|
|
146
|
-
],
|
|
147
|
-
|
|
146
|
+
], h.prototype, "value", 2);
|
|
147
|
+
a([
|
|
148
148
|
f()
|
|
149
|
-
],
|
|
150
|
-
|
|
149
|
+
], h.prototype, "_options", 2);
|
|
150
|
+
h = a([
|
|
151
151
|
v("pkt-select")
|
|
152
|
-
],
|
|
152
|
+
], h);
|
|
153
153
|
export {
|
|
154
|
-
|
|
154
|
+
h as P
|
|
155
155
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { e as u } from "./class-map-
|
|
2
|
-
import {
|
|
3
|
-
import { r as
|
|
1
|
+
import { e as u } from "./class-map-DO0E7GkW.js";
|
|
2
|
+
import { x as l, n as a, t as k } from "./lit-element-DcUrSbRH.js";
|
|
3
|
+
import { r as m } from "./state-P2J1I2ny.js";
|
|
4
|
+
import { P as g } from "./element-Cfyyg4nF.js";
|
|
4
5
|
import { P as y } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
5
|
-
import { e as b, n as f } from "./ref-
|
|
6
|
-
import "./icon-
|
|
7
|
-
import { o as d } from "./if-defined-
|
|
6
|
+
import { e as b, n as f } from "./ref-DX488m2G.js";
|
|
7
|
+
import "./icon-DPnB79MP.js";
|
|
8
|
+
import { o as d } from "./if-defined-I-IZkUY2.js";
|
|
8
9
|
const _ = {
|
|
9
10
|
closeTag: {
|
|
10
11
|
default: !1
|
|
@@ -22,11 +23,11 @@ const _ = {
|
|
|
22
23
|
props: _
|
|
23
24
|
};
|
|
24
25
|
var $ = Object.defineProperty, S = Object.getOwnPropertyDescriptor, e = (s, i, p, o) => {
|
|
25
|
-
for (var
|
|
26
|
-
(h = s[c]) && (
|
|
27
|
-
return o &&
|
|
26
|
+
for (var r = o > 1 ? void 0 : o ? S(i, p) : i, c = s.length - 1, h; c >= 0; c--)
|
|
27
|
+
(h = s[c]) && (r = (o ? h(i, p, r) : h(r)) || r);
|
|
28
|
+
return o && r && $(i, p, r), r;
|
|
28
29
|
};
|
|
29
|
-
let t = class extends
|
|
30
|
+
let t = class extends g {
|
|
30
31
|
constructor() {
|
|
31
32
|
super(), this.defaultSlot = b(), this.closeTag = n.props.closeTag.default, this.size = n.props.size.default, this.skin = n.props.skin.default, this.textStyle = null, this.iconName = void 0, this.type = n.props.type.default, this.ariaLabel = null, this._isClosed = !1, this._ariaDescription = null, this.close = (s) => {
|
|
32
33
|
this._isClosed = !0, this.dispatchEvent(
|
|
@@ -83,34 +84,34 @@ let t = class extends m {
|
|
|
83
84
|
}
|
|
84
85
|
};
|
|
85
86
|
e([
|
|
86
|
-
|
|
87
|
+
a({ type: Boolean, reflect: !0 })
|
|
87
88
|
], t.prototype, "closeTag", 2);
|
|
88
89
|
e([
|
|
89
|
-
|
|
90
|
+
a({ type: String, reflect: !0 })
|
|
90
91
|
], t.prototype, "size", 2);
|
|
91
92
|
e([
|
|
92
|
-
|
|
93
|
+
a({ type: String, reflect: !0 })
|
|
93
94
|
], t.prototype, "skin", 2);
|
|
94
95
|
e([
|
|
95
|
-
|
|
96
|
+
a({ type: String, reflect: !0 })
|
|
96
97
|
], t.prototype, "textStyle", 2);
|
|
97
98
|
e([
|
|
98
|
-
|
|
99
|
+
a({ type: String, reflect: !0 })
|
|
99
100
|
], t.prototype, "iconName", 2);
|
|
100
101
|
e([
|
|
101
|
-
|
|
102
|
+
a({ type: String })
|
|
102
103
|
], t.prototype, "type", 2);
|
|
103
104
|
e([
|
|
104
|
-
|
|
105
|
+
a({ type: String })
|
|
105
106
|
], t.prototype, "ariaLabel", 2);
|
|
106
107
|
e([
|
|
107
|
-
|
|
108
|
+
m()
|
|
108
109
|
], t.prototype, "_isClosed", 2);
|
|
109
110
|
e([
|
|
110
|
-
|
|
111
|
+
m()
|
|
111
112
|
], t.prototype, "_ariaDescription", 2);
|
|
112
113
|
t = e([
|
|
113
|
-
|
|
114
|
+
k("pkt-tag")
|
|
114
115
|
], t);
|
|
115
116
|
export {
|
|
116
117
|
t as P
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";const u=require("./class-map-dph2jLEp.cjs"),t=require("./lit-element-DHqqtYbj.cjs"),k=require("./state-y-GU-VH8.cjs"),g=require("./element-DUJa1sRq.cjs"),f=require("./pkt-slot-controller-BzddBp7z.cjs"),c=require("./ref-BMQZJJEo.cjs");require("./icon-RJ9Op-BB.cjs");const h=require("./if-defined-BQOEcjlp.cjs"),d={closeTag:{default:!1},size:{default:"medium"},skin:{default:"blue"},type:{default:"button"}},r={props:d};var y=Object.defineProperty,b=Object.getOwnPropertyDescriptor,i=(n,e,o,a)=>{for(var s=a>1?void 0:a?b(e,o):e,l=n.length-1,p;l>=0;l--)(p=n[l])&&(s=(a?p(e,o,s):p(s))||s);return a&&s&&y(e,o,s),s};exports.PktTag=class extends g.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.closeTag=r.props.closeTag.default,this.size=r.props.size.default,this.skin=r.props.skin.default,this.textStyle=null,this.iconName=void 0,this.type=r.props.type.default,this.ariaLabel=null,this._isClosed=!1,this._ariaDescription=null,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 f.PktSlotController(this,this.defaultSlot),this._isClosed=!1}firstUpdated(e){var o,a;if(super.firstUpdated(e),this.closeTag&&!this.ariaLabel){const s=(a=(o=this.defaultSlot.value)==null?void 0:o.textContent)==null?void 0:a.trim();s&&(this._ariaDescription=`Klikk for å fjerne ${s}`)}}render(){const e={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},o={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,"pkt-btn--icons-right-and-left":this.closeTag&&!!this.iconName,"pkt-hide":this._isClosed};return this.closeTag?t.x`
|
|
2
|
+
<button
|
|
3
|
+
class=${u.e(o)}
|
|
4
|
+
type=${this.type}
|
|
5
|
+
@click=${this.close}
|
|
6
|
+
aria-label=${h.o(this.ariaLabel||void 0)}
|
|
7
|
+
aria-description=${h.o(this._ariaDescription||void 0)}
|
|
8
|
+
>
|
|
9
|
+
${this.iconName&&t.x`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
|
|
10
|
+
<span ${c.n(this.defaultSlot)}></span>
|
|
11
|
+
<pkt-icon class="pkt-tag__close-btn" name="close"></pkt-icon>
|
|
12
|
+
</button>
|
|
13
|
+
`:t.x`
|
|
14
|
+
<span class=${u.e(e)}>
|
|
15
|
+
${this.iconName&&t.x`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
|
|
16
|
+
<span ${c.n(this.defaultSlot)}></span>
|
|
17
|
+
</span>
|
|
18
|
+
`}};i([t.n({type:Boolean,reflect:!0})],exports.PktTag.prototype,"closeTag",2);i([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"size",2);i([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"skin",2);i([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"textStyle",2);i([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"iconName",2);i([t.n({type:String})],exports.PktTag.prototype,"type",2);i([t.n({type:String})],exports.PktTag.prototype,"ariaLabel",2);i([k.r()],exports.PktTag.prototype,"_isClosed",2);i([k.r()],exports.PktTag.prototype,"_ariaDescription",2);exports.PktTag=i([t.t("pkt-tag")],exports.PktTag);
|