bani-ui 1.0.2-alpha.8 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/{Button-Bwzevixh.js → Button-CXgL_cy-.js} +6 -4
- package/dist/es/{ButtonGroup-iYDLXmLV.js → ButtonGroup-CaS3gDGZ.js} +4 -3
- package/dist/es/ConfigProvider-BPs20cEq.js +74 -0
- package/dist/es/Dropdown-Dgqe_mDE.js +175 -0
- package/dist/es/{Icon-C5WM3GNh.js → Icon-iDz_Qer5.js} +2 -2
- package/dist/es/{Loading-DEDOSX2q.js → Loading-BuMMkzGV.js} +3 -3
- package/dist/es/{Message-CQJbBQH-.js → Message-xfxk4ZMC.js} +9 -8
- package/dist/es/{Popconfirm-DGlIr8wm.js → Popconfirm-DiHdBNmK.js} +11 -10
- package/dist/es/{Tooltip-CQ0AQJf-.js → Tooltip-CR8OQQL4.js} +7 -6
- package/dist/es/{hooks-D92zul9o.js → hooks-Bze4eaZa.js} +6 -8
- package/dist/es/index.js +20 -10
- package/dist/es/{utils-Uf9tqvV5.js → utils-mFOE2DND.js} +1 -1
- package/dist/es/{vendor-R0ZbR4ac.js → vendor-mcUuP0dl.js} +129 -11
- package/dist/index.css +1 -1
- package/dist/theme/ConfigProvider.css +1 -0
- package/dist/theme/Dropdown.css +117 -0
- package/dist/types/components/Button/constants.d.ts +1 -0
- package/dist/types/components/Button/index.d.ts +156 -16
- package/dist/types/components/Button/types.d.ts +3 -2
- package/dist/types/components/ButtonGroup/index.d.ts +34 -3
- package/dist/types/components/ButtonGroup/types.d.ts +1 -0
- package/dist/types/components/ConfigProvider/constants.d.ts +5 -0
- package/dist/types/components/ConfigProvider/hooks.d.ts +6 -0
- package/dist/types/components/ConfigProvider/index.d.ts +41 -0
- package/dist/types/components/ConfigProvider/types.d.ts +6 -0
- package/dist/types/components/Dropdown/constants.d.ts +4 -0
- package/dist/types/components/Dropdown/index.d.ts +266 -0
- package/dist/types/components/Dropdown/types.d.ts +31 -0
- package/dist/types/components/Icon/index.d.ts +235 -3
- package/dist/types/components/Icon/types.d.ts +1 -0
- package/dist/types/components/Loading/directive.d.ts +1 -0
- package/dist/types/components/Loading/index.d.ts +2 -0
- package/dist/types/components/Loading/service.d.ts +1 -0
- package/dist/types/components/Loading/types.d.ts +1 -0
- package/dist/types/components/Message/index.d.ts +2 -1
- package/dist/types/components/Message/methods.d.ts +1 -0
- package/dist/types/components/Message/types.d.ts +1 -0
- package/dist/types/components/Popconfirm/index.d.ts +125 -15
- package/dist/types/components/Popconfirm/types.d.ts +1 -0
- package/dist/types/components/Tooltip/index.d.ts +128 -15
- package/dist/types/components/Tooltip/types.d.ts +1 -0
- package/dist/types/components/Tooltip/useEventsToTiggerNode.d.ts +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/core/index.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useClickOutside.d.ts +1 -0
- package/dist/types/hooks/useEventListener.d.ts +1 -0
- package/dist/types/hooks/useId.d.ts +1 -0
- package/dist/types/hooks/useLocale.d.ts +2 -1
- package/dist/types/hooks/useOffset.d.ts +1 -0
- package/dist/types/utils/install.d.ts +1 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.css.br +0 -0
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +12 -12
- package/dist/umd/index.umd.cjs.br +0 -0
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/dist/umd/locale/lang.umd.cjs +1 -0
- package/package.json +16 -7
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Component, ComputedRef
|
|
1
|
+
import { Component, ComputedRef } from 'vue';
|
|
2
|
+
|
|
2
3
|
export type ButtonType = "primary" | "success" | "warning" | "danger" | "info";
|
|
3
4
|
export type NativeType = "button" | "submit" | "reset";
|
|
4
5
|
export type ButtonSize = "default" | "large" | "small";
|
|
@@ -27,7 +28,7 @@ export interface ButtonEmits {
|
|
|
27
28
|
(e: "click", value: MouseEvent): void;
|
|
28
29
|
}
|
|
29
30
|
export interface ButtonInstance {
|
|
30
|
-
ref:
|
|
31
|
+
ref: HTMLButtonElement | void;
|
|
31
32
|
disabled: ComputedRef<boolean>;
|
|
32
33
|
size: ComputedRef<string>;
|
|
33
34
|
type: ComputedRef<string>;
|
|
@@ -1,16 +1,47 @@
|
|
|
1
|
+
export * from './types';
|
|
1
2
|
export declare const BnButtonGroup: {
|
|
2
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
4
|
+
size: {
|
|
5
|
+
type: import('vue').PropType<import('../../core').ButtonSize>;
|
|
6
|
+
};
|
|
7
|
+
type: {
|
|
8
|
+
type: import('vue').PropType<import('../../core').ButtonType>;
|
|
9
|
+
};
|
|
10
|
+
disabled: {
|
|
11
|
+
type: import('vue').PropType<boolean>;
|
|
12
|
+
};
|
|
13
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
3
14
|
P: {};
|
|
4
15
|
B: {};
|
|
5
16
|
D: {};
|
|
6
17
|
C: {};
|
|
7
18
|
M: {};
|
|
8
19
|
Defaults: {};
|
|
9
|
-
}, Readonly<import('
|
|
20
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
21
|
+
size: {
|
|
22
|
+
type: import('vue').PropType<import('../../core').ButtonSize>;
|
|
23
|
+
};
|
|
24
|
+
type: {
|
|
25
|
+
type: import('vue').PropType<import('../../core').ButtonType>;
|
|
26
|
+
};
|
|
27
|
+
disabled: {
|
|
28
|
+
type: import('vue').PropType<boolean>;
|
|
29
|
+
};
|
|
30
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
10
31
|
__isFragment?: never;
|
|
11
32
|
__isTeleport?: never;
|
|
12
33
|
__isSuspense?: never;
|
|
13
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('
|
|
34
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
35
|
+
size: {
|
|
36
|
+
type: import('vue').PropType<import('../../core').ButtonSize>;
|
|
37
|
+
};
|
|
38
|
+
type: {
|
|
39
|
+
type: import('vue').PropType<import('../../core').ButtonType>;
|
|
40
|
+
};
|
|
41
|
+
disabled: {
|
|
42
|
+
type: import('vue').PropType<boolean>;
|
|
43
|
+
};
|
|
44
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
14
45
|
$slots: {
|
|
15
46
|
default?(_: {}): any;
|
|
16
47
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MaybeRef, Ref, App } from 'vue';
|
|
2
|
+
import { ConfigProviderContext } from './constants';
|
|
3
|
+
|
|
4
|
+
export declare function useGlobalConfig<K extends keyof ConfigProviderContext, D extends ConfigProviderContext[K]>(key: K, defaultVal?: D): Ref<Exclude<ConfigProviderContext[K], void>>;
|
|
5
|
+
export declare function useGlobalConfig(): Ref<ConfigProviderContext>;
|
|
6
|
+
export declare function provideGlobalConfig(config?: MaybeRef<ConfigProviderContext>, app?: App, global?: boolean): import('vue').ComputedRef<Partial<import('../../core').ConfigProviderProps>> | undefined;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const BnConfigProvider: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
3
|
+
locale: {
|
|
4
|
+
type: import('vue').PropType<import('../../locale').Language>;
|
|
5
|
+
};
|
|
6
|
+
extendsI18nMsg: {
|
|
7
|
+
type: import('vue').PropType<import('../../locale').TranslatePair>;
|
|
8
|
+
};
|
|
9
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
10
|
+
P: {};
|
|
11
|
+
B: {};
|
|
12
|
+
D: {};
|
|
13
|
+
C: {};
|
|
14
|
+
M: {};
|
|
15
|
+
Defaults: {};
|
|
16
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
17
|
+
locale: {
|
|
18
|
+
type: import('vue').PropType<import('../../locale').Language>;
|
|
19
|
+
};
|
|
20
|
+
extendsI18nMsg: {
|
|
21
|
+
type: import('vue').PropType<import('../../locale').TranslatePair>;
|
|
22
|
+
};
|
|
23
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
24
|
+
__isFragment?: never;
|
|
25
|
+
__isTeleport?: never;
|
|
26
|
+
__isSuspense?: never;
|
|
27
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
28
|
+
locale: {
|
|
29
|
+
type: import('vue').PropType<import('../../locale').Language>;
|
|
30
|
+
};
|
|
31
|
+
extendsI18nMsg: {
|
|
32
|
+
type: import('vue').PropType<import('../../locale').TranslatePair>;
|
|
33
|
+
};
|
|
34
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
35
|
+
$slots: {
|
|
36
|
+
default?(_: {
|
|
37
|
+
config: Partial<import('../../core').ConfigProviderProps> | undefined;
|
|
38
|
+
}): any;
|
|
39
|
+
};
|
|
40
|
+
}) & import('vue').Plugin;
|
|
41
|
+
export * from './types';
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
export declare const BnDropdown: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
3
|
+
size: {
|
|
4
|
+
type: import('vue').PropType<import('../../core').ButtonSize>;
|
|
5
|
+
};
|
|
6
|
+
type: {
|
|
7
|
+
type: import('vue').PropType<import('../../core').ButtonType>;
|
|
8
|
+
};
|
|
9
|
+
transition: {
|
|
10
|
+
type: import('vue').PropType<string>;
|
|
11
|
+
};
|
|
12
|
+
disabled: {
|
|
13
|
+
type: import('vue').PropType<boolean>;
|
|
14
|
+
};
|
|
15
|
+
content: {
|
|
16
|
+
type: import('vue').PropType<string>;
|
|
17
|
+
};
|
|
18
|
+
trigger: {
|
|
19
|
+
type: import('vue').PropType<"click" | "contextmenu" | "hover">;
|
|
20
|
+
};
|
|
21
|
+
placement: {
|
|
22
|
+
type: import('vue').PropType<import('@popperjs/core').Placement>;
|
|
23
|
+
};
|
|
24
|
+
manual: {
|
|
25
|
+
type: import('vue').PropType<boolean>;
|
|
26
|
+
};
|
|
27
|
+
popperOptions: {
|
|
28
|
+
type: import('vue').PropType<Partial<import('@popperjs/core').Options>>;
|
|
29
|
+
};
|
|
30
|
+
showTimeout: {
|
|
31
|
+
type: import('vue').PropType<number>;
|
|
32
|
+
};
|
|
33
|
+
hideTimeout: {
|
|
34
|
+
type: import('vue').PropType<number>;
|
|
35
|
+
};
|
|
36
|
+
items: {
|
|
37
|
+
type: import('vue').PropType<import('../../core').DropdownItemProps[]>;
|
|
38
|
+
default: () => import('../../core').DropdownItemProps[];
|
|
39
|
+
};
|
|
40
|
+
hideOnClick: {
|
|
41
|
+
type: import('vue').PropType<boolean>;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
splitButton: {
|
|
45
|
+
type: import('vue').PropType<boolean>;
|
|
46
|
+
};
|
|
47
|
+
}>> & Readonly<{
|
|
48
|
+
onClick?: ((value: MouseEvent) => any) | undefined;
|
|
49
|
+
onCommand?: ((value: import('../../core').DropdownCommand) => any) | undefined;
|
|
50
|
+
"onVisible-change"?: ((value: boolean) => any) | undefined;
|
|
51
|
+
}>, {
|
|
52
|
+
open(): void;
|
|
53
|
+
close(): void;
|
|
54
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
55
|
+
"visible-change": (value: boolean) => void;
|
|
56
|
+
command: (value: import('../../core').DropdownCommand) => void;
|
|
57
|
+
click: (value: MouseEvent) => void;
|
|
58
|
+
}, import('vue').PublicProps, {
|
|
59
|
+
items: import('../../core').DropdownItemProps[];
|
|
60
|
+
hideOnClick: boolean;
|
|
61
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
62
|
+
P: {};
|
|
63
|
+
B: {};
|
|
64
|
+
D: {};
|
|
65
|
+
C: {};
|
|
66
|
+
M: {};
|
|
67
|
+
Defaults: {};
|
|
68
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
69
|
+
size: {
|
|
70
|
+
type: import('vue').PropType<import('../../core').ButtonSize>;
|
|
71
|
+
};
|
|
72
|
+
type: {
|
|
73
|
+
type: import('vue').PropType<import('../../core').ButtonType>;
|
|
74
|
+
};
|
|
75
|
+
transition: {
|
|
76
|
+
type: import('vue').PropType<string>;
|
|
77
|
+
};
|
|
78
|
+
disabled: {
|
|
79
|
+
type: import('vue').PropType<boolean>;
|
|
80
|
+
};
|
|
81
|
+
content: {
|
|
82
|
+
type: import('vue').PropType<string>;
|
|
83
|
+
};
|
|
84
|
+
trigger: {
|
|
85
|
+
type: import('vue').PropType<"click" | "contextmenu" | "hover">;
|
|
86
|
+
};
|
|
87
|
+
placement: {
|
|
88
|
+
type: import('vue').PropType<import('@popperjs/core').Placement>;
|
|
89
|
+
};
|
|
90
|
+
manual: {
|
|
91
|
+
type: import('vue').PropType<boolean>;
|
|
92
|
+
};
|
|
93
|
+
popperOptions: {
|
|
94
|
+
type: import('vue').PropType<Partial<import('@popperjs/core').Options>>;
|
|
95
|
+
};
|
|
96
|
+
showTimeout: {
|
|
97
|
+
type: import('vue').PropType<number>;
|
|
98
|
+
};
|
|
99
|
+
hideTimeout: {
|
|
100
|
+
type: import('vue').PropType<number>;
|
|
101
|
+
};
|
|
102
|
+
items: {
|
|
103
|
+
type: import('vue').PropType<import('../../core').DropdownItemProps[]>;
|
|
104
|
+
default: () => import('../../core').DropdownItemProps[];
|
|
105
|
+
};
|
|
106
|
+
hideOnClick: {
|
|
107
|
+
type: import('vue').PropType<boolean>;
|
|
108
|
+
default: boolean;
|
|
109
|
+
};
|
|
110
|
+
splitButton: {
|
|
111
|
+
type: import('vue').PropType<boolean>;
|
|
112
|
+
};
|
|
113
|
+
}>> & Readonly<{
|
|
114
|
+
onClick?: ((value: MouseEvent) => any) | undefined;
|
|
115
|
+
onCommand?: ((value: import('../../core').DropdownCommand) => any) | undefined;
|
|
116
|
+
"onVisible-change"?: ((value: boolean) => any) | undefined;
|
|
117
|
+
}>, {
|
|
118
|
+
open(): void;
|
|
119
|
+
close(): void;
|
|
120
|
+
}, {}, {}, {}, {
|
|
121
|
+
items: import('../../core').DropdownItemProps[];
|
|
122
|
+
hideOnClick: boolean;
|
|
123
|
+
}>;
|
|
124
|
+
__isFragment?: never;
|
|
125
|
+
__isTeleport?: never;
|
|
126
|
+
__isSuspense?: never;
|
|
127
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
128
|
+
size: {
|
|
129
|
+
type: import('vue').PropType<import('../../core').ButtonSize>;
|
|
130
|
+
};
|
|
131
|
+
type: {
|
|
132
|
+
type: import('vue').PropType<import('../../core').ButtonType>;
|
|
133
|
+
};
|
|
134
|
+
transition: {
|
|
135
|
+
type: import('vue').PropType<string>;
|
|
136
|
+
};
|
|
137
|
+
disabled: {
|
|
138
|
+
type: import('vue').PropType<boolean>;
|
|
139
|
+
};
|
|
140
|
+
content: {
|
|
141
|
+
type: import('vue').PropType<string>;
|
|
142
|
+
};
|
|
143
|
+
trigger: {
|
|
144
|
+
type: import('vue').PropType<"click" | "contextmenu" | "hover">;
|
|
145
|
+
};
|
|
146
|
+
placement: {
|
|
147
|
+
type: import('vue').PropType<import('@popperjs/core').Placement>;
|
|
148
|
+
};
|
|
149
|
+
manual: {
|
|
150
|
+
type: import('vue').PropType<boolean>;
|
|
151
|
+
};
|
|
152
|
+
popperOptions: {
|
|
153
|
+
type: import('vue').PropType<Partial<import('@popperjs/core').Options>>;
|
|
154
|
+
};
|
|
155
|
+
showTimeout: {
|
|
156
|
+
type: import('vue').PropType<number>;
|
|
157
|
+
};
|
|
158
|
+
hideTimeout: {
|
|
159
|
+
type: import('vue').PropType<number>;
|
|
160
|
+
};
|
|
161
|
+
items: {
|
|
162
|
+
type: import('vue').PropType<import('../../core').DropdownItemProps[]>;
|
|
163
|
+
default: () => import('../../core').DropdownItemProps[];
|
|
164
|
+
};
|
|
165
|
+
hideOnClick: {
|
|
166
|
+
type: import('vue').PropType<boolean>;
|
|
167
|
+
default: boolean;
|
|
168
|
+
};
|
|
169
|
+
splitButton: {
|
|
170
|
+
type: import('vue').PropType<boolean>;
|
|
171
|
+
};
|
|
172
|
+
}>> & Readonly<{
|
|
173
|
+
onClick?: ((value: MouseEvent) => any) | undefined;
|
|
174
|
+
onCommand?: ((value: import('../../core').DropdownCommand) => any) | undefined;
|
|
175
|
+
"onVisible-change"?: ((value: boolean) => any) | undefined;
|
|
176
|
+
}>, {
|
|
177
|
+
open(): void;
|
|
178
|
+
close(): void;
|
|
179
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
180
|
+
"visible-change": (value: boolean) => void;
|
|
181
|
+
command: (value: import('../../core').DropdownCommand) => void;
|
|
182
|
+
click: (value: MouseEvent) => void;
|
|
183
|
+
}, string, {
|
|
184
|
+
items: import('../../core').DropdownItemProps[];
|
|
185
|
+
hideOnClick: boolean;
|
|
186
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
187
|
+
$slots: Readonly<Record<string, any>> & Record<string, any>;
|
|
188
|
+
}) & import('vue').Plugin;
|
|
189
|
+
export declare const BnDropdownItem: {
|
|
190
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
191
|
+
label: {
|
|
192
|
+
type: import('vue').PropType<string | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
193
|
+
[key: string]: any;
|
|
194
|
+
}>>;
|
|
195
|
+
};
|
|
196
|
+
disabled: {
|
|
197
|
+
type: import('vue').PropType<boolean>;
|
|
198
|
+
default: boolean;
|
|
199
|
+
};
|
|
200
|
+
command: {
|
|
201
|
+
type: import('vue').PropType<import('../../core').DropdownCommand>;
|
|
202
|
+
default: string;
|
|
203
|
+
};
|
|
204
|
+
divided: {
|
|
205
|
+
type: import('vue').PropType<boolean>;
|
|
206
|
+
};
|
|
207
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
208
|
+
disabled: boolean;
|
|
209
|
+
command: import('../../core').DropdownCommand;
|
|
210
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
211
|
+
P: {};
|
|
212
|
+
B: {};
|
|
213
|
+
D: {};
|
|
214
|
+
C: {};
|
|
215
|
+
M: {};
|
|
216
|
+
Defaults: {};
|
|
217
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
218
|
+
label: {
|
|
219
|
+
type: import('vue').PropType<string | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
220
|
+
[key: string]: any;
|
|
221
|
+
}>>;
|
|
222
|
+
};
|
|
223
|
+
disabled: {
|
|
224
|
+
type: import('vue').PropType<boolean>;
|
|
225
|
+
default: boolean;
|
|
226
|
+
};
|
|
227
|
+
command: {
|
|
228
|
+
type: import('vue').PropType<import('../../core').DropdownCommand>;
|
|
229
|
+
default: string;
|
|
230
|
+
};
|
|
231
|
+
divided: {
|
|
232
|
+
type: import('vue').PropType<boolean>;
|
|
233
|
+
};
|
|
234
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
235
|
+
disabled: boolean;
|
|
236
|
+
command: import('../../core').DropdownCommand;
|
|
237
|
+
}>;
|
|
238
|
+
__isFragment?: never;
|
|
239
|
+
__isTeleport?: never;
|
|
240
|
+
__isSuspense?: never;
|
|
241
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
242
|
+
label: {
|
|
243
|
+
type: import('vue').PropType<string | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
244
|
+
[key: string]: any;
|
|
245
|
+
}>>;
|
|
246
|
+
};
|
|
247
|
+
disabled: {
|
|
248
|
+
type: import('vue').PropType<boolean>;
|
|
249
|
+
default: boolean;
|
|
250
|
+
};
|
|
251
|
+
command: {
|
|
252
|
+
type: import('vue').PropType<import('../../core').DropdownCommand>;
|
|
253
|
+
default: string;
|
|
254
|
+
};
|
|
255
|
+
divided: {
|
|
256
|
+
type: import('vue').PropType<boolean>;
|
|
257
|
+
};
|
|
258
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
259
|
+
disabled: boolean;
|
|
260
|
+
command: import('../../core').DropdownCommand;
|
|
261
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
262
|
+
$slots: {
|
|
263
|
+
default?(_: {}): any;
|
|
264
|
+
};
|
|
265
|
+
}) & import('vue').Plugin;
|
|
266
|
+
export * from './types';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { VNode, ComputedRef } from 'vue';
|
|
2
|
+
import { TooltipProps } from '../Tooltip/types';
|
|
3
|
+
import { ButtonType, ButtonSize } from '../Button/types';
|
|
4
|
+
|
|
5
|
+
export type DropdownCommand = string | number;
|
|
6
|
+
export interface DropdownItemProps {
|
|
7
|
+
command?: DropdownCommand;
|
|
8
|
+
label?: string | VNode;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
divided?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface DropdownProps extends TooltipProps {
|
|
13
|
+
type?: ButtonType;
|
|
14
|
+
size?: ButtonSize;
|
|
15
|
+
items?: DropdownItemProps[];
|
|
16
|
+
hideOnClick?: boolean;
|
|
17
|
+
splitButton?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface DropdownEmits {
|
|
20
|
+
(e: "visible-change", value: boolean): void;
|
|
21
|
+
(e: "command", value: DropdownCommand): void;
|
|
22
|
+
(e: "click", value: MouseEvent): void;
|
|
23
|
+
}
|
|
24
|
+
export interface DropdownInstance {
|
|
25
|
+
open(): void;
|
|
26
|
+
close(): void;
|
|
27
|
+
}
|
|
28
|
+
export interface DropdownContext {
|
|
29
|
+
handleItemClick(item: DropdownItemProps): void;
|
|
30
|
+
size: ComputedRef<ButtonSize | void>;
|
|
31
|
+
}
|