Colors index reference
You can now reference colors from theme by index in all components:
use-form touched and dirty state
use-form hook now exposes fields touched and dirty state:
RichTextEditor formats
RichTextEditor component now supports formats prop to restrict formats
that user can use in the editor.
In the following example three formats are enabled: bold, italic and underline,
toolbar includes italic and underline controls, bold format can be added with Ctrl + B keyboard
shortcut, other formats are not available:
use-text-selection hook
use-text-selection allows to get current selected text on the page:
use-debounced-state hook
use-debounced-state is an alternative for use-debounced-value for uncontrolled components:
Minimal Next.js template
You can now use minimal Next.js template that includes only basic server side rendering setup. It is useful when you want to set up your own tooltip (configuration for Jest, Storybook, ESLint, prettier and other tools is not included).
Other changes
- New theme functions:
theme.fn.primaryShadeandtheme.fn.primaryColor - Text component now supports
strikethroughanditalicprops to add text-decoration and font-style styles. - Text component now supports
spanprop as a shorthand forcomponent="span". - Carousel component now support keyboard events (switching slides with right/left arrows)
- Accordion.Control component now has
data-activeattribute whenAccordion.Itemis expanded - RichTextEditor now uses
valueinstead ofdefaultValueto manage state, note that component does not support react strict mode - Spotlight now supports
disabledprop to prevent spotlight rendering when the prop is set totrue - Select and MultiSelect components now support
readOnlyprop - use-toggle hook can now be called without options, it will use boolean values by default
- Spotlight now supports
searchInputPropsprop that spreads props to search input - Popover.Dropdown now has
data-positionattribute with current position