Skip to content

Releases: jonambas/panda-plugin-crv

v0.3.1

26 Apr 22:48
Compare
Choose a tag to compare

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

26 Apr 19:03
Compare
Choose a tag to compare

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',
    },
  }),
],

Full Changelog: v0.2.2...v0.3.0

v0.2.2

26 Apr 16:40
Compare
Choose a tag to compare

What's Changed

Fixes an issue with ccv not generating variant keys with breakpoints

  • fix: ccv generates the right variant keys with breakpoints, adds tests by @jonambas in #22

Full Changelog: v0.2.1...v0.2.2

v0.2.1

26 Apr 15:07
Compare
Choose a tag to compare

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.

  • fix: complex and nested object parsing by @jonambas in #21

Full Changelog: v0.2.0...v0.2.1

v0.2.0

25 Apr 19:09
Compare
Choose a tag to compare

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

Full Changelog: v0.1.2...v0.2.0

v0.1.2

21 Apr 14:36
Compare
Choose a tag to compare
  • Now exports splitResponsiveVariant as an alternative to splitCrv.
  • 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

20 Apr 00:28
Compare
Choose a tag to compare

Fixes internal Panda plugin name

Full Changelog: v0.1.0...v0.1.1

v0.1.0

20 Apr 00:26
Compare
Choose a tag to compare

What's Changed

  • chore(deps): pin dependencies by @renovate in #1
  • chore(deps): update dependency @playwright/test to v1.43.1 by @renovate in #2
  • docs: update readme.md by @jonambas in #3

New Contributors

Full Changelog: https://github.com/jonambas/panda-plugin-crv/commits/v0.1.0