Skip to content

Commit 1066dcc

Browse files
committed
chore: version packages
1 parent fccdcc7 commit 1066dcc

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.changeset/pre.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"mode": "pre",
3+
"tag": "alpha",
4+
"initialVersions": {
5+
"react-class-variants": "2.0.0-alpha.0"
6+
},
7+
"changesets": [
8+
"major-v2-refactor"
9+
]
10+
}

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
# react-tailwind-variants
22

3+
## 2.0.0-alpha.0
4+
5+
### Major Changes
6+
7+
- 4285122: Complete v2 refactor with consolidated architecture and enhanced functionality
8+
9+
**Breaking Changes:**
10+
11+
- Complete library restructure - all functionality consolidated into single module
12+
- `styled()` API removed in favor of `variantComponent()`
13+
- `cx()` utility removed - class merging now handled via `defineConfig({ onClassesMerged })`
14+
- Changed exports structure - now use `defineConfig()` factory pattern
15+
16+
**New Features:**
17+
18+
- `defineConfig(options)` - Factory function for creating variants, variantPropsResolver, and variantComponent with shared configuration
19+
- `variantComponent()` - Create React components with variants support and polymorphic rendering
20+
- `variantPropsResolver()` - Extract variant props and resolve className from full props objects
21+
- Enhanced render prop pattern - supports both React elements and render functions
22+
- `forwardProps` option - Control which variant props get forwarded to DOM
23+
- `withoutRenderProp` option - Disable render prop pattern when not needed
24+
- Improved ref forwarding and merging with `useMergeRefs()`
25+
- Better event handler and props composition with `mergeProps()`
26+
27+
**Type System Improvements:**
28+
29+
- Stronger type inference for optional vs required variants
30+
- Boolean variants automatically optional
31+
- Variants with defaults automatically optional
32+
- Better polymorphic component type support
33+
34+
**Testing:**
35+
36+
- Complete comprehensive test suite with 170+ tests
37+
- Tests for variants resolution, React components, utilities, edge cases, and TypeScript types
38+
- Vitest + React Testing Library + tsd for type testing
39+
40+
**Documentation:**
41+
42+
- Complete README rewrite with all new APIs and examples
43+
344
## 1.0.3
445

546
### Patch Changes

0 commit comments

Comments
 (0)