@vitus-labs/elements 2.0.0-alpha.20 → 2.0.0-alpha.22
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 +1 -28
- package/package.json +13 -12
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ Five composable components for building buttons, cards, lists, dropdowns, toolti
|
|
|
16
16
|
- **Portal** — React Portal wrapper for DOM appending
|
|
17
17
|
- **Util** — non-rendering utility for injecting className and style
|
|
18
18
|
- **Responsive everything** — single value, array, or breakpoint object on every layout prop
|
|
19
|
-
- **
|
|
19
|
+
- **Equal before/after** — `equalBeforeAfter` prop on Element to equalize slot dimensions
|
|
20
20
|
|
|
21
21
|
## Installation
|
|
22
22
|
|
|
@@ -161,33 +161,6 @@ import { List, Element } from '@vitus-labs/elements'
|
|
|
161
161
|
|
|
162
162
|
`index`, `first`, `last`, `odd`, `even`, `position` (1-based)
|
|
163
163
|
|
|
164
|
-
### withActiveState
|
|
165
|
-
|
|
166
|
-
HOC that adds selection state management to List.
|
|
167
|
-
|
|
168
|
-
```tsx
|
|
169
|
-
import { List, withActiveState } from '@vitus-labs/elements'
|
|
170
|
-
|
|
171
|
-
const SelectableList = withActiveState(List)
|
|
172
|
-
|
|
173
|
-
<SelectableList
|
|
174
|
-
type="single"
|
|
175
|
-
component={ListItem}
|
|
176
|
-
data={items}
|
|
177
|
-
activeItems="item-1"
|
|
178
|
-
/>
|
|
179
|
-
|
|
180
|
-
<SelectableList
|
|
181
|
-
type="multi"
|
|
182
|
-
component={ListItem}
|
|
183
|
-
data={items}
|
|
184
|
-
activeItems={['item-1', 'item-3']}
|
|
185
|
-
activeItemRequired
|
|
186
|
-
/>
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
Each item receives: `active`, `handleItemActive`, `setItemActive`, `unsetItemActive`, `toggleItemActive`.
|
|
190
|
-
|
|
191
164
|
### Overlay
|
|
192
165
|
|
|
193
166
|
Portal-based overlay with intelligent positioning and event management.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitus-labs/elements",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.22",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Vit Bokisch <vit@bokisch.cz>",
|
|
6
6
|
"maintainers": [
|
|
@@ -52,24 +52,25 @@
|
|
|
52
52
|
"test:coverage": "vitest run --coverage",
|
|
53
53
|
"test:watch": "vitest",
|
|
54
54
|
"cover": "coveralls < .coverage/lcov.info",
|
|
55
|
-
"typecheck": "tsc --noEmit"
|
|
55
|
+
"typecheck": "tsc --noEmit",
|
|
56
|
+
"version": "node ../../scripts/sync-peer-deps.mjs"
|
|
56
57
|
},
|
|
57
58
|
"peerDependencies": {
|
|
58
|
-
"@vitus-labs/core": "
|
|
59
|
-
"@vitus-labs/unistyle": "
|
|
59
|
+
"@vitus-labs/core": "2.0.0-alpha.21",
|
|
60
|
+
"@vitus-labs/unistyle": "2.0.0-alpha.21",
|
|
60
61
|
"react": ">= 19",
|
|
61
62
|
"react-dom": ">= 19"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
|
-
"@vitus-labs/core": "2.0.0-alpha.
|
|
65
|
-
"@vitus-labs/rocketstyle": "2.0.0-alpha.
|
|
66
|
-
"@vitus-labs/tools-rolldown": "^1.
|
|
67
|
-
"@vitus-labs/tools-storybook": "^1.
|
|
68
|
-
"@vitus-labs/tools-typescript": "^1.
|
|
69
|
-
"@vitus-labs/unistyle": "2.0.0-alpha.
|
|
65
|
+
"@vitus-labs/core": "2.0.0-alpha.22",
|
|
66
|
+
"@vitus-labs/rocketstyle": "2.0.0-alpha.22",
|
|
67
|
+
"@vitus-labs/tools-rolldown": "^1.7.0",
|
|
68
|
+
"@vitus-labs/tools-storybook": "^1.7.0",
|
|
69
|
+
"@vitus-labs/tools-typescript": "^1.7.0",
|
|
70
|
+
"@vitus-labs/unistyle": "2.0.0-alpha.22"
|
|
70
71
|
},
|
|
71
72
|
"dependencies": {
|
|
72
|
-
"react-is": "^19.2.
|
|
73
|
+
"react-is": "^19.2.4"
|
|
73
74
|
},
|
|
74
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "1a7c7384d09bcb6ff6194b148d876cc001d856b7"
|
|
75
76
|
}
|