@oslokommune/punkt-react 11.9.4 → 11.10.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 +37 -0
- package/dist/components/icon/DefaultIconFetcher.d.ts +1 -1
- package/dist/components/loader/Loader.d.ts +1 -1
- package/dist/punkt-react.es.js +818 -816
- package/dist/punkt-react.umd.js +14 -14
- package/package.json +3 -3
- package/src/components/header/Header.tsx +11 -29
- package/src/components/loader/Loader.tsx +18 -8
package/dist/punkt-react.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as N from "react";
|
|
2
|
-
import H, { createContext as pn, useState as le, useContext as fn, useEffect as Je, forwardRef as
|
|
2
|
+
import H, { createContext as pn, useState as le, useContext as fn, useEffect as Je, forwardRef as W, useRef as Et, Fragment as dn } from "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
function mn(e) {
|
|
5
5
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -19,18 +19,18 @@ function hn() {
|
|
|
19
19
|
if (_t)
|
|
20
20
|
return ue;
|
|
21
21
|
_t = 1;
|
|
22
|
-
var e = H, n = Symbol.for("react.element"),
|
|
23
|
-
function o
|
|
24
|
-
var d, k = {}, v = null,
|
|
25
|
-
u !== void 0 && (v = "" + u), p.key !== void 0 && (v = "" + p.key), p.ref !== void 0 && (
|
|
22
|
+
var e = H, n = Symbol.for("react.element"), r = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
23
|
+
function c(o, p, u) {
|
|
24
|
+
var d, k = {}, v = null, S = null;
|
|
25
|
+
u !== void 0 && (v = "" + u), p.key !== void 0 && (v = "" + p.key), p.ref !== void 0 && (S = p.ref);
|
|
26
26
|
for (d in p)
|
|
27
27
|
l.call(p, d) && !s.hasOwnProperty(d) && (k[d] = p[d]);
|
|
28
|
-
if (
|
|
29
|
-
for (d in p =
|
|
28
|
+
if (o && o.defaultProps)
|
|
29
|
+
for (d in p = o.defaultProps, p)
|
|
30
30
|
k[d] === void 0 && (k[d] = p[d]);
|
|
31
|
-
return { $$typeof: n, type:
|
|
31
|
+
return { $$typeof: n, type: o, key: v, ref: S, props: k, _owner: i.current };
|
|
32
32
|
}
|
|
33
|
-
return ue.Fragment =
|
|
33
|
+
return ue.Fragment = r, ue.jsx = c, ue.jsxs = c, ue;
|
|
34
34
|
}
|
|
35
35
|
var pe = {};
|
|
36
36
|
/**
|
|
@@ -42,10 +42,10 @@ var pe = {};
|
|
|
42
42
|
* This source code is licensed under the MIT license found in the
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
44
|
*/
|
|
45
|
-
var
|
|
45
|
+
var gt;
|
|
46
46
|
function kn() {
|
|
47
|
-
return
|
|
48
|
-
var e = H, n = Symbol.for("react.element"),
|
|
47
|
+
return gt || (gt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
48
|
+
var e = H, n = Symbol.for("react.element"), r = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), o = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), x = Symbol.iterator, T = "@@iterator";
|
|
49
49
|
function j(t) {
|
|
50
50
|
if (t === null || typeof t != "object")
|
|
51
51
|
return null;
|
|
@@ -53,7 +53,7 @@ function kn() {
|
|
|
53
53
|
return typeof f == "function" ? f : null;
|
|
54
54
|
}
|
|
55
55
|
var y = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
56
|
-
function
|
|
56
|
+
function E(t) {
|
|
57
57
|
{
|
|
58
58
|
for (var f = arguments.length, m = new Array(f > 1 ? f - 1 : 0), b = 1; b < f; b++)
|
|
59
59
|
m[b - 1] = arguments[b];
|
|
@@ -64,46 +64,46 @@ function kn() {
|
|
|
64
64
|
{
|
|
65
65
|
var b = y.ReactDebugCurrentFrame, P = b.getStackAddendum();
|
|
66
66
|
P !== "" && (f += "%s", m = m.concat([P]));
|
|
67
|
-
var
|
|
68
|
-
return String(
|
|
67
|
+
var O = m.map(function(R) {
|
|
68
|
+
return String(R);
|
|
69
69
|
});
|
|
70
|
-
|
|
70
|
+
O.unshift("Warning: " + f), Function.prototype.apply.call(console[t], console, O);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
var
|
|
74
|
-
|
|
75
|
-
function
|
|
76
|
-
return !!(typeof t == "string" || typeof t == "function" || t === l || t === s ||
|
|
73
|
+
var $ = !1, L = !1, B = !1, A = !1, z = !1, V;
|
|
74
|
+
V = Symbol.for("react.module.reference");
|
|
75
|
+
function q(t) {
|
|
76
|
+
return !!(typeof t == "string" || typeof t == "function" || t === l || t === s || z || t === i || t === u || t === d || A || t === S || $ || L || B || typeof t == "object" && t !== null && (t.$$typeof === v || t.$$typeof === k || t.$$typeof === c || t.$$typeof === o || t.$$typeof === p || // This needs to include all possible module reference object
|
|
77
77
|
// types supported by any Flight configuration anywhere since
|
|
78
78
|
// we don't know which Flight build this will end up being used
|
|
79
79
|
// with.
|
|
80
|
-
t.$$typeof ===
|
|
80
|
+
t.$$typeof === V || t.getModuleId !== void 0));
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function K(t, f, m) {
|
|
83
83
|
var b = t.displayName;
|
|
84
84
|
if (b)
|
|
85
85
|
return b;
|
|
86
86
|
var P = f.displayName || f.name || "";
|
|
87
87
|
return P !== "" ? m + "(" + P + ")" : m;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function M(t) {
|
|
90
90
|
return t.displayName || "Context";
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function g(t) {
|
|
93
93
|
if (t == null)
|
|
94
94
|
return null;
|
|
95
|
-
if (typeof t.tag == "number" &&
|
|
95
|
+
if (typeof t.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
|
|
96
96
|
return t.displayName || t.name || null;
|
|
97
97
|
if (typeof t == "string")
|
|
98
98
|
return t;
|
|
99
99
|
switch (t) {
|
|
100
100
|
case l:
|
|
101
101
|
return "Fragment";
|
|
102
|
-
case
|
|
102
|
+
case r:
|
|
103
103
|
return "Portal";
|
|
104
104
|
case s:
|
|
105
105
|
return "Profiler";
|
|
106
|
-
case
|
|
106
|
+
case i:
|
|
107
107
|
return "StrictMode";
|
|
108
108
|
case u:
|
|
109
109
|
return "Suspense";
|
|
@@ -112,21 +112,21 @@ function kn() {
|
|
|
112
112
|
}
|
|
113
113
|
if (typeof t == "object")
|
|
114
114
|
switch (t.$$typeof) {
|
|
115
|
-
case c:
|
|
116
|
-
var f = t;
|
|
117
|
-
return g(f) + ".Consumer";
|
|
118
115
|
case o:
|
|
116
|
+
var f = t;
|
|
117
|
+
return M(f) + ".Consumer";
|
|
118
|
+
case c:
|
|
119
119
|
var m = t;
|
|
120
|
-
return
|
|
120
|
+
return M(m._context) + ".Provider";
|
|
121
121
|
case p:
|
|
122
|
-
return
|
|
122
|
+
return K(t, t.render, "ForwardRef");
|
|
123
123
|
case k:
|
|
124
124
|
var b = t.displayName || null;
|
|
125
|
-
return b !== null ? b :
|
|
125
|
+
return b !== null ? b : g(t.type) || "Memo";
|
|
126
126
|
case v: {
|
|
127
|
-
var P = t,
|
|
127
|
+
var P = t, O = P._payload, R = P._init;
|
|
128
128
|
try {
|
|
129
|
-
return
|
|
129
|
+
return g(R(O));
|
|
130
130
|
} catch {
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
@@ -134,13 +134,13 @@ function kn() {
|
|
|
134
134
|
}
|
|
135
135
|
return null;
|
|
136
136
|
}
|
|
137
|
-
var
|
|
137
|
+
var F = Object.assign, J = 0, ee, te, oe, Qe, et, tt, nt;
|
|
138
138
|
function rt() {
|
|
139
139
|
}
|
|
140
140
|
rt.__reactDisabledLog = !0;
|
|
141
141
|
function At() {
|
|
142
142
|
{
|
|
143
|
-
if (
|
|
143
|
+
if (J === 0) {
|
|
144
144
|
ee = console.log, te = console.info, oe = console.warn, Qe = console.error, et = console.group, tt = console.groupCollapsed, nt = console.groupEnd;
|
|
145
145
|
var t = {
|
|
146
146
|
configurable: !0,
|
|
@@ -158,42 +158,42 @@ function kn() {
|
|
|
158
158
|
groupEnd: t
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
|
-
|
|
161
|
+
J++;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
function Vt() {
|
|
165
165
|
{
|
|
166
|
-
if (
|
|
166
|
+
if (J--, J === 0) {
|
|
167
167
|
var t = {
|
|
168
168
|
configurable: !0,
|
|
169
169
|
enumerable: !0,
|
|
170
170
|
writable: !0
|
|
171
171
|
};
|
|
172
172
|
Object.defineProperties(console, {
|
|
173
|
-
log:
|
|
173
|
+
log: F({}, t, {
|
|
174
174
|
value: ee
|
|
175
175
|
}),
|
|
176
|
-
info:
|
|
176
|
+
info: F({}, t, {
|
|
177
177
|
value: te
|
|
178
178
|
}),
|
|
179
|
-
warn:
|
|
179
|
+
warn: F({}, t, {
|
|
180
180
|
value: oe
|
|
181
181
|
}),
|
|
182
|
-
error:
|
|
182
|
+
error: F({}, t, {
|
|
183
183
|
value: Qe
|
|
184
184
|
}),
|
|
185
|
-
group:
|
|
185
|
+
group: F({}, t, {
|
|
186
186
|
value: et
|
|
187
187
|
}),
|
|
188
|
-
groupCollapsed:
|
|
188
|
+
groupCollapsed: F({}, t, {
|
|
189
189
|
value: tt
|
|
190
190
|
}),
|
|
191
|
-
groupEnd:
|
|
191
|
+
groupEnd: F({}, t, {
|
|
192
192
|
value: nt
|
|
193
193
|
})
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
|
-
|
|
196
|
+
J < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
var Pe = y.ReactCurrentDispatcher, Te;
|
|
@@ -227,31 +227,31 @@ function kn() {
|
|
|
227
227
|
Oe = !0;
|
|
228
228
|
var P = Error.prepareStackTrace;
|
|
229
229
|
Error.prepareStackTrace = void 0;
|
|
230
|
-
var
|
|
231
|
-
|
|
230
|
+
var O;
|
|
231
|
+
O = Pe.current, Pe.current = null, At();
|
|
232
232
|
try {
|
|
233
233
|
if (f) {
|
|
234
|
-
var
|
|
234
|
+
var R = function() {
|
|
235
235
|
throw Error();
|
|
236
236
|
};
|
|
237
|
-
if (Object.defineProperty(
|
|
237
|
+
if (Object.defineProperty(R.prototype, "props", {
|
|
238
238
|
set: function() {
|
|
239
239
|
throw Error();
|
|
240
240
|
}
|
|
241
241
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
242
242
|
try {
|
|
243
|
-
Reflect.construct(
|
|
243
|
+
Reflect.construct(R, []);
|
|
244
244
|
} catch (Z) {
|
|
245
245
|
b = Z;
|
|
246
246
|
}
|
|
247
|
-
Reflect.construct(t, [],
|
|
247
|
+
Reflect.construct(t, [], R);
|
|
248
248
|
} else {
|
|
249
249
|
try {
|
|
250
|
-
|
|
250
|
+
R.call();
|
|
251
251
|
} catch (Z) {
|
|
252
252
|
b = Z;
|
|
253
253
|
}
|
|
254
|
-
t.call(
|
|
254
|
+
t.call(R.prototype);
|
|
255
255
|
}
|
|
256
256
|
} else {
|
|
257
257
|
try {
|
|
@@ -264,24 +264,24 @@ function kn() {
|
|
|
264
264
|
} catch (Z) {
|
|
265
265
|
if (Z && b && typeof Z.stack == "string") {
|
|
266
266
|
for (var C = Z.stack.split(`
|
|
267
|
-
`),
|
|
268
|
-
`),
|
|
269
|
-
|
|
270
|
-
for (;
|
|
271
|
-
if (C[
|
|
272
|
-
if (
|
|
267
|
+
`), Y = b.stack.split(`
|
|
268
|
+
`), D = C.length - 1, U = Y.length - 1; D >= 1 && U >= 0 && C[D] !== Y[U]; )
|
|
269
|
+
U--;
|
|
270
|
+
for (; D >= 1 && U >= 0; D--, U--)
|
|
271
|
+
if (C[D] !== Y[U]) {
|
|
272
|
+
if (D !== 1 || U !== 1)
|
|
273
273
|
do
|
|
274
|
-
if (
|
|
275
|
-
var
|
|
276
|
-
` + C[
|
|
277
|
-
return t.displayName &&
|
|
274
|
+
if (D--, U--, U < 0 || C[D] !== Y[U]) {
|
|
275
|
+
var G = `
|
|
276
|
+
` + C[D].replace(" at new ", " at ");
|
|
277
|
+
return t.displayName && G.includes("<anonymous>") && (G = G.replace("<anonymous>", t.displayName)), typeof t == "function" && ve.set(t, G), G;
|
|
278
278
|
}
|
|
279
|
-
while (
|
|
279
|
+
while (D >= 1 && U >= 0);
|
|
280
280
|
break;
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
} finally {
|
|
284
|
-
Oe = !1, Pe.current =
|
|
284
|
+
Oe = !1, Pe.current = O, Vt(), Error.prepareStackTrace = P;
|
|
285
285
|
}
|
|
286
286
|
var re = t ? t.displayName || t.name : "", vt = re ? ke(re) : "";
|
|
287
287
|
return typeof t == "function" && ve.set(t, vt), vt;
|
|
@@ -313,17 +313,17 @@ function kn() {
|
|
|
313
313
|
case k:
|
|
314
314
|
return _e(t.type, f, m);
|
|
315
315
|
case v: {
|
|
316
|
-
var b = t, P = b._payload,
|
|
316
|
+
var b = t, P = b._payload, O = b._init;
|
|
317
317
|
try {
|
|
318
|
-
return _e(
|
|
318
|
+
return _e(O(P), f, m);
|
|
319
319
|
} catch {
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
return "";
|
|
324
324
|
}
|
|
325
|
-
var
|
|
326
|
-
function
|
|
325
|
+
var ge = Object.prototype.hasOwnProperty, lt = {}, it = y.ReactDebugCurrentFrame;
|
|
326
|
+
function be(t) {
|
|
327
327
|
if (t) {
|
|
328
328
|
var f = t._owner, m = _e(t.type, t._source, f ? f.type : null);
|
|
329
329
|
it.setExtraStackFrame(m);
|
|
@@ -332,20 +332,20 @@ function kn() {
|
|
|
332
332
|
}
|
|
333
333
|
function Yt(t, f, m, b, P) {
|
|
334
334
|
{
|
|
335
|
-
var
|
|
336
|
-
for (var
|
|
337
|
-
if (
|
|
335
|
+
var O = Function.call.bind(ge);
|
|
336
|
+
for (var R in t)
|
|
337
|
+
if (O(t, R)) {
|
|
338
338
|
var C = void 0;
|
|
339
339
|
try {
|
|
340
|
-
if (typeof t[
|
|
341
|
-
var
|
|
342
|
-
throw
|
|
340
|
+
if (typeof t[R] != "function") {
|
|
341
|
+
var Y = Error((b || "React class") + ": " + m + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
342
|
+
throw Y.name = "Invariant Violation", Y;
|
|
343
343
|
}
|
|
344
|
-
C = t[
|
|
345
|
-
} catch (
|
|
346
|
-
C =
|
|
344
|
+
C = t[R](f, R, b, m, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
345
|
+
} catch (D) {
|
|
346
|
+
C = D;
|
|
347
347
|
}
|
|
348
|
-
C && !(C instanceof Error) && (
|
|
348
|
+
C && !(C instanceof Error) && (be(P), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", b || "React class", m, R, typeof C), be(null)), C instanceof Error && !(C.message in lt) && (lt[C.message] = !0, be(P), E("Failed %s type: %s", m, C.message), be(null));
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
}
|
|
@@ -371,7 +371,7 @@ function kn() {
|
|
|
371
371
|
}
|
|
372
372
|
function ot(t) {
|
|
373
373
|
if (zt(t))
|
|
374
|
-
return
|
|
374
|
+
return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Jt(t)), st(t);
|
|
375
375
|
}
|
|
376
376
|
var ce = y.ReactCurrentOwner, Gt = {
|
|
377
377
|
key: !0,
|
|
@@ -381,7 +381,7 @@ function kn() {
|
|
|
381
381
|
}, ct, ut, je;
|
|
382
382
|
je = {};
|
|
383
383
|
function qt(t) {
|
|
384
|
-
if (
|
|
384
|
+
if (ge.call(t, "ref")) {
|
|
385
385
|
var f = Object.getOwnPropertyDescriptor(t, "ref").get;
|
|
386
386
|
if (f && f.isReactWarning)
|
|
387
387
|
return !1;
|
|
@@ -389,7 +389,7 @@ function kn() {
|
|
|
389
389
|
return t.ref !== void 0;
|
|
390
390
|
}
|
|
391
391
|
function Ht(t) {
|
|
392
|
-
if (
|
|
392
|
+
if (ge.call(t, "key")) {
|
|
393
393
|
var f = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
394
394
|
if (f && f.isReactWarning)
|
|
395
395
|
return !1;
|
|
@@ -398,14 +398,14 @@ function kn() {
|
|
|
398
398
|
}
|
|
399
399
|
function Xt(t, f) {
|
|
400
400
|
if (typeof t.ref == "string" && ce.current && f && ce.current.stateNode !== f) {
|
|
401
|
-
var m =
|
|
402
|
-
je[m] || (
|
|
401
|
+
var m = g(ce.current.type);
|
|
402
|
+
je[m] || (E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', g(ce.current.type), t.ref), je[m] = !0);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
function Zt(t, f) {
|
|
406
406
|
{
|
|
407
407
|
var m = function() {
|
|
408
|
-
ct || (ct = !0,
|
|
408
|
+
ct || (ct = !0, E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
|
|
409
409
|
};
|
|
410
410
|
m.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
411
411
|
get: m,
|
|
@@ -416,7 +416,7 @@ function kn() {
|
|
|
416
416
|
function Qt(t, f) {
|
|
417
417
|
{
|
|
418
418
|
var m = function() {
|
|
419
|
-
ut || (ut = !0,
|
|
419
|
+
ut || (ut = !0, E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
|
|
420
420
|
};
|
|
421
421
|
m.isReactWarning = !0, Object.defineProperty(t, "ref", {
|
|
422
422
|
get: m,
|
|
@@ -424,7 +424,7 @@ function kn() {
|
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
|
-
var en = function(t, f, m, b, P,
|
|
427
|
+
var en = function(t, f, m, b, P, O, R) {
|
|
428
428
|
var C = {
|
|
429
429
|
// This tag allows us to uniquely identify this as a React Element
|
|
430
430
|
$$typeof: n,
|
|
@@ -432,9 +432,9 @@ function kn() {
|
|
|
432
432
|
type: t,
|
|
433
433
|
key: f,
|
|
434
434
|
ref: m,
|
|
435
|
-
props:
|
|
435
|
+
props: R,
|
|
436
436
|
// Record the component responsible for creating this element.
|
|
437
|
-
_owner:
|
|
437
|
+
_owner: O
|
|
438
438
|
};
|
|
439
439
|
return C._store = {}, Object.defineProperty(C._store, "validated", {
|
|
440
440
|
configurable: !1,
|
|
@@ -455,20 +455,20 @@ function kn() {
|
|
|
455
455
|
};
|
|
456
456
|
function tn(t, f, m, b, P) {
|
|
457
457
|
{
|
|
458
|
-
var
|
|
459
|
-
m !== void 0 && (ot(m), C = "" + m), Ht(f) && (ot(f.key), C = "" + f.key), qt(f) && (
|
|
460
|
-
for (
|
|
461
|
-
|
|
458
|
+
var O, R = {}, C = null, Y = null;
|
|
459
|
+
m !== void 0 && (ot(m), C = "" + m), Ht(f) && (ot(f.key), C = "" + f.key), qt(f) && (Y = f.ref, Xt(f, P));
|
|
460
|
+
for (O in f)
|
|
461
|
+
ge.call(f, O) && !Gt.hasOwnProperty(O) && (R[O] = f[O]);
|
|
462
462
|
if (t && t.defaultProps) {
|
|
463
|
-
var
|
|
464
|
-
for (
|
|
465
|
-
|
|
463
|
+
var D = t.defaultProps;
|
|
464
|
+
for (O in D)
|
|
465
|
+
R[O] === void 0 && (R[O] = D[O]);
|
|
466
466
|
}
|
|
467
|
-
if (C ||
|
|
468
|
-
var
|
|
469
|
-
C && Zt(
|
|
467
|
+
if (C || Y) {
|
|
468
|
+
var U = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
|
|
469
|
+
C && Zt(R, U), Y && Qt(R, U);
|
|
470
470
|
}
|
|
471
|
-
return en(t, C,
|
|
471
|
+
return en(t, C, Y, P, b, ce.current, R);
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
var De = y.ReactCurrentOwner, pt = y.ReactDebugCurrentFrame;
|
|
@@ -487,7 +487,7 @@ function kn() {
|
|
|
487
487
|
function ft() {
|
|
488
488
|
{
|
|
489
489
|
if (De.current) {
|
|
490
|
-
var t =
|
|
490
|
+
var t = g(De.current.type);
|
|
491
491
|
if (t)
|
|
492
492
|
return `
|
|
493
493
|
|
|
@@ -530,7 +530,7 @@ Check the top-level render call using <` + m + ">.");
|
|
|
530
530
|
return;
|
|
531
531
|
dt[m] = !0;
|
|
532
532
|
var b = "";
|
|
533
|
-
t && t._owner && t._owner !== De.current && (b = " It was passed a child from " +
|
|
533
|
+
t && t._owner && t._owner !== De.current && (b = " It was passed a child from " + g(t._owner.type) + "."), ne(t), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', m, b), ne(null);
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
function ht(t, f) {
|
|
@@ -547,8 +547,8 @@ Check the top-level render call using <` + m + ">.");
|
|
|
547
547
|
else if (t) {
|
|
548
548
|
var P = j(t);
|
|
549
549
|
if (typeof P == "function" && P !== t.entries)
|
|
550
|
-
for (var
|
|
551
|
-
Le(
|
|
550
|
+
for (var O = P.call(t), R; !(R = O.next()).done; )
|
|
551
|
+
Le(R.value) && mt(R.value, f);
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
}
|
|
@@ -567,14 +567,14 @@ Check the top-level render call using <` + m + ">.");
|
|
|
567
567
|
else
|
|
568
568
|
return;
|
|
569
569
|
if (m) {
|
|
570
|
-
var b =
|
|
570
|
+
var b = g(f);
|
|
571
571
|
Yt(m, t.props, "prop", b, t);
|
|
572
572
|
} else if (f.PropTypes !== void 0 && !Ie) {
|
|
573
573
|
Ie = !0;
|
|
574
|
-
var P =
|
|
575
|
-
|
|
574
|
+
var P = g(f);
|
|
575
|
+
E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", P || "Unknown");
|
|
576
576
|
}
|
|
577
|
-
typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved &&
|
|
577
|
+
typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
580
|
function ln(t) {
|
|
@@ -582,41 +582,41 @@ Check the top-level render call using <` + m + ">.");
|
|
|
582
582
|
for (var f = Object.keys(t.props), m = 0; m < f.length; m++) {
|
|
583
583
|
var b = f[m];
|
|
584
584
|
if (b !== "children" && b !== "key") {
|
|
585
|
-
ne(t),
|
|
585
|
+
ne(t), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", b), ne(null);
|
|
586
586
|
break;
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
t.ref !== null && (ne(t),
|
|
589
|
+
t.ref !== null && (ne(t), E("Invalid attribute `ref` supplied to `React.Fragment`."), ne(null));
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
function kt(t, f, m, b, P,
|
|
592
|
+
function kt(t, f, m, b, P, O) {
|
|
593
593
|
{
|
|
594
|
-
var
|
|
595
|
-
if (!
|
|
594
|
+
var R = q(t);
|
|
595
|
+
if (!R) {
|
|
596
596
|
var C = "";
|
|
597
597
|
(t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
598
|
-
var
|
|
599
|
-
|
|
600
|
-
var
|
|
601
|
-
t === null ?
|
|
598
|
+
var Y = nn(P);
|
|
599
|
+
Y ? C += Y : C += ft();
|
|
600
|
+
var D;
|
|
601
|
+
t === null ? D = "null" : $e(t) ? D = "array" : t !== void 0 && t.$$typeof === n ? (D = "<" + (g(t.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : D = typeof t, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, C);
|
|
602
602
|
}
|
|
603
|
-
var
|
|
604
|
-
if (
|
|
605
|
-
return
|
|
606
|
-
if (
|
|
607
|
-
var
|
|
608
|
-
if (
|
|
603
|
+
var U = tn(t, f, m, P, O);
|
|
604
|
+
if (U == null)
|
|
605
|
+
return U;
|
|
606
|
+
if (R) {
|
|
607
|
+
var G = f.children;
|
|
608
|
+
if (G !== void 0)
|
|
609
609
|
if (b)
|
|
610
|
-
if ($e(
|
|
611
|
-
for (var re = 0; re <
|
|
612
|
-
ht(
|
|
613
|
-
Object.freeze && Object.freeze(
|
|
610
|
+
if ($e(G)) {
|
|
611
|
+
for (var re = 0; re < G.length; re++)
|
|
612
|
+
ht(G[re], t);
|
|
613
|
+
Object.freeze && Object.freeze(G);
|
|
614
614
|
} else
|
|
615
|
-
|
|
615
|
+
E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
616
616
|
else
|
|
617
|
-
ht(
|
|
617
|
+
ht(G, t);
|
|
618
618
|
}
|
|
619
|
-
return t === l ? ln(
|
|
619
|
+
return t === l ? ln(U) : an(U), U;
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
622
|
function sn(t, f, m) {
|
|
@@ -631,50 +631,50 @@ Check the top-level render call using <` + m + ">.");
|
|
|
631
631
|
}
|
|
632
632
|
process.env.NODE_ENV === "production" ? We.exports = hn() : We.exports = kn();
|
|
633
633
|
var ze = We.exports;
|
|
634
|
-
const X = ze.Fragment,
|
|
634
|
+
const X = ze.Fragment, a = ze.jsx, h = ze.jsxs, Fe = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', vn = "https://punkt-cdn.oslo.kommune.no/11.10/icons/";
|
|
635
635
|
function _n(e) {
|
|
636
636
|
return new Promise((n) => setTimeout(n, e));
|
|
637
637
|
}
|
|
638
|
-
const Ue = {},
|
|
639
|
-
let
|
|
640
|
-
for (; Ue[n + e + ".svg"] === "fetching" && (
|
|
638
|
+
const Ue = {}, gn = async (e, n) => {
|
|
639
|
+
let r = 0;
|
|
640
|
+
for (; Ue[n + e + ".svg"] === "fetching" && (r++, !(r > 50)); )
|
|
641
641
|
await _n(50);
|
|
642
642
|
return localStorage.getItem(n + e + ".svg") ? Promise.resolve(localStorage.getItem(n + e + ".svg")) : typeof window.fetch == "function" ? (Ue[n + e + ".svg"] = "fetching", Promise.resolve(
|
|
643
643
|
fetch(n + e + ".svg").then((l) => l.ok ? l.text() : (console.error("Missing icon: " + n + e + ".svg"), Fe)).then((l) => (l !== Fe && localStorage.setItem(n + e + ".svg", l), Ue[n + e + ".svg"] = "fetched", l))
|
|
644
644
|
)) : Promise.resolve(Fe);
|
|
645
|
-
},
|
|
646
|
-
fetchIcon: async (e, n) =>
|
|
647
|
-
}, Nn = pn(
|
|
648
|
-
const [
|
|
645
|
+
}, bn = {
|
|
646
|
+
fetchIcon: async (e, n) => gn(e, n || vn)
|
|
647
|
+
}, Nn = pn(bn), w = ({ name: e, path: n, className: r = "", ...l }) => {
|
|
648
|
+
const [i, s] = le(null), c = fn(Nn);
|
|
649
649
|
return Je(() => {
|
|
650
|
-
e ?
|
|
651
|
-
}, [e, n]),
|
|
650
|
+
e ? c.fetchIcon(e, n).then(s) : s(null);
|
|
651
|
+
}, [e, n]), i ? /* @__PURE__ */ a(
|
|
652
652
|
"span",
|
|
653
653
|
{
|
|
654
|
-
className: `pkt-icon ${
|
|
655
|
-
dangerouslySetInnerHTML: { __html:
|
|
654
|
+
className: `pkt-icon ${r}`,
|
|
655
|
+
dangerouslySetInnerHTML: { __html: i },
|
|
656
656
|
...l
|
|
657
657
|
}
|
|
658
658
|
) : null;
|
|
659
|
-
}, yn =
|
|
659
|
+
}, yn = W(
|
|
660
660
|
({
|
|
661
661
|
children: e,
|
|
662
662
|
className: n,
|
|
663
|
-
skin:
|
|
663
|
+
skin: r = "info",
|
|
664
664
|
closeAlert: l = !1,
|
|
665
|
-
onClose:
|
|
665
|
+
onClose: i,
|
|
666
666
|
title: s,
|
|
667
|
-
date:
|
|
668
|
-
ariaLive:
|
|
667
|
+
date: c,
|
|
668
|
+
ariaLive: o = "polite",
|
|
669
669
|
compact: p = !1,
|
|
670
670
|
...u
|
|
671
671
|
}, d) => {
|
|
672
|
-
const k = [n, "pkt-alert",
|
|
673
|
-
|
|
672
|
+
const k = [n, "pkt-alert", r && `pkt-alert--${r}`, p && "pkt-alert--compact"].filter(Boolean).join(" "), [v, S] = le(!0), x = () => {
|
|
673
|
+
S(!1), i && i();
|
|
674
674
|
};
|
|
675
|
-
return v ? /* @__PURE__ */ h("div", { ...u, className: k, "aria-live":
|
|
676
|
-
|
|
677
|
-
l && /* @__PURE__ */
|
|
675
|
+
return v ? /* @__PURE__ */ h("div", { ...u, className: k, "aria-live": o, ref: d, children: [
|
|
676
|
+
r === "🐣" ? /* @__PURE__ */ a("span", { className: "pkt-icon pkt-alert__icon", children: "🐣" }) : /* @__PURE__ */ a(w, { className: "pkt-alert__icon", name: r === "info" ? "alert-information" : `alert-${r}` }),
|
|
677
|
+
l && /* @__PURE__ */ a("div", { className: "pkt-alert__close", children: /* @__PURE__ */ a(
|
|
678
678
|
"button",
|
|
679
679
|
{
|
|
680
680
|
type: "button",
|
|
@@ -682,28 +682,28 @@ const Ue = {}, bn = async (e, n) => {
|
|
|
682
682
|
tabIndex: 0,
|
|
683
683
|
"aria-label": "close",
|
|
684
684
|
onClick: x,
|
|
685
|
-
children: /* @__PURE__ */
|
|
685
|
+
children: /* @__PURE__ */ a(w, { name: "close", className: "pkt-btn__icon", "aria-hidden": "true" })
|
|
686
686
|
}
|
|
687
687
|
) }),
|
|
688
|
-
s && /* @__PURE__ */
|
|
689
|
-
/* @__PURE__ */
|
|
690
|
-
|
|
688
|
+
s && /* @__PURE__ */ a("div", { className: "pkt-alert__title", children: s }),
|
|
689
|
+
/* @__PURE__ */ a("div", { className: "pkt-alert__text", children: e }),
|
|
690
|
+
c && /* @__PURE__ */ h("div", { className: "pkt-alert__date", children: [
|
|
691
691
|
"Sist oppdatert: ",
|
|
692
|
-
|
|
692
|
+
c
|
|
693
693
|
] })
|
|
694
694
|
] }) : null;
|
|
695
695
|
}
|
|
696
|
-
), _r =
|
|
697
|
-
({ href: e, text: n, onClick:
|
|
698
|
-
const
|
|
696
|
+
), _r = W(
|
|
697
|
+
({ href: e, text: n, onClick: r, className: l, ...i }, s) => {
|
|
698
|
+
const c = [
|
|
699
699
|
l,
|
|
700
700
|
"pkt-back-link"
|
|
701
701
|
].filter(Boolean).join(" ");
|
|
702
|
-
return /* @__PURE__ */
|
|
703
|
-
|
|
704
|
-
}, ...
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
/* @__PURE__ */
|
|
702
|
+
return /* @__PURE__ */ a("nav", { ref: s, className: c, "aria-label": "Gå tilbake et steg", children: /* @__PURE__ */ h("a", { href: e || "/", className: "pkt-link pkt-link--icon-left", onClick: (p) => {
|
|
703
|
+
r && r(p);
|
|
704
|
+
}, ...i, children: [
|
|
705
|
+
/* @__PURE__ */ a(w, { className: "pkt-back-link__icon pkt-icon pkt-link__icon", name: "chevron-thin-left", "aria-hidden": "true" }),
|
|
706
|
+
/* @__PURE__ */ a("span", { className: "pkt-back-link__text", children: n || "Forsiden" })
|
|
707
707
|
] }) });
|
|
708
708
|
}
|
|
709
709
|
);
|
|
@@ -720,18 +720,18 @@ const Ue = {}, bn = async (e, n) => {
|
|
|
720
720
|
function Be() {
|
|
721
721
|
return Be = Object.assign ? Object.assign.bind() : function(e) {
|
|
722
722
|
for (var n = 1; n < arguments.length; n++) {
|
|
723
|
-
var
|
|
724
|
-
for (var l in
|
|
725
|
-
Object.prototype.hasOwnProperty.call(
|
|
723
|
+
var r = arguments[n];
|
|
724
|
+
for (var l in r)
|
|
725
|
+
Object.prototype.hasOwnProperty.call(r, l) && (e[l] = r[l]);
|
|
726
726
|
}
|
|
727
727
|
return e;
|
|
728
728
|
}, Be.apply(this, arguments);
|
|
729
729
|
}
|
|
730
|
-
var
|
|
730
|
+
var bt;
|
|
731
731
|
(function(e) {
|
|
732
732
|
e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE";
|
|
733
|
-
})(
|
|
734
|
-
function
|
|
733
|
+
})(bt || (bt = {}));
|
|
734
|
+
function I(e, n) {
|
|
735
735
|
if (e === !1 || e === null || typeof e > "u")
|
|
736
736
|
throw new Error(n);
|
|
737
737
|
}
|
|
@@ -747,16 +747,16 @@ function ie(e, n) {
|
|
|
747
747
|
function Me(e) {
|
|
748
748
|
let {
|
|
749
749
|
pathname: n = "/",
|
|
750
|
-
search:
|
|
750
|
+
search: r = "",
|
|
751
751
|
hash: l = ""
|
|
752
752
|
} = e;
|
|
753
|
-
return
|
|
753
|
+
return r && r !== "?" && (n += r.charAt(0) === "?" ? r : "?" + r), l && l !== "#" && (n += l.charAt(0) === "#" ? l : "#" + l), n;
|
|
754
754
|
}
|
|
755
755
|
function xt(e) {
|
|
756
756
|
let n = {};
|
|
757
757
|
if (e) {
|
|
758
|
-
let
|
|
759
|
-
|
|
758
|
+
let r = e.indexOf("#");
|
|
759
|
+
r >= 0 && (n.hash = e.substr(r), e = e.substr(0, r));
|
|
760
760
|
let l = e.indexOf("?");
|
|
761
761
|
l >= 0 && (n.search = e.substr(l), e = e.substr(0, l)), e && (n.pathname = e);
|
|
762
762
|
}
|
|
@@ -772,43 +772,43 @@ function yt(e, n) {
|
|
|
772
772
|
caseSensitive: !1,
|
|
773
773
|
end: !0
|
|
774
774
|
});
|
|
775
|
-
let [
|
|
776
|
-
if (!
|
|
775
|
+
let [r, l] = wn(e.path, e.caseSensitive, e.end), i = n.match(r);
|
|
776
|
+
if (!i)
|
|
777
777
|
return null;
|
|
778
|
-
let s =
|
|
778
|
+
let s = i[0], c = s.replace(/(.)\/+$/, "$1"), o = i.slice(1);
|
|
779
779
|
return {
|
|
780
780
|
params: l.reduce((u, d, k) => {
|
|
781
781
|
let {
|
|
782
782
|
paramName: v,
|
|
783
|
-
isOptional:
|
|
783
|
+
isOptional: S
|
|
784
784
|
} = d;
|
|
785
785
|
if (v === "*") {
|
|
786
|
-
let T =
|
|
787
|
-
|
|
786
|
+
let T = o[k] || "";
|
|
787
|
+
c = s.slice(0, s.length - T.length).replace(/(.)\/+$/, "$1");
|
|
788
788
|
}
|
|
789
|
-
const x =
|
|
790
|
-
return
|
|
789
|
+
const x = o[k];
|
|
790
|
+
return S && !x ? u[v] = void 0 : u[v] = En(x || "", v), u;
|
|
791
791
|
}, {}),
|
|
792
792
|
pathname: s,
|
|
793
|
-
pathnameBase:
|
|
793
|
+
pathnameBase: c,
|
|
794
794
|
pattern: e
|
|
795
795
|
};
|
|
796
796
|
}
|
|
797
|
-
function wn(e, n,
|
|
798
|
-
n === void 0 && (n = !1),
|
|
799
|
-
let l = [],
|
|
800
|
-
paramName:
|
|
797
|
+
function wn(e, n, r) {
|
|
798
|
+
n === void 0 && (n = !1), r === void 0 && (r = !0), ie(e === "*" || !e.endsWith("*") || e.endsWith("/*"), 'Route path "' + e + '" will be treated as if it were ' + ('"' + e.replace(/\*$/, "/*") + '" because the `*` character must ') + "always follow a `/` in the pattern. To get rid of this warning, " + ('please change the route path to "' + e.replace(/\*$/, "/*") + '".'));
|
|
799
|
+
let l = [], i = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:(\w+)(\?)?/g, (c, o, p) => (l.push({
|
|
800
|
+
paramName: o,
|
|
801
801
|
isOptional: p != null
|
|
802
802
|
}), p ? "/?([^\\/]+)?" : "/([^\\/]+)"));
|
|
803
803
|
return e.endsWith("*") ? (l.push({
|
|
804
804
|
paramName: "*"
|
|
805
|
-
}),
|
|
805
|
+
}), i += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? i += "\\/*$" : e !== "" && e !== "/" && (i += "(?:(?=\\/|$))"), [new RegExp(i, n ? void 0 : "i"), l];
|
|
806
806
|
}
|
|
807
807
|
function En(e, n) {
|
|
808
808
|
try {
|
|
809
809
|
return decodeURIComponent(e);
|
|
810
|
-
} catch (
|
|
811
|
-
return ie(!1, 'The value for the URL param "' + n + '" will not be decoded because' + (' the string "' + e + '" is a malformed URL segment. This is probably') + (" due to a bad percent encoding (" +
|
|
810
|
+
} catch (r) {
|
|
811
|
+
return ie(!1, 'The value for the URL param "' + n + '" will not be decoded because' + (' the string "' + e + '" is a malformed URL segment. This is probably') + (" due to a bad percent encoding (" + r + ").")), e;
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
814
|
function fe(e, n) {
|
|
@@ -816,65 +816,65 @@ function fe(e, n) {
|
|
|
816
816
|
return e;
|
|
817
817
|
if (!e.toLowerCase().startsWith(n.toLowerCase()))
|
|
818
818
|
return null;
|
|
819
|
-
let
|
|
820
|
-
return l && l !== "/" ? null : e.slice(
|
|
819
|
+
let r = n.endsWith("/") ? n.length - 1 : n.length, l = e.charAt(r);
|
|
820
|
+
return l && l !== "/" ? null : e.slice(r) || "/";
|
|
821
821
|
}
|
|
822
822
|
function xn(e, n) {
|
|
823
823
|
n === void 0 && (n = "/");
|
|
824
824
|
let {
|
|
825
|
-
pathname:
|
|
825
|
+
pathname: r,
|
|
826
826
|
search: l = "",
|
|
827
|
-
hash:
|
|
827
|
+
hash: i = ""
|
|
828
828
|
} = typeof e == "string" ? xt(e) : e;
|
|
829
829
|
return {
|
|
830
|
-
pathname:
|
|
830
|
+
pathname: r ? r.startsWith("/") ? r : Cn(r, n) : n,
|
|
831
831
|
search: Sn(l),
|
|
832
|
-
hash: Pn(
|
|
832
|
+
hash: Pn(i)
|
|
833
833
|
};
|
|
834
834
|
}
|
|
835
835
|
function Cn(e, n) {
|
|
836
|
-
let
|
|
837
|
-
return e.split("/").forEach((
|
|
838
|
-
|
|
839
|
-
}),
|
|
836
|
+
let r = n.replace(/\/+$/, "").split("/");
|
|
837
|
+
return e.split("/").forEach((i) => {
|
|
838
|
+
i === ".." ? r.length > 1 && r.pop() : i !== "." && r.push(i);
|
|
839
|
+
}), r.length > 1 ? r.join("/") : "/";
|
|
840
840
|
}
|
|
841
|
-
function Ae(e, n,
|
|
842
|
-
return "Cannot include a '" + e + "' character in a manually specified " + ("`to." + n + "` field [" + JSON.stringify(l) + "]. Please separate it out to the ") + ("`to." +
|
|
841
|
+
function Ae(e, n, r, l) {
|
|
842
|
+
return "Cannot include a '" + e + "' character in a manually specified " + ("`to." + n + "` field [" + JSON.stringify(l) + "]. 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.';
|
|
843
843
|
}
|
|
844
844
|
function Rn(e) {
|
|
845
|
-
return e.filter((n,
|
|
845
|
+
return e.filter((n, r) => r === 0 || n.route.path && n.route.path.length > 0);
|
|
846
846
|
}
|
|
847
847
|
function Ct(e, n) {
|
|
848
|
-
let
|
|
849
|
-
return n ?
|
|
848
|
+
let r = Rn(e);
|
|
849
|
+
return n ? r.map((l, i) => i === e.length - 1 ? l.pathname : l.pathnameBase) : r.map((l) => l.pathnameBase);
|
|
850
850
|
}
|
|
851
|
-
function Rt(e, n,
|
|
851
|
+
function Rt(e, n, r, l) {
|
|
852
852
|
l === void 0 && (l = !1);
|
|
853
|
-
let
|
|
854
|
-
typeof e == "string" ?
|
|
855
|
-
let s = e === "" ||
|
|
856
|
-
if (
|
|
857
|
-
|
|
853
|
+
let i;
|
|
854
|
+
typeof e == "string" ? i = xt(e) : (i = Be({}, e), I(!i.pathname || !i.pathname.includes("?"), Ae("?", "pathname", "search", i)), I(!i.pathname || !i.pathname.includes("#"), Ae("#", "pathname", "hash", i)), I(!i.search || !i.search.includes("#"), Ae("#", "search", "hash", i)));
|
|
855
|
+
let s = e === "" || i.pathname === "", c = s ? "/" : i.pathname, o;
|
|
856
|
+
if (c == null)
|
|
857
|
+
o = r;
|
|
858
858
|
else if (l) {
|
|
859
859
|
let k = n.length === 0 ? [] : n[n.length - 1].replace(/^\//, "").split("/");
|
|
860
|
-
if (
|
|
861
|
-
let v =
|
|
860
|
+
if (c.startsWith("..")) {
|
|
861
|
+
let v = c.split("/");
|
|
862
862
|
for (; v[0] === ".."; )
|
|
863
863
|
v.shift(), k.pop();
|
|
864
|
-
|
|
864
|
+
i.pathname = v.join("/");
|
|
865
865
|
}
|
|
866
|
-
|
|
866
|
+
o = "/" + k.join("/");
|
|
867
867
|
} else {
|
|
868
868
|
let k = n.length - 1;
|
|
869
|
-
if (
|
|
870
|
-
let v =
|
|
869
|
+
if (c.startsWith("..")) {
|
|
870
|
+
let v = c.split("/");
|
|
871
871
|
for (; v[0] === ".."; )
|
|
872
872
|
v.shift(), k -= 1;
|
|
873
|
-
|
|
873
|
+
i.pathname = v.join("/");
|
|
874
874
|
}
|
|
875
|
-
|
|
875
|
+
o = k >= 0 ? n[k] : "/";
|
|
876
876
|
}
|
|
877
|
-
let p = xn(
|
|
877
|
+
let p = xn(i, o), u = c && c !== "/" && c.endsWith("/"), d = (s || c === ".") && r.endsWith("/");
|
|
878
878
|
return !p.pathname.endsWith("/") && (u || d) && (p.pathname += "/"), p;
|
|
879
879
|
}
|
|
880
880
|
const Ge = (e) => e.join("/").replace(/\/\/+/g, "/"), Sn = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Pn = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, St = ["post", "put", "patch", "delete"];
|
|
@@ -894,9 +894,9 @@ new Set(Tn);
|
|
|
894
894
|
function Ye() {
|
|
895
895
|
return Ye = Object.assign ? Object.assign.bind() : function(e) {
|
|
896
896
|
for (var n = 1; n < arguments.length; n++) {
|
|
897
|
-
var
|
|
898
|
-
for (var l in
|
|
899
|
-
Object.prototype.hasOwnProperty.call(
|
|
897
|
+
var r = arguments[n];
|
|
898
|
+
for (var l in r)
|
|
899
|
+
Object.prototype.hasOwnProperty.call(r, l) && (e[l] = r[l]);
|
|
900
900
|
}
|
|
901
901
|
return e;
|
|
902
902
|
}, Ye.apply(this, arguments);
|
|
@@ -921,27 +921,27 @@ const $n = /* @__PURE__ */ N.createContext(null);
|
|
|
921
921
|
process.env.NODE_ENV !== "production" && ($n.displayName = "RouteError");
|
|
922
922
|
function jn(e, n) {
|
|
923
923
|
let {
|
|
924
|
-
relative:
|
|
924
|
+
relative: r
|
|
925
925
|
} = n === void 0 ? {} : n;
|
|
926
|
-
He() || (process.env.NODE_ENV !== "production" ?
|
|
926
|
+
He() || (process.env.NODE_ENV !== "production" ? I(
|
|
927
927
|
!1,
|
|
928
928
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
929
929
|
// router loaded. We can help them understand how to avoid that.
|
|
930
930
|
"useHref() may be used only in the context of a <Router> component."
|
|
931
|
-
) :
|
|
931
|
+
) : I(!1));
|
|
932
932
|
let {
|
|
933
933
|
basename: l,
|
|
934
|
-
navigator:
|
|
934
|
+
navigator: i
|
|
935
935
|
} = N.useContext(Q), {
|
|
936
936
|
hash: s,
|
|
937
|
-
pathname:
|
|
938
|
-
search:
|
|
937
|
+
pathname: c,
|
|
938
|
+
search: o
|
|
939
939
|
} = he(e, {
|
|
940
|
-
relative:
|
|
941
|
-
}), p =
|
|
942
|
-
return l !== "/" && (p =
|
|
940
|
+
relative: r
|
|
941
|
+
}), p = c;
|
|
942
|
+
return l !== "/" && (p = c === "/" ? l : Ge([l, c])), i.createHref({
|
|
943
943
|
pathname: p,
|
|
944
|
-
search:
|
|
944
|
+
search: o,
|
|
945
945
|
hash: s
|
|
946
946
|
});
|
|
947
947
|
}
|
|
@@ -949,12 +949,12 @@ function He() {
|
|
|
949
949
|
return N.useContext(qe) != null;
|
|
950
950
|
}
|
|
951
951
|
function me() {
|
|
952
|
-
return He() || (process.env.NODE_ENV !== "production" ?
|
|
952
|
+
return He() || (process.env.NODE_ENV !== "production" ? I(
|
|
953
953
|
!1,
|
|
954
954
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
955
955
|
// router loaded. We can help them understand how to avoid that.
|
|
956
956
|
"useLocation() may be used only in the context of a <Router> component."
|
|
957
|
-
) :
|
|
957
|
+
) : I(!1)), N.useContext(qe).location;
|
|
958
958
|
}
|
|
959
959
|
const Tt = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
960
960
|
function Ot(e) {
|
|
@@ -967,45 +967,45 @@ function Dn() {
|
|
|
967
967
|
return e ? An() : In();
|
|
968
968
|
}
|
|
969
969
|
function In() {
|
|
970
|
-
He() || (process.env.NODE_ENV !== "production" ?
|
|
970
|
+
He() || (process.env.NODE_ENV !== "production" ? I(
|
|
971
971
|
!1,
|
|
972
972
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
973
973
|
// router loaded. We can help them understand how to avoid that.
|
|
974
974
|
"useNavigate() may be used only in the context of a <Router> component."
|
|
975
|
-
) :
|
|
975
|
+
) : I(!1));
|
|
976
976
|
let e = N.useContext(Ce), {
|
|
977
977
|
basename: n,
|
|
978
|
-
future:
|
|
978
|
+
future: r,
|
|
979
979
|
navigator: l
|
|
980
980
|
} = N.useContext(Q), {
|
|
981
|
-
matches:
|
|
981
|
+
matches: i
|
|
982
982
|
} = N.useContext(se), {
|
|
983
983
|
pathname: s
|
|
984
|
-
} = me(),
|
|
984
|
+
} = me(), c = JSON.stringify(Ct(i, r.v7_relativeSplatPath)), o = N.useRef(!1);
|
|
985
985
|
return Ot(() => {
|
|
986
|
-
|
|
986
|
+
o.current = !0;
|
|
987
987
|
}), N.useCallback(function(u, d) {
|
|
988
|
-
if (d === void 0 && (d = {}), process.env.NODE_ENV !== "production" && ie(
|
|
988
|
+
if (d === void 0 && (d = {}), process.env.NODE_ENV !== "production" && ie(o.current, Tt), !o.current)
|
|
989
989
|
return;
|
|
990
990
|
if (typeof u == "number") {
|
|
991
991
|
l.go(u);
|
|
992
992
|
return;
|
|
993
993
|
}
|
|
994
|
-
let k = Rt(u, JSON.parse(
|
|
994
|
+
let k = Rt(u, JSON.parse(c), s, d.relative === "path");
|
|
995
995
|
e == null && n !== "/" && (k.pathname = k.pathname === "/" ? n : Ge([n, k.pathname])), (d.replace ? l.replace : l.push)(k, d.state, d);
|
|
996
|
-
}, [n, l,
|
|
996
|
+
}, [n, l, c, s, e]);
|
|
997
997
|
}
|
|
998
998
|
function he(e, n) {
|
|
999
999
|
let {
|
|
1000
|
-
relative:
|
|
1000
|
+
relative: r
|
|
1001
1001
|
} = n === void 0 ? {} : n, {
|
|
1002
1002
|
future: l
|
|
1003
1003
|
} = N.useContext(Q), {
|
|
1004
|
-
matches:
|
|
1004
|
+
matches: i
|
|
1005
1005
|
} = N.useContext(se), {
|
|
1006
1006
|
pathname: s
|
|
1007
|
-
} = me(),
|
|
1008
|
-
return N.useMemo(() => Rt(e, JSON.parse(
|
|
1007
|
+
} = me(), c = JSON.stringify(Ct(i, l.v7_relativeSplatPath));
|
|
1008
|
+
return N.useMemo(() => Rt(e, JSON.parse(c), s, r === "path"), [e, c, s, r]);
|
|
1009
1009
|
}
|
|
1010
1010
|
var $t = /* @__PURE__ */ function(e) {
|
|
1011
1011
|
return e.UseBlocker = "useBlocker", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e;
|
|
@@ -1017,15 +1017,15 @@ function jt(e) {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
function Ln(e) {
|
|
1019
1019
|
let n = N.useContext(Ce);
|
|
1020
|
-
return n || (process.env.NODE_ENV !== "production" ?
|
|
1020
|
+
return n || (process.env.NODE_ENV !== "production" ? I(!1, jt(e)) : I(!1)), n;
|
|
1021
1021
|
}
|
|
1022
1022
|
function Fn(e) {
|
|
1023
1023
|
let n = N.useContext(se);
|
|
1024
|
-
return n || (process.env.NODE_ENV !== "production" ?
|
|
1024
|
+
return n || (process.env.NODE_ENV !== "production" ? I(!1, jt(e)) : I(!1)), n;
|
|
1025
1025
|
}
|
|
1026
1026
|
function Dt(e) {
|
|
1027
|
-
let n = Fn(e),
|
|
1028
|
-
return
|
|
1027
|
+
let n = Fn(e), r = n.matches[n.matches.length - 1];
|
|
1028
|
+
return r.route.id || (process.env.NODE_ENV !== "production" ? I(!1, e + ' can only be used on routes that contain a unique "id"') : I(!1)), r.route.id;
|
|
1029
1029
|
}
|
|
1030
1030
|
function Un() {
|
|
1031
1031
|
return Dt(Xe.UseRouteId);
|
|
@@ -1033,11 +1033,11 @@ function Un() {
|
|
|
1033
1033
|
function An() {
|
|
1034
1034
|
let {
|
|
1035
1035
|
router: e
|
|
1036
|
-
} = Ln($t.UseNavigateStable), n = Dt(Xe.UseNavigateStable),
|
|
1036
|
+
} = Ln($t.UseNavigateStable), n = Dt(Xe.UseNavigateStable), r = N.useRef(!1);
|
|
1037
1037
|
return Ot(() => {
|
|
1038
|
-
|
|
1039
|
-
}), N.useCallback(function(
|
|
1040
|
-
s === void 0 && (s = {}), process.env.NODE_ENV !== "production" && ie(
|
|
1038
|
+
r.current = !0;
|
|
1039
|
+
}), N.useCallback(function(i, s) {
|
|
1040
|
+
s === void 0 && (s = {}), process.env.NODE_ENV !== "production" && ie(r.current, Tt), r.current && (typeof i == "number" ? e.navigate(i) : e.navigate(i, Ye({
|
|
1041
1041
|
fromRouteId: n
|
|
1042
1042
|
}, s)));
|
|
1043
1043
|
}, [e, n]);
|
|
@@ -1057,9 +1057,9 @@ new Promise(() => {
|
|
|
1057
1057
|
function ae() {
|
|
1058
1058
|
return ae = Object.assign ? Object.assign.bind() : function(e) {
|
|
1059
1059
|
for (var n = 1; n < arguments.length; n++) {
|
|
1060
|
-
var
|
|
1061
|
-
for (var l in
|
|
1062
|
-
Object.prototype.hasOwnProperty.call(
|
|
1060
|
+
var r = arguments[n];
|
|
1061
|
+
for (var l in r)
|
|
1062
|
+
Object.prototype.hasOwnProperty.call(r, l) && (e[l] = r[l]);
|
|
1063
1063
|
}
|
|
1064
1064
|
return e;
|
|
1065
1065
|
}, ae.apply(this, arguments);
|
|
@@ -1067,10 +1067,10 @@ function ae() {
|
|
|
1067
1067
|
function Ze(e, n) {
|
|
1068
1068
|
if (e == null)
|
|
1069
1069
|
return {};
|
|
1070
|
-
var
|
|
1070
|
+
var r = {}, l = Object.keys(e), i, s;
|
|
1071
1071
|
for (s = 0; s < l.length; s++)
|
|
1072
|
-
|
|
1073
|
-
return
|
|
1072
|
+
i = l[s], !(n.indexOf(i) >= 0) && (r[i] = e[i]);
|
|
1073
|
+
return r;
|
|
1074
1074
|
}
|
|
1075
1075
|
const ye = "get", we = "application/x-www-form-urlencoded";
|
|
1076
1076
|
function Re(e) {
|
|
@@ -1112,16 +1112,16 @@ function Ve(e) {
|
|
|
1112
1112
|
return e != null && !Jn.has(e) ? (process.env.NODE_ENV !== "production" && ie(!1, '"' + e + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + we + '"')), null) : e;
|
|
1113
1113
|
}
|
|
1114
1114
|
function zn(e, n) {
|
|
1115
|
-
let
|
|
1115
|
+
let r, l, i, s, c;
|
|
1116
1116
|
if (Wn(e)) {
|
|
1117
|
-
let
|
|
1118
|
-
l =
|
|
1117
|
+
let o = e.getAttribute("action");
|
|
1118
|
+
l = o ? fe(o, n) : null, r = e.getAttribute("method") || ye, i = Ve(e.getAttribute("enctype")) || we, s = new FormData(e);
|
|
1119
1119
|
} else if (Vn(e) || Bn(e) && (e.type === "submit" || e.type === "image")) {
|
|
1120
|
-
let
|
|
1121
|
-
if (
|
|
1120
|
+
let o = e.form;
|
|
1121
|
+
if (o == null)
|
|
1122
1122
|
throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
|
|
1123
|
-
let p = e.getAttribute("formaction") ||
|
|
1124
|
-
if (l = p ? fe(p, n) : null,
|
|
1123
|
+
let p = e.getAttribute("formaction") || o.getAttribute("action");
|
|
1124
|
+
if (l = p ? fe(p, n) : null, r = e.getAttribute("formmethod") || o.getAttribute("method") || ye, i = Ve(e.getAttribute("formenctype")) || Ve(o.getAttribute("enctype")) || we, s = new FormData(o, e), !Kn()) {
|
|
1125
1125
|
let {
|
|
1126
1126
|
name: u,
|
|
1127
1127
|
type: d,
|
|
@@ -1136,14 +1136,14 @@ function zn(e, n) {
|
|
|
1136
1136
|
} else {
|
|
1137
1137
|
if (Re(e))
|
|
1138
1138
|
throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
|
|
1139
|
-
|
|
1139
|
+
r = ye, l = null, i = we, c = e;
|
|
1140
1140
|
}
|
|
1141
|
-
return s &&
|
|
1141
|
+
return s && i === "text/plain" && (c = s, s = void 0), {
|
|
1142
1142
|
action: l,
|
|
1143
|
-
method:
|
|
1144
|
-
encType:
|
|
1143
|
+
method: r.toLowerCase(),
|
|
1144
|
+
encType: i,
|
|
1145
1145
|
formData: s,
|
|
1146
|
-
body:
|
|
1146
|
+
body: c
|
|
1147
1147
|
};
|
|
1148
1148
|
}
|
|
1149
1149
|
const Gn = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "unstable_viewTransition"], qn = ["aria-current", "caseSensitive", "className", "end", "style", "to", "unstable_viewTransition", "children"], Hn = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "unstable_viewTransition"], It = /* @__PURE__ */ N.createContext({
|
|
@@ -1153,113 +1153,113 @@ process.env.NODE_ENV !== "production" && (It.displayName = "ViewTransition");
|
|
|
1153
1153
|
const Xn = /* @__PURE__ */ N.createContext(/* @__PURE__ */ new Map());
|
|
1154
1154
|
process.env.NODE_ENV !== "production" && (Xn.displayName = "Fetchers");
|
|
1155
1155
|
process.env.NODE_ENV;
|
|
1156
|
-
const Zn = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Qn = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ee = /* @__PURE__ */ N.forwardRef(function(n,
|
|
1156
|
+
const Zn = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Qn = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ee = /* @__PURE__ */ N.forwardRef(function(n, r) {
|
|
1157
1157
|
let {
|
|
1158
1158
|
onClick: l,
|
|
1159
|
-
relative:
|
|
1159
|
+
relative: i,
|
|
1160
1160
|
reloadDocument: s,
|
|
1161
|
-
replace:
|
|
1162
|
-
state:
|
|
1161
|
+
replace: c,
|
|
1162
|
+
state: o,
|
|
1163
1163
|
target: p,
|
|
1164
1164
|
to: u,
|
|
1165
1165
|
preventScrollReset: d,
|
|
1166
1166
|
unstable_viewTransition: k
|
|
1167
1167
|
} = n, v = Ze(n, Gn), {
|
|
1168
|
-
basename:
|
|
1168
|
+
basename: S
|
|
1169
1169
|
} = N.useContext(Q), x, T = !1;
|
|
1170
1170
|
if (typeof u == "string" && Qn.test(u) && (x = u, Zn))
|
|
1171
1171
|
try {
|
|
1172
|
-
let _ = new URL(window.location.href),
|
|
1173
|
-
|
|
1172
|
+
let _ = new URL(window.location.href), $ = u.startsWith("//") ? new URL(_.protocol + u) : new URL(u), L = fe($.pathname, S);
|
|
1173
|
+
$.origin === _.origin && L != null ? u = L + $.search + $.hash : T = !0;
|
|
1174
1174
|
} catch {
|
|
1175
1175
|
process.env.NODE_ENV !== "production" && ie(!1, '<Link to="' + u + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.');
|
|
1176
1176
|
}
|
|
1177
1177
|
let j = jn(u, {
|
|
1178
|
-
relative:
|
|
1178
|
+
relative: i
|
|
1179
1179
|
}), y = rr(u, {
|
|
1180
|
-
replace:
|
|
1181
|
-
state:
|
|
1180
|
+
replace: c,
|
|
1181
|
+
state: o,
|
|
1182
1182
|
target: p,
|
|
1183
1183
|
preventScrollReset: d,
|
|
1184
|
-
relative:
|
|
1184
|
+
relative: i,
|
|
1185
1185
|
unstable_viewTransition: k
|
|
1186
1186
|
});
|
|
1187
|
-
function
|
|
1187
|
+
function E(_) {
|
|
1188
1188
|
l && l(_), _.defaultPrevented || y(_);
|
|
1189
1189
|
}
|
|
1190
1190
|
return (
|
|
1191
1191
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1192
1192
|
/* @__PURE__ */ N.createElement("a", ae({}, v, {
|
|
1193
1193
|
href: x || j,
|
|
1194
|
-
onClick: T || s ? l :
|
|
1195
|
-
ref:
|
|
1194
|
+
onClick: T || s ? l : E,
|
|
1195
|
+
ref: r,
|
|
1196
1196
|
target: p
|
|
1197
1197
|
}))
|
|
1198
1198
|
);
|
|
1199
1199
|
});
|
|
1200
1200
|
process.env.NODE_ENV !== "production" && (Ee.displayName = "Link");
|
|
1201
|
-
const er = /* @__PURE__ */ N.forwardRef(function(n,
|
|
1201
|
+
const er = /* @__PURE__ */ N.forwardRef(function(n, r) {
|
|
1202
1202
|
let {
|
|
1203
1203
|
"aria-current": l = "page",
|
|
1204
|
-
caseSensitive:
|
|
1204
|
+
caseSensitive: i = !1,
|
|
1205
1205
|
className: s = "",
|
|
1206
|
-
end:
|
|
1207
|
-
style:
|
|
1206
|
+
end: c = !1,
|
|
1207
|
+
style: o,
|
|
1208
1208
|
to: p,
|
|
1209
1209
|
unstable_viewTransition: u,
|
|
1210
1210
|
children: d
|
|
1211
1211
|
} = n, k = Ze(n, qn), v = he(p, {
|
|
1212
1212
|
relative: k.relative
|
|
1213
|
-
}),
|
|
1213
|
+
}), S = me(), x = N.useContext(Pt), {
|
|
1214
1214
|
navigator: T
|
|
1215
1215
|
} = N.useContext(Q), j = x != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1216
1216
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1217
|
-
cr(v) && u === !0, y = T.encodeLocation ? T.encodeLocation(v).pathname : v.pathname,
|
|
1218
|
-
|
|
1219
|
-
const
|
|
1220
|
-
let
|
|
1221
|
-
isActive:
|
|
1222
|
-
isPending:
|
|
1217
|
+
cr(v) && u === !0, y = T.encodeLocation ? T.encodeLocation(v).pathname : v.pathname, E = S.pathname, _ = x && x.navigation && x.navigation.location ? x.navigation.location.pathname : null;
|
|
1218
|
+
i || (E = E.toLowerCase(), _ = _ ? _.toLowerCase() : null, y = y.toLowerCase());
|
|
1219
|
+
const $ = y !== "/" && y.endsWith("/") ? y.length - 1 : y.length;
|
|
1220
|
+
let L = E === y || !c && E.startsWith(y) && E.charAt($) === "/", B = _ != null && (_ === y || !c && _.startsWith(y) && _.charAt(y.length) === "/"), A = {
|
|
1221
|
+
isActive: L,
|
|
1222
|
+
isPending: B,
|
|
1223
1223
|
isTransitioning: j
|
|
1224
|
-
},
|
|
1225
|
-
typeof s == "function" ?
|
|
1226
|
-
let
|
|
1224
|
+
}, z = L ? l : void 0, V;
|
|
1225
|
+
typeof s == "function" ? V = s(A) : V = [s, L ? "active" : null, B ? "pending" : null, j ? "transitioning" : null].filter(Boolean).join(" ");
|
|
1226
|
+
let q = typeof o == "function" ? o(A) : o;
|
|
1227
1227
|
return /* @__PURE__ */ N.createElement(Ee, ae({}, k, {
|
|
1228
|
-
"aria-current":
|
|
1229
|
-
className:
|
|
1230
|
-
ref:
|
|
1231
|
-
style:
|
|
1228
|
+
"aria-current": z,
|
|
1229
|
+
className: V,
|
|
1230
|
+
ref: r,
|
|
1231
|
+
style: q,
|
|
1232
1232
|
to: p,
|
|
1233
1233
|
unstable_viewTransition: u
|
|
1234
|
-
}), typeof d == "function" ? d(
|
|
1234
|
+
}), typeof d == "function" ? d(A) : d);
|
|
1235
1235
|
});
|
|
1236
1236
|
process.env.NODE_ENV !== "production" && (er.displayName = "NavLink");
|
|
1237
1237
|
const tr = /* @__PURE__ */ N.forwardRef((e, n) => {
|
|
1238
1238
|
let {
|
|
1239
|
-
fetcherKey:
|
|
1239
|
+
fetcherKey: r,
|
|
1240
1240
|
navigate: l,
|
|
1241
|
-
reloadDocument:
|
|
1241
|
+
reloadDocument: i,
|
|
1242
1242
|
replace: s,
|
|
1243
|
-
state:
|
|
1244
|
-
method:
|
|
1243
|
+
state: c,
|
|
1244
|
+
method: o = ye,
|
|
1245
1245
|
action: p,
|
|
1246
1246
|
onSubmit: u,
|
|
1247
1247
|
relative: d,
|
|
1248
1248
|
preventScrollReset: k,
|
|
1249
1249
|
unstable_viewTransition: v
|
|
1250
|
-
} = e,
|
|
1250
|
+
} = e, S = Ze(e, Hn), x = sr(), T = or(p, {
|
|
1251
1251
|
relative: d
|
|
1252
|
-
}), j =
|
|
1253
|
-
if (u && u(
|
|
1252
|
+
}), j = o.toLowerCase() === "get" ? "get" : "post", y = (E) => {
|
|
1253
|
+
if (u && u(E), E.defaultPrevented)
|
|
1254
1254
|
return;
|
|
1255
|
-
|
|
1256
|
-
let _ =
|
|
1257
|
-
x(_ ||
|
|
1258
|
-
fetcherKey:
|
|
1259
|
-
method:
|
|
1255
|
+
E.preventDefault();
|
|
1256
|
+
let _ = E.nativeEvent.submitter, $ = (_ == null ? void 0 : _.getAttribute("formmethod")) || o;
|
|
1257
|
+
x(_ || E.currentTarget, {
|
|
1258
|
+
fetcherKey: r,
|
|
1259
|
+
method: $,
|
|
1260
1260
|
navigate: l,
|
|
1261
1261
|
replace: s,
|
|
1262
|
-
state:
|
|
1262
|
+
state: c,
|
|
1263
1263
|
relative: d,
|
|
1264
1264
|
preventScrollReset: k,
|
|
1265
1265
|
unstable_viewTransition: v
|
|
@@ -1269,8 +1269,8 @@ const tr = /* @__PURE__ */ N.forwardRef((e, n) => {
|
|
|
1269
1269
|
ref: n,
|
|
1270
1270
|
method: j,
|
|
1271
1271
|
action: T,
|
|
1272
|
-
onSubmit:
|
|
1273
|
-
},
|
|
1272
|
+
onSubmit: i ? u : y
|
|
1273
|
+
}, S));
|
|
1274
1274
|
});
|
|
1275
1275
|
process.env.NODE_ENV !== "production" && (tr.displayName = "Form");
|
|
1276
1276
|
process.env.NODE_ENV;
|
|
@@ -1287,32 +1287,32 @@ function nr(e) {
|
|
|
1287
1287
|
}
|
|
1288
1288
|
function Lt(e) {
|
|
1289
1289
|
let n = N.useContext(Ce);
|
|
1290
|
-
return n || (process.env.NODE_ENV !== "production" ?
|
|
1290
|
+
return n || (process.env.NODE_ENV !== "production" ? I(!1, nr(e)) : I(!1)), n;
|
|
1291
1291
|
}
|
|
1292
1292
|
function rr(e, n) {
|
|
1293
1293
|
let {
|
|
1294
|
-
target:
|
|
1294
|
+
target: r,
|
|
1295
1295
|
replace: l,
|
|
1296
|
-
state:
|
|
1296
|
+
state: i,
|
|
1297
1297
|
preventScrollReset: s,
|
|
1298
|
-
relative:
|
|
1299
|
-
unstable_viewTransition:
|
|
1298
|
+
relative: c,
|
|
1299
|
+
unstable_viewTransition: o
|
|
1300
1300
|
} = n === void 0 ? {} : n, p = Dn(), u = me(), d = he(e, {
|
|
1301
|
-
relative:
|
|
1301
|
+
relative: c
|
|
1302
1302
|
});
|
|
1303
1303
|
return N.useCallback((k) => {
|
|
1304
|
-
if (Yn(k,
|
|
1304
|
+
if (Yn(k, r)) {
|
|
1305
1305
|
k.preventDefault();
|
|
1306
1306
|
let v = l !== void 0 ? l : Me(u) === Me(d);
|
|
1307
1307
|
p(e, {
|
|
1308
1308
|
replace: v,
|
|
1309
|
-
state:
|
|
1309
|
+
state: i,
|
|
1310
1310
|
preventScrollReset: s,
|
|
1311
|
-
relative:
|
|
1312
|
-
unstable_viewTransition:
|
|
1311
|
+
relative: c,
|
|
1312
|
+
unstable_viewTransition: o
|
|
1313
1313
|
});
|
|
1314
1314
|
}
|
|
1315
|
-
}, [u, p, d, l,
|
|
1315
|
+
}, [u, p, d, l, i, r, e, s, c, o]);
|
|
1316
1316
|
}
|
|
1317
1317
|
function ar() {
|
|
1318
1318
|
if (typeof document > "u")
|
|
@@ -1324,98 +1324,98 @@ function sr() {
|
|
|
1324
1324
|
router: e
|
|
1325
1325
|
} = Lt(xe.UseSubmit), {
|
|
1326
1326
|
basename: n
|
|
1327
|
-
} = N.useContext(Q),
|
|
1328
|
-
return N.useCallback(function(l,
|
|
1329
|
-
|
|
1327
|
+
} = N.useContext(Q), r = Un();
|
|
1328
|
+
return N.useCallback(function(l, i) {
|
|
1329
|
+
i === void 0 && (i = {}), ar();
|
|
1330
1330
|
let {
|
|
1331
1331
|
action: s,
|
|
1332
|
-
method:
|
|
1333
|
-
encType:
|
|
1332
|
+
method: c,
|
|
1333
|
+
encType: o,
|
|
1334
1334
|
formData: p,
|
|
1335
1335
|
body: u
|
|
1336
1336
|
} = zn(l, n);
|
|
1337
|
-
if (
|
|
1338
|
-
let d =
|
|
1339
|
-
e.fetch(d,
|
|
1340
|
-
preventScrollReset:
|
|
1337
|
+
if (i.navigate === !1) {
|
|
1338
|
+
let d = i.fetcherKey || ir();
|
|
1339
|
+
e.fetch(d, r, i.action || s, {
|
|
1340
|
+
preventScrollReset: i.preventScrollReset,
|
|
1341
1341
|
formData: p,
|
|
1342
1342
|
body: u,
|
|
1343
|
-
formMethod:
|
|
1344
|
-
formEncType:
|
|
1345
|
-
unstable_flushSync:
|
|
1343
|
+
formMethod: i.method || c,
|
|
1344
|
+
formEncType: i.encType || o,
|
|
1345
|
+
unstable_flushSync: i.unstable_flushSync
|
|
1346
1346
|
});
|
|
1347
1347
|
} else
|
|
1348
|
-
e.navigate(
|
|
1349
|
-
preventScrollReset:
|
|
1348
|
+
e.navigate(i.action || s, {
|
|
1349
|
+
preventScrollReset: i.preventScrollReset,
|
|
1350
1350
|
formData: p,
|
|
1351
1351
|
body: u,
|
|
1352
|
-
formMethod:
|
|
1353
|
-
formEncType:
|
|
1354
|
-
replace:
|
|
1355
|
-
state:
|
|
1356
|
-
fromRouteId:
|
|
1357
|
-
unstable_flushSync:
|
|
1358
|
-
unstable_viewTransition:
|
|
1352
|
+
formMethod: i.method || c,
|
|
1353
|
+
formEncType: i.encType || o,
|
|
1354
|
+
replace: i.replace,
|
|
1355
|
+
state: i.state,
|
|
1356
|
+
fromRouteId: r,
|
|
1357
|
+
unstable_flushSync: i.unstable_flushSync,
|
|
1358
|
+
unstable_viewTransition: i.unstable_viewTransition
|
|
1359
1359
|
});
|
|
1360
|
-
}, [e, n,
|
|
1360
|
+
}, [e, n, r]);
|
|
1361
1361
|
}
|
|
1362
1362
|
function or(e, n) {
|
|
1363
1363
|
let {
|
|
1364
|
-
relative:
|
|
1364
|
+
relative: r
|
|
1365
1365
|
} = n === void 0 ? {} : n, {
|
|
1366
1366
|
basename: l
|
|
1367
|
-
} = N.useContext(Q),
|
|
1368
|
-
|
|
1369
|
-
let [s] =
|
|
1370
|
-
relative:
|
|
1371
|
-
})),
|
|
1367
|
+
} = N.useContext(Q), i = N.useContext(se);
|
|
1368
|
+
i || (process.env.NODE_ENV !== "production" ? I(!1, "useFormAction must be used inside a RouteContext") : I(!1));
|
|
1369
|
+
let [s] = i.matches.slice(-1), c = ae({}, he(e || ".", {
|
|
1370
|
+
relative: r
|
|
1371
|
+
})), o = me();
|
|
1372
1372
|
if (e == null) {
|
|
1373
|
-
|
|
1374
|
-
let p = new URLSearchParams(
|
|
1375
|
-
p.has("index") && p.get("index") === "" && (p.delete("index"),
|
|
1373
|
+
c.search = o.search;
|
|
1374
|
+
let p = new URLSearchParams(c.search);
|
|
1375
|
+
p.has("index") && p.get("index") === "" && (p.delete("index"), c.search = p.toString() ? "?" + p.toString() : "");
|
|
1376
1376
|
}
|
|
1377
|
-
return (!e || e === ".") && s.route.index && (
|
|
1377
|
+
return (!e || e === ".") && s.route.index && (c.search = c.search ? c.search.replace(/^\?/, "?index&") : "?index"), l !== "/" && (c.pathname = c.pathname === "/" ? l : Ge([l, c.pathname])), Me(c);
|
|
1378
1378
|
}
|
|
1379
1379
|
function cr(e, n) {
|
|
1380
1380
|
n === void 0 && (n = {});
|
|
1381
|
-
let
|
|
1382
|
-
|
|
1381
|
+
let r = N.useContext(It);
|
|
1382
|
+
r == null && (process.env.NODE_ENV !== "production" ? I(!1, "`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?") : I(!1));
|
|
1383
1383
|
let {
|
|
1384
1384
|
basename: l
|
|
1385
|
-
} = Lt(xe.useViewTransitionState),
|
|
1385
|
+
} = Lt(xe.useViewTransitionState), i = he(e, {
|
|
1386
1386
|
relative: n.relative
|
|
1387
1387
|
});
|
|
1388
|
-
if (!
|
|
1388
|
+
if (!r.isTransitioning)
|
|
1389
1389
|
return !1;
|
|
1390
|
-
let s = fe(
|
|
1391
|
-
return yt(
|
|
1390
|
+
let s = fe(r.currentLocation.pathname, l) || r.currentLocation.pathname, c = fe(r.nextLocation.pathname, l) || r.nextLocation.pathname;
|
|
1391
|
+
return yt(i.pathname, c) != null || yt(i.pathname, s) != null;
|
|
1392
1392
|
}
|
|
1393
|
-
const
|
|
1394
|
-
({ breadcrumbs: e, navigationType: n, className:
|
|
1395
|
-
const s = e.slice(0, 4),
|
|
1396
|
-
|
|
1393
|
+
const gr = W(
|
|
1394
|
+
({ breadcrumbs: e, navigationType: n, className: r, ...l }, i) => {
|
|
1395
|
+
const s = e.slice(0, 4), c = s[s.length - 2], o = [
|
|
1396
|
+
r,
|
|
1397
1397
|
"pkt-breadcrumbs"
|
|
1398
1398
|
].filter(Boolean).join(" ");
|
|
1399
|
-
return /* @__PURE__ */ h("nav", { ref:
|
|
1400
|
-
/* @__PURE__ */
|
|
1399
|
+
return /* @__PURE__ */ h("nav", { ref: i, "aria-label": "brødsmulemeny", className: o, children: [
|
|
1400
|
+
/* @__PURE__ */ a("ol", { className: "pkt-breadcrumbs__list pkt-breadcrumbs--desktop", children: s.map((p, u) => /* @__PURE__ */ a(
|
|
1401
1401
|
"li",
|
|
1402
1402
|
{
|
|
1403
1403
|
className: "pkt-breadcrumbs__item",
|
|
1404
|
-
children: u === s.length - 1 ? /* @__PURE__ */
|
|
1404
|
+
children: u === s.length - 1 ? /* @__PURE__ */ a("span", { className: "pkt-breadcrumbs__label", "aria-current": "true", children: /* @__PURE__ */ a("span", { className: "pkt-breadcrumbs__text", children: p.text }) }) : n === "router" ? /* @__PURE__ */ h(
|
|
1405
1405
|
Ee,
|
|
1406
1406
|
{
|
|
1407
1407
|
to: p.href,
|
|
1408
1408
|
className: "pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",
|
|
1409
1409
|
...l,
|
|
1410
1410
|
children: [
|
|
1411
|
-
/* @__PURE__ */
|
|
1412
|
-
|
|
1411
|
+
/* @__PURE__ */ a(
|
|
1412
|
+
w,
|
|
1413
1413
|
{
|
|
1414
1414
|
className: "pkt-icon pkt-breadcrumbs__icon pkt-link__icon",
|
|
1415
1415
|
name: "chevron-thin-right"
|
|
1416
1416
|
}
|
|
1417
1417
|
),
|
|
1418
|
-
/* @__PURE__ */
|
|
1418
|
+
/* @__PURE__ */ a("span", { className: "pkt-breadcrumbs__text", children: p.text })
|
|
1419
1419
|
]
|
|
1420
1420
|
}
|
|
1421
1421
|
) : /* @__PURE__ */ h(
|
|
@@ -1425,14 +1425,14 @@ const br = B(
|
|
|
1425
1425
|
className: "pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",
|
|
1426
1426
|
...l,
|
|
1427
1427
|
children: [
|
|
1428
|
-
/* @__PURE__ */
|
|
1429
|
-
|
|
1428
|
+
/* @__PURE__ */ a(
|
|
1429
|
+
w,
|
|
1430
1430
|
{
|
|
1431
1431
|
className: "pkt-icon pkt-breadcrumbs__icon pkt-link__icon",
|
|
1432
1432
|
name: "chevron-thin-right"
|
|
1433
1433
|
}
|
|
1434
1434
|
),
|
|
1435
|
-
/* @__PURE__ */
|
|
1435
|
+
/* @__PURE__ */ a("span", { className: "pkt-breadcrumbs__text", children: p.text })
|
|
1436
1436
|
]
|
|
1437
1437
|
}
|
|
1438
1438
|
)
|
|
@@ -1442,50 +1442,50 @@ const br = B(
|
|
|
1442
1442
|
n === "router" ? /* @__PURE__ */ h(
|
|
1443
1443
|
Ee,
|
|
1444
1444
|
{
|
|
1445
|
-
to:
|
|
1445
|
+
to: c.href,
|
|
1446
1446
|
className: "pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",
|
|
1447
1447
|
...l,
|
|
1448
1448
|
children: [
|
|
1449
|
-
/* @__PURE__ */
|
|
1450
|
-
|
|
1449
|
+
/* @__PURE__ */ a(
|
|
1450
|
+
w,
|
|
1451
1451
|
{
|
|
1452
1452
|
className: "pkt-back-link__icon pkt-icon pkt-link__icon",
|
|
1453
1453
|
name: "chevron-thin-left"
|
|
1454
1454
|
}
|
|
1455
1455
|
),
|
|
1456
|
-
/* @__PURE__ */
|
|
1456
|
+
/* @__PURE__ */ a("span", { className: "pkt-breadcrumbs__text", children: c.text })
|
|
1457
1457
|
]
|
|
1458
1458
|
}
|
|
1459
1459
|
) : /* @__PURE__ */ h(
|
|
1460
1460
|
"a",
|
|
1461
1461
|
{
|
|
1462
|
-
href:
|
|
1462
|
+
href: c.href,
|
|
1463
1463
|
className: "pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",
|
|
1464
1464
|
...l,
|
|
1465
1465
|
children: [
|
|
1466
|
-
/* @__PURE__ */
|
|
1467
|
-
|
|
1466
|
+
/* @__PURE__ */ a(
|
|
1467
|
+
w,
|
|
1468
1468
|
{
|
|
1469
1469
|
className: "pkt-back-link__icon pkt-icon pkt-link__icon",
|
|
1470
1470
|
name: "chevron-thin-left"
|
|
1471
1471
|
}
|
|
1472
1472
|
),
|
|
1473
|
-
/* @__PURE__ */
|
|
1473
|
+
/* @__PURE__ */ a("span", { className: "pkt-breadcrumbs__text", children: c.text })
|
|
1474
1474
|
]
|
|
1475
1475
|
}
|
|
1476
1476
|
)
|
|
1477
1477
|
] });
|
|
1478
1478
|
}
|
|
1479
|
-
), de =
|
|
1479
|
+
), de = W(
|
|
1480
1480
|
({
|
|
1481
1481
|
children: e,
|
|
1482
1482
|
className: n,
|
|
1483
|
-
iconName:
|
|
1483
|
+
iconName: r = "user",
|
|
1484
1484
|
secondIconName: l = "user",
|
|
1485
|
-
size:
|
|
1485
|
+
size: i = "medium",
|
|
1486
1486
|
skin: s = "primary",
|
|
1487
|
-
type:
|
|
1488
|
-
variant:
|
|
1487
|
+
type: c = "button",
|
|
1488
|
+
variant: o = "label-only",
|
|
1489
1489
|
color: p,
|
|
1490
1490
|
isLoading: u = !1,
|
|
1491
1491
|
...d
|
|
@@ -1493,79 +1493,79 @@ const br = B(
|
|
|
1493
1493
|
const v = [
|
|
1494
1494
|
n,
|
|
1495
1495
|
"pkt-btn",
|
|
1496
|
-
|
|
1496
|
+
i && `pkt-btn--${i}`,
|
|
1497
1497
|
s && `pkt-btn--${s}`,
|
|
1498
|
-
|
|
1498
|
+
o && `pkt-btn--${o}`,
|
|
1499
1499
|
p && `pkt-btn--${p}`,
|
|
1500
1500
|
u && "pkt-btn--active"
|
|
1501
1501
|
].filter(Boolean).join(" ");
|
|
1502
|
-
return /* @__PURE__ */ h("button", { ...d, className: v, type:
|
|
1503
|
-
u && /* @__PURE__ */
|
|
1504
|
-
|
|
1502
|
+
return /* @__PURE__ */ h("button", { ...d, className: v, type: c, ref: k, children: [
|
|
1503
|
+
u && /* @__PURE__ */ a(
|
|
1504
|
+
w,
|
|
1505
1505
|
{
|
|
1506
1506
|
className: "pkt-btn__icon pkt-btn__spinner",
|
|
1507
1507
|
name: "spinner-blue",
|
|
1508
|
-
path: "https://punkt-cdn.oslo.kommune.no/11.
|
|
1508
|
+
path: "https://punkt-cdn.oslo.kommune.no/11.10/animations/"
|
|
1509
1509
|
}
|
|
1510
1510
|
),
|
|
1511
|
-
|
|
1512
|
-
/* @__PURE__ */
|
|
1513
|
-
|
|
1511
|
+
o !== "label-only" && /* @__PURE__ */ a(w, { className: "pkt-btn__icon", name: r }),
|
|
1512
|
+
/* @__PURE__ */ a("span", { className: "pkt-btn__text", children: e }),
|
|
1513
|
+
o === "icons-right-and-left" && /* @__PURE__ */ a(w, { className: "pkt-btn__icon", name: l })
|
|
1514
1514
|
] });
|
|
1515
1515
|
}
|
|
1516
1516
|
);
|
|
1517
1517
|
de.displayName = "PktButton";
|
|
1518
|
-
const ur =
|
|
1518
|
+
const ur = W(
|
|
1519
1519
|
({
|
|
1520
1520
|
id: e,
|
|
1521
1521
|
hasTile: n = !1,
|
|
1522
|
-
disabled:
|
|
1522
|
+
disabled: r = !1,
|
|
1523
1523
|
label: l,
|
|
1524
|
-
labelPosition:
|
|
1524
|
+
labelPosition: i = "right",
|
|
1525
1525
|
hideLabel: s = !1,
|
|
1526
|
-
checkHelptext:
|
|
1527
|
-
hasError:
|
|
1526
|
+
checkHelptext: c,
|
|
1527
|
+
hasError: o = !1,
|
|
1528
1528
|
isSwitch: p = !1,
|
|
1529
1529
|
className: u,
|
|
1530
1530
|
...d
|
|
1531
1531
|
}, k) => {
|
|
1532
1532
|
const v = [u, "pkt-input-check"].filter(Boolean).join(" ");
|
|
1533
|
-
return /* @__PURE__ */
|
|
1533
|
+
return /* @__PURE__ */ a("div", { className: v, children: /* @__PURE__ */ h(
|
|
1534
1534
|
"div",
|
|
1535
1535
|
{
|
|
1536
|
-
className: `pkt-input-check__input ${n ? "pkt-input-check__input--tile" : ""} ${
|
|
1536
|
+
className: `pkt-input-check__input ${n ? "pkt-input-check__input--tile" : ""} ${r && n ? "pkt-input-check__input--tile-disabled" : ""}`,
|
|
1537
1537
|
children: [
|
|
1538
|
-
l &&
|
|
1538
|
+
l && i === "left" && /* @__PURE__ */ h(
|
|
1539
1539
|
"label",
|
|
1540
1540
|
{
|
|
1541
1541
|
className: `pkt-input-check__input-label ${s ? "pkt-sr-only" : ""}`,
|
|
1542
1542
|
htmlFor: e,
|
|
1543
1543
|
children: [
|
|
1544
1544
|
l,
|
|
1545
|
-
|
|
1545
|
+
c && /* @__PURE__ */ a("div", { className: "pkt-input-check__input-helptext", children: c })
|
|
1546
1546
|
]
|
|
1547
1547
|
}
|
|
1548
1548
|
),
|
|
1549
|
-
/* @__PURE__ */
|
|
1549
|
+
/* @__PURE__ */ a(
|
|
1550
1550
|
"input",
|
|
1551
1551
|
{
|
|
1552
1552
|
ref: k,
|
|
1553
|
-
className: `pkt-input-check__input-checkbox ${
|
|
1553
|
+
className: `pkt-input-check__input-checkbox ${o ? "pkt-input-check__input-checkbox--error" : ""}`,
|
|
1554
1554
|
type: "checkbox",
|
|
1555
1555
|
role: p ? "switch" : "checkbox",
|
|
1556
1556
|
id: e,
|
|
1557
|
-
disabled:
|
|
1557
|
+
disabled: r,
|
|
1558
1558
|
...d
|
|
1559
1559
|
}
|
|
1560
1560
|
),
|
|
1561
|
-
l &&
|
|
1561
|
+
l && i === "right" && /* @__PURE__ */ h(
|
|
1562
1562
|
"label",
|
|
1563
1563
|
{
|
|
1564
1564
|
className: `pkt-input-check__input-label ${s ? "pkt-sr-only" : ""}`,
|
|
1565
1565
|
htmlFor: e,
|
|
1566
1566
|
children: [
|
|
1567
1567
|
l,
|
|
1568
|
-
|
|
1568
|
+
c && /* @__PURE__ */ a("div", { className: "pkt-input-check__input-helptext", children: c })
|
|
1569
1569
|
]
|
|
1570
1570
|
}
|
|
1571
1571
|
)
|
|
@@ -1575,23 +1575,23 @@ const ur = B(
|
|
|
1575
1575
|
}
|
|
1576
1576
|
);
|
|
1577
1577
|
ur.displayName = "PktCheckbox";
|
|
1578
|
-
const
|
|
1578
|
+
const br = ({
|
|
1579
1579
|
columnOne: e,
|
|
1580
1580
|
columnTwo: n,
|
|
1581
|
-
socialLinks:
|
|
1581
|
+
socialLinks: r,
|
|
1582
1582
|
className: l,
|
|
1583
|
-
personvernOgInfoLink:
|
|
1583
|
+
personvernOgInfoLink: i = "https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",
|
|
1584
1584
|
tilgjengelighetLink: s = "https://www.oslo.kommune.no/tilgjengelighet/"
|
|
1585
1585
|
}) => {
|
|
1586
|
-
var
|
|
1587
|
-
const
|
|
1588
|
-
return /* @__PURE__ */
|
|
1586
|
+
var o, p;
|
|
1587
|
+
const c = [l, "pkt-footer"].filter(Boolean).join(" ");
|
|
1588
|
+
return /* @__PURE__ */ a("footer", { className: c, "data-mode": "dark", children: /* @__PURE__ */ h("div", { className: "pkt-footer__container", children: [
|
|
1589
1589
|
/* @__PURE__ */ h("div", { className: "pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16", children: [
|
|
1590
1590
|
/* @__PURE__ */ h("div", { className: "pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up", children: [
|
|
1591
|
-
/* @__PURE__ */
|
|
1591
|
+
/* @__PURE__ */ a("h2", { className: "pkt-footer__title", children: e.title }),
|
|
1592
1592
|
/* @__PURE__ */ h("ul", { className: "pkt-footer__list", children: [
|
|
1593
|
-
e.text && /* @__PURE__ */
|
|
1594
|
-
(
|
|
1593
|
+
e.text && /* @__PURE__ */ a("li", { className: "pkt-footer__text", children: e.text }),
|
|
1594
|
+
(o = e.links) == null ? void 0 : o.map((u, d) => /* @__PURE__ */ a("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ h(
|
|
1595
1595
|
"a",
|
|
1596
1596
|
{
|
|
1597
1597
|
className: `pkt-footer__link ${u.external ? "pkt-link--external" : ""}`,
|
|
@@ -1599,7 +1599,7 @@ const gr = ({
|
|
|
1599
1599
|
target: u.openInNewTab ? "_blank" : "_self",
|
|
1600
1600
|
rel: u.openInNewTab ? "noopener noreferrer" : void 0,
|
|
1601
1601
|
children: [
|
|
1602
|
-
/* @__PURE__ */
|
|
1602
|
+
/* @__PURE__ */ a(w, { className: "pkt-footer__link-icon", name: "chevron-right" }),
|
|
1603
1603
|
u.text
|
|
1604
1604
|
]
|
|
1605
1605
|
}
|
|
@@ -1607,10 +1607,10 @@ const gr = ({
|
|
|
1607
1607
|
] })
|
|
1608
1608
|
] }),
|
|
1609
1609
|
/* @__PURE__ */ h("div", { className: "pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up", children: [
|
|
1610
|
-
/* @__PURE__ */
|
|
1610
|
+
/* @__PURE__ */ a("h2", { className: "pkt-footer__title", children: n.title }),
|
|
1611
1611
|
/* @__PURE__ */ h("ul", { className: "pkt-footer__list", children: [
|
|
1612
|
-
n.text && /* @__PURE__ */
|
|
1613
|
-
(p = n.links) == null ? void 0 : p.map((u, d) => /* @__PURE__ */
|
|
1612
|
+
n.text && /* @__PURE__ */ a("li", { className: "pkt-footer__text", children: n.text }),
|
|
1613
|
+
(p = n.links) == null ? void 0 : p.map((u, d) => /* @__PURE__ */ a("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ h(
|
|
1614
1614
|
"a",
|
|
1615
1615
|
{
|
|
1616
1616
|
className: `pkt-footer__link ${u.external ? "pkt-link--external" : ""}`,
|
|
@@ -1618,7 +1618,7 @@ const gr = ({
|
|
|
1618
1618
|
target: u.openInNewTab ? "_blank" : "_self",
|
|
1619
1619
|
rel: u.openInNewTab ? "noopener noreferrer" : void 0,
|
|
1620
1620
|
children: [
|
|
1621
|
-
/* @__PURE__ */
|
|
1621
|
+
/* @__PURE__ */ a(w, { className: "pkt-footer__link-icon", name: "chevron-right" }),
|
|
1622
1622
|
u.text
|
|
1623
1623
|
]
|
|
1624
1624
|
}
|
|
@@ -1626,32 +1626,32 @@ const gr = ({
|
|
|
1626
1626
|
] })
|
|
1627
1627
|
] }),
|
|
1628
1628
|
/* @__PURE__ */ h("div", { className: "pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up", children: [
|
|
1629
|
-
/* @__PURE__ */
|
|
1629
|
+
/* @__PURE__ */ a("h2", { className: "pkt-footer__title", children: "Om nettstedet" }),
|
|
1630
1630
|
/* @__PURE__ */ h("ul", { className: "pkt-footer__list", children: [
|
|
1631
|
-
/* @__PURE__ */
|
|
1631
|
+
/* @__PURE__ */ a("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ h(
|
|
1632
1632
|
"a",
|
|
1633
1633
|
{
|
|
1634
1634
|
className: "pkt-footer__link",
|
|
1635
|
-
href:
|
|
1635
|
+
href: i,
|
|
1636
1636
|
children: [
|
|
1637
|
-
/* @__PURE__ */
|
|
1637
|
+
/* @__PURE__ */ a(w, { className: "pkt-footer__link-icon", name: "chevron-right" }),
|
|
1638
1638
|
"Personvern og informasjonskapsler"
|
|
1639
1639
|
]
|
|
1640
1640
|
}
|
|
1641
1641
|
) }),
|
|
1642
|
-
/* @__PURE__ */
|
|
1643
|
-
/* @__PURE__ */
|
|
1642
|
+
/* @__PURE__ */ a("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ h("a", { className: "pkt-footer__link", href: s, children: [
|
|
1643
|
+
/* @__PURE__ */ a(w, { className: "pkt-footer__link-icon", name: "chevron-right" }),
|
|
1644
1644
|
"Tilgjengelighet"
|
|
1645
1645
|
] }) })
|
|
1646
1646
|
] })
|
|
1647
1647
|
] })
|
|
1648
1648
|
] }),
|
|
1649
|
-
|
|
1650
|
-
/* @__PURE__ */
|
|
1649
|
+
r && /* @__PURE__ */ h("div", { className: "pkt-footer__social", "aria-label": "standard lenker", children: [
|
|
1650
|
+
/* @__PURE__ */ a("div", { className: "pkt-footer__social-languages", children: r.filter((u) => u.language).map((u, d) => /* @__PURE__ */ a(
|
|
1651
1651
|
"div",
|
|
1652
1652
|
{
|
|
1653
1653
|
className: "pkt-footer__social-language",
|
|
1654
|
-
children: /* @__PURE__ */
|
|
1654
|
+
children: /* @__PURE__ */ a(
|
|
1655
1655
|
"a",
|
|
1656
1656
|
{
|
|
1657
1657
|
href: u.href,
|
|
@@ -1664,7 +1664,7 @@ const gr = ({
|
|
|
1664
1664
|
},
|
|
1665
1665
|
`sociallinks-language-${d}`
|
|
1666
1666
|
)) }),
|
|
1667
|
-
/* @__PURE__ */
|
|
1667
|
+
/* @__PURE__ */ a("div", { className: "pkt-footer__social-icons", children: r.filter((u) => u.iconName).map((u, d) => /* @__PURE__ */ a(H.Fragment, { children: /* @__PURE__ */ a(
|
|
1668
1668
|
"a",
|
|
1669
1669
|
{
|
|
1670
1670
|
href: u.href,
|
|
@@ -1672,7 +1672,7 @@ const gr = ({
|
|
|
1672
1672
|
className: "pkt-footer__social-icon-link",
|
|
1673
1673
|
target: u.openInNewTab ? "_blank" : "_self",
|
|
1674
1674
|
rel: u.openInNewTab ? "noopener noreferrer" : void 0,
|
|
1675
|
-
children: /* @__PURE__ */
|
|
1675
|
+
children: /* @__PURE__ */ a(w, { className: "pkt-footer__social-icon", name: u.iconName })
|
|
1676
1676
|
}
|
|
1677
1677
|
) }, `sociallinks-${d}`)) })
|
|
1678
1678
|
] })
|
|
@@ -1680,12 +1680,12 @@ const gr = ({
|
|
|
1680
1680
|
}, Nr = ({
|
|
1681
1681
|
links: e = [],
|
|
1682
1682
|
personvernOgInfoLink: n = "https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",
|
|
1683
|
-
tilgjengelighetLink:
|
|
1683
|
+
tilgjengelighetLink: r = "https://www.oslo.kommune.no/tilgjengelighet/",
|
|
1684
1684
|
className: l
|
|
1685
1685
|
}) => {
|
|
1686
|
-
const
|
|
1687
|
-
return /* @__PURE__ */
|
|
1688
|
-
e.map((s,
|
|
1686
|
+
const i = [l, "pkt-footer-simple"].filter(Boolean).join(" ");
|
|
1687
|
+
return /* @__PURE__ */ a("footer", { className: i, "data-mode": "dark", children: /* @__PURE__ */ a("div", { className: "pkt-footer-simple__container", children: /* @__PURE__ */ h("ul", { className: "pkt-footer-simple__list", children: [
|
|
1688
|
+
e.map((s, c) => /* @__PURE__ */ a("li", { className: "pkt-footer-simple__list-item", children: /* @__PURE__ */ h(
|
|
1689
1689
|
"a",
|
|
1690
1690
|
{
|
|
1691
1691
|
className: `pkt-footer-simple__link ${s.external ? " pkt-link--external" : ""}`,
|
|
@@ -1693,8 +1693,8 @@ const gr = ({
|
|
|
1693
1693
|
target: s.openInNewTab ? "_blank" : "_self",
|
|
1694
1694
|
rel: s.openInNewTab ? "noopener noreferrer" : void 0,
|
|
1695
1695
|
children: [
|
|
1696
|
-
/* @__PURE__ */
|
|
1697
|
-
|
|
1696
|
+
/* @__PURE__ */ a(
|
|
1697
|
+
w,
|
|
1698
1698
|
{
|
|
1699
1699
|
className: "pkt-footer-simple__link-icon",
|
|
1700
1700
|
name: "chevron-right"
|
|
@@ -1703,13 +1703,13 @@ const gr = ({
|
|
|
1703
1703
|
s.text
|
|
1704
1704
|
]
|
|
1705
1705
|
}
|
|
1706
|
-
) },
|
|
1707
|
-
/* @__PURE__ */
|
|
1708
|
-
/* @__PURE__ */
|
|
1706
|
+
) }, c)),
|
|
1707
|
+
/* @__PURE__ */ a("li", { className: "pkt-footer-simple__list-item", children: /* @__PURE__ */ h("a", { className: "pkt-footer-simple__link", href: n, children: [
|
|
1708
|
+
/* @__PURE__ */ a(w, { className: "pkt-footer-simple__link-icon", name: "chevron-right" }),
|
|
1709
1709
|
"Personvern og informasjonskapsler"
|
|
1710
1710
|
] }) }),
|
|
1711
|
-
/* @__PURE__ */
|
|
1712
|
-
/* @__PURE__ */
|
|
1711
|
+
/* @__PURE__ */ a("li", { className: "pkt-footer-simple__list-item", children: /* @__PURE__ */ h("a", { className: "pkt-footer-simple__link", href: r, children: [
|
|
1712
|
+
/* @__PURE__ */ a(w, { className: "pkt-footer-simple__link-icon", name: "chevron-right" }),
|
|
1713
1713
|
"Tilgjengelighet"
|
|
1714
1714
|
] }) })
|
|
1715
1715
|
] }) }) });
|
|
@@ -1723,19 +1723,19 @@ var Ft = { exports: {} };
|
|
|
1723
1723
|
(function(e) {
|
|
1724
1724
|
(function() {
|
|
1725
1725
|
var n = {}.hasOwnProperty;
|
|
1726
|
-
function
|
|
1727
|
-
for (var l = [],
|
|
1728
|
-
var s = arguments[
|
|
1726
|
+
function r() {
|
|
1727
|
+
for (var l = [], i = 0; i < arguments.length; i++) {
|
|
1728
|
+
var s = arguments[i];
|
|
1729
1729
|
if (s) {
|
|
1730
|
-
var
|
|
1731
|
-
if (
|
|
1730
|
+
var c = typeof s;
|
|
1731
|
+
if (c === "string" || c === "number")
|
|
1732
1732
|
l.push(s);
|
|
1733
1733
|
else if (Array.isArray(s)) {
|
|
1734
1734
|
if (s.length) {
|
|
1735
|
-
var
|
|
1736
|
-
|
|
1735
|
+
var o = r.apply(null, s);
|
|
1736
|
+
o && l.push(o);
|
|
1737
1737
|
}
|
|
1738
|
-
} else if (
|
|
1738
|
+
} else if (c === "object") {
|
|
1739
1739
|
if (s.toString !== Object.prototype.toString && !s.toString.toString().includes("[native code]")) {
|
|
1740
1740
|
l.push(s.toString());
|
|
1741
1741
|
continue;
|
|
@@ -1747,109 +1747,110 @@ var Ft = { exports: {} };
|
|
|
1747
1747
|
}
|
|
1748
1748
|
return l.join(" ");
|
|
1749
1749
|
}
|
|
1750
|
-
e.exports ? (
|
|
1750
|
+
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1751
1751
|
})();
|
|
1752
1752
|
})(Ft);
|
|
1753
1753
|
var pr = Ft.exports;
|
|
1754
|
-
const Ut = /* @__PURE__ */ mn(pr), yr =
|
|
1754
|
+
const Ut = /* @__PURE__ */ mn(pr), yr = W(
|
|
1755
1755
|
({
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1756
|
+
className: e,
|
|
1757
|
+
logoLink: n = "https://www.oslo.kommune.no/",
|
|
1758
|
+
serviceName: r,
|
|
1759
|
+
fixed: l = !0,
|
|
1760
|
+
scrollToHide: i = !0,
|
|
1761
|
+
user: s,
|
|
1762
|
+
userMenu: c,
|
|
1762
1763
|
representing: o,
|
|
1763
|
-
userOptions:
|
|
1764
|
-
userMenuFooter:
|
|
1765
|
-
canChangeRepresentation:
|
|
1766
|
-
showMenuButton:
|
|
1767
|
-
showLogOutButton:
|
|
1768
|
-
openMenu:
|
|
1769
|
-
logOut:
|
|
1770
|
-
changeRepresentation:
|
|
1771
|
-
...
|
|
1772
|
-
},
|
|
1773
|
-
const
|
|
1764
|
+
userOptions: p,
|
|
1765
|
+
userMenuFooter: u,
|
|
1766
|
+
canChangeRepresentation: d = !0,
|
|
1767
|
+
showMenuButton: k = !1,
|
|
1768
|
+
showLogOutButton: v = !1,
|
|
1769
|
+
openMenu: S,
|
|
1770
|
+
logOut: x,
|
|
1771
|
+
changeRepresentation: T,
|
|
1772
|
+
...j
|
|
1773
|
+
}, y) => {
|
|
1774
|
+
const E = H.useMemo(() => typeof (s == null ? void 0 : s.lastLoggedIn) == "string" ? s.lastLoggedIn : s != null && s.lastLoggedIn ? new Date(s.lastLoggedIn).toLocaleString("nb-NO", {
|
|
1774
1775
|
year: "numeric",
|
|
1775
1776
|
month: "long",
|
|
1776
1777
|
day: "numeric"
|
|
1777
|
-
}) : "", [
|
|
1778
|
-
H.useEffect(() => (document.addEventListener("mouseup",
|
|
1779
|
-
document.removeEventListener("mouseup",
|
|
1778
|
+
}) : "", [s]), [_, $] = H.useState(!1), [L, B] = H.useState(0), [A, z] = H.useState(!1), V = H.useRef(null);
|
|
1779
|
+
H.useEffect(() => (document.addEventListener("mouseup", K), window.addEventListener("scroll", M), () => {
|
|
1780
|
+
document.removeEventListener("mouseup", K), window.removeEventListener("scroll", M);
|
|
1780
1781
|
}));
|
|
1781
|
-
const
|
|
1782
|
-
|
|
1783
|
-
},
|
|
1784
|
-
|
|
1785
|
-
},
|
|
1786
|
-
if (
|
|
1782
|
+
const q = () => {
|
|
1783
|
+
z(!A);
|
|
1784
|
+
}, K = (g) => {
|
|
1785
|
+
V.current && !V.current.contains(g.target) && z(!1);
|
|
1786
|
+
}, M = () => {
|
|
1787
|
+
if (i) {
|
|
1787
1788
|
const g = window.pageYOffset || document.documentElement.scrollTop;
|
|
1788
|
-
if (g < 0 || Math.abs(g -
|
|
1789
|
+
if (g < 0 || Math.abs(g - L) < 60)
|
|
1789
1790
|
return;
|
|
1790
|
-
|
|
1791
|
+
$(g > L), B(g);
|
|
1791
1792
|
}
|
|
1792
1793
|
};
|
|
1793
1794
|
return /* @__PURE__ */ h(
|
|
1794
1795
|
"header",
|
|
1795
1796
|
{
|
|
1796
|
-
...
|
|
1797
|
+
...j,
|
|
1797
1798
|
id: "pkt-header",
|
|
1798
1799
|
"data-testid": "pkt-header",
|
|
1799
1800
|
"aria-label": "Topp",
|
|
1800
|
-
className: Ut("pkt-header", {
|
|
1801
|
-
"pkt-header--fixed":
|
|
1802
|
-
"pkt-header--scroll-to-hide":
|
|
1803
|
-
"pkt-header--hidden":
|
|
1801
|
+
className: Ut(e, "pkt-header", {
|
|
1802
|
+
"pkt-header--fixed": l,
|
|
1803
|
+
"pkt-header--scroll-to-hide": i,
|
|
1804
|
+
"pkt-header--hidden": _
|
|
1804
1805
|
}),
|
|
1805
|
-
ref:
|
|
1806
|
+
ref: y,
|
|
1806
1807
|
children: [
|
|
1807
1808
|
/* @__PURE__ */ h("div", { className: "pkt-header__logo", children: [
|
|
1808
|
-
typeof
|
|
1809
|
-
|
|
1809
|
+
typeof n == "string" ? /* @__PURE__ */ a("a", { "aria-label": "Tilbake til forside", className: "pkt-header__logo-link", href: n, children: /* @__PURE__ */ a(
|
|
1810
|
+
w,
|
|
1810
1811
|
{
|
|
1811
1812
|
name: "oslologo",
|
|
1812
1813
|
className: "pkt-header__logo-svg",
|
|
1813
1814
|
"aria-hidden": "true",
|
|
1814
|
-
path: "https://punkt-cdn.oslo.kommune.no/11.
|
|
1815
|
+
path: "https://punkt-cdn.oslo.kommune.no/11.10/logos/"
|
|
1815
1816
|
}
|
|
1816
|
-
) }) : /* @__PURE__ */
|
|
1817
|
+
) }) : /* @__PURE__ */ a(
|
|
1817
1818
|
"button",
|
|
1818
1819
|
{
|
|
1819
1820
|
"aria-label": "Tilbake til forside",
|
|
1820
1821
|
className: "pkt-link-button pkt-link pkt-header__logo-link",
|
|
1821
|
-
onClick:
|
|
1822
|
-
children: /* @__PURE__ */
|
|
1823
|
-
|
|
1822
|
+
onClick: n,
|
|
1823
|
+
children: /* @__PURE__ */ a(
|
|
1824
|
+
w,
|
|
1824
1825
|
{
|
|
1825
1826
|
name: "oslologo",
|
|
1826
1827
|
className: "pkt-header__logo-svg",
|
|
1827
1828
|
"aria-hidden": "true",
|
|
1828
|
-
path: "https://punkt-cdn.oslo.kommune.no/11.
|
|
1829
|
+
path: "https://punkt-cdn.oslo.kommune.no/11.10/logos/"
|
|
1829
1830
|
}
|
|
1830
1831
|
)
|
|
1831
1832
|
}
|
|
1832
1833
|
),
|
|
1833
|
-
/* @__PURE__ */
|
|
1834
|
+
/* @__PURE__ */ a("span", { className: "pkt-header__logo-service", children: r })
|
|
1834
1835
|
] }),
|
|
1835
|
-
/* @__PURE__ */
|
|
1836
|
-
|
|
1836
|
+
/* @__PURE__ */ a("nav", { className: "pkt-header__actions", children: /* @__PURE__ */ h("ul", { className: "pkt-header__actions-row", children: [
|
|
1837
|
+
k && /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(
|
|
1837
1838
|
de,
|
|
1838
1839
|
{
|
|
1839
1840
|
className: "pkt-header__menu-btn",
|
|
1840
1841
|
skin: "secondary",
|
|
1841
1842
|
variant: "icon-right",
|
|
1842
1843
|
iconName: "menu",
|
|
1843
|
-
onClick:
|
|
1844
|
+
onClick: S,
|
|
1844
1845
|
children: "Meny"
|
|
1845
1846
|
}
|
|
1846
1847
|
) }),
|
|
1847
|
-
(
|
|
1848
|
+
(s || o) && /* @__PURE__ */ h(
|
|
1848
1849
|
"li",
|
|
1849
1850
|
{
|
|
1850
1851
|
"data-testid": "usermenu",
|
|
1851
|
-
className: `pkt-header--has-dropdown ${A && !
|
|
1852
|
-
ref:
|
|
1852
|
+
className: `pkt-header--has-dropdown ${A && !_ ? "pkt-header--open-dropdown" : ""}`,
|
|
1853
|
+
ref: V,
|
|
1853
1854
|
children: [
|
|
1854
1855
|
/* @__PURE__ */ h(
|
|
1855
1856
|
"button",
|
|
@@ -1859,78 +1860,71 @@ const Ut = /* @__PURE__ */ mn(pr), yr = B(
|
|
|
1859
1860
|
role: "button",
|
|
1860
1861
|
"aria-controls": "pktUserDropdown",
|
|
1861
1862
|
"aria-expanded": A,
|
|
1862
|
-
onClick:
|
|
1863
|
+
onClick: q,
|
|
1863
1864
|
children: [
|
|
1864
|
-
/* @__PURE__ */
|
|
1865
|
-
/* @__PURE__ */
|
|
1866
|
-
/* @__PURE__ */
|
|
1867
|
-
/* @__PURE__ */
|
|
1868
|
-
/* @__PURE__ */
|
|
1865
|
+
/* @__PURE__ */ a(w, { name: "user", className: "pkt-btn__icon" }),
|
|
1866
|
+
/* @__PURE__ */ a("span", { className: "pkt-header__user-fullname", children: (o == null ? void 0 : o.name) || (s == null ? void 0 : s.name) }),
|
|
1867
|
+
/* @__PURE__ */ a("span", { className: "pkt-header__user-shortname", children: (o == null ? void 0 : o.shortname) || (s == null ? void 0 : s.shortname) }),
|
|
1868
|
+
/* @__PURE__ */ a(w, { name: "chevron-thin-down", className: "pkt-btn--closed" }),
|
|
1869
|
+
/* @__PURE__ */ a(w, { name: "chevron-thin-up", className: "pkt-btn--open" })
|
|
1869
1870
|
]
|
|
1870
1871
|
}
|
|
1871
1872
|
),
|
|
1872
1873
|
/* @__PURE__ */ h("ul", { id: "pktUserDropdown", className: "pkt-header__dropdown pkt-user-menu", children: [
|
|
1873
|
-
|
|
1874
|
-
/* @__PURE__ */
|
|
1875
|
-
/* @__PURE__ */
|
|
1876
|
-
|
|
1874
|
+
s && /* @__PURE__ */ h("li", { children: [
|
|
1875
|
+
/* @__PURE__ */ a("div", { className: "pkt-user-menu__label", children: "Pålogget som" }),
|
|
1876
|
+
/* @__PURE__ */ a("div", { className: "pkt-user-menu__name", children: s.name }),
|
|
1877
|
+
s.lastLoggedIn && /* @__PURE__ */ h("div", { className: "pkt-user-menu__last-logged-in", children: [
|
|
1877
1878
|
"Sist pålogget: ",
|
|
1878
|
-
/* @__PURE__ */
|
|
1879
|
+
/* @__PURE__ */ a("time", { children: E })
|
|
1879
1880
|
] })
|
|
1880
1881
|
] }),
|
|
1881
|
-
|
|
1882
|
-
g.iconName && /* @__PURE__ */
|
|
1882
|
+
c && /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a("ul", { className: "pkt-list", children: c.map((g, F) => /* @__PURE__ */ a("li", { children: typeof g.target == "string" ? /* @__PURE__ */ h("a", { href: g.target, className: "pkt-link", children: [
|
|
1883
|
+
g.iconName && /* @__PURE__ */ a(w, { name: g.iconName, className: "pkt-link__icon" }),
|
|
1883
1884
|
g.title
|
|
1884
1885
|
] }) : /* @__PURE__ */ h("button", { className: "pkt-link-button pkt-link", onClick: g.target, children: [
|
|
1885
|
-
g.iconName && /* @__PURE__ */
|
|
1886
|
+
g.iconName && /* @__PURE__ */ a(w, { name: g.iconName, className: "pkt-link__icon" }),
|
|
1886
1887
|
g.title
|
|
1887
|
-
] }) }, `userMenu-${
|
|
1888
|
-
(o ||
|
|
1888
|
+
] }) }, `userMenu-${F}`)) }) }),
|
|
1889
|
+
(o || d) && /* @__PURE__ */ h("li", { children: [
|
|
1889
1890
|
o && /* @__PURE__ */ h(X, { children: [
|
|
1890
|
-
/* @__PURE__ */
|
|
1891
|
-
/* @__PURE__ */
|
|
1891
|
+
/* @__PURE__ */ a("div", { className: "pkt-user-menu__label", children: "Representerer" }),
|
|
1892
|
+
/* @__PURE__ */ a("div", { className: "pkt-user-menu__name", children: o.name }),
|
|
1892
1893
|
o.orgNumber && /* @__PURE__ */ h("div", { className: "pkt-user-menu__org-number", children: [
|
|
1893
1894
|
"Org.nr. ",
|
|
1894
1895
|
o.orgNumber
|
|
1895
1896
|
] })
|
|
1896
1897
|
] }),
|
|
1897
|
-
/* @__PURE__ */
|
|
1898
|
-
"
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
onClick: x,
|
|
1902
|
-
children: [
|
|
1903
|
-
/* @__PURE__ */ i(E, { name: "cogwheel", className: "pkt-link__icon" }),
|
|
1904
|
-
"Endre organisasjon"
|
|
1905
|
-
]
|
|
1906
|
-
}
|
|
1907
|
-
) }) })
|
|
1898
|
+
/* @__PURE__ */ a("ul", { className: "pkt-list mt-size-16", children: d && /* @__PURE__ */ a("li", { children: /* @__PURE__ */ h("button", { className: "pkt-link-button pkt-link", onClick: T, children: [
|
|
1899
|
+
/* @__PURE__ */ a(w, { name: "cogwheel", className: "pkt-link__icon" }),
|
|
1900
|
+
"Endre organisasjon"
|
|
1901
|
+
] }) }) })
|
|
1908
1902
|
] }),
|
|
1909
|
-
/* @__PURE__ */
|
|
1910
|
-
|
|
1911
|
-
g.iconName && /* @__PURE__ */
|
|
1903
|
+
/* @__PURE__ */ a("li", { children: /* @__PURE__ */ a("ul", { className: "pkt-list", children: (p || !v) && /* @__PURE__ */ h(X, { children: [
|
|
1904
|
+
p == null ? void 0 : p.map((g, F) => /* @__PURE__ */ a("li", { children: typeof g.target == "string" ? /* @__PURE__ */ h("a", { href: g.target, className: "pkt-link", children: [
|
|
1905
|
+
g.iconName && /* @__PURE__ */ a(w, { name: g.iconName, className: "pkt-link__icon" }),
|
|
1912
1906
|
g.title
|
|
1913
1907
|
] }) : /* @__PURE__ */ h("button", { className: "pkt-link-button pkt-link", onClick: g.target, children: [
|
|
1914
|
-
g.iconName && /* @__PURE__ */
|
|
1908
|
+
g.iconName && /* @__PURE__ */ a(w, { name: g.iconName, className: "pkt-link__icon" }),
|
|
1915
1909
|
g.title
|
|
1916
|
-
] }) }, `userOptions-${
|
|
1917
|
-
!
|
|
1918
|
-
/* @__PURE__ */
|
|
1910
|
+
] }) }, `userOptions-${F}`)),
|
|
1911
|
+
!v && /* @__PURE__ */ a("li", { children: /* @__PURE__ */ h("button", { className: "pkt-link-button pkt-link", onClick: x, children: [
|
|
1912
|
+
/* @__PURE__ */ a(w, { name: "exit", className: "pkt-link__icon" }),
|
|
1919
1913
|
"Logg ut"
|
|
1920
1914
|
] }) })
|
|
1921
1915
|
] }) }) }),
|
|
1922
|
-
|
|
1916
|
+
u && /* @__PURE__ */ a("li", { className: "footer", children: /* @__PURE__ */ a("ul", { className: "pkt-list-horizontal bordered", children: u.map((g, F) => /* @__PURE__ */ a("li", { children: typeof g.target == "string" ? /* @__PURE__ */ a("a", { href: g.target, className: "pkt-link", children: g.title }) : /* @__PURE__ */ a("button", { className: "pkt-link-button pkt-link", onClick: g.target, children: g.title }) }, `userMenuFooter-${F}`)) }) })
|
|
1923
1917
|
] })
|
|
1924
1918
|
]
|
|
1925
1919
|
}
|
|
1926
1920
|
),
|
|
1927
|
-
|
|
1921
|
+
v && /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(
|
|
1928
1922
|
de,
|
|
1929
1923
|
{
|
|
1930
1924
|
className: "pkt-header__user-btn pkt-header__user-btn-logout",
|
|
1931
1925
|
iconName: "exit",
|
|
1932
1926
|
role: "button",
|
|
1933
|
-
onClick:
|
|
1927
|
+
onClick: x,
|
|
1934
1928
|
skin: "secondary",
|
|
1935
1929
|
variant: "icon-right",
|
|
1936
1930
|
children: "Logg ut"
|
|
@@ -1942,73 +1936,73 @@ const Ut = /* @__PURE__ */ mn(pr), yr = B(
|
|
|
1942
1936
|
);
|
|
1943
1937
|
}
|
|
1944
1938
|
), fr = H.forwardRef(
|
|
1945
|
-
({ label: e, id: n, children:
|
|
1946
|
-
/* @__PURE__ */
|
|
1947
|
-
/* @__PURE__ */
|
|
1948
|
-
|
|
1939
|
+
({ label: e, id: n, children: r, ...l }, i) => /* @__PURE__ */ h("div", { className: "pkt-form-group", children: [
|
|
1940
|
+
/* @__PURE__ */ a("label", { htmlFor: n, className: "pkt-form-label", children: e }),
|
|
1941
|
+
/* @__PURE__ */ a("input", { className: "pkt-form-input", id: n, ...l, ref: i }),
|
|
1942
|
+
r
|
|
1949
1943
|
] })
|
|
1950
1944
|
);
|
|
1951
1945
|
fr.displayName = "PktInput";
|
|
1952
|
-
const Se =
|
|
1946
|
+
const Se = W(
|
|
1953
1947
|
({
|
|
1954
1948
|
forId: e,
|
|
1955
1949
|
label: n,
|
|
1956
|
-
helptext:
|
|
1950
|
+
helptext: r,
|
|
1957
1951
|
helptextDropdown: l,
|
|
1958
|
-
helptextDropdownButton:
|
|
1952
|
+
helptextDropdownButton: i,
|
|
1959
1953
|
optionalTag: s = !1,
|
|
1960
|
-
optionalText:
|
|
1961
|
-
requiredTag:
|
|
1954
|
+
optionalText: c = "Valgfritt",
|
|
1955
|
+
requiredTag: o = !1,
|
|
1962
1956
|
requiredText: p = "Må fylles ut",
|
|
1963
1957
|
hasError: u,
|
|
1964
1958
|
errorMessage: d,
|
|
1965
1959
|
disabled: k,
|
|
1966
1960
|
inline: v,
|
|
1967
|
-
ariaDescribedby:
|
|
1961
|
+
ariaDescribedby: S,
|
|
1968
1962
|
useWrapper: x = !0,
|
|
1969
1963
|
children: T,
|
|
1970
1964
|
className: j,
|
|
1971
1965
|
hasFieldset: y = !1
|
|
1972
|
-
},
|
|
1973
|
-
const [_,
|
|
1974
|
-
|
|
1975
|
-
},
|
|
1966
|
+
}, E) => {
|
|
1967
|
+
const [_, $] = le(!1), L = () => {
|
|
1968
|
+
$(!_);
|
|
1969
|
+
}, B = () => s ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light" : o ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige" : "", A = s ? c : o ? p : "", z = k ? "pkt-inputwrapper--disabled" : "", V = v ? "pkt-inputwrapper--inline" : "", q = u ? "pkt-inputwrapper--error" : "", K = !!l && l !== "", M = i || 'Les mer <span class="pkt-sr-only">om inputfeltet</span>', g = y ? "fieldset" : K ? "div" : "label", F = y ? "legend" : K ? "h2" : "span", J = S || (r ? `${e}-helptext` : void 0);
|
|
1976
1970
|
return /* @__PURE__ */ h(
|
|
1977
1971
|
"div",
|
|
1978
1972
|
{
|
|
1979
|
-
className: ["pkt-inputwrapper", j,
|
|
1973
|
+
className: ["pkt-inputwrapper", j, z, V, q].join(
|
|
1980
1974
|
" "
|
|
1981
1975
|
),
|
|
1982
|
-
ref:
|
|
1976
|
+
ref: E,
|
|
1983
1977
|
children: [
|
|
1984
|
-
x ? /* @__PURE__ */
|
|
1985
|
-
|
|
1978
|
+
x ? /* @__PURE__ */ a(X, { children: /* @__PURE__ */ h(
|
|
1979
|
+
g,
|
|
1986
1980
|
{
|
|
1987
1981
|
htmlFor: y ? void 0 : e,
|
|
1988
|
-
"aria-describedby":
|
|
1982
|
+
"aria-describedby": K ? void 0 : S,
|
|
1989
1983
|
className: `pkt-inputwrapper__label${y ? " pkt-inputwrapper__fieldset" : ""}`,
|
|
1990
1984
|
children: [
|
|
1991
1985
|
/* @__PURE__ */ h(
|
|
1992
|
-
|
|
1986
|
+
F,
|
|
1993
1987
|
{
|
|
1994
1988
|
id: `${e}-label`,
|
|
1995
1989
|
className: `${y ? " pkt-inputwrapper__legend" : ""}`,
|
|
1996
1990
|
children: [
|
|
1997
1991
|
n,
|
|
1998
|
-
|
|
1992
|
+
A !== "" && /* @__PURE__ */ a("span", { className: B(), children: A })
|
|
1999
1993
|
]
|
|
2000
1994
|
}
|
|
2001
1995
|
),
|
|
2002
|
-
|
|
1996
|
+
r && /* @__PURE__ */ a(
|
|
2003
1997
|
"div",
|
|
2004
1998
|
{
|
|
2005
1999
|
className: "pkt-inputwrapper__helptext",
|
|
2006
2000
|
id: `${e}-helptext`,
|
|
2007
|
-
dangerouslySetInnerHTML: { __html:
|
|
2001
|
+
dangerouslySetInnerHTML: { __html: r }
|
|
2008
2002
|
}
|
|
2009
2003
|
),
|
|
2010
|
-
|
|
2011
|
-
/* @__PURE__ */
|
|
2004
|
+
K && l !== "" && /* @__PURE__ */ h("div", { children: [
|
|
2005
|
+
/* @__PURE__ */ a(
|
|
2012
2006
|
de,
|
|
2013
2007
|
{
|
|
2014
2008
|
skin: "tertiary",
|
|
@@ -2016,55 +2010,55 @@ const Se = B(
|
|
|
2016
2010
|
variant: "icon-right",
|
|
2017
2011
|
iconName: _ ? "chevron-thin-up" : "chevron-thin-down",
|
|
2018
2012
|
className: "pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",
|
|
2019
|
-
onClick:
|
|
2020
|
-
children: /* @__PURE__ */
|
|
2013
|
+
onClick: L,
|
|
2014
|
+
children: /* @__PURE__ */ a("span", { dangerouslySetInnerHTML: { __html: M } })
|
|
2021
2015
|
}
|
|
2022
2016
|
),
|
|
2023
|
-
/* @__PURE__ */
|
|
2017
|
+
/* @__PURE__ */ a(
|
|
2024
2018
|
"div",
|
|
2025
2019
|
{
|
|
2026
2020
|
className: `pkt-inputwrapper__helptext ${_ ? "pkt-inputwrapper__helptext-expandable-open" : "pkt-inputwrapper__helptext-expandable-closed"}`,
|
|
2027
|
-
children: /* @__PURE__ */
|
|
2021
|
+
children: /* @__PURE__ */ a("span", { dangerouslySetInnerHTML: { __html: l } })
|
|
2028
2022
|
}
|
|
2029
2023
|
),
|
|
2030
|
-
!y && /* @__PURE__ */
|
|
2024
|
+
!y && /* @__PURE__ */ a("label", { htmlFor: e, className: "pkt-sr-only", "aria-describedby": J, children: n })
|
|
2031
2025
|
] }),
|
|
2032
|
-
/* @__PURE__ */
|
|
2026
|
+
/* @__PURE__ */ a(X, { children: T })
|
|
2033
2027
|
]
|
|
2034
2028
|
}
|
|
2035
2029
|
) }) : /* @__PURE__ */ h(X, { children: [
|
|
2036
|
-
!y && /* @__PURE__ */
|
|
2030
|
+
!y && /* @__PURE__ */ a(
|
|
2037
2031
|
"label",
|
|
2038
2032
|
{
|
|
2039
2033
|
htmlFor: e,
|
|
2040
2034
|
className: "pkt-sr-only",
|
|
2041
|
-
"aria-describedby":
|
|
2035
|
+
"aria-describedby": J,
|
|
2042
2036
|
id: `${e}-label`,
|
|
2043
2037
|
children: n
|
|
2044
2038
|
}
|
|
2045
2039
|
),
|
|
2046
2040
|
T
|
|
2047
2041
|
] }),
|
|
2048
|
-
u && d && /* @__PURE__ */
|
|
2042
|
+
u && d && /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(yn, { skin: "error", "aria-live": "assertive", id: `${e}-error`, compact: !0, children: d }) })
|
|
2049
2043
|
]
|
|
2050
2044
|
}
|
|
2051
2045
|
);
|
|
2052
2046
|
}
|
|
2053
2047
|
);
|
|
2054
2048
|
Se.displayName = "PktInputWrapper";
|
|
2055
|
-
const dr =
|
|
2049
|
+
const dr = W(
|
|
2056
2050
|
({
|
|
2057
2051
|
children: e,
|
|
2058
2052
|
className: n,
|
|
2059
|
-
iconName:
|
|
2053
|
+
iconName: r = "user",
|
|
2060
2054
|
openInNewTab: l = !1,
|
|
2061
|
-
skin:
|
|
2055
|
+
skin: i = "normal",
|
|
2062
2056
|
href: s = "#",
|
|
2063
|
-
external:
|
|
2064
|
-
title:
|
|
2057
|
+
external: c = !1,
|
|
2058
|
+
title: o,
|
|
2065
2059
|
...p
|
|
2066
2060
|
}, u) => {
|
|
2067
|
-
const d = [n, "pkt-linkcard",
|
|
2061
|
+
const d = [n, "pkt-linkcard", i && `pkt-linkcard--${i}`].filter(Boolean).join(" ");
|
|
2068
2062
|
return /* @__PURE__ */ h(
|
|
2069
2063
|
"a",
|
|
2070
2064
|
{
|
|
@@ -2075,10 +2069,10 @@ const dr = B(
|
|
|
2075
2069
|
rel: l ? "noopener noreferrer" : void 0,
|
|
2076
2070
|
ref: u,
|
|
2077
2071
|
children: [
|
|
2078
|
-
/* @__PURE__ */
|
|
2072
|
+
/* @__PURE__ */ a(w, { className: "pkt-link__icon", name: r }),
|
|
2079
2073
|
/* @__PURE__ */ h("div", { className: "pkt-linkcard__content", children: [
|
|
2080
|
-
/* @__PURE__ */
|
|
2081
|
-
/* @__PURE__ */
|
|
2074
|
+
/* @__PURE__ */ a("div", { className: `pkt-linkcard__title ${c ? "pkt-link pkt-link--external" : ""}`, children: o }),
|
|
2075
|
+
/* @__PURE__ */ a("div", { className: "pkt-linkcard__text", children: e })
|
|
2082
2076
|
] })
|
|
2083
2077
|
]
|
|
2084
2078
|
}
|
|
@@ -2086,85 +2080,93 @@ const dr = B(
|
|
|
2086
2080
|
}
|
|
2087
2081
|
);
|
|
2088
2082
|
dr.displayName = "PktLinkCard";
|
|
2089
|
-
const wr =
|
|
2083
|
+
const wr = W(
|
|
2090
2084
|
({
|
|
2091
2085
|
className: e,
|
|
2092
2086
|
message: n,
|
|
2093
|
-
size:
|
|
2087
|
+
size: r = "medium",
|
|
2094
2088
|
inline: l = !1,
|
|
2095
|
-
isLoading:
|
|
2089
|
+
isLoading: i = !0,
|
|
2096
2090
|
variant: s = "rainbow",
|
|
2097
|
-
delay:
|
|
2098
|
-
children:
|
|
2091
|
+
delay: c = 0,
|
|
2092
|
+
children: o,
|
|
2099
2093
|
...p
|
|
2100
2094
|
}, u) => {
|
|
2101
|
-
const d = `pkt-loader pkt-loader--${
|
|
2102
|
-
|
|
2095
|
+
const d = `pkt-loader pkt-loader--${r}`, [k, v] = le(!(c > 0));
|
|
2096
|
+
c > 0 && setTimeout(() => {
|
|
2103
2097
|
v(!0);
|
|
2104
|
-
},
|
|
2105
|
-
const
|
|
2106
|
-
return /* @__PURE__ */
|
|
2098
|
+
}, c);
|
|
2099
|
+
const S = (x) => x === "shapes" ? "loader" : x === "blue" ? "spinner-blue" : "spinner";
|
|
2100
|
+
return /* @__PURE__ */ a(
|
|
2107
2101
|
"div",
|
|
2108
2102
|
{
|
|
2109
2103
|
role: "status",
|
|
2110
2104
|
"aria-live": "polite",
|
|
2111
|
-
"aria-busy":
|
|
2105
|
+
"aria-busy": i,
|
|
2112
2106
|
className: `pkt-loader--${l ? "inline" : "box"} ${e || ""}`,
|
|
2113
|
-
children:
|
|
2114
|
-
|
|
2115
|
-
|
|
2107
|
+
children: i ? /* @__PURE__ */ a(X, { children: k ? /* @__PURE__ */ h("div", { className: d, "data-testid": "pkt-loader", ref: u, ...p, children: [
|
|
2108
|
+
s === "🐣" ? (
|
|
2109
|
+
// Kode: Gullbrød
|
|
2110
|
+
/* @__PURE__ */ h("div", { className: "egg-loader", children: [
|
|
2111
|
+
/* @__PURE__ */ a("div", { className: "egg one" }),
|
|
2112
|
+
/* @__PURE__ */ a("div", { className: "egg two" }),
|
|
2113
|
+
/* @__PURE__ */ a("div", { className: "egg three" }),
|
|
2114
|
+
/* @__PURE__ */ a("div", { className: "egg four" })
|
|
2115
|
+
] })
|
|
2116
|
+
) : /* @__PURE__ */ a(
|
|
2117
|
+
w,
|
|
2116
2118
|
{
|
|
2117
|
-
name:
|
|
2119
|
+
name: S(s),
|
|
2118
2120
|
"aria-label": "loading",
|
|
2119
|
-
path: "https://punkt-cdn.oslo.kommune.no/11.
|
|
2121
|
+
path: "https://punkt-cdn.oslo.kommune.no/11.10/animations/",
|
|
2120
2122
|
className: `pkt-loader__svg pkt-loader__${s}`
|
|
2121
2123
|
}
|
|
2122
2124
|
),
|
|
2123
|
-
n && /* @__PURE__ */
|
|
2124
|
-
] }) : null }) :
|
|
2125
|
+
n && /* @__PURE__ */ a("p", { children: n })
|
|
2126
|
+
] }) : null }) : o
|
|
2125
2127
|
}
|
|
2126
2128
|
);
|
|
2127
2129
|
}
|
|
2128
2130
|
), Er = ({
|
|
2129
2131
|
children: e,
|
|
2130
2132
|
className: n,
|
|
2131
|
-
compact:
|
|
2133
|
+
compact: r = !1,
|
|
2132
2134
|
skin: l = "beige",
|
|
2133
|
-
title:
|
|
2135
|
+
title: i,
|
|
2134
2136
|
...s
|
|
2135
2137
|
}) => {
|
|
2136
|
-
const
|
|
2138
|
+
const c = [
|
|
2137
2139
|
n,
|
|
2138
2140
|
"pkt-messagebox",
|
|
2139
2141
|
l && `pkt-messagebox--${l}`,
|
|
2140
|
-
|
|
2142
|
+
r && "pkt-messagebox--compact"
|
|
2141
2143
|
].filter(Boolean).join(" ");
|
|
2142
|
-
return /* @__PURE__ */ h("div", { ...s, className:
|
|
2143
|
-
|
|
2144
|
-
/* @__PURE__ */
|
|
2144
|
+
return /* @__PURE__ */ h("div", { ...s, className: c, children: [
|
|
2145
|
+
i && /* @__PURE__ */ a("div", { className: "pkt-messagebox__title", children: i }),
|
|
2146
|
+
/* @__PURE__ */ a("div", { className: "pkt-messagebox__text", children: e })
|
|
2145
2147
|
] });
|
|
2146
|
-
}, mr =
|
|
2148
|
+
}, mr = W(
|
|
2147
2149
|
({
|
|
2148
2150
|
id: e,
|
|
2149
2151
|
name: n,
|
|
2150
|
-
label:
|
|
2152
|
+
label: r,
|
|
2151
2153
|
className: l,
|
|
2152
|
-
hasTile:
|
|
2154
|
+
hasTile: i = !1,
|
|
2153
2155
|
disabled: s = !1,
|
|
2154
|
-
checkHelptext:
|
|
2155
|
-
hasError:
|
|
2156
|
+
checkHelptext: c,
|
|
2157
|
+
hasError: o = !1,
|
|
2156
2158
|
...p
|
|
2157
2159
|
}, u) => {
|
|
2158
2160
|
const d = [
|
|
2159
2161
|
l,
|
|
2160
2162
|
"pkt-input-check"
|
|
2161
2163
|
].filter(Boolean).join(" ");
|
|
2162
|
-
return /* @__PURE__ */
|
|
2163
|
-
/* @__PURE__ */
|
|
2164
|
+
return /* @__PURE__ */ a("div", { className: d, children: /* @__PURE__ */ h("div", { className: `pkt-input-check__input ${i ? "pkt-input-check__input--tile" : ""} ${s && i ? "pkt-input-check__input--tile-disabled" : ""}`, children: [
|
|
2165
|
+
/* @__PURE__ */ a(
|
|
2164
2166
|
"input",
|
|
2165
2167
|
{
|
|
2166
2168
|
ref: u,
|
|
2167
|
-
className: `pkt-input-check__input-checkbox ${
|
|
2169
|
+
className: `pkt-input-check__input-checkbox ${o ? "pkt-input-check__input-checkbox--error" : ""}`,
|
|
2168
2170
|
type: "radio",
|
|
2169
2171
|
id: e,
|
|
2170
2172
|
disabled: s,
|
|
@@ -2173,32 +2175,32 @@ const wr = B(
|
|
|
2173
2175
|
}
|
|
2174
2176
|
),
|
|
2175
2177
|
/* @__PURE__ */ h("label", { className: "pkt-input-check__input-label", htmlFor: e, children: [
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
+
r,
|
|
2179
|
+
c && /* @__PURE__ */ a("div", { className: "pkt-input-check__input-helptext", children: c })
|
|
2178
2180
|
] })
|
|
2179
2181
|
] }) });
|
|
2180
2182
|
}
|
|
2181
2183
|
);
|
|
2182
2184
|
mr.displayName = "PktRadioButton";
|
|
2183
|
-
const xr =
|
|
2185
|
+
const xr = W(
|
|
2184
2186
|
({
|
|
2185
2187
|
action: e,
|
|
2186
2188
|
appearance: n = "local",
|
|
2187
|
-
disabled:
|
|
2189
|
+
disabled: r = !1,
|
|
2188
2190
|
fullwidth: l = !1,
|
|
2189
|
-
id:
|
|
2191
|
+
id: i,
|
|
2190
2192
|
label: s,
|
|
2191
|
-
method:
|
|
2192
|
-
name:
|
|
2193
|
+
method: c = "get",
|
|
2194
|
+
name: o,
|
|
2193
2195
|
placeholder: p = "Søk…",
|
|
2194
2196
|
suggestions: u,
|
|
2195
2197
|
value: d = "",
|
|
2196
2198
|
onSearch: k,
|
|
2197
2199
|
onSuggestionClick: v,
|
|
2198
|
-
...
|
|
2200
|
+
...S
|
|
2199
2201
|
}, x) => {
|
|
2200
|
-
const T = (_,
|
|
2201
|
-
_ ? _() : v && v(
|
|
2202
|
+
const T = (_, $) => {
|
|
2203
|
+
_ ? _() : v && v($);
|
|
2202
2204
|
}, j = `pkt-searchinput pkt-searchinput--${n} ${l ? "pkt-searchinput--fullwidth" : ""}`;
|
|
2203
2205
|
return /* @__PURE__ */ h(
|
|
2204
2206
|
e ? "form" : "div",
|
|
@@ -2206,40 +2208,40 @@ const xr = B(
|
|
|
2206
2208
|
className: j,
|
|
2207
2209
|
onSubmit: k && (() => k(d)),
|
|
2208
2210
|
action: e || void 0,
|
|
2209
|
-
method: e ?
|
|
2211
|
+
method: e ? c : void 0,
|
|
2210
2212
|
role: "search",
|
|
2211
2213
|
ref: x,
|
|
2212
|
-
...
|
|
2214
|
+
...S,
|
|
2213
2215
|
children: [
|
|
2214
2216
|
/* @__PURE__ */ h(
|
|
2215
2217
|
s ? "label" : "div",
|
|
2216
2218
|
{
|
|
2217
|
-
htmlFor: s ?
|
|
2219
|
+
htmlFor: s ? i : void 0,
|
|
2218
2220
|
className: s ? "pkt-inputwrapper__label" : "",
|
|
2219
2221
|
children: [
|
|
2220
|
-
s && /* @__PURE__ */
|
|
2222
|
+
s && /* @__PURE__ */ a(X, { children: s }),
|
|
2221
2223
|
/* @__PURE__ */ h(
|
|
2222
2224
|
"div",
|
|
2223
2225
|
{
|
|
2224
2226
|
className: n === "local" ? "pkt-input__container" : "pkt-searchinput__field",
|
|
2225
2227
|
children: [
|
|
2226
|
-
/* @__PURE__ */
|
|
2228
|
+
/* @__PURE__ */ a(
|
|
2227
2229
|
"input",
|
|
2228
2230
|
{
|
|
2229
2231
|
className: `pkt-input ${l ? "pkt-input--fullwidth" : ""}`,
|
|
2230
2232
|
type: "search",
|
|
2231
|
-
name:
|
|
2232
|
-
id:
|
|
2233
|
+
name: o || i,
|
|
2234
|
+
id: i,
|
|
2233
2235
|
placeholder: p,
|
|
2234
2236
|
value: d,
|
|
2235
|
-
disabled:
|
|
2237
|
+
disabled: r,
|
|
2236
2238
|
onInput: k && ((_) => k(_.currentTarget.value)),
|
|
2237
2239
|
autoComplete: "off",
|
|
2238
2240
|
"aria-autocomplete": "list",
|
|
2239
|
-
"aria-controls": `${
|
|
2241
|
+
"aria-controls": `${i}-suggestions`
|
|
2240
2242
|
}
|
|
2241
2243
|
),
|
|
2242
|
-
/* @__PURE__ */
|
|
2244
|
+
/* @__PURE__ */ a(
|
|
2243
2245
|
de,
|
|
2244
2246
|
{
|
|
2245
2247
|
className: `pkt-searchinput__button ${n === "local" ? "pkt-input-icon" : ""}`,
|
|
@@ -2248,7 +2250,7 @@ const xr = B(
|
|
|
2248
2250
|
skin: n === "local" ? "tertiary" : "primary",
|
|
2249
2251
|
color: n === "global" ? "yellow" : void 0,
|
|
2250
2252
|
type: "submit",
|
|
2251
|
-
disabled:
|
|
2253
|
+
disabled: r,
|
|
2252
2254
|
onClick: k && (() => k(d)),
|
|
2253
2255
|
onKeyUp: k && ((_) => _.key === "Enter" && k(d)),
|
|
2254
2256
|
children: s || p
|
|
@@ -2260,270 +2262,270 @@ const xr = B(
|
|
|
2260
2262
|
]
|
|
2261
2263
|
}
|
|
2262
2264
|
),
|
|
2263
|
-
u && /* @__PURE__ */
|
|
2265
|
+
u && /* @__PURE__ */ a(
|
|
2264
2266
|
"ul",
|
|
2265
2267
|
{
|
|
2266
|
-
id: `${
|
|
2268
|
+
id: `${i}-suggestions`,
|
|
2267
2269
|
className: "pkt-searchinput__suggestions",
|
|
2268
2270
|
"aria-live": "assertive",
|
|
2269
|
-
children: u.map((_,
|
|
2271
|
+
children: u.map((_, $) => /* @__PURE__ */ a("li", { children: H.createElement(
|
|
2270
2272
|
_.href ? "a" : _.onClick ? "button" : "div",
|
|
2271
2273
|
{
|
|
2272
2274
|
href: _.href,
|
|
2273
2275
|
className: `pkt-searchinput__suggestion ${_.onClick ? "pkt-link-button" : ""} ${_.href || _.onClick ? "pkt-searchinput__suggestion--has-hover" : ""}`,
|
|
2274
2276
|
type: _.onClick ? "button" : void 0,
|
|
2275
|
-
onClick: () => T(_.onClick,
|
|
2276
|
-
onKeyUp: () => T(_.onClick,
|
|
2277
|
+
onClick: () => T(_.onClick, $),
|
|
2278
|
+
onKeyUp: () => T(_.onClick, $)
|
|
2277
2279
|
},
|
|
2278
2280
|
/* @__PURE__ */ h(X, { children: [
|
|
2279
|
-
_.title && /* @__PURE__ */
|
|
2280
|
-
_.text && /* @__PURE__ */
|
|
2281
|
+
_.title && /* @__PURE__ */ a("h3", { className: "pkt-searchinput__suggestion-title", children: _.title }),
|
|
2282
|
+
_.text && /* @__PURE__ */ a("p", { className: "pkt-searchinput__suggestion-text", children: _.text })
|
|
2281
2283
|
] })
|
|
2282
|
-
) }, `search-suggestion-${
|
|
2284
|
+
) }, `search-suggestion-${$}`))
|
|
2283
2285
|
}
|
|
2284
2286
|
)
|
|
2285
2287
|
]
|
|
2286
2288
|
}
|
|
2287
2289
|
);
|
|
2288
2290
|
}
|
|
2289
|
-
), Cr =
|
|
2291
|
+
), Cr = W(
|
|
2290
2292
|
({
|
|
2291
2293
|
ariaDescribedby: e,
|
|
2292
2294
|
ariaLabelledby: n,
|
|
2293
|
-
children:
|
|
2295
|
+
children: r,
|
|
2294
2296
|
className: l,
|
|
2295
|
-
disabled:
|
|
2297
|
+
disabled: i = !1,
|
|
2296
2298
|
errorMessage: s,
|
|
2297
|
-
hasError:
|
|
2298
|
-
helptext:
|
|
2299
|
+
hasError: c,
|
|
2300
|
+
helptext: o,
|
|
2299
2301
|
helptextDropdown: p,
|
|
2300
2302
|
helptextDropdownButton: u,
|
|
2301
2303
|
id: d,
|
|
2302
2304
|
inline: k = !1,
|
|
2303
2305
|
fullwidth: v = !1,
|
|
2304
|
-
label:
|
|
2306
|
+
label: S,
|
|
2305
2307
|
name: x,
|
|
2306
2308
|
optionalTag: T = !1,
|
|
2307
2309
|
optionalText: j,
|
|
2308
2310
|
requiredTag: y = !1,
|
|
2309
|
-
requiredText:
|
|
2311
|
+
requiredText: E,
|
|
2310
2312
|
..._
|
|
2311
|
-
},
|
|
2312
|
-
const
|
|
2313
|
-
return /* @__PURE__ */
|
|
2313
|
+
}, $) => {
|
|
2314
|
+
const L = [l, "pkt-select"].join(" ");
|
|
2315
|
+
return /* @__PURE__ */ a(
|
|
2314
2316
|
Se,
|
|
2315
2317
|
{
|
|
2316
|
-
className:
|
|
2318
|
+
className: L,
|
|
2317
2319
|
forId: d,
|
|
2318
|
-
label:
|
|
2319
|
-
helptext:
|
|
2320
|
+
label: S,
|
|
2321
|
+
helptext: o,
|
|
2320
2322
|
helptextDropdown: p,
|
|
2321
2323
|
helptextDropdownButton: u,
|
|
2322
2324
|
optionalTag: T,
|
|
2323
2325
|
optionalText: j,
|
|
2324
2326
|
requiredTag: y,
|
|
2325
|
-
requiredText:
|
|
2326
|
-
hasError:
|
|
2327
|
+
requiredText: E,
|
|
2328
|
+
hasError: c,
|
|
2327
2329
|
errorMessage: s,
|
|
2328
|
-
disabled:
|
|
2330
|
+
disabled: i,
|
|
2329
2331
|
inline: k,
|
|
2330
2332
|
ariaDescribedby: e,
|
|
2331
|
-
children: /* @__PURE__ */
|
|
2333
|
+
children: /* @__PURE__ */ a(
|
|
2332
2334
|
"select",
|
|
2333
2335
|
{
|
|
2334
|
-
ref:
|
|
2336
|
+
ref: $,
|
|
2335
2337
|
className: `pkt-input ${v ? "pkt-input--fullwidth" : ""}`,
|
|
2336
|
-
"aria-invalid":
|
|
2338
|
+
"aria-invalid": c,
|
|
2337
2339
|
"aria-errormessage": `${d}-error`,
|
|
2338
2340
|
"aria-labelledby": n || `${d}-label`,
|
|
2339
|
-
disabled:
|
|
2341
|
+
disabled: i,
|
|
2340
2342
|
id: d,
|
|
2341
2343
|
name: x || d,
|
|
2342
2344
|
..._,
|
|
2343
|
-
children:
|
|
2345
|
+
children: r
|
|
2344
2346
|
}
|
|
2345
2347
|
)
|
|
2346
2348
|
}
|
|
2347
2349
|
);
|
|
2348
2350
|
}
|
|
2349
|
-
), hr = ({ isResponsive: e, children: n }) => e ? /* @__PURE__ */
|
|
2351
|
+
), hr = ({ isResponsive: e, children: n }) => e ? /* @__PURE__ */ a("div", { className: "pkt-table-container", children: n }) : /* @__PURE__ */ a(X, { children: n }), Rr = ({
|
|
2350
2352
|
isResponsive: e,
|
|
2351
|
-
modifiers: { info: n = !1, success:
|
|
2353
|
+
modifiers: { info: n = !1, success: r = !1, strong: l = !1, shadow: i = !1 } = {},
|
|
2352
2354
|
children: s
|
|
2353
|
-
}) => /* @__PURE__ */
|
|
2355
|
+
}) => /* @__PURE__ */ a(hr, { isResponsive: e, children: /* @__PURE__ */ a(
|
|
2354
2356
|
"table",
|
|
2355
2357
|
{
|
|
2356
2358
|
className: Ut("pkt-table", {
|
|
2357
2359
|
"pkt-table--info": n,
|
|
2358
|
-
"pkt-table--success":
|
|
2360
|
+
"pkt-table--success": r,
|
|
2359
2361
|
"pkt-table--strong": l,
|
|
2360
|
-
"pkt-table--shadow":
|
|
2362
|
+
"pkt-table--shadow": i
|
|
2361
2363
|
}),
|
|
2362
2364
|
children: s
|
|
2363
2365
|
}
|
|
2364
|
-
) }), Sr = ({ children: e }) => /* @__PURE__ */
|
|
2366
|
+
) }), Sr = ({ children: e }) => /* @__PURE__ */ a("td", { className: "pkt-table__th", children: e }), Pr = ({ children: e }) => /* @__PURE__ */ a("th", { className: "pkt-table__th", children: e }), Ke = W(({
|
|
2365
2367
|
children: e,
|
|
2366
2368
|
className: n,
|
|
2367
|
-
skin:
|
|
2369
|
+
skin: r = "blue",
|
|
2368
2370
|
textStyle: l = "normal-text",
|
|
2369
|
-
size:
|
|
2371
|
+
size: i = "medium",
|
|
2370
2372
|
closeTag: s = !1,
|
|
2371
|
-
iconName:
|
|
2372
|
-
type:
|
|
2373
|
+
iconName: c = "",
|
|
2374
|
+
type: o = "button",
|
|
2373
2375
|
ariaLabel: p = "close",
|
|
2374
2376
|
onClick: u = () => {
|
|
2375
2377
|
}
|
|
2376
2378
|
}, d) => {
|
|
2377
|
-
const [k, v] = le(!1),
|
|
2379
|
+
const [k, v] = le(!1), S = (y) => {
|
|
2378
2380
|
v(!0), u(y);
|
|
2379
2381
|
}, x = [
|
|
2380
2382
|
"pkt-tag",
|
|
2383
|
+
i && `pkt-tag--${i}`,
|
|
2381
2384
|
r && `pkt-tag--${r}`,
|
|
2382
|
-
a && `pkt-tag--${a}`,
|
|
2383
2385
|
l && `pkt-tag--${l}`,
|
|
2384
2386
|
n
|
|
2385
2387
|
].filter(Boolean).join(" "), T = [
|
|
2386
2388
|
"pkt-tag",
|
|
2387
2389
|
"pkt-btn",
|
|
2388
2390
|
"pkt-btn--tertiary",
|
|
2391
|
+
i && `pkt-tag--${i}`,
|
|
2389
2392
|
r && `pkt-tag--${r}`,
|
|
2390
|
-
a && `pkt-tag--${a}`,
|
|
2391
2393
|
l && `pkt-tag--${l}`,
|
|
2392
|
-
|
|
2393
|
-
s && !
|
|
2394
|
+
c && s ? "pkt-btn--icons-right-and-left" : null,
|
|
2395
|
+
s && !c ? "pkt-btn--icon-right" : null,
|
|
2394
2396
|
n
|
|
2395
2397
|
].filter(Boolean).join(" "), j = !k;
|
|
2396
|
-
return s &&
|
|
2398
|
+
return s && c ? /* @__PURE__ */ a(X, { children: j && /* @__PURE__ */ h(
|
|
2397
2399
|
"button",
|
|
2398
2400
|
{
|
|
2399
2401
|
className: T,
|
|
2400
|
-
type:
|
|
2402
|
+
type: o,
|
|
2401
2403
|
"aria-label": p,
|
|
2402
|
-
onClick:
|
|
2404
|
+
onClick: S,
|
|
2403
2405
|
ref: d,
|
|
2404
2406
|
children: [
|
|
2405
|
-
/* @__PURE__ */
|
|
2407
|
+
/* @__PURE__ */ a(w, { className: "pkt-tag__icon", name: c }),
|
|
2406
2408
|
e,
|
|
2407
|
-
/* @__PURE__ */
|
|
2409
|
+
/* @__PURE__ */ a(w, { className: "pkt-tag__close-btn", name: "close" })
|
|
2408
2410
|
]
|
|
2409
2411
|
}
|
|
2410
|
-
) }) : s ? /* @__PURE__ */
|
|
2412
|
+
) }) : s ? /* @__PURE__ */ a(X, { children: j && /* @__PURE__ */ h(
|
|
2411
2413
|
"button",
|
|
2412
2414
|
{
|
|
2413
2415
|
className: T,
|
|
2414
|
-
type:
|
|
2416
|
+
type: o,
|
|
2415
2417
|
"aria-label": p,
|
|
2416
|
-
onClick:
|
|
2418
|
+
onClick: S,
|
|
2417
2419
|
ref: d,
|
|
2418
2420
|
children: [
|
|
2419
|
-
/* @__PURE__ */
|
|
2421
|
+
/* @__PURE__ */ a(w, { className: "pkt-tag__close-btn", name: "close" }),
|
|
2420
2422
|
e
|
|
2421
2423
|
]
|
|
2422
2424
|
}
|
|
2423
|
-
) }) :
|
|
2424
|
-
/* @__PURE__ */
|
|
2425
|
+
) }) : c ? /* @__PURE__ */ h("span", { className: x, children: [
|
|
2426
|
+
/* @__PURE__ */ a(w, { className: "pkt-tag__icon", name: c }),
|
|
2425
2427
|
e
|
|
2426
|
-
] }) : /* @__PURE__ */
|
|
2428
|
+
] }) : /* @__PURE__ */ a("span", { className: x, children: e });
|
|
2427
2429
|
});
|
|
2428
2430
|
Ke.displayName = "PktTag";
|
|
2429
|
-
const Tr =
|
|
2430
|
-
({ arrowNav: e = !0, tabs: n, onTabSelected:
|
|
2431
|
-
const
|
|
2431
|
+
const Tr = W(
|
|
2432
|
+
({ arrowNav: e = !0, tabs: n, onTabSelected: r }, l) => {
|
|
2433
|
+
const i = Et([]);
|
|
2432
2434
|
Je(() => {
|
|
2433
|
-
|
|
2435
|
+
i.current = i.current.slice(0, n.length);
|
|
2434
2436
|
}, [n]);
|
|
2435
|
-
const s = (
|
|
2436
|
-
p.action && p.action(
|
|
2437
|
-
},
|
|
2437
|
+
const s = (o, p) => {
|
|
2438
|
+
p.action && p.action(o), r && r(o);
|
|
2439
|
+
}, c = (o, p) => {
|
|
2438
2440
|
var u, d;
|
|
2439
|
-
e && (p.code === "ArrowLeft" &&
|
|
2441
|
+
e && (p.code === "ArrowLeft" && o !== 0 && ((u = i.current[o - 1]) == null || u.focus()), p.code === "ArrowRight" && o < n.length - 1 && ((d = i.current[o + 1]) == null || d.focus()), (p.code === "ArrowDown" || p.code === "Space") && s(o, n[o]));
|
|
2440
2442
|
};
|
|
2441
|
-
return /* @__PURE__ */
|
|
2443
|
+
return /* @__PURE__ */ a("div", { className: "pkt-tabs", ref: l, children: /* @__PURE__ */ a("div", { className: "pkt-tabs__list", role: e ? "tablist" : "navigation", children: n.map((o, p) => /* @__PURE__ */ a(dn, { children: o.href ? /* @__PURE__ */ h(
|
|
2442
2444
|
"a",
|
|
2443
2445
|
{
|
|
2444
|
-
"aria-selected": !!
|
|
2446
|
+
"aria-selected": !!o.active,
|
|
2445
2447
|
role: e ? "tab" : void 0,
|
|
2446
|
-
href:
|
|
2447
|
-
"aria-controls":
|
|
2448
|
-
className: `pkt-tabs__link ${
|
|
2449
|
-
onKeyUp: (u) =>
|
|
2450
|
-
onClick: () => s(p,
|
|
2451
|
-
tabIndex:
|
|
2448
|
+
href: o.href,
|
|
2449
|
+
"aria-controls": o.controls,
|
|
2450
|
+
className: `pkt-tabs__link ${o.active ? "active" : ""}`,
|
|
2451
|
+
onKeyUp: (u) => c(p, u),
|
|
2452
|
+
onClick: () => s(p, o),
|
|
2453
|
+
tabIndex: o.active || !e ? void 0 : -1,
|
|
2452
2454
|
ref: (u) => {
|
|
2453
|
-
|
|
2455
|
+
i.current[p] = u;
|
|
2454
2456
|
},
|
|
2455
2457
|
children: [
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2458
|
+
o.icon && /* @__PURE__ */ a(w, { name: o.icon, className: "pkt-icon--small" }),
|
|
2459
|
+
o.text,
|
|
2460
|
+
o.tag && /* @__PURE__ */ a(Ke, { skin: o.tag.skin, size: "small", children: o.tag.text })
|
|
2459
2461
|
]
|
|
2460
2462
|
}
|
|
2461
2463
|
) : /* @__PURE__ */ h(
|
|
2462
2464
|
"button",
|
|
2463
2465
|
{
|
|
2464
|
-
"aria-selected": !!
|
|
2466
|
+
"aria-selected": !!o.active,
|
|
2465
2467
|
role: e ? "tab" : void 0,
|
|
2466
2468
|
type: "button",
|
|
2467
|
-
"aria-controls":
|
|
2468
|
-
className: `pkt-tabs__button pkt-link-button ${
|
|
2469
|
-
onKeyUp: (u) =>
|
|
2470
|
-
onClick: () => s(p,
|
|
2471
|
-
tabIndex:
|
|
2469
|
+
"aria-controls": o.controls,
|
|
2470
|
+
className: `pkt-tabs__button pkt-link-button ${o.active ? "active" : ""}`,
|
|
2471
|
+
onKeyUp: (u) => c(p, u),
|
|
2472
|
+
onClick: () => s(p, o),
|
|
2473
|
+
tabIndex: o.active || !e ? void 0 : -1,
|
|
2472
2474
|
ref: (u) => {
|
|
2473
|
-
|
|
2475
|
+
i.current[p] = u;
|
|
2474
2476
|
},
|
|
2475
2477
|
children: [
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2478
|
+
o.icon && /* @__PURE__ */ a(w, { name: o.icon, className: "pkt-icon--small" }),
|
|
2479
|
+
o.text,
|
|
2480
|
+
o.tag && /* @__PURE__ */ a(Ke, { skin: o.tag.skin, size: "small", children: o.tag.text })
|
|
2479
2481
|
]
|
|
2480
2482
|
},
|
|
2481
2483
|
"b-" + p
|
|
2482
2484
|
) }, p)) }) });
|
|
2483
2485
|
}
|
|
2484
|
-
), Or =
|
|
2486
|
+
), Or = W(
|
|
2485
2487
|
({
|
|
2486
2488
|
id: e,
|
|
2487
2489
|
ariaDescribedby: n,
|
|
2488
|
-
ariaLabelledby:
|
|
2490
|
+
ariaLabelledby: r,
|
|
2489
2491
|
counter: l,
|
|
2490
|
-
counterMaxLength:
|
|
2492
|
+
counterMaxLength: i,
|
|
2491
2493
|
className: s,
|
|
2492
|
-
disabled:
|
|
2493
|
-
errorMessage:
|
|
2494
|
+
disabled: c,
|
|
2495
|
+
errorMessage: o,
|
|
2494
2496
|
hasError: p,
|
|
2495
2497
|
helptext: u,
|
|
2496
2498
|
helptextDropdown: d,
|
|
2497
2499
|
helptextDropdownButton: k,
|
|
2498
2500
|
inline: v,
|
|
2499
|
-
fullwidth:
|
|
2501
|
+
fullwidth: S = !1,
|
|
2500
2502
|
label: x,
|
|
2501
2503
|
name: T,
|
|
2502
2504
|
optionalTag: j = !1,
|
|
2503
2505
|
optionalText: y,
|
|
2504
|
-
requiredTag:
|
|
2506
|
+
requiredTag: E = !1,
|
|
2505
2507
|
requiredText: _,
|
|
2506
|
-
placeholder:
|
|
2507
|
-
rows:
|
|
2508
|
-
useWrapper:
|
|
2509
|
-
onChange:
|
|
2510
|
-
...
|
|
2511
|
-
},
|
|
2512
|
-
const
|
|
2508
|
+
placeholder: $,
|
|
2509
|
+
rows: L,
|
|
2510
|
+
useWrapper: B = !0,
|
|
2511
|
+
onChange: A,
|
|
2512
|
+
...z
|
|
2513
|
+
}, V) => {
|
|
2514
|
+
const q = [s, "pkt-textinput", "pkt-textarea"].join(" "), K = r || `${e}-label`, M = Et(null), [g, F] = le(0), J = (ee) => {
|
|
2513
2515
|
var te, oe;
|
|
2514
|
-
if (l &&
|
|
2515
|
-
return
|
|
2516
|
+
if (l && F(((oe = (te = ee.currentTarget) == null ? void 0 : te.value) == null ? void 0 : oe.length) || 0), A)
|
|
2517
|
+
return A(ee);
|
|
2516
2518
|
};
|
|
2517
2519
|
return Je(() => {
|
|
2518
2520
|
var ee, te;
|
|
2519
|
-
typeof
|
|
2520
|
-
}, [
|
|
2521
|
+
typeof V == "function" && V(M.current), l && F(((te = (ee = M == null ? void 0 : M.current) == null ? void 0 : ee.value) == null ? void 0 : te.length) || 0);
|
|
2522
|
+
}, [V]), /* @__PURE__ */ h(
|
|
2521
2523
|
Se,
|
|
2522
2524
|
{
|
|
2523
2525
|
ariaDescribedby: n,
|
|
2524
|
-
className:
|
|
2525
|
-
disabled:
|
|
2526
|
-
errorMessage:
|
|
2526
|
+
className: q,
|
|
2527
|
+
disabled: c,
|
|
2528
|
+
errorMessage: o,
|
|
2527
2529
|
forId: e,
|
|
2528
2530
|
hasError: p,
|
|
2529
2531
|
helptext: u,
|
|
@@ -2533,76 +2535,76 @@ const Tr = B(
|
|
|
2533
2535
|
label: x,
|
|
2534
2536
|
optionalTag: j,
|
|
2535
2537
|
optionalText: y,
|
|
2536
|
-
requiredTag:
|
|
2538
|
+
requiredTag: E,
|
|
2537
2539
|
requiredText: _,
|
|
2538
|
-
useWrapper:
|
|
2540
|
+
useWrapper: B,
|
|
2539
2541
|
children: [
|
|
2540
|
-
/* @__PURE__ */
|
|
2542
|
+
/* @__PURE__ */ a(
|
|
2541
2543
|
"textarea",
|
|
2542
2544
|
{
|
|
2543
|
-
ref:
|
|
2544
|
-
className: `pkt-input ${
|
|
2545
|
+
ref: M,
|
|
2546
|
+
className: `pkt-input ${S ? "pkt-input--fullwidth" : ""} ${i && g > i ? "pkt-input--counter-error" : ""}`,
|
|
2545
2547
|
name: T || e,
|
|
2546
2548
|
id: e,
|
|
2547
|
-
placeholder:
|
|
2548
|
-
disabled:
|
|
2549
|
-
rows:
|
|
2550
|
-
"aria-labelledby":
|
|
2549
|
+
placeholder: $,
|
|
2550
|
+
disabled: c,
|
|
2551
|
+
rows: L,
|
|
2552
|
+
"aria-labelledby": K,
|
|
2551
2553
|
"aria-invalid": p,
|
|
2552
2554
|
"aria-errormessage": `${e}-error`,
|
|
2553
|
-
...
|
|
2554
|
-
onChange:
|
|
2555
|
+
...z,
|
|
2556
|
+
onChange: J
|
|
2555
2557
|
}
|
|
2556
2558
|
),
|
|
2557
2559
|
l && /* @__PURE__ */ h("div", { className: "pkt-input__counter", "aria-live": "polite", "aria-atomic": !0, children: [
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
+
g || 0,
|
|
2561
|
+
i && `/${i}`
|
|
2560
2562
|
] })
|
|
2561
2563
|
]
|
|
2562
2564
|
}
|
|
2563
2565
|
);
|
|
2564
2566
|
}
|
|
2565
|
-
), $r =
|
|
2567
|
+
), $r = W(
|
|
2566
2568
|
({
|
|
2567
2569
|
id: e,
|
|
2568
2570
|
ariaDescribedby: n,
|
|
2569
|
-
ariaLabelledby:
|
|
2571
|
+
ariaLabelledby: r,
|
|
2570
2572
|
autocomplete: l = "off",
|
|
2571
|
-
className:
|
|
2573
|
+
className: i,
|
|
2572
2574
|
disabled: s = !1,
|
|
2573
|
-
errorMessage:
|
|
2574
|
-
hasError:
|
|
2575
|
+
errorMessage: c,
|
|
2576
|
+
hasError: o = !1,
|
|
2575
2577
|
helptext: p,
|
|
2576
2578
|
helptextDropdown: u,
|
|
2577
2579
|
helptextDropdownButton: d,
|
|
2578
2580
|
iconNameRight: k,
|
|
2579
2581
|
inline: v = !1,
|
|
2580
|
-
fullwidth:
|
|
2582
|
+
fullwidth: S = !1,
|
|
2581
2583
|
label: x,
|
|
2582
2584
|
name: T,
|
|
2583
2585
|
optionalTag: j = !1,
|
|
2584
2586
|
optionalText: y,
|
|
2585
|
-
requiredTag:
|
|
2587
|
+
requiredTag: E = !1,
|
|
2586
2588
|
requiredText: _,
|
|
2587
|
-
placeholder:
|
|
2588
|
-
prefix:
|
|
2589
|
-
suffix:
|
|
2590
|
-
type:
|
|
2591
|
-
useWrapper:
|
|
2592
|
-
omitSearchIcon:
|
|
2593
|
-
value:
|
|
2594
|
-
...
|
|
2595
|
-
},
|
|
2596
|
-
const
|
|
2597
|
-
return /* @__PURE__ */
|
|
2589
|
+
placeholder: $,
|
|
2590
|
+
prefix: L,
|
|
2591
|
+
suffix: B,
|
|
2592
|
+
type: A = "text",
|
|
2593
|
+
useWrapper: z = !0,
|
|
2594
|
+
omitSearchIcon: V = !1,
|
|
2595
|
+
value: q,
|
|
2596
|
+
...K
|
|
2597
|
+
}, M) => {
|
|
2598
|
+
const g = [i, "pkt-textinput"].join(" "), F = r || `${e}-label`, J = A === "search" && !k && !V;
|
|
2599
|
+
return /* @__PURE__ */ a(
|
|
2598
2600
|
Se,
|
|
2599
2601
|
{
|
|
2600
2602
|
ariaDescribedby: n,
|
|
2601
|
-
className:
|
|
2603
|
+
className: g,
|
|
2602
2604
|
disabled: s,
|
|
2603
|
-
errorMessage:
|
|
2605
|
+
errorMessage: c,
|
|
2604
2606
|
forId: e,
|
|
2605
|
-
hasError:
|
|
2607
|
+
hasError: o,
|
|
2606
2608
|
helptext: p,
|
|
2607
2609
|
helptextDropdown: u,
|
|
2608
2610
|
helptextDropdownButton: d,
|
|
@@ -2610,36 +2612,36 @@ const Tr = B(
|
|
|
2610
2612
|
label: x,
|
|
2611
2613
|
optionalTag: j,
|
|
2612
2614
|
optionalText: y,
|
|
2613
|
-
requiredTag:
|
|
2615
|
+
requiredTag: E,
|
|
2614
2616
|
requiredText: _,
|
|
2615
|
-
useWrapper:
|
|
2617
|
+
useWrapper: z,
|
|
2616
2618
|
children: /* @__PURE__ */ h("div", { className: "pkt-input__container", children: [
|
|
2617
|
-
|
|
2618
|
-
/* @__PURE__ */
|
|
2619
|
+
L && /* @__PURE__ */ a("div", { className: "pkt-input-prefix", children: L }),
|
|
2620
|
+
/* @__PURE__ */ a(
|
|
2619
2621
|
"input",
|
|
2620
2622
|
{
|
|
2621
|
-
ref:
|
|
2622
|
-
className: `pkt-input ${
|
|
2623
|
-
type:
|
|
2623
|
+
ref: M,
|
|
2624
|
+
className: `pkt-input ${S ? "pkt-input--fullwidth" : ""}`,
|
|
2625
|
+
type: A,
|
|
2624
2626
|
name: T || e,
|
|
2625
2627
|
id: e,
|
|
2626
|
-
placeholder:
|
|
2628
|
+
placeholder: $,
|
|
2627
2629
|
autoComplete: l,
|
|
2628
|
-
value:
|
|
2630
|
+
value: q,
|
|
2629
2631
|
disabled: s,
|
|
2630
|
-
"aria-invalid":
|
|
2632
|
+
"aria-invalid": o,
|
|
2631
2633
|
"aria-errormessage": `${e}-error`,
|
|
2632
|
-
"aria-labelledby":
|
|
2633
|
-
...
|
|
2634
|
+
"aria-labelledby": F,
|
|
2635
|
+
...K
|
|
2634
2636
|
}
|
|
2635
2637
|
),
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
k && /* @__PURE__ */
|
|
2639
|
-
|
|
2638
|
+
B && /* @__PURE__ */ h("p", { className: "pkt-input-suffix", children: [
|
|
2639
|
+
B,
|
|
2640
|
+
k && /* @__PURE__ */ a(w, { className: "pkt-input-suffix-icon", name: k }),
|
|
2641
|
+
J && /* @__PURE__ */ a(w, { className: "pkt-input-suffix-icon", name: "magnifying-glass-big" })
|
|
2640
2642
|
] }),
|
|
2641
|
-
!
|
|
2642
|
-
!
|
|
2643
|
+
!B && k && /* @__PURE__ */ a(w, { className: "pkt-input-icon", name: k }),
|
|
2644
|
+
!B && J && /* @__PURE__ */ a(w, { className: "pkt-input-icon", name: "magnifying-glass-big" })
|
|
2643
2645
|
] })
|
|
2644
2646
|
}
|
|
2645
2647
|
);
|
|
@@ -2648,13 +2650,13 @@ const Tr = B(
|
|
|
2648
2650
|
export {
|
|
2649
2651
|
yn as PktAlert,
|
|
2650
2652
|
_r as PktBackLink,
|
|
2651
|
-
|
|
2653
|
+
gr as PktBreadcrumbs,
|
|
2652
2654
|
de as PktButton,
|
|
2653
2655
|
ur as PktCheckbox,
|
|
2654
|
-
|
|
2656
|
+
br as PktFooter,
|
|
2655
2657
|
Nr as PktFooterSimple,
|
|
2656
2658
|
yr as PktHeader,
|
|
2657
|
-
|
|
2659
|
+
w as PktIcon,
|
|
2658
2660
|
Nn as PktIconContext,
|
|
2659
2661
|
fr as PktInput,
|
|
2660
2662
|
Se as PktInputWrapper,
|