@wealthx/shadcn 1.2.1 → 1.3.0

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.
Files changed (247) hide show
  1. package/.turbo/turbo-build.log +203 -150
  2. package/CHANGELOG.md +29 -0
  3. package/dist/{chunk-4Y6R4WEC.mjs → chunk-2A5RRQGG.mjs} +9 -22
  4. package/dist/{chunk-TS2ZX2VS.mjs → chunk-2UM72RJ7.mjs} +11 -15
  5. package/dist/{chunk-A56YQQHG.mjs → chunk-3NCUZIFP.mjs} +2 -2
  6. package/dist/chunk-3OYFOX3X.mjs +79 -0
  7. package/dist/{chunk-RP3SQYA3.mjs → chunk-3TTACBDP.mjs} +9 -4
  8. package/dist/chunk-4GAWMKMI.mjs +710 -0
  9. package/dist/{chunk-SYOD63OZ.mjs → chunk-5FQIKDKP.mjs} +6 -6
  10. package/dist/{chunk-K3JYD4IU.mjs → chunk-5IS7G74I.mjs} +11 -4
  11. package/dist/chunk-6AW4KJHE.mjs +235 -0
  12. package/dist/chunk-6CR5N2JW.mjs +302 -0
  13. package/dist/{chunk-XIRTEFKH.mjs → chunk-6DZEXFNB.mjs} +36 -8
  14. package/dist/chunk-6O6KD7CE.mjs +271 -0
  15. package/dist/chunk-7PV3IWCN.mjs +33 -0
  16. package/dist/{chunk-SPJ5KXW7.mjs → chunk-7S5AESZO.mjs} +5 -5
  17. package/dist/{chunk-RYCLWMZ7.mjs → chunk-ABFDMHOR.mjs} +9 -7
  18. package/dist/{chunk-SWGT756Z.mjs → chunk-AMQZRHEZ.mjs} +10 -4
  19. package/dist/{chunk-WOEHFRGB.mjs → chunk-BDYZCBRT.mjs} +4 -4
  20. package/dist/{chunk-WAZD7NFU.mjs → chunk-BKNFWEH2.mjs} +6 -6
  21. package/dist/{chunk-CLIN5525.mjs → chunk-C7CQJNMR.mjs} +1 -1
  22. package/dist/{chunk-D4ILTPOG.mjs → chunk-CFMQP5QS.mjs} +5 -4
  23. package/dist/{chunk-VPBN3WOO.mjs → chunk-DGHAXJBN.mjs} +9 -7
  24. package/dist/chunk-DOEO3CDL.mjs +27 -0
  25. package/dist/{chunk-KUDCQ4FI.mjs → chunk-DUJTAXMH.mjs} +9 -4
  26. package/dist/{chunk-GGM2UYGG.mjs → chunk-EBXQWIYG.mjs} +10 -4
  27. package/dist/{chunk-PMB3A7V3.mjs → chunk-EI5F6FMT.mjs} +1 -1
  28. package/dist/chunk-EWRB4PAD.mjs +468 -0
  29. package/dist/chunk-FAKPBKLT.mjs +253 -0
  30. package/dist/chunk-FNQXOAYJ.mjs +169 -0
  31. package/dist/{chunk-4CX4SBRO.mjs → chunk-GHC7LLUX.mjs} +14 -5
  32. package/dist/chunk-HBZLGDIN.mjs +507 -0
  33. package/dist/{chunk-SIZMLSRU.mjs → chunk-HISNT2MG.mjs} +8 -6
  34. package/dist/{chunk-PR6V5XKM.mjs → chunk-HVY6KCCF.mjs} +7 -4
  35. package/dist/chunk-I3RZS7V2.mjs +136 -0
  36. package/dist/chunk-IAE3F7DR.mjs +1962 -0
  37. package/dist/{chunk-ZRO5JO3H.mjs → chunk-IHMFS7NZ.mjs} +81 -84
  38. package/dist/{chunk-PCPLO5HT.mjs → chunk-IOJRDS6V.mjs} +96 -14
  39. package/dist/{chunk-LHYCMLVA.mjs → chunk-JKGDCQTZ.mjs} +11 -4
  40. package/dist/{chunk-H45TKD34.mjs → chunk-JMHR3YGZ.mjs} +1 -1
  41. package/dist/{chunk-4MN6UQHG.mjs → chunk-K5A5L6T2.mjs} +17 -39
  42. package/dist/{chunk-CSDO6VBW.mjs → chunk-LBMRIB3G.mjs} +10 -10
  43. package/dist/chunk-LV35NGVG.mjs +272 -0
  44. package/dist/{chunk-FZIXGLMV.mjs → chunk-M3FV7LOK.mjs} +5 -12
  45. package/dist/{chunk-FMAXJ2SI.mjs → chunk-MBON7YRJ.mjs} +1 -1
  46. package/dist/chunk-MIZQHHUO.mjs +441 -0
  47. package/dist/chunk-MN5NYQCL.mjs +29 -0
  48. package/dist/chunk-NL3ZO62D.mjs +31 -0
  49. package/dist/{chunk-Q76O3RIQ.mjs → chunk-NMOI6CQD.mjs} +1 -1
  50. package/dist/{chunk-P6AM5V7O.mjs → chunk-OODBHKG7.mjs} +1 -1
  51. package/dist/chunk-PBL4OQV2.mjs +283 -0
  52. package/dist/{chunk-3WMX6KWS.mjs → chunk-PU4YZQXV.mjs} +11 -12
  53. package/dist/chunk-QMY3AZJH.mjs +80 -0
  54. package/dist/{chunk-BL3DXM2X.mjs → chunk-QZ4RE6NA.mjs} +11 -4
  55. package/dist/{chunk-VACKZOMY.mjs → chunk-R3VSPKNP.mjs} +3 -3
  56. package/dist/{chunk-OPNQAVVH.mjs → chunk-RJI6GKVF.mjs} +8 -6
  57. package/dist/{chunk-WG6JGJXB.mjs → chunk-T4BJLT57.mjs} +1 -1
  58. package/dist/chunk-U4NDAF2P.mjs +207 -0
  59. package/dist/{chunk-DOH3EHX7.mjs → chunk-U5X52X37.mjs} +1 -1
  60. package/dist/chunk-UMTOX62O.mjs +415 -0
  61. package/dist/{chunk-7MMXNK3C.mjs → chunk-VLARHE5V.mjs} +8 -6
  62. package/dist/{chunk-2I5S2AMY.mjs → chunk-XREGSKX3.mjs} +2 -2
  63. package/dist/{chunk-JNQORUPP.mjs → chunk-YJG55G2H.mjs} +14 -11
  64. package/dist/chunk-ZC45IGZO.mjs +388 -0
  65. package/dist/components/ui/add-column-modal.js +42 -14
  66. package/dist/components/ui/add-column-modal.mjs +4 -4
  67. package/dist/components/ui/add-lead-modal.js +42 -11
  68. package/dist/components/ui/add-lead-modal.mjs +3 -3
  69. package/dist/components/ui/advisor-card.js +497 -0
  70. package/dist/components/ui/advisor-card.mjs +13 -0
  71. package/dist/components/ui/ai-assistant-drawer.js +11 -10
  72. package/dist/components/ui/ai-assistant-drawer.mjs +3 -3
  73. package/dist/components/ui/alert-dialog.js +2 -2
  74. package/dist/components/ui/alert-dialog.mjs +2 -2
  75. package/dist/components/ui/appointment-action-dialogs.js +1160 -0
  76. package/dist/components/ui/appointment-action-dialogs.mjs +23 -0
  77. package/dist/components/ui/appointment-availability-settings.js +1590 -0
  78. package/dist/components/ui/appointment-availability-settings.mjs +23 -0
  79. package/dist/components/ui/appointment-book-dialog.js +1744 -0
  80. package/dist/components/ui/appointment-book-dialog.mjs +27 -0
  81. package/dist/components/ui/appointment-calendar-view.js +833 -0
  82. package/dist/components/ui/appointment-calendar-view.mjs +14 -0
  83. package/dist/components/ui/appointment-detail-sheet.js +1517 -0
  84. package/dist/components/ui/appointment-detail-sheet.mjs +24 -0
  85. package/dist/components/ui/appointment-gmail-connect.js +467 -0
  86. package/dist/components/ui/appointment-gmail-connect.mjs +14 -0
  87. package/dist/components/ui/appointment-mini-card.js +345 -0
  88. package/dist/components/ui/appointment-mini-card.mjs +11 -0
  89. package/dist/components/ui/appointment-time-slot-picker.js +311 -0
  90. package/dist/components/ui/appointment-time-slot-picker.mjs +13 -0
  91. package/dist/components/ui/appointment-upcoming-card.js +1268 -0
  92. package/dist/components/ui/appointment-upcoming-card.mjs +21 -0
  93. package/dist/components/ui/backoffice-alert-history-chart.js +11 -5
  94. package/dist/components/ui/backoffice-alert-history-chart.mjs +5 -4
  95. package/dist/components/ui/backoffice-alerts-chart.js +786 -0
  96. package/dist/components/ui/backoffice-alerts-chart.mjs +19 -0
  97. package/dist/components/ui/backoffice-connections-chart.js +817 -0
  98. package/dist/components/ui/backoffice-connections-chart.mjs +19 -0
  99. package/dist/components/ui/backoffice-contact-history-chart.js +11 -5
  100. package/dist/components/ui/backoffice-contact-history-chart.mjs +5 -4
  101. package/dist/components/ui/badge.js +6 -6
  102. package/dist/components/ui/badge.mjs +1 -1
  103. package/dist/components/ui/borrowing-capacity-line-chart.js +30 -21
  104. package/dist/components/ui/borrowing-capacity-line-chart.mjs +5 -4
  105. package/dist/components/ui/button.js +2 -2
  106. package/dist/components/ui/button.mjs +1 -1
  107. package/dist/components/ui/calendar.js +2 -2
  108. package/dist/components/ui/calendar.mjs +2 -2
  109. package/dist/components/ui/card.js +1 -1
  110. package/dist/components/ui/card.mjs +1 -1
  111. package/dist/components/ui/cash-balance-line-chart.js +31 -23
  112. package/dist/components/ui/cash-balance-line-chart.mjs +5 -4
  113. package/dist/components/ui/cashflow-bar-chart.js +12 -5
  114. package/dist/components/ui/cashflow-bar-chart.mjs +5 -4
  115. package/dist/components/ui/chip.js +97 -18
  116. package/dist/components/ui/chip.mjs +3 -2
  117. package/dist/components/ui/color-picker.js +547 -0
  118. package/dist/components/ui/color-picker.mjs +24 -0
  119. package/dist/components/ui/data-table.js +182 -129
  120. package/dist/components/ui/data-table.mjs +3 -2
  121. package/dist/components/ui/date-picker.js +48 -27
  122. package/dist/components/ui/date-picker.mjs +4 -3
  123. package/dist/components/ui/dialog.js +37 -9
  124. package/dist/components/ui/dialog.mjs +2 -2
  125. package/dist/components/ui/expense-bar-chart.js +12 -5
  126. package/dist/components/ui/expense-bar-chart.mjs +5 -4
  127. package/dist/components/ui/field.mjs +2 -2
  128. package/dist/components/ui/financial-cards.js +322 -155
  129. package/dist/components/ui/financial-cards.mjs +5 -3
  130. package/dist/components/ui/financial-drawers.js +2 -2
  131. package/dist/components/ui/financial-drawers.mjs +3 -3
  132. package/dist/components/ui/financial-sections.js +14 -10
  133. package/dist/components/ui/financial-sections.mjs +6 -5
  134. package/dist/components/ui/form-primitives.js +4 -4
  135. package/dist/components/ui/form-primitives.mjs +3 -3
  136. package/dist/components/ui/income-bar-chart.js +12 -5
  137. package/dist/components/ui/income-bar-chart.mjs +5 -4
  138. package/dist/components/ui/input-group.js +2 -2
  139. package/dist/components/ui/input-group.mjs +2 -2
  140. package/dist/components/ui/kanban-column.js +52 -44
  141. package/dist/components/ui/kanban-column.mjs +7 -5
  142. package/dist/components/ui/opportunity-card.js +52 -44
  143. package/dist/components/ui/opportunity-card.mjs +6 -4
  144. package/dist/components/ui/opportunity-edit-modals.js +1371 -1267
  145. package/dist/components/ui/opportunity-edit-modals.mjs +10 -10
  146. package/dist/components/ui/opportunity-summary-tab.js +2748 -2161
  147. package/dist/components/ui/opportunity-summary-tab.mjs +16 -16
  148. package/dist/components/ui/page-header.js +92 -0
  149. package/dist/components/ui/page-header.mjs +8 -0
  150. package/dist/components/ui/page-top-bar.js +88 -0
  151. package/dist/components/ui/page-top-bar.mjs +8 -0
  152. package/dist/components/ui/pagination.js +303 -19
  153. package/dist/components/ui/pagination.mjs +11 -4
  154. package/dist/components/ui/pipeline-board.js +209 -195
  155. package/dist/components/ui/pipeline-board.mjs +10 -8
  156. package/dist/components/ui/pipeline-dialogs.js +118 -69
  157. package/dist/components/ui/pipeline-dialogs.mjs +8 -7
  158. package/dist/components/ui/pipeline-primitives.js +6 -6
  159. package/dist/components/ui/pipeline-primitives.mjs +2 -2
  160. package/dist/components/ui/property-cashflow-doughnut-chart.js +14 -12
  161. package/dist/components/ui/property-cashflow-doughnut-chart.mjs +5 -4
  162. package/dist/components/ui/property-debt-equity-doughnut-chart.js +14 -12
  163. package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +5 -4
  164. package/dist/components/ui/property-mobile-estimate-line-chart.js +16 -14
  165. package/dist/components/ui/property-mobile-estimate-line-chart.mjs +5 -4
  166. package/dist/components/ui/sidebar-nav.js +679 -0
  167. package/dist/components/ui/sidebar-nav.mjs +14 -0
  168. package/dist/components/ui/stage-timeline.js +6 -6
  169. package/dist/components/ui/stage-timeline.mjs +3 -3
  170. package/dist/components/ui/stepper.js +283 -0
  171. package/dist/components/ui/stepper.mjs +18 -0
  172. package/dist/components/ui/toggle-group.js +4 -4
  173. package/dist/components/ui/toggle-group.mjs +2 -2
  174. package/dist/components/ui/toggle.js +4 -4
  175. package/dist/components/ui/toggle.mjs +1 -1
  176. package/dist/components/ui/transactions-expense-categories-doughnut-chart.js +18 -16
  177. package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +5 -4
  178. package/dist/components/ui/transactions-income-expense-bar-chart.js +28 -12
  179. package/dist/components/ui/transactions-income-expense-bar-chart.mjs +5 -4
  180. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.js +18 -16
  181. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +5 -4
  182. package/dist/index.js +12927 -8522
  183. package/dist/index.mjs +288 -190
  184. package/dist/lib/typography.js +10 -10
  185. package/dist/lib/typography.mjs +1 -1
  186. package/dist/styles.css +1 -1
  187. package/package.json +86 -1
  188. package/src/components/index.tsx +146 -0
  189. package/src/components/ui/add-column-modal.tsx +7 -7
  190. package/src/components/ui/add-lead-modal.tsx +6 -3
  191. package/src/components/ui/advisor-card.tsx +227 -0
  192. package/src/components/ui/ai-assistant-drawer.tsx +4 -3
  193. package/src/components/ui/appointment-action-dialogs.tsx +297 -0
  194. package/src/components/ui/appointment-availability-settings.tsx +645 -0
  195. package/src/components/ui/appointment-book-dialog.tsx +618 -0
  196. package/src/components/ui/appointment-calendar-view.tsx +510 -0
  197. package/src/components/ui/appointment-detail-sheet.tsx +415 -0
  198. package/src/components/ui/appointment-gmail-connect.tsx +188 -0
  199. package/src/components/ui/appointment-mini-card.tsx +104 -0
  200. package/src/components/ui/appointment-time-slot-picker.tsx +123 -0
  201. package/src/components/ui/appointment-upcoming-card.tsx +635 -0
  202. package/src/components/ui/backoffice-alert-history-chart.tsx +10 -2
  203. package/src/components/ui/backoffice-alerts-chart.tsx +312 -0
  204. package/src/components/ui/backoffice-connections-chart.tsx +339 -0
  205. package/src/components/ui/backoffice-contact-history-chart.tsx +10 -2
  206. package/src/components/ui/badge.tsx +12 -6
  207. package/src/components/ui/borrowing-capacity-line-chart.tsx +4 -11
  208. package/src/components/ui/button.tsx +2 -2
  209. package/src/components/ui/card.tsx +1 -1
  210. package/src/components/ui/cash-balance-line-chart.tsx +4 -23
  211. package/src/components/ui/cashflow-bar-chart.tsx +9 -2
  212. package/src/components/ui/chart-shared.tsx +4 -11
  213. package/src/components/ui/chip.tsx +23 -19
  214. package/src/components/ui/color-picker.tsx +309 -0
  215. package/src/components/ui/data-table.tsx +117 -83
  216. package/src/components/ui/date-picker.tsx +42 -37
  217. package/src/components/ui/dialog.tsx +72 -6
  218. package/src/components/ui/expense-bar-chart.tsx +11 -2
  219. package/src/components/ui/financial-cards.tsx +99 -10
  220. package/src/components/ui/income-bar-chart.tsx +11 -2
  221. package/src/components/ui/opportunity-card.tsx +10 -39
  222. package/src/components/ui/opportunity-edit-modals.tsx +98 -36
  223. package/src/components/ui/opportunity-summary-tab.tsx +548 -232
  224. package/src/components/ui/page-header.tsx +57 -0
  225. package/src/components/ui/page-top-bar.tsx +48 -0
  226. package/src/components/ui/pagination.tsx +171 -22
  227. package/src/components/ui/pipeline-board.tsx +12 -5
  228. package/src/components/ui/property-cashflow-doughnut-chart.tsx +3 -1
  229. package/src/components/ui/property-debt-equity-doughnut-chart.tsx +3 -1
  230. package/src/components/ui/property-mobile-estimate-line-chart.tsx +3 -1
  231. package/src/components/ui/sidebar-nav.tsx +516 -0
  232. package/src/components/ui/stepper.tsx +347 -0
  233. package/src/components/ui/toggle.tsx +4 -4
  234. package/src/components/ui/transactions-expense-categories-doughnut-chart.tsx +3 -1
  235. package/src/components/ui/transactions-income-expense-bar-chart.tsx +12 -9
  236. package/src/components/ui/transactions-liabilities-breakdown-doughnut-chart.tsx +3 -1
  237. package/src/lib/format-currency.ts +44 -0
  238. package/src/lib/format-date.ts +50 -0
  239. package/src/lib/opportunity-constants.ts +12 -0
  240. package/src/lib/typography.ts +11 -11
  241. package/src/styles/globals.css +36 -34
  242. package/src/styles/styles-css.ts +1 -1
  243. package/tsup.config.ts +17 -0
  244. package/dist/chunk-PG6K5XEC.mjs +0 -475
  245. package/dist/chunk-WA6O6EUR.mjs +0 -1885
  246. package/dist/chunk-WNGWBVLV.mjs +0 -148
  247. package/dist/{chunk-LLVQKSU3.mjs → chunk-GD4BJDJR.mjs} +3 -3
@@ -0,0 +1,507 @@
1
+ import {
2
+ Switch
3
+ } from "./chunk-ZU4NV6RG.mjs";
4
+ import {
5
+ formatDateWithWeekday
6
+ } from "./chunk-7PV3IWCN.mjs";
7
+ import {
8
+ DatePicker
9
+ } from "./chunk-DUJTAXMH.mjs";
10
+ import {
11
+ Tabs,
12
+ TabsContent,
13
+ TabsList,
14
+ TabsTrigger
15
+ } from "./chunk-JHJHG4GO.mjs";
16
+ import {
17
+ Select,
18
+ SelectContent,
19
+ SelectItem,
20
+ SelectTrigger,
21
+ SelectValue
22
+ } from "./chunk-7PYJD5JI.mjs";
23
+ import {
24
+ Label
25
+ } from "./chunk-NSLMILBT.mjs";
26
+ import {
27
+ Separator
28
+ } from "./chunk-FH6QVUVZ.mjs";
29
+ import {
30
+ Input
31
+ } from "./chunk-GYMYRIZP.mjs";
32
+ import {
33
+ Dialog,
34
+ DialogContent,
35
+ DialogDescription,
36
+ DialogFooter,
37
+ DialogHeader,
38
+ DialogTitle
39
+ } from "./chunk-6DZEXFNB.mjs";
40
+ import {
41
+ Button
42
+ } from "./chunk-XREGSKX3.mjs";
43
+ import {
44
+ cn
45
+ } from "./chunk-VLQZANBF.mjs";
46
+ import {
47
+ __spreadProps,
48
+ __spreadValues
49
+ } from "./chunk-FWCSY2DS.mjs";
50
+
51
+ // src/components/ui/appointment-availability-settings.tsx
52
+ import React from "react";
53
+ import { Plus, X } from "lucide-react";
54
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
55
+ var AU_PUBLIC_HOLIDAYS_2026 = [
56
+ { date: "2026-01-01", label: "New Year's Day" },
57
+ { date: "2026-01-26", label: "Australia Day" },
58
+ { date: "2026-04-03", label: "Good Friday" },
59
+ { date: "2026-04-04", label: "Easter Saturday" },
60
+ { date: "2026-04-06", label: "Easter Monday" },
61
+ { date: "2026-04-25", label: "ANZAC Day" },
62
+ { date: "2026-06-08", label: "King's Birthday" },
63
+ { date: "2026-12-25", label: "Christmas Day" },
64
+ { date: "2026-12-26", label: "Boxing Day" }
65
+ ];
66
+ var TIME_OPTIONS = (() => {
67
+ const opts = [];
68
+ for (let h = 6; h <= 21; h++) {
69
+ for (const m of [0, 30]) {
70
+ const hh = String(h).padStart(2, "0");
71
+ const mm = String(m).padStart(2, "0");
72
+ const hour12 = h === 0 ? 12 : h > 12 ? h - 12 : h;
73
+ const ampm = h < 12 ? "AM" : "PM";
74
+ opts.push({ value: `${hh}:${mm}`, label: `${hour12}:${mm} ${ampm}` });
75
+ }
76
+ }
77
+ return opts;
78
+ })();
79
+ var timeLabel = (v) => {
80
+ var _a, _b;
81
+ return (_b = (_a = TIME_OPTIONS.find((o) => o.value === v)) == null ? void 0 : _a.label) != null ? _b : v;
82
+ };
83
+ function TimeSelect({
84
+ value,
85
+ onChange,
86
+ disabled
87
+ }) {
88
+ return /* @__PURE__ */ jsxs(
89
+ Select,
90
+ {
91
+ value,
92
+ onValueChange: (v) => onChange(v),
93
+ disabled,
94
+ children: [
95
+ /* @__PURE__ */ jsx(SelectTrigger, { className: "w-36", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
96
+ /* @__PURE__ */ jsx(SelectContent, { children: TIME_OPTIONS.map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
97
+ ]
98
+ }
99
+ );
100
+ }
101
+ function AddTimeOffDialog({
102
+ open,
103
+ onOpenChange,
104
+ onAdd
105
+ }) {
106
+ const [label, setLabel] = React.useState("");
107
+ const [date, setDate] = React.useState(void 0);
108
+ const [includeTime, setIncludeTime] = React.useState(false);
109
+ const [timeStart, setTimeStart] = React.useState("09:00");
110
+ const [timeEnd, setTimeEnd] = React.useState("17:00");
111
+ const reset = () => {
112
+ setLabel("");
113
+ setDate(void 0);
114
+ setIncludeTime(false);
115
+ setTimeStart("09:00");
116
+ setTimeEnd("17:00");
117
+ };
118
+ const handleAdd = () => {
119
+ if (!date) return;
120
+ const isoDate = [
121
+ date.getFullYear(),
122
+ String(date.getMonth() + 1).padStart(2, "0"),
123
+ String(date.getDate()).padStart(2, "0")
124
+ ].join("-");
125
+ onAdd({
126
+ date: isoDate,
127
+ label: label.trim() || void 0,
128
+ timeStart: includeTime ? timeStart : void 0,
129
+ timeEnd: includeTime ? timeEnd : void 0
130
+ });
131
+ reset();
132
+ onOpenChange(false);
133
+ };
134
+ const handleCancel = () => {
135
+ reset();
136
+ onOpenChange(false);
137
+ };
138
+ return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { size: "auto", minWidth: "26rem", align: "top", children: [
139
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
140
+ /* @__PURE__ */ jsx(DialogTitle, { children: "Add time off" }),
141
+ /* @__PURE__ */ jsx(DialogDescription, { children: "Block a date when you are unavailable. Clients cannot book on this date." })
142
+ ] }),
143
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 py-1", children: [
144
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
145
+ /* @__PURE__ */ jsxs(Label, { htmlFor: "toff-label", children: [
146
+ "Name",
147
+ " ",
148
+ /* @__PURE__ */ jsx("span", { className: "font-normal text-muted-foreground", children: "(optional)" })
149
+ ] }),
150
+ /* @__PURE__ */ jsx(
151
+ Input,
152
+ {
153
+ id: "toff-label",
154
+ placeholder: "e.g. Conference, Personal day\u2026",
155
+ value: label,
156
+ onChange: (e) => setLabel(e.target.value)
157
+ }
158
+ )
159
+ ] }),
160
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
161
+ /* @__PURE__ */ jsx(Label, { children: "Date" }),
162
+ /* @__PURE__ */ jsx(
163
+ DatePicker,
164
+ {
165
+ value: date,
166
+ onChange: setDate,
167
+ placeholder: "Pick a date",
168
+ calendarProps: { fromDate: /* @__PURE__ */ new Date() }
169
+ }
170
+ )
171
+ ] }),
172
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
173
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
174
+ /* @__PURE__ */ jsx(
175
+ Switch,
176
+ {
177
+ id: "toff-include-time",
178
+ checked: includeTime,
179
+ onCheckedChange: setIncludeTime
180
+ }
181
+ ),
182
+ /* @__PURE__ */ jsx(
183
+ Label,
184
+ {
185
+ htmlFor: "toff-include-time",
186
+ className: "cursor-pointer text-sm",
187
+ children: "Specify hours (partial day)"
188
+ }
189
+ )
190
+ ] }),
191
+ includeTime && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 pl-10", children: [
192
+ /* @__PURE__ */ jsx(TimeSelect, { value: timeStart, onChange: setTimeStart }),
193
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "to" }),
194
+ /* @__PURE__ */ jsx(TimeSelect, { value: timeEnd, onChange: setTimeEnd })
195
+ ] })
196
+ ] })
197
+ ] }),
198
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
199
+ /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: handleCancel, children: "Cancel" }),
200
+ /* @__PURE__ */ jsx(Button, { onClick: handleAdd, disabled: !date, children: "Add" })
201
+ ] })
202
+ ] }) });
203
+ }
204
+ function AppointmentAvailabilitySettings({
205
+ schedule: initialSchedule,
206
+ blockedDates: blockedDatesProp,
207
+ onSave,
208
+ onBlockedDatesChange
209
+ }) {
210
+ const hasMounted = React.useRef(false);
211
+ React.useEffect(() => {
212
+ hasMounted.current = true;
213
+ }, []);
214
+ const [schedule, setSchedule] = React.useState(initialSchedule);
215
+ const [meetingDuration, setMeetingDuration] = React.useState("30");
216
+ const [schedulingBuffer, setSchedulingBuffer] = React.useState("0");
217
+ const [maxSlotsPerDay, setMaxSlotsPerDay] = React.useState("8");
218
+ const [timeOffEntries, setTimeOffEntries] = React.useState(
219
+ () => {
220
+ const holidayDates = new Set(AU_PUBLIC_HOLIDAYS_2026.map((h) => h.date));
221
+ const entries = AU_PUBLIC_HOLIDAYS_2026.map((h) => __spreadProps(__spreadValues({}, h), {
222
+ enabled: true,
223
+ isHoliday: true
224
+ }));
225
+ blockedDatesProp == null ? void 0 : blockedDatesProp.forEach((b) => {
226
+ if (!holidayDates.has(b.date)) {
227
+ entries.push({
228
+ date: b.date,
229
+ label: b.label,
230
+ enabled: true,
231
+ isHoliday: false
232
+ });
233
+ }
234
+ });
235
+ return entries.sort((a, b) => a.date.localeCompare(b.date));
236
+ }
237
+ );
238
+ const [addMoreOpen, setAddMoreOpen] = React.useState(false);
239
+ const currentPrefs = React.useMemo(
240
+ () => ({ meetingDuration, schedulingBuffer, maxSlotsPerDay }),
241
+ [meetingDuration, schedulingBuffer, maxSlotsPerDay]
242
+ );
243
+ React.useEffect(() => {
244
+ if (!hasMounted.current) return;
245
+ onSave == null ? void 0 : onSave(schedule, currentPrefs);
246
+ }, [schedule]);
247
+ React.useEffect(() => {
248
+ if (!hasMounted.current) return;
249
+ onSave == null ? void 0 : onSave(schedule, currentPrefs);
250
+ }, [meetingDuration, schedulingBuffer, maxSlotsPerDay]);
251
+ React.useEffect(() => {
252
+ if (!hasMounted.current) return;
253
+ const blocked = timeOffEntries.filter((e) => e.enabled).map(({ date, label, timeStart, timeEnd }) => ({
254
+ date,
255
+ label,
256
+ timeStart,
257
+ timeEnd
258
+ }));
259
+ onBlockedDatesChange == null ? void 0 : onBlockedDatesChange(blocked);
260
+ }, [timeOffEntries]);
261
+ const toggleDay = (index) => {
262
+ setSchedule(
263
+ (prev) => prev.map((d, i) => i === index ? __spreadProps(__spreadValues({}, d), { enabled: !d.enabled }) : d)
264
+ );
265
+ };
266
+ const updateTime = (index, field, value) => {
267
+ setSchedule(
268
+ (prev) => prev.map((d, i) => i === index ? __spreadProps(__spreadValues({}, d), { [field]: value }) : d)
269
+ );
270
+ };
271
+ const toggleTimeOff = (date, enabled) => {
272
+ setTimeOffEntries(
273
+ (prev) => prev.map((e) => e.date === date ? __spreadProps(__spreadValues({}, e), { enabled }) : e)
274
+ );
275
+ };
276
+ const removeCustomDate = (date) => {
277
+ setTimeOffEntries((prev) => prev.filter((e) => e.date !== date));
278
+ };
279
+ const handleAddMore = (entry) => {
280
+ if (timeOffEntries.some((e) => e.date === entry.date)) return;
281
+ setTimeOffEntries(
282
+ (prev) => [
283
+ ...prev,
284
+ {
285
+ date: entry.date,
286
+ label: entry.label,
287
+ enabled: true,
288
+ isHoliday: false,
289
+ timeStart: entry.timeStart,
290
+ timeEnd: entry.timeEnd
291
+ }
292
+ ].sort((a, b) => a.date.localeCompare(b.date))
293
+ );
294
+ };
295
+ return /* @__PURE__ */ jsxs("div", { className: "border border-border bg-card", children: [
296
+ /* @__PURE__ */ jsxs(Tabs, { defaultValue: "weekly", className: "gap-0", children: [
297
+ /* @__PURE__ */ jsx("div", { className: "border-b border-border p-1", children: /* @__PURE__ */ jsxs(TabsList, { variant: "default", className: "w-full", children: [
298
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "weekly", children: "Weekly Availability" }),
299
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "booking", children: "Booking Preferences" }),
300
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "time-off", children: "Time Off" })
301
+ ] }) }),
302
+ /* @__PURE__ */ jsx(TabsContent, { value: "weekly", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col divide-y divide-border", children: schedule.map((day, index) => /* @__PURE__ */ jsxs(
303
+ "div",
304
+ {
305
+ className: "flex min-h-[68px] items-center gap-5 px-6 py-4",
306
+ children: [
307
+ /* @__PURE__ */ jsxs("div", { className: "flex w-28 items-center gap-3", children: [
308
+ /* @__PURE__ */ jsx(
309
+ Switch,
310
+ {
311
+ id: `day-${day.day}`,
312
+ checked: day.enabled,
313
+ onCheckedChange: () => toggleDay(index)
314
+ }
315
+ ),
316
+ /* @__PURE__ */ jsx(
317
+ Label,
318
+ {
319
+ htmlFor: `day-${day.day}`,
320
+ className: "cursor-pointer text-sm font-medium",
321
+ children: day.day
322
+ }
323
+ )
324
+ ] }),
325
+ day.enabled ? /* @__PURE__ */ jsxs("div", { className: "flex flex-1 items-center gap-3", children: [
326
+ /* @__PURE__ */ jsx(
327
+ TimeSelect,
328
+ {
329
+ value: day.startTime,
330
+ onChange: (v) => updateTime(index, "startTime", v)
331
+ }
332
+ ),
333
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "to" }),
334
+ /* @__PURE__ */ jsx(
335
+ TimeSelect,
336
+ {
337
+ value: day.endTime,
338
+ onChange: (v) => updateTime(index, "endTime", v)
339
+ }
340
+ )
341
+ ] }) : /* @__PURE__ */ jsx("p", { className: "flex-1 text-sm text-muted-foreground", children: "Unavailable" })
342
+ ]
343
+ },
344
+ day.day
345
+ )) }) }),
346
+ /* @__PURE__ */ jsx(TabsContent, { value: "booking", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col divide-y divide-border", children: [
347
+ /* @__PURE__ */ jsxs("div", { className: "flex min-h-[68px] items-center justify-between px-6 py-4", children: [
348
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
349
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "Meeting Duration" }),
350
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Length of each appointment slot" })
351
+ ] }),
352
+ /* @__PURE__ */ jsxs(
353
+ Select,
354
+ {
355
+ value: meetingDuration,
356
+ onValueChange: (v) => setMeetingDuration(v),
357
+ children: [
358
+ /* @__PURE__ */ jsx(SelectTrigger, { className: "w-40", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
359
+ /* @__PURE__ */ jsxs(SelectContent, { children: [
360
+ /* @__PURE__ */ jsx(SelectItem, { value: "15", children: "15 minutes" }),
361
+ /* @__PURE__ */ jsx(SelectItem, { value: "30", children: "30 minutes" }),
362
+ /* @__PURE__ */ jsx(SelectItem, { value: "45", children: "45 minutes" }),
363
+ /* @__PURE__ */ jsx(SelectItem, { value: "60", children: "60 minutes" }),
364
+ /* @__PURE__ */ jsx(SelectItem, { value: "90", children: "90 minutes" })
365
+ ] })
366
+ ]
367
+ }
368
+ )
369
+ ] }),
370
+ /* @__PURE__ */ jsxs("div", { className: "flex min-h-[68px] items-center justify-between px-6 py-4", children: [
371
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
372
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "Scheduling Buffer" }),
373
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Gap between consecutive bookings" })
374
+ ] }),
375
+ /* @__PURE__ */ jsxs(
376
+ Select,
377
+ {
378
+ value: schedulingBuffer,
379
+ onValueChange: (v) => setSchedulingBuffer(v),
380
+ children: [
381
+ /* @__PURE__ */ jsx(SelectTrigger, { className: "w-40", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
382
+ /* @__PURE__ */ jsxs(SelectContent, { children: [
383
+ /* @__PURE__ */ jsx(SelectItem, { value: "0", children: "No buffer" }),
384
+ /* @__PURE__ */ jsx(SelectItem, { value: "5", children: "5 minutes" }),
385
+ /* @__PURE__ */ jsx(SelectItem, { value: "10", children: "10 minutes" }),
386
+ /* @__PURE__ */ jsx(SelectItem, { value: "15", children: "15 minutes" }),
387
+ /* @__PURE__ */ jsx(SelectItem, { value: "30", children: "30 minutes" })
388
+ ] })
389
+ ]
390
+ }
391
+ )
392
+ ] }),
393
+ /* @__PURE__ */ jsxs("div", { className: "flex min-h-[68px] items-center justify-between px-6 py-4", children: [
394
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
395
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "Daily Slot Limit" }),
396
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Maximum bookings accepted per day" })
397
+ ] }),
398
+ /* @__PURE__ */ jsxs(
399
+ Select,
400
+ {
401
+ value: maxSlotsPerDay,
402
+ onValueChange: (v) => setMaxSlotsPerDay(v),
403
+ children: [
404
+ /* @__PURE__ */ jsx(SelectTrigger, { className: "w-40", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
405
+ /* @__PURE__ */ jsxs(SelectContent, { children: [
406
+ /* @__PURE__ */ jsx(SelectItem, { value: "2", children: "2 per day" }),
407
+ /* @__PURE__ */ jsx(SelectItem, { value: "4", children: "4 per day" }),
408
+ /* @__PURE__ */ jsx(SelectItem, { value: "6", children: "6 per day" }),
409
+ /* @__PURE__ */ jsx(SelectItem, { value: "8", children: "8 per day" }),
410
+ /* @__PURE__ */ jsx(SelectItem, { value: "10", children: "10 per day" }),
411
+ /* @__PURE__ */ jsx(SelectItem, { value: "unlimited", children: "Unlimited" })
412
+ ] })
413
+ ]
414
+ }
415
+ )
416
+ ] })
417
+ ] }) }),
418
+ /* @__PURE__ */ jsxs(TabsContent, { value: "time-off", children: [
419
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
420
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Toggle dates when you are unavailable. Clients cannot book on switched-on dates." }),
421
+ /* @__PURE__ */ jsxs(
422
+ Button,
423
+ {
424
+ variant: "outline",
425
+ size: "sm",
426
+ className: "ml-4 shrink-0 gap-1.5",
427
+ onClick: () => setAddMoreOpen(true),
428
+ children: [
429
+ /* @__PURE__ */ jsx(Plus, { className: "h-3.5 w-3.5" }),
430
+ "Add more"
431
+ ]
432
+ }
433
+ )
434
+ ] }),
435
+ /* @__PURE__ */ jsx(Separator, {}),
436
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col divide-y divide-border", children: timeOffEntries.map((entry) => {
437
+ var _a;
438
+ const formattedDate = formatDateWithWeekday(entry.date);
439
+ const hasTimeRange = entry.timeStart && entry.timeEnd;
440
+ return /* @__PURE__ */ jsxs(
441
+ "div",
442
+ {
443
+ className: "flex min-h-[68px] items-center gap-5 px-6 py-4",
444
+ children: [
445
+ /* @__PURE__ */ jsx(
446
+ Switch,
447
+ {
448
+ id: `toff-${entry.date}`,
449
+ checked: entry.enabled,
450
+ onCheckedChange: (v) => toggleTimeOff(entry.date, v)
451
+ }
452
+ ),
453
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
454
+ /* @__PURE__ */ jsx(
455
+ Label,
456
+ {
457
+ htmlFor: `toff-${entry.date}`,
458
+ className: cn(
459
+ "cursor-pointer text-sm font-medium",
460
+ !entry.enabled && "text-muted-foreground"
461
+ ),
462
+ children: (_a = entry.label) != null ? _a : formattedDate
463
+ }
464
+ ),
465
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
466
+ entry.label ? formattedDate : null,
467
+ hasTimeRange && /* @__PURE__ */ jsxs(Fragment, { children: [
468
+ entry.label ? " \xB7 " : "",
469
+ timeLabel(entry.timeStart),
470
+ " \u2013",
471
+ " ",
472
+ timeLabel(entry.timeEnd)
473
+ ] })
474
+ ] })
475
+ ] }),
476
+ !entry.isHoliday && /* @__PURE__ */ jsx(
477
+ Button,
478
+ {
479
+ type: "button",
480
+ variant: "ghost",
481
+ size: "icon",
482
+ className: "h-7 w-7 text-muted-foreground hover:text-destructive",
483
+ onClick: () => removeCustomDate(entry.date),
484
+ children: /* @__PURE__ */ jsx(X, { className: "h-3.5 w-3.5" })
485
+ }
486
+ )
487
+ ]
488
+ },
489
+ entry.date
490
+ );
491
+ }) })
492
+ ] })
493
+ ] }),
494
+ /* @__PURE__ */ jsx(
495
+ AddTimeOffDialog,
496
+ {
497
+ open: addMoreOpen,
498
+ onOpenChange: setAddMoreOpen,
499
+ onAdd: handleAddMore
500
+ }
501
+ )
502
+ ] });
503
+ }
504
+
505
+ export {
506
+ AppointmentAvailabilitySettings
507
+ };
@@ -5,9 +5,11 @@ import {
5
5
  DATASET_ALPHAS,
6
6
  DoughnutLegendRow,
7
7
  FALLBACK_PRIMARY,
8
- formatAbbrev,
9
8
  hexToRgba
10
- } from "./chunk-FZIXGLMV.mjs";
9
+ } from "./chunk-M3FV7LOK.mjs";
10
+ import {
11
+ formatCurrencyAbbrev
12
+ } from "./chunk-MN5NYQCL.mjs";
11
13
  import {
12
14
  Empty,
13
15
  EmptyDescription
@@ -17,7 +19,7 @@ import {
17
19
  CardContent,
18
20
  CardHeader,
19
21
  CardTitle
20
- } from "./chunk-CLIN5525.mjs";
22
+ } from "./chunk-C7CQJNMR.mjs";
21
23
  import {
22
24
  useThemeVars
23
25
  } from "./chunk-FEZKMUCF.mjs";
@@ -96,7 +98,7 @@ function TransactionsLiabilitiesBreakdownChart({
96
98
  label: (ctx) => {
97
99
  const val = ctx.raw;
98
100
  const pct = total > 0 ? `${(val / total * 100).toFixed(1)}%` : "0%";
99
- return ` ${ctx.label}: ${formatAbbrev(val)} (${pct})`;
101
+ return ` ${ctx.label}: ${formatCurrencyAbbrev(val)} (${pct})`;
100
102
  }
101
103
  }
102
104
  }
@@ -110,7 +112,7 @@ function TransactionsLiabilitiesBreakdownChart({
110
112
  className: cn("w-full py-4 sm:py-6 gap-2", className),
111
113
  style: { maxWidth: width, fontFamily },
112
114
  children: [
113
- /* @__PURE__ */ jsx(CardHeader, { className: "px-3 sm:px-6", children: /* @__PURE__ */ jsx(CardTitle, { className: "text-sm sm:text-base", children: title }) }),
115
+ /* @__PURE__ */ jsx(CardHeader, { className: "px-3 sm:px-6", children: /* @__PURE__ */ jsx(CardTitle, { className: "text-xs font-semibold uppercase tracking-wide", children: title }) }),
114
116
  /* @__PURE__ */ jsx(CardContent, { className: "px-3 sm:px-6", children: isLoading ? /* @__PURE__ */ jsx(Skeleton, { style: { height, width: "100%" } }) : !hasData ? /* @__PURE__ */ jsx(Empty, { className: "flex-none p-4", style: { height }, children: /* @__PURE__ */ jsx(EmptyDescription, { children: "No data available" }) }) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
115
117
  /* @__PURE__ */ jsxs("div", { style: { height, width: "100%", position: "relative" }, children: [
116
118
  /* @__PURE__ */ jsx(
@@ -135,7 +137,7 @@ function TransactionsLiabilitiesBreakdownChart({
135
137
  pointerEvents: "none"
136
138
  },
137
139
  children: [
138
- /* @__PURE__ */ jsx("div", { className: "text-base font-semibold leading-tight", children: formatAbbrev(total) }),
140
+ /* @__PURE__ */ jsx("div", { className: "text-base font-semibold leading-tight", children: formatCurrencyAbbrev(total) }),
139
141
  /* @__PURE__ */ jsx("div", { className: "text-[11px] text-muted-foreground leading-none mt-1", children: "Total" })
140
142
  ]
141
143
  }
@@ -13,10 +13,10 @@ import {
13
13
  DialogFooter,
14
14
  DialogHeader,
15
15
  DialogTitle
16
- } from "./chunk-XIRTEFKH.mjs";
16
+ } from "./chunk-6DZEXFNB.mjs";
17
17
  import {
18
18
  Button
19
- } from "./chunk-2I5S2AMY.mjs";
19
+ } from "./chunk-XREGSKX3.mjs";
20
20
  import {
21
21
  cn
22
22
  } from "./chunk-VLQZANBF.mjs";
@@ -82,10 +82,13 @@ function AddLeadModal({
82
82
  }
83
83
  ),
84
84
  searchValue && /* @__PURE__ */ jsx(
85
- "button",
85
+ Button,
86
86
  {
87
+ type: "button",
88
+ variant: "ghost",
89
+ size: "icon",
87
90
  onClick: () => onSearchChange == null ? void 0 : onSearchChange(""),
88
- className: "absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",
91
+ className: "absolute right-2.5 top-1/2 size-6 -translate-y-1/2 text-muted-foreground hover:text-foreground",
89
92
  "aria-label": "Clear search",
90
93
  children: /* @__PURE__ */ jsx(X, { className: "size-3.5" })
91
94
  }