@oslokommune/punkt-react 3.4.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/index.d.ts +1 -1
- package/dist/punkt-react.es.js +166 -169
- package/dist/punkt-react.umd.js +8 -8
- package/package.json +2 -2
- package/src/components/alert/Alert.tsx +1 -0
- package/src/components/header/Header.tsx +1 -2
- package/src/components/index.ts +1 -1
- package/src/components/linkcard/LinkCard.test.tsx +4 -4
- package/src/components/messagebox/Messagebox.tsx +1 -1
- package/src/components/radioGroup/RadioGroup.tsx +1 -0
- package/src/components/table/Table.test.tsx +1 -1
- package/src/components/table/Table.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [3.4.1](https://github.com/oslokommune/punkt/compare/3.4.0...3.4.1) (2023-05-04)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
* [828](https://github.com/oslokommune/punkt/issues/828) Fiks lint i react.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
8
26
|
## [3.4.0](https://github.com/oslokommune/punkt/compare/3.3.1...3.4.0) (2023-05-04)
|
|
9
27
|
|
|
10
28
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ export { PktHeader } from './header/Header';
|
|
|
4
4
|
export { PktInput } from './input/Input';
|
|
5
5
|
export { PktLinkCard } from './linkcard/LinkCard';
|
|
6
6
|
export { PktMessagebox } from './messagebox/Messagebox';
|
|
7
|
-
export { PktTextarea } from './textarea/Textarea';
|
|
8
7
|
export { PktRadio } from './radio/Radio';
|
|
9
8
|
export { PktRadioGroup } from './radioGroup/RadioGroup';
|
|
10
9
|
export { PktTable } from './table/Table';
|
|
11
10
|
export { PktTableData } from './table/TableData';
|
|
12
11
|
export { PktTableHeader } from './table/TableHeader';
|
|
12
|
+
export { PktTextarea } from './textarea/Textarea';
|
package/dist/punkt-react.es.js
CHANGED
|
@@ -21,18 +21,18 @@ function vr() {
|
|
|
21
21
|
if (we)
|
|
22
22
|
return I;
|
|
23
23
|
we = 1;
|
|
24
|
-
var i = re,
|
|
25
|
-
function _(k, m,
|
|
26
|
-
var g,
|
|
27
|
-
|
|
24
|
+
var i = re, c = Symbol.for("react.element"), s = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, p = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
25
|
+
function _(k, m, x) {
|
|
26
|
+
var g, P = {}, w = null, L = null;
|
|
27
|
+
x !== void 0 && (w = "" + x), m.key !== void 0 && (w = "" + m.key), m.ref !== void 0 && (L = m.ref);
|
|
28
28
|
for (g in m)
|
|
29
|
-
|
|
29
|
+
l.call(m, g) && !f.hasOwnProperty(g) && (P[g] = m[g]);
|
|
30
30
|
if (k && k.defaultProps)
|
|
31
31
|
for (g in m = k.defaultProps, m)
|
|
32
|
-
|
|
33
|
-
return { $$typeof:
|
|
32
|
+
P[g] === void 0 && (P[g] = m[g]);
|
|
33
|
+
return { $$typeof: c, type: k, key: w, ref: L, props: P, _owner: p.current };
|
|
34
34
|
}
|
|
35
|
-
return I.Fragment =
|
|
35
|
+
return I.Fragment = s, I.jsx = _, I.jsxs = _, I;
|
|
36
36
|
}
|
|
37
37
|
var W = {};
|
|
38
38
|
/**
|
|
@@ -47,7 +47,7 @@ var W = {};
|
|
|
47
47
|
var Oe;
|
|
48
48
|
function mr() {
|
|
49
49
|
return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
|
-
var i = re,
|
|
50
|
+
var i = re, c = Symbol.for("react.element"), s = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), _ = Symbol.for("react.provider"), k = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), L = Symbol.for("react.offscreen"), ae = Symbol.iterator, Ce = "@@iterator";
|
|
51
51
|
function je(e) {
|
|
52
52
|
if (e === null || typeof e != "object")
|
|
53
53
|
return null;
|
|
@@ -66,8 +66,8 @@ function mr() {
|
|
|
66
66
|
{
|
|
67
67
|
var a = j.ReactDebugCurrentFrame, d = a.getStackAddendum();
|
|
68
68
|
d !== "" && (r += "%s", t = t.concat([d]));
|
|
69
|
-
var v = t.map(function(
|
|
70
|
-
return String(
|
|
69
|
+
var v = t.map(function(u) {
|
|
70
|
+
return String(u);
|
|
71
71
|
});
|
|
72
72
|
v.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, v);
|
|
73
73
|
}
|
|
@@ -75,7 +75,7 @@ function mr() {
|
|
|
75
75
|
var De = !1, Ae = !1, $e = !1, Ie = !1, We = !1, ne;
|
|
76
76
|
ne = Symbol.for("react.module.reference");
|
|
77
77
|
function Ye(e) {
|
|
78
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
78
|
+
return !!(typeof e == "string" || typeof e == "function" || e === l || e === f || We || e === p || e === x || e === g || Ie || e === L || De || Ae || $e || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === P || e.$$typeof === _ || e.$$typeof === k || e.$$typeof === m || // This needs to include all possible module reference object
|
|
79
79
|
// types supported by any Flight configuration anywhere since
|
|
80
80
|
// we don't know which Flight build this will end up being used
|
|
81
81
|
// with.
|
|
@@ -99,15 +99,15 @@ function mr() {
|
|
|
99
99
|
if (typeof e == "string")
|
|
100
100
|
return e;
|
|
101
101
|
switch (e) {
|
|
102
|
-
case
|
|
102
|
+
case l:
|
|
103
103
|
return "Fragment";
|
|
104
|
-
case
|
|
104
|
+
case s:
|
|
105
105
|
return "Portal";
|
|
106
106
|
case f:
|
|
107
107
|
return "Profiler";
|
|
108
108
|
case p:
|
|
109
109
|
return "StrictMode";
|
|
110
|
-
case
|
|
110
|
+
case x:
|
|
111
111
|
return "Suspense";
|
|
112
112
|
case g:
|
|
113
113
|
return "SuspenseList";
|
|
@@ -122,13 +122,13 @@ function mr() {
|
|
|
122
122
|
return ie(t._context) + ".Provider";
|
|
123
123
|
case m:
|
|
124
124
|
return Le(e, e.render, "ForwardRef");
|
|
125
|
-
case
|
|
125
|
+
case P:
|
|
126
126
|
var a = e.displayName || null;
|
|
127
127
|
return a !== null ? a : O(e.type) || "Memo";
|
|
128
128
|
case w: {
|
|
129
|
-
var d = e, v = d._payload,
|
|
129
|
+
var d = e, v = d._payload, u = d._init;
|
|
130
130
|
try {
|
|
131
|
-
return O(
|
|
131
|
+
return O(u(v));
|
|
132
132
|
} catch {
|
|
133
133
|
return null;
|
|
134
134
|
}
|
|
@@ -233,27 +233,27 @@ function mr() {
|
|
|
233
233
|
v = G.current, G.current = null, Be();
|
|
234
234
|
try {
|
|
235
235
|
if (r) {
|
|
236
|
-
var
|
|
236
|
+
var u = function() {
|
|
237
237
|
throw Error();
|
|
238
238
|
};
|
|
239
|
-
if (Object.defineProperty(
|
|
239
|
+
if (Object.defineProperty(u.prototype, "props", {
|
|
240
240
|
set: function() {
|
|
241
241
|
throw Error();
|
|
242
242
|
}
|
|
243
243
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
244
244
|
try {
|
|
245
|
-
Reflect.construct(
|
|
245
|
+
Reflect.construct(u, []);
|
|
246
246
|
} catch (S) {
|
|
247
247
|
a = S;
|
|
248
248
|
}
|
|
249
|
-
Reflect.construct(e, [],
|
|
249
|
+
Reflect.construct(e, [], u);
|
|
250
250
|
} else {
|
|
251
251
|
try {
|
|
252
|
-
|
|
252
|
+
u.call();
|
|
253
253
|
} catch (S) {
|
|
254
254
|
a = S;
|
|
255
255
|
}
|
|
256
|
-
e.call(
|
|
256
|
+
e.call(u.prototype);
|
|
257
257
|
}
|
|
258
258
|
} else {
|
|
259
259
|
try {
|
|
@@ -265,18 +265,18 @@ function mr() {
|
|
|
265
265
|
}
|
|
266
266
|
} catch (S) {
|
|
267
267
|
if (S && a && typeof S.stack == "string") {
|
|
268
|
-
for (var
|
|
268
|
+
for (var o = S.stack.split(`
|
|
269
269
|
`), R = a.stack.split(`
|
|
270
|
-
`), h =
|
|
270
|
+
`), h = o.length - 1, b = R.length - 1; h >= 1 && b >= 0 && o[h] !== R[b]; )
|
|
271
271
|
b--;
|
|
272
272
|
for (; h >= 1 && b >= 0; h--, b--)
|
|
273
|
-
if (
|
|
273
|
+
if (o[h] !== R[b]) {
|
|
274
274
|
if (h !== 1 || b !== 1)
|
|
275
275
|
do
|
|
276
|
-
if (h--, b--, b < 0 ||
|
|
277
|
-
var
|
|
278
|
-
` +
|
|
279
|
-
return e.displayName &&
|
|
276
|
+
if (h--, b--, b < 0 || o[h] !== R[b]) {
|
|
277
|
+
var N = `
|
|
278
|
+
` + o[h].replace(" at new ", " at ");
|
|
279
|
+
return e.displayName && N.includes("<anonymous>") && (N = N.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, N), N;
|
|
280
280
|
}
|
|
281
281
|
while (h >= 1 && b >= 0);
|
|
282
282
|
break;
|
|
@@ -303,7 +303,7 @@ function mr() {
|
|
|
303
303
|
if (typeof e == "string")
|
|
304
304
|
return B(e);
|
|
305
305
|
switch (e) {
|
|
306
|
-
case
|
|
306
|
+
case x:
|
|
307
307
|
return B("Suspense");
|
|
308
308
|
case g:
|
|
309
309
|
return B("SuspenseList");
|
|
@@ -312,7 +312,7 @@ function mr() {
|
|
|
312
312
|
switch (e.$$typeof) {
|
|
313
313
|
case m:
|
|
314
314
|
return Ue(e.render);
|
|
315
|
-
case
|
|
315
|
+
case P:
|
|
316
316
|
return V(e.type, r, t);
|
|
317
317
|
case w: {
|
|
318
318
|
var a = e, d = a._payload, v = a._init;
|
|
@@ -335,19 +335,19 @@ function mr() {
|
|
|
335
335
|
function Ge(e, r, t, a, d) {
|
|
336
336
|
{
|
|
337
337
|
var v = Function.call.bind(U);
|
|
338
|
-
for (var
|
|
339
|
-
if (v(e,
|
|
340
|
-
var
|
|
338
|
+
for (var u in e)
|
|
339
|
+
if (v(e, u)) {
|
|
340
|
+
var o = void 0;
|
|
341
341
|
try {
|
|
342
|
-
if (typeof e[
|
|
343
|
-
var R = Error((a || "React class") + ": " + t + " type `" +
|
|
342
|
+
if (typeof e[u] != "function") {
|
|
343
|
+
var R = Error((a || "React class") + ": " + t + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
344
344
|
throw R.name = "Invariant Violation", R;
|
|
345
345
|
}
|
|
346
|
-
|
|
346
|
+
o = e[u](r, u, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
347
347
|
} catch (h) {
|
|
348
|
-
|
|
348
|
+
o = h;
|
|
349
349
|
}
|
|
350
|
-
|
|
350
|
+
o && !(o instanceof Error) && (q(d), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", t, u, typeof o), q(null)), o instanceof Error && !(o.message in me) && (me[o.message] = !0, q(d), E("Failed %s type: %s", t, o.message), q(null));
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
}
|
|
@@ -426,51 +426,51 @@ function mr() {
|
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
var tr = function(e, r, t, a, d, v,
|
|
430
|
-
var
|
|
429
|
+
var tr = function(e, r, t, a, d, v, u) {
|
|
430
|
+
var o = {
|
|
431
431
|
// This tag allows us to uniquely identify this as a React Element
|
|
432
|
-
$$typeof:
|
|
432
|
+
$$typeof: c,
|
|
433
433
|
// Built-in properties that belong on the element
|
|
434
434
|
type: e,
|
|
435
435
|
key: r,
|
|
436
436
|
ref: t,
|
|
437
|
-
props:
|
|
437
|
+
props: u,
|
|
438
438
|
// Record the component responsible for creating this element.
|
|
439
439
|
_owner: v
|
|
440
440
|
};
|
|
441
|
-
return
|
|
441
|
+
return o._store = {}, Object.defineProperty(o._store, "validated", {
|
|
442
442
|
configurable: !1,
|
|
443
443
|
enumerable: !1,
|
|
444
444
|
writable: !0,
|
|
445
445
|
value: !1
|
|
446
|
-
}), Object.defineProperty(
|
|
446
|
+
}), Object.defineProperty(o, "_self", {
|
|
447
447
|
configurable: !1,
|
|
448
448
|
enumerable: !1,
|
|
449
449
|
writable: !1,
|
|
450
450
|
value: a
|
|
451
|
-
}), Object.defineProperty(
|
|
451
|
+
}), Object.defineProperty(o, "_source", {
|
|
452
452
|
configurable: !1,
|
|
453
453
|
enumerable: !1,
|
|
454
454
|
writable: !1,
|
|
455
455
|
value: d
|
|
456
|
-
}), Object.freeze && (Object.freeze(
|
|
456
|
+
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
457
457
|
};
|
|
458
458
|
function ar(e, r, t, a, d) {
|
|
459
459
|
{
|
|
460
|
-
var v,
|
|
461
|
-
t !== void 0 && (_e(t),
|
|
460
|
+
var v, u = {}, o = null, R = null;
|
|
461
|
+
t !== void 0 && (_e(t), o = "" + t), Ze(r) && (_e(r.key), o = "" + r.key), Xe(r) && (R = r.ref, Qe(r, d));
|
|
462
462
|
for (v in r)
|
|
463
|
-
U.call(r, v) && !Ke.hasOwnProperty(v) && (
|
|
463
|
+
U.call(r, v) && !Ke.hasOwnProperty(v) && (u[v] = r[v]);
|
|
464
464
|
if (e && e.defaultProps) {
|
|
465
465
|
var h = e.defaultProps;
|
|
466
466
|
for (v in h)
|
|
467
|
-
|
|
467
|
+
u[v] === void 0 && (u[v] = h[v]);
|
|
468
468
|
}
|
|
469
|
-
if (
|
|
469
|
+
if (o || R) {
|
|
470
470
|
var b = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
471
|
-
|
|
471
|
+
o && er(u, b), R && rr(u, b);
|
|
472
472
|
}
|
|
473
|
-
return tr(e,
|
|
473
|
+
return tr(e, o, R, d, a, $.current, u);
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
476
|
var X = j.ReactCurrentOwner, ye = j.ReactDebugCurrentFrame;
|
|
@@ -484,7 +484,7 @@ function mr() {
|
|
|
484
484
|
var Z;
|
|
485
485
|
Z = !1;
|
|
486
486
|
function Q(e) {
|
|
487
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
487
|
+
return typeof e == "object" && e !== null && e.$$typeof === c;
|
|
488
488
|
}
|
|
489
489
|
function Ee() {
|
|
490
490
|
{
|
|
@@ -549,8 +549,8 @@ Check the top-level render call using <` + t + ">.");
|
|
|
549
549
|
else if (e) {
|
|
550
550
|
var d = je(e);
|
|
551
551
|
if (typeof d == "function" && d !== e.entries)
|
|
552
|
-
for (var v = d.call(e),
|
|
553
|
-
Q(
|
|
552
|
+
for (var v = d.call(e), u; !(u = v.next()).done; )
|
|
553
|
+
Q(u.value) && xe(u.value, r);
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
}
|
|
@@ -564,7 +564,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
564
564
|
t = r.propTypes;
|
|
565
565
|
else if (typeof r == "object" && (r.$$typeof === m || // Note: Memo only checks outer props here.
|
|
566
566
|
// Inner props are checked in the reconciler.
|
|
567
|
-
r.$$typeof ===
|
|
567
|
+
r.$$typeof === P))
|
|
568
568
|
t = r.propTypes;
|
|
569
569
|
else
|
|
570
570
|
return;
|
|
@@ -593,32 +593,32 @@ Check the top-level render call using <` + t + ">.");
|
|
|
593
593
|
}
|
|
594
594
|
function Pe(e, r, t, a, d, v) {
|
|
595
595
|
{
|
|
596
|
-
var
|
|
597
|
-
if (!
|
|
598
|
-
var
|
|
599
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
596
|
+
var u = Ye(e);
|
|
597
|
+
if (!u) {
|
|
598
|
+
var o = "";
|
|
599
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
600
600
|
var R = nr(d);
|
|
601
|
-
R ?
|
|
601
|
+
R ? o += R : o += Ee();
|
|
602
602
|
var h;
|
|
603
|
-
e === null ? h = "null" : H(e) ? h = "array" : e !== void 0 && e.$$typeof ===
|
|
603
|
+
e === null ? h = "null" : H(e) ? h = "array" : e !== void 0 && e.$$typeof === c ? (h = "<" + (O(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : h = typeof e, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", h, o);
|
|
604
604
|
}
|
|
605
605
|
var b = ar(e, r, t, d, v);
|
|
606
606
|
if (b == null)
|
|
607
607
|
return b;
|
|
608
|
-
if (
|
|
609
|
-
var
|
|
610
|
-
if (
|
|
608
|
+
if (u) {
|
|
609
|
+
var N = r.children;
|
|
610
|
+
if (N !== void 0)
|
|
611
611
|
if (a)
|
|
612
|
-
if (H(
|
|
613
|
-
for (var D = 0; D <
|
|
614
|
-
Ne(
|
|
615
|
-
Object.freeze && Object.freeze(
|
|
612
|
+
if (H(N)) {
|
|
613
|
+
for (var D = 0; D < N.length; D++)
|
|
614
|
+
Ne(N[D], e);
|
|
615
|
+
Object.freeze && Object.freeze(N);
|
|
616
616
|
} else
|
|
617
617
|
E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
618
618
|
else
|
|
619
|
-
Ne(
|
|
619
|
+
Ne(N, e);
|
|
620
620
|
}
|
|
621
|
-
return e ===
|
|
621
|
+
return e === l ? sr(b) : or(b), b;
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
function lr(e, r, t) {
|
|
@@ -628,7 +628,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
628
628
|
return Pe(e, r, t, !1);
|
|
629
629
|
}
|
|
630
630
|
var ur = cr, fr = lr;
|
|
631
|
-
W.Fragment =
|
|
631
|
+
W.Fragment = l, W.jsx = ur, W.jsxs = fr;
|
|
632
632
|
}()), W;
|
|
633
633
|
}
|
|
634
634
|
(function(i) {
|
|
@@ -636,29 +636,29 @@ Check the top-level render call using <` + t + ">.");
|
|
|
636
636
|
})(pr);
|
|
637
637
|
const Se = Y.Fragment, n = Y.jsx, y = Y.jsxs, T = ({
|
|
638
638
|
className: i,
|
|
639
|
-
name:
|
|
640
|
-
viewBox:
|
|
641
|
-
...
|
|
639
|
+
name: c,
|
|
640
|
+
viewBox: s = "0 0 32 32",
|
|
641
|
+
...l
|
|
642
642
|
}) => {
|
|
643
643
|
const p = [i].filter(Boolean).join(" ");
|
|
644
|
-
return /* @__PURE__ */ n("svg", { ...
|
|
644
|
+
return /* @__PURE__ */ n("svg", { ...l, className: p, viewBox: s, children: /* @__PURE__ */ n("use", { href: `#${c}` }) });
|
|
645
645
|
}, xr = ({
|
|
646
646
|
children: i,
|
|
647
|
-
className:
|
|
648
|
-
skin:
|
|
649
|
-
closeAlert:
|
|
647
|
+
className: c,
|
|
648
|
+
skin: s = "info",
|
|
649
|
+
closeAlert: l = !1,
|
|
650
650
|
onClose: p,
|
|
651
651
|
title: f,
|
|
652
652
|
date: _,
|
|
653
653
|
ariaLive: k = "polite",
|
|
654
654
|
...m
|
|
655
655
|
}) => {
|
|
656
|
-
const
|
|
657
|
-
|
|
656
|
+
const x = [c, "pkt-alert", s && `pkt-alert--${s}`].filter(Boolean).join(" "), [g, P] = dr(!0), w = () => {
|
|
657
|
+
P(!1), p && p();
|
|
658
658
|
};
|
|
659
|
-
return g ? /* @__PURE__ */ y("div", { ...m, className:
|
|
660
|
-
/* @__PURE__ */ n("div", { className: "pkt-alert__icon", children: /* @__PURE__ */ n(T, { name:
|
|
661
|
-
|
|
659
|
+
return g ? /* @__PURE__ */ y("div", { ...m, className: x, "aria-live": k, children: [
|
|
660
|
+
/* @__PURE__ */ n("div", { className: "pkt-alert__icon", children: /* @__PURE__ */ n(T, { name: s === "info" ? "alert-information" : `alert-${s}` }) }),
|
|
661
|
+
l && /* @__PURE__ */ n("div", { className: "pkt-alert__close", children: /* @__PURE__ */ n(
|
|
662
662
|
"button",
|
|
663
663
|
{
|
|
664
664
|
className: "pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",
|
|
@@ -678,46 +678,44 @@ const Se = Y.Fragment, n = Y.jsx, y = Y.jsxs, T = ({
|
|
|
678
678
|
}, hr = te(
|
|
679
679
|
({
|
|
680
680
|
children: i,
|
|
681
|
-
className:
|
|
682
|
-
iconName:
|
|
683
|
-
secondIconName:
|
|
681
|
+
className: c,
|
|
682
|
+
iconName: s = "user",
|
|
683
|
+
secondIconName: l = "user",
|
|
684
684
|
size: p = "medium",
|
|
685
685
|
skin: f = "primary",
|
|
686
686
|
type: _ = "button",
|
|
687
687
|
variant: k = "label-only",
|
|
688
688
|
...m
|
|
689
|
-
},
|
|
689
|
+
}, x) => {
|
|
690
690
|
const g = [
|
|
691
|
-
|
|
691
|
+
c,
|
|
692
692
|
"pkt-btn",
|
|
693
693
|
p && `pkt-btn--${p}`,
|
|
694
694
|
f && `pkt-btn--${f}`,
|
|
695
695
|
k && `pkt-btn--${k}`
|
|
696
696
|
].filter(Boolean).join(" ");
|
|
697
|
-
return /* @__PURE__ */ y("button", { ...m, className: g, type: _, ref:
|
|
698
|
-
/* @__PURE__ */ n(T, { className: "pkt-btn__icon", name:
|
|
697
|
+
return /* @__PURE__ */ y("button", { ...m, className: g, type: _, ref: x, children: [
|
|
698
|
+
/* @__PURE__ */ n(T, { className: "pkt-btn__icon", name: s }),
|
|
699
699
|
/* @__PURE__ */ n("span", { className: "pkt-btn__text", children: i }),
|
|
700
|
-
k === "icons-right-and-left" && /* @__PURE__ */ n(T, { className: "pkt-btn__icon", name:
|
|
700
|
+
k === "icons-right-and-left" && /* @__PURE__ */ n(T, { className: "pkt-btn__icon", name: l })
|
|
701
701
|
] });
|
|
702
702
|
}
|
|
703
703
|
);
|
|
704
704
|
hr.displayName = "PktButton";
|
|
705
705
|
const Nr = ({
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
onChangeRepresentation: N,
|
|
716
|
-
...g
|
|
706
|
+
className: i,
|
|
707
|
+
logoLink: c = "https://www.oslo.kommune.no/",
|
|
708
|
+
isLoggedIn: s = !1,
|
|
709
|
+
representing: l = "",
|
|
710
|
+
canChangeRepresentation: p = !1,
|
|
711
|
+
showLogInButton: f = !0,
|
|
712
|
+
onLogIn: _,
|
|
713
|
+
onLogOut: k,
|
|
714
|
+
onChangeRepresentation: m
|
|
717
715
|
}) => {
|
|
718
|
-
const x = [
|
|
716
|
+
const x = [i, "pkt-header"].filter(Boolean).join(" ");
|
|
719
717
|
return /* @__PURE__ */ y("header", { id: "pkt-header", className: x, "aria-label": "Topp", children: [
|
|
720
|
-
/* @__PURE__ */ n("div", { className: "pkt-header__logo", children: /* @__PURE__ */ n("a", { "aria-label": "Tilbake til forside", className: "pkt-header__logo-link", href:
|
|
718
|
+
/* @__PURE__ */ n("div", { className: "pkt-header__logo", children: /* @__PURE__ */ n("a", { "aria-label": "Tilbake til forside", className: "pkt-header__logo-link", href: c, children: /* @__PURE__ */ n(
|
|
721
719
|
T,
|
|
722
720
|
{
|
|
723
721
|
name: "oslologo",
|
|
@@ -727,42 +725,42 @@ const Nr = ({
|
|
|
727
725
|
}
|
|
728
726
|
) }) }),
|
|
729
727
|
/* @__PURE__ */ y("div", { className: "pkt-header__actions", children: [
|
|
730
|
-
|
|
728
|
+
s && p && /* @__PURE__ */ y(
|
|
731
729
|
"button",
|
|
732
730
|
{
|
|
733
731
|
className: "pkt-btn pkt-btn--secondary pkt-btn--icon-right",
|
|
734
|
-
"aria-label": `Bytt bruker fra ${
|
|
735
|
-
onClick:
|
|
732
|
+
"aria-label": `Bytt bruker fra ${l}`,
|
|
733
|
+
onClick: m,
|
|
736
734
|
children: [
|
|
737
735
|
/* @__PURE__ */ n(T, { name: "user", className: "pkt-btn__icon pkt-show-tablet-up" }),
|
|
738
736
|
/* @__PURE__ */ n("span", { className: "pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15", children: "Endre" }),
|
|
739
737
|
/* @__PURE__ */ n("span", { className: "pkt-btn__text pkt-hide-tablet-up", children: "Endre" }),
|
|
740
|
-
/* @__PURE__ */ n("span", { className: "pkt-btn__text--representing pkt-hide pkt-show-tablet-up", children:
|
|
738
|
+
/* @__PURE__ */ n("span", { className: "pkt-btn__text--representing pkt-hide pkt-show-tablet-up", children: l })
|
|
741
739
|
]
|
|
742
740
|
}
|
|
743
741
|
),
|
|
744
|
-
|
|
745
|
-
/* @__PURE__ */ n("span", { className: "pkt-header__action-text", children: /* @__PURE__ */ n("span", { className: "pkt-btn__text pkt-header__action-textrow text-row-inline pkt-truncate-text", children:
|
|
742
|
+
s && !p && /* @__PURE__ */ y("div", { className: "pkt-header__action", children: [
|
|
743
|
+
/* @__PURE__ */ n("span", { className: "pkt-header__action-text", children: /* @__PURE__ */ n("span", { className: "pkt-btn__text pkt-header__action-textrow text-row-inline pkt-truncate-text", children: l }) }),
|
|
746
744
|
/* @__PURE__ */ n("span", { className: "pkt-header__action-icon pkt-show-phablet-up", children: /* @__PURE__ */ n(T, { name: "user" }) })
|
|
747
745
|
] }),
|
|
748
|
-
|
|
746
|
+
f && s && /* @__PURE__ */ y(
|
|
749
747
|
"button",
|
|
750
748
|
{
|
|
751
749
|
className: "pkt-btn pkt-btn--tertiary pkt-btn--icon-right",
|
|
752
750
|
"aria-label": "Logg ut",
|
|
753
|
-
onClick:
|
|
751
|
+
onClick: k,
|
|
754
752
|
children: [
|
|
755
753
|
/* @__PURE__ */ n(T, { className: "pkt-btn__icon pkt-show-tablet-up", name: "exit" }),
|
|
756
754
|
/* @__PURE__ */ n("span", { className: "pkt-btn__text", children: "Logg ut" })
|
|
757
755
|
]
|
|
758
756
|
}
|
|
759
757
|
),
|
|
760
|
-
|
|
758
|
+
f && !s && /* @__PURE__ */ y(
|
|
761
759
|
"button",
|
|
762
760
|
{
|
|
763
761
|
className: "pkt-btn pkt-btn--tertiary pkt-btn--icon-right",
|
|
764
762
|
"aria-label": "Logg inn",
|
|
765
|
-
onClick:
|
|
763
|
+
onClick: _,
|
|
766
764
|
children: [
|
|
767
765
|
/* @__PURE__ */ n(T, { className: "pkt-btn__icon", name: "user" }),
|
|
768
766
|
/* @__PURE__ */ n("span", { className: "pkt-btn__text", children: "Logg inn" })
|
|
@@ -772,24 +770,24 @@ const Nr = ({
|
|
|
772
770
|
] })
|
|
773
771
|
] });
|
|
774
772
|
}, br = re.forwardRef(
|
|
775
|
-
({ label: i, id:
|
|
776
|
-
/* @__PURE__ */ n("label", { htmlFor:
|
|
777
|
-
/* @__PURE__ */ n("input", { className: "pkt-form-input", id:
|
|
778
|
-
|
|
773
|
+
({ label: i, id: c, children: s, ...l }, p) => /* @__PURE__ */ y("div", { className: "pkt-form-group", children: [
|
|
774
|
+
/* @__PURE__ */ n("label", { htmlFor: c, className: "pkt-form-label", children: i }),
|
|
775
|
+
/* @__PURE__ */ n("input", { className: "pkt-form-input", id: c, ...l, ref: p }),
|
|
776
|
+
s
|
|
779
777
|
] })
|
|
780
778
|
);
|
|
781
779
|
br.displayName = "PktInput";
|
|
782
780
|
const Pr = ({
|
|
783
781
|
children: i,
|
|
784
|
-
className:
|
|
785
|
-
iconName:
|
|
786
|
-
skin:
|
|
782
|
+
className: c,
|
|
783
|
+
iconName: s = "user",
|
|
784
|
+
skin: l = "",
|
|
787
785
|
href: p = "#",
|
|
788
786
|
title: f
|
|
789
787
|
}) => {
|
|
790
|
-
const _ = [
|
|
788
|
+
const _ = [c, "pkt-linkcard", l && `pkt-linkcard--${l}`].filter(Boolean).join(" ");
|
|
791
789
|
return /* @__PURE__ */ y("a", { href: p, className: `pkt-linkcard pkt-link ${_}`, children: [
|
|
792
|
-
/* @__PURE__ */ n(T, { className: "pkt-link__icon", name:
|
|
790
|
+
/* @__PURE__ */ n(T, { className: "pkt-link__icon", name: s }),
|
|
793
791
|
/* @__PURE__ */ y("div", { className: "pkt-linkcard__content", children: [
|
|
794
792
|
/* @__PURE__ */ n("div", { className: "pkt-linkcard__title", children: f }),
|
|
795
793
|
/* @__PURE__ */ n("div", { className: "pkt-linkcard__text", children: i })
|
|
@@ -797,34 +795,27 @@ const Pr = ({
|
|
|
797
795
|
] });
|
|
798
796
|
}, Tr = ({
|
|
799
797
|
children: i,
|
|
800
|
-
skin:
|
|
801
|
-
title:
|
|
802
|
-
...
|
|
798
|
+
skin: c = "beige",
|
|
799
|
+
title: s,
|
|
800
|
+
...l
|
|
803
801
|
}) => {
|
|
804
|
-
const p = ["pkt-messagebox",
|
|
805
|
-
return /* @__PURE__ */ y("div", { ...
|
|
806
|
-
/* @__PURE__ */ n("div", { className: "pkt-messagebox__title", children:
|
|
802
|
+
const p = ["pkt-messagebox", c && `pkt-messagebox--${c}`].filter(Boolean).join(" ");
|
|
803
|
+
return /* @__PURE__ */ y("div", { ...l, className: p, children: [
|
|
804
|
+
/* @__PURE__ */ n("div", { className: "pkt-messagebox__title", children: s }),
|
|
807
805
|
/* @__PURE__ */ n("div", { className: "pkt-messagebox__text", children: i })
|
|
808
806
|
] });
|
|
809
807
|
}, _r = te(
|
|
810
|
-
({ id: i, label: l, ...
|
|
811
|
-
/* @__PURE__ */ n("
|
|
812
|
-
/* @__PURE__ */ n("
|
|
813
|
-
] })
|
|
814
|
-
);
|
|
815
|
-
_r.displayName = "PktTextarea";
|
|
816
|
-
const kr = te(
|
|
817
|
-
({ id: i, name: l, label: u, value: o, ...p }, f) => /* @__PURE__ */ y("div", { className: "pkt-form-group", children: [
|
|
818
|
-
/* @__PURE__ */ n("input", { type: "radio", className: "pkt-form-check-input", id: i, name: l, value: o, ref: f, ...p }),
|
|
819
|
-
/* @__PURE__ */ n("label", { className: "pkt-form-label", htmlFor: i, children: u })
|
|
808
|
+
({ id: i, name: c, label: s, value: l, ...p }, f) => /* @__PURE__ */ y("div", { className: "pkt-form-group", children: [
|
|
809
|
+
/* @__PURE__ */ n("input", { type: "radio", className: "pkt-form-check-input", id: i, name: c, value: l, ref: f, ...p }),
|
|
810
|
+
/* @__PURE__ */ n("label", { className: "pkt-form-label", htmlFor: i, children: s })
|
|
820
811
|
] })
|
|
821
812
|
);
|
|
822
|
-
|
|
823
|
-
const wr = ({ label: i, children:
|
|
813
|
+
_r.displayName = "PktRadio";
|
|
814
|
+
const wr = ({ label: i, children: c }) => /* @__PURE__ */ y(Se, { children: [
|
|
824
815
|
/* @__PURE__ */ n("p", { children: i }),
|
|
825
|
-
/* @__PURE__ */ n("div", { className: "pkt-form-group", children:
|
|
816
|
+
/* @__PURE__ */ n("div", { className: "pkt-form-group", children: c })
|
|
826
817
|
] });
|
|
827
|
-
var ee = {},
|
|
818
|
+
var ee = {}, kr = {
|
|
828
819
|
get exports() {
|
|
829
820
|
return ee;
|
|
830
821
|
},
|
|
@@ -839,50 +830,56 @@ var ee = {}, gr = {
|
|
|
839
830
|
*/
|
|
840
831
|
(function(i) {
|
|
841
832
|
(function() {
|
|
842
|
-
var
|
|
843
|
-
function
|
|
844
|
-
for (var
|
|
833
|
+
var c = {}.hasOwnProperty;
|
|
834
|
+
function s() {
|
|
835
|
+
for (var l = [], p = 0; p < arguments.length; p++) {
|
|
845
836
|
var f = arguments[p];
|
|
846
837
|
if (f) {
|
|
847
838
|
var _ = typeof f;
|
|
848
839
|
if (_ === "string" || _ === "number")
|
|
849
|
-
|
|
840
|
+
l.push(f);
|
|
850
841
|
else if (Array.isArray(f)) {
|
|
851
842
|
if (f.length) {
|
|
852
|
-
var k =
|
|
853
|
-
k &&
|
|
843
|
+
var k = s.apply(null, f);
|
|
844
|
+
k && l.push(k);
|
|
854
845
|
}
|
|
855
846
|
} else if (_ === "object") {
|
|
856
847
|
if (f.toString !== Object.prototype.toString && !f.toString.toString().includes("[native code]")) {
|
|
857
|
-
|
|
848
|
+
l.push(f.toString());
|
|
858
849
|
continue;
|
|
859
850
|
}
|
|
860
851
|
for (var m in f)
|
|
861
|
-
|
|
852
|
+
c.call(f, m) && f[m] && l.push(m);
|
|
862
853
|
}
|
|
863
854
|
}
|
|
864
855
|
}
|
|
865
|
-
return
|
|
856
|
+
return l.join(" ");
|
|
866
857
|
}
|
|
867
|
-
i.exports ? (
|
|
858
|
+
i.exports ? (s.default = s, i.exports = s) : window.classNames = s;
|
|
868
859
|
})();
|
|
869
|
-
})(
|
|
870
|
-
const
|
|
860
|
+
})(kr);
|
|
861
|
+
const gr = ee, yr = ({ isResponsive: i, children: c }) => i ? /* @__PURE__ */ n("div", { className: "pkt-table-container", children: c }) : /* @__PURE__ */ n(Se, { children: c }), Or = ({
|
|
871
862
|
isResponsive: i,
|
|
872
|
-
modifiers: { info:
|
|
863
|
+
modifiers: { info: c = !1, success: s = !1, strong: l = !1, shadow: p = !1 } = {},
|
|
873
864
|
children: f
|
|
874
|
-
}) => /* @__PURE__ */ n(
|
|
865
|
+
}) => /* @__PURE__ */ n(yr, { isResponsive: i, children: /* @__PURE__ */ n(
|
|
875
866
|
"table",
|
|
876
867
|
{
|
|
877
|
-
className:
|
|
878
|
-
"pkt-table--info":
|
|
879
|
-
"pkt-table--success":
|
|
880
|
-
"pkt-table--strong":
|
|
868
|
+
className: gr("pkt-table", {
|
|
869
|
+
"pkt-table--info": c,
|
|
870
|
+
"pkt-table--success": s,
|
|
871
|
+
"pkt-table--strong": l,
|
|
881
872
|
"pkt-table--shadow": p
|
|
882
873
|
}),
|
|
883
874
|
children: f
|
|
884
875
|
}
|
|
885
|
-
) }), Sr = ({ children: i }) => /* @__PURE__ */ n("td", { className: "pkt-table__th", children: i }), Cr = ({ children: i }) => /* @__PURE__ */ n("th", { className: "pkt-table__th", children: i })
|
|
876
|
+
) }), Sr = ({ children: i }) => /* @__PURE__ */ n("td", { className: "pkt-table__th", children: i }), Cr = ({ children: i }) => /* @__PURE__ */ n("th", { className: "pkt-table__th", children: i }), Er = te(
|
|
877
|
+
({ id: i, label: c, ...s }, l) => /* @__PURE__ */ y("div", { className: "pkt-form-group", children: [
|
|
878
|
+
/* @__PURE__ */ n("label", { htmlFor: i, className: "pkt-form-label", children: c }),
|
|
879
|
+
/* @__PURE__ */ n("textarea", { className: "pkt-form-textarea", id: i, ref: l, ...s })
|
|
880
|
+
] })
|
|
881
|
+
);
|
|
882
|
+
Er.displayName = "PktTextarea";
|
|
886
883
|
export {
|
|
887
884
|
xr as PktAlert,
|
|
888
885
|
hr as PktButton,
|
|
@@ -890,10 +887,10 @@ export {
|
|
|
890
887
|
br as PktInput,
|
|
891
888
|
Pr as PktLinkCard,
|
|
892
889
|
Tr as PktMessagebox,
|
|
893
|
-
|
|
890
|
+
_r as PktRadio,
|
|
894
891
|
wr as PktRadioGroup,
|
|
895
892
|
Or as PktTable,
|
|
896
893
|
Sr as PktTableData,
|
|
897
894
|
Cr as PktTableHeader,
|
|
898
|
-
|
|
895
|
+
Er as PktTextarea
|
|
899
896
|
};
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],w):(_=typeof globalThis<"u"?globalThis:_||self,w(_["punkt-react"]={},_.React))})(this,function(_,w){"use strict";var W={},Ae={get exports(){return W},set exports(i){W=i}},Y={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ae;function Ie(){if(ae)return Y;ae=1;var i=
|
|
9
|
+
*/var ae;function Ie(){if(ae)return Y;ae=1;var i=w,c=Symbol.for("react.element"),s=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,p=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function k(g,m,T){var y,x={},O=null,M=null;T!==void 0&&(O=""+T),m.key!==void 0&&(O=""+m.key),m.ref!==void 0&&(M=m.ref);for(y in m)l.call(m,y)&&!f.hasOwnProperty(y)&&(x[y]=m[y]);if(g&&g.defaultProps)for(y in m=g.defaultProps,m)x[y]===void 0&&(x[y]=m[y]);return{$$typeof:c,type:g,key:O,ref:M,props:x,_owner:p.current}}return Y.Fragment=s,Y.jsx=k,Y.jsxs=k,Y}var $={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var ne;function We(){return ne||(ne=1,process.env.NODE_ENV!=="production"&&function(){var i=
|
|
18
|
-
`+X+e}}var q=!1,U;{var sr=typeof WeakMap=="function"?WeakMap:Map;U=new sr}function ye(e,r){if(!e||q)return"";{var t=U.get(e);if(t!==void 0)return t}var n;q=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var v;v=K.current,K.current=null,ir();try{if(r){var
|
|
17
|
+
*/var ne;function We(){return ne||(ne=1,process.env.NODE_ENV!=="production"&&function(){var i=w,c=Symbol.for("react.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),g=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),ue=Symbol.iterator,Ke="@@iterator";function Xe(e){if(e===null||typeof e!="object")return null;var r=ue&&e[ue]||e[Ke];return typeof r=="function"?r:null}var F=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];qe("error",e,t)}}function qe(e,r,t){{var n=F.ReactDebugCurrentFrame,d=n.getStackAddendum();d!==""&&(r+="%s",t=t.concat([d]));var v=t.map(function(u){return String(u)});v.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,v)}}var Ze=!1,Qe=!1,er=!1,rr=!1,tr=!1,fe;fe=Symbol.for("react.module.reference");function ar(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===f||tr||e===p||e===T||e===y||rr||e===M||Ze||Qe||er||typeof e=="object"&&e!==null&&(e.$$typeof===O||e.$$typeof===x||e.$$typeof===k||e.$$typeof===g||e.$$typeof===m||e.$$typeof===fe||e.getModuleId!==void 0))}function nr(e,r,t){var n=e.displayName;if(n)return n;var d=r.displayName||r.name||"";return d!==""?t+"("+d+")":t}function de(e){return e.displayName||"Context"}function C(e){if(e==null)return null;if(typeof e.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case l:return"Fragment";case s:return"Portal";case f:return"Profiler";case p:return"StrictMode";case T:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case g:var r=e;return de(r)+".Consumer";case k:var t=e;return de(t._context)+".Provider";case m:return nr(e,e.render,"ForwardRef");case x:var n=e.displayName||null;return n!==null?n:C(e.type)||"Memo";case O:{var d=e,v=d._payload,u=d._init;try{return C(u(v))}catch{return null}}}return null}var D=Object.assign,L=0,pe,ve,me,he,be,_e,ke;function ge(){}ge.__reactDisabledLog=!0;function ir(){{if(L===0){pe=console.log,ve=console.info,me=console.warn,he=console.error,be=console.group,_e=console.groupCollapsed,ke=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ge,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}L++}}function or(){{if(L--,L===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},e,{value:pe}),info:D({},e,{value:ve}),warn:D({},e,{value:me}),error:D({},e,{value:he}),group:D({},e,{value:be}),groupCollapsed:D({},e,{value:_e}),groupEnd:D({},e,{value:ke})})}L<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=F.ReactCurrentDispatcher,X;function V(e,r,t){{if(X===void 0)try{throw Error()}catch(d){var n=d.stack.trim().match(/\n( *(at )?)/);X=n&&n[1]||""}return`
|
|
18
|
+
`+X+e}}var q=!1,U;{var sr=typeof WeakMap=="function"?WeakMap:Map;U=new sr}function ye(e,r){if(!e||q)return"";{var t=U.get(e);if(t!==void 0)return t}var n;q=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var v;v=K.current,K.current=null,ir();try{if(r){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(j){n=j}Reflect.construct(e,[],u)}else{try{u.call()}catch(j){n=j}e.call(u.prototype)}}else{try{throw Error()}catch(j){n=j}e()}}catch(j){if(j&&n&&typeof j.stack=="string"){for(var o=j.stack.split(`
|
|
19
19
|
`),P=n.stack.split(`
|
|
20
|
-
`),h=
|
|
21
|
-
`+
|
|
20
|
+
`),h=o.length-1,b=P.length-1;h>=1&&b>=0&&o[h]!==P[b];)b--;for(;h>=1&&b>=0;h--,b--)if(o[h]!==P[b]){if(h!==1||b!==1)do if(h--,b--,b<0||o[h]!==P[b]){var N=`
|
|
21
|
+
`+o[h].replace(" at new "," at ");return e.displayName&&N.includes("<anonymous>")&&(N=N.replace("<anonymous>",e.displayName)),typeof e=="function"&&U.set(e,N),N}while(h>=1&&b>=0);break}}}finally{q=!1,K.current=v,or(),Error.prepareStackTrace=d}var I=e?e.displayName||e.name:"",Fe=I?V(I):"";return typeof e=="function"&&U.set(e,Fe),Fe}function lr(e,r,t){return ye(e,!1)}function cr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function G(e,r,t){if(e==null)return"";if(typeof e=="function")return ye(e,cr(e));if(typeof e=="string")return V(e);switch(e){case T:return V("Suspense");case y:return V("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case m:return lr(e.render);case x:return G(e.type,r,t);case O:{var n=e,d=n._payload,v=n._init;try{return G(v(d),r,t)}catch{}}}return""}var H=Object.prototype.hasOwnProperty,Re={},Ee=F.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,t=G(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}function ur(e,r,t,n,d){{var v=Function.call.bind(H);for(var u in e)if(v(e,u)){var o=void 0;try{if(typeof e[u]!="function"){var P=Error((n||"React class")+": "+t+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw P.name="Invariant Violation",P}o=e[u](r,u,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(h){o=h}o&&!(o instanceof Error)&&(J(d),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,u,typeof o),J(null)),o instanceof Error&&!(o.message in Re)&&(Re[o.message]=!0,J(d),E("Failed %s type: %s",t,o.message),J(null))}}}var fr=Array.isArray;function Z(e){return fr(e)}function dr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function pr(e){try{return Pe(e),!1}catch{return!0}}function Pe(e){return""+e}function Te(e){if(pr(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",dr(e)),Pe(e)}var B=F.ReactCurrentOwner,vr={key:!0,ref:!0,__self:!0,__source:!0},Ne,we,Q;Q={};function mr(e){if(H.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function hr(e){if(H.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function br(e,r){if(typeof e.ref=="string"&&B.current&&r&&B.current.stateNode!==r){var t=C(B.current.type);Q[t]||(E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C(B.current.type),e.ref),Q[t]=!0)}}function _r(e,r){{var t=function(){Ne||(Ne=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function kr(e,r){{var t=function(){we||(we=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var gr=function(e,r,t,n,d,v,u){var o={$$typeof:c,type:e,key:r,ref:t,props:u,_owner:v};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:d}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function yr(e,r,t,n,d){{var v,u={},o=null,P=null;t!==void 0&&(Te(t),o=""+t),hr(r)&&(Te(r.key),o=""+r.key),mr(r)&&(P=r.ref,br(r,d));for(v in r)H.call(r,v)&&!vr.hasOwnProperty(v)&&(u[v]=r[v]);if(e&&e.defaultProps){var h=e.defaultProps;for(v in h)u[v]===void 0&&(u[v]=h[v])}if(o||P){var b=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&_r(u,b),P&&kr(u,b)}return gr(e,o,P,d,n,B.current,u)}}var ee=F.ReactCurrentOwner,xe=F.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=G(e.type,e._source,r?r.type:null);xe.setExtraStackFrame(t)}else xe.setExtraStackFrame(null)}var re;re=!1;function te(e){return typeof e=="object"&&e!==null&&e.$$typeof===c}function Se(){{if(ee.current){var e=C(ee.current.type);if(e)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function Rr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
24
24
|
|
|
25
25
|
Check your code at `+r+":"+t+"."}return""}}var Oe={};function Er(e){{var r=Se();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=Er(r);if(Oe[t])return;Oe[t]=!0;var n="";e&&e._owner&&e._owner!==ee.current&&(n=" It was passed a child from "+C(e._owner.type)+"."),A(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),A(null)}}function je(e,r){{if(typeof e!="object")return;if(Z(e))for(var t=0;t<e.length;t++){var n=e[t];te(n)&&Ce(n,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var d=Xe(e);if(typeof d=="function"&&d!==e.entries)for(var v=d.call(e),
|
|
27
|
+
Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=Er(r);if(Oe[t])return;Oe[t]=!0;var n="";e&&e._owner&&e._owner!==ee.current&&(n=" It was passed a child from "+C(e._owner.type)+"."),A(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),A(null)}}function je(e,r){{if(typeof e!="object")return;if(Z(e))for(var t=0;t<e.length;t++){var n=e[t];te(n)&&Ce(n,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var d=Xe(e);if(typeof d=="function"&&d!==e.entries)for(var v=d.call(e),u;!(u=v.next()).done;)te(u.value)&&Ce(u.value,r)}}}function Pr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===m||r.$$typeof===x))t=r.propTypes;else return;if(t){var n=C(r);ur(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!re){re=!0;var d=C(r);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",d||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Tr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){A(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),A(null);break}}e.ref!==null&&(A(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function De(e,r,t,n,d,v){{var u=ar(e);if(!u){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var P=Rr(d);P?o+=P:o+=Se();var h;e===null?h="null":Z(e)?h="array":e!==void 0&&e.$$typeof===c?(h="<"+(C(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):h=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",h,o)}var b=yr(e,r,t,d,v);if(b==null)return b;if(u){var N=r.children;if(N!==void 0)if(n)if(Z(N)){for(var I=0;I<N.length;I++)je(N[I],e);Object.freeze&&Object.freeze(N)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else je(N,e)}return e===l?Tr(b):Pr(b),b}}function Nr(e,r,t){return De(e,r,t,!0)}function wr(e,r,t){return De(e,r,t,!1)}var xr=wr,Sr=Nr;$.Fragment=l,$.jsx=xr,$.jsxs=Sr}()),$}(function(i){process.env.NODE_ENV==="production"?i.exports=Ie():i.exports=We()})(Ae);const ie=W.Fragment,a=W.jsx,R=W.jsxs,S=({className:i,name:c,viewBox:s="0 0 32 32",...l})=>{const p=[i].filter(Boolean).join(" ");return a("svg",{...l,className:p,viewBox:s,children:a("use",{href:`#${c}`})})},Ye=({children:i,className:c,skin:s="info",closeAlert:l=!1,onClose:p,title:f,date:k,ariaLive:g="polite",...m})=>{const T=[c,"pkt-alert",s&&`pkt-alert--${s}`].filter(Boolean).join(" "),[y,x]=w.useState(!0),O=()=>{x(!1),p&&p()};return y?R("div",{...m,className:T,"aria-live":g,children:[a("div",{className:"pkt-alert__icon",children:a(S,{name:s==="info"?"alert-information":`alert-${s}`})}),l&&a("div",{className:"pkt-alert__close",children:a("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:O,children:a(S,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),f&&a("div",{className:"pkt-alert__title",children:f}),a("div",{className:"pkt-alert__text",children:i}),k&&R("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",k]})]}):null},oe=w.forwardRef(({children:i,className:c,iconName:s="user",secondIconName:l="user",size:p="medium",skin:f="primary",type:k="button",variant:g="label-only",...m},T)=>{const y=[c,"pkt-btn",p&&`pkt-btn--${p}`,f&&`pkt-btn--${f}`,g&&`pkt-btn--${g}`].filter(Boolean).join(" ");return R("button",{...m,className:y,type:k,ref:T,children:[a(S,{className:"pkt-btn__icon",name:s}),a("span",{className:"pkt-btn__text",children:i}),g==="icons-right-and-left"&&a(S,{className:"pkt-btn__icon",name:l})]})});oe.displayName="PktButton";const $e=({className:i,logoLink:c="https://www.oslo.kommune.no/",isLoggedIn:s=!1,representing:l="",canChangeRepresentation:p=!1,showLogInButton:f=!0,onLogIn:k,onLogOut:g,onChangeRepresentation:m})=>{const T=[i,"pkt-header"].filter(Boolean).join(" ");return R("header",{id:"pkt-header",className:T,"aria-label":"Topp",children:[a("div",{className:"pkt-header__logo",children:a("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:c,children:a(S,{name:"oslologo",className:"pkt-header__logo-svg",viewBox:"0 0 60 31","aria-hidden":"true"})})}),R("div",{className:"pkt-header__actions",children:[s&&p&&R("button",{className:"pkt-btn pkt-btn--secondary pkt-btn--icon-right","aria-label":`Bytt bruker fra ${l}`,onClick:m,children:[a(S,{name:"user",className:"pkt-btn__icon pkt-show-tablet-up"}),a("span",{className:"pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15",children:"Endre"}),a("span",{className:"pkt-btn__text pkt-hide-tablet-up",children:"Endre"}),a("span",{className:"pkt-btn__text--representing pkt-hide pkt-show-tablet-up",children:l})]}),s&&!p&&R("div",{className:"pkt-header__action",children:[a("span",{className:"pkt-header__action-text",children:a("span",{className:"pkt-btn__text pkt-header__action-textrow text-row-inline pkt-truncate-text",children:l})}),a("span",{className:"pkt-header__action-icon pkt-show-phablet-up",children:a(S,{name:"user"})})]}),f&&s&&R("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg ut",onClick:g,children:[a(S,{className:"pkt-btn__icon pkt-show-tablet-up",name:"exit"}),a("span",{className:"pkt-btn__text",children:"Logg ut"})]}),f&&!s&&R("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg inn",onClick:k,children:[a(S,{className:"pkt-btn__icon",name:"user"}),a("span",{className:"pkt-btn__text",children:"Logg inn"})]})]})]})},se=w.forwardRef(({label:i,id:c,children:s,...l},p)=>R("div",{className:"pkt-form-group",children:[a("label",{htmlFor:c,className:"pkt-form-label",children:i}),a("input",{className:"pkt-form-input",id:c,...l,ref:p}),s]}));se.displayName="PktInput";const Le=({children:i,className:c,iconName:s="user",skin:l="",href:p="#",title:f})=>{const k=[c,"pkt-linkcard",l&&`pkt-linkcard--${l}`].filter(Boolean).join(" ");return R("a",{href:p,className:`pkt-linkcard pkt-link ${k}`,children:[a(S,{className:"pkt-link__icon",name:s}),R("div",{className:"pkt-linkcard__content",children:[a("div",{className:"pkt-linkcard__title",children:f}),a("div",{className:"pkt-linkcard__text",children:i})]})]})},Be=({children:i,skin:c="beige",title:s,...l})=>{const p=["pkt-messagebox",c&&`pkt-messagebox--${c}`].filter(Boolean).join(" ");return R("div",{...l,className:p,children:[a("div",{className:"pkt-messagebox__title",children:s}),a("div",{className:"pkt-messagebox__text",children:i})]})},le=w.forwardRef(({id:i,name:c,label:s,value:l,...p},f)=>R("div",{className:"pkt-form-group",children:[a("input",{type:"radio",className:"pkt-form-check-input",id:i,name:c,value:l,ref:f,...p}),a("label",{className:"pkt-form-label",htmlFor:i,children:s})]}));le.displayName="PktRadio";const Me=({label:i,children:c})=>R(ie,{children:[a("p",{children:i}),a("div",{className:"pkt-form-group",children:c})]});var z={},Ve={get exports(){return z},set exports(i){z=i}};/*!
|
|
28
28
|
Copyright (c) 2018 Jed Watson.
|
|
29
29
|
Licensed under the MIT License (MIT), see
|
|
30
30
|
http://jedwatson.github.io/classnames
|
|
31
|
-
*/(function(i){(function(){var
|
|
31
|
+
*/(function(i){(function(){var c={}.hasOwnProperty;function s(){for(var l=[],p=0;p<arguments.length;p++){var f=arguments[p];if(f){var k=typeof f;if(k==="string"||k==="number")l.push(f);else if(Array.isArray(f)){if(f.length){var g=s.apply(null,f);g&&l.push(g)}}else if(k==="object"){if(f.toString!==Object.prototype.toString&&!f.toString.toString().includes("[native code]")){l.push(f.toString());continue}for(var m in f)c.call(f,m)&&f[m]&&l.push(m)}}}return l.join(" ")}i.exports?(s.default=s,i.exports=s):window.classNames=s})()})(Ve);const Ue=z,Ge=({isResponsive:i,children:c})=>i?a("div",{className:"pkt-table-container",children:c}):a(ie,{children:c}),He=({isResponsive:i,modifiers:{info:c=!1,success:s=!1,strong:l=!1,shadow:p=!1}={},children:f})=>a(Ge,{isResponsive:i,children:a("table",{className:Ue("pkt-table",{"pkt-table--info":c,"pkt-table--success":s,"pkt-table--strong":l,"pkt-table--shadow":p}),children:f})}),Je=({children:i})=>a("td",{className:"pkt-table__th",children:i}),ze=({children:i})=>a("th",{className:"pkt-table__th",children:i}),ce=w.forwardRef(({id:i,label:c,...s},l)=>R("div",{className:"pkt-form-group",children:[a("label",{htmlFor:i,className:"pkt-form-label",children:c}),a("textarea",{className:"pkt-form-textarea",id:i,ref:l,...s})]}));ce.displayName="PktTextarea",_.PktAlert=Ye,_.PktButton=oe,_.PktHeader=$e,_.PktInput=se,_.PktLinkCard=Le,_.PktMessagebox=Be,_.PktRadio=le,_.PktRadioGroup=Me,_.PktTable=He,_.PktTableData=Je,_.PktTableHeader=ze,_.PktTextarea=ce,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
90
90
|
},
|
|
91
91
|
"license": "MIT",
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "131d6149abdf6e09a964701f5a00a891a08b48cb"
|
|
93
93
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
|
|
2
3
|
import { PktIcon } from '../icon/Icon'
|
|
3
4
|
|
|
4
5
|
type HeaderProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
@@ -13,7 +14,6 @@ type HeaderProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export const PktHeader: React.FC<HeaderProps> = ({
|
|
16
|
-
children,
|
|
17
17
|
className,
|
|
18
18
|
logoLink = 'https://www.oslo.kommune.no/',
|
|
19
19
|
isLoggedIn = false,
|
|
@@ -23,7 +23,6 @@ export const PktHeader: React.FC<HeaderProps> = ({
|
|
|
23
23
|
onLogIn,
|
|
24
24
|
onLogOut,
|
|
25
25
|
onChangeRepresentation,
|
|
26
|
-
...props
|
|
27
26
|
}) => {
|
|
28
27
|
const classNames = [className, 'pkt-header'].filter(Boolean).join(' ')
|
|
29
28
|
return (
|
package/src/components/index.ts
CHANGED
|
@@ -4,9 +4,9 @@ export { PktHeader } from './header/Header'
|
|
|
4
4
|
export { PktInput } from './input/Input'
|
|
5
5
|
export { PktLinkCard } from './linkcard/LinkCard'
|
|
6
6
|
export { PktMessagebox } from './messagebox/Messagebox'
|
|
7
|
-
export { PktTextarea } from './textarea/Textarea'
|
|
8
7
|
export { PktRadio } from './radio/Radio'
|
|
9
8
|
export { PktRadioGroup } from './radioGroup/RadioGroup'
|
|
10
9
|
export { PktTable } from './table/Table'
|
|
11
10
|
export { PktTableData } from './table/TableData'
|
|
12
11
|
export { PktTableHeader } from './table/TableHeader'
|
|
12
|
+
export { PktTextarea } from './textarea/Textarea'
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Test med axe https://www.npmjs.com/package/jest-axe
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
import { render } from '@testing-library/react'
|
|
4
2
|
import '@testing-library/jest-dom/extend-expect';
|
|
5
3
|
|
|
6
|
-
import {
|
|
4
|
+
import { render } from '@testing-library/react'
|
|
5
|
+
import { axe, toHaveNoViolations } from 'jest-axe'
|
|
6
|
+
import * as React from 'react'
|
|
7
7
|
|
|
8
|
+
import { PktLinkCard } from './LinkCard'
|
|
8
9
|
|
|
9
|
-
const { axe, toHaveNoViolations } = require('jest-axe')
|
|
10
10
|
expect.extend(toHaveNoViolations)
|
|
11
11
|
|
|
12
12
|
|