import type { ButtonHTMLAttributes, CSSProperties, HTMLAttributes, ReactNode } from 'react'; type PlatformFloatingMenuProps = HTMLAttributes & { children: ReactNode; className?: string; label?: string; placement?: 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end'; style?: CSSProperties; }; type PlatformFloatingMenuItemProps = Omit< ButtonHTMLAttributes, 'children' > & { icon?: ReactNode; children: ReactNode; }; /** * 平台浮层菜单原语。 * 用于卡片角标、画布局部菜单等轻量动作集合,统一 role 与菜单项 chrome。 */ export function PlatformFloatingMenu({ children, className, label, placement = 'top-end', style, onPointerDown, ...divProps }: PlatformFloatingMenuProps) { return (
{ event.stopPropagation(); onPointerDown?.(event); }} > {children}
); } export function PlatformFloatingMenuItem({ icon, children, className, type = 'button', ...buttonProps }: PlatformFloatingMenuItemProps) { return ( ); }