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

@pandacss/is-valid-prop

Package Overview
Dependencies
Maintainers
1
Versions
1150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pandacss/is-valid-prop - npm Package Versions

1
115

0.0.0-dev-20240311004936

Diff

segunadebayo
published 0.0.0-dev-20240310172521 •

segunadebayo
published 0.0.0-dev-20240310153511 •

segunadebayo
published 0.34.3 •

Changelog

Source

[0.34.3] - 2024-03-09

Fixed

Fix nested styled factory composition

import { styled } from '../styled-system/jsx'

const BasicBox = styled('div', { base: { fontSize: '10px' } })
const ExtendedBox1 = styled(BasicBox, { base: { fontSize: '20px' } })
const ExtendedBox2 = styled(ExtendedBox1, { base: { fontSize: '30px' } })

export const App = () => {
  return (
    <>
      {/* ✅ fs_10px */}
      <BasicBox>text1</BasicBox>
      {/* ✅ fs_20px */}
      <ExtendedBox1>text2</ExtendedBox1>
      {/* BEFORE: ❌ fs_10px fs_30px */}
      {/* NOW: ✅ fs_30px */}
      <ExtendedBox2>text3</ExtendedBox2>
    </>
  )
}

Added

Allow color opacity modifier when using strictTokens, e.g color: "blue.200/50" will not throw a TS error anymore

segunadebayo
published 0.0.0-dev-20240310025819 •

segunadebayo
published 0.0.0-dev-20240309183251 •

segunadebayo
published 0.34.2 •

Changelog

Source

[0.34.2] - 2024-03-08

Fixed

  • Fix strictPropertyValues with border* properties

We had listed border\* properties as affected by strictPropertyValues but they shouldn't be restricted as their syntax is too complex to be restricted. This removes any border* properties that do not specifically end with Style like borderTopStyle.

import { css } from '../styled-system/css'

css({
  borderTop: '1px solid red', // ✅ will now be fine as it should be
  borderTopStyle: 'abc', // ✅ will still report a TS error
})
  • Fix a false positive with the validation check that reported Missing token when using a color opacity modifier in config tokens or semanticTokens
import { defineConfig } from '@pandacss/dev'

export default defineConfig({
  validation: 'warn',
  conditions: {
    light: '.light &',
    dark: '.dark &',
  },
  theme: {
    tokens: {
      colors: {
        blue: { 500: { value: 'blue' } },
        green: { 500: { value: 'green' } },
      },
      opacity: {
        half: { value: 0.5 },
      },
    },
    semanticTokens: {
      colors: {
        secondary: {
          value: {
            base: 'red',
            _light: '{colors.blue.500/32}',
            _dark: '{colors.green.500/half}',
          },
        },
      },
    },
  },
})

Would incorrectly report:

  • [tokens] Missing token: colors.green.500/half used in config.semanticTokens.colors.secondary
  • [tokens] Missing token: colors.blue.500/32 used in config.semanticTokens.colors.secondary

Added

Allow using namespaced imports

import * as p from 'styled-system/patterns'
import * as recipes from 'styled-system/recipes'
import * as panda from 'styled-system/css'

// this will now be extracted
p.stack({ mt: '40px' })

recipes.cardStyle({ rounded: true })

panda.css({ color: 'red' })
panda.cva({ base: { color: 'blue' } })
panda.sva({ base: { root: { color: 'green' } } })
segunadebayo
published 0.0.0-dev-20240308231814 •

segunadebayo
published 0.0.0-dev-20240308225535 •

segunadebayo
published 0.0.0-dev-20240308132224 •

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