@altinn/altinn-components 0.24.4 → 0.24.5

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.
Files changed (30) hide show
  1. package/dist/PersonCircle-DMwECpgW.js +25 -0
  2. package/dist/assets/AccountButton.css +1 -0
  3. package/dist/assets/EndUserLabel.css +1 -0
  4. package/dist/assets/GlobalMenuBase.css +1 -1
  5. package/dist/assets/MenuItemBase.css +1 -1
  6. package/dist/assets/MenuItemLabel.css +1 -1
  7. package/dist/components/Dropdown/DrawerBase.js +15 -8
  8. package/dist/components/Dropdown/DropdownBase.js +21 -21
  9. package/dist/components/GlobalMenu/AccountButton.js +34 -12
  10. package/dist/components/GlobalMenu/EndUserLabel.js +13 -0
  11. package/dist/components/GlobalMenu/GlobalMenu.js +68 -60
  12. package/dist/components/GlobalMenu/GlobalMenuBase.js +9 -9
  13. package/dist/components/GlobalMenu/index.js +10 -8
  14. package/dist/components/Menu/MenuItemBase.js +5 -5
  15. package/dist/components/Menu/MenuItemLabel.js +21 -10
  16. package/dist/components/Menu/MenuItems.js +24 -23
  17. package/dist/components/index.js +252 -250
  18. package/dist/index.js +260 -258
  19. package/dist/types/lib/components/Dropdown/DrawerBase.d.ts +2 -1
  20. package/dist/types/lib/components/Dropdown/DropdownBase.d.ts +2 -1
  21. package/dist/types/lib/components/GlobalMenu/EndUserLabel.d.ts +5 -0
  22. package/dist/types/lib/components/GlobalMenu/GlobalMenu.d.ts +2 -1
  23. package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +3 -1
  24. package/dist/types/lib/components/GlobalMenu/GlobalMenuBase.d.ts +3 -1
  25. package/dist/types/lib/components/GlobalMenu/index.d.ts +1 -0
  26. package/dist/types/lib/components/Menu/Examples.stories.d.ts +4 -0
  27. package/dist/types/lib/components/Menu/MenuItemLabel.d.ts +2 -1
  28. package/dist/types/lib/components/Menu/MenuItems.d.ts +3 -1
  29. package/package.json +1 -1
  30. package/dist/userMenuItems-vSWEGGu2.js +0 -84
@@ -0,0 +1,25 @@
1
+ "use client";
2
+ import * as i from "react";
3
+ import { forwardRef as a } from "react";
4
+ import { u as f } from "./useId-CsCRkvK3.js";
5
+ var d = function(t, n) {
6
+ var l = {};
7
+ for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && n.indexOf(e) < 0 && (l[e] = t[e]);
8
+ if (t != null && typeof Object.getOwnPropertySymbols == "function")
9
+ for (var r = 0, e = Object.getOwnPropertySymbols(t); r < e.length; r++)
10
+ n.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (l[e[r]] = t[e[r]]);
11
+ return l;
12
+ };
13
+ const p = a((t, n) => {
14
+ var { title: l, titleId: e } = t, r = d(t, ["title", "titleId"]);
15
+ let o = f();
16
+ return o = l ? e || "title-" + o : void 0, i.createElement(
17
+ "svg",
18
+ 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: n, "aria-labelledby": o }, r),
19
+ l ? i.createElement("title", { id: o }, l) : null,
20
+ i.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M12 3.75a8.25 8.25 0 0 0-5.144 14.7 5.25 5.25 0 0 1 10.288 0A8.25 8.25 0 0 0 12 3.75m3.747 15.602a3.75 3.75 0 0 0-7.494 0A8.2 8.2 0 0 0 12 20.25c1.35 0 2.623-.324 3.747-.898M2.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 12M12 7.25a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5M8.25 9.5a3.75 3.75 0 1 1 7.5 0 3.75 3.75 0 0 1-7.5 0", clipRule: "evenodd" })
21
+ );
22
+ });
23
+ export {
24
+ p as S
25
+ };
@@ -0,0 +1 @@
1
+ ._label_1dcj3_1{display:flex;flex-direction:column;padding:0 .25rem}._title_1dcj3_7[data-size=lg]{font-size:1rem;line-height:1.25;font-weight:500}._description_1dcj3_13{font-size:.875rem;color:var(--ds-color-text-subtle)}
@@ -0,0 +1 @@
1
+ ._text_1tx3s_1{-webkit-user-select:none;user-select:none;display:flex;align-items:center;column-gap:.5rem;line-height:1.25rem;color:var(--ds-color-neutral-text-subtle);margin:0}._icon_1tx3s_11{font-size:1.25rem}._label_1tx3s_15{font-size:.875rem}
@@ -1 +1 @@
1
- ._nav_1hlpr_1{display:flex;flex-direction:column}._footer_1hlpr_6{padding:1rem .5rem;display:flex;width:100%;flex-direction:column;align-items:stretch}._drawer_1hlpr_14[data-expanded=true]{display:block;padding:.5rem;z-index:2}._dropdown_1hlpr_20[data-expanded=true]{display:none}@media (min-width: 1024px){._drawer_1hlpr_14[data-expanded=true]{display:none}._dropdown_1hlpr_20[data-expanded=true]{display:block;z-index:2}}
1
+ ._nav_b7k4e_1{display:flex;flex-direction:column}._footer_b7k4e_6{padding:1rem .5rem;display:flex;row-gap:1rem;width:100%;flex-direction:column;align-items:stretch}._drawer_b7k4e_16[data-expanded=true]{display:block;padding:.5rem;z-index:2}._dropdown_b7k4e_22[data-expanded=true]{display:none}@media (min-width: 1024px){._drawer_b7k4e_16[data-expanded=true]{display:none}._dropdown_b7k4e_22[data-expanded=true]{display:block;z-index:2}}
@@ -1 +1 @@
1
- ._item_go19k_1{font:inherit;color:inherit;border:0;text-align:inherit;text-decoration:none;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;width:100%;display:flex;align-items:center;column-gap:.25rem;margin:.5rem 0;border-radius:2px}._item_go19k_1[aria-disabled=true]{opacity:.5;pointer-events:none}._item_go19k_1[data-size=md]{min-height:56px}._item_go19k_1[data-size=md]{min-height:44px}._item_go19k_1[data-size=sm]{min-height:40px}._content_go19k_44{display:flex;width:100%;align-items:center;column-gap:6px;padding:6px}._action_go19k_52{display:flex;justify-content:center;align-items:center;padding:10px}._linkText_go19k_59{font-size:.875rem;white-space:nowrap}._linkIcon_go19k_64{font-size:1.5rem}._item_go19k_1,._item_go19k_1[data-theme]{background-color:transparent}[data-theme=subtle] ._item_go19k_1:hover{background-color:var(--ds-color-surface-hover)}[data-theme=subtle] ._item_go19k_1:active{background-color:var(--ds-color-surface-active)}[data-theme=subtle] ._item_go19k_1[data-selected=true]{background-color:var(--ds-color-background-default)}[data-theme=default] ._item_go19k_1:hover{background-color:var(--ds-color-surface-hover)}[data-theme=default] ._item_go19k_1:active{background-color:var(--ds-color-surface-active)}[data-theme=default] ._item_go19k_1[data-selected=true]{background-color:var(--ds-color-background-subtle)}
1
+ ._item_1gk35_1{font:inherit;color:inherit;padding:0;border:0;text-align:inherit;text-decoration:none;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;width:100%;display:flex;align-items:center;column-gap:.25rem;margin:.5rem 0;border-radius:2px}._item_1gk35_1[aria-disabled=true]{opacity:.5;pointer-events:none}._item_1gk35_1[data-size=md]{min-height:56px}._item_1gk35_1[data-size=md]{min-height:44px}._item_1gk35_1[data-size=sm]{min-height:40px}._content_1gk35_45{display:flex;width:100%;align-items:center;column-gap:6px;padding:6px}._action_1gk35_53{display:flex;justify-content:center;align-items:center;padding:10px}._linkText_1gk35_60{font-size:.875rem;white-space:nowrap}._linkIcon_1gk35_65{font-size:1.5rem}._item_1gk35_1,._item_1gk35_1[data-theme]{background-color:transparent}[data-theme=subtle] ._item_1gk35_1:hover{background-color:var(--ds-color-surface-hover)}[data-theme=subtle] ._item_1gk35_1:active{background-color:var(--ds-color-surface-active)}[data-theme=subtle] ._item_1gk35_1[data-selected=true]{background-color:var(--ds-color-background-default)}[data-theme=default] ._item_1gk35_1:hover{background-color:var(--ds-color-surface-hover)}[data-theme=default] ._item_1gk35_1:active{background-color:var(--ds-color-surface-active)}[data-theme=default] ._item_1gk35_1[data-selected=true]{background-color:var(--ds-color-background-subtle)}
@@ -1 +1 @@
1
- ._label_1ejxp_1{display:flex;flex-direction:column;padding:0 .25rem}._title_1ejxp_7[data-size=lg]{font-size:1.125rem;line-height:1.25;font-weight:500}._title_1ejxp_7[data-size=md],._title_1ejxp_7[data-size=sm]{font-size:1rem;line-height:1.25;font-weight:400}._description_1ejxp_25{font-size:.875rem;color:var(--ds-color-text-subtle)}
1
+ ._label_1ehsf_1{display:flex;flex-direction:column;padding:0 .25rem}._title_1ehsf_7{font-weight:400}._title_1ehsf_7[data-weight=medium]{font-weight:500}._title_1ehsf_7[data-size=lg]{font-size:1.125rem;line-height:1.25}._title_1ehsf_7[data-size=md],._title_1ehsf_7[data-size=sm]{font-size:1rem;line-height:1.25}._description_1ehsf_30{font-size:.875rem;color:var(--ds-color-text-subtle)}
@@ -1,19 +1,26 @@
1
- import { jsx as o } from "react/jsx-runtime";
1
+ import { jsx as d } from "react/jsx-runtime";
2
2
  import { c as s } from "../../index-L8X2o7IH.js";
3
- import '../../assets/DrawerBase.css';const c = "_drawer_18fhf_1", n = {
3
+ import '../../assets/DrawerBase.css';const c = "_drawer_18fhf_1", m = {
4
4
  drawer: c
5
- }, f = ({ layout: a, placement: e = "inline", open: r = !1, className: t, children: d }) => /* @__PURE__ */ o(
6
- "div",
5
+ }, i = ({
6
+ layout: a,
7
+ placement: e = "inline",
8
+ open: t = !1,
9
+ className: r,
10
+ children: o,
11
+ as: n = "div"
12
+ }) => /* @__PURE__ */ d(
13
+ n,
7
14
  {
8
- className: s(n.drawer, t),
15
+ className: s(m.drawer, r),
9
16
  "data-placement": e,
10
17
  "data-layout": a,
11
18
  "data-theme": "default",
12
19
  "data-color": "company",
13
- "data-expanded": r,
14
- children: d
20
+ "data-expanded": t,
21
+ children: o
15
22
  }
16
23
  );
17
24
  export {
18
- f as DrawerBase
25
+ i as DrawerBase
19
26
  };
@@ -1,36 +1,36 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { c as p } from "../../index-L8X2o7IH.js";
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { c } from "../../index-L8X2o7IH.js";
3
3
  import { useRef as l } from "react";
4
- import { useClickOutside as c } from "../../hooks/useClickOutside.js";
5
- import '../../assets/DropdownBase.css';const f = "_dropdown_139me_1", u = {
6
- dropdown: f
7
- }, _ = ({
8
- layout: a,
9
- placement: d = "left",
10
- padding: t = !0,
4
+ import { useClickOutside as f } from "../../hooks/useClickOutside.js";
5
+ import '../../assets/DropdownBase.css';const i = "_dropdown_139me_1", u = {
6
+ dropdown: i
7
+ }, h = ({
8
+ layout: t,
9
+ placement: a = "left",
10
+ padding: d = !0,
11
11
  open: e = !1,
12
- className: r,
13
- children: n,
14
- onClose: s
12
+ className: n,
13
+ children: r,
14
+ onClose: s,
15
+ as: m = "div"
15
16
  }) => {
16
17
  const o = l(null);
17
- return c(o, s), /* @__PURE__ */ m(
18
- "div",
18
+ return f(o, s), /* @__PURE__ */ p(
19
+ m,
19
20
  {
20
21
  ref: o,
21
- className: p(u.dropdown, r),
22
- "data-layout": a,
22
+ className: c(u.dropdown, n),
23
+ "data-layout": t,
23
24
  "data-theme": "default",
24
25
  "data-color": "company",
25
26
  "data-shadow": "md",
26
- "data-placement": d,
27
- "data-padding": t,
28
- role: "menu",
27
+ "data-placement": a,
28
+ "data-padding": d,
29
29
  "data-expanded": e,
30
- children: n
30
+ children: r
31
31
  }
32
32
  );
33
33
  };
34
34
  export {
35
- _ as DropdownBase
35
+ h as DropdownBase
36
36
  };
@@ -1,16 +1,20 @@
1
- import { jsxs as r, jsx as i } from "react/jsx-runtime";
2
- import { MenuItemBase as m } from "../Menu/MenuItemBase.js";
3
- import { MenuItemLabel as p } from "../Menu/MenuItemLabel.js";
4
- import { MenuItemIcon as s } from "../Menu/MenuItemIcon.js";
1
+ import { jsxs as m, jsx as i } from "react/jsx-runtime";
2
+ import { MenuItemBase as r } from "../Menu/MenuItemBase.js";
3
+ import { MenuItemLabel as s } from "../Menu/MenuItemLabel.js";
4
+ import { MenuItemIcon as t } from "../Menu/MenuItemIcon.js";
5
5
  import "../../index-L8X2o7IH.js";
6
6
  import "react";
7
7
  import "../RootProvider/RootProvider.js";
8
8
  import "../Search/AutocompleteBase.js";
9
9
  import "../Snackbar/useSnackbar.js";
10
- import { S as g } from "../../ChevronRight-DUaHaWi-.js";
11
- const j = ({ account: e, linkText: t, onClick: l, multipleAccounts: d }) => d ? /* @__PURE__ */ r(m, { size: "lg", onClick: l, linkText: t, linkIcon: g, as: "button", children: [
10
+ import { S as n } from "../../ChevronRight-DUaHaWi-.js";
11
+ import '../../assets/AccountButton.css';const _ = "_label_1dcj3_1", b = "_title_1dcj3_7", f = "_description_1dcj3_13", l = {
12
+ label: _,
13
+ title: b,
14
+ description: f
15
+ }, w = ({ account: e, linkText: p, onClick: d, multipleAccounts: o }) => o ? /* @__PURE__ */ m(r, { size: "lg", onClick: d, linkText: p, linkIcon: n, as: "button", children: [
12
16
  /* @__PURE__ */ i(
13
- s,
17
+ t,
14
18
  {
15
19
  size: "xl",
16
20
  avatar: {
@@ -19,20 +23,38 @@ const j = ({ account: e, linkText: t, onClick: l, multipleAccounts: d }) => d ?
19
23
  }
20
24
  }
21
25
  ),
22
- /* @__PURE__ */ i(p, { size: "lg", title: e == null ? void 0 : e.name, description: e == null ? void 0 : e.description })
23
- ] }) : /* @__PURE__ */ r(m, { size: "lg", as: "div", children: [
24
26
  /* @__PURE__ */ i(
25
27
  s,
26
28
  {
27
- size: "lg",
29
+ className: l.label,
30
+ size: "md",
31
+ title: e == null ? void 0 : e.name,
32
+ weight: "medium",
33
+ description: e == null ? void 0 : e.description
34
+ }
35
+ )
36
+ ] }) : /* @__PURE__ */ m(r, { size: "lg", as: "div", children: [
37
+ /* @__PURE__ */ i(
38
+ t,
39
+ {
40
+ size: "xl",
28
41
  avatar: {
29
42
  name: e.name,
30
43
  type: e.type
31
44
  }
32
45
  }
33
46
  ),
34
- /* @__PURE__ */ i(p, { size: "lg", title: e == null ? void 0 : e.name, description: e == null ? void 0 : e.description })
47
+ /* @__PURE__ */ i(
48
+ s,
49
+ {
50
+ className: l.label,
51
+ size: "md",
52
+ title: e == null ? void 0 : e.name,
53
+ weight: "medium",
54
+ description: e == null ? void 0 : e.description
55
+ }
56
+ )
35
57
  ] });
36
58
  export {
37
- j as AccountButton
59
+ w as AccountButton
38
60
  };
@@ -0,0 +1,13 @@
1
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
+ import { S as l } from "../../PersonCircle-DMwECpgW.js";
3
+ import '../../assets/EndUserLabel.css';const n = "_text_1tx3s_1", o = "_icon_1tx3s_11", c = "_label_1tx3s_15", s = {
4
+ text: n,
5
+ icon: o,
6
+ label: c
7
+ }, x = ({ children: e }) => /* @__PURE__ */ a("p", { className: s.text, children: [
8
+ /* @__PURE__ */ t(l, { className: s.icon, "aria-hidden": !0 }),
9
+ /* @__PURE__ */ t("span", { className: s.label, children: e })
10
+ ] });
11
+ export {
12
+ x as EndUserLabel
13
+ };
@@ -1,80 +1,88 @@
1
1
  "use client";
2
- import { jsxs as i, jsx as r, Fragment as f } from "react/jsx-runtime";
3
- import { useState as L, useMemo as H } from "react";
2
+ import { jsxs as m, jsx as i, Fragment as g } from "react/jsx-runtime";
3
+ import { useState as I, useMemo as S } from "react";
4
4
  import "../../index-L8X2o7IH.js";
5
5
  import "../RootProvider/RootProvider.js";
6
- import { AccountMenu as I } from "./AccountMenu.js";
7
- import { AccountButton as W } from "./AccountButton.js";
8
- import { BackButton as q } from "./BackButton.js";
9
- import { LogoutButton as M } from "./LogoutButton.js";
6
+ import { AccountMenu as W } from "./AccountMenu.js";
7
+ import { AccountButton as q } from "./AccountButton.js";
8
+ import { BackButton as w } from "./BackButton.js";
9
+ import { LogoutButton as k } from "./LogoutButton.js";
10
+ import { EndUserLabel as v } from "./EndUserLabel.js";
10
11
  import "../Search/AutocompleteBase.js";
11
12
  import "../Snackbar/useSnackbar.js";
12
- import { MenuListItem as n } from "../Menu/MenuBase.js";
13
- import { Menu as k } from "../Menu/Menu.js";
14
- import { GlobalMenuBase as c, GlobalMenuHeader as g, GlobalMenuFooter as b } from "./GlobalMenuBase.js";
15
- const U = ({
16
- accounts: p = [],
17
- accountGroups: v = {},
18
- accountSearch: x,
19
- items: d = [],
13
+ import { MenuListItem as o } from "../Menu/MenuBase.js";
14
+ import { Menu as x } from "../Menu/Menu.js";
15
+ import { GlobalMenuBase as h, GlobalMenuHeader as z, GlobalMenuFooter as G } from "./GlobalMenuBase.js";
16
+ const $ = ({
17
+ accounts: f = [],
18
+ accountGroups: b = {},
19
+ accountSearch: B,
20
+ items: n = [],
20
21
  groups: s,
21
- changeLabel: G = "Change",
22
- backLabel: B = "Back",
23
- currentAccount: m,
24
- onSelectAccount: l,
25
- onClose: t,
26
- logoutButton: a,
27
- isVirtualized: T
22
+ changeLabel: T = "Change",
23
+ backLabel: j = "Back",
24
+ currentAccount: a,
25
+ currentEndUserLabel: t = "Signed in",
26
+ onSelectAccount: p,
27
+ onClose: e,
28
+ logoutButton: l,
29
+ isVirtualized: F
28
30
  }) => {
29
- const [j, A] = L(!1), o = () => {
30
- A((e) => !e);
31
- }, F = (e) => {
32
- o(), t == null || t(), l == null || l(e);
33
- }, h = H(() => d.map((e) => ({
34
- ...e,
31
+ const [u, y] = I(!1), d = () => {
32
+ y((r) => !r);
33
+ }, H = (r) => {
34
+ d(), e == null || e(), p == null || p(r);
35
+ }, M = S(() => n.map((r) => ({
36
+ ...r,
35
37
  onClick: () => {
36
- var u;
37
- (u = e.onClick) == null || u.call(e), t == null || t();
38
+ var c;
39
+ (c = r.onClick) == null || c.call(r), e == null || e();
38
40
  }
39
- })), [d, t]);
40
- return j ? /* @__PURE__ */ i(c, { children: [
41
- /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(q, { onClick: o, label: B }) }),
42
- /* @__PURE__ */ r(n, { as: "div", role: "separator" }),
43
- /* @__PURE__ */ r(
44
- I,
41
+ })), [n, e]);
42
+ return u ? /* @__PURE__ */ m(h, { children: [
43
+ /* @__PURE__ */ i(z, { children: /* @__PURE__ */ i(w, { onClick: d, label: j }) }),
44
+ /* @__PURE__ */ i(o, { as: "div", role: "separator" }),
45
+ /* @__PURE__ */ i(
46
+ W,
45
47
  {
46
- currentAccount: m,
47
- accounts: p,
48
- accountGroups: v,
49
- accountSearch: x,
50
- onSelectAccount: F,
51
- isVirtualized: T
48
+ currentAccount: a,
49
+ accounts: f,
50
+ accountGroups: b,
51
+ accountSearch: B,
52
+ onSelectAccount: H,
53
+ isVirtualized: F
52
54
  }
53
55
  )
54
- ] }) : m ? /* @__PURE__ */ i(c, { children: [
55
- /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(
56
- W,
56
+ ] }) : a ? /* @__PURE__ */ m(h, { color: a == null ? void 0 : a.type, children: [
57
+ /* @__PURE__ */ i(
58
+ q,
57
59
  {
58
- account: m,
59
- linkText: G,
60
- multipleAccounts: p.length > 1,
61
- onClick: o
60
+ account: a,
61
+ linkText: T,
62
+ multipleAccounts: f.length > 1,
63
+ onClick: d
62
64
  }
63
- ) }),
64
- /* @__PURE__ */ r(n, { as: "div", role: "separator" }),
65
- /* @__PURE__ */ r(k, { groups: s, items: h, theme: "default" }),
66
- a && /* @__PURE__ */ i(f, { children: [
67
- /* @__PURE__ */ r(n, { as: "div", role: "separator" }),
68
- /* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(M, { ...a }) })
65
+ ),
66
+ /* @__PURE__ */ i(o, { as: "div", role: "separator" }),
67
+ /* @__PURE__ */ i(x, { groups: s, items: M, theme: "default" }),
68
+ l && /* @__PURE__ */ m(g, { children: [
69
+ /* @__PURE__ */ i(o, { as: "div", role: "separator" }),
70
+ /* @__PURE__ */ m(G, { children: [
71
+ t && /* @__PURE__ */ i(v, { children: t }),
72
+ /* @__PURE__ */ i(k, { ...l })
73
+ ] })
69
74
  ] })
70
- ] }) : /* @__PURE__ */ i(c, { children: [
71
- /* @__PURE__ */ r(k, { groups: s, items: h }),
72
- a && /* @__PURE__ */ i(f, { children: [
73
- /* @__PURE__ */ r(n, { as: "div", role: "separator" }),
74
- /* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(M, { ...a }) })
75
+ ] }) : /* @__PURE__ */ m(h, { children: [
76
+ /* @__PURE__ */ i(x, { groups: s, items: M }),
77
+ l && /* @__PURE__ */ m(g, { children: [
78
+ /* @__PURE__ */ i(o, { as: "div", role: "separator" }),
79
+ /* @__PURE__ */ m(G, { children: [
80
+ t && /* @__PURE__ */ i(v, { children: t }),
81
+ /* @__PURE__ */ i(k, { ...l })
82
+ ] })
75
83
  ] })
76
84
  ] });
77
85
  };
78
86
  export {
79
- U as GlobalMenu
87
+ $ as GlobalMenu
80
88
  };
@@ -1,12 +1,12 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import '../../assets/GlobalMenuBase.css';const a = "_nav_1hlpr_1", t = "_footer_1hlpr_6", n = "_drawer_1hlpr_14", s = "_dropdown_1hlpr_20", e = {
3
- nav: a,
4
- footer: t,
5
- drawer: n,
6
- dropdown: s
7
- }, d = ({ children: o }) => /* @__PURE__ */ r("nav", { className: e.nav, "data-theme": "default", children: o }), _ = ({ children: o }) => /* @__PURE__ */ r("header", { className: e.header, children: o }), c = ({ children: o }) => /* @__PURE__ */ r("footer", { className: e.footer, children: o });
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import '../../assets/GlobalMenuBase.css';const t = "_nav_b7k4e_1", n = "_footer_b7k4e_6", s = "_drawer_b7k4e_16", d = "_dropdown_b7k4e_22", r = {
3
+ nav: t,
4
+ footer: n,
5
+ drawer: s,
6
+ dropdown: d
7
+ }, l = ({ color: o = "company", children: a }) => /* @__PURE__ */ e("nav", { className: r.nav, "data-theme": "default", "data-color": o, children: a }), _ = ({ children: o }) => /* @__PURE__ */ e("header", { className: r.header, children: o }), b = ({ children: o }) => /* @__PURE__ */ e("footer", { className: r.footer, children: o });
8
8
  export {
9
- d as GlobalMenuBase,
10
- c as GlobalMenuFooter,
9
+ l as GlobalMenuBase,
10
+ b as GlobalMenuFooter,
11
11
  _ as GlobalMenuHeader
12
12
  };
@@ -1,12 +1,14 @@
1
1
  import { AccountMenu as r } from "./AccountMenu.js";
2
- import { GlobalMenu as e } from "./GlobalMenu.js";
3
- import { AccountButton as c } from "./AccountButton.js";
4
- import { BackButton as m } from "./BackButton.js";
5
- import { LogoutButton as x } from "./LogoutButton.js";
2
+ import { GlobalMenu as n } from "./GlobalMenu.js";
3
+ import { AccountButton as f } from "./AccountButton.js";
4
+ import { BackButton as p } from "./BackButton.js";
5
+ import { LogoutButton as c } from "./LogoutButton.js";
6
+ import { EndUserLabel as a } from "./EndUserLabel.js";
6
7
  export {
7
- c as AccountButton,
8
+ f as AccountButton,
8
9
  r as AccountMenu,
9
- m as BackButton,
10
- e as GlobalMenu,
11
- x as LogoutButton
10
+ p as BackButton,
11
+ a as EndUserLabel,
12
+ n as GlobalMenu,
13
+ c as LogoutButton
12
14
  };
@@ -6,7 +6,7 @@ import { Badge as T } from "../Badge/Badge.js";
6
6
  import "../RootProvider/RootProvider.js";
7
7
  import "../Search/AutocompleteBase.js";
8
8
  import "../Snackbar/useSnackbar.js";
9
- import '../../assets/MenuItemBase.css';const j = "_item_go19k_1", B = "_content_go19k_44", E = "_action_go19k_52", g = "_linkText_go19k_59", z = "_linkIcon_go19k_64", n = {
9
+ import '../../assets/MenuItemBase.css';const j = "_item_1gk35_1", B = "_content_1gk35_45", E = "_action_1gk35_53", g = "_linkText_1gk35_60", z = "_linkIcon_1gk35_65", n = {
10
10
  item: j,
11
11
  content: B,
12
12
  action: E,
@@ -19,8 +19,8 @@ import '../../assets/MenuItemBase.css';const j = "_item_go19k_1", B = "_content_
19
19
  size: d,
20
20
  className: h,
21
21
  href: x,
22
- onClick: o,
23
- onKeyPress: e,
22
+ onClick: e,
23
+ onKeyPress: o,
24
24
  tabIndex: f = 0,
25
25
  hidden: k,
26
26
  selected: I,
@@ -42,9 +42,9 @@ import '../../assets/MenuItemBase.css';const j = "_item_go19k_1", B = "_content_
42
42
  "data-selected": I,
43
43
  href: x,
44
44
  onKeyPress: (r) => {
45
- r.key === "Enter" && (o == null || o()), e == null || e(r);
45
+ r.key === "Enter" && (e == null || e()), o == null || o(r);
46
46
  },
47
- onClick: o,
47
+ onClick: e,
48
48
  children: [
49
49
  /* @__PURE__ */ c("div", { className: n.content, children: [
50
50
  N,
@@ -1,13 +1,24 @@
1
- import { jsx as t, jsxs as r, Fragment as o } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as m, Fragment as d } from "react/jsx-runtime";
2
2
  import { c as p } from "../../index-L8X2o7IH.js";
3
- import '../../assets/MenuItemLabel.css';const d = "_label_1ejxp_1", m = "_title_1ejxp_7", _ = "_description_1ejxp_25", s = {
4
- label: d,
5
- title: m,
6
- description: _
7
- }, j = ({ className: l, size: e = "sm", label: i, title: n, description: c, children: a }) => /* @__PURE__ */ t("span", { className: p(s.label, l), "data-size": e, children: a || /* @__PURE__ */ r(o, { children: [
8
- /* @__PURE__ */ t("strong", { className: s.title, "data-size": e, children: n || i }),
9
- /* @__PURE__ */ t("span", { className: s.description, "data-size": e, children: c })
10
- ] }) });
3
+ import '../../assets/MenuItemLabel.css';const _ = "_label_1ehsf_1", h = "_title_1ehsf_7", b = "_description_1ehsf_30", s = {
4
+ label: _,
5
+ title: h,
6
+ description: b
7
+ }, x = ({
8
+ className: l,
9
+ size: e = "sm",
10
+ label: i,
11
+ title: n,
12
+ weight: c,
13
+ description: o,
14
+ children: a
15
+ }) => {
16
+ const r = c || e === "lg" ? "medium" : "normal";
17
+ return /* @__PURE__ */ t("span", { className: p(s.label, l), "data-size": e, children: a || /* @__PURE__ */ m(d, { children: [
18
+ /* @__PURE__ */ t("strong", { className: s.title, "data-size": e, "data-weight": r, children: n || i }),
19
+ /* @__PURE__ */ t("span", { className: s.description, "data-size": e, children: o })
20
+ ] }) });
21
+ };
11
22
  export {
12
- j as MenuItemLabel
23
+ x as MenuItemLabel
13
24
  };
@@ -1,16 +1,16 @@
1
1
  "use client";
2
- import { jsxs as i, jsx as m, Fragment as k } from "react/jsx-runtime";
3
- import { Fragment as B } from "react";
2
+ import { jsxs as i, jsx as m, Fragment as B } from "react/jsx-runtime";
3
+ import { Fragment as E } from "react";
4
4
  import "../../index-L8X2o7IH.js";
5
- import { useMenu as E } from "../../hooks/useMenu.js";
5
+ import { useMenu as G } from "../../hooks/useMenu.js";
6
6
  import "../RootProvider/RootProvider.js";
7
- import { MenuItem as G } from "./MenuItem.js";
8
- import { MenuSearch as H } from "./MenuSearch.js";
9
- import { MenuHeader as K } from "./MenuHeader.js";
10
- import { MenuList as S, MenuListItem as c } from "./MenuBase.js";
7
+ import { MenuItem as H } from "./MenuItem.js";
8
+ import { MenuSearch as K } from "./MenuSearch.js";
9
+ import { MenuHeader as S } from "./MenuHeader.js";
10
+ import { MenuList as _, MenuListItem as c } from "./MenuBase.js";
11
11
  import "../Search/AutocompleteBase.js";
12
12
  import "../Snackbar/useSnackbar.js";
13
- const _ = ({
13
+ const $ = ({
14
14
  level: h = 0,
15
15
  expanded: F,
16
16
  search: f,
@@ -19,42 +19,43 @@ const _ = ({
19
19
  defaultItemSize: x,
20
20
  defaultItemColor: M,
21
21
  defaultItemTheme: I,
22
- defaultIconTheme: v
22
+ defaultIconTheme: v,
23
+ as: o
23
24
  }) => {
24
- const { menu: b } = E({
25
+ const { menu: b } = G({
25
26
  items: j,
26
27
  groups: r,
27
28
  groupByKey: "groupId",
28
29
  keyboardEvents: !1
29
30
  });
30
- return /* @__PURE__ */ i(S, { expanded: F, children: [
31
- f && /* @__PURE__ */ m(H, { ...f }),
31
+ return /* @__PURE__ */ i(_, { expanded: F, as: o, children: [
32
+ f && /* @__PURE__ */ m(K, { ...f }),
32
33
  b.map((n, l) => {
33
- const t = (n == null ? void 0 : n.props) || {}, { title: y, divider: o = !0 } = t, z = b[l + 1];
34
- return /* @__PURE__ */ i(B, { children: [
35
- (h > 0 || l) && o ? /* @__PURE__ */ m(c, { role: "separator" }) : "",
36
- y && /* @__PURE__ */ m(c, { children: /* @__PURE__ */ m(K, { title: y }) }),
34
+ const t = (n == null ? void 0 : n.props) || {}, { title: y, divider: z = !0 } = t, L = b[l + 1];
35
+ return /* @__PURE__ */ i(E, { children: [
36
+ (h > 0 || l) && z ? /* @__PURE__ */ m(c, { role: "separator" }) : "",
37
+ y && /* @__PURE__ */ m(c, { children: /* @__PURE__ */ m(S, { title: y }) }),
37
38
  n == null ? void 0 : n.items.filter((a) => {
38
39
  var d;
39
40
  return !((d = a.props) != null && d.hidden);
40
41
  }).map((a, d) => {
41
- const { active: L } = a, { groupId: $, ...e } = a.props || {}, { expanded: s } = e, T = n == null ? void 0 : n.items[d + 1];
42
+ const { active: T } = a, { groupId: q, ...e } = a.props || {}, { expanded: s } = e, k = n == null ? void 0 : n.items[d + 1];
42
43
  return /* @__PURE__ */ i(c, { expanded: s, children: [
43
44
  /* @__PURE__ */ m(
44
- G,
45
+ H,
45
46
  {
46
47
  ...e,
47
48
  size: (e == null ? void 0 : e.size) || (t == null ? void 0 : t.defaultItemSize) || x,
48
49
  color: (e == null ? void 0 : e.color) || (t == null ? void 0 : t.defaultItemColor) || M,
49
50
  theme: (e == null ? void 0 : e.theme) || (t == null ? void 0 : t.defaultItemTheme) || I,
50
51
  iconTheme: (e == null ? void 0 : e.iconTheme) || (t == null ? void 0 : t.defaultIconTheme) || v,
51
- active: L,
52
+ active: T,
52
53
  tabIndex: e != null && e.disabled ? -1 : 0
53
54
  }
54
55
  ),
55
- s && (e == null ? void 0 : e.items) && /* @__PURE__ */ i(k, { children: [
56
+ s && (e == null ? void 0 : e.items) && /* @__PURE__ */ i(B, { children: [
56
57
  /* @__PURE__ */ m(
57
- _,
58
+ $,
58
59
  {
59
60
  expanded: s,
60
61
  level: h + 1,
@@ -66,7 +67,7 @@ const _ = ({
66
67
  defaultIconTheme: v
67
68
  }
68
69
  ),
69
- (z || T) && /* @__PURE__ */ m(c, { role: "separator", as: "div" })
70
+ (L || k) && /* @__PURE__ */ m(c, { role: "separator", as: "div" })
70
71
  ] })
71
72
  ] }, d);
72
73
  })
@@ -75,5 +76,5 @@ const _ = ({
75
76
  ] });
76
77
  };
77
78
  export {
78
- _ as MenuItems
79
+ $ as MenuItems
79
80
  };