@wealthx/shadcn 1.5.15 → 1.5.16

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.
@@ -1488,11 +1488,66 @@ function LeadCard({
1488
1488
  );
1489
1489
  }
1490
1490
 
1491
- // src/components/ui/kanban-column.tsx
1491
+ // src/components/ui/tooltip.tsx
1492
+ var import_tooltip = require("@base-ui/react/tooltip");
1492
1493
  var import_jsx_runtime16 = require("react/jsx-runtime");
1493
- function formatTotalValue(value) {
1494
- return formatCurrency(value);
1494
+ function TooltipProvider(_a) {
1495
+ var _b = _a, {
1496
+ delay = 0
1497
+ } = _b, props = __objRest(_b, [
1498
+ "delay"
1499
+ ]);
1500
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1501
+ import_tooltip.Tooltip.Provider,
1502
+ __spreadValues({
1503
+ "data-slot": "tooltip-provider",
1504
+ delay
1505
+ }, props)
1506
+ );
1507
+ }
1508
+ function Tooltip(_a) {
1509
+ var props = __objRest(_a, []);
1510
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_tooltip.Tooltip.Root, __spreadValues({ "data-slot": "tooltip" }, props));
1511
+ }
1512
+ function TooltipTrigger(_a) {
1513
+ var props = __objRest(_a, []);
1514
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_tooltip.Tooltip.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
1515
+ }
1516
+ function TooltipContent(_a) {
1517
+ var _b = _a, {
1518
+ className,
1519
+ sideOffset = 8,
1520
+ side,
1521
+ children,
1522
+ style
1523
+ } = _b, props = __objRest(_b, [
1524
+ "className",
1525
+ "sideOffset",
1526
+ "side",
1527
+ "children",
1528
+ "style"
1529
+ ]);
1530
+ const themeVars = useThemeVars();
1531
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_tooltip.Tooltip.Positioner, { sideOffset, side, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1532
+ import_tooltip.Tooltip.Popup,
1533
+ __spreadProps(__spreadValues({
1534
+ className: cn(
1535
+ "relative z-50 w-fit animate-in overflow-visible bg-brand-secondary px-3 py-1.5 text-caption text-balance text-brand-secondary-foreground fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards",
1536
+ className
1537
+ ),
1538
+ "data-slot": "tooltip-content",
1539
+ style: __spreadValues(__spreadValues({}, themeVars), style)
1540
+ }, props), {
1541
+ children: [
1542
+ children,
1543
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_tooltip.Tooltip.Arrow, { className: "z-50 size-2.5 rotate-45 bg-brand-secondary data-[side=bottom]:-top-1 data-[side=left]:-right-1 data-[side=right]:-left-1 data-[side=top]:-bottom-1" })
1544
+ ]
1545
+ })
1546
+ ) }) });
1495
1547
  }
1548
+
1549
+ // src/components/ui/kanban-column.tsx
1550
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1496
1551
  function growthColor(growth) {
1497
1552
  return growth > 0 ? "var(--color-success-text)" : "var(--color-destructive-text)";
1498
1553
  }
@@ -1508,6 +1563,7 @@ function KanbanColumn({
1508
1563
  loaderRef,
1509
1564
  onEditColumn,
1510
1565
  onDeleteColumn,
1566
+ onAddLead,
1511
1567
  onTaskToggle,
1512
1568
  onMarkAsDone,
1513
1569
  onMoveToNextStage,
@@ -1544,7 +1600,7 @@ function KanbanColumn({
1544
1600
  const cardId = e.dataTransfer.getData("text/plain");
1545
1601
  if (cardId) onCardDrop(cardId);
1546
1602
  }
1547
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1603
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1548
1604
  "div",
1549
1605
  {
1550
1606
  className: cn(
@@ -1558,43 +1614,67 @@ function KanbanColumn({
1558
1614
  }),
1559
1615
  "data-slot": "kanban-column",
1560
1616
  children: [
1561
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col gap-2 border-b border-border bg-background px-3 py-3", children: [
1562
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
1563
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("h2", { className: "text-sm font-semibold text-foreground", children: [
1564
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-muted-foreground", children: stage.count }),
1565
- " ",
1566
- stage.name
1567
- ] }),
1568
- hasMenu && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(DropdownMenu, { children: [
1569
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1570
- DropdownMenuTrigger,
1617
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-2 border-b border-border bg-background px-3 py-3", children: [
1618
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
1619
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("h2", { className: "text-sm font-semibold text-foreground", children: [
1620
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1621
+ "span",
1571
1622
  {
1572
- className: cn(
1573
- buttonVariants({ variant: "ghost", size: "icon" }),
1574
- "-mr-1 size-7 shrink-0"
1575
- ),
1576
- "aria-label": "Column actions",
1577
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react7.MoreVertical, { className: "size-4" })
1623
+ className: cn(!stage.countColor && "text-muted-foreground"),
1624
+ style: stage.countColor ? { color: stage.countColor } : void 0,
1625
+ children: stage.count
1578
1626
  }
1579
1627
  ),
1580
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(DropdownMenuContent, { align: "end", children: [
1581
- onEditColumn && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuItem, { onClick: onEditColumn, children: "Edit column settings" }),
1582
- !isDefault && onDeleteColumn && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
1583
- onEditColumn && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuSeparator, {}),
1584
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1585
- DropdownMenuItem,
1586
- {
1587
- onClick: onDeleteColumn,
1588
- className: "text-destructive focus:text-destructive",
1589
- children: "Delete column"
1590
- }
1591
- )
1628
+ " ",
1629
+ stage.name
1630
+ ] }),
1631
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-0.5", children: [
1632
+ onAddLead && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Tooltip, { children: [
1633
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1634
+ "button",
1635
+ {
1636
+ className: cn(
1637
+ buttonVariants({ variant: "ghost", size: "icon" }),
1638
+ "size-7 shrink-0"
1639
+ ),
1640
+ onClick: onAddLead,
1641
+ "aria-label": "Add lead",
1642
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react7.Plus, { className: "size-4" })
1643
+ }
1644
+ ) }),
1645
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TooltipContent, { children: "Add lead" })
1646
+ ] }) }),
1647
+ hasMenu && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DropdownMenu, { children: [
1648
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1649
+ DropdownMenuTrigger,
1650
+ {
1651
+ className: cn(
1652
+ buttonVariants({ variant: "ghost", size: "icon" }),
1653
+ "-mr-1 size-7 shrink-0"
1654
+ ),
1655
+ "aria-label": "Column actions",
1656
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react7.MoreVertical, { className: "size-4" })
1657
+ }
1658
+ ),
1659
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DropdownMenuContent, { align: "end", children: [
1660
+ onEditColumn && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DropdownMenuItem, { onClick: onEditColumn, children: "Edit column settings" }),
1661
+ !isDefault && onDeleteColumn && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
1662
+ onEditColumn && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DropdownMenuSeparator, {}),
1663
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1664
+ DropdownMenuItem,
1665
+ {
1666
+ onClick: onDeleteColumn,
1667
+ className: "text-destructive focus:text-destructive",
1668
+ children: "Delete column"
1669
+ }
1670
+ )
1671
+ ] })
1592
1672
  ] })
1593
1673
  ] })
1594
1674
  ] })
1595
1675
  ] }),
1596
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
1597
- stage.growth != null ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1676
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
1677
+ stage.growth != null ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1598
1678
  Badge,
1599
1679
  {
1600
1680
  variant: "outline",
@@ -1604,11 +1684,11 @@ function KanbanColumn({
1604
1684
  stage.growth
1605
1685
  ]
1606
1686
  }
1607
- ) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", {}),
1608
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xs font-medium tabular-nums text-muted-foreground", children: formatTotalValue(stage.totalValue) })
1687
+ ) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {}),
1688
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-sm font-bold tabular-nums text-foreground", children: formatCurrency(stage.totalValue) })
1609
1689
  ] })
1610
1690
  ] }),
1611
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1691
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1612
1692
  "div",
1613
1693
  {
1614
1694
  className: cn(
@@ -1619,13 +1699,13 @@ function KanbanColumn({
1619
1699
  onDragLeave: handleDragLeave,
1620
1700
  onDrop: handleDrop,
1621
1701
  children: [
1622
- (isDropTarget || isDragOver) && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "border border-dashed border-primary/40 bg-primary/5 px-3 py-2 text-center text-xs text-primary", children: [
1702
+ (isDropTarget || isDragOver) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "border border-dashed border-primary/40 bg-primary/5 px-3 py-2 text-center text-xs text-primary", children: [
1623
1703
  "Drop here \u2192 ",
1624
1704
  stage.name
1625
1705
  ] }),
1626
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex flex-1 items-center justify-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Spinner, { className: "size-5 text-muted-foreground" }) }) : opportunities.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex flex-1 items-center justify-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-xs text-muted-foreground", children: "No opportunities in this stage" }) }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
1706
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-1 items-center justify-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Spinner, { className: "size-5 text-muted-foreground" }) }) : opportunities.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-1 items-center justify-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-xs text-muted-foreground", children: "No opportunities in this stage" }) }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
1627
1707
  opportunities.map(
1628
- (opp) => onSendLoanApplication ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1708
+ (opp) => onSendLoanApplication ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1629
1709
  LeadCard,
1630
1710
  {
1631
1711
  id: opp.id,
@@ -1638,7 +1718,7 @@ function KanbanColumn({
1638
1718
  isSubmitting: submittingOpportunityId === opp.id
1639
1719
  },
1640
1720
  opp.id
1641
- ) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1721
+ ) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1642
1722
  OpportunityCard,
1643
1723
  __spreadProps(__spreadValues({}, opp), {
1644
1724
  draggable: !!onCardDrop,
@@ -1659,12 +1739,12 @@ function KanbanColumn({
1659
1739
  opp.id
1660
1740
  )
1661
1741
  ),
1662
- hasMore && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1742
+ hasMore && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1663
1743
  "div",
1664
1744
  {
1665
1745
  ref: loaderRef,
1666
1746
  className: "flex min-h-[50px] items-center justify-center",
1667
- children: isLoadingMore && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Spinner, { className: "size-5 text-muted-foreground" })
1747
+ children: isLoadingMore && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Spinner, { className: "size-5 text-muted-foreground" })
1668
1748
  }
1669
1749
  )
1670
1750
  ] })
@@ -1677,7 +1757,7 @@ function KanbanColumn({
1677
1757
  }
1678
1758
 
1679
1759
  // src/components/ui/pipeline-board.tsx
1680
- var import_jsx_runtime17 = require("react/jsx-runtime");
1760
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1681
1761
  function Toolbar({
1682
1762
  searchValue,
1683
1763
  onSearchChange,
@@ -1686,10 +1766,10 @@ function Toolbar({
1686
1766
  onFilterChange,
1687
1767
  onRefresh
1688
1768
  }) {
1689
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-wrap items-center gap-3 border-b border-border bg-background px-4 py-3", children: [
1690
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "relative w-56 shrink-0", children: [
1691
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react8.Search, { className: "absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" }),
1692
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1769
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-wrap items-center gap-3 border-b border-border bg-background px-4 py-3", children: [
1770
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "relative w-56 shrink-0", children: [
1771
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react8.Search, { className: "absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" }),
1772
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1693
1773
  Input,
1694
1774
  {
1695
1775
  placeholder: "Search opportunities\u2026",
@@ -1698,7 +1778,7 @@ function Toolbar({
1698
1778
  className: "h-8 pl-8 text-sm"
1699
1779
  }
1700
1780
  ),
1701
- searchValue && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1781
+ searchValue && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1702
1782
  Button,
1703
1783
  {
1704
1784
  type: "button",
@@ -1707,11 +1787,11 @@ function Toolbar({
1707
1787
  onClick: () => onSearchChange(""),
1708
1788
  className: "absolute right-2 top-1/2 size-6 -translate-y-1/2 text-muted-foreground hover:text-foreground",
1709
1789
  "aria-label": "Clear search",
1710
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react8.X, { className: "size-3.5" })
1790
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react8.X, { className: "size-3.5" })
1711
1791
  }
1712
1792
  )
1713
1793
  ] }),
1714
- filterOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1794
+ filterOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1715
1795
  ToggleGroup,
1716
1796
  {
1717
1797
  type: "multiple",
@@ -1724,10 +1804,10 @@ function Toolbar({
1724
1804
  const toggled = (_a = newValues.find((v) => !activeFilters.includes(v))) != null ? _a : activeFilters.find((v) => !newValues.includes(v));
1725
1805
  if (toggled) onFilterChange(toggled);
1726
1806
  },
1727
- children: filterOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToggleGroupItem, { value: option, children: option }, option))
1807
+ children: filterOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToggleGroupItem, { value: option, children: option }, option))
1728
1808
  }
1729
1809
  ),
1730
- onRefresh && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1810
+ onRefresh && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1731
1811
  Button,
1732
1812
  {
1733
1813
  type: "button",
@@ -1736,7 +1816,7 @@ function Toolbar({
1736
1816
  onClick: onRefresh,
1737
1817
  className: "ml-auto text-muted-foreground hover:text-foreground",
1738
1818
  "aria-label": "Refresh board",
1739
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react8.RefreshCw, { className: "size-4" })
1819
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react8.RefreshCw, { className: "size-4" })
1740
1820
  }
1741
1821
  )
1742
1822
  ] });
@@ -1764,13 +1844,44 @@ function PipelineBoard({
1764
1844
  className
1765
1845
  }) {
1766
1846
  const hasToolbar = onSearchChange || filterOptions.length > 0 && onFilterChange;
1767
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1847
+ const pinnedCols = columns.filter((c) => c.isPinned);
1848
+ const scrollableCols = columns.filter((c) => !c.isPinned);
1849
+ const renderColumn = (col) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1850
+ KanbanColumn,
1851
+ {
1852
+ stage: col.stage,
1853
+ opportunities: col.opportunities,
1854
+ isDragging: col.isDragging,
1855
+ isDropTarget: col.isDropTarget,
1856
+ isDefault: col.isDefault,
1857
+ isLoading: col.isLoading,
1858
+ isLoadingMore: col.isLoadingMore,
1859
+ hasMore: col.hasMore,
1860
+ loaderRef: col.loaderRef,
1861
+ onEditColumn: !col.isPinned && onEditColumn ? () => onEditColumn(col.stage.id) : void 0,
1862
+ onDeleteColumn: onDeleteColumn && !col.isDefault && !col.isPinned ? () => onDeleteColumn(col.stage.id) : void 0,
1863
+ onCardDrop: onMoveCard ? (cardId) => onMoveCard(cardId, col.key) : void 0,
1864
+ onCardClick,
1865
+ onTaskToggle,
1866
+ onMarkAsDone,
1867
+ onMoveToNextStage,
1868
+ onSendLoanApplication: col.onSendLoanApplication,
1869
+ onViewDetails,
1870
+ onChangePriority,
1871
+ onPutOnHold,
1872
+ onDeleteOpportunity,
1873
+ onAddLead: col.onAddLead,
1874
+ submittingOpportunityId
1875
+ },
1876
+ col.key
1877
+ );
1878
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1768
1879
  "div",
1769
1880
  {
1770
1881
  className: cn("flex h-full flex-col bg-muted/20", className),
1771
1882
  "data-slot": "pipeline-board",
1772
1883
  children: [
1773
- hasToolbar && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1884
+ hasToolbar && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1774
1885
  Toolbar,
1775
1886
  {
1776
1887
  searchValue,
@@ -1783,36 +1894,12 @@ function PipelineBoard({
1783
1894
  onRefresh
1784
1895
  }
1785
1896
  ),
1786
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-1 gap-3 overflow-x-auto p-4", children: [
1787
- columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1788
- KanbanColumn,
1789
- {
1790
- stage: col.stage,
1791
- opportunities: col.opportunities,
1792
- isDragging: col.isDragging,
1793
- isDropTarget: col.isDropTarget,
1794
- isDefault: col.isDefault,
1795
- isLoading: col.isLoading,
1796
- isLoadingMore: col.isLoadingMore,
1797
- hasMore: col.hasMore,
1798
- loaderRef: col.loaderRef,
1799
- onEditColumn: onEditColumn ? () => onEditColumn(col.stage.id) : void 0,
1800
- onDeleteColumn: onDeleteColumn && !col.isDefault ? () => onDeleteColumn(col.stage.id) : void 0,
1801
- onCardDrop: onMoveCard ? (cardId) => onMoveCard(cardId, col.key) : void 0,
1802
- onCardClick,
1803
- onTaskToggle,
1804
- onMarkAsDone,
1805
- onMoveToNextStage,
1806
- onSendLoanApplication: col.onSendLoanApplication,
1807
- onViewDetails,
1808
- onChangePriority,
1809
- onPutOnHold,
1810
- onDeleteOpportunity,
1811
- submittingOpportunityId
1812
- },
1813
- col.key
1814
- )),
1815
- columns.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-sm text-muted-foreground", children: "No columns to display." }) })
1897
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-1 overflow-hidden", children: [
1898
+ pinnedCols.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex shrink-0 gap-3 border-r border-border p-4", children: pinnedCols.map(renderColumn) }),
1899
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-1 gap-3 overflow-x-auto p-4", children: [
1900
+ scrollableCols.map(renderColumn),
1901
+ columns.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-sm text-muted-foreground", children: "No columns to display." }) })
1902
+ ] })
1816
1903
  ] })
1817
1904
  ]
1818
1905
  }
@@ -1,13 +1,14 @@
1
1
  import {
2
2
  PipelineBoard
3
- } from "../../chunk-ZA44WICP.mjs";
4
- import "../../chunk-AKWN5ZQG.mjs";
3
+ } from "../../chunk-FGHM34AV.mjs";
4
+ import "../../chunk-A43XIVO6.mjs";
5
5
  import "../../chunk-YV7XF32X.mjs";
6
6
  import "../../chunk-EXI64H46.mjs";
7
7
  import "../../chunk-JPGL36WQ.mjs";
8
8
  import "../../chunk-IKXYTCSB.mjs";
9
9
  import "../../chunk-JVMXMFBB.mjs";
10
10
  import "../../chunk-PNSYFE3K.mjs";
11
+ import "../../chunk-3S6KVFF5.mjs";
11
12
  import "../../chunk-H5DTKPJ2.mjs";
12
13
  import "../../chunk-2GIYVERS.mjs";
13
14
  import "../../chunk-X6RC5UWB.mjs";
package/dist/index.js CHANGED
@@ -19393,9 +19393,6 @@ function LeadCard({
19393
19393
 
19394
19394
  // src/components/ui/kanban-column.tsx
19395
19395
  var import_jsx_runtime96 = require("react/jsx-runtime");
19396
- function formatTotalValue(value) {
19397
- return formatCurrency(value);
19398
- }
19399
19396
  function growthColor(growth) {
19400
19397
  return growth > 0 ? "var(--color-success-text)" : "var(--color-destructive-text)";
19401
19398
  }
@@ -19411,6 +19408,7 @@ function KanbanColumn({
19411
19408
  loaderRef,
19412
19409
  onEditColumn,
19413
19410
  onDeleteColumn,
19411
+ onAddLead,
19414
19412
  onTaskToggle,
19415
19413
  onMarkAsDone,
19416
19414
  onMoveToNextStage,
@@ -19464,34 +19462,58 @@ function KanbanColumn({
19464
19462
  /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex flex-col gap-2 border-b border-border bg-background px-3 py-3", children: [
19465
19463
  /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
19466
19464
  /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("h2", { className: "text-sm font-semibold text-foreground", children: [
19467
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "text-muted-foreground", children: stage.count }),
19468
- " ",
19469
- stage.name
19470
- ] }),
19471
- hasMenu && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(DropdownMenu, { children: [
19472
19465
  /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
19473
- DropdownMenuTrigger,
19466
+ "span",
19474
19467
  {
19475
- className: cn(
19476
- buttonVariants({ variant: "ghost", size: "icon" }),
19477
- "-mr-1 size-7 shrink-0"
19478
- ),
19479
- "aria-label": "Column actions",
19480
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.MoreVertical, { className: "size-4" })
19468
+ className: cn(!stage.countColor && "text-muted-foreground"),
19469
+ style: stage.countColor ? { color: stage.countColor } : void 0,
19470
+ children: stage.count
19481
19471
  }
19482
19472
  ),
19483
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(DropdownMenuContent, { align: "end", children: [
19484
- onEditColumn && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(DropdownMenuItem, { onClick: onEditColumn, children: "Edit column settings" }),
19485
- !isDefault && onDeleteColumn && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
19486
- onEditColumn && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(DropdownMenuSeparator, {}),
19487
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
19488
- DropdownMenuItem,
19489
- {
19490
- onClick: onDeleteColumn,
19491
- className: "text-destructive focus:text-destructive",
19492
- children: "Delete column"
19493
- }
19494
- )
19473
+ " ",
19474
+ stage.name
19475
+ ] }),
19476
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex items-center gap-0.5", children: [
19477
+ onAddLead && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(Tooltip, { children: [
19478
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
19479
+ "button",
19480
+ {
19481
+ className: cn(
19482
+ buttonVariants({ variant: "ghost", size: "icon" }),
19483
+ "size-7 shrink-0"
19484
+ ),
19485
+ onClick: onAddLead,
19486
+ "aria-label": "Add lead",
19487
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.Plus, { className: "size-4" })
19488
+ }
19489
+ ) }),
19490
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TooltipContent, { children: "Add lead" })
19491
+ ] }) }),
19492
+ hasMenu && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(DropdownMenu, { children: [
19493
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
19494
+ DropdownMenuTrigger,
19495
+ {
19496
+ className: cn(
19497
+ buttonVariants({ variant: "ghost", size: "icon" }),
19498
+ "-mr-1 size-7 shrink-0"
19499
+ ),
19500
+ "aria-label": "Column actions",
19501
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.MoreVertical, { className: "size-4" })
19502
+ }
19503
+ ),
19504
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(DropdownMenuContent, { align: "end", children: [
19505
+ onEditColumn && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(DropdownMenuItem, { onClick: onEditColumn, children: "Edit column settings" }),
19506
+ !isDefault && onDeleteColumn && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
19507
+ onEditColumn && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(DropdownMenuSeparator, {}),
19508
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
19509
+ DropdownMenuItem,
19510
+ {
19511
+ onClick: onDeleteColumn,
19512
+ className: "text-destructive focus:text-destructive",
19513
+ children: "Delete column"
19514
+ }
19515
+ )
19516
+ ] })
19495
19517
  ] })
19496
19518
  ] })
19497
19519
  ] })
@@ -19508,7 +19530,7 @@ function KanbanColumn({
19508
19530
  ]
19509
19531
  }
19510
19532
  ) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", {}),
19511
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "text-xs font-medium tabular-nums text-muted-foreground", children: formatTotalValue(stage.totalValue) })
19533
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "text-sm font-bold tabular-nums text-foreground", children: formatCurrency(stage.totalValue) })
19512
19534
  ] })
19513
19535
  ] }),
19514
19536
  /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
@@ -23193,6 +23215,37 @@ function PipelineBoard({
23193
23215
  className
23194
23216
  }) {
23195
23217
  const hasToolbar = onSearchChange || filterOptions.length > 0 && onFilterChange;
23218
+ const pinnedCols = columns.filter((c) => c.isPinned);
23219
+ const scrollableCols = columns.filter((c) => !c.isPinned);
23220
+ const renderColumn = (col) => /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
23221
+ KanbanColumn,
23222
+ {
23223
+ stage: col.stage,
23224
+ opportunities: col.opportunities,
23225
+ isDragging: col.isDragging,
23226
+ isDropTarget: col.isDropTarget,
23227
+ isDefault: col.isDefault,
23228
+ isLoading: col.isLoading,
23229
+ isLoadingMore: col.isLoadingMore,
23230
+ hasMore: col.hasMore,
23231
+ loaderRef: col.loaderRef,
23232
+ onEditColumn: !col.isPinned && onEditColumn ? () => onEditColumn(col.stage.id) : void 0,
23233
+ onDeleteColumn: onDeleteColumn && !col.isDefault && !col.isPinned ? () => onDeleteColumn(col.stage.id) : void 0,
23234
+ onCardDrop: onMoveCard ? (cardId) => onMoveCard(cardId, col.key) : void 0,
23235
+ onCardClick,
23236
+ onTaskToggle,
23237
+ onMarkAsDone,
23238
+ onMoveToNextStage,
23239
+ onSendLoanApplication: col.onSendLoanApplication,
23240
+ onViewDetails,
23241
+ onChangePriority,
23242
+ onPutOnHold,
23243
+ onDeleteOpportunity,
23244
+ onAddLead: col.onAddLead,
23245
+ submittingOpportunityId
23246
+ },
23247
+ col.key
23248
+ );
23196
23249
  return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
23197
23250
  "div",
23198
23251
  {
@@ -23212,36 +23265,12 @@ function PipelineBoard({
23212
23265
  onRefresh
23213
23266
  }
23214
23267
  ),
23215
- /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex flex-1 gap-3 overflow-x-auto p-4", children: [
23216
- columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
23217
- KanbanColumn,
23218
- {
23219
- stage: col.stage,
23220
- opportunities: col.opportunities,
23221
- isDragging: col.isDragging,
23222
- isDropTarget: col.isDropTarget,
23223
- isDefault: col.isDefault,
23224
- isLoading: col.isLoading,
23225
- isLoadingMore: col.isLoadingMore,
23226
- hasMore: col.hasMore,
23227
- loaderRef: col.loaderRef,
23228
- onEditColumn: onEditColumn ? () => onEditColumn(col.stage.id) : void 0,
23229
- onDeleteColumn: onDeleteColumn && !col.isDefault ? () => onDeleteColumn(col.stage.id) : void 0,
23230
- onCardDrop: onMoveCard ? (cardId) => onMoveCard(cardId, col.key) : void 0,
23231
- onCardClick,
23232
- onTaskToggle,
23233
- onMarkAsDone,
23234
- onMoveToNextStage,
23235
- onSendLoanApplication: col.onSendLoanApplication,
23236
- onViewDetails,
23237
- onChangePriority,
23238
- onPutOnHold,
23239
- onDeleteOpportunity,
23240
- submittingOpportunityId
23241
- },
23242
- col.key
23243
- )),
23244
- columns.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("p", { className: "text-sm text-muted-foreground", children: "No columns to display." }) })
23268
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex flex-1 overflow-hidden", children: [
23269
+ pinnedCols.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "flex shrink-0 gap-3 border-r border-border p-4", children: pinnedCols.map(renderColumn) }),
23270
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex flex-1 gap-3 overflow-x-auto p-4", children: [
23271
+ scrollableCols.map(renderColumn),
23272
+ columns.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("p", { className: "text-sm text-muted-foreground", children: "No columns to display." }) })
23273
+ ] })
23245
23274
  ] })
23246
23275
  ]
23247
23276
  }
package/dist/index.mjs CHANGED
@@ -71,7 +71,7 @@ import {
71
71
  } from "./chunk-KFH36NKF.mjs";
72
72
  import {
73
73
  PipelineBoard
74
- } from "./chunk-ZA44WICP.mjs";
74
+ } from "./chunk-FGHM34AV.mjs";
75
75
  import {
76
76
  PipelineChart
77
77
  } from "./chunk-PCULNQWA.mjs";
@@ -117,7 +117,7 @@ import {
117
117
  } from "./chunk-PUJ42INK.mjs";
118
118
  import {
119
119
  KanbanColumn
120
- } from "./chunk-AKWN5ZQG.mjs";
120
+ } from "./chunk-A43XIVO6.mjs";
121
121
  import {
122
122
  LeadCard,
123
123
  OpportunityCard
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wealthx/shadcn",
3
- "version": "1.5.15",
3
+ "version": "1.5.16",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./src/index.ts",