@scania/tegel
Version:
Tegel Design System
40 lines (39 loc) • 1.96 kB
TypeScript
import type { Placement } from '@popperjs/core';
import { Attributes } from '../../types/Attributes';
/**
* @slot <default> - <b>Unnamed slot.</b> For the contents of the popover.
*/
export declare class TdsPopoverCanvas {
host: HTMLTdsPopoverCanvasElement;
/** The CSS-selector for an element that will trigger the Popover */
selector?: string;
/** Element that will trigger the Popover (takes priority over selector) */
referenceEl?: HTMLElement | null;
/** Decides if the component should be visible from the start. */
defaultShow: boolean;
/** Controls whether the Popover is shown or not. If this is set hiding and showing
* will be decided by this prop and will need to be controlled from the outside. This
* also means that clicking outside of the popover won't close it. Takes precedence over `defaultShow` prop.
*/
show: boolean | null;
/** Decides the placement of the Popover Canvas. See https://popper.js.org/docs/v2/constructors/#placement */
placement: Placement;
/** Sets the offset skidding */
offsetSkidding: number;
/** Whether the popover should animate when being opened/closed or not */
animation: 'none' | 'fade' | string;
/** Sets the offset distance */
offsetDistance: number;
/** Array of modifier objects to pass to popper.js. See https://popper.js.org/docs/v2/modifiers/ */
modifiers: object[];
/** Role of the popover canvas component. Can be either 'alertdialog' for important messages that require immediate attention, or 'dialog' for regular messages. */
tdsAlertDialog: 'alertdialog' | 'dialog';
/** Mode variant of the component, based on current mode. */
modeVariant: 'primary' | 'secondary' | null;
/** Property for closing popover programmatically */
close(): Promise<void>;
childRef?: HTMLTdsPopoverCoreElement;
inheritedAttributes: Attributes;
componentWillLoad(): void;
render(): any;
}