Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information