Releases: jonambas/panda-plugin-crv
v0.3.1
What's Changed
Fixes a AST parsing issue for a missing }
bracket, resulting in invalid JS.
- chore(deps): update react monorepo by @renovate in #17
- fix(ccv): fix missing bracket for base case by @jonambas in #27
- chore(deps): update dependency @types/react to v18.3.1 by @renovate in #26
Full Changelog: v0.3.0...v0.3.1
v0.3.0
Breaking changes
Refactors AST parsing for import declarations to be more performant.
Updates ccv
usage to align with Panda's compound variant structure:
compoundVariants: [
...ccv({
variant1: 'primary',
variant2: true,
css: {
color: 'green.500',
},
}),
],
- feat(ccv)!: use Panda compound variant syntax in ccv args by @jonambas in #23
- perf: import declaration parsing by @jonambas in #24
- docs: update ccv usage by @jonambas in #25
Full Changelog: v0.2.2...v0.3.0
v0.2.2
v0.2.1
What's Changed
Reworks Panda AST parsing to statically replace the plugin's function calls. This fixes issues with template literals, functions, or expressions inside crv
and ccv
.
Full Changelog: v0.2.0...v0.2.1
v0.2.0
Adds support for responsive compound variants
This plugin now supports responsive compound variants, through a new ccv
function. Note: this can produce a large amount of compound variants and class names. Make sure your unused CSS is purged properly.
import { ccv, crv, cva } from '@/styled-system/css';
const styles = cva({
variants: {
...crv('variant1', {
primary: { bg: 'blue.500' },
secondary: { bg: 'gray.500' },
destructive: { bg: 'red.500' },
}),
...crv('variant2', {
true: { opacity: 1 },
false: { opacity: 0 },
}),
},
compoundVariants: [
...ccv(
{
variant1: 'primary',
variant2: true,
},
{
color: 'green.500',
},
),
],
});
The above code will render "green.500"
if variant1
is "primary"
and if variant2
is true
<Component variant1="primary" variant2>
// -> opacity_1 bg_blue.500 text_green.500
<Component
variant1={{ base: 'secondary', lg: 'primary' }}
variant2={{ base: false, lg: true }}
/>
// -> opacity_0 lg:opacity_1 lg:bg_blue.500 bg_gray.500 lg:text_green.500
What's Changed
- chore(deps): allow automerge by @jonambas in #11
- chore(deps): update vitest monorepo to v1.5.1 by @renovate in #12
- chore: update readme.md by @jonambas in #13
- chore(deps): remove json5 from vite-react by @jonambas in #14
- feat: support responsive compound variants by @jonambas in #16
Full Changelog: v0.1.2...v0.2.0
v0.1.2
- Now exports
splitResponsiveVariant
as an alternative tosplitCrv
. - Fixes a few edge-case errors with invalid parameters.
What's Changed
- chore(deps): update react monorepo by @renovate in #5
- chore(deps): update vitest monorepo to v1.5.0 by @renovate in #6
- chore(deps): update dependency vite to v5.2.10 by @renovate in #4
- fix: correctly split crv, handle missing styles/prop/breakpoints by @jonambas in #7
- test: add plugin entry tests by @jonambas in #8
- refactor(crv): rename splitCrv to be more verbose by @jonambas in #10
Full Changelog: v0.1.1...v0.1.2
v0.1.1
Fixes internal Panda plugin name
Full Changelog: v0.1.0...v0.1.1