Releases: joe-bell/cva
v1.0.0-beta.2
What's Changed
- chore: Remove Minification by @joe-bell in #282
- docs: Add LICENSE Comments by @joe-bell in #283
- chore: move clsx dependency to caret/semver range by @philwolstenholme in #316
New Contributors
- @philwolstenholme made their first contribution in #316
v0.7.1
What's Changed
- Add LICENSE Comments by @joe-bell in #283
- chore: move clsx dependency to caret/semver range by @philwolstenholme in #316
New Contributors
- @philwolstenholme made their first contribution in #316
Full Changelog: v0.7.0...v0.7.1
v0.7.0
v0.6.1
What's Changed
- Add missing
license
key inpackage.json
- Upgrade to
[email protected]
by @joe-bell in #175
Full Changelog: v0.6.0...v0.6.1
v0.6.0
What's Changed
-
cx
→clsx
by @joe-bell in #152cva
now usesclsx
under-the-hood to concatenate classes with no breaking changes to the current experience and no increase to bundle-size.The existing
cx
export still exists, but as an alias ofclsx
Bringing additional benefits of:
-
Provides additional support for booleans and variadic strings within
class
orclassName
propsconst button = cva([true && "button-base", false && "not-rendered"]); // => 'button-base' const buttonConsumer = button({ class: [true && "extra-class"] }); // => 'button-base extra-class'
-
Provides support for object syntax within
class
orclassName
propsconst button = cva({ foo: true, bar: false }); // => 'foo baz'
-
Full Changelog: v0.5.3...v0.6.0
v0.5.3
What's Changed
-
fix: issue #147 where map files are not present for esm files by @pfried in #148
Thank you @pfried!
-
fix: Added explicit undefined type to support exactOptionalPropertyTypes option by @totto2727 in #149
This has been a long standing issue for me and I'm so grateful to @totto2727 for making the fix
New Contributors
- @pfried made their first contribution in #148
- @totto2727 made their first contribution in #149
Full Changelog: v0.5.2...v0.5.3
v0.5.2
What's Changed
- Support for
moduleResolution: bundler
(addtypes
toexports
field inpackage.json
) by @msonnberger in #138
New Contributors
- @msonnberger made their first contribution in #138
Full Changelog: v0.5.1...v0.5.2
v0.5.1
What's Changed
Warning
v0.5.0
is broken, please skip straight tov0.5.1
Full Changelog: v0.4.0...v0.5.0
Support the Project 🖤
Note
I'm actually supposed to be on vacation right now, but it seems like people are desperate for TypeScript 5 support
cva is a labour of love – I don't get paid to work on this project
Contributions of any size are greatly appreciated 🙏🏼
v0.4.0
What's Changed
Features
-
Target Multiple Variant Options within Compound Variants by @joe-bell and @JeroenReumkens in #76
// components/button.ts import { cva } from "class-variance-authority"; const button = cva("…", { variants: { intent: { primary: "…", secondary: "…" }, size: { small: "…", medium: "…" }, }, compoundVariants: [ // Applied via: // `button({ intent: "primary", size: "medium" })` // or // `button({ intent: "secondary", size: "medium" })` { intent: ["primary", "secondary"], size: "medium", class: "…", }, ], });
Chores
New Contributors
- @TmLev made their first contribution in #70
- @JeroenReumkens made their first contribution in #76
Full Changelog: v0.3.0...v0.4.0