agroptima-design-system 0.31.4 → 0.31.5

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.31.4",
3
+ "version": "0.31.5",
4
4
  "scripts": {
5
5
  "dev": "npm run storybook",
6
6
  "storybook": "storybook dev -p 6006 --ci",
@@ -66,6 +66,13 @@ a.card {
66
66
  }
67
67
  }
68
68
 
69
+ &:not(:has(.footer > .button)),
70
+ &.clickable {
71
+ &:hover {
72
+ background: color_alias.$primary-color-50;
73
+ }
74
+ }
75
+
69
76
  &.primary {
70
77
  @include typography.body-regular-primary;
71
78
  box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.25);
@@ -40,13 +40,13 @@
40
40
  }
41
41
  }
42
42
 
43
- &:hover {
43
+ &:not(:disabled):hover {
44
44
  border: 1px solid color_alias.$primary-color-1000;
45
45
  background: color_alias.$primary-color-50;
46
46
  color: color_alias.$primary-color-1000;
47
47
  }
48
48
 
49
- &.selected {
49
+ &:not(:disabled).selected {
50
50
  border: 1px solid color_alias.$primary-color-1000;
51
51
  color: color_alias.$primary-color-1000;
52
52
  }
@@ -80,8 +80,8 @@
80
80
  border: 1px solid transparent;
81
81
  background: none;
82
82
 
83
- &.selected,
84
- &:hover {
83
+ &:not(:disabled).selected,
84
+ &:not(:disabled):hover {
85
85
  border: 1px solid color_alias.$primary-color-1000;
86
86
  color: color_alias.$primary-color-1000;
87
87
  }
@@ -17,7 +17,7 @@ const meta = {
17
17
  docs: {
18
18
  description: {
19
19
  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>',
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
21
  },
22
22
  },
23
23
  figmaPrimaryDesign,
@@ -522,3 +522,20 @@ export const WithLink = {
522
522
  </div>
523
523
  ),
524
524
  }
525
+
526
+ export const Clickable = {
527
+ render: () => (
528
+ <div style={{ display: 'flex' }}>
529
+ <Card onClick={() => alert('click')}>
530
+ <CardHeader title="Fallout 3" isBold />
531
+ <CardContent>
532
+ <p>
533
+ Fallout 3 is a post-apocalyptic action role-playing open world video
534
+ game developed by Bethesda Game Studios and published by Bethesda
535
+ Softworks.
536
+ </p>
537
+ </CardContent>
538
+ </Card>
539
+ </div>
540
+ ),
541
+ }
@@ -4,11 +4,15 @@ import { Meta } from "@storybook/blocks";
4
4
 
5
5
  # Changelog
6
6
 
7
+ ## 0.31.5
8
+
9
+ * Card component has a hover effect when being a link, being clickable or not having any buttons.
10
+
7
11
  ## 0.31.4
8
12
 
9
13
  * Capitalized characters in month DatePicker for spanish version.
10
14
  * Change the day selection style for DateSinglePicker.
11
- * Colors in DateRangePicker in filters in Drawer component.
15
+ * Fix colors in DateRangePicker in filters in Drawer component.
12
16
 
13
17
  ## 0.31.3
14
18