/** * @license * Copyright 2026 Aglyn LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * The console's one menu row: the look of the besigner's File / Edit / * Insert menus, shared with every table row's ⋮ menu (Zach, 2026-10-10: "this * menu is supposed to use the menu item buttons, just like we have in the * besigner file menu"). * * Only the LOOK lives here — the dense row, the leading icon, the label and * its second line, a trailing hint. Behaviour stays with each menu: the * besigner's menubar drives these rows through Base UI (the only module that * may import it), the row menu through MUI's `Menu`. Both render * {@link MenuRowContent} inside an element styled with {@link MENU_ROW_SX}, * inside a popup styled with {@link MENU_POPUP_SX}, so the two cannot drift. */ import { type MdiIconProps } from './mdi-icon/mdi-icon'; import { type ListItemIconProps, type ListItemTextProps, type TypographyProps } from '@mui/material'; import { type ReactNode } from 'react'; /** * MUI `MenuItem`'s dense variant, as a plain sx object so it can style a * `MenuItem` and a `ListItemButton` alike (MUI v9's `MenuItem` cannot live * inside another library's menu, so the menubar renders a `ListItemButton`). */ export declare const MENU_ROW_SX: { readonly typography: "body2"; readonly minHeight: 32; readonly flexGrow: 0; readonly width: "100%"; readonly paddingY: 0.5; readonly paddingX: 2; readonly whiteSpace: "nowrap"; readonly textAlign: "left"; readonly textDecoration: "none"; readonly color: "inherit"; readonly '&[data-highlighted]': { readonly backgroundColor: "action.hover"; }; readonly '&[data-disabled]': { readonly opacity: (theme: any) => any; readonly cursor: "default"; }; readonly '& .MuiListItemIcon-root': { readonly minWidth: 36; }; readonly '& .MuiListItemIcon-root svg': { readonly fontSize: "1.25rem"; }; readonly '& .MuiListItemText-root': { readonly marginTop: 0; readonly marginBottom: 0; }; readonly '& .MuiListItemText-inset': { readonly paddingLeft: "36px"; }; readonly '& + .MuiDivider-root': { readonly marginTop: 1; readonly marginBottom: 1; }; }; /** The popup's surface: flat paper on the surface colour, a soft shadow. */ export declare const MENU_POPUP_SX: { readonly paddingY: 1; readonly transition: "none"; readonly filter: "drop-shadow(0px 2px 8px rgba(0,0,0,0.32))"; readonly backgroundColor: "surface.main"; }; /** An mdi glyph (`{ path }`) or an already-rendered icon. */ export type MenuRowIcon = MdiIconProps | ReactNode; /** Whether a row draws a leading icon at all. */ export declare const hasMenuRowIcon: (icon: unknown) => boolean; export interface MenuRowContentProps { icon?: MenuRowIcon; /** * Keep the icon's column even when this row has no icon, so every label in * the menu starts at one left edge (AGL-1216). Pass whether ANY row of the * menu has an icon. */ gutter?: boolean; /** The label. */ children?: ReactNode; /** A second line under the label: where it goes, or why it is unavailable. */ secondary?: ReactNode; /** Trailing hint (a shortcut, usually) rendered right-aligned. */ endIcon?: MenuRowIcon; ListItemTextProps?: Partial; ListItemIconProps?: Partial; EndIconTypographyProps?: Partial; } /** The inside of one menu row: leading icon, label, second line, hint. */ export declare function MenuRowContent(props: MenuRowContentProps): import("react").JSX.Element; export declare namespace MenuRowContent { var displayName: string; }