@yymojo-tec/mojo-ui 0.1.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/README.md +211 -0
- package/dist/mojo-ui.css +1 -0
- package/dist/mojo-ui.js +2270 -0
- package/dist/mojo-ui.js.map +1 -0
- package/dist/mojo-ui.umd.cjs +5 -0
- package/dist/mojo-ui.umd.cjs.map +1 -0
- package/dist/types/components/button/index.d.ts +60 -0
- package/dist/types/components/button/index.d.ts.map +1 -0
- package/dist/types/components/button/src/button.d.ts +35 -0
- package/dist/types/components/button/src/button.d.ts.map +1 -0
- package/dist/types/components/card/index.d.ts +62 -0
- package/dist/types/components/card/index.d.ts.map +1 -0
- package/dist/types/components/card/src/card.d.ts +13 -0
- package/dist/types/components/card/src/card.d.ts.map +1 -0
- package/dist/types/components/col/index.d.ts +26 -0
- package/dist/types/components/col/index.d.ts.map +1 -0
- package/dist/types/components/col/src/col.d.ts +4 -0
- package/dist/types/components/col/src/col.d.ts.map +1 -0
- package/dist/types/components/form/index.d.ts +56 -0
- package/dist/types/components/form/index.d.ts.map +1 -0
- package/dist/types/components/form/src/context.d.ts +22 -0
- package/dist/types/components/form/src/context.d.ts.map +1 -0
- package/dist/types/components/form/src/form.d.ts +21 -0
- package/dist/types/components/form/src/form.d.ts.map +1 -0
- package/dist/types/components/form-item/index.d.ts +41 -0
- package/dist/types/components/form-item/index.d.ts.map +1 -0
- package/dist/types/components/form-item/src/form-item.d.ts +9 -0
- package/dist/types/components/form-item/src/form-item.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +15 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/types/components/input/index.d.ts +36 -0
- package/dist/types/components/input/index.d.ts.map +1 -0
- package/dist/types/components/input/src/input.d.ts +21 -0
- package/dist/types/components/input/src/input.d.ts.map +1 -0
- package/dist/types/components/menu/index.d.ts +55 -0
- package/dist/types/components/menu/index.d.ts.map +1 -0
- package/dist/types/components/menu/src/menu.d.ts +16 -0
- package/dist/types/components/menu/src/menu.d.ts.map +1 -0
- package/dist/types/components/row/index.d.ts +35 -0
- package/dist/types/components/row/index.d.ts.map +1 -0
- package/dist/types/components/row/src/row.d.ts +9 -0
- package/dist/types/components/row/src/row.d.ts.map +1 -0
- package/dist/types/components/select/index.d.ts +74 -0
- package/dist/types/components/select/index.d.ts.map +1 -0
- package/dist/types/components/select/src/select.d.ts +19 -0
- package/dist/types/components/select/src/select.d.ts.map +1 -0
- package/dist/types/components/tabs/index.d.ts +55 -0
- package/dist/types/components/tabs/index.d.ts.map +1 -0
- package/dist/types/components/tabs/src/tabs.d.ts +14 -0
- package/dist/types/components/tabs/src/tabs.d.ts.map +1 -0
- package/dist/types/components/upload/index.d.ts +231 -0
- package/dist/types/components/upload/index.d.ts.map +1 -0
- package/dist/types/components/upload/src/upload.d.ts +36 -0
- package/dist/types/components/upload/src/upload.d.ts.map +1 -0
- package/dist/types/foundation/headless.d.ts +2 -0
- package/dist/types/foundation/headless.d.ts.map +1 -0
- package/dist/types/foundation/index.d.ts +3 -0
- package/dist/types/foundation/index.d.ts.map +1 -0
- package/dist/types/foundation/tokens.d.ts +6 -0
- package/dist/types/foundation/tokens.d.ts.map +1 -0
- package/dist/types/foundation/types.d.ts +5 -0
- package/dist/types/foundation/types.d.ts.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/utils/install.d.ts +6 -0
- package/dist/types/utils/install.d.ts.map +1 -0
- package/dist/types/utils/validators.d.ts +14 -0
- package/dist/types/utils/validators.d.ts.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export declare const MoTabs: import('../../utils/install').SfcWithInstall<{
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('.').TabsProps> & Readonly<{
|
|
3
|
+
"onUpdate:modelValue"?: ((value: import('./src/tabs').TabsValue) => any) | undefined;
|
|
4
|
+
onChange?: ((value: import('./src/tabs').TabsValue, item: import('.').TabsItem, index: number) => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
"update:modelValue": (value: import('./src/tabs').TabsValue) => any;
|
|
7
|
+
change: (value: import('./src/tabs').TabsValue, item: import('.').TabsItem, index: number) => any;
|
|
8
|
+
}, import('vue').PublicProps, {
|
|
9
|
+
size: import('../../foundation').MojoSize;
|
|
10
|
+
theme: import('../../foundation').MojoTheme;
|
|
11
|
+
modelValue: import('./src/tabs').TabsValue;
|
|
12
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
13
|
+
P: {};
|
|
14
|
+
B: {};
|
|
15
|
+
D: {};
|
|
16
|
+
C: {};
|
|
17
|
+
M: {};
|
|
18
|
+
Defaults: {};
|
|
19
|
+
}, Readonly<import('.').TabsProps> & Readonly<{
|
|
20
|
+
"onUpdate:modelValue"?: ((value: import('./src/tabs').TabsValue) => any) | undefined;
|
|
21
|
+
onChange?: ((value: import('./src/tabs').TabsValue, item: import('.').TabsItem, index: number) => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, {
|
|
23
|
+
size: import('../../foundation').MojoSize;
|
|
24
|
+
theme: import('../../foundation').MojoTheme;
|
|
25
|
+
modelValue: import('./src/tabs').TabsValue;
|
|
26
|
+
}>;
|
|
27
|
+
__isFragment?: never;
|
|
28
|
+
__isTeleport?: never;
|
|
29
|
+
__isSuspense?: never;
|
|
30
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('.').TabsProps> & Readonly<{
|
|
31
|
+
"onUpdate:modelValue"?: ((value: import('./src/tabs').TabsValue) => any) | undefined;
|
|
32
|
+
onChange?: ((value: import('./src/tabs').TabsValue, item: import('.').TabsItem, index: number) => any) | undefined;
|
|
33
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
34
|
+
"update:modelValue": (value: import('./src/tabs').TabsValue) => any;
|
|
35
|
+
change: (value: import('./src/tabs').TabsValue, item: import('.').TabsItem, index: number) => any;
|
|
36
|
+
}, string, {
|
|
37
|
+
size: import('../../foundation').MojoSize;
|
|
38
|
+
theme: import('../../foundation').MojoTheme;
|
|
39
|
+
modelValue: import('./src/tabs').TabsValue;
|
|
40
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
41
|
+
$slots: {
|
|
42
|
+
label?(_: {
|
|
43
|
+
item: import('.').TabsItem;
|
|
44
|
+
index: number;
|
|
45
|
+
selected: any;
|
|
46
|
+
}): any;
|
|
47
|
+
panel?(_: {
|
|
48
|
+
item: import('.').TabsItem;
|
|
49
|
+
index: number;
|
|
50
|
+
}): any;
|
|
51
|
+
};
|
|
52
|
+
})>;
|
|
53
|
+
export default MoTabs;
|
|
54
|
+
export type { TabsItem, TabsProps } from './src/tabs';
|
|
55
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAoB,CAAC;AAExC,eAAe,MAAM,CAAC;AACtB,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MojoSize, MojoTheme } from '../../../foundation';
|
|
2
|
+
export type TabsValue = string | number;
|
|
3
|
+
export interface TabsItem {
|
|
4
|
+
label: string;
|
|
5
|
+
value: TabsValue;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface TabsProps {
|
|
9
|
+
modelValue?: TabsValue;
|
|
10
|
+
items: TabsItem[];
|
|
11
|
+
size?: MojoSize;
|
|
12
|
+
theme?: MojoTheme;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/tabs/src/tabs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAExD,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAExC,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
export declare const MoUpload: import('../../utils/install').SfcWithInstall<{
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('.').UploadProps> & Readonly<{
|
|
3
|
+
onSuccess?: ((file: import('.').UploadFileItem) => any) | undefined;
|
|
4
|
+
onChange?: ((files: import('.').UploadFileItem[]) => any) | undefined;
|
|
5
|
+
onError?: ((file: import('.').UploadFileItem) => any) | undefined;
|
|
6
|
+
onRemove?: ((file: import('.').UploadFileItem) => any) | undefined;
|
|
7
|
+
}>, {
|
|
8
|
+
files: import('vue').Ref<{
|
|
9
|
+
uid: string;
|
|
10
|
+
name: string;
|
|
11
|
+
size: number;
|
|
12
|
+
type: string;
|
|
13
|
+
file: {
|
|
14
|
+
readonly lastModified: number;
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly webkitRelativePath: string;
|
|
17
|
+
readonly size: number;
|
|
18
|
+
readonly type: string;
|
|
19
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
20
|
+
bytes: () => Promise<Uint8Array>;
|
|
21
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
22
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
23
|
+
text: () => Promise<string>;
|
|
24
|
+
};
|
|
25
|
+
status: import('.').UploadFileStatus;
|
|
26
|
+
percent: number;
|
|
27
|
+
url?: string | undefined;
|
|
28
|
+
error?: string | undefined;
|
|
29
|
+
}[], import('.').UploadFileItem[] | {
|
|
30
|
+
uid: string;
|
|
31
|
+
name: string;
|
|
32
|
+
size: number;
|
|
33
|
+
type: string;
|
|
34
|
+
file: {
|
|
35
|
+
readonly lastModified: number;
|
|
36
|
+
readonly name: string;
|
|
37
|
+
readonly webkitRelativePath: string;
|
|
38
|
+
readonly size: number;
|
|
39
|
+
readonly type: string;
|
|
40
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
41
|
+
bytes: () => Promise<Uint8Array>;
|
|
42
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
43
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
44
|
+
text: () => Promise<string>;
|
|
45
|
+
};
|
|
46
|
+
status: import('.').UploadFileStatus;
|
|
47
|
+
percent: number;
|
|
48
|
+
url?: string | undefined;
|
|
49
|
+
error?: string | undefined;
|
|
50
|
+
}[]>;
|
|
51
|
+
submit: () => void;
|
|
52
|
+
clearFiles: () => void;
|
|
53
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
54
|
+
success: (file: import('.').UploadFileItem) => any;
|
|
55
|
+
change: (files: import('.').UploadFileItem[]) => any;
|
|
56
|
+
error: (file: import('.').UploadFileItem) => any;
|
|
57
|
+
remove: (file: import('.').UploadFileItem) => any;
|
|
58
|
+
}, import('vue').PublicProps, {
|
|
59
|
+
theme: import('../../foundation').MojoTheme;
|
|
60
|
+
multiple: boolean;
|
|
61
|
+
accept: string;
|
|
62
|
+
limit: number;
|
|
63
|
+
maxSize: number;
|
|
64
|
+
hint: string;
|
|
65
|
+
autoUpload: boolean;
|
|
66
|
+
request: import('.').UploadRequest;
|
|
67
|
+
crop: boolean;
|
|
68
|
+
manualCrop: boolean;
|
|
69
|
+
cropShape: import('.').UploadCropShape;
|
|
70
|
+
cropSize: number | string;
|
|
71
|
+
cropWidth: number | string;
|
|
72
|
+
cropHeight: number | string;
|
|
73
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
74
|
+
inputRef: HTMLInputElement;
|
|
75
|
+
cropImageRef: HTMLImageElement;
|
|
76
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
77
|
+
P: {};
|
|
78
|
+
B: {};
|
|
79
|
+
D: {};
|
|
80
|
+
C: {};
|
|
81
|
+
M: {};
|
|
82
|
+
Defaults: {};
|
|
83
|
+
}, Readonly<import('.').UploadProps> & Readonly<{
|
|
84
|
+
onSuccess?: ((file: import('.').UploadFileItem) => any) | undefined;
|
|
85
|
+
onChange?: ((files: import('.').UploadFileItem[]) => any) | undefined;
|
|
86
|
+
onError?: ((file: import('.').UploadFileItem) => any) | undefined;
|
|
87
|
+
onRemove?: ((file: import('.').UploadFileItem) => any) | undefined;
|
|
88
|
+
}>, {
|
|
89
|
+
files: import('vue').Ref<{
|
|
90
|
+
uid: string;
|
|
91
|
+
name: string;
|
|
92
|
+
size: number;
|
|
93
|
+
type: string;
|
|
94
|
+
file: {
|
|
95
|
+
readonly lastModified: number;
|
|
96
|
+
readonly name: string;
|
|
97
|
+
readonly webkitRelativePath: string;
|
|
98
|
+
readonly size: number;
|
|
99
|
+
readonly type: string;
|
|
100
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
101
|
+
bytes: () => Promise<Uint8Array>;
|
|
102
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
103
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
104
|
+
text: () => Promise<string>;
|
|
105
|
+
};
|
|
106
|
+
status: import('.').UploadFileStatus;
|
|
107
|
+
percent: number;
|
|
108
|
+
url?: string | undefined;
|
|
109
|
+
error?: string | undefined;
|
|
110
|
+
}[], import('.').UploadFileItem[] | {
|
|
111
|
+
uid: string;
|
|
112
|
+
name: string;
|
|
113
|
+
size: number;
|
|
114
|
+
type: string;
|
|
115
|
+
file: {
|
|
116
|
+
readonly lastModified: number;
|
|
117
|
+
readonly name: string;
|
|
118
|
+
readonly webkitRelativePath: string;
|
|
119
|
+
readonly size: number;
|
|
120
|
+
readonly type: string;
|
|
121
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
122
|
+
bytes: () => Promise<Uint8Array>;
|
|
123
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
124
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
125
|
+
text: () => Promise<string>;
|
|
126
|
+
};
|
|
127
|
+
status: import('.').UploadFileStatus;
|
|
128
|
+
percent: number;
|
|
129
|
+
url?: string | undefined;
|
|
130
|
+
error?: string | undefined;
|
|
131
|
+
}[]>;
|
|
132
|
+
submit: () => void;
|
|
133
|
+
clearFiles: () => void;
|
|
134
|
+
}, {}, {}, {}, {
|
|
135
|
+
theme: import('../../foundation').MojoTheme;
|
|
136
|
+
multiple: boolean;
|
|
137
|
+
accept: string;
|
|
138
|
+
limit: number;
|
|
139
|
+
maxSize: number;
|
|
140
|
+
hint: string;
|
|
141
|
+
autoUpload: boolean;
|
|
142
|
+
request: import('.').UploadRequest;
|
|
143
|
+
crop: boolean;
|
|
144
|
+
manualCrop: boolean;
|
|
145
|
+
cropShape: import('.').UploadCropShape;
|
|
146
|
+
cropSize: number | string;
|
|
147
|
+
cropWidth: number | string;
|
|
148
|
+
cropHeight: number | string;
|
|
149
|
+
}>;
|
|
150
|
+
__isFragment?: never;
|
|
151
|
+
__isTeleport?: never;
|
|
152
|
+
__isSuspense?: never;
|
|
153
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('.').UploadProps> & Readonly<{
|
|
154
|
+
onSuccess?: ((file: import('.').UploadFileItem) => any) | undefined;
|
|
155
|
+
onChange?: ((files: import('.').UploadFileItem[]) => any) | undefined;
|
|
156
|
+
onError?: ((file: import('.').UploadFileItem) => any) | undefined;
|
|
157
|
+
onRemove?: ((file: import('.').UploadFileItem) => any) | undefined;
|
|
158
|
+
}>, {
|
|
159
|
+
files: import('vue').Ref<{
|
|
160
|
+
uid: string;
|
|
161
|
+
name: string;
|
|
162
|
+
size: number;
|
|
163
|
+
type: string;
|
|
164
|
+
file: {
|
|
165
|
+
readonly lastModified: number;
|
|
166
|
+
readonly name: string;
|
|
167
|
+
readonly webkitRelativePath: string;
|
|
168
|
+
readonly size: number;
|
|
169
|
+
readonly type: string;
|
|
170
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
171
|
+
bytes: () => Promise<Uint8Array>;
|
|
172
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
173
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
174
|
+
text: () => Promise<string>;
|
|
175
|
+
};
|
|
176
|
+
status: import('.').UploadFileStatus;
|
|
177
|
+
percent: number;
|
|
178
|
+
url?: string | undefined;
|
|
179
|
+
error?: string | undefined;
|
|
180
|
+
}[], import('.').UploadFileItem[] | {
|
|
181
|
+
uid: string;
|
|
182
|
+
name: string;
|
|
183
|
+
size: number;
|
|
184
|
+
type: string;
|
|
185
|
+
file: {
|
|
186
|
+
readonly lastModified: number;
|
|
187
|
+
readonly name: string;
|
|
188
|
+
readonly webkitRelativePath: string;
|
|
189
|
+
readonly size: number;
|
|
190
|
+
readonly type: string;
|
|
191
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
192
|
+
bytes: () => Promise<Uint8Array>;
|
|
193
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
194
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
195
|
+
text: () => Promise<string>;
|
|
196
|
+
};
|
|
197
|
+
status: import('.').UploadFileStatus;
|
|
198
|
+
percent: number;
|
|
199
|
+
url?: string | undefined;
|
|
200
|
+
error?: string | undefined;
|
|
201
|
+
}[]>;
|
|
202
|
+
submit: () => void;
|
|
203
|
+
clearFiles: () => void;
|
|
204
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
205
|
+
success: (file: import('.').UploadFileItem) => any;
|
|
206
|
+
change: (files: import('.').UploadFileItem[]) => any;
|
|
207
|
+
error: (file: import('.').UploadFileItem) => any;
|
|
208
|
+
remove: (file: import('.').UploadFileItem) => any;
|
|
209
|
+
}, string, {
|
|
210
|
+
theme: import('../../foundation').MojoTheme;
|
|
211
|
+
multiple: boolean;
|
|
212
|
+
accept: string;
|
|
213
|
+
limit: number;
|
|
214
|
+
maxSize: number;
|
|
215
|
+
hint: string;
|
|
216
|
+
autoUpload: boolean;
|
|
217
|
+
request: import('.').UploadRequest;
|
|
218
|
+
crop: boolean;
|
|
219
|
+
manualCrop: boolean;
|
|
220
|
+
cropShape: import('.').UploadCropShape;
|
|
221
|
+
cropSize: number | string;
|
|
222
|
+
cropWidth: number | string;
|
|
223
|
+
cropHeight: number | string;
|
|
224
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
225
|
+
$slots: {
|
|
226
|
+
dropzone?(_: {}): any;
|
|
227
|
+
};
|
|
228
|
+
})>;
|
|
229
|
+
export default MoUpload;
|
|
230
|
+
export type { UploadCropShape, UploadFileItem, UploadFileStatus, UploadProps, UploadRequest } from './src/upload';
|
|
231
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/upload/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAsB,CAAC;AAE5C,eAAe,QAAQ,CAAC;AACxB,YAAY,EACV,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,aAAa,EACd,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { MojoTheme } from '../../../foundation';
|
|
2
|
+
export type UploadFileStatus = "ready" | "uploading" | "success" | "error";
|
|
3
|
+
export type UploadCropShape = "square" | "circle" | "rect";
|
|
4
|
+
export interface UploadFileItem {
|
|
5
|
+
uid: string;
|
|
6
|
+
name: string;
|
|
7
|
+
size: number;
|
|
8
|
+
type: string;
|
|
9
|
+
file: File;
|
|
10
|
+
status: UploadFileStatus;
|
|
11
|
+
percent: number;
|
|
12
|
+
url?: string;
|
|
13
|
+
error?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface UploadRequestOptions {
|
|
16
|
+
file: File;
|
|
17
|
+
onProgress: (percent: number) => void;
|
|
18
|
+
}
|
|
19
|
+
export type UploadRequest = (options: UploadRequestOptions) => Promise<unknown>;
|
|
20
|
+
export interface UploadProps {
|
|
21
|
+
theme?: MojoTheme;
|
|
22
|
+
accept?: string;
|
|
23
|
+
multiple?: boolean;
|
|
24
|
+
limit?: number;
|
|
25
|
+
maxSize?: number;
|
|
26
|
+
hint?: string;
|
|
27
|
+
autoUpload?: boolean;
|
|
28
|
+
request?: UploadRequest;
|
|
29
|
+
crop?: boolean;
|
|
30
|
+
manualCrop?: boolean;
|
|
31
|
+
cropShape?: UploadCropShape;
|
|
32
|
+
cropSize?: number | string;
|
|
33
|
+
cropWidth?: number | string;
|
|
34
|
+
cropHeight?: number | string;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=upload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../../../src/components/upload/src/upload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC;AAC3E,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE3D,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,gBAAgB,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAEhF,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9B"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { Combobox, ComboboxButton, ComboboxInput, ComboboxLabel, ComboboxOption, ComboboxOptions, Dialog, DialogDescription, DialogOverlay, DialogPanel, DialogTitle, Disclosure, DisclosureButton, DisclosurePanel, Listbox, ListboxButton, ListboxLabel, ListboxOption, ListboxOptions, Menu, MenuButton, MenuItem, MenuItems, Popover, PopoverButton, PopoverGroup, PopoverOverlay, PopoverPanel, RadioGroup, RadioGroupDescription, RadioGroupLabel, RadioGroupOption, Switch, SwitchDescription, SwitchGroup, SwitchLabel, Tab, TabGroup, TabList, TabPanel, TabPanels, TransitionChild, TransitionRoot } from '@headlessui/vue';
|
|
2
|
+
//# sourceMappingURL=headless.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless.d.ts","sourceRoot":"","sources":["../../../src/foundation/headless.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,cAAc,EACd,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,MAAM,EACN,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,OAAO,EACP,aAAa,EACb,YAAY,EACZ,aAAa,EACb,cAAc,EACd,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,SAAS,EACT,OAAO,EACP,aAAa,EACb,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,UAAU,EACV,qBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,MAAM,EACN,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,GAAG,EACH,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,SAAS,EACT,eAAe,EACf,cAAc,EACf,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/foundation/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const mojoNamespace = "mo";
|
|
2
|
+
export declare const mojoComponentPrefix = "Mo";
|
|
3
|
+
export declare const mojoSizes: readonly ["small", "default", "large"];
|
|
4
|
+
export declare const mojoStatuses: readonly ["default", "primary", "success", "warning", "danger"];
|
|
5
|
+
export declare const mojoThemes: readonly ["light", "dark"];
|
|
6
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/foundation/tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,OAAO,CAAC;AAClC,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAExC,eAAO,MAAM,SAAS,wCAAyC,CAAC;AAChE,eAAO,MAAM,YAAY,iEAAkE,CAAC;AAC5F,eAAO,MAAM,UAAU,4BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/foundation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEpE,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAClD,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AACvD,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,MAAM,EAAE,MAAM,KAAK,CAAC;AAEvC,OAAO,oBAAoB,CAAC;AAE5B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AAEnC,QAAA,MAAM,MAAM,EAAE,MAMb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/utils/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,MAAM,EAAE,MAAM,KAAK,CAAC;AAEvC,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAE3C,wBAAgB,WAAW,CAAC,CAAC,SAAS;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,SAAS,EAAE,CAAC,GAS7D,cAAc,CAAC,CAAC,CAAC,CACxB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ValidatorValue = unknown;
|
|
2
|
+
export interface MojoRule {
|
|
3
|
+
required?: boolean;
|
|
4
|
+
message?: string;
|
|
5
|
+
validator?: (value: ValidatorValue) => boolean | string | Promise<boolean | string>;
|
|
6
|
+
}
|
|
7
|
+
export declare function isEmpty(value: ValidatorValue): boolean;
|
|
8
|
+
export declare function isRequired(value: ValidatorValue): boolean;
|
|
9
|
+
export declare function isEmail(value: ValidatorValue): boolean;
|
|
10
|
+
export declare function isPhone(value: ValidatorValue): boolean;
|
|
11
|
+
export declare function requiredRule(message?: string): MojoRule;
|
|
12
|
+
export declare function emailRule(message?: string): MojoRule;
|
|
13
|
+
export declare function phoneRule(message?: string): MojoRule;
|
|
14
|
+
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/utils/validators.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC;AAErC,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;CACrF;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,cAAc,WAc5C;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,WAE/C;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,cAAc,WAM5C;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,cAAc,WAM5C;AAED,wBAAgB,YAAY,CAAC,OAAO,SAAW,GAAG,QAAQ,CAKzD;AAED,wBAAgB,SAAS,CAAC,OAAO,SAAe,GAAG,QAAQ,CAK1D;AAED,wBAAgB,SAAS,CAAC,OAAO,SAAc,GAAG,QAAQ,CAKzD"}
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@yymojo-tec/mojo-ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A Vue 3 UI component library.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"main": "./dist/mojo-ui.umd.cjs",
|
|
10
|
+
"module": "./dist/mojo-ui.js",
|
|
11
|
+
"types": "./dist/types/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/types/index.d.ts",
|
|
15
|
+
"import": "./dist/mojo-ui.js",
|
|
16
|
+
"require": "./dist/mojo-ui.umd.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./style.css": "./dist/mojo-ui.css"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": [
|
|
21
|
+
"**/*.css",
|
|
22
|
+
"**/*.scss"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "vite --host 0.0.0.0",
|
|
26
|
+
"dev:local": "vite",
|
|
27
|
+
"build": "run-p typecheck build:lib",
|
|
28
|
+
"build:lib": "vite build",
|
|
29
|
+
"typecheck": "vue-tsc --noEmit",
|
|
30
|
+
"preview": "vite preview",
|
|
31
|
+
"lint": "eslint . --ext .vue,.ts --fix",
|
|
32
|
+
"release:dry": "npm pack --dry-run"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"vue3",
|
|
36
|
+
"component-library",
|
|
37
|
+
"ui",
|
|
38
|
+
"vite"
|
|
39
|
+
],
|
|
40
|
+
"author": "",
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"vue": "^3.5.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@vitejs/plugin-vue": "^5.2.4",
|
|
47
|
+
"@vue/eslint-config-typescript": "^14.5.1",
|
|
48
|
+
"eslint": "^9.29.0",
|
|
49
|
+
"eslint-plugin-vue": "^10.2.0",
|
|
50
|
+
"npm-run-all2": "^8.0.4",
|
|
51
|
+
"sass": "^1.89.2",
|
|
52
|
+
"typescript": "~5.8.3",
|
|
53
|
+
"vite": "^6.3.5",
|
|
54
|
+
"vite-plugin-dts": "^4.5.4",
|
|
55
|
+
"vue": "^3.5.16",
|
|
56
|
+
"vue-tsc": "^2.2.10"
|
|
57
|
+
},
|
|
58
|
+
"publishConfig": {
|
|
59
|
+
"access": "public"
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"@headlessui/vue": "^1.7.23"
|
|
63
|
+
}
|
|
64
|
+
}
|