title | description | releaseUrl | releaseDate | version |
---|---|---|---|---|
Version 1.7.4 |
Explore the changelog for Chakra UI version 1.7.4. Learn about the latest features, bug fixes, and improvements. |
January 4, 2022 |
1.7.4 |
-
#5126
712cc3d1e
Thanks @ngxCoder! - The official Storybook Addon for Chakra UI.yarn add -D @chakra-ui/storybook-addon
npm i -D @chakra-ui/storybook-addon
Add the addon to your configuration in
.storybook/main.js
:module.exports = { addons: ["@chakra-ui/storybook-addon"], }
- #5137
e624a277a
Thanks @Patrick-Ullrich! - Improve error message when usingListItem
without wrapping inList
.
-
#4979
d5461a452
Thanks @segunadebayo! - ### Add support peer pseudo style propsYou can now style an element based on the state of its general sibling (marked with
.peer
ordata-peer
) attribute.<> <input type="checkbox" data-peer /> <Box bg="white" _peerFocus={{ bg: "green.400" }} /> </>
The peer properties you can apply are
_peerHover
,_peerFocus
,_peerFocusVisible
,_peerActive
,_peerInvalid
,_peerChecked
,_peerFocusWithin
,_peerPlaceholderShown
,_peerDisabled
Added
_placeholderShown
pseudo props for styling elements when sibling inputs have placeholder shown.Added
_ltr
pseudo props for styling elements in LTR writing mode. This is useful for products with RTL first approach.Added
_mediaReduceMotion
pseudo props to apply reduce motion styles to elements. This is useful when you need to remove CSS animations/transitions. -
#5307
213f61026
Thanks @segunadebayo! - Adds style props for CSS scroll behavior properties:scrollPadding
,scrollMargin
,scrollSnapAlign
, etc...Here's a full list of properties:
-
Scroll Behavior:
scrollBehavior
,scrollSnapAlign
,scrollSnapStop
,scrollSnapType
-
Scroll Margin:
scrollMargin
,scrollMarginTop
,scrollMarginBottom
,scrollMarginLeft
,scrollMarginRight
,scrollMarginX
,scrollMarginY
-
Scroll Padding:
scrollPadding
,scrollPaddingTop
,scrollPaddingBottom
,scrollPaddingLeft
,scrollPaddingRight
,scrollPaddingX
,scrollPaddingY
-
-
#5243
ae6fd7a25
Thanks @TimKolberger! - Use the feature flag--strict-component-types
for@chakra-ui/cli tokens
to generate strict component type for the theming propsvariant
andsize
.chakra-cli tokens --strict-component-types
// before <Button variant="abc" /> // valid type but variant is not available in the theme // after <Button variant="abc" /> // invalid // Type '"abc"' is not assignable to type '"link" | "outline" | "ghost" | "solid" | "unstyled" | undefined'.
-
#5243
ae6fd7a25
Thanks @TimKolberger! - Use the feature flag--strict-component-types
for@chakra-ui/cli tokens
to generate strict component type for the theming propsvariant
andsize
.chakra-cli tokens --strict-component-types
// before <Button variant="abc" /> // valid type but variant is not available in the theme // after <Button variant="abc" /> // invalid // Type '"abc"' is not assignable to type '"link" | "outline" | "ghost" | "solid" | "unstyled" | undefined'.
-
#5244
3f1d7cf1c
Thanks @TimKolberger! - Added token scalesblur
,borderStyles
andborderWidths
.
- #5225
e9bbe3bd1
Thanks @TimKolberger! - Fixed an issue where the cli fails whenprettier
is not installed
- Updated dependencies
- #4918
756682037
Thanks @linxianxi! - Fix issue where focus styles persists whenisDisabled
is set totrue
and checkbox has focus. - Updated dependencies
[
801008e27
,8a0e5bdbc
]
- #5259
032c2e543
Thanks @primos63! - When theEditable
component has itsstartsWithEditView
set totrue
, then focus should be set to theEditableInput
element when the component is mounted. - Updated dependencies
[
801008e27
,8a0e5bdbc
]
-
#5237
801008e27
Thanks @navarroaxel! - Add a comment aboutuseState
alternative -
#4835
8a0e5bdbc
Thanks @igorwessel! - Fixed a issue whereuseId
generated inconsistent id values between client and server (SSR).
- Updated dependencies
- #5234
bc2613a9a
Thanks @nxtman123! -useBreakpointValue
returns the correct value on first tick, ifmatchMedia
is available
-
#5296
94da4e986
Thanks @TimKolberger! - Omitdisabled
andaria-disabled
props fromMenuItemProps
types
-
#5240
f6fd9d8ac
Thanks @SamHecquet! - Addaria-describedby
to the radio props to improve accessibility
- Updated dependencies
[
ae6fd7a25
,1b8e31eba
,801008e27
,756682037
,f6fd9d8ac
,94da4e986
,3199b7242
,032c2e543
,f05f56b9a
,8a0e5bdbc
,e624a277a
,eb5850687
,bc2613a9a
]
- Updated dependencies
- #5265
1b8e31eba
Thanks @primos63! - Allow classNames specified onSlider
andSliderFilledTrack
to be added to the class list - Updated dependencies
[
801008e27
,8a0e5bdbc
]
- Updated dependencies
[
756682037
]
- Updated dependencies
-
#5298
3199b7242
Thanks @TimKolberger! - Ensure consistent line height forFormErrorMessage
andFormHelperText
-
#5297
eb5850687
Thanks @TimKolberger! - Fixed an issue where theModalFooter
was out of the viewport forsize="full"
.
-
#5228
f05f56b9a
Thanks @seancwalsh! - Fix broken link in Tooltip's JSDoc comment
- Updated dependencies
- Updated dependencies
- Updated dependencies
- Updated dependencies
- #4835
12c31713c
Thanks @igorwessel! - Upgrade@testing-library/react-hooks
to test SSR. This was used to debug and fix issues with theuseId
hook. - Updated dependencies