@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
package/dist/index.js
ADDED
|
@@ -0,0 +1,1136 @@
|
|
|
1
|
+
// src/components/DocsLayout/DocsLayout.tsx
|
|
2
|
+
import { Badge as Badge2, Box as Box3, Flex as Flex3, Heading as Heading3, Separator as Separator3, Text as Text3, ScrollArea as ScrollArea2 } from "@radix-ui/themes";
|
|
3
|
+
|
|
4
|
+
// src/components/DocsLayout/NavSidebar.tsx
|
|
5
|
+
import { Badge, Box, Flex, Heading, ScrollArea, Separator, Text } from "@radix-ui/themes";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
function NavStatusBadge({ status }) {
|
|
8
|
+
if (status === "final") return null;
|
|
9
|
+
return /* @__PURE__ */ jsx(Badge, { size: "1", variant: "soft", color: status === "draft" ? "yellow" : "gray", children: status });
|
|
10
|
+
}
|
|
11
|
+
function NavLeaf({
|
|
12
|
+
id,
|
|
13
|
+
label,
|
|
14
|
+
slug,
|
|
15
|
+
status,
|
|
16
|
+
activeSlug,
|
|
17
|
+
onSlugChange
|
|
18
|
+
}) {
|
|
19
|
+
const isActive = slug === activeSlug;
|
|
20
|
+
const isDeprecated = status === "deprecated";
|
|
21
|
+
return /* @__PURE__ */ jsx(Box, { mb: "1", children: /* @__PURE__ */ jsx(
|
|
22
|
+
"button",
|
|
23
|
+
{
|
|
24
|
+
type: "button",
|
|
25
|
+
onClick: () => onSlugChange(slug),
|
|
26
|
+
style: { width: "100%", textAlign: "left", background: "none", border: "none", cursor: "pointer", padding: 0 },
|
|
27
|
+
children: /* @__PURE__ */ jsxs(
|
|
28
|
+
Flex,
|
|
29
|
+
{
|
|
30
|
+
align: "center",
|
|
31
|
+
justify: "between",
|
|
32
|
+
gap: "2",
|
|
33
|
+
px: "2",
|
|
34
|
+
py: "1",
|
|
35
|
+
className: [
|
|
36
|
+
"rounded-md transition-colors",
|
|
37
|
+
isActive ? "bg-[var(--accent-subtle)] text-accent" : "text-text-secondary hover:bg-bg-hover hover:text-text-primary"
|
|
38
|
+
].join(" "),
|
|
39
|
+
style: { minHeight: "30px" },
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ jsx(
|
|
42
|
+
Text,
|
|
43
|
+
{
|
|
44
|
+
as: "span",
|
|
45
|
+
size: "2",
|
|
46
|
+
weight: isActive ? "medium" : "regular",
|
|
47
|
+
style: {
|
|
48
|
+
fontFamily: "var(--brand-font-body)",
|
|
49
|
+
textDecoration: isDeprecated ? "line-through" : void 0
|
|
50
|
+
},
|
|
51
|
+
children: label
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
status && /* @__PURE__ */ jsx(NavStatusBadge, { status })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
) }, id);
|
|
60
|
+
}
|
|
61
|
+
function NavItemRow({
|
|
62
|
+
item,
|
|
63
|
+
activeSlug,
|
|
64
|
+
onSlugChange
|
|
65
|
+
}) {
|
|
66
|
+
if (item.slug) {
|
|
67
|
+
return /* @__PURE__ */ jsx(
|
|
68
|
+
NavLeaf,
|
|
69
|
+
{
|
|
70
|
+
id: item.id,
|
|
71
|
+
label: item.label,
|
|
72
|
+
slug: item.slug,
|
|
73
|
+
status: item.status,
|
|
74
|
+
activeSlug,
|
|
75
|
+
onSlugChange
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
return /* @__PURE__ */ jsxs(Box, { mb: "1", children: [
|
|
80
|
+
/* @__PURE__ */ jsxs(Flex, { align: "center", justify: "between", gap: "2", px: "2", py: "1", children: [
|
|
81
|
+
/* @__PURE__ */ jsx(
|
|
82
|
+
Text,
|
|
83
|
+
{
|
|
84
|
+
as: "p",
|
|
85
|
+
size: "2",
|
|
86
|
+
weight: "medium",
|
|
87
|
+
style: {
|
|
88
|
+
fontFamily: "var(--brand-font-body)",
|
|
89
|
+
color: "var(--text-secondary)",
|
|
90
|
+
textDecoration: item.status === "deprecated" ? "line-through" : void 0
|
|
91
|
+
},
|
|
92
|
+
children: item.label
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
item.status && /* @__PURE__ */ jsx(NavStatusBadge, { status: item.status })
|
|
96
|
+
] }),
|
|
97
|
+
item.children && item.children.length > 0 && /* @__PURE__ */ jsx(Box, { pl: "3", children: item.children.map((child) => /* @__PURE__ */ jsx(
|
|
98
|
+
NavLeaf,
|
|
99
|
+
{
|
|
100
|
+
id: child.id,
|
|
101
|
+
label: child.label,
|
|
102
|
+
slug: child.slug,
|
|
103
|
+
status: child.status,
|
|
104
|
+
activeSlug,
|
|
105
|
+
onSlugChange
|
|
106
|
+
},
|
|
107
|
+
child.id
|
|
108
|
+
)) })
|
|
109
|
+
] });
|
|
110
|
+
}
|
|
111
|
+
function NavSidebar({ meta, navigation, activeSlug, onSlugChange }) {
|
|
112
|
+
return /* @__PURE__ */ jsxs(
|
|
113
|
+
Box,
|
|
114
|
+
{
|
|
115
|
+
style: {
|
|
116
|
+
width: "256px",
|
|
117
|
+
flexShrink: 0,
|
|
118
|
+
height: "100%",
|
|
119
|
+
borderRight: "1px solid var(--border-soft)",
|
|
120
|
+
backgroundColor: "var(--bg-surface)",
|
|
121
|
+
display: "flex",
|
|
122
|
+
flexDirection: "column"
|
|
123
|
+
},
|
|
124
|
+
children: [
|
|
125
|
+
/* @__PURE__ */ jsx(
|
|
126
|
+
Box,
|
|
127
|
+
{
|
|
128
|
+
px: "4",
|
|
129
|
+
py: "3",
|
|
130
|
+
style: { borderBottom: "1px solid var(--border-subtle)", flexShrink: 0 },
|
|
131
|
+
children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "2", children: [
|
|
132
|
+
meta.logoUrl && /* @__PURE__ */ jsx("img", { src: meta.logoUrl, alt: meta.title, style: { height: "20px", width: "auto" } }),
|
|
133
|
+
/* @__PURE__ */ jsx(
|
|
134
|
+
Heading,
|
|
135
|
+
{
|
|
136
|
+
as: "h2",
|
|
137
|
+
size: "3",
|
|
138
|
+
style: { fontFamily: "var(--brand-font-display)", color: "var(--text-primary)" },
|
|
139
|
+
children: meta.title
|
|
140
|
+
}
|
|
141
|
+
),
|
|
142
|
+
meta.version && /* @__PURE__ */ jsx(Badge, { size: "1", variant: "soft", color: "violet", children: meta.version })
|
|
143
|
+
] })
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ jsx(ScrollArea, { scrollbars: "vertical", style: { flex: 1 }, children: /* @__PURE__ */ jsx(Box, { p: "4", children: navigation.map((section, sectionIndex) => /* @__PURE__ */ jsxs(Box, { mb: "4", children: [
|
|
147
|
+
/* @__PURE__ */ jsx(
|
|
148
|
+
Text,
|
|
149
|
+
{
|
|
150
|
+
as: "p",
|
|
151
|
+
size: "1",
|
|
152
|
+
weight: "medium",
|
|
153
|
+
mb: "2",
|
|
154
|
+
style: {
|
|
155
|
+
fontFamily: "var(--brand-font-body)",
|
|
156
|
+
color: "var(--text-muted)",
|
|
157
|
+
textTransform: "uppercase",
|
|
158
|
+
letterSpacing: "var(--brand-tracking-wider)",
|
|
159
|
+
marginTop: sectionIndex === 0 ? 0 : void 0
|
|
160
|
+
},
|
|
161
|
+
children: section.label
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
/* @__PURE__ */ jsx(Separator, { size: "4", mb: "2" }),
|
|
165
|
+
section.items.map((item) => /* @__PURE__ */ jsx(
|
|
166
|
+
NavItemRow,
|
|
167
|
+
{
|
|
168
|
+
item,
|
|
169
|
+
activeSlug,
|
|
170
|
+
onSlugChange
|
|
171
|
+
},
|
|
172
|
+
item.id
|
|
173
|
+
))
|
|
174
|
+
] }, section.id)) }) })
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// src/components/DocsLayout/MarkdownContent.tsx
|
|
181
|
+
import ReactMarkdown from "react-markdown";
|
|
182
|
+
import remarkGfm from "remark-gfm";
|
|
183
|
+
import rehypeHighlight from "rehype-highlight";
|
|
184
|
+
import { Box as Box2, Flex as Flex2, Heading as Heading2, Separator as Separator2, Text as Text2 } from "@radix-ui/themes";
|
|
185
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
186
|
+
var markdownComponents = {
|
|
187
|
+
h1: ({ children }) => /* @__PURE__ */ jsx2(
|
|
188
|
+
Heading2,
|
|
189
|
+
{
|
|
190
|
+
as: "h1",
|
|
191
|
+
size: "7",
|
|
192
|
+
mb: "4",
|
|
193
|
+
style: { fontFamily: "var(--brand-font-display)", color: "var(--text-primary)" },
|
|
194
|
+
children
|
|
195
|
+
}
|
|
196
|
+
),
|
|
197
|
+
h2: ({ children }) => /* @__PURE__ */ jsx2(
|
|
198
|
+
Heading2,
|
|
199
|
+
{
|
|
200
|
+
as: "h2",
|
|
201
|
+
size: "5",
|
|
202
|
+
mb: "3",
|
|
203
|
+
mt: "6",
|
|
204
|
+
style: { fontFamily: "var(--brand-font-display)", color: "var(--text-primary)" },
|
|
205
|
+
children
|
|
206
|
+
}
|
|
207
|
+
),
|
|
208
|
+
h3: ({ children }) => /* @__PURE__ */ jsx2(
|
|
209
|
+
Heading2,
|
|
210
|
+
{
|
|
211
|
+
as: "h3",
|
|
212
|
+
size: "4",
|
|
213
|
+
mb: "2",
|
|
214
|
+
mt: "5",
|
|
215
|
+
style: { fontFamily: "var(--brand-font-display)", color: "var(--text-secondary)" },
|
|
216
|
+
children
|
|
217
|
+
}
|
|
218
|
+
),
|
|
219
|
+
p: ({ children }) => /* @__PURE__ */ jsx2(
|
|
220
|
+
Text2,
|
|
221
|
+
{
|
|
222
|
+
as: "p",
|
|
223
|
+
size: "3",
|
|
224
|
+
mb: "4",
|
|
225
|
+
style: {
|
|
226
|
+
fontFamily: "var(--brand-font-body)",
|
|
227
|
+
color: "var(--text-secondary)",
|
|
228
|
+
lineHeight: "var(--brand-leading-relaxed)",
|
|
229
|
+
display: "block"
|
|
230
|
+
},
|
|
231
|
+
children
|
|
232
|
+
}
|
|
233
|
+
),
|
|
234
|
+
a: ({ href, children }) => /* @__PURE__ */ jsx2(
|
|
235
|
+
"a",
|
|
236
|
+
{
|
|
237
|
+
href: href ?? "#",
|
|
238
|
+
style: { color: "var(--accent)", textDecoration: "underline" },
|
|
239
|
+
children
|
|
240
|
+
}
|
|
241
|
+
),
|
|
242
|
+
code: ({ className, children }) => {
|
|
243
|
+
const isBlock = className?.startsWith("language-");
|
|
244
|
+
if (isBlock) {
|
|
245
|
+
return /* @__PURE__ */ jsx2(
|
|
246
|
+
Box2,
|
|
247
|
+
{
|
|
248
|
+
mb: "4",
|
|
249
|
+
style: {
|
|
250
|
+
borderRadius: "var(--brand-radius-lg)",
|
|
251
|
+
border: "1px solid var(--border-soft)",
|
|
252
|
+
backgroundColor: "var(--bg-raised)",
|
|
253
|
+
overflowX: "auto"
|
|
254
|
+
},
|
|
255
|
+
children: /* @__PURE__ */ jsx2(
|
|
256
|
+
"code",
|
|
257
|
+
{
|
|
258
|
+
className: className ?? "",
|
|
259
|
+
style: {
|
|
260
|
+
display: "block",
|
|
261
|
+
padding: "var(--sp-4)",
|
|
262
|
+
fontSize: "var(--brand-text-sm)",
|
|
263
|
+
fontFamily: "var(--brand-font-mono)",
|
|
264
|
+
color: "var(--text-primary)"
|
|
265
|
+
},
|
|
266
|
+
children
|
|
267
|
+
}
|
|
268
|
+
)
|
|
269
|
+
}
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
return /* @__PURE__ */ jsx2(
|
|
273
|
+
"code",
|
|
274
|
+
{
|
|
275
|
+
style: {
|
|
276
|
+
backgroundColor: "var(--bg-raised)",
|
|
277
|
+
color: "var(--accent-bright)",
|
|
278
|
+
borderRadius: "var(--brand-radius-sm)",
|
|
279
|
+
padding: "2px 6px",
|
|
280
|
+
fontSize: "var(--brand-text-sm)",
|
|
281
|
+
fontFamily: "var(--brand-font-mono)"
|
|
282
|
+
},
|
|
283
|
+
children
|
|
284
|
+
}
|
|
285
|
+
);
|
|
286
|
+
},
|
|
287
|
+
ul: ({ children }) => /* @__PURE__ */ jsx2(
|
|
288
|
+
"ul",
|
|
289
|
+
{
|
|
290
|
+
style: {
|
|
291
|
+
marginBottom: "var(--sp-4)",
|
|
292
|
+
paddingLeft: "var(--sp-4)",
|
|
293
|
+
listStyleType: "disc",
|
|
294
|
+
color: "var(--text-secondary)",
|
|
295
|
+
fontFamily: "var(--brand-font-body)"
|
|
296
|
+
},
|
|
297
|
+
children
|
|
298
|
+
}
|
|
299
|
+
),
|
|
300
|
+
ol: ({ children }) => /* @__PURE__ */ jsx2(
|
|
301
|
+
"ol",
|
|
302
|
+
{
|
|
303
|
+
style: {
|
|
304
|
+
marginBottom: "var(--sp-4)",
|
|
305
|
+
paddingLeft: "var(--sp-4)",
|
|
306
|
+
listStyleType: "decimal",
|
|
307
|
+
color: "var(--text-secondary)",
|
|
308
|
+
fontFamily: "var(--brand-font-body)"
|
|
309
|
+
},
|
|
310
|
+
children
|
|
311
|
+
}
|
|
312
|
+
),
|
|
313
|
+
li: ({ children }) => /* @__PURE__ */ jsx2(
|
|
314
|
+
Text2,
|
|
315
|
+
{
|
|
316
|
+
as: "p",
|
|
317
|
+
size: "3",
|
|
318
|
+
mb: "1",
|
|
319
|
+
style: {
|
|
320
|
+
fontFamily: "var(--brand-font-body)",
|
|
321
|
+
color: "var(--text-secondary)",
|
|
322
|
+
display: "list-item"
|
|
323
|
+
},
|
|
324
|
+
children
|
|
325
|
+
}
|
|
326
|
+
),
|
|
327
|
+
blockquote: ({ children }) => /* @__PURE__ */ jsx2(
|
|
328
|
+
Box2,
|
|
329
|
+
{
|
|
330
|
+
mb: "4",
|
|
331
|
+
pl: "4",
|
|
332
|
+
py: "2",
|
|
333
|
+
style: {
|
|
334
|
+
borderLeft: "2px solid var(--accent)",
|
|
335
|
+
backgroundColor: "var(--accent-subtle)",
|
|
336
|
+
borderRadius: "0 var(--brand-radius-md) var(--brand-radius-md) 0"
|
|
337
|
+
},
|
|
338
|
+
children
|
|
339
|
+
}
|
|
340
|
+
),
|
|
341
|
+
table: ({ children }) => /* @__PURE__ */ jsx2(Box2, { mb: "4", style: { overflowX: "auto" }, children: /* @__PURE__ */ jsx2(
|
|
342
|
+
"table",
|
|
343
|
+
{
|
|
344
|
+
style: {
|
|
345
|
+
width: "100%",
|
|
346
|
+
borderCollapse: "collapse",
|
|
347
|
+
fontSize: "var(--brand-text-sm)",
|
|
348
|
+
fontFamily: "var(--brand-font-body)"
|
|
349
|
+
},
|
|
350
|
+
children
|
|
351
|
+
}
|
|
352
|
+
) }),
|
|
353
|
+
th: ({ children }) => /* @__PURE__ */ jsx2(
|
|
354
|
+
"th",
|
|
355
|
+
{
|
|
356
|
+
style: {
|
|
357
|
+
textAlign: "left",
|
|
358
|
+
padding: "8px 12px",
|
|
359
|
+
borderBottom: "1px solid var(--border-mid)",
|
|
360
|
+
color: "var(--text-primary)",
|
|
361
|
+
fontWeight: 500
|
|
362
|
+
},
|
|
363
|
+
children
|
|
364
|
+
}
|
|
365
|
+
),
|
|
366
|
+
td: ({ children }) => /* @__PURE__ */ jsx2(
|
|
367
|
+
"td",
|
|
368
|
+
{
|
|
369
|
+
style: {
|
|
370
|
+
padding: "8px 12px",
|
|
371
|
+
borderBottom: "1px solid var(--border-subtle)",
|
|
372
|
+
color: "var(--text-secondary)"
|
|
373
|
+
},
|
|
374
|
+
children
|
|
375
|
+
}
|
|
376
|
+
),
|
|
377
|
+
hr: () => /* @__PURE__ */ jsx2(Flex2, { my: "6", children: /* @__PURE__ */ jsx2(Separator2, { size: "4" }) })
|
|
378
|
+
};
|
|
379
|
+
function MarkdownContent({ content }) {
|
|
380
|
+
return /* @__PURE__ */ jsx2(
|
|
381
|
+
ReactMarkdown,
|
|
382
|
+
{
|
|
383
|
+
remarkPlugins: [remarkGfm],
|
|
384
|
+
rehypePlugins: [rehypeHighlight],
|
|
385
|
+
components: markdownComponents,
|
|
386
|
+
children: content
|
|
387
|
+
}
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// src/components/DocsLayout/DocsLayout.tsx
|
|
392
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
393
|
+
var PAGE_TYPE_COLORS = {
|
|
394
|
+
prd: "violet",
|
|
395
|
+
adr: "blue",
|
|
396
|
+
guide: "green",
|
|
397
|
+
reference: "gray"
|
|
398
|
+
};
|
|
399
|
+
function PageTypeBadge({ type }) {
|
|
400
|
+
return /* @__PURE__ */ jsx3(Badge2, { size: "1", variant: "soft", color: PAGE_TYPE_COLORS[type], children: type.toUpperCase() });
|
|
401
|
+
}
|
|
402
|
+
function DocsLayout({ data, activeSlug, onSlugChange }) {
|
|
403
|
+
const { meta, navigation, pages } = data;
|
|
404
|
+
const page = pages[activeSlug];
|
|
405
|
+
return /* @__PURE__ */ jsx3(Flex3, { direction: "column", style: { height: "100vh", backgroundColor: "var(--bg-base)" }, children: /* @__PURE__ */ jsxs2(Flex3, { direction: "row", style: { flex: 1, overflow: "hidden" }, children: [
|
|
406
|
+
/* @__PURE__ */ jsx3(
|
|
407
|
+
NavSidebar,
|
|
408
|
+
{
|
|
409
|
+
meta,
|
|
410
|
+
navigation,
|
|
411
|
+
activeSlug,
|
|
412
|
+
onSlugChange
|
|
413
|
+
}
|
|
414
|
+
),
|
|
415
|
+
/* @__PURE__ */ jsx3(Box3, { style: { flex: 1, overflow: "hidden", backgroundColor: "var(--bg-base)" }, children: /* @__PURE__ */ jsx3(ScrollArea2, { scrollbars: "vertical", style: { height: "100%" }, children: /* @__PURE__ */ jsx3(Box3, { p: "8", style: { maxWidth: "768px", margin: "0 auto" }, children: !page ? /* @__PURE__ */ jsx3(Flex3, { align: "center", justify: "center", style: { height: "300px" }, children: /* @__PURE__ */ jsx3(Text3, { size: "3", style: { color: "var(--text-muted)" }, children: "Page not found" }) }) : /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
416
|
+
/* @__PURE__ */ jsxs2(Flex3, { align: "center", gap: "3", mb: "3", children: [
|
|
417
|
+
page.type && /* @__PURE__ */ jsx3(PageTypeBadge, { type: page.type }),
|
|
418
|
+
page.lastUpdated && /* @__PURE__ */ jsxs2(
|
|
419
|
+
Text3,
|
|
420
|
+
{
|
|
421
|
+
size: "1",
|
|
422
|
+
style: { color: "var(--text-muted)", fontFamily: "var(--brand-font-body)" },
|
|
423
|
+
children: [
|
|
424
|
+
"Updated ",
|
|
425
|
+
page.lastUpdated
|
|
426
|
+
]
|
|
427
|
+
}
|
|
428
|
+
)
|
|
429
|
+
] }),
|
|
430
|
+
/* @__PURE__ */ jsx3(
|
|
431
|
+
Heading3,
|
|
432
|
+
{
|
|
433
|
+
as: "h1",
|
|
434
|
+
size: "8",
|
|
435
|
+
mb: "4",
|
|
436
|
+
style: {
|
|
437
|
+
fontFamily: "var(--brand-font-display)",
|
|
438
|
+
color: "var(--text-primary)"
|
|
439
|
+
},
|
|
440
|
+
children: page.title
|
|
441
|
+
}
|
|
442
|
+
),
|
|
443
|
+
/* @__PURE__ */ jsx3(Separator3, { size: "4", mb: "6" }),
|
|
444
|
+
/* @__PURE__ */ jsx3(MarkdownContent, { content: page.content })
|
|
445
|
+
] }) }) }) })
|
|
446
|
+
] }) });
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
// src/components/Logo/Logo.tsx
|
|
450
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
451
|
+
function AgMark({ size = 64, variant = "dark" }) {
|
|
452
|
+
const aPrimary = variant === "light" ? "#4A3FCC" : variant === "glow" ? "#9B8FFB" : "#7C6EFA";
|
|
453
|
+
const gPrimary = variant === "light" ? "#0A0A0B" : "#F0EEF8";
|
|
454
|
+
const bgFill = variant === "light" ? "#F0EEF8" : variant === "glow" ? "url(#agGlowGrad)" : "#111113";
|
|
455
|
+
return /* @__PURE__ */ jsxs3("svg", { viewBox: "0 0 64 64", width: size, height: size, fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
456
|
+
variant === "glow" && /* @__PURE__ */ jsx4("defs", { children: /* @__PURE__ */ jsxs3("radialGradient", { id: "agGlowGrad", cx: "30%", cy: "30%", r: "80%", children: [
|
|
457
|
+
/* @__PURE__ */ jsx4("stop", { offset: "0%", stopColor: "#1A1630" }),
|
|
458
|
+
/* @__PURE__ */ jsx4("stop", { offset: "100%", stopColor: "#0D0C1A" })
|
|
459
|
+
] }) }),
|
|
460
|
+
/* @__PURE__ */ jsx4("rect", { width: "64", height: "64", rx: "14", fill: bgFill }),
|
|
461
|
+
/* @__PURE__ */ jsx4("path", { d: "M14 46 L24 20 L34 46", stroke: aPrimary, strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
462
|
+
/* @__PURE__ */ jsx4("line", { x1: "18", y1: "37", x2: "30", y2: "37", stroke: aPrimary, strokeWidth: "2.5", strokeLinecap: "round" }),
|
|
463
|
+
/* @__PURE__ */ jsx4("path", { d: "M38 28 C38 23 42 20 47 20 C52 20 55 23 55 28 L55 32 L49 32 L49 29", stroke: gPrimary, strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
464
|
+
/* @__PURE__ */ jsx4("path", { d: "M38 28 C38 33 38 38 38 40 C38 43.5 42 46 47 46 C52 46 55 43.5 55 40 L55 32", stroke: gPrimary, strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
465
|
+
] });
|
|
466
|
+
}
|
|
467
|
+
function AgWordmark() {
|
|
468
|
+
return /* @__PURE__ */ jsxs3("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
|
|
469
|
+
/* @__PURE__ */ jsxs3("svg", { viewBox: "0 0 36 36", width: "36", height: "36", fill: "none", children: [
|
|
470
|
+
/* @__PURE__ */ jsx4("rect", { width: "36", height: "36", rx: "8", fill: "#18181C" }),
|
|
471
|
+
/* @__PURE__ */ jsx4("path", { d: "M6 26 L13 10 L20 26", stroke: "#7C6EFA", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
472
|
+
/* @__PURE__ */ jsx4("line", { x1: "9", y1: "20.5", x2: "17", y2: "20.5", stroke: "#7C6EFA", strokeWidth: "2", strokeLinecap: "round" }),
|
|
473
|
+
/* @__PURE__ */ jsx4("path", { d: "M23 16.5 C23 13.5 25.5 12 28 12 C30.5 12 32 13.5 32 16.5 L32 18.5 L28.5 18.5 L28.5 16.5", stroke: "#F0EEF8", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
474
|
+
/* @__PURE__ */ jsx4("path", { d: "M23 16.5 C23 19 23 21.5 23 23 C23 25 25.5 26 28 26 C30.5 26 32 25 32 23 L32 18.5", stroke: "#F0EEF8", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
475
|
+
] }),
|
|
476
|
+
/* @__PURE__ */ jsxs3("span", { style: { fontFamily: "var(--brand-font-display)", fontWeight: 700, fontSize: 18, color: "var(--text-primary)", letterSpacing: "-0.02em" }, children: [
|
|
477
|
+
"Adarsh",
|
|
478
|
+
/* @__PURE__ */ jsx4("span", { style: { color: "var(--accent)" }, children: "." })
|
|
479
|
+
] })
|
|
480
|
+
] });
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
// src/components/Footer/Footer.tsx
|
|
484
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
485
|
+
function Footer({ year = (/* @__PURE__ */ new Date()).getFullYear() }) {
|
|
486
|
+
const mono = { fontFamily: "var(--brand-font-mono)" };
|
|
487
|
+
return /* @__PURE__ */ jsxs4("div", { style: {
|
|
488
|
+
paddingTop: "var(--sp-16)",
|
|
489
|
+
paddingBottom: "var(--sp-8)",
|
|
490
|
+
borderTop: "1px solid var(--border-subtle)",
|
|
491
|
+
display: "flex",
|
|
492
|
+
justifyContent: "space-between",
|
|
493
|
+
alignItems: "center",
|
|
494
|
+
flexWrap: "wrap",
|
|
495
|
+
gap: "var(--sp-4)"
|
|
496
|
+
}, children: [
|
|
497
|
+
/* @__PURE__ */ jsx5(AgWordmark, {}),
|
|
498
|
+
/* @__PURE__ */ jsxs4("div", { style: { display: "flex", alignItems: "center", gap: "var(--sp-2)" }, children: [
|
|
499
|
+
/* @__PURE__ */ jsxs4("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", style: { flexShrink: 0 }, children: [
|
|
500
|
+
/* @__PURE__ */ jsx5("circle", { cx: "6", cy: "6", r: "5.5", stroke: "var(--border-soft)" }),
|
|
501
|
+
/* @__PURE__ */ jsx5("path", { d: "M8 4.5A2.5 2.5 0 1 0 8 7.5", stroke: "var(--text-disabled)", strokeWidth: "1", strokeLinecap: "round" })
|
|
502
|
+
] }),
|
|
503
|
+
/* @__PURE__ */ jsxs4("span", { style: { ...mono, fontSize: 11, color: "var(--text-disabled)" }, children: [
|
|
504
|
+
year,
|
|
505
|
+
" Adarsh Goswami. All rights reserved."
|
|
506
|
+
] })
|
|
507
|
+
] })
|
|
508
|
+
] });
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
// src/components/Theme/ThemeProvider.tsx
|
|
512
|
+
import { useState, useEffect, useCallback } from "react";
|
|
513
|
+
import { Theme } from "@radix-ui/themes";
|
|
514
|
+
|
|
515
|
+
// src/components/Theme/ThemeContext.ts
|
|
516
|
+
import { createContext, useContext } from "react";
|
|
517
|
+
var ThemeContext = createContext(null);
|
|
518
|
+
function useTheme() {
|
|
519
|
+
const ctx = useContext(ThemeContext);
|
|
520
|
+
if (ctx === null) {
|
|
521
|
+
throw new Error("[useTheme] must be used inside <ThemeProvider>.");
|
|
522
|
+
}
|
|
523
|
+
return ctx;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
// src/components/Theme/ThemeProvider.tsx
|
|
527
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
528
|
+
function ThemeProvider({
|
|
529
|
+
children,
|
|
530
|
+
defaultTheme = "dark"
|
|
531
|
+
}) {
|
|
532
|
+
const [theme, setThemeState] = useState(defaultTheme);
|
|
533
|
+
useEffect(() => {
|
|
534
|
+
if (typeof document === "undefined") return;
|
|
535
|
+
document.documentElement.setAttribute("data-theme", theme);
|
|
536
|
+
}, [theme]);
|
|
537
|
+
const setTheme = useCallback((next) => {
|
|
538
|
+
setThemeState(next);
|
|
539
|
+
}, []);
|
|
540
|
+
const toggleTheme = useCallback(() => {
|
|
541
|
+
setThemeState((prev) => prev === "dark" ? "light" : "dark");
|
|
542
|
+
}, []);
|
|
543
|
+
return /* @__PURE__ */ jsx6(ThemeContext.Provider, { value: { theme, setTheme, toggleTheme }, children: /* @__PURE__ */ jsx6(Theme, { appearance: theme, children }) });
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
// src/components/Theme/ThemeToggle.tsx
|
|
547
|
+
import { Switch } from "@radix-ui/themes";
|
|
548
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
549
|
+
function ThemeToggle({ "aria-label": ariaLabel = "Toggle theme" }) {
|
|
550
|
+
const { theme, toggleTheme } = useTheme();
|
|
551
|
+
return /* @__PURE__ */ jsx7(
|
|
552
|
+
Switch,
|
|
553
|
+
{
|
|
554
|
+
size: "2",
|
|
555
|
+
className: "ag-theme-toggle",
|
|
556
|
+
checked: theme === "light",
|
|
557
|
+
onCheckedChange: () => toggleTheme(),
|
|
558
|
+
"aria-label": ariaLabel
|
|
559
|
+
}
|
|
560
|
+
);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
// src/components/ThemePage/ThemePage.tsx
|
|
564
|
+
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
565
|
+
|
|
566
|
+
// package.json
|
|
567
|
+
var package_default = {
|
|
568
|
+
name: "@adarsh_goswami/design",
|
|
569
|
+
version: "0.1.0",
|
|
570
|
+
type: "module",
|
|
571
|
+
description: "Single source of truth for Adarsh Goswami's personal design system \u2014 pre-themed Radix UI components, CSS tokens, and Tailwind preset.",
|
|
572
|
+
author: "Adarsh Goswami",
|
|
573
|
+
license: "MIT",
|
|
574
|
+
exports: {
|
|
575
|
+
".": {
|
|
576
|
+
types: "./dist/index.d.ts",
|
|
577
|
+
import: "./dist/index.js",
|
|
578
|
+
require: "./dist/index.cjs"
|
|
579
|
+
},
|
|
580
|
+
"./dist/theme.css": "./dist/theme.css",
|
|
581
|
+
"./dist/tailwind.config.css": "./dist/tailwind.config.css",
|
|
582
|
+
"./dist/assets/*": "./dist/assets/*"
|
|
583
|
+
},
|
|
584
|
+
main: "./dist/index.cjs",
|
|
585
|
+
module: "./dist/index.js",
|
|
586
|
+
types: "./dist/index.d.ts",
|
|
587
|
+
files: [
|
|
588
|
+
"dist"
|
|
589
|
+
],
|
|
590
|
+
scripts: {
|
|
591
|
+
build: "tsup",
|
|
592
|
+
dev: "tsup --watch",
|
|
593
|
+
demo: "vite",
|
|
594
|
+
typecheck: "tsc --noEmit"
|
|
595
|
+
},
|
|
596
|
+
peerDependencies: {
|
|
597
|
+
"@radix-ui/themes": ">=3.0.0",
|
|
598
|
+
react: ">=18.0.0",
|
|
599
|
+
"react-dom": ">=18.0.0",
|
|
600
|
+
tailwindcss: "^4.2.2"
|
|
601
|
+
},
|
|
602
|
+
devDependencies: {
|
|
603
|
+
"@radix-ui/themes": "^3.3.0",
|
|
604
|
+
"@types/bun": "latest",
|
|
605
|
+
"@types/react": "^19.2.14",
|
|
606
|
+
"@types/react-dom": "^19.2.3",
|
|
607
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
608
|
+
react: "^19.2.4",
|
|
609
|
+
"react-dom": "^19.2.4",
|
|
610
|
+
tsup: "^8.5.1",
|
|
611
|
+
typescript: "^5.9.3",
|
|
612
|
+
vite: "^8.0.8"
|
|
613
|
+
},
|
|
614
|
+
engines: {
|
|
615
|
+
node: ">=18"
|
|
616
|
+
},
|
|
617
|
+
dependencies: {
|
|
618
|
+
"react-markdown": "^10.1.0",
|
|
619
|
+
"rehype-highlight": "^7.0.2",
|
|
620
|
+
"remark-gfm": "^4.0.1"
|
|
621
|
+
}
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
// src/components/ThemePage/ThemePage.tsx
|
|
625
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
626
|
+
function useTokenMap(tokens) {
|
|
627
|
+
const [map, setMap] = useState2({});
|
|
628
|
+
useEffect2(() => {
|
|
629
|
+
const style = getComputedStyle(document.documentElement);
|
|
630
|
+
const result = {};
|
|
631
|
+
for (const t of tokens) result[t] = style.getPropertyValue(t).trim();
|
|
632
|
+
setMap(result);
|
|
633
|
+
}, []);
|
|
634
|
+
return map;
|
|
635
|
+
}
|
|
636
|
+
function SectionLabel({ children }) {
|
|
637
|
+
return /* @__PURE__ */ jsx8("p", { style: {
|
|
638
|
+
fontFamily: "var(--brand-font-mono)",
|
|
639
|
+
fontSize: "var(--brand-text-xs)",
|
|
640
|
+
letterSpacing: "0.1em",
|
|
641
|
+
textTransform: "uppercase",
|
|
642
|
+
color: "var(--text-muted)",
|
|
643
|
+
margin: "var(--sp-6) 0 var(--sp-3)"
|
|
644
|
+
}, children });
|
|
645
|
+
}
|
|
646
|
+
function Section({ label, title, description, children, first }) {
|
|
647
|
+
return /* @__PURE__ */ jsxs5("section", { style: {
|
|
648
|
+
marginBottom: "var(--sp-24)",
|
|
649
|
+
paddingTop: first ? 0 : "var(--sp-24)",
|
|
650
|
+
borderTop: first ? "none" : "1px solid var(--border-subtle)"
|
|
651
|
+
}, children: [
|
|
652
|
+
/* @__PURE__ */ jsx8("div", { style: { fontFamily: "var(--brand-font-mono)", fontSize: "var(--brand-text-xs)", fontWeight: 500, letterSpacing: "0.12em", textTransform: "uppercase", color: "var(--accent)", marginBottom: "var(--sp-2)" }, children: label }),
|
|
653
|
+
/* @__PURE__ */ jsx8("div", { style: { fontFamily: "var(--brand-font-display)", fontSize: "var(--brand-text-2xl)", fontWeight: 700, color: "var(--text-primary)", marginBottom: "var(--sp-2)" }, children: title }),
|
|
654
|
+
description && /* @__PURE__ */ jsx8("div", { style: { fontSize: "var(--brand-text-sm)", color: "var(--text-secondary)", marginBottom: "var(--sp-8)", maxWidth: 480 }, children: description }),
|
|
655
|
+
children
|
|
656
|
+
] });
|
|
657
|
+
}
|
|
658
|
+
function ColorSwatch({ token, label, values }) {
|
|
659
|
+
return /* @__PURE__ */ jsxs5("div", { style: { borderRadius: "var(--brand-radius-md)", overflow: "hidden", border: "1px solid var(--border-subtle)" }, children: [
|
|
660
|
+
/* @__PURE__ */ jsx8("div", { style: { height: 56, background: `var(${token})` } }),
|
|
661
|
+
/* @__PURE__ */ jsxs5("div", { style: { background: "var(--bg-surface)", padding: "10px 12px 14px" }, children: [
|
|
662
|
+
/* @__PURE__ */ jsx8("div", { style: { fontSize: "var(--brand-text-xs)", fontWeight: 500, color: "var(--text-primary)", marginBottom: 2 }, children: label }),
|
|
663
|
+
/* @__PURE__ */ jsx8("div", { style: { fontFamily: "var(--brand-font-mono)", fontSize: 10, color: "var(--text-muted)" }, children: token }),
|
|
664
|
+
values[token] && /* @__PURE__ */ jsx8("div", { style: { fontFamily: "var(--brand-font-mono)", fontSize: 10, color: "var(--text-disabled)", marginTop: 1 }, children: values[token] })
|
|
665
|
+
] })
|
|
666
|
+
] });
|
|
667
|
+
}
|
|
668
|
+
function ColorGrid({ children }) {
|
|
669
|
+
return /* @__PURE__ */ jsx8("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(140px, 1fr))", gap: "var(--sp-3)" }, children });
|
|
670
|
+
}
|
|
671
|
+
var COLOR_TOKENS = [
|
|
672
|
+
"--bg-base",
|
|
673
|
+
"--bg-surface",
|
|
674
|
+
"--bg-raised",
|
|
675
|
+
"--bg-overlay",
|
|
676
|
+
"--border-subtle",
|
|
677
|
+
"--border-soft",
|
|
678
|
+
"--border-mid",
|
|
679
|
+
"--text-primary",
|
|
680
|
+
"--text-secondary",
|
|
681
|
+
"--text-muted",
|
|
682
|
+
"--text-disabled",
|
|
683
|
+
"--accent",
|
|
684
|
+
"--accent-bright",
|
|
685
|
+
"--accent-dim",
|
|
686
|
+
"--accent-glow",
|
|
687
|
+
"--success",
|
|
688
|
+
"--warning",
|
|
689
|
+
"--error",
|
|
690
|
+
"--info"
|
|
691
|
+
];
|
|
692
|
+
var TYPE_SCALE = [
|
|
693
|
+
{ token: "--brand-text-5xl", label: "text-5xl", role: "display", weight: 800, family: "display" },
|
|
694
|
+
{ token: "--brand-text-4xl", label: "text-4xl", role: "h1", weight: 700, family: "display" },
|
|
695
|
+
{ token: "--brand-text-3xl", label: "text-3xl", role: "h2", weight: 700, family: "display" },
|
|
696
|
+
{ token: "--brand-text-2xl", label: "text-2xl", role: "h3", weight: 700, family: "display" },
|
|
697
|
+
{ token: "--brand-text-xl", label: "text-xl", role: "h4", weight: 600, family: "display" },
|
|
698
|
+
{ token: "--brand-text-lg", label: "text-lg", role: "h5", weight: 600, family: "display" },
|
|
699
|
+
{ token: "--brand-text-md", label: "text-md", role: "body-lg", weight: 400, family: "body" },
|
|
700
|
+
{ token: "--brand-text-base", label: "text-base", role: "body", weight: 400, family: "body" },
|
|
701
|
+
{ token: "--brand-text-sm", label: "text-sm", role: "caption", weight: 400, family: "body" },
|
|
702
|
+
{ token: "--brand-text-xs", label: "text-xs", role: "mono", weight: 500, family: "mono" }
|
|
703
|
+
];
|
|
704
|
+
var TYPE_SPECIMENS = {
|
|
705
|
+
"--brand-text-5xl": "Adarsh.",
|
|
706
|
+
"--brand-text-4xl": "Build fast, ship clean.",
|
|
707
|
+
"--brand-text-3xl": "Personal infrastructure.",
|
|
708
|
+
"--brand-text-2xl": "Reusable services, zero rework.",
|
|
709
|
+
"--brand-text-xl": "Authentication \xB7 Payments \xB7 Notifications",
|
|
710
|
+
"--brand-text-lg": "Dark-first design, consistent everywhere.",
|
|
711
|
+
"--brand-text-md": "A minimal design system that scales across projects.",
|
|
712
|
+
"--brand-text-base": "Built on an 8px grid with consistent tokens for color, spacing, and type.",
|
|
713
|
+
"--brand-text-sm": "Last updated April 2026 \xB7 Version 1.0.0",
|
|
714
|
+
"--brand-text-xs": "npm install @adarsh_goswami/brand"
|
|
715
|
+
};
|
|
716
|
+
var SPACING = [
|
|
717
|
+
{ token: "--sp-1", rem: "0.25rem", px: "4px" },
|
|
718
|
+
{ token: "--sp-2", rem: "0.5rem", px: "8px" },
|
|
719
|
+
{ token: "--sp-3", rem: "0.75rem", px: "12px" },
|
|
720
|
+
{ token: "--sp-4", rem: "1rem", px: "16px" },
|
|
721
|
+
{ token: "--sp-5", rem: "1.25rem", px: "20px" },
|
|
722
|
+
{ token: "--sp-6", rem: "1.5rem", px: "24px" },
|
|
723
|
+
{ token: "--sp-8", rem: "2rem", px: "32px" },
|
|
724
|
+
{ token: "--sp-10", rem: "2.5rem", px: "40px" },
|
|
725
|
+
{ token: "--sp-12", rem: "3rem", px: "48px" },
|
|
726
|
+
{ token: "--sp-16", rem: "4rem", px: "64px" },
|
|
727
|
+
{ token: "--sp-20", rem: "5rem", px: "80px" },
|
|
728
|
+
{ token: "--sp-24", rem: "6rem", px: "96px" }
|
|
729
|
+
];
|
|
730
|
+
var RADII = [
|
|
731
|
+
{ token: "--brand-radius-sm", label: "sm", value: "4px" },
|
|
732
|
+
{ token: "--brand-radius-md", label: "md", value: "8px" },
|
|
733
|
+
{ token: "--brand-radius-lg", label: "lg", value: "12px" },
|
|
734
|
+
{ token: "--brand-radius-xl", label: "xl", value: "16px" },
|
|
735
|
+
{ token: "--brand-radius-2xl", label: "2xl", value: "24px" },
|
|
736
|
+
{ token: "--brand-radius-full", label: "full", value: "9999px" }
|
|
737
|
+
];
|
|
738
|
+
var SHADOWS = [
|
|
739
|
+
{ token: "--brand-shadow-sm", label: "shadow-sm", desc: "Subtle lift" },
|
|
740
|
+
{ token: "--brand-shadow-md", label: "shadow-md", desc: "Card elevation" },
|
|
741
|
+
{ token: "--brand-shadow-lg", label: "shadow-lg", desc: "Modal / overlay" },
|
|
742
|
+
{ token: "--brand-shadow-accent", label: "shadow-accent", desc: "Accent glow" }
|
|
743
|
+
];
|
|
744
|
+
var EASINGS = [
|
|
745
|
+
{ token: "--brand-ease-out", label: "ease-out", value: "cubic-bezier(0.16, 1, 0.3, 1)", use: "Entrances, expansions" },
|
|
746
|
+
{ token: "--brand-ease-in-out", label: "ease-in-out", value: "cubic-bezier(0.4, 0, 0.2, 1)", use: "State transitions" }
|
|
747
|
+
];
|
|
748
|
+
var DURATIONS = [
|
|
749
|
+
{ token: "--brand-duration-fast", label: "fast", value: "120ms", use: "Hover states, micro-interactions" },
|
|
750
|
+
{ token: "--brand-duration-base", label: "base", value: "220ms", use: "Most transitions" },
|
|
751
|
+
{ token: "--brand-duration-slow", label: "slow", value: "400ms", use: "Page-level, reveals" }
|
|
752
|
+
];
|
|
753
|
+
var FONT_FAMILIES = [
|
|
754
|
+
{ token: "--brand-font-display", cssFamily: "var(--brand-font-display)", weight: 700, sample: "Syne \u2014 Display" },
|
|
755
|
+
{ token: "--brand-font-body", cssFamily: "var(--brand-font-body)", weight: 400, sample: "DM Sans \u2014 Body" },
|
|
756
|
+
{ token: "--brand-font-mono", cssFamily: "var(--brand-font-mono)", weight: 400, sample: "DM Mono \u2014 Mono" }
|
|
757
|
+
];
|
|
758
|
+
function fontFamilyVar(family) {
|
|
759
|
+
if (family === "display") return "var(--brand-font-display)";
|
|
760
|
+
if (family === "mono") return "var(--brand-font-mono)";
|
|
761
|
+
return "var(--brand-font-body)";
|
|
762
|
+
}
|
|
763
|
+
function ComponentsSection() {
|
|
764
|
+
const [tooltipVisible, setTooltipVisible] = useState2(false);
|
|
765
|
+
const mono = { fontFamily: "var(--brand-font-mono)" };
|
|
766
|
+
return /* @__PURE__ */ jsxs5("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-8)" }, children: [
|
|
767
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
768
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Buttons" }),
|
|
769
|
+
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", flexWrap: "wrap", gap: "var(--sp-3)", alignItems: "center", marginBottom: "var(--sp-3)" }, children: [
|
|
770
|
+
/* @__PURE__ */ jsx8("button", { style: btnStyle("primary"), children: "Deploy service" }),
|
|
771
|
+
/* @__PURE__ */ jsx8("button", { style: btnStyle("secondary"), children: "View source" }),
|
|
772
|
+
/* @__PURE__ */ jsx8("button", { style: btnStyle("ghost"), children: "Cancel" }),
|
|
773
|
+
/* @__PURE__ */ jsx8("button", { style: btnStyle("danger"), children: "Delete" })
|
|
774
|
+
] }),
|
|
775
|
+
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", flexWrap: "wrap", gap: "var(--sp-3)", alignItems: "center" }, children: [
|
|
776
|
+
/* @__PURE__ */ jsx8("button", { style: { ...btnStyle("primary"), ...btnSize("sm") }, children: "Small" }),
|
|
777
|
+
/* @__PURE__ */ jsx8("button", { style: btnStyle("primary"), children: "Default" }),
|
|
778
|
+
/* @__PURE__ */ jsx8("button", { style: { ...btnStyle("primary"), ...btnSize("lg") }, children: "Large" })
|
|
779
|
+
] })
|
|
780
|
+
] }),
|
|
781
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
782
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Badges" }),
|
|
783
|
+
/* @__PURE__ */ jsx8("div", { style: { display: "flex", flexWrap: "wrap", gap: "var(--sp-3)", alignItems: "center" }, children: [
|
|
784
|
+
{ label: "Default", bg: "var(--bg-overlay)", color: "var(--text-secondary)", border: "var(--border-soft)" },
|
|
785
|
+
{ label: "\u25CF Live", bg: "var(--accent-subtle)", color: "var(--accent-bright)", border: "var(--accent-border)" },
|
|
786
|
+
{ label: "\u25CF Active", bg: "var(--success-bg)", color: "var(--success)", border: "var(--success-border)" },
|
|
787
|
+
{ label: "\u25CF Degraded", bg: "var(--warning-bg)", color: "var(--warning)", border: "var(--warning-border)" },
|
|
788
|
+
{ label: "\u25CF Offline", bg: "var(--error-bg)", color: "var(--error)", border: "var(--error-border)" }
|
|
789
|
+
].map((b) => /* @__PURE__ */ jsx8("span", { style: { ...mono, fontSize: 10, fontWeight: 500, letterSpacing: "0.06em", textTransform: "uppercase", padding: "3px 8px", borderRadius: "var(--brand-radius-sm)", background: b.bg, color: b.color, border: `1px solid ${b.border}` }, children: b.label }, b.label)) })
|
|
790
|
+
] }),
|
|
791
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
792
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Cards" }),
|
|
793
|
+
/* @__PURE__ */ jsx8("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(220px, 1fr))", gap: "var(--sp-4)" }, children: [
|
|
794
|
+
{ icon: "\u{1F510}", title: "Auth Service", body: "JWT-based auth with refresh tokens, OAuth2, and session management." },
|
|
795
|
+
{ icon: "\u{1F4B3}", title: "Payments", body: "Stripe-powered billing with webhooks, subscriptions, and invoicing." },
|
|
796
|
+
{ icon: "\u{1F4E8}", title: "Notifications", body: "Email, push, and in-app notification service with templates." }
|
|
797
|
+
].map((card) => /* @__PURE__ */ jsxs5("div", { style: { background: "var(--bg-surface)", border: "1px solid var(--border-subtle)", borderRadius: "var(--brand-radius-xl)", padding: "var(--sp-6)" }, children: [
|
|
798
|
+
/* @__PURE__ */ jsx8("div", { style: { width: 36, height: 36, borderRadius: "var(--brand-radius-md)", background: "var(--accent-subtle)", border: "1px solid var(--accent-border)", display: "flex", alignItems: "center", justifyContent: "center", marginBottom: "var(--sp-4)", fontSize: 16 }, children: card.icon }),
|
|
799
|
+
/* @__PURE__ */ jsx8("div", { style: { fontFamily: "var(--brand-font-display)", fontSize: "var(--brand-text-md)", fontWeight: 600, color: "var(--text-primary)", marginBottom: "var(--sp-2)" }, children: card.title }),
|
|
800
|
+
/* @__PURE__ */ jsx8("div", { style: { fontSize: "var(--brand-text-sm)", color: "var(--text-secondary)", lineHeight: 1.6 }, children: card.body })
|
|
801
|
+
] }, card.title)) })
|
|
802
|
+
] }),
|
|
803
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
804
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Form Inputs" }),
|
|
805
|
+
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-3)", maxWidth: 400 }, children: [
|
|
806
|
+
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-2)" }, children: [
|
|
807
|
+
/* @__PURE__ */ jsx8("label", { style: labelStyle, children: "Project name" }),
|
|
808
|
+
/* @__PURE__ */ jsx8("input", { readOnly: true, style: inputStyle(), placeholder: "my-awesome-app", defaultValue: "" })
|
|
809
|
+
] }),
|
|
810
|
+
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-2)" }, children: [
|
|
811
|
+
/* @__PURE__ */ jsx8("label", { style: labelStyle, children: "API Key" }),
|
|
812
|
+
/* @__PURE__ */ jsx8("input", { readOnly: true, style: { ...inputStyle(), ...mono, fontSize: 13 }, defaultValue: "ag_live_\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u20223fa2" }),
|
|
813
|
+
/* @__PURE__ */ jsx8("span", { style: { fontSize: 11, color: "var(--text-muted)" }, children: "Keep this secret. Rotate from the dashboard." })
|
|
814
|
+
] }),
|
|
815
|
+
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-2)" }, children: [
|
|
816
|
+
/* @__PURE__ */ jsx8("label", { style: labelStyle, children: "Status" }),
|
|
817
|
+
/* @__PURE__ */ jsx8("input", { readOnly: true, style: inputStyle("error"), defaultValue: "invalid-slug!" }),
|
|
818
|
+
/* @__PURE__ */ jsx8("span", { style: { fontSize: 11, color: "var(--error)" }, children: "Only lowercase letters, numbers, and hyphens." })
|
|
819
|
+
] })
|
|
820
|
+
] })
|
|
821
|
+
] }),
|
|
822
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
823
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Code Block" }),
|
|
824
|
+
/* @__PURE__ */ jsxs5("div", { style: { ...mono, background: "var(--bg-surface)", border: "1px solid var(--border-subtle)", borderRadius: "var(--brand-radius-lg)", padding: "var(--sp-5) var(--sp-6)", fontSize: "var(--brand-text-sm)", color: "var(--text-secondary)", lineHeight: 1.8, overflowX: "auto" }, children: [
|
|
825
|
+
/* @__PURE__ */ jsx8("span", { style: { color: "var(--text-disabled)" }, children: "// Initialize AG Auth" }),
|
|
826
|
+
"\n",
|
|
827
|
+
/* @__PURE__ */ jsx8("span", { style: { color: "var(--accent-bright)" }, children: "import" }),
|
|
828
|
+
" { createClient } ",
|
|
829
|
+
/* @__PURE__ */ jsx8("span", { style: { color: "var(--accent-bright)" }, children: "from" }),
|
|
830
|
+
" ",
|
|
831
|
+
/* @__PURE__ */ jsx8("span", { style: { color: "var(--success)" }, children: "'@ag/auth'" }),
|
|
832
|
+
"\n\n",
|
|
833
|
+
/* @__PURE__ */ jsx8("span", { style: { color: "var(--accent-bright)" }, children: "const" }),
|
|
834
|
+
" auth = ",
|
|
835
|
+
/* @__PURE__ */ jsx8("span", { style: { color: "var(--info)" }, children: "createClient" }),
|
|
836
|
+
"({\n",
|
|
837
|
+
" projectId: ",
|
|
838
|
+
/* @__PURE__ */ jsx8("span", { style: { color: "var(--success)" }, children: "'proj_xxxxxxxx'" }),
|
|
839
|
+
",\n",
|
|
840
|
+
" secret: process.env.",
|
|
841
|
+
/* @__PURE__ */ jsx8("span", { style: { color: "var(--info)" }, children: "AG_SECRET" }),
|
|
842
|
+
",\n",
|
|
843
|
+
" ttl: ",
|
|
844
|
+
/* @__PURE__ */ jsx8("span", { style: { color: "var(--warning)" }, children: "3600" }),
|
|
845
|
+
",\n",
|
|
846
|
+
"})\n\n",
|
|
847
|
+
/* @__PURE__ */ jsx8("span", { style: { color: "var(--accent-bright)" }, children: "export default" }),
|
|
848
|
+
" auth"
|
|
849
|
+
] })
|
|
850
|
+
] }),
|
|
851
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
852
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Navigation" }),
|
|
853
|
+
/* @__PURE__ */ jsxs5("div", { style: { background: "rgba(10,10,11,0.8)", backdropFilter: "blur(12px)", border: "1px solid var(--border-subtle)", borderRadius: "var(--brand-radius-xl)", padding: "var(--sp-3) var(--sp-5)", display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
854
|
+
/* @__PURE__ */ jsxs5("div", { style: { fontFamily: "var(--brand-font-display)", fontSize: "var(--brand-text-md)", fontWeight: 700, color: "var(--text-primary)", display: "flex", alignItems: "center", gap: "var(--sp-2)" }, children: [
|
|
855
|
+
/* @__PURE__ */ jsxs5("svg", { viewBox: "0 0 24 24", width: "20", height: "20", fill: "none", children: [
|
|
856
|
+
/* @__PURE__ */ jsx8("path", { d: "M4 18 L9 6 L14 18", stroke: "#7C6EFA", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
857
|
+
/* @__PURE__ */ jsx8("line", { x1: "6", y1: "14", x2: "12", y2: "14", stroke: "#7C6EFA", strokeWidth: "2", strokeLinecap: "round" }),
|
|
858
|
+
/* @__PURE__ */ jsx8("path", { d: "M16 10C16 8 17.5 7 19 7C20.5 7 22 8 22 10L22 12L19.5 12", stroke: "#F0EEF8", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
859
|
+
/* @__PURE__ */ jsx8("path", { d: "M16 10C16 12 16 14 16 15C16 16.5 17.5 17 19 17C20.5 17 22 16.5 22 15L22 12", stroke: "#F0EEF8", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
860
|
+
] }),
|
|
861
|
+
"Adarsh"
|
|
862
|
+
] }),
|
|
863
|
+
/* @__PURE__ */ jsx8("div", { style: { display: "flex", gap: "var(--sp-6)", listStyle: "none" }, children: ["Work", "Services", "Blog", "Contact"].map((link, i) => /* @__PURE__ */ jsx8("span", { style: { fontSize: "var(--brand-text-sm)", color: i === 0 ? "var(--accent-bright)" : "var(--text-secondary)", cursor: "pointer" }, children: link }, link)) }),
|
|
864
|
+
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", alignItems: "center", gap: "var(--sp-3)" }, children: [
|
|
865
|
+
/* @__PURE__ */ jsx8(ThemeToggle, {}),
|
|
866
|
+
/* @__PURE__ */ jsx8("button", { style: { ...btnStyle("primary"), ...btnSize("sm") }, children: "Hire me" })
|
|
867
|
+
] })
|
|
868
|
+
] })
|
|
869
|
+
] }),
|
|
870
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
871
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Tooltip" }),
|
|
872
|
+
/* @__PURE__ */ jsxs5(
|
|
873
|
+
"div",
|
|
874
|
+
{
|
|
875
|
+
style: { position: "relative", display: "inline-block" },
|
|
876
|
+
onMouseEnter: () => setTooltipVisible(true),
|
|
877
|
+
onMouseLeave: () => setTooltipVisible(false),
|
|
878
|
+
children: [
|
|
879
|
+
/* @__PURE__ */ jsx8("button", { style: btnStyle("secondary"), children: "Hover me" }),
|
|
880
|
+
tooltipVisible && /* @__PURE__ */ jsx8("div", { style: { position: "absolute", bottom: "calc(100% + 8px)", left: "50%", transform: "translateX(-50%)", background: "var(--bg-overlay)", border: "1px solid var(--border-soft)", borderRadius: "var(--brand-radius-md)", padding: "var(--sp-2) var(--sp-3)", fontSize: 11, color: "var(--text-secondary)", whiteSpace: "nowrap", boxShadow: "var(--brand-shadow-md)", zIndex: 10, pointerEvents: "none" }, children: "Triggers on hover \xB7 120ms delay" })
|
|
881
|
+
]
|
|
882
|
+
}
|
|
883
|
+
)
|
|
884
|
+
] }),
|
|
885
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
886
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Tags" }),
|
|
887
|
+
/* @__PURE__ */ jsx8("div", { style: { display: "flex", flexWrap: "wrap", gap: "var(--sp-2)" }, children: ["typescript", "react", "node.js", "postgres", "redis", "docker"].map((tag) => /* @__PURE__ */ jsx8("span", { style: { ...mono, fontSize: 11, color: "var(--text-muted)", background: "var(--bg-overlay)", border: "1px solid var(--border-subtle)", padding: "2px 8px", borderRadius: "var(--brand-radius-sm)", display: "inline-block" }, children: tag }, tag)) })
|
|
888
|
+
] })
|
|
889
|
+
] });
|
|
890
|
+
}
|
|
891
|
+
function btnStyle(variant) {
|
|
892
|
+
const base = {
|
|
893
|
+
fontFamily: "var(--brand-font-body)",
|
|
894
|
+
fontSize: "var(--brand-text-sm)",
|
|
895
|
+
fontWeight: 500,
|
|
896
|
+
padding: "var(--sp-3) var(--sp-5)",
|
|
897
|
+
borderRadius: "var(--brand-radius-md)",
|
|
898
|
+
border: "none",
|
|
899
|
+
cursor: "pointer",
|
|
900
|
+
display: "inline-flex",
|
|
901
|
+
alignItems: "center",
|
|
902
|
+
gap: "var(--sp-2)",
|
|
903
|
+
letterSpacing: "0.01em",
|
|
904
|
+
lineHeight: 1
|
|
905
|
+
};
|
|
906
|
+
if (variant === "primary") return { ...base, background: "var(--accent)", color: "#fff" };
|
|
907
|
+
if (variant === "secondary") return { ...base, background: "var(--bg-raised)", color: "var(--text-primary)", border: "1px solid var(--border-soft)" };
|
|
908
|
+
if (variant === "ghost") return { ...base, background: "transparent", color: "var(--text-secondary)", border: "1px solid transparent" };
|
|
909
|
+
return { ...base, background: "var(--error-bg)", color: "var(--error)", border: "1px solid var(--error-border)" };
|
|
910
|
+
}
|
|
911
|
+
function btnSize(size) {
|
|
912
|
+
if (size === "sm") return { fontSize: 11, padding: "var(--sp-2) var(--sp-3)", borderRadius: "var(--brand-radius-sm)" };
|
|
913
|
+
return { fontSize: "var(--brand-text-base)", padding: "var(--sp-4) var(--sp-8)", borderRadius: "var(--brand-radius-lg)" };
|
|
914
|
+
}
|
|
915
|
+
var labelStyle = {
|
|
916
|
+
fontSize: "var(--brand-text-xs)",
|
|
917
|
+
fontWeight: 500,
|
|
918
|
+
color: "var(--text-secondary)",
|
|
919
|
+
letterSpacing: "0.03em"
|
|
920
|
+
};
|
|
921
|
+
function inputStyle(state) {
|
|
922
|
+
return {
|
|
923
|
+
fontFamily: "var(--brand-font-body)",
|
|
924
|
+
fontSize: "var(--brand-text-sm)",
|
|
925
|
+
color: "var(--text-primary)",
|
|
926
|
+
background: "var(--bg-raised)",
|
|
927
|
+
border: `1px solid ${state === "error" ? "var(--error)" : "var(--border-soft)"}`,
|
|
928
|
+
borderRadius: "var(--brand-radius-md)",
|
|
929
|
+
padding: "var(--sp-3) var(--sp-4)",
|
|
930
|
+
outline: "none",
|
|
931
|
+
width: "100%",
|
|
932
|
+
boxSizing: "border-box"
|
|
933
|
+
};
|
|
934
|
+
}
|
|
935
|
+
function ThemePage({ version = package_default.version }) {
|
|
936
|
+
const colorValues = useTokenMap(COLOR_TOKENS);
|
|
937
|
+
const mono = { fontFamily: "var(--brand-font-mono)" };
|
|
938
|
+
const dot = { width: 5, height: 5, borderRadius: "50%", background: "var(--accent)", display: "inline-block" };
|
|
939
|
+
return /* @__PURE__ */ jsx8("div", { style: {
|
|
940
|
+
background: "var(--bg-base)",
|
|
941
|
+
color: "var(--text-primary)",
|
|
942
|
+
fontFamily: "var(--brand-font-body)",
|
|
943
|
+
fontSize: "var(--brand-text-base)",
|
|
944
|
+
lineHeight: 1.6,
|
|
945
|
+
WebkitFontSmoothing: "antialiased",
|
|
946
|
+
minHeight: "100vh"
|
|
947
|
+
}, children: /* @__PURE__ */ jsxs5("div", { style: { maxWidth: "var(--brand-layout-container-max)", margin: "0 auto", padding: "var(--sp-16) var(--sp-8)" }, children: [
|
|
948
|
+
/* @__PURE__ */ jsxs5("div", { style: { paddingTop: "var(--sp-20)", paddingBottom: "var(--sp-16)", position: "relative", overflow: "hidden" }, children: [
|
|
949
|
+
/* @__PURE__ */ jsx8("div", { style: {
|
|
950
|
+
position: "absolute",
|
|
951
|
+
top: -80,
|
|
952
|
+
left: -120,
|
|
953
|
+
width: 600,
|
|
954
|
+
height: 400,
|
|
955
|
+
background: "radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%)",
|
|
956
|
+
pointerEvents: "none"
|
|
957
|
+
} }),
|
|
958
|
+
/* @__PURE__ */ jsxs5("div", { style: { ...mono, fontSize: "var(--brand-text-xs)", letterSpacing: "0.16em", textTransform: "uppercase", color: "var(--text-muted)", marginBottom: "var(--sp-6)", display: "flex", alignItems: "center", gap: "var(--sp-3)", position: "relative" }, children: [
|
|
959
|
+
/* @__PURE__ */ jsx8("span", { style: { width: 24, height: 1, background: "var(--border-mid)", display: "inline-block" } }),
|
|
960
|
+
"@adarsh_goswami/brand",
|
|
961
|
+
version && /* @__PURE__ */ jsxs5("span", { style: { background: "var(--accent-subtle)", color: "var(--accent)", border: "1px solid var(--accent-border)", borderRadius: "var(--brand-radius-sm)", padding: "2px 8px", fontSize: 10 }, children: [
|
|
962
|
+
"v",
|
|
963
|
+
version
|
|
964
|
+
] })
|
|
965
|
+
] }),
|
|
966
|
+
/* @__PURE__ */ jsxs5("div", { style: { fontFamily: "var(--brand-font-display)", fontSize: "clamp(3rem, 8vw, 5rem)", fontWeight: 800, lineHeight: 0.95, letterSpacing: "-0.03em", marginBottom: "var(--sp-6)", position: "relative" }, children: [
|
|
967
|
+
/* @__PURE__ */ jsx8("span", { style: { color: "var(--text-primary)" }, children: "Design" }),
|
|
968
|
+
/* @__PURE__ */ jsx8("br", {}),
|
|
969
|
+
/* @__PURE__ */ jsx8("span", { style: { color: "var(--accent)" }, children: "System" })
|
|
970
|
+
] }),
|
|
971
|
+
/* @__PURE__ */ jsx8("div", { style: { fontSize: "var(--brand-text-md)", color: "var(--text-secondary)", fontWeight: 300, maxWidth: 420, lineHeight: 1.7, position: "relative" }, children: "The single source of truth for all brand decisions \u2014 colors, typography, spacing, and motion." }),
|
|
972
|
+
/* @__PURE__ */ jsx8("div", { style: { ...mono, marginTop: "var(--sp-10)", display: "flex", flexWrap: "wrap", alignItems: "center", gap: "var(--sp-6)", fontSize: "var(--brand-text-xs)", color: "var(--text-muted)", letterSpacing: "0.06em", position: "relative" }, children: ["Radix UI", "Tailwind CSS", "TypeScript"].map((tech) => /* @__PURE__ */ jsxs5("span", { style: { display: "flex", alignItems: "center", gap: "var(--sp-2)" }, children: [
|
|
973
|
+
/* @__PURE__ */ jsx8("span", { style: dot }),
|
|
974
|
+
tech
|
|
975
|
+
] }, tech)) })
|
|
976
|
+
] }),
|
|
977
|
+
/* @__PURE__ */ jsx8(Section, { label: "01 \u2014 Identity", title: "Logo & Mark", description: "The AG monogram is built from geometric forms \u2014 two interlocked letterforms on a contained grid.", first: true, children: /* @__PURE__ */ jsxs5("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(200px, 1fr))", gap: "var(--sp-4)" }, children: [
|
|
978
|
+
/* @__PURE__ */ jsxs5("div", { style: logoCardStyle("dark"), children: [
|
|
979
|
+
/* @__PURE__ */ jsx8(AgMark, { size: 64, variant: "dark" }),
|
|
980
|
+
/* @__PURE__ */ jsx8("span", { style: logoLabelStyle("dark"), children: "Primary \u2014 Dark" })
|
|
981
|
+
] }),
|
|
982
|
+
/* @__PURE__ */ jsxs5("div", { style: logoCardStyle("glow"), children: [
|
|
983
|
+
/* @__PURE__ */ jsx8(AgMark, { size: 64, variant: "glow" }),
|
|
984
|
+
/* @__PURE__ */ jsx8("span", { style: logoLabelStyle("dark"), children: "Glow Variant" })
|
|
985
|
+
] }),
|
|
986
|
+
/* @__PURE__ */ jsxs5("div", { style: logoCardStyle("light"), children: [
|
|
987
|
+
/* @__PURE__ */ jsx8(AgMark, { size: 64, variant: "light" }),
|
|
988
|
+
/* @__PURE__ */ jsx8("span", { style: logoLabelStyle("light"), children: "Light Variant" })
|
|
989
|
+
] }),
|
|
990
|
+
/* @__PURE__ */ jsxs5("div", { style: { ...logoCardStyle("dark"), justifyContent: "center" }, children: [
|
|
991
|
+
/* @__PURE__ */ jsx8(AgWordmark, {}),
|
|
992
|
+
/* @__PURE__ */ jsx8("span", { style: logoLabelStyle("dark"), children: "Wordmark" })
|
|
993
|
+
] })
|
|
994
|
+
] }) }),
|
|
995
|
+
/* @__PURE__ */ jsxs5(Section, { label: "02 \u2014 Color", title: "Color System", description: "Dark-first palette anchored by a violet-indigo accent. All values resolve from theme.css.", children: [
|
|
996
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Accent" }),
|
|
997
|
+
/* @__PURE__ */ jsxs5(ColorGrid, { children: [
|
|
998
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--accent-bright", label: "Bright", values: colorValues }),
|
|
999
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--accent", label: "Base", values: colorValues }),
|
|
1000
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--accent-dim", label: "Dim", values: colorValues }),
|
|
1001
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--accent-glow", label: "Glow", values: colorValues })
|
|
1002
|
+
] }),
|
|
1003
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Backgrounds" }),
|
|
1004
|
+
/* @__PURE__ */ jsxs5(ColorGrid, { children: [
|
|
1005
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--bg-base", label: "Base", values: colorValues }),
|
|
1006
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--bg-surface", label: "Surface", values: colorValues }),
|
|
1007
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--bg-raised", label: "Raised", values: colorValues }),
|
|
1008
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--bg-overlay", label: "Overlay", values: colorValues })
|
|
1009
|
+
] }),
|
|
1010
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Borders" }),
|
|
1011
|
+
/* @__PURE__ */ jsxs5(ColorGrid, { children: [
|
|
1012
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--border-subtle", label: "Subtle", values: colorValues }),
|
|
1013
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--border-soft", label: "Soft", values: colorValues }),
|
|
1014
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--border-mid", label: "Mid", values: colorValues })
|
|
1015
|
+
] }),
|
|
1016
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Text" }),
|
|
1017
|
+
/* @__PURE__ */ jsxs5(ColorGrid, { children: [
|
|
1018
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--text-primary", label: "Primary", values: colorValues }),
|
|
1019
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--text-secondary", label: "Secondary", values: colorValues }),
|
|
1020
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--text-muted", label: "Muted", values: colorValues }),
|
|
1021
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--text-disabled", label: "Disabled", values: colorValues })
|
|
1022
|
+
] }),
|
|
1023
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Semantic" }),
|
|
1024
|
+
/* @__PURE__ */ jsxs5(ColorGrid, { children: [
|
|
1025
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--success", label: "Success", values: colorValues }),
|
|
1026
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--warning", label: "Warning", values: colorValues }),
|
|
1027
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--error", label: "Error", values: colorValues }),
|
|
1028
|
+
/* @__PURE__ */ jsx8(ColorSwatch, { token: "--info", label: "Info", values: colorValues })
|
|
1029
|
+
] })
|
|
1030
|
+
] }),
|
|
1031
|
+
/* @__PURE__ */ jsxs5(Section, { label: "03 \u2014 Typography", title: "Type System", description: "Syne for display and headings. DM Sans for body. DM Mono for code, labels, and data.", children: [
|
|
1032
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Families" }),
|
|
1033
|
+
/* @__PURE__ */ jsx8("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-3)", marginBottom: "var(--sp-8)" }, children: FONT_FAMILIES.map(({ token, cssFamily, weight, sample }) => /* @__PURE__ */ jsxs5("div", { style: { padding: "var(--sp-4) var(--sp-5)", background: "var(--bg-surface)", border: "1px solid var(--border-subtle)", borderRadius: "var(--brand-radius-md)", display: "flex", justifyContent: "space-between", alignItems: "center", gap: "var(--sp-4)", flexWrap: "wrap" }, children: [
|
|
1034
|
+
/* @__PURE__ */ jsx8("span", { style: { fontFamily: cssFamily, fontWeight: weight, fontSize: "var(--brand-text-lg)", color: "var(--text-primary)" }, children: sample }),
|
|
1035
|
+
/* @__PURE__ */ jsx8("span", { style: { ...mono, fontSize: 10, color: "var(--text-muted)", flexShrink: 0 }, children: token })
|
|
1036
|
+
] }, token)) }),
|
|
1037
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Scale" }),
|
|
1038
|
+
/* @__PURE__ */ jsx8("div", { children: TYPE_SCALE.map(({ token, label, role, weight, family }) => /* @__PURE__ */ jsxs5("div", { style: { display: "flex", alignItems: "baseline", gap: "var(--sp-6)", padding: "var(--sp-5) 0", borderBottom: "1px solid var(--border-subtle)" }, children: [
|
|
1039
|
+
/* @__PURE__ */ jsxs5("div", { style: { minWidth: 130, flexShrink: 0 }, children: [
|
|
1040
|
+
/* @__PURE__ */ jsx8("div", { style: { ...mono, fontSize: 10, color: "var(--accent)", letterSpacing: "0.08em" }, children: token }),
|
|
1041
|
+
/* @__PURE__ */ jsx8("div", { style: { ...mono, fontSize: 10, color: "var(--text-muted)", marginTop: 2 }, children: label }),
|
|
1042
|
+
/* @__PURE__ */ jsx8("div", { style: { ...mono, fontSize: 10, color: "var(--text-disabled)", marginTop: 1 }, children: role })
|
|
1043
|
+
] }),
|
|
1044
|
+
/* @__PURE__ */ jsx8("div", { style: { fontFamily: fontFamilyVar(family), fontSize: `var(${token})`, fontWeight: weight, color: "var(--text-primary)", lineHeight: 1.2 }, children: TYPE_SPECIMENS[token] })
|
|
1045
|
+
] }, token)) })
|
|
1046
|
+
] }),
|
|
1047
|
+
/* @__PURE__ */ jsx8(Section, { label: "04 \u2014 Spacing", title: "Spacing Scale", description: "8px base grid. All values are multiples of 4px for sub-grid alignment.", children: /* @__PURE__ */ jsx8("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-3)" }, children: SPACING.map(({ token, rem, px }) => /* @__PURE__ */ jsxs5("div", { style: { display: "flex", alignItems: "center", gap: "var(--sp-4)" }, children: [
|
|
1048
|
+
/* @__PURE__ */ jsx8("div", { style: { ...mono, fontSize: 11, color: "var(--text-muted)", minWidth: 70 }, children: token }),
|
|
1049
|
+
/* @__PURE__ */ jsx8("div", { style: { flex: 1, height: 24, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx8("div", { style: { height: 8, width: `var(${token})`, background: "var(--accent)", borderRadius: 2, opacity: 0.7 } }) }),
|
|
1050
|
+
/* @__PURE__ */ jsx8("div", { style: { ...mono, fontSize: 11, color: "var(--text-secondary)", minWidth: 50 }, children: rem }),
|
|
1051
|
+
/* @__PURE__ */ jsx8("div", { style: { ...mono, fontSize: 11, color: "var(--text-muted)", minWidth: 40 }, children: px })
|
|
1052
|
+
] }, token)) }) }),
|
|
1053
|
+
/* @__PURE__ */ jsx8(Section, { label: "05 \u2014 Shape", title: "Border Radius", description: "Consistent corner radii for a cohesive, modern feel across all components.", children: /* @__PURE__ */ jsx8("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(110px, 1fr))", gap: "var(--sp-4)" }, children: RADII.map(({ token, label, value }) => /* @__PURE__ */ jsxs5("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "var(--sp-3)" }, children: [
|
|
1054
|
+
/* @__PURE__ */ jsx8("div", { style: { width: 64, height: 64, background: "var(--bg-raised)", border: "1px solid var(--border-soft)", borderRadius: `var(${token})` } }),
|
|
1055
|
+
/* @__PURE__ */ jsxs5("div", { style: { textAlign: "center" }, children: [
|
|
1056
|
+
/* @__PURE__ */ jsx8("div", { style: { ...mono, fontSize: 10, color: "var(--accent)" }, children: label }),
|
|
1057
|
+
/* @__PURE__ */ jsx8("div", { style: { ...mono, fontSize: 10, color: "var(--text-muted)", marginTop: 2 }, children: value })
|
|
1058
|
+
] })
|
|
1059
|
+
] }, token)) }) }),
|
|
1060
|
+
/* @__PURE__ */ jsx8(Section, { label: "06 \u2014 Elevation", title: "Shadows", description: "Four shadow levels including an accent glow.", children: /* @__PURE__ */ jsx8("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))", gap: "var(--sp-6)" }, children: SHADOWS.map(({ token, label, desc }) => /* @__PURE__ */ jsxs5("div", { style: { padding: "var(--sp-8)", background: "var(--bg-surface)", borderRadius: "var(--brand-radius-lg)", boxShadow: `var(${token})` }, children: [
|
|
1061
|
+
/* @__PURE__ */ jsx8("div", { style: { ...mono, fontSize: 10, color: "var(--accent)", marginBottom: "var(--sp-1)" }, children: token }),
|
|
1062
|
+
/* @__PURE__ */ jsx8("div", { style: { ...mono, fontSize: 10, color: "var(--text-secondary)", marginBottom: "var(--sp-1)" }, children: label }),
|
|
1063
|
+
/* @__PURE__ */ jsx8("div", { style: { fontSize: "var(--brand-text-xs)", color: "var(--text-muted)" }, children: desc })
|
|
1064
|
+
] }, token)) }) }),
|
|
1065
|
+
/* @__PURE__ */ jsx8(Section, { label: "07 \u2014 Components", title: "UI Components", description: "Core interactive elements built from the token system above.", children: /* @__PURE__ */ jsx8(ComponentsSection, {}) }),
|
|
1066
|
+
/* @__PURE__ */ jsxs5(Section, { label: "08 \u2014 Motion", title: "Animation Tokens", description: "Subtle, purposeful motion. Never decorative \u2014 always communicates state or hierarchy.", children: [
|
|
1067
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Easing" }),
|
|
1068
|
+
/* @__PURE__ */ jsx8("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))", gap: "var(--sp-4)", marginBottom: "var(--sp-6)" }, children: EASINGS.map(({ token, label, value, use }) => /* @__PURE__ */ jsxs5("div", { style: { padding: "var(--sp-5)", background: "var(--bg-surface)", border: "1px solid var(--border-subtle)", borderRadius: "var(--brand-radius-md)" }, children: [
|
|
1069
|
+
/* @__PURE__ */ jsx8("div", { style: { ...mono, fontSize: 10, color: "var(--accent)", marginBottom: "var(--sp-2)" }, children: token }),
|
|
1070
|
+
/* @__PURE__ */ jsx8("div", { style: { fontFamily: "var(--brand-font-display)", fontSize: "var(--brand-text-md)", fontWeight: 700, color: "var(--text-primary)" }, children: label }),
|
|
1071
|
+
/* @__PURE__ */ jsx8("div", { style: { ...mono, fontSize: 10, color: "var(--text-muted)", marginTop: "var(--sp-2)" }, children: value }),
|
|
1072
|
+
/* @__PURE__ */ jsx8("div", { style: { fontSize: "var(--brand-text-xs)", color: "var(--text-secondary)", marginTop: "var(--sp-2)" }, children: use })
|
|
1073
|
+
] }, token)) }),
|
|
1074
|
+
/* @__PURE__ */ jsx8(SectionLabel, { children: "Duration" }),
|
|
1075
|
+
/* @__PURE__ */ jsx8("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))", gap: "var(--sp-4)" }, children: DURATIONS.map(({ token, label, value, use }) => /* @__PURE__ */ jsxs5("div", { style: { padding: "var(--sp-5)", background: "var(--bg-surface)", border: "1px solid var(--border-subtle)", borderRadius: "var(--brand-radius-md)" }, children: [
|
|
1076
|
+
/* @__PURE__ */ jsx8("div", { style: { ...mono, fontSize: 10, color: "var(--accent)", marginBottom: "var(--sp-2)" }, children: token }),
|
|
1077
|
+
/* @__PURE__ */ jsx8("div", { style: { fontFamily: "var(--brand-font-display)", fontSize: "var(--brand-text-xl)", fontWeight: 700, color: "var(--text-primary)" }, children: value }),
|
|
1078
|
+
/* @__PURE__ */ jsx8("div", { style: { ...mono, fontSize: 10, color: "var(--text-muted)", marginTop: "var(--sp-2)" }, children: label }),
|
|
1079
|
+
/* @__PURE__ */ jsx8("div", { style: { fontSize: "var(--brand-text-xs)", color: "var(--text-secondary)", marginTop: "var(--sp-2)" }, children: use })
|
|
1080
|
+
] }, token)) })
|
|
1081
|
+
] }),
|
|
1082
|
+
/* @__PURE__ */ jsx8(Footer, {})
|
|
1083
|
+
] }) });
|
|
1084
|
+
}
|
|
1085
|
+
function logoCardStyle(bg) {
|
|
1086
|
+
const backgrounds = {
|
|
1087
|
+
dark: "var(--bg-overlay)",
|
|
1088
|
+
glow: "#0D0C1A",
|
|
1089
|
+
light: "#F0EEF8"
|
|
1090
|
+
};
|
|
1091
|
+
const borders = {
|
|
1092
|
+
dark: "var(--border-subtle)",
|
|
1093
|
+
glow: "rgba(124,110,250,0.2)",
|
|
1094
|
+
light: "rgba(0,0,0,0.08)"
|
|
1095
|
+
};
|
|
1096
|
+
return {
|
|
1097
|
+
background: backgrounds[bg],
|
|
1098
|
+
border: `1px solid ${borders[bg]}`,
|
|
1099
|
+
borderRadius: "var(--brand-radius-lg)",
|
|
1100
|
+
padding: "var(--sp-8)",
|
|
1101
|
+
display: "flex",
|
|
1102
|
+
flexDirection: "column",
|
|
1103
|
+
alignItems: "center",
|
|
1104
|
+
gap: "var(--sp-4)"
|
|
1105
|
+
};
|
|
1106
|
+
}
|
|
1107
|
+
function logoLabelStyle(bg) {
|
|
1108
|
+
return {
|
|
1109
|
+
fontFamily: "var(--brand-font-mono)",
|
|
1110
|
+
fontSize: "var(--brand-text-xs)",
|
|
1111
|
+
color: bg === "light" ? "#5C5A6E" : "var(--text-muted)",
|
|
1112
|
+
letterSpacing: "0.08em"
|
|
1113
|
+
};
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
// src/assets/logo.svg
|
|
1117
|
+
var logo_default = 'data:image/svg+xml,<svg viewBox="0 0 160 36" fill="none" xmlns="http://www.w3.org/2000/svg">%0A <!-- Icon mark -->%0A <rect width="36" height="36" rx="8" fill="%2318181C"/>%0A <!-- A -->%0A <path d="M6 26 L13 10 L20 26" stroke="%237C6EFA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>%0A <line x1="9" y1="20.5" x2="17" y2="20.5" stroke="%237C6EFA" stroke-width="2" stroke-linecap="round"/>%0A <!-- G -->%0A <path d="M23 16.5 C23 13.5 25.5 12 28 12 C30.5 12 32 13.5 32 16.5 L32 18.5 L28.5 18.5 L28.5 16.5" stroke="%23F0EEF8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>%0A <path d="M23 16.5 C23 19 23 21.5 23 23 C23 25 25.5 26 28 26 C30.5 26 32 25 32 23 L32 18.5" stroke="%23F0EEF8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>%0A <!-- Wordmark text -->%0A <text x="48" y="26" font-family="Syne, sans-serif" font-weight="700" font-size="18" letter-spacing="-0.36">%0A <tspan fill="%23F0EEF8">Adarsh</tspan><tspan fill="%237C6EFA">.</tspan>%0A </text>%0A</svg>%0A';
|
|
1118
|
+
|
|
1119
|
+
// src/assets/logo-mark.svg
|
|
1120
|
+
var logo_mark_default = 'data:image/svg+xml,<svg viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">%0A <rect width="64" height="64" rx="14" fill="%23111113"/>%0A <!-- A -->%0A <path d="M14 46 L24 20 L34 46" stroke="%237C6EFA" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>%0A <line x1="18" y1="37" x2="30" y2="37" stroke="%237C6EFA" stroke-width="2.5" stroke-linecap="round"/>%0A <!-- G -->%0A <path d="M38 28 C38 23 42 20 47 20 C52 20 55 23 55 28 L55 32 L49 32 L49 29" stroke="%23F0EEF8" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>%0A <path d="M38 28 C38 33 38 38 38 40 C38 43.5 42 46 47 46 C52 46 55 43.5 55 40 L55 32" stroke="%23F0EEF8" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>%0A</svg>%0A';
|
|
1121
|
+
|
|
1122
|
+
// src/assets/favicon.svg
|
|
1123
|
+
var favicon_default = 'data:image/svg+xml,<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">%0A <rect width="32" height="32" rx="7" fill="%23111113"/>%0A <!-- A \u2014 scaled 0.5x from 64x64 mark -->%0A <path d="M7 23 L12 10 L17 23" stroke="%237C6EFA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>%0A <line x1="9" y1="18.5" x2="15" y2="18.5" stroke="%237C6EFA" stroke-width="1.5" stroke-linecap="round"/>%0A <!-- G \u2014 scaled 0.5x from 64x64 mark -->%0A <path d="M19 14 C19 11.5 21 10 23.5 10 C26 10 27.5 11.5 27.5 14 L27.5 16 L24.5 16 L24.5 14.5" stroke="%23F0EEF8" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>%0A <path d="M19 14 C19 16.5 19 19 19 20 C19 21.75 21 23 23.5 23 C26 23 27.5 21.75 27.5 20 L27.5 16" stroke="%23F0EEF8" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>%0A</svg>%0A';
|
|
1124
|
+
export {
|
|
1125
|
+
AgMark,
|
|
1126
|
+
AgWordmark,
|
|
1127
|
+
DocsLayout,
|
|
1128
|
+
Footer,
|
|
1129
|
+
ThemePage,
|
|
1130
|
+
ThemeProvider,
|
|
1131
|
+
ThemeToggle,
|
|
1132
|
+
favicon_default as favicon,
|
|
1133
|
+
logo_default as logo,
|
|
1134
|
+
logo_mark_default as logoMark,
|
|
1135
|
+
useTheme
|
|
1136
|
+
};
|