feat!: add ContextMenuItem and ContextMenuListBox components#397
Open
web-padawan wants to merge 1 commit into
Open
feat!: add ContextMenuItem and ContextMenuListBox components#397web-padawan wants to merge 1 commit into
web-padawan wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
ContextMenuItemandContextMenuListBoxReact components for thevaadin-context-menu-itemandvaadin-context-menu-list-boxelements 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:
ContextMenuItemandContextMenuListBoxcomponents (pass-throughs to generated wrappers) with correspondingpackage.jsonexports entries.ContextMenu.tsxis renamed toContextMenuItemData<TItemData>(now based on the web components' newContextMenuItemData), mirroring the upstream deprecation. A@deprecated ContextMenuItemtype alias remains importable from@vaadin/react-components/ContextMenu.js.test/typings/ContextMenuItem.tsxverifying that the explicit barrel re-exports introduced in fix!: resolve SelectItem barrel export collision in favor of the component #395 also resolve this collision:ContextMenuItemfrom the barrel is the component,ContextMenuItemDataworks in type position (and stays the React-flavored variant — asserted via aReactElementincomponent), and the deprecated type remains available from the subpath.test/typings/ContextMenu.tsx,test/typings/api.ts,dev/pages/ContextMenu.tsx) migrated toContextMenuItemData.BREAKING CHANGE
The TypeScript type
ContextMenuItemis no longer exported from the package barrel; useContextMenuItemDatainstead, or import the deprecated type from@vaadin/react-components/ContextMenu.js.ContextMenuItemnow refers to the React component. Same intentional pattern as #395.Type of change
🤖 Generated with Claude Code