vira
Version:
A simple and highly versatile design system using element-vir.
56 lines (55 loc) • 2.3 kB
TypeScript
import { type PartialWithUndefined } from '@augment-vir/common';
import { type NavController } from 'device-navigation';
import { type PopUpManager, type ShowPopUpResult } from '../../util/pop-up-manager.js';
import { type MenuItem } from './pop-up-menu-item.js';
import { type PopUpMenuCornerStyle } from './vira-pop-up-menu.element.js';
import { HorizontalAnchor, type PopUpOffset } from './vira-pop-up-trigger.element.js';
/**
* Test ids for {@link ViraMenuTrigger}.
*
* @category Internal
*/
export declare const viraMenuTriggerTestIds: {
menu: string;
};
/**
* A more specific wrapper of `ViraPopUpTrigger` that always opens a menu.
*
* @category PopUp
* @category Elements
*/
export declare const ViraMenuTrigger: import("element-vir").DeclarativeElementDefinition<"vira-menu-trigger", {
items: ReadonlyArray<Readonly<MenuItem>>;
} & PartialWithUndefined<{
/** The selected item ids from the given `items` object. */
selected: ReadonlyArray<PropertyKey>;
isDisabled: boolean;
isMultiSelect: boolean;
z_debug_forceOpenState: boolean;
popUpOffset: PopUpOffset;
/** Hide menu item check mark icons. */
hideCheckIcons: boolean;
menuCornerStyle: PopUpMenuCornerStyle;
/**
* - `HorizontalAnchor.Left`: pop-up is anchored to the left side of the trigger and the
* pop-up can grow to the right.
* - `HorizontalAnchor.Right`: pop-up is anchored to the right side of the trigger and the
* pop-up can grow to the left.
* - `HorizontalAnchor.Both`: pop-up is anchored on both sides of the trigger and cannot grow
* beyond it.
*
* Note that when `HorizontalAnchor.Both` is _not_ used, this anchor will cancel out any
* `popUpOffset` for the direction _opposite_ of the chosen anchor.
*
* @default HorizontalAnchor.Left
*/
horizontalAnchor: HorizontalAnchor;
}>, {
navController: undefined | NavController;
popUpManager: undefined | PopUpManager;
/** `undefined` means the pop up is not currently showing. */
showPopUpResult: ShowPopUpResult | undefined;
}, {
itemActivate: import("element-vir").DefineEvent<PropertyKey[]>;
openChange: import("element-vir").DefineEvent<ShowPopUpResult | undefined>;
}, "vira-menu-trigger-", "vira-menu-trigger-", readonly []>;