@revealui/presentation 0.3.0 → 0.3.3
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/README.md +14 -0
- package/dist/Text-mMOCv1lF.js +204 -0
- package/dist/Text-mMOCv1lF.js.map +1 -0
- package/dist/client.d.ts +3 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +92 -266
- package/dist/client.js.map +1 -1
- package/dist/components/BuiltWithRevealUI.d.ts +6 -3
- package/dist/components/BuiltWithRevealUI.d.ts.map +1 -1
- package/dist/components/Button.d.ts +6 -3
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/Card.d.ts.map +1 -1
- package/dist/components/Input.d.ts.map +1 -1
- package/dist/components/accordion.d.ts.map +1 -1
- package/dist/components/alert.d.ts.map +1 -1
- package/dist/components/avatar.d.ts.map +1 -1
- package/dist/components/badge.d.ts.map +1 -1
- package/dist/components/breadcrumb.d.ts.map +1 -1
- package/dist/components/button-headless.d.ts.map +1 -1
- package/dist/components/callout.d.ts.map +1 -1
- package/dist/components/checkbox-headless.d.ts.map +1 -1
- package/dist/components/combobox.d.ts.map +1 -1
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/drawer.d.ts.map +1 -1
- package/dist/components/dropdown.d.ts.map +1 -1
- package/dist/components/empty-state.d.ts.map +1 -1
- package/dist/components/fieldset.d.ts.map +1 -1
- package/dist/components/form-field.d.ts +23 -0
- package/dist/components/form-field.d.ts.map +1 -0
- package/dist/components/icon.d.ts +53 -0
- package/dist/components/icon.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input-headless.d.ts.map +1 -1
- package/dist/components/kbd.d.ts.map +1 -1
- package/dist/components/listbox.d.ts.map +1 -1
- package/dist/components/navbar.d.ts.map +1 -1
- package/dist/components/radio.d.ts.map +1 -1
- package/dist/components/select-headless.d.ts.map +1 -1
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/skeleton.d.ts.map +1 -1
- package/dist/components/stat.d.ts.map +1 -1
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/table.d.ts.map +1 -1
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/textarea-headless.d.ts.map +1 -1
- package/dist/components/timeline.d.ts.map +1 -1
- package/dist/components/toast.d.ts.map +1 -1
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/use-theme.d.ts +26 -0
- package/dist/hooks/use-theme.d.ts.map +1 -0
- package/dist/index.js +65 -224
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +5 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +402 -32
- package/dist/server.js.map +1 -1
- package/dist/skeleton-CHPpiyJj.js +472 -0
- package/dist/skeleton-CHPpiyJj.js.map +1 -0
- package/dist/tokens.css +265 -0
- package/dist/use-theme-QxeZadnD.js +4024 -0
- package/dist/use-theme-QxeZadnD.js.map +1 -0
- package/dist/utils/cn.d.ts +21 -4
- package/dist/utils/cn.d.ts.map +1 -1
- package/package.json +13 -15
- package/dist/Box-DC3F8eRf.js +0 -430
- package/dist/Box-DC3F8eRf.js.map +0 -1
- package/dist/Text-jQVi12Hi.js +0 -218
- package/dist/Text-jQVi12Hi.js.map +0 -1
- package/dist/tooltip-DQYjYWbe.js +0 -5085
- package/dist/tooltip-DQYjYWbe.js.map +0 -1
package/dist/tokens.css
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* RevealUI Design Tokens
|
|
3
|
+
* ──────────────────────
|
|
4
|
+
* Single source of truth for the RevealUI design language.
|
|
5
|
+
* Import this file in any app to get the full token system:
|
|
6
|
+
*
|
|
7
|
+
* @import "@revealui/presentation/tokens.css";
|
|
8
|
+
*
|
|
9
|
+
* Dark-first: dark mode is the :root default.
|
|
10
|
+
* Light mode activates via:
|
|
11
|
+
* 1. System preference (prefers-color-scheme: light) — automatic
|
|
12
|
+
* 2. Explicit attribute [data-theme="light"] — manual toggle
|
|
13
|
+
*
|
|
14
|
+
* Color space: OKLCH (perceptually uniform, wide-gamut).
|
|
15
|
+
* Namespace: --rvui-* (avoids collisions with Tailwind/shadcn).
|
|
16
|
+
*
|
|
17
|
+
* Backward compatibility: bridges to shadcn/ui semantic names
|
|
18
|
+
* (--background, --foreground, --primary, etc.) so existing
|
|
19
|
+
* components work without modification during migration.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/* ═══════════════════════════════════════════════════════════════
|
|
23
|
+
* INVARIANT TOKENS — same in both dark and light mode
|
|
24
|
+
* ═══════════════════════════════════════════════════════════════ */
|
|
25
|
+
:root {
|
|
26
|
+
color-scheme: dark light;
|
|
27
|
+
|
|
28
|
+
/* ── Shape ── */
|
|
29
|
+
--rvui-radius-sm: 6px;
|
|
30
|
+
--rvui-radius-md: 10px;
|
|
31
|
+
--rvui-radius-lg: 16px;
|
|
32
|
+
--rvui-radius-xl: 24px;
|
|
33
|
+
--rvui-radius-full: 9999px;
|
|
34
|
+
|
|
35
|
+
/* ── Border ── */
|
|
36
|
+
--rvui-border-width: 1px;
|
|
37
|
+
|
|
38
|
+
/* ── Motion ── */
|
|
39
|
+
--rvui-ease: cubic-bezier(0.22, 1, 0.36, 1);
|
|
40
|
+
--rvui-ease-in: cubic-bezier(0.55, 0, 1, 0.45);
|
|
41
|
+
--rvui-ease-out: cubic-bezier(0, 0.55, 0.45, 1);
|
|
42
|
+
--rvui-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
43
|
+
--rvui-duration-fast: 120ms;
|
|
44
|
+
--rvui-duration-normal: 200ms;
|
|
45
|
+
--rvui-duration-slow: 350ms;
|
|
46
|
+
|
|
47
|
+
/* ── Typography ── */
|
|
48
|
+
--rvui-font-sans: 'Inter', system-ui, sans-serif;
|
|
49
|
+
--rvui-font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
|
|
50
|
+
--rvui-font-display: 'Mona Sans', 'Inter', system-ui, sans-serif;
|
|
51
|
+
|
|
52
|
+
--rvui-text-xs: 0.75rem;
|
|
53
|
+
--rvui-text-sm: 0.875rem;
|
|
54
|
+
--rvui-text-base: 1rem;
|
|
55
|
+
--rvui-text-lg: 1.125rem;
|
|
56
|
+
--rvui-text-xl: 1.25rem;
|
|
57
|
+
--rvui-text-2xl: 1.5rem;
|
|
58
|
+
--rvui-text-3xl: 1.875rem;
|
|
59
|
+
--rvui-text-display: 2.5rem;
|
|
60
|
+
|
|
61
|
+
--rvui-leading-tight: 1.25;
|
|
62
|
+
--rvui-leading-normal: 1.5;
|
|
63
|
+
--rvui-leading-relaxed: 1.75;
|
|
64
|
+
|
|
65
|
+
--rvui-tracking-tight: -0.02em;
|
|
66
|
+
--rvui-tracking-normal: 0em;
|
|
67
|
+
--rvui-tracking-wide: 0.04em;
|
|
68
|
+
|
|
69
|
+
/* ── Spacing (4px base) ── */
|
|
70
|
+
--rvui-space-0: 0px;
|
|
71
|
+
--rvui-space-px: 1px;
|
|
72
|
+
--rvui-space-0-5: 2px;
|
|
73
|
+
--rvui-space-1: 4px;
|
|
74
|
+
--rvui-space-1-5: 6px;
|
|
75
|
+
--rvui-space-2: 8px;
|
|
76
|
+
--rvui-space-3: 12px;
|
|
77
|
+
--rvui-space-4: 16px;
|
|
78
|
+
--rvui-space-5: 20px;
|
|
79
|
+
--rvui-space-6: 24px;
|
|
80
|
+
--rvui-space-8: 32px;
|
|
81
|
+
--rvui-space-10: 40px;
|
|
82
|
+
--rvui-space-12: 48px;
|
|
83
|
+
--rvui-space-16: 64px;
|
|
84
|
+
--rvui-space-20: 80px;
|
|
85
|
+
--rvui-space-24: 96px;
|
|
86
|
+
|
|
87
|
+
/* ── Z-Index Scale ── */
|
|
88
|
+
--rvui-z-base: 0;
|
|
89
|
+
--rvui-z-dropdown: 100;
|
|
90
|
+
--rvui-z-sticky: 200;
|
|
91
|
+
--rvui-z-overlay: 300;
|
|
92
|
+
--rvui-z-modal: 400;
|
|
93
|
+
--rvui-z-toast: 500;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
/* ═══════════════════════════════════════════════════════════════
|
|
98
|
+
* DARK MODE — :root default (dark-first design)
|
|
99
|
+
* ═══════════════════════════════════════════════════════════════ */
|
|
100
|
+
:root {
|
|
101
|
+
/* ── Brand ── */
|
|
102
|
+
--rvui-brand: oklch(0.723 0.177 163.22);
|
|
103
|
+
--rvui-brand-subtle: oklch(0.723 0.177 163.22 / 0.12);
|
|
104
|
+
--rvui-brand-strong: oklch(0.65 0.2 163.22);
|
|
105
|
+
--rvui-brand-text: oklch(0.82 0.14 163.22);
|
|
106
|
+
|
|
107
|
+
/* ── Surfaces (layered depth) ── */
|
|
108
|
+
--rvui-surface-0: oklch(0.13 0.004 228);
|
|
109
|
+
--rvui-surface-1: oklch(0.18 0.006 225);
|
|
110
|
+
--rvui-surface-2: oklch(0.22 0.008 222);
|
|
111
|
+
--rvui-surface-3: oklch(0.26 0.01 220);
|
|
112
|
+
|
|
113
|
+
/* ── Borders ── */
|
|
114
|
+
--rvui-border: oklch(0.32 0.008 220 / 0.6);
|
|
115
|
+
--rvui-border-subtle: oklch(0.28 0.006 222 / 0.4);
|
|
116
|
+
--rvui-border-strong: oklch(0.45 0.01 218 / 0.7);
|
|
117
|
+
|
|
118
|
+
/* ── Text ── */
|
|
119
|
+
--rvui-text-0: oklch(0.95 0.002 210);
|
|
120
|
+
--rvui-text-1: oklch(0.75 0.01 215);
|
|
121
|
+
--rvui-text-2: oklch(0.55 0.012 218);
|
|
122
|
+
|
|
123
|
+
/* ── Status ── */
|
|
124
|
+
--rvui-success: oklch(0.72 0.17 155);
|
|
125
|
+
--rvui-success-subtle: oklch(0.72 0.17 155 / 0.12);
|
|
126
|
+
--rvui-warning: oklch(0.8 0.16 75);
|
|
127
|
+
--rvui-warning-subtle: oklch(0.8 0.16 75 / 0.12);
|
|
128
|
+
--rvui-error: oklch(0.65 0.2 25);
|
|
129
|
+
--rvui-error-subtle: oklch(0.65 0.2 25 / 0.12);
|
|
130
|
+
--rvui-info: oklch(0.7 0.14 240);
|
|
131
|
+
--rvui-info-subtle: oklch(0.7 0.14 240 / 0.12);
|
|
132
|
+
|
|
133
|
+
/* ── Shadows ── */
|
|
134
|
+
--rvui-shadow-sm: 0 1px 3px oklch(0 0 0 / 0.2), 0 1px 2px oklch(0 0 0 / 0.15);
|
|
135
|
+
--rvui-shadow-md: 0 4px 12px oklch(0 0 0 / 0.25), 0 2px 4px oklch(0 0 0 / 0.15);
|
|
136
|
+
--rvui-shadow-lg: 0 12px 40px oklch(0 0 0 / 0.35), 0 4px 12px oklch(0 0 0 / 0.2);
|
|
137
|
+
--rvui-shadow-glow: 0 0 20px oklch(0.723 0.177 163.22 / 0.25);
|
|
138
|
+
|
|
139
|
+
/* ─── shadcn/ui Backward Compatibility Bridge ───
|
|
140
|
+
* Maps --rvui-* tokens to the semantic names that existing
|
|
141
|
+
* presentation components reference (bg-primary, text-muted-foreground, etc.).
|
|
142
|
+
* Bridge aliases update automatically when --rvui-* values change
|
|
143
|
+
* (light mode overrides propagate through var() references). */
|
|
144
|
+
--background: var(--rvui-surface-0);
|
|
145
|
+
--foreground: var(--rvui-text-0);
|
|
146
|
+
--card: var(--rvui-surface-1);
|
|
147
|
+
--card-foreground: var(--rvui-text-0);
|
|
148
|
+
--popover: var(--rvui-surface-1);
|
|
149
|
+
--popover-foreground: var(--rvui-text-0);
|
|
150
|
+
--primary: var(--rvui-brand);
|
|
151
|
+
--primary-foreground: oklch(0.13 0.004 228);
|
|
152
|
+
--secondary: var(--rvui-surface-2);
|
|
153
|
+
--secondary-foreground: var(--rvui-text-0);
|
|
154
|
+
--muted: var(--rvui-surface-2);
|
|
155
|
+
--muted-foreground: var(--rvui-text-2);
|
|
156
|
+
--accent: var(--rvui-surface-2);
|
|
157
|
+
--accent-foreground: var(--rvui-text-0);
|
|
158
|
+
--destructive: var(--rvui-error);
|
|
159
|
+
--destructive-foreground: var(--rvui-text-0);
|
|
160
|
+
--border: var(--rvui-border);
|
|
161
|
+
--input: var(--rvui-border);
|
|
162
|
+
--ring: var(--rvui-brand);
|
|
163
|
+
--success: var(--rvui-success);
|
|
164
|
+
--warning: var(--rvui-warning);
|
|
165
|
+
--error: var(--rvui-error);
|
|
166
|
+
--radius: var(--rvui-radius-md);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
/* ═══════════════════════════════════════════════════════════════
|
|
171
|
+
* LIGHT MODE — activates via system preference or explicit attr
|
|
172
|
+
*
|
|
173
|
+
* Selector precedence:
|
|
174
|
+
* [data-theme="light"] — explicit toggle (highest priority)
|
|
175
|
+
* @media + :not(.dark) — system preference (auto)
|
|
176
|
+
* .dark — explicit dark override
|
|
177
|
+
* ═══════════════════════════════════════════════════════════════ */
|
|
178
|
+
[data-theme="light"] {
|
|
179
|
+
/* ── Brand ── */
|
|
180
|
+
--rvui-brand: oklch(0.55 0.2 163.22);
|
|
181
|
+
--rvui-brand-subtle: oklch(0.55 0.2 163.22 / 0.08);
|
|
182
|
+
--rvui-brand-strong: oklch(0.48 0.22 163.22);
|
|
183
|
+
--rvui-brand-text: oklch(0.4 0.16 163.22);
|
|
184
|
+
|
|
185
|
+
/* ── Surfaces ── */
|
|
186
|
+
--rvui-surface-0: oklch(0.985 0.002 210);
|
|
187
|
+
--rvui-surface-1: oklch(1 0 0);
|
|
188
|
+
--rvui-surface-2: oklch(0.97 0.003 215);
|
|
189
|
+
--rvui-surface-3: oklch(0.94 0.005 218);
|
|
190
|
+
|
|
191
|
+
/* ── Borders ── */
|
|
192
|
+
--rvui-border: oklch(0.88 0.005 220 / 0.7);
|
|
193
|
+
--rvui-border-subtle: oklch(0.92 0.003 222 / 0.5);
|
|
194
|
+
--rvui-border-strong: oklch(0.78 0.008 218 / 0.8);
|
|
195
|
+
|
|
196
|
+
/* ── Text ── */
|
|
197
|
+
--rvui-text-0: oklch(0.15 0.01 225);
|
|
198
|
+
--rvui-text-1: oklch(0.4 0.015 220);
|
|
199
|
+
--rvui-text-2: oklch(0.55 0.012 218);
|
|
200
|
+
|
|
201
|
+
/* ── Status ── */
|
|
202
|
+
--rvui-success: oklch(0.55 0.2 155);
|
|
203
|
+
--rvui-success-subtle: oklch(0.55 0.2 155 / 0.08);
|
|
204
|
+
--rvui-warning: oklch(0.7 0.18 75);
|
|
205
|
+
--rvui-warning-subtle: oklch(0.7 0.18 75 / 0.08);
|
|
206
|
+
--rvui-error: oklch(0.55 0.22 25);
|
|
207
|
+
--rvui-error-subtle: oklch(0.55 0.22 25 / 0.08);
|
|
208
|
+
--rvui-info: oklch(0.55 0.18 240);
|
|
209
|
+
--rvui-info-subtle: oklch(0.55 0.18 240 / 0.08);
|
|
210
|
+
|
|
211
|
+
/* ── Shadows ── */
|
|
212
|
+
--rvui-shadow-sm: 0 1px 3px oklch(0 0 0 / 0.06), 0 1px 2px oklch(0 0 0 / 0.04);
|
|
213
|
+
--rvui-shadow-md: 0 4px 12px oklch(0 0 0 / 0.08), 0 2px 4px oklch(0 0 0 / 0.04);
|
|
214
|
+
--rvui-shadow-lg: 0 12px 40px oklch(0 0 0 / 0.12), 0 4px 12px oklch(0 0 0 / 0.06);
|
|
215
|
+
--rvui-shadow-glow: 0 0 20px oklch(0.55 0.2 163.22 / 0.15);
|
|
216
|
+
|
|
217
|
+
/* ── Bridge override ── */
|
|
218
|
+
--primary-foreground: oklch(0.985 0.002 210);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* System-preference auto-detection (no explicit theme attr) */
|
|
222
|
+
@media (prefers-color-scheme: light) {
|
|
223
|
+
:root:not(.dark):not([data-theme="dark"]):not([data-theme="light"]) {
|
|
224
|
+
/* ── Brand ── */
|
|
225
|
+
--rvui-brand: oklch(0.55 0.2 163.22);
|
|
226
|
+
--rvui-brand-subtle: oklch(0.55 0.2 163.22 / 0.08);
|
|
227
|
+
--rvui-brand-strong: oklch(0.48 0.22 163.22);
|
|
228
|
+
--rvui-brand-text: oklch(0.4 0.16 163.22);
|
|
229
|
+
|
|
230
|
+
/* ── Surfaces ── */
|
|
231
|
+
--rvui-surface-0: oklch(0.985 0.002 210);
|
|
232
|
+
--rvui-surface-1: oklch(1 0 0);
|
|
233
|
+
--rvui-surface-2: oklch(0.97 0.003 215);
|
|
234
|
+
--rvui-surface-3: oklch(0.94 0.005 218);
|
|
235
|
+
|
|
236
|
+
/* ── Borders ── */
|
|
237
|
+
--rvui-border: oklch(0.88 0.005 220 / 0.7);
|
|
238
|
+
--rvui-border-subtle: oklch(0.92 0.003 222 / 0.5);
|
|
239
|
+
--rvui-border-strong: oklch(0.78 0.008 218 / 0.8);
|
|
240
|
+
|
|
241
|
+
/* ── Text ── */
|
|
242
|
+
--rvui-text-0: oklch(0.15 0.01 225);
|
|
243
|
+
--rvui-text-1: oklch(0.4 0.015 220);
|
|
244
|
+
--rvui-text-2: oklch(0.55 0.012 218);
|
|
245
|
+
|
|
246
|
+
/* ── Status ── */
|
|
247
|
+
--rvui-success: oklch(0.55 0.2 155);
|
|
248
|
+
--rvui-success-subtle: oklch(0.55 0.2 155 / 0.08);
|
|
249
|
+
--rvui-warning: oklch(0.7 0.18 75);
|
|
250
|
+
--rvui-warning-subtle: oklch(0.7 0.18 75 / 0.08);
|
|
251
|
+
--rvui-error: oklch(0.55 0.22 25);
|
|
252
|
+
--rvui-error-subtle: oklch(0.55 0.22 25 / 0.08);
|
|
253
|
+
--rvui-info: oklch(0.55 0.18 240);
|
|
254
|
+
--rvui-info-subtle: oklch(0.55 0.18 240 / 0.08);
|
|
255
|
+
|
|
256
|
+
/* ── Shadows ── */
|
|
257
|
+
--rvui-shadow-sm: 0 1px 3px oklch(0 0 0 / 0.06), 0 1px 2px oklch(0 0 0 / 0.04);
|
|
258
|
+
--rvui-shadow-md: 0 4px 12px oklch(0 0 0 / 0.08), 0 2px 4px oklch(0 0 0 / 0.04);
|
|
259
|
+
--rvui-shadow-lg: 0 12px 40px oklch(0 0 0 / 0.12), 0 4px 12px oklch(0 0 0 / 0.06);
|
|
260
|
+
--rvui-shadow-glow: 0 0 20px oklch(0.55 0.2 163.22 / 0.15);
|
|
261
|
+
|
|
262
|
+
/* ── Bridge override ── */
|
|
263
|
+
--primary-foreground: oklch(0.985 0.002 210);
|
|
264
|
+
}
|
|
265
|
+
}
|