@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,1744 @@
|
|
|
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-book-dialog.tsx
|
|
60
|
+
var appointment_book_dialog_exports = {};
|
|
61
|
+
__export(appointment_book_dialog_exports, {
|
|
62
|
+
AppointmentBookDialog: () => AppointmentBookDialog
|
|
63
|
+
});
|
|
64
|
+
module.exports = __toCommonJS(appointment_book_dialog_exports);
|
|
65
|
+
var import_react3 = __toESM(require("react"));
|
|
66
|
+
|
|
67
|
+
// src/components/ui/button.tsx
|
|
68
|
+
var import_react = require("react");
|
|
69
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
70
|
+
var import_lucide_react = require("lucide-react");
|
|
71
|
+
|
|
72
|
+
// src/lib/utils.ts
|
|
73
|
+
var import_clsx = require("clsx");
|
|
74
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
75
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
76
|
+
extend: {
|
|
77
|
+
classGroups: {
|
|
78
|
+
"font-size": [
|
|
79
|
+
{
|
|
80
|
+
text: [
|
|
81
|
+
"display-large",
|
|
82
|
+
"display-medium",
|
|
83
|
+
"display-small",
|
|
84
|
+
"h1",
|
|
85
|
+
"h2",
|
|
86
|
+
"h3",
|
|
87
|
+
"h4",
|
|
88
|
+
"h5",
|
|
89
|
+
"h6",
|
|
90
|
+
"body-large",
|
|
91
|
+
"body-medium",
|
|
92
|
+
"body-small",
|
|
93
|
+
"label-large",
|
|
94
|
+
"label-medium",
|
|
95
|
+
"label-small",
|
|
96
|
+
"button",
|
|
97
|
+
"button-xs",
|
|
98
|
+
"caption",
|
|
99
|
+
"overline",
|
|
100
|
+
"code"
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
function cn(...inputs) {
|
|
108
|
+
return twMerge((0, import_clsx.clsx)(inputs));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// src/lib/slot.tsx
|
|
112
|
+
var React = __toESM(require("react"));
|
|
113
|
+
function mergeRefs(...refs) {
|
|
114
|
+
return (value) => {
|
|
115
|
+
for (const ref of refs) {
|
|
116
|
+
if (typeof ref === "function") ref(value);
|
|
117
|
+
else if (ref !== null)
|
|
118
|
+
ref.current = value;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
var Slot = React.forwardRef(
|
|
123
|
+
(_a, forwardedRef) => {
|
|
124
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
125
|
+
const child = React.Children.only(children);
|
|
126
|
+
if (!React.isValidElement(child)) return null;
|
|
127
|
+
const childProps = child.props;
|
|
128
|
+
const merged = __spreadValues({}, props);
|
|
129
|
+
for (const key of Object.keys(childProps)) {
|
|
130
|
+
if (key === "className") {
|
|
131
|
+
merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
|
|
132
|
+
} else if (key === "style") {
|
|
133
|
+
merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
|
|
134
|
+
} else if (key.startsWith("on") && typeof childProps[key] === "function") {
|
|
135
|
+
const parentHandler = props[key];
|
|
136
|
+
if (typeof parentHandler === "function") {
|
|
137
|
+
merged[key] = (...args) => {
|
|
138
|
+
childProps[key](...args);
|
|
139
|
+
parentHandler(...args);
|
|
140
|
+
};
|
|
141
|
+
} else {
|
|
142
|
+
merged[key] = childProps[key];
|
|
143
|
+
}
|
|
144
|
+
} else {
|
|
145
|
+
merged[key] = childProps[key];
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
const childRef = child.ref;
|
|
149
|
+
merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
|
|
150
|
+
return React.cloneElement(
|
|
151
|
+
child,
|
|
152
|
+
merged
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
Slot.displayName = "Slot";
|
|
157
|
+
|
|
158
|
+
// src/components/ui/button.tsx
|
|
159
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
160
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
161
|
+
"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",
|
|
162
|
+
{
|
|
163
|
+
variants: {
|
|
164
|
+
variant: {
|
|
165
|
+
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
166
|
+
secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
|
|
167
|
+
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",
|
|
168
|
+
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",
|
|
169
|
+
"outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
|
|
170
|
+
"outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:ring-brand-secondary/30",
|
|
171
|
+
ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs focus-visible:ring-border/50 dark:hover:bg-accent/50",
|
|
172
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
173
|
+
},
|
|
174
|
+
size: {
|
|
175
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
176
|
+
xs: "h-6 gap-1 px-2 text-button-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
177
|
+
sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
178
|
+
lg: "h-10 px-6 has-[>svg]:px-4",
|
|
179
|
+
icon: "size-9",
|
|
180
|
+
"icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
181
|
+
"icon-sm": "size-8",
|
|
182
|
+
"icon-lg": "size-10"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
defaultVariants: {
|
|
186
|
+
variant: "default",
|
|
187
|
+
size: "default"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
|
|
192
|
+
var _b = _a, {
|
|
193
|
+
className,
|
|
194
|
+
variant,
|
|
195
|
+
size,
|
|
196
|
+
asChild = false,
|
|
197
|
+
loading = false,
|
|
198
|
+
disabled,
|
|
199
|
+
type = "button",
|
|
200
|
+
children
|
|
201
|
+
} = _b, props = __objRest(_b, [
|
|
202
|
+
"className",
|
|
203
|
+
"variant",
|
|
204
|
+
"size",
|
|
205
|
+
"asChild",
|
|
206
|
+
"loading",
|
|
207
|
+
"disabled",
|
|
208
|
+
"type",
|
|
209
|
+
"children"
|
|
210
|
+
]);
|
|
211
|
+
const Comp = asChild ? Slot : "button";
|
|
212
|
+
const isIconOnly = size === "icon" || size === "icon-xs" || size === "icon-sm" || size === "icon-lg";
|
|
213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
214
|
+
Comp,
|
|
215
|
+
__spreadProps(__spreadValues({
|
|
216
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
217
|
+
"data-size": size,
|
|
218
|
+
"data-slot": "button",
|
|
219
|
+
"data-variant": variant,
|
|
220
|
+
disabled: loading || disabled,
|
|
221
|
+
ref,
|
|
222
|
+
type
|
|
223
|
+
}, props), {
|
|
224
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
225
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
|
|
226
|
+
!isIconOnly && children
|
|
227
|
+
] }) : children
|
|
228
|
+
})
|
|
229
|
+
);
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
// src/components/ui/calendar.tsx
|
|
233
|
+
var React2 = __toESM(require("react"));
|
|
234
|
+
var import_lucide_react2 = require("lucide-react");
|
|
235
|
+
var import_react_day_picker = require("react-day-picker");
|
|
236
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
237
|
+
function CalendarRoot(_a) {
|
|
238
|
+
var _b = _a, {
|
|
239
|
+
className,
|
|
240
|
+
rootRef
|
|
241
|
+
} = _b, props = __objRest(_b, [
|
|
242
|
+
"className",
|
|
243
|
+
"rootRef"
|
|
244
|
+
]);
|
|
245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
246
|
+
"div",
|
|
247
|
+
__spreadValues({
|
|
248
|
+
className: cn(className),
|
|
249
|
+
"data-slot": "calendar",
|
|
250
|
+
ref: rootRef
|
|
251
|
+
}, props)
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
function CalendarChevron(_a) {
|
|
255
|
+
var _b = _a, {
|
|
256
|
+
className,
|
|
257
|
+
orientation
|
|
258
|
+
} = _b, props = __objRest(_b, [
|
|
259
|
+
"className",
|
|
260
|
+
"orientation"
|
|
261
|
+
]);
|
|
262
|
+
if (orientation === "left") {
|
|
263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.ChevronLeftIcon, __spreadValues({ className: cn("size-4", className) }, props));
|
|
264
|
+
}
|
|
265
|
+
if (orientation === "right") {
|
|
266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.ChevronRightIcon, __spreadValues({ className: cn("size-4", className) }, props));
|
|
267
|
+
}
|
|
268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.ChevronDownIcon, __spreadValues({ className: cn("size-4", className) }, props));
|
|
269
|
+
}
|
|
270
|
+
function CalendarWeekNumber(_a) {
|
|
271
|
+
var _b = _a, {
|
|
272
|
+
children
|
|
273
|
+
} = _b, props = __objRest(_b, [
|
|
274
|
+
"children"
|
|
275
|
+
]);
|
|
276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("td", __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) }));
|
|
277
|
+
}
|
|
278
|
+
function Calendar(_a) {
|
|
279
|
+
var _b = _a, {
|
|
280
|
+
className,
|
|
281
|
+
classNames,
|
|
282
|
+
showOutsideDays = true,
|
|
283
|
+
captionLayout = "dropdown",
|
|
284
|
+
buttonVariant = "ghost",
|
|
285
|
+
formatters,
|
|
286
|
+
components
|
|
287
|
+
} = _b, props = __objRest(_b, [
|
|
288
|
+
"className",
|
|
289
|
+
"classNames",
|
|
290
|
+
"showOutsideDays",
|
|
291
|
+
"captionLayout",
|
|
292
|
+
"buttonVariant",
|
|
293
|
+
"formatters",
|
|
294
|
+
"components"
|
|
295
|
+
]);
|
|
296
|
+
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
298
|
+
import_react_day_picker.DayPicker,
|
|
299
|
+
__spreadValues({
|
|
300
|
+
captionLayout,
|
|
301
|
+
className: cn(
|
|
302
|
+
"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",
|
|
303
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
304
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
305
|
+
className
|
|
306
|
+
),
|
|
307
|
+
classNames: __spreadValues({
|
|
308
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
309
|
+
months: cn(
|
|
310
|
+
"relative flex flex-col gap-4 md:flex-row",
|
|
311
|
+
defaultClassNames.months
|
|
312
|
+
),
|
|
313
|
+
month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
314
|
+
nav: cn(
|
|
315
|
+
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
316
|
+
defaultClassNames.nav
|
|
317
|
+
),
|
|
318
|
+
button_previous: cn(
|
|
319
|
+
buttonVariants({ variant: buttonVariant }),
|
|
320
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
321
|
+
defaultClassNames.button_previous
|
|
322
|
+
),
|
|
323
|
+
button_next: cn(
|
|
324
|
+
buttonVariants({ variant: buttonVariant }),
|
|
325
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
326
|
+
defaultClassNames.button_next
|
|
327
|
+
),
|
|
328
|
+
month_caption: cn(
|
|
329
|
+
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
330
|
+
defaultClassNames.month_caption
|
|
331
|
+
),
|
|
332
|
+
dropdowns: cn(
|
|
333
|
+
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-label-small",
|
|
334
|
+
defaultClassNames.dropdowns
|
|
335
|
+
),
|
|
336
|
+
dropdown_root: cn(
|
|
337
|
+
"relative border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
|
|
338
|
+
defaultClassNames.dropdown_root
|
|
339
|
+
),
|
|
340
|
+
dropdown: cn(
|
|
341
|
+
"absolute inset-0 bg-popover opacity-0",
|
|
342
|
+
defaultClassNames.dropdown
|
|
343
|
+
),
|
|
344
|
+
caption_label: cn(
|
|
345
|
+
"select-none",
|
|
346
|
+
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",
|
|
347
|
+
defaultClassNames.caption_label
|
|
348
|
+
),
|
|
349
|
+
table: "w-full border-collapse",
|
|
350
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
351
|
+
weekday: cn(
|
|
352
|
+
"flex-1 text-caption font-normal text-muted-foreground select-none",
|
|
353
|
+
defaultClassNames.weekday
|
|
354
|
+
),
|
|
355
|
+
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
356
|
+
week_number_header: cn(
|
|
357
|
+
"w-(--cell-size) select-none",
|
|
358
|
+
defaultClassNames.week_number_header
|
|
359
|
+
),
|
|
360
|
+
week_number: cn(
|
|
361
|
+
"text-caption text-muted-foreground select-none",
|
|
362
|
+
defaultClassNames.week_number
|
|
363
|
+
),
|
|
364
|
+
day: cn(
|
|
365
|
+
"group/day relative aspect-square h-full w-full p-0 text-center select-none",
|
|
366
|
+
defaultClassNames.day
|
|
367
|
+
),
|
|
368
|
+
range_start: cn("bg-accent", defaultClassNames.range_start),
|
|
369
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
370
|
+
range_end: cn("bg-accent", defaultClassNames.range_end),
|
|
371
|
+
today: cn("bg-accent text-accent-foreground", defaultClassNames.today),
|
|
372
|
+
outside: cn(
|
|
373
|
+
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
374
|
+
defaultClassNames.outside
|
|
375
|
+
),
|
|
376
|
+
disabled: cn(
|
|
377
|
+
"text-muted-foreground opacity-50",
|
|
378
|
+
defaultClassNames.disabled
|
|
379
|
+
),
|
|
380
|
+
hidden: cn("invisible", defaultClassNames.hidden)
|
|
381
|
+
}, classNames),
|
|
382
|
+
components: __spreadValues({
|
|
383
|
+
Root: CalendarRoot,
|
|
384
|
+
Chevron: CalendarChevron,
|
|
385
|
+
DayButton: CalendarDayButton,
|
|
386
|
+
WeekNumber: CalendarWeekNumber
|
|
387
|
+
}, components),
|
|
388
|
+
formatters: __spreadValues({
|
|
389
|
+
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" })
|
|
390
|
+
}, formatters),
|
|
391
|
+
showOutsideDays
|
|
392
|
+
}, props)
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
function CalendarDayButton(_a) {
|
|
396
|
+
var _b = _a, {
|
|
397
|
+
className,
|
|
398
|
+
day,
|
|
399
|
+
modifiers
|
|
400
|
+
} = _b, props = __objRest(_b, [
|
|
401
|
+
"className",
|
|
402
|
+
"day",
|
|
403
|
+
"modifiers"
|
|
404
|
+
]);
|
|
405
|
+
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
406
|
+
const ref = React2.useRef(null);
|
|
407
|
+
React2.useEffect(() => {
|
|
408
|
+
var _a2;
|
|
409
|
+
if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
|
|
410
|
+
}, [modifiers.focused]);
|
|
411
|
+
const selectedSingle = modifiers.selected && !modifiers.range_start && !modifiers.range_end ? !modifiers.range_middle : null;
|
|
412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
413
|
+
Button,
|
|
414
|
+
__spreadValues({
|
|
415
|
+
className: cn(
|
|
416
|
+
"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",
|
|
417
|
+
defaultClassNames.day,
|
|
418
|
+
className
|
|
419
|
+
),
|
|
420
|
+
"data-day": day.date.toLocaleDateString(),
|
|
421
|
+
"data-range-end": modifiers.range_end,
|
|
422
|
+
"data-range-middle": modifiers.range_middle,
|
|
423
|
+
"data-range-start": modifiers.range_start,
|
|
424
|
+
"data-selected-single": selectedSingle,
|
|
425
|
+
ref,
|
|
426
|
+
size: "icon",
|
|
427
|
+
variant: "ghost"
|
|
428
|
+
}, props)
|
|
429
|
+
);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// src/components/ui/dialog.tsx
|
|
433
|
+
var import_lucide_react3 = require("lucide-react");
|
|
434
|
+
var import_dialog = require("@base-ui/react/dialog");
|
|
435
|
+
|
|
436
|
+
// src/lib/theme-provider.tsx
|
|
437
|
+
var import_react2 = require("react");
|
|
438
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
439
|
+
var ThemeVarsContext = (0, import_react2.createContext)({});
|
|
440
|
+
function useThemeVars() {
|
|
441
|
+
return (0, import_react2.useContext)(ThemeVarsContext);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
// src/components/ui/dialog.tsx
|
|
445
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
446
|
+
function Dialog(_a) {
|
|
447
|
+
var props = __objRest(_a, []);
|
|
448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dialog.Dialog.Root, __spreadValues({ "data-slot": "dialog" }, props));
|
|
449
|
+
}
|
|
450
|
+
function DialogPortal(_a) {
|
|
451
|
+
var props = __objRest(_a, []);
|
|
452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dialog.Dialog.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
|
|
453
|
+
}
|
|
454
|
+
function DialogClose(_a) {
|
|
455
|
+
var props = __objRest(_a, []);
|
|
456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dialog.Dialog.Close, __spreadValues({ "data-slot": "dialog-close" }, props));
|
|
457
|
+
}
|
|
458
|
+
function DialogOverlay(_a) {
|
|
459
|
+
var _b = _a, {
|
|
460
|
+
className
|
|
461
|
+
} = _b, props = __objRest(_b, [
|
|
462
|
+
"className"
|
|
463
|
+
]);
|
|
464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
465
|
+
import_dialog.Dialog.Backdrop,
|
|
466
|
+
__spreadValues({
|
|
467
|
+
className: cn(
|
|
468
|
+
// WealthX: foreground/50 scrim (matches Figma — foreground token at 50% opacity)
|
|
469
|
+
"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",
|
|
470
|
+
className
|
|
471
|
+
),
|
|
472
|
+
"data-slot": "dialog-overlay"
|
|
473
|
+
}, props)
|
|
474
|
+
);
|
|
475
|
+
}
|
|
476
|
+
var DIALOG_MAX_WIDTHS = {
|
|
477
|
+
sm: "24rem",
|
|
478
|
+
md: "28rem",
|
|
479
|
+
lg: "32rem",
|
|
480
|
+
xl: "36rem",
|
|
481
|
+
"2xl": "42rem",
|
|
482
|
+
"3xl": "48rem",
|
|
483
|
+
"4xl": "56rem",
|
|
484
|
+
full: "100%"
|
|
485
|
+
};
|
|
486
|
+
var DIALOG_AUTO_MIN_WIDTH = "20rem";
|
|
487
|
+
function DialogContent(_a) {
|
|
488
|
+
var _b = _a, {
|
|
489
|
+
className,
|
|
490
|
+
children,
|
|
491
|
+
showCloseButton = true,
|
|
492
|
+
style,
|
|
493
|
+
container,
|
|
494
|
+
align = "center",
|
|
495
|
+
size = "lg",
|
|
496
|
+
minWidth
|
|
497
|
+
} = _b, props = __objRest(_b, [
|
|
498
|
+
"className",
|
|
499
|
+
"children",
|
|
500
|
+
"showCloseButton",
|
|
501
|
+
"style",
|
|
502
|
+
"container",
|
|
503
|
+
"align",
|
|
504
|
+
"size",
|
|
505
|
+
"minWidth"
|
|
506
|
+
]);
|
|
507
|
+
const themeVars = useThemeVars();
|
|
508
|
+
const isAuto = size === "auto";
|
|
509
|
+
const sizeStyle = isAuto ? { minWidth: minWidth != null ? minWidth : DIALOG_AUTO_MIN_WIDTH } : { maxWidth: DIALOG_MAX_WIDTHS[size] };
|
|
510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(DialogPortal, { container: container != null ? container : void 0, children: [
|
|
511
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DialogOverlay, { style: themeVars }),
|
|
512
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
513
|
+
import_dialog.Dialog.Popup,
|
|
514
|
+
__spreadProps(__spreadValues({
|
|
515
|
+
className: cn(
|
|
516
|
+
// WealthX: removed rounded-lg (sharp corners), shadow-lg (flat panels)
|
|
517
|
+
// max-w-[calc(100%-2rem)] acts as a viewport-edge guard on all sizes.
|
|
518
|
+
// Fixed max-width is applied via inline style (sizeStyle) to avoid
|
|
519
|
+
// Tailwind v4 class-scanning gaps with dynamic class lookups.
|
|
520
|
+
"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",
|
|
521
|
+
// "auto" → hug content (with min-width floor); fixed sizes → fill to max-width
|
|
522
|
+
isAuto ? "w-auto" : "w-full",
|
|
523
|
+
align === "center" ? "top-[50%] translate-y-[-50%]" : "top-4 translate-y-0",
|
|
524
|
+
className
|
|
525
|
+
),
|
|
526
|
+
"data-slot": "dialog-content",
|
|
527
|
+
style: __spreadValues(__spreadValues(__spreadValues({}, themeVars), sizeStyle), style)
|
|
528
|
+
}, props), {
|
|
529
|
+
children: [
|
|
530
|
+
children,
|
|
531
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
532
|
+
import_dialog.Dialog.Close,
|
|
533
|
+
{
|
|
534
|
+
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",
|
|
535
|
+
"data-slot": "dialog-close",
|
|
536
|
+
children: [
|
|
537
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.XIcon, {}),
|
|
538
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "sr-only", children: "Close" })
|
|
539
|
+
]
|
|
540
|
+
}
|
|
541
|
+
) : null
|
|
542
|
+
]
|
|
543
|
+
})
|
|
544
|
+
)
|
|
545
|
+
] });
|
|
546
|
+
}
|
|
547
|
+
function DialogHeader(_a) {
|
|
548
|
+
var _b = _a, {
|
|
549
|
+
className
|
|
550
|
+
} = _b, props = __objRest(_b, [
|
|
551
|
+
"className"
|
|
552
|
+
]);
|
|
553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
554
|
+
"div",
|
|
555
|
+
__spreadValues({
|
|
556
|
+
className: cn("flex flex-col gap-1.5", className),
|
|
557
|
+
"data-slot": "dialog-header"
|
|
558
|
+
}, props)
|
|
559
|
+
);
|
|
560
|
+
}
|
|
561
|
+
function DialogFooter(_a) {
|
|
562
|
+
var _b = _a, {
|
|
563
|
+
className,
|
|
564
|
+
showCloseButton = false,
|
|
565
|
+
children
|
|
566
|
+
} = _b, props = __objRest(_b, [
|
|
567
|
+
"className",
|
|
568
|
+
"showCloseButton",
|
|
569
|
+
"children"
|
|
570
|
+
]);
|
|
571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
572
|
+
"div",
|
|
573
|
+
__spreadProps(__spreadValues({
|
|
574
|
+
className: cn(
|
|
575
|
+
// WealthX: always row layout, right-aligned, separator above footer
|
|
576
|
+
"flex flex-row justify-end gap-2 border-t border-border pt-4",
|
|
577
|
+
className
|
|
578
|
+
),
|
|
579
|
+
"data-slot": "dialog-footer"
|
|
580
|
+
}, props), {
|
|
581
|
+
children: [
|
|
582
|
+
children,
|
|
583
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
584
|
+
import_dialog.Dialog.Close,
|
|
585
|
+
{
|
|
586
|
+
className: cn(buttonVariants({ variant: "outline" })),
|
|
587
|
+
type: "button",
|
|
588
|
+
children: "Close"
|
|
589
|
+
}
|
|
590
|
+
) : null
|
|
591
|
+
]
|
|
592
|
+
})
|
|
593
|
+
);
|
|
594
|
+
}
|
|
595
|
+
function DialogTitle(_a) {
|
|
596
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
598
|
+
import_dialog.Dialog.Title,
|
|
599
|
+
__spreadValues({
|
|
600
|
+
className: cn("text-h5 leading-none", className),
|
|
601
|
+
"data-slot": "dialog-title"
|
|
602
|
+
}, props)
|
|
603
|
+
);
|
|
604
|
+
}
|
|
605
|
+
function DialogDescription(_a) {
|
|
606
|
+
var _b = _a, {
|
|
607
|
+
className
|
|
608
|
+
} = _b, props = __objRest(_b, [
|
|
609
|
+
"className"
|
|
610
|
+
]);
|
|
611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
612
|
+
import_dialog.Dialog.Description,
|
|
613
|
+
__spreadValues({
|
|
614
|
+
className: cn("text-body-small text-muted-foreground", className),
|
|
615
|
+
"data-slot": "dialog-description"
|
|
616
|
+
}, props)
|
|
617
|
+
);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
// src/components/ui/form-primitives.tsx
|
|
621
|
+
var React6 = __toESM(require("react"));
|
|
622
|
+
var import_lucide_react4 = require("lucide-react");
|
|
623
|
+
|
|
624
|
+
// src/components/ui/input.tsx
|
|
625
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
626
|
+
function Input(_a) {
|
|
627
|
+
var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
|
|
628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
629
|
+
"input",
|
|
630
|
+
__spreadValues({
|
|
631
|
+
className: cn(
|
|
632
|
+
"h-9 w-full min-w-0 border border-input bg-transparent px-3 py-1 text-body-medium font-sans shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-label-medium file:text-foreground placeholder:font-normal placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30",
|
|
633
|
+
"focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20",
|
|
634
|
+
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
635
|
+
className
|
|
636
|
+
),
|
|
637
|
+
"data-slot": "input",
|
|
638
|
+
type
|
|
639
|
+
}, props)
|
|
640
|
+
);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
// src/components/ui/label.tsx
|
|
644
|
+
var import_jsx_runtime6 = (
|
|
645
|
+
// eslint-disable-next-line jsx-a11y/label-has-associated-control -- htmlFor is passed by the consumer
|
|
646
|
+
require("react/jsx-runtime")
|
|
647
|
+
);
|
|
648
|
+
function Label(_a) {
|
|
649
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
651
|
+
"label",
|
|
652
|
+
__spreadValues({
|
|
653
|
+
className: cn(
|
|
654
|
+
"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",
|
|
655
|
+
className
|
|
656
|
+
),
|
|
657
|
+
"data-slot": "label"
|
|
658
|
+
}, props)
|
|
659
|
+
);
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
// src/components/ui/slider.tsx
|
|
663
|
+
var React4 = __toESM(require("react"));
|
|
664
|
+
var import_slider = require("@base-ui/react/slider");
|
|
665
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
666
|
+
var Slider = React4.forwardRef(
|
|
667
|
+
({
|
|
668
|
+
className,
|
|
669
|
+
value,
|
|
670
|
+
defaultValue = 0,
|
|
671
|
+
min = 0,
|
|
672
|
+
max = 100,
|
|
673
|
+
step = 1,
|
|
674
|
+
disabled = false,
|
|
675
|
+
onValueChange
|
|
676
|
+
}, ref) => {
|
|
677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
678
|
+
import_slider.Slider.Root,
|
|
679
|
+
{
|
|
680
|
+
ref,
|
|
681
|
+
value,
|
|
682
|
+
defaultValue,
|
|
683
|
+
min,
|
|
684
|
+
max,
|
|
685
|
+
step,
|
|
686
|
+
disabled,
|
|
687
|
+
thumbAlignment: "edge",
|
|
688
|
+
onValueChange: (val) => onValueChange == null ? void 0 : onValueChange(val),
|
|
689
|
+
"data-slot": "slider",
|
|
690
|
+
className: cn(
|
|
691
|
+
"relative w-full touch-none select-none",
|
|
692
|
+
disabled && "opacity-50",
|
|
693
|
+
className
|
|
694
|
+
),
|
|
695
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
696
|
+
import_slider.Slider.Control,
|
|
697
|
+
{
|
|
698
|
+
className: "relative flex h-5 w-full cursor-pointer items-center",
|
|
699
|
+
"data-slot": "slider-control",
|
|
700
|
+
children: [
|
|
701
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
702
|
+
import_slider.Slider.Track,
|
|
703
|
+
{
|
|
704
|
+
className: "relative h-2 w-full overflow-hidden rounded-full bg-muted",
|
|
705
|
+
"data-slot": "slider-track",
|
|
706
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
707
|
+
import_slider.Slider.Indicator,
|
|
708
|
+
{
|
|
709
|
+
className: "absolute h-full rounded-full bg-primary",
|
|
710
|
+
"data-slot": "slider-indicator"
|
|
711
|
+
}
|
|
712
|
+
)
|
|
713
|
+
}
|
|
714
|
+
),
|
|
715
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
716
|
+
import_slider.Slider.Thumb,
|
|
717
|
+
{
|
|
718
|
+
className: cn(
|
|
719
|
+
"block size-5 rounded-full border-2 border-primary bg-background shadow-sm",
|
|
720
|
+
"outline-none"
|
|
721
|
+
),
|
|
722
|
+
"data-slot": "slider-thumb"
|
|
723
|
+
}
|
|
724
|
+
)
|
|
725
|
+
]
|
|
726
|
+
}
|
|
727
|
+
)
|
|
728
|
+
}
|
|
729
|
+
);
|
|
730
|
+
}
|
|
731
|
+
);
|
|
732
|
+
Slider.displayName = "Slider";
|
|
733
|
+
|
|
734
|
+
// src/components/ui/toggle-group.tsx
|
|
735
|
+
var React5 = __toESM(require("react"));
|
|
736
|
+
var import_toggle_group = require("@base-ui/react/toggle-group");
|
|
737
|
+
var import_toggle2 = require("@base-ui/react/toggle");
|
|
738
|
+
|
|
739
|
+
// src/components/ui/toggle.tsx
|
|
740
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
741
|
+
var import_toggle = require("@base-ui/react/toggle");
|
|
742
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
743
|
+
var toggleVariants = (0, import_class_variance_authority2.cva)(
|
|
744
|
+
"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",
|
|
745
|
+
{
|
|
746
|
+
variants: {
|
|
747
|
+
variant: {
|
|
748
|
+
default: "bg-transparent hover:bg-muted hover:text-muted-foreground",
|
|
749
|
+
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
750
|
+
},
|
|
751
|
+
size: {
|
|
752
|
+
default: "h-9 min-w-9 px-2 text-label-large",
|
|
753
|
+
sm: "h-8 min-w-8 px-1.5 text-label-medium",
|
|
754
|
+
lg: "h-10 min-w-10 px-2.5 text-h5"
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
defaultVariants: {
|
|
758
|
+
variant: "default",
|
|
759
|
+
size: "default"
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
);
|
|
763
|
+
function Toggle(_a) {
|
|
764
|
+
var _b = _a, {
|
|
765
|
+
className,
|
|
766
|
+
variant,
|
|
767
|
+
size
|
|
768
|
+
} = _b, props = __objRest(_b, [
|
|
769
|
+
"className",
|
|
770
|
+
"variant",
|
|
771
|
+
"size"
|
|
772
|
+
]);
|
|
773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
774
|
+
import_toggle.Toggle,
|
|
775
|
+
__spreadValues({
|
|
776
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
777
|
+
"data-slot": "toggle"
|
|
778
|
+
}, props)
|
|
779
|
+
);
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
// src/components/ui/toggle-group.tsx
|
|
783
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
784
|
+
var ToggleGroupContext = React5.createContext({
|
|
785
|
+
size: "default",
|
|
786
|
+
variant: "default",
|
|
787
|
+
spacing: 0
|
|
788
|
+
});
|
|
789
|
+
|
|
790
|
+
// src/components/ui/form-primitives.tsx
|
|
791
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
792
|
+
var DEFAULT_SUGGESTIONS = [
|
|
793
|
+
{
|
|
794
|
+
id: "1",
|
|
795
|
+
label: "12 Harbour View Terrace, Mosman NSW 2088",
|
|
796
|
+
suburb: "Mosman",
|
|
797
|
+
state: "NSW",
|
|
798
|
+
postcode: "2088"
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
id: "2",
|
|
802
|
+
label: "5 Coastal Road, Manly NSW 2095",
|
|
803
|
+
suburb: "Manly",
|
|
804
|
+
state: "NSW",
|
|
805
|
+
postcode: "2095"
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
id: "3",
|
|
809
|
+
label: "24 Collins Street, Melbourne VIC 3000",
|
|
810
|
+
suburb: "Melbourne",
|
|
811
|
+
state: "VIC",
|
|
812
|
+
postcode: "3000"
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
id: "4",
|
|
816
|
+
label: "88 Pacific Highway, St Leonards NSW 2065",
|
|
817
|
+
suburb: "St Leonards",
|
|
818
|
+
state: "NSW",
|
|
819
|
+
postcode: "2065"
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
id: "5",
|
|
823
|
+
label: "1 Queen Street, Brisbane QLD 4000",
|
|
824
|
+
suburb: "Brisbane",
|
|
825
|
+
state: "QLD",
|
|
826
|
+
postcode: "4000"
|
|
827
|
+
}
|
|
828
|
+
];
|
|
829
|
+
function AddressAutocomplete({
|
|
830
|
+
value: controlledValue,
|
|
831
|
+
placeholder = "Start typing an address\u2026",
|
|
832
|
+
suggestions = DEFAULT_SUGGESTIONS,
|
|
833
|
+
disabled = false,
|
|
834
|
+
onValueChange,
|
|
835
|
+
onSelect,
|
|
836
|
+
className
|
|
837
|
+
}) {
|
|
838
|
+
const [internalValue, setInternalValue] = React6.useState("");
|
|
839
|
+
const inputValue = controlledValue !== void 0 ? controlledValue : internalValue;
|
|
840
|
+
const [open, setOpen] = React6.useState(false);
|
|
841
|
+
const [activeIndex, setActiveIndex] = React6.useState(-1);
|
|
842
|
+
const containerRef = React6.useRef(null);
|
|
843
|
+
const listRef = React6.useRef(null);
|
|
844
|
+
const filtered = React6.useMemo(() => {
|
|
845
|
+
if (!inputValue.trim()) return suggestions.slice(0, 5);
|
|
846
|
+
const q = inputValue.toLowerCase();
|
|
847
|
+
return suggestions.filter((s) => s.label.toLowerCase().includes(q)).slice(0, 5);
|
|
848
|
+
}, [inputValue, suggestions]);
|
|
849
|
+
const setValue = (v) => {
|
|
850
|
+
if (controlledValue === void 0) setInternalValue(v);
|
|
851
|
+
onValueChange == null ? void 0 : onValueChange(v);
|
|
852
|
+
};
|
|
853
|
+
const handleSelect = (opt) => {
|
|
854
|
+
setValue(opt.label);
|
|
855
|
+
onSelect == null ? void 0 : onSelect(opt);
|
|
856
|
+
setOpen(false);
|
|
857
|
+
setActiveIndex(-1);
|
|
858
|
+
};
|
|
859
|
+
const handleKeyDown = (e) => {
|
|
860
|
+
if (!open) return;
|
|
861
|
+
if (e.key === "ArrowDown") {
|
|
862
|
+
e.preventDefault();
|
|
863
|
+
setActiveIndex((i) => Math.min(i + 1, filtered.length - 1));
|
|
864
|
+
} else if (e.key === "ArrowUp") {
|
|
865
|
+
e.preventDefault();
|
|
866
|
+
setActiveIndex((i) => Math.max(i - 1, -1));
|
|
867
|
+
} else if (e.key === "Enter" && activeIndex >= 0) {
|
|
868
|
+
e.preventDefault();
|
|
869
|
+
handleSelect(filtered[activeIndex]);
|
|
870
|
+
} else if (e.key === "Escape") {
|
|
871
|
+
setOpen(false);
|
|
872
|
+
}
|
|
873
|
+
};
|
|
874
|
+
React6.useEffect(() => {
|
|
875
|
+
const handler = (e) => {
|
|
876
|
+
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
877
|
+
setOpen(false);
|
|
878
|
+
}
|
|
879
|
+
};
|
|
880
|
+
document.addEventListener("mousedown", handler);
|
|
881
|
+
return () => document.removeEventListener("mousedown", handler);
|
|
882
|
+
}, []);
|
|
883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { ref: containerRef, className: cn("relative", className), children: [
|
|
884
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "relative", children: [
|
|
885
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react4.Search, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground pointer-events-none" }),
|
|
886
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
887
|
+
Input,
|
|
888
|
+
{
|
|
889
|
+
type: "text",
|
|
890
|
+
value: inputValue,
|
|
891
|
+
placeholder,
|
|
892
|
+
disabled,
|
|
893
|
+
className: "pl-8",
|
|
894
|
+
onChange: (e) => {
|
|
895
|
+
setValue(e.target.value);
|
|
896
|
+
setOpen(true);
|
|
897
|
+
setActiveIndex(-1);
|
|
898
|
+
},
|
|
899
|
+
onFocus: () => setOpen(true),
|
|
900
|
+
onKeyDown: handleKeyDown,
|
|
901
|
+
"aria-autocomplete": "list",
|
|
902
|
+
"aria-expanded": open
|
|
903
|
+
}
|
|
904
|
+
)
|
|
905
|
+
] }),
|
|
906
|
+
open && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
907
|
+
"ul",
|
|
908
|
+
{
|
|
909
|
+
ref: listRef,
|
|
910
|
+
role: "listbox",
|
|
911
|
+
className: cn(
|
|
912
|
+
"absolute z-50 top-full left-0 right-0 mt-1",
|
|
913
|
+
"border border-border bg-popover shadow-md",
|
|
914
|
+
"max-h-48 overflow-y-auto py-1"
|
|
915
|
+
),
|
|
916
|
+
children: filtered.map((opt, idx) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
917
|
+
"li",
|
|
918
|
+
{
|
|
919
|
+
role: "option",
|
|
920
|
+
"aria-selected": idx === activeIndex,
|
|
921
|
+
onMouseEnter: () => setActiveIndex(idx),
|
|
922
|
+
onMouseDown: (e) => {
|
|
923
|
+
e.preventDefault();
|
|
924
|
+
handleSelect(opt);
|
|
925
|
+
},
|
|
926
|
+
className: cn(
|
|
927
|
+
"flex items-center gap-2 px-3 py-2 text-sm cursor-pointer",
|
|
928
|
+
idx === activeIndex ? "bg-accent text-accent-foreground" : "hover:bg-accent/50"
|
|
929
|
+
),
|
|
930
|
+
children: [
|
|
931
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "flex-1 truncate", children: opt.label }),
|
|
932
|
+
idx === activeIndex && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react4.Check, { className: "h-3.5 w-3.5 shrink-0 text-primary" })
|
|
933
|
+
]
|
|
934
|
+
},
|
|
935
|
+
opt.id
|
|
936
|
+
))
|
|
937
|
+
}
|
|
938
|
+
)
|
|
939
|
+
] });
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
// src/components/ui/radio-group.tsx
|
|
943
|
+
var import_lucide_react5 = require("lucide-react");
|
|
944
|
+
var import_radio_group = require("@base-ui/react/radio-group");
|
|
945
|
+
var import_radio = require("@base-ui/react/radio");
|
|
946
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
947
|
+
var CIRCLE_BASE = "inline-flex items-center justify-center aspect-square size-4 shrink-0 rounded-full border border-primary bg-background";
|
|
948
|
+
var INDICATOR_DOT = "size-2 fill-background text-background";
|
|
949
|
+
function RadioGroup(_a) {
|
|
950
|
+
var _b = _a, {
|
|
951
|
+
className
|
|
952
|
+
} = _b, props = __objRest(_b, [
|
|
953
|
+
"className"
|
|
954
|
+
]);
|
|
955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
956
|
+
import_radio_group.RadioGroup,
|
|
957
|
+
__spreadValues({
|
|
958
|
+
className: cn("grid gap-3", className),
|
|
959
|
+
"data-slot": "radio-group"
|
|
960
|
+
}, props)
|
|
961
|
+
);
|
|
962
|
+
}
|
|
963
|
+
function RadioGroupItem(_a) {
|
|
964
|
+
var _b = _a, {
|
|
965
|
+
className
|
|
966
|
+
} = _b, props = __objRest(_b, [
|
|
967
|
+
"className"
|
|
968
|
+
]);
|
|
969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
970
|
+
import_radio.Radio.Root,
|
|
971
|
+
__spreadProps(__spreadValues({
|
|
972
|
+
className: cn(
|
|
973
|
+
CIRCLE_BASE,
|
|
974
|
+
"transition-all outline-none",
|
|
975
|
+
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
976
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
977
|
+
"data-checked:bg-primary",
|
|
978
|
+
"aria-invalid:border-destructive aria-invalid:ring-destructive/20",
|
|
979
|
+
"aria-invalid:data-checked:border-destructive aria-invalid:data-checked:bg-destructive",
|
|
980
|
+
"dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
|
|
981
|
+
className
|
|
982
|
+
),
|
|
983
|
+
"data-slot": "radio-group-item"
|
|
984
|
+
}, props), {
|
|
985
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
986
|
+
import_radio.Radio.Indicator,
|
|
987
|
+
{
|
|
988
|
+
"data-slot": "radio-group-indicator",
|
|
989
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react5.CircleIcon, { className: INDICATOR_DOT })
|
|
990
|
+
}
|
|
991
|
+
)
|
|
992
|
+
})
|
|
993
|
+
);
|
|
994
|
+
}
|
|
995
|
+
function RadioGroupCard(_a) {
|
|
996
|
+
var _b = _a, {
|
|
997
|
+
className,
|
|
998
|
+
value,
|
|
999
|
+
disabled,
|
|
1000
|
+
error,
|
|
1001
|
+
label,
|
|
1002
|
+
description
|
|
1003
|
+
} = _b, props = __objRest(_b, [
|
|
1004
|
+
"className",
|
|
1005
|
+
"value",
|
|
1006
|
+
"disabled",
|
|
1007
|
+
"error",
|
|
1008
|
+
"label",
|
|
1009
|
+
"description"
|
|
1010
|
+
]);
|
|
1011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1012
|
+
import_radio.Radio.Root,
|
|
1013
|
+
__spreadProps(__spreadValues({
|
|
1014
|
+
"aria-invalid": error || void 0,
|
|
1015
|
+
className: cn(
|
|
1016
|
+
"group/card flex items-center gap-3 border border-border p-4 font-sans transition-colors text-left cursor-pointer outline-none",
|
|
1017
|
+
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
1018
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
1019
|
+
"data-checked:border-primary data-checked:bg-primary/5",
|
|
1020
|
+
"aria-invalid:border-destructive",
|
|
1021
|
+
"aria-invalid:data-checked:border-destructive aria-invalid:data-checked:bg-destructive/5",
|
|
1022
|
+
className
|
|
1023
|
+
),
|
|
1024
|
+
"data-slot": "radio-group-card",
|
|
1025
|
+
disabled,
|
|
1026
|
+
value
|
|
1027
|
+
}, props), {
|
|
1028
|
+
children: [
|
|
1029
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1030
|
+
"div",
|
|
1031
|
+
{
|
|
1032
|
+
className: cn(
|
|
1033
|
+
CIRCLE_BASE,
|
|
1034
|
+
"transition-colors",
|
|
1035
|
+
"group-data-[checked]/card:bg-primary",
|
|
1036
|
+
"group-aria-invalid/card:border-destructive",
|
|
1037
|
+
"group-aria-invalid/card:group-data-[checked]/card:border-destructive group-aria-invalid/card:group-data-[checked]/card:bg-destructive"
|
|
1038
|
+
),
|
|
1039
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_radio.Radio.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react5.CircleIcon, { className: INDICATOR_DOT }) })
|
|
1040
|
+
}
|
|
1041
|
+
),
|
|
1042
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
1043
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-sm font-medium leading-none", children: label }),
|
|
1044
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-sm text-muted-foreground", children: description }) : null
|
|
1045
|
+
] })
|
|
1046
|
+
]
|
|
1047
|
+
})
|
|
1048
|
+
);
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
// src/components/ui/select.tsx
|
|
1052
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1053
|
+
var import_select = require("@base-ui/react/select");
|
|
1054
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1055
|
+
function Select(_a) {
|
|
1056
|
+
var props = __objRest(_a, []);
|
|
1057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_select.Select.Root, __spreadValues({ "data-slot": "select" }, props));
|
|
1058
|
+
}
|
|
1059
|
+
function SelectValue(_a) {
|
|
1060
|
+
var props = __objRest(_a, []);
|
|
1061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_select.Select.Value, __spreadValues({ "data-slot": "select-value" }, props));
|
|
1062
|
+
}
|
|
1063
|
+
function SelectTrigger(_a) {
|
|
1064
|
+
var _b = _a, {
|
|
1065
|
+
className,
|
|
1066
|
+
size = "default",
|
|
1067
|
+
children
|
|
1068
|
+
} = _b, props = __objRest(_b, [
|
|
1069
|
+
"className",
|
|
1070
|
+
"size",
|
|
1071
|
+
"children"
|
|
1072
|
+
]);
|
|
1073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1074
|
+
import_select.Select.Trigger,
|
|
1075
|
+
__spreadProps(__spreadValues({
|
|
1076
|
+
className: cn(
|
|
1077
|
+
"flex w-fit items-center justify-between gap-2 border border-input bg-transparent px-3 py-2 text-body-medium whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20 data-popup-open:border-primary data-popup-open:ring-[3px] data-popup-open:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:font-normal data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
1078
|
+
className
|
|
1079
|
+
),
|
|
1080
|
+
"data-size": size,
|
|
1081
|
+
"data-slot": "select-trigger"
|
|
1082
|
+
}, props), {
|
|
1083
|
+
children: [
|
|
1084
|
+
children,
|
|
1085
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_select.Select.Icon, { className: "transition-transform duration-200 data-popup-open:rotate-180", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react6.ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
1086
|
+
]
|
|
1087
|
+
})
|
|
1088
|
+
);
|
|
1089
|
+
}
|
|
1090
|
+
function SelectContent(_a) {
|
|
1091
|
+
var _b = _a, {
|
|
1092
|
+
className,
|
|
1093
|
+
children,
|
|
1094
|
+
style
|
|
1095
|
+
} = _b, props = __objRest(_b, [
|
|
1096
|
+
"className",
|
|
1097
|
+
"children",
|
|
1098
|
+
"style"
|
|
1099
|
+
]);
|
|
1100
|
+
const themeVars = useThemeVars();
|
|
1101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_select.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1102
|
+
import_select.Select.Positioner,
|
|
1103
|
+
{
|
|
1104
|
+
className: "z-[200]",
|
|
1105
|
+
align: "start",
|
|
1106
|
+
alignItemWithTrigger: false,
|
|
1107
|
+
sideOffset: 4,
|
|
1108
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1109
|
+
import_select.Select.Popup,
|
|
1110
|
+
__spreadProps(__spreadValues({
|
|
1111
|
+
className: cn(
|
|
1112
|
+
"relative max-h-[var(--available-height)] min-w-[var(--anchor-width,8rem)] overflow-x-hidden overflow-y-auto border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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",
|
|
1113
|
+
className
|
|
1114
|
+
),
|
|
1115
|
+
"data-slot": "select-content",
|
|
1116
|
+
style: __spreadValues(__spreadValues({}, themeVars), style)
|
|
1117
|
+
}, props), {
|
|
1118
|
+
children: [
|
|
1119
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SelectScrollUpButton, {}),
|
|
1120
|
+
children,
|
|
1121
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SelectScrollDownButton, {})
|
|
1122
|
+
]
|
|
1123
|
+
})
|
|
1124
|
+
)
|
|
1125
|
+
}
|
|
1126
|
+
) });
|
|
1127
|
+
}
|
|
1128
|
+
function SelectItem(_a) {
|
|
1129
|
+
var _b = _a, {
|
|
1130
|
+
className,
|
|
1131
|
+
children
|
|
1132
|
+
} = _b, props = __objRest(_b, [
|
|
1133
|
+
"className",
|
|
1134
|
+
"children"
|
|
1135
|
+
]);
|
|
1136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1137
|
+
import_select.Select.Item,
|
|
1138
|
+
__spreadProps(__spreadValues({
|
|
1139
|
+
className: cn(
|
|
1140
|
+
"relative flex w-full cursor-default items-center gap-2 py-1.5 pr-8 pl-2 text-body-small outline-hidden select-none data-highlighted:bg-primary/5 data-highlighted:text-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
1141
|
+
className
|
|
1142
|
+
),
|
|
1143
|
+
"data-slot": "select-item"
|
|
1144
|
+
}, props), {
|
|
1145
|
+
children: [
|
|
1146
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1147
|
+
"span",
|
|
1148
|
+
{
|
|
1149
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
1150
|
+
"data-slot": "select-item-indicator",
|
|
1151
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_select.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react6.CheckIcon, { className: "size-4" }) })
|
|
1152
|
+
}
|
|
1153
|
+
),
|
|
1154
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_select.Select.ItemText, { children })
|
|
1155
|
+
]
|
|
1156
|
+
})
|
|
1157
|
+
);
|
|
1158
|
+
}
|
|
1159
|
+
function SelectScrollUpButton(_a) {
|
|
1160
|
+
var _b = _a, {
|
|
1161
|
+
className
|
|
1162
|
+
} = _b, props = __objRest(_b, [
|
|
1163
|
+
"className"
|
|
1164
|
+
]);
|
|
1165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1166
|
+
import_select.Select.ScrollUpArrow,
|
|
1167
|
+
__spreadProps(__spreadValues({
|
|
1168
|
+
className: cn(
|
|
1169
|
+
"flex cursor-default items-center justify-center py-1",
|
|
1170
|
+
className
|
|
1171
|
+
),
|
|
1172
|
+
"data-slot": "select-scroll-up-button"
|
|
1173
|
+
}, props), {
|
|
1174
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react6.ChevronUpIcon, { className: "size-4" })
|
|
1175
|
+
})
|
|
1176
|
+
);
|
|
1177
|
+
}
|
|
1178
|
+
function SelectScrollDownButton(_a) {
|
|
1179
|
+
var _b = _a, {
|
|
1180
|
+
className
|
|
1181
|
+
} = _b, props = __objRest(_b, [
|
|
1182
|
+
"className"
|
|
1183
|
+
]);
|
|
1184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1185
|
+
import_select.Select.ScrollDownArrow,
|
|
1186
|
+
__spreadProps(__spreadValues({
|
|
1187
|
+
className: cn(
|
|
1188
|
+
"flex cursor-default items-center justify-center py-1",
|
|
1189
|
+
className
|
|
1190
|
+
),
|
|
1191
|
+
"data-slot": "select-scroll-down-button"
|
|
1192
|
+
}, props), {
|
|
1193
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react6.ChevronDownIcon, { className: "size-4" })
|
|
1194
|
+
})
|
|
1195
|
+
);
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
// src/components/ui/separator.tsx
|
|
1199
|
+
var import_separator = require("@base-ui/react/separator");
|
|
1200
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1201
|
+
function Separator(_a) {
|
|
1202
|
+
var _b = _a, {
|
|
1203
|
+
className,
|
|
1204
|
+
orientation = "horizontal"
|
|
1205
|
+
} = _b, props = __objRest(_b, [
|
|
1206
|
+
"className",
|
|
1207
|
+
"orientation"
|
|
1208
|
+
]);
|
|
1209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1210
|
+
import_separator.Separator,
|
|
1211
|
+
__spreadValues({
|
|
1212
|
+
className: cn(
|
|
1213
|
+
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
1214
|
+
className
|
|
1215
|
+
),
|
|
1216
|
+
"data-orientation": orientation,
|
|
1217
|
+
"data-slot": "separator"
|
|
1218
|
+
}, props)
|
|
1219
|
+
);
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
// src/components/ui/textarea.tsx
|
|
1223
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1224
|
+
function Textarea(_a) {
|
|
1225
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1227
|
+
"textarea",
|
|
1228
|
+
__spreadValues({
|
|
1229
|
+
className: cn(
|
|
1230
|
+
// WealthX: removed shadow-xs (flat panels), added font-sans
|
|
1231
|
+
"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",
|
|
1232
|
+
className
|
|
1233
|
+
),
|
|
1234
|
+
"data-slot": "textarea"
|
|
1235
|
+
}, props)
|
|
1236
|
+
);
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
// src/components/ui/avatar.tsx
|
|
1240
|
+
var import_avatar = require("@base-ui/react/avatar");
|
|
1241
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1242
|
+
function Avatar(_a) {
|
|
1243
|
+
var _b = _a, {
|
|
1244
|
+
className,
|
|
1245
|
+
size = "default"
|
|
1246
|
+
} = _b, props = __objRest(_b, [
|
|
1247
|
+
"className",
|
|
1248
|
+
"size"
|
|
1249
|
+
]);
|
|
1250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1251
|
+
import_avatar.Avatar.Root,
|
|
1252
|
+
__spreadValues({
|
|
1253
|
+
className: cn(
|
|
1254
|
+
"group/avatar relative flex size-8 shrink-0 rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",
|
|
1255
|
+
className
|
|
1256
|
+
),
|
|
1257
|
+
"data-size": size,
|
|
1258
|
+
"data-slot": "avatar"
|
|
1259
|
+
}, props)
|
|
1260
|
+
);
|
|
1261
|
+
}
|
|
1262
|
+
function AvatarFallback(_a) {
|
|
1263
|
+
var _b = _a, {
|
|
1264
|
+
className
|
|
1265
|
+
} = _b, props = __objRest(_b, [
|
|
1266
|
+
"className"
|
|
1267
|
+
]);
|
|
1268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1269
|
+
import_avatar.Avatar.Fallback,
|
|
1270
|
+
__spreadValues({
|
|
1271
|
+
className: cn(
|
|
1272
|
+
"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",
|
|
1273
|
+
className
|
|
1274
|
+
),
|
|
1275
|
+
"data-slot": "avatar-fallback"
|
|
1276
|
+
}, props)
|
|
1277
|
+
);
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
// src/components/ui/appointment-book-dialog.tsx
|
|
1281
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1282
|
+
|
|
1283
|
+
// src/components/ui/badge.tsx
|
|
1284
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
1285
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1286
|
+
var badgeVariants = (0, import_class_variance_authority3.cva)(
|
|
1287
|
+
"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",
|
|
1288
|
+
{
|
|
1289
|
+
variants: {
|
|
1290
|
+
variant: {
|
|
1291
|
+
default: "border-primary/40 bg-primary/10 text-foreground [a&]:hover:bg-primary/15",
|
|
1292
|
+
secondary: "border-border bg-muted text-muted-foreground [a&]:hover:bg-muted/80",
|
|
1293
|
+
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",
|
|
1294
|
+
success: "border-success/40 bg-success/10 text-success-text [a&]:hover:bg-success/15",
|
|
1295
|
+
warning: "border-warning/40 bg-warning/10 text-warning-text [a&]:hover:bg-warning/15",
|
|
1296
|
+
info: "border-info/40 bg-info/10 text-info-text [a&]:hover:bg-info/15",
|
|
1297
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
1298
|
+
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
1299
|
+
link: "text-primary underline-offset-4 [a&]:hover:underline"
|
|
1300
|
+
}
|
|
1301
|
+
},
|
|
1302
|
+
defaultVariants: {
|
|
1303
|
+
variant: "default"
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
);
|
|
1307
|
+
function Badge(_a) {
|
|
1308
|
+
var _b = _a, {
|
|
1309
|
+
className,
|
|
1310
|
+
variant = "default",
|
|
1311
|
+
asChild = false
|
|
1312
|
+
} = _b, props = __objRest(_b, [
|
|
1313
|
+
"className",
|
|
1314
|
+
"variant",
|
|
1315
|
+
"asChild"
|
|
1316
|
+
]);
|
|
1317
|
+
const Comp = asChild ? Slot : "span";
|
|
1318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1319
|
+
Comp,
|
|
1320
|
+
__spreadValues({
|
|
1321
|
+
className: cn(badgeVariants({ variant }), className),
|
|
1322
|
+
"data-slot": "badge",
|
|
1323
|
+
"data-variant": variant
|
|
1324
|
+
}, props)
|
|
1325
|
+
);
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
// src/components/ui/appointment-time-slot-picker.tsx
|
|
1329
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1330
|
+
function AppointmentSlotSection({
|
|
1331
|
+
label,
|
|
1332
|
+
slots,
|
|
1333
|
+
selectedSlotId,
|
|
1334
|
+
onSelect
|
|
1335
|
+
}) {
|
|
1336
|
+
const hasAvailable = slots.some((s) => s.available);
|
|
1337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1338
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1339
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: label }),
|
|
1340
|
+
!hasAvailable && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Badge, { variant: "secondary", className: "text-[10px]", children: "No availability" })
|
|
1341
|
+
] }),
|
|
1342
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-wrap gap-2", children: slots.map((slot) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1343
|
+
Toggle,
|
|
1344
|
+
{
|
|
1345
|
+
variant: "outline",
|
|
1346
|
+
pressed: selectedSlotId === slot.id,
|
|
1347
|
+
onPressedChange: (pressed) => {
|
|
1348
|
+
if (pressed && slot.available) onSelect == null ? void 0 : onSelect(slot);
|
|
1349
|
+
},
|
|
1350
|
+
disabled: !slot.available,
|
|
1351
|
+
className: "min-w-[88px]",
|
|
1352
|
+
children: slot.label
|
|
1353
|
+
},
|
|
1354
|
+
slot.id
|
|
1355
|
+
)) })
|
|
1356
|
+
] });
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
// src/components/ui/appointment-book-dialog.tsx
|
|
1360
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1361
|
+
function ClientSearch({
|
|
1362
|
+
clients,
|
|
1363
|
+
value,
|
|
1364
|
+
onValueChange
|
|
1365
|
+
}) {
|
|
1366
|
+
const [query, setQuery] = import_react3.default.useState("");
|
|
1367
|
+
const [open, setOpen] = import_react3.default.useState(false);
|
|
1368
|
+
const selected = clients.find((c) => c.id === value);
|
|
1369
|
+
const filtered = clients.filter((c) => {
|
|
1370
|
+
const q = query.toLowerCase();
|
|
1371
|
+
return c.name.toLowerCase().includes(q) || c.email.toLowerCase().includes(q);
|
|
1372
|
+
});
|
|
1373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "relative", children: [
|
|
1374
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1375
|
+
Input,
|
|
1376
|
+
{
|
|
1377
|
+
value: selected ? selected.name : query,
|
|
1378
|
+
onChange: (e) => {
|
|
1379
|
+
setQuery(e.target.value);
|
|
1380
|
+
if (selected) onValueChange(void 0);
|
|
1381
|
+
setOpen(e.target.value.length > 0);
|
|
1382
|
+
},
|
|
1383
|
+
onBlur: () => setTimeout(() => setOpen(false), 150),
|
|
1384
|
+
placeholder: "Search by name or email\u2026",
|
|
1385
|
+
autoComplete: "off"
|
|
1386
|
+
}
|
|
1387
|
+
),
|
|
1388
|
+
open && (filtered.length > 0 || query.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "absolute z-50 mt-1 w-full border border-border bg-popover shadow-md", children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: "No clients found." }) : filtered.map((c) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1389
|
+
Button,
|
|
1390
|
+
{
|
|
1391
|
+
type: "button",
|
|
1392
|
+
variant: "ghost",
|
|
1393
|
+
className: "h-auto w-full flex-col items-start gap-0.5 px-3 py-2 text-left hover:bg-primary/5",
|
|
1394
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
1395
|
+
onClick: () => {
|
|
1396
|
+
onValueChange(c.id);
|
|
1397
|
+
setQuery("");
|
|
1398
|
+
setOpen(false);
|
|
1399
|
+
},
|
|
1400
|
+
children: [
|
|
1401
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-sm font-medium", children: c.name }),
|
|
1402
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xs text-muted-foreground", children: c.email })
|
|
1403
|
+
]
|
|
1404
|
+
},
|
|
1405
|
+
c.id
|
|
1406
|
+
)) })
|
|
1407
|
+
] });
|
|
1408
|
+
}
|
|
1409
|
+
var FORMAT_OPTIONS = [
|
|
1410
|
+
{ value: "call", label: "Call", icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react7.Phone, { className: "h-4 w-4" }) },
|
|
1411
|
+
{
|
|
1412
|
+
value: "google-meet",
|
|
1413
|
+
label: "Google Meet",
|
|
1414
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react7.Video, { className: "h-4 w-4" })
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
value: "offline",
|
|
1418
|
+
label: "Offline",
|
|
1419
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react7.MapPin, { className: "h-4 w-4" })
|
|
1420
|
+
}
|
|
1421
|
+
];
|
|
1422
|
+
function MeetingFormatSection({
|
|
1423
|
+
format,
|
|
1424
|
+
onFormatChange,
|
|
1425
|
+
offlineLocation,
|
|
1426
|
+
onOfflineLocationChange,
|
|
1427
|
+
customAddress,
|
|
1428
|
+
onCustomAddressChange,
|
|
1429
|
+
advisorOfficeAddress,
|
|
1430
|
+
clientHomeAddress,
|
|
1431
|
+
isClientMode
|
|
1432
|
+
}) {
|
|
1433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1434
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex gap-2", children: FORMAT_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1435
|
+
Toggle,
|
|
1436
|
+
{
|
|
1437
|
+
variant: "outline",
|
|
1438
|
+
pressed: format === opt.value,
|
|
1439
|
+
onPressedChange: () => onFormatChange(opt.value),
|
|
1440
|
+
className: "flex-1 gap-1.5",
|
|
1441
|
+
children: [
|
|
1442
|
+
opt.icon,
|
|
1443
|
+
opt.label
|
|
1444
|
+
]
|
|
1445
|
+
},
|
|
1446
|
+
opt.value
|
|
1447
|
+
)) }),
|
|
1448
|
+
format === "offline" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-2 border border-border p-3", children: [
|
|
1449
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Location" }),
|
|
1450
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1451
|
+
RadioGroup,
|
|
1452
|
+
{
|
|
1453
|
+
value: offlineLocation,
|
|
1454
|
+
onValueChange: (v) => onOfflineLocationChange(v),
|
|
1455
|
+
className: "gap-2",
|
|
1456
|
+
children: [
|
|
1457
|
+
advisorOfficeAddress && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1458
|
+
RadioGroupCard,
|
|
1459
|
+
{
|
|
1460
|
+
value: "office",
|
|
1461
|
+
label: "Advisor's Office",
|
|
1462
|
+
description: advisorOfficeAddress
|
|
1463
|
+
}
|
|
1464
|
+
),
|
|
1465
|
+
clientHomeAddress && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1466
|
+
RadioGroupCard,
|
|
1467
|
+
{
|
|
1468
|
+
value: "home",
|
|
1469
|
+
label: isClientMode ? "Home" : "Client's Home",
|
|
1470
|
+
description: clientHomeAddress
|
|
1471
|
+
}
|
|
1472
|
+
),
|
|
1473
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1474
|
+
RadioGroupCard,
|
|
1475
|
+
{
|
|
1476
|
+
value: "custom",
|
|
1477
|
+
label: "Custom address",
|
|
1478
|
+
description: "Enter a specific location"
|
|
1479
|
+
}
|
|
1480
|
+
)
|
|
1481
|
+
]
|
|
1482
|
+
}
|
|
1483
|
+
),
|
|
1484
|
+
offlineLocation === "custom" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1485
|
+
AddressAutocomplete,
|
|
1486
|
+
{
|
|
1487
|
+
value: customAddress,
|
|
1488
|
+
onValueChange: onCustomAddressChange,
|
|
1489
|
+
placeholder: "e.g. 123 Collins St, Melbourne VIC 3000"
|
|
1490
|
+
}
|
|
1491
|
+
)
|
|
1492
|
+
] })
|
|
1493
|
+
] });
|
|
1494
|
+
}
|
|
1495
|
+
function AppointmentBookDialog({
|
|
1496
|
+
open,
|
|
1497
|
+
onOpenChange,
|
|
1498
|
+
clients = [],
|
|
1499
|
+
meetingTypes = [],
|
|
1500
|
+
amSlots,
|
|
1501
|
+
pmSlots,
|
|
1502
|
+
schedule,
|
|
1503
|
+
advisorOfficeAddress,
|
|
1504
|
+
clientHomeAddress,
|
|
1505
|
+
advisorInfo,
|
|
1506
|
+
initialClientId,
|
|
1507
|
+
onBook
|
|
1508
|
+
}) {
|
|
1509
|
+
const isClientMode = clients.length === 0;
|
|
1510
|
+
const DAY_MAP = {
|
|
1511
|
+
Sun: 0,
|
|
1512
|
+
Mon: 1,
|
|
1513
|
+
Tue: 2,
|
|
1514
|
+
Wed: 3,
|
|
1515
|
+
Thu: 4,
|
|
1516
|
+
Fri: 5,
|
|
1517
|
+
Sat: 6
|
|
1518
|
+
};
|
|
1519
|
+
const disabledDayOfWeek = schedule == null ? void 0 : schedule.filter((d) => !d.enabled).map((d) => DAY_MAP[d.day]).filter((n) => n !== void 0);
|
|
1520
|
+
const [clientId, setClientId] = import_react3.default.useState(void 0);
|
|
1521
|
+
const [meetingType, setMeetingType] = import_react3.default.useState("");
|
|
1522
|
+
const [meetingFormat, setMeetingFormat] = import_react3.default.useState("call");
|
|
1523
|
+
const [offlineLocation, setOfflineLocation] = import_react3.default.useState(
|
|
1524
|
+
advisorOfficeAddress ? "office" : "custom"
|
|
1525
|
+
);
|
|
1526
|
+
const [customAddress, setCustomAddress] = import_react3.default.useState("");
|
|
1527
|
+
const [date, setDate] = import_react3.default.useState(/* @__PURE__ */ new Date());
|
|
1528
|
+
const [selectedSlot, setSelectedSlot] = import_react3.default.useState(void 0);
|
|
1529
|
+
const [notes, setNotes] = import_react3.default.useState("");
|
|
1530
|
+
const [selectedPhone, setSelectedPhone] = import_react3.default.useState(
|
|
1531
|
+
void 0
|
|
1532
|
+
);
|
|
1533
|
+
const selectedClient = clients.find((c) => c.id === clientId);
|
|
1534
|
+
import_react3.default.useEffect(() => {
|
|
1535
|
+
if (open && initialClientId) {
|
|
1536
|
+
setClientId(initialClientId);
|
|
1537
|
+
}
|
|
1538
|
+
}, [open, initialClientId]);
|
|
1539
|
+
import_react3.default.useEffect(() => {
|
|
1540
|
+
setSelectedPhone(void 0);
|
|
1541
|
+
}, [clientId]);
|
|
1542
|
+
import_react3.default.useEffect(() => {
|
|
1543
|
+
if (meetingFormat !== "call") {
|
|
1544
|
+
setSelectedPhone(void 0);
|
|
1545
|
+
}
|
|
1546
|
+
}, [meetingFormat]);
|
|
1547
|
+
const clientReady = isClientMode || !!clientId;
|
|
1548
|
+
const meetingTypeReady = meetingTypes.length === 0 || !!meetingType;
|
|
1549
|
+
const offlineReady = meetingFormat !== "offline" || offlineLocation !== "custom" || !!customAddress.trim();
|
|
1550
|
+
const canSubmit = clientReady && meetingTypeReady && !!date && !!selectedSlot && offlineReady;
|
|
1551
|
+
const handleOpenChange = (next) => {
|
|
1552
|
+
if (!next) {
|
|
1553
|
+
setClientId(void 0);
|
|
1554
|
+
setMeetingType("");
|
|
1555
|
+
setMeetingFormat("call");
|
|
1556
|
+
setOfflineLocation(advisorOfficeAddress ? "office" : "custom");
|
|
1557
|
+
setCustomAddress("");
|
|
1558
|
+
setDate(/* @__PURE__ */ new Date());
|
|
1559
|
+
setSelectedSlot(void 0);
|
|
1560
|
+
setNotes("");
|
|
1561
|
+
setSelectedPhone(void 0);
|
|
1562
|
+
}
|
|
1563
|
+
onOpenChange(next);
|
|
1564
|
+
};
|
|
1565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(DialogContent, { size: "2xl", align: "top", children: [
|
|
1566
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(DialogHeader, { children: [
|
|
1567
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DialogTitle, { children: isClientMode ? "Book an Appointment" : "New appointment" }),
|
|
1568
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DialogDescription, { children: isClientMode ? "Request a meeting with your advisor. They will confirm once the appointment is reviewed." : "Book a meeting with a client. They will receive a confirmation email once the appointment is created." }),
|
|
1569
|
+
isClientMode && advisorInfo && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "mt-3 flex items-center gap-3 border border-border bg-muted/30 px-3 py-2", children: [
|
|
1570
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Avatar, { className: "h-8 w-8 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AvatarFallback, { className: "text-xs", children: advisorInfo.initials }) }),
|
|
1571
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-0.5", children: [
|
|
1572
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-sm font-medium", children: advisorInfo.name }),
|
|
1573
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-xs text-muted-foreground", children: advisorInfo.role })
|
|
1574
|
+
] })
|
|
1575
|
+
] })
|
|
1576
|
+
] }),
|
|
1577
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Separator, {}),
|
|
1578
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-4", children: [
|
|
1579
|
+
!isClientMode && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1580
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Label, { children: "Client" }),
|
|
1581
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1582
|
+
ClientSearch,
|
|
1583
|
+
{
|
|
1584
|
+
clients,
|
|
1585
|
+
value: clientId,
|
|
1586
|
+
onValueChange: setClientId
|
|
1587
|
+
}
|
|
1588
|
+
)
|
|
1589
|
+
] }),
|
|
1590
|
+
meetingTypes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1591
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Label, { htmlFor: "book-apt-type", children: isClientMode ? "Appointment type" : "Meeting type" }),
|
|
1592
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Select, { onValueChange: (v) => setMeetingType(v), children: [
|
|
1593
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectTrigger, { id: "book-apt-type", className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectValue, { placeholder: "Select meeting type\u2026" }) }),
|
|
1594
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectContent, { children: meetingTypes.map((t) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectItem, { value: t, children: t }, t)) })
|
|
1595
|
+
] })
|
|
1596
|
+
] }),
|
|
1597
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1598
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Label, { children: "Meeting format" }),
|
|
1599
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1600
|
+
MeetingFormatSection,
|
|
1601
|
+
{
|
|
1602
|
+
format: meetingFormat,
|
|
1603
|
+
onFormatChange: setMeetingFormat,
|
|
1604
|
+
offlineLocation,
|
|
1605
|
+
onOfflineLocationChange: setOfflineLocation,
|
|
1606
|
+
customAddress,
|
|
1607
|
+
onCustomAddressChange: setCustomAddress,
|
|
1608
|
+
advisorOfficeAddress,
|
|
1609
|
+
clientHomeAddress,
|
|
1610
|
+
isClientMode
|
|
1611
|
+
}
|
|
1612
|
+
)
|
|
1613
|
+
] }),
|
|
1614
|
+
!isClientMode && meetingFormat === "call" && (selectedClient == null ? void 0 : selectedClient.phones) && selectedClient.phones.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1615
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Label, { children: selectedClient.accountType === "Joint" ? "Select a contact number" : "Phone number" }),
|
|
1616
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1617
|
+
RadioGroup,
|
|
1618
|
+
{
|
|
1619
|
+
value: selectedPhone != null ? selectedPhone : "",
|
|
1620
|
+
onValueChange: (v) => setSelectedPhone(v),
|
|
1621
|
+
className: "gap-1 border border-border p-3",
|
|
1622
|
+
children: selectedClient.phones.map((phone) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1623
|
+
"div",
|
|
1624
|
+
{
|
|
1625
|
+
className: "flex items-center gap-3 p-2 hover:bg-muted/50",
|
|
1626
|
+
children: [
|
|
1627
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RadioGroupItem, { value: phone, id: `phone-${phone}` }),
|
|
1628
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1629
|
+
Label,
|
|
1630
|
+
{
|
|
1631
|
+
htmlFor: `phone-${phone}`,
|
|
1632
|
+
className: "flex cursor-pointer items-center gap-2 font-normal",
|
|
1633
|
+
children: [
|
|
1634
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react7.Phone, { className: "h-4 w-4 text-muted-foreground" }),
|
|
1635
|
+
phone
|
|
1636
|
+
]
|
|
1637
|
+
}
|
|
1638
|
+
)
|
|
1639
|
+
]
|
|
1640
|
+
},
|
|
1641
|
+
phone
|
|
1642
|
+
))
|
|
1643
|
+
}
|
|
1644
|
+
)
|
|
1645
|
+
] }),
|
|
1646
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "grid grid-cols-[auto_1fr] items-start gap-5", children: [
|
|
1647
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1648
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Label, { children: "Date" }),
|
|
1649
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1650
|
+
Calendar,
|
|
1651
|
+
{
|
|
1652
|
+
mode: "single",
|
|
1653
|
+
selected: date,
|
|
1654
|
+
onSelect: (d) => {
|
|
1655
|
+
setDate(d);
|
|
1656
|
+
setSelectedSlot(void 0);
|
|
1657
|
+
},
|
|
1658
|
+
captionLayout: "label",
|
|
1659
|
+
fromDate: /* @__PURE__ */ new Date(),
|
|
1660
|
+
disabled: disabledDayOfWeek && disabledDayOfWeek.length > 0 ? [{ before: /* @__PURE__ */ new Date() }, { dayOfWeek: disabledDayOfWeek }] : { before: /* @__PURE__ */ new Date() },
|
|
1661
|
+
className: "border border-border"
|
|
1662
|
+
}
|
|
1663
|
+
)
|
|
1664
|
+
] }),
|
|
1665
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1666
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Label, { children: "Time slot" }),
|
|
1667
|
+
date ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
1668
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-xs text-muted-foreground", children: date.toLocaleDateString("en-AU", {
|
|
1669
|
+
weekday: "long",
|
|
1670
|
+
day: "numeric",
|
|
1671
|
+
month: "long"
|
|
1672
|
+
}) }),
|
|
1673
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1674
|
+
AppointmentSlotSection,
|
|
1675
|
+
{
|
|
1676
|
+
label: "Morning",
|
|
1677
|
+
slots: amSlots,
|
|
1678
|
+
selectedSlotId: selectedSlot == null ? void 0 : selectedSlot.id,
|
|
1679
|
+
onSelect: setSelectedSlot
|
|
1680
|
+
}
|
|
1681
|
+
),
|
|
1682
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1683
|
+
AppointmentSlotSection,
|
|
1684
|
+
{
|
|
1685
|
+
label: "Afternoon",
|
|
1686
|
+
slots: pmSlots,
|
|
1687
|
+
selectedSlotId: selectedSlot == null ? void 0 : selectedSlot.id,
|
|
1688
|
+
onSelect: setSelectedSlot
|
|
1689
|
+
}
|
|
1690
|
+
)
|
|
1691
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-sm text-muted-foreground", children: "Select a date to see available slots." })
|
|
1692
|
+
] })
|
|
1693
|
+
] }),
|
|
1694
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1695
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Label, { htmlFor: "book-apt-notes", children: [
|
|
1696
|
+
"Notes",
|
|
1697
|
+
" ",
|
|
1698
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "font-normal text-muted-foreground", children: "(optional)" })
|
|
1699
|
+
] }),
|
|
1700
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1701
|
+
Textarea,
|
|
1702
|
+
{
|
|
1703
|
+
id: "book-apt-notes",
|
|
1704
|
+
placeholder: isClientMode ? "Let your advisor know what you'd like to discuss\u2026" : "e.g. Client wants to discuss refinancing their investment property\u2026",
|
|
1705
|
+
value: notes,
|
|
1706
|
+
onChange: (e) => setNotes(e.target.value),
|
|
1707
|
+
className: "w-full resize-none",
|
|
1708
|
+
rows: 2
|
|
1709
|
+
}
|
|
1710
|
+
)
|
|
1711
|
+
] })
|
|
1712
|
+
] }),
|
|
1713
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(DialogFooter, { children: [
|
|
1714
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DialogClose, { render: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { variant: "outline" }), children: "Cancel" }),
|
|
1715
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1716
|
+
Button,
|
|
1717
|
+
{
|
|
1718
|
+
disabled: !canSubmit,
|
|
1719
|
+
onClick: () => {
|
|
1720
|
+
if (canSubmit && date && selectedSlot) {
|
|
1721
|
+
onBook == null ? void 0 : onBook({
|
|
1722
|
+
clientId: clientId != null ? clientId : "",
|
|
1723
|
+
meetingType,
|
|
1724
|
+
date,
|
|
1725
|
+
slot: selectedSlot,
|
|
1726
|
+
notes,
|
|
1727
|
+
meetingFormat,
|
|
1728
|
+
offlineLocation: meetingFormat === "offline" ? offlineLocation : void 0,
|
|
1729
|
+
customAddress: meetingFormat === "offline" && offlineLocation === "custom" ? customAddress : void 0,
|
|
1730
|
+
callPhone: meetingFormat === "call" ? selectedPhone : void 0
|
|
1731
|
+
});
|
|
1732
|
+
handleOpenChange(false);
|
|
1733
|
+
}
|
|
1734
|
+
},
|
|
1735
|
+
children: isClientMode ? "Book Appointment" : "Create appointment"
|
|
1736
|
+
}
|
|
1737
|
+
)
|
|
1738
|
+
] })
|
|
1739
|
+
] }) });
|
|
1740
|
+
}
|
|
1741
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1742
|
+
0 && (module.exports = {
|
|
1743
|
+
AppointmentBookDialog
|
|
1744
|
+
});
|