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