@altinn/altinn-components 0.44.4 → 0.45.0

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 (156) hide show
  1. package/dist/ArrowUndo-hge1gMu8.js +24 -0
  2. package/dist/Button-B0t0vz2h.js +23 -0
  3. package/dist/Globe-BcPkcH4E.js +24 -0
  4. package/dist/Heading-By5DKz2H.js +12 -0
  5. package/dist/HeartFill-CYSrJ_xK.js +43 -0
  6. package/dist/PersonCircle-DlX_3kRO.js +24 -0
  7. package/dist/Spinner-BDXfwXIh.js +26 -0
  8. package/dist/assets/AccountMenuButton.css +1 -0
  9. package/dist/assets/AccountSelector.css +1 -0
  10. package/dist/assets/GlobalHeader.css +1 -0
  11. package/dist/assets/GlobalHeaderBase.css +1 -0
  12. package/dist/assets/GlobalMenuButton2.css +1 -0
  13. package/dist/assets/HeaderGroup2.css +1 -0
  14. package/dist/assets/HeaderLogo2.css +1 -0
  15. package/dist/assets/LayoutBody.css +1 -1
  16. package/dist/assets/NotificationItemBase.css +1 -0
  17. package/dist/assets/NotificationItemIcon.css +1 -0
  18. package/dist/assets/globalSearch.css +1 -0
  19. package/dist/components/Account/AccountListItemControls.js +22 -58
  20. package/dist/components/Account/AccountMenu.js +40 -36
  21. package/dist/components/Account/AccountMenuButton.js +131 -0
  22. package/dist/components/Account/AccountNotificationSettings.js +1 -1
  23. package/dist/components/Avatar/Avatar.js +23 -22
  24. package/dist/components/Bookmarks/EditableBookmark.js +1 -1
  25. package/dist/components/Dashboard/DashboardHeader.js +1 -1
  26. package/dist/components/Dropdown/DrawerBase.js +17 -15
  27. package/dist/components/Dropdown/DropdownBase.js +14 -12
  28. package/dist/components/Dropdown/FloatingDropdown.js +6 -6
  29. package/dist/components/DsComponents/index.js +26 -22
  30. package/dist/components/Forms/Checkbox.js +1 -1
  31. package/dist/components/Forms/CheckboxOptions.js +1 -1
  32. package/dist/components/Forms/FieldBase.js +1 -1
  33. package/dist/components/Forms/FieldsetBase.js +1 -1
  34. package/dist/components/Forms/Radio.js +1 -1
  35. package/dist/components/Forms/RadioOptions.js +1 -1
  36. package/dist/components/Forms/SearchField.js +1 -1
  37. package/dist/components/Forms/SelectField.js +1 -1
  38. package/dist/components/Forms/Switch.js +1 -1
  39. package/dist/components/Forms/SwitchOptions.js +1 -1
  40. package/dist/components/Forms/TextField.js +1 -1
  41. package/dist/components/Forms/TextareaField.js +1 -1
  42. package/dist/components/GlobalHeader/AccountSelector.js +138 -0
  43. package/dist/components/GlobalHeader/DigdirLogomark.js +109 -0
  44. package/dist/components/GlobalHeader/GlobalHeader.js +117 -0
  45. package/dist/components/GlobalHeader/GlobalHeaderBase.js +22 -0
  46. package/dist/components/GlobalHeader/GlobalSearch.js +57 -0
  47. package/dist/components/GlobalHeader/GlobalSearchButton.js +53 -0
  48. package/dist/components/GlobalHeader/HeaderGroup.js +8 -0
  49. package/dist/components/GlobalHeader/HeaderLogo.js +17 -0
  50. package/dist/components/GlobalHeader/index.js +6 -0
  51. package/dist/components/GlobalMenu/BackButton.js +6 -24
  52. package/dist/components/GlobalMenu/EndUserLabel.js +10 -29
  53. package/dist/components/GlobalMenu/GlobalMenu.js +38 -61
  54. package/dist/components/GlobalMenu/GlobalMenuButton.js +69 -47
  55. package/dist/components/GlobalMenu/LocaleButton.js +12 -0
  56. package/dist/components/GlobalMenu/LocaleSwitcher.js +34 -0
  57. package/dist/components/GlobalMenu/index.js +6 -12
  58. package/dist/components/GlobalMenu_old/BackButton.js +11 -0
  59. package/dist/components/GlobalMenu_old/EndUserLabel.js +13 -0
  60. package/dist/components/GlobalMenu_old/GlobalMenu.js +75 -0
  61. package/dist/components/GlobalMenu_old/GlobalMenuBase.js +10 -0
  62. package/dist/components/GlobalMenu_old/GlobalMenuButton.js +58 -0
  63. package/dist/components/GlobalMenu_old/LogoutButton.js +14 -0
  64. package/dist/components/GlobalMenu_old/index.js +14 -0
  65. package/dist/components/Header/Header.js +25 -25
  66. package/dist/components/Header/LocaleButton.js +13 -30
  67. package/dist/components/Layout/Layout.js +25 -23
  68. package/dist/components/Layout/LayoutBody.js +1 -1
  69. package/dist/components/List/ListItemSelect.js +1 -1
  70. package/dist/components/Menu/MenuItem.js +1 -1
  71. package/dist/components/Menu/MenuSearch.js +2 -2
  72. package/dist/components/Notifications/NotificationItem.js +17 -0
  73. package/dist/components/Notifications/NotificationItemBase.js +86 -0
  74. package/dist/components/Notifications/NotificationItemControls.js +33 -0
  75. package/dist/components/Notifications/NotificationItemIcon.js +33 -0
  76. package/dist/components/Notifications/index.js +10 -0
  77. package/dist/components/RootProvider/RootProvider.js +42 -30
  78. package/dist/components/Searchbar/Searchbar.js +3 -3
  79. package/dist/components/Settings/BookmarksSettingsItem.js +1 -1
  80. package/dist/components/Settings/SettingsItem.js +22 -11
  81. package/dist/components/Toolbar/ToolbarAccountMenu.js +5 -5
  82. package/dist/components/Toolbar/ToolbarAdd.js +5 -5
  83. package/dist/components/Toolbar/ToolbarFilter.js +5 -5
  84. package/dist/components/Toolbar/ToolbarOptions.js +1 -1
  85. package/dist/components/Toolbar/ToolbarSearch.js +1 -1
  86. package/dist/components/index.js +305 -293
  87. package/dist/functions/date/date.js +16 -0
  88. package/dist/functions/date/date.spec.js +15 -0
  89. package/dist/functions/date/index.js +4 -0
  90. package/dist/functions/index.js +4 -2
  91. package/dist/globalSearch.module-Ejp7X0dO.js +9 -0
  92. package/dist/hooks/index.js +4 -2
  93. package/dist/hooks/useAccountSelector.js +214 -0
  94. package/dist/index-B6sKSsN9.js +2951 -0
  95. package/dist/index.js +304 -288
  96. package/dist/types/languageCode.js +1 -0
  97. package/dist/types/lib/components/Account/AccountMenu.d.ts +1 -1
  98. package/dist/types/lib/components/Account/AccountMenuButton.d.ts +11 -0
  99. package/dist/types/lib/components/Account/AccountMenuButton.stories.d.ts +31 -0
  100. package/dist/types/lib/components/Avatar/Avatar.d.ts +3 -1
  101. package/dist/types/lib/components/Avatar/Avatar.stories.d.ts +16 -1
  102. package/dist/types/lib/components/Dialog/SeenByLogItem.stories.d.ts +1 -0
  103. package/dist/types/lib/components/Dropdown/DrawerBase.d.ts +2 -1
  104. package/dist/types/lib/components/GlobalHeader/AccountSector.stories.d.ts +29 -0
  105. package/dist/types/lib/components/GlobalHeader/AccountSelector.d.ts +11 -0
  106. package/dist/types/lib/components/GlobalHeader/DigdirLogomark.d.ts +5 -0
  107. package/dist/types/lib/components/GlobalHeader/GlobalHeader.d.ts +20 -0
  108. package/dist/types/lib/components/GlobalHeader/GlobalHeader.stories.d.ts +27 -0
  109. package/dist/types/lib/components/GlobalHeader/GlobalHeaderBase.d.ts +9 -0
  110. package/dist/types/lib/components/GlobalHeader/GlobalSearch.d.ts +4 -0
  111. package/dist/types/lib/components/GlobalHeader/GlobalSearchButton.d.ts +4 -0
  112. package/dist/types/lib/components/GlobalHeader/HeaderGroup.d.ts +6 -0
  113. package/dist/types/lib/components/GlobalHeader/HeaderLogo.d.ts +10 -0
  114. package/dist/types/lib/components/GlobalHeader/index.d.ts +2 -0
  115. package/dist/types/lib/components/GlobalMenu/GlobalMenu.d.ts +3 -5
  116. package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +6 -8
  117. package/dist/types/lib/components/GlobalMenu/GlobalMenuButton.d.ts +2 -3
  118. package/dist/types/lib/components/GlobalMenu/GlobalMenuButton.stories.d.ts +5 -9
  119. package/dist/types/lib/components/GlobalMenu/LocaleButton.d.ts +3 -0
  120. package/dist/types/lib/components/GlobalMenu/LocaleSwitcher.d.ts +7 -0
  121. package/dist/types/lib/components/GlobalMenu/index.d.ts +1 -4
  122. package/dist/types/lib/components/GlobalMenu_old/BackButton.d.ts +7 -0
  123. package/dist/types/lib/components/{GlobalMenu → GlobalMenu_old}/CurrentAccount.d.ts +1 -1
  124. package/dist/types/lib/components/GlobalMenu_old/EndUserLabel.d.ts +5 -0
  125. package/dist/types/lib/components/GlobalMenu_old/GlobalMenu.d.ts +18 -0
  126. package/dist/types/lib/components/GlobalMenu_old/GlobalMenu.stories.d.ts +30 -0
  127. package/dist/types/lib/components/GlobalMenu_old/GlobalMenuBase.d.ts +15 -0
  128. package/dist/types/lib/components/GlobalMenu_old/GlobalMenuButton.d.ts +13 -0
  129. package/dist/types/lib/components/GlobalMenu_old/GlobalMenuButton.stories.d.ts +19 -0
  130. package/dist/types/lib/components/GlobalMenu_old/LogoutButton.d.ts +7 -0
  131. package/dist/types/lib/components/GlobalMenu_old/index.d.ts +6 -0
  132. package/dist/types/lib/components/Header/Header.d.ts +2 -2
  133. package/dist/types/lib/components/Header/Header.stories.d.ts +2 -2
  134. package/dist/types/lib/components/Layout/Layout.d.ts +4 -2
  135. package/dist/types/lib/components/Layout/Layout.stories.d.ts +29 -5
  136. package/dist/types/lib/components/Notifications/NotificationItem.d.ts +7 -0
  137. package/dist/types/lib/components/Notifications/NotificationItemBase.d.ts +15 -0
  138. package/dist/types/lib/components/Notifications/NotificationItemControls.d.ts +10 -0
  139. package/dist/types/lib/components/Notifications/NotificationItemIcon.d.ts +11 -0
  140. package/dist/types/lib/components/Notifications/Notifications.stories.d.ts +10 -0
  141. package/dist/types/lib/components/Notifications/index.d.ts +4 -0
  142. package/dist/types/lib/components/RootProvider/RootProvider.d.ts +9 -4
  143. package/dist/types/lib/components/Settings/SettingsItem.d.ts +1 -1
  144. package/dist/types/lib/components/index.d.ts +2 -1
  145. package/dist/types/lib/functions/date/date.d.ts +6 -0
  146. package/dist/types/lib/functions/date/date.spec.d.ts +1 -0
  147. package/dist/types/lib/functions/date/index.d.ts +1 -0
  148. package/dist/types/lib/functions/index.d.ts +1 -0
  149. package/dist/types/lib/hooks/index.d.ts +1 -0
  150. package/dist/types/lib/hooks/useAccountSelector.d.ts +62 -0
  151. package/dist/types/lib/types/index.d.ts +1 -0
  152. package/dist/types/lib/types/languageCode.d.ts +1 -0
  153. package/dist/usePagination-cq1YWZkE.js +889 -0
  154. package/package.json +1 -1
  155. package/dist/usePagination-B24SmI8E.js +0 -3835
  156. /package/dist/components/{GlobalMenu → GlobalMenu_old}/CurrentAccount.js +0 -0
@@ -1,58 +1,80 @@
1
- import { jsxs as l, jsx as o } from "react/jsx-runtime";
2
- import { c as _ } from "../../index-L8X2o7IH.js";
3
- import "react";
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";
1
+ "use client";
2
+ import { jsxs as d, jsx as n } from "react/jsx-runtime";
3
+ import { c as f } from "../../index-L8X2o7IH.js";
4
+ import s, { forwardRef as _ } from "react";
5
+ import { useIsDesktop as y } from "../../hooks/useIsDesktop.js";
6
+ import { Badge as p } from "../Badge/Badge.js";
7
+ import { ButtonBase as b } from "../Button/ButtonBase.js";
8
+ import { ButtonLabel as g } from "../Button/ButtonLabel.js";
9
+ import { ButtonIcon as h } from "../Button/ButtonIcon.js";
9
10
  import "../RootProvider/RootProvider.js";
10
11
  import "../Snackbar/useSnackbar.js";
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
12
+ import { S as v } from "../../XMark-tKk6aExO.js";
13
+ import { u as w } from "../../useId-BVFxCjkq.js";
14
+ import '../../assets/GlobalMenuButton2.css';var O = function(t, l) {
15
+ var o = {};
16
+ for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && l.indexOf(e) < 0 && (o[e] = t[e]);
17
+ if (t != null && typeof Object.getOwnPropertySymbols == "function")
18
+ for (var r = 0, e = Object.getOwnPropertySymbols(t); r < e.length; r++)
19
+ l.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (o[e[r]] = t[e[r]]);
20
+ return o;
21
+ };
22
+ const I = _((t, l) => {
23
+ var { title: o, titleId: e } = t, r = O(t, ["title", "titleId"]);
24
+ let a = w();
25
+ return a = o ? e || "title-" + a : void 0, s.createElement(
26
+ "svg",
27
+ 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: l, "aria-labelledby": a }, r),
28
+ o ? s.createElement("title", { id: a }, o) : null,
29
+ s.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M2.75 6a.75.75 0 0 1 .75-.75h17a.75.75 0 0 1 0 1.5h-17A.75.75 0 0 1 2.75 6m0 6a.75.75 0 0 1 .75-.75h17a.75.75 0 0 1 0 1.5h-17a.75.75 0 0 1-.75-.75m.75 5.25a.75.75 0 0 0 0 1.5h17a.75.75 0 0 0 0-1.5z", clipRule: "evenodd" })
30
+ );
31
+ }), x = "_button_1g9ar_1", j = "_icon_1g9ar_25", B = "_badge_1g9ar_31", i = {
32
+ button: x,
33
+ icon: j,
34
+ badge: B
21
35
  }, H = ({
22
36
  className: t,
23
- as: s = "button",
24
- color: i = "accent",
25
- variant: m = "solid",
26
- currentAccount: c,
27
- expanded: p,
28
- label: r = "Menu",
29
- badge: n,
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 }),
37
- /* @__PURE__ */ o(
38
- f,
37
+ as: l = "button",
38
+ color: o = "accent",
39
+ variant: e = "solid",
40
+ expanded: r,
41
+ label: a = "Menu",
42
+ badge: c,
43
+ ...m
44
+ }) => {
45
+ const u = y();
46
+ return r ? /* @__PURE__ */ d(
47
+ b,
39
48
  {
40
- className: a.avatarIcon,
41
- icon: /* @__PURE__ */ o(u, { ...c == null ? void 0 : c.icon, className: a.avatar })
49
+ ...m,
50
+ as: l,
51
+ type: "button",
52
+ variant: e,
53
+ color: o,
54
+ className: f(i.button, t),
55
+ children: [
56
+ u && /* @__PURE__ */ n(h, { className: i.closeIcon, icon: /* @__PURE__ */ n(v, { className: i.icon, "aria-label": "Close" }) }),
57
+ /* @__PURE__ */ n(g, { children: a }),
58
+ c && /* @__PURE__ */ n(p, { ...c, className: i.badge })
59
+ ]
42
60
  }
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,
61
+ ) : /* @__PURE__ */ d(
62
+ b,
49
63
  {
50
- className: a.loginIcon,
51
- icon: /* @__PURE__ */ o(g, { className: a.icon, "aria-label": "Login Icon" })
64
+ ...m,
65
+ as: l,
66
+ type: "button",
67
+ variant: e,
68
+ color: o,
69
+ className: f(i.button, t),
70
+ children: [
71
+ u && /* @__PURE__ */ n(h, { icon: /* @__PURE__ */ n(I, { className: i.icon, "aria-hidden": !0 }) }),
72
+ /* @__PURE__ */ n(g, { children: a }),
73
+ c && /* @__PURE__ */ n(p, { ...c, className: i.badge })
74
+ ]
52
75
  }
53
- ),
54
- n && /* @__PURE__ */ o(I, { ...n, className: a.badge })
55
- ] });
76
+ );
77
+ };
56
78
  export {
57
79
  H as GlobalMenuButton
58
80
  };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import "../../index-L8X2o7IH.js";
4
+ import "react";
5
+ import "../RootProvider/RootProvider.js";
6
+ import { MenuItem as r } from "../Menu/MenuItem.js";
7
+ import "../Snackbar/useSnackbar.js";
8
+ import { S as m } from "../../Globe-BcPkcH4E.js";
9
+ const a = ({ onClick: o }) => /* @__PURE__ */ t(r, { size: "sm", icon: m, title: "Språk/language", onClick: o });
10
+ export {
11
+ a as LocaleButton
12
+ };
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ import { useRef as d, useMemo as f } from "react";
4
+ import { useEnterKey as g } from "../../hooks/useEnterKey.js";
5
+ import "../../index-L8X2o7IH.js";
6
+ import { useRootContext as h } from "../RootProvider/RootProvider.js";
7
+ import "../Snackbar/useSnackbar.js";
8
+ import { MenuItems as k } from "../Menu/MenuItems.js";
9
+ import { S as v } from "../../Checkmark-Byz_C9x4.js";
10
+ const M = ({ title: c = "Select language", options: i, onSelect: r }) => {
11
+ const s = d(null), { currentId: u, closeAll: a } = h(), l = u === "locale", m = f(() => i.map((e) => ({
12
+ ...e,
13
+ id: String(e.value),
14
+ tabIndex: -1,
15
+ groupId: "locales",
16
+ icon: e.checked ? v : /* @__PURE__ */ o("span", { "aria-hidden": "true" }),
17
+ onClick: () => {
18
+ r == null || r(String(e.value)), a();
19
+ }
20
+ })), [i, r]), p = {
21
+ locales: { title: c || "Språk/language" }
22
+ };
23
+ return g((e) => {
24
+ var n;
25
+ if (l) {
26
+ e.preventDefault();
27
+ const t = (n = s.current) == null ? void 0 : n.querySelector('[data-active="true"]');
28
+ t && (t.tagName === "A" && t.hasAttribute("href") ? t.click() : t.dispatchEvent(new MouseEvent("click", { bubbles: !0 }))), a();
29
+ }
30
+ }), /* @__PURE__ */ o("div", { ref: s, "data-testid": "locale-switcher", children: /* @__PURE__ */ o(k, { groups: p, items: m, keyboardEvents: !0 }) });
31
+ };
32
+ export {
33
+ M as LocaleSwitcher
34
+ };
@@ -1,14 +1,8 @@
1
- import { CurrentAccount as t } from "./CurrentAccount.js";
2
- import { BackButton as n } from "./BackButton.js";
3
- import { LogoutButton as f } from "./LogoutButton.js";
4
- import { EndUserLabel as p } from "./EndUserLabel.js";
5
- import { GlobalMenu as l } from "./GlobalMenu.js";
6
- import { GlobalMenuButton as B } from "./GlobalMenuButton.js";
1
+ import { GlobalMenu as r } from "./GlobalMenu.js";
2
+ import { GlobalMenuButton as l } from "./GlobalMenuButton.js";
3
+ import { LocaleSwitcher as f } from "./LocaleSwitcher.js";
7
4
  export {
8
- n as BackButton,
9
- t as CurrentAccount,
10
- p as EndUserLabel,
11
- l as GlobalMenu,
12
- B as GlobalMenuButton,
13
- f as LogoutButton
5
+ r as GlobalMenu,
6
+ l as GlobalMenuButton,
7
+ f as LocaleSwitcher
14
8
  };
@@ -0,0 +1,11 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import "../../index-L8X2o7IH.js";
3
+ import "react";
4
+ import "../RootProvider/RootProvider.js";
5
+ import "../Snackbar/useSnackbar.js";
6
+ import { MenuItem as i } from "../Menu/MenuItem.js";
7
+ import { S as p } from "../../ArrowUndo-hge1gMu8.js";
8
+ const d = ({ label: o, onClick: r, as: t }) => /* @__PURE__ */ m(i, { size: "sm", id: "back", icon: p, title: o, onClick: r, as: t });
9
+ export {
10
+ d as BackButton
11
+ };
@@ -0,0 +1,13 @@
1
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
+ import { S as l } from "../../PersonCircle-DlX_3kRO.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
+ };
@@ -0,0 +1,75 @@
1
+ "use client";
2
+ import { jsxs as s, jsx as r, Fragment as T } from "react/jsx-runtime";
3
+ import { useState as H, useMemo as W } from "react";
4
+ import "../../index-L8X2o7IH.js";
5
+ import { AccountMenu as _ } from "../Account/AccountMenu.js";
6
+ import "../RootProvider/RootProvider.js";
7
+ import { CurrentAccount as q } from "./CurrentAccount.js";
8
+ import { BackButton as w } from "./BackButton.js";
9
+ import { LogoutButton as G } from "./LogoutButton.js";
10
+ import { MenuListItem as x } from "../Menu/MenuBase.js";
11
+ import { Menu as y } from "../Menu/Menu.js";
12
+ import "../Snackbar/useSnackbar.js";
13
+ import { GlobalMenuBase as g, GlobalMenuHeader as z, GlobalMenuFooter as b } from "./GlobalMenuBase.js";
14
+ const V = ({
15
+ accountMenu: m,
16
+ menu: l,
17
+ backLabel: j = "Back",
18
+ currentAccount: p,
19
+ onSelectAccount: f,
20
+ onClose: a,
21
+ logoutButton: t,
22
+ ariaLabel: h = "Menu"
23
+ }) => {
24
+ var v;
25
+ const [B, F] = H(!1), k = () => {
26
+ F((i) => !i);
27
+ }, M = (i) => {
28
+ k(), a == null || a(), f == null || f(i);
29
+ }, o = W(() => ((l == null ? void 0 : l.items) ?? []).map((i) => ({
30
+ ...i,
31
+ onClick: () => {
32
+ var d;
33
+ (d = i.onClick) == null || d.call(i), a == null || a();
34
+ },
35
+ items: Array.isArray(i.items) ? i.items.map((d) => ({
36
+ ...d,
37
+ onClick: () => {
38
+ var e;
39
+ (e = d.onClick) == null || e.call(d), a == null || a();
40
+ }
41
+ })) : void 0
42
+ })), [l, a]);
43
+ if (B)
44
+ return /* @__PURE__ */ s(g, { "aria-label": h, children: [
45
+ /* @__PURE__ */ r(z, { children: /* @__PURE__ */ r(w, { onClick: k, label: j }) }),
46
+ /* @__PURE__ */ r(x, { as: "div", role: "separator" }),
47
+ m && /* @__PURE__ */ r(_, { ...m, currentAccount: p, onSelectAccount: M })
48
+ ] });
49
+ if (p) {
50
+ const i = m && ((v = m == null ? void 0 : m.items) == null ? void 0 : v.length) > 1;
51
+ return /* @__PURE__ */ s(g, { "aria-label": h, color: p == null ? void 0 : p.type, children: [
52
+ p && /* @__PURE__ */ s(T, { children: [
53
+ /* @__PURE__ */ r(
54
+ q,
55
+ {
56
+ account: p,
57
+ multipleAccounts: i,
58
+ as: i ? "button" : "div",
59
+ onClick: i ? k : void 0
60
+ }
61
+ ),
62
+ /* @__PURE__ */ r(x, { as: "div", role: "separator" })
63
+ ] }),
64
+ l && /* @__PURE__ */ r(y, { ...l, items: o }),
65
+ t && /* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(G, { ...t }) })
66
+ ] });
67
+ }
68
+ return /* @__PURE__ */ s(g, { "aria-label": h, children: [
69
+ l && /* @__PURE__ */ r(y, { ...l, items: o }),
70
+ t && /* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(G, { ...t }) })
71
+ ] });
72
+ };
73
+ export {
74
+ V as GlobalMenu_old
75
+ };
@@ -0,0 +1,10 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import '../../assets/GlobalMenuBase.css';const n = "_nav_b7k4e_1", s = "_footer_b7k4e_6", a = {
3
+ nav: n,
4
+ footer: s
5
+ }, c = ({ color: e, children: r, ...t }) => /* @__PURE__ */ o("nav", { className: a.nav, "data-color": e, ...t, children: r }), f = ({ children: e }) => /* @__PURE__ */ o("header", { className: a.header, children: e }), u = ({ children: e }) => /* @__PURE__ */ o("footer", { className: a.footer, children: e });
6
+ export {
7
+ c as GlobalMenuBase,
8
+ u as GlobalMenuFooter,
9
+ f as GlobalMenuHeader
10
+ };
@@ -0,0 +1,58 @@
1
+ import { jsxs as e, jsx as o } from "react/jsx-runtime";
2
+ import { c as _ } from "../../index-L8X2o7IH.js";
3
+ import "react";
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";
9
+ import "../RootProvider/RootProvider.js";
10
+ import "../Snackbar/useSnackbar.js";
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 = ({
22
+ className: t,
23
+ as: s = "button",
24
+ color: i = "accent",
25
+ variant: m = "solid",
26
+ currentAccount: c,
27
+ expanded: p,
28
+ label: l = "Menu",
29
+ badge: n,
30
+ ...r
31
+ }) => p ? /* @__PURE__ */ e(h, { ...r, as: s, variant: m, color: i, className: _(a.button, t), children: [
32
+ /* @__PURE__ */ o(d, { children: l }),
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__ */ e(h, { ...r, as: s, variant: m, color: i, className: _(a.button, t), children: [
36
+ /* @__PURE__ */ o(d, { children: l }),
37
+ /* @__PURE__ */ o(
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__ */ e(h, { ...r, as: s, variant: m, color: i, className: _(a.button, t), children: [
46
+ /* @__PURE__ */ o(d, { children: l }),
47
+ /* @__PURE__ */ o(
48
+ f,
49
+ {
50
+ className: a.loginIcon,
51
+ icon: /* @__PURE__ */ o(g, { className: a.icon, "aria-label": "Login Icon" })
52
+ }
53
+ ),
54
+ n && /* @__PURE__ */ o(I, { ...n, className: a.badge })
55
+ ] });
56
+ export {
57
+ H as GlobalMenuButton_old
58
+ };
@@ -0,0 +1,14 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { ButtonBase as r } from "../Button/ButtonBase.js";
3
+ import { ButtonLabel as s } from "../Button/ButtonLabel.js";
4
+ import "../../index-L8X2o7IH.js";
5
+ import "react";
6
+ import "../RootProvider/RootProvider.js";
7
+ import "../Snackbar/useSnackbar.js";
8
+ import '../../assets/LogoutButton.css';const i = "_button_1260s_1", a = "_label_1260s_5", o = {
9
+ button: i,
10
+ label: a
11
+ }, B = ({ label: l = "Logout", children: e, onClick: n }) => /* @__PURE__ */ t(r, { className: o.button, variant: "outline", size: "lg", onClick: n, children: /* @__PURE__ */ t(s, { className: o.label, size: "lg", children: e || l }) });
12
+ export {
13
+ B as LogoutButton
14
+ };
@@ -0,0 +1,14 @@
1
+ import { CurrentAccount as t } from "./CurrentAccount.js";
2
+ import { BackButton as n } from "./BackButton.js";
3
+ import { LogoutButton as l } from "./LogoutButton.js";
4
+ import { EndUserLabel as m } from "./EndUserLabel.js";
5
+ import { GlobalMenu_old as x } from "./GlobalMenu.js";
6
+ import { GlobalMenuButton_old as B } from "./GlobalMenuButton.js";
7
+ export {
8
+ n as BackButton,
9
+ t as CurrentAccount,
10
+ m as EndUserLabel,
11
+ B as GlobalMenuButton_old,
12
+ x as GlobalMenu_old,
13
+ l as LogoutButton
14
+ };
@@ -1,19 +1,19 @@
1
1
  "use client";
2
- import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
+ import { jsxs as m, jsx as o } from "react/jsx-runtime";
3
3
  import "../../index-L8X2o7IH.js";
4
4
  import "react";
5
+ import { useIsDesktop as H } from "../../hooks/useIsDesktop.js";
5
6
  import { useRootContext as S } from "../RootProvider/RootProvider.js";
6
7
  import { DropdownBase as k } from "../Dropdown/DropdownBase.js";
7
8
  import { DrawerBase as B } from "../Dropdown/DrawerBase.js";
8
- import { useIsDesktop as D } from "../../hooks/useIsDesktop.js";
9
- import { GlobalMenu as f } from "../GlobalMenu/GlobalMenu.js";
10
- import { GlobalMenuButton as I } from "../GlobalMenu/GlobalMenuButton.js";
11
- import { HeaderBase as l } from "./HeaderBase.js";
9
+ import { GlobalMenu_old as f } from "../GlobalMenu_old/GlobalMenu.js";
10
+ import { GlobalMenuButton_old as D } from "../GlobalMenu_old/GlobalMenuButton.js";
11
+ import { HeaderBase as I } from "./HeaderBase.js";
12
12
  import { HeaderLogo as F } from "./HeaderLogo.js";
13
13
  import { HeaderGroup as G } from "./HeaderGroup.js";
14
14
  import { HeaderSearch as w } from "./HeaderSearch.js";
15
15
  import { LocaleSwitcher as L } from "./LocaleSwitcher.js";
16
- import { Searchbar as x } from "../Searchbar/Searchbar.js";
16
+ import { Searchbar as _ } from "../Searchbar/Searchbar.js";
17
17
  import "../Snackbar/useSnackbar.js";
18
18
  import '../../assets/Header.css';const N = "_drawer_afyu3_1", j = "_dropdown_afyu3_6", z = "_relative_afyu3_19", n = {
19
19
  drawer: N,
@@ -21,38 +21,38 @@ import '../../assets/Header.css';const N = "_drawer_afyu3_1", j = "_dropdown_afy
21
21
  relative: z
22
22
  }, A = ({
23
23
  globalMenu: e,
24
- desktopMenu: _,
24
+ desktopMenu: x,
25
25
  mobileMenu: C,
26
26
  locale: p,
27
27
  search: s,
28
28
  currentAccount: t,
29
29
  logo: u = {},
30
- badge: v
30
+ badge: l
31
31
  }) => {
32
- const { currentId: r, toggleId: i, openId: y, closeAll: m } = S(), c = () => {
33
- y("search");
32
+ const { currentId: r, toggleId: i, openId: v, closeAll: d } = S(), c = () => {
33
+ v("search");
34
34
  }, a = () => {
35
35
  i("search");
36
- }, H = () => {
36
+ }, y = () => {
37
37
  i("menu");
38
- }, h = D();
39
- return /* @__PURE__ */ d(
40
- l,
38
+ }, h = H();
39
+ return /* @__PURE__ */ m(
40
+ I,
41
41
  {
42
42
  currentId: r,
43
43
  open: r === "search" || r === "menu" || r === "locale",
44
- onClose: m,
44
+ onClose: d,
45
45
  children: [
46
- /* @__PURE__ */ o(F, { ...u, badge: v }),
47
- s && h && /* @__PURE__ */ o(w, { expanded: r === "search", children: /* @__PURE__ */ o(x, { ...s, expanded: r === "search", onClose: a, onFocus: c }) }),
48
- /* @__PURE__ */ d(G, { children: [
46
+ /* @__PURE__ */ o(F, { ...u, badge: l }),
47
+ s && h && /* @__PURE__ */ o(w, { expanded: r === "search", children: /* @__PURE__ */ o(_, { ...s, expanded: r === "search", onClose: a, onFocus: c }) }),
48
+ /* @__PURE__ */ m(G, { children: [
49
49
  p && /* @__PURE__ */ o(L, { ...p }),
50
- /* @__PURE__ */ d("div", { className: n.relative, children: [
50
+ /* @__PURE__ */ m("div", { className: n.relative, children: [
51
51
  /* @__PURE__ */ o(
52
- I,
52
+ D,
53
53
  {
54
54
  currentAccount: t,
55
- onClick: H,
55
+ onClick: y,
56
56
  expanded: r === "menu",
57
57
  label: e == null ? void 0 : e.menuLabel
58
58
  }
@@ -70,23 +70,23 @@ import '../../assets/Header.css';const N = "_drawer_afyu3_1", j = "_dropdown_afy
70
70
  f,
71
71
  {
72
72
  ...e,
73
- menu: _ || (e == null ? void 0 : e.menu),
73
+ menu: x || (e == null ? void 0 : e.menu),
74
74
  currentAccount: t,
75
- onClose: m
75
+ onClose: d
76
76
  }
77
77
  )
78
78
  }
79
79
  )
80
80
  ] })
81
81
  ] }),
82
- s && !h && /* @__PURE__ */ o(w, { expanded: r === "search", children: /* @__PURE__ */ o(x, { ...s, expanded: r === "search", onClose: a, onFocus: c }) }),
82
+ s && !h && /* @__PURE__ */ o(w, { expanded: r === "search", children: /* @__PURE__ */ o(_, { ...s, expanded: r === "search", onClose: a, onFocus: c }) }),
83
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
88
  currentAccount: t,
89
- onClose: m
89
+ onClose: d
90
90
  }
91
91
  ) })
92
92
  ]
@@ -1,44 +1,27 @@
1
1
  "use client";
2
2
  import { jsx as i } from "react/jsx-runtime";
3
3
  import "../../index-L8X2o7IH.js";
4
- import a, { forwardRef as c } from "react";
5
- import { IconButton as m } from "../Button/IconButton.js";
4
+ import "react";
5
+ import { IconButton as r } from "../Button/IconButton.js";
6
6
  import "../RootProvider/RootProvider.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
- import { u } from "../../useId-BVFxCjkq.js";
9
- import '../../assets/LocaleButton.css';var d = function(e, n) {
10
- var o = {};
11
- for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
12
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
13
- for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
14
- n.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (o[t[r]] = e[t[r]]);
15
- return o;
16
- };
17
- const f = c((e, n) => {
18
- var { title: o, titleId: t } = e, r = d(e, ["title", "titleId"]);
19
- let l = u();
20
- return l = o ? t || "title-" + l : void 0, a.createElement(
21
- "svg",
22
- 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": l }, r),
23
- o ? a.createElement("title", { id: l }, o) : null,
24
- a.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" })
25
- );
26
- }), s = "_button_utwi0_1", p = {
8
+ import { S as m } from "../../Globe-BcPkcH4E.js";
9
+ import '../../assets/LocaleButton.css';const s = "_button_utwi0_1", c = {
27
10
  button: s
28
- }, _ = ({ id: e = "language-switcher", expanded: n, onClick: o, onBlurCapture: t }) => /* @__PURE__ */ i(
29
- m,
11
+ }, f = ({ id: t = "language-switcher", expanded: o, onClick: e, onBlurCapture: n }) => /* @__PURE__ */ i(
12
+ r,
30
13
  {
31
- className: p.button,
14
+ className: c.button,
32
15
  size: "md",
33
- icon: f,
16
+ icon: m,
34
17
  iconSize: "md",
35
18
  variant: "text",
36
- selected: n,
37
- onClick: o,
38
- iconAltText: `Open ${e}`,
39
- onBlurCapture: t
19
+ selected: o,
20
+ onClick: e,
21
+ iconAltText: `Open ${t}`,
22
+ onBlurCapture: n
40
23
  }
41
24
  );
42
25
  export {
43
- _ as LocaleButton
26
+ f as LocaleButton
44
27
  };
@@ -1,41 +1,43 @@
1
1
  "use client";
2
2
  import { jsxs as p, jsx as m } from "react/jsx-runtime";
3
- import { LayoutBase as h } from "./LayoutBase.js";
4
- import { LayoutBody as L } from "./LayoutBody.js";
5
- import { LayoutContent as x } from "./LayoutContent.js";
6
- import { LayoutSidebar as j } from "./LayoutSidebar.js";
7
- import { Footer as B } from "../Footer/Footer.js";
8
- import { Header as C } from "../Header/Header.js";
3
+ import { LayoutBase as L } from "./LayoutBase.js";
4
+ import { LayoutBody as x } from "./LayoutBody.js";
5
+ import { LayoutContent as j } from "./LayoutContent.js";
6
+ import { LayoutSidebar as B } from "./LayoutSidebar.js";
7
+ import { Footer as C } from "../Footer/Footer.js";
8
+ import { GlobalHeader as F } from "../GlobalHeader/GlobalHeader.js";
9
9
  import "../../index-L8X2o7IH.js";
10
10
  import "react";
11
- import { useRootContext as S } from "../RootProvider/RootProvider.js";
12
- import { Menu as F } from "../Menu/Menu.js";
11
+ import { useRootContext as H } from "../RootProvider/RootProvider.js";
12
+ import { Menu as S } from "../Menu/Menu.js";
13
+ import { Header as G } from "../Header/Header.js";
13
14
  import "../Snackbar/useSnackbar.js";
14
- import { SkipLink as H } from "../SkipLink/SkipLink.js";
15
- const J = ({
15
+ import { SkipLink as I } from "../SkipLink/SkipLink.js";
16
+ const O = ({
16
17
  color: c,
17
18
  theme: f = "subtle",
18
- header: u,
19
+ header: t,
19
20
  footer: n,
20
21
  sidebar: o,
21
- content: t = {},
22
+ content: l = {},
22
23
  children: y,
23
- skipLink: r
24
+ skipLink: r,
25
+ useGlobalHeader: h = !1
24
26
  }) => {
25
- const { currentId: l } = S();
26
- return /* @__PURE__ */ p(h, { color: c, theme: f, currentId: l, children: [
27
- r && /* @__PURE__ */ m(H, { ...r }),
28
- u && /* @__PURE__ */ m(C, { ...u }),
29
- /* @__PURE__ */ p(L, { currentId: l, children: [
30
- o && /* @__PURE__ */ p(j, { hidden: o == null ? void 0 : o.hidden, color: o == null ? void 0 : o.color, ...o, children: [
31
- (o == null ? void 0 : o.menu) && /* @__PURE__ */ m(F, { ...o == null ? void 0 : o.menu }),
27
+ const { currentId: u } = H();
28
+ return /* @__PURE__ */ p(L, { color: c, theme: u === "accountFullscreen" ? "default" : f, currentId: u, children: [
29
+ r && /* @__PURE__ */ m(I, { ...r }),
30
+ t && (h ? /* @__PURE__ */ m(F, { ...t }) : /* @__PURE__ */ m(G, { ...t })),
31
+ /* @__PURE__ */ p(x, { currentId: u, children: [
32
+ o && /* @__PURE__ */ p(B, { hidden: o == null ? void 0 : o.hidden, color: o == null ? void 0 : o.color, ...o, children: [
33
+ (o == null ? void 0 : o.menu) && /* @__PURE__ */ m(S, { ...o == null ? void 0 : o.menu }),
32
34
  o == null ? void 0 : o.children
33
35
  ] }),
34
- /* @__PURE__ */ m(x, { color: t == null ? void 0 : t.color, id: "main-content", children: y })
36
+ /* @__PURE__ */ m(j, { color: l == null ? void 0 : l.color, id: "main-content", children: y })
35
37
  ] }),
36
- n && /* @__PURE__ */ m(B, { ...n })
38
+ n && /* @__PURE__ */ m(C, { ...n })
37
39
  ] });
38
40
  };
39
41
  export {
40
- J as Layout
42
+ O as Layout
41
43
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
- import '../../assets/LayoutBody.css';const s = "_body_18zk9_1", r = {
2
+ import '../../assets/LayoutBody.css';const s = "_body_1voih_1", r = {
3
3
  body: s
4
4
  }, a = ({ currentId: o, children: t }) => /* @__PURE__ */ d("div", { className: r.body, "data-current-id": o, children: t });
5
5
  export {