@adarsh_goswami/design 0.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/README.md +237 -0
- package/dist/assets/favicon.svg +9 -0
- package/dist/assets/logo-mark.svg +9 -0
- package/dist/assets/logo.svg +14 -0
- package/dist/index.cjs +1183 -0
- package/dist/index.d.cts +103 -0
- package/dist/index.d.ts +103 -0
- package/dist/index.js +1136 -0
- package/dist/tailwind.config.css +122 -0
- package/dist/theme.css +495 -0
- package/package.json +56 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/* @adarsh_goswami/brand — Tailwind v4 theme */
|
|
2
|
+
/*
|
|
3
|
+
Add to your main CSS file:
|
|
4
|
+
|
|
5
|
+
@import "tailwindcss";
|
|
6
|
+
@import "@adarsh_goswami/brand/dist/theme.css";
|
|
7
|
+
@import "@adarsh_goswami/brand/dist/tailwind.config.css";
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
@theme {
|
|
11
|
+
/* ── COLORS — BACKGROUNDS ── */
|
|
12
|
+
--color-bg-base: var(--bg-base);
|
|
13
|
+
--color-bg-surface: var(--bg-surface);
|
|
14
|
+
--color-bg-raised: var(--bg-raised);
|
|
15
|
+
--color-bg-overlay: var(--bg-overlay);
|
|
16
|
+
--color-bg-hover: var(--bg-hover);
|
|
17
|
+
--color-bg-active: var(--bg-active);
|
|
18
|
+
|
|
19
|
+
/* ── COLORS — BORDERS ── */
|
|
20
|
+
--color-border-subtle: var(--border-subtle);
|
|
21
|
+
--color-border-soft: var(--border-soft);
|
|
22
|
+
--color-border-mid: var(--border-mid);
|
|
23
|
+
--color-border-hover: var(--border-hover);
|
|
24
|
+
--color-border-focus: var(--border-focus);
|
|
25
|
+
|
|
26
|
+
/* ── COLORS — TEXT ── */
|
|
27
|
+
--color-text-primary: var(--text-primary);
|
|
28
|
+
--color-text-secondary: var(--text-secondary);
|
|
29
|
+
--color-text-muted: var(--text-muted);
|
|
30
|
+
--color-text-disabled: var(--text-disabled);
|
|
31
|
+
|
|
32
|
+
/* ── COLORS — ACCENT ── */
|
|
33
|
+
--color-accent: var(--accent);
|
|
34
|
+
--color-accent-bright: var(--accent-bright);
|
|
35
|
+
--color-accent-dim: var(--accent-dim);
|
|
36
|
+
--color-accent-hover: var(--accent-hover);
|
|
37
|
+
--color-accent-active: var(--accent-active);
|
|
38
|
+
--color-accent-contrast: var(--accent-contrast);
|
|
39
|
+
|
|
40
|
+
/* ── COLORS — SEMANTIC ── */
|
|
41
|
+
--color-success: var(--success);
|
|
42
|
+
--color-warning: var(--warning);
|
|
43
|
+
--color-error: var(--error);
|
|
44
|
+
--color-info: var(--info);
|
|
45
|
+
|
|
46
|
+
/* ── TYPOGRAPHY — FONT FAMILIES ── */
|
|
47
|
+
--font-display: var(--brand-font-display);
|
|
48
|
+
--font-body: var(--brand-font-body);
|
|
49
|
+
--font-mono: var(--brand-font-mono);
|
|
50
|
+
|
|
51
|
+
/* ── TYPOGRAPHY — FONT SIZES ── */
|
|
52
|
+
--text-xs: var(--brand-text-xs);
|
|
53
|
+
--text-sm: var(--brand-text-sm);
|
|
54
|
+
--text-base: var(--brand-text-base);
|
|
55
|
+
--text-md: var(--brand-text-md);
|
|
56
|
+
--text-lg: var(--brand-text-lg);
|
|
57
|
+
--text-xl: var(--brand-text-xl);
|
|
58
|
+
--text-2xl: var(--brand-text-2xl);
|
|
59
|
+
--text-3xl: var(--brand-text-3xl);
|
|
60
|
+
--text-4xl: var(--brand-text-4xl);
|
|
61
|
+
--text-5xl: var(--brand-text-5xl);
|
|
62
|
+
|
|
63
|
+
/* ── TYPOGRAPHY — LINE HEIGHTS ── */
|
|
64
|
+
--leading-none: var(--brand-leading-none);
|
|
65
|
+
--leading-tight: var(--brand-leading-tight);
|
|
66
|
+
--leading-snug: var(--brand-leading-snug);
|
|
67
|
+
--leading-normal: var(--brand-leading-normal);
|
|
68
|
+
--leading-relaxed: var(--brand-leading-relaxed);
|
|
69
|
+
--leading-loose: var(--brand-leading-loose);
|
|
70
|
+
|
|
71
|
+
/* ── TYPOGRAPHY — LETTER SPACING ── */
|
|
72
|
+
--tracking-tighter: var(--brand-tracking-tighter);
|
|
73
|
+
--tracking-tight: var(--brand-tracking-tight);
|
|
74
|
+
--tracking-normal: var(--brand-tracking-normal);
|
|
75
|
+
--tracking-wide: var(--brand-tracking-wide);
|
|
76
|
+
--tracking-wider: var(--brand-tracking-wider);
|
|
77
|
+
--tracking-widest: var(--brand-tracking-widest);
|
|
78
|
+
|
|
79
|
+
/* ── LAYOUT ── */
|
|
80
|
+
--container-max: var(--brand-layout-container-max);
|
|
81
|
+
--prose-max: var(--brand-layout-prose-max);
|
|
82
|
+
--prose-sm-max: var(--brand-layout-prose-sm-max);
|
|
83
|
+
--spacing-layout-px: var(--brand-layout-px);
|
|
84
|
+
|
|
85
|
+
/* ── TYPOGRAPHY — FLUID SIZES ── */
|
|
86
|
+
--text-hero: var(--brand-text-hero);
|
|
87
|
+
|
|
88
|
+
/* ── BACKDROP BLUR ── */
|
|
89
|
+
--blur-nav: var(--brand-backdrop-blur-nav);
|
|
90
|
+
|
|
91
|
+
/* ── RADIUS ── */
|
|
92
|
+
--radius-sm: var(--brand-radius-sm);
|
|
93
|
+
--radius-md: var(--brand-radius-md);
|
|
94
|
+
--radius-lg: var(--brand-radius-lg);
|
|
95
|
+
--radius-xl: var(--brand-radius-xl);
|
|
96
|
+
--radius-2xl: var(--brand-radius-2xl);
|
|
97
|
+
--radius-full: var(--brand-radius-full);
|
|
98
|
+
|
|
99
|
+
/* ── SHADOWS ── */
|
|
100
|
+
--shadow-sm: var(--brand-shadow-sm);
|
|
101
|
+
--shadow-md: var(--brand-shadow-md);
|
|
102
|
+
--shadow-lg: var(--brand-shadow-lg);
|
|
103
|
+
--shadow-accent: var(--brand-shadow-accent);
|
|
104
|
+
|
|
105
|
+
/* ── Z-INDEX ── */
|
|
106
|
+
--z-base: var(--brand-z-base);
|
|
107
|
+
--z-dropdown: var(--brand-z-dropdown);
|
|
108
|
+
--z-sticky: var(--brand-z-sticky);
|
|
109
|
+
--z-overlay: var(--brand-z-overlay);
|
|
110
|
+
--z-modal: var(--brand-z-modal);
|
|
111
|
+
--z-toast: var(--brand-z-toast);
|
|
112
|
+
--z-tooltip: var(--brand-z-tooltip);
|
|
113
|
+
|
|
114
|
+
/* ── TRANSITIONS — DURATION ── */
|
|
115
|
+
--duration-fast: var(--brand-duration-fast);
|
|
116
|
+
--duration-base: var(--brand-duration-base);
|
|
117
|
+
--duration-slow: var(--brand-duration-slow);
|
|
118
|
+
|
|
119
|
+
/* ── TRANSITIONS — EASING ── */
|
|
120
|
+
--ease-smooth: var(--brand-ease-out);
|
|
121
|
+
--ease-in-out: var(--brand-ease-in-out);
|
|
122
|
+
}
|
package/dist/theme.css
ADDED
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
/* @adarsh_goswami/brand — design tokens */
|
|
2
|
+
/* Single source of truth for all brand decisions */
|
|
3
|
+
/* Dark theme: default (:root). Light theme: add data-theme="light" to <html> */
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
Required Google Fonts import — add to your project's index.html or global CSS:
|
|
7
|
+
|
|
8
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
9
|
+
<link href="https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=DM+Mono:wght@300;400;500&display=swap" rel="stylesheet">
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
:root {
|
|
13
|
+
/* ── BRAND COLORS ── */
|
|
14
|
+
--bg-base: #0A0A0B;
|
|
15
|
+
--bg-surface: #111113;
|
|
16
|
+
--bg-raised: #18181C;
|
|
17
|
+
--bg-overlay: #1F1F25;
|
|
18
|
+
|
|
19
|
+
--border-subtle: #1E1E24;
|
|
20
|
+
--border-soft: #2A2A34;
|
|
21
|
+
--border-mid: #3A3A48;
|
|
22
|
+
|
|
23
|
+
--text-primary: #F0EEF8;
|
|
24
|
+
--text-secondary: #9997AA;
|
|
25
|
+
--text-muted: #5C5A6E;
|
|
26
|
+
--text-disabled: #3A3848;
|
|
27
|
+
|
|
28
|
+
/* Accent — electric violet-indigo */
|
|
29
|
+
--accent: #7C6EFA;
|
|
30
|
+
--accent-bright: #9B8FFB;
|
|
31
|
+
--accent-dim: #4A3FCC;
|
|
32
|
+
--accent-glow: rgba(124, 110, 250, 0.15);
|
|
33
|
+
--accent-subtle: rgba(124, 110, 250, 0.08);
|
|
34
|
+
--accent-contrast: #ffffff;
|
|
35
|
+
|
|
36
|
+
/* Semantic */
|
|
37
|
+
--success: #3DD68C;
|
|
38
|
+
--warning: #F5A623;
|
|
39
|
+
--error: #F2546A;
|
|
40
|
+
--info: #4AA8FF;
|
|
41
|
+
|
|
42
|
+
--success-bg: rgba(61, 214, 140, 0.08);
|
|
43
|
+
--warning-bg: rgba(245, 166, 35, 0.08);
|
|
44
|
+
--error-bg: rgba(242, 84, 106, 0.08);
|
|
45
|
+
--info-bg: rgba(74, 168, 255, 0.08);
|
|
46
|
+
|
|
47
|
+
--accent-border: rgba(124, 110, 250, 0.2);
|
|
48
|
+
--success-border: rgba(61, 214, 140, 0.2);
|
|
49
|
+
--warning-border: rgba(245, 166, 35, 0.2);
|
|
50
|
+
--error-border: rgba(242, 84, 106, 0.2);
|
|
51
|
+
--info-border: rgba(74, 168, 255, 0.2);
|
|
52
|
+
|
|
53
|
+
/* ── INTERACTIVE STATES ── */
|
|
54
|
+
--bg-hover: #1A1A1F;
|
|
55
|
+
--bg-active: #212127;
|
|
56
|
+
|
|
57
|
+
--accent-hover: #8D80FB;
|
|
58
|
+
--accent-active: #6B5CE8;
|
|
59
|
+
|
|
60
|
+
--border-hover: #454558;
|
|
61
|
+
--border-focus: #7C6EFA;
|
|
62
|
+
|
|
63
|
+
--focus-ring: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--accent);
|
|
64
|
+
|
|
65
|
+
/* ── TYPOGRAPHY — FONT FAMILIES ── */
|
|
66
|
+
/* Prefixed to avoid conflict with Tailwind's --font-* namespace */
|
|
67
|
+
--brand-font-display: 'Syne', sans-serif;
|
|
68
|
+
--brand-font-body: 'DM Sans', sans-serif;
|
|
69
|
+
--brand-font-mono: 'DM Mono', monospace;
|
|
70
|
+
|
|
71
|
+
/* Font weights */
|
|
72
|
+
/* Prefixed to avoid conflict with Tailwind's --font-* namespace */
|
|
73
|
+
--brand-font-light: 300;
|
|
74
|
+
--brand-font-regular: 400;
|
|
75
|
+
--brand-font-medium: 500;
|
|
76
|
+
--brand-font-semibold: 600;
|
|
77
|
+
--brand-font-bold: 700;
|
|
78
|
+
--brand-font-extrabold: 800;
|
|
79
|
+
|
|
80
|
+
/* ── TYPOGRAPHY — TYPE SCALE ── */
|
|
81
|
+
/* Prefixed to avoid conflict with Tailwind's --text-* namespace */
|
|
82
|
+
--brand-text-xs: 0.6875rem; /* 11px */
|
|
83
|
+
--brand-text-sm: 0.8125rem; /* 13px */
|
|
84
|
+
--brand-text-base: 0.9375rem; /* 15px */
|
|
85
|
+
--brand-text-md: 1.0625rem; /* 17px */
|
|
86
|
+
--brand-text-lg: 1.25rem; /* 20px */
|
|
87
|
+
--brand-text-xl: 1.5rem; /* 24px */
|
|
88
|
+
--brand-text-2xl: 2rem; /* 32px */
|
|
89
|
+
--brand-text-3xl: 2.75rem; /* 44px */
|
|
90
|
+
--brand-text-4xl: 3.75rem; /* 60px */
|
|
91
|
+
--brand-text-5xl: 5rem; /* 80px */
|
|
92
|
+
|
|
93
|
+
/* ── TYPOGRAPHY — LINE HEIGHTS ── */
|
|
94
|
+
/* Prefixed to avoid conflict with Tailwind's --leading-* namespace */
|
|
95
|
+
--brand-leading-none: 1;
|
|
96
|
+
--brand-leading-tight: 1.15;
|
|
97
|
+
--brand-leading-snug: 1.3;
|
|
98
|
+
--brand-leading-normal: 1.5;
|
|
99
|
+
--brand-leading-relaxed: 1.6;
|
|
100
|
+
--brand-leading-loose: 1.8;
|
|
101
|
+
|
|
102
|
+
/* ── TYPOGRAPHY — LETTER SPACING ── */
|
|
103
|
+
/* Prefixed to avoid conflict with Tailwind's --tracking-* namespace */
|
|
104
|
+
--brand-tracking-tighter: -0.03em;
|
|
105
|
+
--brand-tracking-tight: -0.015em;
|
|
106
|
+
--brand-tracking-normal: 0em;
|
|
107
|
+
--brand-tracking-wide: 0.06em;
|
|
108
|
+
--brand-tracking-wider: 0.1em;
|
|
109
|
+
--brand-tracking-widest: 0.16em;
|
|
110
|
+
|
|
111
|
+
/* ── SPACING ── */
|
|
112
|
+
/* --sp-* has no conflict with Tailwind's --spacing-* namespace */
|
|
113
|
+
--sp-1: 0.25rem;
|
|
114
|
+
--sp-2: 0.5rem;
|
|
115
|
+
--sp-3: 0.75rem;
|
|
116
|
+
--sp-4: 1rem;
|
|
117
|
+
--sp-5: 1.25rem;
|
|
118
|
+
--sp-6: 1.5rem;
|
|
119
|
+
--sp-8: 2rem;
|
|
120
|
+
--sp-10: 2.5rem;
|
|
121
|
+
--sp-12: 3rem;
|
|
122
|
+
--sp-16: 4rem;
|
|
123
|
+
--sp-20: 5rem;
|
|
124
|
+
--sp-24: 6rem;
|
|
125
|
+
|
|
126
|
+
/* ── LAYOUT ── */
|
|
127
|
+
/* Prefixed to avoid conflict with Tailwind namespaces */
|
|
128
|
+
--brand-layout-container-max: 1100px;
|
|
129
|
+
--brand-layout-px: 1.5rem;
|
|
130
|
+
--brand-layout-prose-max: 520px;
|
|
131
|
+
--brand-layout-prose-sm-max: 440px;
|
|
132
|
+
|
|
133
|
+
/* ── TYPOGRAPHY — FLUID SIZES ── */
|
|
134
|
+
--brand-text-hero: clamp(3rem, 8vw, 5rem);
|
|
135
|
+
|
|
136
|
+
/* ── BACKDROP ── */
|
|
137
|
+
--brand-backdrop-blur-nav: 12px;
|
|
138
|
+
|
|
139
|
+
/* ── RADIUS ── */
|
|
140
|
+
/* Prefixed to avoid conflict with Tailwind's --radius-* namespace */
|
|
141
|
+
--brand-radius-sm: 4px;
|
|
142
|
+
--brand-radius-md: 8px;
|
|
143
|
+
--brand-radius-lg: 12px;
|
|
144
|
+
--brand-radius-xl: 16px;
|
|
145
|
+
--brand-radius-2xl: 24px;
|
|
146
|
+
--brand-radius-full: 9999px;
|
|
147
|
+
|
|
148
|
+
/* ── SHADOWS ── */
|
|
149
|
+
/* Prefixed to avoid conflict with Tailwind's --shadow-* namespace */
|
|
150
|
+
--brand-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
|
|
151
|
+
--brand-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
|
|
152
|
+
--brand-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
|
|
153
|
+
--brand-shadow-accent: 0 0 24px rgba(124, 110, 250, 0.25);
|
|
154
|
+
|
|
155
|
+
/* ── TRANSITIONS ── */
|
|
156
|
+
/* Prefixed to avoid conflict with Tailwind's --ease-* and --duration-* namespaces */
|
|
157
|
+
--brand-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
|
158
|
+
--brand-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
159
|
+
--brand-duration-fast: 120ms;
|
|
160
|
+
--brand-duration-base: 220ms;
|
|
161
|
+
--brand-duration-slow: 400ms;
|
|
162
|
+
|
|
163
|
+
/* ── Z-INDEX ── */
|
|
164
|
+
/* Prefixed to avoid conflict with Tailwind's --z-* namespace */
|
|
165
|
+
--brand-z-base: 0;
|
|
166
|
+
--brand-z-dropdown: 100;
|
|
167
|
+
--brand-z-sticky: 200;
|
|
168
|
+
--brand-z-overlay: 300;
|
|
169
|
+
--brand-z-modal: 400;
|
|
170
|
+
--brand-z-toast: 500;
|
|
171
|
+
--brand-z-tooltip: 600;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* ── LIGHT THEME OVERRIDES ── */
|
|
175
|
+
/*
|
|
176
|
+
Apply data-theme="light" to <html> and use <Theme appearance="light"> in Radix.
|
|
177
|
+
*/
|
|
178
|
+
|
|
179
|
+
[data-theme="light"] {
|
|
180
|
+
/* Backgrounds */
|
|
181
|
+
--bg-base: #FAFAFA;
|
|
182
|
+
--bg-surface: #FFFFFF;
|
|
183
|
+
--bg-raised: #F4F4F6;
|
|
184
|
+
--bg-overlay: #EEEEF2;
|
|
185
|
+
|
|
186
|
+
--border-subtle: #E8E8EF;
|
|
187
|
+
--border-soft: #D8D8E4;
|
|
188
|
+
--border-mid: #C0C0D0;
|
|
189
|
+
|
|
190
|
+
--text-primary: #0D0C14;
|
|
191
|
+
--text-secondary: #4A4860;
|
|
192
|
+
--text-muted: #7A788C;
|
|
193
|
+
--text-disabled: #B0AEC4;
|
|
194
|
+
|
|
195
|
+
/* Accent — slightly deepened for contrast on light backgrounds */
|
|
196
|
+
--accent: #6B5CE8;
|
|
197
|
+
--accent-bright: #7C6EFA;
|
|
198
|
+
--accent-dim: #4A3FCC;
|
|
199
|
+
--accent-glow: rgba(107, 92, 232, 0.12);
|
|
200
|
+
--accent-subtle: rgba(107, 92, 232, 0.06);
|
|
201
|
+
--accent-contrast: #ffffff;
|
|
202
|
+
|
|
203
|
+
/* Semantic — same hues, readable on light */
|
|
204
|
+
--success: #1F9E62;
|
|
205
|
+
--warning: #C07A10;
|
|
206
|
+
--error: #C62B44;
|
|
207
|
+
--info: #1A72CC;
|
|
208
|
+
|
|
209
|
+
--success-bg: rgba(31, 158, 98, 0.08);
|
|
210
|
+
--warning-bg: rgba(192, 122, 16, 0.08);
|
|
211
|
+
--error-bg: rgba(198, 43, 68, 0.08);
|
|
212
|
+
--info-bg: rgba(26, 114, 204, 0.08);
|
|
213
|
+
|
|
214
|
+
--accent-border: rgba(107, 92, 232, 0.20);
|
|
215
|
+
--success-border: rgba(31, 158, 98, 0.20);
|
|
216
|
+
--warning-border: rgba(192, 122, 16, 0.20);
|
|
217
|
+
--error-border: rgba(198, 43, 68, 0.20);
|
|
218
|
+
--info-border: rgba(26, 114, 204, 0.20);
|
|
219
|
+
|
|
220
|
+
/* Interactive states */
|
|
221
|
+
--bg-hover: #EFEFF4;
|
|
222
|
+
--bg-active: #E5E5ED;
|
|
223
|
+
|
|
224
|
+
--accent-hover: #7C6EFA;
|
|
225
|
+
--accent-active: #5D4FD6;
|
|
226
|
+
|
|
227
|
+
--border-hover: #A8A8BE;
|
|
228
|
+
--border-focus: #6B5CE8;
|
|
229
|
+
|
|
230
|
+
--focus-ring: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--accent);
|
|
231
|
+
|
|
232
|
+
/* Shadows — lighter for light surfaces */
|
|
233
|
+
--brand-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
|
|
234
|
+
--brand-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
|
|
235
|
+
--brand-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.14);
|
|
236
|
+
--brand-shadow-accent: 0 0 24px rgba(107, 92, 232, 0.20);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* ── THEME TOGGLE ── */
|
|
240
|
+
/*
|
|
241
|
+
The one opinionated switch in this package — toggles dark/light theme.
|
|
242
|
+
Dark mode: deep space track with stars, moon thumb → glowing orb when switching to light.
|
|
243
|
+
Light mode: clean minimal track, accent fill when active.
|
|
244
|
+
|
|
245
|
+
Architecture note: Radix Switch renders the pill-shaped track on ::before (not on the root
|
|
246
|
+
element). The root element's border-radius resolves to 0px outside of .rt-Skeleton, so all
|
|
247
|
+
visual background/border styling must target ::before to stay pill-shaped.
|
|
248
|
+
*/
|
|
249
|
+
|
|
250
|
+
/* Root — layout only; no visual background/border here */
|
|
251
|
+
.ag-theme-toggle.rt-SwitchRoot {
|
|
252
|
+
position: relative;
|
|
253
|
+
outline: none; /* suppress any browser outline on the <button> root */
|
|
254
|
+
background: none;
|
|
255
|
+
--switch-height: 24px;
|
|
256
|
+
--switch-thumb-inset: 2px;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/* Dark mode — cosmic track on the pill-shaped ::before */
|
|
260
|
+
.ag-theme-toggle.rt-SwitchRoot::before {
|
|
261
|
+
background-color: #07060e;
|
|
262
|
+
background-image: none; /* override Radix gradient */
|
|
263
|
+
box-shadow: inset 0 0 0 1px rgba(124, 110, 250, 0.25);
|
|
264
|
+
transition:
|
|
265
|
+
background-color var(--brand-duration-base) var(--brand-ease-out),
|
|
266
|
+
box-shadow var(--brand-duration-base) var(--brand-ease-out);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/* Star field — border-radius uses the pill variable directly (not inherit, which would be 0) */
|
|
270
|
+
.ag-theme-toggle.rt-SwitchRoot::after {
|
|
271
|
+
content: '';
|
|
272
|
+
position: absolute;
|
|
273
|
+
inset: 0;
|
|
274
|
+
border-radius: var(--switch-border-radius);
|
|
275
|
+
background-image:
|
|
276
|
+
radial-gradient(0.8px 0.8px at 15% 25%, rgba(255,255,255,0.80) 0%, transparent 100%),
|
|
277
|
+
radial-gradient(0.6px 0.6px at 72% 18%, rgba(255,255,255,0.60) 0%, transparent 100%),
|
|
278
|
+
radial-gradient(1px 1px at 55% 72%, rgba(255,255,255,0.50) 0%, transparent 100%),
|
|
279
|
+
radial-gradient(0.7px 0.7px at 83% 55%, rgba(255,255,255,0.70) 0%, transparent 100%),
|
|
280
|
+
radial-gradient(0.5px 0.5px at 28% 78%, rgba(255,255,255,0.40) 0%, transparent 100%),
|
|
281
|
+
radial-gradient(0.6px 0.6px at 63% 38%, rgba(200,190,255,0.50) 0%, transparent 100%),
|
|
282
|
+
radial-gradient(0.4px 0.4px at 42% 88%, rgba(255,255,255,0.35) 0%, transparent 100%);
|
|
283
|
+
transition: opacity var(--brand-duration-slow) var(--brand-ease-out);
|
|
284
|
+
pointer-events: none;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.ag-theme-toggle.rt-SwitchRoot:hover:not([data-disabled])::before {
|
|
288
|
+
box-shadow:
|
|
289
|
+
inset 0 0 0 1px rgba(124, 110, 250, 0.45),
|
|
290
|
+
0 0 12px rgba(124, 110, 250, 0.08);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/* Suppress Radix's focus outline on ::before and replace with our pill-shaped focus ring */
|
|
294
|
+
.ag-theme-toggle.rt-SwitchRoot:focus-visible {
|
|
295
|
+
outline: none;
|
|
296
|
+
}
|
|
297
|
+
.ag-theme-toggle.rt-SwitchRoot:focus-visible::before {
|
|
298
|
+
outline: none;
|
|
299
|
+
box-shadow: inset 0 0 0 1px rgba(124, 110, 250, 0.25), var(--focus-ring);
|
|
300
|
+
}
|
|
301
|
+
.ag-theme-toggle.rt-SwitchRoot[data-state="checked"]:focus-visible::before {
|
|
302
|
+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), var(--focus-ring);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/* Moon thumb */
|
|
306
|
+
.ag-theme-toggle.rt-SwitchRoot .rt-SwitchThumb {
|
|
307
|
+
background: radial-gradient(circle at 36% 32%, #eeeaff 0%, #b8b0f0 38%, #7c74c4 75%, #4e4890 100%);
|
|
308
|
+
box-shadow:
|
|
309
|
+
0 0 0 2px rgba(124, 110, 250, 0.45),
|
|
310
|
+
0 0 14px rgba(124, 110, 250, 0.55),
|
|
311
|
+
0 2px 6px rgba(0, 0, 0, 0.55);
|
|
312
|
+
position: absolute;
|
|
313
|
+
overflow: hidden;
|
|
314
|
+
transition:
|
|
315
|
+
background var(--brand-duration-base) var(--brand-ease-out),
|
|
316
|
+
box-shadow var(--brand-duration-base) var(--brand-ease-out),
|
|
317
|
+
transform var(--brand-duration-base) var(--brand-ease-out);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* Moon craters */
|
|
321
|
+
.ag-theme-toggle.rt-SwitchRoot .rt-SwitchThumb::before {
|
|
322
|
+
content: '';
|
|
323
|
+
position: absolute;
|
|
324
|
+
width: 38%; height: 38%;
|
|
325
|
+
border-radius: 50%;
|
|
326
|
+
background: rgba(60, 50, 120, 0.30);
|
|
327
|
+
top: 18%; left: 20%;
|
|
328
|
+
box-shadow:
|
|
329
|
+
6px -1px 0 1.5px rgba(60, 50, 120, 0.22),
|
|
330
|
+
2px 8px 0 1px rgba(60, 50, 120, 0.18);
|
|
331
|
+
pointer-events: none;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.ag-theme-toggle.rt-SwitchRoot:active:not([data-disabled]) .rt-SwitchThumb {
|
|
335
|
+
transform: scaleX(1.16);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
/* Checked state = light mode active — clean minimal regardless of page theme */
|
|
340
|
+
.ag-theme-toggle.rt-SwitchRoot[data-state="checked"]::before {
|
|
341
|
+
background-color: #e8e7f0;
|
|
342
|
+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
|
|
343
|
+
}
|
|
344
|
+
.ag-theme-toggle.rt-SwitchRoot[data-state="checked"]::after { opacity: 0; }
|
|
345
|
+
.ag-theme-toggle.rt-SwitchRoot[data-state="checked"]:hover:not([data-disabled])::before {
|
|
346
|
+
background-color: #dddce8;
|
|
347
|
+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
|
|
348
|
+
}
|
|
349
|
+
.ag-theme-toggle.rt-SwitchRoot[data-state="checked"] .rt-SwitchThumb {
|
|
350
|
+
background: #ffffff;
|
|
351
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.20), 0 0 0 1px rgba(0, 0, 0, 0.06);
|
|
352
|
+
}
|
|
353
|
+
.ag-theme-toggle.rt-SwitchRoot[data-state="checked"] .rt-SwitchThumb::before { display: none; }
|
|
354
|
+
|
|
355
|
+
/* ── RADIX UI THEMES OVERRIDE ── */
|
|
356
|
+
/*
|
|
357
|
+
Usage in consuming projects — no accentColor/grayColor props needed:
|
|
358
|
+
Dark: <Theme appearance="dark">
|
|
359
|
+
Light: <Theme appearance="light"> (with data-theme="light" on <html>)
|
|
360
|
+
*/
|
|
361
|
+
|
|
362
|
+
/* Define accent and gray scales directly — Radix reads these without needing named color props */
|
|
363
|
+
.radix-themes {
|
|
364
|
+
/* ── Accent scale — AG brand violet-indigo ── */
|
|
365
|
+
--accent-1: #0d0b1a;
|
|
366
|
+
--accent-2: #13112b;
|
|
367
|
+
--accent-3: #1e1a42;
|
|
368
|
+
--accent-4: #271f56;
|
|
369
|
+
--accent-5: #312869;
|
|
370
|
+
--accent-6: #3c3378;
|
|
371
|
+
--accent-7: #4e4490;
|
|
372
|
+
--accent-8: #6055b8;
|
|
373
|
+
--accent-9: #7C6EFA; /* --accent */
|
|
374
|
+
--accent-10: #8D80FB; /* --accent-hover */
|
|
375
|
+
--accent-11: #9B8FFB; /* --accent-bright */
|
|
376
|
+
--accent-12: #d4d0ff;
|
|
377
|
+
|
|
378
|
+
--accent-a1: rgba(124, 110, 250, 0.04);
|
|
379
|
+
--accent-a2: rgba(124, 110, 250, 0.07);
|
|
380
|
+
--accent-a3: rgba(124, 110, 250, 0.12);
|
|
381
|
+
--accent-a4: rgba(124, 110, 250, 0.18);
|
|
382
|
+
--accent-a5: rgba(124, 110, 250, 0.25);
|
|
383
|
+
--accent-a6: rgba(124, 110, 250, 0.32);
|
|
384
|
+
--accent-a7: rgba(124, 110, 250, 0.43);
|
|
385
|
+
--accent-a8: rgba(124, 110, 250, 0.60);
|
|
386
|
+
--accent-a9: rgba(124, 110, 250, 0.80);
|
|
387
|
+
--accent-a10: rgba(141, 128, 251, 0.85);
|
|
388
|
+
--accent-a11: rgba(155, 143, 251, 0.92);
|
|
389
|
+
--accent-a12: rgba(212, 208, 255, 0.98);
|
|
390
|
+
|
|
391
|
+
--accent-contrast: #ffffff;
|
|
392
|
+
--accent-surface: rgba(124, 110, 250, 0.08);
|
|
393
|
+
--accent-indicator: #7C6EFA;
|
|
394
|
+
--accent-track: #7C6EFA;
|
|
395
|
+
|
|
396
|
+
/* ── Gray scale — AG dark palette ── */
|
|
397
|
+
--gray-1: #0A0A0B; /* --bg-base */
|
|
398
|
+
--gray-2: #111113; /* --bg-surface */
|
|
399
|
+
--gray-3: #18181C; /* --bg-raised */
|
|
400
|
+
--gray-4: #1F1F25; /* --bg-overlay */
|
|
401
|
+
--gray-5: #1A1A1F; /* --bg-hover */
|
|
402
|
+
--gray-6: #1E1E24; /* --border-subtle */
|
|
403
|
+
--gray-7: #2A2A34; /* --border-soft */
|
|
404
|
+
--gray-8: #3A3A48; /* --border-mid */
|
|
405
|
+
--gray-9: #3A3848; /* --text-disabled */
|
|
406
|
+
--gray-10: #5C5A6E; /* --text-muted */
|
|
407
|
+
--gray-11: #9997AA; /* --text-secondary */
|
|
408
|
+
--gray-12: #F0EEF8; /* --text-primary */
|
|
409
|
+
|
|
410
|
+
--gray-a1: rgba(255, 255, 255, 0.00);
|
|
411
|
+
--gray-a2: rgba(255, 255, 255, 0.04);
|
|
412
|
+
--gray-a3: rgba(255, 255, 255, 0.07);
|
|
413
|
+
--gray-a4: rgba(255, 255, 255, 0.10);
|
|
414
|
+
--gray-a5: rgba(255, 255, 255, 0.06);
|
|
415
|
+
--gray-a6: rgba(255, 255, 255, 0.07);
|
|
416
|
+
--gray-a7: rgba(255, 255, 255, 0.11);
|
|
417
|
+
--gray-a8: rgba(255, 255, 255, 0.18);
|
|
418
|
+
--gray-a9: rgba(255, 255, 255, 0.17);
|
|
419
|
+
--gray-a10: rgba(255, 255, 255, 0.27);
|
|
420
|
+
--gray-a11: rgba(255, 255, 255, 0.52);
|
|
421
|
+
--gray-a12: rgba(240, 238, 248, 0.97);
|
|
422
|
+
|
|
423
|
+
/* ── Font families ── */
|
|
424
|
+
--default-font-family: var(--brand-font-body);
|
|
425
|
+
--heading-font-family: var(--brand-font-display);
|
|
426
|
+
--code-font-family: var(--brand-font-mono);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/* ── RADIX UI THEMES — LIGHT OVERRIDE ── */
|
|
430
|
+
/* Applied when <html data-theme="light"> + <Theme appearance="light"> */
|
|
431
|
+
[data-theme="light"] .radix-themes {
|
|
432
|
+
/* ── Accent scale — AG brand violet-indigo on light ── */
|
|
433
|
+
--accent-1: #faf9ff;
|
|
434
|
+
--accent-2: #f3f1ff;
|
|
435
|
+
--accent-3: #e8e4ff;
|
|
436
|
+
--accent-4: #d8d2ff;
|
|
437
|
+
--accent-5: #c8c0ff;
|
|
438
|
+
--accent-6: #b3a8ff;
|
|
439
|
+
--accent-7: #9b8ffb;
|
|
440
|
+
--accent-8: #7c6efa;
|
|
441
|
+
--accent-9: #6B5CE8; /* --accent */
|
|
442
|
+
--accent-10: #5D4FD6; /* --accent-hover */
|
|
443
|
+
--accent-11: #4A3FCC; /* --accent-dim */
|
|
444
|
+
--accent-12: #1a1060;
|
|
445
|
+
|
|
446
|
+
--accent-a1: rgba(107, 92, 232, 0.02);
|
|
447
|
+
--accent-a2: rgba(107, 92, 232, 0.05);
|
|
448
|
+
--accent-a3: rgba(107, 92, 232, 0.10);
|
|
449
|
+
--accent-a4: rgba(107, 92, 232, 0.16);
|
|
450
|
+
--accent-a5: rgba(107, 92, 232, 0.22);
|
|
451
|
+
--accent-a6: rgba(107, 92, 232, 0.30);
|
|
452
|
+
--accent-a7: rgba(107, 92, 232, 0.42);
|
|
453
|
+
--accent-a8: rgba(107, 92, 232, 0.60);
|
|
454
|
+
--accent-a9: rgba(107, 92, 232, 0.85);
|
|
455
|
+
--accent-a10: rgba(93, 79, 214, 0.88);
|
|
456
|
+
--accent-a11: rgba(74, 63, 204, 0.92);
|
|
457
|
+
--accent-a12: rgba(26, 16, 96, 0.97);
|
|
458
|
+
|
|
459
|
+
--accent-contrast: #ffffff;
|
|
460
|
+
--accent-surface: rgba(107, 92, 232, 0.06);
|
|
461
|
+
--accent-indicator: #6B5CE8;
|
|
462
|
+
--accent-track: #6B5CE8;
|
|
463
|
+
|
|
464
|
+
/* ── Gray scale — AG light palette ── */
|
|
465
|
+
--gray-1: #FAFAFA; /* --bg-base */
|
|
466
|
+
--gray-2: #FFFFFF; /* --bg-surface */
|
|
467
|
+
--gray-3: #F4F4F6; /* --bg-raised */
|
|
468
|
+
--gray-4: #EEEEF2; /* --bg-overlay */
|
|
469
|
+
--gray-5: #EFEFF4; /* --bg-hover */
|
|
470
|
+
--gray-6: #E8E8EF; /* --border-subtle */
|
|
471
|
+
--gray-7: #D8D8E4; /* --border-soft */
|
|
472
|
+
--gray-8: #C0C0D0; /* --border-mid */
|
|
473
|
+
--gray-9: #B0AEC4; /* --text-disabled */
|
|
474
|
+
--gray-10: #7A788C; /* --text-muted */
|
|
475
|
+
--gray-11: #4A4860; /* --text-secondary */
|
|
476
|
+
--gray-12: #0D0C14; /* --text-primary */
|
|
477
|
+
|
|
478
|
+
--gray-a1: rgba(0, 0, 0, 0.00);
|
|
479
|
+
--gray-a2: rgba(0, 0, 0, 0.00);
|
|
480
|
+
--gray-a3: rgba(0, 0, 0, 0.04);
|
|
481
|
+
--gray-a4: rgba(0, 0, 0, 0.07);
|
|
482
|
+
--gray-a5: rgba(0, 0, 0, 0.06);
|
|
483
|
+
--gray-a6: rgba(0, 0, 0, 0.09);
|
|
484
|
+
--gray-a7: rgba(0, 0, 0, 0.15);
|
|
485
|
+
--gray-a8: rgba(0, 0, 0, 0.25);
|
|
486
|
+
--gray-a9: rgba(0, 0, 0, 0.31);
|
|
487
|
+
--gray-a10: rgba(0, 0, 0, 0.53);
|
|
488
|
+
--gray-a11: rgba(0, 0, 0, 0.72);
|
|
489
|
+
--gray-a12: rgba(0, 0, 0, 0.95);
|
|
490
|
+
|
|
491
|
+
/* ── Font families ── */
|
|
492
|
+
--default-font-family: var(--brand-font-body);
|
|
493
|
+
--heading-font-family: var(--brand-font-display);
|
|
494
|
+
--code-font-family: var(--brand-font-mono);
|
|
495
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@adarsh_goswami/design",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Single source of truth for Adarsh Goswami's personal design system — pre-themed Radix UI components, CSS tokens, and Tailwind preset.",
|
|
6
|
+
"author": "Adarsh Goswami",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.cjs"
|
|
13
|
+
},
|
|
14
|
+
"./dist/theme.css": "./dist/theme.css",
|
|
15
|
+
"./dist/tailwind.config.css": "./dist/tailwind.config.css",
|
|
16
|
+
"./dist/assets/*": "./dist/assets/*"
|
|
17
|
+
},
|
|
18
|
+
"main": "./dist/index.cjs",
|
|
19
|
+
"module": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsup",
|
|
26
|
+
"dev": "tsup --watch",
|
|
27
|
+
"demo": "vite",
|
|
28
|
+
"typecheck": "tsc --noEmit"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"@radix-ui/themes": ">=3.0.0",
|
|
32
|
+
"react": ">=18.0.0",
|
|
33
|
+
"react-dom": ">=18.0.0",
|
|
34
|
+
"tailwindcss": "^4.2.2"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@radix-ui/themes": "^3.3.0",
|
|
38
|
+
"@types/bun": "latest",
|
|
39
|
+
"@types/react": "^19.2.14",
|
|
40
|
+
"@types/react-dom": "^19.2.3",
|
|
41
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
42
|
+
"react": "^19.2.4",
|
|
43
|
+
"react-dom": "^19.2.4",
|
|
44
|
+
"tsup": "^8.5.1",
|
|
45
|
+
"typescript": "^5.9.3",
|
|
46
|
+
"vite": "^8.0.8"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=18"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"react-markdown": "^10.1.0",
|
|
53
|
+
"rehype-highlight": "^7.0.2",
|
|
54
|
+
"remark-gfm": "^4.0.1"
|
|
55
|
+
}
|
|
56
|
+
}
|