UNPKG

2.25 kBTypeScriptView Raw
1import type { CSSProperties, TransitionProps } from 'vue';
2import type { VueNode } from '../_util/type';
3/** Two char of 't' 'b' 'c' 'l' 'r'. Example: 'lt' */
4export declare type AlignPoint = string;
5export interface AlignType {
6 /**
7 * move point of source node to align with point of target node.
8 * Such as ['tr','cc'], align top right point of source node with center point of target node.
9 * Point can be 't'(top), 'b'(bottom), 'c'(center), 'l'(left), 'r'(right) */
10 points?: AlignPoint[];
11 /**
12 * offset source node by offset[0] in x and offset[1] in y.
13 * If offset contains percentage string value, it is relative to sourceNode region.
14 */
15 offset?: number[];
16 /**
17 * offset target node by offset[0] in x and offset[1] in y.
18 * If targetOffset contains percentage string value, it is relative to targetNode region.
19 */
20 targetOffset?: number[];
21 /**
22 * If adjustX field is true, will adjust source node in x direction if source node is invisible.
23 * If adjustY field is true, will adjust source node in y direction if source node is invisible.
24 */
25 overflow?: {
26 adjustX?: boolean | number;
27 adjustY?: boolean | number;
28 };
29 /**
30 * Whether use css right instead of left to position
31 */
32 useCssRight?: boolean;
33 /**
34 * Whether use css bottom instead of top to position
35 */
36 useCssBottom?: boolean;
37 /**
38 * Whether use css transform instead of left/top/right/bottom to position if browser supports.
39 * Defaults to false.
40 */
41 useCssTransform?: boolean;
42 ignoreShake?: boolean;
43}
44export declare type BuildInPlacements = Record<string, AlignType>;
45export declare type StretchType = string;
46export declare type ActionType = string;
47export declare type AnimationType = string;
48export declare type TransitionNameType = string;
49export interface Point {
50 pageX: number;
51 pageY: number;
52}
53export interface CommonEventHandler {
54 remove: () => void;
55}
56export interface MobileConfig {
57 /** Set popup motion. You can ref `rc-motion` for more info. */
58 popupMotion?: TransitionProps;
59 popupClassName?: string;
60 popupStyle?: CSSProperties;
61 popupRender?: (originNode: VueNode) => VueNode;
62}