@altinn/altinn-components 0.42.3 → 0.42.4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._button_1uh95_1{flex-shrink:0;position:relative;z-index:2;display:inline-flex;align-items:center;column-gap:.625rem;padding:.625rem;border:none;border-radius:4px}._label_1uh95_13{font-size:1.125rem;font-weight:500;padding:.25rem}._avatarIcon_1uh95_19,._loginIcon_1uh95_20,._closeIcon_1uh95_21{width:2.25rem;height:2.25rem;border-radius:2px;font-size:unset}._closeIcon_1uh95_21{outline:1px solid white}._loginIcon_1uh95_20{background-color:#fff;color:#000;outline:1px solid white}._avatar_1uh95_19{font-size:2.25rem;width:2.25rem;height:2.25rem}._icon_1uh95_44{font-size:1.5rem;width:1.5rem;height:1.5rem}._badge_1uh95_50{position:absolute;top:0;right:0;margin-top:-.75rem;margin-right:-.75rem}
|
|
@@ -1,49 +1,58 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { c as _ } from "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { Avatar as u } from "../Avatar/Avatar.js";
|
|
5
|
+
import { Badge as I } from "../Badge/Badge.js";
|
|
6
|
+
import { ButtonBase as h } from "../Button/ButtonBase.js";
|
|
7
|
+
import { ButtonLabel as d } from "../Button/ButtonLabel.js";
|
|
8
|
+
import { ButtonIcon as f } from "../Button/ButtonIcon.js";
|
|
8
9
|
import "../RootProvider/RootProvider.js";
|
|
9
10
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { S as
|
|
11
|
-
import { S as
|
|
12
|
-
import '../../assets/GlobalMenuButton.css';const
|
|
13
|
-
button:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
import { S as N } from "../../XMark-tKk6aExO.js";
|
|
12
|
+
import { S as g } from "../../PadlockLocked-XL1IB5Ae.js";
|
|
13
|
+
import '../../assets/GlobalMenuButton.css';const v = "_button_1uh95_1", b = "_avatarIcon_1uh95_19", B = "_loginIcon_1uh95_20", x = "_closeIcon_1uh95_21", S = "_avatar_1uh95_19", k = "_icon_1uh95_44", L = "_badge_1uh95_50", a = {
|
|
14
|
+
button: v,
|
|
15
|
+
avatarIcon: b,
|
|
16
|
+
loginIcon: B,
|
|
17
|
+
closeIcon: x,
|
|
18
|
+
avatar: S,
|
|
19
|
+
icon: k,
|
|
20
|
+
badge: L
|
|
21
|
+
}, H = ({
|
|
19
22
|
className: t,
|
|
20
|
-
as:
|
|
23
|
+
as: s = "button",
|
|
21
24
|
color: i = "accent",
|
|
22
|
-
variant:
|
|
23
|
-
currentAccount:
|
|
24
|
-
expanded:
|
|
25
|
-
label:
|
|
25
|
+
variant: m = "solid",
|
|
26
|
+
currentAccount: c,
|
|
27
|
+
expanded: p,
|
|
28
|
+
label: r = "Menu",
|
|
26
29
|
badge: n,
|
|
27
|
-
...
|
|
28
|
-
}) =>
|
|
29
|
-
/* @__PURE__ */ o(
|
|
30
|
-
/* @__PURE__ */ o(
|
|
31
|
-
n && /* @__PURE__ */ o(
|
|
32
|
-
] }) :
|
|
33
|
-
/* @__PURE__ */ o(
|
|
34
|
-
/* @__PURE__ */ o(p, { className: a.avatar, icon: s == null ? void 0 : s.icon }),
|
|
35
|
-
n && /* @__PURE__ */ o(d, { ...n, className: a.badge })
|
|
36
|
-
] }) : /* @__PURE__ */ r(I, { ...m, as: c, variant: e, color: i, className: _(a.button, t), children: [
|
|
37
|
-
/* @__PURE__ */ o(f, { children: l }),
|
|
30
|
+
...e
|
|
31
|
+
}) => p ? /* @__PURE__ */ l(h, { ...e, as: s, variant: m, color: i, className: _(a.button, t), children: [
|
|
32
|
+
/* @__PURE__ */ o(d, { children: r }),
|
|
33
|
+
/* @__PURE__ */ o(f, { className: a.closeIcon, icon: /* @__PURE__ */ o(N, { className: a.icon, "aria-label": "Close Icon" }) }),
|
|
34
|
+
n && /* @__PURE__ */ o(I, { ...n, className: a.badge })
|
|
35
|
+
] }) : c ? /* @__PURE__ */ l(h, { ...e, as: s, variant: m, color: i, className: _(a.button, t), children: [
|
|
36
|
+
/* @__PURE__ */ o(d, { children: r }),
|
|
38
37
|
/* @__PURE__ */ o(
|
|
39
|
-
|
|
38
|
+
f,
|
|
39
|
+
{
|
|
40
|
+
className: a.avatarIcon,
|
|
41
|
+
icon: /* @__PURE__ */ o(u, { ...c == null ? void 0 : c.icon, className: a.avatar })
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
n && /* @__PURE__ */ o(I, { ...n, className: a.badge })
|
|
45
|
+
] }) : /* @__PURE__ */ l(h, { ...e, as: s, variant: m, color: i, className: _(a.button, t), children: [
|
|
46
|
+
/* @__PURE__ */ o(d, { children: r }),
|
|
47
|
+
/* @__PURE__ */ o(
|
|
48
|
+
f,
|
|
40
49
|
{
|
|
41
50
|
className: a.loginIcon,
|
|
42
|
-
icon: /* @__PURE__ */ o(
|
|
51
|
+
icon: /* @__PURE__ */ o(g, { className: a.icon, "aria-label": "Login Icon" })
|
|
43
52
|
}
|
|
44
53
|
),
|
|
45
|
-
n && /* @__PURE__ */ o(
|
|
54
|
+
n && /* @__PURE__ */ o(I, { ...n, className: a.badge })
|
|
46
55
|
] });
|
|
47
56
|
export {
|
|
48
|
-
|
|
57
|
+
H as GlobalMenuButton
|
|
49
58
|
};
|