Skip to content

Latest commit

 

History

History
677 lines (463 loc) · 22.4 KB

v1.6.0.mdx

File metadata and controls

677 lines (463 loc) · 22.4 KB
title description releaseUrl releaseDate version
Version 1.6.0
Explore the changelog for Chakra UI version 1.6.0. Learn about the latest features, bug fixes, and improvements.
April 23, 2021
1.6.0

Major Changes

  • 82f08867f #3864 Thanks @segunadebayo! - > Note: This is an internal package.

    Improve performance of registering, filtering and finding the index of descendants in a disclosure(open/close) widget.

    Mostly used by the accordion, menu, tabs and pin-input components.

Patch Changes

Major Changes

  • e7261d536 #3841 Thanks @LekoArts! - Upgrading to this new major version is recommended for everyone as it fixes hot reloading in Gatsby (Fast Refresh). In the previous version changes to the shadowed theme.js file didn't trigger automatic reloading, and a manual reload was necessary.

    Breaking Changes

    • The isUsingColorMode option was removed. The ChakraProvider will always use the ColorModeProvider
    • The isResettingCSS option was renamed to resetCSS

    Those changes were made to use the current ChakraProvider and align the prop names.

    Improvements

    • Use ChakraProvider instead of the outdated ThemeProvider pattern
    • Add initialColorMode to the ColorModeScript
    • Allow Fast Refresh reloading of all theme files
    • Set stricter peerDependency on gatsby (to ^2.29.3 || ^3.0.0)

Minor Changes

Patch Changes

Minor Changes

Minor Changes

  • d14c97420 #3864 Thanks @segunadebayo! - - Update menu to use new descendants logic.
    • Fix issue where menu doesn't select menu item when the first item is disabled.
    • Fix issue where menu doesn't work when an input is used within it.

Patch Changes

Minor Changes

Patch Changes

Minor Changes

  • 1d5e55272 #3511 Thanks @TimKolberger! - The extendTheme function allows you to pass multiple overrides or extensions:

    import {
      extendTheme,
      withDefaultColorScheme,
      withDefaultSize,
      withDefaultVariant,
      withDefaultProps,
    } from "@chakra-ui/react"
    
    const customTheme = extendTheme(
      {
        colors: {
          brand: {
            // ...
            500: "#b4d455",
            // ...
          },
        },
      },
      withDefaultColorScheme({ colorScheme: "brand" }),
      withDefaultSize({
        size: "lg",
        components: ["Input", "NumberInput", "PinInput"],
      }),
      withDefaultVariant({
        variant: "outline",
        components: ["Input", "NumberInput", "PinInput"],
      }),
      // or all in one:
      withDefaultProps({
        defaultProps: {
          colorScheme: "brand",
          variant: "outline",
          size: "lg",
        },
        components: ["Input", "NumberInput", "PinInput"],
      }),
      // optional:
      yourCustomBaseTheme, // defaults to our chakra default theme
    )

Patch Changes

Minor Changes

Patch Changes

Minor Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

  • Updated dependencies

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

  • 1d5e55272 #3511 Thanks @TimKolberger! - The extendTheme function allows you to pass multiple overrides or extensions:

    import {
      extendTheme,
      withDefaultColorScheme,
      withDefaultSize,
      withDefaultVariant,
      withDefaultProps,
    } from "@chakra-ui/react"
    
    const customTheme = extendTheme(
      {
        colors: {
          brand: {
            // ...
            500: "#b4d455",
            // ...
          },
        },
      },
      withDefaultColorScheme({ colorScheme: "brand" }),
      withDefaultSize({
        size: "lg",
        components: ["Input", "NumberInput", "PinInput"],
      }),
      withDefaultVariant({
        variant: "outline",
        components: ["Input", "NumberInput", "PinInput"],
      }),
      // or all in one:
      withDefaultProps({
        defaultProps: {
          colorScheme: "brand",
          variant: "outline",
          size: "lg",
        },
        components: ["Input", "NumberInput", "PinInput"],
      }),
      // optional:
      yourCustomBaseTheme, // defaults to our chakra default theme
    )
  • Updated dependencies [e9ac4cc76]

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Patch Changes

Minor Changes

  • e7261d536 #3841 Thanks @LekoArts! - Updates to Gatsby-related documentation to account for the breaking changes made in PR #3841. The "Providers" section from the Gatsby guide was removed as the plugin itself handles everything already.

Patch Changes

Patch Changes

Patch Changes

  • e7261d536 #3841 Thanks @LekoArts! - Updates to Gatsby-related documentation to account for the breaking changes made in PR #3841. The "Providers" section from the Gatsby guide was removed as the plugin itself handles everything already.

  • Updated dependencies [1d5e55272, e9ac4cc76]