@burdenoff/microfe-coolandlovely 2026.1123.2 → 2026.1124.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/CoolAndLovelyRoutes.js +29 -25
- package/dist/coolandlovely/components/intelligence/BrandCreatorMatchPanel.d.ts +6 -0
- package/dist/coolandlovely/components/intelligence/BrandCreatorMatchPanel.js +147 -0
- package/dist/coolandlovely/components/intelligence/CollectionCurationCallout.d.ts +8 -0
- package/dist/coolandlovely/components/intelligence/CollectionCurationCallout.js +109 -0
- package/dist/coolandlovely/components/intelligence/ProvenanceChip.d.ts +8 -0
- package/dist/coolandlovely/components/intelligence/ProvenanceChip.js +36 -0
- package/dist/coolandlovely/components/intelligence/WardrobeIntelligenceStrip.d.ts +2 -0
- package/dist/coolandlovely/components/intelligence/WardrobeIntelligenceStrip.js +123 -0
- package/dist/coolandlovely/hooks/index.d.ts +1 -0
- package/dist/coolandlovely/hooks/index.js +1 -0
- package/dist/coolandlovely/hooks/useStyleIntelligenceApi.d.ts +24 -0
- package/dist/coolandlovely/hooks/useStyleIntelligenceApi.js +266 -0
- package/dist/coolandlovely/pages/brands/BrandDetailPage.js +157 -155
- package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +110 -105
- package/dist/coolandlovely/pages/intelligence/StyleIntelligencePage.d.ts +15 -0
- package/dist/coolandlovely/pages/intelligence/StyleIntelligencePage.js +1007 -0
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +71 -69
- package/dist/coolandlovely/types/index.d.ts +1 -0
- package/dist/coolandlovely/types/intelligence.d.ts +128 -0
- package/package.json +1 -1
|
@@ -9,17 +9,18 @@ import { TagList as u } from "../../components/TagList.js";
|
|
|
9
9
|
import { Comments as d } from "../../components/Comments.js";
|
|
10
10
|
import { StepTracker as f } from "../../components/StepTracker.js";
|
|
11
11
|
import { ActivityTrail as p } from "../../components/ActivityTrail.js";
|
|
12
|
-
import {
|
|
12
|
+
import { BrandCreatorMatchPanel as m } from "../../components/intelligence/BrandCreatorMatchPanel.js";
|
|
13
|
+
import { useContextNavigation as h } from "../../hooks/useContextNavigation.js";
|
|
13
14
|
import "../../hooks/index.js";
|
|
14
|
-
import { categoryIcon as
|
|
15
|
-
import { formatDate as
|
|
16
|
-
import { cn as
|
|
17
|
-
import { ArrowLeft as
|
|
18
|
-
import { useParams as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import { GlassCard as
|
|
15
|
+
import { categoryIcon as g } from "../../utils/icons.js";
|
|
16
|
+
import { formatDate as _, formatPrice as v, titleCase as y } from "../../utils/formatters.js";
|
|
17
|
+
import { cn as b } from "../../utils/cn.js";
|
|
18
|
+
import { ArrowLeft as x, ExternalLink as S, Loader2 as C, Package as w, Pencil as T, Plus as E, Shapes as D, Shirt as O, Store as k } from "lucide-react";
|
|
19
|
+
import { useParams as A } from "react-router";
|
|
20
|
+
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
21
|
+
import { GlassCard as P } from "@burdenoff/fe-libs/ui";
|
|
21
22
|
// src/coolandlovely/pages/brands/BrandDetailPage.tsx
|
|
22
|
-
var
|
|
23
|
+
var F = {
|
|
23
24
|
DRAFT: ["PENDING_REVIEW", "ARCHIVED"],
|
|
24
25
|
PENDING_REVIEW: [
|
|
25
26
|
"PUBLISHED",
|
|
@@ -29,330 +30,330 @@ var P = {
|
|
|
29
30
|
PUBLISHED: ["SUSPENDED", "ARCHIVED"],
|
|
30
31
|
SUSPENDED: ["PUBLISHED", "ARCHIVED"],
|
|
31
32
|
ARCHIVED: []
|
|
32
|
-
},
|
|
33
|
+
}, I = [
|
|
33
34
|
"DRAFT",
|
|
34
35
|
"PENDING_REVIEW",
|
|
35
36
|
"PUBLISHED"
|
|
36
37
|
];
|
|
37
|
-
function
|
|
38
|
+
function L(e) {
|
|
38
39
|
let t = e instanceof Error ? e.message : "Transition failed";
|
|
39
40
|
return /forbidden|permission|not allowed|unauthori[sz]ed/i.test(t) ? "Your role does not permit this action." : t;
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
-
let { brandId:
|
|
43
|
-
if (a(
|
|
42
|
+
function R() {
|
|
43
|
+
let { brandId: R } = A(), z = h(), B = n(R), V = r(), H = i();
|
|
44
|
+
if (a(R, B.data?.name), B.isLoading) return /* @__PURE__ */ M(e, {
|
|
44
45
|
title: "Brand",
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
+
children: /* @__PURE__ */ M(s, { label: "Loading brand…" })
|
|
46
47
|
});
|
|
47
|
-
if (
|
|
48
|
+
if (B.isError || !B.data) return /* @__PURE__ */ M(e, {
|
|
48
49
|
title: "Brand",
|
|
49
|
-
children: /* @__PURE__ */
|
|
50
|
+
children: /* @__PURE__ */ M(o, {
|
|
50
51
|
title: "Brand not found",
|
|
51
52
|
message: "This storefront could not be loaded or does not exist.",
|
|
52
|
-
onRetry: () => void
|
|
53
|
+
onRetry: () => void B.refetch()
|
|
53
54
|
})
|
|
54
55
|
});
|
|
55
|
-
let
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
title:
|
|
58
|
-
description: `@${
|
|
59
|
-
children: /* @__PURE__ */
|
|
56
|
+
let U = B.data, W = U.collections ?? [], G = U.items ?? [], K = F[U.status], q = I.includes(U.status) ? I : [...I.slice(0, 1), U.status], J = U.websiteUrl && /^https?:\/\//i.test(U.websiteUrl) ? U.websiteUrl : void 0;
|
|
57
|
+
return /* @__PURE__ */ M(e, {
|
|
58
|
+
title: U.name,
|
|
59
|
+
description: `@${U.handle}`,
|
|
60
|
+
children: /* @__PURE__ */ N("div", {
|
|
60
61
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
61
|
-
children: [/* @__PURE__ */
|
|
62
|
+
children: [/* @__PURE__ */ N("div", {
|
|
62
63
|
className: "space-y-6 lg:col-span-2",
|
|
63
64
|
children: [
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
coverFileId:
|
|
66
|
-
logoFileId:
|
|
67
|
-
name:
|
|
68
|
-
seed:
|
|
65
|
+
/* @__PURE__ */ M(l, {
|
|
66
|
+
coverFileId: U.cover?.id,
|
|
67
|
+
logoFileId: U.logo?.id,
|
|
68
|
+
name: U.name,
|
|
69
|
+
seed: U.id,
|
|
69
70
|
className: "overflow-hidden rounded-xl border border-border-seam shadow-sm",
|
|
70
|
-
overlay: /* @__PURE__ */
|
|
71
|
+
overlay: /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ N("div", {
|
|
71
72
|
className: "absolute right-3 top-3 flex flex-wrap items-center justify-end gap-2",
|
|
72
73
|
children: [
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ N("button", {
|
|
74
75
|
type: "button",
|
|
75
|
-
onClick: () =>
|
|
76
|
+
onClick: () => z("/brands"),
|
|
76
77
|
className: "inline-flex items-center gap-1.5 rounded-lg bg-bg-surface/80 px-3 py-2 text-sm font-medium text-text-primary shadow-sm backdrop-blur transition-colors hover:bg-bg-surface",
|
|
77
|
-
children: [/* @__PURE__ */
|
|
78
|
+
children: [/* @__PURE__ */ M(x, { className: "h-4 w-4" }), " Back"]
|
|
78
79
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ N("button", {
|
|
80
81
|
type: "button",
|
|
81
|
-
onClick: () =>
|
|
82
|
+
onClick: () => z(`/brand-orders?brand=${U.id}`),
|
|
82
83
|
className: "inline-flex items-center gap-1.5 rounded-lg bg-bg-surface/80 px-3 py-2 text-sm font-medium text-text-primary shadow-sm backdrop-blur transition-colors hover:bg-bg-surface",
|
|
83
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: [/* @__PURE__ */ M(w, { className: "h-4 w-4" }), " Orders"]
|
|
84
85
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ N("button", {
|
|
86
87
|
type: "button",
|
|
87
|
-
onClick: () =>
|
|
88
|
+
onClick: () => z(`/brands/${U.id}/edit`),
|
|
88
89
|
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 shadow-sm transition-colors hover:bg-action-primary-bg/90",
|
|
89
|
-
children: [/* @__PURE__ */
|
|
90
|
+
children: [/* @__PURE__ */ M(T, { className: "h-4 w-4" }), " Edit"]
|
|
90
91
|
})
|
|
91
92
|
]
|
|
92
|
-
}), /* @__PURE__ */
|
|
93
|
+
}), /* @__PURE__ */ N("div", {
|
|
93
94
|
className: "absolute inset-x-0 bottom-0 flex items-end gap-3 p-4 sm:gap-4 sm:p-5",
|
|
94
|
-
children: [/* @__PURE__ */
|
|
95
|
-
icon: /* @__PURE__ */
|
|
96
|
-
seed:
|
|
97
|
-
fileId:
|
|
98
|
-
alt: `${
|
|
95
|
+
children: [/* @__PURE__ */ M(c, {
|
|
96
|
+
icon: /* @__PURE__ */ M(k, { className: "h-7 w-7" }),
|
|
97
|
+
seed: U.id,
|
|
98
|
+
fileId: U.logo?.id,
|
|
99
|
+
alt: `${U.name} logo`,
|
|
99
100
|
className: "h-16 w-16 shrink-0 rounded-full shadow-md ring-2 ring-bg-surface"
|
|
100
|
-
}), /* @__PURE__ */
|
|
101
|
+
}), /* @__PURE__ */ N("div", {
|
|
101
102
|
className: "min-w-0 pb-1",
|
|
102
|
-
children: [/* @__PURE__ */
|
|
103
|
+
children: [/* @__PURE__ */ N("div", {
|
|
103
104
|
className: "flex flex-wrap items-center gap-x-2 gap-y-0.5",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
105
|
+
children: [/* @__PURE__ */ M("h2", {
|
|
105
106
|
className: "truncate text-xl font-semibold text-text-primary sm:text-2xl",
|
|
106
|
-
children:
|
|
107
|
-
}), /* @__PURE__ */
|
|
107
|
+
children: U.name
|
|
108
|
+
}), /* @__PURE__ */ N("span", {
|
|
108
109
|
className: "text-sm text-text-secondary",
|
|
109
|
-
children: ["@",
|
|
110
|
+
children: ["@", U.handle]
|
|
110
111
|
})]
|
|
111
|
-
}),
|
|
112
|
+
}), U.tagline && /* @__PURE__ */ M("p", {
|
|
112
113
|
className: "mt-1 line-clamp-2 text-sm text-text-primary",
|
|
113
|
-
children:
|
|
114
|
+
children: U.tagline
|
|
114
115
|
})]
|
|
115
116
|
})]
|
|
116
117
|
})] })
|
|
117
118
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ N("section", {
|
|
119
120
|
className: "space-y-3",
|
|
120
121
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ N("div", {
|
|
122
123
|
className: "flex flex-wrap items-center justify-between gap-3",
|
|
123
|
-
children: [
|
|
124
|
-
tags:
|
|
124
|
+
children: [U.aesthetics.length > 0 ? /* @__PURE__ */ M(u, {
|
|
125
|
+
tags: U.aesthetics.map(y),
|
|
125
126
|
tone: "accent",
|
|
126
127
|
max: 12
|
|
127
|
-
}) : /* @__PURE__ */
|
|
128
|
+
}) : /* @__PURE__ */ M("span", {}), /* @__PURE__ */ M(t, { status: U.status })]
|
|
128
129
|
}),
|
|
129
|
-
|
|
130
|
+
U.bio && /* @__PURE__ */ M("p", {
|
|
130
131
|
className: "text-sm text-text-secondary",
|
|
131
|
-
children:
|
|
132
|
+
children: U.bio
|
|
132
133
|
}),
|
|
133
|
-
|
|
134
|
-
tags:
|
|
134
|
+
U.tags.length > 0 && /* @__PURE__ */ M(u, {
|
|
135
|
+
tags: U.tags,
|
|
135
136
|
max: 12
|
|
136
137
|
}),
|
|
137
|
-
|
|
138
|
-
href:
|
|
138
|
+
J ? /* @__PURE__ */ N("a", {
|
|
139
|
+
href: J,
|
|
139
140
|
target: "_blank",
|
|
140
141
|
rel: "noopener noreferrer",
|
|
141
142
|
className: "inline-flex max-w-full items-center gap-1.5 text-sm font-medium text-action-primary-bg hover:underline",
|
|
142
143
|
children: [
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ M(S, { className: "h-4 w-4 shrink-0" }),
|
|
144
145
|
" ",
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ M("span", {
|
|
146
147
|
className: "break-all",
|
|
147
|
-
children:
|
|
148
|
+
children: J
|
|
148
149
|
})
|
|
149
150
|
]
|
|
150
|
-
}) :
|
|
151
|
+
}) : U.websiteUrl ? /* @__PURE__ */ M("p", {
|
|
151
152
|
className: "break-all text-sm text-text-secondary",
|
|
152
|
-
children:
|
|
153
|
+
children: U.websiteUrl
|
|
153
154
|
}) : null
|
|
154
155
|
]
|
|
155
156
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ N("section", {
|
|
157
158
|
className: "mt-6",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ N("div", {
|
|
159
160
|
className: "mb-3 flex items-center justify-between gap-2",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
161
|
+
children: [/* @__PURE__ */ N("h3", {
|
|
161
162
|
className: "flex items-center gap-2 text-lg font-semibold text-text-primary",
|
|
162
163
|
children: [
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ M(D, { className: "h-5 w-5" }),
|
|
164
165
|
" Collections (",
|
|
165
|
-
|
|
166
|
+
W.length,
|
|
166
167
|
")"
|
|
167
168
|
]
|
|
168
|
-
}), /* @__PURE__ */
|
|
169
|
+
}), /* @__PURE__ */ N("button", {
|
|
169
170
|
type: "button",
|
|
170
|
-
onClick: () =>
|
|
171
|
+
onClick: () => z(`/collections/new?brandId=${U.id}`),
|
|
171
172
|
className: "inline-flex shrink-0 items-center gap-1.5 rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ M(E, { className: "h-4 w-4" }), " Add collection"]
|
|
173
174
|
})]
|
|
174
|
-
}),
|
|
175
|
+
}), W.length === 0 ? /* @__PURE__ */ M("p", {
|
|
175
176
|
className: "rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary",
|
|
176
177
|
children: "No collections yet."
|
|
177
|
-
}) : /* @__PURE__ */
|
|
178
|
+
}) : /* @__PURE__ */ M("div", {
|
|
178
179
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
179
|
-
children:
|
|
180
|
+
children: W.map((e) => /* @__PURE__ */ N("button", {
|
|
180
181
|
type: "button",
|
|
181
|
-
onClick: () =>
|
|
182
|
+
onClick: () => z(`/collections/${e.id}`),
|
|
182
183
|
className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-3 text-left transition-colors hover:bg-bg-sunken/50",
|
|
183
184
|
children: [
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
icon: /* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ M(c, {
|
|
186
|
+
icon: /* @__PURE__ */ M(D, { className: "h-5 w-5" }),
|
|
186
187
|
seed: e.id,
|
|
187
188
|
fileId: e.cover?.id,
|
|
188
189
|
alt: e.name,
|
|
189
190
|
className: "h-11 w-11 shrink-0"
|
|
190
191
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ N("div", {
|
|
192
193
|
className: "min-w-0 flex-1",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ M("p", {
|
|
194
195
|
className: "truncate text-sm font-medium text-text-primary",
|
|
195
196
|
children: e.name
|
|
196
|
-
}), /* @__PURE__ */
|
|
197
|
+
}), /* @__PURE__ */ M("p", {
|
|
197
198
|
className: "text-xs text-text-secondary",
|
|
198
|
-
children:
|
|
199
|
+
children: y(e.season)
|
|
199
200
|
})]
|
|
200
201
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ M(t, { status: e.status })
|
|
202
203
|
]
|
|
203
204
|
}, e.id))
|
|
204
205
|
})]
|
|
205
206
|
}),
|
|
206
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ N("section", {
|
|
207
208
|
className: "mt-6",
|
|
208
|
-
children: [/* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ N("h3", {
|
|
209
210
|
className: "mb-3 flex items-center gap-2 text-lg font-semibold text-text-primary",
|
|
210
211
|
children: [
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ M(O, { className: "h-5 w-5" }),
|
|
212
213
|
" Style items (",
|
|
213
|
-
|
|
214
|
+
G.length,
|
|
214
215
|
")"
|
|
215
216
|
]
|
|
216
|
-
}),
|
|
217
|
+
}), G.length === 0 ? /* @__PURE__ */ M("p", {
|
|
217
218
|
className: "rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary",
|
|
218
219
|
children: "No items yet."
|
|
219
|
-
}) : /* @__PURE__ */
|
|
220
|
+
}) : /* @__PURE__ */ M("div", {
|
|
220
221
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-3",
|
|
221
|
-
children:
|
|
222
|
+
children: G.map((e) => /* @__PURE__ */ N("button", {
|
|
222
223
|
type: "button",
|
|
223
|
-
onClick: () =>
|
|
224
|
+
onClick: () => z(`/items/${e.id}`),
|
|
224
225
|
className: "overflow-hidden rounded-lg border border-border-seam bg-bg-surface text-left transition-all hover:border-accent-foreground/20 hover:shadow-md",
|
|
225
|
-
children: [/* @__PURE__ */
|
|
226
|
-
icon:
|
|
226
|
+
children: [/* @__PURE__ */ M(c, {
|
|
227
|
+
icon: g(e.category, 24),
|
|
227
228
|
seed: e.id,
|
|
228
229
|
fileId: e.image?.id,
|
|
229
230
|
alt: e.name,
|
|
230
231
|
className: "h-24 w-full"
|
|
231
|
-
}), /* @__PURE__ */
|
|
232
|
+
}), /* @__PURE__ */ N("div", {
|
|
232
233
|
className: "p-3",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
234
|
+
children: [/* @__PURE__ */ M("p", {
|
|
234
235
|
className: "truncate text-sm font-medium text-text-primary",
|
|
235
236
|
children: e.name
|
|
236
|
-
}), /* @__PURE__ */
|
|
237
|
+
}), /* @__PURE__ */ M("p", {
|
|
237
238
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
238
|
-
children:
|
|
239
|
+
children: v(e.price, e.currency)
|
|
239
240
|
})]
|
|
240
241
|
})]
|
|
241
242
|
}, e.id))
|
|
242
243
|
})]
|
|
243
244
|
})
|
|
244
245
|
]
|
|
245
|
-
}), /* @__PURE__ */
|
|
246
|
+
}), /* @__PURE__ */ N("div", {
|
|
246
247
|
className: "space-y-4",
|
|
247
248
|
children: [
|
|
248
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ N(P, {
|
|
249
250
|
treatment: "insight",
|
|
250
251
|
className: "p-5",
|
|
251
252
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ M("h3", {
|
|
253
254
|
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
254
255
|
children: "Publish lifecycle"
|
|
255
256
|
}),
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
-
steps:
|
|
258
|
-
current:
|
|
257
|
+
/* @__PURE__ */ M(f, {
|
|
258
|
+
steps: q,
|
|
259
|
+
current: U.status,
|
|
259
260
|
className: "mb-5"
|
|
260
261
|
}),
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ N("div", {
|
|
262
263
|
className: "mb-3 flex items-center gap-2",
|
|
263
|
-
children: [/* @__PURE__ */
|
|
264
|
+
children: [/* @__PURE__ */ M("span", {
|
|
264
265
|
className: "text-sm text-text-secondary",
|
|
265
266
|
children: "Current:"
|
|
266
|
-
}), /* @__PURE__ */
|
|
267
|
+
}), /* @__PURE__ */ M(t, { status: U.status })]
|
|
267
268
|
}),
|
|
268
|
-
|
|
269
|
+
K.length === 0 ? /* @__PURE__ */ M("p", {
|
|
269
270
|
className: "text-xs text-text-secondary",
|
|
270
271
|
children: "This brand is archived (terminal state)."
|
|
271
|
-
}) : /* @__PURE__ */
|
|
272
|
+
}) : /* @__PURE__ */ M("div", {
|
|
272
273
|
className: "flex flex-col gap-2",
|
|
273
|
-
children:
|
|
274
|
+
children: K.map((e) => /* @__PURE__ */ N("button", {
|
|
274
275
|
type: "button",
|
|
275
|
-
disabled:
|
|
276
|
-
onClick: () =>
|
|
277
|
-
id:
|
|
276
|
+
disabled: V.isPending,
|
|
277
|
+
onClick: () => V.mutate({
|
|
278
|
+
id: U.id,
|
|
278
279
|
status: e
|
|
279
280
|
}),
|
|
280
|
-
className:
|
|
281
|
+
className: b("inline-flex items-center justify-center gap-2 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50"),
|
|
281
282
|
children: [
|
|
282
|
-
|
|
283
|
+
V.isPending && /* @__PURE__ */ M(C, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
283
284
|
"Move to ",
|
|
284
|
-
|
|
285
|
+
y(e)
|
|
285
286
|
]
|
|
286
287
|
}, e))
|
|
287
288
|
}),
|
|
288
|
-
|
|
289
|
+
V.isError && /* @__PURE__ */ M("p", {
|
|
289
290
|
className: "mt-2 text-xs text-status-error-text",
|
|
290
|
-
children:
|
|
291
|
+
children: L(V.error)
|
|
291
292
|
})
|
|
292
293
|
]
|
|
293
294
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ N(P, {
|
|
295
296
|
treatment: "plain",
|
|
296
297
|
className: "p-5",
|
|
297
|
-
children: [/* @__PURE__ */
|
|
298
|
+
children: [/* @__PURE__ */ M("h3", {
|
|
298
299
|
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
299
300
|
children: "Details"
|
|
300
|
-
}), /* @__PURE__ */
|
|
301
|
+
}), /* @__PURE__ */ N("dl", {
|
|
301
302
|
className: "space-y-2 text-sm",
|
|
302
303
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ N("div", {
|
|
304
305
|
className: "flex justify-between gap-2",
|
|
305
|
-
children: [/* @__PURE__ */
|
|
306
|
+
children: [/* @__PURE__ */ M("dt", {
|
|
306
307
|
className: "text-text-secondary",
|
|
307
308
|
children: "Handle"
|
|
308
|
-
}), /* @__PURE__ */
|
|
309
|
+
}), /* @__PURE__ */ N("dd", {
|
|
309
310
|
className: "text-text-primary",
|
|
310
|
-
children: ["@",
|
|
311
|
+
children: ["@", U.handle]
|
|
311
312
|
})]
|
|
312
313
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ N("div", {
|
|
314
315
|
className: "flex items-center justify-between gap-2",
|
|
315
|
-
children: [/* @__PURE__ */
|
|
316
|
+
children: [/* @__PURE__ */ M("dt", {
|
|
316
317
|
className: "text-text-secondary",
|
|
317
318
|
children: "Featured"
|
|
318
|
-
}), /* @__PURE__ */
|
|
319
|
+
}), /* @__PURE__ */ N("dd", {
|
|
319
320
|
className: "flex items-center gap-2",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ M("button", {
|
|
321
322
|
type: "button",
|
|
322
323
|
role: "switch",
|
|
323
|
-
"aria-checked":
|
|
324
|
-
"aria-label":
|
|
325
|
-
disabled:
|
|
326
|
-
onClick: () =>
|
|
327
|
-
id:
|
|
328
|
-
input: { isFeatured: !
|
|
324
|
+
"aria-checked": U.isFeatured,
|
|
325
|
+
"aria-label": U.isFeatured ? "Unfeature this brand" : "Feature this brand",
|
|
326
|
+
disabled: H.isPending,
|
|
327
|
+
onClick: () => H.mutate({
|
|
328
|
+
id: U.id,
|
|
329
|
+
input: { isFeatured: !U.isFeatured }
|
|
329
330
|
}),
|
|
330
|
-
className:
|
|
331
|
-
children: /* @__PURE__ */
|
|
332
|
-
}),
|
|
331
|
+
className: b("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:opacity-60", U.isFeatured ? "bg-action-primary-bg" : "bg-bg-sunken"),
|
|
332
|
+
children: /* @__PURE__ */ M("span", { className: b("inline-block h-4 w-4 rounded-full bg-bg-surface shadow transition-transform", U.isFeatured ? "translate-x-[1.125rem]" : "translate-x-0.5") })
|
|
333
|
+
}), H.isPending && /* @__PURE__ */ M(C, { className: "h-3.5 w-3.5 animate-spin text-text-secondary" })]
|
|
333
334
|
})]
|
|
334
335
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ N("div", {
|
|
336
337
|
className: "flex justify-between gap-2",
|
|
337
|
-
children: [/* @__PURE__ */
|
|
338
|
+
children: [/* @__PURE__ */ M("dt", {
|
|
338
339
|
className: "text-text-secondary",
|
|
339
340
|
children: "Created"
|
|
340
|
-
}), /* @__PURE__ */
|
|
341
|
+
}), /* @__PURE__ */ M("dd", {
|
|
341
342
|
className: "text-text-primary",
|
|
342
|
-
children:
|
|
343
|
+
children: _(U.createdAt, {
|
|
343
344
|
hour: void 0,
|
|
344
345
|
minute: void 0
|
|
345
346
|
})
|
|
346
347
|
})]
|
|
347
348
|
}),
|
|
348
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ N("div", {
|
|
349
350
|
className: "flex justify-between gap-2",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ M("dt", {
|
|
351
352
|
className: "text-text-secondary",
|
|
352
353
|
children: "Updated"
|
|
353
|
-
}), /* @__PURE__ */
|
|
354
|
+
}), /* @__PURE__ */ M("dd", {
|
|
354
355
|
className: "text-text-primary",
|
|
355
|
-
children:
|
|
356
|
+
children: _(U.updatedAt, {
|
|
356
357
|
hour: void 0,
|
|
357
358
|
minute: void 0
|
|
358
359
|
})
|
|
@@ -361,13 +362,14 @@ function L() {
|
|
|
361
362
|
]
|
|
362
363
|
})]
|
|
363
364
|
}),
|
|
364
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ M(m, { brandId: U.id }),
|
|
366
|
+
/* @__PURE__ */ M(p, {
|
|
365
367
|
resourceType: "coolandlovely-brand",
|
|
366
|
-
resourceId:
|
|
368
|
+
resourceId: U.id
|
|
367
369
|
}),
|
|
368
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ M(d, {
|
|
369
371
|
entityType: "CooBrand",
|
|
370
|
-
entityId:
|
|
372
|
+
entityId: U.id,
|
|
371
373
|
className: "mt-0"
|
|
372
374
|
})
|
|
373
375
|
]
|
|
@@ -375,4 +377,4 @@ function L() {
|
|
|
375
377
|
})
|
|
376
378
|
});
|
|
377
379
|
}
|
|
378
|
-
export {
|
|
380
|
+
export { R as BrandDetailPage };
|