agroptima-design-system 0.18.1-beta.1 → 0.18.2
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 +1 -1
- package/src/atoms/Card/Card.scss +11 -1
- package/src/atoms/Card/CardHeader.tsx +1 -1
- package/src/atoms/CardsTable/CardsTable.scss +1 -0
- package/src/atoms/QuantitySelector.tsx +4 -0
- package/src/stories/Card.stories.js +18 -3
- package/src/stories/CardMenu.stories.js +1 -2
- package/src/stories/CardsTable.stories.js +1 -8
- package/src/stories/Changelog.stories.mdx +7 -1
- package/tests/QuantitySelector.spec.tsx +0 -1
package/package.json
CHANGED
package/src/atoms/Card/Card.scss
CHANGED
|
@@ -33,7 +33,14 @@
|
|
|
33
33
|
flex-direction: row;
|
|
34
34
|
justify-content: space-between;
|
|
35
35
|
margin-bottom: config.$space-1x;
|
|
36
|
-
|
|
36
|
+
gap: config.$space-1x;
|
|
37
|
+
.title {
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
|
+
-webkit-line-clamp: 2;
|
|
41
|
+
-webkit-box-orient: vertical;
|
|
42
|
+
display: -webkit-box;
|
|
43
|
+
}
|
|
37
44
|
> .bold {
|
|
38
45
|
@include typography.body-bold;
|
|
39
46
|
}
|
|
@@ -57,6 +64,9 @@
|
|
|
57
64
|
&.disabled {
|
|
58
65
|
@include typography.body-regular-disabled;
|
|
59
66
|
background: color_alias.$neutral-color-50;
|
|
67
|
+
.header .bold {
|
|
68
|
+
color: color_alias.$neutral-color-400;
|
|
69
|
+
}
|
|
60
70
|
}
|
|
61
71
|
|
|
62
72
|
&.active {
|
|
@@ -18,7 +18,7 @@ export function CardHeader({
|
|
|
18
18
|
|
|
19
19
|
return (
|
|
20
20
|
<div className={cssClasses} {...props}>
|
|
21
|
-
<span className={classNames({ bold: isBold })}>{title}</span>
|
|
21
|
+
<span className={classNames('title', { bold: isBold })}>{title}</span>
|
|
22
22
|
<div className="actions">{children}</div>
|
|
23
23
|
</div>
|
|
24
24
|
)
|
|
@@ -25,6 +25,7 @@ export function QuantitySelector({
|
|
|
25
25
|
className,
|
|
26
26
|
hideLabel = false,
|
|
27
27
|
variant = 'primary',
|
|
28
|
+
disabled,
|
|
28
29
|
...props
|
|
29
30
|
}: QuantitySelectorProps): React.JSX.Element {
|
|
30
31
|
const cssClasses = classNames('quantity-selector', className)
|
|
@@ -43,12 +44,14 @@ export function QuantitySelector({
|
|
|
43
44
|
type="button"
|
|
44
45
|
leftIcon="Minus"
|
|
45
46
|
className="decrement-button"
|
|
47
|
+
disabled={disabled}
|
|
46
48
|
onClick={onDecrement}
|
|
47
49
|
/>
|
|
48
50
|
<Input
|
|
49
51
|
id={id}
|
|
50
52
|
label={label}
|
|
51
53
|
accessibilityLabel={accessibilityLabel}
|
|
54
|
+
disabled={disabled}
|
|
52
55
|
{...props}
|
|
53
56
|
hideLabel={true}
|
|
54
57
|
/>
|
|
@@ -58,6 +61,7 @@ export function QuantitySelector({
|
|
|
58
61
|
leftIcon="Add"
|
|
59
62
|
type="button"
|
|
60
63
|
className="increment-button"
|
|
64
|
+
disabled={disabled}
|
|
61
65
|
onClick={onIncrement}
|
|
62
66
|
/>
|
|
63
67
|
</div>
|
|
@@ -379,9 +379,16 @@ export const ProductCardsGroup = {
|
|
|
379
379
|
|
|
380
380
|
export const Primary = {
|
|
381
381
|
render: () => (
|
|
382
|
-
<div style={{ display: 'flex' }}>
|
|
382
|
+
<div style={{ display: 'flex', width: '700px', gap: '20px' }}>
|
|
383
383
|
<Card variant="primary">
|
|
384
|
-
<CardHeader
|
|
384
|
+
<CardHeader
|
|
385
|
+
isBold
|
|
386
|
+
title="TEKKEN 8 will feature exciting new gameplay focused on “Aggressive”
|
|
387
|
+
tactics. Retaining TEKKEN's unique fighting game identity, the game
|
|
388
|
+
will provide both players and spectators with the series' most
|
|
389
|
+
thrilling experience yet with visceral screen-jarring attacks and
|
|
390
|
+
environments that are both dynamic and destructible."
|
|
391
|
+
>
|
|
385
392
|
<IconButton
|
|
386
393
|
icon="Edit"
|
|
387
394
|
accessibilityLabel="Edit game"
|
|
@@ -411,6 +418,14 @@ export const Primary = {
|
|
|
411
418
|
<Button variant="primary-outlined" label="Add to wishlist" />
|
|
412
419
|
</CardFooter>
|
|
413
420
|
</Card>
|
|
421
|
+
<Card variant="primary">
|
|
422
|
+
<CardHeader isBold title="Metal Gear Solid 5" />
|
|
423
|
+
<CardContent>
|
|
424
|
+
<p>
|
|
425
|
+
Metal Gear Solid 5: Ground Zeroes + The Phantom Pain is a stealth
|
|
426
|
+
</p>
|
|
427
|
+
</CardContent>
|
|
428
|
+
</Card>
|
|
414
429
|
</div>
|
|
415
430
|
),
|
|
416
431
|
}
|
|
@@ -419,7 +434,7 @@ export const Disabled = {
|
|
|
419
434
|
render: () => (
|
|
420
435
|
<div style={{ display: 'flex' }}>
|
|
421
436
|
<Card isDisabled variant="primary">
|
|
422
|
-
<CardHeader title="Tekken 8">
|
|
437
|
+
<CardHeader isBold title="Tekken 8">
|
|
423
438
|
<IconButton disabled icon="Delete" accessibilityLabel="Delete game" />
|
|
424
439
|
</CardHeader>
|
|
425
440
|
<CardContent>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
3
|
import { CardMenu, CardMenuOption } from '../atoms/CardMenu'
|
|
4
|
-
import { isErrored } from 'stream'
|
|
5
4
|
|
|
6
5
|
const figmaPrimaryDesign = {
|
|
7
6
|
design: {
|
|
@@ -37,7 +36,7 @@ const meta = {
|
|
|
37
36
|
description: 'Is the component active?',
|
|
38
37
|
},
|
|
39
38
|
error: {
|
|
40
|
-
description: 'Is the component error?',
|
|
39
|
+
description: 'Is the component marked as error?',
|
|
41
40
|
},
|
|
42
41
|
},
|
|
43
42
|
parameters: figmaPrimaryDesign,
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
CardsTable,
|
|
5
|
-
CardsTableHead,
|
|
6
|
-
CardsTableHeader,
|
|
7
|
-
CardsTableRow,
|
|
8
|
-
CardsTableBody,
|
|
9
|
-
CardsTableCell,
|
|
10
|
-
} from '../atoms/CardsTable'
|
|
3
|
+
import { CardsTable, CardsTableHead, CardsTableHeader, CardsTableRow, CardsTableBody, CardsTableCell } from '../atoms/CardsTable'
|
|
11
4
|
import { IconButton } from '../atoms/Button'
|
|
12
5
|
import { Badge } from '../atoms/Badge'
|
|
13
6
|
|
|
@@ -3,9 +3,15 @@ import { Meta } from "@storybook/addon-docs";
|
|
|
3
3
|
<Meta title="Changelog" />
|
|
4
4
|
# Changelog
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## 0.18.2
|
|
7
7
|
- Add link to CardMenuOption component
|
|
8
8
|
- Add active and error state to CardMenuOption component
|
|
9
|
+
- Add active state to Card component
|
|
10
|
+
- Update QuantitySelector component props
|
|
11
|
+
- Add active and action state to CardsTableRow component
|
|
12
|
+
|
|
13
|
+
## 0.18.0
|
|
14
|
+
- Added Collapsible component to Storybook
|
|
9
15
|
|
|
10
16
|
## 0.17.0
|
|
11
17
|
- Added QuantitySelector component to Storybook
|