react-animated-select 0.3.6 → 0.5.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/README.md +8 -7
- package/demo/package-lock.json +3619 -3436
- package/demo/package.json +35 -38
- package/demo/src/App.tsx +16 -4
- package/demo/src/rac.css +13 -2
- package/dist/index.cjs.js +10 -6
- package/dist/index.css +1 -1
- package/dist/index.es.js +1205 -885
- package/index.d.ts +7 -1
- package/package.json +1 -1
- package/src/animated.jsx +80 -0
- package/src/icons.jsx +14 -0
- package/src/option.jsx +7 -5
- package/src/options.jsx +80 -14
- package/src/select.css +87 -10
- package/src/select.jsx +46 -16
- package/src/selectJSX.jsx +129 -12
- package/src/useSelect.jsx +24 -7
- package/src/useSelectLogic.jsx +274 -163
package/README.md
CHANGED
|
@@ -75,6 +75,7 @@ function App() {
|
|
|
75
75
|
| `value` | `any` | `undefined` | The current value for a controlled component. |
|
|
76
76
|
| `defaultValue` | `any` | `undefined` | Initial value for an uncontrolled component. |
|
|
77
77
|
| `onChange` | `function` | `undefined` | Callback called when an option is selected. Arguments: (data, id). |
|
|
78
|
+
| `multiple` | `boolean` | `false` | Allows select multiple options. |
|
|
78
79
|
| `placeholder` | `string` | `"Choose option"` | Text shown when no option is selected. |
|
|
79
80
|
| `disabled` | `boolean` | `false` | Disables the entire component. |
|
|
80
81
|
| `loading` | `boolean` | `false` | Shows a loading animation and disables interaction. |
|
|
@@ -113,6 +114,7 @@ function App() {
|
|
|
113
114
|
| `loadButton` | `boolean` | `false` | Enables a manual “Load more” button instead of automatic loading. |
|
|
114
115
|
| `loadButtonText` | `string` | `'Load more'` | Text displayed on the load button. |
|
|
115
116
|
| `childrenFirst` | `boolean` | `false` | Determines priority of JSX `<Option />` children over options passed via props. |
|
|
117
|
+
| `groupsClosed` | `boolean` | `false` | Default open status of groups. |
|
|
116
118
|
|
|
117
119
|
---
|
|
118
120
|
|
|
@@ -274,14 +276,13 @@ The select and its options react to internal states by applying the following cl
|
|
|
274
276
|
- `.rac-select-arrow-wrapper.--open`: Applied to the arrow icon when the dropdown is expanded.
|
|
275
277
|
|
|
276
278
|
## Change log
|
|
277
|
-
### 0.
|
|
279
|
+
### 0.5.0
|
|
278
280
|
### New Features
|
|
279
|
-
- **
|
|
280
|
-
-
|
|
281
|
-
-
|
|
282
|
-
-
|
|
283
|
-
|
|
284
|
-
- **Dynamic Load Button Toggle**: Fixed a critical bug where the "Load More" button's visibility wouldn't update dynamically. The component now correctly reacts to real-time changes in the `loadButton` and `hasMore` props.
|
|
281
|
+
- **Multi-Selection Core**: Integrated a robust multi-select mode with dedicated tag rendering and animated entry/exit for selected items.
|
|
282
|
+
- **Adaptive Portal Positioning**: Migrated the dropdown to a `React Portal`, decoupling the list from the parent's overflow constraints.
|
|
283
|
+
- _Context-Aware Placement:_ The engine now detects screen edges and automatically toggles between `upward` and `downward` opening.
|
|
284
|
+
- **Initial Group States**: Added `groupsClosed` prop support, allowing developers to control whether hierarchical categories are collapsed or expanded by default.
|
|
285
|
+
- **Icon Customization Suite**: Expanded the icon system to support custom `DelIcon` and `CheckmarkIcon` for multi-select states.
|
|
285
286
|
|
|
286
287
|
## License
|
|
287
288
|
|