@altinn/altinn-components 0.8.3 → 0.9.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 (179) hide show
  1. package/dist/assets/DropdownBase.css +1 -1
  2. package/dist/assets/LayoutBody.css +1 -1
  3. package/dist/assets/MenuItemBase.css +1 -1
  4. package/dist/assets/MenuItemLabel.css +1 -1
  5. package/dist/assets/MenuItemMedia.css +1 -1
  6. package/dist/assets/MenuSearch.css +1 -1
  7. package/dist/assets/ToolbarBase.css +1 -1
  8. package/dist/assets/ToolbarSearch.css +1 -1
  9. package/dist/components/Attachment/AttachmentLink.d.ts +1 -1
  10. package/dist/components/Attachment/AttachmentLink.stories.d.ts +11 -0
  11. package/dist/components/Attachment/AttachmentLink.stories.js +6 -7
  12. package/dist/components/Attachment/AttachmentList.stories.d.ts +15 -0
  13. package/dist/components/Attachment/AttachmentList.stories.js +8 -23
  14. package/dist/components/Attachment/AttachmentSection.stories.d.ts +13 -0
  15. package/dist/components/Attachment/AttachmentSection.stories.js +8 -26
  16. package/dist/components/{Searchbar → Autocomplete}/ScopeListItem.d.ts +1 -2
  17. package/dist/components/Autocomplete/ScopeListItem.js +13 -0
  18. package/dist/components/Autocomplete/index.d.ts +1 -0
  19. package/dist/components/Autocomplete/index.js +4 -0
  20. package/dist/components/Avatar/AvatarGroup.stories.d.ts +13 -0
  21. package/dist/components/Badge/Badge.stories.d.ts +15 -0
  22. package/dist/components/Bookmarks/BookmarksList.js +1 -1
  23. package/dist/components/Bookmarks/BookmarksListItem.js +7 -6
  24. package/dist/components/Bookmarks/BookmarksListItem.stories.js +2 -2
  25. package/dist/components/Bookmarks/BookmarksSection.js +2 -2
  26. package/dist/components/Button/Button.stories.d.ts +18 -0
  27. package/dist/components/Button/Buttons.stories.js +8 -8
  28. package/dist/components/Button/ComboButton.stories.d.ts +19 -0
  29. package/dist/components/ContextMenu/ContextMenu.js +1 -1
  30. package/dist/components/ContextMenu/ContextMenu.stories.d.ts +39 -0
  31. package/dist/components/ContextMenu/ContextMenu.stories.js +5 -1
  32. package/dist/components/Dialog/Dialog.d.ts +4 -4
  33. package/dist/components/Dialog/Dialog.js +23 -23
  34. package/dist/components/Dialog/DialogActions.js +1 -1
  35. package/dist/components/Dialog/DialogActions.stories.d.ts +22 -0
  36. package/dist/components/Dialog/DialogContent.stories.d.ts +14 -0
  37. package/dist/components/Dialog/DialogContent.stories.js +2 -7
  38. package/dist/components/Dialog/DialogGroup.js +5 -5
  39. package/dist/components/Dialog/DialogHeader.d.ts +1 -1
  40. package/dist/components/Dialog/DialogHeader.js +5 -5
  41. package/dist/components/Dialog/DialogHeader.stories.d.ts +21 -0
  42. package/dist/components/Dialog/DialogHeader.stories.js +7 -4
  43. package/dist/components/Dialog/DialogHeadings.d.ts +6 -6
  44. package/dist/components/Dialog/DialogHeadings.js +15 -21
  45. package/dist/components/Dialog/DialogHeadings.stories.d.ts +21 -0
  46. package/dist/components/Dialog/DialogHistory.js +1 -1
  47. package/dist/components/Dialog/DialogHistory.stories.d.ts +52 -0
  48. package/dist/components/Dialog/DialogHistory.stories.js +27 -15
  49. package/dist/components/Dialog/DialogList.js +2 -2
  50. package/dist/components/Dialog/DialogList.stories.d.ts +51 -0
  51. package/dist/components/Dialog/DialogListItem.js +70 -69
  52. package/dist/components/Dialog/DialogListItem.stories.js +1 -1
  53. package/dist/components/Dialog/DialogMetadata.stories.d.ts +18 -0
  54. package/dist/components/Dialog/DialogNav.stories.d.ts +15 -0
  55. package/dist/components/Dialog/DialogNav.stories.js +1 -0
  56. package/dist/components/Dialog/DialogStatus.stories.d.ts +22 -0
  57. package/dist/components/Dropdown/DrawerButton.js +2 -2
  58. package/dist/components/Dropdown/DrawerOrDropdown.js +1 -1
  59. package/dist/components/Dropdown/DropdownBase.js +18 -18
  60. package/dist/components/Footer/Footer.stories.d.ts +22 -0
  61. package/dist/components/GlobalMenu/AccountButton.js +1 -1
  62. package/dist/components/GlobalMenu/AccountMenu.js +1 -1
  63. package/dist/components/GlobalMenu/AccountMenu.stories.js +12 -75
  64. package/dist/components/GlobalMenu/BackButton.js +3 -3
  65. package/dist/components/GlobalMenu/GlobalMenu.js +16 -16
  66. package/dist/components/GlobalMenu/GlobalMenu.stories.js +29 -163
  67. package/dist/components/Header/Header.js +12 -11
  68. package/dist/components/Header/Header.stories.js +14 -149
  69. package/dist/components/Header/HeaderBase.js +1 -1
  70. package/dist/components/Header/HeaderButton.stories.d.ts +18 -0
  71. package/dist/components/Header/HeaderLogo.stories.d.ts +11 -0
  72. package/dist/components/History/HistoryItem.js +1 -1
  73. package/dist/components/History/HistoryItem.stories.d.ts +20 -0
  74. package/dist/components/History/HistoryItemBase.stories.d.ts +19 -0
  75. package/dist/components/History/HistoryList.stories.d.ts +69 -0
  76. package/dist/components/Icon/CheckboxIcon.stories.d.ts +13 -0
  77. package/dist/components/Icon/ProgressIcon.stories.d.ts +15 -0
  78. package/dist/components/Icon/RadioIcon.stories.d.ts +13 -0
  79. package/dist/components/Layout/Layout.d.ts +1 -1
  80. package/dist/components/Layout/Layout.js +7 -7
  81. package/dist/components/Layout/Layout.stories.js +60 -279
  82. package/dist/components/Layout/LayoutBase.stories.d.ts +11 -0
  83. package/dist/components/Layout/LayoutBody.d.ts +6 -2
  84. package/dist/components/Layout/LayoutBody.js +4 -4
  85. package/dist/components/Layout/LayoutBody.stories.d.ts +11 -0
  86. package/dist/components/Layout/LayoutContent.stories.d.ts +11 -0
  87. package/dist/components/Layout/LayoutSidebar.stories.d.ts +11 -0
  88. package/dist/components/LayoutAction/ActionHeader.stories.d.ts +11 -0
  89. package/dist/components/LayoutAction/ActionMenu.js +1 -1
  90. package/dist/components/List/List.js +1 -1
  91. package/dist/components/List/List.stories.js +1 -1
  92. package/dist/components/List/ListItem.d.ts +4 -1
  93. package/dist/components/List/ListItem.js +53 -46
  94. package/dist/components/List/ListItem.stories.js +10 -10
  95. package/dist/components/List/ListItemHeader.stories.js +3 -3
  96. package/dist/components/Menu/Menu.d.ts +0 -2
  97. package/dist/components/Menu/Menu.js +21 -16
  98. package/dist/components/Menu/Menu.stories.d.ts +35 -0
  99. package/dist/components/Menu/Menu.stories.js +33 -120
  100. package/dist/components/Menu/MenuItem.d.ts +2 -2
  101. package/dist/components/Menu/MenuItem.js +13 -13
  102. package/dist/components/Menu/MenuItem.stories.js +2 -2
  103. package/dist/components/Menu/MenuItemBase.d.ts +1 -1
  104. package/dist/components/Menu/MenuItemBase.js +36 -36
  105. package/dist/components/Menu/MenuItemLabel.js +6 -6
  106. package/dist/components/Menu/MenuItemMedia.js +7 -5
  107. package/dist/components/Menu/MenuItems.d.ts +3 -1
  108. package/dist/components/Menu/MenuItems.js +57 -52
  109. package/dist/components/Menu/MenuItems.stories.d.ts +17 -0
  110. package/dist/components/Menu/MenuItems.stories.js +18 -104
  111. package/dist/components/Menu/MenuOption.stories.d.ts +17 -0
  112. package/dist/components/Menu/MenuSearch.d.ts +2 -2
  113. package/dist/components/Menu/MenuSearch.js +10 -10
  114. package/dist/components/Menu/MenuSearch.stories.d.ts +13 -0
  115. package/dist/components/Menu/MenuSearch.stories.js +8 -9
  116. package/dist/components/Meta/MetaItem.stories.d.ts +16 -0
  117. package/dist/components/Meta/MetaList.stories.d.ts +15 -0
  118. package/dist/components/Meta/MetaProgress.stories.d.ts +14 -0
  119. package/dist/components/Meta/MetaTimestamp.stories.d.ts +15 -0
  120. package/dist/components/Page/PageHeader.js +1 -1
  121. package/dist/components/ResourceList/ResourceList.d.ts +6 -0
  122. package/dist/components/ResourceList/ResourceList.js +12 -0
  123. package/dist/components/ResourceList/ResourceList.stories.js +270 -0
  124. package/dist/components/ResourceList/ResourceListItem.d.ts +11 -0
  125. package/dist/components/ResourceList/ResourceListItem.js +32 -0
  126. package/dist/components/ResourceList/ResourceListItem.stories.js +33 -0
  127. package/dist/components/ResourceList/index.d.ts +2 -0
  128. package/dist/components/ResourceList/index.js +6 -0
  129. package/dist/components/Searchbar/Searchbar.d.ts +2 -2
  130. package/dist/components/Searchbar/Searchbar.js +1 -1
  131. package/dist/components/Toolbar/Toolbar.d.ts +3 -3
  132. package/dist/components/Toolbar/Toolbar.js +11 -11
  133. package/dist/components/Toolbar/Toolbar.stories.js +36 -161
  134. package/dist/components/Toolbar/ToolbarAccountMenu.d.ts +5 -0
  135. package/dist/components/Toolbar/ToolbarAccountMenu.js +20 -0
  136. package/dist/components/Toolbar/ToolbarAdd.js +1 -1
  137. package/dist/components/Toolbar/ToolbarAdd.stories.d.ts +13 -0
  138. package/dist/components/Toolbar/ToolbarAdd.stories.js +4 -1
  139. package/dist/components/Toolbar/ToolbarBase.js +1 -1
  140. package/dist/components/Toolbar/ToolbarButton.stories.d.ts +15 -0
  141. package/dist/components/Toolbar/ToolbarDate.stories.d.ts +27 -0
  142. package/dist/components/Toolbar/ToolbarDate.stories.js +7 -3
  143. package/dist/components/Toolbar/ToolbarDaterange.d.ts +2 -4
  144. package/dist/components/Toolbar/ToolbarDaterange.js +33 -34
  145. package/dist/components/Toolbar/ToolbarDaterange.stories.d.ts +15 -0
  146. package/dist/components/Toolbar/ToolbarDaterange.stories.js +7 -10
  147. package/dist/components/Toolbar/ToolbarFilter.js +1 -1
  148. package/dist/components/Toolbar/ToolbarFilter.stories.d.ts +18 -0
  149. package/dist/components/Toolbar/ToolbarFilter.stories.js +6 -24
  150. package/dist/components/Toolbar/ToolbarMenu.js +5 -5
  151. package/dist/components/Toolbar/ToolbarMenu.stories.d.ts +19 -0
  152. package/dist/components/Toolbar/ToolbarMenu.stories.js +7 -6
  153. package/dist/components/Toolbar/ToolbarOptions.js +1 -1
  154. package/dist/components/Toolbar/ToolbarOptions.stories.d.ts +12 -0
  155. package/dist/components/Toolbar/ToolbarOptions.stories.js +2 -48
  156. package/dist/components/Toolbar/ToolbarSearch.js +16 -16
  157. package/dist/components/Toolbar/ToolbarSearch.stories.d.ts +13 -0
  158. package/dist/components/Toolbar/ToolbarSearch.stories.js +6 -7
  159. package/dist/components/Transmission/TransmissionItem.js +38 -40
  160. package/dist/components/Transmission/TransmissionItem.stories.d.ts +25 -0
  161. package/dist/components/Transmission/TransmissionList.js +1 -1
  162. package/dist/components/Transmission/TransmissionList.stories.d.ts +55 -0
  163. package/dist/components/Transmission/TransmissionList.stories.js +1 -1
  164. package/dist/components/Transmission/TransmissionSection.js +1 -1
  165. package/dist/components/Typography/Typography.d.ts +1 -1
  166. package/dist/components/index.d.ts +2 -0
  167. package/dist/components/index.js +256 -250
  168. package/dist/index.js +264 -258
  169. package/package.json +3 -2
  170. package/dist/components/Searchbar/ScopeListItem.js +0 -13
  171. package/dist/components/{Searchbar → Autocomplete}/Autocomplete.d.ts +0 -0
  172. package/dist/components/{Searchbar → Autocomplete}/Autocomplete.js +0 -0
  173. package/dist/components/{Searchbar → Autocomplete}/Autocomplete.stories.js +0 -0
  174. package/dist/components/{Searchbar → Autocomplete}/AutocompleteBase.d.ts +0 -0
  175. package/dist/components/{Searchbar → Autocomplete}/AutocompleteBase.js +0 -0
  176. package/dist/components/{Searchbar → Autocomplete}/AutocompleteGroup.d.ts +0 -0
  177. package/dist/components/{Searchbar → Autocomplete}/AutocompleteGroup.js +0 -0
  178. package/dist/components/{Searchbar → Autocomplete}/AutocompleteItem.d.ts +0 -0
  179. package/dist/components/{Searchbar → Autocomplete}/AutocompleteItem.js +1 -1
@@ -1,5 +1,5 @@
1
1
  import { DialogContent as t } from "./DialogContent.js";
2
- const o = {
2
+ const a = {
3
3
  title: "Dialog/Sections/DialogContent",
4
4
  component: t,
5
5
  tags: ["autodocs"],
@@ -10,13 +10,8 @@ const o = {
10
10
  }
11
11
  }, e = {
12
12
  args: {}
13
- }, n = {
14
- args: {
15
- updatedByName: "Ole Gunnar Solskjær"
16
- }
17
13
  };
18
14
  export {
19
15
  e as Default,
20
- n as UpdatedByName,
21
- o as default
16
+ a as default
22
17
  };
@@ -3,18 +3,18 @@ import "../../index-L8X2o7IH.js";
3
3
  import "../Icon/SvgIcon.js";
4
4
  import { Heading as t } from "../Typography/Heading.js";
5
5
  import "react";
6
- import { Button as e } from "../Button/Button.js";
6
+ import "../Autocomplete/AutocompleteBase.js";
7
7
  import "../RootProvider/RootProvider.js";
8
- import { ListBase as n } from "../List/ListBase.js";
9
- import "../Searchbar/AutocompleteBase.js";
8
+ import { ListBase as e } from "../List/ListBase.js";
9
+ import { Button as n } from "../Button/Button.js";
10
10
  import { SectionBase as p } from "../Page/SectionBase.js";
11
11
  import { SectionHeader as a } from "../Page/SectionHeader.js";
12
12
  const k = ({ title: i, children: m }) => /* @__PURE__ */ o(p, { spacing: "md", children: [
13
13
  i && /* @__PURE__ */ o(a, { padding: !0, margin: !0, children: [
14
14
  /* @__PURE__ */ r(t, { children: i }),
15
- /* @__PURE__ */ r(e, { variant: "text", icon: "checkmark", size: "sm", children: "Velg alle" })
15
+ /* @__PURE__ */ r(n, { variant: "text", icon: "checkmark", size: "sm", children: "Velg alle" })
16
16
  ] }),
17
- /* @__PURE__ */ r(n, { spacing: "md", children: m })
17
+ /* @__PURE__ */ r(e, { spacing: "md", children: m })
18
18
  ] });
19
19
  export {
20
20
  k as DialogGroup
@@ -2,9 +2,9 @@ import { DialogRecipientProps, DialogSenderProps } from './DialogHeadings';
2
2
  import { DialogListItemVariant } from './DialogListItem.tsx';
3
3
  export interface DialogHeaderProps {
4
4
  title: string;
5
- seen: boolean;
6
5
  variant: DialogListItemVariant;
7
6
  sender?: DialogSenderProps;
7
+ seen?: boolean;
8
8
  recipient?: DialogRecipientProps;
9
9
  }
10
10
  export declare const DialogHeader: ({ title, sender, recipient, seen, variant }: DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,11 @@
1
- import { jsxs as a, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
2
  import { DialogHeaderBase as m } from "./DialogHeaderBase.js";
3
3
  import { DialogHeadings as t } from "./DialogHeadings.js";
4
4
  import { DialogTitle as x } from "./DialogTitle.js";
5
- const f = ({ title: r, sender: e, recipient: o, seen: l, variant: s }) => /* @__PURE__ */ a(m, { size: "xl", children: [
6
- /* @__PURE__ */ i(x, { seen: l, size: "xl", variant: s, children: r }),
7
- /* @__PURE__ */ i(t, { size: "xl", sender: e, recipient: o })
5
+ const D = ({ title: e, sender: o, recipient: i, seen: l = !1, variant: a }) => /* @__PURE__ */ s(m, { size: "xl", children: [
6
+ /* @__PURE__ */ r(x, { seen: l, size: "xl", variant: a, children: e }),
7
+ o && i && /* @__PURE__ */ r(t, { size: "xl", sender: o, recipient: i })
8
8
  ] });
9
9
  export {
10
- f as DialogHeader
10
+ D as DialogHeader
11
11
  };
@@ -0,0 +1,21 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ title, sender, recipient, seen, variant }: import('./DialogHeader').DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
5
+ tags: string[];
6
+ args: {
7
+ title: string;
8
+ variant: "neutral";
9
+ sender: {
10
+ name: string;
11
+ type: "company";
12
+ };
13
+ recipient: {
14
+ name: string;
15
+ type: "person";
16
+ };
17
+ };
18
+ };
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+ export declare const Default: Story;
@@ -5,17 +5,20 @@ const a = {
5
5
  tags: ["autodocs"],
6
6
  args: {
7
7
  title: "Title",
8
+ variant: "neutral",
8
9
  sender: {
9
- name: "Sender"
10
+ name: "Sender",
11
+ type: "company"
10
12
  },
11
13
  recipient: {
12
- name: "Recipient"
14
+ name: "Recipient",
15
+ type: "person"
13
16
  }
14
17
  }
15
- }, o = {
18
+ }, n = {
16
19
  args: {}
17
20
  };
18
21
  export {
19
- o as Default,
22
+ n as Default,
20
23
  a as default
21
24
  };
@@ -11,14 +11,14 @@ export interface DialogRecipientProps {
11
11
  name: string;
12
12
  }
13
13
  export interface DialogHeadingsProps {
14
- size: DialogSize;
15
- /** Group sender and recipient avatars */
16
- grouped?: boolean;
17
14
  /** Sender */
18
- sender?: DialogSenderProps;
15
+ sender: DialogSenderProps;
19
16
  /** Recipient */
20
- recipient?: DialogRecipientProps;
17
+ recipient: DialogRecipientProps;
18
+ size?: DialogSize;
19
+ /** Group sender and recipient avatars */
20
+ grouped?: boolean;
21
21
  loading?: boolean;
22
22
  }
23
23
  /** Dialog headings for sender and recipient. Should present an avatar for the sender. */
24
- export declare const DialogHeadings: ({ loading, grouped, size, sender, recipient, }: DialogHeadingsProps) => import("react/jsx-runtime").JSX.Element;
24
+ export declare const DialogHeadings: ({ loading, grouped, size, sender, recipient }: DialogHeadingsProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,12 @@
1
- import { jsxs as r, jsx as a } from "react/jsx-runtime";
1
+ import { jsxs as m, jsx as a } from "react/jsx-runtime";
2
2
  import { Avatar as i } from "../Avatar/Avatar.js";
3
- import { AvatarGroup as p } from "../Avatar/AvatarGroup.js";
3
+ import { AvatarGroup as d } from "../Avatar/AvatarGroup.js";
4
4
  import { Skeleton as l } from "../Skeleton/Skeleton.js";
5
- import '../../assets/DialogHeadings.css';const d = "_headings_qkf0g_1", g = "_text_qkf0g_21", h = "_sender_qkf0g_28", x = "_recipient_qkf0g_33", s = {
6
- headings: d,
7
- text: g,
8
- sender: h,
9
- recipient: x
5
+ import '../../assets/DialogHeadings.css';const g = "_headings_qkf0g_1", h = "_text_qkf0g_21", x = "_sender_qkf0g_28", _ = "_recipient_qkf0g_33", s = {
6
+ headings: g,
7
+ text: h,
8
+ sender: x,
9
+ recipient: _
10
10
  }, e = {
11
11
  avatar: {
12
12
  xs: "xs",
@@ -15,18 +15,12 @@ import '../../assets/DialogHeadings.css';const d = "_headings_qkf0g_1", g = "_te
15
15
  lg: "xs",
16
16
  xl: "lg"
17
17
  }
18
- }, N = ({
19
- loading: c,
20
- grouped: o,
21
- size: m = "lg",
22
- sender: t = { type: "company", name: "Sender" },
23
- recipient: n = { type: "person", name: "Recipient" }
24
- }) => /* @__PURE__ */ r("div", { className: s.headings, "data-size": m, children: [
18
+ }, k = ({ loading: c, grouped: o, size: r = "lg", sender: t, recipient: n }) => /* @__PURE__ */ m("div", { className: s.headings, "data-size": r, children: [
25
19
  /* @__PURE__ */ a(l, { variant: "circle", className: s.avatar, loading: c, children: o ? /* @__PURE__ */ a(
26
- p,
20
+ d,
27
21
  {
28
22
  items: [{ ...t, type: "company" }, n],
29
- size: e == null ? void 0 : e.avatar[m],
23
+ size: e == null ? void 0 : e.avatar[r],
30
24
  className: s.avatar
31
25
  }
32
26
  ) : /* @__PURE__ */ a(
@@ -35,21 +29,21 @@ import '../../assets/DialogHeadings.css';const d = "_headings_qkf0g_1", g = "_te
35
29
  type: "company",
36
30
  imageUrl: t == null ? void 0 : t.imageUrl,
37
31
  name: t.name,
38
- size: e == null ? void 0 : e.avatar[m],
32
+ size: e == null ? void 0 : e.avatar[r],
39
33
  className: s.avatar
40
34
  }
41
35
  ) }),
42
- /* @__PURE__ */ r("span", { "data-size": m, className: s.text, children: [
43
- /* @__PURE__ */ r("span", { className: s.sender, children: [
36
+ /* @__PURE__ */ m("span", { "data-size": r, className: s.text, children: [
37
+ /* @__PURE__ */ m("span", { className: s.sender, children: [
44
38
  " ",
45
39
  /* @__PURE__ */ a(l, { loading: c, children: t.name })
46
40
  ] }),
47
- (n == null ? void 0 : n.name) && /* @__PURE__ */ a("span", { className: s.recipient, children: /* @__PURE__ */ r(l, { loading: c, children: [
41
+ (n == null ? void 0 : n.name) && /* @__PURE__ */ a("span", { className: s.recipient, children: /* @__PURE__ */ m(l, { loading: c, children: [
48
42
  /* @__PURE__ */ a("span", { children: "til" }),
49
43
  /* @__PURE__ */ a("span", { children: n.name })
50
44
  ] }) })
51
45
  ] })
52
46
  ] });
53
47
  export {
54
- N as DialogHeadings
48
+ k as DialogHeadings
55
49
  };
@@ -0,0 +1,21 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ loading, grouped, size, sender, recipient }: import('./DialogHeadings').DialogHeadingsProps) => import("react/jsx-runtime").JSX.Element;
5
+ tags: string[];
6
+ parameters: {};
7
+ args: {
8
+ sender: {
9
+ name: string;
10
+ };
11
+ recipient: {
12
+ type: "person";
13
+ name: string;
14
+ };
15
+ };
16
+ };
17
+ export default meta;
18
+ type Story = StoryObj<typeof meta>;
19
+ export declare const Default: Story;
20
+ export declare const Company: Story;
21
+ export declare const Grouped: Story;
@@ -3,9 +3,9 @@ import { HistoryList as t } from "../History/HistoryList.js";
3
3
  import "react";
4
4
  import "../../index-L8X2o7IH.js";
5
5
  import "../Icon/SvgIcon.js";
6
+ import "../Autocomplete/AutocompleteBase.js";
6
7
  import { DialogSectionBase as m } from "./DialogSectionBase.js";
7
8
  import "../RootProvider/RootProvider.js";
8
- import "../Searchbar/AutocompleteBase.js";
9
9
  const u = ({ title: i = "History", items: r }) => r ? /* @__PURE__ */ o(m, { title: i, children: /* @__PURE__ */ o(t, { items: r }) }) : null;
10
10
  export {
11
11
  u as DialogHistory
@@ -0,0 +1,52 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ title, items }: import('./DialogHistory').DialogHistoryProps) => import("react/jsx-runtime").JSX.Element | null;
5
+ tags: string[];
6
+ parameters: {};
7
+ args: {
8
+ items: ({
9
+ createdBy: {
10
+ name: string;
11
+ type?: undefined;
12
+ imageUrl?: undefined;
13
+ };
14
+ createdAt: string;
15
+ summary: string;
16
+ attachments: {
17
+ title: string;
18
+ items: {
19
+ label: string;
20
+ href: string;
21
+ }[];
22
+ };
23
+ } | {
24
+ createdBy: {
25
+ type: "company";
26
+ name: string;
27
+ imageUrl: string;
28
+ };
29
+ createdAt: string;
30
+ summary: string;
31
+ attachments: {
32
+ title: string;
33
+ items: {
34
+ label: string;
35
+ href: string;
36
+ }[];
37
+ };
38
+ } | {
39
+ createdBy: {
40
+ type: "company";
41
+ name: string;
42
+ imageUrl: string;
43
+ };
44
+ createdAt: string;
45
+ summary: string;
46
+ attachments?: undefined;
47
+ })[];
48
+ };
49
+ };
50
+ export default meta;
51
+ type Story = StoryObj<typeof meta>;
52
+ export declare const Default: Story;
@@ -12,11 +12,15 @@ const a = {
12
12
  },
13
13
  createdAt: "2023-03-11 08:00",
14
14
  summary: "Skattemeldingen ble levert.",
15
- attachments: [
16
- {
17
- label: "Kvittering på innsendt skattemelding.pdf"
18
- }
19
- ]
15
+ attachments: {
16
+ title: "Vedlegg",
17
+ items: [
18
+ {
19
+ label: "Kvittering på innsendt skattemelding.pdf",
20
+ href: "kvittering.pdf"
21
+ }
22
+ ]
23
+ }
20
24
  },
21
25
  {
22
26
  createdBy: {
@@ -26,11 +30,15 @@ const a = {
26
30
  },
27
31
  createdAt: "2023-03-11 08:00",
28
32
  summary: "Vi har mottatt nye opplysninger og oppdatert skattemeldingen din.",
29
- attachments: [
30
- {
31
- label: "Nye opplysninger til Skattemeldingen.pdf"
32
- }
33
- ]
33
+ attachments: {
34
+ title: "Vedlegg",
35
+ items: [
36
+ {
37
+ label: "Oppdatert skattemelding",
38
+ href: "kvittering_oppdatert.pdf"
39
+ }
40
+ ]
41
+ }
34
42
  },
35
43
  {
36
44
  createdBy: {
@@ -38,11 +46,15 @@ const a = {
38
46
  },
39
47
  createdAt: "2023-03-11 08:00",
40
48
  summary: "Skattemeldingen ble levert.",
41
- attachments: [
42
- {
43
- label: "Kvittering på innsendt skattemelding.pdf"
44
- }
45
- ]
49
+ attachments: {
50
+ title: "Vedlegg",
51
+ items: [
52
+ {
53
+ label: "Kvittering på innsendt skattemelding.pdf",
54
+ href: "kvittering.pdf"
55
+ }
56
+ ]
57
+ }
46
58
  },
47
59
  {
48
60
  createdBy: {
@@ -2,10 +2,10 @@ import { jsx as c } from "react/jsx-runtime";
2
2
  import { createElement as t } from "react";
3
3
  import "../../index-L8X2o7IH.js";
4
4
  import "../Icon/SvgIcon.js";
5
- import "../RootProvider/RootProvider.js";
6
5
  import { useMenu as f } from "../../hooks/useMenu.js";
6
+ import "../Autocomplete/AutocompleteBase.js";
7
+ import "../RootProvider/RootProvider.js";
7
8
  import { DialogListItem as l } from "./DialogListItem.js";
8
- import "../Searchbar/AutocompleteBase.js";
9
9
  import { SectionBase as y } from "../Page/SectionBase.js";
10
10
  import { DialogGroup as d } from "./DialogGroup.js";
11
11
  const b = ({ items: m, groups: e = {} }) => {
@@ -0,0 +1,51 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ items, groups }: import('./DialogList').DialogListProps) => import("react/jsx-runtime").JSX.Element;
5
+ tags: string[];
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ args: {
10
+ items: ({
11
+ title: string;
12
+ summary: string;
13
+ status: {
14
+ value: "draft";
15
+ };
16
+ groupId: string;
17
+ } | {
18
+ title: string;
19
+ summary: string;
20
+ status: {
21
+ value: "sent";
22
+ };
23
+ groupId: string;
24
+ } | {
25
+ title: string;
26
+ summary: string;
27
+ status: {
28
+ value: "requires-attention";
29
+ };
30
+ groupId: string;
31
+ } | {
32
+ title: string;
33
+ summary: string;
34
+ status: {
35
+ value: "in-progress";
36
+ };
37
+ groupId: string;
38
+ } | {
39
+ title: string;
40
+ summary: string;
41
+ status: {
42
+ value: "completed";
43
+ };
44
+ groupId: string;
45
+ })[];
46
+ };
47
+ };
48
+ export default meta;
49
+ type Story = StoryObj<typeof meta>;
50
+ export declare const Default: Story;
51
+ export declare const Grouped: Story;
@@ -1,95 +1,96 @@
1
- import { jsx as m, jsxs as e } from "react/jsx-runtime";
1
+ import { jsx as m, jsxs as c } from "react/jsx-runtime";
2
+ import { ListItemBase as d } from "../List/ListItemBase.js";
3
+ import { ListItemHeader as B } from "../List/ListItemHeader.js";
4
+ import { ListItemLabel as q } from "../List/ListItemLabel.js";
2
5
  import "../../index-L8X2o7IH.js";
3
- import "../Icon/SvgIcon.js";
4
6
  import "react";
5
- import { DialogBorder as h } from "./DialogBorder.js";
6
- import { DialogMetadata as D } from "./DialogMetadata.js";
7
- import { DialogHeaderBase as V } from "./DialogHeaderBase.js";
8
- import { DialogHeadings as k } from "./DialogHeadings.js";
9
- import { DialogTitle as q } from "./DialogTitle.js";
7
+ import "../Icon/SvgIcon.js";
8
+ import "../Autocomplete/AutocompleteBase.js";
10
9
  import "../RootProvider/RootProvider.js";
11
- import { DialogTouchedBy as w } from "./DialogTouchedBy.js";
12
- import { DialogSelect as C } from "./DialogSelect.js";
13
- import "../Searchbar/AutocompleteBase.js";
14
- import { ListItemLabel as E } from "../List/ListItemLabel.js";
15
- import { ListItem as d } from "../List/ListItem.js";
16
- import { DialogDescription as F } from "./DialogDescription.js";
17
- import '../../assets/DialogListItem.css';const G = "_item_6aymu_1", J = "_select_6aymu_6", K = "_summary_6aymu_13", O = "_footer_6aymu_34", P = "_touchedBy_6aymu_42", Q = "_border_6aymu_51", t = {
18
- item: G,
19
- select: J,
20
- summary: K,
21
- footer: O,
22
- touchedBy: P,
23
- border: Q
24
- }, sr = ({
10
+ import { DialogBorder as N } from "./DialogBorder.js";
11
+ import { DialogMetadata as b } from "./DialogMetadata.js";
12
+ import { DialogHeaderBase as w } from "./DialogHeaderBase.js";
13
+ import { DialogHeadings as C } from "./DialogHeadings.js";
14
+ import { DialogTitle as E } from "./DialogTitle.js";
15
+ import { DialogTouchedBy as F } from "./DialogTouchedBy.js";
16
+ import { DialogSelect as G } from "./DialogSelect.js";
17
+ import { DialogDescription as J } from "./DialogDescription.js";
18
+ import '../../assets/DialogListItem.css';const K = "_item_6aymu_1", O = "_select_6aymu_6", P = "_summary_6aymu_13", Q = "_footer_6aymu_34", R = "_touchedBy_6aymu_42", U = "_border_6aymu_51", t = {
19
+ item: K,
20
+ select: O,
21
+ summary: P,
22
+ footer: Q,
23
+ touchedBy: R,
24
+ border: U
25
+ }, lr = ({
25
26
  size: r = "lg",
26
- variant: N = "neutral",
27
+ variant: x = "neutral",
27
28
  loading: o,
28
- select: c,
29
- status: b,
30
- sender: B,
31
- recipient: x,
32
- grouped: I,
33
- updatedAt: s,
34
- updatedAtLabel: i,
35
- archivedAt: l,
36
- archivedAtLabel: L,
37
- trashedAt: f,
29
+ select: s,
30
+ status: I,
31
+ sender: i,
32
+ recipient: l,
33
+ grouped: L,
34
+ updatedAt: f,
35
+ updatedAtLabel: p,
36
+ archivedAt: _,
37
+ archivedAtLabel: H,
38
+ trashedAt: h,
38
39
  trashedAtLabel: j,
39
- label: H,
40
- dueAt: T,
41
- dueAtLabel: g,
40
+ label: T,
41
+ dueAt: v,
42
+ dueAtLabel: M,
42
43
  seen: a = !1,
43
- seenBy: v,
44
- touchedBy: p,
45
- attachmentsCount: M,
46
- title: _,
44
+ seenBy: S,
45
+ touchedBy: u,
46
+ attachmentsCount: V,
47
+ title: y,
47
48
  description: n,
48
- summary: u,
49
- ...y
49
+ summary: D,
50
+ ...e
50
51
  }) => {
51
- const S = f ? "trashed" : l ? "archived" : N;
52
- return r === "xs" || r === "sm" ? /* @__PURE__ */ m(d, { ...y, loading: o, size: r, className: t.item, children: /* @__PURE__ */ e(h, { className: t.border, size: r, seen: a, loading: o, children: [
53
- /* @__PURE__ */ m(E, { loading: o, size: r, title: _, description: u || n }),
54
- /* @__PURE__ */ m(D, { loading: o, updatedAt: s, updatedAtLabel: i })
55
- ] }) }) : /* @__PURE__ */ m(
56
- d,
52
+ const k = h ? "trashed" : _ ? "archived" : x;
53
+ return r === "xs" || r === "sm" ? /* @__PURE__ */ m(d, { ...e, loading: o, size: r, children: /* @__PURE__ */ m(B, { ...e, loading: o, size: r, className: t.item, children: /* @__PURE__ */ c(N, { className: t.border, size: r, seen: a, loading: o, children: [
54
+ /* @__PURE__ */ m(q, { loading: o, size: r, title: y, description: D || n }),
55
+ /* @__PURE__ */ m(b, { loading: o, updatedAt: f, updatedAtLabel: p })
56
+ ] }) }) }) : /* @__PURE__ */ m(d, { ...e, loading: o, size: r, children: /* @__PURE__ */ m(
57
+ B,
57
58
  {
58
- ...y,
59
+ ...e,
59
60
  loading: o,
60
61
  size: r,
61
62
  className: t.item,
62
- controls: c && /* @__PURE__ */ m(C, { className: t.select, ...c }),
63
- children: /* @__PURE__ */ e(h, { className: t.border, size: r, seen: a, loading: o, children: [
64
- /* @__PURE__ */ e(V, { size: r, children: [
65
- /* @__PURE__ */ m(q, { loading: o, size: r, variant: S, label: H, seen: a, children: _ }),
66
- /* @__PURE__ */ m(k, { loading: o, size: r, grouped: I, sender: B, recipient: x })
63
+ controls: s && /* @__PURE__ */ m(G, { className: t.select, ...s }),
64
+ children: /* @__PURE__ */ c(N, { className: t.border, size: r, seen: a, loading: o, children: [
65
+ /* @__PURE__ */ c(w, { size: r, children: [
66
+ /* @__PURE__ */ m(E, { loading: o, size: r, variant: k, label: T, seen: a, children: y }),
67
+ i && l && /* @__PURE__ */ m(C, { loading: o, size: r, grouped: L, sender: i, recipient: l })
67
68
  ] }),
68
- /* @__PURE__ */ m(F, { loading: o, size: r, children: u || n }),
69
- /* @__PURE__ */ e("footer", { "data-size": r, className: t.footer, children: [
69
+ /* @__PURE__ */ m(J, { loading: o, size: r, children: D || n }),
70
+ /* @__PURE__ */ c("footer", { "data-size": r, className: t.footer, children: [
70
71
  /* @__PURE__ */ m(
71
- D,
72
+ b,
72
73
  {
73
74
  loading: o,
74
- status: b,
75
- updatedAt: s,
76
- updatedAtLabel: i,
77
- archivedAt: l,
78
- archivedAtLabel: L,
79
- trashedAt: f,
75
+ status: I,
76
+ updatedAt: f,
77
+ updatedAtLabel: p,
78
+ archivedAt: _,
79
+ archivedAtLabel: H,
80
+ trashedAt: h,
80
81
  trashedAtLabel: j,
81
- dueAt: T,
82
- dueAtLabel: g,
83
- seenBy: v,
84
- attachmentsCount: M
82
+ dueAt: v,
83
+ dueAtLabel: M,
84
+ seenBy: S,
85
+ attachmentsCount: V
85
86
  }
86
87
  ),
87
- p && /* @__PURE__ */ m(w, { loading: o, size: "xs", touchedBy: p, className: t.touchedBy })
88
+ u && /* @__PURE__ */ m(F, { loading: o, size: "xs", touchedBy: u, className: t.touchedBy })
88
89
  ] })
89
90
  ] })
90
91
  }
91
- );
92
+ ) });
92
93
  };
93
94
  export {
94
- sr as DialogListItem
95
+ lr as DialogListItem
95
96
  };
@@ -5,9 +5,9 @@ import { DialogListItem as n } from "./DialogListItem.js";
5
5
  import { DialogStatusEnum as g } from "./DialogStatus.js";
6
6
  import "../../index-L8X2o7IH.js";
7
7
  import "../Icon/SvgIcon.js";
8
+ import "../Autocomplete/AutocompleteBase.js";
8
9
  import { MetaItem as r } from "../Meta/MetaItem.js";
9
10
  import "../RootProvider/RootProvider.js";
10
- import "../Searchbar/AutocompleteBase.js";
11
11
  import { ListBase as s } from "../List/ListBase.js";
12
12
  const f = (t) => {
13
13
  switch (t) {
@@ -0,0 +1,18 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ loading, status, updatedAt, updatedAtLabel, dueAt, dueAtLabel, trashedAt, trashedAtLabel, archivedAt, archivedAtLabel, seenBy, attachmentsCount, }: import('./DialogMetadata').DialogMetadataProps) => import("react/jsx-runtime").JSX.Element;
5
+ tags: string[];
6
+ parameters: {};
7
+ args: {
8
+ updatedAt: string;
9
+ updatedAtLabel: string;
10
+ };
11
+ };
12
+ export default meta;
13
+ type Story = StoryObj<typeof meta>;
14
+ export declare const Draft: Story;
15
+ export declare const Sent: Story;
16
+ export declare const RequiresAttentionAndDueDate: Story;
17
+ export declare const InProgressSeenByOthers: Story;
18
+ export declare const CompletedSeenByEndUser: Story;
@@ -0,0 +1,15 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ backButton, status, dueAt, dueAtLabel, touchedBy, menu, }: import('./DialogNav').DialogNavProps) => import("react/jsx-runtime").JSX.Element;
5
+ tags: string[];
6
+ parameters: {};
7
+ args: {};
8
+ };
9
+ export default meta;
10
+ type Story = StoryObj<typeof meta>;
11
+ export declare const Draft: Story;
12
+ export declare const Sent: Story;
13
+ export declare const RequiresAttention: Story;
14
+ export declare const InProgress: Story;
15
+ export declare const ContextMenu: Story;
@@ -36,6 +36,7 @@ const e = {
36
36
  }, i = {
37
37
  args: {
38
38
  menu: {
39
+ id: "context-menu-1",
39
40
  items: [
40
41
  {
41
42
  id: "1",