github chakra-ui/panda @pandacss/token-dictionary@0.38.0

latest releases: @pandacss/types@1.3.0, @pandacss/token-dictionary@1.3.0, @pandacss/extractor@1.3.0...
16 months ago

Minor Changes

  • bc09d89: Add support for deprecating tokens, utilities, patterns and config recipes.

    Set the deprecated property to true to enable deprecation warnings. Alternatively, you can also set it to a string
    to provide a custom migration message.

    Deprecating a utility

    defineConfig({
      utilities: {
        ta: {
          deprecated: true,
          transform(value) {
            return { textAlign: value };
          },
        },
      },
    });

    Deprecating a token

    defineConfig({
      theme: {
        tokens: {
          spacing: {
            lg: { value: "8px", deprecated: "use `8` instead" },
          },
        },
      },
    });

    Deprecating a pattern

    defineConfig({
      patterns: {
        customStack: {
          deprecated: true,
        },
      },
    });

    Deprecating a recipe

    defineConfig({
      theme: {
        recipes: {
          btn: {
            deprecated: "will be removed in v2.0",
          },
        },
      },
    });

    ESLint Plugin

    These deprecation warnings will translated into the ESLint plugin as a no-deprecated rule.

    {
      "rules": {
        "no-deprecated": "warn"
      }
    }

    In the next release of the ESLint plugin, you will get a warning when using deprecated tokens or utilities.

Patch Changes

  • Updated dependencies [96b47b3]
  • Updated dependencies [bc09d89]
  • Updated dependencies [2c8b933]
    • @pandacss/types@0.38.0
    • @pandacss/shared@0.38.0
    • @pandacss/logger@0.38.0

Don't miss a new panda release

NewReleases is sending notifications on new releases.