@nukleus-sports/ui-patterns 0.1.2 → 0.3.0

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/marketing.js CHANGED
@@ -1,234 +1,11 @@
1
- // src/marketing/entity-avatar.tsx
2
- import { Avatar, AvatarFallback, AvatarImage, cn } from "@nukleus-sports/ui-web";
3
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
- var ENTITY_AVATAR_SIZE_PX = {
5
- xs: 16,
6
- sm: 24,
7
- md: 32,
8
- lg: 48,
9
- xl: 64
10
- };
11
- var sizeClasses = {
12
- xs: "h-4 w-4",
13
- sm: "h-6 w-6",
14
- md: "h-8 w-8",
15
- lg: "h-12 w-12",
16
- xl: "h-16 w-16"
17
- };
18
- var initialSizeClasses = {
19
- xs: "text-[8px]",
20
- sm: "text-xs",
21
- md: "text-sm",
22
- lg: "text-base",
23
- xl: "text-lg"
24
- };
25
- var contactSizeClasses = {
26
- xs: "h-4 w-4",
27
- sm: "h-6 w-6",
28
- md: "h-8 w-8",
29
- lg: "h-12 w-12",
30
- xl: "h-16 w-16"
31
- };
32
- var contactInitialSizeClasses = {
33
- xs: "text-[8px]",
34
- sm: "text-[10px]",
35
- md: "text-sm",
36
- lg: "text-base",
37
- xl: "text-lg"
38
- };
39
- function EntityAvatar({
40
- entityType = "initials",
41
- entityData,
42
- firstName,
43
- lastName,
44
- name,
45
- imageUrl,
46
- resolveImageUrl,
47
- size = "md",
48
- className,
49
- fallbackClassName,
50
- showInitials = true,
51
- cacheBreaker
52
- }) {
53
- const extractedFirstName = firstName || entityData?.first_name || "";
54
- const extractedLastName = lastName || entityData?.last_name || "";
55
- const extractedName = name || entityData?.name || "";
56
- const isSquared = entityType === "team" || entityType === "company";
57
- const usesContactSizes = entityType === "contact" || entityType === "company" || entityType === "initials";
58
- const avatarSizeClasses = usesContactSizes ? contactSizeClasses : sizeClasses;
59
- const initialsSizeClasses = usesContactSizes ? contactInitialSizeClasses : initialSizeClasses;
60
- const defaultSize = usesContactSizes ? "sm" : "md";
61
- const effectiveSize = size || defaultSize;
62
- const getRawImageUrl = () => {
63
- if (imageUrl) return imageUrl;
64
- switch (entityType) {
65
- case "player":
66
- return entityData?.player_image_url ?? null;
67
- case "coach":
68
- return entityData?.coach_image_url ?? null;
69
- case "team":
70
- return entityData?.team_logo_url ?? null;
71
- case "initials":
72
- case "contact":
73
- case "company":
74
- return entityData?.avatar_url ?? null;
75
- case "agency":
76
- return entityData?.profile_image_url ?? null;
77
- default:
78
- return null;
79
- }
80
- };
81
- const getImageUrl = () => {
82
- const rawUrl = getRawImageUrl();
83
- if (!rawUrl) return null;
84
- if (resolveImageUrl) {
85
- return resolveImageUrl(rawUrl, { entityType, size: effectiveSize, cacheBreaker });
86
- }
87
- if (rawUrl.startsWith("http") || rawUrl.startsWith("data:")) {
88
- return rawUrl;
89
- }
90
- return null;
91
- };
92
- const getInitials = () => {
93
- if (!showInitials) {
94
- const defaults = {
95
- player: "P",
96
- coach: "C",
97
- team: "T",
98
- contact: "C",
99
- company: "C",
100
- agency: "",
101
- initials: ""
102
- };
103
- return defaults[entityType];
104
- }
105
- switch (entityType) {
106
- case "player":
107
- case "coach":
108
- case "agency": {
109
- const first = extractedFirstName?.[0] || "";
110
- const last = extractedLastName?.[0] || "";
111
- const initials2 = (first + last).toUpperCase();
112
- if (initials2) return initials2;
113
- if (entityType === "player") return "P";
114
- if (entityType === "coach") return "C";
115
- return "?";
116
- }
117
- case "team": {
118
- const teamName = entityData?.team || "";
119
- const nickname = entityData?.nickname || "";
120
- const displayName = nickname || teamName || "";
121
- const words = displayName.trim().split(/\s+/);
122
- if (words.length >= 2) {
123
- return (words[0][0] + words[1][0]).toUpperCase();
124
- } else if (words.length === 1 && words[0].length >= 2) {
125
- return words[0].substring(0, 2).toUpperCase();
126
- }
127
- return "T";
128
- }
129
- case "initials": {
130
- const displayName = extractedName.trim();
131
- if (!displayName) return "?";
132
- const nameParts = displayName.trim().split(/\s+/);
133
- if (nameParts.length >= 2) {
134
- return (nameParts[0][0] + nameParts[nameParts.length - 1][0]).toUpperCase();
135
- }
136
- return displayName.substring(0, 2).toUpperCase();
137
- }
138
- case "contact":
139
- case "company": {
140
- const displayName = extractedName;
141
- if (!displayName) return "C";
142
- const nameParts = displayName.trim().split(/\s+/);
143
- if (nameParts.length >= 2) {
144
- if (entityType === "company") {
145
- return (nameParts[0][0] + nameParts[1][0]).toUpperCase();
146
- } else {
147
- return (nameParts[0][0] + nameParts[nameParts.length - 1][0]).toUpperCase();
148
- }
149
- }
150
- return displayName.substring(0, 2).toUpperCase();
151
- }
152
- default:
153
- return "?";
154
- }
155
- };
156
- const getDefaultImageUrl = () => {
157
- switch (entityType) {
158
- case "player":
159
- case "coach":
160
- return "/images/headshot_default.png";
161
- case "team":
162
- return "/images/team_default.png";
163
- case "contact":
164
- return "/images/contact_default.png";
165
- case "company":
166
- return "/images/company_default.png";
167
- case "agency":
168
- return "/images/agency_default.png";
169
- case "initials":
170
- return "/images/headshot_default.png";
171
- default:
172
- return "/images/headshot_default.png";
173
- }
174
- };
175
- const getAltText = () => {
176
- switch (entityType) {
177
- case "player":
178
- return `${extractedFirstName} ${extractedLastName}`.trim() || "Player avatar";
179
- case "coach":
180
- return `${extractedFirstName} ${extractedLastName}`.trim() || "Coach avatar";
181
- case "team":
182
- return `${entityData?.team || entityData?.nickname || "Team"} logo`;
183
- case "initials":
184
- return `${extractedName}`.trim() || "User avatar";
185
- case "contact":
186
- return extractedName || "Profile Picture";
187
- case "company":
188
- return extractedName || "Company avatar";
189
- case "agency":
190
- return `${extractedFirstName} ${extractedLastName}`.trim() || "User avatar";
191
- default:
192
- return "Avatar";
193
- }
194
- };
195
- const processedImageUrl = getImageUrl();
196
- const defaultImageUrl = getDefaultImageUrl();
197
- const initials = getInitials();
198
- const altText = getAltText();
199
- const hasValidImage = Boolean(
200
- processedImageUrl && processedImageUrl !== "null" && processedImageUrl !== null && processedImageUrl.trim() !== ""
201
- );
202
- return /* @__PURE__ */ jsxs(Avatar, { className: cn(avatarSizeClasses[effectiveSize], isSquared && "rounded-lg", className), children: [
203
- hasValidImage && /* @__PURE__ */ jsx(AvatarImage, { src: processedImageUrl, alt: altText }),
204
- /* @__PURE__ */ jsx(
205
- AvatarFallback,
206
- {
207
- className: cn(
208
- initialsSizeClasses[effectiveSize],
209
- isSquared && "rounded-lg bg-greys-grey-table-h",
210
- fallbackClassName
211
- ),
212
- children: entityType === "contact" || entityType === "initials" ? initials : /* @__PURE__ */ jsxs(Fragment, { children: [
213
- /* @__PURE__ */ jsx(
214
- "img",
215
- {
216
- src: defaultImageUrl,
217
- alt: altText,
218
- className: "aspect-square h-full w-full object-cover"
219
- }
220
- ),
221
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: initials })
222
- ] })
223
- }
224
- )
225
- ] });
226
- }
1
+ import {
2
+ EntityAvatar
3
+ } from "./chunk-WXPCAG5Z.js";
227
4
 
228
5
  // src/marketing/row-actions-dropdown.tsx
229
6
  import {
230
7
  Button,
231
- cn as cn2,
8
+ cn,
232
9
  DropdownMenu,
233
10
  DropdownMenuContent,
234
11
  DropdownMenuItem,
@@ -239,7 +16,7 @@ import {
239
16
  TooltipTrigger
240
17
  } from "@nukleus-sports/ui-web";
241
18
  import { MoreIcon } from "@nukleus-sports/icons";
242
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
19
+ import { jsx, jsxs } from "react/jsx-runtime";
243
20
  function RowActionsDropdown({
244
21
  actions,
245
22
  trigger,
@@ -251,28 +28,28 @@ function RowActionsDropdown({
251
28
  }) {
252
29
  const visibleActions = actions.filter((a) => a.when !== false);
253
30
  if (visibleActions.length === 0) return null;
254
- return /* @__PURE__ */ jsxs2(DropdownMenu, { modal, children: [
255
- /* @__PURE__ */ jsx2(DropdownMenuTrigger, { asChild: true, children: trigger ?? /* @__PURE__ */ jsx2(
31
+ return /* @__PURE__ */ jsxs(DropdownMenu, { modal, children: [
32
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: trigger ?? /* @__PURE__ */ jsx(
256
33
  Button,
257
34
  {
258
35
  variant: "text",
259
36
  size: "sm",
260
37
  "aria-label": ariaLabel ?? "Row actions",
261
38
  onClick: (e) => e.stopPropagation(),
262
- className: cn2("h-8 w-8 p-0 shrink-0", triggerClassName),
263
- children: /* @__PURE__ */ jsx2(MoreIcon, { className: "h-14 w-16 text-btn-primary", "aria-hidden": "true" })
39
+ className: cn("h-8 w-8 p-0 shrink-0", triggerClassName),
40
+ children: /* @__PURE__ */ jsx(MoreIcon, { className: "h-14 w-16 text-btn-primary", "aria-hidden": "true" })
264
41
  }
265
42
  ) }),
266
- /* @__PURE__ */ jsx2(
43
+ /* @__PURE__ */ jsx(
267
44
  DropdownMenuContent,
268
45
  {
269
46
  align,
270
- className: cn2(
47
+ className: cn(
271
48
  "rounded-[10px] bg-table px-0 py-2 dark:border dark:border-text-secondary shadow-[0_4px_18px_-6px_rgba(0,0,0,0.12)]",
272
49
  contentClassName
273
50
  ),
274
51
  children: visibleActions.map((action, i) => {
275
- const item = /* @__PURE__ */ jsx2(
52
+ const item = /* @__PURE__ */ jsx(
276
53
  DropdownMenuItem,
277
54
  {
278
55
  disabled: action.disabled,
@@ -284,7 +61,7 @@ function RowActionsDropdown({
284
61
  }
285
62
  action.onClick(e);
286
63
  },
287
- className: cn2(
64
+ className: cn(
288
65
  action.destructive && "text-semantic-color-status-priority-blocked-hot-copy hover:!text-semantic-color-status-priority-blocked-hot-copy",
289
66
  action.className
290
67
  ),
@@ -293,9 +70,9 @@ function RowActionsDropdown({
293
70
  i
294
71
  );
295
72
  if (action.disabled && action.disabledTooltip) {
296
- return /* @__PURE__ */ jsx2(TooltipProvider, { children: /* @__PURE__ */ jsxs2(Tooltip, { children: [
297
- /* @__PURE__ */ jsx2(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx2("div", { children: item }) }),
298
- /* @__PURE__ */ jsx2(TooltipContent, { children: action.disabledTooltip })
73
+ return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
74
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("div", { children: item }) }),
75
+ /* @__PURE__ */ jsx(TooltipContent, { children: action.disabledTooltip })
299
76
  ] }) }, i);
300
77
  }
301
78
  return item;
@@ -306,24 +83,166 @@ function RowActionsDropdown({
306
83
  }
307
84
 
308
85
  // src/marketing/deal-empty-state.tsx
309
- import { cn as cn3 } from "@nukleus-sports/ui-web";
310
- import { jsx as jsx3 } from "react/jsx-runtime";
86
+ import { cn as cn2 } from "@nukleus-sports/ui-web";
87
+ import { jsx as jsx2 } from "react/jsx-runtime";
311
88
  function DealEmptyState({ message, className, messageClassName }) {
312
- return /* @__PURE__ */ jsx3("div", { className: cn3("flex items-center justify-center py-10 px-6", className), children: /* @__PURE__ */ jsx3(
89
+ return /* @__PURE__ */ jsx2("div", { className: cn2("flex items-center justify-center py-10 px-6", className), children: /* @__PURE__ */ jsx2(
313
90
  "p",
314
91
  {
315
- className: cn3("body-text text-text-secondary text-center max-w-[380px]", messageClassName),
92
+ className: cn2("body-text text-text-secondary text-center max-w-[380px]", messageClassName),
316
93
  children: message
317
94
  }
318
95
  ) });
319
96
  }
320
97
 
98
+ // src/marketing/contract-details-card.tsx
99
+ import { cn as cn3 } from "@nukleus-sports/ui-web";
100
+ import { formatDealDate } from "@nukleus-sports/core";
101
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
102
+ function Row({ label, children }) {
103
+ return /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 flex-col gap-2", children: [
104
+ /* @__PURE__ */ jsx3("span", { className: "label-base-medium text-text-secondary font-ss02-ss05", children: label }),
105
+ /* @__PURE__ */ jsx3("div", { className: "body-text text-text-primary whitespace-pre-wrap break-words font-ss02-ss05", children })
106
+ ] });
107
+ }
108
+ function usageAfterTerm({
109
+ usage_after_term_days: days
110
+ }) {
111
+ if (days == null) return null;
112
+ return days === 1 ? "1 day after the term" : `${days} days after the term`;
113
+ }
114
+ function ContractDetailsCard({
115
+ details,
116
+ title = "Contract Details",
117
+ caption,
118
+ className
119
+ }) {
120
+ const usage = usageAfterTerm(details);
121
+ const exclusive = details.is_exclusive == null ? null : details.is_exclusive ? "Exclusive" : "Not exclusive";
122
+ return /* @__PURE__ */ jsxs2(
123
+ "div",
124
+ {
125
+ className: cn3(
126
+ "flex w-full flex-col gap-4 rounded-[10px] border border-grey-strokes-tables bg-card px-4 py-3",
127
+ className
128
+ ),
129
+ children: [
130
+ /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-1", children: [
131
+ /* @__PURE__ */ jsx3("h3", { className: "header-xl-medium-card text-text-primary font-ss02-ss05", children: title }),
132
+ caption && /* @__PURE__ */ jsx3("p", { className: "label-xs-text text-text-secondary", children: caption })
133
+ ] }),
134
+ details.warnings.length > 0 && /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-2 rounded-[10px] bg-semantic-color-status-priority-in-progress-warm-fill px-3 py-2", children: [
135
+ /* @__PURE__ */ jsxs2("span", { className: "label-base-medium text-semantic-color-status-priority-in-progress-warm-copy", children: [
136
+ "Worth checking (",
137
+ details.warnings.length,
138
+ ")"
139
+ ] }),
140
+ details.warnings.map((warning, index) => /* @__PURE__ */ jsxs2(
141
+ "p",
142
+ {
143
+ className: "body-text text-semantic-color-status-priority-in-progress-warm-copy break-words",
144
+ children: [
145
+ /* @__PURE__ */ jsx3("span", { className: "font-medium", children: warning.issue }),
146
+ warning.detail && /* @__PURE__ */ jsxs2("span", { children: [
147
+ ": ",
148
+ warning.detail
149
+ ] })
150
+ ]
151
+ },
152
+ `${warning.issue}-${index}`
153
+ ))
154
+ ] }),
155
+ /* @__PURE__ */ jsxs2("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
156
+ details.territory && /* @__PURE__ */ jsx3(Row, { label: "Territory", children: details.territory }),
157
+ details.contracting_entity && /* @__PURE__ */ jsx3(Row, { label: "Contracting Entity", children: details.contracting_entity }),
158
+ exclusive && /* @__PURE__ */ jsx3(Row, { label: "Exclusivity", children: exclusive }),
159
+ usage && /* @__PURE__ */ jsx3(Row, { label: "Usage After Term", children: usage })
160
+ ] }),
161
+ details.exclusivity && /* @__PURE__ */ jsx3(Row, { label: "Exclusivity Terms", children: details.exclusivity }),
162
+ details.payment_terms && /* @__PURE__ */ jsx3(Row, { label: "Payment Terms", children: details.payment_terms }),
163
+ details.usage_after_term && /* @__PURE__ */ jsx3(Row, { label: "Usage Rights", children: details.usage_after_term }),
164
+ details.deliverables.length > 0 && /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-2", children: [
165
+ /* @__PURE__ */ jsxs2("span", { className: "label-base-medium text-text-secondary font-ss02-ss05", children: [
166
+ "Deliverables (",
167
+ details.deliverables.length,
168
+ ")"
169
+ ] }),
170
+ /* @__PURE__ */ jsx3("ul", { className: "flex flex-col divide-y divide-greys-grey-strokes-tables rounded-[10px] border border-greys-grey-strokes-tables", children: details.deliverables.map((deliverable, index) => /* @__PURE__ */ jsxs2(
171
+ "li",
172
+ {
173
+ className: "flex flex-col gap-1 px-3 py-2 sm:flex-row sm:items-start sm:justify-between sm:gap-4",
174
+ children: [
175
+ /* @__PURE__ */ jsxs2("span", { className: "min-w-0 body-text text-text-primary break-words", children: [
176
+ deliverable.units != null && deliverable.units > 1 && /* @__PURE__ */ jsxs2("span", { className: "font-medium", children: [
177
+ deliverable.units,
178
+ " \xD7 "
179
+ ] }),
180
+ deliverable.description
181
+ ] }),
182
+ deliverable.due_date && /* @__PURE__ */ jsxs2("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
183
+ "Due ",
184
+ formatDealDate(deliverable.due_date)
185
+ ] })
186
+ ]
187
+ },
188
+ `${deliverable.description}-${index}`
189
+ )) })
190
+ ] })
191
+ ]
192
+ }
193
+ );
194
+ }
195
+
321
196
  // src/marketing/manual-deal-card.tsx
322
197
  import { useState } from "react";
323
- import { Button as Button2, cn as cn4 } from "@nukleus-sports/ui-web";
198
+ import { Button as Button2, cn as cn5 } from "@nukleus-sports/ui-web";
324
199
  import { ArrowDownFormIcon, XsViewInvoiceIcon } from "@nukleus-sports/icons";
325
- import { fmtUSDWhole, formatDealDate } from "@nukleus-sports/core";
326
- import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
200
+ import { fmtUSD, fmtUSDWhole, formatDealDate as formatDealDate2 } from "@nukleus-sports/core";
201
+
202
+ // src/marketing/deal-card-parts.tsx
203
+ import { cn as cn4 } from "@nukleus-sports/ui-web";
204
+ import { CheckRingRoundIcon } from "@nukleus-sports/icons";
205
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
206
+ var STATUS_STYLES = {
207
+ Active: "bg-semantic-color-status-priority-cold-fill text-semantic-color-status-priority-cold-copy",
208
+ Upcoming: "bg-semantic-color-status-priority-in-progress-warm-fill text-semantic-color-status-priority-in-progress-warm-copy",
209
+ Complete: "bg-semantic-color-status-priority-completed-fill text-semantic-color-status-priority-completed-copy"
210
+ };
211
+ function TrackingItem({ label, done }) {
212
+ return (
213
+ // `min-w-0` lets `truncate` below actually engage instead of overflowing
214
+ // the card; `lg:flex-initial` + `max-lg:whitespace-normal` let a label
215
+ // like "Deliverables met - 0/4" wrap in the grid instead of being
216
+ // squeezed to an equal share. (clientapp's version — see ProjectDealCard's
217
+ // module doc.)
218
+ /* @__PURE__ */ jsxs3("div", { className: "flex min-w-0 flex-1 gap-2 items-center lg:flex-initial", children: [
219
+ /* @__PURE__ */ jsx4(
220
+ CheckRingRoundIcon,
221
+ {
222
+ width: 12,
223
+ height: 12,
224
+ className: cn4(
225
+ "shrink-0 transition-opacity",
226
+ done ? "text-primary-color-nuk-ui-elem" : "opacity-0"
227
+ )
228
+ }
229
+ ),
230
+ /* @__PURE__ */ jsx4(
231
+ "span",
232
+ {
233
+ className: cn4(
234
+ "label-xs-table truncate max-lg:whitespace-normal",
235
+ done ? "text-primary-color-nuk-text" : "text-text-secondary"
236
+ ),
237
+ children: label
238
+ }
239
+ )
240
+ ] })
241
+ );
242
+ }
243
+
244
+ // src/marketing/manual-deal-card.tsx
245
+ import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
327
246
  function resolveDealDocument(meta) {
328
247
  const url = meta.uploaded_document?.url ?? meta.document_url ?? null;
329
248
  if (!url) return null;
@@ -336,17 +255,18 @@ function ManualDealCard({
336
255
  onDelete,
337
256
  onOpenDocument,
338
257
  resolveImageUrl,
258
+ asideFooter,
339
259
  className
340
260
  }) {
341
261
  const [isExpanded, setIsExpanded] = useState(false);
342
262
  const meta = deal.metadata;
343
263
  const brandName = meta.brand_name;
344
- const startDate = formatDealDate(meta.start_date);
345
- const endDate = formatDealDate(meta.end_date);
264
+ const startDate = formatDealDate2(meta.start_date);
265
+ const endDate = formatDealDate2(meta.end_date);
346
266
  const dateRange = [startDate, endDate].filter((d) => Boolean(d) && d !== "\u2014").join(" - ");
347
267
  const metaLine = [meta.deal_category, dateRange].filter(Boolean).join(" \u2022 ");
348
268
  const doc = resolveDealDocument(meta);
349
- const previewDocButton = doc && onOpenDocument && /* @__PURE__ */ jsxs3(
269
+ const previewDocButton = doc && onOpenDocument && /* @__PURE__ */ jsxs4(
350
270
  Button2,
351
271
  {
352
272
  variant: "unstyled",
@@ -359,7 +279,7 @@ function ManualDealCard({
359
279
  },
360
280
  children: [
361
281
  "Preview Doc",
362
- /* @__PURE__ */ jsx4(XsViewInvoiceIcon, { className: "size-[18px] p-[1px] flex justify-center items-center" })
282
+ /* @__PURE__ */ jsx5(XsViewInvoiceIcon, { className: "size-[18px] p-[1px] flex justify-center items-center" })
363
283
  ]
364
284
  }
365
285
  );
@@ -373,18 +293,18 @@ function ManualDealCard({
373
293
  when: Boolean(onDelete)
374
294
  }
375
295
  ];
376
- return /* @__PURE__ */ jsxs3(
296
+ return /* @__PURE__ */ jsxs4(
377
297
  "div",
378
298
  {
379
- className: cn4(
299
+ className: cn5(
380
300
  "bg-card border-b last:border-b-0 border-grey-strokes-tables w-full font-ss02",
381
301
  className
382
302
  ),
383
303
  children: [
384
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-col sm:hidden", children: [
385
- /* @__PURE__ */ jsxs3("div", { className: "flex items-start p-2 justify-between flex-[1_0_0]", children: [
386
- /* @__PURE__ */ jsxs3("div", { className: "flex gap-1 items-start", children: [
387
- /* @__PURE__ */ jsx4(
304
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-col sm:hidden", children: [
305
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-start p-2 justify-between flex-[1_0_0]", children: [
306
+ /* @__PURE__ */ jsxs4("div", { className: "flex gap-1 items-start", children: [
307
+ /* @__PURE__ */ jsx5(
388
308
  Button2,
389
309
  {
390
310
  variant: "unstyled",
@@ -393,12 +313,12 @@ function ManualDealCard({
393
313
  onClick: () => setIsExpanded((v) => !v),
394
314
  className: "flex p-[6px] items-center justify-center gap-[10px]",
395
315
  "aria-label": isExpanded ? "Collapse deal details" : "Expand deal details",
396
- children: /* @__PURE__ */ jsx4(
316
+ children: /* @__PURE__ */ jsx5(
397
317
  ArrowDownFormIcon,
398
318
  {
399
319
  width: 12.004,
400
320
  height: 5.999,
401
- className: cn4(
321
+ className: cn5(
402
322
  "text-greys-icons transition-transform duration-200",
403
323
  isExpanded && "rotate-180"
404
324
  )
@@ -406,14 +326,14 @@ function ManualDealCard({
406
326
  )
407
327
  }
408
328
  ),
409
- /* @__PURE__ */ jsx4("span", { className: "header-xl-medium-card text-text-primary", children: brandName })
329
+ /* @__PURE__ */ jsx5("span", { className: "header-xl-medium-card text-text-primary", children: brandName })
410
330
  ] }),
411
- /* @__PURE__ */ jsx4("span", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: fmtUSDWhole(meta.total_deal_amount) })
331
+ /* @__PURE__ */ jsx5("span", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: fmtUSDWhole(meta.total_deal_amount) })
412
332
  ] }),
413
- isExpanded && /* @__PURE__ */ jsxs3(Fragment2, { children: [
414
- /* @__PURE__ */ jsx4("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
415
- /* @__PURE__ */ jsxs3("div", { className: "p-2 flex items-start justify-between gap-1 bg-greys-table-hover rounded-[0_0_10px_10px]", children: [
416
- /* @__PURE__ */ jsx4(
333
+ isExpanded && /* @__PURE__ */ jsxs4(Fragment, { children: [
334
+ /* @__PURE__ */ jsx5("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
335
+ /* @__PURE__ */ jsxs4("div", { className: "p-2 flex items-start justify-between gap-1 bg-greys-table-hover rounded-[0_0_10px_10px]", children: [
336
+ /* @__PURE__ */ jsx5(
417
337
  Button2,
418
338
  {
419
339
  variant: "unstyled",
@@ -428,46 +348,80 @@ function ManualDealCard({
428
348
  ] })
429
349
  ] })
430
350
  ] }),
431
- /* @__PURE__ */ jsxs3("div", { className: "group hidden sm:flex gap-3 items-start p-3", children: [
432
- /* @__PURE__ */ jsx4(
433
- EntityAvatar,
434
- {
435
- entityType: "company",
436
- imageUrl: deal.company_avatar_url,
437
- name: deal.company_name ?? brandName,
438
- resolveImageUrl,
439
- size: "sm",
440
- className: "shrink-0 rounded-[34px]"
441
- }
442
- ),
443
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-1 flex-col gap-2 justify-center min-w-0", children: [
444
- /* @__PURE__ */ jsxs3("div", { className: "flex items-start justify-between gap-2 w-full", children: [
445
- /* @__PURE__ */ jsxs3("div", { className: "flex gap-2 items-center min-w-0", children: [
446
- /* @__PURE__ */ jsx4("span", { className: "text-text-primary header-xl-medium-card truncate", children: brandName }),
351
+ /* @__PURE__ */ jsxs4("div", { className: "group hidden sm:flex flex-col gap-3 p-3", children: [
352
+ /* @__PURE__ */ jsxs4("div", { className: "flex gap-3 items-start w-full", children: [
353
+ /* @__PURE__ */ jsx5(
354
+ EntityAvatar,
355
+ {
356
+ entityType: "company",
357
+ imageUrl: deal.company_avatar_url,
358
+ name: deal.company_name ?? brandName,
359
+ resolveImageUrl,
360
+ size: "sm",
361
+ className: "shrink-0 rounded-[34px]"
362
+ }
363
+ ),
364
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-1 flex-col gap-2 justify-center min-w-0", children: [
365
+ /* @__PURE__ */ jsxs4("div", { className: "flex gap-2 items-center min-w-0", children: [
366
+ /* @__PURE__ */ jsx5("span", { className: "text-text-primary header-xl-medium-card truncate", children: brandName }),
447
367
  previewDocButton
448
368
  ] }),
449
- /* @__PURE__ */ jsxs3("div", { className: "flex items-start gap-2 shrink-0", children: [
450
- /* @__PURE__ */ jsx4("span", { className: "team-stats-card text-text-primary whitespace-nowrap", children: fmtUSDWhole(meta.total_deal_amount) }),
451
- /* @__PURE__ */ jsx4(RowActionsDropdown, { actions, ariaLabel: "Deal options" })
369
+ metaLine && /* @__PURE__ */ jsx5("div", { className: "label-xs-text text-text-secondary break-words", children: metaLine }),
370
+ /* @__PURE__ */ jsxs4("div", { className: "flex gap-3 items-center min-w-0", children: [
371
+ /* @__PURE__ */ jsx5("span", { className: "label-xs-text text-text-secondary shrink-0", children: "Lead" }),
372
+ deal.lead_agent_name ? /* @__PURE__ */ jsxs4(Fragment, { children: [
373
+ /* @__PURE__ */ jsx5(
374
+ EntityAvatar,
375
+ {
376
+ entityType: "initials",
377
+ imageUrl: deal.lead_agent_avatar_url,
378
+ name: deal.lead_agent_name,
379
+ resolveImageUrl,
380
+ size: "sm",
381
+ className: "shrink-0"
382
+ }
383
+ ),
384
+ /* @__PURE__ */ jsx5("span", { className: "label-xs-text text-text-secondary truncate", children: deal.lead_agent_name })
385
+ ] }) : /* @__PURE__ */ jsx5("span", { className: "label-xs-text text-text-secondary truncate", children: "--" })
452
386
  ] })
453
387
  ] }),
454
- metaLine && /* @__PURE__ */ jsx4("div", { className: "label-xs-text text-text-secondary break-words", children: metaLine }),
455
- /* @__PURE__ */ jsxs3("div", { className: "flex gap-3 items-center min-w-0", children: [
456
- /* @__PURE__ */ jsx4("span", { className: "label-xs-text text-text-secondary shrink-0", children: "Lead" }),
457
- deal.lead_agent_name ? /* @__PURE__ */ jsxs3(Fragment2, { children: [
458
- /* @__PURE__ */ jsx4(
459
- EntityAvatar,
460
- {
461
- entityType: "initials",
462
- imageUrl: deal.lead_agent_avatar_url,
463
- name: deal.lead_agent_name,
464
- resolveImageUrl,
465
- size: "sm",
466
- className: "shrink-0"
467
- }
468
- ),
469
- /* @__PURE__ */ jsx4("span", { className: "label-xs-text text-text-secondary truncate", children: deal.lead_agent_name })
470
- ] }) : /* @__PURE__ */ jsx4("span", { className: "label-xs-text text-text-secondary truncate", children: "--" })
388
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-1 items-end justify-center shrink-0", children: [
389
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-start gap-2", children: [
390
+ /* @__PURE__ */ jsx5("span", { className: "team-stats-card text-text-primary whitespace-nowrap", children: fmtUSDWhole(meta.total_deal_amount) }),
391
+ /* @__PURE__ */ jsx5(RowActionsDropdown, { actions, ariaLabel: "Deal options" })
392
+ ] }),
393
+ /* @__PURE__ */ jsx5(
394
+ "div",
395
+ {
396
+ className: cn5(
397
+ "h-[27px] px-3 py-1.5 rounded-[50px] flex items-center justify-center whitespace-nowrap",
398
+ STATUS_STYLES.Complete
399
+ ),
400
+ children: /* @__PURE__ */ jsx5("span", { className: "label-xs-medium", children: "Complete" })
401
+ }
402
+ ),
403
+ asideFooter
404
+ ] })
405
+ ] }),
406
+ /* @__PURE__ */ jsxs4("div", { className: "grid w-full grid-cols-2 items-center gap-x-3 gap-y-2 md:grid-cols-3 lg:flex lg:justify-between lg:gap-0", children: [
407
+ /* @__PURE__ */ jsx5(TrackingItem, { label: "Client paid", done: true }),
408
+ /* @__PURE__ */ jsx5(TrackingItem, { label: "Agency paid", done: true }),
409
+ meta.has_third_party && /* @__PURE__ */ jsx5(TrackingItem, { label: "Third Party paid", done: true })
410
+ ] }),
411
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-2 w-full", children: [
412
+ /* @__PURE__ */ jsx5("div", { className: "relative w-full h-2 bg-greys-nav-text rounded-[10px] overflow-hidden", children: /* @__PURE__ */ jsx5("div", { className: "absolute left-0 top-0 h-2 bg-primary-color-nuk-ui-elem rounded-[10px] w-full" }) }),
413
+ /* @__PURE__ */ jsxs4("div", { className: "flex gap-3 items-start text-[13px] font-medium w-full", children: [
414
+ /* @__PURE__ */ jsx5(
415
+ "span",
416
+ {
417
+ className: cn5(
418
+ "min-w-0 flex-1 label-xs-table",
419
+ meta.total_deal_amount > 0 ? "text-primary-color-nuk-text" : "text-text-secondary"
420
+ ),
421
+ children: `${fmtUSD(meta.total_deal_amount)}${meta.total_deal_amount > 0 ? " collected" : ""}`
422
+ }
423
+ ),
424
+ /* @__PURE__ */ jsx5("span", { className: "shrink-0 text-primary-color-nuk-text label-xs-table whitespace-nowrap", children: "Fully Paid" })
471
425
  ] })
472
426
  ] })
473
427
  ] })
@@ -480,7 +434,7 @@ function ManualDealCard({
480
434
  import { useEffect, useState as useState2 } from "react";
481
435
  import {
482
436
  Button as Button3,
483
- cn as cn5,
437
+ cn as cn6,
484
438
  Dialog,
485
439
  DialogContent,
486
440
  DialogHeader,
@@ -489,7 +443,7 @@ import {
489
443
  } from "@nukleus-sports/ui-web";
490
444
  import { DownloadIcon } from "@nukleus-sports/icons";
491
445
  import { fmt, fmtCurrency, fmtDate } from "@nukleus-sports/core";
492
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
446
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
493
447
  var DESKTOP_BREAKPOINT_QUERY = "(min-width: 640px)";
494
448
  function useIsDesktopViewport() {
495
449
  const [isDesktop, setIsDesktop] = useState2(
@@ -505,22 +459,22 @@ function useIsDesktopViewport() {
505
459
  return isDesktop;
506
460
  }
507
461
  function ReadOnlyField({ label, value }) {
508
- return /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
509
- /* @__PURE__ */ jsx5("span", { className: "label-xs-medium text-text-secondary", children: label }),
510
- /* @__PURE__ */ jsx5("div", { className: "flex items-center px-[0px] py-[6px]", children: /* @__PURE__ */ jsx5("span", { className: "body-text text-text-primary whitespace-nowrap", children: value || "--" }) })
462
+ return /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
463
+ /* @__PURE__ */ jsx6("span", { className: "label-xs-medium text-text-secondary", children: label }),
464
+ /* @__PURE__ */ jsx6("div", { className: "flex items-center px-[0px] py-[6px]", children: /* @__PURE__ */ jsx6("span", { className: "body-text text-text-primary whitespace-nowrap", children: value || "--" }) })
511
465
  ] });
512
466
  }
513
467
  function ReadOnlyPartyCard({ title, children, className }) {
514
- return /* @__PURE__ */ jsxs4(
468
+ return /* @__PURE__ */ jsxs5(
515
469
  "div",
516
470
  {
517
- className: cn5(
471
+ className: cn6(
518
472
  "flex flex-col gap-4 rounded-[10px] border border-grey-strokes-tables bg-card px-6 py-4",
519
473
  className
520
474
  ),
521
475
  children: [
522
- /* @__PURE__ */ jsx5("h3", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: title }),
523
- /* @__PURE__ */ jsx5("div", { className: "flex flex-col gap-4", children })
476
+ /* @__PURE__ */ jsx6("h3", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: title }),
477
+ /* @__PURE__ */ jsx6("div", { className: "flex flex-col gap-4", children })
524
478
  ]
525
479
  }
526
480
  );
@@ -539,20 +493,20 @@ function ManualDealPreviewDialog({
539
493
  const meta = deal.metadata;
540
494
  const doc = resolveDealDocument(meta);
541
495
  const cardCls = isDesktop ? "flex-1 min-w-0 h-[479px]" : "w-full h-auto";
542
- const cards = /* @__PURE__ */ jsxs4("div", { className: cn5("flex gap-4 sm:gap-[12px]", !isDesktop && "flex-col"), children: [
543
- /* @__PURE__ */ jsxs4(ReadOnlyPartyCard, { title: "Brand", className: cardCls, children: [
544
- /* @__PURE__ */ jsx5(ReadOnlyField, { label: "Brand Name", value: fmt(meta.brand_name) }),
545
- /* @__PURE__ */ jsx5(ReadOnlyField, { label: "Deal Category", value: fmt(meta.deal_category) }),
546
- /* @__PURE__ */ jsx5(ReadOnlyField, { label: "Total Deal Amount", value: fmtCurrency(meta.total_deal_amount) }),
547
- /* @__PURE__ */ jsx5(ReadOnlyField, { label: "Payment Due Date", value: fmtDate(meta.brand_payment_due_date) }),
548
- /* @__PURE__ */ jsx5(ReadOnlyField, { label: "Deal Start Date", value: fmtDate(meta.start_date) }),
549
- /* @__PURE__ */ jsx5(ReadOnlyField, { label: "Deal End Date", value: fmtDate(meta.end_date) })
496
+ const cards = /* @__PURE__ */ jsxs5("div", { className: cn6("flex gap-4 sm:gap-[12px]", !isDesktop && "flex-col"), children: [
497
+ /* @__PURE__ */ jsxs5(ReadOnlyPartyCard, { title: "Brand", className: cardCls, children: [
498
+ /* @__PURE__ */ jsx6(ReadOnlyField, { label: "Brand Name", value: fmt(meta.brand_name) }),
499
+ /* @__PURE__ */ jsx6(ReadOnlyField, { label: "Deal Category", value: fmt(meta.deal_category) }),
500
+ /* @__PURE__ */ jsx6(ReadOnlyField, { label: "Total Deal Amount", value: fmtCurrency(meta.total_deal_amount) }),
501
+ /* @__PURE__ */ jsx6(ReadOnlyField, { label: "Payment Due Date", value: fmtDate(meta.brand_payment_due_date) }),
502
+ /* @__PURE__ */ jsx6(ReadOnlyField, { label: "Deal Start Date", value: fmtDate(meta.start_date) }),
503
+ /* @__PURE__ */ jsx6(ReadOnlyField, { label: "Deal End Date", value: fmtDate(meta.end_date) })
550
504
  ] }),
551
- /* @__PURE__ */ jsxs4(ReadOnlyPartyCard, { title: "Client", className: cardCls, children: [
552
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
553
- /* @__PURE__ */ jsx5("span", { className: "label-xs-medium text-text-secondary", children: "Client Name" }),
554
- /* @__PURE__ */ jsxs4("div", { className: "flex min-h-[32px] items-center gap-2 py-[6px]", children: [
555
- meta.client_name?.trim() && clientImageUrl && /* @__PURE__ */ jsx5(
505
+ /* @__PURE__ */ jsxs5(ReadOnlyPartyCard, { title: "Client", className: cardCls, children: [
506
+ /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
507
+ /* @__PURE__ */ jsx6("span", { className: "label-xs-medium text-text-secondary", children: "Client Name" }),
508
+ /* @__PURE__ */ jsxs5("div", { className: "flex min-h-[32px] items-center gap-2 py-[6px]", children: [
509
+ meta.client_name?.trim() && clientImageUrl && /* @__PURE__ */ jsx6(
556
510
  EntityAvatar,
557
511
  {
558
512
  entityType: "player",
@@ -563,23 +517,23 @@ function ManualDealPreviewDialog({
563
517
  className: "shrink-0"
564
518
  }
565
519
  ),
566
- /* @__PURE__ */ jsx5("span", { className: "body-text text-text-primary whitespace-nowrap", children: fmt(meta.client_name) })
520
+ /* @__PURE__ */ jsx6("span", { className: "body-text text-text-primary whitespace-nowrap", children: fmt(meta.client_name) })
567
521
  ] })
568
522
  ] }),
569
- /* @__PURE__ */ jsx5(ReadOnlyField, { label: "Client's Invoice Name", value: fmt(meta.client_invoice_name) })
523
+ /* @__PURE__ */ jsx6(ReadOnlyField, { label: "Client's Invoice Name", value: fmt(meta.client_invoice_name) })
570
524
  ] }),
571
- /* @__PURE__ */ jsxs4(ReadOnlyPartyCard, { title: "Agency", className: cardCls, children: [
572
- /* @__PURE__ */ jsx5(ReadOnlyField, { label: "Agency Name", value: fmt(meta.agency_name) }),
573
- /* @__PURE__ */ jsx5(
525
+ /* @__PURE__ */ jsxs5(ReadOnlyPartyCard, { title: "Agency", className: cardCls, children: [
526
+ /* @__PURE__ */ jsx6(ReadOnlyField, { label: "Agency Name", value: fmt(meta.agency_name) }),
527
+ /* @__PURE__ */ jsx6(
574
528
  ReadOnlyField,
575
529
  {
576
530
  label: "Commission %",
577
531
  value: meta.agency_commission ? `${meta.agency_commission}%` : "--"
578
532
  }
579
533
  ),
580
- /* @__PURE__ */ jsx5(ReadOnlyField, { label: "Payment Due Date", value: fmtDate(meta.agency_payment_due_date) }),
581
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
582
- /* @__PURE__ */ jsx5(
534
+ /* @__PURE__ */ jsx6(ReadOnlyField, { label: "Payment Due Date", value: fmtDate(meta.agency_payment_due_date) }),
535
+ /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
536
+ /* @__PURE__ */ jsx6(
583
537
  "span",
584
538
  {
585
539
  className: "text-[13px] font-medium leading-normal text-text-secondary",
@@ -587,8 +541,8 @@ function ManualDealPreviewDialog({
587
541
  children: "Lead Agent"
588
542
  }
589
543
  ),
590
- /* @__PURE__ */ jsxs4("div", { className: "flex min-h-[32px] items-center gap-2 py-[6px]", children: [
591
- /* @__PURE__ */ jsx5(
544
+ /* @__PURE__ */ jsxs5("div", { className: "flex min-h-[32px] items-center gap-2 py-[6px]", children: [
545
+ /* @__PURE__ */ jsx6(
592
546
  EntityAvatar,
593
547
  {
594
548
  entityType: "initials",
@@ -599,7 +553,7 @@ function ManualDealPreviewDialog({
599
553
  className: "shrink-0"
600
554
  }
601
555
  ),
602
- /* @__PURE__ */ jsx5(
556
+ /* @__PURE__ */ jsx6(
603
557
  "span",
604
558
  {
605
559
  className: "overflow-hidden text-ellipsis text-[14px] leading-[15px] text-text-secondary whitespace-nowrap",
@@ -610,23 +564,23 @@ function ManualDealPreviewDialog({
610
564
  ] })
611
565
  ] })
612
566
  ] }),
613
- meta.has_third_party && /* @__PURE__ */ jsxs4(ReadOnlyPartyCard, { title: "Third Party", className: cardCls, children: [
614
- /* @__PURE__ */ jsx5(ReadOnlyField, { label: "Third Party Name", value: fmt(meta.third_party_name) }),
615
- /* @__PURE__ */ jsx5(
567
+ meta.has_third_party && /* @__PURE__ */ jsxs5(ReadOnlyPartyCard, { title: "Third Party", className: cardCls, children: [
568
+ /* @__PURE__ */ jsx6(ReadOnlyField, { label: "Third Party Name", value: fmt(meta.third_party_name) }),
569
+ /* @__PURE__ */ jsx6(
616
570
  ReadOnlyField,
617
571
  {
618
572
  label: "Third Party Invoice Name",
619
573
  value: fmt(meta.third_party_invoice_name)
620
574
  }
621
575
  ),
622
- /* @__PURE__ */ jsx5(
576
+ /* @__PURE__ */ jsx6(
623
577
  ReadOnlyField,
624
578
  {
625
579
  label: "Commission %",
626
580
  value: meta.third_party_commission ? `${meta.third_party_commission}%` : "--"
627
581
  }
628
582
  ),
629
- /* @__PURE__ */ jsx5(
583
+ /* @__PURE__ */ jsx6(
630
584
  ReadOnlyField,
631
585
  {
632
586
  label: "Payment Due Date",
@@ -635,28 +589,30 @@ function ManualDealPreviewDialog({
635
589
  )
636
590
  ] })
637
591
  ] });
638
- const notes = /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-[12px] rounded-[10px] border border-grey-strokes-tables bg-card px-[16px] py-[12px] shrink-0 w-full", children: [
639
- /* @__PURE__ */ jsx5(
592
+ const summary = meta.summary || meta.notes || null;
593
+ const notes = /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-[12px] rounded-[10px] border border-grey-strokes-tables bg-card px-[16px] py-[12px] shrink-0 w-full", children: [
594
+ /* @__PURE__ */ jsx6(
640
595
  "h3",
641
596
  {
642
597
  className: "header-xl-medium-card text-text-primary whitespace-nowrap",
643
598
  style: { fontFeatureSettings: "'ss02', 'ss05'" },
644
- children: "Notes"
599
+ children: "Contract Summary"
645
600
  }
646
601
  ),
647
- /* @__PURE__ */ jsx5("div", { className: "flex h-[70px] min-h-[44px] items-start rounded-[5px] bg-greys-background-hover px-[12px] py-[6px]", children: /* @__PURE__ */ jsx5(
602
+ /* @__PURE__ */ jsx6("div", { className: "flex min-h-[70px] items-start rounded-[5px] bg-greys-background-hover px-[12px] py-[6px]", children: /* @__PURE__ */ jsx6(
648
603
  "p",
649
604
  {
650
- className: cn5(
651
- "flex-1 body-text overflow-hidden text-ellipsis whitespace-nowrap",
652
- meta.notes ? "text-text-primary" : "text-text-secondary"
605
+ className: cn6(
606
+ "flex-1 min-w-0 body-text whitespace-pre-wrap break-words",
607
+ summary ? "text-text-primary" : "text-text-secondary"
653
608
  ),
654
609
  style: { fontFeatureSettings: "'ss02', 'ss05'" },
655
- children: meta.notes || "Enter any additional notes about this marketing deal"
610
+ children: summary || "--"
656
611
  }
657
612
  ) })
658
613
  ] });
659
- const documentButton = doc && /* @__PURE__ */ jsxs4(
614
+ const contractDetailsCard = meta.contract_details ? /* @__PURE__ */ jsx6(ContractDetailsCard, { details: meta.contract_details }) : null;
615
+ const documentButton = doc && /* @__PURE__ */ jsxs5(
660
616
  Button3,
661
617
  {
662
618
  variant: "ghost",
@@ -664,8 +620,8 @@ function ManualDealPreviewDialog({
664
620
  className: "flex h-full p-0 bg-transparent hover:bg-transparent items-center gap-[12px] hover:opacity-80 transition-opacity",
665
621
  onClick: () => onOpenDocument(doc),
666
622
  children: [
667
- /* @__PURE__ */ jsx5(DownloadIcon, { className: "size-5 shrink-0 text-primary-color-nuk-ui-elem" }),
668
- /* @__PURE__ */ jsx5(
623
+ /* @__PURE__ */ jsx6(DownloadIcon, { className: "size-5 shrink-0 text-primary-color-nuk-ui-elem" }),
624
+ /* @__PURE__ */ jsx6(
669
625
  "span",
670
626
  {
671
627
  className: "text-[14px] font-normal leading-[15px] text-primary-color-nuk-text overflow-hidden text-ellipsis whitespace-nowrap max-w-[200px]",
@@ -676,8 +632,8 @@ function ManualDealPreviewDialog({
676
632
  ]
677
633
  }
678
634
  );
679
- const footerButtons = /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-[12px]", children: [
680
- onEdit && /* @__PURE__ */ jsx5(
635
+ const footerButtons = /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-[12px]", children: [
636
+ onEdit && /* @__PURE__ */ jsx6(
681
637
  Button3,
682
638
  {
683
639
  variant: "outline",
@@ -686,7 +642,7 @@ function ManualDealPreviewDialog({
686
642
  children: "Edit Deal"
687
643
  }
688
644
  ),
689
- /* @__PURE__ */ jsx5(
645
+ /* @__PURE__ */ jsx6(
690
646
  Button3,
691
647
  {
692
648
  onClick: () => onOpenChange(false),
@@ -696,19 +652,20 @@ function ManualDealPreviewDialog({
696
652
  )
697
653
  ] });
698
654
  if (isDesktop) {
699
- return /* @__PURE__ */ jsx5(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs4(DialogContent, { className: "flex h-screen sm:h-[800px] flex-col gap-0 overflow-hidden rounded-none sm:rounded-[10px] bg-card p-0 max-w-[1140px] max-[1024px]:max-w-[940px]", children: [
700
- /* @__PURE__ */ jsx5(DialogHeader, { className: "shrink-0 mt-4 pb-0 space-y-0 px-6", children: /* @__PURE__ */ jsx5(DialogTitle, { children: "Preview Details" }) }),
701
- /* @__PURE__ */ jsx5("div", { className: "flex-1 overflow-y-auto px-6 pt-6 pb-4", children: /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-[12px]", children: [
655
+ return /* @__PURE__ */ jsx6(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs5(DialogContent, { className: "flex h-screen sm:h-[800px] flex-col gap-0 overflow-hidden rounded-none sm:rounded-[10px] bg-card p-0 max-w-[1140px] max-[1024px]:max-w-[940px]", children: [
656
+ /* @__PURE__ */ jsx6(DialogHeader, { className: "shrink-0 mt-4 pb-0 space-y-0 px-6", children: /* @__PURE__ */ jsx6(DialogTitle, { children: "Preview Details" }) }),
657
+ /* @__PURE__ */ jsx6("div", { className: "flex-1 overflow-y-auto px-6 pt-6 pb-4", children: /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-[12px]", children: [
702
658
  cards,
703
- notes
659
+ notes,
660
+ contractDetailsCard
704
661
  ] }) }),
705
- /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between bg-card pb-6 pt-3 px-9 shadow-[0px_0px_4px_0px_rgba(0,0,0,0.25)] shrink-0 rounded-bl-[10px] rounded-br-[10px]", children: [
706
- /* @__PURE__ */ jsx5("div", { className: "flex h-[32px] items-center bg-card px-2", children: documentButton ?? /* @__PURE__ */ jsx5("div", {}) }),
662
+ /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-between bg-card pb-6 pt-3 px-9 shadow-[0px_0px_4px_0px_rgba(0,0,0,0.25)] shrink-0 rounded-bl-[10px] rounded-br-[10px]", children: [
663
+ /* @__PURE__ */ jsx6("div", { className: "flex h-[32px] items-center bg-card px-2", children: documentButton ?? /* @__PURE__ */ jsx6("div", {}) }),
707
664
  footerButtons
708
665
  ] })
709
666
  ] }) });
710
667
  }
711
- return /* @__PURE__ */ jsx5(
668
+ return /* @__PURE__ */ jsx6(
712
669
  MobileModalLayout,
713
670
  {
714
671
  onCancel: () => onOpenChange(false),
@@ -718,10 +675,11 @@ function ManualDealPreviewDialog({
718
675
  cancelButtonName: "Cancel",
719
676
  actionBottomContext: false,
720
677
  childClassName: "max-h-[calc(100dvh-50px)]",
721
- children: /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-4 px-4 pb-4", children: [
722
- doc && /* @__PURE__ */ jsx5("div", { className: "flex h-[32px] justify-end items-center bg-card py-0 px-2", children: documentButton }),
678
+ children: /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-4 px-4 pb-4", children: [
679
+ doc && /* @__PURE__ */ jsx6("div", { className: "flex h-[32px] justify-end items-center bg-card py-0 px-2", children: documentButton }),
723
680
  cards,
724
- notes
681
+ notes,
682
+ contractDetailsCard
725
683
  ] })
726
684
  }
727
685
  );
@@ -729,54 +687,23 @@ function ManualDealPreviewDialog({
729
687
 
730
688
  // src/marketing/project-deal-card.tsx
731
689
  import { useState as useState3 } from "react";
732
- import { Button as Button4, cn as cn6 } from "@nukleus-sports/ui-web";
733
- import { ArrowDownFormIcon as ArrowDownFormIcon2, CheckRingRoundIcon, XsViewInvoiceIcon as XsViewInvoiceIcon2 } from "@nukleus-sports/icons";
734
- import { getDealStatus, formatDealDate as formatDealDate2, fmtUSD } from "@nukleus-sports/core";
735
- import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
736
- function TrackingItem({ label, done }) {
737
- return (
738
- // `min-w-0` lets `truncate` below actually engage instead of overflowing
739
- // the card; `lg:flex-initial` + `max-lg:whitespace-normal` let a label
740
- // like "Deliverables met - 0/4" wrap in the grid instead of being
741
- // squeezed to an equal share. (clientapp's version — see module doc.)
742
- /* @__PURE__ */ jsxs5("div", { className: "flex min-w-0 flex-1 gap-2 items-center lg:flex-initial", children: [
743
- /* @__PURE__ */ jsx6(
744
- CheckRingRoundIcon,
745
- {
746
- width: 12,
747
- height: 12,
748
- className: cn6(
749
- "shrink-0 transition-opacity",
750
- done ? "text-primary-color-nuk-ui-elem" : "opacity-0"
751
- )
752
- }
753
- ),
754
- /* @__PURE__ */ jsx6(
755
- "span",
756
- {
757
- className: cn6(
758
- "label-xs-table truncate max-lg:whitespace-normal",
759
- done ? "text-primary-color-nuk-text" : "text-text-secondary"
760
- ),
761
- children: label
762
- }
763
- )
764
- ] })
765
- );
766
- }
767
- var STATUS_STYLES = {
768
- Active: "bg-semantic-color-status-priority-cold-fill text-semantic-color-status-priority-cold-copy",
769
- Upcoming: "bg-semantic-color-status-priority-in-progress-warm-fill text-semantic-color-status-priority-in-progress-warm-copy",
770
- Complete: "bg-semantic-color-status-priority-completed-fill text-semantic-color-status-priority-completed-copy"
771
- };
690
+ import { Button as Button4, cn as cn7 } from "@nukleus-sports/ui-web";
691
+ import { ArrowDownFormIcon as ArrowDownFormIcon2, XsViewInvoiceIcon as XsViewInvoiceIcon2 } from "@nukleus-sports/icons";
692
+ import {
693
+ abbreviatePersonName,
694
+ getDealStatus,
695
+ formatDealDate as formatDealDate3,
696
+ fmtUSD as fmtUSD2
697
+ } from "@nukleus-sports/core";
698
+ import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
772
699
  function statusLabel(status) {
773
700
  return status === "Complete" ? "Completed" : status;
774
701
  }
775
702
  function CollabAffordance({ href, onClick, className, children }) {
776
703
  if (onClick) {
777
- return /* @__PURE__ */ jsx6(Button4, { variant: "unstyled", size: "none", type: "button", onClick, className, children });
704
+ return /* @__PURE__ */ jsx7(Button4, { variant: "unstyled", size: "none", type: "button", onClick, className, children });
778
705
  }
779
- return /* @__PURE__ */ jsx6("a", { href, className, children });
706
+ return /* @__PURE__ */ jsx7("a", { href, className, children });
780
707
  }
781
708
  function ProjectDealCard({
782
709
  deal,
@@ -785,6 +712,7 @@ function ProjectDealCard({
785
712
  collabHref,
786
713
  onCollabClick,
787
714
  resolveImageUrl,
715
+ asideFooter,
788
716
  className
789
717
  }) {
790
718
  const [isExpanded, setIsExpanded] = useState3(false);
@@ -792,17 +720,17 @@ function ProjectDealCard({
792
720
  const status = getDealStatus(deal, isCompleted);
793
721
  const brandName = deal.brand_name ?? deal.company_name ?? deal.project_title;
794
722
  const category = deal.deal_terms?.category;
795
- const startDate = formatDealDate2(deal.deal_terms?.startDate);
796
- const endDate = formatDealDate2(deal.deal_terms?.endDate);
723
+ const startDate = formatDealDate3(deal.deal_terms?.startDate);
724
+ const endDate = formatDealDate3(deal.deal_terms?.endDate);
797
725
  const progressPct = deal.total_contracted > 0 ? Math.min(100, deal.total_collected / deal.total_contracted * 100) : 0;
798
726
  const outstanding = Math.max(0, deal.total_contracted - deal.total_collected);
799
727
  const isFullyPaid = deal.total_contracted > 0 && outstanding === 0;
800
728
  const hasPaymentsCount = deal.payments_total !== void 0 && deal.payments_paid !== void 0;
801
- return /* @__PURE__ */ jsxs5("div", { className: cn6("w-full", className), children: [
802
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-col sm:hidden overflow-hidden bg-card border border-greys-grey-strokes-tables rounded-[10px]", children: [
803
- /* @__PURE__ */ jsxs5("div", { className: "flex items-start justify-between gap-1 p-2", children: [
804
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-1 min-w-0 gap-1 items-start", children: [
805
- /* @__PURE__ */ jsx6(
729
+ return /* @__PURE__ */ jsxs6("div", { className: cn7("w-full", className), children: [
730
+ /* @__PURE__ */ jsxs6("div", { className: "flex flex-col sm:hidden overflow-hidden bg-card border border-greys-grey-strokes-tables rounded-[10px]", children: [
731
+ /* @__PURE__ */ jsxs6("div", { className: "flex items-start justify-between gap-1 p-2", children: [
732
+ /* @__PURE__ */ jsxs6("div", { className: "flex flex-1 min-w-0 gap-1 items-start", children: [
733
+ /* @__PURE__ */ jsx7(
806
734
  Button4,
807
735
  {
808
736
  variant: "unstyled",
@@ -811,12 +739,12 @@ function ProjectDealCard({
811
739
  onClick: () => setIsExpanded((v) => !v),
812
740
  className: "flex size-8 shrink-0 items-center justify-center p-1.5 rounded-[5px]",
813
741
  "aria-label": isExpanded ? "Collapse deal details" : "Expand deal details",
814
- children: /* @__PURE__ */ jsx6(
742
+ children: /* @__PURE__ */ jsx7(
815
743
  ArrowDownFormIcon2,
816
744
  {
817
745
  width: 12.004,
818
746
  height: 5.999,
819
- className: cn6(
747
+ className: cn7(
820
748
  "text-greys-icons transition-transform duration-200",
821
749
  isExpanded && "rotate-180"
822
750
  )
@@ -824,48 +752,49 @@ function ProjectDealCard({
824
752
  )
825
753
  }
826
754
  ),
827
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-1 min-w-0 flex-col gap-2 justify-center items-start", children: [
828
- /* @__PURE__ */ jsx6("span", { className: "header-xl-medium-card text-text-primary", children: brandName }),
829
- /* @__PURE__ */ jsxs5("span", { className: "label-xs-text text-text-secondary", children: [
755
+ /* @__PURE__ */ jsxs6("div", { className: "flex flex-1 min-w-0 flex-col gap-2 justify-center items-start", children: [
756
+ /* @__PURE__ */ jsx7("span", { className: "header-xl-medium-card text-text-primary", children: brandName }),
757
+ /* @__PURE__ */ jsxs6("span", { className: "label-xs-text text-text-secondary", children: [
830
758
  startDate,
831
759
  " - ",
832
760
  endDate
833
761
  ] })
834
762
  ] })
835
763
  ] }),
836
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-col shrink-0 justify-center items-end gap-1", children: [
837
- /* @__PURE__ */ jsx6("span", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: fmtUSD(deal.total_contracted) }),
838
- deal.total_equity_shares > 0 && /* @__PURE__ */ jsxs5("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
764
+ /* @__PURE__ */ jsxs6("div", { className: "flex flex-col shrink-0 justify-center items-end gap-1", children: [
765
+ /* @__PURE__ */ jsx7("span", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: fmtUSD2(deal.total_contracted) }),
766
+ deal.total_equity_shares > 0 && /* @__PURE__ */ jsxs6("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
839
767
  "+ ",
840
768
  deal.total_equity_shares.toLocaleString(),
841
769
  " shares"
842
770
  ] }),
843
- /* @__PURE__ */ jsx6(
771
+ /* @__PURE__ */ jsx7(
844
772
  "div",
845
773
  {
846
- className: cn6(
774
+ className: cn7(
847
775
  "h-[27px] px-3 py-1.5 rounded-[50px] flex items-center justify-center label-xs-medium whitespace-nowrap",
848
776
  STATUS_STYLES[status]
849
777
  ),
850
778
  children: statusLabel(status)
851
779
  }
852
- )
780
+ ),
781
+ asideFooter
853
782
  ] })
854
783
  ] }),
855
- isExpanded && /* @__PURE__ */ jsxs5(Fragment3, { children: [
856
- /* @__PURE__ */ jsx6("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
857
- /* @__PURE__ */ jsxs5("div", { className: "flex items-start gap-1 p-2 bg-greys-table-hover", children: [
858
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
859
- /* @__PURE__ */ jsx6("span", { className: "label-xs-text text-text-secondary", children: "Collected" }),
860
- /* @__PURE__ */ jsx6("span", { className: "body-text-semibold text-primary-color-nuk-text truncate", children: fmtUSD(deal.total_collected) })
784
+ isExpanded && /* @__PURE__ */ jsxs6(Fragment2, { children: [
785
+ /* @__PURE__ */ jsx7("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
786
+ /* @__PURE__ */ jsxs6("div", { className: "flex items-start gap-1 p-2 bg-greys-table-hover", children: [
787
+ /* @__PURE__ */ jsxs6("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
788
+ /* @__PURE__ */ jsx7("span", { className: "label-xs-text text-text-secondary", children: "Collected" }),
789
+ /* @__PURE__ */ jsx7("span", { className: "body-text-semibold text-primary-color-nuk-text truncate", children: fmtUSD2(deal.total_collected) })
861
790
  ] }),
862
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
863
- /* @__PURE__ */ jsx6("span", { className: "label-xs-text text-text-secondary", children: "Outstanding" }),
864
- /* @__PURE__ */ jsx6("span", { className: "body-text-semibold text-semantic-color-status-priority-priority-2 truncate", children: fmtUSD(outstanding) })
791
+ /* @__PURE__ */ jsxs6("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
792
+ /* @__PURE__ */ jsx7("span", { className: "label-xs-text text-text-secondary", children: "Outstanding" }),
793
+ /* @__PURE__ */ jsx7("span", { className: "body-text-semibold text-semantic-color-status-priority-priority-2 truncate", children: fmtUSD2(outstanding) })
865
794
  ] }),
866
- hasPaymentsCount && /* @__PURE__ */ jsxs5("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
867
- /* @__PURE__ */ jsx6("span", { className: "label-xs-text text-text-secondary", children: "Payments" }),
868
- /* @__PURE__ */ jsxs5("span", { className: "body-text-semibold text-text-primary truncate", children: [
795
+ hasPaymentsCount && /* @__PURE__ */ jsxs6("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
796
+ /* @__PURE__ */ jsx7("span", { className: "label-xs-text text-text-secondary", children: "Payments" }),
797
+ /* @__PURE__ */ jsxs6("span", { className: "body-text-semibold text-text-primary truncate", children: [
869
798
  deal.payments_paid,
870
799
  " of ",
871
800
  deal.payments_total,
@@ -873,20 +802,20 @@ function ProjectDealCard({
873
802
  ] })
874
803
  ] })
875
804
  ] }),
876
- /* @__PURE__ */ jsx6("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
877
- /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2 min-w-0 p-2 bg-greys-table-hover", children: [
878
- /* @__PURE__ */ jsx6("span", { className: "w-[58px] shrink-0 text-[11px] leading-none text-text-secondary font-normal", children: "Payment" }),
879
- /* @__PURE__ */ jsx6("div", { className: "relative flex-1 min-w-0 h-1 bg-greys-nav-text rounded-full overflow-hidden", children: /* @__PURE__ */ jsx6(
805
+ /* @__PURE__ */ jsx7("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
806
+ /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-2 min-w-0 p-2 bg-greys-table-hover", children: [
807
+ /* @__PURE__ */ jsx7("span", { className: "w-[58px] shrink-0 text-[11px] leading-none text-text-secondary font-normal", children: "Payment" }),
808
+ /* @__PURE__ */ jsx7("div", { className: "relative flex-1 min-w-0 h-1 bg-greys-nav-text rounded-full overflow-hidden", children: /* @__PURE__ */ jsx7(
880
809
  "div",
881
810
  {
882
811
  className: "absolute inset-y-0 left-0 bg-primary-color-nuk-ui-elem rounded-full",
883
812
  style: { width: `${progressPct}%` }
884
813
  }
885
814
  ) }),
886
- /* @__PURE__ */ jsxs5(
815
+ /* @__PURE__ */ jsxs6(
887
816
  "span",
888
817
  {
889
- className: cn6(
818
+ className: cn7(
890
819
  "w-9 shrink-0 text-right text-[11px] leading-none font-normal",
891
820
  isFullyPaid ? "text-primary-color-nuk-text" : "text-text-secondary"
892
821
  ),
@@ -897,8 +826,8 @@ function ProjectDealCard({
897
826
  }
898
827
  )
899
828
  ] }),
900
- showCollab && /* @__PURE__ */ jsx6("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
901
- showCollab && /* @__PURE__ */ jsx6("div", { className: "flex gap-1 p-2 bg-greys-table-hover rounded-[0_0_10px_10px] justify-end", children: /* @__PURE__ */ jsxs5(
829
+ showCollab && /* @__PURE__ */ jsx7("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
830
+ showCollab && /* @__PURE__ */ jsx7("div", { className: "flex gap-1 p-2 bg-greys-table-hover rounded-[0_0_10px_10px] justify-end", children: /* @__PURE__ */ jsxs6(
902
831
  CollabAffordance,
903
832
  {
904
833
  href: collabHref,
@@ -906,15 +835,15 @@ function ProjectDealCard({
906
835
  className: "flex gap-2 items-center text-primary-color-nuk-text text-[11px] font-normal shrink-0",
907
836
  children: [
908
837
  "Collab",
909
- /* @__PURE__ */ jsx6(XsViewInvoiceIcon2, { className: "size-[18px] p-[1px] flex justify-center items-center" })
838
+ /* @__PURE__ */ jsx7(XsViewInvoiceIcon2, { className: "size-[18px] p-[1px] flex justify-center items-center" })
910
839
  ]
911
840
  }
912
841
  ) })
913
842
  ] })
914
843
  ] }),
915
- /* @__PURE__ */ jsxs5("div", { className: "hidden sm:flex flex-col gap-3 p-3 bg-card border-b border-greys-grey-strokes-tables font-ss02", children: [
916
- /* @__PURE__ */ jsxs5("div", { className: "flex gap-3 items-start w-full", children: [
917
- /* @__PURE__ */ jsx6(
844
+ /* @__PURE__ */ jsxs6("div", { className: "hidden sm:flex flex-col gap-3 p-3 bg-card border-b border-greys-grey-strokes-tables font-ss02", children: [
845
+ /* @__PURE__ */ jsxs6("div", { className: "flex gap-3 items-start w-full", children: [
846
+ /* @__PURE__ */ jsx7(
918
847
  EntityAvatar,
919
848
  {
920
849
  entityType: "company",
@@ -925,10 +854,10 @@ function ProjectDealCard({
925
854
  className: "shrink-0 rounded-[34px]"
926
855
  }
927
856
  ),
928
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-1 min-w-0 flex-col gap-2 justify-center", children: [
929
- /* @__PURE__ */ jsxs5("div", { className: "flex gap-2 items-center", children: [
930
- /* @__PURE__ */ jsx6("span", { className: "header-xl-medium-card text-text-primary", children: brandName }),
931
- showCollab && /* @__PURE__ */ jsxs5(
857
+ /* @__PURE__ */ jsxs6("div", { className: "flex flex-1 min-w-0 flex-col gap-2 justify-center", children: [
858
+ /* @__PURE__ */ jsxs6("div", { className: "flex gap-2 items-center", children: [
859
+ /* @__PURE__ */ jsx7("span", { className: "header-xl-medium-card text-text-primary", children: brandName }),
860
+ showCollab && /* @__PURE__ */ jsxs6(
932
861
  CollabAffordance,
933
862
  {
934
863
  href: collabHref,
@@ -936,15 +865,15 @@ function ProjectDealCard({
936
865
  className: "flex gap-1.5 items-center text-primary-color-nuk-text label-xs-text shrink-0",
937
866
  children: [
938
867
  "Collab Hub",
939
- /* @__PURE__ */ jsx6(XsViewInvoiceIcon2, { className: "size-[18px] p-[1px] flex justify-center items-center" })
868
+ /* @__PURE__ */ jsx7(XsViewInvoiceIcon2, { className: "size-[18px] p-[1px] flex justify-center items-center" })
940
869
  ]
941
870
  }
942
871
  )
943
872
  ] }),
944
- /* @__PURE__ */ jsx6("div", { className: "label-xs-text text-text-secondary break-words sm:whitespace-nowrap", children: [category, `${startDate} - ${endDate}`].filter(Boolean).join(" \u2022 ") }),
945
- /* @__PURE__ */ jsxs5("div", { className: "flex gap-3 items-center min-w-0", children: [
946
- /* @__PURE__ */ jsx6("span", { className: "label-xs-text text-text-secondary shrink-0", children: "Owner" }),
947
- /* @__PURE__ */ jsx6(
873
+ /* @__PURE__ */ jsx7("div", { className: "label-xs-text text-text-secondary break-words sm:whitespace-nowrap", children: [category, `${startDate} - ${endDate}`].filter(Boolean).join(" \u2022 ") }),
874
+ /* @__PURE__ */ jsxs6("div", { className: "flex gap-3 items-center min-w-0", children: [
875
+ /* @__PURE__ */ jsx7("span", { className: "label-xs-text text-text-secondary shrink-0", children: "Owner" }),
876
+ /* @__PURE__ */ jsx7(
948
877
  EntityAvatar,
949
878
  {
950
879
  entityType: "initials",
@@ -955,60 +884,61 @@ function ProjectDealCard({
955
884
  className: "shrink-0"
956
885
  }
957
886
  ),
958
- /* @__PURE__ */ jsx6("span", { className: "label-xs-text text-text-secondary truncate", children: deal.owner_name ?? "\u2014" })
887
+ /* @__PURE__ */ jsx7("span", { className: "label-xs-text text-text-secondary truncate", children: abbreviatePersonName(deal.owner_name) ?? "\u2014" })
959
888
  ] })
960
889
  ] }),
961
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-1 items-end justify-center shrink-0", children: [
962
- /* @__PURE__ */ jsx6("span", { className: "team-stats-card text-text-primary whitespace-nowrap", children: fmtUSD(deal.total_contracted) }),
963
- deal.total_equity_shares > 0 && /* @__PURE__ */ jsxs5("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
890
+ /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-1 items-end justify-center shrink-0", children: [
891
+ /* @__PURE__ */ jsx7("span", { className: "team-stats-card text-text-primary whitespace-nowrap", children: fmtUSD2(deal.total_contracted) }),
892
+ deal.total_equity_shares > 0 && /* @__PURE__ */ jsxs6("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
964
893
  "+ ",
965
894
  deal.total_equity_shares.toLocaleString(),
966
895
  " shares"
967
896
  ] }),
968
- /* @__PURE__ */ jsx6(
897
+ /* @__PURE__ */ jsx7(
969
898
  "div",
970
899
  {
971
- className: cn6(
900
+ className: cn7(
972
901
  "h-[27px] px-3 py-1.5 rounded-[50px] flex items-center justify-center whitespace-nowrap",
973
902
  STATUS_STYLES[status]
974
903
  ),
975
- children: /* @__PURE__ */ jsx6("span", { className: "label-xs-medium", children: statusLabel(status) })
904
+ children: /* @__PURE__ */ jsx7("span", { className: "label-xs-medium", children: statusLabel(status) })
976
905
  }
977
- )
906
+ ),
907
+ asideFooter
978
908
  ] })
979
909
  ] }),
980
- /* @__PURE__ */ jsxs5("div", { className: "grid w-full grid-cols-2 items-center gap-x-3 gap-y-2 md:grid-cols-3 lg:flex lg:justify-between lg:gap-0", children: [
981
- /* @__PURE__ */ jsx6(
910
+ /* @__PURE__ */ jsxs6("div", { className: "grid w-full grid-cols-2 items-center gap-x-3 gap-y-2 md:grid-cols-3 lg:flex lg:justify-between lg:gap-0", children: [
911
+ /* @__PURE__ */ jsx7(
982
912
  TrackingItem,
983
913
  {
984
914
  label: `Deliverables met - ${deal.deliverables_met}/${deal.deliverables_total}`,
985
915
  done: deal.deliverables_total > 0 && deal.deliverables_met >= deal.deliverables_total
986
916
  }
987
917
  ),
988
- /* @__PURE__ */ jsx6(TrackingItem, { label: "Client paid", done: deal.client_paid && isFullyPaid }),
989
- /* @__PURE__ */ jsx6(TrackingItem, { label: "Agency paid", done: deal.agency_paid && isFullyPaid }),
990
- deal.has_third_party && /* @__PURE__ */ jsx6(TrackingItem, { label: "Third Party paid", done: deal.third_party_paid && isFullyPaid })
918
+ /* @__PURE__ */ jsx7(TrackingItem, { label: "Client paid", done: deal.client_paid && isFullyPaid }),
919
+ /* @__PURE__ */ jsx7(TrackingItem, { label: "Agency paid", done: deal.agency_paid && isFullyPaid }),
920
+ deal.has_third_party && /* @__PURE__ */ jsx7(TrackingItem, { label: "Third Party paid", done: deal.third_party_paid && isFullyPaid })
991
921
  ] }),
992
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-2 w-full", children: [
993
- /* @__PURE__ */ jsx6("div", { className: "relative w-full h-2 bg-greys-nav-text rounded-[10px] overflow-hidden", children: /* @__PURE__ */ jsx6(
922
+ /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-2 w-full", children: [
923
+ /* @__PURE__ */ jsx7("div", { className: "relative w-full h-2 bg-greys-nav-text rounded-[10px] overflow-hidden", children: /* @__PURE__ */ jsx7(
994
924
  "div",
995
925
  {
996
926
  className: "absolute left-0 top-0 h-2 bg-primary-color-nuk-ui-elem rounded-[10px]",
997
927
  style: { width: `${progressPct}%` }
998
928
  }
999
929
  ) }),
1000
- /* @__PURE__ */ jsxs5("div", { className: "flex gap-3 items-start text-[13px] font-medium w-full", children: [
1001
- /* @__PURE__ */ jsx6(
930
+ /* @__PURE__ */ jsxs6("div", { className: "flex gap-3 items-start text-[13px] font-medium w-full", children: [
931
+ /* @__PURE__ */ jsx7(
1002
932
  "span",
1003
933
  {
1004
- className: cn6(
934
+ className: cn7(
1005
935
  "min-w-0 flex-1 label-xs-table",
1006
936
  deal.total_collected > 0 ? "text-primary-color-nuk-text" : "text-text-secondary"
1007
937
  ),
1008
- children: `${fmtUSD(deal.total_collected)}${deal.total_collected > 0 ? " collected" : ""}`
938
+ children: `${fmtUSD2(deal.total_collected)}${deal.total_collected > 0 ? " collected" : ""}`
1009
939
  }
1010
940
  ),
1011
- hasPaymentsCount && /* @__PURE__ */ jsxs5("span", { className: "flex-1 label-xs-table text-text-secondary", children: [
941
+ hasPaymentsCount && /* @__PURE__ */ jsxs6("span", { className: "flex-1 label-xs-table text-text-secondary", children: [
1012
942
  deal.payments_paid,
1013
943
  " of ",
1014
944
  deal.payments_total,
@@ -1016,8 +946,8 @@ function ProjectDealCard({
1016
946
  " ",
1017
947
  status === "Active" ? "collected" : "paid"
1018
948
  ] }),
1019
- isFullyPaid ? /* @__PURE__ */ jsx6("span", { className: "shrink-0 text-primary-color-nuk-text label-xs-table whitespace-nowrap", children: "Fully Paid" }) : /* @__PURE__ */ jsxs5("span", { className: "shrink-0 text-semantic-color-status-priority-priority-2 label-xs-table whitespace-nowrap", children: [
1020
- fmtUSD(outstanding),
949
+ isFullyPaid ? /* @__PURE__ */ jsx7("span", { className: "shrink-0 text-primary-color-nuk-text label-xs-table whitespace-nowrap", children: "Fully Paid" }) : /* @__PURE__ */ jsxs6("span", { className: "shrink-0 text-semantic-color-status-priority-priority-2 label-xs-table whitespace-nowrap", children: [
950
+ fmtUSD2(outstanding),
1021
951
  " outstanding"
1022
952
  ] })
1023
953
  ] })
@@ -1026,9 +956,8 @@ function ProjectDealCard({
1026
956
  ] });
1027
957
  }
1028
958
  export {
959
+ ContractDetailsCard,
1029
960
  DealEmptyState,
1030
- ENTITY_AVATAR_SIZE_PX,
1031
- EntityAvatar,
1032
961
  ManualDealCard,
1033
962
  ManualDealPreviewDialog,
1034
963
  ProjectDealCard,