@vtj/ui 0.5.2 → 0.6.0
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/cdn/index.js +1 -1
- package/cdn/style.css +1 -1
- package/lib/index.js +2739 -246
- package/lib/style.css +1 -1
- package/package.json +11 -11
- package/types/components/action/Action.d.ts +363 -0
- package/types/components/action/Trigger.d.ts +187 -0
- package/types/components/action/hooks.d.ts +43 -0
- package/types/components/action/index.d.ts +3 -0
- package/types/components/action/types.d.ts +151 -0
- package/types/components/action-bar/ActionBar.d.ts +684 -0
- package/types/components/action-bar/index.d.ts +3 -0
- package/types/components/action-bar/types.d.ts +124 -0
- package/types/components/container/Container.d.ts +147 -0
- package/types/components/container/index.d.ts +3 -0
- package/types/components/container/types.d.ts +120 -0
- package/types/components/dialog/Dialog.d.ts +334 -0
- package/types/components/dialog/create.d.ts +11 -0
- package/types/components/dialog/hooks.d.ts +58 -0
- package/types/components/dialog/index.d.ts +4 -0
- package/types/components/dialog/types.d.ts +124 -0
- package/types/components/header/Header.d.ts +61 -0
- package/types/components/header/index.d.ts +3 -0
- package/types/components/header/types.d.ts +29 -0
- package/types/components/icon/Icon.d.ts +1 -1
- package/types/components/index.d.ts +7 -0
- package/types/components/mask/Mask.d.ts +469 -0
- package/types/components/mask/components/Avatar.d.ts +21 -0
- package/types/components/mask/components/Brand.d.ts +47 -0
- package/types/components/mask/components/Content.d.ts +33 -0
- package/types/components/mask/components/Menu.d.ts +65 -0
- package/types/components/mask/components/Sidebar.d.ts +22 -0
- package/types/components/mask/components/SwitchBar.d.ts +39 -0
- package/types/components/mask/components/Tabs.d.ts +62 -0
- package/types/components/mask/components/ThemeSwitch.d.ts +3 -0
- package/types/components/mask/components/Toolbar.d.ts +50 -0
- package/types/components/mask/defineTab.d.ts +6 -0
- package/types/components/mask/hooks/index.d.ts +5 -0
- package/types/components/mask/hooks/useContent.d.ts +20 -0
- package/types/components/mask/hooks/useHome.d.ts +3 -0
- package/types/components/mask/hooks/useMenus.d.ts +28 -0
- package/types/components/mask/hooks/useSidebar.d.ts +7 -0
- package/types/components/mask/hooks/useTabs.d.ts +22 -0
- package/types/components/mask/index.d.ts +4 -0
- package/types/components/mask/types.d.ts +112 -0
- package/types/components/menu/Menu.d.ts +9 -75
- package/types/components/menu/MenuItem.d.ts +17 -2
- package/types/components/menu/types.d.ts +16 -5
- package/types/components/panel/Panel.d.ts +401 -0
- package/types/components/panel/index.d.ts +3 -0
- package/types/components/panel/types.d.ts +223 -0
- package/types/components/shared.d.ts +12 -0
- package/types/components/startup/Startup.d.ts +10 -0
- package/types/constants.d.ts +0 -3
- package/types/directives/index.d.ts +2 -0
- package/types/directives/vDraggable.d.ts +45 -0
- package/types/directives/vResizable.d.ts +37 -0
- package/types/hooks/index.d.ts +1 -2
- package/types/hooks/useDisabled.d.ts +3 -0
- package/types/hooks/useIcon.d.ts +3 -3
- package/types/index.d.ts +3 -0
- package/types/utils/index.d.ts +0 -2
- package/types/utils/install.d.ts +3 -8
- package/types/utils/util.d.ts +0 -3
- package/types/version.d.ts +1 -0
- package/types/hooks/useDraggable.d.ts +0 -13
- package/types/hooks/useResizable.d.ts +0 -25
- package/types/utils/emits.d.ts +0 -6
- package/types/utils/make-install.d.ts +0 -4
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { Position, UseMouseSourceType } from '@vueuse/core';
|
|
2
|
+
import { DialogMode } from './types';
|
|
3
|
+
import { DraggableOptions, ResizableOptions } from '../../directives';
|
|
4
|
+
import { BaseSize } from '../shared';
|
|
5
|
+
import { IconParam } from '../';
|
|
6
|
+
import { DefineComponent, PropType, VNode, RendererNode, RendererElement, Ref, ComputedRef, ComponentOptionsMixin, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from 'vue';
|
|
7
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
title: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
};
|
|
15
|
+
subtitle: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
icon: {
|
|
19
|
+
type: PropType<IconParam>;
|
|
20
|
+
};
|
|
21
|
+
size: {
|
|
22
|
+
type: PropType<BaseSize>;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
width: {
|
|
26
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
height: {
|
|
30
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
left: {
|
|
34
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
35
|
+
};
|
|
36
|
+
top: {
|
|
37
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
38
|
+
};
|
|
39
|
+
modal: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
draggable: {
|
|
44
|
+
type: PropType<boolean | DraggableOptions>;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
resizable: {
|
|
48
|
+
type: PropType<boolean | ResizableOptions>;
|
|
49
|
+
};
|
|
50
|
+
closable: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
maximizable: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
minimizable: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: boolean;
|
|
61
|
+
};
|
|
62
|
+
mode: {
|
|
63
|
+
type: PropType<DialogMode>;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
content: {
|
|
67
|
+
type: PropType<VNode<RendererNode, RendererElement, {
|
|
68
|
+
[key: string]: any;
|
|
69
|
+
}> | DefineComponent<any, any, any, any>>;
|
|
70
|
+
};
|
|
71
|
+
src: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
};
|
|
74
|
+
componentInstance: {
|
|
75
|
+
type: PropType<Record<string, any> | null>;
|
|
76
|
+
};
|
|
77
|
+
beforeClose: {
|
|
78
|
+
type: PropType<() => boolean | Promise<boolean>>;
|
|
79
|
+
};
|
|
80
|
+
submit: {
|
|
81
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
82
|
+
};
|
|
83
|
+
cancel: {
|
|
84
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
85
|
+
};
|
|
86
|
+
bodyPadding: {
|
|
87
|
+
type: BooleanConstructor;
|
|
88
|
+
default: boolean;
|
|
89
|
+
};
|
|
90
|
+
primary: {
|
|
91
|
+
type: BooleanConstructor;
|
|
92
|
+
};
|
|
93
|
+
}, {
|
|
94
|
+
panelRef: Ref<any>;
|
|
95
|
+
state: {
|
|
96
|
+
mode: DialogMode;
|
|
97
|
+
wrapperWidth: number;
|
|
98
|
+
wrapperHeight: number;
|
|
99
|
+
width: number;
|
|
100
|
+
height: number;
|
|
101
|
+
left: number;
|
|
102
|
+
top: number;
|
|
103
|
+
zIndex: number;
|
|
104
|
+
dragging: boolean;
|
|
105
|
+
resizing: boolean;
|
|
106
|
+
};
|
|
107
|
+
maximized: ComputedRef<boolean>;
|
|
108
|
+
minimized: ComputedRef<boolean>;
|
|
109
|
+
changeMode: (mode: DialogMode) => void;
|
|
110
|
+
show: () => void;
|
|
111
|
+
hide: () => void;
|
|
112
|
+
submit: () => void;
|
|
113
|
+
cancel: () => void;
|
|
114
|
+
componentInstance: {
|
|
115
|
+
componentInstance: Record<string, any>;
|
|
116
|
+
} | undefined;
|
|
117
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
118
|
+
'update:modelValue': (value: boolean) => void;
|
|
119
|
+
open: (instance: ComponentInternalInstance) => void;
|
|
120
|
+
close: () => void;
|
|
121
|
+
destroy: () => void;
|
|
122
|
+
maximized: () => void;
|
|
123
|
+
minimized: () => void;
|
|
124
|
+
normal: () => void;
|
|
125
|
+
modeChange: (mode: DialogMode) => void;
|
|
126
|
+
dragStart: (position: Position) => void;
|
|
127
|
+
dragging: (position: Position) => void;
|
|
128
|
+
dragEnd: (position: Position) => void;
|
|
129
|
+
resizeStart: (dir: string, mie: {
|
|
130
|
+
x: Ref<number>;
|
|
131
|
+
y: Ref<number>;
|
|
132
|
+
sourceType: Ref<UseMouseSourceType>;
|
|
133
|
+
elementX: Ref<number>;
|
|
134
|
+
elementY: Ref<number>;
|
|
135
|
+
elementPositionX: Ref<number>;
|
|
136
|
+
elementPositionY: Ref<number>;
|
|
137
|
+
elementHeight: Ref<number>;
|
|
138
|
+
elementWidth: Ref<number>;
|
|
139
|
+
isOutside: Ref<boolean>;
|
|
140
|
+
stop: () => void;
|
|
141
|
+
}) => void;
|
|
142
|
+
resizeEnd: (dir: string, mie: {
|
|
143
|
+
x: Ref<number>;
|
|
144
|
+
y: Ref<number>;
|
|
145
|
+
sourceType: Ref<UseMouseSourceType>;
|
|
146
|
+
elementX: Ref<number>;
|
|
147
|
+
elementY: Ref<number>;
|
|
148
|
+
elementPositionX: Ref<number>;
|
|
149
|
+
elementPositionY: Ref<number>;
|
|
150
|
+
elementHeight: Ref<number>;
|
|
151
|
+
elementWidth: Ref<number>;
|
|
152
|
+
isOutside: Ref<boolean>;
|
|
153
|
+
stop: () => void;
|
|
154
|
+
}) => void;
|
|
155
|
+
resizing: (dir: string, mie: {
|
|
156
|
+
x: Ref<number>;
|
|
157
|
+
y: Ref<number>;
|
|
158
|
+
sourceType: Ref<UseMouseSourceType>;
|
|
159
|
+
elementX: Ref<number>;
|
|
160
|
+
elementY: Ref<number>;
|
|
161
|
+
elementPositionX: Ref<number>;
|
|
162
|
+
elementPositionY: Ref<number>;
|
|
163
|
+
elementHeight: Ref<number>;
|
|
164
|
+
elementWidth: Ref<number>;
|
|
165
|
+
isOutside: Ref<boolean>;
|
|
166
|
+
stop: () => void;
|
|
167
|
+
}) => void;
|
|
168
|
+
submit: () => void;
|
|
169
|
+
cancel: () => void;
|
|
170
|
+
}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
171
|
+
modelValue: {
|
|
172
|
+
type: BooleanConstructor;
|
|
173
|
+
default: boolean;
|
|
174
|
+
};
|
|
175
|
+
title: {
|
|
176
|
+
type: StringConstructor;
|
|
177
|
+
};
|
|
178
|
+
subtitle: {
|
|
179
|
+
type: StringConstructor;
|
|
180
|
+
};
|
|
181
|
+
icon: {
|
|
182
|
+
type: PropType<IconParam>;
|
|
183
|
+
};
|
|
184
|
+
size: {
|
|
185
|
+
type: PropType<BaseSize>;
|
|
186
|
+
default: string;
|
|
187
|
+
};
|
|
188
|
+
width: {
|
|
189
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
190
|
+
default: string;
|
|
191
|
+
};
|
|
192
|
+
height: {
|
|
193
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
194
|
+
default: string;
|
|
195
|
+
};
|
|
196
|
+
left: {
|
|
197
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
198
|
+
};
|
|
199
|
+
top: {
|
|
200
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
201
|
+
};
|
|
202
|
+
modal: {
|
|
203
|
+
type: BooleanConstructor;
|
|
204
|
+
default: boolean;
|
|
205
|
+
};
|
|
206
|
+
draggable: {
|
|
207
|
+
type: PropType<boolean | DraggableOptions>;
|
|
208
|
+
default: boolean;
|
|
209
|
+
};
|
|
210
|
+
resizable: {
|
|
211
|
+
type: PropType<boolean | ResizableOptions>;
|
|
212
|
+
};
|
|
213
|
+
closable: {
|
|
214
|
+
type: BooleanConstructor;
|
|
215
|
+
default: boolean;
|
|
216
|
+
};
|
|
217
|
+
maximizable: {
|
|
218
|
+
type: BooleanConstructor;
|
|
219
|
+
default: boolean;
|
|
220
|
+
};
|
|
221
|
+
minimizable: {
|
|
222
|
+
type: BooleanConstructor;
|
|
223
|
+
default: boolean;
|
|
224
|
+
};
|
|
225
|
+
mode: {
|
|
226
|
+
type: PropType<DialogMode>;
|
|
227
|
+
default: string;
|
|
228
|
+
};
|
|
229
|
+
content: {
|
|
230
|
+
type: PropType<VNode<RendererNode, RendererElement, {
|
|
231
|
+
[key: string]: any;
|
|
232
|
+
}> | DefineComponent<any, any, any, any>>;
|
|
233
|
+
};
|
|
234
|
+
src: {
|
|
235
|
+
type: StringConstructor;
|
|
236
|
+
};
|
|
237
|
+
componentInstance: {
|
|
238
|
+
type: PropType<Record<string, any> | null>;
|
|
239
|
+
};
|
|
240
|
+
beforeClose: {
|
|
241
|
+
type: PropType<() => boolean | Promise<boolean>>;
|
|
242
|
+
};
|
|
243
|
+
submit: {
|
|
244
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
245
|
+
};
|
|
246
|
+
cancel: {
|
|
247
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
248
|
+
};
|
|
249
|
+
bodyPadding: {
|
|
250
|
+
type: BooleanConstructor;
|
|
251
|
+
default: boolean;
|
|
252
|
+
};
|
|
253
|
+
primary: {
|
|
254
|
+
type: BooleanConstructor;
|
|
255
|
+
};
|
|
256
|
+
}>> & {
|
|
257
|
+
onSubmit?: (() => any) | undefined;
|
|
258
|
+
onResizing?: ((dir: string, mie: {
|
|
259
|
+
x: Ref<number>;
|
|
260
|
+
y: Ref<number>;
|
|
261
|
+
sourceType: Ref<UseMouseSourceType>;
|
|
262
|
+
elementX: Ref<number>;
|
|
263
|
+
elementY: Ref<number>;
|
|
264
|
+
elementPositionX: Ref<number>;
|
|
265
|
+
elementPositionY: Ref<number>;
|
|
266
|
+
elementHeight: Ref<number>;
|
|
267
|
+
elementWidth: Ref<number>;
|
|
268
|
+
isOutside: Ref<boolean>;
|
|
269
|
+
stop: () => void;
|
|
270
|
+
}) => any) | undefined;
|
|
271
|
+
onOpen?: ((instance: ComponentInternalInstance) => any) | undefined;
|
|
272
|
+
onCancel?: (() => any) | undefined;
|
|
273
|
+
onClose?: (() => any) | undefined;
|
|
274
|
+
onNormal?: (() => any) | undefined;
|
|
275
|
+
onMaximized?: (() => any) | undefined;
|
|
276
|
+
onMinimized?: (() => any) | undefined;
|
|
277
|
+
onDragging?: ((position: Position) => any) | undefined;
|
|
278
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
279
|
+
onDestroy?: (() => any) | undefined;
|
|
280
|
+
onModeChange?: ((mode: DialogMode) => any) | undefined;
|
|
281
|
+
onDragStart?: ((position: Position) => any) | undefined;
|
|
282
|
+
onDragEnd?: ((position: Position) => any) | undefined;
|
|
283
|
+
onResizeStart?: ((dir: string, mie: {
|
|
284
|
+
x: Ref<number>;
|
|
285
|
+
y: Ref<number>;
|
|
286
|
+
sourceType: Ref<UseMouseSourceType>;
|
|
287
|
+
elementX: Ref<number>;
|
|
288
|
+
elementY: Ref<number>;
|
|
289
|
+
elementPositionX: Ref<number>;
|
|
290
|
+
elementPositionY: Ref<number>;
|
|
291
|
+
elementHeight: Ref<number>;
|
|
292
|
+
elementWidth: Ref<number>;
|
|
293
|
+
isOutside: Ref<boolean>;
|
|
294
|
+
stop: () => void;
|
|
295
|
+
}) => any) | undefined;
|
|
296
|
+
onResizeEnd?: ((dir: string, mie: {
|
|
297
|
+
x: Ref<number>;
|
|
298
|
+
y: Ref<number>;
|
|
299
|
+
sourceType: Ref<UseMouseSourceType>;
|
|
300
|
+
elementX: Ref<number>;
|
|
301
|
+
elementY: Ref<number>;
|
|
302
|
+
elementPositionX: Ref<number>;
|
|
303
|
+
elementPositionY: Ref<number>;
|
|
304
|
+
elementHeight: Ref<number>;
|
|
305
|
+
elementWidth: Ref<number>;
|
|
306
|
+
isOutside: Ref<boolean>;
|
|
307
|
+
stop: () => void;
|
|
308
|
+
}) => any) | undefined;
|
|
309
|
+
}, {
|
|
310
|
+
primary: boolean;
|
|
311
|
+
size: BaseSize;
|
|
312
|
+
height: string | number;
|
|
313
|
+
width: string | number;
|
|
314
|
+
mode: DialogMode;
|
|
315
|
+
bodyPadding: boolean;
|
|
316
|
+
modelValue: boolean;
|
|
317
|
+
modal: boolean;
|
|
318
|
+
draggable: boolean | DraggableOptions;
|
|
319
|
+
closable: boolean;
|
|
320
|
+
maximizable: boolean;
|
|
321
|
+
minimizable: boolean;
|
|
322
|
+
}, {}>, {
|
|
323
|
+
actions?(_: {}): any;
|
|
324
|
+
default?(_: {}): any;
|
|
325
|
+
footer?(_: {}): any;
|
|
326
|
+
extra?(_: {}): any;
|
|
327
|
+
handle?(_: {}): any;
|
|
328
|
+
}>;
|
|
329
|
+
export default _default;
|
|
330
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
331
|
+
new (): {
|
|
332
|
+
$slots: S;
|
|
333
|
+
};
|
|
334
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VNode, RendererNode, RendererElement, AppContext } from 'vue';
|
|
2
|
+
import { DialogProps } from './types';
|
|
3
|
+
export type CreateDialogProps = DialogProps & {
|
|
4
|
+
[index: string]: any;
|
|
5
|
+
};
|
|
6
|
+
export declare function createDialog(props: CreateDialogProps, context?: AppContext | null): {
|
|
7
|
+
vnode: VNode<RendererNode, RendererElement, {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}>;
|
|
10
|
+
destroy: () => void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ComputedRef, MaybeRef } from 'vue';
|
|
2
|
+
import { DialogProps, DialogState, DialogMode, DialogEmits } from './types';
|
|
3
|
+
import { Emits } from '../';
|
|
4
|
+
import { DraggableOptions, ResizableOptions } from '../../directives';
|
|
5
|
+
export declare function useState(props: DialogProps, wrapper: MaybeRef<HTMLElement>): {
|
|
6
|
+
state: {
|
|
7
|
+
mode: DialogMode;
|
|
8
|
+
wrapperWidth: number;
|
|
9
|
+
wrapperHeight: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
left: number;
|
|
13
|
+
top: number;
|
|
14
|
+
zIndex: number;
|
|
15
|
+
dragging: boolean;
|
|
16
|
+
resizing: boolean;
|
|
17
|
+
};
|
|
18
|
+
normal: ComputedRef<boolean>;
|
|
19
|
+
maximized: ComputedRef<boolean>;
|
|
20
|
+
minimized: ComputedRef<boolean>;
|
|
21
|
+
};
|
|
22
|
+
export declare function useStyle(props: DialogProps, state: DialogState): {
|
|
23
|
+
styles: ComputedRef<{
|
|
24
|
+
width: string;
|
|
25
|
+
height: string;
|
|
26
|
+
top: string;
|
|
27
|
+
left: string;
|
|
28
|
+
zIndex: number;
|
|
29
|
+
}>;
|
|
30
|
+
classes: ComputedRef<{
|
|
31
|
+
[x: string]: boolean;
|
|
32
|
+
"is-draggable": boolean;
|
|
33
|
+
"is-resizable": boolean;
|
|
34
|
+
'is-primary': boolean;
|
|
35
|
+
}>;
|
|
36
|
+
wrapperClass: ComputedRef<{
|
|
37
|
+
[x: string]: boolean;
|
|
38
|
+
'is-dragging': boolean;
|
|
39
|
+
'is-resizing': boolean;
|
|
40
|
+
}>;
|
|
41
|
+
modalStyle: ComputedRef<{
|
|
42
|
+
zIndex: number;
|
|
43
|
+
}>;
|
|
44
|
+
};
|
|
45
|
+
export declare function useMethods(props: DialogProps, state: DialogState, emit: Emits<DialogEmits>): {
|
|
46
|
+
close: () => Promise<void>;
|
|
47
|
+
changeMode: (mode: DialogMode) => void;
|
|
48
|
+
show: () => void;
|
|
49
|
+
hide: () => void;
|
|
50
|
+
active: () => void;
|
|
51
|
+
submit: () => void;
|
|
52
|
+
cancel: () => void;
|
|
53
|
+
};
|
|
54
|
+
export declare function useDraggableOptions(props: DialogProps, state: DialogState, emit: Emits<DialogEmits>, target: MaybeRef<HTMLElement>): ComputedRef<DraggableOptions>;
|
|
55
|
+
export declare function useResizableOptions(props: DialogProps, state: DialogState, emit: Emits<DialogEmits>): ComputedRef<ResizableOptions>;
|
|
56
|
+
export declare function useComponentInstance(props: DialogProps, panelRef: MaybeRef<any>): {
|
|
57
|
+
componentInstance: Record<string, any>;
|
|
58
|
+
} | undefined;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { RendererNode, RendererElement, PropType, VNode, DefineComponent, ComponentInternalInstance } from 'vue';
|
|
2
|
+
import { Position } from '@vueuse/core';
|
|
3
|
+
import { ComponentPropsType, BaseSize } from '../shared';
|
|
4
|
+
import { IconParam } from '../';
|
|
5
|
+
import { DraggableOptions, ResizableOptions, UseMouseInElementReturn } from '../../directives';
|
|
6
|
+
export type DialogMode = 'normal' | 'maximized' | 'minimized';
|
|
7
|
+
export declare const dialogProps: {
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
title: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
};
|
|
15
|
+
subtitle: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
icon: {
|
|
19
|
+
type: PropType<IconParam>;
|
|
20
|
+
};
|
|
21
|
+
size: {
|
|
22
|
+
type: PropType<BaseSize>;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
width: {
|
|
26
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
height: {
|
|
30
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
left: {
|
|
34
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
35
|
+
};
|
|
36
|
+
top: {
|
|
37
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
38
|
+
};
|
|
39
|
+
modal: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
draggable: {
|
|
44
|
+
type: PropType<boolean | DraggableOptions>;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
resizable: {
|
|
48
|
+
type: PropType<boolean | ResizableOptions>;
|
|
49
|
+
};
|
|
50
|
+
closable: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
maximizable: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
minimizable: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: boolean;
|
|
61
|
+
};
|
|
62
|
+
mode: {
|
|
63
|
+
type: PropType<DialogMode>;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
content: {
|
|
67
|
+
type: PropType<VNode<RendererNode, RendererElement, {
|
|
68
|
+
[key: string]: any;
|
|
69
|
+
}> | DefineComponent<any, any, any, any>>;
|
|
70
|
+
};
|
|
71
|
+
src: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
};
|
|
74
|
+
componentInstance: {
|
|
75
|
+
type: PropType<Record<string, any> | null>;
|
|
76
|
+
};
|
|
77
|
+
beforeClose: {
|
|
78
|
+
type: PropType<() => boolean | Promise<boolean>>;
|
|
79
|
+
};
|
|
80
|
+
submit: {
|
|
81
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
82
|
+
};
|
|
83
|
+
cancel: {
|
|
84
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
85
|
+
};
|
|
86
|
+
bodyPadding: {
|
|
87
|
+
type: BooleanConstructor;
|
|
88
|
+
default: boolean;
|
|
89
|
+
};
|
|
90
|
+
primary: {
|
|
91
|
+
type: BooleanConstructor;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export type DialogProps = ComponentPropsType<typeof dialogProps>;
|
|
95
|
+
export type DialogEmits = {
|
|
96
|
+
'update:modelValue': [value: boolean];
|
|
97
|
+
open: [instance: ComponentInternalInstance];
|
|
98
|
+
close: [];
|
|
99
|
+
destroy: [];
|
|
100
|
+
maximized: [];
|
|
101
|
+
minimized: [];
|
|
102
|
+
normal: [];
|
|
103
|
+
modeChange: [mode: DialogMode];
|
|
104
|
+
dragStart: [position: Position];
|
|
105
|
+
dragging: [position: Position];
|
|
106
|
+
dragEnd: [position: Position];
|
|
107
|
+
resizeStart: [dir: string, mie: UseMouseInElementReturn];
|
|
108
|
+
resizeEnd: [dir: string, mie: UseMouseInElementReturn];
|
|
109
|
+
resizing: [dir: string, mie: UseMouseInElementReturn];
|
|
110
|
+
submit: [];
|
|
111
|
+
cancel: [];
|
|
112
|
+
};
|
|
113
|
+
export interface DialogState {
|
|
114
|
+
mode: DialogMode;
|
|
115
|
+
wrapperWidth: number;
|
|
116
|
+
wrapperHeight: number;
|
|
117
|
+
width: number;
|
|
118
|
+
height: number;
|
|
119
|
+
left: number;
|
|
120
|
+
top: number;
|
|
121
|
+
zIndex: number;
|
|
122
|
+
dragging: boolean;
|
|
123
|
+
resizing: boolean;
|
|
124
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { IconParam } from '../';
|
|
2
|
+
import { BaseSize } from '../shared';
|
|
3
|
+
import { DefineComponent, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from 'vue';
|
|
4
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
|
|
5
|
+
size: {
|
|
6
|
+
type: PropType<BaseSize>;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
content: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
subtitle: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
};
|
|
16
|
+
icon: {
|
|
17
|
+
type: PropType<IconParam>;
|
|
18
|
+
};
|
|
19
|
+
border: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
};
|
|
22
|
+
more: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
};
|
|
25
|
+
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
26
|
+
size: {
|
|
27
|
+
type: PropType<BaseSize>;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
content: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
subtitle: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
};
|
|
37
|
+
icon: {
|
|
38
|
+
type: PropType<IconParam>;
|
|
39
|
+
};
|
|
40
|
+
border: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
};
|
|
43
|
+
more: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
};
|
|
46
|
+
}>>, {
|
|
47
|
+
size: BaseSize;
|
|
48
|
+
content: string;
|
|
49
|
+
border: boolean;
|
|
50
|
+
more: boolean;
|
|
51
|
+
}, {}>, {
|
|
52
|
+
default?(_: {}): any;
|
|
53
|
+
subtitle?(_: {}): any;
|
|
54
|
+
actions?(_: {}): any;
|
|
55
|
+
}>;
|
|
56
|
+
export default _default;
|
|
57
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
58
|
+
new (): {
|
|
59
|
+
$slots: S;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IconParam } from '../icon';
|
|
3
|
+
import { ComponentPropsType, BaseSize } from '../shared';
|
|
4
|
+
export declare const headerProps: {
|
|
5
|
+
size: {
|
|
6
|
+
type: PropType<BaseSize>;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
content: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
subtitle: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
};
|
|
16
|
+
icon: {
|
|
17
|
+
type: PropType<IconParam>;
|
|
18
|
+
};
|
|
19
|
+
border: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
};
|
|
22
|
+
more: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type HeaderProps = ComponentPropsType<typeof headerProps>;
|
|
27
|
+
export type HeaderEmits = {
|
|
28
|
+
click: [];
|
|
29
|
+
};
|
|
@@ -3,3 +3,10 @@ export * from './startup';
|
|
|
3
3
|
export * from './icon';
|
|
4
4
|
export * from './menu';
|
|
5
5
|
export * from './simple-mask';
|
|
6
|
+
export * from './action';
|
|
7
|
+
export * from './action-bar';
|
|
8
|
+
export * from './container';
|
|
9
|
+
export * from './header';
|
|
10
|
+
export * from './panel';
|
|
11
|
+
export * from './dialog';
|
|
12
|
+
export * from './mask';
|