panelui-native 0.2.0 → 0.4.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 (84) hide show
  1. package/README.md +251 -0
  2. package/lib/module/components/alert/index.js +106 -13
  3. package/lib/module/components/alert/index.js.map +1 -1
  4. package/lib/module/components/badge/index.js +3 -3
  5. package/lib/module/components/badge/index.js.map +1 -1
  6. package/lib/module/components/button/index.js +44 -15
  7. package/lib/module/components/button/index.js.map +1 -1
  8. package/lib/module/components/checkbox/index.js +20 -7
  9. package/lib/module/components/checkbox/index.js.map +1 -1
  10. package/lib/module/components/empty-state/index.js +178 -0
  11. package/lib/module/components/empty-state/index.js.map +1 -0
  12. package/lib/module/components/input-group/index.js +132 -0
  13. package/lib/module/components/input-group/index.js.map +1 -0
  14. package/lib/module/components/label/index.js +117 -0
  15. package/lib/module/components/label/index.js.map +1 -0
  16. package/lib/module/components/progress/index.js +138 -0
  17. package/lib/module/components/progress/index.js.map +1 -0
  18. package/lib/module/components/steps/index.js +354 -0
  19. package/lib/module/components/steps/index.js.map +1 -0
  20. package/lib/module/components/tabs/index.js +9 -3
  21. package/lib/module/components/tabs/index.js.map +1 -1
  22. package/lib/module/components/toast/index.js +479 -0
  23. package/lib/module/components/toast/index.js.map +1 -0
  24. package/lib/module/components/toast/toast-store.js +81 -0
  25. package/lib/module/components/toast/toast-store.js.map +1 -0
  26. package/lib/module/components/typography/index.js +126 -0
  27. package/lib/module/components/typography/index.js.map +1 -0
  28. package/lib/module/icons/index.js +223 -2
  29. package/lib/module/icons/index.js.map +1 -1
  30. package/lib/module/index.js +9 -2
  31. package/lib/module/index.js.map +1 -1
  32. package/lib/module/providers/panel-ui-provider.js +2 -1
  33. package/lib/module/providers/panel-ui-provider.js.map +1 -1
  34. package/lib/module/theme/use-theme.js +90 -3
  35. package/lib/module/theme/use-theme.js.map +1 -1
  36. package/lib/typescript/src/components/alert/index.d.ts +56 -4
  37. package/lib/typescript/src/components/alert/index.d.ts.map +1 -1
  38. package/lib/typescript/src/components/button/index.d.ts +39 -0
  39. package/lib/typescript/src/components/button/index.d.ts.map +1 -1
  40. package/lib/typescript/src/components/checkbox/index.d.ts +8 -0
  41. package/lib/typescript/src/components/checkbox/index.d.ts.map +1 -1
  42. package/lib/typescript/src/components/empty-state/index.d.ts +73 -0
  43. package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -0
  44. package/lib/typescript/src/components/input-group/index.d.ts +34 -0
  45. package/lib/typescript/src/components/input-group/index.d.ts.map +1 -0
  46. package/lib/typescript/src/components/label/index.d.ts +28 -0
  47. package/lib/typescript/src/components/label/index.d.ts.map +1 -0
  48. package/lib/typescript/src/components/progress/index.d.ts +132 -0
  49. package/lib/typescript/src/components/progress/index.d.ts.map +1 -0
  50. package/lib/typescript/src/components/steps/index.d.ts +62 -0
  51. package/lib/typescript/src/components/steps/index.d.ts.map +1 -0
  52. package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
  53. package/lib/typescript/src/components/toast/index.d.ts +176 -0
  54. package/lib/typescript/src/components/toast/index.d.ts.map +1 -0
  55. package/lib/typescript/src/components/toast/toast-store.d.ts +65 -0
  56. package/lib/typescript/src/components/toast/toast-store.d.ts.map +1 -0
  57. package/lib/typescript/src/components/typography/index.d.ts +77 -0
  58. package/lib/typescript/src/components/typography/index.d.ts.map +1 -0
  59. package/lib/typescript/src/icons/index.d.ts +25 -0
  60. package/lib/typescript/src/icons/index.d.ts.map +1 -1
  61. package/lib/typescript/src/index.d.ts +10 -3
  62. package/lib/typescript/src/index.d.ts.map +1 -1
  63. package/lib/typescript/src/providers/panel-ui-provider.d.ts.map +1 -1
  64. package/lib/typescript/src/theme/use-theme.d.ts +64 -4
  65. package/lib/typescript/src/theme/use-theme.d.ts.map +1 -1
  66. package/package.json +22 -4
  67. package/src/components/alert/index.tsx +102 -16
  68. package/src/components/badge/index.tsx +3 -3
  69. package/src/components/button/index.tsx +47 -7
  70. package/src/components/checkbox/index.tsx +17 -3
  71. package/src/components/empty-state/index.tsx +136 -0
  72. package/src/components/input-group/index.tsx +164 -0
  73. package/src/components/label/index.tsx +128 -0
  74. package/src/components/progress/index.tsx +147 -0
  75. package/src/components/steps/index.tsx +343 -0
  76. package/src/components/tabs/index.tsx +10 -2
  77. package/src/components/toast/index.tsx +447 -0
  78. package/src/components/toast/toast-store.ts +120 -0
  79. package/src/components/typography/index.tsx +121 -0
  80. package/src/icons/index.tsx +152 -1
  81. package/src/index.ts +76 -3
  82. package/src/providers/panel-ui-provider.tsx +3 -0
  83. package/src/theme/use-theme.ts +119 -4
  84. package/theme.css +330 -7
package/theme.css CHANGED
@@ -43,13 +43,35 @@
43
43
  --color-surface: unset;
44
44
  --color-skeleton: unset;
45
45
 
46
- /* Coss radius scale: --radius: 0.625rem (10px) */
47
- --radius-xs: 4px;
48
- --radius-sm: 6px;
49
- --radius-md: 8px;
50
- --radius-lg: 10px;
51
- --radius-xl: 14px;
52
- --radius-2xl: 16px;
46
+ /*
47
+ * Tinted status fills. These exist as real tokens rather than `bg-info/10
48
+ * dark:bg-info/[0.06]` because `dark:` only resolves in the light/dark
49
+ * themes — inside a named theme (moon, grass) Uniwind compiles it to a
50
+ * plain class selector that never matches, so the tint would vanish.
51
+ * `-soft` is the Alert fill, `-subtle` the lighter Badge fill.
52
+ */
53
+ --color-info-soft: unset;
54
+ --color-info-subtle: unset;
55
+ --color-success-soft: unset;
56
+ --color-success-subtle: unset;
57
+ --color-warning-soft: unset;
58
+ --color-warning-subtle: unset;
59
+ --color-destructive-soft: unset;
60
+ --color-destructive-subtle: unset;
61
+
62
+ /*
63
+ * Radius scale. Themed rather than static: a theme is a shape as well as a
64
+ * palette, so each family sets its own corner rounding. --radius-3xl is
65
+ * declared here because rounded-3xl / rounded-t-3xl are both in use and
66
+ * would otherwise silently fall through to Tailwind's default.
67
+ */
68
+ --radius-xs: unset;
69
+ --radius-sm: unset;
70
+ --radius-md: unset;
71
+ --radius-lg: unset;
72
+ --radius-xl: unset;
73
+ --radius-2xl: unset;
74
+ --radius-3xl: unset;
53
75
  }
54
76
 
55
77
  @layer theme {
@@ -101,6 +123,25 @@
101
123
  /* grouping surface (Frame) and skeleton fill */
102
124
  --color-surface: #f7f7f7;
103
125
  --color-skeleton: rgba(0, 0, 0, 0.1);
126
+
127
+ /* status fills: -soft = Alert (10%), -subtle = Badge (8%) */
128
+ --color-info-soft: rgba(59, 130, 246, 0.1);
129
+ --color-info-subtle: rgba(59, 130, 246, 0.08);
130
+ --color-success-soft: rgba(16, 185, 129, 0.1);
131
+ --color-success-subtle: rgba(16, 185, 129, 0.08);
132
+ --color-warning-soft: rgba(245, 158, 11, 0.1);
133
+ --color-warning-subtle: rgba(245, 158, 11, 0.08);
134
+ --color-destructive-soft: rgba(239, 68, 68, 0.1);
135
+ --color-destructive-subtle: rgba(239, 68, 68, 0.08);
136
+
137
+ /* Panel shape scale */
138
+ --radius-xs: 4px;
139
+ --radius-sm: 6px;
140
+ --radius-md: 8px;
141
+ --radius-lg: 10px;
142
+ --radius-xl: 14px;
143
+ --radius-2xl: 16px;
144
+ --radius-3xl: 24px;
104
145
  }
105
146
 
106
147
  @variant dark {
@@ -153,6 +194,288 @@
153
194
  /* grouping surface (Frame) and skeleton fill */
154
195
  --color-surface: #1c1c1c;
155
196
  --color-skeleton: rgba(255, 255, 255, 0.13);
197
+
198
+ /* status fills: -soft = Alert (6%), -subtle = Badge (16%) */
199
+ --color-info-soft: rgba(59, 130, 246, 0.06);
200
+ --color-info-subtle: rgba(59, 130, 246, 0.16);
201
+ --color-success-soft: rgba(16, 185, 129, 0.06);
202
+ --color-success-subtle: rgba(16, 185, 129, 0.16);
203
+ --color-warning-soft: rgba(245, 158, 11, 0.06);
204
+ --color-warning-subtle: rgba(245, 158, 11, 0.16);
205
+ --color-destructive-soft: rgba(241, 87, 87, 0.06);
206
+ --color-destructive-subtle: rgba(241, 87, 87, 0.16);
207
+
208
+ /* Panel shape scale */
209
+ --radius-xs: 4px;
210
+ --radius-sm: 6px;
211
+ --radius-md: 8px;
212
+ --radius-lg: 10px;
213
+ --radius-xl: 14px;
214
+ --radius-2xl: 16px;
215
+ --radius-3xl: 24px;
216
+ }
217
+
218
+ /*
219
+ * Named themes.
220
+ *
221
+ * Uniwind only gives `light` and `dark` prefers-color-scheme handling;
222
+ * every other theme compiles to a plain class selector. That means a
223
+ * named theme cannot adapt on its own, so each brand ships as a
224
+ * light/dark pair and the app switches between them explicitly (see
225
+ * `useThemeMode()`).
226
+ *
227
+ * Register them in your metro config or setTheme() will throw:
228
+ * withUniwindConfig(config, {
229
+ * extraThemes: ['moon', 'moon-dark', 'grass', 'grass-dark'],
230
+ * })
231
+ *
232
+ * Every theme must define every token — Uniwind fails the build with
233
+ * "All themes must have the same variables" otherwise.
234
+ */
235
+
236
+ /* Moon — monochrome and high-contrast: pure black/white, electric blue accent,
237
+ hairline borders, tight corners. */
238
+ @variant moon {
239
+ --color-background: #ffffff;
240
+ --color-foreground: #171717;
241
+
242
+ --color-card: #ffffff;
243
+ --color-card-foreground: #171717;
244
+
245
+ --color-popover: #ffffff;
246
+ --color-popover-foreground: #171717;
247
+
248
+ --color-primary: #171717;
249
+ --color-primary-foreground: #ffffff;
250
+
251
+ --color-secondary: rgba(0, 0, 0, 0.05);
252
+ --color-secondary-foreground: #171717;
253
+
254
+ --color-muted: rgba(0, 0, 0, 0.05);
255
+ --color-muted-foreground: #666666;
256
+
257
+ --color-accent: rgba(0, 0, 0, 0.05);
258
+ --color-accent-foreground: #171717;
259
+
260
+ --color-destructive: #e5484d;
261
+ --color-destructive-foreground: #c62b30;
262
+
263
+ --color-info: #0070f3;
264
+ --color-info-foreground: #0060d1;
265
+
266
+ --color-success: #45a557;
267
+ --color-success-foreground: #297c3b;
268
+
269
+ --color-warning: #f5a623;
270
+ --color-warning-foreground: #a35200;
271
+
272
+ --color-border: rgba(0, 0, 0, 0.09);
273
+ --color-input: rgba(0, 0, 0, 0.12);
274
+ --color-ring: #171717;
275
+
276
+ --color-surface: #fafafa;
277
+ --color-skeleton: rgba(0, 0, 0, 0.08);
278
+
279
+ --color-info-soft: rgba(0, 112, 243, 0.08);
280
+ --color-info-subtle: rgba(0, 112, 243, 0.06);
281
+ --color-success-soft: rgba(69, 165, 87, 0.1);
282
+ --color-success-subtle: rgba(69, 165, 87, 0.08);
283
+ --color-warning-soft: rgba(245, 166, 35, 0.1);
284
+ --color-warning-subtle: rgba(245, 166, 35, 0.08);
285
+ --color-destructive-soft: rgba(229, 72, 77, 0.1);
286
+ --color-destructive-subtle: rgba(229, 72, 77, 0.08);
287
+
288
+ /* Moon shape scale */
289
+ --radius-xs: 2px;
290
+ --radius-sm: 4px;
291
+ --radius-md: 5px;
292
+ --radius-lg: 6px;
293
+ --radius-xl: 8px;
294
+ --radius-2xl: 10px;
295
+ --radius-3xl: 14px;
296
+ }
297
+
298
+ @variant moon-dark {
299
+ --color-background: #000000;
300
+ --color-foreground: #ededed;
301
+
302
+ --color-card: #0a0a0a;
303
+ --color-card-foreground: #ededed;
304
+
305
+ --color-popover: #101010;
306
+ --color-popover-foreground: #ededed;
307
+
308
+ --color-primary: #ededed;
309
+ --color-primary-foreground: #0a0a0a;
310
+
311
+ --color-secondary: rgba(255, 255, 255, 0.09);
312
+ --color-secondary-foreground: #ededed;
313
+
314
+ --color-muted: rgba(255, 255, 255, 0.09);
315
+ --color-muted-foreground: #a1a1a1;
316
+
317
+ --color-accent: rgba(255, 255, 255, 0.09);
318
+ --color-accent-foreground: #ededed;
319
+
320
+ --color-destructive: #e5484d;
321
+ --color-destructive-foreground: #ff6369;
322
+
323
+ --color-info: #0070f3;
324
+ --color-info-foreground: #52a8ff;
325
+
326
+ --color-success: #45a557;
327
+ --color-success-foreground: #62c073;
328
+
329
+ --color-warning: #f5a623;
330
+ --color-warning-foreground: #f1a10d;
331
+
332
+ --color-border: rgba(255, 255, 255, 0.09);
333
+ --color-input: rgba(255, 255, 255, 0.14);
334
+ --color-ring: #ededed;
335
+
336
+ --color-surface: #0f0f0f;
337
+ --color-skeleton: rgba(255, 255, 255, 0.11);
338
+
339
+ --color-info-soft: rgba(0, 112, 243, 0.12);
340
+ --color-info-subtle: rgba(0, 112, 243, 0.18);
341
+ --color-success-soft: rgba(69, 165, 87, 0.1);
342
+ --color-success-subtle: rgba(69, 165, 87, 0.16);
343
+ --color-warning-soft: rgba(245, 166, 35, 0.1);
344
+ --color-warning-subtle: rgba(245, 166, 35, 0.16);
345
+ --color-destructive-soft: rgba(229, 72, 77, 0.1);
346
+ --color-destructive-subtle: rgba(229, 72, 77, 0.16);
347
+
348
+ /* Moon shape scale */
349
+ --radius-xs: 2px;
350
+ --radius-sm: 4px;
351
+ --radius-md: 5px;
352
+ --radius-lg: 6px;
353
+ --radius-xl: 8px;
354
+ --radius-2xl: 10px;
355
+ --radius-3xl: 14px;
356
+ }
357
+
358
+ /* Grass — green accent on warm-neutral greys, with soft generous corners. */
359
+ @variant grass {
360
+ --color-background: #ffffff;
361
+ --color-foreground: #171717;
362
+
363
+ --color-card: #ffffff;
364
+ --color-card-foreground: #171717;
365
+
366
+ --color-popover: #ffffff;
367
+ --color-popover-foreground: #171717;
368
+
369
+ /* Brand green is too light for white text; light mode uses the
370
+ darker ramp step so the contrast ratio holds. */
371
+ --color-primary: #24b47e;
372
+ --color-primary-foreground: #ffffff;
373
+
374
+ --color-secondary: rgba(0, 0, 0, 0.05);
375
+ --color-secondary-foreground: #171717;
376
+
377
+ --color-muted: rgba(0, 0, 0, 0.05);
378
+ --color-muted-foreground: #707070;
379
+
380
+ --color-accent: rgba(62, 207, 142, 0.1);
381
+ --color-accent-foreground: #16794c;
382
+
383
+ --color-destructive: #ef4444;
384
+ --color-destructive-foreground: #b91c1c;
385
+
386
+ --color-info: #3b82f6;
387
+ --color-info-foreground: #1d4ed8;
388
+
389
+ --color-success: #24b47e;
390
+ --color-success-foreground: #16794c;
391
+
392
+ --color-warning: #f59e0b;
393
+ --color-warning-foreground: #b45309;
394
+
395
+ --color-border: rgba(0, 0, 0, 0.08);
396
+ --color-input: rgba(0, 0, 0, 0.1);
397
+ --color-ring: #3ecf8e;
398
+
399
+ --color-surface: #f8f9fa;
400
+ --color-skeleton: rgba(0, 0, 0, 0.08);
401
+
402
+ --color-info-soft: rgba(59, 130, 246, 0.1);
403
+ --color-info-subtle: rgba(59, 130, 246, 0.08);
404
+ --color-success-soft: rgba(36, 180, 126, 0.1);
405
+ --color-success-subtle: rgba(36, 180, 126, 0.08);
406
+ --color-warning-soft: rgba(245, 158, 11, 0.1);
407
+ --color-warning-subtle: rgba(245, 158, 11, 0.08);
408
+ --color-destructive-soft: rgba(239, 68, 68, 0.1);
409
+ --color-destructive-subtle: rgba(239, 68, 68, 0.08);
410
+
411
+ /* Grass shape scale */
412
+ --radius-xs: 6px;
413
+ --radius-sm: 8px;
414
+ --radius-md: 12px;
415
+ --radius-lg: 14px;
416
+ --radius-xl: 18px;
417
+ --radius-2xl: 22px;
418
+ --radius-3xl: 28px;
419
+ }
420
+
421
+ @variant grass-dark {
422
+ --color-background: #1c1c1c;
423
+ --color-foreground: #ededed;
424
+
425
+ --color-card: #1f1f1f;
426
+ --color-card-foreground: #ededed;
427
+
428
+ --color-popover: #232323;
429
+ --color-popover-foreground: #ededed;
430
+
431
+ --color-primary: #3ecf8e;
432
+ --color-primary-foreground: #052e1b;
433
+
434
+ --color-secondary: rgba(255, 255, 255, 0.07);
435
+ --color-secondary-foreground: #ededed;
436
+
437
+ --color-muted: rgba(255, 255, 255, 0.07);
438
+ --color-muted-foreground: #8f8f8f;
439
+
440
+ --color-accent: rgba(62, 207, 142, 0.12);
441
+ --color-accent-foreground: #3ecf8e;
442
+
443
+ --color-destructive: #f15757;
444
+ --color-destructive-foreground: #f87171;
445
+
446
+ --color-info: #3b82f6;
447
+ --color-info-foreground: #60a5fa;
448
+
449
+ --color-success: #3ecf8e;
450
+ --color-success-foreground: #4ade80;
451
+
452
+ --color-warning: #f59e0b;
453
+ --color-warning-foreground: #fbbf24;
454
+
455
+ --color-border: rgba(255, 255, 255, 0.07);
456
+ --color-input: rgba(255, 255, 255, 0.1);
457
+ --color-ring: #3ecf8e;
458
+
459
+ --color-surface: #242424;
460
+ --color-skeleton: rgba(255, 255, 255, 0.11);
461
+
462
+ --color-info-soft: rgba(59, 130, 246, 0.08);
463
+ --color-info-subtle: rgba(59, 130, 246, 0.16);
464
+ --color-success-soft: rgba(62, 207, 142, 0.08);
465
+ --color-success-subtle: rgba(62, 207, 142, 0.16);
466
+ --color-warning-soft: rgba(245, 158, 11, 0.08);
467
+ --color-warning-subtle: rgba(245, 158, 11, 0.16);
468
+ --color-destructive-soft: rgba(241, 87, 87, 0.08);
469
+ --color-destructive-subtle: rgba(241, 87, 87, 0.16);
470
+
471
+ /* Grass shape scale */
472
+ --radius-xs: 6px;
473
+ --radius-sm: 8px;
474
+ --radius-md: 12px;
475
+ --radius-lg: 14px;
476
+ --radius-xl: 18px;
477
+ --radius-2xl: 22px;
478
+ --radius-3xl: 28px;
156
479
  }
157
480
  }
158
481
  }