@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,345 @@
|
|
|
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-mini-card.tsx
|
|
60
|
+
var appointment_mini_card_exports = {};
|
|
61
|
+
__export(appointment_mini_card_exports, {
|
|
62
|
+
AppointmentMiniCard: () => AppointmentMiniCard
|
|
63
|
+
});
|
|
64
|
+
module.exports = __toCommonJS(appointment_mini_card_exports);
|
|
65
|
+
|
|
66
|
+
// src/components/ui/avatar.tsx
|
|
67
|
+
var import_avatar = require("@base-ui/react/avatar");
|
|
68
|
+
|
|
69
|
+
// src/lib/utils.ts
|
|
70
|
+
var import_clsx = require("clsx");
|
|
71
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
72
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
73
|
+
extend: {
|
|
74
|
+
classGroups: {
|
|
75
|
+
"font-size": [
|
|
76
|
+
{
|
|
77
|
+
text: [
|
|
78
|
+
"display-large",
|
|
79
|
+
"display-medium",
|
|
80
|
+
"display-small",
|
|
81
|
+
"h1",
|
|
82
|
+
"h2",
|
|
83
|
+
"h3",
|
|
84
|
+
"h4",
|
|
85
|
+
"h5",
|
|
86
|
+
"h6",
|
|
87
|
+
"body-large",
|
|
88
|
+
"body-medium",
|
|
89
|
+
"body-small",
|
|
90
|
+
"label-large",
|
|
91
|
+
"label-medium",
|
|
92
|
+
"label-small",
|
|
93
|
+
"button",
|
|
94
|
+
"button-xs",
|
|
95
|
+
"caption",
|
|
96
|
+
"overline",
|
|
97
|
+
"code"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
function cn(...inputs) {
|
|
105
|
+
return twMerge((0, import_clsx.clsx)(inputs));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// src/components/ui/avatar.tsx
|
|
109
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
110
|
+
function Avatar(_a) {
|
|
111
|
+
var _b = _a, {
|
|
112
|
+
className,
|
|
113
|
+
size = "default"
|
|
114
|
+
} = _b, props = __objRest(_b, [
|
|
115
|
+
"className",
|
|
116
|
+
"size"
|
|
117
|
+
]);
|
|
118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
119
|
+
import_avatar.Avatar.Root,
|
|
120
|
+
__spreadValues({
|
|
121
|
+
className: cn(
|
|
122
|
+
"group/avatar relative flex size-8 shrink-0 rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",
|
|
123
|
+
className
|
|
124
|
+
),
|
|
125
|
+
"data-size": size,
|
|
126
|
+
"data-slot": "avatar"
|
|
127
|
+
}, props)
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
function AvatarFallback(_a) {
|
|
131
|
+
var _b = _a, {
|
|
132
|
+
className
|
|
133
|
+
} = _b, props = __objRest(_b, [
|
|
134
|
+
"className"
|
|
135
|
+
]);
|
|
136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
137
|
+
import_avatar.Avatar.Fallback,
|
|
138
|
+
__spreadValues({
|
|
139
|
+
className: cn(
|
|
140
|
+
"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",
|
|
141
|
+
className
|
|
142
|
+
),
|
|
143
|
+
"data-slot": "avatar-fallback"
|
|
144
|
+
}, props)
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// src/components/ui/button.tsx
|
|
149
|
+
var import_react = require("react");
|
|
150
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
151
|
+
var import_lucide_react = require("lucide-react");
|
|
152
|
+
|
|
153
|
+
// src/lib/slot.tsx
|
|
154
|
+
var React = __toESM(require("react"));
|
|
155
|
+
function mergeRefs(...refs) {
|
|
156
|
+
return (value) => {
|
|
157
|
+
for (const ref of refs) {
|
|
158
|
+
if (typeof ref === "function") ref(value);
|
|
159
|
+
else if (ref !== null)
|
|
160
|
+
ref.current = value;
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
var Slot = React.forwardRef(
|
|
165
|
+
(_a, forwardedRef) => {
|
|
166
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
167
|
+
const child = React.Children.only(children);
|
|
168
|
+
if (!React.isValidElement(child)) return null;
|
|
169
|
+
const childProps = child.props;
|
|
170
|
+
const merged = __spreadValues({}, props);
|
|
171
|
+
for (const key of Object.keys(childProps)) {
|
|
172
|
+
if (key === "className") {
|
|
173
|
+
merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
|
|
174
|
+
} else if (key === "style") {
|
|
175
|
+
merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
|
|
176
|
+
} else if (key.startsWith("on") && typeof childProps[key] === "function") {
|
|
177
|
+
const parentHandler = props[key];
|
|
178
|
+
if (typeof parentHandler === "function") {
|
|
179
|
+
merged[key] = (...args) => {
|
|
180
|
+
childProps[key](...args);
|
|
181
|
+
parentHandler(...args);
|
|
182
|
+
};
|
|
183
|
+
} else {
|
|
184
|
+
merged[key] = childProps[key];
|
|
185
|
+
}
|
|
186
|
+
} else {
|
|
187
|
+
merged[key] = childProps[key];
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
const childRef = child.ref;
|
|
191
|
+
merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
|
|
192
|
+
return React.cloneElement(
|
|
193
|
+
child,
|
|
194
|
+
merged
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
Slot.displayName = "Slot";
|
|
199
|
+
|
|
200
|
+
// src/components/ui/button.tsx
|
|
201
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
202
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
203
|
+
"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",
|
|
204
|
+
{
|
|
205
|
+
variants: {
|
|
206
|
+
variant: {
|
|
207
|
+
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
208
|
+
secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
|
|
209
|
+
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",
|
|
210
|
+
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",
|
|
211
|
+
"outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
|
|
212
|
+
"outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:ring-brand-secondary/30",
|
|
213
|
+
ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs focus-visible:ring-border/50 dark:hover:bg-accent/50",
|
|
214
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
215
|
+
},
|
|
216
|
+
size: {
|
|
217
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
218
|
+
xs: "h-6 gap-1 px-2 text-button-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
219
|
+
sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
220
|
+
lg: "h-10 px-6 has-[>svg]:px-4",
|
|
221
|
+
icon: "size-9",
|
|
222
|
+
"icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
223
|
+
"icon-sm": "size-8",
|
|
224
|
+
"icon-lg": "size-10"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
defaultVariants: {
|
|
228
|
+
variant: "default",
|
|
229
|
+
size: "default"
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
|
|
234
|
+
var _b = _a, {
|
|
235
|
+
className,
|
|
236
|
+
variant,
|
|
237
|
+
size,
|
|
238
|
+
asChild = false,
|
|
239
|
+
loading = false,
|
|
240
|
+
disabled,
|
|
241
|
+
type = "button",
|
|
242
|
+
children
|
|
243
|
+
} = _b, props = __objRest(_b, [
|
|
244
|
+
"className",
|
|
245
|
+
"variant",
|
|
246
|
+
"size",
|
|
247
|
+
"asChild",
|
|
248
|
+
"loading",
|
|
249
|
+
"disabled",
|
|
250
|
+
"type",
|
|
251
|
+
"children"
|
|
252
|
+
]);
|
|
253
|
+
const Comp = asChild ? Slot : "button";
|
|
254
|
+
const isIconOnly = size === "icon" || size === "icon-xs" || size === "icon-sm" || size === "icon-lg";
|
|
255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
256
|
+
Comp,
|
|
257
|
+
__spreadProps(__spreadValues({
|
|
258
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
259
|
+
"data-size": size,
|
|
260
|
+
"data-slot": "button",
|
|
261
|
+
"data-variant": variant,
|
|
262
|
+
disabled: loading || disabled,
|
|
263
|
+
ref,
|
|
264
|
+
type
|
|
265
|
+
}, props), {
|
|
266
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
267
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
|
|
268
|
+
!isIconOnly && children
|
|
269
|
+
] }) : children
|
|
270
|
+
})
|
|
271
|
+
);
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
// src/components/ui/appointment-mini-card.tsx
|
|
275
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
276
|
+
var STATUS_BG = {
|
|
277
|
+
pending: "border-warning bg-warning/10",
|
|
278
|
+
confirmed: "border-success bg-success/10",
|
|
279
|
+
cancelled: "border-destructive bg-destructive/10 opacity-60",
|
|
280
|
+
rescheduled: "border-info bg-info/10"
|
|
281
|
+
};
|
|
282
|
+
function AppointmentMiniCard({
|
|
283
|
+
appointment,
|
|
284
|
+
onAccept,
|
|
285
|
+
onDecline,
|
|
286
|
+
onReschedule
|
|
287
|
+
}) {
|
|
288
|
+
const isConfirmed = appointment.status === "confirmed";
|
|
289
|
+
const isRescheduled = appointment.status === "rescheduled";
|
|
290
|
+
const isCancelled = appointment.status === "cancelled";
|
|
291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
292
|
+
"div",
|
|
293
|
+
{
|
|
294
|
+
className: `flex items-center gap-4 border px-5 py-4 ${STATUS_BG[appointment.status]}`,
|
|
295
|
+
children: [
|
|
296
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Avatar, { className: "h-10 w-10 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AvatarFallback, { className: "text-sm", children: appointment.clientAvatarInitials }) }),
|
|
297
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
298
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "truncate text-base font-semibold", children: appointment.clientName }),
|
|
299
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("p", { className: "text-sm text-muted-foreground", children: [
|
|
300
|
+
appointment.date,
|
|
301
|
+
" \xB7 ",
|
|
302
|
+
appointment.timeStart,
|
|
303
|
+
" \u2013 ",
|
|
304
|
+
appointment.timeEnd
|
|
305
|
+
] })
|
|
306
|
+
] }),
|
|
307
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
308
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
309
|
+
Button,
|
|
310
|
+
{
|
|
311
|
+
size: "sm",
|
|
312
|
+
disabled: isConfirmed || isCancelled,
|
|
313
|
+
onClick: onAccept,
|
|
314
|
+
children: "Accept"
|
|
315
|
+
}
|
|
316
|
+
),
|
|
317
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
318
|
+
Button,
|
|
319
|
+
{
|
|
320
|
+
size: "sm",
|
|
321
|
+
variant: "outline",
|
|
322
|
+
disabled: isCancelled,
|
|
323
|
+
onClick: onDecline,
|
|
324
|
+
children: "Decline"
|
|
325
|
+
}
|
|
326
|
+
),
|
|
327
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
328
|
+
Button,
|
|
329
|
+
{
|
|
330
|
+
size: "sm",
|
|
331
|
+
variant: "ghost",
|
|
332
|
+
disabled: isCancelled || isRescheduled,
|
|
333
|
+
onClick: onReschedule,
|
|
334
|
+
children: "Reschedule"
|
|
335
|
+
}
|
|
336
|
+
)
|
|
337
|
+
] })
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
343
|
+
0 && (module.exports = {
|
|
344
|
+
AppointmentMiniCard
|
|
345
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AppointmentMiniCard
|
|
3
|
+
} from "../../chunk-QMY3AZJH.mjs";
|
|
4
|
+
import "../../chunk-24FUO7TD.mjs";
|
|
5
|
+
import "../../chunk-XREGSKX3.mjs";
|
|
6
|
+
import "../../chunk-DBHJ5KC3.mjs";
|
|
7
|
+
import "../../chunk-VLQZANBF.mjs";
|
|
8
|
+
import "../../chunk-FWCSY2DS.mjs";
|
|
9
|
+
export {
|
|
10
|
+
AppointmentMiniCard
|
|
11
|
+
};
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __objRest = (source, exclude) => {
|
|
23
|
+
var target = {};
|
|
24
|
+
for (var prop in source)
|
|
25
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
26
|
+
target[prop] = source[prop];
|
|
27
|
+
if (source != null && __getOwnPropSymbols)
|
|
28
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
29
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
30
|
+
target[prop] = source[prop];
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
};
|
|
34
|
+
var __export = (target, all) => {
|
|
35
|
+
for (var name in all)
|
|
36
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
37
|
+
};
|
|
38
|
+
var __copyProps = (to, from, except, desc) => {
|
|
39
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
40
|
+
for (let key of __getOwnPropNames(from))
|
|
41
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
42
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
43
|
+
}
|
|
44
|
+
return to;
|
|
45
|
+
};
|
|
46
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
47
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
48
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
49
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
50
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
51
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
52
|
+
mod
|
|
53
|
+
));
|
|
54
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
55
|
+
|
|
56
|
+
// src/components/ui/appointment-time-slot-picker.tsx
|
|
57
|
+
var appointment_time_slot_picker_exports = {};
|
|
58
|
+
__export(appointment_time_slot_picker_exports, {
|
|
59
|
+
AppointmentSlotSection: () => AppointmentSlotSection,
|
|
60
|
+
AppointmentTimeSlotPicker: () => AppointmentTimeSlotPicker
|
|
61
|
+
});
|
|
62
|
+
module.exports = __toCommonJS(appointment_time_slot_picker_exports);
|
|
63
|
+
|
|
64
|
+
// src/components/ui/badge.tsx
|
|
65
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
66
|
+
|
|
67
|
+
// src/lib/utils.ts
|
|
68
|
+
var import_clsx = require("clsx");
|
|
69
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
70
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
71
|
+
extend: {
|
|
72
|
+
classGroups: {
|
|
73
|
+
"font-size": [
|
|
74
|
+
{
|
|
75
|
+
text: [
|
|
76
|
+
"display-large",
|
|
77
|
+
"display-medium",
|
|
78
|
+
"display-small",
|
|
79
|
+
"h1",
|
|
80
|
+
"h2",
|
|
81
|
+
"h3",
|
|
82
|
+
"h4",
|
|
83
|
+
"h5",
|
|
84
|
+
"h6",
|
|
85
|
+
"body-large",
|
|
86
|
+
"body-medium",
|
|
87
|
+
"body-small",
|
|
88
|
+
"label-large",
|
|
89
|
+
"label-medium",
|
|
90
|
+
"label-small",
|
|
91
|
+
"button",
|
|
92
|
+
"button-xs",
|
|
93
|
+
"caption",
|
|
94
|
+
"overline",
|
|
95
|
+
"code"
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
function cn(...inputs) {
|
|
103
|
+
return twMerge((0, import_clsx.clsx)(inputs));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// src/lib/slot.tsx
|
|
107
|
+
var React = __toESM(require("react"));
|
|
108
|
+
function mergeRefs(...refs) {
|
|
109
|
+
return (value) => {
|
|
110
|
+
for (const ref of refs) {
|
|
111
|
+
if (typeof ref === "function") ref(value);
|
|
112
|
+
else if (ref !== null)
|
|
113
|
+
ref.current = value;
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
var Slot = React.forwardRef(
|
|
118
|
+
(_a, forwardedRef) => {
|
|
119
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
120
|
+
const child = React.Children.only(children);
|
|
121
|
+
if (!React.isValidElement(child)) return null;
|
|
122
|
+
const childProps = child.props;
|
|
123
|
+
const merged = __spreadValues({}, props);
|
|
124
|
+
for (const key of Object.keys(childProps)) {
|
|
125
|
+
if (key === "className") {
|
|
126
|
+
merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
|
|
127
|
+
} else if (key === "style") {
|
|
128
|
+
merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
|
|
129
|
+
} else if (key.startsWith("on") && typeof childProps[key] === "function") {
|
|
130
|
+
const parentHandler = props[key];
|
|
131
|
+
if (typeof parentHandler === "function") {
|
|
132
|
+
merged[key] = (...args) => {
|
|
133
|
+
childProps[key](...args);
|
|
134
|
+
parentHandler(...args);
|
|
135
|
+
};
|
|
136
|
+
} else {
|
|
137
|
+
merged[key] = childProps[key];
|
|
138
|
+
}
|
|
139
|
+
} else {
|
|
140
|
+
merged[key] = childProps[key];
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
const childRef = child.ref;
|
|
144
|
+
merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
|
|
145
|
+
return React.cloneElement(
|
|
146
|
+
child,
|
|
147
|
+
merged
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
Slot.displayName = "Slot";
|
|
152
|
+
|
|
153
|
+
// src/components/ui/badge.tsx
|
|
154
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
155
|
+
var badgeVariants = (0, import_class_variance_authority.cva)(
|
|
156
|
+
"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",
|
|
157
|
+
{
|
|
158
|
+
variants: {
|
|
159
|
+
variant: {
|
|
160
|
+
default: "border-primary/40 bg-primary/10 text-foreground [a&]:hover:bg-primary/15",
|
|
161
|
+
secondary: "border-border bg-muted text-muted-foreground [a&]:hover:bg-muted/80",
|
|
162
|
+
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",
|
|
163
|
+
success: "border-success/40 bg-success/10 text-success-text [a&]:hover:bg-success/15",
|
|
164
|
+
warning: "border-warning/40 bg-warning/10 text-warning-text [a&]:hover:bg-warning/15",
|
|
165
|
+
info: "border-info/40 bg-info/10 text-info-text [a&]:hover:bg-info/15",
|
|
166
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
167
|
+
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
168
|
+
link: "text-primary underline-offset-4 [a&]:hover:underline"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
defaultVariants: {
|
|
172
|
+
variant: "default"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
function Badge(_a) {
|
|
177
|
+
var _b = _a, {
|
|
178
|
+
className,
|
|
179
|
+
variant = "default",
|
|
180
|
+
asChild = false
|
|
181
|
+
} = _b, props = __objRest(_b, [
|
|
182
|
+
"className",
|
|
183
|
+
"variant",
|
|
184
|
+
"asChild"
|
|
185
|
+
]);
|
|
186
|
+
const Comp = asChild ? Slot : "span";
|
|
187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
188
|
+
Comp,
|
|
189
|
+
__spreadValues({
|
|
190
|
+
className: cn(badgeVariants({ variant }), className),
|
|
191
|
+
"data-slot": "badge",
|
|
192
|
+
"data-variant": variant
|
|
193
|
+
}, props)
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// src/components/ui/toggle.tsx
|
|
198
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
199
|
+
var import_toggle = require("@base-ui/react/toggle");
|
|
200
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
201
|
+
var toggleVariants = (0, import_class_variance_authority2.cva)(
|
|
202
|
+
"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",
|
|
203
|
+
{
|
|
204
|
+
variants: {
|
|
205
|
+
variant: {
|
|
206
|
+
default: "bg-transparent hover:bg-muted hover:text-muted-foreground",
|
|
207
|
+
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
208
|
+
},
|
|
209
|
+
size: {
|
|
210
|
+
default: "h-9 min-w-9 px-2 text-label-large",
|
|
211
|
+
sm: "h-8 min-w-8 px-1.5 text-label-medium",
|
|
212
|
+
lg: "h-10 min-w-10 px-2.5 text-h5"
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
defaultVariants: {
|
|
216
|
+
variant: "default",
|
|
217
|
+
size: "default"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
function Toggle(_a) {
|
|
222
|
+
var _b = _a, {
|
|
223
|
+
className,
|
|
224
|
+
variant,
|
|
225
|
+
size
|
|
226
|
+
} = _b, props = __objRest(_b, [
|
|
227
|
+
"className",
|
|
228
|
+
"variant",
|
|
229
|
+
"size"
|
|
230
|
+
]);
|
|
231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
232
|
+
import_toggle.Toggle,
|
|
233
|
+
__spreadValues({
|
|
234
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
235
|
+
"data-slot": "toggle"
|
|
236
|
+
}, props)
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// src/components/ui/appointment-time-slot-picker.tsx
|
|
241
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
242
|
+
function AppointmentSlotSection({
|
|
243
|
+
label,
|
|
244
|
+
slots,
|
|
245
|
+
selectedSlotId,
|
|
246
|
+
onSelect
|
|
247
|
+
}) {
|
|
248
|
+
const hasAvailable = slots.some((s) => s.available);
|
|
249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
250
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
251
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: label }),
|
|
252
|
+
!hasAvailable && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Badge, { variant: "secondary", className: "text-[10px]", children: "No availability" })
|
|
253
|
+
] }),
|
|
254
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex flex-wrap gap-2", children: slots.map((slot) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
255
|
+
Toggle,
|
|
256
|
+
{
|
|
257
|
+
variant: "outline",
|
|
258
|
+
pressed: selectedSlotId === slot.id,
|
|
259
|
+
onPressedChange: (pressed) => {
|
|
260
|
+
if (pressed && slot.available) onSelect == null ? void 0 : onSelect(slot);
|
|
261
|
+
},
|
|
262
|
+
disabled: !slot.available,
|
|
263
|
+
className: "min-w-[88px]",
|
|
264
|
+
children: slot.label
|
|
265
|
+
},
|
|
266
|
+
slot.id
|
|
267
|
+
)) })
|
|
268
|
+
] });
|
|
269
|
+
}
|
|
270
|
+
function AppointmentTimeSlotPicker({
|
|
271
|
+
amSlots,
|
|
272
|
+
pmSlots,
|
|
273
|
+
selectedSlotId,
|
|
274
|
+
onSelect
|
|
275
|
+
}) {
|
|
276
|
+
const totalAvailable = [...amSlots, ...pmSlots].filter(
|
|
277
|
+
(s) => s.available
|
|
278
|
+
).length;
|
|
279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex flex-col gap-5", children: [
|
|
280
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
281
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-sm font-semibold", children: "Select a time slot" }),
|
|
282
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
|
|
283
|
+
totalAvailable,
|
|
284
|
+
" available"
|
|
285
|
+
] })
|
|
286
|
+
] }),
|
|
287
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
288
|
+
AppointmentSlotSection,
|
|
289
|
+
{
|
|
290
|
+
label: "Morning",
|
|
291
|
+
slots: amSlots,
|
|
292
|
+
selectedSlotId,
|
|
293
|
+
onSelect
|
|
294
|
+
}
|
|
295
|
+
),
|
|
296
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
297
|
+
AppointmentSlotSection,
|
|
298
|
+
{
|
|
299
|
+
label: "Afternoon",
|
|
300
|
+
slots: pmSlots,
|
|
301
|
+
selectedSlotId,
|
|
302
|
+
onSelect
|
|
303
|
+
}
|
|
304
|
+
)
|
|
305
|
+
] });
|
|
306
|
+
}
|
|
307
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
308
|
+
0 && (module.exports = {
|
|
309
|
+
AppointmentSlotSection,
|
|
310
|
+
AppointmentTimeSlotPicker
|
|
311
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AppointmentSlotSection,
|
|
3
|
+
AppointmentTimeSlotPicker
|
|
4
|
+
} from "../../chunk-3OYFOX3X.mjs";
|
|
5
|
+
import "../../chunk-BDYZCBRT.mjs";
|
|
6
|
+
import "../../chunk-BKNFWEH2.mjs";
|
|
7
|
+
import "../../chunk-DBHJ5KC3.mjs";
|
|
8
|
+
import "../../chunk-VLQZANBF.mjs";
|
|
9
|
+
import "../../chunk-FWCSY2DS.mjs";
|
|
10
|
+
export {
|
|
11
|
+
AppointmentSlotSection,
|
|
12
|
+
AppointmentTimeSlotPicker
|
|
13
|
+
};
|