Skip to content

Releases: heroui-inc/tailwind-variants

v0.1.14

02 Sep 15:40
Compare
Choose a tag to compare

What's Changed

  • fix: support false variants when using compoundSlots 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:

  1. Component libraries that provide slot level class name functions:
    const {base,tab} = tv({...})
    
    <Tabs className={() => base()}>
      <Tab className={({ isSelected }) => tab({isSelected})}>
        Settings
      </Tab>
    </Tabs>
  2. 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

11 Jul 21:00
Compare
Choose a tag to compare

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

v0.1.12

10 Jul 22:07
Compare
Choose a tag to compare

What's Changed

  • Custom tailwind merge config cache fixed
  • Performance improvements added

Benchmark

TV without slots & tw-merge (enabled) x 424,170 ops/sec Β±0.15% (95 runs sampled)
TV without slots & tw-merge (disabled) x 475,632 ops/sec Β±1.07% (93 runs sampled)
TV with slots & tw-merge (enabled) x 288,266 ops/sec Β±1.09% (96 runs sampled)
TV with slots & tw-merge (disabled) x 331,401 ops/sec Β±0.69% (95 runs sampled)
TV without slots & custom tw-merge config x 411,441 ops/sec Β±0.53% (98 runs sampled)
TV with slots & custom tw-merge config x 375,262 ops/sec Β±0.20% (102 runs sampled)

Fastest is TV without slots & tw-merge (disabled)

v0.1.11

10 Jul 00:44
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.1.10...v0.1.11

v0.1.10

30 Jun 00:49
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.1.8...v0.1.10

v0.1.9

29 Jun 19:56
Compare
Choose a tag to compare

What's Changed

  • Fix Tailwind Merge config, partial values accepted

v0.1.7

16 Jun 19:02
44c9584
Compare
Choose a tag to compare

What's Changed

  • Fix VariantProps are of type any by @zwagnr in #60
  • Fix support typescript 5.1.3 by @tianenpang in #62

New Contributors

  • @zwagnr made their first contribution in #60

Full Changelog: v0.1.6...v0.1.7

v0.1.6

07 Jun 00:28
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.1.5...v0.1.6

v0.1.5

29 Apr 21:04
Compare
Choose a tag to compare

What's Changed

Performance improvement. πŸš€

  • Use TVReturnType to prevent circular references by @mskelton in #39

Before

Screen.Recording.2023-04-25.at.9.28.41.PM.mov

After

Screen.Recording.2023-04-25.at.9.29.23.PM.mov

New Contributors

Huge thanks to @mskelton πŸš€

Full Changelog: v0.1.3...v0.1.5

v0.1.3

22 Apr 15:05
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.1.2...v0.1.3