@deckai/deck-ui 0.0.3 → 0.0.4

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.
@@ -0,0 +1,583 @@
1
+ 'use strict';
2
+
3
+ var React8 = require('react');
4
+ var TooltipPrimitive = require('@radix-ui/react-tooltip');
5
+ var clsx = require('clsx');
6
+ var tailwindMerge = require('tailwind-merge');
7
+ var icons = require('@deckai/icons');
8
+ var SwitchPrimitive = require('@radix-ui/react-switch');
9
+ var Popover = require('@radix-ui/react-popover');
10
+
11
+ function _interopNamespace(e) {
12
+ if (e && e.__esModule) return e;
13
+ var n = Object.create(null);
14
+ if (e) {
15
+ Object.keys(e).forEach(function (k) {
16
+ if (k !== 'default') {
17
+ var d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: function () { return e[k]; }
21
+ });
22
+ }
23
+ });
24
+ }
25
+ n.default = e;
26
+ return Object.freeze(n);
27
+ }
28
+
29
+ var React8__namespace = /*#__PURE__*/_interopNamespace(React8);
30
+ var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
31
+ var SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitive);
32
+ var Popover__namespace = /*#__PURE__*/_interopNamespace(Popover);
33
+
34
+ // src/components/Tooltip.tsx
35
+ function cn(...inputs) {
36
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
37
+ }
38
+
39
+ // src/components/Tooltip.tsx
40
+ var Tooltip = ({
41
+ content,
42
+ children,
43
+ side = "bottom",
44
+ align = "center",
45
+ className,
46
+ delayDuration = 200
47
+ }) => /* @__PURE__ */ React8__namespace.createElement(TooltipPrimitive__namespace.Provider, { delayDuration }, /* @__PURE__ */ React8__namespace.createElement(TooltipPrimitive__namespace.Root, null, /* @__PURE__ */ React8__namespace.createElement(TooltipPrimitive__namespace.Trigger, { asChild: true }, /* @__PURE__ */ React8__namespace.createElement("span", { tabIndex: 0 }, children)), /* @__PURE__ */ React8__namespace.createElement(TooltipPrimitive__namespace.Portal, null, /* @__PURE__ */ React8__namespace.createElement(
48
+ TooltipPrimitive__namespace.Content,
49
+ {
50
+ side,
51
+ align,
52
+ sideOffset: 4,
53
+ className: cn(
54
+ "z-50 overflow-hidden rounded-lg",
55
+ "bg-text-primary px-3 py-1.5",
56
+ "text-xs text-white",
57
+ "animate-in fade-in-0 zoom-in-95",
58
+ "data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
59
+ "data-[side=bottom]:slide-in-from-top-2",
60
+ "data-[side=top]:slide-in-from-bottom-2",
61
+ "select-none",
62
+ "max-w-60",
63
+ className
64
+ )
65
+ },
66
+ content,
67
+ /* @__PURE__ */ React8__namespace.createElement(
68
+ TooltipPrimitive__namespace.Arrow,
69
+ {
70
+ className: "fill-text-primary",
71
+ width: 10,
72
+ height: 5
73
+ }
74
+ )
75
+ ))));
76
+
77
+ // src/utils/tailwind.ts
78
+ var focusRingStyles = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";
79
+
80
+ // src/components/Pressable.tsx
81
+ var Pressable = ({
82
+ children,
83
+ type = "button",
84
+ ...props
85
+ }) => /* @__PURE__ */ React8__namespace.default.createElement(
86
+ "button",
87
+ {
88
+ type,
89
+ className: `appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles}`,
90
+ ...props
91
+ },
92
+ children
93
+ );
94
+
95
+ // src/components/Icon.tsx
96
+ var COLOR_MAP = {
97
+ primary: "#080808",
98
+ secondary: "#666666",
99
+ white: "#ffffff",
100
+ primaryBlue: "#089CCB"
101
+ };
102
+ var Icon = React8__namespace.default.forwardRef(
103
+ ({
104
+ name,
105
+ size = 24,
106
+ color = "primary",
107
+ title,
108
+ className,
109
+ onClick,
110
+ style,
111
+ ...props
112
+ }, ref) => {
113
+ const IconComponent = icons.IconMap[name];
114
+ const sizeStyle = typeof size === "number" ? `${size}px` : size;
115
+ const content = /* @__PURE__ */ React8__namespace.default.createElement(
116
+ "div",
117
+ {
118
+ className: `flex justify-center items-center ${className}`,
119
+ style: {
120
+ width: sizeStyle,
121
+ height: sizeStyle,
122
+ ["--icon-stroke"]: COLOR_MAP[color],
123
+ ...style
124
+ }
125
+ },
126
+ /* @__PURE__ */ React8__namespace.default.createElement(
127
+ IconComponent,
128
+ {
129
+ ref,
130
+ "aria-hidden": !title,
131
+ "aria-label": title,
132
+ ...props
133
+ }
134
+ )
135
+ );
136
+ return onClick ? /* @__PURE__ */ React8__namespace.default.createElement(Pressable, { onClick }, content) : content;
137
+ }
138
+ );
139
+ Icon.displayName = "Icon";
140
+
141
+ // src/components/Badge.tsx
142
+ var Badge = React8__namespace.forwardRef(
143
+ ({ className, variant = "pink", iconName, children, ...props }, ref) => {
144
+ const variants = {
145
+ pink: "bg-tertiary-5",
146
+ orange: "bg-tertiary-15",
147
+ green: "bg-tertiary-25"
148
+ };
149
+ return /* @__PURE__ */ React8__namespace.createElement(
150
+ "span",
151
+ {
152
+ ref,
153
+ className: cn(
154
+ "inline-flex items-center gap-2",
155
+ "rounded-lg px-4 py-2",
156
+ "text-sm font-medium",
157
+ variants[variant],
158
+ className
159
+ ),
160
+ ...props
161
+ },
162
+ iconName && /* @__PURE__ */ React8__namespace.createElement(Icon, { name: iconName }),
163
+ children
164
+ );
165
+ }
166
+ );
167
+ Badge.displayName = "Badge";
168
+ var HEADING_ELEMENT_MAP = {
169
+ xl: "h1",
170
+ lg: "h1",
171
+ md: "h2",
172
+ sm: "h3",
173
+ xs: "h4"
174
+ };
175
+ var getElementFromVariant = (variant) => {
176
+ const [category, size] = variant.split("-");
177
+ if (category === "heading") {
178
+ return HEADING_ELEMENT_MAP[size] || "p";
179
+ }
180
+ if (category === "label") {
181
+ return "label";
182
+ }
183
+ return "p";
184
+ };
185
+ var fontWeight = {
186
+ light: "font-light",
187
+ regular: "font-regular",
188
+ semibold: "font-semibold",
189
+ bold: "font-bold"
190
+ };
191
+ var Text = React8__namespace.default.forwardRef(
192
+ ({
193
+ variant = "body-default",
194
+ color = "text-primary",
195
+ as,
196
+ className,
197
+ children,
198
+ weight,
199
+ ...props
200
+ }, ref) => {
201
+ const typographyClasses = `text-${variant}`;
202
+ const colorClasses = color && color === "inherit" ? "inherit" : color ? `text-${color}` : "";
203
+ const suggestedElement = React8__namespace.default.useMemo(
204
+ () => getElementFromVariant(variant),
205
+ [variant]
206
+ );
207
+ const Component = as || suggestedElement;
208
+ return (
209
+ // @ts-expect-error TODO: figure this out
210
+ /* @__PURE__ */ React8__namespace.default.createElement(
211
+ Component,
212
+ {
213
+ ref,
214
+ className: `font-sans antialiased ${typographyClasses} ${colorClasses} ${weight ? `!${fontWeight[weight]}` : ""} ${className ?? ""}`,
215
+ ...props
216
+ },
217
+ children
218
+ )
219
+ );
220
+ }
221
+ );
222
+ Text.displayName = "Text";
223
+
224
+ // src/components/Button.tsx
225
+ var filled = {
226
+ black: "bg-text-primary text-white",
227
+ // fade it slightly
228
+ accent: "bg-primary-100 text-white",
229
+ secondary: "bg-secondary-100 text-secondary"
230
+ };
231
+ var outlined = {
232
+ black: "border border-text-primary text-text-primary bg-white",
233
+ accent: "border border-primary-100 text-primary-100 bg-white",
234
+ secondary: "border border-text-secondary text-secondary bg-white"
235
+ };
236
+ var Button = React8__namespace.forwardRef(
237
+ ({
238
+ className,
239
+ variant = "filled",
240
+ color = "black",
241
+ isLoading = false,
242
+ children,
243
+ disabled,
244
+ ...props
245
+ }, ref) => /* @__PURE__ */ React8__namespace.createElement(
246
+ "button",
247
+ {
248
+ ref,
249
+ className: `
250
+ px-7
251
+ py-2
252
+ inline-flex items-center justify-center
253
+ rounded-lg
254
+ transition-colors duration-200
255
+ ${focusRingStyles}
256
+ disabled:opacity-50 disabled:pointer-events-none
257
+ hover:opacity-80 active:scale-95
258
+ truncate
259
+ ${variant === "filled" ? filled[color] : outlined[color]}
260
+ ${className}
261
+ `,
262
+ disabled: disabled || isLoading,
263
+ type: "button",
264
+ ...props
265
+ },
266
+ typeof children === "string" ? /* @__PURE__ */ React8__namespace.createElement(Text, { variant: "body-default-bold", color: "inherit" }, children) : children
267
+ )
268
+ );
269
+ Button.displayName = "Button";
270
+ var Switch = React8__namespace.forwardRef(({ className, label, description, ...props }, ref) => /* @__PURE__ */ React8__namespace.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React8__namespace.createElement(
271
+ SwitchPrimitive__namespace.Root,
272
+ {
273
+ className: cn(
274
+ "peer inline-flex h-6 w-11 shrink-0 cursor-pointer",
275
+ "items-center rounded-full border-2 border-transparent",
276
+ "transition-colors focus-visible:outline-none",
277
+ focusRingStyles,
278
+ "disabled:cursor-not-allowed disabled:opacity-50",
279
+ "data-[state=checked]:bg-primary-50 data-[state=unchecked]:bg-secondary-50",
280
+ className
281
+ ),
282
+ ...props,
283
+ ref
284
+ },
285
+ /* @__PURE__ */ React8__namespace.createElement(
286
+ SwitchPrimitive__namespace.Thumb,
287
+ {
288
+ className: cn(
289
+ "pointer-events-none block h-5 w-5",
290
+ "rounded-full bg-white shadow-lg ring-0",
291
+ "transition-transform",
292
+ "data-[state=checked]:translate-x-5",
293
+ "data-[state=unchecked]:translate-x-0"
294
+ )
295
+ }
296
+ )
297
+ ), (label || description) && /* @__PURE__ */ React8__namespace.createElement("div", { className: "flex flex-col" }, label && /* @__PURE__ */ React8__namespace.createElement(
298
+ "label",
299
+ {
300
+ className: "text-sm font-medium text-text-primary",
301
+ htmlFor: props.id
302
+ },
303
+ label
304
+ ), description && /* @__PURE__ */ React8__namespace.createElement("span", { className: "text-xs text-text-secondary" }, description))));
305
+ Switch.displayName = "Switch";
306
+
307
+ // src/components/ProfileCard.tsx
308
+ var ProfileCard = ({ profileImage }) => {
309
+ const randomId = React8.useId();
310
+ return /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "p-10 rounded-xl border border-stroke relative flex gap-6" }, /* @__PURE__ */ React8__namespace.default.createElement(
311
+ Button,
312
+ {
313
+ variant: "outlined",
314
+ color: "secondary",
315
+ className: "absolute top-10 right-10 !px-2 py-2"
316
+ },
317
+ /* @__PURE__ */ React8__namespace.default.createElement(Icon, { color: "secondary", name: "edit-2" })
318
+ ), /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex flex-row" }, /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React8__namespace.default.createElement("img", { src: profileImage, alt: "profile for fiona chen" }), /* @__PURE__ */ React8__namespace.default.createElement(Button, null, "Preview Profile"), /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex flex-row justify-between" }, /* @__PURE__ */ React8__namespace.default.createElement(
319
+ Text,
320
+ {
321
+ as: "label",
322
+ htmlFor: randomId,
323
+ variant: "body-default-semibold",
324
+ color: "text-secondary"
325
+ },
326
+ "Private Mode"
327
+ ), /* @__PURE__ */ React8__namespace.default.createElement(Switch, { id: randomId })), /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex flex-row gap-1" }, /* @__PURE__ */ React8__namespace.default.createElement(Text, { variant: "body-xs", color: "text-secondary" }, "What is this?"), /* @__PURE__ */ React8__namespace.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__ */ React8__namespace.default.createElement(Icon, { name: "message-question", color: "secondary", size: 16 }))))))), /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ React8__namespace.default.createElement(Text, { as: "h2", variant: "heading-md" }, "Fiona Chen"), /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex gap-2 items-center" }, /* @__PURE__ */ React8__namespace.default.createElement(Icon, { name: "location" }), /* @__PURE__ */ React8__namespace.default.createElement(Text, { variant: "body-lg", color: "text-secondary" }, "New York City, New York")), /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex gap-2 items-center" }, /* @__PURE__ */ React8__namespace.default.createElement(Icon, { name: "profile" }), /* @__PURE__ */ React8__namespace.default.createElement(Text, { variant: "body-lg", color: "text-secondary" }, "Member Since", " ", /* @__PURE__ */ React8__namespace.default.createElement(Text, { as: "span", variant: "body-lg-semibold" }, "October 2018"))), /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "pt-8" }), /* @__PURE__ */ React8__namespace.default.createElement(Text, { variant: "heading-sm" }, "My badges:"), /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex gap-4" }, /* @__PURE__ */ React8__namespace.default.createElement(Badge, { iconName: "medal-star" }, "Top Creator"), /* @__PURE__ */ React8__namespace.default.createElement(Badge, { variant: "orange", iconName: "message-text" }, "Responds Quickly"))));
328
+ };
329
+ var Avatar = ({ src, size = 48, onClick, ...props }) => {
330
+ const sizeStyle = typeof size === "number" ? `${size}px` : size;
331
+ const content = /* @__PURE__ */ React8__namespace.default.createElement(
332
+ "img",
333
+ {
334
+ src,
335
+ alt: "avatar",
336
+ className: "rounded-full",
337
+ style: {
338
+ width: sizeStyle,
339
+ height: sizeStyle
340
+ },
341
+ ...props
342
+ }
343
+ );
344
+ return onClick ? /* @__PURE__ */ React8__namespace.default.createElement(Pressable, { onClick }, content) : content;
345
+ };
346
+ var Input = ({ className, end, ...props }) => /* @__PURE__ */ React8__namespace.createElement("div", { className: "relative" }, /* @__PURE__ */ React8__namespace.createElement(
347
+ "input",
348
+ {
349
+ className: cn(
350
+ `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`,
351
+ end && "pr-10",
352
+ className
353
+ ),
354
+ ...props
355
+ }
356
+ ), end && /* @__PURE__ */ React8__namespace.createElement("div", { className: "absolute inset-y-0 right-0 flex items-center pr-3" }, end));
357
+ var Option = ({ value, label, onChange }) => /* @__PURE__ */ React8__namespace.default.createElement(
358
+ "button",
359
+ {
360
+ type: "button",
361
+ className: "w-full text-left px-2 py-1.5 text-sm cursor-pointer hover:bg-gray-100 rounded",
362
+ onClick: () => {
363
+ onChange?.(value);
364
+ }
365
+ },
366
+ label
367
+ );
368
+
369
+ // src/components/Combobox.tsx
370
+ var Combobox = ({
371
+ options,
372
+ placeholder = "Select an item...",
373
+ value,
374
+ onChange,
375
+ end,
376
+ className
377
+ }) => {
378
+ const [open, setOpen] = React8.useState(false);
379
+ const [inputValue, setInputValue] = React8.useState(value);
380
+ const selectedOption = React8.useMemo(
381
+ () => options.find((option) => option.value === inputValue),
382
+ [inputValue, options]
383
+ );
384
+ const filteredItems = options.filter(
385
+ (option) => inputValue ? option.label.toLowerCase().includes(inputValue.toLowerCase()) : options
386
+ );
387
+ const handleOptionChange = React8.useCallback(
388
+ (option) => {
389
+ onChange(option);
390
+ setOpen(false);
391
+ setInputValue(selectedOption?.label);
392
+ },
393
+ [onChange, selectedOption?.label]
394
+ );
395
+ return /* @__PURE__ */ React8__namespace.default.createElement(Popover__namespace.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React8__namespace.default.createElement(
396
+ "div",
397
+ {
398
+ className: `relative w-full font-sans text-text-secondary ${className}`
399
+ },
400
+ /* @__PURE__ */ React8__namespace.default.createElement(Popover__namespace.Trigger, { asChild: true }, /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex" }, /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "relative flex-1" }, /* @__PURE__ */ React8__namespace.default.createElement(
401
+ Input,
402
+ {
403
+ placeholder,
404
+ value: inputValue,
405
+ onChange: (e) => setInputValue(e.target.value),
406
+ end,
407
+ className: "flex-1"
408
+ }
409
+ )))),
410
+ /* @__PURE__ */ React8__namespace.default.createElement(Popover__namespace.Portal, null, /* @__PURE__ */ React8__namespace.default.createElement(
411
+ Popover__namespace.Content,
412
+ {
413
+ className: "w-[--radix-popover-trigger-width] p-1 bg-white rounded-md shadow-lg border mt-1",
414
+ sideOffset: 5
415
+ },
416
+ /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "max-h-60 overflow-auto flex flex-col items-start" }, filteredItems.length > 0 ? filteredItems.map(({ label, value: optionValue }, index) => /* @__PURE__ */ React8__namespace.default.createElement(
417
+ Option,
418
+ {
419
+ onChange: handleOptionChange,
420
+ value: optionValue,
421
+ key: index,
422
+ label
423
+ }
424
+ )) : /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "px-2 py-1.5 text-sm text-gray-500" }, "No results found"))
425
+ ))
426
+ ));
427
+ };
428
+ var Logo = ({ width = 76, height = 25 }) => /* @__PURE__ */ React8__namespace.default.createElement(
429
+ "svg",
430
+ {
431
+ width,
432
+ height,
433
+ viewBox: "0 0 76 25",
434
+ fill: "none",
435
+ xmlns: "http://www.w3.org/2000/svg"
436
+ },
437
+ /* @__PURE__ */ React8__namespace.default.createElement(
438
+ "path",
439
+ {
440
+ 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",
441
+ fill: "#080808"
442
+ }
443
+ )
444
+ );
445
+ var NavbarItem = ({
446
+ label,
447
+ iconName,
448
+ onClick,
449
+ ...props
450
+ }) => /* @__PURE__ */ React8__namespace.default.createElement(Pressable, { title: label, onClick, ...props }, /* @__PURE__ */ React8__namespace.default.createElement(Icon, { name: iconName, className: "py-3 px-7" }));
451
+
452
+ // src/components/Navbar.tsx
453
+ var Navbar = ({
454
+ searchOptions,
455
+ onSearchChange,
456
+ navbarItems,
457
+ onLogoClick,
458
+ onProfileClick
459
+ }) => /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex py-6 px-20 justify-between" }, /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex flex-1 gap-6 items-center" }, /* @__PURE__ */ React8__namespace.default.createElement(Pressable, { onClick: onLogoClick, title: "Deck AI" }, /* @__PURE__ */ React8__namespace.default.createElement(Logo, null)), /* @__PURE__ */ React8__namespace.default.createElement(
460
+ Combobox,
461
+ {
462
+ options: searchOptions,
463
+ placeholder: "Search for a creator, type of content, or platform...",
464
+ end: /* @__PURE__ */ React8__namespace.default.createElement(Icon, { name: "search-normal" }),
465
+ onChange: onSearchChange,
466
+ className: "flex-1 mr-8"
467
+ }
468
+ )), /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex gap-4" }, /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex gap-2 border-b-2 border-stroke items-center" }, navbarItems.map(({ iconName, label, onClick }) => /* @__PURE__ */ React8__namespace.default.createElement(
469
+ NavbarItem,
470
+ {
471
+ key: label,
472
+ iconName,
473
+ label,
474
+ onClick
475
+ }
476
+ ))), /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex" }, /* @__PURE__ */ React8__namespace.default.createElement(
477
+ Avatar,
478
+ {
479
+ onClick: onProfileClick,
480
+ src: "https://avatars.githubusercontent.com/u/17854809?v=4"
481
+ }
482
+ ))));
483
+ var Link = ({
484
+ children,
485
+ color = "text-primary",
486
+ variant = "body-default-semibold",
487
+ href,
488
+ className,
489
+ ...props
490
+ }) => /* @__PURE__ */ React8__namespace.default.createElement(Text, { variant, color }, /* @__PURE__ */ React8__namespace.default.createElement(
491
+ "a",
492
+ {
493
+ href,
494
+ className: cn(
495
+ "hover:text-text-primary",
496
+ "transition-colors duration-200",
497
+ "outline-none focus-visible:underline",
498
+ className
499
+ ),
500
+ ...props
501
+ },
502
+ children
503
+ ));
504
+
505
+ // src/components/Breadcrumbs.tsx
506
+ var DefaultSeparator = () => /* @__PURE__ */ React8__namespace.default.createElement(Text, { variant: "body-lg", color: "text-primary" }, "/");
507
+ var Breadcrumbs = React8__namespace.default.forwardRef(
508
+ ({ items, className, SeparatorComponent = DefaultSeparator, onHomeClick }, ref) => {
509
+ const renderSeparator = () => typeof SeparatorComponent === "function" ? /* @__PURE__ */ React8__namespace.default.createElement(SeparatorComponent, null) : React8__namespace.default.cloneElement(SeparatorComponent);
510
+ return /* @__PURE__ */ React8__namespace.default.createElement(
511
+ "nav",
512
+ {
513
+ ref,
514
+ "aria-label": "Breadcrumb",
515
+ className: cn("relative", className)
516
+ },
517
+ /* @__PURE__ */ React8__namespace.default.createElement("ol", { className: "flex flex-wrap items-center gap-2" }, /* @__PURE__ */ React8__namespace.default.createElement(Icon, { onClick: onHomeClick, name: "home", size: 20, color: "secondary" }), renderSeparator(), items.map((item, index) => {
518
+ const isLastItem = index === items.length - 1;
519
+ return isLastItem || !item.href ? /* @__PURE__ */ React8__namespace.default.createElement(
520
+ Text,
521
+ {
522
+ variant: isLastItem ? "body-default-bold" : "body-default",
523
+ color: isLastItem ? "text-primary" : "text-secondary",
524
+ "aria-current": isLastItem ? "page" : void 0
525
+ },
526
+ item.label
527
+ ) : /* @__PURE__ */ React8__namespace.default.createElement(React8__namespace.default.Fragment, null, /* @__PURE__ */ React8__namespace.default.createElement(Link, { href: item.href }, item.label), renderSeparator());
528
+ }))
529
+ );
530
+ }
531
+ );
532
+ Breadcrumbs.displayName = "Breadcrumbs";
533
+ var Tag = ({ children, ...props }) => /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "rounded bg-secondary-400 py-1.5 px-2", ...props }, typeof children === "string" ? /* @__PURE__ */ React8__namespace.default.createElement(Text, { color: "primary-100", variant: "body-default-medium" }, children) : children);
534
+ var ContactItem = ({
535
+ iconName,
536
+ children,
537
+ href,
538
+ ...linkProps
539
+ }) => /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "row gap-2 flex items-center" }, /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "bg-secondary-400 rounded-full p-2.5" }, /* @__PURE__ */ React8__namespace.default.createElement(Icon, { name: iconName, color: "primaryBlue", size: 18 })), /* @__PURE__ */ React8__namespace.default.createElement(
540
+ Text,
541
+ {
542
+ className: "hover:underline",
543
+ as: "a",
544
+ href,
545
+ ...linkProps,
546
+ variant: "body-lg"
547
+ },
548
+ children
549
+ ));
550
+
551
+ // src/components/AboutCard.tsx
552
+ var AboutCard = ({ interests, contactItems }) => /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "border border-secondary rounded-2xl p-10 relative flex" }, /* @__PURE__ */ React8__namespace.default.createElement(Button, { variant: "outlined", className: "absolute top-10 right-10 !px-2 py-2" }, /* @__PURE__ */ React8__namespace.default.createElement(Icon, { color: "primary", name: "edit-2" })), /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex basis-1/2 flex-col gap-2 pr-10" }, /* @__PURE__ */ React8__namespace.default.createElement(Text, { variant: "heading-sm" }, "About me"), /* @__PURE__ */ React8__namespace.default.createElement(Text, { variant: "body-default" }, "Hi, I'm Fiona! Welcome to my world of travel and beauty. I've worked with major brands like Hyatt, Ritz Carlton, Marriott Bonvoy, Delta, REVOLVE, and Fenty Beauty to name a few. I've generated hundreds of thousands in sales and amassed millions of views across all platforms. Message me for partnership inquiries!")), /* @__PURE__ */ React8__namespace.default.createElement("span", { className: "absolute bg-secondary-50 w-[1px] inset-x-0 inset-y-10" }), /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex flex-col gap-2 pl-10" }, /* @__PURE__ */ React8__namespace.default.createElement(Text, { variant: "heading-sm" }, "Interests"), /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex gap-2" }, interests.map((interest) => /* @__PURE__ */ React8__namespace.default.createElement(Tag, null, interest))), /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex flex-col pt-8 gap-4" }, contactItems.map((contactProps) => /* @__PURE__ */ React8__namespace.default.createElement(ContactItem, { ...contactProps })))));
553
+ var SocialCard = ({
554
+ icon,
555
+ followers,
556
+ engagement,
557
+ ...pressableProps
558
+ }) => /* @__PURE__ */ React8__namespace.default.createElement(Pressable, { ...pressableProps }, /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex gap-4 px-6 py-4 border border-secondary rounded-lg" }, /* @__PURE__ */ React8__namespace.default.createElement(Icon, { name: icon, size: 40 }), /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React8__namespace.default.createElement(Icon, { name: "profile", size: 20 }), /* @__PURE__ */ React8__namespace.default.createElement(Text, { variant: "body-default-medium" }, followers)), /* @__PURE__ */ React8__namespace.default.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React8__namespace.default.createElement(Icon, { name: "arrow-swap-horizontal", className: "rotate-90", size: 20 }), /* @__PURE__ */ React8__namespace.default.createElement(Text, { variant: "body-default-medium" }, engagement))));
559
+ if (exports.default) module.exports = exports.default;
560
+
561
+ exports.AboutCard = AboutCard;
562
+ exports.Avatar = Avatar;
563
+ exports.Badge = Badge;
564
+ exports.Breadcrumbs = Breadcrumbs;
565
+ exports.Button = Button;
566
+ exports.Combobox = Combobox;
567
+ exports.ContactItem = ContactItem;
568
+ exports.Icon = Icon;
569
+ exports.Input = Input;
570
+ exports.Link = Link;
571
+ exports.Logo = Logo;
572
+ exports.Navbar = Navbar;
573
+ exports.NavbarItem = NavbarItem;
574
+ exports.Option = Option;
575
+ exports.Pressable = Pressable;
576
+ exports.ProfileCard = ProfileCard;
577
+ exports.SocialCard = SocialCard;
578
+ exports.Switch = Switch;
579
+ exports.Tag = Tag;
580
+ exports.Text = Text;
581
+ exports.Tooltip = Tooltip;
582
+ //# sourceMappingURL=index.cjs.map
583
+ //# sourceMappingURL=index.cjs.map