@cyberpunk-vue/components 1.2.1 → 1.5.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 (73) hide show
  1. package/dist/avatar/index.d.ts.map +1 -1
  2. package/dist/avatar/src/avatar.vue.d.ts.map +1 -1
  3. package/dist/breadcrumb/index.d.ts +117 -0
  4. package/dist/breadcrumb/index.d.ts.map +1 -0
  5. package/dist/breadcrumb/src/breadcrumb.d.ts +79 -0
  6. package/dist/breadcrumb/src/breadcrumb.d.ts.map +1 -0
  7. package/dist/breadcrumb/src/breadcrumb.vue.d.ts +66 -0
  8. package/dist/breadcrumb/src/breadcrumb.vue.d.ts.map +1 -0
  9. package/dist/breadcrumb/src/instance.d.ts +3 -0
  10. package/dist/breadcrumb/src/instance.d.ts.map +1 -0
  11. package/dist/breadcrumb-item/index.d.ts +69 -0
  12. package/dist/breadcrumb-item/index.d.ts.map +1 -0
  13. package/dist/breadcrumb-item/src/breadcrumb-item.d.ts +32 -0
  14. package/dist/breadcrumb-item/src/breadcrumb-item.d.ts.map +1 -0
  15. package/dist/breadcrumb-item/src/breadcrumb-item.vue.d.ts +40 -0
  16. package/dist/breadcrumb-item/src/breadcrumb-item.vue.d.ts.map +1 -0
  17. package/dist/breadcrumb-item/src/instance.d.ts +3 -0
  18. package/dist/breadcrumb-item/src/instance.d.ts.map +1 -0
  19. package/dist/checkbox-group/src/checkbox-group.d.ts.map +1 -1
  20. package/dist/checkbox-group/src/checkbox-group.vue.d.ts +6 -6
  21. package/dist/checkbox-group/src/checkbox-group.vue.d.ts.map +1 -1
  22. package/dist/checkbox-group/src/constants.d.ts.map +1 -1
  23. package/dist/form/index.d.ts +223 -0
  24. package/dist/form/index.d.ts.map +1 -0
  25. package/dist/form/src/constants.d.ts +25 -0
  26. package/dist/form/src/constants.d.ts.map +1 -0
  27. package/dist/form/src/form.d.ts +122 -0
  28. package/dist/form/src/form.d.ts.map +1 -0
  29. package/dist/form/src/form.vue.d.ts +129 -0
  30. package/dist/form/src/form.vue.d.ts.map +1 -0
  31. package/dist/form/src/instance.d.ts +3 -0
  32. package/dist/form/src/instance.d.ts.map +1 -0
  33. package/dist/form-item/index.d.ts +200 -0
  34. package/dist/form-item/index.d.ts.map +1 -0
  35. package/dist/form-item/src/form-item.d.ts +75 -0
  36. package/dist/form-item/src/form-item.d.ts.map +1 -0
  37. package/dist/form-item/src/form-item.vue.d.ts +118 -0
  38. package/dist/form-item/src/form-item.vue.d.ts.map +1 -0
  39. package/dist/form-item/src/instance.d.ts +3 -0
  40. package/dist/form-item/src/instance.d.ts.map +1 -0
  41. package/dist/image/index.d.ts.map +1 -1
  42. package/dist/index.cjs +1 -1
  43. package/dist/index.d.ts +5 -0
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.mjs +4538 -3186
  46. package/dist/menu-item/src/menu-item.d.ts.map +1 -1
  47. package/dist/menu-item/src/menu-item.vue.d.ts +3 -3
  48. package/dist/menu-nav/src/menu-nav.d.ts.map +1 -1
  49. package/dist/menu-nav/src/menu-nav.vue.d.ts +12 -12
  50. package/dist/pagination/src/pagination.d.ts.map +1 -1
  51. package/dist/pagination/src/pagination.vue.d.ts.map +1 -1
  52. package/dist/radio-group/src/constants.d.ts.map +1 -1
  53. package/dist/radio-group/src/radio-group.d.ts.map +1 -1
  54. package/dist/radio-group/src/radio-group.vue.d.ts +3 -3
  55. package/dist/radio-group/src/radio-group.vue.d.ts.map +1 -1
  56. package/dist/spacer/index.d.ts.map +1 -1
  57. package/dist/sub-menu/index.d.ts +15 -0
  58. package/dist/sub-menu/index.d.ts.map +1 -1
  59. package/dist/sub-menu/src/sub-menu.d.ts +8 -0
  60. package/dist/sub-menu/src/sub-menu.d.ts.map +1 -1
  61. package/dist/sub-menu/src/sub-menu.vue.d.ts +12 -3
  62. package/dist/sub-menu/src/sub-menu.vue.d.ts.map +1 -1
  63. package/dist/textarea/index.d.ts.map +1 -1
  64. package/dist/upload/index.d.ts +484 -0
  65. package/dist/upload/index.d.ts.map +1 -0
  66. package/dist/upload/src/instance.d.ts +3 -0
  67. package/dist/upload/src/instance.d.ts.map +1 -0
  68. package/dist/upload/src/upload.d.ts +304 -0
  69. package/dist/upload/src/upload.d.ts.map +1 -0
  70. package/dist/upload/src/upload.vue.d.ts +289 -0
  71. package/dist/upload/src/upload.vue.d.ts.map +1 -0
  72. package/dist/vite.config.d.ts.map +1 -1
  73. package/package.json +4 -4
@@ -0,0 +1,304 @@
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
+ import { Size } from '@cyberpunk-vue/hooks';
3
+ /**
4
+ * 上传文件状态
5
+ */
6
+ export type UploadStatus = 'ready' | 'uploading' | 'success' | 'error';
7
+ /**
8
+ * 上传文件对象
9
+ */
10
+ export interface UploadFile {
11
+ /** 唯一标识 */
12
+ uid: number;
13
+ /** 文件名 */
14
+ name: string;
15
+ /** 文件大小 (bytes) */
16
+ size: number;
17
+ /** 上传状态 */
18
+ status: UploadStatus;
19
+ /** 上传进度 (0-100) */
20
+ percentage: number;
21
+ /** 文件预览地址(图片可读取为 data URL) */
22
+ url?: string;
23
+ /** 服务端返回 */
24
+ response?: unknown;
25
+ /** 原始 File 对象 */
26
+ raw?: File;
27
+ }
28
+ /**
29
+ * 自定义上传请求参数
30
+ */
31
+ export interface UploadRequestOptions {
32
+ action: string;
33
+ file: File;
34
+ filename: string;
35
+ headers: Record<string, string>;
36
+ data: Record<string, string>;
37
+ onProgress: (percentage: number) => void;
38
+ onSuccess: (response: unknown) => void;
39
+ onError: (error: Error) => void;
40
+ }
41
+ /**
42
+ * 文件列表展示类型
43
+ * - `text` — 文件名列表
44
+ * - `picture` — 缩略图 + 文件名列表
45
+ * - `picture-card` — 卡片网格
46
+ */
47
+ export type UploadListType = 'text' | 'picture' | 'picture-card';
48
+ /**
49
+ * 上传组件变体
50
+ * - `outline` — 实线边框
51
+ * - `dashed` — 虚线边框(默认)
52
+ * - `filled` — 填充暗色背景
53
+ * - `ghost` — 无边框无背景
54
+ */
55
+ export type UploadVariant = 'outline' | 'dashed' | 'filled' | 'ghost';
56
+ /**
57
+ * 上传组件形状
58
+ * - `clip` — 机甲切角(默认)
59
+ * - `no-clip` — 直角矩形
60
+ * - `round` — 圆角矩形
61
+ */
62
+ export type UploadShape = 'clip' | 'no-clip' | 'round';
63
+ /**
64
+ * 上传组件颜色类型
65
+ */
66
+ export type UploadType = 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
67
+ /**
68
+ * CpUpload 组件 Props 定义
69
+ *
70
+ * @description 赛博朋克风格文件上传组件,支持拖拽、图片预览、多种变体和形状。
71
+ */
72
+ export declare const uploadProps: {
73
+ /**
74
+ * 文件列表 (v-model)
75
+ * @default []
76
+ */
77
+ readonly modelValue: {
78
+ readonly type: PropType<UploadFile[]>;
79
+ readonly default: () => never[];
80
+ };
81
+ /**
82
+ * 上传地址
83
+ * @default ''
84
+ */
85
+ readonly action: {
86
+ readonly type: StringConstructor;
87
+ readonly default: "";
88
+ };
89
+ /**
90
+ * 请求头
91
+ * @default {}
92
+ */
93
+ readonly headers: {
94
+ readonly type: PropType<Record<string, string>>;
95
+ readonly default: () => {};
96
+ };
97
+ /**
98
+ * 上传附加数据
99
+ * @default {}
100
+ */
101
+ readonly data: {
102
+ readonly type: PropType<Record<string, string>>;
103
+ readonly default: () => {};
104
+ };
105
+ /**
106
+ * 上传文件字段名
107
+ * @default 'file'
108
+ */
109
+ readonly name: {
110
+ readonly type: StringConstructor;
111
+ readonly default: "file";
112
+ };
113
+ /**
114
+ * 接受的文件类型 (原生 accept)
115
+ * @default ''
116
+ */
117
+ readonly accept: {
118
+ readonly type: StringConstructor;
119
+ readonly default: "";
120
+ };
121
+ /**
122
+ * 是否支持多文件
123
+ * @default false
124
+ */
125
+ readonly multiple: {
126
+ readonly type: BooleanConstructor;
127
+ readonly default: false;
128
+ };
129
+ /**
130
+ * 最大文件数 (0 = 无限制)
131
+ * @default 0
132
+ */
133
+ readonly limit: {
134
+ readonly type: NumberConstructor;
135
+ readonly default: 0;
136
+ };
137
+ /**
138
+ * 最大文件大小 bytes (0 = 无限制)
139
+ * @default 0
140
+ */
141
+ readonly maxSize: {
142
+ readonly type: NumberConstructor;
143
+ readonly default: 0;
144
+ };
145
+ /**
146
+ * 是否禁用
147
+ * @default false
148
+ */
149
+ readonly disabled: {
150
+ readonly type: BooleanConstructor;
151
+ readonly default: false;
152
+ };
153
+ /**
154
+ * 拖拽上传模式
155
+ * @default false
156
+ */
157
+ readonly drag: {
158
+ readonly type: BooleanConstructor;
159
+ readonly default: false;
160
+ };
161
+ /**
162
+ * 选择后自动上传
163
+ * @default true
164
+ */
165
+ readonly autoUpload: {
166
+ readonly type: BooleanConstructor;
167
+ readonly default: true;
168
+ };
169
+ /**
170
+ * 文件列表展示类型
171
+ * @default 'text'
172
+ */
173
+ readonly listType: {
174
+ readonly type: PropType<UploadListType>;
175
+ readonly default: "text";
176
+ };
177
+ /**
178
+ * 是否显示文件列表
179
+ * @default true
180
+ */
181
+ readonly showFileList: {
182
+ readonly type: BooleanConstructor;
183
+ readonly default: true;
184
+ };
185
+ /**
186
+ * 变体样式
187
+ * @default 'dashed'
188
+ */
189
+ readonly variant: {
190
+ readonly type: PropType<UploadVariant>;
191
+ readonly default: "dashed";
192
+ };
193
+ /**
194
+ * 形状
195
+ * @default 'clip'
196
+ */
197
+ readonly shape: {
198
+ readonly type: PropType<UploadShape>;
199
+ readonly default: "clip";
200
+ };
201
+ /**
202
+ * 颜色类型
203
+ * @default 'default'
204
+ */
205
+ readonly type: {
206
+ readonly type: PropType<UploadType>;
207
+ readonly default: "default";
208
+ };
209
+ /**
210
+ * 自定义颜色(覆盖 type)
211
+ * @default ''
212
+ */
213
+ readonly color: {
214
+ readonly type: StringConstructor;
215
+ readonly default: "";
216
+ };
217
+ /**
218
+ * 按钮/触发器尺寸
219
+ * @default 'md'
220
+ */
221
+ readonly size: {
222
+ readonly type: PropType<Size>;
223
+ readonly default: "md";
224
+ };
225
+ /**
226
+ * 自定义上传函数
227
+ * 若提供,则完全替代内置 XHR 上传逻辑
228
+ */
229
+ readonly httpRequest: {
230
+ readonly type: PropType<(options: UploadRequestOptions) => Promise<unknown> | void>;
231
+ readonly default: undefined;
232
+ };
233
+ /**
234
+ * 上传前钩子,返回 false 或 reject 可阻止上传
235
+ */
236
+ readonly beforeUpload: {
237
+ readonly type: PropType<(file: File) => boolean | Promise<boolean>>;
238
+ readonly default: undefined;
239
+ };
240
+ /**
241
+ * 超出文件数限制时的回调
242
+ */
243
+ readonly onExceed: {
244
+ readonly type: PropType<(files: File[], fileList: UploadFile[]) => void>;
245
+ readonly default: undefined;
246
+ };
247
+ /**
248
+ * 单图内联预览(picture-card 模式下)
249
+ * 仅在 limit = 1 且 listType = 'picture-card' 时生效。
250
+ * 未显式传值时,在 limit = 1 场景下默认开启;
251
+ * 可显式设为 false 关闭。
252
+ */
253
+ readonly inlinePreview: {
254
+ readonly type: BooleanConstructor;
255
+ readonly default: undefined;
256
+ };
257
+ /**
258
+ * 是否显示 CpProgress 内圈虚线装饰
259
+ * @default false
260
+ */
261
+ readonly showInnerStripe: {
262
+ readonly type: BooleanConstructor;
263
+ readonly default: false;
264
+ };
265
+ /**
266
+ * 自定义触发器文案
267
+ * - drag 模式默认: '拖拽文件到此处,或 点击上传'
268
+ * - 默认(按钮)模式默认: '选择文件'
269
+ * @default undefined
270
+ */
271
+ readonly placeholder: {
272
+ readonly type: StringConstructor;
273
+ readonly default: undefined;
274
+ };
275
+ /**
276
+ * 自定义触发器图标组件
277
+ * 传入 Vue 组件,替换默认 SVG 图标
278
+ * @default undefined
279
+ */
280
+ readonly placeholderIcon: {
281
+ readonly type: PropType<object>;
282
+ readonly default: undefined;
283
+ };
284
+ };
285
+ export type UploadProps = ExtractPropTypes<typeof uploadProps>;
286
+ /**
287
+ * CpUpload 组件事件定义
288
+ */
289
+ export declare const uploadEmits: {
290
+ /** v-model 绑定 */
291
+ 'update:modelValue': (fileList: UploadFile[]) => boolean;
292
+ /** 文件列表变化 */
293
+ change: (file: UploadFile, _fileList: UploadFile[]) => boolean;
294
+ /** 上传成功 */
295
+ success: (_response: unknown, file: UploadFile, _fileList: UploadFile[]) => boolean;
296
+ /** 上传失败 */
297
+ error: (_error: Error, file: UploadFile, _fileList: UploadFile[]) => boolean;
298
+ /** 上传进度 */
299
+ progress: (_percentage: number, file: UploadFile) => boolean;
300
+ /** 文件移除 */
301
+ remove: (file: UploadFile, _fileList: UploadFile[]) => boolean;
302
+ };
303
+ export type UploadEmits = typeof uploadEmits;
304
+ //# sourceMappingURL=upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../upload/src/upload.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,289 @@
1
+ import { UploadFile, UploadRequestOptions } from './upload';
2
+ declare function submit(): void;
3
+ declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
5
+ slots: {
6
+ default?(_: {}): any;
7
+ placeholder?(_: {
8
+ mode: string;
9
+ }): any;
10
+ placeholder?(_: {
11
+ mode: string;
12
+ }): any;
13
+ placeholder?(_: {
14
+ mode: string;
15
+ }): any;
16
+ };
17
+ refs: {
18
+ inputRef: HTMLInputElement;
19
+ };
20
+ rootEl: HTMLDivElement;
21
+ };
22
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
23
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
24
+ readonly modelValue: {
25
+ readonly type: import('vue').PropType<UploadFile[]>;
26
+ readonly default: () => never[];
27
+ };
28
+ readonly action: {
29
+ readonly type: StringConstructor;
30
+ readonly default: "";
31
+ };
32
+ readonly headers: {
33
+ readonly type: import('vue').PropType<Record<string, string>>;
34
+ readonly default: () => {};
35
+ };
36
+ readonly data: {
37
+ readonly type: import('vue').PropType<Record<string, string>>;
38
+ readonly default: () => {};
39
+ };
40
+ readonly name: {
41
+ readonly type: StringConstructor;
42
+ readonly default: "file";
43
+ };
44
+ readonly accept: {
45
+ readonly type: StringConstructor;
46
+ readonly default: "";
47
+ };
48
+ readonly multiple: {
49
+ readonly type: BooleanConstructor;
50
+ readonly default: false;
51
+ };
52
+ readonly limit: {
53
+ readonly type: NumberConstructor;
54
+ readonly default: 0;
55
+ };
56
+ readonly maxSize: {
57
+ readonly type: NumberConstructor;
58
+ readonly default: 0;
59
+ };
60
+ readonly disabled: {
61
+ readonly type: BooleanConstructor;
62
+ readonly default: false;
63
+ };
64
+ readonly drag: {
65
+ readonly type: BooleanConstructor;
66
+ readonly default: false;
67
+ };
68
+ readonly autoUpload: {
69
+ readonly type: BooleanConstructor;
70
+ readonly default: true;
71
+ };
72
+ readonly listType: {
73
+ readonly type: import('vue').PropType<import('./upload').UploadListType>;
74
+ readonly default: "text";
75
+ };
76
+ readonly showFileList: {
77
+ readonly type: BooleanConstructor;
78
+ readonly default: true;
79
+ };
80
+ readonly variant: {
81
+ readonly type: import('vue').PropType<import('./upload').UploadVariant>;
82
+ readonly default: "dashed";
83
+ };
84
+ readonly shape: {
85
+ readonly type: import('vue').PropType<import('./upload').UploadShape>;
86
+ readonly default: "clip";
87
+ };
88
+ readonly type: {
89
+ readonly type: import('vue').PropType<import('./upload').UploadType>;
90
+ readonly default: "default";
91
+ };
92
+ readonly color: {
93
+ readonly type: StringConstructor;
94
+ readonly default: "";
95
+ };
96
+ readonly size: {
97
+ readonly type: import('vue').PropType<import('@cyberpunk-vue/hooks').Size>;
98
+ readonly default: "md";
99
+ };
100
+ readonly httpRequest: {
101
+ readonly type: import('vue').PropType<(options: UploadRequestOptions) => Promise<unknown> | void>;
102
+ readonly default: undefined;
103
+ };
104
+ readonly beforeUpload: {
105
+ readonly type: import('vue').PropType<(file: File) => boolean | Promise<boolean>>;
106
+ readonly default: undefined;
107
+ };
108
+ readonly onExceed: {
109
+ readonly type: import('vue').PropType<(files: File[], fileList: UploadFile[]) => void>;
110
+ readonly default: undefined;
111
+ };
112
+ readonly inlinePreview: {
113
+ readonly type: BooleanConstructor;
114
+ readonly default: undefined;
115
+ };
116
+ readonly showInnerStripe: {
117
+ readonly type: BooleanConstructor;
118
+ readonly default: false;
119
+ };
120
+ readonly placeholder: {
121
+ readonly type: StringConstructor;
122
+ readonly default: undefined;
123
+ };
124
+ readonly placeholderIcon: {
125
+ readonly type: import('vue').PropType<object>;
126
+ readonly default: undefined;
127
+ };
128
+ }>, {
129
+ /** 手动触发上传 */
130
+ submit: typeof submit;
131
+ /** 清空文件列表 */
132
+ clearFiles: () => void;
133
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
134
+ success: (_response: unknown, file: UploadFile, _fileList: UploadFile[]) => void;
135
+ error: (_error: Error, file: UploadFile, _fileList: UploadFile[]) => void;
136
+ progress: (_percentage: number, file: UploadFile) => void;
137
+ "update:modelValue": (fileList: UploadFile[]) => void;
138
+ change: (file: UploadFile, _fileList: UploadFile[]) => void;
139
+ remove: (file: UploadFile, _fileList: UploadFile[]) => void;
140
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
141
+ readonly modelValue: {
142
+ readonly type: import('vue').PropType<UploadFile[]>;
143
+ readonly default: () => never[];
144
+ };
145
+ readonly action: {
146
+ readonly type: StringConstructor;
147
+ readonly default: "";
148
+ };
149
+ readonly headers: {
150
+ readonly type: import('vue').PropType<Record<string, string>>;
151
+ readonly default: () => {};
152
+ };
153
+ readonly data: {
154
+ readonly type: import('vue').PropType<Record<string, string>>;
155
+ readonly default: () => {};
156
+ };
157
+ readonly name: {
158
+ readonly type: StringConstructor;
159
+ readonly default: "file";
160
+ };
161
+ readonly accept: {
162
+ readonly type: StringConstructor;
163
+ readonly default: "";
164
+ };
165
+ readonly multiple: {
166
+ readonly type: BooleanConstructor;
167
+ readonly default: false;
168
+ };
169
+ readonly limit: {
170
+ readonly type: NumberConstructor;
171
+ readonly default: 0;
172
+ };
173
+ readonly maxSize: {
174
+ readonly type: NumberConstructor;
175
+ readonly default: 0;
176
+ };
177
+ readonly disabled: {
178
+ readonly type: BooleanConstructor;
179
+ readonly default: false;
180
+ };
181
+ readonly drag: {
182
+ readonly type: BooleanConstructor;
183
+ readonly default: false;
184
+ };
185
+ readonly autoUpload: {
186
+ readonly type: BooleanConstructor;
187
+ readonly default: true;
188
+ };
189
+ readonly listType: {
190
+ readonly type: import('vue').PropType<import('./upload').UploadListType>;
191
+ readonly default: "text";
192
+ };
193
+ readonly showFileList: {
194
+ readonly type: BooleanConstructor;
195
+ readonly default: true;
196
+ };
197
+ readonly variant: {
198
+ readonly type: import('vue').PropType<import('./upload').UploadVariant>;
199
+ readonly default: "dashed";
200
+ };
201
+ readonly shape: {
202
+ readonly type: import('vue').PropType<import('./upload').UploadShape>;
203
+ readonly default: "clip";
204
+ };
205
+ readonly type: {
206
+ readonly type: import('vue').PropType<import('./upload').UploadType>;
207
+ readonly default: "default";
208
+ };
209
+ readonly color: {
210
+ readonly type: StringConstructor;
211
+ readonly default: "";
212
+ };
213
+ readonly size: {
214
+ readonly type: import('vue').PropType<import('@cyberpunk-vue/hooks').Size>;
215
+ readonly default: "md";
216
+ };
217
+ readonly httpRequest: {
218
+ readonly type: import('vue').PropType<(options: UploadRequestOptions) => Promise<unknown> | void>;
219
+ readonly default: undefined;
220
+ };
221
+ readonly beforeUpload: {
222
+ readonly type: import('vue').PropType<(file: File) => boolean | Promise<boolean>>;
223
+ readonly default: undefined;
224
+ };
225
+ readonly onExceed: {
226
+ readonly type: import('vue').PropType<(files: File[], fileList: UploadFile[]) => void>;
227
+ readonly default: undefined;
228
+ };
229
+ readonly inlinePreview: {
230
+ readonly type: BooleanConstructor;
231
+ readonly default: undefined;
232
+ };
233
+ readonly showInnerStripe: {
234
+ readonly type: BooleanConstructor;
235
+ readonly default: false;
236
+ };
237
+ readonly placeholder: {
238
+ readonly type: StringConstructor;
239
+ readonly default: undefined;
240
+ };
241
+ readonly placeholderIcon: {
242
+ readonly type: import('vue').PropType<object>;
243
+ readonly default: undefined;
244
+ };
245
+ }>> & Readonly<{
246
+ onSuccess?: ((_response: unknown, file: UploadFile, _fileList: UploadFile[]) => any) | undefined;
247
+ onError?: ((_error: Error, file: UploadFile, _fileList: UploadFile[]) => any) | undefined;
248
+ onProgress?: ((_percentage: number, file: UploadFile) => any) | undefined;
249
+ "onUpdate:modelValue"?: ((fileList: UploadFile[]) => any) | undefined;
250
+ onChange?: ((file: UploadFile, _fileList: UploadFile[]) => any) | undefined;
251
+ onRemove?: ((file: UploadFile, _fileList: UploadFile[]) => any) | undefined;
252
+ }>, {
253
+ readonly size: import('@cyberpunk-vue/hooks').Size;
254
+ readonly data: Record<string, string>;
255
+ readonly name: string;
256
+ readonly type: import('./upload').UploadType;
257
+ readonly variant: import('./upload').UploadVariant;
258
+ readonly disabled: boolean;
259
+ readonly color: string;
260
+ readonly shape: import('./upload').UploadShape;
261
+ readonly placeholder: string;
262
+ readonly modelValue: UploadFile[];
263
+ readonly drag: boolean;
264
+ readonly showInnerStripe: boolean;
265
+ readonly multiple: boolean;
266
+ readonly action: string;
267
+ readonly headers: Record<string, string>;
268
+ readonly accept: string;
269
+ readonly limit: number;
270
+ readonly maxSize: number;
271
+ readonly autoUpload: boolean;
272
+ readonly listType: import('./upload').UploadListType;
273
+ readonly showFileList: boolean;
274
+ readonly httpRequest: (options: UploadRequestOptions) => Promise<unknown> | void;
275
+ readonly beforeUpload: (file: File) => boolean | Promise<boolean>;
276
+ readonly onExceed: (files: File[], fileList: UploadFile[]) => void;
277
+ readonly inlinePreview: boolean;
278
+ readonly placeholderIcon: object;
279
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
280
+ inputRef: HTMLInputElement;
281
+ }, HTMLDivElement>;
282
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
283
+ export default _default;
284
+ type __VLS_WithTemplateSlots<T, S> = T & {
285
+ new (): {
286
+ $slots: S;
287
+ };
288
+ };
289
+ //# sourceMappingURL=upload.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload.vue.d.ts","sourceRoot":"","sources":["../../../upload/src/upload.vue"],"names":[],"mappings":"AAmoBA,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AA8UhE,iBAAS,MAAM,SAId;AA2BD,iBAAS,cAAc;WAopBT,OAAO,IAA6B;;yBAdrB,GAAG;;;YACC,GAAG;;;YACF,GAAG;;;YACH,GAAG;;;;;;EAgBpC;AA+BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAhtBjB,aAAa;;IAEb,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAwtBf,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../vite.config.ts"],"names":[],"mappings":";AAKA,wBAmCE"}
1
+ {"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../vite.config.ts"],"names":[],"mappings":";AAKA,wBAwCE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyberpunk-vue/components",
3
- "version": "1.2.1",
3
+ "version": "1.5.0",
4
4
  "description": "Cyberpunk Vue components - A futuristic Vue 3 component library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -23,9 +23,9 @@
23
23
  "vue": "^3.5.0"
24
24
  },
25
25
  "dependencies": {
26
- "@cyberpunk-vue/hooks": "1.2.1",
27
- "@cyberpunk-vue/constants": "1.2.1",
28
- "@cyberpunk-vue/theme-chalk": "1.2.1"
26
+ "@cyberpunk-vue/hooks": "1.5.0",
27
+ "@cyberpunk-vue/constants": "1.5.0",
28
+ "@cyberpunk-vue/theme-chalk": "1.5.0"
29
29
  },
30
30
  "author": "Juxest",
31
31
  "license": "MIT",