@oslokommune/punkt-react 7.1.5 → 7.1.7
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
CHANGED
|
@@ -5,6 +5,24 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [7.1.7](https://github.com/oslokommune/punkt/compare/7.1.6...7.1.7) (2023-09-13)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
Ingen
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
* Fjerne Alert fra ekspanderende hjelpetekst i InputWrapper.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
8
26
|
## [7.1.5](https://github.com/oslokommune/punkt/compare/7.1.4...7.1.5) (2023-09-12)
|
|
9
27
|
|
|
10
28
|
### ⚠ BREAKING CHANGES
|
package/dist/punkt-react.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import V, { useState as re, useEffect as
|
|
2
|
-
function
|
|
1
|
+
import V, { useState as re, useEffect as He, forwardRef as H, useRef as bt } from "react";
|
|
2
|
+
function gt(n) {
|
|
3
3
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
4
4
|
}
|
|
5
5
|
var ve = { exports: {} }, ee = {};
|
|
@@ -13,7 +13,7 @@ var ve = { exports: {} }, ee = {};
|
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
15
|
var Ue;
|
|
16
|
-
function
|
|
16
|
+
function Nt() {
|
|
17
17
|
if (Ue)
|
|
18
18
|
return ee;
|
|
19
19
|
Ue = 1;
|
|
@@ -41,7 +41,7 @@ var te = {};
|
|
|
41
41
|
* LICENSE file in the root directory of this source tree.
|
|
42
42
|
*/
|
|
43
43
|
var Ve;
|
|
44
|
-
function
|
|
44
|
+
function yt() {
|
|
45
45
|
return Ve || (Ve = 1, process.env.NODE_ENV !== "production" && function() {
|
|
46
46
|
var n = V, u = Symbol.for("react.element"), i = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), o = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), N = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), F = Symbol.iterator, L = "@@iterator";
|
|
47
47
|
function O(e) {
|
|
@@ -136,7 +136,7 @@ function wt() {
|
|
|
136
136
|
function Te() {
|
|
137
137
|
}
|
|
138
138
|
Te.__reactDisabledLog = !0;
|
|
139
|
-
function
|
|
139
|
+
function qe() {
|
|
140
140
|
{
|
|
141
141
|
if (K === 0) {
|
|
142
142
|
Ne = console.log, ye = console.info, we = console.warn, xe = console.error, Ee = console.group, Re = console.groupCollapsed, Pe = console.groupEnd;
|
|
@@ -159,7 +159,7 @@ function wt() {
|
|
|
159
159
|
K++;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function ze() {
|
|
163
163
|
{
|
|
164
164
|
if (K--, K === 0) {
|
|
165
165
|
var e = {
|
|
@@ -210,8 +210,8 @@ function wt() {
|
|
|
210
210
|
}
|
|
211
211
|
var pe = !1, ae;
|
|
212
212
|
{
|
|
213
|
-
var
|
|
214
|
-
ae = new
|
|
213
|
+
var Ke = typeof WeakMap == "function" ? WeakMap : Map;
|
|
214
|
+
ae = new Ke();
|
|
215
215
|
}
|
|
216
216
|
function Ce(e, r) {
|
|
217
217
|
if (!e || pe)
|
|
@@ -226,7 +226,7 @@ function wt() {
|
|
|
226
226
|
var v = Error.prepareStackTrace;
|
|
227
227
|
Error.prepareStackTrace = void 0;
|
|
228
228
|
var y;
|
|
229
|
-
y = ce.current, ce.current = null,
|
|
229
|
+
y = ce.current, ce.current = null, qe();
|
|
230
230
|
try {
|
|
231
231
|
if (r) {
|
|
232
232
|
var _ = function() {
|
|
@@ -279,15 +279,15 @@ function wt() {
|
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
} finally {
|
|
282
|
-
pe = !1, ce.current = y,
|
|
282
|
+
pe = !1, ce.current = y, ze(), Error.prepareStackTrace = v;
|
|
283
283
|
}
|
|
284
284
|
var Z = e ? e.displayName || e.name : "", Ye = Z ? ne(Z) : "";
|
|
285
285
|
return typeof e == "function" && ae.set(e, Ye), Ye;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function Xe(e, r, a) {
|
|
288
288
|
return Ce(e, !1);
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function Ze(e) {
|
|
291
291
|
var r = e.prototype;
|
|
292
292
|
return !!(r && r.isReactComponent);
|
|
293
293
|
}
|
|
@@ -295,7 +295,7 @@ function wt() {
|
|
|
295
295
|
if (e == null)
|
|
296
296
|
return "";
|
|
297
297
|
if (typeof e == "function")
|
|
298
|
-
return Ce(e,
|
|
298
|
+
return Ce(e, Ze(e));
|
|
299
299
|
if (typeof e == "string")
|
|
300
300
|
return ne(e);
|
|
301
301
|
switch (e) {
|
|
@@ -307,7 +307,7 @@ function wt() {
|
|
|
307
307
|
if (typeof e == "object")
|
|
308
308
|
switch (e.$$typeof) {
|
|
309
309
|
case d:
|
|
310
|
-
return
|
|
310
|
+
return Xe(e.render);
|
|
311
311
|
case g:
|
|
312
312
|
return le(e.type, r, a);
|
|
313
313
|
case T: {
|
|
@@ -328,7 +328,7 @@ function wt() {
|
|
|
328
328
|
} else
|
|
329
329
|
Se.setExtraStackFrame(null);
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function Qe(e, r, a, m, v) {
|
|
332
332
|
{
|
|
333
333
|
var y = Function.call.bind(oe);
|
|
334
334
|
for (var _ in e)
|
|
@@ -347,17 +347,17 @@ function wt() {
|
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
var
|
|
350
|
+
var et = Array.isArray;
|
|
351
351
|
function fe(e) {
|
|
352
|
-
return
|
|
352
|
+
return et(e);
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function tt(e) {
|
|
355
355
|
{
|
|
356
356
|
var r = typeof Symbol == "function" && Symbol.toStringTag, a = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
357
357
|
return a;
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function rt(e) {
|
|
361
361
|
try {
|
|
362
362
|
return Oe(e), !1;
|
|
363
363
|
} catch {
|
|
@@ -368,17 +368,17 @@ function wt() {
|
|
|
368
368
|
return "" + e;
|
|
369
369
|
}
|
|
370
370
|
function $e(e) {
|
|
371
|
-
if (
|
|
372
|
-
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
371
|
+
if (rt(e))
|
|
372
|
+
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", tt(e)), Oe(e);
|
|
373
373
|
}
|
|
374
|
-
var Q = j.ReactCurrentOwner,
|
|
374
|
+
var Q = j.ReactCurrentOwner, nt = {
|
|
375
375
|
key: !0,
|
|
376
376
|
ref: !0,
|
|
377
377
|
__self: !0,
|
|
378
378
|
__source: !0
|
|
379
379
|
}, Ie, Fe, de;
|
|
380
380
|
de = {};
|
|
381
|
-
function
|
|
381
|
+
function at(e) {
|
|
382
382
|
if (oe.call(e, "ref")) {
|
|
383
383
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
384
384
|
if (r && r.isReactWarning)
|
|
@@ -386,7 +386,7 @@ function wt() {
|
|
|
386
386
|
}
|
|
387
387
|
return e.ref !== void 0;
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function lt(e) {
|
|
390
390
|
if (oe.call(e, "key")) {
|
|
391
391
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
392
392
|
if (r && r.isReactWarning)
|
|
@@ -394,13 +394,13 @@ function wt() {
|
|
|
394
394
|
}
|
|
395
395
|
return e.key !== void 0;
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function ot(e, r) {
|
|
398
398
|
if (typeof e.ref == "string" && Q.current && r && Q.current.stateNode !== r) {
|
|
399
399
|
var a = E(Q.current.type);
|
|
400
400
|
de[a] || (w('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', E(Q.current.type), e.ref), de[a] = !0);
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function st(e, r) {
|
|
404
404
|
{
|
|
405
405
|
var a = function() {
|
|
406
406
|
Ie || (Ie = !0, w("%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));
|
|
@@ -411,7 +411,7 @@ function wt() {
|
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function it(e, r) {
|
|
415
415
|
{
|
|
416
416
|
var a = function() {
|
|
417
417
|
Fe || (Fe = !0, w("%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));
|
|
@@ -422,7 +422,7 @@ function wt() {
|
|
|
422
422
|
});
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
var
|
|
425
|
+
var ct = function(e, r, a, m, v, y, _) {
|
|
426
426
|
var h = {
|
|
427
427
|
// This tag allows us to uniquely identify this as a React Element
|
|
428
428
|
$$typeof: u,
|
|
@@ -451,12 +451,12 @@ function wt() {
|
|
|
451
451
|
value: v
|
|
452
452
|
}), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
|
|
453
453
|
};
|
|
454
|
-
function
|
|
454
|
+
function ut(e, r, a, m, v) {
|
|
455
455
|
{
|
|
456
456
|
var y, _ = {}, h = null, S = null;
|
|
457
|
-
a !== void 0 && ($e(a), h = "" + a),
|
|
457
|
+
a !== void 0 && ($e(a), h = "" + a), lt(r) && ($e(r.key), h = "" + r.key), at(r) && (S = r.ref, ot(r, v));
|
|
458
458
|
for (y in r)
|
|
459
|
-
oe.call(r, y) && !
|
|
459
|
+
oe.call(r, y) && !nt.hasOwnProperty(y) && (_[y] = r[y]);
|
|
460
460
|
if (e && e.defaultProps) {
|
|
461
461
|
var R = e.defaultProps;
|
|
462
462
|
for (y in R)
|
|
@@ -464,9 +464,9 @@ function wt() {
|
|
|
464
464
|
}
|
|
465
465
|
if (h || S) {
|
|
466
466
|
var P = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
467
|
-
h &&
|
|
467
|
+
h && st(_, P), S && it(_, P);
|
|
468
468
|
}
|
|
469
|
-
return
|
|
469
|
+
return ct(e, h, S, v, m, Q.current, _);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
var me = j.ReactCurrentOwner, De = j.ReactDebugCurrentFrame;
|
|
@@ -494,7 +494,7 @@ Check the render method of \`` + e + "`.";
|
|
|
494
494
|
return "";
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function pt(e) {
|
|
498
498
|
{
|
|
499
499
|
if (e !== void 0) {
|
|
500
500
|
var r = e.fileName.replace(/^.*[\\\/]/, ""), a = e.lineNumber;
|
|
@@ -506,7 +506,7 @@ Check your code at ` + r + ":" + a + ".";
|
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
508
|
var Le = {};
|
|
509
|
-
function
|
|
509
|
+
function ft(e) {
|
|
510
510
|
{
|
|
511
511
|
var r = Ae();
|
|
512
512
|
if (!r) {
|
|
@@ -523,7 +523,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
523
523
|
if (!e._store || e._store.validated || e.key != null)
|
|
524
524
|
return;
|
|
525
525
|
e._store.validated = !0;
|
|
526
|
-
var a =
|
|
526
|
+
var a = ft(r);
|
|
527
527
|
if (Le[a])
|
|
528
528
|
return;
|
|
529
529
|
Le[a] = !0;
|
|
@@ -550,7 +550,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function dt(e) {
|
|
554
554
|
{
|
|
555
555
|
var r = e.type;
|
|
556
556
|
if (r == null || typeof r == "string")
|
|
@@ -566,7 +566,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
566
566
|
return;
|
|
567
567
|
if (a) {
|
|
568
568
|
var m = E(r);
|
|
569
|
-
|
|
569
|
+
Qe(a, e.props, "prop", m, e);
|
|
570
570
|
} else if (r.PropTypes !== void 0 && !ke) {
|
|
571
571
|
ke = !0;
|
|
572
572
|
var v = E(r);
|
|
@@ -575,7 +575,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
575
575
|
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
|
-
function
|
|
578
|
+
function mt(e) {
|
|
579
579
|
{
|
|
580
580
|
for (var r = Object.keys(e.props), a = 0; a < r.length; a++) {
|
|
581
581
|
var m = r[a];
|
|
@@ -593,12 +593,12 @@ Check the top-level render call using <` + a + ">.");
|
|
|
593
593
|
if (!_) {
|
|
594
594
|
var h = "";
|
|
595
595
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (h += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
596
|
-
var S =
|
|
596
|
+
var S = pt(v);
|
|
597
597
|
S ? h += S : h += Ae();
|
|
598
598
|
var R;
|
|
599
599
|
e === null ? R = "null" : fe(e) ? R = "array" : e !== void 0 && e.$$typeof === u ? (R = "<" + (E(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : R = typeof e, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, h);
|
|
600
600
|
}
|
|
601
|
-
var P =
|
|
601
|
+
var P = ut(e, r, a, v, y);
|
|
602
602
|
if (P == null)
|
|
603
603
|
return P;
|
|
604
604
|
if (_) {
|
|
@@ -614,31 +614,31 @@ Check the top-level render call using <` + a + ">.");
|
|
|
614
614
|
else
|
|
615
615
|
We(W, e);
|
|
616
616
|
}
|
|
617
|
-
return e === s ?
|
|
617
|
+
return e === s ? mt(P) : dt(P), P;
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function kt(e, r, a) {
|
|
621
621
|
return Be(e, r, a, !0);
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function ht(e, r, a) {
|
|
624
624
|
return Be(e, r, a, !1);
|
|
625
625
|
}
|
|
626
|
-
var
|
|
627
|
-
te.Fragment = s, te.jsx =
|
|
626
|
+
var _t = ht, vt = kt;
|
|
627
|
+
te.Fragment = s, te.jsx = _t, te.jsxs = vt;
|
|
628
628
|
}()), te;
|
|
629
629
|
}
|
|
630
|
-
process.env.NODE_ENV === "production" ? ve.exports =
|
|
630
|
+
process.env.NODE_ENV === "production" ? ve.exports = Nt() : ve.exports = yt();
|
|
631
631
|
var be = ve.exports;
|
|
632
|
-
const z = be.Fragment, t = be.jsx, c = be.jsxs, _e = {},
|
|
633
|
-
function
|
|
634
|
-
return !_e[n] && typeof window.fetch == "function" && (_e[n] = window.fetch(u + n + ".svg").then((i) => i.ok ? i.text() : (console.error("Missing icon: " + u + n + ".svg"),
|
|
632
|
+
const z = be.Fragment, t = be.jsx, c = be.jsxs, _e = {}, wt = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';
|
|
633
|
+
function xt(n, u) {
|
|
634
|
+
return !_e[n] && typeof window.fetch == "function" && (_e[n] = window.fetch(u + n + ".svg").then((i) => i.ok ? i.text() : (console.error("Missing icon: " + u + n + ".svg"), wt)).then((i) => i)), Promise.resolve(_e[n]);
|
|
635
635
|
}
|
|
636
636
|
const b = ({ name: n, path: u, className: i = "", ...s }) => {
|
|
637
637
|
const l = "https://punkt-cdn.oslo.kommune.no/7.1/icons/", [p, f] = re(null);
|
|
638
|
-
return
|
|
638
|
+
return He(() => {
|
|
639
639
|
if (!n)
|
|
640
640
|
return;
|
|
641
|
-
|
|
641
|
+
xt(n, u || l).then((d) => f(d));
|
|
642
642
|
}, [n, u, l]), p ? /* @__PURE__ */ t(
|
|
643
643
|
"span",
|
|
644
644
|
{
|
|
@@ -647,7 +647,7 @@ const b = ({ name: n, path: u, className: i = "", ...s }) => {
|
|
|
647
647
|
...s
|
|
648
648
|
}
|
|
649
649
|
) : null;
|
|
650
|
-
},
|
|
650
|
+
}, Et = H(
|
|
651
651
|
({
|
|
652
652
|
children: n,
|
|
653
653
|
className: u,
|
|
@@ -861,7 +861,7 @@ const It = ({ columnOne: n, columnTwo: u, socialLinks: i, className: s }) => {
|
|
|
861
861
|
] }) })
|
|
862
862
|
] }) }) });
|
|
863
863
|
};
|
|
864
|
-
var
|
|
864
|
+
var Ge = { exports: {} };
|
|
865
865
|
/*!
|
|
866
866
|
Copyright (c) 2018 Jed Watson.
|
|
867
867
|
Licensed under the MIT License (MIT), see
|
|
@@ -896,9 +896,9 @@ var Je = { exports: {} };
|
|
|
896
896
|
}
|
|
897
897
|
n.exports ? (i.default = i, n.exports = i) : window.classNames = i;
|
|
898
898
|
})();
|
|
899
|
-
})(
|
|
900
|
-
var Rt =
|
|
901
|
-
const
|
|
899
|
+
})(Ge);
|
|
900
|
+
var Rt = Ge.exports;
|
|
901
|
+
const Je = /* @__PURE__ */ gt(Rt), Dt = H(
|
|
902
902
|
({
|
|
903
903
|
logoLink: n = "https://www.oslo.kommune.no/",
|
|
904
904
|
serviceName: u,
|
|
@@ -944,7 +944,7 @@ const qe = /* @__PURE__ */ Nt(Rt), Dt = H(
|
|
|
944
944
|
id: "pkt-header",
|
|
945
945
|
"data-testid": "pkt-header",
|
|
946
946
|
"aria-label": "Topp",
|
|
947
|
-
className:
|
|
947
|
+
className: Je("pkt-header", {
|
|
948
948
|
"pkt-header--fixed": i,
|
|
949
949
|
"pkt-header--scroll-to-hide": s,
|
|
950
950
|
"pkt-header--hidden": w
|
|
@@ -1156,7 +1156,7 @@ const ge = H(
|
|
|
1156
1156
|
"div",
|
|
1157
1157
|
{
|
|
1158
1158
|
className: `pkt-inputwrapper__helptext ${O ? "pkt-inputwrapper__helptext-expandable-open" : "pkt-inputwrapper__helptext-expandable-closed"}`,
|
|
1159
|
-
children: /* @__PURE__ */ t(
|
|
1159
|
+
children: /* @__PURE__ */ t("span", { dangerouslySetInnerHTML: { __html: s } })
|
|
1160
1160
|
}
|
|
1161
1161
|
),
|
|
1162
1162
|
/* @__PURE__ */ t("label", { htmlFor: n, className: "pkt-sr-only", "aria-describedby": k, children: u })
|
|
@@ -1175,7 +1175,7 @@ const ge = H(
|
|
|
1175
1175
|
),
|
|
1176
1176
|
C
|
|
1177
1177
|
] }),
|
|
1178
|
-
o && /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
1178
|
+
o && /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(Et, { skin: "error", "aria-live": "assertive", children: d }) })
|
|
1179
1179
|
]
|
|
1180
1180
|
}
|
|
1181
1181
|
);
|
|
@@ -1243,7 +1243,7 @@ const Lt = ({ label: n, children: u }) => /* @__PURE__ */ c(z, { children: [
|
|
|
1243
1243
|
}) => /* @__PURE__ */ t(jt, { isResponsive: n, children: /* @__PURE__ */ t(
|
|
1244
1244
|
"table",
|
|
1245
1245
|
{
|
|
1246
|
-
className:
|
|
1246
|
+
className: Je("pkt-table", {
|
|
1247
1247
|
"pkt-table--info": u,
|
|
1248
1248
|
"pkt-table--success": i,
|
|
1249
1249
|
"pkt-table--strong": s,
|
|
@@ -1341,12 +1341,12 @@ const Yt = H(
|
|
|
1341
1341
|
onChange: M,
|
|
1342
1342
|
...G
|
|
1343
1343
|
}, D) => {
|
|
1344
|
-
const U = [p, "pkt-textinput", "pkt-textarea"].join(" "), $ = i || `${n}-label`, I =
|
|
1344
|
+
const U = [p, "pkt-textinput", "pkt-textarea"].join(" "), $ = i || `${n}-label`, I = bt(null), [Y, J] = re(0), k = (E) => {
|
|
1345
1345
|
var A, K;
|
|
1346
1346
|
if (s && J(((K = (A = E.currentTarget) == null ? void 0 : A.value) == null ? void 0 : K.length) || 0), M)
|
|
1347
1347
|
return M(E);
|
|
1348
1348
|
};
|
|
1349
|
-
return
|
|
1349
|
+
return He(() => {
|
|
1350
1350
|
var E, A;
|
|
1351
1351
|
typeof D == "function" && D(I.current), s && J(((A = (E = I == null ? void 0 : I.current) == null ? void 0 : E.value) == null ? void 0 : A.length) || 0);
|
|
1352
1352
|
}, [D]), /* @__PURE__ */ c(
|
|
@@ -1468,7 +1468,7 @@ const Yt = H(
|
|
|
1468
1468
|
}
|
|
1469
1469
|
);
|
|
1470
1470
|
export {
|
|
1471
|
-
|
|
1471
|
+
Et as PktAlert,
|
|
1472
1472
|
$t as PktBackLink,
|
|
1473
1473
|
ie as PktButton,
|
|
1474
1474
|
It as PktFooter,
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -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
|
|
9
|
+
*/var ge;function Ze(){if(ge)return Q;ge=1;var n=v,u=Symbol.for("react.element"),c=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function p(o,d,T){var y,N={},S=null,j=null;T!==void 0&&(S=""+T),d.key!==void 0&&(S=""+d.key),d.ref!==void 0&&(j=d.ref);for(y in d)i.call(d,y)&&!f.hasOwnProperty(y)&&(N[y]=d[y]);if(o&&o.defaultProps)for(y in d=o.defaultProps,d)N[y]===void 0&&(N[y]=d[y]);return{$$typeof:u,type:o,key:S,ref:j,props:N,_owner:l.current}}return Q.Fragment=c,Q.jsx=p,Q.jsxs=p,Q}var ee={};/**
|
|
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
|
|
18
|
-
`+
|
|
17
|
+
*/var Ne;function Qe(){return Ne||(Ne=1,process.env.NODE_ENV!=="production"&&function(){var n=v,u=Symbol.for("react.element"),c=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),o=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),j=Symbol.for("react.offscreen"),A=Symbol.iterator,W="@@iterator";function I(e){if(e===null||typeof e!="object")return null;var r=A&&e[A]||e[W];return typeof r=="function"?r:null}var O=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var r=arguments.length,a=new Array(r>1?r-1:0),m=1;m<r;m++)a[m-1]=arguments[m];U("error",e,a)}}function U(e,r,a){{var m=O.ReactDebugCurrentFrame,g=m.getStackAddendum();g!==""&&(r+="%s",a=a.concat([g]));var w=a.map(function(_){return String(_)});w.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,w)}}var B=!1,q=!1,L=!1,H=!1,F=!1,D;D=Symbol.for("react.module.reference");function V(e){return!!(typeof e=="string"||typeof e=="function"||e===i||e===f||F||e===l||e===T||e===y||H||e===j||B||q||L||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===N||e.$$typeof===p||e.$$typeof===o||e.$$typeof===d||e.$$typeof===D||e.getModuleId!==void 0))}function J(e,r,a){var m=e.displayName;if(m)return m;var g=r.displayName||r.name||"";return g!==""?a+"("+g+")":a}function k(e){return e.displayName||"Context"}function x(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 i:return"Fragment";case c:return"Portal";case f:return"Profiler";case l:return"StrictMode";case T:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case o:var r=e;return k(r)+".Consumer";case p:var a=e;return k(a._context)+".Provider";case d:return J(e,e.render,"ForwardRef");case N:var m=e.displayName||null;return m!==null?m:x(e.type)||"Memo";case S:{var g=e,w=g._payload,_=g._init;try{return x(_(w))}catch{return null}}}return null}var M=Object.assign,K=0,Re,Se,je,Oe,$e,Ie,Fe;function De(){}De.__reactDisabledLog=!0;function kt(){{if(K===0){Re=console.log,Se=console.info,je=console.warn,Oe=console.error,$e=console.group,Ie=console.groupCollapsed,Fe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:De,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}K++}}function ht(){{if(K--,K===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},e,{value:Re}),info:M({},e,{value:Se}),warn:M({},e,{value:je}),error:M({},e,{value:Oe}),group:M({},e,{value:$e}),groupCollapsed:M({},e,{value:Ie}),groupEnd:M({},e,{value:Fe})})}K<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var pe=O.ReactCurrentDispatcher,de;function ae(e,r,a){{if(de===void 0)try{throw Error()}catch(g){var m=g.stack.trim().match(/\n( *(at )?)/);de=m&&m[1]||""}return`
|
|
18
|
+
`+de+e}}var me=!1,le;{var _t=typeof WeakMap=="function"?WeakMap:Map;le=new _t}function Ae(e,r){if(!e||me)return"";{var a=le.get(e);if(a!==void 0)return a}var m;me=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var w;w=pe.current,pe.current=null,kt();try{if(r){var _=function(){throw Error()};if(Object.defineProperty(_.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_,[])}catch(z){m=z}Reflect.construct(e,[],_)}else{try{_.call()}catch(z){m=z}e.call(_.prototype)}}else{try{throw Error()}catch(z){m=z}e()}}catch(z){if(z&&m&&typeof z.stack=="string"){for(var h=z.stack.split(`
|
|
19
19
|
`),$=m.stack.split(`
|
|
20
20
|
`),C=h.length-1,R=$.length-1;C>=1&&R>=0&&h[C]!==$[R];)R--;for(;C>=1&&R>=0;C--,R--)if(h[C]!==$[R]){if(C!==1||R!==1)do if(C--,R--,R<0||h[C]!==$[R]){var Y=`
|
|
21
|
-
`+h[C].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),typeof e=="function"&&le.set(e,Y),Y}while(C>=1&&R>=0);break}}}finally{
|
|
21
|
+
`+h[C].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),typeof e=="function"&&le.set(e,Y),Y}while(C>=1&&R>=0);break}}}finally{me=!1,pe.current=w,ht(),Error.prepareStackTrace=g}var Z=e?e.displayName||e.name:"",Ke=Z?ae(Z):"";return typeof e=="function"&&le.set(e,Ke),Ke}function vt(e,r,a){return Ae(e,!1)}function bt(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function oe(e,r,a){if(e==null)return"";if(typeof e=="function")return Ae(e,bt(e));if(typeof e=="string")return ae(e);switch(e){case T:return ae("Suspense");case y:return ae("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return vt(e.render);case N:return oe(e.type,r,a);case S:{var m=e,g=m._payload,w=m._init;try{return oe(w(g),r,a)}catch{}}}return""}var ie=Object.prototype.hasOwnProperty,Le={},Me=O.ReactDebugCurrentFrame;function se(e){if(e){var r=e._owner,a=oe(e.type,e._source,r?r.type:null);Me.setExtraStackFrame(a)}else Me.setExtraStackFrame(null)}function gt(e,r,a,m,g){{var w=Function.call.bind(ie);for(var _ in e)if(w(e,_)){var h=void 0;try{if(typeof e[_]!="function"){var $=Error((m||"React class")+": "+a+" type `"+_+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[_]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw $.name="Invariant Violation",$}h=e[_](r,_,m,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(C){h=C}h&&!(h instanceof Error)&&(se(g),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).",m||"React class",a,_,typeof h),se(null)),h instanceof Error&&!(h.message in Le)&&(Le[h.message]=!0,se(g),E("Failed %s type: %s",a,h.message),se(null))}}}var Nt=Array.isArray;function ke(e){return Nt(e)}function yt(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,a=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a}}function wt(e){try{return We(e),!1}catch{return!0}}function We(e){return""+e}function Be(e){if(wt(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",yt(e)),We(e)}var re=O.ReactCurrentOwner,Pt={key:!0,ref:!0,__self:!0,__source:!0},Ye,Ue,he;he={};function Et(e){if(ie.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Tt(e){if(ie.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function xt(e,r){if(typeof e.ref=="string"&&re.current&&r&&re.current.stateNode!==r){var a=x(re.current.type);he[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',x(re.current.type),e.ref),he[a]=!0)}}function Ct(e,r){{var a=function(){Ye||(Ye=!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))};a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}}function Rt(e,r){{var a=function(){Ue||(Ue=!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))};a.isReactWarning=!0,Object.defineProperty(e,"ref",{get:a,configurable:!0})}}var St=function(e,r,a,m,g,w,_){var h={$$typeof:u,type:e,key:r,ref:a,props:_,_owner:w};return h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(h,"_self",{configurable:!1,enumerable:!1,writable:!1,value:m}),Object.defineProperty(h,"_source",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h};function jt(e,r,a,m,g){{var w,_={},h=null,$=null;a!==void 0&&(Be(a),h=""+a),Tt(r)&&(Be(r.key),h=""+r.key),Et(r)&&($=r.ref,xt(r,g));for(w in r)ie.call(r,w)&&!Pt.hasOwnProperty(w)&&(_[w]=r[w]);if(e&&e.defaultProps){var C=e.defaultProps;for(w in C)_[w]===void 0&&(_[w]=C[w])}if(h||$){var R=typeof e=="function"?e.displayName||e.name||"Unknown":e;h&&Ct(_,R),$&&Rt(_,R)}return St(e,h,$,g,m,re.current,_)}}var _e=O.ReactCurrentOwner,Ve=O.ReactDebugCurrentFrame;function X(e){if(e){var r=e._owner,a=oe(e.type,e._source,r?r.type:null);Ve.setExtraStackFrame(a)}else Ve.setExtraStackFrame(null)}var ve;ve=!1;function be(e){return typeof e=="object"&&e!==null&&e.$$typeof===u}function He(){{if(_e.current){var e=x(_e.current.type);if(e)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function Ot(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),a=e.lineNumber;return`
|
|
24
24
|
|
|
25
25
|
Check your code at `+r+":"+a+"."}return""}}var Ge={};function $t(e){{var r=He();if(!r){var a=typeof e=="string"?e:e.displayName||e.name;a&&(r=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+a+">.")}return r}}function qe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=$t(r);if(Ge[a])return;Ge[a]=!0;var m="";e&&e._owner&&e._owner!==
|
|
27
|
+
Check the top-level render call using <`+a+">.")}return r}}function qe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=$t(r);if(Ge[a])return;Ge[a]=!0;var m="";e&&e._owner&&e._owner!==_e.current&&(m=" It was passed a child from "+x(e._owner.type)+"."),X(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,m),X(null)}}function Je(e,r){{if(typeof e!="object")return;if(ke(e))for(var a=0;a<e.length;a++){var m=e[a];be(m)&&qe(m,r)}else if(be(e))e._store&&(e._store.validated=!0);else if(e){var g=I(e);if(typeof g=="function"&&g!==e.entries)for(var w=g.call(e),_;!(_=w.next()).done;)be(_.value)&&qe(_.value,r)}}}function It(e){{var r=e.type;if(r==null||typeof r=="string")return;var a;if(typeof r=="function")a=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===d||r.$$typeof===N))a=r.propTypes;else return;if(a){var m=x(r);gt(a,e.props,"prop",m,e)}else if(r.PropTypes!==void 0&&!ve){ve=!0;var g=x(r);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",g||"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 Ft(e){{for(var r=Object.keys(e.props),a=0;a<r.length;a++){var m=r[a];if(m!=="children"&&m!=="key"){X(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",m),X(null);break}}e.ref!==null&&(X(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),X(null))}}function ze(e,r,a,m,g,w){{var _=V(e);if(!_){var h="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(h+=" 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 $=Ot(g);$?h+=$:h+=He();var C;e===null?C="null":ke(e)?C="array":e!==void 0&&e.$$typeof===u?(C="<"+(x(e.type)||"Unknown")+" />",h=" Did you accidentally export a JSX literal instead of a component?"):C=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",C,h)}var R=jt(e,r,a,g,w);if(R==null)return R;if(_){var Y=r.children;if(Y!==void 0)if(m)if(ke(Y)){for(var Z=0;Z<Y.length;Z++)Je(Y[Z],e);Object.freeze&&Object.freeze(Y)}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(Y,e)}return e===i?Ft(R):It(R),R}}function Dt(e,r,a){return ze(e,r,a,!0)}function At(e,r,a){return ze(e,r,a,!1)}var Lt=At,Mt=Dt;ee.Fragment=i,ee.jsx=Lt,ee.jsxs=Mt}()),ee}process.env.NODE_ENV==="production"?ce.exports=Ze():ce.exports=Qe();var ue=ce.exports;const G=ue.Fragment,t=ue.jsx,s=ue.jsxs,fe={},et='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function tt(n,u){return!fe[n]&&typeof window.fetch=="function"&&(fe[n]=window.fetch(u+n+".svg").then(c=>c.ok?c.text():(console.error("Missing icon: "+u+n+".svg"),et)).then(c=>c)),Promise.resolve(fe[n])}const b=({name:n,path:u,className:c="",...i})=>{const l="https://punkt-cdn.oslo.kommune.no/7.1/icons/",[f,p]=v.useState(null);return v.useEffect(()=>{if(!n)return;tt(n,u||l).then(d=>p(d))},[n,u,l]),f?t("span",{className:`pkt-icon ${c}`,dangerouslySetInnerHTML:{__html:f},...i}):null},ye=v.forwardRef(({children:n,className:u,skin:c="info",closeAlert:i=!1,onClose:l,title:f,date:p,ariaLive:o="polite",...d},T)=>{const y=[u,"pkt-alert",c&&`pkt-alert--${c}`].filter(Boolean).join(" "),[N,S]=v.useState(!0),j=()=>{S(!1),l&&l()};return N?s("div",{...d,className:y,"aria-live":o,ref:T,children:[t(b,{className:"pkt-alert__icon",name:c==="info"?"alert-information":`alert-${c}`}),i&&t("div",{className:"pkt-alert__close",children:t("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:j,children:t(b,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),f&&t("div",{className:"pkt-alert__title",children:f}),t("div",{className:"pkt-alert__text",children:n}),p&&s("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",p]})]}):null}),rt=v.forwardRef(({href:n,text:u,onClick:c,className:i,...l},f)=>{const p=[i,"pkt-back-link"].filter(Boolean).join(" ");return t("nav",{ref:f,className:p,"aria-label":"Gå tilbake et steg",children:s("a",{href:n||"/",className:"pkt-link pkt-link--icon-left",onClick:()=>{c&&c()},...l,children:[t(b,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),t("span",{className:"pkt-back-link__text",children:u||"Forsiden"})]})})}),te=v.forwardRef(({children:n,className:u,iconName:c="user",secondIconName:i="user",size:l="medium",skin:f="primary",type:p="button",variant:o="label-only",color:d,...T},y)=>{const N=[u,"pkt-btn",l&&`pkt-btn--${l}`,f&&`pkt-btn--${f}`,o&&`pkt-btn--${o}`,d&&`pkt-btn--${d}`].filter(Boolean).join(" ");return s("button",{...T,className:N,type:p,ref:y,children:[o!=="label-only"&&t(b,{className:"pkt-btn__icon",name:c}),t("span",{className:"pkt-btn__text",children:n}),o==="icons-right-and-left"&&t(b,{className:"pkt-btn__icon",name:i})]})});te.displayName="PktButton";const nt=({columnOne:n,columnTwo:u,socialLinks:c,className:i})=>{var f,p;const l=[i,"pkt-footer"].filter(Boolean).join(" ");return t("footer",{className:l,"data-mode":"dark",children:s("div",{className:"pkt-footer__container",children:[s("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[s("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[t("h2",{className:"pkt-footer__title",children:n.title}),s("ul",{className:"pkt-footer__list",children:[n.text&&t("li",{className:"pkt-footer__text",children:n.text}),(f=n.links)==null?void 0:f.map((o,d)=>t("li",{className:"pkt-footer__list-item",children:s("a",{className:`pkt-footer__link ${o.external?"pkt-link--external":""}`,href:o.href,target:o.openInNewTab?"_blank":"_self",rel:o.openInNewTab?"noopener noreferrer":void 0,children:[t(b,{className:"pkt-footer__link-icon",name:"chevron-right"}),o.text]})},`links-${d}`))]})]}),s("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[t("h2",{className:"pkt-footer__title",children:u.title}),s("ul",{className:"pkt-footer__list",children:[u.text&&t("li",{className:"pkt-footer__text",children:u.text}),(p=u.links)==null?void 0:p.map((o,d)=>t("li",{className:"pkt-footer__list-item",children:s("a",{className:`pkt-footer__link ${o.external?"pkt-link--external":""}`,href:o.href,target:o.openInNewTab?"_blank":"_self",rel:o.openInNewTab?"noopener noreferrer":void 0,children:[t(b,{className:"pkt-footer__link-icon",name:"chevron-right"}),o.text]})},`links-${d}`))]})]}),s("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[t("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),s("ul",{className:"pkt-footer__list",children:[t("li",{className:"pkt-footer__list-item",children:s("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[t(b,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),t("li",{className:"pkt-footer__list-item",children:s("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[t(b,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),c&&s("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[t("div",{className:"pkt-footer__social-languages",children:c.filter(o=>o.language).map((o,d)=>t("div",{className:"pkt-footer__social-language",children:t("a",{href:o.href,"aria-label":`til ${o.language} versjon av nettsiden`,target:o.openInNewTab?"_blank":"_self",rel:o.openInNewTab?"noopener noreferrer":void 0,children:o.language})},`sociallinks-language-${d}`))}),t("div",{className:"pkt-footer__social-icons",children:c.filter(o=>o.iconName).map((o,d)=>t(v.Fragment,{children:t("a",{href:o.href,"aria-label":`til ${o.iconName}`,className:"pkt-footer__social-icon-link",target:o.openInNewTab?"_blank":"_self",rel:o.openInNewTab?"noopener noreferrer":void 0,children:t(b,{className:"pkt-footer__social-icon",name:o.iconName})})},`sociallinks-${d}`))})]})]})})},at=({links:n=[],className:u})=>{const c=[u,"pkt-footer-simple"].filter(Boolean).join(" ");return t("footer",{className:c,"data-mode":"dark",children:t("div",{className:"pkt-footer-simple__container",children:s("ul",{className:"pkt-footer-simple__list",children:[n.map((i,l)=>t("li",{className:"pkt-footer-simple__list-item",children:s("a",{className:`pkt-footer-simple__link ${i.external?" pkt-link--external":""}`,href:i.href,target:i.openInNewTab?"_blank":"_self",rel:i.openInNewTab?"noopener noreferrer":void 0,children:[t(b,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),i.text]})},l)),t("li",{className:"pkt-footer-simple__list-item",children:s("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[t(b,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),t("li",{className:"pkt-footer-simple__list-item",children:s("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[t(b,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})};var we={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(n){(function(){var u={}.hasOwnProperty;function c(){for(var i=[],l=0;l<arguments.length;l++){var f=arguments[l];if(f){var p=typeof f;if(p==="string"||p==="number")i.push(f);else if(Array.isArray(f)){if(f.length){var o=c.apply(null,f);o&&i.push(o)}}else if(p==="object"){if(f.toString!==Object.prototype.toString&&!f.toString.toString().includes("[native code]")){i.push(f.toString());continue}for(var d in f)u.call(f,d)&&f[d]&&i.push(d)}}}return i.join(" ")}n.exports?(c.default=c,n.exports=c):window.classNames=c})()})(we);var lt=we.exports;const Pe=Xe(lt),ot=v.forwardRef(({logoLink:n="https://www.oslo.kommune.no/",serviceName:u,fixed:c=!0,scrollToHide:i=!0,user:l,userMenu:f,representing:p,userOptions:o,userMenuFooter:d,canChangeRepresentation:T=!0,showMenuButton:y=!1,showLogOutButton:N=!1,openMenu:S,logOut:j,changeRepresentation:A,...W},I)=>{const O=v.useMemo(()=>typeof(l==null?void 0:l.lastLoggedIn)=="string"?l.lastLoggedIn:l!=null&&l.lastLoggedIn?new Date(l.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[l]),[E,U]=v.useState(!1),[B,q]=v.useState(0),[L,H]=v.useState(!1),F=v.useRef(null);v.useEffect(()=>(document.addEventListener("mouseup",V),window.addEventListener("scroll",J),()=>{document.removeEventListener("mouseup",V),window.removeEventListener("scroll",J)}));const D=()=>{H(!L)},V=k=>{F.current&&!F.current.contains(k.target)&&H(!1)},J=()=>{if(i){const k=window.pageYOffset||document.documentElement.scrollTop;if(k<0||Math.abs(k-B)<60)return;U(k>B),q(k)}};return s("header",{...W,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:Pe("pkt-header",{"pkt-header--fixed":c,"pkt-header--scroll-to-hide":i,"pkt-header--hidden":E}),ref:I,children:[s("div",{className:"pkt-header__logo",children:[typeof n=="string"?t("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:n,children:t(b,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/7.1/logos/"})}):t("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:n,children:t(b,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/7.1/logos/"})}),t("span",{className:"pkt-header__logo-service",children:u})]}),t("nav",{className:"pkt-header__actions",children:s("ul",{className:"pkt-header__actions-row",children:[y&&t("li",{children:t(te,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:S,children:"Meny"})}),(l||p)&&s("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${L&&!E?"pkt-header--open-dropdown":""}`,ref:F,children:[s("button",{className:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button",role:"button","aria-controls":"pktUserDropdown","aria-expanded":L,onClick:D,children:[t(b,{name:"user",className:"pkt-btn__icon"}),t("span",{className:"pkt-header__user-fullname",children:(p==null?void 0:p.name)||(l==null?void 0:l.name)}),t("span",{className:"pkt-header__user-shortname",children:(p==null?void 0:p.shortname)||(l==null?void 0:l.shortname)}),t(b,{name:"chevron-thin-down",className:"pkt-btn--closed"}),t(b,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),s("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[l&&s("li",{children:[t("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),t("div",{className:"pkt-user-menu__name",children:l.name}),l.lastLoggedIn&&s("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",t("time",{children:O})]})]}),f&&t("li",{children:t("ul",{className:"pkt-list",children:f.map((k,x)=>t("li",{children:typeof k.target=="string"?s("a",{href:k.target,className:"pkt-link",children:[k.iconName&&t(b,{name:k.iconName,className:"pkt-link__icon"}),k.title]}):s("button",{className:"pkt-link-button pkt-link",onClick:k.target,children:[k.iconName&&t(b,{name:k.iconName,className:"pkt-link__icon"}),k.title]})},`userMenu-${x}`))})}),(p||T)&&s("li",{children:[p&&s(G,{children:[t("div",{className:"pkt-user-menu__label",children:"Representerer"}),t("div",{className:"pkt-user-menu__name",children:p.name}),p.orgNumber&&s("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",p.orgNumber]})]}),t("ul",{className:"pkt-list mt-size-16",children:T&&t("li",{children:s("button",{className:"pkt-link-button pkt-link",onClick:A,children:[t(b,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),t("li",{children:t("ul",{className:"pkt-list",children:(o||!N)&&s(G,{children:[o==null?void 0:o.map((k,x)=>t("li",{children:typeof k.target=="string"?s("a",{href:k.target,className:"pkt-link",children:[k.iconName&&t(b,{name:k.iconName,className:"pkt-link__icon"}),k.title]}):s("button",{className:"pkt-link-button pkt-link",onClick:k.target,children:[k.iconName&&t(b,{name:k.iconName,className:"pkt-link__icon"}),k.title]})},`userOptions-${x}`)),!N&&t("li",{children:s("button",{className:"pkt-link-button pkt-link",onClick:j,children:[t(b,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),d&&t("li",{className:"footer",children:t("ul",{className:"pkt-list-horizontal bordered",children:d.map((k,x)=>t("li",{children:typeof k.target=="string"?t("a",{href:k.target,className:"pkt-link",children:k.title}):t("button",{className:"pkt-link-button pkt-link",onClick:k.target,children:k.title})},`userMenuFooter-${x}`))})})]})]}),N&&t("li",{children:t(te,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:j,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),Ee=v.forwardRef(({label:n,id:u,children:c,...i},l)=>s("div",{className:"pkt-form-group",children:[t("label",{htmlFor:u,className:"pkt-form-label",children:n}),t("input",{className:"pkt-form-input",id:u,...i,ref:l}),c]}));Ee.displayName="PktInput";const ne=v.forwardRef(({forId:n,label:u,helptext:c,helptextDropdown:i,helptextDropdownButton:l,optional:f,required:p,hasError:o,errorMessage:d,disabled:T,inline:y,ariaDescribedby:N,useWrapper:S=!0,children:j,className:A},W)=>{const[I,O]=v.useState(!1),E=()=>{O(!I)},U=()=>f?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":p?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",B=f?"Valgfritt":p?"Må fylles ut":"",q=T?"pkt-inputwrapper--disabled":"",L=y?"pkt-inputwrapper--inline":"",H=o?"pkt-inputwrapper--error":"",F=!!i&&i!=="",D=l||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',V=F?"div":"label",J=F?"h2":"span",k=N||(c?`${n}-helptext`:void 0);return s("div",{className:["pkt-inputwrapper",A,q,L,H].join(" "),ref:W,children:[S?s(G,{children:[t(V,{htmlFor:n,className:"pkt-inputwrapper__label","aria-describedby":F?"":N,children:s(J,{id:`${n}-label`,children:[u,B!==""&&t("span",{className:U(),children:B})]})}),c&&t("div",{className:"pkt-inputwrapper__helptext",id:`${n}-helptext`,children:c}),F&&i!==""&&s("div",{children:[t(te,{skin:"tertiary",size:"small",variant:"icon-right",iconName:I?"chevron-thin-up":"chevron-thin-down",className:"pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",onClick:E,children:t("span",{dangerouslySetInnerHTML:{__html:D}})}),t("div",{className:`pkt-inputwrapper__helptext ${I?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:t(pe,{children:t("span",{dangerouslySetInnerHTML:{__html:i}})})}),t("label",{htmlFor:n,className:"pkt-sr-only","aria-describedby":k,children:u})]}),t(G,{children:j})]}):s(G,{children:[t("label",{htmlFor:n,className:"pkt-sr-only","aria-describedby":k,id:`${n}-label`,children:u}),j]}),o&&t("div",{children:t(pe,{skin:"error","aria-live":"assertive",children:d})})]})});ne.displayName="PktInputWrapper";const Te=v.forwardRef(({children:n,className:u,iconName:c="user",openInNewTab:i=!1,skin:l="normal",href:f="#",external:p=!1,title:o},d)=>{const T=[u,"pkt-linkcard",l&&`pkt-linkcard--${l}`].filter(Boolean).join(" ");return s("a",{href:f,className:`pkt-linkcard pkt-link ${T}`,target:i?"_blank":"_self",rel:i?"noopener noreferrer":void 0,ref:d,children:[t(b,{className:"pkt-link__icon",name:c}),s("div",{className:"pkt-linkcard__content",children:[t("div",{className:`pkt-linkcard__title ${p?"pkt-link pkt-link--external":""}`,children:o}),t("div",{className:"pkt-linkcard__text",children:n})]})]})});Te.displayName="PktLinkCard";const it=({children:n,skin:u="beige",title:c,className:i,...l})=>{const f=["pkt-messagebox",u&&`pkt-messagebox--${u}`,i].filter(Boolean).join(" ");return s("div",{...l,className:f,children:[t("div",{className:"pkt-messagebox__title",children:c}),t("div",{className:"pkt-messagebox__text",children:n})]})},xe=v.forwardRef(({id:n,name:u,label:c,value:i,...l},f)=>s("div",{className:"pkt-form-group",children:[t("input",{type:"radio",className:"pkt-form-check-input",id:n,name:u,value:i,ref:f,...l}),t("label",{className:"pkt-form-label",htmlFor:n,children:c})]}));xe.displayName="PktRadio";const st=({label:n,children:u})=>s(G,{children:[t("p",{children:n}),t("div",{className:"pkt-form-group",children:u})]}),ct=({isResponsive:n,children:u})=>n?t("div",{className:"pkt-table-container",children:u}):t(G,{children:u}),ut=({isResponsive:n,modifiers:{info:u=!1,success:c=!1,strong:i=!1,shadow:l=!1}={},children:f})=>t(ct,{isResponsive:n,children:t("table",{className:Pe("pkt-table",{"pkt-table--info":u,"pkt-table--success":c,"pkt-table--strong":i,"pkt-table--shadow":l}),children:f})}),ft=({children:n})=>t("td",{className:"pkt-table__th",children:n}),pt=({children:n})=>t("th",{className:"pkt-table__th",children:n}),Ce=v.forwardRef(({children:n,className:u,skin:c="blue",textStyle:i="normal-text",size:l="medium",closeTag:f=!1,iconName:p="",type:o="button",ariaLabel:d="close",onClick:T=()=>{}},y)=>{const[N,S]=v.useState(!1),j=O=>{S(!0),T(O)},A=["pkt-tag",l&&`pkt-tag--${l}`,c&&`pkt-tag--${c}`,i&&`pkt-tag--${i}`,u].filter(Boolean).join(" "),W=["pkt-tag","pkt-btn","pkt-btn--tertiary",l&&`pkt-tag--${l}`,c&&`pkt-tag--${c}`,i&&`pkt-tag--${i}`,p&&f?"pkt-btn--icons-right-and-left":null,f&&!p?"pkt-btn--icon-right":null,u].filter(Boolean).join(" "),I=!N;return f&&p?t(G,{children:I&&s("button",{className:W,type:o,"aria-label":d,onClick:j,ref:y,children:[t(b,{className:"pkt-tag__icon",name:p}),n,t(b,{className:"pkt-tag__close-btn",name:"close"})]})}):f?t(G,{children:I&&s("button",{className:W,type:o,"aria-label":d,onClick:j,ref:y,children:[t(b,{className:"pkt-tag__close-btn",name:"close"}),n]})}):p?s("span",{className:A,children:[t(b,{className:"pkt-tag__icon",name:p}),n]}):t("span",{className:A,children:n})});Ce.displayName="PktTag";const dt=v.forwardRef(({id:n,ariaDescribedby:u,ariaLabelledby:c,counter:i,counterMaxLength:l,className:f,disabled:p,errorMessage:o,hasError:d,helptext:T,helptextDropdown:y,helptextDropdownButton:N,inline:S,label:j,name:A,optional:W,placeholder:I,required:O,rows:E,useWrapper:U,onChange:B,...q},L)=>{const H=[f,"pkt-textinput","pkt-textarea"].join(" "),F=c||`${n}-label`,D=v.useRef(null),[V,J]=v.useState(0),k=x=>{var M,K;if(i&&J(((K=(M=x.currentTarget)==null?void 0:M.value)==null?void 0:K.length)||0),B)return B(x)};return v.useEffect(()=>{var x,M;typeof L=="function"&&L(D.current),i&&J(((M=(x=D==null?void 0:D.current)==null?void 0:x.value)==null?void 0:M.length)||0)},[L]),s(ne,{ariaDescribedby:u,className:H,disabled:p,errorMessage:o,forId:n,hasError:d,helptext:T,helptextDropdown:y,helptextDropdownButton:N,inline:S,label:j,optional:W,required:O,useWrapper:U,children:[t("textarea",{ref:D,className:`pkt-textinput__input ${l&&V>l?"pkt-textinput__input--counter-error":""}`,name:A||n,id:n,placeholder:I,disabled:p,rows:E,"aria-labelledby":F,"aria-invalid":d,"aria-required":O,...q,onChange:k}),i&&s("div",{className:"pkt-textinput__counter","aria-live":"polite","aria-atomic":!0,children:[V||0,l&&`/${l}`]})]})}),mt=v.forwardRef(({id:n,ariaDescribedby:u,ariaLabelledby:c,autocomplete:i="off",className:l,disabled:f=!1,errorMessage:p,hasError:o=!1,helptext:d,helptextDropdown:T,helptextDropdownButton:y,iconNameRight:N,inline:S=!1,label:j,name:A,optional:W=!1,placeholder:I,prefix:O,required:E=!1,suffix:U,type:B="text",useWrapper:q=!0,value:L,...H},F)=>{const D=[l,"pkt-textinput"].join(" "),V=c||`${n}-label`;return t(ne,{ariaDescribedby:u,className:D,disabled:f,errorMessage:p,forId:n,hasError:o,helptext:d,helptextDropdown:T,helptextDropdownButton:y,inline:S,label:j,optional:W,required:E,useWrapper:q,children:s("div",{className:"pkt-textinput__container",children:[O&&t("div",{className:"pkt-textinput__input-prefix",children:O}),t("input",{ref:F,className:"pkt-textinput__input",type:B,name:A||n,id:n,placeholder:I,autoComplete:i,value:L,disabled:f,"aria-required":E,"aria-invalid":o,"aria-labelledby":V,...H}),U&&s("p",{className:"pkt-textinput__input-suffix",children:[U,N&&t(b,{className:"pkt-textinput__input-suffix-icon",name:N})]}),!U&&N&&t(b,{className:"pkt-textinput__input-icon",name:N})]})})});P.PktAlert=pe,P.PktBackLink=rt,P.PktButton=te,P.PktFooter=nt,P.PktFooterSimple=at,P.PktHeader=ot,P.PktIcon=b,P.PktInput=Ee,P.PktInputWrapper=ne,P.PktLinkCard=Te,P.PktMessagebox=it,P.PktRadio=xe,P.PktRadioGroup=st,P.PktTable=ut,P.PktTableData=ft,P.PktTableHeader=pt,P.PktTag=Ce,P.PktTextarea=dt,P.PktTextinput=mt,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
|
|
31
|
+
*/(function(n){(function(){var u={}.hasOwnProperty;function c(){for(var i=[],l=0;l<arguments.length;l++){var f=arguments[l];if(f){var p=typeof f;if(p==="string"||p==="number")i.push(f);else if(Array.isArray(f)){if(f.length){var o=c.apply(null,f);o&&i.push(o)}}else if(p==="object"){if(f.toString!==Object.prototype.toString&&!f.toString.toString().includes("[native code]")){i.push(f.toString());continue}for(var d in f)u.call(f,d)&&f[d]&&i.push(d)}}}return i.join(" ")}n.exports?(c.default=c,n.exports=c):window.classNames=c})()})(we);var lt=we.exports;const Pe=Xe(lt),ot=v.forwardRef(({logoLink:n="https://www.oslo.kommune.no/",serviceName:u,fixed:c=!0,scrollToHide:i=!0,user:l,userMenu:f,representing:p,userOptions:o,userMenuFooter:d,canChangeRepresentation:T=!0,showMenuButton:y=!1,showLogOutButton:N=!1,openMenu:S,logOut:j,changeRepresentation:A,...W},I)=>{const O=v.useMemo(()=>typeof(l==null?void 0:l.lastLoggedIn)=="string"?l.lastLoggedIn:l!=null&&l.lastLoggedIn?new Date(l.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[l]),[E,U]=v.useState(!1),[B,q]=v.useState(0),[L,H]=v.useState(!1),F=v.useRef(null);v.useEffect(()=>(document.addEventListener("mouseup",V),window.addEventListener("scroll",J),()=>{document.removeEventListener("mouseup",V),window.removeEventListener("scroll",J)}));const D=()=>{H(!L)},V=k=>{F.current&&!F.current.contains(k.target)&&H(!1)},J=()=>{if(i){const k=window.pageYOffset||document.documentElement.scrollTop;if(k<0||Math.abs(k-B)<60)return;U(k>B),q(k)}};return s("header",{...W,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:Pe("pkt-header",{"pkt-header--fixed":c,"pkt-header--scroll-to-hide":i,"pkt-header--hidden":E}),ref:I,children:[s("div",{className:"pkt-header__logo",children:[typeof n=="string"?t("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:n,children:t(b,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/7.1/logos/"})}):t("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:n,children:t(b,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/7.1/logos/"})}),t("span",{className:"pkt-header__logo-service",children:u})]}),t("nav",{className:"pkt-header__actions",children:s("ul",{className:"pkt-header__actions-row",children:[y&&t("li",{children:t(te,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:S,children:"Meny"})}),(l||p)&&s("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${L&&!E?"pkt-header--open-dropdown":""}`,ref:F,children:[s("button",{className:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button",role:"button","aria-controls":"pktUserDropdown","aria-expanded":L,onClick:D,children:[t(b,{name:"user",className:"pkt-btn__icon"}),t("span",{className:"pkt-header__user-fullname",children:(p==null?void 0:p.name)||(l==null?void 0:l.name)}),t("span",{className:"pkt-header__user-shortname",children:(p==null?void 0:p.shortname)||(l==null?void 0:l.shortname)}),t(b,{name:"chevron-thin-down",className:"pkt-btn--closed"}),t(b,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),s("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[l&&s("li",{children:[t("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),t("div",{className:"pkt-user-menu__name",children:l.name}),l.lastLoggedIn&&s("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",t("time",{children:O})]})]}),f&&t("li",{children:t("ul",{className:"pkt-list",children:f.map((k,x)=>t("li",{children:typeof k.target=="string"?s("a",{href:k.target,className:"pkt-link",children:[k.iconName&&t(b,{name:k.iconName,className:"pkt-link__icon"}),k.title]}):s("button",{className:"pkt-link-button pkt-link",onClick:k.target,children:[k.iconName&&t(b,{name:k.iconName,className:"pkt-link__icon"}),k.title]})},`userMenu-${x}`))})}),(p||T)&&s("li",{children:[p&&s(G,{children:[t("div",{className:"pkt-user-menu__label",children:"Representerer"}),t("div",{className:"pkt-user-menu__name",children:p.name}),p.orgNumber&&s("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",p.orgNumber]})]}),t("ul",{className:"pkt-list mt-size-16",children:T&&t("li",{children:s("button",{className:"pkt-link-button pkt-link",onClick:A,children:[t(b,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),t("li",{children:t("ul",{className:"pkt-list",children:(o||!N)&&s(G,{children:[o==null?void 0:o.map((k,x)=>t("li",{children:typeof k.target=="string"?s("a",{href:k.target,className:"pkt-link",children:[k.iconName&&t(b,{name:k.iconName,className:"pkt-link__icon"}),k.title]}):s("button",{className:"pkt-link-button pkt-link",onClick:k.target,children:[k.iconName&&t(b,{name:k.iconName,className:"pkt-link__icon"}),k.title]})},`userOptions-${x}`)),!N&&t("li",{children:s("button",{className:"pkt-link-button pkt-link",onClick:j,children:[t(b,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),d&&t("li",{className:"footer",children:t("ul",{className:"pkt-list-horizontal bordered",children:d.map((k,x)=>t("li",{children:typeof k.target=="string"?t("a",{href:k.target,className:"pkt-link",children:k.title}):t("button",{className:"pkt-link-button pkt-link",onClick:k.target,children:k.title})},`userMenuFooter-${x}`))})})]})]}),N&&t("li",{children:t(te,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:j,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),Ee=v.forwardRef(({label:n,id:u,children:c,...i},l)=>s("div",{className:"pkt-form-group",children:[t("label",{htmlFor:u,className:"pkt-form-label",children:n}),t("input",{className:"pkt-form-input",id:u,...i,ref:l}),c]}));Ee.displayName="PktInput";const ne=v.forwardRef(({forId:n,label:u,helptext:c,helptextDropdown:i,helptextDropdownButton:l,optional:f,required:p,hasError:o,errorMessage:d,disabled:T,inline:y,ariaDescribedby:N,useWrapper:S=!0,children:j,className:A},W)=>{const[I,O]=v.useState(!1),E=()=>{O(!I)},U=()=>f?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":p?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",B=f?"Valgfritt":p?"Må fylles ut":"",q=T?"pkt-inputwrapper--disabled":"",L=y?"pkt-inputwrapper--inline":"",H=o?"pkt-inputwrapper--error":"",F=!!i&&i!=="",D=l||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',V=F?"div":"label",J=F?"h2":"span",k=N||(c?`${n}-helptext`:void 0);return s("div",{className:["pkt-inputwrapper",A,q,L,H].join(" "),ref:W,children:[S?s(G,{children:[t(V,{htmlFor:n,className:"pkt-inputwrapper__label","aria-describedby":F?"":N,children:s(J,{id:`${n}-label`,children:[u,B!==""&&t("span",{className:U(),children:B})]})}),c&&t("div",{className:"pkt-inputwrapper__helptext",id:`${n}-helptext`,children:c}),F&&i!==""&&s("div",{children:[t(te,{skin:"tertiary",size:"small",variant:"icon-right",iconName:I?"chevron-thin-up":"chevron-thin-down",className:"pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",onClick:E,children:t("span",{dangerouslySetInnerHTML:{__html:D}})}),t("div",{className:`pkt-inputwrapper__helptext ${I?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:t("span",{dangerouslySetInnerHTML:{__html:i}})}),t("label",{htmlFor:n,className:"pkt-sr-only","aria-describedby":k,children:u})]}),t(G,{children:j})]}):s(G,{children:[t("label",{htmlFor:n,className:"pkt-sr-only","aria-describedby":k,id:`${n}-label`,children:u}),j]}),o&&t("div",{children:t(ye,{skin:"error","aria-live":"assertive",children:d})})]})});ne.displayName="PktInputWrapper";const Te=v.forwardRef(({children:n,className:u,iconName:c="user",openInNewTab:i=!1,skin:l="normal",href:f="#",external:p=!1,title:o},d)=>{const T=[u,"pkt-linkcard",l&&`pkt-linkcard--${l}`].filter(Boolean).join(" ");return s("a",{href:f,className:`pkt-linkcard pkt-link ${T}`,target:i?"_blank":"_self",rel:i?"noopener noreferrer":void 0,ref:d,children:[t(b,{className:"pkt-link__icon",name:c}),s("div",{className:"pkt-linkcard__content",children:[t("div",{className:`pkt-linkcard__title ${p?"pkt-link pkt-link--external":""}`,children:o}),t("div",{className:"pkt-linkcard__text",children:n})]})]})});Te.displayName="PktLinkCard";const it=({children:n,skin:u="beige",title:c,className:i,...l})=>{const f=["pkt-messagebox",u&&`pkt-messagebox--${u}`,i].filter(Boolean).join(" ");return s("div",{...l,className:f,children:[t("div",{className:"pkt-messagebox__title",children:c}),t("div",{className:"pkt-messagebox__text",children:n})]})},xe=v.forwardRef(({id:n,name:u,label:c,value:i,...l},f)=>s("div",{className:"pkt-form-group",children:[t("input",{type:"radio",className:"pkt-form-check-input",id:n,name:u,value:i,ref:f,...l}),t("label",{className:"pkt-form-label",htmlFor:n,children:c})]}));xe.displayName="PktRadio";const st=({label:n,children:u})=>s(G,{children:[t("p",{children:n}),t("div",{className:"pkt-form-group",children:u})]}),ct=({isResponsive:n,children:u})=>n?t("div",{className:"pkt-table-container",children:u}):t(G,{children:u}),ut=({isResponsive:n,modifiers:{info:u=!1,success:c=!1,strong:i=!1,shadow:l=!1}={},children:f})=>t(ct,{isResponsive:n,children:t("table",{className:Pe("pkt-table",{"pkt-table--info":u,"pkt-table--success":c,"pkt-table--strong":i,"pkt-table--shadow":l}),children:f})}),ft=({children:n})=>t("td",{className:"pkt-table__th",children:n}),pt=({children:n})=>t("th",{className:"pkt-table__th",children:n}),Ce=v.forwardRef(({children:n,className:u,skin:c="blue",textStyle:i="normal-text",size:l="medium",closeTag:f=!1,iconName:p="",type:o="button",ariaLabel:d="close",onClick:T=()=>{}},y)=>{const[N,S]=v.useState(!1),j=O=>{S(!0),T(O)},A=["pkt-tag",l&&`pkt-tag--${l}`,c&&`pkt-tag--${c}`,i&&`pkt-tag--${i}`,u].filter(Boolean).join(" "),W=["pkt-tag","pkt-btn","pkt-btn--tertiary",l&&`pkt-tag--${l}`,c&&`pkt-tag--${c}`,i&&`pkt-tag--${i}`,p&&f?"pkt-btn--icons-right-and-left":null,f&&!p?"pkt-btn--icon-right":null,u].filter(Boolean).join(" "),I=!N;return f&&p?t(G,{children:I&&s("button",{className:W,type:o,"aria-label":d,onClick:j,ref:y,children:[t(b,{className:"pkt-tag__icon",name:p}),n,t(b,{className:"pkt-tag__close-btn",name:"close"})]})}):f?t(G,{children:I&&s("button",{className:W,type:o,"aria-label":d,onClick:j,ref:y,children:[t(b,{className:"pkt-tag__close-btn",name:"close"}),n]})}):p?s("span",{className:A,children:[t(b,{className:"pkt-tag__icon",name:p}),n]}):t("span",{className:A,children:n})});Ce.displayName="PktTag";const dt=v.forwardRef(({id:n,ariaDescribedby:u,ariaLabelledby:c,counter:i,counterMaxLength:l,className:f,disabled:p,errorMessage:o,hasError:d,helptext:T,helptextDropdown:y,helptextDropdownButton:N,inline:S,label:j,name:A,optional:W,placeholder:I,required:O,rows:E,useWrapper:U,onChange:B,...q},L)=>{const H=[f,"pkt-textinput","pkt-textarea"].join(" "),F=c||`${n}-label`,D=v.useRef(null),[V,J]=v.useState(0),k=x=>{var M,K;if(i&&J(((K=(M=x.currentTarget)==null?void 0:M.value)==null?void 0:K.length)||0),B)return B(x)};return v.useEffect(()=>{var x,M;typeof L=="function"&&L(D.current),i&&J(((M=(x=D==null?void 0:D.current)==null?void 0:x.value)==null?void 0:M.length)||0)},[L]),s(ne,{ariaDescribedby:u,className:H,disabled:p,errorMessage:o,forId:n,hasError:d,helptext:T,helptextDropdown:y,helptextDropdownButton:N,inline:S,label:j,optional:W,required:O,useWrapper:U,children:[t("textarea",{ref:D,className:`pkt-textinput__input ${l&&V>l?"pkt-textinput__input--counter-error":""}`,name:A||n,id:n,placeholder:I,disabled:p,rows:E,"aria-labelledby":F,"aria-invalid":d,"aria-required":O,...q,onChange:k}),i&&s("div",{className:"pkt-textinput__counter","aria-live":"polite","aria-atomic":!0,children:[V||0,l&&`/${l}`]})]})}),mt=v.forwardRef(({id:n,ariaDescribedby:u,ariaLabelledby:c,autocomplete:i="off",className:l,disabled:f=!1,errorMessage:p,hasError:o=!1,helptext:d,helptextDropdown:T,helptextDropdownButton:y,iconNameRight:N,inline:S=!1,label:j,name:A,optional:W=!1,placeholder:I,prefix:O,required:E=!1,suffix:U,type:B="text",useWrapper:q=!0,value:L,...H},F)=>{const D=[l,"pkt-textinput"].join(" "),V=c||`${n}-label`;return t(ne,{ariaDescribedby:u,className:D,disabled:f,errorMessage:p,forId:n,hasError:o,helptext:d,helptextDropdown:T,helptextDropdownButton:y,inline:S,label:j,optional:W,required:E,useWrapper:q,children:s("div",{className:"pkt-textinput__container",children:[O&&t("div",{className:"pkt-textinput__input-prefix",children:O}),t("input",{ref:F,className:"pkt-textinput__input",type:B,name:A||n,id:n,placeholder:I,autoComplete:i,value:L,disabled:f,"aria-required":E,"aria-invalid":o,"aria-labelledby":V,...H}),U&&s("p",{className:"pkt-textinput__input-suffix",children:[U,N&&t(b,{className:"pkt-textinput__input-suffix-icon",name:N})]}),!U&&N&&t(b,{className:"pkt-textinput__input-icon",name:N})]})})});P.PktAlert=ye,P.PktBackLink=rt,P.PktButton=te,P.PktFooter=nt,P.PktFooterSimple=at,P.PktHeader=ot,P.PktIcon=b,P.PktInput=Ee,P.PktInputWrapper=ne,P.PktLinkCard=Te,P.PktMessagebox=it,P.PktRadio=xe,P.PktRadioGroup=st,P.PktTable=ut,P.PktTableData=ft,P.PktTableHeader=pt,P.PktTag=Ce,P.PktTextarea=dt,P.PktTextinput=mt,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.7",
|
|
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": "^7.0.0",
|
|
35
|
-
"@oslokommune/punkt-css": "^7.1.
|
|
35
|
+
"@oslokommune/punkt-css": "^7.1.7",
|
|
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": "fa7793e49762fb361a1f99ec2f1a3060f6b5e361"
|
|
94
94
|
}
|
|
@@ -121,9 +121,7 @@ export const PktInputWrapper = forwardRef(
|
|
|
121
121
|
: 'pkt-inputwrapper__helptext-expandable-closed'
|
|
122
122
|
}`}
|
|
123
123
|
>
|
|
124
|
-
<
|
|
125
|
-
<span dangerouslySetInnerHTML={{ __html: helptextDropdown }} />
|
|
126
|
-
</PktAlert>
|
|
124
|
+
<span dangerouslySetInnerHTML={{ __html: helptextDropdown }} />
|
|
127
125
|
</div>
|
|
128
126
|
<label htmlFor={forId} className="pkt-sr-only" aria-describedby={describedBy}>
|
|
129
127
|
{label}
|