Repository navigation
v2.11.0
Full web changelog · Documentation
npm install reshaped
PinField component
<FormControl>
<FormControl.Label>Pin code</FormControl.Label>
<PinField name="pin" defaultValue="2543" />
</FormControl>We've added a new PinField component for handling one-time passwords and other numeric or alphabetic codes.
It works based on a native input element, supports controlled/uncontrolled modes and has an extensive keyboard support for managing the input focus and selection.
Toast boundaries
Based on the community request, we have added Toast rendering boundaries.
Anywhere in your application, you can wrap an area with a separate ToastProvider to make notifications render based on that area boundaries.
function Boundary() {
const ChildComponent = () => {
const toast = useToast();
return (
<Button
onClick={() => {
toast.show({
text: "Notification sent",
});
}}
>
Show notification
</Button>
);
};
return (
<View backgroundColor="neutral-faded" padding={10} width="600px" maxWidth="100%" borderRadius="medium">
<ToastProvider>
<ChildComponent />
</ToastProvider>
</View>
);
}Other improvements
- Updated Commitlint, Storybook and Chromatic to the latest major versions
- Fixed a build error caused the
FormControlfiles naming when working with Vite - Updated Vite integration guide #238
- Actionable: improved the form submission logic for the submit
typebuttons with a customonClick - Breadcrumbs: added a
disabledExpandproperty to render static breadcrumbs inside other clickable elements #227 - Calendar: fixed edge cases of assigning the correct
tabIndexto the day cells - Card: improved the padding logic to include the border width into its calculations
- DropdownMenu: simplified the handling of keyboard and mouse click events combination
- Modal: added
overlayClassNameproperty #229 - Modal: improved the scrollable content handling when using swipe-to-close functionality #242
- Pagination: added tabular number styles to avoid the page button size changes during navigation
- Slider: added tabular number styles to avoid the tooltip size changes
- Slider: added float values rounding #228
- Table: removed content wrapping for the cells using the
autowidth - Tabs: added smooth transition for the Tab list fades whenever it doesn't fit into the viewport
- Tabs: improved the selection element transition
- Tabs: updated the triggers font-weight to medium to match other clickable elements
- TextField: removed
focus-withinstyles from the root elements whenever a button is focused in one of its slots - View: fixed dividers rendering incorrectly when nested inside
React.Fragment#226 - View: improved the padding logic to include the border width into its calculations
- useHotkeys: added a
disabledoption to control the hotkeys availability based on your local state - useHotkeys: added a
preventDefaultoption to automatically prevent the default behavior of the binded hotkeys - useHotkeys: improved the cleanup of the triggered hotkeys when pressing the
metakey