feat: migrate Menu and Dropdown with selection and submenus
Port HeroUI menu family and Dropdown from ce90ea3: Reka DropdownMenu base, MenuKey[] selection with section owners, 17 official demos, dropdown docs and B01 tests. Long-press stays demo-level; submenu close is level-scoped.
This commit is contained in:
@@ -1580,3 +1580,50 @@ export const tableVariants = tv({
|
||||
});
|
||||
|
||||
export type TableVariants = VariantProps<typeof tableVariants>;
|
||||
|
||||
export const menuVariants = tv({
|
||||
base: "hv-menu",
|
||||
});
|
||||
|
||||
export type MenuVariants = VariantProps<typeof menuVariants>;
|
||||
|
||||
export const menuItemVariants = tv({
|
||||
defaultVariants: {
|
||||
variant: "default",
|
||||
},
|
||||
slots: {
|
||||
indicator: "hv-menu-item__indicator",
|
||||
item: "hv-menu-item",
|
||||
submenuIndicator:
|
||||
"hv-menu-item__indicator hv-menu-item__indicator--submenu",
|
||||
},
|
||||
variants: {
|
||||
variant: {
|
||||
danger: {
|
||||
item: "hv-menu-item--danger",
|
||||
},
|
||||
default: {
|
||||
item: "hv-menu-item--default",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export type MenuItemVariants = VariantProps<typeof menuItemVariants>;
|
||||
|
||||
export const menuSectionVariants = tv({
|
||||
base: "hv-menu-section",
|
||||
});
|
||||
|
||||
export type MenuSectionVariants = VariantProps<typeof menuSectionVariants>;
|
||||
|
||||
export const dropdownVariants = tv({
|
||||
slots: {
|
||||
menu: "hv-dropdown__menu",
|
||||
popover: "hv-dropdown__popover",
|
||||
root: "hv-dropdown",
|
||||
trigger: "hv-dropdown__trigger",
|
||||
},
|
||||
});
|
||||
|
||||
export type DropdownVariants = VariantProps<typeof dropdownVariants>;
|
||||
|
||||
Reference in New Issue
Block a user