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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agroptima-design-system",
3
- "version": "0.27.18",
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.3",
19
- "react": "19.0.0-rc-66855b96-20241106",
20
- "react-dom": "19.0.0-rc-66855b96-20241106",
21
- "sass": "^1.80.6"
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.1.0",
26
- "@eslint/js": "^9.14.0",
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.1",
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.9.0",
44
- "@types/react": "npm:types-react@19.0.0-rc.1",
45
- "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
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.14.0",
48
- "eslint-config-next": "15.0.3",
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.3.3",
55
+ "prettier": "^3.4.2",
56
56
  "storybook": "^8.4.7",
57
57
  "ts-node": "^10.9.2",
58
- "typescript": "^5.6.3"
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
- <OptionList
119
- isOpen={isOpen}
120
- options={options}
121
- selectedOptions={selectedOptions}
122
- onSelect={selectOption}
123
- isSearchable={isSearchable}
124
- searchLabel={searchLabel}
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">
@@ -116,16 +116,16 @@ export function Select({
116
116
  visible={!isEmpty}
117
117
  />
118
118
  </div>
119
-
120
- <OptionList
121
- isOpen={isOpen}
122
- options={options}
123
- selectedOption={selectedOption}
124
- selectOption={selectOption}
125
- onClick={close}
126
- isSearchable={isSearchable}
127
- searchLabel={searchLabel}
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">
@@ -4,6 +4,10 @@ import { Meta } from "@storybook/blocks";
4
4
 
5
5
  # Changelog
6
6
 
7
+ ## 0.27.20
8
+
9
+ * Fix state for select and multiselect search
10
+
7
11
  ## 0.27.18
8
12
 
9
13
  * Buttons links can be disabled.