@oslokommune/punkt-react 16.0.0 → 16.0.2
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 +35 -0
- package/dist/punkt-react.es.js +841 -839
- package/dist/punkt-react.umd.js +82 -82
- package/package.json +3 -3
- package/src/components/datepicker/DatepickerInputs.tsx +9 -4
package/dist/punkt-react.es.js
CHANGED
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
return [];
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
var
|
|
37
|
-
var Ml = (n, e, t) => e in n ?
|
|
36
|
+
var Ol = Object.defineProperty;
|
|
37
|
+
var Ml = (n, e, t) => e in n ? Ol(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
38
38
|
var wi = (n, e, t) => Ml(n, typeof e != "symbol" ? e + "" : e, t);
|
|
39
|
-
import { jsx as u, jsxs as w, Fragment as
|
|
39
|
+
import { jsx as u, jsxs as w, Fragment as Be } from "react/jsx-runtime";
|
|
40
40
|
import yn, { createContext as Ki, forwardRef as Ce, useContext as hi, useState as ce, useEffect as be, useCallback as M, useId as go, useMemo as Te, useRef as pe, useImperativeHandle as Gi, Children as Ri, isValidElement as vo, useLayoutEffect as bo, Fragment as El, createRef as Al, createElement as Pl, cloneElement as Il } from "react";
|
|
41
41
|
import { Link as Rl } from "react-router-dom";
|
|
42
42
|
const yo = Ki({}), Ll = () => hi(yo), Bl = Ce(
|
|
@@ -99,7 +99,7 @@ const Fl = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "cl
|
|
|
99
99
|
*/
|
|
100
100
|
const Li = globalThis, aa = (n) => n, Bi = Li.trustedTypes, oa = Bi ? Bi.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, ko = "$lit$", Tn = `lit$${Math.random().toFixed(9).slice(2)}$`, _o = "?" + Tn, Vl = `<${_o}>`, Yn = document, ei = () => Yn.createComment(""), ti = (n) => n === null || typeof n != "object" && typeof n != "function", Fr = Array.isArray, Ul = (n) => Fr(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", ur = `[
|
|
101
101
|
\f\r]`, Ps = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, la = /-->/g, ca = />/g, Ln = RegExp(`>|${ur}(?:([^\\s"'>=/]+)(${ur}*=${ur}*(?:[^
|
|
102
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), ua = /'/g, da = /"/g, $o = /^(?:script|style|textarea|title)$/i, jl = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), y = jl(1),
|
|
102
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), ua = /'/g, da = /"/g, $o = /^(?:script|style|textarea|title)$/i, jl = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), y = jl(1), Ot = Symbol.for("lit-noChange"), x = Symbol.for("lit-nothing"), ha = /* @__PURE__ */ new WeakMap(), jn = Yn.createTreeWalker(Yn, 129);
|
|
103
103
|
function wo(n, e) {
|
|
104
104
|
if (!Fr(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
105
105
|
return oa !== void 0 ? oa.createHTML(e) : e;
|
|
@@ -116,7 +116,7 @@ const Hl = (n, e) => {
|
|
|
116
116
|
}
|
|
117
117
|
return [wo(n, r + (n[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), s];
|
|
118
118
|
};
|
|
119
|
-
let
|
|
119
|
+
let Dr = class xo {
|
|
120
120
|
constructor({ strings: e, _$litType$: t }, s) {
|
|
121
121
|
let i;
|
|
122
122
|
this.parts = [];
|
|
@@ -155,7 +155,7 @@ let Or = class xo {
|
|
|
155
155
|
};
|
|
156
156
|
function vs(n, e, t = n, s) {
|
|
157
157
|
var i, r;
|
|
158
|
-
if (e ===
|
|
158
|
+
if (e === Ot) return e;
|
|
159
159
|
let a = s !== void 0 ? (i = t._$Co) == null ? void 0 : i[s] : t._$Cl;
|
|
160
160
|
const o = ti(e) ? void 0 : e._$litDirective$;
|
|
161
161
|
return (a == null ? void 0 : a.constructor) !== o && ((r = a == null ? void 0 : a._$AO) == null || r.call(a, !1), o === void 0 ? a = void 0 : (a = new o(n), a._$AT(n, t, s)), s !== void 0 ? (t._$Co ?? (t._$Co = []))[s] = a : t._$Cl = a), a !== void 0 && (e = vs(n, a._$AS(n, e.values), a, s)), e;
|
|
@@ -207,7 +207,7 @@ let ql = class {
|
|
|
207
207
|
return this._$AB;
|
|
208
208
|
}
|
|
209
209
|
_$AI(e, t = this) {
|
|
210
|
-
e = vs(this, e, t), ti(e) ? e === x || e == null || e === "" ? (this._$AH !== x && this._$AR(), this._$AH = x) : e !== this._$AH && e !==
|
|
210
|
+
e = vs(this, e, t), ti(e) ? e === x || e == null || e === "" ? (this._$AH !== x && this._$AR(), this._$AH = x) : e !== this._$AH && e !== Ot && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Ul(e) ? this.k(e) : this._(e);
|
|
211
211
|
}
|
|
212
212
|
O(e) {
|
|
213
213
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -220,7 +220,7 @@ let ql = class {
|
|
|
220
220
|
}
|
|
221
221
|
$(e) {
|
|
222
222
|
var t;
|
|
223
|
-
const { values: s, _$litType$: i } = e, r = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el =
|
|
223
|
+
const { values: s, _$litType$: i } = e, r = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = Dr.createElement(wo(i.h, i.h[0]), this.options)), i);
|
|
224
224
|
if (((t = this._$AH) == null ? void 0 : t._$AD) === r) this._$AH.p(s);
|
|
225
225
|
else {
|
|
226
226
|
const a = new ql(r, this), o = a.u(this.options);
|
|
@@ -229,7 +229,7 @@ let ql = class {
|
|
|
229
229
|
}
|
|
230
230
|
_$AC(e) {
|
|
231
231
|
let t = ha.get(e.strings);
|
|
232
|
-
return t === void 0 && ha.set(e.strings, t = new
|
|
232
|
+
return t === void 0 && ha.set(e.strings, t = new Dr(e)), t;
|
|
233
233
|
}
|
|
234
234
|
k(e) {
|
|
235
235
|
Fr(this._$AH) || (this._$AH = [], this._$AR());
|
|
@@ -262,11 +262,11 @@ let ql = class {
|
|
|
262
262
|
_$AI(e, t = this, s, i) {
|
|
263
263
|
const r = this.strings;
|
|
264
264
|
let a = !1;
|
|
265
|
-
if (r === void 0) e = vs(this, e, t, 0), a = !ti(e) || e !== this._$AH && e !==
|
|
265
|
+
if (r === void 0) e = vs(this, e, t, 0), a = !ti(e) || e !== this._$AH && e !== Ot, a && (this._$AH = e);
|
|
266
266
|
else {
|
|
267
267
|
const o = e;
|
|
268
268
|
let l, h;
|
|
269
|
-
for (e = r[0], l = 0; l < r.length - 1; l++) h = vs(this, o[s + l], t, l), h ===
|
|
269
|
+
for (e = r[0], l = 0; l < r.length - 1; l++) h = vs(this, o[s + l], t, l), h === Ot && (h = this._$AH[l]), a || (a = !ti(h) || h !== this._$AH[l]), h === x ? e = x : e !== x && (e += (h ?? "") + r[l + 1]), this._$AH[l] = h;
|
|
270
270
|
}
|
|
271
271
|
a && !i && this.j(e);
|
|
272
272
|
}
|
|
@@ -292,7 +292,7 @@ let ql = class {
|
|
|
292
292
|
super(e, t, s, i, r), this.type = 5;
|
|
293
293
|
}
|
|
294
294
|
_$AI(e, t = this) {
|
|
295
|
-
if ((e = vs(this, e, t, 0) ?? x) ===
|
|
295
|
+
if ((e = vs(this, e, t, 0) ?? x) === Ot) return;
|
|
296
296
|
const s = this._$AH, i = e === x && s !== x || e.capture !== s.capture || e.once !== s.once || e.passive !== s.passive, r = e !== x && (s === x || i);
|
|
297
297
|
i && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
298
298
|
}
|
|
@@ -312,7 +312,7 @@ let ql = class {
|
|
|
312
312
|
}
|
|
313
313
|
};
|
|
314
314
|
const Gl = { I: Qi }, pa = Li.litHtmlPolyfillSupport;
|
|
315
|
-
pa == null || pa(
|
|
315
|
+
pa == null || pa(Dr, Qi), (Li.litHtmlVersions ?? (Li.litHtmlVersions = [])).push("3.3.2");
|
|
316
316
|
const Ql = (n, e, t) => {
|
|
317
317
|
const s = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
318
318
|
let i = s._$litPart$;
|
|
@@ -666,7 +666,7 @@ let hs = class extends us {
|
|
|
666
666
|
super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
|
|
667
667
|
}
|
|
668
668
|
render() {
|
|
669
|
-
return
|
|
669
|
+
return Ot;
|
|
670
670
|
}
|
|
671
671
|
};
|
|
672
672
|
var ya;
|
|
@@ -674,7 +674,7 @@ hs._$litElement$ = !0, hs.finalized = !0, (ya = ni.litElementHydrateSupport) ==
|
|
|
674
674
|
const ka = ni.litElementPolyfillSupport;
|
|
675
675
|
ka == null || ka({ LitElement: hs });
|
|
676
676
|
(ni.litElementVersions ?? (ni.litElementVersions = [])).push("4.2.2");
|
|
677
|
-
const cc = { hi: "Hei!" }, uc = { from: "Fra", to: "Til" }, dc = { buttonAltText: "Åpne kalender", deleteDate: "Fjern dato" }, hc = { month: "Måned", year: "År", days: ["Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"], daysShort: ["Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn"], months: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], week: "Uke", prevMonth: "Forrige måned", nextMonth: "Neste måned" }, pc = { search: { placeholder: "Søk…" }, labels: { optional: "Valgfritt", required: "Må fylles ut" }, messages: { required: "Dette feltet er påkrevd", invalid: "Ugyldig verdi", invalidPattern: "Ugyldig format", tooShort: "For kort", tooLong: "For lang", rangeUnderflow: "For lav verdi", rangeOverflow: "For høy verdi", rangeUnderflowMin: "Verdien må være større enn eller lik {min}.", rangeOverflowMax: "Verdien må være mindre enn eller lik {max}.", dateUnderflow: "For tidlig dato", dateOverflow: "For sen dato" }, helptext: { helptextDropdownButton: "Les mer" }, date: { multiple: "Her kan du velge flere datoer. Trykk komma eller enter når du har skrevet inn en dato." } },
|
|
677
|
+
const cc = { hi: "Hei!" }, uc = { from: "Fra", to: "Til" }, dc = { buttonAltText: "Åpne kalender", deleteDate: "Fjern dato" }, hc = { month: "Måned", year: "År", days: ["Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"], daysShort: ["Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn"], months: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], week: "Uke", prevMonth: "Forrige måned", nextMonth: "Neste måned" }, pc = { search: { placeholder: "Søk…" }, labels: { optional: "Valgfritt", required: "Må fylles ut" }, messages: { required: "Dette feltet er påkrevd", invalid: "Ugyldig verdi", invalidPattern: "Ugyldig format", tooShort: "For kort", tooLong: "For lang", rangeUnderflow: "For lav verdi", rangeOverflow: "For høy verdi", rangeUnderflowMin: "Verdien må være større enn eller lik {min}.", rangeOverflowMax: "Verdien må være mindre enn eller lik {max}.", dateUnderflow: "For tidlig dato", dateOverflow: "For sen dato" }, helptext: { helptextDropdownButton: "Les mer" }, date: { multiple: "Her kan du velge flere datoer. Trykk komma eller enter når du har skrevet inn en dato." } }, Dt = {
|
|
678
678
|
example: cc,
|
|
679
679
|
generic: uc,
|
|
680
680
|
calendar: dc,
|
|
@@ -688,7 +688,7 @@ var fc = Object.defineProperty, To = (n, e, t, s) => {
|
|
|
688
688
|
};
|
|
689
689
|
let Zi = class extends hs {
|
|
690
690
|
constructor() {
|
|
691
|
-
super(...arguments), this.strings =
|
|
691
|
+
super(...arguments), this.strings = Dt, this.role = null;
|
|
692
692
|
}
|
|
693
693
|
/**
|
|
694
694
|
* Add support for Hot Module Reloading in dev mode
|
|
@@ -703,7 +703,7 @@ To([
|
|
|
703
703
|
To([
|
|
704
704
|
c({ type: String })
|
|
705
705
|
], Zi.prototype, "role");
|
|
706
|
-
let
|
|
706
|
+
let Fe = class extends Zi {
|
|
707
707
|
/**
|
|
708
708
|
* Make sure the component renders in light DOM instead of shadow DOM
|
|
709
709
|
*/
|
|
@@ -759,7 +759,7 @@ const z = Jn(class extends xs {
|
|
|
759
759
|
const a = !!e[r];
|
|
760
760
|
a === this.st.has(r) || (s = this.nt) != null && s.has(r) || (a ? (i.add(r), this.st.add(r)) : (i.remove(r), this.st.delete(r)));
|
|
761
761
|
}
|
|
762
|
-
return
|
|
762
|
+
return Ot;
|
|
763
763
|
}
|
|
764
764
|
});
|
|
765
765
|
/**
|
|
@@ -866,7 +866,7 @@ let rt = class {
|
|
|
866
866
|
* Copyright 2020 Google LLC
|
|
867
867
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
868
868
|
*/
|
|
869
|
-
const { I: gc } = Gl, _a = (n) => n,
|
|
869
|
+
const { I: gc } = Gl, _a = (n) => n, Do = (n) => n.strings === void 0, $a = () => document.createComment(""), Rs = (n, e, t) => {
|
|
870
870
|
var s;
|
|
871
871
|
const i = n._$AA.parentNode, r = e === void 0 ? n._$AB : e._$AA;
|
|
872
872
|
if (t === void 0) {
|
|
@@ -887,7 +887,7 @@ const { I: gc } = Gl, _a = (n) => n, Oo = (n) => n.strings === void 0, $a = () =
|
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
889
|
return t;
|
|
890
|
-
}, Bn = (n, e, t = n) => (n._$AI(e, t), n), vc = {},
|
|
890
|
+
}, Bn = (n, e, t = n) => (n._$AI(e, t), n), vc = {}, Oo = (n, e = vc) => n._$AH = e, bc = (n) => n._$AH, hr = (n) => {
|
|
891
891
|
n._$AR(), n._$AA.remove();
|
|
892
892
|
};
|
|
893
893
|
/**
|
|
@@ -939,7 +939,7 @@ let $c = class extends xs {
|
|
|
939
939
|
e !== this.isConnected && (this.isConnected = e, e ? (s = this.reconnected) == null || s.call(this) : (i = this.disconnected) == null || i.call(this)), t && (Js(this, e), Vi(this));
|
|
940
940
|
}
|
|
941
941
|
setValue(e) {
|
|
942
|
-
if (
|
|
942
|
+
if (Do(this._$Ct)) this._$Ct._$AI(e, this);
|
|
943
943
|
else {
|
|
944
944
|
const t = [...this._$Ct._$AH];
|
|
945
945
|
t[this._$Ci] = e, this._$Ct._$AI(t, this, 0);
|
|
@@ -958,7 +958,7 @@ let $c = class extends xs {
|
|
|
958
958
|
const Z = () => new wc();
|
|
959
959
|
let wc = class {
|
|
960
960
|
};
|
|
961
|
-
const pr = /* @__PURE__ */ new WeakMap(),
|
|
961
|
+
const pr = /* @__PURE__ */ new WeakMap(), G = Jn(class extends $c {
|
|
962
962
|
render(n) {
|
|
963
963
|
return x;
|
|
964
964
|
}
|
|
@@ -1000,7 +1000,7 @@ let Ui = class extends xs {
|
|
|
1000
1000
|
}
|
|
1001
1001
|
render(e) {
|
|
1002
1002
|
if (e === x || e == null) return this._t = void 0, this.it = e;
|
|
1003
|
-
if (e ===
|
|
1003
|
+
if (e === Ot) return e;
|
|
1004
1004
|
if (typeof e != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
1005
1005
|
if (e === this.it) return this._t;
|
|
1006
1006
|
this.it = e;
|
|
@@ -1015,10 +1015,10 @@ const Ei = Jn(Ui);
|
|
|
1015
1015
|
* Copyright 2017 Google LLC
|
|
1016
1016
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1017
1017
|
*/
|
|
1018
|
-
let
|
|
1018
|
+
let Or = class extends Ui {
|
|
1019
1019
|
};
|
|
1020
|
-
|
|
1021
|
-
const fr = Jn(
|
|
1020
|
+
Or.directiveName = "unsafeSVG", Or.resultType = 2;
|
|
1021
|
+
const fr = Jn(Or);
|
|
1022
1022
|
var xc = Object.defineProperty, Sc = Object.getOwnPropertyDescriptor, pi = (n, e, t, s) => {
|
|
1023
1023
|
for (var i = s > 1 ? void 0 : s ? Sc(e, t) : e, r = n.length - 1, a; r >= 0; r--)
|
|
1024
1024
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
@@ -1036,11 +1036,11 @@ const si = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',
|
|
|
1036
1036
|
} catch {
|
|
1037
1037
|
return e > 0 ? (await new Promise((t) => setTimeout(t, Tc)), Ao(n, e - 1)) : (console.error("Failed to fetch icon: " + n), si);
|
|
1038
1038
|
}
|
|
1039
|
-
},
|
|
1039
|
+
}, Dc = async (n, e) => {
|
|
1040
1040
|
const t = e + n + ".svg";
|
|
1041
1041
|
return wa && sessionStorage.getItem(t) ? sessionStorage.getItem(t) : t in Ls ? Ls[t] : typeof window < "u" && typeof window.pktFetch == "function" ? (Ls[t] = Ao(t).then((s) => (s !== si && wa && sessionStorage.setItem(t, s), delete Ls[t], s)), Ls[t]) : si;
|
|
1042
1042
|
};
|
|
1043
|
-
let Kn = class extends
|
|
1043
|
+
let Kn = class extends Fe {
|
|
1044
1044
|
constructor() {
|
|
1045
1045
|
super(...arguments), this.path = typeof window < "u" ? window.pktIconPath : Mr, this.name = "", this.icon = fr(si), this._updatedProps = [];
|
|
1046
1046
|
}
|
|
@@ -1058,7 +1058,7 @@ let Kn = class extends Be {
|
|
|
1058
1058
|
this.path || (this.path = typeof window < "u" ? window.pktIconPath : Mr);
|
|
1059
1059
|
try {
|
|
1060
1060
|
this.icon = fr(
|
|
1061
|
-
await
|
|
1061
|
+
await Dc(this.name || "", this.path)
|
|
1062
1062
|
);
|
|
1063
1063
|
} catch {
|
|
1064
1064
|
this.icon = fr(si);
|
|
@@ -1092,13 +1092,13 @@ Kn = pi([
|
|
|
1092
1092
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1093
1093
|
*/
|
|
1094
1094
|
const I = (n) => n ?? x;
|
|
1095
|
-
var
|
|
1095
|
+
var Oc = Object.defineProperty, Mc = Object.getOwnPropertyDescriptor, gt = (n, e, t, s) => {
|
|
1096
1096
|
for (var i = s > 1 ? void 0 : s ? Mc(e, t) : e, r = n.length - 1, a; r >= 0; r--)
|
|
1097
1097
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
1098
|
-
return s && i &&
|
|
1098
|
+
return s && i && Oc(e, t, i), i;
|
|
1099
1099
|
};
|
|
1100
1100
|
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.0/animations/";
|
|
1101
|
-
let dt = class extends
|
|
1101
|
+
let dt = class extends Fe {
|
|
1102
1102
|
constructor() {
|
|
1103
1103
|
super(), this.defaultSlot = Z(), 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 rt(this, this.defaultSlot);
|
|
1104
1104
|
}
|
|
@@ -1157,7 +1157,7 @@ let dt = class extends Be {
|
|
|
1157
1157
|
name=${this.iconName}
|
|
1158
1158
|
path=${I(this.iconPath)}
|
|
1159
1159
|
></pkt-icon>` : x}
|
|
1160
|
-
<span class="pkt-btn__text" ${
|
|
1160
|
+
<span class="pkt-btn__text" ${G(this.defaultSlot)}></span>
|
|
1161
1161
|
${this.variant === "icons-right-and-left" ? y`<pkt-icon
|
|
1162
1162
|
class="pkt-btn__icon"
|
|
1163
1163
|
name=${this.secondIconName}
|
|
@@ -1229,7 +1229,7 @@ var Ac = Object.defineProperty, Pc = Object.getOwnPropertyDescriptor, un = (n, e
|
|
|
1229
1229
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
1230
1230
|
return s && i && Ac(e, t, i), i;
|
|
1231
1231
|
};
|
|
1232
|
-
let Qt = class extends
|
|
1232
|
+
let Qt = class extends Fe {
|
|
1233
1233
|
constructor() {
|
|
1234
1234
|
super(), this.defaultSlot = Z(), this.compact = xi.props.compact.default, this.title = "", this.skin = xi.props.skin.default, this.ariaLive = xi.props.ariaLive.default, this["aria-live"] = null, this.closeAlert = xi.props.closeAlert.default, this.date = null, this.role = "status", this._isClosed = !1, this.close = (e) => {
|
|
1235
1235
|
this._isClosed = !0, this.dispatchEvent(
|
|
@@ -1288,7 +1288,7 @@ let Qt = class extends Be {
|
|
|
1288
1288
|
` : x}
|
|
1289
1289
|
${this.title ? y`<div class="pkt-alert__title">${this.title}</div>` : x}
|
|
1290
1290
|
|
|
1291
|
-
<div class="pkt-alert__text" ${
|
|
1291
|
+
<div class="pkt-alert__text" ${G(this.defaultSlot)}></div>
|
|
1292
1292
|
|
|
1293
1293
|
${this.date ? y`<div class="pkt-alert__date">Sist oppdatert: ${this.date}</div>` : x}
|
|
1294
1294
|
</div>
|
|
@@ -1392,7 +1392,7 @@ var Lc = Object.defineProperty, Bc = Object.getOwnPropertyDescriptor, es = (n, e
|
|
|
1392
1392
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
1393
1393
|
return s && i && Lc(e, t, i), i;
|
|
1394
1394
|
};
|
|
1395
|
-
let
|
|
1395
|
+
let On = class extends Fe {
|
|
1396
1396
|
constructor() {
|
|
1397
1397
|
super(), this.defaultOpen = !1, this.title = "", this.skin = void 0, this.compact = !1, this.isOpen = !1, this.name = void 0, this.accordionItemRef = Z(), this.defaultSlot = Z(), this.slotController = new rt(this, this.defaultSlot);
|
|
1398
1398
|
}
|
|
@@ -1410,7 +1410,7 @@ let Dn = class extends Be {
|
|
|
1410
1410
|
class=${z(e)}
|
|
1411
1411
|
id=${this.id}
|
|
1412
1412
|
?open=${this.isOpen}
|
|
1413
|
-
${
|
|
1413
|
+
${G(this.accordionItemRef)}
|
|
1414
1414
|
name=${I(this.name)}
|
|
1415
1415
|
>
|
|
1416
1416
|
<summary class="pkt-accordion-item__title" id=${`pkt-accordion-item-summary-${this.id}`}>
|
|
@@ -1426,7 +1426,7 @@ let Dn = class extends Be {
|
|
|
1426
1426
|
id="pkt-accordion-item__content-${this.id}"
|
|
1427
1427
|
role="region"
|
|
1428
1428
|
>
|
|
1429
|
-
<div class="pkt-accordion-item__content-inner" ${
|
|
1429
|
+
<div class="pkt-accordion-item__content-inner" ${G(this.defaultSlot)}></div>
|
|
1430
1430
|
</div>
|
|
1431
1431
|
</details>
|
|
1432
1432
|
`;
|
|
@@ -1434,31 +1434,31 @@ let Dn = class extends Be {
|
|
|
1434
1434
|
};
|
|
1435
1435
|
es([
|
|
1436
1436
|
c({ type: Boolean })
|
|
1437
|
-
],
|
|
1437
|
+
], On.prototype, "defaultOpen", 2);
|
|
1438
1438
|
es([
|
|
1439
1439
|
c({ type: String })
|
|
1440
|
-
],
|
|
1440
|
+
], On.prototype, "title", 2);
|
|
1441
1441
|
es([
|
|
1442
1442
|
c({ type: String, reflect: !0 })
|
|
1443
|
-
],
|
|
1443
|
+
], On.prototype, "skin", 2);
|
|
1444
1444
|
es([
|
|
1445
1445
|
c({ type: Boolean, reflect: !0 })
|
|
1446
|
-
],
|
|
1446
|
+
], On.prototype, "compact", 2);
|
|
1447
1447
|
es([
|
|
1448
1448
|
c({ type: Boolean, reflect: !0 })
|
|
1449
|
-
],
|
|
1449
|
+
], On.prototype, "isOpen", 2);
|
|
1450
1450
|
es([
|
|
1451
1451
|
c({ type: String, reflect: !0 })
|
|
1452
|
-
],
|
|
1453
|
-
|
|
1452
|
+
], On.prototype, "name", 2);
|
|
1453
|
+
On = es([
|
|
1454
1454
|
ye("pkt-accordion-item")
|
|
1455
|
-
],
|
|
1455
|
+
], On);
|
|
1456
1456
|
var Fc = Object.defineProperty, Vc = Object.getOwnPropertyDescriptor, Ji = (n, e, t, s) => {
|
|
1457
1457
|
for (var i = s > 1 ? void 0 : s ? Vc(e, t) : e, r = n.length - 1, a; r >= 0; r--)
|
|
1458
1458
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
1459
1459
|
return s && i && Fc(e, t, i), i;
|
|
1460
1460
|
};
|
|
1461
|
-
let ks = class extends
|
|
1461
|
+
let ks = class extends Fe {
|
|
1462
1462
|
constructor() {
|
|
1463
1463
|
super(...arguments), this.href = "", this.text = "Forsiden", this.ariaLabel = "";
|
|
1464
1464
|
}
|
|
@@ -2022,7 +2022,7 @@ function Nu(n, e) {
|
|
|
2022
2022
|
const t = Lt(n, void 0);
|
|
2023
2023
|
return Hc(t, Kc(t)) + 1;
|
|
2024
2024
|
}
|
|
2025
|
-
function
|
|
2025
|
+
function Du(n, e) {
|
|
2026
2026
|
const t = Lt(n, void 0), s = +ji(t) - +qc(t);
|
|
2027
2027
|
return Math.round(s / Po) + 1;
|
|
2028
2028
|
}
|
|
@@ -2035,16 +2035,16 @@ function Bo(n, e) {
|
|
|
2035
2035
|
const b = ii(p, e);
|
|
2036
2036
|
return +a >= +g ? o + 1 : +a >= +b ? o : o - 1;
|
|
2037
2037
|
}
|
|
2038
|
-
function
|
|
2038
|
+
function Ou(n, e) {
|
|
2039
2039
|
var t, s, i, r;
|
|
2040
2040
|
const a = er(), o = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((s = (t = e == null ? void 0 : e.locale) == null ? void 0 : t.options) == null ? void 0 : s.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((r = (i = a.locale) == null ? void 0 : i.options) == null ? void 0 : r.firstWeekContainsDate) ?? 1, l = Bo(n, e), h = on((e == null ? void 0 : e.in) || n, 0);
|
|
2041
2041
|
return h.setFullYear(l, 0, o), h.setHours(0, 0, 0, 0), ii(h, e);
|
|
2042
2042
|
}
|
|
2043
2043
|
function Fo(n, e) {
|
|
2044
|
-
const t = Lt(n, e == null ? void 0 : e.in), s = +ii(t, e) - +
|
|
2044
|
+
const t = Lt(n, e == null ? void 0 : e.in), s = +ii(t, e) - +Ou(t, e);
|
|
2045
2045
|
return Math.round(s / Po) + 1;
|
|
2046
2046
|
}
|
|
2047
|
-
function
|
|
2047
|
+
function Oe(n, e) {
|
|
2048
2048
|
const t = n < 0 ? "-" : "", s = Math.abs(n).toString().padStart(e, "0");
|
|
2049
2049
|
return t + s;
|
|
2050
2050
|
}
|
|
@@ -2052,16 +2052,16 @@ const Sn = {
|
|
|
2052
2052
|
// Year
|
|
2053
2053
|
y(n, e) {
|
|
2054
2054
|
const t = n.getFullYear(), s = t > 0 ? t : 1 - t;
|
|
2055
|
-
return
|
|
2055
|
+
return Oe(e === "yy" ? s % 100 : s, e.length);
|
|
2056
2056
|
},
|
|
2057
2057
|
// Month
|
|
2058
2058
|
M(n, e) {
|
|
2059
2059
|
const t = n.getMonth();
|
|
2060
|
-
return e === "M" ? String(t + 1) :
|
|
2060
|
+
return e === "M" ? String(t + 1) : Oe(t + 1, 2);
|
|
2061
2061
|
},
|
|
2062
2062
|
// Day of the month
|
|
2063
2063
|
d(n, e) {
|
|
2064
|
-
return
|
|
2064
|
+
return Oe(n.getDate(), e.length);
|
|
2065
2065
|
},
|
|
2066
2066
|
// AM or PM
|
|
2067
2067
|
a(n, e) {
|
|
@@ -2081,26 +2081,26 @@ const Sn = {
|
|
|
2081
2081
|
},
|
|
2082
2082
|
// Hour [1-12]
|
|
2083
2083
|
h(n, e) {
|
|
2084
|
-
return
|
|
2084
|
+
return Oe(n.getHours() % 12 || 12, e.length);
|
|
2085
2085
|
},
|
|
2086
2086
|
// Hour [0-23]
|
|
2087
2087
|
H(n, e) {
|
|
2088
|
-
return
|
|
2088
|
+
return Oe(n.getHours(), e.length);
|
|
2089
2089
|
},
|
|
2090
2090
|
// Minute
|
|
2091
2091
|
m(n, e) {
|
|
2092
|
-
return
|
|
2092
|
+
return Oe(n.getMinutes(), e.length);
|
|
2093
2093
|
},
|
|
2094
2094
|
// Second
|
|
2095
2095
|
s(n, e) {
|
|
2096
|
-
return
|
|
2096
|
+
return Oe(n.getSeconds(), e.length);
|
|
2097
2097
|
},
|
|
2098
2098
|
// Fraction of second
|
|
2099
2099
|
S(n, e) {
|
|
2100
2100
|
const t = e.length, s = n.getMilliseconds(), i = Math.trunc(
|
|
2101
2101
|
s * Math.pow(10, t - 3)
|
|
2102
2102
|
);
|
|
2103
|
-
return
|
|
2103
|
+
return Oe(i, e.length);
|
|
2104
2104
|
}
|
|
2105
2105
|
}, ls = {
|
|
2106
2106
|
midnight: "midnight",
|
|
@@ -2141,14 +2141,14 @@ const Sn = {
|
|
|
2141
2141
|
const i = Bo(n, s), r = i > 0 ? i : 1 - i;
|
|
2142
2142
|
if (e === "YY") {
|
|
2143
2143
|
const a = r % 100;
|
|
2144
|
-
return
|
|
2144
|
+
return Oe(a, 2);
|
|
2145
2145
|
}
|
|
2146
|
-
return e === "Yo" ? t.ordinalNumber(r, { unit: "year" }) :
|
|
2146
|
+
return e === "Yo" ? t.ordinalNumber(r, { unit: "year" }) : Oe(r, e.length);
|
|
2147
2147
|
},
|
|
2148
2148
|
// ISO week-numbering year
|
|
2149
2149
|
R: function(n, e) {
|
|
2150
2150
|
const t = Io(n);
|
|
2151
|
-
return
|
|
2151
|
+
return Oe(t, e.length);
|
|
2152
2152
|
},
|
|
2153
2153
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
2154
2154
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -2161,7 +2161,7 @@ const Sn = {
|
|
|
2161
2161
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
2162
2162
|
u: function(n, e) {
|
|
2163
2163
|
const t = n.getFullYear();
|
|
2164
|
-
return
|
|
2164
|
+
return Oe(t, e.length);
|
|
2165
2165
|
},
|
|
2166
2166
|
// Quarter
|
|
2167
2167
|
Q: function(n, e, t) {
|
|
@@ -2172,7 +2172,7 @@ const Sn = {
|
|
|
2172
2172
|
return String(s);
|
|
2173
2173
|
// 01, 02, 03, 04
|
|
2174
2174
|
case "QQ":
|
|
2175
|
-
return
|
|
2175
|
+
return Oe(s, 2);
|
|
2176
2176
|
// 1st, 2nd, 3rd, 4th
|
|
2177
2177
|
case "Qo":
|
|
2178
2178
|
return t.ordinalNumber(s, { unit: "quarter" });
|
|
@@ -2206,7 +2206,7 @@ const Sn = {
|
|
|
2206
2206
|
return String(s);
|
|
2207
2207
|
// 01, 02, 03, 04
|
|
2208
2208
|
case "qq":
|
|
2209
|
-
return
|
|
2209
|
+
return Oe(s, 2);
|
|
2210
2210
|
// 1st, 2nd, 3rd, 4th
|
|
2211
2211
|
case "qo":
|
|
2212
2212
|
return t.ordinalNumber(s, { unit: "quarter" });
|
|
@@ -2268,7 +2268,7 @@ const Sn = {
|
|
|
2268
2268
|
return String(s + 1);
|
|
2269
2269
|
// 01, 02, ..., 12
|
|
2270
2270
|
case "LL":
|
|
2271
|
-
return
|
|
2271
|
+
return Oe(s + 1, 2);
|
|
2272
2272
|
// 1st, 2nd, ..., 12th
|
|
2273
2273
|
case "Lo":
|
|
2274
2274
|
return t.ordinalNumber(s + 1, { unit: "month" });
|
|
@@ -2293,12 +2293,12 @@ const Sn = {
|
|
|
2293
2293
|
// Local week of year
|
|
2294
2294
|
w: function(n, e, t, s) {
|
|
2295
2295
|
const i = Fo(n, s);
|
|
2296
|
-
return e === "wo" ? t.ordinalNumber(i, { unit: "week" }) :
|
|
2296
|
+
return e === "wo" ? t.ordinalNumber(i, { unit: "week" }) : Oe(i, e.length);
|
|
2297
2297
|
},
|
|
2298
2298
|
// ISO week of year
|
|
2299
2299
|
I: function(n, e, t) {
|
|
2300
|
-
const s =
|
|
2301
|
-
return e === "Io" ? t.ordinalNumber(s, { unit: "week" }) :
|
|
2300
|
+
const s = Du(n);
|
|
2301
|
+
return e === "Io" ? t.ordinalNumber(s, { unit: "week" }) : Oe(s, e.length);
|
|
2302
2302
|
},
|
|
2303
2303
|
// Day of the month
|
|
2304
2304
|
d: function(n, e, t) {
|
|
@@ -2307,7 +2307,7 @@ const Sn = {
|
|
|
2307
2307
|
// Day of year
|
|
2308
2308
|
D: function(n, e, t) {
|
|
2309
2309
|
const s = Nu(n);
|
|
2310
|
-
return e === "Do" ? t.ordinalNumber(s, { unit: "dayOfYear" }) :
|
|
2310
|
+
return e === "Do" ? t.ordinalNumber(s, { unit: "dayOfYear" }) : Oe(s, e.length);
|
|
2311
2311
|
},
|
|
2312
2312
|
// Day of week
|
|
2313
2313
|
E: function(n, e, t) {
|
|
@@ -2351,7 +2351,7 @@ const Sn = {
|
|
|
2351
2351
|
return String(r);
|
|
2352
2352
|
// Padded numerical value
|
|
2353
2353
|
case "ee":
|
|
2354
|
-
return
|
|
2354
|
+
return Oe(r, 2);
|
|
2355
2355
|
// 1st, 2nd, ..., 7th
|
|
2356
2356
|
case "eo":
|
|
2357
2357
|
return t.ordinalNumber(r, { unit: "day" });
|
|
@@ -2390,7 +2390,7 @@ const Sn = {
|
|
|
2390
2390
|
return String(r);
|
|
2391
2391
|
// Padded numerical value
|
|
2392
2392
|
case "cc":
|
|
2393
|
-
return
|
|
2393
|
+
return Oe(r, e.length);
|
|
2394
2394
|
// 1st, 2nd, ..., 7th
|
|
2395
2395
|
case "co":
|
|
2396
2396
|
return t.ordinalNumber(r, { unit: "day" });
|
|
@@ -2429,7 +2429,7 @@ const Sn = {
|
|
|
2429
2429
|
return String(i);
|
|
2430
2430
|
// 02
|
|
2431
2431
|
case "ii":
|
|
2432
|
-
return
|
|
2432
|
+
return Oe(i, e.length);
|
|
2433
2433
|
// 2nd
|
|
2434
2434
|
case "io":
|
|
2435
2435
|
return t.ordinalNumber(i, { unit: "day" });
|
|
@@ -2557,12 +2557,12 @@ const Sn = {
|
|
|
2557
2557
|
// Hour [0-11]
|
|
2558
2558
|
K: function(n, e, t) {
|
|
2559
2559
|
const s = n.getHours() % 12;
|
|
2560
|
-
return e === "Ko" ? t.ordinalNumber(s, { unit: "hour" }) :
|
|
2560
|
+
return e === "Ko" ? t.ordinalNumber(s, { unit: "hour" }) : Oe(s, e.length);
|
|
2561
2561
|
},
|
|
2562
2562
|
// Hour [1-24]
|
|
2563
2563
|
k: function(n, e, t) {
|
|
2564
2564
|
let s = n.getHours();
|
|
2565
|
-
return s === 0 && (s = 24), e === "ko" ? t.ordinalNumber(s, { unit: "hour" }) :
|
|
2565
|
+
return s === 0 && (s = 24), e === "ko" ? t.ordinalNumber(s, { unit: "hour" }) : Oe(s, e.length);
|
|
2566
2566
|
},
|
|
2567
2567
|
// Minute
|
|
2568
2568
|
m: function(n, e, t) {
|
|
@@ -2584,7 +2584,7 @@ const Sn = {
|
|
|
2584
2584
|
switch (e) {
|
|
2585
2585
|
// Hours and optional minutes
|
|
2586
2586
|
case "X":
|
|
2587
|
-
return
|
|
2587
|
+
return Oa(s);
|
|
2588
2588
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
2589
2589
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
2590
2590
|
// so this token always has the same output as `XX`
|
|
@@ -2607,7 +2607,7 @@ const Sn = {
|
|
|
2607
2607
|
switch (e) {
|
|
2608
2608
|
// Hours and optional minutes
|
|
2609
2609
|
case "x":
|
|
2610
|
-
return
|
|
2610
|
+
return Oa(s);
|
|
2611
2611
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
2612
2612
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
2613
2613
|
// so this token always has the same output as `xx`
|
|
@@ -2632,7 +2632,7 @@ const Sn = {
|
|
|
2632
2632
|
case "O":
|
|
2633
2633
|
case "OO":
|
|
2634
2634
|
case "OOO":
|
|
2635
|
-
return "GMT" +
|
|
2635
|
+
return "GMT" + Da(s, ":");
|
|
2636
2636
|
// Long
|
|
2637
2637
|
case "OOOO":
|
|
2638
2638
|
default:
|
|
@@ -2647,7 +2647,7 @@ const Sn = {
|
|
|
2647
2647
|
case "z":
|
|
2648
2648
|
case "zz":
|
|
2649
2649
|
case "zzz":
|
|
2650
|
-
return "GMT" +
|
|
2650
|
+
return "GMT" + Da(s, ":");
|
|
2651
2651
|
// Long
|
|
2652
2652
|
case "zzzz":
|
|
2653
2653
|
default:
|
|
@@ -2657,22 +2657,22 @@ const Sn = {
|
|
|
2657
2657
|
// Seconds timestamp
|
|
2658
2658
|
t: function(n, e, t) {
|
|
2659
2659
|
const s = Math.trunc(+n / 1e3);
|
|
2660
|
-
return
|
|
2660
|
+
return Oe(s, e.length);
|
|
2661
2661
|
},
|
|
2662
2662
|
// Milliseconds timestamp
|
|
2663
2663
|
T: function(n, e, t) {
|
|
2664
|
-
return
|
|
2664
|
+
return Oe(+n, e.length);
|
|
2665
2665
|
}
|
|
2666
2666
|
};
|
|
2667
|
-
function
|
|
2667
|
+
function Da(n, e = "") {
|
|
2668
2668
|
const t = n > 0 ? "-" : "+", s = Math.abs(n), i = Math.trunc(s / 60), r = s % 60;
|
|
2669
|
-
return r === 0 ? t + String(i) : t + String(i) + e +
|
|
2669
|
+
return r === 0 ? t + String(i) : t + String(i) + e + Oe(r, 2);
|
|
2670
2670
|
}
|
|
2671
|
-
function
|
|
2672
|
-
return n % 60 === 0 ? (n > 0 ? "-" : "+") +
|
|
2671
|
+
function Oa(n, e) {
|
|
2672
|
+
return n % 60 === 0 ? (n > 0 ? "-" : "+") + Oe(Math.abs(n) / 60, 2) : Vn(n, e);
|
|
2673
2673
|
}
|
|
2674
2674
|
function Vn(n, e = "") {
|
|
2675
|
-
const t = n > 0 ? "-" : "+", s = Math.abs(n), i =
|
|
2675
|
+
const t = n > 0 ? "-" : "+", s = Math.abs(n), i = Oe(Math.trunc(s / 60), 2), r = Oe(s % 60, 2);
|
|
2676
2676
|
return t + i + e + r;
|
|
2677
2677
|
}
|
|
2678
2678
|
const Ma = (n, e) => {
|
|
@@ -2747,8 +2747,8 @@ function Wu(n, e, t) {
|
|
|
2747
2747
|
let p = e.match(Uu).map((v) => {
|
|
2748
2748
|
const $ = v[0];
|
|
2749
2749
|
if ($ === "p" || $ === "P") {
|
|
2750
|
-
const
|
|
2751
|
-
return
|
|
2750
|
+
const D = Eu[$];
|
|
2751
|
+
return D(v, l.formatLong);
|
|
2752
2752
|
}
|
|
2753
2753
|
return v;
|
|
2754
2754
|
}).join("").match(Vu).map((v) => {
|
|
@@ -2775,8 +2775,8 @@ function Wu(n, e, t) {
|
|
|
2775
2775
|
if (!v.isToken) return v.value;
|
|
2776
2776
|
const $ = v.value;
|
|
2777
2777
|
(Lu($) || Ru($)) && Bu($, e, String(n));
|
|
2778
|
-
const
|
|
2779
|
-
return
|
|
2778
|
+
const D = Na[$[0]];
|
|
2779
|
+
return D(g, $, l.localize, b);
|
|
2780
2780
|
}).join("");
|
|
2781
2781
|
}
|
|
2782
2782
|
function zu(n) {
|
|
@@ -2872,9 +2872,9 @@ function Uo(n) {
|
|
|
2872
2872
|
h.setUTCSeconds(0);
|
|
2873
2873
|
const f = i > 0 ? h.getSeconds() : (h.getSeconds() - 60) % 60, g = Math.round(-(Hn(n.timeZone, n) * 60)) % 60;
|
|
2874
2874
|
(g || f) && (n.internal.setUTCSeconds(n.internal.getUTCSeconds() + g), Date.prototype.setUTCSeconds.call(n, Date.prototype.getUTCSeconds.call(n) + g + f));
|
|
2875
|
-
const p = Hn(n.timeZone, n), b = p > 0 ? Math.floor(p) : Math.ceil(p), v = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset() - b, $ = b !== t,
|
|
2876
|
-
if ($ &&
|
|
2877
|
-
Date.prototype.setUTCMinutes.call(n, Date.prototype.getUTCMinutes.call(n) +
|
|
2875
|
+
const p = Hn(n.timeZone, n), b = p > 0 ? Math.floor(p) : Math.ceil(p), v = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset() - b, $ = b !== t, D = v - l;
|
|
2876
|
+
if ($ && D) {
|
|
2877
|
+
Date.prototype.setUTCMinutes.call(n, Date.prototype.getUTCMinutes.call(n) + D);
|
|
2878
2878
|
const S = Hn(n.timeZone, n), T = S > 0 ? Math.floor(S) : Math.ceil(S), L = b - T;
|
|
2879
2879
|
L && (n.internal.setUTCMinutes(n.internal.getUTCMinutes() + L), Date.prototype.setUTCMinutes.call(n, Date.prototype.getUTCMinutes.call(n) + L));
|
|
2880
2880
|
}
|
|
@@ -3141,12 +3141,12 @@ function kd(n, e, t) {
|
|
|
3141
3141
|
function _d(n) {
|
|
3142
3142
|
return bd[n] ?? null;
|
|
3143
3143
|
}
|
|
3144
|
-
var $d = Object.defineProperty, wd = Object.getOwnPropertyDescriptor,
|
|
3144
|
+
var $d = Object.defineProperty, wd = Object.getOwnPropertyDescriptor, Ve = (n, e, t, s) => {
|
|
3145
3145
|
for (var i = s > 1 ? void 0 : s ? wd(e, t) : e, r = n.length - 1, a; r >= 0; r--)
|
|
3146
3146
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
3147
3147
|
return s && i && $d(e, t, i), i;
|
|
3148
3148
|
};
|
|
3149
|
-
let Pe = class extends
|
|
3149
|
+
let Pe = class extends Fe {
|
|
3150
3150
|
constructor() {
|
|
3151
3151
|
super(...arguments), this.selected = [], this.multiple = Fn.props.multiple.default, this.maxMultiple = Fn.props.maxMultiple.default, this.range = Fn.props.range.default, this.earliest = Fn.props.earliest.default, this.latest = Fn.props.latest.default, this.excludedates = [], this.excludeweekdays = [], this.weeknumbers = Fn.props.weeknumbers.default, this.withcontrols = Fn.props.withcontrols.default, this.currentmonth = null, this.today = null, this.dayStrings = this.strings.dates.daysShort, this.dayStringsLong = this.strings.dates.days, this.monthStrings = this.strings.dates.months, this.weekString = this.strings.dates.week, this.prevMonthString = this.strings.dates.prevMonth, this.nextMonthString = this.strings.dates.nextMonth, this._selected = [], this.inRange = {}, this.rangeHovered = null, this.year = 0, this.month = 0, this.week = 0, this.currentmonthtouched = !1, this.focusedDate = null, this.selectableDates = [], this.tabIndexSet = 0;
|
|
3152
3152
|
}
|
|
@@ -3518,85 +3518,85 @@ let Pe = class extends Be {
|
|
|
3518
3518
|
);
|
|
3519
3519
|
}
|
|
3520
3520
|
};
|
|
3521
|
-
|
|
3521
|
+
Ve([
|
|
3522
3522
|
c({ converter: Ss.csvToArray })
|
|
3523
3523
|
], Pe.prototype, "selected", 2);
|
|
3524
|
-
|
|
3524
|
+
Ve([
|
|
3525
3525
|
c({ type: Boolean })
|
|
3526
3526
|
], Pe.prototype, "multiple", 2);
|
|
3527
|
-
|
|
3527
|
+
Ve([
|
|
3528
3528
|
c({ type: Number, attribute: "max-multiple" })
|
|
3529
3529
|
], Pe.prototype, "maxMultiple", 2);
|
|
3530
|
-
|
|
3530
|
+
Ve([
|
|
3531
3531
|
c({ type: Boolean })
|
|
3532
3532
|
], Pe.prototype, "range", 2);
|
|
3533
|
-
|
|
3533
|
+
Ve([
|
|
3534
3534
|
c({ type: String })
|
|
3535
3535
|
], Pe.prototype, "earliest", 2);
|
|
3536
|
-
|
|
3536
|
+
Ve([
|
|
3537
3537
|
c({ type: String })
|
|
3538
3538
|
], Pe.prototype, "latest", 2);
|
|
3539
|
-
|
|
3539
|
+
Ve([
|
|
3540
3540
|
c({ converter: Ss.stringsToDate })
|
|
3541
3541
|
], Pe.prototype, "excludedates", 2);
|
|
3542
|
-
|
|
3542
|
+
Ve([
|
|
3543
3543
|
c({ converter: Ss.csvToArray })
|
|
3544
3544
|
], Pe.prototype, "excludeweekdays", 2);
|
|
3545
|
-
|
|
3545
|
+
Ve([
|
|
3546
3546
|
c({ type: Boolean })
|
|
3547
3547
|
], Pe.prototype, "weeknumbers", 2);
|
|
3548
|
-
|
|
3548
|
+
Ve([
|
|
3549
3549
|
c({ type: Boolean })
|
|
3550
3550
|
], Pe.prototype, "withcontrols", 2);
|
|
3551
|
-
|
|
3551
|
+
Ve([
|
|
3552
3552
|
c({ converter: Ss.stringToDate })
|
|
3553
3553
|
], Pe.prototype, "currentmonth", 2);
|
|
3554
|
-
|
|
3554
|
+
Ve([
|
|
3555
3555
|
c({ type: String })
|
|
3556
3556
|
], Pe.prototype, "today", 2);
|
|
3557
|
-
|
|
3557
|
+
Ve([
|
|
3558
3558
|
c({ type: Array, attribute: "day-strings" })
|
|
3559
3559
|
], Pe.prototype, "dayStrings", 2);
|
|
3560
|
-
|
|
3560
|
+
Ve([
|
|
3561
3561
|
c({ type: Array, attribute: "day-strings-long" })
|
|
3562
3562
|
], Pe.prototype, "dayStringsLong", 2);
|
|
3563
|
-
|
|
3563
|
+
Ve([
|
|
3564
3564
|
c({ type: Array, attribute: "month-strings" })
|
|
3565
3565
|
], Pe.prototype, "monthStrings", 2);
|
|
3566
|
-
|
|
3566
|
+
Ve([
|
|
3567
3567
|
c({ type: String, attribute: "week-string" })
|
|
3568
3568
|
], Pe.prototype, "weekString", 2);
|
|
3569
|
-
|
|
3569
|
+
Ve([
|
|
3570
3570
|
c({ type: String, attribute: "prev-month-string" })
|
|
3571
3571
|
], Pe.prototype, "prevMonthString", 2);
|
|
3572
|
-
|
|
3572
|
+
Ve([
|
|
3573
3573
|
c({ type: String, attribute: "next-month-string" })
|
|
3574
3574
|
], Pe.prototype, "nextMonthString", 2);
|
|
3575
|
-
|
|
3575
|
+
Ve([
|
|
3576
3576
|
c({ type: Array })
|
|
3577
3577
|
], Pe.prototype, "_selected", 2);
|
|
3578
|
-
|
|
3578
|
+
Ve([
|
|
3579
3579
|
he()
|
|
3580
3580
|
], Pe.prototype, "inRange", 2);
|
|
3581
|
-
|
|
3581
|
+
Ve([
|
|
3582
3582
|
c({ type: Date })
|
|
3583
3583
|
], Pe.prototype, "rangeHovered", 2);
|
|
3584
|
-
|
|
3584
|
+
Ve([
|
|
3585
3585
|
c({ type: Number })
|
|
3586
3586
|
], Pe.prototype, "year", 2);
|
|
3587
|
-
|
|
3587
|
+
Ve([
|
|
3588
3588
|
c({ type: Number })
|
|
3589
3589
|
], Pe.prototype, "month", 2);
|
|
3590
|
-
|
|
3590
|
+
Ve([
|
|
3591
3591
|
c({ type: Number })
|
|
3592
3592
|
], Pe.prototype, "week", 2);
|
|
3593
|
-
|
|
3593
|
+
Ve([
|
|
3594
3594
|
he()
|
|
3595
3595
|
], Pe.prototype, "currentmonthtouched", 2);
|
|
3596
|
-
|
|
3596
|
+
Ve([
|
|
3597
3597
|
he()
|
|
3598
3598
|
], Pe.prototype, "focusedDate", 2);
|
|
3599
|
-
Pe =
|
|
3599
|
+
Pe = Ve([
|
|
3600
3600
|
ye("pkt-calendar")
|
|
3601
3601
|
], Pe);
|
|
3602
3602
|
const xd = { size: { default: "medium" }, skin: { default: "blue" }, closeTag: { default: !1 }, type: { default: "button" } }, Si = {
|
|
@@ -3607,7 +3607,7 @@ var Sd = Object.defineProperty, Cd = Object.getOwnPropertyDescriptor, Jt = (n, e
|
|
|
3607
3607
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
3608
3608
|
return s && i && Sd(e, t, i), i;
|
|
3609
3609
|
};
|
|
3610
|
-
let Ht = class extends
|
|
3610
|
+
let Ht = class extends Fe {
|
|
3611
3611
|
constructor() {
|
|
3612
3612
|
super(), this.defaultSlot = Z(), this.closeTag = Si.props.closeTag.default, this.size = Si.props.size.default, this.skin = Si.props.skin.default, this.textStyle = null, this.iconName = void 0, this.type = Si.props.type.default, this.ariaLabel = null, this.buttonTabindex = void 0, this._isClosed = !1, this._ariaDescription = null, this.close = (e) => {
|
|
3613
3613
|
this._isClosed = !0, this.dispatchEvent(
|
|
@@ -3657,7 +3657,7 @@ let Ht = class extends Be {
|
|
|
3657
3657
|
name=${this.iconName}
|
|
3658
3658
|
aria-hidden="true"
|
|
3659
3659
|
></pkt-icon>`}
|
|
3660
|
-
<span ${
|
|
3660
|
+
<span ${G(this.defaultSlot)}></span>
|
|
3661
3661
|
<pkt-icon class="pkt-tag__close-btn" name="close"></pkt-icon>
|
|
3662
3662
|
</button>
|
|
3663
3663
|
` : y`
|
|
@@ -3667,7 +3667,7 @@ let Ht = class extends Be {
|
|
|
3667
3667
|
name=${this.iconName}
|
|
3668
3668
|
aria-hidden="true"
|
|
3669
3669
|
></pkt-icon>`}
|
|
3670
|
-
<span ${
|
|
3670
|
+
<span ${G(this.defaultSlot)}></span>
|
|
3671
3671
|
</span>
|
|
3672
3672
|
`;
|
|
3673
3673
|
}
|
|
@@ -3802,15 +3802,15 @@ Cs([
|
|
|
3802
3802
|
En = Cs([
|
|
3803
3803
|
ye("pkt-heading")
|
|
3804
3804
|
], En);
|
|
3805
|
-
const
|
|
3806
|
-
props:
|
|
3805
|
+
const Dd = { layout: { default: "vertical" }, skin: { type: ["outlined", "outlined-beige", "gray", "blue", "beige", "green"], default: "outlined" }, padding: { default: "default" } }, fs = {
|
|
3806
|
+
props: Dd
|
|
3807
3807
|
};
|
|
3808
|
-
var
|
|
3808
|
+
var Od = Object.defineProperty, Md = Object.getOwnPropertyDescriptor, kt = (n, e, t, s) => {
|
|
3809
3809
|
for (var i = s > 1 ? void 0 : s ? Md(e, t) : e, r = n.length - 1, a; r >= 0; r--)
|
|
3810
3810
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
3811
|
-
return s && i &&
|
|
3811
|
+
return s && i && Od(e, t, i), i;
|
|
3812
3812
|
};
|
|
3813
|
-
let ht = class extends
|
|
3813
|
+
let ht = class extends Fe {
|
|
3814
3814
|
//Constructor
|
|
3815
3815
|
constructor() {
|
|
3816
3816
|
super(), this.defaultSlot = Z(), this.ariaLabel = "", this.metaLead = null, this.borderOnHover = !0, this.clickCardLink = null, this.metaTrail = null, this.layout = fs.props.layout.default, this.heading = "", this.headinglevel = 3, this.image = {
|
|
@@ -3950,7 +3950,7 @@ let ht = class extends Be {
|
|
|
3950
3950
|
}
|
|
3951
3951
|
renderSlot() {
|
|
3952
3952
|
return y`
|
|
3953
|
-
${this.defaultSlot && y`<section class="pkt-card__content" ${
|
|
3953
|
+
${this.defaultSlot && y`<section class="pkt-card__content" ${G(this.defaultSlot)}></section>`}
|
|
3954
3954
|
`;
|
|
3955
3955
|
}
|
|
3956
3956
|
renderMetadata() {
|
|
@@ -4062,11 +4062,11 @@ const Ba = (n, e, t) => {
|
|
|
4062
4062
|
else if (o[g] === a[v]) l[v] = Bn(i[g], r[v]), Rs(n, l[v + 1], i[g]), g++, v--;
|
|
4063
4063
|
else if (o[p] === a[b]) l[b] = Bn(i[p], r[b]), Rs(n, i[g], i[p]), p--, b++;
|
|
4064
4064
|
else if (h === void 0 && (h = Ba(a, b, v), f = Ba(o, g, p)), h.has(o[g])) if (h.has(o[p])) {
|
|
4065
|
-
const $ = f.get(a[b]),
|
|
4066
|
-
if (
|
|
4065
|
+
const $ = f.get(a[b]), D = $ !== void 0 ? i[$] : null;
|
|
4066
|
+
if (D === null) {
|
|
4067
4067
|
const S = Rs(n, i[g]);
|
|
4068
4068
|
Bn(S, r[b]), l[b] = S;
|
|
4069
|
-
} else l[b] = Bn(
|
|
4069
|
+
} else l[b] = Bn(D, r[b]), Rs(n, i[g], D), i[$] = null;
|
|
4070
4070
|
b++;
|
|
4071
4071
|
} else hr(i[p]), p--;
|
|
4072
4072
|
else hr(i[g]), g++;
|
|
@@ -4078,9 +4078,9 @@ const Ba = (n, e, t) => {
|
|
|
4078
4078
|
const $ = i[g++];
|
|
4079
4079
|
$ !== null && hr($);
|
|
4080
4080
|
}
|
|
4081
|
-
return this.ut = a,
|
|
4081
|
+
return this.ut = a, Oo(n, l), Ot;
|
|
4082
4082
|
}
|
|
4083
|
-
}), Fa = () => ("00000000000000000" + (Math.random() * 18446744073709552e3).toString(16)).slice(-16), Ed = (n) => new Promise((e) => setTimeout(e, n)),
|
|
4083
|
+
}), Fa = () => ("00000000000000000" + (Math.random() * 18446744073709552e3).toString(16)).slice(-16), Ed = (n) => new Promise((e) => setTimeout(e, n)), Dn = () => {
|
|
4084
4084
|
const n = Fa(), e = Fa();
|
|
4085
4085
|
return n.slice(0, 8) + "-" + n.slice(8, 12) + "-4" + n.slice(13) + "-a" + e.slice(1, 4) + "-" + e.slice(4);
|
|
4086
4086
|
}, rn = (n, e) => e && (n.find((t) => t.value === e) || n.find((t) => t.label === e)) || null, Va = (n, e) => {
|
|
@@ -4179,9 +4179,9 @@ var jd = Object.defineProperty, Hd = Object.getOwnPropertyDescriptor, xt = (n, e
|
|
|
4179
4179
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
4180
4180
|
return s && i && jd(e, t, i), i;
|
|
4181
4181
|
};
|
|
4182
|
-
let bt = class extends
|
|
4182
|
+
let bt = class extends Fe {
|
|
4183
4183
|
constructor() {
|
|
4184
|
-
super(...arguments), this.id =
|
|
4184
|
+
super(...arguments), this.id = Dn(), this.label = null, this.options = [], this.isOpen = !1, this.disabled = !1, this.includeSearch = !1, this.isMultiSelect = !1, this.allowUserInput = !1, this.maxIsReached = !1, this.customUserInput = null, this.searchPlaceholder = null, this.searchValue = null, this.maxLength = 0, this.userMessage = null, this._selectedOptions = 0, this.typeahead = Ld(), this._filteredOptions = [];
|
|
4185
4185
|
}
|
|
4186
4186
|
// Lifecycle methods
|
|
4187
4187
|
connectedCallback() {
|
|
@@ -4330,7 +4330,7 @@ let bt = class extends Be {
|
|
|
4330
4330
|
type="text"
|
|
4331
4331
|
aria-label="Søk i listen"
|
|
4332
4332
|
form=""
|
|
4333
|
-
placeholder=${this.searchPlaceholder ||
|
|
4333
|
+
placeholder=${this.searchPlaceholder || Dt.forms.search.placeholder}
|
|
4334
4334
|
@input=${this.handleSearchInput}
|
|
4335
4335
|
@keydown=${this.handleSearchKeydown}
|
|
4336
4336
|
.value=${this.searchValue}
|
|
@@ -4513,7 +4513,7 @@ var Wd = {}, ja;
|
|
|
4513
4513
|
function zd() {
|
|
4514
4514
|
return ja || (ja = 1, (function() {
|
|
4515
4515
|
(function(n) {
|
|
4516
|
-
const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakMap(),
|
|
4516
|
+
const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakMap(), D = {
|
|
4517
4517
|
ariaAtomic: "aria-atomic",
|
|
4518
4518
|
ariaAutoComplete: "aria-autocomplete",
|
|
4519
4519
|
ariaBusy: "aria-busy",
|
|
@@ -4557,10 +4557,10 @@ function zd() {
|
|
|
4557
4557
|
ariaValueText: "aria-valuetext",
|
|
4558
4558
|
role: "role"
|
|
4559
4559
|
}, S = (m, d) => {
|
|
4560
|
-
for (let k in
|
|
4560
|
+
for (let k in D) {
|
|
4561
4561
|
d[k] = null;
|
|
4562
4562
|
let C = null;
|
|
4563
|
-
const j =
|
|
4563
|
+
const j = D[k];
|
|
4564
4564
|
Object.defineProperty(d, k, {
|
|
4565
4565
|
get() {
|
|
4566
4566
|
return C;
|
|
@@ -4573,7 +4573,7 @@ function zd() {
|
|
|
4573
4573
|
};
|
|
4574
4574
|
function T(m) {
|
|
4575
4575
|
const d = i.get(m), { form: k } = d;
|
|
4576
|
-
|
|
4576
|
+
We(m, k, d), ae(m, d.labels);
|
|
4577
4577
|
}
|
|
4578
4578
|
const L = (m, d = !1) => {
|
|
4579
4579
|
const k = document.createTreeWalker(m, NodeFilter.SHOW_ELEMENT, {
|
|
@@ -4585,7 +4585,7 @@ function zd() {
|
|
|
4585
4585
|
const j = !d || m.disabled;
|
|
4586
4586
|
for (; C; )
|
|
4587
4587
|
C.formDisabledCallback && j && H(C, m.disabled), C = k.nextNode();
|
|
4588
|
-
},
|
|
4588
|
+
}, O = { attributes: !0, attributeFilter: ["disabled", "name"] }, W = te() ? new MutationObserver((m) => {
|
|
4589
4589
|
for (const d of m) {
|
|
4590
4590
|
const k = d.target;
|
|
4591
4591
|
if (d.attributeName === "disabled" && (k.constructor.formAssociated ? H(k, k.hasAttribute("disabled")) : k.localName === "fieldset" && L(k)), d.attributeName === "name" && k.constructor.formAssociated) {
|
|
@@ -4601,8 +4601,8 @@ function zd() {
|
|
|
4601
4601
|
var ot;
|
|
4602
4602
|
if (i.has(de) && de.constructor.formAssociated && T(de), f.has(de)) {
|
|
4603
4603
|
const tt = f.get(de);
|
|
4604
|
-
Object.keys(
|
|
4605
|
-
N(de,
|
|
4604
|
+
Object.keys(D).filter((He) => tt[He] !== null).forEach((He) => {
|
|
4605
|
+
N(de, D[He], tt[He]);
|
|
4606
4606
|
}), f.delete(de);
|
|
4607
4607
|
}
|
|
4608
4608
|
if ($.has(de)) {
|
|
@@ -4610,16 +4610,16 @@ function zd() {
|
|
|
4610
4610
|
N(de, "internals-valid", tt.validity.valid.toString()), N(de, "internals-invalid", (!tt.validity.valid).toString()), N(de, "aria-invalid", (!tt.validity.valid).toString()), $.delete(de);
|
|
4611
4611
|
}
|
|
4612
4612
|
if (de.localName === "form") {
|
|
4613
|
-
const tt = l.get(de),
|
|
4613
|
+
const tt = l.get(de), He = document.createTreeWalker(de, NodeFilter.SHOW_ELEMENT, {
|
|
4614
4614
|
acceptNode(Yt) {
|
|
4615
4615
|
return i.has(Yt) && Yt.constructor.formAssociated && !(tt && tt.has(Yt)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
4616
4616
|
}
|
|
4617
4617
|
});
|
|
4618
|
-
let zt =
|
|
4618
|
+
let zt = He.nextNode();
|
|
4619
4619
|
for (; zt; )
|
|
4620
|
-
T(zt), zt =
|
|
4620
|
+
T(zt), zt = He.nextNode();
|
|
4621
4621
|
}
|
|
4622
|
-
de.localName === "fieldset" && ((ot = W.observe) === null || ot === void 0 || ot.call(W, de,
|
|
4622
|
+
de.localName === "fieldset" && ((ot = W.observe) === null || ot === void 0 || ot.call(W, de, O), L(de, !0));
|
|
4623
4623
|
}), q.forEach((de) => {
|
|
4624
4624
|
const ot = i.get(de);
|
|
4625
4625
|
ot && s.get(ot) && B(ot), o.has(de) && o.get(de).disconnect();
|
|
@@ -4640,7 +4640,7 @@ function zd() {
|
|
|
4640
4640
|
const C = new MutationObserver(oe);
|
|
4641
4641
|
!((d = window == null ? void 0 : window.ShadyDOM) === null || d === void 0) && d.inUse && m.mode && m.host && (m = m.host), (k = C.observe) === null || k === void 0 || k.call(C, m, { childList: !0 }), b.set(m, C);
|
|
4642
4642
|
};
|
|
4643
|
-
|
|
4643
|
+
te() && new MutationObserver(J);
|
|
4644
4644
|
const Y = {
|
|
4645
4645
|
childList: !0,
|
|
4646
4646
|
subtree: !0
|
|
@@ -4652,12 +4652,12 @@ function zd() {
|
|
|
4652
4652
|
s.get(m).forEach((d) => {
|
|
4653
4653
|
d.remove();
|
|
4654
4654
|
}), s.set(m, []);
|
|
4655
|
-
},
|
|
4655
|
+
}, Q = (m, d) => {
|
|
4656
4656
|
const k = document.createElement("input");
|
|
4657
4657
|
return k.type = "hidden", k.name = m.getAttribute("name"), m.after(k), s.get(d).push(k), k;
|
|
4658
4658
|
}, le = (m, d) => {
|
|
4659
4659
|
var k;
|
|
4660
|
-
s.set(d, []), (k = W.observe) === null || k === void 0 || k.call(W, m,
|
|
4660
|
+
s.set(d, []), (k = W.observe) === null || k === void 0 || k.call(W, m, O);
|
|
4661
4661
|
}, ae = (m, d) => {
|
|
4662
4662
|
if (d.length) {
|
|
4663
4663
|
Array.from(d).forEach((C) => C.addEventListener("click", m.click.bind(m)));
|
|
@@ -4668,10 +4668,10 @@ function zd() {
|
|
|
4668
4668
|
const d = Array.from(m.elements).filter((q) => !q.tagName.includes("-") && q.validity).map((q) => q.validity.valid), k = l.get(m) || [], C = Array.from(k).filter((q) => q.isConnected).map((q) => i.get(q).validity.valid), j = [...d, ...C].includes(!1);
|
|
4669
4669
|
m.toggleAttribute("internals-invalid", j), m.toggleAttribute("internals-valid", !j);
|
|
4670
4670
|
}, ue = (m) => {
|
|
4671
|
-
me(
|
|
4671
|
+
me(K(m.target));
|
|
4672
4672
|
}, ke = (m) => {
|
|
4673
|
-
me(
|
|
4674
|
-
},
|
|
4673
|
+
me(K(m.target));
|
|
4674
|
+
}, se = (m) => {
|
|
4675
4675
|
const d = ["button[type=submit]", "input[type=submit]", "button:not([type])"].map((k) => `${k}:not([disabled])`).map((k) => `${k}:not([form])${m.id ? `,${k}[form='${m.id}']` : ""}`).join(",");
|
|
4676
4676
|
m.addEventListener("click", (k) => {
|
|
4677
4677
|
if (k.target.closest(d)) {
|
|
@@ -4686,22 +4686,22 @@ function zd() {
|
|
|
4686
4686
|
d && d.size && d.forEach((k) => {
|
|
4687
4687
|
k.constructor.formAssociated && k.formResetCallback && k.formResetCallback.apply(k);
|
|
4688
4688
|
});
|
|
4689
|
-
},
|
|
4689
|
+
}, We = (m, d, k) => {
|
|
4690
4690
|
if (d) {
|
|
4691
4691
|
const C = l.get(d);
|
|
4692
4692
|
if (C)
|
|
4693
4693
|
C.add(m);
|
|
4694
4694
|
else {
|
|
4695
4695
|
const j = /* @__PURE__ */ new Set();
|
|
4696
|
-
j.add(m), l.set(d, j),
|
|
4696
|
+
j.add(m), l.set(d, j), se(d), d.addEventListener("reset", ie), d.addEventListener("input", ue), d.addEventListener("change", ke);
|
|
4697
4697
|
}
|
|
4698
4698
|
a.set(d, { ref: m, internals: k }), m.constructor.formAssociated && m.formAssociatedCallback && setTimeout(() => {
|
|
4699
4699
|
m.formAssociatedCallback.apply(m, [d]);
|
|
4700
4700
|
}, 0), me(d);
|
|
4701
4701
|
}
|
|
4702
|
-
},
|
|
4702
|
+
}, K = (m) => {
|
|
4703
4703
|
let d = m.parentNode;
|
|
4704
|
-
return d && d.tagName !== "FORM" && (d =
|
|
4704
|
+
return d && d.tagName !== "FORM" && (d = K(d)), d;
|
|
4705
4705
|
}, P = (m, d, k = DOMException) => {
|
|
4706
4706
|
if (!m.constructor.formAssociated)
|
|
4707
4707
|
throw new k(d);
|
|
@@ -4713,27 +4713,27 @@ function zd() {
|
|
|
4713
4713
|
}, Ae = (m) => {
|
|
4714
4714
|
if (m.constructor.formAssociated) {
|
|
4715
4715
|
const d = i.get(m), { labels: k, form: C } = d;
|
|
4716
|
-
ae(m, k),
|
|
4716
|
+
ae(m, k), We(m, C, d);
|
|
4717
4717
|
}
|
|
4718
4718
|
};
|
|
4719
|
-
function
|
|
4719
|
+
function te() {
|
|
4720
4720
|
return typeof MutationObserver < "u";
|
|
4721
4721
|
}
|
|
4722
|
-
class
|
|
4722
|
+
class Ue {
|
|
4723
4723
|
constructor() {
|
|
4724
4724
|
this.badInput = !1, this.customError = !1, this.patternMismatch = !1, this.rangeOverflow = !1, this.rangeUnderflow = !1, this.stepMismatch = !1, this.tooLong = !1, this.tooShort = !1, this.typeMismatch = !1, this.valid = !0, this.valueMissing = !1, Object.seal(this);
|
|
4725
4725
|
}
|
|
4726
4726
|
}
|
|
4727
|
-
const Ie = (m) => (m.badInput = !1, m.customError = !1, m.patternMismatch = !1, m.rangeOverflow = !1, m.rangeUnderflow = !1, m.stepMismatch = !1, m.tooLong = !1, m.tooShort = !1, m.typeMismatch = !1, m.valid = !0, m.valueMissing = !1, m), xe = (m, d, k) => (m.valid =
|
|
4727
|
+
const Ie = (m) => (m.badInput = !1, m.customError = !1, m.patternMismatch = !1, m.rangeOverflow = !1, m.rangeUnderflow = !1, m.stepMismatch = !1, m.tooLong = !1, m.tooShort = !1, m.typeMismatch = !1, m.valid = !0, m.valueMissing = !1, m), xe = (m, d, k) => (m.valid = De(d), Object.keys(d).forEach((C) => m[C] = d[C]), k && me(k), m), De = (m) => {
|
|
4728
4728
|
let d = !0;
|
|
4729
4729
|
for (let k in m)
|
|
4730
4730
|
k !== "valid" && m[k] !== !1 && (d = !1);
|
|
4731
4731
|
return d;
|
|
4732
4732
|
}, Re = /* @__PURE__ */ new WeakMap();
|
|
4733
|
-
function
|
|
4733
|
+
function ze(m, d) {
|
|
4734
4734
|
m.toggleAttribute(d, !0), m.part && m.part.add(d);
|
|
4735
4735
|
}
|
|
4736
|
-
class
|
|
4736
|
+
class Le extends Set {
|
|
4737
4737
|
static get isPolyfilled() {
|
|
4738
4738
|
return !0;
|
|
4739
4739
|
}
|
|
@@ -4746,8 +4746,8 @@ function zd() {
|
|
|
4746
4746
|
if (!/^--/.test(d) || typeof d != "string")
|
|
4747
4747
|
throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${d} must start with '--'.`);
|
|
4748
4748
|
const k = super.add(d), C = Re.get(this), j = `state${d}`;
|
|
4749
|
-
return C.isConnected ?
|
|
4750
|
-
|
|
4749
|
+
return C.isConnected ? ze(C, j) : setTimeout(() => {
|
|
4750
|
+
ze(C, j);
|
|
4751
4751
|
}), k;
|
|
4752
4752
|
}
|
|
4753
4753
|
clear() {
|
|
@@ -4770,10 +4770,10 @@ function zd() {
|
|
|
4770
4770
|
if (typeof d == "function" ? m !== d || !0 : !d.has(m)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
4771
4771
|
return d.set(m, k), k;
|
|
4772
4772
|
}
|
|
4773
|
-
var
|
|
4773
|
+
var je;
|
|
4774
4774
|
class Xe {
|
|
4775
4775
|
constructor(d) {
|
|
4776
|
-
|
|
4776
|
+
je.set(this, void 0), A(this, je, d);
|
|
4777
4777
|
for (let k = 0; k < d.length; k++) {
|
|
4778
4778
|
let C = d[k];
|
|
4779
4779
|
this[k] = C, C.hasAttribute("name") && (this[C.getAttribute("name")] = C);
|
|
@@ -4781,10 +4781,10 @@ function zd() {
|
|
|
4781
4781
|
Object.freeze(this);
|
|
4782
4782
|
}
|
|
4783
4783
|
get length() {
|
|
4784
|
-
return _e(this,
|
|
4784
|
+
return _e(this, je, "f").length;
|
|
4785
4785
|
}
|
|
4786
|
-
[(
|
|
4787
|
-
return _e(this,
|
|
4786
|
+
[(je = /* @__PURE__ */ new WeakMap(), Symbol.iterator)]() {
|
|
4787
|
+
return _e(this, je, "f")[Symbol.iterator]();
|
|
4788
4788
|
}
|
|
4789
4789
|
item(d) {
|
|
4790
4790
|
return this[d] == null ? null : this[d];
|
|
@@ -4812,7 +4812,7 @@ function zd() {
|
|
|
4812
4812
|
const de = j.call(this, ...q), ot = Array.from(l.get(this) || []);
|
|
4813
4813
|
if (ot.length === 0)
|
|
4814
4814
|
return de;
|
|
4815
|
-
const tt = Array.from(de).concat(ot).sort((
|
|
4815
|
+
const tt = Array.from(de).concat(ot).sort((He, zt) => He.compareDocumentPosition ? He.compareDocumentPosition(zt) & 2 ? 1 : -1 : 0);
|
|
4816
4816
|
return new Xe(tt);
|
|
4817
4817
|
}
|
|
4818
4818
|
});
|
|
@@ -4824,8 +4824,8 @@ function zd() {
|
|
|
4824
4824
|
constructor(d) {
|
|
4825
4825
|
if (!d || !d.tagName || d.tagName.indexOf("-") === -1)
|
|
4826
4826
|
throw new TypeError("Illegal constructor");
|
|
4827
|
-
const k = d.getRootNode(), C = new
|
|
4828
|
-
this.states = new
|
|
4827
|
+
const k = d.getRootNode(), C = new Ue();
|
|
4828
|
+
this.states = new Le(d), e.set(this, d), t.set(this, C), i.set(d, this), S(d, this), le(d, this), Object.seal(this), k instanceof DocumentFragment && we(k);
|
|
4829
4829
|
}
|
|
4830
4830
|
checkValidity() {
|
|
4831
4831
|
const d = e.get(this);
|
|
@@ -4846,7 +4846,7 @@ function zd() {
|
|
|
4846
4846
|
const d = e.get(this);
|
|
4847
4847
|
P(d, "Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");
|
|
4848
4848
|
let k;
|
|
4849
|
-
return d.constructor.formAssociated === !0 && (k =
|
|
4849
|
+
return d.constructor.formAssociated === !0 && (k = K(d)), k;
|
|
4850
4850
|
}
|
|
4851
4851
|
get labels() {
|
|
4852
4852
|
const d = e.get(this);
|
|
@@ -4867,12 +4867,12 @@ function zd() {
|
|
|
4867
4867
|
const k = e.get(this);
|
|
4868
4868
|
if (P(k, "Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."), B(this), d != null && !(d instanceof FormData)) {
|
|
4869
4869
|
if (k.getAttribute("name")) {
|
|
4870
|
-
const C =
|
|
4870
|
+
const C = Q(k, this);
|
|
4871
4871
|
C.value = d;
|
|
4872
4872
|
}
|
|
4873
4873
|
} else d != null && d instanceof FormData && Array.from(d).reverse().forEach(([C, j]) => {
|
|
4874
4874
|
if (typeof j == "string") {
|
|
4875
|
-
const q =
|
|
4875
|
+
const q = Q(k, this);
|
|
4876
4876
|
q.name = C, q.value = j;
|
|
4877
4877
|
}
|
|
4878
4878
|
});
|
|
@@ -4884,8 +4884,8 @@ function zd() {
|
|
|
4884
4884
|
throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");
|
|
4885
4885
|
p.set(this, C);
|
|
4886
4886
|
const q = t.get(this), de = {};
|
|
4887
|
-
for (const
|
|
4888
|
-
de[
|
|
4887
|
+
for (const He in d)
|
|
4888
|
+
de[He] = d[He];
|
|
4889
4889
|
Object.keys(de).length === 0 && Ie(q);
|
|
4890
4890
|
const ot = Object.assign(Object.assign({}, q), de);
|
|
4891
4891
|
delete ot.valid;
|
|
@@ -4911,7 +4911,7 @@ function zd() {
|
|
|
4911
4911
|
return P(d, "Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."), !(d.disabled || d.hasAttribute("disabled") || d.hasAttribute("readonly"));
|
|
4912
4912
|
}
|
|
4913
4913
|
}
|
|
4914
|
-
function
|
|
4914
|
+
function ne() {
|
|
4915
4915
|
if (typeof window > "u" || !window.ElementInternals || !HTMLElement.prototype.attachInternals)
|
|
4916
4916
|
return !1;
|
|
4917
4917
|
class m extends HTMLElement {
|
|
@@ -4937,9 +4937,9 @@ function zd() {
|
|
|
4937
4937
|
}
|
|
4938
4938
|
let ve = !1, ge = !1;
|
|
4939
4939
|
function et(m) {
|
|
4940
|
-
ge || (ge = !0, window.CustomStateSet =
|
|
4940
|
+
ge || (ge = !0, window.CustomStateSet = Le, m && (HTMLElement.prototype.attachInternals = function(...d) {
|
|
4941
4941
|
const k = m.call(this, d);
|
|
4942
|
-
return k.states = new
|
|
4942
|
+
return k.states = new Le(this), k;
|
|
4943
4943
|
}));
|
|
4944
4944
|
}
|
|
4945
4945
|
function Ze(m = !0) {
|
|
@@ -4967,7 +4967,7 @@ function zd() {
|
|
|
4967
4967
|
}), typeof Element < "u") {
|
|
4968
4968
|
let d = function(...C) {
|
|
4969
4969
|
const j = k.apply(this, C);
|
|
4970
|
-
if (g.set(this, j),
|
|
4970
|
+
if (g.set(this, j), te()) {
|
|
4971
4971
|
const q = new MutationObserver(J);
|
|
4972
4972
|
window.ShadyDOM ? q.observe(this, Y) : q.observe(j, Y), o.set(this, q);
|
|
4973
4973
|
}
|
|
@@ -4976,10 +4976,10 @@ function zd() {
|
|
|
4976
4976
|
const k = Element.prototype.attachShadow;
|
|
4977
4977
|
Element.prototype.attachShadow = d;
|
|
4978
4978
|
}
|
|
4979
|
-
|
|
4979
|
+
te() && typeof document < "u" && new MutationObserver(J).observe(document.documentElement, Y), typeof HTMLFormElement < "u" && U(), (m || typeof window < "u" && !window.CustomStateSet) && et();
|
|
4980
4980
|
}
|
|
4981
4981
|
}
|
|
4982
|
-
return customElements.polyfillWrapFlushCallback || (
|
|
4982
|
+
return customElements.polyfillWrapFlushCallback || (ne() ? typeof window < "u" && !window.CustomStateSet && et(HTMLElement.prototype.attachInternals) : Ze(!1)), n.forceCustomStateSetPolyfill = et, n.forceElementInternalsPolyfill = Ze, Object.defineProperty(n, "__esModule", { value: !0 }), n;
|
|
4983
4983
|
})({});
|
|
4984
4984
|
})()), Wd;
|
|
4985
4985
|
}
|
|
@@ -4990,9 +4990,9 @@ var Yd = Object.defineProperty, fe = (n, e, t, s) => {
|
|
|
4990
4990
|
return i && Yd(e, t, i), i;
|
|
4991
4991
|
};
|
|
4992
4992
|
const Ha = "on", br = "--checked", Ci = ",";
|
|
4993
|
-
let re = class extends
|
|
4993
|
+
let re = class extends Fe {
|
|
4994
4994
|
constructor() {
|
|
4995
|
-
super(), this.defaultValue = null, this.disabled = !1, this.readonly = !1, this.required = !1, this.max = null, this.maxlength = null, this.min = null, this.minlength = null, this.step = null, this.ariaDescribedBy = null, this.ariaLabelledby = null, this.name = "", this.pattern = null, this.placeholder = null, this.id =
|
|
4995
|
+
super(), this.defaultValue = null, this.disabled = !1, this.readonly = !1, this.required = !1, this.max = null, this.maxlength = null, this.min = null, this.minlength = null, this.step = null, this.ariaDescribedBy = null, this.ariaLabelledby = null, this.name = "", this.pattern = null, this.placeholder = null, this.id = Dn(), this.counter = !1, this.hasError = !1, this.inline = !1, this.hasFieldset = !1, this.optionalTag = !1, this.requiredTag = !1, this.skipForwardTestid = !1, this.useWrapper = !0, this.fullwidth = !1, this.counterMaxLength = 0, this.errorMessage = "", this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = It.props.helptextDropdownButton.default, this.label = null, this.optionalText = Dt.forms.labels.optional, this.requiredText = Dt.forms.labels.required, this.tagText = null, this.dataTestid = "", this.touched = !1, this.internals = this.attachInternals();
|
|
4996
4996
|
}
|
|
4997
4997
|
static get formAssociated() {
|
|
4998
4998
|
return !0;
|
|
@@ -5010,17 +5010,17 @@ let re = class extends Be {
|
|
|
5010
5010
|
console.warn("manageValidity called without valid input element");
|
|
5011
5011
|
return;
|
|
5012
5012
|
}
|
|
5013
|
-
this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 },
|
|
5013
|
+
this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 }, Dt.forms.messages.required, e) : (t = e.validity) != null && t.typeMismatch || (s = e.validity) != null && s.badInput ? this.internals.setValidity({ typeMismatch: !0 }, Dt.forms.messages.invalid, e) : (i = e.validity) != null && i.patternMismatch ? this.internals.setValidity(
|
|
5014
5014
|
{ patternMismatch: !0 },
|
|
5015
|
-
|
|
5015
|
+
Dt.forms.messages.invalidPattern,
|
|
5016
5016
|
e
|
|
5017
|
-
) : (r = e.validity) != null && r.tooShort || this.minlength && this.minlength > 0 && this.value.length < this.minlength ? this.internals.setValidity({ tooShort: !0 },
|
|
5017
|
+
) : (r = e.validity) != null && r.tooShort || this.minlength && this.minlength > 0 && this.value.length < this.minlength ? this.internals.setValidity({ tooShort: !0 }, Dt.forms.messages.tooShort, e) : (a = e.validity) != null && a.tooLong || this.maxlength && this.maxlength > 0 && this.value.length > this.maxlength ? this.internals.setValidity({ tooLong: !0 }, Dt.forms.messages.tooLong, e) : (o = e.validity) != null && o.rangeUnderflow ? this.internals.setValidity(
|
|
5018
5018
|
{ rangeUnderflow: !0 },
|
|
5019
|
-
this.min ?
|
|
5019
|
+
this.min ? Dt.forms.messages.rangeUnderflowMin.replace("{min}", (l = this.min) == null ? void 0 : l.toString()) : Dt.forms.messages.rangeUnderflow,
|
|
5020
5020
|
e
|
|
5021
|
-
) : (h = e.validity) != null && h.stepMismatch ? this.internals.setValidity({ stepMismatch: !0 },
|
|
5021
|
+
) : (h = e.validity) != null && h.stepMismatch ? this.internals.setValidity({ stepMismatch: !0 }, Dt.forms.messages.invalid, e) : (f = e.validity) != null && f.rangeOverflow ? this.internals.setValidity(
|
|
5022
5022
|
{ rangeOverflow: !0 },
|
|
5023
|
-
this.max ?
|
|
5023
|
+
this.max ? Dt.forms.messages.rangeOverflowMax.replace("{max}", (g = this.max) == null ? void 0 : g.toString()) : Dt.forms.messages.rangeOverflow,
|
|
5024
5024
|
e
|
|
5025
5025
|
) : (p = e.validity) != null && p.customError ? this.internals.setValidity({ customError: !0 }, e.validationMessage, e) : this.internals.setValidity({});
|
|
5026
5026
|
}
|
|
@@ -5378,9 +5378,9 @@ var Kd = Object.defineProperty, Gd = Object.getOwnPropertyDescriptor, ts = (n, e
|
|
|
5378
5378
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
5379
5379
|
return s && i && Kd(e, t, i), i;
|
|
5380
5380
|
};
|
|
5381
|
-
let bn = class extends
|
|
5381
|
+
let bn = class extends Fe {
|
|
5382
5382
|
constructor() {
|
|
5383
|
-
super(), this.defaultSlot = Z(), this.forId =
|
|
5383
|
+
super(), this.defaultSlot = Z(), this.forId = Dn(), this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = It.props.helptextDropdownButton.default, this.isHelpTextOpen = !1, this.filledSlots = /* @__PURE__ */ new Set(), this.slotController = new rt(this, this.defaultSlot);
|
|
5384
5384
|
}
|
|
5385
5385
|
updateSlots(e) {
|
|
5386
5386
|
this.filledSlots = new Set(e);
|
|
@@ -5421,7 +5421,7 @@ let bn = class extends Be {
|
|
|
5421
5421
|
</div>` : x;
|
|
5422
5422
|
return y`${y`<div class="${t}">
|
|
5423
5423
|
<div class="pkt-inputwrapper__helptext" id="${this.forId}-helptext">
|
|
5424
|
-
<div class="pkt-contents" ${
|
|
5424
|
+
<div class="pkt-contents" ${G(this.defaultSlot)} name="helptext"></div>
|
|
5425
5425
|
${this.helptext && Ei(this.helptext)}
|
|
5426
5426
|
</div>
|
|
5427
5427
|
${s()}
|
|
@@ -5449,14 +5449,14 @@ ts([
|
|
|
5449
5449
|
bn = ts([
|
|
5450
5450
|
ye("pkt-helptext")
|
|
5451
5451
|
], bn);
|
|
5452
|
-
var Qd = Object.defineProperty, Xd = Object.getOwnPropertyDescriptor,
|
|
5452
|
+
var Qd = Object.defineProperty, Xd = Object.getOwnPropertyDescriptor, Ge = (n, e, t, s) => {
|
|
5453
5453
|
for (var i = s > 1 ? void 0 : s ? Xd(e, t) : e, r = n.length - 1, a; r >= 0; r--)
|
|
5454
5454
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
5455
5455
|
return s && i && Qd(e, t, i), i;
|
|
5456
5456
|
};
|
|
5457
|
-
let
|
|
5457
|
+
let Ye = class extends Fe {
|
|
5458
5458
|
constructor() {
|
|
5459
|
-
super(), this.defaultSlot = Z(), this.helptextSlot = Z(), this.forId =
|
|
5459
|
+
super(), this.defaultSlot = Z(), this.helptextSlot = Z(), this.forId = Dn(), this.label = "", this.helptext = null, this.helptextDropdown = null, this.helptextDropdownButton = null, this.counter = It.props.counter.default, this.counterCurrent = 0, this.counterMaxLength = 0, this.counterError = null, this.counterPosition = "bottom", this.optionalTag = It.props.optionalTag.default, this.optionalText = It.props.optionalText.default, this.requiredTag = It.props.requiredTag.default, this.requiredText = It.props.requiredText.default, this.tagText = null, this.hasError = It.props.hasError.default, this.errorMessage = "", this.disabled = It.props.disabled.default, this.inline = It.props.inline.default, this.ariaDescribedby = void 0, this.hasFieldset = It.props.hasFieldset.default, this.role = "group", this.useWrapper = It.props.useWrapper.default, this.slotController = new rt(this, this.defaultSlot, this.helptextSlot);
|
|
5460
5460
|
}
|
|
5461
5461
|
updated(e) {
|
|
5462
5462
|
super.updated(e);
|
|
@@ -5501,7 +5501,7 @@ let We = class extends Be {
|
|
|
5501
5501
|
@toggleHelpText=${(g) => {
|
|
5502
5502
|
this.toggleDropdown(g);
|
|
5503
5503
|
}}
|
|
5504
|
-
${
|
|
5504
|
+
${G(this.helptextSlot)}
|
|
5505
5505
|
name="helptext"
|
|
5506
5506
|
></pkt-helptext>
|
|
5507
5507
|
`, o = () => this.counter ? y`<div class="pkt-input__counter" aria-live="polite" aria-atomic="true">
|
|
@@ -5519,7 +5519,7 @@ let We = class extends Be {
|
|
|
5519
5519
|
${r()}
|
|
5520
5520
|
${a()}
|
|
5521
5521
|
${this.counterPosition === "top" ? o() : x}
|
|
5522
|
-
<div class="pkt-contents" ${
|
|
5522
|
+
<div class="pkt-contents" ${G(this.defaultSlot)}></div>
|
|
5523
5523
|
${this.counterPosition === "bottom" ? o() : x}
|
|
5524
5524
|
${l()}
|
|
5525
5525
|
`, f = () => this.hasFieldset ? y`<fieldset class="pkt-inputwrapper__fieldset" aria-describedby="${s}">
|
|
@@ -5545,78 +5545,78 @@ let We = class extends Be {
|
|
|
5545
5545
|
);
|
|
5546
5546
|
}
|
|
5547
5547
|
};
|
|
5548
|
-
|
|
5548
|
+
Ge([
|
|
5549
5549
|
c({ type: String })
|
|
5550
|
-
],
|
|
5551
|
-
|
|
5550
|
+
], Ye.prototype, "forId", 2);
|
|
5551
|
+
Ge([
|
|
5552
5552
|
c({ type: String })
|
|
5553
|
-
],
|
|
5554
|
-
|
|
5553
|
+
], Ye.prototype, "label", 2);
|
|
5554
|
+
Ge([
|
|
5555
5555
|
c({ type: String })
|
|
5556
|
-
],
|
|
5557
|
-
|
|
5556
|
+
], Ye.prototype, "helptext", 2);
|
|
5557
|
+
Ge([
|
|
5558
5558
|
c({ type: String })
|
|
5559
|
-
],
|
|
5560
|
-
|
|
5559
|
+
], Ye.prototype, "helptextDropdown", 2);
|
|
5560
|
+
Ge([
|
|
5561
5561
|
c({ type: String })
|
|
5562
|
-
],
|
|
5563
|
-
|
|
5562
|
+
], Ye.prototype, "helptextDropdownButton", 2);
|
|
5563
|
+
Ge([
|
|
5564
5564
|
c({ type: Boolean })
|
|
5565
|
-
],
|
|
5566
|
-
|
|
5565
|
+
], Ye.prototype, "counter", 2);
|
|
5566
|
+
Ge([
|
|
5567
5567
|
c({ type: Number })
|
|
5568
|
-
],
|
|
5569
|
-
|
|
5568
|
+
], Ye.prototype, "counterCurrent", 2);
|
|
5569
|
+
Ge([
|
|
5570
5570
|
c({ type: Number })
|
|
5571
|
-
],
|
|
5572
|
-
|
|
5571
|
+
], Ye.prototype, "counterMaxLength", 2);
|
|
5572
|
+
Ge([
|
|
5573
5573
|
c({ type: String })
|
|
5574
|
-
],
|
|
5575
|
-
|
|
5574
|
+
], Ye.prototype, "counterError", 2);
|
|
5575
|
+
Ge([
|
|
5576
5576
|
c({ type: String, reflect: !1 })
|
|
5577
|
-
],
|
|
5578
|
-
|
|
5577
|
+
], Ye.prototype, "counterPosition", 2);
|
|
5578
|
+
Ge([
|
|
5579
5579
|
c({ type: Boolean })
|
|
5580
|
-
],
|
|
5581
|
-
|
|
5580
|
+
], Ye.prototype, "optionalTag", 2);
|
|
5581
|
+
Ge([
|
|
5582
5582
|
c({ type: String })
|
|
5583
|
-
],
|
|
5584
|
-
|
|
5583
|
+
], Ye.prototype, "optionalText", 2);
|
|
5584
|
+
Ge([
|
|
5585
5585
|
c({ type: Boolean })
|
|
5586
|
-
],
|
|
5587
|
-
|
|
5586
|
+
], Ye.prototype, "requiredTag", 2);
|
|
5587
|
+
Ge([
|
|
5588
5588
|
c({ type: String })
|
|
5589
|
-
],
|
|
5590
|
-
|
|
5589
|
+
], Ye.prototype, "requiredText", 2);
|
|
5590
|
+
Ge([
|
|
5591
5591
|
c({ type: String })
|
|
5592
|
-
],
|
|
5593
|
-
|
|
5592
|
+
], Ye.prototype, "tagText", 2);
|
|
5593
|
+
Ge([
|
|
5594
5594
|
c({ type: Boolean })
|
|
5595
|
-
],
|
|
5596
|
-
|
|
5595
|
+
], Ye.prototype, "hasError", 2);
|
|
5596
|
+
Ge([
|
|
5597
5597
|
c({ type: String })
|
|
5598
|
-
],
|
|
5599
|
-
|
|
5598
|
+
], Ye.prototype, "errorMessage", 2);
|
|
5599
|
+
Ge([
|
|
5600
5600
|
c({ type: Boolean })
|
|
5601
|
-
],
|
|
5602
|
-
|
|
5601
|
+
], Ye.prototype, "disabled", 2);
|
|
5602
|
+
Ge([
|
|
5603
5603
|
c({ type: Boolean })
|
|
5604
|
-
],
|
|
5605
|
-
|
|
5604
|
+
], Ye.prototype, "inline", 2);
|
|
5605
|
+
Ge([
|
|
5606
5606
|
c({ type: String })
|
|
5607
|
-
],
|
|
5608
|
-
|
|
5607
|
+
], Ye.prototype, "ariaDescribedby", 2);
|
|
5608
|
+
Ge([
|
|
5609
5609
|
c({ type: Boolean })
|
|
5610
|
-
],
|
|
5611
|
-
|
|
5610
|
+
], Ye.prototype, "hasFieldset", 2);
|
|
5611
|
+
Ge([
|
|
5612
5612
|
c({ type: String, reflect: !0 })
|
|
5613
|
-
],
|
|
5614
|
-
|
|
5613
|
+
], Ye.prototype, "role", 2);
|
|
5614
|
+
Ge([
|
|
5615
5615
|
c({ type: Boolean, reflect: !0, converter: Et })
|
|
5616
|
-
],
|
|
5617
|
-
|
|
5616
|
+
], Ye.prototype, "useWrapper", 2);
|
|
5617
|
+
Ye = Ge([
|
|
5618
5618
|
ye("pkt-input-wrapper")
|
|
5619
|
-
],
|
|
5619
|
+
], Ye);
|
|
5620
5620
|
const Zd = (n, e, t) => {
|
|
5621
5621
|
switch (n) {
|
|
5622
5622
|
case ",":
|
|
@@ -5845,7 +5845,7 @@ class ih extends at {
|
|
|
5845
5845
|
var t, s;
|
|
5846
5846
|
if (this.disabled) return;
|
|
5847
5847
|
this.touched = !0, this._userInfoMessage = "", this._addValueText = null;
|
|
5848
|
-
const i = ((t = rn(this.options, e)) == null ? void 0 : t.value) || null, r = this._value.includes(e || i || ""), a = !!i, o = ((s = this._options.find((
|
|
5848
|
+
const i = ((t = rn(this.options, e)) == null ? void 0 : t.value) || null, r = this._value.includes(e || i || ""), a = !!i, o = ((s = this._options.find((D) => D.value === e)) == null ? void 0 : s.disabled) || !1, l = !(e != null && e.trim()), h = !this.multiple, f = this.multiple, g = Ai(this._value.length, this.maxlength);
|
|
5849
5849
|
let p = !1, b = !0, v = "", $ = "";
|
|
5850
5850
|
o || (!a && this.allowUserInput && !l ? (this.addNewUserValue(e), v = "Ny verdi lagt til", p = f) : !a && !this.allowUserInput ? (h && this._value[0] && this.removeValue(this._value[0]), b = !1, p = !0, v = "Ingen treff i søket") : r ? (this.removeValue(i), p = !0, h && this._hasTextInput && this.inputRef.value && this.inputRef.value.type !== "hidden" && (this.inputRef.value.value = "")) : l && h ? (this.removeAllSelected(), p = !0) : h ? (this._value[0] && this.removeSelected(this._value[0]), this.setSelected(i), p = !1) : f && !g ? (this.setSelected(i), p = !0) : f && g ? (v = "Maks antall valg nådd", b = !1, $ = e) : (h && this.removeAllSelected(), v = "Ingen gyldig verdi valgt", b = !1, p = !0, $ = e), this._isOptionsOpen = p, p || (h && this._hasTextInput && (this._suppressNextOpen = !0), window.setTimeout(() => {
|
|
5851
5851
|
this.focusTrigger();
|
|
@@ -6253,7 +6253,7 @@ let Wa = class extends rh {
|
|
|
6253
6253
|
class="pkt-combobox__wrapper"
|
|
6254
6254
|
@labelClick=${this.handleInputClick}
|
|
6255
6255
|
>
|
|
6256
|
-
<div class="pkt-contents" ${
|
|
6256
|
+
<div class="pkt-contents" ${G(this.helptextSlot)} name="helptext" slot="helptext"></div>
|
|
6257
6257
|
<div class="pkt-combobox" @focusout=${this.handleFocusOut}>
|
|
6258
6258
|
<div
|
|
6259
6259
|
class=${z({
|
|
@@ -6280,7 +6280,7 @@ let Wa = class extends rh {
|
|
|
6280
6280
|
tabindex=${this._hasTextInput || this.disabled ? "-1" : "0"}
|
|
6281
6281
|
@click=${this.handleInputClick}
|
|
6282
6282
|
@keydown=${this._hasTextInput ? x : this.handleSelectOnlyKeydown}
|
|
6283
|
-
${
|
|
6283
|
+
${G(this.triggerRef)}
|
|
6284
6284
|
>
|
|
6285
6285
|
${!this._hasTextInput && this.placeholder && (!this._value.length || this.multiple && this.tagPlacement == "outside") && !this._inputFocus ? y`<span class="pkt-combobox__placeholder" @click=${this.handlePlaceholderClick}
|
|
6286
6286
|
>${this.placeholder}</span
|
|
@@ -6315,7 +6315,7 @@ let Wa = class extends rh {
|
|
|
6315
6315
|
@tab-close=${() => this.closeAndProcessInput()}
|
|
6316
6316
|
.searchValue=${this._search || null}
|
|
6317
6317
|
.maxLength=${this.maxlength || 0}
|
|
6318
|
-
${
|
|
6318
|
+
${G(this.listboxRef)}
|
|
6319
6319
|
></pkt-listbox>
|
|
6320
6320
|
</div>
|
|
6321
6321
|
|
|
@@ -6352,7 +6352,7 @@ let Wa = class extends rh {
|
|
|
6352
6352
|
this._value[0] && rn(this.options, this._value[0]) ? `${this.id}-listbox-${Va(this._options, this._value[0])}` : void 0
|
|
6353
6353
|
)}
|
|
6354
6354
|
aria-description=${I(this._selectionDescription || void 0)}
|
|
6355
|
-
${
|
|
6355
|
+
${G(this.inputRef)}
|
|
6356
6356
|
/>
|
|
6357
6357
|
</div>
|
|
6358
6358
|
` : y`
|
|
@@ -6361,7 +6361,7 @@ let Wa = class extends rh {
|
|
|
6361
6361
|
id="${this.id}-input"
|
|
6362
6362
|
name=${(this.name || this.id) + "-input"}
|
|
6363
6363
|
.value=${this._value.join(",")}
|
|
6364
|
-
${
|
|
6364
|
+
${G(this.inputRef)}
|
|
6365
6365
|
/>
|
|
6366
6366
|
`;
|
|
6367
6367
|
}
|
|
@@ -6490,7 +6490,7 @@ function uh() {
|
|
|
6490
6490
|
s.href = "https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.css", s.type = "text/css", s.rel = "stylesheet", s.id = "oslo-consent-styles", document.head.appendChild(s);
|
|
6491
6491
|
}), kr);
|
|
6492
6492
|
}
|
|
6493
|
-
let qt = class extends
|
|
6493
|
+
let qt = class extends Fe {
|
|
6494
6494
|
constructor() {
|
|
6495
6495
|
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";
|
|
6496
6496
|
}
|
|
@@ -6641,7 +6641,7 @@ let yt = class extends re {
|
|
|
6641
6641
|
type="checkbox"
|
|
6642
6642
|
?disabled=${this.disabled}
|
|
6643
6643
|
name=${this.name + "-internal"}
|
|
6644
|
-
${
|
|
6644
|
+
${G(this.inputRef)}
|
|
6645
6645
|
@change=${this.handleChange}
|
|
6646
6646
|
@click=${this.handleClick}
|
|
6647
6647
|
@blur=${this.onBlur}
|
|
@@ -6735,9 +6735,9 @@ var fh = Object.defineProperty, mh = Object.getOwnPropertyDescriptor, mi = (n, e
|
|
|
6735
6735
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
6736
6736
|
return s && i && fh(e, t, i), i;
|
|
6737
6737
|
};
|
|
6738
|
-
let _s = class extends
|
|
6738
|
+
let _s = class extends Fe {
|
|
6739
6739
|
constructor() {
|
|
6740
|
-
super(...arguments), this.dates = [], this.dateformat = "dd.MM.yyyy", this.className = "pkt-datepicker__tags", this.idBase =
|
|
6740
|
+
super(...arguments), this.dates = [], this.dateformat = "dd.MM.yyyy", this.className = "pkt-datepicker__tags", this.idBase = Dn();
|
|
6741
6741
|
}
|
|
6742
6742
|
render() {
|
|
6743
6743
|
return this.classes = {
|
|
@@ -6876,12 +6876,12 @@ const gh = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
|
|
|
6876
6876
|
handleInputKeydown: Ch,
|
|
6877
6877
|
handleButtonKeydown: Th
|
|
6878
6878
|
};
|
|
6879
|
-
var
|
|
6880
|
-
for (var i = s > 1 ? void 0 : s ?
|
|
6879
|
+
var Dh = Object.defineProperty, Oh = Object.getOwnPropertyDescriptor, Ct = (n, e, t, s) => {
|
|
6880
|
+
for (var i = s > 1 ? void 0 : s ? Oh(e, t) : e, r = n.length - 1, a; r >= 0; r--)
|
|
6881
6881
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
6882
|
-
return s && i &&
|
|
6882
|
+
return s && i && Dh(e, t, i), i;
|
|
6883
6883
|
};
|
|
6884
|
-
let wt = class extends
|
|
6884
|
+
let wt = class extends Fe {
|
|
6885
6885
|
constructor() {
|
|
6886
6886
|
super(...arguments), this.open = !1, this.multiple = !1, this.range = !1, this.weeknumbers = !1, this.withcontrols = !1, this.maxMultiple = null, this.selected = [], this.earliest = null, this.latest = null, this.excludedates = [], this.excludeweekdays = [], this.currentmonth = null, this.today = null, this._hasBeenOpened = !1, this.popupRef = Z(), this.calendarRef = Z(), this.handleDocumentClick = (e) => {
|
|
6887
6887
|
if (!this.open) return;
|
|
@@ -6939,13 +6939,13 @@ let wt = class extends Be {
|
|
|
6939
6939
|
return y`
|
|
6940
6940
|
<div
|
|
6941
6941
|
class="${z(e)}"
|
|
6942
|
-
${
|
|
6942
|
+
${G(this.popupRef)}
|
|
6943
6943
|
id="date-popup"
|
|
6944
6944
|
?hidden=${!this.open}
|
|
6945
6945
|
aria-hidden="${!this.open}"
|
|
6946
6946
|
>
|
|
6947
6947
|
${this.open || this._hasBeenOpened ? y`<pkt-calendar
|
|
6948
|
-
${
|
|
6948
|
+
${G(this.calendarRef)}
|
|
6949
6949
|
?multiple=${this.multiple}
|
|
6950
6950
|
?range=${this.range}
|
|
6951
6951
|
?weeknumbers=${this.weeknumbers}
|
|
@@ -7021,7 +7021,7 @@ var Mh = Object.defineProperty, _n = (n, e, t, s) => {
|
|
|
7021
7021
|
(a = n[r]) && (i = a(e, t, i) || i);
|
|
7022
7022
|
return i && Mh(e, t, i), i;
|
|
7023
7023
|
};
|
|
7024
|
-
let Wt = class extends
|
|
7024
|
+
let Wt = class extends Fe {
|
|
7025
7025
|
constructor() {
|
|
7026
7026
|
super(...arguments), this.inputType = "date", this.id = "", this.readonly = !1, this.disabled = !1, this.inputClasses = {}, this.inputRef = Z(), this.btnRef = Z();
|
|
7027
7027
|
}
|
|
@@ -7201,7 +7201,7 @@ let zi = class extends Wt {
|
|
|
7201
7201
|
@change=${(e) => {
|
|
7202
7202
|
this.dispatchChange(e), e.stopImmediatePropagation();
|
|
7203
7203
|
}}
|
|
7204
|
-
${
|
|
7204
|
+
${G(this.inputRef)}
|
|
7205
7205
|
/>
|
|
7206
7206
|
${this.renderCalendarButton()}
|
|
7207
7207
|
</div>
|
|
@@ -7293,7 +7293,7 @@ let $s = class extends Wt {
|
|
|
7293
7293
|
@change=${(a) => {
|
|
7294
7294
|
this.dispatchChange(a), a.stopImmediatePropagation();
|
|
7295
7295
|
}}
|
|
7296
|
-
${
|
|
7296
|
+
${G(this.inputRef)}
|
|
7297
7297
|
/>
|
|
7298
7298
|
<div class="${z(r)}" id="${this.id}-to-label">
|
|
7299
7299
|
${(s = this.strings.generic) == null ? void 0 : s.to}
|
|
@@ -7351,7 +7351,7 @@ let $s = class extends Wt {
|
|
|
7351
7351
|
@change=${(a) => {
|
|
7352
7352
|
this.dispatchChange(a), a.stopImmediatePropagation();
|
|
7353
7353
|
}}
|
|
7354
|
-
${
|
|
7354
|
+
${G(this.inputRefTo)}
|
|
7355
7355
|
/>
|
|
7356
7356
|
${this.renderCalendarButton()}
|
|
7357
7357
|
</div>
|
|
@@ -7435,7 +7435,7 @@ let li = class extends Wt {
|
|
|
7435
7435
|
@change=${(e) => {
|
|
7436
7436
|
this.dispatchChange(e), e.stopImmediatePropagation();
|
|
7437
7437
|
}}
|
|
7438
|
-
${
|
|
7438
|
+
${G(this.inputRef)}
|
|
7439
7439
|
/>
|
|
7440
7440
|
${this.renderCalendarButton()}
|
|
7441
7441
|
</div>
|
|
@@ -7584,7 +7584,7 @@ let lt = class extends re {
|
|
|
7584
7584
|
@input-changed=${() => {
|
|
7585
7585
|
this.touched = !0;
|
|
7586
7586
|
}}
|
|
7587
|
-
${
|
|
7587
|
+
${G(this.singleInputRef)}
|
|
7588
7588
|
></pkt-datepicker-single>
|
|
7589
7589
|
`;
|
|
7590
7590
|
}
|
|
@@ -7645,7 +7645,7 @@ let lt = class extends re {
|
|
|
7645
7645
|
@input-changed=${() => {
|
|
7646
7646
|
this.touched = !0;
|
|
7647
7647
|
}}
|
|
7648
|
-
${
|
|
7648
|
+
${G(this.rangeInputRef)}
|
|
7649
7649
|
></pkt-datepicker-range>
|
|
7650
7650
|
`;
|
|
7651
7651
|
}
|
|
@@ -7675,7 +7675,7 @@ let lt = class extends re {
|
|
|
7675
7675
|
@input-changed=${() => {
|
|
7676
7676
|
this.touched = !0;
|
|
7677
7677
|
}}
|
|
7678
|
-
${
|
|
7678
|
+
${G(this.multipleInputRef)}
|
|
7679
7679
|
></pkt-datepicker-multiple>
|
|
7680
7680
|
`;
|
|
7681
7681
|
}
|
|
@@ -7709,7 +7709,7 @@ let lt = class extends re {
|
|
|
7709
7709
|
@close=${() => {
|
|
7710
7710
|
this.onBlur(), this.hideCalendar();
|
|
7711
7711
|
}}
|
|
7712
|
-
${
|
|
7712
|
+
${G(this.datepickerPopupRef)}
|
|
7713
7713
|
></pkt-datepicker-popup>
|
|
7714
7714
|
`;
|
|
7715
7715
|
}
|
|
@@ -7746,7 +7746,7 @@ let lt = class extends re {
|
|
|
7746
7746
|
.ariaDescribedBy=${this.ariaDescribedBy}
|
|
7747
7747
|
class="pkt-datepicker"
|
|
7748
7748
|
>
|
|
7749
|
-
<div class="pkt-contents" ${
|
|
7749
|
+
<div class="pkt-contents" ${G(this.helptextSlot)} name="helptext" slot="helptext"></div>
|
|
7750
7750
|
${this.multiple ? y`<pkt-date-tags
|
|
7751
7751
|
.dates=${this._value}
|
|
7752
7752
|
dateformat=${this.dateformat}
|
|
@@ -7870,7 +7870,7 @@ var Uh = Object.defineProperty, jh = Object.getOwnPropertyDescriptor, Ts = (n, e
|
|
|
7870
7870
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
7871
7871
|
return s && i && Uh(e, t, i), i;
|
|
7872
7872
|
};
|
|
7873
|
-
let Qn = class extends
|
|
7873
|
+
let Qn = class extends Fe {
|
|
7874
7874
|
constructor() {
|
|
7875
7875
|
super(), this.defaultSlot = Z(), this.href = Ya.props.href.default, this.iconName = void 0, this.iconPosition = void 0, this.external = !1, this.target = Ya.props.target.default, this.slotController = new rt(this, this.defaultSlot);
|
|
7876
7876
|
}
|
|
@@ -7886,7 +7886,7 @@ let Qn = class extends Be {
|
|
|
7886
7886
|
href=${this.href}
|
|
7887
7887
|
.target=${this.target}
|
|
7888
7888
|
.rel=${this.external ? "noopener noreferrer" : x}
|
|
7889
|
-
>${this.iconName ? y`<pkt-icon name=${this.iconName} class="pkt-link__icon"></pkt-icon>` : ""} <span ${
|
|
7889
|
+
>${this.iconName ? y`<pkt-icon name=${this.iconName} class="pkt-link__icon"></pkt-icon>` : ""} <span ${G(this.defaultSlot)}>Link</span></a
|
|
7890
7890
|
>`;
|
|
7891
7891
|
}
|
|
7892
7892
|
};
|
|
@@ -7955,11 +7955,11 @@ let Xt = class extends re {
|
|
|
7955
7955
|
.tagText=${this.tagText}
|
|
7956
7956
|
class="pkt-textinput"
|
|
7957
7957
|
>
|
|
7958
|
-
<div class="pkt-contents" ${
|
|
7958
|
+
<div class="pkt-contents" ${G(this.helptextSlot)} name="helptext" slot="helptext"></div>
|
|
7959
7959
|
<div class="pkt-input__container">
|
|
7960
7960
|
${this.prefix ? y`<div class="pkt-input-prefix">${this.prefix}</div>` : x}
|
|
7961
7961
|
<input
|
|
7962
|
-
${
|
|
7962
|
+
${G(this.inputRef)}
|
|
7963
7963
|
class=${t}
|
|
7964
7964
|
type=${this.type}
|
|
7965
7965
|
name=${(this.name || this.id) + "-input"}
|
|
@@ -8063,7 +8063,7 @@ var Kh = Object.defineProperty, Gh = Object.getOwnPropertyDescriptor, ns = (n, e
|
|
|
8063
8063
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
8064
8064
|
return s && i && Kh(e, t, i), i;
|
|
8065
8065
|
};
|
|
8066
|
-
let An = class extends
|
|
8066
|
+
let An = class extends Fe {
|
|
8067
8067
|
constructor() {
|
|
8068
8068
|
super(...arguments), this.canChangeRepresentation = !1, this.logoutOnClick = !1;
|
|
8069
8069
|
}
|
|
@@ -8232,7 +8232,7 @@ var Qh = Object.defineProperty, Xh = Object.getOwnPropertyDescriptor, Ne = (n, e
|
|
|
8232
8232
|
return s && i && Qh(e, t, i), i;
|
|
8233
8233
|
};
|
|
8234
8234
|
const Zh = "https://punkt-cdn.oslo.kommune.no/16.0/logos/";
|
|
8235
|
-
let Se = class extends
|
|
8235
|
+
let Se = class extends Fe {
|
|
8236
8236
|
constructor() {
|
|
8237
8237
|
super(), this.searchPlaceholder = "Søk", this.searchValue = "", this.mobileBreakpoint = 768, this.tabletBreakpoint = 1280, this.openedMenu = "none", this.logOutButtonPlacement = "none", this.position = "fixed", this.scrollBehavior = "hide", this.slotMenuVariant = "icon-only", this.slotMenuText = "Meny", this.hideLogo = !1, this.compact = !1, this.showSearch = !1, this.canChangeRepresentation = !1, this.hasLogOut = !1, this.isMobile = !1, this.isTablet = !1, this.openMenu = "none", this.isHidden = !1, this.componentWidth = typeof window < "u" ? window.innerWidth : 0, this.hasSlotContent = !1, this.alignSlotRight = !1, this.alignSearchRight = !1, this.defaultSlot = Z(), this.headerRef = Z(), this.userContainerRef = Z(), this.slotContainerRef = Z(), this.searchContainerRef = Z(), this.slotContentRef = Z(), this.searchMenuRef = Z(), this.lastScrollPosition = 0, this.savedScrollY = 0, this.lastFocusedElement = null, this.shouldRestoreFocus = !1, this.handleScroll = () => {
|
|
8238
8238
|
if (!this.shouldHideOnScroll) return;
|
|
@@ -8456,7 +8456,7 @@ let Se = class extends Be {
|
|
|
8456
8456
|
<div
|
|
8457
8457
|
class=${e}
|
|
8458
8458
|
@focusout=${(s) => this.handleFocusOut(s, "slot")}
|
|
8459
|
-
${
|
|
8459
|
+
${G(this.slotContainerRef)}
|
|
8460
8460
|
>
|
|
8461
8461
|
${this.isTablet && this.hasSlotContent ? y`
|
|
8462
8462
|
<pkt-button
|
|
@@ -8478,8 +8478,8 @@ let Se = class extends Be {
|
|
|
8478
8478
|
id="mobile-slot-menu"
|
|
8479
8479
|
role=${this.isTablet ? "menu" : x}
|
|
8480
8480
|
aria-label=${this.isTablet ? "Meny" : x}
|
|
8481
|
-
${
|
|
8482
|
-
${
|
|
8481
|
+
${G(this.slotContentRef)}
|
|
8482
|
+
${G(this.defaultSlot)}
|
|
8483
8483
|
></div>
|
|
8484
8484
|
</div>
|
|
8485
8485
|
`;
|
|
@@ -8499,7 +8499,7 @@ let Se = class extends Be {
|
|
|
8499
8499
|
<div
|
|
8500
8500
|
class=${e}
|
|
8501
8501
|
@focusout=${(s) => this.handleFocusOut(s, "search")}
|
|
8502
|
-
${
|
|
8502
|
+
${G(this.searchContainerRef)}
|
|
8503
8503
|
>
|
|
8504
8504
|
<pkt-button
|
|
8505
8505
|
skin="secondary"
|
|
@@ -8514,7 +8514,7 @@ let Se = class extends Be {
|
|
|
8514
8514
|
>
|
|
8515
8515
|
Søk
|
|
8516
8516
|
</pkt-button>
|
|
8517
|
-
<div class=${t} ${
|
|
8517
|
+
<div class=${t} ${G(this.searchMenuRef)}>
|
|
8518
8518
|
${this.openMenu === "search" ? y`
|
|
8519
8519
|
<pkt-textinput
|
|
8520
8520
|
id="mobile-search-menu"
|
|
@@ -8562,7 +8562,7 @@ let Se = class extends Be {
|
|
|
8562
8562
|
<div
|
|
8563
8563
|
class="pkt-header-service__user-container"
|
|
8564
8564
|
@focusout=${(s) => this.handleFocusOut(s, "user")}
|
|
8565
|
-
${
|
|
8565
|
+
${G(this.userContainerRef)}
|
|
8566
8566
|
>
|
|
8567
8567
|
<pkt-button
|
|
8568
8568
|
class=${z({
|
|
@@ -8613,7 +8613,7 @@ let Se = class extends Be {
|
|
|
8613
8613
|
"pkt-header-service__logo-area--without-service": !this.serviceName
|
|
8614
8614
|
});
|
|
8615
8615
|
return y`
|
|
8616
|
-
<header class=${e} ${
|
|
8616
|
+
<header class=${e} ${G(this.headerRef)}>
|
|
8617
8617
|
<div class=${t}>${this.renderLogo()} ${this.renderServiceName()}</div>
|
|
8618
8618
|
|
|
8619
8619
|
<div class="pkt-header-service__content">
|
|
@@ -8761,12 +8761,12 @@ Ne([
|
|
|
8761
8761
|
Se = Ne([
|
|
8762
8762
|
ye("pkt-header-service")
|
|
8763
8763
|
], Se);
|
|
8764
|
-
var Jh = Object.defineProperty, ep = Object.getOwnPropertyDescriptor,
|
|
8764
|
+
var Jh = Object.defineProperty, ep = Object.getOwnPropertyDescriptor, Qe = (n, e, t, s) => {
|
|
8765
8765
|
for (var i = s > 1 ? void 0 : s ? ep(e, t) : e, r = n.length - 1, a; r >= 0; r--)
|
|
8766
8766
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
8767
8767
|
return s && i && Jh(e, t, i), i;
|
|
8768
8768
|
};
|
|
8769
|
-
let
|
|
8769
|
+
let Ke = class extends Fe {
|
|
8770
8770
|
constructor() {
|
|
8771
8771
|
super(), this.defaultSlot = Z(), this.searchPlaceholder = "Søk", this.searchValue = "", this.mobileBreakpoint = 768, this.tabletBreakpoint = 1280, this.openedMenu = "none", this.logOutButtonPlacement = "none", this.position = "fixed", this.scrollBehavior = "hide", this.slotMenuVariant = "icon-only", this.slotMenuText = "Meny", this.hideLogo = !1, this.compact = !1, this.showSearch = !1, this.canChangeRepresentation = !1, this.hasLogOut = !1, this.slotController = new rt(this, this.defaultSlot);
|
|
8772
8772
|
}
|
|
@@ -8808,93 +8808,93 @@ let ze = class extends Be {
|
|
|
8808
8808
|
.userMenu=${this.effectiveUserMenu}
|
|
8809
8809
|
.representing=${this.representing}
|
|
8810
8810
|
>
|
|
8811
|
-
<div class="pkt-contents" ${
|
|
8811
|
+
<div class="pkt-contents" ${G(this.defaultSlot)}></div>
|
|
8812
8812
|
</pkt-header-service>
|
|
8813
8813
|
`;
|
|
8814
8814
|
}
|
|
8815
8815
|
};
|
|
8816
|
-
|
|
8816
|
+
Qe([
|
|
8817
8817
|
c({ type: String, attribute: "service-name" })
|
|
8818
|
-
],
|
|
8819
|
-
|
|
8818
|
+
], Ke.prototype, "serviceName", 2);
|
|
8819
|
+
Qe([
|
|
8820
8820
|
c({ type: String, attribute: "service-link" })
|
|
8821
|
-
],
|
|
8822
|
-
|
|
8821
|
+
], Ke.prototype, "serviceLink", 2);
|
|
8822
|
+
Qe([
|
|
8823
8823
|
c({ type: String, attribute: "logo-link" })
|
|
8824
|
-
],
|
|
8825
|
-
|
|
8824
|
+
], Ke.prototype, "logoLink", 2);
|
|
8825
|
+
Qe([
|
|
8826
8826
|
c({ type: String, attribute: "search-placeholder" })
|
|
8827
|
-
],
|
|
8828
|
-
|
|
8827
|
+
], Ke.prototype, "searchPlaceholder", 2);
|
|
8828
|
+
Qe([
|
|
8829
8829
|
c({ type: String, attribute: "search-value" })
|
|
8830
|
-
],
|
|
8831
|
-
|
|
8830
|
+
], Ke.prototype, "searchValue", 2);
|
|
8831
|
+
Qe([
|
|
8832
8832
|
c({ type: Number, attribute: "mobile-breakpoint" })
|
|
8833
|
-
],
|
|
8834
|
-
|
|
8833
|
+
], Ke.prototype, "mobileBreakpoint", 2);
|
|
8834
|
+
Qe([
|
|
8835
8835
|
c({ type: Number, attribute: "tablet-breakpoint" })
|
|
8836
|
-
],
|
|
8837
|
-
|
|
8836
|
+
], Ke.prototype, "tabletBreakpoint", 2);
|
|
8837
|
+
Qe([
|
|
8838
8838
|
c({ type: String, attribute: "opened-menu" })
|
|
8839
|
-
],
|
|
8840
|
-
|
|
8839
|
+
], Ke.prototype, "openedMenu", 2);
|
|
8840
|
+
Qe([
|
|
8841
8841
|
c({ type: String, attribute: "log-out-button-placement" })
|
|
8842
|
-
],
|
|
8843
|
-
|
|
8842
|
+
], Ke.prototype, "logOutButtonPlacement", 2);
|
|
8843
|
+
Qe([
|
|
8844
8844
|
c({ type: String })
|
|
8845
|
-
],
|
|
8846
|
-
|
|
8845
|
+
], Ke.prototype, "position", 2);
|
|
8846
|
+
Qe([
|
|
8847
8847
|
c({ type: String, attribute: "scroll-behavior" })
|
|
8848
|
-
],
|
|
8849
|
-
|
|
8848
|
+
], Ke.prototype, "scrollBehavior", 2);
|
|
8849
|
+
Qe([
|
|
8850
8850
|
c({ type: String, attribute: "slot-menu-variant" })
|
|
8851
|
-
],
|
|
8852
|
-
|
|
8851
|
+
], Ke.prototype, "slotMenuVariant", 2);
|
|
8852
|
+
Qe([
|
|
8853
8853
|
c({ type: String, attribute: "slot-menu-text" })
|
|
8854
|
-
],
|
|
8855
|
-
|
|
8854
|
+
], Ke.prototype, "slotMenuText", 2);
|
|
8855
|
+
Qe([
|
|
8856
8856
|
c({ type: Boolean, attribute: "hide-logo", converter: Et })
|
|
8857
|
-
],
|
|
8858
|
-
|
|
8857
|
+
], Ke.prototype, "hideLogo", 2);
|
|
8858
|
+
Qe([
|
|
8859
8859
|
c({ type: Boolean, converter: Et })
|
|
8860
|
-
],
|
|
8861
|
-
|
|
8860
|
+
], Ke.prototype, "compact", 2);
|
|
8861
|
+
Qe([
|
|
8862
8862
|
c({ type: Boolean, attribute: "show-search", converter: Et })
|
|
8863
|
-
],
|
|
8864
|
-
|
|
8863
|
+
], Ke.prototype, "showSearch", 2);
|
|
8864
|
+
Qe([
|
|
8865
8865
|
c({
|
|
8866
8866
|
type: Boolean,
|
|
8867
8867
|
attribute: "can-change-representation",
|
|
8868
8868
|
converter: Et
|
|
8869
8869
|
})
|
|
8870
|
-
],
|
|
8871
|
-
|
|
8870
|
+
], Ke.prototype, "canChangeRepresentation", 2);
|
|
8871
|
+
Qe([
|
|
8872
8872
|
c({ type: Boolean, attribute: "has-log-out", converter: Et })
|
|
8873
|
-
],
|
|
8874
|
-
|
|
8873
|
+
], Ke.prototype, "hasLogOut", 2);
|
|
8874
|
+
Qe([
|
|
8875
8875
|
c({ type: Object })
|
|
8876
|
-
],
|
|
8877
|
-
|
|
8876
|
+
], Ke.prototype, "user", 2);
|
|
8877
|
+
Qe([
|
|
8878
8878
|
c({ type: Array, attribute: "user-menu" })
|
|
8879
|
-
],
|
|
8880
|
-
|
|
8879
|
+
], Ke.prototype, "userMenu", 2);
|
|
8880
|
+
Qe([
|
|
8881
8881
|
c({ type: Object })
|
|
8882
|
-
],
|
|
8883
|
-
|
|
8882
|
+
], Ke.prototype, "representing", 2);
|
|
8883
|
+
Qe([
|
|
8884
8884
|
c({ type: Array, attribute: "user-menu-footer" })
|
|
8885
|
-
],
|
|
8886
|
-
|
|
8885
|
+
], Ke.prototype, "userMenuFooter", 2);
|
|
8886
|
+
Qe([
|
|
8887
8887
|
c({ type: Array, attribute: "user-options" })
|
|
8888
|
-
],
|
|
8889
|
-
|
|
8888
|
+
], Ke.prototype, "userOptions", 2);
|
|
8889
|
+
Ke = Qe([
|
|
8890
8890
|
ye("pkt-header")
|
|
8891
|
-
],
|
|
8891
|
+
], Ke);
|
|
8892
8892
|
var tp = Object.defineProperty, np = Object.getOwnPropertyDescriptor, ss = (n, e, t, s) => {
|
|
8893
8893
|
for (var i = s > 1 ? void 0 : s ? np(e, t) : e, r = n.length - 1, a; r >= 0; r--)
|
|
8894
8894
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
8895
8895
|
return s && i && tp(e, t, i), i;
|
|
8896
8896
|
};
|
|
8897
|
-
let Pn = class extends
|
|
8897
|
+
let Pn = class extends Fe {
|
|
8898
8898
|
constructor() {
|
|
8899
8899
|
super(), this.defaultSlot = Z(), this.title = "", this.href = "#", this.iconName = "", this.external = !1, this.openInNewTab = !1, this.skin = "normal", this.slotController = new rt(this, this.defaultSlot);
|
|
8900
8900
|
}
|
|
@@ -8910,7 +8910,7 @@ let Pn = class extends Be {
|
|
|
8910
8910
|
${this.iconName && y`<pkt-icon class="pkt-link__icon" name="${this.iconName}" />`}
|
|
8911
8911
|
${this.title && y`<div class=${t}>${this.title}</div>`}
|
|
8912
8912
|
|
|
8913
|
-
<div class="pkt-linkcard__text" ${
|
|
8913
|
+
<div class="pkt-linkcard__text" ${G(this.defaultSlot)}></div>
|
|
8914
8914
|
</a>
|
|
8915
8915
|
`;
|
|
8916
8916
|
}
|
|
@@ -8942,7 +8942,7 @@ var sp = Object.defineProperty, ip = Object.getOwnPropertyDescriptor, $n = (n, e
|
|
|
8942
8942
|
return s && i && sp(e, t, i), i;
|
|
8943
8943
|
};
|
|
8944
8944
|
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.0/animations/";
|
|
8945
|
-
let Zt = class extends
|
|
8945
|
+
let Zt = class extends Fe {
|
|
8946
8946
|
constructor() {
|
|
8947
8947
|
super(), this.defaultSlot = Z(), this.delay = 0, this.inline = !1, this.isLoading = !0, this.message = null, this.size = "medium", this.variant = "shapes", this.loadingAnimationPath = window.pktAnimationPath, this._shouldDisplayLoader = !1, this.slotController = new rt(this, this.defaultSlot);
|
|
8948
8948
|
}
|
|
@@ -8975,7 +8975,7 @@ let Zt = class extends Be {
|
|
|
8975
8975
|
></pkt-icon>
|
|
8976
8976
|
${this.message && y`<p>${this.message}</p>`}
|
|
8977
8977
|
</div>` : x}
|
|
8978
|
-
<div class=${t} ${
|
|
8978
|
+
<div class=${t} ${G(this.defaultSlot)}></div>
|
|
8979
8979
|
</div>`;
|
|
8980
8980
|
}
|
|
8981
8981
|
getVariant(e) {
|
|
@@ -9029,7 +9029,7 @@ var ap = Object.defineProperty, op = Object.getOwnPropertyDescriptor, Ns = (n, e
|
|
|
9029
9029
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
9030
9030
|
return s && i && ap(e, t, i), i;
|
|
9031
9031
|
};
|
|
9032
|
-
let Xn = class extends
|
|
9032
|
+
let Xn = class extends Fe {
|
|
9033
9033
|
constructor() {
|
|
9034
9034
|
super(), this.defaultSlot = Z(), this.closable = $r.props.closable.default, this.compact = $r.props.compact.default, this.title = "", this.skin = $r.props.skin.default, this._isClosed = !1, this.close = (n) => {
|
|
9035
9035
|
this._isClosed = !0, this.dispatchEvent(new CustomEvent("close", { detail: { origin: n }, bubbles: !0 })), this.dispatchEvent(new CustomEvent("on-close", { detail: { origin: n }, bubbles: !0 }));
|
|
@@ -9059,7 +9059,7 @@ let Xn = class extends Be {
|
|
|
9059
9059
|
</button>
|
|
9060
9060
|
</div>` : x}
|
|
9061
9061
|
${this.title ? y`<div class="pkt-messagebox__title">${this.title}</div>` : x}
|
|
9062
|
-
<div class="pkt-messagebox__text" ${
|
|
9062
|
+
<div class="pkt-messagebox__text" ${G(this.defaultSlot)}></div>
|
|
9063
9063
|
</div>`;
|
|
9064
9064
|
}
|
|
9065
9065
|
};
|
|
@@ -9089,7 +9089,7 @@ var cp = Object.defineProperty, up = Object.getOwnPropertyDescriptor, en = (n, e
|
|
|
9089
9089
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
9090
9090
|
return s && i && cp(e, t, i), i;
|
|
9091
9091
|
};
|
|
9092
|
-
let Rt = class extends
|
|
9092
|
+
let Rt = class extends Fe {
|
|
9093
9093
|
constructor() {
|
|
9094
9094
|
super(), this.headingText = "", this.removePadding = !1, this.hideCloseButton = wr.props.hideCloseButton.default, this.closeOnBackdropClick = wr.props.closeOnBackdropClick.default, this.closeButtonSkin = "blue", this.size = wr.props.size.default, this.variant = "dialog", this.drawerPosition = "right", this.transparentBackdrop = !1, this.defaultSlot = Z(), this.dialogRef = Z(), this._isOpen = !1, this.close = (n, e = !1) => {
|
|
9095
9095
|
var t;
|
|
@@ -9157,7 +9157,7 @@ let Rt = class extends Be {
|
|
|
9157
9157
|
return y`
|
|
9158
9158
|
<dialog
|
|
9159
9159
|
class=${z(n)}
|
|
9160
|
-
${
|
|
9160
|
+
${G(this.dialogRef)}
|
|
9161
9161
|
aria-labelledby="pkt-modal__headingText"
|
|
9162
9162
|
aria-describedby="pkt-modal__content"
|
|
9163
9163
|
@close=${(r) => this.close(r, !0)}
|
|
@@ -9185,7 +9185,7 @@ let Rt = class extends Be {
|
|
|
9185
9185
|
<div
|
|
9186
9186
|
id="pkt-modal__content"
|
|
9187
9187
|
class=${z(t)}
|
|
9188
|
-
${
|
|
9188
|
+
${G(this.defaultSlot)}
|
|
9189
9189
|
></div>
|
|
9190
9190
|
</div>
|
|
9191
9191
|
</div>
|
|
@@ -9254,7 +9254,7 @@ const Go = "important", dp = " !" + Go, hp = Jn(class extends xs {
|
|
|
9254
9254
|
s.includes("-") || r ? t.setProperty(s, r ? i.slice(0, -11) : i, r ? Go : "") : t[s] = i;
|
|
9255
9255
|
}
|
|
9256
9256
|
}
|
|
9257
|
-
return
|
|
9257
|
+
return Ot;
|
|
9258
9258
|
}
|
|
9259
9259
|
});
|
|
9260
9260
|
var pp = Object.defineProperty, fp = Object.getOwnPropertyDescriptor, ft = (n, e, t, s) => {
|
|
@@ -9262,15 +9262,15 @@ var pp = Object.defineProperty, fp = Object.getOwnPropertyDescriptor, ft = (n, e
|
|
|
9262
9262
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
9263
9263
|
return s && i && pp(e, t, i), i;
|
|
9264
9264
|
};
|
|
9265
|
-
let it = class extends
|
|
9265
|
+
let it = class extends Fe {
|
|
9266
9266
|
constructor() {
|
|
9267
|
-
super(), this.ariaLabel = null, this.ariaLabelledby = null, this.ariaValueText = null, this.ariaLive = "polite", this.id =
|
|
9267
|
+
super(), this.ariaLabel = null, this.ariaLabelledby = null, this.ariaValueText = null, this.ariaLive = "polite", this.id = Dn(), 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 = Z(), this.progressBarRef = Z();
|
|
9268
9268
|
}
|
|
9269
9269
|
firstUpdated(e) {
|
|
9270
9270
|
super.firstUpdated(e), this.setComputedValues(), this.syncAttributes();
|
|
9271
9271
|
}
|
|
9272
9272
|
updated(e) {
|
|
9273
|
-
super.updated(e), e.has("valueCurrent") && this.labelRef.value && (this.labelWidth = this.labelRef.value.getBoundingClientRect().width || 0), e.has("id") && this.id && (this.progressBarId = this.id), (e.has("statusType") || e.has("id") || e.has("ariaLabelledby")) && (this.progressbarId = this.id ||
|
|
9273
|
+
super.updated(e), e.has("valueCurrent") && this.labelRef.value && (this.labelWidth = this.labelRef.value.getBoundingClientRect().width || 0), e.has("id") && this.id && (this.progressBarId = this.id), (e.has("statusType") || e.has("id") || e.has("ariaLabelledby")) && (this.progressbarId = this.id || Dn(), this.computedAriaLabelledby = this.ariaLabelledby || `${this.progressbarId}-title`), (e.has("ariaValueText") || e.has("valueCurrent") || e.has("valueMax")) && (this.computedAriaValueText = this.statusType === "fraction" && !this.ariaValueText ? `${this.valueCurrent} av ${this.valueMax - this.valueMin}` : this.ariaValueText || ""), this.syncAttributes();
|
|
9274
9274
|
}
|
|
9275
9275
|
render() {
|
|
9276
9276
|
const e = this.statusType !== "none", t = this.valueMax - this.valueMin, s = this.valueCurrent / t * 100, i = this.statusType === "fraction" ? Math.round(s) : Math.round((this.valueCurrent - this.valueMin) / (this.valueMax - this.valueMin) * 100), r = `${this.valueCurrent} av ${t}`, a = z({
|
|
@@ -9302,7 +9302,7 @@ let it = class extends Be {
|
|
|
9302
9302
|
</div>
|
|
9303
9303
|
|
|
9304
9304
|
${e ? y`<div class=${l}>
|
|
9305
|
-
<span class=${h} ${
|
|
9305
|
+
<span class=${h} ${G(this.labelRef)}>
|
|
9306
9306
|
${this.statusType === "percentage" ? `${i}%` : r}
|
|
9307
9307
|
</span>
|
|
9308
9308
|
</div>` : x}
|
|
@@ -9310,7 +9310,7 @@ let it = class extends Be {
|
|
|
9310
9310
|
}
|
|
9311
9311
|
// methods
|
|
9312
9312
|
setComputedValues() {
|
|
9313
|
-
this.progressbarId = this.id ||
|
|
9313
|
+
this.progressbarId = this.id || Dn(), this.computedAriaLabelledby = this.ariaLabelledby || `${this.progressbarId}-title`, this.computedAriaValueText = this.statusType === "fraction" && !this.ariaValueText ? `${this.valueCurrent} av ${this.valueMax - this.valueMin}` : this.ariaValueText || "";
|
|
9314
9314
|
}
|
|
9315
9315
|
syncAttributes() {
|
|
9316
9316
|
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);
|
|
@@ -9424,7 +9424,7 @@ let Mt = class extends re {
|
|
|
9424
9424
|
?disabled=${this.disabled}
|
|
9425
9425
|
form=""
|
|
9426
9426
|
name=${this.name + "-internal"}
|
|
9427
|
-
${
|
|
9427
|
+
${G(this.inputRef)}
|
|
9428
9428
|
@change=${this.toggleChecked}
|
|
9429
9429
|
@input=${this.onInput}
|
|
9430
9430
|
@blur=${this.onBlur}
|
|
@@ -9639,12 +9639,12 @@ function kp({ context: n, subscribe: e }) {
|
|
|
9639
9639
|
};
|
|
9640
9640
|
}
|
|
9641
9641
|
const Xo = Symbol("pkt-tabs-context");
|
|
9642
|
-
var _p = Object.defineProperty, $p = Object.getOwnPropertyDescriptor,
|
|
9642
|
+
var _p = Object.defineProperty, $p = Object.getOwnPropertyDescriptor, Ds = (n, e, t, s) => {
|
|
9643
9643
|
for (var i = s > 1 ? void 0 : s ? $p(e, t) : e, r = n.length - 1, a; r >= 0; r--)
|
|
9644
9644
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
9645
9645
|
return s && i && _p(e, t, i), i;
|
|
9646
9646
|
};
|
|
9647
|
-
let Zn = class extends
|
|
9647
|
+
let Zn = class extends Fe {
|
|
9648
9648
|
constructor() {
|
|
9649
9649
|
super(), this.arrowNav = !0, this.disableArrowNav = !1, this.tabRefs = [], this.tabCount = 0, this.defaultSlot = Z(), this.context = {
|
|
9650
9650
|
useArrowNav: this.useArrowNav,
|
|
@@ -9689,28 +9689,28 @@ let Zn = class extends Be {
|
|
|
9689
9689
|
const n = this.useArrowNav ? "tablist" : "navigation";
|
|
9690
9690
|
return y`
|
|
9691
9691
|
<div class="pkt-tabs">
|
|
9692
|
-
<div class="pkt-tabs__list" role=${n} ${
|
|
9692
|
+
<div class="pkt-tabs__list" role=${n} ${G(this.defaultSlot)}></div>
|
|
9693
9693
|
</div>
|
|
9694
9694
|
`;
|
|
9695
9695
|
}
|
|
9696
9696
|
};
|
|
9697
|
-
|
|
9697
|
+
Ds([
|
|
9698
9698
|
c({ type: Boolean, reflect: !0, attribute: "arrow-nav" })
|
|
9699
9699
|
], Zn.prototype, "arrowNav", 2);
|
|
9700
|
-
|
|
9700
|
+
Ds([
|
|
9701
9701
|
c({ type: Boolean, reflect: !0, attribute: "disable-arrow-nav" })
|
|
9702
9702
|
], Zn.prototype, "disableArrowNav", 2);
|
|
9703
|
-
|
|
9703
|
+
Ds([
|
|
9704
9704
|
he()
|
|
9705
9705
|
], Zn.prototype, "tabRefs", 2);
|
|
9706
|
-
|
|
9706
|
+
Ds([
|
|
9707
9707
|
he()
|
|
9708
9708
|
], Zn.prototype, "tabCount", 2);
|
|
9709
|
-
|
|
9709
|
+
Ds([
|
|
9710
9710
|
yp({ context: Xo }),
|
|
9711
9711
|
he()
|
|
9712
9712
|
], Zn.prototype, "context", 2);
|
|
9713
|
-
Zn =
|
|
9713
|
+
Zn = Ds([
|
|
9714
9714
|
ye("pkt-tabs")
|
|
9715
9715
|
], Zn);
|
|
9716
9716
|
var wp = Object.defineProperty, xp = Object.getOwnPropertyDescriptor, wn = (n, e, t, s) => {
|
|
@@ -9718,7 +9718,7 @@ var wp = Object.defineProperty, xp = Object.getOwnPropertyDescriptor, wn = (n, e
|
|
|
9718
9718
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
9719
9719
|
return s && i && wp(e, t, i), i;
|
|
9720
9720
|
};
|
|
9721
|
-
let ln = class extends
|
|
9721
|
+
let ln = class extends Fe {
|
|
9722
9722
|
constructor() {
|
|
9723
9723
|
super(), this.active = !1, this.href = "", this.icon = "", this.controls = "", this.tag = "", this.tagSkin = "blue", this.index = 0, this.elementRef = Z(), this.defaultSlot = Z(), this.slotController = new rt(this, this.defaultSlot);
|
|
9724
9724
|
}
|
|
@@ -9737,12 +9737,12 @@ let ln = class extends Be {
|
|
|
9737
9737
|
var n;
|
|
9738
9738
|
const e = ((n = this.context) == null ? void 0 : n.useArrowNav) ?? !0, t = this.active ? "active" : "", s = e ? "tab" : void 0, i = e ? this.active : void 0, r = this.active || !e ? void 0 : -1, a = y`
|
|
9739
9739
|
${this.icon ? y`<pkt-icon name=${this.icon} class="pkt-icon--small"></pkt-icon>` : ""}
|
|
9740
|
-
<span ${
|
|
9740
|
+
<span ${G(this.defaultSlot)}></span>
|
|
9741
9741
|
${this.tag ? y`<pkt-tag skin=${this.tagSkin} size="small">${this.tag}</pkt-tag>` : ""}
|
|
9742
9742
|
`;
|
|
9743
9743
|
return this.href ? y`
|
|
9744
9744
|
<a
|
|
9745
|
-
${
|
|
9745
|
+
${G(this.elementRef)}
|
|
9746
9746
|
href=${this.href}
|
|
9747
9747
|
class="pkt-tabs__link ${t}"
|
|
9748
9748
|
role=${I(s)}
|
|
@@ -9756,7 +9756,7 @@ let ln = class extends Be {
|
|
|
9756
9756
|
</a>
|
|
9757
9757
|
` : y`
|
|
9758
9758
|
<button
|
|
9759
|
-
${
|
|
9759
|
+
${G(this.elementRef)}
|
|
9760
9760
|
type="button"
|
|
9761
9761
|
class="pkt-tabs__button pkt-link-button ${t}"
|
|
9762
9762
|
role=${I(s)}
|
|
@@ -9807,20 +9807,20 @@ ln = wn([
|
|
|
9807
9807
|
const Sp = Jn(class extends xs {
|
|
9808
9808
|
constructor(n) {
|
|
9809
9809
|
if (super(n), n.type !== Gt.PROPERTY && n.type !== Gt.ATTRIBUTE && n.type !== Gt.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
|
|
9810
|
-
if (!
|
|
9810
|
+
if (!Do(n)) throw Error("`live` bindings can only contain a single expression");
|
|
9811
9811
|
}
|
|
9812
9812
|
render(n) {
|
|
9813
9813
|
return n;
|
|
9814
9814
|
}
|
|
9815
9815
|
update(n, [e]) {
|
|
9816
|
-
if (e ===
|
|
9816
|
+
if (e === Ot || e === x) return e;
|
|
9817
9817
|
const t = n.element, s = n.name;
|
|
9818
9818
|
if (n.type === Gt.PROPERTY) {
|
|
9819
|
-
if (e === t[s]) return
|
|
9819
|
+
if (e === t[s]) return Ot;
|
|
9820
9820
|
} else if (n.type === Gt.BOOLEAN_ATTRIBUTE) {
|
|
9821
|
-
if (!!e === t.hasAttribute(s)) return
|
|
9822
|
-
} else if (n.type === Gt.ATTRIBUTE && t.getAttribute(s) === e + "") return
|
|
9823
|
-
return
|
|
9821
|
+
if (!!e === t.hasAttribute(s)) return Ot;
|
|
9822
|
+
} else if (n.type === Gt.ATTRIBUTE && t.getAttribute(s) === e + "") return Ot;
|
|
9823
|
+
return Oo(n), e;
|
|
9824
9824
|
}
|
|
9825
9825
|
});
|
|
9826
9826
|
var Cp = Object.defineProperty, Tp = Object.getOwnPropertyDescriptor, vi = (n, e, t, s) => {
|
|
@@ -9868,9 +9868,9 @@ let ws = class extends re {
|
|
|
9868
9868
|
.tagText=${this.tagText}
|
|
9869
9869
|
class="pkt-textarea"
|
|
9870
9870
|
>
|
|
9871
|
-
<div class="pkt-contents" ${
|
|
9871
|
+
<div class="pkt-contents" ${G(this.helptextSlot)} name="helptext" slot="helptext"></div>
|
|
9872
9872
|
<textarea
|
|
9873
|
-
${
|
|
9873
|
+
${G(this.inputRef)}
|
|
9874
9874
|
class=${n}
|
|
9875
9875
|
id=${this.id + "-input"}
|
|
9876
9876
|
name=${(this.name || this.id) + "-input"}
|
|
@@ -9998,10 +9998,10 @@ Zo([
|
|
|
9998
9998
|
Zo([
|
|
9999
9999
|
he()
|
|
10000
10000
|
], Yr.prototype, "_options");
|
|
10001
|
-
var
|
|
10002
|
-
for (var i = s > 1 ? void 0 : s ?
|
|
10001
|
+
var Dp = Object.defineProperty, Op = Object.getOwnPropertyDescriptor, Jo = (n, e, t, s) => {
|
|
10002
|
+
for (var i = s > 1 ? void 0 : s ? Op(e, t) : e, r = n.length - 1, a; r >= 0; r--)
|
|
10003
10003
|
(a = n[r]) && (i = (s ? a(e, t, i) : a(i)) || i);
|
|
10004
|
-
return s && i &&
|
|
10004
|
+
return s && i && Dp(e, t, i), i;
|
|
10005
10005
|
};
|
|
10006
10006
|
let Pr = class extends Yr {
|
|
10007
10007
|
constructor() {
|
|
@@ -10106,7 +10106,7 @@ let Pr = class extends Yr {
|
|
|
10106
10106
|
@blur=${(e) => {
|
|
10107
10107
|
this.onBlur(), e.stopImmediatePropagation();
|
|
10108
10108
|
}}
|
|
10109
|
-
${
|
|
10109
|
+
${G(this.inputRef)}
|
|
10110
10110
|
>
|
|
10111
10111
|
${this._options.length > 0 ? this._options.map(
|
|
10112
10112
|
(e) => y`<option
|
|
@@ -10119,7 +10119,7 @@ let Pr = class extends Yr {
|
|
|
10119
10119
|
</option>`
|
|
10120
10120
|
) : ""}
|
|
10121
10121
|
</select>
|
|
10122
|
-
<div class="pkt-contents" ${
|
|
10122
|
+
<div class="pkt-contents" ${G(this.helptextSlot)} name="helptext" slot="helptext"></div>
|
|
10123
10123
|
</pkt-input-wrapper>
|
|
10124
10124
|
`;
|
|
10125
10125
|
}
|
|
@@ -10153,16 +10153,16 @@ const ee = kn({
|
|
|
10153
10153
|
onClick: h,
|
|
10154
10154
|
onToggle: f
|
|
10155
10155
|
}, g) => {
|
|
10156
|
-
const [p, b] = ce(n), { name: v } = Ll(), $ = o || v,
|
|
10156
|
+
const [p, b] = ce(n), { name: v } = Ll(), $ = o || v, D = r !== void 0 ? r : p;
|
|
10157
10157
|
be(() => {
|
|
10158
10158
|
r === void 0 && b(n);
|
|
10159
10159
|
}, [n, r]);
|
|
10160
|
-
const S = (
|
|
10161
|
-
const J =
|
|
10162
|
-
r === void 0 && b(J), f == null || f(
|
|
10163
|
-
}, T = (
|
|
10160
|
+
const S = (O) => {
|
|
10161
|
+
const J = O.currentTarget.open;
|
|
10162
|
+
r === void 0 && b(J), f == null || f(O);
|
|
10163
|
+
}, T = (O) => {
|
|
10164
10164
|
setTimeout(() => {
|
|
10165
|
-
h == null || h(
|
|
10165
|
+
h == null || h(O);
|
|
10166
10166
|
}, 0);
|
|
10167
10167
|
}, L = [
|
|
10168
10168
|
"pkt-accordion-item",
|
|
@@ -10176,7 +10176,7 @@ const ee = kn({
|
|
|
10176
10176
|
ref: g,
|
|
10177
10177
|
className: L,
|
|
10178
10178
|
id: e,
|
|
10179
|
-
open:
|
|
10179
|
+
open: D,
|
|
10180
10180
|
onClick: T,
|
|
10181
10181
|
name: $,
|
|
10182
10182
|
onToggle: S,
|
|
@@ -10306,7 +10306,7 @@ const Rp = Ce(
|
|
|
10306
10306
|
/* @__PURE__ */ u("ol", { className: "pkt-breadcrumbs__list pkt-breadcrumbs--desktop", children: a.map((f, g) => /* @__PURE__ */ u("li", { className: "pkt-breadcrumbs__item", children: g === a.length - 1 ? /* @__PURE__ */ u("span", { className: "pkt-breadcrumbs__label", "aria-current": "true", children: /* @__PURE__ */ u("span", { className: "pkt-breadcrumbs__text", children: f.text }) }) : h({
|
|
10307
10307
|
href: f.href,
|
|
10308
10308
|
className: "pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",
|
|
10309
|
-
children: /* @__PURE__ */ w(
|
|
10309
|
+
children: /* @__PURE__ */ w(Be, { children: [
|
|
10310
10310
|
/* @__PURE__ */ u(ee, { className: "pkt-icon pkt-breadcrumbs__icon pkt-link__icon", name: "chevron-thin-right" }),
|
|
10311
10311
|
/* @__PURE__ */ u("span", { className: "pkt-breadcrumbs__text", children: f.text })
|
|
10312
10312
|
] }),
|
|
@@ -10315,7 +10315,7 @@ const Rp = Ce(
|
|
|
10315
10315
|
h({
|
|
10316
10316
|
href: o.href,
|
|
10317
10317
|
className: "pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",
|
|
10318
|
-
children: /* @__PURE__ */ w(
|
|
10318
|
+
children: /* @__PURE__ */ w(Be, { children: [
|
|
10319
10319
|
/* @__PURE__ */ u(ee, { className: "pkt-back-link__icon pkt-icon pkt-link__icon", name: "chevron-thin-left" }),
|
|
10320
10320
|
/* @__PURE__ */ u("span", { className: "pkt-breadcrumbs__text", children: o.text })
|
|
10321
10321
|
] }),
|
|
@@ -10344,7 +10344,7 @@ const $t = Ce(
|
|
|
10344
10344
|
color: b,
|
|
10345
10345
|
isLoading: v = void 0,
|
|
10346
10346
|
disabled: $ = void 0,
|
|
10347
|
-
loadingAnimationPath:
|
|
10347
|
+
loadingAnimationPath: D = window.pktAnimationPath,
|
|
10348
10348
|
...S
|
|
10349
10349
|
}, T) => {
|
|
10350
10350
|
const L = [
|
|
@@ -10370,7 +10370,7 @@ const $t = Ce(
|
|
|
10370
10370
|
type: f,
|
|
10371
10371
|
ref: T,
|
|
10372
10372
|
children: [
|
|
10373
|
-
v && /* @__PURE__ */ u(ee, { className: "pkt-btn__icon pkt-btn__spinner", name: "spinner-blue", path:
|
|
10373
|
+
v && /* @__PURE__ */ u(ee, { className: "pkt-btn__icon pkt-btn__spinner", name: "spinner-blue", path: D }),
|
|
10374
10374
|
g !== "label-only" && /* @__PURE__ */ u(ee, { className: "pkt-btn__icon", name: t, ...i && { path: i } }),
|
|
10375
10375
|
/* @__PURE__ */ u("span", { className: "pkt-btn__text", children: n }),
|
|
10376
10376
|
g === "icons-right-and-left" && /* @__PURE__ */ u(
|
|
@@ -11596,7 +11596,7 @@ const so = (n, e) => {
|
|
|
11596
11596
|
default:
|
|
11597
11597
|
return e.time({ width: "full" });
|
|
11598
11598
|
}
|
|
11599
|
-
},
|
|
11599
|
+
}, Df = (n, e) => {
|
|
11600
11600
|
const t = n.match(/(P+)(p+)?/) || [], s = t[1], i = t[2];
|
|
11601
11601
|
if (!i)
|
|
11602
11602
|
return so(n, e);
|
|
@@ -11617,9 +11617,9 @@ const so = (n, e) => {
|
|
|
11617
11617
|
break;
|
|
11618
11618
|
}
|
|
11619
11619
|
return r.replace("{{date}}", so(s, e)).replace("{{time}}", al(i, e));
|
|
11620
|
-
},
|
|
11620
|
+
}, Of = {
|
|
11621
11621
|
p: al,
|
|
11622
|
-
P:
|
|
11622
|
+
P: Df
|
|
11623
11623
|
}, Mf = /^D+$/, Ef = /^Y+$/, Af = ["D", "DD", "YY", "YYYY"];
|
|
11624
11624
|
function Pf(n) {
|
|
11625
11625
|
return Mf.test(n);
|
|
@@ -11644,8 +11644,8 @@ function Hf(n, e, t) {
|
|
|
11644
11644
|
let l = e.match(Ff).map((v) => {
|
|
11645
11645
|
const $ = v[0];
|
|
11646
11646
|
if ($ === "p" || $ === "P") {
|
|
11647
|
-
const
|
|
11648
|
-
return
|
|
11647
|
+
const D = Of[$];
|
|
11648
|
+
return D(v, i.formatLong);
|
|
11649
11649
|
}
|
|
11650
11650
|
return v;
|
|
11651
11651
|
}).join("").match(Bf).map((v) => {
|
|
@@ -11672,8 +11672,8 @@ function Hf(n, e, t) {
|
|
|
11672
11672
|
if (!v.isToken) return v.value;
|
|
11673
11673
|
const $ = v.value;
|
|
11674
11674
|
(If($) || Pf($)) && Rf($, e, String(n));
|
|
11675
|
-
const
|
|
11676
|
-
return
|
|
11675
|
+
const D = eo[$[0]];
|
|
11676
|
+
return D(o, $, i.localize, h);
|
|
11677
11677
|
}).join("");
|
|
11678
11678
|
}
|
|
11679
11679
|
function qf(n) {
|
|
@@ -11769,11 +11769,11 @@ function ol(n) {
|
|
|
11769
11769
|
h.setUTCSeconds(0);
|
|
11770
11770
|
const f = i > 0 ? h.getSeconds() : (h.getSeconds() - 60) % 60, g = Math.round(-(qn(n.timeZone, n) * 60)) % 60;
|
|
11771
11771
|
(g || f) && (n.internal.setUTCSeconds(n.internal.getUTCSeconds() + g), Date.prototype.setUTCSeconds.call(n, Date.prototype.getUTCSeconds.call(n) + g + f));
|
|
11772
|
-
const p = qn(n.timeZone, n), b = p > 0 ? Math.floor(p) : Math.ceil(p), $ = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset() - b,
|
|
11773
|
-
if (
|
|
11772
|
+
const p = qn(n.timeZone, n), b = p > 0 ? Math.floor(p) : Math.ceil(p), $ = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset() - b, D = b !== t, S = $ - l;
|
|
11773
|
+
if (D && S) {
|
|
11774
11774
|
Date.prototype.setUTCMinutes.call(n, Date.prototype.getUTCMinutes.call(n) + S);
|
|
11775
|
-
const T = qn(n.timeZone, n), L = T > 0 ? Math.floor(T) : Math.ceil(T),
|
|
11776
|
-
|
|
11775
|
+
const T = qn(n.timeZone, n), L = T > 0 ? Math.floor(T) : Math.ceil(T), O = b - L;
|
|
11776
|
+
O && (n.internal.setUTCMinutes(n.internal.getUTCMinutes() + O), Date.prototype.setUTCMinutes.call(n, Date.prototype.getUTCMinutes.call(n) + O));
|
|
11777
11777
|
}
|
|
11778
11778
|
}
|
|
11779
11779
|
class Nn extends an {
|
|
@@ -12067,12 +12067,12 @@ function vm(n) {
|
|
|
12067
12067
|
strings: b,
|
|
12068
12068
|
onDateSelected: v,
|
|
12069
12069
|
onClose: $,
|
|
12070
|
-
id:
|
|
12070
|
+
id: D,
|
|
12071
12071
|
className: S
|
|
12072
|
-
} = n, T = go(), L =
|
|
12072
|
+
} = n, T = go(), L = D ?? T, O = Te(() => ({ ...gm, ...b }), [b]), W = Te(
|
|
12073
12073
|
() => p ? sn(p) : Gf(),
|
|
12074
12074
|
[p]
|
|
12075
|
-
), J = Te(() => o ? o.map((m) => typeof m == "string" ? sn(m) : m) : [], [o]), oe = e !== void 0, [we, Y] = ce([]), N = oe ? e : we, H = Te(() => ul(N), [N]), [B,
|
|
12075
|
+
), J = Te(() => o ? o.map((m) => typeof m == "string" ? sn(m) : m) : [], [o]), oe = e !== void 0, [we, Y] = ce([]), N = oe ? e : we, H = Te(() => ul(N), [N]), [B, Q] = ce(0), [le, ae] = ce(0), [me, ue] = ce({}), [ke, se] = ce(null), [ie, We] = ce(null), K = pe(null), P = pe([]), Ee = pe(0), Ae = pe(!1), te = pe(!1), Ue = Te(
|
|
12076
12076
|
() => ({ earliest: r, latest: a, excludedates: J, excludeweekdays: l }),
|
|
12077
12077
|
[r, a, J, l]
|
|
12078
12078
|
);
|
|
@@ -12092,11 +12092,11 @@ function vm(n) {
|
|
|
12092
12092
|
const d = typeof r == "string" ? sn(r) : r;
|
|
12093
12093
|
!isNaN(d.getTime()) && m < d && (m = d);
|
|
12094
12094
|
}
|
|
12095
|
-
|
|
12095
|
+
Q(m.getFullYear()), ae(m.getMonth()), te.current = !0;
|
|
12096
12096
|
}, []), be(() => {
|
|
12097
|
-
if (
|
|
12097
|
+
if (te.current && !Ae.current && N.length > 0 && N[0] !== "") {
|
|
12098
12098
|
const m = sn(N[N.length - 1]);
|
|
12099
|
-
isNaN(m.getTime()) || (
|
|
12099
|
+
isNaN(m.getTime()) || (Q(m.getFullYear()), ae(m.getMonth()));
|
|
12100
12100
|
}
|
|
12101
12101
|
}, [N]), be(() => {
|
|
12102
12102
|
i && H.length === 2 ? ue(oo(H[0], H[1])) : (!i || H.length < 2) && ue({});
|
|
@@ -12108,28 +12108,28 @@ function vm(n) {
|
|
|
12108
12108
|
[oe, v]
|
|
12109
12109
|
), xe = M(() => {
|
|
12110
12110
|
$ == null || $();
|
|
12111
|
-
}, [$]),
|
|
12112
|
-
|
|
12111
|
+
}, [$]), De = M((m, d) => {
|
|
12112
|
+
Q(typeof m == "string" ? parseInt(m) : m), ae(typeof d == "string" ? parseInt(d) : d), Ee.current = 0, We(null), P.current = [], Ae.current = !0;
|
|
12113
12113
|
}, []), Re = M(() => {
|
|
12114
12114
|
const m = le === 0 ? 11 : le - 1, d = le === 0 ? B - 1 : B;
|
|
12115
|
-
|
|
12116
|
-
}, [B, le,
|
|
12115
|
+
De(d, m);
|
|
12116
|
+
}, [B, le, De]), ze = M(() => {
|
|
12117
12117
|
const m = le === 11 ? 0 : le + 1, d = le === 11 ? B + 1 : B;
|
|
12118
|
-
|
|
12119
|
-
}, [B, le,
|
|
12120
|
-
(m, d) => im(m, d,
|
|
12118
|
+
De(d, m);
|
|
12119
|
+
}, [B, le, De]), Le = M((m) => cl(m, Ue), [Ue]), _e = M(
|
|
12120
|
+
(m, d) => im(m, d, Ue, {
|
|
12121
12121
|
multiple: t,
|
|
12122
12122
|
maxMultiple: s,
|
|
12123
12123
|
selectedCount: N.length
|
|
12124
12124
|
}),
|
|
12125
|
-
[
|
|
12126
|
-
), A = M(() => typeof N == "string" ? N.split(",") : N, [N]),
|
|
12125
|
+
[Ue, t, s, N.length]
|
|
12126
|
+
), A = M(() => typeof N == "string" ? N.split(",") : N, [N]), je = M(
|
|
12127
12127
|
(m) => {
|
|
12128
12128
|
if (!i || H.length !== 1 || !dl(m, H, J, l) || H[0] >= m) {
|
|
12129
|
-
|
|
12129
|
+
se(null);
|
|
12130
12130
|
return;
|
|
12131
12131
|
}
|
|
12132
|
-
|
|
12132
|
+
se(m), ue(oo(H[0], m));
|
|
12133
12133
|
},
|
|
12134
12134
|
[i, H, J, l]
|
|
12135
12135
|
), Xe = M(
|
|
@@ -12173,7 +12173,7 @@ function vm(n) {
|
|
|
12173
12173
|
oe || Y(d);
|
|
12174
12174
|
},
|
|
12175
12175
|
[A, oe]
|
|
12176
|
-
),
|
|
12176
|
+
), ne = M(
|
|
12177
12177
|
(m) => {
|
|
12178
12178
|
const d = lo(m, A(), s);
|
|
12179
12179
|
oe || Y(d);
|
|
@@ -12181,17 +12181,17 @@ function vm(n) {
|
|
|
12181
12181
|
[A, s, oe]
|
|
12182
12182
|
), ve = M(() => {
|
|
12183
12183
|
var C, j;
|
|
12184
|
-
const m = vt(Ws(W)), d = (C =
|
|
12184
|
+
const m = vt(Ws(W)), d = (C = K.current) == null ? void 0 : C.querySelector(`button[data-date="${m}"]`);
|
|
12185
12185
|
if (d instanceof HTMLButtonElement) {
|
|
12186
|
-
|
|
12186
|
+
We(m), d.focus();
|
|
12187
12187
|
return;
|
|
12188
12188
|
}
|
|
12189
12189
|
const k = P.current.find((q) => !q.isDisabled);
|
|
12190
12190
|
if (k) {
|
|
12191
|
-
const q = (j =
|
|
12191
|
+
const q = (j = K.current) == null ? void 0 : j.querySelector(
|
|
12192
12192
|
`button[data-date="${k.currentDateISO}"]`
|
|
12193
12193
|
);
|
|
12194
|
-
q instanceof HTMLButtonElement && (
|
|
12194
|
+
q instanceof HTMLButtonElement && (We(k.currentDateISO), q.focus());
|
|
12195
12195
|
}
|
|
12196
12196
|
}, []), ge = M(
|
|
12197
12197
|
(m, d) => {
|
|
@@ -12201,10 +12201,10 @@ function vm(n) {
|
|
|
12201
12201
|
ve();
|
|
12202
12202
|
return;
|
|
12203
12203
|
}
|
|
12204
|
-
const C = gn(ie), j = fm(C, d,
|
|
12204
|
+
const C = gn(ie), j = fm(C, d, K.current.querySelector.bind(K.current));
|
|
12205
12205
|
if (j) {
|
|
12206
|
-
const q =
|
|
12207
|
-
q instanceof HTMLButtonElement && !q.dataset.disabled && (
|
|
12206
|
+
const q = K.current.querySelector(`button[data-date="${vt(j)}"]`);
|
|
12207
|
+
q instanceof HTMLButtonElement && !q.dataset.disabled && (We(vt(j)), q.focus());
|
|
12208
12208
|
}
|
|
12209
12209
|
},
|
|
12210
12210
|
[ie, ve]
|
|
@@ -12220,13 +12220,13 @@ function vm(n) {
|
|
|
12220
12220
|
[xe, ge]
|
|
12221
12221
|
), Ze = M(
|
|
12222
12222
|
(m) => {
|
|
12223
|
-
|
|
12223
|
+
K.current && !K.current.contains(m.relatedTarget) && !m.target.classList.contains("pkt-hide") && xe();
|
|
12224
12224
|
},
|
|
12225
12225
|
[xe]
|
|
12226
12226
|
);
|
|
12227
12227
|
return {
|
|
12228
12228
|
componentId: L,
|
|
12229
|
-
strings:
|
|
12229
|
+
strings: O,
|
|
12230
12230
|
todayDate: W,
|
|
12231
12231
|
year: B,
|
|
12232
12232
|
month: le,
|
|
@@ -12244,25 +12244,25 @@ function vm(n) {
|
|
|
12244
12244
|
excludedates: J,
|
|
12245
12245
|
excludeweekdays: l,
|
|
12246
12246
|
className: S,
|
|
12247
|
-
dateConstraints:
|
|
12248
|
-
calendarRef:
|
|
12247
|
+
dateConstraints: Ue,
|
|
12248
|
+
calendarRef: K,
|
|
12249
12249
|
selectableDatesRef: P,
|
|
12250
12250
|
tabIndexSetRef: Ee,
|
|
12251
12251
|
prevMonth: Re,
|
|
12252
|
-
nextMonth:
|
|
12253
|
-
changeMonth:
|
|
12252
|
+
nextMonth: ze,
|
|
12253
|
+
changeMonth: De,
|
|
12254
12254
|
handleDateSelect: Xe,
|
|
12255
12255
|
addToSelected: U,
|
|
12256
12256
|
removeFromSelected: V,
|
|
12257
|
-
toggleSelectedDate:
|
|
12258
|
-
handleRangeHover:
|
|
12259
|
-
isExcluded:
|
|
12257
|
+
toggleSelectedDate: ne,
|
|
12258
|
+
handleRangeHover: je,
|
|
12259
|
+
isExcluded: Le,
|
|
12260
12260
|
isDayDisabled: _e,
|
|
12261
12261
|
focusOnCurrentDate: ve,
|
|
12262
12262
|
handleKeydown: et,
|
|
12263
12263
|
handleFocusOut: Ze,
|
|
12264
12264
|
close: xe,
|
|
12265
|
-
setFocusedDate:
|
|
12265
|
+
setFocusedDate: We
|
|
12266
12266
|
};
|
|
12267
12267
|
}
|
|
12268
12268
|
const bm = ({
|
|
@@ -12278,7 +12278,7 @@ const bm = ({
|
|
|
12278
12278
|
changeMonth: h
|
|
12279
12279
|
}) => {
|
|
12280
12280
|
const f = (p) => {
|
|
12281
|
-
const b = p === "prev", v = b ? rm(t, s, i) : am(t, s, r), $ = b ? e.prevMonth : e.nextMonth,
|
|
12281
|
+
const b = p === "prev", v = b ? rm(t, s, i) : am(t, s, r), $ = b ? e.prevMonth : e.nextMonth, D = b ? "chevron-thin-left" : "chevron-thin-right", S = b ? "pkt-calendar__prev-month" : "pkt-calendar__next-month", T = b ? o : l;
|
|
12282
12282
|
return /* @__PURE__ */ u("div", { children: /* @__PURE__ */ w(
|
|
12283
12283
|
"button",
|
|
12284
12284
|
{
|
|
@@ -12297,7 +12297,7 @@ const bm = ({
|
|
|
12297
12297
|
"aria-disabled": !v || void 0,
|
|
12298
12298
|
tabIndex: v ? 0 : -1,
|
|
12299
12299
|
children: [
|
|
12300
|
-
/* @__PURE__ */ u(ee, { className: "pkt-btn__icon", name:
|
|
12300
|
+
/* @__PURE__ */ u(ee, { className: "pkt-btn__icon", name: D }),
|
|
12301
12301
|
/* @__PURE__ */ u("span", { className: "pkt-btn__text", children: $ })
|
|
12302
12302
|
]
|
|
12303
12303
|
}
|
|
@@ -12399,7 +12399,7 @@ const $m = ({ state: n }) => {
|
|
|
12399
12399
|
handleDateSelect: b,
|
|
12400
12400
|
handleRangeHover: v,
|
|
12401
12401
|
isExcluded: $,
|
|
12402
|
-
isDayDisabled:
|
|
12402
|
+
isDayDisabled: D,
|
|
12403
12403
|
setFocusedDate: S,
|
|
12404
12404
|
todayDate: T
|
|
12405
12405
|
} = n, L = {
|
|
@@ -12408,8 +12408,8 @@ const $m = ({ state: n }) => {
|
|
|
12408
12408
|
activeSelected: i,
|
|
12409
12409
|
focusedDate: r,
|
|
12410
12410
|
tabIndexSetRef: p,
|
|
12411
|
-
isDayDisabled:
|
|
12412
|
-
},
|
|
12411
|
+
isDayDisabled: D
|
|
12412
|
+
}, O = {
|
|
12413
12413
|
range: l,
|
|
12414
12414
|
activeSelected: i,
|
|
12415
12415
|
rangeHovered: o,
|
|
@@ -12426,24 +12426,24 @@ const $m = ({ state: n }) => {
|
|
|
12426
12426
|
);
|
|
12427
12427
|
return /* @__PURE__ */ u("tr", { className: "pkt-cal-week-row", children: Y });
|
|
12428
12428
|
}, J = (Y, N) => {
|
|
12429
|
-
const H = ym(Y, N, L), { currentDate: B, currentDateISO:
|
|
12430
|
-
g.current.push({ currentDateISO:
|
|
12431
|
-
const ke = km(H,
|
|
12429
|
+
const H = ym(Y, N, L), { currentDate: B, currentDateISO: Q, isSelected: le, isDisabled: ae, ariaLabel: me, tabindex: ue } = H;
|
|
12430
|
+
g.current.push({ currentDateISO: Q, isDisabled: ae, tabindex: ue });
|
|
12431
|
+
const ke = km(H, O), se = _m(H, O);
|
|
12432
12432
|
return /* @__PURE__ */ u("td", { className: ke, children: /* @__PURE__ */ u(
|
|
12433
12433
|
"button",
|
|
12434
12434
|
{
|
|
12435
12435
|
type: "button",
|
|
12436
12436
|
"aria-pressed": le ? "true" : "false",
|
|
12437
12437
|
disabled: ae,
|
|
12438
|
-
className: `pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--label-only ${
|
|
12438
|
+
className: `pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--label-only ${se}`,
|
|
12439
12439
|
onMouseOver: () => l && !$(B) && v(B),
|
|
12440
12440
|
onFocus: () => {
|
|
12441
|
-
l && !$(B) && v(B), S(
|
|
12441
|
+
l && !$(B) && v(B), S(Q);
|
|
12442
12442
|
},
|
|
12443
12443
|
"aria-label": me,
|
|
12444
12444
|
tabIndex: parseInt(ue),
|
|
12445
12445
|
"data-disabled": ae ? "disabled" : void 0,
|
|
12446
|
-
"data-date":
|
|
12446
|
+
"data-date": Q,
|
|
12447
12447
|
onKeyDown: (ie) => {
|
|
12448
12448
|
(ie.key === "Enter" || ie.key === " ") && (ie.preventDefault(), b(B));
|
|
12449
12449
|
},
|
|
@@ -12452,12 +12452,12 @@ const $m = ({ state: n }) => {
|
|
|
12452
12452
|
},
|
|
12453
12453
|
children: /* @__PURE__ */ u("span", { className: "pkt-btn__text pkt-txt-14-light", children: Y })
|
|
12454
12454
|
}
|
|
12455
|
-
) },
|
|
12455
|
+
) }, Q);
|
|
12456
12456
|
}, oe = (Y, N) => /* @__PURE__ */ u("td", { className: "pkt-cal-other", children: /* @__PURE__ */ u("div", { className: "pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--label-only", "data-disabled": "disabled", children: /* @__PURE__ */ u("span", { className: "pkt-btn__text pkt-txt-14-light", children: Y }) }) }, N), we = () => {
|
|
12457
12457
|
const Y = T, N = cm(t, s);
|
|
12458
12458
|
g.current = [], p.current = 0;
|
|
12459
12459
|
let H = 1, B = N.initialWeek;
|
|
12460
|
-
const
|
|
12460
|
+
const Q = [];
|
|
12461
12461
|
for (let le = 0; le < N.numRows; le++) {
|
|
12462
12462
|
const ae = [];
|
|
12463
12463
|
f && ae.push(
|
|
@@ -12472,11 +12472,11 @@ const $m = ({ state: n }) => {
|
|
|
12472
12472
|
ae.push(oe(ke, `${ue}-${le}-${me}`)), ue === "next-month" && H++;
|
|
12473
12473
|
}
|
|
12474
12474
|
}
|
|
12475
|
-
|
|
12475
|
+
Q.push(
|
|
12476
12476
|
/* @__PURE__ */ u("tr", { className: "pkt-cal-week-row", role: "row", children: ae }, `row-${le}`)
|
|
12477
12477
|
);
|
|
12478
12478
|
}
|
|
12479
|
-
return
|
|
12479
|
+
return Q;
|
|
12480
12480
|
};
|
|
12481
12481
|
return /* @__PURE__ */ w(
|
|
12482
12482
|
"table",
|
|
@@ -12560,15 +12560,15 @@ const Sm = Ce(
|
|
|
12560
12560
|
optionalTag: b,
|
|
12561
12561
|
optionalText: v = "Valgfritt",
|
|
12562
12562
|
requiredTag: $,
|
|
12563
|
-
requiredText:
|
|
12563
|
+
requiredText: D = "Må fylles ut",
|
|
12564
12564
|
tagText: S,
|
|
12565
12565
|
...T
|
|
12566
12566
|
}, L) => {
|
|
12567
|
-
const
|
|
12567
|
+
const O = pe(null);
|
|
12568
12568
|
be(() => {
|
|
12569
|
-
|
|
12569
|
+
O.current && p !== void 0 && (O.current.indeterminate = p);
|
|
12570
12570
|
}, [p]), be(() => {
|
|
12571
|
-
typeof L == "function" ? L(
|
|
12571
|
+
typeof L == "function" ? L(O.current) : L && (L.current = O.current);
|
|
12572
12572
|
}, [L]);
|
|
12573
12573
|
const W = [a, "pkt-input-check"].filter(Boolean).join(" "), J = [
|
|
12574
12574
|
"pkt-input-check__input-label",
|
|
@@ -12579,10 +12579,10 @@ const Sm = Ce(
|
|
|
12579
12579
|
"pkt-input-check__input",
|
|
12580
12580
|
e ? "pkt-input-check__input--tile" : "",
|
|
12581
12581
|
t && e ? "pkt-input-check__input--tile-disabled" : ""
|
|
12582
|
-
].filter(Boolean).join(" "), we = ["pkt-tag", "pkt-tag--small", "pkt-tag--thin-text"].join(" "), Y = () => /* @__PURE__ */ w(
|
|
12582
|
+
].filter(Boolean).join(" "), we = ["pkt-tag", "pkt-tag--small", "pkt-tag--thin-text"].join(" "), Y = () => /* @__PURE__ */ w(Be, { children: [
|
|
12583
12583
|
S && /* @__PURE__ */ u("span", { className: we + " pkt-tag--gray", children: S }),
|
|
12584
12584
|
b && /* @__PURE__ */ u("span", { className: we + " pkt-tag--blue-light", children: v }),
|
|
12585
|
-
$ && /* @__PURE__ */ u("span", { className: we + " pkt-tag--beige", children:
|
|
12585
|
+
$ && /* @__PURE__ */ u("span", { className: we + " pkt-tag--beige", children: D })
|
|
12586
12586
|
] });
|
|
12587
12587
|
return /* @__PURE__ */ u("div", { className: W, children: /* @__PURE__ */ w("div", { className: oe, children: [
|
|
12588
12588
|
h === "left" && /* @__PURE__ */ w("label", { className: J, htmlFor: n, children: [
|
|
@@ -12595,7 +12595,7 @@ const Sm = Ce(
|
|
|
12595
12595
|
"input",
|
|
12596
12596
|
{
|
|
12597
12597
|
role: o ? "switch" : "checkbox",
|
|
12598
|
-
ref:
|
|
12598
|
+
ref: O,
|
|
12599
12599
|
className: `pkt-input-check__input-checkbox ${r ? "pkt-input-check__input-checkbox--error" : ""}`,
|
|
12600
12600
|
type: "checkbox",
|
|
12601
12601
|
id: n,
|
|
@@ -12632,36 +12632,36 @@ const is = Ce(
|
|
|
12632
12632
|
hasError: b = !1,
|
|
12633
12633
|
errorMessage: v,
|
|
12634
12634
|
disabled: $ = !1,
|
|
12635
|
-
inline:
|
|
12635
|
+
inline: D = !1,
|
|
12636
12636
|
ariaDescribedby: S,
|
|
12637
12637
|
useWrapper: T = !0,
|
|
12638
12638
|
children: L,
|
|
12639
|
-
className:
|
|
12639
|
+
className: O = "",
|
|
12640
12640
|
hasFieldset: W = !1,
|
|
12641
12641
|
role: J = "group",
|
|
12642
12642
|
counterPosition: oe = "bottom"
|
|
12643
12643
|
}, we) => {
|
|
12644
|
-
const [Y, N] = ce(!1), H = S || (t ? `${n}-helptext` : void 0), B = !!r,
|
|
12644
|
+
const [Y, N] = ce(!1), H = S || (t ? `${n}-helptext` : void 0), B = !!r, Q = B && oe === "top", le = B && oe === "bottom", ae = () => N((P) => !P), me = [
|
|
12645
12645
|
"pkt-inputwrapper",
|
|
12646
|
-
|
|
12646
|
+
O,
|
|
12647
12647
|
b ? "pkt-inputwrapper--error" : "",
|
|
12648
12648
|
$ ? "pkt-inputwrapper--disabled" : "",
|
|
12649
|
-
|
|
12649
|
+
D ? "pkt-inputwrapper--inline" : ""
|
|
12650
12650
|
].filter(Boolean).join(" "), ue = ["pkt-tag", "pkt-tag--small", "pkt-tag--thin-text"].join(" "), ke = () => B ? /* @__PURE__ */ w("div", { className: "pkt-input__counter", "aria-live": "polite", "aria-atomic": "true", children: [
|
|
12651
12651
|
a,
|
|
12652
12652
|
o ? `/${o}` : ""
|
|
12653
|
-
] }) : null,
|
|
12653
|
+
] }) : null, se = () => /* @__PURE__ */ w(Be, { children: [
|
|
12654
12654
|
p && /* @__PURE__ */ u("span", { className: ue + " pkt-tag--gray", children: p }),
|
|
12655
12655
|
l && /* @__PURE__ */ u("span", { className: ue + " pkt-tag--blue-light", children: h }),
|
|
12656
12656
|
f && /* @__PURE__ */ u("span", { className: ue + " pkt-tag--beige", children: g })
|
|
12657
12657
|
] }), ie = () => {
|
|
12658
|
-
const P = /* @__PURE__ */ w(
|
|
12658
|
+
const P = /* @__PURE__ */ w(Be, { children: [
|
|
12659
12659
|
e,
|
|
12660
12660
|
" ",
|
|
12661
|
-
|
|
12661
|
+
se()
|
|
12662
12662
|
] });
|
|
12663
12663
|
return T ? W ? /* @__PURE__ */ u("legend", { className: "pkt-inputwrapper__legend", id: `${n}-label`, children: P }) : /* @__PURE__ */ u("label", { className: "pkt-inputwrapper__label", htmlFor: n, "aria-describedby": H, id: `${n}-label`, children: P }) : /* @__PURE__ */ u("label", { htmlFor: n, className: "pkt-sr-only", "aria-describedby": H, id: `${n}-label`, children: e });
|
|
12664
|
-
},
|
|
12664
|
+
}, We = () => !t && !s ? null : /* @__PURE__ */ w(Be, { children: [
|
|
12665
12665
|
t && T && /* @__PURE__ */ u("div", { className: "pkt-inputwrapper__helptext", id: `${n}-helptext`, children: t }),
|
|
12666
12666
|
s && /* @__PURE__ */ w("div", { className: "pkt-inputwrapper__helptext-expandable", children: [
|
|
12667
12667
|
/* @__PURE__ */ u(
|
|
@@ -12691,15 +12691,15 @@ const is = Ce(
|
|
|
12691
12691
|
}
|
|
12692
12692
|
)
|
|
12693
12693
|
] })
|
|
12694
|
-
] }),
|
|
12694
|
+
] }), K = /* @__PURE__ */ w(Be, { children: [
|
|
12695
12695
|
ie(),
|
|
12696
|
-
|
|
12697
|
-
|
|
12696
|
+
We(),
|
|
12697
|
+
Q && /* @__PURE__ */ u(ke, {}),
|
|
12698
12698
|
L,
|
|
12699
12699
|
le && /* @__PURE__ */ u(ke, {}),
|
|
12700
12700
|
b && v && /* @__PURE__ */ u("div", { className: "pkt-inputwrapper__alert-wrapper", children: /* @__PURE__ */ u(Kr, { skin: "error", "aria-live": "assertive", role: "alert", id: `${n}-error`, compact: !0, children: v }) })
|
|
12701
12701
|
] });
|
|
12702
|
-
return /* @__PURE__ */ u("div", { className: me, ref: we, role: J, children: W ? /* @__PURE__ */ u("fieldset", { className: "pkt-inputwrapper__fieldset", "aria-describedby": H, children:
|
|
12702
|
+
return /* @__PURE__ */ u("div", { className: me, ref: we, role: J, children: W ? /* @__PURE__ */ u("fieldset", { className: "pkt-inputwrapper__fieldset", "aria-describedby": H, children: K }) : /* @__PURE__ */ u("div", { className: "pkt-inputwrapper__fieldset", children: K }) });
|
|
12703
12703
|
}
|
|
12704
12704
|
);
|
|
12705
12705
|
is.displayName = "PktInputWrapper";
|
|
@@ -12749,7 +12749,7 @@ const fn = (n, e) => e && (n.find((t) => t.value === e) || n.find((t) => t.label
|
|
|
12749
12749
|
}
|
|
12750
12750
|
);
|
|
12751
12751
|
return (a.length === 0 || !o) && s ? { addValueText: n, userInfoMessage: "" } : a.length === 0 && !s ? { addValueText: null, userInfoMessage: "Ingen treff i søket" } : r ? { addValueText: null, userInfoMessage: "Verdien er allerede valgt" } : { addValueText: null, userInfoMessage: "" };
|
|
12752
|
-
},
|
|
12752
|
+
}, Dm = (n, e, t) => {
|
|
12753
12753
|
switch (n) {
|
|
12754
12754
|
case ",":
|
|
12755
12755
|
return t ? "addValue" : null;
|
|
@@ -12763,7 +12763,7 @@ const fn = (n, e) => e && (n.find((t) => t.value === e) || n.find((t) => t.label
|
|
|
12763
12763
|
default:
|
|
12764
12764
|
return null;
|
|
12765
12765
|
}
|
|
12766
|
-
},
|
|
12766
|
+
}, Om = (n, e, t, s, i) => {
|
|
12767
12767
|
if (!n) return { action: "none", value: null };
|
|
12768
12768
|
const r = fn(t, n);
|
|
12769
12769
|
return !e.includes(n) && !r ? s ? { action: "addUserValue", value: n } : i ? { action: "none", value: null } : { action: "removeValue", value: e[0] } : r && !e.includes(r.value) ? { action: "selectOption", value: r.value } : { action: "none", value: null };
|
|
@@ -12786,7 +12786,7 @@ const fn = (n, e) => e && (n.find((t) => t.value === e) || n.find((t) => t.label
|
|
|
12786
12786
|
}, Em = (n) => {
|
|
12787
12787
|
const e = fl(n);
|
|
12788
12788
|
e[0] && zn(e[0]);
|
|
12789
|
-
},
|
|
12789
|
+
}, Di = (n, e) => {
|
|
12790
12790
|
if (e.disabled) return;
|
|
12791
12791
|
const t = fl(n);
|
|
12792
12792
|
if (e.allowUserInput && e.customUserInput) {
|
|
@@ -12826,14 +12826,14 @@ const fn = (n, e) => e && (n.find((t) => t.value === e) || n.find((t) => t.label
|
|
|
12826
12826
|
}, p) => {
|
|
12827
12827
|
const [b, v] = ce(!1), $ = M(() => {
|
|
12828
12828
|
v(!0), l && l();
|
|
12829
|
-
}, [l]),
|
|
12829
|
+
}, [l]), D = pe(null), [S, T] = ce("");
|
|
12830
12830
|
be(() => {
|
|
12831
12831
|
var J, oe;
|
|
12832
|
-
T(((oe = (J =
|
|
12832
|
+
T(((oe = (J = D.current) == null ? void 0 : J.textContent) == null ? void 0 : oe.trim()) ?? "");
|
|
12833
12833
|
}, [n]);
|
|
12834
12834
|
const L = Te(() => {
|
|
12835
12835
|
if (i && !o) return S && `Klikk for å fjerne ${S}` || f;
|
|
12836
|
-
}, [i, o, S, f]),
|
|
12836
|
+
}, [i, o, S, f]), O = {
|
|
12837
12837
|
"pkt-tag": !0,
|
|
12838
12838
|
[`pkt-tag--${s}`]: !!s,
|
|
12839
12839
|
[`pkt-tag--${e}`]: !!e,
|
|
@@ -12860,13 +12860,13 @@ const fn = (n, e) => e && (n.find((t) => t.value === e) || n.find((t) => t.label
|
|
|
12860
12860
|
ref: p,
|
|
12861
12861
|
children: [
|
|
12862
12862
|
a && /* @__PURE__ */ u(ee, { className: "pkt-tag__icon", name: a }),
|
|
12863
|
-
/* @__PURE__ */ u("span", { ref:
|
|
12863
|
+
/* @__PURE__ */ u("span", { ref: D, children: n }),
|
|
12864
12864
|
/* @__PURE__ */ u(ee, { className: "pkt-tag__close-btn", name: "close" })
|
|
12865
12865
|
]
|
|
12866
12866
|
}
|
|
12867
|
-
) : /* @__PURE__ */ w("span", { ...g, className: $e(
|
|
12867
|
+
) : /* @__PURE__ */ w("span", { ...g, className: $e(O, r), ref: p, children: [
|
|
12868
12868
|
a && /* @__PURE__ */ u(ee, { className: "pkt-tag__icon", name: a, "aria-hidden": "true" }),
|
|
12869
|
-
/* @__PURE__ */ u("span", { ref:
|
|
12869
|
+
/* @__PURE__ */ u("span", { ref: D, children: n })
|
|
12870
12870
|
] });
|
|
12871
12871
|
}
|
|
12872
12872
|
);
|
|
@@ -12878,8 +12878,8 @@ const ml = ({ state: n, outside: e = !1 }) => {
|
|
|
12878
12878
|
!e && l >= 0 && l < t.length && ((p = h.current[l]) == null || p.focus());
|
|
12879
12879
|
}, [e, l, t.length]), t.length === 0) return null;
|
|
12880
12880
|
const f = (p, b) => {
|
|
12881
|
-
const v = fn(s, p), $ = v == null ? void 0 : v.tagSkinColor,
|
|
12882
|
-
return i ? /* @__PURE__ */ u("li", { role: "listitem", children: /* @__PURE__ */ u(gs, { skin: $ || "blue-dark", children: /* @__PURE__ */ u("span", { className: "pkt-combobox__value", children:
|
|
12881
|
+
const v = fn(s, p), $ = v == null ? void 0 : v.tagSkinColor, D = v ? pl(v, r) : p;
|
|
12882
|
+
return i ? /* @__PURE__ */ u("li", { role: "listitem", children: /* @__PURE__ */ u(gs, { skin: $ || "blue-dark", children: /* @__PURE__ */ u("span", { className: "pkt-combobox__value", children: D }) }) }, p) : e ? /* @__PURE__ */ u("li", { role: "listitem", children: /* @__PURE__ */ u(gs, { skin: $ || "blue-dark", closeTag: !0, onClose: () => a(p), children: /* @__PURE__ */ u("span", { className: "pkt-combobox__value", children: D }) }) }, p) : /* @__PURE__ */ u(
|
|
12883
12883
|
"li",
|
|
12884
12884
|
{
|
|
12885
12885
|
role: "listitem",
|
|
@@ -12896,7 +12896,7 @@ const ml = ({ state: n, outside: e = !1 }) => {
|
|
|
12896
12896
|
tabIndex: l === b ? 0 : -1,
|
|
12897
12897
|
onClose: () => a(p),
|
|
12898
12898
|
onKeyDown: (S) => o(S, b),
|
|
12899
|
-
children: /* @__PURE__ */ u("span", { className: "pkt-combobox__value", children:
|
|
12899
|
+
children: /* @__PURE__ */ u("span", { className: "pkt-combobox__value", children: D })
|
|
12900
12900
|
}
|
|
12901
12901
|
)
|
|
12902
12902
|
},
|
|
@@ -12928,11 +12928,11 @@ const ml = ({ state: n, outside: e = !1 }) => {
|
|
|
12928
12928
|
fullwidth: b,
|
|
12929
12929
|
hasError: v,
|
|
12930
12930
|
label: $,
|
|
12931
|
-
inputFocus:
|
|
12931
|
+
inputFocus: D,
|
|
12932
12932
|
inputRef: S,
|
|
12933
12933
|
triggerRef: T,
|
|
12934
12934
|
handleInputChange: L,
|
|
12935
|
-
handleInputKeydown:
|
|
12935
|
+
handleInputKeydown: O,
|
|
12936
12936
|
handleInputFocus: W,
|
|
12937
12937
|
handleInputBlur: J,
|
|
12938
12938
|
handleInputClick: oe,
|
|
@@ -12945,7 +12945,7 @@ const ml = ({ state: n, outside: e = !1 }) => {
|
|
|
12945
12945
|
a && "pkt-combobox__input--open",
|
|
12946
12946
|
v && "pkt-combobox__input--error",
|
|
12947
12947
|
p && "pkt-combobox__input--disabled"
|
|
12948
|
-
].filter(Boolean).join(" "), B = ["pkt-combobox__arrow-icon", a && "pkt-combobox__arrow-icon--open"].filter(Boolean).join(" "),
|
|
12948
|
+
].filter(Boolean).join(" "), B = ["pkt-combobox__arrow-icon", a && "pkt-combobox__arrow-icon--open"].filter(Boolean).join(" "), Q = l || h, le = !Q && g && (!i.length || o && f === "outside") && !D, ae = f !== "outside", me = i[0] && fn(r, i[0]) ? `${s}-${Cm(r, i[0])}` : void 0, ue = o && i.length > 0 ? `${i.length} valgt` : void 0, ke = Q ? {
|
|
12949
12949
|
tabIndex: -1
|
|
12950
12950
|
} : {
|
|
12951
12951
|
id: `${e}-combobox`,
|
|
@@ -12960,8 +12960,8 @@ const ml = ({ state: n, outside: e = !1 }) => {
|
|
|
12960
12960
|
onKeyDown: Y
|
|
12961
12961
|
};
|
|
12962
12962
|
return /* @__PURE__ */ w("div", { ref: T, className: H, onClick: oe, ...ke, children: [
|
|
12963
|
-
le ? /* @__PURE__ */ u("span", { className: "pkt-combobox__placeholder", onClick: we, children: g }) : ae ? o ? /* @__PURE__ */ u(ml, { state: n }) :
|
|
12964
|
-
|
|
12963
|
+
le ? /* @__PURE__ */ u("span", { className: "pkt-combobox__placeholder", onClick: we, children: g }) : ae ? o ? /* @__PURE__ */ u(ml, { state: n }) : Q ? null : /* @__PURE__ */ u(Am, { state: n }) : null,
|
|
12964
|
+
Q ? /* @__PURE__ */ u("div", { className: "pkt-combobox__input-div combobox__input", children: /* @__PURE__ */ u(
|
|
12965
12965
|
"input",
|
|
12966
12966
|
{
|
|
12967
12967
|
ref: S,
|
|
@@ -12969,7 +12969,7 @@ const ml = ({ state: n, outside: e = !1 }) => {
|
|
|
12969
12969
|
id: t,
|
|
12970
12970
|
name: `${N || e}-input`,
|
|
12971
12971
|
onChange: L,
|
|
12972
|
-
onKeyDown:
|
|
12972
|
+
onKeyDown: O,
|
|
12973
12973
|
onFocus: W,
|
|
12974
12974
|
onBlur: J,
|
|
12975
12975
|
placeholder: !i.length || o && f === "outside" ? g : void 0,
|
|
@@ -13013,15 +13013,15 @@ const ml = ({ state: n, outside: e = !1 }) => {
|
|
|
13013
13013
|
userInfoMessage: b,
|
|
13014
13014
|
searchPlaceholder: v,
|
|
13015
13015
|
searchValue: $,
|
|
13016
|
-
handleOptionClick:
|
|
13016
|
+
handleOptionClick: D,
|
|
13017
13017
|
handleOptionKeydown: S,
|
|
13018
13018
|
handleSearchInput: T,
|
|
13019
13019
|
handleSearchKeydown: L,
|
|
13020
|
-
handleNewOptionClick:
|
|
13020
|
+
handleNewOptionClick: O,
|
|
13021
13021
|
handleNewOptionKeydown: W,
|
|
13022
13022
|
listboxRef: J
|
|
13023
13023
|
} = n, oe = r.filter((B) => B.selected).length, we = a && oe > 0 && h != null && h > 0, Y = g && p && !l, N = !!b, H = ["pkt-listbox", s && "pkt-listbox__open", "pkt-txt-16-light"].filter(Boolean).join(" ");
|
|
13024
|
-
return /* @__PURE__ */ w(
|
|
13024
|
+
return /* @__PURE__ */ w(Be, { children: [
|
|
13025
13025
|
/* @__PURE__ */ w(
|
|
13026
13026
|
"div",
|
|
13027
13027
|
{
|
|
@@ -13071,7 +13071,7 @@ const ml = ({ state: n, outside: e = !1 }) => {
|
|
|
13071
13071
|
"data-value": p,
|
|
13072
13072
|
"data-selected": "false",
|
|
13073
13073
|
tabIndex: 0,
|
|
13074
|
-
onClick: () =>
|
|
13074
|
+
onClick: () => O(p),
|
|
13075
13075
|
onKeyDown: W,
|
|
13076
13076
|
children: [
|
|
13077
13077
|
/* @__PURE__ */ u(ee, { className: "pkt-listbox__banner-icon", name: "plus-sign" }),
|
|
@@ -13086,7 +13086,7 @@ const ml = ({ state: n, outside: e = !1 }) => {
|
|
|
13086
13086
|
"Tom liste"
|
|
13087
13087
|
] })
|
|
13088
13088
|
] }),
|
|
13089
|
-
/* @__PURE__ */ u("ul", { className: "pkt-listbox__options", role: "presentation", children: r.map((B,
|
|
13089
|
+
/* @__PURE__ */ u("ul", { className: "pkt-listbox__options", role: "presentation", children: r.map((B, Q) => {
|
|
13090
13090
|
const le = [
|
|
13091
13091
|
"pkt-listbox__option",
|
|
13092
13092
|
!a && B.selected && "pkt-listbox__option--selected",
|
|
@@ -13096,17 +13096,17 @@ const ml = ({ state: n, outside: e = !1 }) => {
|
|
|
13096
13096
|
"li",
|
|
13097
13097
|
{
|
|
13098
13098
|
className: le,
|
|
13099
|
-
onClick: () =>
|
|
13099
|
+
onClick: () => D(B.value),
|
|
13100
13100
|
onKeyDown: (me) => S(me, B.value),
|
|
13101
13101
|
"aria-selected": B.selected ? "true" : "false",
|
|
13102
13102
|
tabIndex: ae ? -1 : 0,
|
|
13103
|
-
"data-index":
|
|
13103
|
+
"data-index": Q,
|
|
13104
13104
|
"data-value": B.value,
|
|
13105
13105
|
"data-selected": B.selected ? "true" : "false",
|
|
13106
13106
|
"data-disabled": ae || void 0,
|
|
13107
13107
|
"aria-disabled": ae ? "true" : "false",
|
|
13108
13108
|
role: "option",
|
|
13109
|
-
id: `${e}-${
|
|
13109
|
+
id: `${e}-${Q}`,
|
|
13110
13110
|
children: [
|
|
13111
13111
|
a ? /* @__PURE__ */ u(
|
|
13112
13112
|
"input",
|
|
@@ -13121,14 +13121,14 @@ const ml = ({ state: n, outside: e = !1 }) => {
|
|
|
13121
13121
|
disabled: ae
|
|
13122
13122
|
}
|
|
13123
13123
|
) : B.selected ? /* @__PURE__ */ u(ee, { name: "check-big" }) : null,
|
|
13124
|
-
/* @__PURE__ */ w("span", { className: "pkt-listbox__option-label", id: `${e}-option-label-${
|
|
13124
|
+
/* @__PURE__ */ w("span", { className: "pkt-listbox__option-label", id: `${e}-option-label-${Q}`, children: [
|
|
13125
13125
|
B.prefix && /* @__PURE__ */ u("span", { className: "pkt-listbox__option-prefix", children: B.prefix }),
|
|
13126
13126
|
B.label || B.value
|
|
13127
13127
|
] }),
|
|
13128
13128
|
B.description && /* @__PURE__ */ u("span", { className: "pkt-listbox__option-description pkt-txt-14-light", children: B.description })
|
|
13129
13129
|
]
|
|
13130
13130
|
},
|
|
13131
|
-
`${B.value}-${
|
|
13131
|
+
`${B.value}-${Q}`
|
|
13132
13132
|
);
|
|
13133
13133
|
}) })
|
|
13134
13134
|
]
|
|
@@ -13161,11 +13161,11 @@ function Lm(n, e) {
|
|
|
13161
13161
|
displayValueAs: b = "label",
|
|
13162
13162
|
tagPlacement: v,
|
|
13163
13163
|
searchPlaceholder: $,
|
|
13164
|
-
placeholder:
|
|
13164
|
+
placeholder: D,
|
|
13165
13165
|
disabled: S = !1,
|
|
13166
13166
|
required: T = !1,
|
|
13167
13167
|
fullwidth: L = !1,
|
|
13168
|
-
hasError:
|
|
13168
|
+
hasError: O = !1,
|
|
13169
13169
|
errorMessage: W,
|
|
13170
13170
|
helptext: J,
|
|
13171
13171
|
helptextDropdown: oe,
|
|
@@ -13174,19 +13174,19 @@ function Lm(n, e) {
|
|
|
13174
13174
|
optionalText: N,
|
|
13175
13175
|
requiredTag: H = !1,
|
|
13176
13176
|
requiredText: B,
|
|
13177
|
-
tagText:
|
|
13177
|
+
tagText: Q,
|
|
13178
13178
|
useWrapper: le = !0,
|
|
13179
13179
|
name: ae,
|
|
13180
13180
|
className: me,
|
|
13181
13181
|
onChange: ue,
|
|
13182
13182
|
onValueChange: ke,
|
|
13183
|
-
children:
|
|
13184
|
-
} = n, ie = `${t}-input`,
|
|
13183
|
+
children: se
|
|
13184
|
+
} = n, ie = `${t}-input`, We = `${t}-listbox`, K = f || p, P = pe(null), Ee = pe(null), Ae = pe(null), te = pe(null), Ue = pe(null), Ie = M(() => {
|
|
13185
13185
|
var _, E;
|
|
13186
|
-
|
|
13187
|
-
}, [
|
|
13186
|
+
K ? (_ = P.current) == null || _.focus() : (E = Ae.current) == null || E.focus();
|
|
13187
|
+
}, [K]), xe = Te(() => {
|
|
13188
13188
|
const _ = [];
|
|
13189
|
-
return Ri.forEach(
|
|
13189
|
+
return Ri.forEach(se, (E) => {
|
|
13190
13190
|
if (vo(E) && E.type === "option") {
|
|
13191
13191
|
const X = E.props;
|
|
13192
13192
|
_.push({
|
|
@@ -13197,17 +13197,17 @@ function Lm(n, e) {
|
|
|
13197
13197
|
});
|
|
13198
13198
|
}
|
|
13199
13199
|
}), _;
|
|
13200
|
-
}, [
|
|
13200
|
+
}, [se]), De = Te(() => o && o.length > 0 ? o.map((_) => ({ ..._, fulltext: Pi(_) })) : a && a.length > 0 ? a.map((_) => ({ ..._, fulltext: Pi(_) })) : xe.length > 0 ? xe.map((_) => ({ ..._, fulltext: Pi(_) })) : [], [o, a, xe]), Re = i !== void 0, [ze, Le] = ce(() => Nr(i ?? r, l)), _e = pe(ze);
|
|
13201
13201
|
be(() => {
|
|
13202
|
-
Re &&
|
|
13202
|
+
Re && Le(Nr(i, l));
|
|
13203
13203
|
}, [i, Re, l]);
|
|
13204
|
-
const A = Re ? Nr(i, l) :
|
|
13204
|
+
const A = Re ? Nr(i, l) : ze, [je, Xe] = ce([]), U = Te(() => {
|
|
13205
13205
|
const _ = [
|
|
13206
|
-
...
|
|
13207
|
-
...
|
|
13206
|
+
...je.filter((E) => !De.some((X) => X.value === E.value)),
|
|
13207
|
+
...De
|
|
13208
13208
|
];
|
|
13209
13209
|
return Rm(_, A);
|
|
13210
|
-
}, [
|
|
13210
|
+
}, [De, je, A]), [V, ne] = ce(!1), [ve, ge] = ce(""), [et, Ze] = ce(""), [m, d] = ce(""), [k, C] = ce(null), [j, q] = ce(!1), [de, ot] = ce(!1), [tt, He] = ce(-1), zt = pe(!1), Yt = Ti(A.length, h ?? null), _t = l && h != null, Os = Te(() => ve ? f ? co(U, ve).filtered : Tm(U, ve) : U, [U, ve, f]), mt = Te(
|
|
13211
13211
|
() => {
|
|
13212
13212
|
var _;
|
|
13213
13213
|
return (_ = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")) == null ? void 0 : _.set;
|
|
@@ -13231,7 +13231,7 @@ function Lm(n, e) {
|
|
|
13231
13231
|
}, [A, U, b, l, V]);
|
|
13232
13232
|
const tn = M(
|
|
13233
13233
|
(_, E = !0) => {
|
|
13234
|
-
Re ||
|
|
13234
|
+
Re || Le(_), E && (ke == null || ke(_), Ft(_));
|
|
13235
13235
|
},
|
|
13236
13236
|
[Re, ke, Ft]
|
|
13237
13237
|
), xn = M(
|
|
@@ -13248,8 +13248,8 @@ function Lm(n, e) {
|
|
|
13248
13248
|
), nt = M(
|
|
13249
13249
|
(_) => {
|
|
13250
13250
|
if (!_) return;
|
|
13251
|
-
const E = A.filter((
|
|
13252
|
-
X != null && X.userAdded && Xe((
|
|
13251
|
+
const E = A.filter((qe) => qe !== _), X = fn(U, _);
|
|
13252
|
+
X != null && X.userAdded && Xe((qe) => qe.filter((Nt) => Nt.value !== _)), tn(E);
|
|
13253
13253
|
},
|
|
13254
13254
|
[A, U, tn]
|
|
13255
13255
|
), Ms = M(() => {
|
|
@@ -13270,7 +13270,7 @@ function Lm(n, e) {
|
|
|
13270
13270
|
userAdded: !0,
|
|
13271
13271
|
selected: !0
|
|
13272
13272
|
};
|
|
13273
|
-
Xe((
|
|
13273
|
+
Xe((qe) => [X, ...qe.filter((Nt) => Nt.value !== _)]), tn(E);
|
|
13274
13274
|
},
|
|
13275
13275
|
[l, U, A, h, tn]
|
|
13276
13276
|
), Es = M(
|
|
@@ -13287,9 +13287,9 @@ function Lm(n, e) {
|
|
|
13287
13287
|
var na, sa;
|
|
13288
13288
|
if (S) return;
|
|
13289
13289
|
d(""), C(null);
|
|
13290
|
-
const E = ((na = fn(U, _)) == null ? void 0 : na.value) || null, X = A.includes(_ || E || ""),
|
|
13290
|
+
const E = ((na = fn(U, _)) == null ? void 0 : na.value) || null, X = A.includes(_ || E || ""), qe = !!E, Nt = ((sa = U.find((Dl) => Dl.value === _)) == null ? void 0 : sa.disabled) || !1, Rn = !(_ != null && _.trim()), Pt = !l, Ut = l, _i = Ti(A.length, h ?? null);
|
|
13291
13291
|
let pn = !1, $i = !0, As = "", cr = "", os;
|
|
13292
|
-
Nt || (!
|
|
13292
|
+
Nt || (!qe && p && !Rn ? (In(_), As = "Ny verdi lagt til", pn = Ut, Pt && (os = _ || "")) : !qe && !p ? (Pt && A[0] && nt(A[0]), $i = !1, pn = !0, As = "Ingen treff i søket") : X ? (nt(E), pn = !0, os = "", Pt && K && P.current && P.current.type !== "hidden" && (P.current.value = "")) : Rn && Pt ? (Ms(), pn = !0, os = "") : Pt ? (A[0] && nt(A[0]), xn(E), pn = !1, os = E || "") : Ut && !_i ? (xn(E), pn = !0) : Ut && _i ? (As = "Maks antall valg nådd", $i = !1, cr = _ || "") : (Pt && Ms(), As = "Ingen gyldig verdi valgt", $i = !1, pn = !0, cr = _ || "", os = ""), ne(pn), d(As), ge(cr), Es($i, os), pn || (Pt && K && (zt.current = !0), window.setTimeout(() => {
|
|
13293
13293
|
Ie();
|
|
13294
13294
|
}, 0)));
|
|
13295
13295
|
},
|
|
@@ -13313,16 +13313,16 @@ function Lm(n, e) {
|
|
|
13313
13313
|
let E = A[0];
|
|
13314
13314
|
if (l) {
|
|
13315
13315
|
if (_ !== "") {
|
|
13316
|
-
const { action: X, value:
|
|
13316
|
+
const { action: X, value: qe } = Om(_, A, U, p, l);
|
|
13317
13317
|
switch (X) {
|
|
13318
13318
|
case "addUserValue":
|
|
13319
|
-
In(
|
|
13319
|
+
In(qe);
|
|
13320
13320
|
break;
|
|
13321
13321
|
case "selectOption":
|
|
13322
|
-
xn(
|
|
13322
|
+
xn(qe);
|
|
13323
13323
|
break;
|
|
13324
13324
|
case "removeValue":
|
|
13325
|
-
nt(
|
|
13325
|
+
nt(qe);
|
|
13326
13326
|
break;
|
|
13327
13327
|
}
|
|
13328
13328
|
}
|
|
@@ -13334,7 +13334,7 @@ function Lm(n, e) {
|
|
|
13334
13334
|
}
|
|
13335
13335
|
!l && E ? P.current.value = Ni(E, U, b) : P.current.value = "";
|
|
13336
13336
|
}
|
|
13337
|
-
|
|
13337
|
+
ne(!1), ot(!1);
|
|
13338
13338
|
}, [A, U, p, l, b, In, xn, nt]), rs = M(
|
|
13339
13339
|
(_) => {
|
|
13340
13340
|
if (!_.trim().toLowerCase()) {
|
|
@@ -13351,11 +13351,11 @@ function Lm(n, e) {
|
|
|
13351
13351
|
if (S) return;
|
|
13352
13352
|
const E = _.target.value;
|
|
13353
13353
|
if (Ze(E), ge(E), rs(E), f && E) {
|
|
13354
|
-
const { suggestion:
|
|
13355
|
-
|
|
13354
|
+
const { suggestion: qe } = co(U, E);
|
|
13355
|
+
qe != null && qe.label && P.current && !((X = _.nativeEvent.inputType) != null && X.includes("deleteContent")) && (P.current.value = qe.label, window.setTimeout(
|
|
13356
13356
|
() => {
|
|
13357
13357
|
var Nt;
|
|
13358
|
-
return (Nt = P.current) == null ? void 0 : Nt.setSelectionRange(E.length,
|
|
13358
|
+
return (Nt = P.current) == null ? void 0 : Nt.setSelectionRange(E.length, qe.label.length);
|
|
13359
13359
|
},
|
|
13360
13360
|
0
|
|
13361
13361
|
));
|
|
@@ -13364,7 +13364,7 @@ function Lm(n, e) {
|
|
|
13364
13364
|
[S, f, U, rs]
|
|
13365
13365
|
), ir = M(
|
|
13366
13366
|
(_) => {
|
|
13367
|
-
var X,
|
|
13367
|
+
var X, qe, Nt, Rn, Pt;
|
|
13368
13368
|
if (_.key === "Backspace") {
|
|
13369
13369
|
const Ut = !((X = P.current) != null && X.value);
|
|
13370
13370
|
if (!ve && Ut && l && A.length > 0) {
|
|
@@ -13374,13 +13374,13 @@ function Lm(n, e) {
|
|
|
13374
13374
|
}
|
|
13375
13375
|
return;
|
|
13376
13376
|
}
|
|
13377
|
-
if (_.key === "ArrowLeft" && l && A.length > 0 && (((
|
|
13378
|
-
_.preventDefault(),
|
|
13377
|
+
if (_.key === "ArrowLeft" && l && A.length > 0 && (((qe = P.current) == null ? void 0 : qe.selectionStart) ?? 0) === 0 && !((Nt = P.current) != null && Nt.value)) {
|
|
13378
|
+
_.preventDefault(), He(A.length - 1);
|
|
13379
13379
|
return;
|
|
13380
13380
|
}
|
|
13381
|
-
const E =
|
|
13381
|
+
const E = Dm(_.key, _.shiftKey, l);
|
|
13382
13382
|
if (E && !(_.key === "Tab" && !V)) {
|
|
13383
|
-
if (E === "focusListbox" && _.key === "Tab" && !((Rn =
|
|
13383
|
+
if (E === "focusListbox" && _.key === "Tab" && !((Rn = te.current) == null ? void 0 : Rn.querySelector(
|
|
13384
13384
|
'[role="option"]:not([data-disabled]), [data-type="new-option"]'
|
|
13385
13385
|
))) {
|
|
13386
13386
|
Tt();
|
|
@@ -13397,7 +13397,7 @@ function Lm(n, e) {
|
|
|
13397
13397
|
break;
|
|
13398
13398
|
}
|
|
13399
13399
|
case "focusListbox":
|
|
13400
|
-
|
|
13400
|
+
te.current && (V || ne(!0), Di(te.current, {
|
|
13401
13401
|
disabled: S,
|
|
13402
13402
|
allowUserInput: p,
|
|
13403
13403
|
customUserInput: k,
|
|
@@ -13405,7 +13405,7 @@ function Lm(n, e) {
|
|
|
13405
13405
|
}));
|
|
13406
13406
|
break;
|
|
13407
13407
|
case "closeOptions":
|
|
13408
|
-
|
|
13408
|
+
ne(!1);
|
|
13409
13409
|
break;
|
|
13410
13410
|
}
|
|
13411
13411
|
}
|
|
@@ -13429,14 +13429,14 @@ function Lm(n, e) {
|
|
|
13429
13429
|
zt.current = !1, q(!0);
|
|
13430
13430
|
return;
|
|
13431
13431
|
}
|
|
13432
|
-
!l && A[0] && P.current && P.current.type !== "hidden" && (ot(!0), P.current.value = Ni(A[0], U, b)), q(!0), ge(""),
|
|
13432
|
+
!l && A[0] && P.current && P.current.type !== "hidden" && (ot(!0), P.current.value = Ni(A[0], U, b)), q(!0), ge(""), ne(!0);
|
|
13433
13433
|
}
|
|
13434
13434
|
}, [S, l, A, U, b]), rr = M(() => {
|
|
13435
13435
|
q(!1), ot(!1);
|
|
13436
13436
|
}, []), ar = M(
|
|
13437
13437
|
(_) => {
|
|
13438
13438
|
if (S || !V) return;
|
|
13439
|
-
const E = _.relatedTarget, X =
|
|
13439
|
+
const E = _.relatedTarget, X = Ue.current;
|
|
13440
13440
|
X && E && X.contains(E) || Tt();
|
|
13441
13441
|
},
|
|
13442
13442
|
[S, V, Tt]
|
|
@@ -13447,12 +13447,12 @@ function Lm(n, e) {
|
|
|
13447
13447
|
_.preventDefault(), _.stopPropagation();
|
|
13448
13448
|
return;
|
|
13449
13449
|
}
|
|
13450
|
-
if (
|
|
13450
|
+
if (K)
|
|
13451
13451
|
(E = P.current) == null || E.focus();
|
|
13452
13452
|
else {
|
|
13453
13453
|
_.stopPropagation(), _.preventDefault();
|
|
13454
13454
|
const X = !V;
|
|
13455
|
-
|
|
13455
|
+
ne(X), X && te.current && Di(te.current, {
|
|
13456
13456
|
disabled: S,
|
|
13457
13457
|
allowUserInput: p,
|
|
13458
13458
|
customUserInput: k,
|
|
@@ -13460,12 +13460,12 @@ function Lm(n, e) {
|
|
|
13460
13460
|
});
|
|
13461
13461
|
}
|
|
13462
13462
|
},
|
|
13463
|
-
[S,
|
|
13463
|
+
[S, K, V, p, k, g]
|
|
13464
13464
|
), lr = M(
|
|
13465
13465
|
(_) => {
|
|
13466
|
-
S || (_.stopPropagation(),
|
|
13466
|
+
S || (_.stopPropagation(), K && P.current ? (P.current.focus(), q(!0)) : ne((E) => !E));
|
|
13467
13467
|
},
|
|
13468
|
-
[S,
|
|
13468
|
+
[S, K]
|
|
13469
13469
|
), R = M(
|
|
13470
13470
|
(_) => {
|
|
13471
13471
|
if (!S)
|
|
@@ -13474,8 +13474,8 @@ function Lm(n, e) {
|
|
|
13474
13474
|
case " ":
|
|
13475
13475
|
case "ArrowDown":
|
|
13476
13476
|
case "ArrowUp":
|
|
13477
|
-
_.preventDefault(), V ?
|
|
13478
|
-
|
|
13477
|
+
_.preventDefault(), V ? ne(!1) : (ne(!0), te.current && window.setTimeout(() => {
|
|
13478
|
+
te.current && Di(te.current, {
|
|
13479
13479
|
disabled: S,
|
|
13480
13480
|
allowUserInput: p && !Yt,
|
|
13481
13481
|
customUserInput: k,
|
|
@@ -13484,12 +13484,12 @@ function Lm(n, e) {
|
|
|
13484
13484
|
}, 0));
|
|
13485
13485
|
break;
|
|
13486
13486
|
case "Escape":
|
|
13487
|
-
V && (_.preventDefault(),
|
|
13487
|
+
V && (_.preventDefault(), ne(!1));
|
|
13488
13488
|
break;
|
|
13489
13489
|
case "Home":
|
|
13490
13490
|
case "End":
|
|
13491
|
-
_.preventDefault(), V ||
|
|
13492
|
-
|
|
13491
|
+
_.preventDefault(), V || ne(!0), te.current && window.setTimeout(() => {
|
|
13492
|
+
te.current && Di(te.current, {
|
|
13493
13493
|
disabled: S,
|
|
13494
13494
|
allowUserInput: p && !Yt,
|
|
13495
13495
|
customUserInput: k,
|
|
@@ -13498,7 +13498,7 @@ function Lm(n, e) {
|
|
|
13498
13498
|
}, 0);
|
|
13499
13499
|
break;
|
|
13500
13500
|
case "ArrowLeft":
|
|
13501
|
-
l && A.length > 0 && (_.preventDefault(),
|
|
13501
|
+
l && A.length > 0 && (_.preventDefault(), He(A.length - 1));
|
|
13502
13502
|
break;
|
|
13503
13503
|
case "Backspace":
|
|
13504
13504
|
case "Delete":
|
|
@@ -13527,10 +13527,10 @@ function Lm(n, e) {
|
|
|
13527
13527
|
_.preventDefault(), Mm(_.currentTarget);
|
|
13528
13528
|
break;
|
|
13529
13529
|
case "ArrowUp":
|
|
13530
|
-
_.preventDefault(),
|
|
13530
|
+
_.preventDefault(), te.current && uo(_.currentTarget, te.current, g);
|
|
13531
13531
|
break;
|
|
13532
13532
|
case "Escape":
|
|
13533
|
-
_.preventDefault(),
|
|
13533
|
+
_.preventDefault(), ne(!1), Ie();
|
|
13534
13534
|
break;
|
|
13535
13535
|
case "Tab":
|
|
13536
13536
|
Tt();
|
|
@@ -13540,36 +13540,36 @@ function Lm(n, e) {
|
|
|
13540
13540
|
[Vt, g, Ie, Tt]
|
|
13541
13541
|
), st = M(
|
|
13542
13542
|
(_) => {
|
|
13543
|
-
nt(_),
|
|
13543
|
+
nt(_), He(-1), K && P.current && (q(!0), P.current.focus());
|
|
13544
13544
|
},
|
|
13545
|
-
[nt,
|
|
13545
|
+
[nt, K]
|
|
13546
13546
|
), as = M(
|
|
13547
13547
|
(_, E) => {
|
|
13548
|
-
var X,
|
|
13548
|
+
var X, qe, Nt;
|
|
13549
13549
|
switch (_.stopPropagation(), _.key) {
|
|
13550
13550
|
case "ArrowLeft":
|
|
13551
|
-
_.preventDefault(), E > 0 &&
|
|
13551
|
+
_.preventDefault(), E > 0 && He(E - 1);
|
|
13552
13552
|
break;
|
|
13553
13553
|
case "ArrowRight":
|
|
13554
|
-
_.preventDefault(), E < A.length - 1 ?
|
|
13554
|
+
_.preventDefault(), E < A.length - 1 ? He(E + 1) : (He(-1), K && P.current ? P.current.focus() : (X = Ae.current) == null || X.focus());
|
|
13555
13555
|
break;
|
|
13556
13556
|
case "Backspace":
|
|
13557
13557
|
case "Delete":
|
|
13558
13558
|
_.preventDefault();
|
|
13559
13559
|
{
|
|
13560
13560
|
const Rn = A[E], Pt = E >= A.length - 1 ? E - 1 : E;
|
|
13561
|
-
nt(Rn), Pt >= 0 ?
|
|
13561
|
+
nt(Rn), Pt >= 0 ? He(Pt) : (He(-1), K && P.current ? P.current.focus() : (qe = Ae.current) == null || qe.focus());
|
|
13562
13562
|
}
|
|
13563
13563
|
break;
|
|
13564
13564
|
case "Tab":
|
|
13565
|
-
|
|
13565
|
+
He(-1);
|
|
13566
13566
|
break;
|
|
13567
13567
|
case "Escape":
|
|
13568
|
-
_.preventDefault(),
|
|
13568
|
+
_.preventDefault(), He(-1), K && P.current ? P.current.focus() : (Nt = Ae.current) == null || Nt.focus();
|
|
13569
13569
|
break;
|
|
13570
13570
|
}
|
|
13571
13571
|
},
|
|
13572
|
-
[A,
|
|
13572
|
+
[A, K, nt]
|
|
13573
13573
|
), ki = M(
|
|
13574
13574
|
(_) => {
|
|
13575
13575
|
ge(_.target.value), rs(_.target.value);
|
|
@@ -13579,8 +13579,8 @@ function Lm(n, e) {
|
|
|
13579
13579
|
(_) => {
|
|
13580
13580
|
switch (_.key) {
|
|
13581
13581
|
case "ArrowDown":
|
|
13582
|
-
if (_.preventDefault(),
|
|
13583
|
-
const E =
|
|
13582
|
+
if (_.preventDefault(), te.current) {
|
|
13583
|
+
const E = te.current.querySelector(
|
|
13584
13584
|
'[role="option"]:not([data-disabled]), [data-type="new-option"]'
|
|
13585
13585
|
);
|
|
13586
13586
|
E == null || E.focus();
|
|
@@ -13590,7 +13590,7 @@ function Lm(n, e) {
|
|
|
13590
13590
|
Tt();
|
|
13591
13591
|
break;
|
|
13592
13592
|
case "Escape":
|
|
13593
|
-
_.preventDefault(),
|
|
13593
|
+
_.preventDefault(), ne(!1), Ie();
|
|
13594
13594
|
break;
|
|
13595
13595
|
}
|
|
13596
13596
|
},
|
|
@@ -13608,13 +13608,13 @@ function Lm(n, e) {
|
|
|
13608
13608
|
_.preventDefault(), Vt(_.currentTarget.dataset.value || "");
|
|
13609
13609
|
break;
|
|
13610
13610
|
case "ArrowDown":
|
|
13611
|
-
_.preventDefault(),
|
|
13611
|
+
_.preventDefault(), te.current && Em(te.current);
|
|
13612
13612
|
break;
|
|
13613
13613
|
case "ArrowUp":
|
|
13614
|
-
_.preventDefault(),
|
|
13614
|
+
_.preventDefault(), te.current && uo(_.currentTarget, te.current, g);
|
|
13615
13615
|
break;
|
|
13616
13616
|
case "Escape":
|
|
13617
|
-
_.preventDefault(),
|
|
13617
|
+
_.preventDefault(), ne(!1), Ie();
|
|
13618
13618
|
break;
|
|
13619
13619
|
}
|
|
13620
13620
|
},
|
|
@@ -13624,20 +13624,20 @@ function Lm(n, e) {
|
|
|
13624
13624
|
if (!V) return;
|
|
13625
13625
|
const _ = (E) => {
|
|
13626
13626
|
const X = E.target;
|
|
13627
|
-
|
|
13627
|
+
Ue.current && !Ue.current.contains(X) && Tt();
|
|
13628
13628
|
};
|
|
13629
13629
|
return document.addEventListener("click", _, !0), () => {
|
|
13630
13630
|
document.removeEventListener("click", _, !0);
|
|
13631
13631
|
};
|
|
13632
13632
|
}, [V, Tt]), be(() => {
|
|
13633
13633
|
var X;
|
|
13634
|
-
const _ = (X =
|
|
13634
|
+
const _ = (X = Ue.current) == null ? void 0 : X.closest("form");
|
|
13635
13635
|
if (!_) return;
|
|
13636
13636
|
const E = () => {
|
|
13637
13637
|
window.setTimeout(() => {
|
|
13638
|
-
if (
|
|
13639
|
-
const
|
|
13640
|
-
Ee.current.value =
|
|
13638
|
+
if (Le(_e.current), Xe([]), Ze(""), ge(""), C(null), d(""), Ee.current) {
|
|
13639
|
+
const qe = l ? _e.current.join(",") : _e.current[0] || "";
|
|
13640
|
+
Ee.current.value = qe;
|
|
13641
13641
|
}
|
|
13642
13642
|
}, 0);
|
|
13643
13643
|
};
|
|
@@ -13651,15 +13651,15 @@ function Lm(n, e) {
|
|
|
13651
13651
|
},
|
|
13652
13652
|
set value(_) {
|
|
13653
13653
|
const E = Array.isArray(_) ? _ : _ ? String(_).split(",").filter(Boolean) : [];
|
|
13654
|
-
Re ||
|
|
13654
|
+
Re || Le(E), Ee.current && (Ee.current.value = E.join(","));
|
|
13655
13655
|
},
|
|
13656
13656
|
focus() {
|
|
13657
13657
|
var _, E;
|
|
13658
|
-
|
|
13658
|
+
K ? (_ = P.current) == null || _.focus() : (E = Ae.current) == null || E.focus();
|
|
13659
13659
|
},
|
|
13660
13660
|
blur() {
|
|
13661
13661
|
var _, E;
|
|
13662
|
-
|
|
13662
|
+
K ? (_ = P.current) == null || _.blur() : (E = Ae.current) == null || E.blur();
|
|
13663
13663
|
}
|
|
13664
13664
|
}),
|
|
13665
13665
|
[Re]
|
|
@@ -13667,14 +13667,14 @@ function Lm(n, e) {
|
|
|
13667
13667
|
// Identity
|
|
13668
13668
|
id: t,
|
|
13669
13669
|
inputId: ie,
|
|
13670
|
-
listboxId:
|
|
13670
|
+
listboxId: We,
|
|
13671
13671
|
// Values
|
|
13672
13672
|
values: A,
|
|
13673
13673
|
inputValue: et,
|
|
13674
13674
|
searchValue: ve,
|
|
13675
13675
|
// Options
|
|
13676
13676
|
options: U,
|
|
13677
|
-
filteredOptions:
|
|
13677
|
+
filteredOptions: Os,
|
|
13678
13678
|
// UI state
|
|
13679
13679
|
isOpen: V,
|
|
13680
13680
|
userInfoMessage: m,
|
|
@@ -13693,11 +13693,11 @@ function Lm(n, e) {
|
|
|
13693
13693
|
displayValueAs: b,
|
|
13694
13694
|
tagPlacement: v,
|
|
13695
13695
|
searchPlaceholder: $,
|
|
13696
|
-
placeholder:
|
|
13696
|
+
placeholder: D,
|
|
13697
13697
|
disabled: S,
|
|
13698
13698
|
required: T,
|
|
13699
13699
|
fullwidth: L,
|
|
13700
|
-
hasError:
|
|
13700
|
+
hasError: O,
|
|
13701
13701
|
errorMessage: W,
|
|
13702
13702
|
helptext: J,
|
|
13703
13703
|
helptextDropdown: oe,
|
|
@@ -13706,7 +13706,7 @@ function Lm(n, e) {
|
|
|
13706
13706
|
optionalText: N,
|
|
13707
13707
|
requiredTag: H,
|
|
13708
13708
|
requiredText: B,
|
|
13709
|
-
tagText:
|
|
13709
|
+
tagText: Q,
|
|
13710
13710
|
useWrapper: le,
|
|
13711
13711
|
name: ae,
|
|
13712
13712
|
className: me,
|
|
@@ -13716,8 +13716,8 @@ function Lm(n, e) {
|
|
|
13716
13716
|
inputRef: P,
|
|
13717
13717
|
changeInputRef: Ee,
|
|
13718
13718
|
triggerRef: Ae,
|
|
13719
|
-
listboxRef:
|
|
13720
|
-
wrapperRef:
|
|
13719
|
+
listboxRef: te,
|
|
13720
|
+
wrapperRef: Ue,
|
|
13721
13721
|
// Handlers
|
|
13722
13722
|
handleInputChange: yi,
|
|
13723
13723
|
handleInputKeydown: ir,
|
|
@@ -13828,7 +13828,7 @@ const gl = () => {
|
|
|
13828
13828
|
const s = ((o = e.parentElement) == null ? void 0 : o.getBoundingClientRect()) || e.getBoundingClientRect(), i = t ? s.height + 30 : s.height, r = n.getBoundingClientRect().height;
|
|
13829
13829
|
let a = t ? "calc(100% - 30px)" : "100%";
|
|
13830
13830
|
s && s.top + r > window.innerHeight && s.top - r > 0 && (a = `calc(100% - ${i}px - ${r}px)`), n.style.top = a;
|
|
13831
|
-
},
|
|
13831
|
+
}, Oi = (n, e, t, s, i, r) => {
|
|
13832
13832
|
const { key: a } = n;
|
|
13833
13833
|
a === "," && (n.preventDefault(), r ? r(n) : i && i()), (a === "Space" || a === " ") && (n.preventDefault(), e(n)), a === "Enter" && (n.preventDefault(), t ? t() : s ? s() : i && i());
|
|
13834
13834
|
}, zm = ({
|
|
@@ -13848,13 +13848,13 @@ const gl = () => {
|
|
|
13848
13848
|
inputRef: b,
|
|
13849
13849
|
hasCounter: v = !1,
|
|
13850
13850
|
onDateSelected: $,
|
|
13851
|
-
onClose:
|
|
13851
|
+
onClose: D
|
|
13852
13852
|
}) => {
|
|
13853
13853
|
const S = pe(null), T = pe(!1);
|
|
13854
13854
|
n && (T.current = !0), be(() => {
|
|
13855
13855
|
n && Wm(S.current, (b == null ? void 0 : b.current) ?? null, v);
|
|
13856
13856
|
}, [n, b, v]);
|
|
13857
|
-
const L = ["pkt-calendar-popup", n ? "show" : "hide"].join(" "),
|
|
13857
|
+
const L = ["pkt-calendar-popup", n ? "show" : "hide"].join(" "), O = n || T.current;
|
|
13858
13858
|
return /* @__PURE__ */ u(
|
|
13859
13859
|
"div",
|
|
13860
13860
|
{
|
|
@@ -13862,7 +13862,7 @@ const gl = () => {
|
|
|
13862
13862
|
className: L,
|
|
13863
13863
|
hidden: !n,
|
|
13864
13864
|
"aria-hidden": !n,
|
|
13865
|
-
children:
|
|
13865
|
+
children: O && /* @__PURE__ */ u(
|
|
13866
13866
|
hl,
|
|
13867
13867
|
{
|
|
13868
13868
|
multiple: e,
|
|
@@ -13878,7 +13878,7 @@ const gl = () => {
|
|
|
13878
13878
|
currentmonth: g,
|
|
13879
13879
|
today: p,
|
|
13880
13880
|
onDateSelected: $,
|
|
13881
|
-
onClose:
|
|
13881
|
+
onClose: D
|
|
13882
13882
|
}
|
|
13883
13883
|
)
|
|
13884
13884
|
}
|
|
@@ -13907,7 +13907,7 @@ const gl = () => {
|
|
|
13907
13907
|
);
|
|
13908
13908
|
}) });
|
|
13909
13909
|
}, Km = ({ state: n }) => {
|
|
13910
|
-
var
|
|
13910
|
+
var Ie, xe, De, Re;
|
|
13911
13911
|
const {
|
|
13912
13912
|
id: e,
|
|
13913
13913
|
inputId: t,
|
|
@@ -13924,11 +13924,11 @@ const gl = () => {
|
|
|
13924
13924
|
placeholder: b,
|
|
13925
13925
|
hasError: v,
|
|
13926
13926
|
helptext: $,
|
|
13927
|
-
minStr:
|
|
13927
|
+
minStr: D,
|
|
13928
13928
|
maxStr: S,
|
|
13929
13929
|
inputType: T,
|
|
13930
13930
|
isIOSDevice: L,
|
|
13931
|
-
strings:
|
|
13931
|
+
strings: O,
|
|
13932
13932
|
inputClasses: W,
|
|
13933
13933
|
buttonClasses: J,
|
|
13934
13934
|
rangeLabelClasses: oe,
|
|
@@ -13937,39 +13937,41 @@ const gl = () => {
|
|
|
13937
13937
|
inputRef: N,
|
|
13938
13938
|
inputRefTo: H,
|
|
13939
13939
|
btnRef: B,
|
|
13940
|
-
toggleCalendar:
|
|
13940
|
+
toggleCalendar: Q,
|
|
13941
13941
|
handleFocus: le,
|
|
13942
13942
|
handleSingleInputChange: ae,
|
|
13943
13943
|
handleRangeFromChange: me,
|
|
13944
13944
|
handleRangeToChange: ue,
|
|
13945
13945
|
handleRangeBlur: ke,
|
|
13946
|
-
handleMultipleBlur:
|
|
13946
|
+
handleMultipleBlur: se,
|
|
13947
13947
|
handleTagRemoved: ie,
|
|
13948
|
-
handleSingleKeydown:
|
|
13949
|
-
handleRangeFromKeydown:
|
|
13948
|
+
handleSingleKeydown: We,
|
|
13949
|
+
handleRangeFromKeydown: K,
|
|
13950
13950
|
handleRangeToKeydown: P,
|
|
13951
13951
|
handleMultipleKeydown: Ee,
|
|
13952
13952
|
restProps: Ae
|
|
13953
|
-
} = n,
|
|
13954
|
-
|
|
13953
|
+
} = n, te = (ze) => {
|
|
13954
|
+
ze.preventDefault(), Q();
|
|
13955
|
+
}, Ue = () => {
|
|
13956
|
+
var ze, Le;
|
|
13955
13957
|
return /* @__PURE__ */ w(
|
|
13956
13958
|
"button",
|
|
13957
13959
|
{
|
|
13958
13960
|
ref: B,
|
|
13959
13961
|
className: J,
|
|
13960
13962
|
type: "button",
|
|
13961
|
-
onClick:
|
|
13963
|
+
onClick: Q,
|
|
13962
13964
|
disabled: l,
|
|
13963
|
-
"aria-label": ((
|
|
13965
|
+
"aria-label": ((ze = O.calendar) == null ? void 0 : ze.buttonAltText) ?? "Åpne kalender",
|
|
13964
13966
|
children: [
|
|
13965
13967
|
/* @__PURE__ */ u(ee, { name: "calendar" }),
|
|
13966
|
-
/* @__PURE__ */ u("span", { className: "pkt-btn__text", children: ((
|
|
13968
|
+
/* @__PURE__ */ u("span", { className: "pkt-btn__text", children: ((Le = O.calendar) == null ? void 0 : Le.buttonAltText) ?? "Åpne kalender" })
|
|
13967
13969
|
]
|
|
13968
13970
|
}
|
|
13969
13971
|
);
|
|
13970
13972
|
};
|
|
13971
|
-
return r ? /* @__PURE__ */ w(
|
|
13972
|
-
/* @__PURE__ */ u(Ym, { dates: s, dateformat: i, idBase: e, strings:
|
|
13973
|
+
return r ? /* @__PURE__ */ w(Be, { children: [
|
|
13974
|
+
/* @__PURE__ */ u(Ym, { dates: s, dateformat: i, idBase: e, strings: O, onDateRemoved: ie }),
|
|
13973
13975
|
/* @__PURE__ */ u("div", { className: "pkt-datepicker__inputs", children: /* @__PURE__ */ w("div", { className: "pkt-input__container", children: [
|
|
13974
13976
|
/* @__PURE__ */ u(
|
|
13975
13977
|
"input",
|
|
@@ -13986,16 +13988,16 @@ const gl = () => {
|
|
|
13986
13988
|
"aria-describedby": $ ? `${e}-helptext` : void 0,
|
|
13987
13989
|
"aria-invalid": v,
|
|
13988
13990
|
"aria-errormessage": v ? `${e}-error` : void 0,
|
|
13989
|
-
onClick:
|
|
13991
|
+
onClick: te,
|
|
13990
13992
|
onKeyDown: Ee,
|
|
13991
13993
|
onFocus: le,
|
|
13992
|
-
onBlur:
|
|
13994
|
+
onBlur: se
|
|
13993
13995
|
}
|
|
13994
13996
|
),
|
|
13995
|
-
|
|
13997
|
+
Ue()
|
|
13996
13998
|
] }) })
|
|
13997
13999
|
] }) : a ? /* @__PURE__ */ u("div", { className: we, children: /* @__PURE__ */ w("div", { className: "pkt-input__container", children: [
|
|
13998
|
-
o && /* @__PURE__ */ u("div", { className: "pkt-input-prefix", children: ((
|
|
14000
|
+
o && /* @__PURE__ */ u("div", { className: "pkt-input-prefix", children: ((Ie = O.generic) == null ? void 0 : Ie.from) ?? "Fra" }),
|
|
13999
14001
|
/* @__PURE__ */ u(
|
|
14000
14002
|
"input",
|
|
14001
14003
|
{
|
|
@@ -14006,24 +14008,24 @@ const gl = () => {
|
|
|
14006
14008
|
id: t,
|
|
14007
14009
|
name: p ? `${p}-from` : `${e}-from`,
|
|
14008
14010
|
value: s[0] ?? "",
|
|
14009
|
-
min:
|
|
14011
|
+
min: D,
|
|
14010
14012
|
max: S,
|
|
14011
14013
|
placeholder: b,
|
|
14012
14014
|
readOnly: h || L && !h,
|
|
14013
14015
|
disabled: l,
|
|
14014
14016
|
required: f,
|
|
14015
|
-
"aria-label": `${g} ${((
|
|
14017
|
+
"aria-label": `${g} ${((xe = O.generic) == null ? void 0 : xe.from) ?? "Fra"}`,
|
|
14016
14018
|
"aria-describedby": $ ? `${e}-helptext` : void 0,
|
|
14017
14019
|
"aria-invalid": v,
|
|
14018
14020
|
"aria-errormessage": v ? `${e}-error` : void 0,
|
|
14019
|
-
onClick:
|
|
14020
|
-
onKeyDown:
|
|
14021
|
+
onClick: te,
|
|
14022
|
+
onKeyDown: K,
|
|
14021
14023
|
onFocus: le,
|
|
14022
14024
|
onBlur: ke,
|
|
14023
14025
|
onChange: me
|
|
14024
14026
|
}
|
|
14025
14027
|
),
|
|
14026
|
-
/* @__PURE__ */ u("div", { className: oe, id: `${e}-to-label`, children: ((
|
|
14028
|
+
/* @__PURE__ */ u("div", { className: oe, id: `${e}-to-label`, children: ((De = O.generic) == null ? void 0 : De.to) ?? "Til" }),
|
|
14027
14029
|
!o && /* @__PURE__ */ u("div", { className: "pkt-input-separator", children: "–" }),
|
|
14028
14030
|
/* @__PURE__ */ u(
|
|
14029
14031
|
"input",
|
|
@@ -14034,20 +14036,20 @@ const gl = () => {
|
|
|
14034
14036
|
id: `${e}-to`,
|
|
14035
14037
|
name: p ? `${p}-to` : `${e}-to`,
|
|
14036
14038
|
value: s[1] ?? "",
|
|
14037
|
-
min:
|
|
14039
|
+
min: D,
|
|
14038
14040
|
max: S,
|
|
14039
14041
|
readOnly: h || L && !h,
|
|
14040
14042
|
disabled: l,
|
|
14041
|
-
"aria-label": `${g} ${((
|
|
14043
|
+
"aria-label": `${g} ${((Re = O.generic) == null ? void 0 : Re.to) ?? "Til"}`,
|
|
14042
14044
|
"aria-invalid": v,
|
|
14043
|
-
onClick:
|
|
14045
|
+
onClick: te,
|
|
14044
14046
|
onKeyDown: P,
|
|
14045
14047
|
onFocus: le,
|
|
14046
14048
|
onBlur: ke,
|
|
14047
14049
|
onChange: ue
|
|
14048
14050
|
}
|
|
14049
14051
|
),
|
|
14050
|
-
|
|
14052
|
+
Ue()
|
|
14051
14053
|
] }) }) : /* @__PURE__ */ u("div", { className: "pkt-datepicker__inputs", children: /* @__PURE__ */ w("div", { className: "pkt-input__container", children: [
|
|
14052
14054
|
/* @__PURE__ */ u(
|
|
14053
14055
|
"input",
|
|
@@ -14059,7 +14061,7 @@ const gl = () => {
|
|
|
14059
14061
|
id: t,
|
|
14060
14062
|
name: p ?? e,
|
|
14061
14063
|
value: s[0] ?? "",
|
|
14062
|
-
min:
|
|
14064
|
+
min: D,
|
|
14063
14065
|
max: S,
|
|
14064
14066
|
placeholder: b,
|
|
14065
14067
|
readOnly: h || L && !h,
|
|
@@ -14068,14 +14070,14 @@ const gl = () => {
|
|
|
14068
14070
|
"aria-describedby": $ ? `${e}-helptext` : void 0,
|
|
14069
14071
|
"aria-invalid": v,
|
|
14070
14072
|
"aria-errormessage": v ? `${e}-error` : void 0,
|
|
14071
|
-
onClick:
|
|
14072
|
-
onKeyDown:
|
|
14073
|
+
onClick: te,
|
|
14074
|
+
onKeyDown: We,
|
|
14073
14075
|
onFocus: le,
|
|
14074
14076
|
onBlur: void 0,
|
|
14075
14077
|
onChange: ae
|
|
14076
14078
|
}
|
|
14077
14079
|
),
|
|
14078
|
-
|
|
14080
|
+
Ue()
|
|
14079
14081
|
] }) });
|
|
14080
14082
|
}, Gm = {
|
|
14081
14083
|
calendar: { buttonAltText: "Åpne kalender" }
|
|
@@ -14099,11 +14101,11 @@ function Xm(n, e) {
|
|
|
14099
14101
|
excludedates: b,
|
|
14100
14102
|
excludeweekdays: v,
|
|
14101
14103
|
currentmonth: $,
|
|
14102
|
-
today:
|
|
14104
|
+
today: D,
|
|
14103
14105
|
calendarOpen: S,
|
|
14104
14106
|
timezone: T,
|
|
14105
14107
|
fullwidth: L = !1,
|
|
14106
|
-
hasFieldset:
|
|
14108
|
+
hasFieldset: O = !1,
|
|
14107
14109
|
inline: W = !1,
|
|
14108
14110
|
helptext: J,
|
|
14109
14111
|
helptextDropdown: oe,
|
|
@@ -14112,37 +14114,37 @@ function Xm(n, e) {
|
|
|
14112
14114
|
errorMessage: N,
|
|
14113
14115
|
optionalTag: H = !1,
|
|
14114
14116
|
optionalText: B,
|
|
14115
|
-
requiredTag:
|
|
14117
|
+
requiredTag: Q = !1,
|
|
14116
14118
|
requiredText: le,
|
|
14117
14119
|
tagText: ae,
|
|
14118
14120
|
useWrapper: me = !0,
|
|
14119
14121
|
strings: ue,
|
|
14120
14122
|
disabled: ke = !1,
|
|
14121
|
-
readOnly:
|
|
14123
|
+
readOnly: se = !1,
|
|
14122
14124
|
required: ie = !1,
|
|
14123
|
-
name:
|
|
14124
|
-
min:
|
|
14125
|
+
name: We,
|
|
14126
|
+
min: K,
|
|
14125
14127
|
max: P,
|
|
14126
14128
|
placeholder: Ee,
|
|
14127
14129
|
onChange: Ae,
|
|
14128
|
-
onValueChange:
|
|
14129
|
-
className:
|
|
14130
|
+
onValueChange: te,
|
|
14131
|
+
className: Ue,
|
|
14130
14132
|
...Ie
|
|
14131
|
-
} = n, xe = M((R) => R === void 0 ? [] : ho(R), []),
|
|
14133
|
+
} = n, xe = M((R) => R === void 0 ? [] : ho(R), []), De = i !== void 0, Re = typeof r == "number" ? void 0 : r, [ze, Le] = ce(() => xe(i ?? Re)), _e = De ? xe(i) : ze, A = pe(ze);
|
|
14132
14134
|
be(() => {
|
|
14133
|
-
|
|
14134
|
-
}, [i,
|
|
14135
|
-
const [
|
|
14135
|
+
De && Le(xe(i));
|
|
14136
|
+
}, [i, De, xe]);
|
|
14137
|
+
const [je, Xe] = ce(S ?? !1);
|
|
14136
14138
|
be(() => {
|
|
14137
14139
|
S !== void 0 && Xe(S);
|
|
14138
14140
|
}, [S]);
|
|
14139
|
-
const U = pe(null), V = pe(null),
|
|
14141
|
+
const U = pe(null), V = pe(null), ne = pe(null), ve = pe(null), ge = pe(null), et = Te(() => Fm(), []), Ze = Te(() => gl(), []), m = Te(
|
|
14140
14142
|
() => ue ?? (h ? Qm : Gm),
|
|
14141
14143
|
[ue, h]
|
|
14142
|
-
), d = typeof
|
|
14143
|
-
const R = Um(L, f, o, h,
|
|
14144
|
+
), d = typeof K == "string" ? K : K !== void 0 ? String(K) : void 0, k = typeof P == "string" ? P : P !== void 0 ? String(P) : void 0, C = Te(() => {
|
|
14145
|
+
const R = Um(L, f, o, h, se, et);
|
|
14144
14146
|
return Object.entries(R).filter(([, F]) => F).map(([F]) => F).join(" ");
|
|
14145
|
-
}, [L, f, o, h,
|
|
14147
|
+
}, [L, f, o, h, se, et]), j = Te(() => {
|
|
14146
14148
|
const R = jm();
|
|
14147
14149
|
return Object.entries(R).filter(([, F]) => F).map(([F]) => F).join(" ");
|
|
14148
14150
|
}, []), q = Te(() => {
|
|
@@ -14154,18 +14156,18 @@ function Xm(n, e) {
|
|
|
14154
14156
|
), ot = Te(() => {
|
|
14155
14157
|
if ($) return $;
|
|
14156
14158
|
if (k) return k.slice(0, 7);
|
|
14157
|
-
}, [$, k]), tt = ke || o && l != null && _e.length >= l,
|
|
14159
|
+
}, [$, k]), tt = ke || o && l != null && _e.length >= l, He = o && l != null, zt = `${t}-input`, Yt = _e.join(",");
|
|
14158
14160
|
be(() => {
|
|
14159
|
-
|
|
14161
|
+
ne.current && (ne.current.value = Yt);
|
|
14160
14162
|
}, [Yt]), be(() => {
|
|
14161
14163
|
T && typeof window < "u" && T !== window.pktTz && (window.pktTz = T);
|
|
14162
14164
|
}, [T]);
|
|
14163
14165
|
const _t = M(
|
|
14164
14166
|
(R, F = !0) => {
|
|
14165
|
-
|
|
14167
|
+
De || Le(R), F && (te == null || te(R));
|
|
14166
14168
|
},
|
|
14167
|
-
[
|
|
14168
|
-
),
|
|
14169
|
+
[De, te]
|
|
14170
|
+
), Os = Te(
|
|
14169
14171
|
() => {
|
|
14170
14172
|
var R;
|
|
14171
14173
|
return (R = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")) == null ? void 0 : R.set;
|
|
@@ -14173,17 +14175,17 @@ function Xm(n, e) {
|
|
|
14173
14175
|
[]
|
|
14174
14176
|
), mt = M(
|
|
14175
14177
|
(R) => {
|
|
14176
|
-
const F =
|
|
14177
|
-
!F || !
|
|
14178
|
+
const F = ne.current;
|
|
14179
|
+
!F || !Os || (Os.call(F, R.join(",")), F.dispatchEvent(new Event("input", { bubbles: !0 })));
|
|
14178
14180
|
},
|
|
14179
|
-
[
|
|
14181
|
+
[Os]
|
|
14180
14182
|
), Ft = M(() => {
|
|
14181
14183
|
ke || Xe((R) => !R);
|
|
14182
14184
|
}, [ke]), Kt = M(() => {
|
|
14183
14185
|
Xe(!1);
|
|
14184
14186
|
}, []);
|
|
14185
14187
|
be(() => {
|
|
14186
|
-
if (!
|
|
14188
|
+
if (!je) return;
|
|
14187
14189
|
const R = (Je) => {
|
|
14188
14190
|
var as;
|
|
14189
14191
|
const st = Je.target;
|
|
@@ -14195,10 +14197,10 @@ function Xm(n, e) {
|
|
|
14195
14197
|
return document.addEventListener("click", R, !0), document.addEventListener("keydown", F), () => {
|
|
14196
14198
|
document.removeEventListener("click", R, !0), document.removeEventListener("keydown", F);
|
|
14197
14199
|
};
|
|
14198
|
-
}, [
|
|
14200
|
+
}, [je, Kt]);
|
|
14199
14201
|
const tn = M(() => {
|
|
14200
|
-
Ze && !
|
|
14201
|
-
}, [Ze,
|
|
14202
|
+
Ze && !je && Xe(!0);
|
|
14203
|
+
}, [Ze, je]), xn = M(
|
|
14202
14204
|
(R) => {
|
|
14203
14205
|
var st;
|
|
14204
14206
|
const F = qm(R, o, h), Je = ho(F);
|
|
@@ -14260,7 +14262,7 @@ function Xm(n, e) {
|
|
|
14260
14262
|
F ? F.requestSubmit() : R == null || R.blur();
|
|
14261
14263
|
}, []), rr = M(
|
|
14262
14264
|
(R) => {
|
|
14263
|
-
|
|
14265
|
+
Oi(
|
|
14264
14266
|
R.nativeEvent,
|
|
14265
14267
|
() => Ft(),
|
|
14266
14268
|
() => nn(U.current),
|
|
@@ -14274,7 +14276,7 @@ function Xm(n, e) {
|
|
|
14274
14276
|
[Ft, nn]
|
|
14275
14277
|
), ar = M(
|
|
14276
14278
|
(R) => {
|
|
14277
|
-
|
|
14279
|
+
Oi(
|
|
14278
14280
|
R.nativeEvent,
|
|
14279
14281
|
() => Ft(),
|
|
14280
14282
|
() => nn(U.current),
|
|
@@ -14291,7 +14293,7 @@ function Xm(n, e) {
|
|
|
14291
14293
|
[Ft, nn]
|
|
14292
14294
|
), or = M(
|
|
14293
14295
|
(R) => {
|
|
14294
|
-
|
|
14296
|
+
Oi(
|
|
14295
14297
|
R.nativeEvent,
|
|
14296
14298
|
() => Ft(),
|
|
14297
14299
|
() => nn(V.current),
|
|
@@ -14305,7 +14307,7 @@ function Xm(n, e) {
|
|
|
14305
14307
|
[Ft, nn]
|
|
14306
14308
|
), lr = M(
|
|
14307
14309
|
(R) => {
|
|
14308
|
-
|
|
14310
|
+
Oi(
|
|
14309
14311
|
R.nativeEvent,
|
|
14310
14312
|
() => Ft(),
|
|
14311
14313
|
() => nn(U.current),
|
|
@@ -14325,7 +14327,7 @@ function Xm(n, e) {
|
|
|
14325
14327
|
if (!R) return;
|
|
14326
14328
|
const F = () => {
|
|
14327
14329
|
window.setTimeout(() => {
|
|
14328
|
-
|
|
14330
|
+
Le(A.current), Xe(!1), ne.current && (ne.current.value = A.current.join(","));
|
|
14329
14331
|
}, 0);
|
|
14330
14332
|
};
|
|
14331
14333
|
return R.addEventListener("reset", F), () => R.removeEventListener("reset", F);
|
|
@@ -14334,11 +14336,11 @@ function Xm(n, e) {
|
|
|
14334
14336
|
() => ({
|
|
14335
14337
|
get value() {
|
|
14336
14338
|
var R;
|
|
14337
|
-
return ((R =
|
|
14339
|
+
return ((R = ne.current) == null ? void 0 : R.value) ?? "";
|
|
14338
14340
|
},
|
|
14339
14341
|
set value(R) {
|
|
14340
14342
|
const F = R ? R.split(",").filter(Boolean) : [];
|
|
14341
|
-
|
|
14343
|
+
Le(F), ne.current && (ne.current.value = R ?? "");
|
|
14342
14344
|
},
|
|
14343
14345
|
focus() {
|
|
14344
14346
|
var R;
|
|
@@ -14355,7 +14357,7 @@ function Xm(n, e) {
|
|
|
14355
14357
|
inputId: zt,
|
|
14356
14358
|
label: s,
|
|
14357
14359
|
values: _e,
|
|
14358
|
-
calendarOpen:
|
|
14360
|
+
calendarOpen: je,
|
|
14359
14361
|
dateformat: a,
|
|
14360
14362
|
multiple: o,
|
|
14361
14363
|
maxlength: l,
|
|
@@ -14366,12 +14368,12 @@ function Xm(n, e) {
|
|
|
14366
14368
|
excludedates: b,
|
|
14367
14369
|
excludeweekdays: v,
|
|
14368
14370
|
disabled: ke,
|
|
14369
|
-
readOnly:
|
|
14371
|
+
readOnly: se,
|
|
14370
14372
|
required: ie,
|
|
14371
|
-
name:
|
|
14373
|
+
name: We,
|
|
14372
14374
|
placeholder: Ee,
|
|
14373
14375
|
fullwidth: L,
|
|
14374
|
-
hasFieldset:
|
|
14376
|
+
hasFieldset: O,
|
|
14375
14377
|
inline: W,
|
|
14376
14378
|
helptext: J,
|
|
14377
14379
|
helptextDropdown: oe,
|
|
@@ -14380,15 +14382,15 @@ function Xm(n, e) {
|
|
|
14380
14382
|
errorMessage: N,
|
|
14381
14383
|
optionalTag: H,
|
|
14382
14384
|
optionalText: B,
|
|
14383
|
-
requiredTag:
|
|
14385
|
+
requiredTag: Q,
|
|
14384
14386
|
requiredText: le,
|
|
14385
14387
|
tagText: ae,
|
|
14386
14388
|
useWrapper: me,
|
|
14387
|
-
className:
|
|
14389
|
+
className: Ue,
|
|
14388
14390
|
minStr: d,
|
|
14389
14391
|
maxStr: k,
|
|
14390
14392
|
effectiveCurrentMonth: ot,
|
|
14391
|
-
today:
|
|
14393
|
+
today: D,
|
|
14392
14394
|
inputType: et,
|
|
14393
14395
|
isIOSDevice: Ze,
|
|
14394
14396
|
strings: m,
|
|
@@ -14397,10 +14399,10 @@ function Xm(n, e) {
|
|
|
14397
14399
|
rangeLabelClasses: q,
|
|
14398
14400
|
datepickerInputsClasses: de,
|
|
14399
14401
|
isInputDisabled: tt,
|
|
14400
|
-
hasCounter:
|
|
14402
|
+
hasCounter: He,
|
|
14401
14403
|
inputRef: U,
|
|
14402
14404
|
inputRefTo: V,
|
|
14403
|
-
changeInputRef:
|
|
14405
|
+
changeInputRef: ne,
|
|
14404
14406
|
btnRef: ve,
|
|
14405
14407
|
wrapperRef: ge,
|
|
14406
14408
|
onChange: Ae,
|
|
@@ -14538,7 +14540,7 @@ const Zr = Ki({}), rg = ".PDF, .JPEG, .JPG, .PNG, .HEIC, .DOC, .DOCX, .ODT", ag
|
|
|
14538
14540
|
[b]
|
|
14539
14541
|
);
|
|
14540
14542
|
Gi(g, () => p.current);
|
|
14541
|
-
const [$,
|
|
14543
|
+
const [$, D] = ce(!1), S = Te(() => o ? e ? tg : ng : e ? Jm : eg, [e, o]), T = M(
|
|
14542
14544
|
(N) => {
|
|
14543
14545
|
if (p.current)
|
|
14544
14546
|
try {
|
|
@@ -14557,7 +14559,7 @@ const Zr = Ki({}), rg = ".PDF, .JPEG, .JPG, .PNG, .HEIC, .DOC, .DOCX, .ODT", ag
|
|
|
14557
14559
|
s(H), p.current && (p.current.value = "");
|
|
14558
14560
|
},
|
|
14559
14561
|
[s]
|
|
14560
|
-
),
|
|
14562
|
+
), O = (N) => {
|
|
14561
14563
|
const H = N.target.files;
|
|
14562
14564
|
if (H.length === 0) {
|
|
14563
14565
|
e && T(t);
|
|
@@ -14567,13 +14569,13 @@ const Zr = Ki({}), rg = ".PDF, .JPEG, .JPG, .PNG, .HEIC, .DOC, .DOCX, .ODT", ag
|
|
|
14567
14569
|
}, W = (N) => {
|
|
14568
14570
|
L(N);
|
|
14569
14571
|
}, J = (N) => {
|
|
14570
|
-
if (N.preventDefault(),
|
|
14572
|
+
if (N.preventDefault(), D(!1), l) return;
|
|
14571
14573
|
const H = N.dataTransfer.files, B = Array.from(H);
|
|
14572
14574
|
W(B);
|
|
14573
14575
|
}, oe = (N) => {
|
|
14574
|
-
N.preventDefault(), !l &&
|
|
14576
|
+
N.preventDefault(), !l && D(!0);
|
|
14575
14577
|
}, we = () => {
|
|
14576
|
-
|
|
14578
|
+
D(!1);
|
|
14577
14579
|
}, Y = M(
|
|
14578
14580
|
(N) => {
|
|
14579
14581
|
var B;
|
|
@@ -14601,17 +14603,17 @@ const Zr = Ki({}), rg = ".PDF, .JPEG, .JPG, .PNG, .HEIC, .DOC, .DOCX, .ODT", ag
|
|
|
14601
14603
|
type: "file",
|
|
14602
14604
|
ref: p,
|
|
14603
14605
|
multiple: e,
|
|
14604
|
-
onChange:
|
|
14606
|
+
onChange: O,
|
|
14605
14607
|
accept: b,
|
|
14606
14608
|
disabled: l,
|
|
14607
14609
|
name: r === "form" && i || void 0,
|
|
14608
14610
|
"aria-label": e ? "Velg filer" : "Velg fil"
|
|
14609
14611
|
}
|
|
14610
14612
|
),
|
|
14611
|
-
r === "custom" && /* @__PURE__ */ u(
|
|
14613
|
+
r === "custom" && /* @__PURE__ */ u(Be, { children: t == null ? void 0 : t.map((N) => /* @__PURE__ */ u("input", { type: "hidden", name: i, value: N.fileId }, N.fileId)) }),
|
|
14612
14614
|
/* @__PURE__ */ w("div", { className: "pkt-fileupload__drop-zone__placeholder", children: [
|
|
14613
14615
|
/* @__PURE__ */ u(ee, { name: "attachment", className: "pkt-fileupload__drop-zone__placeholder__icon", "aria-hidden": "true" }),
|
|
14614
|
-
/* @__PURE__ */ u("p", { className: "pkt-fileupload__drop-zone__placeholder__title", children: $ ? `${S.dropFilesHere} ...` : /* @__PURE__ */ w(
|
|
14616
|
+
/* @__PURE__ */ u("p", { className: "pkt-fileupload__drop-zone__placeholder__title", children: $ ? `${S.dropFilesHere} ...` : /* @__PURE__ */ w(Be, { children: [
|
|
14615
14617
|
S.selectOrDragFiles,
|
|
14616
14618
|
" ",
|
|
14617
14619
|
/* @__PURE__ */ u(
|
|
@@ -14659,11 +14661,11 @@ const Zr = Ki({}), rg = ".PDF, .JPEG, .JPG, .PNG, .HEIC, .DOC, .DOCX, .ODT", ag
|
|
|
14659
14661
|
fullwidth: b = !1,
|
|
14660
14662
|
label: v,
|
|
14661
14663
|
name: $,
|
|
14662
|
-
optionalTag:
|
|
14664
|
+
optionalTag: D = !1,
|
|
14663
14665
|
optionalText: S,
|
|
14664
14666
|
requiredTag: T = !1,
|
|
14665
14667
|
requiredText: L,
|
|
14666
|
-
tagText:
|
|
14668
|
+
tagText: O = null,
|
|
14667
14669
|
placeholder: W,
|
|
14668
14670
|
rows: J,
|
|
14669
14671
|
useWrapper: oe = !0,
|
|
@@ -14672,16 +14674,16 @@ const Zr = Ki({}), rg = ".PDF, .JPEG, .JPG, .PNG, .HEIC, .DOC, .DOCX, .ODT", ag
|
|
|
14672
14674
|
autoComplete: N = "off",
|
|
14673
14675
|
minLength: H,
|
|
14674
14676
|
maxLength: B,
|
|
14675
|
-
readOnly:
|
|
14677
|
+
readOnly: Q,
|
|
14676
14678
|
skipForwardTestid: le = !1,
|
|
14677
14679
|
...ae
|
|
14678
14680
|
}, me) => {
|
|
14679
|
-
const ue = [r, "pkt-textinput", "pkt-textarea"].join(" "), ke = `${n}-input`,
|
|
14680
|
-
var Ae,
|
|
14681
|
-
s &&
|
|
14681
|
+
const ue = [r, "pkt-textinput", "pkt-textarea"].join(" "), ke = `${n}-input`, se = `${ke}-label`, ie = t || se, [We, K] = ce(0), P = (Ee) => {
|
|
14682
|
+
var Ae, te;
|
|
14683
|
+
s && K(((te = (Ae = Ee.currentTarget) == null ? void 0 : Ae.value) == null ? void 0 : te.length) || 0), we && we(Ee);
|
|
14682
14684
|
};
|
|
14683
14685
|
return be(() => {
|
|
14684
|
-
Y !== void 0 &&
|
|
14686
|
+
Y !== void 0 && K((Y == null ? void 0 : Y.length) || 0);
|
|
14685
14687
|
}, [Y]), /* @__PURE__ */ u(
|
|
14686
14688
|
is,
|
|
14687
14689
|
{
|
|
@@ -14696,20 +14698,20 @@ const Zr = Ki({}), rg = ".PDF, .JPEG, .JPG, .PNG, .HEIC, .DOC, .DOCX, .ODT", ag
|
|
|
14696
14698
|
helptextDropdownButton: g,
|
|
14697
14699
|
inline: p,
|
|
14698
14700
|
label: v,
|
|
14699
|
-
optionalTag:
|
|
14701
|
+
optionalTag: D,
|
|
14700
14702
|
optionalText: S,
|
|
14701
14703
|
requiredTag: T,
|
|
14702
14704
|
requiredText: L,
|
|
14703
|
-
tagText:
|
|
14705
|
+
tagText: O,
|
|
14704
14706
|
useWrapper: oe,
|
|
14705
14707
|
counter: s,
|
|
14706
|
-
counterCurrent:
|
|
14708
|
+
counterCurrent: We,
|
|
14707
14709
|
counterMaxLength: i,
|
|
14708
14710
|
children: /* @__PURE__ */ u(
|
|
14709
14711
|
"textarea",
|
|
14710
14712
|
{
|
|
14711
14713
|
ref: me,
|
|
14712
|
-
className: `pkt-input ${b ? "pkt-input--fullwidth" : ""} ${i &&
|
|
14714
|
+
className: `pkt-input ${b ? "pkt-input--fullwidth" : ""} ${i && We > i ? "pkt-input--counter-error" : ""}`,
|
|
14713
14715
|
name: `${$ || n}`,
|
|
14714
14716
|
id: ke,
|
|
14715
14717
|
placeholder: W,
|
|
@@ -14724,7 +14726,7 @@ const Zr = Ki({}), rg = ".PDF, .JPEG, .JPG, .PNG, .HEIC, .DOC, .DOCX, .ODT", ag
|
|
|
14724
14726
|
autoComplete: N,
|
|
14725
14727
|
minLength: H,
|
|
14726
14728
|
maxLength: B,
|
|
14727
|
-
readOnly:
|
|
14729
|
+
readOnly: Q,
|
|
14728
14730
|
"data-skip-forward-testid": le ? "true" : void 0
|
|
14729
14731
|
}
|
|
14730
14732
|
)
|
|
@@ -14756,7 +14758,7 @@ const lg = Symbol("comment"), cg = (n) => {
|
|
|
14756
14758
|
return (l = i.current) == null ? void 0 : l.focus({ preventScroll: !0 });
|
|
14757
14759
|
}, 0);
|
|
14758
14760
|
return () => clearTimeout(o);
|
|
14759
|
-
}, [n.fileId]), /* @__PURE__ */ w(
|
|
14761
|
+
}, [n.fileId]), /* @__PURE__ */ w(Be, { children: [
|
|
14760
14762
|
/* @__PURE__ */ u(
|
|
14761
14763
|
vl,
|
|
14762
14764
|
{
|
|
@@ -14865,7 +14867,7 @@ const lg = Symbol("comment"), cg = (n) => {
|
|
|
14865
14867
|
var i;
|
|
14866
14868
|
n.onSave(((i = e.current) == null ? void 0 : i.value) ?? "");
|
|
14867
14869
|
};
|
|
14868
|
-
return /* @__PURE__ */ w(
|
|
14870
|
+
return /* @__PURE__ */ w(Be, { children: [
|
|
14869
14871
|
/* @__PURE__ */ u("label", { htmlFor: t, className: "pkt-sr-only", children: "Endre filnavn" }),
|
|
14870
14872
|
/* @__PURE__ */ u(
|
|
14871
14873
|
"input",
|
|
@@ -15110,7 +15112,7 @@ const fo = 2, xg = (n) => {
|
|
|
15110
15112
|
transferItem: e
|
|
15111
15113
|
}) => {
|
|
15112
15114
|
const t = e.showProgress ?? e.progress !== 0;
|
|
15113
|
-
return /* @__PURE__ */ w(
|
|
15115
|
+
return /* @__PURE__ */ w(Be, { children: [
|
|
15114
15116
|
/* @__PURE__ */ u(
|
|
15115
15117
|
ee,
|
|
15116
15118
|
{
|
|
@@ -15121,7 +15123,7 @@ const fo = 2, xg = (n) => {
|
|
|
15121
15123
|
),
|
|
15122
15124
|
/* @__PURE__ */ u("p", { className: "pkt-fileupload__queue-display__item__title", "aria-label": "Filnavn", children: /* @__PURE__ */ u(bi, { children: e.attributes.targetFilename }) }),
|
|
15123
15125
|
/* @__PURE__ */ u(Jr, { onClick: n }),
|
|
15124
|
-
t ? /* @__PURE__ */ w(
|
|
15126
|
+
t ? /* @__PURE__ */ w(Be, { children: [
|
|
15125
15127
|
/* @__PURE__ */ u(
|
|
15126
15128
|
ta,
|
|
15127
15129
|
{
|
|
@@ -15136,12 +15138,12 @@ const fo = 2, xg = (n) => {
|
|
|
15136
15138
|
/* @__PURE__ */ u("span", { className: "pkt-fileupload__queue-display__item__percentage", "aria-hidden": "true", children: `${Math.round(e.progress * 100)}%` })
|
|
15137
15139
|
] }) : /* @__PURE__ */ u(Tg, {})
|
|
15138
15140
|
] });
|
|
15139
|
-
},
|
|
15141
|
+
}, Dg = ({
|
|
15140
15142
|
transferItem: n,
|
|
15141
15143
|
onRemove: e
|
|
15142
15144
|
}) => {
|
|
15143
15145
|
const t = (n.lastProgress ?? 1) * 100;
|
|
15144
|
-
return /* @__PURE__ */ w(
|
|
15146
|
+
return /* @__PURE__ */ w(Be, { children: [
|
|
15145
15147
|
/* @__PURE__ */ u(
|
|
15146
15148
|
ee,
|
|
15147
15149
|
{
|
|
@@ -15165,10 +15167,10 @@ const fo = 2, xg = (n) => {
|
|
|
15165
15167
|
/* @__PURE__ */ u("span", { className: "pkt-fileupload__queue-display__item__filesize", children: sr(n.file.size) }),
|
|
15166
15168
|
n.errorMessage && /* @__PURE__ */ u("span", { className: "pkt-fileupload__queue-display__item__error-message", children: n.errorMessage })
|
|
15167
15169
|
] });
|
|
15168
|
-
},
|
|
15170
|
+
}, Og = ({
|
|
15169
15171
|
transferItem: n,
|
|
15170
15172
|
onRemove: e
|
|
15171
|
-
}) => /* @__PURE__ */ w(
|
|
15173
|
+
}) => /* @__PURE__ */ w(Be, { children: [
|
|
15172
15174
|
/* @__PURE__ */ u(
|
|
15173
15175
|
ee,
|
|
15174
15176
|
{
|
|
@@ -15180,7 +15182,7 @@ const fo = 2, xg = (n) => {
|
|
|
15180
15182
|
/* @__PURE__ */ u("p", { className: "pkt-fileupload__queue-display__item__title", children: /* @__PURE__ */ u(bi, { children: n.attributes.targetFilename }) }),
|
|
15181
15183
|
/* @__PURE__ */ u(Jr, { onClick: e, label: "Fjern", ariaLabel: "Fjern fil som feilet under opplasting" }),
|
|
15182
15184
|
n.errorMessage && /* @__PURE__ */ u("span", { className: "pkt-fileupload__queue-display__item__error-message", children: n.errorMessage })
|
|
15183
|
-
] }), Mg = ({ transferItem: n, onRemove: e }) => n.showProgress ? /* @__PURE__ */ u(
|
|
15185
|
+
] }), Mg = ({ transferItem: n, onRemove: e }) => n.showProgress ? /* @__PURE__ */ u(Dg, { transferItem: n, onRemove: e }) : /* @__PURE__ */ u(Og, { transferItem: n, onRemove: e }), Eg = ({
|
|
15184
15186
|
operation: n,
|
|
15185
15187
|
onActivate: e,
|
|
15186
15188
|
transferItem: t
|
|
@@ -15200,7 +15202,7 @@ const fo = 2, xg = (n) => {
|
|
|
15200
15202
|
) : null;
|
|
15201
15203
|
}, kl = ({
|
|
15202
15204
|
transferItem: n
|
|
15203
|
-
}) => /* @__PURE__ */ w(
|
|
15205
|
+
}) => /* @__PURE__ */ w(Be, { children: [
|
|
15204
15206
|
/* @__PURE__ */ u(
|
|
15205
15207
|
ee,
|
|
15206
15208
|
{
|
|
@@ -15361,7 +15363,7 @@ const Pg = (n) => {
|
|
|
15361
15363
|
activatedOperation: e,
|
|
15362
15364
|
onActivate: t,
|
|
15363
15365
|
transferItem: s
|
|
15364
|
-
}) => /* @__PURE__ */ u(
|
|
15366
|
+
}) => /* @__PURE__ */ u(Be, { children: n.filter((i) => i.renderContent).map((i) => /* @__PURE__ */ u("div", { className: "pkt-fileupload__queue-display__item__operation-content", children: i.renderContent(
|
|
15365
15367
|
s,
|
|
15366
15368
|
() => t(s.fileId, i),
|
|
15367
15369
|
(e == null ? void 0 : e.symbol) === i.symbol
|
|
@@ -15375,8 +15377,8 @@ const Pg = (n) => {
|
|
|
15375
15377
|
onPreviewClick: a
|
|
15376
15378
|
}) => {
|
|
15377
15379
|
const o = () => r(n.fileId), h = (e == null ? void 0 : e.renderInlineUI) || (e == null ? void 0 : e.renderExtendedUI) ? [] : t;
|
|
15378
|
-
return /* @__PURE__ */ w(
|
|
15379
|
-
e != null && e.renderInlineUI ? /* @__PURE__ */ w(
|
|
15380
|
+
return /* @__PURE__ */ w(Be, { children: [
|
|
15381
|
+
e != null && e.renderInlineUI ? /* @__PURE__ */ w(Be, { children: [
|
|
15380
15382
|
/* @__PURE__ */ u(ee, { name: "document-text", className: "pkt-fileupload__queue-display__item__icon" }),
|
|
15381
15383
|
/* @__PURE__ */ u("div", { className: "pkt-fileupload__queue-display__item__inline-ui", children: e.renderInlineUI(n, o) })
|
|
15382
15384
|
] }) : /* @__PURE__ */ u(s, { transferItem: n, queueItemOperations: t, onPreviewClick: a }),
|
|
@@ -15464,7 +15466,7 @@ const Pg = (n) => {
|
|
|
15464
15466
|
uploadStrategy: o = "form"
|
|
15465
15467
|
}) => {
|
|
15466
15468
|
const l = Vg(n, t, o), h = Ug(l, a), f = $g(s), g = _g(h);
|
|
15467
|
-
return /* @__PURE__ */ w(
|
|
15469
|
+
return /* @__PURE__ */ w(Be, { children: [
|
|
15468
15470
|
/* @__PURE__ */ u("ul", { className: "pkt-fileupload__queue-display", children: /* @__PURE__ */ u(yl.Provider, { value: { tail: r }, children: l.map((p) => /* @__PURE__ */ w(
|
|
15469
15471
|
"li",
|
|
15470
15472
|
{
|
|
@@ -15526,11 +15528,11 @@ const Pg = (n) => {
|
|
|
15526
15528
|
formatErrorMessage: v,
|
|
15527
15529
|
maxFileSize: $,
|
|
15528
15530
|
// default to 5 MB
|
|
15529
|
-
sizeErrorMessage:
|
|
15531
|
+
sizeErrorMessage: D,
|
|
15530
15532
|
onFileValidation: S,
|
|
15531
15533
|
errorMessage: T,
|
|
15532
15534
|
hasError: L = !1,
|
|
15533
|
-
disabled:
|
|
15535
|
+
disabled: O = !1,
|
|
15534
15536
|
label: W,
|
|
15535
15537
|
helptext: J,
|
|
15536
15538
|
optionalTag: oe,
|
|
@@ -15538,11 +15540,11 @@ const Pg = (n) => {
|
|
|
15538
15540
|
enableImagePreview: Y = !1,
|
|
15539
15541
|
...N
|
|
15540
15542
|
}, H) => {
|
|
15541
|
-
const B = "transfers" in N ? N.transfers : void 0, [
|
|
15543
|
+
const B = "transfers" in N ? N.transfers : void 0, [Q, le] = ce(null), ae = L || !!Q, me = T || Q, ue = $ ? Cg($) : void 0, ke = M(
|
|
15542
15544
|
(V) => {
|
|
15543
|
-
var
|
|
15545
|
+
var ne;
|
|
15544
15546
|
if (b && b.length > 0) {
|
|
15545
|
-
const ve = ((
|
|
15547
|
+
const ve = ((ne = V.name.split(".").pop()) == null ? void 0 : ne.toLowerCase()) || "", ge = V.type.toLowerCase();
|
|
15546
15548
|
if (!b.some((Ze) => {
|
|
15547
15549
|
const m = Ze.toLowerCase().replace(/^\./, "");
|
|
15548
15550
|
if (m.includes("/")) {
|
|
@@ -15560,24 +15562,24 @@ const Pg = (n) => {
|
|
|
15560
15562
|
}
|
|
15561
15563
|
if (ue && V.size > ue) {
|
|
15562
15564
|
const ve = sr(ue), ge = `Filen er for stor. Maks størrelse er ${ve}.`;
|
|
15563
|
-
return (
|
|
15565
|
+
return (D == null ? void 0 : D.replace("{maxSize}", ve)) || ge;
|
|
15564
15566
|
}
|
|
15565
15567
|
return S ? S(V) : null;
|
|
15566
15568
|
},
|
|
15567
|
-
[b, v, ue,
|
|
15569
|
+
[b, v, ue, D, S]
|
|
15568
15570
|
);
|
|
15569
15571
|
n !== void 0 && e !== void 0 && console.warn(
|
|
15570
15572
|
"PktFileupload: Både value og defaultValue er angitt. Komponenten kan være enten 'controlled' eller 'uncontrolled', ikke begge deler. Bruk kun én av dem. Se https://react.dev/reference/react-dom/components/input#controlling-an-input-with-a-state-variable"
|
|
15571
15573
|
), n !== void 0 && l === void 0 && console.warn(
|
|
15572
15574
|
"PktFileupload: value-prop er angitt uten onFilesChanged-callback. Når en komponent er 'controlled', må endringer håndteres via en callback. Vennligst legg til onFilesChanged-callback for å håndtere endringer i fil-listen. Se https://react.dev/reference/react-dom/components/input#controlling-an-input-with-a-state-variable"
|
|
15573
15575
|
);
|
|
15574
|
-
const ie = n !== void 0 ? n : e || [],
|
|
15576
|
+
const ie = n !== void 0 ? n : e || [], We = typeof g == "string" ? mo[g] : g, K = g === "thumbnail", P = typeof N.accept == "string" ? N.accept.trim() : void 0, Ee = Te(() => {
|
|
15575
15577
|
if (!(!b || b.length === 0))
|
|
15576
15578
|
return b.map((V) => V.trim()).filter(Boolean).map((V) => {
|
|
15577
|
-
const
|
|
15578
|
-
return
|
|
15579
|
+
const ne = V.toLowerCase();
|
|
15580
|
+
return ne.includes("/") || ne.startsWith(".") ? ne : `.${ne}`;
|
|
15579
15581
|
}).join(", ");
|
|
15580
|
-
}, [b]), Ae = P || Ee,
|
|
15582
|
+
}, [b]), Ae = P || Ee, te = a && !K, Ue = r && !K, Ie = M(
|
|
15581
15583
|
(V) => {
|
|
15582
15584
|
for (const ve of V) {
|
|
15583
15585
|
const ge = ke(ve.file);
|
|
@@ -15587,66 +15589,66 @@ const Pg = (n) => {
|
|
|
15587
15589
|
}
|
|
15588
15590
|
}
|
|
15589
15591
|
le(null);
|
|
15590
|
-
const
|
|
15591
|
-
l && l(
|
|
15592
|
+
const ne = s ? [...ie, ...V] : [V[0]];
|
|
15593
|
+
l && l(ne), i === "custom" && h && V.forEach((ve) => {
|
|
15592
15594
|
h == null || h(ve);
|
|
15593
15595
|
});
|
|
15594
15596
|
},
|
|
15595
15597
|
[l, ie, s, i, h, ke]
|
|
15596
15598
|
), xe = M(
|
|
15597
|
-
(V,
|
|
15598
|
-
const ve = ie.map((ge) => ge.fileId === V ? { ...ge, ...
|
|
15599
|
+
(V, ne) => {
|
|
15600
|
+
const ve = ie.map((ge) => ge.fileId === V ? { ...ge, ...ne } : ge);
|
|
15599
15601
|
l && l(ve);
|
|
15600
15602
|
},
|
|
15601
15603
|
[l, ie]
|
|
15602
|
-
),
|
|
15604
|
+
), De = M(
|
|
15603
15605
|
(V) => {
|
|
15604
15606
|
var ve;
|
|
15605
|
-
const
|
|
15606
|
-
l && l(
|
|
15607
|
+
const ne = ie.filter((ge) => ge.fileId !== V);
|
|
15608
|
+
l && l(ne), "onTransferCancelled" in N && N.onTransferCancelled && ((ve = N.onTransferCancelled) == null || ve.call(N, V));
|
|
15607
15609
|
},
|
|
15608
15610
|
[l, ie, N]
|
|
15609
|
-
), { fileAttributes: Re } = kg(ie, xe),
|
|
15611
|
+
), { fileAttributes: Re } = kg(ie, xe), ze = Te(
|
|
15610
15612
|
() => [
|
|
15611
15613
|
{
|
|
15612
15614
|
op: yg,
|
|
15613
|
-
enabled:
|
|
15615
|
+
enabled: te
|
|
15614
15616
|
},
|
|
15615
15617
|
{
|
|
15616
15618
|
op: (V) => pg(V),
|
|
15617
|
-
enabled:
|
|
15619
|
+
enabled: Ue
|
|
15618
15620
|
}
|
|
15619
15621
|
].filter(({ enabled: V }) => V).map(({ op: V }) => V).concat(...f),
|
|
15620
|
-
[
|
|
15621
|
-
),
|
|
15622
|
+
[te, Ue]
|
|
15623
|
+
), Le = Te(
|
|
15622
15624
|
() => ({
|
|
15623
15625
|
uploaded: `${t}-uploaded`,
|
|
15624
15626
|
errors: `${t}-errors`
|
|
15625
15627
|
}),
|
|
15626
15628
|
[t]
|
|
15627
|
-
), { totalCount: _e, uploadedCount: A, failedCount:
|
|
15629
|
+
), { totalCount: _e, uploadedCount: A, failedCount: je } = Te(() => {
|
|
15628
15630
|
const V = ie.length;
|
|
15629
15631
|
if (!B)
|
|
15630
15632
|
return { totalCount: V, uploadedCount: 0, failedCount: 0 };
|
|
15631
|
-
let
|
|
15633
|
+
let ne = 0, ve = 0;
|
|
15632
15634
|
for (const ge of ie) {
|
|
15633
15635
|
const et = B.find((Ze) => Ze.fileId === ge.fileId);
|
|
15634
|
-
(et == null ? void 0 : et.progress) === "done" &&
|
|
15636
|
+
(et == null ? void 0 : et.progress) === "done" && ne++, (et == null ? void 0 : et.progress) === "error" && ve++;
|
|
15635
15637
|
}
|
|
15636
|
-
return { totalCount: V, uploadedCount:
|
|
15638
|
+
return { totalCount: V, uploadedCount: ne, failedCount: ve };
|
|
15637
15639
|
}, [ie, B]), Xe = _e === 1 ? "fil" : "filer", U = /* @__PURE__ */ u(
|
|
15638
15640
|
"div",
|
|
15639
15641
|
{
|
|
15640
15642
|
className: $e("pkt-fileupload", {
|
|
15641
15643
|
"pkt-fileupload--full-width": p,
|
|
15642
15644
|
"pkt-fileupload--error": ae,
|
|
15643
|
-
"pkt-fileupload--disabled":
|
|
15645
|
+
"pkt-fileupload--disabled": O
|
|
15644
15646
|
}),
|
|
15645
|
-
"aria-disabled":
|
|
15646
|
-
...
|
|
15647
|
+
"aria-disabled": O,
|
|
15648
|
+
...O ? { inert: "" } : {},
|
|
15647
15649
|
children: /* @__PURE__ */ w(Zr.Provider, { value: { name: N.name || "", multiple: !!s, id: t }, children: [
|
|
15648
|
-
/* @__PURE__ */ u("div", { id:
|
|
15649
|
-
/* @__PURE__ */ u("div", { id:
|
|
15650
|
+
/* @__PURE__ */ u("div", { id: Le.uploaded, className: "pkt-sr-only", "aria-live": "polite", "aria-atomic": "true", children: _e > 0 && A > 0 && `${A} av ${_e} ${Xe} lastet opp` }),
|
|
15651
|
+
/* @__PURE__ */ u("div", { id: Le.errors, className: "pkt-sr-only", "aria-live": "assertive", "aria-atomic": "true", children: _e > 0 && je > 0 && `Feil ved opplasting: ${je} av ${_e} ${Xe} feilet` }),
|
|
15650
15652
|
/* @__PURE__ */ u(
|
|
15651
15653
|
ag,
|
|
15652
15654
|
{
|
|
@@ -15657,10 +15659,10 @@ const Pg = (n) => {
|
|
|
15657
15659
|
multiple: s,
|
|
15658
15660
|
uploadStrategy: i,
|
|
15659
15661
|
ref: H,
|
|
15660
|
-
accept:
|
|
15661
|
-
isThumbnailView:
|
|
15662
|
-
disabled:
|
|
15663
|
-
srAnnouncementIds:
|
|
15662
|
+
accept: K ? ".jpeg, .jpg, .png, .gif, .webp, .heic" : Ae,
|
|
15663
|
+
isThumbnailView: K,
|
|
15664
|
+
disabled: O,
|
|
15665
|
+
srAnnouncementIds: Le
|
|
15664
15666
|
}
|
|
15665
15667
|
),
|
|
15666
15668
|
ae && me && /* @__PURE__ */ u(Kr, { skin: "error", "aria-live": "assertive", role: "alert", compact: !0, children: me }),
|
|
@@ -15668,13 +15670,13 @@ const Pg = (n) => {
|
|
|
15668
15670
|
jg,
|
|
15669
15671
|
{
|
|
15670
15672
|
files: ie,
|
|
15671
|
-
cancelTransfer:
|
|
15673
|
+
cancelTransfer: De,
|
|
15672
15674
|
truncateTail: o,
|
|
15673
15675
|
transfers: B,
|
|
15674
15676
|
uploadStrategy: i,
|
|
15675
|
-
ItemRenderer:
|
|
15676
|
-
enableImagePreview:
|
|
15677
|
-
queueItemOperations:
|
|
15677
|
+
ItemRenderer: We,
|
|
15678
|
+
enableImagePreview: K && Y,
|
|
15679
|
+
queueItemOperations: ze.map((V) => V(Re)).concat(mg(De))
|
|
15678
15680
|
}
|
|
15679
15681
|
)
|
|
15680
15682
|
] })
|
|
@@ -15686,7 +15688,7 @@ const Pg = (n) => {
|
|
|
15686
15688
|
forId: t,
|
|
15687
15689
|
label: W,
|
|
15688
15690
|
helptext: J,
|
|
15689
|
-
disabled:
|
|
15691
|
+
disabled: O,
|
|
15690
15692
|
hasError: ae,
|
|
15691
15693
|
optionalTag: oe,
|
|
15692
15694
|
requiredTag: we,
|
|
@@ -15716,7 +15718,7 @@ const vb = ({
|
|
|
15716
15718
|
console.log($.detail);
|
|
15717
15719
|
}
|
|
15718
15720
|
}) => {
|
|
15719
|
-
var
|
|
15721
|
+
var D, S;
|
|
15720
15722
|
const $ = [s, "pkt-footer"].filter(Boolean).join(" ");
|
|
15721
15723
|
return /* @__PURE__ */ u("footer", { className: $, "data-mode": "dark", children: /* @__PURE__ */ w("div", { className: "pkt-footer__container", children: [
|
|
15722
15724
|
/* @__PURE__ */ w("div", { className: "pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16", children: [
|
|
@@ -15724,7 +15726,7 @@ const vb = ({
|
|
|
15724
15726
|
/* @__PURE__ */ u("h2", { className: "pkt-footer__title", children: n.title }),
|
|
15725
15727
|
/* @__PURE__ */ w("ul", { className: "pkt-footer__list", children: [
|
|
15726
15728
|
n.text && /* @__PURE__ */ u("li", { className: "pkt-footer__text", children: n.text }),
|
|
15727
|
-
(
|
|
15729
|
+
(D = n.links) == null ? void 0 : D.map((T, L) => /* @__PURE__ */ u("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ w(
|
|
15728
15730
|
"a",
|
|
15729
15731
|
{
|
|
15730
15732
|
className: `pkt-footer__link ${T.external ? "pkt-link--external" : ""}`,
|
|
@@ -16049,11 +16051,11 @@ const Br = Ce(
|
|
|
16049
16051
|
iconNameRight: b,
|
|
16050
16052
|
inline: v = !1,
|
|
16051
16053
|
fullwidth: $ = !1,
|
|
16052
|
-
label:
|
|
16054
|
+
label: D,
|
|
16053
16055
|
name: S,
|
|
16054
16056
|
optionalTag: T = !1,
|
|
16055
16057
|
optionalText: L,
|
|
16056
|
-
requiredTag:
|
|
16058
|
+
requiredTag: O = !1,
|
|
16057
16059
|
requiredText: W,
|
|
16058
16060
|
tagText: J = null,
|
|
16059
16061
|
placeholder: oe,
|
|
@@ -16062,54 +16064,54 @@ const Br = Ce(
|
|
|
16062
16064
|
type: N = "text",
|
|
16063
16065
|
useWrapper: H = !0,
|
|
16064
16066
|
omitSearchIcon: B = !1,
|
|
16065
|
-
value:
|
|
16067
|
+
value: Q,
|
|
16066
16068
|
minLength: le,
|
|
16067
16069
|
maxLength: ae,
|
|
16068
16070
|
min: me,
|
|
16069
16071
|
max: ue,
|
|
16070
16072
|
step: ke,
|
|
16071
|
-
size:
|
|
16073
|
+
size: se,
|
|
16072
16074
|
readonly: ie,
|
|
16073
|
-
required:
|
|
16074
|
-
dataTestid:
|
|
16075
|
+
required: We,
|
|
16076
|
+
dataTestid: K,
|
|
16075
16077
|
onChange: P,
|
|
16076
16078
|
skipForwardTestid: Ee = !1,
|
|
16077
16079
|
...Ae
|
|
16078
|
-
},
|
|
16079
|
-
const
|
|
16080
|
+
}, te) => {
|
|
16081
|
+
const Ue = [a, "pkt-textinput"].join(" "), Ie = N === "search" && !b && !B, xe = N === "date" && Q ? Q.slice(0, 10) : Q, [De, Re] = ce((Q == null ? void 0 : Q.length) || 0), ze = `${n}`, Le = `${ze}-label`, _e = t || Le, A = (je) => {
|
|
16080
16082
|
var Xe, U;
|
|
16081
|
-
i && Re(((U = (Xe =
|
|
16083
|
+
i && Re(((U = (Xe = je.currentTarget) == null ? void 0 : Xe.value) == null ? void 0 : U.length) || 0), P && P(je);
|
|
16082
16084
|
};
|
|
16083
16085
|
return be(() => {
|
|
16084
|
-
|
|
16085
|
-
}, [
|
|
16086
|
+
Q !== void 0 && Re((Q == null ? void 0 : Q.length) || 0);
|
|
16087
|
+
}, [Q]), /* @__PURE__ */ u(
|
|
16086
16088
|
is,
|
|
16087
16089
|
{
|
|
16088
16090
|
ariaDescribedby: e,
|
|
16089
|
-
className:
|
|
16091
|
+
className: Ue,
|
|
16090
16092
|
disabled: o,
|
|
16091
16093
|
errorMessage: l,
|
|
16092
|
-
forId:
|
|
16094
|
+
forId: ze,
|
|
16093
16095
|
hasError: h,
|
|
16094
16096
|
helptext: f,
|
|
16095
16097
|
helptextDropdown: g,
|
|
16096
16098
|
helptextDropdownButton: p,
|
|
16097
16099
|
inline: v,
|
|
16098
|
-
label:
|
|
16100
|
+
label: D,
|
|
16099
16101
|
optionalTag: T,
|
|
16100
16102
|
optionalText: L,
|
|
16101
|
-
requiredTag:
|
|
16103
|
+
requiredTag: O,
|
|
16102
16104
|
requiredText: W,
|
|
16103
16105
|
tagText: J,
|
|
16104
16106
|
useWrapper: H,
|
|
16105
16107
|
counter: i,
|
|
16106
|
-
counterCurrent:
|
|
16108
|
+
counterCurrent: De,
|
|
16107
16109
|
counterMaxLength: r,
|
|
16108
16110
|
children: /* @__PURE__ */ w(
|
|
16109
16111
|
"div",
|
|
16110
16112
|
{
|
|
16111
16113
|
className: "pkt-input__container",
|
|
16112
|
-
"data-testid":
|
|
16114
|
+
"data-testid": K,
|
|
16113
16115
|
"data-skip-forward-testid": Ee ? "true" : void 0,
|
|
16114
16116
|
children: [
|
|
16115
16117
|
we && /* @__PURE__ */ u("div", { className: "pkt-input-prefix", children: we }),
|
|
@@ -16117,12 +16119,12 @@ const Br = Ce(
|
|
|
16117
16119
|
"input",
|
|
16118
16120
|
{
|
|
16119
16121
|
...Ae,
|
|
16120
|
-
ref:
|
|
16121
|
-
className: `pkt-input ${$ ? "pkt-input--fullwidth" : ""} ${r &&
|
|
16122
|
+
ref: te,
|
|
16123
|
+
className: `pkt-input ${$ ? "pkt-input--fullwidth" : ""} ${r && De > r ? "pkt-input--counter-error" : ""}`,
|
|
16122
16124
|
type: N,
|
|
16123
16125
|
name: `${S || n}`,
|
|
16124
16126
|
value: xe,
|
|
16125
|
-
id:
|
|
16127
|
+
id: ze,
|
|
16126
16128
|
placeholder: oe,
|
|
16127
16129
|
autoComplete: s,
|
|
16128
16130
|
disabled: o,
|
|
@@ -16135,9 +16137,9 @@ const Br = Ce(
|
|
|
16135
16137
|
step: ke,
|
|
16136
16138
|
minLength: le,
|
|
16137
16139
|
maxLength: ae,
|
|
16138
|
-
size:
|
|
16140
|
+
size: se,
|
|
16139
16141
|
readOnly: ie,
|
|
16140
|
-
required:
|
|
16142
|
+
required: We
|
|
16141
16143
|
}
|
|
16142
16144
|
),
|
|
16143
16145
|
Y && /* @__PURE__ */ w("p", { className: "pkt-input-suffix", children: [
|
|
@@ -16173,11 +16175,11 @@ const wl = Ce(
|
|
|
16173
16175
|
searchPlaceholder: b = "Søk",
|
|
16174
16176
|
representing: v,
|
|
16175
16177
|
serviceLink: $,
|
|
16176
|
-
serviceClick:
|
|
16178
|
+
serviceClick: D,
|
|
16177
16179
|
serviceName: S,
|
|
16178
16180
|
user: T,
|
|
16179
16181
|
userMenu: L,
|
|
16180
|
-
userMenuFooter:
|
|
16182
|
+
userMenuFooter: O,
|
|
16181
16183
|
userOptions: W,
|
|
16182
16184
|
canChangeRepresentation: J = !1,
|
|
16183
16185
|
changeRepresentation: oe,
|
|
@@ -16186,15 +16188,15 @@ const wl = Ce(
|
|
|
16186
16188
|
logoClick: N,
|
|
16187
16189
|
position: H = "fixed",
|
|
16188
16190
|
scrollBehavior: B = "hide",
|
|
16189
|
-
slotMenuVariant:
|
|
16191
|
+
slotMenuVariant: Q = "icon-only",
|
|
16190
16192
|
slotMenuText: le = "Meny"
|
|
16191
16193
|
}, ae) => {
|
|
16192
16194
|
const me = H === "fixed", ue = B === "hide";
|
|
16193
16195
|
be(() => {
|
|
16194
|
-
|
|
16196
|
+
O && console.warn(
|
|
16195
16197
|
'PktHeaderService: The "userMenuFooter" prop is deprecated and will be removed in a future version. Please use "userMenu" instead.'
|
|
16196
16198
|
);
|
|
16197
|
-
}, [
|
|
16199
|
+
}, [O]), be(() => {
|
|
16198
16200
|
W && console.warn('PktHeaderService: The "userOptions" prop is no longer available. Please use "userMenu" instead.');
|
|
16199
16201
|
}, [W]), be(() => {
|
|
16200
16202
|
T != null && T.shortname && console.warn(
|
|
@@ -16210,29 +16212,29 @@ const wl = Ce(
|
|
|
16210
16212
|
month: "long",
|
|
16211
16213
|
day: "numeric"
|
|
16212
16214
|
});
|
|
16213
|
-
}, [T == null ? void 0 : T.lastLoggedIn]), [
|
|
16215
|
+
}, [T == null ? void 0 : T.lastLoggedIn]), [se, ie] = ce(l || "none");
|
|
16214
16216
|
be(() => {
|
|
16215
16217
|
l !== void 0 && ie(l);
|
|
16216
16218
|
}, [l]);
|
|
16217
|
-
const [
|
|
16219
|
+
const [We, K] = ce(!1), [P, Ee] = ce(0), [Ae, te] = ce(!1), [Ue, Ie] = ce(!1), xe = pe(null), De = pe(null), Re = pe(null), ze = pe(null), Le = pe(null), _e = pe(null), A = pe(null), je = pe(!1), Xe = qg(xe), U = Xe < n, V = Xe < e, ne = M(
|
|
16218
16220
|
(d) => {
|
|
16219
16221
|
xe.current = d, typeof ae == "function" ? ae(d) : ae && (ae.current = d);
|
|
16220
16222
|
},
|
|
16221
16223
|
[ae]
|
|
16222
16224
|
);
|
|
16223
|
-
Wg(me && U &&
|
|
16225
|
+
Wg(me && U && se !== "none");
|
|
16224
16226
|
const ve = M((d, k) => {
|
|
16225
16227
|
const C = d.relatedTarget;
|
|
16226
16228
|
let j;
|
|
16227
16229
|
switch (k) {
|
|
16228
16230
|
case "user":
|
|
16229
|
-
j =
|
|
16231
|
+
j = De;
|
|
16230
16232
|
break;
|
|
16231
16233
|
case "slot":
|
|
16232
16234
|
j = Re;
|
|
16233
16235
|
break;
|
|
16234
16236
|
case "search":
|
|
16235
|
-
j =
|
|
16237
|
+
j = ze;
|
|
16236
16238
|
break;
|
|
16237
16239
|
default:
|
|
16238
16240
|
return;
|
|
@@ -16240,26 +16242,26 @@ const wl = Ce(
|
|
|
16240
16242
|
const q = j.current;
|
|
16241
16243
|
q && (!C || !q.contains(C)) && ie("none");
|
|
16242
16244
|
}, []), ge = M(() => {
|
|
16243
|
-
|
|
16245
|
+
je.current && A.current && document.contains(A.current) && A.current.focus(), A.current = null, je.current = !1;
|
|
16244
16246
|
}, []);
|
|
16245
16247
|
be(() => {
|
|
16246
16248
|
const d = (C) => {
|
|
16247
|
-
T &&
|
|
16249
|
+
T && se === "user" && !C.target.closest(".pkt-header-service__user-container") && ie("none"), se === "slot" && !C.target.closest(".pkt-header-service__slot-container") && ie("none"), se === "search" && !C.target.closest(".pkt-header-service__search-container") && !C.target.closest(".pkt-header-service__search-input") && ie("none");
|
|
16248
16250
|
}, k = (C) => {
|
|
16249
|
-
C.key === "Escape" &&
|
|
16251
|
+
C.key === "Escape" && se !== "none" && (C.preventDefault(), je.current = !0, ie("none"));
|
|
16250
16252
|
};
|
|
16251
|
-
if (
|
|
16253
|
+
if (se !== "none")
|
|
16252
16254
|
return document.addEventListener("mousedown", d), document.addEventListener("keydown", k), () => {
|
|
16253
16255
|
document.removeEventListener("mousedown", d), document.removeEventListener("keydown", k);
|
|
16254
16256
|
};
|
|
16255
16257
|
ge();
|
|
16256
|
-
}, [
|
|
16258
|
+
}, [se, T, ge]), be(() => {
|
|
16257
16259
|
const d = () => {
|
|
16258
16260
|
if (ue) {
|
|
16259
16261
|
const k = window.pageYOffset || document.documentElement.scrollTop;
|
|
16260
16262
|
if (k < 0 || Math.abs(k - P) < 60)
|
|
16261
16263
|
return;
|
|
16262
|
-
|
|
16264
|
+
K(k > P), Ee(k);
|
|
16263
16265
|
}
|
|
16264
16266
|
};
|
|
16265
16267
|
return document && window.addEventListener("scroll", d), () => {
|
|
@@ -16268,23 +16270,23 @@ const wl = Ce(
|
|
|
16268
16270
|
}, [ue, P]);
|
|
16269
16271
|
const et = M(
|
|
16270
16272
|
(d) => {
|
|
16271
|
-
const k = d === "slot" ? Re :
|
|
16273
|
+
const k = d === "slot" ? Re : ze, C = d === "slot" ? Le : _e;
|
|
16272
16274
|
if (!k.current || !C.current || !V || U) return;
|
|
16273
16275
|
const j = k.current.getBoundingClientRect(), q = C.current.offsetWidth, de = j.left + q > window.innerWidth;
|
|
16274
|
-
d === "slot" ?
|
|
16276
|
+
d === "slot" ? te(de) : Ie(de);
|
|
16275
16277
|
},
|
|
16276
16278
|
[V, U]
|
|
16277
16279
|
), Ze = M(
|
|
16278
16280
|
(d) => {
|
|
16279
|
-
|
|
16281
|
+
se !== "none" ? ie("none") : (A.current = document.activeElement, ie(d));
|
|
16280
16282
|
},
|
|
16281
|
-
[
|
|
16283
|
+
[se]
|
|
16282
16284
|
);
|
|
16283
16285
|
be(() => {
|
|
16284
|
-
(
|
|
16285
|
-
et(
|
|
16286
|
+
(se === "slot" || se === "search") && requestAnimationFrame(() => {
|
|
16287
|
+
et(se);
|
|
16286
16288
|
});
|
|
16287
|
-
}, [
|
|
16289
|
+
}, [se, et]);
|
|
16288
16290
|
const m = /* @__PURE__ */ w(
|
|
16289
16291
|
"header",
|
|
16290
16292
|
{
|
|
@@ -16295,11 +16297,11 @@ const wl = Ce(
|
|
|
16295
16297
|
V && "pkt-header-service--tablet",
|
|
16296
16298
|
me && "pkt-header-service--fixed",
|
|
16297
16299
|
ue && "pkt-header-service--scroll-to-hide",
|
|
16298
|
-
|
|
16300
|
+
We && "pkt-header-service--hidden",
|
|
16299
16301
|
s
|
|
16300
16302
|
),
|
|
16301
16303
|
"data-mode": r,
|
|
16302
|
-
ref:
|
|
16304
|
+
ref: ne,
|
|
16303
16305
|
children: [
|
|
16304
16306
|
/* @__PURE__ */ w(
|
|
16305
16307
|
"div",
|
|
@@ -16339,7 +16341,7 @@ const wl = Ce(
|
|
|
16339
16341
|
path: "https://punkt-cdn.oslo.kommune.no/16.0/logos/"
|
|
16340
16342
|
}
|
|
16341
16343
|
) }),
|
|
16342
|
-
S && /* @__PURE__ */ u("span", { className: "pkt-header-service__service-name", children: $ ? /* @__PURE__ */ u(ea, { href: $, className: "pkt-header-service__service-link ", children: S }) :
|
|
16344
|
+
S && /* @__PURE__ */ u("span", { className: "pkt-header-service__service-name", children: $ ? /* @__PURE__ */ u(ea, { href: $, className: "pkt-header-service__service-link ", children: S }) : D ? /* @__PURE__ */ u("button", { className: "pkt-link-button pkt-link pkt-header-service__service-link", onClick: D, children: S }) : /* @__PURE__ */ u("span", { className: "pkt-header-service__service-link", children: S }) })
|
|
16343
16345
|
]
|
|
16344
16346
|
}
|
|
16345
16347
|
),
|
|
@@ -16347,7 +16349,7 @@ const wl = Ce(
|
|
|
16347
16349
|
/* @__PURE__ */ w(
|
|
16348
16350
|
"div",
|
|
16349
16351
|
{
|
|
16350
|
-
className: $e("pkt-header-service__slot-container",
|
|
16352
|
+
className: $e("pkt-header-service__slot-container", se === "slot" && "is-open"),
|
|
16351
16353
|
onBlur: (d) => ve(d, "slot"),
|
|
16352
16354
|
ref: Re,
|
|
16353
16355
|
children: [
|
|
@@ -16355,12 +16357,12 @@ const wl = Ce(
|
|
|
16355
16357
|
$t,
|
|
16356
16358
|
{
|
|
16357
16359
|
skin: "secondary",
|
|
16358
|
-
variant:
|
|
16360
|
+
variant: Q,
|
|
16359
16361
|
iconName: "menu",
|
|
16360
16362
|
size: U ? "small" : "medium",
|
|
16361
|
-
state:
|
|
16363
|
+
state: se === "slot" ? "active" : "normal",
|
|
16362
16364
|
onClick: () => Ze("slot"),
|
|
16363
|
-
"aria-expanded":
|
|
16365
|
+
"aria-expanded": se === "slot",
|
|
16364
16366
|
"aria-controls": "mobile-slot-menu",
|
|
16365
16367
|
"aria-label": "Åpne meny",
|
|
16366
16368
|
children: le
|
|
@@ -16373,19 +16375,19 @@ const wl = Ce(
|
|
|
16373
16375
|
id: "mobile-slot-menu",
|
|
16374
16376
|
role: V ? "menu" : void 0,
|
|
16375
16377
|
"aria-label": V ? "Meny" : void 0,
|
|
16376
|
-
ref:
|
|
16378
|
+
ref: Le,
|
|
16377
16379
|
children: /* @__PURE__ */ u("div", { className: "pkt-contents", children: t })
|
|
16378
16380
|
}
|
|
16379
16381
|
)
|
|
16380
16382
|
]
|
|
16381
16383
|
}
|
|
16382
16384
|
),
|
|
16383
|
-
h && /* @__PURE__ */ u(
|
|
16385
|
+
h && /* @__PURE__ */ u(Be, { children: V ? /* @__PURE__ */ w(
|
|
16384
16386
|
"div",
|
|
16385
16387
|
{
|
|
16386
|
-
className: $e("pkt-header-service__search-container",
|
|
16388
|
+
className: $e("pkt-header-service__search-container", se === "search" && "is-open"),
|
|
16387
16389
|
onBlur: (d) => ve(d, "search"),
|
|
16388
|
-
ref:
|
|
16390
|
+
ref: ze,
|
|
16389
16391
|
children: [
|
|
16390
16392
|
/* @__PURE__ */ u(
|
|
16391
16393
|
$t,
|
|
@@ -16395,8 +16397,8 @@ const wl = Ce(
|
|
|
16395
16397
|
iconName: "magnifying-glass-big",
|
|
16396
16398
|
size: U ? "small" : "medium",
|
|
16397
16399
|
onClick: () => Ze("search"),
|
|
16398
|
-
state:
|
|
16399
|
-
"aria-expanded":
|
|
16400
|
+
state: se === "search" ? "active" : "normal",
|
|
16401
|
+
"aria-expanded": se === "search",
|
|
16400
16402
|
"aria-controls": "mobile-search-menu",
|
|
16401
16403
|
"aria-label": "Åpne søkefelt",
|
|
16402
16404
|
children: "Søk"
|
|
@@ -16407,11 +16409,11 @@ const wl = Ce(
|
|
|
16407
16409
|
{
|
|
16408
16410
|
className: $e(
|
|
16409
16411
|
"pkt-header-service__mobile-menu",
|
|
16410
|
-
|
|
16411
|
-
|
|
16412
|
+
se === "search" && "is-open",
|
|
16413
|
+
Ue && "align-right"
|
|
16412
16414
|
),
|
|
16413
16415
|
ref: _e,
|
|
16414
|
-
children:
|
|
16416
|
+
children: se === "search" && /* @__PURE__ */ u(
|
|
16415
16417
|
Br,
|
|
16416
16418
|
{
|
|
16417
16419
|
id: "mobile-search-menu",
|
|
@@ -16467,7 +16469,7 @@ const wl = Ce(
|
|
|
16467
16469
|
{
|
|
16468
16470
|
className: "pkt-header-service__user-container",
|
|
16469
16471
|
onBlur: (d) => ve(d, "user"),
|
|
16470
|
-
ref:
|
|
16472
|
+
ref: De,
|
|
16471
16473
|
children: [
|
|
16472
16474
|
/* @__PURE__ */ w(
|
|
16473
16475
|
$t,
|
|
@@ -16478,10 +16480,10 @@ const wl = Ce(
|
|
|
16478
16480
|
),
|
|
16479
16481
|
skin: "secondary",
|
|
16480
16482
|
size: U ? "small" : "medium",
|
|
16481
|
-
state:
|
|
16483
|
+
state: se === "user" ? "active" : "normal",
|
|
16482
16484
|
variant: "icons-right-and-left",
|
|
16483
16485
|
iconName: "user",
|
|
16484
|
-
secondIconName:
|
|
16486
|
+
secondIconName: se === "user" ? "chevron-thin-up" : "chevron-thin-down",
|
|
16485
16487
|
onClick: () => Ze("user"),
|
|
16486
16488
|
children: [
|
|
16487
16489
|
/* @__PURE__ */ u("span", { className: "pkt-sr-only", children: "Brukermeny: " }),
|
|
@@ -16489,7 +16491,7 @@ const wl = Ce(
|
|
|
16489
16491
|
]
|
|
16490
16492
|
}
|
|
16491
16493
|
),
|
|
16492
|
-
|
|
16494
|
+
se === "user" && T && /* @__PURE__ */ u(
|
|
16493
16495
|
"div",
|
|
16494
16496
|
{
|
|
16495
16497
|
className: $e(
|
|
@@ -16666,7 +16668,7 @@ const rv = Ce(
|
|
|
16666
16668
|
requiredText: b,
|
|
16667
16669
|
tagText: v,
|
|
16668
16670
|
...$
|
|
16669
|
-
},
|
|
16671
|
+
}, D) => {
|
|
16670
16672
|
const S = [s, "pkt-input-check"].filter(Boolean).join(" "), T = [
|
|
16671
16673
|
"pkt-input-check__input",
|
|
16672
16674
|
i ? "pkt-input-check__input--tile" : "",
|
|
@@ -16674,7 +16676,7 @@ const rv = Ce(
|
|
|
16674
16676
|
].filter(Boolean).join(" "), L = [
|
|
16675
16677
|
"pkt-input-check__input-checkbox",
|
|
16676
16678
|
o ? "pkt-input-check__input-checkbox--error" : ""
|
|
16677
|
-
].filter(Boolean).join(" "),
|
|
16679
|
+
].filter(Boolean).join(" "), O = ["pkt-input-check__input-label", r ? "pkt-input-check__input-label--disabled" : ""].filter(Boolean).join(" "), W = ["pkt-tag", "pkt-tag--small", "pkt-tag--thin-text"].join(" "), J = () => /* @__PURE__ */ w(Be, { children: [
|
|
16678
16680
|
v && /* @__PURE__ */ u("span", { className: W + " pkt-tag--gray", children: v }),
|
|
16679
16681
|
f && /* @__PURE__ */ u("span", { className: W + " pkt-tag--blue-light", children: g }),
|
|
16680
16682
|
p && /* @__PURE__ */ u("span", { className: W + " pkt-tag--beige", children: b })
|
|
@@ -16683,7 +16685,7 @@ const rv = Ce(
|
|
|
16683
16685
|
/* @__PURE__ */ u(
|
|
16684
16686
|
"input",
|
|
16685
16687
|
{
|
|
16686
|
-
ref:
|
|
16688
|
+
ref: D,
|
|
16687
16689
|
id: n,
|
|
16688
16690
|
type: "radio",
|
|
16689
16691
|
name: e,
|
|
@@ -16693,7 +16695,7 @@ const rv = Ce(
|
|
|
16693
16695
|
...$
|
|
16694
16696
|
}
|
|
16695
16697
|
),
|
|
16696
|
-
/* @__PURE__ */ w("label", { className:
|
|
16698
|
+
/* @__PURE__ */ w("label", { className: O, htmlFor: n, children: [
|
|
16697
16699
|
t,
|
|
16698
16700
|
" ",
|
|
16699
16701
|
J(),
|
|
@@ -16721,14 +16723,14 @@ const av = Ce(
|
|
|
16721
16723
|
onSuggestionClick: b,
|
|
16722
16724
|
...v
|
|
16723
16725
|
}, $) => {
|
|
16724
|
-
const
|
|
16725
|
-
|
|
16726
|
-
}, S = (
|
|
16727
|
-
l =
|
|
16726
|
+
const D = (O, W) => {
|
|
16727
|
+
O ? O() : b && b(W);
|
|
16728
|
+
}, S = (O) => {
|
|
16729
|
+
l = O.target.value;
|
|
16728
16730
|
}, T = `pkt-searchinput pkt-searchinput--${n} ${t ? "pkt-searchinput--fullwidth" : ""}`;
|
|
16729
16731
|
let L;
|
|
16730
|
-
return h ? L = (
|
|
16731
|
-
/* @__PURE__ */ w(
|
|
16732
|
+
return h ? L = (O) => /* @__PURE__ */ u("form", { role: "search", className: T, action: h, method: f, children: O }) : L = (O) => /* @__PURE__ */ u("div", { role: "search", className: T, children: O }), L(
|
|
16733
|
+
/* @__PURE__ */ w(Be, { children: [
|
|
16732
16734
|
i && /* @__PURE__ */ u("label", { htmlFor: i ? s : void 0, className: i ? "pkt-inputwrapper__label" : "", children: i }),
|
|
16733
16735
|
/* @__PURE__ */ w("div", { className: n === "local" ? "pkt-input__container" : "pkt-searchinput__field", children: [
|
|
16734
16736
|
/* @__PURE__ */ u(
|
|
@@ -16746,8 +16748,8 @@ const av = Ce(
|
|
|
16746
16748
|
ref: $,
|
|
16747
16749
|
"aria-controls": `${s}-suggestions`,
|
|
16748
16750
|
onChange: g || S,
|
|
16749
|
-
onKeyUp: p && ((
|
|
16750
|
-
|
|
16751
|
+
onKeyUp: p && ((O) => {
|
|
16752
|
+
O.key === "Enter" && (O.preventDefault(), p(l));
|
|
16751
16753
|
}),
|
|
16752
16754
|
...v
|
|
16753
16755
|
}
|
|
@@ -16762,25 +16764,25 @@ const av = Ce(
|
|
|
16762
16764
|
color: n === "global" ? "yellow" : void 0,
|
|
16763
16765
|
type: "submit",
|
|
16764
16766
|
disabled: e,
|
|
16765
|
-
onClick: p && ((
|
|
16766
|
-
|
|
16767
|
+
onClick: p && ((O) => {
|
|
16768
|
+
O.preventDefault(), p(l);
|
|
16767
16769
|
}),
|
|
16768
16770
|
children: i || a
|
|
16769
16771
|
}
|
|
16770
16772
|
)
|
|
16771
16773
|
] }),
|
|
16772
|
-
o && /* @__PURE__ */ u("ul", { id: `${s}-suggestions`, className: "pkt-searchinput__suggestions", "aria-live": "assertive", children: o.map((
|
|
16773
|
-
|
|
16774
|
+
o && /* @__PURE__ */ u("ul", { id: `${s}-suggestions`, className: "pkt-searchinput__suggestions", "aria-live": "assertive", children: o.map((O, W) => /* @__PURE__ */ u("li", { children: Pl(
|
|
16775
|
+
O.href ? "a" : O.onClick ? "button" : "div",
|
|
16774
16776
|
{
|
|
16775
|
-
href:
|
|
16776
|
-
className: `pkt-searchinput__suggestion ${
|
|
16777
|
-
type:
|
|
16778
|
-
onClick: () => O
|
|
16779
|
-
onKeyUp: (J) => J.key === "Enter" && O
|
|
16777
|
+
href: O.href,
|
|
16778
|
+
className: `pkt-searchinput__suggestion ${O.onClick ? "pkt-link-button" : ""} ${O.href || O.onClick ? "pkt-searchinput__suggestion--has-hover" : ""}`,
|
|
16779
|
+
type: O.onClick ? "button" : void 0,
|
|
16780
|
+
onClick: () => D(O.onClick, W),
|
|
16781
|
+
onKeyUp: (J) => J.key === "Enter" && D(O.onClick, W)
|
|
16780
16782
|
},
|
|
16781
|
-
/* @__PURE__ */ w(
|
|
16782
|
-
|
|
16783
|
-
|
|
16783
|
+
/* @__PURE__ */ w(Be, { children: [
|
|
16784
|
+
O.title && /* @__PURE__ */ u("h3", { className: "pkt-searchinput__suggestion-title", children: O.title }),
|
|
16785
|
+
O.text && /* @__PURE__ */ u("p", { className: "pkt-searchinput__suggestion-text", children: O.text })
|
|
16784
16786
|
] })
|
|
16785
16787
|
) }, `search-suggestion-${W}`)) })
|
|
16786
16788
|
] })
|
|
@@ -16806,11 +16808,11 @@ const ov = Ce(
|
|
|
16806
16808
|
label: b,
|
|
16807
16809
|
name: v,
|
|
16808
16810
|
optionalTag: $ = !1,
|
|
16809
|
-
optionalText:
|
|
16811
|
+
optionalText: D,
|
|
16810
16812
|
requiredTag: S = !1,
|
|
16811
16813
|
requiredText: T,
|
|
16812
16814
|
tagText: L,
|
|
16813
|
-
...
|
|
16815
|
+
...O
|
|
16814
16816
|
}, W) => {
|
|
16815
16817
|
const J = [s, "pkt-select"].join(" ");
|
|
16816
16818
|
return /* @__PURE__ */ u(
|
|
@@ -16823,7 +16825,7 @@ const ov = Ce(
|
|
|
16823
16825
|
helptextDropdown: l,
|
|
16824
16826
|
helptextDropdownButton: h,
|
|
16825
16827
|
optionalTag: $,
|
|
16826
|
-
optionalText:
|
|
16828
|
+
optionalText: D,
|
|
16827
16829
|
requiredTag: S,
|
|
16828
16830
|
requiredText: T,
|
|
16829
16831
|
tagText: L,
|
|
@@ -16843,7 +16845,7 @@ const ov = Ce(
|
|
|
16843
16845
|
disabled: i,
|
|
16844
16846
|
id: `${f}-input`,
|
|
16845
16847
|
name: v || f,
|
|
16846
|
-
...
|
|
16848
|
+
...O,
|
|
16847
16849
|
children: t
|
|
16848
16850
|
}
|
|
16849
16851
|
)
|
|
@@ -16936,12 +16938,12 @@ const kb = ({
|
|
|
16936
16938
|
ref: (S) => {
|
|
16937
16939
|
g(l, S), typeof h == "function" ? h(S) : h && (h.current = S);
|
|
16938
16940
|
}
|
|
16939
|
-
},
|
|
16941
|
+
}, D = /* @__PURE__ */ w(Be, { children: [
|
|
16940
16942
|
i && /* @__PURE__ */ u(ee, { name: i, className: "pkt-icon--small" }),
|
|
16941
16943
|
n,
|
|
16942
16944
|
a && /* @__PURE__ */ u(gs, { skin: o, size: "small", children: a })
|
|
16943
16945
|
] });
|
|
16944
|
-
return t ? /* @__PURE__ */ u("a", { ...$, href: t, className: `pkt-tabs__link ${e ? "active" : ""}`, children:
|
|
16946
|
+
return t ? /* @__PURE__ */ u("a", { ...$, href: t, className: `pkt-tabs__link ${e ? "active" : ""}`, children: D }) : /* @__PURE__ */ u("button", { ...$, type: "button", className: `pkt-tabs__button pkt-link-button ${e ? "active" : ""}`, children: D });
|
|
16945
16947
|
}
|
|
16946
16948
|
);
|
|
16947
16949
|
xl.displayName = "PktTabItem";
|
|
@@ -16960,12 +16962,12 @@ const Sl = Ki(null), hv = () => {
|
|
|
16960
16962
|
const $ = t == null ? void 0 : t[v];
|
|
16961
16963
|
$ != null && $.action && $.action(v), s && s(v);
|
|
16962
16964
|
}, g = (v, $) => {
|
|
16963
|
-
var
|
|
16964
|
-
o && ($.code === "ArrowLeft" && v !== 0 && ((
|
|
16965
|
+
var D, S;
|
|
16966
|
+
o && ($.code === "ArrowLeft" && v !== 0 && ((D = a.current[v - 1]) == null || D.focus()), $.code === "ArrowRight" && v < h - 1 && ((S = a.current[v + 1]) == null || S.focus()), ($.code === "ArrowDown" || $.code === "Space") && f(v));
|
|
16965
16967
|
}, p = (v, $) => {
|
|
16966
16968
|
a.current[v] = $;
|
|
16967
16969
|
}, b = t == null ? void 0 : t.map((v, $) => {
|
|
16968
|
-
var
|
|
16970
|
+
var D, S;
|
|
16969
16971
|
return /* @__PURE__ */ u(
|
|
16970
16972
|
xl,
|
|
16971
16973
|
{
|
|
@@ -16974,7 +16976,7 @@ const Sl = Ki(null), hv = () => {
|
|
|
16974
16976
|
onClick: () => f($),
|
|
16975
16977
|
icon: v.icon,
|
|
16976
16978
|
controls: v.controls,
|
|
16977
|
-
tag: (
|
|
16979
|
+
tag: (D = v.tag) == null ? void 0 : D.text,
|
|
16978
16980
|
tagSkin: (S = v.tag) == null ? void 0 : S.skin,
|
|
16979
16981
|
index: $,
|
|
16980
16982
|
children: v.text
|