From bcf037a6482352c89cd708d93a66bf2e3fe6069d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 02:14:24 +0000 Subject: [PATCH] Version Packages --- .changeset/major-v2-refactor.md | 35 ---------------------------- CHANGELOG.md | 41 +++++++++++++++++++++++++++++++++ package.json | 2 +- 3 files changed, 42 insertions(+), 36 deletions(-) delete mode 100644 .changeset/major-v2-refactor.md diff --git a/.changeset/major-v2-refactor.md b/.changeset/major-v2-refactor.md deleted file mode 100644 index 7be6e77..0000000 --- a/.changeset/major-v2-refactor.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -'react-class-variants': major ---- - -Complete v2 refactor with consolidated architecture and enhanced functionality - -**Breaking Changes:** -- Complete library restructure - all functionality consolidated into single module -- `styled()` API removed in favor of `variantComponent()` -- `cx()` utility removed - class merging now handled via `defineConfig({ onClassesMerged })` -- Changed exports structure - now use `defineConfig()` factory pattern - -**New Features:** -- `defineConfig(options)` - Factory function for creating variants, variantPropsResolver, and variantComponent with shared configuration -- `variantComponent()` - Create React components with variants support and polymorphic rendering -- `variantPropsResolver()` - Extract variant props and resolve className from full props objects -- Enhanced render prop pattern - supports both React elements and render functions -- `forwardProps` option - Control which variant props get forwarded to DOM -- `withoutRenderProp` option - Disable render prop pattern when not needed -- Improved ref forwarding and merging with `useMergeRefs()` -- Better event handler and props composition with `mergeProps()` - -**Type System Improvements:** -- Stronger type inference for optional vs required variants -- Boolean variants automatically optional -- Variants with defaults automatically optional -- Better polymorphic component type support - -**Testing:** -- Complete comprehensive test suite with 170+ tests -- Tests for variants resolution, React components, utilities, edge cases, and TypeScript types -- Vitest + React Testing Library + tsd for type testing - -**Documentation:** -- Complete README rewrite with all new APIs and examples \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 58a3f36..f22b67b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,46 @@ # react-tailwind-variants +## 2.0.0 + +### Major Changes + +- 4285122: Complete v2 refactor with consolidated architecture and enhanced functionality + + **Breaking Changes:** + + - Complete library restructure - all functionality consolidated into single module + - `styled()` API removed in favor of `variantComponent()` + - `cx()` utility removed - class merging now handled via `defineConfig({ onClassesMerged })` + - Changed exports structure - now use `defineConfig()` factory pattern + + **New Features:** + + - `defineConfig(options)` - Factory function for creating variants, variantPropsResolver, and variantComponent with shared configuration + - `variantComponent()` - Create React components with variants support and polymorphic rendering + - `variantPropsResolver()` - Extract variant props and resolve className from full props objects + - Enhanced render prop pattern - supports both React elements and render functions + - `forwardProps` option - Control which variant props get forwarded to DOM + - `withoutRenderProp` option - Disable render prop pattern when not needed + - Improved ref forwarding and merging with `useMergeRefs()` + - Better event handler and props composition with `mergeProps()` + + **Type System Improvements:** + + - Stronger type inference for optional vs required variants + - Boolean variants automatically optional + - Variants with defaults automatically optional + - Better polymorphic component type support + + **Testing:** + + - Complete comprehensive test suite with 170+ tests + - Tests for variants resolution, React components, utilities, edge cases, and TypeScript types + - Vitest + React Testing Library + tsd for type testing + + **Documentation:** + + - Complete README rewrite with all new APIs and examples + ## 1.0.3 ### Patch Changes diff --git a/package.json b/package.json index b771077..f7e2713 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-class-variants", - "version": "2.0.0-alpha.0", + "version": "2.0.0", "description": "Type-safe React variants API for dynamic CSS class composition", "private": false, "main": "./dist/index.js",