agroptima-design-system 0.30.0 → 0.30.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agroptima-design-system",
3
- "version": "0.30.0",
3
+ "version": "0.30.1",
4
4
  "scripts": {
5
5
  "dev": "npm run storybook",
6
6
  "storybook": "storybook dev -p 6006 --ci",
@@ -4,6 +4,14 @@ import { Alert } from '../atoms/Alert'
4
4
  const meta = {
5
5
  title: 'Design System/Atoms/Alert',
6
6
  component: Alert,
7
+ parameters: {
8
+ docs: {
9
+ description: {
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>",
12
+ },
13
+ },
14
+ },
7
15
  tags: ['autodocs'],
8
16
  argTypes: {
9
17
  id: {
@@ -4,6 +4,14 @@ import { Badge } from '../atoms/Badge'
4
4
  const meta = {
5
5
  title: 'Design System/Atoms/Badge',
6
6
  component: Badge,
7
+ parameters: {
8
+ docs: {
9
+ description: {
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>',
12
+ },
13
+ },
14
+ },
7
15
  tags: ['autodocs'],
8
16
  argTypes: {
9
17
  variant: {
@@ -4,6 +4,14 @@ import { Button } from '../atoms/Button'
4
4
  const meta = {
5
5
  title: 'Design System/Atoms/Button',
6
6
  component: Button,
7
+ parameters: {
8
+ docs: {
9
+ description: {
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>',
12
+ },
13
+ },
14
+ },
7
15
  tags: ['autodocs'],
8
16
  args: {
9
17
  label: 'Button',
@@ -12,6 +12,15 @@ const figmaPrimaryDesign = {
12
12
  const meta = {
13
13
  title: 'Design System/Atoms/Card',
14
14
  component: Card,
15
+ parameters: {
16
+ docs: {
17
+ description: {
18
+ component:
19
+ '<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>',
20
+ },
21
+ },
22
+ figmaPrimaryDesign,
23
+ },
15
24
  tags: ['autodocs'],
16
25
  argTypes: {
17
26
  visible: {
@@ -46,7 +55,6 @@ const meta = {
46
55
  control: 'text',
47
56
  },
48
57
  },
49
- parameters: figmaPrimaryDesign,
50
58
  }
51
59
 
52
60
  export default meta
@@ -10,6 +10,15 @@ const figmaPrimaryDesign = {
10
10
  const meta = {
11
11
  title: 'Design System/Atoms/CardMenu',
12
12
  component: CardMenuOption,
13
+ parameters: {
14
+ docs: {
15
+ description: {
16
+ 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
+ },
19
+ },
20
+ figmaPrimaryDesign,
21
+ },
13
22
  tags: ['autodocs'],
14
23
  argTypes: {
15
24
  id: {
@@ -37,7 +46,6 @@ const meta = {
37
46
  description: 'Is the component marked as error?',
38
47
  },
39
48
  },
40
- parameters: figmaPrimaryDesign,
41
49
  }
42
50
 
43
51
  export default meta
@@ -1,7 +1,6 @@
1
1
  import React from 'react'
2
2
  import { Badge } from '../atoms/Badge'
3
3
  import { IconButton } from '../atoms/Button'
4
- import { Button } from '../atoms/Button'
5
4
  import {
6
5
  CardsTable,
7
6
  CardsTableBody,
@@ -24,13 +23,21 @@ const meta = {
24
23
  title: 'Design System/Atoms/CardsTable',
25
24
  component: CardsTable,
26
25
  tags: ['autodocs'],
27
- parameters: figmaPrimaryDesign,
28
- argTypes: {
29
- variant: {
30
- description: 'Select variant used',
26
+ parameters: {
27
+ docs: {
28
+ description: {
29
+ 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>',
31
+ },
31
32
  },
32
- withTitle: {
33
- description: 'Add style to first column',
33
+ figmaPrimaryDesign,
34
+ argTypes: {
35
+ variant: {
36
+ description: 'Select variant used',
37
+ },
38
+ withTitle: {
39
+ description: 'Add style to first column',
40
+ },
34
41
  },
35
42
  },
36
43
  }
@@ -56,8 +63,8 @@ export const Primary = {
56
63
  </CardsTableHeader>
57
64
  <CardsTableHeader>Company address</CardsTableHeader>
58
65
  <CardsTableHeader>Customer service email</CardsTableHeader>
59
- <CardsTableHeader>Price</CardsTableHeader>
60
66
  <CardsTableHeader>State</CardsTableHeader>
67
+ <CardsTableHeader>Price</CardsTableHeader>
61
68
  <CardsTableHeader actions>Actions</CardsTableHeader>
62
69
  </CardsTableRow>
63
70
  </CardsTableHead>
@@ -82,7 +89,6 @@ export const Primary = {
82
89
  Tokyo, 104-0061 Japan
83
90
  </CardsTableCell>
84
91
  <CardsTableCell>konami@fakemail.com</CardsTableCell>
85
- <CardsTableCell>Not available</CardsTableCell>
86
92
  <CardsTableCell floatingLeftMobile>
87
93
  <Badge
88
94
  accessibilityLabel="Game is bought"
@@ -90,6 +96,7 @@ export const Primary = {
90
96
  variant="success-outlined"
91
97
  />
92
98
  </CardsTableCell>
99
+ <CardsTableCell>Not available</CardsTableCell>
93
100
  <CardsTableCell actions>
94
101
  <IconButton
95
102
  icon="Edit"
@@ -128,7 +135,6 @@ export const Primary = {
128
135
  CD PROJEKT S.A. ul. Jagiellońska 74 03-301 Warszawa Poland
129
136
  </CardsTableCell>
130
137
  <CardsTableCell>cdprojekt@fakemail.com</CardsTableCell>
131
- <CardsTableCell align="right">19,99 €</CardsTableCell>
132
138
  <CardsTableCell floatingLeftMobile>
133
139
  <Badge
134
140
  accessibilityLabel="Game is booked"
@@ -136,6 +142,7 @@ export const Primary = {
136
142
  variant="info-outlined"
137
143
  />
138
144
  </CardsTableCell>
145
+ <CardsTableCell align="right">19,99 €</CardsTableCell>
139
146
  <CardsTableCell actions>
140
147
  <IconButton
141
148
  icon="Edit"
@@ -165,7 +172,6 @@ export const Primary = {
165
172
  135-0034, Japan
166
173
  </CardsTableCell>
167
174
  <CardsTableCell>namco@fakemail.com</CardsTableCell>
168
- <CardsTableCell align="right">79,99 €</CardsTableCell>
169
175
  <CardsTableCell floatingLeftMobile>
170
176
  <Badge
171
177
  accessibilityLabel="Game is discontinued"
@@ -173,6 +179,7 @@ export const Primary = {
173
179
  variant="warning-outlined"
174
180
  />
175
181
  </CardsTableCell>
182
+ <CardsTableCell align="right">79,99 €</CardsTableCell>
176
183
  <CardsTableCell actions>
177
184
  <IconButton
178
185
  icon="Edit"
@@ -196,7 +203,6 @@ export const Primary = {
196
203
  Tokyo, 104-0061 Japan
197
204
  </CardsTableCell>
198
205
  <CardsTableCell>konami@fakemail.com</CardsTableCell>
199
- <CardsTableCell align="right">6,99 €</CardsTableCell>
200
206
  <CardsTableCell floatingLeftMobile>
201
207
  <Badge
202
208
  accessibilityLabel="Game is bought"
@@ -204,6 +210,7 @@ export const Primary = {
204
210
  variant="success-outlined"
205
211
  />
206
212
  </CardsTableCell>
213
+ <CardsTableCell align="right">6,99 €</CardsTableCell>
207
214
  <CardsTableCell actions>
208
215
  <Popover
209
216
  position="center"
@@ -256,9 +263,6 @@ export const Primary = {
256
263
  Tokyo, 104-0061 Japan
257
264
  </CardsTableCell>
258
265
  <CardsTableCell>konami@fakemail.com</CardsTableCell>
259
- <CardsTableCell align="right" floatingRightMobile>
260
- 6,99 €
261
- </CardsTableCell>
262
266
  <CardsTableCell floatingLeftMobile>
263
267
  <Badge
264
268
  accessibilityLabel="Game is wishlisted"
@@ -266,6 +270,9 @@ export const Primary = {
266
270
  variant="neutral-outlined"
267
271
  />
268
272
  </CardsTableCell>
273
+ <CardsTableCell align="right" floatingRightMobile>
274
+ 6,99 €
275
+ </CardsTableCell>
269
276
  <CardsTableCell actions>
270
277
  <IconButton
271
278
  icon="Edit"
@@ -337,9 +344,9 @@ export const MultipleBadges = {
337
344
  </CardsTableHeader>
338
345
  <CardsTableHeader>Company address</CardsTableHeader>
339
346
  <CardsTableHeader>Customer service email</CardsTableHeader>
340
- <CardsTableHeader>Price</CardsTableHeader>
341
347
  <CardsTableHeader>State</CardsTableHeader>
342
348
  <CardsTableHeader>Genre</CardsTableHeader>
349
+ <CardsTableHeader>Price</CardsTableHeader>
343
350
  <CardsTableHeader actions>Actions</CardsTableHeader>
344
351
  </CardsTableRow>
345
352
  </CardsTableHead>
@@ -364,9 +371,6 @@ export const MultipleBadges = {
364
371
  Tokyo, 104-0061 Japan
365
372
  </CardsTableCell>
366
373
  <CardsTableCell>konami@fakemail.com</CardsTableCell>
367
- <CardsTableCell align="right" floatingRightMobile noWrap>
368
- 6,99 €
369
- </CardsTableCell>
370
374
  <CardsTableCell floatingLeftMobile>
371
375
  <Badge
372
376
  accessibilityLabel="Game is bought"
@@ -381,6 +385,9 @@ export const MultipleBadges = {
381
385
  variant="neutral-outlined"
382
386
  />
383
387
  </CardsTableCell>
388
+ <CardsTableCell align="right" floatingRightMobile noWrap>
389
+ 6,99 €
390
+ </CardsTableCell>
384
391
  <CardsTableCell actions>
385
392
  <IconButton
386
393
  icon="Edit"
@@ -4,6 +4,10 @@ import { Meta } from "@storybook/blocks";
4
4
 
5
5
  # Changelog
6
6
 
7
+ ## 0.30.1
8
+
9
+ * Add components documentation
10
+
7
11
  ## 0.30.0
8
12
 
9
13
  * Add Switch component
@@ -28,7 +28,15 @@ const meta = {
28
28
  description: 'Callback triggered when clicking on an option',
29
29
  },
30
30
  },
31
- parameters: figmaPrimaryDesign,
31
+ parameters: {
32
+ docs: {
33
+ description: {
34
+ 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
+ },
37
+ },
38
+ figmaPrimaryDesign,
39
+ },
32
40
  }
33
41
 
34
42
  export default meta
@@ -4,6 +4,14 @@ import { Checkbox } from '../atoms/Checkbox'
4
4
  const meta = {
5
5
  title: 'Design System/Atoms/Checkbox',
6
6
  component: Checkbox,
7
+ parameters: {
8
+ docs: {
9
+ description: {
10
+ component:
11
+ "<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
+ },
13
+ },
14
+ },
7
15
  tags: ['autodocs'],
8
16
  argTypes: {
9
17
  accessibilityLabel: {
@@ -32,7 +32,15 @@ const meta = {
32
32
  description: 'Is the component disabled?',
33
33
  },
34
34
  },
35
- parameters: figmaPrimaryDesign,
35
+ parameters: {
36
+ docs: {
37
+ description: {
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>',
40
+ },
41
+ },
42
+ figmaPrimaryDesign,
43
+ },
36
44
  }
37
45
 
38
46
  export default meta
@@ -57,7 +65,7 @@ export const Primary = {
57
65
  id="email_input"
58
66
  label="Email"
59
67
  name="email"
60
- placeholder="Email..."
68
+ placeholder="janedoe@mail.com"
61
69
  type="email"
62
70
  variant="primary"
63
71
  />
@@ -111,7 +119,7 @@ export const PrimaryOpened = {
111
119
  id="email_input"
112
120
  label="Email"
113
121
  name="email"
114
- placeholder="Email..."
122
+ placeholder="janedoe@mail.com"
115
123
  type="email"
116
124
  variant="primary"
117
125
  />
@@ -177,7 +185,7 @@ export const PrimaryDisabled = {
177
185
  id="email_input"
178
186
  label="Email"
179
187
  name="email"
180
- placeholder="Email..."
188
+ placeholder="janedoe@mail.com"
181
189
  type="email"
182
190
  variant="primary"
183
191
  />
@@ -4,6 +4,14 @@ import { DateRangePicker } from '../atoms/DatePicker/DateRangePicker'
4
4
  const meta = {
5
5
  title: 'Design System/Atoms/DateRangePicker',
6
6
  component: DateRangePicker,
7
+ parameters: {
8
+ docs: {
9
+ description: {
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.</p>',
12
+ },
13
+ },
14
+ },
7
15
  tags: ['autodocs'],
8
16
  argTypes: {
9
17
  footer: {
@@ -4,6 +4,14 @@ import { Divider } from '../atoms/Divider'
4
4
  const meta = {
5
5
  title: 'Design System/Atoms/Divider',
6
6
  component: Divider,
7
+ parameters: {
8
+ docs: {
9
+ description: {
10
+ component:
11
+ '<h2>Usage guidelines</h2><p>A Divider component separates different content.</p><ul><li>Place a divider below a header</li></ul>',
12
+ },
13
+ },
14
+ },
7
15
  tags: ['autodocs'],
8
16
  argTypes: {
9
17
  title: {
@@ -28,7 +36,7 @@ type Story = StoryObj<typeof meta>
28
36
 
29
37
  export const Primary: Story = {
30
38
  args: {
31
- title: '19/01/2025 - Delivery Note',
39
+ title: '19/01/2025 - My gaming diary',
32
40
  variant: 'primary',
33
41
  },
34
42
  parameters: figmaPrimaryDesign,
@@ -36,7 +44,7 @@ export const Primary: Story = {
36
44
 
37
45
  export const WithIcon: Story = {
38
46
  args: {
39
- title: '19/01/2025 - Delivery Note',
47
+ title: '19/01/2025 - My gaming diary',
40
48
  icon: 'DeliveryNote',
41
49
  variant: 'primary',
42
50
  },
@@ -29,7 +29,15 @@ const meta = {
29
29
  description: 'Array of button to be shown on the footer',
30
30
  },
31
31
  },
32
- parameters: figmaPrimaryDesign,
32
+ parameters: {
33
+ docs: {
34
+ description: {
35
+ 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
+ },
38
+ },
39
+ figmaPrimaryDesign,
40
+ },
33
41
  }
34
42
 
35
43
  export default meta
@@ -20,7 +20,15 @@ const meta = {
20
20
  description: 'Variant used.',
21
21
  },
22
22
  },
23
- parameters: figmaPrimaryDesign,
23
+ parameters: {
24
+ docs: {
25
+ description: {
26
+ 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
+ },
29
+ },
30
+ figmaPrimaryDesign,
31
+ },
24
32
  }
25
33
 
26
34
  export default meta
@@ -4,6 +4,14 @@ import { FloatingButton } from '../atoms/Button'
4
4
  const meta = {
5
5
  title: 'Design System/Atoms/FloatingButton',
6
6
  component: FloatingButton,
7
+ parameters: {
8
+ docs: {
9
+ description: {
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>",
12
+ },
13
+ },
14
+ },
7
15
  tags: ['autodocs'],
8
16
  argTypes: {
9
17
  accessibilityLabel: {
@@ -5,6 +5,14 @@ import { Input } from '../atoms/Input'
5
5
  const meta = {
6
6
  title: 'Design System/Atoms/Form',
7
7
  component: Form,
8
+ parameters: {
9
+ docs: {
10
+ description: {
11
+ 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>',
13
+ },
14
+ },
15
+ },
8
16
  tags: ['autodocs'],
9
17
  argTypes: {
10
18
  fullWidth: {
@@ -4,6 +4,14 @@ import { IconButton } from '../atoms/Button'
4
4
  const meta = {
5
5
  title: 'Design System/Atoms/IconButton',
6
6
  component: IconButton,
7
+ parameters: {
8
+ docs: {
9
+ description: {
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>',
12
+ },
13
+ },
14
+ },
7
15
  tags: ['autodocs'],
8
16
  argTypes: {
9
17
  accessibilityLabel: {
@@ -4,6 +4,14 @@ import { Input } from '../atoms/Input'
4
4
  const meta = {
5
5
  title: 'Design System/Atoms/Input',
6
6
  component: Input,
7
+ parameters: {
8
+ docs: {
9
+ description: {
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>',
12
+ },
13
+ },
14
+ },
7
15
  tags: ['autodocs'],
8
16
  argTypes: {
9
17
  label: {
@@ -61,7 +69,7 @@ export const Primary: Story = {
61
69
  args: {
62
70
  label: 'Email',
63
71
  accessibilityLabel: 'Fill the form email',
64
- placeholder: 'Email...',
72
+ placeholder: 'janedoe@mail.com',
65
73
  variant: 'primary',
66
74
  disabled: false,
67
75
  helpText: 'This text can help you',
@@ -75,7 +83,7 @@ export const Primary: Story = {
75
83
  export const Password: Story = {
76
84
  args: {
77
85
  label: 'Password',
78
- placeholder: 'Password...',
86
+ placeholder: 'Password123',
79
87
  variant: 'primary',
80
88
  disabled: false,
81
89
  helpText: 'This text can help you',
@@ -102,7 +110,7 @@ export const WithErrors: Story = {
102
110
  args: {
103
111
  label: 'Email',
104
112
  accessibilityLabel: 'Fill the form email',
105
- placeholder: 'Email...',
113
+ placeholder: 'janedoe@mail.com',
106
114
  variant: 'primary',
107
115
  disabled: false,
108
116
  helpText: 'This text can help you',
@@ -11,6 +11,15 @@ const figmaPrimaryDesign = {
11
11
  const meta = {
12
12
  title: 'Design System/Atoms/Menu',
13
13
  component: Menu,
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ 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
+ },
20
+ },
21
+ figmaPrimaryDesign,
22
+ },
14
23
  tags: ['autodocs'],
15
24
  argTypes: {
16
25
  icon: {
@@ -32,7 +41,6 @@ const meta = {
32
41
  description: 'Is the dropdown open?',
33
42
  },
34
43
  },
35
- parameters: figmaPrimaryDesign,
36
44
  }
37
45
 
38
46
  export default meta
@@ -26,6 +26,15 @@ const figmaPrimaryDesign = {
26
26
  const meta = {
27
27
  title: 'Design System/Atoms/Modal',
28
28
  component: Modal,
29
+ parameters: {
30
+ docs: {
31
+ description: {
32
+ component:
33
+ "<h2>Usage guidelines</h2><p>Modal component is used when requiring users to interact with the application, but without jumping to a new page and interrupting the user's workflow. It creates a new floating layer over the current page to get user feedback or display information.</p><ul><li>Require a response from the user</li><li>Notify the user of any related information</li><li>Confirm a user decision</li></ul>",
34
+ },
35
+ },
36
+ figmaPrimaryDesign,
37
+ },
29
38
  tags: ['autodocs'],
30
39
  argTypes: {
31
40
  id: {
@@ -47,7 +56,6 @@ const meta = {
47
56
  description: 'Function to be called when the modal is closed',
48
57
  },
49
58
  },
50
- parameters: figmaPrimaryDesign,
51
59
  }
52
60
 
53
61
  export default meta
@@ -4,6 +4,14 @@ import { Multiselect } from '../atoms/Multiselect'
4
4
  const meta = {
5
5
  title: 'Design System/Atoms/Multiselect',
6
6
  component: Multiselect,
7
+ parameters: {
8
+ docs: {
9
+ description: {
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>',
12
+ },
13
+ },
14
+ },
7
15
  tags: ['autodocs'],
8
16
  argTypes: {
9
17
  label: {
@@ -40,7 +40,15 @@ const meta = {
40
40
  description: 'PageNumber label',
41
41
  },
42
42
  },
43
- parameters: figmaPrimaryDesign,
43
+ parameters: {
44
+ docs: {
45
+ description: {
46
+ 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>',
48
+ },
49
+ },
50
+ figmaPrimaryDesign,
51
+ },
44
52
  }
45
53
 
46
54
  export default meta
@@ -23,7 +23,15 @@ const meta = {
23
23
  control: { type: 'select' },
24
24
  },
25
25
  },
26
- parameters: figmaPrimaryDesign,
26
+ parameters: {
27
+ docs: {
28
+ description: {
29
+ 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
+ },
32
+ },
33
+ figmaPrimaryDesign,
34
+ },
27
35
  }
28
36
 
29
37
  export default meta
@@ -26,7 +26,15 @@ const meta = {
26
26
  description: 'Is the component active?',
27
27
  },
28
28
  },
29
- parameters: figmaPrimaryDesign,
29
+ parameters: {
30
+ docs: {
31
+ description: {
32
+ 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
+ },
35
+ },
36
+ figmaPrimaryDesign,
37
+ },
30
38
  }
31
39
 
32
40
  export default meta
@@ -4,6 +4,14 @@ import { QuantitySelector } from '../atoms/QuantitySelector'
4
4
  const meta = {
5
5
  title: 'Design System/Atoms/QuantitySelector',
6
6
  component: QuantitySelector,
7
+ parameters: {
8
+ docs: {
9
+ description: {
10
+ component:
11
+ '<h2>Usage guidelines</h2><p>Quantity Selector component is similar to text inputs, but is used to specify only a numeric value. Quantity Selector incrementally increase or decrease the value with a two-segment control.</p>',
12
+ },
13
+ },
14
+ },
7
15
  tags: ['autodocs'],
8
16
  argTypes: {
9
17
  label: {
@@ -10,6 +10,15 @@ const figmaPrimaryDesign = {
10
10
  const meta = {
11
11
  title: 'Design System/Atoms/RadioButton',
12
12
  component: RadioButton,
13
+ parameters: {
14
+ docs: {
15
+ description: {
16
+ component:
17
+ '<h2>Usage guidelines</h2><p>Radio button 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
+ },
19
+ },
20
+ figmaPrimaryDesign,
21
+ },
13
22
  tags: ['autodocs'],
14
23
  argTypes: {
15
24
  accessibilityLabel: {
@@ -31,7 +40,6 @@ const meta = {
31
40
  description: 'Value needed for the label relation',
32
41
  },
33
42
  },
34
- parameters: figmaPrimaryDesign,
35
43
  }
36
44
 
37
45
  export default meta
@@ -4,6 +4,14 @@ import { Select } from '../atoms/Select'
4
4
  const meta = {
5
5
  title: 'Design System/Atoms/Select',
6
6
  component: Select,
7
+ parameters: {
8
+ docs: {
9
+ description: {
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>',
12
+ },
13
+ },
14
+ },
7
15
  tags: ['autodocs'],
8
16
  argTypes: {
9
17
  label: {
@@ -4,6 +4,14 @@ import { Switch } from '../atoms/Switch'
4
4
  const meta = {
5
5
  title: 'Design System/Atoms/Switch',
6
6
  component: Switch,
7
+ parameters: {
8
+ docs: {
9
+ description: {
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>',
12
+ },
13
+ },
14
+ },
7
15
  tags: ['autodocs'],
8
16
  argTypes: {
9
17
  accessibilityLabel: {
@@ -4,6 +4,14 @@ import { TextArea } from '../atoms/TextArea'
4
4
  const meta = {
5
5
  title: 'Design System/Atoms/Textarea',
6
6
  component: TextArea,
7
+ parameters: {
8
+ docs: {
9
+ description: {
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>',
12
+ },
13
+ },
14
+ },
7
15
  tags: ['autodocs'],
8
16
  argTypes: {
9
17
  label: {
@@ -62,7 +62,7 @@ describe('Input', () => {
62
62
  id="email_input"
63
63
  label="Email"
64
64
  name="email"
65
- placeholder="Email..."
65
+ placeholder="janedoe@mail.com"
66
66
  type="email"
67
67
  variant="primary"
68
68
  />,