Repository navigation
v3.5.0
Full web changelog · Documentation
npm install reshaped
NumberField
We've added a new NumberField component for working with numerical values.
It's built on top of TextField, inheriting most of its props.
In addition, it includes controls for adjusting the value and props for setting boundaries and step size.
Headless utilities
Starting with this release, we're exposing more internal headless utilities to help you build fully custom components.
The main highlight is the TrapFocus utility class, which lets you easily trap focus within a specific content area.
In addition to existing trap focus modes like dialog and action-menu, we've added a new action-bar mode.
It supports keyboard navigation using the ArrowLeft and ArrowRight keys.
We're also exposing two more internal hooks.
useOnClickOutside lets you handle clicks outside the given refs.
useHandlerRef helps with memoizing event handlers passed to your custom components as props.
Form field sizes
We're adding more supported sizes across all input components, aligning them better between each other and providing better support for dense user interfaces, like data-rich admin interfaces.
All sizes support responsive property syntax, allowing you to easily change it based on the application viewport.
Checkbox: AddedsmallandlargesizesRadio: AddedsmallandlargesizesSwitch: Aligned the size styles and added responsive syntax supportSelect: AddedsmallsizeTextField: AddedsmallsizePinField: Addedsmallsize
Calendar dates selection
Calendar now supports selecting individual dates.
You can pick multiple standalone dates instead of being limited to a single date or a date range.
Other improvements
- React: Added
displayNameto all components to show their name in React developer tools accurately for production builds - Autocomplete: Improved focus handling when clicking on disabled autocomplete items #402
- Avatar: Added an
imageAttributesproperty support #399 - Avatar: Relaxed typings related to the avatar content type
- Avatar: Added a
renderImageproperty for integrating with framework image components, likenext/image#399 - DropdownMenu: Added
classNamesupport forDropdownMenu.Item - FormControl: Made label element inline to avoid label events when clicking on the empty space
- Icon: Added svg vertical alignment in case svg content is smaller that the icon size #397
- Image: Added a
renderImageproperty for integrating with framework image components, likenext/image#399 - Popover: Fixed outside click detection to correctly track clicked components that get unmounted #394
- TextField: Added
inputAttributes.classNamesupport - useScrollLock: Fixed a race condition for nested locks when using it with a container option