@vtj/ui 0.6.24 → 0.7.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.
Files changed (87) hide show
  1. package/LICENSE +21 -21
  2. package/dist/index.cjs +7 -0
  3. package/dist/index.iife.js +7 -0
  4. package/dist/index.mjs +4165 -0
  5. package/dist/index.umd.js +7 -0
  6. package/dist/style.css +1 -0
  7. package/package.json +23 -21
  8. package/types/components/action/Action.d.ts +23 -22
  9. package/types/components/action/Trigger.d.ts +15 -14
  10. package/types/components/action/hooks.d.ts +7 -6
  11. package/types/components/action/types.d.ts +14 -10
  12. package/types/components/action-bar/ActionBar.d.ts +41 -40
  13. package/types/components/action-bar/types.d.ts +10 -11
  14. package/types/components/chart/Chart.d.ts +4 -4
  15. package/types/components/chart/types.d.ts +3 -3
  16. package/types/components/chart/useChart.d.ts +5 -5
  17. package/types/components/container/Container.d.ts +14 -7
  18. package/types/components/container/types.d.ts +6 -3
  19. package/types/components/data-item/DataItem.d.ts +23 -22
  20. package/types/components/data-item/types.d.ts +3 -3
  21. package/types/components/dialog/Dialog.d.ts +9 -9
  22. package/types/components/dialog/create.d.ts +2 -2
  23. package/types/components/dialog/hooks.d.ts +5 -5
  24. package/types/components/dialog/types.d.ts +4 -4
  25. package/types/components/dialog-form/DialogForm.d.ts +3 -3
  26. package/types/components/dialog-form/types.d.ts +3 -3
  27. package/types/components/field/Field.d.ts +17 -4
  28. package/types/components/field/editors/CheckboxEditor.d.ts +6 -3
  29. package/types/components/field/editors/RadioEditor.d.ts +6 -3
  30. package/types/components/field/editors/SelectEditor.d.ts +6 -3
  31. package/types/components/field/hooks/useEditor.d.ts +3 -3
  32. package/types/components/field/types.d.ts +16 -4
  33. package/types/components/form/Form.d.ts +13 -3
  34. package/types/components/form/types.d.ts +10 -2
  35. package/types/components/header/Header.d.ts +2 -2
  36. package/types/components/header/types.d.ts +4 -3
  37. package/types/components/icon/Icon.d.ts +2 -2
  38. package/types/components/index.d.ts +2 -2
  39. package/types/components/list/List.d.ts +109 -0
  40. package/types/components/list/index.d.ts +3 -0
  41. package/types/components/list/types.d.ts +58 -0
  42. package/types/components/mask/Mask.d.ts +23 -22
  43. package/types/components/mask/components/Avatar.d.ts +2 -2
  44. package/types/components/mask/components/Brand.d.ts +5 -2
  45. package/types/components/mask/components/Content.d.ts +3 -3
  46. package/types/components/mask/components/Menu.d.ts +6 -3
  47. package/types/components/mask/components/Sidebar.d.ts +2 -2
  48. package/types/components/mask/components/SwitchBar.d.ts +5 -2
  49. package/types/components/mask/components/Tabs.d.ts +4 -4
  50. package/types/components/mask/components/ThemeSwitch.d.ts +2 -2
  51. package/types/components/mask/components/Toolbar.d.ts +7 -4
  52. package/types/components/mask/defineTab.d.ts +1 -1
  53. package/types/components/mask/hooks/useContent.d.ts +2 -2
  54. package/types/components/mask/hooks/useHome.d.ts +1 -1
  55. package/types/components/mask/hooks/useMenus.d.ts +3 -3
  56. package/types/components/mask/hooks/useSidebar.d.ts +1 -2
  57. package/types/components/mask/hooks/useTabs.d.ts +4 -4
  58. package/types/components/mask/types.d.ts +3 -3
  59. package/types/components/menu/Menu.d.ts +6 -3
  60. package/types/components/menu/MenuItem.d.ts +3 -3
  61. package/types/components/menu/types.d.ts +2 -2
  62. package/types/components/panel/Panel.d.ts +18 -24
  63. package/types/components/panel/types.d.ts +15 -11
  64. package/types/components/shared.d.ts +2 -1
  65. package/types/components/tabs/Tabs.d.ts +3 -3
  66. package/types/components/tabs/types.d.ts +3 -3
  67. package/types/components/test/Test.d.ts +244 -0
  68. package/types/components/test/index.d.ts +3 -0
  69. package/types/components/test/types.d.ts +41 -0
  70. package/types/directives/vDraggable.d.ts +2 -2
  71. package/types/directives/vResizable.d.ts +2 -2
  72. package/types/hooks/index.d.ts +1 -0
  73. package/types/hooks/useDisabled.d.ts +1 -1
  74. package/types/hooks/useIcon.d.ts +3 -3
  75. package/types/index.d.ts +1 -4
  76. package/types/install.d.ts +4 -0
  77. package/types/list.d.ts +1 -1
  78. package/types/utils/util.d.ts +1 -3
  79. package/types/version.d.ts +8 -1
  80. package/cdn/index.js +0 -1
  81. package/cdn/style.css +0 -1
  82. package/lib/index.js +0 -3825
  83. package/lib/style.css +0 -1
  84. package/types/components/simple-mask/SimpleMask.d.ts +0 -43
  85. package/types/components/simple-mask/index.d.ts +0 -2
  86. package/types/components/startup/Startup.d.ts +0 -38
  87. package/types/components/startup/index.d.ts +0 -2
@@ -1,6 +1,6 @@
1
- import { PropType, InjectionKey, DefineComponent } from 'vue';
2
- import { MenuDataItem, ActionBarItems, ActionProps, ActionMenuItem, ComponentPropsType, DialogProps } from '../';
3
- import { Emits } from '../shared';
1
+ import type { PropType, InjectionKey, DefineComponent } from 'vue';
2
+ import type { MenuDataItem, ActionBarItems, ActionProps, ActionMenuItem, ComponentPropsType, DialogProps } from '../';
3
+ import type { Emits } from '../shared';
4
4
  import type Mask from "./Mask";
5
5
  export declare const TAB_ITEM_WIDTH = 140;
6
6
  export declare const maskProps: {
@@ -1,11 +1,11 @@
1
- import { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, PropType } from 'vue';
2
- import { MenuProps, MenuDataItem } from './types';
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
2
+ import type { MenuProps, MenuDataItem } from './types';
3
3
  declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MenuProps>, {
4
4
  data: () => never[];
5
5
  subMenuProps: () => {};
6
6
  }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
7
7
  select: (item: MenuDataItem) => void;
8
- }, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MenuProps>, {
8
+ }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MenuProps>, {
9
9
  data: () => never[];
10
10
  subMenuProps: () => {};
11
11
  }>>> & {
@@ -28,3 +28,6 @@ type __VLS_WithDefaults<P, D> = {
28
28
  default: D[K];
29
29
  }> : P[K];
30
30
  };
31
+ type __VLS_Prettify<T> = {
32
+ [K in keyof T]: T[K];
33
+ } & {};
@@ -1,11 +1,11 @@
1
- import { MenuDataItem, SubMenuProps } from './types';
2
- import { ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, PropType, DefineComponent } from 'vue';
1
+ import type { MenuDataItem, SubMenuProps } from './types';
2
+ import { ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, type DefineComponent } from 'vue';
3
3
  export interface Props {
4
4
  item: MenuDataItem;
5
5
  subMenu?: SubMenuProps;
6
6
  defaultIcon?: DefineComponent<any, any, any, any>;
7
7
  }
8
- declare const _default: DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>;
8
+ declare const _default: DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>;
9
9
  export default _default;
10
10
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
11
11
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -1,5 +1,5 @@
1
- import { SubMenuProps as ElSubMenuProps, BadgeProps } from 'element-plus';
2
- import { DefineComponent } from 'vue';
1
+ import type { SubMenuProps as ElSubMenuProps, BadgeProps } from 'element-plus';
2
+ import type { DefineComponent } from 'vue';
3
3
  export interface MenuDataItem {
4
4
  id: string | number;
5
5
  title?: string;
@@ -1,6 +1,6 @@
1
1
  import { IconParam, ContainerDirection, ContainerWrap, ContainerJustifyContent, ContainerAlignItems, ContainerAlignContent } from '../';
2
2
  import { BaseSize } from '../shared';
3
- import { DefineComponent, PropType, ExtractPropTypes, Ref, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
3
+ import { DefineComponent, PropType, ExtractPropTypes, Ref, ComponentOptionsMixin, PublicProps } from 'vue';
4
4
  declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
5
5
  fit: {
6
6
  type: BooleanConstructor;
@@ -53,14 +53,6 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
53
53
  };
54
54
  }>>> | null>;
55
55
  };
56
- bodyPadding: {
57
- type: BooleanConstructor;
58
- default: boolean;
59
- };
60
- footerPadding: {
61
- type: BooleanConstructor;
62
- default: boolean;
63
- };
64
56
  body: {
65
57
  type: PropType<Readonly<Partial<ExtractPropTypes<{
66
58
  tag: {
@@ -113,7 +105,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
113
105
  default: boolean;
114
106
  };
115
107
  alignSelf: {
116
- type: PropType<"auto" | ContainerAlignItems>;
108
+ type: PropType<ContainerAlignItems | "auto">;
117
109
  default: string;
118
110
  };
119
111
  overflow: {
@@ -126,6 +118,9 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
126
118
  gap: {
127
119
  type: BooleanConstructor;
128
120
  };
121
+ autoPointer: {
122
+ type: BooleanConstructor;
123
+ };
129
124
  }>>>>;
130
125
  };
131
126
  footer: {
@@ -180,7 +175,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
180
175
  default: boolean;
181
176
  };
182
177
  alignSelf: {
183
- type: PropType<"auto" | ContainerAlignItems>;
178
+ type: PropType<ContainerAlignItems | "auto">;
184
179
  default: string;
185
180
  };
186
181
  overflow: {
@@ -193,11 +188,14 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
193
188
  gap: {
194
189
  type: BooleanConstructor;
195
190
  };
191
+ autoPointer: {
192
+ type: BooleanConstructor;
193
+ };
196
194
  }>>>>;
197
195
  };
198
196
  }, {
199
197
  bodyRef: Ref<any>;
200
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
198
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{
201
199
  fit: {
202
200
  type: BooleanConstructor;
203
201
  default: boolean;
@@ -249,14 +247,6 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
249
247
  };
250
248
  }>>> | null>;
251
249
  };
252
- bodyPadding: {
253
- type: BooleanConstructor;
254
- default: boolean;
255
- };
256
- footerPadding: {
257
- type: BooleanConstructor;
258
- default: boolean;
259
- };
260
250
  body: {
261
251
  type: PropType<Readonly<Partial<ExtractPropTypes<{
262
252
  tag: {
@@ -309,7 +299,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
309
299
  default: boolean;
310
300
  };
311
301
  alignSelf: {
312
- type: PropType<"auto" | ContainerAlignItems>;
302
+ type: PropType<ContainerAlignItems | "auto">;
313
303
  default: string;
314
304
  };
315
305
  overflow: {
@@ -322,6 +312,9 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
322
312
  gap: {
323
313
  type: BooleanConstructor;
324
314
  };
315
+ autoPointer: {
316
+ type: BooleanConstructor;
317
+ };
325
318
  }>>>>;
326
319
  };
327
320
  footer: {
@@ -376,7 +369,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
376
369
  default: boolean;
377
370
  };
378
371
  alignSelf: {
379
- type: PropType<"auto" | ContainerAlignItems>;
372
+ type: PropType<ContainerAlignItems | "auto">;
380
373
  default: string;
381
374
  };
382
375
  overflow: {
@@ -389,6 +382,9 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
389
382
  gap: {
390
383
  type: BooleanConstructor;
391
384
  };
385
+ autoPointer: {
386
+ type: BooleanConstructor;
387
+ };
392
388
  }>>>>;
393
389
  };
394
390
  }>>, {
@@ -396,8 +392,6 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
396
392
  fit: boolean;
397
393
  border: boolean;
398
394
  card: boolean;
399
- bodyPadding: boolean;
400
- footerPadding: boolean;
401
395
  }, {}>, {
402
396
  header?(_: {}): any;
403
397
  title?(_: {}): any;
@@ -1,6 +1,6 @@
1
1
  import { IconParam, ContainerDirection, ContainerWrap, ContainerJustifyContent, ContainerAlignItems, ContainerAlignContent } from '../';
2
2
  import { ExtractPropTypes, PropType } from 'vue';
3
- import { ComponentPropsType, BaseSize } from '../shared';
3
+ import type { ComponentPropsType, BaseSize } from '../shared';
4
4
  export declare const panelProps: {
5
5
  /**
6
6
  * 宽高自适应
@@ -83,16 +83,11 @@ export declare const panelProps: {
83
83
  };
84
84
  }>>> | null>;
85
85
  };
86
- bodyPadding: {
87
- type: BooleanConstructor;
88
- default: boolean;
89
- };
90
- footerPadding: {
91
- type: BooleanConstructor;
92
- default: boolean;
93
- };
94
86
  body: {
95
87
  type: PropType<Readonly<Partial<ExtractPropTypes<{
88
+ /**
89
+ * 阴影设置
90
+ */
96
91
  tag: {
97
92
  type: StringConstructor;
98
93
  default: string;
@@ -143,7 +138,7 @@ export declare const panelProps: {
143
138
  default: boolean;
144
139
  };
145
140
  alignSelf: {
146
- type: PropType<"auto" | ContainerAlignItems>;
141
+ type: PropType<ContainerAlignItems | "auto">;
147
142
  default: string;
148
143
  };
149
144
  overflow: {
@@ -156,10 +151,16 @@ export declare const panelProps: {
156
151
  gap: {
157
152
  type: BooleanConstructor;
158
153
  };
154
+ autoPointer: {
155
+ type: BooleanConstructor;
156
+ };
159
157
  }>>>>;
160
158
  };
161
159
  footer: {
162
160
  type: PropType<Readonly<Partial<ExtractPropTypes<{
161
+ /**
162
+ * 阴影设置
163
+ */
163
164
  tag: {
164
165
  type: StringConstructor;
165
166
  default: string;
@@ -210,7 +211,7 @@ export declare const panelProps: {
210
211
  default: boolean;
211
212
  };
212
213
  alignSelf: {
213
- type: PropType<"auto" | ContainerAlignItems>;
214
+ type: PropType<ContainerAlignItems | "auto">;
214
215
  default: string;
215
216
  };
216
217
  overflow: {
@@ -223,6 +224,9 @@ export declare const panelProps: {
223
224
  gap: {
224
225
  type: BooleanConstructor;
225
226
  };
227
+ autoPointer: {
228
+ type: BooleanConstructor;
229
+ };
226
230
  }>>>>;
227
231
  };
228
232
  };
@@ -1,4 +1,4 @@
1
- import { ExtractPropTypes } from 'vue';
1
+ import type { ExtractPropTypes } from 'vue';
2
2
  import type { MenuProps } from './menu';
3
3
  export interface MaskProject {
4
4
  id?: string;
@@ -24,3 +24,4 @@ export type RecordToUnion<T extends Record<string, any>> = T[keyof T];
24
24
  export type Emits<T extends Record<string, any>> = UnionToIntersection<RecordToUnion<{
25
25
  [K in keyof T]: (evt: K, ...args: T[K]) => void;
26
26
  }>>;
27
+ export type DataLoader<T = any, P = any> = T | ((params?: P) => T | Promise<T>);
@@ -1,6 +1,6 @@
1
1
  import { IconParam } from '..';
2
- import { DefineComponent, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from 'vue';
3
- import { TabsItem } from './types';
2
+ import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
3
+ import { type TabsItem } from './types';
4
4
  declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
5
5
  items: {
6
6
  type: PropType<TabsItem[]>;
@@ -9,7 +9,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
9
9
  border: {
10
10
  type: BooleanConstructor;
11
11
  };
12
- }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
12
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{
13
13
  items: {
14
14
  type: PropType<TabsItem[]>;
15
15
  default(): never[];
@@ -1,6 +1,6 @@
1
- import { PropType } from 'vue';
2
- import { ComponentPropsType } from '../shared';
3
- import { IconParam } from '../';
1
+ import type { PropType } from 'vue';
2
+ import type { ComponentPropsType } from '../shared';
3
+ import type { IconParam } from '../';
4
4
  export interface TabsItem {
5
5
  label: string;
6
6
  name: string | number;
@@ -0,0 +1,244 @@
1
+ import { DefineComponent, Ref, ComponentOptionsMixin, ExtractPropTypes, PublicProps } from 'vue';
2
+ declare const _default: __VLS_WithTemplateSlots<DefineComponent<{
3
+ stringProp: {
4
+ type: StringConstructor;
5
+ };
6
+ booleanProp: {
7
+ type: BooleanConstructor;
8
+ };
9
+ numberProp: {
10
+ type: NumberConstructor;
11
+ };
12
+ selectProp: {
13
+ type: StringConstructor;
14
+ };
15
+ objectProp: {
16
+ type: ObjectConstructor;
17
+ };
18
+ arrayProp: {
19
+ type: ArrayConstructor;
20
+ };
21
+ iconProp: {
22
+ type: StringConstructor;
23
+ };
24
+ colorProp: {
25
+ type: StringConstructor;
26
+ };
27
+ modelValue: {
28
+ type: StringConstructor;
29
+ };
30
+ syncProp: {
31
+ type: StringConstructor;
32
+ };
33
+ }, {
34
+ click: () => void;
35
+ submit: () => void;
36
+ data: Ref<any>;
37
+ change: (params: any) => void;
38
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
39
+ click: (props: Readonly<Partial<ExtractPropTypes<{
40
+ stringProp: {
41
+ type: StringConstructor;
42
+ };
43
+ booleanProp: {
44
+ type: BooleanConstructor;
45
+ };
46
+ numberProp: {
47
+ type: NumberConstructor;
48
+ };
49
+ selectProp: {
50
+ type: StringConstructor;
51
+ };
52
+ objectProp: {
53
+ type: ObjectConstructor;
54
+ };
55
+ arrayProp: {
56
+ type: ArrayConstructor;
57
+ };
58
+ iconProp: {
59
+ type: StringConstructor;
60
+ };
61
+ colorProp: {
62
+ type: StringConstructor;
63
+ };
64
+ modelValue: {
65
+ type: StringConstructor;
66
+ };
67
+ syncProp: {
68
+ type: StringConstructor;
69
+ };
70
+ }>>>) => void;
71
+ submit: (props: Readonly<Partial<ExtractPropTypes<{
72
+ stringProp: {
73
+ type: StringConstructor;
74
+ };
75
+ booleanProp: {
76
+ type: BooleanConstructor;
77
+ };
78
+ numberProp: {
79
+ type: NumberConstructor;
80
+ };
81
+ selectProp: {
82
+ type: StringConstructor;
83
+ };
84
+ objectProp: {
85
+ type: ObjectConstructor;
86
+ };
87
+ arrayProp: {
88
+ type: ArrayConstructor;
89
+ };
90
+ iconProp: {
91
+ type: StringConstructor;
92
+ };
93
+ colorProp: {
94
+ type: StringConstructor;
95
+ };
96
+ modelValue: {
97
+ type: StringConstructor;
98
+ };
99
+ syncProp: {
100
+ type: StringConstructor;
101
+ };
102
+ }>>>) => void;
103
+ change: (data: any) => void;
104
+ "update:modelValue": (value?: string | undefined) => void;
105
+ "update:syncProp": (value?: string | undefined) => void;
106
+ }, string, PublicProps, Readonly<ExtractPropTypes<{
107
+ stringProp: {
108
+ type: StringConstructor;
109
+ };
110
+ booleanProp: {
111
+ type: BooleanConstructor;
112
+ };
113
+ numberProp: {
114
+ type: NumberConstructor;
115
+ };
116
+ selectProp: {
117
+ type: StringConstructor;
118
+ };
119
+ objectProp: {
120
+ type: ObjectConstructor;
121
+ };
122
+ arrayProp: {
123
+ type: ArrayConstructor;
124
+ };
125
+ iconProp: {
126
+ type: StringConstructor;
127
+ };
128
+ colorProp: {
129
+ type: StringConstructor;
130
+ };
131
+ modelValue: {
132
+ type: StringConstructor;
133
+ };
134
+ syncProp: {
135
+ type: StringConstructor;
136
+ };
137
+ }>> & {
138
+ onChange?: ((data: any) => any) | undefined;
139
+ onSubmit?: ((props: Readonly<Partial<ExtractPropTypes<{
140
+ stringProp: {
141
+ type: StringConstructor;
142
+ };
143
+ booleanProp: {
144
+ type: BooleanConstructor;
145
+ };
146
+ numberProp: {
147
+ type: NumberConstructor;
148
+ };
149
+ selectProp: {
150
+ type: StringConstructor;
151
+ };
152
+ objectProp: {
153
+ type: ObjectConstructor;
154
+ };
155
+ arrayProp: {
156
+ type: ArrayConstructor;
157
+ };
158
+ iconProp: {
159
+ type: StringConstructor;
160
+ };
161
+ colorProp: {
162
+ type: StringConstructor;
163
+ };
164
+ modelValue: {
165
+ type: StringConstructor;
166
+ };
167
+ syncProp: {
168
+ type: StringConstructor;
169
+ };
170
+ }>>>) => any) | undefined;
171
+ onClick?: ((props: Readonly<Partial<ExtractPropTypes<{
172
+ stringProp: {
173
+ type: StringConstructor;
174
+ };
175
+ booleanProp: {
176
+ type: BooleanConstructor;
177
+ };
178
+ numberProp: {
179
+ type: NumberConstructor;
180
+ };
181
+ selectProp: {
182
+ type: StringConstructor;
183
+ };
184
+ objectProp: {
185
+ type: ObjectConstructor;
186
+ };
187
+ arrayProp: {
188
+ type: ArrayConstructor;
189
+ };
190
+ iconProp: {
191
+ type: StringConstructor;
192
+ };
193
+ colorProp: {
194
+ type: StringConstructor;
195
+ };
196
+ modelValue: {
197
+ type: StringConstructor;
198
+ };
199
+ syncProp: {
200
+ type: StringConstructor;
201
+ };
202
+ }>>>) => any) | undefined;
203
+ "onUpdate:modelValue"?: ((value?: string | undefined) => any) | undefined;
204
+ "onUpdate:syncProp"?: ((value?: string | undefined) => any) | undefined;
205
+ }, {
206
+ booleanProp: boolean;
207
+ }, {}>, {
208
+ default?(_: {
209
+ props: {
210
+ readonly booleanProp: boolean;
211
+ readonly modelValue?: string | undefined;
212
+ readonly stringProp?: string | undefined;
213
+ readonly numberProp?: number | undefined;
214
+ readonly selectProp?: string | undefined;
215
+ readonly objectProp?: Record<string, any> | undefined;
216
+ readonly arrayProp?: unknown[] | undefined;
217
+ readonly iconProp?: string | undefined;
218
+ readonly colorProp?: string | undefined;
219
+ readonly syncProp?: string | undefined;
220
+ };
221
+ data: any;
222
+ }): any;
223
+ extra?(_: {
224
+ props: {
225
+ readonly booleanProp: boolean;
226
+ readonly modelValue?: string | undefined;
227
+ readonly stringProp?: string | undefined;
228
+ readonly numberProp?: number | undefined;
229
+ readonly selectProp?: string | undefined;
230
+ readonly objectProp?: Record<string, any> | undefined;
231
+ readonly arrayProp?: unknown[] | undefined;
232
+ readonly iconProp?: string | undefined;
233
+ readonly colorProp?: string | undefined;
234
+ readonly syncProp?: string | undefined;
235
+ };
236
+ data: any;
237
+ }): any;
238
+ }>;
239
+ export default _default;
240
+ type __VLS_WithTemplateSlots<T, S> = T & {
241
+ new (): {
242
+ $slots: S;
243
+ };
244
+ };
@@ -0,0 +1,3 @@
1
+ import XTest from "./Test";
2
+ export { XTest };
3
+ export * from './types';
@@ -0,0 +1,41 @@
1
+ import type { ComponentPropsType } from '../shared';
2
+ export declare const testProps: {
3
+ stringProp: {
4
+ type: StringConstructor;
5
+ };
6
+ booleanProp: {
7
+ type: BooleanConstructor;
8
+ };
9
+ numberProp: {
10
+ type: NumberConstructor;
11
+ };
12
+ selectProp: {
13
+ type: StringConstructor;
14
+ };
15
+ objectProp: {
16
+ type: ObjectConstructor;
17
+ };
18
+ arrayProp: {
19
+ type: ArrayConstructor;
20
+ };
21
+ iconProp: {
22
+ type: StringConstructor;
23
+ };
24
+ colorProp: {
25
+ type: StringConstructor;
26
+ };
27
+ modelValue: {
28
+ type: StringConstructor;
29
+ };
30
+ syncProp: {
31
+ type: StringConstructor;
32
+ };
33
+ };
34
+ export type TestProps = ComponentPropsType<typeof testProps>;
35
+ export type TestEmits = {
36
+ click: [props: TestProps];
37
+ submit: [props: TestProps];
38
+ change: [data: any];
39
+ 'update:modelValue': [value?: string];
40
+ 'update:syncProp': [value?: string];
41
+ };
@@ -1,5 +1,5 @@
1
- import { Directive, MaybeRef } from 'vue';
2
- import { UseDraggableOptions } from '@vueuse/core';
1
+ import { type Directive, type MaybeRef } from 'vue';
2
+ import { type UseDraggableOptions } from '@vueuse/core';
3
3
  declare global {
4
4
  interface HTMLElement {
5
5
  __draggable__?: Draggable | null;
@@ -1,5 +1,5 @@
1
- import { Directive, Ref } from 'vue';
2
- import { useMouseInElement, Fn } from '@vueuse/core';
1
+ import { type Directive, type Ref } from 'vue';
2
+ import { useMouseInElement, type Fn } from '@vueuse/core';
3
3
  declare global {
4
4
  interface HTMLElement {
5
5
  __resizable__?: Resizable | null;
@@ -1,2 +1,3 @@
1
1
  export * from './useIcon';
2
2
  export * from './useDisabled';
3
+ export * from './useLoader';
@@ -1,3 +1,3 @@
1
- import { ComputedRef, MaybeRef } from 'vue';
1
+ import { ComputedRef, type MaybeRef } from 'vue';
2
2
  export type IUseDisabled = MaybeRef<undefined | boolean | ((...args: any[]) => boolean)>;
3
3
  export declare function useDisabled(disabled: IUseDisabled, params?: any): ComputedRef<boolean>;
@@ -1,4 +1,4 @@
1
- import { Raw, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, ComputedRef, DefineComponent, MaybeRef } from 'vue';
2
- import { IconParam, IconProps } from '../components';
1
+ import { type ComputedRef, type MaybeRef } from 'vue';
2
+ import { type IconParam, type IconProps } from '../components';
3
3
  export declare function useIconProps(iconRef: MaybeRef<IconParam | undefined>): ComputedRef<IconProps | null>;
4
- export declare function useIcon(icon: MaybeRef<IconParam | undefined>): Raw<DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}, {}>> | null;
4
+ export declare function useIcon(icon: MaybeRef<IconParam | undefined>): Record<string, any> | undefined;
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { App } from 'vue';
1
+ export { version as VTJ_UI_VERSION } from './version';
2
2
  import components from './list';
3
3
  export { components };
4
4
  export * from './components';
@@ -6,6 +6,3 @@ export * from './directives';
6
6
  export * from './hooks';
7
7
  export * from './utils';
8
8
  export * from './constants';
9
- export * from './version';
10
- export declare const install: (app: App<any>) => void;
11
- export default install;
@@ -0,0 +1,4 @@
1
+ import { App } from 'vue';
2
+ declare const install: (app: App<any>) => void;
3
+ export { install };
4
+ export * from './index';
package/types/list.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { DefineComponent } from 'vue';
1
+ import type { DefineComponent } from 'vue';
2
2
  declare const _default: DefineComponent<any, any, any, any>[];
3
3
  export default _default;
@@ -1,5 +1,3 @@
1
1
  export declare function getSizeValue(value: string | number): string;
2
2
  export declare function parseSize(size: string | number | undefined, max: number): number;
3
- export declare function omit<T extends Record<string, any>, K extends Record<string, any>>(target: T, keys: string[]): K;
4
- export declare function pick<T extends Record<string, any>, K extends Record<string, any>>(target: T, keys: string[]): K;
5
- export declare const NOOP: () => void;
3
+ export declare function toObjectProps<T extends Record<string, any>>(value?: boolean | T, defaultValue?: T): T;
@@ -1 +1,8 @@
1
- export declare const version = "0.6.24";
1
+ /**!
2
+ * Copyright (c) 2024, VTJ.PRO All rights reserved.
3
+ * @name @vtj/ui
4
+ * @author CHC chenhuachun1549@dingtalk.com
5
+ * @version 0.7.0
6
+ * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
+ */
8
+ export declare const version = "0.7.0";