@altinn/altinn-components 0.28.1 → 0.29.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 (146) hide show
  1. package/dist/assets/Badge.css +1 -1
  2. package/dist/assets/Button.css +1 -1
  3. package/dist/assets/ButtonBase.css +1 -1
  4. package/dist/assets/ButtonIcon.css +1 -1
  5. package/dist/assets/ComboButton.css +1 -1
  6. package/dist/assets/Flex.css +1 -1
  7. package/dist/assets/Grid.css +1 -1
  8. package/dist/assets/Heading.css +1 -1
  9. package/dist/assets/List.css +1 -0
  10. package/dist/assets/ListItemControls.css +1 -1
  11. package/dist/assets/ListItemHeader.css +1 -1
  12. package/dist/assets/MenuItem.css +1 -0
  13. package/dist/assets/MenuItemBase.css +1 -1
  14. package/dist/assets/MenuItemLabel.css +1 -1
  15. package/dist/assets/MenuSearch.css +1 -1
  16. package/dist/assets/SearchField.css +1 -1
  17. package/dist/assets/SearchbarField.css +1 -0
  18. package/dist/assets/Section.css +1 -0
  19. package/dist/components/Account/AccountList.js +24 -0
  20. package/dist/components/Account/AccountListItem.js +58 -0
  21. package/dist/components/Account/AccountListItemControls.js +77 -0
  22. package/dist/components/Account/AccountMenu.js +56 -0
  23. package/dist/components/Account/index.js +8 -0
  24. package/dist/components/Badge/Badge.js +13 -3
  25. package/dist/components/Button/Button.js +49 -44
  26. package/dist/components/Button/ButtonBase.js +17 -15
  27. package/dist/components/Button/ButtonIcon.js +13 -7
  28. package/dist/components/Button/ComboButton.js +49 -33
  29. package/dist/components/Button/IconButton.js +31 -27
  30. package/dist/components/ContextMenu/ContextMenu.js +45 -48
  31. package/dist/components/Forms/SearchField.js +34 -0
  32. package/dist/components/Forms/index.js +14 -12
  33. package/dist/components/GlobalMenu/CurrentAccount.js +28 -0
  34. package/dist/components/GlobalMenu/GlobalMenu.js +70 -75
  35. package/dist/components/GlobalMenu/index.js +6 -8
  36. package/dist/components/Header/HeaderButton.js +1 -1
  37. package/dist/components/Icon/Icon.js +21 -22
  38. package/dist/components/Icon/IconOrAvatar.js +12 -12
  39. package/dist/components/List/List.js +9 -7
  40. package/dist/components/List/ListItemControls.js +1 -1
  41. package/dist/components/List/ListItemHeader.js +64 -57
  42. package/dist/components/List/ListItemLabel.js +36 -28
  43. package/dist/components/List/ListItemLink.js +32 -32
  44. package/dist/components/Menu/MenuItem.js +41 -41
  45. package/dist/components/Menu/MenuItemBase.js +33 -54
  46. package/dist/components/Menu/MenuItemLabel.js +58 -20
  47. package/dist/components/Menu/MenuOption.js +32 -41
  48. package/dist/components/Menu/MenuSearch.js +24 -43
  49. package/dist/components/Menu/index.js +24 -23
  50. package/dist/components/Page/Flex.js +5 -5
  51. package/dist/components/Page/Grid.js +24 -26
  52. package/dist/components/Page/Section.js +7 -5
  53. package/dist/components/Page/index.js +20 -22
  54. package/dist/components/Searchbar/Searchbar.js +6 -6
  55. package/dist/components/Searchbar/{SearchField.js → SearchbarField.js} +8 -8
  56. package/dist/components/Searchbar/index.js +6 -6
  57. package/dist/components/Settings/SettingsItem.js +27 -30
  58. package/dist/components/Toolbar/ToolbarAccountMenu.js +6 -6
  59. package/dist/components/Toolbar/ToolbarSearch.js +22 -43
  60. package/dist/components/Typography/Heading.js +7 -7
  61. package/dist/components/index.js +391 -390
  62. package/dist/index.js +397 -396
  63. package/dist/spacing.css +44 -8
  64. package/dist/types/lib/components/Account/AccountList.d.ts +10 -0
  65. package/dist/types/lib/components/Account/AccountList.stories.d.ts +18 -0
  66. package/dist/types/lib/components/Account/AccountListItem.d.ts +18 -0
  67. package/dist/types/lib/components/{Profile → Account}/AccountListItem.stories.d.ts +16 -7
  68. package/dist/types/lib/components/Account/AccountListItemControls.d.ts +17 -0
  69. package/dist/types/lib/components/Account/AccountMenu.d.ts +22 -0
  70. package/dist/types/lib/components/Account/AccountMenu.stories.d.ts +15 -0
  71. package/dist/types/lib/components/{Profile → Account}/index.d.ts +1 -0
  72. package/dist/types/lib/components/Badge/Badge.d.ts +4 -1
  73. package/dist/types/lib/components/Badge/Badge.stories.d.ts +1 -1
  74. package/dist/types/lib/components/Button/Button.d.ts +5 -5
  75. package/dist/types/lib/components/Button/Button.stories.d.ts +2 -1
  76. package/dist/types/lib/components/Button/ButtonBase.d.ts +2 -1
  77. package/dist/types/lib/components/Button/ButtonIcon.d.ts +5 -5
  78. package/dist/types/lib/components/Button/ButtonLabel.d.ts +2 -2
  79. package/dist/types/lib/components/Button/ComboButton.d.ts +6 -4
  80. package/dist/types/lib/components/Button/IconButton.d.ts +4 -4
  81. package/dist/types/lib/components/ContextMenu/ContextMenu.d.ts +1 -3
  82. package/dist/types/lib/components/ContextMenu/ContextMenu.stories.d.ts +2 -1
  83. package/dist/types/lib/components/Forms/SearchField.d.ts +9 -0
  84. package/dist/types/lib/components/Forms/SearchField.stories.d.ts +16 -0
  85. package/dist/types/lib/components/Forms/index.d.ts +1 -0
  86. package/dist/types/lib/components/GlobalMenu/{AccountButton.d.ts → CurrentAccount.d.ts} +3 -2
  87. package/dist/types/lib/components/GlobalMenu/GlobalMenu.d.ts +4 -4
  88. package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +8 -11
  89. package/dist/types/lib/components/GlobalMenu/index.d.ts +1 -2
  90. package/dist/types/lib/components/Header/Header.stories.d.ts +8 -7
  91. package/dist/types/lib/components/Header/LocaleSwitcher.stories.d.ts +3 -1
  92. package/dist/types/lib/components/Icon/Icon.d.ts +1 -3
  93. package/dist/types/lib/components/Layout/Layout.stories.d.ts +1 -0
  94. package/dist/types/lib/components/List/List.d.ts +1 -1
  95. package/dist/types/lib/components/List/List.stories.d.ts +1 -1
  96. package/dist/types/lib/components/List/ListItem.d.ts +24 -1
  97. package/dist/types/lib/components/List/ListItem.stories.d.ts +1 -1
  98. package/dist/types/lib/components/List/ListItemLabel.d.ts +2 -1
  99. package/dist/types/lib/components/List/ListItemLink.d.ts +3 -5
  100. package/dist/types/lib/components/List/Specimens.stories.d.ts +1 -1
  101. package/dist/types/lib/components/Menu/Menu.stories.d.ts +5 -0
  102. package/dist/types/lib/components/Menu/MenuItem.d.ts +7 -9
  103. package/dist/types/lib/components/Menu/MenuItemBase.d.ts +2 -5
  104. package/dist/types/lib/components/Menu/MenuItemLabel.d.ts +6 -4
  105. package/dist/types/lib/components/Menu/MenuSearch.d.ts +1 -1
  106. package/dist/types/lib/components/Menu/MenuSearch.stories.d.ts +1 -1
  107. package/dist/types/lib/components/Page/Breadcrumbs.stories.d.ts +19 -0
  108. package/dist/types/lib/components/Page/BreadcrumbsLink.d.ts +1 -1
  109. package/dist/types/lib/components/Page/Flex.d.ts +1 -1
  110. package/dist/types/lib/components/Page/Flex.stories.d.ts +17 -0
  111. package/dist/types/lib/components/Page/Grid.d.ts +5 -8
  112. package/dist/types/lib/components/Page/Grid.stories.d.ts +15 -0
  113. package/dist/types/lib/components/Page/List.stories.d.ts +17 -0
  114. package/dist/types/lib/components/Page/Section.d.ts +2 -1
  115. package/dist/types/lib/components/Page/index.d.ts +0 -1
  116. package/dist/types/lib/components/Search/SearchItem.d.ts +2 -2
  117. package/dist/types/lib/components/Searchbar/Searchbar.d.ts +2 -2
  118. package/dist/types/lib/components/Searchbar/{SearchField.d.ts → SearchbarField.d.ts} +2 -2
  119. package/dist/types/lib/components/Searchbar/index.d.ts +1 -1
  120. package/dist/types/lib/components/Settings/SettingsItem.d.ts +5 -6
  121. package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +8 -7
  122. package/dist/types/lib/components/Toolbar/Toolbar.stories.d.ts +1 -1
  123. package/dist/types/lib/components/Toolbar/ToolbarSearch.d.ts +2 -5
  124. package/dist/types/lib/components/Toolbar/ToolbarSearch.stories.d.ts +1 -0
  125. package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +7 -8
  126. package/dist/types/lib/components/Typography/Heading.d.ts +1 -1
  127. package/dist/types/lib/components/index.d.ts +1 -1
  128. package/dist/types/lib/stories/Profile/Accounts.stories.d.ts +6 -11
  129. package/package.json +1 -1
  130. package/dist/assets/AccountButton.css +0 -1
  131. package/dist/assets/IconButton.css +0 -1
  132. package/dist/assets/MenuOption.css +0 -1
  133. package/dist/assets/ToolbarSearch.css +0 -1
  134. package/dist/components/GlobalMenu/AccountButton.js +0 -58
  135. package/dist/components/GlobalMenu/AccountMenu.js +0 -72
  136. package/dist/components/Page/PageHeader.js +0 -55
  137. package/dist/components/Profile/AccountList.js +0 -12
  138. package/dist/components/Profile/AccountListItem.js +0 -86
  139. package/dist/components/Profile/index.js +0 -6
  140. package/dist/types/lib/components/GlobalMenu/AccountMenu.d.ts +0 -27
  141. package/dist/types/lib/components/GlobalMenu/AccountMenu.stories.d.ts +0 -19
  142. package/dist/types/lib/components/Menu/Examples.stories.d.ts +0 -97
  143. package/dist/types/lib/components/Page/PageHeader.d.ts +0 -18
  144. package/dist/types/lib/components/Page/PageHeader.stories.d.ts +0 -16
  145. package/dist/types/lib/components/Profile/AccountList.d.ts +0 -5
  146. package/dist/types/lib/components/Profile/AccountListItem.d.ts +0 -12
@@ -1,34 +1,33 @@
1
- import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
- import { c as n } from "../../index-L8X2o7IH.js";
1
+ import { jsx as e, jsxs as h } from "react/jsx-runtime";
2
+ import { c } from "../../index-L8X2o7IH.js";
3
3
  import "react";
4
4
  import { Skeleton as _ } from "../Skeleton/Skeleton.js";
5
5
  import "../RootProvider/RootProvider.js";
6
6
  import "../Searchbar/AutocompleteBase.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
- import '../../assets/Icon.css';const f = "_icon_2h14f_1", g = "_shape_2h14f_9", v = "_svg_2h14f_15", N = "_image_2h14f_16", a = {
9
- icon: f,
10
- shape: g,
11
- svg: v,
12
- image: N
13
- }, z = (s) => typeof s == "object" && s !== null && ("svgElement" in s || "iconUrl" in s), E = ({
8
+ import '../../assets/Icon.css';const d = "_icon_2h14f_1", f = "_shape_2h14f_9", g = "_svg_2h14f_15", v = "_image_2h14f_16", a = {
9
+ icon: d,
10
+ shape: f,
11
+ svg: g,
12
+ image: v
13
+ }, y = (s) => typeof s == "object" && s !== null && ("svgElement" in s || "iconUrl" in s), z = ({
14
14
  loading: s,
15
- altText: r,
16
- svgElement: c,
17
- variant: i = "fill",
18
- size: o,
19
- color: m,
20
- theme: l,
15
+ altText: n,
16
+ svgElement: r,
17
+ size: i,
18
+ color: o,
19
+ theme: m,
21
20
  iconUrl: p,
22
21
  className: t,
23
- style: h
24
- }) => c ? /* @__PURE__ */ e("span", { "data-size": o, "data-color": m, "data-theme": l, className: n(a.icon, t), style: h, children: /* @__PURE__ */ d(_, { loading: s, variant: "circle", className: a.shape, children: [
22
+ style: l
23
+ }) => r ? /* @__PURE__ */ e("span", { "data-size": i, "data-color": o, "data-theme": m, className: c(a.icon, t), style: l, children: /* @__PURE__ */ h(_, { loading: s, variant: "circle", className: a.shape, children: [
25
24
  /* @__PURE__ */ e("span", { className: a.shape }),
26
- /* @__PURE__ */ e(c, { "aria-hidden": "true", "alt-label": r, "data-variant": i, className: a.svg })
27
- ] }) }) : p ? /* @__PURE__ */ e("span", { "data-size": o, "data-color": m, "data-theme": l, className: n(a.icon, t), style: h, children: /* @__PURE__ */ d(_, { loading: s, variant: "circle", className: a.shape, children: [
25
+ /* @__PURE__ */ e(r, { "aria-hidden": "true", "alt-label": n, className: a.svg })
26
+ ] }) }) : p ? /* @__PURE__ */ e("span", { "data-size": i, "data-color": o, "data-theme": m, className: c(a.icon, t), style: l, children: /* @__PURE__ */ h(_, { loading: s, variant: "circle", className: a.shape, children: [
28
27
  /* @__PURE__ */ e("span", { className: a.shape }),
29
- /* @__PURE__ */ e("img", { src: p, alt: r, className: a.image, "data-variant": i })
30
- ] }) }) : /* @__PURE__ */ e("span", { className: n(a.icon, t) });
28
+ /* @__PURE__ */ e("img", { src: p, alt: n, className: a.image })
29
+ ] }) }) : /* @__PURE__ */ e("span", { className: c(a.icon, t) });
31
30
  export {
32
- E as Icon,
33
- z as isIconProps
31
+ z as Icon,
32
+ y as isIconProps
34
33
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { isValidElement as p } from "react";
3
- import { Icon as i } from "./Icon.js";
3
+ import { Icon as n } from "./Icon.js";
4
4
  import "../../index-L8X2o7IH.js";
5
5
  import { Avatar as f } from "../Avatar/Avatar.js";
6
6
  import { AvatarGroup as c } from "../Avatar/AvatarGroup.js";
@@ -8,25 +8,25 @@ import "../RootProvider/RootProvider.js";
8
8
  import "../Searchbar/AutocompleteBase.js";
9
9
  import "../Snackbar/useSnackbar.js";
10
10
  import { S as l } from "../../XMark-DIqxCTTQ.js";
11
- import '../../assets/IconOrAvatar.css';const u = "_icon_1ez59_1", v = "_avatar_1ez59_2", _ = "_avatarGroup_1ez59_6", e = {
11
+ import '../../assets/IconOrAvatar.css';const u = "_icon_1ez59_1", _ = "_avatar_1ez59_2", v = "_avatarGroup_1ez59_6", e = {
12
12
  icon: u,
13
- avatar: v,
14
- avatarGroup: _
13
+ avatar: _,
14
+ avatarGroup: v
15
15
  };
16
16
  function g(r) {
17
17
  return typeof r == "string" || typeof r == "number" || typeof r == "boolean" || r === null || p(r);
18
18
  }
19
- const N = (r) => r.svgElement !== void 0 || r.iconUrl !== void 0, S = ({ loading: r, size: m, icon: t, iconTheme: s, avatar: n, avatarGroup: a }) => {
20
- if (!t && !n && !a)
19
+ const N = (r) => r.svgElement !== void 0 || r.iconUrl !== void 0, S = ({ loading: r, size: i, icon: t, iconTheme: a, avatar: s, avatarGroup: m }) => {
20
+ if (!t && !s && !m)
21
21
  return null;
22
22
  if (r)
23
- return /* @__PURE__ */ o(i, { className: e.icon, svgElement: l, loading: !0 });
23
+ return /* @__PURE__ */ o(n, { className: e.icon, svgElement: l, loading: !0 });
24
24
  if (t)
25
- return N(t) ? /* @__PURE__ */ o(i, { className: e.icon, theme: t.theme || s, variant: "contain", ...t }) : g(t) ? t : /* @__PURE__ */ o(i, { className: e.icon, svgElement: t, variant: "contain", theme: s });
26
- if (n)
27
- return /* @__PURE__ */ o(f, { ...n, size: n.size || m, className: e.avatar });
28
- if (a)
29
- return /* @__PURE__ */ o(c, { ...a, className: e.avatarGroup });
25
+ return N(t) ? /* @__PURE__ */ o(n, { className: e.icon, theme: t.theme || a, ...t }) : g(t) ? t : /* @__PURE__ */ o(n, { className: e.icon, svgElement: t, theme: a });
26
+ if (s)
27
+ return /* @__PURE__ */ o(f, { ...s, size: s.size || i, className: e.avatar });
28
+ if (m)
29
+ return /* @__PURE__ */ o(c, { ...m, className: e.avatarGroup });
30
30
  };
31
31
  export {
32
32
  S as IconOrAvatar
@@ -1,12 +1,14 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { createElement as n } from "react";
3
- import "../../index-L8X2o7IH.js";
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { createElement as c } from "react";
3
+ import { c as p } from "../../index-L8X2o7IH.js";
4
4
  import "../RootProvider/RootProvider.js";
5
- import { ListItem as c } from "./ListItem.js";
5
+ import { ListItem as n } from "./ListItem.js";
6
6
  import "../Searchbar/AutocompleteBase.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
- import { Flex as l } from "../Page/Flex.js";
9
- const j = ({ children: t, spacing: o = 2, items: m = [], ...i }) => /* @__PURE__ */ p(l, { direction: "col", as: "ul", spacing: o, ...i, children: t || m.map((r, e) => /* @__PURE__ */ n(c, { ...r, key: `item-${r.id ?? e}` })) });
8
+ import { Flex as a } from "../Page/Flex.js";
9
+ import '../../assets/List.css';const f = "_list_14rag_1", x = {
10
+ list: f
11
+ }, k = ({ children: r, className: o, spacing: i, items: m = [], ...s }) => /* @__PURE__ */ l(a, { direction: "col", as: "ul", spacing: i, className: p(x.list, o), ...s, children: r || m.map((t, e) => /* @__PURE__ */ c(n, { ...t, key: `item-${t.id ?? e}` })) });
10
12
  export {
11
- j as List
13
+ k as List
12
14
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { c as r } from "../../index-L8X2o7IH.js";
3
- import '../../assets/ListItemControls.css';const c = "_controls_1schy_1", n = {
3
+ import '../../assets/ListItemControls.css';const c = "_controls_mvhfq_1", n = {
4
4
  controls: c
5
5
  }, e = ({ className: o, children: s }) => /* @__PURE__ */ t("div", { className: r(n.controls, o), children: s });
6
6
  export {
@@ -1,5 +1,5 @@
1
- import { jsxs as p, jsx as e, Fragment as E } from "react/jsx-runtime";
2
- import { c as k } from "../../index-L8X2o7IH.js";
1
+ import { jsxs as l, jsx as e, Fragment as E } from "react/jsx-runtime";
2
+ import { c as g } from "../../index-L8X2o7IH.js";
3
3
  import { useId as w, isValidElement as z } from "react";
4
4
  import { Icon as D } from "../Icon/Icon.js";
5
5
  import { Badge as F } from "../Badge/Badge.js";
@@ -8,87 +8,94 @@ import { ListItemLink as H } from "./ListItemLink.js";
8
8
  import { ListItemLabel as R } from "./ListItemLabel.js";
9
9
  import { ListItemIcon as U } from "./ListItemIcon.js";
10
10
  import { ListItemControls as V } from "./ListItemControls.js";
11
- import { ListItemSelect as A } from "./ListItemSelect.js";
11
+ import { ListItemSelect as q } from "./ListItemSelect.js";
12
12
  import "../Searchbar/AutocompleteBase.js";
13
13
  import "../Snackbar/useSnackbar.js";
14
- import { S as G, a as J } from "../../ChevronUp-DR4Lz2Jb.js";
15
- import { S as K } from "../../ChevronRight-BbelnTke.js";
16
- import '../../assets/ListItemHeader.css';const M = "_header_hyqf4_1", O = "_label_hyqf4_27", o = {
17
- header: M,
18
- label: O
19
- }, ie = ({
20
- as: d,
21
- interactive: s = !0,
22
- color: h,
23
- loading: r,
24
- disabled: f,
25
- collapsible: I,
26
- linkIcon: v,
27
- expanded: L,
28
- select: m,
29
- href: b,
30
- onClick: u,
31
- onKeyPress: y,
14
+ import { S as A, a as G } from "../../ChevronUp-DR4Lz2Jb.js";
15
+ import { S as J } from "../../ChevronRight-BbelnTke.js";
16
+ import '../../assets/ListItemHeader.css';const K = "_header_s4ghf_1", M = "_label_s4ghf_27", O = "_linkIcon_s4ghf_35", o = {
17
+ header: K,
18
+ label: M,
19
+ linkIcon: O
20
+ }, ne = ({
21
+ as: c,
22
+ interactive: p = !0,
23
+ color: f,
24
+ loading: t,
25
+ disabled: h,
26
+ collapsible: d,
27
+ linkIcon: I,
28
+ expanded: v,
29
+ select: s,
30
+ href: L,
31
+ onClick: _,
32
+ onKeyPress: u,
32
33
  tabIndex: S,
33
34
  size: i,
34
- title: _,
35
- description: x,
36
- icon: C,
37
- active: a,
38
- badge: t,
39
- controls: l,
40
- className: N,
41
- children: j,
42
- ariaLabel: q
35
+ title: b,
36
+ description: k,
37
+ icon: N,
38
+ active: m,
39
+ badge: r,
40
+ controls: n,
41
+ className: x,
42
+ children: y,
43
+ ariaLabel: C
43
44
  }) => {
44
- const n = I ? L ? G : J : v ? K : void 0, B = () => t && !r && typeof t == "object" && "label" in t ? /* @__PURE__ */ e(F, { ...t }) : z(t) ? t : null, c = w();
45
- return /* @__PURE__ */ p(
45
+ const a = d ? v ? A : G : I ? J : void 0, j = () => r && !t && typeof r == "object" && "label" in r ? /* @__PURE__ */ e(F, { ...r }) : z(r) ? r : null, B = w();
46
+ return /* @__PURE__ */ l(
46
47
  "header",
47
48
  {
48
- className: k(o.header, N),
49
- "data-color": h,
50
- "data-interactive": s,
49
+ className: g(o.header, x),
50
+ "data-color": f,
51
+ "data-interactive": p,
51
52
  "data-size": i,
52
- "data-has-active-child": a,
53
+ "data-has-active-child": m,
53
54
  children: [
54
55
  /* @__PURE__ */ e(
55
56
  H,
56
57
  {
57
- interactive: s,
58
- as: d,
59
- href: b,
60
- onClick: u,
61
- onKeyPress: y,
58
+ as: c,
59
+ href: L,
60
+ onClick: _,
61
+ onKeyPress: u,
62
62
  tabIndex: S,
63
- loading: r,
64
- disabled: f || r,
65
- active: a,
66
- describedby: c,
67
- children: /* @__PURE__ */ e("span", { children: q })
63
+ loading: t,
64
+ disabled: h || t,
65
+ active: m,
66
+ ariaLabel: C
68
67
  }
69
68
  ),
70
- m && /* @__PURE__ */ e(A, { ...m, className: o.select }),
71
- /* @__PURE__ */ e(U, { loading: r, icon: C }),
69
+ s && /* @__PURE__ */ e(q, { ...s, className: o.select }),
70
+ /* @__PURE__ */ e(U, { loading: t, icon: N }),
72
71
  /* @__PURE__ */ e(
73
72
  R,
74
73
  {
75
74
  size: i,
76
- loading: r,
77
- title: _,
78
- description: x,
79
- id: c,
75
+ loading: t,
76
+ title: b,
77
+ description: k,
78
+ id: B,
80
79
  className: o.label,
81
- children: j
80
+ children: y
82
81
  }
83
82
  ),
84
- /* @__PURE__ */ e(V, { className: o.controls, children: l && !r ? /* @__PURE__ */ e("span", { style: { position: "relative" }, children: l }) : /* @__PURE__ */ p(E, { children: [
85
- B(),
86
- n && /* @__PURE__ */ e(D, { svgElement: n, style: { fontSize: "1.5rem" } })
83
+ /* @__PURE__ */ e(V, { className: o.controls, children: n && !t ? /* @__PURE__ */ e("span", { style: { position: "relative" }, children: n }) : /* @__PURE__ */ l(E, { children: [
84
+ j(),
85
+ a && /* @__PURE__ */ e("span", { className: o.linkIcon, children: /* @__PURE__ */ e(
86
+ D,
87
+ {
88
+ svgElement: a,
89
+ style: {
90
+ fontSize: "1.5rem"
91
+ }
92
+ }
93
+ ) })
87
94
  ] }) })
88
95
  ]
89
96
  }
90
97
  );
91
98
  };
92
99
  export {
93
- ie as ListItemHeader
100
+ ne as ListItemHeader
94
101
  };
@@ -1,53 +1,61 @@
1
- import { jsx as s, jsxs as u, Fragment as b } from "react/jsx-runtime";
2
- import { c as d } from "../../index-L8X2o7IH.js";
3
- import { isValidElement as h } from "react";
1
+ import { jsx as t, jsxs as b, Fragment as P } from "react/jsx-runtime";
2
+ import { c as x } from "../../index-L8X2o7IH.js";
3
+ import { isValidElement as _ } from "react";
4
4
  import "../RootProvider/RootProvider.js";
5
- import { Heading as c } from "../Typography/Heading.js";
5
+ import { Heading as e } from "../Typography/Heading.js";
6
6
  import "../Searchbar/AutocompleteBase.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
- import '../../assets/ListItemLabel.css';const P = "_label_1aex5_1", x = {
9
- label: P
10
- }, a = (r) => typeof r == "object" && r !== null && "children" in r;
11
- function m(r) {
12
- return typeof r == "string" || typeof r == "number" || typeof r == "boolean" || r === null || h(r);
8
+ import '../../assets/ListItemLabel.css';const g = "_label_1aex5_1", h = {
9
+ label: g
10
+ }, j = (r) => typeof r == "object" && r !== null && "children" in r;
11
+ function z(r) {
12
+ return typeof r == "string" || typeof r == "number" || typeof r == "boolean" || r === null || _(r);
13
13
  }
14
14
  const y = (r) => {
15
- const t = {
15
+ const s = {
16
16
  as: "h2",
17
17
  size: "sm"
18
18
  // leading: "tight",
19
19
  };
20
- return a(r) ? { ...t, ...r } : m(r) ? {
21
- ...t,
20
+ return j(r) ? { ...s, ...r } : z(r) ? {
21
+ ...s,
22
22
  children: r
23
23
  } : null;
24
- }, g = (r) => {
25
- const t = {
24
+ }, d = (r) => {
25
+ const s = {
26
26
  as: "h3",
27
27
  size: "xs",
28
28
  weight: "normal",
29
29
  variant: "subtle"
30
30
  // leading: "tight",
31
31
  };
32
- return a(r) ? { ...t, ...r } : m(r) ? {
33
- ...t,
32
+ return j(r) ? { ...s, ...r } : z(r) ? {
33
+ ...s,
34
34
  children: r
35
35
  } : null;
36
- }, D = ({
36
+ }, I = ({
37
37
  loading: r = !1,
38
- size: t,
39
- title: n,
40
- description: o,
41
- children: l,
42
- id: p,
43
- className: f
38
+ size: s,
39
+ title: o,
40
+ value: p,
41
+ description: c,
42
+ children: n,
43
+ id: l,
44
+ className: a
44
45
  }) => {
45
- const e = n && y(n), i = o && g(o);
46
- return /* @__PURE__ */ s("span", { className: d(x.label, f), id: p, "data-size": t, children: l || /* @__PURE__ */ u(b, { children: [
47
- e && /* @__PURE__ */ s(c, { ...e, loading: r, children: e.children }),
48
- i && /* @__PURE__ */ s(c, { ...i, loading: r })
46
+ if (o && p) {
47
+ const f = o && d(o), u = p && y(p);
48
+ return /* @__PURE__ */ t("span", { className: x(h.label, a), id: l, "data-size": s, children: n || /* @__PURE__ */ b(P, { children: [
49
+ f && /* @__PURE__ */ t(e, { ...f, loading: r }),
50
+ u && /* @__PURE__ */ t(e, { ...u, loading: r })
51
+ ] }) });
52
+ }
53
+ const i = o && y(o), m = c && d(c);
54
+ return /* @__PURE__ */ t("span", { className: x(h.label, a), id: l, "data-size": s, children: n || /* @__PURE__ */ b(P, { children: [
55
+ i && /* @__PURE__ */ t(e, { ...i, loading: r }),
56
+ m && /* @__PURE__ */ t(e, { ...m, loading: r })
49
57
  ] }) });
50
58
  };
51
59
  export {
52
- D as ListItemLabel
60
+ I as ListItemLabel
53
61
  };
@@ -1,37 +1,37 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { c } from "../../index-L8X2o7IH.js";
3
- import '../../assets/ListItemLink.css';const x = "_link_18ajm_1", i = {
4
- link: x
5
- }, u = ({
6
- interactive: e = !1,
7
- as: o,
8
- loading: p,
9
- disabled: f,
10
- selected: l,
11
- href: v,
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { c as m } from "../../index-L8X2o7IH.js";
3
+ import '../../assets/ListItemLink.css';const u = "_link_18ajm_1", s = {
4
+ link: u
5
+ }, h = ({
6
+ as: c,
7
+ loading: l,
8
+ disabled: p,
9
+ selected: v,
10
+ href: f,
12
11
  onClick: t,
13
12
  onKeyPress: a,
14
13
  className: r,
15
- children: m,
16
- active: b,
17
- describedby: n
18
- }) => e ? /* @__PURE__ */ d(
19
- o || "div",
20
- {
21
- className: c(i.link, i.interactive, r),
22
- href: v,
23
- onKeyPress: (s) => {
24
- s.key === "Enter" && (t == null || t()), a == null || a(s);
25
- },
26
- onClick: t,
27
- "data-interactive": e,
28
- "aria-disabled": p || f,
29
- "aria-selected": l,
30
- "aria-describedby": n,
31
- "data-active": b,
32
- children: m
33
- }
34
- ) : /* @__PURE__ */ d("div", { className: c(i.link, r), "aria-describedby": n, children: m });
14
+ active: o,
15
+ ariaLabel: e
16
+ }) => {
17
+ const n = c || "div";
18
+ return n === "div" ? /* @__PURE__ */ i("div", { className: m(s.link, r), children: /* @__PURE__ */ i("span", { children: e }) }) : /* @__PURE__ */ i(
19
+ n,
20
+ {
21
+ className: m(s.link, r),
22
+ href: f,
23
+ onKeyPress: (d) => {
24
+ d.key === "Enter" && (t == null || t()), a == null || a(d);
25
+ },
26
+ onClick: t,
27
+ "data-interactive": "true",
28
+ "aria-disabled": l || p,
29
+ "aria-selected": v,
30
+ "aria-label": e,
31
+ "data-active": o
32
+ }
33
+ );
34
+ };
35
35
  export {
36
- u as ListItemLink
36
+ h as ListItemLink
37
37
  };
@@ -1,50 +1,50 @@
1
- import { jsxs as M, jsx as t } from "react/jsx-runtime";
2
- import { MenuItemBase as b } from "./MenuItemBase.js";
3
- import { MenuItemLabel as g } from "./MenuItemLabel.js";
4
- import { MenuItemIcon as k } from "./MenuItemIcon.js";
1
+ import { jsxs as u, jsx as o, Fragment as k } from "react/jsx-runtime";
2
+ import { Icon as M } from "../Icon/Icon.js";
5
3
  import "../../index-L8X2o7IH.js";
6
4
  import "react";
7
5
  import "../RootProvider/RootProvider.js";
6
+ import { MenuItemBase as b } from "./MenuItemBase.js";
7
+ import { MenuItemLabel as y } from "./MenuItemLabel.js";
8
+ import { MenuItemIcon as C } from "./MenuItemIcon.js";
8
9
  import "../Searchbar/AutocompleteBase.js";
9
10
  import "../Snackbar/useSnackbar.js";
10
- import { S as L, a as S } from "../../ChevronUp-DR4Lz2Jb.js";
11
- const F = ({
12
- as: n = "a",
13
- size: o = "md",
14
- color: e,
15
- theme: a,
16
- collapsible: r,
17
- expanded: m,
11
+ import { S as _, a as j } from "../../ChevronUp-DR4Lz2Jb.js";
12
+ import { S as w } from "../../ChevronRight-BbelnTke.js";
13
+ import '../../assets/MenuItem.css';const x = "_linkIcon_1owl4_57", m = {
14
+ linkIcon: x
15
+ }, J = ({
16
+ as: i = "a",
17
+ size: n = "md",
18
+ color: s,
19
+ theme: l,
20
+ collapsible: c,
21
+ expanded: r,
18
22
  icon: p,
19
- iconTheme: i,
20
- iconBadge: c,
21
- avatar: d,
22
- avatarGroup: j,
23
+ iconTheme: a,
24
+ iconBadge: h,
23
25
  title: I,
24
- description: u,
25
- badge: v,
26
- linkText: f,
27
- linkIcon: h,
28
- label: l,
29
- ...s
30
- }) => /* @__PURE__ */ M(
31
- b,
32
- {
33
- as: n,
34
- size: o,
35
- theme: a,
36
- badge: v,
37
- linkText: f,
38
- linkIcon: r && m ? L : r ? S : h,
39
- color: e,
40
- expanded: m,
41
- ...s,
42
- children: [
43
- /* @__PURE__ */ t(k, { size: o, icon: p, theme: i, badge: c }),
44
- /* @__PURE__ */ t(g, { title: I, description: u, size: o, children: l })
45
- ]
46
- }
47
- );
26
+ description: v,
27
+ badge: f,
28
+ controls: e,
29
+ linkIcon: d,
30
+ label: g,
31
+ ...S
32
+ }) => {
33
+ const t = c ? r ? _ : j : d ? w : void 0;
34
+ return /* @__PURE__ */ u(b, { as: i, size: n, theme: l, color: s, expanded: r, ...S, children: [
35
+ /* @__PURE__ */ o(C, { size: n, icon: p, theme: a, badge: h }),
36
+ /* @__PURE__ */ o(y, { title: I, description: v, size: n, badge: f, children: g }),
37
+ /* @__PURE__ */ o("span", { className: m.controls, children: e ? /* @__PURE__ */ o("span", { style: { position: "relative" }, children: e }) : /* @__PURE__ */ o(k, { children: t && /* @__PURE__ */ o("span", { className: m.linkIcon, children: /* @__PURE__ */ o(
38
+ M,
39
+ {
40
+ svgElement: t,
41
+ style: {
42
+ fontSize: "1.5rem"
43
+ }
44
+ }
45
+ ) }) }) })
46
+ ] });
47
+ };
48
48
  export {
49
- F as MenuItem
49
+ J as MenuItem
50
50
  };
@@ -1,62 +1,41 @@
1
- import { jsxs as a, jsx as c } from "react/jsx-runtime";
2
- import { c as u } from "../../index-L8X2o7IH.js";
3
- import { Icon as v } from "../Icon/Icon.js";
4
- import "react";
5
- import { Badge as T } from "../Badge/Badge.js";
6
- import "../RootProvider/RootProvider.js";
7
- import "../Searchbar/AutocompleteBase.js";
8
- import "../Snackbar/useSnackbar.js";
9
- import '../../assets/MenuItemBase.css';const B = "_item_1ejie_1", E = "_content_1ejie_45", k = "_action_1ejie_53", z = "_linkText_1ejie_60", M = "_linkIcon_1ejie_65", e = {
10
- item: B,
11
- content: E,
12
- action: k,
13
- linkText: z,
14
- linkIcon: M
15
- }, O = ({
16
- as: _,
17
- color: l,
18
- theme: p,
19
- size: d,
20
- className: h,
21
- href: x,
22
- onClick: n,
23
- onKeyPress: i,
24
- tabIndex: j = 0,
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { c as l } from "../../index-L8X2o7IH.js";
3
+ import '../../assets/MenuItemBase.css';const u = "_item_1df6r_1", I = "_content_1df6r_45", o = {
4
+ item: u,
5
+ content: I
6
+ }, z = ({
7
+ as: s,
8
+ color: c,
9
+ theme: d,
10
+ size: r,
11
+ className: i,
12
+ href: p,
13
+ onClick: t,
14
+ onKeyPress: e,
15
+ tabIndex: _ = 0,
25
16
  hidden: f,
26
- selected: I,
27
- disabled: m = !1,
28
- linkIcon: o,
29
- linkText: s,
30
- badge: t,
31
- children: N
32
- }) => /* @__PURE__ */ a(
33
- _ || "a",
17
+ selected: x,
18
+ disabled: a = !1,
19
+ children: h
20
+ }) => /* @__PURE__ */ m(
21
+ s || "a",
34
22
  {
35
- tabIndex: m ? "-1" : j ?? 0,
36
- className: u(e.item, h),
37
- "data-size": d,
38
- "data-color": l,
39
- "data-theme": p,
23
+ tabIndex: a ? "-1" : _ ?? 0,
24
+ className: l(o.item, i),
25
+ "data-size": r,
26
+ "data-color": c,
27
+ "data-theme": d,
40
28
  "aria-hidden": f,
41
- "aria-disabled": m,
42
- "data-selected": I,
43
- href: x,
44
- onKeyPress: (r) => {
45
- r.key === "Enter" && (n == null || n()), i == null || i(r);
29
+ "aria-disabled": a,
30
+ "data-selected": x,
31
+ href: p,
32
+ onKeyPress: (n) => {
33
+ n.key === "Enter" && (t == null || t()), e == null || e(n);
46
34
  },
47
- onClick: n,
48
- children: [
49
- /* @__PURE__ */ a("div", { className: e.content, children: [
50
- N,
51
- t && /* @__PURE__ */ c(T, { ...t, theme: (t == null ? void 0 : t.theme) || "surface" })
52
- ] }),
53
- o && /* @__PURE__ */ a("div", { className: e.action, children: [
54
- s && /* @__PURE__ */ c("span", { className: e.linkText, children: s }),
55
- o && /* @__PURE__ */ c(v, { svgElement: o, className: e.linkIcon })
56
- ] })
57
- ]
35
+ onClick: t,
36
+ children: /* @__PURE__ */ m("span", { className: o.content, children: h })
58
37
  }
59
38
  );
60
39
  export {
61
- O as MenuItemBase
40
+ z as MenuItemBase
62
41
  };