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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agroptima-design-system",
3
- "version": "0.18.1-beta.1",
3
+ "version": "0.18.2",
4
4
  "scripts": {
5
5
  "dev": "npm run storybook",
6
6
  "storybook": "storybook dev -p 6006 --ci",
@@ -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
  )
@@ -140,6 +140,7 @@
140
140
  }
141
141
  tr.active {
142
142
  border-color: color_alias.$primary-color-1000;
143
+ box-shadow: none;
143
144
  }
144
145
  tr.action {
145
146
  cursor: default;
@@ -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 title="Tekken 8">
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
- ## Beta
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
@@ -11,7 +11,6 @@ describe('QuantitySelector', () => {
11
11
  id="quantity"
12
12
  onDecrement={() => alert('decrement')}
13
13
  onIncrement={() => alert('increment')}
14
- hideLabel={true}
15
14
  name="quantity"
16
15
  value={1}
17
16
  onChange={() => alert('onChange')}