@wealthx/shadcn 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +203 -150
- package/CHANGELOG.md +29 -0
- package/dist/{chunk-4Y6R4WEC.mjs → chunk-2A5RRQGG.mjs} +9 -22
- package/dist/{chunk-TS2ZX2VS.mjs → chunk-2UM72RJ7.mjs} +11 -15
- package/dist/{chunk-A56YQQHG.mjs → chunk-3NCUZIFP.mjs} +2 -2
- package/dist/chunk-3OYFOX3X.mjs +79 -0
- package/dist/{chunk-RP3SQYA3.mjs → chunk-3TTACBDP.mjs} +9 -4
- package/dist/chunk-4GAWMKMI.mjs +710 -0
- package/dist/{chunk-SYOD63OZ.mjs → chunk-5FQIKDKP.mjs} +6 -6
- package/dist/{chunk-K3JYD4IU.mjs → chunk-5IS7G74I.mjs} +11 -4
- package/dist/chunk-6AW4KJHE.mjs +235 -0
- package/dist/chunk-6CR5N2JW.mjs +302 -0
- package/dist/{chunk-XIRTEFKH.mjs → chunk-6DZEXFNB.mjs} +36 -8
- package/dist/chunk-6O6KD7CE.mjs +271 -0
- package/dist/chunk-7PV3IWCN.mjs +33 -0
- package/dist/{chunk-SPJ5KXW7.mjs → chunk-7S5AESZO.mjs} +5 -5
- package/dist/{chunk-RYCLWMZ7.mjs → chunk-ABFDMHOR.mjs} +9 -7
- package/dist/{chunk-SWGT756Z.mjs → chunk-AMQZRHEZ.mjs} +10 -4
- package/dist/{chunk-WOEHFRGB.mjs → chunk-BDYZCBRT.mjs} +4 -4
- package/dist/{chunk-WAZD7NFU.mjs → chunk-BKNFWEH2.mjs} +6 -6
- package/dist/{chunk-CLIN5525.mjs → chunk-C7CQJNMR.mjs} +1 -1
- package/dist/{chunk-D4ILTPOG.mjs → chunk-CFMQP5QS.mjs} +5 -4
- package/dist/{chunk-VPBN3WOO.mjs → chunk-DGHAXJBN.mjs} +9 -7
- package/dist/chunk-DOEO3CDL.mjs +27 -0
- package/dist/{chunk-KUDCQ4FI.mjs → chunk-DUJTAXMH.mjs} +9 -4
- package/dist/{chunk-GGM2UYGG.mjs → chunk-EBXQWIYG.mjs} +10 -4
- package/dist/{chunk-PMB3A7V3.mjs → chunk-EI5F6FMT.mjs} +1 -1
- package/dist/chunk-EWRB4PAD.mjs +468 -0
- package/dist/chunk-FAKPBKLT.mjs +253 -0
- package/dist/chunk-FNQXOAYJ.mjs +169 -0
- package/dist/{chunk-4CX4SBRO.mjs → chunk-GHC7LLUX.mjs} +14 -5
- package/dist/chunk-HBZLGDIN.mjs +507 -0
- package/dist/{chunk-SIZMLSRU.mjs → chunk-HISNT2MG.mjs} +8 -6
- package/dist/{chunk-PR6V5XKM.mjs → chunk-HVY6KCCF.mjs} +7 -4
- package/dist/chunk-I3RZS7V2.mjs +136 -0
- package/dist/chunk-IAE3F7DR.mjs +1962 -0
- package/dist/{chunk-ZRO5JO3H.mjs → chunk-IHMFS7NZ.mjs} +81 -84
- package/dist/{chunk-PCPLO5HT.mjs → chunk-IOJRDS6V.mjs} +96 -14
- package/dist/{chunk-LHYCMLVA.mjs → chunk-JKGDCQTZ.mjs} +11 -4
- package/dist/{chunk-H45TKD34.mjs → chunk-JMHR3YGZ.mjs} +1 -1
- package/dist/{chunk-4MN6UQHG.mjs → chunk-K5A5L6T2.mjs} +17 -39
- package/dist/{chunk-CSDO6VBW.mjs → chunk-LBMRIB3G.mjs} +10 -10
- package/dist/chunk-LV35NGVG.mjs +272 -0
- package/dist/{chunk-FZIXGLMV.mjs → chunk-M3FV7LOK.mjs} +5 -12
- package/dist/{chunk-FMAXJ2SI.mjs → chunk-MBON7YRJ.mjs} +1 -1
- package/dist/chunk-MIZQHHUO.mjs +441 -0
- package/dist/chunk-MN5NYQCL.mjs +29 -0
- package/dist/chunk-NL3ZO62D.mjs +31 -0
- package/dist/{chunk-Q76O3RIQ.mjs → chunk-NMOI6CQD.mjs} +1 -1
- package/dist/{chunk-P6AM5V7O.mjs → chunk-OODBHKG7.mjs} +1 -1
- package/dist/chunk-PBL4OQV2.mjs +283 -0
- package/dist/{chunk-3WMX6KWS.mjs → chunk-PU4YZQXV.mjs} +11 -12
- package/dist/chunk-QMY3AZJH.mjs +80 -0
- package/dist/{chunk-BL3DXM2X.mjs → chunk-QZ4RE6NA.mjs} +11 -4
- package/dist/{chunk-VACKZOMY.mjs → chunk-R3VSPKNP.mjs} +3 -3
- package/dist/{chunk-OPNQAVVH.mjs → chunk-RJI6GKVF.mjs} +8 -6
- package/dist/{chunk-WG6JGJXB.mjs → chunk-T4BJLT57.mjs} +1 -1
- package/dist/chunk-U4NDAF2P.mjs +207 -0
- package/dist/{chunk-DOH3EHX7.mjs → chunk-U5X52X37.mjs} +1 -1
- package/dist/chunk-UMTOX62O.mjs +415 -0
- package/dist/{chunk-7MMXNK3C.mjs → chunk-VLARHE5V.mjs} +8 -6
- package/dist/{chunk-2I5S2AMY.mjs → chunk-XREGSKX3.mjs} +2 -2
- package/dist/{chunk-JNQORUPP.mjs → chunk-YJG55G2H.mjs} +14 -11
- package/dist/chunk-ZC45IGZO.mjs +388 -0
- package/dist/components/ui/add-column-modal.js +42 -14
- package/dist/components/ui/add-column-modal.mjs +4 -4
- package/dist/components/ui/add-lead-modal.js +42 -11
- package/dist/components/ui/add-lead-modal.mjs +3 -3
- package/dist/components/ui/advisor-card.js +497 -0
- package/dist/components/ui/advisor-card.mjs +13 -0
- package/dist/components/ui/ai-assistant-drawer.js +11 -10
- package/dist/components/ui/ai-assistant-drawer.mjs +3 -3
- package/dist/components/ui/alert-dialog.js +2 -2
- package/dist/components/ui/alert-dialog.mjs +2 -2
- package/dist/components/ui/appointment-action-dialogs.js +1160 -0
- package/dist/components/ui/appointment-action-dialogs.mjs +23 -0
- package/dist/components/ui/appointment-availability-settings.js +1590 -0
- package/dist/components/ui/appointment-availability-settings.mjs +23 -0
- package/dist/components/ui/appointment-book-dialog.js +1744 -0
- package/dist/components/ui/appointment-book-dialog.mjs +27 -0
- package/dist/components/ui/appointment-calendar-view.js +833 -0
- package/dist/components/ui/appointment-calendar-view.mjs +14 -0
- package/dist/components/ui/appointment-detail-sheet.js +1517 -0
- package/dist/components/ui/appointment-detail-sheet.mjs +24 -0
- package/dist/components/ui/appointment-gmail-connect.js +467 -0
- package/dist/components/ui/appointment-gmail-connect.mjs +14 -0
- package/dist/components/ui/appointment-mini-card.js +345 -0
- package/dist/components/ui/appointment-mini-card.mjs +11 -0
- package/dist/components/ui/appointment-time-slot-picker.js +311 -0
- package/dist/components/ui/appointment-time-slot-picker.mjs +13 -0
- package/dist/components/ui/appointment-upcoming-card.js +1268 -0
- package/dist/components/ui/appointment-upcoming-card.mjs +21 -0
- package/dist/components/ui/backoffice-alert-history-chart.js +11 -5
- package/dist/components/ui/backoffice-alert-history-chart.mjs +5 -4
- package/dist/components/ui/backoffice-alerts-chart.js +786 -0
- package/dist/components/ui/backoffice-alerts-chart.mjs +19 -0
- package/dist/components/ui/backoffice-connections-chart.js +817 -0
- package/dist/components/ui/backoffice-connections-chart.mjs +19 -0
- package/dist/components/ui/backoffice-contact-history-chart.js +11 -5
- package/dist/components/ui/backoffice-contact-history-chart.mjs +5 -4
- package/dist/components/ui/badge.js +6 -6
- package/dist/components/ui/badge.mjs +1 -1
- package/dist/components/ui/borrowing-capacity-line-chart.js +30 -21
- package/dist/components/ui/borrowing-capacity-line-chart.mjs +5 -4
- package/dist/components/ui/button.js +2 -2
- package/dist/components/ui/button.mjs +1 -1
- package/dist/components/ui/calendar.js +2 -2
- package/dist/components/ui/calendar.mjs +2 -2
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/card.mjs +1 -1
- package/dist/components/ui/cash-balance-line-chart.js +31 -23
- package/dist/components/ui/cash-balance-line-chart.mjs +5 -4
- package/dist/components/ui/cashflow-bar-chart.js +12 -5
- package/dist/components/ui/cashflow-bar-chart.mjs +5 -4
- package/dist/components/ui/chip.js +97 -18
- package/dist/components/ui/chip.mjs +3 -2
- package/dist/components/ui/color-picker.js +547 -0
- package/dist/components/ui/color-picker.mjs +24 -0
- package/dist/components/ui/data-table.js +182 -129
- package/dist/components/ui/data-table.mjs +3 -2
- package/dist/components/ui/date-picker.js +48 -27
- package/dist/components/ui/date-picker.mjs +4 -3
- package/dist/components/ui/dialog.js +37 -9
- package/dist/components/ui/dialog.mjs +2 -2
- package/dist/components/ui/expense-bar-chart.js +12 -5
- package/dist/components/ui/expense-bar-chart.mjs +5 -4
- package/dist/components/ui/field.mjs +2 -2
- package/dist/components/ui/financial-cards.js +322 -155
- package/dist/components/ui/financial-cards.mjs +5 -3
- package/dist/components/ui/financial-drawers.js +2 -2
- package/dist/components/ui/financial-drawers.mjs +3 -3
- package/dist/components/ui/financial-sections.js +14 -10
- package/dist/components/ui/financial-sections.mjs +6 -5
- package/dist/components/ui/form-primitives.js +4 -4
- package/dist/components/ui/form-primitives.mjs +3 -3
- package/dist/components/ui/income-bar-chart.js +12 -5
- package/dist/components/ui/income-bar-chart.mjs +5 -4
- package/dist/components/ui/input-group.js +2 -2
- package/dist/components/ui/input-group.mjs +2 -2
- package/dist/components/ui/kanban-column.js +52 -44
- package/dist/components/ui/kanban-column.mjs +7 -5
- package/dist/components/ui/opportunity-card.js +52 -44
- package/dist/components/ui/opportunity-card.mjs +6 -4
- package/dist/components/ui/opportunity-edit-modals.js +1371 -1267
- package/dist/components/ui/opportunity-edit-modals.mjs +10 -10
- package/dist/components/ui/opportunity-summary-tab.js +2748 -2161
- package/dist/components/ui/opportunity-summary-tab.mjs +16 -16
- package/dist/components/ui/page-header.js +92 -0
- package/dist/components/ui/page-header.mjs +8 -0
- package/dist/components/ui/page-top-bar.js +88 -0
- package/dist/components/ui/page-top-bar.mjs +8 -0
- package/dist/components/ui/pagination.js +303 -19
- package/dist/components/ui/pagination.mjs +11 -4
- package/dist/components/ui/pipeline-board.js +209 -195
- package/dist/components/ui/pipeline-board.mjs +10 -8
- package/dist/components/ui/pipeline-dialogs.js +118 -69
- package/dist/components/ui/pipeline-dialogs.mjs +8 -7
- package/dist/components/ui/pipeline-primitives.js +6 -6
- package/dist/components/ui/pipeline-primitives.mjs +2 -2
- package/dist/components/ui/property-cashflow-doughnut-chart.js +14 -12
- package/dist/components/ui/property-cashflow-doughnut-chart.mjs +5 -4
- package/dist/components/ui/property-debt-equity-doughnut-chart.js +14 -12
- package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +5 -4
- package/dist/components/ui/property-mobile-estimate-line-chart.js +16 -14
- package/dist/components/ui/property-mobile-estimate-line-chart.mjs +5 -4
- package/dist/components/ui/sidebar-nav.js +679 -0
- package/dist/components/ui/sidebar-nav.mjs +14 -0
- package/dist/components/ui/stage-timeline.js +6 -6
- package/dist/components/ui/stage-timeline.mjs +3 -3
- package/dist/components/ui/stepper.js +283 -0
- package/dist/components/ui/stepper.mjs +18 -0
- package/dist/components/ui/toggle-group.js +4 -4
- package/dist/components/ui/toggle-group.mjs +2 -2
- package/dist/components/ui/toggle.js +4 -4
- package/dist/components/ui/toggle.mjs +1 -1
- package/dist/components/ui/transactions-expense-categories-doughnut-chart.js +18 -16
- package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +5 -4
- package/dist/components/ui/transactions-income-expense-bar-chart.js +28 -12
- package/dist/components/ui/transactions-income-expense-bar-chart.mjs +5 -4
- package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.js +18 -16
- package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +5 -4
- package/dist/index.js +12927 -8522
- package/dist/index.mjs +288 -190
- package/dist/lib/typography.js +10 -10
- package/dist/lib/typography.mjs +1 -1
- package/dist/styles.css +1 -1
- package/package.json +86 -1
- package/src/components/index.tsx +146 -0
- package/src/components/ui/add-column-modal.tsx +7 -7
- package/src/components/ui/add-lead-modal.tsx +6 -3
- package/src/components/ui/advisor-card.tsx +227 -0
- package/src/components/ui/ai-assistant-drawer.tsx +4 -3
- package/src/components/ui/appointment-action-dialogs.tsx +297 -0
- package/src/components/ui/appointment-availability-settings.tsx +645 -0
- package/src/components/ui/appointment-book-dialog.tsx +618 -0
- package/src/components/ui/appointment-calendar-view.tsx +510 -0
- package/src/components/ui/appointment-detail-sheet.tsx +415 -0
- package/src/components/ui/appointment-gmail-connect.tsx +188 -0
- package/src/components/ui/appointment-mini-card.tsx +104 -0
- package/src/components/ui/appointment-time-slot-picker.tsx +123 -0
- package/src/components/ui/appointment-upcoming-card.tsx +635 -0
- package/src/components/ui/backoffice-alert-history-chart.tsx +10 -2
- package/src/components/ui/backoffice-alerts-chart.tsx +312 -0
- package/src/components/ui/backoffice-connections-chart.tsx +339 -0
- package/src/components/ui/backoffice-contact-history-chart.tsx +10 -2
- package/src/components/ui/badge.tsx +12 -6
- package/src/components/ui/borrowing-capacity-line-chart.tsx +4 -11
- package/src/components/ui/button.tsx +2 -2
- package/src/components/ui/card.tsx +1 -1
- package/src/components/ui/cash-balance-line-chart.tsx +4 -23
- package/src/components/ui/cashflow-bar-chart.tsx +9 -2
- package/src/components/ui/chart-shared.tsx +4 -11
- package/src/components/ui/chip.tsx +23 -19
- package/src/components/ui/color-picker.tsx +309 -0
- package/src/components/ui/data-table.tsx +117 -83
- package/src/components/ui/date-picker.tsx +42 -37
- package/src/components/ui/dialog.tsx +72 -6
- package/src/components/ui/expense-bar-chart.tsx +11 -2
- package/src/components/ui/financial-cards.tsx +99 -10
- package/src/components/ui/income-bar-chart.tsx +11 -2
- package/src/components/ui/opportunity-card.tsx +10 -39
- package/src/components/ui/opportunity-edit-modals.tsx +98 -36
- package/src/components/ui/opportunity-summary-tab.tsx +548 -232
- package/src/components/ui/page-header.tsx +57 -0
- package/src/components/ui/page-top-bar.tsx +48 -0
- package/src/components/ui/pagination.tsx +171 -22
- package/src/components/ui/pipeline-board.tsx +12 -5
- package/src/components/ui/property-cashflow-doughnut-chart.tsx +3 -1
- package/src/components/ui/property-debt-equity-doughnut-chart.tsx +3 -1
- package/src/components/ui/property-mobile-estimate-line-chart.tsx +3 -1
- package/src/components/ui/sidebar-nav.tsx +516 -0
- package/src/components/ui/stepper.tsx +347 -0
- package/src/components/ui/toggle.tsx +4 -4
- package/src/components/ui/transactions-expense-categories-doughnut-chart.tsx +3 -1
- package/src/components/ui/transactions-income-expense-bar-chart.tsx +12 -9
- package/src/components/ui/transactions-liabilities-breakdown-doughnut-chart.tsx +3 -1
- package/src/lib/format-currency.ts +44 -0
- package/src/lib/format-date.ts +50 -0
- package/src/lib/opportunity-constants.ts +12 -0
- package/src/lib/typography.ts +11 -11
- package/src/styles/globals.css +36 -34
- package/src/styles/styles-css.ts +1 -1
- package/tsup.config.ts +17 -0
- package/dist/chunk-PG6K5XEC.mjs +0 -475
- package/dist/chunk-WA6O6EUR.mjs +0 -1885
- package/dist/chunk-WNGWBVLV.mjs +0 -148
- package/dist/{chunk-LLVQKSU3.mjs → chunk-GD4BJDJR.mjs} +3 -3
|
@@ -267,12 +267,12 @@ var badgeVariants = (0, import_class_variance_authority.cva)(
|
|
|
267
267
|
{
|
|
268
268
|
variants: {
|
|
269
269
|
variant: {
|
|
270
|
-
default: "bg-primary text-
|
|
271
|
-
secondary: "bg-muted text-muted-foreground [a&]:hover:bg-muted/80",
|
|
272
|
-
destructive: "bg-destructive text-destructive-
|
|
273
|
-
success: "bg-success text-success-
|
|
274
|
-
warning: "bg-warning text-warning-
|
|
275
|
-
info: "bg-info text-info-
|
|
270
|
+
default: "border-primary/40 bg-primary/10 text-foreground [a&]:hover:bg-primary/15",
|
|
271
|
+
secondary: "border-border bg-muted text-muted-foreground [a&]:hover:bg-muted/80",
|
|
272
|
+
destructive: "border-destructive/40 bg-destructive/10 text-destructive-text focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/15",
|
|
273
|
+
success: "border-success/40 bg-success/10 text-success-text [a&]:hover:bg-success/15",
|
|
274
|
+
warning: "border-warning/40 bg-warning/10 text-warning-text [a&]:hover:bg-warning/15",
|
|
275
|
+
info: "border-info/40 bg-info/10 text-info-text [a&]:hover:bg-info/15",
|
|
276
276
|
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
277
277
|
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
278
278
|
link: "text-primary underline-offset-4 [a&]:hover:underline"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StageTimeline
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-T4BJLT57.mjs";
|
|
4
4
|
import "../../chunk-J5UICVJS.mjs";
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-MBON7YRJ.mjs";
|
|
6
|
+
import "../../chunk-BKNFWEH2.mjs";
|
|
7
7
|
import "../../chunk-MARPPFOJ.mjs";
|
|
8
8
|
import "../../chunk-RGVKLTLH.mjs";
|
|
9
9
|
import "../../chunk-7YAU5CY6.mjs";
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/components/ui/stepper.tsx
|
|
31
|
+
var stepper_exports = {};
|
|
32
|
+
__export(stepper_exports, {
|
|
33
|
+
Step: () => Step,
|
|
34
|
+
StepContent: () => StepContent,
|
|
35
|
+
StepIndicator: () => StepIndicator,
|
|
36
|
+
StepItem: () => StepItem,
|
|
37
|
+
StepLabel: () => StepLabel,
|
|
38
|
+
Stepper: () => Stepper
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(stepper_exports);
|
|
41
|
+
var React = __toESM(require("react"));
|
|
42
|
+
var import_lucide_react = require("lucide-react");
|
|
43
|
+
|
|
44
|
+
// src/lib/utils.ts
|
|
45
|
+
var import_clsx = require("clsx");
|
|
46
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
47
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
48
|
+
extend: {
|
|
49
|
+
classGroups: {
|
|
50
|
+
"font-size": [
|
|
51
|
+
{
|
|
52
|
+
text: [
|
|
53
|
+
"display-large",
|
|
54
|
+
"display-medium",
|
|
55
|
+
"display-small",
|
|
56
|
+
"h1",
|
|
57
|
+
"h2",
|
|
58
|
+
"h3",
|
|
59
|
+
"h4",
|
|
60
|
+
"h5",
|
|
61
|
+
"h6",
|
|
62
|
+
"body-large",
|
|
63
|
+
"body-medium",
|
|
64
|
+
"body-small",
|
|
65
|
+
"label-large",
|
|
66
|
+
"label-medium",
|
|
67
|
+
"label-small",
|
|
68
|
+
"button",
|
|
69
|
+
"button-xs",
|
|
70
|
+
"caption",
|
|
71
|
+
"overline",
|
|
72
|
+
"code"
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
function cn(...inputs) {
|
|
80
|
+
return twMerge((0, import_clsx.clsx)(inputs));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// src/components/ui/stepper.tsx
|
|
84
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
85
|
+
var StepperContext = React.createContext({
|
|
86
|
+
activeStep: 0,
|
|
87
|
+
orientation: "horizontal",
|
|
88
|
+
totalSteps: 0
|
|
89
|
+
});
|
|
90
|
+
var StepContext = React.createContext({
|
|
91
|
+
index: 0,
|
|
92
|
+
isActive: false,
|
|
93
|
+
isCompleted: false,
|
|
94
|
+
isFirst: true,
|
|
95
|
+
isLast: false
|
|
96
|
+
});
|
|
97
|
+
function Stepper({
|
|
98
|
+
activeStep = 0,
|
|
99
|
+
orientation = "horizontal",
|
|
100
|
+
className,
|
|
101
|
+
children
|
|
102
|
+
}) {
|
|
103
|
+
const totalSteps = React.Children.count(children);
|
|
104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StepperContext.Provider, { value: { activeStep, orientation, totalSteps }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
105
|
+
"div",
|
|
106
|
+
{
|
|
107
|
+
"data-slot": "stepper",
|
|
108
|
+
className: cn(
|
|
109
|
+
"font-sans",
|
|
110
|
+
orientation === "horizontal" ? "flex w-full items-start" : "flex flex-col",
|
|
111
|
+
className
|
|
112
|
+
),
|
|
113
|
+
children: React.Children.map(
|
|
114
|
+
children,
|
|
115
|
+
(step, index) => React.isValidElement(step) ? React.cloneElement(
|
|
116
|
+
step,
|
|
117
|
+
{ _index: index }
|
|
118
|
+
) : step
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
) });
|
|
122
|
+
}
|
|
123
|
+
function Step({ _index = 0, error, className, children }) {
|
|
124
|
+
const { activeStep, orientation, totalSteps } = React.useContext(StepperContext);
|
|
125
|
+
const isActive = _index === activeStep;
|
|
126
|
+
const isCompleted = _index < activeStep;
|
|
127
|
+
const isFirst = _index === 0;
|
|
128
|
+
const isLast = _index === totalSteps - 1;
|
|
129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
130
|
+
StepContext.Provider,
|
|
131
|
+
{
|
|
132
|
+
value: { index: _index, isActive, isCompleted, isFirst, isLast },
|
|
133
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
134
|
+
"div",
|
|
135
|
+
{
|
|
136
|
+
"data-slot": "step",
|
|
137
|
+
"aria-current": isActive ? "step" : void 0,
|
|
138
|
+
"data-active": isActive || void 0,
|
|
139
|
+
"data-completed": isCompleted || void 0,
|
|
140
|
+
"data-error": error || void 0,
|
|
141
|
+
className: cn(
|
|
142
|
+
orientation === "horizontal" ? "flex flex-1 flex-col items-center" : "flex flex-row gap-3",
|
|
143
|
+
className
|
|
144
|
+
),
|
|
145
|
+
children
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
function StepIndicator({ error, className }) {
|
|
152
|
+
const { orientation } = React.useContext(StepperContext);
|
|
153
|
+
const { index, isActive, isCompleted, isFirst, isLast } = React.useContext(StepContext);
|
|
154
|
+
const filled = isActive || isCompleted;
|
|
155
|
+
const circle = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
156
|
+
"div",
|
|
157
|
+
{
|
|
158
|
+
className: cn(
|
|
159
|
+
"relative z-10 flex size-8 shrink-0 items-center justify-center rounded-full text-sm font-medium transition-colors",
|
|
160
|
+
!filled && !error && "border-2 border-border bg-background text-muted-foreground",
|
|
161
|
+
isActive && !error && "border-2 border-primary bg-primary text-primary-foreground",
|
|
162
|
+
isCompleted && !error && "bg-primary text-primary-foreground",
|
|
163
|
+
error && "border-2 border-destructive bg-destructive text-destructive-foreground"
|
|
164
|
+
),
|
|
165
|
+
children: isCompleted && !error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { className: "size-4", strokeWidth: 2.5 }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: index + 1 })
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
if (orientation === "horizontal") {
|
|
169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
170
|
+
"div",
|
|
171
|
+
{
|
|
172
|
+
"data-slot": "step-indicator",
|
|
173
|
+
className: cn("flex w-full items-center", className),
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
176
|
+
"div",
|
|
177
|
+
{
|
|
178
|
+
className: cn(
|
|
179
|
+
"h-[2px] flex-1 transition-colors",
|
|
180
|
+
isFirst ? "bg-transparent" : isActive || isCompleted ? "bg-primary" : "bg-border"
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
circle,
|
|
185
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
186
|
+
"div",
|
|
187
|
+
{
|
|
188
|
+
className: cn(
|
|
189
|
+
"h-[2px] flex-1 transition-colors",
|
|
190
|
+
isLast ? "bg-transparent" : isCompleted ? "bg-primary" : "bg-border"
|
|
191
|
+
)
|
|
192
|
+
}
|
|
193
|
+
)
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
199
|
+
"div",
|
|
200
|
+
{
|
|
201
|
+
"data-slot": "step-indicator",
|
|
202
|
+
className: cn("flex w-8 shrink-0 flex-col items-center", className),
|
|
203
|
+
children: [
|
|
204
|
+
circle,
|
|
205
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
206
|
+
"div",
|
|
207
|
+
{
|
|
208
|
+
"data-slot": "step-connector",
|
|
209
|
+
className: cn(
|
|
210
|
+
"mt-1 w-[2px] flex-1 transition-colors",
|
|
211
|
+
isActive || isCompleted ? "bg-primary" : "bg-border"
|
|
212
|
+
)
|
|
213
|
+
}
|
|
214
|
+
)
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
function StepLabel({
|
|
220
|
+
children,
|
|
221
|
+
description,
|
|
222
|
+
error,
|
|
223
|
+
className
|
|
224
|
+
}) {
|
|
225
|
+
const { orientation } = React.useContext(StepperContext);
|
|
226
|
+
const { isActive, isCompleted, isLast } = React.useContext(StepContext);
|
|
227
|
+
const subtext = typeof error === "string" ? error : description;
|
|
228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
229
|
+
"div",
|
|
230
|
+
{
|
|
231
|
+
"data-slot": "step-label",
|
|
232
|
+
className: cn(
|
|
233
|
+
"flex flex-col",
|
|
234
|
+
orientation === "horizontal" ? "mt-2 items-center text-center" : cn("flex-1", !isLast && "pb-5"),
|
|
235
|
+
className
|
|
236
|
+
),
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
239
|
+
"span",
|
|
240
|
+
{
|
|
241
|
+
className: cn(
|
|
242
|
+
"text-sm font-medium leading-tight transition-colors",
|
|
243
|
+
(isActive || isCompleted) && !error && "text-foreground",
|
|
244
|
+
!isActive && !isCompleted && !error && "text-muted-foreground",
|
|
245
|
+
error && "text-destructive"
|
|
246
|
+
),
|
|
247
|
+
children
|
|
248
|
+
}
|
|
249
|
+
),
|
|
250
|
+
subtext && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
251
|
+
"span",
|
|
252
|
+
{
|
|
253
|
+
className: cn(
|
|
254
|
+
"mt-0.5 text-xs",
|
|
255
|
+
error ? "text-destructive" : "text-muted-foreground"
|
|
256
|
+
),
|
|
257
|
+
children: subtext
|
|
258
|
+
}
|
|
259
|
+
)
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
function StepContent({ className, children }) {
|
|
265
|
+
const { isActive } = React.useContext(StepContext);
|
|
266
|
+
if (!isActive) return null;
|
|
267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-slot": "step-content", className: cn("pb-4 pt-2", className), children });
|
|
268
|
+
}
|
|
269
|
+
function StepItem({ label, description, error }) {
|
|
270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
271
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StepIndicator, { error: !!error }),
|
|
272
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StepLabel, { description, error, children: label })
|
|
273
|
+
] });
|
|
274
|
+
}
|
|
275
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
276
|
+
0 && (module.exports = {
|
|
277
|
+
Step,
|
|
278
|
+
StepContent,
|
|
279
|
+
StepIndicator,
|
|
280
|
+
StepItem,
|
|
281
|
+
StepLabel,
|
|
282
|
+
Stepper
|
|
283
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Step,
|
|
3
|
+
StepContent,
|
|
4
|
+
StepIndicator,
|
|
5
|
+
StepItem,
|
|
6
|
+
StepLabel,
|
|
7
|
+
Stepper
|
|
8
|
+
} from "../../chunk-U4NDAF2P.mjs";
|
|
9
|
+
import "../../chunk-VLQZANBF.mjs";
|
|
10
|
+
import "../../chunk-FWCSY2DS.mjs";
|
|
11
|
+
export {
|
|
12
|
+
Step,
|
|
13
|
+
StepContent,
|
|
14
|
+
StepIndicator,
|
|
15
|
+
StepItem,
|
|
16
|
+
StepLabel,
|
|
17
|
+
Stepper
|
|
18
|
+
};
|
|
@@ -111,7 +111,7 @@ var import_class_variance_authority = require("class-variance-authority");
|
|
|
111
111
|
var import_toggle = require("@base-ui/react/toggle");
|
|
112
112
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
113
113
|
var toggleVariants = (0, import_class_variance_authority.cva)(
|
|
114
|
-
"inline-flex items-center justify-center gap-2
|
|
114
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-pressed:bg-primary/10 data-pressed:inset-ring data-pressed:inset-ring-primary data-pressed:text-foreground data-pressed:hover:bg-primary/10 data-pressed:hover:text-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
115
115
|
{
|
|
116
116
|
variants: {
|
|
117
117
|
variant: {
|
|
@@ -119,9 +119,9 @@ var toggleVariants = (0, import_class_variance_authority.cva)(
|
|
|
119
119
|
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
120
120
|
},
|
|
121
121
|
size: {
|
|
122
|
-
default: "h-9 min-w-9 px-2",
|
|
123
|
-
sm: "h-8 min-w-8 px-1.5 text-
|
|
124
|
-
lg: "h-10 min-w-10 px-2.5"
|
|
122
|
+
default: "h-9 min-w-9 px-2 text-label-large",
|
|
123
|
+
sm: "h-8 min-w-8 px-1.5 text-label-medium",
|
|
124
|
+
lg: "h-10 min-w-10 px-2.5 text-h5"
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
127
|
defaultVariants: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ToggleGroup,
|
|
3
3
|
ToggleGroupItem
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-EI5F6FMT.mjs";
|
|
5
|
+
import "../../chunk-BDYZCBRT.mjs";
|
|
6
6
|
import "../../chunk-VLQZANBF.mjs";
|
|
7
7
|
import "../../chunk-FWCSY2DS.mjs";
|
|
8
8
|
export {
|
|
@@ -95,7 +95,7 @@ function cn(...inputs) {
|
|
|
95
95
|
// src/components/ui/toggle.tsx
|
|
96
96
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
97
97
|
var toggleVariants = (0, import_class_variance_authority.cva)(
|
|
98
|
-
"inline-flex items-center justify-center gap-2
|
|
98
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-pressed:bg-primary/10 data-pressed:inset-ring data-pressed:inset-ring-primary data-pressed:text-foreground data-pressed:hover:bg-primary/10 data-pressed:hover:text-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
99
99
|
{
|
|
100
100
|
variants: {
|
|
101
101
|
variant: {
|
|
@@ -103,9 +103,9 @@ var toggleVariants = (0, import_class_variance_authority.cva)(
|
|
|
103
103
|
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
104
104
|
},
|
|
105
105
|
size: {
|
|
106
|
-
default: "h-9 min-w-9 px-2",
|
|
107
|
-
sm: "h-8 min-w-8 px-1.5 text-
|
|
108
|
-
lg: "h-10 min-w-10 px-2.5"
|
|
106
|
+
default: "h-9 min-w-9 px-2 text-label-large",
|
|
107
|
+
sm: "h-8 min-w-8 px-1.5 text-label-medium",
|
|
108
|
+
lg: "h-10 min-w-10 px-2.5 text-h5"
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
defaultVariants: {
|
|
@@ -134,7 +134,7 @@ function CardHeader(_a) {
|
|
|
134
134
|
"div",
|
|
135
135
|
__spreadValues({
|
|
136
136
|
className: cn(
|
|
137
|
-
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-
|
|
137
|
+
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-center gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
138
138
|
className
|
|
139
139
|
),
|
|
140
140
|
"data-slot": "card-header"
|
|
@@ -285,10 +285,10 @@ var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
|
285
285
|
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
286
286
|
secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
|
|
287
287
|
destructive: "bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
288
|
-
outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
288
|
+
outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground focus-visible:ring-border/50 dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
289
289
|
"outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
|
|
290
290
|
"outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:ring-brand-secondary/30",
|
|
291
|
-
ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs dark:hover:bg-accent/50",
|
|
291
|
+
ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs focus-visible:ring-border/50 dark:hover:bg-accent/50",
|
|
292
292
|
link: "text-primary underline-offset-4 hover:underline"
|
|
293
293
|
},
|
|
294
294
|
size: {
|
|
@@ -349,6 +349,17 @@ var Button = (0, import_react2.forwardRef)(function Button2(_a, ref) {
|
|
|
349
349
|
);
|
|
350
350
|
});
|
|
351
351
|
|
|
352
|
+
// src/lib/format-currency.ts
|
|
353
|
+
function formatCurrencyAbbrev(value) {
|
|
354
|
+
const abs = Math.abs(value);
|
|
355
|
+
const sign = value < 0 ? "-" : "";
|
|
356
|
+
if (abs >= 1e9)
|
|
357
|
+
return `${sign}$${(abs / 1e9).toFixed(1)}B`;
|
|
358
|
+
if (abs >= 1e6) return `${sign}$${(abs / 1e6).toFixed(1)}M`;
|
|
359
|
+
if (abs >= 1e3) return `${sign}$${(abs / 1e3).toFixed(0)}K`;
|
|
360
|
+
return `${sign}$${abs.toFixed(0)}`;
|
|
361
|
+
}
|
|
362
|
+
|
|
352
363
|
// src/components/ui/chart-shared.tsx
|
|
353
364
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
354
365
|
function hexToRgba(hex, alpha) {
|
|
@@ -361,15 +372,6 @@ function hexToRgba(hex, alpha) {
|
|
|
361
372
|
}
|
|
362
373
|
var DATASET_ALPHAS = [1, 0.72, 0.52, 0.36, 0.24, 0.15];
|
|
363
374
|
var FALLBACK_PRIMARY = "#33FF99";
|
|
364
|
-
function formatAbbrev(value) {
|
|
365
|
-
const abs = Math.abs(value);
|
|
366
|
-
const sign = value < 0 ? "-" : "";
|
|
367
|
-
if (abs >= 1e9)
|
|
368
|
-
return `${sign}$${(abs / 1e9).toFixed(1)}B`;
|
|
369
|
-
if (abs >= 1e6) return `${sign}$${(abs / 1e6).toFixed(1)}M`;
|
|
370
|
-
if (abs >= 1e3) return `${sign}$${(abs / 1e3).toFixed(0)}K`;
|
|
371
|
-
return `${sign}$${abs.toFixed(0)}`;
|
|
372
|
-
}
|
|
373
375
|
function DoughnutLegendRow({
|
|
374
376
|
label,
|
|
375
377
|
color,
|
|
@@ -393,7 +395,7 @@ function DoughnutLegendRow({
|
|
|
393
395
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-[11px] text-muted-foreground leading-none truncate", children: label })
|
|
394
396
|
] }),
|
|
395
397
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
396
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-[11px] font-medium leading-none", children:
|
|
398
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-[11px] font-medium leading-none", children: formatCurrencyAbbrev(value) }),
|
|
397
399
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-[11px] text-muted-foreground leading-none w-10 text-right", children: percent })
|
|
398
400
|
] })
|
|
399
401
|
] });
|
|
@@ -462,7 +464,7 @@ function TransactionsExpenseCategoriesDoughnutChart({
|
|
|
462
464
|
label: (ctx) => {
|
|
463
465
|
const val = ctx.raw;
|
|
464
466
|
const pct = total > 0 ? `${(val / total * 100).toFixed(1)}%` : "0%";
|
|
465
|
-
return ` ${ctx.label}: ${
|
|
467
|
+
return ` ${ctx.label}: ${formatCurrencyAbbrev(val)} (${pct})`;
|
|
466
468
|
}
|
|
467
469
|
}
|
|
468
470
|
}
|
|
@@ -476,7 +478,7 @@ function TransactionsExpenseCategoriesDoughnutChart({
|
|
|
476
478
|
className: cn("w-full py-4 sm:py-6 gap-2", className),
|
|
477
479
|
style: { maxWidth: width, fontFamily },
|
|
478
480
|
children: [
|
|
479
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardHeader, { className: "px-3 sm:px-6", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardTitle, { className: "text-
|
|
481
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardHeader, { className: "px-3 sm:px-6", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardTitle, { className: "text-xs font-semibold uppercase tracking-wide", children: title }) }),
|
|
480
482
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardContent, { className: "px-3 sm:px-6", children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Skeleton, { style: { height, width: "100%" } }) : !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-4", children: [
|
|
481
483
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { height, width: "100%", position: "relative" }, children: [
|
|
482
484
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
@@ -501,7 +503,7 @@ function TransactionsExpenseCategoriesDoughnutChart({
|
|
|
501
503
|
pointerEvents: "none"
|
|
502
504
|
},
|
|
503
505
|
children: [
|
|
504
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "text-base font-semibold leading-tight", children:
|
|
506
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "text-base font-semibold leading-tight", children: formatCurrencyAbbrev(total) }),
|
|
505
507
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "text-[11px] text-muted-foreground leading-none mt-1", children: "Total" })
|
|
506
508
|
]
|
|
507
509
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TransactionsExpenseCategoriesDoughnutChart
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-RJI6GKVF.mjs";
|
|
4
4
|
import "../../chunk-D6ID6M4V.mjs";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-M3FV7LOK.mjs";
|
|
6
|
+
import "../../chunk-MN5NYQCL.mjs";
|
|
6
7
|
import "../../chunk-NQPOYKAQ.mjs";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-C7CQJNMR.mjs";
|
|
9
|
+
import "../../chunk-XREGSKX3.mjs";
|
|
9
10
|
import "../../chunk-DBHJ5KC3.mjs";
|
|
10
11
|
import "../../chunk-FEZKMUCF.mjs";
|
|
11
12
|
import "../../chunk-QOJ2DQD6.mjs";
|
|
@@ -135,7 +135,7 @@ function CardHeader(_a) {
|
|
|
135
135
|
"div",
|
|
136
136
|
__spreadValues({
|
|
137
137
|
className: cn(
|
|
138
|
-
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-
|
|
138
|
+
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-center gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
139
139
|
className
|
|
140
140
|
),
|
|
141
141
|
"data-slot": "card-header"
|
|
@@ -240,6 +240,22 @@ function Spinner(_a) {
|
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
+
// src/lib/format-currency.ts
|
|
244
|
+
function formatCurrency(value, options) {
|
|
245
|
+
const { decimals = 0, showSign = false } = options != null ? options : {};
|
|
246
|
+
const abs = Math.abs(value);
|
|
247
|
+
const formatted = new Intl.NumberFormat("en-AU", {
|
|
248
|
+
style: "currency",
|
|
249
|
+
currency: "AUD",
|
|
250
|
+
minimumFractionDigits: decimals,
|
|
251
|
+
maximumFractionDigits: decimals
|
|
252
|
+
}).format(abs);
|
|
253
|
+
if (!showSign) return value < 0 ? `-${formatted}` : formatted;
|
|
254
|
+
if (value > 0) return `+${formatted}`;
|
|
255
|
+
if (value < 0) return `-${formatted}`;
|
|
256
|
+
return formatted;
|
|
257
|
+
}
|
|
258
|
+
|
|
243
259
|
// src/components/ui/button.tsx
|
|
244
260
|
var import_react2 = require("react");
|
|
245
261
|
var import_class_variance_authority3 = require("class-variance-authority");
|
|
@@ -302,10 +318,10 @@ var buttonVariants = (0, import_class_variance_authority3.cva)(
|
|
|
302
318
|
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
303
319
|
secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
|
|
304
320
|
destructive: "bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
305
|
-
outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
321
|
+
outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground focus-visible:ring-border/50 dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
306
322
|
"outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
|
|
307
323
|
"outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:ring-brand-secondary/30",
|
|
308
|
-
ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs dark:hover:bg-accent/50",
|
|
324
|
+
ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs focus-visible:ring-border/50 dark:hover:bg-accent/50",
|
|
309
325
|
link: "text-primary underline-offset-4 hover:underline"
|
|
310
326
|
},
|
|
311
327
|
size: {
|
|
@@ -374,13 +390,13 @@ var FALLBACK_TICK = "#9EAAB5";
|
|
|
374
390
|
|
|
375
391
|
// src/components/ui/transactions-income-expense-bar-chart.tsx
|
|
376
392
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
377
|
-
import_chart.Chart.register(
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
393
|
+
import_chart.Chart.register(
|
|
394
|
+
import_chart.CategoryScale,
|
|
395
|
+
import_chart.LinearScale,
|
|
396
|
+
import_chart.BarController,
|
|
397
|
+
import_chart.BarElement,
|
|
398
|
+
import_chart.Tooltip
|
|
399
|
+
);
|
|
384
400
|
function TransactionsIncomeExpenseBarChart({
|
|
385
401
|
totalIncome,
|
|
386
402
|
totalExpense,
|
|
@@ -423,7 +439,7 @@ function TransactionsIncomeExpenseBarChart({
|
|
|
423
439
|
color: FALLBACK_SECONDARY,
|
|
424
440
|
textAlign: "left",
|
|
425
441
|
// Returns array for multi-line: dollar value on line 1, blank on line 2
|
|
426
|
-
formatter: (v) => [
|
|
442
|
+
formatter: (v) => [formatCurrency(v, { decimals: 2 }), ""]
|
|
427
443
|
},
|
|
428
444
|
name: {
|
|
429
445
|
anchor: "end",
|
|
@@ -487,7 +503,7 @@ function TransactionsIncomeExpenseBarChart({
|
|
|
487
503
|
className: cn("w-full py-4 sm:py-6 gap-2", className),
|
|
488
504
|
style: { maxWidth: width, fontFamily },
|
|
489
505
|
children: [
|
|
490
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardHeader, { className: "px-3 sm:px-6", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardTitle, { className: "text-
|
|
506
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardHeader, { className: "px-3 sm:px-6", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardTitle, { className: "text-xs font-semibold uppercase tracking-wide", children: title }) }),
|
|
491
507
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardContent, { className: "px-3 sm:px-6", children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
492
508
|
"div",
|
|
493
509
|
{
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TransactionsIncomeExpenseBarChart
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-YJG55G2H.mjs";
|
|
4
|
+
import "../../chunk-M3FV7LOK.mjs";
|
|
5
|
+
import "../../chunk-MN5NYQCL.mjs";
|
|
5
6
|
import "../../chunk-NQPOYKAQ.mjs";
|
|
6
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-C7CQJNMR.mjs";
|
|
7
8
|
import "../../chunk-7YAU5CY6.mjs";
|
|
8
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-XREGSKX3.mjs";
|
|
9
10
|
import "../../chunk-DBHJ5KC3.mjs";
|
|
10
11
|
import "../../chunk-FEZKMUCF.mjs";
|
|
11
12
|
import "../../chunk-QOJ2DQD6.mjs";
|