@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
|
@@ -0,0 +1,1517 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
+
};
|
|
41
|
+
var __copyProps = (to, from, except, desc) => {
|
|
42
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
+
for (let key of __getOwnPropNames(from))
|
|
44
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
45
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
+
}
|
|
47
|
+
return to;
|
|
48
|
+
};
|
|
49
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
50
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
55
|
+
mod
|
|
56
|
+
));
|
|
57
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
+
|
|
59
|
+
// src/components/ui/appointment-detail-sheet.tsx
|
|
60
|
+
var appointment_detail_sheet_exports = {};
|
|
61
|
+
__export(appointment_detail_sheet_exports, {
|
|
62
|
+
AppointmentDetailSheet: () => AppointmentDetailSheet
|
|
63
|
+
});
|
|
64
|
+
module.exports = __toCommonJS(appointment_detail_sheet_exports);
|
|
65
|
+
var import_react4 = __toESM(require("react"));
|
|
66
|
+
|
|
67
|
+
// src/components/ui/avatar.tsx
|
|
68
|
+
var import_avatar = require("@base-ui/react/avatar");
|
|
69
|
+
|
|
70
|
+
// src/lib/utils.ts
|
|
71
|
+
var import_clsx = require("clsx");
|
|
72
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
73
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
74
|
+
extend: {
|
|
75
|
+
classGroups: {
|
|
76
|
+
"font-size": [
|
|
77
|
+
{
|
|
78
|
+
text: [
|
|
79
|
+
"display-large",
|
|
80
|
+
"display-medium",
|
|
81
|
+
"display-small",
|
|
82
|
+
"h1",
|
|
83
|
+
"h2",
|
|
84
|
+
"h3",
|
|
85
|
+
"h4",
|
|
86
|
+
"h5",
|
|
87
|
+
"h6",
|
|
88
|
+
"body-large",
|
|
89
|
+
"body-medium",
|
|
90
|
+
"body-small",
|
|
91
|
+
"label-large",
|
|
92
|
+
"label-medium",
|
|
93
|
+
"label-small",
|
|
94
|
+
"button",
|
|
95
|
+
"button-xs",
|
|
96
|
+
"caption",
|
|
97
|
+
"overline",
|
|
98
|
+
"code"
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
function cn(...inputs) {
|
|
106
|
+
return twMerge((0, import_clsx.clsx)(inputs));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// src/components/ui/avatar.tsx
|
|
110
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
111
|
+
function Avatar(_a) {
|
|
112
|
+
var _b = _a, {
|
|
113
|
+
className,
|
|
114
|
+
size = "default"
|
|
115
|
+
} = _b, props = __objRest(_b, [
|
|
116
|
+
"className",
|
|
117
|
+
"size"
|
|
118
|
+
]);
|
|
119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
120
|
+
import_avatar.Avatar.Root,
|
|
121
|
+
__spreadValues({
|
|
122
|
+
className: cn(
|
|
123
|
+
"group/avatar relative flex size-8 shrink-0 rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",
|
|
124
|
+
className
|
|
125
|
+
),
|
|
126
|
+
"data-size": size,
|
|
127
|
+
"data-slot": "avatar"
|
|
128
|
+
}, props)
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
function AvatarFallback(_a) {
|
|
132
|
+
var _b = _a, {
|
|
133
|
+
className
|
|
134
|
+
} = _b, props = __objRest(_b, [
|
|
135
|
+
"className"
|
|
136
|
+
]);
|
|
137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
138
|
+
import_avatar.Avatar.Fallback,
|
|
139
|
+
__spreadValues({
|
|
140
|
+
className: cn(
|
|
141
|
+
"flex size-full items-center justify-center rounded-full overflow-hidden bg-muted text-body-small font-sans text-muted-foreground group-data-[size=sm]/avatar:text-caption",
|
|
142
|
+
className
|
|
143
|
+
),
|
|
144
|
+
"data-slot": "avatar-fallback"
|
|
145
|
+
}, props)
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// src/components/ui/badge.tsx
|
|
150
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
151
|
+
|
|
152
|
+
// src/lib/slot.tsx
|
|
153
|
+
var React = __toESM(require("react"));
|
|
154
|
+
function mergeRefs(...refs) {
|
|
155
|
+
return (value) => {
|
|
156
|
+
for (const ref of refs) {
|
|
157
|
+
if (typeof ref === "function") ref(value);
|
|
158
|
+
else if (ref !== null)
|
|
159
|
+
ref.current = value;
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
var Slot = React.forwardRef(
|
|
164
|
+
(_a, forwardedRef) => {
|
|
165
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
166
|
+
const child = React.Children.only(children);
|
|
167
|
+
if (!React.isValidElement(child)) return null;
|
|
168
|
+
const childProps = child.props;
|
|
169
|
+
const merged = __spreadValues({}, props);
|
|
170
|
+
for (const key of Object.keys(childProps)) {
|
|
171
|
+
if (key === "className") {
|
|
172
|
+
merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
|
|
173
|
+
} else if (key === "style") {
|
|
174
|
+
merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
|
|
175
|
+
} else if (key.startsWith("on") && typeof childProps[key] === "function") {
|
|
176
|
+
const parentHandler = props[key];
|
|
177
|
+
if (typeof parentHandler === "function") {
|
|
178
|
+
merged[key] = (...args) => {
|
|
179
|
+
childProps[key](...args);
|
|
180
|
+
parentHandler(...args);
|
|
181
|
+
};
|
|
182
|
+
} else {
|
|
183
|
+
merged[key] = childProps[key];
|
|
184
|
+
}
|
|
185
|
+
} else {
|
|
186
|
+
merged[key] = childProps[key];
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
const childRef = child.ref;
|
|
190
|
+
merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
|
|
191
|
+
return React.cloneElement(
|
|
192
|
+
child,
|
|
193
|
+
merged
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
Slot.displayName = "Slot";
|
|
198
|
+
|
|
199
|
+
// src/components/ui/badge.tsx
|
|
200
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
201
|
+
var badgeVariants = (0, import_class_variance_authority.cva)(
|
|
202
|
+
"inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2.5 py-0.5 text-xs font-medium font-sans whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
203
|
+
{
|
|
204
|
+
variants: {
|
|
205
|
+
variant: {
|
|
206
|
+
default: "border-primary/40 bg-primary/10 text-foreground [a&]:hover:bg-primary/15",
|
|
207
|
+
secondary: "border-border bg-muted text-muted-foreground [a&]:hover:bg-muted/80",
|
|
208
|
+
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",
|
|
209
|
+
success: "border-success/40 bg-success/10 text-success-text [a&]:hover:bg-success/15",
|
|
210
|
+
warning: "border-warning/40 bg-warning/10 text-warning-text [a&]:hover:bg-warning/15",
|
|
211
|
+
info: "border-info/40 bg-info/10 text-info-text [a&]:hover:bg-info/15",
|
|
212
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
213
|
+
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
214
|
+
link: "text-primary underline-offset-4 [a&]:hover:underline"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
defaultVariants: {
|
|
218
|
+
variant: "default"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
);
|
|
222
|
+
function Badge(_a) {
|
|
223
|
+
var _b = _a, {
|
|
224
|
+
className,
|
|
225
|
+
variant = "default",
|
|
226
|
+
asChild = false
|
|
227
|
+
} = _b, props = __objRest(_b, [
|
|
228
|
+
"className",
|
|
229
|
+
"variant",
|
|
230
|
+
"asChild"
|
|
231
|
+
]);
|
|
232
|
+
const Comp = asChild ? Slot : "span";
|
|
233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
234
|
+
Comp,
|
|
235
|
+
__spreadValues({
|
|
236
|
+
className: cn(badgeVariants({ variant }), className),
|
|
237
|
+
"data-slot": "badge",
|
|
238
|
+
"data-variant": variant
|
|
239
|
+
}, props)
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// src/components/ui/button.tsx
|
|
244
|
+
var import_react = require("react");
|
|
245
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
246
|
+
var import_lucide_react = require("lucide-react");
|
|
247
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
248
|
+
var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
249
|
+
"inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 font-sans text-button whitespace-nowrap transition-all active:scale-[0.98] 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 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
250
|
+
{
|
|
251
|
+
variants: {
|
|
252
|
+
variant: {
|
|
253
|
+
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
254
|
+
secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
|
|
255
|
+
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",
|
|
256
|
+
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",
|
|
257
|
+
"outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
|
|
258
|
+
"outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:ring-brand-secondary/30",
|
|
259
|
+
ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs focus-visible:ring-border/50 dark:hover:bg-accent/50",
|
|
260
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
261
|
+
},
|
|
262
|
+
size: {
|
|
263
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
264
|
+
xs: "h-6 gap-1 px-2 text-button-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
265
|
+
sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
266
|
+
lg: "h-10 px-6 has-[>svg]:px-4",
|
|
267
|
+
icon: "size-9",
|
|
268
|
+
"icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
269
|
+
"icon-sm": "size-8",
|
|
270
|
+
"icon-lg": "size-10"
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
defaultVariants: {
|
|
274
|
+
variant: "default",
|
|
275
|
+
size: "default"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
);
|
|
279
|
+
var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
|
|
280
|
+
var _b = _a, {
|
|
281
|
+
className,
|
|
282
|
+
variant,
|
|
283
|
+
size,
|
|
284
|
+
asChild = false,
|
|
285
|
+
loading = false,
|
|
286
|
+
disabled,
|
|
287
|
+
type = "button",
|
|
288
|
+
children
|
|
289
|
+
} = _b, props = __objRest(_b, [
|
|
290
|
+
"className",
|
|
291
|
+
"variant",
|
|
292
|
+
"size",
|
|
293
|
+
"asChild",
|
|
294
|
+
"loading",
|
|
295
|
+
"disabled",
|
|
296
|
+
"type",
|
|
297
|
+
"children"
|
|
298
|
+
]);
|
|
299
|
+
const Comp = asChild ? Slot : "button";
|
|
300
|
+
const isIconOnly = size === "icon" || size === "icon-xs" || size === "icon-sm" || size === "icon-lg";
|
|
301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
302
|
+
Comp,
|
|
303
|
+
__spreadProps(__spreadValues({
|
|
304
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
305
|
+
"data-size": size,
|
|
306
|
+
"data-slot": "button",
|
|
307
|
+
"data-variant": variant,
|
|
308
|
+
disabled: loading || disabled,
|
|
309
|
+
ref,
|
|
310
|
+
type
|
|
311
|
+
}, props), {
|
|
312
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
313
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
|
|
314
|
+
!isIconOnly && children
|
|
315
|
+
] }) : children
|
|
316
|
+
})
|
|
317
|
+
);
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
// src/components/ui/separator.tsx
|
|
321
|
+
var import_separator = require("@base-ui/react/separator");
|
|
322
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
323
|
+
function Separator(_a) {
|
|
324
|
+
var _b = _a, {
|
|
325
|
+
className,
|
|
326
|
+
orientation = "horizontal"
|
|
327
|
+
} = _b, props = __objRest(_b, [
|
|
328
|
+
"className",
|
|
329
|
+
"orientation"
|
|
330
|
+
]);
|
|
331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
332
|
+
import_separator.Separator,
|
|
333
|
+
__spreadValues({
|
|
334
|
+
className: cn(
|
|
335
|
+
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
336
|
+
className
|
|
337
|
+
),
|
|
338
|
+
"data-orientation": orientation,
|
|
339
|
+
"data-slot": "separator"
|
|
340
|
+
}, props)
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// src/components/ui/sheet.tsx
|
|
345
|
+
var import_lucide_react2 = require("lucide-react");
|
|
346
|
+
var import_dialog = require("@base-ui/react/dialog");
|
|
347
|
+
|
|
348
|
+
// src/lib/theme-provider.tsx
|
|
349
|
+
var import_react2 = require("react");
|
|
350
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
351
|
+
var ThemeVarsContext = (0, import_react2.createContext)({});
|
|
352
|
+
function useThemeVars() {
|
|
353
|
+
return (0, import_react2.useContext)(ThemeVarsContext);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// src/components/ui/sheet.tsx
|
|
357
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
358
|
+
var SIDE_CLASSES = {
|
|
359
|
+
right: "inset-y-0 right-0 h-full w-1/2 border-l data-ending-style:slide-out-to-right data-open:slide-in-from-right",
|
|
360
|
+
left: "inset-y-0 left-0 h-full w-1/2 border-r data-ending-style:slide-out-to-left data-open:slide-in-from-left",
|
|
361
|
+
top: "inset-x-0 top-0 h-auto border-b data-ending-style:slide-out-to-top data-open:slide-in-from-top",
|
|
362
|
+
bottom: "inset-x-0 bottom-0 h-auto border-t data-ending-style:slide-out-to-bottom data-open:slide-in-from-bottom"
|
|
363
|
+
};
|
|
364
|
+
function Sheet(_a) {
|
|
365
|
+
var props = __objRest(_a, []);
|
|
366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.Dialog.Root, __spreadValues({ "data-slot": "sheet" }, props));
|
|
367
|
+
}
|
|
368
|
+
function SheetPortal(_a) {
|
|
369
|
+
var props = __objRest(_a, []);
|
|
370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.Dialog.Portal, __spreadValues({ "data-slot": "sheet-portal" }, props));
|
|
371
|
+
}
|
|
372
|
+
function SheetOverlay(_a) {
|
|
373
|
+
var _b = _a, {
|
|
374
|
+
className
|
|
375
|
+
} = _b, props = __objRest(_b, [
|
|
376
|
+
"className"
|
|
377
|
+
]);
|
|
378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
379
|
+
import_dialog.Dialog.Backdrop,
|
|
380
|
+
__spreadValues({
|
|
381
|
+
className: cn(
|
|
382
|
+
"fixed inset-0 z-50 bg-foreground/50 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0",
|
|
383
|
+
className
|
|
384
|
+
),
|
|
385
|
+
"data-slot": "sheet-overlay"
|
|
386
|
+
}, props)
|
|
387
|
+
);
|
|
388
|
+
}
|
|
389
|
+
function SheetContent(_a) {
|
|
390
|
+
var _b = _a, {
|
|
391
|
+
className,
|
|
392
|
+
children,
|
|
393
|
+
side = "right",
|
|
394
|
+
showCloseButton = true,
|
|
395
|
+
style
|
|
396
|
+
} = _b, props = __objRest(_b, [
|
|
397
|
+
"className",
|
|
398
|
+
"children",
|
|
399
|
+
"side",
|
|
400
|
+
"showCloseButton",
|
|
401
|
+
"style"
|
|
402
|
+
]);
|
|
403
|
+
const themeVars = useThemeVars();
|
|
404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(SheetPortal, { children: [
|
|
405
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SheetOverlay, {}),
|
|
406
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
407
|
+
import_dialog.Dialog.Popup,
|
|
408
|
+
__spreadProps(__spreadValues({
|
|
409
|
+
className: cn(
|
|
410
|
+
"fixed z-50 flex flex-col gap-4 bg-background transition ease-in-out data-ending-style:animate-out data-ending-style:duration-300 data-ending-style:fill-mode-forwards data-open:animate-in data-open:duration-500",
|
|
411
|
+
SIDE_CLASSES[side],
|
|
412
|
+
className
|
|
413
|
+
),
|
|
414
|
+
"data-slot": "sheet-content",
|
|
415
|
+
style: __spreadValues(__spreadValues({}, themeVars), style)
|
|
416
|
+
}, props), {
|
|
417
|
+
children: [
|
|
418
|
+
children,
|
|
419
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
420
|
+
import_dialog.Dialog.Close,
|
|
421
|
+
{
|
|
422
|
+
className: "absolute top-4 right-4 transition-colors hover:bg-foreground/5 focus:outline-hidden focus:ring-2 focus:ring-border focus:ring-offset-0 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
423
|
+
"data-slot": "sheet-icon-close",
|
|
424
|
+
children: [
|
|
425
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.XIcon, {}),
|
|
426
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "sr-only", children: "Close" })
|
|
427
|
+
]
|
|
428
|
+
}
|
|
429
|
+
) : null
|
|
430
|
+
]
|
|
431
|
+
})
|
|
432
|
+
)
|
|
433
|
+
] });
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
// src/components/ui/appointment-action-dialogs.tsx
|
|
437
|
+
var import_react3 = __toESM(require("react"));
|
|
438
|
+
|
|
439
|
+
// src/components/ui/alert-dialog.tsx
|
|
440
|
+
var import_alert_dialog = require("@base-ui/react/alert-dialog");
|
|
441
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
442
|
+
function AlertDialog(_a) {
|
|
443
|
+
var props = __objRest(_a, []);
|
|
444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_alert_dialog.AlertDialog.Root, __spreadValues({ "data-slot": "alert-dialog" }, props));
|
|
445
|
+
}
|
|
446
|
+
function AlertDialogPortal(_a) {
|
|
447
|
+
var props = __objRest(_a, []);
|
|
448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_alert_dialog.AlertDialog.Portal, __spreadValues({ "data-slot": "alert-dialog-portal" }, props));
|
|
449
|
+
}
|
|
450
|
+
function AlertDialogOverlay(_a) {
|
|
451
|
+
var _b = _a, {
|
|
452
|
+
className
|
|
453
|
+
} = _b, props = __objRest(_b, [
|
|
454
|
+
"className"
|
|
455
|
+
]);
|
|
456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
457
|
+
import_alert_dialog.AlertDialog.Backdrop,
|
|
458
|
+
__spreadValues({
|
|
459
|
+
className: cn(
|
|
460
|
+
// WealthX: foreground/50 scrim — matches Figma foreground token at 50% opacity
|
|
461
|
+
"fixed inset-0 z-50 bg-foreground/50 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0",
|
|
462
|
+
className
|
|
463
|
+
),
|
|
464
|
+
"data-slot": "alert-dialog-overlay"
|
|
465
|
+
}, props)
|
|
466
|
+
);
|
|
467
|
+
}
|
|
468
|
+
function AlertDialogContent(_a) {
|
|
469
|
+
var _b = _a, {
|
|
470
|
+
className,
|
|
471
|
+
size = "default",
|
|
472
|
+
style
|
|
473
|
+
} = _b, props = __objRest(_b, [
|
|
474
|
+
"className",
|
|
475
|
+
"size",
|
|
476
|
+
"style"
|
|
477
|
+
]);
|
|
478
|
+
const themeVars = useThemeVars();
|
|
479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(AlertDialogPortal, { children: [
|
|
480
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AlertDialogOverlay, {}),
|
|
481
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
482
|
+
import_alert_dialog.AlertDialog.Popup,
|
|
483
|
+
__spreadValues({
|
|
484
|
+
className: cn(
|
|
485
|
+
// WealthX: removed rounded-lg (sharp corners), shadow-lg (flat panels)
|
|
486
|
+
"group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 duration-200 data-[size=sm]:max-w-xs data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[size=default]:sm:max-w-lg",
|
|
487
|
+
className
|
|
488
|
+
),
|
|
489
|
+
"data-size": size,
|
|
490
|
+
"data-slot": "alert-dialog-content",
|
|
491
|
+
style: __spreadValues(__spreadValues({}, themeVars), style)
|
|
492
|
+
}, props)
|
|
493
|
+
)
|
|
494
|
+
] });
|
|
495
|
+
}
|
|
496
|
+
function AlertDialogHeader(_a) {
|
|
497
|
+
var _b = _a, {
|
|
498
|
+
className
|
|
499
|
+
} = _b, props = __objRest(_b, [
|
|
500
|
+
"className"
|
|
501
|
+
]);
|
|
502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
503
|
+
"div",
|
|
504
|
+
__spreadValues({
|
|
505
|
+
className: cn(
|
|
506
|
+
"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
|
|
507
|
+
className
|
|
508
|
+
),
|
|
509
|
+
"data-slot": "alert-dialog-header"
|
|
510
|
+
}, props)
|
|
511
|
+
);
|
|
512
|
+
}
|
|
513
|
+
function AlertDialogFooter(_a) {
|
|
514
|
+
var _b = _a, {
|
|
515
|
+
className
|
|
516
|
+
} = _b, props = __objRest(_b, [
|
|
517
|
+
"className"
|
|
518
|
+
]);
|
|
519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
520
|
+
"div",
|
|
521
|
+
__spreadValues({
|
|
522
|
+
className: cn(
|
|
523
|
+
// WealthX: always row, right-aligned, separator above footer (matches Figma)
|
|
524
|
+
"flex flex-row justify-end gap-2 border-t border-border pt-4",
|
|
525
|
+
className
|
|
526
|
+
),
|
|
527
|
+
"data-slot": "alert-dialog-footer"
|
|
528
|
+
}, props)
|
|
529
|
+
);
|
|
530
|
+
}
|
|
531
|
+
function AlertDialogTitle(_a) {
|
|
532
|
+
var _b = _a, {
|
|
533
|
+
className
|
|
534
|
+
} = _b, props = __objRest(_b, [
|
|
535
|
+
"className"
|
|
536
|
+
]);
|
|
537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
538
|
+
import_alert_dialog.AlertDialog.Title,
|
|
539
|
+
__spreadValues({
|
|
540
|
+
className: cn(
|
|
541
|
+
"text-h5 sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
|
|
542
|
+
className
|
|
543
|
+
),
|
|
544
|
+
"data-slot": "alert-dialog-title"
|
|
545
|
+
}, props)
|
|
546
|
+
);
|
|
547
|
+
}
|
|
548
|
+
function AlertDialogDescription(_a) {
|
|
549
|
+
var _b = _a, {
|
|
550
|
+
className
|
|
551
|
+
} = _b, props = __objRest(_b, [
|
|
552
|
+
"className"
|
|
553
|
+
]);
|
|
554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
555
|
+
import_alert_dialog.AlertDialog.Description,
|
|
556
|
+
__spreadValues({
|
|
557
|
+
className: cn(
|
|
558
|
+
"text-body-small text-muted-foreground sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
|
|
559
|
+
className
|
|
560
|
+
),
|
|
561
|
+
"data-slot": "alert-dialog-description"
|
|
562
|
+
}, props)
|
|
563
|
+
);
|
|
564
|
+
}
|
|
565
|
+
function AlertDialogAction(_a) {
|
|
566
|
+
var _b = _a, {
|
|
567
|
+
className,
|
|
568
|
+
variant = "default",
|
|
569
|
+
size = "default"
|
|
570
|
+
} = _b, props = __objRest(_b, [
|
|
571
|
+
"className",
|
|
572
|
+
"variant",
|
|
573
|
+
"size"
|
|
574
|
+
]);
|
|
575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
576
|
+
import_alert_dialog.AlertDialog.Close,
|
|
577
|
+
__spreadValues({
|
|
578
|
+
className: cn(buttonVariants({ variant, size }), className),
|
|
579
|
+
"data-slot": "alert-dialog-action"
|
|
580
|
+
}, props)
|
|
581
|
+
);
|
|
582
|
+
}
|
|
583
|
+
function AlertDialogCancel(_a) {
|
|
584
|
+
var _b = _a, {
|
|
585
|
+
className,
|
|
586
|
+
variant = "outline",
|
|
587
|
+
size = "default"
|
|
588
|
+
} = _b, props = __objRest(_b, [
|
|
589
|
+
"className",
|
|
590
|
+
"variant",
|
|
591
|
+
"size"
|
|
592
|
+
]);
|
|
593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
594
|
+
import_alert_dialog.AlertDialog.Close,
|
|
595
|
+
__spreadValues({
|
|
596
|
+
className: cn(buttonVariants({ variant, size }), className),
|
|
597
|
+
"data-slot": "alert-dialog-cancel"
|
|
598
|
+
}, props)
|
|
599
|
+
);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
// src/components/ui/calendar.tsx
|
|
603
|
+
var React3 = __toESM(require("react"));
|
|
604
|
+
var import_lucide_react3 = require("lucide-react");
|
|
605
|
+
var import_react_day_picker = require("react-day-picker");
|
|
606
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
607
|
+
function CalendarRoot(_a) {
|
|
608
|
+
var _b = _a, {
|
|
609
|
+
className,
|
|
610
|
+
rootRef
|
|
611
|
+
} = _b, props = __objRest(_b, [
|
|
612
|
+
"className",
|
|
613
|
+
"rootRef"
|
|
614
|
+
]);
|
|
615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
616
|
+
"div",
|
|
617
|
+
__spreadValues({
|
|
618
|
+
className: cn(className),
|
|
619
|
+
"data-slot": "calendar",
|
|
620
|
+
ref: rootRef
|
|
621
|
+
}, props)
|
|
622
|
+
);
|
|
623
|
+
}
|
|
624
|
+
function CalendarChevron(_a) {
|
|
625
|
+
var _b = _a, {
|
|
626
|
+
className,
|
|
627
|
+
orientation
|
|
628
|
+
} = _b, props = __objRest(_b, [
|
|
629
|
+
"className",
|
|
630
|
+
"orientation"
|
|
631
|
+
]);
|
|
632
|
+
if (orientation === "left") {
|
|
633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.ChevronLeftIcon, __spreadValues({ className: cn("size-4", className) }, props));
|
|
634
|
+
}
|
|
635
|
+
if (orientation === "right") {
|
|
636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.ChevronRightIcon, __spreadValues({ className: cn("size-4", className) }, props));
|
|
637
|
+
}
|
|
638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.ChevronDownIcon, __spreadValues({ className: cn("size-4", className) }, props));
|
|
639
|
+
}
|
|
640
|
+
function CalendarWeekNumber(_a) {
|
|
641
|
+
var _b = _a, {
|
|
642
|
+
children
|
|
643
|
+
} = _b, props = __objRest(_b, [
|
|
644
|
+
"children"
|
|
645
|
+
]);
|
|
646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("td", __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) }));
|
|
647
|
+
}
|
|
648
|
+
function Calendar(_a) {
|
|
649
|
+
var _b = _a, {
|
|
650
|
+
className,
|
|
651
|
+
classNames,
|
|
652
|
+
showOutsideDays = true,
|
|
653
|
+
captionLayout = "dropdown",
|
|
654
|
+
buttonVariant = "ghost",
|
|
655
|
+
formatters,
|
|
656
|
+
components
|
|
657
|
+
} = _b, props = __objRest(_b, [
|
|
658
|
+
"className",
|
|
659
|
+
"classNames",
|
|
660
|
+
"showOutsideDays",
|
|
661
|
+
"captionLayout",
|
|
662
|
+
"buttonVariant",
|
|
663
|
+
"formatters",
|
|
664
|
+
"components"
|
|
665
|
+
]);
|
|
666
|
+
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
668
|
+
import_react_day_picker.DayPicker,
|
|
669
|
+
__spreadValues({
|
|
670
|
+
captionLayout,
|
|
671
|
+
className: cn(
|
|
672
|
+
"group/calendar bg-background p-3 font-sans border border-border shadow-sm [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
673
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
674
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
675
|
+
className
|
|
676
|
+
),
|
|
677
|
+
classNames: __spreadValues({
|
|
678
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
679
|
+
months: cn(
|
|
680
|
+
"relative flex flex-col gap-4 md:flex-row",
|
|
681
|
+
defaultClassNames.months
|
|
682
|
+
),
|
|
683
|
+
month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
684
|
+
nav: cn(
|
|
685
|
+
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
686
|
+
defaultClassNames.nav
|
|
687
|
+
),
|
|
688
|
+
button_previous: cn(
|
|
689
|
+
buttonVariants({ variant: buttonVariant }),
|
|
690
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
691
|
+
defaultClassNames.button_previous
|
|
692
|
+
),
|
|
693
|
+
button_next: cn(
|
|
694
|
+
buttonVariants({ variant: buttonVariant }),
|
|
695
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
696
|
+
defaultClassNames.button_next
|
|
697
|
+
),
|
|
698
|
+
month_caption: cn(
|
|
699
|
+
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
700
|
+
defaultClassNames.month_caption
|
|
701
|
+
),
|
|
702
|
+
dropdowns: cn(
|
|
703
|
+
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-label-small",
|
|
704
|
+
defaultClassNames.dropdowns
|
|
705
|
+
),
|
|
706
|
+
dropdown_root: cn(
|
|
707
|
+
"relative border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
|
|
708
|
+
defaultClassNames.dropdown_root
|
|
709
|
+
),
|
|
710
|
+
dropdown: cn(
|
|
711
|
+
"absolute inset-0 bg-popover opacity-0",
|
|
712
|
+
defaultClassNames.dropdown
|
|
713
|
+
),
|
|
714
|
+
caption_label: cn(
|
|
715
|
+
"select-none",
|
|
716
|
+
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",
|
|
717
|
+
defaultClassNames.caption_label
|
|
718
|
+
),
|
|
719
|
+
table: "w-full border-collapse",
|
|
720
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
721
|
+
weekday: cn(
|
|
722
|
+
"flex-1 text-caption font-normal text-muted-foreground select-none",
|
|
723
|
+
defaultClassNames.weekday
|
|
724
|
+
),
|
|
725
|
+
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
726
|
+
week_number_header: cn(
|
|
727
|
+
"w-(--cell-size) select-none",
|
|
728
|
+
defaultClassNames.week_number_header
|
|
729
|
+
),
|
|
730
|
+
week_number: cn(
|
|
731
|
+
"text-caption text-muted-foreground select-none",
|
|
732
|
+
defaultClassNames.week_number
|
|
733
|
+
),
|
|
734
|
+
day: cn(
|
|
735
|
+
"group/day relative aspect-square h-full w-full p-0 text-center select-none",
|
|
736
|
+
defaultClassNames.day
|
|
737
|
+
),
|
|
738
|
+
range_start: cn("bg-accent", defaultClassNames.range_start),
|
|
739
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
740
|
+
range_end: cn("bg-accent", defaultClassNames.range_end),
|
|
741
|
+
today: cn("bg-accent text-accent-foreground", defaultClassNames.today),
|
|
742
|
+
outside: cn(
|
|
743
|
+
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
744
|
+
defaultClassNames.outside
|
|
745
|
+
),
|
|
746
|
+
disabled: cn(
|
|
747
|
+
"text-muted-foreground opacity-50",
|
|
748
|
+
defaultClassNames.disabled
|
|
749
|
+
),
|
|
750
|
+
hidden: cn("invisible", defaultClassNames.hidden)
|
|
751
|
+
}, classNames),
|
|
752
|
+
components: __spreadValues({
|
|
753
|
+
Root: CalendarRoot,
|
|
754
|
+
Chevron: CalendarChevron,
|
|
755
|
+
DayButton: CalendarDayButton,
|
|
756
|
+
WeekNumber: CalendarWeekNumber
|
|
757
|
+
}, components),
|
|
758
|
+
formatters: __spreadValues({
|
|
759
|
+
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" })
|
|
760
|
+
}, formatters),
|
|
761
|
+
showOutsideDays
|
|
762
|
+
}, props)
|
|
763
|
+
);
|
|
764
|
+
}
|
|
765
|
+
function CalendarDayButton(_a) {
|
|
766
|
+
var _b = _a, {
|
|
767
|
+
className,
|
|
768
|
+
day,
|
|
769
|
+
modifiers
|
|
770
|
+
} = _b, props = __objRest(_b, [
|
|
771
|
+
"className",
|
|
772
|
+
"day",
|
|
773
|
+
"modifiers"
|
|
774
|
+
]);
|
|
775
|
+
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
776
|
+
const ref = React3.useRef(null);
|
|
777
|
+
React3.useEffect(() => {
|
|
778
|
+
var _a2;
|
|
779
|
+
if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
|
|
780
|
+
}, [modifiers.focused]);
|
|
781
|
+
const selectedSingle = modifiers.selected && !modifiers.range_start && !modifiers.range_end ? !modifiers.range_middle : null;
|
|
782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
783
|
+
Button,
|
|
784
|
+
__spreadValues({
|
|
785
|
+
className: cn(
|
|
786
|
+
"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",
|
|
787
|
+
defaultClassNames.day,
|
|
788
|
+
className
|
|
789
|
+
),
|
|
790
|
+
"data-day": day.date.toLocaleDateString(),
|
|
791
|
+
"data-range-end": modifiers.range_end,
|
|
792
|
+
"data-range-middle": modifiers.range_middle,
|
|
793
|
+
"data-range-start": modifiers.range_start,
|
|
794
|
+
"data-selected-single": selectedSingle,
|
|
795
|
+
ref,
|
|
796
|
+
size: "icon",
|
|
797
|
+
variant: "ghost"
|
|
798
|
+
}, props)
|
|
799
|
+
);
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
// src/components/ui/dialog.tsx
|
|
803
|
+
var import_lucide_react4 = require("lucide-react");
|
|
804
|
+
var import_dialog2 = require("@base-ui/react/dialog");
|
|
805
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
806
|
+
function Dialog(_a) {
|
|
807
|
+
var props = __objRest(_a, []);
|
|
808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_dialog2.Dialog.Root, __spreadValues({ "data-slot": "dialog" }, props));
|
|
809
|
+
}
|
|
810
|
+
function DialogPortal(_a) {
|
|
811
|
+
var props = __objRest(_a, []);
|
|
812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_dialog2.Dialog.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
|
|
813
|
+
}
|
|
814
|
+
function DialogClose(_a) {
|
|
815
|
+
var props = __objRest(_a, []);
|
|
816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_dialog2.Dialog.Close, __spreadValues({ "data-slot": "dialog-close" }, props));
|
|
817
|
+
}
|
|
818
|
+
function DialogOverlay(_a) {
|
|
819
|
+
var _b = _a, {
|
|
820
|
+
className
|
|
821
|
+
} = _b, props = __objRest(_b, [
|
|
822
|
+
"className"
|
|
823
|
+
]);
|
|
824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
825
|
+
import_dialog2.Dialog.Backdrop,
|
|
826
|
+
__spreadValues({
|
|
827
|
+
className: cn(
|
|
828
|
+
// WealthX: foreground/50 scrim (matches Figma — foreground token at 50% opacity)
|
|
829
|
+
"fixed inset-0 z-50 bg-foreground/50 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0",
|
|
830
|
+
className
|
|
831
|
+
),
|
|
832
|
+
"data-slot": "dialog-overlay"
|
|
833
|
+
}, props)
|
|
834
|
+
);
|
|
835
|
+
}
|
|
836
|
+
var DIALOG_MAX_WIDTHS = {
|
|
837
|
+
sm: "24rem",
|
|
838
|
+
md: "28rem",
|
|
839
|
+
lg: "32rem",
|
|
840
|
+
xl: "36rem",
|
|
841
|
+
"2xl": "42rem",
|
|
842
|
+
"3xl": "48rem",
|
|
843
|
+
"4xl": "56rem",
|
|
844
|
+
full: "100%"
|
|
845
|
+
};
|
|
846
|
+
var DIALOG_AUTO_MIN_WIDTH = "20rem";
|
|
847
|
+
function DialogContent(_a) {
|
|
848
|
+
var _b = _a, {
|
|
849
|
+
className,
|
|
850
|
+
children,
|
|
851
|
+
showCloseButton = true,
|
|
852
|
+
style,
|
|
853
|
+
container,
|
|
854
|
+
align = "center",
|
|
855
|
+
size = "lg",
|
|
856
|
+
minWidth
|
|
857
|
+
} = _b, props = __objRest(_b, [
|
|
858
|
+
"className",
|
|
859
|
+
"children",
|
|
860
|
+
"showCloseButton",
|
|
861
|
+
"style",
|
|
862
|
+
"container",
|
|
863
|
+
"align",
|
|
864
|
+
"size",
|
|
865
|
+
"minWidth"
|
|
866
|
+
]);
|
|
867
|
+
const themeVars = useThemeVars();
|
|
868
|
+
const isAuto = size === "auto";
|
|
869
|
+
const sizeStyle = isAuto ? { minWidth: minWidth != null ? minWidth : DIALOG_AUTO_MIN_WIDTH } : { maxWidth: DIALOG_MAX_WIDTHS[size] };
|
|
870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(DialogPortal, { container: container != null ? container : void 0, children: [
|
|
871
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DialogOverlay, { style: themeVars }),
|
|
872
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
873
|
+
import_dialog2.Dialog.Popup,
|
|
874
|
+
__spreadProps(__spreadValues({
|
|
875
|
+
className: cn(
|
|
876
|
+
// WealthX: removed rounded-lg (sharp corners), shadow-lg (flat panels)
|
|
877
|
+
// max-w-[calc(100%-2rem)] acts as a viewport-edge guard on all sizes.
|
|
878
|
+
// Fixed max-width is applied via inline style (sizeStyle) to avoid
|
|
879
|
+
// Tailwind v4 class-scanning gaps with dynamic class lookups.
|
|
880
|
+
"fixed left-[50%] z-50 grid max-w-[calc(100%-2rem)] translate-x-[-50%] gap-4 border bg-background p-6 duration-200 outline-none data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
|
|
881
|
+
// "auto" → hug content (with min-width floor); fixed sizes → fill to max-width
|
|
882
|
+
isAuto ? "w-auto" : "w-full",
|
|
883
|
+
align === "center" ? "top-[50%] translate-y-[-50%]" : "top-4 translate-y-0",
|
|
884
|
+
className
|
|
885
|
+
),
|
|
886
|
+
"data-slot": "dialog-content",
|
|
887
|
+
style: __spreadValues(__spreadValues(__spreadValues({}, themeVars), sizeStyle), style)
|
|
888
|
+
}, props), {
|
|
889
|
+
children: [
|
|
890
|
+
children,
|
|
891
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
892
|
+
import_dialog2.Dialog.Close,
|
|
893
|
+
{
|
|
894
|
+
className: "absolute top-4 right-4 inline-flex size-7 items-center justify-center transition-colors hover:bg-foreground/5 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-border focus-visible:ring-offset-0 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
895
|
+
"data-slot": "dialog-close",
|
|
896
|
+
children: [
|
|
897
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.XIcon, {}),
|
|
898
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "sr-only", children: "Close" })
|
|
899
|
+
]
|
|
900
|
+
}
|
|
901
|
+
) : null
|
|
902
|
+
]
|
|
903
|
+
})
|
|
904
|
+
)
|
|
905
|
+
] });
|
|
906
|
+
}
|
|
907
|
+
function DialogHeader(_a) {
|
|
908
|
+
var _b = _a, {
|
|
909
|
+
className
|
|
910
|
+
} = _b, props = __objRest(_b, [
|
|
911
|
+
"className"
|
|
912
|
+
]);
|
|
913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
914
|
+
"div",
|
|
915
|
+
__spreadValues({
|
|
916
|
+
className: cn("flex flex-col gap-1.5", className),
|
|
917
|
+
"data-slot": "dialog-header"
|
|
918
|
+
}, props)
|
|
919
|
+
);
|
|
920
|
+
}
|
|
921
|
+
function DialogFooter(_a) {
|
|
922
|
+
var _b = _a, {
|
|
923
|
+
className,
|
|
924
|
+
showCloseButton = false,
|
|
925
|
+
children
|
|
926
|
+
} = _b, props = __objRest(_b, [
|
|
927
|
+
"className",
|
|
928
|
+
"showCloseButton",
|
|
929
|
+
"children"
|
|
930
|
+
]);
|
|
931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
932
|
+
"div",
|
|
933
|
+
__spreadProps(__spreadValues({
|
|
934
|
+
className: cn(
|
|
935
|
+
// WealthX: always row layout, right-aligned, separator above footer
|
|
936
|
+
"flex flex-row justify-end gap-2 border-t border-border pt-4",
|
|
937
|
+
className
|
|
938
|
+
),
|
|
939
|
+
"data-slot": "dialog-footer"
|
|
940
|
+
}, props), {
|
|
941
|
+
children: [
|
|
942
|
+
children,
|
|
943
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
944
|
+
import_dialog2.Dialog.Close,
|
|
945
|
+
{
|
|
946
|
+
className: cn(buttonVariants({ variant: "outline" })),
|
|
947
|
+
type: "button",
|
|
948
|
+
children: "Close"
|
|
949
|
+
}
|
|
950
|
+
) : null
|
|
951
|
+
]
|
|
952
|
+
})
|
|
953
|
+
);
|
|
954
|
+
}
|
|
955
|
+
function DialogTitle(_a) {
|
|
956
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
958
|
+
import_dialog2.Dialog.Title,
|
|
959
|
+
__spreadValues({
|
|
960
|
+
className: cn("text-h5 leading-none", className),
|
|
961
|
+
"data-slot": "dialog-title"
|
|
962
|
+
}, props)
|
|
963
|
+
);
|
|
964
|
+
}
|
|
965
|
+
function DialogDescription(_a) {
|
|
966
|
+
var _b = _a, {
|
|
967
|
+
className
|
|
968
|
+
} = _b, props = __objRest(_b, [
|
|
969
|
+
"className"
|
|
970
|
+
]);
|
|
971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
972
|
+
import_dialog2.Dialog.Description,
|
|
973
|
+
__spreadValues({
|
|
974
|
+
className: cn("text-body-small text-muted-foreground", className),
|
|
975
|
+
"data-slot": "dialog-description"
|
|
976
|
+
}, props)
|
|
977
|
+
);
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
// src/components/ui/label.tsx
|
|
981
|
+
var import_jsx_runtime10 = (
|
|
982
|
+
// eslint-disable-next-line jsx-a11y/label-has-associated-control -- htmlFor is passed by the consumer
|
|
983
|
+
require("react/jsx-runtime")
|
|
984
|
+
);
|
|
985
|
+
function Label(_a) {
|
|
986
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
988
|
+
"label",
|
|
989
|
+
__spreadValues({
|
|
990
|
+
className: cn(
|
|
991
|
+
"flex items-center gap-2 text-label-medium leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
992
|
+
className
|
|
993
|
+
),
|
|
994
|
+
"data-slot": "label"
|
|
995
|
+
}, props)
|
|
996
|
+
);
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
// src/components/ui/textarea.tsx
|
|
1000
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1001
|
+
function Textarea(_a) {
|
|
1002
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1004
|
+
"textarea",
|
|
1005
|
+
__spreadValues({
|
|
1006
|
+
className: cn(
|
|
1007
|
+
// WealthX: removed shadow-xs (flat panels), added font-sans
|
|
1008
|
+
"flex field-sizing-content min-h-16 w-full border border-input bg-transparent px-3 py-2 text-body-medium font-sans transition-[color,box-shadow] outline-none placeholder:font-normal placeholder:text-muted-foreground focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
|
|
1009
|
+
className
|
|
1010
|
+
),
|
|
1011
|
+
"data-slot": "textarea"
|
|
1012
|
+
}, props)
|
|
1013
|
+
);
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
// src/components/ui/appointment-action-dialogs.tsx
|
|
1017
|
+
var import_lucide_react5 = require("lucide-react");
|
|
1018
|
+
|
|
1019
|
+
// src/components/ui/toggle.tsx
|
|
1020
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
1021
|
+
var import_toggle = require("@base-ui/react/toggle");
|
|
1022
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1023
|
+
var toggleVariants = (0, import_class_variance_authority3.cva)(
|
|
1024
|
+
"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",
|
|
1025
|
+
{
|
|
1026
|
+
variants: {
|
|
1027
|
+
variant: {
|
|
1028
|
+
default: "bg-transparent hover:bg-muted hover:text-muted-foreground",
|
|
1029
|
+
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
1030
|
+
},
|
|
1031
|
+
size: {
|
|
1032
|
+
default: "h-9 min-w-9 px-2 text-label-large",
|
|
1033
|
+
sm: "h-8 min-w-8 px-1.5 text-label-medium",
|
|
1034
|
+
lg: "h-10 min-w-10 px-2.5 text-h5"
|
|
1035
|
+
}
|
|
1036
|
+
},
|
|
1037
|
+
defaultVariants: {
|
|
1038
|
+
variant: "default",
|
|
1039
|
+
size: "default"
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
);
|
|
1043
|
+
function Toggle(_a) {
|
|
1044
|
+
var _b = _a, {
|
|
1045
|
+
className,
|
|
1046
|
+
variant,
|
|
1047
|
+
size
|
|
1048
|
+
} = _b, props = __objRest(_b, [
|
|
1049
|
+
"className",
|
|
1050
|
+
"variant",
|
|
1051
|
+
"size"
|
|
1052
|
+
]);
|
|
1053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1054
|
+
import_toggle.Toggle,
|
|
1055
|
+
__spreadValues({
|
|
1056
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
1057
|
+
"data-slot": "toggle"
|
|
1058
|
+
}, props)
|
|
1059
|
+
);
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
// src/components/ui/appointment-time-slot-picker.tsx
|
|
1063
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1064
|
+
function AppointmentSlotSection({
|
|
1065
|
+
label,
|
|
1066
|
+
slots,
|
|
1067
|
+
selectedSlotId,
|
|
1068
|
+
onSelect
|
|
1069
|
+
}) {
|
|
1070
|
+
const hasAvailable = slots.some((s) => s.available);
|
|
1071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1072
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1073
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: label }),
|
|
1074
|
+
!hasAvailable && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Badge, { variant: "secondary", className: "text-[10px]", children: "No availability" })
|
|
1075
|
+
] }),
|
|
1076
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex flex-wrap gap-2", children: slots.map((slot) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1077
|
+
Toggle,
|
|
1078
|
+
{
|
|
1079
|
+
variant: "outline",
|
|
1080
|
+
pressed: selectedSlotId === slot.id,
|
|
1081
|
+
onPressedChange: (pressed) => {
|
|
1082
|
+
if (pressed && slot.available) onSelect == null ? void 0 : onSelect(slot);
|
|
1083
|
+
},
|
|
1084
|
+
disabled: !slot.available,
|
|
1085
|
+
className: "min-w-[88px]",
|
|
1086
|
+
children: slot.label
|
|
1087
|
+
},
|
|
1088
|
+
slot.id
|
|
1089
|
+
)) })
|
|
1090
|
+
] });
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
// src/components/ui/appointment-action-dialogs.tsx
|
|
1094
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1095
|
+
function AppointmentConfirmDialog({
|
|
1096
|
+
open,
|
|
1097
|
+
onOpenChange,
|
|
1098
|
+
action,
|
|
1099
|
+
clientName,
|
|
1100
|
+
onConfirm
|
|
1101
|
+
}) {
|
|
1102
|
+
const isDecline = action === "decline";
|
|
1103
|
+
const [cancelReason, setCancelReason] = import_react3.default.useState("");
|
|
1104
|
+
const handleOpenChange = (next) => {
|
|
1105
|
+
if (!next) setCancelReason("");
|
|
1106
|
+
onOpenChange(next);
|
|
1107
|
+
};
|
|
1108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AlertDialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(AlertDialogContent, { children: [
|
|
1109
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(AlertDialogHeader, { children: [
|
|
1110
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AlertDialogTitle, { children: isDecline ? "Decline this appointment?" : "Accept this appointment?" }),
|
|
1111
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AlertDialogDescription, { children: isDecline ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
1112
|
+
"This will cancel the appointment with",
|
|
1113
|
+
" ",
|
|
1114
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("strong", { children: clientName }),
|
|
1115
|
+
" and notify them by email. This action cannot be undone."
|
|
1116
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
1117
|
+
"The appointment with ",
|
|
1118
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("strong", { children: clientName }),
|
|
1119
|
+
" will be confirmed and they will be notified by email."
|
|
1120
|
+
] }) })
|
|
1121
|
+
] }),
|
|
1122
|
+
isDecline && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1123
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Label, { htmlFor: "decline-reason", children: [
|
|
1124
|
+
"Reason",
|
|
1125
|
+
" ",
|
|
1126
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "font-normal text-muted-foreground", children: "(optional)" })
|
|
1127
|
+
] }),
|
|
1128
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1129
|
+
Textarea,
|
|
1130
|
+
{
|
|
1131
|
+
id: "decline-reason",
|
|
1132
|
+
placeholder: "e.g. Advisor is unavailable at this time\u2026",
|
|
1133
|
+
value: cancelReason,
|
|
1134
|
+
onChange: (e) => setCancelReason(e.target.value),
|
|
1135
|
+
className: "w-full resize-none",
|
|
1136
|
+
rows: 2
|
|
1137
|
+
}
|
|
1138
|
+
)
|
|
1139
|
+
] }),
|
|
1140
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(AlertDialogFooter, { children: [
|
|
1141
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AlertDialogCancel, { children: isDecline ? "Keep appointment" : "Cancel" }),
|
|
1142
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1143
|
+
AlertDialogAction,
|
|
1144
|
+
{
|
|
1145
|
+
onClick: () => onConfirm(isDecline ? cancelReason : void 0),
|
|
1146
|
+
className: isDecline ? "bg-destructive text-destructive-foreground hover:bg-destructive/90" : void 0,
|
|
1147
|
+
children: isDecline ? "Decline appointment" : "Accept appointment"
|
|
1148
|
+
}
|
|
1149
|
+
)
|
|
1150
|
+
] })
|
|
1151
|
+
] }) });
|
|
1152
|
+
}
|
|
1153
|
+
function AppointmentRescheduleDialog({
|
|
1154
|
+
open,
|
|
1155
|
+
onOpenChange,
|
|
1156
|
+
amSlots,
|
|
1157
|
+
pmSlots,
|
|
1158
|
+
currentDate,
|
|
1159
|
+
currentTimeStart,
|
|
1160
|
+
currentTimeEnd,
|
|
1161
|
+
onReschedule
|
|
1162
|
+
}) {
|
|
1163
|
+
const [date, setDate] = import_react3.default.useState(/* @__PURE__ */ new Date());
|
|
1164
|
+
const [slot, setSlot] = import_react3.default.useState();
|
|
1165
|
+
const [note, setNote] = import_react3.default.useState("");
|
|
1166
|
+
const handleOpenChange = (next) => {
|
|
1167
|
+
if (!next) {
|
|
1168
|
+
setDate(/* @__PURE__ */ new Date());
|
|
1169
|
+
setSlot(void 0);
|
|
1170
|
+
setNote("");
|
|
1171
|
+
}
|
|
1172
|
+
onOpenChange(next);
|
|
1173
|
+
};
|
|
1174
|
+
const totalAvailable = [...amSlots, ...pmSlots].filter(
|
|
1175
|
+
(s) => s.available
|
|
1176
|
+
).length;
|
|
1177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DialogContent, { size: "2xl", children: [
|
|
1178
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DialogHeader, { children: [
|
|
1179
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogTitle, { children: "Propose New Time" }),
|
|
1180
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogDescription, { children: "Select a new date and time slot. The client will be notified by email." })
|
|
1181
|
+
] }),
|
|
1182
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Separator, {}),
|
|
1183
|
+
(currentDate || currentTimeStart) && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1184
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Current booking" }),
|
|
1185
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-4 border border-border bg-muted/30 px-3 py-2.5 text-sm text-muted-foreground", children: [
|
|
1186
|
+
currentDate && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "flex items-center gap-1.5", children: [
|
|
1187
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react5.Calendar, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
1188
|
+
currentDate
|
|
1189
|
+
] }),
|
|
1190
|
+
currentTimeStart && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "flex items-center gap-1.5", children: [
|
|
1191
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react5.Clock, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
1192
|
+
currentTimeStart,
|
|
1193
|
+
currentTimeEnd ? ` \u2013 ${currentTimeEnd}` : ""
|
|
1194
|
+
] })
|
|
1195
|
+
] })
|
|
1196
|
+
] }),
|
|
1197
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "grid grid-cols-[auto_1fr] items-start gap-5", children: [
|
|
1198
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1199
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Label, { children: "New date" }),
|
|
1200
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1201
|
+
Calendar,
|
|
1202
|
+
{
|
|
1203
|
+
mode: "single",
|
|
1204
|
+
selected: date,
|
|
1205
|
+
onSelect: (d) => {
|
|
1206
|
+
setDate(d);
|
|
1207
|
+
setSlot(void 0);
|
|
1208
|
+
},
|
|
1209
|
+
captionLayout: "label",
|
|
1210
|
+
fromDate: /* @__PURE__ */ new Date(),
|
|
1211
|
+
disabled: { before: /* @__PURE__ */ new Date() },
|
|
1212
|
+
className: "border border-border"
|
|
1213
|
+
}
|
|
1214
|
+
)
|
|
1215
|
+
] }),
|
|
1216
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-col gap-5", children: date ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
1217
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
1218
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm font-semibold", children: "Select a time slot" }),
|
|
1219
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
|
|
1220
|
+
totalAvailable,
|
|
1221
|
+
" available"
|
|
1222
|
+
] })
|
|
1223
|
+
] }),
|
|
1224
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1225
|
+
AppointmentSlotSection,
|
|
1226
|
+
{
|
|
1227
|
+
label: "Morning",
|
|
1228
|
+
slots: amSlots,
|
|
1229
|
+
selectedSlotId: slot == null ? void 0 : slot.id,
|
|
1230
|
+
onSelect: setSlot
|
|
1231
|
+
}
|
|
1232
|
+
),
|
|
1233
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1234
|
+
AppointmentSlotSection,
|
|
1235
|
+
{
|
|
1236
|
+
label: "Afternoon",
|
|
1237
|
+
slots: pmSlots,
|
|
1238
|
+
selectedSlotId: slot == null ? void 0 : slot.id,
|
|
1239
|
+
onSelect: setSlot
|
|
1240
|
+
}
|
|
1241
|
+
)
|
|
1242
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-8 text-center", children: [
|
|
1243
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm font-semibold", children: "Select a time slot" }),
|
|
1244
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-xs text-muted-foreground", children: "Pick a date on the left to see available slots." })
|
|
1245
|
+
] }) })
|
|
1246
|
+
] }),
|
|
1247
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1248
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Label, { htmlFor: "reschedule-note", children: [
|
|
1249
|
+
"Note",
|
|
1250
|
+
" ",
|
|
1251
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "font-normal text-muted-foreground", children: "(optional)" })
|
|
1252
|
+
] }),
|
|
1253
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1254
|
+
Textarea,
|
|
1255
|
+
{
|
|
1256
|
+
id: "reschedule-note",
|
|
1257
|
+
placeholder: "e.g. Rescheduling due to an internal conflict \u2014 apologies for the inconvenience\u2026",
|
|
1258
|
+
value: note,
|
|
1259
|
+
onChange: (e) => setNote(e.target.value),
|
|
1260
|
+
className: "w-full resize-none",
|
|
1261
|
+
rows: 2
|
|
1262
|
+
}
|
|
1263
|
+
)
|
|
1264
|
+
] }),
|
|
1265
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DialogFooter, { children: [
|
|
1266
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogClose, { render: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { variant: "outline" }), children: "Cancel" }),
|
|
1267
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1268
|
+
Button,
|
|
1269
|
+
{
|
|
1270
|
+
disabled: !date || !slot,
|
|
1271
|
+
onClick: () => {
|
|
1272
|
+
if (date && slot) {
|
|
1273
|
+
onReschedule(date, slot, note);
|
|
1274
|
+
handleOpenChange(false);
|
|
1275
|
+
}
|
|
1276
|
+
},
|
|
1277
|
+
children: "Propose New Time"
|
|
1278
|
+
}
|
|
1279
|
+
)
|
|
1280
|
+
] })
|
|
1281
|
+
] }) });
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
// src/components/ui/appointment-detail-sheet.tsx
|
|
1285
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1286
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1287
|
+
var STATUS_CONFIG = {
|
|
1288
|
+
pending: {
|
|
1289
|
+
variant: "warning",
|
|
1290
|
+
label: "Pending",
|
|
1291
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.CalendarClock, { size: 12 })
|
|
1292
|
+
},
|
|
1293
|
+
confirmed: {
|
|
1294
|
+
variant: "success",
|
|
1295
|
+
label: "Confirmed",
|
|
1296
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.Check, { size: 12 })
|
|
1297
|
+
},
|
|
1298
|
+
cancelled: {
|
|
1299
|
+
variant: "destructive",
|
|
1300
|
+
label: "Cancelled",
|
|
1301
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.X, { size: 12 })
|
|
1302
|
+
},
|
|
1303
|
+
rescheduled: {
|
|
1304
|
+
variant: "info",
|
|
1305
|
+
label: "Rescheduled",
|
|
1306
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.RefreshCw, { size: 12 })
|
|
1307
|
+
}
|
|
1308
|
+
};
|
|
1309
|
+
function AppointmentDetailSheet({
|
|
1310
|
+
appointment,
|
|
1311
|
+
open,
|
|
1312
|
+
onOpenChange,
|
|
1313
|
+
clientProfile,
|
|
1314
|
+
amSlots,
|
|
1315
|
+
pmSlots,
|
|
1316
|
+
onAccept,
|
|
1317
|
+
onDecline,
|
|
1318
|
+
onReschedule,
|
|
1319
|
+
onBookNew
|
|
1320
|
+
}) {
|
|
1321
|
+
const [confirmAction, setConfirmAction] = import_react4.default.useState(null);
|
|
1322
|
+
const [rescheduleOpen, setRescheduleOpen] = import_react4.default.useState(false);
|
|
1323
|
+
if (!appointment) return null;
|
|
1324
|
+
const { variant, label, icon } = STATUS_CONFIG[appointment.status];
|
|
1325
|
+
const isCancelled = appointment.status === "cancelled";
|
|
1326
|
+
const isConfirmed = appointment.status === "confirmed";
|
|
1327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
1328
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Sheet, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1329
|
+
SheetContent,
|
|
1330
|
+
{
|
|
1331
|
+
side: "right",
|
|
1332
|
+
className: "flex w-[440px] flex-col gap-0 overflow-y-auto p-0",
|
|
1333
|
+
children: [
|
|
1334
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "border-b border-border px-6 py-5", children: [
|
|
1335
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-start gap-4", children: [
|
|
1336
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Avatar, { className: "h-12 w-12 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AvatarFallback, { className: "text-base", children: appointment.clientAvatarInitials }) }),
|
|
1337
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
1338
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-lg font-semibold leading-tight", children: appointment.clientName }),
|
|
1339
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Badge, { variant, className: "w-fit", children: [
|
|
1340
|
+
icon,
|
|
1341
|
+
label
|
|
1342
|
+
] })
|
|
1343
|
+
] })
|
|
1344
|
+
] }),
|
|
1345
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "mt-4 flex gap-2", children: isCancelled ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1346
|
+
Button,
|
|
1347
|
+
{
|
|
1348
|
+
size: "sm",
|
|
1349
|
+
className: "w-full",
|
|
1350
|
+
onClick: () => onBookNew == null ? void 0 : onBookNew(appointment.clientId),
|
|
1351
|
+
children: "Book a New Appointment"
|
|
1352
|
+
}
|
|
1353
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
1354
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1355
|
+
Button,
|
|
1356
|
+
{
|
|
1357
|
+
size: "sm",
|
|
1358
|
+
disabled: isConfirmed,
|
|
1359
|
+
onClick: () => setConfirmAction("accept"),
|
|
1360
|
+
className: "flex-1 gap-1.5",
|
|
1361
|
+
children: [
|
|
1362
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.Check, { className: "h-3.5 w-3.5" }),
|
|
1363
|
+
"Accept"
|
|
1364
|
+
]
|
|
1365
|
+
}
|
|
1366
|
+
),
|
|
1367
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1368
|
+
Button,
|
|
1369
|
+
{
|
|
1370
|
+
size: "sm",
|
|
1371
|
+
variant: "ghost",
|
|
1372
|
+
onClick: () => setConfirmAction("decline"),
|
|
1373
|
+
className: "flex-1 gap-1.5 text-destructive hover:text-destructive",
|
|
1374
|
+
children: [
|
|
1375
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.X, { className: "h-3.5 w-3.5" }),
|
|
1376
|
+
"Decline"
|
|
1377
|
+
]
|
|
1378
|
+
}
|
|
1379
|
+
),
|
|
1380
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1381
|
+
Button,
|
|
1382
|
+
{
|
|
1383
|
+
size: "sm",
|
|
1384
|
+
variant: "outline",
|
|
1385
|
+
onClick: () => setRescheduleOpen(true),
|
|
1386
|
+
className: "flex-1 gap-1.5",
|
|
1387
|
+
children: [
|
|
1388
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.RefreshCw, { className: "h-3.5 w-3.5" }),
|
|
1389
|
+
"Reschedule"
|
|
1390
|
+
]
|
|
1391
|
+
}
|
|
1392
|
+
)
|
|
1393
|
+
] }) })
|
|
1394
|
+
] }),
|
|
1395
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-4 px-6 py-5", children: [
|
|
1396
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-3 text-sm", children: [
|
|
1397
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.Calendar, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
1398
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "font-medium", children: appointment.date })
|
|
1399
|
+
] }),
|
|
1400
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-3 text-sm", children: [
|
|
1401
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.Clock, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
1402
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "font-medium", children: [
|
|
1403
|
+
appointment.timeStart,
|
|
1404
|
+
" \u2013 ",
|
|
1405
|
+
appointment.timeEnd
|
|
1406
|
+
] })
|
|
1407
|
+
] }),
|
|
1408
|
+
appointment.meetingFormat && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-start gap-3 text-sm", children: [
|
|
1409
|
+
appointment.meetingFormat === "call" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.Phone, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
1410
|
+
appointment.meetingFormat === "google-meet" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.Video, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
1411
|
+
appointment.meetingFormat === "offline" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.MapPin, { className: "mt-0.5 h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
1412
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-0.5", children: [
|
|
1413
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "font-medium", children: [
|
|
1414
|
+
appointment.meetingFormat === "call" && "Phone Call",
|
|
1415
|
+
appointment.meetingFormat === "google-meet" && "Google Meet",
|
|
1416
|
+
appointment.meetingFormat === "offline" && "In Person"
|
|
1417
|
+
] }),
|
|
1418
|
+
appointment.meetingFormat === "offline" && appointment.meetingLocation && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-muted-foreground", children: appointment.meetingLocation })
|
|
1419
|
+
] })
|
|
1420
|
+
] })
|
|
1421
|
+
] }),
|
|
1422
|
+
clientProfile && (clientProfile.phone !== void 0 || clientProfile.email !== void 0 || clientProfile.accountType !== void 0 || clientProfile.loanApplicationStatus !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
1423
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Separator, {}),
|
|
1424
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-3 px-6 py-5", children: [
|
|
1425
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-sm font-semibold", children: "Client Profile" }),
|
|
1426
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1427
|
+
clientProfile.phone && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-3 text-sm", children: [
|
|
1428
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.Phone, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
1429
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-muted-foreground", children: clientProfile.phone })
|
|
1430
|
+
] }),
|
|
1431
|
+
clientProfile.email && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-3 text-sm", children: [
|
|
1432
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.Mail, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
1433
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-muted-foreground", children: clientProfile.email })
|
|
1434
|
+
] }),
|
|
1435
|
+
clientProfile.accountType !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center justify-between text-sm", children: [
|
|
1436
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-muted-foreground", children: "Account type" }),
|
|
1437
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
1438
|
+
clientProfile.accountType === "Joint" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.Users, { className: "h-3.5 w-3.5 text-muted-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.CircleUser, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
1439
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "font-medium", children: clientProfile.accountType })
|
|
1440
|
+
] })
|
|
1441
|
+
] }),
|
|
1442
|
+
clientProfile.loanApplicationStatus !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center justify-between text-sm", children: [
|
|
1443
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-muted-foreground", children: "Loan application" }),
|
|
1444
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
1445
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.FileText, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
1446
|
+
clientProfile.loanApplicationStatus === "finished" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Badge, { variant: "success", className: "text-[10px]", children: "Finished" }),
|
|
1447
|
+
clientProfile.loanApplicationStatus === "in-progress" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Badge, { variant: "warning", className: "text-[10px]", children: "In Progress" }),
|
|
1448
|
+
clientProfile.loanApplicationStatus === "sent-request" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Badge, { variant: "info", className: "text-[10px]", children: "Sent Request" }),
|
|
1449
|
+
clientProfile.loanApplicationStatus === "not-start" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Badge, { variant: "secondary", className: "text-[10px]", children: "Not Started" })
|
|
1450
|
+
] })
|
|
1451
|
+
] })
|
|
1452
|
+
] })
|
|
1453
|
+
] })
|
|
1454
|
+
] }),
|
|
1455
|
+
appointment.notes && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
1456
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Separator, {}),
|
|
1457
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-2 px-6 py-5", children: [
|
|
1458
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1459
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.FileText, { className: "h-4 w-4 text-muted-foreground" }),
|
|
1460
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-sm font-semibold", children: "Notes" })
|
|
1461
|
+
] }),
|
|
1462
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-sm text-muted-foreground", children: appointment.notes })
|
|
1463
|
+
] })
|
|
1464
|
+
] }),
|
|
1465
|
+
appointment.cancelReason && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
1466
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Separator, {}),
|
|
1467
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-2 px-6 py-5", children: [
|
|
1468
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1469
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.AlertCircle, { className: "h-4 w-4 text-destructive" }),
|
|
1470
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-sm font-semibold", children: "Cancellation Reason" })
|
|
1471
|
+
] }),
|
|
1472
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-sm text-muted-foreground", children: appointment.cancelReason })
|
|
1473
|
+
] })
|
|
1474
|
+
] })
|
|
1475
|
+
]
|
|
1476
|
+
}
|
|
1477
|
+
) }),
|
|
1478
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1479
|
+
AppointmentConfirmDialog,
|
|
1480
|
+
{
|
|
1481
|
+
open: confirmAction !== null,
|
|
1482
|
+
onOpenChange: (v) => !v && setConfirmAction(null),
|
|
1483
|
+
action: confirmAction != null ? confirmAction : "accept",
|
|
1484
|
+
clientName: appointment.clientName,
|
|
1485
|
+
onConfirm: () => {
|
|
1486
|
+
if (confirmAction === "accept") {
|
|
1487
|
+
onAccept == null ? void 0 : onAccept(appointment.id);
|
|
1488
|
+
} else {
|
|
1489
|
+
onDecline == null ? void 0 : onDecline(appointment.id);
|
|
1490
|
+
}
|
|
1491
|
+
setConfirmAction(null);
|
|
1492
|
+
onOpenChange(false);
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
),
|
|
1496
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1497
|
+
AppointmentRescheduleDialog,
|
|
1498
|
+
{
|
|
1499
|
+
open: rescheduleOpen,
|
|
1500
|
+
onOpenChange: setRescheduleOpen,
|
|
1501
|
+
amSlots,
|
|
1502
|
+
pmSlots,
|
|
1503
|
+
currentDate: appointment.date,
|
|
1504
|
+
currentTimeStart: appointment.timeStart,
|
|
1505
|
+
currentTimeEnd: appointment.timeEnd,
|
|
1506
|
+
onReschedule: (date, slot, note) => {
|
|
1507
|
+
onReschedule == null ? void 0 : onReschedule(appointment.id, date, slot, note);
|
|
1508
|
+
setRescheduleOpen(false);
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
)
|
|
1512
|
+
] });
|
|
1513
|
+
}
|
|
1514
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1515
|
+
0 && (module.exports = {
|
|
1516
|
+
AppointmentDetailSheet
|
|
1517
|
+
});
|