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