Skip to content

Commit fc3c4f5

Browse files
ciampomirka
andauthored
Add new experimental version of DropdownMenu (#49473)
* 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]>
1 parent c1238e4 commit fc3c4f5

File tree

14 files changed

+2527
-3
lines changed

14 files changed

+2527
-3
lines changed

docs/tool/manifest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const componentPaths = glob( 'packages/components/src/*/**/README.md', {
1414
'**/src/ui/**/README.md',
1515
'packages/components/src/theme/README.md',
1616
'packages/components/src/view/README.md',
17+
'packages/components/src/dropdown-menu-v2/README.md',
1718
],
1819
} );
1920
const packagePaths = glob( 'packages/*/package.json' )

package-lock.json

Lines changed: 333 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)