@nukleus-sports/ui-patterns 0.1.1 → 0.2.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.
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/marketing/index.ts
21
21
  var marketing_exports = {};
22
22
  __export(marketing_exports, {
23
+ ContractDetailsCard: () => ContractDetailsCard,
23
24
  DealEmptyState: () => DealEmptyState,
24
25
  ENTITY_AVATAR_SIZE_PX: () => ENTITY_AVATAR_SIZE_PX,
25
26
  EntityAvatar: () => EntityAvatar,
@@ -340,12 +341,154 @@ function DealEmptyState({ message, className, messageClassName }) {
340
341
  ) });
341
342
  }
342
343
 
343
- // src/marketing/manual-deal-card.tsx
344
- var import_react = require("react");
344
+ // src/marketing/contract-details-card.tsx
345
345
  var import_ui_web4 = require("@nukleus-sports/ui-web");
346
- var import_icons2 = require("@nukleus-sports/icons");
347
346
  var import_core = require("@nukleus-sports/core");
348
347
  var import_jsx_runtime4 = require("react/jsx-runtime");
348
+ function Row({ label, children }) {
349
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex min-w-0 flex-col gap-2", children: [
350
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "label-base-medium text-text-secondary font-ss02-ss05", children: label }),
351
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "body-text text-text-primary whitespace-pre-wrap break-words font-ss02-ss05", children })
352
+ ] });
353
+ }
354
+ function usageAfterTerm({
355
+ usage_after_term_days: days
356
+ }) {
357
+ if (days == null) return null;
358
+ return days === 1 ? "1 day after the term" : `${days} days after the term`;
359
+ }
360
+ function ContractDetailsCard({
361
+ details,
362
+ title = "Contract Details",
363
+ caption,
364
+ className
365
+ }) {
366
+ const usage = usageAfterTerm(details);
367
+ const exclusive = details.is_exclusive == null ? null : details.is_exclusive ? "Exclusive" : "Not exclusive";
368
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
369
+ "div",
370
+ {
371
+ className: (0, import_ui_web4.cn)(
372
+ "flex w-full flex-col gap-4 rounded-[10px] border border-grey-strokes-tables bg-card px-4 py-3",
373
+ className
374
+ ),
375
+ children: [
376
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col gap-1", children: [
377
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { className: "header-xl-medium-card text-text-primary font-ss02-ss05", children: title }),
378
+ caption && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "label-xs-text text-text-secondary", children: caption })
379
+ ] }),
380
+ details.warnings.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col gap-2 rounded-[10px] bg-semantic-color-status-priority-in-progress-warm-fill px-3 py-2", children: [
381
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "label-base-medium text-semantic-color-status-priority-in-progress-warm-copy", children: [
382
+ "Worth checking (",
383
+ details.warnings.length,
384
+ ")"
385
+ ] }),
386
+ details.warnings.map((warning, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
387
+ "p",
388
+ {
389
+ className: "body-text text-semantic-color-status-priority-in-progress-warm-copy break-words",
390
+ children: [
391
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "font-medium", children: warning.issue }),
392
+ warning.detail && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { children: [
393
+ ": ",
394
+ warning.detail
395
+ ] })
396
+ ]
397
+ },
398
+ `${warning.issue}-${index}`
399
+ ))
400
+ ] }),
401
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
402
+ details.territory && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Row, { label: "Territory", children: details.territory }),
403
+ details.contracting_entity && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Row, { label: "Contracting Entity", children: details.contracting_entity }),
404
+ exclusive && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Row, { label: "Exclusivity", children: exclusive }),
405
+ usage && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Row, { label: "Usage After Term", children: usage })
406
+ ] }),
407
+ details.exclusivity && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Row, { label: "Exclusivity Terms", children: details.exclusivity }),
408
+ details.payment_terms && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Row, { label: "Payment Terms", children: details.payment_terms }),
409
+ details.usage_after_term && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Row, { label: "Usage Rights", children: details.usage_after_term }),
410
+ details.deliverables.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col gap-2", children: [
411
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "label-base-medium text-text-secondary font-ss02-ss05", children: [
412
+ "Deliverables (",
413
+ details.deliverables.length,
414
+ ")"
415
+ ] }),
416
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("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__ */ (0, import_jsx_runtime4.jsxs)(
417
+ "li",
418
+ {
419
+ className: "flex flex-col gap-1 px-3 py-2 sm:flex-row sm:items-start sm:justify-between sm:gap-4",
420
+ children: [
421
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "min-w-0 body-text text-text-primary break-words", children: [
422
+ deliverable.units != null && deliverable.units > 1 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "font-medium", children: [
423
+ deliverable.units,
424
+ " \xD7 "
425
+ ] }),
426
+ deliverable.description
427
+ ] }),
428
+ deliverable.due_date && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
429
+ "Due ",
430
+ (0, import_core.formatDealDate)(deliverable.due_date)
431
+ ] })
432
+ ]
433
+ },
434
+ `${deliverable.description}-${index}`
435
+ )) })
436
+ ] })
437
+ ]
438
+ }
439
+ );
440
+ }
441
+
442
+ // src/marketing/manual-deal-card.tsx
443
+ var import_react = require("react");
444
+ var import_ui_web6 = require("@nukleus-sports/ui-web");
445
+ var import_icons3 = require("@nukleus-sports/icons");
446
+ var import_core2 = require("@nukleus-sports/core");
447
+
448
+ // src/marketing/deal-card-parts.tsx
449
+ var import_ui_web5 = require("@nukleus-sports/ui-web");
450
+ var import_icons2 = require("@nukleus-sports/icons");
451
+ var import_jsx_runtime5 = (
452
+ // `min-w-0` lets `truncate` below actually engage instead of overflowing
453
+ // the card; `lg:flex-initial` + `max-lg:whitespace-normal` let a label
454
+ // like "Deliverables met - 0/4" wrap in the grid instead of being
455
+ // squeezed to an equal share. (clientapp's version — see ProjectDealCard's
456
+ // module doc.)
457
+ require("react/jsx-runtime")
458
+ );
459
+ var STATUS_STYLES = {
460
+ Active: "bg-semantic-color-status-priority-cold-fill text-semantic-color-status-priority-cold-copy",
461
+ Upcoming: "bg-semantic-color-status-priority-in-progress-warm-fill text-semantic-color-status-priority-in-progress-warm-copy",
462
+ Complete: "bg-semantic-color-status-priority-completed-fill text-semantic-color-status-priority-completed-copy"
463
+ };
464
+ function TrackingItem({ label, done }) {
465
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex min-w-0 flex-1 gap-2 items-center lg:flex-initial", children: [
466
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
467
+ import_icons2.CheckRingRoundIcon,
468
+ {
469
+ width: 12,
470
+ height: 12,
471
+ className: (0, import_ui_web5.cn)(
472
+ "shrink-0 transition-opacity",
473
+ done ? "text-primary-color-nuk-ui-elem" : "opacity-0"
474
+ )
475
+ }
476
+ ),
477
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
478
+ "span",
479
+ {
480
+ className: (0, import_ui_web5.cn)(
481
+ "label-xs-table truncate max-lg:whitespace-normal",
482
+ done ? "text-primary-color-nuk-text" : "text-text-secondary"
483
+ ),
484
+ children: label
485
+ }
486
+ )
487
+ ] });
488
+ }
489
+
490
+ // src/marketing/manual-deal-card.tsx
491
+ var import_jsx_runtime6 = require("react/jsx-runtime");
349
492
  function resolveDealDocument(meta) {
350
493
  const url = meta.uploaded_document?.url ?? meta.document_url ?? null;
351
494
  if (!url) return null;
@@ -358,18 +501,19 @@ function ManualDealCard({
358
501
  onDelete,
359
502
  onOpenDocument,
360
503
  resolveImageUrl,
504
+ asideFooter,
361
505
  className
362
506
  }) {
363
507
  const [isExpanded, setIsExpanded] = (0, import_react.useState)(false);
364
508
  const meta = deal.metadata;
365
509
  const brandName = meta.brand_name;
366
- const startDate = (0, import_core.formatDealDate)(meta.start_date);
367
- const endDate = (0, import_core.formatDealDate)(meta.end_date);
510
+ const startDate = (0, import_core2.formatDealDate)(meta.start_date);
511
+ const endDate = (0, import_core2.formatDealDate)(meta.end_date);
368
512
  const dateRange = [startDate, endDate].filter((d) => Boolean(d) && d !== "\u2014").join(" - ");
369
513
  const metaLine = [meta.deal_category, dateRange].filter(Boolean).join(" \u2022 ");
370
514
  const doc = resolveDealDocument(meta);
371
- const previewDocButton = doc && onOpenDocument && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
372
- import_ui_web4.Button,
515
+ const previewDocButton = doc && onOpenDocument && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
516
+ import_ui_web6.Button,
373
517
  {
374
518
  variant: "unstyled",
375
519
  size: "none",
@@ -381,7 +525,7 @@ function ManualDealCard({
381
525
  },
382
526
  children: [
383
527
  "Preview Doc",
384
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_icons2.XsViewInvoiceIcon, { className: "size-[18px] p-[1px] flex justify-center items-center" })
528
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_icons3.XsViewInvoiceIcon, { className: "size-[18px] p-[1px] flex justify-center items-center" })
385
529
  ]
386
530
  }
387
531
  );
@@ -395,19 +539,19 @@ function ManualDealCard({
395
539
  when: Boolean(onDelete)
396
540
  }
397
541
  ];
398
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
542
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
399
543
  "div",
400
544
  {
401
- className: (0, import_ui_web4.cn)(
545
+ className: (0, import_ui_web6.cn)(
402
546
  "bg-card border-b last:border-b-0 border-grey-strokes-tables w-full font-ss02",
403
547
  className
404
548
  ),
405
549
  children: [
406
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col sm:hidden", children: [
407
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-start p-2 justify-between flex-[1_0_0]", children: [
408
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex gap-1 items-start", children: [
409
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
410
- import_ui_web4.Button,
550
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col sm:hidden", children: [
551
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-start p-2 justify-between flex-[1_0_0]", children: [
552
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-1 items-start", children: [
553
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
554
+ import_ui_web6.Button,
411
555
  {
412
556
  variant: "unstyled",
413
557
  size: "none",
@@ -415,12 +559,12 @@ function ManualDealCard({
415
559
  onClick: () => setIsExpanded((v) => !v),
416
560
  className: "flex p-[6px] items-center justify-center gap-[10px]",
417
561
  "aria-label": isExpanded ? "Collapse deal details" : "Expand deal details",
418
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
419
- import_icons2.ArrowDownFormIcon,
562
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
563
+ import_icons3.ArrowDownFormIcon,
420
564
  {
421
565
  width: 12.004,
422
566
  height: 5.999,
423
- className: (0, import_ui_web4.cn)(
567
+ className: (0, import_ui_web6.cn)(
424
568
  "text-greys-icons transition-transform duration-200",
425
569
  isExpanded && "rotate-180"
426
570
  )
@@ -428,15 +572,15 @@ function ManualDealCard({
428
572
  )
429
573
  }
430
574
  ),
431
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "header-xl-medium-card text-text-primary", children: brandName })
575
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "header-xl-medium-card text-text-primary", children: brandName })
432
576
  ] }),
433
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: (0, import_core.fmtUSDWhole)(meta.total_deal_amount) })
577
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: (0, import_core2.fmtUSDWhole)(meta.total_deal_amount) })
434
578
  ] }),
435
- isExpanded && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
436
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
437
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "p-2 flex items-start justify-between gap-1 bg-greys-table-hover rounded-[0_0_10px_10px]", children: [
438
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
439
- import_ui_web4.Button,
579
+ isExpanded && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
580
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
581
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "p-2 flex items-start justify-between gap-1 bg-greys-table-hover rounded-[0_0_10px_10px]", children: [
582
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
583
+ import_ui_web6.Button,
440
584
  {
441
585
  variant: "unstyled",
442
586
  size: "none",
@@ -450,46 +594,80 @@ function ManualDealCard({
450
594
  ] })
451
595
  ] })
452
596
  ] }),
453
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "group hidden sm:flex gap-3 items-start p-3", children: [
454
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
455
- EntityAvatar,
456
- {
457
- entityType: "company",
458
- imageUrl: deal.company_avatar_url,
459
- name: deal.company_name ?? brandName,
460
- resolveImageUrl,
461
- size: "sm",
462
- className: "shrink-0 rounded-[34px]"
463
- }
464
- ),
465
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-1 flex-col gap-2 justify-center min-w-0", children: [
466
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-start justify-between gap-2 w-full", children: [
467
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex gap-2 items-center min-w-0", children: [
468
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-text-primary header-xl-medium-card truncate", children: brandName }),
597
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "group hidden sm:flex flex-col gap-3 p-3", children: [
598
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-3 items-start w-full", children: [
599
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
600
+ EntityAvatar,
601
+ {
602
+ entityType: "company",
603
+ imageUrl: deal.company_avatar_url,
604
+ name: deal.company_name ?? brandName,
605
+ resolveImageUrl,
606
+ size: "sm",
607
+ className: "shrink-0 rounded-[34px]"
608
+ }
609
+ ),
610
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 flex-col gap-2 justify-center min-w-0", children: [
611
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-2 items-center min-w-0", children: [
612
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-text-primary header-xl-medium-card truncate", children: brandName }),
469
613
  previewDocButton
470
614
  ] }),
471
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-start gap-2 shrink-0", children: [
472
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "team-stats-card text-text-primary whitespace-nowrap", children: (0, import_core.fmtUSDWhole)(meta.total_deal_amount) }),
473
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RowActionsDropdown, { actions, ariaLabel: "Deal options" })
615
+ metaLine && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "label-xs-text text-text-secondary break-words", children: metaLine }),
616
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-3 items-center min-w-0", children: [
617
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "label-xs-text text-text-secondary shrink-0", children: "Lead" }),
618
+ deal.lead_agent_name ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
619
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
620
+ EntityAvatar,
621
+ {
622
+ entityType: "initials",
623
+ imageUrl: deal.lead_agent_avatar_url,
624
+ name: deal.lead_agent_name,
625
+ resolveImageUrl,
626
+ size: "sm",
627
+ className: "shrink-0"
628
+ }
629
+ ),
630
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "label-xs-text text-text-secondary truncate", children: deal.lead_agent_name })
631
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "label-xs-text text-text-secondary truncate", children: "--" })
474
632
  ] })
475
633
  ] }),
476
- metaLine && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "label-xs-text text-text-secondary break-words", children: metaLine }),
477
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex gap-3 items-center min-w-0", children: [
478
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "label-xs-text text-text-secondary shrink-0", children: "Lead" }),
479
- deal.lead_agent_name ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
480
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
481
- EntityAvatar,
482
- {
483
- entityType: "initials",
484
- imageUrl: deal.lead_agent_avatar_url,
485
- name: deal.lead_agent_name,
486
- resolveImageUrl,
487
- size: "sm",
488
- className: "shrink-0"
489
- }
490
- ),
491
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "label-xs-text text-text-secondary truncate", children: deal.lead_agent_name })
492
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "label-xs-text text-text-secondary truncate", children: "--" })
634
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-1 items-end justify-center shrink-0", children: [
635
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-start gap-2", children: [
636
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "team-stats-card text-text-primary whitespace-nowrap", children: (0, import_core2.fmtUSDWhole)(meta.total_deal_amount) }),
637
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RowActionsDropdown, { actions, ariaLabel: "Deal options" })
638
+ ] }),
639
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
640
+ "div",
641
+ {
642
+ className: (0, import_ui_web6.cn)(
643
+ "h-[27px] px-3 py-1.5 rounded-[50px] flex items-center justify-center whitespace-nowrap",
644
+ STATUS_STYLES.Complete
645
+ ),
646
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "label-xs-medium", children: "Complete" })
647
+ }
648
+ ),
649
+ asideFooter
650
+ ] })
651
+ ] }),
652
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("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: [
653
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TrackingItem, { label: "Client paid", done: true }),
654
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TrackingItem, { label: "Agency paid", done: true }),
655
+ meta.has_third_party && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TrackingItem, { label: "Third Party paid", done: true })
656
+ ] }),
657
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [
658
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "relative w-full h-2 bg-greys-nav-text rounded-[10px] overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "absolute left-0 top-0 h-2 bg-primary-color-nuk-ui-elem rounded-[10px] w-full" }) }),
659
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-3 items-start text-[13px] font-medium w-full", children: [
660
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
661
+ "span",
662
+ {
663
+ className: (0, import_ui_web6.cn)(
664
+ "min-w-0 flex-1 label-xs-table",
665
+ meta.total_deal_amount > 0 ? "text-primary-color-nuk-text" : "text-text-secondary"
666
+ ),
667
+ children: `${(0, import_core2.fmtUSD)(meta.total_deal_amount)}${meta.total_deal_amount > 0 ? " collected" : ""}`
668
+ }
669
+ ),
670
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "shrink-0 text-primary-color-nuk-text label-xs-table whitespace-nowrap", children: "Fully Paid" })
493
671
  ] })
494
672
  ] })
495
673
  ] })
@@ -500,10 +678,10 @@ function ManualDealCard({
500
678
 
501
679
  // src/marketing/manual-deal-preview-dialog.tsx
502
680
  var import_react2 = require("react");
503
- var import_ui_web5 = require("@nukleus-sports/ui-web");
504
- var import_icons3 = require("@nukleus-sports/icons");
505
- var import_core2 = require("@nukleus-sports/core");
506
- var import_jsx_runtime5 = require("react/jsx-runtime");
681
+ var import_ui_web7 = require("@nukleus-sports/ui-web");
682
+ var import_icons4 = require("@nukleus-sports/icons");
683
+ var import_core3 = require("@nukleus-sports/core");
684
+ var import_jsx_runtime7 = require("react/jsx-runtime");
507
685
  var DESKTOP_BREAKPOINT_QUERY = "(min-width: 640px)";
508
686
  function useIsDesktopViewport() {
509
687
  const [isDesktop, setIsDesktop] = (0, import_react2.useState)(
@@ -519,22 +697,22 @@ function useIsDesktopViewport() {
519
697
  return isDesktop;
520
698
  }
521
699
  function ReadOnlyField({ label, value }) {
522
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
523
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "label-xs-medium text-text-secondary", children: label }),
524
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex items-center px-[0px] py-[6px]", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "body-text text-text-primary whitespace-nowrap", children: value || "--" }) })
700
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
701
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "label-xs-medium text-text-secondary", children: label }),
702
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center px-[0px] py-[6px]", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "body-text text-text-primary whitespace-nowrap", children: value || "--" }) })
525
703
  ] });
526
704
  }
527
705
  function ReadOnlyPartyCard({ title, children, className }) {
528
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
706
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
529
707
  "div",
530
708
  {
531
- className: (0, import_ui_web5.cn)(
709
+ className: (0, import_ui_web7.cn)(
532
710
  "flex flex-col gap-4 rounded-[10px] border border-grey-strokes-tables bg-card px-6 py-4",
533
711
  className
534
712
  ),
535
713
  children: [
536
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h3", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: title }),
537
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex flex-col gap-4", children })
714
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: title }),
715
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-col gap-4", children })
538
716
  ]
539
717
  }
540
718
  );
@@ -545,6 +723,7 @@ function ManualDealPreviewDialog({
545
723
  onOpenChange,
546
724
  onEdit,
547
725
  onOpenDocument,
726
+ clientImageUrl,
548
727
  resolveImageUrl
549
728
  }) {
550
729
  const isDesktop = useIsDesktopViewport();
@@ -552,31 +731,47 @@ function ManualDealPreviewDialog({
552
731
  const meta = deal.metadata;
553
732
  const doc = resolveDealDocument(meta);
554
733
  const cardCls = isDesktop ? "flex-1 min-w-0 h-[479px]" : "w-full h-auto";
555
- const cards = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: (0, import_ui_web5.cn)("flex gap-4 sm:gap-[12px]", !isDesktop && "flex-col"), children: [
556
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(ReadOnlyPartyCard, { title: "Brand", className: cardCls, children: [
557
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Brand Name", value: (0, import_core2.fmt)(meta.brand_name) }),
558
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Deal Category", value: (0, import_core2.fmt)(meta.deal_category) }),
559
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Total Deal Amount", value: (0, import_core2.fmtCurrency)(meta.total_deal_amount) }),
560
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Payment Due Date", value: (0, import_core2.fmtDate)(meta.brand_payment_due_date) }),
561
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Deal Start Date", value: (0, import_core2.fmtDate)(meta.start_date) }),
562
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Deal End Date", value: (0, import_core2.fmtDate)(meta.end_date) })
734
+ const cards = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: (0, import_ui_web7.cn)("flex gap-4 sm:gap-[12px]", !isDesktop && "flex-col"), children: [
735
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(ReadOnlyPartyCard, { title: "Brand", className: cardCls, children: [
736
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ReadOnlyField, { label: "Brand Name", value: (0, import_core3.fmt)(meta.brand_name) }),
737
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ReadOnlyField, { label: "Deal Category", value: (0, import_core3.fmt)(meta.deal_category) }),
738
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ReadOnlyField, { label: "Total Deal Amount", value: (0, import_core3.fmtCurrency)(meta.total_deal_amount) }),
739
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ReadOnlyField, { label: "Payment Due Date", value: (0, import_core3.fmtDate)(meta.brand_payment_due_date) }),
740
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ReadOnlyField, { label: "Deal Start Date", value: (0, import_core3.fmtDate)(meta.start_date) }),
741
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ReadOnlyField, { label: "Deal End Date", value: (0, import_core3.fmtDate)(meta.end_date) })
563
742
  ] }),
564
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(ReadOnlyPartyCard, { title: "Client", className: cardCls, children: [
565
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Client Name", value: (0, import_core2.fmt)(meta.client_name) }),
566
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Client's Invoice Name", value: (0, import_core2.fmt)(meta.client_invoice_name) })
743
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(ReadOnlyPartyCard, { title: "Client", className: cardCls, children: [
744
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
745
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "label-xs-medium text-text-secondary", children: "Client Name" }),
746
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex min-h-[32px] items-center gap-2 py-[6px]", children: [
747
+ meta.client_name?.trim() && clientImageUrl && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
748
+ EntityAvatar,
749
+ {
750
+ entityType: "player",
751
+ imageUrl: clientImageUrl,
752
+ name: meta.client_name,
753
+ resolveImageUrl,
754
+ size: "sm",
755
+ className: "shrink-0"
756
+ }
757
+ ),
758
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "body-text text-text-primary whitespace-nowrap", children: (0, import_core3.fmt)(meta.client_name) })
759
+ ] })
760
+ ] }),
761
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ReadOnlyField, { label: "Client's Invoice Name", value: (0, import_core3.fmt)(meta.client_invoice_name) })
567
762
  ] }),
568
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(ReadOnlyPartyCard, { title: "Agency", className: cardCls, children: [
569
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Agency Name", value: (0, import_core2.fmt)(meta.agency_name) }),
570
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
763
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(ReadOnlyPartyCard, { title: "Agency", className: cardCls, children: [
764
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ReadOnlyField, { label: "Agency Name", value: (0, import_core3.fmt)(meta.agency_name) }),
765
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
571
766
  ReadOnlyField,
572
767
  {
573
768
  label: "Commission %",
574
769
  value: meta.agency_commission ? `${meta.agency_commission}%` : "--"
575
770
  }
576
771
  ),
577
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Payment Due Date", value: (0, import_core2.fmtDate)(meta.agency_payment_due_date) }),
578
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
579
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
772
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ReadOnlyField, { label: "Payment Due Date", value: (0, import_core3.fmtDate)(meta.agency_payment_due_date) }),
773
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
774
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
580
775
  "span",
581
776
  {
582
777
  className: "text-[13px] font-medium leading-normal text-text-secondary",
@@ -584,8 +779,8 @@ function ManualDealPreviewDialog({
584
779
  children: "Lead Agent"
585
780
  }
586
781
  ),
587
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex min-h-[32px] items-center gap-2 py-[6px]", children: [
588
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
782
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex min-h-[32px] items-center gap-2 py-[6px]", children: [
783
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
589
784
  EntityAvatar,
590
785
  {
591
786
  entityType: "initials",
@@ -596,7 +791,7 @@ function ManualDealPreviewDialog({
596
791
  className: "shrink-0"
597
792
  }
598
793
  ),
599
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
794
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
600
795
  "span",
601
796
  {
602
797
  className: "overflow-hidden text-ellipsis text-[14px] leading-[15px] text-text-secondary whitespace-nowrap",
@@ -607,62 +802,64 @@ function ManualDealPreviewDialog({
607
802
  ] })
608
803
  ] })
609
804
  ] }),
610
- meta.has_third_party && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(ReadOnlyPartyCard, { title: "Third Party", className: cardCls, children: [
611
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Third Party Name", value: (0, import_core2.fmt)(meta.third_party_name) }),
612
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
805
+ meta.has_third_party && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(ReadOnlyPartyCard, { title: "Third Party", className: cardCls, children: [
806
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ReadOnlyField, { label: "Third Party Name", value: (0, import_core3.fmt)(meta.third_party_name) }),
807
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
613
808
  ReadOnlyField,
614
809
  {
615
810
  label: "Third Party Invoice Name",
616
- value: (0, import_core2.fmt)(meta.third_party_invoice_name)
811
+ value: (0, import_core3.fmt)(meta.third_party_invoice_name)
617
812
  }
618
813
  ),
619
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
814
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
620
815
  ReadOnlyField,
621
816
  {
622
817
  label: "Commission %",
623
818
  value: meta.third_party_commission ? `${meta.third_party_commission}%` : "--"
624
819
  }
625
820
  ),
626
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
821
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
627
822
  ReadOnlyField,
628
823
  {
629
824
  label: "Payment Due Date",
630
- value: (0, import_core2.fmtDate)(meta.third_party_payment_due_date)
825
+ value: (0, import_core3.fmtDate)(meta.third_party_payment_due_date)
631
826
  }
632
827
  )
633
828
  ] })
634
829
  ] });
635
- const notes = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("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: [
636
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
830
+ const summary = meta.summary || meta.notes || null;
831
+ const notes = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("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: [
832
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
637
833
  "h3",
638
834
  {
639
835
  className: "header-xl-medium-card text-text-primary whitespace-nowrap",
640
836
  style: { fontFeatureSettings: "'ss02', 'ss05'" },
641
- children: "Notes"
837
+ children: "Contract Summary"
642
838
  }
643
839
  ),
644
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex h-[70px] min-h-[44px] items-start rounded-[5px] bg-greys-background-hover px-[12px] py-[6px]", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
840
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex min-h-[70px] items-start rounded-[5px] bg-greys-background-hover px-[12px] py-[6px]", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
645
841
  "p",
646
842
  {
647
- className: (0, import_ui_web5.cn)(
648
- "flex-1 body-text overflow-hidden text-ellipsis whitespace-nowrap",
649
- meta.notes ? "text-text-primary" : "text-text-secondary"
843
+ className: (0, import_ui_web7.cn)(
844
+ "flex-1 min-w-0 body-text whitespace-pre-wrap break-words",
845
+ summary ? "text-text-primary" : "text-text-secondary"
650
846
  ),
651
847
  style: { fontFeatureSettings: "'ss02', 'ss05'" },
652
- children: meta.notes || "Enter any additional notes about this marketing deal"
848
+ children: summary || "--"
653
849
  }
654
850
  ) })
655
851
  ] });
656
- const documentButton = doc && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
657
- import_ui_web5.Button,
852
+ const contractDetailsCard = meta.contract_details ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ContractDetailsCard, { details: meta.contract_details }) : null;
853
+ const documentButton = doc && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
854
+ import_ui_web7.Button,
658
855
  {
659
856
  variant: "ghost",
660
857
  type: "button",
661
858
  className: "flex h-full p-0 bg-transparent hover:bg-transparent items-center gap-[12px] hover:opacity-80 transition-opacity",
662
859
  onClick: () => onOpenDocument(doc),
663
860
  children: [
664
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_icons3.DownloadIcon, { className: "size-5 shrink-0 text-primary-color-nuk-ui-elem" }),
665
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
861
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_icons4.DownloadIcon, { className: "size-5 shrink-0 text-primary-color-nuk-ui-elem" }),
862
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
666
863
  "span",
667
864
  {
668
865
  className: "text-[14px] font-normal leading-[15px] text-primary-color-nuk-text overflow-hidden text-ellipsis whitespace-nowrap max-w-[200px]",
@@ -673,9 +870,9 @@ function ManualDealPreviewDialog({
673
870
  ]
674
871
  }
675
872
  );
676
- const footerButtons = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-[12px]", children: [
677
- onEdit && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
678
- import_ui_web5.Button,
873
+ const footerButtons = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-[12px]", children: [
874
+ onEdit && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
875
+ import_ui_web7.Button,
679
876
  {
680
877
  variant: "outline",
681
878
  onClick: () => onEdit(deal),
@@ -683,8 +880,8 @@ function ManualDealPreviewDialog({
683
880
  children: "Edit Deal"
684
881
  }
685
882
  ),
686
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
687
- import_ui_web5.Button,
883
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
884
+ import_ui_web7.Button,
688
885
  {
689
886
  onClick: () => onOpenChange(false),
690
887
  className: "h-[36px] min-w-[105px] w-[105px] rounded-[50px] bg-primary-color-nuk-text px-3 py-2 text-[15px] font-medium leading-normal text-white hover:bg-primary-color-nuk-text",
@@ -693,20 +890,21 @@ function ManualDealPreviewDialog({
693
890
  )
694
891
  ] });
695
892
  if (isDesktop) {
696
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui_web5.Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_ui_web5.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: [
697
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui_web5.DialogHeader, { className: "shrink-0 mt-4 pb-0 space-y-0 px-6", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui_web5.DialogTitle, { children: "Preview Details" }) }),
698
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-1 overflow-y-auto px-6 pt-6 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col gap-[12px]", children: [
893
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_web7.Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_ui_web7.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: [
894
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_web7.DialogHeader, { className: "shrink-0 mt-4 pb-0 space-y-0 px-6", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_web7.DialogTitle, { children: "Preview Details" }) }),
895
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex-1 overflow-y-auto px-6 pt-6 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-[12px]", children: [
699
896
  cards,
700
- notes
897
+ notes,
898
+ contractDetailsCard
701
899
  ] }) }),
702
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("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: [
703
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex h-[32px] items-center bg-card px-2", children: documentButton ?? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", {}) }),
900
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("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: [
901
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex h-[32px] items-center bg-card px-2", children: documentButton ?? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", {}) }),
704
902
  footerButtons
705
903
  ] })
706
904
  ] }) });
707
905
  }
708
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
709
- import_ui_web5.MobileModalLayout,
906
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
907
+ import_ui_web7.MobileModalLayout,
710
908
  {
711
909
  onCancel: () => onOpenChange(false),
712
910
  isOpen: open,
@@ -715,10 +913,11 @@ function ManualDealPreviewDialog({
715
913
  cancelButtonName: "Cancel",
716
914
  actionBottomContext: false,
717
915
  childClassName: "max-h-[calc(100dvh-50px)]",
718
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col gap-4 px-4 pb-4", children: [
719
- doc && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex h-[32px] justify-end items-center bg-card py-0 px-2", children: documentButton }),
916
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-4 px-4 pb-4", children: [
917
+ doc && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex h-[32px] justify-end items-center bg-card py-0 px-2", children: documentButton }),
720
918
  cards,
721
- notes
919
+ notes,
920
+ contractDetailsCard
722
921
  ] })
723
922
  }
724
923
  );
@@ -726,54 +925,18 @@ function ManualDealPreviewDialog({
726
925
 
727
926
  // src/marketing/project-deal-card.tsx
728
927
  var import_react3 = require("react");
729
- var import_ui_web6 = require("@nukleus-sports/ui-web");
730
- var import_icons4 = require("@nukleus-sports/icons");
731
- var import_core3 = require("@nukleus-sports/core");
732
- var import_jsx_runtime6 = (
733
- // `min-w-0` lets `truncate` below actually engage instead of overflowing
734
- // the card; `lg:flex-initial` + `max-lg:whitespace-normal` let a label
735
- // like "Deliverables met - 0/4" wrap in the grid instead of being
736
- // squeezed to an equal share. (clientapp's version — see module doc.)
737
- require("react/jsx-runtime")
738
- );
739
- function TrackingItem({ label, done }) {
740
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex min-w-0 flex-1 gap-2 items-center lg:flex-initial", children: [
741
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
742
- import_icons4.CheckRingRoundIcon,
743
- {
744
- width: 12,
745
- height: 12,
746
- className: (0, import_ui_web6.cn)(
747
- "shrink-0 transition-opacity",
748
- done ? "text-primary-color-nuk-ui-elem" : "opacity-0"
749
- )
750
- }
751
- ),
752
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
753
- "span",
754
- {
755
- className: (0, import_ui_web6.cn)(
756
- "label-xs-table truncate max-lg:whitespace-normal",
757
- done ? "text-primary-color-nuk-text" : "text-text-secondary"
758
- ),
759
- children: label
760
- }
761
- )
762
- ] });
763
- }
764
- var STATUS_STYLES = {
765
- Active: "bg-semantic-color-status-priority-cold-fill text-semantic-color-status-priority-cold-copy",
766
- Upcoming: "bg-semantic-color-status-priority-in-progress-warm-fill text-semantic-color-status-priority-in-progress-warm-copy",
767
- Complete: "bg-semantic-color-status-priority-completed-fill text-semantic-color-status-priority-completed-copy"
768
- };
928
+ var import_ui_web8 = require("@nukleus-sports/ui-web");
929
+ var import_icons5 = require("@nukleus-sports/icons");
930
+ var import_core4 = require("@nukleus-sports/core");
931
+ var import_jsx_runtime8 = require("react/jsx-runtime");
769
932
  function statusLabel(status) {
770
933
  return status === "Complete" ? "Completed" : status;
771
934
  }
772
935
  function CollabAffordance({ href, onClick, className, children }) {
773
936
  if (onClick) {
774
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ui_web6.Button, { variant: "unstyled", size: "none", type: "button", onClick, className, children });
937
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ui_web8.Button, { variant: "unstyled", size: "none", type: "button", onClick, className, children });
775
938
  }
776
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("a", { href, className, children });
939
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("a", { href, className, children });
777
940
  }
778
941
  function ProjectDealCard({
779
942
  deal,
@@ -782,25 +945,26 @@ function ProjectDealCard({
782
945
  collabHref,
783
946
  onCollabClick,
784
947
  resolveImageUrl,
948
+ asideFooter,
785
949
  className
786
950
  }) {
787
951
  const [isExpanded, setIsExpanded] = (0, import_react3.useState)(false);
788
952
  const showCollab = collabMembership === "member";
789
- const status = (0, import_core3.getDealStatus)(deal, isCompleted);
953
+ const status = (0, import_core4.getDealStatus)(deal, isCompleted);
790
954
  const brandName = deal.brand_name ?? deal.company_name ?? deal.project_title;
791
955
  const category = deal.deal_terms?.category;
792
- const startDate = (0, import_core3.formatDealDate)(deal.deal_terms?.startDate);
793
- const endDate = (0, import_core3.formatDealDate)(deal.deal_terms?.endDate);
956
+ const startDate = (0, import_core4.formatDealDate)(deal.deal_terms?.startDate);
957
+ const endDate = (0, import_core4.formatDealDate)(deal.deal_terms?.endDate);
794
958
  const progressPct = deal.total_contracted > 0 ? Math.min(100, deal.total_collected / deal.total_contracted * 100) : 0;
795
959
  const outstanding = Math.max(0, deal.total_contracted - deal.total_collected);
796
960
  const isFullyPaid = deal.total_contracted > 0 && outstanding === 0;
797
961
  const hasPaymentsCount = deal.payments_total !== void 0 && deal.payments_paid !== void 0;
798
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: (0, import_ui_web6.cn)("w-full", className), children: [
799
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col sm:hidden overflow-hidden bg-card border border-greys-grey-strokes-tables rounded-[10px]", children: [
800
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-start justify-between gap-1 p-2", children: [
801
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 min-w-0 gap-1 items-start", children: [
802
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
803
- import_ui_web6.Button,
962
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: (0, import_ui_web8.cn)("w-full", className), children: [
963
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col sm:hidden overflow-hidden bg-card border border-greys-grey-strokes-tables rounded-[10px]", children: [
964
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-start justify-between gap-1 p-2", children: [
965
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-1 min-w-0 gap-1 items-start", children: [
966
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
967
+ import_ui_web8.Button,
804
968
  {
805
969
  variant: "unstyled",
806
970
  size: "none",
@@ -808,12 +972,12 @@ function ProjectDealCard({
808
972
  onClick: () => setIsExpanded((v) => !v),
809
973
  className: "flex size-8 shrink-0 items-center justify-center p-1.5 rounded-[5px]",
810
974
  "aria-label": isExpanded ? "Collapse deal details" : "Expand deal details",
811
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
812
- import_icons4.ArrowDownFormIcon,
975
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
976
+ import_icons5.ArrowDownFormIcon,
813
977
  {
814
978
  width: 12.004,
815
979
  height: 5.999,
816
- className: (0, import_ui_web6.cn)(
980
+ className: (0, import_ui_web8.cn)(
817
981
  "text-greys-icons transition-transform duration-200",
818
982
  isExpanded && "rotate-180"
819
983
  )
@@ -821,48 +985,49 @@ function ProjectDealCard({
821
985
  )
822
986
  }
823
987
  ),
824
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 min-w-0 flex-col gap-2 justify-center items-start", children: [
825
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "header-xl-medium-card text-text-primary", children: brandName }),
826
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "label-xs-text text-text-secondary", children: [
988
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-1 min-w-0 flex-col gap-2 justify-center items-start", children: [
989
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "header-xl-medium-card text-text-primary", children: brandName }),
990
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "label-xs-text text-text-secondary", children: [
827
991
  startDate,
828
992
  " - ",
829
993
  endDate
830
994
  ] })
831
995
  ] })
832
996
  ] }),
833
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col shrink-0 justify-center items-end gap-1", children: [
834
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: (0, import_core3.fmtUSD)(deal.total_contracted) }),
835
- deal.total_equity_shares > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
997
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col shrink-0 justify-center items-end gap-1", children: [
998
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: (0, import_core4.fmtUSD)(deal.total_contracted) }),
999
+ deal.total_equity_shares > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
836
1000
  "+ ",
837
1001
  deal.total_equity_shares.toLocaleString(),
838
1002
  " shares"
839
1003
  ] }),
840
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1004
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
841
1005
  "div",
842
1006
  {
843
- className: (0, import_ui_web6.cn)(
1007
+ className: (0, import_ui_web8.cn)(
844
1008
  "h-[27px] px-3 py-1.5 rounded-[50px] flex items-center justify-center label-xs-medium whitespace-nowrap",
845
1009
  STATUS_STYLES[status]
846
1010
  ),
847
1011
  children: statusLabel(status)
848
1012
  }
849
- )
1013
+ ),
1014
+ asideFooter
850
1015
  ] })
851
1016
  ] }),
852
- isExpanded && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
853
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
854
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-start gap-1 p-2 bg-greys-table-hover", children: [
855
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
856
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "label-xs-text text-text-secondary", children: "Collected" }),
857
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "body-text-semibold text-primary-color-nuk-text truncate", children: (0, import_core3.fmtUSD)(deal.total_collected) })
1017
+ isExpanded && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
1018
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
1019
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-start gap-1 p-2 bg-greys-table-hover", children: [
1020
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
1021
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "label-xs-text text-text-secondary", children: "Collected" }),
1022
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "body-text-semibold text-primary-color-nuk-text truncate", children: (0, import_core4.fmtUSD)(deal.total_collected) })
858
1023
  ] }),
859
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
860
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "label-xs-text text-text-secondary", children: "Outstanding" }),
861
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "body-text-semibold text-semantic-color-status-priority-priority-2 truncate", children: (0, import_core3.fmtUSD)(outstanding) })
1024
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
1025
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "label-xs-text text-text-secondary", children: "Outstanding" }),
1026
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "body-text-semibold text-semantic-color-status-priority-priority-2 truncate", children: (0, import_core4.fmtUSD)(outstanding) })
862
1027
  ] }),
863
- hasPaymentsCount && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
864
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "label-xs-text text-text-secondary", children: "Payments" }),
865
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "body-text-semibold text-text-primary truncate", children: [
1028
+ hasPaymentsCount && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
1029
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "label-xs-text text-text-secondary", children: "Payments" }),
1030
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "body-text-semibold text-text-primary truncate", children: [
866
1031
  deal.payments_paid,
867
1032
  " of ",
868
1033
  deal.payments_total,
@@ -870,20 +1035,20 @@ function ProjectDealCard({
870
1035
  ] })
871
1036
  ] })
872
1037
  ] }),
873
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
874
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2 min-w-0 p-2 bg-greys-table-hover", children: [
875
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "w-[58px] shrink-0 text-[11px] leading-none text-text-secondary font-normal", children: "Payment" }),
876
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "relative flex-1 min-w-0 h-1 bg-greys-nav-text rounded-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1038
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
1039
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-2 min-w-0 p-2 bg-greys-table-hover", children: [
1040
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w-[58px] shrink-0 text-[11px] leading-none text-text-secondary font-normal", children: "Payment" }),
1041
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "relative flex-1 min-w-0 h-1 bg-greys-nav-text rounded-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
877
1042
  "div",
878
1043
  {
879
1044
  className: "absolute inset-y-0 left-0 bg-primary-color-nuk-ui-elem rounded-full",
880
1045
  style: { width: `${progressPct}%` }
881
1046
  }
882
1047
  ) }),
883
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1048
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
884
1049
  "span",
885
1050
  {
886
- className: (0, import_ui_web6.cn)(
1051
+ className: (0, import_ui_web8.cn)(
887
1052
  "w-9 shrink-0 text-right text-[11px] leading-none font-normal",
888
1053
  isFullyPaid ? "text-primary-color-nuk-text" : "text-text-secondary"
889
1054
  ),
@@ -894,8 +1059,8 @@ function ProjectDealCard({
894
1059
  }
895
1060
  )
896
1061
  ] }),
897
- showCollab && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
898
- showCollab && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex gap-1 p-2 bg-greys-table-hover rounded-[0_0_10px_10px] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1062
+ showCollab && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
1063
+ showCollab && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex gap-1 p-2 bg-greys-table-hover rounded-[0_0_10px_10px] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
899
1064
  CollabAffordance,
900
1065
  {
901
1066
  href: collabHref,
@@ -903,15 +1068,15 @@ function ProjectDealCard({
903
1068
  className: "flex gap-2 items-center text-primary-color-nuk-text text-[11px] font-normal shrink-0",
904
1069
  children: [
905
1070
  "Collab",
906
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_icons4.XsViewInvoiceIcon, { className: "size-[18px] p-[1px] flex justify-center items-center" })
1071
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_icons5.XsViewInvoiceIcon, { className: "size-[18px] p-[1px] flex justify-center items-center" })
907
1072
  ]
908
1073
  }
909
1074
  ) })
910
1075
  ] })
911
1076
  ] }),
912
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "hidden sm:flex flex-col gap-3 p-3 bg-card border-b border-greys-grey-strokes-tables font-ss02", children: [
913
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-3 items-start w-full", children: [
914
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1077
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "hidden sm:flex flex-col gap-3 p-3 bg-card border-b border-greys-grey-strokes-tables font-ss02", children: [
1078
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex gap-3 items-start w-full", children: [
1079
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
915
1080
  EntityAvatar,
916
1081
  {
917
1082
  entityType: "company",
@@ -922,10 +1087,10 @@ function ProjectDealCard({
922
1087
  className: "shrink-0 rounded-[34px]"
923
1088
  }
924
1089
  ),
925
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 min-w-0 flex-col gap-2 justify-center", children: [
926
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-2 items-center", children: [
927
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "header-xl-medium-card text-text-primary", children: brandName }),
928
- showCollab && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1090
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-1 min-w-0 flex-col gap-2 justify-center", children: [
1091
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex gap-2 items-center", children: [
1092
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "header-xl-medium-card text-text-primary", children: brandName }),
1093
+ showCollab && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
929
1094
  CollabAffordance,
930
1095
  {
931
1096
  href: collabHref,
@@ -933,15 +1098,15 @@ function ProjectDealCard({
933
1098
  className: "flex gap-1.5 items-center text-primary-color-nuk-text label-xs-text shrink-0",
934
1099
  children: [
935
1100
  "Collab Hub",
936
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_icons4.XsViewInvoiceIcon, { className: "size-[18px] p-[1px] flex justify-center items-center" })
1101
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_icons5.XsViewInvoiceIcon, { className: "size-[18px] p-[1px] flex justify-center items-center" })
937
1102
  ]
938
1103
  }
939
1104
  )
940
1105
  ] }),
941
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "label-xs-text text-text-secondary break-words sm:whitespace-nowrap", children: [category, `${startDate} - ${endDate}`].filter(Boolean).join(" \u2022 ") }),
942
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-3 items-center min-w-0", children: [
943
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "label-xs-text text-text-secondary shrink-0", children: "Owner" }),
944
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1106
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "label-xs-text text-text-secondary break-words sm:whitespace-nowrap", children: [category, `${startDate} - ${endDate}`].filter(Boolean).join(" \u2022 ") }),
1107
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex gap-3 items-center min-w-0", children: [
1108
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "label-xs-text text-text-secondary shrink-0", children: "Owner" }),
1109
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
945
1110
  EntityAvatar,
946
1111
  {
947
1112
  entityType: "initials",
@@ -952,60 +1117,61 @@ function ProjectDealCard({
952
1117
  className: "shrink-0"
953
1118
  }
954
1119
  ),
955
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "label-xs-text text-text-secondary truncate", children: deal.owner_name ?? "\u2014" })
1120
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "label-xs-text text-text-secondary truncate", children: (0, import_core4.abbreviatePersonName)(deal.owner_name) ?? "\u2014" })
956
1121
  ] })
957
1122
  ] }),
958
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-1 items-end justify-center shrink-0", children: [
959
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "team-stats-card text-text-primary whitespace-nowrap", children: (0, import_core3.fmtUSD)(deal.total_contracted) }),
960
- deal.total_equity_shares > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
1123
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-1 items-end justify-center shrink-0", children: [
1124
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "team-stats-card text-text-primary whitespace-nowrap", children: (0, import_core4.fmtUSD)(deal.total_contracted) }),
1125
+ deal.total_equity_shares > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
961
1126
  "+ ",
962
1127
  deal.total_equity_shares.toLocaleString(),
963
1128
  " shares"
964
1129
  ] }),
965
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1130
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
966
1131
  "div",
967
1132
  {
968
- className: (0, import_ui_web6.cn)(
1133
+ className: (0, import_ui_web8.cn)(
969
1134
  "h-[27px] px-3 py-1.5 rounded-[50px] flex items-center justify-center whitespace-nowrap",
970
1135
  STATUS_STYLES[status]
971
1136
  ),
972
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "label-xs-medium", children: statusLabel(status) })
1137
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "label-xs-medium", children: statusLabel(status) })
973
1138
  }
974
- )
1139
+ ),
1140
+ asideFooter
975
1141
  ] })
976
1142
  ] }),
977
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("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: [
978
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1143
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("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: [
1144
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
979
1145
  TrackingItem,
980
1146
  {
981
1147
  label: `Deliverables met - ${deal.deliverables_met}/${deal.deliverables_total}`,
982
1148
  done: deal.deliverables_total > 0 && deal.deliverables_met >= deal.deliverables_total
983
1149
  }
984
1150
  ),
985
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TrackingItem, { label: "Client paid", done: deal.client_paid && isFullyPaid }),
986
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TrackingItem, { label: "Agency paid", done: deal.agency_paid && isFullyPaid }),
987
- deal.has_third_party && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TrackingItem, { label: "Third Party paid", done: deal.third_party_paid && isFullyPaid })
1151
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TrackingItem, { label: "Client paid", done: deal.client_paid && isFullyPaid }),
1152
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TrackingItem, { label: "Agency paid", done: deal.agency_paid && isFullyPaid }),
1153
+ deal.has_third_party && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TrackingItem, { label: "Third Party paid", done: deal.third_party_paid && isFullyPaid })
988
1154
  ] }),
989
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [
990
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "relative w-full h-2 bg-greys-nav-text rounded-[10px] overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1155
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [
1156
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "relative w-full h-2 bg-greys-nav-text rounded-[10px] overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
991
1157
  "div",
992
1158
  {
993
1159
  className: "absolute left-0 top-0 h-2 bg-primary-color-nuk-ui-elem rounded-[10px]",
994
1160
  style: { width: `${progressPct}%` }
995
1161
  }
996
1162
  ) }),
997
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-3 items-start text-[13px] font-medium w-full", children: [
998
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1163
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex gap-3 items-start text-[13px] font-medium w-full", children: [
1164
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
999
1165
  "span",
1000
1166
  {
1001
- className: (0, import_ui_web6.cn)(
1167
+ className: (0, import_ui_web8.cn)(
1002
1168
  "min-w-0 flex-1 label-xs-table",
1003
1169
  deal.total_collected > 0 ? "text-primary-color-nuk-text" : "text-text-secondary"
1004
1170
  ),
1005
- children: `${(0, import_core3.fmtUSD)(deal.total_collected)}${deal.total_collected > 0 ? " collected" : ""}`
1171
+ children: `${(0, import_core4.fmtUSD)(deal.total_collected)}${deal.total_collected > 0 ? " collected" : ""}`
1006
1172
  }
1007
1173
  ),
1008
- hasPaymentsCount && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "flex-1 label-xs-table text-text-secondary", children: [
1174
+ hasPaymentsCount && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "flex-1 label-xs-table text-text-secondary", children: [
1009
1175
  deal.payments_paid,
1010
1176
  " of ",
1011
1177
  deal.payments_total,
@@ -1013,8 +1179,8 @@ function ProjectDealCard({
1013
1179
  " ",
1014
1180
  status === "Active" ? "collected" : "paid"
1015
1181
  ] }),
1016
- isFullyPaid ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "shrink-0 text-primary-color-nuk-text label-xs-table whitespace-nowrap", children: "Fully Paid" }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "shrink-0 text-semantic-color-status-priority-priority-2 label-xs-table whitespace-nowrap", children: [
1017
- (0, import_core3.fmtUSD)(outstanding),
1182
+ isFullyPaid ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "shrink-0 text-primary-color-nuk-text label-xs-table whitespace-nowrap", children: "Fully Paid" }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "shrink-0 text-semantic-color-status-priority-priority-2 label-xs-table whitespace-nowrap", children: [
1183
+ (0, import_core4.fmtUSD)(outstanding),
1018
1184
  " outstanding"
1019
1185
  ] })
1020
1186
  ] })
@@ -1024,6 +1190,7 @@ function ProjectDealCard({
1024
1190
  }
1025
1191
  // Annotate the CommonJS export names for ESM import in node:
1026
1192
  0 && (module.exports = {
1193
+ ContractDetailsCard,
1027
1194
  DealEmptyState,
1028
1195
  ENTITY_AVATAR_SIZE_PX,
1029
1196
  EntityAvatar,