@wealthx/shadcn 1.0.2 → 1.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.
- package/.turbo/turbo-build.log +235 -138
- package/CHANGELOG.md +12 -0
- package/README.md +82 -0
- package/dist/{chunk-6OJF6XRN.mjs → chunk-24FUO7TD.mjs} +4 -8
- package/dist/{chunk-4AJ5HWHD.mjs → chunk-2I5S2AMY.mjs} +3 -3
- package/dist/chunk-2SF672SZ.mjs +161 -0
- package/dist/{chunk-GPRJQ24C.mjs → chunk-34NWQURD.mjs} +2 -2
- package/dist/{chunk-MQ72DIBH.mjs → chunk-3GF7OVTP.mjs} +14 -5
- package/dist/chunk-3WMX6KWS.mjs +245 -0
- package/dist/{chunk-PMKODV6M.mjs → chunk-462HMNO4.mjs} +6 -10
- package/dist/chunk-4CX4SBRO.mjs +153 -0
- package/dist/chunk-4MN6UQHG.mjs +443 -0
- package/dist/chunk-5QQVZTVZ.mjs +233 -0
- package/dist/{chunk-BGP2N52Z.mjs → chunk-66MI7Q4B.mjs} +5 -5
- package/dist/chunk-6FCGKSZX.mjs +268 -0
- package/dist/{chunk-CGOKTPXU.mjs → chunk-6JQFUE5I.mjs} +20 -23
- package/dist/{chunk-Z3MK2KKZ.mjs → chunk-7DHU4VGG.mjs} +7 -3
- package/dist/{chunk-VZ2NR7L3.mjs → chunk-7PYJD5JI.mjs} +35 -27
- package/dist/{chunk-JU2RUWHF.mjs → chunk-7XJHLGUV.mjs} +1 -1
- package/dist/{chunk-BMFN37JH.mjs → chunk-7YAU5CY6.mjs} +1 -1
- package/dist/chunk-A56YQQHG.mjs +402 -0
- package/dist/chunk-AH52LG6N.mjs +315 -0
- package/dist/{chunk-SLWCCURD.mjs → chunk-CLIN5525.mjs} +8 -4
- package/dist/{chunk-3VQNJ235.mjs → chunk-CSDO6VBW.mjs} +7 -0
- package/dist/chunk-D4ILTPOG.mjs +293 -0
- package/dist/{chunk-HS7TFG7V.mjs → chunk-D6ID6M4V.mjs} +1 -1
- package/dist/chunk-DOH3EHX7.mjs +378 -0
- package/dist/{chunk-MJIEMGRD.mjs → chunk-EFRENWEJ.mjs} +9 -17
- package/dist/chunk-ERGGHC2V.mjs +185 -0
- package/dist/{chunk-OXQQNQZI.mjs → chunk-FEZKMUCF.mjs} +10 -1
- package/dist/{chunk-55CEW76V.mjs → chunk-FH6QVUVZ.mjs} +1 -1
- package/dist/chunk-FMAXJ2SI.mjs +71 -0
- package/dist/chunk-FZIXGLMV.mjs +173 -0
- package/dist/{chunk-DS2AMHN2.mjs → chunk-GYMYRIZP.mjs} +2 -2
- package/dist/{chunk-KQDD5MU3.mjs → chunk-H45TKD34.mjs} +5 -5
- package/dist/{chunk-BBJBJSXQ.mjs → chunk-J5UICVJS.mjs} +1 -1
- package/dist/{chunk-RL772EH7.mjs → chunk-JHJHG4GO.mjs} +4 -12
- package/dist/chunk-KMCGSZTX.mjs +177 -0
- package/dist/{chunk-FHNT55I5.mjs → chunk-KUDCQ4FI.mjs} +4 -4
- package/dist/chunk-LE6YFY6D.mjs +209 -0
- package/dist/{chunk-HUVTPUV2.mjs → chunk-LLVQKSU3.mjs} +23 -19
- package/dist/{chunk-KKHTJNMM.mjs → chunk-MARPPFOJ.mjs} +8 -4
- package/dist/{chunk-6AFMNC42.mjs → chunk-N2PT566P.mjs} +15 -11
- package/dist/chunk-NLCKVHWB.mjs +161 -0
- package/dist/{chunk-YN5SYTOO.mjs → chunk-NQPOYKAQ.mjs} +9 -5
- package/dist/{chunk-ZZV5JVNW.mjs → chunk-NSLMILBT.mjs} +3 -7
- package/dist/chunk-NXA3CZ7A.mjs +248 -0
- package/dist/chunk-OGOYQ7BG.mjs +150 -0
- package/dist/{chunk-3NQGYJEZ.mjs → chunk-P6AM5V7O.mjs} +10 -18
- package/dist/{chunk-CZ3BW5GL.mjs → chunk-P76HMUI6.mjs} +5 -11
- package/dist/chunk-PCPLO5HT.mjs +671 -0
- package/dist/chunk-PG6K5XEC.mjs +475 -0
- package/dist/chunk-PJHPSRYD.mjs +234 -0
- package/dist/{chunk-DDPA2XXS.mjs → chunk-PMB3A7V3.mjs} +2 -2
- package/dist/chunk-PR6V5XKM.mjs +209 -0
- package/dist/{chunk-46OFHMQA.mjs → chunk-Q76O3RIQ.mjs} +10 -6
- package/dist/chunk-QVKWW6KE.mjs +272 -0
- package/dist/chunk-RGU7HOEC.mjs +140 -0
- package/dist/{chunk-JF4PHPD5.mjs → chunk-RGVKLTLH.mjs} +4 -4
- package/dist/{chunk-VG6UF6UT.mjs → chunk-RP3SQYA3.mjs} +2 -2
- package/dist/chunk-RRBS6D63.mjs +163 -0
- package/dist/chunk-SMQ3DG25.mjs +285 -0
- package/dist/chunk-SPJ5KXW7.mjs +199 -0
- package/dist/chunk-SYOD63OZ.mjs +225 -0
- package/dist/chunk-UFYSFDER.mjs +42 -0
- package/dist/chunk-VACKZOMY.mjs +190 -0
- package/dist/chunk-VLQZANBF.mjs +42 -0
- package/dist/chunk-WA6O6EUR.mjs +1885 -0
- package/dist/{chunk-E3K6O4FZ.mjs → chunk-WAZD7NFU.mjs} +5 -2
- package/dist/chunk-WG6JGJXB.mjs +165 -0
- package/dist/{chunk-I64K754C.mjs → chunk-WNGWBVLV.mjs} +2 -2
- package/dist/{chunk-3U7SD3MS.mjs → chunk-WOEHFRGB.mjs} +3 -3
- package/dist/{chunk-DKZRJOMF.mjs → chunk-XIRTEFKH.mjs} +12 -12
- package/dist/chunk-Y6DWJSKZ.mjs +79 -0
- package/dist/chunk-YKPROFLB.mjs +161 -0
- package/dist/{chunk-K76E2TQU.mjs → chunk-ZRO5JO3H.mjs} +107 -67
- package/dist/{chunk-VYMHBV6D.mjs → chunk-ZU4NV6RG.mjs} +5 -3
- package/dist/components/ui/accordion.js +40 -4
- package/dist/components/ui/accordion.mjs +2 -2
- package/dist/components/ui/add-column-modal.js +789 -0
- package/dist/components/ui/add-column-modal.mjs +17 -0
- package/dist/components/ui/add-lead-modal.js +647 -0
- package/dist/components/ui/add-lead-modal.mjs +16 -0
- package/dist/components/ui/ai-assistant-drawer.js +686 -0
- package/dist/components/ui/ai-assistant-drawer.mjs +16 -0
- package/dist/components/ui/alert-dialog.js +37 -5
- package/dist/components/ui/alert-dialog.mjs +4 -4
- package/dist/components/ui/alert.js +37 -11
- package/dist/components/ui/alert.mjs +2 -2
- package/dist/components/ui/avatar.js +36 -8
- package/dist/components/ui/avatar.mjs +2 -2
- package/dist/components/ui/backoffice-alert-history-chart.js +624 -0
- package/dist/components/ui/backoffice-alert-history-chart.mjs +16 -0
- package/dist/components/ui/backoffice-contact-history-chart.js +687 -0
- package/dist/components/ui/backoffice-contact-history-chart.mjs +16 -0
- package/dist/components/ui/badge.js +37 -2
- package/dist/components/ui/badge.mjs +2 -2
- package/dist/components/ui/borrowing-capacity-line-chart.js +639 -0
- package/dist/components/ui/borrowing-capacity-line-chart.mjs +16 -0
- package/dist/components/ui/button.js +35 -3
- package/dist/components/ui/button.mjs +2 -2
- package/dist/components/ui/calendar.js +43 -19
- package/dist/components/ui/calendar.mjs +3 -3
- package/dist/components/ui/card.js +40 -4
- package/dist/components/ui/card.mjs +2 -2
- package/dist/components/ui/cash-balance-line-chart.js +627 -0
- package/dist/components/ui/cash-balance-line-chart.mjs +16 -0
- package/dist/components/ui/cashflow-bar-chart.js +650 -0
- package/dist/components/ui/cashflow-bar-chart.mjs +16 -0
- package/dist/components/ui/checkbox.js +36 -5
- package/dist/components/ui/checkbox.mjs +2 -3
- package/dist/components/ui/chip.js +37 -2
- package/dist/components/ui/chip.mjs +3 -3
- package/dist/components/ui/combobox.js +280 -0
- package/dist/components/ui/combobox.mjs +28 -0
- package/dist/components/ui/data-table.js +160 -88
- package/dist/components/ui/data-table.mjs +10 -11
- package/dist/components/ui/date-picker.js +44 -20
- package/dist/components/ui/date-picker.mjs +6 -7
- package/dist/components/ui/dialog.js +44 -12
- package/dist/components/ui/dialog.mjs +4 -4
- package/dist/components/ui/drawer.js +46 -10
- package/dist/components/ui/drawer.mjs +3 -3
- package/dist/components/ui/dropdown-menu.js +40 -16
- package/dist/components/ui/dropdown-menu.mjs +3 -3
- package/dist/components/ui/empty.js +41 -5
- package/dist/components/ui/empty.mjs +2 -2
- package/dist/components/ui/expense-bar-chart.js +642 -0
- package/dist/components/ui/expense-bar-chart.mjs +16 -0
- package/dist/components/ui/field.js +53 -21
- package/dist/components/ui/field.mjs +4 -4
- package/dist/components/ui/financial-cards.js +1002 -0
- package/dist/components/ui/financial-cards.mjs +24 -0
- package/dist/components/ui/financial-drawers.js +637 -0
- package/dist/components/ui/financial-drawers.mjs +17 -0
- package/dist/components/ui/financial-primitives.js +218 -0
- package/dist/components/ui/financial-primitives.mjs +22 -0
- package/dist/components/ui/financial-sections.js +1422 -0
- package/dist/components/ui/financial-sections.mjs +30 -0
- package/dist/components/ui/form-primitives.js +682 -0
- package/dist/components/ui/form-primitives.mjs +19 -0
- package/dist/components/ui/income-bar-chart.js +641 -0
- package/dist/components/ui/income-bar-chart.mjs +16 -0
- package/dist/components/ui/input-group.js +43 -7
- package/dist/components/ui/input-group.mjs +5 -5
- package/dist/components/ui/input-otp.js +39 -3
- package/dist/components/ui/input-otp.mjs +2 -2
- package/dist/components/ui/input.js +34 -2
- package/dist/components/ui/input.mjs +2 -2
- package/dist/components/ui/kanban-column.js +1143 -0
- package/dist/components/ui/kanban-column.mjs +20 -0
- package/dist/components/ui/label.js +35 -7
- package/dist/components/ui/label.mjs +2 -2
- package/dist/components/ui/opportunity-card.js +960 -0
- package/dist/components/ui/opportunity-card.mjs +20 -0
- package/dist/components/ui/opportunity-edit-modals.js +3360 -0
- package/dist/components/ui/opportunity-edit-modals.mjs +37 -0
- package/dist/components/ui/opportunity-summary-tab.js +4365 -0
- package/dist/components/ui/opportunity-summary-tab.mjs +34 -0
- package/dist/components/ui/pagination.js +35 -3
- package/dist/components/ui/pagination.mjs +3 -3
- package/dist/components/ui/pipeline-alerts.js +103 -0
- package/dist/components/ui/pipeline-alerts.mjs +8 -0
- package/dist/components/ui/pipeline-board.js +1408 -0
- package/dist/components/ui/pipeline-board.mjs +24 -0
- package/dist/components/ui/pipeline-chart.js +216 -0
- package/dist/components/ui/pipeline-chart.mjs +10 -0
- package/dist/components/ui/pipeline-dialogs.js +1183 -0
- package/dist/components/ui/pipeline-dialogs.mjs +23 -0
- package/dist/components/ui/pipeline-primitives.js +300 -0
- package/dist/components/ui/pipeline-primitives.mjs +11 -0
- package/dist/components/ui/popover.js +45 -4
- package/dist/components/ui/popover.mjs +3 -3
- package/dist/components/ui/progress.js +33 -1
- package/dist/components/ui/progress.mjs +2 -2
- package/dist/components/ui/property-cashflow-doughnut-chart.js +523 -0
- package/dist/components/ui/property-cashflow-doughnut-chart.mjs +16 -0
- package/dist/components/ui/property-debt-equity-doughnut-chart.js +521 -0
- package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +16 -0
- package/dist/components/ui/property-mobile-estimate-line-chart.js +682 -0
- package/dist/components/ui/property-mobile-estimate-line-chart.mjs +16 -0
- package/dist/components/ui/radio-group.js +33 -1
- package/dist/components/ui/radio-group.mjs +2 -2
- package/dist/components/ui/select.js +66 -26
- package/dist/components/ui/select.mjs +3 -3
- package/dist/components/ui/separator.js +33 -1
- package/dist/components/ui/separator.mjs +2 -2
- package/dist/components/ui/sheet.js +37 -9
- package/dist/components/ui/sheet.mjs +3 -3
- package/dist/components/ui/skeleton.js +33 -1
- package/dist/components/ui/skeleton.mjs +2 -2
- package/dist/components/ui/slider.js +86 -102
- package/dist/components/ui/slider.mjs +2 -2
- package/dist/components/ui/spinner.js +33 -1
- package/dist/components/ui/spinner.mjs +2 -2
- package/dist/components/ui/stage-timeline.js +579 -0
- package/dist/components/ui/stage-timeline.mjs +15 -0
- package/dist/components/ui/switch.js +37 -4
- package/dist/components/ui/switch.mjs +2 -3
- package/dist/components/ui/table.js +37 -5
- package/dist/components/ui/table.mjs +2 -2
- package/dist/components/ui/tabs.js +36 -12
- package/dist/components/ui/tabs.mjs +2 -2
- package/dist/components/ui/textarea.js +34 -2
- package/dist/components/ui/textarea.mjs +2 -2
- package/dist/components/ui/toggle-group.js +35 -4
- package/dist/components/ui/toggle-group.mjs +3 -4
- package/dist/components/ui/toggle.js +35 -4
- package/dist/components/ui/toggle.mjs +2 -3
- package/dist/components/ui/tooltip.js +51 -22
- package/dist/components/ui/tooltip.mjs +3 -3
- package/dist/components/ui/transactions-expense-categories-doughnut-chart.js +528 -0
- package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +16 -0
- package/dist/components/ui/transactions-income-expense-bar-chart.js +516 -0
- package/dist/components/ui/transactions-income-expense-bar-chart.mjs +16 -0
- package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.js +528 -0
- package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +16 -0
- package/dist/index.js +11613 -2868
- package/dist/index.mjs +377 -164
- package/dist/lib/theme-provider.js +10 -1
- package/dist/lib/theme-provider.mjs +1 -1
- package/dist/lib/typography.js +8 -0
- package/dist/lib/typography.mjs +3 -1
- package/dist/lib/utils.js +33 -1
- package/dist/lib/utils.mjs +1 -1
- package/dist/styles.css +1 -1
- package/package.json +169 -6
- package/src/components/index.tsx +323 -13
- package/src/components/ui/accordion.tsx +6 -3
- package/src/components/ui/add-column-modal.tsx +339 -0
- package/src/components/ui/add-lead-modal.tsx +290 -0
- package/src/components/ui/ai-assistant-drawer.tsx +408 -0
- package/src/components/ui/alert-dialog.tsx +80 -54
- package/src/components/ui/alert.tsx +28 -28
- package/src/components/ui/avatar.tsx +30 -29
- package/src/components/ui/backoffice-alert-history-chart.tsx +260 -0
- package/src/components/ui/backoffice-contact-history-chart.tsx +325 -0
- package/src/components/ui/badge.tsx +17 -15
- package/src/components/ui/borrowing-capacity-line-chart.tsx +357 -0
- package/src/components/ui/button.tsx +30 -27
- package/src/components/ui/calendar.tsx +53 -67
- package/src/components/ui/card.tsx +27 -24
- package/src/components/ui/cash-balance-line-chart.tsx +302 -0
- package/src/components/ui/cashflow-bar-chart.tsx +363 -0
- package/src/components/ui/chart-shared.tsx +261 -0
- package/src/components/ui/checkbox.tsx +30 -26
- package/src/components/ui/combobox.tsx +223 -0
- package/src/components/ui/data-table.tsx +160 -99
- package/src/components/ui/date-picker.tsx +0 -2
- package/src/components/ui/dialog.tsx +70 -60
- package/src/components/ui/drawer.tsx +57 -48
- package/src/components/ui/dropdown-menu.tsx +90 -82
- package/src/components/ui/empty.tsx +31 -27
- package/src/components/ui/expense-bar-chart.tsx +296 -0
- package/src/components/ui/field.tsx +70 -62
- package/src/components/ui/financial-cards.tsx +830 -0
- package/src/components/ui/financial-drawers.tsx +339 -0
- package/src/components/ui/financial-primitives.tsx +331 -0
- package/src/components/ui/financial-sections.tsx +672 -0
- package/src/components/ui/form-primitives.tsx +536 -0
- package/src/components/ui/income-bar-chart.tsx +297 -0
- package/src/components/ui/input-group.tsx +41 -34
- package/src/components/ui/input-otp.tsx +29 -24
- package/src/components/ui/input.tsx +8 -8
- package/src/components/ui/kanban-column.tsx +333 -0
- package/src/components/ui/label.tsx +9 -12
- package/src/components/ui/opportunity-card.tsx +616 -0
- package/src/components/ui/opportunity-edit-modals.tsx +2528 -0
- package/src/components/ui/opportunity-summary-tab.tsx +579 -0
- package/src/components/ui/pipeline-alerts.tsx +74 -0
- package/src/components/ui/pipeline-board.tsx +268 -0
- package/src/components/ui/pipeline-chart.tsx +173 -0
- package/src/components/ui/pipeline-dialogs.tsx +303 -0
- package/src/components/ui/pipeline-primitives.tsx +108 -0
- package/src/components/ui/popover.tsx +41 -36
- package/src/components/ui/property-cashflow-doughnut-chart.tsx +188 -0
- package/src/components/ui/property-debt-equity-doughnut-chart.tsx +185 -0
- package/src/components/ui/property-mobile-estimate-line-chart.tsx +393 -0
- package/src/components/ui/select.tsx +65 -52
- package/src/components/ui/sheet.tsx +55 -52
- package/src/components/ui/slider.tsx +54 -77
- package/src/components/ui/stage-timeline.tsx +205 -0
- package/src/components/ui/switch.tsx +42 -29
- package/src/components/ui/table.tsx +28 -28
- package/src/components/ui/tabs.tsx +22 -28
- package/src/components/ui/textarea.tsx +8 -8
- package/src/components/ui/toggle-group.tsx +0 -2
- package/src/components/ui/toggle.tsx +13 -15
- package/src/components/ui/tooltip.tsx +30 -28
- package/src/components/ui/transactions-expense-categories-doughnut-chart.tsx +191 -0
- package/src/components/ui/transactions-income-expense-bar-chart.tsx +205 -0
- package/src/components/ui/transactions-liabilities-breakdown-doughnut-chart.tsx +191 -0
- package/src/lib/theme-provider.tsx +10 -0
- package/src/lib/typography.ts +9 -0
- package/src/lib/utils.ts +41 -3
- package/src/styles/globals.css +371 -124
- package/src/styles/styles-css.ts +1 -1
- package/tsup.config.ts +32 -0
- package/dist/chunk-K74JRTJR.mjs +0 -105
- package/dist/chunk-V7CNWJT3.mjs +0 -10
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChartLegendItem,
|
|
3
|
+
FALLBACK_BG,
|
|
4
|
+
FALLBACK_PRIMARY,
|
|
5
|
+
FALLBACK_TICK
|
|
6
|
+
} from "./chunk-FZIXGLMV.mjs";
|
|
7
|
+
import {
|
|
8
|
+
Empty,
|
|
9
|
+
EmptyDescription
|
|
10
|
+
} from "./chunk-NQPOYKAQ.mjs";
|
|
11
|
+
import {
|
|
12
|
+
Card,
|
|
13
|
+
CardContent,
|
|
14
|
+
CardHeader,
|
|
15
|
+
CardTitle
|
|
16
|
+
} from "./chunk-CLIN5525.mjs";
|
|
17
|
+
import {
|
|
18
|
+
Spinner
|
|
19
|
+
} from "./chunk-7YAU5CY6.mjs";
|
|
20
|
+
import {
|
|
21
|
+
useThemeVars
|
|
22
|
+
} from "./chunk-FEZKMUCF.mjs";
|
|
23
|
+
import {
|
|
24
|
+
cn
|
|
25
|
+
} from "./chunk-VLQZANBF.mjs";
|
|
26
|
+
|
|
27
|
+
// src/components/ui/cash-balance-line-chart.tsx
|
|
28
|
+
import { useMemo } from "react";
|
|
29
|
+
import {
|
|
30
|
+
Chart as ChartJS,
|
|
31
|
+
CategoryScale,
|
|
32
|
+
LinearScale,
|
|
33
|
+
LineElement,
|
|
34
|
+
PointElement,
|
|
35
|
+
Tooltip
|
|
36
|
+
} from "chart.js";
|
|
37
|
+
import { Chart } from "react-chartjs-2";
|
|
38
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
39
|
+
ChartJS.register(
|
|
40
|
+
CategoryScale,
|
|
41
|
+
LinearScale,
|
|
42
|
+
LineElement,
|
|
43
|
+
PointElement,
|
|
44
|
+
Tooltip
|
|
45
|
+
);
|
|
46
|
+
function formatAbbrev(value) {
|
|
47
|
+
const abs = Math.abs(value);
|
|
48
|
+
const sign = value < 0 ? "-" : "";
|
|
49
|
+
if (abs >= 1e9)
|
|
50
|
+
return `${sign}$${(abs / 1e9).toFixed(1)}B`;
|
|
51
|
+
if (abs >= 1e6) return `${sign}$${(abs / 1e6).toFixed(1)}M`;
|
|
52
|
+
if (abs >= 1e3) return `${sign}$${(abs / 1e3).toFixed(1)}K`;
|
|
53
|
+
return `${sign}$${abs.toFixed(0)}`;
|
|
54
|
+
}
|
|
55
|
+
function formatBalanceFull(value) {
|
|
56
|
+
const abs = Math.abs(value);
|
|
57
|
+
const sign = value < 0 ? "-" : "";
|
|
58
|
+
return `${sign}$${abs.toLocaleString(void 0, {
|
|
59
|
+
minimumFractionDigits: 2,
|
|
60
|
+
maximumFractionDigits: 2
|
|
61
|
+
})}`;
|
|
62
|
+
}
|
|
63
|
+
function formatDateLabel(iso) {
|
|
64
|
+
const d = new Date(iso);
|
|
65
|
+
return d.toLocaleDateString("en-US", { month: "short", day: "numeric" });
|
|
66
|
+
}
|
|
67
|
+
function formatDateTooltip(iso) {
|
|
68
|
+
const d = new Date(iso);
|
|
69
|
+
return d.toLocaleDateString("en-US", {
|
|
70
|
+
month: "short",
|
|
71
|
+
day: "numeric",
|
|
72
|
+
year: "numeric"
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function CashBalanceLineChart({
|
|
76
|
+
chartData,
|
|
77
|
+
title = "Cash Balance",
|
|
78
|
+
height = 200,
|
|
79
|
+
width = "100%",
|
|
80
|
+
className,
|
|
81
|
+
isLoading = false,
|
|
82
|
+
showXAxis = true,
|
|
83
|
+
showYAxis = true,
|
|
84
|
+
showBalanceValue = false,
|
|
85
|
+
showLegend = false,
|
|
86
|
+
legendPosition = "bottom"
|
|
87
|
+
}) {
|
|
88
|
+
const themeVars = useThemeVars();
|
|
89
|
+
const brandPrimary = themeVars["--theme-primary"] || FALLBACK_PRIMARY;
|
|
90
|
+
const fontFamily = themeVars["--font-sans"] || "Figtree, sans-serif";
|
|
91
|
+
const hasData = Array.isArray(chartData) && chartData.length > 0;
|
|
92
|
+
const tickIndices = useMemo(() => {
|
|
93
|
+
if (!hasData) return /* @__PURE__ */ new Set();
|
|
94
|
+
const count = chartData.length;
|
|
95
|
+
const step = Math.max(1, Math.floor(count / 6));
|
|
96
|
+
const indices = /* @__PURE__ */ new Set();
|
|
97
|
+
for (let i = 0; i < count; i += step) indices.add(i);
|
|
98
|
+
indices.add(count - 1);
|
|
99
|
+
return indices;
|
|
100
|
+
}, [hasData, chartData]);
|
|
101
|
+
const data = useMemo(() => {
|
|
102
|
+
if (!hasData) return { labels: [], datasets: [] };
|
|
103
|
+
return {
|
|
104
|
+
labels: chartData.map((p) => p.x),
|
|
105
|
+
// raw ISO — used for tooltip + tick lookup
|
|
106
|
+
datasets: [
|
|
107
|
+
{
|
|
108
|
+
label: title,
|
|
109
|
+
data: chartData.map((p) => p.y),
|
|
110
|
+
fill: false,
|
|
111
|
+
borderColor: brandPrimary,
|
|
112
|
+
backgroundColor: "transparent",
|
|
113
|
+
borderWidth: 2.5,
|
|
114
|
+
tension: 0.4,
|
|
115
|
+
pointRadius: 0,
|
|
116
|
+
pointHoverRadius: 6,
|
|
117
|
+
pointHoverBackgroundColor: FALLBACK_BG,
|
|
118
|
+
pointHoverBorderColor: brandPrimary,
|
|
119
|
+
pointHoverBorderWidth: 3,
|
|
120
|
+
pointHitRadius: 10
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
};
|
|
124
|
+
}, [hasData, chartData, brandPrimary, title]);
|
|
125
|
+
const options = useMemo(
|
|
126
|
+
() => ({
|
|
127
|
+
responsive: true,
|
|
128
|
+
maintainAspectRatio: false,
|
|
129
|
+
animation: { duration: 1200, easing: "easeOutQuart" },
|
|
130
|
+
plugins: {
|
|
131
|
+
legend: { display: false },
|
|
132
|
+
tooltip: {
|
|
133
|
+
enabled: true,
|
|
134
|
+
mode: "index",
|
|
135
|
+
intersect: false,
|
|
136
|
+
displayColors: false,
|
|
137
|
+
padding: 12,
|
|
138
|
+
cornerRadius: 0,
|
|
139
|
+
titleFont: { size: 11, weight: "600", family: fontFamily },
|
|
140
|
+
bodyFont: { size: 13, weight: "700", family: fontFamily },
|
|
141
|
+
callbacks: {
|
|
142
|
+
title: (items) => {
|
|
143
|
+
var _a;
|
|
144
|
+
const iso = (_a = items[0]) == null ? void 0 : _a.label;
|
|
145
|
+
return iso ? formatDateTooltip(iso) : "";
|
|
146
|
+
},
|
|
147
|
+
label: (ctx) => {
|
|
148
|
+
const val = ctx.parsed.y;
|
|
149
|
+
const formatted = Math.abs(val).toLocaleString(void 0, {
|
|
150
|
+
minimumFractionDigits: 2,
|
|
151
|
+
maximumFractionDigits: 2
|
|
152
|
+
});
|
|
153
|
+
return `$ ${formatted}`;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
interaction: { mode: "index", intersect: false },
|
|
159
|
+
scales: {
|
|
160
|
+
x: {
|
|
161
|
+
type: "category",
|
|
162
|
+
display: showXAxis,
|
|
163
|
+
grid: { display: false },
|
|
164
|
+
border: { display: false },
|
|
165
|
+
ticks: {
|
|
166
|
+
autoSkip: false,
|
|
167
|
+
maxRotation: 0,
|
|
168
|
+
minRotation: 0,
|
|
169
|
+
color: FALLBACK_TICK,
|
|
170
|
+
font: { size: 10, family: fontFamily },
|
|
171
|
+
callback: function(_, index) {
|
|
172
|
+
if (!tickIndices.has(index) || !chartData) return "";
|
|
173
|
+
return formatDateLabel(chartData[index].x);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
y: {
|
|
178
|
+
display: showYAxis,
|
|
179
|
+
position: "left",
|
|
180
|
+
grid: { display: false },
|
|
181
|
+
border: { display: false },
|
|
182
|
+
ticks: {
|
|
183
|
+
beginAtZero: false,
|
|
184
|
+
maxTicksLimit: 5,
|
|
185
|
+
padding: 8,
|
|
186
|
+
color: FALLBACK_TICK,
|
|
187
|
+
font: { size: 10, family: fontFamily },
|
|
188
|
+
callback: (v) => formatAbbrev(Number(v))
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}),
|
|
193
|
+
[tickIndices, chartData, showXAxis, showYAxis, fontFamily]
|
|
194
|
+
);
|
|
195
|
+
const latestValue = hasData ? chartData[chartData.length - 1].y : null;
|
|
196
|
+
return /* @__PURE__ */ jsxs(
|
|
197
|
+
Card,
|
|
198
|
+
{
|
|
199
|
+
className: cn("w-full py-4 sm:py-6 gap-2", className),
|
|
200
|
+
style: { maxWidth: width, fontFamily },
|
|
201
|
+
children: [
|
|
202
|
+
/* @__PURE__ */ jsx(CardHeader, { className: "px-3 sm:px-6", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
|
|
203
|
+
/* @__PURE__ */ jsx(CardTitle, { className: "text-sm sm:text-base uppercase tracking-wider", children: title }),
|
|
204
|
+
showBalanceValue && latestValue !== null && /* @__PURE__ */ jsx("p", { className: "text-2xl font-bold tabular-nums leading-tight", children: formatBalanceFull(latestValue) })
|
|
205
|
+
] }) }),
|
|
206
|
+
/* @__PURE__ */ jsx(CardContent, { className: "px-3 sm:px-6", children: isLoading ? /* @__PURE__ */ jsx(
|
|
207
|
+
"div",
|
|
208
|
+
{
|
|
209
|
+
className: "flex items-center justify-center text-muted-foreground",
|
|
210
|
+
style: { height, width: "100%" },
|
|
211
|
+
children: /* @__PURE__ */ jsx(Spinner, { size: "lg" })
|
|
212
|
+
}
|
|
213
|
+
) : !hasData ? /* @__PURE__ */ jsx(Empty, { className: "flex-none p-4", style: { height }, children: /* @__PURE__ */ jsx(EmptyDescription, { children: "No data available" }) }) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
214
|
+
showLegend && legendPosition === "top" && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-1.5", children: /* @__PURE__ */ jsx(
|
|
215
|
+
ChartLegendItem,
|
|
216
|
+
{
|
|
217
|
+
label: title,
|
|
218
|
+
color: brandPrimary,
|
|
219
|
+
lineStyle: "solid"
|
|
220
|
+
}
|
|
221
|
+
) }),
|
|
222
|
+
/* @__PURE__ */ jsx("div", { style: { height, width: "100%", position: "relative" }, children: /* @__PURE__ */ jsx(
|
|
223
|
+
Chart,
|
|
224
|
+
{
|
|
225
|
+
type: "line",
|
|
226
|
+
data,
|
|
227
|
+
options,
|
|
228
|
+
"aria-label": title
|
|
229
|
+
},
|
|
230
|
+
brandPrimary
|
|
231
|
+
) }),
|
|
232
|
+
showLegend && legendPosition === "bottom" && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-1.5", children: /* @__PURE__ */ jsx(
|
|
233
|
+
ChartLegendItem,
|
|
234
|
+
{
|
|
235
|
+
label: title,
|
|
236
|
+
color: brandPrimary,
|
|
237
|
+
lineStyle: "solid"
|
|
238
|
+
}
|
|
239
|
+
) })
|
|
240
|
+
] }) })
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export {
|
|
247
|
+
CashBalanceLineChart
|
|
248
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-VLQZANBF.mjs";
|
|
4
|
+
|
|
5
|
+
// src/components/ui/financial-primitives.tsx
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
var NO_DATA = "\u2014";
|
|
8
|
+
function FinancialSectionLabel({
|
|
9
|
+
children
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ jsx("span", { className: "text-label-small uppercase text-muted-foreground", children });
|
|
12
|
+
}
|
|
13
|
+
function FinancialCardHeader({ children }) {
|
|
14
|
+
return /* @__PURE__ */ jsx("div", { className: "py-2.5", children: /* @__PURE__ */ jsx("span", { className: "text-label-small uppercase text-muted-foreground", children }) });
|
|
15
|
+
}
|
|
16
|
+
function FinancialSubsectionTitle({
|
|
17
|
+
children
|
|
18
|
+
}) {
|
|
19
|
+
return /* @__PURE__ */ jsx("span", { className: "text-label-medium uppercase text-foreground", children });
|
|
20
|
+
}
|
|
21
|
+
function FinancialDetailField({
|
|
22
|
+
label,
|
|
23
|
+
value,
|
|
24
|
+
variant = "caption"
|
|
25
|
+
}) {
|
|
26
|
+
if (variant === "footer") {
|
|
27
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col justify-between min-w-0", children: [
|
|
28
|
+
/* @__PURE__ */ jsx("span", { className: "text-overline text-muted-foreground", children: label }),
|
|
29
|
+
/* @__PURE__ */ jsx("span", { className: "text-label-medium text-foreground mt-1 break-words", children: value != null ? value : NO_DATA })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
const labelClass = variant === "caption" ? "block min-h-[2rem] text-caption text-muted-foreground" : "min-h-[1.75rem] text-overline text-muted-foreground";
|
|
33
|
+
return /* @__PURE__ */ jsxs(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
className: cn(
|
|
37
|
+
"min-w-0",
|
|
38
|
+
variant === "overline" && "flex flex-col gap-0.5"
|
|
39
|
+
),
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ jsx("span", { className: labelClass, children: label }),
|
|
42
|
+
/* @__PURE__ */ jsx("span", { className: "text-label-medium text-foreground break-words", children: value != null ? value : NO_DATA })
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
function FinancialLineItem({
|
|
48
|
+
label,
|
|
49
|
+
value,
|
|
50
|
+
destructive
|
|
51
|
+
}) {
|
|
52
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4 py-0.5", children: [
|
|
53
|
+
/* @__PURE__ */ jsx("span", { className: "text-body-small text-foreground", children: label }),
|
|
54
|
+
/* @__PURE__ */ jsx(
|
|
55
|
+
"span",
|
|
56
|
+
{
|
|
57
|
+
className: cn(
|
|
58
|
+
"text-label-medium whitespace-nowrap text-right",
|
|
59
|
+
destructive ? "text-destructive" : "text-foreground"
|
|
60
|
+
),
|
|
61
|
+
children: value || NO_DATA
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
] });
|
|
65
|
+
}
|
|
66
|
+
function FinancialLvrBar({
|
|
67
|
+
percent = 56,
|
|
68
|
+
label = "56% \u2014 Good"
|
|
69
|
+
}) {
|
|
70
|
+
const color = percent >= 80 ? "destructive" : percent >= 70 ? "warning" : "success";
|
|
71
|
+
const textClass = {
|
|
72
|
+
success: "text-success",
|
|
73
|
+
warning: "text-warning",
|
|
74
|
+
destructive: "text-destructive"
|
|
75
|
+
}[color];
|
|
76
|
+
const trackClass = {
|
|
77
|
+
success: "bg-success/15",
|
|
78
|
+
warning: "bg-warning/15",
|
|
79
|
+
destructive: "bg-destructive/15"
|
|
80
|
+
}[color];
|
|
81
|
+
const fillClass = {
|
|
82
|
+
success: "bg-success",
|
|
83
|
+
warning: "bg-warning",
|
|
84
|
+
destructive: "bg-destructive"
|
|
85
|
+
}[color];
|
|
86
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
87
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
88
|
+
/* @__PURE__ */ jsx("span", { className: "text-body-small text-muted-foreground", children: "LVR" }),
|
|
89
|
+
/* @__PURE__ */ jsx("span", { className: cn("text-label-medium", textClass), children: label })
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ jsx("div", { className: cn("h-2.5 w-full overflow-hidden", trackClass), children: /* @__PURE__ */ jsx(
|
|
92
|
+
"div",
|
|
93
|
+
{
|
|
94
|
+
className: cn("h-full", fillClass),
|
|
95
|
+
style: { width: `${Math.min(percent, 100)}%` }
|
|
96
|
+
}
|
|
97
|
+
) })
|
|
98
|
+
] });
|
|
99
|
+
}
|
|
100
|
+
function FinancialSubtotalFrame({
|
|
101
|
+
children
|
|
102
|
+
}) {
|
|
103
|
+
return /* @__PURE__ */ jsx("div", { className: "mt-auto border-t border-primary/20 bg-primary/10 px-4 py-3", children });
|
|
104
|
+
}
|
|
105
|
+
function FinancialSubtotalBlock({
|
|
106
|
+
monthlyAverage,
|
|
107
|
+
totalLast12Months,
|
|
108
|
+
label
|
|
109
|
+
}) {
|
|
110
|
+
const isSingle = monthlyAverage && !totalLast12Months;
|
|
111
|
+
return /* @__PURE__ */ jsxs(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
className: cn(
|
|
115
|
+
"flex flex-row items-center",
|
|
116
|
+
isSingle ? "justify-end" : "justify-between"
|
|
117
|
+
),
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ jsxs(
|
|
120
|
+
"div",
|
|
121
|
+
{
|
|
122
|
+
className: cn(
|
|
123
|
+
"flex flex-col gap-0.5",
|
|
124
|
+
isSingle ? "text-right" : "text-left"
|
|
125
|
+
),
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ jsx("span", { className: "min-h-[1.75rem] text-overline text-muted-foreground", children: label != null ? label : "Monthly Average" }),
|
|
128
|
+
/* @__PURE__ */ jsx("span", { className: "text-label-medium text-foreground", children: monthlyAverage != null ? monthlyAverage : NO_DATA })
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
),
|
|
132
|
+
!isSingle && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 text-right", children: [
|
|
133
|
+
/* @__PURE__ */ jsx("span", { className: "min-h-[1.75rem] text-overline text-muted-foreground", children: "Total Last 12 Months" }),
|
|
134
|
+
/* @__PURE__ */ jsx("span", { className: "text-label-medium text-foreground", children: totalLast12Months != null ? totalLast12Months : NO_DATA })
|
|
135
|
+
] })
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export {
|
|
142
|
+
FinancialSectionLabel,
|
|
143
|
+
FinancialCardHeader,
|
|
144
|
+
FinancialSubsectionTitle,
|
|
145
|
+
FinancialDetailField,
|
|
146
|
+
FinancialLineItem,
|
|
147
|
+
FinancialLvrBar,
|
|
148
|
+
FinancialSubtotalFrame,
|
|
149
|
+
FinancialSubtotalBlock
|
|
150
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Button,
|
|
3
3
|
buttonVariants
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2I5S2AMY.mjs";
|
|
5
5
|
import {
|
|
6
6
|
cn
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VLQZANBF.mjs";
|
|
8
8
|
import {
|
|
9
9
|
__objRest,
|
|
10
10
|
__spreadProps,
|
|
@@ -52,12 +52,7 @@ function CalendarChevron(_a) {
|
|
|
52
52
|
return /* @__PURE__ */ jsx(ChevronLeftIcon, __spreadValues({ className: cn("size-4", className) }, props));
|
|
53
53
|
}
|
|
54
54
|
if (orientation === "right") {
|
|
55
|
-
return /* @__PURE__ */ jsx(
|
|
56
|
-
ChevronRightIcon,
|
|
57
|
-
__spreadValues({
|
|
58
|
-
className: cn("size-4", className)
|
|
59
|
-
}, props)
|
|
60
|
-
);
|
|
55
|
+
return /* @__PURE__ */ jsx(ChevronRightIcon, __spreadValues({ className: cn("size-4", className) }, props));
|
|
61
56
|
}
|
|
62
57
|
return /* @__PURE__ */ jsx(ChevronDownIcon, __spreadValues({ className: cn("size-4", className) }, props));
|
|
63
58
|
}
|
|
@@ -124,7 +119,7 @@ function Calendar(_a) {
|
|
|
124
119
|
defaultClassNames.month_caption
|
|
125
120
|
),
|
|
126
121
|
dropdowns: cn(
|
|
127
|
-
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-
|
|
122
|
+
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-label-small",
|
|
128
123
|
defaultClassNames.dropdowns
|
|
129
124
|
),
|
|
130
125
|
dropdown_root: cn(
|
|
@@ -136,14 +131,14 @@ function Calendar(_a) {
|
|
|
136
131
|
defaultClassNames.dropdown
|
|
137
132
|
),
|
|
138
133
|
caption_label: cn(
|
|
139
|
-
"
|
|
140
|
-
captionLayout === "label" ? "text-
|
|
134
|
+
"select-none",
|
|
135
|
+
captionLayout === "label" ? "text-label-small" : "flex h-8 items-center gap-1 pr-1 pl-2 text-label-small [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
|
|
141
136
|
defaultClassNames.caption_label
|
|
142
137
|
),
|
|
143
138
|
table: "w-full border-collapse",
|
|
144
139
|
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
145
140
|
weekday: cn(
|
|
146
|
-
"flex-1 text-
|
|
141
|
+
"flex-1 text-caption font-normal text-muted-foreground select-none",
|
|
147
142
|
defaultClassNames.weekday
|
|
148
143
|
),
|
|
149
144
|
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
@@ -152,7 +147,7 @@ function Calendar(_a) {
|
|
|
152
147
|
defaultClassNames.week_number_header
|
|
153
148
|
),
|
|
154
149
|
week_number: cn(
|
|
155
|
-
"text-
|
|
150
|
+
"text-caption text-muted-foreground select-none",
|
|
156
151
|
defaultClassNames.week_number
|
|
157
152
|
),
|
|
158
153
|
day: cn(
|
|
@@ -162,10 +157,7 @@ function Calendar(_a) {
|
|
|
162
157
|
range_start: cn("bg-accent", defaultClassNames.range_start),
|
|
163
158
|
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
164
159
|
range_end: cn("bg-accent", defaultClassNames.range_end),
|
|
165
|
-
today: cn(
|
|
166
|
-
"bg-accent text-accent-foreground",
|
|
167
|
-
defaultClassNames.today
|
|
168
|
-
),
|
|
160
|
+
today: cn("bg-accent text-accent-foreground", defaultClassNames.today),
|
|
169
161
|
outside: cn(
|
|
170
162
|
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
171
163
|
defaultClassNames.outside
|
|
@@ -210,7 +202,7 @@ function CalendarDayButton(_a) {
|
|
|
210
202
|
Button,
|
|
211
203
|
__spreadValues({
|
|
212
204
|
className: cn(
|
|
213
|
-
"flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1
|
|
205
|
+
"flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 font-normal rounded-none group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-caption [&>span]:opacity-70",
|
|
214
206
|
defaultClassNames.day,
|
|
215
207
|
className
|
|
216
208
|
),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cn
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VLQZANBF.mjs";
|
|
4
4
|
import {
|
|
5
5
|
__objRest,
|
|
6
6
|
__spreadValues
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import { cva } from "class-variance-authority";
|
|
11
11
|
import { jsx } from "react/jsx-runtime";
|
|
12
12
|
var alertVariants = cva(
|
|
13
|
-
"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 border px-4 py-3 text-
|
|
13
|
+
"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 border px-4 py-3 text-body-small has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
14
14
|
{
|
|
15
15
|
variants: {
|
|
16
16
|
variant: {
|
|
@@ -27,13 +27,7 @@ var alertVariants = cva(
|
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
29
|
function Alert(_a) {
|
|
30
|
-
var _b = _a, {
|
|
31
|
-
className,
|
|
32
|
-
variant
|
|
33
|
-
} = _b, props = __objRest(_b, [
|
|
34
|
-
"className",
|
|
35
|
-
"variant"
|
|
36
|
-
]);
|
|
30
|
+
var _b = _a, { className, variant } = _b, props = __objRest(_b, ["className", "variant"]);
|
|
37
31
|
return /* @__PURE__ */ jsx(
|
|
38
32
|
"div",
|
|
39
33
|
__spreadValues({
|
|
@@ -49,7 +43,7 @@ function AlertTitle(_a) {
|
|
|
49
43
|
"div",
|
|
50
44
|
__spreadValues({
|
|
51
45
|
className: cn(
|
|
52
|
-
"col-start-2 line-clamp-1 min-h-4
|
|
46
|
+
"col-start-2 line-clamp-1 min-h-4 text-label-medium",
|
|
53
47
|
className
|
|
54
48
|
),
|
|
55
49
|
"data-slot": "alert-title"
|
|
@@ -66,7 +60,7 @@ function AlertDescription(_a) {
|
|
|
66
60
|
"div",
|
|
67
61
|
__spreadValues({
|
|
68
62
|
className: cn(
|
|
69
|
-
"col-start-2 grid justify-items-start gap-1 text-
|
|
63
|
+
"col-start-2 grid justify-items-start gap-1 text-body-small text-muted-foreground [&_p]:leading-relaxed",
|
|
70
64
|
className
|
|
71
65
|
),
|
|
72
66
|
"data-slot": "alert-description"
|