@a2simcode/ui 0.0.8 → 0.0.11

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 (34) hide show
  1. package/dist/components/count/index.d.ts +73 -0
  2. package/dist/components/count/src/count.vue.d.ts +41 -0
  3. package/dist/components/count-up/index.d.ts +87 -0
  4. package/dist/components/count-up/src/count-up.vue.d.ts +43 -0
  5. package/dist/components/data-panel/index.d.ts +27 -0
  6. package/dist/components/data-panel/src/data-panel.vue.d.ts +24 -0
  7. package/dist/components/divider/index.d.ts +25 -0
  8. package/dist/components/divider/src/divider.vue.d.ts +29 -0
  9. package/dist/components/guid/index.d.ts +35 -0
  10. package/dist/components/guid/src/guid.vue.d.ts +28 -0
  11. package/dist/components/hpanel/index.d.ts +22 -0
  12. package/dist/components/hpanel/src/hpanel.vue.d.ts +19 -0
  13. package/dist/components/index.d.ts +19 -1
  14. package/dist/components/input/index.d.ts +3 -3
  15. package/dist/components/input/src/input.vue.d.ts +1 -1
  16. package/dist/components/input-button/index.d.ts +65 -0
  17. package/dist/components/input-button/src/input-button.vue.d.ts +65 -0
  18. package/dist/components/input-code/index.d.ts +52 -0
  19. package/dist/components/input-code/src/input-code.vue.d.ts +41 -0
  20. package/dist/components/slider-captcha/index.d.ts +190 -0
  21. package/dist/components/slider-captcha/src/slider-captcha-action.vue.d.ts +14 -0
  22. package/dist/components/slider-captcha/src/slider-captcha-bar.vue.d.ts +12 -0
  23. package/dist/components/slider-captcha/src/slider-captcha-content.vue.d.ts +45 -0
  24. package/dist/components/slider-captcha/src/slider-captcha.vue.d.ts +262 -0
  25. package/dist/components/slider-captcha/src/types.d.ts +149 -0
  26. package/dist/components/title/index.d.ts +37 -0
  27. package/dist/components/title/src/title.vue.d.ts +35 -0
  28. package/dist/core/utils/common.d.ts +26 -0
  29. package/dist/core/utils/is.d.ts +2 -0
  30. package/dist/simcode-ui.es.js +2696 -1815
  31. package/dist/simcode-ui.umd.js +16 -1
  32. package/dist/stats.html +1 -1
  33. package/dist/ui.css +1 -1
  34. package/package.json +3 -1
@@ -0,0 +1,262 @@
1
+ import { CaptchaVerifyPassingData, SliderCaptchaProps, SliderRotateVerifyPassingData } from './types';
2
+ type __VLS_Props = SliderCaptchaProps;
3
+ type __VLS_PublicProps = {
4
+ modelValue?: boolean;
5
+ } & __VLS_Props;
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ text?(_: {
10
+ isPassing: boolean;
11
+ }): any;
12
+ actionIcon?(_: {
13
+ isPassing: boolean;
14
+ }): any;
15
+ };
16
+ refs: {
17
+ wrapperRef: HTMLDivElement;
18
+ barRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
19
+ barStyle: import('vue').CSSProperties;
20
+ toLeft: boolean;
21
+ }> & Readonly<{}>, {
22
+ getEl: () => HTMLDivElement | null;
23
+ setWidth: (val: string) => void;
24
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
25
+ barRef: HTMLDivElement;
26
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
27
+ P: {};
28
+ B: {};
29
+ D: {};
30
+ C: {};
31
+ M: {};
32
+ Defaults: {};
33
+ }, Readonly<{
34
+ barStyle: import('vue').CSSProperties;
35
+ toLeft: boolean;
36
+ }> & Readonly<{}>, {
37
+ getEl: () => HTMLDivElement | null;
38
+ setWidth: (val: string) => void;
39
+ }, {}, {}, {}, {}> | null;
40
+ contentRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
41
+ contentStyle: {
42
+ type: ObjectConstructor;
43
+ default: () => {};
44
+ };
45
+ isPassing: {
46
+ type: BooleanConstructor;
47
+ default: boolean;
48
+ };
49
+ animationDuration: {
50
+ type: (StringConstructor | NumberConstructor)[];
51
+ default: number;
52
+ };
53
+ animationIterationCount: {
54
+ type: (StringConstructor | NumberConstructor)[];
55
+ default: string;
56
+ };
57
+ }>> & Readonly<{}>, {
58
+ getEl: () => HTMLDivElement | null;
59
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
60
+ isPassing: boolean;
61
+ animationDuration: string | number;
62
+ animationIterationCount: string | number;
63
+ contentStyle: Record<string, any>;
64
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
65
+ contentRef: HTMLDivElement;
66
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
67
+ P: {};
68
+ B: {};
69
+ D: {};
70
+ C: {};
71
+ M: {};
72
+ Defaults: {};
73
+ }, Readonly<import('vue').ExtractPropTypes<{
74
+ contentStyle: {
75
+ type: ObjectConstructor;
76
+ default: () => {};
77
+ };
78
+ isPassing: {
79
+ type: BooleanConstructor;
80
+ default: boolean;
81
+ };
82
+ animationDuration: {
83
+ type: (StringConstructor | NumberConstructor)[];
84
+ default: number;
85
+ };
86
+ animationIterationCount: {
87
+ type: (StringConstructor | NumberConstructor)[];
88
+ default: string;
89
+ };
90
+ }>> & Readonly<{}>, {
91
+ getEl: () => HTMLDivElement | null;
92
+ }, {}, {}, {}, {
93
+ isPassing: boolean;
94
+ animationDuration: string | number;
95
+ animationIterationCount: string | number;
96
+ contentStyle: Record<string, any>;
97
+ }> | null;
98
+ actionRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
99
+ actionStyle: import('vue').CSSProperties;
100
+ isPassing: boolean;
101
+ toLeft: boolean;
102
+ }> & Readonly<{}>, {
103
+ getEl: () => HTMLDivElement | null;
104
+ getStyle: () => CSSStyleDeclaration | undefined;
105
+ setLeft: (val: string) => void;
106
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
107
+ actionRef: HTMLDivElement;
108
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
109
+ P: {};
110
+ B: {};
111
+ D: {};
112
+ C: {};
113
+ M: {};
114
+ Defaults: {};
115
+ }, Readonly<{
116
+ actionStyle: import('vue').CSSProperties;
117
+ isPassing: boolean;
118
+ toLeft: boolean;
119
+ }> & Readonly<{}>, {
120
+ getEl: () => HTMLDivElement | null;
121
+ getStyle: () => CSSStyleDeclaration | undefined;
122
+ setLeft: (val: string) => void;
123
+ }, {}, {}, {}, {}> | null;
124
+ };
125
+ rootEl: HTMLDivElement;
126
+ };
127
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
128
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
129
+ "update:modelValue": (value: boolean) => any;
130
+ move: (args_0: SliderRotateVerifyPassingData) => any;
131
+ success: (args_0: CaptchaVerifyPassingData) => any;
132
+ start: (args_0: MouseEvent | TouchEvent) => any;
133
+ end: (args_0: MouseEvent | TouchEvent) => any;
134
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
135
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
136
+ onMove?: ((args_0: SliderRotateVerifyPassingData) => any) | undefined;
137
+ onSuccess?: ((args_0: CaptchaVerifyPassingData) => any) | undefined;
138
+ onStart?: ((args_0: MouseEvent | TouchEvent) => any) | undefined;
139
+ onEnd?: ((args_0: MouseEvent | TouchEvent) => any) | undefined;
140
+ }>, {
141
+ text: string;
142
+ actionStyle: import('vue').CSSProperties;
143
+ barStyle: import('vue').CSSProperties;
144
+ contentStyle: import('vue').CSSProperties;
145
+ wrapperStyle: import('vue').CSSProperties;
146
+ successText: string;
147
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
148
+ wrapperRef: HTMLDivElement;
149
+ barRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
150
+ barStyle: import('vue').CSSProperties;
151
+ toLeft: boolean;
152
+ }> & Readonly<{}>, {
153
+ getEl: () => HTMLDivElement | null;
154
+ setWidth: (val: string) => void;
155
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
156
+ barRef: HTMLDivElement;
157
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
158
+ P: {};
159
+ B: {};
160
+ D: {};
161
+ C: {};
162
+ M: {};
163
+ Defaults: {};
164
+ }, Readonly<{
165
+ barStyle: import('vue').CSSProperties;
166
+ toLeft: boolean;
167
+ }> & Readonly<{}>, {
168
+ getEl: () => HTMLDivElement | null;
169
+ setWidth: (val: string) => void;
170
+ }, {}, {}, {}, {}> | null;
171
+ contentRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
172
+ contentStyle: {
173
+ type: ObjectConstructor;
174
+ default: () => {};
175
+ };
176
+ isPassing: {
177
+ type: BooleanConstructor;
178
+ default: boolean;
179
+ };
180
+ animationDuration: {
181
+ type: (StringConstructor | NumberConstructor)[];
182
+ default: number;
183
+ };
184
+ animationIterationCount: {
185
+ type: (StringConstructor | NumberConstructor)[];
186
+ default: string;
187
+ };
188
+ }>> & Readonly<{}>, {
189
+ getEl: () => HTMLDivElement | null;
190
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
191
+ isPassing: boolean;
192
+ animationDuration: string | number;
193
+ animationIterationCount: string | number;
194
+ contentStyle: Record<string, any>;
195
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
196
+ contentRef: HTMLDivElement;
197
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
198
+ P: {};
199
+ B: {};
200
+ D: {};
201
+ C: {};
202
+ M: {};
203
+ Defaults: {};
204
+ }, Readonly<import('vue').ExtractPropTypes<{
205
+ contentStyle: {
206
+ type: ObjectConstructor;
207
+ default: () => {};
208
+ };
209
+ isPassing: {
210
+ type: BooleanConstructor;
211
+ default: boolean;
212
+ };
213
+ animationDuration: {
214
+ type: (StringConstructor | NumberConstructor)[];
215
+ default: number;
216
+ };
217
+ animationIterationCount: {
218
+ type: (StringConstructor | NumberConstructor)[];
219
+ default: string;
220
+ };
221
+ }>> & Readonly<{}>, {
222
+ getEl: () => HTMLDivElement | null;
223
+ }, {}, {}, {}, {
224
+ isPassing: boolean;
225
+ animationDuration: string | number;
226
+ animationIterationCount: string | number;
227
+ contentStyle: Record<string, any>;
228
+ }> | null;
229
+ actionRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
230
+ actionStyle: import('vue').CSSProperties;
231
+ isPassing: boolean;
232
+ toLeft: boolean;
233
+ }> & Readonly<{}>, {
234
+ getEl: () => HTMLDivElement | null;
235
+ getStyle: () => CSSStyleDeclaration | undefined;
236
+ setLeft: (val: string) => void;
237
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
238
+ actionRef: HTMLDivElement;
239
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
240
+ P: {};
241
+ B: {};
242
+ D: {};
243
+ C: {};
244
+ M: {};
245
+ Defaults: {};
246
+ }, Readonly<{
247
+ actionStyle: import('vue').CSSProperties;
248
+ isPassing: boolean;
249
+ toLeft: boolean;
250
+ }> & Readonly<{}>, {
251
+ getEl: () => HTMLDivElement | null;
252
+ getStyle: () => CSSStyleDeclaration | undefined;
253
+ setLeft: (val: string) => void;
254
+ }, {}, {}, {}, {}> | null;
255
+ }, HTMLDivElement>;
256
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
257
+ export default _default;
258
+ type __VLS_WithTemplateSlots<T, S> = T & {
259
+ new (): {
260
+ $slots: S;
261
+ };
262
+ };
@@ -0,0 +1,149 @@
1
+ import { CSSProperties } from 'vue';
2
+ export interface CaptchaData {
3
+ /**
4
+ * x
5
+ */
6
+ x: number;
7
+ /**
8
+ * y
9
+ */
10
+ y: number;
11
+ /**
12
+ * 时间戳
13
+ */
14
+ t: number;
15
+ }
16
+ export interface CaptchaPoint extends CaptchaData {
17
+ /**
18
+ * 数据索引
19
+ */
20
+ i: number;
21
+ }
22
+ export interface PointSelectionCaptchaCardProps {
23
+ /**
24
+ * 验证码图片
25
+ */
26
+ captchaImage: string;
27
+ /**
28
+ * 验证码图片高度
29
+ * @default '220px'
30
+ */
31
+ height?: number | string;
32
+ /**
33
+ * 水平内边距
34
+ * @default '12px'
35
+ */
36
+ paddingX?: number | string;
37
+ /**
38
+ * 垂直内边距
39
+ * @default '16px'
40
+ */
41
+ paddingY?: number | string;
42
+ /**
43
+ * 标题
44
+ * @default '请按图依次点击'
45
+ */
46
+ title?: string;
47
+ /**
48
+ * 验证码图片宽度
49
+ * @default '300px'
50
+ */
51
+ width?: number | string;
52
+ }
53
+ export interface PointSelectionCaptchaProps extends PointSelectionCaptchaCardProps {
54
+ /**
55
+ * 是否展示确定按钮
56
+ * @default false
57
+ */
58
+ showConfirm?: boolean;
59
+ /**
60
+ * 提示图片
61
+ * @default ''
62
+ */
63
+ hintImage?: string;
64
+ /**
65
+ * 提示文本
66
+ * @default ''
67
+ */
68
+ hintText?: string;
69
+ }
70
+ export interface SliderCaptchaProps {
71
+ class?: any;
72
+ /**
73
+ * @description 滑块的样式
74
+ * @default {}
75
+ */
76
+ actionStyle?: CSSProperties;
77
+ /**
78
+ * @description 滑块条的样式
79
+ * @default {}
80
+ */
81
+ barStyle?: CSSProperties;
82
+ /**
83
+ * @description 内容的样式
84
+ * @default {}
85
+ */
86
+ contentStyle?: CSSProperties;
87
+ /**
88
+ * @description 组件的样式
89
+ * @default {}
90
+ */
91
+ wrapperStyle?: CSSProperties;
92
+ /**
93
+ * @description 验证成功的提示
94
+ * @default '验证通过'
95
+ */
96
+ successText?: string;
97
+ /**
98
+ * @description 提示文字
99
+ * @default '请按住滑块拖动'
100
+ */
101
+ text?: string;
102
+ }
103
+ export interface SliderRotateCaptchaProps {
104
+ /**
105
+ * @description 旋转的角度
106
+ * @default 20
107
+ */
108
+ diffDegree?: number;
109
+ /**
110
+ * @description 图片的宽度
111
+ * @default 260
112
+ */
113
+ imageSize?: number;
114
+ /**
115
+ * @description 图片的样式
116
+ * @default {}
117
+ */
118
+ imageWrapperStyle?: CSSProperties;
119
+ /**
120
+ * @description 最大旋转角度
121
+ * @default 270
122
+ */
123
+ maxDegree?: number;
124
+ /**
125
+ * @description 最小旋转角度
126
+ * @default 90
127
+ */
128
+ minDegree?: number;
129
+ /**
130
+ * @description 图片的地址
131
+ */
132
+ src?: string;
133
+ /**
134
+ * @description 默认提示文本
135
+ */
136
+ defaultTip?: string;
137
+ }
138
+ export interface CaptchaVerifyPassingData {
139
+ isPassing: boolean;
140
+ time: number | string;
141
+ }
142
+ export interface SliderCaptchaActionType {
143
+ resume: () => void;
144
+ }
145
+ export interface SliderRotateVerifyPassingData {
146
+ event: MouseEvent | TouchEvent;
147
+ moveDistance: number;
148
+ moveX: number;
149
+ }
@@ -0,0 +1,37 @@
1
+ declare const JTitle: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('..').TitleProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
3
+ size: number | string;
4
+ color: string;
5
+ style: Record<string, any>;
6
+ title: string;
7
+ class: string;
8
+ weight: string | number;
9
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
10
+ P: {};
11
+ B: {};
12
+ D: {};
13
+ C: {};
14
+ M: {};
15
+ Defaults: {};
16
+ }, Readonly<import('..').TitleProps> & Readonly<{}>, {}, {}, {}, {}, {
17
+ size: number | string;
18
+ color: string;
19
+ style: Record<string, any>;
20
+ title: string;
21
+ class: string;
22
+ weight: string | number;
23
+ }>;
24
+ __isFragment?: never;
25
+ __isTeleport?: never;
26
+ __isSuspense?: never;
27
+ } & import('vue').ComponentOptionsBase<Readonly<import('..').TitleProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
28
+ size: number | string;
29
+ color: string;
30
+ style: Record<string, any>;
31
+ title: string;
32
+ class: string;
33
+ weight: string | number;
34
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
35
+ install: (app: import('vue').App) => void;
36
+ };
37
+ export default JTitle;
@@ -0,0 +1,35 @@
1
+ export interface TitleProps {
2
+ /**
3
+ * 标题文本内容
4
+ */
5
+ title?: string;
6
+ /**
7
+ * 自定义样式对象
8
+ */
9
+ style?: Record<string, any>;
10
+ /**
11
+ * 自定义类名
12
+ */
13
+ class?: string;
14
+ /**
15
+ * 文本颜色
16
+ */
17
+ color?: string;
18
+ /**
19
+ * 字体大小,支持数字(px)或字符串
20
+ */
21
+ size?: number | string;
22
+ /**
23
+ * 字体粗细 (normal | bold | bolder | lighter | 100-900)
24
+ */
25
+ weight?: string | number;
26
+ }
27
+ declare const _default: import('vue').DefineComponent<TitleProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TitleProps> & Readonly<{}>, {
28
+ size: number | string;
29
+ color: string;
30
+ style: Record<string, any>;
31
+ title: string;
32
+ class: string;
33
+ weight: string | number;
34
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
35
+ export default _default;
@@ -15,6 +15,7 @@ export declare function deepClone(data: any): any;
15
15
  * 对象拷贝
16
16
  */
17
17
  export declare function clone(res: Record<string, any>, data: Record<string, any>, notKeys?: string[]): void;
18
+ export declare const buildUUID: () => string;
18
19
  export declare function buildShortUUID(prefix?: string): string;
19
20
  /**
20
21
  * 将字符串转换为函数
@@ -39,3 +40,28 @@ export declare const getFunction: (fun: string) => {
39
40
  */
40
41
  export declare function set(obj: any, path: string | string[], value: any): any;
41
42
  export declare const toDecimal: (x: any) => number;
43
+ /**
44
+ * 分页方法
45
+ * @param pageNo
46
+ * @param pageSize
47
+ * @param array
48
+ * @returns
49
+ */
50
+ export declare const pagination: (pageNo: number, pageSize: number, array: any[]) => any[];
51
+ export declare const paginationEx: (params: Record<string, any>, array: any[]) => {
52
+ rows: any[];
53
+ total: number;
54
+ page: any;
55
+ records: number;
56
+ };
57
+ export declare const uniqueArray: (arr: any[]) => any[];
58
+ export declare const numberToChinese: (num: string) => string;
59
+ export declare const numberToThousandSeparator: (num: string) => string;
60
+ /**
61
+ * 用来获取文字宽度
62
+ * @param text
63
+ * @returns
64
+ */
65
+ export declare const getTextWidth: (text: string) => number | undefined;
66
+ export declare function upFirst(str: string): string;
67
+ export declare function lowerFirst(str: string, isFlag?: boolean): string;
@@ -1,2 +1,4 @@
1
1
  export declare function isArray(val: any): val is Array<any>;
2
+ export declare function is(val: unknown, type: string): boolean;
3
+ export declare function isObject(val: any): val is Record<any, any>;
2
4
  export declare const isNullOrEmpty: (val: unknown) => boolean;