@zuzjs/ui 0.5.2 → 0.5.4
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/dist/bin.js +3 -3
- package/dist/comps/alert.d.ts +15 -0
- package/dist/comps/alert.js +15 -0
- package/dist/comps/avatar.d.ts +13 -0
- package/dist/comps/avatar.js +11 -0
- package/dist/comps/base.d.ts +3 -1
- package/dist/comps/base.js +38 -4
- package/dist/comps/box.d.ts +2 -5
- package/dist/comps/checkbox.js +3 -3
- package/dist/comps/contextmenu.js +1 -1
- package/dist/comps/drawer.js +5 -1
- package/dist/comps/form.d.ts +1 -0
- package/dist/comps/form.js +12 -3
- package/dist/comps/heading.d.ts +2 -4
- package/dist/comps/heading.js +4 -2
- package/dist/comps/progressbar.d.ts +11 -0
- package/dist/comps/progressbar.js +14 -0
- package/dist/comps/select.js +4 -5
- package/dist/comps/sheet.d.ts +5 -2
- package/dist/comps/sheet.js +24 -8
- package/dist/comps/tabview.d.ts +5 -1
- package/dist/comps/tabview.js +14 -4
- package/dist/comps/treeview/index.d.ts +28 -0
- package/dist/comps/treeview/index.js +24 -0
- package/dist/comps/treeview/item.d.ts +15 -0
- package/dist/comps/treeview/item.js +23 -0
- package/dist/funs/css.d.ts +3 -1
- package/dist/funs/css.js +64 -6
- package/dist/funs/index.d.ts +9 -1
- package/dist/funs/index.js +118 -0
- package/dist/funs/stylesheet.d.ts +1 -0
- package/dist/funs/stylesheet.js +51 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useImage.d.ts +2 -0
- package/dist/hooks/useImage.js +22 -0
- package/dist/hooks/useKeyBind.d.ts +3 -0
- package/dist/hooks/useKeyBind.js +3 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +5 -1
- package/dist/styles.css +1 -1
- package/dist/types/enums.d.ts +127 -1
- package/dist/types/enums.js +133 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/interfaces.d.ts +10 -0
- package/package.json +1 -1
package/dist/types/enums.d.ts
CHANGED
|
@@ -18,9 +18,15 @@ export declare enum SHEET {
|
|
|
18
18
|
Success = "SUCCESS",
|
|
19
19
|
Warn = "WARN"
|
|
20
20
|
}
|
|
21
|
+
export declare enum SHEET_ACTION_POSITION {
|
|
22
|
+
Left = "LEFT",
|
|
23
|
+
Right = "RIGHT",
|
|
24
|
+
Center = "CENTER"
|
|
25
|
+
}
|
|
21
26
|
export declare enum TRANSITION_CURVES {
|
|
22
27
|
Spring = "SPRING",
|
|
23
|
-
EaseInOut = "EASEINOUT"
|
|
28
|
+
EaseInOut = "EASEINOUT",
|
|
29
|
+
Bounce = "BOUNCE"
|
|
24
30
|
}
|
|
25
31
|
export declare enum TRANSITIONS {
|
|
26
32
|
FadeIn = "FADE_IN",
|
|
@@ -55,3 +61,123 @@ export declare enum DATATYPE {
|
|
|
55
61
|
DateTime = "DATETIME",
|
|
56
62
|
File = "FILE"
|
|
57
63
|
}
|
|
64
|
+
export declare enum SORT {
|
|
65
|
+
Asc = "ASC",
|
|
66
|
+
Desc = "DESC"
|
|
67
|
+
}
|
|
68
|
+
export declare enum PROGRESS {
|
|
69
|
+
Bar = "BAR",
|
|
70
|
+
Ring = "RING"
|
|
71
|
+
}
|
|
72
|
+
export declare enum SKELETON {
|
|
73
|
+
Default = "DEFAULT",
|
|
74
|
+
Circle = "CIRCLE"
|
|
75
|
+
}
|
|
76
|
+
export declare enum ALERT {
|
|
77
|
+
Success = "SUCCESS",
|
|
78
|
+
Error = "ERROR",
|
|
79
|
+
Warning = "WARNING",
|
|
80
|
+
Info = "INFO"
|
|
81
|
+
}
|
|
82
|
+
export declare enum AVATAR {
|
|
83
|
+
Circle = "CIRCLE",
|
|
84
|
+
Square = "SQUARE"
|
|
85
|
+
}
|
|
86
|
+
export declare enum KeyCode {
|
|
87
|
+
Backspace = 8,
|
|
88
|
+
Tab = 9,
|
|
89
|
+
Enter = 13,
|
|
90
|
+
Shift = 16,
|
|
91
|
+
Ctrl = 17,
|
|
92
|
+
Alt = 18,
|
|
93
|
+
PauseBreak = 19,
|
|
94
|
+
CapsLock = 20,
|
|
95
|
+
Escape = 27,
|
|
96
|
+
Space = 32,
|
|
97
|
+
PageUp = 33,
|
|
98
|
+
PageDown = 34,
|
|
99
|
+
End = 35,
|
|
100
|
+
Home = 36,
|
|
101
|
+
ArrowLeft = 37,
|
|
102
|
+
ArrowUp = 38,
|
|
103
|
+
ArrowRight = 39,
|
|
104
|
+
ArrowDown = 40,
|
|
105
|
+
Insert = 45,
|
|
106
|
+
Delete = 46,
|
|
107
|
+
Digit0 = 48,
|
|
108
|
+
Digit1 = 49,
|
|
109
|
+
Digit2 = 50,
|
|
110
|
+
Digit3 = 51,
|
|
111
|
+
Digit4 = 52,
|
|
112
|
+
Digit5 = 53,
|
|
113
|
+
Digit6 = 54,
|
|
114
|
+
Digit7 = 55,
|
|
115
|
+
Digit8 = 56,
|
|
116
|
+
Digit9 = 57,
|
|
117
|
+
KeyA = 65,
|
|
118
|
+
KeyB = 66,
|
|
119
|
+
KeyC = 67,
|
|
120
|
+
KeyD = 68,
|
|
121
|
+
KeyE = 69,
|
|
122
|
+
KeyF = 70,
|
|
123
|
+
KeyG = 71,
|
|
124
|
+
KeyH = 72,
|
|
125
|
+
KeyI = 73,
|
|
126
|
+
KeyJ = 74,
|
|
127
|
+
KeyK = 75,
|
|
128
|
+
KeyL = 76,
|
|
129
|
+
KeyM = 77,
|
|
130
|
+
KeyN = 78,
|
|
131
|
+
KeyO = 79,
|
|
132
|
+
KeyP = 80,
|
|
133
|
+
KeyQ = 81,
|
|
134
|
+
KeyR = 82,
|
|
135
|
+
KeyS = 83,
|
|
136
|
+
KeyT = 84,
|
|
137
|
+
KeyU = 85,
|
|
138
|
+
KeyV = 86,
|
|
139
|
+
KeyW = 87,
|
|
140
|
+
KeyX = 88,
|
|
141
|
+
KeyY = 89,
|
|
142
|
+
KeyZ = 90,
|
|
143
|
+
Numpad0 = 96,
|
|
144
|
+
Numpad1 = 97,
|
|
145
|
+
Numpad2 = 98,
|
|
146
|
+
Numpad3 = 99,
|
|
147
|
+
Numpad4 = 100,
|
|
148
|
+
Numpad5 = 101,
|
|
149
|
+
Numpad6 = 102,
|
|
150
|
+
Numpad7 = 103,
|
|
151
|
+
Numpad8 = 104,
|
|
152
|
+
Numpad9 = 105,
|
|
153
|
+
NumpadMultiply = 106,
|
|
154
|
+
NumpadAdd = 107,
|
|
155
|
+
NumpadSubtract = 109,
|
|
156
|
+
NumpadDecimal = 110,
|
|
157
|
+
NumpadDivide = 111,
|
|
158
|
+
F1 = 112,
|
|
159
|
+
F2 = 113,
|
|
160
|
+
F3 = 114,
|
|
161
|
+
F4 = 115,
|
|
162
|
+
F5 = 116,
|
|
163
|
+
F6 = 117,
|
|
164
|
+
F7 = 118,
|
|
165
|
+
F8 = 119,
|
|
166
|
+
F9 = 120,
|
|
167
|
+
F10 = 121,
|
|
168
|
+
F11 = 122,
|
|
169
|
+
F12 = 123,
|
|
170
|
+
NumLock = 144,
|
|
171
|
+
ScrollLock = 145,
|
|
172
|
+
Semicolon = 186,
|
|
173
|
+
Equal = 187,
|
|
174
|
+
Comma = 188,
|
|
175
|
+
Minus = 189,
|
|
176
|
+
Period = 190,
|
|
177
|
+
Slash = 191,
|
|
178
|
+
Backquote = 192,
|
|
179
|
+
BracketLeft = 219,
|
|
180
|
+
Backslash = 220,
|
|
181
|
+
BracketRight = 221,
|
|
182
|
+
Quote = 222
|
|
183
|
+
}
|
package/dist/types/enums.js
CHANGED
|
@@ -22,10 +22,17 @@ export var SHEET;
|
|
|
22
22
|
SHEET["Success"] = "SUCCESS";
|
|
23
23
|
SHEET["Warn"] = "WARN";
|
|
24
24
|
})(SHEET || (SHEET = {}));
|
|
25
|
+
export var SHEET_ACTION_POSITION;
|
|
26
|
+
(function (SHEET_ACTION_POSITION) {
|
|
27
|
+
SHEET_ACTION_POSITION["Left"] = "LEFT";
|
|
28
|
+
SHEET_ACTION_POSITION["Right"] = "RIGHT";
|
|
29
|
+
SHEET_ACTION_POSITION["Center"] = "CENTER";
|
|
30
|
+
})(SHEET_ACTION_POSITION || (SHEET_ACTION_POSITION = {}));
|
|
25
31
|
export var TRANSITION_CURVES;
|
|
26
32
|
(function (TRANSITION_CURVES) {
|
|
27
33
|
TRANSITION_CURVES["Spring"] = "SPRING";
|
|
28
34
|
TRANSITION_CURVES["EaseInOut"] = "EASEINOUT";
|
|
35
|
+
TRANSITION_CURVES["Bounce"] = "BOUNCE";
|
|
29
36
|
})(TRANSITION_CURVES || (TRANSITION_CURVES = {}));
|
|
30
37
|
export var TRANSITIONS;
|
|
31
38
|
(function (TRANSITIONS) {
|
|
@@ -65,3 +72,129 @@ export var DATATYPE;
|
|
|
65
72
|
DATATYPE["DateTime"] = "DATETIME";
|
|
66
73
|
DATATYPE["File"] = "FILE";
|
|
67
74
|
})(DATATYPE || (DATATYPE = {}));
|
|
75
|
+
export var SORT;
|
|
76
|
+
(function (SORT) {
|
|
77
|
+
SORT["Asc"] = "ASC";
|
|
78
|
+
SORT["Desc"] = "DESC";
|
|
79
|
+
})(SORT || (SORT = {}));
|
|
80
|
+
export var PROGRESS;
|
|
81
|
+
(function (PROGRESS) {
|
|
82
|
+
PROGRESS["Bar"] = "BAR";
|
|
83
|
+
PROGRESS["Ring"] = "RING";
|
|
84
|
+
})(PROGRESS || (PROGRESS = {}));
|
|
85
|
+
export var SKELETON;
|
|
86
|
+
(function (SKELETON) {
|
|
87
|
+
SKELETON["Default"] = "DEFAULT";
|
|
88
|
+
SKELETON["Circle"] = "CIRCLE";
|
|
89
|
+
})(SKELETON || (SKELETON = {}));
|
|
90
|
+
export var ALERT;
|
|
91
|
+
(function (ALERT) {
|
|
92
|
+
ALERT["Success"] = "SUCCESS";
|
|
93
|
+
ALERT["Error"] = "ERROR";
|
|
94
|
+
ALERT["Warning"] = "WARNING";
|
|
95
|
+
ALERT["Info"] = "INFO";
|
|
96
|
+
})(ALERT || (ALERT = {}));
|
|
97
|
+
export var AVATAR;
|
|
98
|
+
(function (AVATAR) {
|
|
99
|
+
AVATAR["Circle"] = "CIRCLE";
|
|
100
|
+
AVATAR["Square"] = "SQUARE";
|
|
101
|
+
})(AVATAR || (AVATAR = {}));
|
|
102
|
+
export var KeyCode;
|
|
103
|
+
(function (KeyCode) {
|
|
104
|
+
KeyCode[KeyCode["Backspace"] = 8] = "Backspace";
|
|
105
|
+
KeyCode[KeyCode["Tab"] = 9] = "Tab";
|
|
106
|
+
KeyCode[KeyCode["Enter"] = 13] = "Enter";
|
|
107
|
+
KeyCode[KeyCode["Shift"] = 16] = "Shift";
|
|
108
|
+
KeyCode[KeyCode["Ctrl"] = 17] = "Ctrl";
|
|
109
|
+
KeyCode[KeyCode["Alt"] = 18] = "Alt";
|
|
110
|
+
KeyCode[KeyCode["PauseBreak"] = 19] = "PauseBreak";
|
|
111
|
+
KeyCode[KeyCode["CapsLock"] = 20] = "CapsLock";
|
|
112
|
+
KeyCode[KeyCode["Escape"] = 27] = "Escape";
|
|
113
|
+
KeyCode[KeyCode["Space"] = 32] = "Space";
|
|
114
|
+
KeyCode[KeyCode["PageUp"] = 33] = "PageUp";
|
|
115
|
+
KeyCode[KeyCode["PageDown"] = 34] = "PageDown";
|
|
116
|
+
KeyCode[KeyCode["End"] = 35] = "End";
|
|
117
|
+
KeyCode[KeyCode["Home"] = 36] = "Home";
|
|
118
|
+
KeyCode[KeyCode["ArrowLeft"] = 37] = "ArrowLeft";
|
|
119
|
+
KeyCode[KeyCode["ArrowUp"] = 38] = "ArrowUp";
|
|
120
|
+
KeyCode[KeyCode["ArrowRight"] = 39] = "ArrowRight";
|
|
121
|
+
KeyCode[KeyCode["ArrowDown"] = 40] = "ArrowDown";
|
|
122
|
+
KeyCode[KeyCode["Insert"] = 45] = "Insert";
|
|
123
|
+
KeyCode[KeyCode["Delete"] = 46] = "Delete";
|
|
124
|
+
KeyCode[KeyCode["Digit0"] = 48] = "Digit0";
|
|
125
|
+
KeyCode[KeyCode["Digit1"] = 49] = "Digit1";
|
|
126
|
+
KeyCode[KeyCode["Digit2"] = 50] = "Digit2";
|
|
127
|
+
KeyCode[KeyCode["Digit3"] = 51] = "Digit3";
|
|
128
|
+
KeyCode[KeyCode["Digit4"] = 52] = "Digit4";
|
|
129
|
+
KeyCode[KeyCode["Digit5"] = 53] = "Digit5";
|
|
130
|
+
KeyCode[KeyCode["Digit6"] = 54] = "Digit6";
|
|
131
|
+
KeyCode[KeyCode["Digit7"] = 55] = "Digit7";
|
|
132
|
+
KeyCode[KeyCode["Digit8"] = 56] = "Digit8";
|
|
133
|
+
KeyCode[KeyCode["Digit9"] = 57] = "Digit9";
|
|
134
|
+
KeyCode[KeyCode["KeyA"] = 65] = "KeyA";
|
|
135
|
+
KeyCode[KeyCode["KeyB"] = 66] = "KeyB";
|
|
136
|
+
KeyCode[KeyCode["KeyC"] = 67] = "KeyC";
|
|
137
|
+
KeyCode[KeyCode["KeyD"] = 68] = "KeyD";
|
|
138
|
+
KeyCode[KeyCode["KeyE"] = 69] = "KeyE";
|
|
139
|
+
KeyCode[KeyCode["KeyF"] = 70] = "KeyF";
|
|
140
|
+
KeyCode[KeyCode["KeyG"] = 71] = "KeyG";
|
|
141
|
+
KeyCode[KeyCode["KeyH"] = 72] = "KeyH";
|
|
142
|
+
KeyCode[KeyCode["KeyI"] = 73] = "KeyI";
|
|
143
|
+
KeyCode[KeyCode["KeyJ"] = 74] = "KeyJ";
|
|
144
|
+
KeyCode[KeyCode["KeyK"] = 75] = "KeyK";
|
|
145
|
+
KeyCode[KeyCode["KeyL"] = 76] = "KeyL";
|
|
146
|
+
KeyCode[KeyCode["KeyM"] = 77] = "KeyM";
|
|
147
|
+
KeyCode[KeyCode["KeyN"] = 78] = "KeyN";
|
|
148
|
+
KeyCode[KeyCode["KeyO"] = 79] = "KeyO";
|
|
149
|
+
KeyCode[KeyCode["KeyP"] = 80] = "KeyP";
|
|
150
|
+
KeyCode[KeyCode["KeyQ"] = 81] = "KeyQ";
|
|
151
|
+
KeyCode[KeyCode["KeyR"] = 82] = "KeyR";
|
|
152
|
+
KeyCode[KeyCode["KeyS"] = 83] = "KeyS";
|
|
153
|
+
KeyCode[KeyCode["KeyT"] = 84] = "KeyT";
|
|
154
|
+
KeyCode[KeyCode["KeyU"] = 85] = "KeyU";
|
|
155
|
+
KeyCode[KeyCode["KeyV"] = 86] = "KeyV";
|
|
156
|
+
KeyCode[KeyCode["KeyW"] = 87] = "KeyW";
|
|
157
|
+
KeyCode[KeyCode["KeyX"] = 88] = "KeyX";
|
|
158
|
+
KeyCode[KeyCode["KeyY"] = 89] = "KeyY";
|
|
159
|
+
KeyCode[KeyCode["KeyZ"] = 90] = "KeyZ";
|
|
160
|
+
KeyCode[KeyCode["Numpad0"] = 96] = "Numpad0";
|
|
161
|
+
KeyCode[KeyCode["Numpad1"] = 97] = "Numpad1";
|
|
162
|
+
KeyCode[KeyCode["Numpad2"] = 98] = "Numpad2";
|
|
163
|
+
KeyCode[KeyCode["Numpad3"] = 99] = "Numpad3";
|
|
164
|
+
KeyCode[KeyCode["Numpad4"] = 100] = "Numpad4";
|
|
165
|
+
KeyCode[KeyCode["Numpad5"] = 101] = "Numpad5";
|
|
166
|
+
KeyCode[KeyCode["Numpad6"] = 102] = "Numpad6";
|
|
167
|
+
KeyCode[KeyCode["Numpad7"] = 103] = "Numpad7";
|
|
168
|
+
KeyCode[KeyCode["Numpad8"] = 104] = "Numpad8";
|
|
169
|
+
KeyCode[KeyCode["Numpad9"] = 105] = "Numpad9";
|
|
170
|
+
KeyCode[KeyCode["NumpadMultiply"] = 106] = "NumpadMultiply";
|
|
171
|
+
KeyCode[KeyCode["NumpadAdd"] = 107] = "NumpadAdd";
|
|
172
|
+
KeyCode[KeyCode["NumpadSubtract"] = 109] = "NumpadSubtract";
|
|
173
|
+
KeyCode[KeyCode["NumpadDecimal"] = 110] = "NumpadDecimal";
|
|
174
|
+
KeyCode[KeyCode["NumpadDivide"] = 111] = "NumpadDivide";
|
|
175
|
+
KeyCode[KeyCode["F1"] = 112] = "F1";
|
|
176
|
+
KeyCode[KeyCode["F2"] = 113] = "F2";
|
|
177
|
+
KeyCode[KeyCode["F3"] = 114] = "F3";
|
|
178
|
+
KeyCode[KeyCode["F4"] = 115] = "F4";
|
|
179
|
+
KeyCode[KeyCode["F5"] = 116] = "F5";
|
|
180
|
+
KeyCode[KeyCode["F6"] = 117] = "F6";
|
|
181
|
+
KeyCode[KeyCode["F7"] = 118] = "F7";
|
|
182
|
+
KeyCode[KeyCode["F8"] = 119] = "F8";
|
|
183
|
+
KeyCode[KeyCode["F9"] = 120] = "F9";
|
|
184
|
+
KeyCode[KeyCode["F10"] = 121] = "F10";
|
|
185
|
+
KeyCode[KeyCode["F11"] = 122] = "F11";
|
|
186
|
+
KeyCode[KeyCode["F12"] = 123] = "F12";
|
|
187
|
+
KeyCode[KeyCode["NumLock"] = 144] = "NumLock";
|
|
188
|
+
KeyCode[KeyCode["ScrollLock"] = 145] = "ScrollLock";
|
|
189
|
+
KeyCode[KeyCode["Semicolon"] = 186] = "Semicolon";
|
|
190
|
+
KeyCode[KeyCode["Equal"] = 187] = "Equal";
|
|
191
|
+
KeyCode[KeyCode["Comma"] = 188] = "Comma";
|
|
192
|
+
KeyCode[KeyCode["Minus"] = 189] = "Minus";
|
|
193
|
+
KeyCode[KeyCode["Period"] = 190] = "Period";
|
|
194
|
+
KeyCode[KeyCode["Slash"] = 191] = "Slash";
|
|
195
|
+
KeyCode[KeyCode["Backquote"] = 192] = "Backquote";
|
|
196
|
+
KeyCode[KeyCode["BracketLeft"] = 219] = "BracketLeft";
|
|
197
|
+
KeyCode[KeyCode["Backslash"] = 220] = "Backslash";
|
|
198
|
+
KeyCode[KeyCode["BracketRight"] = 221] = "BracketRight";
|
|
199
|
+
KeyCode[KeyCode["Quote"] = 222] = "Quote";
|
|
200
|
+
})(KeyCode || (KeyCode = {}));
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SORT } from "./enums";
|
|
1
2
|
export type dynamicObject = {
|
|
2
3
|
[x: string]: any;
|
|
3
4
|
};
|
|
@@ -23,3 +24,10 @@ declare global {
|
|
|
23
24
|
export type FormSubmitHandler = (formData: FormData) => void;
|
|
24
25
|
export type FormInputs = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
|
|
25
26
|
export type zuzProps = `as` | `css` | `hover` | `before` | `after`;
|
|
27
|
+
export type sortOptions = {
|
|
28
|
+
direction?: SORT;
|
|
29
|
+
caseSensitive?: boolean;
|
|
30
|
+
};
|
|
31
|
+
export type KeyBindings = {
|
|
32
|
+
[key: string]: () => void;
|
|
33
|
+
};
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import { DetailedHTMLProps, HTMLAttributes } from "react";
|
|
2
2
|
import { animationProps } from "../comps/base";
|
|
3
|
+
import { SKELETON } from "./enums";
|
|
4
|
+
export interface Skeleton {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
type?: SKELETON;
|
|
7
|
+
size?: number | string;
|
|
8
|
+
width?: number | string;
|
|
9
|
+
height?: number | string;
|
|
10
|
+
radius?: number | string;
|
|
11
|
+
}
|
|
3
12
|
export interface BaseProps {
|
|
4
13
|
as?: string;
|
|
5
14
|
animate?: animationProps;
|
|
6
15
|
editor?: boolean;
|
|
16
|
+
skeleton?: Skeleton;
|
|
7
17
|
}
|
|
8
18
|
export interface FormatNumberParams {
|
|
9
19
|
number: number | string;
|