agroptima-design-system 0.36.2 → 0.36.3-beta.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 (38) hide show
  1. package/package.json +1 -1
  2. package/src/icons/index.tsx +2 -0
  3. package/src/icons/picture.svg +1 -0
  4. package/src/stories/Alert.stories.ts +9 -1
  5. package/src/stories/{AlertContainer.stories.js → AlertContainer.stories.tsx} +3 -1
  6. package/src/stories/Badge.stories.ts +2 -1
  7. package/src/stories/Button.stories.ts +8 -1
  8. package/src/stories/{Card.stories.js → Card.stories.tsx} +21 -15
  9. package/src/stories/{CardMenu.stories.js → CardMenu.stories.tsx} +18 -12
  10. package/src/stories/{CardsTable.stories.js → CardsTable.stories.tsx} +23 -13
  11. package/src/stories/Changelog.mdx +4 -0
  12. package/src/stories/{CheckableTag.stories.js → CheckableTag.stories.tsx} +9 -3
  13. package/src/stories/Checkbox.stories.tsx +6 -1
  14. package/src/stories/Collapsible.stories.tsx +7 -2
  15. package/src/stories/DateRangePicker.stories.ts +2 -1
  16. package/src/stories/DateSinglePicker.stories.ts +2 -1
  17. package/src/stories/Divider.stories.tsx +5 -1
  18. package/src/stories/{Drawer.stories.js → Drawer.stories.tsx} +7 -3
  19. package/src/stories/{EmptyState.stories.js → EmptyState.stories.tsx} +6 -3
  20. package/src/stories/FloatingButton.stories.ts +2 -1
  21. package/src/stories/{Form.stories.js → Form.stories.tsx} +13 -4
  22. package/src/stories/HelpText.stories.ts +2 -1
  23. package/src/stories/IconButton.stories.ts +8 -1
  24. package/src/stories/Input.stories.ts +8 -1
  25. package/src/stories/Label.stories.ts +4 -1
  26. package/src/stories/{Menu.stories.js → Menu.stories.tsx} +9 -2
  27. package/src/stories/Modal.stories.tsx +1 -1
  28. package/src/stories/Multiselect.stories.ts +8 -1
  29. package/src/stories/{Pagination.stories.js → Pagination.stories.tsx} +7 -7
  30. package/src/stories/{Popover.stories.js → Popover.stories.tsx} +14 -4
  31. package/src/stories/{PopoverMenu.stories.js → PopoverMenu.stories.tsx} +9 -3
  32. package/src/stories/RadioGroup.stories.ts +6 -1
  33. package/src/stories/Select.stories.ts +10 -1
  34. package/src/stories/Switch.stories.ts +2 -1
  35. package/src/stories/{TabMenu.stories.js → TabMenu.stories.tsx} +8 -2
  36. package/src/stories/TextArea.stories.ts +9 -1
  37. package/src/stories/{Typography.stories.js → Typography.stories.tsx} +3 -1
  38. package/tsconfig.json +6 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agroptima-design-system",
3
- "version": "0.36.2",
3
+ "version": "0.36.3-beta.0",
4
4
  "scripts": {
5
5
  "dev": "npm run storybook",
6
6
  "storybook": "storybook dev -p 6006 --ci",
@@ -41,6 +41,7 @@ import Minus from './minus.svg'
41
41
  import NewView from './new-view.svg'
42
42
  import Orders from './orders.svg'
43
43
  import PDF from './pdf.svg'
44
+ import Picture from './picture.svg'
44
45
  import Product from './product.svg'
45
46
  import Reason from './reason.svg'
46
47
  import Reports from './reports.svg'
@@ -100,6 +101,7 @@ export {
100
101
  NewView,
101
102
  Orders,
102
103
  PDF,
104
+ Picture,
103
105
  Product,
104
106
  Reason,
105
107
  Reports,
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#picture__a)"><path d="M2.222 20a2.14 2.14 0 0 1-1.57-.653A2.14 2.14 0 0 1 0 17.777V2.223c0-.61.218-1.134.653-1.57A2.14 2.14 0 0 1 2.223 0h15.555a2.14 2.14 0 0 1 1.57.653c.434.435.652.958.652 1.57v15.555a2.14 2.14 0 0 1-.653 1.57 2.14 2.14 0 0 1-1.57.652H2.223Zm0-2.222h15.556V2.222H2.222v15.556Zm1.111-2.222h13.334L12.5 10l-3.333 4.444-2.5-3.333-3.334 4.445Z"/></g><defs><clipPath id="picture__a"><path fill="#fff" d="M0 0h20v20H0z"/></clipPath></defs></svg>
@@ -8,7 +8,15 @@ const meta = {
8
8
  docs: {
9
9
  description: {
10
10
  component:
11
- "<h2>Usage guidelines</h2><ul><li>Make Alerts actionable and including a close button</li><li>Be aware of color and semantic meaning</li><li>Include only one action per Alert</li><li>Place Alerts at the top</li><li>Don't place Alerts over navigation</li><li>Persist errors to maintain visibility</li></ul>",
11
+ '<h2>Usage guidelines</h2>' +
12
+ '<ul>' +
13
+ ' <li>Make Alerts actionable and including a close button</li>' +
14
+ ' <li>Be aware of color and semantic meaning</li>' +
15
+ ' <li>Include only one action per Alert</li>' +
16
+ ' <li>Place Alerts at the top</li>' +
17
+ " <li>Don't place Alerts over navigation</li>" +
18
+ ' <li>Persist errors to maintain visibility</li>' +
19
+ '</ul>',
12
20
  },
13
21
  },
14
22
  },
@@ -1,3 +1,4 @@
1
+ import type { StoryObj } from '@storybook/react'
1
2
  import React from 'react'
2
3
  import { Alert, AlertContainer } from '../atoms/Alert'
3
4
 
@@ -17,8 +18,9 @@ const meta = {
17
18
  }
18
19
 
19
20
  export default meta
21
+ type Story = StoryObj<typeof meta>
20
22
 
21
- export const Primary = {
23
+ export const Primary: Story = {
22
24
  render: () => (
23
25
  <AlertContainer>
24
26
  <Alert variant="success" id="success" text="This is a success alert" />
@@ -8,7 +8,8 @@ const meta = {
8
8
  docs: {
9
9
  description: {
10
10
  component:
11
- '<h2>Usage guidelines</h2><p>Use Badge component when content is mapped to multiple categories and the user needs a way to differentiate between them such as labeling or read-only situations.</p>',
11
+ '<h2>Usage guidelines</h2>' +
12
+ '<p>Use Badge component when content is mapped to multiple categories and the user needs a way to differentiate between them such as labeling or read-only situations.</p>',
12
13
  },
13
14
  },
14
15
  },
@@ -8,7 +8,14 @@ const meta = {
8
8
  docs: {
9
9
  description: {
10
10
  component:
11
- '<h2>Usage guidelines</h2><ul><li>Button can be used as an action trigger or as a navigational component</li><li>Use icons at the page first level actions such as Create, Edit, Delete or mass actions</li><li>Display a popover when featuring subsequent options</li><li>Be aware of color and semantic meaning</li><li>Write labels as verbs</li></ul>',
11
+ '<h2>Usage guidelines</h2>' +
12
+ '<ul>' +
13
+ ' <li>Button can be used as an action trigger or as a navigational component</li>' +
14
+ ' <li>Use icons at the page first level actions such as Create, Edit, Delete or mass actions</li>' +
15
+ ' <li>Display a popover when featuring subsequent options</li>' +
16
+ ' <li>Be aware of color and semantic meaning</li>' +
17
+ ' <li>Write labels as verbs</li>' +
18
+ '</ul>',
12
19
  },
13
20
  },
14
21
  },
@@ -1,3 +1,4 @@
1
+ import type { StoryObj } from '@storybook/react'
1
2
  import { IconButton } from '../atoms/Button'
2
3
  import { Button } from '../atoms/Button'
3
4
  import { Card, CardContent, CardFooter, CardHeader } from '../atoms/Card'
@@ -17,7 +18,11 @@ const meta = {
17
18
  docs: {
18
19
  description: {
19
20
  component:
20
- '<h2>Usage guidelines</h2><p>A Card component can be used to display content related to a single subject. The content can consist of multiple elements of varying types and sizes.</p><ul><li>The Card has a hover effect when being a link, being `clickable` or not having any buttons.</li></ul>',
21
+ '<h2>Usage guidelines</h2>' +
22
+ '<p>A Card component can be used to display content related to a single subject. The content can consist of multiple elements of varying types and sizes.</p>' +
23
+ '<ul>' +
24
+ ' <li>The Card has a hover effect when being a link, being `clickable` or not having any buttons.</li>' +
25
+ '</ul>',
21
26
  },
22
27
  },
23
28
  figmaPrimaryDesign,
@@ -59,8 +64,9 @@ const meta = {
59
64
  }
60
65
 
61
66
  export default meta
67
+ type Story = StoryObj<typeof meta>
62
68
 
63
- export const ProductCard = {
69
+ export const ProductCard: Story = {
64
70
  render: () => (
65
71
  <div style={{ display: 'flex' }}>
66
72
  <Card variant="primary">
@@ -119,9 +125,9 @@ export const ProductCard = {
119
125
  </Card>
120
126
  </div>
121
127
  ),
122
- }
128
+ } as unknown as Story
123
129
 
124
- export const ProductCardsGroup = {
130
+ export const ProductCardsGroup: Story = {
125
131
  render: () => (
126
132
  <div
127
133
  style={{
@@ -415,9 +421,9 @@ export const ProductCardsGroup = {
415
421
  </Card>
416
422
  </div>
417
423
  ),
418
- }
424
+ } as unknown as Story
419
425
 
420
- export const Primary = {
426
+ export const Primary: Story = {
421
427
  render: () => (
422
428
  <div style={{ display: 'flex', width: '700px', gap: '20px' }}>
423
429
  <Card variant="primary">
@@ -468,9 +474,9 @@ export const Primary = {
468
474
  </Card>
469
475
  </div>
470
476
  ),
471
- }
477
+ } as unknown as Story
472
478
 
473
- export const Disabled = {
479
+ export const Disabled: Story = {
474
480
  render: () => (
475
481
  <div style={{ display: 'flex' }}>
476
482
  <Card isDisabled variant="primary">
@@ -492,9 +498,9 @@ export const Disabled = {
492
498
  </Card>
493
499
  </div>
494
500
  ),
495
- }
501
+ } as unknown as Story
496
502
 
497
- export const Active = {
503
+ export const Active: Story = {
498
504
  render: () => (
499
505
  <div style={{ display: 'flex' }}>
500
506
  <Card isActive>
@@ -504,9 +510,9 @@ export const Active = {
504
510
  </Card>
505
511
  </div>
506
512
  ),
507
- }
513
+ } as unknown as Story
508
514
 
509
- export const WithLink = {
515
+ export const WithLink: Story = {
510
516
  render: () => (
511
517
  <div style={{ display: 'flex' }}>
512
518
  <Card href="some-url">
@@ -521,9 +527,9 @@ export const WithLink = {
521
527
  </Card>
522
528
  </div>
523
529
  ),
524
- }
530
+ } as unknown as Story
525
531
 
526
- export const Clickable = {
532
+ export const Clickable: Story = {
527
533
  render: () => (
528
534
  <div style={{ display: 'flex' }}>
529
535
  <Card onClick={() => alert('click')}>
@@ -538,4 +544,4 @@ export const Clickable = {
538
544
  </Card>
539
545
  </div>
540
546
  ),
541
- }
547
+ } as unknown as Story
@@ -1,3 +1,4 @@
1
+ import type { StoryObj } from '@storybook/react'
1
2
  import { CardMenu, CardMenuOption } from '../atoms/CardMenu'
2
3
 
3
4
  const figmaPrimaryDesign = {
@@ -14,7 +15,8 @@ const meta = {
14
15
  docs: {
15
16
  description: {
16
17
  component:
17
- '<h2>Usage guidelines</h2><p>CardMenu is used to hide less frequently used or advanced options until users specifically need them. This keeps the interface clean and focused on essential elements. Consider using short and precise labels for menu items as well as a suitable ordering and grouping.</p>',
18
+ '<h2>Usage guidelines</h2>' +
19
+ '<p>CardMenu is used to hide less frequently used or advanced options until users specifically need them. This keeps the interface clean and focused on essential elements. Consider using short and precise labels for menu items as well as a suitable ordering and grouping.</p>',
18
20
  },
19
21
  },
20
22
  figmaPrimaryDesign,
@@ -36,6 +38,9 @@ const meta = {
36
38
  description: {
37
39
  description: 'Component description text',
38
40
  },
41
+ href: {
42
+ description: 'Component link',
43
+ },
39
44
  disabled: {
40
45
  description: 'Is the component disabled?',
41
46
  },
@@ -49,21 +54,22 @@ const meta = {
49
54
  }
50
55
 
51
56
  export default meta
57
+ type Story = StoryObj<typeof meta>
52
58
 
53
- export const Option = {
59
+ export const Option: Story = {
54
60
  render: () => (
55
61
  <CardMenuOption
56
62
  id="first-menu-option"
57
- href="#"
63
+ href="http://olakas.com"
58
64
  icon="Info"
59
65
  variant="primary"
60
66
  title="It's dangerous to go alone!"
61
67
  description="Take this 🗡️ and this 🛡️ and this 💣 and this 🏹 and this 🔪 and this 🐴 and this 🔫 and this 🔪"
62
68
  />
63
69
  ),
64
- }
70
+ } as unknown as Story
65
71
 
66
- export const DisabledOption = {
72
+ export const DisabledOption: Story = {
67
73
  render: () => (
68
74
  <CardMenuOption
69
75
  id="first-menu-option"
@@ -75,9 +81,9 @@ export const DisabledOption = {
75
81
  disabled
76
82
  />
77
83
  ),
78
- }
84
+ } as unknown as Story
79
85
 
80
- export const ActiveOption = {
86
+ export const ActiveOption: Story = {
81
87
  render: () => (
82
88
  <CardMenuOption
83
89
  id="first-menu-option"
@@ -89,9 +95,9 @@ export const ActiveOption = {
89
95
  active
90
96
  />
91
97
  ),
92
- }
98
+ } as unknown as Story
93
99
 
94
- export const ErrorOption = {
100
+ export const ErrorOption: Story = {
95
101
  render: () => (
96
102
  <CardMenuOption
97
103
  id="first-menu-option"
@@ -103,9 +109,9 @@ export const ErrorOption = {
103
109
  error
104
110
  />
105
111
  ),
106
- }
112
+ } as unknown as Story
107
113
 
108
- export const Menu = {
114
+ export const Menu: Story = {
109
115
  render: () => (
110
116
  <CardMenu>
111
117
  <CardMenuOption
@@ -135,4 +141,4 @@ export const Menu = {
135
141
  />
136
142
  </CardMenu>
137
143
  ),
138
- }
144
+ } as unknown as Story
@@ -1,7 +1,9 @@
1
+ import type { StoryObj } from '@storybook/react'
1
2
  import React from 'react'
2
3
  import { Badge } from '../atoms/Badge'
3
4
  import { IconButton } from '../atoms/Button'
4
5
  import {
6
+ Alignment,
5
7
  CardsTable,
6
8
  CardsTableBody,
7
9
  CardsTableCell,
@@ -27,7 +29,12 @@ const meta = {
27
29
  docs: {
28
30
  description: {
29
31
  component:
30
- '<h2>Usage guidelines</h2><p>CardsTable component features are ideal for organizing and displaying data in a UI.</p><ul><li>Left align textual data</li><li>Right align numerical data</li><li>When having several numerical data columns, the Price one should be just before the Actions column</li></ul>',
32
+ '<h2>Usage guidelines</h2>' +
33
+ '<p>CardsTable component features are ideal for organizing and displaying data in a UI.</p>' +
34
+ '<ul>' +
35
+ ' <li>Left align textual data</li><li>Right align numerical data</li>' +
36
+ ' <li>When having several numerical data columns, the Price one should be just before the Actions column</li>' +
37
+ '</ul>',
31
38
  },
32
39
  },
33
40
  figmaPrimaryDesign,
@@ -43,8 +50,9 @@ const meta = {
43
50
  }
44
51
 
45
52
  export default meta
53
+ type Story = StoryObj<typeof meta>
46
54
 
47
- export const Primary = {
55
+ export const Primary: Story = {
48
56
  render: (args) => (
49
57
  <CardsTable withTitle {...args}>
50
58
  <CardsTableHead>
@@ -52,7 +60,6 @@ export const Primary = {
52
60
  <CardsTableHeader>
53
61
  <Checkbox
54
62
  hideLabel
55
- label="Select all table rows"
56
63
  id="checkbox-select-all"
57
64
  indeterminate
58
65
  checked
@@ -142,7 +149,7 @@ export const Primary = {
142
149
  variant="info-outlined"
143
150
  />
144
151
  </CardsTableCell>
145
- <CardsTableCell align="right">19,99 €</CardsTableCell>
152
+ <CardsTableCell align={Alignment.Right}>19,99 €</CardsTableCell>
146
153
  <CardsTableCell actions>
147
154
  <IconButton
148
155
  icon="Edit"
@@ -179,7 +186,7 @@ export const Primary = {
179
186
  variant="warning-outlined"
180
187
  />
181
188
  </CardsTableCell>
182
- <CardsTableCell align="right">79,99 €</CardsTableCell>
189
+ <CardsTableCell align={Alignment.Right}>79,99 €</CardsTableCell>
183
190
  <CardsTableCell actions>
184
191
  <IconButton
185
192
  icon="Edit"
@@ -210,12 +217,16 @@ export const Primary = {
210
217
  variant="success-outlined"
211
218
  />
212
219
  </CardsTableCell>
213
- <CardsTableCell align="right">6,99 €</CardsTableCell>
220
+ <CardsTableCell align={Alignment.Right}>6,99 €</CardsTableCell>
214
221
  <CardsTableCell actions>
215
222
  <Popover
216
223
  position="center"
217
224
  renderButton={({ toggle }) => (
218
- <IconButton icon="PDF" label="Open popover" onClick={toggle} />
225
+ <IconButton
226
+ icon="PDF"
227
+ accessibilityLabel="Open popover"
228
+ onClick={toggle}
229
+ />
219
230
  )}
220
231
  >
221
232
  <PopoverMenu>
@@ -270,7 +281,7 @@ export const Primary = {
270
281
  variant="neutral-outlined"
271
282
  />
272
283
  </CardsTableCell>
273
- <CardsTableCell align="right" floatingRightMobile>
284
+ <CardsTableCell align={Alignment.Right} floatingRightMobile>
274
285
  6,99 €
275
286
  </CardsTableCell>
276
287
  <CardsTableCell actions>
@@ -306,13 +317,13 @@ export const Primary = {
306
317
  ),
307
318
  }
308
319
 
309
- export const OnlyTitle = {
320
+ export const OnlyTitle: Story = {
310
321
  render: (args) => (
311
322
  <CardsTable {...args}>
312
323
  <CardsTableBody>
313
324
  <CardsTableRow isActive onClick={() => alert('Click')}>
314
325
  <CardsTableCell titleWithActions={1}>Only title</CardsTableCell>
315
- <CardsTableCell actions align="right">
326
+ <CardsTableCell actions align={Alignment.Right}>
316
327
  <IconButton
317
328
  icon="Edit"
318
329
  accessibilityLabel="Edit game"
@@ -325,7 +336,7 @@ export const OnlyTitle = {
325
336
  ),
326
337
  }
327
338
 
328
- export const MultipleBadges = {
339
+ export const MultipleBadges: Story = {
329
340
  render: (args) => (
330
341
  <CardsTable withTitle {...args}>
331
342
  <CardsTableHead>
@@ -333,7 +344,6 @@ export const MultipleBadges = {
333
344
  <CardsTableHeader>
334
345
  <Checkbox
335
346
  hideLabel
336
- label="Select all table rows"
337
347
  id="checkbox-select-all"
338
348
  indeterminate
339
349
  checked
@@ -385,7 +395,7 @@ export const MultipleBadges = {
385
395
  variant="neutral-outlined"
386
396
  />
387
397
  </CardsTableCell>
388
- <CardsTableCell align="right" floatingRightMobile noWrap>
398
+ <CardsTableCell align={Alignment.Right} floatingRightMobile noWrap>
389
399
  6,99 €
390
400
  </CardsTableCell>
391
401
  <CardsTableCell actions>
@@ -4,6 +4,10 @@ import { Meta } from "@storybook/blocks";
4
4
 
5
5
  # Changelog
6
6
 
7
+ ## 0.36.3
8
+
9
+ * Add Picture icon
10
+
7
11
  ## 0.36.2
8
12
 
9
13
  * Add Order icon
@@ -1,3 +1,4 @@
1
+ import type { StoryObj } from '@storybook/react'
1
2
  import { CheckableTag, CheckableTagGroup } from '../atoms/CheckableTag'
2
3
 
3
4
  const figmaPrimaryDesign = {
@@ -32,7 +33,11 @@ const meta = {
32
33
  docs: {
33
34
  description: {
34
35
  component:
35
- '<h2>Usage guidelines</h2><p>CheckableTags allow users to categorize content. This component is used as a quick access to the most used filter.</p><ul><li>Allow bulk actions</li><li>Avoid disabling a large group of tags</li></ul>',
36
+ '<h2>Usage guidelines</h2>' +
37
+ '<p>CheckableTags allow users to categorize content. This component is used as a quick access to the most used filter.</p>' +
38
+ '<ul>' +
39
+ ' <li>Allow bulk actions</li><li>Avoid disabling a large group of tags</li>' +
40
+ '</ul>',
36
41
  },
37
42
  },
38
43
  figmaPrimaryDesign,
@@ -40,8 +45,9 @@ const meta = {
40
45
  }
41
46
 
42
47
  export default meta
48
+ type Story = StoryObj<typeof meta>
43
49
 
44
- export const TagGroup = {
50
+ export const TagGroup: Story = {
45
51
  render: () => (
46
52
  <CheckableTagGroup>
47
53
  <CheckableTag
@@ -103,4 +109,4 @@ export const TagGroup = {
103
109
  />
104
110
  </CheckableTagGroup>
105
111
  ),
106
- }
112
+ } as unknown as Story
@@ -9,7 +9,12 @@ const meta = {
9
9
  docs: {
10
10
  description: {
11
11
  component:
12
- "<h2>Usage guidelines</h2><p>Checkboxes are used for multiple choices, not for mutually exclusive choices.</p><ul><li>When a checkbox represents multiple values that are not identical, the checkbox should appear in the indeterminate state</li><li>It's used on forms, filtering and batch actions and on terms and conditions agreement</li></ul>",
12
+ '<h2>Usage guidelines</h2>' +
13
+ '<p>Checkboxes are used for multiple choices, not for mutually exclusive choices.</p>' +
14
+ '<ul>' +
15
+ ' <li>When a checkbox represents multiple values that are not identical, the checkbox should appear in the indeterminate state</li>' +
16
+ " <li>It's used on forms, filtering and batch actions and on terms and conditions agreement</li>" +
17
+ '</ul>',
13
18
  },
14
19
  },
15
20
  },
@@ -1,7 +1,7 @@
1
1
  import type { StoryObj } from '@storybook/react'
2
2
  import React from 'react'
3
3
  import { Button } from '../atoms/Button'
4
- import { Collapsible } from '../atoms/Collapsible/Collapsible'
4
+ import { Collapsible } from '../atoms/Collapsible'
5
5
  import { Divider } from '../atoms/Divider'
6
6
  import { Actions, Form as FormComponent, FormContainer } from '../atoms/Form'
7
7
  import { Input } from '../atoms/Input'
@@ -36,7 +36,12 @@ const meta = {
36
36
  docs: {
37
37
  description: {
38
38
  component:
39
- '<h2>Usage guidelines</h2><p>The Collapsible component delivers large amounts of content in a small space through progressive disclosure. The header title gives the user a high level overview of the content allowing the user to decide which sections to read.</p><ul><li>Always display the collapse and expand button</li><li>To shorten pages and reduce scrolling when content is not crucial to read in full</li></ul>',
39
+ '<h2>Usage guidelines</h2>' +
40
+ '<p>The Collapsible component delivers large amounts of content in a small space through progressive disclosure. The header title gives the user a high level overview of the content allowing the user to decide which sections to read.</p>' +
41
+ '<ul>' +
42
+ ' <li>Always display the collapse and expand button</li>' +
43
+ ' <li>To shorten pages and reduce scrolling when content is not crucial to read in full</li>' +
44
+ '</ul>',
40
45
  },
41
46
  },
42
47
  figmaPrimaryDesign,
@@ -8,7 +8,8 @@ const meta = {
8
8
  docs: {
9
9
  description: {
10
10
  component:
11
- '<h2>Usage guidelines</h2><p>DateRangePicker component allows users to select past, present, or future dates in a visual way in range or single format. To avoid problems with Chromatic builds, always add a defaultValue.</p>',
11
+ '<h2>Usage guidelines</h2>' +
12
+ '<p>DateRangePicker component allows users to select past, present, or future dates in a visual way in range or single format. To avoid problems with Chromatic builds, always add a defaultValue.</p>',
12
13
  },
13
14
  },
14
15
  },
@@ -8,7 +8,8 @@ const meta = {
8
8
  docs: {
9
9
  description: {
10
10
  component:
11
- '<h2>Usage guidelines</h2><p>DateRangePicker component allows users to select past, present, or future dates in a visual way in range or single format. To avoid problems with Chromatic builds, always add a defaultValue.</p>',
11
+ '<h2>Usage guidelines</h2>' +
12
+ '<p>DateRangePicker component allows users to select past, present, or future dates in a visual way in range or single format. To avoid problems with Chromatic builds, always add a defaultValue.</p>',
12
13
  },
13
14
  },
14
15
  },
@@ -9,7 +9,11 @@ const meta = {
9
9
  docs: {
10
10
  description: {
11
11
  component:
12
- '<h2>Usage guidelines</h2><p>A Divider component separates different content.</p><ul><li>Place a divider below a header</li></ul>',
12
+ '<h2>Usage guidelines</h2>' +
13
+ '<p>A Divider component separates different content.</p>' +
14
+ '<ul>' +
15
+ ' <li>Place a divider below a header</li>' +
16
+ '</ul>',
13
17
  },
14
18
  },
15
19
  },
@@ -1,3 +1,4 @@
1
+ import type { StoryObj } from '@storybook/react'
1
2
  import React from 'react'
2
3
  import { CheckableTag, CheckableTagGroup } from '../atoms/CheckableTag'
3
4
  import { Collapsible } from '../atoms/Collapsible/Collapsible'
@@ -33,7 +34,8 @@ const meta = {
33
34
  docs: {
34
35
  description: {
35
36
  component:
36
- '<h2>Usage guidelines</h2><p>A Drawer is a panel that is typically overlaid on top of a page and slides in from the side. It contains a set of information or actions. Since the user can interact with the Drawer without leaving the current page, tasks can be achieved more efficiently within the same context.</p>',
37
+ '<h2>Usage guidelines</h2>' +
38
+ '<p>A Drawer is a panel that is typically overlaid on top of a page and slides in from the side. It contains a set of information or actions. Since the user can interact with the Drawer without leaving the current page, tasks can be achieved more efficiently within the same context.</p>',
37
39
  },
38
40
  },
39
41
  figmaPrimaryDesign,
@@ -41,8 +43,9 @@ const meta = {
41
43
  }
42
44
 
43
45
  export default meta
46
+ type Story = StoryObj<typeof meta>
44
47
 
45
- export const Filters = {
48
+ export const Filters: Story = {
46
49
  render: () => (
47
50
  <Drawer
48
51
  id="videogames-filters"
@@ -58,6 +61,7 @@ export const Filters = {
58
61
  onClick: () => alert('click'),
59
62
  },
60
63
  ]}
64
+ onClose={() => {}}
61
65
  >
62
66
  <Collapsible noHorizontalPadding open title="Genres">
63
67
  <CheckableTagGroup>
@@ -139,4 +143,4 @@ export const Filters = {
139
143
  </Collapsible>
140
144
  </Drawer>
141
145
  ),
142
- }
146
+ } as unknown as Story
@@ -1,3 +1,4 @@
1
+ import type { StoryObj } from '@storybook/react'
1
2
  import { Button } from '../atoms/Button'
2
3
  import { EmptyState } from '../atoms/EmptyState'
3
4
 
@@ -24,7 +25,8 @@ const meta = {
24
25
  docs: {
25
26
  description: {
26
27
  component:
27
- '<h2>Usage guidelines</h2><p>EmptyState component is used for informing about no data and user actions such as no results when searching. A default icon is set for the empty state.</p>',
28
+ '<h2>Usage guidelines</h2>' +
29
+ '<p>EmptyState component is used for informing about no data and user actions such as no results when searching. A default icon is set for the empty state.</p>',
28
30
  },
29
31
  },
30
32
  figmaPrimaryDesign,
@@ -32,8 +34,9 @@ const meta = {
32
34
  }
33
35
 
34
36
  export default meta
37
+ type Story = StoryObj<typeof meta>
35
38
 
36
- export const PrimaryCustom = {
39
+ export const PrimaryCustom: Story = {
37
40
  render: () => (
38
41
  <EmptyState variant="primary">
39
42
  <p>
@@ -45,7 +48,7 @@ export const PrimaryCustom = {
45
48
  ),
46
49
  }
47
50
 
48
- export const PrimaryBasic = {
51
+ export const PrimaryBasic: Story = {
49
52
  render: () => (
50
53
  <EmptyState variant="primary">
51
54
  <p>No data</p>
@@ -8,7 +8,8 @@ const meta = {
8
8
  docs: {
9
9
  description: {
10
10
  component:
11
- "<h2>Usage guidelines</h2><p>The floating action button (FAB) performs the primary, or most common, action on a screen. It appears in front of all screen content, typically as a circular shape with an icon in its center. Only use a FAB if it is the most suitable way to present a screen's primary action. It's FABulous!✨</p>",
11
+ '<h2>Usage guidelines</h2>' +
12
+ "<p>The floating action button (FAB) performs the primary, or most common, action on a screen. It appears in front of all screen content, typically as a circular shape with an icon in its center. Only use a FAB if it is the most suitable way to present a screen's primary action. It's FABulous!✨</p>",
12
13
  },
13
14
  },
14
15
  },
@@ -1,5 +1,8 @@
1
+ import type { StoryObj } from '@storybook/react'
2
+ import type { JSX } from 'react'
1
3
  import { Button } from '../atoms/Button'
2
4
  import { Actions, Form } from '../atoms/Form'
5
+ import type { FormProps } from '../atoms/Form/Form'
3
6
  import { Input } from '../atoms/Input'
4
7
 
5
8
  const meta = {
@@ -9,7 +12,12 @@ const meta = {
9
12
  docs: {
10
13
  description: {
11
14
  component:
12
- '<h2>Usage guidelines</h2><p>Forms are used when we need to create an instance or collect information.</p><ul><li>Keep the label short and concise</li><li>When used, helper text that appears persistently underneath the field is replaced by an error or warning message if a state change occurs</li><li>Mark the minority of inputs in a form as required or optional</li></ul>',
15
+ '<h2>Usage guidelines</h2>' +
16
+ '<p>Forms are used when we need to create an instance or collect information.</p>' +
17
+ '<ul>' +
18
+ ' <li>Keep the label short and concise</li><li>When used, helper text that appears persistently underneath the field is replaced by an error or warning message if a state change occurs</li>' +
19
+ ' <li>Mark the minority of inputs in a form as required or optional</li>' +
20
+ '</ul>',
13
21
  },
14
22
  },
15
23
  },
@@ -23,9 +31,10 @@ const meta = {
23
31
  }
24
32
 
25
33
  export default meta
34
+ type Story = StoryObj<typeof meta>
26
35
 
27
- export const FormWithActions = {
28
- render: (args) => (
36
+ export const FormWithActions: Story = {
37
+ render: (args: JSX.IntrinsicAttributes & FormProps) => (
29
38
  <Form {...args}>
30
39
  <Input label="First Name" placeholder="First Name" name="firstName" />
31
40
  <Input label="Last Name" placeholder="Last Name" name="lastName" />
@@ -49,4 +58,4 @@ export const FormWithActions = {
49
58
  </Actions>
50
59
  </Form>
51
60
  ),
52
- }
61
+ } as unknown as Story
@@ -8,7 +8,8 @@ const meta = {
8
8
  docs: {
9
9
  description: {
10
10
  component:
11
- '<h2>Usage guidelines</h2><p>HelpText component provides either an informative description or an error message that gives more context about what a user needs to input. It’s commonly used in forms.</p>',
11
+ '<h2>Usage guidelines</h2>' +
12
+ '<p>HelpText component provides either an informative description or an error message that gives more context about what a user needs to input. It’s commonly used in forms.</p>',
12
13
  },
13
14
  },
14
15
  },
@@ -8,7 +8,14 @@ const meta = {
8
8
  docs: {
9
9
  description: {
10
10
  component:
11
- '<h2>Usage guidelines</h2><p>An icon is a graphical representation of meaning. Icons can be used to express actions, state, and even to categorize data.</p><ul><li>Graphics that are clear, intuitive, and simple enjoy a higher degree of recognition and are more easily understood</li><li>All icons in the user interface should be consistent in style (detail design, perspective, stroke weight, etc.)</li><li>Use tooltips</li></ul><p>For more information about the Button usage, check its guidelines.</p>',
11
+ '<h2>Usage guidelines</h2>' +
12
+ '<p>An icon is a graphical representation of meaning. Icons can be used to express actions, state, and even to categorize data.</p>' +
13
+ '<ul>' +
14
+ ' <li>Graphics that are clear, intuitive, and simple enjoy a higher degree of recognition and are more easily understood</li>' +
15
+ ' <li>All icons in the user interface should be consistent in style (detail design, perspective, stroke weight, etc.)</li>' +
16
+ ' <li>Use tooltips</li>' +
17
+ '</ul>' +
18
+ '<p>For more information about the Button usage, check its guidelines.</p>',
12
19
  },
13
20
  },
14
21
  },
@@ -8,7 +8,14 @@ const meta = {
8
8
  docs: {
9
9
  description: {
10
10
  component:
11
- '<h2>Usage guidelines</h2><p>Input component is used when a user needs to input unique information that cannot be predicted with a preset of options or that can be entered more quickly in a free-hand format.</p><ul><li>By default, include a label</li><li>Mark the minority of inputs in a form as required or optional</li><li>Use help text to show hints, formatting, and requirements</li><li>Optional placeholder text provides hints or examples of what to enter</li><li>Switch help text with error text</li><li>Write error text that shows a solution</li></ul>',
11
+ '<h2>Usage guidelines</h2>' +
12
+ '<p>Input component is used when a user needs to input unique information that cannot be predicted with a preset of options or that can be entered more quickly in a free-hand format.</p>' +
13
+ '<ul>' +
14
+ ' <li>By default, include a label</li><li>Mark the minority of inputs in a form as required or optional</li>' +
15
+ ' <li>Use help text to show hints, formatting, and requirements</li>' +
16
+ ' <li>Optional placeholder text provides hints or examples of what to enter</li>' +
17
+ ' <li>Switch help text with error text</li><li>Write error text that shows a solution</li>' +
18
+ '</ul>',
12
19
  },
13
20
  },
14
21
  },
@@ -8,7 +8,10 @@ const meta = {
8
8
  docs: {
9
9
  description: {
10
10
  component:
11
- '<h2>Usage guidelines</h2><ul><li>Element represents a caption for an item in a user interface.</li></ul>',
11
+ '<h2>Usage guidelines</h2>' +
12
+ '<ul>' +
13
+ ' <li>Element represents a caption for an item in a user interface.</li>' +
14
+ '</ul>',
12
15
  },
13
16
  },
14
17
  },
@@ -1,3 +1,4 @@
1
+ import type { StoryObj } from '@storybook/react'
1
2
  import React from 'react'
2
3
  import { Menu, MenuDropdown, MenuLink } from '../atoms/Menu'
3
4
 
@@ -15,7 +16,12 @@ const meta = {
15
16
  docs: {
16
17
  description: {
17
18
  component:
18
- '<h2>Usage guidelines</h2><p>Menu component allows users to move around the site quickly and efficiently.</p><ul><li>Use concise & descriptive titles in order to ensure simplicity</li><li>Use icons in first-level items only</li></ul>',
19
+ '<h2>Usage guidelines</h2>' +
20
+ '<p>Menu component allows users to move around the site quickly and efficiently.</p>' +
21
+ '<ul>' +
22
+ ' <li>Use concise & descriptive titles in order to ensure simplicity</li>' +
23
+ ' <li>Use icons in first-level items only</li>' +
24
+ '</ul>',
19
25
  },
20
26
  },
21
27
  figmaPrimaryDesign,
@@ -44,8 +50,9 @@ const meta = {
44
50
  }
45
51
 
46
52
  export default meta
53
+ type Story = StoryObj<typeof meta>
47
54
 
48
- export const MenuWithLinks = {
55
+ export const MenuWithLinks: Story = {
49
56
  render: () => (
50
57
  <Menu>
51
58
  <MenuLink title="Tekken 8" href="some-link" />
@@ -1,7 +1,7 @@
1
1
  import type { StoryObj } from '@storybook/react'
2
2
  import React from 'react'
3
3
  import { Button } from '../atoms/Button'
4
- import { Collapsible } from '../atoms/Collapsible/Collapsible'
4
+ import { Collapsible } from '../atoms/Collapsible'
5
5
  import { Divider } from '../atoms/Divider'
6
6
  import { FormContainer } from '../atoms/Form'
7
7
  import { Input } from '../atoms/Input'
@@ -8,7 +8,14 @@ const meta = {
8
8
  docs: {
9
9
  description: {
10
10
  component:
11
- '<h2>Usage guidelines</h2><p>When there are more than a few options to choose from, you can wrap them in a Multiselect component. By clicking on the trigger, a menu will appear, which allows you to choose an option and execute the relevant action.</p><ul><li>By default, include a label</li><li>Mark the minority of components in a form as required or optional</li><li>Use help text to show hints, formatting, and requirements</li><li>Switch help text with error text</li><li>Write error text that shows a solution</li></ul>',
11
+ '<h2>Usage guidelines</h2>' +
12
+ '<p>When there are more than a few options to choose from, you can wrap them in a Multiselect component. By clicking on the trigger, a menu will appear, which allows you to choose an option and execute the relevant action.</p>' +
13
+ '<ul>' +
14
+ ' <li>By default, include a label</li><li>Mark the minority of components in a form as required or optional</li>' +
15
+ ' <li>Use help text to show hints, formatting, and requirements</li>' +
16
+ ' <li>Switch help text with error text</li>' +
17
+ ' <li>Write error text that shows a solution</li>' +
18
+ '</ul>',
12
19
  },
13
20
  },
14
21
  },
@@ -1,3 +1,4 @@
1
+ import type { StoryObj } from '@storybook/react'
1
2
  import React from 'react'
2
3
  import {
3
4
  Ellipsis,
@@ -27,9 +28,6 @@ const meta = {
27
28
  href: {
28
29
  description: 'Link to the page',
29
30
  },
30
- variant: {
31
- description: 'Component variant used',
32
- },
33
31
  selected: {
34
32
  description: 'Is PageNumber the current page?',
35
33
  },
@@ -44,7 +42,8 @@ const meta = {
44
42
  docs: {
45
43
  description: {
46
44
  component:
47
- '<h2>Usage guidelines</h2><p>Pagination component organizes and divides large amounts of content on separate pages and gives the user control over how much content they want to view on each page.</p>',
45
+ '<h2>Usage guidelines</h2>' +
46
+ '<p>Pagination component organizes and divides large amounts of content on separate pages and gives the user control over how much content they want to view on each page.</p>',
48
47
  },
49
48
  },
50
49
  figmaPrimaryDesign,
@@ -52,8 +51,9 @@ const meta = {
52
51
  }
53
52
 
54
53
  export default meta
54
+ type Story = StoryObj<typeof meta>
55
55
 
56
- export const BasicPagination = {
56
+ export const BasicPagination: Story = {
57
57
  render: () => (
58
58
  <Pagination>
59
59
  <PaginationArrow
@@ -89,7 +89,7 @@ export const BasicPagination = {
89
89
  ),
90
90
  }
91
91
 
92
- export const MiniPagination = {
92
+ export const MiniPagination: Story = {
93
93
  render: () => (
94
94
  <Pagination size="small">
95
95
  <PaginationArrow
@@ -146,7 +146,7 @@ export const MiniPagination = {
146
146
  ),
147
147
  }
148
148
 
149
- export const AdvancedPagination = {
149
+ export const AdvancedPagination: Story = {
150
150
  render: () => (
151
151
  <Pagination>
152
152
  <PaginationArrow
@@ -1,3 +1,4 @@
1
+ import type { StoryObj } from '@storybook/react'
1
2
  import React from 'react'
2
3
  import { Button } from '../atoms/Button'
3
4
  import { Popover, PopoverMenu, PopoverMenuOption } from '../atoms/Popover'
@@ -27,7 +28,11 @@ const meta = {
27
28
  docs: {
28
29
  description: {
29
30
  component:
30
- '<h2>Usage guidelines</h2><p>A Popover component is a layer that appears above all other content on the page. Only one popover can appear at a time and can contain varying text and interactive elements.</p><ul><li>Use when you need to display additional details for specific elements on a page.</li></ul>',
31
+ '<h2>Usage guidelines</h2>' +
32
+ '<p>A Popover component is a layer that appears above all other content on the page. Only one popover can appear at a time and can contain varying text and interactive elements.</p>' +
33
+ '<ul>' +
34
+ ' <li>Use when you need to display additional details for specific elements on a page.</li>' +
35
+ '</ul>',
31
36
  },
32
37
  },
33
38
  figmaPrimaryDesign,
@@ -35,9 +40,14 @@ const meta = {
35
40
  }
36
41
 
37
42
  export default meta
43
+ type Story = StoryObj<typeof meta>
38
44
 
39
- export const Menu = {
40
- render: ({ position }) => (
45
+ interface Position {
46
+ position?: 'left' | 'right' | 'center'
47
+ }
48
+
49
+ export const Menu: Story = {
50
+ render: ({ position }: Position) => (
41
51
  <div style={{ display: 'flex', justifyContent: 'center' }}>
42
52
  <Popover
43
53
  position={position}
@@ -71,4 +81,4 @@ export const Menu = {
71
81
  </Popover>
72
82
  </div>
73
83
  ),
74
- }
84
+ } as unknown as Story
@@ -1,3 +1,4 @@
1
+ import type { StoryObj } from '@storybook/react'
1
2
  import React from 'react'
2
3
  import { PopoverMenu, PopoverMenuOption } from '../atoms/Popover'
3
4
 
@@ -30,7 +31,11 @@ const meta = {
30
31
  docs: {
31
32
  description: {
32
33
  component:
33
- '<h2>Usage guidelines</h2><p>A Popover component is a layer that appears above all other content on the page. Only one popover can appear at a time and can contain varying text and interactive elements.</p><ul><li>Use when you need to display additional details for specific elements on a page.</li></ul>',
34
+ '<h2>Usage guidelines</h2>' +
35
+ '<p>A Popover component is a layer that appears above all other content on the page. Only one popover can appear at a time and can contain varying text and interactive elements.</p>' +
36
+ '<ul>' +
37
+ ' <li>Use when you need to display additional details for specific elements on a page.</li>' +
38
+ '</ul>',
34
39
  },
35
40
  },
36
41
  figmaPrimaryDesign,
@@ -38,8 +43,9 @@ const meta = {
38
43
  }
39
44
 
40
45
  export default meta
46
+ type Story = StoryObj<typeof meta>
41
47
 
42
- export const Menu = {
48
+ export const Menu: Story = {
43
49
  render: () => (
44
50
  <PopoverMenu>
45
51
  <PopoverMenuOption active href="#" variant="primary" title="Profile" />
@@ -47,4 +53,4 @@ export const Menu = {
47
53
  <PopoverMenuOption disabled href="#" variant="primary" title="Logout" />
48
54
  </PopoverMenu>
49
55
  ),
50
- }
56
+ } as unknown as Story
@@ -15,7 +15,12 @@ const meta = {
15
15
  docs: {
16
16
  description: {
17
17
  component:
18
- '<h2>Usage guidelines</h2><p>Radio group component allows a user to select only one value from several options. Radio options should not be too many because all the options are default visible to a user so that the user can make the selection via comparison.</p><ul><li>Always label radio groups</li><li>Radio buttons and checkboxes are not interchangeable.</li></ul>',
18
+ '<h2>Usage guidelines</h2>' +
19
+ '<p>Radio group component allows a user to select only one value from several options. Radio options should not be too many because all the options are default visible to a user so that the user can make the selection via comparison.</p>' +
20
+ '<ul>' +
21
+ ' <li>Always label radio groups</li>' +
22
+ ' <li>Radio buttons and checkboxes are not interchangeable.</li>' +
23
+ '</ul>',
19
24
  },
20
25
  },
21
26
  figmaPrimaryDesign,
@@ -8,7 +8,16 @@ const meta = {
8
8
  docs: {
9
9
  description: {
10
10
  component:
11
- '<h2>Usage guidelines</h2><p>Use the select component inside a form where users are selecting from a list of options and submitting data.</p><ul><li>Include a label</li><li>Keep menu items concise</li><li>Mark the minority of pickers in a form as required or optional</li><li>Use help text to show context</li><li>Switch help text with error text</li><li>Write error text that shows a solution</li></ul>',
11
+ '<h2>Usage guidelines</h2>' +
12
+ '<p>Use the select component inside a form where users are selecting from a list of options and submitting data.</p>' +
13
+ '<ul>' +
14
+ ' <li>Include a label</li>' +
15
+ ' <li>Keep menu items concise</li>' +
16
+ ' <li>Mark the minority of pickers in a form as required or optional</li>' +
17
+ ' <li>Use help text to show context</li>' +
18
+ ' <li>Switch help text with error text</li>' +
19
+ ' <li>Write error text that shows a solution</li>' +
20
+ '</ul>',
12
21
  },
13
22
  },
14
23
  },
@@ -8,7 +8,8 @@ const meta = {
8
8
  docs: {
9
9
  description: {
10
10
  component:
11
- '<h2>Usage guidelines</h2><p>Switch component is a control that is used to quickly switch between two possible states. The difference between Switch component and Checkbox component is that Switch will trigger a state change directly when you toggle it, while Checkbox is generally used for state marking, which should work in conjunction with submit operation.</p>',
11
+ '<h2>Usage guidelines</h2>' +
12
+ '<p>Switch component is a control that is used to quickly switch between two possible states. The difference between Switch component and Checkbox component is that Switch will trigger a state change directly when you toggle it, while Checkbox is generally used for state marking, which should work in conjunction with submit operation.</p>',
12
13
  },
13
14
  },
14
15
  },
@@ -1,3 +1,4 @@
1
+ import type { StoryObj } from '@storybook/react'
1
2
  import { TabLink, TabMenu } from '../atoms/TabMenu'
2
3
 
3
4
  const figmaPrimaryDesign = {
@@ -14,7 +15,11 @@ const meta = {
14
15
  docs: {
15
16
  description: {
16
17
  component:
17
- '<h2>Usage guidelines</h2><p>The TabMenu component can be used as an extra navigational hierarchy complementing the main navbar.</p><ul><li>Use concise & descriptive titles in order to ensure simplicity</li></ul>',
18
+ '<h2>Usage guidelines</h2>' +
19
+ '<p>The TabMenu component can be used as an extra navigational hierarchy complementing the main navbar.</p>' +
20
+ '<ul>' +
21
+ ' <li>Use concise & descriptive titles in order to ensure simplicity</li>' +
22
+ '</ul>',
18
23
  },
19
24
  },
20
25
  figmaPrimaryDesign,
@@ -40,8 +45,9 @@ const meta = {
40
45
  }
41
46
 
42
47
  export default meta
48
+ type Story = StoryObj<typeof meta>
43
49
 
44
- export const Tabs = {
50
+ export const Tabs: Story = {
45
51
  render: () => (
46
52
  <TabMenu>
47
53
  <TabLink title="Videogames" href="some-link" />
@@ -8,7 +8,15 @@ const meta = {
8
8
  docs: {
9
9
  description: {
10
10
  component:
11
- '<h2>Usage guidelines</h2><p>A text area component lets a user input a longer amount of text than a standard text field.</p><ul><li>Include a label</li><li>Mark the minority of text areas in a form as required or optional</li><li>Because text areas are typically taller and wider than other components, it’s important to include the background of the field in order to help a user know where to click or tap to start entering text</li><li>Use help text to show hints, formatting, and requirements</li><li>Switch help text with error text</li><li>Write error text that shows a solution</li></ul>',
11
+ '<h2>Usage guidelines</h2>' +
12
+ '<p>A text area component lets a user input a longer amount of text than a standard text field.</p>' +
13
+ '<ul>' +
14
+ ' <li>Include a label</li><li>Mark the minority of text areas in a form as required or optional</li>' +
15
+ ' <li>Because text areas are typically taller and wider than other components, it’s important to include the background of the field in order to help a user know where to click or tap to start entering text</li>' +
16
+ ' <li>Use help text to show hints, formatting, and requirements</li>' +
17
+ ' <li>Switch help text with error text</li>' +
18
+ ' <li>Write error text that shows a solution</li>' +
19
+ '</ul>',
12
20
  },
13
21
  },
14
22
  },
@@ -1,3 +1,4 @@
1
+ import type { StoryObj } from '@storybook/react'
1
2
  import React from 'react'
2
3
  import { Typography as TypographyExamples } from '../examples/Typography'
3
4
 
@@ -15,8 +16,9 @@ const meta = {
15
16
  }
16
17
 
17
18
  export default meta
19
+ type Story = StoryObj<typeof meta>
18
20
 
19
- export const Typography = {
21
+ export const Typography: Story = {
20
22
  render: () => (
21
23
  <div
22
24
  style={{
package/tsconfig.json CHANGED
@@ -26,11 +26,12 @@
26
26
  "**/*.tsx",
27
27
  ".next/types/**/*.ts",
28
28
  "src/stories/Typography.stories.mdx",
29
- "src/stories/CardsTable.stories.js",
30
- "src/stories/Card.stories.js",
31
- "src/stories/Menu.stories.js",
32
- "src/stories/EmptyState.stories.js",
33
- "src/stories/CheckableTag.stories.js",
29
+ "src/stories/CardsTable.stories.tsx",
30
+ "src/stories/Modal.stories.tsx",
31
+ "src/stories/Card.stories.tsx",
32
+ "src/stories/Menu.stories.tsx",
33
+ "src/stories/EmptyState.stories.tsx",
34
+ "src/stories/CheckableTag.stories.tsx",
34
35
  "src/stories/RadioGroup.stories"
35
36
  ],
36
37
  "exclude": ["node_modules"]