import { PropDef, SyElement } from '@sylar_iii/ui'; import '@sylar_iii/ui/icon'; import type { SyGridMenuAnimation, SyGridMenuItem, SyGridMenuLayout, SyGridMenuShape } from './grid-menu.types'; /** * A launcher: a dot-grid toggle that bursts its items out around it, one after another, * into a grid or a ring. Each item has its own icon or image, action, colors and disabled state. * `itemclick` fires after an item's `action`; `openchange` fires when the user opens or closes it. */ export declare class SyGridMenuElement extends SyElement { static props: Record; static styles: string; /** Entries to draw; each `id` must be unique. */ items: SyGridMenuItem[]; open: boolean; disabled: boolean; layout: SyGridMenuLayout; /** Grid columns; even numbers round up so the toggle stays centered. */ columns: number; /** Any CSS length. */ cellSize: string; gap: string; /** Radial layout: distance from the center. Empty fits the ring to the item count. */ ringRadius: string; /** Take only the toggle's space and float the open items over the page. */ overlay: boolean; shape: SyGridMenuShape; /** CSS border-radius for items and toggle. Overrides shape. */ radius: string; iconSize: string; /** Item background, hover background and icon color, any CSS color. Items can override each. */ color: string; hoverColor: string; iconColor: string; /** Toggle background while open, its icon color, and the closed dot color. */ toggleColor: string; toggleIconColor: string; dotColor: string; /** Show each item's label under its icon. */ showLabels: boolean; animation: SyGridMenuAnimation; /** Length of each item's motion in ms. */ duration: number; /** Delay between items in ms (reversed when closing). */ stagger: number; closeOnSelect: boolean; closeOnOutsideClick: boolean; menuLabel: string; openLabel: string; closeLabel: string; private readonly _menuId; private _toggle; private _menu; private _focusIndex; private _hostClasses; private readonly _itemOf; private readonly _onDocumentPointerDown; connectedCallback(): void; disconnectedCallback(): void; protected render(root: ShadowRoot): void; protected update(): void; private _createItem; private _patchItem; /** Class icons (PrimeIcons, Remix, …) are slotted from light DOM, where the page's icon CSS applies. */ private _iconNode; private _placed; /** Opening runs first to last; closing runs last to first. */ private _delay; private _setOpen; private _onToggleClick; private _onToggleKeydown; private _select; private _close; private _onMenuKeydown; private _firstEnabled; /** Runs after the pending update (queued first), so the items are no longer inert when focused. */ private _focusItem; /** Arrow keys move by grid position; the center cell is the toggle. */ private _gridNeighbor; /** Ring: Right/Down go clockwise, Left/Up counter-clockwise, wrapping around. */ private _ringNeighbor; } declare global { interface HTMLElementTagNameMap { 'sy-grid-menu': SyGridMenuElement; } }