panelui-native 0.1.0 → 0.2.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 (59) hide show
  1. package/lib/module/components/alert/index.js +8 -18
  2. package/lib/module/components/alert/index.js.map +1 -1
  3. package/lib/module/components/avatar/index.js +1 -1
  4. package/lib/module/components/avatar/index.js.map +1 -1
  5. package/lib/module/components/bottom-sheet/index.js +35 -31
  6. package/lib/module/components/bottom-sheet/index.js.map +1 -1
  7. package/lib/module/components/card/index.js +5 -5
  8. package/lib/module/components/card/index.js.map +1 -1
  9. package/lib/module/components/checkbox/index.js +1 -1
  10. package/lib/module/components/checkbox/index.js.map +1 -1
  11. package/lib/module/components/dialog/index.js +21 -17
  12. package/lib/module/components/dialog/index.js.map +1 -1
  13. package/lib/module/components/frame/index.js +100 -0
  14. package/lib/module/components/frame/index.js.map +1 -0
  15. package/lib/module/components/inline-select/index.js +159 -0
  16. package/lib/module/components/inline-select/index.js.map +1 -0
  17. package/lib/module/components/input/index.js +1 -1
  18. package/lib/module/components/input/index.js.map +1 -1
  19. package/lib/module/components/select/index.js +35 -28
  20. package/lib/module/components/select/index.js.map +1 -1
  21. package/lib/module/components/skeleton/index.js +1 -1
  22. package/lib/module/components/skeleton/index.js.map +1 -1
  23. package/lib/module/components/spinner/index.js +1 -1
  24. package/lib/module/components/spinner/index.js.map +1 -1
  25. package/lib/module/index.js +2 -0
  26. package/lib/module/index.js.map +1 -1
  27. package/lib/module/providers/panel-ui-provider.js +19 -8
  28. package/lib/module/providers/panel-ui-provider.js.map +1 -1
  29. package/lib/typescript/src/components/alert/index.d.ts +0 -30
  30. package/lib/typescript/src/components/alert/index.d.ts.map +1 -1
  31. package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
  32. package/lib/typescript/src/components/dialog/index.d.ts.map +1 -1
  33. package/lib/typescript/src/components/frame/index.d.ts +21 -0
  34. package/lib/typescript/src/components/frame/index.d.ts.map +1 -0
  35. package/lib/typescript/src/components/inline-select/index.d.ts +25 -0
  36. package/lib/typescript/src/components/inline-select/index.d.ts.map +1 -0
  37. package/lib/typescript/src/components/select/index.d.ts.map +1 -1
  38. package/lib/typescript/src/components/spinner/index.d.ts +2 -2
  39. package/lib/typescript/src/components/spinner/index.d.ts.map +1 -1
  40. package/lib/typescript/src/index.d.ts +2 -0
  41. package/lib/typescript/src/index.d.ts.map +1 -1
  42. package/lib/typescript/src/providers/panel-ui-provider.d.ts +20 -5
  43. package/lib/typescript/src/providers/panel-ui-provider.d.ts.map +1 -1
  44. package/package.json +7 -2
  45. package/src/components/alert/index.tsx +8 -18
  46. package/src/components/avatar/index.tsx +1 -1
  47. package/src/components/bottom-sheet/index.tsx +8 -3
  48. package/src/components/card/index.tsx +5 -5
  49. package/src/components/checkbox/index.tsx +1 -1
  50. package/src/components/dialog/index.tsx +10 -5
  51. package/src/components/frame/index.tsx +104 -0
  52. package/src/components/inline-select/index.tsx +185 -0
  53. package/src/components/input/index.tsx +1 -1
  54. package/src/components/select/index.tsx +30 -23
  55. package/src/components/skeleton/index.tsx +1 -1
  56. package/src/components/spinner/index.tsx +1 -1
  57. package/src/index.ts +6 -0
  58. package/src/providers/panel-ui-provider.tsx +32 -10
  59. package/theme.css +122 -107
package/theme.css CHANGED
@@ -1,143 +1,158 @@
1
1
  /*
2
2
  * PanelUI theme — Coss UI design tokens, translated for React Native.
3
3
  * Source of truth: cosscom/coss packages/ui/src/styles/globals.css
4
- * (color-mix()/--alpha() expressions are precomputed to static values,
5
- * since they must resolve at runtime on native.)
4
+ * (color-mix()/--alpha() expressions precomputed to static values.)
5
+ *
6
+ * Structured the way Uniwind expects themed tokens (see uniwind's own
7
+ * test.css / expo-example): utility names declared in @theme, per-theme
8
+ * values defined with @variant blocks inside :root.
6
9
  *
7
10
  * Usage (in your app's global.css):
8
11
  * @import 'tailwindcss';
9
12
  * @import 'uniwind';
10
13
  * @import 'panelui-native/theme.css';
11
- * @source '../node_modules/panelui-native/src';
14
+ * @source './node_modules/panelui-native/src';
12
15
  */
13
16
 
14
- :root {
15
- /* --background: white */
16
- --background: #ffffff;
17
- /* --foreground: neutral-800 */
18
- --foreground: #262626;
17
+ @theme {
18
+ --color-background: unset;
19
+ --color-foreground: unset;
20
+ --color-card: unset;
21
+ --color-card-foreground: unset;
22
+ --color-popover: unset;
23
+ --color-popover-foreground: unset;
24
+ --color-primary: unset;
25
+ --color-primary-foreground: unset;
26
+ --color-secondary: unset;
27
+ --color-secondary-foreground: unset;
28
+ --color-muted: unset;
29
+ --color-muted-foreground: unset;
30
+ --color-accent: unset;
31
+ --color-accent-foreground: unset;
32
+ --color-destructive: unset;
33
+ --color-destructive-foreground: unset;
34
+ --color-info: unset;
35
+ --color-info-foreground: unset;
36
+ --color-success: unset;
37
+ --color-success-foreground: unset;
38
+ --color-warning: unset;
39
+ --color-warning-foreground: unset;
40
+ --color-border: unset;
41
+ --color-input: unset;
42
+ --color-ring: unset;
43
+ --color-surface: unset;
44
+ --color-skeleton: unset;
19
45
 
20
- --card: #ffffff;
21
- --card-foreground: #262626;
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;
53
+ }
22
54
 
23
- --popover: #ffffff;
24
- --popover-foreground: #262626;
55
+ @layer theme {
56
+ :root {
57
+ @variant light {
58
+ --color-background: #ffffff;
59
+ /* neutral-800 */
60
+ --color-foreground: #262626;
25
61
 
26
- /* --primary: neutral-800 / neutral-50 */
27
- --primary: #262626;
28
- --primary-foreground: #fafafa;
62
+ --color-card: #ffffff;
63
+ --color-card-foreground: #262626;
29
64
 
30
- /* --secondary/muted/accent: black at 4% */
31
- --secondary: rgba(0, 0, 0, 0.04);
32
- --secondary-foreground: #262626;
65
+ --color-popover: #ffffff;
66
+ --color-popover-foreground: #262626;
33
67
 
34
- --muted: rgba(0, 0, 0, 0.04);
35
- /* color-mix(neutral-500 90%, black) */
36
- --muted-foreground: #686868;
68
+ --color-primary: #262626;
69
+ --color-primary-foreground: #fafafa;
37
70
 
38
- --accent: rgba(0, 0, 0, 0.04);
39
- --accent-foreground: #262626;
71
+ /* secondary/muted/accent: black at 4% */
72
+ --color-secondary: rgba(0, 0, 0, 0.06);
73
+ --color-secondary-foreground: #262626;
40
74
 
41
- /* status: {hue}-500 with {hue}-700 foreground (for text on tints) */
42
- --destructive: #ef4444;
43
- --destructive-foreground: #b91c1c;
75
+ --color-muted: rgba(0, 0, 0, 0.06);
76
+ /* color-mix(neutral-500 90%, black) */
77
+ --color-muted-foreground: #686868;
44
78
 
45
- --info: #3b82f6;
46
- --info-foreground: #1d4ed8;
79
+ --color-accent: rgba(0, 0, 0, 0.06);
80
+ --color-accent-foreground: #262626;
47
81
 
48
- --success: #10b981;
49
- --success-foreground: #047857;
82
+ /* status: {hue}-500, foreground {hue}-700 */
83
+ --color-destructive: #ef4444;
84
+ --color-destructive-foreground: #b91c1c;
50
85
 
51
- --warning: #f59e0b;
52
- --warning-foreground: #b45309;
86
+ --color-info: #3b82f6;
87
+ --color-info-foreground: #1d4ed8;
53
88
 
54
- /* --border: black 8%, --input: black 10% */
55
- --border: rgba(0, 0, 0, 0.08);
56
- --input: rgba(0, 0, 0, 0.1);
57
- /* --ring: neutral-400 */
58
- --ring: #a3a3a3;
59
- }
89
+ --color-success: #10b981;
90
+ --color-success-foreground: #047857;
60
91
 
61
- .dark {
62
- /* color-mix(neutral-950 96%, white) */
63
- --background: #141414;
64
- /* neutral-100 */
65
- --foreground: #f5f5f5;
92
+ --color-warning: #f59e0b;
93
+ --color-warning-foreground: #b45309;
66
94
 
67
- /* color-mix(background 98%, white) */
68
- --card: #191919;
69
- --card-foreground: #f5f5f5;
95
+ /* border: black 8%, input: black 10% */
96
+ --color-border: rgba(0, 0, 0, 0.08);
97
+ --color-input: rgba(0, 0, 0, 0.1);
98
+ /* neutral-400 */
99
+ --color-ring: #a3a3a3;
70
100
 
71
- /* color-mix(background 96%, white) */
72
- --popover: #1d1d1d;
73
- --popover-foreground: #f5f5f5;
101
+ /* grouping surface (Frame) and skeleton fill */
102
+ --color-surface: #f7f7f7;
103
+ --color-skeleton: rgba(0, 0, 0, 0.1);
104
+ }
74
105
 
75
- --primary: #f5f5f5;
76
- --primary-foreground: #262626;
106
+ @variant dark {
107
+ /* color-mix(neutral-950 96%, white) */
108
+ --color-background: #141414;
109
+ /* neutral-100 */
110
+ --color-foreground: #f5f5f5;
77
111
 
78
- /* --secondary/muted/accent: white at 4% */
79
- --secondary: rgba(255, 255, 255, 0.04);
80
- --secondary-foreground: #f5f5f5;
112
+ /* color-mix(background 98%, white) */
113
+ --color-card: #191919;
114
+ --color-card-foreground: #f5f5f5;
81
115
 
82
- --muted: rgba(255, 255, 255, 0.04);
83
- /* color-mix(neutral-500 90%, white) */
84
- --muted-foreground: #818181;
116
+ /* color-mix(background 96%, white) */
117
+ --color-popover: #1d1d1d;
118
+ --color-popover-foreground: #f5f5f5;
85
119
 
86
- --accent: rgba(255, 255, 255, 0.04);
87
- --accent-foreground: #f5f5f5;
120
+ --color-primary: #f5f5f5;
121
+ --color-primary-foreground: #262626;
88
122
 
89
- /* destructive: color-mix(red-500 90%, white); foreground: {hue}-400 */
90
- --destructive: #f15757;
91
- --destructive-foreground: #f87171;
123
+ /* secondary/muted/accent: white at 4% */
124
+ --color-secondary: rgba(255, 255, 255, 0.08);
125
+ --color-secondary-foreground: #f5f5f5;
92
126
 
93
- --info: #3b82f6;
94
- --info-foreground: #60a5fa;
127
+ --color-muted: rgba(255, 255, 255, 0.08);
128
+ /* color-mix(neutral-500 90%, white) */
129
+ --color-muted-foreground: #818181;
95
130
 
96
- --success: #10b981;
97
- --success-foreground: #34d399;
131
+ --color-accent: rgba(255, 255, 255, 0.08);
132
+ --color-accent-foreground: #f5f5f5;
98
133
 
99
- --warning: #f59e0b;
100
- --warning-foreground: #fbbf24;
134
+ /* color-mix(red-500 90%, white), foreground {hue}-400 */
135
+ --color-destructive: #f15757;
136
+ --color-destructive-foreground: #f87171;
101
137
 
102
- /* --border: white 6%, --input: white 8% */
103
- --border: rgba(255, 255, 255, 0.06);
104
- --input: rgba(255, 255, 255, 0.08);
105
- /* --ring: neutral-500 */
106
- --ring: #737373;
107
- }
138
+ --color-info: #3b82f6;
139
+ --color-info-foreground: #60a5fa;
108
140
 
109
- @theme inline {
110
- --color-background: var(--background);
111
- --color-foreground: var(--foreground);
112
- --color-card: var(--card);
113
- --color-card-foreground: var(--card-foreground);
114
- --color-popover: var(--popover);
115
- --color-popover-foreground: var(--popover-foreground);
116
- --color-primary: var(--primary);
117
- --color-primary-foreground: var(--primary-foreground);
118
- --color-secondary: var(--secondary);
119
- --color-secondary-foreground: var(--secondary-foreground);
120
- --color-muted: var(--muted);
121
- --color-muted-foreground: var(--muted-foreground);
122
- --color-accent: var(--accent);
123
- --color-accent-foreground: var(--accent-foreground);
124
- --color-destructive: var(--destructive);
125
- --color-destructive-foreground: var(--destructive-foreground);
126
- --color-info: var(--info);
127
- --color-info-foreground: var(--info-foreground);
128
- --color-success: var(--success);
129
- --color-success-foreground: var(--success-foreground);
130
- --color-warning: var(--warning);
131
- --color-warning-foreground: var(--warning-foreground);
132
- --color-border: var(--border);
133
- --color-input: var(--input);
134
- --color-ring: var(--ring);
141
+ --color-success: #10b981;
142
+ --color-success-foreground: #34d399;
135
143
 
136
- /* Coss radius scale: --radius: 0.625rem (10px) */
137
- --radius-xs: 4px;
138
- --radius-sm: 6px;
139
- --radius-md: 8px;
140
- --radius-lg: 10px;
141
- --radius-xl: 14px;
142
- --radius-2xl: 20px;
144
+ --color-warning: #f59e0b;
145
+ --color-warning-foreground: #fbbf24;
146
+
147
+ /* border: white 6%, input: white 8% */
148
+ --color-border: rgba(255, 255, 255, 0.06);
149
+ --color-input: rgba(255, 255, 255, 0.08);
150
+ /* neutral-500 */
151
+ --color-ring: #737373;
152
+
153
+ /* grouping surface (Frame) and skeleton fill */
154
+ --color-surface: #1c1c1c;
155
+ --color-skeleton: rgba(255, 255, 255, 0.13);
156
+ }
157
+ }
143
158
  }