@oslokommune/punkt-react 4.1.0 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/dist/button/Button.d.ts +1 -0
- package/dist/linkcard/LinkCard.d.ts +1 -0
- package/dist/punkt-react.es.js +99 -88
- package/dist/punkt-react.umd.js +6 -6
- package/package.json +2 -2
- package/src/components/alert/Alert.tsx +46 -42
- package/src/components/button/Button.tsx +18 -14
- package/src/components/linkcard/LinkCard.tsx +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,44 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [4.3.0](https://github.com/oslokommune/punkt/compare/4.2.0...4.3.0) (2023-05-23)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
* Legg til type i PktButton slik at skjema ikke sendes inn … (#875). * fix(vue2,react): Legg til type i PktButton slik at skjema ikke sendes inn av en vanlig knapp
|
|
18
|
+
* fix(vue2,react): type="button" på lukkeknappen i PktAlert
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Chores
|
|
22
|
+
Ingen
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## [4.2.0](https://github.com/oslokommune/punkt/compare/4.1.0...4.2.0) (2023-05-16)
|
|
28
|
+
|
|
29
|
+
### ⚠ BREAKING CHANGES
|
|
30
|
+
Ingen
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
* [852](https://github.com/oslokommune/punkt/issues/852) Legg til openInNewTab - Linkcard. Lagt til ny prop i Linkcard: openInNewTab.
|
|
34
|
+
Om du ønsker at linken skal åpnes i ny fane send openInNewTab = true. Da vil det legges til en target="_blank" og rel="noopener noreferrer"
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
Ingen
|
|
39
|
+
|
|
40
|
+
### Chores
|
|
41
|
+
Ingen
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
|
|
8
46
|
## [4.1.0](https://github.com/oslokommune/punkt/compare/4.0.1...4.1.0) (2023-05-16)
|
|
9
47
|
|
|
10
48
|
### ⚠ BREAKING CHANGES
|
package/dist/button/Button.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface IPktButton extends React.ButtonHTMLAttributes<HTMLButtonElement
|
|
|
7
7
|
skin?: 'primary' | 'secondary' | 'tertiary';
|
|
8
8
|
variant?: 'label-only' | 'icon-left' | 'icon-right' | 'icon-only' | 'icons-right-and-left';
|
|
9
9
|
state?: 'normal' | 'focus' | 'hover' | 'active';
|
|
10
|
+
type?: 'button' | 'submit' | 'reset';
|
|
10
11
|
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
11
12
|
}
|
|
12
13
|
export declare const PktButton: React.ForwardRefExoticComponent<IPktButton & React.RefAttributes<HTMLButtonElement>>;
|
package/dist/punkt-react.es.js
CHANGED
|
@@ -17,16 +17,16 @@ function hr() {
|
|
|
17
17
|
if (Pe)
|
|
18
18
|
return W;
|
|
19
19
|
Pe = 1;
|
|
20
|
-
var o = q, l = Symbol.for("react.element"), s = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty,
|
|
21
|
-
function _(
|
|
20
|
+
var o = q, l = Symbol.for("react.element"), s = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, p = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, n = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
21
|
+
function _(b, v, x) {
|
|
22
22
|
var N, T = {}, P = null, C = null;
|
|
23
23
|
x !== void 0 && (P = "" + x), v.key !== void 0 && (P = "" + v.key), v.ref !== void 0 && (C = v.ref);
|
|
24
24
|
for (N in v)
|
|
25
25
|
c.call(v, N) && !n.hasOwnProperty(N) && (T[N] = v[N]);
|
|
26
|
-
if (
|
|
27
|
-
for (N in v =
|
|
26
|
+
if (b && b.defaultProps)
|
|
27
|
+
for (N in v = b.defaultProps, v)
|
|
28
28
|
T[N] === void 0 && (T[N] = v[N]);
|
|
29
|
-
return { $$typeof: l, type:
|
|
29
|
+
return { $$typeof: l, type: b, key: P, ref: C, props: T, _owner: p.current };
|
|
30
30
|
}
|
|
31
31
|
return W.Fragment = s, W.jsx = _, W.jsxs = _, W;
|
|
32
32
|
}
|
|
@@ -43,7 +43,7 @@ var Y = {};
|
|
|
43
43
|
var je;
|
|
44
44
|
function _r() {
|
|
45
45
|
return je || (je = 1, process.env.NODE_ENV !== "production" && function() {
|
|
46
|
-
var o = q, l = Symbol.for("react.element"), s = Symbol.for("react.portal"), c = Symbol.for("react.fragment"),
|
|
46
|
+
var o = q, l = Symbol.for("react.element"), s = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), n = Symbol.for("react.profiler"), _ = Symbol.for("react.provider"), b = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), N = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), ae = Symbol.iterator, Ce = "@@iterator";
|
|
47
47
|
function Fe(e) {
|
|
48
48
|
if (e === null || typeof e != "object")
|
|
49
49
|
return null;
|
|
@@ -71,7 +71,7 @@ function _r() {
|
|
|
71
71
|
var De = !1, Ie = !1, Ae = !1, We = !1, Ye = !1, ne;
|
|
72
72
|
ne = Symbol.for("react.module.reference");
|
|
73
73
|
function Be(e) {
|
|
74
|
-
return !!(typeof e == "string" || typeof e == "function" || e === c || e === n || Ye || e ===
|
|
74
|
+
return !!(typeof e == "string" || typeof e == "function" || e === c || e === n || Ye || e === p || e === x || e === N || We || e === C || De || Ie || Ae || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === T || e.$$typeof === _ || e.$$typeof === b || e.$$typeof === v || // This needs to include all possible module reference object
|
|
75
75
|
// types supported by any Flight configuration anywhere since
|
|
76
76
|
// we don't know which Flight build this will end up being used
|
|
77
77
|
// with.
|
|
@@ -101,7 +101,7 @@ function _r() {
|
|
|
101
101
|
return "Portal";
|
|
102
102
|
case n:
|
|
103
103
|
return "Profiler";
|
|
104
|
-
case
|
|
104
|
+
case p:
|
|
105
105
|
return "StrictMode";
|
|
106
106
|
case x:
|
|
107
107
|
return "Suspense";
|
|
@@ -110,7 +110,7 @@ function _r() {
|
|
|
110
110
|
}
|
|
111
111
|
if (typeof e == "object")
|
|
112
112
|
switch (e.$$typeof) {
|
|
113
|
-
case
|
|
113
|
+
case b:
|
|
114
114
|
var r = e;
|
|
115
115
|
return oe(r) + ".Consumer";
|
|
116
116
|
case _:
|
|
@@ -263,18 +263,18 @@ function _r() {
|
|
|
263
263
|
if (S && i && typeof S.stack == "string") {
|
|
264
264
|
for (var u = S.stack.split(`
|
|
265
265
|
`), R = i.stack.split(`
|
|
266
|
-
`), k = u.length - 1,
|
|
267
|
-
|
|
268
|
-
for (; k >= 1 &&
|
|
269
|
-
if (u[k] !== R[
|
|
270
|
-
if (k !== 1 ||
|
|
266
|
+
`), k = u.length - 1, g = R.length - 1; k >= 1 && g >= 0 && u[k] !== R[g]; )
|
|
267
|
+
g--;
|
|
268
|
+
for (; k >= 1 && g >= 0; k--, g--)
|
|
269
|
+
if (u[k] !== R[g]) {
|
|
270
|
+
if (k !== 1 || g !== 1)
|
|
271
271
|
do
|
|
272
|
-
if (k--,
|
|
272
|
+
if (k--, g--, g < 0 || u[k] !== R[g]) {
|
|
273
273
|
var w = `
|
|
274
274
|
` + u[k].replace(" at new ", " at ");
|
|
275
275
|
return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, w), w;
|
|
276
276
|
}
|
|
277
|
-
while (k >= 1 &&
|
|
277
|
+
while (k >= 1 && g >= 0);
|
|
278
278
|
break;
|
|
279
279
|
}
|
|
280
280
|
}
|
|
@@ -463,8 +463,8 @@ function _r() {
|
|
|
463
463
|
f[h] === void 0 && (f[h] = k[h]);
|
|
464
464
|
}
|
|
465
465
|
if (u || R) {
|
|
466
|
-
var
|
|
467
|
-
u && rr(f,
|
|
466
|
+
var g = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
467
|
+
u && rr(f, g), R && tr(f, g);
|
|
468
468
|
}
|
|
469
469
|
return ar(e, u, R, m, i, A.current, f);
|
|
470
470
|
}
|
|
@@ -598,9 +598,9 @@ Check the top-level render call using <` + a + ">.");
|
|
|
598
598
|
var k;
|
|
599
599
|
e === null ? k = "null" : K(e) ? k = "array" : e !== void 0 && e.$$typeof === l ? (k = "<" + (j(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : k = typeof e, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", k, u);
|
|
600
600
|
}
|
|
601
|
-
var
|
|
602
|
-
if (
|
|
603
|
-
return
|
|
601
|
+
var g = nr(e, r, a, m, h);
|
|
602
|
+
if (g == null)
|
|
603
|
+
return g;
|
|
604
604
|
if (f) {
|
|
605
605
|
var w = r.children;
|
|
606
606
|
if (w !== void 0)
|
|
@@ -614,7 +614,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
614
614
|
else
|
|
615
615
|
xe(w, e);
|
|
616
616
|
}
|
|
617
|
-
return e === c ? sr(
|
|
617
|
+
return e === c ? sr(g) : lr(g), g;
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
620
|
function cr(e, r, a) {
|
|
@@ -629,34 +629,35 @@ Check the top-level render call using <` + a + ">.");
|
|
|
629
629
|
}
|
|
630
630
|
process.env.NODE_ENV === "production" ? re.exports = hr() : re.exports = _r();
|
|
631
631
|
var te = re.exports;
|
|
632
|
-
const Se = te.Fragment, t = te.jsx,
|
|
632
|
+
const Se = te.Fragment, t = te.jsx, d = te.jsxs, y = ({
|
|
633
633
|
className: o,
|
|
634
634
|
name: l,
|
|
635
635
|
viewBox: s = "0 0 32 32",
|
|
636
636
|
...c
|
|
637
637
|
}) => {
|
|
638
|
-
const
|
|
639
|
-
return /* @__PURE__ */ t("svg", { ...c, className:
|
|
638
|
+
const p = [o].filter(Boolean).join(" ");
|
|
639
|
+
return /* @__PURE__ */ t("svg", { ...c, className: p, viewBox: s, children: /* @__PURE__ */ t("use", { href: `#${l}` }) });
|
|
640
640
|
}, xr = z(
|
|
641
641
|
({
|
|
642
642
|
children: o,
|
|
643
643
|
className: l,
|
|
644
644
|
skin: s = "info",
|
|
645
645
|
closeAlert: c = !1,
|
|
646
|
-
onClose:
|
|
646
|
+
onClose: p,
|
|
647
647
|
title: n,
|
|
648
648
|
date: _,
|
|
649
|
-
ariaLive:
|
|
649
|
+
ariaLive: b = "polite",
|
|
650
650
|
...v
|
|
651
651
|
}, x) => {
|
|
652
652
|
const N = [l, "pkt-alert", s && `pkt-alert--${s}`].filter(Boolean).join(" "), [T, P] = dr(!0), C = () => {
|
|
653
|
-
P(!1),
|
|
653
|
+
P(!1), p && p();
|
|
654
654
|
};
|
|
655
|
-
return T ? /* @__PURE__ */
|
|
655
|
+
return T ? /* @__PURE__ */ d("div", { ...v, className: N, "aria-live": b, ref: x, children: [
|
|
656
656
|
/* @__PURE__ */ t("div", { className: "pkt-alert__icon", children: /* @__PURE__ */ t(y, { name: s === "info" ? "alert-information" : `alert-${s}` }) }),
|
|
657
657
|
c && /* @__PURE__ */ t("div", { className: "pkt-alert__close", children: /* @__PURE__ */ t(
|
|
658
658
|
"button",
|
|
659
659
|
{
|
|
660
|
+
type: "button",
|
|
660
661
|
className: "pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",
|
|
661
662
|
tabIndex: 0,
|
|
662
663
|
"aria-label": "close",
|
|
@@ -666,7 +667,7 @@ const Se = te.Fragment, t = te.jsx, p = te.jsxs, y = ({
|
|
|
666
667
|
) }),
|
|
667
668
|
n && /* @__PURE__ */ t("div", { className: "pkt-alert__title", children: n }),
|
|
668
669
|
/* @__PURE__ */ t("div", { className: "pkt-alert__text", children: o }),
|
|
669
|
-
_ && /* @__PURE__ */
|
|
670
|
+
_ && /* @__PURE__ */ d("div", { className: "pkt-alert__date", children: [
|
|
670
671
|
"Sist oppdatert: ",
|
|
671
672
|
_
|
|
672
673
|
] })
|
|
@@ -678,36 +679,36 @@ const Se = te.Fragment, t = te.jsx, p = te.jsxs, y = ({
|
|
|
678
679
|
className: l,
|
|
679
680
|
iconName: s = "user",
|
|
680
681
|
secondIconName: c = "user",
|
|
681
|
-
size:
|
|
682
|
+
size: p = "medium",
|
|
682
683
|
skin: n = "primary",
|
|
683
684
|
type: _ = "button",
|
|
684
|
-
variant:
|
|
685
|
+
variant: b = "label-only",
|
|
685
686
|
...v
|
|
686
687
|
}, x) => {
|
|
687
688
|
const N = [
|
|
688
689
|
l,
|
|
689
690
|
"pkt-btn",
|
|
690
|
-
|
|
691
|
+
p && `pkt-btn--${p}`,
|
|
691
692
|
n && `pkt-btn--${n}`,
|
|
692
|
-
|
|
693
|
+
b && `pkt-btn--${b}`
|
|
693
694
|
].filter(Boolean).join(" ");
|
|
694
|
-
return /* @__PURE__ */
|
|
695
|
+
return /* @__PURE__ */ d("button", { ...v, className: N, type: _, ref: x, children: [
|
|
695
696
|
/* @__PURE__ */ t(y, { className: "pkt-btn__icon", name: s }),
|
|
696
697
|
/* @__PURE__ */ t("span", { className: "pkt-btn__text", children: o }),
|
|
697
|
-
|
|
698
|
+
b === "icons-right-and-left" && /* @__PURE__ */ t(y, { className: "pkt-btn__icon", name: c })
|
|
698
699
|
] });
|
|
699
700
|
}
|
|
700
701
|
);
|
|
701
702
|
vr.displayName = "PktButton";
|
|
702
703
|
const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
703
|
-
var c,
|
|
704
|
-
return /* @__PURE__ */ t("footer", { className: "pkt-footer", "data-mode": "dark", children: /* @__PURE__ */
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
/* @__PURE__ */
|
|
704
|
+
var c, p;
|
|
705
|
+
return /* @__PURE__ */ t("footer", { className: "pkt-footer", "data-mode": "dark", children: /* @__PURE__ */ d("div", { className: "pkt-footer__container", children: [
|
|
706
|
+
/* @__PURE__ */ d("div", { className: "pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16", children: [
|
|
707
|
+
/* @__PURE__ */ d("div", { className: "pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up", children: [
|
|
707
708
|
/* @__PURE__ */ t("h2", { className: "pkt-footer__title", children: o.title }),
|
|
708
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ d("ul", { className: "pkt-footer__list", children: [
|
|
709
710
|
o.text && /* @__PURE__ */ t("li", { className: "pkt-footer__text", children: o.text }),
|
|
710
|
-
(c = o.links) == null ? void 0 : c.map((n, _) => /* @__PURE__ */ t("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */
|
|
711
|
+
(c = o.links) == null ? void 0 : c.map((n, _) => /* @__PURE__ */ t("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ d(
|
|
711
712
|
"a",
|
|
712
713
|
{
|
|
713
714
|
className: `pkt-footer__link ${n.external ? "pkt-link--external" : ""}`,
|
|
@@ -722,11 +723,11 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
722
723
|
) }, `links-${_}`))
|
|
723
724
|
] })
|
|
724
725
|
] }),
|
|
725
|
-
/* @__PURE__ */
|
|
726
|
+
/* @__PURE__ */ d("div", { className: "pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up", children: [
|
|
726
727
|
/* @__PURE__ */ t("h2", { className: "pkt-footer__title", children: l.title }),
|
|
727
|
-
/* @__PURE__ */
|
|
728
|
+
/* @__PURE__ */ d("ul", { className: "pkt-footer__list", children: [
|
|
728
729
|
l.text && /* @__PURE__ */ t("li", { className: "pkt-footer__text", children: l.text }),
|
|
729
|
-
(
|
|
730
|
+
(p = l.links) == null ? void 0 : p.map((n, _) => /* @__PURE__ */ t("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ d(
|
|
730
731
|
"a",
|
|
731
732
|
{
|
|
732
733
|
className: `pkt-footer__link ${n.external ? "pkt-link--external" : ""}`,
|
|
@@ -741,10 +742,10 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
741
742
|
) }, `links-${_}`))
|
|
742
743
|
] })
|
|
743
744
|
] }),
|
|
744
|
-
/* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ d("div", { className: "pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up", children: [
|
|
745
746
|
/* @__PURE__ */ t("h2", { className: "pkt-footer__title", children: "Om nettstedet" }),
|
|
746
|
-
/* @__PURE__ */
|
|
747
|
-
/* @__PURE__ */ t("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ d("ul", { className: "pkt-footer__list", children: [
|
|
748
|
+
/* @__PURE__ */ t("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ d(
|
|
748
749
|
"a",
|
|
749
750
|
{
|
|
750
751
|
className: "pkt-footer__link",
|
|
@@ -755,14 +756,14 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
755
756
|
]
|
|
756
757
|
}
|
|
757
758
|
) }),
|
|
758
|
-
/* @__PURE__ */ t("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */
|
|
759
|
+
/* @__PURE__ */ t("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ d("a", { className: "pkt-footer__link", href: "https://www.oslo.kommune.no/tilgjengelighet/", children: [
|
|
759
760
|
/* @__PURE__ */ t(y, { className: "pkt-footer__link-icon", name: "chevron-right" }),
|
|
760
761
|
"Tilgjengelighet"
|
|
761
762
|
] }) })
|
|
762
763
|
] })
|
|
763
764
|
] })
|
|
764
765
|
] }),
|
|
765
|
-
s && /* @__PURE__ */
|
|
766
|
+
s && /* @__PURE__ */ d("div", { className: "pkt-footer__social", "aria-label": "standard lenker", children: [
|
|
766
767
|
/* @__PURE__ */ t("div", { className: "pkt-footer__social-languages", children: s.filter((n) => n.language).map((n, _) => /* @__PURE__ */ t("div", { className: "pkt-footer__social-language", children: /* @__PURE__ */ t(
|
|
767
768
|
"a",
|
|
768
769
|
{
|
|
@@ -788,8 +789,8 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
788
789
|
] }) });
|
|
789
790
|
}, Tr = ({
|
|
790
791
|
links: o = []
|
|
791
|
-
}) => /* @__PURE__ */ t("footer", { className: "pkt-footer-simple", "data-mode": "dark", children: /* @__PURE__ */ t("div", { className: "pkt-footer-simple__container", children: /* @__PURE__ */
|
|
792
|
-
o.map((l, s) => /* @__PURE__ */ t("li", { className: "pkt-footer-simple__list-item", children: /* @__PURE__ */
|
|
792
|
+
}) => /* @__PURE__ */ t("footer", { className: "pkt-footer-simple", "data-mode": "dark", children: /* @__PURE__ */ t("div", { className: "pkt-footer-simple__container", children: /* @__PURE__ */ d("ul", { className: "pkt-footer-simple__list", children: [
|
|
793
|
+
o.map((l, s) => /* @__PURE__ */ t("li", { className: "pkt-footer-simple__list-item", children: /* @__PURE__ */ d(
|
|
793
794
|
"a",
|
|
794
795
|
{
|
|
795
796
|
className: `pkt-footer-simple__link ${l.external ? " pkt-link--external" : ""}`,
|
|
@@ -808,11 +809,11 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
808
809
|
]
|
|
809
810
|
}
|
|
810
811
|
) }, s)),
|
|
811
|
-
/* @__PURE__ */ t("li", { className: "pkt-footer-simple__list-item", children: /* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ t("li", { className: "pkt-footer-simple__list-item", children: /* @__PURE__ */ d("a", { className: "pkt-footer-simple__link", href: "https://www.oslo.kommune.no/personvern-og-informasjonskapsler/", children: [
|
|
812
813
|
/* @__PURE__ */ t(y, { className: "pkt-footer-simple__link-icon", name: "chevron-right" }),
|
|
813
814
|
"Personvern og informasjonskapsler"
|
|
814
815
|
] }) }),
|
|
815
|
-
/* @__PURE__ */ t("li", { className: "pkt-footer-simple__list-item", children: /* @__PURE__ */
|
|
816
|
+
/* @__PURE__ */ t("li", { className: "pkt-footer-simple__list-item", children: /* @__PURE__ */ d("a", { className: "pkt-footer-simple__link", href: "https://www.oslo.kommune.no/tilgjengelighet/", children: [
|
|
816
817
|
/* @__PURE__ */ t(y, { className: "pkt-footer-simple__link-icon", name: "chevron-right" }),
|
|
817
818
|
"Tilgjengelighet"
|
|
818
819
|
] }) })
|
|
@@ -821,14 +822,14 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
821
822
|
logoLink: l = "https://www.oslo.kommune.no/",
|
|
822
823
|
isLoggedIn: s = !1,
|
|
823
824
|
representing: c = "",
|
|
824
|
-
canChangeRepresentation:
|
|
825
|
+
canChangeRepresentation: p = !1,
|
|
825
826
|
showLogInButton: n = !0,
|
|
826
827
|
onLogIn: _,
|
|
827
|
-
onLogOut:
|
|
828
|
+
onLogOut: b,
|
|
828
829
|
onChangeRepresentation: v
|
|
829
830
|
}) => {
|
|
830
831
|
const x = [o, "pkt-header"].filter(Boolean).join(" ");
|
|
831
|
-
return /* @__PURE__ */
|
|
832
|
+
return /* @__PURE__ */ d("header", { id: "pkt-header", className: x, "aria-label": "Topp", children: [
|
|
832
833
|
/* @__PURE__ */ t("div", { className: "pkt-header__logo", children: /* @__PURE__ */ t("a", { "aria-label": "Tilbake til forside", className: "pkt-header__logo-link", href: l, children: /* @__PURE__ */ t(
|
|
833
834
|
y,
|
|
834
835
|
{
|
|
@@ -838,8 +839,8 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
838
839
|
"aria-hidden": "true"
|
|
839
840
|
}
|
|
840
841
|
) }) }),
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
s &&
|
|
842
|
+
/* @__PURE__ */ d("div", { className: "pkt-header__actions", children: [
|
|
843
|
+
s && p && /* @__PURE__ */ d(
|
|
843
844
|
"button",
|
|
844
845
|
{
|
|
845
846
|
className: "pkt-btn pkt-btn--secondary pkt-btn--icon-right",
|
|
@@ -853,23 +854,23 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
853
854
|
]
|
|
854
855
|
}
|
|
855
856
|
),
|
|
856
|
-
s && !
|
|
857
|
+
s && !p && /* @__PURE__ */ d("div", { className: "pkt-header__action", children: [
|
|
857
858
|
/* @__PURE__ */ t("span", { className: "pkt-header__action-text", children: /* @__PURE__ */ t("span", { className: "pkt-btn__text pkt-header__action-textrow text-row-inline pkt-truncate-text", children: c }) }),
|
|
858
859
|
/* @__PURE__ */ t("span", { className: "pkt-header__action-icon pkt-show-phablet-up", children: /* @__PURE__ */ t(y, { name: "user" }) })
|
|
859
860
|
] }),
|
|
860
|
-
n && s && /* @__PURE__ */
|
|
861
|
+
n && s && /* @__PURE__ */ d(
|
|
861
862
|
"button",
|
|
862
863
|
{
|
|
863
864
|
className: "pkt-btn pkt-btn--tertiary pkt-btn--icon-right",
|
|
864
865
|
"aria-label": "Logg ut",
|
|
865
|
-
onClick:
|
|
866
|
+
onClick: b,
|
|
866
867
|
children: [
|
|
867
868
|
/* @__PURE__ */ t(y, { className: "pkt-btn__icon pkt-show-tablet-up", name: "exit" }),
|
|
868
869
|
/* @__PURE__ */ t("span", { className: "pkt-btn__text", children: "Logg ut" })
|
|
869
870
|
]
|
|
870
871
|
}
|
|
871
872
|
),
|
|
872
|
-
n && !s && /* @__PURE__ */
|
|
873
|
+
n && !s && /* @__PURE__ */ d(
|
|
873
874
|
"button",
|
|
874
875
|
{
|
|
875
876
|
className: "pkt-btn pkt-btn--tertiary pkt-btn--icon-right",
|
|
@@ -884,9 +885,9 @@ const wr = ({ columnOne: o, columnTwo: l, socialLinks: s }) => {
|
|
|
884
885
|
] })
|
|
885
886
|
] });
|
|
886
887
|
}, kr = q.forwardRef(
|
|
887
|
-
({ label: o, id: l, children: s, ...c },
|
|
888
|
+
({ label: o, id: l, children: s, ...c }, p) => /* @__PURE__ */ d("div", { className: "pkt-form-group", children: [
|
|
888
889
|
/* @__PURE__ */ t("label", { htmlFor: l, className: "pkt-form-label", children: o }),
|
|
889
|
-
/* @__PURE__ */ t("input", { className: "pkt-form-input", id: l, ...c, ref:
|
|
890
|
+
/* @__PURE__ */ t("input", { className: "pkt-form-input", id: l, ...c, ref: p }),
|
|
890
891
|
s
|
|
891
892
|
] })
|
|
892
893
|
);
|
|
@@ -895,37 +896,47 @@ const jr = ({
|
|
|
895
896
|
children: o,
|
|
896
897
|
className: l,
|
|
897
898
|
iconName: s = "user",
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
899
|
+
openInNewTab: c = !1,
|
|
900
|
+
skin: p = "",
|
|
901
|
+
href: n = "#",
|
|
902
|
+
title: _
|
|
901
903
|
}) => {
|
|
902
|
-
const
|
|
903
|
-
return /* @__PURE__ */
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
904
|
+
const b = [l, "pkt-linkcard", p && `pkt-linkcard--${p}`].filter(Boolean).join(" ");
|
|
905
|
+
return /* @__PURE__ */ d(
|
|
906
|
+
"a",
|
|
907
|
+
{
|
|
908
|
+
href: n,
|
|
909
|
+
className: `pkt-linkcard pkt-link ${b}`,
|
|
910
|
+
target: c ? "_blank" : "_self",
|
|
911
|
+
rel: c ? "noopener noreferrer" : void 0,
|
|
912
|
+
children: [
|
|
913
|
+
/* @__PURE__ */ t(y, { className: "pkt-link__icon", name: s }),
|
|
914
|
+
/* @__PURE__ */ d("div", { className: "pkt-linkcard__content", children: [
|
|
915
|
+
/* @__PURE__ */ t("div", { className: "pkt-linkcard__title", children: _ }),
|
|
916
|
+
/* @__PURE__ */ t("div", { className: "pkt-linkcard__text", children: o })
|
|
917
|
+
] })
|
|
918
|
+
]
|
|
919
|
+
}
|
|
920
|
+
);
|
|
910
921
|
}, Sr = ({
|
|
911
922
|
children: o,
|
|
912
923
|
skin: l = "beige",
|
|
913
924
|
title: s,
|
|
914
925
|
...c
|
|
915
926
|
}) => {
|
|
916
|
-
const
|
|
917
|
-
return /* @__PURE__ */
|
|
927
|
+
const p = ["pkt-messagebox", l && `pkt-messagebox--${l}`].filter(Boolean).join(" ");
|
|
928
|
+
return /* @__PURE__ */ d("div", { ...c, className: p, children: [
|
|
918
929
|
/* @__PURE__ */ t("div", { className: "pkt-messagebox__title", children: s }),
|
|
919
930
|
/* @__PURE__ */ t("div", { className: "pkt-messagebox__text", children: o })
|
|
920
931
|
] });
|
|
921
932
|
}, br = z(
|
|
922
|
-
({ id: o, name: l, label: s, value: c, ...
|
|
923
|
-
/* @__PURE__ */ t("input", { type: "radio", className: "pkt-form-check-input", id: o, name: l, value: c, ref: n, ...
|
|
933
|
+
({ id: o, name: l, label: s, value: c, ...p }, n) => /* @__PURE__ */ d("div", { className: "pkt-form-group", children: [
|
|
934
|
+
/* @__PURE__ */ t("input", { type: "radio", className: "pkt-form-check-input", id: o, name: l, value: c, ref: n, ...p }),
|
|
924
935
|
/* @__PURE__ */ t("label", { className: "pkt-form-label", htmlFor: o, children: s })
|
|
925
936
|
] })
|
|
926
937
|
);
|
|
927
938
|
br.displayName = "PktRadio";
|
|
928
|
-
const Or = ({ label: o, children: l }) => /* @__PURE__ */
|
|
939
|
+
const Or = ({ label: o, children: l }) => /* @__PURE__ */ d(Se, { children: [
|
|
929
940
|
/* @__PURE__ */ t("p", { children: o }),
|
|
930
941
|
/* @__PURE__ */ t("div", { className: "pkt-form-group", children: l })
|
|
931
942
|
] });
|
|
@@ -939,16 +950,16 @@ var Oe = { exports: {} };
|
|
|
939
950
|
(function() {
|
|
940
951
|
var l = {}.hasOwnProperty;
|
|
941
952
|
function s() {
|
|
942
|
-
for (var c = [],
|
|
943
|
-
var n = arguments[
|
|
953
|
+
for (var c = [], p = 0; p < arguments.length; p++) {
|
|
954
|
+
var n = arguments[p];
|
|
944
955
|
if (n) {
|
|
945
956
|
var _ = typeof n;
|
|
946
957
|
if (_ === "string" || _ === "number")
|
|
947
958
|
c.push(n);
|
|
948
959
|
else if (Array.isArray(n)) {
|
|
949
960
|
if (n.length) {
|
|
950
|
-
var
|
|
951
|
-
|
|
961
|
+
var b = s.apply(null, n);
|
|
962
|
+
b && c.push(b);
|
|
952
963
|
}
|
|
953
964
|
} else if (_ === "object") {
|
|
954
965
|
if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]")) {
|
|
@@ -968,7 +979,7 @@ var Oe = { exports: {} };
|
|
|
968
979
|
var gr = Oe.exports;
|
|
969
980
|
const Nr = /* @__PURE__ */ mr(gr), yr = ({ isResponsive: o, children: l }) => o ? /* @__PURE__ */ t("div", { className: "pkt-table-container", children: l }) : /* @__PURE__ */ t(Se, { children: l }), Cr = ({
|
|
970
981
|
isResponsive: o,
|
|
971
|
-
modifiers: { info: l = !1, success: s = !1, strong: c = !1, shadow:
|
|
982
|
+
modifiers: { info: l = !1, success: s = !1, strong: c = !1, shadow: p = !1 } = {},
|
|
972
983
|
children: n
|
|
973
984
|
}) => /* @__PURE__ */ t(yr, { isResponsive: o, children: /* @__PURE__ */ t(
|
|
974
985
|
"table",
|
|
@@ -977,12 +988,12 @@ const Nr = /* @__PURE__ */ mr(gr), yr = ({ isResponsive: o, children: l }) => o
|
|
|
977
988
|
"pkt-table--info": l,
|
|
978
989
|
"pkt-table--success": s,
|
|
979
990
|
"pkt-table--strong": c,
|
|
980
|
-
"pkt-table--shadow":
|
|
991
|
+
"pkt-table--shadow": p
|
|
981
992
|
}),
|
|
982
993
|
children: n
|
|
983
994
|
}
|
|
984
995
|
) }), Fr = ({ children: o }) => /* @__PURE__ */ t("td", { className: "pkt-table__th", children: o }), $r = ({ children: o }) => /* @__PURE__ */ t("th", { className: "pkt-table__th", children: o }), Er = z(
|
|
985
|
-
({ id: o, label: l, ...s }, c) => /* @__PURE__ */
|
|
996
|
+
({ id: o, label: l, ...s }, c) => /* @__PURE__ */ d("div", { className: "pkt-form-group", children: [
|
|
986
997
|
/* @__PURE__ */ t("label", { htmlFor: o, className: "pkt-form-label", children: l }),
|
|
987
998
|
/* @__PURE__ */ t("textarea", { className: "pkt-form-textarea", id: o, ref: c, ...s })
|
|
988
999
|
] })
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ae;function $e(){if(ae)return W;ae=1;var o=P,l=Symbol.for("react.element"),s=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,d=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n={key:!0,ref:!0,__self:!0,__source:!0};function _(
|
|
9
|
+
*/var ae;function $e(){if(ae)return W;ae=1;var o=P,l=Symbol.for("react.element"),s=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,d=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n={key:!0,ref:!0,__self:!0,__source:!0};function _(g,v,T){var R,j={},S=null,D=null;T!==void 0&&(S=""+T),v.key!==void 0&&(S=""+v.key),v.ref!==void 0&&(D=v.ref);for(R in v)c.call(v,R)&&!n.hasOwnProperty(R)&&(j[R]=v[R]);if(g&&g.defaultProps)for(R in v=g.defaultProps,v)j[R]===void 0&&(j[R]=v[R]);return{$$typeof:l,type:g,key:S,ref:D,props:j,_owner:d.current}}return W.Fragment=s,W.jsx=_,W.jsxs=_,W}var Y={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var ne;function We(){return ne||(ne=1,process.env.NODE_ENV!=="production"&&function(){var o=P,l=Symbol.for("react.element"),s=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),
|
|
17
|
+
*/var ne;function We(){return ne||(ne=1,process.env.NODE_ENV!=="production"&&function(){var o=P,l=Symbol.for("react.element"),s=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),g=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),fe=Symbol.iterator,qe="@@iterator";function Qe(e){if(e===null||typeof e!="object")return null;var t=fe&&e[fe]||e[qe];return typeof t=="function"?t:null}var I=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var t=arguments.length,a=new Array(t>1?t-1:0),i=1;i<t;i++)a[i-1]=arguments[i];et("error",e,a)}}function et(e,t,a){{var i=I.ReactDebugCurrentFrame,m=i.getStackAddendum();m!==""&&(t+="%s",a=a.concat([m]));var h=a.map(function(f){return String(f)});h.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,h)}}var tt=!1,rt=!1,at=!1,nt=!1,ot=!1,pe;pe=Symbol.for("react.module.reference");function it(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===n||ot||e===d||e===T||e===R||nt||e===D||tt||rt||at||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===j||e.$$typeof===_||e.$$typeof===g||e.$$typeof===v||e.$$typeof===pe||e.getModuleId!==void 0))}function lt(e,t,a){var i=e.displayName;if(i)return i;var m=t.displayName||t.name||"";return m!==""?a+"("+m+")":a}function de(e){return e.displayName||"Context"}function O(e){if(e==null)return null;if(typeof e.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case s:return"Portal";case n:return"Profiler";case d:return"StrictMode";case T:return"Suspense";case R:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case g:var t=e;return de(t)+".Consumer";case _:var a=e;return de(a._context)+".Provider";case v:return lt(e,e.render,"ForwardRef");case j:var i=e.displayName||null;return i!==null?i:O(e.type)||"Memo";case S:{var m=e,h=m._payload,f=m._init;try{return O(f(h))}catch{return null}}}return null}var F=Object.assign,B=0,me,he,_e,ve,ke,be,ge;function Ne(){}Ne.__reactDisabledLog=!0;function st(){{if(B===0){me=console.log,he=console.info,_e=console.warn,ve=console.error,ke=console.group,be=console.groupCollapsed,ge=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ne,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}B++}}function ct(){{if(B--,B===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},e,{value:me}),info:F({},e,{value:he}),warn:F({},e,{value:_e}),error:F({},e,{value:ve}),group:F({},e,{value:ke}),groupCollapsed:F({},e,{value:be}),groupEnd:F({},e,{value:ge})})}B<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=I.ReactCurrentDispatcher,X;function L(e,t,a){{if(X===void 0)try{throw Error()}catch(m){var i=m.stack.trim().match(/\n( *(at )?)/);X=i&&i[1]||""}return`
|
|
18
18
|
`+X+e}}var Z=!1,V;{var ut=typeof WeakMap=="function"?WeakMap:Map;V=new ut}function ye(e,t){if(!e||Z)return"";{var a=V.get(e);if(a!==void 0)return a}var i;Z=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var h;h=K.current,K.current=null,st();try{if(t){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(C){i=C}Reflect.construct(e,[],f)}else{try{f.call()}catch(C){i=C}e.call(f.prototype)}}else{try{throw Error()}catch(C){i=C}e()}}catch(C){if(C&&i&&typeof C.stack=="string"){for(var u=C.stack.split(`
|
|
19
19
|
`),w=i.stack.split(`
|
|
20
|
-
`),k=u.length-1,
|
|
21
|
-
`+u[k].replace(" at new "," at ");return e.displayName&&x.includes("<anonymous>")&&(x=x.replace("<anonymous>",e.displayName)),typeof e=="function"&&V.set(e,x),x}while(k>=1&&
|
|
20
|
+
`),k=u.length-1,N=w.length-1;k>=1&&N>=0&&u[k]!==w[N];)N--;for(;k>=1&&N>=0;k--,N--)if(u[k]!==w[N]){if(k!==1||N!==1)do if(k--,N--,N<0||u[k]!==w[N]){var x=`
|
|
21
|
+
`+u[k].replace(" at new "," at ");return e.displayName&&x.includes("<anonymous>")&&(x=x.replace("<anonymous>",e.displayName)),typeof e=="function"&&V.set(e,x),x}while(k>=1&&N>=0);break}}}finally{Z=!1,K.current=h,ct(),Error.prepareStackTrace=m}var $=e?e.displayName||e.name:"",Ie=$?L($):"";return typeof e=="function"&&V.set(e,Ie),Ie}function ft(e,t,a){return ye(e,!1)}function pt(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function U(e,t,a){if(e==null)return"";if(typeof e=="function")return ye(e,pt(e));if(typeof e=="string")return L(e);switch(e){case T:return L("Suspense");case R:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case v:return ft(e.render);case j:return U(e.type,t,a);case S:{var i=e,m=i._payload,h=i._init;try{return U(h(m),t,a)}catch{}}}return""}var G=Object.prototype.hasOwnProperty,Re={},Ee=I.ReactDebugCurrentFrame;function z(e){if(e){var t=e._owner,a=U(e.type,e._source,t?t.type:null);Ee.setExtraStackFrame(a)}else Ee.setExtraStackFrame(null)}function dt(e,t,a,i,m){{var h=Function.call.bind(G);for(var f in e)if(h(e,f)){var u=void 0;try{if(typeof e[f]!="function"){var w=Error((i||"React class")+": "+a+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw w.name="Invariant Violation",w}u=e[f](t,f,i,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(k){u=k}u&&!(u instanceof Error)&&(z(m),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",i||"React class",a,f,typeof u),z(null)),u instanceof Error&&!(u.message in Re)&&(Re[u.message]=!0,z(m),E("Failed %s type: %s",a,u.message),z(null))}}}var mt=Array.isArray;function q(e){return mt(e)}function ht(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,a=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a}}function _t(e){try{return we(e),!1}catch{return!0}}function we(e){return""+e}function Pe(e){if(_t(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ht(e)),we(e)}var M=I.ReactCurrentOwner,vt={key:!0,ref:!0,__self:!0,__source:!0},Te,xe,Q;Q={};function kt(e){if(G.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function bt(e){if(G.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function gt(e,t){if(typeof e.ref=="string"&&M.current&&t&&M.current.stateNode!==t){var a=O(M.current.type);Q[a]||(E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',O(M.current.type),e.ref),Q[a]=!0)}}function Nt(e,t){{var a=function(){Te||(Te=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}}function yt(e,t){{var a=function(){xe||(xe=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};a.isReactWarning=!0,Object.defineProperty(e,"ref",{get:a,configurable:!0})}}var Rt=function(e,t,a,i,m,h,f){var u={$$typeof:l,type:e,key:t,ref:a,props:f,_owner:h};return u._store={},Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:m}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u};function Et(e,t,a,i,m){{var h,f={},u=null,w=null;a!==void 0&&(Pe(a),u=""+a),bt(t)&&(Pe(t.key),u=""+t.key),kt(t)&&(w=t.ref,gt(t,m));for(h in t)G.call(t,h)&&!vt.hasOwnProperty(h)&&(f[h]=t[h]);if(e&&e.defaultProps){var k=e.defaultProps;for(h in k)f[h]===void 0&&(f[h]=k[h])}if(u||w){var N=typeof e=="function"?e.displayName||e.name||"Unknown":e;u&&Nt(f,N),w&&yt(f,N)}return Rt(e,u,w,m,i,M.current,f)}}var ee=I.ReactCurrentOwner,je=I.ReactDebugCurrentFrame;function A(e){if(e){var t=e._owner,a=U(e.type,e._source,t?t.type:null);je.setExtraStackFrame(a)}else je.setExtraStackFrame(null)}var te;te=!1;function re(e){return typeof e=="object"&&e!==null&&e.$$typeof===l}function Se(){{if(ee.current){var e=O(ee.current.type);if(e)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function wt(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),a=e.lineNumber;return`
|
|
24
24
|
|
|
25
25
|
Check your code at `+t+":"+a+"."}return""}}var Oe={};function Pt(e){{var t=Se();if(!t){var a=typeof e=="string"?e:e.displayName||e.name;a&&(t=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+a+">.")}return t}}function Ce(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=Pt(t);if(Oe[a])return;Oe[a]=!0;var i="";e&&e._owner&&e._owner!==ee.current&&(i=" It was passed a child from "+O(e._owner.type)+"."),A(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',a,i),A(null)}}function Fe(e,t){{if(typeof e!="object")return;if(q(e))for(var a=0;a<e.length;a++){var i=e[a];re(i)&&Ce(i,t)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var m=Qe(e);if(typeof m=="function"&&m!==e.entries)for(var h=m.call(e),f;!(f=h.next()).done;)re(f.value)&&Ce(f.value,t)}}}function Tt(e){{var t=e.type;if(t==null||typeof t=="string")return;var a;if(typeof t=="function")a=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===v||t.$$typeof===j))a=t.propTypes;else return;if(a){var i=O(t);dt(a,e.props,"prop",i,e)}else if(t.PropTypes!==void 0&&!te){te=!0;var m=O(t);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",m||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xt(e){{for(var t=Object.keys(e.props),a=0;a<t.length;a++){var i=t[a];if(i!=="children"&&i!=="key"){A(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",i),A(null);break}}e.ref!==null&&(A(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function De(e,t,a,i,m,h){{var f=it(e);if(!f){var u="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var w=wt(m);w?u+=w:u+=Se();var k;e===null?k="null":q(e)?k="array":e!==void 0&&e.$$typeof===l?(k="<"+(O(e.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):k=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",k,u)}var g=Et(e,t,a,m,h);if(g==null)return g;if(f){var x=t.children;if(x!==void 0)if(i)if(q(x)){for(var $=0;$<x.length;$++)Fe(x[$],e);Object.freeze&&Object.freeze(x)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Fe(x,e)}return e===c?xt(g):Tt(g),g}}function jt(e,t,a){return De(e,t,a,!0)}function St(e,t,a){return De(e,t,a,!1)}var Ot=St,Ct=jt;Y.Fragment=c,Y.jsx=Ot,Y.jsxs=Ct}()),Y}process.env.NODE_ENV==="production"?H.exports=$e():H.exports=We();var J=H.exports;const oe=J.Fragment,r=J.jsx,p=J.jsxs,y=({className:o,name:l,viewBox:s="0 0 32 32",...c})=>{const d=[o].filter(Boolean).join(" ");return r("svg",{...c,className:d,viewBox:s,children:r("use",{href:`#${l}`})})},Ye=P.forwardRef(({children:o,className:l,skin:s="info",closeAlert:c=!1,onClose:d,title:n,date:_,ariaLive:N="polite",...v},T)=>{const R=[l,"pkt-alert",s&&`pkt-alert--${s}`].filter(Boolean).join(" "),[j,S]=P.useState(!0),D=()=>{S(!1),d&&d()};return j?p("div",{...v,className:R,"aria-live":N,ref:T,children:[r("div",{className:"pkt-alert__icon",children:r(y,{name:s==="info"?"alert-information":`alert-${s}`})}),c&&r("div",{className:"pkt-alert__close",children:r("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:D,children:r(y,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),n&&r("div",{className:"pkt-alert__title",children:n}),r("div",{className:"pkt-alert__text",children:o}),_&&p("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",_]})]}):null}),ie=P.forwardRef(({children:o,className:l,iconName:s="user",secondIconName:c="user",size:d="medium",skin:n="primary",type:_="button",variant:N="label-only",...v},T)=>{const R=[l,"pkt-btn",d&&`pkt-btn--${d}`,n&&`pkt-btn--${n}`,N&&`pkt-btn--${N}`].filter(Boolean).join(" ");return p("button",{...v,className:R,type:_,ref:T,children:[r(y,{className:"pkt-btn__icon",name:s}),r("span",{className:"pkt-btn__text",children:o}),N==="icons-right-and-left"&&r(y,{className:"pkt-btn__icon",name:c})]})});ie.displayName="PktButton";const Be=({columnOne:o,columnTwo:l,socialLinks:s})=>{var c,d;return r("footer",{className:"pkt-footer","data-mode":"dark",children:p("div",{className:"pkt-footer__container",children:[p("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[p("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[r("h2",{className:"pkt-footer__title",children:o.title}),p("ul",{className:"pkt-footer__list",children:[o.text&&r("li",{className:"pkt-footer__text",children:o.text}),(c=o.links)==null?void 0:c.map((n,_)=>r("li",{className:"pkt-footer__list-item",children:p("a",{className:`pkt-footer__link ${n.external?"pkt-link--external":""}`,href:n.href,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:[r(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),n.text]})},`links-${_}`))]})]}),p("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[r("h2",{className:"pkt-footer__title",children:l.title}),p("ul",{className:"pkt-footer__list",children:[l.text&&r("li",{className:"pkt-footer__text",children:l.text}),(d=l.links)==null?void 0:d.map((n,_)=>r("li",{className:"pkt-footer__list-item",children:p("a",{className:`pkt-footer__link ${n.external?"pkt-link--external":""}`,href:n.href,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:[r(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),n.text]})},`links-${_}`))]})]}),p("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[r("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),p("ul",{className:"pkt-footer__list",children:[r("li",{className:"pkt-footer__list-item",children:p("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[r(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),r("li",{className:"pkt-footer__list-item",children:p("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[r(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),s&&p("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[r("div",{className:"pkt-footer__social-languages",children:s.filter(n=>n.language).map((n,_)=>r("div",{className:"pkt-footer__social-language",children:r("a",{href:n.href,"aria-label":`til ${n.language} versjon av nettsiden`,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:n.language})},`sociallinks-language-${_}`))}),r("div",{className:"pkt-footer__social-icons",children:s.filter(n=>n.iconName).map((n,_)=>r(P.Fragment,{children:r("a",{href:n.href,"aria-label":`til ${n.iconName}`,className:"pkt-footer__social-icon-link",target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:r("svg",{className:"pkt-footer__social-icon",viewBox:"0 0 32 32","aria-hidden":"true",children:r("use",{href:`#${n.iconName}`})})})},`sociallinks-${_}`))})]})]})})},Me=({links:o=[]})=>r("footer",{className:"pkt-footer-simple","data-mode":"dark",children:r("div",{className:"pkt-footer-simple__container",children:p("ul",{className:"pkt-footer-simple__list",children:[o.map((l,s)=>r("li",{className:"pkt-footer-simple__list-item",children:p("a",{className:`pkt-footer-simple__link ${l.external?" pkt-link--external":""}`,href:l.href,target:l.openInNewTab?"_blank":"_self",rel:l.openInNewTab?"noopener noreferrer":void 0,children:[r(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),l.text]})},s)),r("li",{className:"pkt-footer-simple__list-item",children:p("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[r(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),r("li",{className:"pkt-footer-simple__list-item",children:p("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[r(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})}),Le=({className:o,logoLink:l="https://www.oslo.kommune.no/",isLoggedIn:s=!1,representing:c="",canChangeRepresentation:d=!1,showLogInButton:n=!0,onLogIn:_,onLogOut:N,onChangeRepresentation:v})=>{const T=[o,"pkt-header"].filter(Boolean).join(" ");return p("header",{id:"pkt-header",className:T,"aria-label":"Topp",children:[r("div",{className:"pkt-header__logo",children:r("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:l,children:r(y,{name:"oslologo",className:"pkt-header__logo-svg",viewBox:"0 0 60 31","aria-hidden":"true"})})}),p("div",{className:"pkt-header__actions",children:[s&&d&&p("button",{className:"pkt-btn pkt-btn--secondary pkt-btn--icon-right","aria-label":`Bytt bruker fra ${c}`,onClick:v,children:[r(y,{name:"user",className:"pkt-btn__icon pkt-show-tablet-up"}),r("span",{className:"pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15",children:"Endre"}),r("span",{className:"pkt-btn__text pkt-hide-tablet-up",children:"Endre"}),r("span",{className:"pkt-btn__text--representing pkt-hide pkt-show-tablet-up",children:c})]}),s&&!d&&p("div",{className:"pkt-header__action",children:[r("span",{className:"pkt-header__action-text",children:r("span",{className:"pkt-btn__text pkt-header__action-textrow text-row-inline pkt-truncate-text",children:c})}),r("span",{className:"pkt-header__action-icon pkt-show-phablet-up",children:r(y,{name:"user"})})]}),n&&s&&p("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg ut",onClick:N,children:[r(y,{className:"pkt-btn__icon pkt-show-tablet-up",name:"exit"}),r("span",{className:"pkt-btn__text",children:"Logg ut"})]}),n&&!s&&p("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg inn",onClick:_,children:[r(y,{className:"pkt-btn__icon",name:"user"}),r("span",{className:"pkt-btn__text",children:"Logg inn"})]})]})]})},le=P.forwardRef(({label:o,id:l,children:s,...c},d)=>p("div",{className:"pkt-form-group",children:[r("label",{htmlFor:l,className:"pkt-form-label",children:o}),r("input",{className:"pkt-form-input",id:l,...c,ref:d}),s]}));le.displayName="PktInput";const Ve=({children:o,className:l,iconName:s="user",skin:c="",href:d="#",title:n})=>{const _=[l,"pkt-linkcard",c&&`pkt-linkcard--${c}`].filter(Boolean).join(" ");return p("a",{href:d,className:`pkt-linkcard pkt-link ${_}`,children:[r(y,{className:"pkt-link__icon",name:s}),p("div",{className:"pkt-linkcard__content",children:[r("div",{className:"pkt-linkcard__title",children:n}),r("div",{className:"pkt-linkcard__text",children:o})]})]})},Ue=({children:o,skin:l="beige",title:s,...c})=>{const d=["pkt-messagebox",l&&`pkt-messagebox--${l}`].filter(Boolean).join(" ");return p("div",{...c,className:d,children:[r("div",{className:"pkt-messagebox__title",children:s}),r("div",{className:"pkt-messagebox__text",children:o})]})},se=P.forwardRef(({id:o,name:l,label:s,value:c,...d},n)=>p("div",{className:"pkt-form-group",children:[r("input",{type:"radio",className:"pkt-form-check-input",id:o,name:l,value:c,ref:n,...d}),r("label",{className:"pkt-form-label",htmlFor:o,children:s})]}));se.displayName="PktRadio";const Ge=({label:o,children:l})=>p(oe,{children:[r("p",{children:o}),r("div",{className:"pkt-form-group",children:l})]});var ce={exports:{}};/*!
|
|
27
|
+
Check the top-level render call using <`+a+">.")}return t}}function Ce(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=Pt(t);if(Oe[a])return;Oe[a]=!0;var i="";e&&e._owner&&e._owner!==ee.current&&(i=" It was passed a child from "+O(e._owner.type)+"."),A(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',a,i),A(null)}}function Fe(e,t){{if(typeof e!="object")return;if(q(e))for(var a=0;a<e.length;a++){var i=e[a];re(i)&&Ce(i,t)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var m=Qe(e);if(typeof m=="function"&&m!==e.entries)for(var h=m.call(e),f;!(f=h.next()).done;)re(f.value)&&Ce(f.value,t)}}}function Tt(e){{var t=e.type;if(t==null||typeof t=="string")return;var a;if(typeof t=="function")a=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===v||t.$$typeof===j))a=t.propTypes;else return;if(a){var i=O(t);dt(a,e.props,"prop",i,e)}else if(t.PropTypes!==void 0&&!te){te=!0;var m=O(t);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",m||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xt(e){{for(var t=Object.keys(e.props),a=0;a<t.length;a++){var i=t[a];if(i!=="children"&&i!=="key"){A(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",i),A(null);break}}e.ref!==null&&(A(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function De(e,t,a,i,m,h){{var f=it(e);if(!f){var u="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var w=wt(m);w?u+=w:u+=Se();var k;e===null?k="null":q(e)?k="array":e!==void 0&&e.$$typeof===l?(k="<"+(O(e.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):k=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",k,u)}var N=Et(e,t,a,m,h);if(N==null)return N;if(f){var x=t.children;if(x!==void 0)if(i)if(q(x)){for(var $=0;$<x.length;$++)Fe(x[$],e);Object.freeze&&Object.freeze(x)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Fe(x,e)}return e===c?xt(N):Tt(N),N}}function jt(e,t,a){return De(e,t,a,!0)}function St(e,t,a){return De(e,t,a,!1)}var Ot=St,Ct=jt;Y.Fragment=c,Y.jsx=Ot,Y.jsxs=Ct}()),Y}process.env.NODE_ENV==="production"?H.exports=$e():H.exports=We();var J=H.exports;const oe=J.Fragment,r=J.jsx,p=J.jsxs,y=({className:o,name:l,viewBox:s="0 0 32 32",...c})=>{const d=[o].filter(Boolean).join(" ");return r("svg",{...c,className:d,viewBox:s,children:r("use",{href:`#${l}`})})},Ye=P.forwardRef(({children:o,className:l,skin:s="info",closeAlert:c=!1,onClose:d,title:n,date:_,ariaLive:g="polite",...v},T)=>{const R=[l,"pkt-alert",s&&`pkt-alert--${s}`].filter(Boolean).join(" "),[j,S]=P.useState(!0),D=()=>{S(!1),d&&d()};return j?p("div",{...v,className:R,"aria-live":g,ref:T,children:[r("div",{className:"pkt-alert__icon",children:r(y,{name:s==="info"?"alert-information":`alert-${s}`})}),c&&r("div",{className:"pkt-alert__close",children:r("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:D,children:r(y,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),n&&r("div",{className:"pkt-alert__title",children:n}),r("div",{className:"pkt-alert__text",children:o}),_&&p("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",_]})]}):null}),ie=P.forwardRef(({children:o,className:l,iconName:s="user",secondIconName:c="user",size:d="medium",skin:n="primary",type:_="button",variant:g="label-only",...v},T)=>{const R=[l,"pkt-btn",d&&`pkt-btn--${d}`,n&&`pkt-btn--${n}`,g&&`pkt-btn--${g}`].filter(Boolean).join(" ");return p("button",{...v,className:R,type:_,ref:T,children:[r(y,{className:"pkt-btn__icon",name:s}),r("span",{className:"pkt-btn__text",children:o}),g==="icons-right-and-left"&&r(y,{className:"pkt-btn__icon",name:c})]})});ie.displayName="PktButton";const Be=({columnOne:o,columnTwo:l,socialLinks:s})=>{var c,d;return r("footer",{className:"pkt-footer","data-mode":"dark",children:p("div",{className:"pkt-footer__container",children:[p("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[p("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[r("h2",{className:"pkt-footer__title",children:o.title}),p("ul",{className:"pkt-footer__list",children:[o.text&&r("li",{className:"pkt-footer__text",children:o.text}),(c=o.links)==null?void 0:c.map((n,_)=>r("li",{className:"pkt-footer__list-item",children:p("a",{className:`pkt-footer__link ${n.external?"pkt-link--external":""}`,href:n.href,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:[r(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),n.text]})},`links-${_}`))]})]}),p("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[r("h2",{className:"pkt-footer__title",children:l.title}),p("ul",{className:"pkt-footer__list",children:[l.text&&r("li",{className:"pkt-footer__text",children:l.text}),(d=l.links)==null?void 0:d.map((n,_)=>r("li",{className:"pkt-footer__list-item",children:p("a",{className:`pkt-footer__link ${n.external?"pkt-link--external":""}`,href:n.href,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:[r(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),n.text]})},`links-${_}`))]})]}),p("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[r("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),p("ul",{className:"pkt-footer__list",children:[r("li",{className:"pkt-footer__list-item",children:p("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[r(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),r("li",{className:"pkt-footer__list-item",children:p("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[r(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),s&&p("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[r("div",{className:"pkt-footer__social-languages",children:s.filter(n=>n.language).map((n,_)=>r("div",{className:"pkt-footer__social-language",children:r("a",{href:n.href,"aria-label":`til ${n.language} versjon av nettsiden`,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:n.language})},`sociallinks-language-${_}`))}),r("div",{className:"pkt-footer__social-icons",children:s.filter(n=>n.iconName).map((n,_)=>r(P.Fragment,{children:r("a",{href:n.href,"aria-label":`til ${n.iconName}`,className:"pkt-footer__social-icon-link",target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:r("svg",{className:"pkt-footer__social-icon",viewBox:"0 0 32 32","aria-hidden":"true",children:r("use",{href:`#${n.iconName}`})})})},`sociallinks-${_}`))})]})]})})},Me=({links:o=[]})=>r("footer",{className:"pkt-footer-simple","data-mode":"dark",children:r("div",{className:"pkt-footer-simple__container",children:p("ul",{className:"pkt-footer-simple__list",children:[o.map((l,s)=>r("li",{className:"pkt-footer-simple__list-item",children:p("a",{className:`pkt-footer-simple__link ${l.external?" pkt-link--external":""}`,href:l.href,target:l.openInNewTab?"_blank":"_self",rel:l.openInNewTab?"noopener noreferrer":void 0,children:[r(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),l.text]})},s)),r("li",{className:"pkt-footer-simple__list-item",children:p("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[r(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),r("li",{className:"pkt-footer-simple__list-item",children:p("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[r(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})}),Le=({className:o,logoLink:l="https://www.oslo.kommune.no/",isLoggedIn:s=!1,representing:c="",canChangeRepresentation:d=!1,showLogInButton:n=!0,onLogIn:_,onLogOut:g,onChangeRepresentation:v})=>{const T=[o,"pkt-header"].filter(Boolean).join(" ");return p("header",{id:"pkt-header",className:T,"aria-label":"Topp",children:[r("div",{className:"pkt-header__logo",children:r("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:l,children:r(y,{name:"oslologo",className:"pkt-header__logo-svg",viewBox:"0 0 60 31","aria-hidden":"true"})})}),p("div",{className:"pkt-header__actions",children:[s&&d&&p("button",{className:"pkt-btn pkt-btn--secondary pkt-btn--icon-right","aria-label":`Bytt bruker fra ${c}`,onClick:v,children:[r(y,{name:"user",className:"pkt-btn__icon pkt-show-tablet-up"}),r("span",{className:"pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15",children:"Endre"}),r("span",{className:"pkt-btn__text pkt-hide-tablet-up",children:"Endre"}),r("span",{className:"pkt-btn__text--representing pkt-hide pkt-show-tablet-up",children:c})]}),s&&!d&&p("div",{className:"pkt-header__action",children:[r("span",{className:"pkt-header__action-text",children:r("span",{className:"pkt-btn__text pkt-header__action-textrow text-row-inline pkt-truncate-text",children:c})}),r("span",{className:"pkt-header__action-icon pkt-show-phablet-up",children:r(y,{name:"user"})})]}),n&&s&&p("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg ut",onClick:g,children:[r(y,{className:"pkt-btn__icon pkt-show-tablet-up",name:"exit"}),r("span",{className:"pkt-btn__text",children:"Logg ut"})]}),n&&!s&&p("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg inn",onClick:_,children:[r(y,{className:"pkt-btn__icon",name:"user"}),r("span",{className:"pkt-btn__text",children:"Logg inn"})]})]})]})},le=P.forwardRef(({label:o,id:l,children:s,...c},d)=>p("div",{className:"pkt-form-group",children:[r("label",{htmlFor:l,className:"pkt-form-label",children:o}),r("input",{className:"pkt-form-input",id:l,...c,ref:d}),s]}));le.displayName="PktInput";const Ve=({children:o,className:l,iconName:s="user",openInNewTab:c=!1,skin:d="",href:n="#",title:_})=>{const g=[l,"pkt-linkcard",d&&`pkt-linkcard--${d}`].filter(Boolean).join(" ");return p("a",{href:n,className:`pkt-linkcard pkt-link ${g}`,target:c?"_blank":"_self",rel:c?"noopener noreferrer":void 0,children:[r(y,{className:"pkt-link__icon",name:s}),p("div",{className:"pkt-linkcard__content",children:[r("div",{className:"pkt-linkcard__title",children:_}),r("div",{className:"pkt-linkcard__text",children:o})]})]})},Ue=({children:o,skin:l="beige",title:s,...c})=>{const d=["pkt-messagebox",l&&`pkt-messagebox--${l}`].filter(Boolean).join(" ");return p("div",{...c,className:d,children:[r("div",{className:"pkt-messagebox__title",children:s}),r("div",{className:"pkt-messagebox__text",children:o})]})},se=P.forwardRef(({id:o,name:l,label:s,value:c,...d},n)=>p("div",{className:"pkt-form-group",children:[r("input",{type:"radio",className:"pkt-form-check-input",id:o,name:l,value:c,ref:n,...d}),r("label",{className:"pkt-form-label",htmlFor:o,children:s})]}));se.displayName="PktRadio";const Ge=({label:o,children:l})=>p(oe,{children:[r("p",{children:o}),r("div",{className:"pkt-form-group",children:l})]});var ce={exports:{}};/*!
|
|
28
28
|
Copyright (c) 2018 Jed Watson.
|
|
29
29
|
Licensed under the MIT License (MIT), see
|
|
30
30
|
http://jedwatson.github.io/classnames
|
|
31
|
-
*/(function(o){(function(){var l={}.hasOwnProperty;function s(){for(var c=[],d=0;d<arguments.length;d++){var n=arguments[d];if(n){var _=typeof n;if(_==="string"||_==="number")c.push(n);else if(Array.isArray(n)){if(n.length){var
|
|
31
|
+
*/(function(o){(function(){var l={}.hasOwnProperty;function s(){for(var c=[],d=0;d<arguments.length;d++){var n=arguments[d];if(n){var _=typeof n;if(_==="string"||_==="number")c.push(n);else if(Array.isArray(n)){if(n.length){var g=s.apply(null,n);g&&c.push(g)}}else if(_==="object"){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){c.push(n.toString());continue}for(var v in n)l.call(n,v)&&n[v]&&c.push(v)}}}return c.join(" ")}o.exports?(s.default=s,o.exports=s):window.classNames=s})()})(ce);var ze=ce.exports;const He=Ae(ze),Je=({isResponsive:o,children:l})=>o?r("div",{className:"pkt-table-container",children:l}):r(oe,{children:l}),Ke=({isResponsive:o,modifiers:{info:l=!1,success:s=!1,strong:c=!1,shadow:d=!1}={},children:n})=>r(Je,{isResponsive:o,children:r("table",{className:He("pkt-table",{"pkt-table--info":l,"pkt-table--success":s,"pkt-table--strong":c,"pkt-table--shadow":d}),children:n})}),Xe=({children:o})=>r("td",{className:"pkt-table__th",children:o}),Ze=({children:o})=>r("th",{className:"pkt-table__th",children:o}),ue=P.forwardRef(({id:o,label:l,...s},c)=>p("div",{className:"pkt-form-group",children:[r("label",{htmlFor:o,className:"pkt-form-label",children:l}),r("textarea",{className:"pkt-form-textarea",id:o,ref:c,...s})]}));ue.displayName="PktTextarea",b.PktAlert=Ye,b.PktButton=ie,b.PktFooter=Be,b.PktFooterSimple=Me,b.PktHeader=Le,b.PktInput=le,b.PktLinkCard=Ve,b.PktMessagebox=Ue,b.PktRadio=se,b.PktRadioGroup=Ge,b.PktTable=Ke,b.PktTableData=Xe,b.PktTableHeader=Ze,b.PktTextarea=ue,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
91
91
|
},
|
|
92
92
|
"license": "MIT",
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "8e4ba5f90021ff42fbe941c4726ecb58563fed27"
|
|
94
94
|
}
|
|
@@ -11,54 +11,58 @@ export interface IPktAlert extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
11
11
|
ariaLive?: 'off' | 'polite' | 'assertive'
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export const PktAlert = forwardRef(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
export const PktAlert = forwardRef(
|
|
15
|
+
(
|
|
16
|
+
{
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
skin = 'info',
|
|
20
|
+
closeAlert = false,
|
|
21
|
+
onClose,
|
|
22
|
+
title,
|
|
23
|
+
date,
|
|
24
|
+
ariaLive = 'polite',
|
|
25
|
+
...props
|
|
26
|
+
}: IPktAlert,
|
|
27
|
+
ref: ForwardedRef<HTMLDivElement>,
|
|
28
|
+
) => {
|
|
29
|
+
const classes = [className, 'pkt-alert', skin && `pkt-alert--${skin}`].filter(Boolean).join(' ')
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
const [isDisplayed, setIsDisplayed] = useState(true)
|
|
28
32
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
const handleClose = () => {
|
|
34
|
+
setIsDisplayed(false)
|
|
35
|
+
if (onClose) {
|
|
36
|
+
onClose()
|
|
37
|
+
}
|
|
33
38
|
}
|
|
34
|
-
}
|
|
35
39
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
{closeAlert && (
|
|
43
|
-
<div className="pkt-alert__close">
|
|
44
|
-
<button
|
|
45
|
-
|
|
46
|
-
className="pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only"
|
|
47
|
-
tabIndex={0}
|
|
48
|
-
aria-label="close"
|
|
49
|
-
onClick={handleClose}
|
|
50
|
-
>
|
|
51
|
-
<PktIcon name="close" className="pkt-btn__icon" aria-hidden="true" />
|
|
52
|
-
</button>
|
|
40
|
+
return isDisplayed ? (
|
|
41
|
+
<div {...props} className={classes} aria-live={ariaLive} ref={ref}>
|
|
42
|
+
<div className="pkt-alert__icon">
|
|
43
|
+
<PktIcon name={skin === 'info' ? 'alert-information' : `alert-${skin}`} />
|
|
53
44
|
</div>
|
|
54
|
-
)}
|
|
55
45
|
|
|
56
|
-
|
|
46
|
+
{closeAlert && (
|
|
47
|
+
<div className="pkt-alert__close">
|
|
48
|
+
<button
|
|
49
|
+
type="button"
|
|
50
|
+
className="pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only"
|
|
51
|
+
tabIndex={0}
|
|
52
|
+
aria-label="close"
|
|
53
|
+
onClick={handleClose}
|
|
54
|
+
>
|
|
55
|
+
<PktIcon name="close" className="pkt-btn__icon" aria-hidden="true" />
|
|
56
|
+
</button>
|
|
57
|
+
</div>
|
|
58
|
+
)}
|
|
57
59
|
|
|
58
|
-
|
|
60
|
+
{title && <div className="pkt-alert__title">{title}</div>}
|
|
59
61
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
<div className="pkt-alert__text">{children}</div>
|
|
63
|
+
|
|
64
|
+
{date && <div className="pkt-alert__date">Sist oppdatert: {date}</div>}
|
|
65
|
+
</div>
|
|
66
|
+
) : null
|
|
67
|
+
},
|
|
64
68
|
)
|
|
@@ -10,20 +10,25 @@ export interface IPktButton extends React.ButtonHTMLAttributes<HTMLButtonElement
|
|
|
10
10
|
skin?: 'primary' | 'secondary' | 'tertiary'
|
|
11
11
|
variant?: 'label-only' | 'icon-left' | 'icon-right' | 'icon-only' | 'icons-right-and-left'
|
|
12
12
|
state?: 'normal' | 'focus' | 'hover' | 'active'
|
|
13
|
+
type?: 'button' | 'submit' | 'reset'
|
|
13
14
|
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
export const PktButton = forwardRef(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
17
|
+
export const PktButton = forwardRef(
|
|
18
|
+
(
|
|
19
|
+
{
|
|
20
|
+
children,
|
|
21
|
+
className,
|
|
22
|
+
iconName = 'user',
|
|
23
|
+
secondIconName = 'user',
|
|
24
|
+
size = 'medium',
|
|
25
|
+
skin = 'primary',
|
|
26
|
+
type = 'button',
|
|
27
|
+
variant = 'label-only',
|
|
28
|
+
...props
|
|
29
|
+
}: IPktButton,
|
|
30
|
+
ref: ForwardedRef<HTMLButtonElement>,
|
|
31
|
+
) => {
|
|
27
32
|
const classes = [
|
|
28
33
|
className,
|
|
29
34
|
'pkt-btn',
|
|
@@ -43,8 +48,7 @@ export const PktButton = forwardRef(({
|
|
|
43
48
|
)}
|
|
44
49
|
</button>
|
|
45
50
|
)
|
|
46
|
-
}
|
|
51
|
+
},
|
|
47
52
|
)
|
|
48
53
|
|
|
49
|
-
PktButton.displayName = 'PktButton'
|
|
50
|
-
|
|
54
|
+
PktButton.displayName = 'PktButton'
|
|
@@ -7,19 +7,23 @@ export interface IPktLinkCard extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
title?: string
|
|
8
8
|
href?: string
|
|
9
9
|
iconName?: string
|
|
10
|
+
openInNewTab?: boolean
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
export const PktLinkCard: React.FC<IPktLinkCard> = ({
|
|
13
14
|
children,
|
|
14
15
|
className,
|
|
15
16
|
iconName = 'user',
|
|
17
|
+
openInNewTab = false,
|
|
16
18
|
skin = '',
|
|
17
19
|
href = '#',
|
|
18
20
|
title,
|
|
19
21
|
}) => {
|
|
20
22
|
const classes = [className, 'pkt-linkcard', skin && `pkt-linkcard--${skin}`].filter(Boolean).join(' ')
|
|
21
23
|
return (
|
|
22
|
-
<a href={href} className={`pkt-linkcard pkt-link ${classes}`}
|
|
24
|
+
<a href={href} className={`pkt-linkcard pkt-link ${classes}`}
|
|
25
|
+
target={openInNewTab ? '_blank' : '_self'}
|
|
26
|
+
rel={openInNewTab ? 'noopener noreferrer' : undefined}>
|
|
23
27
|
<PktIcon className="pkt-link__icon" name={iconName}></PktIcon>
|
|
24
28
|
<div className="pkt-linkcard__content">
|
|
25
29
|
<div className="pkt-linkcard__title">{title}</div>
|