agroptima-design-system 0.27.13 → 0.27.14

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.27.13",
3
+ "version": "0.27.14",
4
4
  "scripts": {
5
5
  "dev": "npm run storybook",
6
6
  "storybook": "storybook dev -p 6006 --ci",
@@ -39,9 +39,10 @@ export function Badge({
39
39
  className={cssClasses}
40
40
  role="status"
41
41
  aria-label={accessibilityLabel}
42
+ title={icon && accessibilityLabel}
42
43
  {...props}
43
44
  >
44
- {text || (icon && <Icon name={icon} />)}
45
+ {text || (icon && <Icon name={icon} title={accessibilityLabel} />)}
45
46
  </span>
46
47
  )
47
48
  }
@@ -4,165 +4,166 @@ import { Meta } from "@storybook/blocks";
4
4
 
5
5
  # Changelog
6
6
 
7
- # 0.27.13
7
+ ## 0.27.14
8
8
 
9
- * Add Electronic Invoice icon
9
+ * Add `title` to icon on Badge component.
10
10
 
11
+ ## 0.27.13
11
12
 
12
- # 0.27.11
13
+ * Add Electronic Invoice icon.
14
+
15
+ ## 0.27.11
13
16
 
14
17
  * Fix Badge with icon position on CardsTable component.
15
18
 
16
- # 0.27.10
19
+ ## 0.27.10
17
20
 
18
- * Add Popover component to show and hide PopoverMenu component
19
- * Add size prop to Icon and IconButton component
21
+ * Add Popover component to show and hide PopoverMenu component.
22
+ * Add `size` prop to Icon and IconButton component.
20
23
 
21
- # 0.27.9
24
+ ## 0.27.9
22
25
 
23
26
  * Add `icon` property and neutral, neutral-outlined variants to Badge component.
24
- * Replace DeliveryNote icon
25
- * Add ReturnDeliveryNote icon
27
+ * Replace DeliveryNote icon.
28
+ * Add ReturnDeliveryNote icon.
26
29
 
27
- # 0.27.8
30
+ ## 0.27.8
28
31
 
29
- * Add indeterminate property and related styles to Checkbox component
32
+ * Add `indeterminate` property and related styles to Checkbox component.
30
33
 
31
- # 0.27.6
34
+ ## 0.27.6
32
35
 
33
- * Add AlertContainer component
34
- * Add fadeOut prop to Alert component
36
+ * Add AlertContainer component.
37
+ * Add `fadeOut` prop to Alert component.
35
38
 
36
- # 0.27.5
39
+ ## 0.27.5
37
40
 
38
- * Add required hint to Select component
41
+ * Add required hint to Select component.
39
42
 
40
- # 0.27.3
43
+ ## 0.27.3
41
44
 
42
- * Update dependencies
43
- * Add SubmitButton component
45
+ * Update dependencies.
46
+ * Add SubmitButton component.
44
47
 
45
- # 0.27.2
48
+ ## 0.27.2
46
49
 
47
- * Add * to required input in Quantity component
50
+ * Add * to required input on Quantity component.
48
51
 
49
- # 0.27.1
52
+ ## 0.27.1
50
53
 
51
- * Update Card with href prop
54
+ * Update Card with `href` prop.
52
55
 
53
- # 0.27.0
56
+ ## 0.27.0
54
57
 
55
58
  * Add RadioButton component.
56
59
  * Add `vertically` prop to CardsTable component in order to display the data vertically both on desktop and mobile.
57
60
  * Add `singleLine` prop to DetailItem component in order to display the data on a single line.
58
61
 
59
- # 0.26.10
62
+ ## 0.26.10
60
63
 
61
- * Add required property for input
64
+ * Add `required` property for input.
62
65
 
63
- # 0.26.9
66
+ ## 0.26.9
64
67
 
65
- * Update Checkbox component to use input and not span
68
+ * Update Checkbox component to use input instead of span.
66
69
 
67
70
  BREAKING CHANGES
68
71
 
69
- * Checkbox component make label mandatory and accessibilityLabel optional
72
+ * `label` changed to required and `accessibilityLabel` to optional on Checkbox component.
70
73
 
71
- # 0.26.8
74
+ ## 0.26.8
72
75
 
73
- * Set check value in CheckableTag
76
+ * Set `checked` value on CheckableTag component.
74
77
 
75
- # 0.26.7
78
+ ## 0.26.7
76
79
 
77
- * Fix Collapsible header padding-bottom.
80
+ * Fix `padding-bottom` on Collapsible header component.
78
81
 
79
- # 0.26.6
82
+ ## 0.26.6
80
83
 
81
84
  * Add property `form` to Collapsible component.
82
85
 
83
- # 0.26.5
86
+ ## 0.26.5
84
87
 
85
- * New Delivery icon
88
+ * Add Delivery icon.
86
89
 
87
- # 0.26.4
90
+ ## 0.26.4
88
91
 
89
- * Make title optional in DetailItem component.
90
- * Use title as a label in Collapsible component.
92
+ * `title` property changed to optional on DetailItem component.
93
+ * Use title as a label on Collapsible component.
91
94
 
92
- # 0.26.3
95
+ ## 0.26.3
93
96
 
94
97
  * Specify "Show/Hide password" button type on Input component.
95
98
 
96
- # 0.26.2
99
+ ## 0.26.2
97
100
 
98
- * Fix import scss button
101
+ * Fix import scss button.
99
102
 
100
- # 0.26.1
103
+ ## 0.26.1
101
104
 
102
- * Fix Mixed Declarations in scss files
105
+ * Fix Mixed Declarations in scss files.
103
106
 
104
- # 0.26.0
107
+ ## 0.26.0
105
108
 
106
109
  * Add CheckableTag & CheckableTagGroup components.
107
110
  * Add Filter icon.
108
111
  * Add Dot option to Badge component.
109
112
  * Add Drawer component.
110
113
 
111
- # 0.25.8
112
-
113
- * Remove focus style for file Input component
114
- * Download and Upload icons
115
- * Add visible prop to buttons
114
+ ## 0.25.8
116
115
 
117
- # 0.25.7
116
+ * Remove focus style from file Input component.
117
+ * Add Download and Upload icons.
118
+ * Add `visible` prop to Button components.
118
119
 
119
- * Add styles for file Input component
120
+ ## 0.25.7
120
121
 
121
- # 0.25.6
122
+ * Add styles for file Input component.
122
123
 
123
- * Align Form Action buttons horizontally
124
+ ## 0.25.6
124
125
 
125
- # 0.25.5
126
+ * Align Form Action buttons horizontally.
126
127
 
127
- * Call onChange after clearing Select and Multiselect components
128
+ ## 0.25.5
128
129
 
130
+ * Call onChange after clearing Select and Multiselect components.
129
131
 
130
- # 0.25.3
132
+ ## 0.25.3
131
133
 
132
- * Add clear button to Select commponent
133
- * Add clear button to Multiselect component
134
+ * Add clear button to Select commponent.
135
+ * Add clear button to Multiselect component.
134
136
 
135
- # 0.25.2
137
+ ## 0.25.2
136
138
 
137
- * Add onChange prop to Multiselect component
138
- * Add max height to Multiselect component
139
+ * Add `onChange` prop to Multiselect component.
140
+ * Add max height to Multiselect component.
139
141
 
140
- # 0.25.1
142
+ ## 0.25.1
141
143
 
142
- * Replace selected prop by defaultValue in Multiselect component
143
- * No wrap input suffix in Input component
144
+ * Replace `selected` prop by `defaultValue` on Multiselect component.
145
+ * No wrap input suffix on Input component.
144
146
 
145
- # 0.25.0
147
+ ## 0.25.0
146
148
 
147
149
  * Add PopoverMenu and PopoverMenuOption components.
148
150
  * Add UserMenu icon.
149
151
 
150
- # 0.24.5
152
+ ## 0.24.5
151
153
 
152
154
  * Add tests to all components.
153
155
 
154
- # 0.24.4
156
+ ## 0.24.4
155
157
 
156
158
  * Remove margin from Alert component.
157
159
 
158
- # 0.24.4
160
+ ## 0.24.4
159
161
 
160
162
  * Details Modal component height has been changed to 100%.
161
163
  * Details Modal component footer has been changed to fixed.
162
164
  * Collapsible component accepts a new property `noHorizontalPadding`.
163
165
 
164
-
165
- # 0.24.2
166
+ ## 0.24.2
166
167
 
167
168
  * Fix margin in Alert component.
168
169
  * Ensure 100% width on Modal content.
@@ -173,183 +174,184 @@ BREAKING CHANGES
173
174
  * Modal maximum width & mobile version properties have been updated.
174
175
  * IconButton has updated title value with `accessibilityLabel`.
175
176
 
176
- # 0.24.1
177
+ ## 0.24.1
177
178
 
178
- * PDF icon
179
+ * Add PDF icon.
179
180
 
180
- # 0.24.0
181
+ ## 0.24.0
181
182
 
182
183
  * Add Form and Actions components.
183
184
 
184
- # 0.23.0
185
+ ## 0.23.0
185
186
 
186
187
  * Add Details variant to Modal component.
187
188
  * Add DetailItem component.
188
189
  * On CardsTable component, align Badge correctly on mobile and fix Actions misalignment.
189
190
  * On Alert component, add margin.
190
191
 
191
- # 0.22.6
192
+ ## 0.22.6
192
193
 
193
- * Add property to IconButton component for set the visibility.
194
- * Fix table actions alignment in CardTable component.
194
+ * Add property to IconButton component for setting the visibility.
195
+ * Fix table actions alignment on CardTable component.
195
196
 
196
- # 0.22.5
197
+ ## 0.22.5
197
198
 
198
199
  * Add more actions to CardTable component.
199
- * Fix badge alignment in CardTable component.
200
+ * Fix badge alignment on CardTable component.
200
201
 
201
- # 0.22.4
202
+ ## 0.22.4
202
203
 
203
204
  BREAKING CHANGES
204
205
 
205
206
  * EmptyState text and button props have been removed and children elements can be passed to the component.
206
207
 
207
- # 0.22.3
208
+ ## 0.22.3
208
209
 
209
- * Add Delivery Note icon
210
+ * Add Delivery Note icon.
210
211
 
211
- # 0.22.2
212
+ ## 0.22.2
212
213
 
213
- * Add IconButton secondary variant
214
+ * Add IconButton secondary variant.
214
215
 
215
216
  ## 0.22.1
216
217
 
217
218
  * Add suffix to Input component
218
- * Update styles for Input, TextArea and QuantitySelector components
219
- * Update styles for action button in Alert components
219
+ * Update styles for Input, TextArea and QuantitySelector components.
220
+ * Update styles for action button on Alert components.
220
221
 
221
222
  ## 0.22.0
222
223
 
223
- * Add a max height to Select component
224
- * Center on top icon in Modal and Alert componets
224
+ * Add max height to Select component.
225
+ * Center on top icon on Modal and Alert components.
225
226
 
226
227
  BREAKING CHANGES
227
228
 
228
- * Replace selected prop by defaultValue in Select component
229
- * Change the way to put the classname in Input component
229
+ * Replace `selected` prop by `defaultValue` on Select component.
230
+ * Change the way to put the classname on Input component.
230
231
 
231
232
  ## 0.21.5
232
- * Update open state in Collapsible component
233
+ * Update open state in Collapsible component.
233
234
 
234
235
  ## 0.21.5
235
- * Update the way in which we import the source
236
- * Alignment correction in Cards and CardsTable components
237
- * Add css class helpers and common styles
236
+ * Update the way in which we import the source.
237
+ * Alignment correction in Cards and CardsTable components.
238
+ * Add css class helpers and common styles.
238
239
 
239
240
  ## 0.21.4
240
241
 
241
- * Add border top to CardMenuOption component for first element
242
- * Add margin top to second element row in CardsTable component
243
- * CardsTable needs to specify a withTitle property to add title to first column
242
+ * Add border top to CardMenuOption component for first element.
243
+ * Add margin top to second element row on CardsTable component
244
+ * CardsTable needs to specify a `withTitle` property to add a title to the first column.
244
245
 
245
246
  ## 0.21.3
246
247
 
247
- * Add display flex to IconButton component for centering the icon
248
- * Remove border bottom from CardMenuOption component when the next is active
249
- * Remove default MenuOption apparence in Safari
250
- * Add more space between modal content and actions
248
+ * Add display flex to IconButton component for centering the icon.
249
+ * Remove border bottom from CardMenuOption component when the next element is active.
250
+ * Remove default MenuOption styles on Safari.
251
+ * Add more space between modal content and actions.
251
252
 
252
253
  ## 0.21.2
253
254
 
254
- * Update Card with error state
255
- * Update styles for component CardMenuOption
256
- * Add width 100% for input date component in safari mobile
255
+ * Update Card with error state.
256
+ * Update styles for CardMenuOption component.
257
+ * Add input date component 100% width on Safari Mobile.
257
258
 
258
259
  ## 0.21.1
259
260
 
260
- * Create Typography examples page
261
+ * Create Typography examples page.
261
262
 
262
263
  ## 0.21.0
263
264
 
264
- * Update typography styles
265
+ * Update typography styles.
265
266
 
266
267
  ## 0.20.0
267
268
 
268
- * Update colors
269
- * Update Colors documentation with the final colors
270
- * Update Button Ghost & Outlined transparent background to white. On disabled case, background has been changed to neutral-color-50
269
+ * Update colors.
270
+ * Update Colors documentation with the final colors.
271
+ * Update Button Ghost & Outlined transparent background to white. On disabled case, background has been changed to neutral-color-50.
271
272
 
272
273
  ## 0.19.0
273
274
 
274
- * Add Pagination, Ellipsis, PaginationArrow and PaginationNumber components
275
- * Add explicit margin-bottom to Empty State button component
275
+ * Add Pagination, Ellipsis, PaginationArrow and PaginationNumber components.
276
+ * Add explicit margin-bottom to Empty State button component.
276
277
 
277
278
  ## 0.18.4 / 0.18.5
278
279
 
279
- * Add series icon
280
+ * Add series icon.
280
281
 
281
282
  ## 0.18.3
282
- * Update docs
283
+
284
+ * Update docs.
283
285
 
284
286
  ## 0.18.2
285
287
 
286
- * Add link to CardMenuOption component
287
- * Add active and error state to CardMenuOption component
288
- * Add active state to Card component
289
- * Update QuantitySelector component props
290
- * Add active and action state to CardsTableRow component
288
+ * Add link to CardMenuOption component.
289
+ * Add active and error state to CardMenuOption component.
290
+ * Add active state to Card component.
291
+ * Update QuantitySelector component props.
292
+ * Add active and action state to CardsTableRow component.
291
293
 
292
294
  ## 0.18.0
293
295
 
294
- * Added Collapsible component to Storybook
296
+ * Add Collapsible component to Storybook.
295
297
 
296
298
  ## 0.17.0
297
299
 
298
- * Added QuantitySelector component to Storybook
300
+ * Add QuantitySelector component to Storybook.
299
301
 
300
302
  ## 0.16.2
301
303
 
302
- * Fixed some icons missing ViewBox
304
+ * Fix some icons missing ViewBox.
303
305
 
304
306
  ## 0.16.1
305
307
 
306
- * Updated Oultined Button background color
307
- * Added new icons
308
- * Added fix to Alert component button
309
- * Fixed responsive glitch bug on CardsTable components
308
+ * Update Oultined Button background color.
309
+ * Add new icons.
310
+ * Add fix to Alert component button.
311
+ * Fix responsive glitch bug on CardsTable components.
310
312
 
311
313
  ## 0.16.0
312
314
 
313
- * Added new shape for FloatingButton component
315
+ * Add new shape for FloatingButton component.
314
316
 
315
317
  ## 0.15.0
316
318
 
317
- * Added FloatingButton component to Storybook
319
+ * Add FloatingButton component to Storybook.
318
320
 
319
321
  BREAKING CHANGES
320
322
 
321
- * All button components have been moved to a common folder
323
+ * All button components have been moved to a common folder.
322
324
 
323
325
  ## 0.14.1
324
326
 
325
- * Added MenuLink and MenuDropdown components to Storybook and remove MenuOption component.
327
+ * Add MenuLink and MenuDropdown components to Storybook and remove MenuOption component.
326
328
 
327
329
  ## 0.14.0
328
330
 
329
- * Added Menu component to Storybook.
331
+ * Add Menu component to Storybook.
330
332
 
331
333
  ## 0.13.0
332
334
 
333
- * Added CardMenuOption component to Storybook.
335
+ * Add CardMenuOption component to Storybook.
334
336
 
335
337
  ## 0.12.0
336
338
 
337
- * Card component is added to Storybook.
339
+ * Add Card component to Storybook.
338
340
 
339
341
  ## 0.11.1
340
342
 
341
343
  * Input and Checkbox components `id` prop now it's optional.
342
- * Fixed TextArea export component.
344
+ * Fix TextArea export component.
343
345
 
344
346
  ## 0.11.0
345
347
 
346
- * Added TextArea component to Storybook.
348
+ * Add TextArea component to Storybook.
347
349
  * Input, Checkbox and TextArea components `id` prop now is obtained from `id` or `name`.
348
350
 
349
351
  ## 0.10.0
350
352
 
351
353
  * Cards Table components now are responsive.
352
- * Added Link style to Typography.
354
+ * Add Link style to Typography.
353
355
 
354
356
  ## 0.9.3
355
357
 
@@ -366,31 +368,31 @@ BREAKING CHANGES
366
368
 
367
369
  ## 0.9.0
368
370
 
369
- * Alert component is added to Storybook.
371
+ * Add Alert component to Storybook.
370
372
 
371
373
  ## 0.8.0
372
374
 
373
- * Badge component is added to Storybook.
375
+ * Add Badge component to Storybook.
374
376
  * IconButton and Button have the default cursor on both link and button versions.
375
377
 
376
378
  ## 0.7.0
377
379
 
378
- * Modal component is added to Storybook.
379
- * Typography styles are added to Storybook.
380
+ * Add Modal component to Storybook.
381
+ * Add Typography styles to Storybook.
380
382
 
381
383
  ## 0.6.1
382
384
 
383
- * Fixed error type in onChange select props.
384
- * Added check types to CI.
385
+ * Fix error type on onChange select props.
386
+ * Add check types to CI.
385
387
 
386
388
  ## 0.6.0
387
389
 
388
- Checkbox component is added to Storybook.
390
+ * Add Checkbox component to Storybook.
389
391
 
390
392
  ## 0.5.0
391
393
 
392
- * IconButton component is added to Storybook.
393
- * Edit and Delete icons have been added.
394
+ * Add IconButton component to Storybook.
395
+ * Add Edit and Delete icons.
394
396
  * Button outlined disabled styles have been changed to make them look the same as the filled disabled styles.
395
397
  * `accessibilityLabel` specific prop has been added as optional to Button, Input, Select and Multiselect components.
396
398
  * Select and Multiselect can be closed too when losing focus.
@@ -403,7 +405,7 @@ BREAKING CHANGES
403
405
 
404
406
  ## 0.4.0
405
407
 
406
- * CardsTable component suitable to create custom tables is added to Storybook.
408
+ * Add CardsTable component to Storybook, suitable to create custom tables.
407
409
  * Cell `align` property has been added to CardsTableCell component.
408
410
  * Cell `noWrap` property has been added to CardsTableCell component.
409
411
  * Button component can be rendered as NextLink if the `href` prop is provided.
@@ -411,13 +413,13 @@ BREAKING CHANGES
411
413
 
412
414
  ## 0.3.2
413
415
 
414
- * Updated show and show-off icons.
416
+ * Update show and show-off icons.
415
417
 
416
418
  ## 0.3.1
417
419
 
418
- * Fixed input height not matching other components'.
419
- * Updated input's icons positions due to the input height change.
420
- * Fixed button height to not fill the whole available space.
420
+ * Fix input height not matching other components.
421
+ * Update input's icons positions due to the input height change.
422
+ * Fix button height to not fill the whole available space.
421
423
 
422
424
  ## 0.3.0
423
425
 
@@ -440,11 +442,11 @@ BREAKING CHANGES
440
442
  BREAKING CHANGES
441
443
 
442
444
  * `columnId` prop is required from this version.
443
- * rows `data` prop has been renamed to `columns`.
445
+ * Rows `data` prop has been renamed to `columns`.
444
446
 
445
447
  ## 0.1.3
446
448
 
447
- Update left padding on the cells from CardsTableList component
449
+ * Update left padding on the cells from CardsTableList component
448
450
 
449
451
  ## 0.1.2
450
452
 
@@ -1,6 +1,6 @@
1
1
  import type { Variant } from '../src/atoms/Badge'
2
2
  import React from 'react'
3
- import { getByTitle, render, screen } from '@testing-library/react'
3
+ import { render, screen } from '@testing-library/react'
4
4
  import { Badge } from '../src/atoms/Badge'
5
5
 
6
6
  describe('Badge', () => {
@@ -36,7 +36,7 @@ describe('Badge', () => {
36
36
  const icon = 'PDF'
37
37
  const accessibilityLabel = `${variant} badge label`
38
38
 
39
- const { getByRole, getByText } = render(
39
+ const { getByRole } = render(
40
40
  <Badge
41
41
  id={`${variant}-badge`}
42
42
  accessibilityLabel={accessibilityLabel}
@@ -44,7 +44,7 @@ describe('Badge', () => {
44
44
  variant={variant as Variant}
45
45
  />,
46
46
  )
47
- expect(screen.getByTitle(icon)).toBeInTheDocument()
47
+ expect(screen.getAllByTitle(accessibilityLabel)[1]).toBeInTheDocument()
48
48
  expect(getByRole('status')).toHaveClass(`badge ${variant}`)
49
49
  })
50
50
  })