@altinn/altinn-components 0.61.0 → 0.61.2
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/dist/assets/HeaderLogo.css +1 -1
- package/dist/components/Footer/FooterLogo.js +1 -1
- package/dist/components/GlobalHeader/HeaderLogo.js +1 -1
- package/dist/components/GlobalMenu/GlobalMenu.js +57 -40
- package/dist/components/Layout/Layout.js +27 -29
- package/dist/components/Logo/index.js +4 -0
- package/dist/components/Pagination/Pagination.js +13 -13
- package/dist/components/index.js +355 -377
- package/dist/index.js +365 -387
- package/dist/types/lib/components/Account/Account.stories.d.ts +0 -3
- package/dist/types/lib/components/Dialog/DialogLayout.d.ts +7 -2
- package/dist/types/lib/components/GlobalHeader/GlobalHeader.stories.d.ts +5 -4
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +9 -12
- package/dist/types/lib/components/Layout/Layout.d.ts +2 -4
- package/dist/types/lib/components/Layout/Layout.stories.d.ts +2 -8
- package/dist/types/lib/components/Logo/index.d.ts +1 -0
- package/dist/types/lib/components/Page/PageNav.d.ts +5 -2
- package/dist/types/lib/components/Pagination/Pagination.d.ts +3 -2
- package/dist/types/lib/components/Pagination/Pagination.stories.d.ts +5 -5
- package/dist/types/lib/components/index.d.ts +2 -2
- package/dist/types/lib/stories/Inbox.stories.d.ts +0 -4
- package/package.json +1 -1
- package/dist/Globe-BcPkcH4E.js +0 -24
- package/dist/PadlockLocked-XL1IB5Ae.js +0 -24
- package/dist/assets/EndUserLabel.css +0 -1
- package/dist/assets/GlobalMenuButton2.css +0 -1
- package/dist/assets/Header.css +0 -1
- package/dist/assets/HeaderBase.css +0 -1
- package/dist/assets/HeaderButton.css +0 -1
- package/dist/assets/HeaderGroup.css +0 -1
- package/dist/assets/HeaderLogo2.css +0 -1
- package/dist/assets/HeaderSearch.css +0 -1
- package/dist/assets/LocaleButton.css +0 -1
- package/dist/components/GlobalMenu_old/BackButton.js +0 -13
- package/dist/components/GlobalMenu_old/CurrentAccount.js +0 -24
- package/dist/components/GlobalMenu_old/EndUserLabel.js +0 -32
- package/dist/components/GlobalMenu_old/GlobalMenu.js +0 -81
- package/dist/components/GlobalMenu_old/GlobalMenuBase.js +0 -10
- package/dist/components/GlobalMenu_old/GlobalMenuButton.js +0 -58
- package/dist/components/GlobalMenu_old/LogoutButton.js +0 -14
- package/dist/components/GlobalMenu_old/index.js +0 -14
- package/dist/components/Header/Header.js +0 -101
- package/dist/components/Header/HeaderBase.js +0 -19
- package/dist/components/Header/HeaderButton.js +0 -51
- package/dist/components/Header/HeaderGroup.js +0 -8
- package/dist/components/Header/HeaderLogo.js +0 -17
- package/dist/components/Header/HeaderSearch.js +0 -12
- package/dist/components/Header/LocaleButton.js +0 -29
- package/dist/components/Header/LocaleSwitcher.js +0 -44
- package/dist/components/Header/index.js +0 -18
- package/dist/types/lib/components/GlobalMenu_old/BackButton.d.ts +0 -7
- package/dist/types/lib/components/GlobalMenu_old/CurrentAccount.d.ts +0 -16
- package/dist/types/lib/components/GlobalMenu_old/EndUserLabel.d.ts +0 -5
- package/dist/types/lib/components/GlobalMenu_old/GlobalMenu.d.ts +0 -18
- package/dist/types/lib/components/GlobalMenu_old/GlobalMenuBase.d.ts +0 -15
- package/dist/types/lib/components/GlobalMenu_old/GlobalMenuButton.d.ts +0 -13
- package/dist/types/lib/components/GlobalMenu_old/LogoutButton.d.ts +0 -7
- package/dist/types/lib/components/GlobalMenu_old/index.d.ts +0 -6
- package/dist/types/lib/components/Header/Header.d.ts +0 -18
- package/dist/types/lib/components/Header/Header.stories.d.ts +0 -29
- package/dist/types/lib/components/Header/HeaderBase.d.ts +0 -9
- package/dist/types/lib/components/Header/HeaderButton.d.ts +0 -11
- package/dist/types/lib/components/Header/HeaderButton.stories.d.ts +0 -17
- package/dist/types/lib/components/Header/HeaderGroup.d.ts +0 -7
- package/dist/types/lib/components/Header/HeaderLogo.d.ts +0 -11
- package/dist/types/lib/components/Header/HeaderSearch.d.ts +0 -7
- package/dist/types/lib/components/Header/LocaleButton.d.ts +0 -8
- package/dist/types/lib/components/Header/LocaleSwitcher.d.ts +0 -7
- package/dist/types/lib/components/Header/index.d.ts +0 -8
- package/dist/types/lib/stories/Beta/Beta.stories.d.ts +0 -15
- /package/dist/components/{Header → Logo}/DigdirLogomark.js +0 -0
- /package/dist/types/lib/components/{Header → Logo}/DigdirLogomark.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._logo_1yxnd_1{display:flex;align-items:center;color:currentColor;text-decoration:none;height:3.25rem;min-width:3.25rem;padding:0 .5rem;-webkit-user-select:none;user-select:none}._logo_1yxnd_1:hover{background-color:transparent}._logomark_1yxnd_16{color:#0062b8;width:2rem;height:2rem;margin:0!important}._text_1yxnd_23{font-size:2rem;font-weight:400}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { c as i } from "../../index-p1eeF8LQ.js";
|
|
3
|
-
import { DigdirLogomark as t } from "../
|
|
3
|
+
import { DigdirLogomark as t } from "../Logo/DigdirLogomark.js";
|
|
4
4
|
import '../../assets/FooterLogo.css';const c = "_logo_127g0_1", e = "_symbol_127g0_9", s = {
|
|
5
5
|
logo: c,
|
|
6
6
|
symbol: e
|
|
@@ -7,7 +7,7 @@ import "../Typography/Link.js";
|
|
|
7
7
|
import "react-dom";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
9
|
import { DigdirLogomark as x } from "./DigdirLogomark.js";
|
|
10
|
-
import '../../assets/
|
|
10
|
+
import '../../assets/HeaderLogo.css';const d = "_logo_1yxnd_1", _ = "_logomark_1yxnd_16", f = "_text_1yxnd_23", t = {
|
|
11
11
|
logo: d,
|
|
12
12
|
logomark: _,
|
|
13
13
|
text: f
|
|
@@ -1,63 +1,80 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { M as
|
|
2
|
+
import { jsxs as d, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import s, { forwardRef as y, useState as M, useCallback as k, useEffect as I, useMemo as O } from "react";
|
|
4
|
+
import { M as w } from "../../ToolbarSearch-56Sm2j7P.js";
|
|
5
5
|
import "../../index-p1eeF8LQ.js";
|
|
6
6
|
import "../Typography/Link.js";
|
|
7
7
|
import "../Button/Button.js";
|
|
8
8
|
import "react-dom";
|
|
9
|
-
import { LocaleSwitcher as
|
|
9
|
+
import { LocaleSwitcher as j } from "./LocaleSwitcher.js";
|
|
10
10
|
import "../Snackbar/useSnackbar.js";
|
|
11
11
|
import { MenuListItem as x } from "../Menu/MenuListItem.js";
|
|
12
|
-
import { GlobalMenuBase as
|
|
13
|
-
import { LogoutButton as
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
import { GlobalMenuBase as g, GlobalMenuFooter as S } from "./GlobalMenuBase.js";
|
|
13
|
+
import { LogoutButton as _ } from "./LogoutButton.js";
|
|
14
|
+
import { u as C } from "../../useId-BVFxCjkq.js";
|
|
15
|
+
var E = function(t, i) {
|
|
16
|
+
var r = {};
|
|
17
|
+
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && i.indexOf(e) < 0 && (r[e] = t[e]);
|
|
18
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
19
|
+
for (var o = 0, e = Object.getOwnPropertySymbols(t); o < e.length; o++)
|
|
20
|
+
i.indexOf(e[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[o]) && (r[e[o]] = t[e[o]]);
|
|
21
|
+
return r;
|
|
22
|
+
};
|
|
23
|
+
const L = y((t, i) => {
|
|
24
|
+
var { title: r, titleId: e } = t, o = E(t, ["title", "titleId"]);
|
|
25
|
+
let l = C();
|
|
26
|
+
return l = r ? e || "title-" + l : void 0, s.createElement(
|
|
27
|
+
"svg",
|
|
28
|
+
Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: i, "aria-labelledby": l }, o),
|
|
29
|
+
r ? s.createElement("title", { id: l }, r) : null,
|
|
30
|
+
s.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12m6.74-7.683A8.28 8.28 0 0 0 4.65 8.25h3.719a41 41 0 0 1 .62-3.934m1.63-.452a41 41 0 0 0-.742 4.385h4.245a41 41 0 0 0-.743-4.385 8.3 8.3 0 0 0-2.76 0M8.24 14.25a34.5 34.5 0 0 1 0-4.5H4.06A8.3 8.3 0 0 0 3.75 12c0 .78.108 1.535.31 2.25zm1.503 0a33 33 0 0 1 0-4.5h4.514c.103 1.51.103 2.997 0 4.5zm-.754 5.433a41 41 0 0 1-.62-3.933h-3.72a8.28 8.28 0 0 0 4.34 3.933m1.631.452a41 41 0 0 1-.743-4.385h4.246a41 41 0 0 1-.743 4.385 8.3 8.3 0 0 1-2.76 0m5.141-5.885c.098-1.502.098-2.99 0-4.5h4.179c.202.715.31 1.47.31 2.25a8.3 8.3 0 0 1-.31 2.25zm-.75-9.933a8.28 8.28 0 0 1 4.34 3.933h-3.72a41 41 0 0 0-.62-3.933m0 15.366c.276-1.344.483-2.648.62-3.933h3.72a8.28 8.28 0 0 1-4.34 3.933", clipRule: "evenodd" })
|
|
31
|
+
);
|
|
32
|
+
}), K = ({
|
|
33
|
+
menu: t,
|
|
34
|
+
backLabel: i = "Back",
|
|
35
|
+
onClose: r,
|
|
36
|
+
logoutButton: e,
|
|
37
|
+
ariaLabel: o = "Menu",
|
|
38
|
+
localeSwitcher: l,
|
|
39
|
+
isOpen: f = !1
|
|
23
40
|
}) => {
|
|
24
|
-
const [
|
|
25
|
-
|
|
41
|
+
const [b, p] = M(!1), m = k(() => {
|
|
42
|
+
p((n) => !n);
|
|
26
43
|
}, []);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, [
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
...
|
|
44
|
+
I(() => {
|
|
45
|
+
f || p(!1);
|
|
46
|
+
}, [f]);
|
|
47
|
+
const h = O(() => {
|
|
48
|
+
const n = (t?.items ?? []).map((c) => ({
|
|
49
|
+
...c,
|
|
33
50
|
onClick: () => {
|
|
34
|
-
|
|
51
|
+
c.onClick?.(), r?.();
|
|
35
52
|
},
|
|
36
|
-
items: Array.isArray(
|
|
37
|
-
...
|
|
53
|
+
items: Array.isArray(c.items) ? c.items.map((u) => ({
|
|
54
|
+
...u,
|
|
38
55
|
onClick: () => {
|
|
39
|
-
|
|
56
|
+
u.onClick?.(), r?.();
|
|
40
57
|
}
|
|
41
58
|
})) : void 0
|
|
42
59
|
}));
|
|
43
|
-
if (!
|
|
44
|
-
const
|
|
60
|
+
if (!l) return n;
|
|
61
|
+
const v = {
|
|
45
62
|
title: "Språk/language",
|
|
46
|
-
icon:
|
|
63
|
+
icon: L,
|
|
47
64
|
size: "sm",
|
|
48
|
-
onClick:
|
|
65
|
+
onClick: m,
|
|
49
66
|
linkIcon: !0
|
|
50
67
|
};
|
|
51
|
-
return [...
|
|
52
|
-
}, [
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
] }) : /* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
|
|
68
|
+
return [...n, v];
|
|
69
|
+
}, [t, r, l, m]);
|
|
70
|
+
return b ? /* @__PURE__ */ d(g, { "aria-label": o, children: [
|
|
71
|
+
l && /* @__PURE__ */ a(j, { ...l, backLabel: i, onToggle: m }),
|
|
72
|
+
/* @__PURE__ */ a(x, { as: "div", role: "separator" })
|
|
73
|
+
] }) : /* @__PURE__ */ d(g, { "aria-label": o, children: [
|
|
74
|
+
t && /* @__PURE__ */ a(w, { ...t, items: h }),
|
|
75
|
+
e && /* @__PURE__ */ a(S, { children: /* @__PURE__ */ a(_, { ...e }) })
|
|
59
76
|
] });
|
|
60
77
|
};
|
|
61
78
|
export {
|
|
62
|
-
|
|
79
|
+
K as GlobalMenu
|
|
63
80
|
};
|
|
@@ -1,60 +1,58 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { LayoutBase as
|
|
4
|
-
import { LayoutGrid as
|
|
5
|
-
import { LayoutBody as
|
|
6
|
-
import { LayoutContent as
|
|
7
|
-
import { LayoutSidebar as
|
|
8
|
-
import { Breadcrumbs as
|
|
3
|
+
import { LayoutBase as y } from "./LayoutBase.js";
|
|
4
|
+
import { LayoutGrid as d } from "./LayoutGrid.js";
|
|
5
|
+
import { LayoutBody as h } from "./LayoutBody.js";
|
|
6
|
+
import { LayoutContent as L } from "./LayoutContent.js";
|
|
7
|
+
import { LayoutSidebar as a } from "./LayoutSidebar.js";
|
|
8
|
+
import { Breadcrumbs as s } from "../Breadcrumbs/Breadcrumbs.js";
|
|
9
9
|
import "../../index-p1eeF8LQ.js";
|
|
10
|
-
import { Footer as
|
|
11
|
-
import { GlobalHeader as
|
|
10
|
+
import { Footer as x } from "../Footer/Footer.js";
|
|
11
|
+
import { GlobalHeader as B } from "../GlobalHeader/GlobalHeader.js";
|
|
12
12
|
import "react";
|
|
13
|
-
import { u as
|
|
13
|
+
import { u as j, M as k } from "../../ToolbarSearch-56Sm2j7P.js";
|
|
14
14
|
import "../Typography/Link.js";
|
|
15
15
|
import "../Button/Button.js";
|
|
16
16
|
import "react-dom";
|
|
17
|
-
import { Header as G } from "../Header/Header.js";
|
|
18
17
|
import "../Snackbar/useSnackbar.js";
|
|
19
|
-
import { SkipLink as
|
|
20
|
-
const
|
|
18
|
+
import { SkipLink as C } from "../SkipLink/SkipLink.js";
|
|
19
|
+
const N = ({
|
|
21
20
|
color: c,
|
|
22
21
|
theme: u = "subtle",
|
|
23
|
-
header:
|
|
22
|
+
header: i,
|
|
24
23
|
footer: n,
|
|
25
24
|
sidebar: o,
|
|
26
|
-
content:
|
|
27
|
-
children:
|
|
25
|
+
content: l = {},
|
|
26
|
+
children: f,
|
|
28
27
|
skipLink: p,
|
|
29
|
-
breadcrumbs: e
|
|
30
|
-
useGlobalHeader: y = !0
|
|
28
|
+
breadcrumbs: e
|
|
31
29
|
}) => {
|
|
32
|
-
const { currentId:
|
|
33
|
-
return /* @__PURE__ */ r(
|
|
34
|
-
p && /* @__PURE__ */ t(
|
|
35
|
-
|
|
36
|
-
/* @__PURE__ */ r(
|
|
37
|
-
e && /* @__PURE__ */ t(
|
|
38
|
-
/* @__PURE__ */ r(
|
|
30
|
+
const { currentId: m } = j();
|
|
31
|
+
return /* @__PURE__ */ r(y, { color: c, theme: u, currentId: m, children: [
|
|
32
|
+
p && /* @__PURE__ */ t(C, { ...p }),
|
|
33
|
+
i && /* @__PURE__ */ t(B, { ...i }),
|
|
34
|
+
/* @__PURE__ */ r(d, { currentId: m, children: [
|
|
35
|
+
e && /* @__PURE__ */ t(s, { ...e }),
|
|
36
|
+
/* @__PURE__ */ r(h, { currentId: m, children: [
|
|
39
37
|
o && /* @__PURE__ */ r(
|
|
40
|
-
|
|
38
|
+
a,
|
|
41
39
|
{
|
|
42
40
|
sticky: o?.sticky,
|
|
43
41
|
hidden: o?.hidden,
|
|
44
42
|
color: o?.color,
|
|
45
43
|
footer: o?.footer,
|
|
46
44
|
children: [
|
|
47
|
-
o?.menu && /* @__PURE__ */ t(
|
|
45
|
+
o?.menu && /* @__PURE__ */ t(k, { ...o?.menu }),
|
|
48
46
|
o?.children
|
|
49
47
|
]
|
|
50
48
|
}
|
|
51
49
|
),
|
|
52
|
-
/* @__PURE__ */ t(
|
|
50
|
+
/* @__PURE__ */ t(L, { color: l?.color, id: "main-content", children: f })
|
|
53
51
|
] })
|
|
54
52
|
] }),
|
|
55
|
-
n && /* @__PURE__ */ t(
|
|
53
|
+
n && /* @__PURE__ */ t(x, { ...n })
|
|
56
54
|
] });
|
|
57
55
|
};
|
|
58
56
|
export {
|
|
59
|
-
|
|
57
|
+
N as Layout
|
|
60
58
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { Button as
|
|
1
|
+
import { jsx as i, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { Button as e } from "../Button/Button.js";
|
|
3
3
|
import "../../index-p1eeF8LQ.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../../ToolbarSearch-56Sm2j7P.js";
|
|
6
6
|
import "../Typography/Link.js";
|
|
7
7
|
import "react-dom";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
import '../../assets/Pagination.css';const
|
|
10
|
-
pagination:
|
|
11
|
-
list:
|
|
12
|
-
},
|
|
9
|
+
import '../../assets/Pagination.css';const b = "_pagination_jpqmb_1", m = "_list_jpqmb_5", t = {
|
|
10
|
+
pagination: b,
|
|
11
|
+
list: m
|
|
12
|
+
}, y = ({
|
|
13
13
|
size: a,
|
|
14
|
-
variant:
|
|
14
|
+
variant: o = "tinted",
|
|
15
15
|
selectedVariant: d = "solid",
|
|
16
|
-
prev:
|
|
16
|
+
prev: r,
|
|
17
17
|
next: n,
|
|
18
18
|
items: s = [],
|
|
19
19
|
"aria-label": c = "Velg side"
|
|
20
|
-
}) => /* @__PURE__ */ i("nav", { className:
|
|
21
|
-
|
|
22
|
-
s?.map((l,
|
|
23
|
-
n && /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
20
|
+
}) => /* @__PURE__ */ i("nav", { className: t.pagination, "data-size": a, "aria-label": c, children: /* @__PURE__ */ p("ul", { className: t.list, children: [
|
|
21
|
+
r && /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(e, { ...r, size: a, "aria-label": r["aria-label"] || "Forrige side", variant: o, children: r.label || "Forrige" }) }),
|
|
22
|
+
s?.map((l, h) => /* @__PURE__ */ i("li", { "aria-hidden": l.hidden, children: l.hidden ? /* @__PURE__ */ i(e, { as: "div", size: a, variant: "ghost", children: "…" }) : /* @__PURE__ */ i(e, { ...l, size: a, variant: l?.selected ? d : o, children: l.label }) }, h)),
|
|
23
|
+
n && /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(e, { ...n, size: a, "aria-label": n["aria-label"] || "Forrige side", variant: o, children: n.label || "Neste" }) })
|
|
24
24
|
] }) });
|
|
25
25
|
export {
|
|
26
|
-
|
|
26
|
+
y as Pagination
|
|
27
27
|
};
|