Minor Changes
-
da7c333: Add
PropsProviderandusePropsContexttocreateSlotRecipeContext. A group component can now set variant
props once for every compound component inside it.PropsProvideris typed to take avaluein every framework.const { PropsProvider } = createSlotRecipeContext(card) function CardGroup(props) { const [variantProps, restProps] = card.splitVariantProps(props) return ( <PropsProvider value={variantProps}> <div {...restProps} /> </PropsProvider> ) }
<CardGroup size="lg"> <Card.Root>...</Card.Root> <Card.Root>...</Card.Root> </CardGroup>
Patch Changes
- 0a95d5d: Convert v1 array conditions (
hover: ['@media (hover: hover)', '&:hover']) to the@slotobject form with a
warning, instead of failing to load the config. - e71a5ed: Fix tokens in custom categories (like
theme.tokens.iconSizes) being dropped. They now emit CSS variables
and work with{iconSizes.sm},token()and custom utilities, as in v1. - 4bc239a: Fix a prop passed as
undefinedoverriding its value fromdefaultPropsorPropsProvider. - e899f53: Fix
Unexpected JSX expressionwarnings for JSX inside.js,.mjsand.cjsfiles. Styles in those files
are now extracted. - 9d5077d: Fix
prefer-tokenreporting negative spacing tokens (marginTop: '-2') and color opacity modifiers
(red.500/40) as hardcoded values.resolveUtilityValue()now returns thetokensa value references. - d5fb171: Remove
pure_helper_unevaluatedwarnings, which could fail builds even when the selected styles were fully
extracted. Fix duplicatedeprecated_token_usedwarnings for the same token call. - 1744ddd: Fix
staticCssignoring a custom utility'stransform. Values generated throughstaticCss.cssor
staticCss.patternsnow emit the transformed styles instead ofexample: b. - Updated dependencies [e9d19e3]
- @pandacss/config@2.2.0
- @pandacss/compiler-shared@2.2.0
- @pandacss/types@2.2.0