@altinn/altinn-components 0.24.2 → 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 (50) hide show
  1. package/dist/Checkmark-RgzvRNxP.js +25 -0
  2. package/dist/PersonCircle-DMwECpgW.js +25 -0
  3. package/dist/altinn-ds-overrides.css +5 -0
  4. package/dist/assets/AccountButton.css +1 -0
  5. package/dist/assets/EndUserLabel.css +1 -0
  6. package/dist/assets/GlobalMenuBase.css +1 -1
  7. package/dist/assets/MenuItemBase.css +1 -1
  8. package/dist/assets/MenuItemLabel.css +1 -1
  9. package/dist/components/Dialog/DialogListGroup.js +13 -32
  10. package/dist/components/Dropdown/DrawerBase.js +15 -8
  11. package/dist/components/Dropdown/DropdownBase.js +21 -21
  12. package/dist/components/DsComponents/index.js +23 -0
  13. package/dist/components/GlobalMenu/AccountButton.js +34 -12
  14. package/dist/components/GlobalMenu/AccountMenu.js +24 -24
  15. package/dist/components/GlobalMenu/EndUserLabel.js +13 -0
  16. package/dist/components/GlobalMenu/GlobalMenu.js +68 -60
  17. package/dist/components/GlobalMenu/GlobalMenuBase.js +9 -9
  18. package/dist/components/GlobalMenu/index.js +10 -8
  19. package/dist/components/Menu/MenuItemBase.js +5 -5
  20. package/dist/components/Menu/MenuItemLabel.js +21 -10
  21. package/dist/components/Menu/MenuItems.js +24 -23
  22. package/dist/components/Menu/MenuItemsVirtual.js +65 -602
  23. package/dist/components/index.js +266 -243
  24. package/dist/global.css +3 -0
  25. package/dist/index-DyDqjche.js +541 -0
  26. package/dist/index.js +256 -233
  27. package/dist/types/lib/components/Avatar/Examples.stories.d.ts +1 -1
  28. package/dist/types/lib/components/Avatar/avatar.stories.d.ts +1 -1
  29. package/dist/types/lib/components/Dropdown/DrawerBase.d.ts +2 -1
  30. package/dist/types/lib/components/Dropdown/DropdownBase.d.ts +2 -1
  31. package/dist/types/lib/components/DsComponents/DsComponents.stories.d.ts +23 -0
  32. package/dist/types/lib/components/DsComponents/index.d.ts +1 -0
  33. package/dist/types/lib/components/GlobalMenu/AccountMenu.d.ts +2 -2
  34. package/dist/types/lib/components/GlobalMenu/EndUserLabel.d.ts +5 -0
  35. package/dist/types/lib/components/GlobalMenu/GlobalMenu.d.ts +2 -1
  36. package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +3 -1
  37. package/dist/types/lib/components/GlobalMenu/GlobalMenuBase.d.ts +3 -1
  38. package/dist/types/lib/components/GlobalMenu/index.d.ts +1 -0
  39. package/dist/types/lib/components/Header/LocaleSwitcher.stories.d.ts +1 -1
  40. package/dist/types/lib/components/Icon/IconOrAvatar.d.ts +1 -1
  41. package/dist/types/lib/components/Menu/Examples.stories.d.ts +4 -0
  42. package/dist/types/lib/components/Menu/MenuItemLabel.d.ts +2 -1
  43. package/dist/types/lib/components/Menu/MenuItems.d.ts +3 -1
  44. package/dist/types/lib/components/Search/AutocompleteBase.d.ts +1 -1
  45. package/dist/types/lib/components/Skeleton/Skeleton.d.ts +1 -1
  46. package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +9 -9
  47. package/dist/types/lib/components/index.d.ts +1 -0
  48. package/dist/usePagination-CBMPUKt_.js +4073 -0
  49. package/package.json +4 -1
  50. 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 r = {};
7
+ for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && n.indexOf(e) < 0 && (r[e] = t[e]);
8
+ if (t != null && typeof Object.getOwnPropertySymbols == "function")
9
+ for (var l = 0, e = Object.getOwnPropertySymbols(t); l < e.length; l++)
10
+ n.indexOf(e[l]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[l]) && (r[e[l]] = t[e[l]]);
11
+ return r;
12
+ };
13
+ const p = a((t, n) => {
14
+ var { title: r, titleId: e } = t, l = d(t, ["title", "titleId"]);
15
+ let o = f();
16
+ return o = r ? 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 }, l),
19
+ r ? i.createElement("title", { id: o }, r) : null,
20
+ i.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M18.998 6.94a.75.75 0 0 1 .063 1.058l-8 9a.75.75 0 0 1-1.091.032l-5-5a.75.75 0 1 1 1.06-1.06l4.438 4.437 7.471-8.405A.75.75 0 0 1 19 6.939", clipRule: "evenodd" })
21
+ );
22
+ });
23
+ export {
24
+ p as S
25
+ };
@@ -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
+ };
@@ -36,4 +36,9 @@
36
36
  --ds-color-accent-text-default: var(--ds-color-company-text-default);
37
37
  --ds-color-accent-contrast-default: var(--ds-color-company-contrast-default);
38
38
  --ds-color-accent-contrast-subtle: var(--ds-color-company-contrast-subtle);
39
+
40
+ /* Override tokens from designSystem & altinn-components */
41
+ --ds-color-neutral-surface-default: #fff;
42
+ --ds-body-md-font-size: 1rem;
43
+ --ds-color-text-subtle: #10204a;
39
44
  }
@@ -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,41 +1,22 @@
1
- "use client";
2
- import { jsxs as a, jsx as l } from "react/jsx-runtime";
1
+ import { jsxs as t, jsx as r } from "react/jsx-runtime";
3
2
  import "../../index-L8X2o7IH.js";
4
- import * as m from "react";
5
- import { forwardRef as f } from "react";
6
- import { Button as p } from "../Button/Button.js";
3
+ import "react";
4
+ import { Button as e } from "../Button/Button.js";
7
5
  import "../RootProvider/RootProvider.js";
8
- import { ListBase as c } from "../List/ListBase.js";
9
- import { Heading as d } from "../Typography/Heading.js";
6
+ import { ListBase as n } from "../List/ListBase.js";
7
+ import { Heading as p } from "../Typography/Heading.js";
10
8
  import "../Search/AutocompleteBase.js";
11
9
  import "../Snackbar/useSnackbar.js";
12
10
  import { Flex as s } from "../Page/Flex.js";
13
- import { Section as u } from "../Page/Section.js";
14
- import { u as g } from "../../useId-CsCRkvK3.js";
15
- var v = function(e, i) {
16
- var r = {};
17
- for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && i.indexOf(t) < 0 && (r[t] = e[t]);
18
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
19
- for (var o = 0, t = Object.getOwnPropertySymbols(e); o < t.length; o++)
20
- i.indexOf(t[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[o]) && (r[t[o]] = e[t[o]]);
21
- return r;
22
- };
23
- const w = f((e, i) => {
24
- var { title: r, titleId: t } = e, o = v(e, ["title", "titleId"]);
25
- let n = g();
26
- return n = r ? t || "title-" + n : void 0, m.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": n }, o),
29
- r ? m.createElement("title", { id: n }, r) : null,
30
- m.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M18.998 6.94a.75.75 0 0 1 .063 1.058l-8 9a.75.75 0 0 1-1.091.032l-5-5a.75.75 0 1 1 1.06-1.06l4.438 4.437 7.471-8.405A.75.75 0 0 1 19 6.939", clipRule: "evenodd" })
31
- );
32
- }), P = ({ title: e, children: i, checkAllLabel: r }) => /* @__PURE__ */ a(u, { spacing: 3, children: [
33
- e && /* @__PURE__ */ a(s, { direction: "row", align: "center", justify: "between", children: [
34
- /* @__PURE__ */ l(d, { size: "lg", children: e }),
35
- r && /* @__PURE__ */ l(p, { variant: "text", icon: w, size: "sm", children: r })
11
+ import { Section as c } from "../Page/Section.js";
12
+ import { S as a } from "../../Checkmark-RgzvRNxP.js";
13
+ const B = ({ title: i, children: m, checkAllLabel: o }) => /* @__PURE__ */ t(c, { spacing: 3, children: [
14
+ i && /* @__PURE__ */ t(s, { direction: "row", align: "center", justify: "between", children: [
15
+ /* @__PURE__ */ r(p, { size: "lg", children: i }),
16
+ o && /* @__PURE__ */ r(e, { variant: "text", icon: a, size: "sm", children: o })
36
17
  ] }),
37
- /* @__PURE__ */ l(c, { spacing: 3, children: i })
18
+ /* @__PURE__ */ r(n, { spacing: 3, children: m })
38
19
  ] });
39
20
  export {
40
- P as DialogListGroup
21
+ B as DialogListGroup
41
22
  };
@@ -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
  };
@@ -0,0 +1,23 @@
1
+ import { A as D, B as e, a as o, C as i, b as n, c as t, D as r, d as g, H as b, L as d, e as h, f as p, P, g as l, h as C, S as L, i as S, j as c, T as k, u as m } from "../../usePagination-CBMPUKt_.js";
2
+ export {
3
+ D as DsAlert,
4
+ e as DsBadge,
5
+ o as DsButton,
6
+ i as DsCheckbox,
7
+ n as DsChip,
8
+ t as DsCombobox,
9
+ r as DsDetails,
10
+ g as DsDialog,
11
+ b as DsHeading,
12
+ d as DsLink,
13
+ h as DsListItem,
14
+ p as DsListUnordered,
15
+ P as DsPagination,
16
+ l as DsParagraph,
17
+ C as DsPopover,
18
+ L as DsSearch,
19
+ S as DsSkeleton,
20
+ c as DsSpinner,
21
+ k as DsTabs,
22
+ m as useDsPagination
23
+ };
@@ -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
  };
@@ -1,18 +1,18 @@
1
1
  "use client";
2
- import { jsx as y } from "react/jsx-runtime";
2
+ import { jsx as v } from "react/jsx-runtime";
3
3
  import { useState as L } from "react";
4
4
  import "../../index-L8X2o7IH.js";
5
5
  import "../RootProvider/RootProvider.js";
6
6
  import "../Search/AutocompleteBase.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
8
  import { Menu as M } from "../Menu/Menu.js";
9
- const a = (d) => `${d} hits`, R = ({
9
+ const w = (d) => `${d} hits`, k = ({
10
10
  accounts: d = [],
11
- accountGroups: C = {},
11
+ accountGroups: y = {},
12
12
  accountSearch: s,
13
13
  onSelectAccount: m,
14
14
  currentAccount: p,
15
- isVirtualized: I
15
+ isVirtualized: C
16
16
  }) => {
17
17
  var f;
18
18
  const t = d.map((e) => ({
@@ -20,16 +20,16 @@ const a = (d) => `${d} hits`, R = ({
20
20
  groupId: e.groupId || "search",
21
21
  selected: e.selected ?? (p == null ? void 0 : p.id) === e.id,
22
22
  title: e.name,
23
- ...(e == null ? void 0 : e.accountNames) && {
23
+ ...(e == null ? void 0 : e.items) && {
24
24
  avatarGroup: {
25
25
  size: "sm",
26
- items: e.accountNames.map((r) => ({
27
- name: r,
28
- type: e.type
26
+ items: e.items.map((i) => ({
27
+ name: i.name,
28
+ type: i.type || e.type
29
29
  }))
30
30
  }
31
31
  },
32
- ...!(e != null && e.accountNames) && {
32
+ ...!(e != null && e.items) && {
33
33
  avatar: {
34
34
  size: "md",
35
35
  type: e.type,
@@ -39,36 +39,36 @@ const a = (d) => `${d} hits`, R = ({
39
39
  badge: e.badge,
40
40
  alertBadge: e.alertBadge,
41
41
  onClick: () => m == null ? void 0 : m(e.id || e.name)
42
- })), [i, g] = L(""), l = i ? t.filter((e) => {
43
- var r;
44
- return (r = e == null ? void 0 : e.title) == null ? void 0 : r.toLowerCase().includes(i.toLowerCase());
42
+ })), [l, g] = L(""), r = l ? t.filter((e) => {
43
+ var i;
44
+ return (i = e == null ? void 0 : e.title) == null ? void 0 : i.toLowerCase().includes(l.toLowerCase());
45
45
  }).map((e) => ({
46
46
  ...e,
47
47
  groupId: "search"
48
- })) : t, b = i ? {
48
+ })) : t, I = l ? {
49
49
  search: {
50
- title: ((f = s == null ? void 0 : s.getResultsLabel) == null ? void 0 : f.call(s, l.length)) ?? a(l.length)
50
+ title: ((f = s == null ? void 0 : s.getResultsLabel) == null ? void 0 : f.call(s, r.length)) ?? w(r.length)
51
51
  }
52
- } : C, h = {
52
+ } : y, b = {
53
53
  name: "account-search",
54
- value: i,
54
+ value: l,
55
55
  placeholder: (s == null ? void 0 : s.placeholder) ?? "Find account",
56
56
  onChange: (e) => g(e.target.value),
57
57
  onClear: () => g("")
58
- }, v = [
59
- ...l.length > 0 ? l : [{ id: "search", groupId: "search", hidden: !0 }]
58
+ }, h = [
59
+ ...r.length > 0 ? r : [{ id: "search", groupId: "search", hidden: !0 }]
60
60
  ];
61
- return /* @__PURE__ */ y(
61
+ return /* @__PURE__ */ v(
62
62
  M,
63
63
  {
64
64
  theme: "default",
65
- search: s && h,
66
- groups: b,
67
- items: v,
68
- isVirtualized: I
65
+ search: s && b,
66
+ groups: I,
67
+ items: h,
68
+ isVirtualized: C
69
69
  }
70
70
  );
71
71
  };
72
72
  export {
73
- R as AccountMenu
73
+ k as AccountMenu
74
74
  };
@@ -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
  };