Releases: nextui-org/tailwind-variants
v0.2.1
What's Changed
- fix: Support false-only variant with fallback behaviour by @lrholmes in #159
- update version to match release by @ben-hapip in #162
- fix: VariantProps doesn't type responsiveVariants in global configuration by @hoangdevnull in #160
- fix: adjust path for types by @Gomah in #164
- feat(transformer): support custom aliases by @Gomah in #169
- fix: support multi-level extend for
compoundVariants
by @mskelton in #170
New Contributors
- @lrholmes made their first contribution in #159
- @ben-hapip made their first contribution in #162
- @hoangdevnull made their first contribution in #160
- @Gomah made their first contribution in #164
Full Changelog: v0.2.0...v0.2.1
v0.2.0
What's Changed
- feat: support for
css
variables and function syntax to the tv transformer by @PatrykWalach in #122 - Treat
undefined
asfalse
for boolean variants by @mskelton in #146 - Fix ambiguous union for
ClassProp
type by @mskelton in #147 - Update to
tailwind-merge
v2 by @mskelton in #148
New Contributors
- @PatrykWalach made their first contribution in #122
Full Changelog: v0.1.20...v0.2.0
v0.1.20
v0.1.19
What's Changed
- fix: variant as array when extending by @thefalked in #123
- fix: types of the extend variants by @tianenpang in #132
New Contributors
- @thefalked made their first contribution in #123
Full Changelog: v0.1.18...v0.1.19
v0.1.18
What's Changed
Full Changelog: v0.1.17...v0.1.18
v0.1.17
What's Changed
- fix(tsconfig): add exactOptionalPropertyTypes by @douglasduteil in #97
- Fix
compoundSlots
with boolean variants by @mskelton in #119
New Contributors
- @douglasduteil made their first contribution in #97
Full Changelog: v0.1.16...v0.1.17
v0.1.16
What's Changed
- fix: compound slots with variants by @jrgarciadev in #118
Full Changelog: v0.1.15...v0.1.16
v0.1.15
What's Changed
- fix: The compoundSlots does not accept an array in the property by @Alex-Programmer-Bro in #99
- fix: align class value with tailwind-merge by @marbemac in #89
- fix: prevent extend from modifying extended slots by @mskelton in #106
- feat: support goto definition for slots by @mskelton in #116
New Contributors
- @Alex-Programmer-Bro made their first contribution in #99
- @marbemac made their first contribution in #89
Full Changelog: v0.1.14...v0.1.15
v0.1.14
What's Changed
- fix: support
false
variants when usingcompoundSlots
by @mskelton in #83 - feat: Add support for slot level variant overrides by @mskelton in #82
Slots Variant Overrides
This is useful in a variety of situations:
- Component libraries that provide slot level class name functions:
const {base,tab} = tv({...}) <Tabs className={() => base()}> <Tab className={({ isSelected }) => tab({isSelected})}> Settings </Tab> </Tabs>
- Reusing styles for vary similar components.
const {base,item} = tv({...}) <Nav className={base()}> <NavItem className={item({isActive: activeItem === 'foo'})}>foo</NavItem> <NavItem className={item({isActive: activeItem === 'bar'})}>bar</NavItem> </Nav>
Full Changelog: v0.1.13...v0.1.14
Huge thanks to @mskelton and @tianenpang 🙏🏻
v0.1.13
What's Changed
New Benchmark
TV without slots & tw-merge (enabled) x 452,002 ops/sec ±0.28% - 6.57% (% speed increased)
TV without slots & tw-merge (disabled) x 558,383 ops/sec ±0.60% - 17.41% (% speed increased)
TV with slots & tw-merge (enabled) x 311,351 ops/sec ±0.68% (99 runs sampled) - 8.01% (% speed increased)
TV with slots & tw-merge (disabled) x 359,928 ops/sec ±0.81% (93 runs sampled) - 8.61% (% speed increased)
TV without slots & custom tw-merge config x 429,622 ops/sec ±1.60% (95 runs sampled) - 4.42% (% speed increased)
TV with slots & custom tw-merge config x 393,804 ops/sec ±0.84% (96 runs sampled) - 4.94% (% speed increased)
Fastest is TV without slots & tw-merge (disabled)
New Contributors
Full Changelog: v0.1.12...v0.1.13