@oslokommune/punkt-react 19.10.2 → 19.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/punkt-react.cjs +1 -1
- package/dist/punkt-react.js +261 -257
- package/dist/shared-types/accordion.d.ts +3 -1
- package/dist/shared-types/index.d.ts +1 -1
- package/dist/shared-utils/scroll-lock/index.d.ts +3 -1
- package/package.json +3 -3
- package/src/components/accordion/Accordion.test.tsx +37 -3
- package/src/components/accordion/AccordionItem.tsx +2 -1
- package/src/components/combobox/Combobox.selection.test.tsx +12 -0
- package/src/components/combobox/ComboboxTags.tsx +3 -3
- package/src/components/consent/Consent.tsx +3 -1
package/dist/punkt-react.js
CHANGED
|
@@ -12,7 +12,7 @@ var b = Object.create, x = Object.defineProperty, S = Object.getOwnPropertyDescr
|
|
|
12
12
|
}, O = (e, t, n) => (n = e == null ? {} : b(w(e)), D(t || !e || !e.__esModule || !T.call(e, "default") ? x(n, "default", {
|
|
13
13
|
value: e,
|
|
14
14
|
enumerable: !0
|
|
15
|
-
}) : n, e)), k = n({}), A = () => s(k),
|
|
15
|
+
}) : n, e)), k = n({}), A = () => s(k), j = i(({ compact: e = !1, skin: t = "borderless", ariaLabelledBy: n, children: r, name: i, className: a }, o) => {
|
|
16
16
|
let s = [
|
|
17
17
|
"pkt-accordion",
|
|
18
18
|
e && "pkt-accordion--compact",
|
|
@@ -33,36 +33,10 @@ var b = Object.create, x = Object.defineProperty, S = Object.getOwnPropertyDescr
|
|
|
33
33
|
})
|
|
34
34
|
});
|
|
35
35
|
});
|
|
36
|
-
|
|
36
|
+
j.displayName = "PktAccordion";
|
|
37
37
|
//#endregion
|
|
38
|
-
//#region ../../
|
|
39
|
-
var
|
|
40
|
-
(function() {
|
|
41
|
-
var e = {}.hasOwnProperty;
|
|
42
|
-
function n() {
|
|
43
|
-
for (var e = "", t = 0; t < arguments.length; t++) {
|
|
44
|
-
var n = arguments[t];
|
|
45
|
-
n && (e = i(e, r(n)));
|
|
46
|
-
}
|
|
47
|
-
return e;
|
|
48
|
-
}
|
|
49
|
-
function r(t) {
|
|
50
|
-
if (typeof t == "string" || typeof t == "number") return t;
|
|
51
|
-
if (typeof t != "object") return "";
|
|
52
|
-
if (Array.isArray(t)) return n.apply(null, t);
|
|
53
|
-
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]")) return t.toString();
|
|
54
|
-
var r = "";
|
|
55
|
-
for (var a in t) e.call(t, a) && t[a] && (r = i(r, a));
|
|
56
|
-
return r;
|
|
57
|
-
}
|
|
58
|
-
function i(e, t) {
|
|
59
|
-
return t ? e ? e + " " + t : e + t : e;
|
|
60
|
-
}
|
|
61
|
-
t !== void 0 && t.exports ? (n.default = n, t.exports = n) : typeof define == "function" && typeof define.amd == "object" && define.amd ? define("classnames", [], function() {
|
|
62
|
-
return n;
|
|
63
|
-
}) : window.classNames = n;
|
|
64
|
-
})();
|
|
65
|
-
})), M = "https://cdn.web.oslo.kommune.no/header-footer/header-footer.json", N = "https://www.oslo.kommune.no", P = {
|
|
38
|
+
//#region ../../shared-types/header-footer.ts
|
|
39
|
+
var M = "https://cdn.web.oslo.kommune.no/header-footer/header-footer.json", N = "https://www.oslo.kommune.no", P = {
|
|
66
40
|
headingLevel: 3,
|
|
67
41
|
layout: "vertical",
|
|
68
42
|
skin: "outlined",
|
|
@@ -73,7 +47,7 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
73
47
|
zoom: !1,
|
|
74
48
|
imageShape: "square",
|
|
75
49
|
restrictImageHeight: !1
|
|
76
|
-
},
|
|
50
|
+
}, ee = {
|
|
77
51
|
defaultChecked: !1,
|
|
78
52
|
indeterminate: !1,
|
|
79
53
|
hasTile: !1,
|
|
@@ -84,14 +58,14 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
84
58
|
labelPosition: "right",
|
|
85
59
|
requiredTag: !1,
|
|
86
60
|
optionalTag: !1
|
|
87
|
-
},
|
|
61
|
+
}, te = {
|
|
88
62
|
defaultChecked: !1,
|
|
89
63
|
hasTile: !1,
|
|
90
64
|
disabled: !1,
|
|
91
65
|
hasError: !1,
|
|
92
66
|
requiredTag: !1,
|
|
93
67
|
optionalTag: !1
|
|
94
|
-
},
|
|
68
|
+
}, F = {
|
|
95
69
|
layout: "vertical",
|
|
96
70
|
inputSize: "medium",
|
|
97
71
|
hasTile: !1,
|
|
@@ -101,14 +75,14 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
101
75
|
useWrapper: !0,
|
|
102
76
|
requiredTag: !1,
|
|
103
77
|
optionalTag: !1
|
|
104
|
-
},
|
|
78
|
+
}, I = {
|
|
105
79
|
devMode: !1,
|
|
106
80
|
i18nLanguage: "nb",
|
|
107
81
|
triggerType: "button"
|
|
108
|
-
},
|
|
82
|
+
}, ne = {
|
|
109
83
|
name: "",
|
|
110
84
|
path: "https://punkt-cdn.oslo.kommune.no/latest/icons/"
|
|
111
|
-
}, ie = {
|
|
85
|
+
}, re = ["beige", "blue"], ie = {
|
|
112
86
|
skin: "beige",
|
|
113
87
|
compact: !1,
|
|
114
88
|
closable: !1
|
|
@@ -135,8 +109,34 @@ var j = /* @__PURE__ */ E(((e, t) => {
|
|
|
135
109
|
fullwidth: !1,
|
|
136
110
|
inline: !1,
|
|
137
111
|
useWrapper: !0
|
|
138
|
-
}, L = /* @__PURE__ */ O(
|
|
139
|
-
|
|
112
|
+
}, L = /* @__PURE__ */ O((/* @__PURE__ */ E(((e, t) => {
|
|
113
|
+
(function() {
|
|
114
|
+
var e = {}.hasOwnProperty;
|
|
115
|
+
function n() {
|
|
116
|
+
for (var e = "", t = 0; t < arguments.length; t++) {
|
|
117
|
+
var n = arguments[t];
|
|
118
|
+
n && (e = i(e, r(n)));
|
|
119
|
+
}
|
|
120
|
+
return e;
|
|
121
|
+
}
|
|
122
|
+
function r(t) {
|
|
123
|
+
if (typeof t == "string" || typeof t == "number") return t;
|
|
124
|
+
if (typeof t != "object") return "";
|
|
125
|
+
if (Array.isArray(t)) return n.apply(null, t);
|
|
126
|
+
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]")) return t.toString();
|
|
127
|
+
var r = "";
|
|
128
|
+
for (var a in t) e.call(t, a) && t[a] && (r = i(r, a));
|
|
129
|
+
return r;
|
|
130
|
+
}
|
|
131
|
+
function i(e, t) {
|
|
132
|
+
return t ? e ? e + " " + t : e + t : e;
|
|
133
|
+
}
|
|
134
|
+
t !== void 0 && t.exports ? (n.default = n, t.exports = n) : typeof define == "function" && typeof define.amd == "object" && define.amd ? define("classnames", [], function() {
|
|
135
|
+
return n;
|
|
136
|
+
}) : window.classNames = n;
|
|
137
|
+
})();
|
|
138
|
+
})))(), 1);
|
|
139
|
+
typeof window < "u" && (window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch, window.pktIconPath = window.pktIconPath || ne.path);
|
|
140
140
|
var R = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"></svg>", z = {}, se = 2, B = 1500, V = typeof Storage < "u" && typeof sessionStorage < "u", ce = typeof window < "u" ? d : c, le = (e, t) => !e || !V ? "" : sessionStorage.getItem(t + e + ".svg") ?? "", ue = (e) => window.pktFetch(e).then((t) => {
|
|
141
141
|
if (!t.ok) throw Error("Missing icon: " + e);
|
|
142
142
|
return t.text();
|
|
@@ -151,8 +151,8 @@ var R = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"></svg>"
|
|
|
151
151
|
return V && sessionStorage.getItem(n) ? sessionStorage.getItem(n) : n in z ? z[n] : typeof window < "u" && typeof window.pktFetch == "function" ? (z[n] = H(n).then((e) => (e !== R && V && sessionStorage.setItem(n, e), delete z[n], e)), z[n]) : R;
|
|
152
152
|
}, W = (e) => {
|
|
153
153
|
if (e !== void 0) return e === !0 || e === "true";
|
|
154
|
-
}, G = i(function({ name: e =
|
|
155
|
-
let l = t ?? (typeof window < "u" ? window.pktIconPath :
|
|
154
|
+
}, G = i(function({ name: e = ne.name, path: t, className: n, ariaHidden: r, ariaLabel: i, "aria-hidden": a, "aria-label": o, ...s }, c) {
|
|
155
|
+
let l = t ?? (typeof window < "u" ? window.pktIconPath : ne.path), u = p(null), d = W(r) ?? W(a), f = i ?? o, m = d === void 0 ? !f : d, h = m ? void 0 : f || e;
|
|
156
156
|
ce(() => {
|
|
157
157
|
let t = u.current;
|
|
158
158
|
if (!t) return;
|
|
@@ -219,6 +219,7 @@ var K = i(({ defaultOpen: e = !1, id: t, title: n, skin: r, compact: i = !1, isO
|
|
|
219
219
|
onClick: w,
|
|
220
220
|
name: b,
|
|
221
221
|
onToggle: C,
|
|
222
|
+
"data-mode": x && re.includes(x) ? "light" : void 0,
|
|
222
223
|
children: [/* @__PURE__ */ v("summary", {
|
|
223
224
|
className: "pkt-accordion-item__title",
|
|
224
225
|
id: `pkt-accordion-item-summary-${t}`,
|
|
@@ -2410,8 +2411,8 @@ function Un(e) {
|
|
|
2410
2411
|
months: T.dates.months,
|
|
2411
2412
|
prevMonth: T.calendar.prevMonth,
|
|
2412
2413
|
nextMonth: T.calendar.nextMonth
|
|
2413
|
-
}), [T]), D = f(() => _ ? cn(_) : sn(), [_]), O = f(() => c ? c.map((e) => typeof e == "string" ? cn(e) : e) : [], [c]), k = t !== void 0, [A,
|
|
2414
|
-
let e =
|
|
2414
|
+
}), [T]), D = f(() => _ ? cn(_) : sn(), [_]), O = f(() => c ? c.map((e) => typeof e == "string" ? cn(e) : e) : [], [c]), k = t !== void 0, [A, j] = m([]), M = k ? t : A, N = f(() => kn(M), [M]), P = () => {
|
|
2415
|
+
let e = M.length > 0 && M[0] !== "" ? cn(M[M.length - 1]) : null;
|
|
2415
2416
|
if (e && !isNaN(e.getTime())) return e;
|
|
2416
2417
|
let t = null;
|
|
2417
2418
|
if (g instanceof Date ? t = mn(g) : typeof g == "string" && (t = cn(g)), (!t || isNaN(t.getTime())) && (t = mn(D)), s) {
|
|
@@ -2423,19 +2424,19 @@ function Un(e) {
|
|
|
2423
2424
|
!isNaN(e.getTime()) && t < e && (t = e);
|
|
2424
2425
|
}
|
|
2425
2426
|
return t;
|
|
2426
|
-
}, [
|
|
2427
|
-
if (
|
|
2428
|
-
let e = cn(
|
|
2427
|
+
}, [ee, te] = m(() => P().getFullYear()), [F, I] = m(() => P().getMonth()), [ne, re] = m(() => i && N.length === 2 ? An(N[0], N[1]) : {}), [ie, oe] = m(null), [L, R] = m(null), z = p(null), se = p([]), B = p(0), [V, ce] = m(!1), [le, ue] = m(M);
|
|
2428
|
+
if (M !== le && (ue(M), !V && M.length > 0 && M[0] !== "")) {
|
|
2429
|
+
let e = cn(M[M.length - 1]);
|
|
2429
2430
|
isNaN(e.getTime()) || (te(e.getFullYear()), I(e.getMonth()));
|
|
2430
2431
|
}
|
|
2431
2432
|
let [H, U] = m({
|
|
2432
2433
|
range: i,
|
|
2433
|
-
_selected:
|
|
2434
|
+
_selected: N
|
|
2434
2435
|
});
|
|
2435
|
-
(i !== H.range ||
|
|
2436
|
+
(i !== H.range || N !== H._selected) && (U({
|
|
2436
2437
|
range: i,
|
|
2437
|
-
_selected:
|
|
2438
|
-
}), i &&
|
|
2438
|
+
_selected: N
|
|
2439
|
+
}), i && N.length === 2 ? re(An(N[0], N[1])) : (!i || N.length < 2) && re({}));
|
|
2439
2440
|
let W = f(() => ({
|
|
2440
2441
|
earliest: a,
|
|
2441
2442
|
latest: s,
|
|
@@ -2447,43 +2448,43 @@ function Un(e) {
|
|
|
2447
2448
|
O,
|
|
2448
2449
|
u
|
|
2449
2450
|
]), G = o((e) => {
|
|
2450
|
-
k ||
|
|
2451
|
+
k || j(e), y?.(e);
|
|
2451
2452
|
}, [k, y]), K = o(() => {
|
|
2452
2453
|
b?.();
|
|
2453
2454
|
}, [b]), q = o((e, t) => {
|
|
2454
2455
|
te(typeof e == "string" ? parseInt(e) : e), I(typeof t == "string" ? parseInt(t) : t), B.current = 0, R(null), se.current = [], ce(!0);
|
|
2455
2456
|
}, []), de = o(() => {
|
|
2456
|
-
let e = F === 0 ? 11 : F - 1, t = F === 0 ?
|
|
2457
|
+
let e = F === 0 ? 11 : F - 1, t = F === 0 ? ee - 1 : ee;
|
|
2457
2458
|
q(t, e);
|
|
2458
2459
|
}, [
|
|
2459
|
-
|
|
2460
|
+
ee,
|
|
2460
2461
|
F,
|
|
2461
2462
|
q
|
|
2462
2463
|
]), fe = o(() => {
|
|
2463
|
-
let e = F === 11 ? 0 : F + 1, t = F === 11 ?
|
|
2464
|
+
let e = F === 11 ? 0 : F + 1, t = F === 11 ? ee + 1 : ee;
|
|
2464
2465
|
q(t, e);
|
|
2465
2466
|
}, [
|
|
2466
|
-
|
|
2467
|
+
ee,
|
|
2467
2468
|
F,
|
|
2468
2469
|
q
|
|
2469
2470
|
]), pe = o((e) => Tn(e, W), [W]), me = o((e, t) => En(e, t, W, {
|
|
2470
2471
|
multiple: n,
|
|
2471
2472
|
maxMultiple: r,
|
|
2472
|
-
selectedCount:
|
|
2473
|
+
selectedCount: M.length
|
|
2473
2474
|
}), [
|
|
2474
2475
|
W,
|
|
2475
2476
|
n,
|
|
2476
2477
|
r,
|
|
2477
|
-
|
|
2478
|
-
]), J = o(() => typeof
|
|
2479
|
-
if (!i ||
|
|
2478
|
+
M.length
|
|
2479
|
+
]), J = o(() => typeof M == "string" ? M.split(",") : M, [M]), he = o((e) => {
|
|
2480
|
+
if (!i || N.length !== 1 || !jn(e, N, O, u) || N[0] >= e) {
|
|
2480
2481
|
oe(null);
|
|
2481
2482
|
return;
|
|
2482
2483
|
}
|
|
2483
|
-
oe(e), re(An(
|
|
2484
|
+
oe(e), re(An(N[0], e));
|
|
2484
2485
|
}, [
|
|
2485
2486
|
i,
|
|
2486
|
-
|
|
2487
|
+
N,
|
|
2487
2488
|
O,
|
|
2488
2489
|
u
|
|
2489
2490
|
]), ge = o((e) => {
|
|
@@ -2492,18 +2493,18 @@ function Un(e) {
|
|
|
2492
2493
|
if (i) t = Fn(e, J(), {
|
|
2493
2494
|
excludedates: O,
|
|
2494
2495
|
excludeweekdays: u
|
|
2495
|
-
}), k ||
|
|
2496
|
+
}), k || j(t), t.length === 2 ? (y?.(t), K()) : (t.length === 1 && re({}), y?.(t));
|
|
2496
2497
|
else if (n) t = Pn(e, J(), r), G(t);
|
|
2497
2498
|
else {
|
|
2498
2499
|
let n = ln(e);
|
|
2499
|
-
t =
|
|
2500
|
+
t = M.includes(n) ? [] : [n], G(t), K();
|
|
2500
2501
|
}
|
|
2501
2502
|
}, [
|
|
2502
2503
|
i,
|
|
2503
2504
|
n,
|
|
2504
2505
|
r,
|
|
2505
2506
|
J,
|
|
2506
|
-
|
|
2507
|
+
M,
|
|
2507
2508
|
O,
|
|
2508
2509
|
u,
|
|
2509
2510
|
k,
|
|
@@ -2512,7 +2513,7 @@ function Un(e) {
|
|
|
2512
2513
|
y
|
|
2513
2514
|
]), _e = o((e) => {
|
|
2514
2515
|
let t = Mn(e, J());
|
|
2515
|
-
k ||
|
|
2516
|
+
k || j(t), i && t.length === 2 && (y?.(t), K());
|
|
2516
2517
|
}, [
|
|
2517
2518
|
J,
|
|
2518
2519
|
k,
|
|
@@ -2521,10 +2522,10 @@ function Un(e) {
|
|
|
2521
2522
|
K
|
|
2522
2523
|
]), ve = o((e) => {
|
|
2523
2524
|
let t = Nn(e, J());
|
|
2524
|
-
k ||
|
|
2525
|
+
k || j(t);
|
|
2525
2526
|
}, [J, k]), Y = o((e) => {
|
|
2526
2527
|
let t = Pn(e, J(), r);
|
|
2527
|
-
k ||
|
|
2528
|
+
k || j(t);
|
|
2528
2529
|
}, [
|
|
2529
2530
|
J,
|
|
2530
2531
|
r,
|
|
@@ -2557,10 +2558,10 @@ function Un(e) {
|
|
|
2557
2558
|
componentId: w,
|
|
2558
2559
|
strings: E,
|
|
2559
2560
|
todayDate: D,
|
|
2560
|
-
year:
|
|
2561
|
+
year: ee,
|
|
2561
2562
|
month: F,
|
|
2562
|
-
activeSelected:
|
|
2563
|
-
_selected:
|
|
2563
|
+
activeSelected: M,
|
|
2564
|
+
_selected: N,
|
|
2564
2565
|
inRange: ne,
|
|
2565
2566
|
rangeHovered: ie,
|
|
2566
2567
|
focusedDate: L,
|
|
@@ -2991,7 +2992,7 @@ var er = i(({ children: e, className: t, ariaLabel: n, metaLead: r, borderOnHove
|
|
|
2991
2992
|
src: l.src,
|
|
2992
2993
|
alt: l.alt || ""
|
|
2993
2994
|
})
|
|
2994
|
-
}) : null,
|
|
2995
|
+
}) : null, j = () => S.length === 0 ? null : /* @__PURE__ */ _("div", {
|
|
2995
2996
|
className: (0, L.default)("pkt-card__tags", `pkt-card__tags-${b}`),
|
|
2996
2997
|
role: "list",
|
|
2997
2998
|
"aria-label": pe(S.length, E.card.tagsLabelOne, E.card.tagsLabelOther),
|
|
@@ -3003,13 +3004,13 @@ var er = i(({ children: e, className: t, ariaLabel: n, metaLead: r, borderOnHove
|
|
|
3003
3004
|
iconName: e.iconName,
|
|
3004
3005
|
children: /* @__PURE__ */ _("span", { children: e.text })
|
|
3005
3006
|
}, t))
|
|
3006
|
-
}),
|
|
3007
|
+
}), M = () => !s || p ? null : /* @__PURE__ */ _(Qn, {
|
|
3007
3008
|
className: "pkt-card__heading",
|
|
3008
3009
|
level: c,
|
|
3009
3010
|
size: "medium",
|
|
3010
3011
|
weight: "regular",
|
|
3011
3012
|
children: s
|
|
3012
|
-
}),
|
|
3013
|
+
}), N = () => p ? /* @__PURE__ */ _(Qn, {
|
|
3013
3014
|
className: "pkt-card__link-heading pkt-card__heading",
|
|
3014
3015
|
level: c,
|
|
3015
3016
|
size: "medium",
|
|
@@ -3021,15 +3022,15 @@ var er = i(({ children: e, className: t, ariaLabel: n, metaLead: r, borderOnHove
|
|
|
3021
3022
|
rel: h ? "noopener noreferrer" : void 0,
|
|
3022
3023
|
children: s
|
|
3023
3024
|
})
|
|
3024
|
-
}) : null,
|
|
3025
|
+
}) : null, ee = () => y ? /* @__PURE__ */ _("p", {
|
|
3025
3026
|
className: "pkt-card__subheading",
|
|
3026
3027
|
children: y
|
|
3027
3028
|
}) : null, te = () => !s && !y ? null : /* @__PURE__ */ v("header", {
|
|
3028
3029
|
className: "pkt-card__header",
|
|
3029
3030
|
children: [
|
|
3030
|
-
j(),
|
|
3031
3031
|
M(),
|
|
3032
|
-
N()
|
|
3032
|
+
N(),
|
|
3033
|
+
ee()
|
|
3033
3034
|
]
|
|
3034
3035
|
}), F = () => !r && !a ? null : /* @__PURE__ */ v("footer", {
|
|
3035
3036
|
className: "pkt-card__metadata",
|
|
@@ -3049,13 +3050,13 @@ var er = i(({ children: e, className: t, ariaLabel: n, metaLead: r, borderOnHove
|
|
|
3049
3050
|
children: [A(), /* @__PURE__ */ v("div", {
|
|
3050
3051
|
className: "pkt-card__wrapper",
|
|
3051
3052
|
children: [
|
|
3052
|
-
b === "top" &&
|
|
3053
|
+
b === "top" && j(),
|
|
3053
3054
|
te(),
|
|
3054
3055
|
/* @__PURE__ */ _("section", {
|
|
3055
3056
|
className: "pkt-card__content",
|
|
3056
3057
|
children: e
|
|
3057
3058
|
}),
|
|
3058
|
-
b === "bottom" &&
|
|
3059
|
+
b === "bottom" && j(),
|
|
3059
3060
|
F()
|
|
3060
3061
|
]
|
|
3061
3062
|
})]
|
|
@@ -3076,22 +3077,22 @@ function rr(e) {
|
|
|
3076
3077
|
}
|
|
3077
3078
|
//#endregion
|
|
3078
3079
|
//#region src/components/checkboxgroup/CheckboxGroupContext.ts
|
|
3079
|
-
var ir = n(null), ar = () => s(ir), or = i(({ id: e, hasTile: t =
|
|
3080
|
-
let
|
|
3080
|
+
var ir = n(null), ar = () => s(ir), or = i(({ id: e, hasTile: t = ee.hasTile, disabled: n = ee.disabled, label: r, checkHelptext: i, hasError: a = ee.hasError, className: o, isSwitch: s = ee.isSwitch, hideLabel: l = ee.hideLabel, labelPosition: u = ee.labelPosition, inputSize: d, defaultChecked: f, checked: m, indeterminate: h, optionalTag: y, optionalText: b, requiredTag: x, requiredText: S, strings: C, tagText: w, name: T, value: E, onChange: D, "aria-describedby": O, ...k }, A) => {
|
|
3081
|
+
let j = De(["forms"], C), M = rr(e), N = p(null), P = ar(), te = E ?? "on", F = P?.value, I = F !== void 0, ne = I ? F.includes(te) : m, re = f ?? (P?.defaultValue === void 0 ? void 0 : P.defaultValue.includes(te)), ie = t || !!P?.hasTile, ae = a || !!P?.hasError, oe = n || !!P?.disabled;
|
|
3081
3082
|
c(() => {
|
|
3082
|
-
I && m !== void 0 && console.warn(`PktCheckbox (${
|
|
3083
|
+
I && m !== void 0 && console.warn(`PktCheckbox (${M}): checked ignoreres når PktCheckboxGroup har value. Styr valget med value på gruppen.`);
|
|
3083
3084
|
}, [
|
|
3084
3085
|
I,
|
|
3085
3086
|
m,
|
|
3086
|
-
|
|
3087
|
+
M
|
|
3087
3088
|
]);
|
|
3088
3089
|
let L = (e) => {
|
|
3089
|
-
D?.(e),
|
|
3090
|
+
D?.(e), P?.onOptionChange(e);
|
|
3090
3091
|
};
|
|
3091
3092
|
c(() => {
|
|
3092
|
-
|
|
3093
|
+
N.current && h !== void 0 && (N.current.indeterminate = h);
|
|
3093
3094
|
}, [h]), c(() => {
|
|
3094
|
-
typeof A == "function" ? A(
|
|
3095
|
+
typeof A == "function" ? A(N.current) : A && (A.current = N.current);
|
|
3095
3096
|
}, [A]);
|
|
3096
3097
|
let R = [
|
|
3097
3098
|
o,
|
|
@@ -3118,15 +3119,15 @@ var ir = n(null), ar = () => s(ir), or = i(({ id: e, hasTile: t = te.hasTile, di
|
|
|
3118
3119
|
}),
|
|
3119
3120
|
y && /* @__PURE__ */ _("span", {
|
|
3120
3121
|
className: B + " pkt-tag--blue-light",
|
|
3121
|
-
children: b ??
|
|
3122
|
+
children: b ?? j.forms.optional
|
|
3122
3123
|
}),
|
|
3123
3124
|
x && /* @__PURE__ */ _("span", {
|
|
3124
3125
|
className: B + " pkt-tag--beige",
|
|
3125
|
-
children: S ??
|
|
3126
|
+
children: S ?? j.forms.required
|
|
3126
3127
|
})
|
|
3127
|
-
] }), ce = `${
|
|
3128
|
+
] }), ce = `${M}-check-label`, le = `${M}-check-helptext`, ue = [i ? le : void 0, O].filter(Boolean).join(" ") || void 0, H = () => /* @__PURE__ */ v("label", {
|
|
3128
3129
|
className: z,
|
|
3129
|
-
htmlFor:
|
|
3130
|
+
htmlFor: M,
|
|
3130
3131
|
children: [/* @__PURE__ */ v("span", {
|
|
3131
3132
|
id: ce,
|
|
3132
3133
|
children: [
|
|
@@ -3148,17 +3149,17 @@ var ir = n(null), ar = () => s(ir), or = i(({ id: e, hasTile: t = te.hasTile, di
|
|
|
3148
3149
|
u === "left" && H(),
|
|
3149
3150
|
/* @__PURE__ */ _("input", {
|
|
3150
3151
|
role: s ? "switch" : "checkbox",
|
|
3151
|
-
ref:
|
|
3152
|
+
ref: N,
|
|
3152
3153
|
className: `pkt-input-check__input-checkbox ${ae ? "pkt-input-check__input-checkbox--error" : ""}`,
|
|
3153
3154
|
type: "checkbox",
|
|
3154
|
-
id:
|
|
3155
|
-
name: T ??
|
|
3155
|
+
id: M,
|
|
3156
|
+
name: T ?? P?.name,
|
|
3156
3157
|
value: E,
|
|
3157
3158
|
disabled: oe,
|
|
3158
3159
|
"aria-labelledby": r ? ce : void 0,
|
|
3159
3160
|
"aria-describedby": ue,
|
|
3160
3161
|
...ne === void 0 ? { defaultChecked: re } : { checked: ne },
|
|
3161
|
-
onChange:
|
|
3162
|
+
onChange: P ? L : D,
|
|
3162
3163
|
...k
|
|
3163
3164
|
}),
|
|
3164
3165
|
u === "right" && H()
|
|
@@ -3308,8 +3309,8 @@ var ur = (e) => {
|
|
|
3308
3309
|
hr.displayName = "PktHelptext";
|
|
3309
3310
|
//#endregion
|
|
3310
3311
|
//#region src/components/inputwrapper/InputWrapper.tsx
|
|
3311
|
-
var gr = i(({ id: e, forId: t, label: n, helptext: r, helptextDropdown: i, helptextDropdownButton: a, counter: o, counterCurrent: s = 0, counterMaxLength: c, optionalTag: l = !1, optionalText: u, requiredTag: d = !1, requiredText: p, tagText: m = null, hasError: h = !1, errorMessage: y, disabled: b = !1, inline: x = !1, ariaDescribedby: S, useWrapper: C = !0, children: w, className: T = "", hasFieldset: E = !1, layout: D = "vertical", role: O, counterPosition: k = "bottom", size: A = "medium", strings:
|
|
3312
|
-
let
|
|
3312
|
+
var gr = i(({ id: e, forId: t, label: n, helptext: r, helptextDropdown: i, helptextDropdownButton: a, counter: o, counterCurrent: s = 0, counterMaxLength: c, optionalTag: l = !1, optionalText: u, requiredTag: d = !1, requiredText: p, tagText: m = null, hasError: h = !1, errorMessage: y, disabled: b = !1, inline: x = !1, ariaDescribedby: S, useWrapper: C = !0, children: w, className: T = "", hasFieldset: E = !1, layout: D = "vertical", role: O, counterPosition: k = "bottom", size: A = "medium", strings: j, onFocus: M, onBlur: N }, P) => {
|
|
3313
|
+
let ee = lr(P), te = De(["forms", "validation"], j), F = f(() => nr(), []), I = t || F, ne = [...new Set([S || (r ? `${I}-helptext` : ""), h && y ? `${I}-error` : ""].join(" ").split(" ").filter(Boolean))].join(" ") || void 0, re = !!o, ie = re && k === "top", ae = re && k === "bottom", oe = [
|
|
3313
3314
|
"pkt-inputwrapper",
|
|
3314
3315
|
T,
|
|
3315
3316
|
h ? "pkt-inputwrapper--error" : "",
|
|
@@ -3404,12 +3405,12 @@ var gr = i(({ id: e, forId: t, label: n, helptext: r, helptextDropdown: i, helpt
|
|
|
3404
3405
|
className: oe,
|
|
3405
3406
|
role: O,
|
|
3406
3407
|
"aria-labelledby": O ? `${I}-label` : void 0,
|
|
3407
|
-
...
|
|
3408
|
+
...ee,
|
|
3408
3409
|
onFocus: (e) => {
|
|
3409
|
-
|
|
3410
|
+
ee.onFocus(), M?.(e);
|
|
3410
3411
|
},
|
|
3411
3412
|
onBlur: (e) => {
|
|
3412
|
-
|
|
3413
|
+
ee.onBlur(e), N?.(e);
|
|
3413
3414
|
},
|
|
3414
3415
|
children: E ? /* @__PURE__ */ _("fieldset", {
|
|
3415
3416
|
className: "pkt-inputwrapper__fieldset",
|
|
@@ -3425,26 +3426,26 @@ var gr = i(({ id: e, forId: t, label: n, helptext: r, helptextDropdown: i, helpt
|
|
|
3425
3426
|
gr.displayName = "PktInputWrapper";
|
|
3426
3427
|
//#endregion
|
|
3427
3428
|
//#region src/components/checkboxgroup/CheckboxGroup.tsx
|
|
3428
|
-
var _r = i(({ id: e, name: t, label: n, helptext: r, helptextDropdown: i, helptextDropdownButton: a, value: o, defaultValue: s, layout: l =
|
|
3429
|
-
let
|
|
3429
|
+
var _r = i(({ id: e, name: t, label: n, helptext: r, helptextDropdown: i, helptextDropdownButton: a, value: o, defaultValue: s, layout: l = F.layout, inputSize: u = F.inputSize, hasTile: d = F.hasTile, required: m = F.required, disabled: h = F.disabled, hasError: g = F.hasError, errorMessage: v, useWrapper: y = F.useWrapper, optionalTag: b = F.optionalTag, optionalText: x, requiredTag: S = F.requiredTag, requiredText: C, tagText: w, strings: T, className: E, children: D, onChange: O, onValueChange: k, onFocus: A, onBlur: j }, M) => {
|
|
3430
|
+
let N = rr(e), P = t || N, ee = De(["validation"], T).validation.checkboxGroupValueMissing, te = p(!1), I = cr({
|
|
3430
3431
|
type: "checkbox",
|
|
3431
|
-
name:
|
|
3432
|
-
forwardedRef:
|
|
3432
|
+
name: P,
|
|
3433
|
+
forwardedRef: M,
|
|
3433
3434
|
onChange: O,
|
|
3434
3435
|
onValueChange: k,
|
|
3435
3436
|
onFocus: A,
|
|
3436
|
-
onBlur:
|
|
3437
|
+
onBlur: j,
|
|
3437
3438
|
onValueSet: () => ne()
|
|
3438
3439
|
}), ne = () => {
|
|
3439
3440
|
if (!m && !te.current) return;
|
|
3440
3441
|
te.current = m;
|
|
3441
|
-
let e =
|
|
3442
|
-
e.forEach((e) => e.setCustomValidity(t ?
|
|
3442
|
+
let e = I.options(), t = m && !e.some((e) => e.checked && sr(e));
|
|
3443
|
+
e.forEach((e) => e.setCustomValidity(t ? ee : ""));
|
|
3443
3444
|
};
|
|
3444
3445
|
c(() => {
|
|
3445
3446
|
ne();
|
|
3446
3447
|
}), c(() => {
|
|
3447
|
-
let e =
|
|
3448
|
+
let e = I.options()[0]?.form;
|
|
3448
3449
|
if (!e) return;
|
|
3449
3450
|
let t, n = () => {
|
|
3450
3451
|
t = setTimeout(ne);
|
|
@@ -3454,30 +3455,30 @@ var _r = i(({ id: e, name: t, label: n, helptext: r, helptextDropdown: i, helpte
|
|
|
3454
3455
|
};
|
|
3455
3456
|
});
|
|
3456
3457
|
let re = f(() => ({
|
|
3457
|
-
name:
|
|
3458
|
+
name: P,
|
|
3458
3459
|
hasTile: d,
|
|
3459
3460
|
hasError: g,
|
|
3460
3461
|
disabled: h,
|
|
3461
3462
|
value: o,
|
|
3462
3463
|
defaultValue: s,
|
|
3463
|
-
onOptionChange:
|
|
3464
|
+
onOptionChange: I.onOptionChange
|
|
3464
3465
|
}), [
|
|
3465
|
-
|
|
3466
|
+
P,
|
|
3466
3467
|
d,
|
|
3467
3468
|
g,
|
|
3468
3469
|
h,
|
|
3469
3470
|
o,
|
|
3470
3471
|
s,
|
|
3471
|
-
|
|
3472
|
+
I
|
|
3472
3473
|
]);
|
|
3473
3474
|
return /* @__PURE__ */ _(ir.Provider, {
|
|
3474
3475
|
value: re,
|
|
3475
3476
|
children: /* @__PURE__ */ _(gr, {
|
|
3476
|
-
ref:
|
|
3477
|
-
onFocus:
|
|
3478
|
-
onBlur:
|
|
3477
|
+
ref: I.mergedRef,
|
|
3478
|
+
onFocus: I.onRootFocus,
|
|
3479
|
+
onBlur: I.onRootBlur,
|
|
3479
3480
|
id: e,
|
|
3480
|
-
forId:
|
|
3481
|
+
forId: N,
|
|
3481
3482
|
className: E,
|
|
3482
3483
|
label: n,
|
|
3483
3484
|
helptext: r,
|
|
@@ -3632,7 +3633,7 @@ var vr = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
|
|
|
3632
3633
|
return i ? /* @__PURE__ */ _("li", {
|
|
3633
3634
|
role: "listitem",
|
|
3634
3635
|
children: /* @__PURE__ */ _($n, {
|
|
3635
|
-
skin: d || "blue
|
|
3636
|
+
skin: d || "blue",
|
|
3636
3637
|
children: /* @__PURE__ */ _("span", {
|
|
3637
3638
|
className: "pkt-combobox__value",
|
|
3638
3639
|
children: f
|
|
@@ -3641,7 +3642,7 @@ var vr = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
|
|
|
3641
3642
|
}, e) : t ? /* @__PURE__ */ _("li", {
|
|
3642
3643
|
role: "listitem",
|
|
3643
3644
|
children: /* @__PURE__ */ _($n, {
|
|
3644
|
-
skin: d || "blue
|
|
3645
|
+
skin: d || "blue",
|
|
3645
3646
|
closeTag: !0,
|
|
3646
3647
|
onClose: () => o(e),
|
|
3647
3648
|
children: /* @__PURE__ */ _("span", {
|
|
@@ -3657,7 +3658,7 @@ var vr = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
|
|
|
3657
3658
|
ref: (e) => {
|
|
3658
3659
|
u.current[n] = e;
|
|
3659
3660
|
},
|
|
3660
|
-
skin: d || "blue
|
|
3661
|
+
skin: d || "blue",
|
|
3661
3662
|
closeTag: !0,
|
|
3662
3663
|
tabIndex: l === n ? 0 : -1,
|
|
3663
3664
|
onClose: () => o(e),
|
|
@@ -3692,18 +3693,18 @@ var vr = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
|
|
|
3692
3693
|
children: o
|
|
3693
3694
|
});
|
|
3694
3695
|
}, zr = ({ state: e }) => {
|
|
3695
|
-
let { id: t, inputId: n, listboxId: r, values: i, options: a, isOpen: o, multiple: s, typeahead: c, allowUserInput: l, tagPlacement: u, placeholder: d, disabled: f, fullwidth: p, hasError: m, label: h, inputFocus: g, skipInputTab: y, restoreInputTab: b, inputRef: x, triggerRef: S, handleInputChange: C, handleInputKeydown: w, handleInputFocus: T, handleInputBlur: E, handleInputClick: D, handlePlaceholderClick: O, handleSelectOnlyKeydown: k, name: A, inputSize:
|
|
3696
|
+
let { id: t, inputId: n, listboxId: r, values: i, options: a, isOpen: o, multiple: s, typeahead: c, allowUserInput: l, tagPlacement: u, placeholder: d, disabled: f, fullwidth: p, hasError: m, label: h, inputFocus: g, skipInputTab: y, restoreInputTab: b, inputRef: x, triggerRef: S, handleInputChange: C, handleInputKeydown: w, handleInputFocus: T, handleInputBlur: E, handleInputClick: D, handlePlaceholderClick: O, handleSelectOnlyKeydown: k, name: A, inputSize: j } = e, M = [
|
|
3696
3697
|
"pkt-combobox__input",
|
|
3697
|
-
`pkt-combobox__input--${
|
|
3698
|
+
`pkt-combobox__input--${j}`,
|
|
3698
3699
|
p && "pkt-combobox__input--fullwidth",
|
|
3699
3700
|
o && "pkt-combobox__input--open",
|
|
3700
3701
|
m && "pkt-combobox__input--error",
|
|
3701
3702
|
f && "pkt-combobox__input--disabled"
|
|
3702
|
-
].filter(Boolean).join(" "),
|
|
3703
|
-
id:
|
|
3703
|
+
].filter(Boolean).join(" "), N = ["pkt-combobox__arrow-icon", o && "pkt-combobox__arrow-icon--open"].filter(Boolean).join(" "), P = c || l, ee = !P && d && (!i.length || s && u === "outside") && !g, te = u !== "outside", F = o && i[0] && vr(a, i[0]) ? `${r}-${yr(a, i[0])}` : void 0, I = s && i.length > 0 ? `${i.length} valgt` : void 0, ne = ur({
|
|
3704
|
+
id: P ? n : `${t}-combobox`,
|
|
3704
3705
|
hasHelptext: !!e.helptext,
|
|
3705
3706
|
ariaDescribedby: e.ariaDescribedby
|
|
3706
|
-
}), re =
|
|
3707
|
+
}), re = P ? { tabIndex: -1 } : {
|
|
3707
3708
|
id: `${t}-combobox`,
|
|
3708
3709
|
"aria-describedby": ne,
|
|
3709
3710
|
role: "combobox",
|
|
@@ -3718,19 +3719,19 @@ var vr = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
|
|
|
3718
3719
|
};
|
|
3719
3720
|
return /* @__PURE__ */ v("div", {
|
|
3720
3721
|
ref: S,
|
|
3721
|
-
className:
|
|
3722
|
+
className: M,
|
|
3722
3723
|
onClick: D,
|
|
3723
3724
|
onBlur: (e) => {
|
|
3724
3725
|
e.target === e.currentTarget && b();
|
|
3725
3726
|
},
|
|
3726
3727
|
...re,
|
|
3727
3728
|
children: [
|
|
3728
|
-
|
|
3729
|
+
ee ? /* @__PURE__ */ _("span", {
|
|
3729
3730
|
className: "pkt-combobox__placeholder",
|
|
3730
3731
|
onClick: O,
|
|
3731
3732
|
children: d
|
|
3732
|
-
}) : te ? s ? /* @__PURE__ */ _(Lr, { state: e }) :
|
|
3733
|
-
|
|
3733
|
+
}) : te ? s ? /* @__PURE__ */ _(Lr, { state: e }) : P ? null : /* @__PURE__ */ _(Rr, { state: e }) : null,
|
|
3734
|
+
P ? /* @__PURE__ */ _("div", {
|
|
3734
3735
|
className: "pkt-combobox__input-div combobox__input",
|
|
3735
3736
|
children: /* @__PURE__ */ _("input", {
|
|
3736
3737
|
ref: x,
|
|
@@ -3762,14 +3763,14 @@ var vr = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
|
|
|
3762
3763
|
value: i.join(",")
|
|
3763
3764
|
}),
|
|
3764
3765
|
/* @__PURE__ */ _(G, {
|
|
3765
|
-
className:
|
|
3766
|
+
className: N,
|
|
3766
3767
|
name: "chevron-thin-down",
|
|
3767
3768
|
"aria-hidden": "true"
|
|
3768
3769
|
})
|
|
3769
3770
|
]
|
|
3770
3771
|
});
|
|
3771
3772
|
}, Br = ({ state: e }) => {
|
|
3772
|
-
let t = De(["listbox"], e.strings), { listboxId: n, label: r, isOpen: i, options: a, filteredOptions: o, multiple: s, disabled: c, maxIsReached: l, maxlength: u, includeSearch: d, allowUserInput: f, addValueText: p, userInfoMessage: m, searchPlaceholder: h, searchValue: y, handleOptionClick: b, handleOptionKeydown: x, handleSearchInput: S, handleSearchKeydown: C, handleNewOptionClick: w, handleNewOptionKeydown: T, listboxRef: E } = e, D = o.filter((e) => e.selected).length, O = s && D > 0 && u != null && u > 0, k = f && p && !l, A = !!m,
|
|
3773
|
+
let t = De(["listbox"], e.strings), { listboxId: n, label: r, isOpen: i, options: a, filteredOptions: o, multiple: s, disabled: c, maxIsReached: l, maxlength: u, includeSearch: d, allowUserInput: f, addValueText: p, userInfoMessage: m, searchPlaceholder: h, searchValue: y, handleOptionClick: b, handleOptionKeydown: x, handleSearchInput: S, handleSearchKeydown: C, handleNewOptionClick: w, handleNewOptionKeydown: T, listboxRef: E } = e, D = o.filter((e) => e.selected).length, O = s && D > 0 && u != null && u > 0, k = f && p && !l, A = !!m, j = [
|
|
3773
3774
|
"pkt-listbox",
|
|
3774
3775
|
i && "pkt-listbox__open",
|
|
3775
3776
|
"pkt-txt-16-light"
|
|
@@ -3777,7 +3778,7 @@ var vr = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
|
|
|
3777
3778
|
return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
|
|
3778
3779
|
ref: E,
|
|
3779
3780
|
id: n,
|
|
3780
|
-
className:
|
|
3781
|
+
className: j,
|
|
3781
3782
|
role: o.length > 0 ? "listbox" : void 0,
|
|
3782
3783
|
"aria-label": o.length > 0 ? `Liste: ${r || ""}` : void 0,
|
|
3783
3784
|
"aria-multiselectable": o.length > 0 && s ? "true" : void 0,
|
|
@@ -3916,7 +3917,7 @@ function Ur(e, t) {
|
|
|
3916
3917
|
}));
|
|
3917
3918
|
}
|
|
3918
3919
|
function Wr(t, n) {
|
|
3919
|
-
let { id: r = "", label: i, value: s, defaultValue: l, options: d, defaultOptions: h, multiple: g = oe.multiple, maxlength: _, typeahead: v = oe.typeahead, includeSearch: y = oe.includeSearch, allowUserInput: b = oe.allowUserInput, displayValueAs: x = oe.displayValueAs, tagPlacement: S, searchPlaceholder: C, placeholder: w, disabled: T = oe.disabled, required: E = oe.required, fullwidth: D = oe.fullwidth, hasError: O = oe.hasError, errorMessage: k, helptext: A, helptextDropdown:
|
|
3920
|
+
let { id: r = "", label: i, value: s, defaultValue: l, options: d, defaultOptions: h, multiple: g = oe.multiple, maxlength: _, typeahead: v = oe.typeahead, includeSearch: y = oe.includeSearch, allowUserInput: b = oe.allowUserInput, displayValueAs: x = oe.displayValueAs, tagPlacement: S, searchPlaceholder: C, placeholder: w, disabled: T = oe.disabled, required: E = oe.required, fullwidth: D = oe.fullwidth, hasError: O = oe.hasError, errorMessage: k, helptext: A, helptextDropdown: j, helptextDropdownButton: M, optionalTag: N = oe.optionalTag, optionalText: P, requiredTag: ee = oe.requiredTag, requiredText: te, tagText: F, useWrapper: I = oe.useWrapper, inline: ne = oe.inline, counter: re, inputSize: ie = oe.inputSize, name: ae, form: L, ariaDescribedby: R, className: z, onChange: se, onValueChange: B, children: V, strings: ce } = t, le = `${r}-input`, ue = `${r}-listbox`, H = v || b, U = p(null), W = p(null), G = p(null), K = p(null), q = p(null), de = Hr(q, L), pe = o(() => {
|
|
3920
3921
|
H ? U.current?.focus() : G.current?.focus();
|
|
3921
3922
|
}, [H]), me = o(() => {
|
|
3922
3923
|
Le(!0);
|
|
@@ -4433,11 +4434,11 @@ function Wr(t, n) {
|
|
|
4433
4434
|
hasError: O,
|
|
4434
4435
|
errorMessage: k,
|
|
4435
4436
|
helptext: A,
|
|
4436
|
-
helptextDropdown:
|
|
4437
|
-
helptextDropdownButton:
|
|
4438
|
-
optionalTag:
|
|
4439
|
-
optionalText:
|
|
4440
|
-
requiredTag:
|
|
4437
|
+
helptextDropdown: j,
|
|
4438
|
+
helptextDropdownButton: M,
|
|
4439
|
+
optionalTag: N,
|
|
4440
|
+
optionalText: P,
|
|
4441
|
+
requiredTag: ee,
|
|
4441
4442
|
requiredText: te,
|
|
4442
4443
|
tagText: F,
|
|
4443
4444
|
useWrapper: I,
|
|
@@ -4546,7 +4547,7 @@ var Kr = null, qr = () => Kr || (Kr = new Promise((e, t) => {
|
|
|
4546
4547
|
} catch {
|
|
4547
4548
|
return e;
|
|
4548
4549
|
}
|
|
4549
|
-
}, Yr = (e) => Jr(e.value).items.reduce((e, t) => (e[t.name] = t.consent, e), {}), Xr = i(function({ devMode: e =
|
|
4550
|
+
}, Yr = (e) => Jr(e.value).items.reduce((e, t) => (e[t.name] = t.consent, e), {}), Xr = i(function({ devMode: e = I.devMode, cookieDomain: t = null, cookieSecure: n = null, cookieExpiryDays: r = null, hotjarId: i = null, googleAnalyticsId: a = null, i18nLanguage: o = I.i18nLanguage, triggerType: s = I.triggerType, triggerText: l, onToggleConsent: u, ...d }, f) {
|
|
4550
4551
|
let m = p(u);
|
|
4551
4552
|
m.current = u;
|
|
4552
4553
|
let h = p({
|
|
@@ -4565,7 +4566,7 @@ var Kr = null, qr = () => Kr || (Kr = new Promise((e, t) => {
|
|
|
4565
4566
|
hotjarId: i,
|
|
4566
4567
|
googleAnalyticsId: a
|
|
4567
4568
|
};
|
|
4568
|
-
let g = p(() => {}), v = Object.
|
|
4569
|
+
let g = p(() => {}), v = Object.prototype.hasOwnProperty.call(we.i18n, o) ? o : "nb", y = l ?? we.i18n[v].contentPresentation.buttons.settings;
|
|
4569
4570
|
c(() => {
|
|
4570
4571
|
let e = !1, t, n, r = h.current;
|
|
4571
4572
|
window.cookieBanner_googleAnalyticsId = r.googleAnalyticsId, window.cookieBanner_hotjarId = r.hotjarId, r.cookieDomain && (window.cookieBanner_cookieDomain = r.cookieDomain), r.cookieSecure && (window.cookieBanner_cookieSecure = r.cookieSecure), r.cookieExpiryDays && (window.cookieBanner_cookieExpiryDays = r.cookieExpiryDays), r.devMode && (window.cookieBanner_devMode = r.devMode);
|
|
@@ -4714,15 +4715,15 @@ var Zr = () => {
|
|
|
4714
4715
|
})
|
|
4715
4716
|
});
|
|
4716
4717
|
}, ci = ({ state: e }) => {
|
|
4717
|
-
let { id: t, inputId: n, values: r, dateformat: i, multiple: a, range: o, showRangeLabels: s, disabled: c, readOnly: l, required: u, label: d, name: f, placeholder: p, hasError: m, helptext: h, minStr: y, maxStr: b, inputType: x, isIOSDevice: S, strings: C, inputClasses: w, buttonClasses: T, rangeLabelClasses: E, datepickerInputsClasses: D, isInputDisabled: O, inputRef: k, inputToRef: A, btnRef:
|
|
4718
|
-
e.preventDefault(),
|
|
4718
|
+
let { id: t, inputId: n, values: r, dateformat: i, multiple: a, range: o, showRangeLabels: s, disabled: c, readOnly: l, required: u, label: d, name: f, placeholder: p, hasError: m, helptext: h, minStr: y, maxStr: b, inputType: x, isIOSDevice: S, strings: C, inputClasses: w, buttonClasses: T, rangeLabelClasses: E, datepickerInputsClasses: D, isInputDisabled: O, inputRef: k, inputToRef: A, btnRef: j, toggleCalendar: M, handleFocus: N, handleSingleInputChange: P, handleRangeFromChange: ee, handleRangeToChange: te, handleRangeBlur: F, handleMultipleBlur: I, handleTagRemoved: ne, handleSingleKeydown: re, handleRangeFromKeydown: ie, handleRangeToKeydown: ae, handleMultipleKeydown: oe, restProps: L } = e, R = (e) => {
|
|
4719
|
+
e.preventDefault(), M();
|
|
4719
4720
|
}, z = (e) => {
|
|
4720
|
-
e.preventDefault(),
|
|
4721
|
+
e.preventDefault(), M();
|
|
4721
4722
|
}, se = () => /* @__PURE__ */ v("button", {
|
|
4722
|
-
ref:
|
|
4723
|
+
ref: j,
|
|
4723
4724
|
className: T,
|
|
4724
4725
|
type: "button",
|
|
4725
|
-
onClick:
|
|
4726
|
+
onClick: M,
|
|
4726
4727
|
disabled: c,
|
|
4727
4728
|
children: [/* @__PURE__ */ _(G, { name: "calendar" }), /* @__PURE__ */ _("span", {
|
|
4728
4729
|
className: "pkt-btn__text",
|
|
@@ -4755,7 +4756,7 @@ var Zr = () => {
|
|
|
4755
4756
|
onClick: R,
|
|
4756
4757
|
onTouchEnd: z,
|
|
4757
4758
|
onKeyDown: oe,
|
|
4758
|
-
onFocus:
|
|
4759
|
+
onFocus: N,
|
|
4759
4760
|
onBlur: I
|
|
4760
4761
|
}), se()]
|
|
4761
4762
|
})
|
|
@@ -4789,9 +4790,9 @@ var Zr = () => {
|
|
|
4789
4790
|
onClick: R,
|
|
4790
4791
|
onTouchEnd: z,
|
|
4791
4792
|
onKeyDown: ie,
|
|
4792
|
-
onFocus:
|
|
4793
|
+
onFocus: N,
|
|
4793
4794
|
onBlur: F,
|
|
4794
|
-
onChange:
|
|
4795
|
+
onChange: ee
|
|
4795
4796
|
}),
|
|
4796
4797
|
/* @__PURE__ */ _("div", {
|
|
4797
4798
|
className: E,
|
|
@@ -4818,7 +4819,7 @@ var Zr = () => {
|
|
|
4818
4819
|
onClick: R,
|
|
4819
4820
|
onTouchEnd: z,
|
|
4820
4821
|
onKeyDown: ae,
|
|
4821
|
-
onFocus:
|
|
4822
|
+
onFocus: N,
|
|
4822
4823
|
onBlur: F,
|
|
4823
4824
|
onChange: te
|
|
4824
4825
|
}),
|
|
@@ -4849,9 +4850,9 @@ var Zr = () => {
|
|
|
4849
4850
|
onClick: R,
|
|
4850
4851
|
onTouchEnd: z,
|
|
4851
4852
|
onKeyDown: re,
|
|
4852
|
-
onFocus:
|
|
4853
|
+
onFocus: N,
|
|
4853
4854
|
onBlur: void 0,
|
|
4854
|
-
onChange:
|
|
4855
|
+
onChange: P
|
|
4855
4856
|
}), se()]
|
|
4856
4857
|
})
|
|
4857
4858
|
});
|
|
@@ -4867,7 +4868,7 @@ var Zr = () => {
|
|
|
4867
4868
|
//#endregion
|
|
4868
4869
|
//#region src/components/datepicker/useDatepickerState.ts
|
|
4869
4870
|
function ui(e, t) {
|
|
4870
|
-
let { id: n, label: r, value: i, defaultValue: a, dateformat: s = "dd.MM.yyyy", multiple: l = !1, maxlength: d, range: h = !1, showRangeLabels: g = !1, weeknumbers: _ = !1, withcontrols: v = !1, excludedates: y, excludeweekdays: b, currentmonth: x, today: S, calendarOpen: C, timezone: w, fullwidth: T = !1, inputSize: E = "medium", hasFieldset: D = !1, counter: O, inline: k = !1, helptext: A, helptextDropdown:
|
|
4871
|
+
let { id: n, label: r, value: i, defaultValue: a, dateformat: s = "dd.MM.yyyy", multiple: l = !1, maxlength: d, range: h = !1, showRangeLabels: g = !1, weeknumbers: _ = !1, withcontrols: v = !1, excludedates: y, excludeweekdays: b, currentmonth: x, today: S, calendarOpen: C, timezone: w, fullwidth: T = !1, inputSize: E = "medium", hasFieldset: D = !1, counter: O, inline: k = !1, helptext: A, helptextDropdown: j, helptextDropdownButton: M, hasError: N = !1, errorMessage: P, optionalTag: ee = !1, optionalText: te, requiredTag: F = !1, requiredText: I, tagText: ne, useWrapper: re = !0, strings: ie, disabled: ae = !1, readOnly: oe = !1, required: L = !1, name: R, min: z, max: se, placeholder: B, onChange: V, onValueChange: ce, className: le, ...ue } = e, H = o((e) => e === void 0 ? [] : li(e), []), U = i !== void 0, W = typeof a == "number" ? void 0 : a, [G, K] = m(() => H(i ?? W)), q = U ? H(i) : G, de = p(G), [fe, pe] = m(i);
|
|
4871
4872
|
U && i !== fe && (pe(i), K(H(i)));
|
|
4872
4873
|
let [me, J] = m(C ?? !1), [he, ge] = m(C);
|
|
4873
4874
|
C !== he && (ge(C), C !== void 0 && J(C));
|
|
@@ -5050,11 +5051,11 @@ function ui(e, t) {
|
|
|
5050
5051
|
hasFieldset: D,
|
|
5051
5052
|
inline: k,
|
|
5052
5053
|
helptext: A,
|
|
5053
|
-
helptextDropdown:
|
|
5054
|
-
helptextDropdownButton:
|
|
5055
|
-
hasError:
|
|
5056
|
-
errorMessage:
|
|
5057
|
-
optionalTag:
|
|
5054
|
+
helptextDropdown: j,
|
|
5055
|
+
helptextDropdownButton: M,
|
|
5056
|
+
hasError: N,
|
|
5057
|
+
errorMessage: P,
|
|
5058
|
+
optionalTag: ee,
|
|
5058
5059
|
optionalText: te,
|
|
5059
5060
|
requiredTag: F,
|
|
5060
5061
|
requiredText: I,
|
|
@@ -5415,30 +5416,30 @@ var Fi = () => ("00000000000000000" + (Math.random() * 0x10000000000000000).toSt
|
|
|
5415
5416
|
}, [S, n]);
|
|
5416
5417
|
let A = o((e) => {
|
|
5417
5418
|
r(e.map((e) => new Li(e))), S.current && (S.current.value = "");
|
|
5418
|
-
}, [r]),
|
|
5419
|
+
}, [r]), j = (e) => {
|
|
5419
5420
|
let t = e.target.files;
|
|
5420
5421
|
if (t.length === 0) {
|
|
5421
5422
|
k(n);
|
|
5422
5423
|
return;
|
|
5423
5424
|
}
|
|
5424
5425
|
A(Array.from(t));
|
|
5425
|
-
}, j = (e) => {
|
|
5426
|
-
A(e);
|
|
5427
5426
|
}, M = (e) => {
|
|
5427
|
+
A(e);
|
|
5428
|
+
}, N = (e) => {
|
|
5428
5429
|
if (e.preventDefault(), E(!1), d) return;
|
|
5429
5430
|
let t = e.dataTransfer.files, n = Array.from(t);
|
|
5430
|
-
|
|
5431
|
-
},
|
|
5431
|
+
M(n);
|
|
5432
|
+
}, P = (e) => {
|
|
5432
5433
|
e.preventDefault(), !d && E(!0);
|
|
5433
|
-
},
|
|
5434
|
+
}, ee = () => {
|
|
5434
5435
|
E(!1);
|
|
5435
5436
|
}, te = o((e) => {
|
|
5436
5437
|
d || e.target.closest(".pkt-fileupload__drop-zone__placeholder__title__open-file-dialog") || S.current?.click();
|
|
5437
5438
|
}, [d]);
|
|
5438
5439
|
return /* @__PURE__ */ v("div", {
|
|
5439
|
-
onDrop:
|
|
5440
|
-
onDragOver:
|
|
5441
|
-
onDragLeave:
|
|
5440
|
+
onDrop: N,
|
|
5441
|
+
onDragOver: P,
|
|
5442
|
+
onDragLeave: ee,
|
|
5442
5443
|
onClick: te,
|
|
5443
5444
|
className: (0, L.default)("pkt-fileupload__drop-zone", {
|
|
5444
5445
|
"pkt-fileupload__drop-zone--drag-active": T,
|
|
@@ -5451,7 +5452,7 @@ var Fi = () => ("00000000000000000" + (Math.random() * 0x10000000000000000).toSt
|
|
|
5451
5452
|
type: "file",
|
|
5452
5453
|
ref: S,
|
|
5453
5454
|
multiple: t,
|
|
5454
|
-
onChange:
|
|
5455
|
+
onChange: j,
|
|
5455
5456
|
accept: C,
|
|
5456
5457
|
disabled: d,
|
|
5457
5458
|
name: a === "form" && i || void 0,
|
|
@@ -5502,7 +5503,7 @@ var Fi = () => ("00000000000000000" + (Math.random() * 0x10000000000000000).toSt
|
|
|
5502
5503
|
let t = new DataTransfer();
|
|
5503
5504
|
for (let n of e) t.items.add(n.file);
|
|
5504
5505
|
return t.files;
|
|
5505
|
-
}, Vi = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, counter: r, hasFieldset: i, counterMaxLength: a, className: o, disabled: s, errorMessage: c, hasError: l = !1, helptext: u, helptextDropdown: d, helptextDropdownButton: f, inline: p, fullwidth: h = !1, label: g, name: v, optionalTag: y = !1, optionalText: b, requiredTag: x = !1, requiredText: S, tagText: C = null, placeholder: w, rows: T, useWrapper: E = !0, onChange: D, value: O, autoComplete: k = "off", minLength: A, maxLength:
|
|
5506
|
+
}, Vi = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, counter: r, hasFieldset: i, counterMaxLength: a, className: o, disabled: s, errorMessage: c, hasError: l = !1, helptext: u, helptextDropdown: d, helptextDropdownButton: f, inline: p, fullwidth: h = !1, label: g, name: v, optionalTag: y = !1, optionalText: b, requiredTag: x = !1, requiredText: S, tagText: C = null, placeholder: w, rows: T, useWrapper: E = !0, onChange: D, value: O, autoComplete: k = "off", minLength: A, maxLength: j, readOnly: M, skipForwardTestid: N = !1, inputSize: P = "medium", strings: ee, ...te }, F) => {
|
|
5506
5507
|
let I = r ?? (a ?? 0) > 0, ne = [
|
|
5507
5508
|
o,
|
|
5508
5509
|
"pkt-textinput",
|
|
@@ -5513,7 +5514,7 @@ var Fi = () => ("00000000000000000" + (Math.random() * 0x10000000000000000).toSt
|
|
|
5513
5514
|
return /* @__PURE__ */ _("div", {
|
|
5514
5515
|
className: ne,
|
|
5515
5516
|
children: /* @__PURE__ */ _(gr, {
|
|
5516
|
-
strings:
|
|
5517
|
+
strings: ee,
|
|
5517
5518
|
ariaDescribedby: t,
|
|
5518
5519
|
disabled: s,
|
|
5519
5520
|
errorMessage: c,
|
|
@@ -5534,12 +5535,12 @@ var Fi = () => ("00000000000000000" + (Math.random() * 0x10000000000000000).toSt
|
|
|
5534
5535
|
counterCurrent: z,
|
|
5535
5536
|
counterMaxLength: a,
|
|
5536
5537
|
hasFieldset: i ?? !1,
|
|
5537
|
-
size:
|
|
5538
|
+
size: P,
|
|
5538
5539
|
children: /* @__PURE__ */ _("textarea", {
|
|
5539
5540
|
ref: (e) => {
|
|
5540
5541
|
R(e?.value?.length || 0), typeof F == "function" ? F(e) : F && (F.current = e);
|
|
5541
5542
|
},
|
|
5542
|
-
className: `pkt-input pkt-input--${
|
|
5543
|
+
className: `pkt-input pkt-input--${P} ${h ? "pkt-input--fullwidth" : ""} ${a && z > a ? "pkt-input--counter-error" : ""}`,
|
|
5543
5544
|
name: `${v || re}`,
|
|
5544
5545
|
id: ie,
|
|
5545
5546
|
placeholder: w,
|
|
@@ -5559,9 +5560,9 @@ var Fi = () => ("00000000000000000" + (Math.random() * 0x10000000000000000).toSt
|
|
|
5559
5560
|
value: O,
|
|
5560
5561
|
autoComplete: k,
|
|
5561
5562
|
minLength: A,
|
|
5562
|
-
maxLength:
|
|
5563
|
-
readOnly:
|
|
5564
|
-
"data-skip-forward-testid":
|
|
5563
|
+
maxLength: j,
|
|
5564
|
+
readOnly: M,
|
|
5565
|
+
"data-skip-forward-testid": N ? "true" : void 0
|
|
5565
5566
|
})
|
|
5566
5567
|
})
|
|
5567
5568
|
});
|
|
@@ -5843,7 +5844,7 @@ var Hi = "comments", Ui = (e, t) => {
|
|
|
5843
5844
|
c(() => {
|
|
5844
5845
|
T.current && D(T.current.getBoundingClientRect().width || 0);
|
|
5845
5846
|
}, [h]);
|
|
5846
|
-
let O = g - y, k = Math.round(l === "fraction" ? h / O * 100 : (h - y) / O * 100), A = `${h} av ${O}`,
|
|
5847
|
+
let O = g - y, k = Math.round(l === "fraction" ? h / O * 100 : (h - y) / O * 100), A = `${h} av ${O}`, j = l === "fraction" && !r ? `${h} av ${g - y}` : r || void 0, M = e ? void 0 : t || `${w}-title`;
|
|
5847
5848
|
return /* @__PURE__ */ _("div", {
|
|
5848
5849
|
ref: S,
|
|
5849
5850
|
id: w,
|
|
@@ -5853,9 +5854,9 @@ var Hi = "comments", Ui = (e, t) => {
|
|
|
5853
5854
|
"aria-valuenow": h,
|
|
5854
5855
|
"aria-valuemin": y,
|
|
5855
5856
|
"aria-valuemax": g,
|
|
5856
|
-
"aria-valuetext":
|
|
5857
|
+
"aria-valuetext": j,
|
|
5857
5858
|
"aria-label": e || void 0,
|
|
5858
|
-
"aria-labelledby":
|
|
5859
|
+
"aria-labelledby": M,
|
|
5859
5860
|
className: (0, L.default)("pkt-progressbar", b),
|
|
5860
5861
|
...x,
|
|
5861
5862
|
children: /* @__PURE__ */ v("div", {
|
|
@@ -5900,7 +5901,10 @@ var oa = "is-scroll-locked", sa = 0, ca = 0, la = () => typeof document < "u" &&
|
|
|
5900
5901
|
n > 0 && (e.style.paddingRight = `${n}px`), e.style.position = "fixed", e.style.top = `-${ca}px`, e.style.left = "0", e.style.right = "0", e.style.width = "100%", e.style.overflow = "hidden", t.classList.add(oa);
|
|
5901
5902
|
}, da = () => {
|
|
5902
5903
|
let e = document.body, t = document.documentElement;
|
|
5903
|
-
e.style.removeProperty("position"), e.style.removeProperty("top"), e.style.removeProperty("left"), e.style.removeProperty("right"), e.style.removeProperty("width"), e.style.removeProperty("overflow"), e.style.removeProperty("padding-right"), t.classList.remove(oa), typeof window.scrollTo == "function" && window.scrollTo({
|
|
5904
|
+
e.style.removeProperty("position"), e.style.removeProperty("top"), e.style.removeProperty("left"), e.style.removeProperty("right"), e.style.removeProperty("width"), e.style.removeProperty("overflow"), e.style.removeProperty("padding-right"), t.classList.remove(oa), typeof window.scrollTo == "function" && window.scrollTo({
|
|
5905
|
+
top: ca,
|
|
5906
|
+
behavior: "instant"
|
|
5907
|
+
});
|
|
5904
5908
|
}, fa = () => {
|
|
5905
5909
|
la() && (sa += 1, sa === 1 && ua());
|
|
5906
5910
|
}, pa = () => {
|
|
@@ -6370,7 +6374,7 @@ var _a = n({ tail: 5 }), va = ({ children: e, tail: t }) => {
|
|
|
6370
6374
|
}, za = {
|
|
6371
6375
|
filename: Da,
|
|
6372
6376
|
thumbnail: Oa
|
|
6373
|
-
}, Ba = i(({ value: e, defaultValue: t, id: n, multiple: r = !1, uploadStrategy: i = "form", addCommentsEnabled: a = !1, renameFilesEnabled: s = !1, truncateTail: d = 4, onFilesChanged: h, onFileUploadRequested: g, extraOperations: y = [], itemRenderer: b = za.filename, fullwidth: x = !1, allowedFormats: S, formatErrorMessage: C, maxFileSize: w, sizeErrorMessage: T, onFileValidation: E, onFileValidate: D, errorMessage: O, hasError: k = !1, disabled: A = !1, label:
|
|
6377
|
+
}, Ba = i(({ value: e, defaultValue: t, id: n, multiple: r = !1, uploadStrategy: i = "form", addCommentsEnabled: a = !1, renameFilesEnabled: s = !1, truncateTail: d = 4, onFilesChanged: h, onFileUploadRequested: g, extraOperations: y = [], itemRenderer: b = za.filename, fullwidth: x = !1, allowedFormats: S, formatErrorMessage: C, maxFileSize: w, sizeErrorMessage: T, onFileValidation: E, onFileValidate: D, errorMessage: O, hasError: k = !1, disabled: A = !1, label: j, helptext: M, helptextDropdown: N, helptextDropdownButton: P, optionalTag: ee, optionalText: te, requiredTag: F, requiredText: I, tagText: ne, required: re = !1, enableImagePreview: ie = !1, "aria-describedby": ae, "aria-invalid": oe, strings: R, ...z }, se) => {
|
|
6374
6378
|
let B = l(), V = n ?? `pkt-fileupload-${B}`, ce = p(null);
|
|
6375
6379
|
u(se, () => ce.current, []);
|
|
6376
6380
|
let le = "transfers" in z ? z.transfers : void 0, ue = De(["fileupload"], R).fileupload, [H, U] = m(null), [W, G] = m("");
|
|
@@ -6381,7 +6385,7 @@ var _a = n({ tail: 5 }), va = ({ children: e, tail: t }) => {
|
|
|
6381
6385
|
}, [W]);
|
|
6382
6386
|
let K = H ?? O ?? null, q = k || !!H || !!(O && O.trim()), de = K ? `${V}-error` : void 0, me = [
|
|
6383
6387
|
ae,
|
|
6384
|
-
|
|
6388
|
+
M ? `${V}-helptext` : void 0,
|
|
6385
6389
|
de
|
|
6386
6390
|
].filter(Boolean).join(" ") || void 0, J = q || oe === !0 || oe === "true", he = o((e) => {
|
|
6387
6391
|
let t = yi(e, {
|
|
@@ -6517,7 +6521,7 @@ var _a = n({ tail: 5 }), va = ({ children: e, tail: t }) => {
|
|
|
6517
6521
|
"aria-required": re ? "true" : void 0,
|
|
6518
6522
|
"aria-invalid": J ? "true" : void 0,
|
|
6519
6523
|
"aria-describedby": me,
|
|
6520
|
-
hasVisibleLabel: !!
|
|
6524
|
+
hasVisibleLabel: !!j,
|
|
6521
6525
|
strings: R
|
|
6522
6526
|
}),
|
|
6523
6527
|
q && K && /* @__PURE__ */ _(Oe, {
|
|
@@ -6550,13 +6554,13 @@ var _a = n({ tail: 5 }), va = ({ children: e, tail: t }) => {
|
|
|
6550
6554
|
children: /* @__PURE__ */ _(gr, {
|
|
6551
6555
|
strings: R,
|
|
6552
6556
|
forId: V,
|
|
6553
|
-
label:
|
|
6554
|
-
helptext:
|
|
6555
|
-
helptextDropdown:
|
|
6556
|
-
helptextDropdownButton:
|
|
6557
|
+
label: j ?? "",
|
|
6558
|
+
helptext: M,
|
|
6559
|
+
helptextDropdown: N,
|
|
6560
|
+
helptextDropdownButton: P,
|
|
6557
6561
|
disabled: A,
|
|
6558
6562
|
hasError: q,
|
|
6559
|
-
optionalTag:
|
|
6563
|
+
optionalTag: ee,
|
|
6560
6564
|
optionalText: te,
|
|
6561
6565
|
requiredTag: F,
|
|
6562
6566
|
requiredText: I,
|
|
@@ -6842,11 +6846,11 @@ var oo = ({ link: e, includeConsent: t, consent: n }) => {
|
|
|
6842
6846
|
cookieSecure: b,
|
|
6843
6847
|
cookieExpiryDays: x,
|
|
6844
6848
|
onToggleConsent: S
|
|
6845
|
-
}, k = o && p, A = a?.filter((e) => e.language) ?? [],
|
|
6849
|
+
}, k = o && p, A = a?.filter((e) => e.language) ?? [], j = a?.filter((e) => e.iconName) ?? [], M = D.length > 0 || k || !!a?.length, N = [w, "pkt-footer"].filter(Boolean).join(" ");
|
|
6846
6850
|
return /* @__PURE__ */ v("footer", {
|
|
6847
|
-
className:
|
|
6851
|
+
className: N,
|
|
6848
6852
|
...T,
|
|
6849
|
-
children: [
|
|
6853
|
+
children: [M && /* @__PURE__ */ _("div", {
|
|
6850
6854
|
className: "pkt-footer__band pkt-footer__band--secondary",
|
|
6851
6855
|
children: /* @__PURE__ */ v("div", {
|
|
6852
6856
|
className: "pkt-footer__inner",
|
|
@@ -6878,7 +6882,7 @@ var oo = ({ link: e, includeConsent: t, consent: n }) => {
|
|
|
6878
6882
|
}) }, `${e.href}|${e.language}`))
|
|
6879
6883
|
}), /* @__PURE__ */ _("ul", {
|
|
6880
6884
|
className: "pkt-footer__some",
|
|
6881
|
-
children:
|
|
6885
|
+
children: j.map((e) => /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _("a", {
|
|
6882
6886
|
className: "pkt-footer__some-link",
|
|
6883
6887
|
href: e.href,
|
|
6884
6888
|
"aria-label": `til ${e.iconName}`,
|
|
@@ -7058,7 +7062,7 @@ var yo = ({ dataUrl: e = M, data: t, locale: n = "nb-NO", open: r = !1, mobileBr
|
|
|
7058
7062
|
e.name !== "AbortError" && (x("error"), E.current?.(e));
|
|
7059
7063
|
}), () => n.abort();
|
|
7060
7064
|
}, [t, e]);
|
|
7061
|
-
let A = t ?? S,
|
|
7065
|
+
let A = t ?? S, j = f(() => qa(A, n), [A, n]), N = [
|
|
7062
7066
|
"pkt-header-menu",
|
|
7063
7067
|
r && "pkt-header-menu--open",
|
|
7064
7068
|
a
|
|
@@ -7066,48 +7070,48 @@ var yo = ({ dataUrl: e = M, data: t, locale: n = "nb-NO", open: r = !1, mobileBr
|
|
|
7066
7070
|
if (w === "loading") return /* @__PURE__ */ _("nav", {
|
|
7067
7071
|
...h,
|
|
7068
7072
|
ref: O,
|
|
7069
|
-
className:
|
|
7073
|
+
className: N,
|
|
7070
7074
|
"aria-busy": "true",
|
|
7071
7075
|
children: /* @__PURE__ */ _("p", {
|
|
7072
7076
|
className: "pkt-header-menu__loading",
|
|
7073
7077
|
children: y.menuLoading
|
|
7074
7078
|
})
|
|
7075
7079
|
});
|
|
7076
|
-
if (w === "error" || !
|
|
7080
|
+
if (w === "error" || !j) return /* @__PURE__ */ _("nav", {
|
|
7077
7081
|
...h,
|
|
7078
7082
|
ref: O,
|
|
7079
|
-
className:
|
|
7083
|
+
className: N,
|
|
7080
7084
|
"aria-hidden": !r,
|
|
7081
7085
|
children: /* @__PURE__ */ _("p", {
|
|
7082
7086
|
className: "pkt-header-menu__error",
|
|
7083
7087
|
children: y.menuLoadError
|
|
7084
7088
|
})
|
|
7085
7089
|
});
|
|
7086
|
-
let { megamenu:
|
|
7090
|
+
let { megamenu: P, i18n: ee } = j, te = ee?.navAriaLabel || "Hovedmeny";
|
|
7087
7091
|
return /* @__PURE__ */ v("nav", {
|
|
7088
7092
|
...h,
|
|
7089
7093
|
ref: O,
|
|
7090
|
-
className:
|
|
7094
|
+
className: N,
|
|
7091
7095
|
"aria-label": te,
|
|
7092
7096
|
children: [
|
|
7093
7097
|
k ? /* @__PURE__ */ _(xo, {
|
|
7094
|
-
services:
|
|
7095
|
-
sections:
|
|
7098
|
+
services: P.services,
|
|
7099
|
+
sections: P.sections
|
|
7096
7100
|
}) : /* @__PURE__ */ v(g, { children: [
|
|
7097
|
-
/* @__PURE__ */ _(So, { services:
|
|
7101
|
+
/* @__PURE__ */ _(So, { services: P.services }),
|
|
7098
7102
|
/* @__PURE__ */ _(Co, {
|
|
7099
|
-
buttons:
|
|
7103
|
+
buttons: P.buttons,
|
|
7100
7104
|
mobile: !1
|
|
7101
7105
|
}),
|
|
7102
|
-
/* @__PURE__ */ _(wo, { sections:
|
|
7106
|
+
/* @__PURE__ */ _(wo, { sections: P.sections })
|
|
7103
7107
|
] }),
|
|
7104
7108
|
/* @__PURE__ */ _(Co, {
|
|
7105
|
-
buttons:
|
|
7109
|
+
buttons: P.buttons,
|
|
7106
7110
|
mobile: !0
|
|
7107
7111
|
}),
|
|
7108
7112
|
/* @__PURE__ */ _(Eo, {
|
|
7109
|
-
links:
|
|
7110
|
-
some:
|
|
7113
|
+
links: P.links,
|
|
7114
|
+
some: P.some
|
|
7111
7115
|
})
|
|
7112
7116
|
]
|
|
7113
7117
|
});
|
|
@@ -7130,7 +7134,7 @@ var yo = ({ dataUrl: e = M, data: t, locale: n = "nb-NO", open: r = !1, mobileBr
|
|
|
7130
7134
|
}, e.url))
|
|
7131
7135
|
}), xo = ({ services: e, sections: t }) => /* @__PURE__ */ _("div", {
|
|
7132
7136
|
className: "pkt-header-menu__sections",
|
|
7133
|
-
children: /* @__PURE__ */ v(
|
|
7137
|
+
children: /* @__PURE__ */ v(j, {
|
|
7134
7138
|
className: "pkt-header-menu__sections-inner",
|
|
7135
7139
|
skin: "plus-minus",
|
|
7136
7140
|
name: "header-menu-accordion",
|
|
@@ -7392,13 +7396,13 @@ var No = i(({ appearance: e = "local", inputSize: t = "medium", disabled: n = !1
|
|
|
7392
7396
|
}) : /* @__PURE__ */ _("div", {
|
|
7393
7397
|
...k,
|
|
7394
7398
|
children: e
|
|
7395
|
-
}),
|
|
7399
|
+
}), j = (e) => /* @__PURE__ */ v(g, { children: [e.title && /* @__PURE__ */ _("h3", {
|
|
7396
7400
|
className: "pkt-searchinput__suggestion-title",
|
|
7397
7401
|
children: e.title
|
|
7398
7402
|
}), e.text && /* @__PURE__ */ _("p", {
|
|
7399
7403
|
className: "pkt-searchinput__suggestion-text",
|
|
7400
7404
|
children: e.text
|
|
7401
|
-
})] }),
|
|
7405
|
+
})] }), M = (e) => ["pkt-searchinput__suggestion", e.onClick ? "pkt-link-button" : ""].filter(Boolean).join(" "), N = e === "local" ? `pkt-input__container pkt-input__container--${t}` : "pkt-searchinput__field";
|
|
7402
7406
|
return A(/* @__PURE__ */ v(g, { children: [
|
|
7403
7407
|
a && /* @__PURE__ */ _("label", {
|
|
7404
7408
|
htmlFor: a ? O : void 0,
|
|
@@ -7406,7 +7410,7 @@ var No = i(({ appearance: e = "local", inputSize: t = "medium", disabled: n = !1
|
|
|
7406
7410
|
children: a
|
|
7407
7411
|
}),
|
|
7408
7412
|
/* @__PURE__ */ v("div", {
|
|
7409
|
-
className:
|
|
7413
|
+
className: N,
|
|
7410
7414
|
children: [/* @__PURE__ */ _("input", {
|
|
7411
7415
|
className: `pkt-input pkt-input--${t} ${r ? "pkt-input--fullwidth" : ""}`,
|
|
7412
7416
|
type: "search",
|
|
@@ -7445,17 +7449,17 @@ var No = i(({ appearance: e = "local", inputSize: t = "medium", disabled: n = !1
|
|
|
7445
7449
|
"aria-live": "assertive",
|
|
7446
7450
|
children: Ae(c, (e) => `${e.href ?? ""}|${je(e.title)}|${je(e.text)}`).map(({ item: e, key: t }, n) => e.href ? /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _("a", {
|
|
7447
7451
|
href: e.href,
|
|
7448
|
-
className:
|
|
7452
|
+
className: M(e),
|
|
7449
7453
|
onClick: () => w(e.onClick, n),
|
|
7450
|
-
children:
|
|
7454
|
+
children: j(e)
|
|
7451
7455
|
}) }, t) : e.nonInteractive ? /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _("div", {
|
|
7452
7456
|
className: "pkt-searchinput__suggestion",
|
|
7453
|
-
children:
|
|
7457
|
+
children: j(e)
|
|
7454
7458
|
}) }, t) : /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _("button", {
|
|
7455
7459
|
type: "button",
|
|
7456
|
-
className:
|
|
7460
|
+
className: M(e),
|
|
7457
7461
|
onClick: () => w(e.onClick, n),
|
|
7458
|
-
children:
|
|
7462
|
+
children: j(e)
|
|
7459
7463
|
}) }, t))
|
|
7460
7464
|
})
|
|
7461
7465
|
] }));
|
|
@@ -7465,17 +7469,17 @@ No.displayName = "PktSearchInput";
|
|
|
7465
7469
|
//#region src/components/header/HeaderGlobal.tsx
|
|
7466
7470
|
var Po = "https://punkt-cdn.oslo.kommune.no/latest/logos/";
|
|
7467
7471
|
typeof window < "u" && (window.pktLogoPath = window.pktLogoPath || Po);
|
|
7468
|
-
var Fo = "pkt-header-global-menu", Io = "pkt-header-global-menu-toggle", Lo = "pkt-header-global-search-panel", Ro = "pkt-header-global-search-toggle", zo = i(({ className: e, "data-mode": t, dataUrl: n, data: r, locale: i = "nb-NO", logoLink: a = N, logoClick: s, logoPath: l = typeof window < "u" ? window.pktLogoPath : Po, showSearch: u = !0, searchPlaceholder: h, onSearch: y, showContact: b = !0, user: x, userMenu: S, representing: C, canChangeRepresentation: w = !1, changeRepresentation: T, logOutButtonPlacement: E = "none", logOut: D, position: O = "fixed", scrollBehavior: k = "hide", mobileBreakpoint: A = 768, tabletBreakpoint:
|
|
7469
|
-
let F = k === "hide", [I, ne] = m("none"), [re, ie] = m(void 0), [ae, oe] = m(!1), R = p(
|
|
7472
|
+
var Fo = "pkt-header-global-menu", Io = "pkt-header-global-menu-toggle", Lo = "pkt-header-global-search-panel", Ro = "pkt-header-global-search-toggle", zo = i(({ className: e, "data-mode": t, dataUrl: n, data: r, locale: i = "nb-NO", logoLink: a = N, logoClick: s, logoPath: l = typeof window < "u" ? window.pktLogoPath : Po, showSearch: u = !0, searchPlaceholder: h, onSearch: y, showContact: b = !0, user: x, userMenu: S, representing: C, canChangeRepresentation: w = !1, changeRepresentation: T, logOutButtonPlacement: E = "none", logOut: D, position: O = "fixed", scrollBehavior: k = "hide", mobileBreakpoint: A = 768, tabletBreakpoint: j = 1024, onDataLoaded: M, onDataError: P, strings: ee }, te) => {
|
|
7473
|
+
let F = k === "hide", [I, ne] = m("none"), [re, ie] = m(void 0), [ae, oe] = m(!1), R = p(M), z = p(P);
|
|
7470
7474
|
c(() => {
|
|
7471
|
-
R.current =
|
|
7472
|
-
}, [
|
|
7473
|
-
z.current =
|
|
7474
|
-
}, [
|
|
7475
|
+
R.current = M;
|
|
7476
|
+
}, [M]), c(() => {
|
|
7477
|
+
z.current = P;
|
|
7478
|
+
}, [P]);
|
|
7475
7479
|
let { setRef: se, isMobile: B, isTablet: V, isFixed: ce, isSticky: le, hidden: ue, captureFocus: H, flagRestoreFocus: U, restoreFocus: W } = _o({
|
|
7476
7480
|
forwardedRef: te,
|
|
7477
7481
|
mobileBreakpoint: A,
|
|
7478
|
-
tabletBreakpoint:
|
|
7482
|
+
tabletBreakpoint: j,
|
|
7479
7483
|
position: O,
|
|
7480
7484
|
scrollBehavior: k,
|
|
7481
7485
|
pauseScrollHide: I !== "none"
|
|
@@ -7555,7 +7559,7 @@ var Fo = "pkt-header-global-menu", Io = "pkt-header-global-menu-toggle", Lo = "p
|
|
|
7555
7559
|
});
|
|
7556
7560
|
}, [x?.lastLoggedIn]), me = o((e) => {
|
|
7557
7561
|
ne((t) => t === e ? "none" : (H(), e));
|
|
7558
|
-
}, [H]), J = E === "userMenu" || E === "both", he = De(["header"],
|
|
7562
|
+
}, [H]), J = E === "userMenu" || E === "both", he = De(["header"], ee).header, ge = fe?.search, _e = fe?.header?.contact, ve = fe?.i18n?.menu || he.menu, Y = fe?.i18n?.search || he.search, ye = I === "menu", be = I === "user", X = I === "search", xe = B, Se = !!(u && ge), Z = ge?.input.id || "pkt-header-global-search", Ce = !fe && !ae, we = /* @__PURE__ */ v("header", {
|
|
7559
7563
|
className: (0, L.default)("pkt-header-global", B && "pkt-header-global--mobile", V && "pkt-header-global--tablet", ce && "pkt-header-global--fixed", le && "pkt-header-global--sticky", F && "pkt-header-global--scroll-to-hide", ue && "pkt-header-global--hidden", e),
|
|
7560
7564
|
"data-mode": t,
|
|
7561
7565
|
ref: q,
|
|
@@ -7665,7 +7669,7 @@ var Fo = "pkt-header-global-menu", Io = "pkt-header-global-menu-toggle", Lo = "p
|
|
|
7665
7669
|
}), be && /* @__PURE__ */ _("div", {
|
|
7666
7670
|
className: "pkt-header-global__user-menu is-open",
|
|
7667
7671
|
children: /* @__PURE__ */ _(Mo, {
|
|
7668
|
-
strings:
|
|
7672
|
+
strings: ee,
|
|
7669
7673
|
user: x,
|
|
7670
7674
|
formattedLastLoggedIn: pe,
|
|
7671
7675
|
representing: C,
|
|
@@ -7686,7 +7690,7 @@ var Fo = "pkt-header-global-menu", Io = "pkt-header-global-menu-toggle", Lo = "p
|
|
|
7686
7690
|
locale: i,
|
|
7687
7691
|
open: !0,
|
|
7688
7692
|
mobileBreakpoint: A,
|
|
7689
|
-
strings:
|
|
7693
|
+
strings: ee
|
|
7690
7694
|
}) : /* @__PURE__ */ _("nav", {
|
|
7691
7695
|
className: "pkt-header-menu pkt-header-menu--open",
|
|
7692
7696
|
children: /* @__PURE__ */ _("p", {
|
|
@@ -7731,8 +7735,8 @@ var Fo = "pkt-header-global-menu", Io = "pkt-header-global-menu-toggle", Lo = "p
|
|
|
7731
7735
|
zo.displayName = "PktHeaderGlobal";
|
|
7732
7736
|
//#endregion
|
|
7733
7737
|
//#region src/components/textinput/Textinput.tsx
|
|
7734
|
-
var Bo = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, autocomplete: r = "off", counter: i, hasFieldset: a, counterMaxLength: o, className: s, disabled: c = !1, errorMessage: l, hasError: u = !1, helptext: d, helptextDropdown: f, helptextDropdownButton: p, iconNameRight: h, inline: g = !1, fullwidth: y = !1, label: b, name: x, optionalTag: S = !1, optionalText: C, requiredTag: w = !1, requiredText: T, tagText: E = null, placeholder: D, prefix: O, suffix: k, type: A = "text", useWrapper:
|
|
7735
|
-
let V = i ?? (o ?? 0) > 0, ce = [s, "pkt-textinput"].filter(Boolean).join(" "), le = A === "search" && !h && !
|
|
7738
|
+
var Bo = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, autocomplete: r = "off", counter: i, hasFieldset: a, counterMaxLength: o, className: s, disabled: c = !1, errorMessage: l, hasError: u = !1, helptext: d, helptextDropdown: f, helptextDropdownButton: p, iconNameRight: h, inline: g = !1, fullwidth: y = !1, label: b, name: x, optionalTag: S = !1, optionalText: C, requiredTag: w = !1, requiredText: T, tagText: E = null, placeholder: D, prefix: O, suffix: k, type: A = "text", useWrapper: j = !0, omitSearchIcon: M = !1, value: N, minLength: P, maxLength: ee, min: te, max: F, step: I, size: ne, readonly: re, required: ie, dataTestid: ae, onChange: oe, skipForwardTestid: L = !1, inputSize: R = "medium", strings: z, ...se }, B) => {
|
|
7739
|
+
let V = i ?? (o ?? 0) > 0, ce = [s, "pkt-textinput"].filter(Boolean).join(" "), le = A === "search" && !h && !M, ue = A === "date" && N ? N.slice(0, 10) : N, [H, U] = m(0), W = N === void 0 ? H : N?.length || 0, K = rr(e), q = `${K}`, de = `${q}-label`, fe = n || de, pe = (e) => {
|
|
7736
7740
|
V && U(e.currentTarget?.value?.length || 0), oe && oe(e);
|
|
7737
7741
|
};
|
|
7738
7742
|
return /* @__PURE__ */ _("div", {
|
|
@@ -7754,7 +7758,7 @@ var Bo = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, autocomplete: r = "o
|
|
|
7754
7758
|
requiredTag: w,
|
|
7755
7759
|
requiredText: T,
|
|
7756
7760
|
tagText: E,
|
|
7757
|
-
useWrapper:
|
|
7761
|
+
useWrapper: j,
|
|
7758
7762
|
counter: V,
|
|
7759
7763
|
counterCurrent: W,
|
|
7760
7764
|
counterMaxLength: o,
|
|
@@ -7793,8 +7797,8 @@ var Bo = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, autocomplete: r = "o
|
|
|
7793
7797
|
max: F,
|
|
7794
7798
|
onChange: pe,
|
|
7795
7799
|
step: I,
|
|
7796
|
-
minLength:
|
|
7797
|
-
maxLength:
|
|
7800
|
+
minLength: P,
|
|
7801
|
+
maxLength: ee,
|
|
7798
7802
|
size: ne,
|
|
7799
7803
|
readOnly: re,
|
|
7800
7804
|
required: ie
|
|
@@ -7831,7 +7835,7 @@ Bo.displayName = "PktTextinput";
|
|
|
7831
7835
|
//#region src/components/header/HeaderService.tsx
|
|
7832
7836
|
var Vo = "https://punkt-cdn.oslo.kommune.no/latest/logos/";
|
|
7833
7837
|
typeof window < "u" && (window.pktLogoPath = window.pktLogoPath || Vo);
|
|
7834
|
-
var Ho = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n, className: r, compact: i = !1, "data-mode": a, logOutButtonPlacement: s = "none", logOut: l, openedMenu: u, showSearch: d = !1, onSearch: h, onSearchChange: y, searchValue: b, searchPlaceholder: x, representing: S, serviceLink: C, serviceClick: w, serviceName: T, user: E, userMenu: D, userMenuFooter: O, userOptions: k, canChangeRepresentation: A = !1, changeRepresentation:
|
|
7838
|
+
var Ho = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n, className: r, compact: i = !1, "data-mode": a, logOutButtonPlacement: s = "none", logOut: l, openedMenu: u, showSearch: d = !1, onSearch: h, onSearchChange: y, searchValue: b, searchPlaceholder: x, representing: S, serviceLink: C, serviceClick: w, serviceName: T, user: E, userMenu: D, userMenuFooter: O, userOptions: k, canChangeRepresentation: A = !1, changeRepresentation: j, hideLogo: M = !1, logoLink: P = N, logoClick: ee, logoPath: te = typeof window < "u" ? window.pktLogoPath : Vo, position: F = "fixed", scrollBehavior: I = "hide", slotMenuVariant: ne = "icon-only", slotMenuText: re, strings: ie }, ae) => {
|
|
7835
7839
|
let oe = I === "hide";
|
|
7836
7840
|
c(() => {
|
|
7837
7841
|
O && console.warn("PktHeaderService: The \"userMenuFooter\" prop is deprecated and will be removed in a future version. Please use \"userMenu\" instead.");
|
|
@@ -7915,12 +7919,12 @@ var Ho = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
|
|
|
7915
7919
|
children: [
|
|
7916
7920
|
/* @__PURE__ */ v("div", {
|
|
7917
7921
|
className: (0, L.default)("pkt-header-service__logo-area", (!T || T === "") && "pkt-header-service__logo-area--without-service"),
|
|
7918
|
-
children: [!
|
|
7922
|
+
children: [!M && (P ? /* @__PURE__ */ _("span", {
|
|
7919
7923
|
className: "pkt-header-service__logo",
|
|
7920
7924
|
children: /* @__PURE__ */ _("a", {
|
|
7921
|
-
href:
|
|
7925
|
+
href: P,
|
|
7922
7926
|
"aria-label": R.logoLabel,
|
|
7923
|
-
onClick:
|
|
7927
|
+
onClick: ee,
|
|
7924
7928
|
children: /* @__PURE__ */ _(G, {
|
|
7925
7929
|
name: "oslologo",
|
|
7926
7930
|
"aria-hidden": "true",
|
|
@@ -8072,7 +8076,7 @@ var Ho = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
|
|
|
8072
8076
|
representing: S,
|
|
8073
8077
|
userMenu: D,
|
|
8074
8078
|
canChangeRepresentation: A,
|
|
8075
|
-
changeRepresentation:
|
|
8079
|
+
changeRepresentation: j,
|
|
8076
8080
|
logoutOnClick: s === "userMenu" || s === "both" ? l : void 0
|
|
8077
8081
|
})
|
|
8078
8082
|
})]
|
|
@@ -8234,12 +8238,12 @@ var Jo = ({ children: e, className: t, skin: n = ie.skin, title: i, compact: a =
|
|
|
8234
8238
|
Jo.displayName = "PktMessagebox";
|
|
8235
8239
|
//#endregion
|
|
8236
8240
|
//#region src/components/radiogroup/RadioGroupContext.ts
|
|
8237
|
-
var Yo = n(null), Xo = () => s(Yo), Zo = i(({ id: e, name: t, label: n, className: r, hasTile: i =
|
|
8238
|
-
let D = De(["forms"], y), O = rr(e), k = Xo(), A = x ?? "on",
|
|
8241
|
+
var Yo = n(null), Xo = () => s(Yo), Zo = i(({ id: e, name: t, label: n, className: r, hasTile: i = te.hasTile, inputSize: a, disabled: o = te.disabled, checkHelptext: s, hasError: l = te.hasError, defaultChecked: u, checked: d, optionalTag: f, optionalText: p, requiredTag: m, requiredText: h, strings: y, tagText: b, value: x, required: S, onChange: C, "aria-describedby": w, ...T }, E) => {
|
|
8242
|
+
let D = De(["forms"], y), O = rr(e), k = Xo(), A = x ?? "on", j = k?.value, M = j !== void 0, N = M ? j === A : d, P = u ?? (k?.defaultValue === void 0 ? void 0 : k.defaultValue === A), ee = i || !!k?.hasTile, F = l || !!k?.hasError, I = o || !!k?.disabled;
|
|
8239
8243
|
c(() => {
|
|
8240
|
-
|
|
8244
|
+
M && d !== void 0 && console.warn(`PktRadioButton (${O}): checked ignoreres når PktRadioGroup har value. Styr valget med value på gruppen.`);
|
|
8241
8245
|
}, [
|
|
8242
|
-
|
|
8246
|
+
M,
|
|
8243
8247
|
d,
|
|
8244
8248
|
O
|
|
8245
8249
|
]);
|
|
@@ -8251,9 +8255,9 @@ var Yo = n(null), Xo = () => s(Yo), Zo = i(({ id: e, name: t, label: n, classNam
|
|
|
8251
8255
|
a ? `pkt-input-check--${a}` : ""
|
|
8252
8256
|
].filter(Boolean).join(" "), ie = [
|
|
8253
8257
|
"pkt-input-check__input",
|
|
8254
|
-
|
|
8255
|
-
I &&
|
|
8256
|
-
].filter(Boolean).join(" "), ae = ["pkt-input-check__input-checkbox",
|
|
8258
|
+
ee ? "pkt-input-check__input--tile" : "",
|
|
8259
|
+
I && ee ? "pkt-input-check__input--tile-disabled" : ""
|
|
8260
|
+
].filter(Boolean).join(" "), ae = ["pkt-input-check__input-checkbox", F ? "pkt-input-check__input-checkbox--error" : ""].filter(Boolean).join(" "), oe = ["pkt-input-check__input-label", I ? "pkt-input-check__input-label--disabled" : ""].filter(Boolean).join(" "), L = [
|
|
8257
8261
|
"pkt-tag",
|
|
8258
8262
|
"pkt-tag--small",
|
|
8259
8263
|
"pkt-tag--thin-text"
|
|
@@ -8286,7 +8290,7 @@ var Yo = n(null), Xo = () => s(Yo), Zo = i(({ id: e, name: t, label: n, classNam
|
|
|
8286
8290
|
className: ae,
|
|
8287
8291
|
"aria-labelledby": n ? z : void 0,
|
|
8288
8292
|
"aria-describedby": B,
|
|
8289
|
-
...
|
|
8293
|
+
...N === void 0 ? { defaultChecked: P } : { checked: N },
|
|
8290
8294
|
onChange: k ? ne : C,
|
|
8291
8295
|
...T
|
|
8292
8296
|
}), /* @__PURE__ */ v("label", {
|
|
@@ -8311,42 +8315,42 @@ var Yo = n(null), Xo = () => s(Yo), Zo = i(({ id: e, name: t, label: n, classNam
|
|
|
8311
8315
|
Zo.displayName = "PktRadioButton";
|
|
8312
8316
|
//#endregion
|
|
8313
8317
|
//#region src/components/radiogroup/RadioGroup.tsx
|
|
8314
|
-
var Qo = i(({ id: e, name: t, label: n, helptext: r, helptextDropdown: i, helptextDropdownButton: a, value: o, defaultValue: s, layout: c =
|
|
8315
|
-
let
|
|
8318
|
+
var Qo = i(({ id: e, name: t, label: n, helptext: r, helptextDropdown: i, helptextDropdownButton: a, value: o, defaultValue: s, layout: c = F.layout, inputSize: l = F.inputSize, hasTile: u = F.hasTile, required: d = F.required, disabled: p = F.disabled, hasError: m = F.hasError, errorMessage: h, useWrapper: g = F.useWrapper, optionalTag: v = F.optionalTag, optionalText: y, requiredTag: b = F.requiredTag, requiredText: x, tagText: S, strings: C, className: w, children: T, onChange: E, onValueChange: D, onFocus: O, onBlur: k }, A) => {
|
|
8319
|
+
let j = rr(e), M = t || j, N = cr({
|
|
8316
8320
|
type: "radio",
|
|
8317
|
-
name:
|
|
8321
|
+
name: M,
|
|
8318
8322
|
forwardedRef: A,
|
|
8319
8323
|
onChange: E,
|
|
8320
8324
|
onValueChange: D,
|
|
8321
8325
|
onFocus: O,
|
|
8322
8326
|
onBlur: k
|
|
8323
|
-
}),
|
|
8324
|
-
name:
|
|
8327
|
+
}), P = f(() => ({
|
|
8328
|
+
name: M,
|
|
8325
8329
|
hasTile: u,
|
|
8326
8330
|
hasError: m,
|
|
8327
8331
|
disabled: p,
|
|
8328
8332
|
required: d,
|
|
8329
8333
|
value: o,
|
|
8330
8334
|
defaultValue: s,
|
|
8331
|
-
onOptionChange:
|
|
8335
|
+
onOptionChange: N.onOptionChange
|
|
8332
8336
|
}), [
|
|
8333
|
-
|
|
8337
|
+
M,
|
|
8334
8338
|
u,
|
|
8335
8339
|
m,
|
|
8336
8340
|
p,
|
|
8337
8341
|
d,
|
|
8338
8342
|
o,
|
|
8339
8343
|
s,
|
|
8340
|
-
|
|
8344
|
+
N
|
|
8341
8345
|
]);
|
|
8342
8346
|
return /* @__PURE__ */ _(Yo.Provider, {
|
|
8343
|
-
value:
|
|
8347
|
+
value: P,
|
|
8344
8348
|
children: /* @__PURE__ */ _(gr, {
|
|
8345
|
-
ref:
|
|
8346
|
-
onFocus:
|
|
8347
|
-
onBlur:
|
|
8349
|
+
ref: N.mergedRef,
|
|
8350
|
+
onFocus: N.onRootFocus,
|
|
8351
|
+
onBlur: N.onRootBlur,
|
|
8348
8352
|
id: e,
|
|
8349
|
-
forId:
|
|
8353
|
+
forId: j,
|
|
8350
8354
|
className: w,
|
|
8351
8355
|
label: n,
|
|
8352
8356
|
helptext: r,
|
|
@@ -8737,7 +8741,7 @@ function ws(e) {
|
|
|
8737
8741
|
return e === 3600 || e < 3600 && 3600 % e == 0 && e % 60 == 0;
|
|
8738
8742
|
}
|
|
8739
8743
|
function Ts(e, t) {
|
|
8740
|
-
let { id: n, label: r, value: i, defaultValue: a, min: s, max: l, step: h = 60, hidePicker: g = !1, stepArrows: _ = !1, fullwidth: v = !1, name: y, form: b, disabled: x = !1, required: S = !1, helptext: C, helptextDropdown: w, helptextDropdownButton: T, hasError: E = !1, errorMessage: D, optionalTag: O = !1, optionalText: k, requiredTag: A = !1, requiredText:
|
|
8744
|
+
let { id: n, label: r, value: i, defaultValue: a, min: s, max: l, step: h = 60, hidePicker: g = !1, stepArrows: _ = !1, fullwidth: v = !1, name: y, form: b, disabled: x = !1, required: S = !1, helptext: C, helptextDropdown: w, helptextDropdownButton: T, hasError: E = !1, errorMessage: D, optionalTag: O = !1, optionalText: k, requiredTag: A = !1, requiredText: j, tagText: M, inline: N = !1, useWrapper: P = !0, ariaDescribedby: ee, strings: te, className: F, inputSize: I = "medium", onValueChange: ne, onFocus: re, onBlur: ie } = e, ae = De(["timepicker", "validation"], te), oe = ae.timepicker, L = te, R = i !== void 0, z = i === void 0 ? a ?? "" : i ?? "", se = p(z), [B, V] = m(() => z), ce = R ? i ?? "" : B, [le, ue] = m(() => xs(i === void 0 ? a : i)[0]), [H, U] = m(() => xs(i === void 0 ? a : i)[1]), W = p(le), G = p(H), K = o((e) => {
|
|
8741
8745
|
W.current = e, ue(e);
|
|
8742
8746
|
}, []), q = o((e) => {
|
|
8743
8747
|
G.current = e, U(e);
|
|
@@ -9135,11 +9139,11 @@ function Ts(e, t) {
|
|
|
9135
9139
|
optionalTag: O,
|
|
9136
9140
|
optionalText: k,
|
|
9137
9141
|
requiredTag: A,
|
|
9138
|
-
requiredText:
|
|
9139
|
-
tagText:
|
|
9140
|
-
inline:
|
|
9141
|
-
useWrapper:
|
|
9142
|
-
ariaDescribedby:
|
|
9142
|
+
requiredText: j,
|
|
9143
|
+
tagText: M,
|
|
9144
|
+
inline: N,
|
|
9145
|
+
useWrapper: P,
|
|
9146
|
+
ariaDescribedby: ee,
|
|
9143
9147
|
hidePicker: g,
|
|
9144
9148
|
stepArrows: _,
|
|
9145
9149
|
min: s,
|
|
@@ -9393,4 +9397,4 @@ var Es = i((e, t) => {
|
|
|
9393
9397
|
});
|
|
9394
9398
|
Es.displayName = "PktTimepicker";
|
|
9395
9399
|
//#endregion
|
|
9396
|
-
export { Li as FileItem, za as ItemRenderers,
|
|
9400
|
+
export { Li as FileItem, za as ItemRenderers, j as PktAccordion, K as PktAccordionItem, Oe as PktAlert, ke as PktBackLink, Me as PktBreadcrumbs, Q as PktButton, Yn as PktCalendar, er as PktCard, or as PktCheckbox, _r as PktCheckboxGroup, Gr as PktCombobox, Xr as PktConsent, di as PktDatepicker, Ba as PktFileUpload, po as PktFooter, ho as PktFooterSimple, Uo as PktHeader, zo as PktHeaderGlobal, yo as PktHeaderMenu, Ho as PktHeaderService, Qn as PktHeading, hr as PktHelptext, G as PktIcon, Wo as PktInput, gr as PktInputWrapper, Oo as PktLink, Go as PktLinkCard, qo as PktLoader, Jo as PktMessagebox, ga as PktModal, aa as PktProgressbar, Zo as PktRadioButton, Qo as PktRadioGroup, No as PktSearchInput, $o as PktSelect, rs as PktStep, is as PktStepper, Ee as PktStringsProvider, ds as PktTabItem, as as PktTable, os as PktTableBody, ss as PktTableDataCell, cs as PktTableHeader, ls as PktTableHeaderCell, us as PktTableRow, ms as PktTabs, $n as PktTag, Vi as PktTextarea, Bo as PktTextinput, Es as PktTimepicker, ve as getPktStrings, q as pktStringsNb, Y as resetPktStrings, _e as setPktStrings, ye as subscribePktStrings };
|