@wealthx/shadcn 1.5.42 → 1.5.43

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.
Files changed (207) hide show
  1. package/.turbo/turbo-build.log +215 -210
  2. package/CHANGELOG.md +6 -0
  3. package/dist/{chunk-5FHBC6DY.mjs → chunk-33WZ5NCW.mjs} +1 -1
  4. package/dist/{chunk-C35JMOII.mjs → chunk-3G6JUYRE.mjs} +4 -4
  5. package/dist/{chunk-LBXIYS34.mjs → chunk-4PVCJ3JD.mjs} +1 -1
  6. package/dist/{chunk-EHQL64B7.mjs → chunk-4SUXTO2Z.mjs} +4 -4
  7. package/dist/{chunk-BAONSY54.mjs → chunk-5RYH7SOQ.mjs} +1 -1
  8. package/dist/{chunk-3C4DZTGA.mjs → chunk-5XD7A7YC.mjs} +1 -1
  9. package/dist/{chunk-5DAQU3B6.mjs → chunk-66JXT7NY.mjs} +1 -1
  10. package/dist/{chunk-NGKTJRFN.mjs → chunk-6DO4EGT2.mjs} +2 -2
  11. package/dist/{chunk-C7ZTZTEW.mjs → chunk-6XJWL2E5.mjs} +1 -1
  12. package/dist/{chunk-FQUT5XD6.mjs → chunk-A4UP4QFB.mjs} +1 -1
  13. package/dist/{chunk-USIRKDYQ.mjs → chunk-BFCX7ADE.mjs} +1 -1
  14. package/dist/{chunk-XGRSPFFC.mjs → chunk-CQHKU24Z.mjs} +1 -1
  15. package/dist/{chunk-HONTZFLO.mjs → chunk-DP4ER6TJ.mjs} +1 -1
  16. package/dist/{chunk-VLVEZHFE.mjs → chunk-EFSLAMHI.mjs} +4 -4
  17. package/dist/{chunk-FYZBGWYR.mjs → chunk-FVSOFXJQ.mjs} +1 -1
  18. package/dist/{chunk-JUMEIPII.mjs → chunk-G2MOZZPE.mjs} +8 -8
  19. package/dist/{chunk-D3HKFRQO.mjs → chunk-GQWKBESP.mjs} +8 -5
  20. package/dist/{chunk-MD66TGX7.mjs → chunk-GXDKWCMV.mjs} +1 -1
  21. package/dist/{chunk-77L3UPBW.mjs → chunk-H7NOUDU3.mjs} +5 -5
  22. package/dist/{chunk-4LLTZ45R.mjs → chunk-HOXTEU5K.mjs} +8 -7
  23. package/dist/{chunk-ZA37ZWZW.mjs → chunk-IXW77PMI.mjs} +7 -7
  24. package/dist/{chunk-XHZONBL4.mjs → chunk-JLEQU5BO.mjs} +1 -1
  25. package/dist/{chunk-6UKOJLXO.mjs → chunk-JSFWRD7K.mjs} +4 -4
  26. package/dist/{chunk-7PTRHNUV.mjs → chunk-JY3FUGNL.mjs} +1 -1
  27. package/dist/{chunk-3ZU5BH6X.mjs → chunk-KEOAPKJO.mjs} +3 -3
  28. package/dist/{chunk-4QTHK7ML.mjs → chunk-KWYFJQV6.mjs} +1 -1
  29. package/dist/{chunk-FGMDBJCF.mjs → chunk-LDPCSE7J.mjs} +4 -4
  30. package/dist/chunk-LFWNKXZU.mjs +109 -0
  31. package/dist/{chunk-IRZWYTGV.mjs → chunk-M32YSAWL.mjs} +8 -7
  32. package/dist/{chunk-LLAGF6BA.mjs → chunk-MUB2G36A.mjs} +1 -1
  33. package/dist/{chunk-DQNNP6I4.mjs → chunk-NIETQFJQ.mjs} +1 -1
  34. package/dist/{chunk-RUX3OLVZ.mjs → chunk-OTFG57ZF.mjs} +1 -1
  35. package/dist/{chunk-OKIWXOJL.mjs → chunk-OWTW5WAJ.mjs} +1 -1
  36. package/dist/{chunk-WWIWRNBK.mjs → chunk-P7NSCTAW.mjs} +1 -1
  37. package/dist/{chunk-BZWQU52U.mjs → chunk-QZREZL2F.mjs} +1 -1
  38. package/dist/{chunk-E432NK23.mjs → chunk-RBQ4BZUV.mjs} +6 -6
  39. package/dist/{chunk-I2EKKSEF.mjs → chunk-RKBLVNDC.mjs} +4 -7
  40. package/dist/{chunk-LHQACMZY.mjs → chunk-SPPQFW32.mjs} +106 -50
  41. package/dist/{chunk-OSSS56CB.mjs → chunk-SUXJWKRI.mjs} +4 -4
  42. package/dist/{chunk-SCGCGVDN.mjs → chunk-SZXIPE5J.mjs} +1 -1
  43. package/dist/{chunk-VVURVETY.mjs → chunk-TOQRA2TD.mjs} +1 -1
  44. package/dist/{chunk-GYWOD2YI.mjs → chunk-TZSDYQFH.mjs} +4 -4
  45. package/dist/{chunk-S7SBLNX4.mjs → chunk-UB3WG6I4.mjs} +1 -1
  46. package/dist/{chunk-PGJRZHN7.mjs → chunk-UVZ3JWFG.mjs} +1 -1
  47. package/dist/{chunk-UD5UF5OC.mjs → chunk-W7OPFKTZ.mjs} +4 -4
  48. package/dist/{chunk-YEWNFK5S.mjs → chunk-WLXP4OOF.mjs} +5 -5
  49. package/dist/{chunk-ORMC3TV3.mjs → chunk-XYXYTTNW.mjs} +1 -1
  50. package/dist/{chunk-CZOGJC76.mjs → chunk-YACFZWRR.mjs} +7 -7
  51. package/dist/{chunk-UTCW5YUX.mjs → chunk-YPATB6YQ.mjs} +9 -9
  52. package/dist/{chunk-BZGFW6L7.mjs → chunk-YWJAIPUA.mjs} +1 -1
  53. package/dist/{chunk-MHBQJVHE.mjs → chunk-Z65BGSHI.mjs} +5 -5
  54. package/dist/{chunk-PCULNQWA.mjs → chunk-ZGSFRUVI.mjs} +3 -3
  55. package/dist/{chunk-7NQKFPXE.mjs → chunk-ZRYG6ICN.mjs} +1 -1
  56. package/dist/{chunk-ZFKAYRFQ.mjs → chunk-ZUHFYW65.mjs} +1 -1
  57. package/dist/components/ui/about-you-form.mjs +2 -2
  58. package/dist/components/ui/account-list-carousel.mjs +2 -2
  59. package/dist/components/ui/add-column-modal.mjs +4 -4
  60. package/dist/components/ui/add-lead-modal.mjs +4 -4
  61. package/dist/components/ui/advisor-card.mjs +2 -2
  62. package/dist/components/ui/ai-assistant-drawer.mjs +2 -2
  63. package/dist/components/ui/ai-builder/index.mjs +4 -4
  64. package/dist/components/ui/ai-conversations/index.mjs +4 -4
  65. package/dist/components/ui/alert-dialog.mjs +3 -3
  66. package/dist/components/ui/applicant-expenses-section.mjs +1 -1
  67. package/dist/components/ui/appointment-action-dialogs.mjs +5 -5
  68. package/dist/components/ui/appointment-availability-settings.mjs +4 -4
  69. package/dist/components/ui/appointment-book-dialog.mjs +4 -4
  70. package/dist/components/ui/appointment-detail-sheet.mjs +6 -6
  71. package/dist/components/ui/appointment-upcoming-card.mjs +4 -4
  72. package/dist/components/ui/asset-accordion.mjs +7 -7
  73. package/dist/components/ui/assets-liabilities-side-card.js +19 -66
  74. package/dist/components/ui/assets-liabilities-side-card.mjs +22 -69
  75. package/dist/components/ui/backoffice-alert-history-chart.js +1 -1
  76. package/dist/components/ui/backoffice-alert-history-chart.mjs +5 -5
  77. package/dist/components/ui/backoffice-alert-matching-chart.js +1 -1
  78. package/dist/components/ui/backoffice-alert-matching-chart.mjs +5 -5
  79. package/dist/components/ui/backoffice-alerts-chart.js +1 -1
  80. package/dist/components/ui/backoffice-alerts-chart.mjs +5 -5
  81. package/dist/components/ui/backoffice-connections-chart.js +1 -1
  82. package/dist/components/ui/backoffice-connections-chart.mjs +5 -5
  83. package/dist/components/ui/backoffice-contact-history-chart.js +1 -1
  84. package/dist/components/ui/backoffice-contact-history-chart.mjs +5 -5
  85. package/dist/components/ui/backoffice-contact-matching-chart.js +1 -1
  86. package/dist/components/ui/backoffice-contact-matching-chart.mjs +5 -5
  87. package/dist/components/ui/backoffice-signup-steps.mjs +4 -4
  88. package/dist/components/ui/bank-statement-generate-dialog.mjs +4 -4
  89. package/dist/components/ui/bank-statement-pdf-viewer.mjs +4 -4
  90. package/dist/components/ui/borrowing-capacity-atoms.js +3 -6
  91. package/dist/components/ui/borrowing-capacity-atoms.mjs +2 -2
  92. package/dist/components/ui/borrowing-capacity-card.js +5 -5
  93. package/dist/components/ui/borrowing-capacity-card.mjs +6 -6
  94. package/dist/components/ui/borrowing-capacity-line-chart.js +5 -5
  95. package/dist/components/ui/borrowing-capacity-line-chart.mjs +5 -5
  96. package/dist/components/ui/calculator-section.mjs +4 -4
  97. package/dist/components/ui/cash-balance-line-chart.js +102 -46
  98. package/dist/components/ui/cash-balance-line-chart.mjs +5 -5
  99. package/dist/components/ui/cashflow-bar-chart.js +7 -4
  100. package/dist/components/ui/cashflow-bar-chart.mjs +5 -5
  101. package/dist/components/ui/category-edit-dialog.mjs +4 -4
  102. package/dist/components/ui/color-picker.mjs +2 -2
  103. package/dist/components/ui/contact-alert-dialog/index.mjs +4 -4
  104. package/dist/components/ui/create-contact-modal.mjs +4 -4
  105. package/dist/components/ui/csv-import-modal.mjs +4 -4
  106. package/dist/components/ui/dashboard-expense-categories.js +96 -63
  107. package/dist/components/ui/dashboard-expense-categories.mjs +101 -66
  108. package/dist/components/ui/dashboard-transactions-table.js +37 -44
  109. package/dist/components/ui/dashboard-transactions-table.mjs +45 -52
  110. package/dist/components/ui/data-table.mjs +2 -2
  111. package/dist/components/ui/date-picker.mjs +2 -2
  112. package/dist/components/ui/debt-accordion.mjs +7 -7
  113. package/dist/components/ui/delete-contact-component.mjs +4 -4
  114. package/dist/components/ui/dialog.mjs +3 -3
  115. package/dist/components/ui/document-checklist-template.mjs +2 -2
  116. package/dist/components/ui/expense-bar-chart.js +8 -7
  117. package/dist/components/ui/expense-bar-chart.mjs +5 -5
  118. package/dist/components/ui/expense-categories-bar.js +261 -0
  119. package/dist/components/ui/expense-categories-bar.mjs +12 -0
  120. package/dist/components/ui/expense-work-details.js +8 -7
  121. package/dist/components/ui/expense-work-details.mjs +7 -7
  122. package/dist/components/ui/file-preview-dialog.mjs +4 -4
  123. package/dist/components/ui/financial-cards.mjs +2 -2
  124. package/dist/components/ui/financial-drawers.mjs +2 -2
  125. package/dist/components/ui/financial-sections.mjs +3 -3
  126. package/dist/components/ui/frontend-signup-steps.mjs +2 -2
  127. package/dist/components/ui/income-bar-chart.js +8 -7
  128. package/dist/components/ui/income-bar-chart.mjs +5 -5
  129. package/dist/components/ui/income-sources-card.mjs +1 -1
  130. package/dist/components/ui/income-summary-component.mjs +1 -1
  131. package/dist/components/ui/income-work-details.js +8 -7
  132. package/dist/components/ui/income-work-details.mjs +6 -6
  133. package/dist/components/ui/incoming-outgoings-card.js +2 -2
  134. package/dist/components/ui/incoming-outgoings-card.mjs +3 -3
  135. package/dist/components/ui/interest-rate-section.mjs +1 -1
  136. package/dist/components/ui/kanban-column.mjs +5 -5
  137. package/dist/components/ui/loan-application-cards.mjs +3 -3
  138. package/dist/components/ui/loan-financials.mjs +3 -3
  139. package/dist/components/ui/money-input-with-slider.mjs +2 -2
  140. package/dist/components/ui/opportunity-card.mjs +4 -4
  141. package/dist/components/ui/opportunity-edit-modals.mjs +4 -4
  142. package/dist/components/ui/opportunity-summary-tab.mjs +8 -8
  143. package/dist/components/ui/pagination.mjs +2 -2
  144. package/dist/components/ui/pipeline-board.mjs +6 -6
  145. package/dist/components/ui/pipeline-chart.mjs +2 -2
  146. package/dist/components/ui/pipeline-dialogs.mjs +4 -4
  147. package/dist/components/ui/policy-ai/index.mjs +2 -2
  148. package/dist/components/ui/property-asset-card.mjs +4 -4
  149. package/dist/components/ui/property-cashflow-doughnut-chart.js +3 -3
  150. package/dist/components/ui/property-cashflow-doughnut-chart.mjs +5 -5
  151. package/dist/components/ui/property-debt-equity-doughnut-chart.js +3 -3
  152. package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +5 -5
  153. package/dist/components/ui/property-list-carousel.mjs +2 -2
  154. package/dist/components/ui/property-mobile-estimate-line-chart.js +4 -4
  155. package/dist/components/ui/property-mobile-estimate-line-chart.mjs +5 -5
  156. package/dist/components/ui/property-report-dialog.mjs +5 -5
  157. package/dist/components/ui/resource-center/index.mjs +4 -4
  158. package/dist/components/ui/review-alerts-dialog.mjs +4 -4
  159. package/dist/components/ui/savings-goal-modal.mjs +7 -7
  160. package/dist/components/ui/scenario-drawer.mjs +4 -4
  161. package/dist/components/ui/scenario-list.js +4 -7
  162. package/dist/components/ui/scenario-list.mjs +5 -5
  163. package/dist/components/ui/share-details-dialog.mjs +4 -4
  164. package/dist/components/ui/sidebar-nav.mjs +4 -4
  165. package/dist/components/ui/signup-form-primitives.mjs +2 -2
  166. package/dist/components/ui/stage-timeline.mjs +1 -1
  167. package/dist/components/ui/support-agent/index.mjs +2 -2
  168. package/dist/components/ui/top-three-product.mjs +1 -1
  169. package/dist/components/ui/transactions-expense-categories-doughnut-chart.js +3 -3
  170. package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +5 -5
  171. package/dist/components/ui/transactions-income-expense-bar-chart.mjs +5 -5
  172. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.js +4 -4
  173. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +5 -5
  174. package/dist/components/ui/transactions-summary-block.js +13 -0
  175. package/dist/components/ui/transactions-summary-block.mjs +13 -0
  176. package/dist/index.js +2092 -1935
  177. package/dist/index.mjs +138 -134
  178. package/dist/lib/format-currency.js +54 -0
  179. package/dist/lib/format-currency.mjs +9 -0
  180. package/dist/styles.css +1 -1
  181. package/package.json +6 -1
  182. package/src/component-descriptions/assets-liabilities-side-card.md +19 -0
  183. package/src/component-descriptions/pipeline-chart.md +17 -0
  184. package/src/components/index.tsx +6 -0
  185. package/src/components/ui/assets-liabilities-side-card.tsx +43 -83
  186. package/src/components/ui/borrowing-capacity-atoms.tsx +4 -7
  187. package/src/components/ui/borrowing-capacity-line-chart.tsx +4 -4
  188. package/src/components/ui/cash-balance-line-chart.tsx +123 -42
  189. package/src/components/ui/cashflow-bar-chart.tsx +7 -4
  190. package/src/components/ui/chart-shared.tsx +4 -4
  191. package/src/components/ui/dashboard-expense-categories.tsx +136 -60
  192. package/src/components/ui/dashboard-transactions-table.tsx +42 -28
  193. package/src/components/ui/expense-bar-chart.tsx +32 -19
  194. package/src/components/ui/expense-categories-bar.tsx +178 -0
  195. package/src/components/ui/income-bar-chart.tsx +32 -19
  196. package/src/components/ui/incoming-outgoings-card.tsx +2 -2
  197. package/src/components/ui/property-mobile-estimate-line-chart.tsx +4 -4
  198. package/src/components/ui/scenario-list.tsx +2 -2
  199. package/src/components/ui/transactions-liabilities-breakdown-doughnut-chart.tsx +7 -5
  200. package/src/components/ui/transactions-summary-block.tsx +39 -6
  201. package/src/styles/styles-css.ts +1 -1
  202. package/tsup.config.ts +2 -0
  203. package/dist/{chunk-CEYEK3TI.mjs → chunk-B4R62ID3.mjs} +3 -3
  204. package/dist/{chunk-7LN5OGC2.mjs → chunk-E3VAK4EB.mjs} +3 -3
  205. package/dist/{chunk-EY36WDCF.mjs → chunk-EEZFXE3P.mjs} +3 -3
  206. package/dist/{chunk-T5FRVEJQ.mjs → chunk-JTMN36BK.mjs} +3 -3
  207. /package/dist/{chunk-MN5NYQCL.mjs → chunk-XQDTFNVL.mjs} +0 -0
@@ -319,7 +319,7 @@ function ChartLegendItem({
319
319
  }
320
320
  }
321
321
  ),
322
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-[11px] text-muted-foreground leading-none", children: label })
322
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-sm text-muted-foreground leading-none", children: label })
323
323
  ] });
324
324
  }
325
325
 
@@ -476,7 +476,8 @@ function CashBalanceLineChart({
476
476
  showYAxis = true,
477
477
  showBalanceValue = false,
478
478
  showLegend = false,
479
- legendPosition = "bottom"
479
+ legendPosition = "bottom",
480
+ extraDatasets
480
481
  }) {
481
482
  const themeVars = useThemeVars();
482
483
  const brandPrimary = themeVars["--theme-primary"] || FALLBACK_PRIMARY;
@@ -491,30 +492,48 @@ function CashBalanceLineChart({
491
492
  indices.add(count - 1);
492
493
  return indices;
493
494
  }, [hasData, chartData]);
495
+ const hasExtra = Array.isArray(extraDatasets) && extraDatasets.length > 0;
494
496
  const data = (0, import_react3.useMemo)(() => {
495
497
  if (!hasData) return { labels: [], datasets: [] };
498
+ const mainDs = {
499
+ label: title,
500
+ data: chartData.map((p) => p.y),
501
+ fill: false,
502
+ borderColor: brandPrimary,
503
+ backgroundColor: "transparent",
504
+ borderWidth: 2.5,
505
+ borderDash: [],
506
+ tension: 0.4,
507
+ pointRadius: 0,
508
+ pointHoverRadius: 6,
509
+ pointHoverBackgroundColor: FALLBACK_BG,
510
+ pointHoverBorderColor: brandPrimary,
511
+ pointHoverBorderWidth: 3,
512
+ pointHitRadius: 10,
513
+ yAxisID: "y"
514
+ };
515
+ const extraDs = hasExtra ? extraDatasets.map((ds) => ({
516
+ label: ds.label,
517
+ data: ds.data.map((p) => p.y),
518
+ fill: false,
519
+ borderColor: ds.color,
520
+ backgroundColor: "transparent",
521
+ borderWidth: 1.5,
522
+ borderDash: ds.dashed ? [5, 4] : [],
523
+ tension: 0.4,
524
+ pointRadius: 0,
525
+ pointHoverRadius: 4,
526
+ pointHoverBackgroundColor: FALLBACK_BG,
527
+ pointHoverBorderColor: ds.color,
528
+ pointHoverBorderWidth: 2,
529
+ pointHitRadius: 10,
530
+ yAxisID: "y2"
531
+ })) : [];
496
532
  return {
497
533
  labels: chartData.map((p) => p.x),
498
- // raw ISO — used for tooltip + tick lookup
499
- datasets: [
500
- {
501
- label: title,
502
- data: chartData.map((p) => p.y),
503
- fill: false,
504
- borderColor: brandPrimary,
505
- backgroundColor: "transparent",
506
- borderWidth: 2.5,
507
- tension: 0.4,
508
- pointRadius: 0,
509
- pointHoverRadius: 6,
510
- pointHoverBackgroundColor: FALLBACK_BG,
511
- pointHoverBorderColor: brandPrimary,
512
- pointHoverBorderWidth: 3,
513
- pointHitRadius: 10
514
- }
515
- ]
534
+ datasets: [mainDs, ...extraDs]
516
535
  };
517
- }, [hasData, chartData, brandPrimary, title]);
536
+ }, [hasData, chartData, brandPrimary, title, hasExtra, extraDatasets]);
518
537
  const options = (0, import_react3.useMemo)(
519
538
  () => ({
520
539
  responsive: true,
@@ -526,11 +545,11 @@ function CashBalanceLineChart({
526
545
  enabled: true,
527
546
  mode: "index",
528
547
  intersect: false,
529
- displayColors: false,
548
+ displayColors: hasExtra,
530
549
  padding: 12,
531
550
  cornerRadius: 0,
532
551
  titleFont: { size: 11, weight: "600", family: fontFamily },
533
- bodyFont: { size: 13, weight: "700", family: fontFamily },
552
+ bodyFont: { size: 12, weight: "500", family: fontFamily },
534
553
  callbacks: {
535
554
  title: (items) => {
536
555
  var _a;
@@ -538,7 +557,8 @@ function CashBalanceLineChart({
538
557
  return iso ? formatDateTooltip(iso) : "";
539
558
  },
540
559
  label: (ctx) => {
541
- return formatCurrency(ctx.parsed.y, { decimals: 2 });
560
+ const value = formatCurrency(ctx.parsed.y, { decimals: 2 });
561
+ return hasExtra ? ` ${ctx.dataset.label}: ${value}` : value;
542
562
  }
543
563
  }
544
564
  }
@@ -555,7 +575,7 @@ function CashBalanceLineChart({
555
575
  maxRotation: 0,
556
576
  minRotation: 0,
557
577
  color: FALLBACK_TICK,
558
- font: { size: 10, family: fontFamily },
578
+ font: { size: 12, family: fontFamily },
559
579
  callback: function(_, index) {
560
580
  if (!tickIndices.has(index) || !chartData) return "";
561
581
  return formatDateLabel(chartData[index].x);
@@ -572,13 +592,27 @@ function CashBalanceLineChart({
572
592
  maxTicksLimit: 5,
573
593
  padding: 8,
574
594
  color: FALLBACK_TICK,
575
- font: { size: 10, family: fontFamily },
595
+ font: { size: 12, family: fontFamily },
596
+ callback: (v) => formatCurrencyAbbrev(Number(v))
597
+ }
598
+ },
599
+ y2: {
600
+ display: hasExtra && showYAxis,
601
+ position: "right",
602
+ beginAtZero: true,
603
+ grid: { display: false },
604
+ border: { display: false },
605
+ ticks: {
606
+ maxTicksLimit: 5,
607
+ padding: 8,
608
+ color: FALLBACK_TICK,
609
+ font: { size: 12, family: fontFamily },
576
610
  callback: (v) => formatCurrencyAbbrev(Number(v))
577
611
  }
578
612
  }
579
613
  }
580
614
  }),
581
- [tickIndices, chartData, showXAxis, showYAxis, fontFamily]
615
+ [tickIndices, chartData, showXAxis, showYAxis, fontFamily, hasExtra]
582
616
  );
583
617
  const latestValue = hasData ? chartData[chartData.length - 1].y : null;
584
618
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
@@ -587,9 +621,9 @@ function CashBalanceLineChart({
587
621
  className: cn("w-full py-4 sm:py-6 gap-2", className),
588
622
  style: { maxWidth: width, fontFamily },
589
623
  children: [
590
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardHeader, { className: "px-3 sm:px-6", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-0.5", children: [
591
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardTitle, { className: "text-xs font-semibold uppercase tracking-wide", children: title }),
592
- showBalanceValue && latestValue !== null && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-2xl font-bold tabular-nums leading-tight", children: formatCurrency(latestValue, { decimals: 2 }) })
624
+ (title || showBalanceValue && latestValue !== null) && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardHeader, { className: "px-3 sm:px-6", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-0.5", children: [
625
+ title && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardTitle, { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: title }),
626
+ showBalanceValue && latestValue !== null && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-lg font-bold tabular-nums leading-tight", children: formatCurrency(latestValue, { decimals: 2 }) })
593
627
  ] }) }),
594
628
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardContent, { className: "px-3 sm:px-6", children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
595
629
  "div",
@@ -599,14 +633,25 @@ function CashBalanceLineChart({
599
633
  children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Spinner, { size: "lg" })
600
634
  }
601
635
  ) : !hasData ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Empty, { className: "flex-none p-4", style: { height }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(EmptyDescription, { children: "No data available" }) }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-2", children: [
602
- showLegend && legendPosition === "top" && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
603
- ChartLegendItem,
604
- {
605
- label: title,
606
- color: brandPrimary,
607
- lineStyle: "solid"
608
- }
609
- ) }),
636
+ showLegend && legendPosition === "top" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-1.5", children: [
637
+ title && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
638
+ ChartLegendItem,
639
+ {
640
+ label: title,
641
+ color: brandPrimary,
642
+ lineStyle: "solid"
643
+ }
644
+ ),
645
+ extraDatasets == null ? void 0 : extraDatasets.map((ds) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
646
+ ChartLegendItem,
647
+ {
648
+ label: ds.label,
649
+ color: ds.color,
650
+ lineStyle: ds.dashed ? "dashed" : "solid"
651
+ },
652
+ ds.label
653
+ ))
654
+ ] }),
610
655
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { height, width: "100%", position: "relative" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
611
656
  import_react_chartjs_2.Chart,
612
657
  {
@@ -617,14 +662,25 @@ function CashBalanceLineChart({
617
662
  },
618
663
  brandPrimary
619
664
  ) }),
620
- showLegend && legendPosition === "bottom" && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
621
- ChartLegendItem,
622
- {
623
- label: title,
624
- color: brandPrimary,
625
- lineStyle: "solid"
626
- }
627
- ) })
665
+ showLegend && legendPosition === "bottom" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-1.5", children: [
666
+ title && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
667
+ ChartLegendItem,
668
+ {
669
+ label: title,
670
+ color: brandPrimary,
671
+ lineStyle: "solid"
672
+ }
673
+ ),
674
+ extraDatasets == null ? void 0 : extraDatasets.map((ds) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
675
+ ChartLegendItem,
676
+ {
677
+ label: ds.label,
678
+ color: ds.color,
679
+ lineStyle: ds.dashed ? "dashed" : "solid"
680
+ },
681
+ ds.label
682
+ ))
683
+ ] })
628
684
  ] }) })
629
685
  ]
630
686
  }
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  CashBalanceLineChart
3
- } from "../../chunk-LHQACMZY.mjs";
4
- import "../../chunk-YEWNFK5S.mjs";
3
+ } from "../../chunk-SPPQFW32.mjs";
4
+ import "../../chunk-WLXP4OOF.mjs";
5
5
  import "../../chunk-R2ON6CAN.mjs";
6
6
  import "../../chunk-3VDET466.mjs";
7
7
  import "../../chunk-JVMXMFBB.mjs";
8
- import "../../chunk-XYSRRDBH.mjs";
9
- import "../../chunk-FRCTOAKZ.mjs";
10
- import "../../chunk-MN5NYQCL.mjs";
8
+ import "../../chunk-XQDTFNVL.mjs";
11
9
  import "../../chunk-NOOEKOWY.mjs";
12
10
  import "../../chunk-R4HCRDU5.mjs";
11
+ import "../../chunk-XYSRRDBH.mjs";
12
+ import "../../chunk-FRCTOAKZ.mjs";
13
13
  import "../../chunk-AFML43VJ.mjs";
14
14
  import "../../chunk-WNQUEZJF.mjs";
15
15
  export {
@@ -597,14 +597,17 @@ function CashflowBarChart({
597
597
  display: showXAxis,
598
598
  grid: { display: false },
599
599
  border: { display: false },
600
- ticks: { font: { size: 10 }, color: FALLBACK_TICK }
600
+ ticks: {
601
+ font: { size: 12, family: fontFamily },
602
+ color: FALLBACK_TICK
603
+ }
601
604
  },
602
605
  y: {
603
606
  display: showYAxis,
604
607
  grid: { display: false },
605
608
  border: { display: false },
606
609
  ticks: {
607
- font: { size: 10 },
610
+ font: { size: 12, family: fontFamily },
608
611
  color: FALLBACK_TICK,
609
612
  maxTicksLimit: 5,
610
613
  padding: 8,
@@ -613,7 +616,7 @@ function CashflowBarChart({
613
616
  }
614
617
  }
615
618
  }),
616
- [showXAxis, showYAxis, sliced]
619
+ [showXAxis, showYAxis, sliced, fontFamily]
617
620
  );
618
621
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
619
622
  Card,
@@ -622,7 +625,7 @@ function CashflowBarChart({
622
625
  style: { maxWidth: width, fontFamily },
623
626
  children: [
624
627
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(CardHeader, { className: "px-3 sm:px-6", children: [
625
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardTitle, { className: "text-xs font-semibold uppercase tracking-wide", children: title }),
628
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardTitle, { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: title }),
626
629
  showPeriodSelector && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardAction, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex gap-0.5 sm:gap-1", children: PERIODS.map((p) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
627
630
  ChartPeriodButton,
628
631
  {
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  CashflowBarChart
3
- } from "../../chunk-D3HKFRQO.mjs";
3
+ } from "../../chunk-GQWKBESP.mjs";
4
4
  import "../../chunk-GTAVSBDO.mjs";
5
- import "../../chunk-YEWNFK5S.mjs";
5
+ import "../../chunk-WLXP4OOF.mjs";
6
6
  import "../../chunk-R2ON6CAN.mjs";
7
7
  import "../../chunk-3VDET466.mjs";
8
- import "../../chunk-XYSRRDBH.mjs";
9
- import "../../chunk-FRCTOAKZ.mjs";
10
- import "../../chunk-MN5NYQCL.mjs";
8
+ import "../../chunk-XQDTFNVL.mjs";
11
9
  import "../../chunk-NOOEKOWY.mjs";
12
10
  import "../../chunk-R4HCRDU5.mjs";
11
+ import "../../chunk-XYSRRDBH.mjs";
12
+ import "../../chunk-FRCTOAKZ.mjs";
13
13
  import "../../chunk-AFML43VJ.mjs";
14
14
  import "../../chunk-WNQUEZJF.mjs";
15
15
  export {
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  CategoryEditDialog
3
- } from "../../chunk-C35JMOII.mjs";
3
+ } from "../../chunk-3G6JUYRE.mjs";
4
4
  import "../../chunk-PNSYFE3K.mjs";
5
- import "../../chunk-T5FRVEJQ.mjs";
5
+ import "../../chunk-JTMN36BK.mjs";
6
6
  import "../../chunk-LBTHZSBT.mjs";
7
+ import "../../chunk-NOOEKOWY.mjs";
8
+ import "../../chunk-R4HCRDU5.mjs";
7
9
  import "../../chunk-XYSRRDBH.mjs";
8
10
  import "../../chunk-FRCTOAKZ.mjs";
9
11
  import "../../chunk-UNACI2YK.mjs";
10
- import "../../chunk-NOOEKOWY.mjs";
11
- import "../../chunk-R4HCRDU5.mjs";
12
12
  import "../../chunk-AFML43VJ.mjs";
13
13
  import "../../chunk-WNQUEZJF.mjs";
14
14
  export {
@@ -8,10 +8,10 @@ import {
8
8
  } from "../../chunk-X3VEDQPO.mjs";
9
9
  import "../../chunk-F3CU6KEI.mjs";
10
10
  import "../../chunk-LBTHZSBT.mjs";
11
- import "../../chunk-XYSRRDBH.mjs";
12
- import "../../chunk-FRCTOAKZ.mjs";
13
11
  import "../../chunk-NOOEKOWY.mjs";
14
12
  import "../../chunk-R4HCRDU5.mjs";
13
+ import "../../chunk-XYSRRDBH.mjs";
14
+ import "../../chunk-FRCTOAKZ.mjs";
15
15
  import "../../chunk-AFML43VJ.mjs";
16
16
  import "../../chunk-WNQUEZJF.mjs";
17
17
  export {
@@ -4,22 +4,22 @@ import {
4
4
  ContactAlertDialog,
5
5
  ContactAlertQueryBuilder,
6
6
  createAlertTree
7
- } from "../../../chunk-SCGCGVDN.mjs";
7
+ } from "../../../chunk-SZXIPE5J.mjs";
8
8
  import "../../../chunk-7YI3HEBH.mjs";
9
9
  import "../../../chunk-MS3GNXMB.mjs";
10
10
  import "../../../chunk-IKXYTCSB.mjs";
11
11
  import "../../../chunk-K6VCC2MK.mjs";
12
- import "../../../chunk-T5FRVEJQ.mjs";
12
+ import "../../../chunk-JTMN36BK.mjs";
13
13
  import "../../../chunk-2GIYVERS.mjs";
14
14
  import "../../../chunk-BS75ICOO.mjs";
15
15
  import "../../../chunk-OWFQSXVD.mjs";
16
16
  import "../../../chunk-6QAFGZC2.mjs";
17
17
  import "../../../chunk-LSRGA5BI.mjs";
18
18
  import "../../../chunk-LBTHZSBT.mjs";
19
- import "../../../chunk-XYSRRDBH.mjs";
20
- import "../../../chunk-FRCTOAKZ.mjs";
21
19
  import "../../../chunk-NOOEKOWY.mjs";
22
20
  import "../../../chunk-R4HCRDU5.mjs";
21
+ import "../../../chunk-XYSRRDBH.mjs";
22
+ import "../../../chunk-FRCTOAKZ.mjs";
23
23
  import "../../../chunk-AFML43VJ.mjs";
24
24
  import "../../../chunk-WNQUEZJF.mjs";
25
25
  export {
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  CreateContactModal
3
- } from "../../chunk-OKIWXOJL.mjs";
3
+ } from "../../chunk-OWTW5WAJ.mjs";
4
4
  import "../../chunk-LDC6V6DJ.mjs";
5
5
  import "../../chunk-ISUA7DSB.mjs";
6
6
  import "../../chunk-K6VCC2MK.mjs";
7
- import "../../chunk-T5FRVEJQ.mjs";
7
+ import "../../chunk-JTMN36BK.mjs";
8
8
  import "../../chunk-JVMXMFBB.mjs";
9
9
  import "../../chunk-OWFQSXVD.mjs";
10
10
  import "../../chunk-6QAFGZC2.mjs";
11
11
  import "../../chunk-LSRGA5BI.mjs";
12
12
  import "../../chunk-LBTHZSBT.mjs";
13
- import "../../chunk-XYSRRDBH.mjs";
14
- import "../../chunk-FRCTOAKZ.mjs";
15
13
  import "../../chunk-NOOEKOWY.mjs";
16
14
  import "../../chunk-R4HCRDU5.mjs";
15
+ import "../../chunk-XYSRRDBH.mjs";
16
+ import "../../chunk-FRCTOAKZ.mjs";
17
17
  import "../../chunk-AFML43VJ.mjs";
18
18
  import "../../chunk-WNQUEZJF.mjs";
19
19
  export {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  CsvImportModal
3
- } from "../../chunk-7PTRHNUV.mjs";
3
+ } from "../../chunk-JY3FUGNL.mjs";
4
4
  import "../../chunk-I4KVSZCH.mjs";
5
- import "../../chunk-T5FRVEJQ.mjs";
6
- import "../../chunk-XYSRRDBH.mjs";
7
- import "../../chunk-FRCTOAKZ.mjs";
5
+ import "../../chunk-JTMN36BK.mjs";
8
6
  import "../../chunk-NOOEKOWY.mjs";
9
7
  import "../../chunk-R4HCRDU5.mjs";
8
+ import "../../chunk-XYSRRDBH.mjs";
9
+ import "../../chunk-FRCTOAKZ.mjs";
10
10
  import "../../chunk-AFML43VJ.mjs";
11
11
  import "../../chunk-WNQUEZJF.mjs";
12
12
  export {
@@ -187,12 +187,22 @@ function formatCurrency(value, options) {
187
187
 
188
188
  // src/components/ui/dashboard-expense-categories.tsx
189
189
  var import_jsx_runtime3 = require("react/jsx-runtime");
190
- function ProgressBar({ pct, className }) {
190
+ var SECONDARY_ACTIVE_BG = "color-mix(in oklch, var(--brand-secondary) 8%, transparent)";
191
+ var SECONDARY_ACTIVE_HOVER_BG = "color-mix(in oklch, var(--brand-secondary) 12%, transparent)";
192
+ function ProgressBar({
193
+ pct,
194
+ className,
195
+ colorScheme = "primary"
196
+ }) {
191
197
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cn("h-1.5 w-full overflow-hidden bg-muted", className), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
192
198
  "div",
193
199
  {
194
200
  className: "h-full bg-primary transition-all",
195
- style: { width: `${Math.min(100, Math.max(0, pct))}%` },
201
+ style: __spreadValues({
202
+ width: `${Math.min(100, Math.max(0, pct))}%`
203
+ }, colorScheme === "secondary" && {
204
+ backgroundColor: "var(--brand-secondary)"
205
+ }),
196
206
  "aria-hidden": "true"
197
207
  }
198
208
  ) });
@@ -200,32 +210,49 @@ function ProgressBar({ pct, className }) {
200
210
  function SubCategoryRow({
201
211
  sub,
202
212
  isSelected,
213
+ colorScheme = "primary",
203
214
  onClick
204
215
  }) {
216
+ const isSecondary = colorScheme === "secondary";
205
217
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
206
- "button",
218
+ "div",
207
219
  {
208
- type: "button",
209
- onClick,
210
220
  className: cn(
211
- "flex w-full flex-col gap-1 py-1.5 pl-8 text-left transition-colors",
212
- isSelected ? "bg-primary/5" : "hover:bg-muted/50"
221
+ "flex w-full flex-col gap-1 py-1.5 pl-8",
222
+ isSelected && !isSecondary && "bg-primary/5"
213
223
  ),
224
+ style: isSelected && isSecondary ? { backgroundColor: SECONDARY_ACTIVE_BG } : void 0,
214
225
  children: [
215
226
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center justify-between gap-2 text-xs", children: [
216
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
217
- "span",
218
- {
219
- className: cn(
220
- "truncate",
221
- isSelected ? "font-medium text-primary" : "text-muted-foreground"
222
- ),
223
- children: sub.name
224
- }
225
- ),
227
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex min-w-0 items-center gap-1", children: [
228
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
229
+ "span",
230
+ {
231
+ className: cn(
232
+ "truncate text-muted-foreground",
233
+ isSelected && "font-medium"
234
+ ),
235
+ children: sub.name
236
+ }
237
+ ),
238
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
239
+ "button",
240
+ {
241
+ type: "button",
242
+ onClick,
243
+ "aria-label": `Filter by ${sub.name}`,
244
+ "aria-pressed": isSelected,
245
+ className: cn(
246
+ "shrink-0 transition-colors",
247
+ isSelected ? isSecondary ? "text-[var(--brand-secondary)]" : "text-primary" : "text-muted-foreground/50 hover:text-muted-foreground"
248
+ ),
249
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.ListFilter, { size: 12 })
250
+ }
251
+ )
252
+ ] }),
226
253
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "shrink-0 font-medium text-foreground", children: formatCurrency(sub.amount) })
227
254
  ] }),
228
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ProgressBar, { pct: sub.pct })
255
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ProgressBar, { pct: sub.pct, colorScheme })
229
256
  ]
230
257
  }
231
258
  );
@@ -233,68 +260,67 @@ function SubCategoryRow({
233
260
  function CategoryRow({
234
261
  item,
235
262
  selectedCategoryId,
263
+ colorScheme = "primary",
236
264
  onFilterClick
237
265
  }) {
238
266
  var _a, _b, _c, _d;
239
267
  const [expanded, setExpanded] = (0, import_react.useState)(false);
268
+ const [hovered, setHovered] = (0, import_react.useState)(false);
240
269
  const hasChildren = ((_b = (_a = item.subCategories) == null ? void 0 : _a.length) != null ? _b : 0) > 0;
241
270
  const isSelected = selectedCategoryId === item.id;
242
- const isChildSelected = hasChildren ? (_d = (_c = item.subCategories) == null ? void 0 : _c.some((s) => s.id === selectedCategoryId)) != null ? _d : false : false;
271
+ const isChildSelected = hasChildren && ((_d = (_c = item.subCategories) == null ? void 0 : _c.some((s) => s.id === selectedCategoryId)) != null ? _d : false);
243
272
  const isActive = isSelected || isChildSelected;
273
+ const isSecondary = colorScheme === "secondary";
274
+ const wrapperStyle = isSecondary && isActive ? {
275
+ backgroundColor: hovered ? SECONDARY_ACTIVE_HOVER_BG : SECONDARY_ACTIVE_BG
276
+ } : void 0;
244
277
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
245
278
  "div",
246
279
  {
247
280
  className: cn(
248
281
  "border-b border-border last:border-0 transition-colors",
249
- isActive && "bg-primary/5"
282
+ isActive && !isSecondary && "bg-primary/5"
250
283
  ),
284
+ style: wrapperStyle,
251
285
  children: [
252
286
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
253
287
  "button",
254
288
  {
255
289
  type: "button",
256
290
  className: cn(
257
- "flex w-full items-start gap-3 py-3 text-left hover:bg-muted/40 transition-colors",
258
- isActive && "hover:bg-primary/10"
291
+ "flex w-full items-start gap-3 py-3 text-left transition-colors",
292
+ !isSecondary && "hover:bg-muted/40",
293
+ !isSecondary && isActive && "hover:bg-primary/10"
259
294
  ),
260
- onClick: () => onFilterClick(isSelected ? null : item.id),
261
- "aria-pressed": isSelected,
295
+ onMouseEnter: () => setHovered(true),
296
+ onMouseLeave: () => setHovered(false),
297
+ onClick: () => hasChildren && setExpanded((v) => !v),
298
+ "aria-expanded": hasChildren ? expanded : void 0,
262
299
  children: [
263
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
264
- "span",
265
- {
266
- className: "mt-0.5 shrink-0 text-muted-foreground",
267
- onClick: (e) => {
268
- if (!hasChildren) return;
269
- e.stopPropagation();
270
- setExpanded((v) => !v);
271
- },
272
- "aria-label": expanded ? "Collapse" : "Expand",
273
- children: hasChildren ? expanded ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.ChevronDown, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.ChevronRight, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "inline-block size-3.5" })
274
- }
275
- ),
276
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
277
- "span",
278
- {
279
- className: cn(
280
- "mt-0.5 shrink-0",
281
- isActive ? "text-primary" : "text-muted-foreground"
282
- ),
283
- children: item.icon
284
- }
285
- ),
300
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: hasChildren ? expanded ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.ChevronDown, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.ChevronRight, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "inline-block size-3.5" }) }),
301
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: item.icon }),
286
302
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "min-w-0 flex-1", children: [
287
303
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
288
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
289
- "span",
290
- {
291
- className: cn(
292
- "truncate text-sm font-medium",
293
- isActive ? "text-primary" : "text-foreground"
294
- ),
295
- children: item.name
296
- }
297
- ),
304
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex min-w-0 items-center gap-1", children: [
305
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "truncate text-sm font-medium text-foreground", children: item.name }),
306
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
307
+ "button",
308
+ {
309
+ type: "button",
310
+ onClick: (e) => {
311
+ e.stopPropagation();
312
+ onFilterClick(isSelected ? null : item.id);
313
+ },
314
+ "aria-label": `Filter by ${item.name}`,
315
+ "aria-pressed": isSelected,
316
+ className: cn(
317
+ "shrink-0 transition-colors",
318
+ isActive ? isSecondary ? "text-[var(--brand-secondary)]" : "text-primary" : "text-muted-foreground/50 hover:text-muted-foreground"
319
+ ),
320
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.ListFilter, { size: 13 })
321
+ }
322
+ )
323
+ ] }),
298
324
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
299
325
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
300
326
  item.pct.toFixed(0),
@@ -303,7 +329,14 @@ function CategoryRow({
303
329
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-sm font-semibold text-foreground", children: formatCurrency(item.amount) })
304
330
  ] })
305
331
  ] }),
306
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ProgressBar, { pct: item.pct, className: "mt-1.5" })
332
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
333
+ ProgressBar,
334
+ {
335
+ pct: item.pct,
336
+ className: "mt-1.5",
337
+ colorScheme
338
+ }
339
+ )
307
340
  ] })
308
341
  ]
309
342
  }
@@ -313,6 +346,7 @@ function CategoryRow({
313
346
  {
314
347
  sub,
315
348
  isSelected: selectedCategoryId === sub.id,
349
+ colorScheme,
316
350
  onClick: () => onFilterClick(selectedCategoryId === sub.id ? null : sub.id)
317
351
  },
318
352
  sub.id
@@ -328,11 +362,9 @@ function DashboardExpenseCategories({
328
362
  isLoading = false,
329
363
  className,
330
364
  selectedCategoryId,
331
- onCategorySelect
365
+ onCategorySelect,
366
+ colorScheme = "primary"
332
367
  }) {
333
- const handleFilterClick = (id) => {
334
- onCategorySelect == null ? void 0 : onCategorySelect(id);
335
- };
336
368
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Card, { className: cn("flex flex-col", className), children: [
337
369
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CardHeader, { className: "pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-baseline justify-between gap-2", children: [
338
370
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CardTitle, { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: title }),
@@ -343,7 +375,8 @@ function DashboardExpenseCategories({
343
375
  {
344
376
  item,
345
377
  selectedCategoryId,
346
- onFilterClick: handleFilterClick
378
+ colorScheme,
379
+ onFilterClick: (id) => onCategorySelect == null ? void 0 : onCategorySelect(id)
347
380
  },
348
381
  item.id
349
382
  )) }) })