Skip to content

feat!: add ContextMenuItem and ContextMenuListBox components#397

Open
web-padawan wants to merge 1 commit into
mainfrom
feat/context-menu-item-list-box
Open

feat!: add ContextMenuItem and ContextMenuListBox components#397
web-padawan wants to merge 1 commit into
mainfrom
feat/context-menu-item-list-box

Conversation

@web-padawan

Copy link
Copy Markdown
Member

Description

Adds ContextMenuItem and ContextMenuListBox React components for the vaadin-context-menu-item and vaadin-context-menu-list-box elements made public in web-components 25.3.0-alpha7 (vaadin/web-components#12173, the context-menu counterpart of #12132 for select). Follows the same pattern as #390 (SelectItem / SelectListBox).

Changes:

  • New ContextMenuItem and ContextMenuListBox components (pass-throughs to generated wrappers) with corresponding package.json exports entries.
  • The React-flavored item type in ContextMenu.tsx is renamed to ContextMenuItemData<TItemData> (now based on the web components' new ContextMenuItemData), mirroring the upstream deprecation. A @deprecated ContextMenuItem type alias remains importable from @vaadin/react-components/ContextMenu.js.
  • New typings regression fixture test/typings/ContextMenuItem.tsx verifying that the explicit barrel re-exports introduced in fix!: resolve SelectItem barrel export collision in favor of the component #395 also resolve this collision: ContextMenuItem from the barrel is the component, ContextMenuItemData works in type position (and stays the React-flavored variant — asserted via a ReactElement in component), and the deprecated type remains available from the subpath.
  • Internal usages (test/typings/ContextMenu.tsx, test/typings/api.ts, dev/pages/ContextMenu.tsx) migrated to ContextMenuItemData.

BREAKING CHANGE

The TypeScript type ContextMenuItem is no longer exported from the package barrel; use ContextMenuItemData instead, or import the deprecated type from @vaadin/react-components/ContextMenu.js. ContextMenuItem now refers to the React component. Same intentional pattern as #395.

Type of change

  • Feature

🤖 Generated with Claude Code

New public web-components entrypoints in 25.3.0-alpha7 (vaadin/web-components#12173).
The React-flavored item type is renamed to ContextMenuItemData mirroring the
web-components deprecation; ContextMenuItem is kept as a deprecated alias.
The barrel resolves ContextMenuItem to the component via the explicit
re-exports introduced in #395.

BREAKING CHANGE: the TypeScript type `ContextMenuItem` is no longer
exported from the package barrel; use `ContextMenuItemData` instead, or
import the deprecated type from `@vaadin/react-components/ContextMenu.js`.
`ContextMenuItem` now refers to the React component.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@web-padawan
web-padawan requested review from tomivirkki and vursen July 24, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant