@oslokommune/punkt-react 11.12.4 → 11.13.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 +34 -0
- package/dist/components/icon/DefaultIconFetcher.d.ts +1 -1
- package/dist/components/index.d.ts +4 -1
- package/dist/components/table/Table.d.ts +8 -8
- package/dist/components/table/Table.test.d.ts +1 -1
- package/dist/components/table/TableBody.d.ts +7 -0
- package/dist/components/table/TableDataCell.d.ts +8 -0
- package/dist/components/table/TableHeader.d.ts +4 -3
- package/dist/components/table/TableHeaderCell.d.ts +7 -0
- package/dist/components/table/TableRow.d.ts +7 -0
- package/dist/punkt-react.es.js +621 -605
- package/dist/punkt-react.umd.js +13 -13
- package/package.json +3 -3
- package/src/components/index.ts +4 -1
- package/src/components/table/Table.test.tsx +48 -89
- package/src/components/table/Table.tsx +24 -24
- package/src/components/table/TableBody.tsx +13 -0
- package/src/components/table/TableDataCell.tsx +19 -0
- package/src/components/table/TableHeader.tsx +9 -3
- package/src/components/table/TableHeaderCell.tsx +13 -0
- package/src/components/table/TableRow.tsx +13 -0
- package/src/components/table/__snapshots__/Table.test.tsx.snap +0 -137
package/dist/punkt-react.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import X, { createContext as fn, useState as
|
|
1
|
+
import * as g from "react";
|
|
2
|
+
import X, { createContext as fn, useState as le, useContext as dn, useEffect as ze, forwardRef as V, useRef as yt, Fragment as mn } from "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
function hn(e) {
|
|
5
5
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
6
|
}
|
|
7
|
-
var
|
|
7
|
+
var Be = { exports: {} }, pe = {};
|
|
8
8
|
/**
|
|
9
9
|
* @license React
|
|
10
10
|
* react-jsx-runtime.production.min.js
|
|
@@ -14,25 +14,25 @@ var We = { exports: {} }, ue = {};
|
|
|
14
14
|
* This source code is licensed under the MIT license found in the
|
|
15
15
|
* LICENSE file in the root directory of this source tree.
|
|
16
16
|
*/
|
|
17
|
-
var
|
|
17
|
+
var _t;
|
|
18
18
|
function kn() {
|
|
19
|
-
if (
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
var e = X, r = Symbol.for("react.element"), a = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty,
|
|
19
|
+
if (_t)
|
|
20
|
+
return pe;
|
|
21
|
+
_t = 1;
|
|
22
|
+
var e = X, r = Symbol.for("react.element"), a = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
23
23
|
function c(o, p, u) {
|
|
24
24
|
var d, h = {}, k = null, C = null;
|
|
25
25
|
u !== void 0 && (k = "" + u), p.key !== void 0 && (k = "" + p.key), p.ref !== void 0 && (C = p.ref);
|
|
26
26
|
for (d in p)
|
|
27
|
-
i.call(p, d) && !
|
|
27
|
+
i.call(p, d) && !l.hasOwnProperty(d) && (h[d] = p[d]);
|
|
28
28
|
if (o && o.defaultProps)
|
|
29
29
|
for (d in p = o.defaultProps, p)
|
|
30
30
|
h[d] === void 0 && (h[d] = p[d]);
|
|
31
|
-
return { $$typeof: r, type: o, key: k, ref: C, props: h, _owner:
|
|
31
|
+
return { $$typeof: r, type: o, key: k, ref: C, props: h, _owner: s.current };
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return pe.Fragment = a, pe.jsx = c, pe.jsxs = c, pe;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
35
|
+
var fe = {};
|
|
36
36
|
/**
|
|
37
37
|
* @license React
|
|
38
38
|
* react-jsx-runtime.development.js
|
|
@@ -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 bt;
|
|
46
46
|
function vn() {
|
|
47
|
-
return
|
|
48
|
-
var e = X, r = Symbol.for("react.element"), a = Symbol.for("react.portal"), i = Symbol.for("react.fragment"),
|
|
47
|
+
return bt || (bt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
48
|
+
var e = X, r = Symbol.for("react.element"), a = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), l = 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"), h = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), j = Symbol.iterator, S = "@@iterator";
|
|
49
49
|
function O(n) {
|
|
50
50
|
if (n === null || typeof n != "object")
|
|
51
51
|
return null;
|
|
@@ -55,14 +55,14 @@ function vn() {
|
|
|
55
55
|
var R = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
56
56
|
function _(n) {
|
|
57
57
|
{
|
|
58
|
-
for (var f = arguments.length, m = new Array(f > 1 ? f - 1 : 0),
|
|
59
|
-
m[
|
|
58
|
+
for (var f = arguments.length, m = new Array(f > 1 ? f - 1 : 0), x = 1; x < f; x++)
|
|
59
|
+
m[x - 1] = arguments[x];
|
|
60
60
|
v("error", n, m);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
function v(n, f, m) {
|
|
64
64
|
{
|
|
65
|
-
var
|
|
65
|
+
var x = R.ReactDebugCurrentFrame, P = x.getStackAddendum();
|
|
66
66
|
P !== "" && (f += "%s", m = m.concat([P]));
|
|
67
67
|
var T = m.map(function(E) {
|
|
68
68
|
return String(E);
|
|
@@ -73,23 +73,23 @@ function vn() {
|
|
|
73
73
|
var y = !1, A = !1, U = !1, W = !1, B = !1, M;
|
|
74
74
|
M = Symbol.for("react.module.reference");
|
|
75
75
|
function Y(n) {
|
|
76
|
-
return !!(typeof n == "string" || typeof n == "function" || n === i || n ===
|
|
76
|
+
return !!(typeof n == "string" || typeof n == "function" || n === i || n === l || B || n === s || n === u || n === d || W || n === C || y || A || U || typeof n == "object" && n !== null && (n.$$typeof === k || n.$$typeof === h || n.$$typeof === c || n.$$typeof === o || n.$$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
80
|
n.$$typeof === M || n.getModuleId !== void 0));
|
|
81
81
|
}
|
|
82
82
|
function z(n, f, m) {
|
|
83
|
-
var
|
|
84
|
-
if (
|
|
85
|
-
return
|
|
83
|
+
var x = n.displayName;
|
|
84
|
+
if (x)
|
|
85
|
+
return x;
|
|
86
86
|
var P = f.displayName || f.name || "";
|
|
87
87
|
return P !== "" ? m + "(" + P + ")" : m;
|
|
88
88
|
}
|
|
89
89
|
function K(n) {
|
|
90
90
|
return n.displayName || "Context";
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function I(n) {
|
|
93
93
|
if (n == null)
|
|
94
94
|
return null;
|
|
95
95
|
if (typeof n.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof n == "function")
|
|
@@ -101,9 +101,9 @@ function vn() {
|
|
|
101
101
|
return "Fragment";
|
|
102
102
|
case a:
|
|
103
103
|
return "Portal";
|
|
104
|
-
case s:
|
|
105
|
-
return "Profiler";
|
|
106
104
|
case l:
|
|
105
|
+
return "Profiler";
|
|
106
|
+
case s:
|
|
107
107
|
return "StrictMode";
|
|
108
108
|
case u:
|
|
109
109
|
return "Suspense";
|
|
@@ -121,12 +121,12 @@ function vn() {
|
|
|
121
121
|
case p:
|
|
122
122
|
return z(n, n.render, "ForwardRef");
|
|
123
123
|
case h:
|
|
124
|
-
var
|
|
125
|
-
return
|
|
124
|
+
var x = n.displayName || null;
|
|
125
|
+
return x !== null ? x : I(n.type) || "Memo";
|
|
126
126
|
case k: {
|
|
127
127
|
var P = n, T = P._payload, E = P._init;
|
|
128
128
|
try {
|
|
129
|
-
return
|
|
129
|
+
return I(E(T));
|
|
130
130
|
} catch {
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
@@ -134,18 +134,18 @@ function vn() {
|
|
|
134
134
|
}
|
|
135
135
|
return null;
|
|
136
136
|
}
|
|
137
|
-
var
|
|
138
|
-
function
|
|
137
|
+
var b = Object.assign, L = 0, Z, Q, oe, Qe, et, tt, nt;
|
|
138
|
+
function rt() {
|
|
139
139
|
}
|
|
140
|
-
|
|
140
|
+
rt.__reactDisabledLog = !0;
|
|
141
141
|
function At() {
|
|
142
142
|
{
|
|
143
143
|
if (L === 0) {
|
|
144
|
-
Z = console.log, Q = console.info,
|
|
144
|
+
Z = console.log, Q = console.info, oe = console.warn, Qe = console.error, et = console.group, tt = console.groupCollapsed, nt = console.groupEnd;
|
|
145
145
|
var n = {
|
|
146
146
|
configurable: !0,
|
|
147
147
|
enumerable: !0,
|
|
148
|
-
value:
|
|
148
|
+
value: rt,
|
|
149
149
|
writable: !0
|
|
150
150
|
};
|
|
151
151
|
Object.defineProperties(console, {
|
|
@@ -170,65 +170,65 @@ function vn() {
|
|
|
170
170
|
writable: !0
|
|
171
171
|
};
|
|
172
172
|
Object.defineProperties(console, {
|
|
173
|
-
log:
|
|
173
|
+
log: b({}, n, {
|
|
174
174
|
value: Z
|
|
175
175
|
}),
|
|
176
|
-
info:
|
|
176
|
+
info: b({}, n, {
|
|
177
177
|
value: Q
|
|
178
178
|
}),
|
|
179
|
-
warn:
|
|
180
|
-
value:
|
|
181
|
-
}),
|
|
182
|
-
error: x({}, n, {
|
|
183
|
-
value: Ze
|
|
179
|
+
warn: b({}, n, {
|
|
180
|
+
value: oe
|
|
184
181
|
}),
|
|
185
|
-
|
|
182
|
+
error: b({}, n, {
|
|
186
183
|
value: Qe
|
|
187
184
|
}),
|
|
188
|
-
|
|
185
|
+
group: b({}, n, {
|
|
189
186
|
value: et
|
|
190
187
|
}),
|
|
191
|
-
|
|
188
|
+
groupCollapsed: b({}, n, {
|
|
192
189
|
value: tt
|
|
190
|
+
}),
|
|
191
|
+
groupEnd: b({}, n, {
|
|
192
|
+
value: nt
|
|
193
193
|
})
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
L < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
var
|
|
200
|
-
function
|
|
199
|
+
var Pe = R.ReactCurrentDispatcher, Se;
|
|
200
|
+
function ve(n, f, m) {
|
|
201
201
|
{
|
|
202
|
-
if (
|
|
202
|
+
if (Se === void 0)
|
|
203
203
|
try {
|
|
204
204
|
throw Error();
|
|
205
205
|
} catch (P) {
|
|
206
|
-
var
|
|
207
|
-
|
|
206
|
+
var x = P.stack.trim().match(/\n( *(at )?)/);
|
|
207
|
+
Se = x && x[1] || "";
|
|
208
208
|
}
|
|
209
209
|
return `
|
|
210
|
-
` +
|
|
210
|
+
` + Se + n;
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
var
|
|
213
|
+
var Te = !1, _e;
|
|
214
214
|
{
|
|
215
215
|
var Vt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
216
|
-
|
|
216
|
+
_e = new Vt();
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
if (!n ||
|
|
218
|
+
function at(n, f) {
|
|
219
|
+
if (!n || Te)
|
|
220
220
|
return "";
|
|
221
221
|
{
|
|
222
|
-
var m =
|
|
222
|
+
var m = _e.get(n);
|
|
223
223
|
if (m !== void 0)
|
|
224
224
|
return m;
|
|
225
225
|
}
|
|
226
|
-
var
|
|
227
|
-
|
|
226
|
+
var x;
|
|
227
|
+
Te = !0;
|
|
228
228
|
var P = Error.prepareStackTrace;
|
|
229
229
|
Error.prepareStackTrace = void 0;
|
|
230
230
|
var T;
|
|
231
|
-
T =
|
|
231
|
+
T = Pe.current, Pe.current = null, At();
|
|
232
232
|
try {
|
|
233
233
|
if (f) {
|
|
234
234
|
var E = function() {
|
|
@@ -242,14 +242,14 @@ function vn() {
|
|
|
242
242
|
try {
|
|
243
243
|
Reflect.construct(E, []);
|
|
244
244
|
} catch (G) {
|
|
245
|
-
|
|
245
|
+
x = G;
|
|
246
246
|
}
|
|
247
247
|
Reflect.construct(n, [], E);
|
|
248
248
|
} else {
|
|
249
249
|
try {
|
|
250
250
|
E.call();
|
|
251
251
|
} catch (G) {
|
|
252
|
-
|
|
252
|
+
x = G;
|
|
253
253
|
}
|
|
254
254
|
n.call(E.prototype);
|
|
255
255
|
}
|
|
@@ -257,100 +257,100 @@ function vn() {
|
|
|
257
257
|
try {
|
|
258
258
|
throw Error();
|
|
259
259
|
} catch (G) {
|
|
260
|
-
|
|
260
|
+
x = G;
|
|
261
261
|
}
|
|
262
262
|
n();
|
|
263
263
|
}
|
|
264
264
|
} catch (G) {
|
|
265
|
-
if (G &&
|
|
265
|
+
if (G && x && typeof G.stack == "string") {
|
|
266
266
|
for (var w = G.stack.split(`
|
|
267
|
-
`), J =
|
|
268
|
-
`), $ = w.length - 1,
|
|
269
|
-
|
|
270
|
-
for (; $ >= 1 &&
|
|
271
|
-
if (w[$] !== J[
|
|
272
|
-
if ($ !== 1 ||
|
|
267
|
+
`), J = x.stack.split(`
|
|
268
|
+
`), $ = w.length - 1, F = J.length - 1; $ >= 1 && F >= 0 && w[$] !== J[F]; )
|
|
269
|
+
F--;
|
|
270
|
+
for (; $ >= 1 && F >= 0; $--, F--)
|
|
271
|
+
if (w[$] !== J[F]) {
|
|
272
|
+
if ($ !== 1 || F !== 1)
|
|
273
273
|
do
|
|
274
|
-
if ($--,
|
|
274
|
+
if ($--, F--, F < 0 || w[$] !== J[F]) {
|
|
275
275
|
var q = `
|
|
276
276
|
` + w[$].replace(" at new ", " at ");
|
|
277
|
-
return n.displayName && q.includes("<anonymous>") && (q = q.replace("<anonymous>", n.displayName)), typeof n == "function" &&
|
|
277
|
+
return n.displayName && q.includes("<anonymous>") && (q = q.replace("<anonymous>", n.displayName)), typeof n == "function" && _e.set(n, q), q;
|
|
278
278
|
}
|
|
279
|
-
while ($ >= 1 &&
|
|
279
|
+
while ($ >= 1 && F >= 0);
|
|
280
280
|
break;
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
} finally {
|
|
284
|
-
|
|
284
|
+
Te = !1, Pe.current = T, Ut(), Error.prepareStackTrace = P;
|
|
285
285
|
}
|
|
286
|
-
var
|
|
287
|
-
return typeof n == "function" &&
|
|
286
|
+
var re = n ? n.displayName || n.name : "", ee = re ? ve(re) : "";
|
|
287
|
+
return typeof n == "function" && _e.set(n, ee), ee;
|
|
288
288
|
}
|
|
289
289
|
function Wt(n, f, m) {
|
|
290
|
-
return
|
|
290
|
+
return at(n, !1);
|
|
291
291
|
}
|
|
292
292
|
function Bt(n) {
|
|
293
293
|
var f = n.prototype;
|
|
294
294
|
return !!(f && f.isReactComponent);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function be(n, f, m) {
|
|
297
297
|
if (n == null)
|
|
298
298
|
return "";
|
|
299
299
|
if (typeof n == "function")
|
|
300
|
-
return
|
|
300
|
+
return at(n, Bt(n));
|
|
301
301
|
if (typeof n == "string")
|
|
302
|
-
return
|
|
302
|
+
return ve(n);
|
|
303
303
|
switch (n) {
|
|
304
304
|
case u:
|
|
305
|
-
return
|
|
305
|
+
return ve("Suspense");
|
|
306
306
|
case d:
|
|
307
|
-
return
|
|
307
|
+
return ve("SuspenseList");
|
|
308
308
|
}
|
|
309
309
|
if (typeof n == "object")
|
|
310
310
|
switch (n.$$typeof) {
|
|
311
311
|
case p:
|
|
312
312
|
return Wt(n.render);
|
|
313
313
|
case h:
|
|
314
|
-
return
|
|
314
|
+
return be(n.type, f, m);
|
|
315
315
|
case k: {
|
|
316
|
-
var
|
|
316
|
+
var x = n, P = x._payload, T = x._init;
|
|
317
317
|
try {
|
|
318
|
-
return
|
|
318
|
+
return be(T(P), f, m);
|
|
319
319
|
} catch {
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
return "";
|
|
324
324
|
}
|
|
325
|
-
var
|
|
325
|
+
var ce = Object.prototype.hasOwnProperty, st = {}, lt = R.ReactDebugCurrentFrame;
|
|
326
326
|
function xe(n) {
|
|
327
327
|
if (n) {
|
|
328
|
-
var f = n._owner, m =
|
|
329
|
-
|
|
328
|
+
var f = n._owner, m = be(n.type, n._source, f ? f.type : null);
|
|
329
|
+
lt.setExtraStackFrame(m);
|
|
330
330
|
} else
|
|
331
|
-
|
|
331
|
+
lt.setExtraStackFrame(null);
|
|
332
332
|
}
|
|
333
|
-
function Mt(n, f, m,
|
|
333
|
+
function Mt(n, f, m, x, P) {
|
|
334
334
|
{
|
|
335
|
-
var T = Function.call.bind(
|
|
335
|
+
var T = Function.call.bind(ce);
|
|
336
336
|
for (var E in n)
|
|
337
337
|
if (T(n, E)) {
|
|
338
338
|
var w = void 0;
|
|
339
339
|
try {
|
|
340
340
|
if (typeof n[E] != "function") {
|
|
341
|
-
var J = Error((
|
|
341
|
+
var J = Error((x || "React class") + ": " + m + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
342
342
|
throw J.name = "Invariant Violation", J;
|
|
343
343
|
}
|
|
344
|
-
w = n[E](f, E,
|
|
344
|
+
w = n[E](f, E, x, m, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
345
345
|
} catch ($) {
|
|
346
346
|
w = $;
|
|
347
347
|
}
|
|
348
|
-
w && !(w instanceof Error) && (xe(P), _("%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).",
|
|
348
|
+
w && !(w instanceof Error) && (xe(P), _("%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).", x || "React class", m, E, typeof w), xe(null)), w instanceof Error && !(w.message in st) && (st[w.message] = !0, xe(P), _("Failed %s type: %s", m, w.message), xe(null));
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
var Yt = Array.isArray;
|
|
353
|
-
function
|
|
353
|
+
function Oe(n) {
|
|
354
354
|
return Yt(n);
|
|
355
355
|
}
|
|
356
356
|
function Kt(n) {
|
|
@@ -361,27 +361,27 @@ function vn() {
|
|
|
361
361
|
}
|
|
362
362
|
function Jt(n) {
|
|
363
363
|
try {
|
|
364
|
-
return
|
|
364
|
+
return it(n), !1;
|
|
365
365
|
} catch {
|
|
366
366
|
return !0;
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function it(n) {
|
|
370
370
|
return "" + n;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function ot(n) {
|
|
373
373
|
if (Jt(n))
|
|
374
|
-
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Kt(n)),
|
|
374
|
+
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Kt(n)), it(n);
|
|
375
375
|
}
|
|
376
|
-
var
|
|
376
|
+
var ue = R.ReactCurrentOwner, zt = {
|
|
377
377
|
key: !0,
|
|
378
378
|
ref: !0,
|
|
379
379
|
__self: !0,
|
|
380
380
|
__source: !0
|
|
381
|
-
},
|
|
382
|
-
|
|
381
|
+
}, ct, ut, $e;
|
|
382
|
+
$e = {};
|
|
383
383
|
function Gt(n) {
|
|
384
|
-
if (
|
|
384
|
+
if (ce.call(n, "ref")) {
|
|
385
385
|
var f = Object.getOwnPropertyDescriptor(n, "ref").get;
|
|
386
386
|
if (f && f.isReactWarning)
|
|
387
387
|
return !1;
|
|
@@ -389,7 +389,7 @@ function vn() {
|
|
|
389
389
|
return n.ref !== void 0;
|
|
390
390
|
}
|
|
391
391
|
function qt(n) {
|
|
392
|
-
if (
|
|
392
|
+
if (ce.call(n, "key")) {
|
|
393
393
|
var f = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
394
394
|
if (f && f.isReactWarning)
|
|
395
395
|
return !1;
|
|
@@ -397,15 +397,15 @@ function vn() {
|
|
|
397
397
|
return n.key !== void 0;
|
|
398
398
|
}
|
|
399
399
|
function Xt(n, f) {
|
|
400
|
-
if (typeof n.ref == "string" &&
|
|
401
|
-
var m =
|
|
402
|
-
|
|
400
|
+
if (typeof n.ref == "string" && ue.current && f && ue.current.stateNode !== f) {
|
|
401
|
+
var m = I(ue.current.type);
|
|
402
|
+
$e[m] || (_('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', I(ue.current.type), n.ref), $e[m] = !0);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
function Ht(n, f) {
|
|
406
406
|
{
|
|
407
407
|
var m = function() {
|
|
408
|
-
|
|
408
|
+
ct || (ct = !0, _("%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(n, "key", {
|
|
411
411
|
get: m,
|
|
@@ -416,7 +416,7 @@ function vn() {
|
|
|
416
416
|
function Zt(n, f) {
|
|
417
417
|
{
|
|
418
418
|
var m = function() {
|
|
419
|
-
|
|
419
|
+
ut || (ut = !0, _("%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(n, "ref", {
|
|
422
422
|
get: m,
|
|
@@ -424,7 +424,7 @@ function vn() {
|
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
|
-
var Qt = function(n, f, m,
|
|
427
|
+
var Qt = function(n, f, m, x, P, T, E) {
|
|
428
428
|
var w = {
|
|
429
429
|
// This tag allows us to uniquely identify this as a React Element
|
|
430
430
|
$$typeof: r,
|
|
@@ -445,7 +445,7 @@ function vn() {
|
|
|
445
445
|
configurable: !1,
|
|
446
446
|
enumerable: !1,
|
|
447
447
|
writable: !1,
|
|
448
|
-
value:
|
|
448
|
+
value: x
|
|
449
449
|
}), Object.defineProperty(w, "_source", {
|
|
450
450
|
configurable: !1,
|
|
451
451
|
enumerable: !1,
|
|
@@ -453,41 +453,41 @@ function vn() {
|
|
|
453
453
|
value: P
|
|
454
454
|
}), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
|
|
455
455
|
};
|
|
456
|
-
function en(n, f, m,
|
|
456
|
+
function en(n, f, m, x, P) {
|
|
457
457
|
{
|
|
458
458
|
var T, E = {}, w = null, J = null;
|
|
459
|
-
m !== void 0 && (
|
|
459
|
+
m !== void 0 && (ot(m), w = "" + m), qt(f) && (ot(f.key), w = "" + f.key), Gt(f) && (J = f.ref, Xt(f, P));
|
|
460
460
|
for (T in f)
|
|
461
|
-
|
|
461
|
+
ce.call(f, T) && !zt.hasOwnProperty(T) && (E[T] = f[T]);
|
|
462
462
|
if (n && n.defaultProps) {
|
|
463
463
|
var $ = n.defaultProps;
|
|
464
464
|
for (T in $)
|
|
465
465
|
E[T] === void 0 && (E[T] = $[T]);
|
|
466
466
|
}
|
|
467
467
|
if (w || J) {
|
|
468
|
-
var
|
|
469
|
-
w && Ht(E,
|
|
468
|
+
var F = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
469
|
+
w && Ht(E, F), J && Zt(E, F);
|
|
470
470
|
}
|
|
471
|
-
return Qt(n, w, J, P,
|
|
471
|
+
return Qt(n, w, J, P, x, ue.current, E);
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
var
|
|
475
|
-
function
|
|
474
|
+
var De = R.ReactCurrentOwner, pt = R.ReactDebugCurrentFrame;
|
|
475
|
+
function ne(n) {
|
|
476
476
|
if (n) {
|
|
477
|
-
var f = n._owner, m =
|
|
478
|
-
|
|
477
|
+
var f = n._owner, m = be(n.type, n._source, f ? f.type : null);
|
|
478
|
+
pt.setExtraStackFrame(m);
|
|
479
479
|
} else
|
|
480
|
-
|
|
480
|
+
pt.setExtraStackFrame(null);
|
|
481
481
|
}
|
|
482
|
-
var
|
|
483
|
-
|
|
482
|
+
var Ie;
|
|
483
|
+
Ie = !1;
|
|
484
484
|
function Fe(n) {
|
|
485
485
|
return typeof n == "object" && n !== null && n.$$typeof === r;
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function ft() {
|
|
488
488
|
{
|
|
489
|
-
if (
|
|
490
|
-
var n =
|
|
489
|
+
if (De.current) {
|
|
490
|
+
var n = I(De.current.type);
|
|
491
491
|
if (n)
|
|
492
492
|
return `
|
|
493
493
|
|
|
@@ -507,10 +507,10 @@ Check your code at ` + f + ":" + m + ".";
|
|
|
507
507
|
return "";
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
|
-
var
|
|
510
|
+
var dt = {};
|
|
511
511
|
function nn(n) {
|
|
512
512
|
{
|
|
513
|
-
var f =
|
|
513
|
+
var f = ft();
|
|
514
514
|
if (!f) {
|
|
515
515
|
var m = typeof n == "string" ? n : n.displayName || n.name;
|
|
516
516
|
m && (f = `
|
|
@@ -520,27 +520,27 @@ Check the top-level render call using <` + m + ">.");
|
|
|
520
520
|
return f;
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function mt(n, f) {
|
|
524
524
|
{
|
|
525
525
|
if (!n._store || n._store.validated || n.key != null)
|
|
526
526
|
return;
|
|
527
527
|
n._store.validated = !0;
|
|
528
528
|
var m = nn(f);
|
|
529
|
-
if (
|
|
529
|
+
if (dt[m])
|
|
530
530
|
return;
|
|
531
|
-
|
|
532
|
-
var
|
|
533
|
-
n && n._owner && n._owner !==
|
|
531
|
+
dt[m] = !0;
|
|
532
|
+
var x = "";
|
|
533
|
+
n && n._owner && n._owner !== De.current && (x = " It was passed a child from " + I(n._owner.type) + "."), ne(n), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', m, x), ne(null);
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function ht(n, f) {
|
|
537
537
|
{
|
|
538
538
|
if (typeof n != "object")
|
|
539
539
|
return;
|
|
540
|
-
if (
|
|
540
|
+
if (Oe(n))
|
|
541
541
|
for (var m = 0; m < n.length; m++) {
|
|
542
|
-
var
|
|
543
|
-
Fe(
|
|
542
|
+
var x = n[m];
|
|
543
|
+
Fe(x) && mt(x, f);
|
|
544
544
|
}
|
|
545
545
|
else if (Fe(n))
|
|
546
546
|
n._store && (n._store.validated = !0);
|
|
@@ -548,7 +548,7 @@ Check the top-level render call using <` + m + ">.");
|
|
|
548
548
|
var P = O(n);
|
|
549
549
|
if (typeof P == "function" && P !== n.entries)
|
|
550
550
|
for (var T = P.call(n), E; !(E = T.next()).done; )
|
|
551
|
-
Fe(E.value) &&
|
|
551
|
+
Fe(E.value) && mt(E.value, f);
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
}
|
|
@@ -567,11 +567,11 @@ Check the top-level render call using <` + m + ">.");
|
|
|
567
567
|
else
|
|
568
568
|
return;
|
|
569
569
|
if (m) {
|
|
570
|
-
var
|
|
571
|
-
Mt(m, n.props, "prop",
|
|
572
|
-
} else if (f.PropTypes !== void 0 && !
|
|
573
|
-
|
|
574
|
-
var P =
|
|
570
|
+
var x = I(f);
|
|
571
|
+
Mt(m, n.props, "prop", x, n);
|
|
572
|
+
} else if (f.PropTypes !== void 0 && !Ie) {
|
|
573
|
+
Ie = !0;
|
|
574
|
+
var P = I(f);
|
|
575
575
|
_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", P || "Unknown");
|
|
576
576
|
}
|
|
577
577
|
typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -580,94 +580,94 @@ Check the top-level render call using <` + m + ">.");
|
|
|
580
580
|
function an(n) {
|
|
581
581
|
{
|
|
582
582
|
for (var f = Object.keys(n.props), m = 0; m < f.length; m++) {
|
|
583
|
-
var
|
|
584
|
-
if (
|
|
585
|
-
|
|
583
|
+
var x = f[m];
|
|
584
|
+
if (x !== "children" && x !== "key") {
|
|
585
|
+
ne(n), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", x), ne(null);
|
|
586
586
|
break;
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
n.ref !== null && (
|
|
589
|
+
n.ref !== null && (ne(n), _("Invalid attribute `ref` supplied to `React.Fragment`."), ne(null));
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
var
|
|
593
|
-
function
|
|
592
|
+
var kt = {};
|
|
593
|
+
function vt(n, f, m, x, P, T) {
|
|
594
594
|
{
|
|
595
595
|
var E = Y(n);
|
|
596
596
|
if (!E) {
|
|
597
597
|
var w = "";
|
|
598
598
|
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
599
599
|
var J = tn(P);
|
|
600
|
-
J ? w += J : w +=
|
|
600
|
+
J ? w += J : w += ft();
|
|
601
601
|
var $;
|
|
602
|
-
n === null ? $ = "null" :
|
|
602
|
+
n === null ? $ = "null" : Oe(n) ? $ = "array" : n !== void 0 && n.$$typeof === r ? ($ = "<" + (I(n.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof n, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, w);
|
|
603
603
|
}
|
|
604
|
-
var
|
|
605
|
-
if (
|
|
606
|
-
return
|
|
604
|
+
var F = en(n, f, m, P, T);
|
|
605
|
+
if (F == null)
|
|
606
|
+
return F;
|
|
607
607
|
if (E) {
|
|
608
608
|
var q = f.children;
|
|
609
609
|
if (q !== void 0)
|
|
610
|
-
if (
|
|
611
|
-
if (
|
|
612
|
-
for (var
|
|
613
|
-
|
|
610
|
+
if (x)
|
|
611
|
+
if (Oe(q)) {
|
|
612
|
+
for (var re = 0; re < q.length; re++)
|
|
613
|
+
ht(q[re], n);
|
|
614
614
|
Object.freeze && Object.freeze(q);
|
|
615
615
|
} else
|
|
616
616
|
_("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
617
617
|
else
|
|
618
|
-
|
|
618
|
+
ht(q, n);
|
|
619
619
|
}
|
|
620
|
-
if (
|
|
621
|
-
var ee =
|
|
620
|
+
if (ce.call(f, "key")) {
|
|
621
|
+
var ee = I(n), G = Object.keys(f).filter(function(pn) {
|
|
622
622
|
return pn !== "key";
|
|
623
|
-
}),
|
|
624
|
-
if (!
|
|
623
|
+
}), Le = G.length > 0 ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
624
|
+
if (!kt[ee + Le]) {
|
|
625
625
|
var un = G.length > 0 ? "{" + G.join(": ..., ") + ": ...}" : "{}";
|
|
626
626
|
_(`A props object containing a "key" prop is being spread into JSX:
|
|
627
627
|
let props = %s;
|
|
628
628
|
<%s {...props} />
|
|
629
629
|
React keys must be passed directly to JSX without using spread:
|
|
630
630
|
let props = %s;
|
|
631
|
-
<%s key={someKey} {...props} />`,
|
|
631
|
+
<%s key={someKey} {...props} />`, Le, ee, un, ee), kt[ee + Le] = !0;
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
|
-
return n === i ? an(
|
|
634
|
+
return n === i ? an(F) : rn(F), F;
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
637
|
function sn(n, f, m) {
|
|
638
|
-
return
|
|
638
|
+
return vt(n, f, m, !0);
|
|
639
639
|
}
|
|
640
640
|
function ln(n, f, m) {
|
|
641
|
-
return
|
|
641
|
+
return vt(n, f, m, !1);
|
|
642
642
|
}
|
|
643
643
|
var on = ln, cn = sn;
|
|
644
|
-
|
|
645
|
-
}()),
|
|
644
|
+
fe.Fragment = i, fe.jsx = on, fe.jsxs = cn;
|
|
645
|
+
}()), fe;
|
|
646
646
|
}
|
|
647
|
-
process.env.NODE_ENV === "production" ?
|
|
648
|
-
var t =
|
|
649
|
-
const
|
|
650
|
-
function
|
|
647
|
+
process.env.NODE_ENV === "production" ? Be.exports = kn() : Be.exports = vn();
|
|
648
|
+
var t = Be.exports;
|
|
649
|
+
const Ae = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', _n = "https://punkt-cdn.oslo.kommune.no/11.13/icons/";
|
|
650
|
+
function bn(e) {
|
|
651
651
|
return new Promise((r) => setTimeout(r, e));
|
|
652
652
|
}
|
|
653
|
-
const
|
|
653
|
+
const Ue = {}, xn = async (e, r) => {
|
|
654
654
|
let a = 0;
|
|
655
|
-
for (;
|
|
656
|
-
await
|
|
657
|
-
return localStorage.getItem(r + e + ".svg") ? Promise.resolve(localStorage.getItem(r + e + ".svg")) : typeof window.fetch == "function" ? (
|
|
658
|
-
fetch(r + e + ".svg").then((i) => i.ok ? i.text() : (console.error("Missing icon: " + r + e + ".svg"),
|
|
659
|
-
)) : Promise.resolve(
|
|
660
|
-
},
|
|
661
|
-
fetchIcon: async (e, r) =>
|
|
662
|
-
}, Nn = fn(
|
|
663
|
-
const [
|
|
664
|
-
return
|
|
665
|
-
e ? c.fetchIcon(e, r).then(
|
|
666
|
-
}, [e, r]),
|
|
655
|
+
for (; Ue[r + e + ".svg"] === "fetching" && (a++, !(a > 50)); )
|
|
656
|
+
await bn(50);
|
|
657
|
+
return localStorage.getItem(r + e + ".svg") ? Promise.resolve(localStorage.getItem(r + e + ".svg")) : typeof window.fetch == "function" ? (Ue[r + e + ".svg"] = "fetching", Promise.resolve(
|
|
658
|
+
fetch(r + e + ".svg").then((i) => i.ok ? i.text() : (console.error("Missing icon: " + r + e + ".svg"), Ae)).then((i) => (i !== Ae && localStorage.setItem(r + e + ".svg", i), Ue[r + e + ".svg"] = "fetched", i))
|
|
659
|
+
)) : Promise.resolve(Ae);
|
|
660
|
+
}, gn = {
|
|
661
|
+
fetchIcon: async (e, r) => xn(e, r || _n)
|
|
662
|
+
}, Nn = fn(gn), N = ({ name: e, path: r, className: a = "", ...i }) => {
|
|
663
|
+
const [s, l] = le(null), c = dn(Nn);
|
|
664
|
+
return ze(() => {
|
|
665
|
+
e ? c.fetchIcon(e, r).then(l) : l(null);
|
|
666
|
+
}, [e, r]), s ? /* @__PURE__ */ t.jsx(
|
|
667
667
|
"span",
|
|
668
668
|
{
|
|
669
669
|
className: `pkt-icon ${a}`,
|
|
670
|
-
dangerouslySetInnerHTML: { __html:
|
|
670
|
+
dangerouslySetInnerHTML: { __html: s },
|
|
671
671
|
...i
|
|
672
672
|
}
|
|
673
673
|
) : null;
|
|
@@ -677,15 +677,15 @@ const Ae = {}, gn = async (e, r) => {
|
|
|
677
677
|
className: r,
|
|
678
678
|
skin: a = "info",
|
|
679
679
|
closeAlert: i = !1,
|
|
680
|
-
onClose:
|
|
681
|
-
title:
|
|
680
|
+
onClose: s,
|
|
681
|
+
title: l,
|
|
682
682
|
date: c,
|
|
683
683
|
ariaLive: o = "polite",
|
|
684
684
|
compact: p = !1,
|
|
685
685
|
...u
|
|
686
686
|
}, d) => {
|
|
687
|
-
const h = [r, "pkt-alert", a && `pkt-alert--${a}`, p && "pkt-alert--compact"].filter(Boolean).join(" "), [k, C] =
|
|
688
|
-
C(!1),
|
|
687
|
+
const h = [r, "pkt-alert", a && `pkt-alert--${a}`, p && "pkt-alert--compact"].filter(Boolean).join(" "), [k, C] = le(!0), j = () => {
|
|
688
|
+
C(!1), s && s();
|
|
689
689
|
};
|
|
690
690
|
return k ? /* @__PURE__ */ t.jsxs("div", { ...u, className: h, "aria-live": o, ref: d, children: [
|
|
691
691
|
/* @__PURE__ */ t.jsx(N, { className: "pkt-alert__icon", name: a === "info" ? "alert-information" : `alert-${a}` }),
|
|
@@ -700,7 +700,7 @@ const Ae = {}, gn = async (e, r) => {
|
|
|
700
700
|
children: /* @__PURE__ */ t.jsx(N, { name: "close", className: "pkt-btn__icon", "aria-hidden": "true" })
|
|
701
701
|
}
|
|
702
702
|
) }),
|
|
703
|
-
|
|
703
|
+
l && /* @__PURE__ */ t.jsx("div", { className: "pkt-alert__title", children: l }),
|
|
704
704
|
/* @__PURE__ */ t.jsx("div", { className: "pkt-alert__text", children: e }),
|
|
705
705
|
c && /* @__PURE__ */ t.jsxs("div", { className: "pkt-alert__date", children: [
|
|
706
706
|
"Sist oppdatert: ",
|
|
@@ -708,15 +708,15 @@ const Ae = {}, gn = async (e, r) => {
|
|
|
708
708
|
] })
|
|
709
709
|
] }) : null;
|
|
710
710
|
}
|
|
711
|
-
),
|
|
712
|
-
({ href: e, text: r, onClick: a, className: i, ...
|
|
711
|
+
), _r = V(
|
|
712
|
+
({ href: e, text: r, onClick: a, className: i, ...s }, l) => {
|
|
713
713
|
const c = [
|
|
714
714
|
i,
|
|
715
715
|
"pkt-back-link"
|
|
716
716
|
].filter(Boolean).join(" "), o = (p) => {
|
|
717
717
|
a && a(p);
|
|
718
718
|
};
|
|
719
|
-
return /* @__PURE__ */ t.jsx("nav", { ref:
|
|
719
|
+
return /* @__PURE__ */ t.jsx("nav", { ref: l, className: c, "aria-label": "Gå tilbake et steg", children: /* @__PURE__ */ t.jsxs("a", { href: e || "/", className: "pkt-link pkt-link--icon-left", onClick: o, ...s, children: [
|
|
720
720
|
/* @__PURE__ */ t.jsx(N, { className: "pkt-back-link__icon pkt-icon pkt-link__icon", name: "chevron-thin-left", "aria-hidden": "true" }),
|
|
721
721
|
/* @__PURE__ */ t.jsx("span", { className: "pkt-back-link__text", children: r || "Forsiden" })
|
|
722
722
|
] }) });
|
|
@@ -732,15 +732,15 @@ const Ae = {}, gn = async (e, r) => {
|
|
|
732
732
|
*
|
|
733
733
|
* @license MIT
|
|
734
734
|
*/
|
|
735
|
-
function
|
|
736
|
-
return
|
|
735
|
+
function Me() {
|
|
736
|
+
return Me = Object.assign ? Object.assign.bind() : function(e) {
|
|
737
737
|
for (var r = 1; r < arguments.length; r++) {
|
|
738
738
|
var a = arguments[r];
|
|
739
739
|
for (var i in a)
|
|
740
740
|
Object.prototype.hasOwnProperty.call(a, i) && (e[i] = a[i]);
|
|
741
741
|
}
|
|
742
742
|
return e;
|
|
743
|
-
},
|
|
743
|
+
}, Me.apply(this, arguments);
|
|
744
744
|
}
|
|
745
745
|
var xt;
|
|
746
746
|
(function(e) {
|
|
@@ -750,7 +750,7 @@ function D(e, r) {
|
|
|
750
750
|
if (e === !1 || e === null || typeof e > "u")
|
|
751
751
|
throw new Error(r);
|
|
752
752
|
}
|
|
753
|
-
function
|
|
753
|
+
function me(e, r) {
|
|
754
754
|
if (!e) {
|
|
755
755
|
typeof console < "u" && console.warn(r);
|
|
756
756
|
try {
|
|
@@ -759,7 +759,7 @@ function de(e, r) {
|
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
|
-
function
|
|
762
|
+
function Ye(e) {
|
|
763
763
|
let {
|
|
764
764
|
pathname: r = "/",
|
|
765
765
|
search: a = "",
|
|
@@ -767,7 +767,7 @@ function Me(e) {
|
|
|
767
767
|
} = e;
|
|
768
768
|
return a && a !== "?" && (r += a.charAt(0) === "?" ? a : "?" + a), i && i !== "#" && (r += i.charAt(0) === "#" ? i : "#" + i), r;
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function wt(e) {
|
|
771
771
|
let r = {};
|
|
772
772
|
if (e) {
|
|
773
773
|
let a = e.indexOf("#");
|
|
@@ -781,16 +781,16 @@ var gt;
|
|
|
781
781
|
(function(e) {
|
|
782
782
|
e.data = "data", e.deferred = "deferred", e.redirect = "redirect", e.error = "error";
|
|
783
783
|
})(gt || (gt = {}));
|
|
784
|
-
function
|
|
784
|
+
function Nt(e, r) {
|
|
785
785
|
typeof e == "string" && (e = {
|
|
786
786
|
path: e,
|
|
787
787
|
caseSensitive: !1,
|
|
788
788
|
end: !0
|
|
789
789
|
});
|
|
790
|
-
let [a, i] = yn(e.path, e.caseSensitive, e.end),
|
|
791
|
-
if (!
|
|
790
|
+
let [a, i] = yn(e.path, e.caseSensitive, e.end), s = r.match(a);
|
|
791
|
+
if (!s)
|
|
792
792
|
return null;
|
|
793
|
-
let
|
|
793
|
+
let l = s[0], c = l.replace(/(.)\/+$/, "$1"), o = s.slice(1);
|
|
794
794
|
return {
|
|
795
795
|
params: i.reduce((u, d, h) => {
|
|
796
796
|
let {
|
|
@@ -799,27 +799,27 @@ function bt(e, r) {
|
|
|
799
799
|
} = d;
|
|
800
800
|
if (k === "*") {
|
|
801
801
|
let S = o[h] || "";
|
|
802
|
-
c =
|
|
802
|
+
c = l.slice(0, l.length - S.length).replace(/(.)\/+$/, "$1");
|
|
803
803
|
}
|
|
804
804
|
const j = o[h];
|
|
805
805
|
return C && !j ? u[k] = void 0 : u[k] = (j || "").replace(/%2F/g, "/"), u;
|
|
806
806
|
}, {}),
|
|
807
|
-
pathname:
|
|
807
|
+
pathname: l,
|
|
808
808
|
pathnameBase: c,
|
|
809
809
|
pattern: e
|
|
810
810
|
};
|
|
811
811
|
}
|
|
812
812
|
function yn(e, r, a) {
|
|
813
|
-
r === void 0 && (r = !1), a === void 0 && (a = !0),
|
|
814
|
-
let i = [],
|
|
813
|
+
r === void 0 && (r = !1), a === void 0 && (a = !0), me(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(/\*$/, "/*") + '".'));
|
|
814
|
+
let i = [], s = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (c, o, p) => (i.push({
|
|
815
815
|
paramName: o,
|
|
816
816
|
isOptional: p != null
|
|
817
817
|
}), p ? "/?([^\\/]+)?" : "/([^\\/]+)"));
|
|
818
818
|
return e.endsWith("*") ? (i.push({
|
|
819
819
|
paramName: "*"
|
|
820
|
-
}),
|
|
820
|
+
}), s += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : a ? s += "\\/*$" : e !== "" && e !== "/" && (s += "(?:(?=\\/|$))"), [new RegExp(s, r ? void 0 : "i"), i];
|
|
821
821
|
}
|
|
822
|
-
function
|
|
822
|
+
function ae(e, r) {
|
|
823
823
|
if (r === "/")
|
|
824
824
|
return e;
|
|
825
825
|
if (!e.toLowerCase().startsWith(r.toLowerCase()))
|
|
@@ -832,35 +832,35 @@ function wn(e, r) {
|
|
|
832
832
|
let {
|
|
833
833
|
pathname: a,
|
|
834
834
|
search: i = "",
|
|
835
|
-
hash:
|
|
836
|
-
} = typeof e == "string" ?
|
|
835
|
+
hash: s = ""
|
|
836
|
+
} = typeof e == "string" ? wt(e) : e;
|
|
837
837
|
return {
|
|
838
838
|
pathname: a ? a.startsWith("/") ? a : En(a, r) : r,
|
|
839
839
|
search: Rn(i),
|
|
840
|
-
hash: Pn(
|
|
840
|
+
hash: Pn(s)
|
|
841
841
|
};
|
|
842
842
|
}
|
|
843
843
|
function En(e, r) {
|
|
844
844
|
let a = r.replace(/\/+$/, "").split("/");
|
|
845
|
-
return e.split("/").forEach((
|
|
846
|
-
|
|
845
|
+
return e.split("/").forEach((s) => {
|
|
846
|
+
s === ".." ? a.length > 1 && a.pop() : s !== "." && a.push(s);
|
|
847
847
|
}), a.length > 1 ? a.join("/") : "/";
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function Ve(e, r, a, i) {
|
|
850
850
|
return "Cannot include a '" + e + "' character in a manually specified " + ("`to." + r + "` field [" + JSON.stringify(i) + "]. Please separate it out to the ") + ("`to." + a + "` field. Alternatively you may provide the full path as ") + 'a string in <Link to="..."> and the router will parse it for you.';
|
|
851
851
|
}
|
|
852
852
|
function Cn(e) {
|
|
853
853
|
return e.filter((r, a) => a === 0 || r.route.path && r.route.path.length > 0);
|
|
854
854
|
}
|
|
855
|
-
function
|
|
855
|
+
function Et(e, r) {
|
|
856
856
|
let a = Cn(e);
|
|
857
|
-
return r ? a.map((i,
|
|
857
|
+
return r ? a.map((i, s) => s === e.length - 1 ? i.pathname : i.pathnameBase) : a.map((i) => i.pathnameBase);
|
|
858
858
|
}
|
|
859
|
-
function
|
|
859
|
+
function Ct(e, r, a, i) {
|
|
860
860
|
i === void 0 && (i = !1);
|
|
861
|
-
let
|
|
862
|
-
typeof e == "string" ?
|
|
863
|
-
let
|
|
861
|
+
let s;
|
|
862
|
+
typeof e == "string" ? s = wt(e) : (s = Me({}, e), D(!s.pathname || !s.pathname.includes("?"), Ve("?", "pathname", "search", s)), D(!s.pathname || !s.pathname.includes("#"), Ve("#", "pathname", "hash", s)), D(!s.search || !s.search.includes("#"), Ve("#", "search", "hash", s)));
|
|
863
|
+
let l = e === "" || s.pathname === "", c = l ? "/" : s.pathname, o;
|
|
864
864
|
if (c == null)
|
|
865
865
|
o = a;
|
|
866
866
|
else {
|
|
@@ -869,16 +869,16 @@ function Et(e, r, a, i) {
|
|
|
869
869
|
let k = c.split("/");
|
|
870
870
|
for (; k[0] === ".."; )
|
|
871
871
|
k.shift(), h -= 1;
|
|
872
|
-
|
|
872
|
+
s.pathname = k.join("/");
|
|
873
873
|
}
|
|
874
874
|
o = h >= 0 ? r[h] : "/";
|
|
875
875
|
}
|
|
876
|
-
let p = wn(
|
|
876
|
+
let p = wn(s, o), u = c && c !== "/" && c.endsWith("/"), d = (l || c === ".") && a.endsWith("/");
|
|
877
877
|
return !p.pathname.endsWith("/") && (u || d) && (p.pathname += "/"), p;
|
|
878
878
|
}
|
|
879
|
-
const
|
|
880
|
-
new Set(
|
|
881
|
-
const Sn = ["get", ...
|
|
879
|
+
const Ge = (e) => e.join("/").replace(/\/\/+/g, "/"), Rn = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Pn = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, Rt = ["post", "put", "patch", "delete"];
|
|
880
|
+
new Set(Rt);
|
|
881
|
+
const Sn = ["get", ...Rt];
|
|
882
882
|
new Set(Sn);
|
|
883
883
|
/**
|
|
884
884
|
* React Router v6.23.0
|
|
@@ -890,39 +890,39 @@ new Set(Sn);
|
|
|
890
890
|
*
|
|
891
891
|
* @license MIT
|
|
892
892
|
*/
|
|
893
|
-
function
|
|
894
|
-
return
|
|
893
|
+
function Ke() {
|
|
894
|
+
return Ke = Object.assign ? Object.assign.bind() : function(e) {
|
|
895
895
|
for (var r = 1; r < arguments.length; r++) {
|
|
896
896
|
var a = arguments[r];
|
|
897
897
|
for (var i in a)
|
|
898
898
|
Object.prototype.hasOwnProperty.call(a, i) && (e[i] = a[i]);
|
|
899
899
|
}
|
|
900
900
|
return e;
|
|
901
|
-
},
|
|
901
|
+
}, Ke.apply(this, arguments);
|
|
902
902
|
}
|
|
903
|
-
const
|
|
904
|
-
process.env.NODE_ENV !== "production" && (
|
|
905
|
-
const
|
|
906
|
-
process.env.NODE_ENV !== "production" && (
|
|
907
|
-
const Tn = /* @__PURE__ */
|
|
903
|
+
const Ee = /* @__PURE__ */ g.createContext(null);
|
|
904
|
+
process.env.NODE_ENV !== "production" && (Ee.displayName = "DataRouter");
|
|
905
|
+
const Pt = /* @__PURE__ */ g.createContext(null);
|
|
906
|
+
process.env.NODE_ENV !== "production" && (Pt.displayName = "DataRouterState");
|
|
907
|
+
const Tn = /* @__PURE__ */ g.createContext(null);
|
|
908
908
|
process.env.NODE_ENV !== "production" && (Tn.displayName = "Await");
|
|
909
|
-
const H = /* @__PURE__ */
|
|
909
|
+
const H = /* @__PURE__ */ g.createContext(null);
|
|
910
910
|
process.env.NODE_ENV !== "production" && (H.displayName = "Navigation");
|
|
911
|
-
const
|
|
912
|
-
process.env.NODE_ENV !== "production" && (
|
|
913
|
-
const
|
|
911
|
+
const qe = /* @__PURE__ */ g.createContext(null);
|
|
912
|
+
process.env.NODE_ENV !== "production" && (qe.displayName = "Location");
|
|
913
|
+
const ie = /* @__PURE__ */ g.createContext({
|
|
914
914
|
outlet: null,
|
|
915
915
|
matches: [],
|
|
916
916
|
isDataRoute: !1
|
|
917
917
|
});
|
|
918
|
-
process.env.NODE_ENV !== "production" && (
|
|
919
|
-
const On = /* @__PURE__ */
|
|
918
|
+
process.env.NODE_ENV !== "production" && (ie.displayName = "Route");
|
|
919
|
+
const On = /* @__PURE__ */ g.createContext(null);
|
|
920
920
|
process.env.NODE_ENV !== "production" && (On.displayName = "RouteError");
|
|
921
921
|
function $n(e, r) {
|
|
922
922
|
let {
|
|
923
923
|
relative: a
|
|
924
924
|
} = r === void 0 ? {} : r;
|
|
925
|
-
|
|
925
|
+
Xe() || (process.env.NODE_ENV !== "production" ? D(
|
|
926
926
|
!1,
|
|
927
927
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
928
928
|
// router loaded. We can help them understand how to avoid that.
|
|
@@ -930,115 +930,115 @@ function $n(e, r) {
|
|
|
930
930
|
) : D(!1));
|
|
931
931
|
let {
|
|
932
932
|
basename: i,
|
|
933
|
-
navigator:
|
|
934
|
-
} =
|
|
935
|
-
hash:
|
|
933
|
+
navigator: s
|
|
934
|
+
} = g.useContext(H), {
|
|
935
|
+
hash: l,
|
|
936
936
|
pathname: c,
|
|
937
937
|
search: o
|
|
938
|
-
} =
|
|
938
|
+
} = ke(e, {
|
|
939
939
|
relative: a
|
|
940
940
|
}), p = c;
|
|
941
|
-
return i !== "/" && (p = c === "/" ? i :
|
|
941
|
+
return i !== "/" && (p = c === "/" ? i : Ge([i, c])), s.createHref({
|
|
942
942
|
pathname: p,
|
|
943
943
|
search: o,
|
|
944
|
-
hash:
|
|
944
|
+
hash: l
|
|
945
945
|
});
|
|
946
946
|
}
|
|
947
|
-
function
|
|
948
|
-
return
|
|
947
|
+
function Xe() {
|
|
948
|
+
return g.useContext(qe) != null;
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
return
|
|
950
|
+
function he() {
|
|
951
|
+
return Xe() || (process.env.NODE_ENV !== "production" ? D(
|
|
952
952
|
!1,
|
|
953
953
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
954
954
|
// router loaded. We can help them understand how to avoid that.
|
|
955
955
|
"useLocation() may be used only in the context of a <Router> component."
|
|
956
|
-
) : D(!1)),
|
|
956
|
+
) : D(!1)), g.useContext(qe).location;
|
|
957
957
|
}
|
|
958
|
-
const
|
|
959
|
-
function
|
|
960
|
-
|
|
958
|
+
const St = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
959
|
+
function Tt(e) {
|
|
960
|
+
g.useContext(H).static || g.useLayoutEffect(e);
|
|
961
961
|
}
|
|
962
962
|
function Dn() {
|
|
963
963
|
let {
|
|
964
964
|
isDataRoute: e
|
|
965
|
-
} =
|
|
966
|
-
return e ? Un() :
|
|
965
|
+
} = g.useContext(ie);
|
|
966
|
+
return e ? Un() : In();
|
|
967
967
|
}
|
|
968
|
-
function
|
|
969
|
-
|
|
968
|
+
function In() {
|
|
969
|
+
Xe() || (process.env.NODE_ENV !== "production" ? D(
|
|
970
970
|
!1,
|
|
971
971
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
972
972
|
// router loaded. We can help them understand how to avoid that.
|
|
973
973
|
"useNavigate() may be used only in the context of a <Router> component."
|
|
974
974
|
) : D(!1));
|
|
975
|
-
let e =
|
|
975
|
+
let e = g.useContext(Ee), {
|
|
976
976
|
basename: r,
|
|
977
977
|
future: a,
|
|
978
978
|
navigator: i
|
|
979
|
-
} =
|
|
980
|
-
matches:
|
|
981
|
-
} =
|
|
982
|
-
pathname:
|
|
983
|
-
} =
|
|
984
|
-
return
|
|
979
|
+
} = g.useContext(H), {
|
|
980
|
+
matches: s
|
|
981
|
+
} = g.useContext(ie), {
|
|
982
|
+
pathname: l
|
|
983
|
+
} = he(), c = JSON.stringify(Et(s, a.v7_relativeSplatPath)), o = g.useRef(!1);
|
|
984
|
+
return Tt(() => {
|
|
985
985
|
o.current = !0;
|
|
986
|
-
}),
|
|
987
|
-
if (d === void 0 && (d = {}), process.env.NODE_ENV !== "production" &&
|
|
986
|
+
}), g.useCallback(function(u, d) {
|
|
987
|
+
if (d === void 0 && (d = {}), process.env.NODE_ENV !== "production" && me(o.current, St), !o.current)
|
|
988
988
|
return;
|
|
989
989
|
if (typeof u == "number") {
|
|
990
990
|
i.go(u);
|
|
991
991
|
return;
|
|
992
992
|
}
|
|
993
|
-
let h =
|
|
994
|
-
e == null && r !== "/" && (h.pathname = h.pathname === "/" ? r :
|
|
995
|
-
}, [r, i, c,
|
|
993
|
+
let h = Ct(u, JSON.parse(c), l, d.relative === "path");
|
|
994
|
+
e == null && r !== "/" && (h.pathname = h.pathname === "/" ? r : Ge([r, h.pathname])), (d.replace ? i.replace : i.push)(h, d.state, d);
|
|
995
|
+
}, [r, i, c, l, e]);
|
|
996
996
|
}
|
|
997
|
-
function
|
|
997
|
+
function ke(e, r) {
|
|
998
998
|
let {
|
|
999
999
|
relative: a
|
|
1000
1000
|
} = r === void 0 ? {} : r, {
|
|
1001
1001
|
future: i
|
|
1002
|
-
} =
|
|
1003
|
-
matches:
|
|
1004
|
-
} =
|
|
1005
|
-
pathname:
|
|
1006
|
-
} =
|
|
1007
|
-
return
|
|
1002
|
+
} = g.useContext(H), {
|
|
1003
|
+
matches: s
|
|
1004
|
+
} = g.useContext(ie), {
|
|
1005
|
+
pathname: l
|
|
1006
|
+
} = he(), c = JSON.stringify(Et(s, i.v7_relativeSplatPath));
|
|
1007
|
+
return g.useMemo(() => Ct(e, JSON.parse(c), l, a === "path"), [e, c, l, a]);
|
|
1008
1008
|
}
|
|
1009
|
-
var
|
|
1009
|
+
var Ot = /* @__PURE__ */ function(e) {
|
|
1010
1010
|
return e.UseBlocker = "useBlocker", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e;
|
|
1011
|
-
}(
|
|
1011
|
+
}(Ot || {}), He = /* @__PURE__ */ function(e) {
|
|
1012
1012
|
return e.UseBlocker = "useBlocker", e.UseLoaderData = "useLoaderData", e.UseActionData = "useActionData", e.UseRouteError = "useRouteError", e.UseNavigation = "useNavigation", e.UseRouteLoaderData = "useRouteLoaderData", e.UseMatches = "useMatches", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e.UseRouteId = "useRouteId", e;
|
|
1013
|
-
}(
|
|
1014
|
-
function
|
|
1013
|
+
}(He || {});
|
|
1014
|
+
function $t(e) {
|
|
1015
1015
|
return e + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1018
|
-
let r =
|
|
1019
|
-
return r || (process.env.NODE_ENV !== "production" ? D(!1,
|
|
1017
|
+
function Fn(e) {
|
|
1018
|
+
let r = g.useContext(Ee);
|
|
1019
|
+
return r || (process.env.NODE_ENV !== "production" ? D(!1, $t(e)) : D(!1)), r;
|
|
1020
1020
|
}
|
|
1021
1021
|
function Ln(e) {
|
|
1022
|
-
let r =
|
|
1023
|
-
return r || (process.env.NODE_ENV !== "production" ? D(!1,
|
|
1022
|
+
let r = g.useContext(ie);
|
|
1023
|
+
return r || (process.env.NODE_ENV !== "production" ? D(!1, $t(e)) : D(!1)), r;
|
|
1024
1024
|
}
|
|
1025
|
-
function
|
|
1025
|
+
function Dt(e) {
|
|
1026
1026
|
let r = Ln(e), a = r.matches[r.matches.length - 1];
|
|
1027
1027
|
return a.route.id || (process.env.NODE_ENV !== "production" ? D(!1, e + ' can only be used on routes that contain a unique "id"') : D(!1)), a.route.id;
|
|
1028
1028
|
}
|
|
1029
1029
|
function An() {
|
|
1030
|
-
return
|
|
1030
|
+
return Dt(He.UseRouteId);
|
|
1031
1031
|
}
|
|
1032
1032
|
function Un() {
|
|
1033
1033
|
let {
|
|
1034
1034
|
router: e
|
|
1035
|
-
} =
|
|
1036
|
-
return
|
|
1035
|
+
} = Fn(Ot.UseNavigateStable), r = Dt(He.UseNavigateStable), a = g.useRef(!1);
|
|
1036
|
+
return Tt(() => {
|
|
1037
1037
|
a.current = !0;
|
|
1038
|
-
}),
|
|
1039
|
-
|
|
1038
|
+
}), g.useCallback(function(s, l) {
|
|
1039
|
+
l === void 0 && (l = {}), process.env.NODE_ENV !== "production" && me(a.current, St), a.current && (typeof s == "number" ? e.navigate(s) : e.navigate(s, Ke({
|
|
1040
1040
|
fromRouteId: r
|
|
1041
|
-
},
|
|
1041
|
+
}, l)));
|
|
1042
1042
|
}, [e, r]);
|
|
1043
1043
|
}
|
|
1044
1044
|
new Promise(() => {
|
|
@@ -1053,36 +1053,36 @@ new Promise(() => {
|
|
|
1053
1053
|
*
|
|
1054
1054
|
* @license MIT
|
|
1055
1055
|
*/
|
|
1056
|
-
function
|
|
1057
|
-
return
|
|
1056
|
+
function se() {
|
|
1057
|
+
return se = Object.assign ? Object.assign.bind() : function(e) {
|
|
1058
1058
|
for (var r = 1; r < arguments.length; r++) {
|
|
1059
1059
|
var a = arguments[r];
|
|
1060
1060
|
for (var i in a)
|
|
1061
1061
|
Object.prototype.hasOwnProperty.call(a, i) && (e[i] = a[i]);
|
|
1062
1062
|
}
|
|
1063
1063
|
return e;
|
|
1064
|
-
},
|
|
1064
|
+
}, se.apply(this, arguments);
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1066
|
+
function Ze(e, r) {
|
|
1067
1067
|
if (e == null)
|
|
1068
1068
|
return {};
|
|
1069
|
-
var a = {}, i = Object.keys(e),
|
|
1070
|
-
for (
|
|
1071
|
-
|
|
1069
|
+
var a = {}, i = Object.keys(e), s, l;
|
|
1070
|
+
for (l = 0; l < i.length; l++)
|
|
1071
|
+
s = i[l], !(r.indexOf(s) >= 0) && (a[s] = e[s]);
|
|
1072
1072
|
return a;
|
|
1073
1073
|
}
|
|
1074
|
-
const
|
|
1075
|
-
function
|
|
1074
|
+
const Ne = "get", je = "application/x-www-form-urlencoded";
|
|
1075
|
+
function Ce(e) {
|
|
1076
1076
|
return e != null && typeof e.tagName == "string";
|
|
1077
1077
|
}
|
|
1078
1078
|
function Vn(e) {
|
|
1079
|
-
return
|
|
1079
|
+
return Ce(e) && e.tagName.toLowerCase() === "button";
|
|
1080
1080
|
}
|
|
1081
1081
|
function Wn(e) {
|
|
1082
|
-
return
|
|
1082
|
+
return Ce(e) && e.tagName.toLowerCase() === "form";
|
|
1083
1083
|
}
|
|
1084
1084
|
function Bn(e) {
|
|
1085
|
-
return
|
|
1085
|
+
return Ce(e) && e.tagName.toLowerCase() === "input";
|
|
1086
1086
|
}
|
|
1087
1087
|
function Mn(e) {
|
|
1088
1088
|
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
@@ -1107,20 +1107,20 @@ function Kn() {
|
|
|
1107
1107
|
return ge;
|
|
1108
1108
|
}
|
|
1109
1109
|
const Jn = /* @__PURE__ */ new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
|
|
1110
|
-
function
|
|
1111
|
-
return e != null && !Jn.has(e) ? (process.env.NODE_ENV !== "production" &&
|
|
1110
|
+
function We(e) {
|
|
1111
|
+
return e != null && !Jn.has(e) ? (process.env.NODE_ENV !== "production" && me(!1, '"' + e + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + je + '"')), null) : e;
|
|
1112
1112
|
}
|
|
1113
1113
|
function zn(e, r) {
|
|
1114
|
-
let a, i,
|
|
1114
|
+
let a, i, s, l, c;
|
|
1115
1115
|
if (Wn(e)) {
|
|
1116
1116
|
let o = e.getAttribute("action");
|
|
1117
|
-
i = o ?
|
|
1117
|
+
i = o ? ae(o, r) : null, a = e.getAttribute("method") || Ne, s = We(e.getAttribute("enctype")) || je, l = new FormData(e);
|
|
1118
1118
|
} else if (Vn(e) || Bn(e) && (e.type === "submit" || e.type === "image")) {
|
|
1119
1119
|
let o = e.form;
|
|
1120
1120
|
if (o == null)
|
|
1121
1121
|
throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
|
|
1122
1122
|
let p = e.getAttribute("formaction") || o.getAttribute("action");
|
|
1123
|
-
if (i = p ?
|
|
1123
|
+
if (i = p ? ae(p, r) : null, a = e.getAttribute("formmethod") || o.getAttribute("method") || Ne, s = We(e.getAttribute("formenctype")) || We(o.getAttribute("enctype")) || je, l = new FormData(o, e), !Kn()) {
|
|
1124
1124
|
let {
|
|
1125
1125
|
name: u,
|
|
1126
1126
|
type: d,
|
|
@@ -1128,20 +1128,20 @@ function zn(e, r) {
|
|
|
1128
1128
|
} = e;
|
|
1129
1129
|
if (d === "image") {
|
|
1130
1130
|
let k = u ? u + "." : "";
|
|
1131
|
-
|
|
1131
|
+
l.append(k + "x", "0"), l.append(k + "y", "0");
|
|
1132
1132
|
} else
|
|
1133
|
-
u &&
|
|
1133
|
+
u && l.append(u, h);
|
|
1134
1134
|
}
|
|
1135
1135
|
} else {
|
|
1136
|
-
if (
|
|
1136
|
+
if (Ce(e))
|
|
1137
1137
|
throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
|
|
1138
|
-
a =
|
|
1138
|
+
a = Ne, i = null, s = je, c = e;
|
|
1139
1139
|
}
|
|
1140
|
-
return
|
|
1140
|
+
return l && s === "text/plain" && (c = l, l = void 0), {
|
|
1141
1141
|
action: i,
|
|
1142
1142
|
method: a.toLowerCase(),
|
|
1143
|
-
encType:
|
|
1144
|
-
formData:
|
|
1143
|
+
encType: s,
|
|
1144
|
+
formData: l,
|
|
1145
1145
|
body: c
|
|
1146
1146
|
};
|
|
1147
1147
|
}
|
|
@@ -1150,42 +1150,42 @@ try {
|
|
|
1150
1150
|
window.__reactRouterVersion = Hn;
|
|
1151
1151
|
} catch {
|
|
1152
1152
|
}
|
|
1153
|
-
const
|
|
1153
|
+
const It = /* @__PURE__ */ g.createContext({
|
|
1154
1154
|
isTransitioning: !1
|
|
1155
1155
|
});
|
|
1156
|
-
process.env.NODE_ENV !== "production" && (
|
|
1157
|
-
const Zn = /* @__PURE__ */
|
|
1156
|
+
process.env.NODE_ENV !== "production" && (It.displayName = "ViewTransition");
|
|
1157
|
+
const Zn = /* @__PURE__ */ g.createContext(/* @__PURE__ */ new Map());
|
|
1158
1158
|
process.env.NODE_ENV !== "production" && (Zn.displayName = "Fetchers");
|
|
1159
1159
|
process.env.NODE_ENV;
|
|
1160
|
-
const Qn = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", er = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,
|
|
1160
|
+
const Qn = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", er = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, ye = /* @__PURE__ */ g.forwardRef(function(r, a) {
|
|
1161
1161
|
let {
|
|
1162
1162
|
onClick: i,
|
|
1163
|
-
relative:
|
|
1164
|
-
reloadDocument:
|
|
1163
|
+
relative: s,
|
|
1164
|
+
reloadDocument: l,
|
|
1165
1165
|
replace: c,
|
|
1166
1166
|
state: o,
|
|
1167
1167
|
target: p,
|
|
1168
1168
|
to: u,
|
|
1169
1169
|
preventScrollReset: d,
|
|
1170
1170
|
unstable_viewTransition: h
|
|
1171
|
-
} = r, k =
|
|
1171
|
+
} = r, k = Ze(r, Gn), {
|
|
1172
1172
|
basename: C
|
|
1173
|
-
} =
|
|
1173
|
+
} = g.useContext(H), j, S = !1;
|
|
1174
1174
|
if (typeof u == "string" && er.test(u) && (j = u, Qn))
|
|
1175
1175
|
try {
|
|
1176
|
-
let v = new URL(window.location.href), y = u.startsWith("//") ? new URL(v.protocol + u) : new URL(u), A =
|
|
1176
|
+
let v = new URL(window.location.href), y = u.startsWith("//") ? new URL(v.protocol + u) : new URL(u), A = ae(y.pathname, C);
|
|
1177
1177
|
y.origin === v.origin && A != null ? u = A + y.search + y.hash : S = !0;
|
|
1178
1178
|
} catch {
|
|
1179
|
-
process.env.NODE_ENV !== "production" &&
|
|
1179
|
+
process.env.NODE_ENV !== "production" && me(!1, '<Link to="' + u + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.');
|
|
1180
1180
|
}
|
|
1181
1181
|
let O = $n(u, {
|
|
1182
|
-
relative:
|
|
1182
|
+
relative: s
|
|
1183
1183
|
}), R = ar(u, {
|
|
1184
1184
|
replace: c,
|
|
1185
1185
|
state: o,
|
|
1186
1186
|
target: p,
|
|
1187
1187
|
preventScrollReset: d,
|
|
1188
|
-
relative:
|
|
1188
|
+
relative: s,
|
|
1189
1189
|
unstable_viewTransition: h
|
|
1190
1190
|
});
|
|
1191
1191
|
function _(v) {
|
|
@@ -1193,43 +1193,43 @@ const Qn = typeof window < "u" && typeof window.document < "u" && typeof window.
|
|
|
1193
1193
|
}
|
|
1194
1194
|
return (
|
|
1195
1195
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1196
|
-
/* @__PURE__ */
|
|
1196
|
+
/* @__PURE__ */ g.createElement("a", se({}, k, {
|
|
1197
1197
|
href: j || O,
|
|
1198
|
-
onClick: S ||
|
|
1198
|
+
onClick: S || l ? i : _,
|
|
1199
1199
|
ref: a,
|
|
1200
1200
|
target: p
|
|
1201
1201
|
}))
|
|
1202
1202
|
);
|
|
1203
1203
|
});
|
|
1204
|
-
process.env.NODE_ENV !== "production" && (
|
|
1205
|
-
const tr = /* @__PURE__ */
|
|
1204
|
+
process.env.NODE_ENV !== "production" && (ye.displayName = "Link");
|
|
1205
|
+
const tr = /* @__PURE__ */ g.forwardRef(function(r, a) {
|
|
1206
1206
|
let {
|
|
1207
1207
|
"aria-current": i = "page",
|
|
1208
|
-
caseSensitive:
|
|
1209
|
-
className:
|
|
1208
|
+
caseSensitive: s = !1,
|
|
1209
|
+
className: l = "",
|
|
1210
1210
|
end: c = !1,
|
|
1211
1211
|
style: o,
|
|
1212
1212
|
to: p,
|
|
1213
1213
|
unstable_viewTransition: u,
|
|
1214
1214
|
children: d
|
|
1215
|
-
} = r, h =
|
|
1215
|
+
} = r, h = Ze(r, qn), k = ke(p, {
|
|
1216
1216
|
relative: h.relative
|
|
1217
|
-
}), C =
|
|
1217
|
+
}), C = he(), j = g.useContext(Pt), {
|
|
1218
1218
|
navigator: S,
|
|
1219
1219
|
basename: O
|
|
1220
|
-
} =
|
|
1220
|
+
} = g.useContext(H), R = j != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1221
1221
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1222
1222
|
ur(k) && u === !0, _ = S.encodeLocation ? S.encodeLocation(k).pathname : k.pathname, v = C.pathname, y = j && j.navigation && j.navigation.location ? j.navigation.location.pathname : null;
|
|
1223
|
-
|
|
1223
|
+
s || (v = v.toLowerCase(), y = y ? y.toLowerCase() : null, _ = _.toLowerCase()), y && O && (y = ae(y, O) || y);
|
|
1224
1224
|
const A = _ !== "/" && _.endsWith("/") ? _.length - 1 : _.length;
|
|
1225
1225
|
let U = v === _ || !c && v.startsWith(_) && v.charAt(A) === "/", W = y != null && (y === _ || !c && y.startsWith(_) && y.charAt(_.length) === "/"), B = {
|
|
1226
1226
|
isActive: U,
|
|
1227
1227
|
isPending: W,
|
|
1228
1228
|
isTransitioning: R
|
|
1229
1229
|
}, M = U ? i : void 0, Y;
|
|
1230
|
-
typeof
|
|
1230
|
+
typeof l == "function" ? Y = l(B) : Y = [l, U ? "active" : null, W ? "pending" : null, R ? "transitioning" : null].filter(Boolean).join(" ");
|
|
1231
1231
|
let z = typeof o == "function" ? o(B) : o;
|
|
1232
|
-
return /* @__PURE__ */
|
|
1232
|
+
return /* @__PURE__ */ g.createElement(ye, se({}, h, {
|
|
1233
1233
|
"aria-current": M,
|
|
1234
1234
|
className: Y,
|
|
1235
1235
|
ref: a,
|
|
@@ -1239,20 +1239,20 @@ const tr = /* @__PURE__ */ b.forwardRef(function(r, a) {
|
|
|
1239
1239
|
}), typeof d == "function" ? d(B) : d);
|
|
1240
1240
|
});
|
|
1241
1241
|
process.env.NODE_ENV !== "production" && (tr.displayName = "NavLink");
|
|
1242
|
-
const nr = /* @__PURE__ */
|
|
1242
|
+
const nr = /* @__PURE__ */ g.forwardRef((e, r) => {
|
|
1243
1243
|
let {
|
|
1244
1244
|
fetcherKey: a,
|
|
1245
1245
|
navigate: i,
|
|
1246
|
-
reloadDocument:
|
|
1247
|
-
replace:
|
|
1246
|
+
reloadDocument: s,
|
|
1247
|
+
replace: l,
|
|
1248
1248
|
state: c,
|
|
1249
|
-
method: o =
|
|
1249
|
+
method: o = Ne,
|
|
1250
1250
|
action: p,
|
|
1251
1251
|
onSubmit: u,
|
|
1252
1252
|
relative: d,
|
|
1253
1253
|
preventScrollReset: h,
|
|
1254
1254
|
unstable_viewTransition: k
|
|
1255
|
-
} = e, C =
|
|
1255
|
+
} = e, C = Ze(e, Xn), j = or(), S = cr(p, {
|
|
1256
1256
|
relative: d
|
|
1257
1257
|
}), O = o.toLowerCase() === "get" ? "get" : "post", R = (_) => {
|
|
1258
1258
|
if (u && u(_), _.defaultPrevented)
|
|
@@ -1263,61 +1263,61 @@ const nr = /* @__PURE__ */ b.forwardRef((e, r) => {
|
|
|
1263
1263
|
fetcherKey: a,
|
|
1264
1264
|
method: y,
|
|
1265
1265
|
navigate: i,
|
|
1266
|
-
replace:
|
|
1266
|
+
replace: l,
|
|
1267
1267
|
state: c,
|
|
1268
1268
|
relative: d,
|
|
1269
1269
|
preventScrollReset: h,
|
|
1270
1270
|
unstable_viewTransition: k
|
|
1271
1271
|
});
|
|
1272
1272
|
};
|
|
1273
|
-
return /* @__PURE__ */
|
|
1273
|
+
return /* @__PURE__ */ g.createElement("form", se({
|
|
1274
1274
|
ref: r,
|
|
1275
1275
|
method: O,
|
|
1276
1276
|
action: S,
|
|
1277
|
-
onSubmit:
|
|
1277
|
+
onSubmit: s ? u : R
|
|
1278
1278
|
}, C));
|
|
1279
1279
|
});
|
|
1280
1280
|
process.env.NODE_ENV !== "production" && (nr.displayName = "Form");
|
|
1281
1281
|
process.env.NODE_ENV;
|
|
1282
|
-
var
|
|
1282
|
+
var we;
|
|
1283
1283
|
(function(e) {
|
|
1284
1284
|
e.UseScrollRestoration = "useScrollRestoration", e.UseSubmit = "useSubmit", e.UseSubmitFetcher = "useSubmitFetcher", e.UseFetcher = "useFetcher", e.useViewTransitionState = "useViewTransitionState";
|
|
1285
|
-
})(
|
|
1286
|
-
var
|
|
1285
|
+
})(we || (we = {}));
|
|
1286
|
+
var jt;
|
|
1287
1287
|
(function(e) {
|
|
1288
1288
|
e.UseFetcher = "useFetcher", e.UseFetchers = "useFetchers", e.UseScrollRestoration = "useScrollRestoration";
|
|
1289
|
-
})(
|
|
1289
|
+
})(jt || (jt = {}));
|
|
1290
1290
|
function rr(e) {
|
|
1291
1291
|
return e + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
|
|
1292
1292
|
}
|
|
1293
1293
|
function Ft(e) {
|
|
1294
|
-
let r =
|
|
1294
|
+
let r = g.useContext(Ee);
|
|
1295
1295
|
return r || (process.env.NODE_ENV !== "production" ? D(!1, rr(e)) : D(!1)), r;
|
|
1296
1296
|
}
|
|
1297
1297
|
function ar(e, r) {
|
|
1298
1298
|
let {
|
|
1299
1299
|
target: a,
|
|
1300
1300
|
replace: i,
|
|
1301
|
-
state:
|
|
1302
|
-
preventScrollReset:
|
|
1301
|
+
state: s,
|
|
1302
|
+
preventScrollReset: l,
|
|
1303
1303
|
relative: c,
|
|
1304
1304
|
unstable_viewTransition: o
|
|
1305
|
-
} = r === void 0 ? {} : r, p = Dn(), u =
|
|
1305
|
+
} = r === void 0 ? {} : r, p = Dn(), u = he(), d = ke(e, {
|
|
1306
1306
|
relative: c
|
|
1307
1307
|
});
|
|
1308
|
-
return
|
|
1308
|
+
return g.useCallback((h) => {
|
|
1309
1309
|
if (Yn(h, a)) {
|
|
1310
1310
|
h.preventDefault();
|
|
1311
|
-
let k = i !== void 0 ? i :
|
|
1311
|
+
let k = i !== void 0 ? i : Ye(u) === Ye(d);
|
|
1312
1312
|
p(e, {
|
|
1313
1313
|
replace: k,
|
|
1314
|
-
state:
|
|
1315
|
-
preventScrollReset:
|
|
1314
|
+
state: s,
|
|
1315
|
+
preventScrollReset: l,
|
|
1316
1316
|
relative: c,
|
|
1317
1317
|
unstable_viewTransition: o
|
|
1318
1318
|
});
|
|
1319
1319
|
}
|
|
1320
|
-
}, [u, p, d, i,
|
|
1320
|
+
}, [u, p, d, i, s, a, e, l, c, o]);
|
|
1321
1321
|
}
|
|
1322
1322
|
function sr() {
|
|
1323
1323
|
if (typeof document > "u")
|
|
@@ -1327,40 +1327,40 @@ let lr = 0, ir = () => "__" + String(++lr) + "__";
|
|
|
1327
1327
|
function or() {
|
|
1328
1328
|
let {
|
|
1329
1329
|
router: e
|
|
1330
|
-
} = Ft(
|
|
1330
|
+
} = Ft(we.UseSubmit), {
|
|
1331
1331
|
basename: r
|
|
1332
|
-
} =
|
|
1333
|
-
return
|
|
1334
|
-
|
|
1332
|
+
} = g.useContext(H), a = An();
|
|
1333
|
+
return g.useCallback(function(i, s) {
|
|
1334
|
+
s === void 0 && (s = {}), sr();
|
|
1335
1335
|
let {
|
|
1336
|
-
action:
|
|
1336
|
+
action: l,
|
|
1337
1337
|
method: c,
|
|
1338
1338
|
encType: o,
|
|
1339
1339
|
formData: p,
|
|
1340
1340
|
body: u
|
|
1341
1341
|
} = zn(i, r);
|
|
1342
|
-
if (
|
|
1343
|
-
let d =
|
|
1344
|
-
e.fetch(d, a,
|
|
1345
|
-
preventScrollReset:
|
|
1342
|
+
if (s.navigate === !1) {
|
|
1343
|
+
let d = s.fetcherKey || ir();
|
|
1344
|
+
e.fetch(d, a, s.action || l, {
|
|
1345
|
+
preventScrollReset: s.preventScrollReset,
|
|
1346
1346
|
formData: p,
|
|
1347
1347
|
body: u,
|
|
1348
|
-
formMethod:
|
|
1349
|
-
formEncType:
|
|
1350
|
-
unstable_flushSync:
|
|
1348
|
+
formMethod: s.method || c,
|
|
1349
|
+
formEncType: s.encType || o,
|
|
1350
|
+
unstable_flushSync: s.unstable_flushSync
|
|
1351
1351
|
});
|
|
1352
1352
|
} else
|
|
1353
|
-
e.navigate(
|
|
1354
|
-
preventScrollReset:
|
|
1353
|
+
e.navigate(s.action || l, {
|
|
1354
|
+
preventScrollReset: s.preventScrollReset,
|
|
1355
1355
|
formData: p,
|
|
1356
1356
|
body: u,
|
|
1357
|
-
formMethod:
|
|
1358
|
-
formEncType:
|
|
1359
|
-
replace:
|
|
1360
|
-
state:
|
|
1357
|
+
formMethod: s.method || c,
|
|
1358
|
+
formEncType: s.encType || o,
|
|
1359
|
+
replace: s.replace,
|
|
1360
|
+
state: s.state,
|
|
1361
1361
|
fromRouteId: a,
|
|
1362
|
-
unstable_flushSync:
|
|
1363
|
-
unstable_viewTransition:
|
|
1362
|
+
unstable_flushSync: s.unstable_flushSync,
|
|
1363
|
+
unstable_viewTransition: s.unstable_viewTransition
|
|
1364
1364
|
});
|
|
1365
1365
|
}, [e, r, a]);
|
|
1366
1366
|
}
|
|
@@ -1369,45 +1369,45 @@ function cr(e, r) {
|
|
|
1369
1369
|
relative: a
|
|
1370
1370
|
} = r === void 0 ? {} : r, {
|
|
1371
1371
|
basename: i
|
|
1372
|
-
} =
|
|
1373
|
-
|
|
1374
|
-
let [
|
|
1372
|
+
} = g.useContext(H), s = g.useContext(ie);
|
|
1373
|
+
s || (process.env.NODE_ENV !== "production" ? D(!1, "useFormAction must be used inside a RouteContext") : D(!1));
|
|
1374
|
+
let [l] = s.matches.slice(-1), c = se({}, ke(e || ".", {
|
|
1375
1375
|
relative: a
|
|
1376
|
-
})), o =
|
|
1376
|
+
})), o = he();
|
|
1377
1377
|
if (e == null) {
|
|
1378
1378
|
c.search = o.search;
|
|
1379
1379
|
let p = new URLSearchParams(c.search);
|
|
1380
1380
|
p.has("index") && p.get("index") === "" && (p.delete("index"), c.search = p.toString() ? "?" + p.toString() : "");
|
|
1381
1381
|
}
|
|
1382
|
-
return (!e || e === ".") &&
|
|
1382
|
+
return (!e || e === ".") && l.route.index && (c.search = c.search ? c.search.replace(/^\?/, "?index&") : "?index"), i !== "/" && (c.pathname = c.pathname === "/" ? i : Ge([i, c.pathname])), Ye(c);
|
|
1383
1383
|
}
|
|
1384
1384
|
function ur(e, r) {
|
|
1385
1385
|
r === void 0 && (r = {});
|
|
1386
|
-
let a =
|
|
1386
|
+
let a = g.useContext(It);
|
|
1387
1387
|
a == null && (process.env.NODE_ENV !== "production" ? D(!1, "`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?") : D(!1));
|
|
1388
1388
|
let {
|
|
1389
1389
|
basename: i
|
|
1390
|
-
} = Ft(
|
|
1390
|
+
} = Ft(we.useViewTransitionState), s = ke(e, {
|
|
1391
1391
|
relative: r.relative
|
|
1392
1392
|
});
|
|
1393
1393
|
if (!a.isTransitioning)
|
|
1394
1394
|
return !1;
|
|
1395
|
-
let
|
|
1396
|
-
return
|
|
1395
|
+
let l = ae(a.currentLocation.pathname, i) || a.currentLocation.pathname, c = ae(a.nextLocation.pathname, i) || a.nextLocation.pathname;
|
|
1396
|
+
return Nt(s.pathname, c) != null || Nt(s.pathname, l) != null;
|
|
1397
1397
|
}
|
|
1398
|
-
const
|
|
1399
|
-
({ breadcrumbs: e, navigationType: r, className: a, ...i },
|
|
1400
|
-
const
|
|
1398
|
+
const br = V(
|
|
1399
|
+
({ breadcrumbs: e, navigationType: r, className: a, ...i }, s) => {
|
|
1400
|
+
const l = e.slice(0, 4), c = l[l.length - 2], o = [
|
|
1401
1401
|
a,
|
|
1402
1402
|
"pkt-breadcrumbs"
|
|
1403
1403
|
].filter(Boolean).join(" ");
|
|
1404
|
-
return /* @__PURE__ */ t.jsxs("nav", { ref:
|
|
1405
|
-
/* @__PURE__ */ t.jsx("ol", { className: "pkt-breadcrumbs__list pkt-breadcrumbs--desktop", children:
|
|
1404
|
+
return /* @__PURE__ */ t.jsxs("nav", { ref: s, "aria-label": "brødsmulemeny", className: o, children: [
|
|
1405
|
+
/* @__PURE__ */ t.jsx("ol", { className: "pkt-breadcrumbs__list pkt-breadcrumbs--desktop", children: l.map((p, u) => /* @__PURE__ */ t.jsx(
|
|
1406
1406
|
"li",
|
|
1407
1407
|
{
|
|
1408
1408
|
className: "pkt-breadcrumbs__item",
|
|
1409
|
-
children: u ===
|
|
1410
|
-
|
|
1409
|
+
children: u === l.length - 1 ? /* @__PURE__ */ t.jsx("span", { className: "pkt-breadcrumbs__label", "aria-current": "true", children: /* @__PURE__ */ t.jsx("span", { className: "pkt-breadcrumbs__text", children: p.text }) }) : r === "router" ? /* @__PURE__ */ t.jsxs(
|
|
1410
|
+
ye,
|
|
1411
1411
|
{
|
|
1412
1412
|
to: p.href,
|
|
1413
1413
|
className: "pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",
|
|
@@ -1445,7 +1445,7 @@ const gr = V(
|
|
|
1445
1445
|
`breadcrumb-${u}`
|
|
1446
1446
|
)) }),
|
|
1447
1447
|
r === "router" ? /* @__PURE__ */ t.jsxs(
|
|
1448
|
-
|
|
1448
|
+
ye,
|
|
1449
1449
|
{
|
|
1450
1450
|
to: c.href,
|
|
1451
1451
|
className: "pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",
|
|
@@ -1481,14 +1481,14 @@ const gr = V(
|
|
|
1481
1481
|
)
|
|
1482
1482
|
] });
|
|
1483
1483
|
}
|
|
1484
|
-
),
|
|
1484
|
+
), de = V(
|
|
1485
1485
|
({
|
|
1486
1486
|
children: e,
|
|
1487
1487
|
className: r,
|
|
1488
1488
|
iconName: a = "user",
|
|
1489
1489
|
secondIconName: i = "user",
|
|
1490
|
-
size:
|
|
1491
|
-
skin:
|
|
1490
|
+
size: s = "medium",
|
|
1491
|
+
skin: l = "primary",
|
|
1492
1492
|
type: c = "button",
|
|
1493
1493
|
variant: o = "label-only",
|
|
1494
1494
|
color: p,
|
|
@@ -1498,8 +1498,8 @@ const gr = V(
|
|
|
1498
1498
|
const k = [
|
|
1499
1499
|
r,
|
|
1500
1500
|
"pkt-btn",
|
|
1501
|
-
l && `pkt-btn--${l}`,
|
|
1502
1501
|
s && `pkt-btn--${s}`,
|
|
1502
|
+
l && `pkt-btn--${l}`,
|
|
1503
1503
|
o && `pkt-btn--${o}`,
|
|
1504
1504
|
p && `pkt-btn--${p}`,
|
|
1505
1505
|
u && "pkt-btn--active"
|
|
@@ -1510,7 +1510,7 @@ const gr = V(
|
|
|
1510
1510
|
{
|
|
1511
1511
|
className: "pkt-btn__icon pkt-btn__spinner",
|
|
1512
1512
|
name: "spinner-blue",
|
|
1513
|
-
path: "https://punkt-cdn.oslo.kommune.no/11.
|
|
1513
|
+
path: "https://punkt-cdn.oslo.kommune.no/11.13/animations/"
|
|
1514
1514
|
}
|
|
1515
1515
|
),
|
|
1516
1516
|
o !== "label-only" && /* @__PURE__ */ t.jsx(N, { className: "pkt-btn__icon", name: a }),
|
|
@@ -1519,15 +1519,15 @@ const gr = V(
|
|
|
1519
1519
|
] });
|
|
1520
1520
|
}
|
|
1521
1521
|
);
|
|
1522
|
-
|
|
1522
|
+
de.displayName = "PktButton";
|
|
1523
1523
|
const pr = V(
|
|
1524
1524
|
({
|
|
1525
1525
|
id: e,
|
|
1526
1526
|
hasTile: r = !1,
|
|
1527
1527
|
disabled: a = !1,
|
|
1528
1528
|
label: i,
|
|
1529
|
-
labelPosition:
|
|
1530
|
-
hideLabel:
|
|
1529
|
+
labelPosition: s = "right",
|
|
1530
|
+
hideLabel: l = !1,
|
|
1531
1531
|
checkHelptext: c,
|
|
1532
1532
|
hasError: o = !1,
|
|
1533
1533
|
isSwitch: p = !1,
|
|
@@ -1540,10 +1540,10 @@ const pr = V(
|
|
|
1540
1540
|
{
|
|
1541
1541
|
className: `pkt-input-check__input ${r ? "pkt-input-check__input--tile" : ""} ${a && r ? "pkt-input-check__input--tile-disabled" : ""}`,
|
|
1542
1542
|
children: [
|
|
1543
|
-
i &&
|
|
1543
|
+
i && s === "left" && /* @__PURE__ */ t.jsxs(
|
|
1544
1544
|
"label",
|
|
1545
1545
|
{
|
|
1546
|
-
className: `pkt-input-check__input-label ${
|
|
1546
|
+
className: `pkt-input-check__input-label ${l ? "pkt-sr-only" : ""}`,
|
|
1547
1547
|
htmlFor: e,
|
|
1548
1548
|
children: [
|
|
1549
1549
|
i,
|
|
@@ -1563,10 +1563,10 @@ const pr = V(
|
|
|
1563
1563
|
...d
|
|
1564
1564
|
}
|
|
1565
1565
|
),
|
|
1566
|
-
i &&
|
|
1566
|
+
i && s === "right" && /* @__PURE__ */ t.jsxs(
|
|
1567
1567
|
"label",
|
|
1568
1568
|
{
|
|
1569
|
-
className: `pkt-input-check__input-label ${
|
|
1569
|
+
className: `pkt-input-check__input-label ${l ? "pkt-sr-only" : ""}`,
|
|
1570
1570
|
htmlFor: e,
|
|
1571
1571
|
children: [
|
|
1572
1572
|
i,
|
|
@@ -1580,13 +1580,13 @@ const pr = V(
|
|
|
1580
1580
|
}
|
|
1581
1581
|
);
|
|
1582
1582
|
pr.displayName = "PktCheckbox";
|
|
1583
|
-
const
|
|
1583
|
+
const xr = ({
|
|
1584
1584
|
columnOne: e,
|
|
1585
1585
|
columnTwo: r,
|
|
1586
1586
|
socialLinks: a,
|
|
1587
1587
|
className: i,
|
|
1588
|
-
personvernOgInfoLink:
|
|
1589
|
-
tilgjengelighetLink:
|
|
1588
|
+
personvernOgInfoLink: s = "https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",
|
|
1589
|
+
tilgjengelighetLink: l = "https://www.oslo.kommune.no/tilgjengelighet/"
|
|
1590
1590
|
}) => {
|
|
1591
1591
|
var o, p;
|
|
1592
1592
|
const c = [i, "pkt-footer"].filter(Boolean).join(" ");
|
|
@@ -1637,14 +1637,14 @@ const br = ({
|
|
|
1637
1637
|
"a",
|
|
1638
1638
|
{
|
|
1639
1639
|
className: "pkt-footer__link",
|
|
1640
|
-
href:
|
|
1640
|
+
href: s,
|
|
1641
1641
|
children: [
|
|
1642
1642
|
/* @__PURE__ */ t.jsx(N, { className: "pkt-footer__link-icon", name: "chevron-right" }),
|
|
1643
1643
|
"Personvern og informasjonskapsler"
|
|
1644
1644
|
]
|
|
1645
1645
|
}
|
|
1646
1646
|
) }),
|
|
1647
|
-
/* @__PURE__ */ t.jsx("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ t.jsxs("a", { className: "pkt-footer__link", href:
|
|
1647
|
+
/* @__PURE__ */ t.jsx("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ t.jsxs("a", { className: "pkt-footer__link", href: l, children: [
|
|
1648
1648
|
/* @__PURE__ */ t.jsx(N, { className: "pkt-footer__link-icon", name: "chevron-right" }),
|
|
1649
1649
|
"Tilgjengelighet"
|
|
1650
1650
|
] }) })
|
|
@@ -1682,21 +1682,21 @@ const br = ({
|
|
|
1682
1682
|
) }, `sociallinks-${d}`)) })
|
|
1683
1683
|
] })
|
|
1684
1684
|
] }) });
|
|
1685
|
-
},
|
|
1685
|
+
}, gr = ({
|
|
1686
1686
|
links: e = [],
|
|
1687
1687
|
personvernOgInfoLink: r = "https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",
|
|
1688
1688
|
tilgjengelighetLink: a = "https://www.oslo.kommune.no/tilgjengelighet/",
|
|
1689
1689
|
className: i
|
|
1690
1690
|
}) => {
|
|
1691
|
-
const
|
|
1692
|
-
return /* @__PURE__ */ t.jsx("footer", { className:
|
|
1693
|
-
e.map((
|
|
1691
|
+
const s = [i, "pkt-footer-simple"].filter(Boolean).join(" ");
|
|
1692
|
+
return /* @__PURE__ */ t.jsx("footer", { className: s, "data-mode": "dark", children: /* @__PURE__ */ t.jsx("div", { className: "pkt-footer-simple__container", children: /* @__PURE__ */ t.jsxs("ul", { className: "pkt-footer-simple__list", children: [
|
|
1693
|
+
e.map((l, c) => /* @__PURE__ */ t.jsx("li", { className: "pkt-footer-simple__list-item", children: /* @__PURE__ */ t.jsxs(
|
|
1694
1694
|
"a",
|
|
1695
1695
|
{
|
|
1696
|
-
className: `pkt-footer-simple__link ${
|
|
1697
|
-
href:
|
|
1698
|
-
target:
|
|
1699
|
-
rel:
|
|
1696
|
+
className: `pkt-footer-simple__link ${l.external ? " pkt-link--external" : ""}`,
|
|
1697
|
+
href: l.href,
|
|
1698
|
+
target: l.openInNewTab ? "_blank" : "_self",
|
|
1699
|
+
rel: l.openInNewTab ? "noopener noreferrer" : void 0,
|
|
1700
1700
|
children: [
|
|
1701
1701
|
/* @__PURE__ */ t.jsx(
|
|
1702
1702
|
N,
|
|
@@ -1705,7 +1705,7 @@ const br = ({
|
|
|
1705
1705
|
name: "chevron-right"
|
|
1706
1706
|
}
|
|
1707
1707
|
),
|
|
1708
|
-
|
|
1708
|
+
l.text
|
|
1709
1709
|
]
|
|
1710
1710
|
}
|
|
1711
1711
|
) }, c)),
|
|
@@ -1719,7 +1719,7 @@ const br = ({
|
|
|
1719
1719
|
] }) })
|
|
1720
1720
|
] }) }) });
|
|
1721
1721
|
};
|
|
1722
|
-
var
|
|
1722
|
+
var Lt = { exports: {} };
|
|
1723
1723
|
/*!
|
|
1724
1724
|
Copyright (c) 2018 Jed Watson.
|
|
1725
1725
|
Licensed under the MIT License (MIT), see
|
|
@@ -1729,41 +1729,41 @@ var It = { exports: {} };
|
|
|
1729
1729
|
(function() {
|
|
1730
1730
|
var r = {}.hasOwnProperty;
|
|
1731
1731
|
function a() {
|
|
1732
|
-
for (var
|
|
1732
|
+
for (var l = "", c = 0; c < arguments.length; c++) {
|
|
1733
1733
|
var o = arguments[c];
|
|
1734
|
-
o && (
|
|
1734
|
+
o && (l = s(l, i(o)));
|
|
1735
1735
|
}
|
|
1736
|
-
return
|
|
1736
|
+
return l;
|
|
1737
1737
|
}
|
|
1738
|
-
function i(
|
|
1739
|
-
if (typeof
|
|
1740
|
-
return
|
|
1741
|
-
if (typeof
|
|
1738
|
+
function i(l) {
|
|
1739
|
+
if (typeof l == "string" || typeof l == "number")
|
|
1740
|
+
return l;
|
|
1741
|
+
if (typeof l != "object")
|
|
1742
1742
|
return "";
|
|
1743
|
-
if (Array.isArray(
|
|
1744
|
-
return a.apply(null,
|
|
1745
|
-
if (
|
|
1746
|
-
return
|
|
1743
|
+
if (Array.isArray(l))
|
|
1744
|
+
return a.apply(null, l);
|
|
1745
|
+
if (l.toString !== Object.prototype.toString && !l.toString.toString().includes("[native code]"))
|
|
1746
|
+
return l.toString();
|
|
1747
1747
|
var c = "";
|
|
1748
|
-
for (var o in
|
|
1749
|
-
r.call(
|
|
1748
|
+
for (var o in l)
|
|
1749
|
+
r.call(l, o) && l[o] && (c = s(c, o));
|
|
1750
1750
|
return c;
|
|
1751
1751
|
}
|
|
1752
|
-
function l
|
|
1753
|
-
return c ?
|
|
1752
|
+
function s(l, c) {
|
|
1753
|
+
return c ? l ? l + " " + c : l + c : l;
|
|
1754
1754
|
}
|
|
1755
1755
|
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
1756
1756
|
})();
|
|
1757
|
-
})(
|
|
1758
|
-
var fr =
|
|
1759
|
-
const
|
|
1757
|
+
})(Lt);
|
|
1758
|
+
var fr = Lt.exports;
|
|
1759
|
+
const te = /* @__PURE__ */ hn(fr), Nr = V(
|
|
1760
1760
|
({
|
|
1761
1761
|
className: e,
|
|
1762
1762
|
logoLink: r = "https://www.oslo.kommune.no/",
|
|
1763
1763
|
serviceName: a,
|
|
1764
1764
|
fixed: i = !0,
|
|
1765
|
-
scrollToHide:
|
|
1766
|
-
user:
|
|
1765
|
+
scrollToHide: s = !0,
|
|
1766
|
+
user: l,
|
|
1767
1767
|
userMenu: c,
|
|
1768
1768
|
representing: o,
|
|
1769
1769
|
userOptions: p,
|
|
@@ -1777,24 +1777,24 @@ const Lt = /* @__PURE__ */ hn(fr), jr = V(
|
|
|
1777
1777
|
children: O,
|
|
1778
1778
|
...R
|
|
1779
1779
|
}, _) => {
|
|
1780
|
-
const v = X.useMemo(() => typeof (
|
|
1780
|
+
const v = X.useMemo(() => typeof (l == null ? void 0 : l.lastLoggedIn) == "string" ? l.lastLoggedIn : l != null && l.lastLoggedIn ? new Date(l.lastLoggedIn).toLocaleString("nb-NO", {
|
|
1781
1781
|
year: "numeric",
|
|
1782
1782
|
month: "long",
|
|
1783
1783
|
day: "numeric"
|
|
1784
|
-
}) : "", [
|
|
1785
|
-
X.useEffect(() => (document.addEventListener("mouseup", K), window.addEventListener("scroll",
|
|
1786
|
-
document.removeEventListener("mouseup", K), window.removeEventListener("scroll",
|
|
1784
|
+
}) : "", [l]), [y, A] = X.useState(!1), [U, W] = X.useState(0), [B, M] = X.useState(!1), Y = X.useRef(null);
|
|
1785
|
+
X.useEffect(() => (document.addEventListener("mouseup", K), window.addEventListener("scroll", I), () => {
|
|
1786
|
+
document.removeEventListener("mouseup", K), window.removeEventListener("scroll", I);
|
|
1787
1787
|
}));
|
|
1788
1788
|
const z = () => {
|
|
1789
1789
|
M(!B);
|
|
1790
|
-
}, K = (
|
|
1791
|
-
Y.current && !Y.current.contains(
|
|
1792
|
-
},
|
|
1793
|
-
if (
|
|
1794
|
-
const
|
|
1795
|
-
if (
|
|
1790
|
+
}, K = (b) => {
|
|
1791
|
+
Y.current && !Y.current.contains(b.target) && M(!1);
|
|
1792
|
+
}, I = () => {
|
|
1793
|
+
if (s) {
|
|
1794
|
+
const b = window.pageYOffset || document.documentElement.scrollTop;
|
|
1795
|
+
if (b < 0 || Math.abs(b - U) < 60)
|
|
1796
1796
|
return;
|
|
1797
|
-
A(
|
|
1797
|
+
A(b > U), W(b);
|
|
1798
1798
|
}
|
|
1799
1799
|
};
|
|
1800
1800
|
return /* @__PURE__ */ t.jsxs(
|
|
@@ -1804,9 +1804,9 @@ const Lt = /* @__PURE__ */ hn(fr), jr = V(
|
|
|
1804
1804
|
id: "pkt-header",
|
|
1805
1805
|
"data-testid": "pkt-header",
|
|
1806
1806
|
"aria-label": "Topp",
|
|
1807
|
-
className:
|
|
1807
|
+
className: te(e, "pkt-header", {
|
|
1808
1808
|
"pkt-header--fixed": i,
|
|
1809
|
-
"pkt-header--scroll-to-hide":
|
|
1809
|
+
"pkt-header--scroll-to-hide": s,
|
|
1810
1810
|
"pkt-header--hidden": y
|
|
1811
1811
|
}),
|
|
1812
1812
|
ref: _,
|
|
@@ -1818,7 +1818,7 @@ const Lt = /* @__PURE__ */ hn(fr), jr = V(
|
|
|
1818
1818
|
name: "oslologo",
|
|
1819
1819
|
className: "pkt-header__logo-svg",
|
|
1820
1820
|
"aria-hidden": "true",
|
|
1821
|
-
path: "https://punkt-cdn.oslo.kommune.no/11.
|
|
1821
|
+
path: "https://punkt-cdn.oslo.kommune.no/11.13/logos/"
|
|
1822
1822
|
}
|
|
1823
1823
|
) }) : /* @__PURE__ */ t.jsx(
|
|
1824
1824
|
"button",
|
|
@@ -1832,7 +1832,7 @@ const Lt = /* @__PURE__ */ hn(fr), jr = V(
|
|
|
1832
1832
|
name: "oslologo",
|
|
1833
1833
|
className: "pkt-header__logo-svg",
|
|
1834
1834
|
"aria-hidden": "true",
|
|
1835
|
-
path: "https://punkt-cdn.oslo.kommune.no/11.
|
|
1835
|
+
path: "https://punkt-cdn.oslo.kommune.no/11.13/logos/"
|
|
1836
1836
|
}
|
|
1837
1837
|
)
|
|
1838
1838
|
}
|
|
@@ -1841,7 +1841,7 @@ const Lt = /* @__PURE__ */ hn(fr), jr = V(
|
|
|
1841
1841
|
] }),
|
|
1842
1842
|
/* @__PURE__ */ t.jsx("nav", { className: "pkt-header__actions", children: /* @__PURE__ */ t.jsxs("ul", { className: "pkt-header__actions-row", children: [
|
|
1843
1843
|
h && /* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1844
|
-
|
|
1844
|
+
de,
|
|
1845
1845
|
{
|
|
1846
1846
|
className: "pkt-header__menu-btn",
|
|
1847
1847
|
skin: "secondary",
|
|
@@ -1851,7 +1851,7 @@ const Lt = /* @__PURE__ */ hn(fr), jr = V(
|
|
|
1851
1851
|
children: "Meny"
|
|
1852
1852
|
}
|
|
1853
1853
|
) }),
|
|
1854
|
-
(
|
|
1854
|
+
(l || o) && /* @__PURE__ */ t.jsxs(
|
|
1855
1855
|
"li",
|
|
1856
1856
|
{
|
|
1857
1857
|
"data-testid": "usermenu",
|
|
@@ -1869,28 +1869,28 @@ const Lt = /* @__PURE__ */ hn(fr), jr = V(
|
|
|
1869
1869
|
onClick: z,
|
|
1870
1870
|
children: [
|
|
1871
1871
|
/* @__PURE__ */ t.jsx(N, { name: "user", className: "pkt-btn__icon" }),
|
|
1872
|
-
/* @__PURE__ */ t.jsx("span", { className: "pkt-header__user-fullname", children: (o == null ? void 0 : o.name) || (
|
|
1873
|
-
/* @__PURE__ */ t.jsx("span", { className: "pkt-header__user-shortname", children: (o == null ? void 0 : o.shortname) || (
|
|
1872
|
+
/* @__PURE__ */ t.jsx("span", { className: "pkt-header__user-fullname", children: (o == null ? void 0 : o.name) || (l == null ? void 0 : l.name) }),
|
|
1873
|
+
/* @__PURE__ */ t.jsx("span", { className: "pkt-header__user-shortname", children: (o == null ? void 0 : o.shortname) || (l == null ? void 0 : l.shortname) }),
|
|
1874
1874
|
/* @__PURE__ */ t.jsx(N, { name: "chevron-thin-down", className: "pkt-btn--closed" }),
|
|
1875
1875
|
/* @__PURE__ */ t.jsx(N, { name: "chevron-thin-up", className: "pkt-btn--open" })
|
|
1876
1876
|
]
|
|
1877
1877
|
}
|
|
1878
1878
|
),
|
|
1879
1879
|
/* @__PURE__ */ t.jsxs("ul", { id: "pktUserDropdown", className: "pkt-header__dropdown pkt-user-menu", children: [
|
|
1880
|
-
|
|
1880
|
+
l && /* @__PURE__ */ t.jsxs("li", { children: [
|
|
1881
1881
|
/* @__PURE__ */ t.jsx("div", { className: "pkt-user-menu__label", children: "Pålogget som" }),
|
|
1882
|
-
/* @__PURE__ */ t.jsx("div", { className: "pkt-user-menu__name", children:
|
|
1883
|
-
|
|
1882
|
+
/* @__PURE__ */ t.jsx("div", { className: "pkt-user-menu__name", children: l.name }),
|
|
1883
|
+
l.lastLoggedIn && /* @__PURE__ */ t.jsxs("div", { className: "pkt-user-menu__last-logged-in", children: [
|
|
1884
1884
|
"Sist pålogget: ",
|
|
1885
1885
|
/* @__PURE__ */ t.jsx("time", { children: v })
|
|
1886
1886
|
] })
|
|
1887
1887
|
] }),
|
|
1888
|
-
c && /* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx("ul", { className: "pkt-list", children: c.map((
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
] }) : /* @__PURE__ */ t.jsxs("button", { className: "pkt-link-button pkt-link", onClick:
|
|
1892
|
-
|
|
1893
|
-
|
|
1888
|
+
c && /* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx("ul", { className: "pkt-list", children: c.map((b, L) => /* @__PURE__ */ t.jsx("li", { children: typeof b.target == "string" ? /* @__PURE__ */ t.jsxs("a", { href: b.target, className: "pkt-link", children: [
|
|
1889
|
+
b.iconName && /* @__PURE__ */ t.jsx(N, { name: b.iconName, className: "pkt-link__icon" }),
|
|
1890
|
+
b.title
|
|
1891
|
+
] }) : /* @__PURE__ */ t.jsxs("button", { className: "pkt-link-button pkt-link", onClick: b.target, children: [
|
|
1892
|
+
b.iconName && /* @__PURE__ */ t.jsx(N, { name: b.iconName, className: "pkt-link__icon" }),
|
|
1893
|
+
b.title
|
|
1894
1894
|
] }) }, `userMenu-${L}`)) }) }),
|
|
1895
1895
|
(o || d) && /* @__PURE__ */ t.jsxs("li", { children: [
|
|
1896
1896
|
o && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
@@ -1907,26 +1907,26 @@ const Lt = /* @__PURE__ */ hn(fr), jr = V(
|
|
|
1907
1907
|
] }) }) })
|
|
1908
1908
|
] }),
|
|
1909
1909
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx("ul", { className: "pkt-list", children: (p || !k) && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1910
|
-
p == null ? void 0 : p.map((
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
] }) : /* @__PURE__ */ t.jsxs("button", { className: "pkt-link-button pkt-link", onClick:
|
|
1914
|
-
|
|
1915
|
-
|
|
1910
|
+
p == null ? void 0 : p.map((b, L) => /* @__PURE__ */ t.jsx("li", { children: typeof b.target == "string" ? /* @__PURE__ */ t.jsxs("a", { href: b.target, className: "pkt-link", children: [
|
|
1911
|
+
b.iconName && /* @__PURE__ */ t.jsx(N, { name: b.iconName, className: "pkt-link__icon" }),
|
|
1912
|
+
b.title
|
|
1913
|
+
] }) : /* @__PURE__ */ t.jsxs("button", { className: "pkt-link-button pkt-link", onClick: b.target, children: [
|
|
1914
|
+
b.iconName && /* @__PURE__ */ t.jsx(N, { name: b.iconName, className: "pkt-link__icon" }),
|
|
1915
|
+
b.title
|
|
1916
1916
|
] }) }, `userOptions-${L}`)),
|
|
1917
1917
|
!k && /* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsxs("button", { className: "pkt-link-button pkt-link", onClick: j, children: [
|
|
1918
1918
|
/* @__PURE__ */ t.jsx(N, { name: "exit", className: "pkt-link__icon" }),
|
|
1919
1919
|
"Logg ut"
|
|
1920
1920
|
] }) })
|
|
1921
1921
|
] }) }) }),
|
|
1922
|
-
u && /* @__PURE__ */ t.jsx("li", { className: "footer", children: /* @__PURE__ */ t.jsx("ul", { className: "pkt-list-horizontal bordered", children: u.map((
|
|
1922
|
+
u && /* @__PURE__ */ t.jsx("li", { className: "footer", children: /* @__PURE__ */ t.jsx("ul", { className: "pkt-list-horizontal bordered", children: u.map((b, L) => /* @__PURE__ */ t.jsx("li", { children: typeof b.target == "string" ? /* @__PURE__ */ t.jsx("a", { href: b.target, className: "pkt-link", children: b.title }) : /* @__PURE__ */ t.jsx("button", { className: "pkt-link-button pkt-link", onClick: b.target, children: b.title }) }, `userMenuFooter-${L}`)) }) })
|
|
1923
1923
|
] })
|
|
1924
1924
|
]
|
|
1925
1925
|
}
|
|
1926
1926
|
),
|
|
1927
1927
|
O && /* @__PURE__ */ t.jsx("li", { children: O }),
|
|
1928
1928
|
k && /* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1929
|
-
|
|
1929
|
+
de,
|
|
1930
1930
|
{
|
|
1931
1931
|
className: "pkt-header__user-btn pkt-header__user-btn-logout",
|
|
1932
1932
|
iconName: "exit",
|
|
@@ -1943,21 +1943,21 @@ const Lt = /* @__PURE__ */ hn(fr), jr = V(
|
|
|
1943
1943
|
);
|
|
1944
1944
|
}
|
|
1945
1945
|
), dr = X.forwardRef(
|
|
1946
|
-
({ label: e, id: r, children: a, ...i },
|
|
1946
|
+
({ label: e, id: r, children: a, ...i }, s) => /* @__PURE__ */ t.jsxs("div", { className: "pkt-form-group", children: [
|
|
1947
1947
|
/* @__PURE__ */ t.jsx("label", { htmlFor: r, className: "pkt-form-label", children: e }),
|
|
1948
|
-
/* @__PURE__ */ t.jsx("input", { className: "pkt-form-input", id: r, ...i, ref:
|
|
1948
|
+
/* @__PURE__ */ t.jsx("input", { className: "pkt-form-input", id: r, ...i, ref: s }),
|
|
1949
1949
|
a
|
|
1950
1950
|
] })
|
|
1951
1951
|
);
|
|
1952
1952
|
dr.displayName = "PktInput";
|
|
1953
|
-
const
|
|
1953
|
+
const Re = V(
|
|
1954
1954
|
({
|
|
1955
1955
|
forId: e,
|
|
1956
1956
|
label: r,
|
|
1957
1957
|
helptext: a,
|
|
1958
1958
|
helptextDropdown: i,
|
|
1959
|
-
helptextDropdownButton:
|
|
1960
|
-
optionalTag:
|
|
1959
|
+
helptextDropdownButton: s,
|
|
1960
|
+
optionalTag: l = !1,
|
|
1961
1961
|
optionalText: c = "Valgfritt",
|
|
1962
1962
|
requiredTag: o = !1,
|
|
1963
1963
|
requiredText: p = "Må fylles ut",
|
|
@@ -1971,18 +1971,18 @@ const Ce = V(
|
|
|
1971
1971
|
className: O,
|
|
1972
1972
|
hasFieldset: R = !1
|
|
1973
1973
|
}, _) => {
|
|
1974
|
-
const [v, y] =
|
|
1974
|
+
const [v, y] = le(!1), A = () => {
|
|
1975
1975
|
y(!v);
|
|
1976
|
-
}, U = () =>
|
|
1976
|
+
}, U = () => l ? "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" : "", W = l ? c : o ? p : "", B = h ? "pkt-inputwrapper--disabled" : "", M = k ? "pkt-inputwrapper--inline" : "", Y = u ? "pkt-inputwrapper--error" : "", z = !!i && i !== "", K = s || 'Les mer <span class="pkt-sr-only">om inputfeltet</span>', I = R ? "fieldset" : z ? "div" : "label", b = R ? "legend" : z ? "h2" : "span", L = C || (a ? `${e}-helptext` : void 0);
|
|
1977
1977
|
return /* @__PURE__ */ t.jsxs("div", { className: ["pkt-inputwrapper", O, B, M, Y].join(" "), ref: _, children: [
|
|
1978
1978
|
j ? /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs(
|
|
1979
|
-
|
|
1979
|
+
I,
|
|
1980
1980
|
{
|
|
1981
1981
|
htmlFor: R ? void 0 : e,
|
|
1982
1982
|
"aria-describedby": z ? void 0 : C,
|
|
1983
1983
|
className: `pkt-inputwrapper__label${R ? " pkt-inputwrapper__fieldset" : ""}`,
|
|
1984
1984
|
children: [
|
|
1985
|
-
/* @__PURE__ */ t.jsxs(
|
|
1985
|
+
/* @__PURE__ */ t.jsxs(b, { id: `${e}-label`, className: `${R ? " pkt-inputwrapper__legend" : ""}`, children: [
|
|
1986
1986
|
r,
|
|
1987
1987
|
W !== "" && /* @__PURE__ */ t.jsx("span", { className: U(), children: W })
|
|
1988
1988
|
] }),
|
|
@@ -1996,7 +1996,7 @@ const Ce = V(
|
|
|
1996
1996
|
),
|
|
1997
1997
|
z && i !== "" && /* @__PURE__ */ t.jsxs("div", { children: [
|
|
1998
1998
|
/* @__PURE__ */ t.jsx(
|
|
1999
|
-
|
|
1999
|
+
de,
|
|
2000
2000
|
{
|
|
2001
2001
|
skin: "tertiary",
|
|
2002
2002
|
size: "small",
|
|
@@ -2027,25 +2027,25 @@ const Ce = V(
|
|
|
2027
2027
|
] });
|
|
2028
2028
|
}
|
|
2029
2029
|
);
|
|
2030
|
-
|
|
2030
|
+
Re.displayName = "PktInputWrapper";
|
|
2031
2031
|
const mr = V(
|
|
2032
2032
|
({
|
|
2033
2033
|
children: e,
|
|
2034
2034
|
className: r,
|
|
2035
2035
|
iconName: a = "user",
|
|
2036
2036
|
openInNewTab: i = !1,
|
|
2037
|
-
skin:
|
|
2038
|
-
href:
|
|
2037
|
+
skin: s = "normal",
|
|
2038
|
+
href: l = "#",
|
|
2039
2039
|
external: c = !1,
|
|
2040
2040
|
title: o,
|
|
2041
2041
|
...p
|
|
2042
2042
|
}, u) => {
|
|
2043
|
-
const d = [r, "pkt-linkcard",
|
|
2043
|
+
const d = [r, "pkt-linkcard", s && `pkt-linkcard--${s}`].filter(Boolean).join(" ");
|
|
2044
2044
|
return /* @__PURE__ */ t.jsxs(
|
|
2045
2045
|
"a",
|
|
2046
2046
|
{
|
|
2047
2047
|
...p,
|
|
2048
|
-
href:
|
|
2048
|
+
href: l,
|
|
2049
2049
|
className: `pkt-linkcard pkt-link ${d}`,
|
|
2050
2050
|
target: i ? "_blank" : "_self",
|
|
2051
2051
|
rel: i ? "noopener noreferrer" : void 0,
|
|
@@ -2062,19 +2062,19 @@ const mr = V(
|
|
|
2062
2062
|
}
|
|
2063
2063
|
);
|
|
2064
2064
|
mr.displayName = "PktLinkCard";
|
|
2065
|
-
const
|
|
2065
|
+
const jr = V(
|
|
2066
2066
|
({
|
|
2067
2067
|
className: e,
|
|
2068
2068
|
message: r,
|
|
2069
2069
|
size: a = "medium",
|
|
2070
2070
|
inline: i = !1,
|
|
2071
|
-
isLoading:
|
|
2072
|
-
variant:
|
|
2071
|
+
isLoading: s = !0,
|
|
2072
|
+
variant: l = "rainbow",
|
|
2073
2073
|
delay: c = 0,
|
|
2074
2074
|
children: o,
|
|
2075
2075
|
...p
|
|
2076
2076
|
}, u) => {
|
|
2077
|
-
const d = `pkt-loader pkt-loader--${a}`, [h, k] =
|
|
2077
|
+
const d = `pkt-loader pkt-loader--${a}`, [h, k] = le(!(c > 0));
|
|
2078
2078
|
c > 0 && setTimeout(() => {
|
|
2079
2079
|
k(!0);
|
|
2080
2080
|
}, c);
|
|
@@ -2084,16 +2084,16 @@ const yr = V(
|
|
|
2084
2084
|
{
|
|
2085
2085
|
role: "status",
|
|
2086
2086
|
"aria-live": "polite",
|
|
2087
|
-
"aria-busy":
|
|
2087
|
+
"aria-busy": s,
|
|
2088
2088
|
className: `pkt-loader--${i ? "inline" : "box"} ${e || ""}`,
|
|
2089
|
-
children:
|
|
2089
|
+
children: s ? /* @__PURE__ */ t.jsx(t.Fragment, { children: h ? /* @__PURE__ */ t.jsxs("div", { className: d, "data-testid": "pkt-loader", ref: u, ...p, children: [
|
|
2090
2090
|
/* @__PURE__ */ t.jsx(
|
|
2091
2091
|
N,
|
|
2092
2092
|
{
|
|
2093
|
-
name: C(
|
|
2093
|
+
name: C(l),
|
|
2094
2094
|
"aria-label": "loading",
|
|
2095
|
-
path: "https://punkt-cdn.oslo.kommune.no/11.
|
|
2096
|
-
className: `pkt-loader__svg pkt-loader__${
|
|
2095
|
+
path: "https://punkt-cdn.oslo.kommune.no/11.13/animations/",
|
|
2096
|
+
className: `pkt-loader__svg pkt-loader__${l}`
|
|
2097
2097
|
}
|
|
2098
2098
|
),
|
|
2099
2099
|
r && /* @__PURE__ */ t.jsx("p", { children: r })
|
|
@@ -2101,13 +2101,13 @@ const yr = V(
|
|
|
2101
2101
|
}
|
|
2102
2102
|
);
|
|
2103
2103
|
}
|
|
2104
|
-
),
|
|
2104
|
+
), yr = ({
|
|
2105
2105
|
children: e,
|
|
2106
2106
|
className: r,
|
|
2107
2107
|
compact: a = !1,
|
|
2108
2108
|
skin: i = "beige",
|
|
2109
|
-
title:
|
|
2110
|
-
...
|
|
2109
|
+
title: s,
|
|
2110
|
+
...l
|
|
2111
2111
|
}) => {
|
|
2112
2112
|
const c = [
|
|
2113
2113
|
r,
|
|
@@ -2115,8 +2115,8 @@ const yr = V(
|
|
|
2115
2115
|
i && `pkt-messagebox--${i}`,
|
|
2116
2116
|
a && "pkt-messagebox--compact"
|
|
2117
2117
|
].filter(Boolean).join(" ");
|
|
2118
|
-
return /* @__PURE__ */ t.jsxs("div", { ...
|
|
2119
|
-
|
|
2118
|
+
return /* @__PURE__ */ t.jsxs("div", { ...l, className: c, children: [
|
|
2119
|
+
s && /* @__PURE__ */ t.jsx("div", { className: "pkt-messagebox__title", children: s }),
|
|
2120
2120
|
/* @__PURE__ */ t.jsx("div", { className: "pkt-messagebox__text", children: e })
|
|
2121
2121
|
] });
|
|
2122
2122
|
}, hr = V(
|
|
@@ -2125,8 +2125,8 @@ const yr = V(
|
|
|
2125
2125
|
name: r,
|
|
2126
2126
|
label: a,
|
|
2127
2127
|
className: i,
|
|
2128
|
-
hasTile:
|
|
2129
|
-
disabled:
|
|
2128
|
+
hasTile: s = !1,
|
|
2129
|
+
disabled: l = !1,
|
|
2130
2130
|
checkHelptext: c,
|
|
2131
2131
|
hasError: o = !1,
|
|
2132
2132
|
...p
|
|
@@ -2135,7 +2135,7 @@ const yr = V(
|
|
|
2135
2135
|
i,
|
|
2136
2136
|
"pkt-input-check"
|
|
2137
2137
|
].filter(Boolean).join(" ");
|
|
2138
|
-
return /* @__PURE__ */ t.jsx("div", { className: d, children: /* @__PURE__ */ t.jsxs("div", { className: `pkt-input-check__input ${
|
|
2138
|
+
return /* @__PURE__ */ t.jsx("div", { className: d, children: /* @__PURE__ */ t.jsxs("div", { className: `pkt-input-check__input ${s ? "pkt-input-check__input--tile" : ""} ${l && s ? "pkt-input-check__input--tile-disabled" : ""}`, children: [
|
|
2139
2139
|
/* @__PURE__ */ t.jsx(
|
|
2140
2140
|
"input",
|
|
2141
2141
|
{
|
|
@@ -2143,7 +2143,7 @@ const yr = V(
|
|
|
2143
2143
|
className: `pkt-input-check__input-checkbox ${o ? "pkt-input-check__input-checkbox--error" : ""}`,
|
|
2144
2144
|
type: "radio",
|
|
2145
2145
|
id: e,
|
|
2146
|
-
disabled:
|
|
2146
|
+
disabled: l,
|
|
2147
2147
|
name: r,
|
|
2148
2148
|
...p
|
|
2149
2149
|
}
|
|
@@ -2156,14 +2156,14 @@ const yr = V(
|
|
|
2156
2156
|
}
|
|
2157
2157
|
);
|
|
2158
2158
|
hr.displayName = "PktRadioButton";
|
|
2159
|
-
const
|
|
2159
|
+
const wr = V(
|
|
2160
2160
|
({
|
|
2161
2161
|
action: e,
|
|
2162
2162
|
appearance: r = "local",
|
|
2163
2163
|
disabled: a = !1,
|
|
2164
2164
|
fullwidth: i = !1,
|
|
2165
|
-
id:
|
|
2166
|
-
label:
|
|
2165
|
+
id: s,
|
|
2166
|
+
label: l,
|
|
2167
2167
|
method: c = "get",
|
|
2168
2168
|
name: o,
|
|
2169
2169
|
placeholder: p = "Søk…",
|
|
@@ -2175,7 +2175,7 @@ const Er = V(
|
|
|
2175
2175
|
}, j) => {
|
|
2176
2176
|
const S = (v, y) => {
|
|
2177
2177
|
v ? v() : k && k(y);
|
|
2178
|
-
}, O = `pkt-searchinput pkt-searchinput--${r} ${i ? "pkt-searchinput--fullwidth" : ""}`, R = e ? "form" : "div", _ =
|
|
2178
|
+
}, O = `pkt-searchinput pkt-searchinput--${r} ${i ? "pkt-searchinput--fullwidth" : ""}`, R = e ? "form" : "div", _ = l ? "label" : "div";
|
|
2179
2179
|
return /* @__PURE__ */ t.jsxs(
|
|
2180
2180
|
R,
|
|
2181
2181
|
{
|
|
@@ -2187,27 +2187,27 @@ const Er = V(
|
|
|
2187
2187
|
ref: j,
|
|
2188
2188
|
...C,
|
|
2189
2189
|
children: [
|
|
2190
|
-
/* @__PURE__ */ t.jsxs(_, { htmlFor:
|
|
2191
|
-
|
|
2190
|
+
/* @__PURE__ */ t.jsxs(_, { htmlFor: l ? s : void 0, className: l ? "pkt-inputwrapper__label" : "", children: [
|
|
2191
|
+
l && /* @__PURE__ */ t.jsx(t.Fragment, { children: l }),
|
|
2192
2192
|
/* @__PURE__ */ t.jsxs("div", { className: r === "local" ? "pkt-input__container" : "pkt-searchinput__field", children: [
|
|
2193
2193
|
/* @__PURE__ */ t.jsx(
|
|
2194
2194
|
"input",
|
|
2195
2195
|
{
|
|
2196
2196
|
className: `pkt-input ${i ? "pkt-input--fullwidth" : ""}`,
|
|
2197
2197
|
type: "search",
|
|
2198
|
-
name: o ||
|
|
2199
|
-
id:
|
|
2198
|
+
name: o || s,
|
|
2199
|
+
id: s,
|
|
2200
2200
|
placeholder: p,
|
|
2201
2201
|
defaultValue: d,
|
|
2202
2202
|
disabled: a,
|
|
2203
2203
|
onInput: h && ((v) => h(v.currentTarget.value)),
|
|
2204
2204
|
autoComplete: "off",
|
|
2205
2205
|
"aria-autocomplete": "list",
|
|
2206
|
-
"aria-controls": `${
|
|
2206
|
+
"aria-controls": `${s}-suggestions`
|
|
2207
2207
|
}
|
|
2208
2208
|
),
|
|
2209
2209
|
/* @__PURE__ */ t.jsx(
|
|
2210
|
-
|
|
2210
|
+
de,
|
|
2211
2211
|
{
|
|
2212
2212
|
className: `pkt-searchinput__button ${r === "local" ? "pkt-input-icon" : ""}`,
|
|
2213
2213
|
variant: "icon-only",
|
|
@@ -2218,12 +2218,12 @@ const Er = V(
|
|
|
2218
2218
|
disabled: a,
|
|
2219
2219
|
onClick: h && (() => h(d)),
|
|
2220
2220
|
onKeyUp: h && ((v) => v.key === "Enter" && h(d)),
|
|
2221
|
-
children:
|
|
2221
|
+
children: l || p
|
|
2222
2222
|
}
|
|
2223
2223
|
)
|
|
2224
2224
|
] })
|
|
2225
2225
|
] }),
|
|
2226
|
-
u && /* @__PURE__ */ t.jsx("ul", { id: `${
|
|
2226
|
+
u && /* @__PURE__ */ t.jsx("ul", { id: `${s}-suggestions`, className: "pkt-searchinput__suggestions", "aria-live": "assertive", children: u.map((v, y) => /* @__PURE__ */ t.jsx("li", { children: X.createElement(
|
|
2227
2227
|
v.href ? "a" : v.onClick ? "button" : "div",
|
|
2228
2228
|
{
|
|
2229
2229
|
href: v.href,
|
|
@@ -2241,14 +2241,14 @@ const Er = V(
|
|
|
2241
2241
|
}
|
|
2242
2242
|
);
|
|
2243
2243
|
}
|
|
2244
|
-
),
|
|
2244
|
+
), Er = V(
|
|
2245
2245
|
({
|
|
2246
2246
|
ariaDescribedby: e,
|
|
2247
2247
|
ariaLabelledby: r,
|
|
2248
2248
|
children: a,
|
|
2249
2249
|
className: i,
|
|
2250
|
-
disabled:
|
|
2251
|
-
errorMessage:
|
|
2250
|
+
disabled: s = !1,
|
|
2251
|
+
errorMessage: l,
|
|
2252
2252
|
hasError: c,
|
|
2253
2253
|
helptext: o,
|
|
2254
2254
|
helptextDropdown: p,
|
|
@@ -2266,7 +2266,7 @@ const Er = V(
|
|
|
2266
2266
|
}, y) => {
|
|
2267
2267
|
const A = [i, "pkt-select"].join(" ");
|
|
2268
2268
|
return /* @__PURE__ */ t.jsx(
|
|
2269
|
-
|
|
2269
|
+
Re,
|
|
2270
2270
|
{
|
|
2271
2271
|
className: A,
|
|
2272
2272
|
forId: d,
|
|
@@ -2279,8 +2279,8 @@ const Er = V(
|
|
|
2279
2279
|
requiredTag: R,
|
|
2280
2280
|
requiredText: _,
|
|
2281
2281
|
hasError: c,
|
|
2282
|
-
errorMessage:
|
|
2283
|
-
disabled:
|
|
2282
|
+
errorMessage: l,
|
|
2283
|
+
disabled: s,
|
|
2284
2284
|
inline: h,
|
|
2285
2285
|
ariaDescribedby: e,
|
|
2286
2286
|
children: /* @__PURE__ */ t.jsx(
|
|
@@ -2291,7 +2291,7 @@ const Er = V(
|
|
|
2291
2291
|
"aria-invalid": c,
|
|
2292
2292
|
"aria-errormessage": `${d}-error`,
|
|
2293
2293
|
"aria-labelledby": r || `${d}-label`,
|
|
2294
|
-
disabled:
|
|
2294
|
+
disabled: s,
|
|
2295
2295
|
id: d,
|
|
2296
2296
|
name: j || d,
|
|
2297
2297
|
...v,
|
|
@@ -2301,39 +2301,52 @@ const Er = V(
|
|
|
2301
2301
|
}
|
|
2302
2302
|
);
|
|
2303
2303
|
}
|
|
2304
|
-
),
|
|
2305
|
-
|
|
2306
|
-
|
|
2304
|
+
), Cr = ({
|
|
2305
|
+
className: e,
|
|
2306
|
+
compact: r = !1,
|
|
2307
|
+
skin: a = "basic",
|
|
2308
|
+
responsiveView: i = !0,
|
|
2307
2309
|
children: s
|
|
2308
|
-
}) => /* @__PURE__ */ t.jsx(
|
|
2310
|
+
}) => /* @__PURE__ */ t.jsx(
|
|
2309
2311
|
"table",
|
|
2310
2312
|
{
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
"pkt-table--
|
|
2314
|
-
"pkt-table--
|
|
2315
|
-
"pkt-table--
|
|
2313
|
+
"data-testid": "pkt-table",
|
|
2314
|
+
className: te(e, "pkt-table", {
|
|
2315
|
+
"pkt-table--responsive": i,
|
|
2316
|
+
"pkt-table--compact": r,
|
|
2317
|
+
"pkt-table--basic": a === "basic",
|
|
2318
|
+
"pkt-table--zebra-blue": a === "zebra-blue"
|
|
2316
2319
|
}),
|
|
2320
|
+
role: "table",
|
|
2317
2321
|
children: s
|
|
2318
2322
|
}
|
|
2319
|
-
)
|
|
2323
|
+
), Rr = ({ children: e, className: r, dataLabel: a }) => /* @__PURE__ */ t.jsx(
|
|
2324
|
+
"td",
|
|
2325
|
+
{
|
|
2326
|
+
className: te(r, "pkt-table__data-cell", {}),
|
|
2327
|
+
"data-label": a,
|
|
2328
|
+
role: "cell",
|
|
2329
|
+
"data-testid": "pkt-table__data-cell",
|
|
2330
|
+
children: e
|
|
2331
|
+
}
|
|
2332
|
+
), Pr = ({ className: e, children: r }) => /* @__PURE__ */ t.jsx("th", { className: te(e, "pkt-table__header-cell", {}), role: "columnheader", children: r }), Sr = ({ className: e, children: r }) => /* @__PURE__ */ t.jsx("thead", { className: te(e, "pkt-table__header", {}), role: "rowgroup", children: r }), Tr = ({ className: e, children: r }) => /* @__PURE__ */ t.jsx("tr", { className: te(e, "pkt-table__row", {}), role: "row", children: r }), Or = ({ children: e, className: r }) => /* @__PURE__ */ t.jsx("tbody", { className: te(r, "pkt-table__body", {}), role: "rowgroup", children: e }), Je = V(({
|
|
2320
2333
|
children: e,
|
|
2321
2334
|
className: r,
|
|
2322
2335
|
skin: a = "blue",
|
|
2323
2336
|
textStyle: i = "normal-text",
|
|
2324
|
-
size:
|
|
2325
|
-
closeTag:
|
|
2337
|
+
size: s = "medium",
|
|
2338
|
+
closeTag: l = !1,
|
|
2326
2339
|
iconName: c = "",
|
|
2327
2340
|
type: o = "button",
|
|
2328
2341
|
ariaLabel: p = "close",
|
|
2329
2342
|
onClick: u = () => {
|
|
2330
2343
|
}
|
|
2331
2344
|
}, d) => {
|
|
2332
|
-
const [h, k] =
|
|
2345
|
+
const [h, k] = le(!1), C = (R) => {
|
|
2333
2346
|
k(!0), u(R);
|
|
2334
2347
|
}, j = [
|
|
2335
2348
|
"pkt-tag",
|
|
2336
|
-
|
|
2349
|
+
s && `pkt-tag--${s}`,
|
|
2337
2350
|
a && `pkt-tag--${a}`,
|
|
2338
2351
|
i && `pkt-tag--${i}`,
|
|
2339
2352
|
r
|
|
@@ -2341,14 +2354,14 @@ const Er = V(
|
|
|
2341
2354
|
"pkt-tag",
|
|
2342
2355
|
"pkt-btn",
|
|
2343
2356
|
"pkt-btn--tertiary",
|
|
2344
|
-
|
|
2357
|
+
s && `pkt-tag--${s}`,
|
|
2345
2358
|
a && `pkt-tag--${a}`,
|
|
2346
2359
|
i && `pkt-tag--${i}`,
|
|
2347
|
-
c &&
|
|
2348
|
-
|
|
2360
|
+
c && l ? "pkt-btn--icons-right-and-left" : null,
|
|
2361
|
+
l && !c ? "pkt-btn--icon-right" : null,
|
|
2349
2362
|
r
|
|
2350
2363
|
].filter(Boolean).join(" "), O = !h;
|
|
2351
|
-
return
|
|
2364
|
+
return l && c ? /* @__PURE__ */ t.jsx(t.Fragment, { children: O && /* @__PURE__ */ t.jsxs(
|
|
2352
2365
|
"button",
|
|
2353
2366
|
{
|
|
2354
2367
|
className: S,
|
|
@@ -2362,7 +2375,7 @@ const Er = V(
|
|
|
2362
2375
|
/* @__PURE__ */ t.jsx(N, { className: "pkt-tag__close-btn", name: "close" })
|
|
2363
2376
|
]
|
|
2364
2377
|
}
|
|
2365
|
-
) }) :
|
|
2378
|
+
) }) : l ? /* @__PURE__ */ t.jsx(t.Fragment, { children: O && /* @__PURE__ */ t.jsxs(
|
|
2366
2379
|
"button",
|
|
2367
2380
|
{
|
|
2368
2381
|
className: S,
|
|
@@ -2380,18 +2393,18 @@ const Er = V(
|
|
|
2380
2393
|
e
|
|
2381
2394
|
] }) : /* @__PURE__ */ t.jsx("span", { className: j, children: e });
|
|
2382
2395
|
});
|
|
2383
|
-
|
|
2384
|
-
const
|
|
2396
|
+
Je.displayName = "PktTag";
|
|
2397
|
+
const $r = V(
|
|
2385
2398
|
({ arrowNav: e = !0, tabs: r, onTabSelected: a }, i) => {
|
|
2386
|
-
const
|
|
2387
|
-
|
|
2388
|
-
|
|
2399
|
+
const s = yt([]);
|
|
2400
|
+
ze(() => {
|
|
2401
|
+
s.current = s.current.slice(0, r.length);
|
|
2389
2402
|
}, [r]);
|
|
2390
|
-
const
|
|
2403
|
+
const l = (o, p) => {
|
|
2391
2404
|
p.action && p.action(o), a && a(o);
|
|
2392
2405
|
}, c = (o, p) => {
|
|
2393
2406
|
var u, d;
|
|
2394
|
-
e && (p.code === "ArrowLeft" && o !== 0 && ((u =
|
|
2407
|
+
e && (p.code === "ArrowLeft" && o !== 0 && ((u = s.current[o - 1]) == null || u.focus()), p.code === "ArrowRight" && o < r.length - 1 && ((d = s.current[o + 1]) == null || d.focus()), (p.code === "ArrowDown" || p.code === "Space") && l(o, r[o]));
|
|
2395
2408
|
};
|
|
2396
2409
|
return /* @__PURE__ */ t.jsx("div", { className: "pkt-tabs", ref: i, children: /* @__PURE__ */ t.jsx("div", { className: "pkt-tabs__list", role: e ? "tablist" : "navigation", children: r.map((o, p) => /* @__PURE__ */ t.jsx(mn, { children: o.href ? /* @__PURE__ */ t.jsxs(
|
|
2397
2410
|
"a",
|
|
@@ -2402,15 +2415,15 @@ const Tr = V(
|
|
|
2402
2415
|
"aria-controls": o.controls,
|
|
2403
2416
|
className: `pkt-tabs__link ${o.active ? "active" : ""}`,
|
|
2404
2417
|
onKeyUp: (u) => c(p, u),
|
|
2405
|
-
onClick: () =>
|
|
2418
|
+
onClick: () => l(p, o),
|
|
2406
2419
|
tabIndex: o.active || !e ? void 0 : -1,
|
|
2407
2420
|
ref: (u) => {
|
|
2408
|
-
|
|
2421
|
+
s.current[p] = u;
|
|
2409
2422
|
},
|
|
2410
2423
|
children: [
|
|
2411
2424
|
o.icon && /* @__PURE__ */ t.jsx(N, { name: o.icon, className: "pkt-icon--small" }),
|
|
2412
2425
|
o.text,
|
|
2413
|
-
o.tag && /* @__PURE__ */ t.jsx(
|
|
2426
|
+
o.tag && /* @__PURE__ */ t.jsx(Je, { skin: o.tag.skin, size: "small", children: o.tag.text })
|
|
2414
2427
|
]
|
|
2415
2428
|
}
|
|
2416
2429
|
) : /* @__PURE__ */ t.jsxs(
|
|
@@ -2422,28 +2435,28 @@ const Tr = V(
|
|
|
2422
2435
|
"aria-controls": o.controls,
|
|
2423
2436
|
className: `pkt-tabs__button pkt-link-button ${o.active ? "active" : ""}`,
|
|
2424
2437
|
onKeyUp: (u) => c(p, u),
|
|
2425
|
-
onClick: () =>
|
|
2438
|
+
onClick: () => l(p, o),
|
|
2426
2439
|
tabIndex: o.active || !e ? void 0 : -1,
|
|
2427
2440
|
ref: (u) => {
|
|
2428
|
-
|
|
2441
|
+
s.current[p] = u;
|
|
2429
2442
|
},
|
|
2430
2443
|
children: [
|
|
2431
2444
|
o.icon && /* @__PURE__ */ t.jsx(N, { name: o.icon, className: "pkt-icon--small" }),
|
|
2432
2445
|
o.text,
|
|
2433
|
-
o.tag && /* @__PURE__ */ t.jsx(
|
|
2446
|
+
o.tag && /* @__PURE__ */ t.jsx(Je, { skin: o.tag.skin, size: "small", children: o.tag.text })
|
|
2434
2447
|
]
|
|
2435
2448
|
},
|
|
2436
2449
|
"b-" + p
|
|
2437
2450
|
) }, p)) }) });
|
|
2438
2451
|
}
|
|
2439
|
-
),
|
|
2452
|
+
), Dr = V(
|
|
2440
2453
|
({
|
|
2441
2454
|
id: e,
|
|
2442
2455
|
ariaDescribedby: r,
|
|
2443
2456
|
ariaLabelledby: a,
|
|
2444
2457
|
counter: i,
|
|
2445
|
-
counterMaxLength:
|
|
2446
|
-
className:
|
|
2458
|
+
counterMaxLength: s,
|
|
2459
|
+
className: l,
|
|
2447
2460
|
disabled: c,
|
|
2448
2461
|
errorMessage: o,
|
|
2449
2462
|
hasError: p,
|
|
@@ -2464,16 +2477,16 @@ const Tr = V(
|
|
|
2464
2477
|
onChange: W,
|
|
2465
2478
|
...B
|
|
2466
2479
|
}, M) => {
|
|
2467
|
-
const Y = [
|
|
2468
|
-
var Q,
|
|
2469
|
-
if (i &&
|
|
2480
|
+
const Y = [l, "pkt-textinput", "pkt-textarea"].join(" "), z = a || `${e}-label`, K = yt(null), [I, b] = le(0), L = (Z) => {
|
|
2481
|
+
var Q, oe;
|
|
2482
|
+
if (i && b(((oe = (Q = Z.currentTarget) == null ? void 0 : Q.value) == null ? void 0 : oe.length) || 0), W)
|
|
2470
2483
|
return W(Z);
|
|
2471
2484
|
};
|
|
2472
|
-
return
|
|
2485
|
+
return ze(() => {
|
|
2473
2486
|
var Z, Q;
|
|
2474
|
-
typeof M == "function" && M(K.current), i &&
|
|
2487
|
+
typeof M == "function" && M(K.current), i && b(((Q = (Z = K == null ? void 0 : K.current) == null ? void 0 : Z.value) == null ? void 0 : Q.length) || 0);
|
|
2475
2488
|
}, [M]), /* @__PURE__ */ t.jsxs(
|
|
2476
|
-
|
|
2489
|
+
Re,
|
|
2477
2490
|
{
|
|
2478
2491
|
ariaDescribedby: r,
|
|
2479
2492
|
className: Y,
|
|
@@ -2496,7 +2509,7 @@ const Tr = V(
|
|
|
2496
2509
|
"textarea",
|
|
2497
2510
|
{
|
|
2498
2511
|
ref: K,
|
|
2499
|
-
className: `pkt-input ${C ? "pkt-input--fullwidth" : ""} ${
|
|
2512
|
+
className: `pkt-input ${C ? "pkt-input--fullwidth" : ""} ${s && I > s ? "pkt-input--counter-error" : ""}`,
|
|
2500
2513
|
name: S || e,
|
|
2501
2514
|
id: e,
|
|
2502
2515
|
placeholder: y,
|
|
@@ -2510,21 +2523,21 @@ const Tr = V(
|
|
|
2510
2523
|
}
|
|
2511
2524
|
),
|
|
2512
2525
|
i && /* @__PURE__ */ t.jsxs("div", { className: "pkt-input__counter", "aria-live": "polite", "aria-atomic": !0, children: [
|
|
2513
|
-
|
|
2514
|
-
|
|
2526
|
+
I || 0,
|
|
2527
|
+
s && `/${s}`
|
|
2515
2528
|
] })
|
|
2516
2529
|
]
|
|
2517
2530
|
}
|
|
2518
2531
|
);
|
|
2519
2532
|
}
|
|
2520
|
-
),
|
|
2533
|
+
), Ir = V(
|
|
2521
2534
|
({
|
|
2522
2535
|
id: e,
|
|
2523
2536
|
ariaDescribedby: r,
|
|
2524
2537
|
ariaLabelledby: a,
|
|
2525
2538
|
autocomplete: i = "off",
|
|
2526
|
-
className:
|
|
2527
|
-
disabled:
|
|
2539
|
+
className: s,
|
|
2540
|
+
disabled: l = !1,
|
|
2528
2541
|
errorMessage: c,
|
|
2529
2542
|
hasError: o = !1,
|
|
2530
2543
|
helptext: p,
|
|
@@ -2548,13 +2561,13 @@ const Tr = V(
|
|
|
2548
2561
|
value: Y,
|
|
2549
2562
|
...z
|
|
2550
2563
|
}, K) => {
|
|
2551
|
-
const
|
|
2564
|
+
const I = [s, "pkt-textinput"].join(" "), b = a || `${e}-label`, L = W === "search" && !h && !M;
|
|
2552
2565
|
return /* @__PURE__ */ t.jsx(
|
|
2553
|
-
|
|
2566
|
+
Re,
|
|
2554
2567
|
{
|
|
2555
2568
|
ariaDescribedby: r,
|
|
2556
|
-
className:
|
|
2557
|
-
disabled:
|
|
2569
|
+
className: I,
|
|
2570
|
+
disabled: l,
|
|
2558
2571
|
errorMessage: c,
|
|
2559
2572
|
forId: e,
|
|
2560
2573
|
hasError: o,
|
|
@@ -2581,10 +2594,10 @@ const Tr = V(
|
|
|
2581
2594
|
placeholder: y,
|
|
2582
2595
|
autoComplete: i,
|
|
2583
2596
|
value: Y,
|
|
2584
|
-
disabled:
|
|
2597
|
+
disabled: l,
|
|
2585
2598
|
"aria-invalid": o,
|
|
2586
2599
|
"aria-errormessage": `${e}-error`,
|
|
2587
|
-
"aria-labelledby":
|
|
2600
|
+
"aria-labelledby": b,
|
|
2588
2601
|
...z
|
|
2589
2602
|
}
|
|
2590
2603
|
),
|
|
@@ -2602,28 +2615,31 @@ const Tr = V(
|
|
|
2602
2615
|
);
|
|
2603
2616
|
export {
|
|
2604
2617
|
jn as PktAlert,
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2618
|
+
_r as PktBackLink,
|
|
2619
|
+
br as PktBreadcrumbs,
|
|
2620
|
+
de as PktButton,
|
|
2608
2621
|
pr as PktCheckbox,
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2622
|
+
xr as PktFooter,
|
|
2623
|
+
gr as PktFooterSimple,
|
|
2624
|
+
Nr as PktHeader,
|
|
2612
2625
|
N as PktIcon,
|
|
2613
2626
|
Nn as PktIconContext,
|
|
2614
2627
|
dr as PktInput,
|
|
2615
|
-
|
|
2628
|
+
Re as PktInputWrapper,
|
|
2616
2629
|
mr as PktLinkCard,
|
|
2617
|
-
|
|
2618
|
-
|
|
2630
|
+
jr as PktLoader,
|
|
2631
|
+
yr as PktMessagebox,
|
|
2619
2632
|
hr as PktRadioButton,
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2633
|
+
wr as PktSearchInput,
|
|
2634
|
+
Er as PktSelect,
|
|
2635
|
+
Cr as PktTable,
|
|
2636
|
+
Or as PktTableBody,
|
|
2637
|
+
Rr as PktTableDataCell,
|
|
2624
2638
|
Sr as PktTableHeader,
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2639
|
+
Pr as PktTableHeaderCell,
|
|
2640
|
+
Tr as PktTableRow,
|
|
2641
|
+
$r as PktTabs,
|
|
2642
|
+
Je as PktTag,
|
|
2643
|
+
Dr as PktTextarea,
|
|
2644
|
+
Ir as PktTextinput
|
|
2629
2645
|
};
|