@zuzjs/ui 0.3.7 → 0.3.9

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 (45) hide show
  1. package/dist/bin.d.ts +2 -0
  2. package/dist/bin.js +107 -0
  3. package/dist/comps/base.d.ts +10 -0
  4. package/dist/comps/base.js +12 -0
  5. package/dist/comps/box.d.ts +4 -0
  6. package/dist/comps/box.js +15 -0
  7. package/dist/comps/button.d.ts +4 -0
  8. package/dist/comps/button.js +19 -0
  9. package/dist/comps/checkbox.d.ts +4 -0
  10. package/dist/comps/checkbox.js +28 -0
  11. package/dist/comps/cover.d.ts +11 -0
  12. package/dist/comps/cover.js +36 -0
  13. package/dist/comps/form.d.ts +18 -0
  14. package/dist/comps/form.js +287 -0
  15. package/dist/comps/heading.d.ts +7 -0
  16. package/dist/comps/heading.js +21 -0
  17. package/dist/comps/icon.d.ts +5 -0
  18. package/dist/comps/icon.js +18 -0
  19. package/dist/comps/input.d.ts +6 -0
  20. package/dist/comps/input.js +23 -0
  21. package/dist/comps/sheet.d.ts +13 -0
  22. package/dist/comps/sheet.js +102 -0
  23. package/dist/comps/spinner.d.ts +14 -0
  24. package/dist/comps/spinner.js +42 -0
  25. package/dist/funs/colors.d.ts +7 -0
  26. package/dist/funs/colors.js +9 -0
  27. package/dist/funs/css.d.ts +269 -0
  28. package/dist/funs/css.js +413 -0
  29. package/dist/funs/index.d.ts +20 -0
  30. package/dist/funs/index.js +125 -0
  31. package/dist/funs/stylesheet.d.ts +242 -0
  32. package/dist/funs/stylesheet.js +249 -0
  33. package/dist/index.d.ts +11 -0
  34. package/dist/index.js +11 -0
  35. package/dist/styles.css +1 -460
  36. package/dist/types/enums.d.ts +19 -0
  37. package/dist/types/enums.js +23 -0
  38. package/dist/types/index.d.ts +24 -0
  39. package/dist/types/index.js +1 -0
  40. package/dist/types/interfaces.d.ts +4 -0
  41. package/dist/types/interfaces.js +1 -0
  42. package/package.json +50 -44
  43. package/README.md +0 -1
  44. package/dist/hooks.js +0 -89
  45. package/dist/ui.js +0 -688
package/dist/styles.css CHANGED
@@ -1,460 +1 @@
1
- *, *:before, *:after {
2
- -moz-box-sizing: border-box;
3
- -webkit-box-sizing: border-box;
4
- box-sizing: border-box;
5
- }
6
-
7
- *, html, body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, label, fieldset, input, p, blockquote, th, td {
8
- margin: 0;
9
- padding: 0;
10
- }
11
-
12
- table {
13
- border-collapse: collapse;
14
- border-spacing: 0;
15
- }
16
-
17
- fieldset, img {
18
- border: 0;
19
- }
20
-
21
- address, caption, cite, code, dfn, em, strong, th, var {
22
- font-style: normal;
23
- font-weight: normal;
24
- }
25
-
26
- ol, ul, li {
27
- list-style: none;
28
- }
29
-
30
- caption, th {
31
- text-align: left;
32
- }
33
-
34
- h1, h2, h3, h4, h5, h6 {
35
- font-size: 100%;
36
- font-weight: normal;
37
- }
38
-
39
- div, img, button, input, textarea, select {
40
- outline: none;
41
- }
42
-
43
- strong {
44
- font-weight: bold;
45
- }
46
-
47
- em {
48
- font-style: italic;
49
- }
50
-
51
- a img {
52
- border: none;
53
- }
54
-
55
- button {
56
- cursor: pointer;
57
- }
58
-
59
- .grid {
60
- display: grid;
61
- }
62
-
63
- .fixed {
64
- position: fixed;
65
- }
66
- .fixed.fill {
67
- top: 0px;
68
- left: 0px;
69
- right: 0px;
70
- bottom: 0px;
71
- }
72
-
73
- .rel {
74
- position: relative;
75
- }
76
-
77
- .abs {
78
- position: absolute;
79
- }
80
- .abs.abc {
81
- top: 50%;
82
- left: 50%;
83
- transform: translate(-50%, -50%);
84
- }
85
- .abs.fill {
86
- top: 0px;
87
- left: 0px;
88
- right: 0px;
89
- bottom: 0px;
90
- }
91
-
92
- .sticky {
93
- position: sticky;
94
- }
95
-
96
- .block {
97
- display: block;
98
- }
99
-
100
- .iblock {
101
- display: inline-block;
102
- }
103
-
104
- .tdnh, .tdn {
105
- text-decoration: none;
106
- }
107
-
108
- .tdnh:hover, .tdh:hover {
109
- text-decoration: underline;
110
- }
111
-
112
- .flex {
113
- display: flex;
114
- }
115
- .flex.ass {
116
- align-self: flex-start;
117
- }
118
- .flex.asc {
119
- align-self: center;
120
- }
121
- .flex.ase {
122
- align-self: flex-end;
123
- }
124
- .flex.ais {
125
- align-items: flex-start;
126
- }
127
- .flex.aic {
128
- align-items: center;
129
- }
130
- .flex.aie {
131
- align-items: flex-end;
132
- }
133
- .flex.jcs {
134
- justify-content: flex-start;
135
- }
136
- .flex.jcc {
137
- justify-content: center;
138
- }
139
- .flex.jce {
140
- justify-content: flex-end;
141
- }
142
- .flex.col {
143
- flex-direction: column;
144
- }
145
-
146
- /*
147
- COLORS
148
- It will generate .cfff { color: #fff; } from 'fff'
149
- */
150
- .cfff {
151
- color: #fff;
152
- }
153
-
154
- .c111 {
155
- color: #111;
156
- }
157
-
158
- .c222 {
159
- color: #222;
160
- }
161
-
162
- .c333 {
163
- color: #333;
164
- }
165
-
166
- .c444 {
167
- color: #444;
168
- }
169
-
170
- .c555 {
171
- color: #555;
172
- }
173
-
174
- .c666 {
175
- color: #666;
176
- }
177
-
178
- .c777 {
179
- color: #777;
180
- }
181
-
182
- .c888 {
183
- color: #888;
184
- }
185
-
186
- .c999 {
187
- color: #999;
188
- }
189
-
190
- /*
191
- FONT SIZES
192
- It will generate .s10 { font-size: 12px; } from '12'
193
- */
194
- .s10 {
195
- font-size: 10px;
196
- }
197
-
198
- .s12 {
199
- font-size: 12px;
200
- }
201
-
202
- .s14 {
203
- font-size: 14px;
204
- }
205
-
206
- .s16 {
207
- font-size: 16px;
208
- }
209
-
210
- .s18 {
211
- font-size: 18px;
212
- }
213
-
214
- .s20 {
215
- font-size: 20px;
216
- }
217
-
218
- .s22 {
219
- font-size: 22px;
220
- }
221
-
222
- .s24 {
223
- font-size: 24px;
224
- }
225
-
226
- .s26 {
227
- font-size: 26px;
228
- }
229
-
230
- .s28 {
231
- font-size: 28px;
232
- }
233
-
234
- .s30 {
235
- font-size: 30px;
236
- }
237
-
238
- .s32 {
239
- font-size: 32px;
240
- }
241
-
242
- .s34 {
243
- font-size: 34px;
244
- }
245
-
246
- .s36 {
247
- font-size: 36px;
248
- }
249
-
250
- .s38 {
251
- font-size: 38px;
252
- }
253
-
254
- .s40 {
255
- font-size: 40px;
256
- }
257
-
258
- .s42 {
259
- font-size: 42px;
260
- }
261
-
262
- .s44 {
263
- font-size: 44px;
264
- }
265
-
266
- .s46 {
267
- font-size: 46px;
268
- }
269
-
270
- .s48 {
271
- font-size: 48px;
272
- }
273
-
274
- .s50 {
275
- font-size: 50px;
276
- }
277
-
278
- .s52 {
279
- font-size: 52px;
280
- }
281
-
282
- .s54 {
283
- font-size: 54px;
284
- }
285
-
286
- .s56 {
287
- font-size: 56px;
288
- }
289
-
290
- .s58 {
291
- font-size: 58px;
292
- }
293
-
294
- .s60 {
295
- font-size: 60px;
296
- }
297
-
298
- .s62 {
299
- font-size: 62px;
300
- }
301
-
302
- .s64 {
303
- font-size: 64px;
304
- }
305
-
306
- .s66 {
307
- font-size: 66px;
308
- }
309
-
310
- .s68 {
311
- font-size: 68px;
312
- }
313
-
314
- .s70 {
315
- font-size: 70px;
316
- }
317
-
318
- .s72 {
319
- font-size: 72px;
320
- }
321
-
322
- /*
323
- BoldSize
324
- It will generate .b400 { font-weight: 400; } from '400'
325
- */
326
- .bold {
327
- font-weight: bold;
328
- }
329
-
330
- .b100 {
331
- font-weight: 100;
332
- }
333
-
334
- .b200 {
335
- font-weight: 200;
336
- }
337
-
338
- .b300 {
339
- font-weight: 300;
340
- }
341
-
342
- .b400 {
343
- font-weight: 400;
344
- }
345
-
346
- .b500 {
347
- font-weight: 500;
348
- }
349
-
350
- .b600 {
351
- font-weight: 600;
352
- }
353
-
354
- .b700 {
355
- font-weight: 700;
356
- }
357
-
358
- .b800 {
359
- font-weight: 800;
360
- }
361
-
362
- .b900 {
363
- font-weight: 900;
364
- }
365
-
366
- @keyframes rotate-loop {
367
- from {
368
- -ms-transform: rotate(0deg);
369
- -moz-transform: rotate(0deg);
370
- -webkit-transform: rotate(0deg);
371
- -o-transform: rotate(0deg);
372
- transform: rotate(0deg);
373
- }
374
- to {
375
- -ms-transform: rotate(360deg);
376
- -moz-transform: rotate(360deg);
377
- -webkit-transform: rotate(360deg);
378
- -o-transform: rotate(360deg);
379
- transform: rotate(360deg);
380
- }
381
- }
382
- .zuz-spinner .zuz-loader {
383
- animation: rotate-loop 0.5s linear infinite;
384
- }
385
-
386
- .button {
387
- border: 0px;
388
- }
389
-
390
- .zuz-checkbox {
391
- opacity: 0;
392
- position: absolute;
393
- }
394
- .zuz-checkbox + label {
395
- position: relative;
396
- display: inline-block;
397
- user-select: none;
398
- transition: 0.4s ease;
399
- height: 26px;
400
- width: 44px;
401
- border-radius: 60px;
402
- background: #eee;
403
- }
404
- .zuz-checkbox + label:before {
405
- content: "";
406
- position: absolute;
407
- display: block;
408
- transition: 0.2s cubic-bezier(0.24, 0, 0.5, 1);
409
- height: 26px;
410
- width: 44px;
411
- top: 0;
412
- left: 0;
413
- border-radius: 30px;
414
- }
415
- .zuz-checkbox + label:after {
416
- content: "";
417
- position: absolute;
418
- display: block;
419
- transition: 0.35s cubic-bezier(0.54, 1.6, 0.5, 1);
420
- background: #fff;
421
- height: 22px;
422
- width: 22px;
423
- top: 2px;
424
- left: 2px;
425
- border-radius: 60px;
426
- }
427
- .zuz-checkbox:checked + label:before {
428
- background: green;
429
- transition: width 0.2s cubic-bezier(0, 0, 0, 0.1);
430
- }
431
- .zuz-checkbox:checked + label:after {
432
- left: 20px;
433
- }
434
-
435
- .zuz-contextmenu {
436
- width: 220px;
437
- border-radius: 5px;
438
- padding: 4px;
439
- background: rgba(34, 34, 34, 0.5);
440
- border: 1px rgba(255, 255, 255, 0.25) solid;
441
- box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.45);
442
- backdrop-filter: blur(20px);
443
- }
444
- .zuz-contextmenu button {
445
- border: 0px;
446
- text-align: left;
447
- padding: 4px 6px;
448
- background: rgba(0, 0, 0, 0);
449
- cursor: pointer;
450
- color: #fff;
451
- border-radius: 4px;
452
- }
453
- .zuz-contextmenu button:hover {
454
- background: #5183ff;
455
- }
456
- .zuz-contextmenu .line {
457
- height: 1px;
458
- background: rgba(255, 255, 255, 0.25);
459
- margin: 4px 6px;
460
- }
1
+ button{user-select:none;cursor:pointer}input{user-select:none}input:-webkit-autofill{background-color:rgba(0,0,0,0) !important;-webkit-box-shadow:0 0 0px 1000px rgba(0,0,0,0) inset;box-shadow:0 0 0px 1000px rgba(0,0,0,0) inset}:root{--checkbox-checked: rgb(46, 161, 42);--checkbox-unchecked: rgb(203, 203, 203);--checkbox-thumb: #fff;--checkbox-thumb-shadow: #000;--checkbox-thumb-shadow-size: 2px}.flex{display:flex}.flex.cols{flex-direction:column}.flex.aic{align-items:center}.flex.jcc{justify-content:center}.abs{position:absolute}.fixed{position:fixed}.fill{top:0px;left:0px;bottom:0px;right:0px}.rel{position:relative}.input-with-error{box-shadow:inset 0px 0px 0px 1px #ff8b8b}.zuz-checkbox{height:25px;width:45px;cursor:pointer}.zuz-checkbox input[type=checkbox]{z-index:0;left:10px;top:10px;opacity:0}.zuz-checkbox:before{content:"";position:absolute;width:45px;height:25px;background:var(--checkbox-unchecked);border-radius:50px;z-index:1;transition:all .3s linear 0s}.zuz-checkbox:after{content:"";position:absolute;width:21px;height:21px;background:var(--checkbox-thumb);border-radius:50px;z-index:2;top:2px;left:2px;box-shadow:0px 0px --checkbox-thumb-shadow-size --checkbox-thumb-shadow;transition:all .2s linear 0s}.zuz-checkbox.is-checked:before{box-shadow:inset 0px 0px 0px 15px var(--checkbox-checked)}.zuz-checkbox.is-checked:after{transform:translateX(20px)}.zuz-spinner{animation:spin infinite}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.zuz-cover{backdrop-filter:blur(4px);z-index:99999;gap:15px}.zuz-cover .label{font-size:14px;animation:breath 1s linear infinite}@keyframes breath{0%{opacity:.5}50%{opacity:1}100%{opacity:.5}}.zuz-sheet{top:0px;left:50%;transform:translate(-50%, -10vh);z-index:2147483647;transition:all .5s cubic-bezier(0.68, -0.2, 0.27, 1.5) 0s}.zuz-sheet.toast-default{background:#333;color:#fff}.zuz-sheet.toast-error{background:#ff4747;color:#fff}.zuz-sheet.toast-success{background:#23ac28;color:#fff}.zuz-sheet.toast-warn{background:#ffba00}.zuz-sheet.is-visible{transform:translate(-50%, 0vh)}.zuz-sheet.is-visible.wobble{transform:translate(-50%, 10px);transition:all .5s cubic-bezier(0.68, -0.2, 0.27, 1.5) 0s}.zuz-sheet.zuz-toast{top:-20px;border-radius:0px 0px 5px 5px;padding:25px 15px 5px 15px;font-size:14px}
@@ -0,0 +1,19 @@
1
+ export declare enum SPINNER {
2
+ Simple = "SIMPLE",
3
+ Roller = "ROLLER"
4
+ }
5
+ export declare enum FORMVALIDATION_STYLE {
6
+ Dots = "DOTS"
7
+ }
8
+ export declare enum FORMVALIDATION {
9
+ Email = "EMAIL",
10
+ Uri = "URI",
11
+ Password = "PASSWORD",
12
+ MatchField = "MATCHFIELD"
13
+ }
14
+ export declare enum SHEET {
15
+ Default = "DEFAULT",
16
+ Error = "ERROR",
17
+ Success = "SUCCESS",
18
+ Warn = "WARN"
19
+ }
@@ -0,0 +1,23 @@
1
+ export var SPINNER;
2
+ (function (SPINNER) {
3
+ SPINNER["Simple"] = "SIMPLE";
4
+ SPINNER["Roller"] = "ROLLER";
5
+ })(SPINNER || (SPINNER = {}));
6
+ export var FORMVALIDATION_STYLE;
7
+ (function (FORMVALIDATION_STYLE) {
8
+ FORMVALIDATION_STYLE["Dots"] = "DOTS";
9
+ })(FORMVALIDATION_STYLE || (FORMVALIDATION_STYLE = {}));
10
+ export var FORMVALIDATION;
11
+ (function (FORMVALIDATION) {
12
+ FORMVALIDATION["Email"] = "EMAIL";
13
+ FORMVALIDATION["Uri"] = "URI";
14
+ FORMVALIDATION["Password"] = "PASSWORD";
15
+ FORMVALIDATION["MatchField"] = "MATCHFIELD";
16
+ })(FORMVALIDATION || (FORMVALIDATION = {}));
17
+ export var SHEET;
18
+ (function (SHEET) {
19
+ SHEET["Default"] = "DEFAULT";
20
+ SHEET["Error"] = "ERROR";
21
+ SHEET["Success"] = "SUCCESS";
22
+ SHEET["Warn"] = "WARN";
23
+ })(SHEET || (SHEET = {}));
@@ -0,0 +1,24 @@
1
+ export type dynamicObject = {
2
+ [x: string]: any;
3
+ };
4
+ export type stringObject = {
5
+ [x: string]: string;
6
+ };
7
+ declare global {
8
+ interface Object {
9
+ is(v: any): boolean;
10
+ typeof(v: any): boolean;
11
+ equals(v: any): boolean;
12
+ isNull(): boolean;
13
+ isString(): boolean;
14
+ isNumber(): boolean;
15
+ isObject(): boolean;
16
+ isArray(): boolean;
17
+ isEmpty(): boolean;
18
+ isNotEmpty(v: any): boolean;
19
+ isEmail(v: any): boolean;
20
+ isUrl(v: any): boolean;
21
+ }
22
+ }
23
+ export type FormSubmitHandler = (formData: FormData) => void;
24
+ export type FormInputs = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { DetailedHTMLProps, HTMLAttributes } from "react";
2
+ export interface UIProps<T extends HTMLElement> extends DetailedHTMLProps<HTMLAttributes<T>, T> {
3
+ [key: string]: any;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,46 +1,52 @@
1
1
  {
2
- "name": "@zuzjs/ui",
3
- "version": "0.3.7",
4
- "type": "module",
5
- "main": "dist/index.js",
6
- "exports": {
7
- ".": "./dist/ui.js",
8
- "./core": "./dist/index.js",
9
- "./hooks": "./dist/hooks.js",
10
- "./styles": "./dist/styles.css"
11
- },
12
- "scripts": {
13
- "build": "rimraf dist && rollup --config",
14
- "dev": "rimraf dist && rollup --config -w",
15
- "test": "jest"
16
- },
17
- "dependencies": {
18
- "@testing-library/react": "14.0.0",
19
- "@types/jest": "^29.5.0",
20
- "@types/react": "^18.0.31",
21
- "axios": "^1.6.2",
22
- "hashids": "^2.3.0",
23
- "jest": "^29.7.0",
24
- "js-cookie": "^3.0.5",
25
- "nanoid": "^5.0.4",
26
- "prop-types": "^15.8.1",
27
- "react": "18.2.0",
28
- "react-children-utilities": "^2.9.0",
29
- "react-dom": "18.2.0",
30
- "ts-jest": "^29.1.1",
31
- "tslib": "^2.6.2",
32
- "typescript": "^5.3.3"
33
- },
34
- "devDependencies": {
35
- "@rollup/plugin-commonjs": "^24.0.1",
36
- "postcss": "^8.4.21",
37
- "rimraf": "^5.0.5",
38
- "rollup": "^4.8.0",
39
- "rollup-plugin-livereload": "^2.0.5",
40
- "rollup-plugin-scss": "^4.0.0",
41
- "rollup-plugin-typescript2": "^0.36.0",
42
- "rollup-plugin-uglify": "^6.0.4",
43
- "sass": "^1.69.5",
44
- "next": "14.0.4"
45
- }
2
+ "name": "@zuzjs/ui",
3
+ "version": "0.3.9",
4
+ "keywords": [
5
+ "react",
6
+ "zuz",
7
+ "zuz.js",
8
+ "zuz ui",
9
+ "zuzui"
10
+ ],
11
+ "description": "ZuzJS UI Library",
12
+ "author": "Zuz.js Team <support@zuz.com.pk>",
13
+ "license": "MIT",
14
+ "type": "module",
15
+ "main": "dist/index.js",
16
+ "bin": {
17
+ "zuzjs": "dist/bin.js"
18
+ },
19
+ "exports": {
20
+ ".": "./dist/index.js",
21
+ "./styles": "./dist/styles.css",
22
+ "./funs": "./dist/funs/index.js"
23
+ },
24
+ "files": [
25
+ "dist"
26
+ ],
27
+ "scripts": {
28
+ "dev:css": "sass --watch --no-source-map src/scss:dist --style compressed",
29
+ "dev:dist": "tsc -d -w -p tsconfig.json",
30
+ "dev": "npm-run-all -p dev:*"
31
+ },
32
+ "engines": {
33
+ "node": ">=18.17.0"
34
+ },
35
+ "dependencies": {
36
+ "axios": "^1.7.6",
37
+ "chokidar": "^3.6.0",
38
+ "commander": "^12.1.0",
39
+ "hashids": "^2.3.0",
40
+ "md5": "^2.3.0",
41
+ "nanoid": "^5.0.7",
42
+ "picocolors": "^1.0.1",
43
+ "react": "19.0.0-beta-26f2496093-20240514",
44
+ "react-dom": "19.0.0-beta-26f2496093-20240514",
45
+ "sass": "1.77.8"
46
+ },
47
+ "devDependencies": {
48
+ "node-loader": "^2.0.0",
49
+ "react": "19.0.0-beta-26f2496093-20240514",
50
+ "react-dom": "19.0.0-beta-26f2496093-20240514"
51
+ }
46
52
  }
package/README.md DELETED
@@ -1 +0,0 @@
1
- # zuzjs