agroptima-design-system 0.25.5 → 0.25.7

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.25.5",
3
+ "version": "0.25.7",
4
4
  "scripts": {
5
5
  "dev": "npm run storybook",
6
6
  "storybook": "storybook dev -p 6006 --ci",
@@ -16,23 +16,23 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@storybook/addon-designs": "^8.0.3",
19
- "@storybook/addon-viewport": "^8.2.9",
19
+ "@storybook/addon-viewport": "^8.3.2",
20
20
  "next": "^14.0.3",
21
21
  "react": "^18.2.0",
22
22
  "react-dom": "^18.2.0",
23
23
  "sass": "^1.69.4"
24
24
  },
25
25
  "devDependencies": {
26
- "@chromatic-com/storybook": "^1.8.0",
27
- "@storybook/addon-a11y": "^8.2.9",
28
- "@storybook/addon-essentials": "^8.2.9",
29
- "@storybook/addon-interactions": "^8.2.9",
30
- "@storybook/addon-links": "^8.2.9",
31
- "@storybook/addon-mdx-gfm": "^8.2.9",
32
- "@storybook/blocks": "^8.2.9",
33
- "@storybook/nextjs": "^8.2.9",
34
- "@storybook/react": "^8.2.9",
35
- "@storybook/test": "^8.2.9",
26
+ "@chromatic-com/storybook": "^2.0.2",
27
+ "@storybook/addon-a11y": "^8.3.2",
28
+ "@storybook/addon-essentials": "^8.3.2",
29
+ "@storybook/addon-interactions": "^8.3.2",
30
+ "@storybook/addon-links": "^8.3.2",
31
+ "@storybook/addon-mdx-gfm": "^8.3.2",
32
+ "@storybook/blocks": "^8.3.2",
33
+ "@storybook/nextjs": "^8.3.2",
34
+ "@storybook/react": "^8.3.2",
35
+ "@storybook/test": "^8.3.2",
36
36
  "@svgr/webpack": "^8.1.0",
37
37
  "@testing-library/jest-dom": "^6.4.2",
38
38
  "@testing-library/react": "^16.0.0",
@@ -50,7 +50,7 @@
50
50
  "jest": "^29.7.0",
51
51
  "jest-axe": "^9.0.0",
52
52
  "jest-environment-jsdom": "^29.7.0",
53
- "storybook": "^8.2.9",
53
+ "storybook": "^8.3.2",
54
54
  "ts-node": "^10.9.2",
55
55
  "typescript": "^5"
56
56
  },
@@ -44,11 +44,17 @@
44
44
  padding-bottom: 9rem;
45
45
  }
46
46
  .actions {
47
- padding: 0;
48
- flex-direction: column;
47
+ background-color: color_alias.$neutral-white;
48
+ border-top: 1px solid color_alias.$neutral-color-200;
49
+ flex-direction: row;
50
+ justify-content: space-between;
51
+ gap: config.$space-2x;
49
52
  box-shadow: none;
50
- background-color: transparent;
51
- inset: auto config.$space-4x config.$space-4x config.$space-4x;
53
+ padding: config.$space-4x auto config.$space-4x auto;
54
+
55
+ .button {
56
+ width: 50%;
57
+ }
52
58
  }
53
59
  }
54
60
  }
@@ -1,6 +1,7 @@
1
1
  @use '../settings/color_alias';
2
2
  @use '../settings/typography/form' as typography;
3
3
  @use '../settings/config';
4
+ @import 'button/Button.scss';
4
5
 
5
6
  .input-group {
6
7
  @include typography.input-text;
@@ -124,4 +125,22 @@
124
125
  }
125
126
  }
126
127
  }
128
+ &.file .input-container {
129
+ padding: 0;
130
+ border: none;
131
+ input {
132
+ color: color_alias.$neutral-color-600;
133
+ &::before {
134
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='12' fill='none'%3E%3Cpath d='M2.943 8.718h4.114V4.694H9.8L5 0 .2 4.694h2.743v4.024ZM5 1.898l1.488 1.455h-.802v4.023H4.314V3.353h-.802L5 1.898Zm-4.8 8.16h9.6V11.4H.2v-1.341Z' fill='%23EB004D'/%3E%3C/svg%3E");
135
+ position: absolute;
136
+ left: config.$space-3x;
137
+ bottom: config.$space-2x;
138
+ }
139
+ &::file-selector-button {
140
+ margin-right: config.$space-2x;
141
+ padding-left: config.$space-3x + config.$icon-size-2x + config.$space-1x;
142
+ @extend .button;
143
+ }
144
+ }
145
+ }
127
146
  }
@@ -57,6 +57,7 @@ export function Input({
57
57
  return (
58
58
  <div
59
59
  className={classNames('input-group', variant, className, {
60
+ file: type === 'file',
60
61
  invalid: errors?.length,
61
62
  })}
62
63
  >
@@ -73,6 +74,7 @@ export function Input({
73
74
  type={handleInputType()}
74
75
  name={name}
75
76
  aria-label={accessibilityLabel || label}
77
+ className={classNames({ 'primary-outlined': type === 'file' })}
76
78
  {...props}
77
79
  />
78
80
  {suffix && <span className="input-suffix">{suffix}</span>}
@@ -4,6 +4,14 @@ import { Meta } from "@storybook/blocks";
4
4
 
5
5
  # Changelog
6
6
 
7
+ # 0.25.7
8
+
9
+ * Add styles for file Input component
10
+
11
+ # 0.25.6
12
+
13
+ * Align Form Action buttons horizontally
14
+
7
15
  # 0.25.5
8
16
 
9
17
  * Call onChange after clearing Select and Multiselect components
@@ -86,6 +86,18 @@ export const Password: Story = {
86
86
  parameters: figmaPrimaryDesign,
87
87
  }
88
88
 
89
+ export const File: Story = {
90
+ args: {
91
+ label: 'Label for input file',
92
+ variant: 'primary',
93
+ disabled: false,
94
+ helpText: 'This text can help you',
95
+ name: 'file',
96
+ type: 'file',
97
+ },
98
+ parameters: figmaPrimaryDesign,
99
+ }
100
+
89
101
  export const WithErrors: Story = {
90
102
  args: {
91
103
  label: 'Email',