@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,1268 @@
|
|
|
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-upcoming-card.tsx
|
|
60
|
+
var appointment_upcoming_card_exports = {};
|
|
61
|
+
__export(appointment_upcoming_card_exports, {
|
|
62
|
+
AppointmentUpcomingCard: () => AppointmentUpcomingCard
|
|
63
|
+
});
|
|
64
|
+
module.exports = __toCommonJS(appointment_upcoming_card_exports);
|
|
65
|
+
var import_react3 = __toESM(require("react"));
|
|
66
|
+
var import_lucide_react4 = require("lucide-react");
|
|
67
|
+
|
|
68
|
+
// src/components/ui/avatar.tsx
|
|
69
|
+
var import_avatar = require("@base-ui/react/avatar");
|
|
70
|
+
|
|
71
|
+
// src/lib/utils.ts
|
|
72
|
+
var import_clsx = require("clsx");
|
|
73
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
74
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
75
|
+
extend: {
|
|
76
|
+
classGroups: {
|
|
77
|
+
"font-size": [
|
|
78
|
+
{
|
|
79
|
+
text: [
|
|
80
|
+
"display-large",
|
|
81
|
+
"display-medium",
|
|
82
|
+
"display-small",
|
|
83
|
+
"h1",
|
|
84
|
+
"h2",
|
|
85
|
+
"h3",
|
|
86
|
+
"h4",
|
|
87
|
+
"h5",
|
|
88
|
+
"h6",
|
|
89
|
+
"body-large",
|
|
90
|
+
"body-medium",
|
|
91
|
+
"body-small",
|
|
92
|
+
"label-large",
|
|
93
|
+
"label-medium",
|
|
94
|
+
"label-small",
|
|
95
|
+
"button",
|
|
96
|
+
"button-xs",
|
|
97
|
+
"caption",
|
|
98
|
+
"overline",
|
|
99
|
+
"code"
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
function cn(...inputs) {
|
|
107
|
+
return twMerge((0, import_clsx.clsx)(inputs));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// src/components/ui/avatar.tsx
|
|
111
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
112
|
+
function Avatar(_a) {
|
|
113
|
+
var _b = _a, {
|
|
114
|
+
className,
|
|
115
|
+
size = "default"
|
|
116
|
+
} = _b, props = __objRest(_b, [
|
|
117
|
+
"className",
|
|
118
|
+
"size"
|
|
119
|
+
]);
|
|
120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
121
|
+
import_avatar.Avatar.Root,
|
|
122
|
+
__spreadValues({
|
|
123
|
+
className: cn(
|
|
124
|
+
"group/avatar relative flex size-8 shrink-0 rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",
|
|
125
|
+
className
|
|
126
|
+
),
|
|
127
|
+
"data-size": size,
|
|
128
|
+
"data-slot": "avatar"
|
|
129
|
+
}, props)
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
function AvatarFallback(_a) {
|
|
133
|
+
var _b = _a, {
|
|
134
|
+
className
|
|
135
|
+
} = _b, props = __objRest(_b, [
|
|
136
|
+
"className"
|
|
137
|
+
]);
|
|
138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
139
|
+
import_avatar.Avatar.Fallback,
|
|
140
|
+
__spreadValues({
|
|
141
|
+
className: cn(
|
|
142
|
+
"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",
|
|
143
|
+
className
|
|
144
|
+
),
|
|
145
|
+
"data-slot": "avatar-fallback"
|
|
146
|
+
}, props)
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// src/components/ui/badge.tsx
|
|
151
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
152
|
+
|
|
153
|
+
// src/lib/slot.tsx
|
|
154
|
+
var React = __toESM(require("react"));
|
|
155
|
+
function mergeRefs(...refs) {
|
|
156
|
+
return (value) => {
|
|
157
|
+
for (const ref of refs) {
|
|
158
|
+
if (typeof ref === "function") ref(value);
|
|
159
|
+
else if (ref !== null)
|
|
160
|
+
ref.current = value;
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
var Slot = React.forwardRef(
|
|
165
|
+
(_a, forwardedRef) => {
|
|
166
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
167
|
+
const child = React.Children.only(children);
|
|
168
|
+
if (!React.isValidElement(child)) return null;
|
|
169
|
+
const childProps = child.props;
|
|
170
|
+
const merged = __spreadValues({}, props);
|
|
171
|
+
for (const key of Object.keys(childProps)) {
|
|
172
|
+
if (key === "className") {
|
|
173
|
+
merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
|
|
174
|
+
} else if (key === "style") {
|
|
175
|
+
merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
|
|
176
|
+
} else if (key.startsWith("on") && typeof childProps[key] === "function") {
|
|
177
|
+
const parentHandler = props[key];
|
|
178
|
+
if (typeof parentHandler === "function") {
|
|
179
|
+
merged[key] = (...args) => {
|
|
180
|
+
childProps[key](...args);
|
|
181
|
+
parentHandler(...args);
|
|
182
|
+
};
|
|
183
|
+
} else {
|
|
184
|
+
merged[key] = childProps[key];
|
|
185
|
+
}
|
|
186
|
+
} else {
|
|
187
|
+
merged[key] = childProps[key];
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
const childRef = child.ref;
|
|
191
|
+
merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
|
|
192
|
+
return React.cloneElement(
|
|
193
|
+
child,
|
|
194
|
+
merged
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
Slot.displayName = "Slot";
|
|
199
|
+
|
|
200
|
+
// src/components/ui/badge.tsx
|
|
201
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
202
|
+
var badgeVariants = (0, import_class_variance_authority.cva)(
|
|
203
|
+
"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",
|
|
204
|
+
{
|
|
205
|
+
variants: {
|
|
206
|
+
variant: {
|
|
207
|
+
default: "border-primary/40 bg-primary/10 text-foreground [a&]:hover:bg-primary/15",
|
|
208
|
+
secondary: "border-border bg-muted text-muted-foreground [a&]:hover:bg-muted/80",
|
|
209
|
+
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",
|
|
210
|
+
success: "border-success/40 bg-success/10 text-success-text [a&]:hover:bg-success/15",
|
|
211
|
+
warning: "border-warning/40 bg-warning/10 text-warning-text [a&]:hover:bg-warning/15",
|
|
212
|
+
info: "border-info/40 bg-info/10 text-info-text [a&]:hover:bg-info/15",
|
|
213
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
214
|
+
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
215
|
+
link: "text-primary underline-offset-4 [a&]:hover:underline"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
defaultVariants: {
|
|
219
|
+
variant: "default"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
function Badge(_a) {
|
|
224
|
+
var _b = _a, {
|
|
225
|
+
className,
|
|
226
|
+
variant = "default",
|
|
227
|
+
asChild = false
|
|
228
|
+
} = _b, props = __objRest(_b, [
|
|
229
|
+
"className",
|
|
230
|
+
"variant",
|
|
231
|
+
"asChild"
|
|
232
|
+
]);
|
|
233
|
+
const Comp = asChild ? Slot : "span";
|
|
234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
235
|
+
Comp,
|
|
236
|
+
__spreadValues({
|
|
237
|
+
className: cn(badgeVariants({ variant }), className),
|
|
238
|
+
"data-slot": "badge",
|
|
239
|
+
"data-variant": variant
|
|
240
|
+
}, props)
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// src/components/ui/button.tsx
|
|
245
|
+
var import_react = require("react");
|
|
246
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
247
|
+
var import_lucide_react = require("lucide-react");
|
|
248
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
249
|
+
var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
250
|
+
"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",
|
|
251
|
+
{
|
|
252
|
+
variants: {
|
|
253
|
+
variant: {
|
|
254
|
+
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
255
|
+
secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
|
|
256
|
+
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",
|
|
257
|
+
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",
|
|
258
|
+
"outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
|
|
259
|
+
"outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:ring-brand-secondary/30",
|
|
260
|
+
ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs focus-visible:ring-border/50 dark:hover:bg-accent/50",
|
|
261
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
262
|
+
},
|
|
263
|
+
size: {
|
|
264
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
265
|
+
xs: "h-6 gap-1 px-2 text-button-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
266
|
+
sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
267
|
+
lg: "h-10 px-6 has-[>svg]:px-4",
|
|
268
|
+
icon: "size-9",
|
|
269
|
+
"icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
270
|
+
"icon-sm": "size-8",
|
|
271
|
+
"icon-lg": "size-10"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
defaultVariants: {
|
|
275
|
+
variant: "default",
|
|
276
|
+
size: "default"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
);
|
|
280
|
+
var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
|
|
281
|
+
var _b = _a, {
|
|
282
|
+
className,
|
|
283
|
+
variant,
|
|
284
|
+
size,
|
|
285
|
+
asChild = false,
|
|
286
|
+
loading = false,
|
|
287
|
+
disabled,
|
|
288
|
+
type = "button",
|
|
289
|
+
children
|
|
290
|
+
} = _b, props = __objRest(_b, [
|
|
291
|
+
"className",
|
|
292
|
+
"variant",
|
|
293
|
+
"size",
|
|
294
|
+
"asChild",
|
|
295
|
+
"loading",
|
|
296
|
+
"disabled",
|
|
297
|
+
"type",
|
|
298
|
+
"children"
|
|
299
|
+
]);
|
|
300
|
+
const Comp = asChild ? Slot : "button";
|
|
301
|
+
const isIconOnly = size === "icon" || size === "icon-xs" || size === "icon-sm" || size === "icon-lg";
|
|
302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
303
|
+
Comp,
|
|
304
|
+
__spreadProps(__spreadValues({
|
|
305
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
306
|
+
"data-size": size,
|
|
307
|
+
"data-slot": "button",
|
|
308
|
+
"data-variant": variant,
|
|
309
|
+
disabled: loading || disabled,
|
|
310
|
+
ref,
|
|
311
|
+
type
|
|
312
|
+
}, props), {
|
|
313
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
314
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
|
|
315
|
+
!isIconOnly && children
|
|
316
|
+
] }) : children
|
|
317
|
+
})
|
|
318
|
+
);
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
// src/components/ui/calendar.tsx
|
|
322
|
+
var React2 = __toESM(require("react"));
|
|
323
|
+
var import_lucide_react2 = require("lucide-react");
|
|
324
|
+
var import_react_day_picker = require("react-day-picker");
|
|
325
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
326
|
+
function CalendarRoot(_a) {
|
|
327
|
+
var _b = _a, {
|
|
328
|
+
className,
|
|
329
|
+
rootRef
|
|
330
|
+
} = _b, props = __objRest(_b, [
|
|
331
|
+
"className",
|
|
332
|
+
"rootRef"
|
|
333
|
+
]);
|
|
334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
335
|
+
"div",
|
|
336
|
+
__spreadValues({
|
|
337
|
+
className: cn(className),
|
|
338
|
+
"data-slot": "calendar",
|
|
339
|
+
ref: rootRef
|
|
340
|
+
}, props)
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
function CalendarChevron(_a) {
|
|
344
|
+
var _b = _a, {
|
|
345
|
+
className,
|
|
346
|
+
orientation
|
|
347
|
+
} = _b, props = __objRest(_b, [
|
|
348
|
+
"className",
|
|
349
|
+
"orientation"
|
|
350
|
+
]);
|
|
351
|
+
if (orientation === "left") {
|
|
352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react2.ChevronLeftIcon, __spreadValues({ className: cn("size-4", className) }, props));
|
|
353
|
+
}
|
|
354
|
+
if (orientation === "right") {
|
|
355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react2.ChevronRightIcon, __spreadValues({ className: cn("size-4", className) }, props));
|
|
356
|
+
}
|
|
357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react2.ChevronDownIcon, __spreadValues({ className: cn("size-4", className) }, props));
|
|
358
|
+
}
|
|
359
|
+
function CalendarWeekNumber(_a) {
|
|
360
|
+
var _b = _a, {
|
|
361
|
+
children
|
|
362
|
+
} = _b, props = __objRest(_b, [
|
|
363
|
+
"children"
|
|
364
|
+
]);
|
|
365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) }));
|
|
366
|
+
}
|
|
367
|
+
function Calendar(_a) {
|
|
368
|
+
var _b = _a, {
|
|
369
|
+
className,
|
|
370
|
+
classNames,
|
|
371
|
+
showOutsideDays = true,
|
|
372
|
+
captionLayout = "dropdown",
|
|
373
|
+
buttonVariant = "ghost",
|
|
374
|
+
formatters,
|
|
375
|
+
components
|
|
376
|
+
} = _b, props = __objRest(_b, [
|
|
377
|
+
"className",
|
|
378
|
+
"classNames",
|
|
379
|
+
"showOutsideDays",
|
|
380
|
+
"captionLayout",
|
|
381
|
+
"buttonVariant",
|
|
382
|
+
"formatters",
|
|
383
|
+
"components"
|
|
384
|
+
]);
|
|
385
|
+
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
387
|
+
import_react_day_picker.DayPicker,
|
|
388
|
+
__spreadValues({
|
|
389
|
+
captionLayout,
|
|
390
|
+
className: cn(
|
|
391
|
+
"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",
|
|
392
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
393
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
394
|
+
className
|
|
395
|
+
),
|
|
396
|
+
classNames: __spreadValues({
|
|
397
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
398
|
+
months: cn(
|
|
399
|
+
"relative flex flex-col gap-4 md:flex-row",
|
|
400
|
+
defaultClassNames.months
|
|
401
|
+
),
|
|
402
|
+
month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
403
|
+
nav: cn(
|
|
404
|
+
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
405
|
+
defaultClassNames.nav
|
|
406
|
+
),
|
|
407
|
+
button_previous: cn(
|
|
408
|
+
buttonVariants({ variant: buttonVariant }),
|
|
409
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
410
|
+
defaultClassNames.button_previous
|
|
411
|
+
),
|
|
412
|
+
button_next: cn(
|
|
413
|
+
buttonVariants({ variant: buttonVariant }),
|
|
414
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
415
|
+
defaultClassNames.button_next
|
|
416
|
+
),
|
|
417
|
+
month_caption: cn(
|
|
418
|
+
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
419
|
+
defaultClassNames.month_caption
|
|
420
|
+
),
|
|
421
|
+
dropdowns: cn(
|
|
422
|
+
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-label-small",
|
|
423
|
+
defaultClassNames.dropdowns
|
|
424
|
+
),
|
|
425
|
+
dropdown_root: cn(
|
|
426
|
+
"relative border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
|
|
427
|
+
defaultClassNames.dropdown_root
|
|
428
|
+
),
|
|
429
|
+
dropdown: cn(
|
|
430
|
+
"absolute inset-0 bg-popover opacity-0",
|
|
431
|
+
defaultClassNames.dropdown
|
|
432
|
+
),
|
|
433
|
+
caption_label: cn(
|
|
434
|
+
"select-none",
|
|
435
|
+
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",
|
|
436
|
+
defaultClassNames.caption_label
|
|
437
|
+
),
|
|
438
|
+
table: "w-full border-collapse",
|
|
439
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
440
|
+
weekday: cn(
|
|
441
|
+
"flex-1 text-caption font-normal text-muted-foreground select-none",
|
|
442
|
+
defaultClassNames.weekday
|
|
443
|
+
),
|
|
444
|
+
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
445
|
+
week_number_header: cn(
|
|
446
|
+
"w-(--cell-size) select-none",
|
|
447
|
+
defaultClassNames.week_number_header
|
|
448
|
+
),
|
|
449
|
+
week_number: cn(
|
|
450
|
+
"text-caption text-muted-foreground select-none",
|
|
451
|
+
defaultClassNames.week_number
|
|
452
|
+
),
|
|
453
|
+
day: cn(
|
|
454
|
+
"group/day relative aspect-square h-full w-full p-0 text-center select-none",
|
|
455
|
+
defaultClassNames.day
|
|
456
|
+
),
|
|
457
|
+
range_start: cn("bg-accent", defaultClassNames.range_start),
|
|
458
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
459
|
+
range_end: cn("bg-accent", defaultClassNames.range_end),
|
|
460
|
+
today: cn("bg-accent text-accent-foreground", defaultClassNames.today),
|
|
461
|
+
outside: cn(
|
|
462
|
+
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
463
|
+
defaultClassNames.outside
|
|
464
|
+
),
|
|
465
|
+
disabled: cn(
|
|
466
|
+
"text-muted-foreground opacity-50",
|
|
467
|
+
defaultClassNames.disabled
|
|
468
|
+
),
|
|
469
|
+
hidden: cn("invisible", defaultClassNames.hidden)
|
|
470
|
+
}, classNames),
|
|
471
|
+
components: __spreadValues({
|
|
472
|
+
Root: CalendarRoot,
|
|
473
|
+
Chevron: CalendarChevron,
|
|
474
|
+
DayButton: CalendarDayButton,
|
|
475
|
+
WeekNumber: CalendarWeekNumber
|
|
476
|
+
}, components),
|
|
477
|
+
formatters: __spreadValues({
|
|
478
|
+
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" })
|
|
479
|
+
}, formatters),
|
|
480
|
+
showOutsideDays
|
|
481
|
+
}, props)
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
function CalendarDayButton(_a) {
|
|
485
|
+
var _b = _a, {
|
|
486
|
+
className,
|
|
487
|
+
day,
|
|
488
|
+
modifiers
|
|
489
|
+
} = _b, props = __objRest(_b, [
|
|
490
|
+
"className",
|
|
491
|
+
"day",
|
|
492
|
+
"modifiers"
|
|
493
|
+
]);
|
|
494
|
+
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
495
|
+
const ref = React2.useRef(null);
|
|
496
|
+
React2.useEffect(() => {
|
|
497
|
+
var _a2;
|
|
498
|
+
if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
|
|
499
|
+
}, [modifiers.focused]);
|
|
500
|
+
const selectedSingle = modifiers.selected && !modifiers.range_start && !modifiers.range_end ? !modifiers.range_middle : null;
|
|
501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
502
|
+
Button,
|
|
503
|
+
__spreadValues({
|
|
504
|
+
className: cn(
|
|
505
|
+
"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",
|
|
506
|
+
defaultClassNames.day,
|
|
507
|
+
className
|
|
508
|
+
),
|
|
509
|
+
"data-day": day.date.toLocaleDateString(),
|
|
510
|
+
"data-range-end": modifiers.range_end,
|
|
511
|
+
"data-range-middle": modifiers.range_middle,
|
|
512
|
+
"data-range-start": modifiers.range_start,
|
|
513
|
+
"data-selected-single": selectedSingle,
|
|
514
|
+
ref,
|
|
515
|
+
size: "icon",
|
|
516
|
+
variant: "ghost"
|
|
517
|
+
}, props)
|
|
518
|
+
);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
// src/components/ui/dialog.tsx
|
|
522
|
+
var import_lucide_react3 = require("lucide-react");
|
|
523
|
+
var import_dialog = require("@base-ui/react/dialog");
|
|
524
|
+
|
|
525
|
+
// src/lib/theme-provider.tsx
|
|
526
|
+
var import_react2 = require("react");
|
|
527
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
528
|
+
var ThemeVarsContext = (0, import_react2.createContext)({});
|
|
529
|
+
function useThemeVars() {
|
|
530
|
+
return (0, import_react2.useContext)(ThemeVarsContext);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
// src/components/ui/dialog.tsx
|
|
534
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
535
|
+
function Dialog(_a) {
|
|
536
|
+
var props = __objRest(_a, []);
|
|
537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.Dialog.Root, __spreadValues({ "data-slot": "dialog" }, props));
|
|
538
|
+
}
|
|
539
|
+
function DialogPortal(_a) {
|
|
540
|
+
var props = __objRest(_a, []);
|
|
541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.Dialog.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
|
|
542
|
+
}
|
|
543
|
+
function DialogClose(_a) {
|
|
544
|
+
var props = __objRest(_a, []);
|
|
545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.Dialog.Close, __spreadValues({ "data-slot": "dialog-close" }, props));
|
|
546
|
+
}
|
|
547
|
+
function DialogOverlay(_a) {
|
|
548
|
+
var _b = _a, {
|
|
549
|
+
className
|
|
550
|
+
} = _b, props = __objRest(_b, [
|
|
551
|
+
"className"
|
|
552
|
+
]);
|
|
553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
554
|
+
import_dialog.Dialog.Backdrop,
|
|
555
|
+
__spreadValues({
|
|
556
|
+
className: cn(
|
|
557
|
+
// WealthX: foreground/50 scrim (matches Figma — foreground token at 50% opacity)
|
|
558
|
+
"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",
|
|
559
|
+
className
|
|
560
|
+
),
|
|
561
|
+
"data-slot": "dialog-overlay"
|
|
562
|
+
}, props)
|
|
563
|
+
);
|
|
564
|
+
}
|
|
565
|
+
var DIALOG_MAX_WIDTHS = {
|
|
566
|
+
sm: "24rem",
|
|
567
|
+
md: "28rem",
|
|
568
|
+
lg: "32rem",
|
|
569
|
+
xl: "36rem",
|
|
570
|
+
"2xl": "42rem",
|
|
571
|
+
"3xl": "48rem",
|
|
572
|
+
"4xl": "56rem",
|
|
573
|
+
full: "100%"
|
|
574
|
+
};
|
|
575
|
+
var DIALOG_AUTO_MIN_WIDTH = "20rem";
|
|
576
|
+
function DialogContent(_a) {
|
|
577
|
+
var _b = _a, {
|
|
578
|
+
className,
|
|
579
|
+
children,
|
|
580
|
+
showCloseButton = true,
|
|
581
|
+
style,
|
|
582
|
+
container,
|
|
583
|
+
align = "center",
|
|
584
|
+
size = "lg",
|
|
585
|
+
minWidth
|
|
586
|
+
} = _b, props = __objRest(_b, [
|
|
587
|
+
"className",
|
|
588
|
+
"children",
|
|
589
|
+
"showCloseButton",
|
|
590
|
+
"style",
|
|
591
|
+
"container",
|
|
592
|
+
"align",
|
|
593
|
+
"size",
|
|
594
|
+
"minWidth"
|
|
595
|
+
]);
|
|
596
|
+
const themeVars = useThemeVars();
|
|
597
|
+
const isAuto = size === "auto";
|
|
598
|
+
const sizeStyle = isAuto ? { minWidth: minWidth != null ? minWidth : DIALOG_AUTO_MIN_WIDTH } : { maxWidth: DIALOG_MAX_WIDTHS[size] };
|
|
599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(DialogPortal, { container: container != null ? container : void 0, children: [
|
|
600
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogOverlay, { style: themeVars }),
|
|
601
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
602
|
+
import_dialog.Dialog.Popup,
|
|
603
|
+
__spreadProps(__spreadValues({
|
|
604
|
+
className: cn(
|
|
605
|
+
// WealthX: removed rounded-lg (sharp corners), shadow-lg (flat panels)
|
|
606
|
+
// max-w-[calc(100%-2rem)] acts as a viewport-edge guard on all sizes.
|
|
607
|
+
// Fixed max-width is applied via inline style (sizeStyle) to avoid
|
|
608
|
+
// Tailwind v4 class-scanning gaps with dynamic class lookups.
|
|
609
|
+
"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",
|
|
610
|
+
// "auto" → hug content (with min-width floor); fixed sizes → fill to max-width
|
|
611
|
+
isAuto ? "w-auto" : "w-full",
|
|
612
|
+
align === "center" ? "top-[50%] translate-y-[-50%]" : "top-4 translate-y-0",
|
|
613
|
+
className
|
|
614
|
+
),
|
|
615
|
+
"data-slot": "dialog-content",
|
|
616
|
+
style: __spreadValues(__spreadValues(__spreadValues({}, themeVars), sizeStyle), style)
|
|
617
|
+
}, props), {
|
|
618
|
+
children: [
|
|
619
|
+
children,
|
|
620
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
621
|
+
import_dialog.Dialog.Close,
|
|
622
|
+
{
|
|
623
|
+
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",
|
|
624
|
+
"data-slot": "dialog-close",
|
|
625
|
+
children: [
|
|
626
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react3.XIcon, {}),
|
|
627
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "sr-only", children: "Close" })
|
|
628
|
+
]
|
|
629
|
+
}
|
|
630
|
+
) : null
|
|
631
|
+
]
|
|
632
|
+
})
|
|
633
|
+
)
|
|
634
|
+
] });
|
|
635
|
+
}
|
|
636
|
+
function DialogHeader(_a) {
|
|
637
|
+
var _b = _a, {
|
|
638
|
+
className
|
|
639
|
+
} = _b, props = __objRest(_b, [
|
|
640
|
+
"className"
|
|
641
|
+
]);
|
|
642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
643
|
+
"div",
|
|
644
|
+
__spreadValues({
|
|
645
|
+
className: cn("flex flex-col gap-1.5", className),
|
|
646
|
+
"data-slot": "dialog-header"
|
|
647
|
+
}, props)
|
|
648
|
+
);
|
|
649
|
+
}
|
|
650
|
+
function DialogFooter(_a) {
|
|
651
|
+
var _b = _a, {
|
|
652
|
+
className,
|
|
653
|
+
showCloseButton = false,
|
|
654
|
+
children
|
|
655
|
+
} = _b, props = __objRest(_b, [
|
|
656
|
+
"className",
|
|
657
|
+
"showCloseButton",
|
|
658
|
+
"children"
|
|
659
|
+
]);
|
|
660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
661
|
+
"div",
|
|
662
|
+
__spreadProps(__spreadValues({
|
|
663
|
+
className: cn(
|
|
664
|
+
// WealthX: always row layout, right-aligned, separator above footer
|
|
665
|
+
"flex flex-row justify-end gap-2 border-t border-border pt-4",
|
|
666
|
+
className
|
|
667
|
+
),
|
|
668
|
+
"data-slot": "dialog-footer"
|
|
669
|
+
}, props), {
|
|
670
|
+
children: [
|
|
671
|
+
children,
|
|
672
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
673
|
+
import_dialog.Dialog.Close,
|
|
674
|
+
{
|
|
675
|
+
className: cn(buttonVariants({ variant: "outline" })),
|
|
676
|
+
type: "button",
|
|
677
|
+
children: "Close"
|
|
678
|
+
}
|
|
679
|
+
) : null
|
|
680
|
+
]
|
|
681
|
+
})
|
|
682
|
+
);
|
|
683
|
+
}
|
|
684
|
+
function DialogTitle(_a) {
|
|
685
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
687
|
+
import_dialog.Dialog.Title,
|
|
688
|
+
__spreadValues({
|
|
689
|
+
className: cn("text-h5 leading-none", className),
|
|
690
|
+
"data-slot": "dialog-title"
|
|
691
|
+
}, props)
|
|
692
|
+
);
|
|
693
|
+
}
|
|
694
|
+
function DialogDescription(_a) {
|
|
695
|
+
var _b = _a, {
|
|
696
|
+
className
|
|
697
|
+
} = _b, props = __objRest(_b, [
|
|
698
|
+
"className"
|
|
699
|
+
]);
|
|
700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
701
|
+
import_dialog.Dialog.Description,
|
|
702
|
+
__spreadValues({
|
|
703
|
+
className: cn("text-body-small text-muted-foreground", className),
|
|
704
|
+
"data-slot": "dialog-description"
|
|
705
|
+
}, props)
|
|
706
|
+
);
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
// src/components/ui/label.tsx
|
|
710
|
+
var import_jsx_runtime7 = (
|
|
711
|
+
// eslint-disable-next-line jsx-a11y/label-has-associated-control -- htmlFor is passed by the consumer
|
|
712
|
+
require("react/jsx-runtime")
|
|
713
|
+
);
|
|
714
|
+
function Label(_a) {
|
|
715
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
717
|
+
"label",
|
|
718
|
+
__spreadValues({
|
|
719
|
+
className: cn(
|
|
720
|
+
"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",
|
|
721
|
+
className
|
|
722
|
+
),
|
|
723
|
+
"data-slot": "label"
|
|
724
|
+
}, props)
|
|
725
|
+
);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
// src/components/ui/separator.tsx
|
|
729
|
+
var import_separator = require("@base-ui/react/separator");
|
|
730
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
731
|
+
function Separator(_a) {
|
|
732
|
+
var _b = _a, {
|
|
733
|
+
className,
|
|
734
|
+
orientation = "horizontal"
|
|
735
|
+
} = _b, props = __objRest(_b, [
|
|
736
|
+
"className",
|
|
737
|
+
"orientation"
|
|
738
|
+
]);
|
|
739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
740
|
+
import_separator.Separator,
|
|
741
|
+
__spreadValues({
|
|
742
|
+
className: cn(
|
|
743
|
+
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
744
|
+
className
|
|
745
|
+
),
|
|
746
|
+
"data-orientation": orientation,
|
|
747
|
+
"data-slot": "separator"
|
|
748
|
+
}, props)
|
|
749
|
+
);
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
// src/components/ui/textarea.tsx
|
|
753
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
754
|
+
function Textarea(_a) {
|
|
755
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
757
|
+
"textarea",
|
|
758
|
+
__spreadValues({
|
|
759
|
+
className: cn(
|
|
760
|
+
// WealthX: removed shadow-xs (flat panels), added font-sans
|
|
761
|
+
"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",
|
|
762
|
+
className
|
|
763
|
+
),
|
|
764
|
+
"data-slot": "textarea"
|
|
765
|
+
}, props)
|
|
766
|
+
);
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
// src/components/ui/toggle.tsx
|
|
770
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
771
|
+
var import_toggle = require("@base-ui/react/toggle");
|
|
772
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
773
|
+
var toggleVariants = (0, import_class_variance_authority3.cva)(
|
|
774
|
+
"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",
|
|
775
|
+
{
|
|
776
|
+
variants: {
|
|
777
|
+
variant: {
|
|
778
|
+
default: "bg-transparent hover:bg-muted hover:text-muted-foreground",
|
|
779
|
+
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
780
|
+
},
|
|
781
|
+
size: {
|
|
782
|
+
default: "h-9 min-w-9 px-2 text-label-large",
|
|
783
|
+
sm: "h-8 min-w-8 px-1.5 text-label-medium",
|
|
784
|
+
lg: "h-10 min-w-10 px-2.5 text-h5"
|
|
785
|
+
}
|
|
786
|
+
},
|
|
787
|
+
defaultVariants: {
|
|
788
|
+
variant: "default",
|
|
789
|
+
size: "default"
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
);
|
|
793
|
+
function Toggle(_a) {
|
|
794
|
+
var _b = _a, {
|
|
795
|
+
className,
|
|
796
|
+
variant,
|
|
797
|
+
size
|
|
798
|
+
} = _b, props = __objRest(_b, [
|
|
799
|
+
"className",
|
|
800
|
+
"variant",
|
|
801
|
+
"size"
|
|
802
|
+
]);
|
|
803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
804
|
+
import_toggle.Toggle,
|
|
805
|
+
__spreadValues({
|
|
806
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
807
|
+
"data-slot": "toggle"
|
|
808
|
+
}, props)
|
|
809
|
+
);
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
// src/components/ui/appointment-time-slot-picker.tsx
|
|
813
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
814
|
+
function AppointmentSlotSection({
|
|
815
|
+
label,
|
|
816
|
+
slots,
|
|
817
|
+
selectedSlotId,
|
|
818
|
+
onSelect
|
|
819
|
+
}) {
|
|
820
|
+
const hasAvailable = slots.some((s) => s.available);
|
|
821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
822
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
823
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: label }),
|
|
824
|
+
!hasAvailable && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Badge, { variant: "secondary", className: "text-[10px]", children: "No availability" })
|
|
825
|
+
] }),
|
|
826
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex flex-wrap gap-2", children: slots.map((slot) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
827
|
+
Toggle,
|
|
828
|
+
{
|
|
829
|
+
variant: "outline",
|
|
830
|
+
pressed: selectedSlotId === slot.id,
|
|
831
|
+
onPressedChange: (pressed) => {
|
|
832
|
+
if (pressed && slot.available) onSelect == null ? void 0 : onSelect(slot);
|
|
833
|
+
},
|
|
834
|
+
disabled: !slot.available,
|
|
835
|
+
className: "min-w-[88px]",
|
|
836
|
+
children: slot.label
|
|
837
|
+
},
|
|
838
|
+
slot.id
|
|
839
|
+
)) })
|
|
840
|
+
] });
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
// src/components/ui/appointment-upcoming-card.tsx
|
|
844
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
845
|
+
function AppointmentUpcomingCard({
|
|
846
|
+
appointment,
|
|
847
|
+
amSlots = [],
|
|
848
|
+
pmSlots = [],
|
|
849
|
+
onBookAppointment,
|
|
850
|
+
onReschedule,
|
|
851
|
+
onCancel,
|
|
852
|
+
onAcceptReschedule
|
|
853
|
+
}) {
|
|
854
|
+
var _a, _b, _c;
|
|
855
|
+
const [calendarDialogOpen, setCalendarDialogOpen] = import_react3.default.useState(false);
|
|
856
|
+
const [acceptDialogOpen, setAcceptDialogOpen] = import_react3.default.useState(false);
|
|
857
|
+
const [rescheduleDialogOpen, setRescheduleDialogOpen] = import_react3.default.useState(false);
|
|
858
|
+
const [cancelDialogOpen, setCancelDialogOpen] = import_react3.default.useState(false);
|
|
859
|
+
const [rescheduleDate, setRescheduleDate] = import_react3.default.useState(
|
|
860
|
+
/* @__PURE__ */ new Date()
|
|
861
|
+
);
|
|
862
|
+
const [rescheduleSlot, setRescheduleSlot] = import_react3.default.useState(void 0);
|
|
863
|
+
const [rescheduleNote, setRescheduleNote] = import_react3.default.useState("");
|
|
864
|
+
const [cancelReason, setCancelReason] = import_react3.default.useState("");
|
|
865
|
+
const resetRescheduleForm = () => {
|
|
866
|
+
setRescheduleDate(/* @__PURE__ */ new Date());
|
|
867
|
+
setRescheduleSlot(void 0);
|
|
868
|
+
setRescheduleNote("");
|
|
869
|
+
};
|
|
870
|
+
const hasSlotsData = amSlots.length > 0 || pmSlots.length > 0;
|
|
871
|
+
const canSubmitReschedule = hasSlotsData ? !!rescheduleDate && !!rescheduleSlot : !!rescheduleDate;
|
|
872
|
+
if (!appointment) {
|
|
873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col items-center gap-4 border border-border bg-card px-6 py-10 text-center", children: [
|
|
874
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex h-12 w-12 items-center justify-center bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Calendar, { className: "h-6 w-6 text-muted-foreground" }) }),
|
|
875
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
876
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-base font-semibold", children: "No upcoming appointments" }),
|
|
877
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-muted-foreground", children: "Schedule time with your advisor to discuss your financial goals." })
|
|
878
|
+
] }),
|
|
879
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Button, { onClick: onBookAppointment, className: "w-full", children: "Book an Appointment" })
|
|
880
|
+
] });
|
|
881
|
+
}
|
|
882
|
+
const isPending = appointment.status === "pending";
|
|
883
|
+
const isRescheduled = appointment.status === "rescheduled";
|
|
884
|
+
const isCancelled = appointment.status === "cancelled";
|
|
885
|
+
const statusBadge = (() => {
|
|
886
|
+
if (isPending) return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Badge, { variant: "warning", children: "Pending" });
|
|
887
|
+
if (isRescheduled) return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Badge, { variant: "info", children: "Rescheduled" });
|
|
888
|
+
if (isCancelled) return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Badge, { variant: "destructive", children: "Cancelled" });
|
|
889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Badge, { variant: "success", children: "Confirmed" });
|
|
890
|
+
})();
|
|
891
|
+
const noticeBanner = (() => {
|
|
892
|
+
if (isPending) {
|
|
893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "bg-warning/10 px-5 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-foreground", children: "Your booking request has been sent. Your advisor will confirm the appointment shortly." }) });
|
|
894
|
+
}
|
|
895
|
+
if (isRescheduled) {
|
|
896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "bg-info/10 px-5 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-foreground", children: "Your advisor has proposed a new time. Please review and respond below." }) });
|
|
897
|
+
}
|
|
898
|
+
if (isCancelled) {
|
|
899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "bg-destructive/10 px-5 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-foreground", children: "This appointment has been cancelled by your advisor." }) });
|
|
900
|
+
}
|
|
901
|
+
return null;
|
|
902
|
+
})();
|
|
903
|
+
const headerTitle = appointment.appointmentType ? appointment.appointmentType.toUpperCase() : "UPCOMING APPOINTMENT";
|
|
904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
905
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col border border-border bg-card", children: [
|
|
906
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center justify-between px-5 py-4", children: [
|
|
907
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
908
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.CalendarCheck, { className: "h-4 w-4 text-muted-foreground" }),
|
|
909
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground", children: headerTitle })
|
|
910
|
+
] }),
|
|
911
|
+
statusBadge
|
|
912
|
+
] }),
|
|
913
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Separator, {}),
|
|
914
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-4 px-5 py-4", children: [
|
|
915
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Avatar, { className: "h-12 w-12 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AvatarFallback, { className: "text-base", children: appointment.advisor.avatarInitials }) }),
|
|
916
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-0.5", children: [
|
|
917
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-base font-semibold", children: appointment.advisor.name }),
|
|
918
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-muted-foreground", children: appointment.advisor.role }),
|
|
919
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs text-muted-foreground", children: appointment.advisor.company })
|
|
920
|
+
] })
|
|
921
|
+
] }),
|
|
922
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Separator, {}),
|
|
923
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-col gap-4 px-5 py-4", children: isRescheduled ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
924
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
925
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Original time" }),
|
|
926
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2.5 text-sm text-muted-foreground/50 line-through", children: [
|
|
927
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Calendar, { className: "h-4 w-4 shrink-0" }),
|
|
928
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: (_a = appointment.originalDate) != null ? _a : appointment.date })
|
|
929
|
+
] }),
|
|
930
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2.5 text-sm text-muted-foreground/50 line-through", children: [
|
|
931
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Clock, { className: "h-4 w-4 shrink-0" }),
|
|
932
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
|
|
933
|
+
(_b = appointment.originalTimeStart) != null ? _b : appointment.timeStart,
|
|
934
|
+
" \u2013",
|
|
935
|
+
" ",
|
|
936
|
+
(_c = appointment.originalTimeEnd) != null ? _c : appointment.timeEnd
|
|
937
|
+
] })
|
|
938
|
+
] })
|
|
939
|
+
] }),
|
|
940
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
941
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs font-medium uppercase tracking-wide text-info", children: "New proposed time" }),
|
|
942
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2.5 text-sm text-foreground", children: [
|
|
943
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Calendar, { className: "h-4 w-4 shrink-0" }),
|
|
944
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: appointment.date })
|
|
945
|
+
] }),
|
|
946
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2.5 text-sm text-foreground", children: [
|
|
947
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Clock, { className: "h-4 w-4 shrink-0" }),
|
|
948
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
|
|
949
|
+
appointment.timeStart,
|
|
950
|
+
" \u2013 ",
|
|
951
|
+
appointment.timeEnd
|
|
952
|
+
] })
|
|
953
|
+
] })
|
|
954
|
+
] })
|
|
955
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
956
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
957
|
+
"div",
|
|
958
|
+
{
|
|
959
|
+
className: `flex items-center gap-2.5 text-sm ${isCancelled ? "text-muted-foreground/50 line-through" : "text-muted-foreground"}`,
|
|
960
|
+
children: [
|
|
961
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Calendar, { className: "h-4 w-4 shrink-0" }),
|
|
962
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: appointment.date })
|
|
963
|
+
]
|
|
964
|
+
}
|
|
965
|
+
),
|
|
966
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
967
|
+
"div",
|
|
968
|
+
{
|
|
969
|
+
className: `flex items-center gap-2.5 text-sm ${isCancelled ? "text-muted-foreground/50 line-through" : "text-muted-foreground"}`,
|
|
970
|
+
children: [
|
|
971
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Clock, { className: "h-4 w-4 shrink-0" }),
|
|
972
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
|
|
973
|
+
appointment.timeStart,
|
|
974
|
+
" \u2013 ",
|
|
975
|
+
appointment.timeEnd
|
|
976
|
+
] })
|
|
977
|
+
]
|
|
978
|
+
}
|
|
979
|
+
)
|
|
980
|
+
] }) }),
|
|
981
|
+
noticeBanner && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
982
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Separator, {}),
|
|
983
|
+
noticeBanner
|
|
984
|
+
] }),
|
|
985
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Separator, {}),
|
|
986
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-2 px-5 py-4", children: [
|
|
987
|
+
!isPending && !isRescheduled && !isCancelled && appointment.calendarLink && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
988
|
+
Button,
|
|
989
|
+
{
|
|
990
|
+
className: "w-full gap-2",
|
|
991
|
+
onClick: () => setCalendarDialogOpen(true),
|
|
992
|
+
children: [
|
|
993
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.ExternalLink, { className: "h-4 w-4" }),
|
|
994
|
+
"Add to Calendar"
|
|
995
|
+
]
|
|
996
|
+
}
|
|
997
|
+
),
|
|
998
|
+
isRescheduled && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
999
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1000
|
+
Button,
|
|
1001
|
+
{
|
|
1002
|
+
className: "w-full",
|
|
1003
|
+
onClick: () => setAcceptDialogOpen(true),
|
|
1004
|
+
children: "Accept New Time"
|
|
1005
|
+
}
|
|
1006
|
+
),
|
|
1007
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1008
|
+
Button,
|
|
1009
|
+
{
|
|
1010
|
+
variant: "outline",
|
|
1011
|
+
className: "w-full",
|
|
1012
|
+
onClick: () => {
|
|
1013
|
+
resetRescheduleForm();
|
|
1014
|
+
setRescheduleDialogOpen(true);
|
|
1015
|
+
},
|
|
1016
|
+
children: "Request Another Time"
|
|
1017
|
+
}
|
|
1018
|
+
)
|
|
1019
|
+
] }),
|
|
1020
|
+
isCancelled && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Button, { className: "w-full", onClick: onBookAppointment, children: "Book a New Appointment" }),
|
|
1021
|
+
!isRescheduled && !isCancelled && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
1022
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1023
|
+
Button,
|
|
1024
|
+
{
|
|
1025
|
+
variant: "ghost",
|
|
1026
|
+
className: "w-full",
|
|
1027
|
+
onClick: () => {
|
|
1028
|
+
resetRescheduleForm();
|
|
1029
|
+
setRescheduleDialogOpen(true);
|
|
1030
|
+
},
|
|
1031
|
+
children: "Request Reschedule"
|
|
1032
|
+
}
|
|
1033
|
+
),
|
|
1034
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1035
|
+
Button,
|
|
1036
|
+
{
|
|
1037
|
+
variant: "ghost",
|
|
1038
|
+
className: "w-full text-destructive hover:text-destructive",
|
|
1039
|
+
onClick: () => {
|
|
1040
|
+
setCancelReason("");
|
|
1041
|
+
setCancelDialogOpen(true);
|
|
1042
|
+
},
|
|
1043
|
+
children: "Cancel Booking"
|
|
1044
|
+
}
|
|
1045
|
+
)
|
|
1046
|
+
] })
|
|
1047
|
+
] })
|
|
1048
|
+
] }),
|
|
1049
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Dialog, { open: acceptDialogOpen, onOpenChange: setAcceptDialogOpen, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogContent, { children: [
|
|
1050
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogHeader, { children: [
|
|
1051
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogTitle, { children: "Accept New Time" }),
|
|
1052
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogDescription, { children: [
|
|
1053
|
+
"Confirm you want to accept",
|
|
1054
|
+
" ",
|
|
1055
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "font-medium text-foreground", children: appointment.date }),
|
|
1056
|
+
" ",
|
|
1057
|
+
"from",
|
|
1058
|
+
" ",
|
|
1059
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "font-medium text-foreground", children: [
|
|
1060
|
+
appointment.timeStart,
|
|
1061
|
+
" \u2013 ",
|
|
1062
|
+
appointment.timeEnd
|
|
1063
|
+
] }),
|
|
1064
|
+
" ",
|
|
1065
|
+
"as your new appointment time. Your advisor will be notified."
|
|
1066
|
+
] })
|
|
1067
|
+
] }),
|
|
1068
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogFooter, { children: [
|
|
1069
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogClose, { render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Button, { variant: "outline" }), children: "Keep Waiting" }),
|
|
1070
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1071
|
+
Button,
|
|
1072
|
+
{
|
|
1073
|
+
onClick: () => {
|
|
1074
|
+
onAcceptReschedule == null ? void 0 : onAcceptReschedule();
|
|
1075
|
+
setAcceptDialogOpen(false);
|
|
1076
|
+
},
|
|
1077
|
+
children: "Accept New Time"
|
|
1078
|
+
}
|
|
1079
|
+
)
|
|
1080
|
+
] })
|
|
1081
|
+
] }) }),
|
|
1082
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Dialog, { open: calendarDialogOpen, onOpenChange: setCalendarDialogOpen, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogContent, { children: [
|
|
1083
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogHeader, { children: [
|
|
1084
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogTitle, { children: "Add to Google Calendar" }),
|
|
1085
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogDescription, { children: "You'll be taken to Google Calendar to save this appointment. Make sure you're signed in to the correct account." })
|
|
1086
|
+
] }),
|
|
1087
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogFooter, { children: [
|
|
1088
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogClose, { render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Button, { variant: "outline" }), children: "Cancel" }),
|
|
1089
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1090
|
+
Button,
|
|
1091
|
+
{
|
|
1092
|
+
className: "gap-1.5",
|
|
1093
|
+
onClick: () => {
|
|
1094
|
+
window.open(appointment.calendarLink, "_blank");
|
|
1095
|
+
setCalendarDialogOpen(false);
|
|
1096
|
+
},
|
|
1097
|
+
children: [
|
|
1098
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.ExternalLink, { className: "h-4 w-4" }),
|
|
1099
|
+
"Open Google Calendar"
|
|
1100
|
+
]
|
|
1101
|
+
}
|
|
1102
|
+
)
|
|
1103
|
+
] })
|
|
1104
|
+
] }) }),
|
|
1105
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1106
|
+
Dialog,
|
|
1107
|
+
{
|
|
1108
|
+
open: rescheduleDialogOpen,
|
|
1109
|
+
onOpenChange: (next) => {
|
|
1110
|
+
if (!next) resetRescheduleForm();
|
|
1111
|
+
setRescheduleDialogOpen(next);
|
|
1112
|
+
},
|
|
1113
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogContent, { size: "2xl", children: [
|
|
1114
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogHeader, { children: [
|
|
1115
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogTitle, { children: "Request Reschedule" }),
|
|
1116
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogDescription, { children: "Choose your preferred date and time. Your advisor will review the request and confirm a new slot." })
|
|
1117
|
+
] }),
|
|
1118
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Separator, {}),
|
|
1119
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1120
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Current booking" }),
|
|
1121
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.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: [
|
|
1122
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex items-center gap-1.5", children: [
|
|
1123
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Calendar, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
1124
|
+
appointment.date
|
|
1125
|
+
] }),
|
|
1126
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex items-center gap-1.5", children: [
|
|
1127
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Clock, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
1128
|
+
appointment.timeStart,
|
|
1129
|
+
" \u2013 ",
|
|
1130
|
+
appointment.timeEnd
|
|
1131
|
+
] })
|
|
1132
|
+
] })
|
|
1133
|
+
] }),
|
|
1134
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid grid-cols-[auto_1fr] items-start gap-5", children: [
|
|
1135
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1136
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Label, { children: "Preferred date" }),
|
|
1137
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1138
|
+
Calendar,
|
|
1139
|
+
{
|
|
1140
|
+
mode: "single",
|
|
1141
|
+
selected: rescheduleDate,
|
|
1142
|
+
onSelect: (d) => {
|
|
1143
|
+
setRescheduleDate(d);
|
|
1144
|
+
setRescheduleSlot(void 0);
|
|
1145
|
+
},
|
|
1146
|
+
captionLayout: "label",
|
|
1147
|
+
fromDate: /* @__PURE__ */ new Date(),
|
|
1148
|
+
disabled: { before: /* @__PURE__ */ new Date() },
|
|
1149
|
+
className: "border border-border"
|
|
1150
|
+
}
|
|
1151
|
+
)
|
|
1152
|
+
] }),
|
|
1153
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-col gap-4", children: hasSlotsData ? rescheduleDate ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
1154
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm font-semibold", children: "Preferred time" }),
|
|
1155
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1156
|
+
AppointmentSlotSection,
|
|
1157
|
+
{
|
|
1158
|
+
label: "Morning",
|
|
1159
|
+
slots: amSlots,
|
|
1160
|
+
selectedSlotId: rescheduleSlot == null ? void 0 : rescheduleSlot.id,
|
|
1161
|
+
onSelect: setRescheduleSlot
|
|
1162
|
+
}
|
|
1163
|
+
),
|
|
1164
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1165
|
+
AppointmentSlotSection,
|
|
1166
|
+
{
|
|
1167
|
+
label: "Afternoon",
|
|
1168
|
+
slots: pmSlots,
|
|
1169
|
+
selectedSlotId: rescheduleSlot == null ? void 0 : rescheduleSlot.id,
|
|
1170
|
+
onSelect: setRescheduleSlot
|
|
1171
|
+
}
|
|
1172
|
+
)
|
|
1173
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-8 text-center", children: [
|
|
1174
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm font-semibold", children: "Preferred time" }),
|
|
1175
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs text-muted-foreground", children: "Pick a date on the left to see available slots." })
|
|
1176
|
+
] }) : null })
|
|
1177
|
+
] }),
|
|
1178
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1179
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Label, { htmlFor: "reschedule-note", children: [
|
|
1180
|
+
"Note",
|
|
1181
|
+
" ",
|
|
1182
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "font-normal text-muted-foreground", children: "(optional)" })
|
|
1183
|
+
] }),
|
|
1184
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1185
|
+
Textarea,
|
|
1186
|
+
{
|
|
1187
|
+
id: "reschedule-note",
|
|
1188
|
+
placeholder: "e.g. I have a conflict at this time and would like to move to a later slot\u2026",
|
|
1189
|
+
value: rescheduleNote,
|
|
1190
|
+
onChange: (e) => setRescheduleNote(e.target.value),
|
|
1191
|
+
className: "w-full resize-none",
|
|
1192
|
+
rows: 2
|
|
1193
|
+
}
|
|
1194
|
+
)
|
|
1195
|
+
] }),
|
|
1196
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogFooter, { children: [
|
|
1197
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogClose, { render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Button, { variant: "outline" }), children: "Cancel" }),
|
|
1198
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1199
|
+
Button,
|
|
1200
|
+
{
|
|
1201
|
+
disabled: !canSubmitReschedule,
|
|
1202
|
+
onClick: () => {
|
|
1203
|
+
onReschedule == null ? void 0 : onReschedule(rescheduleDate, rescheduleSlot, rescheduleNote);
|
|
1204
|
+
resetRescheduleForm();
|
|
1205
|
+
setRescheduleDialogOpen(false);
|
|
1206
|
+
},
|
|
1207
|
+
children: "Submit Request"
|
|
1208
|
+
}
|
|
1209
|
+
)
|
|
1210
|
+
] })
|
|
1211
|
+
] })
|
|
1212
|
+
}
|
|
1213
|
+
),
|
|
1214
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1215
|
+
Dialog,
|
|
1216
|
+
{
|
|
1217
|
+
open: cancelDialogOpen,
|
|
1218
|
+
onOpenChange: (next) => {
|
|
1219
|
+
if (!next) setCancelReason("");
|
|
1220
|
+
setCancelDialogOpen(next);
|
|
1221
|
+
},
|
|
1222
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogContent, { children: [
|
|
1223
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogHeader, { children: [
|
|
1224
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogTitle, { children: "Cancel Booking" }),
|
|
1225
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogDescription, { children: "Are you sure you want to cancel this appointment? Your advisor will be notified. This action cannot be undone." })
|
|
1226
|
+
] }),
|
|
1227
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1228
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Label, { htmlFor: "cancel-reason", children: [
|
|
1229
|
+
"Reason",
|
|
1230
|
+
" ",
|
|
1231
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "font-normal text-muted-foreground", children: "(optional)" })
|
|
1232
|
+
] }),
|
|
1233
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1234
|
+
Textarea,
|
|
1235
|
+
{
|
|
1236
|
+
id: "cancel-reason",
|
|
1237
|
+
placeholder: "e.g. I need to reschedule due to a conflict\u2026",
|
|
1238
|
+
value: cancelReason,
|
|
1239
|
+
onChange: (e) => setCancelReason(e.target.value),
|
|
1240
|
+
className: "w-full resize-none",
|
|
1241
|
+
rows: 2
|
|
1242
|
+
}
|
|
1243
|
+
)
|
|
1244
|
+
] }),
|
|
1245
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogFooter, { children: [
|
|
1246
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogClose, { render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Button, { variant: "outline" }), children: "Keep Booking" }),
|
|
1247
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1248
|
+
Button,
|
|
1249
|
+
{
|
|
1250
|
+
variant: "destructive",
|
|
1251
|
+
onClick: () => {
|
|
1252
|
+
onCancel == null ? void 0 : onCancel(cancelReason);
|
|
1253
|
+
setCancelReason("");
|
|
1254
|
+
setCancelDialogOpen(false);
|
|
1255
|
+
},
|
|
1256
|
+
children: "Cancel Booking"
|
|
1257
|
+
}
|
|
1258
|
+
)
|
|
1259
|
+
] })
|
|
1260
|
+
] })
|
|
1261
|
+
}
|
|
1262
|
+
)
|
|
1263
|
+
] });
|
|
1264
|
+
}
|
|
1265
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1266
|
+
0 && (module.exports = {
|
|
1267
|
+
AppointmentUpcomingCard
|
|
1268
|
+
});
|