@vtj/ui 0.0.1-alpha.5 → 0.0.1

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 (73) hide show
  1. package/cdn/index.js +1 -1
  2. package/cdn/style.css +1 -1
  3. package/lib/index.js +1884 -110
  4. package/lib/style.css +1 -1
  5. package/package.json +7 -7
  6. package/types/components/block/Block.vue.d.ts +22 -5
  7. package/types/components/block/block.d.ts +6 -0
  8. package/types/components/block/index.d.ts +247 -58
  9. package/types/components/config/Config.d.ts +2 -2
  10. package/types/components/config/index.d.ts +3 -3
  11. package/types/components/container/Container.vue.d.ts +52 -0
  12. package/types/components/container/container.d.ts +46 -0
  13. package/types/components/container/index.d.ts +159 -0
  14. package/types/components/cron/Cron.vue.d.ts +9 -0
  15. package/types/components/cron/cron.d.ts +23 -0
  16. package/types/components/cron/index.d.ts +11 -0
  17. package/types/components/dialog/Dialog.vue.d.ts +289 -0
  18. package/types/components/dialog/create.d.ts +6 -0
  19. package/types/components/dialog/dialog.d.ts +155 -0
  20. package/types/components/dialog/hooks.d.ts +927 -0
  21. package/types/components/dialog/index.d.ts +638 -0
  22. package/types/components/element/Element.d.ts +2 -2
  23. package/types/components/element/index.d.ts +3 -3
  24. package/types/components/field/Field.vue.d.ts +802 -0
  25. package/types/components/field/field.d.ts +230 -0
  26. package/types/components/field/hooks.d.ts +23 -0
  27. package/types/components/field/index.d.ts +2034 -0
  28. package/types/components/field/setters/InputSetter.d.ts +45 -0
  29. package/types/components/field/setters/SelectSetter.d.ts +45 -0
  30. package/types/components/field/setters/factory.d.ts +54 -0
  31. package/types/components/field/setters/index.d.ts +93 -0
  32. package/types/components/form/Form.vue.d.ts +5352 -0
  33. package/types/components/form/form.d.ts +384 -0
  34. package/types/components/form/hooks.d.ts +1906 -0
  35. package/types/components/form/index.d.ts +15373 -0
  36. package/types/components/help/Help.vue.d.ts +315 -0
  37. package/types/components/help/help.d.ts +172 -0
  38. package/types/components/help/hooks.d.ts +18 -0
  39. package/types/components/help/index.d.ts +316 -0
  40. package/types/components/icon/Icon.vue.d.ts +22 -7
  41. package/types/components/icon/icon.d.ts +30 -0
  42. package/types/components/icon/index.d.ts +152 -26
  43. package/types/components/index.d.ts +11 -0
  44. package/types/components/page/Page.vue.d.ts +10 -3
  45. package/types/components/page/index.d.ts +109 -10
  46. package/types/components/panel/Panel.vue.d.ts +573 -0
  47. package/types/components/panel/index.d.ts +1207 -0
  48. package/types/components/panel/panel.d.ts +227 -0
  49. package/types/components/text/Text.vue.d.ts +52 -0
  50. package/types/components/text/index.d.ts +165 -0
  51. package/types/components/text/text.d.ts +37 -0
  52. package/types/components/tool/Tool.vue.d.ts +158 -0
  53. package/types/components/tool/Trigger.d.ts +29 -0
  54. package/types/components/tool/hooks.d.ts +250 -0
  55. package/types/components/tool/index.d.ts +371 -0
  56. package/types/components/tool/tool.d.ts +91 -0
  57. package/types/components/toolbar/Toolbar.vue.d.ts +44 -0
  58. package/types/components/toolbar/hooks.d.ts +14 -0
  59. package/types/components/toolbar/index.d.ts +161 -0
  60. package/types/components/toolbar/toolbar.d.ts +45 -0
  61. package/types/components/wrapper/Wrapper.vue.d.ts +268 -0
  62. package/types/components/wrapper/index.d.ts +601 -0
  63. package/types/components/wrapper/wrapper.d.ts +145 -0
  64. package/types/constants.d.ts +3 -0
  65. package/types/hooks/index.d.ts +3 -0
  66. package/types/hooks/useConfig.d.ts +1 -1
  67. package/types/hooks/useDraggable.d.ts +13 -0
  68. package/types/hooks/useIcon.d.ts +4 -0
  69. package/types/hooks/useResizable.d.ts +25 -0
  70. package/types/index.d.ts +5 -3
  71. package/types/list.d.ts +21462 -75
  72. package/types/utils/install.d.ts +1 -1
  73. package/types/utils/util.d.ts +6 -0
@@ -0,0 +1,145 @@
1
+ import { PropType, ExtractPropTypes } from 'vue';
2
+ import { BlockDirection, BlockWrap, BlockOverflow, Emits } from '../..';
3
+ /**
4
+ * 定义组件属性参数
5
+ */
6
+ export declare const wrapperProps: {
7
+ position: {
8
+ type: PropType<"bottom" | "top" | "none">;
9
+ default: string;
10
+ };
11
+ fixed: {
12
+ type: PropType<Partial<ExtractPropTypes<{
13
+ flex: {
14
+ type: BooleanConstructor;
15
+ default: boolean;
16
+ };
17
+ width: {
18
+ type: (StringConstructor | NumberConstructor)[];
19
+ };
20
+ height: {
21
+ type: (StringConstructor | NumberConstructor)[];
22
+ };
23
+ direction: {
24
+ type: PropType<BlockDirection>;
25
+ default: string;
26
+ };
27
+ grow: {
28
+ type: BooleanConstructor;
29
+ default: boolean;
30
+ };
31
+ shrink: {
32
+ type: BooleanConstructor;
33
+ default: boolean;
34
+ };
35
+ wrap: {
36
+ type: PropType<BlockWrap>;
37
+ default: string;
38
+ };
39
+ justify: {
40
+ type: StringConstructor;
41
+ default: string;
42
+ };
43
+ align: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ };
47
+ border: {
48
+ type: BooleanConstructor;
49
+ };
50
+ radius: {
51
+ type: BooleanConstructor;
52
+ };
53
+ background: {
54
+ type: BooleanConstructor;
55
+ };
56
+ split: {
57
+ type: BooleanConstructor;
58
+ };
59
+ fit: {
60
+ type: BooleanConstructor;
61
+ };
62
+ overflow: {
63
+ type: PropType<BlockOverflow>;
64
+ default: string;
65
+ };
66
+ padding: {
67
+ type: BooleanConstructor;
68
+ default: boolean;
69
+ };
70
+ }>>>;
71
+ };
72
+ body: {
73
+ type: PropType<Partial<ExtractPropTypes<{
74
+ flex: {
75
+ type: BooleanConstructor;
76
+ default: boolean;
77
+ };
78
+ width: {
79
+ type: (StringConstructor | NumberConstructor)[];
80
+ };
81
+ height: {
82
+ type: (StringConstructor | NumberConstructor)[];
83
+ };
84
+ direction: {
85
+ type: PropType<BlockDirection>;
86
+ default: string;
87
+ };
88
+ grow: {
89
+ type: BooleanConstructor;
90
+ default: boolean;
91
+ };
92
+ shrink: {
93
+ type: BooleanConstructor;
94
+ default: boolean;
95
+ };
96
+ wrap: {
97
+ type: PropType<BlockWrap>;
98
+ default: string;
99
+ };
100
+ justify: {
101
+ type: StringConstructor;
102
+ default: string;
103
+ };
104
+ align: {
105
+ type: StringConstructor;
106
+ default: string;
107
+ };
108
+ border: {
109
+ type: BooleanConstructor;
110
+ };
111
+ radius: {
112
+ type: BooleanConstructor;
113
+ };
114
+ background: {
115
+ type: BooleanConstructor;
116
+ };
117
+ split: {
118
+ type: BooleanConstructor;
119
+ };
120
+ fit: {
121
+ type: BooleanConstructor;
122
+ };
123
+ overflow: {
124
+ type: PropType<BlockOverflow>;
125
+ default: string;
126
+ };
127
+ padding: {
128
+ type: BooleanConstructor;
129
+ default: boolean;
130
+ };
131
+ }>>>;
132
+ };
133
+ };
134
+ /**
135
+ * 定义组件事件
136
+ */
137
+ export declare const wrapperEmits: {};
138
+ /**
139
+ * 组件属性类型
140
+ */
141
+ export type WrapperProps = Partial<ExtractPropTypes<typeof wrapperProps>>;
142
+ /**
143
+ * 组件事件类型
144
+ */
145
+ export type WrapperEmits = Emits<typeof wrapperEmits>;
@@ -1 +1,4 @@
1
1
  export declare const INSTALLED_KEY: unique symbol;
2
+ export declare const IS_DRAGGING_CLASS_NAME = "is-dragging";
3
+ export declare const IS_RESIZING_CLASS_NAME = "is-resizing";
4
+ export type ButtonSize = '' | 'default' | 'small' | 'large';
@@ -1 +1,4 @@
1
1
  export * from './useConfig';
2
+ export * from './useIcon';
3
+ export * from './useDraggable';
4
+ export * from './useResizable';
@@ -1,4 +1,4 @@
1
- import type { ComputedRef, Ref } from 'vue';
1
+ import { ComputedRef, Ref } from 'vue';
2
2
  import { ConfigContext } from '../components';
3
3
  export declare function useConfig<T>(key?: keyof ConfigContext, defaultValue?: any): ComputedRef<T>;
4
4
  export declare function setConfig(value: ConfigContext | Ref<ConfigContext>): void;
@@ -0,0 +1,13 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ import { UseDraggableOptions as UseCoreDraggableOptions } from '@vueuse/core';
3
+ export interface UseDraggableOptions extends UseCoreDraggableOptions {
4
+ selector?: string;
5
+ edge?: number;
6
+ wrapper?: Ref<HTMLElement | undefined | null>;
7
+ delay?: number;
8
+ }
9
+ export declare function useDraggable(el: Ref<HTMLElement | undefined | null>, options?: UseDraggableOptions): {
10
+ x: Ref<number>;
11
+ y: Ref<number>;
12
+ isDragging: ComputedRef<boolean>;
13
+ };
@@ -0,0 +1,4 @@
1
+ import { ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, ComputedRef, DefineComponent } from 'vue';
2
+ import { IconParam, IconProps } from '..';
3
+ export declare function useIconProps(icon?: IconParam): ComputedRef<IconProps | null>;
4
+ export declare function useIcon(icon?: IconParam): DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}, {}> | null;
@@ -0,0 +1,25 @@
1
+ import { Ref } from 'vue';
2
+ import { useElementBounding, UseElementBoundingOptions } from '@vueuse/core';
3
+ export type UseElementBoundingReturn = ReturnType<typeof useElementBounding>;
4
+ export type UseResizableDir = 'n' | 's' | 'w' | 'e';
5
+ export interface UseResizableOptions {
6
+ edge?: number;
7
+ dirs?: UseResizableDir[];
8
+ onStart?: (bounding: UseElementBoundingReturn) => void;
9
+ onEnd?: (bounding: UseElementBoundingReturn) => void;
10
+ onResizing?: (bounding: UseElementBoundingReturn) => void;
11
+ minWidth?: number;
12
+ minHeight?: number;
13
+ maxWidth?: number;
14
+ maxHeight?: number;
15
+ boundingOptions?: UseElementBoundingOptions;
16
+ }
17
+ export declare function useResizable(el: Ref<HTMLElement | undefined | null>, options?: UseResizableOptions | null): {
18
+ left: Ref<number>;
19
+ top: Ref<number>;
20
+ width: Ref<number>;
21
+ height: Ref<number>;
22
+ direction: Ref<string>;
23
+ resizing: Ref<boolean>;
24
+ update: () => void;
25
+ };
package/types/index.d.ts CHANGED
@@ -1,11 +1,13 @@
1
- import type { ConfigProps } from './components';
2
- import type { App } from 'vue';
1
+ import { ConfigProps } from './components';
2
+ import { App } from 'vue';
3
3
  import components from './list';
4
+ export { components };
4
5
  export * from './components';
5
6
  export * from './hooks';
7
+ export * from './utils';
8
+ export * from './constants';
6
9
  declare const installer: {
7
10
  install: (app: App<any>, options?: Partial<ConfigProps> | undefined) => void;
8
11
  };
9
12
  export declare const install: (app: App<any>, options?: Partial<ConfigProps> | undefined) => void;
10
13
  export default installer;
11
- export { components };