@oslokommune/punkt-react 8.0.7 → 8.0.9
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/dist/punkt-react.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as g from "react";
|
|
2
|
-
import K, { useState as ue, useEffect as yt, forwardRef as z, useRef as
|
|
2
|
+
import K, { useState as ue, useEffect as yt, forwardRef as z, useRef as on } from "react";
|
|
3
3
|
function sn(e) {
|
|
4
4
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
5
5
|
}
|
|
@@ -18,12 +18,12 @@ function cn() {
|
|
|
18
18
|
if (kt)
|
|
19
19
|
return se;
|
|
20
20
|
kt = 1;
|
|
21
|
-
var e = K, n = Symbol.for("react.element"), r = Symbol.for("react.fragment"),
|
|
21
|
+
var e = K, n = Symbol.for("react.element"), r = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
22
22
|
function s(c, f, d) {
|
|
23
23
|
var h, _ = {}, w = null, C = null;
|
|
24
24
|
d !== void 0 && (w = "" + d), f.key !== void 0 && (w = "" + f.key), f.ref !== void 0 && (C = f.ref);
|
|
25
25
|
for (h in f)
|
|
26
|
-
|
|
26
|
+
o.call(f, h) && !i.hasOwnProperty(h) && (_[h] = f[h]);
|
|
27
27
|
if (c && c.defaultProps)
|
|
28
28
|
for (h in f = c.defaultProps, f)
|
|
29
29
|
_[h] === void 0 && (_[h] = f[h]);
|
|
@@ -44,14 +44,14 @@ var ce = {};
|
|
|
44
44
|
var vt;
|
|
45
45
|
function un() {
|
|
46
46
|
return vt || (vt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
|
-
var e = K, n = Symbol.for("react.element"), r = Symbol.for("react.portal"),
|
|
47
|
+
var e = K, n = Symbol.for("react.element"), r = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), c = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), P = Symbol.iterator, R = "@@iterator";
|
|
48
48
|
function T(t) {
|
|
49
49
|
if (t === null || typeof t != "object")
|
|
50
50
|
return null;
|
|
51
|
-
var u =
|
|
51
|
+
var u = P && t[P] || t[R];
|
|
52
52
|
return typeof u == "function" ? u : null;
|
|
53
53
|
}
|
|
54
|
-
var
|
|
54
|
+
var O = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
55
55
|
function b(t) {
|
|
56
56
|
{
|
|
57
57
|
for (var u = arguments.length, p = new Array(u > 1 ? u - 1 : 0), k = 1; k < u; k++)
|
|
@@ -61,18 +61,18 @@ function un() {
|
|
|
61
61
|
}
|
|
62
62
|
function $(t, u, p) {
|
|
63
63
|
{
|
|
64
|
-
var k =
|
|
64
|
+
var k = O.ReactDebugCurrentFrame, x = k.getStackAddendum();
|
|
65
65
|
x !== "" && (u += "%s", p = p.concat([x]));
|
|
66
|
-
var
|
|
66
|
+
var S = p.map(function(E) {
|
|
67
67
|
return String(E);
|
|
68
68
|
});
|
|
69
|
-
|
|
69
|
+
S.unshift("Warning: " + u), Function.prototype.apply.call(console[t], console, S);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
var A = !1, V = !1, I = !1, J = !1, H = !1, M;
|
|
73
73
|
M = Symbol.for("react.module.reference");
|
|
74
74
|
function W(t) {
|
|
75
|
-
return !!(typeof t == "string" || typeof t == "function" || t ===
|
|
75
|
+
return !!(typeof t == "string" || typeof t == "function" || t === o || t === i || H || t === a || t === d || t === h || J || t === C || A || V || I || typeof t == "object" && t !== null && (t.$$typeof === w || t.$$typeof === _ || t.$$typeof === s || t.$$typeof === c || t.$$typeof === f || // This needs to include all possible module reference object
|
|
76
76
|
// types supported by any Flight configuration anywhere since
|
|
77
77
|
// we don't know which Flight build this will end up being used
|
|
78
78
|
// with.
|
|
@@ -96,7 +96,7 @@ function un() {
|
|
|
96
96
|
if (typeof t == "string")
|
|
97
97
|
return t;
|
|
98
98
|
switch (t) {
|
|
99
|
-
case
|
|
99
|
+
case o:
|
|
100
100
|
return "Fragment";
|
|
101
101
|
case r:
|
|
102
102
|
return "Portal";
|
|
@@ -123,9 +123,9 @@ function un() {
|
|
|
123
123
|
var k = t.displayName || null;
|
|
124
124
|
return k !== null ? k : j(t.type) || "Memo";
|
|
125
125
|
case w: {
|
|
126
|
-
var x = t,
|
|
126
|
+
var x = t, S = x._payload, E = x._init;
|
|
127
127
|
try {
|
|
128
|
-
return j(E(
|
|
128
|
+
return j(E(S));
|
|
129
129
|
} catch {
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
@@ -133,14 +133,14 @@ function un() {
|
|
|
133
133
|
}
|
|
134
134
|
return null;
|
|
135
135
|
}
|
|
136
|
-
var B = Object.assign, te = 0, Z, Q,
|
|
136
|
+
var B = Object.assign, te = 0, Z, Q, oe, Xe, Ze, Qe, et;
|
|
137
137
|
function tt() {
|
|
138
138
|
}
|
|
139
139
|
tt.__reactDisabledLog = !0;
|
|
140
140
|
function $t() {
|
|
141
141
|
{
|
|
142
142
|
if (te === 0) {
|
|
143
|
-
Z = console.log, Q = console.info,
|
|
143
|
+
Z = console.log, Q = console.info, oe = console.warn, Xe = console.error, Ze = console.group, Qe = console.groupCollapsed, et = console.groupEnd;
|
|
144
144
|
var t = {
|
|
145
145
|
configurable: !0,
|
|
146
146
|
enumerable: !0,
|
|
@@ -176,7 +176,7 @@ function un() {
|
|
|
176
176
|
value: Q
|
|
177
177
|
}),
|
|
178
178
|
warn: B({}, t, {
|
|
179
|
-
value:
|
|
179
|
+
value: oe
|
|
180
180
|
}),
|
|
181
181
|
error: B({}, t, {
|
|
182
182
|
value: Xe
|
|
@@ -195,7 +195,7 @@ function un() {
|
|
|
195
195
|
te < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
var Re =
|
|
198
|
+
var Re = O.ReactCurrentDispatcher, Pe;
|
|
199
199
|
function pe(t, u, p) {
|
|
200
200
|
{
|
|
201
201
|
if (Pe === void 0)
|
|
@@ -226,8 +226,8 @@ function un() {
|
|
|
226
226
|
Se = !0;
|
|
227
227
|
var x = Error.prepareStackTrace;
|
|
228
228
|
Error.prepareStackTrace = void 0;
|
|
229
|
-
var
|
|
230
|
-
|
|
229
|
+
var S;
|
|
230
|
+
S = Re.current, Re.current = null, $t();
|
|
231
231
|
try {
|
|
232
232
|
if (u) {
|
|
233
233
|
var E = function() {
|
|
@@ -280,7 +280,7 @@ function un() {
|
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
} finally {
|
|
283
|
-
Se = !1, Re.current =
|
|
283
|
+
Se = !1, Re.current = S, Ft(), Error.prepareStackTrace = x;
|
|
284
284
|
}
|
|
285
285
|
var ae = t ? t.displayName || t.name : "", ht = ae ? pe(ae) : "";
|
|
286
286
|
return typeof t == "function" && de.set(t, ht), ht;
|
|
@@ -312,16 +312,16 @@ function un() {
|
|
|
312
312
|
case _:
|
|
313
313
|
return me(t.type, u, p);
|
|
314
314
|
case w: {
|
|
315
|
-
var k = t, x = k._payload,
|
|
315
|
+
var k = t, x = k._payload, S = k._init;
|
|
316
316
|
try {
|
|
317
|
-
return me(
|
|
317
|
+
return me(S(x), u, p);
|
|
318
318
|
} catch {
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
return "";
|
|
323
323
|
}
|
|
324
|
-
var he = Object.prototype.hasOwnProperty, rt = {}, at =
|
|
324
|
+
var he = Object.prototype.hasOwnProperty, rt = {}, at = O.ReactDebugCurrentFrame;
|
|
325
325
|
function ke(t) {
|
|
326
326
|
if (t) {
|
|
327
327
|
var u = t._owner, p = me(t.type, t._source, u ? u.type : null);
|
|
@@ -331,9 +331,9 @@ function un() {
|
|
|
331
331
|
}
|
|
332
332
|
function Vt(t, u, p, k, x) {
|
|
333
333
|
{
|
|
334
|
-
var
|
|
334
|
+
var S = Function.call.bind(he);
|
|
335
335
|
for (var E in t)
|
|
336
|
-
if (
|
|
336
|
+
if (S(t, E)) {
|
|
337
337
|
var N = void 0;
|
|
338
338
|
try {
|
|
339
339
|
if (typeof t[E] != "function") {
|
|
@@ -360,19 +360,19 @@ function un() {
|
|
|
360
360
|
}
|
|
361
361
|
function Mt(t) {
|
|
362
362
|
try {
|
|
363
|
-
return
|
|
363
|
+
return lt(t), !1;
|
|
364
364
|
} catch {
|
|
365
365
|
return !0;
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function lt(t) {
|
|
369
369
|
return "" + t;
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function ot(t) {
|
|
372
372
|
if (Mt(t))
|
|
373
|
-
return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Bt(t)),
|
|
373
|
+
return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Bt(t)), lt(t);
|
|
374
374
|
}
|
|
375
|
-
var ie =
|
|
375
|
+
var ie = O.ReactCurrentOwner, Yt = {
|
|
376
376
|
key: !0,
|
|
377
377
|
ref: !0,
|
|
378
378
|
__self: !0,
|
|
@@ -423,7 +423,7 @@ function un() {
|
|
|
423
423
|
});
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
-
var qt = function(t, u, p, k, x,
|
|
426
|
+
var qt = function(t, u, p, k, x, S, E) {
|
|
427
427
|
var N = {
|
|
428
428
|
// This tag allows us to uniquely identify this as a React Element
|
|
429
429
|
$$typeof: n,
|
|
@@ -433,7 +433,7 @@ function un() {
|
|
|
433
433
|
ref: p,
|
|
434
434
|
props: E,
|
|
435
435
|
// Record the component responsible for creating this element.
|
|
436
|
-
_owner:
|
|
436
|
+
_owner: S
|
|
437
437
|
};
|
|
438
438
|
return N._store = {}, Object.defineProperty(N._store, "validated", {
|
|
439
439
|
configurable: !1,
|
|
@@ -454,14 +454,14 @@ function un() {
|
|
|
454
454
|
};
|
|
455
455
|
function Xt(t, u, p, k, x) {
|
|
456
456
|
{
|
|
457
|
-
var
|
|
458
|
-
p !== void 0 && (
|
|
459
|
-
for (
|
|
460
|
-
he.call(u,
|
|
457
|
+
var S, E = {}, N = null, U = null;
|
|
458
|
+
p !== void 0 && (ot(p), N = "" + p), Ht(u) && (ot(u.key), N = "" + u.key), Jt(u) && (U = u.ref, zt(u, x));
|
|
459
|
+
for (S in u)
|
|
460
|
+
he.call(u, S) && !Yt.hasOwnProperty(S) && (E[S] = u[S]);
|
|
461
461
|
if (t && t.defaultProps) {
|
|
462
462
|
var D = t.defaultProps;
|
|
463
|
-
for (
|
|
464
|
-
E[
|
|
463
|
+
for (S in D)
|
|
464
|
+
E[S] === void 0 && (E[S] = D[S]);
|
|
465
465
|
}
|
|
466
466
|
if (N || U) {
|
|
467
467
|
var L = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
|
|
@@ -470,7 +470,7 @@ function un() {
|
|
|
470
470
|
return qt(t, N, U, x, k, ie.current, E);
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
-
var je =
|
|
473
|
+
var je = O.ReactCurrentOwner, ct = O.ReactDebugCurrentFrame;
|
|
474
474
|
function re(t) {
|
|
475
475
|
if (t) {
|
|
476
476
|
var u = t._owner, p = me(t.type, t._source, u ? u.type : null);
|
|
@@ -546,7 +546,7 @@ Check the top-level render call using <` + p + ">.");
|
|
|
546
546
|
else if (t) {
|
|
547
547
|
var x = T(t);
|
|
548
548
|
if (typeof x == "function" && x !== t.entries)
|
|
549
|
-
for (var
|
|
549
|
+
for (var S = x.call(t), E; !(E = S.next()).done; )
|
|
550
550
|
Le(E.value) && pt(E.value, u);
|
|
551
551
|
}
|
|
552
552
|
}
|
|
@@ -588,7 +588,7 @@ Check the top-level render call using <` + p + ">.");
|
|
|
588
588
|
t.ref !== null && (re(t), b("Invalid attribute `ref` supplied to `React.Fragment`."), re(null));
|
|
589
589
|
}
|
|
590
590
|
}
|
|
591
|
-
function mt(t, u, p, k, x,
|
|
591
|
+
function mt(t, u, p, k, x, S) {
|
|
592
592
|
{
|
|
593
593
|
var E = W(t);
|
|
594
594
|
if (!E) {
|
|
@@ -599,7 +599,7 @@ Check the top-level render call using <` + p + ">.");
|
|
|
599
599
|
var D;
|
|
600
600
|
t === null ? D = "null" : Oe(t) ? D = "array" : t !== void 0 && t.$$typeof === n ? (D = "<" + (j(t.type) || "Unknown") + " />", N = " Did you accidentally export a JSX literal instead of a component?") : D = typeof t, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, N);
|
|
601
601
|
}
|
|
602
|
-
var L = Xt(t, u, p, x,
|
|
602
|
+
var L = Xt(t, u, p, x, S);
|
|
603
603
|
if (L == null)
|
|
604
604
|
return L;
|
|
605
605
|
if (E) {
|
|
@@ -615,7 +615,7 @@ Check the top-level render call using <` + p + ">.");
|
|
|
615
615
|
else
|
|
616
616
|
dt(Y, t);
|
|
617
617
|
}
|
|
618
|
-
return t ===
|
|
618
|
+
return t === o ? tn(L) : en(L), L;
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
621
|
function nn(t, u, p) {
|
|
@@ -624,28 +624,28 @@ Check the top-level render call using <` + p + ">.");
|
|
|
624
624
|
function rn(t, u, p) {
|
|
625
625
|
return mt(t, u, p, !1);
|
|
626
626
|
}
|
|
627
|
-
var an = rn,
|
|
628
|
-
ce.Fragment =
|
|
627
|
+
var an = rn, ln = nn;
|
|
628
|
+
ce.Fragment = o, ce.jsx = an, ce.jsxs = ln;
|
|
629
629
|
}()), ce;
|
|
630
630
|
}
|
|
631
631
|
process.env.NODE_ENV === "production" ? Ae.exports = cn() : Ae.exports = un();
|
|
632
632
|
var Je = Ae.exports;
|
|
633
|
-
const X = Je.Fragment,
|
|
633
|
+
const X = Je.Fragment, l = Je.jsx, m = Je.jsxs, $e = {}, fn = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';
|
|
634
634
|
function pn(e, n) {
|
|
635
635
|
return !$e[e] && typeof window.fetch == "function" && ($e[e] = window.fetch(n + e + ".svg").then((r) => r.ok ? r.text() : (console.error("Missing icon: " + n + e + ".svg"), fn)).then((r) => r)), Promise.resolve($e[e]);
|
|
636
636
|
}
|
|
637
|
-
const y = ({ name: e, path: n, className: r = "", ...
|
|
637
|
+
const y = ({ name: e, path: n, className: r = "", ...o }) => {
|
|
638
638
|
const a = "https://punkt-cdn.oslo.kommune.no/8.0/icons/", [i, s] = ue(null);
|
|
639
639
|
return yt(() => {
|
|
640
640
|
if (!e)
|
|
641
641
|
return;
|
|
642
642
|
pn(e, n || a).then((f) => s(f));
|
|
643
|
-
}, [e, n, a]), i ? /* @__PURE__ */
|
|
643
|
+
}, [e, n, a]), i ? /* @__PURE__ */ l(
|
|
644
644
|
"span",
|
|
645
645
|
{
|
|
646
646
|
className: `pkt-icon ${r}`,
|
|
647
647
|
dangerouslySetInnerHTML: { __html: i },
|
|
648
|
-
...
|
|
648
|
+
...o
|
|
649
649
|
}
|
|
650
650
|
) : null;
|
|
651
651
|
}, dn = z(
|
|
@@ -653,37 +653,43 @@ const y = ({ name: e, path: n, className: r = "", ...l }) => {
|
|
|
653
653
|
children: e,
|
|
654
654
|
className: n,
|
|
655
655
|
skin: r = "info",
|
|
656
|
-
closeAlert:
|
|
656
|
+
closeAlert: o = !1,
|
|
657
657
|
onClose: a,
|
|
658
658
|
title: i,
|
|
659
659
|
date: s,
|
|
660
660
|
ariaLive: c = "polite",
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
661
|
+
slim: f = !1,
|
|
662
|
+
...d
|
|
663
|
+
}, h) => {
|
|
664
|
+
const _ = [
|
|
665
|
+
n,
|
|
666
|
+
"pkt-alert",
|
|
667
|
+
r && `pkt-alert--${r}`,
|
|
668
|
+
f && "pkt-alert--slim"
|
|
669
|
+
].filter(Boolean).join(" "), [w, C] = ue(!0), P = () => {
|
|
670
|
+
C(!1), a && a();
|
|
665
671
|
};
|
|
666
|
-
return
|
|
667
|
-
/* @__PURE__ */
|
|
672
|
+
return w ? /* @__PURE__ */ m("div", { ...d, className: _, "aria-live": c, ref: h, children: [
|
|
673
|
+
/* @__PURE__ */ l(
|
|
668
674
|
y,
|
|
669
675
|
{
|
|
670
676
|
className: "pkt-alert__icon",
|
|
671
677
|
name: r === "info" ? "alert-information" : `alert-${r}`
|
|
672
678
|
}
|
|
673
679
|
),
|
|
674
|
-
|
|
680
|
+
o && /* @__PURE__ */ l("div", { className: "pkt-alert__close", children: /* @__PURE__ */ l(
|
|
675
681
|
"button",
|
|
676
682
|
{
|
|
677
683
|
type: "button",
|
|
678
684
|
className: "pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",
|
|
679
685
|
tabIndex: 0,
|
|
680
686
|
"aria-label": "close",
|
|
681
|
-
onClick:
|
|
682
|
-
children: /* @__PURE__ */
|
|
687
|
+
onClick: P,
|
|
688
|
+
children: /* @__PURE__ */ l(y, { name: "close", className: "pkt-btn__icon", "aria-hidden": "true" })
|
|
683
689
|
}
|
|
684
690
|
) }),
|
|
685
|
-
i && /* @__PURE__ */
|
|
686
|
-
/* @__PURE__ */
|
|
691
|
+
i && /* @__PURE__ */ l("div", { className: "pkt-alert__title", children: i }),
|
|
692
|
+
/* @__PURE__ */ l("div", { className: "pkt-alert__text", children: e }),
|
|
687
693
|
s && /* @__PURE__ */ m("div", { className: "pkt-alert__date", children: [
|
|
688
694
|
"Sist oppdatert: ",
|
|
689
695
|
s
|
|
@@ -691,16 +697,16 @@ const y = ({ name: e, path: n, className: r = "", ...l }) => {
|
|
|
691
697
|
] }) : null;
|
|
692
698
|
}
|
|
693
699
|
), nr = z(
|
|
694
|
-
({ href: e, text: n, onClick: r, className:
|
|
700
|
+
({ href: e, text: n, onClick: r, className: o, ...a }, i) => {
|
|
695
701
|
const s = [
|
|
696
|
-
|
|
702
|
+
o,
|
|
697
703
|
"pkt-back-link"
|
|
698
704
|
].filter(Boolean).join(" ");
|
|
699
|
-
return /* @__PURE__ */
|
|
705
|
+
return /* @__PURE__ */ l("nav", { ref: i, className: s, "aria-label": "Gå tilbake et steg", children: /* @__PURE__ */ m("a", { href: e || "/", className: "pkt-link pkt-link--icon-left", onClick: () => {
|
|
700
706
|
r && r();
|
|
701
707
|
}, ...a, children: [
|
|
702
|
-
/* @__PURE__ */
|
|
703
|
-
/* @__PURE__ */
|
|
708
|
+
/* @__PURE__ */ l(y, { className: "pkt-back-link__icon pkt-icon pkt-link__icon", name: "chevron-thin-left", "aria-hidden": "true" }),
|
|
709
|
+
/* @__PURE__ */ l("span", { className: "pkt-back-link__text", children: n || "Forsiden" })
|
|
704
710
|
] }) });
|
|
705
711
|
}
|
|
706
712
|
);
|
|
@@ -718,8 +724,8 @@ function Ue() {
|
|
|
718
724
|
return Ue = Object.assign ? Object.assign.bind() : function(e) {
|
|
719
725
|
for (var n = 1; n < arguments.length; n++) {
|
|
720
726
|
var r = arguments[n];
|
|
721
|
-
for (var
|
|
722
|
-
Object.prototype.hasOwnProperty.call(r,
|
|
727
|
+
for (var o in r)
|
|
728
|
+
Object.prototype.hasOwnProperty.call(r, o) && (e[o] = r[o]);
|
|
723
729
|
}
|
|
724
730
|
return e;
|
|
725
731
|
}, Ue.apply(this, arguments);
|
|
@@ -745,17 +751,17 @@ function Ve(e) {
|
|
|
745
751
|
let {
|
|
746
752
|
pathname: n = "/",
|
|
747
753
|
search: r = "",
|
|
748
|
-
hash:
|
|
754
|
+
hash: o = ""
|
|
749
755
|
} = e;
|
|
750
|
-
return r && r !== "?" && (n += r.charAt(0) === "?" ? r : "?" + r),
|
|
756
|
+
return r && r !== "?" && (n += r.charAt(0) === "?" ? r : "?" + r), o && o !== "#" && (n += o.charAt(0) === "#" ? o : "#" + o), n;
|
|
751
757
|
}
|
|
752
758
|
function Et(e) {
|
|
753
759
|
let n = {};
|
|
754
760
|
if (e) {
|
|
755
761
|
let r = e.indexOf("#");
|
|
756
762
|
r >= 0 && (n.hash = e.substr(r), e = e.substr(0, r));
|
|
757
|
-
let
|
|
758
|
-
|
|
763
|
+
let o = e.indexOf("?");
|
|
764
|
+
o >= 0 && (n.search = e.substr(o), e = e.substr(0, o)), e && (n.pathname = e);
|
|
759
765
|
}
|
|
760
766
|
return n;
|
|
761
767
|
}
|
|
@@ -768,19 +774,19 @@ function We(e, n) {
|
|
|
768
774
|
return e;
|
|
769
775
|
if (!e.toLowerCase().startsWith(n.toLowerCase()))
|
|
770
776
|
return null;
|
|
771
|
-
let r = n.endsWith("/") ? n.length - 1 : n.length,
|
|
772
|
-
return
|
|
777
|
+
let r = n.endsWith("/") ? n.length - 1 : n.length, o = e.charAt(r);
|
|
778
|
+
return o && o !== "/" ? null : e.slice(r) || "/";
|
|
773
779
|
}
|
|
774
780
|
function mn(e, n) {
|
|
775
781
|
n === void 0 && (n = "/");
|
|
776
782
|
let {
|
|
777
783
|
pathname: r,
|
|
778
|
-
search:
|
|
784
|
+
search: o = "",
|
|
779
785
|
hash: a = ""
|
|
780
786
|
} = typeof e == "string" ? Et(e) : e;
|
|
781
787
|
return {
|
|
782
788
|
pathname: r ? r.startsWith("/") ? r : hn(r, n) : n,
|
|
783
|
-
search: kn(
|
|
789
|
+
search: kn(o),
|
|
784
790
|
hash: vn(a)
|
|
785
791
|
};
|
|
786
792
|
}
|
|
@@ -790,18 +796,18 @@ function hn(e, n) {
|
|
|
790
796
|
a === ".." ? r.length > 1 && r.pop() : a !== "." && r.push(a);
|
|
791
797
|
}), r.length > 1 ? r.join("/") : "/";
|
|
792
798
|
}
|
|
793
|
-
function Fe(e, n, r,
|
|
794
|
-
return "Cannot include a '" + e + "' character in a manually specified " + ("`to." + n + "` field [" + JSON.stringify(
|
|
799
|
+
function Fe(e, n, r, o) {
|
|
800
|
+
return "Cannot include a '" + e + "' character in a manually specified " + ("`to." + n + "` field [" + JSON.stringify(o) + "]. Please separate it out to the ") + ("`to." + r + "` field. Alternatively you may provide the full path as ") + 'a string in <Link to="..."> and the router will parse it for you.';
|
|
795
801
|
}
|
|
796
802
|
function wt(e) {
|
|
797
803
|
return e.filter((n, r) => r === 0 || n.route.path && n.route.path.length > 0);
|
|
798
804
|
}
|
|
799
|
-
function xt(e, n, r,
|
|
800
|
-
|
|
805
|
+
function xt(e, n, r, o) {
|
|
806
|
+
o === void 0 && (o = !1);
|
|
801
807
|
let a;
|
|
802
808
|
typeof e == "string" ? a = Et(e) : (a = Ue({}, e), F(!a.pathname || !a.pathname.includes("?"), Fe("?", "pathname", "search", a)), F(!a.pathname || !a.pathname.includes("#"), Fe("#", "pathname", "hash", a)), F(!a.search || !a.search.includes("#"), Fe("#", "search", "hash", a)));
|
|
803
809
|
let i = e === "" || a.pathname === "", s = i ? "/" : a.pathname, c;
|
|
804
|
-
if (
|
|
810
|
+
if (o || s == null)
|
|
805
811
|
c = r;
|
|
806
812
|
else {
|
|
807
813
|
let _ = n.length - 1;
|
|
@@ -834,8 +840,8 @@ function Be() {
|
|
|
834
840
|
return Be = Object.assign ? Object.assign.bind() : function(e) {
|
|
835
841
|
for (var n = 1; n < arguments.length; n++) {
|
|
836
842
|
var r = arguments[n];
|
|
837
|
-
for (var
|
|
838
|
-
Object.prototype.hasOwnProperty.call(r,
|
|
843
|
+
for (var o in r)
|
|
844
|
+
Object.prototype.hasOwnProperty.call(r, o) && (e[o] = r[o]);
|
|
839
845
|
}
|
|
840
846
|
return e;
|
|
841
847
|
}, Be.apply(this, arguments);
|
|
@@ -850,12 +856,12 @@ const ee = /* @__PURE__ */ g.createContext(null);
|
|
|
850
856
|
process.env.NODE_ENV !== "production" && (ee.displayName = "Navigation");
|
|
851
857
|
const ze = /* @__PURE__ */ g.createContext(null);
|
|
852
858
|
process.env.NODE_ENV !== "production" && (ze.displayName = "Location");
|
|
853
|
-
const
|
|
859
|
+
const le = /* @__PURE__ */ g.createContext({
|
|
854
860
|
outlet: null,
|
|
855
861
|
matches: [],
|
|
856
862
|
isDataRoute: !1
|
|
857
863
|
});
|
|
858
|
-
process.env.NODE_ENV !== "production" && (
|
|
864
|
+
process.env.NODE_ENV !== "production" && (le.displayName = "Route");
|
|
859
865
|
const gn = /* @__PURE__ */ g.createContext(null);
|
|
860
866
|
process.env.NODE_ENV !== "production" && (gn.displayName = "RouteError");
|
|
861
867
|
function Nn(e, n) {
|
|
@@ -869,7 +875,7 @@ function Nn(e, n) {
|
|
|
869
875
|
"useHref() may be used only in the context of a <Router> component."
|
|
870
876
|
) : F(!1));
|
|
871
877
|
let {
|
|
872
|
-
basename:
|
|
878
|
+
basename: o,
|
|
873
879
|
navigator: a
|
|
874
880
|
} = g.useContext(ee), {
|
|
875
881
|
hash: i,
|
|
@@ -878,7 +884,7 @@ function Nn(e, n) {
|
|
|
878
884
|
} = xe(e, {
|
|
879
885
|
relative: r
|
|
880
886
|
}), f = s;
|
|
881
|
-
return
|
|
887
|
+
return o !== "/" && (f = s === "/" ? o : He([o, s])), a.createHref({
|
|
882
888
|
pathname: f,
|
|
883
889
|
search: c,
|
|
884
890
|
hash: i
|
|
@@ -902,7 +908,7 @@ function St(e) {
|
|
|
902
908
|
function yn() {
|
|
903
909
|
let {
|
|
904
910
|
isDataRoute: e
|
|
905
|
-
} = g.useContext(
|
|
911
|
+
} = g.useContext(le);
|
|
906
912
|
return e ? Rn() : En();
|
|
907
913
|
}
|
|
908
914
|
function En() {
|
|
@@ -916,10 +922,10 @@ function En() {
|
|
|
916
922
|
basename: n,
|
|
917
923
|
navigator: r
|
|
918
924
|
} = g.useContext(ee), {
|
|
919
|
-
matches:
|
|
920
|
-
} = g.useContext(
|
|
925
|
+
matches: o
|
|
926
|
+
} = g.useContext(le), {
|
|
921
927
|
pathname: a
|
|
922
|
-
} = fe(), i = JSON.stringify(wt(
|
|
928
|
+
} = fe(), i = JSON.stringify(wt(o).map((f) => f.pathnameBase)), s = g.useRef(!1);
|
|
923
929
|
return St(() => {
|
|
924
930
|
s.current = !0;
|
|
925
931
|
}), g.useCallback(function(f, d) {
|
|
@@ -937,10 +943,10 @@ function xe(e, n) {
|
|
|
937
943
|
let {
|
|
938
944
|
relative: r
|
|
939
945
|
} = n === void 0 ? {} : n, {
|
|
940
|
-
matches:
|
|
941
|
-
} = g.useContext(
|
|
946
|
+
matches: o
|
|
947
|
+
} = g.useContext(le), {
|
|
942
948
|
pathname: a
|
|
943
|
-
} = fe(), i = JSON.stringify(wt(
|
|
949
|
+
} = fe(), i = JSON.stringify(wt(o).map((s) => s.pathnameBase));
|
|
944
950
|
return g.useMemo(() => xt(e, JSON.parse(i), a, r === "path"), [e, i, a, r]);
|
|
945
951
|
}
|
|
946
952
|
var Me;
|
|
@@ -959,7 +965,7 @@ function wn(e) {
|
|
|
959
965
|
return n || (process.env.NODE_ENV !== "production" ? F(!1, Ot(e)) : F(!1)), n;
|
|
960
966
|
}
|
|
961
967
|
function xn(e) {
|
|
962
|
-
let n = g.useContext(
|
|
968
|
+
let n = g.useContext(le);
|
|
963
969
|
return n || (process.env.NODE_ENV !== "production" ? F(!1, Ot(e)) : F(!1)), n;
|
|
964
970
|
}
|
|
965
971
|
function Tt(e) {
|
|
@@ -1001,8 +1007,8 @@ function ne() {
|
|
|
1001
1007
|
return ne = Object.assign ? Object.assign.bind() : function(e) {
|
|
1002
1008
|
for (var n = 1; n < arguments.length; n++) {
|
|
1003
1009
|
var r = arguments[n];
|
|
1004
|
-
for (var
|
|
1005
|
-
Object.prototype.hasOwnProperty.call(r,
|
|
1010
|
+
for (var o in r)
|
|
1011
|
+
Object.prototype.hasOwnProperty.call(r, o) && (e[o] = r[o]);
|
|
1006
1012
|
}
|
|
1007
1013
|
return e;
|
|
1008
1014
|
}, ne.apply(this, arguments);
|
|
@@ -1010,9 +1016,9 @@ function ne() {
|
|
|
1010
1016
|
function Ke(e, n) {
|
|
1011
1017
|
if (e == null)
|
|
1012
1018
|
return {};
|
|
1013
|
-
var r = {},
|
|
1014
|
-
for (i = 0; i <
|
|
1015
|
-
a =
|
|
1019
|
+
var r = {}, o = Object.keys(e), a, i;
|
|
1020
|
+
for (i = 0; i < o.length; i++)
|
|
1021
|
+
a = o[i], !(n.indexOf(a) >= 0) && (r[a] = e[a]);
|
|
1016
1022
|
return r;
|
|
1017
1023
|
}
|
|
1018
1024
|
const _e = "get", be = "application/x-www-form-urlencoded";
|
|
@@ -1055,16 +1061,16 @@ function Ie(e) {
|
|
|
1055
1061
|
return e != null && !Ln.has(e) ? (process.env.NODE_ENV !== "production" && Ee(!1, '"' + e + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + be + '"')), null) : e;
|
|
1056
1062
|
}
|
|
1057
1063
|
function $n(e, n) {
|
|
1058
|
-
let r,
|
|
1064
|
+
let r, o, a, i, s;
|
|
1059
1065
|
if (Sn(e)) {
|
|
1060
1066
|
let c = e.getAttribute("action");
|
|
1061
|
-
|
|
1067
|
+
o = c ? We(c, n) : null, r = e.getAttribute("method") || _e, a = Ie(e.getAttribute("enctype")) || be, i = new FormData(e);
|
|
1062
1068
|
} else if (Pn(e) || On(e) && (e.type === "submit" || e.type === "image")) {
|
|
1063
1069
|
let c = e.form;
|
|
1064
1070
|
if (c == null)
|
|
1065
1071
|
throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
|
|
1066
1072
|
let f = e.getAttribute("formaction") || c.getAttribute("action");
|
|
1067
|
-
if (
|
|
1073
|
+
if (o = f ? We(f, n) : null, r = e.getAttribute("formmethod") || c.getAttribute("method") || _e, a = Ie(e.getAttribute("formenctype")) || Ie(c.getAttribute("enctype")) || be, i = new FormData(c, e), !Dn()) {
|
|
1068
1074
|
let {
|
|
1069
1075
|
name: d,
|
|
1070
1076
|
type: h,
|
|
@@ -1079,10 +1085,10 @@ function $n(e, n) {
|
|
|
1079
1085
|
} else {
|
|
1080
1086
|
if (Ce(e))
|
|
1081
1087
|
throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
|
|
1082
|
-
r = _e,
|
|
1088
|
+
r = _e, o = null, a = be, s = e;
|
|
1083
1089
|
}
|
|
1084
1090
|
return i && a === "text/plain" && (s = i, i = void 0), {
|
|
1085
|
-
action:
|
|
1091
|
+
action: o,
|
|
1086
1092
|
method: r.toLowerCase(),
|
|
1087
1093
|
encType: a,
|
|
1088
1094
|
formData: i,
|
|
@@ -1093,7 +1099,7 @@ const Fn = ["onClick", "relative", "reloadDocument", "replace", "state", "target
|
|
|
1093
1099
|
process.env.NODE_ENV;
|
|
1094
1100
|
const Un = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Vn = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ne = /* @__PURE__ */ g.forwardRef(function(n, r) {
|
|
1095
1101
|
let {
|
|
1096
|
-
onClick:
|
|
1102
|
+
onClick: o,
|
|
1097
1103
|
relative: a,
|
|
1098
1104
|
reloadDocument: i,
|
|
1099
1105
|
replace: s,
|
|
@@ -1103,11 +1109,11 @@ const Un = typeof window < "u" && typeof window.document < "u" && typeof window.
|
|
|
1103
1109
|
preventScrollReset: h
|
|
1104
1110
|
} = n, _ = Ke(n, Fn), {
|
|
1105
1111
|
basename: w
|
|
1106
|
-
} = g.useContext(ee), C,
|
|
1112
|
+
} = g.useContext(ee), C, P = !1;
|
|
1107
1113
|
if (typeof d == "string" && Vn.test(d) && (C = d, Un))
|
|
1108
1114
|
try {
|
|
1109
1115
|
let b = new URL(window.location.href), $ = d.startsWith("//") ? new URL(b.protocol + d) : new URL(d), A = We($.pathname, w);
|
|
1110
|
-
$.origin === b.origin && A != null ? d = A + $.search + $.hash :
|
|
1116
|
+
$.origin === b.origin && A != null ? d = A + $.search + $.hash : P = !0;
|
|
1111
1117
|
} catch {
|
|
1112
1118
|
process.env.NODE_ENV !== "production" && Ee(!1, '<Link to="' + d + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.');
|
|
1113
1119
|
}
|
|
@@ -1120,14 +1126,14 @@ const Un = typeof window < "u" && typeof window.document < "u" && typeof window.
|
|
|
1120
1126
|
preventScrollReset: h,
|
|
1121
1127
|
relative: a
|
|
1122
1128
|
});
|
|
1123
|
-
function
|
|
1124
|
-
|
|
1129
|
+
function O(b) {
|
|
1130
|
+
o && o(b), b.defaultPrevented || T(b);
|
|
1125
1131
|
}
|
|
1126
1132
|
return (
|
|
1127
1133
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1128
1134
|
/* @__PURE__ */ g.createElement("a", ne({}, _, {
|
|
1129
1135
|
href: C || R,
|
|
1130
|
-
onClick:
|
|
1136
|
+
onClick: P || i ? o : O,
|
|
1131
1137
|
ref: r,
|
|
1132
1138
|
target: f
|
|
1133
1139
|
}))
|
|
@@ -1136,7 +1142,7 @@ const Un = typeof window < "u" && typeof window.document < "u" && typeof window.
|
|
|
1136
1142
|
process.env.NODE_ENV !== "production" && (Ne.displayName = "Link");
|
|
1137
1143
|
const Wn = /* @__PURE__ */ g.forwardRef(function(n, r) {
|
|
1138
1144
|
let {
|
|
1139
|
-
"aria-current":
|
|
1145
|
+
"aria-current": o = "page",
|
|
1140
1146
|
caseSensitive: a = !1,
|
|
1141
1147
|
className: i = "",
|
|
1142
1148
|
end: s = !1,
|
|
@@ -1146,10 +1152,10 @@ const Wn = /* @__PURE__ */ g.forwardRef(function(n, r) {
|
|
|
1146
1152
|
} = n, h = Ke(n, In), _ = xe(f, {
|
|
1147
1153
|
relative: h.relative
|
|
1148
1154
|
}), w = fe(), C = g.useContext(Rt), {
|
|
1149
|
-
navigator:
|
|
1150
|
-
} = g.useContext(ee), R =
|
|
1151
|
-
a || (T = T.toLowerCase(),
|
|
1152
|
-
let b = T === R || !s && T.startsWith(R) && T.charAt(R.length) === "/", $ =
|
|
1155
|
+
navigator: P
|
|
1156
|
+
} = g.useContext(ee), R = P.encodeLocation ? P.encodeLocation(_).pathname : _.pathname, T = w.pathname, O = C && C.navigation && C.navigation.location ? C.navigation.location.pathname : null;
|
|
1157
|
+
a || (T = T.toLowerCase(), O = O ? O.toLowerCase() : null, R = R.toLowerCase());
|
|
1158
|
+
let b = T === R || !s && T.startsWith(R) && T.charAt(R.length) === "/", $ = O != null && (O === R || !s && O.startsWith(R) && O.charAt(R.length) === "/"), A = b ? o : void 0, V;
|
|
1153
1159
|
typeof i == "function" ? V = i({
|
|
1154
1160
|
isActive: b,
|
|
1155
1161
|
isPending: $
|
|
@@ -1181,7 +1187,7 @@ process.env.NODE_ENV !== "production" && (Bn.displayName = "Form");
|
|
|
1181
1187
|
const jt = /* @__PURE__ */ g.forwardRef((e, n) => {
|
|
1182
1188
|
let {
|
|
1183
1189
|
reloadDocument: r,
|
|
1184
|
-
replace:
|
|
1190
|
+
replace: o,
|
|
1185
1191
|
method: a = _e,
|
|
1186
1192
|
action: i,
|
|
1187
1193
|
onSubmit: s,
|
|
@@ -1190,14 +1196,14 @@ const jt = /* @__PURE__ */ g.forwardRef((e, n) => {
|
|
|
1190
1196
|
preventScrollReset: d
|
|
1191
1197
|
} = e, h = Ke(e, An), _ = a.toLowerCase() === "get" ? "get" : "post", w = Gn(i, {
|
|
1192
1198
|
relative: f
|
|
1193
|
-
}), C = (
|
|
1194
|
-
if (s && s(
|
|
1199
|
+
}), C = (P) => {
|
|
1200
|
+
if (s && s(P), P.defaultPrevented)
|
|
1195
1201
|
return;
|
|
1196
|
-
|
|
1197
|
-
let R =
|
|
1198
|
-
c(R ||
|
|
1202
|
+
P.preventDefault();
|
|
1203
|
+
let R = P.nativeEvent.submitter, T = (R == null ? void 0 : R.getAttribute("formmethod")) || a;
|
|
1204
|
+
c(R || P.currentTarget, {
|
|
1199
1205
|
method: T,
|
|
1200
|
-
replace:
|
|
1206
|
+
replace: o,
|
|
1201
1207
|
relative: f,
|
|
1202
1208
|
preventScrollReset: d
|
|
1203
1209
|
});
|
|
@@ -1229,7 +1235,7 @@ function Yn(e) {
|
|
|
1229
1235
|
function Jn(e, n) {
|
|
1230
1236
|
let {
|
|
1231
1237
|
target: r,
|
|
1232
|
-
replace:
|
|
1238
|
+
replace: o,
|
|
1233
1239
|
state: a,
|
|
1234
1240
|
preventScrollReset: i,
|
|
1235
1241
|
relative: s
|
|
@@ -1239,7 +1245,7 @@ function Jn(e, n) {
|
|
|
1239
1245
|
return g.useCallback((h) => {
|
|
1240
1246
|
if (jn(h, r)) {
|
|
1241
1247
|
h.preventDefault();
|
|
1242
|
-
let _ =
|
|
1248
|
+
let _ = o !== void 0 ? o : Ve(f) === Ve(d);
|
|
1243
1249
|
c(e, {
|
|
1244
1250
|
replace: _,
|
|
1245
1251
|
state: a,
|
|
@@ -1247,7 +1253,7 @@ function Jn(e, n) {
|
|
|
1247
1253
|
relative: s
|
|
1248
1254
|
});
|
|
1249
1255
|
}
|
|
1250
|
-
}, [f, c, d,
|
|
1256
|
+
}, [f, c, d, o, a, r, e, i, s]);
|
|
1251
1257
|
}
|
|
1252
1258
|
function Hn() {
|
|
1253
1259
|
if (typeof document > "u")
|
|
@@ -1259,7 +1265,7 @@ function zn() {
|
|
|
1259
1265
|
} = Yn(Ye.UseSubmit), {
|
|
1260
1266
|
basename: n
|
|
1261
1267
|
} = g.useContext(ee), r = Cn();
|
|
1262
|
-
return g.useCallback(function(
|
|
1268
|
+
return g.useCallback(function(o, a) {
|
|
1263
1269
|
a === void 0 && (a = {}), Hn();
|
|
1264
1270
|
let {
|
|
1265
1271
|
action: i,
|
|
@@ -1267,7 +1273,7 @@ function zn() {
|
|
|
1267
1273
|
encType: c,
|
|
1268
1274
|
formData: f,
|
|
1269
1275
|
body: d
|
|
1270
|
-
} = $n(
|
|
1276
|
+
} = $n(o, n);
|
|
1271
1277
|
e.navigate(a.action || i, {
|
|
1272
1278
|
preventScrollReset: a.preventScrollReset,
|
|
1273
1279
|
formData: f,
|
|
@@ -1283,8 +1289,8 @@ function Gn(e, n) {
|
|
|
1283
1289
|
let {
|
|
1284
1290
|
relative: r
|
|
1285
1291
|
} = n === void 0 ? {} : n, {
|
|
1286
|
-
basename:
|
|
1287
|
-
} = g.useContext(ee), a = g.useContext(
|
|
1292
|
+
basename: o
|
|
1293
|
+
} = g.useContext(ee), a = g.useContext(le);
|
|
1288
1294
|
a || (process.env.NODE_ENV !== "production" ? F(!1, "useFormAction must be used inside a RouteContext") : F(!1));
|
|
1289
1295
|
let [i] = a.matches.slice(-1), s = ne({}, xe(e || ".", {
|
|
1290
1296
|
relative: r
|
|
@@ -1293,34 +1299,34 @@ function Gn(e, n) {
|
|
|
1293
1299
|
let f = new URLSearchParams(s.search);
|
|
1294
1300
|
f.delete("index"), s.search = f.toString() ? "?" + f.toString() : "";
|
|
1295
1301
|
}
|
|
1296
|
-
return (!e || e === ".") && i.route.index && (s.search = s.search ? s.search.replace(/^\?/, "?index&") : "?index"),
|
|
1302
|
+
return (!e || e === ".") && i.route.index && (s.search = s.search ? s.search.replace(/^\?/, "?index&") : "?index"), o !== "/" && (s.pathname = s.pathname === "/" ? o : He([o, s.pathname])), Ve(s);
|
|
1297
1303
|
}
|
|
1298
1304
|
const rr = z(
|
|
1299
|
-
({ breadcrumbs: e, navigationType: n, className: r, ...
|
|
1305
|
+
({ breadcrumbs: e, navigationType: n, className: r, ...o }, a) => {
|
|
1300
1306
|
const i = e.slice(0, 4), s = i[i.length - 2], c = [
|
|
1301
1307
|
r,
|
|
1302
1308
|
"pkt-breadcrumbs"
|
|
1303
1309
|
].filter(Boolean).join(" ");
|
|
1304
1310
|
return /* @__PURE__ */ m("nav", { ref: a, "aria-label": "brødsmulemeny", className: c, children: [
|
|
1305
|
-
/* @__PURE__ */
|
|
1311
|
+
/* @__PURE__ */ l("ol", { className: "pkt-breadcrumbs__list pkt-breadcrumbs--desktop", children: i.map((f, d) => /* @__PURE__ */ l(
|
|
1306
1312
|
"li",
|
|
1307
1313
|
{
|
|
1308
1314
|
className: "pkt-breadcrumbs__item",
|
|
1309
|
-
children: d === i.length - 1 ? /* @__PURE__ */
|
|
1315
|
+
children: d === i.length - 1 ? /* @__PURE__ */ l("span", { className: "pkt-breadcrumbs__label", "aria-current": "true", children: /* @__PURE__ */ l("span", { className: "pkt-breadcrumbs__text", children: f.text }) }) : n === "router" ? /* @__PURE__ */ m(
|
|
1310
1316
|
Ne,
|
|
1311
1317
|
{
|
|
1312
1318
|
to: f.href,
|
|
1313
1319
|
className: "pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",
|
|
1314
|
-
...
|
|
1320
|
+
...o,
|
|
1315
1321
|
children: [
|
|
1316
|
-
/* @__PURE__ */
|
|
1322
|
+
/* @__PURE__ */ l(
|
|
1317
1323
|
y,
|
|
1318
1324
|
{
|
|
1319
1325
|
className: "pkt-icon pkt-breadcrumbs__icon pkt-link__icon",
|
|
1320
1326
|
name: "chevron-thin-right"
|
|
1321
1327
|
}
|
|
1322
1328
|
),
|
|
1323
|
-
/* @__PURE__ */
|
|
1329
|
+
/* @__PURE__ */ l("span", { className: "pkt-breadcrumbs__text", children: f.text })
|
|
1324
1330
|
]
|
|
1325
1331
|
}
|
|
1326
1332
|
) : /* @__PURE__ */ m(
|
|
@@ -1328,16 +1334,16 @@ const rr = z(
|
|
|
1328
1334
|
{
|
|
1329
1335
|
href: f.href,
|
|
1330
1336
|
className: "pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",
|
|
1331
|
-
...
|
|
1337
|
+
...o,
|
|
1332
1338
|
children: [
|
|
1333
|
-
/* @__PURE__ */
|
|
1339
|
+
/* @__PURE__ */ l(
|
|
1334
1340
|
y,
|
|
1335
1341
|
{
|
|
1336
1342
|
className: "pkt-icon pkt-breadcrumbs__icon pkt-link__icon",
|
|
1337
1343
|
name: "chevron-thin-right"
|
|
1338
1344
|
}
|
|
1339
1345
|
),
|
|
1340
|
-
/* @__PURE__ */
|
|
1346
|
+
/* @__PURE__ */ l("span", { className: "pkt-breadcrumbs__text", children: f.text })
|
|
1341
1347
|
]
|
|
1342
1348
|
}
|
|
1343
1349
|
)
|
|
@@ -1349,16 +1355,16 @@ const rr = z(
|
|
|
1349
1355
|
{
|
|
1350
1356
|
to: s.href,
|
|
1351
1357
|
className: "pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",
|
|
1352
|
-
...
|
|
1358
|
+
...o,
|
|
1353
1359
|
children: [
|
|
1354
|
-
/* @__PURE__ */
|
|
1360
|
+
/* @__PURE__ */ l(
|
|
1355
1361
|
y,
|
|
1356
1362
|
{
|
|
1357
1363
|
className: "pkt-back-link__icon pkt-icon pkt-link__icon",
|
|
1358
1364
|
name: "chevron-thin-left"
|
|
1359
1365
|
}
|
|
1360
1366
|
),
|
|
1361
|
-
/* @__PURE__ */
|
|
1367
|
+
/* @__PURE__ */ l("span", { className: "pkt-breadcrumbs__text", children: s.text })
|
|
1362
1368
|
]
|
|
1363
1369
|
}
|
|
1364
1370
|
) : /* @__PURE__ */ m(
|
|
@@ -1366,16 +1372,16 @@ const rr = z(
|
|
|
1366
1372
|
{
|
|
1367
1373
|
href: s.href,
|
|
1368
1374
|
className: "pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",
|
|
1369
|
-
...
|
|
1375
|
+
...o,
|
|
1370
1376
|
children: [
|
|
1371
|
-
/* @__PURE__ */
|
|
1377
|
+
/* @__PURE__ */ l(
|
|
1372
1378
|
y,
|
|
1373
1379
|
{
|
|
1374
1380
|
className: "pkt-back-link__icon pkt-icon pkt-link__icon",
|
|
1375
1381
|
name: "chevron-thin-left"
|
|
1376
1382
|
}
|
|
1377
1383
|
),
|
|
1378
|
-
/* @__PURE__ */
|
|
1384
|
+
/* @__PURE__ */ l("span", { className: "pkt-breadcrumbs__text", children: s.text })
|
|
1379
1385
|
]
|
|
1380
1386
|
}
|
|
1381
1387
|
)
|
|
@@ -1386,7 +1392,7 @@ const rr = z(
|
|
|
1386
1392
|
children: e,
|
|
1387
1393
|
className: n,
|
|
1388
1394
|
iconName: r = "user",
|
|
1389
|
-
secondIconName:
|
|
1395
|
+
secondIconName: o = "user",
|
|
1390
1396
|
size: a = "medium",
|
|
1391
1397
|
skin: i = "primary",
|
|
1392
1398
|
type: s = "button",
|
|
@@ -1403,23 +1409,23 @@ const rr = z(
|
|
|
1403
1409
|
f && `pkt-btn--${f}`
|
|
1404
1410
|
].filter(Boolean).join(" ");
|
|
1405
1411
|
return /* @__PURE__ */ m("button", { ...d, className: _, type: s, ref: h, children: [
|
|
1406
|
-
c !== "label-only" && /* @__PURE__ */
|
|
1407
|
-
/* @__PURE__ */
|
|
1408
|
-
c === "icons-right-and-left" && /* @__PURE__ */
|
|
1412
|
+
c !== "label-only" && /* @__PURE__ */ l(y, { className: "pkt-btn__icon", name: r }),
|
|
1413
|
+
/* @__PURE__ */ l("span", { className: "pkt-btn__text", children: e }),
|
|
1414
|
+
c === "icons-right-and-left" && /* @__PURE__ */ l(y, { className: "pkt-btn__icon", name: o })
|
|
1409
1415
|
] });
|
|
1410
1416
|
}
|
|
1411
1417
|
);
|
|
1412
1418
|
ye.displayName = "PktButton";
|
|
1413
|
-
const ar = ({ columnOne: e, columnTwo: n, socialLinks: r, className:
|
|
1419
|
+
const ar = ({ columnOne: e, columnTwo: n, socialLinks: r, className: o }) => {
|
|
1414
1420
|
var i, s;
|
|
1415
|
-
const a = [
|
|
1416
|
-
return /* @__PURE__ */
|
|
1421
|
+
const a = [o, "pkt-footer"].filter(Boolean).join(" ");
|
|
1422
|
+
return /* @__PURE__ */ l("footer", { className: a, "data-mode": "dark", children: /* @__PURE__ */ m("div", { className: "pkt-footer__container", children: [
|
|
1417
1423
|
/* @__PURE__ */ m("div", { className: "pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16", children: [
|
|
1418
1424
|
/* @__PURE__ */ m("div", { className: "pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up", children: [
|
|
1419
|
-
/* @__PURE__ */
|
|
1425
|
+
/* @__PURE__ */ l("h2", { className: "pkt-footer__title", children: e.title }),
|
|
1420
1426
|
/* @__PURE__ */ m("ul", { className: "pkt-footer__list", children: [
|
|
1421
|
-
e.text && /* @__PURE__ */
|
|
1422
|
-
(i = e.links) == null ? void 0 : i.map((c, f) => /* @__PURE__ */
|
|
1427
|
+
e.text && /* @__PURE__ */ l("li", { className: "pkt-footer__text", children: e.text }),
|
|
1428
|
+
(i = e.links) == null ? void 0 : i.map((c, f) => /* @__PURE__ */ l("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ m(
|
|
1423
1429
|
"a",
|
|
1424
1430
|
{
|
|
1425
1431
|
className: `pkt-footer__link ${c.external ? "pkt-link--external" : ""}`,
|
|
@@ -1427,7 +1433,7 @@ const ar = ({ columnOne: e, columnTwo: n, socialLinks: r, className: l }) => {
|
|
|
1427
1433
|
target: c.openInNewTab ? "_blank" : "_self",
|
|
1428
1434
|
rel: c.openInNewTab ? "noopener noreferrer" : void 0,
|
|
1429
1435
|
children: [
|
|
1430
|
-
/* @__PURE__ */
|
|
1436
|
+
/* @__PURE__ */ l(y, { className: "pkt-footer__link-icon", name: "chevron-right" }),
|
|
1431
1437
|
c.text
|
|
1432
1438
|
]
|
|
1433
1439
|
}
|
|
@@ -1435,10 +1441,10 @@ const ar = ({ columnOne: e, columnTwo: n, socialLinks: r, className: l }) => {
|
|
|
1435
1441
|
] })
|
|
1436
1442
|
] }),
|
|
1437
1443
|
/* @__PURE__ */ m("div", { className: "pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up", children: [
|
|
1438
|
-
/* @__PURE__ */
|
|
1444
|
+
/* @__PURE__ */ l("h2", { className: "pkt-footer__title", children: n.title }),
|
|
1439
1445
|
/* @__PURE__ */ m("ul", { className: "pkt-footer__list", children: [
|
|
1440
|
-
n.text && /* @__PURE__ */
|
|
1441
|
-
(s = n.links) == null ? void 0 : s.map((c, f) => /* @__PURE__ */
|
|
1446
|
+
n.text && /* @__PURE__ */ l("li", { className: "pkt-footer__text", children: n.text }),
|
|
1447
|
+
(s = n.links) == null ? void 0 : s.map((c, f) => /* @__PURE__ */ l("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ m(
|
|
1442
1448
|
"a",
|
|
1443
1449
|
{
|
|
1444
1450
|
className: `pkt-footer__link ${c.external ? "pkt-link--external" : ""}`,
|
|
@@ -1446,7 +1452,7 @@ const ar = ({ columnOne: e, columnTwo: n, socialLinks: r, className: l }) => {
|
|
|
1446
1452
|
target: c.openInNewTab ? "_blank" : "_self",
|
|
1447
1453
|
rel: c.openInNewTab ? "noopener noreferrer" : void 0,
|
|
1448
1454
|
children: [
|
|
1449
|
-
/* @__PURE__ */
|
|
1455
|
+
/* @__PURE__ */ l(y, { className: "pkt-footer__link-icon", name: "chevron-right" }),
|
|
1450
1456
|
c.text
|
|
1451
1457
|
]
|
|
1452
1458
|
}
|
|
@@ -1454,32 +1460,32 @@ const ar = ({ columnOne: e, columnTwo: n, socialLinks: r, className: l }) => {
|
|
|
1454
1460
|
] })
|
|
1455
1461
|
] }),
|
|
1456
1462
|
/* @__PURE__ */ m("div", { className: "pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up", children: [
|
|
1457
|
-
/* @__PURE__ */
|
|
1463
|
+
/* @__PURE__ */ l("h2", { className: "pkt-footer__title", children: "Om nettstedet" }),
|
|
1458
1464
|
/* @__PURE__ */ m("ul", { className: "pkt-footer__list", children: [
|
|
1459
|
-
/* @__PURE__ */
|
|
1465
|
+
/* @__PURE__ */ l("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ m(
|
|
1460
1466
|
"a",
|
|
1461
1467
|
{
|
|
1462
1468
|
className: "pkt-footer__link",
|
|
1463
1469
|
href: "https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",
|
|
1464
1470
|
children: [
|
|
1465
|
-
/* @__PURE__ */
|
|
1471
|
+
/* @__PURE__ */ l(y, { className: "pkt-footer__link-icon", name: "chevron-right" }),
|
|
1466
1472
|
"Personvern og informasjonskapsler"
|
|
1467
1473
|
]
|
|
1468
1474
|
}
|
|
1469
1475
|
) }),
|
|
1470
|
-
/* @__PURE__ */
|
|
1471
|
-
/* @__PURE__ */
|
|
1476
|
+
/* @__PURE__ */ l("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ m("a", { className: "pkt-footer__link", href: "https://www.oslo.kommune.no/tilgjengelighet/", children: [
|
|
1477
|
+
/* @__PURE__ */ l(y, { className: "pkt-footer__link-icon", name: "chevron-right" }),
|
|
1472
1478
|
"Tilgjengelighet"
|
|
1473
1479
|
] }) })
|
|
1474
1480
|
] })
|
|
1475
1481
|
] })
|
|
1476
1482
|
] }),
|
|
1477
1483
|
r && /* @__PURE__ */ m("div", { className: "pkt-footer__social", "aria-label": "standard lenker", children: [
|
|
1478
|
-
/* @__PURE__ */
|
|
1484
|
+
/* @__PURE__ */ l("div", { className: "pkt-footer__social-languages", children: r.filter((c) => c.language).map((c, f) => /* @__PURE__ */ l(
|
|
1479
1485
|
"div",
|
|
1480
1486
|
{
|
|
1481
1487
|
className: "pkt-footer__social-language",
|
|
1482
|
-
children: /* @__PURE__ */
|
|
1488
|
+
children: /* @__PURE__ */ l(
|
|
1483
1489
|
"a",
|
|
1484
1490
|
{
|
|
1485
1491
|
href: c.href,
|
|
@@ -1492,7 +1498,7 @@ const ar = ({ columnOne: e, columnTwo: n, socialLinks: r, className: l }) => {
|
|
|
1492
1498
|
},
|
|
1493
1499
|
`sociallinks-language-${f}`
|
|
1494
1500
|
)) }),
|
|
1495
|
-
/* @__PURE__ */
|
|
1501
|
+
/* @__PURE__ */ l("div", { className: "pkt-footer__social-icons", children: r.filter((c) => c.iconName).map((c, f) => /* @__PURE__ */ l(K.Fragment, { children: /* @__PURE__ */ l(
|
|
1496
1502
|
"a",
|
|
1497
1503
|
{
|
|
1498
1504
|
href: c.href,
|
|
@@ -1500,42 +1506,42 @@ const ar = ({ columnOne: e, columnTwo: n, socialLinks: r, className: l }) => {
|
|
|
1500
1506
|
className: "pkt-footer__social-icon-link",
|
|
1501
1507
|
target: c.openInNewTab ? "_blank" : "_self",
|
|
1502
1508
|
rel: c.openInNewTab ? "noopener noreferrer" : void 0,
|
|
1503
|
-
children: /* @__PURE__ */
|
|
1509
|
+
children: /* @__PURE__ */ l(y, { className: "pkt-footer__social-icon", name: c.iconName })
|
|
1504
1510
|
}
|
|
1505
1511
|
) }, `sociallinks-${f}`)) })
|
|
1506
1512
|
] })
|
|
1507
1513
|
] }) });
|
|
1508
|
-
},
|
|
1514
|
+
}, lr = ({
|
|
1509
1515
|
links: e = [],
|
|
1510
1516
|
className: n
|
|
1511
1517
|
}) => {
|
|
1512
1518
|
const r = [n, "pkt-footer-simple"].filter(Boolean).join(" ");
|
|
1513
|
-
return /* @__PURE__ */
|
|
1514
|
-
e.map((
|
|
1519
|
+
return /* @__PURE__ */ l("footer", { className: r, "data-mode": "dark", children: /* @__PURE__ */ l("div", { className: "pkt-footer-simple__container", children: /* @__PURE__ */ m("ul", { className: "pkt-footer-simple__list", children: [
|
|
1520
|
+
e.map((o, a) => /* @__PURE__ */ l("li", { className: "pkt-footer-simple__list-item", children: /* @__PURE__ */ m(
|
|
1515
1521
|
"a",
|
|
1516
1522
|
{
|
|
1517
|
-
className: `pkt-footer-simple__link ${
|
|
1518
|
-
href:
|
|
1519
|
-
target:
|
|
1520
|
-
rel:
|
|
1523
|
+
className: `pkt-footer-simple__link ${o.external ? " pkt-link--external" : ""}`,
|
|
1524
|
+
href: o.href,
|
|
1525
|
+
target: o.openInNewTab ? "_blank" : "_self",
|
|
1526
|
+
rel: o.openInNewTab ? "noopener noreferrer" : void 0,
|
|
1521
1527
|
children: [
|
|
1522
|
-
/* @__PURE__ */
|
|
1528
|
+
/* @__PURE__ */ l(
|
|
1523
1529
|
y,
|
|
1524
1530
|
{
|
|
1525
1531
|
className: "pkt-footer-simple__link-icon",
|
|
1526
1532
|
name: "chevron-right"
|
|
1527
1533
|
}
|
|
1528
1534
|
),
|
|
1529
|
-
|
|
1535
|
+
o.text
|
|
1530
1536
|
]
|
|
1531
1537
|
}
|
|
1532
1538
|
) }, a)),
|
|
1533
|
-
/* @__PURE__ */
|
|
1534
|
-
/* @__PURE__ */
|
|
1539
|
+
/* @__PURE__ */ l("li", { className: "pkt-footer-simple__list-item", children: /* @__PURE__ */ m("a", { className: "pkt-footer-simple__link", href: "https://www.oslo.kommune.no/personvern-og-informasjonskapsler/", children: [
|
|
1540
|
+
/* @__PURE__ */ l(y, { className: "pkt-footer-simple__link-icon", name: "chevron-right" }),
|
|
1535
1541
|
"Personvern og informasjonskapsler"
|
|
1536
1542
|
] }) }),
|
|
1537
|
-
/* @__PURE__ */
|
|
1538
|
-
/* @__PURE__ */
|
|
1543
|
+
/* @__PURE__ */ l("li", { className: "pkt-footer-simple__list-item", children: /* @__PURE__ */ m("a", { className: "pkt-footer-simple__link", href: "https://www.oslo.kommune.no/tilgjengelighet/", children: [
|
|
1544
|
+
/* @__PURE__ */ l(y, { className: "pkt-footer-simple__link-icon", name: "chevron-right" }),
|
|
1539
1545
|
"Tilgjengelighet"
|
|
1540
1546
|
] }) })
|
|
1541
1547
|
] }) }) });
|
|
@@ -1550,39 +1556,39 @@ var Dt = { exports: {} };
|
|
|
1550
1556
|
(function() {
|
|
1551
1557
|
var n = {}.hasOwnProperty;
|
|
1552
1558
|
function r() {
|
|
1553
|
-
for (var
|
|
1559
|
+
for (var o = [], a = 0; a < arguments.length; a++) {
|
|
1554
1560
|
var i = arguments[a];
|
|
1555
1561
|
if (i) {
|
|
1556
1562
|
var s = typeof i;
|
|
1557
1563
|
if (s === "string" || s === "number")
|
|
1558
|
-
|
|
1564
|
+
o.push(i);
|
|
1559
1565
|
else if (Array.isArray(i)) {
|
|
1560
1566
|
if (i.length) {
|
|
1561
1567
|
var c = r.apply(null, i);
|
|
1562
|
-
c &&
|
|
1568
|
+
c && o.push(c);
|
|
1563
1569
|
}
|
|
1564
1570
|
} else if (s === "object") {
|
|
1565
1571
|
if (i.toString !== Object.prototype.toString && !i.toString.toString().includes("[native code]")) {
|
|
1566
|
-
|
|
1572
|
+
o.push(i.toString());
|
|
1567
1573
|
continue;
|
|
1568
1574
|
}
|
|
1569
1575
|
for (var f in i)
|
|
1570
|
-
n.call(i, f) && i[f] &&
|
|
1576
|
+
n.call(i, f) && i[f] && o.push(f);
|
|
1571
1577
|
}
|
|
1572
1578
|
}
|
|
1573
1579
|
}
|
|
1574
|
-
return
|
|
1580
|
+
return o.join(" ");
|
|
1575
1581
|
}
|
|
1576
1582
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1577
1583
|
})();
|
|
1578
1584
|
})(Dt);
|
|
1579
1585
|
var Kn = Dt.exports;
|
|
1580
|
-
const Lt = /* @__PURE__ */ sn(Kn),
|
|
1586
|
+
const Lt = /* @__PURE__ */ sn(Kn), or = z(
|
|
1581
1587
|
({
|
|
1582
1588
|
logoLink: e = "https://www.oslo.kommune.no/",
|
|
1583
1589
|
serviceName: n,
|
|
1584
1590
|
fixed: r = !0,
|
|
1585
|
-
scrollToHide:
|
|
1591
|
+
scrollToHide: o = !0,
|
|
1586
1592
|
user: a,
|
|
1587
1593
|
userMenu: i,
|
|
1588
1594
|
representing: s,
|
|
@@ -1593,10 +1599,10 @@ const Lt = /* @__PURE__ */ sn(Kn), lr = z(
|
|
|
1593
1599
|
showLogOutButton: _ = !1,
|
|
1594
1600
|
openMenu: w,
|
|
1595
1601
|
logOut: C,
|
|
1596
|
-
changeRepresentation:
|
|
1602
|
+
changeRepresentation: P,
|
|
1597
1603
|
...R
|
|
1598
1604
|
}, T) => {
|
|
1599
|
-
const
|
|
1605
|
+
const O = K.useMemo(() => typeof (a == null ? void 0 : a.lastLoggedIn) == "string" ? a.lastLoggedIn : a != null && a.lastLoggedIn ? new Date(a.lastLoggedIn).toLocaleString("nb-NO", {
|
|
1600
1606
|
year: "numeric",
|
|
1601
1607
|
month: "long",
|
|
1602
1608
|
day: "numeric"
|
|
@@ -1609,7 +1615,7 @@ const Lt = /* @__PURE__ */ sn(Kn), lr = z(
|
|
|
1609
1615
|
}, W = (v) => {
|
|
1610
1616
|
H.current && !H.current.contains(v.target) && J(!1);
|
|
1611
1617
|
}, G = () => {
|
|
1612
|
-
if (
|
|
1618
|
+
if (o) {
|
|
1613
1619
|
const v = window.pageYOffset || document.documentElement.scrollTop;
|
|
1614
1620
|
if (v < 0 || Math.abs(v - A) < 60)
|
|
1615
1621
|
return;
|
|
@@ -1625,13 +1631,13 @@ const Lt = /* @__PURE__ */ sn(Kn), lr = z(
|
|
|
1625
1631
|
"aria-label": "Topp",
|
|
1626
1632
|
className: Lt("pkt-header", {
|
|
1627
1633
|
"pkt-header--fixed": r,
|
|
1628
|
-
"pkt-header--scroll-to-hide":
|
|
1634
|
+
"pkt-header--scroll-to-hide": o,
|
|
1629
1635
|
"pkt-header--hidden": b
|
|
1630
1636
|
}),
|
|
1631
1637
|
ref: T,
|
|
1632
1638
|
children: [
|
|
1633
1639
|
/* @__PURE__ */ m("div", { className: "pkt-header__logo", children: [
|
|
1634
|
-
typeof e == "string" ? /* @__PURE__ */
|
|
1640
|
+
typeof e == "string" ? /* @__PURE__ */ l("a", { "aria-label": "Tilbake til forside", className: "pkt-header__logo-link", href: e, children: /* @__PURE__ */ l(
|
|
1635
1641
|
y,
|
|
1636
1642
|
{
|
|
1637
1643
|
name: "oslologo",
|
|
@@ -1639,13 +1645,13 @@ const Lt = /* @__PURE__ */ sn(Kn), lr = z(
|
|
|
1639
1645
|
"aria-hidden": "true",
|
|
1640
1646
|
path: "https://punkt-cdn.oslo.kommune.no/8.0/logos/"
|
|
1641
1647
|
}
|
|
1642
|
-
) }) : /* @__PURE__ */
|
|
1648
|
+
) }) : /* @__PURE__ */ l(
|
|
1643
1649
|
"button",
|
|
1644
1650
|
{
|
|
1645
1651
|
"aria-label": "Tilbake til forside",
|
|
1646
1652
|
className: "pkt-link-button pkt-link pkt-header__logo-link",
|
|
1647
1653
|
onClick: e,
|
|
1648
|
-
children: /* @__PURE__ */
|
|
1654
|
+
children: /* @__PURE__ */ l(
|
|
1649
1655
|
y,
|
|
1650
1656
|
{
|
|
1651
1657
|
name: "oslologo",
|
|
@@ -1656,10 +1662,10 @@ const Lt = /* @__PURE__ */ sn(Kn), lr = z(
|
|
|
1656
1662
|
)
|
|
1657
1663
|
}
|
|
1658
1664
|
),
|
|
1659
|
-
/* @__PURE__ */
|
|
1665
|
+
/* @__PURE__ */ l("span", { className: "pkt-header__logo-service", children: n })
|
|
1660
1666
|
] }),
|
|
1661
|
-
/* @__PURE__ */
|
|
1662
|
-
h && /* @__PURE__ */
|
|
1667
|
+
/* @__PURE__ */ l("nav", { className: "pkt-header__actions", children: /* @__PURE__ */ m("ul", { className: "pkt-header__actions-row", children: [
|
|
1668
|
+
h && /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(
|
|
1663
1669
|
ye,
|
|
1664
1670
|
{
|
|
1665
1671
|
className: "pkt-header__menu-btn",
|
|
@@ -1687,70 +1693,70 @@ const Lt = /* @__PURE__ */ sn(Kn), lr = z(
|
|
|
1687
1693
|
"aria-expanded": I,
|
|
1688
1694
|
onClick: M,
|
|
1689
1695
|
children: [
|
|
1690
|
-
/* @__PURE__ */
|
|
1691
|
-
/* @__PURE__ */
|
|
1692
|
-
/* @__PURE__ */
|
|
1693
|
-
/* @__PURE__ */
|
|
1694
|
-
/* @__PURE__ */
|
|
1696
|
+
/* @__PURE__ */ l(y, { name: "user", className: "pkt-btn__icon" }),
|
|
1697
|
+
/* @__PURE__ */ l("span", { className: "pkt-header__user-fullname", children: (s == null ? void 0 : s.name) || (a == null ? void 0 : a.name) }),
|
|
1698
|
+
/* @__PURE__ */ l("span", { className: "pkt-header__user-shortname", children: (s == null ? void 0 : s.shortname) || (a == null ? void 0 : a.shortname) }),
|
|
1699
|
+
/* @__PURE__ */ l(y, { name: "chevron-thin-down", className: "pkt-btn--closed" }),
|
|
1700
|
+
/* @__PURE__ */ l(y, { name: "chevron-thin-up", className: "pkt-btn--open" })
|
|
1695
1701
|
]
|
|
1696
1702
|
}
|
|
1697
1703
|
),
|
|
1698
1704
|
/* @__PURE__ */ m("ul", { id: "pktUserDropdown", className: "pkt-header__dropdown pkt-user-menu", children: [
|
|
1699
1705
|
a && /* @__PURE__ */ m("li", { children: [
|
|
1700
|
-
/* @__PURE__ */
|
|
1701
|
-
/* @__PURE__ */
|
|
1706
|
+
/* @__PURE__ */ l("div", { className: "pkt-user-menu__label", children: "Pålogget som" }),
|
|
1707
|
+
/* @__PURE__ */ l("div", { className: "pkt-user-menu__name", children: a.name }),
|
|
1702
1708
|
a.lastLoggedIn && /* @__PURE__ */ m("div", { className: "pkt-user-menu__last-logged-in", children: [
|
|
1703
1709
|
"Sist pålogget: ",
|
|
1704
|
-
/* @__PURE__ */
|
|
1710
|
+
/* @__PURE__ */ l("time", { children: O })
|
|
1705
1711
|
] })
|
|
1706
1712
|
] }),
|
|
1707
|
-
i && /* @__PURE__ */
|
|
1708
|
-
v.iconName && /* @__PURE__ */
|
|
1713
|
+
i && /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l("ul", { className: "pkt-list", children: i.map((v, j) => /* @__PURE__ */ l("li", { children: typeof v.target == "string" ? /* @__PURE__ */ m("a", { href: v.target, className: "pkt-link", children: [
|
|
1714
|
+
v.iconName && /* @__PURE__ */ l(y, { name: v.iconName, className: "pkt-link__icon" }),
|
|
1709
1715
|
v.title
|
|
1710
1716
|
] }) : /* @__PURE__ */ m("button", { className: "pkt-link-button pkt-link", onClick: v.target, children: [
|
|
1711
|
-
v.iconName && /* @__PURE__ */
|
|
1717
|
+
v.iconName && /* @__PURE__ */ l(y, { name: v.iconName, className: "pkt-link__icon" }),
|
|
1712
1718
|
v.title
|
|
1713
1719
|
] }) }, `userMenu-${j}`)) }) }),
|
|
1714
1720
|
(s || d) && /* @__PURE__ */ m("li", { children: [
|
|
1715
1721
|
s && /* @__PURE__ */ m(X, { children: [
|
|
1716
|
-
/* @__PURE__ */
|
|
1717
|
-
/* @__PURE__ */
|
|
1722
|
+
/* @__PURE__ */ l("div", { className: "pkt-user-menu__label", children: "Representerer" }),
|
|
1723
|
+
/* @__PURE__ */ l("div", { className: "pkt-user-menu__name", children: s.name }),
|
|
1718
1724
|
s.orgNumber && /* @__PURE__ */ m("div", { className: "pkt-user-menu__org-number", children: [
|
|
1719
1725
|
"Org.nr. ",
|
|
1720
1726
|
s.orgNumber
|
|
1721
1727
|
] })
|
|
1722
1728
|
] }),
|
|
1723
|
-
/* @__PURE__ */
|
|
1729
|
+
/* @__PURE__ */ l("ul", { className: "pkt-list mt-size-16", children: d && /* @__PURE__ */ l("li", { children: /* @__PURE__ */ m(
|
|
1724
1730
|
"button",
|
|
1725
1731
|
{
|
|
1726
1732
|
className: "pkt-link-button pkt-link",
|
|
1727
|
-
onClick:
|
|
1733
|
+
onClick: P,
|
|
1728
1734
|
children: [
|
|
1729
|
-
/* @__PURE__ */
|
|
1735
|
+
/* @__PURE__ */ l(y, { name: "cogwheel", className: "pkt-link__icon" }),
|
|
1730
1736
|
"Endre organisasjon"
|
|
1731
1737
|
]
|
|
1732
1738
|
}
|
|
1733
1739
|
) }) })
|
|
1734
1740
|
] }),
|
|
1735
|
-
/* @__PURE__ */
|
|
1736
|
-
c == null ? void 0 : c.map((v, j) => /* @__PURE__ */
|
|
1737
|
-
v.iconName && /* @__PURE__ */
|
|
1741
|
+
/* @__PURE__ */ l("li", { children: /* @__PURE__ */ l("ul", { className: "pkt-list", children: (c || !_) && /* @__PURE__ */ m(X, { children: [
|
|
1742
|
+
c == null ? void 0 : c.map((v, j) => /* @__PURE__ */ l("li", { children: typeof v.target == "string" ? /* @__PURE__ */ m("a", { href: v.target, className: "pkt-link", children: [
|
|
1743
|
+
v.iconName && /* @__PURE__ */ l(y, { name: v.iconName, className: "pkt-link__icon" }),
|
|
1738
1744
|
v.title
|
|
1739
1745
|
] }) : /* @__PURE__ */ m("button", { className: "pkt-link-button pkt-link", onClick: v.target, children: [
|
|
1740
|
-
v.iconName && /* @__PURE__ */
|
|
1746
|
+
v.iconName && /* @__PURE__ */ l(y, { name: v.iconName, className: "pkt-link__icon" }),
|
|
1741
1747
|
v.title
|
|
1742
1748
|
] }) }, `userOptions-${j}`)),
|
|
1743
|
-
!_ && /* @__PURE__ */
|
|
1744
|
-
/* @__PURE__ */
|
|
1749
|
+
!_ && /* @__PURE__ */ l("li", { children: /* @__PURE__ */ m("button", { className: "pkt-link-button pkt-link", onClick: C, children: [
|
|
1750
|
+
/* @__PURE__ */ l(y, { name: "exit", className: "pkt-link__icon" }),
|
|
1745
1751
|
"Logg ut"
|
|
1746
1752
|
] }) })
|
|
1747
1753
|
] }) }) }),
|
|
1748
|
-
f && /* @__PURE__ */
|
|
1754
|
+
f && /* @__PURE__ */ l("li", { className: "footer", children: /* @__PURE__ */ l("ul", { className: "pkt-list-horizontal bordered", children: f.map((v, j) => /* @__PURE__ */ l("li", { children: typeof v.target == "string" ? /* @__PURE__ */ l("a", { href: v.target, className: "pkt-link", children: v.title }) : /* @__PURE__ */ l("button", { className: "pkt-link-button pkt-link", onClick: v.target, children: v.title }) }, `userMenuFooter-${j}`)) }) })
|
|
1749
1755
|
] })
|
|
1750
1756
|
]
|
|
1751
1757
|
}
|
|
1752
1758
|
),
|
|
1753
|
-
_ && /* @__PURE__ */
|
|
1759
|
+
_ && /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(
|
|
1754
1760
|
ye,
|
|
1755
1761
|
{
|
|
1756
1762
|
className: "pkt-header__user-btn pkt-header__user-btn-logout",
|
|
@@ -1768,9 +1774,9 @@ const Lt = /* @__PURE__ */ sn(Kn), lr = z(
|
|
|
1768
1774
|
);
|
|
1769
1775
|
}
|
|
1770
1776
|
), qn = K.forwardRef(
|
|
1771
|
-
({ label: e, id: n, children: r, ...
|
|
1772
|
-
/* @__PURE__ */
|
|
1773
|
-
/* @__PURE__ */
|
|
1777
|
+
({ label: e, id: n, children: r, ...o }, a) => /* @__PURE__ */ m("div", { className: "pkt-form-group", children: [
|
|
1778
|
+
/* @__PURE__ */ l("label", { htmlFor: n, className: "pkt-form-label", children: e }),
|
|
1779
|
+
/* @__PURE__ */ l("input", { className: "pkt-form-input", id: n, ...o, ref: a }),
|
|
1774
1780
|
r
|
|
1775
1781
|
] })
|
|
1776
1782
|
);
|
|
@@ -1780,7 +1786,7 @@ const qe = z(
|
|
|
1780
1786
|
forId: e,
|
|
1781
1787
|
label: n,
|
|
1782
1788
|
helptext: r,
|
|
1783
|
-
helptextDropdown:
|
|
1789
|
+
helptextDropdown: o,
|
|
1784
1790
|
helptextDropdownButton: a,
|
|
1785
1791
|
optional: i,
|
|
1786
1792
|
optionalText: s = "Valgfritt",
|
|
@@ -1791,23 +1797,23 @@ const qe = z(
|
|
|
1791
1797
|
disabled: _,
|
|
1792
1798
|
inline: w,
|
|
1793
1799
|
ariaDescribedby: C,
|
|
1794
|
-
useWrapper:
|
|
1800
|
+
useWrapper: P = !0,
|
|
1795
1801
|
children: R,
|
|
1796
1802
|
className: T
|
|
1797
|
-
},
|
|
1803
|
+
}, O) => {
|
|
1798
1804
|
const [b, $] = ue(!1), A = () => {
|
|
1799
1805
|
$(!b);
|
|
1800
|
-
}, V = () => i ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light" : c ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige" : "", I = i ? s : c ? f : "", J = _ ? "pkt-inputwrapper--disabled" : "", H = w ? "pkt-inputwrapper--inline" : "", M = d ? "pkt-inputwrapper--error" : "", W = !!
|
|
1806
|
+
}, V = () => i ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light" : c ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige" : "", I = i ? s : c ? f : "", J = _ ? "pkt-inputwrapper--disabled" : "", H = w ? "pkt-inputwrapper--inline" : "", M = d ? "pkt-inputwrapper--error" : "", W = !!o && o !== "", G = a || 'Les mer <span class="pkt-sr-only">om inputfeltet</span>', v = W ? "div" : "label", j = W ? "h2" : "span", B = C || (r ? `${e}-helptext` : void 0);
|
|
1801
1807
|
return /* @__PURE__ */ m(
|
|
1802
1808
|
"div",
|
|
1803
1809
|
{
|
|
1804
1810
|
className: ["pkt-inputwrapper", T, J, H, M].join(
|
|
1805
1811
|
" "
|
|
1806
1812
|
),
|
|
1807
|
-
ref:
|
|
1813
|
+
ref: O,
|
|
1808
1814
|
children: [
|
|
1809
|
-
|
|
1810
|
-
/* @__PURE__ */
|
|
1815
|
+
P ? /* @__PURE__ */ m(X, { children: [
|
|
1816
|
+
/* @__PURE__ */ l(
|
|
1811
1817
|
v,
|
|
1812
1818
|
{
|
|
1813
1819
|
htmlFor: e,
|
|
@@ -1815,13 +1821,13 @@ const qe = z(
|
|
|
1815
1821
|
"aria-describedby": W ? "" : C,
|
|
1816
1822
|
children: /* @__PURE__ */ m(j, { id: `${e}-label`, children: [
|
|
1817
1823
|
n,
|
|
1818
|
-
I !== "" && /* @__PURE__ */
|
|
1824
|
+
I !== "" && /* @__PURE__ */ l("span", { className: V(), children: I })
|
|
1819
1825
|
] })
|
|
1820
1826
|
}
|
|
1821
1827
|
),
|
|
1822
|
-
r && /* @__PURE__ */
|
|
1823
|
-
W &&
|
|
1824
|
-
/* @__PURE__ */
|
|
1828
|
+
r && /* @__PURE__ */ l("div", { className: "pkt-inputwrapper__helptext", id: `${e}-helptext`, children: r }),
|
|
1829
|
+
W && o !== "" && /* @__PURE__ */ m("div", { children: [
|
|
1830
|
+
/* @__PURE__ */ l(
|
|
1825
1831
|
ye,
|
|
1826
1832
|
{
|
|
1827
1833
|
skin: "tertiary",
|
|
@@ -1830,21 +1836,21 @@ const qe = z(
|
|
|
1830
1836
|
iconName: b ? "chevron-thin-up" : "chevron-thin-down",
|
|
1831
1837
|
className: "pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",
|
|
1832
1838
|
onClick: A,
|
|
1833
|
-
children: /* @__PURE__ */
|
|
1839
|
+
children: /* @__PURE__ */ l("span", { dangerouslySetInnerHTML: { __html: G } })
|
|
1834
1840
|
}
|
|
1835
1841
|
),
|
|
1836
|
-
/* @__PURE__ */
|
|
1842
|
+
/* @__PURE__ */ l(
|
|
1837
1843
|
"div",
|
|
1838
1844
|
{
|
|
1839
1845
|
className: `pkt-inputwrapper__helptext ${b ? "pkt-inputwrapper__helptext-expandable-open" : "pkt-inputwrapper__helptext-expandable-closed"}`,
|
|
1840
|
-
children: /* @__PURE__ */
|
|
1846
|
+
children: /* @__PURE__ */ l("span", { dangerouslySetInnerHTML: { __html: o } })
|
|
1841
1847
|
}
|
|
1842
1848
|
),
|
|
1843
|
-
/* @__PURE__ */
|
|
1849
|
+
/* @__PURE__ */ l("label", { htmlFor: e, className: "pkt-sr-only", "aria-describedby": B, children: n })
|
|
1844
1850
|
] }),
|
|
1845
|
-
/* @__PURE__ */
|
|
1851
|
+
/* @__PURE__ */ l(X, { children: R })
|
|
1846
1852
|
] }) : /* @__PURE__ */ m(X, { children: [
|
|
1847
|
-
/* @__PURE__ */
|
|
1853
|
+
/* @__PURE__ */ l(
|
|
1848
1854
|
"label",
|
|
1849
1855
|
{
|
|
1850
1856
|
htmlFor: e,
|
|
@@ -1856,7 +1862,7 @@ const qe = z(
|
|
|
1856
1862
|
),
|
|
1857
1863
|
R
|
|
1858
1864
|
] }),
|
|
1859
|
-
d && h && /* @__PURE__ */
|
|
1865
|
+
d && h && /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(dn, { skin: "error", "aria-live": "assertive", id: `${e}-error`, slim: !0, children: h }) })
|
|
1860
1866
|
]
|
|
1861
1867
|
}
|
|
1862
1868
|
);
|
|
@@ -1868,7 +1874,7 @@ const Xn = z(
|
|
|
1868
1874
|
children: e,
|
|
1869
1875
|
className: n,
|
|
1870
1876
|
iconName: r = "user",
|
|
1871
|
-
openInNewTab:
|
|
1877
|
+
openInNewTab: o = !1,
|
|
1872
1878
|
skin: a = "normal",
|
|
1873
1879
|
href: i = "#",
|
|
1874
1880
|
external: s = !1,
|
|
@@ -1880,14 +1886,14 @@ const Xn = z(
|
|
|
1880
1886
|
{
|
|
1881
1887
|
href: i,
|
|
1882
1888
|
className: `pkt-linkcard pkt-link ${d}`,
|
|
1883
|
-
target:
|
|
1884
|
-
rel:
|
|
1889
|
+
target: o ? "_blank" : "_self",
|
|
1890
|
+
rel: o ? "noopener noreferrer" : void 0,
|
|
1885
1891
|
ref: f,
|
|
1886
1892
|
children: [
|
|
1887
|
-
/* @__PURE__ */
|
|
1893
|
+
/* @__PURE__ */ l(y, { className: "pkt-link__icon", name: r }),
|
|
1888
1894
|
/* @__PURE__ */ m("div", { className: "pkt-linkcard__content", children: [
|
|
1889
|
-
/* @__PURE__ */
|
|
1890
|
-
/* @__PURE__ */
|
|
1895
|
+
/* @__PURE__ */ l("div", { className: `pkt-linkcard__title ${s ? "pkt-link pkt-link--external" : ""}`, children: c }),
|
|
1896
|
+
/* @__PURE__ */ l("div", { className: "pkt-linkcard__text", children: e })
|
|
1891
1897
|
] })
|
|
1892
1898
|
]
|
|
1893
1899
|
}
|
|
@@ -1899,44 +1905,44 @@ const ir = ({
|
|
|
1899
1905
|
children: e,
|
|
1900
1906
|
skin: n = "beige",
|
|
1901
1907
|
title: r,
|
|
1902
|
-
className:
|
|
1908
|
+
className: o,
|
|
1903
1909
|
...a
|
|
1904
1910
|
}) => {
|
|
1905
|
-
const i = ["pkt-messagebox", n && `pkt-messagebox--${n}`,
|
|
1911
|
+
const i = ["pkt-messagebox", n && `pkt-messagebox--${n}`, o].filter(Boolean).join(" ");
|
|
1906
1912
|
return /* @__PURE__ */ m("div", { ...a, className: i, children: [
|
|
1907
|
-
/* @__PURE__ */
|
|
1908
|
-
/* @__PURE__ */
|
|
1913
|
+
/* @__PURE__ */ l("div", { className: "pkt-messagebox__title", children: r }),
|
|
1914
|
+
/* @__PURE__ */ l("div", { className: "pkt-messagebox__text", children: e })
|
|
1909
1915
|
] });
|
|
1910
1916
|
}, Zn = z(
|
|
1911
|
-
({ id: e, name: n, label: r, value:
|
|
1912
|
-
/* @__PURE__ */
|
|
1913
|
-
/* @__PURE__ */
|
|
1917
|
+
({ id: e, name: n, label: r, value: o, ...a }, i) => /* @__PURE__ */ m("div", { className: "pkt-form-group", children: [
|
|
1918
|
+
/* @__PURE__ */ l("input", { type: "radio", className: "pkt-form-check-input", id: e, name: n, value: o, ref: i, ...a }),
|
|
1919
|
+
/* @__PURE__ */ l("label", { className: "pkt-form-label", htmlFor: e, children: r })
|
|
1914
1920
|
] })
|
|
1915
1921
|
);
|
|
1916
1922
|
Zn.displayName = "PktRadio";
|
|
1917
1923
|
const sr = ({ label: e, children: n }) => /* @__PURE__ */ m(X, { children: [
|
|
1918
|
-
/* @__PURE__ */
|
|
1919
|
-
/* @__PURE__ */
|
|
1920
|
-
] }), Qn = ({ isResponsive: e, children: n }) => e ? /* @__PURE__ */
|
|
1924
|
+
/* @__PURE__ */ l("p", { children: e }),
|
|
1925
|
+
/* @__PURE__ */ l("div", { className: "pkt-form-group", children: n })
|
|
1926
|
+
] }), Qn = ({ isResponsive: e, children: n }) => e ? /* @__PURE__ */ l("div", { className: "pkt-table-container", children: n }) : /* @__PURE__ */ l(X, { children: n }), cr = ({
|
|
1921
1927
|
isResponsive: e,
|
|
1922
|
-
modifiers: { info: n = !1, success: r = !1, strong:
|
|
1928
|
+
modifiers: { info: n = !1, success: r = !1, strong: o = !1, shadow: a = !1 } = {},
|
|
1923
1929
|
children: i
|
|
1924
|
-
}) => /* @__PURE__ */
|
|
1930
|
+
}) => /* @__PURE__ */ l(Qn, { isResponsive: e, children: /* @__PURE__ */ l(
|
|
1925
1931
|
"table",
|
|
1926
1932
|
{
|
|
1927
1933
|
className: Lt("pkt-table", {
|
|
1928
1934
|
"pkt-table--info": n,
|
|
1929
1935
|
"pkt-table--success": r,
|
|
1930
|
-
"pkt-table--strong":
|
|
1936
|
+
"pkt-table--strong": o,
|
|
1931
1937
|
"pkt-table--shadow": a
|
|
1932
1938
|
}),
|
|
1933
1939
|
children: i
|
|
1934
1940
|
}
|
|
1935
|
-
) }), ur = ({ children: e }) => /* @__PURE__ */
|
|
1941
|
+
) }), ur = ({ children: e }) => /* @__PURE__ */ l("td", { className: "pkt-table__th", children: e }), fr = ({ children: e }) => /* @__PURE__ */ l("th", { className: "pkt-table__th", children: e }), er = z(({
|
|
1936
1942
|
children: e,
|
|
1937
1943
|
className: n,
|
|
1938
1944
|
skin: r = "blue",
|
|
1939
|
-
textStyle:
|
|
1945
|
+
textStyle: o = "normal-text",
|
|
1940
1946
|
size: a = "medium",
|
|
1941
1947
|
closeTag: i = !1,
|
|
1942
1948
|
iconName: s = "",
|
|
@@ -1945,13 +1951,13 @@ const sr = ({ label: e, children: n }) => /* @__PURE__ */ m(X, { children: [
|
|
|
1945
1951
|
onClick: d = () => {
|
|
1946
1952
|
}
|
|
1947
1953
|
}, h) => {
|
|
1948
|
-
const [_, w] = ue(!1), C = (
|
|
1949
|
-
w(!0), d(
|
|
1950
|
-
},
|
|
1954
|
+
const [_, w] = ue(!1), C = (O) => {
|
|
1955
|
+
w(!0), d(O);
|
|
1956
|
+
}, P = [
|
|
1951
1957
|
"pkt-tag",
|
|
1952
1958
|
a && `pkt-tag--${a}`,
|
|
1953
1959
|
r && `pkt-tag--${r}`,
|
|
1954
|
-
|
|
1960
|
+
o && `pkt-tag--${o}`,
|
|
1955
1961
|
n
|
|
1956
1962
|
].filter(Boolean).join(" "), R = [
|
|
1957
1963
|
"pkt-tag",
|
|
@@ -1959,12 +1965,12 @@ const sr = ({ label: e, children: n }) => /* @__PURE__ */ m(X, { children: [
|
|
|
1959
1965
|
"pkt-btn--tertiary",
|
|
1960
1966
|
a && `pkt-tag--${a}`,
|
|
1961
1967
|
r && `pkt-tag--${r}`,
|
|
1962
|
-
|
|
1968
|
+
o && `pkt-tag--${o}`,
|
|
1963
1969
|
s && i ? "pkt-btn--icons-right-and-left" : null,
|
|
1964
1970
|
i && !s ? "pkt-btn--icon-right" : null,
|
|
1965
1971
|
n
|
|
1966
1972
|
].filter(Boolean).join(" "), T = !_;
|
|
1967
|
-
return i && s ? /* @__PURE__ */
|
|
1973
|
+
return i && s ? /* @__PURE__ */ l(X, { children: T && /* @__PURE__ */ m(
|
|
1968
1974
|
"button",
|
|
1969
1975
|
{
|
|
1970
1976
|
className: R,
|
|
@@ -1973,12 +1979,12 @@ const sr = ({ label: e, children: n }) => /* @__PURE__ */ m(X, { children: [
|
|
|
1973
1979
|
onClick: C,
|
|
1974
1980
|
ref: h,
|
|
1975
1981
|
children: [
|
|
1976
|
-
/* @__PURE__ */
|
|
1982
|
+
/* @__PURE__ */ l(y, { className: "pkt-tag__icon", name: s }),
|
|
1977
1983
|
e,
|
|
1978
|
-
/* @__PURE__ */
|
|
1984
|
+
/* @__PURE__ */ l(y, { className: "pkt-tag__close-btn", name: "close" })
|
|
1979
1985
|
]
|
|
1980
1986
|
}
|
|
1981
|
-
) }) : i ? /* @__PURE__ */
|
|
1987
|
+
) }) : i ? /* @__PURE__ */ l(X, { children: T && /* @__PURE__ */ m(
|
|
1982
1988
|
"button",
|
|
1983
1989
|
{
|
|
1984
1990
|
className: R,
|
|
@@ -1987,14 +1993,14 @@ const sr = ({ label: e, children: n }) => /* @__PURE__ */ m(X, { children: [
|
|
|
1987
1993
|
onClick: C,
|
|
1988
1994
|
ref: h,
|
|
1989
1995
|
children: [
|
|
1990
|
-
/* @__PURE__ */
|
|
1996
|
+
/* @__PURE__ */ l(y, { className: "pkt-tag__close-btn", name: "close" }),
|
|
1991
1997
|
e
|
|
1992
1998
|
]
|
|
1993
1999
|
}
|
|
1994
|
-
) }) : s ? /* @__PURE__ */ m("span", { className:
|
|
1995
|
-
/* @__PURE__ */
|
|
2000
|
+
) }) : s ? /* @__PURE__ */ m("span", { className: P, children: [
|
|
2001
|
+
/* @__PURE__ */ l(y, { className: "pkt-tag__icon", name: s }),
|
|
1996
2002
|
e
|
|
1997
|
-
] }) : /* @__PURE__ */
|
|
2003
|
+
] }) : /* @__PURE__ */ l("span", { className: P, children: e });
|
|
1998
2004
|
});
|
|
1999
2005
|
er.displayName = "PktTag";
|
|
2000
2006
|
const pr = z(
|
|
@@ -2002,7 +2008,7 @@ const pr = z(
|
|
|
2002
2008
|
id: e,
|
|
2003
2009
|
ariaDescribedby: n,
|
|
2004
2010
|
ariaLabelledby: r,
|
|
2005
|
-
counter:
|
|
2011
|
+
counter: o,
|
|
2006
2012
|
counterMaxLength: a,
|
|
2007
2013
|
className: i,
|
|
2008
2014
|
disabled: s,
|
|
@@ -2013,10 +2019,10 @@ const pr = z(
|
|
|
2013
2019
|
helptextDropdownButton: _,
|
|
2014
2020
|
inline: w,
|
|
2015
2021
|
fullwidth: C = !1,
|
|
2016
|
-
label:
|
|
2022
|
+
label: P,
|
|
2017
2023
|
name: R,
|
|
2018
2024
|
optional: T = !1,
|
|
2019
|
-
optionalText:
|
|
2025
|
+
optionalText: O,
|
|
2020
2026
|
required: b = !1,
|
|
2021
2027
|
requiredText: $,
|
|
2022
2028
|
placeholder: A,
|
|
@@ -2025,14 +2031,14 @@ const pr = z(
|
|
|
2025
2031
|
onChange: J,
|
|
2026
2032
|
...H
|
|
2027
2033
|
}, M) => {
|
|
2028
|
-
const W = [i, "pkt-textinput", "pkt-textarea"].join(" "), G = r || `${e}-label`, v =
|
|
2029
|
-
var Q,
|
|
2030
|
-
if (
|
|
2034
|
+
const W = [i, "pkt-textinput", "pkt-textarea"].join(" "), G = r || `${e}-label`, v = on(null), [j, B] = ue(0), te = (Z) => {
|
|
2035
|
+
var Q, oe;
|
|
2036
|
+
if (o && B(((oe = (Q = Z.currentTarget) == null ? void 0 : Q.value) == null ? void 0 : oe.length) || 0), J)
|
|
2031
2037
|
return J(Z);
|
|
2032
2038
|
};
|
|
2033
2039
|
return yt(() => {
|
|
2034
2040
|
var Z, Q;
|
|
2035
|
-
typeof M == "function" && M(v.current),
|
|
2041
|
+
typeof M == "function" && M(v.current), o && B(((Q = (Z = v == null ? void 0 : v.current) == null ? void 0 : Z.value) == null ? void 0 : Q.length) || 0);
|
|
2036
2042
|
}, [M]), /* @__PURE__ */ m(
|
|
2037
2043
|
qe,
|
|
2038
2044
|
{
|
|
@@ -2046,14 +2052,14 @@ const pr = z(
|
|
|
2046
2052
|
helptextDropdown: h,
|
|
2047
2053
|
helptextDropdownButton: _,
|
|
2048
2054
|
inline: w,
|
|
2049
|
-
label:
|
|
2055
|
+
label: P,
|
|
2050
2056
|
optional: T,
|
|
2051
|
-
optionalText:
|
|
2057
|
+
optionalText: O,
|
|
2052
2058
|
required: b,
|
|
2053
2059
|
requiredText: $,
|
|
2054
2060
|
useWrapper: I,
|
|
2055
2061
|
children: [
|
|
2056
|
-
/* @__PURE__ */
|
|
2062
|
+
/* @__PURE__ */ l(
|
|
2057
2063
|
"textarea",
|
|
2058
2064
|
{
|
|
2059
2065
|
ref: v,
|
|
@@ -2071,7 +2077,7 @@ const pr = z(
|
|
|
2071
2077
|
onChange: te
|
|
2072
2078
|
}
|
|
2073
2079
|
),
|
|
2074
|
-
|
|
2080
|
+
o && /* @__PURE__ */ m("div", { className: "pkt-input__counter", "aria-live": "polite", "aria-atomic": !0, children: [
|
|
2075
2081
|
j || 0,
|
|
2076
2082
|
a && `/${a}`
|
|
2077
2083
|
] })
|
|
@@ -2084,7 +2090,7 @@ const pr = z(
|
|
|
2084
2090
|
id: e,
|
|
2085
2091
|
ariaDescribedby: n,
|
|
2086
2092
|
ariaLabelledby: r,
|
|
2087
|
-
autocomplete:
|
|
2093
|
+
autocomplete: o = "off",
|
|
2088
2094
|
className: a,
|
|
2089
2095
|
disabled: i = !1,
|
|
2090
2096
|
errorMessage: s,
|
|
@@ -2095,10 +2101,10 @@ const pr = z(
|
|
|
2095
2101
|
iconNameRight: _,
|
|
2096
2102
|
inline: w = !1,
|
|
2097
2103
|
fullwidth: C = !1,
|
|
2098
|
-
label:
|
|
2104
|
+
label: P,
|
|
2099
2105
|
name: R,
|
|
2100
2106
|
optional: T = !1,
|
|
2101
|
-
optionalText:
|
|
2107
|
+
optionalText: O,
|
|
2102
2108
|
required: b = !1,
|
|
2103
2109
|
requiredText: $,
|
|
2104
2110
|
placeholder: A,
|
|
@@ -2110,7 +2116,7 @@ const pr = z(
|
|
|
2110
2116
|
...W
|
|
2111
2117
|
}, G) => {
|
|
2112
2118
|
const v = [a, "pkt-textinput"].join(" "), j = r || `${e}-label`;
|
|
2113
|
-
return /* @__PURE__ */
|
|
2119
|
+
return /* @__PURE__ */ l(
|
|
2114
2120
|
qe,
|
|
2115
2121
|
{
|
|
2116
2122
|
ariaDescribedby: n,
|
|
@@ -2123,15 +2129,15 @@ const pr = z(
|
|
|
2123
2129
|
helptextDropdown: d,
|
|
2124
2130
|
helptextDropdownButton: h,
|
|
2125
2131
|
inline: w,
|
|
2126
|
-
label:
|
|
2132
|
+
label: P,
|
|
2127
2133
|
optional: T,
|
|
2128
|
-
optionalText:
|
|
2134
|
+
optionalText: O,
|
|
2129
2135
|
required: b,
|
|
2130
2136
|
requiredText: $,
|
|
2131
2137
|
useWrapper: H,
|
|
2132
2138
|
children: /* @__PURE__ */ m("div", { className: "pkt-input__container", children: [
|
|
2133
|
-
V && /* @__PURE__ */
|
|
2134
|
-
/* @__PURE__ */
|
|
2139
|
+
V && /* @__PURE__ */ l("div", { className: "pkt-input-prefix", children: V }),
|
|
2140
|
+
/* @__PURE__ */ l(
|
|
2135
2141
|
"input",
|
|
2136
2142
|
{
|
|
2137
2143
|
ref: G,
|
|
@@ -2140,7 +2146,7 @@ const pr = z(
|
|
|
2140
2146
|
name: R || e,
|
|
2141
2147
|
id: e,
|
|
2142
2148
|
placeholder: A,
|
|
2143
|
-
autoComplete:
|
|
2149
|
+
autoComplete: o,
|
|
2144
2150
|
value: M,
|
|
2145
2151
|
disabled: i,
|
|
2146
2152
|
"aria-required": b,
|
|
@@ -2152,9 +2158,9 @@ const pr = z(
|
|
|
2152
2158
|
),
|
|
2153
2159
|
I && /* @__PURE__ */ m("p", { className: "pkt-input-suffix", children: [
|
|
2154
2160
|
I,
|
|
2155
|
-
_ && /* @__PURE__ */
|
|
2161
|
+
_ && /* @__PURE__ */ l(y, { className: "pkt-input-suffix-icon", name: _ })
|
|
2156
2162
|
] }),
|
|
2157
|
-
!I && _ && /* @__PURE__ */
|
|
2163
|
+
!I && _ && /* @__PURE__ */ l(y, { className: "pkt-input-icon", name: _ })
|
|
2158
2164
|
] })
|
|
2159
2165
|
}
|
|
2160
2166
|
);
|
|
@@ -2166,8 +2172,8 @@ export {
|
|
|
2166
2172
|
rr as PktBreadcrumbs,
|
|
2167
2173
|
ye as PktButton,
|
|
2168
2174
|
ar as PktFooter,
|
|
2169
|
-
|
|
2170
|
-
|
|
2175
|
+
lr as PktFooterSimple,
|
|
2176
|
+
or as PktHeader,
|
|
2171
2177
|
y as PktIcon,
|
|
2172
2178
|
qn as PktInput,
|
|
2173
2179
|
qe as PktInputWrapper,
|