@altinn/altinn-components 0.43.0 → 0.43.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/HeaderBase.css +1 -1
- package/dist/assets/HeaderGroup.css +1 -1
- package/dist/assets/HeaderLogo.css +1 -1
- package/dist/components/Header/Header.js +35 -35
- package/dist/components/Header/HeaderBase.js +5 -5
- package/dist/components/Header/HeaderGroup.js +5 -5
- package/dist/components/Header/HeaderLogo.js +13 -13
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._header_dg4o1_1{z-index:1;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;row-gap:1rem;padding:1rem}@media (min-width: 1024px){._header_dg4o1_1{gap:1rem}}._backdrop_dg4o1_17{display:none}._header_dg4o1_1[data-current-id=menu],._header_dg4o1_1[data-current-id=locale]{background-color:#fff}@media (min-width: 1024px){._header_dg4o1_1[data-current-id=menu],._header_dg4o1_1[data-current-id=locale]{background-color:transparent}._header_dg4o1_1[data-current-id=menu] ._backdrop_dg4o1_17,._header_dg4o1_1[data-current-id=locale] ._backdrop_dg4o1_17{display:block}}._header_dg4o1_1{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}._header_dg4o1_1[data-current-id=search]{margin-top:-72px}._header_dg4o1_1[data-current-id=search] ._backdrop_dg4o1_17{display:block}@media (min-width: 1024px){._header_dg4o1_1[data-current-id=search]{margin-top:0}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._group_oia4i_1{position:relative;display:flex;align-items:center;column-gap:0}@media (min-width: 1024px){._group_oia4i_1{column-gap:1rem}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._logo_mt7vd_1{display:flex;align-items:center;color:currentColor;text-decoration:none}._symbol_mt7vd_8{width:2rem;height:2rem;margin:0}@media (min-width: 1024px){._symbol_mt7vd_8{margin:6px}}._riksSymbol_mt7vd_20{width:2.5rem;height:2.5rem;margin:0}._text_mt7vd_26{font-size:1.5rem;font-weight:500;padding:4px}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import { useRootContext as
|
|
6
|
-
import { DropdownBase as
|
|
7
|
-
import { DrawerBase as
|
|
5
|
+
import { useRootContext as S } from "../RootProvider/RootProvider.js";
|
|
6
|
+
import { DropdownBase as k } from "../Dropdown/DropdownBase.js";
|
|
7
|
+
import { DrawerBase as B } from "../Dropdown/DrawerBase.js";
|
|
8
8
|
import { GlobalMenu as f } from "../GlobalMenu/GlobalMenu.js";
|
|
9
|
-
import { GlobalMenuButton as
|
|
10
|
-
import { HeaderBase as
|
|
11
|
-
import { HeaderLogo as
|
|
12
|
-
import { HeaderGroup as
|
|
9
|
+
import { GlobalMenuButton as D } from "../GlobalMenu/GlobalMenuButton.js";
|
|
10
|
+
import { HeaderBase as I } from "./HeaderBase.js";
|
|
11
|
+
import { HeaderLogo as l } from "./HeaderLogo.js";
|
|
12
|
+
import { HeaderGroup as F } from "./HeaderGroup.js";
|
|
13
13
|
import { HeaderSearch as w } from "./HeaderSearch.js";
|
|
14
|
-
import { LocaleSwitcher as
|
|
14
|
+
import { LocaleSwitcher as G } from "./LocaleSwitcher.js";
|
|
15
15
|
import { Searchbar as x } from "../Searchbar/Searchbar.js";
|
|
16
16
|
import "../Snackbar/useSnackbar.js";
|
|
17
|
-
import { useIsDesktop as
|
|
18
|
-
import '../../assets/Header.css';const
|
|
19
|
-
drawer:
|
|
17
|
+
import { useIsDesktop as L } from "../../hooks/useIsDesktop.js";
|
|
18
|
+
import '../../assets/Header.css';const N = "_drawer_afyu3_1", j = "_dropdown_afyu3_6", z = "_relative_afyu3_19", n = {
|
|
19
|
+
drawer: N,
|
|
20
20
|
dropdown: j,
|
|
21
21
|
relative: z
|
|
22
22
|
}, A = ({
|
|
@@ -25,54 +25,54 @@ import '../../assets/Header.css';const L = "_drawer_afyu3_1", j = "_dropdown_afy
|
|
|
25
25
|
mobileMenu: C,
|
|
26
26
|
locale: p,
|
|
27
27
|
search: s,
|
|
28
|
-
currentAccount:
|
|
28
|
+
currentAccount: t,
|
|
29
29
|
logo: u = {},
|
|
30
|
-
badge:
|
|
30
|
+
badge: v
|
|
31
31
|
}) => {
|
|
32
|
-
const { currentId: r, toggleId: i, openId:
|
|
33
|
-
|
|
32
|
+
const { currentId: r, toggleId: i, openId: y, closeAll: m } = S(), c = () => {
|
|
33
|
+
y("search");
|
|
34
34
|
}, a = () => {
|
|
35
35
|
i("search");
|
|
36
|
-
},
|
|
36
|
+
}, H = () => {
|
|
37
37
|
i("menu");
|
|
38
|
-
}, h =
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
|
|
38
|
+
}, h = L();
|
|
39
|
+
return /* @__PURE__ */ d(
|
|
40
|
+
I,
|
|
41
41
|
{
|
|
42
42
|
currentId: r,
|
|
43
43
|
open: r === "search" || r === "menu" || r === "locale",
|
|
44
|
-
onClose:
|
|
44
|
+
onClose: m,
|
|
45
45
|
children: [
|
|
46
|
-
/* @__PURE__ */ o(
|
|
46
|
+
/* @__PURE__ */ o(l, { ...u, badge: v }),
|
|
47
47
|
s && h && /* @__PURE__ */ o(w, { expanded: r === "search", children: /* @__PURE__ */ o(x, { ...s, expanded: r === "search", onClose: a, onFocus: c }) }),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
p && /* @__PURE__ */ o(
|
|
50
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ d(F, { children: [
|
|
49
|
+
p && /* @__PURE__ */ o(G, { ...p }),
|
|
50
|
+
/* @__PURE__ */ d("div", { className: n.relative, children: [
|
|
51
51
|
/* @__PURE__ */ o(
|
|
52
|
-
|
|
52
|
+
D,
|
|
53
53
|
{
|
|
54
|
-
currentAccount:
|
|
55
|
-
onClick:
|
|
54
|
+
currentAccount: t,
|
|
55
|
+
onClick: H,
|
|
56
56
|
expanded: r === "menu",
|
|
57
57
|
label: e == null ? void 0 : e.menuLabel
|
|
58
58
|
}
|
|
59
59
|
),
|
|
60
60
|
e && /* @__PURE__ */ o(
|
|
61
|
-
|
|
61
|
+
k,
|
|
62
62
|
{
|
|
63
63
|
layout: "desktop",
|
|
64
64
|
padding: !0,
|
|
65
65
|
size: "lg",
|
|
66
66
|
placement: "right",
|
|
67
67
|
open: r === "menu",
|
|
68
|
-
className:
|
|
68
|
+
className: n.dropdown,
|
|
69
69
|
children: /* @__PURE__ */ o(
|
|
70
70
|
f,
|
|
71
71
|
{
|
|
72
72
|
...e,
|
|
73
73
|
menu: _ || (e == null ? void 0 : e.menu),
|
|
74
|
-
currentAccount:
|
|
75
|
-
onClose:
|
|
74
|
+
currentAccount: t,
|
|
75
|
+
onClose: m
|
|
76
76
|
}
|
|
77
77
|
)
|
|
78
78
|
}
|
|
@@ -80,13 +80,13 @@ import '../../assets/Header.css';const L = "_drawer_afyu3_1", j = "_dropdown_afy
|
|
|
80
80
|
] })
|
|
81
81
|
] }),
|
|
82
82
|
s && !h && /* @__PURE__ */ o(w, { expanded: r === "search", children: /* @__PURE__ */ o(x, { ...s, expanded: r === "search", onClose: a, onFocus: c }) }),
|
|
83
|
-
e && /* @__PURE__ */ o(
|
|
83
|
+
e && /* @__PURE__ */ o(B, { open: r === "menu", className: n.drawer, children: /* @__PURE__ */ o(
|
|
84
84
|
f,
|
|
85
85
|
{
|
|
86
86
|
...e,
|
|
87
87
|
menu: C || (e == null ? void 0 : e.menu),
|
|
88
|
-
currentAccount:
|
|
89
|
-
onClose:
|
|
88
|
+
currentAccount: t,
|
|
89
|
+
onClose: m
|
|
90
90
|
}
|
|
91
91
|
) })
|
|
92
92
|
]
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { c as p } from "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
5
|
import { Backdrop as m } from "../Dropdown/Backdrop.js";
|
|
6
6
|
import "../Snackbar/useSnackbar.js";
|
|
7
|
-
import '../../assets/HeaderBase.css';const i = "
|
|
7
|
+
import '../../assets/HeaderBase.css';const i = "_header_dg4o1_1", n = "_backdrop_dg4o1_17", r = {
|
|
8
8
|
header: i,
|
|
9
|
-
backdrop:
|
|
10
|
-
}, f = ({ currentId:
|
|
11
|
-
c && /* @__PURE__ */
|
|
9
|
+
backdrop: n
|
|
10
|
+
}, f = ({ currentId: o, className: e, children: a, open: c, onClose: d }) => /* @__PURE__ */ s("header", { className: p(r.header, e), "data-current-id": o, children: [
|
|
11
|
+
c && /* @__PURE__ */ t(m, { className: r.backdrop, onClick: d }),
|
|
12
12
|
a
|
|
13
13
|
] });
|
|
14
14
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import '../../assets/HeaderGroup.css';const
|
|
4
|
-
group:
|
|
5
|
-
},
|
|
2
|
+
import { c as p } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import '../../assets/HeaderGroup.css';const t = "_group_oia4i_1", c = {
|
|
4
|
+
group: t
|
|
5
|
+
}, a = ({ className: o, children: r }) => /* @__PURE__ */ s("div", { className: p(c.group, o), children: r });
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as HeaderGroup
|
|
8
8
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { Badge as
|
|
4
|
-
import { ButtonBase as
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as a } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { Badge as c } from "../Badge/Badge.js";
|
|
4
|
+
import { ButtonBase as n } from "../Button/ButtonBase.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { DigdirLogomark as
|
|
7
|
+
import { DigdirLogomark as p } from "./DigdirLogomark.js";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
import '../../assets/HeaderLogo.css';const
|
|
10
|
-
logo:
|
|
11
|
-
symbol:
|
|
12
|
-
text:
|
|
13
|
-
},
|
|
14
|
-
/* @__PURE__ */ o(
|
|
9
|
+
import '../../assets/HeaderLogo.css';const _ = "_logo_mt7vd_1", x = "_symbol_mt7vd_8", d = "_text_mt7vd_26", t = {
|
|
10
|
+
logo: _,
|
|
11
|
+
symbol: x,
|
|
12
|
+
text: d
|
|
13
|
+
}, j = ({ className: s, as: r = "a", title: e = "Altinn", href: l = "/", badge: m }) => /* @__PURE__ */ i(n, { as: r, className: a(t.logo, s), href: l, children: [
|
|
14
|
+
/* @__PURE__ */ o(p, { className: t.symbol }),
|
|
15
15
|
/* @__PURE__ */ o("span", { className: t.text, children: e }),
|
|
16
16
|
" ",
|
|
17
|
-
|
|
17
|
+
m && /* @__PURE__ */ o(c, { ...m })
|
|
18
18
|
] });
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
j as HeaderLogo
|
|
21
21
|
};
|