UNPKG

@synergy-design-system/angular

Version:
67 lines (64 loc) 2.87 kB
import * as i0 from '@angular/core'; import { ElementRef, NgZone } from '@angular/core'; import { SynMenuItem } from '@synergy-design-system/components'; /** * @summary Menu items provide options for the user to pick from in a menu. * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-menu-item--docs * @status stable * @since 2.0 * * @dependency syn-icon * @dependency syn-popup * @dependency syn-spinner * * @slot - The menu item's label. * @slot prefix - Used to prepend an icon or similar element to the menu item. * @slot suffix - Used to append an icon or similar element to the menu item. * @slot submenu - Used to denote a nested menu. * * @csspart base - The component's base wrapper. * @csspart checked-icon - The checked icon, which is only visible when the menu item is checked. * @csspart prefix - The prefix container. * @csspart label - The menu item label. * @csspart suffix - The suffix container. * @csspart spinner - The spinner that shows when the menu item is in the loading state. * @csspart spinner__base - The spinner's base part. * @csspart submenu-icon - The submenu icon, visible only when the menu item has a submenu (not yet implemented). * * @cssproperty [--submenu-offset=-2px] - The distance submenus shift to overlap the parent menu. */ declare class SynMenuItemComponent { nativeElement: SynMenuItem; private _ngZone; constructor(e: ElementRef, ngZone: NgZone); /** * The type of menu item to render. * To use `checked`, this value must be set to `checkbox`. */ set type(v: SynMenuItem['type']); get type(): SynMenuItem['type']; /** * Draws the item in a checked state. */ set checked(v: '' | SynMenuItem['checked']); get checked(): SynMenuItem['checked']; /** * A unique value to store in the menu item. * This can be used as a way to identify menu items when selected. */ set value(v: SynMenuItem['value']); get value(): SynMenuItem['value']; /** * Draws the menu item in a loading state. */ set loading(v: '' | SynMenuItem['loading']); get loading(): SynMenuItem['loading']; /** * Draws the menu item in a disabled state, preventing selection. */ set disabled(v: '' | SynMenuItem['disabled']); get disabled(): SynMenuItem['disabled']; static ɵfac: i0.ɵɵFactoryDeclaration<SynMenuItemComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SynMenuItemComponent, "syn-menu-item", never, { "type": { "alias": "type"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "value": { "alias": "value"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, ["*"], true, never>; } export { SynMenuItemComponent };