agroptima-design-system 0.27.18 → 0.27.20
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 +16 -20
- package/src/atoms/Multiselect.tsx +9 -11
- package/src/atoms/Select.tsx +10 -13
- package/src/stories/Changelog.mdx +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agroptima-design-system",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.20",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "npm run storybook",
|
|
6
6
|
"storybook": "storybook dev -p 6006 --ci",
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
"publish:beta": "npm publish --tag beta"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"next": "15.0
|
|
19
|
-
"react": "19.0.0
|
|
20
|
-
"react-dom": "19.0.0
|
|
21
|
-
"sass": "^1.
|
|
18
|
+
"next": "^15.1.0",
|
|
19
|
+
"react": "^19.0.0",
|
|
20
|
+
"react-dom": "^19.0.0",
|
|
21
|
+
"sass": "^1.83.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@chromatic-com/storybook": "^3.2.2",
|
|
25
|
-
"@eslint/eslintrc": "^3.
|
|
26
|
-
"@eslint/js": "^9.
|
|
25
|
+
"@eslint/eslintrc": "^3.2.0",
|
|
26
|
+
"@eslint/js": "^9.16.0",
|
|
27
27
|
"@storybook/addon-a11y": "^8.4.7",
|
|
28
28
|
"@storybook/addon-designs": "^8.0.4",
|
|
29
29
|
"@storybook/addon-essentials": "^8.4.7",
|
|
@@ -36,26 +36,26 @@
|
|
|
36
36
|
"@storybook/test": "^8.4.7",
|
|
37
37
|
"@svgr/webpack": "^8.1.0",
|
|
38
38
|
"@testing-library/jest-dom": "^6.6.3",
|
|
39
|
-
"@testing-library/react": "^16.0
|
|
39
|
+
"@testing-library/react": "^16.1.0",
|
|
40
40
|
"@testing-library/user-event": "^14.5.2",
|
|
41
41
|
"@types/jest": "^29.5.14",
|
|
42
42
|
"@types/jest-axe": "^3.5.9",
|
|
43
|
-
"@types/node": "^22.
|
|
44
|
-
"@types/react": "
|
|
45
|
-
"@types/react-dom": "
|
|
43
|
+
"@types/node": "^22.10.2",
|
|
44
|
+
"@types/react": "^19.0.1",
|
|
45
|
+
"@types/react-dom": "^19.0.2",
|
|
46
46
|
"ajv": "^8.17.1",
|
|
47
|
-
"eslint": "^9.
|
|
48
|
-
"eslint-config-next": "15.0
|
|
47
|
+
"eslint": "^9.16.0",
|
|
48
|
+
"eslint-config-next": "^15.1.0",
|
|
49
49
|
"eslint-config-prettier": "^9.0.0",
|
|
50
50
|
"eslint-plugin-prettier": "^5.0.1",
|
|
51
51
|
"eslint-plugin-storybook": "^0.11.1",
|
|
52
52
|
"jest": "^29.7.0",
|
|
53
53
|
"jest-axe": "^9.0.0",
|
|
54
54
|
"jest-environment-jsdom": "^29.7.0",
|
|
55
|
-
"prettier": "3.
|
|
55
|
+
"prettier": "^3.4.2",
|
|
56
56
|
"storybook": "^8.4.7",
|
|
57
57
|
"ts-node": "^10.9.2",
|
|
58
|
-
"typescript": "^5.
|
|
58
|
+
"typescript": "^5.7.2"
|
|
59
59
|
},
|
|
60
60
|
"description": "Agroptima design system",
|
|
61
61
|
"main": "next.config.js",
|
|
@@ -73,9 +73,5 @@
|
|
|
73
73
|
"bugs": {
|
|
74
74
|
"url": "https://github.com/agroptima/design-system/issues"
|
|
75
75
|
},
|
|
76
|
-
"homepage": "https://github.com/agroptima/design-system#readme"
|
|
77
|
-
"overrides": {
|
|
78
|
-
"@types/react": "npm:types-react@19.0.0-rc.1",
|
|
79
|
-
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
|
|
80
|
-
}
|
|
76
|
+
"homepage": "https://github.com/agroptima/design-system#readme"
|
|
81
77
|
}
|
|
@@ -115,14 +115,15 @@ export function Multiselect({
|
|
|
115
115
|
/>
|
|
116
116
|
</div>
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
118
|
+
{isOpen && (
|
|
119
|
+
<OptionList
|
|
120
|
+
options={options}
|
|
121
|
+
selectedOptions={selectedOptions}
|
|
122
|
+
onSelect={selectOption}
|
|
123
|
+
isSearchable={isSearchable}
|
|
124
|
+
searchLabel={searchLabel}
|
|
125
|
+
/>
|
|
126
|
+
)}
|
|
126
127
|
</div>
|
|
127
128
|
{helpTexts.map((helpText) => (
|
|
128
129
|
<span key={`${name}-${helpText}`} className="select-help-text">
|
|
@@ -145,7 +146,6 @@ interface OptionListProps {
|
|
|
145
146
|
options: Option[]
|
|
146
147
|
selectedOptions: string[]
|
|
147
148
|
onSelect: (id: string) => void
|
|
148
|
-
isOpen: boolean
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
function OptionList({
|
|
@@ -154,10 +154,8 @@ function OptionList({
|
|
|
154
154
|
onSelect,
|
|
155
155
|
isSearchable,
|
|
156
156
|
searchLabel,
|
|
157
|
-
isOpen,
|
|
158
157
|
}: OptionListProps) {
|
|
159
158
|
const { findItems, search } = useSearch(options, 'label')
|
|
160
|
-
if (!isOpen) return null
|
|
161
159
|
|
|
162
160
|
return (
|
|
163
161
|
<div className="select-options">
|
package/src/atoms/Select.tsx
CHANGED
|
@@ -116,16 +116,16 @@ export function Select({
|
|
|
116
116
|
visible={!isEmpty}
|
|
117
117
|
/>
|
|
118
118
|
</div>
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
119
|
+
{isOpen && (
|
|
120
|
+
<OptionList
|
|
121
|
+
options={options}
|
|
122
|
+
selectedOption={selectedOption}
|
|
123
|
+
selectOption={selectOption}
|
|
124
|
+
onClick={close}
|
|
125
|
+
isSearchable={isSearchable}
|
|
126
|
+
searchLabel={searchLabel}
|
|
127
|
+
/>
|
|
128
|
+
)}
|
|
129
129
|
</div>
|
|
130
130
|
{helpTexts.map((helpText) => (
|
|
131
131
|
<span key={`${name}-${helpText}`} className="select-help-text">
|
|
@@ -150,7 +150,6 @@ interface OptionListProps {
|
|
|
150
150
|
onClick: () => void
|
|
151
151
|
isSearchable: boolean
|
|
152
152
|
searchLabel: string
|
|
153
|
-
isOpen: boolean
|
|
154
153
|
}
|
|
155
154
|
|
|
156
155
|
function OptionList({
|
|
@@ -160,10 +159,8 @@ function OptionList({
|
|
|
160
159
|
onClick,
|
|
161
160
|
isSearchable,
|
|
162
161
|
searchLabel,
|
|
163
|
-
isOpen,
|
|
164
162
|
}: OptionListProps) {
|
|
165
163
|
const { findItems, search } = useSearch(options, 'label')
|
|
166
|
-
if (!isOpen) return null
|
|
167
164
|
|
|
168
165
|
return (
|
|
169
166
|
<div className="select-options">
|