@altinn/altinn-components 0.0.1 → 0.2.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 (166) hide show
  1. package/.storybook/StoryDecorator.tsx +27 -0
  2. package/.storybook/ThemeProvider.tsx +16 -0
  3. package/.storybook/main.ts +4 -5
  4. package/.storybook/preview.tsx +35 -0
  5. package/.storybook/storyDecorator.module.css +20 -0
  6. package/.storybook/theme.module.css +3 -0
  7. package/CHANGELOG.md +21 -0
  8. package/CONTRIBUTING.MD +59 -0
  9. package/README.md +33 -1
  10. package/lib/components/Attachment/AttachmentLink.stories.ts +21 -0
  11. package/lib/components/Attachment/AttachmentLink.tsx +20 -0
  12. package/lib/components/Attachment/AttachmentList.stories.ts +39 -0
  13. package/lib/components/Attachment/AttachmentList.tsx +26 -0
  14. package/lib/components/Attachment/attachmentLink.module.css +20 -0
  15. package/lib/components/Attachment/attachmentList.module.css +12 -0
  16. package/lib/components/Attachment/index.ts +2 -0
  17. package/lib/components/Avatar/Avatar.tsx +8 -16
  18. package/lib/components/Avatar/AvatarGroup.stories.ts +3 -4
  19. package/lib/components/Avatar/AvatarGroup.tsx +20 -3
  20. package/lib/components/Avatar/avatar.module.css +2 -0
  21. package/lib/components/Avatar/avatar.stories.tsx +1 -6
  22. package/lib/components/Badge/Badge.stories.ts +32 -0
  23. package/lib/components/Badge/Badge.tsx +13 -10
  24. package/lib/components/Badge/badge.module.css +18 -27
  25. package/lib/components/Button/Button.stories.ts +6 -0
  26. package/lib/components/Button/Button.tsx +19 -1
  27. package/lib/components/Button/ButtonBase.tsx +1 -1
  28. package/lib/components/Button/button.module.css +0 -19
  29. package/lib/components/Button/buttonBase.module.css +30 -12
  30. package/lib/components/Button/comboButton.module.css +4 -2
  31. package/lib/components/ContextMenu/ContextMenu.tsx +28 -0
  32. package/lib/components/ContextMenu/contextMenu.module.css +35 -0
  33. package/lib/components/Dialog/Dialog.stories.ts +320 -0
  34. package/lib/components/Dialog/Dialog.tsx +101 -0
  35. package/lib/components/Dialog/DialogAction.stories.ts +54 -0
  36. package/lib/components/Dialog/DialogAction.tsx +79 -0
  37. package/lib/components/Dialog/DialogActivityLog.tsx +18 -0
  38. package/lib/components/Dialog/DialogArticleBase.tsx +10 -0
  39. package/lib/components/Dialog/DialogAttachments.stories.ts +40 -0
  40. package/lib/components/Dialog/DialogAttachments.tsx +25 -0
  41. package/lib/components/Dialog/DialogBase.tsx +10 -0
  42. package/lib/components/Dialog/DialogBodyBase.tsx +17 -0
  43. package/lib/components/Dialog/DialogBorder.tsx +19 -0
  44. package/lib/components/Dialog/DialogContent.stories.ts +26 -0
  45. package/lib/components/Dialog/DialogContent.tsx +24 -0
  46. package/lib/components/Dialog/DialogFooter.tsx +14 -0
  47. package/lib/components/Dialog/DialogHeader.stories.ts +26 -0
  48. package/lib/components/Dialog/DialogHeader.tsx +23 -0
  49. package/lib/components/Dialog/DialogHeaderBase.tsx +10 -0
  50. package/lib/components/Dialog/DialogHeadings.stories.ts +35 -0
  51. package/lib/components/Dialog/DialogHeadings.tsx +77 -0
  52. package/lib/components/Dialog/DialogHistory.stories.ts +67 -0
  53. package/lib/components/Dialog/DialogHistory.tsx +19 -0
  54. package/lib/components/Dialog/DialogList.stories.ts +61 -0
  55. package/lib/components/Dialog/DialogList.tsx +20 -0
  56. package/lib/components/Dialog/DialogListItem.stories.tsx +238 -0
  57. package/lib/components/Dialog/DialogListItem.tsx +114 -0
  58. package/lib/components/Dialog/DialogListItemBase.tsx +50 -0
  59. package/lib/components/Dialog/DialogMetadata.stories.ts +77 -0
  60. package/lib/components/Dialog/DialogMetadata.tsx +56 -0
  61. package/lib/components/Dialog/DialogNav.stories.ts +90 -0
  62. package/lib/components/Dialog/DialogNav.tsx +60 -0
  63. package/lib/components/Dialog/DialogSectionBase.tsx +20 -0
  64. package/lib/components/Dialog/DialogSeenBy.stories.tsx +58 -0
  65. package/lib/components/Dialog/DialogSeenBy.tsx +36 -0
  66. package/lib/components/Dialog/DialogSelect.tsx +23 -0
  67. package/lib/components/Dialog/DialogStatus.stories.ts +57 -0
  68. package/lib/components/Dialog/DialogStatus.tsx +61 -0
  69. package/lib/components/Dialog/DialogTitle.stories.ts +33 -0
  70. package/lib/components/Dialog/DialogTitle.tsx +31 -0
  71. package/lib/components/Dialog/DialogTouchedBy.stories.tsx +27 -0
  72. package/lib/components/Dialog/DialogTouchedBy.tsx +19 -0
  73. package/lib/components/Dialog/dialog.module.css +21 -0
  74. package/lib/components/Dialog/dialogAction.module.css +26 -0
  75. package/lib/components/Dialog/dialogArticleBase.module.css +5 -0
  76. package/lib/components/Dialog/dialogBodyBase.module.css +13 -0
  77. package/lib/components/Dialog/dialogBorder.module.css +42 -0
  78. package/lib/components/Dialog/dialogHeaderBase.module.css +6 -0
  79. package/lib/components/Dialog/dialogHeadings.module.css +24 -0
  80. package/lib/components/Dialog/dialogHistory.module.css +12 -0
  81. package/lib/components/Dialog/dialogListItem.module.css +81 -0
  82. package/lib/components/Dialog/dialogListItemBase.module.css +28 -0
  83. package/lib/components/Dialog/dialogSectionBase.module.css +11 -0
  84. package/lib/components/Dialog/dialogSelect.module.css +34 -0
  85. package/lib/components/Dialog/dialogTitle.module.css +47 -0
  86. package/lib/components/Dialog/index.ts +2 -0
  87. package/lib/components/Header/GlobalMenu.tsx +1 -1
  88. package/lib/components/Header/Header.tsx +3 -3
  89. package/lib/components/Header/HeaderSearch.tsx +1 -1
  90. package/lib/components/History/HistoryBorder.tsx +17 -0
  91. package/lib/components/History/HistoryItem.stories.ts +47 -0
  92. package/lib/components/History/HistoryItem.tsx +64 -0
  93. package/lib/components/History/HistoryList.stories.ts +58 -0
  94. package/lib/components/History/HistoryList.tsx +26 -0
  95. package/lib/components/History/historyBorder.module.css +8 -0
  96. package/lib/components/History/historyItem.module.css +19 -0
  97. package/lib/components/History/historyList.module.css +12 -0
  98. package/lib/components/History/index.ts +2 -0
  99. package/lib/components/Icon/CheckboxCheckedIcon.tsx +28 -0
  100. package/lib/components/Icon/CheckboxIcon.stories.ts +7 -0
  101. package/lib/components/Icon/CheckboxIcon.tsx +6 -18
  102. package/lib/components/Icon/CheckboxUncheckedIcon.tsx +38 -0
  103. package/lib/components/Icon/ProgressIcon.stories.ts +43 -0
  104. package/lib/components/Icon/ProgressIcon.tsx +44 -0
  105. package/lib/components/Icon/RadioCheckedIcon.tsx +29 -0
  106. package/lib/components/Icon/RadioIcon.stories.ts +7 -0
  107. package/lib/components/Icon/RadioIcon.tsx +7 -19
  108. package/lib/components/Icon/RadioUncheckedIcon.tsx +30 -0
  109. package/lib/components/Icon/checkboxIcon.module.css +2 -0
  110. package/lib/components/Icon/index.ts +1 -0
  111. package/lib/components/Icon/progressIcon.module.css +29 -0
  112. package/lib/components/Layout/Layout.stories.ts +0 -3
  113. package/lib/components/List/List.tsx +20 -0
  114. package/lib/components/List/ListBase.tsx +19 -0
  115. package/lib/components/List/ListItem.stories.tsx +208 -0
  116. package/lib/components/List/ListItem.tsx +70 -0
  117. package/lib/components/List/ListItemBase.tsx +62 -0
  118. package/lib/components/List/ListItemLabel.tsx +29 -0
  119. package/lib/components/List/ListItemMedia.tsx +59 -0
  120. package/lib/components/List/index.ts +4 -0
  121. package/lib/components/List/listBase.module.css +16 -0
  122. package/lib/components/List/listItemBase.module.css +86 -0
  123. package/lib/components/List/listItemLabel.module.css +55 -0
  124. package/lib/components/List/listItemMedia.module.css +41 -0
  125. package/lib/components/Menu/Menu.stories.ts +46 -27
  126. package/lib/components/Menu/Menu.tsx +3 -3
  127. package/lib/components/Menu/MenuItem.stories.ts +12 -7
  128. package/lib/components/Menu/MenuItem.tsx +4 -3
  129. package/lib/components/Menu/MenuItemBase.tsx +7 -7
  130. package/lib/components/Menu/MenuItemLabel.tsx +4 -4
  131. package/lib/components/Menu/MenuItemMedia.tsx +2 -2
  132. package/lib/components/Menu/MenuOption.stories.ts +4 -2
  133. package/lib/components/Menu/MenuOption.tsx +4 -4
  134. package/lib/components/Menu/menuItemBase.module.css +72 -0
  135. package/lib/components/Menu/menuItemLabel.module.css +22 -0
  136. package/lib/components/Menu/menuItemMedia.module.css +36 -0
  137. package/lib/components/Menu/menuOption.module.css +6 -8
  138. package/lib/components/Meta/MetaBase.tsx +15 -0
  139. package/lib/components/Meta/MetaItem.stories.ts +25 -0
  140. package/lib/components/Meta/MetaItem.tsx +31 -0
  141. package/lib/components/Meta/MetaItemBase.tsx +46 -0
  142. package/lib/components/Meta/MetaItemLabel.tsx +20 -0
  143. package/lib/components/Meta/MetaItemMedia.tsx +22 -0
  144. package/lib/components/Meta/MetaList.stories.ts +29 -0
  145. package/lib/components/Meta/MetaList.tsx +43 -0
  146. package/lib/components/Meta/MetaProgress.stories.ts +29 -0
  147. package/lib/components/Meta/MetaProgress.tsx +26 -0
  148. package/lib/components/Meta/MetaTimestamp.stories.ts +33 -0
  149. package/lib/components/Meta/MetaTimestamp.tsx +29 -0
  150. package/lib/components/Meta/index.ts +6 -0
  151. package/lib/components/Meta/meta.module.css +6 -0
  152. package/lib/components/Meta/metaItem.module.css +107 -0
  153. package/lib/components/Meta/metaList.module.css +15 -0
  154. package/lib/components/Toolbar/ToolbarAdd.tsx +1 -1
  155. package/lib/components/Typography/Typography.tsx +21 -0
  156. package/lib/components/Typography/index.ts +1 -0
  157. package/lib/components/Typography/typography.module.css +56 -0
  158. package/lib/components/index.ts +9 -0
  159. package/lib/css/global.css +2 -0
  160. package/lib/css/shadows.css +7 -0
  161. package/lib/css/theme-article.css +15 -0
  162. package/lib/css/theme.css +5 -7
  163. package/package.json +4 -2
  164. package/renovate.json +4 -0
  165. package/.storybook/preview.ts +0 -15
  166. /package/lib/components/Toolbar/{index.js → index.ts} +0 -0
@@ -1,36 +1,27 @@
1
1
  .badge {
2
2
  display: inline-flex;
3
- box-sizing: border-box;
4
- padding: 4px 8px;
5
- justify-content: center;
6
- min-height: 24px;
7
- min-width: 24px;
8
- width: auto;
9
- height: 24px;
10
3
  align-items: center;
11
- flex-shrink: 0;
12
- background: var(--black-5, rgba(0, 0, 0, 0.05));
13
- color: var(--black-100, #000);
4
+ justify-content: center;
5
+ white-space: nowrap;
6
+
7
+ font-weight: 500;
8
+ line-height: 1;
9
+ padding: 0.5em 0.5em;
10
+
11
+ min-width: 2em;
12
+ border-radius: 2em;
13
+ }
14
+
15
+ .badge[data-size="sm"] {
14
16
  font-size: 0.75rem;
15
- font-weight: 600;
16
- line-height: 1rem;
17
- border-radius: 12px;
18
17
  }
19
18
 
20
- .strong {
21
- font-weight: 700;
22
- background: var(--Action-Important, #e02e49);
23
- color: #ffffff;
19
+ .badge[data-color="subtle"] {
20
+ background-color: var(--theme-surface-default);
21
+ color: var(--theme-text-subtle);
24
22
  }
25
23
 
26
- .small {
27
- display: flex;
28
- width: 12px;
29
- height: 12px;
30
- min-height: 12px;
31
- min-width: 12px;
32
- padding: 4px;
33
- justify-content: center;
34
- align-items: center;
35
- flex-shrink: 0;
24
+ .badge[data-color="alert"] {
25
+ background-color: #e02e49;
26
+ color: white;
36
27
  }
@@ -37,6 +37,12 @@ export const Text: Story = {
37
37
  },
38
38
  };
39
39
 
40
+ export const Loading: Story = {
41
+ args: {
42
+ loading: true,
43
+ },
44
+ };
45
+
40
46
  export const Disabled: Story = {
41
47
  args: {
42
48
  disabled: true,
@@ -1,12 +1,12 @@
1
1
  import cx from 'classnames';
2
2
  import { Icon, type IconName } from '../Icon';
3
3
  import { ButtonBase, type ButtonBaseProps } from './ButtonBase';
4
-
5
4
  import styles from './button.module.css';
6
5
 
7
6
  export interface ButtonProps extends Partial<ButtonBaseProps> {
8
7
  icon?: IconName;
9
8
  reverse?: boolean;
9
+ loading?: boolean;
10
10
  }
11
11
 
12
12
  export const Button = ({
@@ -16,8 +16,26 @@ export const Button = ({
16
16
  icon,
17
17
  href,
18
18
  children,
19
+ loading,
19
20
  ...rest
20
21
  }: ButtonProps) => {
22
+ if (loading) {
23
+ return (
24
+ <ButtonBase
25
+ size={size}
26
+ selected={selected}
27
+ href={href}
28
+ className={cx(styles.button, { [styles.reverse]: reverse })}
29
+ {...rest}
30
+ disabled
31
+ >
32
+ <span className={styles.label} data-size={size}>
33
+ <span className={styles.loading}>Loading....</span>
34
+ </span>
35
+ </ButtonBase>
36
+ );
37
+ }
38
+
21
39
  return (
22
40
  <ButtonBase
23
41
  size={size}
@@ -5,7 +5,7 @@ import styles from './buttonBase.module.css';
5
5
 
6
6
  export type ButtonVariant = 'solid' | 'outline' | 'dotted' | 'text';
7
7
  export type ButtonSize = 'sm' | 'md' | 'lg';
8
- export type ButtonColor = 'primary' | 'link';
8
+ export type ButtonColor = 'primary' | 'secondary';
9
9
 
10
10
  export interface ButtonBaseProps extends React.HTMLAttributes<HTMLButtonElement> {
11
11
  /**
@@ -1,31 +1,12 @@
1
1
  .button {
2
2
  display: inline-flex;
3
3
  align-items: center;
4
- border: 1px solid;
5
- border-color: var(--link-base-default);
6
- }
7
-
8
- .button:focus {
9
- border-color: var(--link-base-active);
10
- }
11
-
12
- .button:hover {
13
- border-color: var(--link-base-hover);
14
- }
15
-
16
- .button:active {
17
- border-color: var(--link-base-active);
18
4
  }
19
5
 
20
6
  .reverse {
21
7
  flex-direction: row-reverse;
22
8
  }
23
9
 
24
- .button[aria-selected="true"] {
25
- background-color: var(--theme-background-subtle);
26
- color: var(--theme-text-default);
27
- }
28
-
29
10
  .label {
30
11
  line-height: 1rem;
31
12
  font-weight: 600;
@@ -1,5 +1,6 @@
1
1
  .button {
2
- border: none;
2
+ border: 1px solid;
3
+ border-color: transparent;
3
4
  margin: 0;
4
5
  padding: 0;
5
6
  width: auto;
@@ -32,11 +33,23 @@
32
33
  pointer-events: none;
33
34
  }
34
35
 
36
+ .button:focus {
37
+ border-color: var(--theme-base-active);
38
+ }
39
+
40
+ .button:hover {
41
+ border-color: var(--theme-base-hover);
42
+ }
43
+
44
+ .button:active {
45
+ border-color: var(--theme-base-active);
46
+ }
47
+
35
48
  /* solid */
36
49
 
37
50
  .button[data-variant="solid"] {
38
- border-color: var(--theme-base-hover);
39
- background-color: var(--theme-base-hover);
51
+ border-color: var(--theme-base-default);
52
+ background-color: var(--theme-base-default);
40
53
  color: white;
41
54
  }
42
55
 
@@ -60,18 +73,23 @@
60
73
  border-color: transparent;
61
74
  }
62
75
 
63
- /* solid + link
76
+ .button[aria-selected="true"] {
77
+ background-color: var(--theme-background-subtle);
78
+ color: var(--theme-text-default);
79
+ }
64
80
 
65
- .button[data-color="link"][data-variant="solid"] {
66
- background-color: var(--link-base-default);
67
- color: white;
81
+ /* secondary color */
82
+
83
+ .button[data-color="secondary"] {
84
+ color: var(--theme-text-subtle);
68
85
  }
69
86
 
70
- .button[data-color="link"][data-variant="solid"]:hover {
71
- background-color: var(--link-base-hover);
87
+ .button[data-color="secondary"]:hover {
88
+ border-color: var(--theme-surface-hover);
72
89
  }
73
90
 
74
- .button[data-color="link"][data-variant="active"]:hover {
75
- background-color: var(--link-base-active);
91
+ .button[data-color="secondary"][data-variant="solid"],
92
+ .button[data-color="secondary"][data-variant="solid"] {
93
+ border-color: var(--theme-surface-default);
94
+ background-color: var(--theme-surface-default);
76
95
  }
77
- */
@@ -6,10 +6,12 @@
6
6
  border-radius: 2px;
7
7
  }
8
8
 
9
+ /*
9
10
  .button[aria-selected="true"] {
10
11
  background-color: var(--theme-background-subtle);
11
12
  color: var(--theme-text-default);
12
13
  }
14
+ */
13
15
 
14
16
  .label {
15
17
  line-height: 1rem;
@@ -40,7 +42,7 @@
40
42
 
41
43
  .label[data-size="sm"] {
42
44
  font-size: 0.875rem;
43
- padding: 9px 10px;
45
+ padding: 8px 10px;
44
46
  }
45
47
 
46
48
  .divider[data-size="sm"] {
@@ -49,7 +51,7 @@
49
51
 
50
52
  .icon[data-size="sm"] {
51
53
  font-size: 1.25rem;
52
- padding: 7px 5px;
54
+ padding: 6px 5px;
53
55
  }
54
56
 
55
57
  /* md 44px */
@@ -0,0 +1,28 @@
1
+ import type { MouseEventHandler } from 'react';
2
+ import { ButtonBase } from '../Button';
3
+ import { Icon } from '../Icon';
4
+ import { Menu, type MenuGroups, type MenuItemProps } from '../Menu';
5
+ import styles from './contextMenu.module.css';
6
+
7
+ export interface DialogContextMenuProps {
8
+ onToggle?: MouseEventHandler;
9
+ label: string;
10
+ value: string | number;
11
+ items: MenuItemProps[];
12
+ groups?: MenuGroups;
13
+ expanded?: boolean;
14
+ className?: string;
15
+ }
16
+
17
+ export const ContextMenu = ({ expanded = true, onToggle, groups = {}, items }: DialogContextMenuProps) => {
18
+ return (
19
+ <div className={styles.toggle}>
20
+ <ButtonBase className={styles.button} as="button" color="secondary" onClick={onToggle}>
21
+ <Icon className={styles.icon} name="menu-elipsis-horizontal" />
22
+ </ButtonBase>
23
+ <div className={styles.dropdown} aria-expanded={expanded}>
24
+ <Menu theme="global" defaultItemColor="subtle" groups={groups} items={items} />
25
+ </div>
26
+ </div>
27
+ );
28
+ };
@@ -0,0 +1,35 @@
1
+ .toggle {
2
+ position: relative;
3
+ }
4
+
5
+ .button {
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: center;
9
+ width: 2.75rem;
10
+ padding: 0.625rem;
11
+ border-radius: 50%;
12
+ }
13
+
14
+ .icon {
15
+ font-size: 1.5rem;
16
+ }
17
+
18
+ .dropdown {
19
+ display: none;
20
+ }
21
+
22
+ .dropdown[aria-expanded="true"] {
23
+ display: block;
24
+ position: absolute;
25
+ right: 0;
26
+ z-index: 2;
27
+ }
28
+
29
+ .dropdown {
30
+ margin-top: 0.5rem;
31
+ padding: 0 0.5rem;
32
+ background-color: var(--neutral-background-default);
33
+ border-radius: 2px;
34
+ box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.1);
35
+ }
@@ -0,0 +1,320 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { fn } from '@storybook/test';
3
+
4
+ import { Dialog } from './Dialog';
5
+
6
+ const meta = {
7
+ title: 'Dialog/Dialog',
8
+ component: Dialog,
9
+ tags: ['autodocs'],
10
+ parameters: {},
11
+ argTypes: { body: { control: 'text' } },
12
+ args: {
13
+ updatedAt: '1999-05-26',
14
+ title: 'Title',
15
+ summary: 'Summary',
16
+ },
17
+ } satisfies Meta<typeof Dialog>;
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+
22
+ export const Body: Story = {
23
+ args: {
24
+ body:
25
+ '## Body\n\n' +
26
+ 'Body will be loaded async.\n\n' +
27
+ '### Syntax\n\n' +
28
+ 'body supporters basic headings from h2 -> h4 + lists.\n\n' +
29
+ '- List 1\n' +
30
+ '- List 2\n' +
31
+ '- List 3\n',
32
+ },
33
+ };
34
+
35
+ export const Attachments: Story = {
36
+ args: {
37
+ attachments: {
38
+ items: [
39
+ {
40
+ label: 'Dokument 1.pdf',
41
+ },
42
+ {
43
+ label: 'Dokument 2.pdf',
44
+ },
45
+ ],
46
+ },
47
+ },
48
+ };
49
+
50
+ export const Action: Story = {
51
+ args: {
52
+ action: [
53
+ {
54
+ label: 'Primary',
55
+ },
56
+ {
57
+ label: 'Secondary',
58
+ },
59
+ ],
60
+ },
61
+ };
62
+
63
+ export const SeenBy: Story = {
64
+ args: {
65
+ ...Action.args,
66
+ seenBy: {
67
+ as: 'a',
68
+ href: '#',
69
+ label: 'Sett av deg + 24',
70
+ seenByEndUser: true,
71
+ seenByOthersCount: 24,
72
+ },
73
+ activityLog: {
74
+ as: 'a',
75
+ href: '#',
76
+ label: 'Aktivitetslogg',
77
+ },
78
+ },
79
+ };
80
+
81
+ export const Example: Story = {
82
+ args: {
83
+ status: { value: 'requires-attention' },
84
+ sender: {
85
+ name: 'Statistisk sentralbyrå',
86
+ imageUrl: 'https://digdir-proto-proto.vercel.app/_next/static/media/SSB.0ca4474e.png',
87
+ },
88
+ recipient: {
89
+ name: 'Bergen Bar',
90
+ },
91
+ title: 'Rapportering av bedriftsdata',
92
+ summary: 'Du må levere bedriftsdata innen 31. oktober.',
93
+ additionalInfo:
94
+ 'Din bedrift er pålagt å rapportere inn bedriftsdata innen **31. oktober**. ' +
95
+ 'Vi bruker svarene dine kun til å utarbeide statistikk, og enkeltsvar vil aldri bli offentliggjort. Du kan når som helst kontakte oss og kreve av opplysningene om deg blir slettet.',
96
+ action: [
97
+ {
98
+ label: 'Rapporter bedriftsdata',
99
+ },
100
+ ],
101
+ attachments: {
102
+ items: [
103
+ {
104
+ label: 'Vedtak om innlevering av bedriftsdata.pdf',
105
+ },
106
+ ],
107
+ },
108
+ },
109
+ };
110
+
111
+ export const HistoryContact: Story = {
112
+ args: {
113
+ status: { value: 'requires-attention' },
114
+ sender: {
115
+ name: 'Statistisk sentralbyrå',
116
+ imageUrl: 'https://digdir-proto-proto.vercel.app/_next/static/media/SSB.0ca4474e.png',
117
+ },
118
+ recipient: {
119
+ name: 'Bergen Bar',
120
+ },
121
+ title: 'Rapportering av bedriftsdata',
122
+ summary: 'Innrapporteringen inneholder feil. Se over og lever på nytt.',
123
+ additionalInfo:
124
+ 'Din bedrift er pålagt å rapportere inn bedriftsdata innen **31. oktober**. ' +
125
+ 'Vi bruker svarene dine kun til å utarbeide statistikk, og enkeltsvar vil aldri bli offentliggjort. Du kan når som helst kontakte oss og kreve av opplysningene om deg blir slettet.',
126
+ action: [
127
+ {
128
+ label: 'Rapporter bedriftsdata',
129
+ },
130
+ ],
131
+ attachments: {
132
+ items: [
133
+ {
134
+ label: 'Feilliste.pdf',
135
+ },
136
+ ],
137
+ },
138
+ history: [
139
+ {
140
+ createdAt: '2004-01-01 13:34',
141
+ createdBy: {
142
+ name: 'Eirik Horneland',
143
+ },
144
+ summary: 'Rapportering ble sendt inn.',
145
+ attachments: [
146
+ {
147
+ label: 'Kvittering.pdf',
148
+ },
149
+ ],
150
+ },
151
+ {
152
+ createdAt: '2004-01-01 13:34',
153
+ createdBy: {
154
+ imageUrl: 'https://digdir-proto-proto.vercel.app/_next/static/media/SSB.0ca4474e.png',
155
+
156
+ name: 'Statistisk sentralbyrå',
157
+ },
158
+ summary: 'Du må levere bedriftsdata innen 31. oktober.',
159
+ attachments: [
160
+ {
161
+ label: 'Vedtak om innlevering av bedriftsdata.pdf',
162
+ },
163
+ ],
164
+ },
165
+ ],
166
+ contactInfo:
167
+ 'Kontakt oss på svar@ssb.no eller ring 62 88 56 08.\n\n' +
168
+ 'Svartjenesten er åpen alle hverdager fra kl. 9-21 og lørdager fra kl. 10-16.',
169
+ },
170
+ };
171
+
172
+ export const Signering: Story = {
173
+ args: {
174
+ status: { value: 'requires-attention' },
175
+
176
+ sender: {
177
+ name: 'Statistisk sentralbyrå',
178
+ imageUrl: 'https://digdir-proto-proto.vercel.app/_next/static/media/SSB.0ca4474e.png',
179
+ },
180
+
181
+ recipient: {
182
+ name: 'Bergen Bar',
183
+ },
184
+
185
+ title: 'Registrere enkeltmannsforetak',
186
+ summary: 'Skjema er klar til signering.',
187
+ additionalInfo:
188
+ 'Din bedrift er pålagt å rapportere inn bedriftsdata innen **31. oktober**. Vi bruker svarene dine kun til å utarbeide statistikk, og enkeltsvar vil aldri bli offentliggjort. Du kan når som helst kontakte oss og kreve av opplysningene om deg blir slettet.',
189
+
190
+ action: [
191
+ {
192
+ label: 'Gå til signering',
193
+ },
194
+ ],
195
+
196
+ attachments: {},
197
+
198
+ history: {
199
+ items: [
200
+ {
201
+ updatedAt: '2004-01-01 13:34',
202
+
203
+ updatedBy: {
204
+ name: 'Eirik Horneland',
205
+ },
206
+
207
+ summary: 'Rapportering ble sendt inn.',
208
+
209
+ attachments: [
210
+ {
211
+ label: 'Kvittering.pdf',
212
+ },
213
+ ],
214
+ },
215
+ {
216
+ updatedAt: '2004-01-01 13:34',
217
+
218
+ updatedBy: {
219
+ imageUrl: 'https://digdir-proto-proto.vercel.app/_next/static/media/SSB.0ca4474e.png',
220
+ name: 'Statistisk sentralbyrå',
221
+ },
222
+
223
+ summary: 'Du må levere bedriftsdata innen 31. oktober.',
224
+
225
+ attachments: [
226
+ {
227
+ label: 'Vedtak om innlevering av bedriftsdata.pdf',
228
+ },
229
+ ],
230
+ },
231
+ ],
232
+ },
233
+
234
+ contact: {
235
+ title: 'Ta kontakt',
236
+ body: 'Ta kontakt for mer informasjon på telefon 99 00 00 00.',
237
+ },
238
+ },
239
+ };
240
+
241
+ export const BrregDraft: Story = {
242
+ args: {
243
+ status: { value: 'draft' },
244
+
245
+ sender: {
246
+ name: 'Statistisk sentralbyrå',
247
+ imageUrl: 'https://digdir-proto-proto.vercel.app/_next/static/media/SSB.0ca4474e.png',
248
+ },
249
+
250
+ recipient: {
251
+ name: 'Bergen Bar',
252
+ },
253
+
254
+ title: 'Registrere enkeltmannsforetak',
255
+ summary: 'Skjema er opprettet.',
256
+
257
+ action: [
258
+ {
259
+ label: 'Gå til skjema',
260
+ },
261
+ {
262
+ label: 'Forkast',
263
+ },
264
+ ],
265
+
266
+ attachments: {},
267
+ additionalInfo:
268
+ 'Enkeltpersonforetak må registreres i Enhetsregisteret for å få et organisasjonsnummer. Enkelte må også registreres i Foretaksregisteret.',
269
+ },
270
+ };
271
+
272
+ export const BrregSign: Story = {
273
+ args: {
274
+ ...BrregDraft.args,
275
+ status: { value: 'requires-attention' },
276
+ summary: 'Skjema er klar til signering.',
277
+
278
+ action: [
279
+ {
280
+ label: 'Til signering',
281
+ },
282
+ {
283
+ label: 'Avslå signering',
284
+ },
285
+ ],
286
+
287
+ history: {
288
+ items: [
289
+ {
290
+ createdAt: '2004-01-01 13:34',
291
+ createdBy: {
292
+ type: 'person',
293
+ name: 'Eirik Horneland',
294
+ },
295
+ summary: 'Rapportering ble sendt inn.',
296
+ attachments: [
297
+ {
298
+ label: 'Kvittering.pdf',
299
+ },
300
+ ],
301
+ },
302
+ {
303
+ createdAt: '2004-01-01 13:34',
304
+ createdBy: {
305
+ imageUrl: 'https://digdir-proto-proto.vercel.app/_next/static/media/SSB.0ca4474e.png',
306
+ name: 'Statistisk sentralbyrå',
307
+ },
308
+
309
+ summary: 'Du må levere bedriftsdata innen 31. oktober.',
310
+
311
+ attachments: [
312
+ {
313
+ label: 'Vedtak om innlevering av bedriftsdata.pdf',
314
+ },
315
+ ],
316
+ },
317
+ ],
318
+ },
319
+ },
320
+ };