@oslokommune/punkt-react 4.2.1 → 4.3.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 +19 -0
- package/dist/linkcard/LinkCard.d.ts +3 -2
- package/dist/punkt-react.es.js +165 -159
- package/dist/punkt-react.umd.js +9 -9
- package/package.json +3 -3
- package/src/components/linkcard/LinkCard.tsx +34 -24
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,25 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [4.3.0](https://github.com/oslokommune/punkt/compare/4.2.1...4.3.0) (2023-05-24)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
* [869](https://github.com/oslokommune/punkt/issues/869) External Linkcard.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
* [869](https://github.com/oslokommune/punkt/issues/869) ForwardRef - linkcard.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Chores
|
|
22
|
+
Ingen
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
|
|
8
27
|
## [4.3.0](https://github.com/oslokommune/punkt/compare/4.2.0...4.3.0) (2023-05-23)
|
|
9
28
|
|
|
10
29
|
### ⚠ BREAKING CHANGES
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export interface IPktLinkCard extends React.HTMLAttributes<
|
|
2
|
+
export interface IPktLinkCard extends React.HTMLAttributes<HTMLAnchorElement> {
|
|
3
3
|
skin?: 'normal' | 'blue' | 'beige' | 'beige-outline' | 'grey-outline';
|
|
4
4
|
title?: string;
|
|
5
5
|
href?: string;
|
|
6
6
|
iconName?: string;
|
|
7
7
|
openInNewTab?: boolean;
|
|
8
|
+
external?: boolean;
|
|
8
9
|
}
|
|
9
|
-
export declare const PktLinkCard: React.
|
|
10
|
+
export declare const PktLinkCard: React.ForwardRefExoticComponent<IPktLinkCard & React.RefAttributes<HTMLAnchorElement>>;
|
package/dist/punkt-react.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import z, { forwardRef as B, useState as dr } from "react";
|
|
2
2
|
function mr(o) {
|
|
3
3
|
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
|
|
4
4
|
}
|
|
@@ -17,18 +17,18 @@ function hr() {
|
|
|
17
17
|
if (Pe)
|
|
18
18
|
return W;
|
|
19
19
|
Pe = 1;
|
|
20
|
-
var o =
|
|
21
|
-
function
|
|
22
|
-
var N, T = {}, P = null,
|
|
23
|
-
x !== void 0 && (P = "" + x),
|
|
24
|
-
for (N in
|
|
25
|
-
c.call(
|
|
20
|
+
var o = z, l = Symbol.for("react.element"), s = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, p = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, n = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
21
|
+
function v(b, h, x) {
|
|
22
|
+
var N, T = {}, P = null, O = null;
|
|
23
|
+
x !== void 0 && (P = "" + x), h.key !== void 0 && (P = "" + h.key), h.ref !== void 0 && (O = h.ref);
|
|
24
|
+
for (N in h)
|
|
25
|
+
c.call(h, N) && !n.hasOwnProperty(N) && (T[N] = h[N]);
|
|
26
26
|
if (b && b.defaultProps)
|
|
27
|
-
for (N in
|
|
28
|
-
T[N] === void 0 && (T[N] =
|
|
29
|
-
return { $$typeof: l, type: b, key: P, ref:
|
|
27
|
+
for (N in h = b.defaultProps, h)
|
|
28
|
+
T[N] === void 0 && (T[N] = h[N]);
|
|
29
|
+
return { $$typeof: l, type: b, key: P, ref: O, props: T, _owner: p.current };
|
|
30
30
|
}
|
|
31
|
-
return W.Fragment = s, W.jsx =
|
|
31
|
+
return W.Fragment = s, W.jsx = v, W.jsxs = v, W;
|
|
32
32
|
}
|
|
33
33
|
var Y = {};
|
|
34
34
|
/**
|
|
@@ -43,41 +43,41 @@ var Y = {};
|
|
|
43
43
|
var je;
|
|
44
44
|
function _r() {
|
|
45
45
|
return je || (je = 1, process.env.NODE_ENV !== "production" && function() {
|
|
46
|
-
var o =
|
|
47
|
-
function
|
|
46
|
+
var o = z, l = Symbol.for("react.element"), s = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), n = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), b = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), N = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), ae = Symbol.iterator, Oe = "@@iterator";
|
|
47
|
+
function $e(e) {
|
|
48
48
|
if (e === null || typeof e != "object")
|
|
49
49
|
return null;
|
|
50
|
-
var r = ae && e[ae] || e[
|
|
50
|
+
var r = ae && e[ae] || e[Oe];
|
|
51
51
|
return typeof r == "function" ? r : null;
|
|
52
52
|
}
|
|
53
|
-
var
|
|
53
|
+
var $ = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
54
54
|
function E(e) {
|
|
55
55
|
{
|
|
56
56
|
for (var r = arguments.length, a = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
|
|
57
57
|
a[i - 1] = arguments[i];
|
|
58
|
-
|
|
58
|
+
Fe("error", e, a);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function Fe(e, r, a) {
|
|
62
62
|
{
|
|
63
|
-
var i =
|
|
63
|
+
var i = $.ReactDebugCurrentFrame, m = i.getStackAddendum();
|
|
64
64
|
m !== "" && (r += "%s", a = a.concat([m]));
|
|
65
|
-
var
|
|
65
|
+
var _ = a.map(function(f) {
|
|
66
66
|
return String(f);
|
|
67
67
|
});
|
|
68
|
-
|
|
68
|
+
_.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, _);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
var De = !1, Ie = !1, Ae = !1, We = !1, Ye = !1, ne;
|
|
72
72
|
ne = Symbol.for("react.module.reference");
|
|
73
73
|
function Be(e) {
|
|
74
|
-
return !!(typeof e == "string" || typeof e == "function" || e === c || e === n || Ye || e === p || e === x || e === N || We || e ===
|
|
74
|
+
return !!(typeof e == "string" || typeof e == "function" || e === c || e === n || Ye || e === p || e === x || e === N || We || e === O || De || Ie || Ae || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === T || e.$$typeof === v || e.$$typeof === b || e.$$typeof === h || // This needs to include all possible module reference object
|
|
75
75
|
// types supported by any Flight configuration anywhere since
|
|
76
76
|
// we don't know which Flight build this will end up being used
|
|
77
77
|
// with.
|
|
78
78
|
e.$$typeof === ne || e.getModuleId !== void 0));
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function Le(e, r, a) {
|
|
81
81
|
var i = e.displayName;
|
|
82
82
|
if (i)
|
|
83
83
|
return i;
|
|
@@ -113,18 +113,18 @@ function _r() {
|
|
|
113
113
|
case b:
|
|
114
114
|
var r = e;
|
|
115
115
|
return oe(r) + ".Consumer";
|
|
116
|
-
case
|
|
116
|
+
case v:
|
|
117
117
|
var a = e;
|
|
118
118
|
return oe(a._context) + ".Provider";
|
|
119
|
-
case
|
|
120
|
-
return
|
|
119
|
+
case h:
|
|
120
|
+
return Le(e, e.render, "ForwardRef");
|
|
121
121
|
case T:
|
|
122
122
|
var i = e.displayName || null;
|
|
123
123
|
return i !== null ? i : j(e.type) || "Memo";
|
|
124
124
|
case P: {
|
|
125
|
-
var m = e,
|
|
125
|
+
var m = e, _ = m._payload, f = m._init;
|
|
126
126
|
try {
|
|
127
|
-
return j(f(
|
|
127
|
+
return j(f(_));
|
|
128
128
|
} catch {
|
|
129
129
|
return null;
|
|
130
130
|
}
|
|
@@ -132,11 +132,11 @@ function _r() {
|
|
|
132
132
|
}
|
|
133
133
|
return null;
|
|
134
134
|
}
|
|
135
|
-
var
|
|
135
|
+
var C = Object.assign, I = 0, ie, le, se, ce, ue, fe, pe;
|
|
136
136
|
function de() {
|
|
137
137
|
}
|
|
138
138
|
de.__reactDisabledLog = !0;
|
|
139
|
-
function
|
|
139
|
+
function Me() {
|
|
140
140
|
{
|
|
141
141
|
if (I === 0) {
|
|
142
142
|
ie = console.log, le = console.info, se = console.warn, ce = console.error, ue = console.group, fe = console.groupCollapsed, pe = console.groupEnd;
|
|
@@ -168,25 +168,25 @@ function _r() {
|
|
|
168
168
|
writable: !0
|
|
169
169
|
};
|
|
170
170
|
Object.defineProperties(console, {
|
|
171
|
-
log:
|
|
171
|
+
log: C({}, e, {
|
|
172
172
|
value: ie
|
|
173
173
|
}),
|
|
174
|
-
info:
|
|
174
|
+
info: C({}, e, {
|
|
175
175
|
value: le
|
|
176
176
|
}),
|
|
177
|
-
warn:
|
|
177
|
+
warn: C({}, e, {
|
|
178
178
|
value: se
|
|
179
179
|
}),
|
|
180
|
-
error:
|
|
180
|
+
error: C({}, e, {
|
|
181
181
|
value: ce
|
|
182
182
|
}),
|
|
183
|
-
group:
|
|
183
|
+
group: C({}, e, {
|
|
184
184
|
value: ue
|
|
185
185
|
}),
|
|
186
|
-
groupCollapsed:
|
|
186
|
+
groupCollapsed: C({}, e, {
|
|
187
187
|
value: fe
|
|
188
188
|
}),
|
|
189
|
-
groupEnd:
|
|
189
|
+
groupEnd: C({}, e, {
|
|
190
190
|
value: pe
|
|
191
191
|
})
|
|
192
192
|
});
|
|
@@ -194,8 +194,8 @@ function _r() {
|
|
|
194
194
|
I < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
var G =
|
|
198
|
-
function
|
|
197
|
+
var G = $.ReactCurrentDispatcher, J;
|
|
198
|
+
function L(e, r, a) {
|
|
199
199
|
{
|
|
200
200
|
if (J === void 0)
|
|
201
201
|
try {
|
|
@@ -225,8 +225,8 @@ function _r() {
|
|
|
225
225
|
H = !0;
|
|
226
226
|
var m = Error.prepareStackTrace;
|
|
227
227
|
Error.prepareStackTrace = void 0;
|
|
228
|
-
var
|
|
229
|
-
|
|
228
|
+
var _;
|
|
229
|
+
_ = G.current, G.current = null, Me();
|
|
230
230
|
try {
|
|
231
231
|
if (r) {
|
|
232
232
|
var f = function() {
|
|
@@ -279,9 +279,9 @@ function _r() {
|
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
} finally {
|
|
282
|
-
H = !1, G.current =
|
|
282
|
+
H = !1, G.current = _, Ve(), Error.prepareStackTrace = m;
|
|
283
283
|
}
|
|
284
|
-
var D = e ? e.displayName || e.name : "", Te = D ?
|
|
284
|
+
var D = e ? e.displayName || e.name : "", Te = D ? L(D) : "";
|
|
285
285
|
return typeof e == "function" && M.set(e, Te), Te;
|
|
286
286
|
}
|
|
287
287
|
function qe(e, r, a) {
|
|
@@ -291,48 +291,48 @@ function _r() {
|
|
|
291
291
|
var r = e.prototype;
|
|
292
292
|
return !!(r && r.isReactComponent);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function V(e, r, a) {
|
|
295
295
|
if (e == null)
|
|
296
296
|
return "";
|
|
297
297
|
if (typeof e == "function")
|
|
298
298
|
return me(e, ze(e));
|
|
299
299
|
if (typeof e == "string")
|
|
300
|
-
return
|
|
300
|
+
return L(e);
|
|
301
301
|
switch (e) {
|
|
302
302
|
case x:
|
|
303
|
-
return
|
|
303
|
+
return L("Suspense");
|
|
304
304
|
case N:
|
|
305
|
-
return
|
|
305
|
+
return L("SuspenseList");
|
|
306
306
|
}
|
|
307
307
|
if (typeof e == "object")
|
|
308
308
|
switch (e.$$typeof) {
|
|
309
|
-
case
|
|
309
|
+
case h:
|
|
310
310
|
return qe(e.render);
|
|
311
311
|
case T:
|
|
312
|
-
return
|
|
312
|
+
return V(e.type, r, a);
|
|
313
313
|
case P: {
|
|
314
|
-
var i = e, m = i._payload,
|
|
314
|
+
var i = e, m = i._payload, _ = i._init;
|
|
315
315
|
try {
|
|
316
|
-
return
|
|
316
|
+
return V(_(m), r, a);
|
|
317
317
|
} catch {
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
return "";
|
|
322
322
|
}
|
|
323
|
-
var
|
|
324
|
-
function
|
|
323
|
+
var U = Object.prototype.hasOwnProperty, he = {}, _e = $.ReactDebugCurrentFrame;
|
|
324
|
+
function q(e) {
|
|
325
325
|
if (e) {
|
|
326
|
-
var r = e._owner, a =
|
|
326
|
+
var r = e._owner, a = V(e.type, e._source, r ? r.type : null);
|
|
327
327
|
_e.setExtraStackFrame(a);
|
|
328
328
|
} else
|
|
329
329
|
_e.setExtraStackFrame(null);
|
|
330
330
|
}
|
|
331
331
|
function Ge(e, r, a, i, m) {
|
|
332
332
|
{
|
|
333
|
-
var
|
|
333
|
+
var _ = Function.call.bind(U);
|
|
334
334
|
for (var f in e)
|
|
335
|
-
if (
|
|
335
|
+
if (_(e, f)) {
|
|
336
336
|
var u = void 0;
|
|
337
337
|
try {
|
|
338
338
|
if (typeof e[f] != "function") {
|
|
@@ -343,7 +343,7 @@ function _r() {
|
|
|
343
343
|
} catch (k) {
|
|
344
344
|
u = k;
|
|
345
345
|
}
|
|
346
|
-
u && !(u instanceof Error) && (
|
|
346
|
+
u && !(u instanceof Error) && (q(m), 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).", i || "React class", a, f, typeof u), q(null)), u instanceof Error && !(u.message in he) && (he[u.message] = !0, q(m), E("Failed %s type: %s", a, u.message), q(null));
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
}
|
|
@@ -371,7 +371,7 @@ function _r() {
|
|
|
371
371
|
if (Ke(e))
|
|
372
372
|
return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)), ve(e);
|
|
373
373
|
}
|
|
374
|
-
var A =
|
|
374
|
+
var A = $.ReactCurrentOwner, Xe = {
|
|
375
375
|
key: !0,
|
|
376
376
|
ref: !0,
|
|
377
377
|
__self: !0,
|
|
@@ -379,7 +379,7 @@ function _r() {
|
|
|
379
379
|
}, be, ge, X;
|
|
380
380
|
X = {};
|
|
381
381
|
function Ze(e) {
|
|
382
|
-
if (
|
|
382
|
+
if (U.call(e, "ref")) {
|
|
383
383
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
384
384
|
if (r && r.isReactWarning)
|
|
385
385
|
return !1;
|
|
@@ -387,7 +387,7 @@ function _r() {
|
|
|
387
387
|
return e.ref !== void 0;
|
|
388
388
|
}
|
|
389
389
|
function Qe(e) {
|
|
390
|
-
if (
|
|
390
|
+
if (U.call(e, "key")) {
|
|
391
391
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
392
392
|
if (r && r.isReactWarning)
|
|
393
393
|
return !1;
|
|
@@ -422,7 +422,7 @@ function _r() {
|
|
|
422
422
|
});
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
var ar = function(e, r, a, i, m,
|
|
425
|
+
var ar = function(e, r, a, i, m, _, f) {
|
|
426
426
|
var u = {
|
|
427
427
|
// This tag allows us to uniquely identify this as a React Element
|
|
428
428
|
$$typeof: l,
|
|
@@ -432,7 +432,7 @@ function _r() {
|
|
|
432
432
|
ref: a,
|
|
433
433
|
props: f,
|
|
434
434
|
// Record the component responsible for creating this element.
|
|
435
|
-
_owner:
|
|
435
|
+
_owner: _
|
|
436
436
|
};
|
|
437
437
|
return u._store = {}, Object.defineProperty(u._store, "validated", {
|
|
438
438
|
configurable: !1,
|
|
@@ -453,14 +453,14 @@ function _r() {
|
|
|
453
453
|
};
|
|
454
454
|
function nr(e, r, a, i, m) {
|
|
455
455
|
{
|
|
456
|
-
var
|
|
456
|
+
var _, f = {}, u = null, R = null;
|
|
457
457
|
a !== void 0 && (ke(a), u = "" + a), Qe(r) && (ke(r.key), u = "" + r.key), Ze(r) && (R = r.ref, er(r, m));
|
|
458
|
-
for (
|
|
459
|
-
|
|
458
|
+
for (_ in r)
|
|
459
|
+
U.call(r, _) && !Xe.hasOwnProperty(_) && (f[_] = r[_]);
|
|
460
460
|
if (e && e.defaultProps) {
|
|
461
461
|
var k = e.defaultProps;
|
|
462
|
-
for (
|
|
463
|
-
f[
|
|
462
|
+
for (_ in k)
|
|
463
|
+
f[_] === void 0 && (f[_] = k[_]);
|
|
464
464
|
}
|
|
465
465
|
if (u || R) {
|
|
466
466
|
var g = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
@@ -469,10 +469,10 @@ function _r() {
|
|
|
469
469
|
return ar(e, u, R, m, i, A.current, f);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
var Z =
|
|
473
|
-
function
|
|
472
|
+
var Z = $.ReactCurrentOwner, Ne = $.ReactDebugCurrentFrame;
|
|
473
|
+
function F(e) {
|
|
474
474
|
if (e) {
|
|
475
|
-
var r = e._owner, a =
|
|
475
|
+
var r = e._owner, a = V(e.type, e._source, r ? r.type : null);
|
|
476
476
|
Ne.setExtraStackFrame(a);
|
|
477
477
|
} else
|
|
478
478
|
Ne.setExtraStackFrame(null);
|
|
@@ -528,7 +528,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
528
528
|
return;
|
|
529
529
|
Ee[a] = !0;
|
|
530
530
|
var i = "";
|
|
531
|
-
e && e._owner && e._owner !== Z.current && (i = " It was passed a child from " + j(e._owner.type) + "."),
|
|
531
|
+
e && e._owner && e._owner !== Z.current && (i = " It was passed a child from " + j(e._owner.type) + "."), F(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.', a, i), F(null);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
function xe(e, r) {
|
|
@@ -543,9 +543,9 @@ Check the top-level render call using <` + a + ">.");
|
|
|
543
543
|
else if (ee(e))
|
|
544
544
|
e._store && (e._store.validated = !0);
|
|
545
545
|
else if (e) {
|
|
546
|
-
var m =
|
|
546
|
+
var m = $e(e);
|
|
547
547
|
if (typeof m == "function" && m !== e.entries)
|
|
548
|
-
for (var
|
|
548
|
+
for (var _ = m.call(e), f; !(f = _.next()).done; )
|
|
549
549
|
ee(f.value) && Re(f.value, r);
|
|
550
550
|
}
|
|
551
551
|
}
|
|
@@ -558,7 +558,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
558
558
|
var a;
|
|
559
559
|
if (typeof r == "function")
|
|
560
560
|
a = r.propTypes;
|
|
561
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
561
|
+
else if (typeof r == "object" && (r.$$typeof === h || // Note: Memo only checks outer props here.
|
|
562
562
|
// Inner props are checked in the reconciler.
|
|
563
563
|
r.$$typeof === T))
|
|
564
564
|
a = r.propTypes;
|
|
@@ -580,14 +580,14 @@ Check the top-level render call using <` + a + ">.");
|
|
|
580
580
|
for (var r = Object.keys(e.props), a = 0; a < r.length; a++) {
|
|
581
581
|
var i = r[a];
|
|
582
582
|
if (i !== "children" && i !== "key") {
|
|
583
|
-
|
|
583
|
+
F(e), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", i), F(null);
|
|
584
584
|
break;
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
e.ref !== null && (
|
|
587
|
+
e.ref !== null && (F(e), E("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
|
-
function we(e, r, a, i, m,
|
|
590
|
+
function we(e, r, a, i, m, _) {
|
|
591
591
|
{
|
|
592
592
|
var f = Be(e);
|
|
593
593
|
if (!f) {
|
|
@@ -598,7 +598,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
598
598
|
var k;
|
|
599
599
|
e === null ? k = "null" : K(e) ? k = "array" : e !== void 0 && e.$$typeof === l ? (k = "<" + (j(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : k = 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", k, u);
|
|
600
600
|
}
|
|
601
|
-
var g = nr(e, r, a, m,
|
|
601
|
+
var g = nr(e, r, a, m, _);
|
|
602
602
|
if (g == null)
|
|
603
603
|
return g;
|
|
604
604
|
if (f) {
|
|
@@ -637,7 +637,7 @@ const Se = te.Fragment, t = te.jsx, d = te.jsxs, y = ({
|
|
|
637
637
|
}) => {
|
|
638
638
|
const p = [o].filter(Boolean).join(" ");
|
|
639
639
|
return /* @__PURE__ */ t("svg", { ...c, className: p, viewBox: s, children: /* @__PURE__ */ t("use", { href: `#${l}` }) });
|
|
640
|
-
},
|
|
640
|
+
}, wr = B(
|
|
641
641
|
({
|
|
642
642
|
children: o,
|
|
643
643
|
className: l,
|
|
@@ -645,14 +645,14 @@ const Se = te.Fragment, t = te.jsx, d = te.jsxs, y = ({
|
|
|
645
645
|
closeAlert: c = !1,
|
|
646
646
|
onClose: p,
|
|
647
647
|
title: n,
|
|
648
|
-
date:
|
|
648
|
+
date: v,
|
|
649
649
|
ariaLive: b = "polite",
|
|
650
|
-
...
|
|
650
|
+
...h
|
|
651
651
|
}, x) => {
|
|
652
|
-
const N = [l, "pkt-alert", s && `pkt-alert--${s}`].filter(Boolean).join(" "), [T, P] = dr(!0),
|
|
652
|
+
const N = [l, "pkt-alert", s && `pkt-alert--${s}`].filter(Boolean).join(" "), [T, P] = dr(!0), O = () => {
|
|
653
653
|
P(!1), p && p();
|
|
654
654
|
};
|
|
655
|
-
return T ? /* @__PURE__ */ d("div", { ...
|
|
655
|
+
return T ? /* @__PURE__ */ d("div", { ...h, className: N, "aria-live": b, ref: x, children: [
|
|
656
656
|
/* @__PURE__ */ t("div", { className: "pkt-alert__icon", children: /* @__PURE__ */ t(y, { name: s === "info" ? "alert-information" : `alert-${s}` }) }),
|
|
657
657
|
c && /* @__PURE__ */ t("div", { className: "pkt-alert__close", children: /* @__PURE__ */ t(
|
|
658
658
|
"button",
|
|
@@ -661,19 +661,19 @@ const Se = te.Fragment, t = te.jsx, d = te.jsxs, y = ({
|
|
|
661
661
|
className: "pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",
|
|
662
662
|
tabIndex: 0,
|
|
663
663
|
"aria-label": "close",
|
|
664
|
-
onClick:
|
|
664
|
+
onClick: O,
|
|
665
665
|
children: /* @__PURE__ */ t(y, { name: "close", className: "pkt-btn__icon", "aria-hidden": "true" })
|
|
666
666
|
}
|
|
667
667
|
) }),
|
|
668
668
|
n && /* @__PURE__ */ t("div", { className: "pkt-alert__title", children: n }),
|
|
669
669
|
/* @__PURE__ */ t("div", { className: "pkt-alert__text", children: o }),
|
|
670
|
-
|
|
670
|
+
v && /* @__PURE__ */ d("div", { className: "pkt-alert__date", children: [
|
|
671
671
|
"Sist oppdatert: ",
|
|
672
|
-
|
|
672
|
+
v
|
|
673
673
|
] })
|
|
674
674
|
] }) : null;
|
|
675
675
|
}
|
|
676
|
-
), vr =
|
|
676
|
+
), vr = B(
|
|
677
677
|
({
|
|
678
678
|
children: o,
|
|
679
679
|
className: l,
|
|
@@ -681,9 +681,9 @@ const Se = te.Fragment, t = te.jsx, d = te.jsxs, y = ({
|
|
|
681
681
|
secondIconName: c = "user",
|
|
682
682
|
size: p = "medium",
|
|
683
683
|
skin: n = "primary",
|
|
684
|
-
type:
|
|
684
|
+
type: v = "button",
|
|
685
685
|
variant: b = "label-only",
|
|
686
|
-
...
|
|
686
|
+
...h
|
|
687
687
|
}, x) => {
|
|
688
688
|
const N = [
|
|
689
689
|
l,
|
|
@@ -692,7 +692,7 @@ const Se = te.Fragment, t = te.jsx, d = te.jsxs, y = ({
|
|
|
692
692
|
n && `pkt-btn--${n}`,
|
|
693
693
|
b && `pkt-btn--${b}`
|
|
694
694
|
].filter(Boolean).join(" ");
|
|
695
|
-
return /* @__PURE__ */ d("button", { ...
|
|
695
|
+
return /* @__PURE__ */ d("button", { ...h, className: N, type: v, ref: x, children: [
|
|
696
696
|
/* @__PURE__ */ t(y, { className: "pkt-btn__icon", name: s }),
|
|
697
697
|
/* @__PURE__ */ t("span", { className: "pkt-btn__text", children: o }),
|
|
698
698
|
b === "icons-right-and-left" && /* @__PURE__ */ t(y, { className: "pkt-btn__icon", name: c })
|
|
@@ -700,7 +700,7 @@ const Se = te.Fragment, t = te.jsx, d = te.jsxs, y = ({
|
|
|
700
700
|
}
|
|
701
701
|
);
|
|
702
702
|
vr.displayName = "PktButton";
|
|
703
|
-
const
|
|
703
|
+
const Tr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
704
704
|
var c, p;
|
|
705
705
|
return /* @__PURE__ */ t("footer", { className: "pkt-footer", "data-mode": "dark", children: /* @__PURE__ */ d("div", { className: "pkt-footer__container", children: [
|
|
706
706
|
/* @__PURE__ */ d("div", { className: "pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16", children: [
|
|
@@ -708,7 +708,7 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
708
708
|
/* @__PURE__ */ t("h2", { className: "pkt-footer__title", children: o.title }),
|
|
709
709
|
/* @__PURE__ */ d("ul", { className: "pkt-footer__list", children: [
|
|
710
710
|
o.text && /* @__PURE__ */ t("li", { className: "pkt-footer__text", children: o.text }),
|
|
711
|
-
(c = o.links) == null ? void 0 : c.map((n,
|
|
711
|
+
(c = o.links) == null ? void 0 : c.map((n, v) => /* @__PURE__ */ t("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ d(
|
|
712
712
|
"a",
|
|
713
713
|
{
|
|
714
714
|
className: `pkt-footer__link ${n.external ? "pkt-link--external" : ""}`,
|
|
@@ -720,14 +720,14 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
720
720
|
n.text
|
|
721
721
|
]
|
|
722
722
|
}
|
|
723
|
-
) }, `links-${
|
|
723
|
+
) }, `links-${v}`))
|
|
724
724
|
] })
|
|
725
725
|
] }),
|
|
726
726
|
/* @__PURE__ */ d("div", { className: "pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up", children: [
|
|
727
727
|
/* @__PURE__ */ t("h2", { className: "pkt-footer__title", children: l.title }),
|
|
728
728
|
/* @__PURE__ */ d("ul", { className: "pkt-footer__list", children: [
|
|
729
729
|
l.text && /* @__PURE__ */ t("li", { className: "pkt-footer__text", children: l.text }),
|
|
730
|
-
(p = l.links) == null ? void 0 : p.map((n,
|
|
730
|
+
(p = l.links) == null ? void 0 : p.map((n, v) => /* @__PURE__ */ t("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ d(
|
|
731
731
|
"a",
|
|
732
732
|
{
|
|
733
733
|
className: `pkt-footer__link ${n.external ? "pkt-link--external" : ""}`,
|
|
@@ -739,7 +739,7 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
739
739
|
n.text
|
|
740
740
|
]
|
|
741
741
|
}
|
|
742
|
-
) }, `links-${
|
|
742
|
+
) }, `links-${v}`))
|
|
743
743
|
] })
|
|
744
744
|
] }),
|
|
745
745
|
/* @__PURE__ */ d("div", { className: "pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up", children: [
|
|
@@ -764,7 +764,7 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
764
764
|
] })
|
|
765
765
|
] }),
|
|
766
766
|
s && /* @__PURE__ */ d("div", { className: "pkt-footer__social", "aria-label": "standard lenker", children: [
|
|
767
|
-
/* @__PURE__ */ t("div", { className: "pkt-footer__social-languages", children: s.filter((n) => n.language).map((n,
|
|
767
|
+
/* @__PURE__ */ t("div", { className: "pkt-footer__social-languages", children: s.filter((n) => n.language).map((n, v) => /* @__PURE__ */ t("div", { className: "pkt-footer__social-language", children: /* @__PURE__ */ t(
|
|
768
768
|
"a",
|
|
769
769
|
{
|
|
770
770
|
href: n.href,
|
|
@@ -773,8 +773,8 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
773
773
|
rel: n.openInNewTab ? "noopener noreferrer" : void 0,
|
|
774
774
|
children: n.language
|
|
775
775
|
}
|
|
776
|
-
) }, `sociallinks-language-${
|
|
777
|
-
/* @__PURE__ */ t("div", { className: "pkt-footer__social-icons", children: s.filter((n) => n.iconName).map((n,
|
|
776
|
+
) }, `sociallinks-language-${v}`)) }),
|
|
777
|
+
/* @__PURE__ */ t("div", { className: "pkt-footer__social-icons", children: s.filter((n) => n.iconName).map((n, v) => /* @__PURE__ */ t(z.Fragment, { children: /* @__PURE__ */ t(
|
|
778
778
|
"a",
|
|
779
779
|
{
|
|
780
780
|
href: n.href,
|
|
@@ -784,10 +784,10 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
784
784
|
rel: n.openInNewTab ? "noopener noreferrer" : void 0,
|
|
785
785
|
children: /* @__PURE__ */ t("svg", { className: "pkt-footer__social-icon", viewBox: "0 0 32 32", "aria-hidden": "true", children: /* @__PURE__ */ t("use", { href: `#${n.iconName}` }) })
|
|
786
786
|
}
|
|
787
|
-
) }, `sociallinks-${
|
|
787
|
+
) }, `sociallinks-${v}`)) })
|
|
788
788
|
] })
|
|
789
789
|
] }) });
|
|
790
|
-
},
|
|
790
|
+
}, Pr = ({
|
|
791
791
|
links: o = []
|
|
792
792
|
}) => /* @__PURE__ */ t("footer", { className: "pkt-footer-simple", "data-mode": "dark", children: /* @__PURE__ */ t("div", { className: "pkt-footer-simple__container", children: /* @__PURE__ */ d("ul", { className: "pkt-footer-simple__list", children: [
|
|
793
793
|
o.map((l, s) => /* @__PURE__ */ t("li", { className: "pkt-footer-simple__list-item", children: /* @__PURE__ */ d(
|
|
@@ -817,16 +817,16 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
817
817
|
/* @__PURE__ */ t(y, { className: "pkt-footer-simple__link-icon", name: "chevron-right" }),
|
|
818
818
|
"Tilgjengelighet"
|
|
819
819
|
] }) })
|
|
820
|
-
] }) }) }),
|
|
820
|
+
] }) }) }), jr = ({
|
|
821
821
|
className: o,
|
|
822
822
|
logoLink: l = "https://www.oslo.kommune.no/",
|
|
823
823
|
isLoggedIn: s = !1,
|
|
824
824
|
representing: c = "",
|
|
825
825
|
canChangeRepresentation: p = !1,
|
|
826
826
|
showLogInButton: n = !0,
|
|
827
|
-
onLogIn:
|
|
827
|
+
onLogIn: v,
|
|
828
828
|
onLogOut: b,
|
|
829
|
-
onChangeRepresentation:
|
|
829
|
+
onChangeRepresentation: h
|
|
830
830
|
}) => {
|
|
831
831
|
const x = [o, "pkt-header"].filter(Boolean).join(" ");
|
|
832
832
|
return /* @__PURE__ */ d("header", { id: "pkt-header", className: x, "aria-label": "Topp", children: [
|
|
@@ -845,7 +845,7 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
845
845
|
{
|
|
846
846
|
className: "pkt-btn pkt-btn--secondary pkt-btn--icon-right",
|
|
847
847
|
"aria-label": `Bytt bruker fra ${c}`,
|
|
848
|
-
onClick:
|
|
848
|
+
onClick: h,
|
|
849
849
|
children: [
|
|
850
850
|
/* @__PURE__ */ t(y, { name: "user", className: "pkt-btn__icon pkt-show-tablet-up" }),
|
|
851
851
|
/* @__PURE__ */ t("span", { className: "pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15", children: "Endre" }),
|
|
@@ -875,7 +875,7 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
875
875
|
{
|
|
876
876
|
className: "pkt-btn pkt-btn--tertiary pkt-btn--icon-right",
|
|
877
877
|
"aria-label": "Logg inn",
|
|
878
|
-
onClick:
|
|
878
|
+
onClick: v,
|
|
879
879
|
children: [
|
|
880
880
|
/* @__PURE__ */ t(y, { className: "pkt-btn__icon", name: "user" }),
|
|
881
881
|
/* @__PURE__ */ t("span", { className: "pkt-btn__text", children: "Logg inn" })
|
|
@@ -884,7 +884,7 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
884
884
|
)
|
|
885
885
|
] })
|
|
886
886
|
] });
|
|
887
|
-
}, kr =
|
|
887
|
+
}, kr = z.forwardRef(
|
|
888
888
|
({ label: o, id: l, children: s, ...c }, p) => /* @__PURE__ */ d("div", { className: "pkt-form-group", children: [
|
|
889
889
|
/* @__PURE__ */ t("label", { htmlFor: l, className: "pkt-form-label", children: o }),
|
|
890
890
|
/* @__PURE__ */ t("input", { className: "pkt-form-input", id: l, ...c, ref: p }),
|
|
@@ -892,33 +892,39 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
892
892
|
] })
|
|
893
893
|
);
|
|
894
894
|
kr.displayName = "PktInput";
|
|
895
|
-
const
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
"
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
/* @__PURE__ */ t(
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
895
|
+
const br = B(
|
|
896
|
+
({
|
|
897
|
+
children: o,
|
|
898
|
+
className: l,
|
|
899
|
+
iconName: s = "user",
|
|
900
|
+
openInNewTab: c = !1,
|
|
901
|
+
skin: p = "normal",
|
|
902
|
+
href: n = "#",
|
|
903
|
+
external: v = !1,
|
|
904
|
+
title: b
|
|
905
|
+
}, h) => {
|
|
906
|
+
const x = [l, "pkt-linkcard", p && `pkt-linkcard--${p}`].filter(Boolean).join(" ");
|
|
907
|
+
return /* @__PURE__ */ d(
|
|
908
|
+
"a",
|
|
909
|
+
{
|
|
910
|
+
href: n,
|
|
911
|
+
className: `pkt-linkcard pkt-link ${x}`,
|
|
912
|
+
target: c ? "_blank" : "_self",
|
|
913
|
+
rel: c ? "noopener noreferrer" : void 0,
|
|
914
|
+
ref: h,
|
|
915
|
+
children: [
|
|
916
|
+
/* @__PURE__ */ t(y, { className: "pkt-link__icon", name: s }),
|
|
917
|
+
/* @__PURE__ */ d("div", { className: "pkt-linkcard__content", children: [
|
|
918
|
+
/* @__PURE__ */ t("div", { className: `pkt-linkcard__title ${v ? "pkt-link pkt-link--external" : ""}`, children: b }),
|
|
919
|
+
/* @__PURE__ */ t("div", { className: "pkt-linkcard__text", children: o })
|
|
920
|
+
] })
|
|
921
|
+
]
|
|
922
|
+
}
|
|
923
|
+
);
|
|
924
|
+
}
|
|
925
|
+
);
|
|
926
|
+
br.displayName = "PktLinkCard";
|
|
927
|
+
const Sr = ({
|
|
922
928
|
children: o,
|
|
923
929
|
skin: l = "beige",
|
|
924
930
|
title: s,
|
|
@@ -929,18 +935,18 @@ const jr = ({
|
|
|
929
935
|
/* @__PURE__ */ t("div", { className: "pkt-messagebox__title", children: s }),
|
|
930
936
|
/* @__PURE__ */ t("div", { className: "pkt-messagebox__text", children: o })
|
|
931
937
|
] });
|
|
932
|
-
},
|
|
938
|
+
}, gr = B(
|
|
933
939
|
({ id: o, name: l, label: s, value: c, ...p }, n) => /* @__PURE__ */ d("div", { className: "pkt-form-group", children: [
|
|
934
940
|
/* @__PURE__ */ t("input", { type: "radio", className: "pkt-form-check-input", id: o, name: l, value: c, ref: n, ...p }),
|
|
935
941
|
/* @__PURE__ */ t("label", { className: "pkt-form-label", htmlFor: o, children: s })
|
|
936
942
|
] })
|
|
937
943
|
);
|
|
938
|
-
|
|
939
|
-
const
|
|
944
|
+
gr.displayName = "PktRadio";
|
|
945
|
+
const Cr = ({ label: o, children: l }) => /* @__PURE__ */ d(Se, { children: [
|
|
940
946
|
/* @__PURE__ */ t("p", { children: o }),
|
|
941
947
|
/* @__PURE__ */ t("div", { className: "pkt-form-group", children: l })
|
|
942
948
|
] });
|
|
943
|
-
var
|
|
949
|
+
var Ce = { exports: {} };
|
|
944
950
|
/*!
|
|
945
951
|
Copyright (c) 2018 Jed Watson.
|
|
946
952
|
Licensed under the MIT License (MIT), see
|
|
@@ -953,21 +959,21 @@ var Oe = { exports: {} };
|
|
|
953
959
|
for (var c = [], p = 0; p < arguments.length; p++) {
|
|
954
960
|
var n = arguments[p];
|
|
955
961
|
if (n) {
|
|
956
|
-
var
|
|
957
|
-
if (
|
|
962
|
+
var v = typeof n;
|
|
963
|
+
if (v === "string" || v === "number")
|
|
958
964
|
c.push(n);
|
|
959
965
|
else if (Array.isArray(n)) {
|
|
960
966
|
if (n.length) {
|
|
961
967
|
var b = s.apply(null, n);
|
|
962
968
|
b && c.push(b);
|
|
963
969
|
}
|
|
964
|
-
} else if (
|
|
970
|
+
} else if (v === "object") {
|
|
965
971
|
if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]")) {
|
|
966
972
|
c.push(n.toString());
|
|
967
973
|
continue;
|
|
968
974
|
}
|
|
969
|
-
for (var
|
|
970
|
-
l.call(n,
|
|
975
|
+
for (var h in n)
|
|
976
|
+
l.call(n, h) && n[h] && c.push(h);
|
|
971
977
|
}
|
|
972
978
|
}
|
|
973
979
|
}
|
|
@@ -975,16 +981,16 @@ var Oe = { exports: {} };
|
|
|
975
981
|
}
|
|
976
982
|
o.exports ? (s.default = s, o.exports = s) : window.classNames = s;
|
|
977
983
|
})();
|
|
978
|
-
})(
|
|
979
|
-
var
|
|
980
|
-
const
|
|
984
|
+
})(Ce);
|
|
985
|
+
var Nr = Ce.exports;
|
|
986
|
+
const yr = /* @__PURE__ */ mr(Nr), Er = ({ isResponsive: o, children: l }) => o ? /* @__PURE__ */ t("div", { className: "pkt-table-container", children: l }) : /* @__PURE__ */ t(Se, { children: l }), Or = ({
|
|
981
987
|
isResponsive: o,
|
|
982
988
|
modifiers: { info: l = !1, success: s = !1, strong: c = !1, shadow: p = !1 } = {},
|
|
983
989
|
children: n
|
|
984
|
-
}) => /* @__PURE__ */ t(
|
|
990
|
+
}) => /* @__PURE__ */ t(Er, { isResponsive: o, children: /* @__PURE__ */ t(
|
|
985
991
|
"table",
|
|
986
992
|
{
|
|
987
|
-
className:
|
|
993
|
+
className: yr("pkt-table", {
|
|
988
994
|
"pkt-table--info": l,
|
|
989
995
|
"pkt-table--success": s,
|
|
990
996
|
"pkt-table--strong": c,
|
|
@@ -992,26 +998,26 @@ const Nr = /* @__PURE__ */ mr(gr), yr = ({ isResponsive: o, children: l }) => o
|
|
|
992
998
|
}),
|
|
993
999
|
children: n
|
|
994
1000
|
}
|
|
995
|
-
) }),
|
|
1001
|
+
) }), $r = ({ children: o }) => /* @__PURE__ */ t("td", { className: "pkt-table__th", children: o }), Fr = ({ children: o }) => /* @__PURE__ */ t("th", { className: "pkt-table__th", children: o }), Rr = B(
|
|
996
1002
|
({ id: o, label: l, ...s }, c) => /* @__PURE__ */ d("div", { className: "pkt-form-group", children: [
|
|
997
1003
|
/* @__PURE__ */ t("label", { htmlFor: o, className: "pkt-form-label", children: l }),
|
|
998
1004
|
/* @__PURE__ */ t("textarea", { className: "pkt-form-textarea", id: o, ref: c, ...s })
|
|
999
1005
|
] })
|
|
1000
1006
|
);
|
|
1001
|
-
|
|
1007
|
+
Rr.displayName = "PktTextarea";
|
|
1002
1008
|
export {
|
|
1003
|
-
|
|
1009
|
+
wr as PktAlert,
|
|
1004
1010
|
vr as PktButton,
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1011
|
+
Tr as PktFooter,
|
|
1012
|
+
Pr as PktFooterSimple,
|
|
1013
|
+
jr as PktHeader,
|
|
1008
1014
|
kr as PktInput,
|
|
1009
|
-
|
|
1015
|
+
br as PktLinkCard,
|
|
1010
1016
|
Sr as PktMessagebox,
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
+
gr as PktRadio,
|
|
1018
|
+
Cr as PktRadioGroup,
|
|
1019
|
+
Or as PktTable,
|
|
1020
|
+
$r as PktTableData,
|
|
1021
|
+
Fr as PktTableHeader,
|
|
1022
|
+
Rr as PktTextarea
|
|
1017
1023
|
};
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(b,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],P):(b=typeof globalThis<"u"?globalThis:b||self,P(b["punkt-react"]={},b.React))})(this,function(b,P){"use strict";function
|
|
1
|
+
(function(b,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],P):(b=typeof globalThis<"u"?globalThis:b||self,P(b["punkt-react"]={},b.React))})(this,function(b,P){"use strict";function $e(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var H={exports:{}},W={};/**
|
|
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
|
|
9
|
+
*/var ae;function We(){if(ae)return W;ae=1;var o=P,l=Symbol.for("react.element"),s=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,d=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n={key:!0,ref:!0,__self:!0,__source:!0};function v(g,h,T){var R,j={},S=null,D=null;T!==void 0&&(S=""+T),h.key!==void 0&&(S=""+h.key),h.ref!==void 0&&(D=h.ref);for(R in h)c.call(h,R)&&!n.hasOwnProperty(R)&&(j[R]=h[R]);if(g&&g.defaultProps)for(R in h=g.defaultProps,h)j[R]===void 0&&(j[R]=h[R]);return{$$typeof:l,type:g,key:S,ref:D,props:j,_owner:d.current}}return W.Fragment=s,W.jsx=v,W.jsxs=v,W}var Y={};/**
|
|
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
|
|
18
|
-
`+X+e}}var Z=!1,V;{var
|
|
17
|
+
*/var ne;function Ye(){return ne||(ne=1,process.env.NODE_ENV!=="production"&&function(){var o=P,l=Symbol.for("react.element"),s=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),g=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),pe=Symbol.iterator,Qe="@@iterator";function qe(e){if(e===null||typeof e!="object")return null;var t=pe&&e[pe]||e[Qe];return typeof t=="function"?t:null}var I=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var t=arguments.length,a=new Array(t>1?t-1:0),i=1;i<t;i++)a[i-1]=arguments[i];et("error",e,a)}}function et(e,t,a){{var i=I.ReactDebugCurrentFrame,m=i.getStackAddendum();m!==""&&(t+="%s",a=a.concat([m]));var _=a.map(function(u){return String(u)});_.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,_)}}var tt=!1,rt=!1,at=!1,nt=!1,ot=!1,de;de=Symbol.for("react.module.reference");function it(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===n||ot||e===d||e===T||e===R||nt||e===D||tt||rt||at||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===j||e.$$typeof===v||e.$$typeof===g||e.$$typeof===h||e.$$typeof===de||e.getModuleId!==void 0))}function lt(e,t,a){var i=e.displayName;if(i)return i;var m=t.displayName||t.name||"";return m!==""?a+"("+m+")":a}function me(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 c:return"Fragment";case s:return"Portal";case n:return"Profiler";case d:return"StrictMode";case T:return"Suspense";case R:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case g:var t=e;return me(t)+".Consumer";case v:var a=e;return me(a._context)+".Provider";case h:return lt(e,e.render,"ForwardRef");case j:var i=e.displayName||null;return i!==null?i:C(e.type)||"Memo";case S:{var m=e,_=m._payload,u=m._init;try{return C(u(_))}catch{return null}}}return null}var F=Object.assign,B=0,he,_e,ve,ke,be,ge,Ne;function ye(){}ye.__reactDisabledLog=!0;function st(){{if(B===0){he=console.log,_e=console.info,ve=console.warn,ke=console.error,be=console.group,ge=console.groupCollapsed,Ne=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ye,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}B++}}function ct(){{if(B--,B===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},e,{value:he}),info:F({},e,{value:_e}),warn:F({},e,{value:ve}),error:F({},e,{value:ke}),group:F({},e,{value:be}),groupCollapsed:F({},e,{value:ge}),groupEnd:F({},e,{value:Ne})})}B<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=I.ReactCurrentDispatcher,X;function L(e,t,a){{if(X===void 0)try{throw Error()}catch(m){var i=m.stack.trim().match(/\n( *(at )?)/);X=i&&i[1]||""}return`
|
|
18
|
+
`+X+e}}var Z=!1,V;{var ft=typeof WeakMap=="function"?WeakMap:Map;V=new ft}function Re(e,t){if(!e||Z)return"";{var a=V.get(e);if(a!==void 0)return a}var i;Z=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var _;_=K.current,K.current=null,st();try{if(t){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(O){i=O}Reflect.construct(e,[],u)}else{try{u.call()}catch(O){i=O}e.call(u.prototype)}}else{try{throw Error()}catch(O){i=O}e()}}catch(O){if(O&&i&&typeof O.stack=="string"){for(var f=O.stack.split(`
|
|
19
19
|
`),w=i.stack.split(`
|
|
20
|
-
`),k=
|
|
21
|
-
`+
|
|
20
|
+
`),k=f.length-1,N=w.length-1;k>=1&&N>=0&&f[k]!==w[N];)N--;for(;k>=1&&N>=0;k--,N--)if(f[k]!==w[N]){if(k!==1||N!==1)do if(k--,N--,N<0||f[k]!==w[N]){var x=`
|
|
21
|
+
`+f[k].replace(" at new "," at ");return e.displayName&&x.includes("<anonymous>")&&(x=x.replace("<anonymous>",e.displayName)),typeof e=="function"&&V.set(e,x),x}while(k>=1&&N>=0);break}}}finally{Z=!1,K.current=_,ct(),Error.prepareStackTrace=m}var $=e?e.displayName||e.name:"",Ae=$?L($):"";return typeof e=="function"&&V.set(e,Ae),Ae}function ut(e,t,a){return Re(e,!1)}function pt(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function U(e,t,a){if(e==null)return"";if(typeof e=="function")return Re(e,pt(e));if(typeof e=="string")return L(e);switch(e){case T:return L("Suspense");case R:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case h:return ut(e.render);case j:return U(e.type,t,a);case S:{var i=e,m=i._payload,_=i._init;try{return U(_(m),t,a)}catch{}}}return""}var G=Object.prototype.hasOwnProperty,Ee={},we=I.ReactDebugCurrentFrame;function z(e){if(e){var t=e._owner,a=U(e.type,e._source,t?t.type:null);we.setExtraStackFrame(a)}else we.setExtraStackFrame(null)}function dt(e,t,a,i,m){{var _=Function.call.bind(G);for(var u in e)if(_(e,u)){var f=void 0;try{if(typeof e[u]!="function"){var w=Error((i||"React class")+": "+a+" 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 w.name="Invariant Violation",w}f=e[u](t,u,i,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(k){f=k}f&&!(f instanceof Error)&&(z(m),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).",i||"React class",a,u,typeof f),z(null)),f instanceof Error&&!(f.message in Ee)&&(Ee[f.message]=!0,z(m),E("Failed %s type: %s",a,f.message),z(null))}}}var mt=Array.isArray;function Q(e){return mt(e)}function ht(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,a=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a}}function _t(e){try{return Pe(e),!1}catch{return!0}}function Pe(e){return""+e}function Te(e){if(_t(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ht(e)),Pe(e)}var M=I.ReactCurrentOwner,vt={key:!0,ref:!0,__self:!0,__source:!0},xe,je,q;q={};function kt(e){if(G.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function bt(e){if(G.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function gt(e,t){if(typeof e.ref=="string"&&M.current&&t&&M.current.stateNode!==t){var a=C(M.current.type);q[a]||(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(M.current.type),e.ref),q[a]=!0)}}function Nt(e,t){{var a=function(){xe||(xe=!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)",t))};a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}}function yt(e,t){{var a=function(){je||(je=!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)",t))};a.isReactWarning=!0,Object.defineProperty(e,"ref",{get:a,configurable:!0})}}var Rt=function(e,t,a,i,m,_,u){var f={$$typeof:l,type:e,key:t,ref:a,props:u,_owner:_};return f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(f,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(f,"_source",{configurable:!1,enumerable:!1,writable:!1,value:m}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f};function Et(e,t,a,i,m){{var _,u={},f=null,w=null;a!==void 0&&(Te(a),f=""+a),bt(t)&&(Te(t.key),f=""+t.key),kt(t)&&(w=t.ref,gt(t,m));for(_ in t)G.call(t,_)&&!vt.hasOwnProperty(_)&&(u[_]=t[_]);if(e&&e.defaultProps){var k=e.defaultProps;for(_ in k)u[_]===void 0&&(u[_]=k[_])}if(f||w){var N=typeof e=="function"?e.displayName||e.name||"Unknown":e;f&&Nt(u,N),w&&yt(u,N)}return Rt(e,f,w,m,i,M.current,u)}}var ee=I.ReactCurrentOwner,Se=I.ReactDebugCurrentFrame;function A(e){if(e){var t=e._owner,a=U(e.type,e._source,t?t.type:null);Se.setExtraStackFrame(a)}else Se.setExtraStackFrame(null)}var te;te=!1;function re(e){return typeof e=="object"&&e!==null&&e.$$typeof===l}function Ce(){{if(ee.current){var e=C(ee.current.type);if(e)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function wt(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),a=e.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+t+":"+a+"."}return""}}var Oe={};function Pt(e){{var t=
|
|
25
|
+
Check your code at `+t+":"+a+"."}return""}}var Oe={};function Pt(e){{var t=Ce();if(!t){var a=typeof e=="string"?e:e.displayName||e.name;a&&(t=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+a+">.")}return t}}function Ce(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=Pt(t);if(Oe[a])return;Oe[a]=!0;var i="";e&&e._owner&&e._owner!==ee.current&&(i=" It was passed a child from "+O(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.',a,i),A(null)}}function Fe(e,t){{if(typeof e!="object")return;if(q(e))for(var a=0;a<e.length;a++){var i=e[a];re(i)&&Ce(i,t)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var m=Qe(e);if(typeof m=="function"&&m!==e.entries)for(var h=m.call(e),f;!(f=h.next()).done;)re(f.value)&&Ce(f.value,t)}}}function Tt(e){{var t=e.type;if(t==null||typeof t=="string")return;var a;if(typeof t=="function")a=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===v||t.$$typeof===j))a=t.propTypes;else return;if(a){var i=O(t);dt(a,e.props,"prop",i,e)}else if(t.PropTypes!==void 0&&!te){te=!0;var m=O(t);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",m||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xt(e){{for(var t=Object.keys(e.props),a=0;a<t.length;a++){var i=t[a];if(i!=="children"&&i!=="key"){A(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",i),A(null);break}}e.ref!==null&&(A(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function De(e,t,a,i,m,h){{var f=it(e);if(!f){var u="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(u+=" 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 w=wt(m);w?u+=w:u+=Se();var k;e===null?k="null":q(e)?k="array":e!==void 0&&e.$$typeof===l?(k="<"+(O(e.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):k=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",k,u)}var N=Et(e,t,a,m,h);if(N==null)return N;if(f){var x=t.children;if(x!==void 0)if(i)if(q(x)){for(var $=0;$<x.length;$++)Fe(x[$],e);Object.freeze&&Object.freeze(x)}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 Fe(x,e)}return e===c?xt(N):Tt(N),N}}function jt(e,t,a){return De(e,t,a,!0)}function St(e,t,a){return De(e,t,a,!1)}var Ot=St,Ct=jt;Y.Fragment=c,Y.jsx=Ot,Y.jsxs=Ct}()),Y}process.env.NODE_ENV==="production"?H.exports=$e():H.exports=We();var J=H.exports;const oe=J.Fragment,r=J.jsx,p=J.jsxs,y=({className:o,name:l,viewBox:s="0 0 32 32",...c})=>{const d=[o].filter(Boolean).join(" ");return r("svg",{...c,className:d,viewBox:s,children:r("use",{href:`#${l}`})})},Ye=P.forwardRef(({children:o,className:l,skin:s="info",closeAlert:c=!1,onClose:d,title:n,date:_,ariaLive:g="polite",...v},T)=>{const R=[l,"pkt-alert",s&&`pkt-alert--${s}`].filter(Boolean).join(" "),[j,S]=P.useState(!0),D=()=>{S(!1),d&&d()};return j?p("div",{...v,className:R,"aria-live":g,ref:T,children:[r("div",{className:"pkt-alert__icon",children:r(y,{name:s==="info"?"alert-information":`alert-${s}`})}),c&&r("div",{className:"pkt-alert__close",children:r("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:D,children:r(y,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),n&&r("div",{className:"pkt-alert__title",children:n}),r("div",{className:"pkt-alert__text",children:o}),_&&p("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",_]})]}):null}),ie=P.forwardRef(({children:o,className:l,iconName:s="user",secondIconName:c="user",size:d="medium",skin:n="primary",type:_="button",variant:g="label-only",...v},T)=>{const R=[l,"pkt-btn",d&&`pkt-btn--${d}`,n&&`pkt-btn--${n}`,g&&`pkt-btn--${g}`].filter(Boolean).join(" ");return p("button",{...v,className:R,type:_,ref:T,children:[r(y,{className:"pkt-btn__icon",name:s}),r("span",{className:"pkt-btn__text",children:o}),g==="icons-right-and-left"&&r(y,{className:"pkt-btn__icon",name:c})]})});ie.displayName="PktButton";const Be=({columnOne:o,columnTwo:l,socialLinks:s})=>{var c,d;return r("footer",{className:"pkt-footer","data-mode":"dark",children:p("div",{className:"pkt-footer__container",children:[p("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[p("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[r("h2",{className:"pkt-footer__title",children:o.title}),p("ul",{className:"pkt-footer__list",children:[o.text&&r("li",{className:"pkt-footer__text",children:o.text}),(c=o.links)==null?void 0:c.map((n,_)=>r("li",{className:"pkt-footer__list-item",children:p("a",{className:`pkt-footer__link ${n.external?"pkt-link--external":""}`,href:n.href,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:[r(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),n.text]})},`links-${_}`))]})]}),p("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[r("h2",{className:"pkt-footer__title",children:l.title}),p("ul",{className:"pkt-footer__list",children:[l.text&&r("li",{className:"pkt-footer__text",children:l.text}),(d=l.links)==null?void 0:d.map((n,_)=>r("li",{className:"pkt-footer__list-item",children:p("a",{className:`pkt-footer__link ${n.external?"pkt-link--external":""}`,href:n.href,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:[r(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),n.text]})},`links-${_}`))]})]}),p("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[r("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),p("ul",{className:"pkt-footer__list",children:[r("li",{className:"pkt-footer__list-item",children:p("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[r(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),r("li",{className:"pkt-footer__list-item",children:p("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[r(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),s&&p("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[r("div",{className:"pkt-footer__social-languages",children:s.filter(n=>n.language).map((n,_)=>r("div",{className:"pkt-footer__social-language",children:r("a",{href:n.href,"aria-label":`til ${n.language} versjon av nettsiden`,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:n.language})},`sociallinks-language-${_}`))}),r("div",{className:"pkt-footer__social-icons",children:s.filter(n=>n.iconName).map((n,_)=>r(P.Fragment,{children:r("a",{href:n.href,"aria-label":`til ${n.iconName}`,className:"pkt-footer__social-icon-link",target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:r("svg",{className:"pkt-footer__social-icon",viewBox:"0 0 32 32","aria-hidden":"true",children:r("use",{href:`#${n.iconName}`})})})},`sociallinks-${_}`))})]})]})})},Me=({links:o=[]})=>r("footer",{className:"pkt-footer-simple","data-mode":"dark",children:r("div",{className:"pkt-footer-simple__container",children:p("ul",{className:"pkt-footer-simple__list",children:[o.map((l,s)=>r("li",{className:"pkt-footer-simple__list-item",children:p("a",{className:`pkt-footer-simple__link ${l.external?" pkt-link--external":""}`,href:l.href,target:l.openInNewTab?"_blank":"_self",rel:l.openInNewTab?"noopener noreferrer":void 0,children:[r(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),l.text]})},s)),r("li",{className:"pkt-footer-simple__list-item",children:p("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[r(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),r("li",{className:"pkt-footer-simple__list-item",children:p("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[r(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})}),Le=({className:o,logoLink:l="https://www.oslo.kommune.no/",isLoggedIn:s=!1,representing:c="",canChangeRepresentation:d=!1,showLogInButton:n=!0,onLogIn:_,onLogOut:g,onChangeRepresentation:v})=>{const T=[o,"pkt-header"].filter(Boolean).join(" ");return p("header",{id:"pkt-header",className:T,"aria-label":"Topp",children:[r("div",{className:"pkt-header__logo",children:r("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:l,children:r(y,{name:"oslologo",className:"pkt-header__logo-svg",viewBox:"0 0 60 31","aria-hidden":"true"})})}),p("div",{className:"pkt-header__actions",children:[s&&d&&p("button",{className:"pkt-btn pkt-btn--secondary pkt-btn--icon-right","aria-label":`Bytt bruker fra ${c}`,onClick:v,children:[r(y,{name:"user",className:"pkt-btn__icon pkt-show-tablet-up"}),r("span",{className:"pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15",children:"Endre"}),r("span",{className:"pkt-btn__text pkt-hide-tablet-up",children:"Endre"}),r("span",{className:"pkt-btn__text--representing pkt-hide pkt-show-tablet-up",children:c})]}),s&&!d&&p("div",{className:"pkt-header__action",children:[r("span",{className:"pkt-header__action-text",children:r("span",{className:"pkt-btn__text pkt-header__action-textrow text-row-inline pkt-truncate-text",children:c})}),r("span",{className:"pkt-header__action-icon pkt-show-phablet-up",children:r(y,{name:"user"})})]}),n&&s&&p("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg ut",onClick:g,children:[r(y,{className:"pkt-btn__icon pkt-show-tablet-up",name:"exit"}),r("span",{className:"pkt-btn__text",children:"Logg ut"})]}),n&&!s&&p("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg inn",onClick:_,children:[r(y,{className:"pkt-btn__icon",name:"user"}),r("span",{className:"pkt-btn__text",children:"Logg inn"})]})]})]})},le=P.forwardRef(({label:o,id:l,children:s,...c},d)=>p("div",{className:"pkt-form-group",children:[r("label",{htmlFor:l,className:"pkt-form-label",children:o}),r("input",{className:"pkt-form-input",id:l,...c,ref:d}),s]}));le.displayName="PktInput";const Ve=({children:o,className:l,iconName:s="user",openInNewTab:c=!1,skin:d="",href:n="#",title:_})=>{const g=[l,"pkt-linkcard",d&&`pkt-linkcard--${d}`].filter(Boolean).join(" ");return p("a",{href:n,className:`pkt-linkcard pkt-link ${g}`,target:c?"_blank":"_self",rel:c?"noopener noreferrer":void 0,children:[r(y,{className:"pkt-link__icon",name:s}),p("div",{className:"pkt-linkcard__content",children:[r("div",{className:"pkt-linkcard__title",children:_}),r("div",{className:"pkt-linkcard__text",children:o})]})]})},Ue=({children:o,skin:l="beige",title:s,...c})=>{const d=["pkt-messagebox",l&&`pkt-messagebox--${l}`].filter(Boolean).join(" ");return p("div",{...c,className:d,children:[r("div",{className:"pkt-messagebox__title",children:s}),r("div",{className:"pkt-messagebox__text",children:o})]})},se=P.forwardRef(({id:o,name:l,label:s,value:c,...d},n)=>p("div",{className:"pkt-form-group",children:[r("input",{type:"radio",className:"pkt-form-check-input",id:o,name:l,value:c,ref:n,...d}),r("label",{className:"pkt-form-label",htmlFor:o,children:s})]}));se.displayName="PktRadio";const Ge=({label:o,children:l})=>p(oe,{children:[r("p",{children:o}),r("div",{className:"pkt-form-group",children:l})]});var ce={exports:{}};/*!
|
|
27
|
+
Check the top-level render call using <`+a+">.")}return t}}function Fe(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=Pt(t);if(Oe[a])return;Oe[a]=!0;var i="";e&&e._owner&&e._owner!==ee.current&&(i=" 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.',a,i),A(null)}}function De(e,t){{if(typeof e!="object")return;if(Q(e))for(var a=0;a<e.length;a++){var i=e[a];re(i)&&Fe(i,t)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var m=qe(e);if(typeof m=="function"&&m!==e.entries)for(var _=m.call(e),u;!(u=_.next()).done;)re(u.value)&&Fe(u.value,t)}}}function Tt(e){{var t=e.type;if(t==null||typeof t=="string")return;var a;if(typeof t=="function")a=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===h||t.$$typeof===j))a=t.propTypes;else return;if(a){var i=C(t);dt(a,e.props,"prop",i,e)}else if(t.PropTypes!==void 0&&!te){te=!0;var m=C(t);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",m||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xt(e){{for(var t=Object.keys(e.props),a=0;a<t.length;a++){var i=t[a];if(i!=="children"&&i!=="key"){A(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",i),A(null);break}}e.ref!==null&&(A(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function Ie(e,t,a,i,m,_){{var u=it(e);if(!u){var f="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(f+=" 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 w=wt(m);w?f+=w:f+=Ce();var k;e===null?k="null":Q(e)?k="array":e!==void 0&&e.$$typeof===l?(k="<"+(C(e.type)||"Unknown")+" />",f=" Did you accidentally export a JSX literal instead of a component?"):k=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",k,f)}var N=Et(e,t,a,m,_);if(N==null)return N;if(u){var x=t.children;if(x!==void 0)if(i)if(Q(x)){for(var $=0;$<x.length;$++)De(x[$],e);Object.freeze&&Object.freeze(x)}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 De(x,e)}return e===c?xt(N):Tt(N),N}}function jt(e,t,a){return Ie(e,t,a,!0)}function St(e,t,a){return Ie(e,t,a,!1)}var Ct=St,Ot=jt;Y.Fragment=c,Y.jsx=Ct,Y.jsxs=Ot}()),Y}process.env.NODE_ENV==="production"?H.exports=We():H.exports=Ye();var J=H.exports;const oe=J.Fragment,r=J.jsx,p=J.jsxs,y=({className:o,name:l,viewBox:s="0 0 32 32",...c})=>{const d=[o].filter(Boolean).join(" ");return r("svg",{...c,className:d,viewBox:s,children:r("use",{href:`#${l}`})})},Be=P.forwardRef(({children:o,className:l,skin:s="info",closeAlert:c=!1,onClose:d,title:n,date:v,ariaLive:g="polite",...h},T)=>{const R=[l,"pkt-alert",s&&`pkt-alert--${s}`].filter(Boolean).join(" "),[j,S]=P.useState(!0),D=()=>{S(!1),d&&d()};return j?p("div",{...h,className:R,"aria-live":g,ref:T,children:[r("div",{className:"pkt-alert__icon",children:r(y,{name:s==="info"?"alert-information":`alert-${s}`})}),c&&r("div",{className:"pkt-alert__close",children:r("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:D,children:r(y,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),n&&r("div",{className:"pkt-alert__title",children:n}),r("div",{className:"pkt-alert__text",children:o}),v&&p("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",v]})]}):null}),ie=P.forwardRef(({children:o,className:l,iconName:s="user",secondIconName:c="user",size:d="medium",skin:n="primary",type:v="button",variant:g="label-only",...h},T)=>{const R=[l,"pkt-btn",d&&`pkt-btn--${d}`,n&&`pkt-btn--${n}`,g&&`pkt-btn--${g}`].filter(Boolean).join(" ");return p("button",{...h,className:R,type:v,ref:T,children:[r(y,{className:"pkt-btn__icon",name:s}),r("span",{className:"pkt-btn__text",children:o}),g==="icons-right-and-left"&&r(y,{className:"pkt-btn__icon",name:c})]})});ie.displayName="PktButton";const Me=({columnOne:o,columnTwo:l,socialLinks:s})=>{var c,d;return r("footer",{className:"pkt-footer","data-mode":"dark",children:p("div",{className:"pkt-footer__container",children:[p("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[p("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[r("h2",{className:"pkt-footer__title",children:o.title}),p("ul",{className:"pkt-footer__list",children:[o.text&&r("li",{className:"pkt-footer__text",children:o.text}),(c=o.links)==null?void 0:c.map((n,v)=>r("li",{className:"pkt-footer__list-item",children:p("a",{className:`pkt-footer__link ${n.external?"pkt-link--external":""}`,href:n.href,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:[r(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),n.text]})},`links-${v}`))]})]}),p("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[r("h2",{className:"pkt-footer__title",children:l.title}),p("ul",{className:"pkt-footer__list",children:[l.text&&r("li",{className:"pkt-footer__text",children:l.text}),(d=l.links)==null?void 0:d.map((n,v)=>r("li",{className:"pkt-footer__list-item",children:p("a",{className:`pkt-footer__link ${n.external?"pkt-link--external":""}`,href:n.href,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:[r(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),n.text]})},`links-${v}`))]})]}),p("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[r("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),p("ul",{className:"pkt-footer__list",children:[r("li",{className:"pkt-footer__list-item",children:p("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[r(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),r("li",{className:"pkt-footer__list-item",children:p("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[r(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),s&&p("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[r("div",{className:"pkt-footer__social-languages",children:s.filter(n=>n.language).map((n,v)=>r("div",{className:"pkt-footer__social-language",children:r("a",{href:n.href,"aria-label":`til ${n.language} versjon av nettsiden`,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:n.language})},`sociallinks-language-${v}`))}),r("div",{className:"pkt-footer__social-icons",children:s.filter(n=>n.iconName).map((n,v)=>r(P.Fragment,{children:r("a",{href:n.href,"aria-label":`til ${n.iconName}`,className:"pkt-footer__social-icon-link",target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:r("svg",{className:"pkt-footer__social-icon",viewBox:"0 0 32 32","aria-hidden":"true",children:r("use",{href:`#${n.iconName}`})})})},`sociallinks-${v}`))})]})]})})},Le=({links:o=[]})=>r("footer",{className:"pkt-footer-simple","data-mode":"dark",children:r("div",{className:"pkt-footer-simple__container",children:p("ul",{className:"pkt-footer-simple__list",children:[o.map((l,s)=>r("li",{className:"pkt-footer-simple__list-item",children:p("a",{className:`pkt-footer-simple__link ${l.external?" pkt-link--external":""}`,href:l.href,target:l.openInNewTab?"_blank":"_self",rel:l.openInNewTab?"noopener noreferrer":void 0,children:[r(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),l.text]})},s)),r("li",{className:"pkt-footer-simple__list-item",children:p("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[r(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),r("li",{className:"pkt-footer-simple__list-item",children:p("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[r(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})}),Ve=({className:o,logoLink:l="https://www.oslo.kommune.no/",isLoggedIn:s=!1,representing:c="",canChangeRepresentation:d=!1,showLogInButton:n=!0,onLogIn:v,onLogOut:g,onChangeRepresentation:h})=>{const T=[o,"pkt-header"].filter(Boolean).join(" ");return p("header",{id:"pkt-header",className:T,"aria-label":"Topp",children:[r("div",{className:"pkt-header__logo",children:r("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:l,children:r(y,{name:"oslologo",className:"pkt-header__logo-svg",viewBox:"0 0 60 31","aria-hidden":"true"})})}),p("div",{className:"pkt-header__actions",children:[s&&d&&p("button",{className:"pkt-btn pkt-btn--secondary pkt-btn--icon-right","aria-label":`Bytt bruker fra ${c}`,onClick:h,children:[r(y,{name:"user",className:"pkt-btn__icon pkt-show-tablet-up"}),r("span",{className:"pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15",children:"Endre"}),r("span",{className:"pkt-btn__text pkt-hide-tablet-up",children:"Endre"}),r("span",{className:"pkt-btn__text--representing pkt-hide pkt-show-tablet-up",children:c})]}),s&&!d&&p("div",{className:"pkt-header__action",children:[r("span",{className:"pkt-header__action-text",children:r("span",{className:"pkt-btn__text pkt-header__action-textrow text-row-inline pkt-truncate-text",children:c})}),r("span",{className:"pkt-header__action-icon pkt-show-phablet-up",children:r(y,{name:"user"})})]}),n&&s&&p("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg ut",onClick:g,children:[r(y,{className:"pkt-btn__icon pkt-show-tablet-up",name:"exit"}),r("span",{className:"pkt-btn__text",children:"Logg ut"})]}),n&&!s&&p("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg inn",onClick:v,children:[r(y,{className:"pkt-btn__icon",name:"user"}),r("span",{className:"pkt-btn__text",children:"Logg inn"})]})]})]})},le=P.forwardRef(({label:o,id:l,children:s,...c},d)=>p("div",{className:"pkt-form-group",children:[r("label",{htmlFor:l,className:"pkt-form-label",children:o}),r("input",{className:"pkt-form-input",id:l,...c,ref:d}),s]}));le.displayName="PktInput";const se=P.forwardRef(({children:o,className:l,iconName:s="user",openInNewTab:c=!1,skin:d="normal",href:n="#",external:v=!1,title:g},h)=>{const T=[l,"pkt-linkcard",d&&`pkt-linkcard--${d}`].filter(Boolean).join(" ");return p("a",{href:n,className:`pkt-linkcard pkt-link ${T}`,target:c?"_blank":"_self",rel:c?"noopener noreferrer":void 0,ref:h,children:[r(y,{className:"pkt-link__icon",name:s}),p("div",{className:"pkt-linkcard__content",children:[r("div",{className:`pkt-linkcard__title ${v?"pkt-link pkt-link--external":""}`,children:g}),r("div",{className:"pkt-linkcard__text",children:o})]})]})});se.displayName="PktLinkCard";const Ue=({children:o,skin:l="beige",title:s,...c})=>{const d=["pkt-messagebox",l&&`pkt-messagebox--${l}`].filter(Boolean).join(" ");return p("div",{...c,className:d,children:[r("div",{className:"pkt-messagebox__title",children:s}),r("div",{className:"pkt-messagebox__text",children:o})]})},ce=P.forwardRef(({id:o,name:l,label:s,value:c,...d},n)=>p("div",{className:"pkt-form-group",children:[r("input",{type:"radio",className:"pkt-form-check-input",id:o,name:l,value:c,ref:n,...d}),r("label",{className:"pkt-form-label",htmlFor:o,children:s})]}));ce.displayName="PktRadio";const Ge=({label:o,children:l})=>p(oe,{children:[r("p",{children:o}),r("div",{className:"pkt-form-group",children:l})]});var fe={exports:{}};/*!
|
|
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(o){(function(){var l={}.hasOwnProperty;function s(){for(var c=[],d=0;d<arguments.length;d++){var n=arguments[d];if(n){var
|
|
31
|
+
*/(function(o){(function(){var l={}.hasOwnProperty;function s(){for(var c=[],d=0;d<arguments.length;d++){var n=arguments[d];if(n){var v=typeof n;if(v==="string"||v==="number")c.push(n);else if(Array.isArray(n)){if(n.length){var g=s.apply(null,n);g&&c.push(g)}}else if(v==="object"){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){c.push(n.toString());continue}for(var h in n)l.call(n,h)&&n[h]&&c.push(h)}}}return c.join(" ")}o.exports?(s.default=s,o.exports=s):window.classNames=s})()})(fe);var ze=fe.exports;const He=$e(ze),Je=({isResponsive:o,children:l})=>o?r("div",{className:"pkt-table-container",children:l}):r(oe,{children:l}),Ke=({isResponsive:o,modifiers:{info:l=!1,success:s=!1,strong:c=!1,shadow:d=!1}={},children:n})=>r(Je,{isResponsive:o,children:r("table",{className:He("pkt-table",{"pkt-table--info":l,"pkt-table--success":s,"pkt-table--strong":c,"pkt-table--shadow":d}),children:n})}),Xe=({children:o})=>r("td",{className:"pkt-table__th",children:o}),Ze=({children:o})=>r("th",{className:"pkt-table__th",children:o}),ue=P.forwardRef(({id:o,label:l,...s},c)=>p("div",{className:"pkt-form-group",children:[r("label",{htmlFor:o,className:"pkt-form-label",children:l}),r("textarea",{className:"pkt-form-textarea",id:o,ref:c,...s})]}));ue.displayName="PktTextarea",b.PktAlert=Be,b.PktButton=ie,b.PktFooter=Me,b.PktFooterSimple=Le,b.PktHeader=Ve,b.PktInput=le,b.PktLinkCard=se,b.PktMessagebox=Ue,b.PktRadio=ce,b.PktRadioGroup=Ge,b.PktTable=Ke,b.PktTableData=Xe,b.PktTableHeader=Ze,b.PktTextarea=ue,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
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",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@oslokommune/punkt-assets": "^4.0.0",
|
|
35
|
-
"@oslokommune/punkt-css": "^4.
|
|
35
|
+
"@oslokommune/punkt-css": "^4.3.0",
|
|
36
36
|
"@testing-library/jest-dom": "^5.16.5",
|
|
37
37
|
"@testing-library/react": "^14.0.0",
|
|
38
38
|
"@testing-library/user-event": "^14.4.3",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
91
91
|
},
|
|
92
92
|
"license": "MIT",
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "577296cf2482b9e0202f90621437d6588b7112f1"
|
|
94
94
|
}
|
|
@@ -1,34 +1,44 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React, { ForwardedRef, forwardRef } from 'react'
|
|
2
2
|
|
|
3
3
|
import { PktIcon } from '../icon/Icon'
|
|
4
4
|
|
|
5
|
-
export interface IPktLinkCard extends React.HTMLAttributes<
|
|
5
|
+
export interface IPktLinkCard extends React.HTMLAttributes<HTMLAnchorElement> {
|
|
6
6
|
skin?: 'normal' | 'blue' | 'beige' | 'beige-outline' | 'grey-outline'
|
|
7
7
|
title?: string
|
|
8
8
|
href?: string
|
|
9
9
|
iconName?: string
|
|
10
10
|
openInNewTab?: boolean
|
|
11
|
+
external?: boolean
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
export const PktLinkCard
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
14
|
+
export const PktLinkCard = forwardRef(
|
|
15
|
+
(
|
|
16
|
+
{
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
iconName = 'user',
|
|
20
|
+
openInNewTab = false,
|
|
21
|
+
skin = 'normal',
|
|
22
|
+
href = '#',
|
|
23
|
+
external = false,
|
|
24
|
+
title,
|
|
25
|
+
}: IPktLinkCard, ref: ForwardedRef<HTMLAnchorElement>
|
|
26
|
+
) => {
|
|
27
|
+
const classes = [className, 'pkt-linkcard', skin && `pkt-linkcard--${skin}`].filter(Boolean).join(' ')
|
|
28
|
+
return (
|
|
29
|
+
<a href={href} className={`pkt-linkcard pkt-link ${classes}`}
|
|
30
|
+
target={openInNewTab ? '_blank' : '_self'}
|
|
31
|
+
rel={openInNewTab ? 'noopener noreferrer' : undefined} ref={ref}>
|
|
32
|
+
<PktIcon className="pkt-link__icon" name={iconName}></PktIcon>
|
|
33
|
+
<div className="pkt-linkcard__content">
|
|
34
|
+
<div className={`pkt-linkcard__title ${external ? 'pkt-link pkt-link--external' : ''}`}>
|
|
35
|
+
{title}
|
|
36
|
+
</div>
|
|
37
|
+
<div className="pkt-linkcard__text">{children}</div>
|
|
38
|
+
</div>
|
|
39
|
+
</a>
|
|
40
|
+
)
|
|
41
|
+
},
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
PktLinkCard.displayName = 'PktLinkCard'
|