1inui 1.0.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.
Potentially problematic release.
This version of 1inui might be problematic. Click here for more details.
- package/README.md +157 -0
- package/dist/1in-icons.esm.js +211 -0
- package/dist/1in-icons.js +212 -0
- package/dist/1in-icons.min.js +1 -0
- package/dist/1in-ui.css +2116 -0
- package/dist/1in-ui.d.ts +71 -0
- package/dist/1in-ui.esm.js +646 -0
- package/dist/1in-ui.js +649 -0
- package/dist/1in-ui.min.css +1 -0
- package/dist/1in-ui.min.js +1 -0
- package/package.json +47 -0
package/dist/1in-ui.d.ts
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
declare const UI: {
|
|
2
|
+
version: string;
|
|
3
|
+
theme: {
|
|
4
|
+
init(): void;
|
|
5
|
+
toggle(): boolean;
|
|
6
|
+
set(theme: 'dark' | 'light' | 'system'): void;
|
|
7
|
+
get(): 'dark' | 'light';
|
|
8
|
+
};
|
|
9
|
+
modal: {
|
|
10
|
+
open(options?: {
|
|
11
|
+
title?: string;
|
|
12
|
+
content?: string;
|
|
13
|
+
html?: string;
|
|
14
|
+
size?: 'default' | 'lg' | 'xl';
|
|
15
|
+
closable?: boolean;
|
|
16
|
+
showClose?: boolean;
|
|
17
|
+
onClose?: () => void;
|
|
18
|
+
footer?: string;
|
|
19
|
+
}): { overlay: HTMLElement; modal: HTMLElement };
|
|
20
|
+
close(instance?: any): void;
|
|
21
|
+
closeAll(): void;
|
|
22
|
+
confirm(options?: {
|
|
23
|
+
title?: string;
|
|
24
|
+
content?: string;
|
|
25
|
+
confirmText?: string;
|
|
26
|
+
cancelText?: string;
|
|
27
|
+
danger?: boolean;
|
|
28
|
+
}): Promise<boolean>;
|
|
29
|
+
};
|
|
30
|
+
toast: {
|
|
31
|
+
show(message: string, options?: { type?: 'success' | 'danger' | 'warning' | 'info'; duration?: number }): { remove: () => void };
|
|
32
|
+
success(message: string, options?: { duration?: number }): { remove: () => void };
|
|
33
|
+
error(message: string, options?: { duration?: number }): { remove: () => void };
|
|
34
|
+
warning(message: string, options?: { duration?: number }): { remove: () => void };
|
|
35
|
+
info(message: string, options?: { duration?: number }): { remove: () => void };
|
|
36
|
+
};
|
|
37
|
+
dropdown: {
|
|
38
|
+
init(): void;
|
|
39
|
+
open(element: HTMLElement): void;
|
|
40
|
+
close(element: HTMLElement): void;
|
|
41
|
+
toggle(element: HTMLElement): void;
|
|
42
|
+
};
|
|
43
|
+
loading: {
|
|
44
|
+
show(options?: { text?: string; target?: HTMLElement }): void;
|
|
45
|
+
hide(): void;
|
|
46
|
+
};
|
|
47
|
+
validate: {
|
|
48
|
+
rules: {
|
|
49
|
+
required: (value: string) => true | string;
|
|
50
|
+
email: (value: string) => true | string;
|
|
51
|
+
minLength: (min: number) => (value: string) => true | string;
|
|
52
|
+
maxLength: (max: number) => (value: string) => true | string;
|
|
53
|
+
};
|
|
54
|
+
field(input: HTMLInputElement, rules: Array<(value: string) => true | string>): boolean;
|
|
55
|
+
form(form: HTMLFormElement, config: Record<string, Array<(value: string) => true | string>>): boolean;
|
|
56
|
+
};
|
|
57
|
+
utils: {
|
|
58
|
+
debounce<T extends (...args: any[]) => any>(fn: T, delay?: number): T;
|
|
59
|
+
throttle<T extends (...args: any[]) => any>(fn: T, limit?: number): T;
|
|
60
|
+
formatDate(date: Date | string | number, format?: string): string;
|
|
61
|
+
copyToClipboard(text: string): Promise<boolean>;
|
|
62
|
+
uniqueId(prefix?: string): string;
|
|
63
|
+
};
|
|
64
|
+
init(): void;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
declare const Icons: Record<string, string>;
|
|
68
|
+
declare function icon(name: string, className?: string): string;
|
|
69
|
+
|
|
70
|
+
export { UI, Icons, icon };
|
|
71
|
+
export default UI;
|