github chakra-ui/panda @pandacss/generator@0.37.2

latest releases: @pandacss/token-dictionary@0.51.1, @pandacss/types@0.51.1, @pandacss/studio@0.51.1...
9 months ago

Patch Changes

  • 74dfb3e: - Fix sva typings, the splitVariantProps was missing from the d.ts file

    • Add a getVariantProps helper to the slot recipes API (sva and config slot recipes)
    import { sva } from '../styled-system/css'
    import { getVariantProps } from '../styled-system/recipes'
    
    const button = sva({
      slots: ['root', 'icon'],
      // ...
      variants: {
        size: {
          sm: {
            // ...
          },
          md: {
            // ...
          },
        },
        variant: {
          primary: {
            // ...
          },
          danger: {
            // ...
          }
        }
      }
      defaultVariants: {
        size: 'md',
        variant: 'primary',
      }
    })
    
    // ✅ this will return the computed variants based on the defaultVariants + props passed
    const buttonProps = button.getVariantProps({ size: "sm" })
    //    ^? { size: "sm", variant: "primary" }
  • b3beef4: Make WithImportant<T> more performant and ensure typescript is happy. This changes will make code autocompletion and ts-related linting much faster than before.

  • Updated dependencies [74dfb3e]

    • @pandacss/types@0.37.2
    • @pandacss/core@0.37.2
    • @pandacss/logger@0.37.2
    • @pandacss/token-dictionary@0.37.2
    • @pandacss/is-valid-prop@0.37.2
    • @pandacss/shared@0.37.2

Don't miss a new panda release

NewReleases is sending notifications on new releases.