@wealthx/shadcn 1.2.2 → 1.3.1
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 +193 -149
- package/CHANGELOG.md +28 -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-VGSESELX.mjs → chunk-5FQIKDKP.mjs} +5 -5
- 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-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-5MEWU56Z.mjs → chunk-DUJTAXMH.mjs} +11 -6
- package/dist/{chunk-GGM2UYGG.mjs → chunk-EBXQWIYG.mjs} +10 -4
- package/dist/chunk-EWRB4PAD.mjs +468 -0
- package/dist/{chunk-ZSHYDDRB.mjs → chunk-FAKPBKLT.mjs} +6 -2
- package/dist/{chunk-A6AAWBPF.mjs → chunk-GHC7LLUX.mjs} +13 -4
- package/dist/chunk-HBZLGDIN.mjs +507 -0
- package/dist/{chunk-SIZMLSRU.mjs → chunk-HISNT2MG.mjs} +8 -6
- package/dist/{chunk-CGH4DRNG.mjs → chunk-HVY6KCCF.mjs} +10 -7
- package/dist/chunk-I3RZS7V2.mjs +136 -0
- package/dist/chunk-IAE3F7DR.mjs +1962 -0
- package/dist/{chunk-UT4KJR7V.mjs → chunk-IHMFS7NZ.mjs} +35 -74
- 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-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-MLNEWRWV.mjs +449 -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-Y4QFWRNR.mjs → chunk-PU4YZQXV.mjs} +17 -18
- package/dist/chunk-Q2BGOAMG.mjs +202 -0
- 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-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/components/ui/add-column-modal.js +42 -14
- package/dist/components/ui/add-column-modal.mjs +5 -5
- 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 +530 -0
- package/dist/components/ui/advisor-card.mjs +15 -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 +158 -28
- package/dist/components/ui/color-picker.mjs +3 -1
- package/dist/components/ui/data-table.js +140 -119
- 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/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 +1367 -1263
- package/dist/components/ui/opportunity-edit-modals.mjs +8 -8
- package/dist/components/ui/opportunity-summary-tab.js +2744 -2157
- package/dist/components/ui/opportunity-summary-tab.mjs +14 -14
- 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 +205 -191
- package/dist/components/ui/pipeline-board.mjs +9 -7
- package/dist/components/ui/pipeline-dialogs.js +114 -65
- package/dist/components/ui/pipeline-dialogs.mjs +7 -6
- 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 +426 -191
- package/dist/components/ui/sidebar-nav.mjs +5 -1
- package/dist/components/ui/stage-timeline.js +6 -6
- package/dist/components/ui/stage-timeline.mjs +3 -3
- 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 +12258 -8611
- package/dist/index.mjs +258 -190
- package/dist/styles.css +1 -1
- package/package.json +71 -1
- package/src/components/index.tsx +115 -9
- 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 +284 -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 +4 -2
- package/src/components/ui/data-table.tsx +28 -74
- 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 +213 -157
- 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/styles/globals.css +17 -15
- package/src/styles/styles-css.ts +1 -1
- package/tsup.config.ts +14 -0
- package/dist/chunk-S4QRUQNW.mjs +0 -475
- package/dist/chunk-URGMJAE3.mjs +0 -1885
- package/dist/chunk-WNGWBVLV.mjs +0 -148
- package/dist/chunk-ZRSDX6OW.mjs +0 -385
- package/dist/{chunk-LLVQKSU3.mjs → chunk-GD4BJDJR.mjs} +3 -3
package/dist/chunk-WNGWBVLV.mjs
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buttonVariants
|
|
3
|
-
} from "./chunk-2I5S2AMY.mjs";
|
|
4
|
-
import {
|
|
5
|
-
cn
|
|
6
|
-
} from "./chunk-VLQZANBF.mjs";
|
|
7
|
-
import {
|
|
8
|
-
__objRest,
|
|
9
|
-
__spreadProps,
|
|
10
|
-
__spreadValues
|
|
11
|
-
} from "./chunk-FWCSY2DS.mjs";
|
|
12
|
-
|
|
13
|
-
// src/components/ui/pagination.tsx
|
|
14
|
-
import {
|
|
15
|
-
ChevronLeftIcon,
|
|
16
|
-
ChevronRightIcon,
|
|
17
|
-
MoreHorizontalIcon
|
|
18
|
-
} from "lucide-react";
|
|
19
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
-
function Pagination(_a) {
|
|
21
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
22
|
-
return /* @__PURE__ */ jsx(
|
|
23
|
-
"nav",
|
|
24
|
-
__spreadValues({
|
|
25
|
-
"aria-label": "pagination",
|
|
26
|
-
className: cn("mx-auto flex w-full justify-center", className),
|
|
27
|
-
"data-slot": "pagination",
|
|
28
|
-
role: "navigation"
|
|
29
|
-
}, props)
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
function PaginationContent(_a) {
|
|
33
|
-
var _b = _a, {
|
|
34
|
-
className
|
|
35
|
-
} = _b, props = __objRest(_b, [
|
|
36
|
-
"className"
|
|
37
|
-
]);
|
|
38
|
-
return /* @__PURE__ */ jsx(
|
|
39
|
-
"ul",
|
|
40
|
-
__spreadValues({
|
|
41
|
-
className: cn("flex flex-row items-center gap-1", className),
|
|
42
|
-
"data-slot": "pagination-content"
|
|
43
|
-
}, props)
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
function PaginationItem(_a) {
|
|
47
|
-
var props = __objRest(_a, []);
|
|
48
|
-
return /* @__PURE__ */ jsx("li", __spreadValues({ "data-slot": "pagination-item" }, props));
|
|
49
|
-
}
|
|
50
|
-
function PaginationLink(_a) {
|
|
51
|
-
var _b = _a, {
|
|
52
|
-
className,
|
|
53
|
-
isActive,
|
|
54
|
-
size = "icon"
|
|
55
|
-
} = _b, props = __objRest(_b, [
|
|
56
|
-
"className",
|
|
57
|
-
"isActive",
|
|
58
|
-
"size"
|
|
59
|
-
]);
|
|
60
|
-
return (
|
|
61
|
-
// eslint-disable-next-line jsx-a11y/anchor-has-content -- children passed via props spread
|
|
62
|
-
/* @__PURE__ */ jsx(
|
|
63
|
-
"a",
|
|
64
|
-
__spreadValues({
|
|
65
|
-
"aria-current": isActive ? "page" : void 0,
|
|
66
|
-
className: cn(
|
|
67
|
-
buttonVariants({
|
|
68
|
-
variant: isActive ? "outline" : "ghost",
|
|
69
|
-
size
|
|
70
|
-
}),
|
|
71
|
-
className
|
|
72
|
-
),
|
|
73
|
-
"data-active": isActive,
|
|
74
|
-
"data-slot": "pagination-link"
|
|
75
|
-
}, props)
|
|
76
|
-
)
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
function PaginationPrevious(_a) {
|
|
80
|
-
var _b = _a, {
|
|
81
|
-
className
|
|
82
|
-
} = _b, props = __objRest(_b, [
|
|
83
|
-
"className"
|
|
84
|
-
]);
|
|
85
|
-
return /* @__PURE__ */ jsxs(
|
|
86
|
-
PaginationLink,
|
|
87
|
-
__spreadProps(__spreadValues({
|
|
88
|
-
"aria-label": "Go to previous page",
|
|
89
|
-
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
90
|
-
size: "default"
|
|
91
|
-
}, props), {
|
|
92
|
-
children: [
|
|
93
|
-
/* @__PURE__ */ jsx(ChevronLeftIcon, {}),
|
|
94
|
-
/* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Previous" })
|
|
95
|
-
]
|
|
96
|
-
})
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
function PaginationNext(_a) {
|
|
100
|
-
var _b = _a, {
|
|
101
|
-
className
|
|
102
|
-
} = _b, props = __objRest(_b, [
|
|
103
|
-
"className"
|
|
104
|
-
]);
|
|
105
|
-
return /* @__PURE__ */ jsxs(
|
|
106
|
-
PaginationLink,
|
|
107
|
-
__spreadProps(__spreadValues({
|
|
108
|
-
"aria-label": "Go to next page",
|
|
109
|
-
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
110
|
-
size: "default"
|
|
111
|
-
}, props), {
|
|
112
|
-
children: [
|
|
113
|
-
/* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Next" }),
|
|
114
|
-
/* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
115
|
-
]
|
|
116
|
-
})
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
function PaginationEllipsis(_a) {
|
|
120
|
-
var _b = _a, {
|
|
121
|
-
className
|
|
122
|
-
} = _b, props = __objRest(_b, [
|
|
123
|
-
"className"
|
|
124
|
-
]);
|
|
125
|
-
return /* @__PURE__ */ jsxs(
|
|
126
|
-
"span",
|
|
127
|
-
__spreadProps(__spreadValues({
|
|
128
|
-
"aria-hidden": true,
|
|
129
|
-
className: cn("flex size-9 items-center justify-center", className),
|
|
130
|
-
"data-slot": "pagination-ellipsis"
|
|
131
|
-
}, props), {
|
|
132
|
-
children: [
|
|
133
|
-
/* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }),
|
|
134
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
|
|
135
|
-
]
|
|
136
|
-
})
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export {
|
|
141
|
-
Pagination,
|
|
142
|
-
PaginationContent,
|
|
143
|
-
PaginationItem,
|
|
144
|
-
PaginationLink,
|
|
145
|
-
PaginationPrevious,
|
|
146
|
-
PaginationNext,
|
|
147
|
-
PaginationEllipsis
|
|
148
|
-
};
|
package/dist/chunk-ZRSDX6OW.mjs
DELETED
|
@@ -1,385 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Tooltip,
|
|
3
|
-
TooltipContent,
|
|
4
|
-
TooltipProvider,
|
|
5
|
-
TooltipTrigger
|
|
6
|
-
} from "./chunk-6JQFUE5I.mjs";
|
|
7
|
-
import {
|
|
8
|
-
cn
|
|
9
|
-
} from "./chunk-VLQZANBF.mjs";
|
|
10
|
-
|
|
11
|
-
// src/components/ui/sidebar-nav.tsx
|
|
12
|
-
import * as React from "react";
|
|
13
|
-
import {
|
|
14
|
-
ChevronDown,
|
|
15
|
-
ChevronRight,
|
|
16
|
-
Info,
|
|
17
|
-
LogOut,
|
|
18
|
-
PanelLeftClose,
|
|
19
|
-
PanelLeftOpen
|
|
20
|
-
} from "lucide-react";
|
|
21
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
-
function getInitials(name) {
|
|
23
|
-
return name.split(" ").filter(Boolean).map((word) => word[0]).join("").toUpperCase().slice(0, 2);
|
|
24
|
-
}
|
|
25
|
-
function formatCurrency(value, isNetItem = false) {
|
|
26
|
-
const abs = Math.abs(value);
|
|
27
|
-
const formatted = new Intl.NumberFormat("en-AU", {
|
|
28
|
-
style: "currency",
|
|
29
|
-
currency: "AUD",
|
|
30
|
-
minimumFractionDigits: 0,
|
|
31
|
-
maximumFractionDigits: 0
|
|
32
|
-
}).format(abs);
|
|
33
|
-
if (!isNetItem) return formatted;
|
|
34
|
-
if (value > 0) return `+${formatted}`;
|
|
35
|
-
if (value < 0) return `-${formatted}`;
|
|
36
|
-
return formatted;
|
|
37
|
-
}
|
|
38
|
-
function navIconCn(isActive) {
|
|
39
|
-
return cn(
|
|
40
|
-
"shrink-0 transition-colors",
|
|
41
|
-
isActive ? "text-primary" : "text-brand-secondary-foreground/50 group-hover:text-brand-secondary-foreground"
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
function NavTooltip({ label, collapsed, children }) {
|
|
45
|
-
if (!collapsed) return children;
|
|
46
|
-
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
47
|
-
/* @__PURE__ */ jsx(TooltipTrigger, { render: children }),
|
|
48
|
-
/* @__PURE__ */ jsx(TooltipContent, { side: "right", children: label })
|
|
49
|
-
] });
|
|
50
|
-
}
|
|
51
|
-
function MetricsGroup({ group }) {
|
|
52
|
-
return /* @__PURE__ */ jsx("div", { className: "border-b border-white/15 py-4 px-5 flex flex-col gap-1.5", children: group.items.map((item) => /* @__PURE__ */ jsxs(
|
|
53
|
-
"div",
|
|
54
|
-
{
|
|
55
|
-
className: "flex items-center justify-between gap-2",
|
|
56
|
-
children: [
|
|
57
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 min-w-0", children: [
|
|
58
|
-
/* @__PURE__ */ jsx(
|
|
59
|
-
"span",
|
|
60
|
-
{
|
|
61
|
-
className: cn(
|
|
62
|
-
"text-sm truncate text-brand-secondary-foreground/80",
|
|
63
|
-
item.isNetItem && "font-semibold text-brand-secondary-foreground border-b-2 border-primary pb-px"
|
|
64
|
-
),
|
|
65
|
-
children: item.name
|
|
66
|
-
}
|
|
67
|
-
),
|
|
68
|
-
item.info && /* @__PURE__ */ jsx(
|
|
69
|
-
Info,
|
|
70
|
-
{
|
|
71
|
-
size: 11,
|
|
72
|
-
strokeWidth: 2,
|
|
73
|
-
className: "shrink-0 text-brand-secondary-foreground/50"
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
] }),
|
|
77
|
-
/* @__PURE__ */ jsx(
|
|
78
|
-
"span",
|
|
79
|
-
{
|
|
80
|
-
className: cn(
|
|
81
|
-
"text-sm font-semibold tabular-nums shrink-0 text-brand-secondary-foreground",
|
|
82
|
-
item.isNetItem && item.value < 0 && "text-destructive"
|
|
83
|
-
),
|
|
84
|
-
children: formatCurrency(item.value, item.isNetItem)
|
|
85
|
-
}
|
|
86
|
-
)
|
|
87
|
-
]
|
|
88
|
-
},
|
|
89
|
-
item.name
|
|
90
|
-
)) });
|
|
91
|
-
}
|
|
92
|
-
function SidebarNavItemView({
|
|
93
|
-
item,
|
|
94
|
-
collapsed,
|
|
95
|
-
onNavigate
|
|
96
|
-
}) {
|
|
97
|
-
var _a;
|
|
98
|
-
const Icon = item.icon;
|
|
99
|
-
return /* @__PURE__ */ jsx(NavTooltip, { label: item.title, collapsed, children: /* @__PURE__ */ jsxs(
|
|
100
|
-
"button",
|
|
101
|
-
{
|
|
102
|
-
type: "button",
|
|
103
|
-
onClick: () => onNavigate == null ? void 0 : onNavigate(item.href),
|
|
104
|
-
className: cn(
|
|
105
|
-
"group flex w-full items-center gap-3 py-2.5 text-base font-medium transition-colors",
|
|
106
|
-
"text-brand-secondary-foreground/70 hover:bg-white/10 hover:text-brand-secondary-foreground",
|
|
107
|
-
collapsed ? "justify-center px-2" : cn(
|
|
108
|
-
"px-3 border-l-4",
|
|
109
|
-
item.isActive ? "bg-white/15 text-brand-secondary-foreground border-primary" : "border-transparent"
|
|
110
|
-
)
|
|
111
|
-
),
|
|
112
|
-
children: [
|
|
113
|
-
/* @__PURE__ */ jsx(
|
|
114
|
-
Icon,
|
|
115
|
-
{
|
|
116
|
-
className: navIconCn((_a = item.isActive) != null ? _a : false),
|
|
117
|
-
size: 18,
|
|
118
|
-
strokeWidth: 1.75
|
|
119
|
-
}
|
|
120
|
-
),
|
|
121
|
-
!collapsed && /* @__PURE__ */ jsx("span", { className: "truncate", children: item.title })
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
) });
|
|
125
|
-
}
|
|
126
|
-
function CollapsibleNavItem({
|
|
127
|
-
item,
|
|
128
|
-
collapsed,
|
|
129
|
-
onNavigate
|
|
130
|
-
}) {
|
|
131
|
-
var _a, _b;
|
|
132
|
-
const Icon = item.icon;
|
|
133
|
-
const hasActiveChild = (_b = (_a = item.subItems) == null ? void 0 : _a.some((sub) => sub.isActive)) != null ? _b : false;
|
|
134
|
-
const [open, setOpen] = React.useState(hasActiveChild);
|
|
135
|
-
React.useEffect(() => {
|
|
136
|
-
if (hasActiveChild) setOpen(true);
|
|
137
|
-
}, [hasActiveChild]);
|
|
138
|
-
if (collapsed) {
|
|
139
|
-
return /* @__PURE__ */ jsx(NavTooltip, { label: item.title, collapsed, children: /* @__PURE__ */ jsx(
|
|
140
|
-
"button",
|
|
141
|
-
{
|
|
142
|
-
type: "button",
|
|
143
|
-
onClick: () => onNavigate == null ? void 0 : onNavigate(item.href),
|
|
144
|
-
className: cn(
|
|
145
|
-
"group flex w-full items-center justify-center px-2 py-2.5 transition-colors",
|
|
146
|
-
"text-brand-secondary-foreground/70 hover:bg-white/10 hover:text-brand-secondary-foreground",
|
|
147
|
-
hasActiveChild && "bg-white/15 text-brand-secondary-foreground"
|
|
148
|
-
),
|
|
149
|
-
children: /* @__PURE__ */ jsx(
|
|
150
|
-
Icon,
|
|
151
|
-
{
|
|
152
|
-
className: navIconCn(hasActiveChild),
|
|
153
|
-
size: 18,
|
|
154
|
-
strokeWidth: 1.75
|
|
155
|
-
}
|
|
156
|
-
)
|
|
157
|
-
}
|
|
158
|
-
) });
|
|
159
|
-
}
|
|
160
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
161
|
-
/* @__PURE__ */ jsxs(
|
|
162
|
-
"button",
|
|
163
|
-
{
|
|
164
|
-
type: "button",
|
|
165
|
-
onClick: () => setOpen((prev) => !prev),
|
|
166
|
-
className: cn(
|
|
167
|
-
"group flex w-full items-center gap-3 px-3 py-2.5 text-base font-medium transition-colors",
|
|
168
|
-
"text-brand-secondary-foreground/70 hover:bg-white/10 hover:text-brand-secondary-foreground",
|
|
169
|
-
"border-l-4 border-transparent",
|
|
170
|
-
hasActiveChild && "bg-white/15 text-brand-secondary-foreground border-primary"
|
|
171
|
-
),
|
|
172
|
-
children: [
|
|
173
|
-
/* @__PURE__ */ jsx(
|
|
174
|
-
Icon,
|
|
175
|
-
{
|
|
176
|
-
className: navIconCn(hasActiveChild),
|
|
177
|
-
size: 18,
|
|
178
|
-
strokeWidth: 1.75
|
|
179
|
-
}
|
|
180
|
-
),
|
|
181
|
-
/* @__PURE__ */ jsx("span", { className: "flex-1 truncate text-left", children: item.title }),
|
|
182
|
-
/* @__PURE__ */ jsx(
|
|
183
|
-
ChevronDown,
|
|
184
|
-
{
|
|
185
|
-
className: cn(
|
|
186
|
-
"ml-auto shrink-0 text-brand-secondary-foreground/40 transition-transform duration-200",
|
|
187
|
-
open && "rotate-180"
|
|
188
|
-
),
|
|
189
|
-
size: 14,
|
|
190
|
-
strokeWidth: 2
|
|
191
|
-
}
|
|
192
|
-
)
|
|
193
|
-
]
|
|
194
|
-
}
|
|
195
|
-
),
|
|
196
|
-
open && item.subItems && /* @__PURE__ */ jsx("div", { className: "ml-9 border-l border-white/15 pl-3", children: item.subItems.map((sub) => /* @__PURE__ */ jsxs(
|
|
197
|
-
"button",
|
|
198
|
-
{
|
|
199
|
-
type: "button",
|
|
200
|
-
onClick: () => onNavigate == null ? void 0 : onNavigate(sub.href),
|
|
201
|
-
className: cn(
|
|
202
|
-
"flex w-full items-center gap-2 py-1.5 pl-1 text-sm transition-colors",
|
|
203
|
-
"text-brand-secondary-foreground/50 hover:text-brand-secondary-foreground",
|
|
204
|
-
sub.isActive && "text-primary font-medium"
|
|
205
|
-
),
|
|
206
|
-
children: [
|
|
207
|
-
/* @__PURE__ */ jsx(
|
|
208
|
-
ChevronRight,
|
|
209
|
-
{
|
|
210
|
-
size: 11,
|
|
211
|
-
strokeWidth: 2,
|
|
212
|
-
className: cn(
|
|
213
|
-
"shrink-0",
|
|
214
|
-
sub.isActive ? "text-primary" : "text-brand-secondary-foreground/30"
|
|
215
|
-
)
|
|
216
|
-
}
|
|
217
|
-
),
|
|
218
|
-
/* @__PURE__ */ jsx("span", { className: "truncate", children: sub.title })
|
|
219
|
-
]
|
|
220
|
-
},
|
|
221
|
-
sub.href
|
|
222
|
-
)) })
|
|
223
|
-
] });
|
|
224
|
-
}
|
|
225
|
-
function SidebarNav({
|
|
226
|
-
items,
|
|
227
|
-
userName = "Anonymous User",
|
|
228
|
-
collapsed = false,
|
|
229
|
-
logo,
|
|
230
|
-
logoCollapsed,
|
|
231
|
-
metricsGroups,
|
|
232
|
-
onNavigate,
|
|
233
|
-
onLogout,
|
|
234
|
-
onCollapsedChange,
|
|
235
|
-
className
|
|
236
|
-
}) {
|
|
237
|
-
const [userMenuOpen, setUserMenuOpen] = React.useState(false);
|
|
238
|
-
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(
|
|
239
|
-
"nav",
|
|
240
|
-
{
|
|
241
|
-
"data-slot": "sidebar-nav",
|
|
242
|
-
"data-collapsed": collapsed,
|
|
243
|
-
className: cn(
|
|
244
|
-
"flex h-full flex-col bg-brand-secondary text-brand-secondary-foreground",
|
|
245
|
-
"transition-all duration-200 ease-in-out",
|
|
246
|
-
collapsed ? "w-14" : "w-[279px]",
|
|
247
|
-
className
|
|
248
|
-
),
|
|
249
|
-
children: [
|
|
250
|
-
!collapsed && logo && /* @__PURE__ */ jsx("div", { className: "flex items-center border-b border-white/15 px-5 py-4", children: /* @__PURE__ */ jsx(
|
|
251
|
-
"img",
|
|
252
|
-
{
|
|
253
|
-
src: logo,
|
|
254
|
-
alt: "Logo",
|
|
255
|
-
className: "h-8 w-auto object-contain object-left",
|
|
256
|
-
style: { filter: "brightness(0) invert(1)" }
|
|
257
|
-
}
|
|
258
|
-
) }),
|
|
259
|
-
collapsed && logoCollapsed && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center border-b border-white/15 py-4", children: /* @__PURE__ */ jsx(
|
|
260
|
-
"img",
|
|
261
|
-
{
|
|
262
|
-
src: logoCollapsed,
|
|
263
|
-
alt: "Logo",
|
|
264
|
-
className: "h-8 w-8 object-contain",
|
|
265
|
-
style: { filter: "brightness(0) invert(1)" }
|
|
266
|
-
}
|
|
267
|
-
) }),
|
|
268
|
-
/* @__PURE__ */ jsxs("div", { className: "border-b border-white/15", children: [
|
|
269
|
-
/* @__PURE__ */ jsx(NavTooltip, { label: userName, collapsed, children: /* @__PURE__ */ jsxs(
|
|
270
|
-
"button",
|
|
271
|
-
{
|
|
272
|
-
type: "button",
|
|
273
|
-
onClick: () => !collapsed && setUserMenuOpen((prev) => !prev),
|
|
274
|
-
className: cn(
|
|
275
|
-
"group flex w-full items-center gap-3 px-5 py-5 text-base transition-colors",
|
|
276
|
-
"text-brand-secondary-foreground hover:bg-white/10",
|
|
277
|
-
collapsed && "justify-center px-2 py-4"
|
|
278
|
-
),
|
|
279
|
-
children: [
|
|
280
|
-
/* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center font-semibold text-xs bg-primary text-primary-foreground", children: getInitials(userName) }),
|
|
281
|
-
!collapsed && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
282
|
-
/* @__PURE__ */ jsx("span", { className: "flex-1 truncate text-left font-medium text-brand-secondary-foreground", children: userName }),
|
|
283
|
-
/* @__PURE__ */ jsx(
|
|
284
|
-
ChevronDown,
|
|
285
|
-
{
|
|
286
|
-
className: cn(
|
|
287
|
-
"shrink-0 text-brand-secondary-foreground/50 transition-transform duration-200",
|
|
288
|
-
userMenuOpen && "rotate-180"
|
|
289
|
-
),
|
|
290
|
-
size: 16,
|
|
291
|
-
strokeWidth: 2
|
|
292
|
-
}
|
|
293
|
-
)
|
|
294
|
-
] })
|
|
295
|
-
]
|
|
296
|
-
}
|
|
297
|
-
) }),
|
|
298
|
-
!collapsed && userMenuOpen && /* @__PURE__ */ jsx("div", { className: "border-t border-white/15 bg-black/20", children: /* @__PURE__ */ jsxs(
|
|
299
|
-
"button",
|
|
300
|
-
{
|
|
301
|
-
type: "button",
|
|
302
|
-
onClick: onLogout,
|
|
303
|
-
className: cn(
|
|
304
|
-
"flex w-full items-center gap-3 px-5 py-3 text-base",
|
|
305
|
-
"text-brand-secondary-foreground/70 hover:bg-white/10 hover:text-brand-secondary-foreground transition-colors"
|
|
306
|
-
),
|
|
307
|
-
children: [
|
|
308
|
-
/* @__PURE__ */ jsx(
|
|
309
|
-
LogOut,
|
|
310
|
-
{
|
|
311
|
-
size: 16,
|
|
312
|
-
strokeWidth: 1.75,
|
|
313
|
-
className: "shrink-0 text-destructive"
|
|
314
|
-
}
|
|
315
|
-
),
|
|
316
|
-
/* @__PURE__ */ jsx("span", { children: "Logout" })
|
|
317
|
-
]
|
|
318
|
-
}
|
|
319
|
-
) })
|
|
320
|
-
] }),
|
|
321
|
-
!collapsed && !!(metricsGroups == null ? void 0 : metricsGroups.length) && /* @__PURE__ */ jsx("div", { children: metricsGroups.map((group, i) => /* @__PURE__ */ jsx(MetricsGroup, { group }, i)) }),
|
|
322
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-col overflow-y-auto py-3", children: items.map(
|
|
323
|
-
(item) => item.isCollapsible ? /* @__PURE__ */ jsx(
|
|
324
|
-
CollapsibleNavItem,
|
|
325
|
-
{
|
|
326
|
-
item,
|
|
327
|
-
collapsed,
|
|
328
|
-
onNavigate
|
|
329
|
-
},
|
|
330
|
-
item.href
|
|
331
|
-
) : /* @__PURE__ */ jsx(
|
|
332
|
-
SidebarNavItemView,
|
|
333
|
-
{
|
|
334
|
-
item,
|
|
335
|
-
collapsed,
|
|
336
|
-
onNavigate
|
|
337
|
-
},
|
|
338
|
-
item.href
|
|
339
|
-
)
|
|
340
|
-
) }),
|
|
341
|
-
onCollapsedChange && /* @__PURE__ */ jsx("div", { className: "mt-auto border-t border-white/15 bg-white/8", children: /* @__PURE__ */ jsx(
|
|
342
|
-
NavTooltip,
|
|
343
|
-
{
|
|
344
|
-
label: collapsed ? "Expand" : "Collapse",
|
|
345
|
-
collapsed,
|
|
346
|
-
children: /* @__PURE__ */ jsxs(
|
|
347
|
-
"button",
|
|
348
|
-
{
|
|
349
|
-
type: "button",
|
|
350
|
-
onClick: () => onCollapsedChange(!collapsed),
|
|
351
|
-
className: cn(
|
|
352
|
-
"flex w-full items-center gap-3 px-3 py-3 transition-colors",
|
|
353
|
-
"text-brand-secondary-foreground/80 hover:bg-white/10 hover:text-brand-secondary-foreground",
|
|
354
|
-
collapsed && "justify-center px-2"
|
|
355
|
-
),
|
|
356
|
-
children: [
|
|
357
|
-
collapsed ? /* @__PURE__ */ jsx(
|
|
358
|
-
PanelLeftOpen,
|
|
359
|
-
{
|
|
360
|
-
size: 18,
|
|
361
|
-
strokeWidth: 1.75,
|
|
362
|
-
className: "shrink-0"
|
|
363
|
-
}
|
|
364
|
-
) : /* @__PURE__ */ jsx(
|
|
365
|
-
PanelLeftClose,
|
|
366
|
-
{
|
|
367
|
-
size: 18,
|
|
368
|
-
strokeWidth: 1.75,
|
|
369
|
-
className: "shrink-0"
|
|
370
|
-
}
|
|
371
|
-
),
|
|
372
|
-
!collapsed && /* @__PURE__ */ jsx("span", { className: "text-sm", children: "Collapse" })
|
|
373
|
-
]
|
|
374
|
-
}
|
|
375
|
-
)
|
|
376
|
-
}
|
|
377
|
-
) })
|
|
378
|
-
]
|
|
379
|
-
}
|
|
380
|
-
) });
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
export {
|
|
384
|
-
SidebarNav
|
|
385
|
-
};
|