@oslokommune/punkt-react 11.12.8 → 11.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/components/icon/DefaultIconFetcher.d.ts +1 -1
- package/dist/components/table/Table.d.ts +2 -2
- package/dist/punkt-react.es.js +48 -49
- package/dist/punkt-react.umd.js +8 -8
- package/package.json +3 -3
- package/src/components/table/Table.test.tsx +3 -3
- package/src/components/table/Table.tsx +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,23 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [11.13.0](https://github.com/oslokommune/punkt/compare/11.12.8...11.13.0) (2024-05-22)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
Ingen
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
Ingen
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
|
|
8
25
|
## [11.13.0](https://github.com/oslokommune/punkt/compare/11.12.7...11.13.0) (2024-05-14)
|
|
9
26
|
|
|
10
27
|
### ⚠ BREAKING CHANGES
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconFetcher } from './IconContext';
|
|
2
2
|
|
|
3
|
-
export declare const defaultSvgPath = "https://punkt-cdn.oslo.kommune.no/11.
|
|
3
|
+
export declare const defaultSvgPath = "https://punkt-cdn.oslo.kommune.no/11.13/icons/";
|
|
4
4
|
declare const defaultIconFetcher: IconFetcher;
|
|
5
5
|
export default defaultIconFetcher;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export type TTableSkin = 'basic' | 'zebra-
|
|
2
|
+
export type TTableSkin = 'basic' | 'zebra-blue';
|
|
3
3
|
interface ITableProps {
|
|
4
4
|
compact?: boolean;
|
|
5
|
-
skin?: 'basic' | 'zebra-
|
|
5
|
+
skin?: 'basic' | 'zebra-blue';
|
|
6
6
|
responsiveView?: boolean;
|
|
7
7
|
className?: string;
|
|
8
8
|
children: React.ReactNode;
|
package/dist/punkt-react.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as g from "react";
|
|
2
|
-
import X, { createContext as fn, useState as le, useContext as dn, useEffect as
|
|
2
|
+
import X, { createContext as fn, useState as le, useContext as dn, useEffect as ze, forwardRef as V, useRef as yt, Fragment as mn } from "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
function hn(e) {
|
|
5
5
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -79,7 +79,7 @@ function vn() {
|
|
|
79
79
|
// with.
|
|
80
80
|
n.$$typeof === M || n.getModuleId !== void 0));
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function z(n, f, m) {
|
|
83
83
|
var x = n.displayName;
|
|
84
84
|
if (x)
|
|
85
85
|
return x;
|
|
@@ -119,7 +119,7 @@ function vn() {
|
|
|
119
119
|
var m = n;
|
|
120
120
|
return K(m._context) + ".Provider";
|
|
121
121
|
case p:
|
|
122
|
-
return
|
|
122
|
+
return z(n, n.render, "ForwardRef");
|
|
123
123
|
case h:
|
|
124
124
|
var x = n.displayName || null;
|
|
125
125
|
return x !== null ? x : I(n.type) || "Memo";
|
|
@@ -264,14 +264,14 @@ function vn() {
|
|
|
264
264
|
} catch (G) {
|
|
265
265
|
if (G && x && typeof G.stack == "string") {
|
|
266
266
|
for (var w = G.stack.split(`
|
|
267
|
-
`),
|
|
268
|
-
`), $ = w.length - 1, F =
|
|
267
|
+
`), J = x.stack.split(`
|
|
268
|
+
`), $ = w.length - 1, F = J.length - 1; $ >= 1 && F >= 0 && w[$] !== J[F]; )
|
|
269
269
|
F--;
|
|
270
270
|
for (; $ >= 1 && F >= 0; $--, F--)
|
|
271
|
-
if (w[$] !==
|
|
271
|
+
if (w[$] !== J[F]) {
|
|
272
272
|
if ($ !== 1 || F !== 1)
|
|
273
273
|
do
|
|
274
|
-
if ($--, F--, F < 0 || w[$] !==
|
|
274
|
+
if ($--, F--, F < 0 || w[$] !== J[F]) {
|
|
275
275
|
var q = `
|
|
276
276
|
` + w[$].replace(" at new ", " at ");
|
|
277
277
|
return n.displayName && q.includes("<anonymous>") && (q = q.replace("<anonymous>", n.displayName)), typeof n == "function" && _e.set(n, q), q;
|
|
@@ -338,8 +338,8 @@ function vn() {
|
|
|
338
338
|
var w = void 0;
|
|
339
339
|
try {
|
|
340
340
|
if (typeof n[E] != "function") {
|
|
341
|
-
var
|
|
342
|
-
throw
|
|
341
|
+
var J = Error((x || "React class") + ": " + m + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
342
|
+
throw J.name = "Invariant Violation", J;
|
|
343
343
|
}
|
|
344
344
|
w = n[E](f, E, x, m, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
345
345
|
} catch ($) {
|
|
@@ -359,7 +359,7 @@ function vn() {
|
|
|
359
359
|
return m;
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function Jt(n) {
|
|
363
363
|
try {
|
|
364
364
|
return it(n), !1;
|
|
365
365
|
} catch {
|
|
@@ -370,10 +370,10 @@ function vn() {
|
|
|
370
370
|
return "" + n;
|
|
371
371
|
}
|
|
372
372
|
function ot(n) {
|
|
373
|
-
if (
|
|
373
|
+
if (Jt(n))
|
|
374
374
|
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Kt(n)), it(n);
|
|
375
375
|
}
|
|
376
|
-
var ue = R.ReactCurrentOwner,
|
|
376
|
+
var ue = R.ReactCurrentOwner, zt = {
|
|
377
377
|
key: !0,
|
|
378
378
|
ref: !0,
|
|
379
379
|
__self: !0,
|
|
@@ -455,20 +455,20 @@ function vn() {
|
|
|
455
455
|
};
|
|
456
456
|
function en(n, f, m, x, P) {
|
|
457
457
|
{
|
|
458
|
-
var T, E = {}, w = null,
|
|
459
|
-
m !== void 0 && (ot(m), w = "" + m), qt(f) && (ot(f.key), w = "" + f.key), Gt(f) && (
|
|
458
|
+
var T, E = {}, w = null, J = null;
|
|
459
|
+
m !== void 0 && (ot(m), w = "" + m), qt(f) && (ot(f.key), w = "" + f.key), Gt(f) && (J = f.ref, Xt(f, P));
|
|
460
460
|
for (T in f)
|
|
461
|
-
ce.call(f, T) && !
|
|
461
|
+
ce.call(f, T) && !zt.hasOwnProperty(T) && (E[T] = f[T]);
|
|
462
462
|
if (n && n.defaultProps) {
|
|
463
463
|
var $ = n.defaultProps;
|
|
464
464
|
for (T in $)
|
|
465
465
|
E[T] === void 0 && (E[T] = $[T]);
|
|
466
466
|
}
|
|
467
|
-
if (w ||
|
|
467
|
+
if (w || J) {
|
|
468
468
|
var F = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
469
|
-
w && Ht(E, F),
|
|
469
|
+
w && Ht(E, F), J && Zt(E, F);
|
|
470
470
|
}
|
|
471
|
-
return Qt(n, w,
|
|
471
|
+
return Qt(n, w, J, P, x, ue.current, E);
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
var De = R.ReactCurrentOwner, pt = R.ReactDebugCurrentFrame;
|
|
@@ -596,8 +596,8 @@ Check the top-level render call using <` + m + ">.");
|
|
|
596
596
|
if (!E) {
|
|
597
597
|
var w = "";
|
|
598
598
|
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
599
|
-
var
|
|
600
|
-
|
|
599
|
+
var J = tn(P);
|
|
600
|
+
J ? w += J : w += ft();
|
|
601
601
|
var $;
|
|
602
602
|
n === null ? $ = "null" : Oe(n) ? $ = "array" : n !== void 0 && n.$$typeof === r ? ($ = "<" + (I(n.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof n, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, w);
|
|
603
603
|
}
|
|
@@ -646,7 +646,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
646
646
|
}
|
|
647
647
|
process.env.NODE_ENV === "production" ? Be.exports = kn() : Be.exports = vn();
|
|
648
648
|
var t = Be.exports;
|
|
649
|
-
const Ae = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', _n = "https://punkt-cdn.oslo.kommune.no/11.
|
|
649
|
+
const Ae = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', _n = "https://punkt-cdn.oslo.kommune.no/11.13/icons/";
|
|
650
650
|
function bn(e) {
|
|
651
651
|
return new Promise((r) => setTimeout(r, e));
|
|
652
652
|
}
|
|
@@ -661,7 +661,7 @@ const Ue = {}, xn = async (e, r) => {
|
|
|
661
661
|
fetchIcon: async (e, r) => xn(e, r || _n)
|
|
662
662
|
}, Nn = fn(gn), N = ({ name: e, path: r, className: a = "", ...i }) => {
|
|
663
663
|
const [s, l] = le(null), c = dn(Nn);
|
|
664
|
-
return
|
|
664
|
+
return ze(() => {
|
|
665
665
|
e ? c.fetchIcon(e, r).then(l) : l(null);
|
|
666
666
|
}, [e, r]), s ? /* @__PURE__ */ t.jsx(
|
|
667
667
|
"span",
|
|
@@ -1106,11 +1106,11 @@ function Kn() {
|
|
|
1106
1106
|
}
|
|
1107
1107
|
return ge;
|
|
1108
1108
|
}
|
|
1109
|
-
const
|
|
1109
|
+
const Jn = /* @__PURE__ */ new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
|
|
1110
1110
|
function We(e) {
|
|
1111
|
-
return e != null && !
|
|
1111
|
+
return e != null && !Jn.has(e) ? (process.env.NODE_ENV !== "production" && me(!1, '"' + e + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + je + '"')), null) : e;
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1113
|
+
function zn(e, r) {
|
|
1114
1114
|
let a, i, s, l, c;
|
|
1115
1115
|
if (Wn(e)) {
|
|
1116
1116
|
let o = e.getAttribute("action");
|
|
@@ -1228,12 +1228,12 @@ const tr = /* @__PURE__ */ g.forwardRef(function(r, a) {
|
|
|
1228
1228
|
isTransitioning: R
|
|
1229
1229
|
}, M = U ? i : void 0, Y;
|
|
1230
1230
|
typeof l == "function" ? Y = l(B) : Y = [l, U ? "active" : null, W ? "pending" : null, R ? "transitioning" : null].filter(Boolean).join(" ");
|
|
1231
|
-
let
|
|
1231
|
+
let z = typeof o == "function" ? o(B) : o;
|
|
1232
1232
|
return /* @__PURE__ */ g.createElement(ye, se({}, h, {
|
|
1233
1233
|
"aria-current": M,
|
|
1234
1234
|
className: Y,
|
|
1235
1235
|
ref: a,
|
|
1236
|
-
style:
|
|
1236
|
+
style: z,
|
|
1237
1237
|
to: p,
|
|
1238
1238
|
unstable_viewTransition: u
|
|
1239
1239
|
}), typeof d == "function" ? d(B) : d);
|
|
@@ -1338,7 +1338,7 @@ function or() {
|
|
|
1338
1338
|
encType: o,
|
|
1339
1339
|
formData: p,
|
|
1340
1340
|
body: u
|
|
1341
|
-
} =
|
|
1341
|
+
} = zn(i, r);
|
|
1342
1342
|
if (s.navigate === !1) {
|
|
1343
1343
|
let d = s.fetcherKey || ir();
|
|
1344
1344
|
e.fetch(d, a, s.action || l, {
|
|
@@ -1510,7 +1510,7 @@ const br = V(
|
|
|
1510
1510
|
{
|
|
1511
1511
|
className: "pkt-btn__icon pkt-btn__spinner",
|
|
1512
1512
|
name: "spinner-blue",
|
|
1513
|
-
path: "https://punkt-cdn.oslo.kommune.no/11.
|
|
1513
|
+
path: "https://punkt-cdn.oslo.kommune.no/11.13/animations/"
|
|
1514
1514
|
}
|
|
1515
1515
|
),
|
|
1516
1516
|
o !== "label-only" && /* @__PURE__ */ t.jsx(N, { className: "pkt-btn__icon", name: a }),
|
|
@@ -1785,7 +1785,7 @@ const te = /* @__PURE__ */ hn(fr), Nr = V(
|
|
|
1785
1785
|
X.useEffect(() => (document.addEventListener("mouseup", K), window.addEventListener("scroll", I), () => {
|
|
1786
1786
|
document.removeEventListener("mouseup", K), window.removeEventListener("scroll", I);
|
|
1787
1787
|
}));
|
|
1788
|
-
const
|
|
1788
|
+
const z = () => {
|
|
1789
1789
|
M(!B);
|
|
1790
1790
|
}, K = (b) => {
|
|
1791
1791
|
Y.current && !Y.current.contains(b.target) && M(!1);
|
|
@@ -1818,7 +1818,7 @@ const te = /* @__PURE__ */ hn(fr), Nr = V(
|
|
|
1818
1818
|
name: "oslologo",
|
|
1819
1819
|
className: "pkt-header__logo-svg",
|
|
1820
1820
|
"aria-hidden": "true",
|
|
1821
|
-
path: "https://punkt-cdn.oslo.kommune.no/11.
|
|
1821
|
+
path: "https://punkt-cdn.oslo.kommune.no/11.13/logos/"
|
|
1822
1822
|
}
|
|
1823
1823
|
) }) : /* @__PURE__ */ t.jsx(
|
|
1824
1824
|
"button",
|
|
@@ -1832,7 +1832,7 @@ const te = /* @__PURE__ */ hn(fr), Nr = V(
|
|
|
1832
1832
|
name: "oslologo",
|
|
1833
1833
|
className: "pkt-header__logo-svg",
|
|
1834
1834
|
"aria-hidden": "true",
|
|
1835
|
-
path: "https://punkt-cdn.oslo.kommune.no/11.
|
|
1835
|
+
path: "https://punkt-cdn.oslo.kommune.no/11.13/logos/"
|
|
1836
1836
|
}
|
|
1837
1837
|
)
|
|
1838
1838
|
}
|
|
@@ -1866,7 +1866,7 @@ const te = /* @__PURE__ */ hn(fr), Nr = V(
|
|
|
1866
1866
|
role: "button",
|
|
1867
1867
|
"aria-controls": "pktUserDropdown",
|
|
1868
1868
|
"aria-expanded": B,
|
|
1869
|
-
onClick:
|
|
1869
|
+
onClick: z,
|
|
1870
1870
|
children: [
|
|
1871
1871
|
/* @__PURE__ */ t.jsx(N, { name: "user", className: "pkt-btn__icon" }),
|
|
1872
1872
|
/* @__PURE__ */ t.jsx("span", { className: "pkt-header__user-fullname", children: (o == null ? void 0 : o.name) || (l == null ? void 0 : l.name) }),
|
|
@@ -1973,13 +1973,13 @@ const Re = V(
|
|
|
1973
1973
|
}, _) => {
|
|
1974
1974
|
const [v, y] = le(!1), A = () => {
|
|
1975
1975
|
y(!v);
|
|
1976
|
-
}, U = () => l ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light" : o ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige" : "", W = l ? c : o ? p : "", B = h ? "pkt-inputwrapper--disabled" : "", M = k ? "pkt-inputwrapper--inline" : "", Y = u ? "pkt-inputwrapper--error" : "",
|
|
1976
|
+
}, U = () => l ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light" : o ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige" : "", W = l ? c : o ? p : "", B = h ? "pkt-inputwrapper--disabled" : "", M = k ? "pkt-inputwrapper--inline" : "", Y = u ? "pkt-inputwrapper--error" : "", z = !!i && i !== "", K = s || 'Les mer <span class="pkt-sr-only">om inputfeltet</span>', I = R ? "fieldset" : z ? "div" : "label", b = R ? "legend" : z ? "h2" : "span", L = C || (a ? `${e}-helptext` : void 0);
|
|
1977
1977
|
return /* @__PURE__ */ t.jsxs("div", { className: ["pkt-inputwrapper", O, B, M, Y].join(" "), ref: _, children: [
|
|
1978
1978
|
j ? /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs(
|
|
1979
1979
|
I,
|
|
1980
1980
|
{
|
|
1981
1981
|
htmlFor: R ? void 0 : e,
|
|
1982
|
-
"aria-describedby":
|
|
1982
|
+
"aria-describedby": z ? void 0 : C,
|
|
1983
1983
|
className: `pkt-inputwrapper__label${R ? " pkt-inputwrapper__fieldset" : ""}`,
|
|
1984
1984
|
children: [
|
|
1985
1985
|
/* @__PURE__ */ t.jsxs(b, { id: `${e}-label`, className: `${R ? " pkt-inputwrapper__legend" : ""}`, children: [
|
|
@@ -1994,7 +1994,7 @@ const Re = V(
|
|
|
1994
1994
|
dangerouslySetInnerHTML: { __html: a }
|
|
1995
1995
|
}
|
|
1996
1996
|
),
|
|
1997
|
-
|
|
1997
|
+
z && i !== "" && /* @__PURE__ */ t.jsxs("div", { children: [
|
|
1998
1998
|
/* @__PURE__ */ t.jsx(
|
|
1999
1999
|
de,
|
|
2000
2000
|
{
|
|
@@ -2092,7 +2092,7 @@ const jr = V(
|
|
|
2092
2092
|
{
|
|
2093
2093
|
name: C(l),
|
|
2094
2094
|
"aria-label": "loading",
|
|
2095
|
-
path: "https://punkt-cdn.oslo.kommune.no/11.
|
|
2095
|
+
path: "https://punkt-cdn.oslo.kommune.no/11.13/animations/",
|
|
2096
2096
|
className: `pkt-loader__svg pkt-loader__${l}`
|
|
2097
2097
|
}
|
|
2098
2098
|
),
|
|
@@ -2315,7 +2315,6 @@ const wr = V(
|
|
|
2315
2315
|
"pkt-table--responsive": i,
|
|
2316
2316
|
"pkt-table--compact": r,
|
|
2317
2317
|
"pkt-table--basic": a === "basic",
|
|
2318
|
-
"pkt-table--zebra-grey": a === "zebra-grey",
|
|
2319
2318
|
"pkt-table--zebra-blue": a === "zebra-blue"
|
|
2320
2319
|
}),
|
|
2321
2320
|
role: "table",
|
|
@@ -2330,7 +2329,7 @@ const wr = V(
|
|
|
2330
2329
|
"data-testid": "pkt-table__data-cell",
|
|
2331
2330
|
children: e
|
|
2332
2331
|
}
|
|
2333
|
-
), Pr = ({ className: e, children: r }) => /* @__PURE__ */ t.jsx("th", { className: te(e, "pkt-table__header-cell", {}), role: "columnheader", children: r }), Sr = ({ className: e, children: r }) => /* @__PURE__ */ t.jsx("thead", { className: te(e, "pkt-table__header", {}), role: "rowgroup", children: r }), Tr = ({ className: e, children: r }) => /* @__PURE__ */ t.jsx("tr", { className: te(e, "pkt-table__row", {}), role: "row", children: r }), Or = ({ children: e, className: r }) => /* @__PURE__ */ t.jsx("tbody", { className: te(r, "pkt-table__body", {}), role: "rowgroup", children: e }),
|
|
2332
|
+
), Pr = ({ className: e, children: r }) => /* @__PURE__ */ t.jsx("th", { className: te(e, "pkt-table__header-cell", {}), role: "columnheader", children: r }), Sr = ({ className: e, children: r }) => /* @__PURE__ */ t.jsx("thead", { className: te(e, "pkt-table__header", {}), role: "rowgroup", children: r }), Tr = ({ className: e, children: r }) => /* @__PURE__ */ t.jsx("tr", { className: te(e, "pkt-table__row", {}), role: "row", children: r }), Or = ({ children: e, className: r }) => /* @__PURE__ */ t.jsx("tbody", { className: te(r, "pkt-table__body", {}), role: "rowgroup", children: e }), Je = V(({
|
|
2334
2333
|
children: e,
|
|
2335
2334
|
className: r,
|
|
2336
2335
|
skin: a = "blue",
|
|
@@ -2394,11 +2393,11 @@ const wr = V(
|
|
|
2394
2393
|
e
|
|
2395
2394
|
] }) : /* @__PURE__ */ t.jsx("span", { className: j, children: e });
|
|
2396
2395
|
});
|
|
2397
|
-
|
|
2396
|
+
Je.displayName = "PktTag";
|
|
2398
2397
|
const $r = V(
|
|
2399
2398
|
({ arrowNav: e = !0, tabs: r, onTabSelected: a }, i) => {
|
|
2400
2399
|
const s = yt([]);
|
|
2401
|
-
|
|
2400
|
+
ze(() => {
|
|
2402
2401
|
s.current = s.current.slice(0, r.length);
|
|
2403
2402
|
}, [r]);
|
|
2404
2403
|
const l = (o, p) => {
|
|
@@ -2424,7 +2423,7 @@ const $r = V(
|
|
|
2424
2423
|
children: [
|
|
2425
2424
|
o.icon && /* @__PURE__ */ t.jsx(N, { name: o.icon, className: "pkt-icon--small" }),
|
|
2426
2425
|
o.text,
|
|
2427
|
-
o.tag && /* @__PURE__ */ t.jsx(
|
|
2426
|
+
o.tag && /* @__PURE__ */ t.jsx(Je, { skin: o.tag.skin, size: "small", children: o.tag.text })
|
|
2428
2427
|
]
|
|
2429
2428
|
}
|
|
2430
2429
|
) : /* @__PURE__ */ t.jsxs(
|
|
@@ -2444,7 +2443,7 @@ const $r = V(
|
|
|
2444
2443
|
children: [
|
|
2445
2444
|
o.icon && /* @__PURE__ */ t.jsx(N, { name: o.icon, className: "pkt-icon--small" }),
|
|
2446
2445
|
o.text,
|
|
2447
|
-
o.tag && /* @__PURE__ */ t.jsx(
|
|
2446
|
+
o.tag && /* @__PURE__ */ t.jsx(Je, { skin: o.tag.skin, size: "small", children: o.tag.text })
|
|
2448
2447
|
]
|
|
2449
2448
|
},
|
|
2450
2449
|
"b-" + p
|
|
@@ -2478,12 +2477,12 @@ const $r = V(
|
|
|
2478
2477
|
onChange: W,
|
|
2479
2478
|
...B
|
|
2480
2479
|
}, M) => {
|
|
2481
|
-
const Y = [l, "pkt-textinput", "pkt-textarea"].join(" "),
|
|
2480
|
+
const Y = [l, "pkt-textinput", "pkt-textarea"].join(" "), z = a || `${e}-label`, K = yt(null), [I, b] = le(0), L = (Z) => {
|
|
2482
2481
|
var Q, oe;
|
|
2483
2482
|
if (i && b(((oe = (Q = Z.currentTarget) == null ? void 0 : Q.value) == null ? void 0 : oe.length) || 0), W)
|
|
2484
2483
|
return W(Z);
|
|
2485
2484
|
};
|
|
2486
|
-
return
|
|
2485
|
+
return ze(() => {
|
|
2487
2486
|
var Z, Q;
|
|
2488
2487
|
typeof M == "function" && M(K.current), i && b(((Q = (Z = K == null ? void 0 : K.current) == null ? void 0 : Z.value) == null ? void 0 : Q.length) || 0);
|
|
2489
2488
|
}, [M]), /* @__PURE__ */ t.jsxs(
|
|
@@ -2516,7 +2515,7 @@ const $r = V(
|
|
|
2516
2515
|
placeholder: y,
|
|
2517
2516
|
disabled: c,
|
|
2518
2517
|
rows: A,
|
|
2519
|
-
"aria-labelledby":
|
|
2518
|
+
"aria-labelledby": z,
|
|
2520
2519
|
"aria-invalid": p,
|
|
2521
2520
|
"aria-errormessage": `${e}-error`,
|
|
2522
2521
|
...B,
|
|
@@ -2560,7 +2559,7 @@ const $r = V(
|
|
|
2560
2559
|
useWrapper: B = !0,
|
|
2561
2560
|
omitSearchIcon: M = !1,
|
|
2562
2561
|
value: Y,
|
|
2563
|
-
...
|
|
2562
|
+
...z
|
|
2564
2563
|
}, K) => {
|
|
2565
2564
|
const I = [s, "pkt-textinput"].join(" "), b = a || `${e}-label`, L = W === "search" && !h && !M;
|
|
2566
2565
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -2599,7 +2598,7 @@ const $r = V(
|
|
|
2599
2598
|
"aria-invalid": o,
|
|
2600
2599
|
"aria-errormessage": `${e}-error`,
|
|
2601
2600
|
"aria-labelledby": b,
|
|
2602
|
-
...
|
|
2601
|
+
...z
|
|
2603
2602
|
}
|
|
2604
2603
|
),
|
|
2605
2604
|
U && /* @__PURE__ */ t.jsxs("p", { className: "pkt-input-suffix", children: [
|
|
@@ -2640,7 +2639,7 @@ export {
|
|
|
2640
2639
|
Pr as PktTableHeaderCell,
|
|
2641
2640
|
Tr as PktTableRow,
|
|
2642
2641
|
$r as PktTabs,
|
|
2643
|
-
|
|
2642
|
+
Je as PktTag,
|
|
2644
2643
|
Dr as PktTextarea,
|
|
2645
2644
|
Ir as PktTextinput
|
|
2646
2645
|
};
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -14,22 +14,22 @@
|
|
|
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 Ze;function Yt(){return Ze||(Ze=1,process.env.NODE_ENV!=="production"&&function(){var e=g,r=Symbol.for("react.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),o=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),y=Symbol.iterator,O="@@iterator";function D(n){if(n===null||typeof n!="object")return null;var p=y&&n[y]||n[O];return typeof p=="function"?p:null}var R=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(n){{for(var p=arguments.length,m=new Array(p>1?p-1:0),x=1;x<p;x++)m[x-1]=arguments[x];v("error",n,m)}}function v(n,p,m){{var x=R.ReactDebugCurrentFrame,T=x.getStackAddendum();T!==""&&(p+="%s",m=m.concat([T]));var $=m.map(function(P){return String(P)});$.unshift("Warning: "+p),Function.prototype.apply.call(console[n],console,$)}}var w=!1,V=!1,B=!1,W=!1,M=!1,Y;Y=Symbol.for("react.module.reference");function K(n){return!!(typeof n=="string"||typeof n=="function"||n===s||n===i||M||n===l||n===u||n===d||W||n===S||w||V||B||typeof n=="object"&&n!==null&&(n.$$typeof===k||n.$$typeof===h||n.$$typeof===c||n.$$typeof===o||n.$$typeof===f||n.$$typeof===Y||n.getModuleId!==void 0))}function q(n,p,m){var x=n.displayName;if(x)return x;var T=p.displayName||p.name||"";return T!==""?m+"("+T+")":m}function
|
|
17
|
+
*/var Ze;function Yt(){return Ze||(Ze=1,process.env.NODE_ENV!=="production"&&function(){var e=g,r=Symbol.for("react.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),o=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),y=Symbol.iterator,O="@@iterator";function D(n){if(n===null||typeof n!="object")return null;var p=y&&n[y]||n[O];return typeof p=="function"?p:null}var R=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(n){{for(var p=arguments.length,m=new Array(p>1?p-1:0),x=1;x<p;x++)m[x-1]=arguments[x];v("error",n,m)}}function v(n,p,m){{var x=R.ReactDebugCurrentFrame,T=x.getStackAddendum();T!==""&&(p+="%s",m=m.concat([T]));var $=m.map(function(P){return String(P)});$.unshift("Warning: "+p),Function.prototype.apply.call(console[n],console,$)}}var w=!1,V=!1,B=!1,W=!1,M=!1,Y;Y=Symbol.for("react.module.reference");function K(n){return!!(typeof n=="string"||typeof n=="function"||n===s||n===i||M||n===l||n===u||n===d||W||n===S||w||V||B||typeof n=="object"&&n!==null&&(n.$$typeof===k||n.$$typeof===h||n.$$typeof===c||n.$$typeof===o||n.$$typeof===f||n.$$typeof===Y||n.getModuleId!==void 0))}function q(n,p,m){var x=n.displayName;if(x)return x;var T=p.displayName||p.name||"";return T!==""?m+"("+T+")":m}function J(n){return n.displayName||"Context"}function L(n){if(n==null)return null;if(typeof n.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case s:return"Fragment";case a:return"Portal";case i:return"Profiler";case l:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case o:var p=n;return J(p)+".Consumer";case c:var m=n;return J(m._context)+".Provider";case f:return q(n,n.render,"ForwardRef");case h:var x=n.displayName||null;return x!==null?x:L(n.type)||"Memo";case k:{var T=n,$=T._payload,P=T._init;try{return L(P($))}catch{return null}}}return null}var b=Object.assign,U=0,Z,Q,me,Nt,jt,yt,wt;function Et(){}Et.__reactDisabledLog=!0;function nr(){{if(U===0){Z=console.log,Q=console.info,me=console.warn,Nt=console.error,jt=console.group,yt=console.groupCollapsed,wt=console.groupEnd;var n={configurable:!0,enumerable:!0,value:Et,writable:!0};Object.defineProperties(console,{info:n,log:n,warn:n,error:n,group:n,groupCollapsed:n,groupEnd:n})}U++}}function rr(){{if(U--,U===0){var n={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:b({},n,{value:Z}),info:b({},n,{value:Q}),warn:b({},n,{value:me}),error:b({},n,{value:Nt}),group:b({},n,{value:jt}),groupCollapsed:b({},n,{value:yt}),groupEnd:b({},n,{value:wt})})}U<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var We=R.ReactCurrentDispatcher,Me;function we(n,p,m){{if(Me===void 0)try{throw Error()}catch(T){var x=T.stack.trim().match(/\n( *(at )?)/);Me=x&&x[1]||""}return`
|
|
18
18
|
`+Me+n}}var Ye=!1,Ee;{var ar=typeof WeakMap=="function"?WeakMap:Map;Ee=new ar}function Ct(n,p){if(!n||Ye)return"";{var m=Ee.get(n);if(m!==void 0)return m}var x;Ye=!0;var T=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var $;$=We.current,We.current=null,nr();try{if(p){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(G){x=G}Reflect.construct(n,[],P)}else{try{P.call()}catch(G){x=G}n.call(P.prototype)}}else{try{throw Error()}catch(G){x=G}n()}}catch(G){if(G&&x&&typeof G.stack=="string"){for(var E=G.stack.split(`
|
|
19
|
-
`),
|
|
20
|
-
`),F=E.length-1,A=
|
|
21
|
-
`+E[F].replace(" at new "," at ");return n.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",n.displayName)),typeof n=="function"&&Ee.set(n,H),H}while(F>=1&&A>=0);break}}}finally{Ye=!1,We.current=$,rr(),Error.prepareStackTrace=T}var ie=n?n.displayName||n.name:"",te=ie?we(ie):"";return typeof n=="function"&&Ee.set(n,te),te}function sr(n,p,m){return Ct(n,!1)}function lr(n){var p=n.prototype;return!!(p&&p.isReactComponent)}function Ce(n,p,m){if(n==null)return"";if(typeof n=="function")return Ct(n,lr(n));if(typeof n=="string")return we(n);switch(n){case u:return we("Suspense");case d:return we("SuspenseList")}if(typeof n=="object")switch(n.$$typeof){case f:return sr(n.render);case h:return Ce(n.type,p,m);case k:{var x=n,T=x._payload,$=x._init;try{return Ce($(T),p,m)}catch{}}}return""}var he=Object.prototype.hasOwnProperty,Pt={},St=R.ReactDebugCurrentFrame;function Pe(n){if(n){var p=n._owner,m=Ce(n.type,n._source,p?p.type:null);St.setExtraStackFrame(m)}else St.setExtraStackFrame(null)}function ir(n,p,m,x,T){{var $=Function.call.bind(he);for(var P in n)if($(n,P)){var E=void 0;try{if(typeof n[P]!="function"){var
|
|
19
|
+
`),z=x.stack.split(`
|
|
20
|
+
`),F=E.length-1,A=z.length-1;F>=1&&A>=0&&E[F]!==z[A];)A--;for(;F>=1&&A>=0;F--,A--)if(E[F]!==z[A]){if(F!==1||A!==1)do if(F--,A--,A<0||E[F]!==z[A]){var H=`
|
|
21
|
+
`+E[F].replace(" at new "," at ");return n.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",n.displayName)),typeof n=="function"&&Ee.set(n,H),H}while(F>=1&&A>=0);break}}}finally{Ye=!1,We.current=$,rr(),Error.prepareStackTrace=T}var ie=n?n.displayName||n.name:"",te=ie?we(ie):"";return typeof n=="function"&&Ee.set(n,te),te}function sr(n,p,m){return Ct(n,!1)}function lr(n){var p=n.prototype;return!!(p&&p.isReactComponent)}function Ce(n,p,m){if(n==null)return"";if(typeof n=="function")return Ct(n,lr(n));if(typeof n=="string")return we(n);switch(n){case u:return we("Suspense");case d:return we("SuspenseList")}if(typeof n=="object")switch(n.$$typeof){case f:return sr(n.render);case h:return Ce(n.type,p,m);case k:{var x=n,T=x._payload,$=x._init;try{return Ce($(T),p,m)}catch{}}}return""}var he=Object.prototype.hasOwnProperty,Pt={},St=R.ReactDebugCurrentFrame;function Pe(n){if(n){var p=n._owner,m=Ce(n.type,n._source,p?p.type:null);St.setExtraStackFrame(m)}else St.setExtraStackFrame(null)}function ir(n,p,m,x,T){{var $=Function.call.bind(he);for(var P in n)if($(n,P)){var E=void 0;try{if(typeof n[P]!="function"){var z=Error((x||"React class")+": "+m+" type `"+P+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof n[P]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw z.name="Invariant Violation",z}E=n[P](p,P,x,m,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(F){E=F}E&&!(E instanceof Error)&&(Pe(T),_("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",x||"React class",m,P,typeof E),Pe(null)),E instanceof Error&&!(E.message in Pt)&&(Pt[E.message]=!0,Pe(T),_("Failed %s type: %s",m,E.message),Pe(null))}}}var or=Array.isArray;function Ke(n){return or(n)}function cr(n){{var p=typeof Symbol=="function"&&Symbol.toStringTag,m=p&&n[Symbol.toStringTag]||n.constructor.name||"Object";return m}}function ur(n){try{return Rt(n),!1}catch{return!0}}function Rt(n){return""+n}function Tt(n){if(ur(n))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",cr(n)),Rt(n)}var ke=R.ReactCurrentOwner,fr={key:!0,ref:!0,__self:!0,__source:!0},Ot,$t,Je;Je={};function pr(n){if(he.call(n,"ref")){var p=Object.getOwnPropertyDescriptor(n,"ref").get;if(p&&p.isReactWarning)return!1}return n.ref!==void 0}function dr(n){if(he.call(n,"key")){var p=Object.getOwnPropertyDescriptor(n,"key").get;if(p&&p.isReactWarning)return!1}return n.key!==void 0}function mr(n,p){if(typeof n.ref=="string"&&ke.current&&p&&ke.current.stateNode!==p){var m=L(ke.current.type);Je[m]||(_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',L(ke.current.type),n.ref),Je[m]=!0)}}function hr(n,p){{var m=function(){Ot||(Ot=!0,_("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};m.isReactWarning=!0,Object.defineProperty(n,"key",{get:m,configurable:!0})}}function kr(n,p){{var m=function(){$t||($t=!0,_("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};m.isReactWarning=!0,Object.defineProperty(n,"ref",{get:m,configurable:!0})}}var vr=function(n,p,m,x,T,$,P){var E={$$typeof:r,type:n,key:p,ref:m,props:P,_owner:$};return E._store={},Object.defineProperty(E._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(E,"_self",{configurable:!1,enumerable:!1,writable:!1,value:x}),Object.defineProperty(E,"_source",{configurable:!1,enumerable:!1,writable:!1,value:T}),Object.freeze&&(Object.freeze(E.props),Object.freeze(E)),E};function _r(n,p,m,x,T){{var $,P={},E=null,z=null;m!==void 0&&(Tt(m),E=""+m),dr(p)&&(Tt(p.key),E=""+p.key),pr(p)&&(z=p.ref,mr(p,T));for($ in p)he.call(p,$)&&!fr.hasOwnProperty($)&&(P[$]=p[$]);if(n&&n.defaultProps){var F=n.defaultProps;for($ in F)P[$]===void 0&&(P[$]=F[$])}if(E||z){var A=typeof n=="function"?n.displayName||n.name||"Unknown":n;E&&hr(P,A),z&&kr(P,A)}return vr(n,E,z,T,x,ke.current,P)}}var ze=R.ReactCurrentOwner,Dt=R.ReactDebugCurrentFrame;function le(n){if(n){var p=n._owner,m=Ce(n.type,n._source,p?p.type:null);Dt.setExtraStackFrame(m)}else Dt.setExtraStackFrame(null)}var qe;qe=!1;function Ge(n){return typeof n=="object"&&n!==null&&n.$$typeof===r}function It(){{if(ze.current){var n=L(ze.current.type);if(n)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+n+"`."}return""}}function br(n){{if(n!==void 0){var p=n.fileName.replace(/^.*[\\\/]/,""),m=n.lineNumber;return`
|
|
24
24
|
|
|
25
25
|
Check your code at `+p+":"+m+"."}return""}}var Ft={};function gr(n){{var p=It();if(!p){var m=typeof n=="string"?n:n.displayName||n.name;m&&(p=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+m+">.")}return p}}function Lt(n,p){{if(!n._store||n._store.validated||n.key!=null)return;n._store.validated=!0;var m=gr(p);if(Ft[m])return;Ft[m]=!0;var x="";n&&n._owner&&n._owner!==
|
|
27
|
+
Check the top-level render call using <`+m+">.")}return p}}function Lt(n,p){{if(!n._store||n._store.validated||n.key!=null)return;n._store.validated=!0;var m=gr(p);if(Ft[m])return;Ft[m]=!0;var x="";n&&n._owner&&n._owner!==ze.current&&(x=" It was passed a child from "+L(n._owner.type)+"."),le(n),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',m,x),le(null)}}function At(n,p){{if(typeof n!="object")return;if(Ke(n))for(var m=0;m<n.length;m++){var x=n[m];Ge(x)&&Lt(x,p)}else if(Ge(n))n._store&&(n._store.validated=!0);else if(n){var T=D(n);if(typeof T=="function"&&T!==n.entries)for(var $=T.call(n),P;!(P=$.next()).done;)Ge(P.value)&&Lt(P.value,p)}}}function xr(n){{var p=n.type;if(p==null||typeof p=="string")return;var m;if(typeof p=="function")m=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===f||p.$$typeof===h))m=p.propTypes;else return;if(m){var x=L(p);ir(m,n.props,"prop",x,n)}else if(p.PropTypes!==void 0&&!qe){qe=!0;var T=L(p);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Nr(n){{for(var p=Object.keys(n.props),m=0;m<p.length;m++){var x=p[m];if(x!=="children"&&x!=="key"){le(n),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",x),le(null);break}}n.ref!==null&&(le(n),_("Invalid attribute `ref` supplied to `React.Fragment`."),le(null))}}var Ut={};function Vt(n,p,m,x,T,$){{var P=K(n);if(!P){var E="";(n===void 0||typeof n=="object"&&n!==null&&Object.keys(n).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 z=br(T);z?E+=z:E+=It();var F;n===null?F="null":Ke(n)?F="array":n!==void 0&&n.$$typeof===r?(F="<"+(L(n.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):F=typeof n,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",F,E)}var A=_r(n,p,m,T,$);if(A==null)return A;if(P){var H=p.children;if(H!==void 0)if(x)if(Ke(H)){for(var ie=0;ie<H.length;ie++)At(H[ie],n);Object.freeze&&Object.freeze(H)}else _("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 At(H,n)}if(he.call(p,"key")){var te=L(n),G=Object.keys(p).filter(function(Pr){return Pr!=="key"}),He=G.length>0?"{key: someKey, "+G.join(": ..., ")+": ...}":"{key: someKey}";if(!Ut[te+He]){var Cr=G.length>0?"{"+G.join(": ..., ")+": ...}":"{}";_(`A props object containing a "key" prop is being spread into JSX:
|
|
28
28
|
let props = %s;
|
|
29
29
|
<%s {...props} />
|
|
30
30
|
React keys must be passed directly to JSX without using spread:
|
|
31
31
|
let props = %s;
|
|
32
|
-
<%s key={someKey} {...props} />`,He,te,Cr,te),Ut[te+He]=!0}}return n===s?Nr(A):xr(A),A}}function jr(n,p,m){return Vt(n,p,m,!0)}function yr(n,p,m){return Vt(n,p,m,!1)}var wr=yr,Er=jr;ce.Fragment=s,ce.jsx=wr,ce.jsxs=Er}()),ce}process.env.NODE_ENV==="production"?Se.exports=Mt():Se.exports=Yt();var t=Se.exports;const Re='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',Kt="https://punkt-cdn.oslo.kommune.no/11.
|
|
32
|
+
<%s key={someKey} {...props} />`,He,te,Cr,te),Ut[te+He]=!0}}return n===s?Nr(A):xr(A),A}}function jr(n,p,m){return Vt(n,p,m,!0)}function yr(n,p,m){return Vt(n,p,m,!1)}var wr=yr,Er=jr;ce.Fragment=s,ce.jsx=wr,ce.jsxs=Er}()),ce}process.env.NODE_ENV==="production"?Se.exports=Mt():Se.exports=Yt();var t=Se.exports;const Re='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',Kt="https://punkt-cdn.oslo.kommune.no/11.13/icons/";function Jt(e){return new Promise(r=>setTimeout(r,e))}const Te={},zt=async(e,r)=>{let a=0;for(;Te[r+e+".svg"]==="fetching"&&(a++,!(a>50));)await Jt(50);return localStorage.getItem(r+e+".svg")?Promise.resolve(localStorage.getItem(r+e+".svg")):typeof window.fetch=="function"?(Te[r+e+".svg"]="fetching",Promise.resolve(fetch(r+e+".svg").then(s=>s.ok?s.text():(console.error("Missing icon: "+r+e+".svg"),Re)).then(s=>(s!==Re&&localStorage.setItem(r+e+".svg",s),Te[r+e+".svg"]="fetched",s)))):Promise.resolve(Re)},qt={fetchIcon:async(e,r)=>zt(e,r||Kt)},Qe=g.createContext(qt),j=({name:e,path:r,className:a="",...s})=>{const[l,i]=g.useState(null),c=g.useContext(Qe);return g.useEffect(()=>{e?c.fetchIcon(e,r).then(i):i(null)},[e,r]),l?t.jsx("span",{className:`pkt-icon ${a}`,dangerouslySetInnerHTML:{__html:l},...s}):null},et=g.forwardRef(({children:e,className:r,skin:a="info",closeAlert:s=!1,onClose:l,title:i,date:c,ariaLive:o="polite",compact:f=!1,...u},d)=>{const h=[r,"pkt-alert",a&&`pkt-alert--${a}`,f&&"pkt-alert--compact"].filter(Boolean).join(" "),[k,S]=g.useState(!0),y=()=>{S(!1),l&&l()};return k?t.jsxs("div",{...u,className:h,"aria-live":o,ref:d,children:[t.jsx(j,{className:"pkt-alert__icon",name:a==="info"?"alert-information":`alert-${a}`}),s&&t.jsx("div",{className:"pkt-alert__close",children:t.jsx("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:y,children:t.jsx(j,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),i&&t.jsx("div",{className:"pkt-alert__title",children:i}),t.jsx("div",{className:"pkt-alert__text",children:e}),c&&t.jsxs("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",c]})]}):null}),Gt=g.forwardRef(({href:e,text:r,onClick:a,className:s,...l},i)=>{const c=[s,"pkt-back-link"].filter(Boolean).join(" "),o=f=>{a&&a(f)};return t.jsx("nav",{ref:i,className:c,"aria-label":"Gå tilbake et steg",children:t.jsxs("a",{href:e||"/",className:"pkt-link pkt-link--icon-left",onClick:o,...l,children:[t.jsx(j,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),t.jsx("span",{className:"pkt-back-link__text",children:r||"Forsiden"})]})})});/**
|
|
33
33
|
* @remix-run/router v1.16.0
|
|
34
34
|
*
|
|
35
35
|
* Copyright (c) Remix Software Inc.
|
|
@@ -56,8 +56,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
56
56
|
* LICENSE.md file in the root directory of this source tree.
|
|
57
57
|
*
|
|
58
58
|
* @license MIT
|
|
59
|
-
*/function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},ae.apply(this,arguments)}function Ve(e,r){if(e==null)return{};var a={},s=Object.keys(e),l,i;for(i=0;i<s.length;i++)l=s[i],!(r.indexOf(l)>=0)&&(a[l]=e[l]);return a}const _e="get",be="application/x-www-form-urlencoded";function ge(e){return e!=null&&typeof e.tagName=="string"}function dn(e){return ge(e)&&e.tagName.toLowerCase()==="button"}function mn(e){return ge(e)&&e.tagName.toLowerCase()==="form"}function hn(e){return ge(e)&&e.tagName.toLowerCase()==="input"}function kn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function vn(e,r){return e.button===0&&(!r||r==="_self")&&!kn(e)}let xe=null;function _n(){if(xe===null)try{new FormData(document.createElement("form"),0),xe=!1}catch{xe=!0}return xe}const bn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Be(e){return e!=null&&!bn.has(e)?(process.env.NODE_ENV!=="production"&&ue(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+be+'"')),null):e}function gn(e,r){let a,s,l,i,c;if(mn(e)){let o=e.getAttribute("action");s=o?ne(o,r):null,a=e.getAttribute("method")||_e,l=Be(e.getAttribute("enctype"))||be,i=new FormData(e)}else if(dn(e)||hn(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||o.getAttribute("action");if(s=f?ne(f,r):null,a=e.getAttribute("formmethod")||o.getAttribute("method")||_e,l=Be(e.getAttribute("formenctype"))||Be(o.getAttribute("enctype"))||be,i=new FormData(o,e),!_n()){let{name:u,type:d,value:h}=e;if(d==="image"){let k=u?u+".":"";i.append(k+"x","0"),i.append(k+"y","0")}else u&&i.append(u,h)}}else{if(ge(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=_e,s=null,l=be,c=e}return i&&l==="text/plain"&&(c=i,i=void 0),{action:s,method:a.toLowerCase(),encType:l,formData:i,body:c}}const xn=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Nn=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],jn=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],yn="6";try{window.__reactRouterVersion=yn}catch{}const mt=N.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(mt.displayName="ViewTransition");const wn=N.createContext(new Map);process.env.NODE_ENV!=="production"&&(wn.displayName="Fetchers"),process.env.NODE_ENV;const En=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Cn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ne=N.forwardRef(function(r,a){let{onClick:s,relative:l,reloadDocument:i,replace:c,state:o,target:f,to:u,preventScrollReset:d,unstable_viewTransition:h}=r,k=Ve(r,xn),{basename:S}=N.useContext(X),y,O=!1;if(typeof u=="string"&&Cn.test(u)&&(y=u,En))try{let v=new URL(window.location.href),w=u.startsWith("//")?new URL(v.protocol+u):new URL(u),V=ne(w.pathname,S);w.origin===v.origin&&V!=null?u=V+w.search+w.hash:O=!0}catch{process.env.NODE_ENV!=="production"&&ue(!1,'<Link to="'+u+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let D=sn(u,{relative:l}),R=Tn(u,{replace:c,state:o,target:f,preventScrollReset:d,relative:l,unstable_viewTransition:h});function _(v){s&&s(v),v.defaultPrevented||R(v)}return N.createElement("a",ae({},k,{href:y||D,onClick:O||i?s:_,ref:a,target:f}))});process.env.NODE_ENV!=="production"&&(Ne.displayName="Link");const Pn=N.forwardRef(function(r,a){let{"aria-current":s="page",caseSensitive:l=!1,className:i="",end:c=!1,style:o,to:f,unstable_viewTransition:u,children:d}=r,h=Ve(r,Nn),k=pe(f,{relative:h.relative}),S=fe(),y=N.useContext(ot),{navigator:O,basename:D}=N.useContext(X),R=y!=null&&Ln(k)&&u===!0,_=O.encodeLocation?O.encodeLocation(k).pathname:k.pathname,v=S.pathname,w=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;l||(v=v.toLowerCase(),w=w?w.toLowerCase():null,_=_.toLowerCase()),w&&D&&(w=ne(w,D)||w);const V=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let B=v===_||!c&&v.startsWith(_)&&v.charAt(V)==="/",W=w!=null&&(w===_||!c&&w.startsWith(_)&&w.charAt(_.length)==="/"),M={isActive:B,isPending:W,isTransitioning:R},Y=B?s:void 0,K;typeof i=="function"?K=i(M):K=[i,B?"active":null,W?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let q=typeof o=="function"?o(M):o;return N.createElement(Ne,ae({},h,{"aria-current":Y,className:K,ref:a,style:q,to:f,unstable_viewTransition:u}),typeof d=="function"?d(M):d)});process.env.NODE_ENV!=="production"&&(Pn.displayName="NavLink");const Sn=N.forwardRef((e,r)=>{let{fetcherKey:a,navigate:s,reloadDocument:l,replace:i,state:c,method:o=_e,action:f,onSubmit:u,relative:d,preventScrollReset:h,unstable_viewTransition:k}=e,S=Ve(e,jn),y=In(),O=Fn(f,{relative:d}),D=o.toLowerCase()==="get"?"get":"post",R=_=>{if(u&&u(_),_.defaultPrevented)return;_.preventDefault();let v=_.nativeEvent.submitter,w=(v==null?void 0:v.getAttribute("formmethod"))||o;y(v||_.currentTarget,{fetcherKey:a,method:w,navigate:s,replace:i,state:c,relative:d,preventScrollReset:h,unstable_viewTransition:k})};return N.createElement("form",ae({ref:r,method:D,action:O,onSubmit:l?u:R},S))});process.env.NODE_ENV!=="production"&&(Sn.displayName="Form"),process.env.NODE_ENV;var je;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(je||(je={}));var ht;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ht||(ht={}));function Rn(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function kt(e){let r=N.useContext(ve);return r||(process.env.NODE_ENV!=="production"?I(!1,Rn(e)):I(!1)),r}function Tn(e,r){let{target:a,replace:s,state:l,preventScrollReset:i,relative:c,unstable_viewTransition:o}=r===void 0?{}:r,f=ln(),u=fe(),d=pe(e,{relative:c});return N.useCallback(h=>{if(vn(h,a)){h.preventDefault();let k=s!==void 0?s:$e(u)===$e(d);f(e,{replace:k,state:l,preventScrollReset:i,relative:c,unstable_viewTransition:o})}},[u,f,d,s,l,a,e,i,c,o])}function On(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let $n=0,Dn=()=>"__"+String(++$n)+"__";function In(){let{router:e}=kt(je.UseSubmit),{basename:r}=N.useContext(X),a=fn();return N.useCallback(function(s,l){l===void 0&&(l={}),On();let{action:i,method:c,encType:o,formData:f,body:u}=gn(s,r);if(l.navigate===!1){let d=l.fetcherKey||Dn();e.fetch(d,a,l.action||i,{preventScrollReset:l.preventScrollReset,formData:f,body:u,formMethod:l.method||c,formEncType:l.encType||o,unstable_flushSync:l.unstable_flushSync})}else e.navigate(l.action||i,{preventScrollReset:l.preventScrollReset,formData:f,body:u,formMethod:l.method||c,formEncType:l.encType||o,replace:l.replace,state:l.state,fromRouteId:a,unstable_flushSync:l.unstable_flushSync,unstable_viewTransition:l.unstable_viewTransition})},[e,r,a])}function Fn(e,r){let{relative:a}=r===void 0?{}:r,{basename:s}=N.useContext(X),l=N.useContext(re);l||(process.env.NODE_ENV!=="production"?I(!1,"useFormAction must be used inside a RouteContext"):I(!1));let[i]=l.matches.slice(-1),c=ae({},pe(e||".",{relative:a})),o=fe();if(e==null){c.search=o.search;let f=new URLSearchParams(c.search);f.has("index")&&f.get("index")===""&&(f.delete("index"),c.search=f.toString()?"?"+f.toString():"")}return(!e||e===".")&&i.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(c.pathname=c.pathname==="/"?s:Ie([s,c.pathname])),$e(c)}function Ln(e,r){r===void 0&&(r={});let a=N.useContext(mt);a==null&&(process.env.NODE_ENV!=="production"?I(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):I(!1));let{basename:s}=kt(je.useViewTransitionState),l=pe(e,{relative:r.relative});if(!a.isTransitioning)return!1;let i=ne(a.currentLocation.pathname,s)||a.currentLocation.pathname,c=ne(a.nextLocation.pathname,s)||a.nextLocation.pathname;return at(l.pathname,c)!=null||at(l.pathname,i)!=null}const An=g.forwardRef(({breadcrumbs:e,navigationType:r,className:a,...s},l)=>{const i=e.slice(0,4),c=i[i.length-2],o=[a,"pkt-breadcrumbs"].filter(Boolean).join(" ");return t.jsxs("nav",{ref:l,"aria-label":"brødsmulemeny",className:o,children:[t.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:i.map((f,u)=>t.jsx("li",{className:"pkt-breadcrumbs__item",children:u===i.length-1?t.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:t.jsx("span",{className:"pkt-breadcrumbs__text",children:f.text})}):r==="router"?t.jsxs(Ne,{to:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...s,children:[t.jsx(j,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),t.jsx("span",{className:"pkt-breadcrumbs__text",children:f.text})]}):t.jsxs("a",{href:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...s,children:[t.jsx(j,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),t.jsx("span",{className:"pkt-breadcrumbs__text",children:f.text})]})},`breadcrumb-${u}`))}),r==="router"?t.jsxs(Ne,{to:c.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...s,children:[t.jsx(j,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),t.jsx("span",{className:"pkt-breadcrumbs__text",children:c.text})]}):t.jsxs("a",{href:c.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...s,children:[t.jsx(j,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),t.jsx("span",{className:"pkt-breadcrumbs__text",children:c.text})]})]})}),se=g.forwardRef(({children:e,className:r,iconName:a="user",secondIconName:s="user",size:l="medium",skin:i="primary",type:c="button",variant:o="label-only",color:f,isLoading:u=!1,...d},h)=>{const k=[r,"pkt-btn",l&&`pkt-btn--${l}`,i&&`pkt-btn--${i}`,o&&`pkt-btn--${o}`,f&&`pkt-btn--${f}`,u&&"pkt-btn--active"].filter(Boolean).join(" ");return t.jsxs("button",{...d,className:k,type:c,ref:h,children:[u&&t.jsx(j,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:"https://punkt-cdn.oslo.kommune.no/11.12/animations/"}),o!=="label-only"&&t.jsx(j,{className:"pkt-btn__icon",name:a}),t.jsx("span",{className:"pkt-btn__text",children:e}),o==="icons-right-and-left"&&t.jsx(j,{className:"pkt-btn__icon",name:s})]})});se.displayName="PktButton";const vt=g.forwardRef(({id:e,hasTile:r=!1,disabled:a=!1,label:s,labelPosition:l="right",hideLabel:i=!1,checkHelptext:c,hasError:o=!1,isSwitch:f=!1,className:u,...d},h)=>{const k=[u,"pkt-input-check"].filter(Boolean).join(" ");return t.jsx("div",{className:k,children:t.jsxs("div",{className:`pkt-input-check__input ${r?"pkt-input-check__input--tile":""} ${a&&r?"pkt-input-check__input--tile-disabled":""}`,children:[s&&l==="left"&&t.jsxs("label",{className:`pkt-input-check__input-label ${i?"pkt-sr-only":""}`,htmlFor:e,children:[s,c&&t.jsx("div",{className:"pkt-input-check__input-helptext",children:c})]}),t.jsx("input",{ref:h,className:`pkt-input-check__input-checkbox ${o?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",role:f?"switch":"checkbox",id:e,disabled:a,...d}),s&&l==="right"&&t.jsxs("label",{className:`pkt-input-check__input-label ${i?"pkt-sr-only":""}`,htmlFor:e,children:[s,c&&t.jsx("div",{className:"pkt-input-check__input-helptext",children:c})]})]})})});vt.displayName="PktCheckbox";const Un=({columnOne:e,columnTwo:r,socialLinks:a,className:s,personvernOgInfoLink:l="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:i="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var o,f;const c=[s,"pkt-footer"].filter(Boolean).join(" ");return t.jsx("footer",{className:c,"data-mode":"dark",children:t.jsxs("div",{className:"pkt-footer__container",children:[t.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[t.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[t.jsx("h2",{className:"pkt-footer__title",children:e.title}),t.jsxs("ul",{className:"pkt-footer__list",children:[e.text&&t.jsx("li",{className:"pkt-footer__text",children:e.text}),(o=e.links)==null?void 0:o.map((u,d)=>t.jsx("li",{className:"pkt-footer__list-item",children:t.jsxs("a",{className:`pkt-footer__link ${u.external?"pkt-link--external":""}`,href:u.href,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:[t.jsx(j,{className:"pkt-footer__link-icon",name:"chevron-right"}),u.text]})},`links-${d}`))]})]}),t.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[t.jsx("h2",{className:"pkt-footer__title",children:r.title}),t.jsxs("ul",{className:"pkt-footer__list",children:[r.text&&t.jsx("li",{className:"pkt-footer__text",children:r.text}),(f=r.links)==null?void 0:f.map((u,d)=>t.jsx("li",{className:"pkt-footer__list-item",children:t.jsxs("a",{className:`pkt-footer__link ${u.external?"pkt-link--external":""}`,href:u.href,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:[t.jsx(j,{className:"pkt-footer__link-icon",name:"chevron-right"}),u.text]})},`links-${d}`))]})]}),t.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[t.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),t.jsxs("ul",{className:"pkt-footer__list",children:[t.jsx("li",{className:"pkt-footer__list-item",children:t.jsxs("a",{className:"pkt-footer__link",href:l,children:[t.jsx(j,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),t.jsx("li",{className:"pkt-footer__list-item",children:t.jsxs("a",{className:"pkt-footer__link",href:i,children:[t.jsx(j,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),a&&t.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[t.jsx("div",{className:"pkt-footer__social-languages",children:a.filter(u=>u.language).map((u,d)=>t.jsx("div",{className:"pkt-footer__social-language",children:t.jsx("a",{href:u.href,"aria-label":`til ${u.language} versjon av nettsiden`,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:u.language})},`sociallinks-language-${d}`))}),t.jsx("div",{className:"pkt-footer__social-icons",children:a.filter(u=>u.iconName).map((u,d)=>t.jsx(g.Fragment,{children:t.jsx("a",{href:u.href,"aria-label":`til ${u.iconName}`,className:"pkt-footer__social-icon-link",target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:t.jsx(j,{className:"pkt-footer__social-icon",name:u.iconName})})},`sociallinks-${d}`))})]})]})})},Vn=({links:e=[],personvernOgInfoLink:r="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:a="https://www.oslo.kommune.no/tilgjengelighet/",className:s})=>{const l=[s,"pkt-footer-simple"].filter(Boolean).join(" ");return t.jsx("footer",{className:l,"data-mode":"dark",children:t.jsx("div",{className:"pkt-footer-simple__container",children:t.jsxs("ul",{className:"pkt-footer-simple__list",children:[e.map((i,c)=>t.jsx("li",{className:"pkt-footer-simple__list-item",children:t.jsxs("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.jsx(j,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),i.text]})},c)),t.jsx("li",{className:"pkt-footer-simple__list-item",children:t.jsxs("a",{className:"pkt-footer-simple__link",href:r,children:[t.jsx(j,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),t.jsx("li",{className:"pkt-footer-simple__list-item",children:t.jsxs("a",{className:"pkt-footer-simple__link",href:a,children:[t.jsx(j,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})};var _t={exports:{}};/*!
|
|
59
|
+
*/function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},ae.apply(this,arguments)}function Ve(e,r){if(e==null)return{};var a={},s=Object.keys(e),l,i;for(i=0;i<s.length;i++)l=s[i],!(r.indexOf(l)>=0)&&(a[l]=e[l]);return a}const _e="get",be="application/x-www-form-urlencoded";function ge(e){return e!=null&&typeof e.tagName=="string"}function dn(e){return ge(e)&&e.tagName.toLowerCase()==="button"}function mn(e){return ge(e)&&e.tagName.toLowerCase()==="form"}function hn(e){return ge(e)&&e.tagName.toLowerCase()==="input"}function kn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function vn(e,r){return e.button===0&&(!r||r==="_self")&&!kn(e)}let xe=null;function _n(){if(xe===null)try{new FormData(document.createElement("form"),0),xe=!1}catch{xe=!0}return xe}const bn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Be(e){return e!=null&&!bn.has(e)?(process.env.NODE_ENV!=="production"&&ue(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+be+'"')),null):e}function gn(e,r){let a,s,l,i,c;if(mn(e)){let o=e.getAttribute("action");s=o?ne(o,r):null,a=e.getAttribute("method")||_e,l=Be(e.getAttribute("enctype"))||be,i=new FormData(e)}else if(dn(e)||hn(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||o.getAttribute("action");if(s=f?ne(f,r):null,a=e.getAttribute("formmethod")||o.getAttribute("method")||_e,l=Be(e.getAttribute("formenctype"))||Be(o.getAttribute("enctype"))||be,i=new FormData(o,e),!_n()){let{name:u,type:d,value:h}=e;if(d==="image"){let k=u?u+".":"";i.append(k+"x","0"),i.append(k+"y","0")}else u&&i.append(u,h)}}else{if(ge(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=_e,s=null,l=be,c=e}return i&&l==="text/plain"&&(c=i,i=void 0),{action:s,method:a.toLowerCase(),encType:l,formData:i,body:c}}const xn=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Nn=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],jn=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],yn="6";try{window.__reactRouterVersion=yn}catch{}const mt=N.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(mt.displayName="ViewTransition");const wn=N.createContext(new Map);process.env.NODE_ENV!=="production"&&(wn.displayName="Fetchers"),process.env.NODE_ENV;const En=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Cn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ne=N.forwardRef(function(r,a){let{onClick:s,relative:l,reloadDocument:i,replace:c,state:o,target:f,to:u,preventScrollReset:d,unstable_viewTransition:h}=r,k=Ve(r,xn),{basename:S}=N.useContext(X),y,O=!1;if(typeof u=="string"&&Cn.test(u)&&(y=u,En))try{let v=new URL(window.location.href),w=u.startsWith("//")?new URL(v.protocol+u):new URL(u),V=ne(w.pathname,S);w.origin===v.origin&&V!=null?u=V+w.search+w.hash:O=!0}catch{process.env.NODE_ENV!=="production"&&ue(!1,'<Link to="'+u+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let D=sn(u,{relative:l}),R=Tn(u,{replace:c,state:o,target:f,preventScrollReset:d,relative:l,unstable_viewTransition:h});function _(v){s&&s(v),v.defaultPrevented||R(v)}return N.createElement("a",ae({},k,{href:y||D,onClick:O||i?s:_,ref:a,target:f}))});process.env.NODE_ENV!=="production"&&(Ne.displayName="Link");const Pn=N.forwardRef(function(r,a){let{"aria-current":s="page",caseSensitive:l=!1,className:i="",end:c=!1,style:o,to:f,unstable_viewTransition:u,children:d}=r,h=Ve(r,Nn),k=pe(f,{relative:h.relative}),S=fe(),y=N.useContext(ot),{navigator:O,basename:D}=N.useContext(X),R=y!=null&&Ln(k)&&u===!0,_=O.encodeLocation?O.encodeLocation(k).pathname:k.pathname,v=S.pathname,w=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;l||(v=v.toLowerCase(),w=w?w.toLowerCase():null,_=_.toLowerCase()),w&&D&&(w=ne(w,D)||w);const V=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let B=v===_||!c&&v.startsWith(_)&&v.charAt(V)==="/",W=w!=null&&(w===_||!c&&w.startsWith(_)&&w.charAt(_.length)==="/"),M={isActive:B,isPending:W,isTransitioning:R},Y=B?s:void 0,K;typeof i=="function"?K=i(M):K=[i,B?"active":null,W?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let q=typeof o=="function"?o(M):o;return N.createElement(Ne,ae({},h,{"aria-current":Y,className:K,ref:a,style:q,to:f,unstable_viewTransition:u}),typeof d=="function"?d(M):d)});process.env.NODE_ENV!=="production"&&(Pn.displayName="NavLink");const Sn=N.forwardRef((e,r)=>{let{fetcherKey:a,navigate:s,reloadDocument:l,replace:i,state:c,method:o=_e,action:f,onSubmit:u,relative:d,preventScrollReset:h,unstable_viewTransition:k}=e,S=Ve(e,jn),y=In(),O=Fn(f,{relative:d}),D=o.toLowerCase()==="get"?"get":"post",R=_=>{if(u&&u(_),_.defaultPrevented)return;_.preventDefault();let v=_.nativeEvent.submitter,w=(v==null?void 0:v.getAttribute("formmethod"))||o;y(v||_.currentTarget,{fetcherKey:a,method:w,navigate:s,replace:i,state:c,relative:d,preventScrollReset:h,unstable_viewTransition:k})};return N.createElement("form",ae({ref:r,method:D,action:O,onSubmit:l?u:R},S))});process.env.NODE_ENV!=="production"&&(Sn.displayName="Form"),process.env.NODE_ENV;var je;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(je||(je={}));var ht;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ht||(ht={}));function Rn(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function kt(e){let r=N.useContext(ve);return r||(process.env.NODE_ENV!=="production"?I(!1,Rn(e)):I(!1)),r}function Tn(e,r){let{target:a,replace:s,state:l,preventScrollReset:i,relative:c,unstable_viewTransition:o}=r===void 0?{}:r,f=ln(),u=fe(),d=pe(e,{relative:c});return N.useCallback(h=>{if(vn(h,a)){h.preventDefault();let k=s!==void 0?s:$e(u)===$e(d);f(e,{replace:k,state:l,preventScrollReset:i,relative:c,unstable_viewTransition:o})}},[u,f,d,s,l,a,e,i,c,o])}function On(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let $n=0,Dn=()=>"__"+String(++$n)+"__";function In(){let{router:e}=kt(je.UseSubmit),{basename:r}=N.useContext(X),a=fn();return N.useCallback(function(s,l){l===void 0&&(l={}),On();let{action:i,method:c,encType:o,formData:f,body:u}=gn(s,r);if(l.navigate===!1){let d=l.fetcherKey||Dn();e.fetch(d,a,l.action||i,{preventScrollReset:l.preventScrollReset,formData:f,body:u,formMethod:l.method||c,formEncType:l.encType||o,unstable_flushSync:l.unstable_flushSync})}else e.navigate(l.action||i,{preventScrollReset:l.preventScrollReset,formData:f,body:u,formMethod:l.method||c,formEncType:l.encType||o,replace:l.replace,state:l.state,fromRouteId:a,unstable_flushSync:l.unstable_flushSync,unstable_viewTransition:l.unstable_viewTransition})},[e,r,a])}function Fn(e,r){let{relative:a}=r===void 0?{}:r,{basename:s}=N.useContext(X),l=N.useContext(re);l||(process.env.NODE_ENV!=="production"?I(!1,"useFormAction must be used inside a RouteContext"):I(!1));let[i]=l.matches.slice(-1),c=ae({},pe(e||".",{relative:a})),o=fe();if(e==null){c.search=o.search;let f=new URLSearchParams(c.search);f.has("index")&&f.get("index")===""&&(f.delete("index"),c.search=f.toString()?"?"+f.toString():"")}return(!e||e===".")&&i.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(c.pathname=c.pathname==="/"?s:Ie([s,c.pathname])),$e(c)}function Ln(e,r){r===void 0&&(r={});let a=N.useContext(mt);a==null&&(process.env.NODE_ENV!=="production"?I(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):I(!1));let{basename:s}=kt(je.useViewTransitionState),l=pe(e,{relative:r.relative});if(!a.isTransitioning)return!1;let i=ne(a.currentLocation.pathname,s)||a.currentLocation.pathname,c=ne(a.nextLocation.pathname,s)||a.nextLocation.pathname;return at(l.pathname,c)!=null||at(l.pathname,i)!=null}const An=g.forwardRef(({breadcrumbs:e,navigationType:r,className:a,...s},l)=>{const i=e.slice(0,4),c=i[i.length-2],o=[a,"pkt-breadcrumbs"].filter(Boolean).join(" ");return t.jsxs("nav",{ref:l,"aria-label":"brødsmulemeny",className:o,children:[t.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:i.map((f,u)=>t.jsx("li",{className:"pkt-breadcrumbs__item",children:u===i.length-1?t.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:t.jsx("span",{className:"pkt-breadcrumbs__text",children:f.text})}):r==="router"?t.jsxs(Ne,{to:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...s,children:[t.jsx(j,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),t.jsx("span",{className:"pkt-breadcrumbs__text",children:f.text})]}):t.jsxs("a",{href:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...s,children:[t.jsx(j,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),t.jsx("span",{className:"pkt-breadcrumbs__text",children:f.text})]})},`breadcrumb-${u}`))}),r==="router"?t.jsxs(Ne,{to:c.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...s,children:[t.jsx(j,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),t.jsx("span",{className:"pkt-breadcrumbs__text",children:c.text})]}):t.jsxs("a",{href:c.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...s,children:[t.jsx(j,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),t.jsx("span",{className:"pkt-breadcrumbs__text",children:c.text})]})]})}),se=g.forwardRef(({children:e,className:r,iconName:a="user",secondIconName:s="user",size:l="medium",skin:i="primary",type:c="button",variant:o="label-only",color:f,isLoading:u=!1,...d},h)=>{const k=[r,"pkt-btn",l&&`pkt-btn--${l}`,i&&`pkt-btn--${i}`,o&&`pkt-btn--${o}`,f&&`pkt-btn--${f}`,u&&"pkt-btn--active"].filter(Boolean).join(" ");return t.jsxs("button",{...d,className:k,type:c,ref:h,children:[u&&t.jsx(j,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:"https://punkt-cdn.oslo.kommune.no/11.13/animations/"}),o!=="label-only"&&t.jsx(j,{className:"pkt-btn__icon",name:a}),t.jsx("span",{className:"pkt-btn__text",children:e}),o==="icons-right-and-left"&&t.jsx(j,{className:"pkt-btn__icon",name:s})]})});se.displayName="PktButton";const vt=g.forwardRef(({id:e,hasTile:r=!1,disabled:a=!1,label:s,labelPosition:l="right",hideLabel:i=!1,checkHelptext:c,hasError:o=!1,isSwitch:f=!1,className:u,...d},h)=>{const k=[u,"pkt-input-check"].filter(Boolean).join(" ");return t.jsx("div",{className:k,children:t.jsxs("div",{className:`pkt-input-check__input ${r?"pkt-input-check__input--tile":""} ${a&&r?"pkt-input-check__input--tile-disabled":""}`,children:[s&&l==="left"&&t.jsxs("label",{className:`pkt-input-check__input-label ${i?"pkt-sr-only":""}`,htmlFor:e,children:[s,c&&t.jsx("div",{className:"pkt-input-check__input-helptext",children:c})]}),t.jsx("input",{ref:h,className:`pkt-input-check__input-checkbox ${o?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",role:f?"switch":"checkbox",id:e,disabled:a,...d}),s&&l==="right"&&t.jsxs("label",{className:`pkt-input-check__input-label ${i?"pkt-sr-only":""}`,htmlFor:e,children:[s,c&&t.jsx("div",{className:"pkt-input-check__input-helptext",children:c})]})]})})});vt.displayName="PktCheckbox";const Un=({columnOne:e,columnTwo:r,socialLinks:a,className:s,personvernOgInfoLink:l="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:i="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var o,f;const c=[s,"pkt-footer"].filter(Boolean).join(" ");return t.jsx("footer",{className:c,"data-mode":"dark",children:t.jsxs("div",{className:"pkt-footer__container",children:[t.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[t.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[t.jsx("h2",{className:"pkt-footer__title",children:e.title}),t.jsxs("ul",{className:"pkt-footer__list",children:[e.text&&t.jsx("li",{className:"pkt-footer__text",children:e.text}),(o=e.links)==null?void 0:o.map((u,d)=>t.jsx("li",{className:"pkt-footer__list-item",children:t.jsxs("a",{className:`pkt-footer__link ${u.external?"pkt-link--external":""}`,href:u.href,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:[t.jsx(j,{className:"pkt-footer__link-icon",name:"chevron-right"}),u.text]})},`links-${d}`))]})]}),t.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[t.jsx("h2",{className:"pkt-footer__title",children:r.title}),t.jsxs("ul",{className:"pkt-footer__list",children:[r.text&&t.jsx("li",{className:"pkt-footer__text",children:r.text}),(f=r.links)==null?void 0:f.map((u,d)=>t.jsx("li",{className:"pkt-footer__list-item",children:t.jsxs("a",{className:`pkt-footer__link ${u.external?"pkt-link--external":""}`,href:u.href,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:[t.jsx(j,{className:"pkt-footer__link-icon",name:"chevron-right"}),u.text]})},`links-${d}`))]})]}),t.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[t.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),t.jsxs("ul",{className:"pkt-footer__list",children:[t.jsx("li",{className:"pkt-footer__list-item",children:t.jsxs("a",{className:"pkt-footer__link",href:l,children:[t.jsx(j,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),t.jsx("li",{className:"pkt-footer__list-item",children:t.jsxs("a",{className:"pkt-footer__link",href:i,children:[t.jsx(j,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),a&&t.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[t.jsx("div",{className:"pkt-footer__social-languages",children:a.filter(u=>u.language).map((u,d)=>t.jsx("div",{className:"pkt-footer__social-language",children:t.jsx("a",{href:u.href,"aria-label":`til ${u.language} versjon av nettsiden`,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:u.language})},`sociallinks-language-${d}`))}),t.jsx("div",{className:"pkt-footer__social-icons",children:a.filter(u=>u.iconName).map((u,d)=>t.jsx(g.Fragment,{children:t.jsx("a",{href:u.href,"aria-label":`til ${u.iconName}`,className:"pkt-footer__social-icon-link",target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:t.jsx(j,{className:"pkt-footer__social-icon",name:u.iconName})})},`sociallinks-${d}`))})]})]})})},Vn=({links:e=[],personvernOgInfoLink:r="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:a="https://www.oslo.kommune.no/tilgjengelighet/",className:s})=>{const l=[s,"pkt-footer-simple"].filter(Boolean).join(" ");return t.jsx("footer",{className:l,"data-mode":"dark",children:t.jsx("div",{className:"pkt-footer-simple__container",children:t.jsxs("ul",{className:"pkt-footer-simple__list",children:[e.map((i,c)=>t.jsx("li",{className:"pkt-footer-simple__list-item",children:t.jsxs("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.jsx(j,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),i.text]})},c)),t.jsx("li",{className:"pkt-footer-simple__list-item",children:t.jsxs("a",{className:"pkt-footer-simple__link",href:r,children:[t.jsx(j,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),t.jsx("li",{className:"pkt-footer-simple__list-item",children:t.jsxs("a",{className:"pkt-footer-simple__link",href:a,children:[t.jsx(j,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})};var _t={exports:{}};/*!
|
|
60
60
|
Copyright (c) 2018 Jed Watson.
|
|
61
61
|
Licensed under the MIT License (MIT), see
|
|
62
62
|
http://jedwatson.github.io/classnames
|
|
63
|
-
*/(function(e){(function(){var r={}.hasOwnProperty;function a(){for(var i="",c=0;c<arguments.length;c++){var o=arguments[c];o&&(i=l(i,s(o)))}return i}function s(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return a.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var c="";for(var o in i)r.call(i,o)&&i[o]&&(c=l(c,o));return c}function l(i,c){return c?i?i+" "+c:i+c:i}e.exports?(a.default=a,e.exports=a):window.classNames=a})()})(_t);var Bn=_t.exports;const ee=Wt(Bn),Wn=g.forwardRef(({className:e,logoLink:r="https://www.oslo.kommune.no/",serviceName:a,fixed:s=!0,scrollToHide:l=!0,user:i,userMenu:c,representing:o,userOptions:f,userMenuFooter:u,canChangeRepresentation:d=!0,showMenuButton:h=!1,showLogOutButton:k=!1,openMenu:S,logOut:y,changeRepresentation:O,children:D,...R},_)=>{const v=g.useMemo(()=>typeof(i==null?void 0:i.lastLoggedIn)=="string"?i.lastLoggedIn:i!=null&&i.lastLoggedIn?new Date(i.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[i]),[w,V]=g.useState(!1),[B,W]=g.useState(0),[M,Y]=g.useState(!1),K=g.useRef(null);g.useEffect(()=>(document.addEventListener("mouseup",z),window.addEventListener("scroll",L),()=>{document.removeEventListener("mouseup",z),window.removeEventListener("scroll",L)}));const q=()=>{Y(!M)},z=b=>{K.current&&!K.current.contains(b.target)&&Y(!1)},L=()=>{if(l){const b=window.pageYOffset||document.documentElement.scrollTop;if(b<0||Math.abs(b-B)<60)return;V(b>B),W(b)}};return t.jsxs("header",{...R,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:ee(e,"pkt-header",{"pkt-header--fixed":s,"pkt-header--scroll-to-hide":l,"pkt-header--hidden":w}),ref:_,children:[t.jsxs("div",{className:"pkt-header__logo",children:[typeof r=="string"?t.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:r,children:t.jsx(j,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/11.12/logos/"})}):t.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:r,children:t.jsx(j,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/11.12/logos/"})}),t.jsx("span",{className:"pkt-header__logo-service",children:a})]}),t.jsx("nav",{className:"pkt-header__actions",children:t.jsxs("ul",{className:"pkt-header__actions-row",children:[h&&t.jsx("li",{children:t.jsx(se,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:S,children:"Meny"})}),(i||o)&&t.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${M&&!w?"pkt-header--open-dropdown":""}`,ref:K,children:[t.jsxs("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":M,onClick:q,children:[t.jsx(j,{name:"user",className:"pkt-btn__icon"}),t.jsx("span",{className:"pkt-header__user-fullname",children:(o==null?void 0:o.name)||(i==null?void 0:i.name)}),t.jsx("span",{className:"pkt-header__user-shortname",children:(o==null?void 0:o.shortname)||(i==null?void 0:i.shortname)}),t.jsx(j,{name:"chevron-thin-down",className:"pkt-btn--closed"}),t.jsx(j,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),t.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[i&&t.jsxs("li",{children:[t.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),t.jsx("div",{className:"pkt-user-menu__name",children:i.name}),i.lastLoggedIn&&t.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",t.jsx("time",{children:v})]})]}),c&&t.jsx("li",{children:t.jsx("ul",{className:"pkt-list",children:c.map((b,U)=>t.jsx("li",{children:typeof b.target=="string"?t.jsxs("a",{href:b.target,className:"pkt-link",children:[b.iconName&&t.jsx(j,{name:b.iconName,className:"pkt-link__icon"}),b.title]}):t.jsxs("button",{className:"pkt-link-button pkt-link",onClick:b.target,children:[b.iconName&&t.jsx(j,{name:b.iconName,className:"pkt-link__icon"}),b.title]})},`userMenu-${U}`))})}),(o||d)&&t.jsxs("li",{children:[o&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),t.jsx("div",{className:"pkt-user-menu__name",children:o.name}),o.orgNumber&&t.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",o.orgNumber]})]}),t.jsx("ul",{className:"pkt-list mt-size-16",children:d&&t.jsx("li",{children:t.jsxs("button",{className:"pkt-link-button pkt-link",onClick:O,children:[t.jsx(j,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),t.jsx("li",{children:t.jsx("ul",{className:"pkt-list",children:(f||!k)&&t.jsxs(t.Fragment,{children:[f==null?void 0:f.map((b,U)=>t.jsx("li",{children:typeof b.target=="string"?t.jsxs("a",{href:b.target,className:"pkt-link",children:[b.iconName&&t.jsx(j,{name:b.iconName,className:"pkt-link__icon"}),b.title]}):t.jsxs("button",{className:"pkt-link-button pkt-link",onClick:b.target,children:[b.iconName&&t.jsx(j,{name:b.iconName,className:"pkt-link__icon"}),b.title]})},`userOptions-${U}`)),!k&&t.jsx("li",{children:t.jsxs("button",{className:"pkt-link-button pkt-link",onClick:y,children:[t.jsx(j,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),u&&t.jsx("li",{className:"footer",children:t.jsx("ul",{className:"pkt-list-horizontal bordered",children:u.map((b,U)=>t.jsx("li",{children:typeof b.target=="string"?t.jsx("a",{href:b.target,className:"pkt-link",children:b.title}):t.jsx("button",{className:"pkt-link-button pkt-link",onClick:b.target,children:b.title})},`userMenuFooter-${U}`))})})]})]}),D&&t.jsx("li",{children:D}),k&&t.jsx("li",{children:t.jsx(se,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:y,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),bt=g.forwardRef(({label:e,id:r,children:a,...s},l)=>t.jsxs("div",{className:"pkt-form-group",children:[t.jsx("label",{htmlFor:r,className:"pkt-form-label",children:e}),t.jsx("input",{className:"pkt-form-input",id:r,...s,ref:l}),a]}));bt.displayName="PktInput";const de=g.forwardRef(({forId:e,label:r,helptext:a,helptextDropdown:s,helptextDropdownButton:l,optionalTag:i=!1,optionalText:c="Valgfritt",requiredTag:o=!1,requiredText:f="Må fylles ut",hasError:u,errorMessage:d,disabled:h,inline:k,ariaDescribedby:S,useWrapper:y=!0,children:O,className:D,hasFieldset:R=!1},_)=>{const[v,w]=g.useState(!1),V=()=>{w(!v)},B=()=>i?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":o?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",W=i?c:o?f:"",M=h?"pkt-inputwrapper--disabled":"",Y=k?"pkt-inputwrapper--inline":"",K=u?"pkt-inputwrapper--error":"",q=!!s&&s!=="",z=l||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',L=R?"fieldset":q?"div":"label",b=R?"legend":q?"h2":"span",U=S||(a?`${e}-helptext`:void 0);return t.jsxs("div",{className:["pkt-inputwrapper",D,M,Y,K].join(" "),ref:_,children:[y?t.jsx(t.Fragment,{children:t.jsxs(L,{htmlFor:R?void 0:e,"aria-describedby":q?void 0:S,className:`pkt-inputwrapper__label${R?" pkt-inputwrapper__fieldset":""}`,children:[t.jsxs(b,{id:`${e}-label`,className:`${R?" pkt-inputwrapper__legend":""}`,children:[r,W!==""&&t.jsx("span",{className:B(),children:W})]}),a&&t.jsx("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,dangerouslySetInnerHTML:{__html:a}}),q&&s!==""&&t.jsxs("div",{children:[t.jsx(se,{skin:"tertiary",size:"small",variant:"icon-right",iconName:v?"chevron-thin-up":"chevron-thin-down",className:"pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",onClick:V,children:t.jsx("span",{dangerouslySetInnerHTML:{__html:z}})}),t.jsx("div",{className:`pkt-inputwrapper__helptext ${v?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:t.jsx("span",{dangerouslySetInnerHTML:{__html:s}})}),!R&&t.jsx("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":U,children:r})]}),t.jsx(t.Fragment,{children:O})]})}):t.jsxs(t.Fragment,{children:[!R&&t.jsx("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":U,id:`${e}-label`,children:r}),O]}),u&&d&&t.jsx("div",{children:t.jsx(et,{skin:"error","aria-live":"assertive",id:`${e}-error`,compact:!0,children:d})})]})});de.displayName="PktInputWrapper";const gt=g.forwardRef(({children:e,className:r,iconName:a="user",openInNewTab:s=!1,skin:l="normal",href:i="#",external:c=!1,title:o,...f},u)=>{const d=[r,"pkt-linkcard",l&&`pkt-linkcard--${l}`].filter(Boolean).join(" ");return t.jsxs("a",{...f,href:i,className:`pkt-linkcard pkt-link ${d}`,target:s?"_blank":"_self",rel:s?"noopener noreferrer":void 0,ref:u,children:[t.jsx(j,{className:"pkt-link__icon",name:a}),t.jsxs("div",{className:"pkt-linkcard__content",children:[t.jsx("div",{className:`pkt-linkcard__title ${c?"pkt-link pkt-link--external":""}`,children:o}),t.jsx("div",{className:"pkt-linkcard__text",children:e})]})]})});gt.displayName="PktLinkCard";const Mn=g.forwardRef(({className:e,message:r,size:a="medium",inline:s=!1,isLoading:l=!0,variant:i="rainbow",delay:c=0,children:o,...f},u)=>{const d=`pkt-loader pkt-loader--${a}`,[h,k]=g.useState(!(c>0));c>0&&setTimeout(()=>{k(!0)},c);const S=y=>y==="shapes"?"loader":y==="blue"?"spinner-blue":"spinner";return t.jsx("div",{role:"status","aria-live":"polite","aria-busy":l,className:`pkt-loader--${s?"inline":"box"} ${e||""}`,children:l?t.jsx(t.Fragment,{children:h?t.jsxs("div",{className:d,"data-testid":"pkt-loader",ref:u,...f,children:[t.jsx(j,{name:S(i),"aria-label":"loading",path:"https://punkt-cdn.oslo.kommune.no/11.12/animations/",className:`pkt-loader__svg pkt-loader__${i}`}),r&&t.jsx("p",{children:r})]}):null}):o})}),Yn=({children:e,className:r,compact:a=!1,skin:s="beige",title:l,...i})=>{const c=[r,"pkt-messagebox",s&&`pkt-messagebox--${s}`,a&&"pkt-messagebox--compact"].filter(Boolean).join(" ");return t.jsxs("div",{...i,className:c,children:[l&&t.jsx("div",{className:"pkt-messagebox__title",children:l}),t.jsx("div",{className:"pkt-messagebox__text",children:e})]})},xt=g.forwardRef(({id:e,name:r,label:a,className:s,hasTile:l=!1,disabled:i=!1,checkHelptext:c,hasError:o=!1,...f},u)=>{const d=[s,"pkt-input-check"].filter(Boolean).join(" ");return t.jsx("div",{className:d,children:t.jsxs("div",{className:`pkt-input-check__input ${l?"pkt-input-check__input--tile":""} ${i&&l?"pkt-input-check__input--tile-disabled":""}`,children:[t.jsx("input",{ref:u,className:`pkt-input-check__input-checkbox ${o?"pkt-input-check__input-checkbox--error":""}`,type:"radio",id:e,disabled:i,name:r,...f}),t.jsxs("label",{className:"pkt-input-check__input-label",htmlFor:e,children:[a,c&&t.jsx("div",{className:"pkt-input-check__input-helptext",children:c})]})]})})});xt.displayName="PktRadioButton";const Kn=g.forwardRef(({action:e,appearance:r="local",disabled:a=!1,fullwidth:s=!1,id:l,label:i,method:c="get",name:o,placeholder:f="Søk…",suggestions:u,value:d="",onSearch:h,onSuggestionClick:k,...S},y)=>{const O=(v,w)=>{v?v():k&&k(w)},D=`pkt-searchinput pkt-searchinput--${r} ${s?"pkt-searchinput--fullwidth":""}`,R=e?"form":"div",_=i?"label":"div";return t.jsxs(R,{className:D,onSubmit:h&&(()=>h(d)),action:e||void 0,method:e?c:void 0,role:"search",ref:y,...S,children:[t.jsxs(_,{htmlFor:i?l:void 0,className:i?"pkt-inputwrapper__label":"",children:[i&&t.jsx(t.Fragment,{children:i}),t.jsxs("div",{className:r==="local"?"pkt-input__container":"pkt-searchinput__field",children:[t.jsx("input",{className:`pkt-input ${s?"pkt-input--fullwidth":""}`,type:"search",name:o||l,id:l,placeholder:f,defaultValue:d,disabled:a,onInput:h&&(v=>h(v.currentTarget.value)),autoComplete:"off","aria-autocomplete":"list","aria-controls":`${l}-suggestions`}),t.jsx(se,{className:`pkt-searchinput__button ${r==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:r==="local"?"tertiary":"primary",color:r==="global"?"yellow":void 0,type:"submit",disabled:a,onClick:h&&(()=>h(d)),onKeyUp:h&&(v=>v.key==="Enter"&&h(d)),children:i||f})]})]}),u&&t.jsx("ul",{id:`${l}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:u.map((v,w)=>t.jsx("li",{children:g.createElement(v.href?"a":v.onClick?"button":"div",{href:v.href,className:`pkt-searchinput__suggestion ${v.onClick?"pkt-link-button":""} ${v.href||v.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:v.onClick?"button":void 0,onClick:()=>O(v.onClick,w),onKeyUp:()=>O(v.onClick,w)},t.jsxs(t.Fragment,{children:[v.title&&t.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:v.title}),v.text&&t.jsx("p",{className:"pkt-searchinput__suggestion-text",children:v.text})]}))},`search-suggestion-${w}`))})]})}),zn=g.forwardRef(({ariaDescribedby:e,ariaLabelledby:r,children:a,className:s,disabled:l=!1,errorMessage:i,hasError:c,helptext:o,helptextDropdown:f,helptextDropdownButton:u,id:d,inline:h=!1,fullwidth:k=!1,label:S,name:y,optionalTag:O=!1,optionalText:D,requiredTag:R=!1,requiredText:_,...v},w)=>{const V=[s,"pkt-select"].join(" ");return t.jsx(de,{className:V,forId:d,label:S,helptext:o,helptextDropdown:f,helptextDropdownButton:u,optionalTag:O,optionalText:D,requiredTag:R,requiredText:_,hasError:c,errorMessage:i,disabled:l,inline:h,ariaDescribedby:e,children:t.jsx("select",{ref:w,className:`pkt-input ${k?"pkt-input--fullwidth":""}`,"aria-invalid":c,"aria-errormessage":`${d}-error`,"aria-labelledby":r||`${d}-label`,disabled:l,id:d,name:y||d,...v,children:a})})}),Jn=({className:e,compact:r=!1,skin:a="basic",responsiveView:s=!0,children:l})=>t.jsx("table",{"data-testid":"pkt-table",className:ee(e,"pkt-table",{"pkt-table--responsive":s,"pkt-table--compact":r,"pkt-table--basic":a==="basic","pkt-table--zebra-grey":a==="zebra-grey","pkt-table--zebra-blue":a==="zebra-blue"}),role:"table",children:l}),qn=({children:e,className:r,dataLabel:a})=>t.jsx("td",{className:ee(r,"pkt-table__data-cell",{}),"data-label":a,role:"cell","data-testid":"pkt-table__data-cell",children:e}),Gn=({className:e,children:r})=>t.jsx("th",{className:ee(e,"pkt-table__header-cell",{}),role:"columnheader",children:r}),Hn=({className:e,children:r})=>t.jsx("thead",{className:ee(e,"pkt-table__header",{}),role:"rowgroup",children:r}),Xn=({className:e,children:r})=>t.jsx("tr",{className:ee(e,"pkt-table__row",{}),role:"row",children:r}),Zn=({children:e,className:r})=>t.jsx("tbody",{className:ee(r,"pkt-table__body",{}),role:"rowgroup",children:e}),ye=g.forwardRef(({children:e,className:r,skin:a="blue",textStyle:s="normal-text",size:l="medium",closeTag:i=!1,iconName:c="",type:o="button",ariaLabel:f="close",onClick:u=()=>{}},d)=>{const[h,k]=g.useState(!1),S=R=>{k(!0),u(R)},y=["pkt-tag",l&&`pkt-tag--${l}`,a&&`pkt-tag--${a}`,s&&`pkt-tag--${s}`,r].filter(Boolean).join(" "),O=["pkt-tag","pkt-btn","pkt-btn--tertiary",l&&`pkt-tag--${l}`,a&&`pkt-tag--${a}`,s&&`pkt-tag--${s}`,c&&i?"pkt-btn--icons-right-and-left":null,i&&!c?"pkt-btn--icon-right":null,r].filter(Boolean).join(" "),D=!h;return i&&c?t.jsx(t.Fragment,{children:D&&t.jsxs("button",{className:O,type:o,"aria-label":f,onClick:S,ref:d,children:[t.jsx(j,{className:"pkt-tag__icon",name:c}),e,t.jsx(j,{className:"pkt-tag__close-btn",name:"close"})]})}):i?t.jsx(t.Fragment,{children:D&&t.jsxs("button",{className:O,type:o,"aria-label":f,onClick:S,ref:d,children:[t.jsx(j,{className:"pkt-tag__close-btn",name:"close"}),e]})}):c?t.jsxs("span",{className:y,children:[t.jsx(j,{className:"pkt-tag__icon",name:c}),e]}):t.jsx("span",{className:y,children:e})});ye.displayName="PktTag";const Qn=g.forwardRef(({arrowNav:e=!0,tabs:r,onTabSelected:a},s)=>{const l=g.useRef([]);g.useEffect(()=>{l.current=l.current.slice(0,r.length)},[r]);const i=(o,f)=>{f.action&&f.action(o),a&&a(o)},c=(o,f)=>{var u,d;e&&(f.code==="ArrowLeft"&&o!==0&&((u=l.current[o-1])==null||u.focus()),f.code==="ArrowRight"&&o<r.length-1&&((d=l.current[o+1])==null||d.focus()),(f.code==="ArrowDown"||f.code==="Space")&&i(o,r[o]))};return t.jsx("div",{className:"pkt-tabs",ref:s,children:t.jsx("div",{className:"pkt-tabs__list",role:e?"tablist":"navigation",children:r.map((o,f)=>t.jsx(g.Fragment,{children:o.href?t.jsxs("a",{"aria-selected":!!o.active,role:e?"tab":void 0,href:o.href,"aria-controls":o.controls,className:`pkt-tabs__link ${o.active?"active":""}`,onKeyUp:u=>c(f,u),onClick:()=>i(f,o),tabIndex:o.active||!e?void 0:-1,ref:u=>{l.current[f]=u},children:[o.icon&&t.jsx(j,{name:o.icon,className:"pkt-icon--small"}),o.text,o.tag&&t.jsx(ye,{skin:o.tag.skin,size:"small",children:o.tag.text})]}):t.jsxs("button",{"aria-selected":!!o.active,role:e?"tab":void 0,type:"button","aria-controls":o.controls,className:`pkt-tabs__button pkt-link-button ${o.active?"active":""}`,onKeyUp:u=>c(f,u),onClick:()=>i(f,o),tabIndex:o.active||!e?void 0:-1,ref:u=>{l.current[f]=u},children:[o.icon&&t.jsx(j,{name:o.icon,className:"pkt-icon--small"}),o.text,o.tag&&t.jsx(ye,{skin:o.tag.skin,size:"small",children:o.tag.text})]},"b-"+f)},f))})})}),er=g.forwardRef(({id:e,ariaDescribedby:r,ariaLabelledby:a,counter:s,counterMaxLength:l,className:i,disabled:c,errorMessage:o,hasError:f,helptext:u,helptextDropdown:d,helptextDropdownButton:h,inline:k,fullwidth:S=!1,label:y,name:O,optionalTag:D=!1,optionalText:R,requiredTag:_=!1,requiredText:v,placeholder:w,rows:V,useWrapper:B=!0,onChange:W,...M},Y)=>{const K=[i,"pkt-textinput","pkt-textarea"].join(" "),q=a||`${e}-label`,z=g.useRef(null),[L,b]=g.useState(0),U=Z=>{var Q,me;if(s&&b(((me=(Q=Z.currentTarget)==null?void 0:Q.value)==null?void 0:me.length)||0),W)return W(Z)};return g.useEffect(()=>{var Z,Q;typeof Y=="function"&&Y(z.current),s&&b(((Q=(Z=z==null?void 0:z.current)==null?void 0:Z.value)==null?void 0:Q.length)||0)},[Y]),t.jsxs(de,{ariaDescribedby:r,className:K,disabled:c,errorMessage:o,forId:e,hasError:f,helptext:u,helptextDropdown:d,helptextDropdownButton:h,inline:k,label:y,optionalTag:D,optionalText:R,requiredTag:_,requiredText:v,useWrapper:B,children:[t.jsx("textarea",{ref:z,className:`pkt-input ${S?"pkt-input--fullwidth":""} ${l&&L>l?"pkt-input--counter-error":""}`,name:O||e,id:e,placeholder:w,disabled:c,rows:V,"aria-labelledby":q,"aria-invalid":f,"aria-errormessage":`${e}-error`,...M,onChange:U}),s&&t.jsxs("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":!0,children:[L||0,l&&`/${l}`]})]})}),tr=g.forwardRef(({id:e,ariaDescribedby:r,ariaLabelledby:a,autocomplete:s="off",className:l,disabled:i=!1,errorMessage:c,hasError:o=!1,helptext:f,helptextDropdown:u,helptextDropdownButton:d,iconNameRight:h,inline:k=!1,fullwidth:S=!1,label:y,name:O,optionalTag:D=!1,optionalText:R,requiredTag:_=!1,requiredText:v,placeholder:w,prefix:V,suffix:B,type:W="text",useWrapper:M=!0,omitSearchIcon:Y=!1,value:K,...q},z)=>{const L=[l,"pkt-textinput"].join(" "),b=a||`${e}-label`,U=W==="search"&&!h&&!Y;return t.jsx(de,{ariaDescribedby:r,className:L,disabled:i,errorMessage:c,forId:e,hasError:o,helptext:f,helptextDropdown:u,helptextDropdownButton:d,inline:k,label:y,optionalTag:D,optionalText:R,requiredTag:_,requiredText:v,useWrapper:M,children:t.jsxs("div",{className:"pkt-input__container",children:[V&&t.jsx("div",{className:"pkt-input-prefix",children:V}),t.jsx("input",{ref:z,className:`pkt-input ${S?"pkt-input--fullwidth":""}`,type:W,name:O||e,id:e,placeholder:w,autoComplete:s,value:K,disabled:i,"aria-invalid":o,"aria-errormessage":`${e}-error`,"aria-labelledby":b,...q}),B&&t.jsxs("p",{className:"pkt-input-suffix",children:[B,h&&t.jsx(j,{className:"pkt-input-suffix-icon",name:h}),U&&t.jsx(j,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!B&&h&&t.jsx(j,{className:"pkt-input-icon",name:h}),!B&&U&&t.jsx(j,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})});C.PktAlert=et,C.PktBackLink=Gt,C.PktBreadcrumbs=An,C.PktButton=se,C.PktCheckbox=vt,C.PktFooter=Un,C.PktFooterSimple=Vn,C.PktHeader=Wn,C.PktIcon=j,C.PktIconContext=Qe,C.PktInput=bt,C.PktInputWrapper=de,C.PktLinkCard=gt,C.PktLoader=Mn,C.PktMessagebox=Yn,C.PktRadioButton=xt,C.PktSearchInput=Kn,C.PktSelect=zn,C.PktTable=Jn,C.PktTableBody=Zn,C.PktTableDataCell=qn,C.PktTableHeader=Hn,C.PktTableHeaderCell=Gn,C.PktTableRow=Xn,C.PktTabs=Qn,C.PktTag=ye,C.PktTextarea=er,C.PktTextinput=tr,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
|
|
63
|
+
*/(function(e){(function(){var r={}.hasOwnProperty;function a(){for(var i="",c=0;c<arguments.length;c++){var o=arguments[c];o&&(i=l(i,s(o)))}return i}function s(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return a.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var c="";for(var o in i)r.call(i,o)&&i[o]&&(c=l(c,o));return c}function l(i,c){return c?i?i+" "+c:i+c:i}e.exports?(a.default=a,e.exports=a):window.classNames=a})()})(_t);var Bn=_t.exports;const ee=Wt(Bn),Wn=g.forwardRef(({className:e,logoLink:r="https://www.oslo.kommune.no/",serviceName:a,fixed:s=!0,scrollToHide:l=!0,user:i,userMenu:c,representing:o,userOptions:f,userMenuFooter:u,canChangeRepresentation:d=!0,showMenuButton:h=!1,showLogOutButton:k=!1,openMenu:S,logOut:y,changeRepresentation:O,children:D,...R},_)=>{const v=g.useMemo(()=>typeof(i==null?void 0:i.lastLoggedIn)=="string"?i.lastLoggedIn:i!=null&&i.lastLoggedIn?new Date(i.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[i]),[w,V]=g.useState(!1),[B,W]=g.useState(0),[M,Y]=g.useState(!1),K=g.useRef(null);g.useEffect(()=>(document.addEventListener("mouseup",J),window.addEventListener("scroll",L),()=>{document.removeEventListener("mouseup",J),window.removeEventListener("scroll",L)}));const q=()=>{Y(!M)},J=b=>{K.current&&!K.current.contains(b.target)&&Y(!1)},L=()=>{if(l){const b=window.pageYOffset||document.documentElement.scrollTop;if(b<0||Math.abs(b-B)<60)return;V(b>B),W(b)}};return t.jsxs("header",{...R,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:ee(e,"pkt-header",{"pkt-header--fixed":s,"pkt-header--scroll-to-hide":l,"pkt-header--hidden":w}),ref:_,children:[t.jsxs("div",{className:"pkt-header__logo",children:[typeof r=="string"?t.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:r,children:t.jsx(j,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/11.13/logos/"})}):t.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:r,children:t.jsx(j,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/11.13/logos/"})}),t.jsx("span",{className:"pkt-header__logo-service",children:a})]}),t.jsx("nav",{className:"pkt-header__actions",children:t.jsxs("ul",{className:"pkt-header__actions-row",children:[h&&t.jsx("li",{children:t.jsx(se,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:S,children:"Meny"})}),(i||o)&&t.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${M&&!w?"pkt-header--open-dropdown":""}`,ref:K,children:[t.jsxs("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":M,onClick:q,children:[t.jsx(j,{name:"user",className:"pkt-btn__icon"}),t.jsx("span",{className:"pkt-header__user-fullname",children:(o==null?void 0:o.name)||(i==null?void 0:i.name)}),t.jsx("span",{className:"pkt-header__user-shortname",children:(o==null?void 0:o.shortname)||(i==null?void 0:i.shortname)}),t.jsx(j,{name:"chevron-thin-down",className:"pkt-btn--closed"}),t.jsx(j,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),t.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[i&&t.jsxs("li",{children:[t.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),t.jsx("div",{className:"pkt-user-menu__name",children:i.name}),i.lastLoggedIn&&t.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",t.jsx("time",{children:v})]})]}),c&&t.jsx("li",{children:t.jsx("ul",{className:"pkt-list",children:c.map((b,U)=>t.jsx("li",{children:typeof b.target=="string"?t.jsxs("a",{href:b.target,className:"pkt-link",children:[b.iconName&&t.jsx(j,{name:b.iconName,className:"pkt-link__icon"}),b.title]}):t.jsxs("button",{className:"pkt-link-button pkt-link",onClick:b.target,children:[b.iconName&&t.jsx(j,{name:b.iconName,className:"pkt-link__icon"}),b.title]})},`userMenu-${U}`))})}),(o||d)&&t.jsxs("li",{children:[o&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),t.jsx("div",{className:"pkt-user-menu__name",children:o.name}),o.orgNumber&&t.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",o.orgNumber]})]}),t.jsx("ul",{className:"pkt-list mt-size-16",children:d&&t.jsx("li",{children:t.jsxs("button",{className:"pkt-link-button pkt-link",onClick:O,children:[t.jsx(j,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),t.jsx("li",{children:t.jsx("ul",{className:"pkt-list",children:(f||!k)&&t.jsxs(t.Fragment,{children:[f==null?void 0:f.map((b,U)=>t.jsx("li",{children:typeof b.target=="string"?t.jsxs("a",{href:b.target,className:"pkt-link",children:[b.iconName&&t.jsx(j,{name:b.iconName,className:"pkt-link__icon"}),b.title]}):t.jsxs("button",{className:"pkt-link-button pkt-link",onClick:b.target,children:[b.iconName&&t.jsx(j,{name:b.iconName,className:"pkt-link__icon"}),b.title]})},`userOptions-${U}`)),!k&&t.jsx("li",{children:t.jsxs("button",{className:"pkt-link-button pkt-link",onClick:y,children:[t.jsx(j,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),u&&t.jsx("li",{className:"footer",children:t.jsx("ul",{className:"pkt-list-horizontal bordered",children:u.map((b,U)=>t.jsx("li",{children:typeof b.target=="string"?t.jsx("a",{href:b.target,className:"pkt-link",children:b.title}):t.jsx("button",{className:"pkt-link-button pkt-link",onClick:b.target,children:b.title})},`userMenuFooter-${U}`))})})]})]}),D&&t.jsx("li",{children:D}),k&&t.jsx("li",{children:t.jsx(se,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:y,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),bt=g.forwardRef(({label:e,id:r,children:a,...s},l)=>t.jsxs("div",{className:"pkt-form-group",children:[t.jsx("label",{htmlFor:r,className:"pkt-form-label",children:e}),t.jsx("input",{className:"pkt-form-input",id:r,...s,ref:l}),a]}));bt.displayName="PktInput";const de=g.forwardRef(({forId:e,label:r,helptext:a,helptextDropdown:s,helptextDropdownButton:l,optionalTag:i=!1,optionalText:c="Valgfritt",requiredTag:o=!1,requiredText:f="Må fylles ut",hasError:u,errorMessage:d,disabled:h,inline:k,ariaDescribedby:S,useWrapper:y=!0,children:O,className:D,hasFieldset:R=!1},_)=>{const[v,w]=g.useState(!1),V=()=>{w(!v)},B=()=>i?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":o?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",W=i?c:o?f:"",M=h?"pkt-inputwrapper--disabled":"",Y=k?"pkt-inputwrapper--inline":"",K=u?"pkt-inputwrapper--error":"",q=!!s&&s!=="",J=l||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',L=R?"fieldset":q?"div":"label",b=R?"legend":q?"h2":"span",U=S||(a?`${e}-helptext`:void 0);return t.jsxs("div",{className:["pkt-inputwrapper",D,M,Y,K].join(" "),ref:_,children:[y?t.jsx(t.Fragment,{children:t.jsxs(L,{htmlFor:R?void 0:e,"aria-describedby":q?void 0:S,className:`pkt-inputwrapper__label${R?" pkt-inputwrapper__fieldset":""}`,children:[t.jsxs(b,{id:`${e}-label`,className:`${R?" pkt-inputwrapper__legend":""}`,children:[r,W!==""&&t.jsx("span",{className:B(),children:W})]}),a&&t.jsx("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,dangerouslySetInnerHTML:{__html:a}}),q&&s!==""&&t.jsxs("div",{children:[t.jsx(se,{skin:"tertiary",size:"small",variant:"icon-right",iconName:v?"chevron-thin-up":"chevron-thin-down",className:"pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",onClick:V,children:t.jsx("span",{dangerouslySetInnerHTML:{__html:J}})}),t.jsx("div",{className:`pkt-inputwrapper__helptext ${v?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:t.jsx("span",{dangerouslySetInnerHTML:{__html:s}})}),!R&&t.jsx("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":U,children:r})]}),t.jsx(t.Fragment,{children:O})]})}):t.jsxs(t.Fragment,{children:[!R&&t.jsx("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":U,id:`${e}-label`,children:r}),O]}),u&&d&&t.jsx("div",{children:t.jsx(et,{skin:"error","aria-live":"assertive",id:`${e}-error`,compact:!0,children:d})})]})});de.displayName="PktInputWrapper";const gt=g.forwardRef(({children:e,className:r,iconName:a="user",openInNewTab:s=!1,skin:l="normal",href:i="#",external:c=!1,title:o,...f},u)=>{const d=[r,"pkt-linkcard",l&&`pkt-linkcard--${l}`].filter(Boolean).join(" ");return t.jsxs("a",{...f,href:i,className:`pkt-linkcard pkt-link ${d}`,target:s?"_blank":"_self",rel:s?"noopener noreferrer":void 0,ref:u,children:[t.jsx(j,{className:"pkt-link__icon",name:a}),t.jsxs("div",{className:"pkt-linkcard__content",children:[t.jsx("div",{className:`pkt-linkcard__title ${c?"pkt-link pkt-link--external":""}`,children:o}),t.jsx("div",{className:"pkt-linkcard__text",children:e})]})]})});gt.displayName="PktLinkCard";const Mn=g.forwardRef(({className:e,message:r,size:a="medium",inline:s=!1,isLoading:l=!0,variant:i="rainbow",delay:c=0,children:o,...f},u)=>{const d=`pkt-loader pkt-loader--${a}`,[h,k]=g.useState(!(c>0));c>0&&setTimeout(()=>{k(!0)},c);const S=y=>y==="shapes"?"loader":y==="blue"?"spinner-blue":"spinner";return t.jsx("div",{role:"status","aria-live":"polite","aria-busy":l,className:`pkt-loader--${s?"inline":"box"} ${e||""}`,children:l?t.jsx(t.Fragment,{children:h?t.jsxs("div",{className:d,"data-testid":"pkt-loader",ref:u,...f,children:[t.jsx(j,{name:S(i),"aria-label":"loading",path:"https://punkt-cdn.oslo.kommune.no/11.13/animations/",className:`pkt-loader__svg pkt-loader__${i}`}),r&&t.jsx("p",{children:r})]}):null}):o})}),Yn=({children:e,className:r,compact:a=!1,skin:s="beige",title:l,...i})=>{const c=[r,"pkt-messagebox",s&&`pkt-messagebox--${s}`,a&&"pkt-messagebox--compact"].filter(Boolean).join(" ");return t.jsxs("div",{...i,className:c,children:[l&&t.jsx("div",{className:"pkt-messagebox__title",children:l}),t.jsx("div",{className:"pkt-messagebox__text",children:e})]})},xt=g.forwardRef(({id:e,name:r,label:a,className:s,hasTile:l=!1,disabled:i=!1,checkHelptext:c,hasError:o=!1,...f},u)=>{const d=[s,"pkt-input-check"].filter(Boolean).join(" ");return t.jsx("div",{className:d,children:t.jsxs("div",{className:`pkt-input-check__input ${l?"pkt-input-check__input--tile":""} ${i&&l?"pkt-input-check__input--tile-disabled":""}`,children:[t.jsx("input",{ref:u,className:`pkt-input-check__input-checkbox ${o?"pkt-input-check__input-checkbox--error":""}`,type:"radio",id:e,disabled:i,name:r,...f}),t.jsxs("label",{className:"pkt-input-check__input-label",htmlFor:e,children:[a,c&&t.jsx("div",{className:"pkt-input-check__input-helptext",children:c})]})]})})});xt.displayName="PktRadioButton";const Kn=g.forwardRef(({action:e,appearance:r="local",disabled:a=!1,fullwidth:s=!1,id:l,label:i,method:c="get",name:o,placeholder:f="Søk…",suggestions:u,value:d="",onSearch:h,onSuggestionClick:k,...S},y)=>{const O=(v,w)=>{v?v():k&&k(w)},D=`pkt-searchinput pkt-searchinput--${r} ${s?"pkt-searchinput--fullwidth":""}`,R=e?"form":"div",_=i?"label":"div";return t.jsxs(R,{className:D,onSubmit:h&&(()=>h(d)),action:e||void 0,method:e?c:void 0,role:"search",ref:y,...S,children:[t.jsxs(_,{htmlFor:i?l:void 0,className:i?"pkt-inputwrapper__label":"",children:[i&&t.jsx(t.Fragment,{children:i}),t.jsxs("div",{className:r==="local"?"pkt-input__container":"pkt-searchinput__field",children:[t.jsx("input",{className:`pkt-input ${s?"pkt-input--fullwidth":""}`,type:"search",name:o||l,id:l,placeholder:f,defaultValue:d,disabled:a,onInput:h&&(v=>h(v.currentTarget.value)),autoComplete:"off","aria-autocomplete":"list","aria-controls":`${l}-suggestions`}),t.jsx(se,{className:`pkt-searchinput__button ${r==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:r==="local"?"tertiary":"primary",color:r==="global"?"yellow":void 0,type:"submit",disabled:a,onClick:h&&(()=>h(d)),onKeyUp:h&&(v=>v.key==="Enter"&&h(d)),children:i||f})]})]}),u&&t.jsx("ul",{id:`${l}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:u.map((v,w)=>t.jsx("li",{children:g.createElement(v.href?"a":v.onClick?"button":"div",{href:v.href,className:`pkt-searchinput__suggestion ${v.onClick?"pkt-link-button":""} ${v.href||v.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:v.onClick?"button":void 0,onClick:()=>O(v.onClick,w),onKeyUp:()=>O(v.onClick,w)},t.jsxs(t.Fragment,{children:[v.title&&t.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:v.title}),v.text&&t.jsx("p",{className:"pkt-searchinput__suggestion-text",children:v.text})]}))},`search-suggestion-${w}`))})]})}),Jn=g.forwardRef(({ariaDescribedby:e,ariaLabelledby:r,children:a,className:s,disabled:l=!1,errorMessage:i,hasError:c,helptext:o,helptextDropdown:f,helptextDropdownButton:u,id:d,inline:h=!1,fullwidth:k=!1,label:S,name:y,optionalTag:O=!1,optionalText:D,requiredTag:R=!1,requiredText:_,...v},w)=>{const V=[s,"pkt-select"].join(" ");return t.jsx(de,{className:V,forId:d,label:S,helptext:o,helptextDropdown:f,helptextDropdownButton:u,optionalTag:O,optionalText:D,requiredTag:R,requiredText:_,hasError:c,errorMessage:i,disabled:l,inline:h,ariaDescribedby:e,children:t.jsx("select",{ref:w,className:`pkt-input ${k?"pkt-input--fullwidth":""}`,"aria-invalid":c,"aria-errormessage":`${d}-error`,"aria-labelledby":r||`${d}-label`,disabled:l,id:d,name:y||d,...v,children:a})})}),zn=({className:e,compact:r=!1,skin:a="basic",responsiveView:s=!0,children:l})=>t.jsx("table",{"data-testid":"pkt-table",className:ee(e,"pkt-table",{"pkt-table--responsive":s,"pkt-table--compact":r,"pkt-table--basic":a==="basic","pkt-table--zebra-blue":a==="zebra-blue"}),role:"table",children:l}),qn=({children:e,className:r,dataLabel:a})=>t.jsx("td",{className:ee(r,"pkt-table__data-cell",{}),"data-label":a,role:"cell","data-testid":"pkt-table__data-cell",children:e}),Gn=({className:e,children:r})=>t.jsx("th",{className:ee(e,"pkt-table__header-cell",{}),role:"columnheader",children:r}),Hn=({className:e,children:r})=>t.jsx("thead",{className:ee(e,"pkt-table__header",{}),role:"rowgroup",children:r}),Xn=({className:e,children:r})=>t.jsx("tr",{className:ee(e,"pkt-table__row",{}),role:"row",children:r}),Zn=({children:e,className:r})=>t.jsx("tbody",{className:ee(r,"pkt-table__body",{}),role:"rowgroup",children:e}),ye=g.forwardRef(({children:e,className:r,skin:a="blue",textStyle:s="normal-text",size:l="medium",closeTag:i=!1,iconName:c="",type:o="button",ariaLabel:f="close",onClick:u=()=>{}},d)=>{const[h,k]=g.useState(!1),S=R=>{k(!0),u(R)},y=["pkt-tag",l&&`pkt-tag--${l}`,a&&`pkt-tag--${a}`,s&&`pkt-tag--${s}`,r].filter(Boolean).join(" "),O=["pkt-tag","pkt-btn","pkt-btn--tertiary",l&&`pkt-tag--${l}`,a&&`pkt-tag--${a}`,s&&`pkt-tag--${s}`,c&&i?"pkt-btn--icons-right-and-left":null,i&&!c?"pkt-btn--icon-right":null,r].filter(Boolean).join(" "),D=!h;return i&&c?t.jsx(t.Fragment,{children:D&&t.jsxs("button",{className:O,type:o,"aria-label":f,onClick:S,ref:d,children:[t.jsx(j,{className:"pkt-tag__icon",name:c}),e,t.jsx(j,{className:"pkt-tag__close-btn",name:"close"})]})}):i?t.jsx(t.Fragment,{children:D&&t.jsxs("button",{className:O,type:o,"aria-label":f,onClick:S,ref:d,children:[t.jsx(j,{className:"pkt-tag__close-btn",name:"close"}),e]})}):c?t.jsxs("span",{className:y,children:[t.jsx(j,{className:"pkt-tag__icon",name:c}),e]}):t.jsx("span",{className:y,children:e})});ye.displayName="PktTag";const Qn=g.forwardRef(({arrowNav:e=!0,tabs:r,onTabSelected:a},s)=>{const l=g.useRef([]);g.useEffect(()=>{l.current=l.current.slice(0,r.length)},[r]);const i=(o,f)=>{f.action&&f.action(o),a&&a(o)},c=(o,f)=>{var u,d;e&&(f.code==="ArrowLeft"&&o!==0&&((u=l.current[o-1])==null||u.focus()),f.code==="ArrowRight"&&o<r.length-1&&((d=l.current[o+1])==null||d.focus()),(f.code==="ArrowDown"||f.code==="Space")&&i(o,r[o]))};return t.jsx("div",{className:"pkt-tabs",ref:s,children:t.jsx("div",{className:"pkt-tabs__list",role:e?"tablist":"navigation",children:r.map((o,f)=>t.jsx(g.Fragment,{children:o.href?t.jsxs("a",{"aria-selected":!!o.active,role:e?"tab":void 0,href:o.href,"aria-controls":o.controls,className:`pkt-tabs__link ${o.active?"active":""}`,onKeyUp:u=>c(f,u),onClick:()=>i(f,o),tabIndex:o.active||!e?void 0:-1,ref:u=>{l.current[f]=u},children:[o.icon&&t.jsx(j,{name:o.icon,className:"pkt-icon--small"}),o.text,o.tag&&t.jsx(ye,{skin:o.tag.skin,size:"small",children:o.tag.text})]}):t.jsxs("button",{"aria-selected":!!o.active,role:e?"tab":void 0,type:"button","aria-controls":o.controls,className:`pkt-tabs__button pkt-link-button ${o.active?"active":""}`,onKeyUp:u=>c(f,u),onClick:()=>i(f,o),tabIndex:o.active||!e?void 0:-1,ref:u=>{l.current[f]=u},children:[o.icon&&t.jsx(j,{name:o.icon,className:"pkt-icon--small"}),o.text,o.tag&&t.jsx(ye,{skin:o.tag.skin,size:"small",children:o.tag.text})]},"b-"+f)},f))})})}),er=g.forwardRef(({id:e,ariaDescribedby:r,ariaLabelledby:a,counter:s,counterMaxLength:l,className:i,disabled:c,errorMessage:o,hasError:f,helptext:u,helptextDropdown:d,helptextDropdownButton:h,inline:k,fullwidth:S=!1,label:y,name:O,optionalTag:D=!1,optionalText:R,requiredTag:_=!1,requiredText:v,placeholder:w,rows:V,useWrapper:B=!0,onChange:W,...M},Y)=>{const K=[i,"pkt-textinput","pkt-textarea"].join(" "),q=a||`${e}-label`,J=g.useRef(null),[L,b]=g.useState(0),U=Z=>{var Q,me;if(s&&b(((me=(Q=Z.currentTarget)==null?void 0:Q.value)==null?void 0:me.length)||0),W)return W(Z)};return g.useEffect(()=>{var Z,Q;typeof Y=="function"&&Y(J.current),s&&b(((Q=(Z=J==null?void 0:J.current)==null?void 0:Z.value)==null?void 0:Q.length)||0)},[Y]),t.jsxs(de,{ariaDescribedby:r,className:K,disabled:c,errorMessage:o,forId:e,hasError:f,helptext:u,helptextDropdown:d,helptextDropdownButton:h,inline:k,label:y,optionalTag:D,optionalText:R,requiredTag:_,requiredText:v,useWrapper:B,children:[t.jsx("textarea",{ref:J,className:`pkt-input ${S?"pkt-input--fullwidth":""} ${l&&L>l?"pkt-input--counter-error":""}`,name:O||e,id:e,placeholder:w,disabled:c,rows:V,"aria-labelledby":q,"aria-invalid":f,"aria-errormessage":`${e}-error`,...M,onChange:U}),s&&t.jsxs("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":!0,children:[L||0,l&&`/${l}`]})]})}),tr=g.forwardRef(({id:e,ariaDescribedby:r,ariaLabelledby:a,autocomplete:s="off",className:l,disabled:i=!1,errorMessage:c,hasError:o=!1,helptext:f,helptextDropdown:u,helptextDropdownButton:d,iconNameRight:h,inline:k=!1,fullwidth:S=!1,label:y,name:O,optionalTag:D=!1,optionalText:R,requiredTag:_=!1,requiredText:v,placeholder:w,prefix:V,suffix:B,type:W="text",useWrapper:M=!0,omitSearchIcon:Y=!1,value:K,...q},J)=>{const L=[l,"pkt-textinput"].join(" "),b=a||`${e}-label`,U=W==="search"&&!h&&!Y;return t.jsx(de,{ariaDescribedby:r,className:L,disabled:i,errorMessage:c,forId:e,hasError:o,helptext:f,helptextDropdown:u,helptextDropdownButton:d,inline:k,label:y,optionalTag:D,optionalText:R,requiredTag:_,requiredText:v,useWrapper:M,children:t.jsxs("div",{className:"pkt-input__container",children:[V&&t.jsx("div",{className:"pkt-input-prefix",children:V}),t.jsx("input",{ref:J,className:`pkt-input ${S?"pkt-input--fullwidth":""}`,type:W,name:O||e,id:e,placeholder:w,autoComplete:s,value:K,disabled:i,"aria-invalid":o,"aria-errormessage":`${e}-error`,"aria-labelledby":b,...q}),B&&t.jsxs("p",{className:"pkt-input-suffix",children:[B,h&&t.jsx(j,{className:"pkt-input-suffix-icon",name:h}),U&&t.jsx(j,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!B&&h&&t.jsx(j,{className:"pkt-input-icon",name:h}),!B&&U&&t.jsx(j,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})});C.PktAlert=et,C.PktBackLink=Gt,C.PktBreadcrumbs=An,C.PktButton=se,C.PktCheckbox=vt,C.PktFooter=Un,C.PktFooterSimple=Vn,C.PktHeader=Wn,C.PktIcon=j,C.PktIconContext=Qe,C.PktInput=bt,C.PktInputWrapper=de,C.PktLinkCard=gt,C.PktLoader=Mn,C.PktMessagebox=Yn,C.PktRadioButton=xt,C.PktSearchInput=Kn,C.PktSelect=Jn,C.PktTable=zn,C.PktTableBody=Zn,C.PktTableDataCell=qn,C.PktTableHeader=Hn,C.PktTableHeaderCell=Gn,C.PktTableRow=Xn,C.PktTabs=Qn,C.PktTag=ye,C.PktTextarea=er,C.PktTextinput=tr,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.13.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": "^11.9.4",
|
|
36
|
-
"@oslokommune/punkt-css": "^11.
|
|
36
|
+
"@oslokommune/punkt-css": "^11.13.0",
|
|
37
37
|
"@testing-library/jest-dom": "^6.4.5",
|
|
38
38
|
"@testing-library/react": "^15.0.7",
|
|
39
39
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
92
92
|
},
|
|
93
93
|
"license": "MIT",
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "50259618f1329f0e1c61286f14a37f8c352f8a97"
|
|
95
95
|
}
|
|
@@ -39,9 +39,9 @@ describe('<PktTable />', () => {
|
|
|
39
39
|
expect(screen.getByText('Table data 2')).toBeInTheDocument()
|
|
40
40
|
})
|
|
41
41
|
|
|
42
|
-
test('renders correctly with skin "zebra-
|
|
42
|
+
test('renders correctly with skin "zebra-blue" and compact set to true', () => {
|
|
43
43
|
render(
|
|
44
|
-
<PktTable skin="zebra-
|
|
44
|
+
<PktTable skin="zebra-blue" compact>
|
|
45
45
|
<PktTableHeader>
|
|
46
46
|
<PktTableRow>
|
|
47
47
|
<PktTableHeaderCell>Header 1</PktTableHeaderCell>
|
|
@@ -59,6 +59,6 @@ describe('<PktTable />', () => {
|
|
|
59
59
|
|
|
60
60
|
// Assert that the component applies the props correctly
|
|
61
61
|
expect(screen.getByTestId('pkt-table')).toHaveClass('pkt-table--compact')
|
|
62
|
-
expect(screen.getByTestId('pkt-table')).toHaveClass('pkt-table--zebra-
|
|
62
|
+
expect(screen.getByTestId('pkt-table')).toHaveClass('pkt-table--zebra-blue')
|
|
63
63
|
})
|
|
64
64
|
})
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import classNames from 'classnames'
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
export type TTableSkin = 'basic' | 'zebra-
|
|
4
|
+
export type TTableSkin = 'basic' | 'zebra-blue'
|
|
5
5
|
|
|
6
6
|
interface ITableProps {
|
|
7
7
|
compact?: boolean
|
|
8
|
-
skin?: 'basic' | 'zebra-
|
|
8
|
+
skin?: 'basic' | 'zebra-blue'
|
|
9
9
|
responsiveView?: boolean
|
|
10
10
|
className?: string
|
|
11
11
|
children: React.ReactNode
|
|
@@ -25,7 +25,6 @@ export const PktTable = ({
|
|
|
25
25
|
'pkt-table--responsive': responsiveView,
|
|
26
26
|
'pkt-table--compact': compact,
|
|
27
27
|
'pkt-table--basic': skin === 'basic',
|
|
28
|
-
'pkt-table--zebra-grey': skin === 'zebra-grey',
|
|
29
28
|
'pkt-table--zebra-blue': skin === 'zebra-blue',
|
|
30
29
|
})}
|
|
31
30
|
role="table"
|