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

latest releases: @pandacss/types@0.53.0, @pandacss/preset-panda@0.53.0, @pandacss/token-dictionary@0.53.0...
19 months ago

Patch Changes

  • cd912f3: Fix definePattern module overriden type, was missing an extends constraint which lead to a type error:

    styled-system/types/global.d.ts:14:58 - error TS2344: Type 'T' does not satisfy the constraint 'PatternProperties'.
    
    14   export function definePattern<T>(config: PatternConfig<T>): PatternConfig
                                                                ~
    
      styled-system/types/global.d.ts:14:33
        14   export function definePattern<T>(config: PatternConfig<T>): PatternConfig
                                           ~
        This type parameter might need an `extends PatternProperties` constraint.
    
    
  • dc4e80f: Export isCssProperty helper function from styled-system/jsx

  • 5bd88c4: Fix JSX recipe extraction when multiple recipes were used on the same component, ex:

    const ComponentWithMultipleRecipes = ({ variant }) => {
      return (
        <button className={cx(pinkRecipe({ variant }), greenRecipe({ variant }), blueRecipe({ variant }))}>Hello</button>
      )
    }

    Given a panda.config.ts with recipes each including a common jsx tag name, such as:

    recipes: {
        pinkRecipe: {
            name: 'pinkRecipe',
            jsx: ['ComponentWithMultipleRecipes'],
            base: { color: 'pink.100' },
            variants: {
                variant: {
                small: { fontSize: 'sm' },
                },
            },
        },
        greenRecipe: {
            name: 'greenRecipe',
            jsx: ['ComponentWithMultipleRecipes'],
            base: { color: 'green.100' },
            variants: {
                variant: {
                small: { fontSize: 'sm' },
                },
            },
        },
        blueRecipe: {
            name: 'blueRecipe',
            jsx: ['ComponentWithMultipleRecipes'],
            base: { color: 'blue.100' },
            variants: {
                variant: {
                small: { fontSize: 'sm' },
                },
            },
        },
    },

    Only the first matching recipe would be noticed and have its CSS generated, now this will properly generate the CSS
    for each of them

  • ef1dd67: Fix issue where staticCss did not generate all variants in the array of css rules

  • b50675c: Refactor parser to support extracting css prop in JSX elements correctly.

  • Updated dependencies [12c900e]

  • Updated dependencies [5bd88c4]

  • Updated dependencies [ef1dd67]

  • Updated dependencies [b50675c]

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

Don't miss a new panda release

NewReleases is sending notifications on new releases.