Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
769 changes: 32 additions & 737 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/components/src/composite/group-label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { CompositeGroupLabelProps } from './types';
export const CompositeGroupLabel = forwardRef<
HTMLDivElement,
WordPressComponentProps< CompositeGroupLabelProps, 'div', false >
>( function CompositeGroupLabel( props, ref ) {
>( function UnforwardedCompositeGroupLabel( props, ref ) {
const context = useCompositeContext();
const isWithinGroup = useCompositeGroupContext();

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/composite/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { CompositeGroupProps } from './types';
export const CompositeGroup = forwardRef<
HTMLDivElement,
WordPressComponentProps< CompositeGroupProps, 'div', false >
>( function CompositeGroup( props, ref ) {
>( function UnforwardedCompositeGroup( props, ref ) {
const context = useCompositeContext();
const { children, ...restProps } = props;

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/composite/hover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { CompositeHoverProps } from './types';
export const CompositeHover = forwardRef<
HTMLDivElement,
WordPressComponentProps< CompositeHoverProps, 'div', false >
>( function CompositeHover( props, ref ) {
>( function UnforwardedCompositeHover( props, ref ) {
const context = useCompositeContext();

// @ts-expect-error The store prop is undocumented and only used by the
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/composite/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const Composite = Object.assign(
forwardRef<
HTMLDivElement,
WordPressComponentProps< CompositeProps, 'div', false >
>( function Composite(
>( function UnforwardedComposite(
{
// Composite store props
activeId,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/composite/item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { CompositeItemProps } from './types';
export const CompositeItem = forwardRef<
HTMLButtonElement,
WordPressComponentProps< CompositeItemProps, 'button', false >
>( function CompositeItem( props, ref ) {
>( function UnforwardedCompositeItem( props, ref ) {
const context = useCompositeContext();

// @ts-expect-error The store prop is undocumented and only used by the
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/composite/row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { CompositeRowProps } from './types';
export const CompositeRow = forwardRef<
HTMLDivElement,
WordPressComponentProps< CompositeRowProps, 'div', false >
>( function CompositeRow( props, ref ) {
>( function UnforwardedCompositeRow( props, ref ) {
const context = useCompositeContext();

// @ts-expect-error The store prop is undocumented and only used by the
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/composite/typeahead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { CompositeTypeaheadProps } from './types';
export const CompositeTypeahead = forwardRef<
HTMLDivElement,
WordPressComponentProps< CompositeTypeaheadProps, 'div', false >
>( function CompositeTypeahead( props, ref ) {
>( function UnforwardedCompositeTypeahead( props, ref ) {
const context = useCompositeContext();

// @ts-expect-error The store prop is undocumented and only used by the
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/menu/checkbox-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { useMenuItemHideOnClick } from './use-menu-item-hide-on-click';
export const CheckboxItem = forwardRef<
HTMLDivElement,
WordPressComponentProps< CheckboxItemProps, 'div', false >
>( function CheckboxItem(
>( function UnforwardedCheckboxItem(
{ suffix, children, disabled = false, hideOnClick = false, ...props },
ref
) {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/menu/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as Styled from './styles';
export const Group = forwardRef<
HTMLDivElement,
WordPressComponentProps< GroupProps, 'div', false >
>( function Group( props, ref ) {
>( function UnforwardedGroup( props, ref ) {
const menuContext = useContext( Context );

if ( ! menuContext?.store ) {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/menu/item-help-text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as Styled from './styles';
export const ItemHelpText = forwardRef<
HTMLSpanElement,
WordPressComponentProps< { children: React.ReactNode }, 'span', true >
>( function ItemHelpText( props, ref ) {
>( function UnforwardedItemHelpText( props, ref ) {
const menuContext = useContext( Context );

if ( ! menuContext?.store ) {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/menu/item-label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as Styled from './styles';
export const ItemLabel = forwardRef<
HTMLSpanElement,
WordPressComponentProps< { children: React.ReactNode }, 'span', true >
>( function ItemLabel( props, ref ) {
>( function UnforwardedItemLabel( props, ref ) {
const menuContext = useContext( Context );

if ( ! menuContext?.store ) {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/menu/item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useMenuItemHideOnClick } from './use-menu-item-hide-on-click';
export const Item = forwardRef<
HTMLDivElement,
WordPressComponentProps< ItemProps, 'div', false >
>( function Item(
>( function UnforwardedItem(
{
prefix,
suffix,
Expand Down
5 changes: 4 additions & 1 deletion packages/components/src/menu/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import { Context } from './context';
export const Popover = forwardRef<
HTMLDivElement,
WordPressComponentProps< PopoverProps, 'div', false >
>( function Popover( { gutter, shift, modal = true, ...otherProps }, ref ) {
>( function UnforwardedPopover(
{ gutter, shift, modal = true, ...otherProps },
ref
) {
const menuContext = useContext( Context );

// Extract the side from the applied placement — useful for animations.
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/menu/radio-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const radioCheck = (
export const RadioItem = forwardRef<
HTMLDivElement,
WordPressComponentProps< RadioItemProps, 'div', false >
>( function RadioItem(
>( function UnforwardedRadioItem(
{ suffix, children, disabled = false, hideOnClick = false, ...props },
ref
) {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/menu/separator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as Styled from './styles';
export const Separator = forwardRef<
HTMLHRElement,
WordPressComponentProps< SeparatorProps, 'hr', false >
>( function Separator( props, ref ) {
>( function UnforwardedSeparator( props, ref ) {
const menuContext = useContext( Context );

if ( ! menuContext?.store ) {
Expand Down
8 changes: 4 additions & 4 deletions packages/components/src/menu/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export const WithSubmenu: StoryObj< typeof Menu > = {
};

export const WithCheckboxes: StoryObj< typeof Menu > = {
render: function WithCheckboxes( props: Props ) {
render: function WithCheckboxesRender( props: Props ) {
const [ isAChecked, setAChecked ] = useState( false );
const [ isBChecked, setBChecked ] = useState( true );
const [ multipleCheckboxesValue, setMultipleCheckboxesValue ] =
Expand Down Expand Up @@ -317,7 +317,7 @@ export const WithCheckboxes: StoryObj< typeof Menu > = {
};

export const WithRadios: StoryObj< typeof Menu > = {
render: function WithRadios( props: Props ) {
render: function WithRadiosRender( props: Props ) {
const [ radioValue, setRadioValue ] = useState( 'two' );
const onRadioChange: React.ComponentProps<
typeof Menu.RadioItem
Expand Down Expand Up @@ -389,7 +389,7 @@ export const WithRadios: StoryObj< typeof Menu > = {
};

export const WithModal: StoryObj< typeof Menu > = {
render: function WithModal( props: Props ) {
render: function WithModalRender( props: Props ) {
const [ isModalOpen, setModalOpen ] = useState( false );

return (
Expand Down Expand Up @@ -566,7 +566,7 @@ export const ToolbarVariant: StoryObj< typeof Menu > = {
};

export const InsideModal: StoryObj< typeof Menu > = {
render: function InsideModal( props: Props ) {
render: function InsideModalRender( props: Props ) {
const [ isModalOpen, setModalOpen ] = useState( false );
return (
<>
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/menu/submenu-trigger-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as Styled from './styles';
export const SubmenuTriggerItem = forwardRef<
HTMLDivElement,
WordPressComponentProps< ItemProps, 'div', false >
>( function SubmenuTriggerItem( { suffix, ...otherProps }, ref ) {
>( function UnforwardedSubmenuTriggerItem( { suffix, ...otherProps }, ref ) {
const menuContext = useContext( Context );

if ( ! menuContext?.store.parent ) {
Expand Down
5 changes: 4 additions & 1 deletion packages/components/src/menu/trigger-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import { Context } from './context';
export const TriggerButton = forwardRef<
HTMLDivElement,
WordPressComponentProps< TriggerButtonProps, 'button', false >
>( function TriggerButton( { children, disabled = false, ...props }, ref ) {
>( function UnforwardedTriggerButton(
{ children, disabled = false, ...props },
ref
) {
const menuContext = useContext( Context );

if ( ! menuContext?.store ) {
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/tabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function internalToExternalTabId(
* It is responsible for managing the state of the tabs, and rendering one instance of the `Tabs.TabList` component and one or more instances of the `Tab.TabPanel` component.
*/
export const Tabs = Object.assign(
function Tabs( {
function TabsRoot( {
selectOnMove = true,
defaultTabId,
orientation = 'horizontal',
Expand All @@ -46,7 +46,7 @@ export const Tabs = Object.assign(
defaultActiveTabId,
onActiveTabIdChange,
}: TabsProps ) {
const instanceId = useInstanceId( Tabs, 'tabs' );
const instanceId = useInstanceId( TabsRoot, 'tabs' );
const store = Ariakit.useTabStore( {
selectOnMove,
orientation,
Expand Down
5 changes: 4 additions & 1 deletion packages/components/src/tabs/tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import type { WordPressComponentProps } from '../context';
export const Tab = forwardRef<
HTMLButtonElement,
Omit< WordPressComponentProps< TabProps, 'button', false >, 'id' >
>( function Tab( { children, tabId, disabled, render, ...otherProps }, ref ) {
>( function UnforwardedTab(
{ children, tabId, disabled, render, ...otherProps },
ref
) {
const { store, instanceId } = useTabsContext() ?? {};

if ( ! store ) {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/tabs/tablist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function useScrollRectIntoView(
export const TabList = forwardRef<
HTMLDivElement,
WordPressComponentProps< TabListProps, 'div', false >
>( function TabList( { children, ...otherProps }, ref ) {
>( function UnforwardedTabList( { children, ...otherProps }, ref ) {
const { store } = useTabsContext() ?? {};

const selectedId = useStoreState( store, 'selectedId' );
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/tabs/tabpanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { WordPressComponentProps } from '../context';
export const TabPanel = forwardRef<
HTMLDivElement,
Omit< WordPressComponentProps< TabPanelProps, 'div', false >, 'id' >
>( function TabPanel(
>( function UnforwardedTabPanel(
{ children, tabId, focusable = true, ...otherProps },
ref
) {
Expand Down
4 changes: 2 additions & 2 deletions packages/compose/src/hooks/use-dragging/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ export default function useDragging( {
}, [] );

const endDrag = useCallback(
function endDrag( event?: MouseEvent ): void {
function handleEndDrag( event?: MouseEvent ): void {
eventsRef.current.onDragEnd?.( event );
document.removeEventListener( 'mousemove', onMouseMove );
document.removeEventListener( 'mouseup', endDrag );
document.removeEventListener( 'mouseup', handleEndDrag );
setIsDragging( false );
},
[ onMouseMove ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ interface GridItemProps< Item > extends HTMLAttributes< HTMLDivElement > {
}

const GridItem = forwardRef< HTMLDivElement, GridItemProps< any > >(
function GridItem(
function UnforwardedGridItem(
{
view,
selection,
Expand Down Expand Up @@ -120,7 +120,7 @@ const GridItem = forwardRef< HTMLDivElement, GridItemProps< any > >(
[ forwardedRef ]
);
useIntersectionObserver( elementRef, posinset );
const instanceId = useInstanceId( GridItem );
const instanceId = useInstanceId( UnforwardedGridItem );

const isSelected = selection.includes( id );

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### Bug Fixes

- Pin `typescript-eslint` to `8.60.0`, whose peer range includes TypeScript 6.0. Later versions report `const Foo = forwardRef( function Foo() {} )` under `@typescript-eslint/no-shadow` ([#83754](https://github.com/WordPress/gutenberg/pull/83754)).
- Update `typescript-eslint` to `^8.70.1`, whose peer range includes TypeScript 6.0 ([#83754](https://github.com/WordPress/gutenberg/pull/83754)).

## 27.0.0 (2026-09-23)

Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@
"eslint-plugin-react-hooks": "^7.1.1",
"globals": "^16.0.0",
"requireindex": "^1.2.0",
"typescript-eslint": "8.60.0"
"typescript-eslint": "^8.70.1"
},
"devDependencies": {
"@types/eslint": "^9",
"@types/estree": "^1.0.8",
"@typescript-eslint/parser": "8.60.0",
"@typescript-eslint/parser": "^8.70.1",
"eslint": "^10.0.0",
"typescript": "npm:@typescript/typescript6@^6.0.2",
"vitest": "^5.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/src/dashboard-grid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const NO_SORT_STRATEGY = () => null;
* @param ref Forwarded to the grid's root `<div>`.
*/
export const DashboardGrid = forwardRef< HTMLDivElement, DashboardGridProps >(
function DashboardGrid( props, ref ) {
function UnforwardedDashboardGrid( props, ref ) {
const {
layout,
columns,
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/src/dashboard-lanes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const NO_SORT_STRATEGY = () => null;
* @param ref Forwarded to the surface's root `<div>`.
*/
export const DashboardLanes = forwardRef< HTMLDivElement, DashboardLanesProps >(
function DashboardLanes( props, ref ) {
function UnforwardedDashboardLanes( props, ref ) {
const {
layout,
columns,
Expand Down
5 changes: 4 additions & 1 deletion packages/theme/src/color-ramps/stories/ramp-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ function ColorSample( {
}

export const RampTable = forwardRef< HTMLDivElement, RampTableProps >(
function RampTable( { label, ramps, warnings = [] }, forwardedRef ) {
function UnforwardedRampTable(
{ label, ramps, warnings = [] },
forwardedRef
) {
const hasAdjustedSeed = ramps.some( ( { seed, ramp } ) =>
isSeedAdjusted( seed.value, ramp[ seed.name ] )
);
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/alert-dialog/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ function sleep( ms: number ) {
* reopens.
*/
export const AsyncConfirm: Story = {
render: function AsyncConfirm( args ) {
render: function AsyncConfirmRender( args ) {
const [ shouldFail, setShouldFail ] = useState( false );
const successId = useId();
const failureId = useId();
Expand Down Expand Up @@ -374,7 +374,7 @@ export const Scrollable: Story = {
* from code or from a non-standard trigger element.
*/
export const Controlled: Story = {
render: function Controlled( args ) {
render: function ControlledRender( args ) {
const [ isOpen, setIsOpen ] = useState( false );

return (
Expand Down
33 changes: 16 additions & 17 deletions packages/ui/src/badge/badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@ import { Text } from '../text';
/**
* A badge component for displaying labels with semantic intent.
*/
export const Badge = forwardRef< HTMLSpanElement, BadgeProps >( function Badge(
{ intent = 'none', className, ...props },
ref
) {
return (
<Text
ref={ ref }
className={ clsx(
styles.badge,
styles[ `is-${ intent }-intent` ],
className
) }
{ ...props }
variant="body-sm"
/>
);
} );
export const Badge = forwardRef< HTMLSpanElement, BadgeProps >(
function UnforwardedBadge( { intent = 'none', className, ...props }, ref ) {
return (
<Text
ref={ ref }
className={ clsx(
styles.badge,
styles[ `is-${ intent }-intent` ],
className
) }
{ ...props }
variant="body-sm"
/>
);
}
);
5 changes: 4 additions & 1 deletion packages/ui/src/breadcrumb/overflow-trigger-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import type { ButtonProps } from '../button/types';
import styles from './style.module.css';

const OverflowTriggerButton = forwardRef< HTMLButtonElement, ButtonProps >(
function OverflowTriggerButton( { children, className, ...props }, ref ) {
function UnforwardedOverflowTriggerButton(
{ children, className, ...props },
ref
) {
return (
<Button
{ ...props }
Expand Down
Loading
Loading