@altinn/altinn-components 0.14.3 → 0.15.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 (126) hide show
  1. package/README.md +16 -4
  2. package/dist/altinn-theme.css +3 -0
  3. package/dist/assets/Avatar.css +1 -1
  4. package/dist/assets/AvatarGroup.css +1 -1
  5. package/dist/assets/Badge.css +1 -1
  6. package/dist/assets/ButtonLabel.css +1 -1
  7. package/dist/assets/Icon.css +1 -1
  8. package/dist/assets/ListItemBase.css +1 -1
  9. package/dist/assets/ListItemControls.css +1 -1
  10. package/dist/assets/ListItemHeader.css +1 -1
  11. package/dist/assets/ListItemLink.css +1 -1
  12. package/dist/assets/ListItemSelect.css +1 -1
  13. package/dist/assets/MenuItemBase.css +1 -1
  14. package/dist/assets/MenuItemIcon.css +1 -0
  15. package/dist/assets/MenuItemLabel.css +1 -1
  16. package/dist/assets/PageTabs.css +1 -0
  17. package/dist/components/AccessAreaList/AccessAreaListItem.js +29 -32
  18. package/dist/components/AccessPackageList/AccessPackageListItem.js +7 -7
  19. package/dist/components/Attachment/AttachmentLink.js +14 -10
  20. package/dist/components/Autocomplete/AutocompleteItem.js +20 -11
  21. package/dist/components/Avatar/Avatar.js +27 -27
  22. package/dist/components/Avatar/AvatarGroup.js +17 -16
  23. package/dist/components/Badge/Badge.js +5 -12
  24. package/dist/components/Button/ButtonIcon.js +9 -5
  25. package/dist/components/Button/ButtonLabel.js +4 -4
  26. package/dist/components/Dialog/Dialog.js +3 -3
  27. package/dist/components/Dialog/DialogAttachments.js +1 -1
  28. package/dist/components/Dialog/DialogContent.js +1 -1
  29. package/dist/components/Dialog/DialogHistoryItem.js +1 -1
  30. package/dist/components/Dialog/DialogListGroup.js +1 -1
  31. package/dist/components/Dialog/DialogListItem.js +80 -72
  32. package/dist/components/Dialog/DialogSection.js +1 -1
  33. package/dist/components/Dialog/DraftDialog.js +1 -1
  34. package/dist/components/GlobalMenu/AccountButton.js +4 -4
  35. package/dist/components/GlobalMenu/AccountMenu.js +27 -16
  36. package/dist/components/GlobalMenu/BackButton.js +2 -2
  37. package/dist/components/GlobalMenu/GlobalMenu.js +21 -21
  38. package/dist/components/GlobalMenu/GlobalMenuBase.js +9 -9
  39. package/dist/components/Header/HeaderButton.js +21 -17
  40. package/dist/components/Icon/Icon.js +10 -9
  41. package/dist/components/Icon/IconOrAvatar.js +27 -0
  42. package/dist/components/Icon/index.js +8 -6
  43. package/dist/components/LayoutAction/ActionHeader.js +1 -1
  44. package/dist/components/List/ListBase.js +3 -3
  45. package/dist/components/List/ListItem.js +90 -51
  46. package/dist/components/List/ListItemBase.js +63 -29
  47. package/dist/components/List/ListItemControls.js +8 -17
  48. package/dist/components/List/ListItemHeader.js +85 -59
  49. package/dist/components/List/ListItemIcon.js +25 -0
  50. package/dist/components/List/ListItemLabel.js +6 -6
  51. package/dist/components/List/ListItemLink.js +29 -27
  52. package/dist/components/List/ListItemSelect.js +11 -11
  53. package/dist/components/List/index.js +8 -8
  54. package/dist/components/Menu/Menu.js +18 -16
  55. package/dist/components/Menu/MenuBase.js +6 -6
  56. package/dist/components/Menu/MenuItem.js +64 -51
  57. package/dist/components/Menu/MenuItemBase.js +26 -26
  58. package/dist/components/Menu/MenuItemIcon.js +27 -0
  59. package/dist/components/Menu/MenuItemLabel.js +7 -7
  60. package/dist/components/Menu/MenuItems.js +32 -29
  61. package/dist/components/Menu/MenuOption.js +3 -3
  62. package/dist/components/Menu/index.js +14 -14
  63. package/dist/components/Meta/MetaItemMedia.js +13 -8
  64. package/dist/components/Page/PageHeader.js +33 -12
  65. package/dist/components/Page/PageMenu.js +5 -5
  66. package/dist/components/Page/PageTabs.js +16 -0
  67. package/dist/components/Page/index.js +14 -12
  68. package/dist/components/RootProvider/RootProvider.js +3 -3
  69. package/dist/components/Searchbar/SearchField.js +19 -16
  70. package/dist/components/Toolbar/Toolbar.js +7 -7
  71. package/dist/components/Transmission/TransmissionItem.js +1 -1
  72. package/dist/components/index.js +181 -177
  73. package/dist/{globalMenu-XcVgsnCz.js → globalMenu-C6osDiF4.js} +1 -0
  74. package/dist/index.js +181 -177
  75. package/dist/types/lib/components/AccessPackageList/AccessPackageList.d.ts +1 -1
  76. package/dist/types/lib/components/Avatar/AvatarGroup.stories.d.ts +6 -2
  77. package/dist/types/lib/components/Avatar/avatar.stories.d.ts +3 -1
  78. package/dist/types/lib/components/Badge/Badge.d.ts +4 -4
  79. package/dist/types/lib/components/Badge/Badge.stories.d.ts +1 -1
  80. package/dist/types/lib/components/ContextMenu/ContextMenu.stories.d.ts +3 -23
  81. package/dist/types/lib/components/Icon/Icon.d.ts +3 -3
  82. package/dist/types/lib/components/Icon/IconOrAvatar.d.ts +12 -0
  83. package/dist/types/lib/components/Icon/index.d.ts +1 -0
  84. package/dist/types/lib/components/Layout/Layout.stories.d.ts +0 -1
  85. package/dist/types/lib/components/LayoutAction/LayoutAction.stories.d.ts +3 -15
  86. package/dist/types/lib/components/List/List.d.ts +1 -1
  87. package/dist/types/lib/components/List/ListBase.d.ts +8 -4
  88. package/dist/types/lib/components/{Header/HeaderLogo.stories.d.ts → List/ListBase.stories.d.ts} +4 -2
  89. package/dist/types/lib/components/List/ListItem.d.ts +5 -10
  90. package/dist/types/lib/components/List/ListItem.stories.d.ts +14 -9
  91. package/dist/types/lib/components/List/ListItemBase.d.ts +8 -2
  92. package/dist/types/lib/components/List/ListItemControls.d.ts +1 -8
  93. package/dist/types/lib/components/List/ListItemHeader.d.ts +5 -15
  94. package/dist/types/lib/components/List/ListItemIcon.d.ts +13 -0
  95. package/dist/types/lib/components/List/ListItemLink.d.ts +2 -1
  96. package/dist/types/lib/components/List/MultilevelList.stories.d.ts +5 -0
  97. package/dist/types/lib/components/List/Specimens.stories.d.ts +13 -0
  98. package/dist/types/lib/components/List/index.d.ts +1 -1
  99. package/dist/types/lib/components/Menu/Menu.d.ts +1 -1
  100. package/dist/types/lib/components/Menu/Menu.stories.d.ts +4 -27
  101. package/dist/types/lib/components/Menu/MenuBase.d.ts +4 -3
  102. package/dist/types/lib/components/Menu/MenuItem.d.ts +7 -7
  103. package/dist/types/lib/components/Menu/MenuItemBase.d.ts +1 -1
  104. package/dist/types/lib/components/Menu/MenuItemIcon.d.ts +8 -0
  105. package/dist/types/lib/components/Menu/MenuItems.d.ts +6 -4
  106. package/dist/types/lib/components/Menu/Patterns.stories.d.ts +72 -0
  107. package/dist/types/lib/components/Menu/index.d.ts +1 -1
  108. package/dist/types/lib/components/Page/PageHeader.d.ts +7 -2
  109. package/dist/types/lib/components/Page/PageHeader.stories.d.ts +1 -1
  110. package/dist/types/lib/components/Page/PageMenu.stories.d.ts +3 -15
  111. package/dist/types/lib/components/Page/PageTabs.d.ts +8 -0
  112. package/dist/types/lib/components/Page/index.d.ts +1 -0
  113. package/dist/types/lib/types/color.d.ts +1 -1
  114. package/package.json +27 -26
  115. package/dist/assets/ListItemMedia.css +0 -1
  116. package/dist/assets/MenuItemMedia.css +0 -1
  117. package/dist/components/List/ListItemMedia.js +0 -39
  118. package/dist/components/Menu/MenuItemMedia.js +0 -50
  119. package/dist/types/lib/components/Layout/LayoutBase.stories.d.ts +0 -11
  120. package/dist/types/lib/components/Layout/LayoutBody.stories.d.ts +0 -11
  121. package/dist/types/lib/components/Layout/LayoutContent.stories.d.ts +0 -11
  122. package/dist/types/lib/components/Layout/LayoutSidebar.stories.d.ts +0 -11
  123. package/dist/types/lib/components/List/ListItemHeader.stories.d.ts +0 -23
  124. package/dist/types/lib/components/List/ListItemMedia.d.ts +0 -13
  125. package/dist/types/lib/components/Menu/MenuItem.stories.d.ts +0 -25
  126. package/dist/types/lib/components/Menu/MenuItemMedia.d.ts +0 -14
@@ -1,103 +1,111 @@
1
- import { jsx as r, jsxs as m } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "../Icon/SvgIcon.js";
4
4
  import "react";
5
5
  import "../Autocomplete/AutocompleteBase.js";
6
- import { DialogMetadata as N } from "./DialogMetadata.js";
7
- import { DialogByline as E } from "./DialogByline.js";
8
- import { Skeleton as F } from "../Skeleton/Skeleton.js";
9
- import { DialogSelect as G } from "./DialogSelect.js";
10
- import { DialogHeading as J } from "./DialogHeading.js";
6
+ import { DialogMetadata as y } from "./DialogMetadata.js";
7
+ import { DialogByline as w } from "./DialogByline.js";
8
+ import { Skeleton as C } from "../Skeleton/Skeleton.js";
9
+ import { DialogSelect as E } from "./DialogSelect.js";
10
+ import { DialogHeading as F } from "./DialogHeading.js";
11
11
  import "../RootProvider/RootProvider.js";
12
- import { ListItemBase as b } from "../List/ListItemBase.js";
13
- import { ListItemLink as g } from "../List/ListItemLink.js";
12
+ import { ListItemBase as G } from "../List/ListItemBase.js";
13
+ import { ListItemLink as J } from "../List/ListItemLink.js";
14
14
  import { ListItemLabel as K } from "../List/ListItemLabel.js";
15
+ import { ListItem as O } from "../List/ListItem.js";
15
16
  import "../Snackbar/useSnackbar.js";
16
- import '../../assets/DialogListItem.css';const O = "_link_1gdsf_1", P = "_border_1gdsf_22", Q = "_select_1gdsf_61", R = "_header_1gdsf_68", U = "_summary_1gdsf_80", V = "_footer_1gdsf_108", W = "_touchedBy_1gdsf_112", t = {
17
- link: O,
18
- border: P,
19
- select: Q,
20
- header: R,
21
- summary: U,
22
- footer: V,
23
- touchedBy: W
24
- }, de = ({
25
- size: e = "xl",
26
- state: k = "normal",
17
+ import '../../assets/DialogListItem.css';const P = "_link_1gdsf_1", Q = "_border_1gdsf_22", R = "_select_1gdsf_61", U = "_header_1gdsf_68", V = "_summary_1gdsf_80", W = "_footer_1gdsf_108", X = "_touchedBy_1gdsf_112", r = {
18
+ link: P,
19
+ border: Q,
20
+ select: R,
21
+ header: U,
22
+ summary: V,
23
+ footer: W,
24
+ touchedBy: X
25
+ }, ft = ({
26
+ size: t = "xl",
27
+ state: g = "normal",
27
28
  loading: o,
28
29
  select: l,
29
- selected: s,
30
- status: B,
31
- sender: d,
32
- recipient: x,
33
- recipientLabel: D = "to",
34
- recipientGroup: L = !1,
35
- updatedAt: i,
36
- updatedAtLabel: n,
37
- archivedAt: f,
38
- archivedAtLabel: I,
30
+ selected: a,
31
+ status: N,
32
+ sender: i,
33
+ recipient: B,
34
+ recipientLabel: k = "to",
35
+ recipientGroup: x = !1,
36
+ updatedAt: d,
37
+ updatedAtLabel: f,
38
+ archivedAt: n,
39
+ archivedAtLabel: L,
39
40
  trashedAt: h,
40
- trashedAtLabel: S,
41
- label: j,
42
- dueAt: v,
43
- dueAtLabel: H,
44
- seen: c = !1,
45
- seenBy: M,
46
- touchedBy: T,
47
- attachmentsCount: q,
41
+ trashedAtLabel: D,
42
+ label: I,
43
+ dueAt: S,
44
+ dueAtLabel: j,
45
+ seen: m = !1,
46
+ seenBy: v,
47
+ touchedBy: H,
48
+ attachmentsCount: M,
48
49
  title: _,
49
50
  description: p,
50
- summary: u,
51
- theme: w,
52
- ...a
51
+ summary: b,
52
+ theme: T = "default",
53
+ ...s
53
54
  }) => {
54
- const C = h ? "trashed" : f ? "archived" : k, y = w || s ? "subtle" : "default";
55
- return e === "xs" || e === "sm" || e === "md" ? /* @__PURE__ */ r(b, { ...a, size: e, selected: s, theme: y, children: /* @__PURE__ */ r(g, { ...a, size: e, className: t.link, children: /* @__PURE__ */ m("div", { className: t.border, "data-size": e, "data-seen": c, "data-loading": o, children: [
56
- /* @__PURE__ */ r(K, { loading: o, size: e, title: _, description: u || p }),
57
- /* @__PURE__ */ r(N, { loading: o, sender: d, updatedAt: i, updatedAtLabel: n })
58
- ] }) }) }) : /* @__PURE__ */ m(b, { ...a, size: e, selected: s, theme: y, children: [
59
- /* @__PURE__ */ r(g, { ...a, size: e, className: t.link, children: /* @__PURE__ */ m("div", { className: t.border, "data-size": e, "data-seen": c, "data-loading": o, children: [
60
- /* @__PURE__ */ m("header", { className: t.header, "data-size": e, children: [
61
- /* @__PURE__ */ r(J, { loading: o, size: e, state: C, label: j, seen: c, children: _ }),
62
- /* @__PURE__ */ r(
63
- E,
55
+ const q = h ? "trashed" : n ? "archived" : g, u = a ? "subtle" : T;
56
+ return t === "xs" || t === "sm" || t === "md" ? /* @__PURE__ */ e(
57
+ O,
58
+ {
59
+ ...s,
60
+ size: t,
61
+ selected: a,
62
+ theme: u,
63
+ label: /* @__PURE__ */ e("div", { className: r.border, "data-size": t, "data-seen": m, "data-loading": o, children: /* @__PURE__ */ e(K, { loading: o, size: t, title: _, description: b || p }) }),
64
+ badge: /* @__PURE__ */ e(y, { loading: o, sender: i, updatedAt: d, updatedAtLabel: f })
65
+ }
66
+ ) : /* @__PURE__ */ c(G, { ...s, size: t, selected: a, theme: u, children: [
67
+ /* @__PURE__ */ e(J, { ...s, size: t, className: r.link, children: /* @__PURE__ */ c("div", { className: r.border, "data-size": t, "data-seen": m, "data-loading": o, children: [
68
+ /* @__PURE__ */ c("header", { className: r.header, "data-size": t, children: [
69
+ /* @__PURE__ */ e(F, { loading: o, size: t, state: q, label: I, seen: m, children: _ }),
70
+ /* @__PURE__ */ e(
71
+ w,
64
72
  {
65
73
  size: "xs",
66
74
  loading: o,
67
- sender: d,
68
- recipient: x,
69
- recipientLabel: D,
70
- recipientGroup: L
75
+ sender: i,
76
+ recipient: B,
77
+ recipientLabel: k,
78
+ recipientGroup: x
71
79
  }
72
80
  ),
73
- /* @__PURE__ */ r("p", { "data-size": e, className: t.summary, children: /* @__PURE__ */ r(F, { loading: o, children: u || p }) })
81
+ /* @__PURE__ */ e("p", { "data-size": t, className: r.summary, children: /* @__PURE__ */ e(C, { loading: o, children: b || p }) })
74
82
  ] }),
75
- /* @__PURE__ */ r(
76
- N,
83
+ /* @__PURE__ */ e(
84
+ y,
77
85
  {
78
- className: t.footer,
86
+ className: r.footer,
79
87
  loading: o,
80
- status: B,
81
- updatedAt: i,
82
- updatedAtLabel: n,
83
- archivedAt: f,
84
- archivedAtLabel: I,
88
+ status: N,
89
+ updatedAt: d,
90
+ updatedAtLabel: f,
91
+ archivedAt: n,
92
+ archivedAtLabel: L,
85
93
  trashedAt: h,
86
- trashedAtLabel: S,
87
- dueAt: v,
88
- dueAtLabel: H,
89
- attachmentsCount: q,
90
- seenBy: M,
94
+ trashedAtLabel: D,
95
+ dueAt: S,
96
+ dueAtLabel: j,
97
+ attachmentsCount: M,
98
+ seenBy: v,
91
99
  touchedBy: {
92
- touchedBy: T,
93
- className: t.touchedBy
100
+ touchedBy: H,
101
+ className: r.touchedBy
94
102
  }
95
103
  }
96
104
  )
97
105
  ] }) }),
98
- l && /* @__PURE__ */ r(G, { className: t.select, ...l })
106
+ l && /* @__PURE__ */ e(E, { className: r.select, ...l })
99
107
  ] });
100
108
  };
101
109
  export {
102
- de as DialogListItem
110
+ ft as DialogListItem
103
111
  };
@@ -1,8 +1,8 @@
1
1
  import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "../Icon/SvgIcon.js";
4
- import { Heading as m } from "../Typography/Heading.js";
5
4
  import "react";
5
+ import { Heading as m } from "../Typography/Heading.js";
6
6
  import "../Autocomplete/AutocompleteBase.js";
7
7
  import "../RootProvider/RootProvider.js";
8
8
  import "../Snackbar/useSnackbar.js";
@@ -1,9 +1,9 @@
1
1
  import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "../Icon/SvgIcon.js";
4
+ import "react";
4
5
  import { Typography as g } from "../Typography/Typography.js";
5
6
  import { Heading as B } from "../Typography/Heading.js";
6
- import "react";
7
7
  import "../Autocomplete/AutocompleteBase.js";
8
8
  import { DialogMetadata as P } from "./DialogMetadata.js";
9
9
  import { DialogActions as w } from "./DialogActions.js";
@@ -1,18 +1,18 @@
1
1
  import { jsxs as r, jsx as i } from "react/jsx-runtime";
2
2
  import { MenuItemBase as m } from "../Menu/MenuItemBase.js";
3
3
  import { MenuItemLabel as p } from "../Menu/MenuItemLabel.js";
4
- import { MenuItemMedia as s } from "../Menu/MenuItemMedia.js";
4
+ import { MenuItemIcon as s } from "../Menu/MenuItemIcon.js";
5
5
  import "../../index-L8X2o7IH.js";
6
6
  import "react";
7
7
  import "../Autocomplete/AutocompleteBase.js";
8
8
  import "../RootProvider/RootProvider.js";
9
9
  import "../Snackbar/useSnackbar.js";
10
10
  import "../Icon/SvgIcon.js";
11
- const j = ({ account: e, linkText: t, onClick: l, multipleAccounts: d }) => d ? /* @__PURE__ */ r(m, { size: "lg", onClick: l, linkText: t, linkIcon: "chevron-right", as: "button", children: [
11
+ const b = ({ account: e, linkText: t, onClick: l, multipleAccounts: d }) => d ? /* @__PURE__ */ r(m, { size: "lg", onClick: l, linkText: t, linkIcon: "chevron-right", as: "button", children: [
12
12
  /* @__PURE__ */ i(
13
13
  s,
14
14
  {
15
- size: "lg",
15
+ size: "xl",
16
16
  avatar: {
17
17
  name: e.name,
18
18
  type: e.type
@@ -34,5 +34,5 @@ const j = ({ account: e, linkText: t, onClick: l, multipleAccounts: d }) => d ?
34
34
  /* @__PURE__ */ i(p, { size: "lg", title: e == null ? void 0 : e.name, description: e == null ? void 0 : e.description })
35
35
  ] });
36
36
  export {
37
- j as AccountButton
37
+ b as AccountButton
38
38
  };
@@ -1,28 +1,31 @@
1
1
  "use client";
2
- import { jsx as y } from "react/jsx-runtime";
3
- import { useState as L } from "react";
2
+ import { jsx as v } from "react/jsx-runtime";
3
+ import { useState as y } from "react";
4
4
  import "../../index-L8X2o7IH.js";
5
5
  import "../Icon/SvgIcon.js";
6
6
  import "../Autocomplete/AutocompleteBase.js";
7
7
  import "../RootProvider/RootProvider.js";
8
8
  import "../Snackbar/useSnackbar.js";
9
- import { Menu as M } from "../Menu/Menu.js";
10
- const h = (p) => `${p} hits`, j = ({
11
- accounts: p = [],
9
+ import { Menu as L } from "../Menu/Menu.js";
10
+ const M = (d) => `${d} hits`, j = ({
11
+ accounts: d = [],
12
12
  accountGroups: C = {},
13
13
  accountSearch: s,
14
- onSelectAccount: d,
14
+ onSelectAccount: p,
15
15
  currentAccount: m
16
16
  }) => {
17
17
  var f;
18
- const g = p.map((e) => ({
18
+ const t = d.map((e) => ({
19
19
  id: e.id || e.name,
20
20
  groupId: e.groupId || "search",
21
21
  selected: e.selected ?? (m == null ? void 0 : m.id) === e.id,
22
22
  title: e.name,
23
23
  ...(e == null ? void 0 : e.accountNames) && {
24
24
  avatarGroup: {
25
- items: e.accountNames.map((l) => ({ name: l, type: e.type }))
25
+ items: e.accountNames.map((l) => ({
26
+ name: l,
27
+ type: e.type
28
+ }))
26
29
  }
27
30
  },
28
31
  ...!(e != null && e.accountNames) && {
@@ -33,27 +36,35 @@ const h = (p) => `${p} hits`, j = ({
33
36
  },
34
37
  badge: e.badge,
35
38
  alertBadge: e.alertBadge,
36
- onClick: () => d == null ? void 0 : d(e.id || e.name)
37
- })), [i, t] = L(""), r = i ? g.filter((e) => {
39
+ onClick: () => p == null ? void 0 : p(e.id || e.name)
40
+ })), [i, g] = y(""), r = i ? t.filter((e) => {
38
41
  var l;
39
42
  return (l = e == null ? void 0 : e.title) == null ? void 0 : l.toLowerCase().includes(i.toLowerCase());
40
43
  }).map((e) => ({
41
44
  ...e,
42
45
  groupId: "search"
43
- })) : g, I = i ? {
46
+ })) : t, I = i ? {
44
47
  search: {
45
- title: ((f = s == null ? void 0 : s.getResultsLabel) == null ? void 0 : f.call(s, r.length)) ?? h(r.length)
48
+ title: ((f = s == null ? void 0 : s.getResultsLabel) == null ? void 0 : f.call(s, r.length)) ?? M(r.length)
46
49
  }
47
50
  } : C, b = {
48
51
  name: "account-search",
49
52
  value: i,
50
53
  placeholder: (s == null ? void 0 : s.placeholder) ?? "Find account",
51
- onChange: (e) => t(e.target.value),
52
- onClear: () => t("")
53
- }, v = [
54
+ onChange: (e) => g(e.target.value),
55
+ onClear: () => g("")
56
+ }, h = [
54
57
  ...r.length > 0 ? r : [{ id: "search", groupId: "search", hidden: !0 }]
55
58
  ];
56
- return /* @__PURE__ */ y(M, { search: s && b, groups: I, items: v });
59
+ return /* @__PURE__ */ v(
60
+ L,
61
+ {
62
+ theme: "default",
63
+ search: s && b,
64
+ groups: I,
65
+ items: h
66
+ }
67
+ );
57
68
  };
58
69
  export {
59
70
  j as AccountMenu
@@ -6,7 +6,7 @@ import "../Autocomplete/AutocompleteBase.js";
6
6
  import "../RootProvider/RootProvider.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
8
  import { MenuItem as m } from "../Menu/MenuItem.js";
9
- const d = ({ label: t, onClick: r, as: o }) => /* @__PURE__ */ i(m, { size: "xs", id: "back", icon: "arrow-undo", theme: "transparent", title: t, onClick: r, as: o });
9
+ const f = ({ label: o, onClick: t, as: r }) => /* @__PURE__ */ i(m, { size: "sm", id: "back", icon: "arrow-undo", title: o, onClick: t, as: r });
10
10
  export {
11
- d as BackButton
11
+ f as BackButton
12
12
  };
@@ -1,16 +1,16 @@
1
1
  "use client";
2
- import { jsxs as a, jsx as r, Fragment as v } from "react/jsx-runtime";
2
+ import { jsxs as n, jsx as r, Fragment as T } from "react/jsx-runtime";
3
3
  import { useState as j, useMemo as A } from "react";
4
4
  import "../../index-L8X2o7IH.js";
5
5
  import "../Icon/SvgIcon.js";
6
6
  import "../Autocomplete/AutocompleteBase.js";
7
7
  import "../RootProvider/RootProvider.js";
8
8
  import { AccountMenu as F } from "./AccountMenu.js";
9
- import { AccountButton as I } from "./AccountButton.js";
10
- import { BackButton as L } from "./BackButton.js";
11
- import { LogoutButton as H } from "./LogoutButton.js";
9
+ import { AccountButton as L } from "./AccountButton.js";
10
+ import { BackButton as H } from "./BackButton.js";
11
+ import { LogoutButton as I } from "./LogoutButton.js";
12
12
  import "../Snackbar/useSnackbar.js";
13
- import { MenuListItem as n } from "../Menu/MenuBase.js";
13
+ import { MenuListItem as a } from "../Menu/MenuBase.js";
14
14
  import { Menu as h } from "../Menu/Menu.js";
15
15
  import { GlobalMenuBase as l, GlobalMenuHeader as g, GlobalMenuFooter as W } from "./GlobalMenuBase.js";
16
16
  const U = ({
@@ -28,18 +28,18 @@ const U = ({
28
28
  }) => {
29
29
  const [x, G] = j(!1), m = () => {
30
30
  G((t) => !t);
31
- }, T = (t) => {
31
+ }, v = (t) => {
32
32
  m(), e == null || e(), o == null || o(t);
33
- }, f = A(() => p.map((t) => ({
33
+ }, d = A(() => p.map((t) => ({
34
34
  ...t,
35
35
  onClick: () => {
36
- var d;
37
- (d = t.onClick) == null || d.call(t), e == null || e();
36
+ var f;
37
+ (f = t.onClick) == null || f.call(t), e == null || e();
38
38
  }
39
39
  })), [p, e]);
40
- return x ? /* @__PURE__ */ a(l, { children: [
41
- /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(L, { onClick: m, label: B }) }),
42
- /* @__PURE__ */ r(n, { as: "div", role: "separator" }),
40
+ return x ? /* @__PURE__ */ n(l, { children: [
41
+ /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(H, { onClick: m, label: B }) }),
42
+ /* @__PURE__ */ r(a, { as: "div", role: "separator" }),
43
43
  /* @__PURE__ */ r(
44
44
  F,
45
45
  {
@@ -47,12 +47,12 @@ const U = ({
47
47
  accounts: c,
48
48
  accountGroups: M,
49
49
  accountSearch: k,
50
- onSelectAccount: T
50
+ onSelectAccount: v
51
51
  }
52
52
  )
53
- ] }) : i ? /* @__PURE__ */ a(l, { children: [
53
+ ] }) : i ? /* @__PURE__ */ n(l, { children: [
54
54
  /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(
55
- I,
55
+ L,
56
56
  {
57
57
  account: i,
58
58
  linkText: b,
@@ -60,13 +60,13 @@ const U = ({
60
60
  onClick: m
61
61
  }
62
62
  ) }),
63
- /* @__PURE__ */ r(n, { as: "div", role: "separator" }),
64
- /* @__PURE__ */ r(h, { groups: u, items: f, defaultItemTheme: "surface" }),
65
- s && /* @__PURE__ */ a(v, { children: [
66
- /* @__PURE__ */ r(n, { as: "div", role: "separator" }),
67
- /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(H, { ...s }) })
63
+ /* @__PURE__ */ r(a, { as: "div", role: "separator" }),
64
+ /* @__PURE__ */ r(h, { groups: u, items: d, theme: "default" }),
65
+ s && /* @__PURE__ */ n(T, { children: [
66
+ /* @__PURE__ */ r(a, { as: "div", role: "separator" }),
67
+ /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(I, { ...s }) })
68
68
  ] })
69
- ] }) : /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(h, { groups: u, items: f }) });
69
+ ] }) : /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(h, { groups: u, items: d }) });
70
70
  };
71
71
  export {
72
72
  U as GlobalMenu
@@ -1,12 +1,12 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import '../../assets/GlobalMenuBase.css';const a = "_nav_1sg75_1", n = "_footer_1sg75_6", s = "_drawer_1sg75_14", t = "_dropdown_1sg75_20", e = {
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import '../../assets/GlobalMenuBase.css';const a = "_nav_1sg75_1", t = "_footer_1sg75_6", n = "_drawer_1sg75_14", s = "_dropdown_1sg75_20", r = {
3
3
  nav: a,
4
- footer: n,
5
- drawer: s,
6
- dropdown: t
7
- }, c = ({ children: o }) => /* @__PURE__ */ r("nav", { className: e.nav, "data-color": "neutral", children: o }), l = ({ children: o }) => /* @__PURE__ */ r("header", { className: e.header, children: o }), _ = ({ children: o }) => /* @__PURE__ */ r("footer", { className: e.footer, children: o });
4
+ footer: t,
5
+ drawer: n,
6
+ dropdown: s
7
+ }, _ = ({ children: o }) => /* @__PURE__ */ e("nav", { className: r.nav, "data-theme": "default", children: o }), c = ({ children: o }) => /* @__PURE__ */ e("header", { className: r.header, children: o }), l = ({ children: o }) => /* @__PURE__ */ e("footer", { className: r.footer, children: o });
8
8
  export {
9
- c as GlobalMenuBase,
10
- _ as GlobalMenuFooter,
11
- l as GlobalMenuHeader
9
+ _ as GlobalMenuBase,
10
+ l as GlobalMenuFooter,
11
+ c as GlobalMenuHeader
12
12
  };
@@ -1,11 +1,15 @@
1
- import { jsxs as a, jsx as o } from "react/jsx-runtime";
2
- import { c as s } from "../../index-L8X2o7IH.js";
1
+ import { jsxs as _, jsx as o } from "react/jsx-runtime";
2
+ import { c as t } from "../../index-L8X2o7IH.js";
3
3
  import { Avatar as b } from "../Avatar/Avatar.js";
4
4
  import { AvatarGroup as I } from "../Avatar/AvatarGroup.js";
5
- import { Badge as p } from "../Badge/Badge.js";
5
+ import { Badge as a } from "../Badge/Badge.js";
6
6
  import { ButtonBase as u } from "../Button/ButtonBase.js";
7
7
  import { Icon as N } from "../Icon/Icon.js";
8
8
  import "../Icon/SvgIcon.js";
9
+ import "react";
10
+ import "../Autocomplete/AutocompleteBase.js";
11
+ import "../RootProvider/RootProvider.js";
12
+ import "../Snackbar/useSnackbar.js";
9
13
  import '../../assets/HeaderButton.css';const g = "_button_ottvn_1", x = "_label_ottvn_12", B = "_icon_ottvn_18", G = "_avatarGroup_ottvn_28", k = "_loginIcon_ottvn_37", y = "_closeIcon_ottvn_42", j = "_badge_ottvn_46", n = {
10
14
  button: g,
11
15
  label: x,
@@ -14,8 +18,8 @@ import '../../assets/HeaderButton.css';const g = "_button_ottvn_1", x = "_label_
14
18
  loginIcon: k,
15
19
  closeIcon: y,
16
20
  badge: j
17
- }, E = ({
18
- className: t,
21
+ }, L = ({
22
+ className: s,
19
23
  as: l = "button",
20
24
  color: m = "accent",
21
25
  variant: i = "solid",
@@ -25,24 +29,24 @@ import '../../assets/HeaderButton.css';const g = "_button_ottvn_1", x = "_label_
25
29
  expanded: h,
26
30
  label: r = "Menu",
27
31
  badge: c,
28
- ..._
29
- }) => h ? /* @__PURE__ */ a(u, { ..._, as: l, variant: i, color: m, className: s(n.button, t), children: [
32
+ ...p
33
+ }) => h ? /* @__PURE__ */ _(u, { ...p, as: l, variant: i, color: m, className: t(n.button, s), children: [
30
34
  /* @__PURE__ */ o("span", { className: n.label, children: r }),
31
- /* @__PURE__ */ o("span", { className: s(n.icon, n.closeIcon), children: /* @__PURE__ */ o(N, { name: "x-mark" }) }),
32
- c && /* @__PURE__ */ o(p, { ...c, className: n.badge })
33
- ] }) : d ? /* @__PURE__ */ a(u, { ..._, as: l, variant: i, color: m, className: s(n.button, t), children: [
35
+ /* @__PURE__ */ o("span", { className: t(n.icon, n.closeIcon), children: /* @__PURE__ */ o(N, { name: "x-mark" }) }),
36
+ c && /* @__PURE__ */ o(a, { ...c, className: n.badge })
37
+ ] }) : d ? /* @__PURE__ */ _(u, { ...p, as: l, variant: i, color: m, className: t(n.button, s), children: [
34
38
  /* @__PURE__ */ o("span", { className: n.label, children: r }),
35
39
  /* @__PURE__ */ o(I, { ...d, size: "sm", className: n.avatarGroup }),
36
- c && /* @__PURE__ */ o(p, { ...c, className: n.badge })
37
- ] }) : e ? /* @__PURE__ */ a(u, { ..._, as: l, variant: i, color: m, className: s(n.button, t), children: [
40
+ c && /* @__PURE__ */ o(a, { ...c, className: n.badge })
41
+ ] }) : e ? /* @__PURE__ */ _(u, { ...p, as: l, variant: i, color: m, className: t(n.button, s), children: [
38
42
  /* @__PURE__ */ o("span", { className: n.label, children: r }),
39
43
  /* @__PURE__ */ o(b, { type: e == null ? void 0 : e.type, name: e == null ? void 0 : e.name, size: "lg" }),
40
- c && /* @__PURE__ */ o(p, { ...c, className: n.badge })
41
- ] }) : /* @__PURE__ */ a(u, { ..._, as: l, variant: i, color: m, className: s(n.button, t), children: [
44
+ c && /* @__PURE__ */ o(a, { ...c, className: n.badge })
45
+ ] }) : /* @__PURE__ */ _(u, { ...p, as: l, variant: i, color: m, className: t(n.button, s), children: [
42
46
  /* @__PURE__ */ o("span", { className: n.label, children: r }),
43
- /* @__PURE__ */ o("span", { className: s(n.icon, n.loginIcon), children: /* @__PURE__ */ o(N, { name: f }) }),
44
- c && /* @__PURE__ */ o(p, { ...c, className: n.badge })
47
+ /* @__PURE__ */ o("span", { className: t(n.icon, n.loginIcon), children: /* @__PURE__ */ o(N, { name: f }) }),
48
+ c && /* @__PURE__ */ o(a, { ...c, className: n.badge })
45
49
  ] });
46
50
  export {
47
- E as HeaderButton
51
+ L as HeaderButton
48
52
  };
@@ -1,18 +1,19 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { c as s } from "../../index-L8X2o7IH.js";
3
- import { SvgIcon as d } from "./SvgIcon.js";
2
+ import { c as e } from "../../index-L8X2o7IH.js";
3
+ import { SvgIcon as h } from "./SvgIcon.js";
4
4
  import { iconsMap as m } from "./iconsMap.js";
5
5
  import "react";
6
6
  import "../Autocomplete/AutocompleteBase.js";
7
+ import { Skeleton as u } from "../Skeleton/Skeleton.js";
7
8
  import "../RootProvider/RootProvider.js";
8
9
  import "../Snackbar/useSnackbar.js";
9
- import '../../assets/Icon.css';const u = "_icon_8905q_1", p = {
10
- icon: u
11
- }, y = ({ name: t, size: a, color: e, theme: l, variant: f = "outline", className: n }) => {
12
- var i, r;
13
- const c = ((i = m[t]) == null ? void 0 : i[f]) ?? ((r = m[t]) == null ? void 0 : r.outline);
14
- return c ? /* @__PURE__ */ o("span", { "data-size": a, "data-color": e, "data-theme": l, className: s([p.icon], n), children: /* @__PURE__ */ o(d, { svgIconComponent: c }) }) : /* @__PURE__ */ o("span", { className: s([p.icon], n) });
10
+ import '../../assets/Icon.css';const v = "_icon_3p8he_1", s = {
11
+ icon: v
12
+ }, C = ({ loading: p, name: t, size: a, color: l, theme: f, variant: d = "outline", className: n }) => {
13
+ var i, c;
14
+ const r = ((i = m[t]) == null ? void 0 : i[d]) ?? ((c = m[t]) == null ? void 0 : c.outline);
15
+ return r ? /* @__PURE__ */ o(u, { loading: p, variant: "circle", children: /* @__PURE__ */ o("span", { "data-size": a, "data-color": l, "data-theme": f, className: e([s.icon], n), children: /* @__PURE__ */ o(h, { svgIconComponent: r }) }) }) : /* @__PURE__ */ o("span", { className: e([s.icon], n) });
15
16
  };
16
17
  export {
17
- y as Icon
18
+ C as Icon
18
19
  };
@@ -0,0 +1,27 @@
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import { isValidElement as p } from "react";
3
+ import { Icon as n } from "./Icon.js";
4
+ import "./SvgIcon.js";
5
+ import "../../index-L8X2o7IH.js";
6
+ import "../Autocomplete/AutocompleteBase.js";
7
+ import { Avatar as u } from "../Avatar/Avatar.js";
8
+ import { AvatarGroup as s } from "../Avatar/AvatarGroup.js";
9
+ import "../RootProvider/RootProvider.js";
10
+ import "../Snackbar/useSnackbar.js";
11
+ const O = ({ size: m, icon: r, iconTheme: i, avatar: o, avatarGroup: e }) => {
12
+ if (!r && !o && !e)
13
+ return null;
14
+ if (r) {
15
+ if (p(r))
16
+ return r;
17
+ const t = typeof r == "string" ? { name: r } : r;
18
+ return /* @__PURE__ */ f(n, { ...t, theme: (t == null ? void 0 : t.theme) || i, size: m });
19
+ }
20
+ if (o)
21
+ return /* @__PURE__ */ f(u, { ...o, size: m });
22
+ if (e)
23
+ return /* @__PURE__ */ f(s, { ...e, size: m });
24
+ };
25
+ export {
26
+ O as IconOrAvatar
27
+ };
@@ -1,14 +1,16 @@
1
1
  import { Icon as e } from "./Icon.js";
2
2
  import { SvgIcon as p } from "./SvgIcon.js";
3
- import { CheckboxIcon as f } from "./CheckboxIcon.js";
4
- import { RadioIcon as n } from "./RadioIcon.js";
3
+ import { CheckboxIcon as x } from "./CheckboxIcon.js";
4
+ import { RadioIcon as m } from "./RadioIcon.js";
5
5
  import { ProgressIcon as I } from "./ProgressIcon.js";
6
- import { iconsMap as a } from "./iconsMap.js";
6
+ import { iconsMap as s } from "./iconsMap.js";
7
+ import { IconOrAvatar as i } from "./IconOrAvatar.js";
7
8
  export {
8
- f as CheckboxIcon,
9
+ x as CheckboxIcon,
9
10
  e as Icon,
11
+ i as IconOrAvatar,
10
12
  I as ProgressIcon,
11
- n as RadioIcon,
13
+ m as RadioIcon,
12
14
  p as SvgIcon,
13
- a as iconsMap
15
+ s as iconsMap
14
16
  };
@@ -1,8 +1,8 @@
1
1
  import { jsxs as n, jsx as s } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "../Icon/SvgIcon.js";
4
- import { Heading as d } from "../Typography/Heading.js";
5
4
  import "react";
5
+ import { Heading as d } from "../Typography/Heading.js";
6
6
  import "../Autocomplete/AutocompleteBase.js";
7
7
  import { IconButton as c } from "../Button/IconButton.js";
8
8
  import "../RootProvider/RootProvider.js";
@@ -5,8 +5,8 @@ import "react";
5
5
  import "../Autocomplete/AutocompleteBase.js";
6
6
  import "../RootProvider/RootProvider.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
- import { Flex as p } from "../Page/Flex.js";
9
- const j = ({ direction: o = "col", spacing: r = 2, children: t, ...m }) => /* @__PURE__ */ i(p, { direction: o, spacing: r, ...m, children: t });
8
+ import { Flex as m } from "../Page/Flex.js";
9
+ const a = ({ spacing: o = 2, children: r, ...t }) => /* @__PURE__ */ i(m, { direction: "col", spacing: o, ...t, children: r });
10
10
  export {
11
- j as ListBase
11
+ a as ListBase
12
12
  };