Skip to content

Commit

Permalink
Add new experimental version of DropdownMenu (#49473)
Browse files Browse the repository at this point in the history
* Add Radix deps

* Re-export radix dropdown with some custom styles

* Add sample story

* Start aggregating some components

* Improve storybook config

* Use better colors

* Fix styles

* Move types to external file

* Namespace all styled radix components under "DropdownMenuStyled" namespace

* Use dot icon for radio items instead of check icon

* Pass portal props to portal

* Add DropdownSubMenu component

* Improve stories to use high-level components

* Update notes

* Comment out unused import

* Use menu groups

* draft section in contributing guidelines

* Use wordpress icons instead of `@radix-ui/react-icons`

* Add custom `icon` prop to `DropdownMenuItem`

* Add missing alignment property for sub trigger

* Extract animation variables

* Align colors more closely to WordPress styles

* Add border to dropdown container

* Increase spacing, use `space` util

* Use font utils

* Add focus-visible outline

* Alternative styling for submenu triggers

* Pick only selected props for DropdownMenu

* Rewrite Storybook example to support controls

* DropdownMenuItem: Pick only selected props, support prefix/suffix

* Remove forwarded refs

* Playing around with asChild and ref forwarding

* Updated remaining props

* Add suffix to checkbox / radio items

* Tweak styles (remove arrow, box shadow, center Storybook example)

* Try separate submenu trigger component

* Move layout wrapper to decorator

* Do not use `asChild` for indicator wrappers

* Remove solved TODOs

* RTL support

* Add support for reduced motion

* Expose component via lock APIs

* Polish styles

* Generalize storybook

* Focus/hover styles

* Refine styles

* Tweak storybook example (move separators out of groups, better item text)

* Add unit tests

* Move legacy implementation to v1 subfolder, move new implementation to v2 folder

* READMEs

* Tidy up types and JSDocs

* CHANGELOG

* Update Storybook example title

* Fix imports

* Fix storybook path

* Fix test import path

* Fix manifest.json

* Move legacy files back to where they were, v2 to separate dropdown-menu-v2 folder, fix docs

* Update CHANGELOG and fix formatting

* Use WP Button instead of custom button

* Remove unnecessary decorator with shared context, using private state instead

* Remove opinionated wrapper centering styles

* Update READMEs: remove v1, add experimental callout

* Fix OG DropdownMenu import syntax to be consistent with TypeScript imports across the package

---------

Co-authored-by: Lena Morita <[email protected]>
  • Loading branch information
ciampo and mirka authored May 19, 2023
1 parent c1238e4 commit fc3c4f5
Show file tree
Hide file tree
Showing 14 changed files with 2,527 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/tool/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const componentPaths = glob( 'packages/components/src/*/**/README.md', {
'**/src/ui/**/README.md',
'packages/components/src/theme/README.md',
'packages/components/src/view/README.md',
'packages/components/src/dropdown-menu-v2/README.md',
],
} );
const packagePaths = glob( 'packages/*/package.json' )
Expand Down
333 changes: 333 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fc3c4f5

Please sign in to comment.