|
1 | 1 | # react-tailwind-variants |
2 | 2 |
|
| 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 | + |
3 | 44 | ## 1.0.3 |
4 | 45 |
|
5 | 46 | ### Patch Changes |
|
0 commit comments