Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pandacss/logger

Package Overview
Dependencies
Maintainers
1
Versions
1132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pandacss/logger - npm Package Versions

1
114

0.0.0-dev-20240409220115

Diff

segunadebayo
published 0.37.2 •

Changelog

Source

[0.37.2] - 2024-04-05

Fixed

  • fix: build correct path for debug files on windows
  • Add missing type PatternProperties to solve a TypeScript issue (The inferred type of xxx cannot be named without a reference)
  • Fix sva typings, the splitVariantProps was missing from the d.ts file

Added

  • 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" }

Changed

  • Make WithImportant<T> more performant and ensure typescript is happy. This changes will make code autocompletion and ts-related linting much faster than before.
segunadebayo
published 0.0.0-dev-20240405065931 •

segunadebayo
published 0.0.0-dev-20240404161354 •

segunadebayo
published 0.0.0-dev-20240403210529 •

segunadebayo
published 0.0.0-dev-20240403123832 •

segunadebayo
published 0.0.0-dev-20240403113532 •

segunadebayo
published 0.37.1 •

Changelog

Source

[0.37.1] - 2024-04-02

Fixed

  • Improve token validation logic to parse references in tokens and compositve values like borders and shadows which could be objects.
  • Fix issue where setting the pattern jsx option with dot notation didn't work.
import { defineConfig } from '@pandacss/dev'

export default defineConfig({
  // ...
  patterns: {
    extend: {
      grid: {
        jsx: ['Form.Group', 'Grid'],
      },
      stack: {
        jsx: ['Form.Action', 'Stack'],
      },
    },
  },
})
  • Fix an issue where the compoundVariants classes would not be present at runtime when using config recipes
// panda.config.ts
import { defineConfig } from '@pandacss/dev'

export default defineConfig({
  theme: {
    extend: {
      recipes: {
        button: {
          // ...
          variants: {
            size: {
              sm: {
                fontSize: 'sm',
              },
              // ...
            },
          },
          compoundVariants: [
            {
              size: 'sm',
              css: { color: 'blue.100'},
            },
          ],
        },
      },
    },
  },
})

// app.tsx
const Button = styled('button', button)

const App = () => {
  return (
    // ❌ this would only have the classes `button button--size_sm`
    // the `text_blue` was missing
    // ✅ it's now fixed -> `button button--size_sm text_blue`
    <Button size="sm">Click me</Button>
  )
}

Added

  • Add a getVariantProps helper to the recipes API (cva and config recipes)
import { cva } from '../styled-system/css'
import { getVariantProps } from '../styled-system/recipes'

const button = cva({
    // ...
  variants: {
    size: {
      sm: {
        fontSize: 'sm',
      },
      md: {
        fontSize: 'md',
      },
    },
    variant: {
      primary: {
        backgroundColor: 'blue.500',
      },
      danger: {
        backgroundColor: 'red.500',
      }
    }
  }
  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" }

Changed

Public changes: Some quality of life fixes for the Studio:

  • Handle displaying values using the [xxx] escape-hatch syntax for textStyles in the studio
  • Display an empty state when there's no token in a specific token page in the studio

(mostly) Internal changes:

  • Add deepResolveReference in TokenDictionary, helpful to get the raw value from a semantic token by recursively traversing the token references.
  • Added some exports in the @pandacss/token-dictionary package, mostly useful when building tooling around Panda (Prettier/ESLint/VSCode plugin etc)
segunadebayo
published 0.0.0-dev-20240402215554 •

segunadebayo
published 0.0.0-dev-20240402212239 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc