@oslokommune/punkt-react 9.3.4 → 9.4.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
CHANGED
|
@@ -5,6 +5,34 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [9.4.0](https://github.com/oslokommune/punkt/compare/9.3.4...9.4.0) (2023-11-06)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
* Nye designtokens - farger. Nye fargevariabler kan leses om på vår nettside.
|
|
15
|
+
Vi ønsker å gi dere litt tid på å bytte til nye fargevariabler så de gamle vil være tilgjengelige en liten stund fremover.
|
|
16
|
+
Mappingen av gamle til nye fargevariabler vil bli tilgjengelig på vår wiki-side på GitHub.
|
|
17
|
+
|
|
18
|
+
* docs(docs): #1171 docs disabled
|
|
19
|
+
|
|
20
|
+
* chore(all): #1184 Erstatt fargevariabler
|
|
21
|
+
|
|
22
|
+
* docs(docs,css) #1185 Dokumentere farger
|
|
23
|
+
|
|
24
|
+
* docs(docs): Contrastchecker
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
Ingen
|
|
29
|
+
|
|
30
|
+
### Chores
|
|
31
|
+
Ingen
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
|
|
8
36
|
## [9.3.4](https://github.com/oslokommune/punkt/compare/9.3.3...9.3.4) (2023-11-02)
|
|
9
37
|
|
|
10
38
|
### ⚠ BREAKING CHANGES
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IconFetcher } from "./IconContext";
|
|
2
|
-
export declare const defaultSvgPath = "https://punkt-cdn.oslo.kommune.no/9.
|
|
2
|
+
export declare const defaultSvgPath = "https://punkt-cdn.oslo.kommune.no/9.4/icons/";
|
|
3
3
|
declare const defaultIconFetcher: IconFetcher;
|
|
4
4
|
export default defaultIconFetcher;
|
package/dist/punkt-react.es.js
CHANGED
|
@@ -88,7 +88,7 @@ function fn() {
|
|
|
88
88
|
function _(t) {
|
|
89
89
|
return t.displayName || "Context";
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function $(t) {
|
|
92
92
|
if (t == null)
|
|
93
93
|
return null;
|
|
94
94
|
if (typeof t.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
|
|
@@ -121,11 +121,11 @@ function fn() {
|
|
|
121
121
|
return W(t, t.render, "ForwardRef");
|
|
122
122
|
case v:
|
|
123
123
|
var k = t.displayName || null;
|
|
124
|
-
return k !== null ? k :
|
|
124
|
+
return k !== null ? k : $(t.type) || "Memo";
|
|
125
125
|
case E: {
|
|
126
126
|
var R = t, O = R._payload, w = R._init;
|
|
127
127
|
try {
|
|
128
|
-
return
|
|
128
|
+
return $(w(O));
|
|
129
129
|
} catch {
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
@@ -264,18 +264,18 @@ function fn() {
|
|
|
264
264
|
if (X && k && typeof X.stack == "string") {
|
|
265
265
|
for (var N = X.stack.split(`
|
|
266
266
|
`), V = k.stack.split(`
|
|
267
|
-
`),
|
|
267
|
+
`), D = N.length - 1, L = V.length - 1; D >= 1 && L >= 0 && N[D] !== V[L]; )
|
|
268
268
|
L--;
|
|
269
|
-
for (;
|
|
270
|
-
if (N[
|
|
271
|
-
if (
|
|
269
|
+
for (; D >= 1 && L >= 0; D--, L--)
|
|
270
|
+
if (N[D] !== V[L]) {
|
|
271
|
+
if (D !== 1 || L !== 1)
|
|
272
272
|
do
|
|
273
|
-
if (
|
|
273
|
+
if (D--, L--, L < 0 || N[D] !== V[L]) {
|
|
274
274
|
var z = `
|
|
275
|
-
` + N[
|
|
275
|
+
` + N[D].replace(" at new ", " at ");
|
|
276
276
|
return t.displayName && z.includes("<anonymous>") && (z = z.replace("<anonymous>", t.displayName)), typeof t == "function" && de.set(t, z), z;
|
|
277
277
|
}
|
|
278
|
-
while (
|
|
278
|
+
while (D >= 1 && L >= 0);
|
|
279
279
|
break;
|
|
280
280
|
}
|
|
281
281
|
}
|
|
@@ -341,8 +341,8 @@ function fn() {
|
|
|
341
341
|
throw V.name = "Invariant Violation", V;
|
|
342
342
|
}
|
|
343
343
|
N = t[w](u, w, k, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
344
|
-
} catch (
|
|
345
|
-
N =
|
|
344
|
+
} catch (D) {
|
|
345
|
+
N = D;
|
|
346
346
|
}
|
|
347
347
|
N && !(N instanceof Error) && (ke(R), g("%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).", k || "React class", d, w, typeof N), ke(null)), N instanceof Error && !(N.message in rt) && (rt[N.message] = !0, ke(R), g("Failed %s type: %s", d, N.message), ke(null));
|
|
348
348
|
}
|
|
@@ -397,8 +397,8 @@ function fn() {
|
|
|
397
397
|
}
|
|
398
398
|
function Ht(t, u) {
|
|
399
399
|
if (typeof t.ref == "string" && ie.current && u && ie.current.stateNode !== u) {
|
|
400
|
-
var d =
|
|
401
|
-
je[d] || (g('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',
|
|
400
|
+
var d = $(ie.current.type);
|
|
401
|
+
je[d] || (g('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', $(ie.current.type), t.ref), je[d] = !0);
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
404
|
function Gt(t, u) {
|
|
@@ -459,9 +459,9 @@ function fn() {
|
|
|
459
459
|
for (O in u)
|
|
460
460
|
he.call(u, O) && !Yt.hasOwnProperty(O) && (w[O] = u[O]);
|
|
461
461
|
if (t && t.defaultProps) {
|
|
462
|
-
var
|
|
463
|
-
for (O in
|
|
464
|
-
w[O] === void 0 && (w[O] =
|
|
462
|
+
var D = t.defaultProps;
|
|
463
|
+
for (O in D)
|
|
464
|
+
w[O] === void 0 && (w[O] = D[O]);
|
|
465
465
|
}
|
|
466
466
|
if (N || V) {
|
|
467
467
|
var L = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
|
|
@@ -470,7 +470,7 @@ function fn() {
|
|
|
470
470
|
return qt(t, N, V, R, k, ie.current, w);
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
-
var
|
|
473
|
+
var $e = x.ReactCurrentOwner, ct = x.ReactDebugCurrentFrame;
|
|
474
474
|
function re(t) {
|
|
475
475
|
if (t) {
|
|
476
476
|
var u = t._owner, d = me(t.type, t._source, u ? u.type : null);
|
|
@@ -478,15 +478,15 @@ function fn() {
|
|
|
478
478
|
} else
|
|
479
479
|
ct.setExtraStackFrame(null);
|
|
480
480
|
}
|
|
481
|
-
var
|
|
482
|
-
|
|
481
|
+
var De;
|
|
482
|
+
De = !1;
|
|
483
483
|
function Le(t) {
|
|
484
484
|
return typeof t == "object" && t !== null && t.$$typeof === n;
|
|
485
485
|
}
|
|
486
486
|
function ut() {
|
|
487
487
|
{
|
|
488
|
-
if (
|
|
489
|
-
var t =
|
|
488
|
+
if ($e.current) {
|
|
489
|
+
var t = $($e.current.type);
|
|
490
490
|
if (t)
|
|
491
491
|
return `
|
|
492
492
|
|
|
@@ -529,7 +529,7 @@ Check the top-level render call using <` + d + ">.");
|
|
|
529
529
|
return;
|
|
530
530
|
pt[d] = !0;
|
|
531
531
|
var k = "";
|
|
532
|
-
t && t._owner && t._owner !==
|
|
532
|
+
t && t._owner && t._owner !== $e.current && (k = " It was passed a child from " + $(t._owner.type) + "."), re(t), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, k), re(null);
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
function dt(t, u) {
|
|
@@ -566,11 +566,11 @@ Check the top-level render call using <` + d + ">.");
|
|
|
566
566
|
else
|
|
567
567
|
return;
|
|
568
568
|
if (d) {
|
|
569
|
-
var k =
|
|
569
|
+
var k = $(u);
|
|
570
570
|
Vt(d, t.props, "prop", k, t);
|
|
571
|
-
} else if (u.PropTypes !== void 0 &&
|
|
572
|
-
|
|
573
|
-
var R =
|
|
571
|
+
} else if (u.PropTypes !== void 0 && !De) {
|
|
572
|
+
De = !0;
|
|
573
|
+
var R = $(u);
|
|
574
574
|
g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", R || "Unknown");
|
|
575
575
|
}
|
|
576
576
|
typeof u.getDefaultProps == "function" && !u.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -596,8 +596,8 @@ Check the top-level render call using <` + d + ">.");
|
|
|
596
596
|
(t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (N += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
597
597
|
var V = Zt(R);
|
|
598
598
|
V ? N += V : N += ut();
|
|
599
|
-
var
|
|
600
|
-
t === null ?
|
|
599
|
+
var D;
|
|
600
|
+
t === null ? D = "null" : Te(t) ? D = "array" : t !== void 0 && t.$$typeof === n ? (D = "<" + ($(t.type) || "Unknown") + " />", N = " Did you accidentally export a JSX literal instead of a component?") : D = typeof t, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, N);
|
|
601
601
|
}
|
|
602
602
|
var L = Xt(t, u, d, R, O);
|
|
603
603
|
if (L == null)
|
|
@@ -630,7 +630,7 @@ Check the top-level render call using <` + d + ">.");
|
|
|
630
630
|
}
|
|
631
631
|
process.env.NODE_ENV === "production" ? Ue.exports = pn() : Ue.exports = fn();
|
|
632
632
|
var ze = Ue.exports;
|
|
633
|
-
const ee = ze.Fragment, l = ze.jsx, h = ze.jsxs, Ie = {}, dn = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', mn = "https://punkt-cdn.oslo.kommune.no/9.
|
|
633
|
+
const ee = ze.Fragment, l = ze.jsx, h = ze.jsxs, Ie = {}, dn = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', mn = "https://punkt-cdn.oslo.kommune.no/9.4/icons/", hn = (e, n) => (!Ie[e] && typeof window.fetch == "function" && (Ie[e] = window.fetch(n + e + ".svg").then((r) => r.ok ? r.text() : (console.error("Missing icon: " + n + e + ".svg"), dn)).then((r) => r)), Promise.resolve(Ie[e])), kn = {
|
|
634
634
|
fetchIcon: async (e, n) => hn(e, n || mn)
|
|
635
635
|
}, vn = on(kn), y = ({ name: e, path: n, className: r = "", ...o }) => {
|
|
636
636
|
const [a, i] = ue(null), s = sn(vn);
|
|
@@ -1021,10 +1021,10 @@ const _e = "get", be = "application/x-www-form-urlencoded";
|
|
|
1021
1021
|
function Ce(e) {
|
|
1022
1022
|
return e != null && typeof e.tagName == "string";
|
|
1023
1023
|
}
|
|
1024
|
-
function
|
|
1024
|
+
function $n(e) {
|
|
1025
1025
|
return Ce(e) && e.tagName.toLowerCase() === "button";
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1027
|
+
function Dn(e) {
|
|
1028
1028
|
return Ce(e) && e.tagName.toLowerCase() === "form";
|
|
1029
1029
|
}
|
|
1030
1030
|
function Ln(e) {
|
|
@@ -1058,10 +1058,10 @@ function Ae(e) {
|
|
|
1058
1058
|
}
|
|
1059
1059
|
function Vn(e, n) {
|
|
1060
1060
|
let r, o, a, i, s;
|
|
1061
|
-
if (
|
|
1061
|
+
if (Dn(e)) {
|
|
1062
1062
|
let f = e.getAttribute("action");
|
|
1063
1063
|
o = f ? Be(f, n) : null, r = e.getAttribute("method") || _e, a = Ae(e.getAttribute("enctype")) || be, i = new FormData(e);
|
|
1064
|
-
} else if (
|
|
1064
|
+
} else if ($n(e) || Ln(e) && (e.type === "submit" || e.type === "image")) {
|
|
1065
1065
|
let f = e.form;
|
|
1066
1066
|
if (f == null)
|
|
1067
1067
|
throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
|
|
@@ -1427,7 +1427,7 @@ const er = B(
|
|
|
1427
1427
|
s,
|
|
1428
1428
|
"pkt-input-check"
|
|
1429
1429
|
].filter(Boolean).join(" ");
|
|
1430
|
-
return /* @__PURE__ */ l("div", { className: c, children: /* @__PURE__ */ h("div", { className: `pkt-input-check__input ${n ? "pkt-input-check__input--tile" : ""}`, children: [
|
|
1430
|
+
return /* @__PURE__ */ l("div", { className: c, children: /* @__PURE__ */ h("div", { className: `pkt-input-check__input ${n ? "pkt-input-check__input--tile" : ""} ${r && n ? "pkt-input-check__input--tile-disabled" : ""}`, children: [
|
|
1431
1431
|
/* @__PURE__ */ l(
|
|
1432
1432
|
"input",
|
|
1433
1433
|
{
|
|
@@ -1586,7 +1586,7 @@ const ur = ({
|
|
|
1586
1586
|
] }) })
|
|
1587
1587
|
] }) }) });
|
|
1588
1588
|
};
|
|
1589
|
-
var
|
|
1589
|
+
var $t = { exports: {} };
|
|
1590
1590
|
/*!
|
|
1591
1591
|
Copyright (c) 2018 Jed Watson.
|
|
1592
1592
|
Licensed under the MIT License (MIT), see
|
|
@@ -1621,9 +1621,9 @@ var Dt = { exports: {} };
|
|
|
1621
1621
|
}
|
|
1622
1622
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1623
1623
|
})();
|
|
1624
|
-
})(
|
|
1625
|
-
var tr =
|
|
1626
|
-
const
|
|
1624
|
+
})($t);
|
|
1625
|
+
var tr = $t.exports;
|
|
1626
|
+
const Dt = /* @__PURE__ */ un(tr), fr = B(
|
|
1627
1627
|
({
|
|
1628
1628
|
logoLink: e = "https://www.oslo.kommune.no/",
|
|
1629
1629
|
serviceName: n,
|
|
@@ -1669,7 +1669,7 @@ const $t = /* @__PURE__ */ un(tr), fr = B(
|
|
|
1669
1669
|
id: "pkt-header",
|
|
1670
1670
|
"data-testid": "pkt-header",
|
|
1671
1671
|
"aria-label": "Topp",
|
|
1672
|
-
className:
|
|
1672
|
+
className: Dt("pkt-header", {
|
|
1673
1673
|
"pkt-header--fixed": r,
|
|
1674
1674
|
"pkt-header--scroll-to-hide": o,
|
|
1675
1675
|
"pkt-header--hidden": g
|
|
@@ -1683,7 +1683,7 @@ const $t = /* @__PURE__ */ un(tr), fr = B(
|
|
|
1683
1683
|
name: "oslologo",
|
|
1684
1684
|
className: "pkt-header__logo-svg",
|
|
1685
1685
|
"aria-hidden": "true",
|
|
1686
|
-
path: "https://punkt-cdn.oslo.kommune.no/9.
|
|
1686
|
+
path: "https://punkt-cdn.oslo.kommune.no/9.4/logos/"
|
|
1687
1687
|
}
|
|
1688
1688
|
) }) : /* @__PURE__ */ l(
|
|
1689
1689
|
"button",
|
|
@@ -1697,7 +1697,7 @@ const $t = /* @__PURE__ */ un(tr), fr = B(
|
|
|
1697
1697
|
name: "oslologo",
|
|
1698
1698
|
className: "pkt-header__logo-svg",
|
|
1699
1699
|
"aria-hidden": "true",
|
|
1700
|
-
path: "https://punkt-cdn.oslo.kommune.no/9.
|
|
1700
|
+
path: "https://punkt-cdn.oslo.kommune.no/9.4/logos/"
|
|
1701
1701
|
}
|
|
1702
1702
|
)
|
|
1703
1703
|
}
|
|
@@ -1750,13 +1750,13 @@ const $t = /* @__PURE__ */ un(tr), fr = B(
|
|
|
1750
1750
|
/* @__PURE__ */ l("time", { children: x })
|
|
1751
1751
|
] })
|
|
1752
1752
|
] }),
|
|
1753
|
-
i && /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l("ul", { className: "pkt-list", children: i.map((_,
|
|
1753
|
+
i && /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l("ul", { className: "pkt-list", children: i.map((_, $) => /* @__PURE__ */ l("li", { children: typeof _.target == "string" ? /* @__PURE__ */ h("a", { href: _.target, className: "pkt-link", children: [
|
|
1754
1754
|
_.iconName && /* @__PURE__ */ l(y, { name: _.iconName, className: "pkt-link__icon" }),
|
|
1755
1755
|
_.title
|
|
1756
1756
|
] }) : /* @__PURE__ */ h("button", { className: "pkt-link-button pkt-link", onClick: _.target, children: [
|
|
1757
1757
|
_.iconName && /* @__PURE__ */ l(y, { name: _.iconName, className: "pkt-link__icon" }),
|
|
1758
1758
|
_.title
|
|
1759
|
-
] }) }, `userMenu-${
|
|
1759
|
+
] }) }, `userMenu-${$}`)) }) }),
|
|
1760
1760
|
(s || c) && /* @__PURE__ */ h("li", { children: [
|
|
1761
1761
|
s && /* @__PURE__ */ h(ee, { children: [
|
|
1762
1762
|
/* @__PURE__ */ l("div", { className: "pkt-user-menu__label", children: "Representerer" }),
|
|
@@ -1779,19 +1779,19 @@ const $t = /* @__PURE__ */ un(tr), fr = B(
|
|
|
1779
1779
|
) }) })
|
|
1780
1780
|
] }),
|
|
1781
1781
|
/* @__PURE__ */ l("li", { children: /* @__PURE__ */ l("ul", { className: "pkt-list", children: (f || !v) && /* @__PURE__ */ h(ee, { children: [
|
|
1782
|
-
f == null ? void 0 : f.map((_,
|
|
1782
|
+
f == null ? void 0 : f.map((_, $) => /* @__PURE__ */ l("li", { children: typeof _.target == "string" ? /* @__PURE__ */ h("a", { href: _.target, className: "pkt-link", children: [
|
|
1783
1783
|
_.iconName && /* @__PURE__ */ l(y, { name: _.iconName, className: "pkt-link__icon" }),
|
|
1784
1784
|
_.title
|
|
1785
1785
|
] }) : /* @__PURE__ */ h("button", { className: "pkt-link-button pkt-link", onClick: _.target, children: [
|
|
1786
1786
|
_.iconName && /* @__PURE__ */ l(y, { name: _.iconName, className: "pkt-link__icon" }),
|
|
1787
1787
|
_.title
|
|
1788
|
-
] }) }, `userOptions-${
|
|
1788
|
+
] }) }, `userOptions-${$}`)),
|
|
1789
1789
|
!v && /* @__PURE__ */ l("li", { children: /* @__PURE__ */ h("button", { className: "pkt-link-button pkt-link", onClick: C, children: [
|
|
1790
1790
|
/* @__PURE__ */ l(y, { name: "exit", className: "pkt-link__icon" }),
|
|
1791
1791
|
"Logg ut"
|
|
1792
1792
|
] }) })
|
|
1793
1793
|
] }) }) }),
|
|
1794
|
-
p && /* @__PURE__ */ l("li", { className: "footer", children: /* @__PURE__ */ l("ul", { className: "pkt-list-horizontal bordered", children: p.map((_,
|
|
1794
|
+
p && /* @__PURE__ */ l("li", { className: "footer", children: /* @__PURE__ */ l("ul", { className: "pkt-list-horizontal bordered", children: p.map((_, $) => /* @__PURE__ */ l("li", { children: typeof _.target == "string" ? /* @__PURE__ */ l("a", { href: _.target, className: "pkt-link", children: _.title }) : /* @__PURE__ */ l("button", { className: "pkt-link-button pkt-link", onClick: _.target, children: _.title }) }, `userMenuFooter-${$}`)) }) })
|
|
1795
1795
|
] })
|
|
1796
1796
|
]
|
|
1797
1797
|
}
|
|
@@ -1844,7 +1844,7 @@ const Re = B(
|
|
|
1844
1844
|
}, g) => {
|
|
1845
1845
|
const [j, F] = ue(!1), A = () => {
|
|
1846
1846
|
F(!j);
|
|
1847
|
-
}, U = () => i ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light" : f ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige" : "", M = i ? s : f ? p : "", H = v ? "pkt-inputwrapper--disabled" : "", Y = E ? "pkt-inputwrapper--inline" : "", G = c ? "pkt-inputwrapper--error" : "", W = !!o && o !== "", _ = a || 'Les mer <span class="pkt-sr-only">om inputfeltet</span>',
|
|
1847
|
+
}, U = () => i ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light" : f ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige" : "", M = i ? s : f ? p : "", H = v ? "pkt-inputwrapper--disabled" : "", Y = E ? "pkt-inputwrapper--inline" : "", G = c ? "pkt-inputwrapper--error" : "", W = !!o && o !== "", _ = a || 'Les mer <span class="pkt-sr-only">om inputfeltet</span>', $ = x ? "fieldset" : W ? "div" : "label", J = x ? "legend" : W ? "h2" : "span", K = C || (r ? `${e}-helptext` : void 0);
|
|
1848
1848
|
return /* @__PURE__ */ h(
|
|
1849
1849
|
"div",
|
|
1850
1850
|
{
|
|
@@ -1854,7 +1854,7 @@ const Re = B(
|
|
|
1854
1854
|
ref: g,
|
|
1855
1855
|
children: [
|
|
1856
1856
|
S ? /* @__PURE__ */ l(ee, { children: /* @__PURE__ */ h(
|
|
1857
|
-
|
|
1857
|
+
$,
|
|
1858
1858
|
{
|
|
1859
1859
|
htmlFor: x ? void 0 : e,
|
|
1860
1860
|
"aria-describedby": W ? void 0 : C,
|
|
@@ -1986,7 +1986,7 @@ const dr = ({
|
|
|
1986
1986
|
o,
|
|
1987
1987
|
"pkt-input-check"
|
|
1988
1988
|
].filter(Boolean).join(" ");
|
|
1989
|
-
return /* @__PURE__ */ l("div", { className: m, children: /* @__PURE__ */ h("div", { className: `pkt-input-check__input ${a ? "pkt-input-check__input--tile" : ""}`, children: [
|
|
1989
|
+
return /* @__PURE__ */ l("div", { className: m, children: /* @__PURE__ */ h("div", { className: `pkt-input-check__input ${a ? "pkt-input-check__input--tile" : ""} ${i && a ? "pkt-input-check__input--tile-disabled" : ""}`, children: [
|
|
1990
1990
|
/* @__PURE__ */ l(
|
|
1991
1991
|
"input",
|
|
1992
1992
|
{
|
|
@@ -2074,7 +2074,7 @@ const mr = B(
|
|
|
2074
2074
|
}) => /* @__PURE__ */ l(lr, { isResponsive: e, children: /* @__PURE__ */ l(
|
|
2075
2075
|
"table",
|
|
2076
2076
|
{
|
|
2077
|
-
className:
|
|
2077
|
+
className: Dt("pkt-table", {
|
|
2078
2078
|
"pkt-table--info": n,
|
|
2079
2079
|
"pkt-table--success": r,
|
|
2080
2080
|
"pkt-table--strong": o,
|
|
@@ -2175,7 +2175,7 @@ const _r = B(
|
|
|
2175
2175
|
onChange: M,
|
|
2176
2176
|
...H
|
|
2177
2177
|
}, Y) => {
|
|
2178
|
-
const G = [i, "pkt-textinput", "pkt-textarea"].join(" "), W = r || `${e}-label`, _ = cn(null), [
|
|
2178
|
+
const G = [i, "pkt-textinput", "pkt-textarea"].join(" "), W = r || `${e}-label`, _ = cn(null), [$, J] = ue(0), K = (Z) => {
|
|
2179
2179
|
var Q, oe;
|
|
2180
2180
|
if (o && J(((oe = (Q = Z.currentTarget) == null ? void 0 : Q.value) == null ? void 0 : oe.length) || 0), M)
|
|
2181
2181
|
return M(Z);
|
|
@@ -2207,7 +2207,7 @@ const _r = B(
|
|
|
2207
2207
|
"textarea",
|
|
2208
2208
|
{
|
|
2209
2209
|
ref: _,
|
|
2210
|
-
className: `pkt-input ${C ? "pkt-input--fullwidth" : ""} ${a &&
|
|
2210
|
+
className: `pkt-input ${C ? "pkt-input--fullwidth" : ""} ${a && $ > a ? "pkt-input--counter-error" : ""}`,
|
|
2211
2211
|
name: P || e,
|
|
2212
2212
|
id: e,
|
|
2213
2213
|
placeholder: F,
|
|
@@ -2221,7 +2221,7 @@ const _r = B(
|
|
|
2221
2221
|
}
|
|
2222
2222
|
),
|
|
2223
2223
|
o && /* @__PURE__ */ h("div", { className: "pkt-input__counter", "aria-live": "polite", "aria-atomic": !0, children: [
|
|
2224
|
-
|
|
2224
|
+
$ || 0,
|
|
2225
2225
|
a && `/${a}`
|
|
2226
2226
|
] })
|
|
2227
2227
|
]
|
|
@@ -2258,7 +2258,7 @@ const _r = B(
|
|
|
2258
2258
|
value: Y,
|
|
2259
2259
|
...G
|
|
2260
2260
|
}, W) => {
|
|
2261
|
-
const _ = [a, "pkt-textinput"].join(" "),
|
|
2261
|
+
const _ = [a, "pkt-textinput"].join(" "), $ = r || `${e}-label`;
|
|
2262
2262
|
return /* @__PURE__ */ l(
|
|
2263
2263
|
Re,
|
|
2264
2264
|
{
|
|
@@ -2294,7 +2294,7 @@ const _r = B(
|
|
|
2294
2294
|
disabled: i,
|
|
2295
2295
|
"aria-invalid": f,
|
|
2296
2296
|
"aria-errormessage": `${e}-error`,
|
|
2297
|
-
"aria-labelledby":
|
|
2297
|
+
"aria-labelledby": $,
|
|
2298
2298
|
...G
|
|
2299
2299
|
}
|
|
2300
2300
|
),
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -24,7 +24,7 @@ Check the render method of \``+t+"`."}return""}}function ir(t){{if(t!==void 0){v
|
|
|
24
24
|
|
|
25
25
|
Check your code at `+u+":"+d+"."}return""}}var It={};function sr(t){{var u=$t();if(!u){var d=typeof t=="string"?t:t.displayName||t.name;d&&(u=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+d+">.")}return u}}function Lt(t,u){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var d=sr(u);if(It[d])return;It[d]=!0;var k="";t&&t._owner&&t._owner!==ze.current&&(k=" It was passed a child from "+I(t._owner.type)+"."),ae(t),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',d,k),ae(null)}}function Ft(t,u){{if(typeof t!="object")return;if(Je(t))for(var d=0;d<t.length;d++){var k=t[d];Ge(k)&&Lt(k,u)}else if(Ge(t))t._store&&(t._store.validated=!0);else if(t){var R=D(t);if(typeof R=="function"&&R!==t.entries)for(var j=R.call(t),C;!(C=j.next()).done;)Ge(C.value)&&Lt(C.value,u)}}}function cr(t){{var u=t.type;if(u==null||typeof u=="string")return;var d;if(typeof u=="function")d=u.propTypes;else if(typeof u=="object"&&(u.$$typeof===f||u.$$typeof===v))d=u.propTypes;else return;if(d){var k=I(u);Gn(d,t.props,"prop",k,t)}else if(u.PropTypes!==void 0&&!qe){qe=!0;var R=I(u);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",R||"Unknown")}typeof u.getDefaultProps=="function"&&!u.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ur(t){{for(var u=Object.keys(t.props),d=0;d<u.length;d++){var k=u[d];if(k!=="children"&&k!=="key"){ae(t),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",k),ae(null);break}}t.ref!==null&&(ae(t),g("Invalid attribute `ref` supplied to `React.Fragment`."),ae(null))}}function At(t,u,d,k,R,j){{var C=G(t);if(!C){var E="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(E+=" 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 V=ir(R);V?E+=V:E+=$t();var L;t===null?L="null":Je(t)?L="array":t!==void 0&&t.$$typeof===n?(L="<"+(I(t.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):L=typeof t,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",L,E)}var F=or(t,u,d,R,j);if(F==null)return F;if(C){var z=u.children;if(z!==void 0)if(k)if(Je(z)){for(var le=0;le<z.length;le++)Ft(z[le],t);Object.freeze&&Object.freeze(z)}else g("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 Ft(z,t)}return t===o?ur(F):cr(F),F}}function fr(t,u,d){return At(t,u,d,!0)}function pr(t,u,d){return At(t,u,d,!1)}var dr=pr,mr=fr;ie.Fragment=o,ie.jsx=dr,ie.jsxs=mr}()),ie}process.env.NODE_ENV==="production"?Pe.exports=Vt():Pe.exports=Mt();var Re=Pe.exports;const Z=Re.Fragment,l=Re.jsx,h=Re.jsxs,Se={},Yt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',Jt="https://punkt-cdn.oslo.kommune.no/9.
|
|
27
|
+
Check the top-level render call using <`+d+">.")}return u}}function Lt(t,u){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var d=sr(u);if(It[d])return;It[d]=!0;var k="";t&&t._owner&&t._owner!==ze.current&&(k=" It was passed a child from "+I(t._owner.type)+"."),ae(t),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',d,k),ae(null)}}function Ft(t,u){{if(typeof t!="object")return;if(Je(t))for(var d=0;d<t.length;d++){var k=t[d];Ge(k)&&Lt(k,u)}else if(Ge(t))t._store&&(t._store.validated=!0);else if(t){var R=D(t);if(typeof R=="function"&&R!==t.entries)for(var j=R.call(t),C;!(C=j.next()).done;)Ge(C.value)&&Lt(C.value,u)}}}function cr(t){{var u=t.type;if(u==null||typeof u=="string")return;var d;if(typeof u=="function")d=u.propTypes;else if(typeof u=="object"&&(u.$$typeof===f||u.$$typeof===v))d=u.propTypes;else return;if(d){var k=I(u);Gn(d,t.props,"prop",k,t)}else if(u.PropTypes!==void 0&&!qe){qe=!0;var R=I(u);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",R||"Unknown")}typeof u.getDefaultProps=="function"&&!u.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ur(t){{for(var u=Object.keys(t.props),d=0;d<u.length;d++){var k=u[d];if(k!=="children"&&k!=="key"){ae(t),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",k),ae(null);break}}t.ref!==null&&(ae(t),g("Invalid attribute `ref` supplied to `React.Fragment`."),ae(null))}}function At(t,u,d,k,R,j){{var C=G(t);if(!C){var E="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(E+=" 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 V=ir(R);V?E+=V:E+=$t();var L;t===null?L="null":Je(t)?L="array":t!==void 0&&t.$$typeof===n?(L="<"+(I(t.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):L=typeof t,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",L,E)}var F=or(t,u,d,R,j);if(F==null)return F;if(C){var z=u.children;if(z!==void 0)if(k)if(Je(z)){for(var le=0;le<z.length;le++)Ft(z[le],t);Object.freeze&&Object.freeze(z)}else g("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 Ft(z,t)}return t===o?ur(F):cr(F),F}}function fr(t,u,d){return At(t,u,d,!0)}function pr(t,u,d){return At(t,u,d,!1)}var dr=pr,mr=fr;ie.Fragment=o,ie.jsx=dr,ie.jsxs=mr}()),ie}process.env.NODE_ENV==="production"?Pe.exports=Vt():Pe.exports=Mt();var Re=Pe.exports;const Z=Re.Fragment,l=Re.jsx,h=Re.jsxs,Se={},Yt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',Jt="https://punkt-cdn.oslo.kommune.no/9.4/icons/",Ht=(e,n)=>(!Se[e]&&typeof window.fetch=="function"&&(Se[e]=window.fetch(n+e+".svg").then(r=>r.ok?r.text():(console.error("Missing icon: "+n+e+".svg"),Yt)).then(r=>r)),Promise.resolve(Se[e])),zt={fetchIcon:async(e,n)=>Ht(e,n||Jt)},Ze=N.createContext(zt),y=({name:e,path:n,className:r="",...o})=>{const[a,i]=N.useState(null),s=N.useContext(Ze);return N.useEffect(()=>{e?s.fetchIcon(e,n).then(i):i(null)},[e,n]),a?l("span",{className:`pkt-icon ${r}`,dangerouslySetInnerHTML:{__html:a},...o}):null},Qe=N.forwardRef(({children:e,className:n,skin:r="info",closeAlert:o=!1,onClose:a,title:i,date:s,ariaLive:p="polite",slim:f=!1,...c},m)=>{const v=[n,"pkt-alert",r&&`pkt-alert--${r}`,f&&"pkt-alert--slim"].filter(Boolean).join(" "),[w,P]=N.useState(!0),O=()=>{P(!1),a&&a()};return w?h("div",{...c,className:v,"aria-live":p,ref:m,children:[l(y,{className:"pkt-alert__icon",name:r==="info"?"alert-information":`alert-${r}`}),o&&l("div",{className:"pkt-alert__close",children:l("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:O,children:l(y,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),i&&l("div",{className:"pkt-alert__title",children:i}),l("div",{className:"pkt-alert__text",children:e}),s&&h("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",s]})]}):null}),qt=N.forwardRef(({href:e,text:n,onClick:r,className:o,...a},i)=>{const s=[o,"pkt-back-link"].filter(Boolean).join(" ");return l("nav",{ref:i,className:s,"aria-label":"Gå tilbake et steg",children:h("a",{href:e||"/",className:"pkt-link pkt-link--icon-left",onClick:()=>{r&&r()},...a,children:[l(y,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),l("span",{className:"pkt-back-link__text",children:n||"Forsiden"})]})})});/**
|
|
28
28
|
* @remix-run/router v1.7.1
|
|
29
29
|
*
|
|
30
30
|
* Copyright (c) Remix Software Inc.
|
|
@@ -51,8 +51,8 @@ Check the top-level render call using <`+d+">.")}return u}}function Lt(t,u){{if(
|
|
|
51
51
|
* LICENSE.md file in the root directory of this source tree.
|
|
52
52
|
*
|
|
53
53
|
* @license MIT
|
|
54
|
-
*/function ne(){return ne=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},ne.apply(this,arguments)}function Ue(e,n){if(e==null)return{};var r={},o=Object.keys(e),a,i;for(i=0;i<o.length;i++)a=o[i],!(n.indexOf(a)>=0)&&(r[a]=e[a]);return r}const ve="get",_e="application/x-www-form-urlencoded";function be(e){return e!=null&&typeof e.tagName=="string"}function un(e){return be(e)&&e.tagName.toLowerCase()==="button"}function fn(e){return be(e)&&e.tagName.toLowerCase()==="form"}function pn(e){return be(e)&&e.tagName.toLowerCase()==="input"}function dn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function mn(e,n){return e.button===0&&(!n||n==="_self")&&!dn(e)}let ge=null;function hn(){if(ge===null)try{new FormData(document.createElement("form"),0),ge=!1}catch{ge=!0}return ge}const kn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Be(e){return e!=null&&!kn.has(e)?(process.env.NODE_ENV!=="production"&&de(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+_e+'"')),null):e}function vn(e,n){let r,o,a,i,s;if(fn(e)){let p=e.getAttribute("action");o=p?je(p,n):null,r=e.getAttribute("method")||ve,a=Be(e.getAttribute("enctype"))||_e,i=new FormData(e)}else if(un(e)||pn(e)&&(e.type==="submit"||e.type==="image")){let p=e.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||p.getAttribute("action");if(o=f?je(f,n):null,r=e.getAttribute("formmethod")||p.getAttribute("method")||ve,a=Be(e.getAttribute("formenctype"))||Be(p.getAttribute("enctype"))||_e,i=new FormData(p,e),!hn()){let{name:c,type:m,value:v}=e;if(m==="image"){let w=c?c+".":"";i.append(w+"x","0"),i.append(w+"y","0")}else c&&i.append(c,v)}}else{if(be(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ve,o=null,a=_e,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:o,method:r.toLowerCase(),encType:a,formData:i,body:s}}const _n=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],bn=["aria-current","caseSensitive","className","end","style","to","children"],gn=["reloadDocument","replace","method","action","onSubmit","submit","relative","preventScrollReset"];process.env.NODE_ENV;const Nn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ne=b.forwardRef(function(n,r){let{onClick:o,relative:a,reloadDocument:i,replace:s,state:p,target:f,to:c,preventScrollReset:m}=n,v=Ue(n,_n),{basename:w}=b.useContext(Q),P,O=!1;if(typeof c=="string"&&yn.test(c)&&(P=c,Nn))try{let g=new URL(window.location.href),$=c.startsWith("//")?new URL(g.protocol+c):new URL(c),U=je($.pathname,w);$.origin===g.origin&&U!=null?c=U+$.search+$.hash:O=!0}catch{process.env.NODE_ENV!=="production"&&de(!1,'<Link to="'+c+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let S=nn(c,{relative:a}),D=Pn(c,{replace:s,state:p,target:f,preventScrollReset:m,relative:a});function x(g){o&&o(g),g.defaultPrevented||D(g)}return b.createElement("a",ne({},v,{href:P||S,onClick:O||i?o:x,ref:r,target:f}))});process.env.NODE_ENV!=="production"&&(Ne.displayName="Link");const En=b.forwardRef(function(n,r){let{"aria-current":o="page",caseSensitive:a=!1,className:i="",end:s=!1,style:p,to:f,children:c}=n,m=Ue(n,bn),v=he(f,{relative:m.relative}),w=se(),P=b.useContext(ot),{navigator:O}=b.useContext(Q),S=O.encodeLocation?O.encodeLocation(v).pathname:v.pathname,D=w.pathname,x=P&&P.navigation&&P.navigation.location?P.navigation.location.pathname:null;a||(D=D.toLowerCase(),x=x?x.toLowerCase():null,S=S.toLowerCase());let g=D===S||!s&&D.startsWith(S)&&D.charAt(S.length)==="/",$=x!=null&&(x===S||!s&&x.startsWith(S)&&x.charAt(S.length)==="/"),U=g?o:void 0,B;typeof i=="function"?B=i({isActive:g,isPending:$}):B=[i,g?"active":null,$?"pending":null].filter(Boolean).join(" ");let W=typeof p=="function"?p({isActive:g,isPending:$}):p;return b.createElement(Ne,ne({},m,{"aria-current":U,className:B,ref:r,style:W,to:f}),typeof c=="function"?c({isActive:g,isPending:$}):c)});process.env.NODE_ENV!=="production"&&(En.displayName="NavLink");const wn=b.forwardRef((e,n)=>{let r=Sn();return b.createElement(pt,ne({},e,{submit:r,ref:n}))});process.env.NODE_ENV!=="production"&&(wn.displayName="Form");const pt=b.forwardRef((e,n)=>{let{reloadDocument:r,replace:o,method:a=ve,action:i,onSubmit:s,submit:p,relative:f,preventScrollReset:c}=e,m=Ue(e,gn),v=a.toLowerCase()==="get"?"get":"post",w=On(i,{relative:f}),P=O=>{if(s&&s(O),O.defaultPrevented)return;O.preventDefault();let S=O.nativeEvent.submitter,D=(S==null?void 0:S.getAttribute("formmethod"))||a;p(S||O.currentTarget,{method:D,replace:o,relative:f,preventScrollReset:c})};return b.createElement("form",ne({ref:n,method:v,action:w,onSubmit:r?s:P},m))});process.env.NODE_ENV!=="production"&&(pt.displayName="FormImpl"),process.env.NODE_ENV;var We;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(We||(We={}));var dt;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(dt||(dt={}));function xn(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Cn(e){let n=b.useContext(me);return n||(process.env.NODE_ENV!=="production"?A(!1,xn(e)):A(!1)),n}function Pn(e,n){let{target:r,replace:o,state:a,preventScrollReset:i,relative:s}=n===void 0?{}:n,p=rn(),f=se(),c=he(e,{relative:s});return b.useCallback(m=>{if(mn(m,r)){m.preventDefault();let v=o!==void 0?o:Te(f)===Te(c);p(e,{replace:v,state:a,preventScrollReset:i,relative:s})}},[f,p,c,o,a,r,e,i,s])}function Rn(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}function Sn(){let{router:e}=Cn(We.UseSubmit),{basename:n}=b.useContext(Q),r=sn();return b.useCallback(function(o,a){a===void 0&&(a={}),Rn();let{action:i,method:s,encType:p,formData:f,body:c}=vn(o,n);e.navigate(a.action||i,{preventScrollReset:a.preventScrollReset,formData:f,body:c,formMethod:a.method||s,formEncType:a.encType||p,replace:a.replace,fromRouteId:r})},[e,n,r])}function On(e,n){let{relative:r}=n===void 0?{}:n,{basename:o}=b.useContext(Q),a=b.useContext(re);a||(process.env.NODE_ENV!=="production"?A(!1,"useFormAction must be used inside a RouteContext"):A(!1));let[i]=a.matches.slice(-1),s=ne({},he(e||".",{relative:r})),p=se();if(e==null&&(s.search=p.search,s.hash=p.hash,i.route.index)){let f=new URLSearchParams(s.search);f.delete("index"),s.search=f.toString()?"?"+f.toString():""}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(s.pathname=s.pathname==="/"?o:$e([o,s.pathname])),Te(s)}const Tn=N.forwardRef(({breadcrumbs:e,navigationType:n,className:r,...o},a)=>{const i=e.slice(0,4),s=i[i.length-2],p=[r,"pkt-breadcrumbs"].filter(Boolean).join(" ");return h("nav",{ref:a,"aria-label":"brødsmulemeny",className:p,children:[l("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:i.map((f,c)=>l("li",{className:"pkt-breadcrumbs__item",children:c===i.length-1?l("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:l("span",{className:"pkt-breadcrumbs__text",children:f.text})}):n==="router"?h(Ne,{to:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...o,children:[l(y,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l("span",{className:"pkt-breadcrumbs__text",children:f.text})]}):h("a",{href:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...o,children:[l(y,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l("span",{className:"pkt-breadcrumbs__text",children:f.text})]})},`breadcrumb-${c}`))}),n==="router"?h(Ne,{to:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...o,children:[l(y,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l("span",{className:"pkt-breadcrumbs__text",children:s.text})]}):h("a",{href:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...o,children:[l(y,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l("span",{className:"pkt-breadcrumbs__text",children:s.text})]})]})}),ce=N.forwardRef(({children:e,className:n,iconName:r="user",secondIconName:o="user",size:a="medium",skin:i="primary",type:s="button",variant:p="label-only",color:f,...c},m)=>{const v=[n,"pkt-btn",a&&`pkt-btn--${a}`,i&&`pkt-btn--${i}`,p&&`pkt-btn--${p}`,f&&`pkt-btn--${f}`].filter(Boolean).join(" ");return h("button",{...c,className:v,type:s,ref:m,children:[p!=="label-only"&&l(y,{className:"pkt-btn__icon",name:r}),l("span",{className:"pkt-btn__text",children:e}),p==="icons-right-and-left"&&l(y,{className:"pkt-btn__icon",name:o})]})});ce.displayName="PktButton";const mt=N.forwardRef(({id:e,hasTile:n=!1,disabled:r=!1,label:o,checkHelptext:a,hasError:i=!1,className:s,...p},f)=>{const c=[s,"pkt-input-check"].filter(Boolean).join(" ");return l("div",{className:c,children:h("div",{className:`pkt-input-check__input ${n?"pkt-input-check__input--tile":""}`,children:[l("input",{ref:f,className:`pkt-input-check__input-checkbox ${i?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",id:e,disabled:r,...p}),h("label",{className:"pkt-input-check__input-label",htmlFor:e,children:[o,a&&l("div",{className:"pkt-input-check__input-helptext",children:a})]})]})})});mt.displayName="PktCheckbox";const jn=({columnOne:e,columnTwo:n,socialLinks:r,className:o,personvernOgInfoLink:a="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:i="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var p,f;const s=[o,"pkt-footer"].filter(Boolean).join(" ");return l("footer",{className:s,"data-mode":"dark",children:h("div",{className:"pkt-footer__container",children:[h("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l("h2",{className:"pkt-footer__title",children:e.title}),h("ul",{className:"pkt-footer__list",children:[e.text&&l("li",{className:"pkt-footer__text",children:e.text}),(p=e.links)==null?void 0:p.map((c,m)=>l("li",{className:"pkt-footer__list-item",children:h("a",{className:`pkt-footer__link ${c.external?"pkt-link--external":""}`,href:c.href,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:[l(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),c.text]})},`links-${m}`))]})]}),h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l("h2",{className:"pkt-footer__title",children:n.title}),h("ul",{className:"pkt-footer__list",children:[n.text&&l("li",{className:"pkt-footer__text",children:n.text}),(f=n.links)==null?void 0:f.map((c,m)=>l("li",{className:"pkt-footer__list-item",children:h("a",{className:`pkt-footer__link ${c.external?"pkt-link--external":""}`,href:c.href,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:[l(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),c.text]})},`links-${m}`))]})]}),h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),h("ul",{className:"pkt-footer__list",children:[l("li",{className:"pkt-footer__list-item",children:h("a",{className:"pkt-footer__link",href:a,children:[l(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),l("li",{className:"pkt-footer__list-item",children:h("a",{className:"pkt-footer__link",href:i,children:[l(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),r&&h("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[l("div",{className:"pkt-footer__social-languages",children:r.filter(c=>c.language).map((c,m)=>l("div",{className:"pkt-footer__social-language",children:l("a",{href:c.href,"aria-label":`til ${c.language} versjon av nettsiden`,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:c.language})},`sociallinks-language-${m}`))}),l("div",{className:"pkt-footer__social-icons",children:r.filter(c=>c.iconName).map((c,m)=>l(N.Fragment,{children:l("a",{href:c.href,"aria-label":`til ${c.iconName}`,className:"pkt-footer__social-icon-link",target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:l(y,{className:"pkt-footer__social-icon",name:c.iconName})})},`sociallinks-${m}`))})]})]})})},Dn=({links:e=[],personvernOgInfoLink:n="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:r="https://www.oslo.kommune.no/tilgjengelighet/",className:o})=>{const a=[o,"pkt-footer-simple"].filter(Boolean).join(" ");return l("footer",{className:a,"data-mode":"dark",children:l("div",{className:"pkt-footer-simple__container",children:h("ul",{className:"pkt-footer-simple__list",children:[e.map((i,s)=>l("li",{className:"pkt-footer-simple__list-item",children:h("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:[l(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),i.text]})},s)),l("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:"pkt-footer-simple__link",href:n,children:[l(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),l("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:"pkt-footer-simple__link",href:r,children:[l(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})};var ht={exports:{}};/*!
|
|
54
|
+
*/function ne(){return ne=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},ne.apply(this,arguments)}function Ue(e,n){if(e==null)return{};var r={},o=Object.keys(e),a,i;for(i=0;i<o.length;i++)a=o[i],!(n.indexOf(a)>=0)&&(r[a]=e[a]);return r}const ve="get",_e="application/x-www-form-urlencoded";function be(e){return e!=null&&typeof e.tagName=="string"}function un(e){return be(e)&&e.tagName.toLowerCase()==="button"}function fn(e){return be(e)&&e.tagName.toLowerCase()==="form"}function pn(e){return be(e)&&e.tagName.toLowerCase()==="input"}function dn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function mn(e,n){return e.button===0&&(!n||n==="_self")&&!dn(e)}let ge=null;function hn(){if(ge===null)try{new FormData(document.createElement("form"),0),ge=!1}catch{ge=!0}return ge}const kn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Be(e){return e!=null&&!kn.has(e)?(process.env.NODE_ENV!=="production"&&de(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+_e+'"')),null):e}function vn(e,n){let r,o,a,i,s;if(fn(e)){let p=e.getAttribute("action");o=p?je(p,n):null,r=e.getAttribute("method")||ve,a=Be(e.getAttribute("enctype"))||_e,i=new FormData(e)}else if(un(e)||pn(e)&&(e.type==="submit"||e.type==="image")){let p=e.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||p.getAttribute("action");if(o=f?je(f,n):null,r=e.getAttribute("formmethod")||p.getAttribute("method")||ve,a=Be(e.getAttribute("formenctype"))||Be(p.getAttribute("enctype"))||_e,i=new FormData(p,e),!hn()){let{name:c,type:m,value:v}=e;if(m==="image"){let w=c?c+".":"";i.append(w+"x","0"),i.append(w+"y","0")}else c&&i.append(c,v)}}else{if(be(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ve,o=null,a=_e,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:o,method:r.toLowerCase(),encType:a,formData:i,body:s}}const _n=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],bn=["aria-current","caseSensitive","className","end","style","to","children"],gn=["reloadDocument","replace","method","action","onSubmit","submit","relative","preventScrollReset"];process.env.NODE_ENV;const Nn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ne=b.forwardRef(function(n,r){let{onClick:o,relative:a,reloadDocument:i,replace:s,state:p,target:f,to:c,preventScrollReset:m}=n,v=Ue(n,_n),{basename:w}=b.useContext(Q),P,O=!1;if(typeof c=="string"&&yn.test(c)&&(P=c,Nn))try{let g=new URL(window.location.href),$=c.startsWith("//")?new URL(g.protocol+c):new URL(c),U=je($.pathname,w);$.origin===g.origin&&U!=null?c=U+$.search+$.hash:O=!0}catch{process.env.NODE_ENV!=="production"&&de(!1,'<Link to="'+c+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let S=nn(c,{relative:a}),D=Pn(c,{replace:s,state:p,target:f,preventScrollReset:m,relative:a});function x(g){o&&o(g),g.defaultPrevented||D(g)}return b.createElement("a",ne({},v,{href:P||S,onClick:O||i?o:x,ref:r,target:f}))});process.env.NODE_ENV!=="production"&&(Ne.displayName="Link");const En=b.forwardRef(function(n,r){let{"aria-current":o="page",caseSensitive:a=!1,className:i="",end:s=!1,style:p,to:f,children:c}=n,m=Ue(n,bn),v=he(f,{relative:m.relative}),w=se(),P=b.useContext(ot),{navigator:O}=b.useContext(Q),S=O.encodeLocation?O.encodeLocation(v).pathname:v.pathname,D=w.pathname,x=P&&P.navigation&&P.navigation.location?P.navigation.location.pathname:null;a||(D=D.toLowerCase(),x=x?x.toLowerCase():null,S=S.toLowerCase());let g=D===S||!s&&D.startsWith(S)&&D.charAt(S.length)==="/",$=x!=null&&(x===S||!s&&x.startsWith(S)&&x.charAt(S.length)==="/"),U=g?o:void 0,B;typeof i=="function"?B=i({isActive:g,isPending:$}):B=[i,g?"active":null,$?"pending":null].filter(Boolean).join(" ");let W=typeof p=="function"?p({isActive:g,isPending:$}):p;return b.createElement(Ne,ne({},m,{"aria-current":U,className:B,ref:r,style:W,to:f}),typeof c=="function"?c({isActive:g,isPending:$}):c)});process.env.NODE_ENV!=="production"&&(En.displayName="NavLink");const wn=b.forwardRef((e,n)=>{let r=Sn();return b.createElement(pt,ne({},e,{submit:r,ref:n}))});process.env.NODE_ENV!=="production"&&(wn.displayName="Form");const pt=b.forwardRef((e,n)=>{let{reloadDocument:r,replace:o,method:a=ve,action:i,onSubmit:s,submit:p,relative:f,preventScrollReset:c}=e,m=Ue(e,gn),v=a.toLowerCase()==="get"?"get":"post",w=On(i,{relative:f}),P=O=>{if(s&&s(O),O.defaultPrevented)return;O.preventDefault();let S=O.nativeEvent.submitter,D=(S==null?void 0:S.getAttribute("formmethod"))||a;p(S||O.currentTarget,{method:D,replace:o,relative:f,preventScrollReset:c})};return b.createElement("form",ne({ref:n,method:v,action:w,onSubmit:r?s:P},m))});process.env.NODE_ENV!=="production"&&(pt.displayName="FormImpl"),process.env.NODE_ENV;var We;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(We||(We={}));var dt;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(dt||(dt={}));function xn(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Cn(e){let n=b.useContext(me);return n||(process.env.NODE_ENV!=="production"?A(!1,xn(e)):A(!1)),n}function Pn(e,n){let{target:r,replace:o,state:a,preventScrollReset:i,relative:s}=n===void 0?{}:n,p=rn(),f=se(),c=he(e,{relative:s});return b.useCallback(m=>{if(mn(m,r)){m.preventDefault();let v=o!==void 0?o:Te(f)===Te(c);p(e,{replace:v,state:a,preventScrollReset:i,relative:s})}},[f,p,c,o,a,r,e,i,s])}function Rn(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}function Sn(){let{router:e}=Cn(We.UseSubmit),{basename:n}=b.useContext(Q),r=sn();return b.useCallback(function(o,a){a===void 0&&(a={}),Rn();let{action:i,method:s,encType:p,formData:f,body:c}=vn(o,n);e.navigate(a.action||i,{preventScrollReset:a.preventScrollReset,formData:f,body:c,formMethod:a.method||s,formEncType:a.encType||p,replace:a.replace,fromRouteId:r})},[e,n,r])}function On(e,n){let{relative:r}=n===void 0?{}:n,{basename:o}=b.useContext(Q),a=b.useContext(re);a||(process.env.NODE_ENV!=="production"?A(!1,"useFormAction must be used inside a RouteContext"):A(!1));let[i]=a.matches.slice(-1),s=ne({},he(e||".",{relative:r})),p=se();if(e==null&&(s.search=p.search,s.hash=p.hash,i.route.index)){let f=new URLSearchParams(s.search);f.delete("index"),s.search=f.toString()?"?"+f.toString():""}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(s.pathname=s.pathname==="/"?o:$e([o,s.pathname])),Te(s)}const Tn=N.forwardRef(({breadcrumbs:e,navigationType:n,className:r,...o},a)=>{const i=e.slice(0,4),s=i[i.length-2],p=[r,"pkt-breadcrumbs"].filter(Boolean).join(" ");return h("nav",{ref:a,"aria-label":"brødsmulemeny",className:p,children:[l("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:i.map((f,c)=>l("li",{className:"pkt-breadcrumbs__item",children:c===i.length-1?l("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:l("span",{className:"pkt-breadcrumbs__text",children:f.text})}):n==="router"?h(Ne,{to:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...o,children:[l(y,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l("span",{className:"pkt-breadcrumbs__text",children:f.text})]}):h("a",{href:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...o,children:[l(y,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l("span",{className:"pkt-breadcrumbs__text",children:f.text})]})},`breadcrumb-${c}`))}),n==="router"?h(Ne,{to:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...o,children:[l(y,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l("span",{className:"pkt-breadcrumbs__text",children:s.text})]}):h("a",{href:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...o,children:[l(y,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l("span",{className:"pkt-breadcrumbs__text",children:s.text})]})]})}),ce=N.forwardRef(({children:e,className:n,iconName:r="user",secondIconName:o="user",size:a="medium",skin:i="primary",type:s="button",variant:p="label-only",color:f,...c},m)=>{const v=[n,"pkt-btn",a&&`pkt-btn--${a}`,i&&`pkt-btn--${i}`,p&&`pkt-btn--${p}`,f&&`pkt-btn--${f}`].filter(Boolean).join(" ");return h("button",{...c,className:v,type:s,ref:m,children:[p!=="label-only"&&l(y,{className:"pkt-btn__icon",name:r}),l("span",{className:"pkt-btn__text",children:e}),p==="icons-right-and-left"&&l(y,{className:"pkt-btn__icon",name:o})]})});ce.displayName="PktButton";const mt=N.forwardRef(({id:e,hasTile:n=!1,disabled:r=!1,label:o,checkHelptext:a,hasError:i=!1,className:s,...p},f)=>{const c=[s,"pkt-input-check"].filter(Boolean).join(" ");return l("div",{className:c,children:h("div",{className:`pkt-input-check__input ${n?"pkt-input-check__input--tile":""} ${r&&n?"pkt-input-check__input--tile-disabled":""}`,children:[l("input",{ref:f,className:`pkt-input-check__input-checkbox ${i?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",id:e,disabled:r,...p}),h("label",{className:"pkt-input-check__input-label",htmlFor:e,children:[o,a&&l("div",{className:"pkt-input-check__input-helptext",children:a})]})]})})});mt.displayName="PktCheckbox";const jn=({columnOne:e,columnTwo:n,socialLinks:r,className:o,personvernOgInfoLink:a="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:i="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var p,f;const s=[o,"pkt-footer"].filter(Boolean).join(" ");return l("footer",{className:s,"data-mode":"dark",children:h("div",{className:"pkt-footer__container",children:[h("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l("h2",{className:"pkt-footer__title",children:e.title}),h("ul",{className:"pkt-footer__list",children:[e.text&&l("li",{className:"pkt-footer__text",children:e.text}),(p=e.links)==null?void 0:p.map((c,m)=>l("li",{className:"pkt-footer__list-item",children:h("a",{className:`pkt-footer__link ${c.external?"pkt-link--external":""}`,href:c.href,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:[l(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),c.text]})},`links-${m}`))]})]}),h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l("h2",{className:"pkt-footer__title",children:n.title}),h("ul",{className:"pkt-footer__list",children:[n.text&&l("li",{className:"pkt-footer__text",children:n.text}),(f=n.links)==null?void 0:f.map((c,m)=>l("li",{className:"pkt-footer__list-item",children:h("a",{className:`pkt-footer__link ${c.external?"pkt-link--external":""}`,href:c.href,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:[l(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),c.text]})},`links-${m}`))]})]}),h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),h("ul",{className:"pkt-footer__list",children:[l("li",{className:"pkt-footer__list-item",children:h("a",{className:"pkt-footer__link",href:a,children:[l(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),l("li",{className:"pkt-footer__list-item",children:h("a",{className:"pkt-footer__link",href:i,children:[l(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),r&&h("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[l("div",{className:"pkt-footer__social-languages",children:r.filter(c=>c.language).map((c,m)=>l("div",{className:"pkt-footer__social-language",children:l("a",{href:c.href,"aria-label":`til ${c.language} versjon av nettsiden`,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:c.language})},`sociallinks-language-${m}`))}),l("div",{className:"pkt-footer__social-icons",children:r.filter(c=>c.iconName).map((c,m)=>l(N.Fragment,{children:l("a",{href:c.href,"aria-label":`til ${c.iconName}`,className:"pkt-footer__social-icon-link",target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:l(y,{className:"pkt-footer__social-icon",name:c.iconName})})},`sociallinks-${m}`))})]})]})})},Dn=({links:e=[],personvernOgInfoLink:n="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:r="https://www.oslo.kommune.no/tilgjengelighet/",className:o})=>{const a=[o,"pkt-footer-simple"].filter(Boolean).join(" ");return l("footer",{className:a,"data-mode":"dark",children:l("div",{className:"pkt-footer-simple__container",children:h("ul",{className:"pkt-footer-simple__list",children:[e.map((i,s)=>l("li",{className:"pkt-footer-simple__list-item",children:h("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:[l(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),i.text]})},s)),l("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:"pkt-footer-simple__link",href:n,children:[l(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),l("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:"pkt-footer-simple__link",href:r,children:[l(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})};var ht={exports:{}};/*!
|
|
55
55
|
Copyright (c) 2018 Jed Watson.
|
|
56
56
|
Licensed under the MIT License (MIT), see
|
|
57
57
|
http://jedwatson.github.io/classnames
|
|
58
|
-
*/(function(e){(function(){var n={}.hasOwnProperty;function r(){for(var o=[],a=0;a<arguments.length;a++){var i=arguments[a];if(i){var s=typeof i;if(s==="string"||s==="number")o.push(i);else if(Array.isArray(i)){if(i.length){var p=r.apply(null,i);p&&o.push(p)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){o.push(i.toString());continue}for(var f in i)n.call(i,f)&&i[f]&&o.push(f)}}}return o.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ht);var $n=ht.exports;const kt=Wt($n),In=N.forwardRef(({logoLink:e="https://www.oslo.kommune.no/",serviceName:n,fixed:r=!0,scrollToHide:o=!0,user:a,userMenu:i,representing:s,userOptions:p,userMenuFooter:f,canChangeRepresentation:c=!0,showMenuButton:m=!1,showLogOutButton:v=!1,openMenu:w,logOut:P,changeRepresentation:O,...S},D)=>{const x=N.useMemo(()=>typeof(a==null?void 0:a.lastLoggedIn)=="string"?a.lastLoggedIn:a!=null&&a.lastLoggedIn?new Date(a.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[a]),[g,$]=N.useState(!1),[U,B]=N.useState(0),[W,Y]=N.useState(!1),q=N.useRef(null);N.useEffect(()=>(document.addEventListener("mouseup",G),window.addEventListener("scroll",M),()=>{document.removeEventListener("mouseup",G),window.removeEventListener("scroll",M)}));const J=()=>{Y(!W)},G=_=>{q.current&&!q.current.contains(_.target)&&Y(!1)},M=()=>{if(o){const _=window.pageYOffset||document.documentElement.scrollTop;if(_<0||Math.abs(_-U)<60)return;$(_>U),B(_)}};return h("header",{...S,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:kt("pkt-header",{"pkt-header--fixed":r,"pkt-header--scroll-to-hide":o,"pkt-header--hidden":g}),ref:D,children:[h("div",{className:"pkt-header__logo",children:[typeof e=="string"?l("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:e,children:l(y,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/9.3/logos/"})}):l("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:e,children:l(y,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/9.3/logos/"})}),l("span",{className:"pkt-header__logo-service",children:n})]}),l("nav",{className:"pkt-header__actions",children:h("ul",{className:"pkt-header__actions-row",children:[m&&l("li",{children:l(ce,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:w,children:"Meny"})}),(a||s)&&h("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${W&&!g?"pkt-header--open-dropdown":""}`,ref:q,children:[h("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":W,onClick:J,children:[l(y,{name:"user",className:"pkt-btn__icon"}),l("span",{className:"pkt-header__user-fullname",children:(s==null?void 0:s.name)||(a==null?void 0:a.name)}),l("span",{className:"pkt-header__user-shortname",children:(s==null?void 0:s.shortname)||(a==null?void 0:a.shortname)}),l(y,{name:"chevron-thin-down",className:"pkt-btn--closed"}),l(y,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),h("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[a&&h("li",{children:[l("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),l("div",{className:"pkt-user-menu__name",children:a.name}),a.lastLoggedIn&&h("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",l("time",{children:x})]})]}),i&&l("li",{children:l("ul",{className:"pkt-list",children:i.map((_,I)=>l("li",{children:typeof _.target=="string"?h("a",{href:_.target,className:"pkt-link",children:[_.iconName&&l(y,{name:_.iconName,className:"pkt-link__icon"}),_.title]}):h("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:[_.iconName&&l(y,{name:_.iconName,className:"pkt-link__icon"}),_.title]})},`userMenu-${I}`))})}),(s||c)&&h("li",{children:[s&&h(Z,{children:[l("div",{className:"pkt-user-menu__label",children:"Representerer"}),l("div",{className:"pkt-user-menu__name",children:s.name}),s.orgNumber&&h("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",s.orgNumber]})]}),l("ul",{className:"pkt-list mt-size-16",children:c&&l("li",{children:h("button",{className:"pkt-link-button pkt-link",onClick:O,children:[l(y,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),l("li",{children:l("ul",{className:"pkt-list",children:(p||!v)&&h(Z,{children:[p==null?void 0:p.map((_,I)=>l("li",{children:typeof _.target=="string"?h("a",{href:_.target,className:"pkt-link",children:[_.iconName&&l(y,{name:_.iconName,className:"pkt-link__icon"}),_.title]}):h("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:[_.iconName&&l(y,{name:_.iconName,className:"pkt-link__icon"}),_.title]})},`userOptions-${I}`)),!v&&l("li",{children:h("button",{className:"pkt-link-button pkt-link",onClick:P,children:[l(y,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),f&&l("li",{className:"footer",children:l("ul",{className:"pkt-list-horizontal bordered",children:f.map((_,I)=>l("li",{children:typeof _.target=="string"?l("a",{href:_.target,className:"pkt-link",children:_.title}):l("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:_.title})},`userMenuFooter-${I}`))})})]})]}),v&&l("li",{children:l(ce,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:P,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),vt=N.forwardRef(({label:e,id:n,children:r,...o},a)=>h("div",{className:"pkt-form-group",children:[l("label",{htmlFor:n,className:"pkt-form-label",children:e}),l("input",{className:"pkt-form-input",id:n,...o,ref:a}),r]}));vt.displayName="PktInput";const ue=N.forwardRef(({forId:e,label:n,helptext:r,helptextDropdown:o,helptextDropdownButton:a,optionalTag:i=!1,optionalText:s="Valgfritt",requiredTag:p=!1,requiredText:f="Må fylles ut",hasError:c,errorMessage:m,disabled:v,inline:w,ariaDescribedby:P,useWrapper:O=!0,children:S,className:D,hasFieldset:x=!1},g)=>{const[$,U]=N.useState(!1),B=()=>{U(!$)},W=()=>i?"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":"",Y=i?s:p?f:"",q=v?"pkt-inputwrapper--disabled":"",J=w?"pkt-inputwrapper--inline":"",G=c?"pkt-inputwrapper--error":"",M=!!o&&o!=="",_=a||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',I=x?"fieldset":M?"div":"label",H=x?"legend":M?"h2":"span",K=P||(r?`${e}-helptext`:void 0);return h("div",{className:["pkt-inputwrapper",D,q,J,G].join(" "),ref:g,children:[O?l(Z,{children:h(I,{htmlFor:x?void 0:e,"aria-describedby":M?void 0:P,className:`pkt-inputwrapper__label${x?" pkt-inputwrapper__fieldset":""}`,children:[h(H,{id:`${e}-label`,className:`${x?" pkt-inputwrapper__legend":""}`,children:[n,Y!==""&&l("span",{className:W(),children:Y})]}),r&&l("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,dangerouslySetInnerHTML:{__html:r}}),M&&o!==""&&h("div",{children:[l(ce,{skin:"tertiary",size:"small",variant:"icon-right",iconName:$?"chevron-thin-up":"chevron-thin-down",className:"pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",onClick:B,children:l("span",{dangerouslySetInnerHTML:{__html:_}})}),l("div",{className:`pkt-inputwrapper__helptext ${$?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:l("span",{dangerouslySetInnerHTML:{__html:o}})}),!x&&l("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":K,children:n})]}),l(Z,{children:S})]})}):h(Z,{children:[!x&&l("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":K,id:`${e}-label`,children:n}),S]}),c&&m&&l("div",{children:l(Qe,{skin:"error","aria-live":"assertive",id:`${e}-error`,slim:!0,children:m})})]})});ue.displayName="PktInputWrapper";const _t=N.forwardRef(({children:e,className:n,iconName:r="user",openInNewTab:o=!1,skin:a="normal",href:i="#",external:s=!1,title:p,...f},c)=>{const m=[n,"pkt-linkcard",a&&`pkt-linkcard--${a}`].filter(Boolean).join(" ");return h("a",{...f,href:i,className:`pkt-linkcard pkt-link ${m}`,target:o?"_blank":"_self",rel:o?"noopener noreferrer":void 0,ref:c,children:[l(y,{className:"pkt-link__icon",name:r}),h("div",{className:"pkt-linkcard__content",children:[l("div",{className:`pkt-linkcard__title ${s?"pkt-link pkt-link--external":""}`,children:p}),l("div",{className:"pkt-linkcard__text",children:e})]})]})});_t.displayName="PktLinkCard";const Ln=({children:e,skin:n="beige",title:r,className:o,...a})=>{const i=["pkt-messagebox",n&&`pkt-messagebox--${n}`,o].filter(Boolean).join(" ");return h("div",{...a,className:i,children:[r&&l("div",{className:"pkt-messagebox__title",children:r}),l("div",{className:"pkt-messagebox__text",children:e})]})},bt=N.forwardRef(({id:e,name:n,label:r,className:o,hasTile:a=!1,disabled:i=!1,checkHelptext:s,hasError:p=!1,...f},c)=>{const m=[o,"pkt-input-check"].filter(Boolean).join(" ");return l("div",{className:m,children:h("div",{className:`pkt-input-check__input ${a?"pkt-input-check__input--tile":""}`,children:[l("input",{ref:c,className:`pkt-input-check__input-checkbox ${p?"pkt-input-check__input-checkbox--error":""}`,type:"radio",id:e,disabled:i,name:n,...f}),h("label",{className:"pkt-input-check__input-label",htmlFor:e,children:[r,s&&l("div",{className:"pkt-input-check__input-helptext",children:s})]})]})})});bt.displayName="PktRadioButton";const Fn=N.forwardRef(({ariaDescribedby:e,ariaLabelledby:n,children:r,className:o,disabled:a=!1,errorMessage:i,hasError:s,helptext:p,helptextDropdown:f,helptextDropdownButton:c,id:m,inline:v=!1,fullwidth:w=!1,label:P,name:O,optionalTag:S=!1,optionalText:D,requiredTag:x=!1,requiredText:g,...$},U)=>{const B=[o,"pkt-select"].join(" ");return l(ue,{className:B,forId:m,label:P,helptext:p,helptextDropdown:f,helptextDropdownButton:c,optionalTag:S,optionalText:D,requiredTag:x,requiredText:g,hasError:s,errorMessage:i,disabled:a,inline:v,ariaDescribedby:e,children:l("select",{ref:U,className:`pkt-input ${w?"pkt-input--fullwidth":""}`,"aria-invalid":s,"aria-errormessage":`${m}-error`,"aria-labelledby":n||`${m}-label`,disabled:a,id:m,name:O||m,...$,children:r})})}),An=({isResponsive:e,children:n})=>e?l("div",{className:"pkt-table-container",children:n}):l(Z,{children:n}),Un=({isResponsive:e,modifiers:{info:n=!1,success:r=!1,strong:o=!1,shadow:a=!1}={},children:i})=>l(An,{isResponsive:e,children:l("table",{className:kt("pkt-table",{"pkt-table--info":n,"pkt-table--success":r,"pkt-table--strong":o,"pkt-table--shadow":a}),children:i})}),Bn=({children:e})=>l("td",{className:"pkt-table__th",children:e}),Wn=({children:e})=>l("th",{className:"pkt-table__th",children:e}),gt=N.forwardRef(({children:e,className:n,skin:r="blue",textStyle:o="normal-text",size:a="medium",closeTag:i=!1,iconName:s="",type:p="button",ariaLabel:f="close",onClick:c=()=>{}},m)=>{const[v,w]=N.useState(!1),P=x=>{w(!0),c(x)},O=["pkt-tag",a&&`pkt-tag--${a}`,r&&`pkt-tag--${r}`,o&&`pkt-tag--${o}`,n].filter(Boolean).join(" "),S=["pkt-tag","pkt-btn","pkt-btn--tertiary",a&&`pkt-tag--${a}`,r&&`pkt-tag--${r}`,o&&`pkt-tag--${o}`,s&&i?"pkt-btn--icons-right-and-left":null,i&&!s?"pkt-btn--icon-right":null,n].filter(Boolean).join(" "),D=!v;return i&&s?l(Z,{children:D&&h("button",{className:S,type:p,"aria-label":f,onClick:P,ref:m,children:[l(y,{className:"pkt-tag__icon",name:s}),e,l(y,{className:"pkt-tag__close-btn",name:"close"})]})}):i?l(Z,{children:D&&h("button",{className:S,type:p,"aria-label":f,onClick:P,ref:m,children:[l(y,{className:"pkt-tag__close-btn",name:"close"}),e]})}):s?h("span",{className:O,children:[l(y,{className:"pkt-tag__icon",name:s}),e]}):l("span",{className:O,children:e})});gt.displayName="PktTag";const Vn=N.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:r,counter:o,counterMaxLength:a,className:i,disabled:s,errorMessage:p,hasError:f,helptext:c,helptextDropdown:m,helptextDropdownButton:v,inline:w,fullwidth:P=!1,label:O,name:S,optionalTag:D=!1,optionalText:x,requiredTag:g=!1,requiredText:$,placeholder:U,rows:B,useWrapper:W=!0,onChange:Y,...q},J)=>{const G=[i,"pkt-textinput","pkt-textarea"].join(" "),M=r||`${e}-label`,_=N.useRef(null),[I,H]=N.useState(0),K=ee=>{var te,fe;if(o&&H(((fe=(te=ee.currentTarget)==null?void 0:te.value)==null?void 0:fe.length)||0),Y)return Y(ee)};return N.useEffect(()=>{var ee,te;typeof J=="function"&&J(_.current),o&&H(((te=(ee=_==null?void 0:_.current)==null?void 0:ee.value)==null?void 0:te.length)||0)},[J]),h(ue,{ariaDescribedby:n,className:G,disabled:s,errorMessage:p,forId:e,hasError:f,helptext:c,helptextDropdown:m,helptextDropdownButton:v,inline:w,label:O,optionalTag:D,optionalText:x,requiredTag:g,requiredText:$,useWrapper:W,children:[l("textarea",{ref:_,className:`pkt-input ${P?"pkt-input--fullwidth":""} ${a&&I>a?"pkt-input--counter-error":""}`,name:S||e,id:e,placeholder:U,disabled:s,rows:B,"aria-labelledby":M,"aria-invalid":f,"aria-errormessage":`${e}-error`,...q,onChange:K}),o&&h("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":!0,children:[I||0,a&&`/${a}`]})]})}),Mn=N.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:r,autocomplete:o="off",className:a,disabled:i=!1,errorMessage:s,hasError:p=!1,helptext:f,helptextDropdown:c,helptextDropdownButton:m,iconNameRight:v,inline:w=!1,fullwidth:P=!1,label:O,name:S,optionalTag:D=!1,optionalText:x,requiredTag:g=!1,requiredText:$,placeholder:U,prefix:B,suffix:W,type:Y="text",useWrapper:q=!0,value:J,...G},M)=>{const _=[a,"pkt-textinput"].join(" "),I=r||`${e}-label`;return l(ue,{ariaDescribedby:n,className:_,disabled:i,errorMessage:s,forId:e,hasError:p,helptext:f,helptextDropdown:c,helptextDropdownButton:m,inline:w,label:O,optionalTag:D,optionalText:x,requiredTag:g,requiredText:$,useWrapper:q,children:h("div",{className:"pkt-input__container",children:[B&&l("div",{className:"pkt-input-prefix",children:B}),l("input",{ref:M,className:`pkt-input ${P?"pkt-input--fullwidth":""}`,type:Y,name:S||e,id:e,placeholder:U,autoComplete:o,value:J,disabled:i,"aria-invalid":p,"aria-errormessage":`${e}-error`,"aria-labelledby":I,...G}),W&&h("p",{className:"pkt-input-suffix",children:[W,v&&l(y,{className:"pkt-input-suffix-icon",name:v})]}),!W&&v&&l(y,{className:"pkt-input-icon",name:v})]})})});T.PktAlert=Qe,T.PktBackLink=qt,T.PktBreadcrumbs=Tn,T.PktButton=ce,T.PktCheckbox=mt,T.PktFooter=jn,T.PktFooterSimple=Dn,T.PktHeader=In,T.PktIcon=y,T.PktIconContext=Ze,T.PktInput=vt,T.PktInputWrapper=ue,T.PktLinkCard=_t,T.PktMessagebox=Ln,T.PktRadioButton=bt,T.PktSelect=Fn,T.PktTable=Un,T.PktTableData=Bn,T.PktTableHeader=Wn,T.PktTag=gt,T.PktTextarea=Vn,T.PktTextinput=Mn,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
|
|
58
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function r(){for(var o=[],a=0;a<arguments.length;a++){var i=arguments[a];if(i){var s=typeof i;if(s==="string"||s==="number")o.push(i);else if(Array.isArray(i)){if(i.length){var p=r.apply(null,i);p&&o.push(p)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){o.push(i.toString());continue}for(var f in i)n.call(i,f)&&i[f]&&o.push(f)}}}return o.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ht);var $n=ht.exports;const kt=Wt($n),In=N.forwardRef(({logoLink:e="https://www.oslo.kommune.no/",serviceName:n,fixed:r=!0,scrollToHide:o=!0,user:a,userMenu:i,representing:s,userOptions:p,userMenuFooter:f,canChangeRepresentation:c=!0,showMenuButton:m=!1,showLogOutButton:v=!1,openMenu:w,logOut:P,changeRepresentation:O,...S},D)=>{const x=N.useMemo(()=>typeof(a==null?void 0:a.lastLoggedIn)=="string"?a.lastLoggedIn:a!=null&&a.lastLoggedIn?new Date(a.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[a]),[g,$]=N.useState(!1),[U,B]=N.useState(0),[W,Y]=N.useState(!1),q=N.useRef(null);N.useEffect(()=>(document.addEventListener("mouseup",G),window.addEventListener("scroll",M),()=>{document.removeEventListener("mouseup",G),window.removeEventListener("scroll",M)}));const J=()=>{Y(!W)},G=_=>{q.current&&!q.current.contains(_.target)&&Y(!1)},M=()=>{if(o){const _=window.pageYOffset||document.documentElement.scrollTop;if(_<0||Math.abs(_-U)<60)return;$(_>U),B(_)}};return h("header",{...S,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:kt("pkt-header",{"pkt-header--fixed":r,"pkt-header--scroll-to-hide":o,"pkt-header--hidden":g}),ref:D,children:[h("div",{className:"pkt-header__logo",children:[typeof e=="string"?l("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:e,children:l(y,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/9.4/logos/"})}):l("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:e,children:l(y,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/9.4/logos/"})}),l("span",{className:"pkt-header__logo-service",children:n})]}),l("nav",{className:"pkt-header__actions",children:h("ul",{className:"pkt-header__actions-row",children:[m&&l("li",{children:l(ce,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:w,children:"Meny"})}),(a||s)&&h("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${W&&!g?"pkt-header--open-dropdown":""}`,ref:q,children:[h("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":W,onClick:J,children:[l(y,{name:"user",className:"pkt-btn__icon"}),l("span",{className:"pkt-header__user-fullname",children:(s==null?void 0:s.name)||(a==null?void 0:a.name)}),l("span",{className:"pkt-header__user-shortname",children:(s==null?void 0:s.shortname)||(a==null?void 0:a.shortname)}),l(y,{name:"chevron-thin-down",className:"pkt-btn--closed"}),l(y,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),h("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[a&&h("li",{children:[l("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),l("div",{className:"pkt-user-menu__name",children:a.name}),a.lastLoggedIn&&h("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",l("time",{children:x})]})]}),i&&l("li",{children:l("ul",{className:"pkt-list",children:i.map((_,I)=>l("li",{children:typeof _.target=="string"?h("a",{href:_.target,className:"pkt-link",children:[_.iconName&&l(y,{name:_.iconName,className:"pkt-link__icon"}),_.title]}):h("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:[_.iconName&&l(y,{name:_.iconName,className:"pkt-link__icon"}),_.title]})},`userMenu-${I}`))})}),(s||c)&&h("li",{children:[s&&h(Z,{children:[l("div",{className:"pkt-user-menu__label",children:"Representerer"}),l("div",{className:"pkt-user-menu__name",children:s.name}),s.orgNumber&&h("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",s.orgNumber]})]}),l("ul",{className:"pkt-list mt-size-16",children:c&&l("li",{children:h("button",{className:"pkt-link-button pkt-link",onClick:O,children:[l(y,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),l("li",{children:l("ul",{className:"pkt-list",children:(p||!v)&&h(Z,{children:[p==null?void 0:p.map((_,I)=>l("li",{children:typeof _.target=="string"?h("a",{href:_.target,className:"pkt-link",children:[_.iconName&&l(y,{name:_.iconName,className:"pkt-link__icon"}),_.title]}):h("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:[_.iconName&&l(y,{name:_.iconName,className:"pkt-link__icon"}),_.title]})},`userOptions-${I}`)),!v&&l("li",{children:h("button",{className:"pkt-link-button pkt-link",onClick:P,children:[l(y,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),f&&l("li",{className:"footer",children:l("ul",{className:"pkt-list-horizontal bordered",children:f.map((_,I)=>l("li",{children:typeof _.target=="string"?l("a",{href:_.target,className:"pkt-link",children:_.title}):l("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:_.title})},`userMenuFooter-${I}`))})})]})]}),v&&l("li",{children:l(ce,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:P,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),vt=N.forwardRef(({label:e,id:n,children:r,...o},a)=>h("div",{className:"pkt-form-group",children:[l("label",{htmlFor:n,className:"pkt-form-label",children:e}),l("input",{className:"pkt-form-input",id:n,...o,ref:a}),r]}));vt.displayName="PktInput";const ue=N.forwardRef(({forId:e,label:n,helptext:r,helptextDropdown:o,helptextDropdownButton:a,optionalTag:i=!1,optionalText:s="Valgfritt",requiredTag:p=!1,requiredText:f="Må fylles ut",hasError:c,errorMessage:m,disabled:v,inline:w,ariaDescribedby:P,useWrapper:O=!0,children:S,className:D,hasFieldset:x=!1},g)=>{const[$,U]=N.useState(!1),B=()=>{U(!$)},W=()=>i?"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":"",Y=i?s:p?f:"",q=v?"pkt-inputwrapper--disabled":"",J=w?"pkt-inputwrapper--inline":"",G=c?"pkt-inputwrapper--error":"",M=!!o&&o!=="",_=a||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',I=x?"fieldset":M?"div":"label",H=x?"legend":M?"h2":"span",K=P||(r?`${e}-helptext`:void 0);return h("div",{className:["pkt-inputwrapper",D,q,J,G].join(" "),ref:g,children:[O?l(Z,{children:h(I,{htmlFor:x?void 0:e,"aria-describedby":M?void 0:P,className:`pkt-inputwrapper__label${x?" pkt-inputwrapper__fieldset":""}`,children:[h(H,{id:`${e}-label`,className:`${x?" pkt-inputwrapper__legend":""}`,children:[n,Y!==""&&l("span",{className:W(),children:Y})]}),r&&l("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,dangerouslySetInnerHTML:{__html:r}}),M&&o!==""&&h("div",{children:[l(ce,{skin:"tertiary",size:"small",variant:"icon-right",iconName:$?"chevron-thin-up":"chevron-thin-down",className:"pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",onClick:B,children:l("span",{dangerouslySetInnerHTML:{__html:_}})}),l("div",{className:`pkt-inputwrapper__helptext ${$?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:l("span",{dangerouslySetInnerHTML:{__html:o}})}),!x&&l("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":K,children:n})]}),l(Z,{children:S})]})}):h(Z,{children:[!x&&l("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":K,id:`${e}-label`,children:n}),S]}),c&&m&&l("div",{children:l(Qe,{skin:"error","aria-live":"assertive",id:`${e}-error`,slim:!0,children:m})})]})});ue.displayName="PktInputWrapper";const _t=N.forwardRef(({children:e,className:n,iconName:r="user",openInNewTab:o=!1,skin:a="normal",href:i="#",external:s=!1,title:p,...f},c)=>{const m=[n,"pkt-linkcard",a&&`pkt-linkcard--${a}`].filter(Boolean).join(" ");return h("a",{...f,href:i,className:`pkt-linkcard pkt-link ${m}`,target:o?"_blank":"_self",rel:o?"noopener noreferrer":void 0,ref:c,children:[l(y,{className:"pkt-link__icon",name:r}),h("div",{className:"pkt-linkcard__content",children:[l("div",{className:`pkt-linkcard__title ${s?"pkt-link pkt-link--external":""}`,children:p}),l("div",{className:"pkt-linkcard__text",children:e})]})]})});_t.displayName="PktLinkCard";const Ln=({children:e,skin:n="beige",title:r,className:o,...a})=>{const i=["pkt-messagebox",n&&`pkt-messagebox--${n}`,o].filter(Boolean).join(" ");return h("div",{...a,className:i,children:[r&&l("div",{className:"pkt-messagebox__title",children:r}),l("div",{className:"pkt-messagebox__text",children:e})]})},bt=N.forwardRef(({id:e,name:n,label:r,className:o,hasTile:a=!1,disabled:i=!1,checkHelptext:s,hasError:p=!1,...f},c)=>{const m=[o,"pkt-input-check"].filter(Boolean).join(" ");return l("div",{className:m,children:h("div",{className:`pkt-input-check__input ${a?"pkt-input-check__input--tile":""} ${i&&a?"pkt-input-check__input--tile-disabled":""}`,children:[l("input",{ref:c,className:`pkt-input-check__input-checkbox ${p?"pkt-input-check__input-checkbox--error":""}`,type:"radio",id:e,disabled:i,name:n,...f}),h("label",{className:"pkt-input-check__input-label",htmlFor:e,children:[r,s&&l("div",{className:"pkt-input-check__input-helptext",children:s})]})]})})});bt.displayName="PktRadioButton";const Fn=N.forwardRef(({ariaDescribedby:e,ariaLabelledby:n,children:r,className:o,disabled:a=!1,errorMessage:i,hasError:s,helptext:p,helptextDropdown:f,helptextDropdownButton:c,id:m,inline:v=!1,fullwidth:w=!1,label:P,name:O,optionalTag:S=!1,optionalText:D,requiredTag:x=!1,requiredText:g,...$},U)=>{const B=[o,"pkt-select"].join(" ");return l(ue,{className:B,forId:m,label:P,helptext:p,helptextDropdown:f,helptextDropdownButton:c,optionalTag:S,optionalText:D,requiredTag:x,requiredText:g,hasError:s,errorMessage:i,disabled:a,inline:v,ariaDescribedby:e,children:l("select",{ref:U,className:`pkt-input ${w?"pkt-input--fullwidth":""}`,"aria-invalid":s,"aria-errormessage":`${m}-error`,"aria-labelledby":n||`${m}-label`,disabled:a,id:m,name:O||m,...$,children:r})})}),An=({isResponsive:e,children:n})=>e?l("div",{className:"pkt-table-container",children:n}):l(Z,{children:n}),Un=({isResponsive:e,modifiers:{info:n=!1,success:r=!1,strong:o=!1,shadow:a=!1}={},children:i})=>l(An,{isResponsive:e,children:l("table",{className:kt("pkt-table",{"pkt-table--info":n,"pkt-table--success":r,"pkt-table--strong":o,"pkt-table--shadow":a}),children:i})}),Bn=({children:e})=>l("td",{className:"pkt-table__th",children:e}),Wn=({children:e})=>l("th",{className:"pkt-table__th",children:e}),gt=N.forwardRef(({children:e,className:n,skin:r="blue",textStyle:o="normal-text",size:a="medium",closeTag:i=!1,iconName:s="",type:p="button",ariaLabel:f="close",onClick:c=()=>{}},m)=>{const[v,w]=N.useState(!1),P=x=>{w(!0),c(x)},O=["pkt-tag",a&&`pkt-tag--${a}`,r&&`pkt-tag--${r}`,o&&`pkt-tag--${o}`,n].filter(Boolean).join(" "),S=["pkt-tag","pkt-btn","pkt-btn--tertiary",a&&`pkt-tag--${a}`,r&&`pkt-tag--${r}`,o&&`pkt-tag--${o}`,s&&i?"pkt-btn--icons-right-and-left":null,i&&!s?"pkt-btn--icon-right":null,n].filter(Boolean).join(" "),D=!v;return i&&s?l(Z,{children:D&&h("button",{className:S,type:p,"aria-label":f,onClick:P,ref:m,children:[l(y,{className:"pkt-tag__icon",name:s}),e,l(y,{className:"pkt-tag__close-btn",name:"close"})]})}):i?l(Z,{children:D&&h("button",{className:S,type:p,"aria-label":f,onClick:P,ref:m,children:[l(y,{className:"pkt-tag__close-btn",name:"close"}),e]})}):s?h("span",{className:O,children:[l(y,{className:"pkt-tag__icon",name:s}),e]}):l("span",{className:O,children:e})});gt.displayName="PktTag";const Vn=N.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:r,counter:o,counterMaxLength:a,className:i,disabled:s,errorMessage:p,hasError:f,helptext:c,helptextDropdown:m,helptextDropdownButton:v,inline:w,fullwidth:P=!1,label:O,name:S,optionalTag:D=!1,optionalText:x,requiredTag:g=!1,requiredText:$,placeholder:U,rows:B,useWrapper:W=!0,onChange:Y,...q},J)=>{const G=[i,"pkt-textinput","pkt-textarea"].join(" "),M=r||`${e}-label`,_=N.useRef(null),[I,H]=N.useState(0),K=ee=>{var te,fe;if(o&&H(((fe=(te=ee.currentTarget)==null?void 0:te.value)==null?void 0:fe.length)||0),Y)return Y(ee)};return N.useEffect(()=>{var ee,te;typeof J=="function"&&J(_.current),o&&H(((te=(ee=_==null?void 0:_.current)==null?void 0:ee.value)==null?void 0:te.length)||0)},[J]),h(ue,{ariaDescribedby:n,className:G,disabled:s,errorMessage:p,forId:e,hasError:f,helptext:c,helptextDropdown:m,helptextDropdownButton:v,inline:w,label:O,optionalTag:D,optionalText:x,requiredTag:g,requiredText:$,useWrapper:W,children:[l("textarea",{ref:_,className:`pkt-input ${P?"pkt-input--fullwidth":""} ${a&&I>a?"pkt-input--counter-error":""}`,name:S||e,id:e,placeholder:U,disabled:s,rows:B,"aria-labelledby":M,"aria-invalid":f,"aria-errormessage":`${e}-error`,...q,onChange:K}),o&&h("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":!0,children:[I||0,a&&`/${a}`]})]})}),Mn=N.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:r,autocomplete:o="off",className:a,disabled:i=!1,errorMessage:s,hasError:p=!1,helptext:f,helptextDropdown:c,helptextDropdownButton:m,iconNameRight:v,inline:w=!1,fullwidth:P=!1,label:O,name:S,optionalTag:D=!1,optionalText:x,requiredTag:g=!1,requiredText:$,placeholder:U,prefix:B,suffix:W,type:Y="text",useWrapper:q=!0,value:J,...G},M)=>{const _=[a,"pkt-textinput"].join(" "),I=r||`${e}-label`;return l(ue,{ariaDescribedby:n,className:_,disabled:i,errorMessage:s,forId:e,hasError:p,helptext:f,helptextDropdown:c,helptextDropdownButton:m,inline:w,label:O,optionalTag:D,optionalText:x,requiredTag:g,requiredText:$,useWrapper:q,children:h("div",{className:"pkt-input__container",children:[B&&l("div",{className:"pkt-input-prefix",children:B}),l("input",{ref:M,className:`pkt-input ${P?"pkt-input--fullwidth":""}`,type:Y,name:S||e,id:e,placeholder:U,autoComplete:o,value:J,disabled:i,"aria-invalid":p,"aria-errormessage":`${e}-error`,"aria-labelledby":I,...G}),W&&h("p",{className:"pkt-input-suffix",children:[W,v&&l(y,{className:"pkt-input-suffix-icon",name:v})]}),!W&&v&&l(y,{className:"pkt-input-icon",name:v})]})})});T.PktAlert=Qe,T.PktBackLink=qt,T.PktBreadcrumbs=Tn,T.PktButton=ce,T.PktCheckbox=mt,T.PktFooter=jn,T.PktFooterSimple=Dn,T.PktHeader=In,T.PktIcon=y,T.PktIconContext=Ze,T.PktInput=vt,T.PktInputWrapper=ue,T.PktLinkCard=_t,T.PktMessagebox=Ln,T.PktRadioButton=bt,T.PktSelect=Fn,T.PktTable=Un,T.PktTableData=Bn,T.PktTableHeader=Wn,T.PktTag=gt,T.PktTextarea=Vn,T.PktTextinput=Mn,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.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",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@oslokommune/punkt-assets": "^9.2.2",
|
|
36
|
-
"@oslokommune/punkt-css": "^9.
|
|
36
|
+
"@oslokommune/punkt-css": "^9.4.0",
|
|
37
37
|
"@testing-library/jest-dom": "^5.16.5",
|
|
38
38
|
"@testing-library/react": "^14.0.0",
|
|
39
39
|
"@testing-library/user-event": "^14.4.3",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
92
92
|
},
|
|
93
93
|
"license": "MIT",
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "83be982bc70185235a77feda8a8628bb44964aba"
|
|
95
95
|
}
|
|
@@ -34,7 +34,7 @@ export const PktCheckbox = forwardRef(
|
|
|
34
34
|
|
|
35
35
|
return (
|
|
36
36
|
<div className={classes}>
|
|
37
|
-
<div className={`pkt-input-check__input ${hasTile ? 'pkt-input-check__input--tile' : ''}`}>
|
|
37
|
+
<div className={`pkt-input-check__input ${hasTile ? 'pkt-input-check__input--tile' : ''} ${disabled && hasTile ? 'pkt-input-check__input--tile-disabled' : ''}`}>
|
|
38
38
|
<input
|
|
39
39
|
ref={ref}
|
|
40
40
|
className={`pkt-input-check__input-checkbox ${hasError ? 'pkt-input-check__input-checkbox--error' : ''}`}
|
|
@@ -34,7 +34,7 @@ export const PktRadioButton = forwardRef(
|
|
|
34
34
|
return (
|
|
35
35
|
|
|
36
36
|
<div className={classes}>
|
|
37
|
-
<div className={`pkt-input-check__input ${hasTile ? 'pkt-input-check__input--tile' : ''}`}>
|
|
37
|
+
<div className={`pkt-input-check__input ${hasTile ? 'pkt-input-check__input--tile' : ''} ${disabled && hasTile ? 'pkt-input-check__input--tile-disabled' : ''}`}>
|
|
38
38
|
<input
|
|
39
39
|
ref={ref}
|
|
40
40
|
className={`pkt-input-check__input-checkbox ${hasError ? 'pkt-input-check__input-checkbox--error' : ''}`}
|