@altinn/altinn-components 0.14.3 → 0.15.1

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 (136) 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/Bookmarks/BookmarksListItem.js +6 -73
  25. package/dist/components/Bookmarks/BookmarksSection.js +23 -21
  26. package/dist/components/Bookmarks/EditableBookmark.js +62 -0
  27. package/dist/components/Bookmarks/index.js +9 -7
  28. package/dist/components/Button/ButtonIcon.js +9 -5
  29. package/dist/components/Button/ButtonLabel.js +4 -4
  30. package/dist/components/Dialog/Dialog.js +3 -3
  31. package/dist/components/Dialog/DialogAttachments.js +1 -1
  32. package/dist/components/Dialog/DialogContent.js +1 -1
  33. package/dist/components/Dialog/DialogHistoryItem.js +1 -1
  34. package/dist/components/Dialog/DialogListGroup.js +1 -1
  35. package/dist/components/Dialog/DialogListItem.js +80 -72
  36. package/dist/components/Dialog/DialogSection.js +1 -1
  37. package/dist/components/Dialog/DraftDialog.js +1 -1
  38. package/dist/components/GlobalMenu/AccountButton.js +4 -4
  39. package/dist/components/GlobalMenu/AccountMenu.js +27 -16
  40. package/dist/components/GlobalMenu/BackButton.js +2 -2
  41. package/dist/components/GlobalMenu/GlobalMenu.js +21 -21
  42. package/dist/components/GlobalMenu/GlobalMenuBase.js +9 -9
  43. package/dist/components/Header/HeaderButton.js +21 -17
  44. package/dist/components/Icon/Icon.js +10 -9
  45. package/dist/components/Icon/IconOrAvatar.js +27 -0
  46. package/dist/components/Icon/index.js +8 -6
  47. package/dist/components/LayoutAction/ActionHeader.js +1 -1
  48. package/dist/components/List/ListBase.js +3 -3
  49. package/dist/components/List/ListItem.js +90 -51
  50. package/dist/components/List/ListItemBase.js +63 -29
  51. package/dist/components/List/ListItemControls.js +8 -17
  52. package/dist/components/List/ListItemHeader.js +85 -59
  53. package/dist/components/List/ListItemIcon.js +25 -0
  54. package/dist/components/List/ListItemLabel.js +6 -6
  55. package/dist/components/List/ListItemLink.js +29 -27
  56. package/dist/components/List/ListItemSelect.js +11 -11
  57. package/dist/components/List/index.js +8 -8
  58. package/dist/components/Menu/Menu.js +18 -16
  59. package/dist/components/Menu/MenuBase.js +6 -6
  60. package/dist/components/Menu/MenuItem.js +64 -51
  61. package/dist/components/Menu/MenuItemBase.js +26 -26
  62. package/dist/components/Menu/MenuItemIcon.js +27 -0
  63. package/dist/components/Menu/MenuItemLabel.js +7 -7
  64. package/dist/components/Menu/MenuItems.js +32 -29
  65. package/dist/components/Menu/MenuOption.js +3 -3
  66. package/dist/components/Menu/index.js +14 -14
  67. package/dist/components/Meta/MetaItemMedia.js +13 -8
  68. package/dist/components/Page/PageHeader.js +33 -12
  69. package/dist/components/Page/PageMenu.js +5 -5
  70. package/dist/components/Page/PageTabs.js +16 -0
  71. package/dist/components/Page/index.js +14 -12
  72. package/dist/components/RootProvider/RootProvider.js +3 -3
  73. package/dist/components/Searchbar/SearchField.js +19 -16
  74. package/dist/components/Searchbar/Searchbar.js +1 -1
  75. package/dist/components/Toolbar/Toolbar.js +7 -7
  76. package/dist/components/Transmission/TransmissionItem.js +1 -1
  77. package/dist/components/index.js +285 -279
  78. package/dist/{globalMenu-XcVgsnCz.js → globalMenu-C6osDiF4.js} +1 -0
  79. package/dist/index.js +289 -283
  80. package/dist/types/lib/components/AccessPackageList/AccessPackageList.d.ts +1 -1
  81. package/dist/types/lib/components/Avatar/AvatarGroup.stories.d.ts +6 -2
  82. package/dist/types/lib/components/Avatar/avatar.stories.d.ts +3 -1
  83. package/dist/types/lib/components/Badge/Badge.d.ts +4 -4
  84. package/dist/types/lib/components/Badge/Badge.stories.d.ts +1 -1
  85. package/dist/types/lib/components/Bookmarks/BookmarksListItem.d.ts +3 -26
  86. package/dist/types/lib/components/Bookmarks/BookmarksListItem.stories.d.ts +1 -1
  87. package/dist/types/lib/components/Bookmarks/BookmarksSection.d.ts +2 -2
  88. package/dist/types/lib/components/Bookmarks/EditableBookmark.d.ts +31 -0
  89. package/dist/types/lib/components/Bookmarks/index.d.ts +2 -1
  90. package/dist/types/lib/components/ContextMenu/ContextMenu.stories.d.ts +3 -23
  91. package/dist/types/lib/components/Icon/Icon.d.ts +3 -3
  92. package/dist/types/lib/components/Icon/IconOrAvatar.d.ts +12 -0
  93. package/dist/types/lib/components/Icon/index.d.ts +1 -0
  94. package/dist/types/lib/components/Layout/Layout.stories.d.ts +0 -1
  95. package/dist/types/lib/components/LayoutAction/LayoutAction.stories.d.ts +3 -15
  96. package/dist/types/lib/components/List/List.d.ts +1 -1
  97. package/dist/types/lib/components/List/ListBase.d.ts +8 -4
  98. package/dist/types/lib/components/{Header/HeaderLogo.stories.d.ts → List/ListBase.stories.d.ts} +4 -2
  99. package/dist/types/lib/components/List/ListItem.d.ts +5 -10
  100. package/dist/types/lib/components/List/ListItem.stories.d.ts +14 -9
  101. package/dist/types/lib/components/List/ListItemBase.d.ts +8 -2
  102. package/dist/types/lib/components/List/ListItemControls.d.ts +1 -8
  103. package/dist/types/lib/components/List/ListItemHeader.d.ts +5 -15
  104. package/dist/types/lib/components/List/ListItemIcon.d.ts +13 -0
  105. package/dist/types/lib/components/List/ListItemLink.d.ts +2 -1
  106. package/dist/types/lib/components/List/MultilevelList.stories.d.ts +5 -0
  107. package/dist/types/lib/components/List/Specimens.stories.d.ts +13 -0
  108. package/dist/types/lib/components/List/index.d.ts +1 -1
  109. package/dist/types/lib/components/Menu/Menu.d.ts +1 -1
  110. package/dist/types/lib/components/Menu/Menu.stories.d.ts +4 -27
  111. package/dist/types/lib/components/Menu/MenuBase.d.ts +4 -3
  112. package/dist/types/lib/components/Menu/MenuItem.d.ts +7 -7
  113. package/dist/types/lib/components/Menu/MenuItemBase.d.ts +1 -1
  114. package/dist/types/lib/components/Menu/MenuItemIcon.d.ts +8 -0
  115. package/dist/types/lib/components/Menu/MenuItems.d.ts +6 -4
  116. package/dist/types/lib/components/Menu/Patterns.stories.d.ts +72 -0
  117. package/dist/types/lib/components/Menu/index.d.ts +1 -1
  118. package/dist/types/lib/components/Page/PageHeader.d.ts +7 -2
  119. package/dist/types/lib/components/Page/PageHeader.stories.d.ts +1 -1
  120. package/dist/types/lib/components/Page/PageMenu.stories.d.ts +3 -15
  121. package/dist/types/lib/components/Page/PageTabs.d.ts +8 -0
  122. package/dist/types/lib/components/Page/index.d.ts +1 -0
  123. package/dist/types/lib/types/color.d.ts +1 -1
  124. package/package.json +27 -26
  125. package/dist/assets/ListItemMedia.css +0 -1
  126. package/dist/assets/MenuItemMedia.css +0 -1
  127. package/dist/components/List/ListItemMedia.js +0 -39
  128. package/dist/components/Menu/MenuItemMedia.js +0 -50
  129. package/dist/types/lib/components/Layout/LayoutBase.stories.d.ts +0 -11
  130. package/dist/types/lib/components/Layout/LayoutBody.stories.d.ts +0 -11
  131. package/dist/types/lib/components/Layout/LayoutContent.stories.d.ts +0 -11
  132. package/dist/types/lib/components/Layout/LayoutSidebar.stories.d.ts +0 -11
  133. package/dist/types/lib/components/List/ListItemHeader.stories.d.ts +0 -23
  134. package/dist/types/lib/components/List/ListItemMedia.d.ts +0 -13
  135. package/dist/types/lib/components/Menu/MenuItem.stories.d.ts +0 -25
  136. package/dist/types/lib/components/Menu/MenuItemMedia.d.ts +0 -14
@@ -1,40 +1,42 @@
1
- import { jsxs as s, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
2
  import { createElement as c } from "react";
3
3
  import "../../index-L8X2o7IH.js";
4
4
  import "../Icon/SvgIcon.js";
5
5
  import { Typography as f } from "../Typography/Typography.js";
6
- import { Heading as h } from "../Typography/Heading.js";
6
+ import { Heading as k } from "../Typography/Heading.js";
7
7
  import "../Autocomplete/AutocompleteBase.js";
8
- import { BookmarksListItem as k } from "./BookmarksListItem.js";
8
+ import { BookmarksListItem as h } from "./BookmarksListItem.js";
9
+ import { EditableBookmark as x } from "./EditableBookmark.js";
9
10
  import "../RootProvider/RootProvider.js";
10
11
  import { ListBase as l } from "../List/ListBase.js";
11
12
  import "../Snackbar/useSnackbar.js";
12
- import { Section as x } from "../Page/Section.js";
13
- const I = ({
14
- loading: t,
13
+ import { Section as z } from "../Page/Section.js";
14
+ const q = ({
15
+ loading: i,
15
16
  title: e,
16
17
  description: p,
17
- items: m,
18
- untitled: d = "Untitled bookmark",
19
- titleField: a,
20
- expandedId: n,
21
- onToggle: i
22
- }) => /* @__PURE__ */ s(x, { padding: 6, theme: "surface-hover", spacing: 4, bleed: !0, children: [
23
- /* @__PURE__ */ o(h, { size: "md", children: e }),
24
- m.length > 0 && /* @__PURE__ */ o(l, { spacing: "xs", children: m.map((r) => /* @__PURE__ */ c(
25
- k,
18
+ items: t,
19
+ untitled: s = "Untitled bookmark",
20
+ titleField: d,
21
+ expandedId: a,
22
+ onToggle: m
23
+ }) => /* @__PURE__ */ n(z, { padding: 6, theme: "surface-hover", spacing: 4, bleed: !0, children: [
24
+ /* @__PURE__ */ o(k, { size: "md", children: e }),
25
+ i ? /* @__PURE__ */ o(h, { title: e, loading: i, size: "sm" }) : t.length > 0 && /* @__PURE__ */ o(l, { spacing: "xs", children: t.map((r) => /* @__PURE__ */ c(
26
+ x,
26
27
  {
27
28
  ...r,
28
29
  key: r.id,
29
- loading: t || r.loading,
30
- onToggle: () => i == null ? void 0 : i(r.id),
31
- expanded: n === r.id,
32
- untitled: d,
33
- titleField: a
30
+ loading: i || r.loading,
31
+ onToggle: () => m == null ? void 0 : m(r.id),
32
+ expanded: a === r.id,
33
+ untitled: s,
34
+ titleField: d,
35
+ size: "sm"
34
36
  }
35
37
  )) }),
36
38
  /* @__PURE__ */ o(f, { size: "xs", children: p })
37
39
  ] });
38
40
  export {
39
- I as BookmarksSection
41
+ q as BookmarksSection
40
42
  };
@@ -0,0 +1,62 @@
1
+ import { jsx as o, jsxs as c } from "react/jsx-runtime";
2
+ import { useState as x } from "react";
3
+ import "../../index-L8X2o7IH.js";
4
+ import "../Icon/SvgIcon.js";
5
+ import "../Autocomplete/AutocompleteBase.js";
6
+ import { QueryLabel as y } from "./QueryLabel.js";
7
+ import { BookmarksListItem as I } from "./BookmarksListItem.js";
8
+ import { Button as f } from "../Button/Button.js";
9
+ import { IconButton as b } from "../Button/IconButton.js";
10
+ import "../RootProvider/RootProvider.js";
11
+ import "../Snackbar/useSnackbar.js";
12
+ import { Flex as j } from "../Page/Flex.js";
13
+ import { Section as L } from "../Page/Section.js";
14
+ import { TextField as S } from "../TextField/TextField.js";
15
+ const H = ({
16
+ id: s,
17
+ title: i,
18
+ untitled: u,
19
+ params: m,
20
+ expanded: n,
21
+ onToggle: d,
22
+ titleField: e,
23
+ saveButton: r,
24
+ removeButton: t,
25
+ inputValue: p,
26
+ onChange: l,
27
+ ...g
28
+ }) => {
29
+ const [k, h] = x("");
30
+ return /* @__PURE__ */ o(
31
+ I,
32
+ {
33
+ ...g,
34
+ expanded: n,
35
+ id: s,
36
+ title: n ? i || u : i,
37
+ params: m,
38
+ controls: /* @__PURE__ */ o(b, { variant: "outline", size: "sm", icon: "chevron-up", onClick: d }),
39
+ children: /* @__PURE__ */ c(L, { padding: 4, spacing: 4, children: [
40
+ /* @__PURE__ */ o(y, { params: m }),
41
+ e && /* @__PURE__ */ o(
42
+ S,
43
+ {
44
+ ...e,
45
+ name: "title",
46
+ value: typeof p == "string" ? p : k,
47
+ onChange: (a) => {
48
+ typeof l == "function" ? l(a) : h(a.target.value);
49
+ }
50
+ }
51
+ ),
52
+ (r || t) && /* @__PURE__ */ c(j, { as: "footer", direction: "row", spacing: 2, children: [
53
+ r && /* @__PURE__ */ o(f, { ...r }),
54
+ t && /* @__PURE__ */ o(f, { ...t, variant: "outline" })
55
+ ] })
56
+ ] })
57
+ }
58
+ );
59
+ };
60
+ export {
61
+ H as EditableBookmark
62
+ };
@@ -1,9 +1,11 @@
1
- import { BookmarksListItem as e } from "./BookmarksListItem.js";
2
- import { QueryItem as t, QueryLabel as k } from "./QueryLabel.js";
3
- import { BookmarksSection as f } from "./BookmarksSection.js";
1
+ import { QueryItem as e, QueryLabel as m } from "./QueryLabel.js";
2
+ import { BookmarksListItem as k } from "./BookmarksListItem.js";
3
+ import { EditableBookmark as f } from "./EditableBookmark.js";
4
+ import { BookmarksSection as x } from "./BookmarksSection.js";
4
5
  export {
5
- e as BookmarksListItem,
6
- f as BookmarksSection,
7
- t as QueryItem,
8
- k as QueryLabel
6
+ k as BookmarksListItem,
7
+ x as BookmarksSection,
8
+ f as EditableBookmark,
9
+ e as QueryItem,
10
+ m as QueryLabel
9
11
  };
@@ -1,10 +1,14 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { Icon as c } from "../Icon/Icon.js";
2
+ import { Icon as n } from "../Icon/Icon.js";
3
3
  import "../Icon/SvgIcon.js";
4
4
  import "../../index-L8X2o7IH.js";
5
- import '../../assets/ButtonIcon.css';const i = "_icon_ablit_1", r = {
6
- icon: i
7
- }, p = ({ size: n, icon: t }) => /* @__PURE__ */ o("span", { className: r.icon, "data-size": n, children: /* @__PURE__ */ o(c, { name: t }) });
5
+ import "react";
6
+ import "../Autocomplete/AutocompleteBase.js";
7
+ import "../RootProvider/RootProvider.js";
8
+ import "../Snackbar/useSnackbar.js";
9
+ import '../../assets/ButtonIcon.css';const r = "_icon_ablit_1", m = {
10
+ icon: r
11
+ }, f = ({ size: t, icon: i }) => /* @__PURE__ */ o("span", { className: m.icon, "data-size": t, children: /* @__PURE__ */ o(n, { name: i }) });
8
12
  export {
9
- p as ButtonIcon
13
+ f as ButtonIcon
10
14
  };
@@ -1,8 +1,8 @@
1
- import { jsx as s } from "react/jsx-runtime";
1
+ import { jsx as t } from "react/jsx-runtime";
2
2
  import { c as e } from "../../index-L8X2o7IH.js";
3
- import '../../assets/ButtonLabel.css';const o = "_label_1t884_1", r = {
3
+ import '../../assets/ButtonLabel.css';const o = "_label_1ahnm_1", n = {
4
4
  label: o
5
- }, b = ({ className: t, size: a, children: l }) => /* @__PURE__ */ s("span", { className: e(r.label, t), "data-size": a, children: l });
5
+ }, m = ({ className: a, size: l, children: s }) => /* @__PURE__ */ t("span", { className: e(n.label, a), "data-size": l, children: s });
6
6
  export {
7
- b as ButtonLabel
7
+ m as ButtonLabel
8
8
  };
@@ -1,9 +1,9 @@
1
1
  import { jsxs as m, 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 h } from "../Typography/Typography.js";
5
6
  import { Heading as v } from "../Typography/Heading.js";
6
- import "react";
7
7
  import "../Autocomplete/AutocompleteBase.js";
8
8
  import { DialogMetadata as w } from "./DialogMetadata.js";
9
9
  import { DialogByline as C } from "./DialogByline.js";
@@ -44,8 +44,8 @@ const hr = ({
44
44
  timeline: o,
45
45
  additionalInfo: e,
46
46
  contactInfo: i
47
- }) => /* @__PURE__ */ m(G, { children: [
48
- /* @__PURE__ */ m(O, { theme: "default", shadow: "xs", bleed: !0, children: [
47
+ }) => /* @__PURE__ */ m(G, { bleed: !0, children: [
48
+ /* @__PURE__ */ m(O, { theme: "default", shadow: "xs", children: [
49
49
  /* @__PURE__ */ r(J, { color: "neutral", padding: 2, backButton: D, menu: p }),
50
50
  /* @__PURE__ */ m(L, { padding: 6, spacing: 6, children: [
51
51
  /* @__PURE__ */ m(Q, { direction: "col", align: "start", spacing: 3, children: [
@@ -1,9 +1,9 @@
1
1
  import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "../Icon/SvgIcon.js";
4
+ import "react";
4
5
  import { Heading as n } from "../Typography/Heading.js";
5
6
  import { AttachmentList as m } from "../Attachment/AttachmentList.js";
6
- import "react";
7
7
  import "../Autocomplete/AutocompleteBase.js";
8
8
  import "../RootProvider/RootProvider.js";
9
9
  import "../Snackbar/useSnackbar.js";
@@ -1,8 +1,8 @@
1
1
  import { jsx as i, jsxs as o } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "../Icon/SvgIcon.js";
4
- import { Typography as n } from "../Typography/Typography.js";
5
4
  import "react";
5
+ import { Typography as n } from "../Typography/Typography.js";
6
6
  import "../Autocomplete/AutocompleteBase.js";
7
7
  import { DialogActivityLog as c } from "./DialogActivityLog.js";
8
8
  import { DialogSeenBy as l } from "./DialogSeenBy.js";
@@ -2,8 +2,8 @@
2
2
  import { jsx as o, jsxs as n } from "react/jsx-runtime";
3
3
  import "../../index-L8X2o7IH.js";
4
4
  import "../Icon/SvgIcon.js";
5
- import { Typography as s } from "../Typography/Typography.js";
6
5
  import "react";
6
+ import { Typography as s } from "../Typography/Typography.js";
7
7
  import "../Autocomplete/AutocompleteBase.js";
8
8
  import "../RootProvider/RootProvider.js";
9
9
  import "../Snackbar/useSnackbar.js";
@@ -1,8 +1,8 @@
1
1
  import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "../Icon/SvgIcon.js";
4
- import { Heading as e } from "../Typography/Heading.js";
5
4
  import "react";
5
+ import { Heading as e } from "../Typography/Heading.js";
6
6
  import "../Autocomplete/AutocompleteBase.js";
7
7
  import { Button as m } from "../Button/Button.js";
8
8
  import "../RootProvider/RootProvider.js";
@@ -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
  };