@deckai/deck-ui 0.0.4 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,963 @@
1
+ import * as React21 from 'react';
2
+ import React21__default, { useState, useMemo, useCallback, useId } from 'react';
3
+ import * as Popover from '@radix-ui/react-popover';
4
+ import { clsx } from 'clsx';
5
+ import { twMerge } from 'tailwind-merge';
6
+ import { IconMap } from '@deckai/icons';
7
+ import * as RadixTabs from '@radix-ui/react-tabs';
8
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
9
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
10
+ import tailwindAnimate from 'tailwindcss-animate';
11
+
12
+ // src/components/Navbar.tsx
13
+
14
+ // src/utils/tailwind.ts
15
+ var generateSafelist = (colors2, typography2) => {
16
+ const colorNames = Object.keys(colors2);
17
+ colorNames.forEach((colorName) => {
18
+ if (typeof colors2[colorName] === "object") {
19
+ Object.keys(colors2[colorName]).forEach((shade) => {
20
+ });
21
+ }
22
+ });
23
+ Object.entries(typography2).forEach(([family, sizes]) => {
24
+ Object.keys(sizes).forEach((size) => {
25
+ });
26
+ });
27
+ const breakpoints = ["sm", "md", "lg", "xl", "2xl"];
28
+ const typographyClasses = Object.entries(typography2).flatMap(
29
+ ([category, sizes]) => Object.keys(sizes).map((size) => `text-${category}-${size}`)
30
+ );
31
+ const responsiveTypographyClasses = typographyClasses.flatMap(
32
+ (className) => breakpoints.map((breakpoint) => `${breakpoint}:${className}`)
33
+ );
34
+ return [
35
+ ...typographyClasses,
36
+ ...responsiveTypographyClasses
37
+ // ... rest of your safelist
38
+ ];
39
+ };
40
+ var focusRingStyles = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";
41
+ var focusRingStylesCoerced = "ring-2 ring-ring ring-offset-2";
42
+
43
+ // src/components/Pressable.tsx
44
+ var Pressable = ({
45
+ children,
46
+ type = "button",
47
+ className,
48
+ ...props
49
+ }) => /* @__PURE__ */ React21__default.createElement(
50
+ "button",
51
+ {
52
+ type,
53
+ className: `appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className}`,
54
+ ...props
55
+ },
56
+ children
57
+ );
58
+
59
+ // src/components/Avatar.tsx
60
+ var Avatar = ({ src, size = 48, onClick, ...props }) => {
61
+ const sizeStyle = typeof size === "number" ? `${size}px` : size;
62
+ const content = /* @__PURE__ */ React21__default.createElement(
63
+ "img",
64
+ {
65
+ src,
66
+ alt: "avatar",
67
+ className: "rounded-full",
68
+ style: {
69
+ width: sizeStyle,
70
+ height: sizeStyle
71
+ },
72
+ ...props
73
+ }
74
+ );
75
+ return onClick ? /* @__PURE__ */ React21__default.createElement(Pressable, { onClick }, content) : content;
76
+ };
77
+ function cn(...inputs) {
78
+ return twMerge(clsx(inputs));
79
+ }
80
+ var COLOR_MAP = {
81
+ primary: "#080808",
82
+ secondary: "#666666",
83
+ white: "#ffffff",
84
+ primaryBlue: "#089CCB"
85
+ };
86
+ var BREAKPOINT_MAP = {
87
+ sm: "@media (min-width: 640px)",
88
+ md: "@media (min-width: 768px)",
89
+ lg: "@media (min-width: 1024px)",
90
+ xl: "@media (min-width: 1280px)",
91
+ "2xl": "@media (min-width: 1536px)"
92
+ };
93
+ var processSizes = (sizes) => {
94
+ if (!sizes) return { width: "24px", height: "24px" };
95
+ const sizeArray = Array.isArray(sizes) ? sizes : [sizes];
96
+ const baseSize = typeof sizeArray[0] === "number" ? sizeArray[0] : 24;
97
+ const style = {
98
+ width: `${baseSize}px`,
99
+ height: `${baseSize}px`
100
+ };
101
+ const mediaQueries = sizeArray.filter(
102
+ (size) => typeof size === "string" && size.includes(":")
103
+ ).reduce(
104
+ (acc, size) => {
105
+ const [breakpoint, value] = size.split(":");
106
+ acc[BREAKPOINT_MAP[breakpoint]] = {
107
+ width: `${value}px`,
108
+ height: `${value}px`
109
+ };
110
+ return acc;
111
+ },
112
+ {}
113
+ );
114
+ if (Object.keys(mediaQueries).length > 0) {
115
+ style["@media"] = mediaQueries;
116
+ }
117
+ return style;
118
+ };
119
+ var Icon = React21__default.forwardRef(
120
+ ({
121
+ name,
122
+ size = 24,
123
+ color = "primary",
124
+ title,
125
+ className,
126
+ style = {},
127
+ ...props
128
+ }, ref) => {
129
+ const IconComponent = IconMap[name];
130
+ const sizeStyles = processSizes(size);
131
+ return /* @__PURE__ */ React21__default.createElement(
132
+ "div",
133
+ {
134
+ className: cn("flex justify-center items-center", className),
135
+ style: {
136
+ ...sizeStyles,
137
+ ["--icon-stroke"]: COLOR_MAP[color],
138
+ ...style
139
+ }
140
+ },
141
+ /* @__PURE__ */ React21__default.createElement(
142
+ IconComponent,
143
+ {
144
+ ref,
145
+ "aria-hidden": !title,
146
+ "aria-label": title,
147
+ stroke: name.includes("filled") ? void 0 : COLOR_MAP[color],
148
+ ...props
149
+ }
150
+ )
151
+ );
152
+ }
153
+ );
154
+ Icon.displayName = "Icon";
155
+
156
+ // src/components/Input.tsx
157
+ var Input = ({
158
+ className,
159
+ end,
160
+ iconName,
161
+ color,
162
+ size,
163
+ title,
164
+ ...props
165
+ }) => /* @__PURE__ */ React21.createElement("div", { className: "relative" }, /* @__PURE__ */ React21.createElement(
166
+ "input",
167
+ {
168
+ className: cn(
169
+ `font-sans flex w-full rounded-lg border border-secondary-50 bg-background px-3 py-3 text-secondary ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-secondary text-text-primary ${focusRingStyles} disabled:cursor-not-allowed disabled:opacity-50 md:text-md`,
170
+ end && "pr-10",
171
+ className
172
+ ),
173
+ ...props
174
+ }
175
+ ), end && /* @__PURE__ */ React21.createElement("div", { className: "absolute inset-y-0 right-0 flex items-center pr-3" }, iconName ? /* @__PURE__ */ React21.createElement(Icon, { name: iconName, color, size, title }) : end));
176
+ var Option = ({ value, label, onChange, selected }) => /* @__PURE__ */ React21__default.createElement(
177
+ "button",
178
+ {
179
+ type: "button",
180
+ className: cn(
181
+ "relative w-full h-full text-left px-2 py-1.5 text-sm cursor-pointer hover:bg-gray-100 rounded",
182
+ selected && "bg-gray-100"
183
+ ),
184
+ onClick: () => {
185
+ onChange?.(value);
186
+ }
187
+ },
188
+ label
189
+ );
190
+
191
+ // src/components/Combobox.tsx
192
+ var Combobox = ({
193
+ options,
194
+ placeholder = "Select an item...",
195
+ value,
196
+ onChange,
197
+ end,
198
+ className
199
+ }) => {
200
+ const [open, setOpen] = useState(false);
201
+ const [inputValue, setInputValue] = useState(value);
202
+ const selectedOption = useMemo(
203
+ () => options.find((option) => option.value === inputValue),
204
+ [inputValue, options]
205
+ );
206
+ const filteredItems = options.filter(
207
+ (option) => inputValue ? option.label.toLowerCase().includes(inputValue.toLowerCase()) : options
208
+ );
209
+ const handleOptionChange = useCallback(
210
+ (option) => {
211
+ onChange(option);
212
+ setOpen(false);
213
+ setInputValue(selectedOption?.label);
214
+ },
215
+ [onChange, selectedOption?.label]
216
+ );
217
+ console.log({ open }, "wtf");
218
+ return /* @__PURE__ */ React21__default.createElement(Popover.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React21__default.createElement(
219
+ "div",
220
+ {
221
+ className: `relative w-full font-sans text-text-secondary ${className}`
222
+ },
223
+ /* @__PURE__ */ React21__default.createElement(Popover.Trigger, { asChild: true }, /* @__PURE__ */ React21__default.createElement("div", { className: "flex" }, /* @__PURE__ */ React21__default.createElement("div", { className: "relative flex-1" }, /* @__PURE__ */ React21__default.createElement(
224
+ Input,
225
+ {
226
+ placeholder,
227
+ value: inputValue,
228
+ onChange: (e) => setInputValue(e.target.value),
229
+ end,
230
+ className: `flex-1 ${open && focusRingStylesCoerced}`
231
+ }
232
+ )))),
233
+ /* @__PURE__ */ React21__default.createElement(Popover.Portal, null, /* @__PURE__ */ React21__default.createElement(
234
+ Popover.Content,
235
+ {
236
+ className: "w-[--radix-popover-trigger-width] p-1 bg-white rounded-md shadow-lg border mt-1",
237
+ sideOffset: 5
238
+ },
239
+ /* @__PURE__ */ React21__default.createElement("div", { className: "max-h-60 overflow-auto flex flex-col items-start" }, filteredItems.length > 0 ? filteredItems.map(({ label, value: optionValue }, index) => /* @__PURE__ */ React21__default.createElement(
240
+ Option,
241
+ {
242
+ onChange: handleOptionChange,
243
+ value: optionValue,
244
+ key: index,
245
+ label
246
+ }
247
+ )) : /* @__PURE__ */ React21__default.createElement("div", { className: "px-2 py-1.5 text-sm text-gray-500" }, "No results found"))
248
+ ))
249
+ ));
250
+ };
251
+ var Logo = ({ width = 76, height = 25 }) => /* @__PURE__ */ React21__default.createElement(
252
+ "svg",
253
+ {
254
+ width,
255
+ height,
256
+ viewBox: "0 0 76 25",
257
+ fill: "none",
258
+ xmlns: "http://www.w3.org/2000/svg"
259
+ },
260
+ /* @__PURE__ */ React21__default.createElement(
261
+ "path",
262
+ {
263
+ d: "M0.8 15.584C0.8 13.9413 1.12 12.4693 1.76 11.168C2.4 9.84533 3.27467 8.8 4.384 8.032C5.49333 7.264 6.77333 6.88 8.224 6.88C9.39733 6.88 10.464 7.168 11.424 7.744C12.384 8.29867 13.1093 9.03467 13.6 9.952V0.639999H18.72V18.304C18.72 18.816 18.8053 19.1787 18.976 19.392C19.1467 19.584 19.424 19.7013 19.808 19.744V24C18.912 24.1707 18.1867 24.256 17.632 24.256C16.7573 24.256 16.0427 24.064 15.488 23.68C14.9547 23.296 14.624 22.7627 14.496 22.08L14.4 21.216C13.8027 22.2613 12.992 23.04 11.968 23.552C10.944 24.064 9.86667 24.32 8.736 24.32C7.584 24.32 6.51733 24.1067 5.536 23.68C4.576 23.232 3.73333 22.6133 3.008 21.824C2.304 21.0347 1.76 20.1067 1.376 19.04C0.992 17.9733 0.8 16.8213 0.8 15.584ZM13.632 17.664V14.144C13.4187 13.568 13.1093 13.0667 12.704 12.64C12.32 12.2133 11.872 11.872 11.36 11.616C10.8693 11.36 10.368 11.232 9.856 11.232C9.30133 11.232 8.78933 11.3493 8.32 11.584C7.872 11.8187 7.47733 12.1493 7.136 12.576C6.79467 12.9813 6.528 13.4507 6.336 13.984C6.16533 14.5173 6.08 15.0827 6.08 15.68C6.08 16.2987 6.176 16.8747 6.368 17.408C6.58133 17.92 6.86933 18.3787 7.232 18.784C7.59467 19.168 8.02133 19.4667 8.512 19.68C9.00267 19.8933 9.536 20 10.112 20C10.4747 20 10.8267 19.9467 11.168 19.84C11.5093 19.712 11.8293 19.552 12.128 19.36C12.448 19.168 12.736 18.9227 12.992 18.624C13.248 18.3253 13.4613 18.0053 13.632 17.664ZM30.0895 24.32C28.6602 24.32 27.3908 24.096 26.2815 23.648C25.1722 23.1787 24.2228 22.5493 23.4335 21.76C22.6655 20.9707 22.0788 20.064 21.6735 19.04C21.2682 17.9947 21.0655 16.9067 21.0655 15.776C21.0655 14.1547 21.4175 12.6827 22.1215 11.36C22.8468 10.016 23.8815 8.93867 25.2255 8.128C26.5695 7.296 28.1908 6.88 30.0895 6.88C31.9882 6.88 33.5988 7.28533 34.9215 8.096C36.2655 8.90667 37.2895 9.97333 37.9935 11.296C38.6975 12.5973 39.0495 14.016 39.0495 15.552C39.0495 15.8507 39.0282 16.1493 38.9855 16.448C38.9642 16.7253 38.9428 16.9707 38.9215 17.184H26.5055C26.5695 17.9307 26.7722 18.56 27.1135 19.072C27.4762 19.584 27.9348 19.9787 28.4895 20.256C29.0442 20.512 29.6308 20.64 30.2495 20.64C31.0175 20.64 31.7322 20.4587 32.3935 20.096C33.0762 19.7333 33.5455 19.2427 33.8015 18.624L38.1535 19.84C37.7268 20.7147 37.1188 21.4933 36.3295 22.176C35.5615 22.8373 34.6442 23.36 33.5775 23.744C32.5322 24.128 31.3695 24.32 30.0895 24.32ZM26.3775 14.048H33.6735C33.5882 13.344 33.3855 12.736 33.0655 12.224C32.7455 11.6907 32.3188 11.2853 31.7855 11.008C31.2522 10.7093 30.6655 10.56 30.0255 10.56C29.3642 10.56 28.7668 10.7093 28.2335 11.008C27.7215 11.2853 27.3055 11.6907 26.9855 12.224C26.6655 12.736 26.4628 13.344 26.3775 14.048ZM48.762 24.32C47.3327 24.32 46.0633 24.0853 44.954 23.616C43.8447 23.1467 42.8953 22.5067 42.106 21.696C41.338 20.8853 40.7513 19.9573 40.346 18.912C39.9407 17.8667 39.738 16.7573 39.738 15.584C39.738 14.048 40.09 12.6187 40.794 11.296C41.5193 9.97333 42.554 8.90667 43.898 8.096C45.242 7.28533 46.8633 6.88 48.762 6.88C50.682 6.88 52.3033 7.296 53.626 8.128C54.97 8.93867 55.9727 10.0053 56.634 11.328L51.642 12.832C51.322 12.32 50.906 11.9253 50.394 11.648C49.9033 11.3707 49.3487 11.232 48.73 11.232C48.026 11.232 47.386 11.4133 46.81 11.776C46.2553 12.1387 45.8073 12.64 45.466 13.28C45.146 13.92 44.986 14.688 44.986 15.584C44.986 16.4587 45.1567 17.2267 45.498 17.888C45.8393 18.5493 46.2873 19.072 46.842 19.456C47.3967 19.8187 48.026 20 48.73 20C49.1567 20 49.5513 19.936 49.914 19.808C50.298 19.6587 50.6393 19.456 50.938 19.2C51.258 18.944 51.5033 18.656 51.674 18.336L56.666 19.872C56.2607 20.7253 55.674 21.4933 54.906 22.176C54.1593 22.8373 53.274 23.36 52.25 23.744C51.226 24.128 50.0633 24.32 48.762 24.32ZM69.636 24L65.252 17.28L63.46 19.104V24H58.34V0.639999H63.46V14.144L69.156 7.2H74.564L68.516 14.432L75.076 24H69.636Z",
264
+ fill: "#080808"
265
+ }
266
+ )
267
+ );
268
+ var NavbarItem = ({
269
+ iconName,
270
+ hasNotification,
271
+ color,
272
+ title,
273
+ ...props
274
+ }) => {
275
+ console.log({ hasNotification });
276
+ return /* @__PURE__ */ React21__default.createElement(Pressable, { className: "relative px-7 py-3", ...props }, /* @__PURE__ */ React21__default.createElement(Icon, { name: iconName, color, title }), hasNotification && /* @__PURE__ */ React21__default.createElement("div", { className: "w-3 h-3 bg-red-500 rounded-full absolute top-3 right-5" }));
277
+ };
278
+
279
+ // src/components/Navbar.tsx
280
+ var Navbar = ({
281
+ searchOptions,
282
+ onSearchChange,
283
+ navbarItems,
284
+ onLogoClick,
285
+ onProfileClick,
286
+ avatarImage
287
+ }) => /* @__PURE__ */ React21__default.createElement("div", { className: "flex py-6 px-20 justify-between" }, /* @__PURE__ */ React21__default.createElement("div", { className: "flex flex-1 gap-6 items-center" }, /* @__PURE__ */ React21__default.createElement(Pressable, { onClick: onLogoClick, title: "Deck AI" }, /* @__PURE__ */ React21__default.createElement(Logo, null)), /* @__PURE__ */ React21__default.createElement(
288
+ Combobox,
289
+ {
290
+ options: searchOptions,
291
+ placeholder: "Search for a creator, type of content, or platform...",
292
+ end: /* @__PURE__ */ React21__default.createElement(Icon, { name: "search-normal" }),
293
+ onChange: onSearchChange,
294
+ className: "flex-1 mr-8"
295
+ }
296
+ )), /* @__PURE__ */ React21__default.createElement("div", { className: "flex gap-4" }, /* @__PURE__ */ React21__default.createElement("div", { className: "flex gap-2 border-b-2 border-stroke items-center" }, navbarItems.map(({ iconName, title, onClick }) => /* @__PURE__ */ React21__default.createElement(
297
+ NavbarItem,
298
+ {
299
+ key: title,
300
+ iconName,
301
+ title,
302
+ onClick
303
+ }
304
+ ))), /* @__PURE__ */ React21__default.createElement("div", { className: "flex" }, /* @__PURE__ */ React21__default.createElement(Avatar, { onClick: onProfileClick, src: avatarImage }))));
305
+ var HEADING_ELEMENT_MAP = {
306
+ xl: "h1",
307
+ lg: "h1",
308
+ md: "h2",
309
+ sm: "h3",
310
+ xs: "h4"
311
+ };
312
+ var getElementFromVariant = (variant) => {
313
+ const [category, size] = variant.split("-");
314
+ if (category === "heading") {
315
+ return HEADING_ELEMENT_MAP[size] || "p";
316
+ }
317
+ if (category === "label") {
318
+ return "label";
319
+ }
320
+ return "p";
321
+ };
322
+ var fontWeight = {
323
+ light: "font-light",
324
+ regular: "font-regular",
325
+ semibold: "font-semibold",
326
+ bold: "font-bold"
327
+ };
328
+ var processVariants = (variants) => {
329
+ if (!variants) return "text-body-default";
330
+ const variantArray = Array.isArray(variants) ? variants : [variants];
331
+ return variantArray.map((variant) => {
332
+ if (variant.includes(":")) {
333
+ const [breakpoint, typographyClass] = variant.split(":");
334
+ return `${breakpoint}:text-${typographyClass}`;
335
+ }
336
+ return Array.isArray(variants) ? `lg:text-${variant}` : `text-${variant}`;
337
+ }).join(" ");
338
+ };
339
+ var Text = React21__default.forwardRef(
340
+ ({
341
+ variant = "body-default",
342
+ color = "text-primary",
343
+ as,
344
+ className,
345
+ children,
346
+ weight,
347
+ ...props
348
+ }, ref) => {
349
+ const typographyClasses = processVariants(variant);
350
+ const colorClasses = color && color === "inherit" ? "inherit" : color ? `text-${color}` : "";
351
+ const suggestedElement = React21__default.useMemo(() => {
352
+ const baseVariant = typeof variant === "string" ? variant.split(":").pop() : Array.isArray(variant) ? variant[0].split(":").pop() : "body-default";
353
+ return getElementFromVariant(baseVariant);
354
+ }, [variant]);
355
+ const Component = as || suggestedElement;
356
+ return (
357
+ // @ts-expect-error TODO: figure this out
358
+ /* @__PURE__ */ React21__default.createElement(
359
+ Component,
360
+ {
361
+ ref,
362
+ className: `font-sans antialiased ${typographyClasses} ${colorClasses} ${weight ? `!${fontWeight[weight]}` : ""} ${className ?? ""}`,
363
+ ...props
364
+ },
365
+ children
366
+ )
367
+ );
368
+ }
369
+ );
370
+ Text.displayName = "Text";
371
+
372
+ // src/components/Link.tsx
373
+ var Link = ({
374
+ children,
375
+ color = "text-primary",
376
+ variant = "body-default-semibold",
377
+ href,
378
+ className,
379
+ ...props
380
+ }) => /* @__PURE__ */ React21__default.createElement(Text, { variant, color }, /* @__PURE__ */ React21__default.createElement(
381
+ "a",
382
+ {
383
+ href,
384
+ className: cn(
385
+ "hover:text-text-primary",
386
+ "transition-colors duration-200",
387
+ "outline-none focus-visible:underline",
388
+ className
389
+ ),
390
+ ...props
391
+ },
392
+ children
393
+ ));
394
+ var Tabs = React21__default.forwardRef(
395
+ ({ items, defaultValue, className = "", onChange }, ref) => {
396
+ return /* @__PURE__ */ React21__default.createElement(
397
+ RadixTabs.Root,
398
+ {
399
+ defaultValue: defaultValue || items[0]?.value,
400
+ onValueChange: onChange,
401
+ className
402
+ },
403
+ /* @__PURE__ */ React21__default.createElement(
404
+ RadixTabs.List,
405
+ {
406
+ ref,
407
+ className: "flex gap-8 border-b border-stroke mb-8"
408
+ },
409
+ items.map((item) => /* @__PURE__ */ React21__default.createElement(
410
+ RadixTabs.Trigger,
411
+ {
412
+ key: item.value,
413
+ value: item.value,
414
+ className: "group pb-4 relative flex-1"
415
+ },
416
+ /* @__PURE__ */ React21__default.createElement(
417
+ Text,
418
+ {
419
+ variant: "body-lg-semibold",
420
+ color: "text-secondary",
421
+ className: "group-data-[state=active]:text-text-primary transition-colors"
422
+ },
423
+ item.label
424
+ ),
425
+ /* @__PURE__ */ React21__default.createElement("div", { className: "absolute bottom-0 left-0 right-0 h-1 bg-primary-100 scale-x-0 group-data-[state=active]:scale-x-100 transition-transform" })
426
+ ))
427
+ ),
428
+ items.map((item) => /* @__PURE__ */ React21__default.createElement(RadixTabs.Content, { key: item.value, value: item.value }, item.content))
429
+ );
430
+ }
431
+ );
432
+ Tabs.displayName = "Tabs";
433
+ var Tag = ({
434
+ children,
435
+ padded,
436
+ color = "primary",
437
+ ...props
438
+ }) => /* @__PURE__ */ React21__default.createElement(
439
+ "div",
440
+ {
441
+ className: `rounded bg-secondary-400 ${padded ? "px-3" : "px-2"} py-1.5 h-min`,
442
+ ...props
443
+ },
444
+ typeof children === "string" ? /* @__PURE__ */ React21__default.createElement(
445
+ Text,
446
+ {
447
+ color: color === "primary" ? "primary-100" : "text-primary",
448
+ variant: ["body-default-medium", "md:body-xs-medium"],
449
+ className: "truncate"
450
+ },
451
+ children
452
+ ) : children
453
+ );
454
+
455
+ // src/components/WorkCard.tsx
456
+ var WorkCard = ({
457
+ socialIconName,
458
+ tags,
459
+ caption,
460
+ playCount,
461
+ backgroundImage
462
+ }) => {
463
+ return /* @__PURE__ */ React21__default.createElement(
464
+ "div",
465
+ {
466
+ className: `flex flex-col justify-between p-4 w-[292px] h-[403px] rounded-2xl relative overflow-hidden`,
467
+ style: {
468
+ backgroundColor: "#e7e7e7",
469
+ backgroundImage: `url(${backgroundImage})`,
470
+ backgroundSize: "cover",
471
+ backgroundPosition: "center",
472
+ backgroundRepeat: "no-repeat"
473
+ }
474
+ },
475
+ /* @__PURE__ */ React21__default.createElement("div", { className: "flex justify-between px-4 py-2 items-center" }, /* @__PURE__ */ React21__default.createElement("div", { className: "flex items-center justify-center bg-overlay h-10 w-10 rounded-full" }, /* @__PURE__ */ React21__default.createElement(Icon, { name: socialIconName, size: 20, className: "fill-white" })), /* @__PURE__ */ React21__default.createElement("div", { className: "flex gap-2 items-center" }, tags.map((tag, index) => /* @__PURE__ */ React21__default.createElement(Tag, { padded: true, key: index, color: "text" }, tag)))),
476
+ /* @__PURE__ */ React21__default.createElement("div", { className: "flex flex-col gap-1 p-2 rounded-lg bg-overlay" }, /* @__PURE__ */ React21__default.createElement(Text, { variant: "body-default-medium", className: "text-white" }, caption), /* @__PURE__ */ React21__default.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React21__default.createElement(Icon, { name: "play", size: 16, color: "white" }), /* @__PURE__ */ React21__default.createElement(Text, { variant: "body-xs-medium", className: "text-white" }, playCount)))
477
+ );
478
+ };
479
+ var DefaultSeparator = () => /* @__PURE__ */ React21__default.createElement(Text, { variant: "body-lg", color: "text-primary" }, "/");
480
+ var Breadcrumbs = React21__default.forwardRef(
481
+ ({ items, className, SeparatorComponent = DefaultSeparator, onHomeClick }, ref) => {
482
+ const renderSeparator = () => typeof SeparatorComponent === "function" ? /* @__PURE__ */ React21__default.createElement(SeparatorComponent, null) : React21__default.cloneElement(SeparatorComponent);
483
+ return /* @__PURE__ */ React21__default.createElement(
484
+ "nav",
485
+ {
486
+ ref,
487
+ "aria-label": "Breadcrumb",
488
+ className: cn("relative", className)
489
+ },
490
+ /* @__PURE__ */ React21__default.createElement("ol", { className: "flex flex-wrap items-center gap-2" }, /* @__PURE__ */ React21__default.createElement(
491
+ Icon,
492
+ {
493
+ onClick: onHomeClick,
494
+ name: "home",
495
+ size: 20,
496
+ color: "secondary",
497
+ className: "pb-0.5"
498
+ }
499
+ ), renderSeparator(), items.map((item, index) => {
500
+ const isLastItem = index === items.length - 1;
501
+ return isLastItem || !item.href ? /* @__PURE__ */ React21__default.createElement(
502
+ Text,
503
+ {
504
+ variant: isLastItem ? "body-default-semibold" : "body-default",
505
+ color: isLastItem ? "text-primary" : "text-secondary",
506
+ "aria-current": isLastItem ? "page" : void 0,
507
+ key: item.label
508
+ },
509
+ item.label
510
+ ) : /* @__PURE__ */ React21__default.createElement(React21__default.Fragment, null, /* @__PURE__ */ React21__default.createElement(Link, { href: item.href, key: item.label }, item.label), renderSeparator());
511
+ }))
512
+ );
513
+ }
514
+ );
515
+ Breadcrumbs.displayName = "Breadcrumbs";
516
+ var Tooltip = ({
517
+ content,
518
+ children,
519
+ side = "bottom",
520
+ align = "center",
521
+ className,
522
+ delayDuration = 200
523
+ }) => /* @__PURE__ */ React21.createElement(TooltipPrimitive.Provider, { delayDuration }, /* @__PURE__ */ React21.createElement(TooltipPrimitive.Root, null, /* @__PURE__ */ React21.createElement(TooltipPrimitive.Trigger, { asChild: true }, /* @__PURE__ */ React21.createElement("span", { tabIndex: 0 }, children)), /* @__PURE__ */ React21.createElement(TooltipPrimitive.Portal, null, /* @__PURE__ */ React21.createElement(
524
+ TooltipPrimitive.Content,
525
+ {
526
+ side,
527
+ align,
528
+ sideOffset: 4,
529
+ className: cn(
530
+ "z-50 overflow-hidden rounded-lg",
531
+ "bg-text-primary px-3 py-1.5",
532
+ "text-xs text-white",
533
+ "animate-in fade-in-0 zoom-in-95",
534
+ "data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
535
+ "data-[side=bottom]:slide-in-from-top-2",
536
+ "data-[side=top]:slide-in-from-bottom-2",
537
+ "select-none",
538
+ "max-w-60",
539
+ className
540
+ )
541
+ },
542
+ content,
543
+ /* @__PURE__ */ React21.createElement(
544
+ TooltipPrimitive.Arrow,
545
+ {
546
+ className: "fill-text-primary",
547
+ width: 10,
548
+ height: 5
549
+ }
550
+ )
551
+ ))));
552
+ var SocialCard = ({
553
+ icon,
554
+ followers,
555
+ engagement,
556
+ ...pressableProps
557
+ }) => /* @__PURE__ */ React21__default.createElement(Pressable, { ...pressableProps }, /* @__PURE__ */ React21__default.createElement("div", { className: "flex gap-4 px-6 py-4 border border-secondary rounded-lg" }, /* @__PURE__ */ React21__default.createElement(Icon, { name: icon, size: 40 }), /* @__PURE__ */ React21__default.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React21__default.createElement(Icon, { name: "profile", size: 20 }), /* @__PURE__ */ React21__default.createElement(Text, { variant: ["body-default-medium", "md:body-xs-medium"] }, followers)), /* @__PURE__ */ React21__default.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React21__default.createElement(Icon, { name: "arrow-swap-horizontal", className: "rotate-90", size: 20 }), /* @__PURE__ */ React21__default.createElement(Text, { variant: ["body-default-medium", "md:body-xs-medium"] }, engagement))));
558
+ var Switch = React21.forwardRef(({ className, label, description, ...props }, ref) => /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React21.createElement(
559
+ SwitchPrimitive.Root,
560
+ {
561
+ className: cn(
562
+ "peer inline-flex h-6 w-11 shrink-0 cursor-pointer",
563
+ "items-center rounded-full border-2 border-transparent",
564
+ "transition-colors focus-visible:outline-none",
565
+ focusRingStyles,
566
+ "disabled:cursor-not-allowed disabled:opacity-50",
567
+ "data-[state=checked]:bg-primary-50 data-[state=unchecked]:bg-secondary-50",
568
+ className
569
+ ),
570
+ ...props,
571
+ ref
572
+ },
573
+ /* @__PURE__ */ React21.createElement(
574
+ SwitchPrimitive.Thumb,
575
+ {
576
+ className: cn(
577
+ "pointer-events-none block h-5 w-5",
578
+ "rounded-full bg-white shadow-lg ring-0",
579
+ "transition-transform",
580
+ "data-[state=checked]:translate-x-5",
581
+ "data-[state=unchecked]:translate-x-0"
582
+ )
583
+ }
584
+ )
585
+ ), (label || description) && /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col" }, label && /* @__PURE__ */ React21.createElement(
586
+ "label",
587
+ {
588
+ className: "text-sm font-medium text-text-primary",
589
+ htmlFor: props.id
590
+ },
591
+ label
592
+ ), description && /* @__PURE__ */ React21.createElement("span", { className: "text-xs text-text-secondary" }, description))));
593
+ Switch.displayName = "Switch";
594
+ var Badge = React21.forwardRef(
595
+ ({ className, variant = "pink", iconName, children, ...props }, ref) => {
596
+ const variants = {
597
+ pink: "bg-tertiary-5",
598
+ orange: "bg-tertiary-15",
599
+ green: "bg-tertiary-25"
600
+ };
601
+ return /* @__PURE__ */ React21.createElement(
602
+ "span",
603
+ {
604
+ ref,
605
+ className: cn(
606
+ "inline-flex items-center gap-2",
607
+ "rounded-lg px-2 py-1",
608
+ "text-sm font-medium",
609
+ variants[variant],
610
+ className
611
+ ),
612
+ ...props
613
+ },
614
+ iconName && /* @__PURE__ */ React21.createElement(Icon, { size: 16, name: iconName }),
615
+ /* @__PURE__ */ React21.createElement(Text, { variant: "body-xxs-medium" }, children)
616
+ );
617
+ }
618
+ );
619
+ Badge.displayName = "Badge";
620
+ var filled = {
621
+ black: "bg-text-primary text-white",
622
+ // fade it slightly
623
+ accent: "bg-primary-100 text-white",
624
+ secondary: "bg-secondary-100 text-secondary"
625
+ };
626
+ var outlined = {
627
+ black: "border border-text-primary text-text-primary",
628
+ accent: "border border-primary-100 text-primary-100",
629
+ secondary: "border border-text-secondary text-secondary"
630
+ };
631
+ var Button = React21.forwardRef(
632
+ ({
633
+ className,
634
+ variant = "filled",
635
+ color = "black",
636
+ isLoading = false,
637
+ children,
638
+ disabled,
639
+ ...props
640
+ }, ref) => /* @__PURE__ */ React21.createElement(
641
+ "button",
642
+ {
643
+ ref,
644
+ className: `
645
+ px-7
646
+ py-2
647
+ inline-flex items-center justify-center
648
+ rounded-lg
649
+ transition-colors duration-200
650
+ ${focusRingStyles}
651
+ disabled:opacity-50 disabled:pointer-events-none
652
+ hover:opacity-80 active:scale-95
653
+ truncate
654
+ ${variant === "filled" ? filled[color] : outlined[color]}
655
+ ${className}
656
+ `,
657
+ disabled: disabled || isLoading,
658
+ type: "button",
659
+ ...props
660
+ },
661
+ typeof children === "string" ? /* @__PURE__ */ React21.createElement(Text, { variant: "body-default-bold", color: "inherit" }, children) : children
662
+ )
663
+ );
664
+ Button.displayName = "Button";
665
+
666
+ // src/components/ProfileCard.tsx
667
+ var ProfileCard = ({
668
+ profileImage,
669
+ name,
670
+ location,
671
+ memberSince,
672
+ interests,
673
+ badges
674
+ }) => {
675
+ const randomId = useId();
676
+ return /* @__PURE__ */ React21__default.createElement("div", { className: "lg:basis-[635px] p-10 rounded-xl border border-stroke relative flex gap-6" }, /* @__PURE__ */ React21__default.createElement(
677
+ Button,
678
+ {
679
+ variant: "outlined",
680
+ color: "secondary",
681
+ className: "absolute top-10 right-10 !px-2 py-2"
682
+ },
683
+ /* @__PURE__ */ React21__default.createElement(Icon, { color: "secondary", name: "edit-2" })
684
+ ), /* @__PURE__ */ React21__default.createElement("div", { className: "flex flex-row gap-6" }, /* @__PURE__ */ React21__default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React21__default.createElement("img", { src: profileImage, alt: "profile for fiona chen" }), /* @__PURE__ */ React21__default.createElement(Button, null, "Preview Profile"), /* @__PURE__ */ React21__default.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React21__default.createElement("div", { className: "flex flex-row justify-between" }, /* @__PURE__ */ React21__default.createElement(
685
+ Text,
686
+ {
687
+ as: "label",
688
+ htmlFor: randomId,
689
+ variant: "body-default-semibold",
690
+ color: "text-secondary"
691
+ },
692
+ "Private Mode"
693
+ ), /* @__PURE__ */ React21__default.createElement(Switch, { id: randomId })), /* @__PURE__ */ React21__default.createElement("div", { className: "flex flex-row gap-1" }, /* @__PURE__ */ React21__default.createElement(Text, { variant: "body-xs", color: "text-secondary" }, "What is this?"), /* @__PURE__ */ React21__default.createElement(Tooltip, { content: "Turning this on makes you not appear in searches. People who follow you will still be able to view your profile. Go to your settings to make changes to Private Mode." }, /* @__PURE__ */ React21__default.createElement(Icon, { name: "message-question", color: "secondary", size: 16 }))))), /* @__PURE__ */ React21__default.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ React21__default.createElement(Text, { as: "h1", variant: ["heading-lg", "md:heading-md"] }, name), /* @__PURE__ */ React21__default.createElement("div", { className: "flex gap-2 items-center" }, /* @__PURE__ */ React21__default.createElement(Icon, { name: "location", size: "md:16" }), /* @__PURE__ */ React21__default.createElement(
694
+ Text,
695
+ {
696
+ variant: ["body-lg", "md:body-default"],
697
+ color: "text-secondary"
698
+ },
699
+ location
700
+ )), /* @__PURE__ */ React21__default.createElement("div", { className: "flex gap-2 items-center" }, /* @__PURE__ */ React21__default.createElement(Icon, { name: "profile", size: "md:16" }), /* @__PURE__ */ React21__default.createElement(
701
+ Text,
702
+ {
703
+ variant: ["body-lg", "md:body-default"],
704
+ color: "text-secondary"
705
+ },
706
+ "Member Since",
707
+ " ",
708
+ /* @__PURE__ */ React21__default.createElement(Text, { as: "span", variant: ["body-lg", "md:body-default"] }, memberSince)
709
+ )), interests && /* @__PURE__ */ React21__default.createElement("div", { className: "flex flex-col gap-2 pt-6" }, /* @__PURE__ */ React21__default.createElement(Text, { variant: "heading-xs" }, "Interests"), /* @__PURE__ */ React21__default.createElement("div", { className: "flex flex-wrap gap-2" }, interests.map((interest, idx) => /* @__PURE__ */ React21__default.createElement(Tag, { key: idx }, interest)))), badges && /* @__PURE__ */ React21__default.createElement("div", { className: "flex gap-2 flex-wrap pt-6" }, badges.map((badge, idx) => /* @__PURE__ */ React21__default.createElement(Badge, { key: idx, ...badge }))))));
710
+ };
711
+ var ContactItem = ({
712
+ iconName,
713
+ children,
714
+ href,
715
+ ...linkProps
716
+ }) => /* @__PURE__ */ React21__default.createElement("div", { className: "row gap-2 flex items-center" }, /* @__PURE__ */ React21__default.createElement("div", { className: "bg-secondary-400 rounded-full p-2.5" }, /* @__PURE__ */ React21__default.createElement(Icon, { name: iconName, color: "primaryBlue", size: 18 })), /* @__PURE__ */ React21__default.createElement(
717
+ Text,
718
+ {
719
+ className: "hover:underline",
720
+ as: "a",
721
+ href,
722
+ ...linkProps,
723
+ variant: ["body-lg", "md:body-default-medium"]
724
+ },
725
+ children
726
+ ));
727
+
728
+ // src/components/AboutCard.tsx
729
+ var AboutCard = ({
730
+ interests,
731
+ contactItems,
732
+ description,
733
+ ...props
734
+ }) => /* @__PURE__ */ React21__default.createElement(
735
+ "div",
736
+ {
737
+ className: "border border-secondary rounded-2xl p-10 relative flex",
738
+ ...props
739
+ },
740
+ /* @__PURE__ */ React21__default.createElement(Button, { variant: "outlined", className: "absolute top-10 right-10 !px-2 py-2" }, /* @__PURE__ */ React21__default.createElement(Icon, { color: "primary", name: "edit-2" })),
741
+ /* @__PURE__ */ React21__default.createElement("div", { className: "flex basis-1/2 flex-col gap-2 pr-10" }, /* @__PURE__ */ React21__default.createElement(Text, { variant: "body-default" }, description)),
742
+ /* @__PURE__ */ React21__default.createElement("span", { className: "absolute bg-secondary-50 w-[1px] inset-x-1/2 inset-y-10" }),
743
+ /* @__PURE__ */ React21__default.createElement("div", { className: "flex flex-col pt-8 gap-4 pl-10" }, contactItems.map((contactProps) => /* @__PURE__ */ React21__default.createElement(ContactItem, { key: contactProps.title, ...contactProps })))
744
+ );
745
+ var colors = {
746
+ background: {
747
+ 50: "#F6F6F6",
748
+ 100: "#F7F7F5"
749
+ },
750
+ primary: {
751
+ 50: "#5B3DE3",
752
+ 100: "#089CCB"
753
+ },
754
+ secondary: {
755
+ 50: "#D9D9D9",
756
+ 100: "#F6F5FF",
757
+ 200: "#EBE8FC",
758
+ 300: "#BDAEFF",
759
+ 400: "#E7F7FC",
760
+ 500: "#DAF6FF",
761
+ 600: "#B3EDFF"
762
+ },
763
+ tertiary: {
764
+ 5: "#E33D6550",
765
+ 10: "#E33D65",
766
+ 15: "#F59E0B50",
767
+ 20: "#F59E0B",
768
+ 25: "#10B98150",
769
+ 30: "#10B981"
770
+ },
771
+ stroke: "#ECECEC",
772
+ text: {
773
+ primary: "#080808",
774
+ secondary: "#666666",
775
+ white: "#FFFFFF",
776
+ "primary-blue": "#F7F7F5"
777
+ },
778
+ overlay: "rgba(26, 26, 28, 0.40)"
779
+ };
780
+ var typography = {
781
+ heading: {
782
+ xl: {
783
+ fontSize: "56px",
784
+ letterSpacing: "-2%",
785
+ fontWeight: "700"
786
+ // Bold
787
+ },
788
+ lg: {
789
+ fontSize: "40px",
790
+ letterSpacing: "-2%",
791
+ fontWeight: "700"
792
+ // Bold
793
+ },
794
+ md: {
795
+ fontSize: "32px",
796
+ letterSpacing: "-2%",
797
+ fontWeight: "700"
798
+ // Bold
799
+ },
800
+ sm: {
801
+ fontSize: "20px",
802
+ letterSpacing: "-2%",
803
+ fontWeight: "700"
804
+ // Bold
805
+ },
806
+ xs: {
807
+ fontSize: "20px",
808
+ letterSpacing: "2%",
809
+ fontWeight: "700"
810
+ // Bold
811
+ }
812
+ },
813
+ body: {
814
+ lg: {
815
+ fontSize: "20px",
816
+ letterSpacing: "-0.4px",
817
+ fontWeight: "500",
818
+ lineHeight: "150%"
819
+ },
820
+ "lg-semibold": {
821
+ fontSize: "20px",
822
+ letterSpacing: "-0.4px",
823
+ fontWeight: "600",
824
+ // Semibold
825
+ lineHeight: "150%"
826
+ },
827
+ md: {
828
+ fontSize: "18px",
829
+ letterSpacing: "-2%",
830
+ fontWeight: "600"
831
+ // Semibold
832
+ },
833
+ default: {
834
+ fontSize: "16px",
835
+ letterSpacing: "0%",
836
+ fontWeight: "400",
837
+ // Regular
838
+ lineHeight: "150%"
839
+ },
840
+ "default-medium": {
841
+ fontSize: "16px",
842
+ letterSpacing: "0%",
843
+ fontWeight: "500"
844
+ // Medium
845
+ },
846
+ "default-semibold": {
847
+ fontSize: "16px",
848
+ letterSpacing: "0%",
849
+ fontWeight: "600"
850
+ // Semibold
851
+ },
852
+ "default-bold": {
853
+ fontSize: "16px",
854
+ letterSpacing: "0%",
855
+ fontWeight: "700"
856
+ // Bold
857
+ },
858
+ xs: {
859
+ fontSize: "14px",
860
+ letterSpacing: "0%",
861
+ fontWeight: "400"
862
+ // Regular
863
+ },
864
+ "xs-medium": {
865
+ fontSize: "14px",
866
+ letterSpacing: "0%",
867
+ fontWeight: "500"
868
+ // Medium
869
+ },
870
+ xxs: {
871
+ fontSize: "13px",
872
+ letterSpacing: "0%",
873
+ fontWeight: "400"
874
+ // Regular
875
+ },
876
+ "xxs-medium": {
877
+ fontSize: "13px",
878
+ letterSpacing: "0%",
879
+ fontWeight: "500"
880
+ // Medium
881
+ },
882
+ "xxs-semibold": {
883
+ fontSize: "13px",
884
+ letterSpacing: "0%",
885
+ fontWeight: "600"
886
+ // Semibold
887
+ }
888
+ },
889
+ label: {
890
+ default: {
891
+ fontSize: "13px",
892
+ lineHeight: "24px",
893
+ letterSpacing: "0%",
894
+ fontWeight: "400",
895
+ // Regular
896
+ textTransform: "uppercase"
897
+ }
898
+ }
899
+ };
900
+ var config = {
901
+ content: ["./src/**/*.{ts,tsx}"],
902
+ theme: {
903
+ extend: {
904
+ colors,
905
+ fontSize: {
906
+ // Convert typography config to Tailwind's fontSize format
907
+ ...Object.entries(typography).reduce(
908
+ (acc, [family, sizes]) => {
909
+ Object.entries(sizes).forEach(([size, typeConfig]) => {
910
+ acc[`${family}-${size}`] = [
911
+ typeConfig.fontSize,
912
+ {
913
+ lineHeight: typeConfig.lineHeight || "normal",
914
+ letterSpacing: typeConfig.letterSpacing || "normal",
915
+ fontWeight: typeConfig.fontWeight
916
+ }
917
+ ];
918
+ });
919
+ return acc;
920
+ },
921
+ {}
922
+ )
923
+ },
924
+ fontFamily: {
925
+ sans: ["Gilroy", "sans-serif"]
926
+ },
927
+ fontWeight: {
928
+ light: "400",
929
+ // Gilroy-Light.ttf
930
+ regular: "500",
931
+ // Gilroy-Regular.ttf
932
+ normal: "500",
933
+ // Gilroy-Regular.ttf
934
+ semibold: "600",
935
+ // Gilroy-Medium.ttf
936
+ bold: "700"
937
+ // Gilroy-Bold.ttf
938
+ }
939
+ }
940
+ },
941
+ plugins: [tailwindAnimate],
942
+ safelist: [...generateSafelist(colors, typography)],
943
+ keyframes: {
944
+ "fade-in": {
945
+ from: { opacity: "0" },
946
+ to: { opacity: "1" }
947
+ },
948
+ "fade-out": {
949
+ from: { opacity: "1" },
950
+ to: { opacity: "0" }
951
+ }
952
+ },
953
+ animation: {
954
+ "fade-in": "fade-in 200ms ease-out",
955
+ "fade-out": "fade-out 200ms ease-in"
956
+ }
957
+ };
958
+ var tailwind_config_default = config;
959
+ if (exports.default) module.exports = exports.default;
960
+
961
+ export { AboutCard, Avatar, Badge, Breadcrumbs, Button, Combobox, ContactItem, Icon, Input, Link, Logo, Navbar, NavbarItem, Option, Pressable, ProfileCard, SocialCard, Switch, Tabs, Tag, Text, Tooltip, WorkCard, tailwind_config_default as tailwindConfig };
962
+ //# sourceMappingURL=index.js.map
963
+ //# sourceMappingURL=index.js.map