- The bundled
re-resizable
dependency has been updated from requiring5.0.1
to requiring^6.0.0
(#17011).
- Added a new
popoverProps
prop to theDropdown
component which allows users of theDropdown
component to pass props directly to thePopover
component. - Added and documented
hideLabelFromVision
prop toBaseControl
used bySelectControl
,TextControl
, andTextareaControl
. - Added a new
popoverProps
prop to theDropdownMenu
component which allows to pass props directly to the nestedPopover
component. - Added a new
toggleProps
prop to theDropdownMenu
component which allows to pass props directly to the nestedIconButton
component. - Added a new
menuProps
prop to theDropdownMenu
component which allows to pass props directly to the nestedNavigableMenu
component.
menuLabel
prop inDropdownComponent
has been deprecated. Consider usingmenuProps
object and itsaria-label
property instead.position
prop inDropdownComponent
has been deprecated. Consider usingpopoverProps
object and itsposition
property instead.
- The
Button
component will no longer assign default styling (is-default
class) when explicitly assigned as primary (theisPrimary
prop). This should resolve potential conflicts affecting a combination ofisPrimary
,isDefault
, andisLarge
/isSmall
, where the busy animation would appear with incorrect coloring.
- The
Popover
componentonClickOutside
prop has been deprecated. UseonFocusOutside
instead.
- The
Dropdown
component has been refactored to focus changes using thePopover
component'sonFocusOutside
prop. - The
MenuItem
component will now always use anIconButton
. This prevents a focus loss when clicking a menu item. - Package no longer depends on external
react-click-outside
library.
- Add new
BlockQuotation
block to the primitives folder to support blockquote in a multiplatform way. #15482. DropdownMenu
now supports passing a render prop as children for more advanced customization.
MenuGroup
no longer usesNavigableMenu
internally. It needs to be explicitly wrapped withNavigableMenu
to bring back the same behavior.
- Added missing documentation for
DropdownMenu
propsmenuLabel
,position
,className
.
ServerSideRender
is no longer part of components. It was extracted to an independent package@wordpress/server-side-render
.
- Although
DateTimePicker
does not allow picking the seconds, passed the current seconds as the selected value for seconds when callingonChange
. Now it passes zero.
- Added a new
HorizontalRule
component. - Added a new
Snackbar
component.
- Fixed display of reset button when using RangeControl
allowReset
prop. - Fixed minutes field of
DateTimePicker
missed '0' before single digit values.
- Added a new
render
property toFormFileUpload
component. Allowing users of the component to custom the UI for their needs. - Added a new
BaseControl.VisualLabel
component. - Added a new
preview
prop to thePlaceholder
component which allows to display a preview, for example a media preview when the Placeholder is used in media editing contexts. - Added a new
anchorRect
prop toPopover
which enables a developer to provide a customDOMRect
object at which to position the popover.
- Fix
instanceId
prop passed through toButton
component viaMenuItems
producing React console error. Fixed by removing the unnecessary use ofwithInstanceId
on theMenuItems
component #14599
- Make
RangeControl
validation rely on thecheckValidity
provided by the browsers instead of using our own validation.
- Fix a problem that made
RangeControl
not work as expected with float values.
- Added a new
Animate
component.
withFilters
has been optimized to avoid binding hook handlers for each mounted instance of the component, instead using a single centralized hook delegator.withFilters
has been optimized to reuse a single shared component definition for all filtered instances of the component.- Make
RangeControl
validate min and max properties.
- Resolves a conflict where two instance of Slot would produce an inconsistent or duplicated rendering output.
- Allow years between 0 and 1970 in DateTime component.
Dropdown
now has afocusOnMount
prop which is passed directly to the containedPopover
.DatePicker
has new propisInvalidDate
exposing react-dates'isOutsideRange
.DatePicker
allowsnull
as accepted value forcurrentDate
prop to signify no date selection.
Dropdown.refresh()
has been removed. The containedPopover
is now automatically refreshed.
- Avoid constantly recomputing the popover position.
- Remove
<DateTimePicker />
obsoletelocale
prop (and pass-through to child components) and obsoleteis12Hour
prop pass through to<DateTime />
#11649
- The
PanelColor
component has been removed.
- Adjust a11y roles for MenuItem component, so that aria-checked is used properly, related change in Editor/Components/BlockNavigationList (#11431).
Popover
components are now automatically refreshed every 0.5s in order to recalculate their size or position.
Dropdown.refresh()
has been deprecated as the containedPopover
is now automatically refreshed.
- Forward
ref
in thePanelBody
component. - Tooltip are no longer removed when Button becomes disabled, it's left to the component rendering the Tooltip.
- Forward
ref
support inTabbableContainer
andNavigableMenu
components.
AccessibleSVG
component has been removed. Please useSVG
instead.
- The
Notice
component accepts an array of action objects via theactions
prop. Each member object should contain alabel
and either aurl
link string oronClick
callback function.
- Fix importing
react-dates
stylesheet in production.
- Added a new
ColorPicker
component (#10564). MenuItem
now accepts aninfo
prop for including an extended description.
IconButton
correctly respects a passedaria-label
prop.
PanelColor
has been deprecated in favor ofwp.editor.PanelColorSettings
.
- Added a new
ResizableBox
component.
Draggable
as a DOM node drag handler has been removed. Please, useDraggable
as a wrap component for your DOM node drag handler.
- Renamed
AccessibleSVG
component toSVG
.
withAPIData
has been removed. Please use the Core Data module or@wordpress/api-fetch
directly instead.Draggable
as a DOM node drag handler has been deprecated. Please, useDraggable
as a wrap component for your DOM node drag handler.- Change how required built-ins are polyfilled with Babel 7 (#9171). If you're using an environment that has limited or no support for ES2015+ such as lower versions of IE then using core-js or @babel/polyfill will add support for these methods.
withContext
has been removed. Please usewp.element.createContext
instead. See: https://reactjs.org/docs/context.html.
- Added a new
AccessibleSVG
component.