@burdenoff/microfe-coolandlovely 2026.805.1 → 2026.820.2
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/coolandlovely/CoolAndLovelyRoot.d.ts.map +1 -1
- package/dist/coolandlovely/CoolAndLovelyRoot.js +60 -58
- package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
- package/dist/coolandlovely/components/AddToLookbookButton.d.ts.map +1 -1
- package/dist/coolandlovely/components/AddToLookbookButton.js +1 -0
- package/dist/coolandlovely/components/AddToLookbookButton.js.map +1 -1
- package/dist/coolandlovely/components/BrandCard.d.ts +11 -0
- package/dist/coolandlovely/components/BrandCard.d.ts.map +1 -0
- package/dist/coolandlovely/components/BrandCard.js +55 -0
- package/dist/coolandlovely/components/BrandCard.js.map +1 -0
- package/dist/coolandlovely/components/CollectionCard.d.ts +11 -0
- package/dist/coolandlovely/components/CollectionCard.d.ts.map +1 -0
- package/dist/coolandlovely/components/CollectionCard.js +60 -0
- package/dist/coolandlovely/components/CollectionCard.js.map +1 -0
- package/dist/coolandlovely/components/FeedbackWidget.d.ts +4 -0
- package/dist/coolandlovely/components/FeedbackWidget.d.ts.map +1 -0
- package/dist/coolandlovely/components/FeedbackWidget.js +134 -0
- package/dist/coolandlovely/components/FeedbackWidget.js.map +1 -0
- package/dist/coolandlovely/components/LookbookCard.d.ts +11 -0
- package/dist/coolandlovely/components/LookbookCard.d.ts.map +1 -0
- package/dist/coolandlovely/components/LookbookCard.js +60 -0
- package/dist/coolandlovely/components/LookbookCard.js.map +1 -0
- package/dist/coolandlovely/components/WardrobeItemCard.d.ts +14 -0
- package/dist/coolandlovely/components/WardrobeItemCard.d.ts.map +1 -0
- package/dist/coolandlovely/components/WardrobeItemCard.js +92 -0
- package/dist/coolandlovely/components/WardrobeItemCard.js.map +1 -0
- package/dist/coolandlovely/components/index.d.ts +5 -0
- package/dist/coolandlovely/components/index.d.ts.map +1 -1
- package/dist/coolandlovely/components/index.js +26 -0
- package/dist/coolandlovely/pages/HomePage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/HomePage.js +10 -4
- package/dist/coolandlovely/pages/HomePage.js.map +1 -1
- package/dist/coolandlovely/pages/brands/BrandDetailPage.js +7 -7
- package/dist/coolandlovely/pages/brands/BrandsListPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/brands/BrandsListPage.js +48 -89
- package/dist/coolandlovely/pages/brands/BrandsListPage.js.map +1 -1
- package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +4 -4
- package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +13 -13
- package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +4 -4
- package/dist/coolandlovely/pages/collections/CollectionsListPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/collections/CollectionsListPage.js +28 -74
- package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -1
- package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +5 -5
- package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +66 -112
- package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -1
- package/dist/coolandlovely/pages/profile/StyleProfilePage.js +124 -124
- package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -1
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +46 -120
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -1
- package/dist/stories/BrandCard.stories.d.ts +10 -0
- package/dist/stories/BrandCard.stories.d.ts.map +1 -0
- package/dist/stories/CollectionCard.stories.d.ts +10 -0
- package/dist/stories/CollectionCard.stories.d.ts.map +1 -0
- package/dist/stories/FeedbackWidget.stories.d.ts +9 -0
- package/dist/stories/FeedbackWidget.stories.d.ts.map +1 -0
- package/dist/stories/LookCard.stories.d.ts +10 -0
- package/dist/stories/LookCard.stories.d.ts.map +1 -0
- package/dist/stories/LookbookCard.stories.d.ts +10 -0
- package/dist/stories/LookbookCard.stories.d.ts.map +1 -0
- package/dist/stories/WardrobeItemCard.stories.d.ts +11 -0
- package/dist/stories/WardrobeItemCard.stories.d.ts.map +1 -0
- package/dist/stories/__fixtures__/coolandlovely.d.ts +13 -0
- package/dist/stories/__fixtures__/coolandlovely.d.ts.map +1 -0
- package/package.json +4 -1
|
@@ -7,29 +7,29 @@ import { useLooks as o, useMyFollowing as s, useMyStyleProfile as c, useStylePro
|
|
|
7
7
|
import { parseCsv as f, titleCase as p } from "../../utils/formatters.js";
|
|
8
8
|
import "../../hooks/index.js";
|
|
9
9
|
import { categoryIcon as ee } from "../../utils/icons.js";
|
|
10
|
-
import { ActorName as m } from "../../components/ActorName.js";
|
|
11
|
-
import { SelectField as h, TextAreaField as g, TextField as _ } from "../../components/Field.js";
|
|
12
10
|
import { EmptyState as te } from "../../components/EmptyState.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { FollowButton as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
11
|
+
import { SelectField as m, TextAreaField as h, TextField as g } from "../../components/Field.js";
|
|
12
|
+
import { ActorName as _ } from "../../components/ActorName.js";
|
|
13
|
+
import { FollowButton as v } from "../../components/FollowButton.js";
|
|
14
|
+
import { VisibilityChip as ne } from "../../components/VisibilityChip.js";
|
|
15
|
+
import { ColourSwatchRow as re } from "../../components/ColourSwatchRow.js";
|
|
16
|
+
import { useEffect as y, useState as b } from "react";
|
|
17
|
+
import { Loader2 as x, Pencil as ie, Save as S, Shirt as C, Sparkles as w, UserCircle as T, Users as E, X as D } from "lucide-react";
|
|
18
|
+
import { useParams as O } from "react-router";
|
|
19
|
+
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
20
|
+
import { GlassCard as j } from "@burdenoff/fe-libs/ui";
|
|
21
21
|
//#region src/coolandlovely/pages/profile/StyleProfilePage.tsx
|
|
22
|
-
var
|
|
22
|
+
var ae = [
|
|
23
23
|
"PUBLIC",
|
|
24
24
|
"FOLLOWERS",
|
|
25
25
|
"PRIVATE"
|
|
26
|
-
],
|
|
26
|
+
], oe = [
|
|
27
27
|
"Tops",
|
|
28
28
|
"Bottoms",
|
|
29
29
|
"Dresses",
|
|
30
30
|
"Shoes",
|
|
31
31
|
"Outerwear"
|
|
32
|
-
],
|
|
32
|
+
], M = {
|
|
33
33
|
displayName: "",
|
|
34
34
|
bio: "",
|
|
35
35
|
visibility: "PRIVATE",
|
|
@@ -43,24 +43,24 @@ function N(e) {
|
|
|
43
43
|
return t.length === 0 ? "?" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[1][0]).toUpperCase();
|
|
44
44
|
}
|
|
45
45
|
function P({ title: e, children: n, className: r }) {
|
|
46
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ A(j, {
|
|
47
47
|
treatment: "plain",
|
|
48
48
|
className: t("p-5", r),
|
|
49
|
-
children: [/* @__PURE__ */
|
|
49
|
+
children: [/* @__PURE__ */ k("h3", {
|
|
50
50
|
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
51
51
|
children: e
|
|
52
52
|
}), n]
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
function F() {
|
|
56
|
-
let { userId: F } =
|
|
56
|
+
let { userId: F } = O(), { navigateTo: I, currentUser: L } = e(), R = !F || F === L?.id, z = c(), B = l(R ? void 0 : F), V = R ? z : B, H = u(), U = s(), W = d(), G = V.data, K = o({
|
|
57
57
|
authorId: G?.ownerId,
|
|
58
58
|
pagination: {
|
|
59
59
|
limit: 6,
|
|
60
60
|
offset: 0
|
|
61
61
|
}
|
|
62
|
-
}), [se, q] =
|
|
63
|
-
|
|
62
|
+
}), [se, q] = b(!1), [J, Y] = b(M), X = !!G, Z = U.data ?? [];
|
|
63
|
+
y(() => {
|
|
64
64
|
R && G && Y({
|
|
65
65
|
displayName: G.displayName ?? "",
|
|
66
66
|
bio: G.bio ?? "",
|
|
@@ -70,7 +70,7 @@ function F() {
|
|
|
70
70
|
favouriteBrands: G.favouriteBrands.join(", "),
|
|
71
71
|
sizes: Object.fromEntries(Object.entries(G.sizes ?? {}).map(([e, t]) => [e, String(t ?? "")]))
|
|
72
72
|
});
|
|
73
|
-
}, [R, G]),
|
|
73
|
+
}, [R, G]), y(() => {
|
|
74
74
|
R && !V.isLoading && !X && q(!0);
|
|
75
75
|
}, [
|
|
76
76
|
R,
|
|
@@ -86,7 +86,7 @@ function F() {
|
|
|
86
86
|
...n.sizes,
|
|
87
87
|
[e]: t
|
|
88
88
|
}
|
|
89
|
-
})), le =
|
|
89
|
+
})), le = ae.map((e) => ({
|
|
90
90
|
value: e,
|
|
91
91
|
label: p(e)
|
|
92
92
|
})), ue = (e) => {
|
|
@@ -102,82 +102,82 @@ function F() {
|
|
|
102
102
|
sizes: t
|
|
103
103
|
}, { onSuccess: () => q(!1) });
|
|
104
104
|
};
|
|
105
|
-
if (V.isLoading) return /* @__PURE__ */
|
|
105
|
+
if (V.isLoading) return /* @__PURE__ */ k(n, {
|
|
106
106
|
title: "Style Profile",
|
|
107
|
-
children: /* @__PURE__ */
|
|
107
|
+
children: /* @__PURE__ */ k(i, { label: "Loading style profile…" })
|
|
108
108
|
});
|
|
109
|
-
if (V.isError) return /* @__PURE__ */
|
|
109
|
+
if (V.isError) return /* @__PURE__ */ k(n, {
|
|
110
110
|
title: "Style Profile",
|
|
111
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ k(r, { onRetry: () => void V.refetch() })
|
|
112
112
|
});
|
|
113
|
-
if (!R && !G) return /* @__PURE__ */
|
|
113
|
+
if (!R && !G) return /* @__PURE__ */ k(n, {
|
|
114
114
|
title: "Style Profile",
|
|
115
|
-
children: /* @__PURE__ */
|
|
115
|
+
children: /* @__PURE__ */ k(te, {
|
|
116
116
|
title: "Profile not available",
|
|
117
117
|
description: "This style profile doesn't exist, or its owner hasn't shared it with you.",
|
|
118
|
-
icon: /* @__PURE__ */
|
|
118
|
+
icon: /* @__PURE__ */ k(T, { className: "h-8 w-8" })
|
|
119
119
|
})
|
|
120
120
|
});
|
|
121
121
|
let $ = R;
|
|
122
122
|
if ((!se || !$) && G) {
|
|
123
123
|
let e = R ? L?.profilePicture || L?.avatar : void 0, r = R ? (W.data ?? []).slice(0, 6) : [], i = K.data?.items ?? [], o = Object.entries(G.sizes ?? {}), s = G.displayName || (R ? L?.name : void 0);
|
|
124
|
-
return /* @__PURE__ */
|
|
124
|
+
return /* @__PURE__ */ k(n, {
|
|
125
125
|
title: R ? "Style Profile" : s || "Style Profile",
|
|
126
126
|
description: R ? "Your taste, palette and sizing — the spine of personalised discovery" : void 0,
|
|
127
|
-
actions: $ ? /* @__PURE__ */
|
|
127
|
+
actions: $ ? /* @__PURE__ */ A("button", {
|
|
128
128
|
type: "button",
|
|
129
129
|
onClick: () => q(!0),
|
|
130
130
|
className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90",
|
|
131
|
-
children: [/* @__PURE__ */
|
|
132
|
-
}) : /* @__PURE__ */
|
|
133
|
-
children: /* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ k(ie, { className: "h-4 w-4" }), " Edit"]
|
|
132
|
+
}) : /* @__PURE__ */ k(v, { followeeId: G.ownerId }),
|
|
133
|
+
children: /* @__PURE__ */ A("div", {
|
|
134
134
|
className: "mx-auto max-w-5xl",
|
|
135
135
|
children: [
|
|
136
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ k(j, {
|
|
137
137
|
treatment: "glass",
|
|
138
138
|
className: "p-6",
|
|
139
|
-
children: /* @__PURE__ */
|
|
139
|
+
children: /* @__PURE__ */ A("div", {
|
|
140
140
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center",
|
|
141
|
-
children: [e ? /* @__PURE__ */
|
|
141
|
+
children: [e ? /* @__PURE__ */ k("img", {
|
|
142
142
|
src: e,
|
|
143
143
|
alt: s || "Avatar",
|
|
144
144
|
className: "h-16 w-16 shrink-0 rounded-full object-cover ring-2 ring-bg-surface"
|
|
145
|
-
}) : /* @__PURE__ */
|
|
145
|
+
}) : /* @__PURE__ */ k("div", {
|
|
146
146
|
className: "flex h-16 w-16 shrink-0 items-center justify-center rounded-full bg-accent-purple-subtle text-text-primary",
|
|
147
|
-
children: /* @__PURE__ */
|
|
148
|
-
}), /* @__PURE__ */
|
|
147
|
+
children: /* @__PURE__ */ k(T, { className: "h-8 w-8" })
|
|
148
|
+
}), /* @__PURE__ */ A("div", {
|
|
149
149
|
className: "min-w-0 flex-1",
|
|
150
150
|
children: [
|
|
151
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ A("div", {
|
|
152
152
|
className: "flex flex-wrap items-center gap-2",
|
|
153
|
-
children: [/* @__PURE__ */
|
|
153
|
+
children: [/* @__PURE__ */ k("h2", {
|
|
154
154
|
className: "truncate text-xl font-semibold text-text-primary",
|
|
155
|
-
children: s || /* @__PURE__ */
|
|
155
|
+
children: s || /* @__PURE__ */ k(_, {
|
|
156
156
|
id: G.ownerId,
|
|
157
157
|
fallback: "Style profile"
|
|
158
158
|
})
|
|
159
|
-
}), /* @__PURE__ */
|
|
159
|
+
}), /* @__PURE__ */ k(ne, { visibility: G.visibility })]
|
|
160
160
|
}),
|
|
161
|
-
G.bio && /* @__PURE__ */
|
|
161
|
+
G.bio && /* @__PURE__ */ k("p", {
|
|
162
162
|
className: "mt-1 line-clamp-2 text-sm text-text-secondary",
|
|
163
163
|
children: G.bio
|
|
164
164
|
}),
|
|
165
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ A("div", {
|
|
166
166
|
className: "mt-2 flex items-center gap-6",
|
|
167
|
-
children: [/* @__PURE__ */
|
|
167
|
+
children: [/* @__PURE__ */ A("span", {
|
|
168
168
|
className: "text-sm text-text-secondary",
|
|
169
169
|
children: [
|
|
170
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ k("span", {
|
|
171
171
|
className: "font-semibold text-text-primary tabular-nums",
|
|
172
172
|
children: G.followerCount ?? 0
|
|
173
173
|
}),
|
|
174
174
|
" ",
|
|
175
175
|
G.followerCount === 1 ? "follower" : "followers"
|
|
176
176
|
]
|
|
177
|
-
}), /* @__PURE__ */
|
|
177
|
+
}), /* @__PURE__ */ A("span", {
|
|
178
178
|
className: "text-sm text-text-secondary",
|
|
179
179
|
children: [
|
|
180
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ k("span", {
|
|
181
181
|
className: "font-semibold text-text-primary tabular-nums",
|
|
182
182
|
children: G.followingCount ?? 0
|
|
183
183
|
}),
|
|
@@ -190,91 +190,91 @@ function F() {
|
|
|
190
190
|
})]
|
|
191
191
|
})
|
|
192
192
|
}),
|
|
193
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ A("div", {
|
|
194
194
|
className: "mt-6 grid gap-6 lg:grid-cols-5",
|
|
195
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ A("div", {
|
|
196
196
|
className: "space-y-6 lg:col-span-3",
|
|
197
197
|
children: [
|
|
198
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ k(P, {
|
|
199
199
|
title: "Style preferences",
|
|
200
|
-
children: G.stylePreferences.length ? /* @__PURE__ */
|
|
200
|
+
children: G.stylePreferences.length ? /* @__PURE__ */ k("div", {
|
|
201
201
|
className: "flex flex-wrap gap-2",
|
|
202
|
-
children: G.stylePreferences.map((e, n) => /* @__PURE__ */
|
|
202
|
+
children: G.stylePreferences.map((e, n) => /* @__PURE__ */ k("span", {
|
|
203
203
|
className: t("rounded-full px-3 py-1 text-sm font-medium", n === 0 ? "bg-accent-purple-subtle text-text-primary ring-1 ring-[var(--color-accent-soft)]" : "bg-bg-sunken text-text-secondary"),
|
|
204
204
|
children: e
|
|
205
205
|
}, `${e}-${n}`))
|
|
206
|
-
}) : /* @__PURE__ */
|
|
206
|
+
}) : /* @__PURE__ */ k("p", {
|
|
207
207
|
className: "text-sm text-text-secondary",
|
|
208
208
|
children: R ? "No preferences yet — add a few in Edit." : "No preferences shared yet."
|
|
209
209
|
})
|
|
210
210
|
}),
|
|
211
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ k(P, {
|
|
212
212
|
title: "Palette",
|
|
213
|
-
children: G.palette.length ? /* @__PURE__ */
|
|
213
|
+
children: G.palette.length ? /* @__PURE__ */ k(re, {
|
|
214
214
|
colours: G.palette,
|
|
215
215
|
max: 12,
|
|
216
216
|
className: "gap-2.5"
|
|
217
|
-
}) : /* @__PURE__ */
|
|
217
|
+
}) : /* @__PURE__ */ k("p", {
|
|
218
218
|
className: "text-sm text-text-secondary",
|
|
219
219
|
children: "No palette yet."
|
|
220
220
|
})
|
|
221
221
|
}),
|
|
222
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ A("div", {
|
|
223
223
|
className: "grid gap-6 sm:grid-cols-2",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
224
|
+
children: [/* @__PURE__ */ k(P, {
|
|
225
225
|
title: "Favourite brands",
|
|
226
|
-
children: G.favouriteBrands.length ? /* @__PURE__ */
|
|
226
|
+
children: G.favouriteBrands.length ? /* @__PURE__ */ k("div", {
|
|
227
227
|
className: "grid grid-cols-1 gap-2",
|
|
228
|
-
children: G.favouriteBrands.map((e, t) => /* @__PURE__ */
|
|
228
|
+
children: G.favouriteBrands.map((e, t) => /* @__PURE__ */ A("div", {
|
|
229
229
|
className: "flex items-center gap-2 rounded-lg border border-border-seam bg-bg-surface px-3 py-2",
|
|
230
|
-
children: [/* @__PURE__ */
|
|
230
|
+
children: [/* @__PURE__ */ k("span", {
|
|
231
231
|
className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-accent-purple-subtle text-xs font-bold text-text-primary",
|
|
232
232
|
children: N(e)
|
|
233
|
-
}), /* @__PURE__ */
|
|
233
|
+
}), /* @__PURE__ */ k("span", {
|
|
234
234
|
className: "truncate text-sm font-medium text-text-primary",
|
|
235
235
|
children: e
|
|
236
236
|
})]
|
|
237
237
|
}, `${e}-${t}`))
|
|
238
|
-
}) : /* @__PURE__ */
|
|
238
|
+
}) : /* @__PURE__ */ k("p", {
|
|
239
239
|
className: "text-sm text-text-secondary",
|
|
240
240
|
children: "No brands yet."
|
|
241
241
|
})
|
|
242
|
-
}), R && /* @__PURE__ */
|
|
242
|
+
}), R && /* @__PURE__ */ k(P, {
|
|
243
243
|
title: "Sizes",
|
|
244
|
-
children: o.length ? /* @__PURE__ */
|
|
244
|
+
children: o.length ? /* @__PURE__ */ k("dl", {
|
|
245
245
|
className: "space-y-0",
|
|
246
|
-
children: o.map(([e, t]) => /* @__PURE__ */
|
|
246
|
+
children: o.map(([e, t]) => /* @__PURE__ */ A("div", {
|
|
247
247
|
className: "flex items-center justify-between border-b border-border-seam/60 py-1.5 last:border-0",
|
|
248
|
-
children: [/* @__PURE__ */
|
|
248
|
+
children: [/* @__PURE__ */ k("dt", {
|
|
249
249
|
className: "text-sm text-text-secondary",
|
|
250
250
|
children: p(e)
|
|
251
|
-
}), /* @__PURE__ */
|
|
251
|
+
}), /* @__PURE__ */ k("dd", {
|
|
252
252
|
className: "text-sm font-medium text-text-primary tabular-nums",
|
|
253
253
|
children: String(t)
|
|
254
254
|
})]
|
|
255
255
|
}, e))
|
|
256
|
-
}) : /* @__PURE__ */
|
|
256
|
+
}) : /* @__PURE__ */ k("p", {
|
|
257
257
|
className: "text-sm text-text-secondary",
|
|
258
258
|
children: "No sizes recorded yet."
|
|
259
259
|
})
|
|
260
260
|
})]
|
|
261
261
|
})
|
|
262
262
|
]
|
|
263
|
-
}), /* @__PURE__ */
|
|
263
|
+
}), /* @__PURE__ */ A("div", {
|
|
264
264
|
className: "space-y-6 lg:col-span-2",
|
|
265
|
-
children: [R && /* @__PURE__ */
|
|
265
|
+
children: [R && /* @__PURE__ */ k(P, {
|
|
266
266
|
title: "Her wardrobe",
|
|
267
|
-
children: W.isLoading ? /* @__PURE__ */
|
|
267
|
+
children: W.isLoading ? /* @__PURE__ */ A("div", {
|
|
268
268
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
269
|
-
children: [/* @__PURE__ */
|
|
270
|
-
}) : r.length ? /* @__PURE__ */
|
|
269
|
+
children: [/* @__PURE__ */ k(x, { className: "h-4 w-4 animate-spin" }), " Loading…"]
|
|
270
|
+
}) : r.length ? /* @__PURE__ */ k("div", {
|
|
271
271
|
className: "grid grid-cols-3 gap-2",
|
|
272
|
-
children: r.map((e) => /* @__PURE__ */
|
|
272
|
+
children: r.map((e) => /* @__PURE__ */ k("button", {
|
|
273
273
|
type: "button",
|
|
274
274
|
onClick: () => I("/wardrobe"),
|
|
275
275
|
"aria-label": e.name,
|
|
276
276
|
className: "group overflow-hidden rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
277
|
-
children: /* @__PURE__ */
|
|
277
|
+
children: /* @__PURE__ */ k(a, {
|
|
278
278
|
icon: ee(e.category, 18),
|
|
279
279
|
seed: e.id,
|
|
280
280
|
fileId: e.image?.id,
|
|
@@ -282,79 +282,79 @@ function F() {
|
|
|
282
282
|
className: "aspect-square w-full rounded-lg"
|
|
283
283
|
})
|
|
284
284
|
}, e.id))
|
|
285
|
-
}) : /* @__PURE__ */
|
|
285
|
+
}) : /* @__PURE__ */ A("button", {
|
|
286
286
|
type: "button",
|
|
287
287
|
onClick: () => I("/wardrobe/new"),
|
|
288
288
|
className: "flex w-full items-center gap-2 rounded-lg border border-dashed border-border-seam px-3 py-3 text-left text-sm text-text-secondary transition-colors hover:text-text-primary",
|
|
289
|
-
children: [/* @__PURE__ */
|
|
289
|
+
children: [/* @__PURE__ */ k(C, { className: "h-4 w-4" }), " Add pieces to your wardrobe"]
|
|
290
290
|
})
|
|
291
|
-
}), /* @__PURE__ */
|
|
291
|
+
}), /* @__PURE__ */ k(P, {
|
|
292
292
|
title: "Recent looks",
|
|
293
|
-
children: K.isLoading ? /* @__PURE__ */
|
|
293
|
+
children: K.isLoading ? /* @__PURE__ */ A("div", {
|
|
294
294
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
295
|
-
children: [/* @__PURE__ */
|
|
296
|
-
}) : i.length ? /* @__PURE__ */
|
|
295
|
+
children: [/* @__PURE__ */ k(x, { className: "h-4 w-4 animate-spin" }), " Loading…"]
|
|
296
|
+
}) : i.length ? /* @__PURE__ */ k("div", {
|
|
297
297
|
className: "-mx-1 flex gap-3 overflow-x-auto px-1 pb-1",
|
|
298
|
-
children: i.map((e) => /* @__PURE__ */
|
|
298
|
+
children: i.map((e) => /* @__PURE__ */ A("button", {
|
|
299
299
|
type: "button",
|
|
300
300
|
onClick: () => I(`/looks/${e.id}`),
|
|
301
301
|
className: "group w-24 shrink-0 text-left focus-visible:outline-none",
|
|
302
|
-
children: [/* @__PURE__ */
|
|
303
|
-
icon: /* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ k(a, {
|
|
303
|
+
icon: /* @__PURE__ */ k(w, { className: "h-5 w-5" }),
|
|
304
304
|
seed: e.id,
|
|
305
305
|
fileId: e.image?.id,
|
|
306
306
|
alt: e.title,
|
|
307
307
|
className: "aspect-[3/4] w-full rounded-lg"
|
|
308
|
-
}), /* @__PURE__ */
|
|
308
|
+
}), /* @__PURE__ */ k("p", {
|
|
309
309
|
className: "mt-1 truncate text-xs text-text-secondary",
|
|
310
310
|
children: e.title
|
|
311
311
|
})]
|
|
312
312
|
}, e.id))
|
|
313
|
-
}) : /* @__PURE__ */
|
|
313
|
+
}) : /* @__PURE__ */ k("p", {
|
|
314
314
|
className: "text-sm text-text-secondary",
|
|
315
315
|
children: R ? "You have not published any looks yet." : "No looks published yet."
|
|
316
316
|
})
|
|
317
317
|
})]
|
|
318
318
|
})]
|
|
319
319
|
}),
|
|
320
|
-
R && /* @__PURE__ */
|
|
320
|
+
R && /* @__PURE__ */ A("section", {
|
|
321
321
|
className: "mt-6",
|
|
322
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ A("h3", {
|
|
323
323
|
className: "mb-3 flex items-center gap-2 text-lg font-semibold text-text-primary",
|
|
324
324
|
children: [
|
|
325
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ k(E, { className: "h-5 w-5" }),
|
|
326
326
|
" People you follow (",
|
|
327
327
|
Z.length,
|
|
328
328
|
")"
|
|
329
329
|
]
|
|
330
|
-
}), U.isLoading ? /* @__PURE__ */
|
|
330
|
+
}), U.isLoading ? /* @__PURE__ */ A("div", {
|
|
331
331
|
className: "flex items-center gap-2 rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary",
|
|
332
|
-
children: [/* @__PURE__ */
|
|
333
|
-
}) : Z.length === 0 ? /* @__PURE__ */
|
|
332
|
+
children: [/* @__PURE__ */ k(x, { className: "h-4 w-4 animate-spin" }), " Loading…"]
|
|
333
|
+
}) : Z.length === 0 ? /* @__PURE__ */ k("p", {
|
|
334
334
|
className: "rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary",
|
|
335
335
|
children: "You are not following anyone yet. Follow creators from their looks to see their latest in Discover."
|
|
336
|
-
}) : /* @__PURE__ */
|
|
336
|
+
}) : /* @__PURE__ */ k("ul", {
|
|
337
337
|
className: "divide-y divide-border-seam rounded-lg border border-border-seam bg-bg-surface",
|
|
338
|
-
children: Z.map((e) => /* @__PURE__ */
|
|
338
|
+
children: Z.map((e) => /* @__PURE__ */ A("li", {
|
|
339
339
|
className: "flex items-center gap-3 px-4 py-3",
|
|
340
|
-
children: [/* @__PURE__ */
|
|
340
|
+
children: [/* @__PURE__ */ A("button", {
|
|
341
341
|
type: "button",
|
|
342
342
|
onClick: () => I(`/profile/${e.ownerId}`),
|
|
343
343
|
className: "flex min-w-0 flex-1 items-center gap-3 text-left focus-visible:outline-none",
|
|
344
|
-
children: [/* @__PURE__ */
|
|
344
|
+
children: [/* @__PURE__ */ k("div", {
|
|
345
345
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-accent-purple-subtle text-text-primary",
|
|
346
|
-
children: /* @__PURE__ */
|
|
347
|
-
}), /* @__PURE__ */
|
|
346
|
+
children: /* @__PURE__ */ k(T, { className: "h-5 w-5" })
|
|
347
|
+
}), /* @__PURE__ */ A("div", {
|
|
348
348
|
className: "min-w-0 flex-1",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ k("p", {
|
|
350
350
|
className: "truncate text-sm font-medium text-text-primary hover:underline",
|
|
351
|
-
children: e.displayName || /* @__PURE__ */
|
|
352
|
-
}), e.bio && /* @__PURE__ */
|
|
351
|
+
children: e.displayName || /* @__PURE__ */ k(_, { id: e.ownerId })
|
|
352
|
+
}), e.bio && /* @__PURE__ */ k("p", {
|
|
353
353
|
className: "truncate text-xs text-text-secondary",
|
|
354
354
|
children: e.bio
|
|
355
355
|
})]
|
|
356
356
|
})]
|
|
357
|
-
}), /* @__PURE__ */
|
|
357
|
+
}), /* @__PURE__ */ k(v, {
|
|
358
358
|
followeeId: e.ownerId,
|
|
359
359
|
size: "sm"
|
|
360
360
|
})]
|
|
@@ -365,31 +365,31 @@ function F() {
|
|
|
365
365
|
})
|
|
366
366
|
});
|
|
367
367
|
}
|
|
368
|
-
let de = Array.from(new Set([...
|
|
369
|
-
return /* @__PURE__ */
|
|
368
|
+
let de = Array.from(new Set([...oe, ...Object.keys(J.sizes)]));
|
|
369
|
+
return /* @__PURE__ */ k(n, {
|
|
370
370
|
title: X ? "Edit style profile" : "Create your style profile",
|
|
371
371
|
description: "This powers your personalised discovery feed",
|
|
372
|
-
actions: X ? /* @__PURE__ */
|
|
372
|
+
actions: X ? /* @__PURE__ */ A("button", {
|
|
373
373
|
type: "button",
|
|
374
374
|
onClick: () => q(!1),
|
|
375
375
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
|
|
376
|
-
children: [/* @__PURE__ */
|
|
376
|
+
children: [/* @__PURE__ */ k(D, { className: "h-4 w-4" }), " Cancel"]
|
|
377
377
|
}) : void 0,
|
|
378
|
-
children: /* @__PURE__ */
|
|
378
|
+
children: /* @__PURE__ */ k("form", {
|
|
379
379
|
onSubmit: ue,
|
|
380
380
|
className: "mx-auto max-w-2xl",
|
|
381
|
-
children: /* @__PURE__ */
|
|
381
|
+
children: /* @__PURE__ */ A(j, {
|
|
382
382
|
treatment: "plain",
|
|
383
383
|
className: "p-6",
|
|
384
384
|
children: [
|
|
385
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ k(g, {
|
|
386
386
|
id: "displayName",
|
|
387
387
|
label: "Display name",
|
|
388
388
|
value: J.displayName,
|
|
389
389
|
onChange: (e) => Q("displayName", e),
|
|
390
390
|
placeholder: "How you want to appear"
|
|
391
391
|
}),
|
|
392
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ k(h, {
|
|
393
393
|
id: "bio",
|
|
394
394
|
label: "Bio",
|
|
395
395
|
value: J.bio,
|
|
@@ -398,7 +398,7 @@ function F() {
|
|
|
398
398
|
rows: 3,
|
|
399
399
|
className: "mt-4"
|
|
400
400
|
}),
|
|
401
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ k(m, {
|
|
402
402
|
id: "visibility",
|
|
403
403
|
label: "Visibility",
|
|
404
404
|
value: J.visibility,
|
|
@@ -406,7 +406,7 @@ function F() {
|
|
|
406
406
|
options: le,
|
|
407
407
|
className: "mt-4"
|
|
408
408
|
}),
|
|
409
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ k(g, {
|
|
410
410
|
id: "stylePreferences",
|
|
411
411
|
label: "Style preferences",
|
|
412
412
|
value: J.stylePreferences,
|
|
@@ -415,7 +415,7 @@ function F() {
|
|
|
415
415
|
hint: "Comma-separated",
|
|
416
416
|
className: "mt-4"
|
|
417
417
|
}),
|
|
418
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ k(g, {
|
|
419
419
|
id: "palette",
|
|
420
420
|
label: "Palette",
|
|
421
421
|
value: J.palette,
|
|
@@ -424,7 +424,7 @@ function F() {
|
|
|
424
424
|
hint: "Comma-separated colour names — shown as swatches",
|
|
425
425
|
className: "mt-4"
|
|
426
426
|
}),
|
|
427
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ k(g, {
|
|
428
428
|
id: "favouriteBrands",
|
|
429
429
|
label: "Favourite brands",
|
|
430
430
|
value: J.favouriteBrands,
|
|
@@ -433,14 +433,14 @@ function F() {
|
|
|
433
433
|
hint: "Comma-separated",
|
|
434
434
|
className: "mt-4"
|
|
435
435
|
}),
|
|
436
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ A("div", {
|
|
437
437
|
className: "mt-4",
|
|
438
|
-
children: [/* @__PURE__ */
|
|
438
|
+
children: [/* @__PURE__ */ k("span", {
|
|
439
439
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
440
440
|
children: "Sizes"
|
|
441
|
-
}), /* @__PURE__ */
|
|
441
|
+
}), /* @__PURE__ */ k("div", {
|
|
442
442
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
443
|
-
children: de.map((e) => /* @__PURE__ */
|
|
443
|
+
children: de.map((e) => /* @__PURE__ */ k(g, {
|
|
444
444
|
id: `size-${e}`,
|
|
445
445
|
label: p(e),
|
|
446
446
|
value: J.sizes[e] ?? "",
|
|
@@ -449,17 +449,17 @@ function F() {
|
|
|
449
449
|
}, e))
|
|
450
450
|
})]
|
|
451
451
|
}),
|
|
452
|
-
H.isError && /* @__PURE__ */
|
|
452
|
+
H.isError && /* @__PURE__ */ k("p", {
|
|
453
453
|
className: "mt-4 rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
|
|
454
454
|
children: H.error instanceof Error ? H.error.message : "Something went wrong"
|
|
455
455
|
}),
|
|
456
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ k("div", {
|
|
457
457
|
className: "mt-6 flex justify-end gap-2",
|
|
458
|
-
children: /* @__PURE__ */
|
|
458
|
+
children: /* @__PURE__ */ A("button", {
|
|
459
459
|
type: "submit",
|
|
460
460
|
disabled: H.isPending,
|
|
461
461
|
className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-5 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50",
|
|
462
|
-
children: [H.isPending ? /* @__PURE__ */
|
|
462
|
+
children: [H.isPending ? /* @__PURE__ */ k(x, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ k(S, { className: "h-4 w-4" }), X ? "Save changes" : "Create profile"]
|
|
463
463
|
})
|
|
464
464
|
})
|
|
465
465
|
]
|