@devfellowship/components 0.1.0 → 1.1.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.
- package/dist/hooks.cjs +33 -0
- package/dist/hooks.d.cts +9 -1
- package/dist/hooks.d.ts +9 -1
- package/dist/hooks.js +31 -0
- package/dist/index.cjs +3902 -584
- package/dist/index.d.cts +621 -7
- package/dist/index.d.ts +621 -7
- package/dist/index.js +3914 -734
- package/dist/styles/fonts.css +102 -0
- package/dist/styles/tailwind.css +66 -0
- package/dist/styles/theme.css +29 -163
- package/dist/styles/tokens.css +491 -0
- package/package.json +24 -5
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @dfl/components — Design System v0 Tokens
|
|
3
|
+
*
|
|
4
|
+
* Hand-written 3-layer token architecture (per ADR-1 in plan
|
|
5
|
+
* https://plans.tainanfidelis.com/20260520-dfl-components-ds-v0-revamp):
|
|
6
|
+
*
|
|
7
|
+
* 1. --p-* primitives Raw atoms (color stops, type scale, spacing, etc.).
|
|
8
|
+
* Never consumed by component code directly.
|
|
9
|
+
* 2. --s-* semantic Intent-mapped (surface-page, ink-muted, brand-solid…)
|
|
10
|
+
* Components MAY consume these as fallback chain.
|
|
11
|
+
* 3. --c-* component Per-component knobs (--c-button-primary-bg, …).
|
|
12
|
+
* This is what component CSS reaches for first.
|
|
13
|
+
*
|
|
14
|
+
* Plain CSS vars, no compile step (per Tainan Q5=C — Round-1 TG msg 5645).
|
|
15
|
+
*
|
|
16
|
+
* Brand color: #E07A4A (DS v0 amber-500). Previous #F39325 retired in v1.0.0.
|
|
17
|
+
*
|
|
18
|
+
* Usage in consumer app:
|
|
19
|
+
* @import '@devfellowship/components/styles'; ← this file via theme.css
|
|
20
|
+
*
|
|
21
|
+
* Override any variable in your own CSS to retheme.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
25
|
+
* LAYER 1 — Primitives (--p-*)
|
|
26
|
+
* ─────────────────────────────────────────────────────────────────────── */
|
|
27
|
+
|
|
28
|
+
:root {
|
|
29
|
+
/* Color stops — extracted from DS v0 artifact (302 vars total) ─────────── */
|
|
30
|
+
|
|
31
|
+
/* Sand (neutral) */
|
|
32
|
+
--p-sand-50: #f6f1e7;
|
|
33
|
+
--p-sand-100: #e8e0d0;
|
|
34
|
+
--p-sand-200: #c9c0b4;
|
|
35
|
+
--p-sand-300: #a89e8f;
|
|
36
|
+
--p-sand-400: #7d7568;
|
|
37
|
+
--p-sand-500: #5a5249;
|
|
38
|
+
--p-sand-600: #3a3530;
|
|
39
|
+
--p-sand-700: #2a2622;
|
|
40
|
+
--p-sand-800: #1f1c18;
|
|
41
|
+
--p-sand-850: #1a1714;
|
|
42
|
+
--p-sand-900: #141210;
|
|
43
|
+
--p-sand-950: #0a0908;
|
|
44
|
+
--p-sand-paper-2: #ece4d2; /* editorial paper, second tone (ch.5.8 light) */
|
|
45
|
+
|
|
46
|
+
/* Amber (brand) */
|
|
47
|
+
--p-amber-50: #fff1e6;
|
|
48
|
+
--p-amber-100: #fadcc0;
|
|
49
|
+
--p-amber-200: #f5c298;
|
|
50
|
+
--p-amber-300: #f0a872;
|
|
51
|
+
--p-amber-400: #ea915a;
|
|
52
|
+
--p-amber-500: #E07A4A; /* ← DS v0 brand */
|
|
53
|
+
--p-amber-600: #c2663b;
|
|
54
|
+
--p-amber-700: #9e5230;
|
|
55
|
+
--p-amber-800: #783e25;
|
|
56
|
+
--p-amber-900: #4d2818;
|
|
57
|
+
|
|
58
|
+
/* Green (success) */
|
|
59
|
+
--p-green-100: #d2eed9;
|
|
60
|
+
--p-green-400: #7ad79a;
|
|
61
|
+
--p-green-500: #5ec27e;
|
|
62
|
+
--p-green-700: #2f7a4a;
|
|
63
|
+
--p-green-900: #143b22;
|
|
64
|
+
|
|
65
|
+
/* Yellow (warning) */
|
|
66
|
+
--p-yellow-400: #f0c875;
|
|
67
|
+
--p-yellow-500: #e0b04a;
|
|
68
|
+
--p-yellow-700: #9c781f;
|
|
69
|
+
--p-yellow-900: #4a3b12;
|
|
70
|
+
|
|
71
|
+
/* Blue (info) */
|
|
72
|
+
--p-blue-400: #9ab9e8;
|
|
73
|
+
--p-blue-500: #7aa2e0;
|
|
74
|
+
--p-blue-700: #3b5c9c;
|
|
75
|
+
--p-blue-900: #1a2b4c;
|
|
76
|
+
|
|
77
|
+
/* Red (danger) */
|
|
78
|
+
--p-red-400: #e89898;
|
|
79
|
+
--p-red-500: #e07a7a;
|
|
80
|
+
--p-red-700: #9c3b3b;
|
|
81
|
+
--p-red-900: #4c1a1a;
|
|
82
|
+
|
|
83
|
+
/* Avatar / accent palette */
|
|
84
|
+
--p-amber: #E07A4A;
|
|
85
|
+
--p-blue: #7aa2e0;
|
|
86
|
+
--p-green: #5ec27e;
|
|
87
|
+
--p-lilac: #b58fe0;
|
|
88
|
+
--p-mustard: #e0b04a;
|
|
89
|
+
--p-teal: #7ad6cd;
|
|
90
|
+
--p-coral: #e07a7a;
|
|
91
|
+
--p-mint: #7ae0a8;
|
|
92
|
+
--p-peach: #e0b8a8;
|
|
93
|
+
--p-periwinkle: #9aa8e0;
|
|
94
|
+
|
|
95
|
+
/* Typography */
|
|
96
|
+
--p-font-display: 'Barlow Condensed', 'Inter', system-ui, sans-serif;
|
|
97
|
+
--p-font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
98
|
+
--p-font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
|
|
99
|
+
--p-font-editorial: Georgia, 'Times New Roman', serif; /* editorial/long-form only */
|
|
100
|
+
|
|
101
|
+
--p-text-10: 10px;
|
|
102
|
+
--p-text-11: 11px;
|
|
103
|
+
--p-text-12: 12px;
|
|
104
|
+
--p-text-13: 13px;
|
|
105
|
+
--p-text-14: 14px;
|
|
106
|
+
--p-text-15: 15px;
|
|
107
|
+
--p-text-16: 16px;
|
|
108
|
+
--p-text-18: 18px;
|
|
109
|
+
--p-text-20: 20px;
|
|
110
|
+
--p-text-24: 24px;
|
|
111
|
+
--p-text-32: 32px;
|
|
112
|
+
--p-text-40: 40px;
|
|
113
|
+
|
|
114
|
+
--p-weight-400: 400;
|
|
115
|
+
--p-weight-500: 500;
|
|
116
|
+
--p-weight-600: 600;
|
|
117
|
+
--p-weight-700: 700;
|
|
118
|
+
|
|
119
|
+
--p-leading-tight: 1.2;
|
|
120
|
+
--p-leading-snug: 1.4;
|
|
121
|
+
--p-leading-normal: 1.55;
|
|
122
|
+
--p-leading-relaxed: 1.7;
|
|
123
|
+
|
|
124
|
+
--p-tracking-tight: -0.4px;
|
|
125
|
+
--p-tracking-normal: 0;
|
|
126
|
+
--p-tracking-wide: 0.5px;
|
|
127
|
+
--p-tracking-wider: 0.8px;
|
|
128
|
+
|
|
129
|
+
/* Spacing scale (4px grid) */
|
|
130
|
+
--p-space-0: 0;
|
|
131
|
+
--p-space-1: 4px;
|
|
132
|
+
--p-space-2: 8px;
|
|
133
|
+
--p-space-3: 12px;
|
|
134
|
+
--p-space-4: 16px;
|
|
135
|
+
--p-space-5: 20px;
|
|
136
|
+
--p-space-6: 24px;
|
|
137
|
+
--p-space-8: 32px;
|
|
138
|
+
--p-space-10: 40px;
|
|
139
|
+
--p-space-12: 48px;
|
|
140
|
+
--p-space-16: 64px;
|
|
141
|
+
--p-space-20: 80px;
|
|
142
|
+
|
|
143
|
+
/* Radius scale */
|
|
144
|
+
--p-radius-0: 0;
|
|
145
|
+
--p-radius-sm: 4px;
|
|
146
|
+
--p-radius-md: 6px;
|
|
147
|
+
--p-radius-lg: 10px;
|
|
148
|
+
--p-radius-xl: 14px;
|
|
149
|
+
--p-radius-2xl: 20px;
|
|
150
|
+
--p-radius-pill: 999px;
|
|
151
|
+
|
|
152
|
+
/* Shadow scale */
|
|
153
|
+
--p-shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
|
|
154
|
+
--p-shadow: 0 4px 12px rgba(0,0,0,0.45);
|
|
155
|
+
--p-shadow-lg: 0 12px 30px rgba(0,0,0,0.6);
|
|
156
|
+
--p-shadow-overlay: 0 24px 60px rgba(0,0,0,0.7);
|
|
157
|
+
|
|
158
|
+
/* Motion */
|
|
159
|
+
--p-ease-out: cubic-bezier(0.2, 0.7, 0.3, 1);
|
|
160
|
+
--p-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
161
|
+
--p-duration-fast: 120ms;
|
|
162
|
+
--p-duration: 180ms;
|
|
163
|
+
--p-duration-slow: 280ms;
|
|
164
|
+
|
|
165
|
+
/* Motion — DS-spec named durations (brand.devfellowship.com ch.11 Motion).
|
|
166
|
+
* Additive: complements the legacy --p-duration-* names above. */
|
|
167
|
+
--p-duration-instant: 80ms;
|
|
168
|
+
--p-duration-fast-named: 120ms;
|
|
169
|
+
--p-duration-base: 180ms;
|
|
170
|
+
--p-duration-medium: 220ms;
|
|
171
|
+
--p-duration-slow-named: 320ms;
|
|
172
|
+
--p-duration-deliberate: 600ms;
|
|
173
|
+
|
|
174
|
+
/* Motion — DS-spec named easings (ch.11 Motion). */
|
|
175
|
+
--p-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
176
|
+
--p-ease-out-std: cubic-bezier(0, 0, 0.2, 1);
|
|
177
|
+
--p-ease-in-std: cubic-bezier(0.4, 0, 1, 1);
|
|
178
|
+
--p-ease-snap: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
179
|
+
--p-ease-linear: linear;
|
|
180
|
+
|
|
181
|
+
/* Z-index scale (ch.10 Layout). Stacking order is contractual — never
|
|
182
|
+
* hard-code raw z-index in component CSS; reference these. */
|
|
183
|
+
--p-z-base: 0;
|
|
184
|
+
--p-z-sticky: 10;
|
|
185
|
+
--p-z-dropdown: 20;
|
|
186
|
+
--p-z-tooltip: 30;
|
|
187
|
+
--p-z-modal-scrim: 40;
|
|
188
|
+
--p-z-modal: 50;
|
|
189
|
+
--p-z-toast: 60;
|
|
190
|
+
|
|
191
|
+
/* Breakpoints (referenced from @media, not applied here) */
|
|
192
|
+
--p-bp-phone: 0px;
|
|
193
|
+
--p-bp-sm: 640px;
|
|
194
|
+
--p-bp-md: 768px;
|
|
195
|
+
--p-bp-lg: 1024px;
|
|
196
|
+
--p-bp-xl: 1280px;
|
|
197
|
+
--p-bp-2xl: 1536px;
|
|
198
|
+
|
|
199
|
+
/* Touch targets (a11y minimums) */
|
|
200
|
+
--p-touch-target: 44px;
|
|
201
|
+
--p-touch-comfort: 48px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
205
|
+
* LAYER 2 — Semantic (--s-*)
|
|
206
|
+
* Intent-mapped tokens. Components may consume directly when no --c-* exists.
|
|
207
|
+
* ─────────────────────────────────────────────────────────────────────── */
|
|
208
|
+
|
|
209
|
+
:root {
|
|
210
|
+
/* Surface (background hierarchy) */
|
|
211
|
+
--s-surface-page: var(--p-sand-950);
|
|
212
|
+
--s-surface-panel: var(--p-sand-900);
|
|
213
|
+
--s-surface-raised: var(--p-sand-850);
|
|
214
|
+
--s-surface-elevated: var(--p-sand-800);
|
|
215
|
+
--s-surface-overlay: var(--p-sand-850);
|
|
216
|
+
--s-surface-scrim: rgba(10, 9, 8, 0.72);
|
|
217
|
+
|
|
218
|
+
/* Border */
|
|
219
|
+
--s-border-subtle: var(--p-sand-700);
|
|
220
|
+
--s-border-strong: var(--p-sand-600);
|
|
221
|
+
--s-border-focus: var(--p-amber-500);
|
|
222
|
+
|
|
223
|
+
/* Ink (text) */
|
|
224
|
+
--s-ink-primary: var(--p-sand-50);
|
|
225
|
+
--s-ink-secondary: var(--p-sand-200);
|
|
226
|
+
--s-ink-muted: var(--p-sand-400);
|
|
227
|
+
--s-ink-disabled: var(--p-sand-500);
|
|
228
|
+
--s-ink-inverse: var(--p-sand-950);
|
|
229
|
+
|
|
230
|
+
/* Brand */
|
|
231
|
+
--s-brand-solid: var(--p-amber-500);
|
|
232
|
+
--s-brand-hover: var(--p-amber-400);
|
|
233
|
+
--s-brand-pressed: var(--p-amber-600);
|
|
234
|
+
--s-brand-fg: var(--p-amber-300);
|
|
235
|
+
--s-brand-subtle: rgba(224, 122, 74, 0.10);
|
|
236
|
+
--s-brand-border: rgba(224, 122, 74, 0.22);
|
|
237
|
+
--s-brand-ring: rgba(224, 122, 74, 0.45);
|
|
238
|
+
|
|
239
|
+
/* Success */
|
|
240
|
+
--s-success-solid: var(--p-green-500);
|
|
241
|
+
--s-success-fg: var(--p-green-400);
|
|
242
|
+
--s-success-subtle: rgba(94, 194, 126, 0.12);
|
|
243
|
+
--s-success-border: rgba(94, 194, 126, 0.40);
|
|
244
|
+
|
|
245
|
+
/* Warning */
|
|
246
|
+
--s-warning-solid: var(--p-yellow-500);
|
|
247
|
+
--s-warning-fg: var(--p-yellow-400);
|
|
248
|
+
--s-warning-subtle: rgba(224, 176, 74, 0.12);
|
|
249
|
+
--s-warning-border: rgba(224, 176, 74, 0.40);
|
|
250
|
+
|
|
251
|
+
/* Danger */
|
|
252
|
+
--s-danger-solid: var(--p-red-500);
|
|
253
|
+
--s-danger-fg: var(--p-red-400);
|
|
254
|
+
--s-danger-subtle: rgba(224, 122, 122, 0.12);
|
|
255
|
+
--s-danger-border: rgba(224, 122, 122, 0.40);
|
|
256
|
+
|
|
257
|
+
/* Info */
|
|
258
|
+
--s-info-solid: var(--p-blue-500);
|
|
259
|
+
--s-info-fg: var(--p-blue-400);
|
|
260
|
+
--s-info-subtle: rgba(122, 162, 224, 0.12);
|
|
261
|
+
--s-info-border: rgba(122, 162, 224, 0.40);
|
|
262
|
+
|
|
263
|
+
/* Type stacks */
|
|
264
|
+
--s-font-display: var(--p-font-display);
|
|
265
|
+
--s-font-body: var(--p-font-sans);
|
|
266
|
+
--s-font-mono: var(--p-font-mono);
|
|
267
|
+
|
|
268
|
+
/* Member palette — 10 deterministic avatar hues.
|
|
269
|
+
* Consumed by <UserAvatar> which hashes a name/id to --member-1..10.
|
|
270
|
+
* Mapped to the primitive "Avatar / accent palette" (Layer 1). */
|
|
271
|
+
--member-1: var(--p-amber);
|
|
272
|
+
--member-2: var(--p-blue);
|
|
273
|
+
--member-3: var(--p-green);
|
|
274
|
+
--member-4: var(--p-lilac);
|
|
275
|
+
--member-5: var(--p-mustard);
|
|
276
|
+
--member-6: var(--p-teal);
|
|
277
|
+
--member-7: var(--p-coral);
|
|
278
|
+
--member-8: var(--p-mint);
|
|
279
|
+
--member-9: var(--p-peach);
|
|
280
|
+
--member-10: var(--p-periwinkle);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
284
|
+
* LAYER 3 — Component (--c-*)
|
|
285
|
+
* ~5-10 knobs per component (per Tainan Q10=B). Pragmatic, not exhaustive.
|
|
286
|
+
* ─────────────────────────────────────────────────────────────────────── */
|
|
287
|
+
|
|
288
|
+
:root {
|
|
289
|
+
/* Button */
|
|
290
|
+
--c-button-radius: var(--p-radius-md);
|
|
291
|
+
--c-button-font-weight: var(--p-weight-500);
|
|
292
|
+
--c-button-primary-bg: var(--s-brand-solid);
|
|
293
|
+
--c-button-primary-fg: var(--p-sand-950);
|
|
294
|
+
--c-button-primary-border: var(--s-brand-solid);
|
|
295
|
+
--c-button-primary-bg-hover: var(--s-brand-hover);
|
|
296
|
+
--c-button-primary-bg-active: var(--s-brand-pressed);
|
|
297
|
+
--c-button-secondary-bg: var(--s-surface-raised);
|
|
298
|
+
--c-button-secondary-fg: var(--s-ink-secondary);
|
|
299
|
+
--c-button-secondary-border: var(--s-border-subtle);
|
|
300
|
+
--c-button-secondary-bg-hover: var(--s-surface-elevated);
|
|
301
|
+
--c-button-secondary-border-hover: var(--s-border-strong);
|
|
302
|
+
--c-button-ghost-fg: var(--s-ink-secondary);
|
|
303
|
+
--c-button-ghost-bg-hover: var(--s-surface-raised);
|
|
304
|
+
--c-button-destructive-bg: transparent;
|
|
305
|
+
--c-button-destructive-fg: var(--s-danger-fg);
|
|
306
|
+
--c-button-destructive-border: var(--s-danger-border);
|
|
307
|
+
--c-button-destructive-bg-hover: var(--s-danger-subtle);
|
|
308
|
+
--c-button-success-bg: var(--s-success-solid);
|
|
309
|
+
--c-button-success-fg: var(--p-sand-950);
|
|
310
|
+
--c-button-success-border: var(--s-success-solid);
|
|
311
|
+
|
|
312
|
+
/* Input / Textarea / Select share the same knobs */
|
|
313
|
+
--c-input-bg: var(--s-surface-raised);
|
|
314
|
+
--c-input-fg: var(--s-ink-primary);
|
|
315
|
+
--c-input-placeholder: var(--s-ink-muted);
|
|
316
|
+
--c-input-border: var(--s-border-subtle);
|
|
317
|
+
--c-input-border-hover: var(--s-border-strong);
|
|
318
|
+
--c-input-border-focus: var(--s-border-focus);
|
|
319
|
+
--c-input-ring-focus: var(--s-brand-ring);
|
|
320
|
+
--c-input-border-error: var(--s-danger-solid);
|
|
321
|
+
--c-input-radius: var(--p-radius-md);
|
|
322
|
+
|
|
323
|
+
/* Card */
|
|
324
|
+
--c-card-bg: var(--s-surface-panel);
|
|
325
|
+
--c-card-bg-raised: var(--s-surface-raised);
|
|
326
|
+
--c-card-border: var(--s-border-subtle);
|
|
327
|
+
--c-card-border-hover: var(--s-border-strong);
|
|
328
|
+
--c-card-radius: var(--p-radius-lg);
|
|
329
|
+
--c-card-padding: var(--p-space-5);
|
|
330
|
+
--c-card-shadow: var(--p-shadow-sm);
|
|
331
|
+
|
|
332
|
+
/* Dialog / Sheet / Drawer */
|
|
333
|
+
--c-dialog-bg: var(--s-surface-raised);
|
|
334
|
+
--c-dialog-border: var(--s-border-subtle);
|
|
335
|
+
--c-dialog-radius: var(--p-radius-xl);
|
|
336
|
+
--c-dialog-shadow: var(--p-shadow-overlay);
|
|
337
|
+
--c-dialog-scrim: var(--s-surface-scrim);
|
|
338
|
+
|
|
339
|
+
/* Tooltip */
|
|
340
|
+
--c-tooltip-bg: var(--s-surface-elevated);
|
|
341
|
+
--c-tooltip-fg: var(--s-ink-primary);
|
|
342
|
+
--c-tooltip-border: var(--s-border-subtle);
|
|
343
|
+
--c-tooltip-radius: var(--p-radius-sm);
|
|
344
|
+
--c-tooltip-shadow: var(--p-shadow);
|
|
345
|
+
|
|
346
|
+
/* Table */
|
|
347
|
+
--c-table-header-fg: var(--s-ink-muted);
|
|
348
|
+
--c-table-header-bg: transparent;
|
|
349
|
+
--c-table-divider: var(--s-border-subtle);
|
|
350
|
+
--c-table-row-hover-bg: var(--s-surface-raised);
|
|
351
|
+
|
|
352
|
+
/* Tabs */
|
|
353
|
+
--c-tabs-fg: var(--s-ink-muted);
|
|
354
|
+
--c-tabs-fg-active: var(--s-ink-primary);
|
|
355
|
+
--c-tabs-indicator: var(--s-brand-solid);
|
|
356
|
+
--c-tabs-divider: var(--s-border-subtle);
|
|
357
|
+
|
|
358
|
+
/* Avatar */
|
|
359
|
+
--c-avatar-ring: var(--s-surface-panel);
|
|
360
|
+
--c-avatar-fallback-bg: var(--s-surface-elevated);
|
|
361
|
+
|
|
362
|
+
/* Badge / Pill */
|
|
363
|
+
--c-badge-radius: var(--p-radius-sm);
|
|
364
|
+
--c-pill-radius: var(--p-radius-pill);
|
|
365
|
+
|
|
366
|
+
/* Layout chrome */
|
|
367
|
+
--c-sidebar-w: 224px;
|
|
368
|
+
--c-sidebar-w-collapsed: 56px;
|
|
369
|
+
--c-header-h: 56px;
|
|
370
|
+
--c-statusbar-h: 24px;
|
|
371
|
+
--c-content-max: 1280px;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
375
|
+
* Compatibility aliases (read-only, do not override)
|
|
376
|
+
*
|
|
377
|
+
* --background, --foreground, --primary etc. used to be raw HSL channels
|
|
378
|
+
* (Tailwind v3 style) in `theme.css`. v1.0.0 removed those.
|
|
379
|
+
*
|
|
380
|
+
* These hex aliases are the *replacement* for downstream consumers still
|
|
381
|
+
* relying on `bg-background`, `text-foreground`, etc. via Tailwind v4
|
|
382
|
+
* (`@theme inline` block in tailwind.css → maps to `--color-*: var(--*)`).
|
|
383
|
+
* ─────────────────────────────────────────────────────────────────────── */
|
|
384
|
+
|
|
385
|
+
:root {
|
|
386
|
+
--background: var(--s-surface-page);
|
|
387
|
+
--foreground: var(--s-ink-primary);
|
|
388
|
+
|
|
389
|
+
--card: var(--c-card-bg);
|
|
390
|
+
--card-foreground: var(--s-ink-primary);
|
|
391
|
+
|
|
392
|
+
--popover: var(--c-dialog-bg);
|
|
393
|
+
--popover-foreground: var(--s-ink-primary);
|
|
394
|
+
|
|
395
|
+
--primary: var(--s-brand-solid);
|
|
396
|
+
--primary-foreground: var(--p-sand-950);
|
|
397
|
+
|
|
398
|
+
--secondary: var(--s-surface-raised);
|
|
399
|
+
--secondary-foreground: var(--s-ink-secondary);
|
|
400
|
+
|
|
401
|
+
--muted: var(--s-surface-raised);
|
|
402
|
+
--muted-foreground: var(--s-ink-muted);
|
|
403
|
+
|
|
404
|
+
--accent: var(--s-brand-solid);
|
|
405
|
+
--accent-foreground: var(--p-sand-950);
|
|
406
|
+
|
|
407
|
+
--destructive: var(--s-danger-solid);
|
|
408
|
+
--destructive-foreground: var(--s-ink-primary);
|
|
409
|
+
|
|
410
|
+
--border: var(--s-border-subtle);
|
|
411
|
+
--input: var(--c-input-border);
|
|
412
|
+
--ring: var(--s-border-focus);
|
|
413
|
+
|
|
414
|
+
--radius: var(--p-radius-md);
|
|
415
|
+
|
|
416
|
+
/* Brand shortcuts kept for backwards-compat — point to new amber */
|
|
417
|
+
--brand-orange: var(--p-amber-500);
|
|
418
|
+
--brand-dark: var(--p-sand-950);
|
|
419
|
+
--brand-accent: var(--p-amber-500);
|
|
420
|
+
|
|
421
|
+
/* Sidebar surface aliases */
|
|
422
|
+
--sidebar-background: var(--s-surface-page);
|
|
423
|
+
--sidebar-foreground: var(--s-ink-secondary);
|
|
424
|
+
--sidebar-primary: var(--s-brand-solid);
|
|
425
|
+
--sidebar-primary-foreground: var(--p-sand-950);
|
|
426
|
+
--sidebar-accent: var(--s-surface-raised);
|
|
427
|
+
--sidebar-accent-foreground: var(--s-ink-primary);
|
|
428
|
+
--sidebar-border: var(--s-border-subtle);
|
|
429
|
+
--sidebar-ring: var(--s-border-focus);
|
|
430
|
+
|
|
431
|
+
/* Charts — keep existing 5-slot API, map onto DS v0 avatar palette */
|
|
432
|
+
--chart-1: var(--p-amber-500);
|
|
433
|
+
--chart-2: var(--p-blue-500);
|
|
434
|
+
--chart-3: var(--p-green-500);
|
|
435
|
+
--chart-4: var(--p-mustard);
|
|
436
|
+
--chart-5: var(--p-lilac);
|
|
437
|
+
|
|
438
|
+
/* Font shortcuts (legacy theme.css names) */
|
|
439
|
+
--font-sans: var(--p-font-sans);
|
|
440
|
+
--font-condensed: var(--p-font-display);
|
|
441
|
+
--font-mono: var(--p-font-mono);
|
|
442
|
+
--font-editorial: var(--p-font-editorial);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
446
|
+
* LIGHT / EDITORIAL tokens (ch.5.8) — DEFINED but NOT default.
|
|
447
|
+
*
|
|
448
|
+
* DS v0 is dark-first; these light "paper" tokens exist ONLY for editorial
|
|
449
|
+
* / long-form surfaces (printed-feel article views, book/learn reader). They
|
|
450
|
+
* are intentionally NOT applied at :root — opt in by scoping `.editorial`
|
|
451
|
+
* (or `[data-surface="editorial"]`) on a subtree:
|
|
452
|
+
*
|
|
453
|
+
* <article class="editorial"> … </article>
|
|
454
|
+
*
|
|
455
|
+
* Brand source: brand.devfellowship.com/llms.txt §5.8.
|
|
456
|
+
* ─────────────────────────────────────────────────────────────────────── */
|
|
457
|
+
|
|
458
|
+
:root {
|
|
459
|
+
/* Editorial primitives are always available as vars (so a consumer can
|
|
460
|
+
* reference --paper directly) but only take effect as page bg/ink under
|
|
461
|
+
* the .editorial scope below. */
|
|
462
|
+
--paper: var(--p-sand-50); /* #F6F1E7 */
|
|
463
|
+
--paper-2: var(--p-sand-paper-2); /* #ECE4D2 */
|
|
464
|
+
--ink-on-paper: var(--p-sand-850); /* #1A1714 */
|
|
465
|
+
--brand-on-light: var(--p-amber-600); /* #C2663B */
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.editorial,
|
|
469
|
+
[data-surface='editorial'] {
|
|
470
|
+
background-color: var(--paper);
|
|
471
|
+
color: var(--ink-on-paper);
|
|
472
|
+
font-family: var(--p-font-editorial);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
476
|
+
* FOCUS RING (ch.5.2 / ch.11) — 1px amber, 3px offset, INSTANT (no animation).
|
|
477
|
+
* No drop shadows anywhere; hierarchy is by surface elevation only.
|
|
478
|
+
* Consumers can adopt this uniform ring via `.ds-focus-ring:focus-visible`.
|
|
479
|
+
* ─────────────────────────────────────────────────────────────────────── */
|
|
480
|
+
|
|
481
|
+
:root {
|
|
482
|
+
--ds-focus-ring-width: 1px;
|
|
483
|
+
--ds-focus-ring-offset: 3px;
|
|
484
|
+
--ds-focus-ring-color: var(--s-border-focus); /* amber #E07A4A */
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.ds-focus-ring:focus-visible {
|
|
488
|
+
outline: var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);
|
|
489
|
+
outline-offset: var(--ds-focus-ring-offset);
|
|
490
|
+
transition: none; /* instant — no animation on focus */
|
|
491
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devfellowship/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "DFL Design System — UI components, hooks, utils and providers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"require": "./dist/providers.cjs"
|
|
29
29
|
},
|
|
30
30
|
"./styles": "./dist/styles/theme.css",
|
|
31
|
+
"./tokens": "./dist/styles/tokens.css",
|
|
31
32
|
"./tailwind": "./dist/styles/tailwind.css"
|
|
32
33
|
},
|
|
33
34
|
"main": "./dist/index.cjs",
|
|
@@ -68,8 +69,8 @@
|
|
|
68
69
|
"@storybook/react-vite": "^8.6.18",
|
|
69
70
|
"@supabase/supabase-js": "^2.49.4",
|
|
70
71
|
"@tailwindcss/vite": "^4.2.2",
|
|
71
|
-
"@testing-library/jest-dom": "^6.
|
|
72
|
-
"@testing-library/react": "^16.3.
|
|
72
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
73
|
+
"@testing-library/react": "^16.3.2",
|
|
73
74
|
"@types/react": "^18.3.28",
|
|
74
75
|
"@types/react-dom": "^18.3.7",
|
|
75
76
|
"@vitejs/plugin-react": "^4.7.0",
|
|
@@ -81,33 +82,51 @@
|
|
|
81
82
|
"tsup": "^8.5.1",
|
|
82
83
|
"typescript": "^5.9.3",
|
|
83
84
|
"vite": "^5.4.21",
|
|
84
|
-
"vitest": "^3.
|
|
85
|
+
"vitest": "^3.2.4"
|
|
85
86
|
},
|
|
86
87
|
"dependencies": {
|
|
87
88
|
"@radix-ui/react-accordion": "^1.2.0",
|
|
88
89
|
"@radix-ui/react-alert-dialog": "^1.1.1",
|
|
90
|
+
"@radix-ui/react-aspect-ratio": "^1.1.8",
|
|
89
91
|
"@radix-ui/react-avatar": "^1.1.0",
|
|
90
92
|
"@radix-ui/react-checkbox": "^1.1.1",
|
|
91
93
|
"@radix-ui/react-collapsible": "^1.1.0",
|
|
94
|
+
"@radix-ui/react-context-menu": "^2.2.16",
|
|
92
95
|
"@radix-ui/react-dialog": "^1.1.2",
|
|
93
96
|
"@radix-ui/react-dropdown-menu": "^2.1.1",
|
|
97
|
+
"@radix-ui/react-hover-card": "^1.1.15",
|
|
94
98
|
"@radix-ui/react-label": "^2.1.0",
|
|
99
|
+
"@radix-ui/react-menubar": "^1.1.16",
|
|
100
|
+
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
95
101
|
"@radix-ui/react-popover": "^1.1.1",
|
|
96
102
|
"@radix-ui/react-progress": "^1.1.0",
|
|
97
103
|
"@radix-ui/react-radio-group": "^1.3.8",
|
|
98
104
|
"@radix-ui/react-scroll-area": "^1.1.0",
|
|
99
105
|
"@radix-ui/react-select": "^2.1.1",
|
|
100
106
|
"@radix-ui/react-separator": "^1.1.0",
|
|
107
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
101
108
|
"@radix-ui/react-slot": "^1.1.0",
|
|
102
109
|
"@radix-ui/react-switch": "^1.1.0",
|
|
103
110
|
"@radix-ui/react-tabs": "^1.1.0",
|
|
104
111
|
"@radix-ui/react-toast": "^1.2.1",
|
|
112
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
113
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
105
114
|
"@radix-ui/react-tooltip": "^1.1.4",
|
|
106
115
|
"@testing-library/dom": "^10.4.1",
|
|
107
116
|
"class-variance-authority": "^0.7.1",
|
|
108
117
|
"clsx": "^2.1.1",
|
|
118
|
+
"cmdk": "^1.1.1",
|
|
119
|
+
"date-fns": "^3.6.0",
|
|
120
|
+
"embla-carousel-react": "^8.6.0",
|
|
121
|
+
"input-otp": "^1.4.2",
|
|
109
122
|
"lucide-react": "^0.462.0",
|
|
123
|
+
"next-themes": "^0.4.6",
|
|
124
|
+
"react-day-picker": "^8.10.1",
|
|
110
125
|
"react-hook-form": "^7.72.1",
|
|
111
|
-
"
|
|
126
|
+
"react-resizable-panels": "^2.1.9",
|
|
127
|
+
"recharts": "^2.15.0",
|
|
128
|
+
"sonner": "^2.0.7",
|
|
129
|
+
"tailwind-merge": "^2.5.2",
|
|
130
|
+
"vaul": "^1.1.2"
|
|
112
131
|
}
|
|
113
132
|
}
|